diff --git a/dist/draw2d.js b/dist/draw2d.js index 790916e5..848b57c9 100644 --- a/dist/draw2d.js +++ b/dist/draw2d.js @@ -1,3 +1,3 @@ /*! For license information please see draw2d.js.LICENSE.txt */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.draw2d=e():t.draw2d=e()}(self,(()=>(()=>{var t={"./src/lib/Class.exec.js":(t,e,n)=>{"use strict";n("./node_modules/script-loader/addScript.js")(n("./node_modules/raw-loader/index.js!./src/lib/Class.exec.js"))},"./src/lib/pathfinding.exec.js":(t,e,n)=>{"use strict";n("./node_modules/script-loader/addScript.js")(n("./node_modules/raw-loader/index.js!./src/lib/pathfinding.exec.js"))},"./src/lib/raphael.exec.js":(t,e,n)=>{"use strict";n("./node_modules/script-loader/addScript.js")(n("./node_modules/raw-loader/index.js!./src/lib/raphael.exec.js"))},"./src/Canvas.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.Canvas=Class.extend({NAME:"draw2d.Canvas",init:function(t,e,n){let r=this;this.setScrollArea(document.body),this.canvasId=t,this.html=$("#"+t),this.html.css({cursor:"default"}),isNaN(parseFloat(e))||isNaN(parseFloat(n))?(this.initialWidth=this.getWidth(),this.initialHeight=this.getHeight()):(this.initialWidth=parseInt(e),this.initialHeight=parseInt(n),this.html.height(this.initialHeight).width(this.initialWidth)),this.html.css({"-webkit-tap-highlight-color":"rgba(0,0,0,0)"}),$(this.html).droppable({accept:".draw2d_droppable",over:function(t,e){r.onDragEnter(e.draggable)},out:function(t,e){r.onDragLeave(e.draggable)},drop:function(t,e){t=r._getEvent(t);let n=$(e.helper).position(),i=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);r.onDrop(e.draggable,i.getX()-(t.clientX-n.left)+5,i.getY()-(t.clientY-n.top)+5,t.shiftKey,t.ctrlKey)}}),$(".draw2d_droppable").draggable({appendTo:"body",stack:"body",zIndex:27e3,helper:"clone",drag:function(t,e){t=r._getEvent(t);let n=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);r.onDrag(e.draggable,n.getX(),n.getY(),t.shiftKey,t.ctrlKey)},stop:function(t,e){},start:function(t,e){$(e.helper).addClass("shadow")}}),isNaN(parseFloat(n))?this.paper=Raphael(t,this.getWidth(),this.getHeight()):this.paper=Raphael(t,e,n),this.paper.canvas.style.position="absolute",this.zoomPolicy=null,this.zoomFactor=1,this.selection=new i.default.Selection,this.currentDropTarget=null,this.currentHoverFigure=null,this.regionDragDropConstraint=new i.default.policy.figure.RegionEditPolicy(0,0,this.getWidth(),this.getHeight()),this.eventSubscriptions={},this.editPolicy=new i.default.util.ArrayList,this.figures=new i.default.util.ArrayList,this.lines=new i.default.util.ArrayList,this.commonPorts=new i.default.util.ArrayList,this.resizeHandles=new i.default.util.ArrayList,this.commandStack=new i.default.command.CommandStack,this.linesToRepaintAfterDragDrop=new i.default.util.ArrayList,this.lineIntersections=new i.default.util.ArrayList,this.installEditPolicy(new i.default.policy.canvas.WheelZoomPolicy),this.installEditPolicy(new i.default.policy.canvas.DefaultKeyboardPolicy),this.installEditPolicy(new i.default.policy.canvas.BoundingboxSelectionPolicy),this.installEditPolicy(new i.default.policy.canvas.DropInterceptorPolicy),this.installEditPolicy(new i.default.policy.connection.ComposedConnectionCreatePolicy([new i.default.policy.connection.DragConnectionCreatePolicy,new i.default.policy.connection.ClickConnectionCreatePolicy])),this.commandStack.addEventListener((function(t){!0===t.isPostChangeEvent()&&(r.calculateConnectionIntersection(),r.linesToRepaintAfterDragDrop.each(((t,e)=>{e.svgPathString=null,e.repaint()})),r.linesToRepaintAfterDragDrop=new i.default.util.ArrayList)})),this.mouseDown=!1,this.mouseDownX=0,this.mouseDownY=0,this.mouseDragDiffX=0,this.mouseDragDiffY=0,this.html.bind("mouseup touchend",(function(t){if(!1===r.mouseDown)return;t=r._getEvent(t),r.calculateConnectionIntersection(),r.mouseDown=!1;let e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);r.editPolicy.each((function(n,i){i.onMouseUp(r,e.x,e.y,t.shiftKey,t.ctrlKey)})),r.mouseDragDiffX=0,r.mouseDragDiffY=0})),this.html.bind("mousemove touchmove",(function(t){t=r._getEvent(t);let e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);if(!1===r.mouseDown){try{let t=r.getBestFigure(e.x,e.y);t!==r.currentHoverFigure&&null!==r.currentHoverFigure&&(r.currentHoverFigure.onMouseLeave(),r.currentHoverFigure.fireEvent("mouseleave"),r.fireEvent("mouseleave",{figure:r.currentHoverFigure})),t!==r.currentHoverFigure&&null!==t&&(t.onMouseEnter(),t.fireEvent("mouseenter"),r.fireEvent("mouseenter",{figure:t})),r.currentHoverFigure=t}catch(t){console.log(t)}r.editPolicy.each((function(n,i){i.onMouseMove(r,e.x,e.y,t.shiftKey,t.ctrlKey)})),r.fireEvent("mousemove",{x:e.x,y:e.y,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,hoverFigure:r.currentHoverFigure})}else{let n=(t.clientX-r.mouseDownX)*r.zoomFactor,i=(t.clientY-r.mouseDownY)*r.zoomFactor;r.editPolicy.each((function(e,s){s.onMouseDrag(r,n,i,n-r.mouseDragDiffX,i-r.mouseDragDiffY,t.shiftKey,t.ctrlKey)})),r.mouseDragDiffX=n,r.mouseDragDiffY=i,r.fireEvent("mousemove",{x:e.x,y:e.y,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,hoverFigure:r.currentHoverFigure})}})),this.html.bind("mousedown",(function(t){try{let e=null;switch(t.which){case 1:case 0:try{t.preventDefault(),t=r._getEvent(t),r.mouseDownX=t.clientX,r.mouseDownY=t.clientY,r.mouseDragDiffX=0,r.mouseDragDiffY=0,e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY),r.mouseDown=!0,r.editPolicy.each((function(n,i){i.onMouseDown(r,e.x,e.y,t.shiftKey,t.ctrlKey)}))}catch(t){console.log(t)}break;case 3:return t.preventDefault(),void 0!==t.stopPropagation&&t.stopPropagation(),t=r._getEvent(t),e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY),r.onRightMouseDown(e.x,e.y,t.shiftKey,t.ctrlKey),!1}}catch(t){console.log(t)}})),this.html.on("dblclick",(function(t){t=r._getEvent(t),r.mouseDownX=t.clientX,r.mouseDownY=t.clientY;let e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);r.onDoubleClick(e.x,e.y,t.shiftKey,t.ctrlKey)})),this.html.on("click",(function(t){if(t=r._getEvent(t),r.mouseDownX===t.clientX||r.mouseDownY===t.clientY){let e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);r.onClick(e.x,e.y,t.shiftKey,t.ctrlKey)}})),this.html.on("MozMousePixelScroll DOMMouseScroll mousewheel",(function(t){let e=r._getEvent(t),n=r.fromDocumentToCanvasCoordinate(e.originalEvent.clientX,e.originalEvent.clientY),i=0;"mousewheel"===t.type?i=-1*t.originalEvent.wheelDelta:"DOMMouseScroll"===t.type&&(i=40*t.originalEvent.detail),!1===r.onMouseWheel(i,n.x,n.y,e.shiftKey,e.ctrlKey)&&t.preventDefault()})),this.keyupCallback=function(t){let e=$(t.target);e.is("input")||e.is("textarea")||r.editPolicy.each((function(e,n){n instanceof i.default.policy.canvas.KeyboardPolicy&&n.onKeyUp(r,t.keyCode,t.shiftKey,t.ctrlKey)}))},$(document).bind("keyup",this.keyupCallback),this.keydownCallback=function(t){let e=$(t.target);e.is("input")||e.is("textarea")||r.editPolicy.each((function(e,n){n instanceof i.default.policy.canvas.KeyboardPolicy&&n.onKeyDown(r,t.keyCode,t.shiftKey,t.ctrlKey)}))},$(document).bind("keydown",this.keydownCallback)},destroy:function(){this.clear(),$(document).unbind("keydown",this.keydownCallback),$(document).unbind("keyup",this.keyupCallback),this.eventSubscriptions={};try{this.paper.remove()}catch(t){}},clear:function(){this.fireEvent("clear");let t=this;return this.lines.clone().each((function(e,n){t.remove(n)})),this.figures.clone().each((function(e,n){t.remove(n)})),this.zoomFactor=1,this.selection.clear(),this.currentDropTarget=null,this.figures=new i.default.util.ArrayList,this.lines=new i.default.util.ArrayList,this.commonPorts=new i.default.util.ArrayList,this.commandStack.markSaveLocation(),this.linesToRepaintAfterDragDrop=new i.default.util.ArrayList,this.lineIntersections=new i.default.util.ArrayList,this},hideDecoration:function(){},showDecoration:function(){},calculateConnectionIntersection:function(){this.lineIntersections=new i.default.util.ArrayList;let t=this.getLines().clone();for(;t.getSize()>0;){let e=t.removeElementAt(0);t.each(((t,n)=>{let r=e.intersection(n);r.getSize()>0&&(this.lineIntersections.add({line:e,other:n,intersection:r}),this.lineIntersections.add({line:n,other:e,intersection:r}))}))}return this},installEditPolicy:function(t){return t instanceof i.default.policy.canvas.SelectionPolicy?(this.getSelection().getAll().each(((t,e)=>{e.unselect()})),this.editPolicy.grep((t=>{let e=!(t instanceof i.default.policy.canvas.SelectionPolicy);return!1===e&&t.onUninstall(this),e}))):t instanceof i.default.policy.canvas.ZoomPolicy?(this.editPolicy.grep((t=>{let e=!(t instanceof i.default.policy.canvas.ZoomPolicy);return!1===e&&t.onUninstall(this),e})),this.zoomPolicy=t):t instanceof i.default.policy.connection.ConnectionCreatePolicy?this.editPolicy.grep((t=>{let e=!(t instanceof i.default.policy.connection.ConnectionCreatePolicy);return!1===e&&t.onUninstall(this),e})):i.default.policy.canvas.DropInterceptorPolicy,t.NAME&&this.uninstallEditPolicy(t.NAME),t.onInstall(this),this.editPolicy.add(t),this},uninstallEditPolicy:function(t){if(null===t)return;let e=this.editPolicy.remove(t);if(null!==e)e.onUninstall(this),e instanceof i.default.policy.canvas.ZoomPolicy&&(this.zoomPolicy=null);else{let e=this,n="string"==typeof t?t:t.NAME;this.editPolicy.grep((function(t){return t.NAME!==n||(t.onUninstall(e),t instanceof i.default.policy.canvas.ZoomPolicy&&(e.zoomPolicy=null),!1)}))}return this},getDropInterceptorPolicies:function(){return this.editPolicy.clone().grep((function(t){return t instanceof i.default.policy.canvas.DropInterceptorPolicy}))},setZoom:function(t,e){this.zoomPolicy&&this.zoomPolicy.setZoom(t,e)},getZoom:function(){return this.zoomFactor},getDimension:function(){return new i.default.geo.Rectangle(0,0,this.initialWidth,this.initialHeight)},setDimension:function(t,e){if(void 0===t){let t=this.getFigures().clone().map((function(t){return t.getAbsoluteX()+t.getWidth()})),e=this.getFigures().clone().map((function(t){return t.getAbsoluteY()+t.getHeight()}));this.initialHeight=Math.max(...e.asArray()),this.initialWidth=Math.max(...t.asArray())}else t instanceof i.default.geo.Rectangle?(this.initialWidth=t.w,this.initialHeight=t.h):"number"==typeof t.width&&"number"==typeof t.height?(this.initialWidth=t.width,this.initialHeight=t.height):"number"==typeof t&&"number"==typeof e&&(this.initialWidth=t,this.initialHeight=e);return this.html.css({width:this.initialWidth+"px",height:this.initialHeight+"px"}),this.paper.setSize(this.initialWidth,this.initialHeight),this.setZoom(this.zoomFactor,!1),this},fromDocumentToCanvasCoordinate:function(t,e){return new i.default.geo.Point((t-this.getAbsoluteX()+this.getScrollLeft())*this.zoomFactor,(e-this.getAbsoluteY()+this.getScrollTop())*this.zoomFactor)},fromCanvasToDocumentCoordinate:function(t,e){return new i.default.geo.Point(t*(1/this.zoomFactor)+this.getAbsoluteX()-this.getScrollLeft(),e*(1/this.zoomFactor)+this.getAbsoluteY()-this.getScrollTop())},getHtmlContainer:function(){return this.html},_getEvent:function(t){if(void 0!==t.originalEvent){if(t.originalEvent.touches&&t.originalEvent.touches.length)return t.originalEvent.touches[0];if(t.originalEvent.changedTouches&&t.originalEvent.changedTouches.length)return t.originalEvent.changedTouches[0]}return t},setScrollArea:function(t){return this.scrollArea=$(t),this},getScrollArea:function(){return this.scrollArea},getScrollLeft:function(){return this.getScrollArea().scrollLeft()},getScrollTop:function(){return this.getScrollArea().scrollTop()},setScrollLeft:function(t){return this.getScrollArea().scrollLeft(t),this},setScrollTop:function(t){return this.getScrollArea().scrollTop(t),this},scrollTo:function(t,e){return this.getScrollArea().scrollTop(t).scrollLeft(e),this},getAbsoluteX:function(){return this.html.offset().left},getAbsoluteY:function(){return this.html.offset().top},getWidth:function(){return this.html.width()},getHeight:function(){return this.html.height()},add:function(t,e,n){if(t.getCanvas()!==this)return t instanceof i.default.shape.basic.Line?(this.linesToRepaintAfterDragDrop=this.lines,this.lines.add(t)):this.figures.add(t),void 0!==e&&t.setPosition(e,n),t.setCanvas(this),t.installEditPolicy(this.regionDragDropConstraint),t.getShapeElement(),t.repaint(),this.fireEvent("figure:add",{figure:t,canvas:this}),t.fireEvent("added",{figure:t,canvas:this}),t.fireEvent("move",{figure:t,x:t.getX(),y:t.getY(),dx:0,dy:0}),t instanceof i.default.shape.basic.PolyLine&&(this.calculateConnectionIntersection(),this.linesToRepaintAfterDragDrop.each(((t,e)=>{e.svgPathString=null,e.repaint()})),this.linesToRepaintAfterDragDrop=new i.default.util.ArrayList),this},remove:function(t){return t.getCanvas()!==this||(this.getSelection().contains(t)&&this.editPolicy.each(((e,n)=>{"function"==typeof n.unselect&&n.unselect(this,t)})),t instanceof i.default.shape.basic.Line?this.lines.remove(t):this.figures.remove(t),t.setCanvas(null),t instanceof i.default.Connection&&t.disconnect(),this.fireEvent("figure:remove",{figure:t}),t.fireEvent("removed",{figure:t,canvas:this})),this},getLines:function(){return this.lines},getFigures:function(){return this.figures},getLine:function(t){let e=this.lines.getSize();for(let n=0;n{if(r.id===t)return e=r,!1})),e},getIntersection:function(t){let e=new i.default.util.ArrayList;return this.lineIntersections.each(((n,r)=>{r.line===t&&r.intersection.each(((t,n)=>{e.add({x:n.x,y:n.y,justTouching:n.justTouching,other:r.other})}))})),e},snapToHelper:function(t,e){if(this.getSelection().getSize()>1)return e;let n=e.clone();return this.editPolicy.each(((r,s)=>{s instanceof i.default.policy.canvas.SnapToEditPolicy&&(e=s.snap(this,t,e,n))})),e},registerPort:function(t){return this.commonPorts.contains(t)||this.commonPorts.add(t),this},unregisterPort:function(t){return this.commonPorts.remove(t),this},getAllPorts:function(){return this.commonPorts},getCommandStack:function(){return this.commandStack},getPrimarySelection:function(){return this.selection.getPrimary()},getSelection:function(){return this.selection},setCurrentSelection:function(t){return this.selection.getAll().each(((t,e)=>{this.editPolicy.each(((t,n)=>{"function"==typeof n.unselect&&n.unselect(this,e)}))})),this.addSelection(t),this},addSelection:function(t){let e=(t,e)=>{this.editPolicy.each(((t,n)=>{"function"==typeof n.select&&n.select(this,e)}))};return t instanceof i.default.util.ArrayList||t instanceof i.default.Selection?t.each(e):e(0,t),this},getBestFigure:function(t,e,n,r){Array.isArray(n)||(n=n?[n]:[]),Array.isArray(r)||(r=r?[r]:[]);let i=null,s=null,a=function(t,e){for(let n=0,r=e.length;n=0;n--){let r=this.figures.get(n);if(l(r.children),null===i&&r.isVisible()&&r.hitTest(t,e)&&!o(r)&&c(r)){i=r;break}}let h=i,u=null,d=this.getBestLine(t,e,n,r);i=null;let p=this.lines.getSize();for(let t=0;t-1!==t.i)),f=f.sort(((t,e)=>e.i-t.i)),f.length>0&&(i=f[0].f),i},getBestLine:function(t,e,n){Array.isArray(n)||(n=n instanceof i.default.Figure?[n]:[]);let r=this.lines.getSize();for(let i=0;i{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.Configuration={version:"@VERSION@",i18n:{command:{move:"Move Shape",assignShape:"Add Shapes to Composite",groupShapes:"Group Shapes",ungroupShapes:"Ungroup Shapes",deleteShape:"Delete Shape",moveShape:"Move Shape",moveLine:"Move Line",addShape:"Add Shape",moveVertex:"Move Vertex",moveVertices:"Move Vertices",deleteVertex:"Delete Vertex",resizeShape:"Resize Shape",rotateShape:"Rotate Shape",collection:"Execute Commands",addVertex:"Add Vertex",changeAttributes:"Change Attributes",connectPorts:"Connect Ports"},menu:{deleteSegment:"Delete Segment",addSegment:"Add Segment"},dialog:{filenamePrompt:"Enter Filename:"}},factory:{createResizeHandle:function(t,e,n,r){return console.log("deprecated call factory.createResizeHandle"),new i.default.ResizeHandle({owner:t,type:e,width:n,height:r})},createConnection:function(t,e,n,r){return console.log("deprecated call factory.createConnection"),new i.default.Connection},createInputPort:function(t){return new i.default.InputPort},createOutputPort:function(t){return new i.default.OutputPort},createHybridPort:function(t){return new i.default.HybridPort}}}},"./src/Connection.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.Connection=i.default.shape.basic.PolyLine.extend({NAME:"draw2d.Connection",init:function(t,e,n){this.sourcePort=null,this.targetPort=null,this.oldPoint=null,this.sourceDecorator=null,this.targetDecorator=null,this.sourceDecoratorNode=null,this.targetDecoratorNode=null,this.isMoving=!1,this.moveListener=t=>{t===this.sourcePort?this.setStartPoint(this.sourcePort.getAbsoluteX(),this.sourcePort.getAbsoluteY()):this.setEndPoint(this.targetPort.getAbsoluteX(),this.targetPort.getAbsoluteY())},this._super({color:"#129CE4",stroke:2,radius:3,...t},{sourceDecorator:this.setSourceDecorator,targetDecorator:this.setTargetDecorator,source:this.setSource,target:this.setTarget,...e},{sourceDecorator:this.getSourceDecorator,targetDecorator:this.getTargetDecorator,source:this.getSource,target:this.getTarget,...n})},disconnect:function(){null!==this.sourcePort&&(this.sourcePort.off(this.moveListener),this.sourcePort.connections.remove(this),this.sourcePort.fireEvent("disconnect",{port:this.sourcePort,connection:this}),this.canvas?.fireEvent("disconnect",{port:this.sourcePort,connection:this}),this.sourcePort.onDisconnect(this),this.fireSourcePortRouteEvent()),null!==this.targetPort&&(this.targetPort.off(this.moveListener),this.targetPort.connections.remove(this),this.targetPort.fireEvent("disconnect",{port:this.targetPort,connection:this}),this.canvas?.fireEvent("disconnect",{port:this.targetPort,connection:this}),this.targetPort.onDisconnect(this),this.fireTargetPortRouteEvent())},reconnect:function(){null!==this.sourcePort&&(this.sourcePort.on("move",this.moveListener),this.sourcePort.connections.add(this),this.sourcePort.fireEvent("connect",{port:this.sourcePort,connection:this}),this.canvas?.fireEvent("connect",{port:this.sourcePort,connection:this}),this.sourcePort.onConnect(this),this.fireSourcePortRouteEvent()),null!==this.targetPort&&(this.targetPort.on("move",this.moveListener),this.targetPort.connections.add(this),this.targetPort.fireEvent("connect",{port:this.targetPort,connection:this}),this.canvas?.fireEvent("connect",{port:this.targetPort,connection:this}),this.targetPort.onConnect(this),this.fireTargetPortRouteEvent()),this.routingRequired=!0,this.repaint()},isResizeable:function(){return this.isDraggable()},add:function(t,e,n){if(!(e instanceof i.default.layout.locator.ConnectionLocator))throw"Locator must implement the class draw2d.layout.locator.ConnectionLocator";this._super(t,e,n)},setSourceDecorator:function(t){return this.sourceDecorator?.setParent(null),this.sourceDecorator=t,this.routingRequired=!0,this.sourceDecorator.setParent(this),this.sourceDecoratorNode?.remove(),this.sourceDecoratorNode=null,this.repaint(),this},getSourceDecorator:function(){return this.sourceDecorator},setTargetDecorator:function(t){return this.targetDecorator?.setParent(null),this.targetDecorator=t,this.routingRequired=!0,this.targetDecorator.setParent(this),this.targetDecoratorNode?.remove(),this.targetDecoratorNode=null,this.repaint(),this},getTargetDecorator:function(){return this.targetDecorator},calculatePath:function(t){if(null===this.sourcePort||null===this.targetPort)return this;if(this._super(t),null!==this.shape){let t=this.sourcePort.getZOrder(),e=this.targetPort.getZOrder();this.toBack(t{t.node.setAttribute("class",null!==this.cssClass?this.cssClass:"")}))}if(null!==this.targetDecoratorNode){let t=this.getVertices().last();this.targetDecoratorNode.transform("r"+this.getEndAngle()+","+t.x+","+t.y+" t"+t.x+","+t.y),this.targetDecoratorNode.attr({opacity:this.alpha}),null===this.targetDecorator.getColor()?this.targetDecoratorNode.attr({stroke:this.lineColor.hash()}):this.targetDecoratorNode.attr({stroke:this.targetDecorator.getColor().hash()}),this.targetDecoratorNode.forEach((t=>{t.node.setAttribute("class",null!==this.cssClass?this.cssClass:"")}))}}},getAbsoluteX:function(){return 0},getAbsoluteY:function(){return 0},postProcess:function(t){this.router.postProcess(this,this.getCanvas(),t)},onDrag:function(t,e,n,r){null!==this.command&&(this.router.onDrag(this,t,e,n,r),this.command.updateVertices(this.getVertices().clone()),this.editPolicy.each(((t,e)=>{e instanceof i.default.policy.figure.DragDropEditPolicy&&e.onDrag(this.canvas,this)})),this.svgPathString=null,this.repaint(),this.editPolicy.each(((t,e)=>{e instanceof i.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this.fireEvent("move",{figure:this,dx:t,dy:t}))},toFront:function(t){return this._super(t),null!==this.shape&&(this.targetDecoratorNode?.insertAfter(this.shape),this.sourceDecoratorNode?.insertAfter(this.shape)),this},toBack:function(t){return this._super(t),null!==this.shape&&(this.targetDecoratorNode?.insertAfter(this.shape),this.sourceDecoratorNode?.insertAfter(this.shape)),this},getStartPoint:function(t){return this.getStartPosition(t)},getStartPosition:function(t){return!1===this.isMoving?t?this.sourcePort.getConnectionAnchorLocation(t,this):this.sourcePort.getConnectionAnchorLocation(this.targetPort.getConnectionAnchorReferencePoint(this),this):this._super()},getEndPoint:function(t){return this.getEndPosition(t)},getEndPosition:function(t){return!1===this.isMoving?t?this.targetPort.getConnectionAnchorLocation(t,this):this.targetPort.getConnectionAnchorLocation(this.sourcePort.getConnectionAnchorReferencePoint(this),this):this._super()},setSource:function(t){null!==this.sourcePort&&(this.sourcePort.off(this.moveListener),this.sourcePort.connections.remove(this),this.sourcePort.fireEvent("disconnect",{port:this.sourcePort,connection:this}),this.canvas?.fireEvent("disconnect",{port:this.sourcePort,connection:this}),this.sourcePort.onDisconnect(this)),this.sourcePort=t,null!==this.sourcePort&&(this.routingRequired=!0,this.fireSourcePortRouteEvent(),this.sourcePort.connections.add(this),this.sourcePort.on("move",this.moveListener),this.canvas?.fireEvent("connect",{port:this.sourcePort,connection:this}),this.sourcePort.fireEvent("connect",{port:this.sourcePort,connection:this}),this.sourcePort.onConnect(this),this.setStartPoint(t.getAbsoluteX(),t.getAbsoluteY()),this.fireEvent("connect",{port:this.sourcePort,connection:this}))},getSource:function(){return this.sourcePort},setTarget:function(t){null!==this.targetPort&&(this.targetPort.off(this.moveListener),this.targetPort.connections.remove(this),this.targetPort.fireEvent("disconnect",{port:this.targetPort,connection:this}),this.canvas?.fireEvent("disconnect",{port:this.targetPort,connection:this}),this.targetPort.onDisconnect(this)),this.targetPort=t,null!==this.targetPort&&(this.routingRequired=!0,this.fireTargetPortRouteEvent(),this.targetPort.connections.add(this),this.targetPort.on("move",this.moveListener),this.canvas?.fireEvent("connect",{port:this.targetPort,connection:this}),this.targetPort.fireEvent("connect",{port:this.targetPort,connection:this}),this.targetPort.onConnect(this),this.setEndPoint(t.getAbsoluteX(),t.getAbsoluteY()),this.fireEvent("connect",{port:this.targetPort,connection:this}))},getTarget:function(){return this.targetPort},getPeerPort:function(t){return t===this.sourcePort?this.targetPort:t===this.targetPort?this.sourcePort:null},sharingPorts:function(t){return this.sourcePort==t.sourcePort||this.sourcePort==t.targetPort||this.targetPort==t.sourcePort||this.targetPort==t.targetPort},setCanvas:function(t){if(this.canvas===t)return;let e=null===this.canvas?t:this.canvas;this._super(t),this.sourceDecoratorNode?.remove(),this.sourceDecoratorNode=null,this.targetDecoratorNode?.remove(),this.targetDecoratorNode=null,null===this.canvas?(null!==this.sourcePort&&(this.sourcePort.off(this.moveListener),e.fireEvent("disconnect",{port:this.sourcePort,connection:this}),this.sourcePort.onDisconnect(this)),null!==this.targetPort&&(this.targetPort.off(this.moveListener),e.fireEvent("disconnect",{port:this.targetPort,connection:this}),this.targetPort.onDisconnect(this))):(null!==this.sourcePort&&(this.sourcePort.on("move",this.moveListener),this.canvas.fireEvent("connect",{port:this.sourcePort,connection:this}),this.sourcePort.onConnect(this)),null!==this.targetPort&&(this.targetPort.on("move",this.moveListener),this.canvas.fireEvent("connect",{port:this.targetPort,connection:this}),this.targetPort.onConnect(this)))},getStartAngle:function(){if(0===this.lineSegments.getSize())return 0;let t=this.lineSegments.get(0).start,e=this.lineSegments.get(0).end;this.router instanceof i.default.layout.connection.SplineConnectionRouter&&(e=this.lineSegments.get(5)?.end??e);let n=Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)),r=-180/Math.PI*Math.asin((t.y-e.y)/n);return r<0?r=e.x{e.routingRequired=!0,e.repaint()}))},fireTargetPortRouteEvent:function(){this.targetPort.getConnections().each(((t,e)=>{e.routingRequired=!0,e.repaint()}))},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.MOVE&&this.isDraggable()?new i.default.command.CommandMoveVertices(this):t.getPolicy()===i.default.command.CommandType.MOVE_BASEPOINT?new i.default.command.CommandReconnect(this):this._super(t)},getPersistentAttributes:function(){let t=this._super(),e=this.getSource().getParent();for(;null!==e.getParent();)e=e.getParent();for(t.source={node:e.getId(),port:this.getSource().getName()},e=this.getTarget().getParent();null!==e.getParent();)e=e.getParent();return t.target={node:e.getId(),port:this.getTarget().getName()},null!==this.sourceDecorator&&(t.source.decoration=this.sourceDecorator.NAME),null!==this.targetDecorator&&(t.target.decoration=this.targetDecorator.NAME),t},setPersistentAttributes:function(t){return this._super(t),void 0!==t.target.decoration&&null!=t.target.decoration&&this.setTargetDecorator(Function(`return new ${t.target.decoration}()`)()),void 0!==t.source.decoration&&null!=t.source.decoration&&this.setSourceDecorator(Function(`return new ${t.source.decoration}()`)()),this}})},"./src/Figure.js":(t,e,n)=>{"use strict";var r=o(n("./src/packages.js")),i=o(n("./src/util/JSONUtil.js")),s=o(n("./src/util/UUID.js")),a=o(n("./src/util/extend.js"));function o(t){return t&&t.__esModule?t:{default:t}}r.default.Figure=Class.extend({NAME:"draw2d.Figure",MIN_TIMER_INTERVAL:50,init:function(t,e,n){this.setterWhitelist={id:this.setId,x:this.setX,y:this.setY,width:this.setWidth,height:this.setHeight,boundingBox:this.setBoundingBox,minWidth:this.setMinWidth,minHeight:this.setMinHeight,cssClass:this.setCssClass,userData:this.setUserData,draggable:this.setDraggable,resizeable:this.setResizeable,selectable:this.setSelectable,angle:this.setRotationAngle,alpha:this.setAlpha,opacity:this.setAlpha,glow:this.setGlow,visible:this.setVisible,keepAspectRatio:this.setKeepAspectRatio,...e},this.getterWhitelist={id:this.getId,visible:this.isVisible,angle:this.getRotationAngle,x:this.getX,y:this.getY,userData:this.getUserData,width:this.getWidth,height:this.getHeight,draggable:this.isDraggable,resizeable:this.isResizeable,selectable:this.isSelectable,alpha:this.getAlpha,opacity:this.getAlpha,...n},this.id=s.default.create(),this.cachedZOrder=-1,this.isResizeHandle=!1,this.command=null,this.canvas=null,this.shape=null,this.children=new r.default.util.ArrayList,this.selectable=!0,this.deleteable=!0,this.resizeable=!0,this.draggable=!0,this.visible=!0,this.keepAspectRatio=!1,this.canSnapToHelper=!0,this.snapToGridAnchor=new r.default.geo.Point(0,0),this.editPolicy=new r.default.util.ArrayList,this.timerId=-1,this.timerInterval=0,this.parent=null,this.composite=null,this.userData=null,this.x=0,this.y=0,this.minHeight=5,this.minWidth=5,this.rotationAngle=0,this.cssClass=this.NAME.replace(new RegExp("[.]","g"),"_"),this.width=this.getMinWidth(),this.height=this.getMinHeight(),this.alpha=1,this.isInDragDrop=!1,this.ox=0,this.oy=0,this.repaintBlocked=!1,this.lastAppliedAttributes={},this.selectionHandles=new r.default.util.ArrayList,this.panningDelegate=null,this.eventSubscriptions={},this.relocateChildrenEventCallback=()=>{this.children.each(((t,e)=>{e.locator.relocate(t,e.figure)}))},this.defaultSelectionAdapter=this.selectionAdapter=()=>this,this.installEditPolicy(new r.default.policy.figure.RectangleSelectionFeedbackPolicy),this.attr(t)},attr:function(t,e){let n=this.repaintBlocked;try{if($.isPlainObject(t))for(let e in t)if("userData."===e.substring(0,9))this.userData??={},i.default.set({userData:this.userData},e,t[e]),this.fireEvent("change:"+e,{value:t[e]});else{let n=this.setterWhitelist[e],r=t[e];n&&void 0!==r?n.call(this,r):"function"==typeof t[e]&&(this[e]=r.bind(this))}else if("string"==typeof t){if(void 0===e){let e=this.getterWhitelist[t];if("function"==typeof e)return e.call(this);if("userData."===t.substring(0,9)){let e={userData:this.userData};return i.default.get(e,t)}return}if("function"==typeof e&&(e=e()),"userData."===t.substring(0,9))this.userData??={},i.default.set({userData:this.userData},t,e),this.fireEvent("change:"+t,{value:e});else{let n=this.setterWhitelist[t];n?.call(this,e)}}else{if(Array.isArray(t))return Object.assign({},...Object.keys(t).map((t=>({[t]:this.attr(t)}))));if(void 0===t){let t={};for(let e in this.getterWhitelist)t[e]=this.getterWhitelist[e].call(this);return t}}}finally{this.repaintBlocked=n}return this},pick:function(t,e){let n,r="string"!=typeof arguments[1]?arguments[1]:Array.prototype.slice.call(arguments,1),i={};for(n in r)void 0!==t[n]&&(i[n]=t[n]);return i},select:function(t){return void 0===t&&(t=!0),this.editPolicy.each(((e,n)=>{n instanceof r.default.policy.figure.SelectionPolicy&&n.onSelect(this.canvas,this,t)})),this.canvas?.getSelection().add(this),this.fireEvent("select",{figure:this}),this},unselect:function(){return this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.SelectionPolicy&&e.onUnselect(this.canvas,this)})),this.canvas?.getSelection().remove(this),this.fireEvent("unselect",{figure:this}),this},setSelectionAdapter:function(t){return this.selectionAdapter=t??this.defaultSelectionAdapter,this},getSelectionAdapter:function(){return this.selectionAdapter},isSelected:function(){return this.canvas?.getSelection().contains(this)},setUserData:function(t){return this.userData=t,this.fireEvent("change:userData",{value:t}),this},getUserData:function(){return this.userData},getId:function(){return this.id},setId:function(t){return this.id=t,this},getCssClass:function(){return this.cssClass},setCssClass:function(t){return this.cssClass=null===t?null:t.trim(),null===this.shape||(null===this.cssClass?this.shape.node.removeAttribute("class"):this.shape.node.setAttribute("class",this.cssClass),this.fireEvent("change:cssClass",{value:this.cssClass})),this},hasCssClass:function(t){return null!==this.cssClass&&new RegExp(" "+t.trim()+" ").test(" "+this.cssClass+" ")},addCssClass:function(t){return t=t.trim(),this.hasCssClass(t)||(null===this.cssClass?this.setCssClass(t):this.setCssClass(this.cssClass+" "+t),this.fireEvent("change:cssClass",{value:this.cssClass})),this},removeCssClass:function(t){t=t.trim();let e=" "+this.cssClass.replace(/[\t\r\n]/g," ")+" ";if(this.hasCssClass(t)){for(;e.indexOf(" "+t+" ")>=0;)e=e.replace(" "+t+" "," ");this.setCssClass(e.replace(/^\s+|\s+$/g,"")),this.fireEvent("change:cssClass",{value:this.cssClass})}return this},toggleCssClass:function(t){t=t.trim();let e=" "+this.cssClass.replace(/[\t\r\n]/g," ")+" ";if(this.hasCssClass(t)){for(;e.indexOf(" "+t+" ")>=0;)e=e.replace(" "+t+" "," ");this.setCssClass(e.replace(/^\s+|\s+$/g,""))}else this.setCssClass(this.cssClass+" "+t);return this.fireEvent("change:cssClass",{value:this.cssClass}),this},setCanvas:function(t){return null===t&&null!==this.shape&&(this.isSelected()&&this.unselect(),this.shape.remove(),this.shape=null),this.canvas=t,null!==this.canvas&&this.getShapeElement(),this.lastAppliedAttributes={},null===t?this.stopTimer():this.timerInterval>=this.MIN_TIMER_INTERVAL&&this.startTimer(this.timerInterval),this.children.each(((e,n)=>{n.figure.setCanvas(t)})),this},getCanvas:function(){return this.canvas},startTimer:function(t){return this.stopTimer(),this.timerInterval=Math.max(this.MIN_TIMER_INTERVAL,t),null!==this.canvas&&(this.timerId=window.setInterval((()=>{this.onTimer(),this.fireEvent("timer")}),this.timerInterval)),this},stopTimer:function(){return this.timerId>=0&&(window.clearInterval(this.timerId),this.timerId=-1),this},onTimer:function(){},toFront:function(t){if(this.composite instanceof r.default.shape.composite.StrongComposite&&void 0!==t){t.getZOrder()e.figure.toFront(this))),this.selectionHandles.each(((t,e)=>e.toFront())),this.cachedZOrder=-1,this},toBack:function(t){if(!(this.composite instanceof r.default.shape.composite.StrongComposite)){if(null!==this.canvas){let e=this.canvas.getFigures(),n=this.canvas.getLines();null!==e.remove(this)?e.insertElementAt(this,0):null!==n.remove(this)&&n.insertElementAt(this,0),void 0!==t?this.getShapeElement().insertBefore(t.getShapeElement()):this.getShapeElement().toBack()}return this.children.each(((t,e)=>{e.figure.toFront(this)}),!0),this.cachedZOrder=-1,this}this.toFront(this.composite)},installEditPolicy:function(t){return t instanceof r.default.policy.figure.SelectionFeedbackPolicy&&this.editPolicy.grep((t=>{let e=!(t instanceof r.default.policy.figure.SelectionFeedbackPolicy);return e||t.onUninstall(this),e})),this.editPolicy.grep((e=>{let n=e.__proto__!==t.__proto__;return n||e.onUninstall(this),n})),t.onInstall(this),this.editPolicy.add(t),this},uninstallEditPolicy:function(t){let e=this.editPolicy.remove(t);if(null!==e)return void e.onUninstall(this);let n="string"==typeof t?t:t.NAME;this.editPolicy.grep((t=>t.NAME!==n||(t.onUninstall(this),!1)))},add:function(t,e,n){if(null==e)throw"Second parameter 'locator' is required for method 'Figure#add'";return t.setParent(this),e.bind(this,t),t.on("resize",this.relocateChildrenEventCallback),isNaN(parseInt(n))?this.children.add({figure:t,locator:e}):this.children.insertElementAt({figure:t,locator:e},n),null!==this.canvas&&t.setCanvas(this.canvas),this.repaint(),this},remove:function(t){if(null==t)return debug.warn("The parameter child is required for Figure.remove"),null;let e=null;return this.children.grep((function(n){let r=n.figure!==t;return r||(e=n),r})),null!==e?(t.setParent(null),t.setCanvas(null),e.locator.unbind(this,t),t.off(this.relocateChildrenEventCallback),this.repaint(),e):null},getChildren:function(){return this.children.clone().map((t=>t.figure))},resetChildren:function(){return this.children.each(((t,e)=>{e.figure.setCanvas(null)})),this.children=new r.default.util.ArrayList,this.repaint(),this},getShapeElement:function(){return null!==this.shape||(this.shape=this.createShapeElement(),this.isVisible()||this.shape.hide(),null!==this.cssClass&&this.shape.node.setAttribute("class",this.cssClass)),this.shape},getTopLevelShapeElement:function(){return this.getShapeElement()},createShapeElement:function(){throw"Inherited class ["+this.NAME+"] must override the abstract method createShapeElement"},repaint:function(t){return!0===this.repaintBlocked||null===this.shape?this:(t??={},!0!==this.visible?(!0===this.shape.isVisible()&&(isNaN(parseFloat(t.visibleDuration))?this.shape.hide():$(this.shape.node).fadeOut(t.visibleDuration,(()=>this.shape.hide()))),this):(!1===this.shape.isVisible()&&(isNaN(parseFloat(t.visibleDuration))?this.shape.show():$(this.shape.node).fadeIn(t.visibleDuration,(()=>this.shape.show()))),t.opacity=this.alpha,t=i.default.flatDiff(t,this.lastAppliedAttributes),Object.getOwnPropertyNames(t).length>0&&this.shape.attr(t),this.lastAppliedAttributes=t,this.applyTransformation(),("x"in t||"width"in t||"cx"in t||"path"in t)&&this.children.each(((t,e)=>{e.locator.relocate(t,e.figure)})),this))},applyTransformation:function(){return this},setGlow:function(t){return this},getHandleBBox:function(){return null},onDragStart:function(t,e,n,i){this.isInDragDrop=!1;let s=this.getHandleBBox();if(null!==s&&!1===s.translate(this.getAbsolutePosition().scale(-1)).hitTest(t,e))return this.panningDelegate=this.getBestChild(this.getX()+t,this.getY()+e),null!==this.panningDelegate&&this.panningDelegate.onDragStart(t-this.panningDelegate.x,e-this.panningDelegate.y,n,i),!1;if(this.command=this.createCommand(new r.default.command.CommandType(r.default.command.CommandType.MOVE)),null!==this.command){this.ox=this.getX(),this.oy=this.getY(),this.isInDragDrop=!0;let s=this,a=!0;return this.editPolicy.each((function(o,c){c instanceof r.default.policy.figure.DragDropEditPolicy&&(a=a&&c.onDragStart(s.canvas,s,t,e,n,i))})),a&&this.fireEvent("dragstart",{x:t,y:e,shiftKey:n,ctrlKey:i}),a}return!1},onDrag:function(t,e,n,i,s,a){this.editPolicy.each(((n,i)=>{if(i instanceof r.default.policy.figure.DragDropEditPolicy){let n=i.adjustPosition(this,this.ox+t,this.oy+e);n&&(t=n.x-this.ox,e=n.y-this.oy)}}));let o=new r.default.geo.Point(this.ox+t,this.oy+e);this.getCanSnapToHelper()&&(o=this.getCanvas().snapToHelper(this,o)),this.setPosition(o),this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.onDrag(this.canvas,this)})),this.fireEvent("drag",{dx:t,dy:e,dx2:n,dy2:i,shiftKey:s,ctrlKey:a})},onPanning:function(t,e,n,r,i,s){},onPanningEnd:function(){},onDragEnd:function(t,e,n,i){null!==this.command&&(this.command.setPosition(this.x,this.y),this.canvas.getCommandStack().execute(this.command),this.command=null),this.isInDragDrop=!1,this.panningDelegate=null,this.editPolicy.each(((s,a)=>{a instanceof r.default.policy.figure.DragDropEditPolicy&&a.onDragEnd(this.canvas,this,t,e,n,i)})),this.fireEvent("move",{x:this.getX(),y:this.getY(),dx:0,dy:0}),this.fireEvent("change:x",{x:this.getX(),dx:0}),this.fireEvent("change:y",{y:this.getY(),dy:0}),this.fireEvent("dragend",{x:t,y:e,shiftKey:n,ctrlKey:i})},delegateTarget:function(t){let e=t;return this.getCanvas().getDropInterceptorPolicies().each(((n,r)=>{if(e=r.delegateTarget(t,this),null!==e)return!1})),e},onDragEnter:function(t){},onDragLeave:function(t){},onDrop:function(t,e,n,r,i){},onCatch:function(t,e,n,r,i){},onMouseEnter:function(){},onMouseLeave:function(){},onDoubleClick:function(){},onClick:function(){},onContextMenu:function(t,e){},setAlpha:function(t){if((t=Math.min(1,Math.max(0,parseFloat(t))))!==this.alpha)return this.alpha=t,this.repaint(),this.fireEvent("change:opacity",{value:this.alpha}),this},getAlpha:function(){return this.alpha},setRotationAngle:function(t){return this.rotationAngle=t,this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this.fireEvent("change:angle",{value:this.rotationAngle}),this.repaint(),this},getRotationAngle:function(){return this.rotationAngle},setVisible:function(t,e){if((t=!!t)!==this.visible)return this.visible=t,this.repaint({visibleDuration:e}),this.fireEvent(this.visible?"show":"hide"),this.fireEvent("change:visibility",{value:this.visible}),this},isVisible:function(){return this.visible&&null!==this.shape},setKeepAspectRatio:function(t){return this.keepAspectRatio=t,this},getKeepAspectRatio:function(){return this.keepAspectRatio},getZOrder:function(){let t=this.shape?.node;return!t||this.cachedZOrder>=0||(this.cachedZOrder=Array.from(t.parentNode.children).indexOf(t)),this.cachedZOrder},setCanSnapToHelper:function(t){return this.canSnapToHelper=!!t,this},getCanSnapToHelper:function(){return this.canSnapToHelper},getSnapToGridAnchor:function(){return this.snapToGridAnchor},setSnapToGridAnchor:function(t){return this.snapToGridAnchor=t,this},setWidth:function(t){return this.setDimension(parseFloat(t),this.getHeight()),this.fireEvent("change:width",{value:this.width}),this},getWidth:function(){return this.width},setHeight:function(t){return this.setDimension(this.getWidth(),parseFloat(t)),this.fireEvent("change:height",{value:this.height}),this},getHeight:function(){return this.height},getMinWidth:function(){return this.minWidth},setMinWidth:function(t){return this.minWidth=parseFloat(t),this.fireEvent("change:minWidth",{value:this.minWidth}),this.setWidth(this.getWidth()),this},getMinHeight:function(){return this.minHeight},setMinHeight:function(t){return this.minHeight=parseFloat(t),this.fireEvent("change:minHeight",{value:this.minHeight}),this.setHeight(this.getHeight()),this},setX:function(t){return this.setPosition(parseFloat(t),this.y),this},getX:function(){return this.x},setY:function(t){return this.setPosition(this.x,parseFloat(t)),this},getY:function(){return this.y},getAbsoluteX:function(){return this.parent?this.getX()+this.parent.getAbsoluteX():this.getX()},getAbsoluteY:function(){return this.parent?this.getY()+this.parent.getAbsoluteY():this.getY()},getAbsolutePosition:function(){return new r.default.geo.Point(this.getAbsoluteX(),this.getAbsoluteY())},getAbsoluteBounds:function(){return new r.default.geo.Rectangle(this.getAbsoluteX(),this.getAbsoluteY(),this.getWidth(),this.getHeight())},setPosition:function(t,e){let n=this.x,i=this.y;t instanceof r.default.geo.Point?(this.x=t.x,this.y=t.y):(this.x=t,this.y=e),this.editPolicy.each(((t,e)=>{if(e instanceof r.default.policy.figure.DragDropEditPolicy){let t=e.adjustPosition(this,this.x,this.y);this.x=t.x,this.y=t.y}})),this.repaint(),this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)}));let s={x:this.x,y:this.y,dx:this.x-n,dy:this.y-i};return this.fireEvent("move",s),this.fireEvent("change:x",s),this.fireEvent("change:y",s),this},getPosition:function(){return new r.default.geo.Point(this.getX(),this.getY())},translate:function(t,e){return this.setPosition(this.getX()+t,this.getY()+e),this},setDimension:function(t,e){let n={width:this.width,height:this.height};return t=Math.max(this.getMinWidth(),t),e=Math.max(this.getMinHeight(),e),this.width===t&&this.height===e?(this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this):(this.editPolicy.each(((n,i)=>{if(i instanceof r.default.policy.figure.DragDropEditPolicy){let n=i.adjustDimension(this,t,e);t=n.w,e=n.h}})),!0===this.keepAspectRatio?t>=this.getMinWidth()&&(e=this.getHeight()*(t/this.getWidth()))>=this.getMinHeight()&&(this.width=t,this.height=e):(this.width=Math.max(this.getMinWidth(),t),this.height=Math.max(this.getMinHeight(),e)),this.repaint(),this.fireEvent("resize"),this.fireEvent("change:dimension",{height:this.height,width:this.width,old:n}),this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this)},setBoundingBox:function(t){t=new r.default.geo.Rectangle(t);let e=this.repaintBlocked;return this.repaintBlocked=!0,this.setPosition(t.x,t.y),this.repaintBlocked=e,this.setDimension(t.w,t.h),this},getBoundingBox:function(){return new r.default.geo.Rectangle(this.getAbsoluteX(),this.getAbsoluteY(),this.getWidth(),this.getHeight())},getOuterBoundingBox:function(){let t=new r.default.geo.Rectangle(this.getAbsoluteX(),this.getAbsoluteY(),this.getWidth(),this.getHeight());return this.getChildren().each(((e,n)=>{let r=n.getOuterBoundingBox();t.merge(r)})),t},hitTest:function(t,e,n){return"number"==typeof n?this.getBoundingBox().scale(n,n).hitTest(t,e):this.getBoundingBox().hitTest(t,e)},setDraggable:function(t){return this.draggable=!!t,this},isDraggable:function(){return null!==this.composite?this.composite.isMemberDraggable(this,this.draggable):this.draggable},isResizeable:function(){return this.resizeable},setResizeable:function(t){return this.resizeable=!!t,this.fireEvent("change:resizeable",{value:this.resizeable}),this},isSelectable:function(){return null!==this.composite?this.composite.isMemberSelectable(this,this.selectable):this.selectable},setSelectable:function(t){return this.selectable=!!t,this.fireEvent("change:selectable",{value:this.selectable}),this},isStrechable:function(){return!this.getKeepAspectRatio()},isDeleteable:function(){return this.deleteable},setDeleteable:function(t){return this.deleteable=!!t,this.fireEvent("change:deleteable",{value:this.deleteable}),this},setParent:function(t){return this.parent=t,null!==t?this.setSelectionAdapter(t.getSelectionAdapter()):this.setSelectionAdapter(null),this},getParent:function(){return this.parent},contains:function(t){if(t.getParent()===this)return!0;for(let e=0,n=this.children.getSize();evoid 0!==e.___originalCallback?e.___originalCallback!==t:e!==t));return this},getBestChild:function(t,e,n){Array.isArray(n)||(n=n instanceof r.default.Figure?[n]:[]);let i=null,s=function(r){r.each((function(r,a){let o=a.figure;return s(o.children),null===i&&!0===o.isVisible()&&!0===o.hitTest(t,e)&&-1===$.inArray(o,n)&&(i=o),null===i}))};return s(this.children),i},createCommand:function(t){return null===t?null:t.getPolicy()===r.default.command.CommandType.MOVE?this.isDraggable()?new r.default.command.CommandMove(this):null:t.getPolicy()===r.default.command.CommandType.DELETE?this.isDeleteable()?new r.default.command.CommandDelete(this):null:t.getPolicy()===r.default.command.CommandType.RESIZE&&this.isResizeable()?new r.default.command.CommandResize(this):null},clone:function(t){t={excludeChildren:!1,...t};let e=Function(`return new ${this.NAME}()`)(),n=e.id;return e.setPersistentAttributes(this.getPersistentAttributes()),e.id=n,!1===t.excludeChildren&&(e.resetChildren(),this.children.each(((t,n)=>{let r=n.figure.clone(),i=n.locator.NAME?Function(`return new ${n.locator.NAME}()`)():null;e.add(r,i)}))),e},getPersistentAttributes:function(){let t={type:this.NAME,id:this.id,x:this.getX(),y:this.getY(),width:this.width,height:this.height,alpha:this.alpha,selectable:this.selectable,draggable:this.draggable,angle:this.rotationAngle,userData:(0,a.default)(!0,{},this.userData)};return null!==this.cssClass&&(t.cssClass=this.cssClass),null!==this.composite&&(t.composite=this.composite.getId()),t},setPersistentAttributes:function(t){return this.id=t.id,t.x&&t.y&&this.setPosition(parseFloat(t.x),parseFloat(t.y)),void 0!==t.width&&(this.width=parseFloat(t.width)),void 0!==t.height&&(this.height=parseFloat(t.height)),void 0!==t.userData&&(this.userData=t.userData),void 0!==t.selectable&&(this.selectable=t.selectable),void 0!==t.draggable&&(this.draggable=t.draggable),void 0!==t.cssClass&&this.setCssClass(t.cssClass),void 0!==t.alpha&&this.setAlpha(parseFloat(t.alpha)),void 0!==t.angle&&(this.rotationAngle=parseFloat(t.angle)),this}})},"./src/HeadlessCanvas.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.HeadlessCanvas=Class.extend({NAME:"draw2d.HeadlessCanvas",init:function(){this.figures=new i.default.util.ArrayList,this.lines=new i.default.util.ArrayList,this.commonPorts=new i.default.util.ArrayList,this.eventSubscriptions={},this.commandStack=new i.default.command.CommandStack},clear:function(){return this.figures=new i.default.util.ArrayList,this.lines=new i.default.util.ArrayList,this.commonPorts=new i.default.util.ArrayList,this.commandStack.markSaveLocation(),this},calculateConnectionIntersection:function(){},hideDecoration:function(){},showDecoration:function(){},add:function(t,e,n){if(t.getCanvas()!==this)return t instanceof i.default.shape.basic.Line?this.lines.add(t):this.figures.add(t),t.canvas=this,this},getLines:function(){return this.lines},getFigures:function(){return this.figures},getLine:function(t){for(var e=this.lines.getSize(),n=0;ne!==t));return this}})},"./src/HybridPort.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.HybridPort=i.default.Port.extend({NAME:"draw2d.HybridPort",init:function(t,e,n){this._super(t,e,n),this.locator=new i.default.layout.locator.InputPortLocator,this.maxFanIn=Number.MAX_SAFE_INTEGER},setMaxFanIn:function(t){return this.maxFanIn=Math.max(1,t),this.fireEvent("change:maxFanIn",{value:this.maxFanIn}),this},getMaxFanIn:function(){return this.maxFanIn},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.CONNECT?t.source.getParent().getId()===t.target.getParent().getId()?null:t.source instanceof i.default.InputPort?new i.default.command.CommandConnect(t.target,t.source,t.source):t.source instanceof i.default.OutputPort?new i.default.command.CommandConnect(t.source,t.target,t.source):t.source instanceof i.default.HybridPort?new i.default.command.CommandConnect(t.target,t.source,t.source):null:this._super(t)}})},"./src/InputPort.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.InputPort=i.default.Port.extend({NAME:"draw2d.InputPort",init:function(t,e,n){this._super(t,e,n),this.locator=new i.default.layout.locator.InputPortLocator},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.CONNECT?new i.default.command.CommandConnect(t.source,t.target,t.source):this._super(t)}})},"./src/OutputPort.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.OutputPort=i.default.Port.extend({NAME:"draw2d.OutputPort",init:function(t,e,n){this._super(t,e,n),this.locator=new i.default.layout.locator.OutputPortLocator},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.CONNECT?new i.default.command.CommandConnect(t.target,t.source,t.source):this._super(t)}})},"./src/Port.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.Port=i.default.shape.basic.Circle.extend({NAME:"draw2d.Port",DEFAULT_BORDER_COLOR:new i.default.util.Color("#1B1B1B"),init:function(t,e,n){this.locator=null,this.lighterBgColor=null,this.name=null,this.coronaWidth=5,this._super({bgColor:"#4f6870",stroke:1,diameter:10,color:"#1B1B1B",selectable:!1,...t},{coronaWidth:this.setCoronaWidth,semanticGroup:this.setSemanticGroup,...e},{coronaWidth:this.getCoronaWidth,semanticGroup:this.getSemanticGroup,...n}),this.ox=this.x,this.oy=this.y,this.corona=null,this.useGradient=!0,this.preferredConnectionDirection=null,this.connections=new i.default.util.ArrayList,this.moveListener=(t,e)=>{this.repaint(),this.fireEvent("move",{figure:this,dx:0,dy:0})},this.connectionAnchor=new i.default.layout.anchor.ConnectionAnchor(this),this.value=null,this.maxFanOut=Number.MAX_SAFE_INTEGER,this.semanticGroup="global",this.setCanSnapToHelper(!1),this.editPolicy.each(((t,e)=>this.uninstallEditPolicy(e))),this.installEditPolicy(new i.default.policy.port.IntrusivePortsFeedbackPolicy),this.portSelectionAdapter=()=>this},getSelectionAdapter:function(){return this.portSelectionAdapter},setMaxFanOut:function(t){return this.maxFanOut=Math.max(1,t),this.fireEvent("change:maxFanOut",{value:this.maxFanOut}),this},getMaxFanOut:function(){return this.maxFanOut},setSemanticGroup:function(t){return this.semanticGroup=t,this.fireEvent("change:semanticGroup",{value:this.semanticGroup}),this},getSemanticGroup:function(){return this.semanticGroup},setConnectionAnchor:function(t){return this.connectionAnchor=t??new i.default.layout.anchor.ConnectionAnchor,this.connectionAnchor.setOwner(this),this.fireEvent("move",{figure:this,dx:0,dy:0}),this},getConnectionAnchorLocation:function(t,e){return this.connectionAnchor.getLocation(t,e)},getConnectionAnchorReferencePoint:function(t){return this.connectionAnchor.getReferencePoint(t)},getConnectionDirection:function(t){return void 0===this.preferredConnectionDirection||null===this.preferredConnectionDirection?this.getParent().getBoundingBox().getDirection(this.getAbsolutePosition()):this.preferredConnectionDirection},setConnectionDirection:function(t){return this.preferredConnectionDirection=t,this.fireEvent("move",{figure:this,dx:0,dy:0}),this},setLocator:function(t){return this.locator=t,this},getLocator:function(){return this.locator},setBackgroundColor:function(t){return this.lighterBgColor=new i.default.util.Color(t).lighter(.3).hash(),this._super(t),this},setValue:function(t){if(t===this.value)return this;let e=this.value;return this.value=t,this.getParent()?.onPortValueChanged(this),this.fireEvent("change:value",{value:this.value,old:e}),this},getValue:function(){return this.value},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(t??={},t.cx=this.getAbsoluteX(),t.cy=this.getAbsoluteY(),t.rx=this.width/2,t.ry=t.rx,t.cursor="move",this.getAlpha()<.9||!1===this.useGradient?t.fill=this.bgColor.rgba():t.fill=["90",this.bgColor.hash(),this.lighterBgColor].join("-"),this._super(t))},onMouseEnter:function(){this._oldstroke=this.getStroke(),this.setStroke(2)},onMouseLeave:function(){this.setStroke(this._oldstroke)},getConnections:function(){return this.connections},setParent:function(t){this.parent?.off(this.moveListener),this._super(t),this.parent?.on("move",this.moveListener)},getCoronaWidth:function(){return this.coronaWidth},setCoronaWidth:function(t){return this.coronaWidth=t,this},onDragStart:function(t,e,n,r){if(this.getConnections().getSize()>=this.maxFanOut)return!1;this.ox=this.x,this.oy=this.y;let s=!0;return this.editPolicy.each(((a,o)=>{o instanceof i.default.policy.figure.DragDropEditPolicy&&(s=s&&o.onDragStart(this.canvas,this,t,e,n,r))})),s},onDrag:function(t,e,n,r,i,s){this._super(t,e)},onDragEnd:function(t,e,n,r){this.setAlpha(1),this.setPosition(this.ox,this.oy)},onDrop:function(t,e,n,r,i){},onConnect:function(t){},onDisconnect:function(t){},getName:function(){return this.name},setName:function(t){return this.name=t,this},hitTest:function(t,e,n){let r=this.getAbsoluteX()-this.coronaWidth-this.getWidth()/2,i=this.getAbsoluteY()-this.coronaWidth-this.getHeight()/2,s=r+this.getWidth()+2*this.coronaWidth,a=i+this.getHeight()+2*this.coronaWidth;return t>=r&&t<=s&&e>=i&&e<=a},setGlow:function(t){return!0===t&&null===this.corona?(this.corona=new i.default.Corona,this.corona.setDimension(this.getWidth()+2*this.getCoronaWidth(),this.getWidth()+2*this.getCoronaWidth()),this.corona.setPosition(this.getAbsoluteX()-this.getCoronaWidth()-this.getWidth()/2,this.getAbsoluteY()-this.getCoronaWidth()-this.getHeight()/2),this.corona.setCanvas(this.getCanvas()),this.corona.getShapeElement(),this.corona.repaint()):!1===t&&null!==this.corona&&(this.corona.setCanvas(null),this.corona=null),this},setDiameter:function(t){return this.setDimension(t,t),this.fireEvent("change:diameter",{value:t}),this},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.MOVE&&this.isDraggable()?new i.default.command.CommandMovePort(this):null},fireEvent:function(t,e){!0===this.isInDragDrop&&"drag"!==t||this._super(t,e)},getPersistentAttributes:function(){let t=this._super();return t.maxFanOut=this.maxFanOut,t.name=this.name,t.semanticGroup=this.semanticGroup,delete t.x,delete t.y,delete t.ports,t},setPersistentAttributes:function(t){return this._super(t),void 0!==t.maxFanOut&&("number"==typeof t.maxFanOut?this.maxFanOut=t.maxFanOut:this.maxFanOut=Math.max(1,parseInt(t.maxFanOut))),void 0!==t.name&&this.setName(t.name),void 0!==t.semanticGroup&&this.setSemanticGroup(t.semanticGroup),this}}),i.default.Corona=i.default.shape.basic.Circle.extend({init:function(){this._super(),this.setAlpha(.3),this.setBackgroundColor(new i.default.util.Color(178,225,255)),this.setColor(new i.default.util.Color(102,182,252))},setAlpha:function(t){return this._super(Math.min(.3,t)),this.setDeleteable(!1),this.setDraggable(!1),this.setResizeable(!1),this.setSelectable(!1),this}})},"./src/ResizeHandle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.ResizeHandle=i.default.shape.basic.Rectangle.extend({NAME:"draw2d.ResizeHandle",init:function(t,e,n){this.zoomCallback=()=>{this.attr({width:this.origWidth*this.getCanvas().getZoom(),height:this.origHeight*this.getCanvas().getZoom(),radius:this.origRadius*this.getCanvas().getZoom(),stroke:this.origStroke*this.getCanvas().getZoom()}),this.blockEvent||this.owner.fireEvent("move",{})},this._super({bgColor:"#FDFDFD",stroke:.5,width:10,height:10,minWidth:.3,minHeight:.3,color:"#a0a0a0",radius:1,selectable:!1,...t},{owner:this.setOwner,type:this.setType,...e},{owner:this.getOwner,type:this.getType,...n}),this.isResizeHandle=!0,this.command=null,this.commandMove=null,this.commandResize=null,this.useGradient=!0,this.origRadius=this.radius,this.origWidth=this.width,this.origHeight=this.height,this.origStroke=this.stroke},getSnapToDirection:function(){switch(this.type){case 1:return i.default.SnapToHelper.NORTH_WEST;case 2:return i.default.SnapToHelper.NORTH;case 3:return i.default.SnapToHelper.NORTH_EAST;case 4:default:return i.default.SnapToHelper.EAST;case 5:return i.default.SnapToHelper.SOUTH_EAST;case 6:return i.default.SnapToHelper.SOUTH;case 7:return i.default.SnapToHelper.SOUTH_WEST;case 8:return i.default.SnapToHelper.WEST;case 9:return i.default.SnapToHelper.NSEW}},createShapeElement:function(){return this.shape=this._super(),this.shape.node.setAttribute("type",this.type),this.updateCursor(this.shape),this.shape},getOwner:function(){return this.owner},setOwner:function(t){return this.owner=t,this},getType:function(){return this.type},setType:function(t){return this.type=t,this},updateCursor:function(t){if(null===t)return this;if(!1===this.isDraggable())return t.attr({cursor:"default"}),this;switch(this.type){case 1:t.attr({cursor:"nw-resize"});break;case 2:t.attr({cursor:"n-resize"});break;case 3:t.attr({cursor:"ne-resize"});break;case 4:t.attr({cursor:"e-resize"});break;case 5:t.attr({cursor:"se-resize"});break;case 6:t.attr({cursor:"s-resize"});break;case 7:t.attr({cursor:"sw-resize"});break;case 8:t.attr({cursor:"w-resize"});break;default:t.attr({cursor:"move"})}return this},setDraggable:function(t){return this._super(t),this.updateCursor(this.shape),this},onDragStart:function(t,e,n,r){return!!this.isDraggable()&&(this.ox=this.getAbsoluteX(),this.oy=this.getAbsoluteY(),this.commandMove=this.owner.createCommand(new i.default.command.CommandType(i.default.command.CommandType.MOVE)),this.commandResize=this.owner.createCommand(new i.default.command.CommandType(i.default.command.CommandType.RESIZE)),!0)},onDrag:function(t,e,n,r,i,s){if(!1===this.isDraggable())return;let a=this.getAbsoluteX(),o=this.getAbsoluteY();this._super(t,e,n,r);let c=this.getAbsoluteX()-a,l=this.getAbsoluteY()-o,h=this.owner,u=h.getAbsoluteX(),d=h.getAbsoluteY(),p=h.getWidth(),f=h.getHeight(),g=null,m=null,y=null;switch(this.type){case 1:h.setDimension(p-c,f-l),g=u+(p-h.getWidth()),m=d+(f-h.getHeight()),h.setPosition(g,m);break;case 2:h.setDimension(p,f-l),g=u,m=d+(f-h.getHeight()),h.setPosition(g,m);break;case 3:h.setDimension(p+c,f-l),g=u,m=d+(f-h.getHeight()),h.setPosition(g,m);break;case 4:h.setDimension(p+c,f);break;case 5:h.setDimension(p+c,f+l);break;case 6:h.setDimension(p,f+l);break;case 7:h.setDimension(p-c,f+l),g=u+(p-h.getWidth()),m=d,h.setPosition(g,m);break;case 8:h.setDimension(p-c,f),g=u+(p-h.getWidth()),m=d,h.setPosition(g,m)}null!==g&&(y=h.getPosition(),y.x===g&&y.y===m||h.setDimension(h.getWidth()-(y.x-g),h.getHeight()-(y.y-m)))},onDragEnd:function(t,e,n,r){this.isDraggable()&&(null!==this.commandMove&&(this.commandMove.setPosition(this.owner.getX(),this.owner.getY()),this.canvas.getCommandStack().execute(this.commandMove),this.commandMove=null),null!==this.commandResize&&(this.commandResize.setDimension(this.owner.getWidth(),this.owner.getHeight()),this.canvas.getCommandStack().execute(this.commandResize),this.commandResize=null))},setPosition:function(t,e){if(t instanceof i.default.geo.Point?(this.x=t.x,this.y=t.y):(this.x=t,this.y=e),!0===this.repaintBlocked||null===this.shape)return this;this.shape.attr({x:this.x,y:this.y}),this.applyTransformation()},setDimension:function(t,e){void 0!==e?this._super(t,e):i.default.isTouchDevice?this._super(15,15):this._super(8,8);let n=this.getWidth(),r=n/2;switch(this.type){case 1:this.setSnapToGridAnchor(new i.default.geo.Point(n,n));break;case 2:this.setSnapToGridAnchor(new i.default.geo.Point(r,n));break;case 3:this.setSnapToGridAnchor(new i.default.geo.Point(0,n));break;case 4:this.setSnapToGridAnchor(new i.default.geo.Point(0,r));break;case 5:this.setSnapToGridAnchor(new i.default.geo.Point(0,0));break;case 6:this.setSnapToGridAnchor(new i.default.geo.Point(r,0));break;case 7:this.setSnapToGridAnchor(new i.default.geo.Point(n,0));break;case 8:this.setSnapToGridAnchor(new i.default.geo.Point(n,r));break;case 9:this.setSnapToGridAnchor(new i.default.geo.Point(r,r))}return this},show:function(t){this.setCanvas(t),this.canvas.resizeHandles.add(this),this.shape.insertAfter(this.owner.getShapeElement());try{this.blockEvent=!0,this.zoomCallback()}finally{this.blockEvent=!1}return this.repaint(),this},hide:function(){if(null!==this.shape)return this.canvas.resizeHandles.remove(this),this.setCanvas(null),this},setCanvas:function(t){null!==this.canvas&&this.canvas.off(this.zoomCallback),this._super(t),null!==this.canvas&&this.canvas.on("zoom",this.zoomCallback)},setBackgroundColor:function(t){return t=new i.default.util.Color(t),this.bgGradient="90-"+t.darker(.2).hash()+"-"+t.hash(),this._super(t),this},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(t??={},"none"===this.bgColor.hash()?t.fill="none":this.getAlpha()<.9||!1===this.useGradient?t.fill=this.bgColor.rgba():t.fill=this.bgGradient,this._super(t))},supportsSnapToHelper:function(){return!0},onKeyDown:function(t,e){this.canvas.onKeyDown(t,e)},fireEvent:function(t,e){}})},"./src/SVGFigure.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.SVGFigure=i.default.SetFigure.extend({NAME:"draw2d.SVGFigure",init:function(t,e,n){this.svg=null,this._super(t,{svg:this.setSVG,...e},{svg:this.getSVG,...n})},createSet:function(){return this.svg??=this.getSVG(),this.importSVG(this.canvas,this.svg)},getSVG:function(){return this.svg},setSVG:function(t,e){if(this.svg=t,null!==this.canvas&&null!==this.svgNodes){let t=this.createSet();if(isNaN(parseFloat(e)))t.insertAfter(this.svgNodes),this.svgNodes.remove(),this.svgNodes=t,this.applyTransformation();else{t.hide(),t.insertAfter(this.svgNodes);let n=this.svgNodes;this.svgNodes=t,this.applyTransformation(),n.forEach((function(t){$(t.node).fadeOut(e,(function(){t.remove()}))})),t.forEach((function(t){$(t.node).fadeIn(e)}))}}return this},importSVG:function(t,e){let n=t.paper.set();try{if(void 0===e)throw"No data was provided.";let r=$(e);void 0===this._dimensionReadFromJSON&&(r.attr("width")&&r.attr("height")&&this.setDimension(parseFloat(r.attr("width")),parseFloat(r.attr("height"))),delete this._dimensionReadFromJSON);let i=new RegExp("([a-z0-9-]+) ?: ?([^ ;]+)[ ;]?","gi");r.children().each((function(e,r){let s=null,a=null,o={},c=r.tagName,l=c.indexOf(":");if(-1!=l&&(c=c.substr(l+1)),$(r.attributes).each((function(){switch(this.nodeName){case"stroke-dasharray":o[this.nodeName]="- ";break;case"style":a=this.nodeValue;break;case"id":case"xml:space":break;default:this.value?o[this.nodeName]=this.value:o[this.nodeName]=this.nodeValue}})),null!==a)for(;i.exec(a);)o[RegExp.$1]=RegExp.$2;switch(void 0===o["stroke-width"]&&(o["stroke-width"]=void 0===o.stroke?0:1.2),c){case"rect":s=t.paper.rect(),void 0!==o.rx&&(o.r=parseInt(o.rx),delete o.rx);break;case"circle":s=t.paper.circle();break;case"ellipse":s=t.paper.ellipse();break;case"path":o.fill="none",s=t.paper.path(o.d);break;case"line":o.d="M "+o.x1+" "+o.y1+"L"+o.x2+" "+o.y2,o.fill="none",s=t.paper.path(o.d);break;case"polyline":let e=o.points;o.d="M "+e.replace(" "," L"),s=t.paper.path(o.d);break;case"polygon":s=t.paper.polygon(o.points);break;case"image":s=t.paper.image();break;case"tspan":case"text":if(r.childNodes.length>0){let e=r.firstChild;do{switch(e.nodeType){case 2:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:return;case 3:e=r}let i=t.paper.text(0,0,$(e).text()),s={x:parseFloat(e.attributes.x.value),y:parseFloat(e.attributes.y.value),"text-anchor":"start"};void 0!==e.attributes["text-anchor"]?s["text-anchor"]=e.attributes["text-anchor"].value:void 0!==o["text-anchor"]&&(s["text-anchor"]=o["text-anchor"]),void 0!==e.attributes["font-size"]?s["font-size"]=parseInt(e.attributes["font-size"].value):void 0!==o["font-size"]&&(s["font-size"]=parseInt(o["font-size"])),void 0!==e.attributes["font-family"]?s["font-family"]=e.attributes["font-family"].value:void 0!==o["font-family"]&&(s["font-family"]=o["font-family"]),s.fill="#000000",void 0!==e.attributes.fill?s.fill=e.attributes.fill.value:void 0!==o.fill&&(s.fill=o.fill),s.y=s.y+i.getBBox().height/2,i.attr(s),n.push(i),e=e.nextSibling}while(e&&3===e.nodeType)}else s=t.paper.text(0,0,$(r).html()),void 0===o.fill&&(o.fill="#000000"),void 0===o["text-anchor"]&&(o["text-anchor"]="start"),void 0!==o["font-size"]&&(o["font-size"]=parseInt(o["font-size"])),void 0!==o["font-family"]&&(o["font-family"]=parseInt(o["font-family"])),o.y=parseFloat(o.y)+s.getBBox().height/2}null!==s&&(s.attr(o),n.push(s))}))}catch(t){alert("The SVG data you entered was invalid! ("+t+")")}return n},setPersistentAttributes:function(t){return this._super(t),(void 0!==t.width||void 0!==t.height)&&(this._dimensionReadFromJSON=!0),this}})},"./src/Selection.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.Selection=Class.extend({NAME:"draw2d.Selection",init:function(){this.primary=null,this.all=new i.default.util.ArrayList},clear:function(){return this.primary=null,this.all=new i.default.util.ArrayList,this},getPrimary:function(){return this.primary},setPrimary:function(t){return this.primary=t,this.add(t),this},remove:function(t){return this.all.remove(t),this.primary===t&&(this.primary=null),this},add:function(t){return null===t||this.all.contains(t)||this.all.add(t),this},contains:function(t,e){if(e){for(let e=0;e{t.addAll(n,!0),n.each(((t,n)=>{n instanceof i.default.shape.composite.StrongComposite&&e(n.getAssignedFigures())}))};return e(this.all),t}return this.all.clone()},each:function(t,e){return this.all.each(t,e),this}})},"./src/SetFigure.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.SetFigure=i.default.shape.basic.Rectangle.extend({NAME:"draw2d.SetFigure",init:function(t,e,n){this.svgNodes=null,this.originalWidth=null,this.originalHeight=null,this.scaleX=1,this.scaleY=1,this.strokeScale=!0,this._super({stroke:0,bgColor:null,...t},e,n)},setCanvas:function(t){null===t&&null!==this.svgNodes&&(this.svgNodes.remove(),this.svgNodes=null),this._super(t)},setCssClass:function(t){return this._super(t),null===this.svgNodes||(null===this.cssClass?this.svgNodes.forEach((t=>{t.node.removeAttribute("class")})):this.svgNodes.forEach((e=>{e.node.setAttribute("class",t)}))),this},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(null!==this.originalWidth&&(this.scaleX=this.width/this.originalWidth,this.scaleY=this.height/this.originalHeight),t??={},this.applyAlpha(),this._super(t))},setVisible:function(t,e){this._super(t,e),null!==this.svgNodes&&(e?!0===this.visible?this.svgNodes.forEach((t=>{$(t.node).fadeIn(e,(()=>t.show()))})):this.svgNodes.forEach((t=>{$(t.node).fadeOut(e,(()=>t.hide()))})):!0===this.visible?this.svgNodes.show():this.svgNodes.hide())},applyAlpha:function(){this.svgNodes.attr({opacity:this.alpha})},applyTransformation:function(){let t="S"+this.scaleX+","+this.scaleY+",0,0 R"+this.rotationAngle+","+(this.getWidth()/2|0)+","+(this.getHeight()/2|0)+"T"+this.getAbsoluteX()+","+this.getAbsoluteY();if(this.svgNodes.transform(t),90===this.rotationAngle||270===this.rotationAngle){let t=this.svgNodes.getBBox(!0),e="...S"+t.height/t.width+","+t.width/t.height+","+(this.getAbsoluteX()+this.getWidth()/2)+","+(this.getAbsoluteY()+this.getHeight()/2);this.svgNodes.transform(e)}return this},toFront:function(t){if(this.composite instanceof i.default.shape.composite.StrongComposite&&void 0!==t){t.getZOrder(){n.figure.toBack(t)}),!0),null!==this.svgNodes&&(void 0!==t?this.svgNodes.insertBefore(t.getShapeElement()):this.svgNodes.toBack()),null!==this.canvas&&(void 0!==t?this.getShapeElement().insertBefore(t.getShapeElement()):this.getShapeElement().toBack()),this.getPorts().each(((t,e)=>{e.getConnections().each(((t,e)=>{e.toFront(this)})),e.toFront(this)})),this}this.toFront(this.composite)},getTopLevelShapeElement:function(){return 0===this.svgNodes.length?this.shape:this.svgNodes},createShapeElement:function(){let t=this.canvas.paper.rect(this.getX(),this.getY(),this.getWidth(),this.getHeight());if(this.svgNodes=this.createSet(),void 0===this.svgNodes.forEach){let t=this.canvas.paper.set();t.push(this.svgNodes),this.svgNodes=t}this.svgNodes.attr({"stroke-scale":this.strokeScale}),this.setVisible(this.visible),this.setCssClass(this.cssClass);let e=this.svgNodes.getBBox();return this.originalWidth=e.width,this.originalHeight=e.height,t},createSet:function(){return this.canvas.paper.set()}})},"./src/VectorFigure.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.VectorFigure=i.default.shape.node.Node.extend({NAME:"draw2d.VectorFigure",init:function(t,e,n){this.stroke=1,this.radius=0,this.bgColor=new i.default.util.Color("#ffffff"),this.color=new i.default.util.Color("#303030"),this.dasharray=null,this.strokeBeforeGlow=this.stroke,this.glowIsActive=!1,this._super(t,{dasharray:this.setDashArray,radius:this.setRadius,bgColor:this.setBackgroundColor,color:this.setColor,stroke:this.setStroke,...e},{dasharray:this.getDashArray,radius:this.getRadius,bgColor:this.getBackgroundColor,color:this.getColor,stroke:this.getStroke,...n})},setRadius:function(t){return this.radius=t,this.repaint(),this.fireEvent("change:radius",{value:this.radius}),this},getRadius:function(){return this.radius},setDashArray:function(t){return this.dasharray=t,this.repaint(),this.fireEvent("change:dashArray",{value:this.dasharray}),this},getDashArray:function(){return this.dasharray},setGlow:function(t){return t===this.glowIsActive||(this.glowIsActive=t,!0===t?(this.strokeBeforeGlow=this.getStroke(),this.setStroke(1.5*this.strokeBeforeGlow)):this.setStroke(this.strokeBeforeGlow)),this},repaint:function(t){if(!0!==this.repaintBlocked&&null!==this.shape)return t??={},t.x=this.getAbsoluteX(),t.y=this.getAbsoluteY(),void 0===t.stroke&&(null===this.color||0===this.stroke?t.stroke="none":t.stroke=this.color.rgba()),t["stroke-width"]??=this.stroke,t.fill??=this.bgColor.rgba(),t.dasharray??=this.dasharray,t["stroke-dasharray"]??=this.dasharray,this._super(t),this},setBackgroundColor:function(t){return this.bgColor=new i.default.util.Color(t),this.repaint(),this.fireEvent("change:bgColor",{value:this.bgColor}),this},getBackgroundColor:function(){return this.bgColor},setStroke:function(t){return this.stroke=t,this.repaint(),this.fireEvent("change:stroke",{value:this.stroke}),this},getStroke:function(){return this.stroke},setColor:function(t){return this.color=new i.default.util.Color(t),this.repaint(),this.fireEvent("change:color",{value:this.color}),this},getColor:function(){return this.color},getPersistentAttributes:function(){return{...this._super(),bgColor:this.bgColor.rgba(),color:this.color.rgba(),stroke:this.stroke,radius:this.radius,dasharray:this.dasharray}},setPersistentAttributes:function(t){return this._super(t),void 0!==t.radius&&this.setRadius(t.radius),void 0!==t.bgColor&&this.setBackgroundColor(t.bgColor),void 0!==t.color&&this.setColor(t.color),void 0!==t.stroke&&this.setStroke(null===t.stroke?0:parseFloat(t.stroke)),"string"==typeof t.dasharray&&(this.dasharray=t.dasharray),this}})},"./src/command/Command.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.command.Command=Class.extend({NAME:"draw2d.command.Command",init:function(t){this.label=t},getLabel:function(){return this.label},canExecute:function(){return!0},execute:function(){},cancel:function(){},undo:function(){},redo:function(){}})},"./src/command/CommandAdd.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandAdd=i.default.command.Command.extend({NAME:"draw2d.command.CommandAdd",init:function(t,e,n,r){this._super(i.default.Configuration.i18n.command.addShape),this.figure=e,this.canvas=t,this.pos=new i.default.geo.Point(n,r)},canExecute:function(){return null===this.figure.getCanvas()},execute:function(){this.canvas.add(this.figure,this.pos.x,this.pos.y)},redo:function(){this.execute()},undo:function(){this.canvas.remove(this.figure)}})},"./src/command/CommandAddVertex.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandAddVertex=i.default.command.Command.extend({NAME:"draw2d.command.CommandAddVertex",init:function(t,e,n,r){this._super(i.default.Configuration.i18n.command.addVertex),this.line=t,this.index=e,this.newPoint=new i.default.geo.Point(n,r)},canExecute:function(){return!0},execute:function(){this.redo()},undo:function(){this.line.removeVertexAt(this.index)},redo:function(){this.line.insertVertexAt(this.index,this.newPoint.x,this.newPoint.y)}})},"./src/command/CommandAssignFigure.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandAssignFigure=i.default.command.Command.extend({NAME:"draw2d.command.CommandAssignFigure",init:function(t,e){this._super(i.default.Configuration.i18n.command.assignShape),this.figure=t,this.composite=e,this.assignedConnections=new i.default.util.ArrayList,this.isNode=this.figure instanceof i.default.shape.node.Node,this.oldBoundingBox=e.getBoundingBox()},canExecute:function(){return!0},execute:function(){if(this.composite.assignFigure(this.figure),!0===this.isNode){let t=this.figure.getConnections(),e=this;t.each((function(t,n){n.getSource().getParent().getComposite()===e.composite&&n.getTarget().getParent().getComposite()===e.composite&&n.getComposite()!==e.composite&&(e.assignedConnections.add({oldComposite:n.getComposite(),connection:n}),e.composite.assignFigure(n))}))}},undo:function(){this.composite.unassignFigure(this.figure),this.assignedConnections.each(((t,e)=>{null!==e.oldComposite?e.oldComposite.assignFigure(e.connection):e.connection.getComposite().unassignFigure(e.connection)})),this.composite.stickFigures=!0,this.composite.setBoundingBox(this.oldBoundingBox),this.composite.stickFigures=!1},redo:function(){this.composite.setBoundingBox(this.oldBoundingBox),this.composite.assignFigure(this.figure),this.assignedConnections.each(((t,e)=>this.composite.assignFigure(e.connection)))}})},"./src/command/CommandAttr.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandAttr=i.default.command.Command.extend({NAME:"draw2d.command.CommandAttr",init:function(t,e){this._super(i.default.Configuration.i18n.command.changeAttributes),this.figure=t,this.newAttributes=e,this.oldAttributes={},Object.keys(e).forEach((e=>{this.oldAttributes[e]=t.attr(e)}))},canExecute:function(){return!0},execute:function(){this.redo()},undo:function(){this.figure.attr(this.oldAttributes)},redo:function(){this.figure.attr(this.newAttributes)}})},"./src/command/CommandBoundingBox.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandBoundingBox=i.default.command.Command.extend({NAME:"draw2d.command.CommandResize",init:function(t,e){this._super(i.default.Configuration.i18n.command.resizeShape),this.figure=t,this.oldBoundingBox=this.figure.getBoundingBox(),this.newBoundingBox=e},canExecute:function(){return!this.oldBoundingBox.equals(this.newBoundingBox)},execute:function(){this.redo()},undo:function(){this.figure.setBoundingBox(this.oldBoundingBox)},redo:function(){this.figure.setBoundingBox(this.newBoundingBox)}})},"./src/command/CommandCollection.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandCollection=i.default.command.Command.extend({NAME:"draw2d.command.CommandCollection",init:function(t){this._super(void 0===t?i.default.Configuration.i18n.command.collection:t),this.commands=new i.default.util.ArrayList},getLabel:function(){if(1===this.commands.getSize())return this.commands.first().getLabel();if(this.commands.getSize()>1){let t=this.commands.clone().map((function(t){return t.getLabel()}));if(t.unique(),1===t.getSize())return t.first()}return this._super()},add:function(t){this.commands.add(t)},canExecute:function(){let t=!1;return this.commands.each((function(e,n){t=t||n.canExecute()})),t},execute:function(){this.commands.each((function(t,e){e.execute()}))},redo:function(){this.commands.each((function(t,e){e.redo()}))},undo:function(){this.commands.reverse(),this.commands.each((function(t,e){e.undo()})),this.commands.reverse()}})},"./src/command/CommandConnect.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandConnect=i.default.command.Command.extend({NAME:"draw2d.command.CommandConnect",init:function(t,e,n){this._super(i.default.Configuration.i18n.command.connectPorts),this.canvas=e.getCanvas(),this.source=t,this.target=e,this.connection=null,this.dropTarget=n},setConnection:function(t){this.connection=t},getConnection:function(){return this.connection},execute:function(){let t=t=>{this.connection=t,this.connection.setSource(this.source),this.connection.setTarget(this.target),this.canvas.add(this.connection)};if(null===this.connection){let e=i.default.Configuration.factory.createConnection(this.source,this.target,t,this.dropTarget);if(void 0===e)return;this.connection=e}t(this.connection)},redo:function(){this.canvas.add(this.connection),this.connection.reconnect()},undo:function(){this.canvas.remove(this.connection)}})},"./src/command/CommandDelete.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandDelete=i.default.command.Command.extend({NAME:"draw2d.command.CommandDelete",init:function(t){this._super(i.default.Configuration.i18n.command.deleteShape),this.parent=t.getParent(),this.figure=t,this.canvas=t.getCanvas(),this.connections=null,this.removedParentEntry=null,this.indexOfChild=-1},canExecute:function(){return null!==this.figure.getCanvas()},execute:function(){this.redo()},undo:function(){null!==this.parent?(this.parent.add(this.removedParentEntry.figure,this.removedParentEntry.locator,this.indexOfChild),this.canvas.setCurrentSelection(this.parent)):(this.canvas.add(this.figure),this.canvas.setCurrentSelection(this.figure)),this.figure instanceof i.default.Connection&&this.figure.reconnect();for(let t=0;t{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandDeleteGroup=i.default.command.Command.extend({NAME:"draw2d.command.CommandDeleteGroup",init:function(t){this._super(i.default.Configuration.i18n.command.deleteShape),this.parent=t.getParent(),this.group=t,this.canvas=t.getCanvas(),this.batchDelete=null},canExecute:function(){let t=this.group.getAssignedFigures();for(let e=0;e{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandGroup=i.default.command.Command.extend({NAME:"draw2d.command.CommandGroup",init:function(t,e){this._super(i.default.Configuration.i18n.command.groupShapes),e instanceof i.default.Selection?this.figures=e.getAll():this.figures=e,this.figures.grep((function(t){return null===t.getComposite()})),this.canvas=t,this.group=new i.default.shape.composite.Group},canExecute:function(){return!this.figures.isEmpty()},execute:function(){this.redo()},undo:function(){let t=this;this.figures.each((function(e,n){t.group.unassignFigure(n)})),this.canvas.remove(this.group),this.canvas.setCurrentSelection(this.figures)},redo:function(){let t=this;this.figures.each((function(e,n){t.group.assignFigure(n)})),this.canvas.add(this.group),this.canvas.setCurrentSelection(this.group)}})},"./src/command/CommandMove.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandMove=i.default.command.Command.extend({NAME:"draw2d.command.CommandMove",init:function(t,e,n){this._super(i.default.Configuration.i18n.command.moveShape),this.figure=t,void 0===e?(this.oldX=t.getX(),this.oldY=t.getY()):(this.oldX=e,this.oldY=n)},setStartPosition:function(t,e){this.oldX=t,this.oldY=e},setPosition:function(t,e){this.newX=t,this.newY=e},canExecute:function(){return this.newX!==this.oldX||this.newY!==this.oldY},execute:function(){this.redo()},undo:function(){this.figure.setPosition(this.oldX,this.oldY)},redo:function(){this.figure.setPosition(this.newX,this.newY)}})},"./src/command/CommandMoveConnection.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandMoveConnection=i.default.command.Command.extend({NAME:"draw2d.command.CommandMoveConnection",init:function(t){this._super(i.default.Configuration.i18n.command.moveLine),this.line=t,this.dx=0,this.dy=0},setTranslation:function(t,e){this.dx=t,this.dy=e},canExecute:function(){return 0!==this.dx&&0!==this.dy},execute:function(){this.redo()},undo:function(){let t=this;this.line.getVertices().each((function(e,n){n.translate(-t.dx,-t.dy)})),this.line.svgPathString=null,this.line.setPosition(this.line.getStartPosition())},redo:function(){let t=this;this.line.getVertices().each((function(e,n){n.translate(t.dx,t.dy)})),this.line.svgPathString=null,this.line.setPosition(this.line.getStartPosition())}})},"./src/command/CommandMoveLine.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandMoveLine=i.default.command.Command.extend({NAME:"draw2d.command.CommandMoveLine",init:function(t){this._super(i.default.Configuration.i18n.command.moveLine),this.line=t,this.dx=0,this.dy=0},setTranslation:function(t,e){this.dx=t,this.dy=e},canExecute:function(){return 0!==this.dx&&0!==this.dy},execute:function(){this.redo()},undo:function(){let t=this;this.line.getVertices().each((function(e,n){n.translate(-t.dx,-t.dy)})),this.line.svgPathString=null,this.line.setPosition(this.line.getStartPosition())},redo:function(){let t=this;this.line.getVertices().each((function(e,n){n.translate(t.dx,t.dy)})),this.line.svgPathString=null,this.line.setPosition(this.line.getStartPosition())}})},"./src/command/CommandMoveVertex.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandMoveVertex=i.default.command.Command.extend({NAME:"draw2d.command.CommandMoveVertex",init:function(t){this._super(i.default.Configuration.i18n.command.moveVertex),this.line=t,this.index=-1,this.newPoint=null},setIndex:function(t){this.index=t,this.origPoint=this.line.getVertices().get(this.index).clone()},updatePosition:function(t,e){this.newPoint=new i.default.geo.Point(t,e)},canExecute:function(){return-1!==this.index&&null!==this.newPoint},execute:function(){this.redo()},undo:function(){this.line.setVertex(this.index,this.origPoint.x,this.origPoint.y)},redo:function(){this.line.setVertex(this.index,this.newPoint.x,this.newPoint.y)}})},"./src/command/CommandMoveVertices.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandMoveVertices=i.default.command.Command.extend({NAME:"draw2d.command.CommandMoveVertices",init:function(t){this._super(i.default.Configuration.i18n.command.moveVertices),this.line=t,this.oldVertices=t.getVertices().clone(!0),this.newVertices=null},updateVertices:function(t){this.newVertices=t},canExecute:function(){return null!==this.newVertices},execute:function(){this.redo()},undo:function(){this.line.setVertices(this.oldVertices)},redo:function(){this.line.setVertices(this.newVertices)}})},"./src/command/CommandReconnect.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandReconnect=i.default.command.Command.extend({NAME:"draw2d.command.CommandReconnect",init:function(t){this._super(i.default.Configuration.i18n.command.connectPorts),this.con=t,this.oldSourcePort=t.getSource(),this.oldTargetPort=t.getTarget()},canExecute:function(){return!0},setNewPorts:function(t,e){this.newSourcePort=t,this.newTargetPort=e},setIndex:function(t){},updatePosition:function(t,e){},execute:function(){this.redo()},cancel:function(){this.con.setSource(this.oldSourcePort),this.con.setTarget(this.oldTargetPort),this.con.routingRequired=!0,this.con.repaint()},undo:function(){this.con.setSource(this.oldSourcePort),this.con.setTarget(this.oldTargetPort),this.con.routingRequired=!0,this.con.repaint()},redo:function(){this.con.setSource(this.newSourcePort),this.con.setTarget(this.newTargetPort),this.con.routingRequired=!0,this.con.repaint()}})},"./src/command/CommandRemoveVertex.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandRemoveVertex=i.default.command.Command.extend({NAME:"draw2d.command.CommandRemoveVertex",init:function(t,e){this._super(i.default.Configuration.i18n.command.deleteVertex),this.line=t,this.index=e,this.oldPoint=t.getVertices().get(e).clone()},canExecute:function(){return!0},execute:function(){this.redo()},undo:function(){this.line.insertVertexAt(this.index,this.oldPoint.x,this.oldPoint.y)},redo:function(){this.line.removeVertexAt(this.index)}})},"./src/command/CommandReplaceVertices.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandReplaceVertices=i.default.command.Command.extend({NAME:"draw2d.command.CommandReplaceVertices",init:function(t,e,n){this._super(i.default.Configuration.i18n.command.addSegment),this.line=t,this.originalVertices=e,this.newVertices=n},canExecute:function(){return!0},execute:function(){this.redo()},undo:function(){this.line.setVertices(this.originalVertices)},redo:function(){this.line.setVertices(this.newVertices)}})},"./src/command/CommandResize.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandResize=i.default.command.Command.extend({NAME:"draw2d.command.CommandResize",init:function(t,e,n){this._super(i.default.Configuration.i18n.command.resizeShape),this.figure=t,void 0===e?(this.oldWidth=t.getWidth(),this.oldHeight=t.getHeight()):(this.oldWidth=e,this.oldHeight=n)},setDimension:function(t,e){this.newWidth=0|t,this.newHeight=0|e},canExecute:function(){return this.newWidth!==this.oldWidth||this.newHeight!==this.oldHeight},execute:function(){this.redo()},undo:function(){this.figure.setDimension(this.oldWidth,this.oldHeight)},redo:function(){this.figure.setDimension(this.newWidth,this.newHeight)}})},"./src/command/CommandRotate.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandRotate=i.default.command.Command.extend({NAME:"draw2d.command.CommandRotate",init:function(t,e){this._super(i.default.Configuration.i18n.command.rotateShape),this.figure=t,this.oldAngle=t.getRotationAngle(),this.newAngle=e},canExecute:function(){return this.oldAngle!==this.newAngle},execute:function(){this.redo()},undo:function(){this.rotate(this.oldAngle)},redo:function(){this.rotate(this.newAngle)},rotate:function(t){let e=this.figure.getWidth(),n=this.figure.getHeight();this.figure.setRotationAngle(t),this.figure.setDimension(n,e),this.figure.portRelayoutRequired=!0}})},"./src/command/CommandStack.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandStack=Class.extend({NAME:"draw2d.command.CommandStack",init:function(){this.undostack=[],this.redostack=[],this.maxundo=50,this.transactionCommand=null,this.eventListeners=new i.default.util.ArrayList},setUndoLimit:function(t){return this.maxundo=t,this},markSaveLocation:function(){return this.undostack=[],this.redostack=[],this.notifyListeners(new i.default.command.Command,i.default.command.CommandStack.POST_EXECUTE),this},execute:function(t){if(void 0===t)throw"Missing parameter [command] for method call CommandStack.execute";return null===t||!1===t.canExecute()?this:null!==this.transactionCommand?(this.transactionCommand.add(t),this):(this.notifyListeners(t,i.default.command.CommandStack.PRE_EXECUTE,"PRE_EXECUTE"),this.undostack.push(t),t.execute(),this.redostack=[],this.undostack.length>this.maxundo&&(this.undostack=this.undostack.slice(this.undostack.length-this.maxundo)),this.notifyListeners(t,i.default.command.CommandStack.POST_EXECUTE,"POST_EXECUTE"),this)},startTransaction:function(t){if(null!==this.transactionCommand)throw"CommandStack is already within transactional mode. Don't call 'startTransaction";return this.transactionCommand=new i.default.command.CommandCollection(t),this},isInTransaction:function(){return null!==this.transactionCommand},commitTransaction:function(){if(null===this.transactionCommand)return this;let t=this.transactionCommand;return this.transactionCommand=null,1===t.commands.getSize()?this.execute(t.commands.first()):this.execute(t),this},undo:function(){let t=this.undostack.pop();return t&&(this.notifyListeners(t,i.default.command.CommandStack.PRE_UNDO),this.redostack.push(t),t.undo(),this.notifyListeners(t,i.default.command.CommandStack.POST_UNDO)),this},redo:function(){let t=this.redostack.pop();return t&&(this.notifyListeners(t,i.default.command.CommandStack.PRE_REDO),this.undostack.push(t),t.redo(),this.notifyListeners(t,i.default.command.CommandStack.POST_REDO)),this},getRedoLabel:function(){if(0===this.redostack.length)return"";let t=this.redostack[this.redostack.length-1];return t?t.getLabel():""},getUndoLabel:function(){if(0===this.undostack.length)return"";let t=this.undostack[this.undostack.length-1];return t?t.getLabel():""},canRedo:function(){return this.redostack.length>0},canUndo:function(){return this.undostack.length>0},addEventListener:function(t){return this.on("change",t)},on:function(t,e){if("change"!==t)throw"only event of kind 'change' is supported";if(e instanceof i.default.command.CommandStackEventListener)this.eventListeners.add(e);else if("function"==typeof e.stackChanged)this.eventListeners.add(e);else{if("function"!=typeof e)throw"Object doesn't implement required callback interface [draw2d.command.CommandStackListener]";this.eventListeners.add({stackChanged:e})}return this},removeEventListener:function(t){return this.off(t),this},off:function(t){return this.eventListeners.grep((e=>e===t||e.stackChanged===t)),this},notifyListeners:function(t,e,n){let r=new i.default.command.CommandStackEvent(this,t,e,n),s=this.eventListeners.getSize();for(let t=0;t{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandStackEvent=Class.extend({NAME:"draw2d.command.CommandStackEvent",init:function(t,e,n,r){this.stack=t,this.command=e,this.details=n,this.action=r},getStack:function(){return this.stack},getCommand:function(){return this.command},getDetails:function(){return this.details},isPostChangeEvent:function(){return!!(this.getDetails()&i.default.command.CommandStack.POST_MASK)},isPreChangeEvent:function(){return!!(this.getDetails()&i.default.command.CommandStack.PRE_MASK)}})},"./src/command/CommandStackEventListener.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.command.CommandStackEventListener=Class.extend({NAME:"draw2d.command.CommandStackEventListener",init:function(){},stackChanged:function(t){}})},"./src/command/CommandType.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandType=Class.extend({NAME:"draw2d.command.CommandType",init:function(t){this.policy=t},getPolicy:function(){return this.policy}}),i.default.command.CommandType.DELETE="DELETE",i.default.command.CommandType.MOVE="MOVE",i.default.command.CommandType.CONNECT="CONNECT",i.default.command.CommandType.MOVE_BASEPOINT="MOVE_BASEPOINT",i.default.command.CommandType.MOVE_VERTEX="MOVE_VERTEX",i.default.command.CommandType.MOVE_VERTICES="MOVE_VERTICES",i.default.command.CommandType.MOVE_GHOST_VERTEX="MOVE_GHOST_VERTEX",i.default.command.CommandType.RESIZE="RESIZE",i.default.command.CommandType.RESET="RESET",i.default.command.CommandType.ROTATE="ROTATE"},"./src/command/CommandUngroup.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandUngroup=i.default.command.Command.extend({NAME:"draw2d.command.CommandUngroup",init:function(t,e){this._super(i.default.Configuration.i18n.command.ungroupShapes),e instanceof i.default.Selection?this.group=e.getAll().first():this.group=e,this.canvas=t,this.figures=this.group.getAssignedFigures().clone()},canExecute:function(){return!this.figures.isEmpty()},execute:function(){this.redo()},undo:function(){let t=this;this.figures.each((function(e,n){t.group.assignFigure(n)})),this.canvas.add(this.group),this.canvas.setCurrentSelection(this.group)},redo:function(){let t=this;this.figures.each((function(e,n){t.group.unassignFigure(n)})),this.canvas.setCurrentSelection(this.figures),this.canvas.remove(this.group)}})},"./src/decoration/connection/ArrowDecorator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.decoration.connection.ArrowDecorator=i.default.decoration.connection.Decorator.extend({NAME:"draw2d.decoration.connection.ArrowDecorator",init:function(t,e){this._super(t,e)},paint:function(t){let e=t.set();return e.push(t.path(["M0 0","L",this.width," ",-this.height/2,"L",this.width," ",this.height/2,"L0 0"].join(""))),e.attr({fill:this.backgroundColor.rgba()}),e}})},"./src/decoration/connection/BarDecorator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.decoration.connection.BarDecorator=i.default.decoration.connection.Decorator.extend({NAME:"draw2d.decoration.connection.BarDecorator",init:function(t,e){this._super(t,e)},paint:function(t){let e=t.set(),n=["M",this.width/2," ",-this.height/2];return n.push("L",this.width/2," ",this.height/2),e.push(t.path(n.join(""))),e.attr({fill:this.backgroundColor.rgba()}),e}})},"./src/decoration/connection/CircleDecorator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.decoration.connection.CircleDecorator=i.default.decoration.connection.Decorator.extend({NAME:"draw2d.decoration.connection.CircleDecorator",init:function(t,e){this._super(t,e)},paint:function(t){let e=t.set();return e.push(t.circle(0,0,this.width/2)),e.attr({fill:this.backgroundColor.rgba()}),e}})},"./src/decoration/connection/Decorator.js":(t,e,n)=>{"use strict";var r=s(n("./src/packages.js")),i=s(n("./src/util/Color.js"));function s(t){return t&&t.__esModule?t:{default:t}}r.default.decoration.connection.Decorator=Class.extend({NAME:"draw2d.decoration.connection.Decorator",init:function(t,e){this.width=void 0===t||t<1?20:t,this.height=void 0===e||e<1?15:e,this.parent=null,this.color=null,this.backgroundColor=new i.default(250,250,250)},paint:function(t){},setParent:function(t){this.parent=t},setColor:function(t){return this.color=new i.default(t),this.parent?.repaint(),this},getColor:function(){return this.color},setBackgroundColor:function(t){return this.backgroundColor=new i.default(t),this.parent?.repaint(),this},getBackgroundColor:function(){return this.backgroundColor},setDimension:function(t,e){return this.width=t,this.height=e,this}})},"./src/decoration/connection/DiamondDecorator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.decoration.connection.DiamondDecorator=i.default.decoration.connection.Decorator.extend({NAME:"draw2d.decoration.connection.DiamondDecorator",init:function(t,e){this._super(t,e)},paint:function(t){let e=t.set();return e.push(t.path(["M",this.width/2," ",-this.height/2,"L",this.width," ",0,"L",this.width/2," ",this.height/2,"L",0," ",0,"L",this.width/2," ",-this.height/2,"Z"].join(""))),e.attr({fill:this.backgroundColor.rgba()}),e}})},"./src/geo/Line.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.geo.Line={inverseLerp:function(t,e,n,r,i,s){let a=Math.abs(n-t),o=Math.abs(n-i);return 0===a&&(a=Math.abs(r-e),o=Math.abs(r-s),0===a)?1:o/a},pointProjection:function(t,e,n,r,s,a){let o=new i.default.geo.Point(0,0);t===n&&e===r&&(t-=1e-5);let c,l,h,u,d=(s-t)*(n-t)+(a-e)*(r-e);return d/=Math.pow(n-t,2)+Math.pow(r-e,2),o.x=t+d*(n-t),o.y=e+d*(r-e),c=Math.min(t,n),l=Math.max(t,n),h=Math.min(e,r),u=Math.max(e,r),o.x>=c&&o.x<=l&&o.y>=h&&o.y<=u?o:null},distance:function(t,e,n,r,i,s){let a,o=(i-=t)*(n-=t)+(s-=e)*(r-=e);o<=0?a=0:(o=(i=n-i)*n+(s=r-s)*r,a=o<=0?0:o*o/(n*n+r*r));let c=i*i+s*s-a;return c<0&&(c=0),Math.sqrt(c)}}},"./src/geo/Point.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.geo.Point=Class.extend({NAME:"draw2d.geo.Point",init:function(t,e){t instanceof i.default.geo.Point?(this.x=t.x,this.y=t.y):isNaN(parseFloat(t.x))||isNaN(parseFloat(t.y))?(this.x=t,this.y=e):(this.x=t.x,this.y=t.y),this.bx=null,this.by=null,this.bw=null,this.bh=null},setBoundary:function(t,e,n,r){return t instanceof i.default.geo.Rectangle?(this.bx=t.x,this.by=t.y,this.bw=t.w,this.bh=t.h):(this.bx=t,this.by=e,this.bw=n,this.bh=r),this.adjustBoundary(),this},adjustBoundary:function(){return null===this.bx||(this.x=Math.min(Math.max(this.bx,this.x),this.bw),this.y=Math.min(Math.max(this.by,this.y),this.bh)),this},translate:function(t,e){return this.x+=t,this.y+=e,this.adjustBoundary(),this},getX:function(){return this.x},getY:function(){return this.y},setX:function(t){return this.x=t,this.adjustBoundary(),this},setY:function(t){return this.y=t,this.adjustBoundary(),this},setPosition:function(t,e){return t instanceof i.default.geo.Point?(this.x=t.x,this.y=t.y):(this.x=t,this.y=e),this.adjustBoundary(),this},getPosition:function(t){let e=t.x-this.x,n=t.y-this.y;return Math.abs(e)>Math.abs(n)?e<0?i.default.geo.PositionConstants.WEST:i.default.geo.PositionConstants.EAST:n<0?i.default.geo.PositionConstants.NORTH:i.default.geo.PositionConstants.SOUTH},equals:function(t){return this.x===t.x&&this.y===t.y},distance:function(t){return Math.sqrt((this.x-t.x)*(this.x-t.x)+(this.y-t.y)*(this.y-t.y))},getDistance:function(t){return this.distance(t)},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},translated:function(t,e){let n=new i.default.geo.Point(t,e);return new i.default.geo.Point(this.x+n.x,this.y+n.y)},scale:function(t){return this.x*=t,this.y*=t,this.adjustBoundary(),this},scaled:function(t){return new i.default.geo.Point(this.x*t,this.y*t)},getScaled:function(t){return this.scaled(t)},getPersistentAttributes:function(){return{x:this.x,y:this.y}},setPersistentAttributes:function(t){return this.x=t.x,this.y=t.y,this},subtract:function(t){return new i.default.geo.Point(this.x-t.x,this.y-t.y)},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){return new i.default.geo.Point(this.x+(t.x-this.x)*e,this.y+(t.y-this.y)*e)},clone:function(){return new i.default.geo.Point(this.x,this.y)}})},"./src/geo/PositionConstants.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.geo.PositionConstants={NORTH:1,SOUTH:4,WEST:8,EAST:16}},"./src/geo/Ray.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.geo.Ray=i.default.geo.Point.extend({NAME:"draw2d.geo.Ray",init:function(t,e){this._super(t,e)},isHorizontal:function(){return 0!=this.x},similarity:function(t){return Math.abs(this.dot(t))},getAveraged:function(t){return new i.default.geo.Ray((this.x+t.x)/2,(this.y+t.y)/2)}})},"./src/geo/Rectangle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.geo.Rectangle=i.default.geo.Point.extend({NAME:"draw2d.geo.Rectangle",init:function(t,e,n,r){t instanceof i.default.geo.Rectangle?(e=t.y,n=t.w,r=t.h,t=t.x):"number"==typeof t.x&&"number"==typeof t.y?(e=t.y,n=t.w|t.width,r=t.h|t.height,t=t.x):"number"==typeof t.top&&"number"==typeof t.left&&(e=t.top,n=t.w|t.width,r=t.h|t.height,t=t.left),this._super(t,e),this.w=n,this.h=r},adjustBoundary:function(){null!==this.bx&&(this.x=Math.min(Math.max(this.bx,this.x),this.bw-this.w),this.y=Math.min(Math.max(this.by,this.y),this.bh-this.h),this.w=Math.min(this.w,this.bw),this.h=Math.min(this.h,this.bh))},resize:function(t,e){return this.w+=t,this.h+=e,this.adjustBoundary(),this},scale:function(t,e){return this.w+=t,this.h+=e,this.x-=t/2,this.y-=e/2,this.adjustBoundary(),this},translate:function(t,e){let n=new i.default.geo.Point(t,e);return this.x+=n.x,this.y+=n.y,this.adjustBoundary(),this},translated:function(t,e){let n=new i.default.geo.Point(t,e);return new i.default.geo.Rectangle(this.x+n.x,this.y+n.y,this.w,this.h)},setBounds:function(t){return this.setPosition(t.x,t.y),this.w=t.w,this.h=t.h,this},isEmpty:function(){return this.w<=0||this.h<=0},getWidth:function(){return this.w},setWidth:function(t){return this.w=t,this.adjustBoundary(),this},getHeight:function(){return this.h},setHeight:function(t){return this.h=t,this.adjustBoundary(),this},getLeft:function(){return this.x},getRight:function(){return this.x+this.w},getTop:function(){return this.y},getBottom:function(){return this.y+this.h},getTopLeft:function(){return new i.default.geo.Point(this.x,this.y)},getTopCenter:function(){return new i.default.geo.Point(this.x+this.w/2,this.y)},getTopRight:function(){return new i.default.geo.Point(this.x+this.w,this.y)},getCenterLeft:function(){return new i.default.geo.Point(this.x,this.y+this.h/2)},getCenterRight:function(){return new i.default.geo.Point(this.x+this.w,this.y+this.h/2)},getBottomLeft:function(){return new i.default.geo.Point(this.x,this.y+this.h)},getBottomCenter:function(){return new i.default.geo.Point(this.x+this.w/2,this.y+this.h)},getCenter:function(){return new i.default.geo.Point(this.x+this.w/2,this.y+this.h/2)},getBottomRight:function(){return new i.default.geo.Point(this.x+this.w,this.y+this.h)},getVertices:function(){let t=new i.default.util.ArrayList;return t.add(this.getTopLeft()),t.add(this.getTopRight()),t.add(this.getBottomRight()),t.add(this.getBottomLeft()),t},moveInside:function(t){let e=new i.default.geo.Rectangle(t.x,t.y,t.w,t.h);return e.x=Math.max(e.x,this.x),e.y=Math.max(e.y,this.y),e.w=o+l?6:7;else if(e>=a+c)h=n+s<=o?2:n>=o+l?4:3;else if(n+s<=o)h=1;else{if(!(n>=o+l))return 0;h=5}switch(h){case 0:return e=e+r-a,n=n+s-o,-(e+n);case 1:return-(n+s-o);case 2:return e=a+c-e,n=n+s-o,-(e+n);case 3:return-(a+c-e);case 4:return e=a+c-e,n=o+l-n,-(e+n);case 5:return-(o+l-n);case 6:return e=e+r-a,n=o+l-n,-(e+n);case 7:return-(e+r-a)}throw"Unknown data type of parameter for distance calculation in draw2d.geo.Rectangle.getDistance(..)"},determineOctant:function(t){let e=this.x+3,n=this.y+3,r=this.w-6,s=this.h-6,a=t.x,o=t.y,c=2,l=2;t instanceof i.default.geo.Rectangle&&(c=t.w,l=t.h);let h=0;return h=a+c<=e?o+l<=n?0:o>=n+s?6:7:a>=e+r?o+l<=n?2:o>=n+s?4:3:o+l<=n?1:o>=n+s?5:8,h},getDirection:function(t){let e=this.getTopLeft();switch(this.determineOctant(t)){case 0:return e.x-t.xthis.y?i.default.geo.Rectangle.DIRECTION_DOWN:i.default.geo.Rectangle.DIRECTION_UP}return i.default.geo.Rectangle.DIRECTION_UP},equals:function(t){return this.x==t.x&&this.y==t.y&&this.w==t.w&&this.h==t.h},hitTest:function(t,e){t instanceof i.default.geo.Point&&(e=t.y,t=t.x);let n=this.x+this.getWidth(),r=this.y+this.getHeight();return t>=this.x&&t<=n&&e>=this.y&&e<=r},isInside:function(t){return t.hitTest(this.getTopLeft())&&t.hitTest(this.getTopRight())&&t.hitTest(this.getBottomLeft())&&t.hitTest(this.getBottomRight())},contains:function(t){return this.hitTest(t.getTopLeft())&&this.hitTest(t.getTopRight())&&this.hitTest(t.getBottomLeft())&&this.hitTest(t.getBottomRight())},intersects:function(t){let e=t.x,n=t.y,r=t.x+t.w,i=t.y+t.h,s=this.x,a=this.y,o=this.x+this.w,c=this.y+this.h;return Math.max(0,Math.min(r,o)-Math.max(e,s))*Math.max(0,Math.min(i,c)-Math.max(n,a))!=0},merge:function(t){let e=Math.max(t.getRight(),this.getRight()),n=Math.max(t.getBottom(),this.getBottom());return this.setPosition(Math.min(this.x,t.x),Math.min(this.y,t.y)),this.w=e-this.x,this.h=n-this.y,this},intersectionWithLine:function(t,e){let n=new i.default.util.ArrayList,r=this.getVertices();r.add(r.first());let s=r.first(),a=null;for(let o=1;o<5;o++)a=r.get(o),s=i.default.shape.basic.Line.intersection(t,e,s,a),null!==s&&n.add(s),s=a;return n},clone:function(){return new i.default.geo.Rectangle(this.x,this.y,this.w,this.h)},toJSON:function(){return{width:this.w,height:this.h,x:this.x,y:this.y}}}),i.default.geo.Rectangle.DIRECTION_UP=0,i.default.geo.Rectangle.DIRECTION_RIGHT=1,i.default.geo.Rectangle.DIRECTION_DOWN=2,i.default.geo.Rectangle.DIRECTION_LEFT=3},"./src/geo/Util.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.geo.Util={insetPoint:function(t,e,n){if(t.equals(e))return t;let r=t.x-e.x,i=t.y-e.y,s=Math.sqrt(r*r+i*i),a=Math.min(s/2,n);return{x:e.x+r/s*(s-a),y:e.y+i/s*(s-a)}}}},"./src/index.js":(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("./src/packages.js"));i(n("./src/lib/raphael.exec.js")),i(n("./src/lib/Class.exec.js")),i(n("./src/lib/pathfinding.exec.js"));function i(t){return t&&t.__esModule?t:{default:t}}var s=r.default;e.default=s,n("./src/util/raphael_ext.js"),n("./src/util/Polyfill.js"),n("./src/util/Base64.js"),n("./src/util/Debug.js"),n("./src/util/ArrayList.js"),n("./src/util/SVGUtil.js"),n("./src/util/spline/Spline.js"),n("./src/util/spline/CubicSpline.js"),n("./src/util/spline/CatmullRomSpline.js"),n("./src/util/spline/BezierSpline.js"),n("./src/geo/PositionConstants.js"),n("./src/geo/Point.js"),n("./src/geo/Rectangle.js"),n("./src/geo/Util.js"),n("./src/geo/Ray.js"),n("./src/geo/Line.js"),n("./src/command/CommandType.js"),n("./src/command/Command.js"),n("./src/command/CommandCollection.js"),n("./src/command/CommandStack.js"),n("./src/command/CommandStackEvent.js"),n("./src/command/CommandStackEventListener.js"),n("./src/command/CommandMove.js"),n("./src/command/CommandAttr.js"),n("./src/command/CommandMoveLine.js"),n("./src/command/CommandMoveConnection.js"),n("./src/command/CommandMoveVertex.js"),n("./src/command/CommandMoveVertices.js"),n("./src/command/CommandResize.js"),n("./src/command/CommandRotate.js"),n("./src/command/CommandConnect.js"),n("./src/command/CommandReconnect.js"),n("./src/command/CommandDelete.js"),n("./src/command/CommandDeleteGroup.js"),n("./src/command/CommandAdd.js"),n("./src/command/CommandGroup.js"),n("./src/command/CommandUngroup.js"),n("./src/command/CommandAddVertex.js"),n("./src/command/CommandAssignFigure.js"),n("./src/command/CommandBoundingBox.js"),n("./src/command/CommandRemoveVertex.js"),n("./src/command/CommandReplaceVertices.js"),n("./src/layout/connection/ConnectionRouter.js"),n("./src/layout/connection/DirectRouter.js"),n("./src/layout/connection/RubberbandRouter.js"),n("./src/layout/connection/VertexRouter.js"),n("./src/layout/connection/ManhattanConnectionRouter.js"),n("./src/layout/connection/ManhattanBridgedConnectionRouter.js"),n("./src/layout/connection/InteractiveManhattanConnectionRouter.js"),n("./src/layout/connection/CircuitConnectionRouter.js"),n("./src/layout/connection/SplineConnectionRouter.js"),n("./src/layout/connection/FanConnectionRouter.js"),n("./src/layout/connection/MazeConnectionRouter.js"),n("./src/layout/connection/MuteableManhattanConnectionRouter.js"),n("./src/layout/connection/SketchConnectionRouter.js"),n("./src/layout/mesh/MeshLayouter.js"),n("./src/layout/mesh/ExplodeLayouter.js"),n("./src/layout/mesh/ProposedMeshChange.js"),n("./src/layout/locator/Locator.js"),n("./src/layout/locator/PortLocator.js"),n("./src/layout/locator/DraggableLocator.js"),n("./src/layout/locator/SmartDraggableLocator.js"),n("./src/layout/locator/XYAbsPortLocator.js"),n("./src/layout/locator/XYRelPortLocator.js"),n("./src/layout/locator/InputPortLocator.js"),n("./src/layout/locator/OutputPortLocator.js"),n("./src/layout/locator/ConnectionLocator.js"),n("./src/layout/locator/ManhattanMidpointLocator.js"),n("./src/layout/locator/PolylineMidpointLocator.js"),n("./src/layout/locator/ParallelMidpointLocator.js"),n("./src/layout/locator/TopLocator.js"),n("./src/layout/locator/BottomLocator.js"),n("./src/layout/locator/LeftLocator.js"),n("./src/layout/locator/RightLocator.js"),n("./src/layout/locator/CenterLocator.js"),n("./src/policy/EditPolicy.js"),n("./src/policy/canvas/CanvasPolicy.js"),n("./src/policy/canvas/ZoomPolicy.js"),n("./src/policy/canvas/WheelZoomPolicy.js"),n("./src/policy/canvas/KeyboardPolicy.js"),n("./src/policy/canvas/DefaultKeyboardPolicy.js"),n("./src/policy/canvas/ExtendedKeyboardPolicy.js"),n("./src/policy/canvas/SelectionPolicy.js"),n("./src/policy/canvas/SingleSelectionPolicy.js"),n("./src/policy/canvas/GhostMoveSelectionPolicy.js"),n("./src/policy/canvas/PanningSelectionPolicy.js"),n("./src/policy/canvas/BoundingboxSelectionPolicy.js"),n("./src/policy/canvas/ReadOnlySelectionPolicy.js"),n("./src/policy/canvas/DecorationPolicy.js"),n("./src/policy/canvas/FadeoutDecorationPolicy.js"),n("./src/policy/canvas/CoronaDecorationPolicy.js"),n("./src/policy/canvas/SnapToEditPolicy.js"),n("./src/policy/canvas/ShowDimetricGridEditPolicy.js"),n("./src/policy/canvas/SnapToDimetricGridEditPolicy.js"),n("./src/policy/canvas/ShowGridEditPolicy.js"),n("./src/policy/canvas/SnapToGridEditPolicy.js"),n("./src/policy/canvas/ShowDotEditPolicy.js"),n("./src/policy/canvas/ShowChessboardEditPolicy.js"),n("./src/policy/canvas/SnapToGeometryEditPolicy.js"),n("./src/policy/canvas/SnapToVerticesEditPolicy.js"),n("./src/policy/canvas/SnapToInBetweenEditPolicy.js"),n("./src/policy/canvas/SnapToCenterEditPolicy.js"),n("./src/policy/canvas/DropInterceptorPolicy.js"),n("./src/policy/connection/ConnectionCreatePolicy.js"),n("./src/policy/connection/ComposedConnectionCreatePolicy.js"),n("./src/policy/connection/ClickConnectionCreatePolicy.js"),n("./src/policy/connection/OrthogonalConnectionCreatePolicy.js"),n("./src/policy/connection/DragConnectionCreatePolicy.js"),n("./src/policy/figure/FigureEditPolicy.js"),n("./src/policy/figure/DragDropEditPolicy.js"),n("./src/policy/figure/RegionEditPolicy.js"),n("./src/policy/figure/HorizontalEditPolicy.js"),n("./src/policy/figure/VerticalEditPolicy.js"),n("./src/policy/figure/SelectionPolicy.js"),n("./src/policy/figure/SelectionFeedbackPolicy.js"),n("./src/policy/figure/ResizeSelectionFeedbackPolicy.js"),n("./src/policy/figure/RectangleSelectionFeedbackPolicy.js"),n("./src/policy/figure/RaftSelectionFeedbackPolicy.js"),n("./src/policy/figure/BigRectangleSelectionFeedbackPolicy.js"),n("./src/policy/figure/RoundRectangleSelectionFeedbackPolicy.js"),n("./src/policy/figure/BusSelectionFeedbackPolicy.js"),n("./src/policy/figure/WidthSelectionFeedbackPolicy.js"),n("./src/policy/figure/VBusSelectionFeedbackPolicy.js"),n("./src/policy/figure/HBusSelectionFeedbackPolicy.js"),n("./src/policy/figure/AntSelectionFeedbackPolicy.js"),n("./src/policy/figure/GlowSelectionFeedbackPolicy.js"),n("./src/policy/figure/SlimSelectionFeedbackPolicy.js"),n("./src/policy/figure/VertexSelectionFeedbackPolicy.js"),n("./src/policy/line/LineSelectionFeedbackPolicy.js"),n("./src/policy/line/VertexSelectionFeedbackPolicy.js"),n("./src/policy/line/OrthogonalSelectionFeedbackPolicy.js"),n("./src/policy/port/PortFeedbackPolicy.js"),n("./src/policy/port/ElasticStrapFeedbackPolicy.js"),n("./src/policy/port/IntrusivePortsFeedbackPolicy.js"),n("./src/Configuration.js"),n("./src/HeadlessCanvas.js"),n("./src/Canvas.js"),n("./src/Selection.js"),n("./src/Figure.js"),n("./src/shape/node/Node.js"),n("./src/VectorFigure.js"),n("./src/shape/basic/Rectangle.js"),n("./src/SetFigure.js"),n("./src/SVGFigure.js"),n("./src/shape/node/Hub.js"),n("./src/shape/node/HorizontalBus.js"),n("./src/shape/node/VerticalBus.js"),n("./src/shape/node/Fulcrum.js"),n("./src/shape/basic/Arc.js"),n("./src/shape/basic/Oval.js"),n("./src/shape/basic/Circle.js"),n("./src/shape/basic/Label.js"),n("./src/shape/basic/Text.js"),n("./src/shape/basic/Line.js"),n("./src/shape/basic/PolyLine.js"),n("./src/shape/basic/Image.js"),n("./src/shape/basic/Polygon.js"),n("./src/shape/basic/Diamond.js"),n("./src/shape/dimetric/Rectangle.js"),n("./src/shape/composite/Composite.js"),n("./src/shape/composite/StrongComposite.js"),n("./src/shape/composite/Group.js"),n("./src/shape/composite/Jailhouse.js"),n("./src/shape/composite/WeakComposite.js"),n("./src/shape/composite/Raft.js"),n("./src/Connection.js"),n("./src/VectorFigure.js"),n("./src/ResizeHandle.js"),n("./src/shape/composite/RaftResizeHandle.js"),n("./src/shape/basic/LineResizeHandle.js"),n("./src/shape/basic/LineStartResizeHandle.js"),n("./src/shape/basic/LineEndResizeHandle.js"),n("./src/shape/basic/VertexResizeHandle.js"),n("./src/shape/basic/GhostVertexResizeHandle.js"),n("./src/Port.js"),n("./src/InputPort.js"),n("./src/OutputPort.js"),n("./src/HybridPort.js"),n("./src/layout/anchor/ConnectionAnchor.js"),n("./src/layout/anchor/ChopboxConnectionAnchor.js"),n("./src/layout/anchor/FanConnectionAnchor.js"),n("./src/layout/anchor/ShortesPathConnectionAnchor.js"),n("./src/layout/anchor/CenterEdgeConnectionAnchor.js"),n("./src/shape/arrow/CalligrapherArrowLeft.js"),n("./src/shape/arrow/CalligrapherArrowDownLeft.js"),n("./src/shape/node/Start.js"),n("./src/shape/node/End.js"),n("./src/shape/node/Between.js"),n("./src/shape/note/PostIt.js"),n("./src/shape/flowchart/Document.js"),n("./src/shape/widget/Widget.js"),n("./src/shape/widget/Slider.js"),n("./src/shape/diagram/Diagram.js"),n("./src/shape/diagram/Pie.js"),n("./src/shape/diagram/Sparkline.js"),n("./src/shape/analog/OpAmp.js"),n("./src/shape/analog/ResistorBridge.js"),n("./src/shape/analog/ResistorVertical.js"),n("./src/shape/analog/VoltageSupplyHorizontal.js"),n("./src/shape/analog/VoltageSupplyVertical.js"),n("./src/shape/layout/Layout.js"),n("./src/shape/layout/HorizontalLayout.js"),n("./src/shape/layout/VerticalLayout.js"),n("./src/shape/layout/TableLayout.js"),n("./src/shape/layout/FlexGridLayout.js"),n("./src/shape/layout/StackLayout.js"),n("./src/shape/icon/Icon.js"),n("./src/shape/icon/Thunder.js"),n("./src/shape/icon/Snow.js"),n("./src/shape/icon/Hail.js"),n("./src/shape/icon/Rain.js"),n("./src/shape/icon/Cloudy.js"),n("./src/shape/icon/Sun.js"),n("./src/shape/icon/Undo.js"),n("./src/shape/icon/Detour.js"),n("./src/shape/icon/Merge.js"),n("./src/shape/icon/Split.js"),n("./src/shape/icon/Fork.js"),n("./src/shape/icon/ForkAlt.js"),n("./src/shape/icon/Exchange.js"),n("./src/shape/icon/Shuffle.js"),n("./src/shape/icon/Refresh.js"),n("./src/shape/icon/Ccw.js"),n("./src/shape/icon/Acw.js"),n("./src/shape/icon/Contract.js"),n("./src/shape/icon/Expand.js"),n("./src/shape/icon/Stop.js"),n("./src/shape/icon/End.js"),n("./src/shape/icon/Start.js"),n("./src/shape/icon/Ff.js"),n("./src/shape/icon/Rw.js"),n("./src/shape/icon/ArrowRight.js"),n("./src/shape/icon/ArrowLeft.js"),n("./src/shape/icon/ArrowUp.js"),n("./src/shape/icon/ArrowDown.js"),n("./src/shape/icon/ArrowLeft2.js"),n("./src/shape/icon/ArrowRight2.js"),n("./src/shape/icon/Smile2.js"),n("./src/shape/icon/Smile.js"),n("./src/shape/icon/Alarm.js"),n("./src/shape/icon/Clock.js"),n("./src/shape/icon/StopWatch.js"),n("./src/shape/icon/History.js"),n("./src/shape/icon/Future.js"),n("./src/shape/icon/GlobeAlt2.js"),n("./src/shape/icon/GlobeAlt.js"),n("./src/shape/icon/Globe.js"),n("./src/shape/icon/Warning.js"),n("./src/shape/icon/Code.js"),n("./src/shape/icon/Pensil.js"),n("./src/shape/icon/Pen.js"),n("./src/shape/icon/Plus.js"),n("./src/shape/icon/Minus.js"),n("./src/shape/icon/TShirt.js"),n("./src/shape/icon/Sticker.js"),n("./src/shape/icon/Page2.js"),n("./src/shape/icon/Page.js"),n("./src/shape/icon/Landscape1.js"),n("./src/shape/icon/Landscape2.js"),n("./src/shape/icon/Plugin.js"),n("./src/shape/icon/Bookmark.js"),n("./src/shape/icon/Hammer.js"),n("./src/shape/icon/Users.js"),n("./src/shape/icon/User.js"),n("./src/shape/icon/Customer.js"),n("./src/shape/icon/Employee.js"),n("./src/shape/icon/Anonymous.js"),n("./src/shape/icon/Skull.js"),n("./src/shape/icon/Mail.js"),n("./src/shape/icon/Picture.js"),n("./src/shape/icon/Bubble.js"),n("./src/shape/icon/CodeTalk.js"),n("./src/shape/icon/Talkq.js"),n("./src/shape/icon/Talke.js"),n("./src/shape/icon/Home.js"),n("./src/shape/icon/Lock.js"),n("./src/shape/icon/Clip.js"),n("./src/shape/icon/Star.js"),n("./src/shape/icon/StarOff.js"),n("./src/shape/icon/Star2.js"),n("./src/shape/icon/Star2Off.js"),n("./src/shape/icon/Star3.js"),n("./src/shape/icon/Star3Off.js"),n("./src/shape/icon/Chat.js"),n("./src/shape/icon/Quote.js"),n("./src/shape/icon/Gear2.js"),n("./src/shape/icon/Gear.js"),n("./src/shape/icon/Wrench.js"),n("./src/shape/icon/Wrench2.js"),n("./src/shape/icon/Wrench3.js"),n("./src/shape/icon/ScrewDriver.js"),n("./src/shape/icon/HammerAndScrewDriver.js"),n("./src/shape/icon/Magic.js"),n("./src/shape/icon/Download.js"),n("./src/shape/icon/View.js"),n("./src/shape/icon/Noview.js"),n("./src/shape/icon/Cloud.js"),n("./src/shape/icon/Cloud2.js"),n("./src/shape/icon/CloudDown.js"),n("./src/shape/icon/CloudUp.js"),n("./src/shape/icon/Location.js"),n("./src/shape/icon/Volume0.js"),n("./src/shape/icon/Volume1.js"),n("./src/shape/icon/Volume2.js"),n("./src/shape/icon/Volume3.js"),n("./src/shape/icon/Key.js"),n("./src/shape/icon/Ruler.js"),n("./src/shape/icon/Power.js"),n("./src/shape/icon/Unlock.js"),n("./src/shape/icon/Flag.js"),n("./src/shape/icon/Tag.js"),n("./src/shape/icon/Search.js"),n("./src/shape/icon/ZoomOut.js"),n("./src/shape/icon/ZoomIn.js"),n("./src/shape/icon/Cross.js"),n("./src/shape/icon/Check.js"),n("./src/shape/icon/Settings.js"),n("./src/shape/icon/SettingsAlt.js"),n("./src/shape/icon/Feed.js"),n("./src/shape/icon/Bug.js"),n("./src/shape/icon/Link.js"),n("./src/shape/icon/Calendar.js"),n("./src/shape/icon/Picker.js"),n("./src/shape/icon/No.js"),n("./src/shape/icon/CommandLine.js"),n("./src/shape/icon/Photo.js"),n("./src/shape/icon/Printer.js"),n("./src/shape/icon/Export.js"),n("./src/shape/icon/Import.js"),n("./src/shape/icon/Run.js"),n("./src/shape/icon/Magnet.js"),n("./src/shape/icon/NoMagnet.js"),n("./src/shape/icon/ReflectH.js"),n("./src/shape/icon/ReflectV.js"),n("./src/shape/icon/Resize2.js"),n("./src/shape/icon/Rotate.js"),n("./src/shape/icon/Connect.js"),n("./src/shape/icon/Disconnect.js"),n("./src/shape/icon/Folder.js"),n("./src/shape/icon/Man.js"),n("./src/shape/icon/Woman.js"),n("./src/shape/icon/People.js"),n("./src/shape/icon/Parent.js"),n("./src/shape/icon/Notebook.js"),n("./src/shape/icon/Diagram.js"),n("./src/shape/icon/BarChart.js"),n("./src/shape/icon/PieChart.js"),n("./src/shape/icon/LineChart.js"),n("./src/shape/icon/Apps.js"),n("./src/shape/icon/Locked.js"),n("./src/shape/icon/Ppt.js"),n("./src/shape/icon/Lab.js"),n("./src/shape/icon/Umbrella.js"),n("./src/shape/icon/Dry.js"),n("./src/shape/icon/Ipad.js"),n("./src/shape/icon/Iphone.js"),n("./src/shape/icon/Jigsaw.js"),n("./src/shape/icon/Lamp.js"),n("./src/shape/icon/Lamp_alt.js"),n("./src/shape/icon/Video.js"),n("./src/shape/icon/Palm.js"),n("./src/shape/icon/Fave.js"),n("./src/shape/icon/Help.js"),n("./src/shape/icon/Crop.js"),n("./src/shape/icon/BioHazard.js"),n("./src/shape/icon/WheelChair.js"),n("./src/shape/icon/Mic.js"),n("./src/shape/icon/MicMute.js"),n("./src/shape/icon/IMac.js"),n("./src/shape/icon/Pc.js"),n("./src/shape/icon/Cube.js"),n("./src/shape/icon/FullCube.js"),n("./src/shape/icon/Font.js"),n("./src/shape/icon/Trash.js"),n("./src/shape/icon/NewWindow.js"),n("./src/shape/icon/DockRight.js"),n("./src/shape/icon/DockLeft.js"),n("./src/shape/icon/DockBottom.js"),n("./src/shape/icon/DockTop.js"),n("./src/shape/icon/Pallete.js"),n("./src/shape/icon/Cart.js"),n("./src/shape/icon/Glasses.js"),n("./src/shape/icon/Package.js"),n("./src/shape/icon/Book.js"),n("./src/shape/icon/Books.js"),n("./src/shape/icon/Icons.js"),n("./src/shape/icon/List.js"),n("./src/shape/icon/Db.js"),n("./src/shape/icon/Paper.js"),n("./src/shape/icon/TakeOff.js"),n("./src/shape/icon/Landing.js"),n("./src/shape/icon/Plane.js"),n("./src/shape/icon/Phone.js"),n("./src/shape/icon/HangUp.js"),n("./src/shape/icon/SlideShare.js"),n("./src/shape/icon/Twitter.js"),n("./src/shape/icon/TwitterBird.js"),n("./src/shape/icon/Skype.js"),n("./src/shape/icon/Windows.js"),n("./src/shape/icon/Apple.js"),n("./src/shape/icon/Linux.js"),n("./src/shape/icon/NodeJs.js"),n("./src/shape/icon/JQuery.js"),n("./src/shape/icon/Sencha.js"),n("./src/shape/icon/Vim.js"),n("./src/shape/icon/InkScape.js"),n("./src/shape/icon/Aumade.js"),n("./src/shape/icon/Firefox.js"),n("./src/shape/icon/Ie.js"),n("./src/shape/icon/Ie9.js"),n("./src/shape/icon/Opera.js"),n("./src/shape/icon/Chrome.js"),n("./src/shape/icon/Safari.js"),n("./src/shape/icon/LinkedIn.js"),n("./src/shape/icon/Flickr.js"),n("./src/shape/icon/GitHub.js"),n("./src/shape/icon/GitHubAlt.js"),n("./src/shape/icon/Raphael.js"),n("./src/shape/icon/GRaphael.js"),n("./src/shape/icon/Svg.js"),n("./src/shape/icon/Usb.js"),n("./src/shape/icon/Ethernet.js"),n("./src/shape/pert/Activity.js"),n("./src/shape/pert/Start.js"),n("./src/shape/state/Start.js"),n("./src/shape/state/End.js"),n("./src/shape/state/State.js"),n("./src/shape/state/Connection.js"),n("./src/ui/LabelEditor.js"),n("./src/ui/LabelInplaceEditor.js"),n("./src/decoration/connection/Decorator.js"),n("./src/decoration/connection/ArrowDecorator.js"),n("./src/decoration/connection/DiamondDecorator.js"),n("./src/decoration/connection/CircleDecorator.js"),n("./src/decoration/connection/BarDecorator.js"),n("./src/io/Reader.js"),n("./src/io/Writer.js"),n("./src/io/svg/Writer.js"),n("./src/io/png/Writer.js"),n("./src/io/json/Writer.js"),n("./src/io/json/Reader.js"),t.exports=e.default},"./src/io/Reader.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.io.Reader=Class.extend({init:function(){},unmarshal:function(t,e){}})},"./src/io/Writer.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.io.Writer=Class.extend({init:function(){},marshal:function(t,e){if("function"!=typeof e)throw"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.";e("","")},formatXml:function(t){let e="",n=new RegExp("(>)(<)(/*)","g");t=t.replace(n,"$1\r\n$2$3");let r=0;return t.split("\r\n").forEach((function(t){let n=0;t.match(new RegExp(".+]*>$"))?n=0:t.match(new RegExp("^]*[^/]>.*$"))?1:0;for(var i="",s=0;s{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.io.json.Reader=i.default.io.Reader.extend({NAME:"draw2d.io.json.Reader",init:function(){this._super()},unmarshal:function(t,e){let n=new i.default.util.ArrayList;"string"==typeof e&&(e=JSON.parse(e));let r=null;return e.forEach((e=>{try{let i=this.createFigureFromElement(e)||this.createFigureFromType(e.type),s=null,a=null;for(let n in e){let i=e[n];if("source"===n){if(r=t.getFigure(i.node),null===r)throw"Source figure with id '"+i.node+"' not found";if(s=r.getPort(i.port),null===s)throw"Unable to find source port '"+i.port+"' at figure '"+i.node+"' to unmarschal '"+e.type+"'"}else if("target"===n){if(r=t.getFigure(i.node),null===r)throw"Target figure with id '"+i.node+"' not found";if(a=r.getPort(i.port),null===a)throw"Unable to find target port '"+i.port+"' at figure '"+i.node+"' to unmarschal '"+e.type+"'"}}null!==s&&null!==a&&(i.setSource(s),i.setTarget(a)),i.setPersistentAttributes(e),t.add(i),n.add(i)}catch(t){debug.error(e,"Unable to instantiate figure type '"+e.type+"' with id '"+e.id+"' during unmarshal by "+this.NAME+". Skipping figure.."),debug.error(t),debug.warn(e)}})),e.forEach((e=>{if(void 0!==e.composite){let n=t.getFigure(e.id);null===n&&(n=t.getLine(e.id)),t.getFigure(e.composite).assignFigure(n)}})),t.calculateConnectionIntersection(),t.getLines().each(((t,e)=>{e.svgPathString=null,e.repaint()})),t.linesToRepaintAfterDragDrop=t.getLines().clone(),t.showDecoration(),n},createFigureFromType:function(t){return Function(`return new ${t}()`)()},createFigureFromElement:function(t){return null}})},"./src/io/json/Writer.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.io.json.Writer=i.default.io.Writer.extend({init:function(){this._super()},marshal:function(t,e){if("function"!=typeof e)throw"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.";var n=[];t.getFigures().each(((t,e)=>{n.push(e.getPersistentAttributes())})),t.getLines().each(((t,e)=>{n.push(e.getPersistentAttributes())}));var r=i.default.util.Base64.encode(JSON.stringify(n,null,2));e(n,r)}})},"./src/io/png/Writer.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};const s=n("./node_modules/canvg/dist/index.cjs");i.default.io.png.Writer=i.default.io.Writer.extend({init:function(){this._super()},marshal:function(t,e,n){if("function"!=typeof e)throw"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.";let r="",a=!1;if(t instanceof i.default.Figure){let e=t,n=e.getPosition();e.setPosition(1,1),r=''+e.shape.node.outerHTML+"",e.setPosition(n),e.initialWidth=e.getWidth()+2,e.initialHeight=e.getHeight()+2}else a={zoom:t.getZoom(),scrollLeft:t.getScrollLeft(),scrollTop:t.getScrollTop()},t.setZoom(1),t.hideDecoration(),r=(new XMLSerializer).serializeToString(t.getHtmlContainer().find("svg")[0]);let o=$('');$("body").append(o);let c=$("#canvas_png_export_for_draw2d")[0];c.width=t.initialWidth,c.height=t.initialHeight,s("canvas_png_export_for_draw2d",r,{ignoreMouse:!0,ignoreAnimation:!0,renderCallback:function(){try{if(t instanceof i.default.Canvas&&(a&&(t.setZoom(a.zoom),t.setScrollLeft(a.scrollLeft),t.setScrollTop(a.scrollTop)),t.showDecoration()),void 0!==n){let t=n.x,r=n.y,i=n.w,s=n.h,a=document.createElement("canvas");a.width=i,a.height=s,a.getContext("2d").drawImage(c,t,r,i,s,0,0,i,s);let o=a.toDataURL("image/png"),l=o.replace("data:image/png;base64,","");e(o,l)}else{let t=c.toDataURL("image/png");e(t,t.replace("data:image/png;base64,",""))}}finally{o.remove()}}})}})},"./src/io/svg/Writer.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.io.svg.Writer=i.default.io.Writer.extend({init:function(){this._super()},marshal:function(t,e){if("function"!=typeof e)throw"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.";let n=t.getPrimarySelection();t.setCurrentSelection(null);let r=t.getHtmlContainer().html().replace(/>\s+/g,">").replace(/\s+.*<\/desc>/g,"Create with draw2d JS graph library and RaphaelJS"),t.setCurrentSelection(n),e(r,i.default.util.Base64.encode(r))}})},"./src/layout/anchor/CenterEdgeConnectionAnchor.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.anchor.CenterEdgeConnectionAnchor=i.default.layout.anchor.ConnectionAnchor.extend({NAME:"draw2d.layout.anchor.CenterEdgeConnectionAnchor",init:function(t){this._super(t)},getLocation:function(t,e){let n=this.getOwner().getParent().getBoundingBox(),r=n.getDirection(t),i=n.getCenter();switch(r){case 0:i.y=n.y;break;case 1:i.x=n.x+n.w;break;case 2:i.y=n.y+n.h;break;case 3:i.x=n.x}return i},getBox:function(){return this.getOwner().getParent().getBoundingBox()},getReferencePoint:function(t){return this.getBox().getCenter()}})},"./src/layout/anchor/ChopboxConnectionAnchor.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.anchor.ChopboxConnectionAnchor=i.default.layout.anchor.ConnectionAnchor.extend({NAME:"draw2d.layout.anchor.ChopboxConnectionAnchor",init:function(t){this._super(t)},getLocation:function(t,e){let n=new i.default.geo.Rectangle(0,0);n.setBounds(this.getBox()),n.translate(-1,-1),n.resize(1,1);let r=n.getCenter();if(n.isEmpty()||t.x===r.x&&t.y===r.y)return r;let s=t.x-r.x,a=t.y-r.y,o=.5/Math.max(Math.abs(s)/n.w,Math.abs(a)/n.h);return s*=o,a*=o,r.translate(s,a),r},getBox:function(){return this.getOwner().getParent().getBoundingBox()},getReferencePoint:function(t){return this.getBox().getCenter()}})},"./src/layout/anchor/ConnectionAnchor.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.layout.anchor.ConnectionAnchor=Class.extend({NAME:"draw2d.layout.anchor.ConnectionAnchor",init:function(t){this.owner=t},getLocation:function(t,e){return this.getReferencePoint(e)},getOwner:function(){return this.owner},setOwner:function(t){if(void 0===t)throw"Missing parameter for 'owner' in ConnectionAnchor.setOwner";this.owner=t},getBox:function(){return this.getOwner().getAbsoluteBounds()},getReferencePoint:function(t){return this.getOwner().getAbsolutePosition()}})},"./src/layout/anchor/FanConnectionAnchor.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.anchor.FanConnectionAnchor=i.default.layout.anchor.ConnectionAnchor.extend({NAME:"draw2d.layout.anchor.FanConnectionAnchor",init:function(t,e){this._super(t),this.separation=e?parseInt(e):10},getLocation:function(t,e){let n=new i.default.geo.Rectangle(0,0);n.setBounds(this.getBox()),n.translate(-1,-1),n.resize(1,1);let r=n.getCenter();if(n.isEmpty()||t.x===r.x&&t.y===r.y)return r;let s=e.getSource(),a=e.getTarget(),o=this.getOwner().getConnections().clone();o.grep((function(t){return t.getTarget()===a&&t.getSource()===s||t.getTarget()===s&&t.getSource()===a}));let c,l=o.indexOf(e)+1,h=r.getPosition(t);c=h===i.default.geo.PositionConstants.SOUTH||h===i.default.geo.PositionConstants.EAST?new i.default.geo.Point(t.x-r.x,t.y-r.y):new i.default.geo.Point(r.x-t.x,r.y-t.y);let u=Math.sqrt(c.x*c.x+c.y*c.y);l<=2&&(u*=1.5);let d=this.separation*c.x/u,p=this.separation*c.y/u;r=l%2==0?new i.default.geo.Point(r.x+l/2*(-1*p),r.y+l/2*d):new i.default.geo.Point(r.x+l/2*p,r.y+l/2*(-1*d));let f=this.getBox().intersectionWithLine(r,t);switch(f.getSize()){case 0:let e=this.getBox().getVertices(),n=e.first();return n.distance=t.distance(n),e.asArray().reduce((function(e,n){return n.distance=t.distance(n),n.distance{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.anchor.ShortesPathConnectionAnchor=i.default.layout.anchor.ConnectionAnchor.extend({NAME:"draw2d.layout.anchor.ShortesPathConnectionAnchor",init:function(t){this._super(t)},getLocation:function(t,e){let n=this.getOwner().getParent().getBoundingBox(),r=n.getCenter();if(this.getOwner().getParent()instanceof i.default.shape.basic.Oval){let e=this.getOwner().getParent().intersectionWithLine(t,r);if(1===e.getSize())return e.get(0)}switch(n.determineOctant(new i.default.geo.Rectangle(t.x,t.y,2,2))){case 0:return n.getTopLeft();case 1:return new i.default.geo.Point(t.x,n.getTop());case 2:return n.getTopRight();case 3:return new i.default.geo.Point(n.getRight(),t.y);case 4:return n.getBottomRight();case 5:return new i.default.geo.Point(t.x,n.getBottom());case 6:return n.getBottomLeft();case 7:return new i.default.geo.Point(n.getLeft(),t.y)}return n.getTopLeft()},getBox:function(){return this.getOwner().getParent().getBoundingBox()},getReferencePoint:function(t){return this.getBox().getCenter()}})},"./src/layout/connection/CircuitConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.CircuitConnectionRouter=i.default.layout.connection.ManhattanConnectionRouter.extend({NAME:"draw2d.layout.connection.CircuitConnectionRouter",init:function(){this._super(),this.setBridgeRadius(4),this.setVertexRadius(2),this.abortRoutingOnFirstVertexNode=!1},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},onUninstall:function(t){void 0!==t.vertexNodes&&null!==t.vertexNodes&&(t.vertexNodes.remove(),t.vertexNodes=null)},setVertexRadius:function(t){return this.vertexRadius=t,this},setJunctionRadius:function(t){this.vertexRadius=t},setBridgeRadius:function(t){return this.bridgeRadius=t,this.bridge_LR=[" r",.5,-.5,t-t/2,-(t-t/4),t,-t,t+t/2,-(t-t/4),2*t,"0 "].join(" "),this.bridge_RL=[" r",-.5,-.5,-(t-t/2),-(t-t/4),-t,-t,-(t+t/2),-(t-t/4),2*-t,"0 "].join(" "),this},route:function(t,e){let n=t.getStartPoint(),r=t.getSource().getConnectionDirection(t.getTarget()),s=t.getEndPoint(),a=t.getTarget().getConnectionDirection(t.getSource());this._route(t,s,a,n,r);let o=t.getCanvas().getIntersection(t).sort("x"),c=o.clone().reverse(),l=o;void 0!==t.vertexNodes&&null!==t.vertexNodes&&t.vertexNodes.remove(),t.vertexNodes=t.canvas.paper.set();let h=t.getVertices(),u=h.get(0),d=["M",.5+(0|u.x)," ",.5+(0|u.y)],p=u,f=null,g=null,m=null;for(let e=1;eu.x?(l=c,g=this.bridge_RL,f=-this.bridgeRadius):(l=o,g=this.bridge_LR,f=this.bridgeRadius),l.each(((e,n)=>{if(!0===i.default.shape.basic.Line.hit(1,p.x,p.y,u.x,u.y,n.x,n.y))if(t.sharingPorts(n.other)){let e=n.other,r=e.getZOrder();if(t.getZOrder(){"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.ConnectionRouter=Class.extend({NAME:"draw2d.layout.connection.ConnectionRouter",init:function(){},route:function(t,e){throw"subclasses must implement the method [ConnectionRouter.route]"},_paint:function(t){let e,n,r,s=t=>t.toFixed(2),a=t.getVertices(),o=a.get(0),c=t.getRadius(),l=["M",s(o.x)," ",s(o.y)],h=1;if(c>0){let t=o;for(e=a.getSize()-1;h{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.DirectRouter=i.default.layout.connection.ConnectionRouter.extend({NAME:"draw2d.layout.connection.DirectRouter",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},invalidate:function(){},route:function(t,e){let n=t.getStartPosition(),r=t.getEndPosition();t.addPoint(n),t.addPoint(r);let i=["M",n.x," ",n.y];i.push("L",r.x," ",r.y),t.svgPathString=i.join("")}})},"./src/layout/connection/FanConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.FanConnectionRouter=i.default.layout.connection.DirectRouter.extend({NAME:"draw2d.layout.connection.FanConnectionRouter",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},route:function(t,e){let n=t.getSource().getConnections().clone();n.grep((e=>e.getTarget()===t.getTarget()||e.getSource()===t.getTarget())),n.getSize()>1?this.routeCollision(t,n.indexOf(t)):this._super(t,e)},routeCollision:function(t,e){e+=1;let n,r=t.getStartPoint(),s=t.getEndPoint(),a=new i.default.geo.Point((s.x+r.x)/2,(s.y+r.y)/2),o=s.getPosition(r);n=o===i.default.geo.PositionConstants.SOUTH||o===i.default.geo.PositionConstants.EAST?new i.default.geo.Point(s.x-r.x,s.y-r.y):new i.default.geo.Point(r.x-s.x,r.y-s.y);let c,l=Math.sqrt(n.x*n.x+n.y*n.y),h=15*n.x/l,u=15*n.y/l;c=e%2==0?new i.default.geo.Point(a.x+e/2*(-1*u),a.y+e/2*h):new i.default.geo.Point(a.x+e/2*u,a.y+e/2*(-1*h)),t.addPoint(r),t.addPoint(c),t.addPoint(s),this._paint(t)}})},"./src/layout/connection/InteractiveManhattanConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.InteractiveManhattanConnectionRouter=i.default.layout.connection.ManhattanConnectionRouter.extend({NAME:"draw2d.layout.connection.InteractiveManhattanConnectionRouter",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.OrthogonalSelectionFeedbackPolicy),t._routingMetaData??={routedByUserInteraction:!1,fromDir:-1,toDir:-1}},onUninstall:function(t){delete t._routingMetaData},route:function(t,e){e.oldVertices,0===e.oldVertices.getSize()||!1===t._routingMetaData.routedByUserInteraction?(this._super(t,e),t._routingMetaData.fromDir=t.getSource().getConnectionDirection(t.getTarget()),t._routingMetaData.toDir=t.getTarget().getConnectionDirection(t.getSource())):(this.halfRoute(t,e),this._paint(t))},halfRoute:function(t,e){let n=this.MINDIST,r=Math.max,s=Math.min;e??={oldVertices:new i.default.util.ArrayList};let a=e.oldVertices,o=a.getSize(),c=t.getStartPosition(),l=t.getSource().getConnectionDirection(t.getTarget()),h=t.getEndPosition(),u=t.getTarget().getConnectionDirection(t.getSource());if(t._routingMetaData.fromDir===l&&t._routingMetaData.toDir===u||(t._routingMetaData.routedByUserInteraction=!1,this.route(t,e)),(l===i.default.geo.Rectangle.DIRECTION_RIGHT&&u===i.default.geo.Rectangle.DIRECTION_LEFT&&c.x>h.x&&o<=4||2===t.getVertices().getSize()&&!0===t._routingMetaData.routedByUserInteraction)&&(t._routingMetaData.routedByUserInteraction=!1,this.route(t,e)),a.each(((e,n)=>{t.addPoint(n)})),!t.isInDragDrop){if(e.startMoved||!c.equals(a.get(0))){let e=a.get(1),o=a.get(2);switch(t.setVertex(0,c),l){case i.default.geo.Rectangle.DIRECTION_RIGHT:t.setVertex(1,r(c.x+n,e.x),c.y),o&&t.setVertex(2,r(c.x+n,e.x),o.y);break;case i.default.geo.Rectangle.DIRECTION_LEFT:t.setVertex(1,s(c.x-n,e.x),c.y),o&&t.setVertex(2,s(c.x-n,e.x),o.y);break;case i.default.geo.Rectangle.DIRECTION_UP:t.setVertex(1,c.x,s(c.y-n,e.y)),o&&t.setVertex(2,o.x,s(c.y-n,e.y));break;case i.default.geo.Rectangle.DIRECTION_DOWN:t.setVertex(1,c.x,r(c.y+n,e.y)),o&&t.setVertex(2,o.x,r(c.y+n,e.y))}}if(e.endMoved||!h.equals(a.get(o-1))){let e=a.get(o-2),c=a.get(o-3);switch(t.setVertex(o-1,h),u){case i.default.geo.Rectangle.DIRECTION_RIGHT:t.setVertex(o-2,r(h.x+n,e.x),h.y),c&&t.setVertex(o-3,r(h.x+n,e.x),c.y);break;case i.default.geo.Rectangle.DIRECTION_LEFT:t.setVertex(o-2,s(h.x-n,e.x),h.y),c&&t.setVertex(o-3,s(h.x-n,e.x),c.y);break;case i.default.geo.Rectangle.DIRECTION_UP:t.setVertex(o-2,h.x,s(h.y-n,e.y)),c&&t.setVertex(o-3,c.x,s(h.y-n,e.y));break;case i.default.geo.Rectangle.DIRECTION_DOWN:t.setVertex(o-2,h.x,r(h.y+n,e.y)),c&&t.setVertex(o-3,c.x,r(h.y+n,e.y))}}}},canRemoveSegmentAt:function(t,e){let n=t.getVertices().getSize()-1;if(e<=0||e+1>=n)return!1;if(n<4)return!1;let r=t.getStartPosition(),s=t.getSource().getConnectionDirection(t.getTarget()),a=t.getEndPosition(),o=t.getTarget().getConnectionDirection(t.getSource());if(n<=5){if(s===i.default.geo.Rectangle.DIRECTION_RIGHT&&o===i.default.geo.Rectangle.DIRECTION_LEFT&&r.x>=a.x)return!1;if(s==i.default.geo.Rectangle.DIRECTION_LEFT&o==i.default.geo.Rectangle.DIRECTION_RIGHT&&r.x<=a.x)return!1;if(s==i.default.geo.Rectangle.DIRECTION_UP&o==i.default.geo.Rectangle.DIRECTION_DOWN&&r.y<=a.y)return!1;if(s==i.default.geo.Rectangle.DIRECTION_DOWN&o==i.default.geo.Rectangle.DIRECTION_UP&&r.y>=a.y)return!1;let e=new i.default.Connection;if(e.lineSegments=new i.default.util.ArrayList,e.vertices=new i.default.util.ArrayList,e.sourcePort=t.sourcePort,e.targetPort=t.targetPort,e._routingMetaData={routedByUserInteraction:!1,fromDir:-1,toDir:-1},this.route(e,{oldVertices:new i.default.util.ArrayList}),t.getVertices().getSize()-1<=e.getVertices().getSize()-1)return!1}return!0},onDrag:function(t,e,n,r,i){let s=0;if(null===t.draggedSegment){let e=t.getVertices().getSize()-1;for(s=1;s0?i=Math.min(i,-h-this.MINDIST):h>0&&i<0&&(i=-Math.min(-i,h-this.MINDIST)),t.getVertex(s).translate(0,i),t.getVertex(s+1).translate(0,i)):a.x===o.x&&(1===s&&(h=a.x-c.x,h<0&&r>0?r=Math.min(r,-h-this.MINDIST):h>0&&r<0&&(r=-Math.min(-r,h-this.MINDIST))),s===t.getSegments().getSize()-2&&(h=o.x-l.x,h<0&&r>0?r=Math.min(r,-h-this.MINDIST):h>0&&r<0&&(r=-Math.min(-r,h-this.MINDIST))),t.getVertex(s).translate(r,0),t.getVertex(s+1).translate(r,0))},verticesSet:function(t){t._routingMetaData.routedByUserInteraction=!0,null!==t.getSource()&&null!==t.getTarget()&&(t._routingMetaData.fromDir=t.getSource().getConnectionDirection(t.getTarget()),t._routingMetaData.toDir=t.getTarget().getConnectionDirection(t.getSource()))},getPersistentAttributes:function(t,e){return e.vertex=[],t.getVertices().each(((t,n)=>{e.vertex.push({x:n.x,y:n.y})})),e.routingMetaData={...t._routingMetaData},e},setPersistentAttributes:function(t,e){Array.isArray(e.vertex)&&(t.oldPoint=null,t.lineSegments=new i.default.util.ArrayList,t.setVertices(e.vertex)),void 0!==e.routingMetaData&&(t._routingMetaData={...e.routingMetaData})}})},"./src/layout/connection/ManhattanBridgedConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.ManhattanBridgedConnectionRouter=i.default.layout.connection.ManhattanConnectionRouter.extend({NAME:"draw2d.layout.connection.ManhattanBridgedConnectionRouter",BRIDGE_HORIZONTAL_LR:" r 0 0 3 -4 7 -4 10 0 13 0 ",BRIDGE_HORIZONTAL_RL:" r 0 0 -3 -4 -7 -4 -10 0 -13 0 ",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},route:function(t,e){let n=t.getStartPoint(),r=t.getSource().getConnectionDirection(t.getTarget()),s=t.getEndPoint(),a=t.getTarget().getConnectionDirection(t.getSource());this._route(t,s,a,n,r),t.getVertices().getSize()<2&&t.addPoint(n);let o=t.getCanvas().getIntersection(t).sort("x"),c=o.clone().reverse(),l=o,h=t.getVertices(),u=h.get(0),d=["M",.5+(0|u.x)," ",.5+(0|u.y)],p=u;for(let t=1;t=u.x&&(l=c,n=this.BRIDGE_HORIZONTAL_RL,e=-e),l.each((function(t,r){!1===r.justTouching&&!0===i.default.shape.basic.Line.hit(1,p.x,p.y,u.x,u.y,r.x,r.y)&&Math.floor(u.y)===Math.floor(r.y)&&(d.push(" L",.5+(r.x-e|0)," ",.5+(0|r.y)),d.push(n))})),d.push(" L",.5+(0|u.x)," ",.5+(0|u.y)),p=u}t.svgPathString=d.join("")}})},"./src/layout/connection/ManhattanConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.ManhattanConnectionRouter=i.default.layout.connection.ConnectionRouter.extend({NAME:"draw2d.layout.connection.ManhattanConnectionRouter",MINDIST:20,TOL:.1,TOLxTOL:.01,TOGGLE_DIST:20,init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},route:function(t,e){let n=t.getStartPosition(),r=t.getSource().getConnectionDirection(t.getTarget()),i=t.getEndPosition(),s=t.getTarget().getConnectionDirection(t.getSource());this._route(t,i,s,n,r),t.getVertices().getSize()<2&&t.addPoint(n),this._paint(t)},_route:function(t,e,n,r,s){let a,o,c,l=i.default.geo.Rectangle.DIRECTION_UP,h=i.default.geo.Rectangle.DIRECTION_RIGHT,u=i.default.geo.Rectangle.DIRECTION_DOWN,d=i.default.geo.Rectangle.DIRECTION_LEFT,p=e.x-r.x,f=e.y-r.y;p*p0&&f*f0&&s===u||f<0&&s===l?a=new i.default.geo.Point(r.x,e.y):n===s?(c=Math.min(e.x,r.x)-this.MINDIST,a=new i.default.geo.Point(c,e.y)):a=new i.default.geo.Point(e.x-p/2,e.y),o=f>0?l:u):n===h?p<0&&f*f0?a=new i.default.geo.Point(e.x+this.MINDIST,e.y):f>0&&s===u||f<0&&s===l?a=new i.default.geo.Point(r.x,e.y):n===s?(c=Math.max(e.x,r.x)+this.MINDIST,a=new i.default.geo.Point(c,e.y)):a=new i.default.geo.Point(e.x-p/2,e.y),o=f>0?l:u):n===u?p*p0?a=new i.default.geo.Point(e.x,e.y+this.MINDIST):p>0&&s===h||p<0&&s===d?a=new i.default.geo.Point(e.x,r.y):n===s?(c=Math.max(e.y,r.y)+this.MINDIST,a=new i.default.geo.Point(e.x,c)):a=new i.default.geo.Point(e.x,e.y-f/2),o=p>0?d:h):n===l&&(p*p0&&s===u?(a=r,o=s):(f<0?a=new i.default.geo.Point(e.x,e.y-this.MINDIST):p>0&&s===h||p<0&&s===d?a=new i.default.geo.Point(e.x,r.y):n===s?(c=Math.min(e.y,r.y)-this.MINDIST,a=new i.default.geo.Point(e.x,c)):a=new i.default.geo.Point(e.x,e.y-f/2),o=p>0?d:h)),this._route(t,a,o,r,s),t.addPoint(e))}})},"./src/layout/connection/MazeConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};let s=null;i.default.layout.connection.MazeConnectionRouter=i.default.layout.connection.ConnectionRouter.extend({NAME:"draw2d.layout.connection.MazeConnectionRouter",init:function(){this._super(),this.useSpline=!1,this.useSimplify=!0,this.useSimplifyValue=2,this.useDebug=!1,this.useShift=4,this.portOutletOffset=15,this.finder=new PF.JumpPointFinder({allowDiagonal:!1,dontCrossCorners:!0})},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},route:function(t,e){let n=t.getStartPoint(),r=t.getSource().getConnectionDirection(t.getTarget()),i=t.getEndPoint(),s=t.getTarget().getConnectionDirection(t.getSource());this._route(t,i,s,n,r),this._paint(t)},_route:function(t,e,n,r,a){let o=this.useShift,c=r,l=e;e=this.getAdjustedPoint(e,n,this.portOutletOffset),r=this.getAdjustedPoint(r,a,this.portOutletOffset);let h=this.generateNoGoGrid(t,e,n,r,a),u=this.finder.findPath(Math.max(e.x)>>o,Math.max(e.y)>>o,Math.max(r.x)>>o,Math.max(0,r.y)>>o,h);if(u.forEach((t=>{t.x=t[0]=t[0]<{s.push(t.canvas.paper.rect(e.x-3,e.y-3,6,6).attr({fill:"#0000ff",opacity:"0.8"}))})),u.length>0){let e=u[0],n=["M",e.x.toFixed(2)," ",e.y.toFixed(2)];for(let t=1;t{t.x=t[0],t.y=t[1]})),this.useSpline){let e=new i.default.util.ArrayList;if(e.add(l),u.forEach((t=>{e.add(new i.default.geo.Point(t[0],t[1]))})),e.add(c),this.useDebug){u.forEach((e=>{s.push(t.canvas.paper.rect(e.x-3,e.y-3,6,6).attr({fill:"#00ff00",opacity:"0.8"}))}));let e=u[0],n=["M",e.x.toFixed(2)," ",e.y.toFixed(2)];for(let t=1;t{t.addPoint(e.x,e.y)}))):n.each((function(e,n){t.addPoint(n)}))}else{if(this.useSimplify&&(u=this.simplify(u,this.useSimplifyValue,!0)),this.useDebug&&(u.forEach((e=>{s.push(t.canvas.paper.rect(e.x-3,e.y-3,6,6).attr({fill:"#00ff00",opacity:"0.8"}))})),u.length>0)){let e=u[0],n=["M",e.x.toFixed(2)," ",e.y.toFixed(2)];for(let t=1;t{t.addPoint(e[0],e[1])})),t.addPoint(c)}},generateNoGoGrid:function(t,e,n,r,i){let s=this.useShift,a=(1<>s,c=t.getCanvas().paper.height>>s,l=new PF.Grid(o,c);t.getCanvas().getFigures().each((function(t,n){let i=n.getBoundingBox();if(!0===i.hitTest(e.x,e.y)||i.hitTest(r.x,r.y))return;let o=i.x>>s,c=i.y>>s;if(o<1||c<1)return;let h=i.x+i.w+a>>s,u=i.y+i.h+a>>s;for(let t=o;t<=h;t++)for(let e=c;e<=u;e++)l.setWalkableAt(t,e,!1)}));let h=t.getSource().getParent().getBoundingBox();if(1===i||3===i){let t=h.y>>s;if(t>0){let e=h.y+h.h,n=r.x>>s;for(let r=t-1;r<>s;if(t>0){let e=h.x+h.w,n=r.x>>s;for(let r=t-1;r<>s;if(t>0){let n=h.y+h.h,r=e.x>>s;for(let e=t-1;e<>s;if(t>0){let n=h.x+h.w,r=e.x>>s;for(let e=t-1;e<>r,s=t.y>>r;e.forEach((e=>{if(s!==e[1]>>r)return!1;e[1]=t.y})),e.forEach((e=>{if(i!==e[0]>>r)return!1;e[0]=t.x}))},getSquareDistance:function(t,e){let n=t.x-e.x,r=t.y-e.y;return n*n+r*r},getSquareSegmentDistance:function(t,e,n){let r,i=e.x,s=e.y,a=n.x-i,o=n.y-s;return 0===a&&0===o||(r=((t.x-i)*a+(t.y-s)*o)/(a*a+o*o),r>1?(i=n.x,s=n.y):r>0&&(i+=a*r,s+=o*r)),a=t.x-i,o=t.y-s,a*a+o*o},simplifyRadialDistance:function(t,e){let n,r=t.length,i=null,s=t[0],a=[s];for(n=1;ne&&(a.push(i),s=i);return s!==i&&a.push(i),a},simplifyDouglasPeucker:function(t,e){let n,r,i,s,a=t.length,o=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(a),c=0,l=a-1,h=[],u=[],d=[];for(o[c]=o[l]=1;l;){for(r=0,n=c+1;nr&&(s=n,r=i);r>e&&(o[s]=1,h.push(c),u.push(s),h.push(s),u.push(l)),c=h.pop(),l=u.pop()}for(n=0;n{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.MuteableManhattanConnectionRouter=i.default.layout.connection.ManhattanConnectionRouter.extend({NAME:"draw2d.layout.connection.MuteableManhattanConnectionRouter",UP:new i.default.geo.Ray(0,-1),DOWN:new i.default.geo.Ray(0,1),LEFT:new i.default.geo.Ray(-1,0),RIGHT:new i.default.geo.Ray(1,0),init:function(){this._super(),this.rowsUsed={},this.colsUsed={},this.constraints={},this.reservedInfo={}},route:function(t,e){this.rowsUsed={},this.colsUsed={},this.constraints={},this.reservedInfo={};let n,r=t.getCanvas(),s=t.getStartPoint(),a=t.getEndPoint(),o=new i.default.geo.Ray(s),c=new i.default.geo.Ray(a),l=new i.default.geo.Ray((o.x+c.x)/2,(o.y+c.y)/2),h=new i.default.geo.Ray(c.x-o.x,c.y-o.y),u=this.getStartDirection(t),d=this.getEndDirection(t),p=new i.default.util.ArrayList,f=u.isHorizontal();if(f?p.add(o.y):p.add(o.x),f=!f,0===u.dot(d))u.dot(h)>=0&&d.dot(h)<=0||(n=u.dot(h)<0?u.similarity(o.translated(u.scaled(10))):f?l.y:l.x,p.add(n),f=!f,n=d.dot(h)>0?d.similarity(c.translated(d.scaled(10))):f?l.y:l.x,p.add(n),f=!f);else if(u.dot(d)>0)n=u.dot(h)>=0?u.similarity(o.translated(u.scaled(10))):d.similarity(c.translated(d.scaled(10))),p.add(n),f=!f;else{if(u.dot(h)<0&&(n=u.similarity(o.translated(u.scaled(10))),p.add(n),f=!f),this.isCycle(t))n=f?t.getSource().getParent().getBoundingBox().getTop()-10:t.getSource().getParent().getBoundingBox().getRight()+10;else if(f){let t=l.y,e=d.similarity(c.translated(d.scaled(10))),s=new i.default.geo.Ray(p.get(p.getSize()-1),t),a=this.findFirstFigureAtStraightLine(r,s,this.LEFT,i.default.util.ArrayList.EMPTY_LIST);for(;null!=a&&a.getBoundingBox().x+a.getBoundingBox().width>e;)t=a.getBoundingBox().y+a.getBoundingBox().height+5,s.y=t,a=this.findFirstFigureAtStraightLine(r,s,this.LEFT,i.default.util.ArrayList.EMPTY_LIST);n=t}else{let e=this.findFirstFigureAtStraightLine(r,o,this.RIGHT,this.getExcludingFigures(t));null==e?n=l.x:(n=Math.min(l.x,o.translated(new i.default.geo.Ray(3*(e.getBoundingBox().x-o.x)/4,0)).x),n=Math.max(o.x,n)),n=this.adjust(t,n)}p.add(n),f=!f}f?p.add(c.y):p.add(c.x),this.processPositions(o,c,p,u.isHorizontal(),t),this._paint(t)},getColumnNear:function(t,e,n,r){let i=Math.min(n,r),s=Math.max(n,r);i>e&&(s=i,i=e-(i-e)),s=s)return a-6;1===c?c=-1:(c=1,o+=6)}return e},getRowNear:function(t,e,n,r){let i=Math.min(n,r),s=Math.max(n,r);i>e&&(s=i,i=e-(i-e)),s=s)return a-6;1===c?c=-1:(c=1,o+=6)}return e},getEndDirection:function(t){let e=t.getEndPoint(),n=t.getTarget().getParent().getBoundingBox();return this.getDirection(n,e)},getStartDirection:function(t){let e=t.getStartPoint(),n=t.getSource().getParent().getBoundingBox();return this.getDirection(n,e)},getDirection:function(t,e){let n=Math.abs(t.y-e.y),r=Math.abs(t.x-e.x),i=this.LEFT;return n<=r&&(r=n,i=this.UP),n=Math.abs(t.getBottom()-e.y),n<=r&&(r=n,i=this.DOWN),n=Math.abs(t.getRight()-e.x),nt.x&&e.y>=t.y&&e.y<=t.y+t.h&&(null===i||t.x>i.getBoundingBox().x)&&(i=s):a.RIGHT.equals(n)?e.x=t.y&&e.y<=t.y+t.h&&(null==i||t.xt.y&&e.x>=t.x&&e.x<=t.x+t.w&&(null===i||t.y>i.getBoundingBox().y)&&(i=s):a.DOWN.equals(n)&&e.y=t.x&&e.x<=t.x+t.w&&(null===i||t.y{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.RubberbandRouter=i.default.layout.connection.ConnectionRouter.extend({NAME:"draw2d.layout.connection.RubberbandRouter",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},invalidate:function(){},route:function(t,e){let n=10,r=t.getStartPoint(),s=t.getEndPoint(),a=s.subtract(r),o=a.clone(),c=a.length(),l=1-Math.min(.75,.002*c),h=r.lerp(s,.25*l),u=r.lerp(s,.5),d=r.lerp(s,1-.25*l);n=Math.max(5,n*l),a.x=a.x/c*n,a.y=a.y/c*n,o.x=o.x/c*(n*l),o.y=o.y/c*(n*l);let p=new i.default.geo.Point(-a.y+r.x,a.x+r.y),f=new i.default.geo.Point(a.y+r.x,-a.x+r.y),g=new i.default.geo.Point(-o.y+h.x,o.x+h.y),m=new i.default.geo.Point(o.y+h.x,-o.x+h.y),y=new i.default.geo.Point(-o.y+u.x,o.x+u.y),x=new i.default.geo.Point(o.y+u.x,-o.x+u.y),v=new i.default.geo.Point(-o.y+d.x,o.x+d.y),b=new i.default.geo.Point(o.y+d.x,-o.x+d.y),w=new i.default.geo.Point(-a.y+s.x,a.x+s.y),C=new i.default.geo.Point(a.y+s.x,-a.x+s.y);t.addPoint(r),t.addPoint(s);let M=["M",p.x,",",p.y];M.push("A",n,",",n,"0 0 1 ",f.x,",",f.y),M.push("C",f.x,",",f.y,m.x,",",m.y,x.x,",",x.y),M.push("C",x.x,",",x.y,b.x,",",b.y,C.x,",",C.y),M.push("A",n,",",n,"0 0 1",w.x,",",w.y),M.push("C",w.x,",",w.y,v.x,",",v.y,y.x,",",y.y),M.push("C",y.x,",",y.y,g.x,",",g.y,p.x,",",p.y),t.svgPathString=M.join(" ")}})},"./src/layout/connection/SketchConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.SketchConnectionRouter=i.default.layout.connection.MazeConnectionRouter.extend({NAME:"draw2d.layout.connection.SketchConnectionRouter",init:function(){this._super(),this.useSpline=!0,this.useShift=5,this.useSimplifyValue=.2,this.finder=new PF.JumpPointFinder({allowDiagonal:!1,dontCrossCorners:!0})},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)}})},"./src/layout/connection/SplineConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.SplineConnectionRouter=i.default.layout.connection.ManhattanConnectionRouter.extend({NAME:"draw2d.layout.connection.SplineConnectionRouter",init:function(){this._super(),this.spline=new i.default.util.spline.CubicSpline,this.MINDIST=50},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},route:function(t,e){let n,r=t.getStartPoint(),s=t.getSource().getConnectionDirection(t.getTarget()),a=t.getEndPoint(),o=t.getTarget().getConnectionDirection(t.getSource());this._route(t,a,o,r,s);let c=t.getVertices();c.getSize()<2&&t.addPoint(r),t.oldPoint=null,t.lineSegments=new i.default.util.ArrayList,t.vertices=new i.default.util.ArrayList,this.spline.generate(c,8).each(((e,n)=>{t.addPoint(n)})),c=t.getVertices();let l=c.getSize(),h=c.get(0),u=["M",h.x.toFixed(2)," ",h.y.toFixed(2)];for(n=1;n{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.VertexRouter=i.default.layout.connection.ConnectionRouter.extend({NAME:"draw2d.layout.connection.VertexRouter",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.VertexSelectionFeedbackPolicy)},invalidate:function(){},route:function(t,e){let n=e.oldVertices.getSize();for(let r=0;r=n)&&n>=2},getPersistentAttributes:function(t,e){return e.vertex=[],t.getVertices().each((function(t,n){e.vertex.push({x:n.x,y:n.y})})),e},setPersistentAttributes:function(t,e){Array.isArray(e.vertex)&&e.vertex.length>1&&(t.oldPoint=null,t.lineSegments=new i.default.util.ArrayList,t.setVertices(e.vertex))},onDrag:function(t,e,n,r,i){let s=t.getVertices().getSize()-1;for(let e=1;e{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.BottomLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.BottomLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent(),r=n.getBoundingBox(),s=n instanceof i.default.Port?r.w/2:0,a=e.getBoundingBox();e instanceof i.default.Port?e.setPosition(r.w/2-s,r.h):e.setPosition(r.w/2-a.w/2-s,2+r.h)}})},"./src/layout/locator/CenterLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.CenterLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.CenterLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent().getBoundingBox();if(e instanceof i.default.Port)e.setPosition(n.w/2,n.h/2);else{let t=e.getBoundingBox();e.setPosition(.5+(n.w/2-t.w/2|0),.5+(n.h/2-t.h/2|0))}}})},"./src/layout/locator/ConnectionLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.ConnectionLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.ConnectionLocator",init:function(t,e,n){this._super(t,e,n)}})},"./src/layout/locator/DraggableLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.DraggableLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.DraggableLocator",init:function(t,e,n){this._super(t,e,n)},bind:function(t,e){e.setSelectionAdapter((()=>e))},unbind:function(t,e){e.setSelectionAdapter(null)}})},"./src/layout/locator/InputPortLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.InputPortLocator=i.default.layout.locator.PortLocator.extend({NAME:"draw2d.layout.locator.InputPortLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent(),r=1,i=this.NAME,s=1;n.getPorts().each(((t,n)=>{s=n===e?r:s,r+=n.getLocator().NAME===i?1:0})),this.applyConsiderRotation(e,0,n.getHeight()/r*s)}})},"./src/layout/locator/LeftLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.LeftLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.LeftLocator",init:function(t,e,n){this._super(t,e,n),this.margin=t&&"margin"in t?t.margin:5},relocate:function(t,e){let n=e.getParent(),r=n.getBoundingBox(),s=n instanceof i.default.Port?r.h/2:0;if(e instanceof i.default.Port)e.setPosition(0,r.h/2-s);else{let t=e.getBoundingBox();e.setPosition(-t.w-this.margin,r.h/2-t.h/2-s)}}})},"./src/layout/locator/Locator.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.layout.locator.Locator=Class.extend({NAME:"draw2d.layout.locator.Locator",init:function(t,e,n){this.setterWhitelist={...e},this.getterWhitelist={...n},this.attr(t)},attr:function(t,e){let n=this;if($.isPlainObject(t))for(let e in t){let n=this.setterWhitelist[e],r=t[e];n&&void 0!==r&&n.call(this,r)}else if("string"==typeof t){if(void 0===e){let e=this.getterWhitelist[t];return"function"==typeof e?e.call(this):void 0}"function"==typeof e&&(e=e());let n=this.setterWhitelist[t];n&&n.call(this,e)}else{if(Array.isArray(t))return Object.assign({},...Object.keys(t).map((t=>({[t]:n.attr(t)}))));if(void 0===t){let t={};for(let e in this.getterWhitelist)t[e]=this.getterWhitelist[e].call(this);return t}}return this},bind:function(t,e){return e.setDraggable(!1),e.setSelectable(!1),this},unbind:function(t,e){return this},relocate:function(t,e){e.repaint()},clone:function(){return Function(`return new ${this.NAME}()`)()}})},"./src/layout/locator/ManhattanMidpointLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.ManhattanMidpointLocator=i.default.layout.locator.ConnectionLocator.extend({NAME:"draw2d.layout.locator.ManhattanMidpointLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent().getVertices(),r=Math.floor((n.getSize()-2)/2);if(n.getSize()<=r+1)return;let i=n.get(r),s=n.get(r+1);e.setPosition((s.x-i.x)/2+i.x-e.getWidth()/2|0,(s.y-i.y)/2+i.y-e.getHeight()/2|0)}})},"./src/layout/locator/OutputPortLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.OutputPortLocator=i.default.layout.locator.PortLocator.extend({NAME:"draw2d.layout.locator.OutputPortLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent(),r=1,i=this.NAME,s=1;n.getPorts().each(((t,n)=>{s=n===e?r:s,r+=n.getLocator().NAME===i?1:0})),this.applyConsiderRotation(e,n.getWidth(),n.getHeight()/r*s)}})},"./src/layout/locator/ParallelMidpointLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.ParallelMidpointLocator=i.default.layout.locator.ConnectionLocator.extend({NAME:"draw2d.layout.locator.ParallelMidpointLocator",init:function(t,e,n){this.distance=0,this._super({distance:-5,...t},{x:this.setDistance,...e},{distance:this.getDistance,...n})},setDistance:function(t){return this.distance=t,this},getDistance:function(){return this.distance},relocate:function(t,e){let n=e.getParent().getVertices(),r=Math.floor((n.getSize()-2)/2);if(n.getSize()<=r+1)return;let i=n.get(r),s=n.get(r+1),a=this.distance<=0?this.distance-e.getHeight():this.distance,o=i.x-s.x,c=i.y-s.y,l=Math.sqrt(o*o+c*c),h=-Math.asin(c/l),u=180/Math.PI*h;h<0?s.x{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.PolylineMidpointLocator=i.default.layout.locator.ManhattanMidpointLocator.extend({NAME:"draw2d.layout.locator.PolylineMidpointLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){var n=e.getParent().getVertices();if(n.getSize()%2==0)this._super(t,e);else{t=Math.floor(n.getSize()/2);var r=n.get(t);e.setPosition(r.x-e.getWidth()/2,r.y-e.getHeight()/2)}}})},"./src/layout/locator/PortLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.PortLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.PortLocator",init:function(t,e,n){this._super(t,e,n)},applyConsiderRotation:function(t,e,n){let r=t.getParent(),i=r.getWidth()/2,s=r.getHeight()/2,a=r.getRotationAngle(),o=Raphael.matrix();if(o.rotate(a,i,s),90===a||270===a){let t=r.getHeight()/r.getWidth();o.scale(t,1/t,i,s)}t.setPosition(o.x(e,n),o.y(e,n))}})},"./src/layout/locator/RightLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.RightLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.RightLocator",init:function(t,e,n){this._super(t,e,n),this.margin=t&&"margin"in t?t.margin:5},relocate:function(t,e){var n=e.getParent(),r=n.getBoundingBox(),s=n instanceof i.default.Port?r.h/2:0;if(e instanceof i.default.Port)e.setPosition(r.w,r.h/2-s);else{var a=e.getBoundingBox();e.setPosition(r.w+this.margin,r.h/2-a.h/2-s)}}})},"./src/layout/locator/SmartDraggableLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.SmartDraggableLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.SmartDraggableLocator",init:function(t,e,n){this._super(t,e,n),this.boundedCorners={init:!1,parent:0,child:0,dist:Number.MAX_SAFE_INTEGER,xOffset:0,yOffset:0}},bind:function(t,e){let n=this,r=function(){n.boundedCorners={init:!1,parent:0,child:0,dist:Number.MAX_SAFE_INTEGER,xOffset:0,yOffset:0};let t,r,i,s,a,o=e.getParent().getBoundingBox().getVertices(),c=e.getBoundingBox().getVertices();for(t=0;te)),e.getParent().on("added",r),e.on("dragend",r)},unbind:function(t,e){e.setSelectionAdapter(null)},relocate:function(t,e){if(this._super(t,e),!0===this.boundedCorners.init){let t=e.getParent().getBoundingBox().getVertices(),n=e.getBoundingBox().getVertices(),r=t.get(this.boundedCorners.parent),i=n.get(this.boundedCorners.child),s=r.x-i.x,a=r.y-i.y;e.translate(s-this.boundedCorners.xOffset,a-this.boundedCorners.yOffset)}}})},"./src/layout/locator/TopLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.TopLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.TopLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent(),r=n.getBoundingBox(),s=n instanceof i.default.Port?r.w/2:0,a=e.getBoundingBox();e instanceof i.default.Port?e.setPosition(r.w/2-s,0):e.setPosition(r.w/2-a.w/2-s,-(a.h+2))}})},"./src/layout/locator/XYAbsPortLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.XYAbsPortLocator=i.default.layout.locator.PortLocator.extend({NAME:"draw2d.layout.locator.XYAbsPortLocator",init:function(t,e,n){this.x=0,this.y=0,this._super(t,{x:this.setX,y:this.setY,...e},{x:this.getX,y:this.getY,...n})},setX:function(t){this.x=t},setY:function(t){this.y=t},getX:function(){return this.x},getY:function(){return this.y},relocate:function(t,e){this.applyConsiderRotation(e,this.x,this.y)}})},"./src/layout/locator/XYRelPortLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.XYRelPortLocator=i.default.layout.locator.PortLocator.extend({NAME:"draw2d.layout.locator.XYRelPortLocator",init:function(t,e,n){"number"==typeof t&&"number"==typeof e?(this.x=t,this.y=e,this._super()):(this.x=0,this.y=0,this._super(t,{x:this.setX,y:this.setY,...e},{x:this.getX,y:this.getY,...n}))},setX:function(t){this.x=t},setY:function(t){this.y=t},getX:function(){return this.x},getY:function(){return this.y},relocate:function(t,e){let n=e.getParent();this.applyConsiderRotation(e,n.getWidth()/100*this.x,n.getHeight()/100*this.y)}})},"./src/layout/mesh/ExplodeLayouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.mesh.ExplodeLayouter=i.default.layout.mesh.MeshLayouter.extend({MIN_MARGIN:40,init:function(){},add:function(t,e){var n=[];n[0]={x:0,y:0},n[1]={x:0,y:0},n[2]={x:0,y:0},n[3]={x:0,y:0},n[4]={x:0,y:0},n[5]={x:0,y:0},n[6]={x:0,y:0},n[7]={x:0,y:0},n[8]={x:0,y:0};var r=e.getBoundingBox(),s=t.getFigures(),a=null,o=0,c=null,l=0;for(l=0;l=r+s?6:7:a>=n+i?o+l<=r?2:o>=r+s?4:3:o+l<=r?1:o>=r+s?5:8}})},"./src/layout/mesh/MeshLayouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.mesh.MeshLayouter=Class.extend({init:function(){},add:function(t,e){return new i.default.util.ArrayList}})},"./src/layout/mesh/ProposedMeshChange.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.layout.mesh.ProposedMeshChange=Class.extend({init:function(t,e,n){this.figure=t,this.x=e,this.y=n},getFigure:function(){return this.figure},getX:function(){return this.x},getY:function(){return this.y}})},"./src/lib/jquery.autoresize.js":()=>{"use strict";!function(t){var e="ar"+ +new Date;n.defaults={onResize:function(){},onBeforeResize:function(){return 123},onAfterResize:function(){return 555},animate:{duration:200,complete:function(){}},extraSpace:50,minHeight:"original",maxHeight:500,minWidth:"original",maxWidth:500};function n(e){return this.filter(n.resizableFilterSelector).each((function(){new r(t(this),e)})),this}function r(e,r){var i;e.data("AutoResizer")&&e.data("AutoResizer").destroy(),r=this.config=t.extend({},n.defaults,r),this.el=e,this.nodeName=e[0].nodeName.toLowerCase(),this.originalHeight=e.height(),this.previousScrollTop=null,this.value=e.val(),"original"===r.maxWidth&&(r.maxWidth=e.width()),"original"===r.minWidth&&(r.minWidth=e.width()),"original"===r.maxHeight&&(r.maxHeight=e.height()),"original"===r.minHeight&&(r.minHeight=e.height()),"textarea"===this.nodeName&&e.css({resize:"none",overflowY:"hidden"}),e.data("AutoResizer",this),r.animate.complete=(i=r.animate.complete,function(){return r.onAfterResize.call(e),i.apply(this,arguments)}),this.bind()}n.cloneCSSProperties=["lineHeight","textDecoration","letterSpacing","fontSize","fontFamily","fontStyle","fontWeight","textTransform","textAlign","direction","wordSpacing","fontSizeAdjust","paddingTop","paddingLeft","paddingBottom","paddingRight","width"],n.cloneCSSValues={position:"absolute",top:-9999,left:-9999,opacity:0,overflow:"hidden"},n.resizableFilterSelector=["textarea:not(textarea."+e+")","input:not(input[type])","input[type=text]","input[type=password]","input[type=email]","input[type=url]"].join(","),n.AutoResizer=r,t.fn.autoResize=n,r.prototype={bind:function(){var e=t.proxy((function(){return this.check(),!0}),this);this.unbind(),this.el.bind("keyup.autoResize",e).bind("change.autoResize",e).bind("paste.autoResize",(function(){setTimeout((function(){e()}),0)})),this.el.is(":hidden")||this.check(null,!0)},unbind:function(){this.el.unbind(".autoResize")},createClone:function(){var r=this.el,i="textarea"===this.nodeName?r.clone():t("");this.clone=i,t.each(n.cloneCSSProperties,(function(t,e){i[0].style[e]=r.css(e)})),i.removeAttr("name").removeAttr("id").addClass(e).attr("tabIndex",-1).css(n.cloneCSSValues),"textarea"===this.nodeName?i.height("auto"):i.width("auto").css({whiteSpace:"nowrap"})},check:function(t,e){this.clone||(this.createClone(),this.injectClone());var n=this.config,r=this.clone,i=this.el,s=i.val();if(s===this.prevValue)return!0;if(this.prevValue=s,"input"!==this.nodeName){r.width(i.width()).height(0).val(s).scrollTop(1e4);var a=r[0].scrollTop;if(s){if(this.previousScrollTop===a)return;this.previousScrollTop=a,a+n.extraSpace>=n.maxHeight?(i.css("overflowY",""),a=n.maxHeight,e=!0):a+n.extraSpace<=n.minHeight?a=n.minHeight:(i.css("overflowY","hidden"),a+=n.extraSpace)}else a=n.minHeight,this.previousScrollTop=null;n.onBeforeResize.call(i),n.onResize.call(i),n.animate&&!e?i.stop(1,1).animate({height:a},n.animate):(i.height(a),n.onAfterResize.call(i))}else{r.text(s);var o=r.width(),c=o+n.extraSpace>=n.minWidth?o+n.extraSpace:n.minWidth,l=i.width();((c=Math.min(c,n.maxWidth))=n.minWidth||c>=n.minWidth&&c<=n.maxWidth)&&(n.onBeforeResize.call(i),n.onResize.call(i),i.scrollLeft(0),n.animate&&!e?i.stop(1,1).animate({width:c},n.animate):(i.width(c),n.onAfterResize.call(i)))}},destroy:function(){this.unbind(),this.el.removeData("AutoResizer"),this.clone.remove(),delete this.el,delete this.clone},injectClone:function(){(n.cloneContainer||(n.cloneContainer=t("").appendTo("body"))).append(this.clone)}}}(jQuery)},"./src/lib/jquery.contextmenu.js":()=>{"use strict";!function(t,e){if(t.support.htmlMenuitem="HTMLMenuItemElement"in window,t.support.htmlCommand="HTMLCommandElement"in window,t.support.eventSelectstart="onselectstart"in document.documentElement,!t.ui||!t.ui.widget){var n=t.cleanData;t.cleanData=function(e){for(var r,i=0;null!=(r=e[i]);i++)try{t(r).triggerHandler("remove")}catch(t){}n(e)}}var r=null,i=!1,s=t(window),a=0,o={},c={},l={},h={selector:null,appendTo:null,trigger:"right",autoHide:!1,delay:200,reposition:!1,determinePosition:function(e){if(t.ui&&t.ui.position)e.css("display","block").position({my:"center top",at:"center bottom",of:this,offset:"0 5",collision:"fit"}).css("display","none");else{var n=this.offset();n.top+=this.outerHeight(),n.left+=this.outerWidth()/2-e.outerWidth()/2,e.css(n)}},position:function(t,e,n){var r;if(e||n){r="maintain"===e&&"maintain"===n?t.$menu.position():{top:n,left:e};var i=s.scrollTop()+s.height(),a=s.scrollLeft()+s.width(),o=t.$menu.height(),c=t.$menu.width();r.top+o>i&&(r.top-=o),r.left+c>a&&(r.left-=c),t.$menu.css(r)}else t.determinePosition.call(this,t.$menu)},positionSubmenu:function(e){if(t.ui&&t.ui.position)e.css("display","block").position({my:"left top",at:"right top",of:this,collision:"flipfit fit"}).css("display","");else{var n={top:0,left:this.outerWidth()};e.css(n)}},zIndex:1,animation:{duration:50,show:"slideDown",hide:"slideUp"},events:{show:t.noop,hide:t.noop},callback:null,items:{}},u={timer:null,pageX:null,pageY:null},d={abortevent:function(t){t.preventDefault(),t.stopImmediatePropagation()},contextmenu:function(e){var n=t(this);if(e.preventDefault(),e.stopImmediatePropagation(),!("right"!=e.data.trigger&&e.originalEvent||n.hasClass("context-menu-active")||n.hasClass("context-menu-disabled"))){if(r=n,e.data.build){var i=e.data.build(r,e);if(!1===i)return;if(e.data=t.extend(!0,{},h,e.data,i||{}),!e.data.items||t.isEmptyObject(e.data.items))throw window.console&&(console.error||console.log)("No items specified to show in contextMenu"),new Error("No Items sepcified");e.data.$trigger=r,p.create(e.data)}p.show.call(n,e.data,e.pageX,e.pageY)}},click:function(e){e.preventDefault(),e.stopImmediatePropagation(),t(this).trigger(t.Event("contextmenu",{data:e.data,pageX:e.pageX,pageY:e.pageY}))},mousedown:function(e){var n=t(this);r&&r.length&&!r.is(n)&&r.data("contextMenu").$menu.trigger("contextmenu:hide"),2==e.button&&(r=n.data("contextMenuActive",!0))},mouseup:function(e){var n=t(this);n.data("contextMenuActive")&&r&&r.length&&r.is(n)&&!n.hasClass("context-menu-disabled")&&(e.preventDefault(),e.stopImmediatePropagation(),r=n,n.trigger(t.Event("contextmenu",{data:e.data,pageX:e.pageX,pageY:e.pageY}))),n.removeData("contextMenuActive")},mouseenter:function(e){var n=t(this),i=t(e.relatedTarget),s=t(document);i.is(".context-menu-list")||i.closest(".context-menu-list").length||r&&r.length||(u.pageX=e.pageX,u.pageY=e.pageY,u.data=e.data,s.on("mousemove.contextMenuShow",d.mousemove),u.timer=setTimeout((function(){u.timer=null,s.off("mousemove.contextMenuShow"),r=n,n.trigger(t.Event("contextmenu",{data:u.data,pageX:u.pageX,pageY:u.pageY}))}),e.data.delay))},mousemove:function(t){u.pageX=t.pageX,u.pageY=t.pageY},mouseleave:function(e){var n=t(e.relatedTarget);if(!n.is(".context-menu-list")&&!n.closest(".context-menu-list").length){try{clearTimeout(u.timer)}catch(e){}u.timer=null}},layerClick:function(e){var n,r,i=t(this).data("contextMenuRoot"),a=e.button,o=e.pageX,c=e.pageY;e.preventDefault(),e.stopImmediatePropagation(),setTimeout((function(){var l,h="left"==i.trigger&&0===a||"right"==i.trigger&&2===a;if(document.elementFromPoint&&(i.$layer.hide(),n=document.elementFromPoint(o-s.scrollLeft(),c-s.scrollTop()),i.$layer.show()),i.reposition&&h)if(document.elementFromPoint){if(i.$trigger.is(n)||i.$trigger.has(n).length)return void i.position.call(i.$trigger,i,o,c)}else if(r=i.$trigger.offset(),l=t(window),r.top+=l.scrollTop(),r.top<=e.pageY&&(r.left+=l.scrollLeft(),r.left<=e.pageX&&(r.bottom=r.top+i.$trigger.outerHeight(),r.bottom>=e.pageY&&(r.right=r.left+i.$trigger.outerWidth(),r.right>=e.pageX))))return void i.position.call(i.$trigger,i,o,c);n&&h&&i.$trigger.one("contextmenu:hidden",(function(){t(n).contextMenu({x:o,y:c})})),i.$menu.trigger("contextmenu:hide")}),50)},keyStop:function(t,e){e.isInput||t.preventDefault(),t.stopPropagation()},key:function(t){var e=r.data("contextMenu")||{};switch(t.keyCode){case 9:case 38:if(d.keyStop(t,e),e.isInput){if(9==t.keyCode&&t.shiftKey)return t.preventDefault(),e.$selected&&e.$selected.find("input, textarea, select").blur(),void e.$menu.trigger("prevcommand");if(38==t.keyCode&&"checkbox"==e.$selected.find("input, textarea, select").prop("type"))return void t.preventDefault()}else if(9!=t.keyCode||t.shiftKey)return void e.$menu.trigger("prevcommand");case 40:if(d.keyStop(t,e),!e.isInput)return void e.$menu.trigger("nextcommand");if(9==t.keyCode)return t.preventDefault(),e.$selected&&e.$selected.find("input, textarea, select").blur(),void e.$menu.trigger("nextcommand");if(40==t.keyCode&&"checkbox"==e.$selected.find("input, textarea, select").prop("type"))return void t.preventDefault();break;case 37:if(d.keyStop(t,e),e.isInput||!e.$selected||!e.$selected.length)break;if(!e.$selected.parent().hasClass("context-menu-root")){var n=e.$selected.parent().parent();return e.$selected.trigger("contextmenu:blur"),void(e.$selected=n)}break;case 39:if(d.keyStop(t,e),e.isInput||!e.$selected||!e.$selected.length)break;var i=e.$selected.data("contextMenu")||{};if(i.$menu&&e.$selected.hasClass("context-menu-submenu"))return e.$selected=null,i.$selected=null,void i.$menu.trigger("nextcommand");break;case 35:case 36:return e.$selected&&e.$selected.find("input, textarea, select").length?void 0:((e.$selected&&e.$selected.parent()||e.$menu).children(":not(.disabled, .not-selectable)")[36==t.keyCode?"first":"last"]().trigger("contextmenu:focus"),void t.preventDefault());case 13:if(d.keyStop(t,e),e.isInput){if(e.$selected&&!e.$selected.is("textarea, select"))return void t.preventDefault();break}return void(e.$selected&&e.$selected.trigger("mouseup"));case 32:case 33:case 34:return void d.keyStop(t,e);case 27:return d.keyStop(t,e),void e.$menu.trigger("contextmenu:hide");default:var s=String.fromCharCode(t.keyCode).toUpperCase();if(e.accesskeys[s])return void e.accesskeys[s].$node.trigger(e.accesskeys[s].$menu?"contextmenu:focus":"mouseup")}t.stopPropagation(),e.$selected&&e.$selected.trigger(t)},prevItem:function(e){e.stopPropagation();var n=t(this).data("contextMenu")||{};if(n.$selected){var r=n.$selected;(n=n.$selected.parent().data("contextMenu")||{}).$selected=r}for(var i=n.$menu.children(),s=n.$selected&&n.$selected.prev().length?n.$selected.prev():i.last(),a=s;s.hasClass("disabled")||s.hasClass("not-selectable");)if((s=s.prev().length?s.prev():i.last()).is(a))return;n.$selected&&d.itemMouseleave.call(n.$selected.get(0),e),d.itemMouseenter.call(s.get(0),e);var o=s.find("input, textarea, select");o.length&&o.focus()},nextItem:function(e){e.stopPropagation();var n=t(this).data("contextMenu")||{};if(n.$selected){var r=n.$selected;(n=n.$selected.parent().data("contextMenu")||{}).$selected=r}for(var i=n.$menu.children(),s=n.$selected&&n.$selected.next().length?n.$selected.next():i.first(),a=s;s.hasClass("disabled")||s.hasClass("not-selectable");)if((s=s.next().length?s.next():i.first()).is(a))return;n.$selected&&d.itemMouseleave.call(n.$selected.get(0),e),d.itemMouseenter.call(s.get(0),e);var o=s.find("input, textarea, select");o.length&&o.focus()},focusInput:function(e){var n=t(this).closest(".context-menu-item"),r=n.data(),i=r.contextMenu,s=r.contextMenuRoot;s.$selected=i.$selected=n,s.isInput=i.isInput=!0},blurInput:function(e){var n=t(this).closest(".context-menu-item").data(),r=n.contextMenu;n.contextMenuRoot.isInput=r.isInput=!1},menuMouseenter:function(e){var n=t(this).data().contextMenuRoot;n&&(n.hovering=!0)},menuMouseleave:function(e){var n=t(this).data().contextMenuRoot;n&&n.$layer&&n.$layer.is(e.relatedTarget)&&(n.hovering=!1)},itemMouseenter:function(e){var n=t(this),r=n.data(),i=r.contextMenu,s=r.contextMenuRoot;s&&(s.hovering=!0,e&&s.$layer&&s.$layer.is(e.relatedTarget)&&(e.preventDefault(),e.stopImmediatePropagation()),(i.$menu?i:s).$menu.children(".hover").trigger("contextmenu:blur"),n.hasClass("disabled")||n.hasClass("not-selectable")?i.$selected=null:n.trigger("contextmenu:focus"))},itemMouseleave:function(e){var n=t(this),r=n.data(),i=r.contextMenu,s=r.contextMenuRoot;if(s&&s!==i&&s.$layer&&s.$layer.is(e.relatedTarget))return s.$selected&&s.$selected.trigger("contextmenu:blur"),e.preventDefault(),e.stopImmediatePropagation(),void(s.$selected=i.$selected=i.$node);n.trigger("contextmenu:blur")},itemClick:function(e){var n,r=t(this),i=r.data(),s=i.contextMenu,a=i.contextMenuRoot,o=i.contextMenuKey;if(s.items[o]&&!r.is(".disabled, .context-menu-submenu, .context-menu-separator, .not-selectable")){if(e.preventDefault(),e.stopImmediatePropagation(),t.isFunction(a.callbacks[o])&&Object.prototype.hasOwnProperty.call(a.callbacks,o))n=a.callbacks[o];else{if(!t.isFunction(a.callback))return;n=a.callback}!1!==n.call(a.$trigger,o,a)?a.$menu.trigger("contextmenu:hide"):a.$menu.parent().length&&p.update.call(a.$trigger,a)}},inputClick:function(t){t.stopImmediatePropagation()},hideMenu:function(e,n){var r=t(this).data("contextMenuRoot");p.hide.call(r.$trigger,r,n&&n.force)},focusItem:function(e){e.stopPropagation();var n=t(this),r=n.data(),i=r.contextMenu,s=r.contextMenuRoot;n.addClass("hover").siblings(".hover").trigger("contextmenu:blur"),i.$selected=s.$selected=n,i.$node&&s.positionSubmenu.call(i.$node,i.$menu)},blurItem:function(e){e.stopPropagation();var n=t(this),r=n.data().contextMenu;n.removeClass("hover"),r&&(r.$selected=null)}},p={show:function(e,n,i){var s=t(this),a={};t("#context-menu-layer").trigger("mousedown"),e.$trigger=s,!1!==e.events.show.call(s,e)?(p.update.call(s,e),e.position.call(s,e,n,i),e.zIndex&&(a.zIndex=function(t){for(var e=0,n=t;e=Math.max(e,parseInt(n.css("z-index"),10)||0),(n=n.parent())&&n.length&&!("html body".indexOf(n.prop("nodeName").toLowerCase())>-1););return e}(s)+e.zIndex),p.layer.call(e.$menu,e,a.zIndex),e.$menu.find("ul").css("zIndex",a.zIndex+1),e.$menu.css(a)[e.animation.show](e.animation.duration,(function(){s.trigger("contextmenu:visible")})),s.data("contextMenu",e).addClass("context-menu-active"),t(document).off("keydown.contextMenu").on("keydown.contextMenu",d.key),e.autoHide&&t(document).on("mousemove.contextMenuAutoHide",(function(t){var n=s.offset();n.right=n.left+s.outerWidth(),n.bottom=n.top+s.outerHeight(),!e.$layer||e.hovering||t.pageX>=n.left&&t.pageX<=n.right&&t.pageY>=n.top&&t.pageY<=n.bottom||e.$menu.trigger("contextmenu:hide")}))):r=null},hide:function(n,i){var s=t(this);if(n||(n=s.data("contextMenu")||{}),i||!n.events||!1!==n.events.hide.call(s,n)){if(s.removeData("contextMenu").removeClass("context-menu-active"),n.$layer){setTimeout((a=n.$layer,function(){a.remove()}),10);try{delete n.$layer}catch(t){n.$layer=null}}var a;r=null,n.$menu.find(".hover").trigger("contextmenu:blur"),n.$selected=null,t(document).off(".contextMenuAutoHide").off("keydown.contextMenu"),n.$menu&&n.$menu[n.animation.hide](n.animation.duration,(function(){n.build&&(n.$menu.remove(),t.each(n,(function(t,r){switch(t){case"ns":case"selector":case"build":case"trigger":return!0;default:n[t]=e;try{delete n[t]}catch(t){}return!0}}))),setTimeout((function(){s.trigger("contextmenu:hidden")}),10)}))}},create:function(n,r){r===e&&(r=n),n.$menu=t('
    ').addClass(n.className||"").data({contextMenu:n,contextMenuRoot:r}),t.each(["callbacks","commands","inputs"],(function(t,e){n[e]={},r[e]||(r[e]={})})),r.accesskeys||(r.accesskeys={}),t.each(n.items,(function(e,i){var s=t('
  • ').addClass(i.className||""),a=null,o=null;if(s.on("click",t.noop),"string"!=typeof i&&(i.$node=s.data({contextMenu:n,contextMenuRoot:r,contextMenuKey:e})),i.accesskey)for(var c,h=function(t){for(var e,n=t.split(/\s+/),r=[],i=0;e=n[i];i++)e=e[0].toUpperCase(),r.push(e);return r}(i.accesskey),u=0;c=h[u];u++)if(!r.accesskeys[c]){r.accesskeys[c]=i,i._name=i.name.replace(new RegExp("("+c+")","i"),'$1');break}if("string"==typeof i)s.addClass("context-menu-separator not-selectable");else if(i.type&&l[i.type])l[i.type].call(s,i,n,r),t.each([n,r],(function(n,r){r.commands[e]=i,t.isFunction(i.callback)&&(r.callbacks[e]=i.callback)}));else{switch("html"==i.type?s.addClass("context-menu-html not-selectable"):i.type?(a=t("").appendTo(s),t("").html(i._name||i.name).appendTo(a),s.addClass("context-menu-input"),n.hasTypes=!0,t.each([n,r],(function(t,n){n.commands[e]=i,n.inputs[e]=i}))):i.items&&(i.type="sub"),i.type){case"text":o=t('').attr("name","context-menu-input-"+e).val(i.value||"").appendTo(a);break;case"textarea":o=t('').attr("name","context-menu-input-"+e).val(i.value||"").appendTo(a),i.height&&o.height(i.height);break;case"checkbox":o=t('').attr("name","context-menu-input-"+e).val(i.value||"").prop("checked",!!i.selected).prependTo(a);break;case"radio":o=t('').attr("name","context-menu-input-"+i.radio).val(i.value||"").prop("checked",!!i.selected).prependTo(a);break;case"select":o=t(''),this.html.val(t.getText()),this.html.hide(),$("body").append(this.html),this.html.autoResize(),this.html.bind("keyup",function(t){switch(t.which){case 13:this.commit();break;case 27:this.cancel()}}.bind(this)),this.html.bind("blur",this.commitCallback),this.html.bind("click",(function(t){t.stopPropagation(),t.preventDefault()}));var e=this.label.getCanvas(),n=this.label.getBoundingBox();n.setPosition(e.fromCanvasToDocumentCoordinate(n.x,n.y)),e.getScrollArea().is($("body"))&&n.translate(e.getScrollLeft(),e.getScrollTop()),n.translate(-1,-1),n.resize(2,2),this.html.css({position:"absolute",top:n.y,left:n.x,"min-width":n.w*(1/e.getZoom()),height:Math.max(25,n.h*(1/e.getZoom()))}),this.html.fadeIn((()=>{this.html.focus(),this.listener.onStart()}))},commit:function(){this.html.unbind("blur",this.commitCallback),$("body").unbind("click",this.commitCallback);var t=this.html.val(),e=new r.default.command.CommandAttr(this.label,{text:t});this.label.getCanvas().getCommandStack().execute(e),this.html.fadeOut((()=>{this.html.remove(),this.html=null,this.listener.onCommit(this.label.getText())}))},cancel:function(){this.html.unbind("blur",this.commitCallback),$("body").unbind("click",this.commitCallback),this.html.fadeOut((()=>{this.html.remove(),this.html=null,this.listener.onCancel()}))}})},"./src/util/ArrayList.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.ArrayList=Class.extend({init:function(t){Array.isArray(t)?this.data=t:this.data=[]},clear:function(){return this.data=[],this},reverse:function(){return this.data.reverse(),this},getSize:function(){return this.data.length},isEmpty:function(){return 0===this.getSize()},last:function(){return this.data[this.data.length-1]},asArray:function(){return this.data},first:function(){return this.data.length>0?this.data[0]:null},get:function(t){return this.data[t]},add:function(...t){return this.data.push(...t),this},grep:function(t){return this.data=this.data.filter(t),this},find:function(t){return this.data.find(t)},map:function(t){return this.data=this.data.map(t),this},unique:function(){return this.data=this.data.filter(((t,e,n)=>n.indexOf(t)===e)),this},addAll:function(t,e){if(!(t instanceof i.default.util.ArrayList))throw"Unable to handle unknown object type in ArrayList.addAll";return this.data=this.data.concat(t.data),e&&this.unique(),this},pop:function(){return this.removeElementAt(this.data.length-1)},push:function(t){this.add(t)},remove:function(t){let e=this.indexOf(t);return e>=0?this.removeElementAt(e):null},insertElementAt:function(t,e){return this.data.splice(e,0,t),this},removeElementAt:function(t){let e=this.data[t];return this.data.splice(t,1),e},removeAll:function(t){return t instanceof i.default.util.ArrayList&&(t=t.data),Array.isArray(t)&&t.forEach((t=>{this.remove(t)})),this},indexOf:function(t){return this.data.indexOf(t)},contains:function(t){return this.data.includes(t)},sort:function(t){return"function"==typeof t?this.data.sort(t):this.data.sort((function(e,n){return e[t]n[t]?1:0})),this},clone:function(t){let e=new i.default.util.ArrayList;if(t)for(let t=0;t=0&&!1!==t(e,this.data[e]);e--);else for(let e=0;e{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.Base64={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",ENCODED_VALS:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ENCODED_VALS_WEBSAFE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.",encodeByteArray:function(t,e){i.default.util.Base64.init();for(var n=e?i.default.util.Base64.byteToCharMapWebSafe_:i.default.util.Base64.byteToCharMap_,r=[],s=0;s>2,d=(3&a)<<4|c>>4,p=(15&c)<<2|h>>6,f=63&h;l||(f=64,o||(p=64)),r.push(n[u],n[d],n[p],n[f])}return r.join("")},encode:function(t,e){return i.default.util.Base64.encodeByteArray(i.default.util.Base64.stringToByteArray(t),e)},decode:function(t,e){i.default.util.Base64.init();for(var n=e?i.default.util.Base64.charToByteMapWebSafe_:i.default.util.Base64.charToByteMap_,r=[],s=0;s>4;if(r.push(h),64!=c){var u=o<<4&240|c>>2;if(r.push(u),64!=l){var d=c<<6&192|l;r.push(d)}}}return r},stringToByteArray:function(t){for(var e=[],n=0,r=0;r255;)e[n++]=255&i,i>>=8;e[n++]=i}return e},init:function(){if(!i.default.util.Base64.byteToCharMap_){i.default.util.Base64.byteToCharMap_={},i.default.util.Base64.charToByteMap_={},i.default.util.Base64.byteToCharMapWebSafe_={},i.default.util.Base64.charToByteMapWebSafe_={};for(var t=0;t{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.Color=Class.extend({init:function(t,e,n,r){if(this.hashString=null,null==t)this.hashString="none";else if(t instanceof i.default.util.Color)"none"===t.hashString?this.hashString="none":(this.red=t.red,this.green=t.green,this.blue=t.blue,this.alpha=t.alpha);else if("string"==typeof t)if("none"===t)this.hashString="none";else{let e=this.hex2rgb(t);this.red=e[0],this.green=e[1],this.blue=e[2],this.alpha=e[3]}else"object"==typeof t&&"number"==typeof t.red?(this.red=t.red,this.green=t.green,this.blue=t.blue,this.alpha=t.alpha):t instanceof Array&&3===t.length||"object"==typeof t&&"number"==typeof t.length&&3===t.length?(this.red=t[0],this.green=t[1],this.blue=t[2],this.alpha=t[3]):(this.red=parseInt(t),this.green=parseInt(e),this.blue=parseInt(n),this.alpha=void 0===r?1:parseFloat(r))},getHTMLStyle:function(){return void 0===this.red?"rgba(0,0,0,0)":"rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")"},getRed:function(){return this.red},getGreen:function(){return this.green},getBlue:function(){return this.blue},getAlpha:function(){return this.alpha},getIdealTextColor:function(){return 255-(.299*this.red+.587*this.green+.114*this.blue)<105?new i.default.util.Color(0,0,0):new i.default.util.Color(255,255,255)},hex2rgb:function(t){if(!t)return[0,0,0,1];if("transparent"===t.toLowerCase())return[0,0,0,0];if("#"===t[0])return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(-1===t.indexOf("rgb")){let e=document.body.appendChild(document.createElement("fictum")),n="rgb(1, 2, 3)";if(e.style.color=n,e.style.color!==n)return[0,0,0,1];if(e.style.color=t,e.style.color===n||""===e.style.color)return[0,0,0,1];t=getComputedStyle(e).color,document.body.removeChild(e)}return 0===t.indexOf("rgb")?(-1===t.indexOf("rgba")&&(t+=",1"),t.match(/[\.\d]+/g).map((t=>+t))):void 0},hex:function(){return this.int2hex(this.red)+this.int2hex(this.green)+this.int2hex(this.blue)},rgba:function(){return this.getHTMLStyle()},hash:function(){return null===this.hashString&&(this.hashString="#"+this.hex()),this.hashString},int2hex:function(t){return t=Math.round(Math.min(Math.max(0,t),255)),"0123456789ABCDEF".charAt((t-t%16)/16)+"0123456789ABCDEF".charAt(t%16)},darker:function(t){if("none"===this.hashString)return this;t=void 0===t?.1:t;let e=parseInt(Math.round(this.getRed()*(1-t))),n=parseInt(Math.round(this.getGreen()*(1-t))),r=parseInt(Math.round(this.getBlue()*(1-t)));return e<0?e=0:e>255&&(e=255),n<0?n=0:n>255&&(n=255),r<0?r=0:r>255&&(r=255),new i.default.util.Color(e,n,r,this.alpha)},lighter:function(t){if("none"===this.hashString)return this;t=void 0===t?.1:t;let e=parseInt(Math.round(this.getRed()*(1+t))),n=parseInt(Math.round(this.getGreen()*(1+t))),r=parseInt(Math.round(this.getBlue()*(1+t)));return e<0?e=0:e>255&&(e=255),n<0?n=0:n>255&&(n=255),r<0?r=0:r>255&&(r=255),new i.default.util.Color(e,n,r,this.alpha)},fadeTo:function(t,e){let n=Math.floor(this.red+e*(t.red-this.red)+.5),r=Math.floor(this.green+e*(t.green-this.green)+.5),s=Math.floor(this.blue+e*(t.blue-this.blue)+.5),a=Math.floor(this.alpha+e*(t.alpha-this.alpha)+.5);return new i.default.util.Color(n,r,s,a)},equals:function(t){return t instanceof i.default.util.Color&&this.rgba()===t.rgba()}});var s=i.default.util.Color;e.default=s,t.exports=e.default},"./src/util/Debug.js":()=>{"use strict";window.debug=function(){for(var t,e,n=this,r=Array.prototype.slice,i=console,s={},a=9,o=["error","warn","info","debug","log"],c="assert clear count dir dirxml exception group groupCollapsed groupEnd profile profileEnd table time timeEnd trace".split(" "),l=c.length,h=[];--l>=0;)!function(t){s[t]=function(){0!==a&&i&&i[t]&&i[t].apply(i,arguments)}}(c[l]);for(l=o.length;--l>=0;)!function(t,e){s[e]=function(){var s=r.call(arguments),a=[e].concat(s);h.push(a),u(a),i&&d(t)&&(i.firebug?i[e].apply(n,s):i[e]?i[e](s):i.log(s))}}(l,o[l]);function u(r){!t||!e&&i&&i.log||t.apply(n,r)}function d(t){return a>0?a>t:o.length+a<=t}return s.setLevel=function(t){a="number"==typeof t?t:9},s.setCallback=function(){var n=r.call(arguments),i=h.length,s=i;for(t=n.shift()||null,e="boolean"==typeof n[0]&&n.shift(),s-="number"==typeof n[0]?n.shift():i;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.JSON={set:function(t,e,n){if(!e||""===e)return;let r,i=e.match(/[\w-]+|\[\]|([^\[[\w]\]]|["'](.*?)['"])/g),s=t,a=null,o=null,c=function(t,e,n){"[]"===e?t.push(n):t[e]=n};for(;i.length>0;)r=i.shift().replace(/["']/g,""),isNaN(+r)&&"[]"!==r?"string"==typeof r&&($.isPlainObject(s)||(s={},c(a,o,s))):s.constructor!==Array&&(s=[],c(a,o,s)),a=s,o=r,s=s[r];c(a,o,n)},get:function(t,e){if(!e)return;let n=e.match(/[\w-]+|\[\]|([^\[[\w]\]]|["'](.*?)['"])/g);for(;null!==t&&n.length>0;){if(!t.propertyIsEnumerable(n[0].replace(/"/g,"")))return;t=t[n.shift().replace(/"/g,"")]}return t},diff:function(t,e){let n={};for(let r in t){let i=t[r],s=e[r];i!==s&&(i.equals&&i.equals(s)||(n[r]=t[r]))}return n},flatDiff:function(t,e){let n={};for(let r in t)t[r]!==e[r]&&(n[r]=t[r]);return n},ensureDefault:function(t,e,n){t.hasOwnProperty(e)||(t[e]=n)}};var s=i.default.util.JSON;e.default=s,t.exports=e.default},"./src/util/Polyfill.js":()=>{"use strict";document.ontouchmove=function(t){t.preventDefault()}},"./src/util/SVGUtil.js":()=>{"use strict";Raphael.fn.polygon=function(t){for(var e=["M"],n=t.split(" "),r=0;r{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.UUID={create:function(){let t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}};var s=i.default.util.UUID;e.default=s,t.exports=e.default},"./src/util/extend.js":(t,e,n)=>{"use strict";let r=function(){let t={},e=!1,n=0,r=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],n++);let i=function(n){for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e&&"[object Object]"===Object.prototype.toString.call(n[r])?t[r]=extend(!0,t[r],n[r]):t[r]=n[r])};for(;n{"use strict";Raphael.el.isVisible=function(){return"none"!==this.node.style.display}},"./src/util/spline/BezierSpline.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.spline.BezierSpline=i.default.util.spline.Spline.extend({NAME:"draw2d.util.spline.BezierSpline",init:function(){this._super()},generate:function(t,e){var n=t.getSize();if(n<4)return t.clone(!0);var r=new i.default.util.ArrayList;r.add(this.p(0,0,t));for(var s=0;s{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.spline.CatmullRomSpline=i.default.util.spline.CubicSpline.extend({NAME:"draw2d.util.spline.CatmullRomSpline",init:function(){this._super()},blend:function(t,e){return-2==t?((2-e)*e-1)*e/2:-1==t?((3*e-5)*e*e+2)/2:0==t?((-3*e+4)*e+1)*e/2:(e-1)*e*e/2}})},"./src/util/spline/CubicSpline.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.spline.CubicSpline=i.default.util.spline.Spline.extend({NAME:"draw2d.util.spline.CubicSpline",init:function(){this._super()},generate:function(t,e){if(r<3)return t.clone(!0);var n=new i.default.util.ArrayList;n.add(t.get(0)),n.addAll(t),n.add(t.get(t.getSize()-1));var r=n.getSize(),s=new i.default.util.ArrayList;s.add(t.get(0)),s.add(this.p(1,0,n));for(var a=1;a{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.util.spline.Spline=Class.extend({NAME:"draw2d.util.spline.Spline",init:function(){},generate:function(t,e){throw"inherit classes must implement the method 'draw2d.util.spline.Spline.generate()'"}})},"./node_modules/css-loader/dist/cjs.js!./src/css/contextmenu.css":(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=n("./node_modules/css-loader/dist/runtime/sourceMaps.js"),i=n.n(r),s=n("./node_modules/css-loader/dist/runtime/api.js"),a=n.n(s)()(i());a.push([t.id,'\r\n\r\n/*!\r\n * jQuery contextMenu - Plugin for simple contextMenu handling\r\n *\r\n * Version: 1.5.24\r\n *\r\n * Authors: Rodney Rehm, Addy Osmani (patches for FF)\r\n * Web: http://medialize.github.com/jQuery-contextMenu/\r\n *\r\n * Licensed under\r\n * MIT License http://www.opensource.org/licenses/mit-license\r\n * GPL v3 http://opensource.org/licenses/GPL-3.0\r\n *\r\n */\r\n.context-menu-list {\r\n margin:0;\r\n padding:0;\r\n\r\n min-width: 120px;\r\n max-width: 250px;\r\n display: inline-block;\r\n position: absolute;\r\n list-style-type: none;\r\n\r\n border: 1px solid #DDD;\r\n background: #EEE;\r\n\r\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n\r\n font-family: Verdana, Arial, Helvetica, sans-serif;\r\n font-size: 11px;\r\n}\r\n\r\n.context-menu-item {\r\n padding: 2px 2px 2px 24px;\r\n background-color: #EEE;\r\n position: relative;\r\n -webkit-user-select: none;\r\n -moz-user-select: -moz-none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n}\r\n\r\n.context-menu-separator {\r\n padding-bottom:0;\r\n border-bottom: 1px solid #DDD;\r\n}\r\n\r\n.context-menu-item > label > input,\r\n.context-menu-item > label > textarea {\r\n -webkit-user-select: text;\r\n -moz-user-select: text;\r\n -ms-user-select: text;\r\n user-select: text;\r\n}\r\n\r\n.context-menu-item.hover {\r\n cursor: pointer;\r\n background-color: #39F;\r\n}\r\n\r\n.context-menu-item.disabled {\r\n color: #666;\r\n}\r\n\r\n.context-menu-input.hover,\r\n.context-menu-item.disabled.hover {\r\n cursor: default;\r\n background-color: #EEE;\r\n}\r\n\r\n.context-menu-submenu:after {\r\n content: ">";\r\n color: #666;\r\n position: absolute;\r\n top: 0;\r\n right: 3px;\r\n z-index: 1;\r\n}\r\n\r\n/* icons\r\n #protip:\r\n In case you want to use sprites for icons (which I would suggest you do) have a look at\r\n http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement\r\n .context-menu-item.icon:before {}\r\n */\r\n.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }\r\n\r\n/* vertically align inside labels */\r\n.context-menu-input > label > * { vertical-align: top; }\r\n\r\n/* position checkboxes and radios as icons */\r\n.context-menu-input > label > input[type="checkbox"],\r\n.context-menu-input > label > input[type="radio"] {\r\n margin-left: -17px;\r\n}\r\n.context-menu-input > label > span {\r\n margin-left: 5px;\r\n}\r\n\r\n.context-menu-input > label,\r\n.context-menu-input > label > input[type="text"],\r\n.context-menu-input > label > textarea,\r\n.context-menu-input > label > select {\r\n display: block;\r\n width: 100%;\r\n\r\n -webkit-box-sizing: border-box;\r\n -moz-box-sizing: border-box;\r\n -ms-box-sizing: border-box;\r\n -o-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.context-menu-input > label > textarea {\r\n height: 100px;\r\n}\r\n.context-menu-item > .context-menu-list {\r\n display: none;\r\n /* re-positioned by js */\r\n right: -5px;\r\n top: 5px;\r\n}\r\n\r\n.context-menu-item.hover > .context-menu-list {\r\n display: block;\r\n}\r\n\r\n.context-menu-accesskey {\r\n text-decoration: underline;\r\n}\r\n',"",{version:3,sources:["webpack://./src/css/contextmenu.css"],names:[],mappings:";;AAEA;;;;;;;;;;;;EAYE;AACF;IACI,QAAQ;IACR,SAAS;;IAET,gBAAgB;IAChB,gBAAgB;IAChB,qBAAqB;IACrB,kBAAkB;IAClB,qBAAqB;;IAErB,sBAAsB;IACtB,gBAAgB;;IAEhB,gDAAgD;OAC7C,6CAA6C;QAC5C,4CAA4C;SAC3C,2CAA2C;YACxC,wCAAwC;;IAEhD,kDAAkD;IAClD,eAAe;AACnB;;AAEA;IACI,yBAAyB;IACzB,sBAAsB;IACtB,kBAAkB;IAClB,yBAAyB;OACtB,2BAA2B;QAC1B,qBAAqB;YACjB,iBAAiB;AAC7B;;AAEA;IACI,gBAAgB;IAChB,6BAA6B;AACjC;;AAEA;;IAEI,yBAAyB;OACtB,sBAAsB;QACrB,qBAAqB;YACjB,iBAAiB;AAC7B;;AAEA;IACI,eAAe;IACf,sBAAsB;AAC1B;;AAEA;IACI,WAAW;AACf;;AAEA;;IAEI,eAAe;IACf,sBAAsB;AAC1B;;AAEA;IACI,YAAY;IACZ,WAAW;IACX,kBAAkB;IAClB,MAAM;IACN,UAAU;IACV,UAAU;AACd;;AAEA;;;;;EAKE;AACF,0BAA0B,gBAAgB,EAAE,4BAA4B,EAAE,4BAA4B,EAAE;;AAExG,mCAAmC;AACnC,kCAAkC,mBAAmB,EAAE;;AAEvD,4CAA4C;AAC5C;;IAEI,kBAAkB;AACtB;AACA;IACI,gBAAgB;AACpB;;AAEA;;;;IAII,cAAc;IACd,WAAW;;IAEX,8BAA8B;OAC3B,2BAA2B;QAC1B,0BAA0B;SACzB,yBAAyB;YACtB,sBAAsB;AAClC;;AAEA;IACI,aAAa;AACjB;AACA;IACI,aAAa;IACb,wBAAwB;IACxB,WAAW;IACX,QAAQ;AACZ;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,0BAA0B;AAC9B",sourcesContent:['\r\n\r\n/*!\r\n * jQuery contextMenu - Plugin for simple contextMenu handling\r\n *\r\n * Version: 1.5.24\r\n *\r\n * Authors: Rodney Rehm, Addy Osmani (patches for FF)\r\n * Web: http://medialize.github.com/jQuery-contextMenu/\r\n *\r\n * Licensed under\r\n * MIT License http://www.opensource.org/licenses/mit-license\r\n * GPL v3 http://opensource.org/licenses/GPL-3.0\r\n *\r\n */\r\n.context-menu-list {\r\n margin:0;\r\n padding:0;\r\n\r\n min-width: 120px;\r\n max-width: 250px;\r\n display: inline-block;\r\n position: absolute;\r\n list-style-type: none;\r\n\r\n border: 1px solid #DDD;\r\n background: #EEE;\r\n\r\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n\r\n font-family: Verdana, Arial, Helvetica, sans-serif;\r\n font-size: 11px;\r\n}\r\n\r\n.context-menu-item {\r\n padding: 2px 2px 2px 24px;\r\n background-color: #EEE;\r\n position: relative;\r\n -webkit-user-select: none;\r\n -moz-user-select: -moz-none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n}\r\n\r\n.context-menu-separator {\r\n padding-bottom:0;\r\n border-bottom: 1px solid #DDD;\r\n}\r\n\r\n.context-menu-item > label > input,\r\n.context-menu-item > label > textarea {\r\n -webkit-user-select: text;\r\n -moz-user-select: text;\r\n -ms-user-select: text;\r\n user-select: text;\r\n}\r\n\r\n.context-menu-item.hover {\r\n cursor: pointer;\r\n background-color: #39F;\r\n}\r\n\r\n.context-menu-item.disabled {\r\n color: #666;\r\n}\r\n\r\n.context-menu-input.hover,\r\n.context-menu-item.disabled.hover {\r\n cursor: default;\r\n background-color: #EEE;\r\n}\r\n\r\n.context-menu-submenu:after {\r\n content: ">";\r\n color: #666;\r\n position: absolute;\r\n top: 0;\r\n right: 3px;\r\n z-index: 1;\r\n}\r\n\r\n/* icons\r\n #protip:\r\n In case you want to use sprites for icons (which I would suggest you do) have a look at\r\n http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement\r\n .context-menu-item.icon:before {}\r\n */\r\n.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }\r\n\r\n/* vertically align inside labels */\r\n.context-menu-input > label > * { vertical-align: top; }\r\n\r\n/* position checkboxes and radios as icons */\r\n.context-menu-input > label > input[type="checkbox"],\r\n.context-menu-input > label > input[type="radio"] {\r\n margin-left: -17px;\r\n}\r\n.context-menu-input > label > span {\r\n margin-left: 5px;\r\n}\r\n\r\n.context-menu-input > label,\r\n.context-menu-input > label > input[type="text"],\r\n.context-menu-input > label > textarea,\r\n.context-menu-input > label > select {\r\n display: block;\r\n width: 100%;\r\n\r\n -webkit-box-sizing: border-box;\r\n -moz-box-sizing: border-box;\r\n -ms-box-sizing: border-box;\r\n -o-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.context-menu-input > label > textarea {\r\n height: 100px;\r\n}\r\n.context-menu-item > .context-menu-list {\r\n display: none;\r\n /* re-positioned by js */\r\n right: -5px;\r\n top: 5px;\r\n}\r\n\r\n.context-menu-item.hover > .context-menu-list {\r\n display: block;\r\n}\r\n\r\n.context-menu-accesskey {\r\n text-decoration: underline;\r\n}\r\n'],sourceRoot:""}]);const o=a},"./node_modules/css-loader/dist/runtime/api.js":t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var o=0;o0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},"./node_modules/css-loader/dist/runtime/sourceMaps.js":t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),s="/*# ".concat(i," */");return[e].concat([s]).join("\n")}return[e].join("\n")}},"./node_modules/performance-now/lib/performance-now.js":function(t){(function(){var e,n,r,i,s,a;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(t.exports=function(){return(e()-s)/1e6},n=process.hrtime,i=(e=function(){var t;return 1e9*(t=n())[0]+t[1]})(),a=1e9*process.uptime(),s=i-a):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},"./node_modules/raf/index.js":(t,e,n)=>{for(var r=n("./node_modules/performance-now/lib/performance-now.js"),i="undefined"==typeof window?n.g:window,s=["moz","webkit"],a="AnimationFrame",o=i["request"+a],c=i["cancel"+a]||i["cancelRequest"+a],l=0;!o&&l{t.exports='/* \r\n * Simple JavaScript Inheritance \r\n * By John Resig http://ejohn.org/ \r\n * MIT Licensed. \r\n * \r\n ****************************************************** \r\n * Example Usage \r\n ****************************************************** \r\n var Person = Class.extend({ \r\n init: function(isDancing){ \r\n this.dancing = isDancing; \r\n }, \r\n dance: function(){ \r\n return this.dancing; \r\n } \r\n}); \r\n\r\nvar Ninja = Person.extend({ \r\n init: function(){ \r\n this._super( false ); \r\n }, \r\n dance: function(){ \r\n // Call the inherited version of dance() \r\n return this._super(); \r\n }, \r\n swingSword: function(){ \r\n return true; \r\n } \r\n}); \r\n\r\nvar p = new Person(true); \r\np.dance(); // => true \r\n\r\nvar n = new Ninja(); \r\nn.dance(); // => false \r\nn.swingSword(); // => true \r\n\r\n// Should all be true \r\np instanceof Person && p instanceof Class && \r\nn instanceof Ninja && n instanceof Person && n instanceof Class \r\n\r\n ****************************************************** \r\n */ \r\n \r\n// Inspired by base2 and Prototype \r\n(function(){ \r\n var fnTest = /xyz/.test(function(){xyz;}) ? /\\b_super\\b/ : /.*/; \r\n\r\n // The base Class implementation (does nothing) \r\n this.Class = function(){}; \r\n \r\n\r\n // Create a new Class that inherits from this class \r\n Class.extend = function(prop) { \r\n var _super = this.prototype; \r\n \r\n // Instantiate a base class (but only create the instance, \r\n // don\'t run the init constructor) \r\n initializing = true; \r\n var prototype = new this(); \r\n initializing = false; \r\n \r\n \r\n // Copy the properties over onto the new prototype \r\n for (var name in prop) { \r\n // Check if we\'re overwriting an existing function \r\n prototype[name] = typeof prop[name] == "function" && \r\n typeof _super[name] == "function" && fnTest.test(prop[name]) ? \r\n (function(name, fn){ \r\n return function() { \r\n var tmp = this._super; \r\n \r\n // Add a new ._super() method that is the same method \r\n // but on the super-class \r\n this._super = _super[name]; \r\n \r\n // The method only need to be bound temporarily, so we \r\n // remove it when we\'re done executing \r\n var ret = fn.apply(this, arguments); \r\n this._super = tmp; \r\n \r\n return ret; \r\n }; \r\n })(name, prop[name]) : \r\n prop[name]; \r\n } \r\n \r\n // The dummy class constructor \r\n function Class() { \r\n // All construction is actually done in the init method \r\n if ( !initializing && this.init ) \r\n this.init.apply(this, arguments); \r\n } \r\n \r\n // Populate our constructed prototype object \r\n Class.prototype = prototype; \r\n \r\n // Enforce the constructor to be what we expect \r\n Class.prototype.constructor = Class; \r\n\r\n // And make this class extendable \r\n Class.extend = arguments.callee; \r\n \r\n // EXTENSION BY Draw2D.org to inject methods into an existing class to provide plugins or \r\n // bugfixes for further releases \r\n // \r\n Class.inject = function (prop) { \r\n var proto = this.prototype; \r\n var parent = {}; \r\n for (var name in prop) { \r\n if (typeof (prop[name]) == "function" && typeof (proto[name]) == "function" && fnTest.test(prop[name])) { \r\n parent[name] = proto[name]; \r\n proto[name] = (function (name, fn) { \r\n return function () { \r\n var tmp = this.parent; \r\n this.parent = parent[name]; \r\n var ret = fn.apply(this, arguments); \r\n this.parent = tmp; \r\n return ret; \r\n }; \r\n })(name, prop[name]); \r\n } else { \r\n proto[name] = prop[name]; \r\n } \r\n } \r\n }; \r\n \r\n return Class; \r\n }; \r\n})();\r\n \r\n'},"./node_modules/raw-loader/index.js!./src/lib/pathfinding.exec.js":t=>{t.exports='var PF=function(){var e=function(t,n){var r=e.resolve(t,n||"/"),i=e.modules[r];if(!i)throw new Error("Failed to resolve module "+t+", tried "+r);var s=i._cached?i._cached:i();return s};return e.paths=[],e.modules={},e.extensions=[".js",".coffee"],e._core={assert:!0,events:!0,fs:!0,path:!0,vm:!0},e.resolve=function(){return function(t,n){function u(t){if(e.modules[t])return t;for(var n=0;n=0;i--){if(t[i]==="node_modules")continue;var s=t.slice(0,i+1).join("/")+"/node_modules";n.push(s)}return n}n||(n="/");if(e._core[t])return t;var r=e.modules.path();n=r.resolve("/",n);var i=n||"/";if(t.match(/^(?:\\.\\.?\\/|\\/)/)){var s=u(r.resolve(i,t))||a(r.resolve(i,t));if(s)return s}var o=f(t,i);if(o)return o;throw new Error("Cannot find module \'"+t+"\'")}}(),e.alias=function(t,n){var r=e.modules.path(),i=null;try{i=e.resolve(t+"/package.json","/")}catch(s){i=e.resolve(t,"/")}var o=r.dirname(i),u=(Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t})(e.modules);for(var a=0;a0){var n=e.shift();n()}}},!0),function(n){t?(e.push(n),window.postMessage("browserify-tick","*")):setTimeout(n,0)}}()),process.title||(process.title="browser"),process.binding||(process.binding=function(t){if(t==="evals")return e("vm");throw new Error("No such module")}),process.cwd||(process.cwd=function(){return"."}),process.env||(process.env={}),process.argv||(process.argv=[]),e.define("path",function(e,t,n,r,i){function s(e,t){var n=[];for(var r=0;r=0;r--){var i=e[r];i=="."?e.splice(r,1):i===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var u=/^(.+\\/(?!$)|\\/)?((?:.+?)?(\\.[^.]*)?)$/;n.resolve=function(){var e="",t=!1;for(var n=arguments.length;n>=-1&&!t;n--){var r=n>=0?arguments[n]:process.cwd();if(typeof r!="string"||!r)continue;e=r+"/"+e,t=r.charAt(0)==="/"}return e=o(s(e.split("/"),function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."},n.normalize=function(e){var t=e.charAt(0)==="/",n=e.slice(-1)==="/";return e=o(s(e.split("/"),function(e){return!!e}),!t).join("/"),!e&&!t&&(e="."),e&&n&&(e+="/"),(t?"/":"")+e},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(s(e,function(e,t){return e&&typeof e=="string"}).join("/"))},n.dirname=function(e){var t=u.exec(e)[1]||"",n=!1;return t?t.length===1||n&&t.length<=3&&t.charAt(1)===":"?t:t.substring(0,t.length-1):"."},n.basename=function(e,t){var n=u.exec(e)[2]||"";return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return u.exec(e)[3]||""}}),e.define("/core/Node.js",function(e,t,n,r,i){function s(e,t,n){this.x=e,this.y=t,this.walkable=n===undefined?!0:n}t.exports=s}),e.define("/core/Grid.js",function(e,t,n,r,i){function o(e,t,n){this.width=e,this.height=t,this.nodes=this._buildNodes(e,t,n)}var s=e("./Node");o.prototype._buildNodes=function(e,t,n){var r,i,o=new Array(t),u;for(r=0;r=0&&e=0&&tt?1:0},f=function(e,t,i,s,o){var u;i==null&&(i=0),o==null&&(o=n);if(i<0)throw new Error("lo must be non-negative");s==null&&(s=e.length);while(o(i,s)<0)u=r((i+s)/2),o(t,e[u])<0?s=u:i=u+1;return[].splice.apply(e,[i,i-i].concat(t)),t},o=function(e,t,r){return r==null&&(r=n),e.push(t),d(e,0,e.length-1,r)},s=function(e,t){var r,i;return t==null&&(t=n),r=e.pop(),e.length?(i=e[0],e[0]=r,v(e,0,t)):i=r,i},a=function(e,t,r){var i;return r==null&&(r=n),i=e[0],e[0]=t,v(e,0,r),i},u=function(e,t,r){var i;return r==null&&(r=n),e.length&&r(e[0],t)<0&&(i=[e[0],t],t=i[0],e[0]=i[1],v(e,0,r)),t},i=function(e,t){var i,s,o,u,a,f,l,c;t==null&&(t=n),f=function(){c=[];for(var t=0,n=r(e.length/2);0<=n?tn;0<=n?t++:t--)c.push(t);return c}.apply(this).reverse(),l=[];for(s=0,u=f.length;sm;u=0<=m?++p:--p)g.push(s(e,r));return g},d=function(e,t,r,i){var s,o,u;i==null&&(i=n),s=e[r];while(r>t){u=r-1>>1,o=e[u];if(i(s,o)<0){e[r]=o,r=u;continue}break}return e[r]=s},v=function(e,t,r){var i,s,o,u,a;r==null&&(r=n),s=e.length,a=t,o=e[t],i=2*t+1;while(i-f&&(l-=f,e+=o),c{t.exports='\r\n\r\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\// │ Raphaël 2.1.0 - JavaScript Vector Library │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\r\n// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\r\n// └────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n// ┌──────────────────────────────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Eve 0.3.4 - JavaScript Events Library │ \\\\\r\n// ├──────────────────────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\\\\r\n// │ Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. │ \\\\\r\n// └──────────────────────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n// THIS FILES IS PATCHED BY FREEGROUP\r\n// you can\'t replace this file with a new version without migrate all changes\r\n// tagged with "FREEGROUP"\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the "License");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n// http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an "AS IS" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n// ┌────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Eve 0.4.2 - JavaScript Events Library │ \\\\\r\n// ├────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Author Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\\\\r\n// └────────────────────────────────────────────────────────────┘ \\\\\r\n(function (glob, factory) {\r\n if (typeof define === "function" && define.amd) {\r\n define("eve", function() {\r\n return factory();\r\n });\r\n } else if (typeof exports === "object") {\r\n module.exports = factory();\r\n } else {\r\n glob.eve = factory();\r\n }\r\n}(this, function(){\r\n var version = "0.4.2",\r\n has = "hasOwnProperty",\r\n separator = /[\\.\\/]/,\r\n wildcard = "*",\r\n fun = function () {},\r\n numsort = function (a, b) {\r\n return a - b;\r\n },\r\n current_event,\r\n stop,\r\n events = {n: {}},\r\n /*\\\r\n * eve\r\n [ method ]\r\n\r\n * Fires event with given `name`, given scope and other parameters.\r\n\r\n > Arguments\r\n\r\n - name (string) name of the *event*, dot (`.`) or slash (`/`) separated\r\n - scope (object) context for the event handlers\r\n - varargs (...) the rest of arguments will be sent to event handlers\r\n\r\n = (object) array of returned values from the listeners\r\n \\*/\r\n eve = function (name, scope) {\r\n name = String(name);\r\n var e = events,\r\n oldstop = stop,\r\n args = Array.prototype.slice.call(arguments, 2),\r\n listeners = eve.listeners(name),\r\n z = 0,\r\n f = false,\r\n l,\r\n indexed = [],\r\n queue = {},\r\n out = [],\r\n ce = current_event,\r\n errors = [];\r\n current_event = name;\r\n stop = 0;\r\n for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) {\r\n indexed.push(listeners[i].zIndex);\r\n if (listeners[i].zIndex < 0) {\r\n queue[listeners[i].zIndex] = listeners[i];\r\n }\r\n }\r\n indexed.sort(numsort);\r\n while (indexed[z] < 0) {\r\n l = queue[indexed[z++]];\r\n out.push(l.apply(scope, args));\r\n if (stop) {\r\n stop = oldstop;\r\n return out;\r\n }\r\n }\r\n for (i = 0; i < ii; i++) {\r\n l = listeners[i];\r\n if ("zIndex" in l) {\r\n if (l.zIndex == indexed[z]) {\r\n out.push(l.apply(scope, args));\r\n if (stop) {\r\n break;\r\n }\r\n do {\r\n z++;\r\n l = queue[indexed[z]];\r\n l && out.push(l.apply(scope, args));\r\n if (stop) {\r\n break;\r\n }\r\n } while (l)\r\n } else {\r\n queue[l.zIndex] = l;\r\n }\r\n } else {\r\n out.push(l.apply(scope, args));\r\n if (stop) {\r\n break;\r\n }\r\n }\r\n }\r\n stop = oldstop;\r\n current_event = ce;\r\n return out.length ? out : null;\r\n };\r\n // Undocumented. Debug only.\r\n eve._events = events;\r\n /*\\\r\n * eve.listeners\r\n [ method ]\r\n\r\n * Internal method which gives you array of all event handlers that will be triggered by the given `name`.\r\n\r\n > Arguments\r\n\r\n - name (string) name of the event, dot (`.`) or slash (`/`) separated\r\n\r\n = (array) array of event handlers\r\n \\*/\r\n eve.listeners = function (name) {\r\n var names = name.split(separator),\r\n e = events,\r\n item,\r\n items,\r\n k,\r\n i,\r\n ii,\r\n j,\r\n jj,\r\n nes,\r\n es = [e],\r\n out = [];\r\n for (i = 0, ii = names.length; i < ii; i++) {\r\n nes = [];\r\n for (j = 0, jj = es.length; j < jj; j++) {\r\n e = es[j].n;\r\n items = [e[names[i]], e[wildcard]];\r\n k = 2;\r\n while (k--) {\r\n item = items[k];\r\n if (item) {\r\n nes.push(item);\r\n out = out.concat(item.f || []);\r\n }\r\n }\r\n }\r\n es = nes;\r\n }\r\n return out;\r\n };\r\n\r\n /*\\\r\n * eve.on\r\n [ method ]\r\n **\r\n * Binds given event handler with a given name. You can use wildcards “`*`” for the names:\r\n | eve.on("*.under.*", f);\r\n | eve("mouse.under.floor"); // triggers f\r\n * Use @eve to trigger the listener.\r\n **\r\n > Arguments\r\n **\r\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\r\n - f (function) event handler function\r\n **\r\n = (function) returned function accepts a single numeric parameter that represents z-index of the handler. It is an optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment.\r\n > Example:\r\n | eve.on("mouse", eatIt)(2);\r\n | eve.on("mouse", scream);\r\n | eve.on("mouse", catchIt)(1);\r\n * This will ensure that `catchIt()` function will be called before `eatIt()`.\r\n *\r\n * If you want to put your handler before non-indexed handlers, specify a negative value.\r\n * Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”.\r\n \\*/\r\n eve.on = function (name, f) {\r\n name = String(name);\r\n if (typeof f != "function") {\r\n return function () {};\r\n }\r\n var names = name.split(separator),\r\n e = events;\r\n for (var i = 0, ii = names.length; i < ii; i++) {\r\n e = e.n;\r\n e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}});\r\n }\r\n e.f = e.f || [];\r\n for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) {\r\n return fun;\r\n }\r\n e.f.push(f);\r\n return function (zIndex) {\r\n if (+zIndex == +zIndex) {\r\n f.zIndex = +zIndex;\r\n }\r\n };\r\n };\r\n /*\\\r\n * eve.f\r\n [ method ]\r\n **\r\n * Returns function that will fire given event with optional arguments.\r\n * Arguments that will be passed to the result function will be also\r\n * concated to the list of final arguments.\r\n | el.onclick = eve.f("click", 1, 2);\r\n | eve.on("click", function (a, b, c) {\r\n | console.log(a, b, c); // 1, 2, [event object]\r\n | });\r\n > Arguments\r\n - event (string) event name\r\n - varargs (…) and any other arguments\r\n = (function) possible event handler function\r\n \\*/\r\n eve.f = function (event) {\r\n var attrs = [].slice.call(arguments, 1);\r\n return function () {\r\n eve.apply(null, [event, null].concat(attrs).concat([].slice.call(arguments, 0)));\r\n };\r\n };\r\n /*\\\r\n * eve.stop\r\n [ method ]\r\n **\r\n * Is used inside an event handler to stop the event, preventing any subsequent listeners from firing.\r\n \\*/\r\n eve.stop = function () {\r\n stop = 1;\r\n };\r\n /*\\\r\n * eve.nt\r\n [ method ]\r\n **\r\n * Could be used inside event handler to figure out actual name of the event.\r\n **\r\n > Arguments\r\n **\r\n - subname (string) #optional subname of the event\r\n **\r\n = (string) name of the event, if `subname` is not specified\r\n * or\r\n = (boolean) `true`, if current event’s name contains `subname`\r\n \\*/\r\n eve.nt = function (subname) {\r\n if (subname) {\r\n return new RegExp("(?:\\\\.|\\\\/|^)" + subname + "(?:\\\\.|\\\\/|$)").test(current_event);\r\n }\r\n return current_event;\r\n };\r\n /*\\\r\n * eve.nts\r\n [ method ]\r\n **\r\n * Could be used inside event handler to figure out actual name of the event.\r\n **\r\n **\r\n = (array) names of the event\r\n \\*/\r\n eve.nts = function () {\r\n return current_event.split(separator);\r\n };\r\n /*\\\r\n * eve.off\r\n [ method ]\r\n **\r\n * Removes given function from the list of event listeners assigned to given name.\r\n * If no arguments specified all the events will be cleared.\r\n **\r\n > Arguments\r\n **\r\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\r\n - f (function) event handler function\r\n \\*/\r\n /*\\\r\n * eve.unbind\r\n [ method ]\r\n **\r\n * See @eve.off\r\n \\*/\r\n eve.off = eve.unbind = function (name, f) {\r\n if (!name) {\r\n eve._events = events = {n: {}};\r\n return;\r\n }\r\n var names = name.split(separator),\r\n e,\r\n key,\r\n splice,\r\n i, ii, j, jj,\r\n cur = [events];\r\n for (i = 0, ii = names.length; i < ii; i++) {\r\n for (j = 0; j < cur.length; j += splice.length - 2) {\r\n splice = [j, 1];\r\n e = cur[j].n;\r\n if (names[i] != wildcard) {\r\n if (e[names[i]]) {\r\n splice.push(e[names[i]]);\r\n }\r\n } else {\r\n for (key in e) if (e[has](key)) {\r\n splice.push(e[key]);\r\n }\r\n }\r\n cur.splice.apply(cur, splice);\r\n }\r\n }\r\n for (i = 0, ii = cur.length; i < ii; i++) {\r\n e = cur[i];\r\n while (e.n) {\r\n if (f) {\r\n if (e.f) {\r\n for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) {\r\n e.f.splice(j, 1);\r\n break;\r\n }\r\n !e.f.length && delete e.f;\r\n }\r\n for (key in e.n) if (e.n[has](key) && e.n[key].f) {\r\n var funcs = e.n[key].f;\r\n for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) {\r\n funcs.splice(j, 1);\r\n break;\r\n }\r\n !funcs.length && delete e.n[key].f;\r\n }\r\n } else {\r\n delete e.f;\r\n for (key in e.n) if (e.n[has](key) && e.n[key].f) {\r\n delete e.n[key].f;\r\n }\r\n }\r\n e = e.n;\r\n }\r\n }\r\n };\r\n /*\\\r\n * eve.once\r\n [ method ]\r\n **\r\n * Binds given event handler with a given name to only run once then unbind itself.\r\n | eve.once("login", f);\r\n | eve("login"); // triggers f\r\n | eve("login"); // no listeners\r\n * Use @eve to trigger the listener.\r\n **\r\n > Arguments\r\n **\r\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\r\n - f (function) event handler function\r\n **\r\n = (function) same return function as @eve.on\r\n \\*/\r\n eve.once = function (name, f) {\r\n var f2 = function () {\r\n eve.unbind(name, f2);\r\n return f.apply(this, arguments);\r\n };\r\n return eve.on(name, f2);\r\n };\r\n /*\\\r\n * eve.version\r\n [ property (string) ]\r\n **\r\n * Current version of the library.\r\n \\*/\r\n eve.version = version;\r\n eve.toString = function () {\r\n return "You are running Eve " + version;\r\n };\r\n\r\n return eve;\r\n}));\r\n\r\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Core Module │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\r\n// └────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n(function (glob, factory) {\r\n if (typeof define === "function" && define.amd) {\r\n define("raphael.core", ["eve"], function(eve) {\r\n return factory(eve);\r\n });\r\n } else if (typeof exports === "object") {\r\n module.exports = factory(require("eve"));\r\n } else {\r\n glob.Raphael = factory(glob.eve);\r\n }\r\n}(this, function (eve) {\r\n /*\\\r\n * Raphael\r\n [ method ]\r\n **\r\n * Creates a canvas object on which to draw.\r\n * You must do this first, as all future calls to drawing methods\r\n * from this instance will be bound to this canvas.\r\n > Parameters\r\n **\r\n - container (HTMLElement|string) DOM element or its ID which is going to be a parent for drawing surface\r\n - width (number)\r\n - height (number)\r\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\r\n * or\r\n - x (number)\r\n - y (number)\r\n - width (number)\r\n - height (number)\r\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\r\n * or\r\n - all (array) (first 3 or 4 elements in the array are equal to [containerID, width, height] or [x, y, width, height]. The rest are element descriptions in format {type: type, }). See @Paper.add.\r\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\r\n * or\r\n - onReadyCallback (function) function that is going to be called on DOM ready event. You can also subscribe to this event via Eve’s “DOMLoad” event. In this case method returns `undefined`.\r\n = (object) @Paper\r\n > Usage\r\n | // Each of the following examples create a canvas\r\n | // that is 320px wide by 200px high.\r\n | // Canvas is created at the viewport’s 10,50 coordinate.\r\n | var paper = Raphael(10, 50, 320, 200);\r\n | // Canvas is created at the top left corner of the #notepad element\r\n | // (or its top right corner in dir="rtl" elements)\r\n | var paper = Raphael(document.getElementById("notepad"), 320, 200);\r\n | // Same as above\r\n | var paper = Raphael("notepad", 320, 200);\r\n | // Image dump\r\n | var set = Raphael(["notepad", 320, 200, {\r\n | type: "rect",\r\n | x: 10,\r\n | y: 10,\r\n | width: 25,\r\n | height: 25,\r\n | stroke: "#f00"\r\n | }, {\r\n | type: "text",\r\n | x: 30,\r\n | y: 40,\r\n | text: "Dump"\r\n | }]);\r\n \\*/\r\n function R(first) {\r\n if (R.is(first, "function")) {\r\n return loaded ? first() : eve.on("raphael.DOMload", first);\r\n } else if (R.is(first, array)) {\r\n return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first);\r\n } else {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n if (R.is(args[args.length - 1], "function")) {\r\n var f = args.pop();\r\n return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () {\r\n f.call(R._engine.create[apply](R, args));\r\n });\r\n } else {\r\n return R._engine.create[apply](R, arguments);\r\n }\r\n }\r\n }\r\n R.version = "2.1.4";\r\n R.eve = eve;\r\n var loaded,\r\n separator = /[, ]+/,\r\n elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1},\r\n formatrg = /\\{(\\d+)\\}/g,\r\n proto = "prototype",\r\n has = "hasOwnProperty",\r\n g = {\r\n doc: document,\r\n win: window\r\n },\r\n oldRaphael = {\r\n was: Object.prototype[has].call(g.win, "Raphael"),\r\n is: g.win.Raphael\r\n },\r\n Paper = function () {\r\n /*\\\r\n * Paper.ca\r\n [ property (object) ]\r\n **\r\n * Shortcut for @Paper.customAttributes\r\n \\*/\r\n /*\\\r\n * Paper.customAttributes\r\n [ property (object) ]\r\n **\r\n * If you have a set of attributes that you would like to represent\r\n * as a function of some number you can do it easily with custom attributes:\r\n > Usage\r\n | paper.customAttributes.hue = function (num) {\r\n | num = num % 1;\r\n | return {fill: "hsb(" + num + ", 0.75, 1)"};\r\n | };\r\n | // Custom attribute “hue” will change fill\r\n | // to be given hue with fixed saturation and brightness.\r\n | // Now you can use it like this:\r\n | var c = paper.circle(10, 10, 10).attr({hue: .45});\r\n | // or even like this:\r\n | c.animate({hue: 1}, 1e3);\r\n |\r\n | // You could also create custom attribute\r\n | // with multiple parameters:\r\n | paper.customAttributes.hsb = function (h, s, b) {\r\n | return {fill: "hsb(" + [h, s, b].join(",") + ")"};\r\n | };\r\n | c.attr({hsb: "0.5 .8 1"});\r\n | c.animate({hsb: [1, 0, 0.5]}, 1e3);\r\n \\*/\r\n this.ca = this.customAttributes = {};\r\n },\r\n paperproto,\r\n appendChild = "appendChild",\r\n apply = "apply",\r\n concat = "concat",\r\n supportsTouch = (\'ontouchstart\' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test\r\n E = "",\r\n S = " ",\r\n Str = String,\r\n split = "split",\r\n events = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[split](S),\r\n touchMap = {\r\n mousedown: "touchstart",\r\n mousemove: "touchmove",\r\n mouseup: "touchend"\r\n },\r\n lowerCase = Str.prototype.toLowerCase,\r\n math = Math,\r\n mmax = math.max,\r\n mmin = math.min,\r\n abs = math.abs,\r\n pow = math.pow,\r\n PI = math.PI,\r\n nu = "number",\r\n string = "string",\r\n array = "array",\r\n toString = "toString",\r\n fillString = "fill",\r\n objectToString = Object.prototype.toString,\r\n paper = {},\r\n push = "push",\r\n ISURL = R._ISURL = /^url\\([\'"]?(.+?)[\'"]?\\)$/i,\r\n colourRegExp = /^\\s*((#[a-f\\d]{6})|(#[a-f\\d]{3})|rgba?\\(\\s*([\\d\\.]+%?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+%?(?:\\s*,\\s*[\\d\\.]+%?)?)\\s*\\)|hsba?\\(\\s*([\\d\\.]+(?:deg|\\xb0|%)?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+(?:%?\\s*,\\s*[\\d\\.]+)?)%?\\s*\\)|hsla?\\(\\s*([\\d\\.]+(?:deg|\\xb0|%)?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+(?:%?\\s*,\\s*[\\d\\.]+)?)%?\\s*\\))\\s*$/i,\r\n isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1},\r\n bezierrg = /^(?:cubic-)?bezier\\(([^,]+),([^,]+),([^,]+),([^\\)]+)\\)/,\r\n round = math.round,\r\n setAttribute = "setAttribute",\r\n toFloat = parseFloat,\r\n toInt = parseInt,\r\n upperCase = Str.prototype.toUpperCase,\r\n availableAttrs = R._availableAttrs = {\r\n "arrow-end": "none",\r\n "arrow-start": "none",\r\n blur: 0,\r\n "clip-rect": "0 0 1e9 1e9",\r\n cursor: "default",\r\n cx: 0,\r\n cy: 0,\r\n fill: "#fff",\r\n "fill-opacity": 1,\r\n font: \'10px "Arial"\',\r\n "font-family": \'"Arial"\',\r\n "font-size": "10",\r\n "font-style": "normal",\r\n "font-weight": 400,\r\n gradient: 0,\r\n height: 0,\r\n href: "http://raphaeljs.com/",\r\n "letter-spacing": 0,\r\n opacity: 1,\r\n path: "M0,0",\r\n r: 0,\r\n rx: 0,\r\n ry: 0,\r\n src: "",\r\n stroke: "#000",\r\n "stroke-dasharray": "",\r\n "stroke-linecap": "butt",\r\n "stroke-linejoin": "butt",\r\n "stroke-miterlimit": 0,\r\n "stroke-opacity": 1,\r\n "stroke-width": 1,\r\n "stroke-scale": false, // FreeGroup: draw2d enhancement\r\n target: "_blank",\r\n "text-anchor": "middle",\r\n title: "Raphael",\r\n transform: "",\r\n width: 0,\r\n x: 0,\r\n y: 0\r\n },\r\n availableAnimAttrs = R._availableAnimAttrs = {\r\n blur: nu,\r\n "clip-rect": "csv",\r\n cx: nu,\r\n cy: nu,\r\n fill: "colour",\r\n "fill-opacity": nu,\r\n "font-size": nu,\r\n height: nu,\r\n opacity: nu,\r\n path: "path",\r\n r: nu,\r\n rx: nu,\r\n ry: nu,\r\n stroke: "colour",\r\n "stroke-opacity": nu,\r\n "stroke-width": nu,\r\n transform: "transform",\r\n width: nu,\r\n x: nu,\r\n y: nu\r\n },\r\n whitespace = /[\\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]/g,\r\n commaSpaces = /[\\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]*,[\\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]*/,\r\n hsrg = {hs: 1, rg: 1},\r\n p2s = /,?([achlmqrstvxz]),?/gi,\r\n pathCommand = /([achlmrqstvz])[\\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,]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[\\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]*,?[\\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]*)+)/ig,\r\n tCommand = /([rstm])[\\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,]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[\\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]*,?[\\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]*)+)/ig,\r\n pathValues = /(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[\\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]*,?[\\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]*/ig,\r\n radial_gradient = R._radial_gradient = /^r(?:\\(([^,]+?)[\\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]*,[\\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]*([^\\)]+?)\\))?/,\r\n eldata = {},\r\n sortByKey = function (a, b) {\r\n return a.key - b.key;\r\n },\r\n sortByNumber = function (a, b) {\r\n return toFloat(a) - toFloat(b);\r\n },\r\n fun = function () {},\r\n pipe = function (x) {\r\n return x;\r\n },\r\n rectPath = R._rectPath = function (x, y, w, h, r) {\r\n if (r) {\r\n return [["M", x + r, y], ["l", w - r * 2, 0], ["a", r, r, 0, 0, 1, r, r], ["l", 0, h - r * 2], ["a", r, r, 0, 0, 1, -r, r], ["l", r * 2 - w, 0], ["a", r, r, 0, 0, 1, -r, -r], ["l", 0, r * 2 - h], ["a", r, r, 0, 0, 1, r, -r], ["z"]];\r\n }\r\n return [["M", x, y], ["l", w, 0], ["l", 0, h], ["l", -w, 0], ["z"]];\r\n },\r\n ellipsePath = function (x, y, rx, ry) {\r\n if (ry == null) {\r\n ry = rx;\r\n }\r\n return [["M", x, y], ["m", 0, -ry], ["a", rx, ry, 0, 1, 1, 0, 2 * ry], ["a", rx, ry, 0, 1, 1, 0, -2 * ry], ["z"]];\r\n },\r\n getPath = R._getPath = {\r\n path: function (el) {\r\n return el.attr("path");\r\n },\r\n circle: function (el) {\r\n var a = el.attrs;\r\n return ellipsePath(a.cx, a.cy, a.r);\r\n },\r\n ellipse: function (el) {\r\n var a = el.attrs;\r\n return ellipsePath(a.cx, a.cy, a.rx, a.ry);\r\n },\r\n rect: function (el) {\r\n var a = el.attrs;\r\n return rectPath(a.x, a.y, a.width, a.height, a.r);\r\n },\r\n image: function (el) {\r\n var a = el.attrs;\r\n return rectPath(a.x, a.y, a.width, a.height);\r\n },\r\n text: function (el) {\r\n var bbox = el._getBBox();\r\n return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);\r\n },\r\n set : function(el) {\r\n var bbox = el._getBBox();\r\n return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);\r\n }\r\n },\r\n /*\\\r\n * Raphael.mapPath\r\n [ method ]\r\n **\r\n * Transform the path string with given matrix.\r\n > Parameters\r\n - path (string) path string\r\n - matrix (object) see @Matrix\r\n = (string) transformed path string\r\n \\*/\r\n mapPath = R.mapPath = function (path, matrix) {\r\n if (!matrix) {\r\n return path;\r\n }\r\n var x, y, i, j, ii, jj, pathi;\r\n path = path2curve(path);\r\n for (i = 0, ii = path.length; i < ii; i++) {\r\n pathi = path[i];\r\n for (j = 1, jj = pathi.length; j < jj; j += 2) {\r\n x = matrix.x(pathi[j], pathi[j + 1]);\r\n y = matrix.y(pathi[j], pathi[j + 1]);\r\n pathi[j] = x;\r\n pathi[j + 1] = y;\r\n }\r\n }\r\n return path;\r\n };\r\n\r\n R._g = g;\r\n /*\\\r\n * Raphael.type\r\n [ property (string) ]\r\n **\r\n * Can be “SVG”, “VML” or empty, depending on browser support.\r\n \\*/\r\n R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML");\r\n if (R.type == "VML") {\r\n var d = g.doc.createElement("div"),\r\n b;\r\n d.innerHTML = \'\';\r\n b = d.firstChild;\r\n b.style.behavior = "url(#default#VML)";\r\n if (!(b && typeof b.adj == "object")) {\r\n return (R.type = E);\r\n }\r\n d = null;\r\n }\r\n /*\\\r\n * Raphael.svg\r\n [ property (boolean) ]\r\n **\r\n * `true` if browser supports SVG.\r\n \\*/\r\n /*\\\r\n * Raphael.vml\r\n [ property (boolean) ]\r\n **\r\n * `true` if browser supports VML.\r\n \\*/\r\n R.svg = !(R.vml = R.type == "VML");\r\n R._Paper = Paper;\r\n /*\\\r\n * Raphael.fn\r\n [ property (object) ]\r\n **\r\n * You can add your own method to the canvas. For example if you want to draw a pie chart,\r\n * you can create your own pie chart function and ship it as a Raphaël plugin. To do this\r\n * you need to extend the `Raphael.fn` object. You should modify the `fn` object before a\r\n * Raphaël instance is created, otherwise it will take no effect. Please note that the\r\n * ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to\r\n * ensure any namespacing ensures proper context.\r\n > Usage\r\n | Raphael.fn.arrow = function (x1, y1, x2, y2, size) {\r\n | return this.path( ... );\r\n | };\r\n | // or create namespace\r\n | Raphael.fn.mystuff = {\r\n | arrow: function () {…},\r\n | star: function () {…},\r\n | // etc…\r\n | };\r\n | var paper = Raphael(10, 10, 630, 480);\r\n | // then use it\r\n | paper.arrow(10, 10, 30, 30, 5).attr({fill: "#f00"});\r\n | paper.mystuff.arrow();\r\n | paper.mystuff.star();\r\n \\*/\r\n R.fn = paperproto = Paper.prototype = R.prototype;\r\n R._id = 0;\r\n R._oid = 0;\r\n /*\\\r\n * Raphael.is\r\n [ method ]\r\n **\r\n * Handful of replacements for `typeof` operator.\r\n > Parameters\r\n - o (…) any object or primitive\r\n - type (string) name of the type, i.e. “string”, “function”, “number”, etc.\r\n = (boolean) is given value is of given type\r\n \\*/\r\n R.is = function (o, type) {\r\n type = lowerCase.call(type);\r\n if (type == "finite") {\r\n return !isnan[has](+o);\r\n }\r\n if (type == "array") {\r\n return o instanceof Array;\r\n }\r\n return (type == "null" && o === null) ||\r\n (type == typeof o && o !== null) ||\r\n (type == "object" && o === Object(o)) ||\r\n (type == "array" && Array.isArray && Array.isArray(o)) ||\r\n objectToString.call(o).slice(8, -1).toLowerCase() == type;\r\n };\r\n\r\n function clone(obj) {\r\n if (typeof obj == "function" || Object(obj) !== obj) {\r\n return obj;\r\n }\r\n var res = new obj.constructor;\r\n for (var key in obj) if (obj[has](key)) {\r\n res[key] = clone(obj[key]);\r\n }\r\n return res;\r\n }\r\n\r\n /*\\\r\n * Raphael.angle\r\n [ method ]\r\n **\r\n * Returns angle between two or three points\r\n > Parameters\r\n - x1 (number) x coord of first point\r\n - y1 (number) y coord of first point\r\n - x2 (number) x coord of second point\r\n - y2 (number) y coord of second point\r\n - x3 (number) #optional x coord of third point\r\n - y3 (number) #optional y coord of third point\r\n = (number) angle in degrees.\r\n \\*/\r\n R.angle = function (x1, y1, x2, y2, x3, y3) {\r\n if (x3 == null) {\r\n var x = x1 - x2,\r\n y = y1 - y2;\r\n if (!x && !y) {\r\n return 0;\r\n }\r\n return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360;\r\n } else {\r\n return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3);\r\n }\r\n };\r\n /*\\\r\n * Raphael.rad\r\n [ method ]\r\n **\r\n * Transform angle to radians\r\n > Parameters\r\n - deg (number) angle in degrees\r\n = (number) angle in radians.\r\n \\*/\r\n R.rad = function (deg) {\r\n return deg % 360 * PI / 180;\r\n };\r\n /*\\\r\n * Raphael.deg\r\n [ method ]\r\n **\r\n * Transform angle to degrees\r\n > Parameters\r\n - rad (number) angle in radians\r\n = (number) angle in degrees.\r\n \\*/\r\n R.deg = function (rad) {\r\n return Math.round ((rad * 180 / PI% 360)* 1000) / 1000;\r\n };\r\n /*\\\r\n * Raphael.snapTo\r\n [ method ]\r\n **\r\n * Snaps given value to given grid.\r\n > Parameters\r\n - values (array|number) given array of values or step of the grid\r\n - value (number) value to adjust\r\n - tolerance (number) #optional tolerance for snapping. Default is `10`.\r\n = (number) adjusted value.\r\n \\*/\r\n R.snapTo = function (values, value, tolerance) {\r\n tolerance = R.is(tolerance, "finite") ? tolerance : 10;\r\n if (R.is(values, array)) {\r\n var i = values.length;\r\n while (i--) if (abs(values[i] - value) <= tolerance) {\r\n return values[i];\r\n }\r\n } else {\r\n values = +values;\r\n var rem = value % values;\r\n if (rem < tolerance) {\r\n return value - rem;\r\n }\r\n if (rem > values - tolerance) {\r\n return value - rem + values;\r\n }\r\n }\r\n return value;\r\n };\r\n\r\n /*\\\r\n * Raphael.createUUID\r\n [ method ]\r\n **\r\n * Returns RFC4122, version 4 ID\r\n \\*/\r\n var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) {\r\n return function () {\r\n return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase();\r\n };\r\n })(/[xy]/g, function (c) {\r\n var r = math.random() * 16 | 0,\r\n v = c == "x" ? r : (r & 3 | 8);\r\n return v.toString(16);\r\n });\r\n\r\n /*\\\r\n * Raphael.setWindow\r\n [ method ]\r\n **\r\n * Used when you need to draw in `<iframe>`. Switched window to the iframe one.\r\n > Parameters\r\n - newwin (window) new window object\r\n \\*/\r\n R.setWindow = function (newwin) {\r\n eve("raphael.setWindow", R, g.win, newwin);\r\n g.win = newwin;\r\n g.doc = g.win.document;\r\n if (R._engine.initWin) {\r\n R._engine.initWin(g.win);\r\n }\r\n };\r\n var toHex = function (color) {\r\n if (R.vml) {\r\n // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/\r\n var trim = /^\\s+|\\s+$/g;\r\n var bod;\r\n try {\r\n var docum = new ActiveXObject("htmlfile");\r\n docum.write("");\r\n docum.close();\r\n bod = docum.body;\r\n } catch(e) {\r\n bod = createPopup().document.body;\r\n }\r\n var range = bod.createTextRange();\r\n toHex = cacher(function (color) {\r\n try {\r\n bod.style.color = Str(color).replace(trim, E);\r\n var value = range.queryCommandValue("ForeColor");\r\n value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16);\r\n return "#" + ("000000" + value.toString(16)).slice(-6);\r\n } catch(e) {\r\n return "none";\r\n }\r\n });\r\n } else {\r\n var i = g.doc.createElement("i");\r\n i.title = "Rapha\\xebl Colour Picker";\r\n i.style.display = "none";\r\n g.doc.body.appendChild(i);\r\n toHex = cacher(function (color) {\r\n i.style.color = color;\r\n return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue("color");\r\n });\r\n }\r\n return toHex(color);\r\n },\r\n hsbtoString = function () {\r\n return "hsb(" + [this.h, this.s, this.b] + ")";\r\n },\r\n hsltoString = function () {\r\n return "hsl(" + [this.h, this.s, this.l] + ")";\r\n },\r\n rgbtoString = function () {\r\n return this.hex;\r\n },\r\n prepareRGB = function (r, g, b) {\r\n if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) {\r\n b = r.b;\r\n g = r.g;\r\n r = r.r;\r\n }\r\n if (g == null && R.is(r, string)) {\r\n var clr = R.getRGB(r);\r\n r = clr.r;\r\n g = clr.g;\r\n b = clr.b;\r\n }\r\n if (r > 1 || g > 1 || b > 1) {\r\n r /= 255;\r\n g /= 255;\r\n b /= 255;\r\n }\r\n\r\n return [r, g, b];\r\n },\r\n packageRGB = function (r, g, b, o) {\r\n r *= 255;\r\n g *= 255;\r\n b *= 255;\r\n var rgb = {\r\n r: r,\r\n g: g,\r\n b: b,\r\n hex: R.rgb(r, g, b),\r\n toString: rgbtoString\r\n };\r\n R.is(o, "finite") && (rgb.opacity = o);\r\n return rgb;\r\n };\r\n\r\n /*\\\r\n * Raphael.color\r\n [ method ]\r\n **\r\n * Parses the color string and returns object with all values for the given color.\r\n > Parameters\r\n - clr (string) color string in one of the supported formats (see @Raphael.getRGB)\r\n = (object) Combined RGB & HSB object in format:\r\n o {\r\n o r (number) red,\r\n o g (number) green,\r\n o b (number) blue,\r\n o hex (string) color in HTML/CSS format: #••••••,\r\n o error (boolean) `true` if string can’t be parsed,\r\n o h (number) hue,\r\n o s (number) saturation,\r\n o v (number) value (brightness),\r\n o l (number) lightness\r\n o }\r\n \\*/\r\n R.color = function (clr) {\r\n var rgb;\r\n if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) {\r\n rgb = R.hsb2rgb(clr);\r\n clr.r = rgb.r;\r\n clr.g = rgb.g;\r\n clr.b = rgb.b;\r\n clr.hex = rgb.hex;\r\n } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) {\r\n rgb = R.hsl2rgb(clr);\r\n clr.r = rgb.r;\r\n clr.g = rgb.g;\r\n clr.b = rgb.b;\r\n clr.hex = rgb.hex;\r\n } else {\r\n if (R.is(clr, "string")) {\r\n clr = R.getRGB(clr);\r\n }\r\n if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) {\r\n rgb = R.rgb2hsl(clr);\r\n clr.h = rgb.h;\r\n clr.s = rgb.s;\r\n clr.l = rgb.l;\r\n rgb = R.rgb2hsb(clr);\r\n clr.v = rgb.b;\r\n } else {\r\n clr = {hex: "none"};\r\n clr.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1;\r\n }\r\n }\r\n clr.toString = rgbtoString;\r\n return clr;\r\n };\r\n /*\\\r\n * Raphael.hsb2rgb\r\n [ method ]\r\n **\r\n * Converts HSB values to RGB object.\r\n > Parameters\r\n - h (number) hue\r\n - s (number) saturation\r\n - v (number) value or brightness\r\n = (object) RGB object in format:\r\n o {\r\n o r (number) red,\r\n o g (number) green,\r\n o b (number) blue,\r\n o hex (string) color in HTML/CSS format: #••••••\r\n o }\r\n \\*/\r\n R.hsb2rgb = function (h, s, v, o) {\r\n if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) {\r\n v = h.b;\r\n s = h.s;\r\n o = h.o;\r\n h = h.h;\r\n }\r\n h *= 360;\r\n var R, G, B, X, C;\r\n h = (h % 360) / 60;\r\n C = v * s;\r\n X = C * (1 - abs(h % 2 - 1));\r\n R = G = B = v - C;\r\n\r\n h = ~~h;\r\n R += [C, X, 0, 0, X, C][h];\r\n G += [X, C, C, X, 0, 0][h];\r\n B += [0, 0, X, C, C, X][h];\r\n return packageRGB(R, G, B, o);\r\n };\r\n /*\\\r\n * Raphael.hsl2rgb\r\n [ method ]\r\n **\r\n * Converts HSL values to RGB object.\r\n > Parameters\r\n - h (number) hue\r\n - s (number) saturation\r\n - l (number) luminosity\r\n = (object) RGB object in format:\r\n o {\r\n o r (number) red,\r\n o g (number) green,\r\n o b (number) blue,\r\n o hex (string) color in HTML/CSS format: #••••••\r\n o }\r\n \\*/\r\n R.hsl2rgb = function (h, s, l, o) {\r\n if (this.is(h, "object") && "h" in h && "s" in h && "l" in h) {\r\n l = h.l;\r\n s = h.s;\r\n h = h.h;\r\n }\r\n if (h > 1 || s > 1 || l > 1) {\r\n h /= 360;\r\n s /= 100;\r\n l /= 100;\r\n }\r\n h *= 360;\r\n var R, G, B, X, C;\r\n h = (h % 360) / 60;\r\n C = 2 * s * (l < .5 ? l : 1 - l);\r\n X = C * (1 - abs(h % 2 - 1));\r\n R = G = B = l - C / 2;\r\n\r\n h = ~~h;\r\n R += [C, X, 0, 0, X, C][h];\r\n G += [X, C, C, X, 0, 0][h];\r\n B += [0, 0, X, C, C, X][h];\r\n return packageRGB(R, G, B, o);\r\n };\r\n /*\\\r\n * Raphael.rgb2hsb\r\n [ method ]\r\n **\r\n * Converts RGB values to HSB object.\r\n > Parameters\r\n - r (number) red\r\n - g (number) green\r\n - b (number) blue\r\n = (object) HSB object in format:\r\n o {\r\n o h (number) hue\r\n o s (number) saturation\r\n o b (number) brightness\r\n o }\r\n \\*/\r\n R.rgb2hsb = function (r, g, b) {\r\n b = prepareRGB(r, g, b);\r\n r = b[0];\r\n g = b[1];\r\n b = b[2];\r\n\r\n var H, S, V, C;\r\n V = mmax(r, g, b);\r\n C = V - mmin(r, g, b);\r\n H = (C == 0 ? null :\r\n V == r ? (g - b) / C :\r\n V == g ? (b - r) / C + 2 :\r\n (r - g) / C + 4\r\n );\r\n H = ((H + 360) % 6) * 60 / 360;\r\n S = C == 0 ? 0 : C / V;\r\n return {h: H, s: S, b: V, toString: hsbtoString};\r\n };\r\n /*\\\r\n * Raphael.rgb2hsl\r\n [ method ]\r\n **\r\n * Converts RGB values to HSL object.\r\n > Parameters\r\n - r (number) red\r\n - g (number) green\r\n - b (number) blue\r\n = (object) HSL object in format:\r\n o {\r\n o h (number) hue\r\n o s (number) saturation\r\n o l (number) luminosity\r\n o }\r\n \\*/\r\n R.rgb2hsl = function (r, g, b) {\r\n b = prepareRGB(r, g, b);\r\n r = b[0];\r\n g = b[1];\r\n b = b[2];\r\n\r\n var H, S, L, M, m, C;\r\n M = mmax(r, g, b);\r\n m = mmin(r, g, b);\r\n C = M - m;\r\n H = (C == 0 ? null :\r\n M == r ? (g - b) / C :\r\n M == g ? (b - r) / C + 2 :\r\n (r - g) / C + 4);\r\n H = ((H + 360) % 6) * 60 / 360;\r\n L = (M + m) / 2;\r\n S = (C == 0 ? 0 :\r\n L < .5 ? C / (2 * L) :\r\n C / (2 - 2 * L));\r\n return {h: H, s: S, l: L, toString: hsltoString};\r\n };\r\n R._path2string = function () {\r\n return this.join(",").replace(p2s, "$1");\r\n };\r\n function repush(array, item) {\r\n for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) {\r\n return array.push(array.splice(i, 1)[0]);\r\n }\r\n }\r\n function cacher(f, scope, postprocessor) {\r\n function newf() {\r\n var arg = Array.prototype.slice.call(arguments, 0),\r\n args = arg.join("\\u2400"),\r\n cache = newf.cache = newf.cache || {},\r\n count = newf.count = newf.count || [];\r\n if (cache[has](args)) {\r\n repush(count, args);\r\n return postprocessor ? postprocessor(cache[args]) : cache[args];\r\n }\r\n count.length >= 1e3 && delete cache[count.shift()];\r\n count.push(args);\r\n cache[args] = f[apply](scope, arg);\r\n return postprocessor ? postprocessor(cache[args]) : cache[args];\r\n }\r\n return newf;\r\n }\r\n\r\n var preload = R._preload = function (src, f) {\r\n var img = g.doc.createElement("img");\r\n img.style.cssText = "position:absolute;left:-9999em;top:-9999em";\r\n img.onload = function () {\r\n f.call(this);\r\n this.onload = null;\r\n g.doc.body.removeChild(this);\r\n };\r\n img.onerror = function () {\r\n g.doc.body.removeChild(this);\r\n };\r\n g.doc.body.appendChild(img);\r\n img.src = src;\r\n };\r\n\r\n function clrToString() {\r\n return this.hex;\r\n }\r\n\r\n /*\\\r\n * Raphael.getRGB\r\n [ method ]\r\n **\r\n * Parses colour string as RGB object\r\n > Parameters\r\n - colour (string) colour string in one of formats:\r\n #
      \r\n #
    • Colour name (“red”, “green”, “cornflowerblue”, etc)
    • \r\n #
    • #••• — shortened HTML colour: (“#000”, “#fc0”, etc)
    • \r\n #
    • #•••••• — full length HTML colour: (“#000000”, “#bd2300”)
    • \r\n #
    • rgb(•••, •••, •••) — red, green and blue channels’ values: (“rgb(200, 100, 0)”)
    • \r\n #
    • rgb(•••%, •••%, •••%) — same as above, but in %: (“rgb(100%, 175%, 0%)”)
    • \r\n #
    • hsb(•••, •••, •••) — hue, saturation and brightness values: (“hsb(0.5, 0.25, 1)”)
    • \r\n #
    • hsb(•••%, •••%, •••%) — same as above, but in %
    • \r\n #
    • hsl(•••, •••, •••) — same as hsb
    • \r\n #
    • hsl(•••%, •••%, •••%) — same as hsb
    • \r\n #
    \r\n = (object) RGB object in format:\r\n o {\r\n o r (number) red,\r\n o g (number) green,\r\n o b (number) blue\r\n o hex (string) color in HTML/CSS format: #••••••,\r\n o error (boolean) true if string can’t be parsed\r\n o }\r\n \\*/\r\n R.getRGB = cacher(function (colour) {\r\n if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) {\r\n return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString};\r\n }\r\n if (colour == "none") {\r\n return {r: -1, g: -1, b: -1, hex: "none", toString: clrToString};\r\n }\r\n !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour));\r\n var res,\r\n red,\r\n green,\r\n blue,\r\n opacity,\r\n t,\r\n values,\r\n rgb = colour.match(colourRegExp);\r\n if (rgb) {\r\n if (rgb[2]) {\r\n blue = toInt(rgb[2].substring(5), 16);\r\n green = toInt(rgb[2].substring(3, 5), 16);\r\n red = toInt(rgb[2].substring(1, 3), 16);\r\n }\r\n if (rgb[3]) {\r\n blue = toInt((t = rgb[3].charAt(3)) + t, 16);\r\n green = toInt((t = rgb[3].charAt(2)) + t, 16);\r\n red = toInt((t = rgb[3].charAt(1)) + t, 16);\r\n }\r\n if (rgb[4]) {\r\n values = rgb[4][split](commaSpaces);\r\n red = toFloat(values[0]);\r\n values[0].slice(-1) == "%" && (red *= 2.55);\r\n green = toFloat(values[1]);\r\n values[1].slice(-1) == "%" && (green *= 2.55);\r\n blue = toFloat(values[2]);\r\n values[2].slice(-1) == "%" && (blue *= 2.55);\r\n rgb[1].toLowerCase().slice(0, 4) == "rgba" && (opacity = toFloat(values[3]));\r\n values[3] && values[3].slice(-1) == "%" && (opacity /= 100);\r\n }\r\n if (rgb[5]) {\r\n values = rgb[5][split](commaSpaces);\r\n red = toFloat(values[0]);\r\n values[0].slice(-1) == "%" && (red *= 2.55);\r\n green = toFloat(values[1]);\r\n values[1].slice(-1) == "%" && (green *= 2.55);\r\n blue = toFloat(values[2]);\r\n values[2].slice(-1) == "%" && (blue *= 2.55);\r\n (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\\xb0") && (red /= 360);\r\n rgb[1].toLowerCase().slice(0, 4) == "hsba" && (opacity = toFloat(values[3]));\r\n values[3] && values[3].slice(-1) == "%" && (opacity /= 100);\r\n return R.hsb2rgb(red, green, blue, opacity);\r\n }\r\n if (rgb[6]) {\r\n values = rgb[6][split](commaSpaces);\r\n red = toFloat(values[0]);\r\n values[0].slice(-1) == "%" && (red *= 2.55);\r\n green = toFloat(values[1]);\r\n values[1].slice(-1) == "%" && (green *= 2.55);\r\n blue = toFloat(values[2]);\r\n values[2].slice(-1) == "%" && (blue *= 2.55);\r\n (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\\xb0") && (red /= 360);\r\n rgb[1].toLowerCase().slice(0, 4) == "hsla" && (opacity = toFloat(values[3]));\r\n values[3] && values[3].slice(-1) == "%" && (opacity /= 100);\r\n return R.hsl2rgb(red, green, blue, opacity);\r\n }\r\n rgb = {r: red, g: green, b: blue, toString: clrToString};\r\n rgb.hex = "#" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1);\r\n R.is(opacity, "finite") && (rgb.opacity = opacity);\r\n return rgb;\r\n }\r\n return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString};\r\n }, R);\r\n /*\\\r\n * Raphael.hsb\r\n [ method ]\r\n **\r\n * Converts HSB values to hex representation of the colour.\r\n > Parameters\r\n - h (number) hue\r\n - s (number) saturation\r\n - b (number) value or brightness\r\n = (string) hex representation of the colour.\r\n \\*/\r\n R.hsb = cacher(function (h, s, b) {\r\n return R.hsb2rgb(h, s, b).hex;\r\n });\r\n /*\\\r\n * Raphael.hsl\r\n [ method ]\r\n **\r\n * Converts HSL values to hex representation of the colour.\r\n > Parameters\r\n - h (number) hue\r\n - s (number) saturation\r\n - l (number) luminosity\r\n = (string) hex representation of the colour.\r\n \\*/\r\n R.hsl = cacher(function (h, s, l) {\r\n return R.hsl2rgb(h, s, l).hex;\r\n });\r\n /*\\\r\n * Raphael.rgb\r\n [ method ]\r\n **\r\n * Converts RGB values to hex representation of the colour.\r\n > Parameters\r\n - r (number) red\r\n - g (number) green\r\n - b (number) blue\r\n = (string) hex representation of the colour.\r\n \\*/\r\n R.rgb = cacher(function (r, g, b) {\r\n function round(x) { return (x + 0.5) | 0; }\r\n return "#" + (16777216 | round(b) | (round(g) << 8) | (round(r) << 16)).toString(16).slice(1);\r\n });\r\n /*\\\r\n * Raphael.getColor\r\n [ method ]\r\n **\r\n * On each call returns next colour in the spectrum. To reset it back to red call @Raphael.getColor.reset\r\n > Parameters\r\n - value (number) #optional brightness, default is `0.75`\r\n = (string) hex representation of the colour.\r\n \\*/\r\n R.getColor = function (value) {\r\n var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75},\r\n rgb = this.hsb2rgb(start.h, start.s, start.b);\r\n start.h += .075;\r\n if (start.h > 1) {\r\n start.h = 0;\r\n start.s -= .2;\r\n start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b});\r\n }\r\n return rgb.hex;\r\n };\r\n /*\\\r\n * Raphael.getColor.reset\r\n [ method ]\r\n **\r\n * Resets spectrum position for @Raphael.getColor back to red.\r\n \\*/\r\n R.getColor.reset = function () {\r\n delete this.start;\r\n };\r\n\r\n // http://schepers.cc/getting-to-the-point\r\n function catmullRom2bezier(crp, z) {\r\n var d = [];\r\n for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {\r\n var p = [\r\n {x: +crp[i - 2], y: +crp[i - 1]},\r\n {x: +crp[i], y: +crp[i + 1]},\r\n {x: +crp[i + 2], y: +crp[i + 3]},\r\n {x: +crp[i + 4], y: +crp[i + 5]}\r\n ];\r\n if (z) {\r\n if (!i) {\r\n p[0] = {x: +crp[iLen - 2], y: +crp[iLen - 1]};\r\n } else if (iLen - 4 == i) {\r\n p[3] = {x: +crp[0], y: +crp[1]};\r\n } else if (iLen - 2 == i) {\r\n p[2] = {x: +crp[0], y: +crp[1]};\r\n p[3] = {x: +crp[2], y: +crp[3]};\r\n }\r\n } else {\r\n if (iLen - 4 == i) {\r\n p[3] = p[2];\r\n } else if (!i) {\r\n p[0] = {x: +crp[i], y: +crp[i + 1]};\r\n }\r\n }\r\n d.push(["C",\r\n (-p[0].x + 6 * p[1].x + p[2].x) / 6,\r\n (-p[0].y + 6 * p[1].y + p[2].y) / 6,\r\n (p[1].x + 6 * p[2].x - p[3].x) / 6,\r\n (p[1].y + 6*p[2].y - p[3].y) / 6,\r\n p[2].x,\r\n p[2].y\r\n ]);\r\n }\r\n\r\n return d;\r\n }\r\n /*\\\r\n * Raphael.parsePathString\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Parses given path string into an array of arrays of path segments.\r\n > Parameters\r\n - pathString (string|array) path string or array of segments (in the last case it will be returned straight away)\r\n = (array) array of segments.\r\n \\*/\r\n R.parsePathString = function (pathString) {\r\n if (!pathString) {\r\n return null;\r\n }\r\n var pth = paths(pathString);\r\n if (pth.arr) {\r\n return pathClone(pth.arr);\r\n }\r\n\r\n var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0},\r\n data = [];\r\n if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption\r\n data = pathClone(pathString);\r\n }\r\n if (!data.length) {\r\n Str(pathString).replace(pathCommand, function (a, b, c) {\r\n var params = [],\r\n name = b.toLowerCase();\r\n c.replace(pathValues, function (a, b) {\r\n b && params.push(+b);\r\n });\r\n if (name == "m" && params.length > 2) {\r\n data.push([b][concat](params.splice(0, 2)));\r\n name = "l";\r\n b = b == "m" ? "l" : "L";\r\n }\r\n if (name == "r") {\r\n data.push([b][concat](params));\r\n } else while (params.length >= paramCounts[name]) {\r\n data.push([b][concat](params.splice(0, paramCounts[name])));\r\n if (!paramCounts[name]) {\r\n break;\r\n }\r\n }\r\n });\r\n }\r\n data.toString = R._path2string;\r\n pth.arr = pathClone(data);\r\n return data;\r\n };\r\n /*\\\r\n * Raphael.parseTransformString\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Parses given path string into an array of transformations.\r\n > Parameters\r\n - TString (string|array) transform string or array of transformations (in the last case it will be returned straight away)\r\n = (array) array of transformations.\r\n \\*/\r\n R.parseTransformString = cacher(function (TString) {\r\n if (!TString) {\r\n return null;\r\n }\r\n var paramCounts = {r: 3, s: 4, t: 2, m: 6},\r\n data = [];\r\n if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption\r\n data = pathClone(TString);\r\n }\r\n if (!data.length) {\r\n Str(TString).replace(tCommand, function (a, b, c) {\r\n var params = [],\r\n name = lowerCase.call(b);\r\n c.replace(pathValues, function (a, b) {\r\n b && params.push(+b);\r\n });\r\n data.push([b][concat](params));\r\n });\r\n }\r\n data.toString = R._path2string;\r\n return data;\r\n });\r\n // PATHS\r\n var paths = function (ps) {\r\n var p = paths.ps = paths.ps || {};\r\n if (p[ps]) {\r\n p[ps].sleep = 100;\r\n } else {\r\n p[ps] = {\r\n sleep: 100\r\n };\r\n }\r\n setTimeout(function () {\r\n for (var key in p) if (p[has](key) && key != ps) {\r\n p[key].sleep--;\r\n !p[key].sleep && delete p[key];\r\n }\r\n });\r\n return p[ps];\r\n };\r\n /*\\\r\n * Raphael.findDotsAtSegment\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Find dot coordinates on the given cubic bezier curve at the given t.\r\n > Parameters\r\n - p1x (number) x of the first point of the curve\r\n - p1y (number) y of the first point of the curve\r\n - c1x (number) x of the first anchor of the curve\r\n - c1y (number) y of the first anchor of the curve\r\n - c2x (number) x of the second anchor of the curve\r\n - c2y (number) y of the second anchor of the curve\r\n - p2x (number) x of the second point of the curve\r\n - p2y (number) y of the second point of the curve\r\n - t (number) position on the curve (0..1)\r\n = (object) point information in format:\r\n o {\r\n o x: (number) x coordinate of the point\r\n o y: (number) y coordinate of the point\r\n o m: {\r\n o x: (number) x coordinate of the left anchor\r\n o y: (number) y coordinate of the left anchor\r\n o }\r\n o n: {\r\n o x: (number) x coordinate of the right anchor\r\n o y: (number) y coordinate of the right anchor\r\n o }\r\n o start: {\r\n o x: (number) x coordinate of the start of the curve\r\n o y: (number) y coordinate of the start of the curve\r\n o }\r\n o end: {\r\n o x: (number) x coordinate of the end of the curve\r\n o y: (number) y coordinate of the end of the curve\r\n o }\r\n o alpha: (number) angle of the curve derivative at the point\r\n o }\r\n \\*/\r\n R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\r\n var t1 = 1 - t,\r\n t13 = pow(t1, 3),\r\n t12 = pow(t1, 2),\r\n t2 = t * t,\r\n t3 = t2 * t,\r\n x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x,\r\n y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y,\r\n mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x),\r\n my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y),\r\n nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x),\r\n ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y),\r\n ax = t1 * p1x + t * c1x,\r\n ay = t1 * p1y + t * c1y,\r\n cx = t1 * c2x + t * p2x,\r\n cy = t1 * c2y + t * p2y,\r\n alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI);\r\n (mx > nx || my < ny) && (alpha += 180);\r\n return {\r\n x: x,\r\n y: y,\r\n m: {x: mx, y: my},\r\n n: {x: nx, y: ny},\r\n start: {x: ax, y: ay},\r\n end: {x: cx, y: cy},\r\n alpha: alpha\r\n };\r\n };\r\n /*\\\r\n * Raphael.bezierBBox\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Return bounding box of a given cubic bezier curve\r\n > Parameters\r\n - p1x (number) x of the first point of the curve\r\n - p1y (number) y of the first point of the curve\r\n - c1x (number) x of the first anchor of the curve\r\n - c1y (number) y of the first anchor of the curve\r\n - c2x (number) x of the second anchor of the curve\r\n - c2y (number) y of the second anchor of the curve\r\n - p2x (number) x of the second point of the curve\r\n - p2y (number) y of the second point of the curve\r\n * or\r\n - bez (array) array of six points for bezier curve\r\n = (object) point information in format:\r\n o {\r\n o min: {\r\n o x: (number) x coordinate of the left point\r\n o y: (number) y coordinate of the top point\r\n o }\r\n o max: {\r\n o x: (number) x coordinate of the right point\r\n o y: (number) y coordinate of the bottom point\r\n o }\r\n o }\r\n \\*/\r\n R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\r\n if (!R.is(p1x, "array")) {\r\n p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y];\r\n }\r\n var bbox = curveDim.apply(null, p1x);\r\n return {\r\n x: bbox.min.x,\r\n y: bbox.min.y,\r\n x2: bbox.max.x,\r\n y2: bbox.max.y,\r\n width: bbox.max.x - bbox.min.x,\r\n height: bbox.max.y - bbox.min.y\r\n };\r\n };\r\n /*\\\r\n * Raphael.isPointInsideBBox\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns `true` if given point is inside bounding boxes.\r\n > Parameters\r\n - bbox (string) bounding box\r\n - x (string) x coordinate of the point\r\n - y (string) y coordinate of the point\r\n = (boolean) `true` if point inside\r\n \\*/\r\n R.isPointInsideBBox = function (bbox, x, y) {\r\n return x >= bbox.x && x <= bbox.x2 && y >= bbox.y && y <= bbox.y2;\r\n };\r\n /*\\\r\n * Raphael.isBBoxIntersect\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns `true` if two bounding boxes intersect\r\n > Parameters\r\n - bbox1 (string) first bounding box\r\n - bbox2 (string) second bounding box\r\n = (boolean) `true` if they intersect\r\n \\*/\r\n R.isBBoxIntersect = function (bbox1, bbox2) {\r\n var i = R.isPointInsideBBox;\r\n return i(bbox2, bbox1.x, bbox1.y)\r\n || i(bbox2, bbox1.x2, bbox1.y)\r\n || i(bbox2, bbox1.x, bbox1.y2)\r\n || i(bbox2, bbox1.x2, bbox1.y2)\r\n || i(bbox1, bbox2.x, bbox2.y)\r\n || i(bbox1, bbox2.x2, bbox2.y)\r\n || i(bbox1, bbox2.x, bbox2.y2)\r\n || i(bbox1, bbox2.x2, bbox2.y2)\r\n || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x)\r\n && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y);\r\n };\r\n function base3(t, p1, p2, p3, p4) {\r\n var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4,\r\n t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;\r\n return t * t2 - 3 * p1 + 3 * p2;\r\n }\r\n function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {\r\n if (z == null) {\r\n z = 1;\r\n }\r\n z = z > 1 ? 1 : z < 0 ? 0 : z;\r\n var z2 = z / 2,\r\n n = 12,\r\n Tvalues = [-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816],\r\n Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],\r\n sum = 0;\r\n for (var i = 0; i < n; i++) {\r\n var ct = z2 * Tvalues[i] + z2,\r\n xbase = base3(ct, x1, x2, x3, x4),\r\n ybase = base3(ct, y1, y2, y3, y4),\r\n comb = xbase * xbase + ybase * ybase;\r\n sum += Cvalues[i] * math.sqrt(comb);\r\n }\r\n return z2 * sum;\r\n }\r\n function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {\r\n if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) {\r\n return;\r\n }\r\n var t = 1,\r\n step = t / 2,\r\n t2 = t - step,\r\n l,\r\n e = .01;\r\n l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);\r\n while (abs(l - ll) > e) {\r\n step /= 2;\r\n t2 += (l < ll ? 1 : -1) * step;\r\n l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);\r\n }\r\n return t2;\r\n }\r\n function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {\r\n if (\r\n mmax(x1, x2) < mmin(x3, x4) ||\r\n mmin(x1, x2) > mmax(x3, x4) ||\r\n mmax(y1, y2) < mmin(y3, y4) ||\r\n mmin(y1, y2) > mmax(y3, y4)\r\n ) {\r\n return;\r\n }\r\n var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\r\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\r\n denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\r\n\r\n if (!denominator) {\r\n return;\r\n }\r\n var px = nx / denominator,\r\n py = ny / denominator,\r\n px2 = +px.toFixed(2),\r\n py2 = +py.toFixed(2);\r\n if (\r\n px2 < +mmin(x1, x2).toFixed(2) ||\r\n px2 > +mmax(x1, x2).toFixed(2) ||\r\n px2 < +mmin(x3, x4).toFixed(2) ||\r\n px2 > +mmax(x3, x4).toFixed(2) ||\r\n py2 < +mmin(y1, y2).toFixed(2) ||\r\n py2 > +mmax(y1, y2).toFixed(2) ||\r\n py2 < +mmin(y3, y4).toFixed(2) ||\r\n py2 > +mmax(y3, y4).toFixed(2)\r\n ) {\r\n return;\r\n }\r\n return {x: px, y: py};\r\n }\r\n function inter(bez1, bez2) {\r\n return interHelper(bez1, bez2);\r\n }\r\n function interCount(bez1, bez2) {\r\n return interHelper(bez1, bez2, 1);\r\n }\r\n function interHelper(bez1, bez2, justCount) {\r\n var bbox1 = R.bezierBBox(bez1),\r\n bbox2 = R.bezierBBox(bez2);\r\n if (!R.isBBoxIntersect(bbox1, bbox2)) {\r\n return justCount ? 0 : [];\r\n }\r\n var l1 = bezlen.apply(0, bez1),\r\n l2 = bezlen.apply(0, bez2),\r\n n1 = mmax(~~(l1 / 5), 1),\r\n n2 = mmax(~~(l2 / 5), 1),\r\n dots1 = [],\r\n dots2 = [],\r\n xy = {},\r\n res = justCount ? 0 : [];\r\n for (var i = 0; i < n1 + 1; i++) {\r\n var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1));\r\n dots1.push({x: p.x, y: p.y, t: i / n1});\r\n }\r\n for (i = 0; i < n2 + 1; i++) {\r\n p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2));\r\n dots2.push({x: p.x, y: p.y, t: i / n2});\r\n }\r\n for (i = 0; i < n1; i++) {\r\n for (var j = 0; j < n2; j++) {\r\n var di = dots1[i],\r\n di1 = dots1[i + 1],\r\n dj = dots2[j],\r\n dj1 = dots2[j + 1],\r\n ci = abs(di1.x - di.x) < .001 ? "y" : "x",\r\n cj = abs(dj1.x - dj.x) < .001 ? "y" : "x",\r\n is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y);\r\n if (is) {\r\n if (xy[is.x.toFixed(4)] == is.y.toFixed(4)) {\r\n continue;\r\n }\r\n xy[is.x.toFixed(4)] = is.y.toFixed(4);\r\n var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t),\r\n t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);\r\n if (t1 >= 0 && t1 <= 1.001 && t2 >= 0 && t2 <= 1.001) {\r\n if (justCount) {\r\n res++;\r\n } else {\r\n res.push({\r\n x: is.x,\r\n y: is.y,\r\n t1: mmin(t1, 1),\r\n t2: mmin(t2, 1)\r\n });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return res;\r\n }\r\n /*\\\r\n * Raphael.pathIntersection\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Finds intersections of two paths\r\n > Parameters\r\n - path1 (string) path string\r\n - path2 (string) path string\r\n = (array) dots of intersection\r\n o [\r\n o {\r\n o x: (number) x coordinate of the point\r\n o y: (number) y coordinate of the point\r\n o t1: (number) t value for segment of path1\r\n o t2: (number) t value for segment of path2\r\n o segment1: (number) order number for segment of path1\r\n o segment2: (number) order number for segment of path2\r\n o bez1: (array) eight coordinates representing beziér curve for the segment of path1\r\n o bez2: (array) eight coordinates representing beziér curve for the segment of path2\r\n o }\r\n o ]\r\n \\*/\r\n R.pathIntersection = function (path1, path2) {\r\n return interPathHelper(path1, path2);\r\n };\r\n R.pathIntersectionNumber = function (path1, path2) {\r\n return interPathHelper(path1, path2, 1);\r\n };\r\n function interPathHelper(path1, path2, justCount) {\r\n path1 = R._path2curve(path1);\r\n path2 = R._path2curve(path2);\r\n var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2,\r\n res = justCount ? 0 : [];\r\n for (var i = 0, ii = path1.length; i < ii; i++) {\r\n var pi = path1[i];\r\n if (pi[0] == "M") {\r\n x1 = x1m = pi[1];\r\n y1 = y1m = pi[2];\r\n } else {\r\n if (pi[0] == "C") {\r\n bez1 = [x1, y1].concat(pi.slice(1));\r\n x1 = bez1[6];\r\n y1 = bez1[7];\r\n } else {\r\n bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m];\r\n x1 = x1m;\r\n y1 = y1m;\r\n }\r\n for (var j = 0, jj = path2.length; j < jj; j++) {\r\n var pj = path2[j];\r\n if (pj[0] == "M") {\r\n x2 = x2m = pj[1];\r\n y2 = y2m = pj[2];\r\n } else {\r\n if (pj[0] == "C") {\r\n bez2 = [x2, y2].concat(pj.slice(1));\r\n x2 = bez2[6];\r\n y2 = bez2[7];\r\n } else {\r\n bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m];\r\n x2 = x2m;\r\n y2 = y2m;\r\n }\r\n var intr = interHelper(bez1, bez2, justCount);\r\n if (justCount) {\r\n res += intr;\r\n } else {\r\n for (var k = 0, kk = intr.length; k < kk; k++) {\r\n intr[k].segment1 = i;\r\n intr[k].segment2 = j;\r\n intr[k].bez1 = bez1;\r\n intr[k].bez2 = bez2;\r\n }\r\n res = res.concat(intr);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return res;\r\n }\r\n /*\\\r\n * Raphael.isPointInsidePath\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns `true` if given point is inside a given closed path.\r\n > Parameters\r\n - path (string) path string\r\n - x (number) x of the point\r\n - y (number) y of the point\r\n = (boolean) true, if point is inside the path\r\n \\*/\r\n R.isPointInsidePath = function (path, x, y) {\r\n var bbox = R.pathBBox(path);\r\n return R.isPointInsideBBox(bbox, x, y) &&\r\n interPathHelper(path, [["M", x, y], ["H", bbox.x2 + 10]], 1) % 2 == 1;\r\n };\r\n R._removedFactory = function (methodname) {\r\n return function () {\r\n eve("raphael.log", null, "Rapha\\xebl: you are calling to method \\u201c" + methodname + "\\u201d of removed object", methodname);\r\n };\r\n };\r\n /*\\\r\n * Raphael.pathBBox\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Return bounding box of a given path\r\n > Parameters\r\n - path (string) path string\r\n = (object) bounding box\r\n o {\r\n o x: (number) x coordinate of the left top point of the box\r\n o y: (number) y coordinate of the left top point of the box\r\n o x2: (number) x coordinate of the right bottom point of the box\r\n o y2: (number) y coordinate of the right bottom point of the box\r\n o width: (number) width of the box\r\n o height: (number) height of the box\r\n o cx: (number) x coordinate of the center of the box\r\n o cy: (number) y coordinate of the center of the box\r\n o }\r\n \\*/\r\n var pathDimensions = R.pathBBox = function (path) {\r\n var pth = paths(path);\r\n if (pth.bbox) {\r\n var b= pth.bbox;\r\n return {x: b.x, y: b.y, width: b.width, height: b.height, x2: b.x2, y2: b.y2} ; // FREEGROUP FIX!!!!!!\r\n // raphael reuse the returned bbox. You must clone it here if the caller need the bbxo for\r\n //further calculation\r\n }\r\n if (!path) {\r\n return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0};\r\n }\r\n path = path2curve(path);\r\n var x = 0,\r\n y = 0,\r\n X = [],\r\n Y = [],\r\n p;\r\n for (var i = 0, ii = path.length; i < ii; i++) {\r\n p = path[i];\r\n if (p[0] == "M") {\r\n x = p[1];\r\n y = p[2];\r\n X.push(x);\r\n Y.push(y);\r\n } else {\r\n var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);\r\n X = X[concat](dim.min.x, dim.max.x);\r\n Y = Y[concat](dim.min.y, dim.max.y);\r\n x = p[5];\r\n y = p[6];\r\n }\r\n }\r\n var xmin = mmin[apply](0, X),\r\n ymin = mmin[apply](0, Y),\r\n xmax = mmax[apply](0, X),\r\n ymax = mmax[apply](0, Y),\r\n width = xmax - xmin,\r\n height = ymax - ymin,\r\n bb = {\r\n x: xmin,\r\n y: ymin,\r\n x2: xmax,\r\n y2: ymax,\r\n width: width,\r\n height: height,\r\n cx: xmin + width / 2,\r\n cy: ymin + height / 2\r\n };\r\n pth.bbox = clone(bb);\r\n return bb;\r\n },\r\n pathClone = function (pathArray) {\r\n var res = clone(pathArray);\r\n res.toString = R._path2string;\r\n return res;\r\n },\r\n pathToRelative = R._pathToRelative = function (pathArray) {\r\n var pth = paths(pathArray);\r\n if (pth.rel) {\r\n return pathClone(pth.rel);\r\n }\r\n if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption\r\n pathArray = R.parsePathString(pathArray);\r\n }\r\n var res = [],\r\n x = 0,\r\n y = 0,\r\n mx = 0,\r\n my = 0,\r\n start = 0;\r\n if (pathArray[0][0] == "M") {\r\n x = pathArray[0][1];\r\n y = pathArray[0][2];\r\n mx = x;\r\n my = y;\r\n start++;\r\n res.push(["M", x, y]);\r\n }\r\n for (var i = start, ii = pathArray.length; i < ii; i++) {\r\n var r = res[i] = [],\r\n pa = pathArray[i];\r\n if (pa[0] != lowerCase.call(pa[0])) {\r\n r[0] = lowerCase.call(pa[0]);\r\n switch (r[0]) {\r\n case "a":\r\n r[1] = pa[1];\r\n r[2] = pa[2];\r\n r[3] = pa[3];\r\n r[4] = pa[4];\r\n r[5] = pa[5];\r\n r[6] = +(pa[6] - x).toFixed(3);\r\n r[7] = +(pa[7] - y).toFixed(3);\r\n break;\r\n case "v":\r\n r[1] = +(pa[1] - y).toFixed(3);\r\n break;\r\n case "m":\r\n mx = pa[1];\r\n my = pa[2];\r\n default:\r\n for (var j = 1, jj = pa.length; j < jj; j++) {\r\n r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3);\r\n }\r\n }\r\n } else {\r\n r = res[i] = [];\r\n if (pa[0] == "m") {\r\n mx = pa[1] + x;\r\n my = pa[2] + y;\r\n }\r\n for (var k = 0, kk = pa.length; k < kk; k++) {\r\n res[i][k] = pa[k];\r\n }\r\n }\r\n var len = res[i].length;\r\n switch (res[i][0]) {\r\n case "z":\r\n x = mx;\r\n y = my;\r\n break;\r\n case "h":\r\n x += +res[i][len - 1];\r\n break;\r\n case "v":\r\n y += +res[i][len - 1];\r\n break;\r\n default:\r\n x += +res[i][len - 2];\r\n y += +res[i][len - 1];\r\n }\r\n }\r\n res.toString = R._path2string;\r\n pth.rel = pathClone(res);\r\n return res;\r\n },\r\n pathToAbsolute = R._pathToAbsolute = function (pathArray) {\r\n var pth = paths(pathArray);\r\n if (pth.abs) {\r\n return pathClone(pth.abs);\r\n }\r\n if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption\r\n pathArray = R.parsePathString(pathArray);\r\n }\r\n if (!pathArray || !pathArray.length) {\r\n return [["M", 0, 0]];\r\n }\r\n var res = [],\r\n x = 0,\r\n y = 0,\r\n mx = 0,\r\n my = 0,\r\n start = 0;\r\n if (pathArray[0][0] == "M") {\r\n x = +pathArray[0][1];\r\n y = +pathArray[0][2];\r\n mx = x;\r\n my = y;\r\n start++;\r\n res[0] = ["M", x, y];\r\n }\r\n var crz = pathArray.length == 3 && pathArray[0][0] == "M" && pathArray[1][0].toUpperCase() == "R" && pathArray[2][0].toUpperCase() == "Z";\r\n for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) {\r\n res.push(r = []);\r\n pa = pathArray[i];\r\n if (pa[0] != upperCase.call(pa[0])) {\r\n r[0] = upperCase.call(pa[0]);\r\n switch (r[0]) {\r\n case "A":\r\n r[1] = pa[1];\r\n r[2] = pa[2];\r\n r[3] = pa[3];\r\n r[4] = pa[4];\r\n r[5] = pa[5];\r\n r[6] = +(pa[6] + x);\r\n r[7] = +(pa[7] + y);\r\n break;\r\n case "V":\r\n r[1] = +pa[1] + y;\r\n break;\r\n case "H":\r\n r[1] = +pa[1] + x;\r\n break;\r\n case "R":\r\n var dots = [x, y][concat](pa.slice(1));\r\n for (var j = 2, jj = dots.length; j < jj; j++) {\r\n dots[j] = +dots[j] + x;\r\n dots[++j] = +dots[j] + y;\r\n }\r\n res.pop();\r\n res = res[concat](catmullRom2bezier(dots, crz));\r\n break;\r\n case "M":\r\n mx = +pa[1] + x;\r\n my = +pa[2] + y;\r\n default:\r\n for (j = 1, jj = pa.length; j < jj; j++) {\r\n r[j] = +pa[j] + ((j % 2) ? x : y);\r\n }\r\n }\r\n } else if (pa[0] == "R") {\r\n dots = [x, y][concat](pa.slice(1));\r\n res.pop();\r\n res = res[concat](catmullRom2bezier(dots, crz));\r\n r = ["R"][concat](pa.slice(-2));\r\n } else {\r\n for (var k = 0, kk = pa.length; k < kk; k++) {\r\n r[k] = pa[k];\r\n }\r\n }\r\n switch (r[0]) {\r\n case "Z":\r\n x = mx;\r\n y = my;\r\n break;\r\n case "H":\r\n x = r[1];\r\n break;\r\n case "V":\r\n y = r[1];\r\n break;\r\n case "M":\r\n mx = r[r.length - 2];\r\n my = r[r.length - 1];\r\n default:\r\n x = r[r.length - 2];\r\n y = r[r.length - 1];\r\n }\r\n }\r\n res.toString = R._path2string;\r\n pth.abs = pathClone(res);\r\n return res;\r\n },\r\n l2c = function (x1, y1, x2, y2) {\r\n return [x1, y1, x2, y2, x2, y2];\r\n },\r\n q2c = function (x1, y1, ax, ay, x2, y2) {\r\n var _13 = 1 / 3,\r\n _23 = 2 / 3;\r\n return [\r\n _13 * x1 + _23 * ax,\r\n _13 * y1 + _23 * ay,\r\n _13 * x2 + _23 * ax,\r\n _13 * y2 + _23 * ay,\r\n x2,\r\n y2\r\n ];\r\n },\r\n a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {\r\n // for more information of where this math came from visit:\r\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\r\n var _120 = PI * 120 / 180,\r\n rad = PI / 180 * (+angle || 0),\r\n res = [],\r\n xy,\r\n rotate = cacher(function (x, y, rad) {\r\n var X = x * math.cos(rad) - y * math.sin(rad),\r\n Y = x * math.sin(rad) + y * math.cos(rad);\r\n return {x: X, y: Y};\r\n });\r\n if (!recursive) {\r\n xy = rotate(x1, y1, -rad);\r\n x1 = xy.x;\r\n y1 = xy.y;\r\n xy = rotate(x2, y2, -rad);\r\n x2 = xy.x;\r\n y2 = xy.y;\r\n var cos = math.cos(PI / 180 * angle),\r\n sin = math.sin(PI / 180 * angle),\r\n x = (x1 - x2) / 2,\r\n y = (y1 - y2) / 2;\r\n var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);\r\n if (h > 1) {\r\n h = math.sqrt(h);\r\n rx = h * rx;\r\n ry = h * ry;\r\n }\r\n var rx2 = rx * rx,\r\n ry2 = ry * ry,\r\n k = (large_arc_flag == sweep_flag ? -1 : 1) *\r\n math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))),\r\n cx = k * rx * y / ry + (x1 + x2) / 2,\r\n cy = k * -ry * x / rx + (y1 + y2) / 2,\r\n f1 = math.asin(((y1 - cy) / ry).toFixed(9)),\r\n f2 = math.asin(((y2 - cy) / ry).toFixed(9));\r\n\r\n f1 = x1 < cx ? PI - f1 : f1;\r\n f2 = x2 < cx ? PI - f2 : f2;\r\n f1 < 0 && (f1 = PI * 2 + f1);\r\n f2 < 0 && (f2 = PI * 2 + f2);\r\n if (sweep_flag && f1 > f2) {\r\n f1 = f1 - PI * 2;\r\n }\r\n if (!sweep_flag && f2 > f1) {\r\n f2 = f2 - PI * 2;\r\n }\r\n } else {\r\n f1 = recursive[0];\r\n f2 = recursive[1];\r\n cx = recursive[2];\r\n cy = recursive[3];\r\n }\r\n var df = f2 - f1;\r\n if (abs(df) > _120) {\r\n var f2old = f2,\r\n x2old = x2,\r\n y2old = y2;\r\n f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);\r\n x2 = cx + rx * math.cos(f2);\r\n y2 = cy + ry * math.sin(f2);\r\n res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);\r\n }\r\n df = f2 - f1;\r\n var c1 = math.cos(f1),\r\n s1 = math.sin(f1),\r\n c2 = math.cos(f2),\r\n s2 = math.sin(f2),\r\n t = math.tan(df / 4),\r\n hx = 4 / 3 * rx * t,\r\n hy = 4 / 3 * ry * t,\r\n m1 = [x1, y1],\r\n m2 = [x1 + hx * s1, y1 - hy * c1],\r\n m3 = [x2 + hx * s2, y2 - hy * c2],\r\n m4 = [x2, y2];\r\n m2[0] = 2 * m1[0] - m2[0];\r\n m2[1] = 2 * m1[1] - m2[1];\r\n if (recursive) {\r\n return [m2, m3, m4][concat](res);\r\n } else {\r\n res = [m2, m3, m4][concat](res).join()[split](",");\r\n var newres = [];\r\n for (var i = 0, ii = res.length; i < ii; i++) {\r\n newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;\r\n }\r\n return newres;\r\n }\r\n },\r\n findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\r\n var t1 = 1 - t;\r\n return {\r\n x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x,\r\n y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y\r\n };\r\n },\r\n curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\r\n var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x),\r\n b = 2 * (c1x - p1x) - 2 * (c2x - c1x),\r\n c = p1x - c1x,\r\n t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a,\r\n t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a,\r\n y = [p1y, p2y],\r\n x = [p1x, p2x],\r\n dot;\r\n abs(t1) > "1e12" && (t1 = .5);\r\n abs(t2) > "1e12" && (t2 = .5);\r\n if (t1 > 0 && t1 < 1) {\r\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);\r\n x.push(dot.x);\r\n y.push(dot.y);\r\n }\r\n if (t2 > 0 && t2 < 1) {\r\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);\r\n x.push(dot.x);\r\n y.push(dot.y);\r\n }\r\n a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y);\r\n b = 2 * (c1y - p1y) - 2 * (c2y - c1y);\r\n c = p1y - c1y;\r\n t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a;\r\n t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a;\r\n abs(t1) > "1e12" && (t1 = .5);\r\n abs(t2) > "1e12" && (t2 = .5);\r\n if (t1 > 0 && t1 < 1) {\r\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);\r\n x.push(dot.x);\r\n y.push(dot.y);\r\n }\r\n if (t2 > 0 && t2 < 1) {\r\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);\r\n x.push(dot.x);\r\n y.push(dot.y);\r\n }\r\n return {\r\n min: {x: mmin[apply](0, x), y: mmin[apply](0, y)},\r\n max: {x: mmax[apply](0, x), y: mmax[apply](0, y)}\r\n };\r\n }),\r\n path2curve = R._path2curve = cacher(function (path, path2) {\r\n var pth = !path2 && paths(path);\r\n if (!path2 && pth.curve) {\r\n return pathClone(pth.curve);\r\n }\r\n var p = pathToAbsolute(path),\r\n p2 = path2 && pathToAbsolute(path2),\r\n attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},\r\n attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},\r\n processPath = function (path, d, pcom) {\r\n var nx, ny, tq = {T:1, Q:1};\r\n if (!path) {\r\n return ["C", d.x, d.y, d.x, d.y, d.x, d.y];\r\n }\r\n !(path[0] in tq) && (d.qx = d.qy = null);\r\n switch (path[0]) {\r\n case "M":\r\n d.X = path[1];\r\n d.Y = path[2];\r\n break;\r\n case "A":\r\n path = ["C"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1))));\r\n break;\r\n case "S":\r\n if (pcom == "C" || pcom == "S") { // In "S" case we have to take into account, if the previous command is C/S.\r\n nx = d.x * 2 - d.bx; // And reflect the previous\r\n ny = d.y * 2 - d.by; // command\'s control point relative to the current point.\r\n }\r\n else { // or some else or nothing\r\n nx = d.x;\r\n ny = d.y;\r\n }\r\n path = ["C", nx, ny][concat](path.slice(1));\r\n break;\r\n case "T":\r\n if (pcom == "Q" || pcom == "T") { // In "T" case we have to take into account, if the previous command is Q/T.\r\n d.qx = d.x * 2 - d.qx; // And make a reflection similar\r\n d.qy = d.y * 2 - d.qy; // to case "S".\r\n }\r\n else { // or something else or nothing\r\n d.qx = d.x;\r\n d.qy = d.y;\r\n }\r\n path = ["C"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));\r\n break;\r\n case "Q":\r\n d.qx = path[1];\r\n d.qy = path[2];\r\n path = ["C"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4]));\r\n break;\r\n case "L":\r\n path = ["C"][concat](l2c(d.x, d.y, path[1], path[2]));\r\n break;\r\n case "H":\r\n path = ["C"][concat](l2c(d.x, d.y, path[1], d.y));\r\n break;\r\n case "V":\r\n path = ["C"][concat](l2c(d.x, d.y, d.x, path[1]));\r\n break;\r\n case "Z":\r\n path = ["C"][concat](l2c(d.x, d.y, d.X, d.Y));\r\n break;\r\n }\r\n return path;\r\n },\r\n fixArc = function (pp, i) {\r\n if (pp[i].length > 7) {\r\n pp[i].shift();\r\n var pi = pp[i];\r\n while (pi.length) {\r\n pcoms1[i]="A"; // if created multiple C:s, their original seg is saved\r\n p2 && (pcoms2[i]="A"); // the same as above\r\n pp.splice(i++, 0, ["C"][concat](pi.splice(0, 6)));\r\n }\r\n pp.splice(i, 1);\r\n ii = mmax(p.length, p2 && p2.length || 0);\r\n }\r\n },\r\n fixM = function (path1, path2, a1, a2, i) {\r\n if (path1 && path2 && path1[i][0] == "M" && path2[i][0] != "M") {\r\n path2.splice(i, 0, ["M", a2.x, a2.y]);\r\n a1.bx = 0;\r\n a1.by = 0;\r\n a1.x = path1[i][1];\r\n a1.y = path1[i][2];\r\n ii = mmax(p.length, p2 && p2.length || 0);\r\n }\r\n },\r\n pcoms1 = [], // path commands of original path p\r\n pcoms2 = [], // path commands of original path p2\r\n pfirst = "", // temporary holder for original path command\r\n pcom = ""; // holder for previous path command of original path\r\n for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) {\r\n p[i] && (pfirst = p[i][0]); // save current path command\r\n\r\n if (pfirst != "C") // C is not saved yet, because it may be result of conversion\r\n {\r\n pcoms1[i] = pfirst; // Save current path command\r\n i && ( pcom = pcoms1[i-1]); // Get previous path command pcom\r\n }\r\n p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath\r\n\r\n if (pcoms1[i] != "A" && pfirst == "C") pcoms1[i] = "C"; // A is the only command\r\n // which may produce multiple C:s\r\n // so we have to make sure that C is also C in original path\r\n\r\n fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1\r\n\r\n if (p2) { // the same procedures is done to p2\r\n p2[i] && (pfirst = p2[i][0]);\r\n if (pfirst != "C")\r\n {\r\n pcoms2[i] = pfirst;\r\n i && (pcom = pcoms2[i-1]);\r\n }\r\n p2[i] = processPath(p2[i], attrs2, pcom);\r\n\r\n if (pcoms2[i]!="A" && pfirst=="C") pcoms2[i]="C";\r\n\r\n fixArc(p2, i);\r\n }\r\n fixM(p, p2, attrs, attrs2, i);\r\n fixM(p2, p, attrs2, attrs, i);\r\n var seg = p[i],\r\n seg2 = p2 && p2[i],\r\n seglen = seg.length,\r\n seg2len = p2 && seg2.length;\r\n attrs.x = seg[seglen - 2];\r\n attrs.y = seg[seglen - 1];\r\n attrs.bx = toFloat(seg[seglen - 4]) || attrs.x;\r\n attrs.by = toFloat(seg[seglen - 3]) || attrs.y;\r\n attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x);\r\n attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y);\r\n attrs2.x = p2 && seg2[seg2len - 2];\r\n attrs2.y = p2 && seg2[seg2len - 1];\r\n }\r\n if (!p2) {\r\n pth.curve = pathClone(p);\r\n }\r\n return p2 ? [p, p2] : p;\r\n }, null, pathClone),\r\n parseDots = R._parseDots = cacher(function (gradient) {\r\n var dots = [];\r\n for (var i = 0, ii = gradient.length; i < ii; i++) {\r\n var dot = {},\r\n par = gradient[i].match(/^([^:]*):?([\\d\\.]*)/);\r\n dot.color = R.getRGB(par[1]);\r\n if (dot.color.error) {\r\n return null;\r\n }\r\n dot.opacity = dot.color.opacity;\r\n dot.color = dot.color.hex;\r\n par[2] && (dot.offset = par[2] + "%");\r\n dots.push(dot);\r\n }\r\n for (i = 1, ii = dots.length - 1; i < ii; i++) {\r\n if (!dots[i].offset) {\r\n var start = toFloat(dots[i - 1].offset || 0),\r\n end = 0;\r\n for (var j = i + 1; j < ii; j++) {\r\n if (dots[j].offset) {\r\n end = dots[j].offset;\r\n break;\r\n }\r\n }\r\n if (!end) {\r\n end = 100;\r\n j = ii;\r\n }\r\n end = toFloat(end);\r\n var d = (end - start) / (j - i + 1);\r\n for (; i < j; i++) {\r\n start += d;\r\n dots[i].offset = start + "%";\r\n }\r\n }\r\n }\r\n return dots;\r\n }),\r\n tear = R._tear = function (el, paper) {\r\n el == paper.top && (paper.top = el.prev);\r\n el == paper.bottom && (paper.bottom = el.next);\r\n el.next && (el.next.prev = el.prev);\r\n el.prev && (el.prev.next = el.next);\r\n },\r\n tofront = R._tofront = function (el, paper) {\r\n if (paper.top === el) {\r\n return;\r\n }\r\n tear(el, paper);\r\n el.next = null;\r\n el.prev = paper.top;\r\n paper.top.next = el;\r\n paper.top = el;\r\n },\r\n toback = R._toback = function (el, paper) {\r\n if (paper.bottom === el) {\r\n return;\r\n }\r\n tear(el, paper);\r\n el.next = paper.bottom;\r\n el.prev = null;\r\n paper.bottom.prev = el;\r\n paper.bottom = el;\r\n },\r\n insertafter = R._insertafter = function (el, el2, paper) {\r\n tear(el, paper);\r\n el2 == paper.top && (paper.top = el);\r\n el2.next && (el2.next.prev = el);\r\n el.next = el2.next;\r\n el.prev = el2;\r\n el2.next = el;\r\n },\r\n insertbefore = R._insertbefore = function (el, el2, paper) {\r\n tear(el, paper);\r\n el2 == paper.bottom && (paper.bottom = el);\r\n el2.prev && (el2.prev.next = el);\r\n el.prev = el2.prev;\r\n el2.prev = el;\r\n el.next = el2;\r\n },\r\n /*\\\r\n * Raphael.toMatrix\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns matrix of transformations applied to a given path\r\n > Parameters\r\n - path (string) path string\r\n - transform (string|array) transformation string\r\n = (object) @Matrix\r\n \\*/\r\n toMatrix = R.toMatrix = function (path, transform) {\r\n var bb = pathDimensions(path),\r\n el = {\r\n _: {\r\n transform: E\r\n },\r\n getBBox: function () {\r\n return bb;\r\n }\r\n };\r\n extractTransform(el, transform);\r\n return el.matrix;\r\n },\r\n /*\\\r\n * Raphael.transformPath\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns path transformed by a given transformation\r\n > Parameters\r\n - path (string) path string\r\n - transform (string|array) transformation string\r\n = (string) path\r\n \\*/\r\n transformPath = R.transformPath = function (path, transform) {\r\n return mapPath(path, toMatrix(path, transform));\r\n },\r\n extractTransform = R._extractTransform = function (el, tstr) {\r\n if (tstr == null) {\r\n return el._.transform;\r\n }\r\n tstr = Str(tstr).replace(/\\.{3}|\\u2026/g, el._.transform || E);\r\n var tdata = R.parseTransformString(tstr),\r\n deg = 0,\r\n dx = 0,\r\n dy = 0,\r\n sx = 1,\r\n sy = 1,\r\n _ = el._,\r\n m = new Matrix;\r\n _.transform = tdata || [];\r\n if (tdata) {\r\n for (var i = 0, ii = tdata.length; i < ii; i++) {\r\n var t = tdata[i],\r\n tlen = t.length,\r\n command = Str(t[0]).toLowerCase(),\r\n absolute = t[0] != command,\r\n inver = absolute ? m.invert() : 0,\r\n x1,\r\n y1,\r\n x2,\r\n y2,\r\n bb;\r\n if (command == "t" && tlen == 3) {\r\n if (absolute) {\r\n x1 = inver.x(0, 0);\r\n y1 = inver.y(0, 0);\r\n x2 = inver.x(t[1], t[2]);\r\n y2 = inver.y(t[1], t[2]);\r\n m.translate(x2 - x1, y2 - y1);\r\n } else {\r\n m.translate(t[1], t[2]);\r\n }\r\n } else if (command == "r") {\r\n if (tlen == 2) {\r\n bb = bb || el.getBBox(1);\r\n m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2);\r\n deg += t[1];\r\n } else if (tlen == 4) {\r\n if (absolute) {\r\n x2 = inver.x(t[2], t[3]);\r\n y2 = inver.y(t[2], t[3]);\r\n m.rotate(t[1], x2, y2);\r\n } else {\r\n m.rotate(t[1], t[2], t[3]);\r\n }\r\n deg += t[1];\r\n }\r\n } else if (command == "s") {\r\n if (tlen == 2 || tlen == 3) {\r\n bb = bb || el.getBBox(1);\r\n m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2);\r\n sx *= t[1];\r\n sy *= t[tlen - 1];\r\n } else if (tlen == 5) {\r\n if (absolute) {\r\n x2 = inver.x(t[3], t[4]);\r\n y2 = inver.y(t[3], t[4]);\r\n m.scale(t[1], t[2], x2, y2);\r\n } else {\r\n m.scale(t[1], t[2], t[3], t[4]);\r\n }\r\n sx *= t[1];\r\n sy *= t[2];\r\n }\r\n } else if (command == "m" && tlen == 7) {\r\n m.add(t[1], t[2], t[3], t[4], t[5], t[6]);\r\n }\r\n _.dirtyT = 1;\r\n el.matrix = m;\r\n }\r\n }\r\n\r\n /*\\\r\n * Element.matrix\r\n [ property (object) ]\r\n **\r\n * Keeps @Matrix object, which represents element transformation\r\n \\*/\r\n el.matrix = m;\r\n\r\n _.sx = sx;\r\n _.sy = sy;\r\n _.deg = deg;\r\n _.dx = dx = m.e;\r\n _.dy = dy = m.f;\r\n\r\n if (sx == 1 && sy == 1 && !deg && _.bbox) {\r\n _.bbox.x += +dx;\r\n _.bbox.y += +dy;\r\n } else {\r\n _.dirtyT = 1;\r\n }\r\n },\r\n getEmpty = function (item) {\r\n var l = item[0];\r\n switch (l.toLowerCase()) {\r\n case "t": return [l, 0, 0];\r\n case "m": return [l, 1, 0, 0, 1, 0, 0];\r\n case "r": if (item.length == 4) {\r\n return [l, 0, item[2], item[3]];\r\n } else {\r\n return [l, 0];\r\n }\r\n case "s": if (item.length == 5) {\r\n return [l, 1, 1, item[3], item[4]];\r\n } else if (item.length == 3) {\r\n return [l, 1, 1];\r\n } else {\r\n return [l, 1];\r\n }\r\n }\r\n },\r\n equaliseTransform = R._equaliseTransform = function (t1, t2) {\r\n t2 = Str(t2).replace(/\\.{3}|\\u2026/g, t1);\r\n t1 = R.parseTransformString(t1) || [];\r\n t2 = R.parseTransformString(t2) || [];\r\n var maxlength = mmax(t1.length, t2.length),\r\n from = [],\r\n to = [],\r\n i = 0, j, jj,\r\n tt1, tt2;\r\n for (; i < maxlength; i++) {\r\n tt1 = t1[i] || getEmpty(t2[i]);\r\n tt2 = t2[i] || getEmpty(tt1);\r\n if ((tt1[0] != tt2[0]) ||\r\n (tt1[0].toLowerCase() == "r" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) ||\r\n (tt1[0].toLowerCase() == "s" && (tt1[3] != tt2[3] || tt1[4] != tt2[4]))\r\n ) {\r\n return;\r\n }\r\n from[i] = [];\r\n to[i] = [];\r\n for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) {\r\n j in tt1 && (from[i][j] = tt1[j]);\r\n j in tt2 && (to[i][j] = tt2[j]);\r\n }\r\n }\r\n return {\r\n from: from,\r\n to: to\r\n };\r\n };\r\n R._getContainer = function (x, y, w, h) {\r\n var container;\r\n container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x;\r\n if (container == null) {\r\n return;\r\n }\r\n if (container.tagName) {\r\n if (y == null) {\r\n return {\r\n container: container,\r\n width: container.style.pixelWidth || container.offsetWidth,\r\n height: container.style.pixelHeight || container.offsetHeight\r\n };\r\n } else {\r\n return {\r\n container: container,\r\n width: y,\r\n height: w\r\n };\r\n }\r\n }\r\n return {\r\n container: 1,\r\n x: x,\r\n y: y,\r\n width: w,\r\n height: h\r\n };\r\n };\r\n /*\\\r\n * Raphael.pathToRelative\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Converts path to relative form\r\n > Parameters\r\n - pathString (string|array) path string or array of segments\r\n = (array) array of segments.\r\n \\*/\r\n R.pathToRelative = pathToRelative;\r\n R._engine = {};\r\n /*\\\r\n * Raphael.path2curve\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Converts path to a new path where all segments are cubic bezier curves.\r\n > Parameters\r\n - pathString (string|array) path string or array of segments\r\n = (array) array of segments.\r\n \\*/\r\n R.path2curve = path2curve;\r\n /*\\\r\n * Raphael.matrix\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns matrix based on given parameters.\r\n > Parameters\r\n - a (number)\r\n - b (number)\r\n - c (number)\r\n - d (number)\r\n - e (number)\r\n - f (number)\r\n = (object) @Matrix\r\n \\*/\r\n R.matrix = function (a, b, c, d, e, f) {\r\n return new Matrix(a, b, c, d, e, f);\r\n };\r\n function Matrix(a, b, c, d, e, f) {\r\n if (a != null) {\r\n this.a = +a;\r\n this.b = +b;\r\n this.c = +c;\r\n this.d = +d;\r\n this.e = +e;\r\n this.f = +f;\r\n } else {\r\n this.a = 1;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 1;\r\n this.e = 0;\r\n this.f = 0;\r\n }\r\n }\r\n (function (matrixproto) {\r\n /*\\\r\n * Matrix.add\r\n [ method ]\r\n **\r\n * Adds given matrix to existing one.\r\n > Parameters\r\n - a (number)\r\n - b (number)\r\n - c (number)\r\n - d (number)\r\n - e (number)\r\n - f (number)\r\n or\r\n - matrix (object) @Matrix\r\n \\*/\r\n matrixproto.add = function (a, b, c, d, e, f) {\r\n var out = [[], [], []],\r\n m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]],\r\n matrix = [[a, c, e], [b, d, f], [0, 0, 1]],\r\n x, y, z, res;\r\n\r\n if (a && a instanceof Matrix) {\r\n matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]];\r\n }\r\n\r\n for (x = 0; x < 3; x++) {\r\n for (y = 0; y < 3; y++) {\r\n res = 0;\r\n for (z = 0; z < 3; z++) {\r\n res += m[x][z] * matrix[z][y];\r\n }\r\n out[x][y] = res;\r\n }\r\n }\r\n this.a = out[0][0];\r\n this.b = out[1][0];\r\n this.c = out[0][1];\r\n this.d = out[1][1];\r\n this.e = out[0][2];\r\n this.f = out[1][2];\r\n };\r\n /*\\\r\n * Matrix.invert\r\n [ method ]\r\n **\r\n * Returns inverted version of the matrix\r\n = (object) @Matrix\r\n \\*/\r\n matrixproto.invert = function () {\r\n var me = this,\r\n x = me.a * me.d - me.b * me.c;\r\n return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x);\r\n };\r\n /*\\\r\n * Matrix.clone\r\n [ method ]\r\n **\r\n * Returns copy of the matrix\r\n = (object) @Matrix\r\n \\*/\r\n matrixproto.clone = function () {\r\n return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f);\r\n };\r\n /*\\\r\n * Matrix.translate\r\n [ method ]\r\n **\r\n * Translate the matrix\r\n > Parameters\r\n - x (number)\r\n - y (number)\r\n \\*/\r\n matrixproto.translate = function (x, y) {\r\n this.add(1, 0, 0, 1, x, y);\r\n };\r\n /*\\\r\n * Matrix.scale\r\n [ method ]\r\n **\r\n * Scales the matrix\r\n > Parameters\r\n - x (number)\r\n - y (number) #optional\r\n - cx (number) #optional\r\n - cy (number) #optional\r\n \\*/\r\n matrixproto.scale = function (x, y, cx, cy) {\r\n y == null && (y = x);\r\n (cx || cy) && this.add(1, 0, 0, 1, cx, cy);\r\n this.add(x, 0, 0, y, 0, 0);\r\n (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy);\r\n };\r\n /*\\\r\n * Matrix.rotate\r\n [ method ]\r\n **\r\n * Rotates the matrix\r\n > Parameters\r\n - a (number)\r\n - x (number)\r\n - y (number)\r\n \\*/\r\n matrixproto.rotate = function (a, x, y) {\r\n a = R.rad(a);\r\n x = x || 0;\r\n y = y || 0;\r\n var cos = +math.cos(a).toFixed(9),\r\n sin = +math.sin(a).toFixed(9);\r\n this.add(cos, sin, -sin, cos, x, y);\r\n this.add(1, 0, 0, 1, -x, -y);\r\n };\r\n /*\\\r\n * Matrix.x\r\n [ method ]\r\n **\r\n * Return x coordinate for given point after transformation described by the matrix. See also @Matrix.y\r\n > Parameters\r\n - x (number)\r\n - y (number)\r\n = (number) x\r\n \\*/\r\n matrixproto.x = function (x, y) {\r\n return x * this.a + y * this.c + this.e;\r\n };\r\n /*\\\r\n * Matrix.y\r\n [ method ]\r\n **\r\n * Return y coordinate for given point after transformation described by the matrix. See also @Matrix.x\r\n > Parameters\r\n - x (number)\r\n - y (number)\r\n = (number) y\r\n \\*/\r\n matrixproto.y = function (x, y) {\r\n return x * this.b + y * this.d + this.f;\r\n };\r\n matrixproto.get = function (i) {\r\n return +this[Str.fromCharCode(97 + i)].toFixed(4);\r\n };\r\n matrixproto.toString = function () {\r\n return R.svg ?\r\n "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" :\r\n [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join();\r\n };\r\n matrixproto.toFilter = function () {\r\n return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) +\r\n ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) +\r\n ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod=\'auto expand\')";\r\n };\r\n matrixproto.offset = function () {\r\n return [this.e.toFixed(4), this.f.toFixed(4)];\r\n };\r\n function norm(a) {\r\n return a[0] * a[0] + a[1] * a[1];\r\n }\r\n function normalize(a) {\r\n var mag = math.sqrt(norm(a));\r\n a[0] && (a[0] /= mag);\r\n a[1] && (a[1] /= mag);\r\n }\r\n /*\\\r\n * Matrix.split\r\n [ method ]\r\n **\r\n * Splits matrix into primitive transformations\r\n = (object) in format:\r\n o dx (number) translation by x\r\n o dy (number) translation by y\r\n o scalex (number) scale by x\r\n o scaley (number) scale by y\r\n o shear (number) shear\r\n o rotate (number) rotation in deg\r\n o isSimple (boolean) could it be represented via simple transformations\r\n \\*/\r\n matrixproto.split = function () {\r\n var out = {};\r\n // translation\r\n out.dx = this.e;\r\n out.dy = this.f;\r\n\r\n // scale and shear\r\n var row = [[this.a, this.c], [this.b, this.d]];\r\n out.scalex = math.sqrt(norm(row[0]));\r\n normalize(row[0]);\r\n\r\n out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1];\r\n row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear];\r\n\r\n out.scaley = math.sqrt(norm(row[1]));\r\n normalize(row[1]);\r\n out.shear /= out.scaley;\r\n\r\n // rotation\r\n var sin = -row[0][1],\r\n cos = row[1][1];\r\n if (cos < 0) {\r\n out.rotate = R.deg(math.acos(cos));\r\n if (sin < 0) {\r\n out.rotate = 360 - out.rotate;\r\n }\r\n } else {\r\n out.rotate = R.deg(math.asin(sin));\r\n }\r\n\r\n out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate);\r\n out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate;\r\n out.noRotation = !+out.shear.toFixed(9) && !out.rotate;\r\n return out;\r\n };\r\n /*\\\r\n * Matrix.toTransformString\r\n [ method ]\r\n **\r\n * Return transform string that represents given matrix\r\n = (string) transform string\r\n \\*/\r\n matrixproto.toTransformString = function (shorter) {\r\n var s = shorter || this[split]();\r\n if (s.isSimple) {\r\n s.scalex = +s.scalex.toFixed(4);\r\n s.scaley = +s.scaley.toFixed(4);\r\n s.rotate = +s.rotate.toFixed(4);\r\n return (s.dx || s.dy ? "t" + [s.dx, s.dy] : E) +\r\n (s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) +\r\n (s.rotate ? "r" + [s.rotate, 0, 0] : E);\r\n } else {\r\n return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)];\r\n }\r\n };\r\n })(Matrix.prototype);\r\n\r\n var preventDefault = function () {\r\n this.returnValue = false;\r\n },\r\n preventTouch = function () {\r\n return this.originalEvent.preventDefault();\r\n },\r\n stopPropagation = function () {\r\n this.cancelBubble = true;\r\n },\r\n stopTouch = function () {\r\n return this.originalEvent.stopPropagation();\r\n },\r\n getEventPosition = function (e) {\r\n var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\r\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;\r\n\r\n return {\r\n x: e.clientX + scrollX,\r\n y: e.clientY + scrollY\r\n };\r\n },\r\n addEvent = (function () {\r\n if (g.doc.addEventListener) {\r\n return function (obj, type, fn, element) {\r\n var f = function (e) {\r\n var pos = getEventPosition(e);\r\n return fn.call(element, e, pos.x, pos.y);\r\n };\r\n obj.addEventListener(type, f, false);\r\n\r\n if (supportsTouch && touchMap[type]) {\r\n var _f = function (e) {\r\n var pos = getEventPosition(e),\r\n olde = e;\r\n\r\n for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) {\r\n if (e.targetTouches[i].target == obj) {\r\n e = e.targetTouches[i];\r\n e.originalEvent = olde;\r\n e.preventDefault = preventTouch;\r\n e.stopPropagation = stopTouch;\r\n break;\r\n }\r\n }\r\n\r\n return fn.call(element, e, pos.x, pos.y);\r\n };\r\n obj.addEventListener(touchMap[type], _f, false);\r\n }\r\n\r\n return function () {\r\n obj.removeEventListener(type, f, false);\r\n\r\n if (supportsTouch && touchMap[type])\r\n obj.removeEventListener(touchMap[type], _f, false);\r\n\r\n return true;\r\n };\r\n };\r\n } else if (g.doc.attachEvent) {\r\n return function (obj, type, fn, element) {\r\n var f = function (e) {\r\n e = e || g.win.event;\r\n var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\r\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,\r\n x = e.clientX + scrollX,\r\n y = e.clientY + scrollY;\r\n e.preventDefault = e.preventDefault || preventDefault;\r\n e.stopPropagation = e.stopPropagation || stopPropagation;\r\n return fn.call(element, e, x, y);\r\n };\r\n obj.attachEvent("on" + type, f);\r\n var detacher = function () {\r\n obj.detachEvent("on" + type, f);\r\n return true;\r\n };\r\n return detacher;\r\n };\r\n }\r\n })(),\r\n drag = [],\r\n dragMove = function (e) {\r\n var x = e.clientX,\r\n y = e.clientY,\r\n scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\r\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,\r\n dragi,\r\n j = drag.length;\r\n while (j--) {\r\n dragi = drag[j];\r\n if (supportsTouch && e.touches) {\r\n var i = e.touches.length,\r\n touch;\r\n while (i--) {\r\n touch = e.touches[i];\r\n if (touch.identifier == dragi.el._drag.id) {\r\n x = touch.clientX;\r\n y = touch.clientY;\r\n (e.originalEvent ? e.originalEvent : e).preventDefault();\r\n break;\r\n }\r\n }\r\n } else {\r\n e.preventDefault();\r\n }\r\n var node = dragi.el.node,\r\n o,\r\n next = node.nextSibling,\r\n parent = node.parentNode,\r\n display = node.style.display;\r\n g.win.opera && parent.removeChild(node);\r\n node.style.display = "none";\r\n o = dragi.el.paper.getElementByPoint(x, y);\r\n node.style.display = display;\r\n g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node));\r\n o && eve("raphael.drag.over." + dragi.el.id, dragi.el, o);\r\n x += scrollX;\r\n y += scrollY;\r\n eve("raphael.drag.move." + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e);\r\n }\r\n },\r\n dragUp = function (e) {\r\n R.unmousemove(dragMove).unmouseup(dragUp);\r\n var i = drag.length,\r\n dragi;\r\n while (i--) {\r\n dragi = drag[i];\r\n dragi.el._drag = {};\r\n eve("raphael.drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e);\r\n }\r\n drag = [];\r\n },\r\n /*\\\r\n * Raphael.el\r\n [ property (object) ]\r\n **\r\n * You can add your own method to elements. This is usefull when you want to hack default functionality or\r\n * want to wrap some common transformation or attributes in one method. In difference to canvas methods,\r\n * you can redefine element method at any time. Expending element methods wouldn’t affect set.\r\n > Usage\r\n | Raphael.el.red = function () {\r\n | this.attr({fill: "#f00"});\r\n | };\r\n | // then use it\r\n | paper.circle(100, 100, 20).red();\r\n \\*/\r\n elproto = R.el = {};\r\n /*\\\r\n * Element.click\r\n [ method ]\r\n **\r\n * Adds event handler for click for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unclick\r\n [ method ]\r\n **\r\n * Removes event handler for click for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.dblclick\r\n [ method ]\r\n **\r\n * Adds event handler for double click for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.undblclick\r\n [ method ]\r\n **\r\n * Removes event handler for double click for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.mousedown\r\n [ method ]\r\n **\r\n * Adds event handler for mousedown for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unmousedown\r\n [ method ]\r\n **\r\n * Removes event handler for mousedown for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.mousemove\r\n [ method ]\r\n **\r\n * Adds event handler for mousemove for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unmousemove\r\n [ method ]\r\n **\r\n * Removes event handler for mousemove for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.mouseout\r\n [ method ]\r\n **\r\n * Adds event handler for mouseout for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unmouseout\r\n [ method ]\r\n **\r\n * Removes event handler for mouseout for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.mouseover\r\n [ method ]\r\n **\r\n * Adds event handler for mouseover for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unmouseover\r\n [ method ]\r\n **\r\n * Removes event handler for mouseover for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.mouseup\r\n [ method ]\r\n **\r\n * Adds event handler for mouseup for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unmouseup\r\n [ method ]\r\n **\r\n * Removes event handler for mouseup for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.touchstart\r\n [ method ]\r\n **\r\n * Adds event handler for touchstart for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.untouchstart\r\n [ method ]\r\n **\r\n * Removes event handler for touchstart for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.touchmove\r\n [ method ]\r\n **\r\n * Adds event handler for touchmove for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.untouchmove\r\n [ method ]\r\n **\r\n * Removes event handler for touchmove for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.touchend\r\n [ method ]\r\n **\r\n * Adds event handler for touchend for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.untouchend\r\n [ method ]\r\n **\r\n * Removes event handler for touchend for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.touchcancel\r\n [ method ]\r\n **\r\n * Adds event handler for touchcancel for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.untouchcancel\r\n [ method ]\r\n **\r\n * Removes event handler for touchcancel for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n for (var i = events.length; i--;) {\r\n (function (eventName) {\r\n R[eventName] = elproto[eventName] = function (fn, scope) {\r\n if (R.is(fn, "function")) {\r\n this.events = this.events || [];\r\n this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)});\r\n }\r\n return this;\r\n };\r\n R["un" + eventName] = elproto["un" + eventName] = function (fn) {\r\n var events = this.events || [],\r\n l = events.length;\r\n while (l--){\r\n if (events[l].name == eventName && (R.is(fn, "undefined") || events[l].f == fn)) {\r\n events[l].unbind();\r\n events.splice(l, 1);\r\n !events.length && delete this.events;\r\n }\r\n }\r\n return this;\r\n };\r\n })(events[i]);\r\n }\r\n\r\n /*\\\r\n * Element.data\r\n [ method ]\r\n **\r\n * Adds or retrieves given value asociated with given key.\r\n **\r\n * See also @Element.removeData\r\n > Parameters\r\n - key (string) key to store data\r\n - value (any) #optional value to store\r\n = (object) @Element\r\n * or, if value is not specified:\r\n = (any) value\r\n * or, if key and value are not specified:\r\n = (object) Key/value pairs for all the data associated with the element.\r\n > Usage\r\n | for (var i = 0, i < 5, i++) {\r\n | paper.circle(10 + 15 * i, 10, 10)\r\n | .attr({fill: "#000"})\r\n | .data("i", i)\r\n | .click(function () {\r\n | alert(this.data("i"));\r\n | });\r\n | }\r\n \\*/\r\n elproto.data = function (key, value) {\r\n var data = eldata[this.id] = eldata[this.id] || {};\r\n if (arguments.length == 0) {\r\n return data;\r\n }\r\n if (arguments.length == 1) {\r\n if (R.is(key, "object")) {\r\n for (var i in key) if (key[has](i)) {\r\n this.data(i, key[i]);\r\n }\r\n return this;\r\n }\r\n eve("raphael.data.get." + this.id, this, data[key], key);\r\n return data[key];\r\n }\r\n data[key] = value;\r\n eve("raphael.data.set." + this.id, this, value, key);\r\n return this;\r\n };\r\n /*\\\r\n * Element.removeData\r\n [ method ]\r\n **\r\n * Removes value associated with an element by given key.\r\n * If key is not provided, removes all the data of the element.\r\n > Parameters\r\n - key (string) #optional key\r\n = (object) @Element\r\n \\*/\r\n elproto.removeData = function (key) {\r\n if (key == null) {\r\n eldata[this.id] = {};\r\n } else {\r\n eldata[this.id] && delete eldata[this.id][key];\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Element.getData\r\n [ method ]\r\n **\r\n * Retrieves the element data\r\n = (object) data\r\n \\*/\r\n elproto.getData = function () {\r\n return clone(eldata[this.id] || {});\r\n };\r\n /*\\\r\n * Element.hover\r\n [ method ]\r\n **\r\n * Adds event handlers for hover for the element.\r\n > Parameters\r\n - f_in (function) handler for hover in\r\n - f_out (function) handler for hover out\r\n - icontext (object) #optional context for hover in handler\r\n - ocontext (object) #optional context for hover out handler\r\n = (object) @Element\r\n \\*/\r\n elproto.hover = function (f_in, f_out, scope_in, scope_out) {\r\n return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in);\r\n };\r\n /*\\\r\n * Element.unhover\r\n [ method ]\r\n **\r\n * Removes event handlers for hover for the element.\r\n > Parameters\r\n - f_in (function) handler for hover in\r\n - f_out (function) handler for hover out\r\n = (object) @Element\r\n \\*/\r\n elproto.unhover = function (f_in, f_out) {\r\n return this.unmouseover(f_in).unmouseout(f_out);\r\n };\r\n var draggable = [];\r\n /*\\\r\n * Element.drag\r\n [ method ]\r\n **\r\n * Adds event handlers for drag of the element.\r\n > Parameters\r\n - onmove (function) handler for moving\r\n - onstart (function) handler for drag start\r\n - onend (function) handler for drag end\r\n - mcontext (object) #optional context for moving handler\r\n - scontext (object) #optional context for drag start handler\r\n - econtext (object) #optional context for drag end handler\r\n * Additionaly following `drag` events will be triggered: `drag.start.` on start,\r\n * `drag.end.` on end and `drag.move.` on every move. When element will be dragged over another element\r\n * `drag.over.` will be fired as well.\r\n *\r\n * Start event and start handler will be called in specified context or in context of the element with following parameters:\r\n o x (number) x position of the mouse\r\n o y (number) y position of the mouse\r\n o event (object) DOM event object\r\n * Move event and move handler will be called in specified context or in context of the element with following parameters:\r\n o dx (number) shift by x from the start point\r\n o dy (number) shift by y from the start point\r\n o x (number) x position of the mouse\r\n o y (number) y position of the mouse\r\n o event (object) DOM event object\r\n * End event and end handler will be called in specified context or in context of the element with following parameters:\r\n o event (object) DOM event object\r\n = (object) @Element\r\n \\*/\r\n elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) {\r\n function start(e) {\r\n (e.originalEvent || e).preventDefault();\r\n var x = e.clientX,\r\n y = e.clientY,\r\n scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\r\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;\r\n this._drag.id = e.identifier;\r\n if (supportsTouch && e.touches) {\r\n var i = e.touches.length, touch;\r\n while (i--) {\r\n touch = e.touches[i];\r\n this._drag.id = touch.identifier;\r\n if (touch.identifier == this._drag.id) {\r\n x = touch.clientX;\r\n y = touch.clientY;\r\n break;\r\n }\r\n }\r\n }\r\n this._drag.x = x + scrollX;\r\n this._drag.y = y + scrollY;\r\n !drag.length && R.mousemove(dragMove).mouseup(dragUp);\r\n drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope});\r\n onstart && eve.on("raphael.drag.start." + this.id, onstart);\r\n onmove && eve.on("raphael.drag.move." + this.id, onmove);\r\n onend && eve.on("raphael.drag.end." + this.id, onend);\r\n eve("raphael.drag.start." + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e);\r\n }\r\n this._drag = {};\r\n draggable.push({el: this, start: start});\r\n this.mousedown(start);\r\n return this;\r\n };\r\n /*\\\r\n * Element.onDragOver\r\n [ method ]\r\n **\r\n * Shortcut for assigning event handler for `drag.over.` event, where id is id of the element (see @Element.id).\r\n > Parameters\r\n - f (function) handler for event, first argument would be the element you are dragging over\r\n \\*/\r\n elproto.onDragOver = function (f) {\r\n f ? eve.on("raphael.drag.over." + this.id, f) : eve.unbind("raphael.drag.over." + this.id);\r\n };\r\n /*\\\r\n * Element.undrag\r\n [ method ]\r\n **\r\n * Removes all drag event handlers from given element.\r\n \\*/\r\n elproto.undrag = function () {\r\n var i = draggable.length;\r\n while (i--) if (draggable[i].el == this) {\r\n this.unmousedown(draggable[i].start);\r\n draggable.splice(i, 1);\r\n eve.unbind("raphael.drag.*." + this.id);\r\n }\r\n !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp);\r\n drag = [];\r\n };\r\n /*\\\r\n * Paper.circle\r\n [ method ]\r\n **\r\n * Draws a circle.\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the centre\r\n - y (number) y coordinate of the centre\r\n - r (number) radius\r\n = (object) Raphaël element object with type “circle”\r\n **\r\n > Usage\r\n | var c = paper.circle(50, 50, 40);\r\n \\*/\r\n paperproto.circle = function (x, y, r) {\r\n var out = R._engine.circle(this, x || 0, y || 0, r || 0);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.rect\r\n [ method ]\r\n *\r\n * Draws a rectangle.\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the top left corner\r\n - y (number) y coordinate of the top left corner\r\n - width (number) width\r\n - height (number) height\r\n - r (number) #optional radius for rounded corners, default is 0\r\n = (object) Raphaël element object with type “rect”\r\n **\r\n > Usage\r\n | // regular rectangle\r\n | var c = paper.rect(10, 10, 50, 50);\r\n | // rectangle with rounded corners\r\n | var c = paper.rect(40, 40, 50, 50, 10);\r\n \\*/\r\n paperproto.rect = function (x, y, w, h, r) {\r\n var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.ellipse\r\n [ method ]\r\n **\r\n * Draws an ellipse.\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the centre\r\n - y (number) y coordinate of the centre\r\n - rx (number) horizontal radius\r\n - ry (number) vertical radius\r\n = (object) Raphaël element object with type “ellipse”\r\n **\r\n > Usage\r\n | var c = paper.ellipse(50, 50, 40, 20);\r\n \\*/\r\n paperproto.ellipse = function (x, y, rx, ry) {\r\n var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.path\r\n [ method ]\r\n **\r\n * Creates a path element by given path data string.\r\n > Parameters\r\n - pathString (string) #optional path string in SVG format.\r\n * Path string consists of one-letter commands, followed by comma seprarated arguments in numercal form. Example:\r\n | "M10,20L30,40"\r\n * Here we can see two commands: “M”, with arguments `(10, 20)` and “L” with arguments `(30, 40)`. Upper case letter mean command is absolute, lower case—relative.\r\n *\r\n #

    Here is short list of commands available, for more details see SVG path string format.

    \r\n # \r\n # \r\n # \r\n # \r\n # \r\n # \r\n # \r\n # \r\n # \r\n # \r\n # \r\n #
    CommandNameParameters
    Mmoveto(x y)+
    Zclosepath(none)
    Llineto(x y)+
    Hhorizontal linetox+
    Vvertical linetoy+
    Ccurveto(x1 y1 x2 y2 x y)+
    Ssmooth curveto(x2 y2 x y)+
    Qquadratic Bézier curveto(x1 y1 x y)+
    Tsmooth quadratic Bézier curveto(x y)+
    Aelliptical arc(rx ry x-axis-rotation large-arc-flag sweep-flag x y)+
    RCatmull-Rom curveto*x1 y1 (x y)+
    \r\n * * “Catmull-Rom curveto” is a not standard SVG command and added in 2.0 to make life easier.\r\n * Note: there is a special case when path consist of just three commands: “M10,10R…z”. In this case path will smoothly connects to its beginning.\r\n > Usage\r\n | var c = paper.path("M10 10L90 90");\r\n | // draw a diagonal line:\r\n | // move to 10,10, line to 90,90\r\n * For example of path strings, check out these icons: http://raphaeljs.com/icons/\r\n \\*/\r\n paperproto.path = function (pathString) {\r\n pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E);\r\n var out = R._engine.path(R.format[apply](R, arguments), this);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.image\r\n [ method ]\r\n **\r\n * Embeds an image into the surface.\r\n **\r\n > Parameters\r\n **\r\n - src (string) URI of the source image\r\n - x (number) x coordinate position\r\n - y (number) y coordinate position\r\n - width (number) width of the image\r\n - height (number) height of the image\r\n = (object) Raphaël element object with type “image”\r\n **\r\n > Usage\r\n | var c = paper.image("apple.png", 10, 10, 80, 80);\r\n \\*/\r\n paperproto.image = function (src, x, y, w, h) {\r\n var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.text\r\n [ method ]\r\n **\r\n * Draws a text string. If you need line breaks, put “\\n” in the string.\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate position\r\n - y (number) y coordinate position\r\n - text (string) The text string to draw\r\n = (object) Raphaël element object with type “text”\r\n **\r\n > Usage\r\n | var t = paper.text(50, 50, "Raphaël\\nkicks\\nbutt!");\r\n \\*/\r\n paperproto.text = function (x, y, text, href) {\r\n var out = R._engine.text(this, x || 0, y || 0, Str(text), href);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.set\r\n [ method ]\r\n **\r\n * Creates array-like object to keep and operate several elements at once.\r\n * Warning: it doesn’t create any elements for itself in the page, it just groups existing elements.\r\n * Sets act as pseudo elements — all methods available to an element can be used on a set.\r\n = (object) array-like object that represents set of elements\r\n **\r\n > Usage\r\n | var st = paper.set();\r\n | st.push(\r\n | paper.circle(10, 10, 5),\r\n | paper.circle(30, 10, 5)\r\n | );\r\n | st.attr({fill: "red"}); // changes the fill of both circles\r\n \\*/\r\n paperproto.set = function (itemsArray) {\r\n !R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length));\r\n var out = new Set(itemsArray);\r\n this.__set__ && this.__set__.push(out);\r\n out["paper"] = this;\r\n out["type"] = "set";\r\n return out;\r\n };\r\n /*\\\r\n * Paper.setStart\r\n [ method ]\r\n **\r\n * Creates @Paper.set. All elements that will be created after calling this method and before calling\r\n * @Paper.setFinish will be added to the set.\r\n **\r\n > Usage\r\n | paper.setStart();\r\n | paper.circle(10, 10, 5),\r\n | paper.circle(30, 10, 5)\r\n | var st = paper.setFinish();\r\n | st.attr({fill: "red"}); // changes the fill of both circles\r\n \\*/\r\n paperproto.setStart = function (set) {\r\n this.__set__ = set || this.set();\r\n };\r\n /*\\\r\n * Paper.setFinish\r\n [ method ]\r\n **\r\n * See @Paper.setStart. This method finishes catching and returns resulting set.\r\n **\r\n = (object) set\r\n \\*/\r\n paperproto.setFinish = function (set) {\r\n var out = this.__set__;\r\n delete this.__set__;\r\n return out;\r\n };\r\n /*\\\r\n * Paper.getSize\r\n [ method ]\r\n **\r\n * Obtains current paper actual size.\r\n **\r\n = (object)\r\n \\*/\r\n paperproto.getSize = function () {\r\n var container = this.canvas.parentNode;\r\n return {\r\n width: container.offsetWidth,\r\n height: container.offsetHeight\r\n };\r\n };\r\n /*\\\r\n * Paper.setSize\r\n [ method ]\r\n **\r\n * If you need to change dimensions of the canvas call this method\r\n **\r\n > Parameters\r\n **\r\n - width (number) new width of the canvas\r\n - height (number) new height of the canvas\r\n \\*/\r\n paperproto.setSize = function (width, height) {\r\n return R._engine.setSize.call(this, width, height);\r\n };\r\n /*\\\r\n * Paper.setViewBox\r\n [ method ]\r\n **\r\n * Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by\r\n * specifying new boundaries.\r\n **\r\n > Parameters\r\n **\r\n - x (number) new x position, default is `0`\r\n - y (number) new y position, default is `0`\r\n - w (number) new width of the canvas\r\n - h (number) new height of the canvas\r\n - fit (boolean) `true` if you want graphics to fit into new boundary box\r\n \\*/\r\n paperproto.setViewBox = function (x, y, w, h, fit) {\r\n return R._engine.setViewBox.call(this, x, y, w, h, fit);\r\n };\r\n /*\\\r\n * Paper.top\r\n [ property ]\r\n **\r\n * Points to the topmost element on the paper\r\n \\*/\r\n /*\\\r\n * Paper.bottom\r\n [ property ]\r\n **\r\n * Points to the bottom element on the paper\r\n \\*/\r\n paperproto.top = paperproto.bottom = null;\r\n /*\\\r\n * Paper.raphael\r\n [ property ]\r\n **\r\n * Points to the @Raphael object/function\r\n \\*/\r\n paperproto.raphael = R;\r\n var getOffset = function (elem) {\r\n var box = elem.getBoundingClientRect(),\r\n doc = elem.ownerDocument,\r\n body = doc.body,\r\n docElem = doc.documentElement,\r\n clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,\r\n top = box.top + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop,\r\n left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft;\r\n return {\r\n y: top,\r\n x: left\r\n };\r\n };\r\n /*\\\r\n * Paper.getElementByPoint\r\n [ method ]\r\n **\r\n * Returns you topmost element under given point.\r\n **\r\n = (object) Raphaël element object\r\n > Parameters\r\n **\r\n - x (number) x coordinate from the top left corner of the window\r\n - y (number) y coordinate from the top left corner of the window\r\n > Usage\r\n | paper.getElementByPoint(mouseX, mouseY).attr({stroke: "#f00"});\r\n \\*/\r\n paperproto.getElementByPoint = function (x, y) {\r\n var paper = this,\r\n svg = paper.canvas,\r\n target = g.doc.elementFromPoint(x, y);\r\n if (g.win.opera && target.tagName == "svg") {\r\n var so = getOffset(svg),\r\n sr = svg.createSVGRect();\r\n sr.x = x - so.x;\r\n sr.y = y - so.y;\r\n sr.width = sr.height = 1;\r\n var hits = svg.getIntersectionList(sr, null);\r\n if (hits.length) {\r\n target = hits[hits.length - 1];\r\n }\r\n }\r\n if (!target) {\r\n return null;\r\n }\r\n while (target.parentNode && target != svg.parentNode && !target.raphael) {\r\n target = target.parentNode;\r\n }\r\n target == paper.canvas.parentNode && (target = svg);\r\n target = target && target.raphael ? paper.getById(target.raphaelid) : null;\r\n return target;\r\n };\r\n\r\n /*\\\r\n * Paper.getElementsByBBox\r\n [ method ]\r\n **\r\n * Returns set of elements that have an intersecting bounding box\r\n **\r\n > Parameters\r\n **\r\n - bbox (object) bbox to check with\r\n = (object) @Set\r\n \\*/\r\n paperproto.getElementsByBBox = function (bbox) {\r\n var set = this.set();\r\n this.forEach(function (el) {\r\n if (R.isBBoxIntersect(el.getBBox(), bbox)) {\r\n set.push(el);\r\n }\r\n });\r\n return set;\r\n };\r\n\r\n /*\\\r\n * Paper.getById\r\n [ method ]\r\n **\r\n * Returns you element by its internal ID.\r\n **\r\n > Parameters\r\n **\r\n - id (number) id\r\n = (object) Raphaël element object\r\n \\*/\r\n paperproto.getById = function (id) {\r\n var bot = this.bottom;\r\n while (bot) {\r\n if (bot.id == id) {\r\n return bot;\r\n }\r\n bot = bot.next;\r\n }\r\n return null;\r\n };\r\n /*\\\r\n * Paper.forEach\r\n [ method ]\r\n **\r\n * Executes given function for each element on the paper\r\n *\r\n * If callback function returns `false` it will stop loop running.\r\n **\r\n > Parameters\r\n **\r\n - callback (function) function to run\r\n - thisArg (object) context object for the callback\r\n = (object) Paper object\r\n > Usage\r\n | paper.forEach(function (el) {\r\n | el.attr({ stroke: "blue" });\r\n | });\r\n \\*/\r\n paperproto.forEach = function (callback, thisArg) {\r\n var bot = this.bottom;\r\n while (bot) {\r\n if (callback.call(thisArg, bot) === false) {\r\n return this;\r\n }\r\n bot = bot.next;\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Paper.getElementsByPoint\r\n [ method ]\r\n **\r\n * Returns set of elements that have common point inside\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the point\r\n - y (number) y coordinate of the point\r\n = (object) @Set\r\n \\*/\r\n paperproto.getElementsByPoint = function (x, y) {\r\n var set = this.set();\r\n this.forEach(function (el) {\r\n if (el.isPointInside(x, y)) {\r\n set.push(el);\r\n }\r\n });\r\n return set;\r\n };\r\n function x_y() {\r\n return this.x + S + this.y;\r\n }\r\n function x_y_w_h() {\r\n return this.x + S + this.y + S + this.width + " \\xd7 " + this.height;\r\n }\r\n /*\\\r\n * Element.isPointInside\r\n [ method ]\r\n **\r\n * Determine if given point is inside this element’s shape\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the point\r\n - y (number) y coordinate of the point\r\n = (boolean) `true` if point inside the shape\r\n \\*/\r\n elproto.isPointInside = function (x, y) {\r\n var rp = this.realPath = getPath[this.type](this);\r\n if (this.attr(\'transform\') && this.attr(\'transform\').length) {\r\n rp = R.transformPath(rp, this.attr(\'transform\'));\r\n }\r\n return R.isPointInsidePath(rp, x, y);\r\n };\r\n /*\\\r\n * Element.getBBox\r\n [ method ]\r\n **\r\n * Return bounding box for a given element\r\n **\r\n > Parameters\r\n **\r\n - isWithoutTransform (boolean) flag, `true` if you want to have bounding box before transformations. Default is `false`.\r\n = (object) Bounding box object:\r\n o {\r\n o x: (number) top left corner x\r\n o y: (number) top left corner y\r\n o x2: (number) bottom right corner x\r\n o y2: (number) bottom right corner y\r\n o width: (number) width\r\n o height: (number) height\r\n o }\r\n \\*/\r\n elproto.getBBox = function (isWithoutTransform) {\r\n if (this.removed) {\r\n return {};\r\n }\r\n var _ = this._;\r\n if (isWithoutTransform) {\r\n if (_.dirty || !_.bboxwt) {\r\n this.realPath = getPath[this.type](this);\r\n _.bboxwt = pathDimensions(this.realPath);\r\n _.bboxwt.toString = x_y_w_h;\r\n _.dirty = 0;\r\n }\r\n return _.bboxwt;\r\n }\r\n if (_.dirty || _.dirtyT || !_.bbox) {\r\n if (_.dirty || !this.realPath) {\r\n _.bboxwt = 0;\r\n this.realPath = getPath[this.type](this);\r\n }\r\n _.bbox = pathDimensions(mapPath(this.realPath, this.matrix));\r\n _.bbox.toString = x_y_w_h;\r\n _.dirty = _.dirtyT = 0;\r\n }\r\n return _.bbox;\r\n };\r\n /*\\\r\n * Element.clone\r\n [ method ]\r\n **\r\n = (object) clone of a given element\r\n **\r\n \\*/\r\n elproto.clone = function () {\r\n if (this.removed) {\r\n return null;\r\n }\r\n var out = this.paper[this.type]().attr(this.attr());\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Element.glow\r\n [ method ]\r\n **\r\n * Return set of elements that create glow-like effect around given element. See @Paper.set.\r\n *\r\n * Note: Glow is not connected to the element. If you change element attributes it won’t adjust itself.\r\n **\r\n > Parameters\r\n **\r\n - glow (object) #optional parameters object with all properties optional:\r\n o {\r\n o width (number) size of the glow, default is `10`\r\n o fill (boolean) will it be filled, default is `false`\r\n o opacity (number) opacity, default is `0.5`\r\n o offsetx (number) horizontal offset, default is `0`\r\n o offsety (number) vertical offset, default is `0`\r\n o color (string) glow colour, default is `black`\r\n o }\r\n = (object) @Paper.set of elements that represents glow\r\n \\*/\r\n elproto.glow = function (glow) {\r\n if (this.type == "text") {\r\n return null;\r\n }\r\n glow = glow || {};\r\n var s = {\r\n width: (glow.width || 10) + (+this.attr("stroke-width") || 1),\r\n fill: glow.fill || false,\r\n opacity: glow.opacity == null ? .5 : glow.opacity,\r\n offsetx: glow.offsetx || 0,\r\n offsety: glow.offsety || 0,\r\n color: glow.color || "#000"\r\n },\r\n c = s.width / 2,\r\n r = this.paper,\r\n out = r.set(),\r\n path = this.realPath || getPath[this.type](this);\r\n path = this.matrix ? mapPath(path, this.matrix) : path;\r\n for (var i = 1; i < c + 1; i++) {\r\n out.push(r.path(path).attr({\r\n stroke: s.color,\r\n fill: s.fill ? s.color : "none",\r\n "stroke-linejoin": "round",\r\n "stroke-linecap": "round",\r\n "stroke-width": +(s.width / c * i).toFixed(3),\r\n opacity: +(s.opacity / c).toFixed(3)\r\n }));\r\n }\r\n return out.insertBefore(this).translate(s.offsetx, s.offsety);\r\n };\r\n var curveslengths = {},\r\n getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) {\r\n if (length == null) {\r\n return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y);\r\n } else {\r\n return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length));\r\n }\r\n },\r\n getLengthFactory = function (istotal, subpath) {\r\n return function (path, length, onlystart) {\r\n path = path2curve(path);\r\n var x, y, p, l, sp = "", subpaths = {}, point,\r\n len = 0;\r\n for (var i = 0, ii = path.length; i < ii; i++) {\r\n p = path[i];\r\n if (p[0] == "M") {\r\n x = +p[1];\r\n y = +p[2];\r\n } else {\r\n l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);\r\n if (len + l > length) {\r\n if (subpath && !subpaths.start) {\r\n point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);\r\n sp += ["C" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y];\r\n if (onlystart) {return sp;}\r\n subpaths.start = sp;\r\n sp = ["M" + point.x, point.y + "C" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join();\r\n len += l;\r\n x = +p[5];\r\n y = +p[6];\r\n continue;\r\n }\r\n if (!istotal && !subpath) {\r\n point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);\r\n return {x: point.x, y: point.y, alpha: point.alpha};\r\n }\r\n }\r\n len += l;\r\n x = +p[5];\r\n y = +p[6];\r\n }\r\n sp += p.shift() + p;\r\n }\r\n subpaths.end = sp;\r\n point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1);\r\n point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha});\r\n return point;\r\n };\r\n };\r\n var getTotalLength = getLengthFactory(1),\r\n getPointAtLength = getLengthFactory(),\r\n getSubpathsAtLength = getLengthFactory(0, 1);\r\n /*\\\r\n * Raphael.getTotalLength\r\n [ method ]\r\n **\r\n * Returns length of the given path in pixels.\r\n **\r\n > Parameters\r\n **\r\n - path (string) SVG path string.\r\n **\r\n = (number) length.\r\n \\*/\r\n R.getTotalLength = getTotalLength;\r\n /*\\\r\n * Raphael.getPointAtLength\r\n [ method ]\r\n **\r\n * Return coordinates of the point located at the given length on the given path.\r\n **\r\n > Parameters\r\n **\r\n - path (string) SVG path string\r\n - length (number)\r\n **\r\n = (object) representation of the point:\r\n o {\r\n o x: (number) x coordinate\r\n o y: (number) y coordinate\r\n o alpha: (number) angle of derivative\r\n o }\r\n \\*/\r\n R.getPointAtLength = getPointAtLength;\r\n /*\\\r\n * Raphael.getSubpath\r\n [ method ]\r\n **\r\n * Return subpath of a given path from given length to given length.\r\n **\r\n > Parameters\r\n **\r\n - path (string) SVG path string\r\n - from (number) position of the start of the segment\r\n - to (number) position of the end of the segment\r\n **\r\n = (string) pathstring for the segment\r\n \\*/\r\n R.getSubpath = function (path, from, to) {\r\n if (this.getTotalLength(path) - to < 1e-6) {\r\n return getSubpathsAtLength(path, from).end;\r\n }\r\n var a = getSubpathsAtLength(path, to, 1);\r\n return from ? getSubpathsAtLength(a, from).end : a;\r\n };\r\n /*\\\r\n * Element.getTotalLength\r\n [ method ]\r\n **\r\n * Returns length of the path in pixels. Only works for element of “path” type.\r\n = (number) length.\r\n \\*/\r\n elproto.getTotalLength = function () {\r\n var path = this.getPath();\r\n if (!path) {\r\n return;\r\n }\r\n\r\n if (this.node.getTotalLength) {\r\n return this.node.getTotalLength();\r\n }\r\n\r\n return getTotalLength(path);\r\n };\r\n /*\\\r\n * Element.getPointAtLength\r\n [ method ]\r\n **\r\n * Return coordinates of the point located at the given length on the given path. Only works for element of “path” type.\r\n **\r\n > Parameters\r\n **\r\n - length (number)\r\n **\r\n = (object) representation of the point:\r\n o {\r\n o x: (number) x coordinate\r\n o y: (number) y coordinate\r\n o alpha: (number) angle of derivative\r\n o }\r\n \\*/\r\n elproto.getPointAtLength = function (length) {\r\n var path = this.getPath();\r\n if (!path) {\r\n return;\r\n }\r\n\r\n return getPointAtLength(path, length);\r\n };\r\n /*\\\r\n * Element.getPath\r\n [ method ]\r\n **\r\n * Returns path of the element. Only works for elements of “path” type and simple elements like circle.\r\n = (object) path\r\n **\r\n \\*/\r\n elproto.getPath = function () {\r\n var path,\r\n getPath = R._getPath[this.type];\r\n\r\n if (this.type == "text" || this.type == "set") {\r\n return;\r\n }\r\n\r\n if (getPath) {\r\n path = getPath(this);\r\n }\r\n\r\n return path;\r\n };\r\n /*\\\r\n * Element.getSubpath\r\n [ method ]\r\n **\r\n * Return subpath of a given element from given length to given length. Only works for element of “path” type.\r\n **\r\n > Parameters\r\n **\r\n - from (number) position of the start of the segment\r\n - to (number) position of the end of the segment\r\n **\r\n = (string) pathstring for the segment\r\n \\*/\r\n elproto.getSubpath = function (from, to) {\r\n var path = this.getPath();\r\n if (!path) {\r\n return;\r\n }\r\n\r\n return R.getSubpath(path, from, to);\r\n };\r\n /*\\\r\n * Raphael.easing_formulas\r\n [ property ]\r\n **\r\n * Object that contains easing formulas for animation. You could extend it with your own. By default it has following list of easing:\r\n #
      \r\n #
    • “linear”
    • \r\n #
    • “<” or “easeIn” or “ease-in”
    • \r\n #
    • “>” or “easeOut” or “ease-out”
    • \r\n #
    • “<>” or “easeInOut” or “ease-in-out”
    • \r\n #
    • “backIn” or “back-in”
    • \r\n #
    • “backOut” or “back-out”
    • \r\n #
    • “elastic”
    • \r\n #
    • “bounce”
    • \r\n #
    \r\n #

    See also Easing demo.

    \r\n \\*/\r\n var ef = R.easing_formulas = {\r\n linear: function (n) {\r\n return n;\r\n },\r\n "<": function (n) {\r\n return pow(n, 1.7);\r\n },\r\n ">": function (n) {\r\n return pow(n, .48);\r\n },\r\n "<>": function (n) {\r\n var q = .48 - n / 1.04,\r\n Q = math.sqrt(.1734 + q * q),\r\n x = Q - q,\r\n X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1),\r\n y = -Q - q,\r\n Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1),\r\n t = X + Y + .5;\r\n return (1 - t) * 3 * t * t + t * t * t;\r\n },\r\n backIn: function (n) {\r\n var s = 1.70158;\r\n return n * n * ((s + 1) * n - s);\r\n },\r\n backOut: function (n) {\r\n n = n - 1;\r\n var s = 1.70158;\r\n return n * n * ((s + 1) * n + s) + 1;\r\n },\r\n elastic: function (n) {\r\n if (n == !!n) {\r\n return n;\r\n }\r\n return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1;\r\n },\r\n bounce: function (n) {\r\n var s = 7.5625,\r\n p = 2.75,\r\n l;\r\n if (n < (1 / p)) {\r\n l = s * n * n;\r\n } else {\r\n if (n < (2 / p)) {\r\n n -= (1.5 / p);\r\n l = s * n * n + .75;\r\n } else {\r\n if (n < (2.5 / p)) {\r\n n -= (2.25 / p);\r\n l = s * n * n + .9375;\r\n } else {\r\n n -= (2.625 / p);\r\n l = s * n * n + .984375;\r\n }\r\n }\r\n }\r\n return l;\r\n }\r\n };\r\n ef.easeIn = ef["ease-in"] = ef["<"];\r\n ef.easeOut = ef["ease-out"] = ef[">"];\r\n ef.easeInOut = ef["ease-in-out"] = ef["<>"];\r\n ef["back-in"] = ef.backIn;\r\n ef["back-out"] = ef.backOut;\r\n\r\n var animationElements = [],\r\n requestAnimFrame = window.requestAnimationFrame ||\r\n window.webkitRequestAnimationFrame ||\r\n window.mozRequestAnimationFrame ||\r\n window.oRequestAnimationFrame ||\r\n window.msRequestAnimationFrame ||\r\n function (callback) {\r\n setTimeout(callback, 16);\r\n },\r\n animation = function () {\r\n var Now = +new Date,\r\n l = 0;\r\n for (; l < animationElements.length; l++) {\r\n var e = animationElements[l];\r\n if (e.el.removed || e.paused) {\r\n continue;\r\n }\r\n var time = Now - e.start,\r\n ms = e.ms,\r\n easing = e.easing,\r\n from = e.from,\r\n diff = e.diff,\r\n to = e.to,\r\n t = e.t,\r\n that = e.el,\r\n set = {},\r\n now,\r\n init = {},\r\n key;\r\n if (e.initstatus) {\r\n time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms;\r\n e.status = e.initstatus;\r\n delete e.initstatus;\r\n e.stop && animationElements.splice(l--, 1);\r\n } else {\r\n e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top;\r\n }\r\n if (time < 0) {\r\n continue;\r\n }\r\n if (time < ms) {\r\n var pos = easing(time / ms);\r\n for (var attr in from) if (from[has](attr)) {\r\n switch (availableAnimAttrs[attr]) {\r\n case nu:\r\n now = +from[attr] + pos * ms * diff[attr];\r\n break;\r\n case "colour":\r\n now = "rgb(" + [\r\n upto255(round(from[attr].r + pos * ms * diff[attr].r)),\r\n upto255(round(from[attr].g + pos * ms * diff[attr].g)),\r\n upto255(round(from[attr].b + pos * ms * diff[attr].b))\r\n ].join(",") + ")";\r\n break;\r\n case "path":\r\n now = [];\r\n for (var i = 0, ii = from[attr].length; i < ii; i++) {\r\n now[i] = [from[attr][i][0]];\r\n for (var j = 1, jj = from[attr][i].length; j < jj; j++) {\r\n now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j];\r\n }\r\n now[i] = now[i].join(S);\r\n }\r\n now = now.join(S);\r\n break;\r\n case "transform":\r\n if (diff[attr].real) {\r\n now = [];\r\n for (i = 0, ii = from[attr].length; i < ii; i++) {\r\n now[i] = [from[attr][i][0]];\r\n for (j = 1, jj = from[attr][i].length; j < jj; j++) {\r\n now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j];\r\n }\r\n }\r\n } else {\r\n var get = function (i) {\r\n return +from[attr][i] + pos * ms * diff[attr][i];\r\n };\r\n // now = [["r", get(2), 0, 0], ["t", get(3), get(4)], ["s", get(0), get(1), 0, 0]];\r\n now = [["m", get(0), get(1), get(2), get(3), get(4), get(5)]];\r\n }\r\n break;\r\n case "csv":\r\n if (attr == "clip-rect") {\r\n now = [];\r\n i = 4;\r\n while (i--) {\r\n now[i] = +from[attr][i] + pos * ms * diff[attr][i];\r\n }\r\n }\r\n break;\r\n default:\r\n var from2 = [][concat](from[attr]);\r\n now = [];\r\n i = that.paper.customAttributes[attr].length;\r\n while (i--) {\r\n now[i] = +from2[i] + pos * ms * diff[attr][i];\r\n }\r\n break;\r\n }\r\n set[attr] = now;\r\n }\r\n that.attr(set);\r\n (function (id, that, anim) {\r\n setTimeout(function () {\r\n eve("raphael.anim.frame." + id, that, anim);\r\n });\r\n })(that.id, that, e.anim);\r\n } else {\r\n (function(f, el, a) {\r\n setTimeout(function() {\r\n eve("raphael.anim.frame." + el.id, el, a);\r\n eve("raphael.anim.finish." + el.id, el, a);\r\n R.is(f, "function") && f.call(el);\r\n });\r\n })(e.callback, that, e.anim);\r\n that.attr(to);\r\n animationElements.splice(l--, 1);\r\n if (e.repeat > 1 && !e.next) {\r\n for (key in to) if (to[has](key)) {\r\n init[key] = e.totalOrigin[key];\r\n }\r\n e.el.attr(init);\r\n runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1);\r\n }\r\n if (e.next && !e.stop) {\r\n runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat);\r\n }\r\n }\r\n }\r\n animationElements.length && requestAnimFrame(animation);\r\n },\r\n upto255 = function (color) {\r\n return color > 255 ? 255 : color < 0 ? 0 : color;\r\n };\r\n /*\\\r\n * Element.animateWith\r\n [ method ]\r\n **\r\n * Acts similar to @Element.animate, but ensure that given animation runs in sync with another given element.\r\n **\r\n > Parameters\r\n **\r\n - el (object) element to sync with\r\n - anim (object) animation to sync with\r\n - params (object) #optional final attributes for the element, see also @Element.attr\r\n - ms (number) #optional number of milliseconds for animation to run\r\n - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\r\n - callback (function) #optional callback function. Will be called at the end of animation.\r\n * or\r\n - element (object) element to sync with\r\n - anim (object) animation to sync with\r\n - animation (object) #optional animation object, see @Raphael.animation\r\n **\r\n = (object) original element\r\n \\*/\r\n elproto.animateWith = function (el, anim, params, ms, easing, callback) {\r\n var element = this;\r\n if (element.removed) {\r\n callback && callback.call(element);\r\n return element;\r\n }\r\n var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback),\r\n x, y;\r\n runAnimation(a, element, a.percents[0], null, element.attr());\r\n for (var i = 0, ii = animationElements.length; i < ii; i++) {\r\n if (animationElements[i].anim == anim && animationElements[i].el == el) {\r\n animationElements[ii - 1].start = animationElements[i].start;\r\n break;\r\n }\r\n }\r\n return element;\r\n //\r\n //\r\n // var a = params ? R.animation(params, ms, easing, callback) : anim,\r\n // status = element.status(anim);\r\n // return this.animate(a).status(a, status * anim.ms / a.ms);\r\n };\r\n function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) {\r\n var cx = 3 * p1x,\r\n bx = 3 * (p2x - p1x) - cx,\r\n ax = 1 - cx - bx,\r\n cy = 3 * p1y,\r\n by = 3 * (p2y - p1y) - cy,\r\n ay = 1 - cy - by;\r\n function sampleCurveX(t) {\r\n return ((ax * t + bx) * t + cx) * t;\r\n }\r\n function solve(x, epsilon) {\r\n var t = solveCurveX(x, epsilon);\r\n return ((ay * t + by) * t + cy) * t;\r\n }\r\n function solveCurveX(x, epsilon) {\r\n var t0, t1, t2, x2, d2, i;\r\n for(t2 = x, i = 0; i < 8; i++) {\r\n x2 = sampleCurveX(t2) - x;\r\n if (abs(x2) < epsilon) {\r\n return t2;\r\n }\r\n d2 = (3 * ax * t2 + 2 * bx) * t2 + cx;\r\n if (abs(d2) < 1e-6) {\r\n break;\r\n }\r\n t2 = t2 - x2 / d2;\r\n }\r\n t0 = 0;\r\n t1 = 1;\r\n t2 = x;\r\n if (t2 < t0) {\r\n return t0;\r\n }\r\n if (t2 > t1) {\r\n return t1;\r\n }\r\n while (t0 < t1) {\r\n x2 = sampleCurveX(t2);\r\n if (abs(x2 - x) < epsilon) {\r\n return t2;\r\n }\r\n if (x > x2) {\r\n t0 = t2;\r\n } else {\r\n t1 = t2;\r\n }\r\n t2 = (t1 - t0) / 2 + t0;\r\n }\r\n return t2;\r\n }\r\n return solve(t, 1 / (200 * duration));\r\n }\r\n elproto.onAnimation = function (f) {\r\n f ? eve.on("raphael.anim.frame." + this.id, f) : eve.unbind("raphael.anim.frame." + this.id);\r\n return this;\r\n };\r\n function Animation(anim, ms) {\r\n var percents = [],\r\n newAnim = {};\r\n this.ms = ms;\r\n this.times = 1;\r\n if (anim) {\r\n for (var attr in anim) if (anim[has](attr)) {\r\n newAnim[toFloat(attr)] = anim[attr];\r\n percents.push(toFloat(attr));\r\n }\r\n percents.sort(sortByNumber);\r\n }\r\n this.anim = newAnim;\r\n this.top = percents[percents.length - 1];\r\n this.percents = percents;\r\n }\r\n /*\\\r\n * Animation.delay\r\n [ method ]\r\n **\r\n * Creates a copy of existing animation object with given delay.\r\n **\r\n > Parameters\r\n **\r\n - delay (number) number of ms to pass between animation start and actual animation\r\n **\r\n = (object) new altered Animation object\r\n | var anim = Raphael.animation({cx: 10, cy: 20}, 2e3);\r\n | circle1.animate(anim); // run the given animation immediately\r\n | circle2.animate(anim.delay(500)); // run the given animation after 500 ms\r\n \\*/\r\n Animation.prototype.delay = function (delay) {\r\n var a = new Animation(this.anim, this.ms);\r\n a.times = this.times;\r\n a.del = +delay || 0;\r\n return a;\r\n };\r\n /*\\\r\n * Animation.repeat\r\n [ method ]\r\n **\r\n * Creates a copy of existing animation object with given repetition.\r\n **\r\n > Parameters\r\n **\r\n - repeat (number) number iterations of animation. For infinite animation pass `Infinity`\r\n **\r\n = (object) new altered Animation object\r\n \\*/\r\n Animation.prototype.repeat = function (times) {\r\n var a = new Animation(this.anim, this.ms);\r\n a.del = this.del;\r\n a.times = math.floor(mmax(times, 0)) || 1;\r\n return a;\r\n };\r\n function runAnimation(anim, element, percent, status, totalOrigin, times) {\r\n percent = toFloat(percent);\r\n var params,\r\n isInAnim,\r\n isInAnimSet,\r\n percents = [],\r\n next,\r\n prev,\r\n timestamp,\r\n ms = anim.ms,\r\n from = {},\r\n to = {},\r\n diff = {};\r\n if (status) {\r\n for (i = 0, ii = animationElements.length; i < ii; i++) {\r\n var e = animationElements[i];\r\n if (e.el.id == element.id && e.anim == anim) {\r\n if (e.percent != percent) {\r\n animationElements.splice(i, 1);\r\n isInAnimSet = 1;\r\n } else {\r\n isInAnim = e;\r\n }\r\n element.attr(e.totalOrigin);\r\n break;\r\n }\r\n }\r\n } else {\r\n status = +to; // NaN\r\n }\r\n for (var i = 0, ii = anim.percents.length; i < ii; i++) {\r\n if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) {\r\n percent = anim.percents[i];\r\n prev = anim.percents[i - 1] || 0;\r\n ms = ms / anim.top * (percent - prev);\r\n next = anim.percents[i + 1];\r\n params = anim.anim[percent];\r\n break;\r\n } else if (status) {\r\n element.attr(anim.anim[anim.percents[i]]);\r\n }\r\n }\r\n if (!params) {\r\n return;\r\n }\r\n if (!isInAnim) {\r\n for (var attr in params) if (params[has](attr)) {\r\n if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) {\r\n from[attr] = element.attr(attr);\r\n (from[attr] == null) && (from[attr] = availableAttrs[attr]);\r\n to[attr] = params[attr];\r\n switch (availableAnimAttrs[attr]) {\r\n case nu:\r\n diff[attr] = (to[attr] - from[attr]) / ms;\r\n break;\r\n case "colour":\r\n from[attr] = R.getRGB(from[attr]);\r\n var toColour = R.getRGB(to[attr]);\r\n diff[attr] = {\r\n r: (toColour.r - from[attr].r) / ms,\r\n g: (toColour.g - from[attr].g) / ms,\r\n b: (toColour.b - from[attr].b) / ms\r\n };\r\n break;\r\n case "path":\r\n var pathes = path2curve(from[attr], to[attr]),\r\n toPath = pathes[1];\r\n from[attr] = pathes[0];\r\n diff[attr] = [];\r\n for (i = 0, ii = from[attr].length; i < ii; i++) {\r\n diff[attr][i] = [0];\r\n for (var j = 1, jj = from[attr][i].length; j < jj; j++) {\r\n diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms;\r\n }\r\n }\r\n break;\r\n case "transform":\r\n var _ = element._,\r\n eq = equaliseTransform(_[attr], to[attr]);\r\n if (eq) {\r\n from[attr] = eq.from;\r\n to[attr] = eq.to;\r\n diff[attr] = [];\r\n diff[attr].real = true;\r\n for (i = 0, ii = from[attr].length; i < ii; i++) {\r\n diff[attr][i] = [from[attr][i][0]];\r\n for (j = 1, jj = from[attr][i].length; j < jj; j++) {\r\n diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms;\r\n }\r\n }\r\n } else {\r\n var m = (element.matrix || new Matrix),\r\n to2 = {\r\n _: {transform: _.transform},\r\n getBBox: function () {\r\n return element.getBBox(1);\r\n }\r\n };\r\n from[attr] = [\r\n m.a,\r\n m.b,\r\n m.c,\r\n m.d,\r\n m.e,\r\n m.f\r\n ];\r\n extractTransform(to2, to[attr]);\r\n to[attr] = to2._.transform;\r\n diff[attr] = [\r\n (to2.matrix.a - m.a) / ms,\r\n (to2.matrix.b - m.b) / ms,\r\n (to2.matrix.c - m.c) / ms,\r\n (to2.matrix.d - m.d) / ms,\r\n (to2.matrix.e - m.e) / ms,\r\n (to2.matrix.f - m.f) / ms\r\n ];\r\n // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy];\r\n // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }};\r\n // extractTransform(to2, to[attr]);\r\n // diff[attr] = [\r\n // (to2._.sx - _.sx) / ms,\r\n // (to2._.sy - _.sy) / ms,\r\n // (to2._.deg - _.deg) / ms,\r\n // (to2._.dx - _.dx) / ms,\r\n // (to2._.dy - _.dy) / ms\r\n // ];\r\n }\r\n break;\r\n case "csv":\r\n var values = Str(params[attr])[split](separator),\r\n from2 = Str(from[attr])[split](separator);\r\n if (attr == "clip-rect") {\r\n from[attr] = from2;\r\n diff[attr] = [];\r\n i = from2.length;\r\n while (i--) {\r\n diff[attr][i] = (values[i] - from[attr][i]) / ms;\r\n }\r\n }\r\n to[attr] = values;\r\n break;\r\n default:\r\n values = [][concat](params[attr]);\r\n from2 = [][concat](from[attr]);\r\n diff[attr] = [];\r\n i = element.paper.customAttributes[attr].length;\r\n while (i--) {\r\n diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n var easing = params.easing,\r\n easyeasy = R.easing_formulas[easing];\r\n if (!easyeasy) {\r\n easyeasy = Str(easing).match(bezierrg);\r\n if (easyeasy && easyeasy.length == 5) {\r\n var curve = easyeasy;\r\n easyeasy = function (t) {\r\n return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms);\r\n };\r\n } else {\r\n easyeasy = pipe;\r\n }\r\n }\r\n timestamp = params.start || anim.start || +new Date;\r\n e = {\r\n anim: anim,\r\n percent: percent,\r\n timestamp: timestamp,\r\n start: timestamp + (anim.del || 0),\r\n status: 0,\r\n initstatus: status || 0,\r\n stop: false,\r\n ms: ms,\r\n easing: easyeasy,\r\n from: from,\r\n diff: diff,\r\n to: to,\r\n el: element,\r\n callback: params.callback,\r\n prev: prev,\r\n next: next,\r\n repeat: times || anim.times,\r\n origin: element.attr(),\r\n totalOrigin: totalOrigin\r\n };\r\n animationElements.push(e);\r\n if (status && !isInAnim && !isInAnimSet) {\r\n e.stop = true;\r\n e.start = new Date - ms * status;\r\n if (animationElements.length == 1) {\r\n return animation();\r\n }\r\n }\r\n if (isInAnimSet) {\r\n e.start = new Date - e.ms * status;\r\n }\r\n animationElements.length == 1 && requestAnimFrame(animation);\r\n } else {\r\n isInAnim.initstatus = status;\r\n isInAnim.start = new Date - isInAnim.ms * status;\r\n }\r\n eve("raphael.anim.start." + element.id, element, anim);\r\n }\r\n /*\\\r\n * Raphael.animation\r\n [ method ]\r\n **\r\n * Creates an animation object that can be passed to the @Element.animate or @Element.animateWith methods.\r\n * See also @Animation.delay and @Animation.repeat methods.\r\n **\r\n > Parameters\r\n **\r\n - params (object) final attributes for the element, see also @Element.attr\r\n - ms (number) number of milliseconds for animation to run\r\n - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\r\n - callback (function) #optional callback function. Will be called at the end of animation.\r\n **\r\n = (object) @Animation\r\n \\*/\r\n R.animation = function (params, ms, easing, callback) {\r\n if (params instanceof Animation) {\r\n return params;\r\n }\r\n if (R.is(easing, "function") || !easing) {\r\n callback = callback || easing || null;\r\n easing = null;\r\n }\r\n params = Object(params);\r\n ms = +ms || 0;\r\n var p = {},\r\n json,\r\n attr;\r\n for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) {\r\n json = true;\r\n p[attr] = params[attr];\r\n }\r\n if (!json) {\r\n // if percent-like syntax is used and end-of-all animation callback used\r\n if(callback){\r\n // find the last one\r\n var lastKey = 0;\r\n for(var i in params){\r\n var percent = toInt(i);\r\n if(params[has](i) && percent > lastKey){\r\n lastKey = percent;\r\n }\r\n }\r\n lastKey += \'%\';\r\n // if already defined callback in the last keyframe, skip\r\n !params[lastKey].callback && (params[lastKey].callback = callback);\r\n }\r\n return new Animation(params, ms);\r\n } else {\r\n easing && (p.easing = easing);\r\n callback && (p.callback = callback);\r\n return new Animation({100: p}, ms);\r\n }\r\n };\r\n /*\\\r\n * Element.animate\r\n [ method ]\r\n **\r\n * Creates and starts animation for given element.\r\n **\r\n > Parameters\r\n **\r\n - params (object) final attributes for the element, see also @Element.attr\r\n - ms (number) number of milliseconds for animation to run\r\n - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\r\n - callback (function) #optional callback function. Will be called at the end of animation.\r\n * or\r\n - animation (object) animation object, see @Raphael.animation\r\n **\r\n = (object) original element\r\n \\*/\r\n elproto.animate = function (params, ms, easing, callback) {\r\n var element = this;\r\n if (element.removed) {\r\n callback && callback.call(element);\r\n return element;\r\n }\r\n var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback);\r\n runAnimation(anim, element, anim.percents[0], null, element.attr());\r\n return element;\r\n };\r\n /*\\\r\n * Element.setTime\r\n [ method ]\r\n **\r\n * Sets the status of animation of the element in milliseconds. Similar to @Element.status method.\r\n **\r\n > Parameters\r\n **\r\n - anim (object) animation object\r\n - value (number) number of milliseconds from the beginning of the animation\r\n **\r\n = (object) original element if `value` is specified\r\n * Note, that during animation following events are triggered:\r\n *\r\n * On each animation frame event `anim.frame.`, on start `anim.start.` and on end `anim.finish.`.\r\n \\*/\r\n elproto.setTime = function (anim, value) {\r\n if (anim && value != null) {\r\n this.status(anim, mmin(value, anim.ms) / anim.ms);\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Element.status\r\n [ method ]\r\n **\r\n * Gets or sets the status of animation of the element.\r\n **\r\n > Parameters\r\n **\r\n - anim (object) #optional animation object\r\n - value (number) #optional 0 – 1. If specified, method works like a setter and sets the status of a given animation to the value. This will cause animation to jump to the given position.\r\n **\r\n = (number) status\r\n * or\r\n = (array) status if `anim` is not specified. Array of objects in format:\r\n o {\r\n o anim: (object) animation object\r\n o status: (number) status\r\n o }\r\n * or\r\n = (object) original element if `value` is specified\r\n \\*/\r\n elproto.status = function (anim, value) {\r\n var out = [],\r\n i = 0,\r\n len,\r\n e;\r\n if (value != null) {\r\n runAnimation(anim, this, -1, mmin(value, 1));\r\n return this;\r\n } else {\r\n len = animationElements.length;\r\n for (; i < len; i++) {\r\n e = animationElements[i];\r\n if (e.el.id == this.id && (!anim || e.anim == anim)) {\r\n if (anim) {\r\n return e.status;\r\n }\r\n out.push({\r\n anim: e.anim,\r\n status: e.status\r\n });\r\n }\r\n }\r\n if (anim) {\r\n return 0;\r\n }\r\n return out;\r\n }\r\n };\r\n /*\\\r\n * Element.pause\r\n [ method ]\r\n **\r\n * Stops animation of the element with ability to resume it later on.\r\n **\r\n > Parameters\r\n **\r\n - anim (object) #optional animation object\r\n **\r\n = (object) original element\r\n \\*/\r\n elproto.pause = function (anim) {\r\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\r\n if (eve("raphael.anim.pause." + this.id, this, animationElements[i].anim) !== false) {\r\n animationElements[i].paused = true;\r\n }\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Element.resume\r\n [ method ]\r\n **\r\n * Resumes animation if it was paused with @Element.pause method.\r\n **\r\n > Parameters\r\n **\r\n - anim (object) #optional animation object\r\n **\r\n = (object) original element\r\n \\*/\r\n elproto.resume = function (anim) {\r\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\r\n var e = animationElements[i];\r\n if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) {\r\n delete e.paused;\r\n this.status(e.anim, e.status);\r\n }\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Element.stop\r\n [ method ]\r\n **\r\n * Stops animation of the element.\r\n **\r\n > Parameters\r\n **\r\n - anim (object) #optional animation object\r\n **\r\n = (object) original element\r\n \\*/\r\n elproto.stop = function (anim) {\r\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\r\n if (eve("raphael.anim.stop." + this.id, this, animationElements[i].anim) !== false) {\r\n animationElements.splice(i--, 1);\r\n }\r\n }\r\n return this;\r\n };\r\n function stopAnimation(paper) {\r\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) {\r\n animationElements.splice(i--, 1);\r\n }\r\n }\r\n eve.on("raphael.remove", stopAnimation);\r\n eve.on("raphael.clear", stopAnimation);\r\n elproto.toString = function () {\r\n return "Rapha\\xebl\\u2019s object";\r\n };\r\n\r\n // Set\r\n var Set = function (items) {\r\n this.items = [];\r\n this.length = 0;\r\n this.type = "set";\r\n if (items) {\r\n for (var i = 0, ii = items.length; i < ii; i++) {\r\n if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) {\r\n this[this.items.length] = this.items[this.items.length] = items[i];\r\n this.length++;\r\n }\r\n }\r\n }\r\n },\r\n setproto = Set.prototype;\r\n /*\\\r\n * Set.push\r\n [ method ]\r\n **\r\n * Adds each argument to the current set.\r\n = (object) original element\r\n \\*/\r\n setproto.push = function () {\r\n var item,\r\n len;\r\n for (var i = 0, ii = arguments.length; i < ii; i++) {\r\n item = arguments[i];\r\n if (item && (item.constructor == elproto.constructor || item.constructor == Set)) {\r\n len = this.items.length;\r\n this[len] = this.items[len] = item;\r\n this.length++;\r\n }\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Set.pop\r\n [ method ]\r\n **\r\n * Removes last element and returns it.\r\n = (object) element\r\n \\*/\r\n setproto.pop = function () {\r\n this.length && delete this[this.length--];\r\n return this.items.pop();\r\n };\r\n /*\\\r\n * Set.forEach\r\n [ method ]\r\n **\r\n * Executes given function for each element in the set.\r\n *\r\n * If function returns `false` it will stop loop running.\r\n **\r\n > Parameters\r\n **\r\n - callback (function) function to run\r\n - thisArg (object) context object for the callback\r\n = (object) Set object\r\n \\*/\r\n setproto.forEach = function (callback, thisArg) {\r\n for (var i = 0, ii = this.items.length; i < ii; i++) {\r\n if (callback.call(thisArg, this.items[i], i) === false) {\r\n return this;\r\n }\r\n }\r\n return this;\r\n };\r\n for (var method in elproto) if (elproto[has](method)) {\r\n setproto[method] = (function (methodname) {\r\n return function () {\r\n var arg = arguments;\r\n return this.forEach(function (el) {\r\n el[methodname][apply](el, arg);\r\n });\r\n };\r\n })(method);\r\n }\r\n setproto.attr = function (name, value) {\r\n if (name && R.is(name, array) && R.is(name[0], "object")) {\r\n for (var j = 0, jj = name.length; j < jj; j++) {\r\n this.items[j].attr(name[j]);\r\n }\r\n } else {\r\n for (var i = 0, ii = this.items.length; i < ii; i++) {\r\n this.items[i].attr(name, value);\r\n }\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Set.clear\r\n [ method ]\r\n **\r\n * Removes all elements from the set\r\n \\*/\r\n setproto.clear = function () {\r\n while (this.length) {\r\n this.pop();\r\n }\r\n };\r\n /*\\\r\n * Set.splice\r\n [ method ]\r\n **\r\n * Removes given element from the set\r\n **\r\n > Parameters\r\n **\r\n - index (number) position of the deletion\r\n - count (number) number of element to remove\r\n - insertion… (object) #optional elements to insert\r\n = (object) set elements that were deleted\r\n \\*/\r\n setproto.splice = function (index, count, insertion) {\r\n index = index < 0 ? mmax(this.length + index, 0) : index;\r\n count = mmax(0, mmin(this.length - index, count));\r\n var tail = [],\r\n todel = [],\r\n args = [],\r\n i;\r\n for (i = 2; i < arguments.length; i++) {\r\n args.push(arguments[i]);\r\n }\r\n for (i = 0; i < count; i++) {\r\n todel.push(this[index + i]);\r\n }\r\n for (; i < this.length - index; i++) {\r\n tail.push(this[index + i]);\r\n }\r\n var arglen = args.length;\r\n for (i = 0; i < arglen + tail.length; i++) {\r\n this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen];\r\n }\r\n i = this.items.length = this.length -= count - arglen;\r\n while (this[i]) {\r\n delete this[i++];\r\n }\r\n return new Set(todel);\r\n };\r\n /*\\\r\n * Set.exclude\r\n [ method ]\r\n **\r\n * Removes given element from the set\r\n **\r\n > Parameters\r\n **\r\n - element (object) element to remove\r\n = (boolean) `true` if object was found & removed from the set\r\n \\*/\r\n setproto.exclude = function (el) {\r\n for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) {\r\n this.splice(i, 1);\r\n return true;\r\n }\r\n };\r\n setproto.animate = function (params, ms, easing, callback) {\r\n (R.is(easing, "function") || !easing) && (callback = easing || null);\r\n var len = this.items.length,\r\n i = len,\r\n item,\r\n set = this,\r\n collector;\r\n if (!len) {\r\n return this;\r\n }\r\n callback && (collector = function () {\r\n !--len && callback.call(set);\r\n });\r\n easing = R.is(easing, string) ? easing : collector;\r\n var anim = R.animation(params, ms, easing, collector);\r\n item = this.items[--i].animate(anim);\r\n while (i--) {\r\n this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim, anim);\r\n (this.items[i] && !this.items[i].removed) || len--;\r\n }\r\n return this;\r\n };\r\n setproto.insertAfter = function (el) {\r\n var i = this.items.length;\r\n while (i--) {\r\n this.items[i].insertAfter(el);\r\n }\r\n return this;\r\n };\r\n\r\n // FREEGROUP Fix: RaphaelJS changes the order of the elements of the \'set\' by calling the toBack method.\r\n // "toBack" must be called reverse to care about the rendering order. In this case we override\r\n // the buggy default implementation here.\r\n //\r\n setproto.toBack = function () {\r\n var i = this.items.length;\r\n while (i--) {\r\n this.items[i].toBack();\r\n }\r\n return this;\r\n };\r\n\r\n // FREEGROUP Fix: Unfortunately raphael didn\'T expose the "set.prototype". In this case\r\n // I must add all extension to the raphael implementation itself.\r\n // Provide support method for easy check if the elements are visible.\r\n setproto.isVisible = function () {\r\n var i = this.items.length;\r\n var visible = false;\r\n while (i--) {\r\n visible = visible ||this.items[i].isVisible();\r\n }\r\n return visible;\r\n };\r\n\r\n\r\n // FREEGROUP FIX: Adding "isWithoutTransform" to the function and redirect them to the elements\r\n setproto.getBBox = function (isWithoutTransform) {\r\n var x = [],\r\n y = [],\r\n x2 = [],\r\n y2 = [];\r\n for (var i = this.items.length; i--;) if (!this.items[i].removed) {\r\n var box = this.items[i].getBBox(isWithoutTransform);\r\n x.push(box.x);\r\n y.push(box.y);\r\n x2.push(box.x + box.width);\r\n y2.push(box.y + box.height);\r\n }\r\n x = mmin[apply](0, x);\r\n y = mmin[apply](0, y);\r\n x2 = mmax[apply](0, x2);\r\n y2 = mmax[apply](0, y2);\r\n return {\r\n x: x,\r\n y: y,\r\n x2: x2,\r\n y2: y2,\r\n width: x2 - x,\r\n height: y2 - y\r\n };\r\n };\r\n setproto.clone = function (s) {\r\n s = this.paper.set();\r\n for (var i = 0, ii = this.items.length; i < ii; i++) {\r\n s.push(this.items[i].clone());\r\n }\r\n return s;\r\n };\r\n setproto.toString = function () {\r\n return "Rapha\\xebl\\u2018s set";\r\n };\r\n\r\n setproto.glow = function(glowConfig) {\r\n var ret = this.paper.set();\r\n this.forEach(function(shape, index){\r\n var g = shape.glow(glowConfig);\r\n if(g != null){\r\n g.forEach(function(shape2, index2){\r\n ret.push(shape2);\r\n });\r\n }\r\n });\r\n return ret;\r\n };\r\n\r\n\r\n /*\\\r\n * Set.isPointInside\r\n [ method ]\r\n **\r\n * Determine if given point is inside this set’s elements\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the point\r\n - y (number) y coordinate of the point\r\n = (boolean) `true` if point is inside any of the set\'s elements\r\n \\*/\r\n setproto.isPointInside = function (x, y) {\r\n var isPointInside = false;\r\n this.forEach(function (el) {\r\n if (el.isPointInside(x, y)) {\r\n isPointInside = true;\r\n return false; // stop loop\r\n }\r\n });\r\n return isPointInside;\r\n };\r\n\r\n /*\\\r\n * Raphael.registerFont\r\n [ method ]\r\n **\r\n * Adds given font to the registered set of fonts for Raphaël. Should be used as an internal call from within Cufón’s font file.\r\n * Returns original parameter, so it could be used with chaining.\r\n # More about Cufón and how to convert your font form TTF, OTF, etc to JavaScript file.\r\n **\r\n > Parameters\r\n **\r\n - font (object) the font to register\r\n = (object) the font you passed in\r\n > Usage\r\n | Cufon.registerFont(Raphael.registerFont({…}));\r\n \\*/\r\n R.registerFont = function (font) {\r\n if (!font.face) {\r\n return font;\r\n }\r\n this.fonts = this.fonts || {};\r\n var fontcopy = {\r\n w: font.w,\r\n face: {},\r\n glyphs: {}\r\n },\r\n family = font.face["font-family"];\r\n for (var prop in font.face) if (font.face[has](prop)) {\r\n fontcopy.face[prop] = font.face[prop];\r\n }\r\n if (this.fonts[family]) {\r\n this.fonts[family].push(fontcopy);\r\n } else {\r\n this.fonts[family] = [fontcopy];\r\n }\r\n if (!font.svg) {\r\n fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10);\r\n for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) {\r\n var path = font.glyphs[glyph];\r\n fontcopy.glyphs[glyph] = {\r\n w: path.w,\r\n k: {},\r\n d: path.d && "M" + path.d.replace(/[mlcxtrv]/g, function (command) {\r\n return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[command] || "M";\r\n }) + "z"\r\n };\r\n if (path.k) {\r\n for (var k in path.k) if (path[has](k)) {\r\n fontcopy.glyphs[glyph].k[k] = path.k[k];\r\n }\r\n }\r\n }\r\n }\r\n return font;\r\n };\r\n /*\\\r\n * Paper.getFont\r\n [ method ]\r\n **\r\n * Finds font object in the registered fonts by given parameters. You could specify only one word from the font name, like “Myriad” for “Myriad Pro”.\r\n **\r\n > Parameters\r\n **\r\n - family (string) font family name or any word from it\r\n - weight (string) #optional font weight\r\n - style (string) #optional font style\r\n - stretch (string) #optional font stretch\r\n = (object) the font object\r\n > Usage\r\n | paper.print(100, 100, "Test string", paper.getFont("Times", 800), 30);\r\n \\*/\r\n paperproto.getFont = function (family, weight, style, stretch) {\r\n stretch = stretch || "normal";\r\n style = style || "normal";\r\n weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400;\r\n if (!R.fonts) {\r\n return;\r\n }\r\n var font = R.fonts[family];\r\n if (!font) {\r\n var name = new RegExp("(^|\\\\s)" + family.replace(/[^\\w\\d\\s+!~.:_-]/g, E) + "(\\\\s|$)", "i");\r\n for (var fontName in R.fonts) if (R.fonts[has](fontName)) {\r\n if (name.test(fontName)) {\r\n font = R.fonts[fontName];\r\n break;\r\n }\r\n }\r\n }\r\n var thefont;\r\n if (font) {\r\n for (var i = 0, ii = font.length; i < ii; i++) {\r\n thefont = font[i];\r\n if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) {\r\n break;\r\n }\r\n }\r\n }\r\n return thefont;\r\n };\r\n /*\\\r\n * Paper.print\r\n [ method ]\r\n **\r\n * Creates path that represent given text written using given font at given position with given size.\r\n * Result of the method is path element that contains whole text as a separate path.\r\n **\r\n > Parameters\r\n **\r\n - x (number) x position of the text\r\n - y (number) y position of the text\r\n - string (string) text to print\r\n - font (object) font object, see @Paper.getFont\r\n - size (number) #optional size of the font, default is `16`\r\n - origin (string) #optional could be `"baseline"` or `"middle"`, default is `"middle"`\r\n - letter_spacing (number) #optional number in range `-1..1`, default is `0`\r\n - line_spacing (number) #optional number in range `1..3`, default is `1`\r\n = (object) resulting path element, which consist of all letters\r\n > Usage\r\n | var txt = r.print(10, 50, "print", r.getFont("Museo"), 30).attr({fill: "#fff"});\r\n \\*/\r\n paperproto.print = function (x, y, string, font, size, origin, letter_spacing, line_spacing) {\r\n origin = origin || "middle"; // baseline|middle\r\n letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1);\r\n line_spacing = mmax(mmin(line_spacing || 1, 3), 1);\r\n var letters = Str(string)[split](E),\r\n shift = 0,\r\n notfirst = 0,\r\n path = E,\r\n scale;\r\n R.is(font, "string") && (font = this.getFont(font));\r\n if (font) {\r\n scale = (size || 16) / font.face["units-per-em"];\r\n var bb = font.face.bbox[split](separator),\r\n top = +bb[0],\r\n lineHeight = bb[3] - bb[1],\r\n shifty = 0,\r\n height = +bb[1] + (origin == "baseline" ? lineHeight + (+font.face.descent) : lineHeight / 2);\r\n for (var i = 0, ii = letters.length; i < ii; i++) {\r\n if (letters[i] == "\\n") {\r\n shift = 0;\r\n curr = 0;\r\n notfirst = 0;\r\n shifty += lineHeight * line_spacing;\r\n } else {\r\n var prev = notfirst && font.glyphs[letters[i - 1]] || {},\r\n curr = font.glyphs[letters[i]];\r\n shift += notfirst ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0;\r\n notfirst = 1;\r\n }\r\n if (curr && curr.d) {\r\n path += R.transformPath(curr.d, ["t", shift * scale, shifty * scale, "s", scale, scale, top, height, "t", (x - top) / scale, (y - height) / scale]);\r\n }\r\n }\r\n }\r\n return this.path(path).attr({\r\n fill: "#000",\r\n stroke: "none"\r\n });\r\n };\r\n\r\n /*\\\r\n * Paper.add\r\n [ method ]\r\n **\r\n * Imports elements in JSON array in format `{type: type, }`\r\n **\r\n > Parameters\r\n **\r\n - json (array)\r\n = (object) resulting set of imported elements\r\n > Usage\r\n | paper.add([\r\n | {\r\n | type: "circle",\r\n | cx: 10,\r\n | cy: 10,\r\n | r: 5\r\n | },\r\n | {\r\n | type: "rect",\r\n | x: 10,\r\n | y: 10,\r\n | width: 10,\r\n | height: 10,\r\n | fill: "#fc0"\r\n | }\r\n | ]);\r\n \\*/\r\n paperproto.add = function (json) {\r\n if (R.is(json, "array")) {\r\n var res = this.set(),\r\n i = 0,\r\n ii = json.length,\r\n j;\r\n for (; i < ii; i++) {\r\n j = json[i] || {};\r\n elements[has](j.type) && res.push(this[j.type]().attr(j));\r\n }\r\n }\r\n return res;\r\n };\r\n\r\n /*\\\r\n * Raphael.format\r\n [ method ]\r\n **\r\n * Simple format function. Replaces construction of type “`{}`” to the corresponding argument.\r\n **\r\n > Parameters\r\n **\r\n - token (string) string to format\r\n - … (string) rest of arguments will be treated as parameters for replacement\r\n = (string) formated string\r\n > Usage\r\n | var x = 10,\r\n | y = 20,\r\n | width = 40,\r\n | height = 50;\r\n | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z"\r\n | paper.path(Raphael.format("M{0},{1}h{2}v{3}h{4}z", x, y, width, height, -width));\r\n \\*/\r\n R.format = function (token, params) {\r\n var args = R.is(params, array) ? [0][concat](params) : arguments;\r\n token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) {\r\n return args[++i] == null ? E : args[i];\r\n }));\r\n return token || E;\r\n };\r\n /*\\\r\n * Raphael.fullfill\r\n [ method ]\r\n **\r\n * A little bit more advanced format function than @Raphael.format. Replaces construction of type “`{}`” to the corresponding argument.\r\n **\r\n > Parameters\r\n **\r\n - token (string) string to format\r\n - json (object) object which properties will be used as a replacement\r\n = (string) formated string\r\n > Usage\r\n | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z"\r\n | paper.path(Raphael.fullfill("M{x},{y}h{dim.width}v{dim.height}h{dim[\'negative width\']}z", {\r\n | x: 10,\r\n | y: 20,\r\n | dim: {\r\n | width: 40,\r\n | height: 50,\r\n | "negative width": -40\r\n | }\r\n | }));\r\n \\*/\r\n R.fullfill = (function () {\r\n var tokenRegex = /\\{([^\\}]+)\\}/g,\r\n objNotationRegex = /(?:(?:^|\\.)(.+?)(?=\\[|\\.|$|\\()|\\[(\'|")(.+?)\\2\\])(\\(\\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties\r\n replacer = function (all, key, obj) {\r\n var res = obj;\r\n key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) {\r\n name = name || quotedName;\r\n if (res) {\r\n if (name in res) {\r\n res = res[name];\r\n }\r\n typeof res == "function" && isFunc && (res = res());\r\n }\r\n });\r\n res = (res == null || res == obj ? all : res) + "";\r\n return res;\r\n };\r\n return function (str, obj) {\r\n return String(str).replace(tokenRegex, function (all, key) {\r\n return replacer(all, key, obj);\r\n });\r\n };\r\n })();\r\n /*\\\r\n * Raphael.ninja\r\n [ method ]\r\n **\r\n * If you want to leave no trace of Raphaël (Well, Raphaël creates only one global variable `Raphael`, but anyway.) You can use `ninja` method.\r\n * Beware, that in this case plugins could stop working, because they are depending on global variable existence.\r\n **\r\n = (object) Raphael object\r\n > Usage\r\n | (function (local_raphael) {\r\n | var paper = local_raphael(10, 10, 320, 200);\r\n | …\r\n | })(Raphael.ninja());\r\n \\*/\r\n R.ninja = function () {\r\n oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;\r\n return R;\r\n };\r\n /*\\\r\n * Raphael.st\r\n [ property (object) ]\r\n **\r\n * You can add your own method to elements and sets. It is wise to add a set method for each element method\r\n * you added, so you will be able to call the same method on sets too.\r\n **\r\n * See also @Raphael.el.\r\n > Usage\r\n | Raphael.el.red = function () {\r\n | this.attr({fill: "#f00"});\r\n | };\r\n | Raphael.st.red = function () {\r\n | this.forEach(function (el) {\r\n | el.red();\r\n | });\r\n | };\r\n | // then use it\r\n | paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red();\r\n \\*/\r\n R.st = setproto;\r\n\r\n eve.on("raphael.DOMload", function () {\r\n loaded = true;\r\n });\r\n\r\n // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html\r\n (function (doc, loaded, f) {\r\n if (doc.readyState == null && doc.addEventListener){\r\n doc.addEventListener(loaded, f = function () {\r\n doc.removeEventListener(loaded, f, false);\r\n doc.readyState = "complete";\r\n }, false);\r\n doc.readyState = "loading";\r\n }\r\n function isLoaded() {\r\n (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("raphael.DOMload");\r\n }\r\n isLoaded();\r\n })(document, "DOMContentLoaded");\r\n\r\n return R;\r\n}));\r\n\r\n// ┌─────────────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\r\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ SVG Module │ \\\\\r\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\r\n// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\\\\r\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\\\\r\n// └─────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n(function (glob, factory) {\r\n if (typeof define === "function" && define.amd) {\r\n define("raphael.svg", ["raphael.core"], function(raphael) {\r\n return factory(raphael);\r\n });\r\n } else if (typeof exports === "object") {\r\n factory(require("./raphael.core"));\r\n } else {\r\n factory(glob.Raphael);\r\n }\r\n}(this, function(R) {\r\n if (R && !R.svg) {\r\n return;\r\n }\r\n\r\n var has = "hasOwnProperty",\r\n Str = String,\r\n toFloat = parseFloat,\r\n toInt = parseInt,\r\n math = Math,\r\n mmax = math.max,\r\n abs = math.abs,\r\n pow = math.pow,\r\n separator = /[, ]+/,\r\n eve = R.eve,\r\n E = "",\r\n S = " ";\r\n var xlink = "http://www.w3.org/1999/xlink",\r\n markers = {\r\n block: "M5,0 0,2.5 5,5z",\r\n classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z",\r\n diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z",\r\n open: "M6,1 1,3.5 6,6",\r\n oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"\r\n },\r\n markerCounter = {};\r\n R.toString = function () {\r\n return "Your browser supports SVG.\\nYou are running Rapha\\xebl " + this.version;\r\n };\r\n var $ = function (el, attr) {\r\n if (attr) {\r\n if (typeof el == "string") {\r\n el = $(el);\r\n }\r\n for (var key in attr) if (attr[has](key)) {\r\n if (key.substring(0, 6) == "xlink:") {\r\n el.setAttributeNS(xlink, key.substring(6), Str(attr[key]));\r\n } else {\r\n try {\r\n el.setAttribute(key, Str(attr[key]));\r\n }\r\n catch(e){\r\n debugger\r\n }\r\n }\r\n }\r\n } else {\r\n el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el);\r\n el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)");\r\n }\r\n return el;\r\n },\r\n addGradientFill = function (element, gradient) {\r\n // even called if we reset the fill of an shape.\r\n if (gradient === null)\r\n return\r\n\r\n var type = "linear",\r\n id = gradient.replace(/[\\(\\)\\s,\\xb0#]/g, "_"),\r\n fx = .5, fy = .5,\r\n o = element.node,\r\n SVG = element.paper,\r\n s = o.style,\r\n el = R._g.doc.getElementById(id);\r\n if (!el) {\r\n gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) {\r\n type = "radial";\r\n if (_fx && _fy) {\r\n fx = toFloat(_fx);\r\n fy = toFloat(_fy);\r\n var dir = ((fy > .5) * 2 - 1);\r\n pow(fx - .5, 2) + pow(fy - .5, 2) > .25 &&\r\n (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) &&\r\n fy != .5 &&\r\n (fy = fy.toFixed(5) - 1e-5 * dir);\r\n }\r\n return E;\r\n });\r\n gradient = gradient.split(/\\s*\\-\\s*/);\r\n if (type == "linear") {\r\n var angle = gradient.shift();\r\n angle = -toFloat(angle);\r\n if (isNaN(angle)) {\r\n return null;\r\n }\r\n var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))],\r\n max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1);\r\n vector[2] *= max;\r\n vector[3] *= max;\r\n if (vector[2] < 0) {\r\n vector[0] = -vector[2];\r\n vector[2] = 0;\r\n }\r\n if (vector[3] < 0) {\r\n vector[1] = -vector[3];\r\n vector[3] = 0;\r\n }\r\n }\r\n var dots = R._parseDots(gradient);\r\n if (!dots) {\r\n return null;\r\n }\r\n id = id.replace(/[\\(\\)\\s,\\xb0#]/g, "_");\r\n\r\n if (element.gradient && id != element.gradient.id) {\r\n SVG.defs.removeChild(element.gradient);\r\n delete element.gradient;\r\n }\r\n\r\n if (!element.gradient) {\r\n el = $(type + "Gradient", {id: id});\r\n element.gradient = el;\r\n $(el, type == "radial" ? {\r\n fx: fx,\r\n fy: fy\r\n } : {\r\n x1: vector[0],\r\n y1: vector[1],\r\n x2: vector[2],\r\n y2: vector[3],\r\n gradientTransform: element.matrix.invert()\r\n });\r\n SVG.defs.appendChild(el);\r\n for (var i = 0, ii = dots.length; i < ii; i++) {\r\n el.appendChild($("stop", {\r\n offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%",\r\n "stop-color": dots[i].color || "#fff",\r\n "stop-opacity": isFinite(dots[i].opacity) ? dots[i].opacity : 1\r\n }));\r\n }\r\n }\r\n }\r\n /* FREEGROUP: don\'t push URL parameter into the drawing. This will break Apps with "?" in the URL\r\n * see: https://github.com/DmitryBaranovskiy/raphael/issues/693\r\n **/\r\n var url ="";//document.location.protocol + "//" + document.location.host + document.location.pathname;\r\n $(o, {\r\n fill: "url(\'" + url + "#" + id + "\')",\r\n opacity: 1,\r\n "fill-opacity": 1\r\n });\r\n\r\n s.fill = E;\r\n s.opacity = 1;\r\n s.fillOpacity = 1;\r\n return 1;\r\n },\r\n updatePosition = function (o) {\r\n var bbox = o.getBBox(1);\r\n $(o.pattern, {patternTransform: o.matrix.invert() + " translate(" + bbox.x + "," + bbox.y + ")"});\r\n },\r\n addArrow = function (o, value, isEnd) {\r\n if (o.type == "path") {\r\n var values = Str(value).toLowerCase().split("-"),\r\n p = o.paper,\r\n se = isEnd ? "end" : "start",\r\n node = o.node,\r\n attrs = o.attrs,\r\n stroke = attrs["stroke-width"],\r\n i = values.length,\r\n type = "classic",\r\n from,\r\n to,\r\n dx,\r\n refX,\r\n attr,\r\n w = 3,\r\n h = 3,\r\n t = 5;\r\n while (i--) {\r\n switch (values[i]) {\r\n case "block":\r\n case "classic":\r\n case "oval":\r\n case "diamond":\r\n case "open":\r\n case "none":\r\n type = values[i];\r\n break;\r\n case "wide": h = 5; break;\r\n case "narrow": h = 2; break;\r\n case "long": w = 5; break;\r\n case "short": w = 2; break;\r\n }\r\n }\r\n if (type == "open") {\r\n w += 2;\r\n h += 2;\r\n t += 2;\r\n dx = 1;\r\n refX = isEnd ? 4 : 1;\r\n attr = {\r\n fill: "none",\r\n stroke: attrs.stroke\r\n };\r\n } else {\r\n refX = dx = w / 2;\r\n attr = {\r\n fill: attrs.stroke,\r\n stroke: "none"\r\n };\r\n }\r\n if (o._.arrows) {\r\n if (isEnd) {\r\n o._.arrows.endPath && markerCounter[o._.arrows.endPath]--;\r\n o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--;\r\n } else {\r\n o._.arrows.startPath && markerCounter[o._.arrows.startPath]--;\r\n o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--;\r\n }\r\n } else {\r\n o._.arrows = {};\r\n }\r\n if (type != "none") {\r\n var pathId = "raphael-marker-" + type,\r\n markerId = "raphael-marker-" + se + type + w + h + "-obj" + o.id;\r\n if (!R._g.doc.getElementById(pathId)) {\r\n p.defs.appendChild($($("path"), {\r\n "stroke-linecap": "round",\r\n d: markers[type],\r\n id: pathId\r\n }));\r\n markerCounter[pathId] = 1;\r\n } else {\r\n markerCounter[pathId]++;\r\n }\r\n var marker = R._g.doc.getElementById(markerId),\r\n use;\r\n if (!marker) {\r\n marker = $($("marker"), {\r\n id: markerId,\r\n markerHeight: h,\r\n markerWidth: w,\r\n orient: "auto",\r\n refX: refX,\r\n refY: h / 2\r\n });\r\n use = $($("use"), {\r\n "xlink:href": "#" + pathId,\r\n transform: (isEnd ? "rotate(180 " + w / 2 + " " + h / 2 + ") " : E) + "scale(" + w / t + "," + h / t + ")",\r\n "stroke-width": (1 / ((w / t + h / t) / 2)).toFixed(4)\r\n });\r\n marker.appendChild(use);\r\n p.defs.appendChild(marker);\r\n markerCounter[markerId] = 1;\r\n } else {\r\n markerCounter[markerId]++;\r\n use = marker.getElementsByTagName("use")[0];\r\n }\r\n $(use, attr);\r\n var delta = dx * (type != "diamond" && type != "oval");\r\n if (isEnd) {\r\n from = o._.arrows.startdx * stroke || 0;\r\n to = R.getTotalLength(attrs.path) - delta * stroke;\r\n } else {\r\n from = delta * stroke;\r\n to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);\r\n }\r\n attr = {};\r\n attr["marker-" + se] = "url(#" + markerId + ")";\r\n if (to || from) {\r\n attr.d = R.getSubpath(attrs.path, from, to);\r\n }\r\n $(node, attr);\r\n o._.arrows[se + "Path"] = pathId;\r\n o._.arrows[se + "Marker"] = markerId;\r\n o._.arrows[se + "dx"] = delta;\r\n o._.arrows[se + "Type"] = type;\r\n o._.arrows[se + "String"] = value;\r\n } else {\r\n if (isEnd) {\r\n from = o._.arrows.startdx * stroke || 0;\r\n to = R.getTotalLength(attrs.path) - from;\r\n } else {\r\n from = 0;\r\n to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);\r\n }\r\n o._.arrows[se + "Path"] && $(node, {d: R.getSubpath(attrs.path, from, to)});\r\n delete o._.arrows[se + "Path"];\r\n delete o._.arrows[se + "Marker"];\r\n delete o._.arrows[se + "dx"];\r\n delete o._.arrows[se + "Type"];\r\n delete o._.arrows[se + "String"];\r\n }\r\n for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) {\r\n var item = R._g.doc.getElementById(attr);\r\n item && item.parentNode.removeChild(item);\r\n }\r\n }\r\n },\r\n dasharray = {\r\n "-": [3, 1],\r\n ".": [1, 1],\r\n "-.": [3, 1, 1, 1],\r\n "-..": [3, 1, 1, 1, 1, 1],\r\n ". ": [1, 3],\r\n "- ": [4, 3],\r\n "--": [8, 3],\r\n "- .": [4, 3, 1, 3],\r\n "--.": [8, 3, 1, 3],\r\n "--..": [8, 3, 1, 3, 1, 3]\r\n },\r\n addDashes = function (o, value, params) {\r\n value = dasharray[Str(value).toLowerCase()];\r\n if (value) {\r\n var width = o.attrs["stroke-width"] || "1",\r\n butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"] || params["stroke-linecap"]] || 0,\r\n dashes = [],\r\n i = value.length;\r\n while (i--) {\r\n dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt;\r\n }\r\n $(o.node, {"stroke-dasharray": dashes.join(",")});\r\n }\r\n else {\r\n $(o.node, {"stroke-dasharray": "none"});\r\n }\r\n },\r\n setFillAndStroke = function (o, params) {\r\n var node = o.node,\r\n attrs = o.attrs,\r\n vis = node.style.visibility;\r\n node.style.visibility = "hidden";\r\n for (var att in params) {\r\n if (params[has](att)) {\r\n if (!R._availableAttrs[has](att)) {\r\n continue;\r\n }\r\n var value = params[att];\r\n attrs[att] = value;\r\n switch (att) {\r\n case "blur":\r\n o.blur(value);\r\n break;\r\n case "title":\r\n var title = node.getElementsByTagName("title");\r\n\r\n // Use the existing .\r\n if (title.length && (title = title[0])) {\r\n title.firstChild.nodeValue = value;\r\n } else {\r\n title = $("title");\r\n var val = R._g.doc.createTextNode(value);\r\n title.appendChild(val);\r\n node.appendChild(title);\r\n }\r\n break;\r\n case "href":\r\n case "target":\r\n var pn = node.parentNode;\r\n if (pn.tagName.toLowerCase() != "a") {\r\n var hl = $("a");\r\n pn.insertBefore(hl, node);\r\n hl.appendChild(node);\r\n pn = hl;\r\n }\r\n if (att == "target") {\r\n pn.setAttributeNS(xlink, "show", value == "blank" ? "new" : value);\r\n } else {\r\n pn.setAttributeNS(xlink, att, value);\r\n }\r\n break;\r\n case "cursor":\r\n node.style.cursor = value;\r\n break;\r\n case "transform":\r\n o.transform(value);\r\n break;\r\n case "arrow-start":\r\n addArrow(o, value);\r\n break;\r\n case "arrow-end":\r\n addArrow(o, value, 1);\r\n break;\r\n case "clip-rect":\r\n var rect = Str(value).split(separator);\r\n if (rect.length == 4) {\r\n o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode);\r\n var el = $("clipPath"),\r\n rc = $("rect");\r\n el.id = R.createUUID();\r\n $(rc, {\r\n x: rect[0],\r\n y: rect[1],\r\n width: rect[2],\r\n height: rect[3]\r\n });\r\n el.appendChild(rc);\r\n o.paper.defs.appendChild(el);\r\n $(node, {"clip-path": "url(#" + el.id + ")"});\r\n o.clip = rc;\r\n }\r\n if (!value) {\r\n var path = node.getAttribute("clip-path");\r\n if (path) {\r\n var clip = R._g.doc.getElementById(path.replace(/(^url\\(#|\\)$)/g, E));\r\n clip && clip.parentNode.removeChild(clip);\r\n $(node, {"clip-path": E});\r\n delete o.clip;\r\n }\r\n }\r\n break;\r\n case "path":\r\n if (o.type == "path") {\r\n $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : "M0,0"});\r\n o._.dirty = 1;\r\n if (o._.arrows) {\r\n "startString" in o._.arrows && addArrow(o, o._.arrows.startString);\r\n "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\r\n }\r\n }\r\n break;\r\n case "width":\r\n node.setAttribute(att, value);\r\n o._.dirty = 1;\r\n if (attrs.fx) {\r\n att = "x";\r\n value = attrs.x;\r\n } else {\r\n break;\r\n }\r\n case "x":\r\n if (attrs.fx) {\r\n value = -attrs.x - (attrs.width || 0);\r\n }\r\n case "rx":\r\n if (att == "rx" && o.type == "rect") {\r\n break;\r\n }\r\n case "cx":\r\n node.setAttribute(att, value);\r\n o.pattern && updatePosition(o);\r\n o._.dirty = 1;\r\n break;\r\n case "height":\r\n node.setAttribute(att, value);\r\n o._.dirty = 1;\r\n if (attrs.fy) {\r\n att = "y";\r\n value = attrs.y;\r\n } else {\r\n break;\r\n }\r\n case "y":\r\n if (attrs.fy) {\r\n value = -attrs.y - (attrs.height || 0);\r\n }\r\n case "ry":\r\n if (att == "ry" && o.type == "rect") {\r\n break;\r\n }\r\n case "cy":\r\n node.setAttribute(att, value);\r\n o.pattern && updatePosition(o);\r\n o._.dirty = 1;\r\n break;\r\n case "r":\r\n if (o.type == "rect") {\r\n $(node, {rx: value, ry: value});\r\n } else {\r\n node.setAttribute(att, value);\r\n }\r\n o._.dirty = 1;\r\n break;\r\n case "src":\r\n if (o.type == "image") {\r\n node.setAttributeNS(xlink, "href", value);\r\n }\r\n break;\r\n case "stroke-width":\r\n /* FREEGROUP fix\r\n * draw2d version 3.0.3\r\n *\r\n * don\'t scale the line width if the user resize an shape/element.\r\n * Obscure stroke-width in case of "Draw2D touch" usage\r\n */\r\n if(!attrs["stroke-scale"]){\r\n if (o._.sx != 1 || o._.sy != 1) {\r\n value /= mmax(abs(o._.sx), abs(o._.sy)) || 1;\r\n }\r\n if (o.paper._vbSize) {\r\n // value *= o.paper._vbSize;\r\n }\r\n }\r\n\r\n\r\n node.setAttribute(att, value);\r\n if (attrs["stroke-dasharray"]) {\r\n addDashes(o, attrs["stroke-dasharray"], params);\r\n }\r\n if (o._.arrows) {\r\n "startString" in o._.arrows && addArrow(o, o._.arrows.startString);\r\n "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\r\n }\r\n break;\r\n case "stroke-dasharray":\r\n addDashes(o, value, params);\r\n break;\r\n case "fill":\r\n var isURL = Str(value).match(R._ISURL);\r\n if (isURL) {\r\n el = $("pattern");\r\n var ig = $("image");\r\n el.id = R.createUUID();\r\n $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1});\r\n $(ig, {x: 0, y: 0, "xlink:href": isURL[1]});\r\n el.appendChild(ig);\r\n\r\n (function (el) {\r\n R._preload(isURL[1], function () {\r\n var w = this.offsetWidth,\r\n h = this.offsetHeight;\r\n $(el, {width: w, height: h});\r\n $(ig, {width: w, height: h});\r\n });\r\n })(el);\r\n o.paper.defs.appendChild(el);\r\n $(node, {fill: "url(#" + el.id + ")"});\r\n o.pattern = el;\r\n o.pattern && updatePosition(o);\r\n break;\r\n }\r\n var clr = R.getRGB(value);\r\n if (!clr.error) {\r\n delete params.gradient;\r\n delete attrs.gradient;\r\n !R.is(attrs.opacity, "undefined") &&\r\n R.is(params.opacity, "undefined") &&\r\n $(node, {opacity: attrs.opacity});\r\n !R.is(attrs["fill-opacity"], "undefined") &&\r\n R.is(params["fill-opacity"], "undefined") &&\r\n $(node, {"fill-opacity": attrs["fill-opacity"]});\r\n } else if ((o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value)) {\r\n if ("opacity" in attrs || "fill-opacity" in attrs) {\r\n var gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\\(#|\\)$/g, E));\r\n if (gradient) {\r\n var stops = gradient.getElementsByTagName("stop");\r\n $(stops[stops.length - 1], {"stop-opacity": ("opacity" in attrs ? attrs.opacity : 1) * ("fill-opacity" in attrs ? attrs["fill-opacity"] : 1)});\r\n }\r\n }\r\n attrs.gradient = value;\r\n attrs.fill = "none";\r\n break;\r\n }\r\n clr[has]("opacity") && $(node, {"fill-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});\r\n case "stroke":\r\n clr = R.getRGB(value);\r\n node.setAttribute(att, clr.hex);\r\n att == "stroke" && clr[has]("opacity") && $(node, {"stroke-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});\r\n if (att == "stroke" && o._.arrows) {\r\n "startString" in o._.arrows && addArrow(o, o._.arrows.startString);\r\n "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\r\n }\r\n break;\r\n case "gradient":\r\n (o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value);\r\n break;\r\n case "opacity":\r\n if (attrs.gradient && !attrs[has]("stroke-opacity")) {\r\n $(node, {"stroke-opacity": value > 1 ? value / 100 : value});\r\n }\r\n // fall\r\n case "fill-opacity":\r\n\r\n if (attrs.gradient) {\r\n gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\\(#|\\)$/g, E));\r\n if (gradient) {\r\n stops = gradient.getElementsByTagName("stop");\r\n // FREEGROUP FIX\r\n for (gri = 0, grii = stops.length; gri < grii; gri++) {\r\n $(stops[gri], {"stop-opacity": value});\r\n }\r\n // END FIX\r\n }\r\n break;\r\n }\r\n default:\r\n att == "font-size" && (value = toInt(value, 10) + "px");\r\n var cssrule = att.replace(/(\\-.)/g, function (w) {\r\n return w.substring(1).toUpperCase();\r\n });\r\n node.style[cssrule] = value;\r\n o._.dirty = 1;\r\n node.setAttribute(att, value);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n tuneText(o, params);\r\n node.style.visibility = vis;\r\n },\r\n leading = 1.2,\r\n tuneText = function (el, params) {\r\n if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) {\r\n return;\r\n }\r\n var a = el.attrs,\r\n node = el.node,\r\n fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue("font-size"), 10) : 10;\r\n\r\n if (params[has]("text")) {\r\n a.text = params.text;\r\n while (node.firstChild) {\r\n node.removeChild(node.firstChild);\r\n }\r\n var texts = Str(params.text).split("\\n"),\r\n tspans = [],\r\n tspan;\r\n for (var i = 0, ii = texts.length; i < ii; i++) {\r\n tspan = $("tspan");\r\n i && $(tspan, {dy: fontSize * leading, x: a.x});\r\n tspan.appendChild(R._g.doc.createTextNode(texts[i]));\r\n node.appendChild(tspan);\r\n tspans[i] = tspan;\r\n }\r\n } else {\r\n tspans = node.getElementsByTagName("tspan");\r\n for (i = 0, ii = tspans.length; i < ii; i++) if (i) {\r\n $(tspans[i], {dy: fontSize * leading, x: a.x});\r\n } else {\r\n $(tspans[0], {dy: 0});\r\n }\r\n }\r\n $(node, {x: a.x, y: a.y});\r\n el._.dirty = 1;\r\n var bb = el._getBBox(),\r\n dif = a.y - (bb.y + bb.height / 2);\r\n dif && R.is(dif, "finite") && $(tspans[0], {dy: dif});\r\n },\r\n getRealNode = function (node) {\r\n if (node.parentNode && node.parentNode.tagName.toLowerCase() === "a") {\r\n return node.parentNode;\r\n } else {\r\n return node;\r\n }\r\n },\r\n Element = function (node, svg) {\r\n var X = 0,\r\n Y = 0;\r\n /*\\\r\n * Element.node\r\n [ property (object) ]\r\n **\r\n * Gives you a reference to the DOM object, so you can assign event handlers or just mess around.\r\n **\r\n * Note: Don’t mess with it.\r\n > Usage\r\n | // draw a circle at coordinate 10,10 with radius of 10\r\n | var c = paper.circle(10, 10, 10);\r\n | c.node.onclick = function () {\r\n | c.attr("fill", "red");\r\n | };\r\n \\*/\r\n this[0] = this.node = node;\r\n /*\\\r\n * Element.raphael\r\n [ property (object) ]\r\n **\r\n * Internal reference to @Raphael object. In case it is not available.\r\n > Usage\r\n | Raphael.el.red = function () {\r\n | var hsb = this.paper.raphael.rgb2hsb(this.attr("fill"));\r\n | hsb.h = 1;\r\n | this.attr({fill: this.paper.raphael.hsb2rgb(hsb).hex});\r\n | }\r\n \\*/\r\n node.raphael = true;\r\n /*\\\r\n * Element.id\r\n [ property (number) ]\r\n **\r\n * Unique id of the element. Especially useful when you want to listen to events of the element,\r\n * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method.\r\n \\*/\r\n this.id = R._oid++;\r\n node.raphaelid = this.id;\r\n this.matrix = R.matrix();\r\n this.realPath = null;\r\n /*\\\r\n * Element.paper\r\n [ property (object) ]\r\n **\r\n * Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions.\r\n > Usage\r\n | Raphael.el.cross = function () {\r\n | this.attr({fill: "red"});\r\n | this.paper.path("M10,10L50,50M50,10L10,50")\r\n | .attr({stroke: "red"});\r\n | }\r\n \\*/\r\n this.paper = svg;\r\n this.attrs = this.attrs || {};\r\n this._ = {\r\n transform: [],\r\n sx: 1,\r\n sy: 1,\r\n deg: 0,\r\n dx: 0,\r\n dy: 0,\r\n dirty: 1\r\n };\r\n !svg.bottom && (svg.bottom = this);\r\n /*\\\r\n * Element.prev\r\n [ property (object) ]\r\n **\r\n * Reference to the previous element in the hierarchy.\r\n \\*/\r\n this.prev = svg.top;\r\n svg.top && (svg.top.next = this);\r\n svg.top = this;\r\n /*\\\r\n * Element.next\r\n [ property (object) ]\r\n **\r\n * Reference to the next element in the hierarchy.\r\n \\*/\r\n this.next = null;\r\n },\r\n elproto = R.el;\r\n\r\n Element.prototype = elproto;\r\n elproto.constructor = Element;\r\n\r\n R._engine.path = function (pathString, SVG) {\r\n var el = $("path");\r\n SVG.canvas && SVG.canvas.appendChild(el);\r\n var p = new Element(el, SVG);\r\n p.type = "path";\r\n setFillAndStroke(p, {\r\n fill: "none",\r\n stroke: "#000",\r\n path: pathString\r\n });\r\n return p;\r\n };\r\n /*\\\r\n * Element.rotate\r\n [ method ]\r\n **\r\n * Deprecated! Use @Element.transform instead.\r\n * Adds rotation by given angle around given point to the list of\r\n * transformations of the element.\r\n > Parameters\r\n - deg (number) angle in degrees\r\n - cx (number) #optional x coordinate of the centre of rotation\r\n - cy (number) #optional y coordinate of the centre of rotation\r\n * If cx & cy aren’t specified centre of the shape is used as a point of rotation.\r\n = (object) @Element\r\n \\*/\r\n elproto.rotate = function (deg, cx, cy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n deg = Str(deg).split(separator);\r\n if (deg.length - 1) {\r\n cx = toFloat(deg[1]);\r\n cy = toFloat(deg[2]);\r\n }\r\n deg = toFloat(deg[0]);\r\n (cy == null) && (cx = cy);\r\n if (cx == null || cy == null) {\r\n var bbox = this.getBBox(1);\r\n cx = bbox.x + bbox.width / 2;\r\n cy = bbox.y + bbox.height / 2;\r\n }\r\n this.transform(this._.transform.concat([["r", deg, cx, cy]]));\r\n return this;\r\n };\r\n /*\\\r\n * Element.scale\r\n [ method ]\r\n **\r\n * Deprecated! Use @Element.transform instead.\r\n * Adds scale by given amount relative to given point to the list of\r\n * transformations of the element.\r\n > Parameters\r\n - sx (number) horisontal scale amount\r\n - sy (number) vertical scale amount\r\n - cx (number) #optional x coordinate of the centre of scale\r\n - cy (number) #optional y coordinate of the centre of scale\r\n * If cx & cy aren’t specified centre of the shape is used instead.\r\n = (object) @Element\r\n \\*/\r\n elproto.scale = function (sx, sy, cx, cy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n sx = Str(sx).split(separator);\r\n if (sx.length - 1) {\r\n sy = toFloat(sx[1]);\r\n cx = toFloat(sx[2]);\r\n cy = toFloat(sx[3]);\r\n }\r\n sx = toFloat(sx[0]);\r\n (sy == null) && (sy = sx);\r\n (cy == null) && (cx = cy);\r\n if (cx == null || cy == null) {\r\n var bbox = this.getBBox(1);\r\n }\r\n cx = cx == null ? bbox.x + bbox.width / 2 : cx;\r\n cy = cy == null ? bbox.y + bbox.height / 2 : cy;\r\n this.transform(this._.transform.concat([["s", sx, sy, cx, cy]]));\r\n return this;\r\n };\r\n /*\\\r\n * Element.translate\r\n [ method ]\r\n **\r\n * Deprecated! Use @Element.transform instead.\r\n * Adds translation by given amount to the list of transformations of the element.\r\n > Parameters\r\n - dx (number) horisontal shift\r\n - dy (number) vertical shift\r\n = (object) @Element\r\n \\*/\r\n elproto.translate = function (dx, dy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n dx = Str(dx).split(separator);\r\n if (dx.length - 1) {\r\n dy = toFloat(dx[1]);\r\n }\r\n dx = toFloat(dx[0]) || 0;\r\n dy = +dy || 0;\r\n this.transform(this._.transform.concat([["t", dx, dy]]));\r\n return this;\r\n };\r\n /*\\\r\n * Element.transform\r\n [ method ]\r\n **\r\n * Adds transformation to the element which is separate to other attributes,\r\n * i.e. translation doesn’t change `x` or `y` of the rectange. The format\r\n * of transformation string is similar to the path string syntax:\r\n | "t100,100r30,100,100s2,2,100,100r45s1.5"\r\n * Each letter is a command. There are four commands: `t` is for translate, `r` is for rotate, `s` is for\r\n * scale and `m` is for matrix.\r\n *\r\n * There are also alternative “absolute” translation, rotation and scale: `T`, `R` and `S`. They will not take previous transformation into account. For example, `...T100,0` will always move element 100 px horisontally, while `...t100,0` could move it vertically if there is `r90` before. Just compare results of `r90t100,0` and `r90T100,0`.\r\n *\r\n * So, the example line above could be read like “translate by 100, 100; rotate 30° around 100, 100; scale twice around 100, 100;\r\n * rotate 45° around centre; scale 1.5 times relative to centre”. As you can see rotate and scale commands have origin\r\n * coordinates as optional parameters, the default is the centre point of the element.\r\n * Matrix accepts six parameters.\r\n > Usage\r\n | var el = paper.rect(10, 20, 300, 200);\r\n | // translate 100, 100, rotate 45°, translate -100, 0\r\n | el.transform("t100,100r45t-100,0");\r\n | // if you want you can append or prepend transformations\r\n | el.transform("...t50,50");\r\n | el.transform("s2...");\r\n | // or even wrap\r\n | el.transform("t50,50...t-50-50");\r\n | // to reset transformation call method with empty string\r\n | el.transform("");\r\n | // to get current value call it without parameters\r\n | console.log(el.transform());\r\n > Parameters\r\n - tstr (string) #optional transformation string\r\n * If tstr isn’t specified\r\n = (string) current transformation string\r\n * else\r\n = (object) @Element\r\n \\*/\r\n elproto.transform = function (tstr) {\r\n var _ = this._;\r\n if (tstr == null) {\r\n return _.transform;\r\n }\r\n R._extractTransform(this, tstr);\r\n\r\n this.clip && $(this.clip, {transform: this.matrix.invert()});\r\n this.pattern && updatePosition(this);\r\n this.node && $(this.node, {transform: this.matrix});\r\n\r\n if (_.sx != 1 || _.sy != 1) {\r\n var sw = this.attrs[has]("stroke-width") ? this.attrs["stroke-width"] : 1;\r\n this.attr({"stroke-width": sw});\r\n }\r\n\r\n //Reduce transform string\r\n _.transform = this.matrix.toTransformString();\r\n\r\n return this;\r\n };\r\n /*\\\r\n * Element.hide\r\n [ method ]\r\n **\r\n * Makes element invisible. See @Element.show.\r\n = (object) @Element\r\n \\*/\r\n elproto.hide = function () {\r\n if(!this.removed) this.node.style.display = "none";\r\n return this;\r\n };\r\n /*\\\r\n * Element.show\r\n [ method ]\r\n **\r\n * Makes element visible. See @Element.hide.\r\n = (object) @Element\r\n \\*/\r\n elproto.show = function () {\r\n if(!this.removed) this.node.style.display = "";\r\n return this;\r\n };\r\n /*\\\r\n * Element.remove\r\n [ method ]\r\n **\r\n * Removes element from the paper.\r\n \\*/\r\n elproto.remove = function () {\r\n var node = getRealNode(this.node);\r\n if (this.removed || !node.parentNode) {\r\n return;\r\n }\r\n var paper = this.paper;\r\n paper.__set__ && paper.__set__.exclude(this);\r\n eve.unbind("raphael.*.*." + this.id);\r\n if (this.gradient) {\r\n paper.defs.removeChild(this.gradient);\r\n }\r\n R._tear(this, paper);\r\n\r\n node.parentNode.removeChild(node);\r\n\r\n // Remove custom data for element\r\n this.removeData();\r\n\r\n for (var i in this) {\r\n this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;\r\n }\r\n this.removed = true;\r\n };\r\n elproto._getBBox = function () {\r\n if (this.node.style.display == "none") {\r\n this.show();\r\n var hide = true;\r\n }\r\n var canvasHidden = false,\r\n containerStyle;\r\n if (this.paper.canvas.parentElement) {\r\n containerStyle = this.paper.canvas.parentElement.style;\r\n } //IE10+ can\'t find parentElement\r\n else if (this.paper.canvas.parentNode) {\r\n containerStyle = this.paper.canvas.parentNode.style;\r\n }\r\n\r\n if(containerStyle && containerStyle.display == "none") {\r\n canvasHidden = true;\r\n containerStyle.display = "";\r\n }\r\n var bbox = {};\r\n try {\r\n bbox = this.node.getBBox();\r\n } catch(e) {\r\n // Firefox 3.0.x, 25.0.1 (probably more versions affected) play badly here - possible fix\r\n bbox = {\r\n x: this.node.clientLeft,\r\n y: this.node.clientTop,\r\n width: this.node.clientWidth,\r\n height: this.node.clientHeight\r\n }\r\n } finally {\r\n bbox = bbox || {};\r\n if(canvasHidden){\r\n containerStyle.display = "none";\r\n }\r\n }\r\n hide && this.hide();\r\n return bbox;\r\n };\r\n /*\\\r\n * Element.attr\r\n [ method ]\r\n **\r\n * Sets the attributes of the element.\r\n > Parameters\r\n - attrName (string) attribute’s name\r\n - value (string) value\r\n * or\r\n - params (object) object of name/value pairs\r\n * or\r\n - attrName (string) attribute’s name\r\n * or\r\n - attrNames (array) in this case method returns array of current values for given attribute names\r\n = (object) @Element if attrsName & value or params are passed in.\r\n = (...) value of the attribute if only attrsName is passed in.\r\n = (array) array of values of the attribute if attrsNames is passed in.\r\n = (object) object of attributes if nothing is passed in.\r\n > Possible parameters\r\n # <p>Please refer to the <a href="http://www.w3.org/TR/SVG/" title="The W3C Recommendation for the SVG language describes these properties in detail.">SVG specification</a> for an explanation of these parameters.</p>\r\n o arrow-end (string) arrowhead on the end of the path. The format for string is `<type>[-<width>[-<length>]]`. Possible types: `classic`, `block`, `open`, `oval`, `diamond`, `none`, width: `wide`, `narrow`, `medium`, length: `long`, `short`, `midium`.\r\n o clip-rect (string) comma or space separated values: x, y, width and height\r\n o cursor (string) CSS type of the cursor\r\n o cx (number) the x-axis coordinate of the center of the circle, or ellipse\r\n o cy (number) the y-axis coordinate of the center of the circle, or ellipse\r\n o fill (string) colour, gradient or image\r\n o fill-opacity (number)\r\n o font (string)\r\n o font-family (string)\r\n o font-size (number) font size in pixels\r\n o font-weight (string)\r\n o height (number)\r\n o href (string) URL, if specified element behaves as hyperlink\r\n o opacity (number)\r\n o path (string) SVG path string format\r\n o r (number) radius of the circle, ellipse or rounded corner on the rect\r\n o rx (number) horisontal radius of the ellipse\r\n o ry (number) vertical radius of the ellipse\r\n o src (string) image URL, only works for @Element.image element\r\n o stroke (string) stroke colour\r\n o stroke-dasharray (string) [“”, “none”, “`-`”, “`.`”, “`-.`”, “`-..`”, “`. `”, “`- `”, “`--`”, “`- .`”, “`--.`”, “`--..`”]\r\n o stroke-linecap (string) [“`butt`”, “`square`”, “`round`”]\r\n o stroke-linejoin (string) [“`bevel`”, “`round`”, “`miter`”]\r\n o stroke-miterlimit (number)\r\n o stroke-opacity (number)\r\n o stroke-width (number) stroke width in pixels, default is \'1\'\r\n o target (string) used with href\r\n o text (string) contents of the text element. Use `\\n` for multiline text\r\n o text-anchor (string) [“`start`”, “`middle`”, “`end`”], default is “`middle`”\r\n o title (string) will create tooltip with a given text\r\n o transform (string) see @Element.transform\r\n o width (number)\r\n o x (number)\r\n o y (number)\r\n > Gradients\r\n * Linear gradient format: “`‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`90-#fff-#000`” – 90°\r\n * gradient from white to black or “`0-#fff-#f00:20-#000`” – 0° gradient from white via red (at 20%) to black.\r\n *\r\n * radial gradient: “`r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`r#fff-#000`” –\r\n * gradient from white to black or “`r(0.25, 0.75)#fff-#000`” – gradient from white to black with focus point\r\n * at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses.\r\n > Path String\r\n # <p>Please refer to <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path’s data attribute’s format are described in the SVG specification.">SVG documentation regarding path string</a>. Raphaël fully supports it.</p>\r\n > Colour Parsing\r\n # <ul>\r\n # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>\r\n # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>\r\n # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>\r\n # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li>\r\n # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li>\r\n # <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200, 100, 0, .5)</code>”)</li>\r\n # <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%, 175%, 0%, 50%)</code>”)</li>\r\n # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li>\r\n # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>\r\n # <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li>\r\n # <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href="http://en.wikipedia.org/wiki/HSL_and_HSV" title="HSL and HSV - Wikipedia, the free encyclopedia">Wikipedia page</a></li>\r\n # <li>hsl(•••%, •••%, •••%) — same as above, but in %</li>\r\n # <li>hsla(•••, •••, •••, •••) — same as above, but with opacity</li>\r\n # <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg, 1, .5)</code>” or, if you want to go fancy, “<code>hsl(240°, 1, .5)</code>”</li>\r\n # </ul>\r\n \\*/\r\n elproto.attr = function (name, value) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (name == null) {\r\n var res = {};\r\n for (var a in this.attrs) if (this.attrs[has](a)) {\r\n res[a] = this.attrs[a];\r\n }\r\n res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;\r\n res.transform = this._.transform;\r\n return res;\r\n }\r\n if (value == null && R.is(name, "string")) {\r\n if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) {\r\n return this.attrs.gradient;\r\n }\r\n if (name == "transform") {\r\n return this._.transform;\r\n }\r\n var names = name.split(separator),\r\n out = {};\r\n for (var i = 0, ii = names.length; i < ii; i++) {\r\n name = names[i];\r\n if (name in this.attrs) {\r\n out[name] = this.attrs[name];\r\n } else if (R.is(this.paper.customAttributes[name], "function")) {\r\n out[name] = this.paper.customAttributes[name].def;\r\n } else {\r\n out[name] = R._availableAttrs[name];\r\n }\r\n }\r\n return ii - 1 ? out : out[names[0]];\r\n }\r\n if (value == null && R.is(name, "array")) {\r\n out = {};\r\n for (i = 0, ii = name.length; i < ii; i++) {\r\n out[name[i]] = this.attr(name[i]);\r\n }\r\n return out;\r\n }\r\n if (value != null) {\r\n var params = {};\r\n params[name] = value;\r\n } else if (name != null && R.is(name, "object")) {\r\n params = name;\r\n }\r\n for (var key in params) {\r\n eve("raphael.attr." + key + "." + this.id, this, params[key]);\r\n }\r\n for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {\r\n var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));\r\n this.attrs[key] = params[key];\r\n for (var subkey in par) if (par[has](subkey)) {\r\n params[subkey] = par[subkey];\r\n }\r\n }\r\n setFillAndStroke(this, params);\r\n return this;\r\n };\r\n /*\\\r\n * Element.toFront\r\n [ method ]\r\n **\r\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements.\r\n = (object) @Element\r\n \\*/\r\n elproto.toFront = function () {\r\n if (this.removed) {\r\n return this;\r\n }\r\n var node = getRealNode(this.node);\r\n node.parentNode.appendChild(node);\r\n var svg = this.paper;\r\n svg.top != this && R._tofront(this, svg);\r\n return this;\r\n };\r\n /*\\\r\n * Element.toBack\r\n [ method ]\r\n **\r\n * Moves the element so it is the furthest from the viewer’s eyes, behind other elements.\r\n = (object) @Element\r\n \\*/\r\n elproto.toBack = function () {\r\n if (this.removed) {\r\n return this;\r\n }\r\n var node = getRealNode(this.node);\r\n var parentNode = node.parentNode;\r\n parentNode.insertBefore(node, parentNode.firstChild);\r\n R._toback(this, this.paper);\r\n var svg = this.paper;\r\n return this;\r\n };\r\n /*\\\r\n * Element.insertAfter\r\n [ method ]\r\n **\r\n * Inserts current object after the given one.\r\n = (object) @Element\r\n \\*/\r\n elproto.insertAfter = function (element) {\r\n if (this.removed || !element) {\r\n return this;\r\n }\r\n\r\n var node = getRealNode(this.node);\r\n var afterNode = getRealNode(element.node || element[element.length - 1].node);\r\n if (afterNode.nextSibling) {\r\n afterNode.parentNode.insertBefore(node, afterNode.nextSibling);\r\n } else {\r\n afterNode.parentNode.appendChild(node);\r\n }\r\n R._insertafter(this, element, this.paper);\r\n return this;\r\n };\r\n /*\\\r\n * Element.insertBefore\r\n [ method ]\r\n **\r\n * Inserts current object before the given one.\r\n = (object) @Element\r\n \\*/\r\n elproto.insertBefore = function (element) {\r\n if (this.removed || !element) {\r\n return this;\r\n }\r\n\r\n var node = getRealNode(this.node);\r\n var beforeNode = getRealNode(element.node || element[0].node);\r\n beforeNode.parentNode.insertBefore(node, beforeNode);\r\n R._insertbefore(this, element, this.paper);\r\n return this;\r\n };\r\n elproto.blur = function (size) {\r\n // Experimental. No Safari support. Use it on your own risk.\r\n var t = this;\r\n if (+size !== 0) {\r\n var fltr = $("filter"),\r\n blur = $("feGaussianBlur");\r\n t.attrs.blur = size;\r\n fltr.id = R.createUUID();\r\n $(blur, {stdDeviation: +size || 1.5});\r\n fltr.appendChild(blur);\r\n t.paper.defs.appendChild(fltr);\r\n t._blur = fltr;\r\n $(t.node, {filter: "url(#" + fltr.id + ")"});\r\n } else {\r\n if (t._blur) {\r\n t._blur.parentNode.removeChild(t._blur);\r\n delete t._blur;\r\n delete t.attrs.blur;\r\n }\r\n t.node.removeAttribute("filter");\r\n }\r\n return t;\r\n };\r\n R._engine.circle = function (svg, x, y, r) {\r\n var el = $("circle");\r\n svg.canvas && svg.canvas.appendChild(el);\r\n var res = new Element(el, svg);\r\n res.attrs = {cx: x, cy: y, r: r, fill: "none", stroke: "#000"};\r\n res.type = "circle";\r\n $(el, res.attrs);\r\n return res;\r\n };\r\n R._engine.rect = function (svg, x, y, w, h, r) {\r\n var el = $("rect");\r\n svg.canvas && svg.canvas.appendChild(el);\r\n var res = new Element(el, svg);\r\n res.attrs = {x: x, y: y, width: w, height: h, rx: r || 0, ry: r || 0, fill: "none", stroke: "#000"};\r\n res.type = "rect";\r\n $(el, res.attrs);\r\n return res;\r\n };\r\n R._engine.ellipse = function (svg, x, y, rx, ry) {\r\n var el = $("ellipse");\r\n svg.canvas && svg.canvas.appendChild(el);\r\n var res = new Element(el, svg);\r\n res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: "none", stroke: "#000"};\r\n res.type = "ellipse";\r\n $(el, res.attrs);\r\n return res;\r\n };\r\n R._engine.image = function (svg, src, x, y, w, h) {\r\n var el = $("image");\r\n $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: "none"});\r\n el.setAttributeNS(xlink, "href", src);\r\n svg.canvas && svg.canvas.appendChild(el);\r\n var res = new Element(el, svg);\r\n res.attrs = {x: x, y: y, width: w, height: h, src: src};\r\n res.type = "image";\r\n return res;\r\n };\r\n R._engine.text = function (svg, x, y, text, href) {\r\n var el = $("text");\r\n svg.canvas && svg.canvas.appendChild(el);\r\n var res = new Element(el, svg);\r\n res.attrs = {\r\n x: x,\r\n y: y,\r\n "text-anchor": "middle",\r\n text: text,\r\n "font-family": R._availableAttrs["font-family"],\r\n "font-size": R._availableAttrs["font-size"],\r\n stroke: "none",\r\n fill: "#000",\r\n ...(href ? { href } : null),\r\n };\r\n res.type = "text";\r\n setFillAndStroke(res, res.attrs);\r\n return res;\r\n };\r\n R._engine.setSize = function (width, height) {\r\n this.width = width || this.width;\r\n this.height = height || this.height;\r\n this.canvas.setAttribute("width", this.width);\r\n this.canvas.setAttribute("height", this.height);\r\n if (this._viewBox) {\r\n this.setViewBox.apply(this, this._viewBox);\r\n }\r\n return this;\r\n };\r\n R._engine.create = function () {\r\n var con = R._getContainer.apply(0, arguments),\r\n container = con && con.container,\r\n x = con.x,\r\n y = con.y,\r\n width = con.width,\r\n height = con.height;\r\n if (!container) {\r\n throw new Error("SVG container not found.");\r\n }\r\n var cnvs = $("svg"),\r\n css = "overflow:hidden;",\r\n isFloating;\r\n x = x || 0;\r\n y = y || 0;\r\n width = width || 512;\r\n height = height || 342;\r\n $(cnvs, {\r\n height: height,\r\n version: 1.1,\r\n width: width,\r\n xmlns: "http://www.w3.org/2000/svg",\r\n "xmlns:xlink": "http://www.w3.org/1999/xlink"\r\n });\r\n if (container == 1) {\r\n cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px";\r\n R._g.doc.body.appendChild(cnvs);\r\n isFloating = 1;\r\n } else {\r\n cnvs.style.cssText = css + "position:relative";\r\n if (container.firstChild) {\r\n container.insertBefore(cnvs, container.firstChild);\r\n } else {\r\n container.appendChild(cnvs);\r\n }\r\n }\r\n container = new R._Paper;\r\n container.width = width;\r\n container.height = height;\r\n container.canvas = cnvs;\r\n container.clear();\r\n container._left = container._top = 0;\r\n isFloating && (container.renderfix = function () {});\r\n container.renderfix();\r\n return container;\r\n };\r\n R._engine.setViewBox = function (x, y, w, h, fit) {\r\n eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);\r\n var paperSize = this.getSize(),\r\n size = mmax(w / paperSize.width, h / paperSize.height),\r\n top = this.top,\r\n aspectRatio = fit ? "xMidYMid meet" : "xMinYMin",\r\n vb,\r\n sw;\r\n if (x == null) {\r\n if (this._vbSize) {\r\n size = 1;\r\n }\r\n delete this._vbSize;\r\n vb = "0 0 " + this.width + S + this.height;\r\n } else {\r\n this._vbSize = size;\r\n vb = x + S + y + S + w + S + h;\r\n }\r\n $(this.canvas, {\r\n viewBox: vb,\r\n preserveAspectRatio: aspectRatio\r\n });\r\n while (size && top) {\r\n sw = "stroke-width" in top.attrs ? top.attrs["stroke-width"] : 1;\r\n top.attr({"stroke-width": sw});\r\n top._.dirty = 1;\r\n top._.dirtyT = 1;\r\n top = top.prev;\r\n }\r\n this._viewBox = [x, y, w, h, !!fit];\r\n return this;\r\n };\r\n /*\\\r\n * Paper.renderfix\r\n [ method ]\r\n **\r\n * Fixes the issue of Firefox and IE9 regarding subpixel rendering. If paper is dependant\r\n * on other elements after reflow it could shift half pixel which cause for lines to lost their crispness.\r\n * This method fixes the issue.\r\n **\r\n Special thanks to Mariusz Nowak (http://www.medikoo.com/) for this method.\r\n \\*/\r\n R.prototype.renderfix = function () {\r\n var cnvs = this.canvas,\r\n s = cnvs.style,\r\n pos;\r\n try {\r\n pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix();\r\n } catch (e) {\r\n pos = cnvs.createSVGMatrix();\r\n }\r\n var left = -pos.e % 1,\r\n top = -pos.f % 1;\r\n if (left || top) {\r\n if (left) {\r\n this._left = (this._left + left) % 1;\r\n s.left = this._left + "px";\r\n }\r\n if (top) {\r\n this._top = (this._top + top) % 1;\r\n s.top = this._top + "px";\r\n }\r\n }\r\n };\r\n /*\\\r\n * Paper.clear\r\n [ method ]\r\n **\r\n * Clears the paper, i.e. removes all the elements.\r\n \\*/\r\n R.prototype.clear = function () {\r\n R.eve("raphael.clear", this);\r\n var c = this.canvas;\r\n while (c.firstChild) {\r\n c.removeChild(c.firstChild);\r\n }\r\n this.bottom = this.top = null;\r\n (this.desc = $("desc")).appendChild(R._g.doc.createTextNode("Created with Rapha\\xebl " + R.version));\r\n c.appendChild(this.desc);\r\n c.appendChild(this.defs = $("defs"));\r\n };\r\n /*\\\r\n * Paper.remove\r\n [ method ]\r\n **\r\n * Removes the paper from the DOM.\r\n \\*/\r\n R.prototype.remove = function () {\r\n eve("raphael.remove", this);\r\n this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);\r\n for (var i in this) {\r\n this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;\r\n }\r\n };\r\n var setproto = R.st;\r\n for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {\r\n setproto[method] = (function (methodname) {\r\n return function () {\r\n var arg = arguments;\r\n return this.forEach(function (el) {\r\n el[methodname].apply(el, arg);\r\n });\r\n };\r\n })(method);\r\n }\r\n}));\r\n\r\n// ┌─────────────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\r\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ VML Module │ \\\\\r\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\r\n// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\\\\r\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\\\\r\n// └─────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n(function (glob, factory) {\r\n if (typeof define === "function" && define.amd) {\r\n define("raphael.vml", ["raphael.core"], function(raphael) {\r\n return factory(raphael);\r\n });\r\n } else if (typeof exports === "object") {\r\n factory(require("./raphael.core"));\r\n } else {\r\n factory(glob.Raphael);\r\n }\r\n}(this, function(R) {\r\n if (R && !R.vml) {\r\n return;\r\n }\r\n\r\n var has = "hasOwnProperty",\r\n Str = String,\r\n toFloat = parseFloat,\r\n math = Math,\r\n round = math.round,\r\n mmax = math.max,\r\n mmin = math.min,\r\n abs = math.abs,\r\n fillString = "fill",\r\n separator = /[, ]+/,\r\n eve = R.eve,\r\n ms = " progid:DXImageTransform.Microsoft",\r\n S = " ",\r\n E = "",\r\n map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"},\r\n bites = /([clmz]),?([^clmz]*)/gi,\r\n blurregexp = / progid:\\S+Blur\\([^\\)]+\\)/g,\r\n val = /-?[^,\\s-]+/g,\r\n cssDot = "position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",\r\n zoom = 21600,\r\n pathTypes = {path: 1, rect: 1, image: 1},\r\n ovalTypes = {circle: 1, ellipse: 1},\r\n path2vml = function (path) {\r\n var total = /[ahqstv]/ig,\r\n command = R._pathToAbsolute;\r\n Str(path).match(total) && (command = R._path2curve);\r\n total = /[clmz]/g;\r\n if (command == R._pathToAbsolute && !Str(path).match(total)) {\r\n var res = Str(path).replace(bites, function (all, command, args) {\r\n var vals = [],\r\n isMove = command.toLowerCase() == "m",\r\n res = map[command];\r\n args.replace(val, function (value) {\r\n if (isMove && vals.length == 2) {\r\n res += vals + map[command == "m" ? "l" : "L"];\r\n vals = [];\r\n }\r\n vals.push(round(value * zoom));\r\n });\r\n return res + vals;\r\n });\r\n return res;\r\n }\r\n var pa = command(path), p, r;\r\n res = [];\r\n for (var i = 0, ii = pa.length; i < ii; i++) {\r\n p = pa[i];\r\n r = pa[i][0].toLowerCase();\r\n r == "z" && (r = "x");\r\n for (var j = 1, jj = p.length; j < jj; j++) {\r\n r += round(p[j] * zoom) + (j != jj - 1 ? "," : E);\r\n }\r\n res.push(r);\r\n }\r\n return res.join(S);\r\n },\r\n compensation = function (deg, dx, dy) {\r\n var m = R.matrix();\r\n m.rotate(-deg, .5, .5);\r\n return {\r\n dx: m.x(dx, dy),\r\n dy: m.y(dx, dy)\r\n };\r\n },\r\n setCoords = function (p, sx, sy, dx, dy, deg) {\r\n var _ = p._,\r\n m = p.matrix,\r\n fillpos = _.fillpos,\r\n o = p.node,\r\n s = o.style,\r\n y = 1,\r\n flip = "",\r\n dxdy,\r\n kx = zoom / sx,\r\n ky = zoom / sy;\r\n s.visibility = "hidden";\r\n if (!sx || !sy) {\r\n return;\r\n }\r\n o.coordsize = abs(kx) + S + abs(ky);\r\n s.rotation = deg * (sx * sy < 0 ? -1 : 1);\r\n if (deg) {\r\n var c = compensation(deg, dx, dy);\r\n dx = c.dx;\r\n dy = c.dy;\r\n }\r\n sx < 0 && (flip += "x");\r\n sy < 0 && (flip += " y") && (y = -1);\r\n s.flip = flip;\r\n o.coordorigin = (dx * -kx) + S + (dy * -ky);\r\n if (fillpos || _.fillsize) {\r\n var fill = o.getElementsByTagName(fillString);\r\n fill = fill && fill[0];\r\n o.removeChild(fill);\r\n if (fillpos) {\r\n c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1]));\r\n fill.position = c.dx * y + S + c.dy * y;\r\n }\r\n if (_.fillsize) {\r\n fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy);\r\n }\r\n o.appendChild(fill);\r\n }\r\n s.visibility = "visible";\r\n };\r\n R.toString = function () {\r\n return "Your browser doesn\\u2019t support SVG. Falling down to VML.\\nYou are running Rapha\\xebl " + this.version;\r\n };\r\n var addArrow = function (o, value, isEnd) {\r\n var values = Str(value).toLowerCase().split("-"),\r\n se = isEnd ? "end" : "start",\r\n i = values.length,\r\n type = "classic",\r\n w = "medium",\r\n h = "medium";\r\n while (i--) {\r\n switch (values[i]) {\r\n case "block":\r\n case "classic":\r\n case "oval":\r\n case "diamond":\r\n case "open":\r\n case "none":\r\n type = values[i];\r\n break;\r\n case "wide":\r\n case "narrow": h = values[i]; break;\r\n case "long":\r\n case "short": w = values[i]; break;\r\n }\r\n }\r\n var stroke = o.node.getElementsByTagName("stroke")[0];\r\n stroke[se + "arrow"] = type;\r\n stroke[se + "arrowlength"] = w;\r\n stroke[se + "arrowwidth"] = h;\r\n },\r\n setFillAndStroke = function (o, params) {\r\n // o.paper.canvas.style.display = "none";\r\n o.attrs = o.attrs || {};\r\n var node = o.node,\r\n a = o.attrs,\r\n s = node.style,\r\n xy,\r\n newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r),\r\n isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry),\r\n res = o;\r\n\r\n\r\n for (var par in params) if (params[has](par)) {\r\n a[par] = params[par];\r\n }\r\n if (newpath) {\r\n a.path = R._getPath[o.type](o);\r\n o._.dirty = 1;\r\n }\r\n params.href && (node.href = params.href);\r\n params.title && (node.title = params.title);\r\n params.target && (node.target = params.target);\r\n params.cursor && (s.cursor = params.cursor);\r\n "blur" in params && o.blur(params.blur);\r\n if (params.path && o.type == "path" || newpath) {\r\n node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path);\r\n o._.dirty = 1;\r\n if (o.type == "image") {\r\n o._.fillpos = [a.x, a.y];\r\n o._.fillsize = [a.width, a.height];\r\n setCoords(o, 1, 1, 0, 0, 0);\r\n }\r\n }\r\n "transform" in params && o.transform(params.transform);\r\n if (isOval) {\r\n var cx = +a.cx,\r\n cy = +a.cy,\r\n rx = +a.rx || +a.r || 0,\r\n ry = +a.ry || +a.r || 0;\r\n node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom));\r\n o._.dirty = 1;\r\n }\r\n if ("clip-rect" in params) {\r\n var rect = Str(params["clip-rect"]).split(separator);\r\n if (rect.length == 4) {\r\n rect[2] = +rect[2] + (+rect[0]);\r\n rect[3] = +rect[3] + (+rect[1]);\r\n var div = node.clipRect || R._g.doc.createElement("div"),\r\n dstyle = div.style;\r\n dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect);\r\n if (!node.clipRect) {\r\n dstyle.position = "absolute";\r\n dstyle.top = 0;\r\n dstyle.left = 0;\r\n dstyle.width = o.paper.width + "px";\r\n dstyle.height = o.paper.height + "px";\r\n node.parentNode.insertBefore(div, node);\r\n div.appendChild(node);\r\n node.clipRect = div;\r\n }\r\n }\r\n if (!params["clip-rect"]) {\r\n node.clipRect && (node.clipRect.style.clip = "auto");\r\n }\r\n }\r\n if (o.textpath) {\r\n var textpathStyle = o.textpath.style;\r\n params.font && (textpathStyle.font = params.font);\r\n params["font-family"] && (textpathStyle.fontFamily = \'"\' + params["font-family"].split(",")[0].replace(/^[\'"]+|[\'"]+$/g, E) + \'"\');\r\n params["font-size"] && (textpathStyle.fontSize = params["font-size"]);\r\n params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]);\r\n params["font-style"] && (textpathStyle.fontStyle = params["font-style"]);\r\n }\r\n if ("arrow-start" in params) {\r\n addArrow(res, params["arrow-start"]);\r\n }\r\n if ("arrow-end" in params) {\r\n addArrow(res, params["arrow-end"], 1);\r\n }\r\n if (params.opacity != null ||\r\n params["stroke-width"] != null ||\r\n params.fill != null ||\r\n params.src != null ||\r\n params.stroke != null ||\r\n params["stroke-width"] != null ||\r\n params["stroke-opacity"] != null ||\r\n params["fill-opacity"] != null ||\r\n params["stroke-dasharray"] != null ||\r\n params["stroke-miterlimit"] != null ||\r\n params["stroke-linejoin"] != null ||\r\n params["stroke-linecap"] != null) {\r\n var fill = node.getElementsByTagName(fillString),\r\n newfill = false;\r\n fill = fill && fill[0];\r\n !fill && (newfill = fill = createNode(fillString));\r\n if (o.type == "image" && params.src) {\r\n fill.src = params.src;\r\n }\r\n params.fill && (fill.on = true);\r\n if (fill.on == null || params.fill == "none" || params.fill === null) {\r\n fill.on = false;\r\n }\r\n if (fill.on && params.fill) {\r\n var isURL = Str(params.fill).match(R._ISURL);\r\n if (isURL) {\r\n fill.parentNode == node && node.removeChild(fill);\r\n fill.rotate = true;\r\n fill.src = isURL[1];\r\n fill.type = "tile";\r\n var bbox = o.getBBox(1);\r\n fill.position = bbox.x + S + bbox.y;\r\n o._.fillpos = [bbox.x, bbox.y];\r\n\r\n R._preload(isURL[1], function () {\r\n o._.fillsize = [this.offsetWidth, this.offsetHeight];\r\n });\r\n } else {\r\n fill.color = R.getRGB(params.fill).hex;\r\n fill.src = E;\r\n fill.type = "solid";\r\n if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) {\r\n a.fill = "none";\r\n a.gradient = params.fill;\r\n fill.rotate = false;\r\n }\r\n }\r\n }\r\n if ("fill-opacity" in params || "opacity" in params) {\r\n var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1);\r\n opacity = mmin(mmax(opacity, 0), 1);\r\n fill.opacity = opacity;\r\n if (fill.src) {\r\n fill.color = "none";\r\n }\r\n }\r\n node.appendChild(fill);\r\n var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]),\r\n newstroke = false;\r\n !stroke && (newstroke = stroke = createNode("stroke"));\r\n if ((params.stroke && params.stroke != "none") ||\r\n params["stroke-width"] ||\r\n params["stroke-opacity"] != null ||\r\n params["stroke-dasharray"] ||\r\n params["stroke-miterlimit"] ||\r\n params["stroke-linejoin"] ||\r\n params["stroke-linecap"]) {\r\n stroke.on = true;\r\n }\r\n (params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false);\r\n var strokeColor = R.getRGB(params.stroke);\r\n stroke.on && params.stroke && (stroke.color = strokeColor.hex);\r\n opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1);\r\n var width = (toFloat(params["stroke-width"]) || 1) * .75;\r\n opacity = mmin(mmax(opacity, 0), 1);\r\n params["stroke-width"] == null && (width = a["stroke-width"]);\r\n params["stroke-width"] && (stroke.weight = width);\r\n width && width < 1 && (opacity *= width) && (stroke.weight = 1);\r\n stroke.opacity = opacity;\r\n\r\n params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter");\r\n stroke.miterlimit = params["stroke-miterlimit"] || 8;\r\n params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round");\r\n if ("stroke-dasharray" in params) {\r\n var dasharray = {\r\n "-": "shortdash",\r\n ".": "shortdot",\r\n "-.": "shortdashdot",\r\n "-..": "shortdashdotdot",\r\n ". ": "dot",\r\n "- ": "dash",\r\n "--": "longdash",\r\n "- .": "dashdot",\r\n "--.": "longdashdot",\r\n "--..": "longdashdotdot"\r\n };\r\n stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E;\r\n }\r\n newstroke && node.appendChild(stroke);\r\n }\r\n if (res.type == "text") {\r\n res.paper.canvas.style.display = E;\r\n var span = res.paper.span,\r\n m = 100,\r\n fontSize = a.font && a.font.match(/\\d+(?:\\.\\d*)?(?=px)/);\r\n s = span.style;\r\n a.font && (s.font = a.font);\r\n a["font-family"] && (s.fontFamily = a["font-family"]);\r\n a["font-weight"] && (s.fontWeight = a["font-weight"]);\r\n a["font-style"] && (s.fontStyle = a["font-style"]);\r\n fontSize = toFloat(a["font-size"] || fontSize && fontSize[0]) || 10;\r\n s.fontSize = fontSize * m + "px";\r\n res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, "<").replace(/&/g, "&").replace(/\\n/g, "<br>"));\r\n var brect = span.getBoundingClientRect();\r\n res.W = a.w = (brect.right - brect.left) / m;\r\n res.H = a.h = (brect.bottom - brect.top) / m;\r\n // res.paper.canvas.style.display = "none";\r\n res.X = a.x;\r\n res.Y = a.y + res.H / 2;\r\n\r\n ("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1));\r\n var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"];\r\n for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) {\r\n res._.dirty = 1;\r\n break;\r\n }\r\n\r\n // text-anchor emulation\r\n switch (a["text-anchor"]) {\r\n case "start":\r\n res.textpath.style["v-text-align"] = "left";\r\n res.bbx = res.W / 2;\r\n break;\r\n case "end":\r\n res.textpath.style["v-text-align"] = "right";\r\n res.bbx = -res.W / 2;\r\n break;\r\n default:\r\n res.textpath.style["v-text-align"] = "center";\r\n res.bbx = 0;\r\n break;\r\n }\r\n res.textpath.style["v-text-kern"] = true;\r\n }\r\n // res.paper.canvas.style.display = E;\r\n },\r\n addGradientFill = function (o, gradient, fill) {\r\n o.attrs = o.attrs || {};\r\n var attrs = o.attrs,\r\n pow = Math.pow,\r\n opacity,\r\n oindex,\r\n type = "linear",\r\n fxfy = ".5 .5";\r\n o.attrs.gradient = gradient;\r\n gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) {\r\n type = "radial";\r\n if (fx && fy) {\r\n fx = toFloat(fx);\r\n fy = toFloat(fy);\r\n pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5);\r\n fxfy = fx + S + fy;\r\n }\r\n return E;\r\n });\r\n gradient = gradient.split(/\\s*\\-\\s*/);\r\n if (type == "linear") {\r\n var angle = gradient.shift();\r\n angle = -toFloat(angle);\r\n if (isNaN(angle)) {\r\n return null;\r\n }\r\n }\r\n var dots = R._parseDots(gradient);\r\n if (!dots) {\r\n return null;\r\n }\r\n o = o.shape || o.node;\r\n if (dots.length) {\r\n o.removeChild(fill);\r\n fill.on = true;\r\n fill.method = "none";\r\n fill.color = dots[0].color;\r\n fill.color2 = dots[dots.length - 1].color;\r\n var clrs = [];\r\n for (var i = 0, ii = dots.length; i < ii; i++) {\r\n dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color);\r\n }\r\n fill.colors = clrs.length ? clrs.join() : "0% " + fill.color;\r\n if (type == "radial") {\r\n fill.type = "gradientTitle";\r\n fill.focus = "100%";\r\n fill.focussize = "0 0";\r\n fill.focusposition = fxfy;\r\n fill.angle = 0;\r\n } else {\r\n // fill.rotate= true;\r\n fill.type = "gradient";\r\n fill.angle = (270 - angle) % 360;\r\n }\r\n o.appendChild(fill);\r\n }\r\n return 1;\r\n },\r\n Element = function (node, vml) {\r\n this[0] = this.node = node;\r\n node.raphael = true;\r\n this.id = R._oid++;\r\n node.raphaelid = this.id;\r\n this.X = 0;\r\n this.Y = 0;\r\n this.attrs = {};\r\n this.paper = vml;\r\n this.matrix = R.matrix();\r\n this._ = {\r\n transform: [],\r\n sx: 1,\r\n sy: 1,\r\n dx: 0,\r\n dy: 0,\r\n deg: 0,\r\n dirty: 1,\r\n dirtyT: 1\r\n };\r\n !vml.bottom && (vml.bottom = this);\r\n this.prev = vml.top;\r\n vml.top && (vml.top.next = this);\r\n vml.top = this;\r\n this.next = null;\r\n };\r\n var elproto = R.el;\r\n\r\n Element.prototype = elproto;\r\n elproto.constructor = Element;\r\n elproto.transform = function (tstr) {\r\n if (tstr == null) {\r\n return this._.transform;\r\n }\r\n var vbs = this.paper._viewBoxShift,\r\n vbt = vbs ? "s" + [vbs.scale, vbs.scale] + "-1-1t" + [vbs.dx, vbs.dy] : E,\r\n oldt;\r\n if (vbs) {\r\n oldt = tstr = Str(tstr).replace(/\\.{3}|\\u2026/g, this._.transform || E);\r\n }\r\n R._extractTransform(this, vbt + tstr);\r\n var matrix = this.matrix.clone(),\r\n skew = this.skew,\r\n o = this.node,\r\n split,\r\n isGrad = ~Str(this.attrs.fill).indexOf("-"),\r\n isPatt = !Str(this.attrs.fill).indexOf("url(");\r\n matrix.translate(1, 1);\r\n if (isPatt || isGrad || this.type == "image") {\r\n skew.matrix = "1 0 0 1";\r\n skew.offset = "0 0";\r\n split = matrix.split();\r\n if ((isGrad && split.noRotation) || !split.isSimple) {\r\n o.style.filter = matrix.toFilter();\r\n var bb = this.getBBox(),\r\n bbt = this.getBBox(1),\r\n dx = bb.x - bbt.x,\r\n dy = bb.y - bbt.y;\r\n o.coordorigin = (dx * -zoom) + S + (dy * -zoom);\r\n setCoords(this, 1, 1, dx, dy, 0);\r\n } else {\r\n o.style.filter = E;\r\n setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate);\r\n }\r\n } else {\r\n o.style.filter = E;\r\n skew.matrix = Str(matrix);\r\n skew.offset = matrix.offset();\r\n }\r\n if (oldt !== null) { // empty string value is true as well\r\n this._.transform = oldt;\r\n R._extractTransform(this, oldt);\r\n }\r\n return this;\r\n };\r\n elproto.rotate = function (deg, cx, cy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (deg == null) {\r\n return;\r\n }\r\n deg = Str(deg).split(separator);\r\n if (deg.length - 1) {\r\n cx = toFloat(deg[1]);\r\n cy = toFloat(deg[2]);\r\n }\r\n deg = toFloat(deg[0]);\r\n (cy == null) && (cx = cy);\r\n if (cx == null || cy == null) {\r\n var bbox = this.getBBox(1);\r\n cx = bbox.x + bbox.width / 2;\r\n cy = bbox.y + bbox.height / 2;\r\n }\r\n this._.dirtyT = 1;\r\n this.transform(this._.transform.concat([["r", deg, cx, cy]]));\r\n return this;\r\n };\r\n elproto.translate = function (dx, dy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n dx = Str(dx).split(separator);\r\n if (dx.length - 1) {\r\n dy = toFloat(dx[1]);\r\n }\r\n dx = toFloat(dx[0]) || 0;\r\n dy = +dy || 0;\r\n if (this._.bbox) {\r\n this._.bbox.x += dx;\r\n this._.bbox.y += dy;\r\n }\r\n this.transform(this._.transform.concat([["t", dx, dy]]));\r\n return this;\r\n };\r\n elproto.scale = function (sx, sy, cx, cy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n sx = Str(sx).split(separator);\r\n if (sx.length - 1) {\r\n sy = toFloat(sx[1]);\r\n cx = toFloat(sx[2]);\r\n cy = toFloat(sx[3]);\r\n isNaN(cx) && (cx = null);\r\n isNaN(cy) && (cy = null);\r\n }\r\n sx = toFloat(sx[0]);\r\n (sy == null) && (sy = sx);\r\n (cy == null) && (cx = cy);\r\n if (cx == null || cy == null) {\r\n var bbox = this.getBBox(1);\r\n }\r\n cx = cx == null ? bbox.x + bbox.width / 2 : cx;\r\n cy = cy == null ? bbox.y + bbox.height / 2 : cy;\r\n\r\n this.transform(this._.transform.concat([["s", sx, sy, cx, cy]]));\r\n this._.dirtyT = 1;\r\n return this;\r\n };\r\n elproto.hide = function () {\r\n !this.removed && (this.node.style.display = "none");\r\n return this;\r\n };\r\n elproto.show = function () {\r\n !this.removed && (this.node.style.display = E);\r\n return this;\r\n };\r\n // Needed to fix the vml setViewBox issues\r\n elproto.auxGetBBox = R.el.getBBox;\r\n elproto.getBBox = function(){\r\n var b = this.auxGetBBox();\r\n if (this.paper && this.paper._viewBoxShift)\r\n {\r\n var c = {};\r\n var z = 1/this.paper._viewBoxShift.scale;\r\n c.x = b.x - this.paper._viewBoxShift.dx;\r\n c.x *= z;\r\n c.y = b.y - this.paper._viewBoxShift.dy;\r\n c.y *= z;\r\n c.width = b.width * z;\r\n c.height = b.height * z;\r\n c.x2 = c.x + c.width;\r\n c.y2 = c.y + c.height;\r\n return c;\r\n }\r\n return b;\r\n };\r\n elproto._getBBox = function () {\r\n if (this.removed) {\r\n return {};\r\n }\r\n return {\r\n x: this.X + (this.bbx || 0) - this.W / 2,\r\n y: this.Y - this.H,\r\n width: this.W,\r\n height: this.H\r\n };\r\n };\r\n elproto.remove = function () {\r\n if (this.removed || !this.node.parentNode) {\r\n return;\r\n }\r\n this.paper.__set__ && this.paper.__set__.exclude(this);\r\n R.eve.unbind("raphael.*.*." + this.id);\r\n R._tear(this, this.paper);\r\n this.node.parentNode.removeChild(this.node);\r\n this.shape && this.shape.parentNode.removeChild(this.shape);\r\n for (var i in this) {\r\n this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;\r\n }\r\n this.removed = true;\r\n };\r\n elproto.attr = function (name, value) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (name == null) {\r\n var res = {};\r\n for (var a in this.attrs) if (this.attrs[has](a)) {\r\n res[a] = this.attrs[a];\r\n }\r\n res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;\r\n res.transform = this._.transform;\r\n return res;\r\n }\r\n if (value == null && R.is(name, "string")) {\r\n if (name == fillString && this.attrs.fill == "none" && this.attrs.gradient) {\r\n return this.attrs.gradient;\r\n }\r\n var names = name.split(separator),\r\n out = {};\r\n for (var i = 0, ii = names.length; i < ii; i++) {\r\n name = names[i];\r\n if (name in this.attrs) {\r\n out[name] = this.attrs[name];\r\n } else if (R.is(this.paper.customAttributes[name], "function")) {\r\n out[name] = this.paper.customAttributes[name].def;\r\n } else {\r\n out[name] = R._availableAttrs[name];\r\n }\r\n }\r\n return ii - 1 ? out : out[names[0]];\r\n }\r\n if (this.attrs && value == null && R.is(name, "array")) {\r\n out = {};\r\n for (i = 0, ii = name.length; i < ii; i++) {\r\n out[name[i]] = this.attr(name[i]);\r\n }\r\n return out;\r\n }\r\n var params;\r\n if (value != null) {\r\n params = {};\r\n params[name] = value;\r\n }\r\n value == null && R.is(name, "object") && (params = name);\r\n for (var key in params) {\r\n eve("raphael.attr." + key + "." + this.id, this, params[key]);\r\n }\r\n if (params) {\r\n for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {\r\n var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));\r\n this.attrs[key] = params[key];\r\n for (var subkey in par) if (par[has](subkey)) {\r\n params[subkey] = par[subkey];\r\n }\r\n }\r\n // this.paper.canvas.style.display = "none";\r\n if (params.text && this.type == "text") {\r\n this.textpath.string = params.text;\r\n }\r\n setFillAndStroke(this, params);\r\n // this.paper.canvas.style.display = E;\r\n }\r\n return this;\r\n };\r\n elproto.toFront = function () {\r\n !this.removed && this.node.parentNode.appendChild(this.node);\r\n this.paper && this.paper.top != this && R._tofront(this, this.paper);\r\n return this;\r\n };\r\n elproto.toBack = function () {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (this.node.parentNode.firstChild != this.node) {\r\n this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild);\r\n R._toback(this, this.paper);\r\n }\r\n return this;\r\n };\r\n elproto.insertAfter = function (element) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (element.constructor == R.st.constructor) {\r\n element = element[element.length - 1];\r\n }\r\n if (element.node.nextSibling) {\r\n element.node.parentNode.insertBefore(this.node, element.node.nextSibling);\r\n } else {\r\n element.node.parentNode.appendChild(this.node);\r\n }\r\n R._insertafter(this, element, this.paper);\r\n return this;\r\n };\r\n elproto.insertBefore = function (element) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (element.constructor == R.st.constructor) {\r\n element = element[0];\r\n }\r\n element.node.parentNode.insertBefore(this.node, element.node);\r\n R._insertbefore(this, element, this.paper);\r\n return this;\r\n };\r\n elproto.blur = function (size) {\r\n var s = this.node.runtimeStyle,\r\n f = s.filter;\r\n f = f.replace(blurregexp, E);\r\n if (+size !== 0) {\r\n this.attrs.blur = size;\r\n s.filter = f + S + ms + ".Blur(pixelradius=" + (+size || 1.5) + ")";\r\n s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5));\r\n } else {\r\n s.filter = f;\r\n s.margin = 0;\r\n delete this.attrs.blur;\r\n }\r\n return this;\r\n };\r\n\r\n R._engine.path = function (pathString, vml) {\r\n var el = createNode("shape");\r\n el.style.cssText = cssDot;\r\n el.coordsize = zoom + S + zoom;\r\n el.coordorigin = vml.coordorigin;\r\n var p = new Element(el, vml),\r\n attr = {fill: "none", stroke: "#000"};\r\n pathString && (attr.path = pathString);\r\n p.type = "path";\r\n p.path = [];\r\n p.Path = E;\r\n setFillAndStroke(p, attr);\r\n vml.canvas.appendChild(el);\r\n var skew = createNode("skew");\r\n skew.on = true;\r\n el.appendChild(skew);\r\n p.skew = skew;\r\n p.transform(E);\r\n return p;\r\n };\r\n R._engine.rect = function (vml, x, y, w, h, r) {\r\n var path = R._rectPath(x, y, w, h, r),\r\n res = vml.path(path),\r\n a = res.attrs;\r\n res.X = a.x = x;\r\n res.Y = a.y = y;\r\n res.W = a.width = w;\r\n res.H = a.height = h;\r\n a.r = r;\r\n a.path = path;\r\n res.type = "rect";\r\n return res;\r\n };\r\n R._engine.ellipse = function (vml, x, y, rx, ry) {\r\n var res = vml.path(),\r\n a = res.attrs;\r\n res.X = x - rx;\r\n res.Y = y - ry;\r\n res.W = rx * 2;\r\n res.H = ry * 2;\r\n res.type = "ellipse";\r\n setFillAndStroke(res, {\r\n cx: x,\r\n cy: y,\r\n rx: rx,\r\n ry: ry\r\n });\r\n return res;\r\n };\r\n R._engine.circle = function (vml, x, y, r) {\r\n var res = vml.path(),\r\n a = res.attrs;\r\n res.X = x - r;\r\n res.Y = y - r;\r\n res.W = res.H = r * 2;\r\n res.type = "circle";\r\n setFillAndStroke(res, {\r\n cx: x,\r\n cy: y,\r\n r: r\r\n });\r\n return res;\r\n };\r\n R._engine.image = function (vml, src, x, y, w, h) {\r\n var path = R._rectPath(x, y, w, h),\r\n res = vml.path(path).attr({stroke: "none"}),\r\n a = res.attrs,\r\n node = res.node,\r\n fill = node.getElementsByTagName(fillString)[0];\r\n a.src = src;\r\n res.X = a.x = x;\r\n res.Y = a.y = y;\r\n res.W = a.width = w;\r\n res.H = a.height = h;\r\n a.path = path;\r\n res.type = "image";\r\n fill.parentNode == node && node.removeChild(fill);\r\n fill.rotate = true;\r\n fill.src = src;\r\n fill.type = "tile";\r\n res._.fillpos = [x, y];\r\n res._.fillsize = [w, h];\r\n node.appendChild(fill);\r\n setCoords(res, 1, 1, 0, 0, 0);\r\n return res;\r\n };\r\n R._engine.text = function (vml, x, y, text) {\r\n var el = createNode("shape"),\r\n path = createNode("path"),\r\n o = createNode("textpath");\r\n x = x || 0;\r\n y = y || 0;\r\n text = text || "";\r\n path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1);\r\n path.textpathok = true;\r\n o.string = Str(text);\r\n o.on = true;\r\n el.style.cssText = cssDot;\r\n el.coordsize = zoom + S + zoom;\r\n el.coordorigin = "0 0";\r\n var p = new Element(el, vml),\r\n attr = {\r\n fill: "#000",\r\n stroke: "none",\r\n font: R._availableAttrs.font,\r\n text: text\r\n };\r\n p.shape = el;\r\n p.path = path;\r\n p.textpath = o;\r\n p.type = "text";\r\n p.attrs.text = Str(text);\r\n p.attrs.x = x;\r\n p.attrs.y = y;\r\n p.attrs.w = 1;\r\n p.attrs.h = 1;\r\n setFillAndStroke(p, attr);\r\n el.appendChild(o);\r\n el.appendChild(path);\r\n vml.canvas.appendChild(el);\r\n var skew = createNode("skew");\r\n skew.on = true;\r\n el.appendChild(skew);\r\n p.skew = skew;\r\n p.transform(E);\r\n return p;\r\n };\r\n R._engine.setSize = function (width, height) {\r\n var cs = this.canvas.style;\r\n this.width = width;\r\n this.height = height;\r\n width == +width && (width += "px");\r\n height == +height && (height += "px");\r\n cs.width = width;\r\n cs.height = height;\r\n cs.clip = "rect(0 " + width + " " + height + " 0)";\r\n if (this._viewBox) {\r\n R._engine.setViewBox.apply(this, this._viewBox);\r\n }\r\n return this;\r\n };\r\n R._engine.setViewBox = function (x, y, w, h, fit) {\r\n R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);\r\n var paperSize = this.getSize(),\r\n width = paperSize.width,\r\n height = paperSize.height,\r\n H, W;\r\n if (fit) {\r\n H = height / h;\r\n W = width / w;\r\n if (w * H < width) {\r\n x -= (width - w * H) / 2 / H;\r\n }\r\n if (h * W < height) {\r\n y -= (height - h * W) / 2 / W;\r\n }\r\n }\r\n this._viewBox = [x, y, w, h, !!fit];\r\n this._viewBoxShift = {\r\n dx: -x,\r\n dy: -y,\r\n scale: paperSize\r\n };\r\n this.forEach(function (el) {\r\n el.transform("...");\r\n });\r\n return this;\r\n };\r\n var createNode;\r\n R._engine.initWin = function (win) {\r\n var doc = win.document;\r\n if (doc.styleSheets.length < 31) {\r\n doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");\r\n } else {\r\n // no more room, add to the existing one\r\n // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx\r\n doc.styleSheets[0].addRule(".rvml", "behavior:url(#default#VML)");\r\n }\r\n try {\r\n !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");\r\n createNode = function (tagName) {\r\n return doc.createElement(\'<rvml:\' + tagName + \' class="rvml">\');\r\n };\r\n } catch (e) {\r\n createNode = function (tagName) {\r\n return doc.createElement(\'<\' + tagName + \' xmlns="urn:schemas-microsoft.com:vml" class="rvml">\');\r\n };\r\n }\r\n };\r\n R._engine.initWin(R._g.win);\r\n R._engine.create = function () {\r\n var con = R._getContainer.apply(0, arguments),\r\n container = con.container,\r\n height = con.height,\r\n s,\r\n width = con.width,\r\n x = con.x,\r\n y = con.y;\r\n if (!container) {\r\n throw new Error("VML container not found.");\r\n }\r\n var res = new R._Paper,\r\n c = res.canvas = R._g.doc.createElement("div"),\r\n cs = c.style;\r\n x = x || 0;\r\n y = y || 0;\r\n width = width || 512;\r\n height = height || 342;\r\n res.width = width;\r\n res.height = height;\r\n width == +width && (width += "px");\r\n height == +height && (height += "px");\r\n res.coordsize = zoom * 1e3 + S + zoom * 1e3;\r\n res.coordorigin = "0 0";\r\n res.span = R._g.doc.createElement("span");\r\n res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;";\r\n c.appendChild(res.span);\r\n cs.cssText = R.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", width, height);\r\n if (container == 1) {\r\n R._g.doc.body.appendChild(c);\r\n cs.left = x + "px";\r\n cs.top = y + "px";\r\n cs.position = "absolute";\r\n } else {\r\n if (container.firstChild) {\r\n container.insertBefore(c, container.firstChild);\r\n } else {\r\n container.appendChild(c);\r\n }\r\n }\r\n res.renderfix = function () {};\r\n return res;\r\n };\r\n R.prototype.clear = function () {\r\n R.eve("raphael.clear", this);\r\n this.canvas.innerHTML = E;\r\n this.span = R._g.doc.createElement("span");\r\n this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";\r\n this.canvas.appendChild(this.span);\r\n this.bottom = this.top = null;\r\n };\r\n R.prototype.remove = function () {\r\n R.eve("raphael.remove", this);\r\n this.canvas.parentNode.removeChild(this.canvas);\r\n for (var i in this) {\r\n this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;\r\n }\r\n return true;\r\n };\r\n\r\n var setproto = R.st;\r\n for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {\r\n setproto[method] = (function (methodname) {\r\n return function () {\r\n var arg = arguments;\r\n return this.forEach(function (el) {\r\n el[methodname].apply(el, arg);\r\n });\r\n };\r\n })(method);\r\n }\r\n}));\r\n\r\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Raphaël @VERSION - JavaScript Vector Library │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\r\n// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\r\n// └────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n(function (glob, factory) {\r\n if (typeof define === "function" && define.amd) {\r\n define("raphael", ["raphael.core", "raphael.svg", "raphael.vml"], function(Raphael) {\r\n return (glob.Raphael = factory(Raphael));\r\n });\r\n } else if (typeof exports === "object") {\r\n var raphael = require("raphael.core");\r\n\r\n require("raphael.svg");\r\n require("raphael.vml");\r\n\r\n module.exports = factory(raphael);\r\n } else {\r\n glob.Raphael = factory(glob.Raphael);\r\n }\r\n}(this, function (Raphael) {\r\n return Raphael.ninja();\r\n}));\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * FRaphael\r\n * \tAn extension for Raphael.js to make it easier to work with Filter Effects\r\n *\r\n * Copyright © 2013 Chris Scott <chris.scott@factmint.com>\r\n * Delivered with and licensed under the MIT licence\r\n *\r\n */\r\n\r\n// Create the global FRaphael object\r\n(function(scope) {\r\n var\tversion = "0.0.1",\r\n license = "MIT";\r\n\r\n var\tns = "http://www.w3.org/2000/svg",\r\n idCounter = 0;\r\n\r\n var FR = {\r\n // Object prototype for a filter\r\n Filter: function(id) {\r\n if (id == undefined) {\r\n id = "filter-" + idCounter++;\r\n while(FR.filters[id] != undefined) {\r\n id = "filter-" + idCounter++;\r\n }\r\n }\r\n\r\n if (FR.filters[id] != undefined) {\r\n throw "A filter with id " + id + " already exists";\r\n }\r\n\r\n this.element = document.createElementNS(ns, "filter");\r\n this.element.setAttribute("id", id);\r\n this.element.setAttribute("x", "-25%");\r\n this.element.setAttribute("y", "-25%");\r\n this.element.setAttribute("width", "150%");\r\n this.element.setAttribute("height", "150%");\r\n\r\n this.lastFEResult = null;\r\n\r\n FR.filters[id] = this;\r\n this.id = id;\r\n },\r\n\r\n // Object prototype for an effect\r\n FilterEffect: function(type, attributes) {\r\n this.element = document.createElementNS(ns, type);\r\n for (var key in attributes) {\r\n this.element.setAttribute(key, attributes[key]);\r\n }\r\n },\r\n\r\n // Return the filter applied to an element or a new filter if none are currently applied\r\n getFilter: function(element) {\r\n var filterId = element.data("filterId");\r\n var filter = null;\r\n\r\n if (filterId == undefined) {\r\n filterId = "element-filter-" + element.id;\r\n filter = element.paper.createFilter(filterId);\r\n element.filter(filterId);\r\n } else {\r\n filter = FR.filters[filterId];\r\n }\r\n\r\n return filter;\r\n },\r\n\r\n // maintain a list of filters by id\r\n filters: {}\r\n };\r\n\r\n FR.Filter.prototype = {\r\n addEffect: function(type, attributes, children) {\r\n var effect = new FR.FilterEffect(type, attributes);\r\n\r\n if (children) {\r\n if (children instanceof Array) {\r\n for (var x in children) {\r\n if (!children.hasOwnProperty(x)) continue;\r\n\r\n effect.element.appendChild(children[x].element);\r\n }\r\n } else {\r\n effect.element.appendChild(children.element);\r\n }\r\n }\r\n\r\n this.element.appendChild(effect.element);\r\n\r\n return this;\r\n },\r\n\r\n chainEffect: function(type, attributes, children) {\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n var inId;\r\n var outId;\r\n if (attributes.in == undefined) {\r\n inId = this.getLastResult();\r\n } else {\r\n inId = attributes.in;\r\n }\r\n if (attributes.result == undefined) {\r\n outId = idCounter++;\r\n } else {\r\n outId = attributes.result;\r\n }\r\n\r\n this.lastFEResult = outId;\r\n\r\n attributes.in = inId;\r\n attributes.result = outId;\r\n\r\n this.addEffect(type, attributes, children);\r\n\r\n return this;\r\n },\r\n\r\n getLastResult: function() {\r\n return (this.lastFEResult == undefined) ? "SourceGraphic" : this.lastFEResult;\r\n },\r\n\r\n merge: function(in1, in2, attributes) {\r\n var mergeNode1 = new FR.FilterEffect("feMergeNode", {\r\n in: in1\r\n });\r\n var mergeNode2 = new FR.FilterEffect("feMergeNode", {\r\n in: in2\r\n });\r\n\r\n this.chainEffect("feMerge", attributes, [mergeNode1, mergeNode2]);\r\n\r\n return this;\r\n },\r\n\r\n compose: function(in1, in2, operator, attributes) {\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n if (operator == undefined) {\r\n operator = "over";\r\n }\r\n\r\n attributes.in = in1;\r\n attributes.in2 = in2;\r\n attributes.operator = operator;\r\n\r\n this.chainEffect("feComposite", attributes);\r\n\r\n return this;\r\n },\r\n\r\n arithmeticCompose: function(in1, in2, k1, k2, k3, k4) {\r\n if (k1 == undefined) {\r\n k1 = 0;\r\n }\r\n if (k2 == undefined) {\r\n k2 = 0;\r\n }\r\n if (k3 == undefined) {\r\n k3 = 0;\r\n }\r\n if (k4 == undefined) {\r\n k4 = 0;\r\n }\r\n\r\n this.compose(in1, in2, "arithmetic", {\r\n k1: k1,\r\n k2: k2,\r\n k3: k3,\r\n k4: k4\r\n });\r\n\r\n return this;\r\n },\r\n\r\n addBlur: function(stdDeviation, attributes) {\r\n if (!stdDeviation) {\r\n throw "Standard deviation is required to perform a blur filter";\r\n }\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n attributes.stdDeviation = stdDeviation;\r\n\r\n this.chainEffect("feGaussianBlur", attributes);\r\n\r\n return this;\r\n },\r\n\r\n addOffset: function(dx, dy, attributes) {\r\n if (dx == undefined | dy == undefined) {\r\n throw "dx and dy values are required to perform an offset FE";\r\n }\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n attributes.dx = dx;\r\n attributes.dy = dy;\r\n\r\n this.chainEffect("feOffset", attributes);\r\n\r\n return this;\r\n },\r\n\r\n addLighting: function(x, y, z, color, type, attributes) {\r\n if (x == undefined | y == undefined | z == undefined) {\r\n throw "Three co-ordinates are required to create a light source";\r\n }\r\n\r\n var previousResult = this.getLastResult();\r\n\r\n var id = idCounter++;\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n attributes.result = id;\r\n if (color != undefined) {\r\n attributes["lighting-color"] = color;\r\n }\r\n\r\n if (type == undefined || type == "diffuse") {\r\n type = "feDiffuseLighting";\r\n } else if (type == "specular") {\r\n type = "feSpecularLighting";\r\n }\r\n\r\n var lightSource = new FR.FilterEffect("fePointLight", {\r\n x: x,\r\n y: y,\r\n z: z\r\n });\r\n\r\n this.chainEffect(type, attributes, lightSource).arithmeticCompose(previousResult, id, 3, 0.2, 0, 0);\r\n\r\n return this;\r\n },\r\n\r\n addShiftToColor: function(color, moveBy, attributes) {\r\n if (color == undefined) {\r\n throw "A colour string is a required argument to create a colorMatrix";\r\n }\r\n if (moveBy == undefined) {\r\n moveBy = 0.5;\r\n }\r\n\r\n var remainingColor = 1 - moveBy, x = remainingColor;\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n var colorObject = Raphael.color(color);\r\n var\tr = colorObject.r * moveBy / 255,\r\n g = colorObject.g * moveBy / 255,\r\n b = colorObject.b * moveBy / 255;\r\n\r\n /**\r\n * r\'\tx 0 0 0 r\t\tr\r\n * g\'\t0 x 0 0 g\t\tg\r\n * b\' =\t0 0 x 0 b\t.\tb\r\n * a\'\t0 0 0 1 0\t\to\r\n * 1\t\t\t\t\t1\r\n */\r\n attributes.values = x + " 0 0 0 " + r + " 0 " + x + " 0 0 " + g + " 0 0 " + x + " 0 " + b + " 0 0 0 1 0 ";\r\n\r\n this.chainEffect("feColorMatrix", attributes);\r\n\r\n return this;\r\n },\r\n\r\n addRecolor: function(color, opacity, attributes) {\r\n if (color == undefined) {\r\n throw "A colour string is a required argument to create a colorMatrix";\r\n }\r\n if (opacity == undefined) {\r\n opacity = 1;\r\n }\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n var colorObject = Raphael.color(color);\r\n var\tr = colorObject.r / 255,\r\n g = colorObject.g / 255,\r\n b = colorObject.b / 255;\r\n\r\n /**\r\n * r\'\t0 0 0 0 r\t\tr\r\n * g\'\t0 0 0 0 g\t\tg\r\n * b\' =\t0 0 0 0 b\t.\tb\r\n * a\'\t0 0 0 a 0\t\ta\r\n * 1\t\t\t\t\t1\r\n */\r\n attributes.values = "0 0 0 0 " + r + " 0 0 0 0 " + g + " 0 0 0 0 " + b + " 0 0 0 " + opacity + " 0 ";\r\n\r\n this.chainEffect("feColorMatrix", attributes);\r\n\r\n return this;\r\n },\r\n\r\n addDesaturate: function(saturation, attributes) {\r\n if (saturation == undefined) {\r\n saturnation = 0;\r\n }\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n attributes.values = saturation;\r\n attributes.type = "saturate";\r\n\r\n this.chainEffect("feColorMatrix", attributes);\r\n\r\n return this;\r\n },\r\n\r\n addConvolveMatrix: function(matrix, attributes) {\r\n if (matrix == undefined) {\r\n throw "A matrix (usually 9 numbers) must be provided to apply a convolve matrix transform";\r\n }\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n attributes.kernelMatrix = matrix;\r\n\r\n this.chainEffect("feConvolveMatrix", attributes);\r\n\r\n return this;\r\n },\r\n\r\n createShadow: function(dx, dy, blur, opacity, color) {\r\n if (dx == undefined) {\r\n throw "dx is required for the shadow effect";\r\n }\r\n if (dy == undefined) {\r\n throw "dy is required for the shadow effect";\r\n }\r\n if (blur == undefined) {\r\n throw "blur (stdDeviation) is required for the shadow effect";\r\n }\r\n\r\n if (opacity == undefined) {\r\n opacity = 0.6;\r\n }\r\n\r\n var previousResult = this.getLastResult();\r\n\r\n if (color == undefined) {\r\n color = "#000000";\r\n }\r\n\r\n this.addOffset(dx, dy, {\r\n in: "SourceAlpha"\r\n });\r\n\r\n this.addRecolor(color, opacity);\r\n\r\n this.addBlur(blur);\r\n\r\n this.merge(this.getLastResult(), previousResult);\r\n\r\n return this;\r\n },\r\n\r\n createEmboss: function(height, x, y, z) {\r\n if (height == undefined) {\r\n height = 2;\r\n }\r\n if (x == undefined) {\r\n x = -1000;\r\n }\r\n if (y == undefined) {\r\n y = -5000;\r\n }\r\n if (z == undefined) {\r\n z = 300;\r\n }\r\n\r\n // Create the highlight\r\n\r\n this.addOffset(height * x / (x + y), height * y / (x + y), {\r\n in: "SourceAlpha"\r\n });\r\n\r\n this.addBlur(height * 0.5);\r\n\r\n var whiteLightSource = new FR.FilterEffect("fePointLight", {\r\n x: x,\r\n y: y,\r\n z: z\r\n });\r\n\r\n this.chainEffect("feSpecularLighting", {\r\n surfaceScale: height,\r\n specularConstant: 0.8,\r\n specularExponent: 15\r\n }, whiteLightSource);\r\n\r\n this.compose(this.getLastResult(), "SourceAlpha", "in");\r\n var whiteLight = this.getLastResult();\r\n\r\n // Create the lowlight\r\n\r\n this.addOffset(height * -1 * x / (x + y), height * -1 * y / (x + y), {\r\n in: "SourceAlpha"\r\n });\r\n\r\n this.addBlur(height * 0.5);\r\n\r\n var darkLightSource = new FR.FilterEffect("fePointLight", {\r\n x: -1 * x,\r\n y: -1 * y,\r\n z: z\r\n });\r\n\r\n this.chainEffect("feSpecularLighting", {\r\n surfaceScale: height,\r\n specularConstant: 1.8,\r\n specularExponent: 6\r\n }, darkLightSource);\r\n\r\n this.compose(this.getLastResult(), "SourceAlpha", "in");\r\n this.chainEffect("feColorMatrix", {\r\n values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"\r\n });\r\n var darkLight = this.getLastResult();\r\n\r\n this.arithmeticCompose(whiteLight, darkLight, 0, 0.8, 0.5, 0);\r\n\r\n this.merge("SourceGraphic", this.getLastResult());\r\n\r\n return this;\r\n }\r\n };\r\n\r\n scope.FRaphael = FR;\r\n})(this);\r\n\r\n/**\r\n * add a filter to the paper by id\r\n */\r\nRaphael.fn.createFilter = function(id) {\r\n var paper = this;\r\n var filter = new FRaphael.Filter(id);\r\n paper.defs.appendChild(filter.element);\r\n\r\n return filter;\r\n};\r\n\r\n/**\r\n * Apply a filter to an element by id\r\n */\r\nRaphael.el.filter = function(filter) {\r\n var id = (filter instanceof FRaphael.Filter) ? filter.id : filter;\r\n\r\n this.node.setAttribute("filter", "url(#" + id + ")");\r\n this.data("filterId", id);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Get the current filter for an element or a new one if not\r\n */\r\nRaphael.el.getFilter = function() {\r\n return FRaphael.getFilter(this);\r\n};\r\n\r\n/**\r\n * A shorthand method for applying blur\r\n */\r\nRaphael.el.blur = function(stdDeviation) {\r\n if (stdDeviation == undefined) {\r\n stdDeviation = 3;\r\n }\r\n\r\n this.getFilter().addBlur(stdDeviation);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for applying a drop shadow\r\n */\r\nRaphael.el.shadow = function(dx, dy, blur, opacity, color) {\r\n if (dx == undefined) {\r\n dx = 3;\r\n }\r\n if (dy == undefined) {\r\n dy = 3;\r\n }\r\n if (blur == undefined) {\r\n blur = 3;\r\n }\r\n\r\n this.getFilter().createShadow(dx, dy, blur, opacity, color);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for applying lighting\r\n */\r\nRaphael.el.light = function(x, y, z, color, type) {\r\n if (x == undefined) {\r\n x = this.paper.width;\r\n }\r\n if (y == undefined) {\r\n y = 0;\r\n }\r\n if (z == undefined) {\r\n z = 20;\r\n }\r\n\r\n this.getFilter().addLighting(x, y, z, color, type);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for applying a colour shift\r\n */\r\nRaphael.el.colorShift = function(color, shift) {\r\n if (color == undefined) {\r\n color = "black";\r\n }\r\n if (shift == undefined) {\r\n shift = 0.5;\r\n }\r\n\r\n this.getFilter().addShiftToColor(color, shift);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for embossing\r\n */\r\nRaphael.el.emboss = function(height) {\r\n this.getFilter().createEmboss(height);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for desaturating\r\n */\r\nRaphael.el.desaturate = function(saturation) {\r\n this.getFilter().addDesaturate(saturation);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for complete desaturation\r\n */\r\nRaphael.el.greyScale = function() {\r\n this.getFilter().addDesaturate(0);\r\n\r\n return this;\r\n};\r\n'},"./node_modules/rgbcolor/index.js":t=>{t.exports=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=e[t]||t;for(var n=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],r=0;r<n.length;r++){var i=n[r].re,s=n[r].process,a=i.exec(t);if(a){var o=s(a);this.r=o[0],this.g=o[1],this.b=o[2],o.length>3&&(this.alpha=o[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),n=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==n.length&&(n="0"+n),"#"+t+e+n},this.getHelpXML=function(){for(var t=new Array,r=0;r<n.length;r++)for(var i=n[r].example,s=0;s<i.length;s++)t[t.length]=i[s];for(var a in e)t[t.length]=a;var o=document.createElement("ul");o.setAttribute("id","rgbcolor-examples");for(r=0;r<t.length;r++)try{var c=document.createElement("li"),l=new RGBColor(t[r]),h=document.createElement("div");h.style.cssText="margin: 3px; border: 1px solid black; background:"+l.toHex()+"; color:"+l.toHex(),h.appendChild(document.createTextNode("test"));var u=document.createTextNode(" "+t[r]+" -> "+l.toRGB()+" -> "+l.toHex());c.appendChild(h),c.appendChild(u),o.appendChild(c)}catch(t){}return o}}},"./node_modules/script-loader/addScript.js":t=>{t.exports=function(t){function e(t){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",t)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(t):"undefined"!=typeof eval?eval.call(null,t):e("EvalError: No eval function available")}catch(t){e(t)}}},"./node_modules/shifty/dist/shifty.js":t=>{self,t.exports=function(){"use strict";var t={720:function(t,e,n){n.r(e),n.d(e,{Scene:function(){return oe},Tweenable:function(){return _t},interpolate:function(){return ee},processTweens:function(){return yt},setBezierFunction:function(){return W},shouldScheduleUpdate:function(){return bt},tween:function(){return Pt},unsetBezierFunction:function(){return G}});var r={};n.r(r),n.d(r,{bounce:function(){return z},bouncePast:function(){return N},easeFrom:function(){return B},easeFromTo:function(){return I},easeInBack:function(){return E},easeInCirc:function(){return S},easeInCubic:function(){return l},easeInExpo:function(){return w},easeInOutBack:function(){return R},easeInOutCirc:function(){return P},easeInOutCubic:function(){return u},easeInOutExpo:function(){return M},easeInOutQuad:function(){return c},easeInOutQuart:function(){return f},easeInOutQuint:function(){return y},easeInOutSine:function(){return b},easeInQuad:function(){return a},easeInQuart:function(){return d},easeInQuint:function(){return g},easeInSine:function(){return x},easeOutBack:function(){return k},easeOutBounce:function(){return A},easeOutCirc:function(){return _},easeOutCubic:function(){return h},easeOutExpo:function(){return C},easeOutQuad:function(){return o},easeOutQuart:function(){return p},easeOutQuint:function(){return m},easeOutSine:function(){return v},easeTo:function(){return F},elastic:function(){return j},linear:function(){return s},swingFrom:function(){return T},swingFromTo:function(){return D},swingTo:function(){return L}});var i={};n.r(i),n.d(i,{afterTween:function(){return qt},beforeTween:function(){return $t},doesApply:function(){return Xt},tweenCreated:function(){return Yt}});var s=function(t){return t},a=function(t){return Math.pow(t,2)},o=function(t){return-(Math.pow(t-1,2)-1)},c=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},l=function(t){return Math.pow(t,3)},h=function(t){return Math.pow(t-1,3)+1},u=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},d=function(t){return Math.pow(t,4)},p=function(t){return-(Math.pow(t-1,4)-1)},f=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},g=function(t){return Math.pow(t,5)},m=function(t){return Math.pow(t-1,5)+1},y=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},x=function(t){return 1-Math.cos(t*(Math.PI/2))},v=function(t){return Math.sin(t*(Math.PI/2))},b=function(t){return-.5*(Math.cos(Math.PI*t)-1)},w=function(t){return 0===t?0:Math.pow(2,10*(t-1))},C=function(t){return 1===t?1:1-Math.pow(2,-10*t)},M=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},S=function(t){return-(Math.sqrt(1-t*t)-1)},_=function(t){return Math.sqrt(1-Math.pow(t-1,2))},P=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},A=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},E=function(t){var e=1.70158;return t*t*((e+1)*t-e)},k=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},R=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},j=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},D=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},T=function(t){var e=1.70158;return t*t*((e+1)*t-e)},L=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},z=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},N=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},I=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},B=function(t){return Math.pow(t,4)},F=function(t){return Math.pow(t,.25)};function V(t,e,n,r,i,s){var a,o,c,l=0,h=0,u=0,d=function(t){return((l*t+h)*t+u)*t},p=function(t){return(3*l*t+2*h)*t+u},f=function(t){return t>=0?t:0-t};return l=1-(u=3*e)-(h=3*(r-e)-u),a=1-(c=3*n)-(o=3*(i-n)-c),function(t){return((a*t+o)*t+c)*t}(function(t,e){var n,r,i,s,a,o;for(i=t,o=0;o<8;o++){if(s=d(i)-t,f(s)<e)return i;if(a=p(i),f(a)<1e-6)break;i-=s/a}if((i=t)<(n=0))return n;if(i>(r=1))return r;for(;n<r;){if(s=d(i),f(s-t)<e)return i;t>s?n=i:r=i,i=.5*(r-n)+n}return i}(t,function(t){return 1/(200*t)}(s)))}var O,H=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.25,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.25,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.75,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.75;return function(i){return V(i,t,e,n,r,1)}},W=function(t,e,n,r,i){var s=H(e,n,r,i);return s.displayName=t,s.x1=e,s.y1=n,s.x2=r,s.y2=i,_t.formulas[t]=s},G=function(t){return delete _t.formulas[t]};function U(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Y(t){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function $(t){return function(t){if(Array.isArray(t))return q(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return q(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?q(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function K(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Z(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?K(Object(n),!0).forEach((function(e){Q(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Q(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var J,tt,et,nt="linear",rt="undefined"!=typeof window?window:n.g,it="afterTween",st="afterTweenEnd",at="beforeTween",ot="tweenCreated",ct="function",lt="string",ht=rt.requestAnimationFrame||rt.webkitRequestAnimationFrame||rt.oRequestAnimationFrame||rt.msRequestAnimationFrame||rt.mozCancelRequestAnimationFrame&&rt.mozRequestAnimationFrame||setTimeout,ut=function(){},dt=null,pt=null,ft=Z({},r),gt=function(t,e,n,r,i,s,a){var o,c,l,h=t<s?0:(t-s)/i,u=!1;for(var d in a&&a.call&&(u=!0,o=a(h)),e)u||(o=((c=a[d]).call?c:ft[c])(h)),l=n[d],e[d]=l+(r[d]-l)*o;return e},mt=function(t,e){var n=t._timestamp,r=t._currentState,i=t._delay;if(!(e<n+i)){var s=t._duration,a=t._targetState,o=n+i+s,c=e>o?o:e;t._hasEnded=c>=o;var l=s-(o-c),h=t._filters.length>0;if(t._hasEnded)return t._render(a,t._data,l),t.stop(!0);h&&t._applyFilter(at),c<n+i?n=s=c=1:n+=i,gt(c,r,t._originalState,a,s,n,t._easing),h&&t._applyFilter(it),t._render(r,t._data,l)}},yt=function(){for(var t,e=_t.now(),n=dt;n;)t=n._next,mt(n,e),n=t},xt=Date.now||function(){return+new Date},vt=!1,bt=function(t){t&&vt||(vt=t,t&&wt())},wt=function t(){J=xt(),vt&&ht.call(rt,t,16.666666666666668),yt()},Ct=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nt,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Array.isArray(e))return H.apply(void 0,$(e));var r=Y(e);if(ft[e])return ft[e];if(r===lt||r===ct)for(var i in t)n[i]=e;else for(var s in t)n[s]=e[s]||nt;return n},Mt=function(t){t===dt?(dt=t._next)?dt._previous=null:pt=null:t===pt?(pt=t._previous)?pt._next=null:dt=null:(tt=t._previous,et=t._next,tt._next=et,et._previous=tt),t._previous=t._next=null},St="function"==typeof Promise?Promise:null;O=Symbol.toStringTag;var _t=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;U(this,t),Q(this,O,"Promise"),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=ut,this._render=ut,this._promiseCtor=St,n&&this.setConfig(n)}var e;return(e=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var n=this._filters[e-e][t];n&&n(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this._config;for(var r in e)n[r]=e[r];var i=n.promise,s=void 0===i?this._promiseCtor:i,a=n.start,o=void 0===a?ut:a,c=n.finish,l=n.render,h=void 0===l?this._config.step||ut:l,u=n.step,d=void 0===u?ut:u;this._data=n.data||n.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=o,this._render=h||d,this._duration=n.duration||500,this._promiseCtor=s,c&&(this._resolve=c);var p=e.from,f=e.to,g=void 0===f?{}:f,m=this._currentState,y=this._originalState,x=this._targetState;for(var v in p)m[v]=p[v];var b=!1;for(var w in m){var C=m[w];b||Y(C)!==lt||(b=!0),y[w]=C,x[w]=g.hasOwnProperty(w)?g[w]:C}if(this._easing=Ct(this._currentState,n.easing,this._easing),this._filters.length=0,b){for(var M in t.filters)t.filters[M].doesApply(this)&&this._filters.push(t.filters[M]);this._applyFilter(ot)}return this}},{key:"then",value:function(t,e){var n=this;return this._promise=new this._promiseCtor((function(t,e){n._resolve=t,n._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"finally",value:function(t){return this.then().finally(t)}},{key:"get",value:function(){return Z({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,Mt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===dt?(dt=this,pt=this):(this._previous=pt,pt._next=this,pt=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var n=t.now();return this._timestamp+e===0||(this._timestamp=n-e,mt(this,n)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,Mt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(at),gt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(it),this._applyFilter(st))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,n=this._data;return this._isPlaying?(this._reject&&this._reject({data:n,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"hasEnded",value:function(){return this._hasEnded}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=Z({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}])&&X(t.prototype,e),t}();function Pt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new _t;return e.tween(t),e.tweenable=e,e}Q(_t,"now",(function(){return J})),Q(_t,"setScheduleFunction",(function(t){return ht=t})),Q(_t,"filters",{}),Q(_t,"formulas",ft),bt(!0);var At,Et,kt=/(\d|-|\.)/,Rt=/([^\-0-9.]+)/g,jt=/[0-9.-]+/g,Dt=(At=jt.source,Et=/,\s*/.source,new RegExp("rgba?\\(".concat(At).concat(Et).concat(At).concat(Et).concat(At,"(").concat(Et).concat(At,")?\\)"),"g")),Tt=/^.*\(/,Lt=/#([0-9]|[a-f]){3,6}/gi,zt="VAL",Nt=function(t,e){return t.map((function(t,n){return"_".concat(e,"_").concat(n)}))};function It(t){return parseInt(t,16)}var Bt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[It(e.substr(0,2)),It(e.substr(2,2)),It(e.substr(4,2))]).join(","),")");var e},Ft=function(t,e,n){var r=e.match(t),i=e.replace(t,zt);return r&&r.forEach((function(t){return i=i.replace(zt,n(t))})),i},Vt=function(t){for(var e in t){var n=t[e];"string"==typeof n&&n.match(Lt)&&(t[e]=Ft(Lt,n,Bt))}},Ot=function(t){var e=t.match(jt),n=e.slice(0,3).map(Math.floor),r=t.match(Tt)[0];if(3===e.length)return"".concat(r).concat(n.join(","),")");if(4===e.length)return"".concat(r).concat(n.join(","),",").concat(e[3],")");throw new Error("Invalid rgbChunk: ".concat(t))},Ht=function(t){return t.match(jt)},Wt=function(t,e){var n={};return e.forEach((function(e){n[e]=t[e],delete t[e]})),n},Gt=function(t,e){return e.map((function(e){return t[e]}))},Ut=function(t,e){return e.forEach((function(e){return t=t.replace(zt,+e.toFixed(4))})),t},Xt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Yt(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Vt),t._tokenData=function(t){var e,n,r={};for(var i in t){var s=t[i];"string"==typeof s&&(r[i]={formatString:(e=s,n=void 0,n=e.match(Rt),n?(1===n.length||e.charAt(0).match(kt))&&n.unshift(""):n=["",""],n.join(zt)),chunkNames:Nt(Ht(s),i)})}return r}(e)}function $t(t){var e=t._currentState,n=t._originalState,r=t._targetState,i=t._easing,s=t._tokenData;!function(t,e){var n=function(n){var r=e[n].chunkNames,i=t[n];if("string"==typeof i){var s=i.split(" "),a=s[s.length-1];r.forEach((function(e,n){return t[e]=s[n]||a}))}else r.forEach((function(e){return t[e]=i}));delete t[n]};for(var r in e)n(r)}(i,s),[e,n,r].forEach((function(t){return function(t,e){var n=function(n){Ht(t[n]).forEach((function(r,i){return t[e[n].chunkNames[i]]=+r})),delete t[n]};for(var r in e)n(r)}(t,s)}))}function qt(t){var e=t._currentState,n=t._originalState,r=t._targetState,i=t._easing,s=t._tokenData;[e,n,r].forEach((function(t){return function(t,e){for(var n in e){var r=e[n],i=r.chunkNames,s=r.formatString,a=Ut(s,Gt(Wt(t,i),i));t[n]=Ft(Dt,a,Ot)}}(t,s)})),function(t,e){for(var n in e){var r=e[n].chunkNames,i=t[r[0]];t[n]="string"==typeof i?r.map((function(e){var n=t[e];return delete t[e],n})).join(" "):i}}(i,s)}function Kt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Zt(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kt(Object(n),!0).forEach((function(e){Qt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Qt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Jt=new _t,te=_t.filters,ee=function(t,e,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=Zt({},t),a=Ct(t,r);for(var o in Jt._filters.length=0,Jt.set({}),Jt._currentState=s,Jt._originalState=t,Jt._targetState=e,Jt._easing=a,te)te[o].doesApply(Jt)&&Jt._filters.push(te[o]);Jt._applyFilter("tweenCreated"),Jt._applyFilter("beforeTween");var c=gt(n,s,t,e,1,i,a);return Jt._applyFilter("afterTween"),c};function ne(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function re(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ie(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function se(t,e){var n=e.get(t);if(!n)throw new TypeError("attempted to get private field on non-instance");return n.get?n.get.call(t):n.value}var ae=new WeakMap,oe=function(){function t(){re(this,t),ae.set(this,{writable:!0,value:[]});for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];n.forEach(this.add.bind(this))}var e;return(e=[{key:"add",value:function(t){return se(this,ae).push(t),t}},{key:"remove",value:function(t){var e=se(this,ae).indexOf(t);return~e&&se(this,ae).splice(e,1),t}},{key:"empty",value:function(){return this.tweenables.map(this.remove.bind(this))}},{key:"isPlaying",value:function(){return se(this,ae).some((function(t){return t.isPlaying()}))}},{key:"play",value:function(){return se(this,ae).forEach((function(t){return t.tween()})),this}},{key:"pause",value:function(){return se(this,ae).forEach((function(t){return t.pause()})),this}},{key:"resume",value:function(){return se(this,ae).forEach((function(t){return t.resume()})),this}},{key:"stop",value:function(t){return se(this,ae).forEach((function(e){return e.stop(t)})),this}},{key:"tweenables",get:function(){return function(t){if(Array.isArray(t))return ne(t)}(t=se(this,ae))||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ne(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ne(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}();var t}},{key:"promises",get:function(){return se(this,ae).map((function(t){return t.then()}))}}])&&ie(t.prototype,e),t}();_t.filters.token=i}},e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}return n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(720)}()},"./node_modules/stackblur-canvas/dist/stackblur-es.js":(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.r(e),n.d(e,{BlurStack:()=>d,canvasRGB:()=>h,canvasRGBA:()=>c,image:()=>a,imageDataRGB:()=>u,imageDataRGBA:()=>l});var i=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],s=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function a(t,e,n,r,i,s){if("string"==typeof t&&(t=document.getElementById(t)),t&&("HTMLImageElement"!==Object.prototype.toString.call(t).slice(8,-1)||"naturalWidth"in t)){var a=i?"offset":"natural",o=t[a+"Width"],l=t[a+"Height"];if("ImageBitmap"===Object.prototype.toString.call(t).slice(8,-1)&&(o=t.width,l=t.height),"string"==typeof e&&(e=document.getElementById(e)),e&&"getContext"in e){s||(e.style.width=o+"px",e.style.height=l+"px"),e.width=o,e.height=l;var u=e.getContext("2d");u.clearRect(0,0,o,l),u.drawImage(t,0,0,t.naturalWidth,t.naturalHeight,0,0,o,l),isNaN(n)||n<1||(r?c(e,0,0,o,l,n):h(e,0,0,o,l,n))}}}function o(t,e,n,i,s){if("string"==typeof t&&(t=document.getElementById(t)),!t||"object"!==r(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var a=t.getContext("2d");try{return a.getImageData(e,n,i,s)}catch(t){throw new Error("unable to access image data: "+t)}}function c(t,e,n,r,i,s){if(!(isNaN(s)||s<1)){s|=0;var a=o(t,e,n,r,i);a=l(a,e,n,r,i,s),t.getContext("2d").putImageData(a,e,n)}}function l(t,e,n,r,a,o){for(var c,l=t.data,h=2*o+1,u=r-1,p=a-1,f=o+1,g=f*(f+1)/2,m=new d,y=m,x=1;x<h;x++)y=y.next=new d,x===f&&(c=y);y.next=m;for(var v=null,b=null,w=0,C=0,M=i[o],S=s[o],_=0;_<a;_++){y=m;for(var P=l[C],A=l[C+1],E=l[C+2],k=l[C+3],R=0;R<f;R++)y.r=P,y.g=A,y.b=E,y.a=k,y=y.next;for(var j=0,D=0,T=0,L=0,z=f*P,N=f*A,I=f*E,B=f*k,F=g*P,V=g*A,O=g*E,H=g*k,W=1;W<f;W++){var G=C+((u<W?u:W)<<2),U=l[G],X=l[G+1],Y=l[G+2],$=l[G+3],q=f-W;F+=(y.r=U)*q,V+=(y.g=X)*q,O+=(y.b=Y)*q,H+=(y.a=$)*q,j+=U,D+=X,T+=Y,L+=$,y=y.next}v=m,b=c;for(var K=0;K<r;K++){var Z=H*M>>>S;if(l[C+3]=Z,0!==Z){var Q=255/Z;l[C]=(F*M>>>S)*Q,l[C+1]=(V*M>>>S)*Q,l[C+2]=(O*M>>>S)*Q}else l[C]=l[C+1]=l[C+2]=0;F-=z,V-=N,O-=I,H-=B,z-=v.r,N-=v.g,I-=v.b,B-=v.a;var J=K+o+1;J=w+(J<u?J:u)<<2,F+=j+=v.r=l[J],V+=D+=v.g=l[J+1],O+=T+=v.b=l[J+2],H+=L+=v.a=l[J+3],v=v.next;var tt=b,et=tt.r,nt=tt.g,rt=tt.b,it=tt.a;z+=et,N+=nt,I+=rt,B+=it,j-=et,D-=nt,T-=rt,L-=it,b=b.next,C+=4}w+=r}for(var st=0;st<r;st++){var at=l[C=st<<2],ot=l[C+1],ct=l[C+2],lt=l[C+3],ht=f*at,ut=f*ot,dt=f*ct,pt=f*lt,ft=g*at,gt=g*ot,mt=g*ct,yt=g*lt;y=m;for(var xt=0;xt<f;xt++)y.r=at,y.g=ot,y.b=ct,y.a=lt,y=y.next;for(var vt=r,bt=0,wt=0,Ct=0,Mt=0,St=1;St<=o;St++){C=vt+st<<2;var _t=f-St;ft+=(y.r=at=l[C])*_t,gt+=(y.g=ot=l[C+1])*_t,mt+=(y.b=ct=l[C+2])*_t,yt+=(y.a=lt=l[C+3])*_t,Mt+=at,bt+=ot,wt+=ct,Ct+=lt,y=y.next,St<p&&(vt+=r)}C=st,v=m,b=c;for(var Pt=0;Pt<a;Pt++){var At=C<<2;l[At+3]=lt=yt*M>>>S,lt>0?(lt=255/lt,l[At]=(ft*M>>>S)*lt,l[At+1]=(gt*M>>>S)*lt,l[At+2]=(mt*M>>>S)*lt):l[At]=l[At+1]=l[At+2]=0,ft-=ht,gt-=ut,mt-=dt,yt-=pt,ht-=v.r,ut-=v.g,dt-=v.b,pt-=v.a,At=st+((At=Pt+f)<p?At:p)*r<<2,ft+=Mt+=v.r=l[At],gt+=bt+=v.g=l[At+1],mt+=wt+=v.b=l[At+2],yt+=Ct+=v.a=l[At+3],v=v.next,ht+=at=b.r,ut+=ot=b.g,dt+=ct=b.b,pt+=lt=b.a,Mt-=at,bt-=ot,wt-=ct,Ct-=lt,b=b.next,C+=r}}return t}function h(t,e,n,r,i,s){if(!(isNaN(s)||s<1)){s|=0;var a=o(t,e,n,r,i);a=u(a,e,n,r,i,s),t.getContext("2d").putImageData(a,e,n)}}function u(t,e,n,r,a,o){for(var c,l=t.data,h=2*o+1,u=r-1,p=a-1,f=o+1,g=f*(f+1)/2,m=new d,y=m,x=1;x<h;x++)y=y.next=new d,x===f&&(c=y);y.next=m;for(var v,b,w=null,C=null,M=i[o],S=s[o],_=0,P=0,A=0;A<a;A++){var E=l[P],k=l[P+1],R=l[P+2],j=f*E,D=f*k,T=f*R,L=g*E,z=g*k,N=g*R;y=m;for(var I=0;I<f;I++)y.r=E,y.g=k,y.b=R,y=y.next;for(var B=0,F=0,V=0,O=1;O<f;O++)v=P+((u<O?u:O)<<2),L+=(y.r=E=l[v])*(b=f-O),z+=(y.g=k=l[v+1])*b,N+=(y.b=R=l[v+2])*b,B+=E,F+=k,V+=R,y=y.next;w=m,C=c;for(var H=0;H<r;H++)l[P]=L*M>>>S,l[P+1]=z*M>>>S,l[P+2]=N*M>>>S,L-=j,z-=D,N-=T,j-=w.r,D-=w.g,T-=w.b,v=_+((v=H+o+1)<u?v:u)<<2,L+=B+=w.r=l[v],z+=F+=w.g=l[v+1],N+=V+=w.b=l[v+2],w=w.next,j+=E=C.r,D+=k=C.g,T+=R=C.b,B-=E,F-=k,V-=R,C=C.next,P+=4;_+=r}for(var W=0;W<r;W++){var G=l[P=W<<2],U=l[P+1],X=l[P+2],Y=f*G,$=f*U,q=f*X,K=g*G,Z=g*U,Q=g*X;y=m;for(var J=0;J<f;J++)y.r=G,y.g=U,y.b=X,y=y.next;for(var tt=0,et=0,nt=0,rt=1,it=r;rt<=o;rt++)P=it+W<<2,K+=(y.r=G=l[P])*(b=f-rt),Z+=(y.g=U=l[P+1])*b,Q+=(y.b=X=l[P+2])*b,tt+=G,et+=U,nt+=X,y=y.next,rt<p&&(it+=r);P=W,w=m,C=c;for(var st=0;st<a;st++)l[v=P<<2]=K*M>>>S,l[v+1]=Z*M>>>S,l[v+2]=Q*M>>>S,K-=Y,Z-=$,Q-=q,Y-=w.r,$-=w.g,q-=w.b,v=W+((v=st+f)<p?v:p)*r<<2,K+=tt+=w.r=l[v],Z+=et+=w.g=l[v+1],Q+=nt+=w.b=l[v+2],w=w.next,Y+=G=C.r,$+=U=C.g,q+=X=C.b,tt-=G,et-=U,nt-=X,C=C.next,P+=r}return t}var d=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}},"./src/css/contextmenu.css":(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>y});var r=n("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=n.n(r),s=n("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),a=n.n(s),o=n("./node_modules/style-loader/dist/runtime/insertBySelector.js"),c=n.n(o),l=n("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),h=n.n(l),u=n("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),d=n.n(u),p=n("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),f=n.n(p),g=n("./node_modules/css-loader/dist/cjs.js!./src/css/contextmenu.css"),m={};m.styleTagTransform=f(),m.setAttributes=h(),m.insert=c().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=d();i()(g.default,m);const y=g.default&&g.default.locals?g.default.locals:void 0},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},a=[],o=0;o<t.length;o++){var c=t[o],l=r.base?c[0]+r.base:c[0],h=s[l]||0,u="".concat(l," ").concat(h);s[l]=h+1;var d=n(u),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var f=i(p,r);r.byIndex=o,e.splice(o,0,{identifier:u,updater:f,references:1})}a.push(u)}return a}function i(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<s.length;a++){var o=n(s[a]);e[o].references--}for(var c=r(t,i),l=0;l<s.length;l++){var h=n(s[l]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=c}}},"./node_modules/style-loader/dist/runtime/insertBySelector.js":t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},"./node_modules/style-loader/dist/runtime/insertStyleElement.js":t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},"./node_modules/style-loader/dist/runtime/styleDomAPI.js":t=>{"use strict";t.exports=function(t){var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},"./node_modules/canvg/dist/index.cjs":(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/raf/index.js"),i=n("./node_modules/rgbcolor/index.js"),s=n("./node_modules/svg-pathdata/lib/SVGPathData.cjs"),a=n("./node_modules/stackblur-canvas/dist/stackblur-es.js");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=o(r),l=o(i);var h=Object.freeze({__proto__:null,offscreen:function(){let{DOMParser:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas:(t,e)=>new OffscreenCanvas(t,e),async createImage(t){const e=await fetch(t),n=await e.blob();return await createImageBitmap(n)}};return void 0===globalThis.DOMParser&&void 0!==t||Reflect.deleteProperty(e,"DOMParser"),e},node:function(t){let{DOMParser:e,canvas:n,fetch:r}=t;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:r,createCanvas:n.createCanvas,createImage:n.loadImage}}});function u(t){return t.replace(/(?!\u3000)\s+/gm," ")}function d(t){return t.replace(/^[\n \t]+/,"")}function p(t){return t.replace(/[\n \t]+$/,"")}function f(t){const e=t.match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm);return e?e.map(parseFloat):[]}function g(t){const e=f(t);return[e[0]||0,e[1]||0,e[2]||0,e[3]||0,e[4]||0,e[5]||0]}const m=/^[A-Z-]+$/;function y(t){return m.test(t)?t.toLowerCase():t}function x(t){const e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t);return e&&(e[2]||e[3]||e[4])||""}function v(t){if(!t.startsWith("rgb"))return t;let e=3;return t.replace(/\d+(\.\d+)?/g,((t,n)=>e--&&n?String(Math.round(parseFloat(t))):t))}const b=/(\[[^\]]+\])/g,w=/(#[^\s+>~.[:]+)/g,C=/(\.[^\s+>~.[:]+)/g,M=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,S=/(:[\w-]+\([^)]*\))/gi,_=/(:[^\s+>~.[:]+)/g,P=/([^\s+>~.[:]+)/g;function A(t,e){const n=e.exec(t);return n?[t.replace(e," "),n.length]:[t,0]}function E(t){const e=[0,0,0];let n=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0;return[n,r]=A(n,b),e[1]+=r,[n,r]=A(n,w),e[0]+=r,[n,r]=A(n,C),e[1]+=r,[n,r]=A(n,M),e[2]+=r,[n,r]=A(n,S),e[1]+=r,[n,r]=A(n,_),e[1]+=r,n=n.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[n,r]=A(n,P),e[2]+=r,e.join("")}const k=1e-8;function R(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function j(t,e){return(t[0]*e[0]+t[1]*e[1])/(R(t)*R(e))}function D(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(j(t,e))}function T(t){return t*t*t}function L(t){return 3*t*t*(1-t)}function z(t){return 3*t*(1-t)*(1-t)}function N(t){return(1-t)*(1-t)*(1-t)}function I(t){return t*t}function B(t){return 2*t*(1-t)}function F(t){return(1-t)*(1-t)}class V{static empty(t){return new V(t,"EMPTY","")}split(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ";const{document:e,name:n}=this;return u(this.getString()).trim().split(t).map((t=>new V(e,n,t)))}hasValue(t){const e=this.value;return null!==e&&""!==e&&(t||0!==e)&&void 0!==e}isString(t){const{value:e}=this,n="string"==typeof e;return n&&t?t.test(e):n}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;const t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return void 0===t||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);const{value:e}=this;let n=parseFloat(e);return this.isString(/%$/)&&(n/=100),n}getString(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t)}getColor(t){let e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=v(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;const[n,r]="boolean"==typeof t?[void 0,t]:[t],{viewPort:i}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(i.computeSize("x"),i.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(i.computeSize("x"),i.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*i.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*i.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&r:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*i.computeSize(n);default:{const t=this.getNumber();return e&&t<1?t*i.computeSize(n):t}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){const t=this.getString(),e=/#([^)'"]+)/.exec(t),n=(null==e?void 0:e[1])||t;return this.document.definitions[n]}getFillStyleDefinition(t,e){let n=this.getDefinition();if(!n)return null;if("function"==typeof n.createGradient&&"getBoundingBox"in t)return n.createGradient(this.document.ctx,t,e);if("function"==typeof n.createPattern){if(n.getHrefAttribute().hasValue()){const t=n.getAttribute("patternTransform");n=n.getHrefAttribute().getDefinition(),n&&t.hasValue()&&n.getAttribute("patternTransform",!0).setValue(t.value)}if(n)return n.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){if(!this.hasValue())return null;const t=this.getString();return V.textBaselineMapping[t]||null}addOpacity(t){let e=this.getColor();const n=e.length;let r=0;for(let t=0;t<n&&(","===e[t]&&r++,3!==r);t++);if(t.hasValue()&&this.isString()&&3!==r){const n=new l.default(e);n.ok&&(n.alpha=t.getNumber(),e=n.toRGBA())}return new V(this.document,this.name,e)}constructor(t,e,n){this.document=t,this.name=e,this.value=n,this.isNormalizedColor=!1}}V.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class O{clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getRoot(){const[t]=this.viewPorts;return t||H()}getCurrent(){const{viewPorts:t}=this,e=t[t.length-1];return e||H()}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return"number"==typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}constructor(){this.viewPorts=[]}}function H(){return{width:O.DEFAULT_VIEWPORT_WIDTH,height:O.DEFAULT_VIEWPORT_HEIGHT}}O.DEFAULT_VIEWPORT_WIDTH=800,O.DEFAULT_VIEWPORT_HEIGHT=600;class W{static parse(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const[n=e,r=e]=f(t);return new W(n,r)}static parseScale(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const[n=e,r=n]=f(t);return new W(n,r)}static parsePath(t){const e=f(t),n=e.length,r=[];for(let t=0;t<n;t+=2)r.push(new W(e[t],e[t+1]));return r}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){const{x:e,y:n}=this,r=e*t[0]+n*t[2]+t[4],i=e*t[1]+n*t[3]+t[5];this.x=r,this.y=i}constructor(t,e){this.x=t,this.y=e}}class G{isWorking(){return this.working}start(){if(this.working)return;const{screen:t,onClick:e,onMouseMove:n}=this,r=t.ctx.canvas;r.onclick=e,r.onmousemove=n,this.working=!0}stop(){if(!this.working)return;const t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(!this.working)return;const{screen:t,events:e,eventElements:n}=this,{style:r}=t.ctx.canvas;let i;r&&(r.cursor=""),e.forEach(((t,e)=>{let{run:r}=t;for(i=n[e];i;)r(i),i=i.parent})),this.events=[],this.eventElements=[]}checkPath(t,e){if(!this.working||!e)return;const{events:n,eventElements:r}=this;n.forEach(((n,i)=>{let{x:s,y:a}=n;!r[i]&&e.isPointInPath&&e.isPointInPath(s,a)&&(r[i]=t)}))}checkBoundingBox(t,e){if(!this.working||!e)return;const{events:n,eventElements:r}=this;n.forEach(((n,i)=>{let{x:s,y:a}=n;!r[i]&&e.isPointInBox(s,a)&&(r[i]=t)}))}mapXY(t,e){const{window:n,ctx:r}=this.screen,i=new W(t,e);let s=r.canvas;for(;s;)i.x-=s.offsetLeft,i.y-=s.offsetTop,s=s.offsetParent;return(null==n?void 0:n.scrollX)&&(i.x+=n.scrollX),(null==n?void 0:n.scrollY)&&(i.y+=n.scrollY),i}onClick(t){const{x:e,y:n}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:n,run(t){t.onClick&&t.onClick()}})}onMouseMove(t){const{x:e,y:n}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:n,run(t){t.onMouseMove&&t.onMouseMove()}})}constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}}const U="undefined"!=typeof window?window:null,X="undefined"!=typeof fetch?fetch.bind(void 0):void 0;class Y{wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;const t=this.waits.every((t=>t()));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){let{document:e,ctx:n,aspectRatio:r,width:i,desiredWidth:s,height:a,desiredHeight:o,minX:c=0,minY:l=0,refX:h,refY:d,clip:p=!1,clipX:f=0,clipY:g=0}=t;const m=u(r).replace(/^defer\s/,""),[y,x]=m.split(" "),v=y||"xMidYMid",b=x||"meet",w=i/s,C=a/o,M=Math.min(w,C),S=Math.max(w,C);let _=s,P=o;"meet"===b&&(_*=M,P*=M),"slice"===b&&(_*=S,P*=S);const A=new V(e,"refX",h),E=new V(e,"refY",d),k=A.hasValue()&&E.hasValue();if(k&&n.translate(-M*A.getPixels("x"),-M*E.getPixels("y")),p){const t=M*f,e=M*g;n.beginPath(),n.moveTo(t,e),n.lineTo(i,e),n.lineTo(i,a),n.lineTo(t,a),n.closePath(),n.clip()}if(!k){const t="meet"===b&&M===C,e="slice"===b&&S===C,r="meet"===b&&M===w,s="slice"===b&&S===w;v.startsWith("xMid")&&(t||e)&&n.translate(i/2-_/2,0),v.endsWith("YMid")&&(r||s)&&n.translate(0,a/2-P/2),v.startsWith("xMax")&&(t||e)&&n.translate(i-_,0),v.endsWith("YMax")&&(r||s)&&n.translate(0,a-P)}switch(!0){case"none"===v:n.scale(w,C);break;case"meet"===b:n.scale(M,M);break;case"slice"===b:n.scale(S,S)}n.translate(-c,-l)}start(t){let{enableRedraw:e=!1,ignoreMouse:n=!1,ignoreAnimation:r=!1,ignoreDimensions:i=!1,ignoreClear:s=!1,forceRedraw:a,scaleWidth:o,scaleHeight:l,offsetX:h,offsetY:u}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{mouse:d}=this,p=1e3/Y.FRAMERATE;if(this.isReadyLock=!1,this.frameDuration=p,this.readyPromise=new Promise((t=>{this.resolveReady=t})),this.isReady()&&this.render(t,i,s,o,l,h,u),!e)return;let f=Date.now(),g=f,m=0;const y=()=>{f=Date.now(),m=f-g,m>=p&&(g=f-m%p,this.shouldUpdate(r,a)&&(this.render(t,i,s,o,l,h,u),d.runEvents())),this.intervalId=c.default(y)};n||d.start(),this.intervalId=c.default(y)}stop(){this.intervalId&&(c.default.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){const{frameDuration:t}=this;if(this.animations.reduce(((e,n)=>n.update(t)||e),!1))return!0}return!("function"!=typeof e||!e())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}render(t,e,n,r,i,s,a){const{viewPort:o,ctx:c,isFirstRender:l}=this,h=c.canvas;o.clear(),h.width&&h.height&&o.setCurrent(h.width,h.height);const u=t.getStyle("width"),d=t.getStyle("height");!e&&(l||"number"!=typeof r&&"number"!=typeof i)&&(u.hasValue()&&(h.width=u.getPixels("x"),h.style&&(h.style.width="".concat(h.width,"px"))),d.hasValue()&&(h.height=d.getPixels("y"),h.style&&(h.style.height="".concat(h.height,"px"))));let p=h.clientWidth||h.width,g=h.clientHeight||h.height;if(e&&u.hasValue()&&d.hasValue()&&(p=u.getPixels("x"),g=d.getPixels("y")),o.setCurrent(p,g),"number"==typeof s&&t.getAttribute("x",!0).setValue(s),"number"==typeof a&&t.getAttribute("y",!0).setValue(a),"number"==typeof r||"number"==typeof i){const e=f(t.getAttribute("viewBox").getString());let n=0,s=0;if("number"==typeof r){const i=t.getStyle("width");i.hasValue()?n=i.getPixels("x")/r:e[2]&&!isNaN(e[2])&&(n=e[2]/r)}if("number"==typeof i){const n=t.getStyle("height");n.hasValue()?s=n.getPixels("y")/i:e[3]&&!isNaN(e[3])&&(s=e[3]/i)}n||(n=s),s||(s=n),t.getAttribute("width",!0).setValue(r),t.getAttribute("height",!0).setValue(i);const a=t.getStyle("transform",!0,!0);a.setValue("".concat(a.getString()," scale(").concat(1/n,", ").concat(1/s,")"))}n||c.clearRect(0,0,p,g),t.render(c),l&&(this.isFirstRender=!1)}constructor(t,{fetch:e=X,window:n=U}={}){if(this.ctx=t,this.viewPort=new O,this.mouse=new G(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=n,!e)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");this.fetch=e}}Y.defaultWindow=U,Y.defaultFetch=X,Y.FRAMERATE=30,Y.MAX_VIRTUAL_PIXELS=3e4;const{defaultFetch:$}=Y,q="undefined"!=typeof DOMParser?DOMParser:void 0;class K{async parse(t){return t.startsWith("<")?this.parseFromString(t):this.load(t)}parseFromString(t){const e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch(n){return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){const e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent||"Unknown parse error");return t}async load(t){const e=await this.fetch(t),n=await e.text();return this.parseFromString(n)}constructor({fetch:t=$,DOMParser:e=q}={}){if(!t)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");if(!e)throw new Error("Can't find 'DOMParser' in 'globalThis', please provide it via options");this.fetch=t,this.DOMParser=e}}class Z{apply(t){const{x:e,y:n}=this.point;t.translate(e||0,n||0)}unapply(t){const{x:e,y:n}=this.point;t.translate(-1*e||0,-1*n||0)}applyToPoint(t){const{x:e,y:n}=this.point;t.applyTransform([1,0,0,1,e||0,n||0])}constructor(t,e){this.type="translate",this.point=W.parse(e)}}class Q{apply(t){const{cx:e,cy:n,originX:r,originY:i,angle:s}=this,a=e+r.getPixels("x"),o=n+i.getPixels("y");t.translate(a,o),t.rotate(s.getRadians()),t.translate(-a,-o)}unapply(t){const{cx:e,cy:n,originX:r,originY:i,angle:s}=this,a=e+r.getPixels("x"),o=n+i.getPixels("y");t.translate(a,o),t.rotate(-1*s.getRadians()),t.translate(-a,-o)}applyToPoint(t){const{cx:e,cy:n,angle:r}=this,i=r.getRadians();t.applyTransform([1,0,0,1,e||0,n||0]),t.applyTransform([Math.cos(i),Math.sin(i),-Math.sin(i),Math.cos(i),0,0]),t.applyTransform([1,0,0,1,-e||0,-n||0])}constructor(t,e,n){this.type="rotate";const r=f(e);this.angle=new V(t,"angle",r[0]),this.originX=n[0],this.originY=n[1],this.cx=r[1]||0,this.cy=r[2]||0}}class J{apply(t){const{scale:{x:e,y:n},originX:r,originY:i}=this,s=r.getPixels("x"),a=i.getPixels("y");t.translate(s,a),t.scale(e,n||e),t.translate(-s,-a)}unapply(t){const{scale:{x:e,y:n},originX:r,originY:i}=this,s=r.getPixels("x"),a=i.getPixels("y");t.translate(s,a),t.scale(1/e,1/n||e),t.translate(-s,-a)}applyToPoint(t){const{x:e,y:n}=this.scale;t.applyTransform([e||0,0,0,n||0,0,0])}constructor(t,e,n){this.type="scale";const r=W.parseScale(e);0!==r.x&&0!==r.y||(r.x=k,r.y=k),this.scale=r,this.originX=n[0],this.originY=n[1]}}class tt{apply(t){const{originX:e,originY:n,matrix:r}=this,i=e.getPixels("x"),s=n.getPixels("y");t.translate(i,s),t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),t.translate(-i,-s)}unapply(t){const{originX:e,originY:n,matrix:r}=this,i=r[0],s=r[2],a=r[4],o=r[1],c=r[3],l=r[5],h=1/(i*(1*c-0*l)-s*(1*o-0*l)+a*(0*o-0*c)),u=e.getPixels("x"),d=n.getPixels("y");t.translate(u,d),t.transform(h*(1*c-0*l),h*(0*l-1*o),h*(0*a-1*s),h*(1*i-0*a),h*(s*l-a*c),h*(a*o-i*l)),t.translate(-u,-d)}applyToPoint(t){t.applyTransform(this.matrix)}constructor(t,e,n){this.type="matrix",this.matrix=g(e),this.originX=n[0],this.originY=n[1]}}class et extends tt{constructor(t,e,n){super(t,e,n),this.type="skew",this.angle=new V(t,"angle",e)}}class nt extends et{constructor(t,e,n){super(t,e,n),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class rt extends et{constructor(t,e,n){super(t,e,n),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}class it{static fromElement(t,e){const n=e.getStyle("transform",!1,!0);if(n.hasValue()){const[r,i=r]=e.getStyle("transform-origin",!1,!0).split();if(r&&i){const e=[r,i];return new it(t,n.getString(),e)}}return null}apply(t){this.transforms.forEach((e=>e.apply(t)))}unapply(t){this.transforms.forEach((e=>e.unapply(t)))}applyToPoint(t){this.transforms.forEach((e=>e.applyToPoint(t)))}constructor(t,e,n){this.document=t,this.transforms=[];u(e).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/).forEach((t=>{if("none"===t)return;const[e,r]=function(t){const[e="",n=""]=t.split("(");return[e.trim(),n.trim().replace(")","")]}(t),i=it.transformTypes[e];i&&this.transforms.push(new i(this.document,r,n))}))}}it.transformTypes={translate:Z,rotate:Q,scale:J,matrix:tt,skewX:nt,skewY:rt};class st{getAttribute(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.attributes[t];if(!n&&e){const e=new V(this.document,t,"");return this.attributes[t]=e,e}return n||V.empty(this.document)}getHrefAttribute(){let t;for(const e in this.attributes)if("href"===e||e.endsWith(":href")){t=this.attributes[e];break}return t||V.empty(this.document)}getStyle(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.styles[t];if(r)return r;const i=this.getAttribute(t);if(i.hasValue())return this.styles[t]=i,i;if(!n){const{parent:e}=this;if(e){const n=e.getStyle(t);if(n.hasValue())return n}}if(e){const e=new V(this.document,t,"");return this.styles[t]=e,e}return V.empty(this.document)}render(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){const e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){const e=this.getStyle("filter").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){const e=it.fromElement(this.document,this);e&&e.apply(t);const n=this.getStyle("clip-path",!1,!0);if(n.hasValue()){const e=n.getDefinition();e&&e.apply(t)}}clearContext(t){}renderChildren(t){this.children.forEach((e=>{e.render(t)}))}addChild(t){const e=t instanceof st?t:this.document.createElement(t);e.parent=this,st.ignoreChildTypes.includes(e.type)||this.children.push(e)}matchesSelector(t){var e;const{node:n}=this;if("function"==typeof n.matches)return n.matches(t);const r=null===(e=n.getAttribute)||void 0===e?void 0:e.call(n,"class");return!(!r||""===r)&&r.split(" ").some((e=>".".concat(e)===t))}addStylesFromStyleDefinition(){const{styles:t,stylesSpecificity:e}=this.document;let n;for(const r in t)if(!r.startsWith("@")&&this.matchesSelector(r)){const i=t[r],s=e[r];if(i)for(const t in i){let e=this.stylesSpecificity[t];void 0===e&&(e="000"),s&&s>=e&&(n=i[t],n&&(this.styles[t]=n),this.stylesSpecificity[t]=s)}}}removeStyles(t,e){return e.reduce(((e,n)=>{const r=t.getStyle(n);if(!r.hasValue())return e;const i=r.getString();return r.setValue(""),[...e,[n,i]]}),[])}restoreStyles(t,e){e.forEach((e=>{let[n,r]=e;t.getStyle(n,!0).setValue(r)}))}isFirstChild(){var t;return 0===(null===(t=this.parent)||void 0===t?void 0:t.children.indexOf(this))}constructor(t,e,n=!1){if(this.document=t,this.node=e,this.captureTextNodes=n,this.type="",this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!e||1!==e.nodeType)return;if(Array.from(e.attributes).forEach((e=>{const n=y(e.nodeName);this.attributes[n]=new V(t,n,e.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){this.getAttribute("style").getString().split(";").map((t=>t.trim())).forEach((e=>{if(!e)return;const[n,r]=e.split(":").map((t=>t.trim()));n&&(this.styles[n]=new V(t,n,r))}))}const{definitions:r}=t,i=this.getAttribute("id");i.hasValue()&&(r[i.getString()]||(r[i.getString()]=this)),Array.from(e.childNodes).forEach((e=>{if(1===e.nodeType)this.addChild(e);else if(n&&(3===e.nodeType||4===e.nodeType)){const n=t.createTextNode(e);n.getText().length>0&&this.addChild(n)}}))}}st.ignoreChildTypes=["title"];class at extends st{constructor(t,e,n){super(t,e,n)}}function ot(t){const e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function ct(t){if(!t)return"";const e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function lt(t){if(!t)return"";const e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class ht{static parse(){let t=arguments.length>1?arguments[1]:void 0,e="",n="",r="",i="",s="";const a=u(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().split(" "),o={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return a.forEach((t=>{switch(!0){case!o.fontStyle&&ht.styles.includes(t):"inherit"!==t&&(e=t),o.fontStyle=!0;break;case!o.fontVariant&&ht.variants.includes(t):"inherit"!==t&&(n=t),o.fontStyle=!0,o.fontVariant=!0;break;case!o.fontWeight&&ht.weights.includes(t):"inherit"!==t&&(r=t),o.fontStyle=!0,o.fontVariant=!0,o.fontWeight=!0;break;case!o.fontSize:"inherit"!==t&&(i=t.split("/")[0]||""),o.fontStyle=!0,o.fontVariant=!0,o.fontWeight=!0,o.fontSize=!0;break;default:"inherit"!==t&&(s+=t)}})),new ht(e,n,r,i,s,t)}toString(){return[ct(this.fontStyle),this.fontVariant,lt(this.fontWeight),this.fontSize,(t=this.fontFamily,"undefined"==typeof process?t:t.trim().split(",").map(ot).join(","))].join(" ").trim();var t}constructor(t,e,n,r,i,s){const a=s?"string"==typeof s?ht.parse(s):s:{};this.fontFamily=i||a.fontFamily,this.fontSize=r||a.fontSize,this.fontStyle=t||a.fontStyle,this.fontWeight=n||a.fontWeight,this.fontVariant=e||a.fontVariant}}ht.styles="normal|italic|oblique|inherit",ht.variants="normal|small-caps|inherit",ht.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class ut{get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(t,e){void 0!==t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),void 0!==e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}addX(t){this.addPoint(t,0)}addY(t){this.addPoint(0,t)}addBoundingBox(t){if(!t)return;const{x1:e,y1:n,x2:r,y2:i}=t;this.addPoint(e,n),this.addPoint(r,i)}sumCubic(t,e,n,r,i){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*n+3*(1-t)*Math.pow(t,2)*r+Math.pow(t,3)*i}bezierCurveAdd(t,e,n,r,i){const s=6*e-12*n+6*r,a=-3*e+9*n-9*r+3*i,o=3*n-3*e;if(0===a){if(0===s)return;const a=-o/s;return void(0<a&&a<1&&(t?this.addX(this.sumCubic(a,e,n,r,i)):this.addY(this.sumCubic(a,e,n,r,i))))}const c=Math.pow(s,2)-4*o*a;if(c<0)return;const l=(-s+Math.sqrt(c))/(2*a);0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,n,r,i)):this.addY(this.sumCubic(l,e,n,r,i)));const h=(-s-Math.sqrt(c))/(2*a);0<h&&h<1&&(t?this.addX(this.sumCubic(h,e,n,r,i)):this.addY(this.sumCubic(h,e,n,r,i)))}addBezierCurve(t,e,n,r,i,s,a,o){this.addPoint(t,e),this.addPoint(a,o),this.bezierCurveAdd(!0,t,n,i,a),this.bezierCurveAdd(!1,e,r,s,o)}addQuadraticCurve(t,e,n,r,i,s){const a=t+2/3*(n-t),o=e+2/3*(r-e),c=a+1/3*(i-t),l=o+1/3*(s-e);this.addBezierCurve(t,e,a,c,o,l,i,s)}isPointInBox(t,e){const{x1:n,y1:r,x2:i,y2:s}=this;return n<=t&&t<=i&&r<=e&&e<=s}constructor(t=Number.NaN,e=Number.NaN,n=Number.NaN,r=Number.NaN){this.x1=t,this.y1=e,this.x2=n,this.y2=r,this.addPoint(t,e),this.addPoint(n,r)}}class dt extends st{calculateOpacity(){let t=1,e=this;for(;e;){const n=e.getStyle("opacity",!1,!0);n.hasValue(!0)&&(t*=n.getNumber()),e=e.parent}return t}setContext(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e){const e=this.getStyle("fill"),n=this.getStyle("fill-opacity"),r=this.getStyle("stroke"),i=this.getStyle("stroke-opacity");if(e.isUrlDefinition()){const r=e.getFillStyleDefinition(this,n);r&&(t.fillStyle=r)}else if(e.hasValue()){"currentColor"===e.getString()&&e.setValue(this.getStyle("color").getColor());const n=e.getColor();"inherit"!==n&&(t.fillStyle="none"===n?"rgba(0,0,0,0)":n)}if(n.hasValue()){const e=new V(this.document,"fill",t.fillStyle).addOpacity(n).getColor();t.fillStyle=e}if(r.isUrlDefinition()){const e=r.getFillStyleDefinition(this,i);e&&(t.strokeStyle=e)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());const e=r.getString();"inherit"!==e&&(t.strokeStyle="none"===e?"rgba(0,0,0,0)":e)}if(i.hasValue()){const e=new V(this.document,"stroke",t.strokeStyle).addOpacity(i).getString();t.strokeStyle=e}const s=this.getStyle("stroke-width");if(s.hasValue()){const e=s.getPixels();t.lineWidth=e||k}const a=this.getStyle("stroke-linecap"),o=this.getStyle("stroke-linejoin"),c=this.getStyle("stroke-miterlimit"),l=this.getStyle("stroke-dasharray"),h=this.getStyle("stroke-dashoffset");if(a.hasValue()&&(t.lineCap=a.getString()),o.hasValue()&&(t.lineJoin=o.getString()),c.hasValue()&&(t.miterLimit=c.getNumber()),l.hasValue()&&"none"!==l.getString()){const e=f(l.getString());void 0!==t.setLineDash?t.setLineDash(e):void 0!==t.webkitLineDash?t.webkitLineDash=e:void 0===t.mozDash||1===e.length&&0===e[0]||(t.mozDash=e);const n=h.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=n:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=n:void 0!==t.mozDashOffset&&(t.mozDashOffset=n)}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){const e=this.getStyle("font"),n=this.getStyle("font-style"),r=this.getStyle("font-variant"),i=this.getStyle("font-weight"),s=this.getStyle("font-size"),a=this.getStyle("font-family"),o=new ht(n.getString(),r.getString(),i.getString(),s.hasValue()?"".concat(s.getPixels(!0),"px"):"",a.getString(),ht.parse(e.getString(),t.font));n.setValue(o.fontStyle),r.setValue(o.fontVariant),i.setValue(o.fontWeight),s.setValue(o.fontSize),a.setValue(o.fontFamily),t.font=o.toString(),s.isPixels()&&(this.document.emSize=s.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}constructor(...t){super(...t),this.modifiedEmSizeStack=!1}}class pt extends dt{setContext(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.setContext(t,e);const n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(t.textBaseline=n)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);let e=null;return this.children.forEach(((n,r)=>{const i=this.getChildBoundingBox(t,this,this,r);e?e.addBoundingBox(i):e=i})),e}getFontSize(){const{document:t,parent:e}=this,n=ht.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(n)}getTElementBoundingBox(t){const e=this.getFontSize();return new ut(this.x,this.y-e,this.x+this.measureText(t),this.y)}getGlyph(t,e,n){const r=e[n];let i;if(t.isArabic){var s;const a=e.length,o=e[n-1],c=e[n+1];let l="isolated";(0===n||" "===o)&&n<a-1&&" "!==c&&(l="terminal"),n>0&&" "!==o&&n<a-1&&" "!==c&&(l="medial"),n>0&&" "!==o&&(n===a-1||" "===c)&&(l="initial"),i=(null===(s=t.arabicGlyphs[r])||void 0===s?void 0:s[l])||t.glyphs[r]}else i=t.glyphs[r];return i||(i=t.missingGlyph),i}getText(){return""}getTextFromNode(t){const e=t||this.node,n=Array.from(e.parentNode.childNodes),r=n.indexOf(e),i=n.length-1;let s=u(e.textContent||"");return 0===r&&(s=d(s)),r===i&&(s=p(s)),s}renderChildren(t){if("text"!==this.type)return void this.renderTElementChildren(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach(((e,n)=>{this.renderChild(t,this,this,n)}));const{mouse:e}=this.document.screen;e.isWorking()&&e.checkBoundingBox(this,this.getBoundingBox(t))}renderTElementChildren(t){const{document:e,parent:n}=this,r=this.getText(),i=n.getStyle("font-family").getDefinition();if(i){const{unitsPerEm:s}=i.fontFace,a=ht.parse(e.ctx.font),o=n.getStyle("font-size").getNumber(a.fontSize),c=n.getStyle("font-style").getString(a.fontStyle),l=o/s,h=i.isRTL?r.split("").reverse().join(""):r,u=f(n.getAttribute("dx").getString()),d=h.length;for(let e=0;e<d;e++){const n=this.getGlyph(i,h,e);t.translate(this.x,this.y),t.scale(l,-l);const r=t.lineWidth;t.lineWidth=t.lineWidth*s/o,"italic"===c&&t.transform(1,0,.4,1,0,0),n.render(t),"italic"===c&&t.transform(1,0,-.4,1,0,0),t.lineWidth=r,t.scale(1/l,-1/l),t.translate(-this.x,-this.y),this.x+=o*(n.horizAdvX||i.horizAdvX)/s,void 0===u[e]||isNaN(u[e])||(this.x+=u[e])}return}const{x:s,y:a}=this;t.fillStyle&&t.fillText(r,s,a),t.strokeStyle&&t.strokeText(r,s,a)}applyAnchoring(){if(this.textChunkStart>=this.leafTexts.length)return;const t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start");let n=0;n="start"===e?t.x-this.minX:"end"===e?t.x-this.maxX:t.x-(this.minX+this.maxX)/2;for(let t=this.textChunkStart;t<this.leafTexts.length;t++)this.leafTexts[t].x+=n;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}adjustChildCoordinatesRecursive(t){this.children.forEach(((e,n)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,n)})),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,e,n,r){const i=n.children[r];i.children.length>0?i.children.forEach(((n,r)=>{e.adjustChildCoordinatesRecursiveCore(t,e,i,r)})):this.adjustChildCoordinates(t,e,n,r)}adjustChildCoordinates(t,e,n,r){const i=n.children[r];if("function"!=typeof i.measureText)return i;t.save(),i.setContext(t,!0);const s=i.getAttribute("x"),a=i.getAttribute("y"),o=i.getAttribute("dx"),c=i.getAttribute("dy"),l=i.getStyle("font-family").getDefinition(),h=Boolean(null==l?void 0:l.isRTL);0===r&&(s.hasValue()||s.setValue(i.getInheritedAttribute("x")),a.hasValue()||a.setValue(i.getInheritedAttribute("y")),o.hasValue()||o.setValue(i.getInheritedAttribute("dx")),c.hasValue()||c.setValue(i.getInheritedAttribute("dy")));const u=i.measureText(t);return h&&(e.x-=u),s.hasValue()?(e.applyAnchoring(),i.x=s.getPixels("x"),o.hasValue()&&(i.x+=o.getPixels("x"))):(o.hasValue()&&(e.x+=o.getPixels("x")),i.x=e.x),e.x=i.x,h||(e.x+=u),a.hasValue()?(i.y=a.getPixels("y"),c.hasValue()&&(i.y+=c.getPixels("y"))):(c.hasValue()&&(e.y+=c.getPixels("y")),i.y=e.y),e.y=i.y,e.leafTexts.push(i),e.minX=Math.min(e.minX,i.x,i.x+u),e.maxX=Math.max(e.maxX,i.x,i.x+u),i.clearContext(t),t.restore(),i}getChildBoundingBox(t,e,n,r){const i=n.children[r];if("function"!=typeof i.getBoundingBox)return null;const s=i.getBoundingBox(t);return s&&i.children.forEach(((n,r)=>{const a=e.getChildBoundingBox(t,e,i,r);s.addBoundingBox(a)})),s}renderChild(t,e,n,r){const i=n.children[r];i.render(t),i.children.forEach(((n,r)=>{e.renderChild(t,e,i,r)}))}measureText(t){const{measureCache:e}=this;if(~e)return e;const n=this.getText(),r=this.measureTargetText(t,n);return this.measureCache=r,r}measureTargetText(t,e){if(!e.length)return 0;const{parent:n}=this,r=n.getStyle("font-family").getDefinition();if(r){const t=this.getFontSize(),i=r.isRTL?e.split("").reverse().join(""):e,s=f(n.getAttribute("dx").getString()),a=i.length;let o=0;for(let e=0;e<a;e++){o+=(this.getGlyph(r,i,e).horizAdvX||r.horizAdvX)*t/r.fontFace.unitsPerEm,void 0===s[e]||isNaN(s[e])||(o+=s[e])}return o}if(!t.measureText)return 10*e.length;t.save(),this.setContext(t,!0);const{width:i}=t.measureText(e);return this.clearContext(t),t.restore(),i}getInheritedAttribute(t){let e=this;for(;e instanceof pt&&e.isFirstChild()&&e.parent;){const n=e.parent.getAttribute(t);if(n.hasValue(!0))return n.getString("0");e=e.parent}return null}constructor(t,e,n){super(t,e,new.target===pt||n),this.type="text",this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.measureCache=-1}}class ft extends pt{getText(){return this.text}constructor(t,e,n){super(t,e,new.target===ft||n),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}}class gt extends ft{constructor(...t){super(...t),this.type="textNode"}}class mt extends s.SVGPathData{reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new W(0,0),this.control=new W(0,0),this.current=new W(0,0),this.points=[],this.angles=[]}isEnd(){const{i:t,commands:e}=this;return t>=e.length-1}next(){const t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y";const n=new W(this.command[t],this.command[e]);return this.makeAbsolute(n)}getAsControlPoint(t,e){const n=this.getPoint(t,e);return this.control=n,n}getAsCurrentPoint(t,e){const n=this.getPoint(t,e);return this.current=n,n}getReflectedControlPoint(){const t=this.previousCommand.type;if(t!==s.SVGPathData.CURVE_TO&&t!==s.SVGPathData.SMOOTH_CURVE_TO&&t!==s.SVGPathData.QUAD_TO&&t!==s.SVGPathData.SMOOTH_QUAD_TO)return this.current;const{current:{x:e,y:n},control:{x:r,y:i}}=this;return new W(2*e-r,2*n-i)}makeAbsolute(t){if(this.command.relative){const{x:e,y:n}=this.current;t.x+=e,t.y+=n}return t}addMarker(t,e,n){const{points:r,angles:i}=this;n&&i.length>0&&!i[i.length-1]&&(i[i.length-1]=r[r.length-1].angleTo(n)),this.addMarkerAngle(t,e?e.angleTo(t):null)}addMarkerAngle(t,e){this.points.push(t),this.angles.push(e)}getMarkerPoints(){return this.points}getMarkerAngles(){const{angles:t}=this,e=t.length;for(let n=0;n<e;n++)if(!t[n])for(let r=n+1;r<e;r++)if(t[r]){t[n]=t[r];break}return t}constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=new W(0,0),this.start=new W(0,0),this.current=new W(0,0),this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}}class yt extends dt{path(t){const{pathParser:e}=this,n=new ut;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case mt.MOVE_TO:this.pathM(t,n);break;case mt.LINE_TO:this.pathL(t,n);break;case mt.HORIZ_LINE_TO:this.pathH(t,n);break;case mt.VERT_LINE_TO:this.pathV(t,n);break;case mt.CURVE_TO:this.pathC(t,n);break;case mt.SMOOTH_CURVE_TO:this.pathS(t,n);break;case mt.QUAD_TO:this.pathQ(t,n);break;case mt.SMOOTH_QUAD_TO:this.pathT(t,n);break;case mt.ARC:this.pathA(t,n);break;case mt.CLOSE_PATH:this.pathZ(t,n)}return n}getBoundingBox(t){return this.path()}getMarkers(){const{pathParser:t}=this,e=t.getMarkerPoints(),n=t.getMarkerAngles();return e.map(((t,e)=>[t,n[e]]))}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);const e=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==e.getString("inherit")?t.fill(e.getString()):t.fill()),""!==t.strokeStyle&&("non-scaling-stroke"===this.getAttribute("vector-effect").getString()?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());const n=this.getMarkers();if(n){const e=n.length-1,r=this.getStyle("marker-start"),i=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(r.isUrlDefinition()){const e=r.getDefinition(),[i,s]=n[0];e.render(t,i,s)}if(i.isUrlDefinition()){const r=i.getDefinition();for(let i=1;i<e;i++){const[e,s]=n[i];r.render(t,e,s)}}if(s.isUrlDefinition()){const r=s.getDefinition(),[i,a]=n[e];r.render(t,i,a)}}}static pathM(t){const e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}pathM(t,e){const{pathParser:n}=this,{point:r}=yt.pathM(n),{x:i,y:s}=r;n.addMarker(r),e.addPoint(i,s),t&&t.moveTo(i,s)}static pathL(t){const{current:e}=t;return{current:e,point:t.getAsCurrentPoint()}}pathL(t,e){const{pathParser:n}=this,{current:r,point:i}=yt.pathL(n),{x:s,y:a}=i;n.addMarker(i,r),e.addPoint(s,a),t&&t.lineTo(s,a)}static pathH(t){const{current:e,command:n}=t,r=new W((n.relative?e.x:0)+n.x,e.y);return t.current=r,{current:e,point:r}}pathH(t,e){const{pathParser:n}=this,{current:r,point:i}=yt.pathH(n),{x:s,y:a}=i;n.addMarker(i,r),e.addPoint(s,a),t&&t.lineTo(s,a)}static pathV(t){const{current:e,command:n}=t,r=new W(e.x,(n.relative?e.y:0)+n.y);return t.current=r,{current:e,point:r}}pathV(t,e){const{pathParser:n}=this,{current:r,point:i}=yt.pathV(n),{x:s,y:a}=i;n.addMarker(i,r),e.addPoint(s,a),t&&t.lineTo(s,a)}static pathC(t){const{current:e}=t;return{current:e,point:t.getPoint("x1","y1"),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}pathC(t,e){const{pathParser:n}=this,{current:r,point:i,controlPoint:s,currentPoint:a}=yt.pathC(n);n.addMarker(a,s,i),e.addBezierCurve(r.x,r.y,i.x,i.y,s.x,s.y,a.x,a.y),t&&t.bezierCurveTo(i.x,i.y,s.x,s.y,a.x,a.y)}static pathS(t){const{current:e}=t;return{current:e,point:t.getReflectedControlPoint(),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}pathS(t,e){const{pathParser:n}=this,{current:r,point:i,controlPoint:s,currentPoint:a}=yt.pathS(n);n.addMarker(a,s,i),e.addBezierCurve(r.x,r.y,i.x,i.y,s.x,s.y,a.x,a.y),t&&t.bezierCurveTo(i.x,i.y,s.x,s.y,a.x,a.y)}static pathQ(t){const{current:e}=t;return{current:e,controlPoint:t.getAsControlPoint("x1","y1"),currentPoint:t.getAsCurrentPoint()}}pathQ(t,e){const{pathParser:n}=this,{current:r,controlPoint:i,currentPoint:s}=yt.pathQ(n);n.addMarker(s,i,i),e.addQuadraticCurve(r.x,r.y,i.x,i.y,s.x,s.y),t&&t.quadraticCurveTo(i.x,i.y,s.x,s.y)}static pathT(t){const{current:e}=t,n=t.getReflectedControlPoint();t.control=n;return{current:e,controlPoint:n,currentPoint:t.getAsCurrentPoint()}}pathT(t,e){const{pathParser:n}=this,{current:r,controlPoint:i,currentPoint:s}=yt.pathT(n);n.addMarker(s,i,i),e.addQuadraticCurve(r.x,r.y,i.x,i.y,s.x,s.y),t&&t.quadraticCurveTo(i.x,i.y,s.x,s.y)}static pathA(t){const{current:e,command:n}=t;let{rX:r,rY:i,xRot:s,lArcFlag:a,sweepFlag:o}=n;const c=s*(Math.PI/180),l=t.getAsCurrentPoint(),h=new W(Math.cos(c)*(e.x-l.x)/2+Math.sin(c)*(e.y-l.y)/2,-Math.sin(c)*(e.x-l.x)/2+Math.cos(c)*(e.y-l.y)/2),u=Math.pow(h.x,2)/Math.pow(r,2)+Math.pow(h.y,2)/Math.pow(i,2);u>1&&(r*=Math.sqrt(u),i*=Math.sqrt(u));let d=(a===o?-1:1)*Math.sqrt((Math.pow(r,2)*Math.pow(i,2)-Math.pow(r,2)*Math.pow(h.y,2)-Math.pow(i,2)*Math.pow(h.x,2))/(Math.pow(r,2)*Math.pow(h.y,2)+Math.pow(i,2)*Math.pow(h.x,2)));isNaN(d)&&(d=0);const p=new W(d*r*h.y/i,d*-i*h.x/r),f=new W((e.x+l.x)/2+Math.cos(c)*p.x-Math.sin(c)*p.y,(e.y+l.y)/2+Math.sin(c)*p.x+Math.cos(c)*p.y),g=D([1,0],[(h.x-p.x)/r,(h.y-p.y)/i]),m=[(h.x-p.x)/r,(h.y-p.y)/i],y=[(-h.x-p.x)/r,(-h.y-p.y)/i];let x=D(m,y);return j(m,y)<=-1&&(x=Math.PI),j(m,y)>=1&&(x=0),{currentPoint:l,rX:r,rY:i,sweepFlag:o,xAxisRotation:c,centp:f,a1:g,ad:x}}pathA(t,e){const{pathParser:n}=this,{currentPoint:r,rX:i,rY:s,sweepFlag:a,xAxisRotation:o,centp:c,a1:l,ad:h}=yt.pathA(n),u=1-a?1:-1,d=l+u*(h/2),p=new W(c.x+i*Math.cos(d),c.y+s*Math.sin(d));if(n.addMarkerAngle(p,d-u*Math.PI/2),n.addMarkerAngle(r,d-u*Math.PI),e.addPoint(r.x,r.y),t&&!isNaN(l)&&!isNaN(h)){const e=i>s?i:s,n=i>s?1:i/s,r=i>s?s/i:1;t.translate(c.x,c.y),t.rotate(o),t.scale(n,r),t.arc(0,0,e,l,l+h,Boolean(1-a)),t.scale(1/n,1/r),t.rotate(-o),t.translate(-c.x,-c.y)}}static pathZ(t){t.current=t.start}pathZ(t,e){yt.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}constructor(t,e,n){super(t,e,n),this.type="path",this.pathParser=new mt(this.getAttribute("d").getString())}}class xt extends dt{setContext(t){var e;const{document:n}=this,{screen:r,window:i}=n,s=t.canvas;if(r.setDefaults(t),"style"in s&&void 0!==t.font&&i&&void 0!==i.getComputedStyle){t.font=i.getComputedStyle(s).getPropertyValue("font");const e=new V(n,"fontSize",ht.parse(t.font).fontSize);e.hasValue()&&(n.rootEmSize=e.getPixels("y"),n.emSize=n.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);let{width:a,height:o}=r.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");const c=this.getAttribute("refX"),l=this.getAttribute("refY"),h=this.getAttribute("viewBox"),u=h.hasValue()?f(h.getString()):null,d=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden");let p=0,g=0,m=0,y=0;u&&(p=u[0],g=u[1]),this.root||(a=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y"),"marker"===this.type&&(m=p,y=g,p=0,g=0)),r.viewPort.setCurrent(a,o),!this.node||this.parent&&"foreignObject"!==(null===(e=this.node.parentNode)||void 0===e?void 0:e.nodeName)||!this.getStyle("transform",!1,!0).hasValue()||this.getStyle("transform-origin",!1,!0).hasValue()||this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),u&&(a=u[2],o=u[3]),n.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:r.viewPort.width,desiredWidth:a,height:r.viewPort.height,desiredHeight:o,minX:p,minY:g,refX:c.getValue(),refY:l.getValue(),clip:d,clipX:m,clipY:y}),u&&(r.viewPort.removeCurrent(),r.viewPort.setCurrent(a,o))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.getAttribute("width",!0),i=this.getAttribute("height",!0),s=this.getAttribute("viewBox"),a=this.getAttribute("style"),o=r.getNumber(0),c=i.getNumber(0);if(n)if("string"==typeof n)this.getAttribute("preserveAspectRatio",!0).setValue(n);else{const t=this.getAttribute("preserveAspectRatio");t.hasValue()&&t.setValue(t.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(r.setValue(t),i.setValue(e),s.hasValue()||s.setValue("0 0 ".concat(o||t," ").concat(c||e)),a.hasValue()){const n=this.getStyle("width"),r=this.getStyle("height");n.hasValue()&&n.setValue("".concat(t,"px")),r.hasValue()&&r.setValue("".concat(e,"px"))}}constructor(...t){super(...t),this.type="svg",this.root=!1}}class vt extends yt{path(t){const e=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),r=this.getStyle("width",!1,!0).getPixels("x"),i=this.getStyle("height",!1,!0).getPixels("y"),s=this.getAttribute("rx"),a=this.getAttribute("ry");let o=s.getPixels("x"),c=a.getPixels("y");if(s.hasValue()&&!a.hasValue()&&(c=o),a.hasValue()&&!s.hasValue()&&(o=c),o=Math.min(o,r/2),c=Math.min(c,i/2),t){const s=(Math.sqrt(2)-1)/3*4;t.beginPath(),i>0&&r>0&&(t.moveTo(e+o,n),t.lineTo(e+r-o,n),t.bezierCurveTo(e+r-o+s*o,n,e+r,n+c-s*c,e+r,n+c),t.lineTo(e+r,n+i-c),t.bezierCurveTo(e+r,n+i-c+s*c,e+r-o+s*o,n+i,e+r-o,n+i),t.lineTo(e+o,n+i),t.bezierCurveTo(e+o-s*o,n+i,e,n+i-c+s*c,e,n+i-c),t.lineTo(e,n+c),t.bezierCurveTo(e,n+c-s*c,e+o-s*o,n,e+o,n),t.closePath())}return new ut(e,n,e+r,n+i)}getMarkers(){return null}constructor(...t){super(...t),this.type="rect"}}class bt extends yt{path(t){const e=this.getAttribute("cx").getPixels("x"),n=this.getAttribute("cy").getPixels("y"),r=this.getAttribute("r").getPixels();return t&&r>0&&(t.beginPath(),t.arc(e,n,r,0,2*Math.PI,!1),t.closePath()),new ut(e-r,n-r,e+r,n+r)}getMarkers(){return null}constructor(...t){super(...t),this.type="circle"}}class wt extends yt{path(t){const e=(Math.sqrt(2)-1)/3*4,n=this.getAttribute("rx").getPixels("x"),r=this.getAttribute("ry").getPixels("y"),i=this.getAttribute("cx").getPixels("x"),s=this.getAttribute("cy").getPixels("y");return t&&n>0&&r>0&&(t.beginPath(),t.moveTo(i+n,s),t.bezierCurveTo(i+n,s+e*r,i+e*n,s+r,i,s+r),t.bezierCurveTo(i-e*n,s+r,i-n,s+e*r,i-n,s),t.bezierCurveTo(i-n,s-e*r,i-e*n,s-r,i,s-r),t.bezierCurveTo(i+e*n,s-r,i+n,s-e*r,i+n,s),t.closePath()),new ut(i-n,s-r,i+n,s+r)}getMarkers(){return null}constructor(...t){super(...t),this.type="ellipse"}}class Ct extends yt{getPoints(){return[new W(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new W(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){const[{x:e,y:n},{x:r,y:i}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(e,n),t.lineTo(r,i)),new ut(e,n,r,i)}getMarkers(){const[t,e]=this.getPoints(),n=t.angleTo(e);return[[t,n],[e,n]]}constructor(...t){super(...t),this.type="line"}}class Mt extends yt{path(t){const{points:e}=this,[{x:n,y:r}]=e,i=new ut(n,r);return t&&(t.beginPath(),t.moveTo(n,r)),e.forEach((e=>{let{x:n,y:r}=e;i.addPoint(n,r),t&&t.lineTo(n,r)})),i}getMarkers(){const{points:t}=this,e=t.length-1,n=[];return t.forEach(((r,i)=>{i!==e&&n.push([r,r.angleTo(t[i+1])])})),n.length>0&&n.push([t[t.length-1],n[n.length-1][1]]),n}constructor(t,e,n){super(t,e,n),this.type="polyline",this.points=[],this.points=W.parsePath(this.getAttribute("points").getString())}}class St extends Mt{path(t){const e=super.path(t),[{x:n,y:r}]=this.points;return t&&(t.lineTo(n,r),t.closePath()),e}constructor(...t){super(...t),this.type="polygon"}}class _t extends st{createPattern(t,e,n){const r=this.getStyle("width").getPixels("x",!0),i=this.getStyle("height").getPixels("y",!0),s=new xt(this.document,null);s.attributes.viewBox=new V(this.document,"viewBox",this.getAttribute("viewBox").getValue()),s.attributes.width=new V(this.document,"width","".concat(r,"px")),s.attributes.height=new V(this.document,"height","".concat(i,"px")),s.attributes.transform=new V(this.document,"transform",this.getAttribute("patternTransform").getValue()),s.children=this.children;const a=this.document.createCanvas(r,i),o=a.getContext("2d"),c=this.getAttribute("x"),l=this.getAttribute("y");c.hasValue()&&l.hasValue()&&o.translate(c.getPixels("x",!0),l.getPixels("y",!0)),n.hasValue()?this.styles["fill-opacity"]=n:Reflect.deleteProperty(this.styles,"fill-opacity");for(let t=-1;t<=1;t++)for(let e=-1;e<=1;e++)o.save(),s.attributes.x=new V(this.document,"x",t*a.width),s.attributes.y=new V(this.document,"y",e*a.height),s.render(o),o.restore();return t.createPattern(a,"repeat")}constructor(...t){super(...t),this.type="pattern"}}class Pt extends st{render(t,e,n){if(!e)return;const{x:r,y:i}=e,s=this.getAttribute("orient").getString("auto"),a=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(r,i),"auto"===s&&t.rotate(n),"strokeWidth"===a&&t.scale(t.lineWidth,t.lineWidth),t.save();const o=new xt(this.document);o.type=this.type,o.attributes.viewBox=new V(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new V(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new V(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new V(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new V(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new V(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new V(this.document,"fill",this.getAttribute("fill").getColor("black")),o.attributes.stroke=new V(this.document,"stroke",this.getAttribute("stroke").getValue("none")),o.children=this.children,o.render(t),t.restore(),"strokeWidth"===a&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===s&&t.rotate(-n),t.translate(-r,-i)}constructor(...t){super(...t),this.type="marker"}}class At extends st{render(){}constructor(...t){super(...t),this.type="defs"}}class Et extends dt{getBoundingBox(t){const e=new ut;return this.children.forEach((n=>{e.addBoundingBox(n.getBoundingBox(t))})),e}constructor(...t){super(...t),this.type="g"}}class kt extends st{getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,e,n){let r=this;this.getHrefAttribute().hasValue()&&(r=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(r));const{stops:i}=r,s=this.getGradient(t,e);if(!s)return this.addParentOpacity(n,i[i.length-1].color);if(i.forEach((t=>{s.addColorStop(t.offset,this.addParentOpacity(n,t.color))})),this.getAttribute("gradientTransform").hasValue()){const{document:t}=this,{MAX_VIRTUAL_PIXELS:e}=Y,{viewPort:n}=t.screen,r=n.getRoot(),i=new vt(t);i.attributes.x=new V(t,"x",-e/3),i.attributes.y=new V(t,"y",-e/3),i.attributes.width=new V(t,"width",e),i.attributes.height=new V(t,"height",e);const a=new Et(t);a.attributes.transform=new V(t,"transform",this.getAttribute("gradientTransform").getValue()),a.children=[i];const o=new xt(t);o.attributes.x=new V(t,"x",0),o.attributes.y=new V(t,"y",0),o.attributes.width=new V(t,"width",r.width),o.attributes.height=new V(t,"height",r.height),o.children=[a];const c=t.createCanvas(r.width,r.height),l=c.getContext("2d");return l.fillStyle=s,o.render(l),l.createPattern(c,"no-repeat")}return s}inheritStopContainer(t){this.attributesToInherit.forEach((e=>{!this.getAttribute(e).hasValue()&&t.getAttribute(e).hasValue()&&this.getAttribute(e,!0).setValue(t.getAttribute(e).getValue())}))}addParentOpacity(t,e){if(t.hasValue()){return new V(this.document,"color",e).addOpacity(t).getColor()}return e}constructor(t,e,n){super(t,e,n),this.attributesToInherit=["gradientUnits"],this.stops=[];const{stops:r,children:i}=this;i.forEach((t=>{"stop"===t.type&&r.push(t)}))}}class Rt extends kt{getGradient(t,e){const n="objectBoundingBox"===this.getGradientUnits(),r=n?e.getBoundingBox(t):null;if(n&&!r)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));const i=n?r.x+r.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),s=n?r.y+r.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),a=n?r.x+r.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=n?r.y+r.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return i===a&&s===o?null:t.createLinearGradient(i,s,a,o)}constructor(t,e,n){super(t,e,n),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}}class jt extends kt{getGradient(t,e){const n="objectBoundingBox"===this.getGradientUnits(),r=e.getBoundingBox(t);if(n&&!r)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");const i=n?r.x+r.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),s=n?r.y+r.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y");let a=i,o=s;this.getAttribute("fx").hasValue()&&(a=n?r.x+r.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=n?r.y+r.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));const c=n?(r.width+r.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),l=this.getAttribute("fr").getPixels();return t.createRadialGradient(a,o,l,i,s,c)}constructor(t,e,n){super(t,e,n),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}}class Dt extends st{constructor(t,e,n){super(t,e,n),this.type="stop";const r=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),i=this.getStyle("stop-opacity");let s=this.getStyle("stop-color",!0);""===s.getString()&&s.setValue("#000"),i.hasValue()&&(s=s.addOpacity(i)),this.offset=r,this.color=s.getColor()}}class Tt extends st{getProperty(){const t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}calcValue(){const{initialUnits:t}=this,{progress:e,from:n,to:r}=this.getProgress();let i=n.getNumber()+(r.getNumber()-n.getNumber())*e;return"%"===t&&(i*=100),"".concat(i).concat(t)}update(t){const{parent:e}=this,n=this.getProperty();if(this.initialValue||(this.initialValue=n.getString(),this.initialUnits=n.getUnits()),this.duration>this.maxDuration){const t=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==t||this.frozen){if("remove"===t&&!this.removed)return this.removed=!0,e&&n&&n.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,e&&n&&(e.animationFrozen=!0,e.animationFrozenValue=n.getString());return!1}this.duration+=t;let r=!1;if(this.begin<this.duration){let t=this.calcValue();const e=this.getAttribute("type");if(e.hasValue()){const n=e.getString();t="".concat(n,"(").concat(t,")")}n.setValue(t),r=!0}return r}getProgress(){const{document:t,values:e}=this;let n,r,i=(this.duration-this.begin)/(this.maxDuration-this.begin);if(e.hasValue()){const s=i*(e.getValue().length-1),a=Math.floor(s),o=Math.ceil(s);let c;c=e.getValue()[a],n=new V(t,"from",c?parseFloat(c):0),c=e.getValue()[o],r=new V(t,"to",c?parseFloat(c):0),i=(s-a)/(o-a)}else n=this.from,r=this.to;return{progress:i,from:n,to:r}}constructor(t,e,n){super(t,e,n),this.type="animate",this.duration=0,this.initialUnits="",this.removed=!1,this.frozen=!1,t.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new V(t,"values",null);const r=this.getAttribute("values");r.hasValue()&&this.values.setValue(r.getString().split(";"))}}class Lt extends Tt{calcValue(){const{progress:t,from:e,to:n}=this.getProgress(),r=new l.default(e.getColor()),i=new l.default(n.getColor());if(r.ok&&i.ok){const e=r.r+(i.r-r.r)*t,n=r.g+(i.g-r.g)*t,s=r.b+(i.b-r.b)*t;return"rgb(".concat(Math.floor(e),", ").concat(Math.floor(n),", ").concat(Math.floor(s),")")}return this.getAttribute("from").getColor()}constructor(...t){super(...t),this.type="animateColor"}}class zt extends Tt{calcValue(){const{progress:t,from:e,to:n}=this.getProgress(),r=f(e.getString()),i=f(n.getString());return r.map(((e,n)=>e+(i[n]-e)*t)).join(" ")}constructor(...t){super(...t),this.type="animateTransform"}}class Nt extends st{constructor(t,e,n){super(t,e,n),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class It extends yt{constructor(t,e,n){super(t,e,n),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class Bt extends It{constructor(...t){super(...t),this.type="missing-glyph",this.horizAdvX=0}}class Ft extends st{render(){}constructor(t,e,n){super(t,e,n),this.type="font",this.isArabic=!1,this.glyphs={},this.arabicGlyphs={},this.isRTL=!1,this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();const{definitions:r}=t,{children:i}=this;for(const t of i)if(t instanceof Nt){this.fontFace=t;const e=t.getStyle("font-family");e.hasValue()&&(r[e.getString()]=this)}else if(t instanceof Bt)this.missingGlyph=t;else if(t instanceof It)if(t.arabicForm){this.isRTL=!0,this.isArabic=!0;const e=this.arabicGlyphs[t.unicode];void 0===e?this.arabicGlyphs[t.unicode]={[t.arabicForm]:t}:e[t.arabicForm]=t}else this.glyphs[t.unicode]=t}}class Vt extends pt{getText(){const t=this.getHrefAttribute().getDefinition();if(t){const e=t.children[0];if(e)return e.getText()}return""}constructor(...t){super(...t),this.type="tref"}}class Ot extends pt{getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);const{document:e,x:n,y:r}=this,{mouse:i}=e.screen,s=new V(e,"fontSize",ht.parse(e.ctx.font).fontSize);i.isWorking()&&i.checkBoundingBox(this,new ut(n,r-s.getPixels("y"),n+this.measureText(t),r))}else if(this.children.length>0){const e=new Et(this.document);e.children=this.children,e.parent=this,e.render(t)}}onClick(){const{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){this.document.ctx.canvas.style.cursor="pointer"}constructor(t,e,n){super(t,e,n),this.type="a";const{childNodes:r}=e,i=r[0],s=r.length>0&&Array.from(r).every((t=>3===t.nodeType));this.hasText=s,this.text=s?this.getTextFromNode(i):""}}class Ht extends pt{getText(){return this.text}path(t){const{dataArray:e}=this;t&&t.beginPath(),e.forEach((e=>{let{type:n,points:r}=e;switch(n){case mt.LINE_TO:t&&t.lineTo(r[0],r[1]);break;case mt.MOVE_TO:t&&t.moveTo(r[0],r[1]);break;case mt.CURVE_TO:t&&t.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);break;case mt.QUAD_TO:t&&t.quadraticCurveTo(r[0],r[1],r[2],r[3]);break;case mt.ARC:{const[e,n,i,s,a,o,c,l]=r,h=i>s?i:s,u=i>s?1:i/s,d=i>s?s/i:1;t&&(t.translate(e,n),t.rotate(c),t.scale(u,d),t.arc(0,0,h,a,a+o,Boolean(1-l)),t.scale(1/u,1/d),t.rotate(-c),t.translate(-e,-n));break}case mt.CLOSE_PATH:t&&t.closePath()}}))}renderChildren(t){this.setTextData(t),t.save();const e=this.parent.getStyle("text-decoration").getString(),n=this.getFontSize(),{glyphInfo:r}=this,i=t.fillStyle;"underline"===e&&t.beginPath(),r.forEach(((r,i)=>{const{p0:s,p1:a,rotation:o,text:c}=r;t.save(),t.translate(s.x,s.y),t.rotate(o),t.fillStyle&&t.fillText(c,0,0),t.strokeStyle&&t.strokeText(c,0,0),t.restore(),"underline"===e&&(0===i&&t.moveTo(s.x,s.y+n/8),t.lineTo(a.x,a.y+n/5))})),"underline"===e&&(t.lineWidth=n/20,t.strokeStyle=i,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[t]||0}findSegmentToFitChar(t,e,n,r,i,s,a,o,c){let l=s,h=this.measureText(t,o);" "===o&&"justify"===e&&n<r&&(h+=(r-n)/i),c>-1&&(l+=this.getLetterSpacingAt(c));const u=this.textHeight/20,d=this.getEquidistantPointOnPath(l,u,0),p=this.getEquidistantPointOnPath(l+h,u,0),f={p0:d,p1:p},g=d&&p?Math.atan2(p.y-d.y,p.x-d.x):0;if(a){const t=Math.cos(Math.PI/2+g)*a,e=Math.cos(-g)*a;f.p0={...d,x:d.x+t,y:d.y+e},f.p1={...p,x:p.x+t,y:p.y+e}}return l+=h,{offset:l,segment:f,rotation:g}}measureText(t,e){const{measuresCache:n}=this,r=e||this.getText();if(n.has(r))return n.get(r);const i=this.measureTargetText(t,r);return n.set(r,i),i}setTextData(t){if(this.glyphInfo)return;const e=this.getText(),n=e.split(""),r=e.split(" ").length-1,i=this.parent.getAttribute("dx").split().map((t=>t.getPixels("x"))),s=this.parent.getAttribute("dy").getPixels("y"),a=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),c=this.parent.getStyle("letter-spacing");let l=0;o.hasValue()&&"inherit"!==o.getValue()?o.hasValue()&&"initial"!==o.getValue()&&"unset"!==o.getValue()&&(l=o.getPixels()):l=c.getPixels();const h=[],u=e.length;this.letterSpacingCache=h;for(let t=0;t<u;t++)h.push(void 0!==i[t]?i[t]:l);const d=h.reduce(((t,e,n)=>0===n?0:t+e||0),0),p=this.measureText(t),f=Math.max(p+d,0);this.textWidth=p,this.textHeight=this.getFontSize(),this.glyphInfo=[];const g=this.getPathLength(),m=this.getStyle("startOffset").getNumber(0)*g;let y=0;"middle"!==a&&"center"!==a||(y=-f/2),"end"!==a&&"right"!==a||(y=-f),y+=m,n.forEach(((e,i)=>{const{offset:o,segment:c,rotation:l}=this.findSegmentToFitChar(t,a,f,g,r,y,s,e,i);y=o,c.p0&&c.p1&&this.glyphInfo.push({text:n[i],p0:c.p0,p1:c.p1,rotation:l})}))}parsePathData(t){if(this.pathLength=-1,!t)return[];const e=[],{pathParser:n}=t;for(n.reset();!n.isEnd();){const{current:t}=n,r=t?t.x:0,i=t?t.y:0,s=n.next();let a=s.type,o=[];switch(s.type){case mt.MOVE_TO:this.pathM(n,o);break;case mt.LINE_TO:a=this.pathL(n,o);break;case mt.HORIZ_LINE_TO:a=this.pathH(n,o);break;case mt.VERT_LINE_TO:a=this.pathV(n,o);break;case mt.CURVE_TO:this.pathC(n,o);break;case mt.SMOOTH_CURVE_TO:a=this.pathS(n,o);break;case mt.QUAD_TO:this.pathQ(n,o);break;case mt.SMOOTH_QUAD_TO:a=this.pathT(n,o);break;case mt.ARC:o=this.pathA(n);break;case mt.CLOSE_PATH:yt.pathZ(n)}s.type!==mt.CLOSE_PATH?e.push({type:a,points:o,start:{x:r,y:i},pathLength:this.calcLength(r,i,a,o)}):e.push({type:mt.CLOSE_PATH,points:[],pathLength:0})}return e}pathM(t,e){const{x:n,y:r}=yt.pathM(t).point;e.push(n,r)}pathL(t,e){const{x:n,y:r}=yt.pathL(t).point;return e.push(n,r),mt.LINE_TO}pathH(t,e){const{x:n,y:r}=yt.pathH(t).point;return e.push(n,r),mt.LINE_TO}pathV(t,e){const{x:n,y:r}=yt.pathV(t).point;return e.push(n,r),mt.LINE_TO}pathC(t,e){const{point:n,controlPoint:r,currentPoint:i}=yt.pathC(t);e.push(n.x,n.y,r.x,r.y,i.x,i.y)}pathS(t,e){const{point:n,controlPoint:r,currentPoint:i}=yt.pathS(t);return e.push(n.x,n.y,r.x,r.y,i.x,i.y),mt.CURVE_TO}pathQ(t,e){const{controlPoint:n,currentPoint:r}=yt.pathQ(t);e.push(n.x,n.y,r.x,r.y)}pathT(t,e){const{controlPoint:n,currentPoint:r}=yt.pathT(t);return e.push(n.x,n.y,r.x,r.y),mt.QUAD_TO}pathA(t){let{rX:e,rY:n,sweepFlag:r,xAxisRotation:i,centp:s,a1:a,ad:o}=yt.pathA(t);return 0===r&&o>0&&(o-=2*Math.PI),1===r&&o<0&&(o+=2*Math.PI),[s.x,s.y,e,n,a,o,i,r]}calcLength(t,e,n,r){let i=0,s=null,a=null,o=0;switch(n){case mt.LINE_TO:return this.getLineLength(t,e,r[0],r[1]);case mt.CURVE_TO:for(i=0,s=this.getPointOnCubicBezier(0,t,e,r[0],r[1],r[2],r[3],r[4],r[5]),o=.01;o<=1;o+=.01)a=this.getPointOnCubicBezier(o,t,e,r[0],r[1],r[2],r[3],r[4],r[5]),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return i;case mt.QUAD_TO:for(i=0,s=this.getPointOnQuadraticBezier(0,t,e,r[0],r[1],r[2],r[3]),o=.01;o<=1;o+=.01)a=this.getPointOnQuadraticBezier(o,t,e,r[0],r[1],r[2],r[3]),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return i;case mt.ARC:{i=0;const t=r[4],e=r[5],n=r[4]+e;let c=Math.PI/180;if(Math.abs(t-n)<c&&(c=Math.abs(t-n)),s=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],t,0),e<0)for(o=t-c;o>n;o-=c)a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],o,0),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;else for(o=t+c;o<n;o+=c)a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],o,0),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],n,0),i+=this.getLineLength(s.x,s.y,a.x,a.y),i}}return 0}getPointOnLine(t,e,n,r,i){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:n;const o=(i-n)/(r-e+k);let c=Math.sqrt(t*t/(1+o*o));r<e&&(c*=-1);let l=o*c,h=null;if(r===e)h={x:s,y:a+l};else if((a-n)/(s-e+k)===o)h={x:s+c,y:a+l};else{let u=0,d=0;const p=this.getLineLength(e,n,r,i);if(p<k)return null;let f=(s-e)*(r-e)+(a-n)*(i-n);f/=p*p,u=e+f*(r-e),d=n+f*(i-n);const g=this.getLineLength(s,a,u,d),m=Math.sqrt(t*t-g*g);c=Math.sqrt(m*m/(1+o*o)),r<e&&(c*=-1),l=o*c,h={x:u+c,y:d+l}}return h}getPointOnPath(t){const e=this.getPathLength();let n=0,r=null;if(t<-5e-5||t-5e-5>e)return null;const{dataArray:i}=this;for(const e of i){if(e&&(e.pathLength<5e-5||n+e.pathLength+5e-5<t)){n+=e.pathLength;continue}const i=t-n;let s=0;switch(e.type){case mt.LINE_TO:r=this.getPointOnLine(i,e.start.x,e.start.y,e.points[0],e.points[1],e.start.x,e.start.y);break;case mt.ARC:{const t=e.points[4],n=e.points[5],a=e.points[4]+n;if(s=t+i/e.pathLength*n,n<0&&s<a||n>=0&&s>a)break;r=this.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],s,e.points[6]);break}case mt.CURVE_TO:s=i/e.pathLength,s>1&&(s=1),r=this.getPointOnCubicBezier(s,e.start.x,e.start.y,e.points[0],e.points[1],e.points[2],e.points[3],e.points[4],e.points[5]);break;case mt.QUAD_TO:s=i/e.pathLength,s>1&&(s=1),r=this.getPointOnQuadraticBezier(s,e.start.x,e.start.y,e.points[0],e.points[1],e.points[2],e.points[3])}if(r)return r;break}return null}getLineLength(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}getPathLength(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce(((t,e)=>e.pathLength>0?t+e.pathLength:t),0)),this.pathLength}getPointOnCubicBezier(t,e,n,r,i,s,a,o,c){return{x:o*T(t)+s*L(t)+r*z(t)+e*N(t),y:c*T(t)+a*L(t)+i*z(t)+n*N(t)}}getPointOnQuadraticBezier(t,e,n,r,i,s,a){return{x:s*I(t)+r*B(t)+e*F(t),y:a*I(t)+i*B(t)+n*F(t)}}getPointOnEllipticalArc(t,e,n,r,i,s){const a=Math.cos(s),o=Math.sin(s),c=n*Math.cos(i),l=r*Math.sin(i);return{x:t+(c*a-l*o),y:e+(c*o+l*a)}}buildEquidistantCache(t,e){const n=this.getPathLength(),r=e||.25,i=t||n/100;if(!this.equidistantCache||this.equidistantCache.step!==i||this.equidistantCache.precision!==r){this.equidistantCache={step:i,precision:r,points:[]};let t=0;for(let e=0;e<=n;e+=r){const n=this.getPointOnPath(e),s=this.getPointOnPath(e+r);n&&s&&(t+=this.getLineLength(n.x,n.y,s.x,s.y),t>=i&&(this.equidistantCache.points.push({x:n.x,y:n.y,distance:e}),t-=i))}}}getEquidistantPointOnPath(t,e,n){if(this.buildEquidistantCache(e,n),t<0||t-this.getPathLength()>5e-5)return null;const r=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[r]||null}constructor(t,e,n){super(t,e,n),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);const r=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(r)}}const Wt=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Gt extends dt{async loadImage(t){try{const e=await this.document.createImage(t);this.image=e}catch(e){console.error('Error while loading image "'.concat(t,'":'),e)}this.loaded=!0}async loadSvg(t){const e=Wt.exec(t);if(e){const t=e[5];t&&("base64"===e[4]?this.image=atob(t):this.image=decodeURIComponent(t))}else try{const e=await this.document.fetch(t),n=await e.text();this.image=n}catch(e){console.error('Error while loading image "'.concat(t,'":'),e)}this.loaded=!0}renderChildren(t){const{document:e,image:n,loaded:r}=this,i=this.getAttribute("x").getPixels("x"),s=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(r&&n&&a&&o){if(t.save(),t.translate(i,s),"string"==typeof n){const r=e.canvg.forkString(t,n,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:o}),{documentElement:i}=r.document;i&&(i.parent=this),r.render()}else e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:n.width,height:o,desiredHeight:n.height}),this.loaded&&("complete"in n&&!n.complete||t.drawImage(n,0,0));t.restore()}}getBoundingBox(){const t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),r=this.getStyle("height").getPixels("y");return new ut(t,e,t+n,e+r)}constructor(t,e,n){super(t,e,n),this.type="image",this.loaded=!1;const r=this.getHrefAttribute().getString();if(!r)return;const i=r.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(r);t.images.push(this),i?this.loadSvg(r):this.loadImage(r)}}class Ut extends dt{render(t){}constructor(...t){super(...t),this.type="symbol"}}class Xt{async load(t,e){try{const{document:n}=this,r=(await n.canvg.parser.load(e)).getElementsByTagName("font");Array.from(r).forEach((e=>{const r=n.createElement(e);n.definitions[t]=r}))}catch(t){console.error('Error while loading font "'.concat(e,'":'),t)}this.loaded=!0}constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}}class Yt extends st{constructor(t,e,n){super(t,e,n),this.type="style";u(Array.from(e.childNodes).map((t=>t.textContent)).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach((e=>{const n=e.trim();if(!n)return;const r=n.split("{"),i=r[0].split(","),s=r[1].split(";");i.forEach((e=>{const n=e.trim();if(!n)return;const r=t.styles[n]||{};if(s.forEach((e=>{const n=e.indexOf(":"),i=e.substr(0,n).trim(),s=e.substr(n+1,e.length-n).trim();i&&s&&(r[i]=new V(t,i,s))})),t.styles[n]=r,t.stylesSpecificity[n]=E(n),"@font-face"===n){const e=r["font-family"].getString().replace(/"|'/g,"");r.src.getString().split(",").forEach((n=>{if(n.indexOf('format("svg")')>0){const r=x(n);r&&new Xt(t).load(e,r)}}))}}))}))}}Yt.parseExternalUrl=x;class $t extends dt{setContext(t){super.setContext(t);const e=this.getAttribute("x"),n=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),n.hasValue()&&t.translate(0,n.getPixels("y"))}path(t){const{element:e}=this;e&&e.path(t)}renderChildren(t){const{document:e,element:n}=this;if(n){let r=n;if("symbol"===n.type&&(r=new xt(e),r.attributes.viewBox=new V(e,"viewBox",n.getAttribute("viewBox").getString()),r.attributes.preserveAspectRatio=new V(e,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),r.attributes.overflow=new V(e,"overflow",n.getAttribute("overflow").getString()),r.children=n.children,n.styles.opacity=new V(e,"opacity",this.calculateOpacity())),"svg"===r.type){const t=this.getStyle("width",!1,!0),n=this.getStyle("height",!1,!0);t.hasValue()&&(r.attributes.width=new V(e,"width",t.getString())),n.hasValue()&&(r.attributes.height=new V(e,"height",n.getString()))}const i=r.parent;r.parent=this,r.render(t),r.parent=i}}getBoundingBox(t){const{element:e}=this;return e?e.getBoundingBox(t):null}elementTransform(){const{document:t,element:e}=this;return e?it.fromElement(t,e):null}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}constructor(...t){super(...t),this.type="use"}}function qt(t,e,n,r,i,s){return t[n*r*4+4*e+s]}function Kt(t,e,n,r,i,s,a){t[n*r*4+4*e+s]=a}function Zt(t,e,n){return t[e]*n}function Qt(t,e,n,r){return e+Math.cos(t)*n+Math.sin(t)*r}class Jt extends st{apply(t,e,n,r,i){const{includeOpacity:s,matrix:a}=this,o=t.getImageData(0,0,r,i);for(let t=0;t<i;t++)for(let e=0;e<r;e++){const n=qt(o.data,e,t,r,0,0),i=qt(o.data,e,t,r,0,1),c=qt(o.data,e,t,r,0,2),l=qt(o.data,e,t,r,0,3);let h=Zt(a,0,n)+Zt(a,1,i)+Zt(a,2,c)+Zt(a,3,l)+Zt(a,4,1),u=Zt(a,5,n)+Zt(a,6,i)+Zt(a,7,c)+Zt(a,8,l)+Zt(a,9,1),d=Zt(a,10,n)+Zt(a,11,i)+Zt(a,12,c)+Zt(a,13,l)+Zt(a,14,1),p=Zt(a,15,n)+Zt(a,16,i)+Zt(a,17,c)+Zt(a,18,l)+Zt(a,19,1);s&&(h=0,u=0,d=0,p*=l/255),Kt(o.data,e,t,r,0,0,h),Kt(o.data,e,t,r,0,1,u),Kt(o.data,e,t,r,0,2,d),Kt(o.data,e,t,r,0,3,p)}t.clearRect(0,0,r,i),t.putImageData(o,0,0)}constructor(t,e,n){super(t,e,n),this.type="feColorMatrix";let r=f(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{const t=r[0];r=[.213+.787*t,.715-.715*t,.072-.072*t,0,0,.213-.213*t,.715+.285*t,.072-.072*t,0,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{const t=r[0]*Math.PI/180;r=[Qt(t,.213,.787,-.213),Qt(t,.715,-.715,-.715),Qt(t,.072,-.072,.928),0,0,Qt(t,.213,-.213,.143),Qt(t,.715,.285,.14),Qt(t,.072,-.072,-.283),0,0,Qt(t,.213,-.213,-.787),Qt(t,.715,-.715,.715),Qt(t,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.matrix=r,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}}class te extends st{apply(t,e){const{document:n}=this;let r=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(!s&&!a){const e=new ut;this.children.forEach((n=>{e.addBoundingBox(n.getBoundingBox(t))})),r=Math.floor(e.x1),i=Math.floor(e.y1),s=Math.floor(e.width),a=Math.floor(e.height)}const o=this.removeStyles(e,te.ignoreStyles),c=n.createCanvas(r+s,i+a),l=c.getContext("2d");n.screen.setDefaults(l),this.renderChildren(l),new Jt(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(l,0,0,r+s,i+a);const h=n.createCanvas(r+s,i+a),u=h.getContext("2d");n.screen.setDefaults(u),e.render(u),u.globalCompositeOperation="destination-in",u.fillStyle=l.createPattern(c,"no-repeat"),u.fillRect(0,0,r+s,i+a),t.fillStyle=u.createPattern(h,"no-repeat"),t.fillRect(0,0,r+s,i+a),this.restoreStyles(e,o)}render(t){}constructor(...t){super(...t),this.type="mask"}}te.ignoreStyles=["mask","transform","clip-path"];const ee=()=>{};class ne extends st{apply(t){const{document:e}=this,n=Reflect.getPrototypeOf(t),{beginPath:r,closePath:i}=t;n&&(n.beginPath=ee,n.closePath=ee),Reflect.apply(r,t,[]),this.children.forEach((r=>{if(!("path"in r))return;let s="elementTransform"in r?r.elementTransform():null;s||(s=it.fromElement(e,r)),s&&s.apply(t),r.path(t),n&&(n.closePath=i),s&&s.unapply(t)})),Reflect.apply(i,t,[]),t.clip(),n&&(n.beginPath=r,n.closePath=i)}render(t){}constructor(...t){super(...t),this.type="clipPath"}}class re extends st{apply(t,e){const{document:n,children:r}=this,i="getBoundingBox"in e?e.getBoundingBox(t):null;if(!i)return;let s=0,a=0;r.forEach((t=>{const e=t.extraFilterDistance||0;s=Math.max(s,e),a=Math.max(a,e)}));const o=Math.floor(i.width),c=Math.floor(i.height),l=o+2*s,h=c+2*a;if(l<1||h<1)return;const u=Math.floor(i.x),d=Math.floor(i.y),p=this.removeStyles(e,re.ignoreStyles),f=n.createCanvas(l,h),g=f.getContext("2d");n.screen.setDefaults(g),g.translate(-u+s,-d+a),e.render(g),r.forEach((t=>{"function"==typeof t.apply&&t.apply(g,0,0,l,h)})),t.drawImage(f,0,0,l,h,u-s,d-a,l,h),this.restoreStyles(e,p)}render(t){}constructor(...t){super(...t),this.type="filter"}}re.ignoreStyles=["filter","transform","clip-path"];class ie extends st{apply(t,e,n,r,i){}constructor(t,e,n){super(t,e,n),this.type="feDropShadow",this.addStylesFromStyleDefinition()}}class se extends st{apply(t,e,n,r,i){}constructor(...t){super(...t),this.type="feMorphology"}}class ae extends st{apply(t,e,n,r,i){}constructor(...t){super(...t),this.type="feComposite"}}class oe extends st{apply(t,e,n,r,i){const{document:s,blurRadius:o}=this,c=s.window?s.window.document.body:null,l=t.canvas;l.id=s.getUniqueId(),c&&(l.style.display="none",c.appendChild(l)),a.canvasRGBA(l,e,n,r,i,o),c&&c.removeChild(l)}constructor(t,e,n){super(t,e,n),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}}class ce extends st{constructor(...t){super(...t),this.type="title"}}class le extends st{constructor(...t){super(...t),this.type="desc"}}const he={svg:xt,rect:vt,circle:bt,ellipse:wt,line:Ct,polyline:Mt,polygon:St,path:yt,pattern:_t,marker:Pt,defs:At,linearGradient:Rt,radialGradient:jt,stop:Dt,animate:Tt,animateColor:Lt,animateTransform:zt,font:Ft,"font-face":Nt,"missing-glyph":Bt,glyph:It,text:pt,tspan:ft,tref:Vt,a:Ot,textPath:Ht,image:Gt,g:Et,symbol:Ut,style:Yt,use:$t,mask:te,clipPath:ne,filter:re,feDropShadow:ie,feMorphology:se,feComposite:ae,feColorMatrix:Jt,feGaussianBlur:oe,title:ce,desc:le};class ue{bindCreateImage(t,e){return"boolean"==typeof e?(n,r)=>t(n,"boolean"==typeof r?r:e):t}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){const{emSizeStack:t}=this;return t[t.length-1]||12}set emSize(t){const{emSizeStack:e}=this;e.push(t)}popEmSize(){const{emSizeStack:t}=this;t.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every((t=>t.loaded))}isFontsLoaded(){return this.fonts.every((t=>t.loaded))}createDocumentElement(t){const e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}createElement(t){const e=t.nodeName.replace(/^[^:]+:/,""),n=ue.elementTypes[e];return n?new n(this,t):new at(this,t)}createTextNode(t){return new gt(this,t)}setViewBox(t){this.screen.setViewBox({document:this,...t})}constructor(t,{rootEmSize:e=12,emSize:n=12,createCanvas:r=ue.createCanvas,createImage:i=ue.createImage,anonymousCrossOrigin:s}={}){this.canvg=t,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=e,this.emSize=n,this.createCanvas=r,this.createImage=this.bindCreateImage(i,s),this.screen.wait((()=>this.isImagesLoaded())),this.screen.wait((()=>this.isFontsLoaded()))}}ue.createCanvas=function(t,e){const n=document.createElement("canvas");return n.width=t,n.height=e,n},ue.createImage=async function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("img");return e&&(n.crossOrigin="Anonymous"),new Promise(((e,r)=>{n.onload=()=>{e(n)},n.onerror=(t,e,n,i,s)=>{r(s)},n.src=t}))},ue.elementTypes=he;class de{static async from(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new K(n),i=await r.parse(e);return new de(t,i,n)}static fromString(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new K(n).parseFromString(e);return new de(t,r,n)}fork(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return de.from(t,e,{...this.options,...n})}forkString(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return de.fromString(t,e,{...this.options,...n})}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}async render(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.start({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0,...t}),await this.ready(),this.stop()}start(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{documentElement:e,screen:n,options:r}=this;n.start(e,{enableRedraw:!0,...r,...t})}stop(){this.screen.stop()}resize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,e,n)}constructor(t,e,n={}){this.parser=new K(n),this.screen=new Y(t,n),this.options=n;const r=new ue(this,n),i=r.createDocumentElement(e);this.document=r,this.documentElement=i}}e.AElement=Ot,e.AnimateColorElement=Lt,e.AnimateElement=Tt,e.AnimateTransformElement=zt,e.BoundingBox=ut,e.CB1=T,e.CB2=L,e.CB3=z,e.CB4=N,e.Canvg=de,e.CircleElement=bt,e.ClipPathElement=ne,e.DefsElement=At,e.DescElement=le,e.Document=ue,e.Element=st,e.EllipseElement=wt,e.FeColorMatrixElement=Jt,e.FeCompositeElement=ae,e.FeDropShadowElement=ie,e.FeGaussianBlurElement=oe,e.FeMorphologyElement=se,e.FilterElement=re,e.Font=ht,e.FontElement=Ft,e.FontFaceElement=Nt,e.GElement=Et,e.GlyphElement=It,e.GradientElement=kt,e.ImageElement=Gt,e.LineElement=Ct,e.LinearGradientElement=Rt,e.MarkerElement=Pt,e.MaskElement=te,e.Matrix=tt,e.MissingGlyphElement=Bt,e.Mouse=G,e.PSEUDO_ZERO=k,e.Parser=K,e.PathElement=yt,e.PathParser=mt,e.PatternElement=_t,e.Point=W,e.PolygonElement=St,e.PolylineElement=Mt,e.Property=V,e.QB1=I,e.QB2=B,e.QB3=F,e.RadialGradientElement=jt,e.RectElement=vt,e.RenderedElement=dt,e.Rotate=Q,e.SVGElement=xt,e.SVGFontLoader=Xt,e.Scale=J,e.Screen=Y,e.Skew=et,e.SkewX=nt,e.SkewY=rt,e.StopElement=Dt,e.StyleElement=Yt,e.SymbolElement=Ut,e.TRefElement=Vt,e.TSpanElement=ft,e.TextElement=pt,e.TextPathElement=Ht,e.TitleElement=ce,e.Transform=it,e.Translate=Z,e.UnknownElement=at,e.UseElement=$t,e.ViewPort=O,e.compressSpaces=u,e.elements=he,e.getSelectorSpecificity=E,e.normalizeAttributeName=y,e.normalizeColor=v,e.parseExternalUrl=x,e.presets=h,e.toMatrixValue=g,e.toNumbers=f,e.trimLeft=d,e.trimRight=p,e.vectorMagnitude=R,e.vectorsAngle=D,e.vectorsRatio=j},"./node_modules/svg-pathdata/lib/SVGPathData.cjs":function(t,e){!function(t){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=" ";function i(t){var e="";Array.isArray(t)||(t=[t]);for(var n=0;n<t.length;n++){var i=t[n];if(i.type===b.CLOSE_PATH)e+="z";else if(i.type===b.HORIZ_LINE_TO)e+=(i.relative?"h":"H")+i.x;else if(i.type===b.VERT_LINE_TO)e+=(i.relative?"v":"V")+i.y;else if(i.type===b.MOVE_TO)e+=(i.relative?"m":"M")+i.x+r+i.y;else if(i.type===b.LINE_TO)e+=(i.relative?"l":"L")+i.x+r+i.y;else if(i.type===b.CURVE_TO)e+=(i.relative?"c":"C")+i.x1+r+i.y1+r+i.x2+r+i.y2+r+i.x+r+i.y;else if(i.type===b.SMOOTH_CURVE_TO)e+=(i.relative?"s":"S")+i.x2+r+i.y2+r+i.x+r+i.y;else if(i.type===b.QUAD_TO)e+=(i.relative?"q":"Q")+i.x1+r+i.y1+r+i.x+r+i.y;else if(i.type===b.SMOOTH_QUAD_TO)e+=(i.relative?"t":"T")+i.x+r+i.y;else{if(i.type!==b.ARC)throw new Error('Unexpected command type "'+i.type+'" at index '+n+".");e+=(i.relative?"a":"A")+i.rX+r+i.rY+r+i.xRot+r+ +i.lArcFlag+r+ +i.sweepFlag+r+i.x+r+i.y}}return e}function s(t,e){var n=t[0],r=t[1];return[n*Math.cos(e)-r*Math.sin(e),n*Math.sin(e)+r*Math.cos(e)]}function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0;n<t.length;n++)if("number"!=typeof t[n])throw new Error("assertNumbers arguments["+n+"] is not a number. "+typeof t[n]+" == typeof "+t[n]);return!0}var o=Math.PI;function c(t,e,n){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var r=t.rX,i=t.rY,a=t.x,c=t.y;r=Math.abs(t.rX),i=Math.abs(t.rY);var l=s([(e-a)/2,(n-c)/2],-t.xRot/180*o),h=l[0],u=l[1],d=Math.pow(h,2)/Math.pow(r,2)+Math.pow(u,2)/Math.pow(i,2);1<d&&(r*=Math.sqrt(d),i*=Math.sqrt(d)),t.rX=r,t.rY=i;var p=Math.pow(r,2)*Math.pow(u,2)+Math.pow(i,2)*Math.pow(h,2),f=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(r,2)*Math.pow(i,2)-p)/p)),g=r*u/i*f,m=-i*h/r*f,y=s([g,m],t.xRot/180*o);t.cX=y[0]+(e+a)/2,t.cY=y[1]+(n+c)/2,t.phi1=Math.atan2((u-m)/i,(h-g)/r),t.phi2=Math.atan2((-u-m)/i,(-h-g)/r),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*o),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*o),t.phi1*=180/o,t.phi2*=180/o}function l(t,e,n){a(t,e,n);var r=t*t+e*e-n*n;if(0>r)return[];if(0===r)return[[t*n/(t*t+e*e),e*n/(t*t+e*e)]];var i=Math.sqrt(r);return[[(t*n+e*i)/(t*t+e*e),(e*n-t*i)/(t*t+e*e)],[(t*n-e*i)/(t*t+e*e),(e*n+t*i)/(t*t+e*e)]]}var h=Math.PI/180;function u(t,e,n){return(1-n)*t+n*e}function d(t,e,n,r){return t+Math.cos(r/180*o)*e+Math.sin(r/180*o)*n}function p(t,e,n,r){var i=1e-6,s=e-t,a=n-e,o=3*s+3*(r-n)-6*a,c=6*(a-s),l=3*s;return Math.abs(o)<i?[-l/c]:function(t,e,n){void 0===n&&(n=1e-6);var r=t*t/4-e;if(r<-n)return[];if(r<=n)return[-t/2];var i=Math.sqrt(r);return[-t/2-i,-t/2+i]}(c/o,l/o,i)}function f(t,e,n,r,i){var s=1-i;return t*(s*s*s)+e*(3*s*s*i)+n*(3*s*i*i)+r*(i*i*i)}t.SVGPathDataTransformer=void 0,function(t){function e(){return i((function(t,e,n){return t.relative&&(void 0!==t.x1&&(t.x1+=e),void 0!==t.y1&&(t.y1+=n),void 0!==t.x2&&(t.x2+=e),void 0!==t.y2&&(t.y2+=n),void 0!==t.x&&(t.x+=e),void 0!==t.y&&(t.y+=n),t.relative=!1),t}))}function n(){var t=NaN,e=NaN,n=NaN,r=NaN;return i((function(i,s,a){return i.type&b.SMOOTH_CURVE_TO&&(i.type=b.CURVE_TO,t=isNaN(t)?s:t,e=isNaN(e)?a:e,i.x1=i.relative?s-t:2*s-t,i.y1=i.relative?a-e:2*a-e),i.type&b.CURVE_TO?(t=i.relative?s+i.x2:i.x2,e=i.relative?a+i.y2:i.y2):(t=NaN,e=NaN),i.type&b.SMOOTH_QUAD_TO&&(i.type=b.QUAD_TO,n=isNaN(n)?s:n,r=isNaN(r)?a:r,i.x1=i.relative?s-n:2*s-n,i.y1=i.relative?a-r:2*a-r),i.type&b.QUAD_TO?(n=i.relative?s+i.x1:i.x1,r=i.relative?a+i.y1:i.y1):(n=NaN,r=NaN),i}))}function r(){var t=NaN,e=NaN;return i((function(n,r,i){if(n.type&b.SMOOTH_QUAD_TO&&(n.type=b.QUAD_TO,t=isNaN(t)?r:t,e=isNaN(e)?i:e,n.x1=n.relative?r-t:2*r-t,n.y1=n.relative?i-e:2*i-e),n.type&b.QUAD_TO){t=n.relative?r+n.x1:n.x1,e=n.relative?i+n.y1:n.y1;var s=n.x1,a=n.y1;n.type=b.CURVE_TO,n.x1=((n.relative?0:r)+2*s)/3,n.y1=((n.relative?0:i)+2*a)/3,n.x2=(n.x+2*s)/3,n.y2=(n.y+2*a)/3}else t=NaN,e=NaN;return n}))}function i(t){var e=0,n=0,r=NaN,i=NaN;return function(s){if(isNaN(r)&&!(s.type&b.MOVE_TO))throw new Error("path must start with moveto");var a=t(s,e,n,r,i);return s.type&b.CLOSE_PATH&&(e=r,n=i),void 0!==s.x&&(e=s.relative?e+s.x:s.x),void 0!==s.y&&(n=s.relative?n+s.y:s.y),s.type&b.MOVE_TO&&(r=e,i=n),a}}function o(t,e,n,r,s,o){return a(t,e,n,r,s,o),i((function(i,a,c,l){var h=i.x1,u=i.x2,d=i.relative&&!isNaN(l),p=void 0!==i.x?i.x:d?0:a,f=void 0!==i.y?i.y:d?0:c;function g(t){return t*t}i.type&b.HORIZ_LINE_TO&&0!==e&&(i.type=b.LINE_TO,i.y=i.relative?0:c),i.type&b.VERT_LINE_TO&&0!==n&&(i.type=b.LINE_TO,i.x=i.relative?0:a),void 0!==i.x&&(i.x=i.x*t+f*n+(d?0:s)),void 0!==i.y&&(i.y=p*e+i.y*r+(d?0:o)),void 0!==i.x1&&(i.x1=i.x1*t+i.y1*n+(d?0:s)),void 0!==i.y1&&(i.y1=h*e+i.y1*r+(d?0:o)),void 0!==i.x2&&(i.x2=i.x2*t+i.y2*n+(d?0:s)),void 0!==i.y2&&(i.y2=u*e+i.y2*r+(d?0:o));var m=t*r-e*n;if(void 0!==i.xRot&&(1!==t||0!==e||0!==n||1!==r))if(0===m)delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag,i.type=b.LINE_TO;else{var y=i.xRot*Math.PI/180,x=Math.sin(y),v=Math.cos(y),w=1/g(i.rX),C=1/g(i.rY),M=g(v)*w+g(x)*C,S=2*x*v*(w-C),_=g(x)*w+g(v)*C,P=M*r*r-S*e*r+_*e*e,A=S*(t*r+e*n)-2*(M*n*r+_*t*e),E=M*n*n-S*t*n+_*t*t,k=(Math.atan2(A,P-E)+Math.PI)%Math.PI/2,R=Math.sin(k),j=Math.cos(k);i.rX=Math.abs(m)/Math.sqrt(P*g(j)+A*R*j+E*g(R)),i.rY=Math.abs(m)/Math.sqrt(P*g(R)-A*R*j+E*g(j)),i.xRot=180*k/Math.PI}return void 0!==i.sweepFlag&&0>m&&(i.sweepFlag=+!i.sweepFlag),i}))}function g(){return function(t){var e={};for(var n in t)e[n]=t[n];return e}}t.ROUND=function(t){function e(e){return Math.round(e*t)/t}return void 0===t&&(t=1e13),a(t),function(t){return void 0!==t.x1&&(t.x1=e(t.x1)),void 0!==t.y1&&(t.y1=e(t.y1)),void 0!==t.x2&&(t.x2=e(t.x2)),void 0!==t.y2&&(t.y2=e(t.y2)),void 0!==t.x&&(t.x=e(t.x)),void 0!==t.y&&(t.y=e(t.y)),void 0!==t.rX&&(t.rX=e(t.rX)),void 0!==t.rY&&(t.rY=e(t.rY)),t}},t.TO_ABS=e,t.TO_REL=function(){return i((function(t,e,n){return t.relative||(void 0!==t.x1&&(t.x1-=e),void 0!==t.y1&&(t.y1-=n),void 0!==t.x2&&(t.x2-=e),void 0!==t.y2&&(t.y2-=n),void 0!==t.x&&(t.x-=e),void 0!==t.y&&(t.y-=n),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,e,n){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===n&&(n=!0),i((function(r,i,s,a,o){if(isNaN(a)&&!(r.type&b.MOVE_TO))throw new Error("path must start with moveto");return e&&r.type&b.HORIZ_LINE_TO&&(r.type=b.LINE_TO,r.y=r.relative?0:s),n&&r.type&b.VERT_LINE_TO&&(r.type=b.LINE_TO,r.x=r.relative?0:i),t&&r.type&b.CLOSE_PATH&&(r.type=b.LINE_TO,r.x=r.relative?a-i:a,r.y=r.relative?o-s:o),r.type&b.ARC&&(0===r.rX||0===r.rY)&&(r.type=b.LINE_TO,delete r.rX,delete r.rY,delete r.xRot,delete r.lArcFlag,delete r.sweepFlag),r}))},t.NORMALIZE_ST=n,t.QT_TO_C=r,t.INFO=i,t.SANITIZE=function(t){void 0===t&&(t=0),a(t);var e=NaN,n=NaN,r=NaN,s=NaN;return i((function(i,a,o,c,l){var h=Math.abs,u=!1,d=0,p=0;if(i.type&b.SMOOTH_CURVE_TO&&(d=isNaN(e)?0:a-e,p=isNaN(n)?0:o-n),i.type&(b.CURVE_TO|b.SMOOTH_CURVE_TO)?(e=i.relative?a+i.x2:i.x2,n=i.relative?o+i.y2:i.y2):(e=NaN,n=NaN),i.type&b.SMOOTH_QUAD_TO?(r=isNaN(r)?a:2*a-r,s=isNaN(s)?o:2*o-s):i.type&b.QUAD_TO?(r=i.relative?a+i.x1:i.x1,s=i.relative?o+i.y1:i.y2):(r=NaN,s=NaN),i.type&b.LINE_COMMANDS||i.type&b.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&b.CURVE_TO||i.type&b.SMOOTH_CURVE_TO||i.type&b.QUAD_TO||i.type&b.SMOOTH_QUAD_TO){var f=void 0===i.x?0:i.relative?i.x:i.x-a,g=void 0===i.y?0:i.relative?i.y:i.y-o;d=isNaN(r)?void 0===i.x1?d:i.relative?i.x:i.x1-a:r-a,p=isNaN(s)?void 0===i.y1?p:i.relative?i.y:i.y1-o:s-o;var m=void 0===i.x2?0:i.relative?i.x:i.x2-a,y=void 0===i.y2?0:i.relative?i.y:i.y2-o;h(f)<=t&&h(g)<=t&&h(d)<=t&&h(p)<=t&&h(m)<=t&&h(y)<=t&&(u=!0)}return i.type&b.CLOSE_PATH&&h(a-c)<=t&&h(o-l)<=t&&(u=!0),u?[]:i}))},t.MATRIX=o,t.ROTATE=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=0),a(t,e,n);var r=Math.sin(t),i=Math.cos(t);return o(i,r,-r,i,e-e*i+n*r,n-e*r-n*i)},t.TRANSLATE=function(t,e){return void 0===e&&(e=0),a(t,e),o(1,0,0,1,t,e)},t.SCALE=function(t,e){return void 0===e&&(e=t),a(t,e),o(t,0,0,e,0,0)},t.SKEW_X=function(t){return a(t),o(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return a(t),o(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),a(t),o(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),a(t),o(1,0,0,-1,0,t)},t.A_TO_C=function(){return i((function(t,e,n){return b.ARC===t.type?function(t,e,n){var r,i,a,o;t.cX||c(t,e,n);for(var l=Math.min(t.phi1,t.phi2),d=Math.max(t.phi1,t.phi2)-l,p=Math.ceil(d/90),f=new Array(p),g=e,m=n,y=0;y<p;y++){var x=u(t.phi1,t.phi2,y/p),v=u(t.phi1,t.phi2,(y+1)/p),w=v-x,C=4/3*Math.tan(w*h/4),M=[Math.cos(x*h)-C*Math.sin(x*h),Math.sin(x*h)+C*Math.cos(x*h)],S=M[0],_=M[1],P=[Math.cos(v*h),Math.sin(v*h)],A=P[0],E=P[1],k=[A+C*Math.sin(v*h),E-C*Math.cos(v*h)],R=k[0],j=k[1];f[y]={relative:t.relative,type:b.CURVE_TO};var D=function(e,n){var r=s([e*t.rX,n*t.rY],t.xRot),i=r[0],a=r[1];return[t.cX+i,t.cY+a]};r=D(S,_),f[y].x1=r[0],f[y].y1=r[1],i=D(R,j),f[y].x2=i[0],f[y].y2=i[1],a=D(A,E),f[y].x=a[0],f[y].y=a[1],t.relative&&(f[y].x1-=g,f[y].y1-=m,f[y].x2-=g,f[y].y2-=m,f[y].x-=g,f[y].y-=m),g=(o=[f[y].x,f[y].y])[0],m=o[1]}return f}(t,t.relative?0:e,t.relative?0:n):t}))},t.ANNOTATE_ARCS=function(){return i((function(t,e,n){return t.relative&&(e=0,n=0),b.ARC===t.type&&c(t,e,n),t}))},t.CLONE=g,t.CALCULATE_BOUNDS=function(){var t=function(t){var e={};for(var n in t)e[n]=t[n];return e},s=e(),a=r(),o=n(),h=i((function(e,n,r){var i=o(a(s(t(e))));function u(t){t>h.maxX&&(h.maxX=t),t<h.minX&&(h.minX=t)}function g(t){t>h.maxY&&(h.maxY=t),t<h.minY&&(h.minY=t)}if(i.type&b.DRAWING_COMMANDS&&(u(n),g(r)),i.type&b.HORIZ_LINE_TO&&u(i.x),i.type&b.VERT_LINE_TO&&g(i.y),i.type&b.LINE_TO&&(u(i.x),g(i.y)),i.type&b.CURVE_TO){u(i.x),g(i.y);for(var m=0,y=p(n,i.x1,i.x2,i.x);m<y.length;m++)0<(L=y[m])&&1>L&&u(f(n,i.x1,i.x2,i.x,L));for(var x=0,v=p(r,i.y1,i.y2,i.y);x<v.length;x++)0<(L=v[x])&&1>L&&g(f(r,i.y1,i.y2,i.y,L))}if(i.type&b.ARC){u(i.x),g(i.y),c(i,n,r);for(var w=i.xRot/180*Math.PI,C=Math.cos(w)*i.rX,M=Math.sin(w)*i.rX,S=-Math.sin(w)*i.rY,_=Math.cos(w)*i.rY,P=i.phi1<i.phi2?[i.phi1,i.phi2]:-180>i.phi2?[i.phi2+360,i.phi1+360]:[i.phi2,i.phi1],A=P[0],E=P[1],k=function(t){var e=t[0],n=t[1],r=180*Math.atan2(n,e)/Math.PI;return r<A?r+360:r},R=0,j=l(S,-C,0).map(k);R<j.length;R++)(L=j[R])>A&&L<E&&u(d(i.cX,C,S,L));for(var D=0,T=l(_,-M,0).map(k);D<T.length;D++){var L;(L=T[D])>A&&L<E&&g(d(i.cY,M,_,L))}}return e}));return h.minX=1/0,h.maxX=-1/0,h.minY=1/0,h.maxY=-1/0,h}}(t.SVGPathDataTransformer||(t.SVGPathDataTransformer={}));var g,m=function(){function e(){}return e.prototype.round=function(e){return this.transform(t.SVGPathDataTransformer.ROUND(e))},e.prototype.toAbs=function(){return this.transform(t.SVGPathDataTransformer.TO_ABS())},e.prototype.toRel=function(){return this.transform(t.SVGPathDataTransformer.TO_REL())},e.prototype.normalizeHVZ=function(e,n,r){return this.transform(t.SVGPathDataTransformer.NORMALIZE_HVZ(e,n,r))},e.prototype.normalizeST=function(){return this.transform(t.SVGPathDataTransformer.NORMALIZE_ST())},e.prototype.qtToC=function(){return this.transform(t.SVGPathDataTransformer.QT_TO_C())},e.prototype.aToC=function(){return this.transform(t.SVGPathDataTransformer.A_TO_C())},e.prototype.sanitize=function(e){return this.transform(t.SVGPathDataTransformer.SANITIZE(e))},e.prototype.translate=function(e,n){return this.transform(t.SVGPathDataTransformer.TRANSLATE(e,n))},e.prototype.scale=function(e,n){return this.transform(t.SVGPathDataTransformer.SCALE(e,n))},e.prototype.rotate=function(e,n,r){return this.transform(t.SVGPathDataTransformer.ROTATE(e,n,r))},e.prototype.matrix=function(e,n,r,i,s,a){return this.transform(t.SVGPathDataTransformer.MATRIX(e,n,r,i,s,a))},e.prototype.skewX=function(e){return this.transform(t.SVGPathDataTransformer.SKEW_X(e))},e.prototype.skewY=function(e){return this.transform(t.SVGPathDataTransformer.SKEW_Y(e))},e.prototype.xSymmetry=function(e){return this.transform(t.SVGPathDataTransformer.X_AXIS_SYMMETRY(e))},e.prototype.ySymmetry=function(e){return this.transform(t.SVGPathDataTransformer.Y_AXIS_SYMMETRY(e))},e.prototype.annotateArcs=function(){return this.transform(t.SVGPathDataTransformer.ANNOTATE_ARCS())},e}(),y=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},x=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},v=function(t){function e(){var e=t.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return n(e,t),e.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,e){var n=this;void 0===e&&(e=[]);for(var r=function(t){e.push(t),n.curArgs.length=0,n.canParseCommandOrComma=!0},i=0;i<t.length;i++){var s=t[i],a=!(this.curCommandType!==b.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),o=x(s)&&("0"===this.curNumber&&"0"===s||a);if(!x(s)||o)if("e"!==s&&"E"!==s)if("-"!==s&&"+"!==s||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==s||this.curNumberHasExp||this.curNumberHasDecimal||a){if(this.curNumber&&-1!==this.curCommandType){var c=Number(this.curNumber);if(isNaN(c))throw new SyntaxError("Invalid number ending at "+i);if(this.curCommandType===b.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>c)throw new SyntaxError('Expected positive number, got "'+c+'" at index "'+i+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"');this.curArgs.push(c),this.curArgs.length===w[this.curCommandType]&&(b.HORIZ_LINE_TO===this.curCommandType?r({type:b.HORIZ_LINE_TO,relative:this.curCommandRelative,x:c}):b.VERT_LINE_TO===this.curCommandType?r({type:b.VERT_LINE_TO,relative:this.curCommandRelative,y:c}):this.curCommandType===b.MOVE_TO||this.curCommandType===b.LINE_TO||this.curCommandType===b.SMOOTH_QUAD_TO?(r({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),b.MOVE_TO===this.curCommandType&&(this.curCommandType=b.LINE_TO)):this.curCommandType===b.CURVE_TO?r({type:b.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===b.SMOOTH_CURVE_TO?r({type:b.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===b.QUAD_TO?r({type:b.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===b.ARC&&r({type:b.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!y(s))if(","===s&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==s&&"-"!==s&&"."!==s)if(o)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==s&&"Z"!==s)if("h"===s||"H"===s)this.curCommandType=b.HORIZ_LINE_TO,this.curCommandRelative="h"===s;else if("v"===s||"V"===s)this.curCommandType=b.VERT_LINE_TO,this.curCommandRelative="v"===s;else if("m"===s||"M"===s)this.curCommandType=b.MOVE_TO,this.curCommandRelative="m"===s;else if("l"===s||"L"===s)this.curCommandType=b.LINE_TO,this.curCommandRelative="l"===s;else if("c"===s||"C"===s)this.curCommandType=b.CURVE_TO,this.curCommandRelative="c"===s;else if("s"===s||"S"===s)this.curCommandType=b.SMOOTH_CURVE_TO,this.curCommandRelative="s"===s;else if("q"===s||"Q"===s)this.curCommandType=b.QUAD_TO,this.curCommandRelative="q"===s;else if("t"===s||"T"===s)this.curCommandType=b.SMOOTH_QUAD_TO,this.curCommandRelative="t"===s;else{if("a"!==s&&"A"!==s)throw new SyntaxError('Unexpected character "'+s+'" at index '+i+".");this.curCommandType=b.ARC,this.curCommandRelative="a"===s}else e.push({type:b.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal="."===s}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return e},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(e,n){void 0===n&&(n=[]);for(var r=0,i=Object.getPrototypeOf(this).parse.call(this,e);r<i.length;r++){var s=i[r],a=t(s);Array.isArray(a)?n.push.apply(n,a):n.push(a)}return n}}})},e}(m),b=function(e){function r(t){var n=e.call(this)||this;return n.commands="string"==typeof t?r.parse(t):t,n}return n(r,e),r.prototype.encode=function(){return r.encode(this.commands)},r.prototype.getBounds=function(){var e=t.SVGPathDataTransformer.CALCULATE_BOUNDS();return this.transform(e),e},r.prototype.transform=function(t){for(var e=[],n=0,r=this.commands;n<r.length;n++){var i=t(r[n]);Array.isArray(i)?e.push.apply(e,i):e.push(i)}return this.commands=e,this},r.encode=function(t){return i(t)},r.parse=function(t){var e=new v,n=[];return e.parse(t,n),e.finish(n),n},r.CLOSE_PATH=1,r.MOVE_TO=2,r.HORIZ_LINE_TO=4,r.VERT_LINE_TO=8,r.LINE_TO=16,r.CURVE_TO=32,r.SMOOTH_CURVE_TO=64,r.QUAD_TO=128,r.SMOOTH_QUAD_TO=256,r.ARC=512,r.LINE_COMMANDS=r.LINE_TO|r.HORIZ_LINE_TO|r.VERT_LINE_TO,r.DRAWING_COMMANDS=r.HORIZ_LINE_TO|r.VERT_LINE_TO|r.LINE_TO|r.CURVE_TO|r.SMOOTH_CURVE_TO|r.QUAD_TO|r.SMOOTH_QUAD_TO|r.ARC,r}(m),w=((g={})[b.MOVE_TO]=2,g[b.LINE_TO]=2,g[b.HORIZ_LINE_TO]=1,g[b.VERT_LINE_TO]=1,g[b.CLOSE_PATH]=0,g[b.QUAD_TO]=4,g[b.SMOOTH_QUAD_TO]=2,g[b.CURVE_TO]=6,g[b.SMOOTH_CURVE_TO]=4,g[b.ARC]=7,g);t.COMMAND_ARG_COUNTS=w,t.SVGPathData=b,t.SVGPathDataParser=v,t.encodeSVGPath=i,Object.defineProperty(t,"__esModule",{value:!0})}(e)}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0,n("./src/index.js")})())); +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.draw2d=e():t.draw2d=e()}(self,(()=>(()=>{var t={"./src/lib/Class.exec.js":(t,e,n)=>{"use strict";n("./node_modules/script-loader/addScript.js")(n("./node_modules/raw-loader/index.js!./src/lib/Class.exec.js"))},"./src/lib/pathfinding.exec.js":(t,e,n)=>{"use strict";n("./node_modules/script-loader/addScript.js")(n("./node_modules/raw-loader/index.js!./src/lib/pathfinding.exec.js"))},"./src/lib/raphael.exec.js":(t,e,n)=>{"use strict";n("./node_modules/script-loader/addScript.js")(n("./node_modules/raw-loader/index.js!./src/lib/raphael.exec.js"))},"./src/Canvas.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.Canvas=Class.extend({NAME:"draw2d.Canvas",init:function(t,e,n){let r=this;this.setScrollArea(document.body),this.canvasId=t,this.html=$("#"+t),this.html.css({cursor:"default"}),isNaN(parseFloat(e))||isNaN(parseFloat(n))?(this.initialWidth=this.getWidth(),this.initialHeight=this.getHeight()):(this.initialWidth=parseInt(e),this.initialHeight=parseInt(n),this.html.height(this.initialHeight).width(this.initialWidth)),this.html.css({"-webkit-tap-highlight-color":"rgba(0,0,0,0)"}),$(this.html).droppable({accept:".draw2d_droppable",over:function(t,e){r.onDragEnter(e.draggable)},out:function(t,e){r.onDragLeave(e.draggable)},drop:function(t,e){t=r._getEvent(t);let n=$(e.helper).position(),i=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);r.onDrop(e.draggable,i.getX()-(t.clientX-n.left)+5,i.getY()-(t.clientY-n.top)+5,t.shiftKey,t.ctrlKey)}}),$(".draw2d_droppable").draggable({appendTo:"body",stack:"body",zIndex:27e3,helper:"clone",drag:function(t,e){t=r._getEvent(t);let n=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);r.onDrag(e.draggable,n.getX(),n.getY(),t.shiftKey,t.ctrlKey)},stop:function(t,e){},start:function(t,e){$(e.helper).addClass("shadow")}}),isNaN(parseFloat(n))?this.paper=Raphael(t,this.getWidth(),this.getHeight()):this.paper=Raphael(t,e,n),this.paper.canvas.style.position="absolute",this.zoomPolicy=null,this.zoomFactor=1,this.selection=new i.default.Selection,this.currentDropTarget=null,this.currentHoverFigure=null,this.regionDragDropConstraint=new i.default.policy.figure.RegionEditPolicy(0,0,this.getWidth(),this.getHeight()),this.eventSubscriptions={},this.editPolicy=new i.default.util.ArrayList,this.figures=new i.default.util.ArrayList,this.lines=new i.default.util.ArrayList,this.commonPorts=new i.default.util.ArrayList,this.resizeHandles=new i.default.util.ArrayList,this.commandStack=new i.default.command.CommandStack,this.linesToRepaintAfterDragDrop=new i.default.util.ArrayList,this.lineIntersections=new i.default.util.ArrayList,this.installEditPolicy(new i.default.policy.canvas.WheelZoomPolicy),this.installEditPolicy(new i.default.policy.canvas.DefaultKeyboardPolicy),this.installEditPolicy(new i.default.policy.canvas.BoundingboxSelectionPolicy),this.installEditPolicy(new i.default.policy.canvas.DropInterceptorPolicy),this.installEditPolicy(new i.default.policy.connection.ComposedConnectionCreatePolicy([new i.default.policy.connection.DragConnectionCreatePolicy,new i.default.policy.connection.ClickConnectionCreatePolicy])),this.commandStack.addEventListener((function(t){!0===t.isPostChangeEvent()&&(r.calculateConnectionIntersection(),r.linesToRepaintAfterDragDrop.each(((t,e)=>{e.svgPathString=null,e.repaint()})),r.linesToRepaintAfterDragDrop=new i.default.util.ArrayList)})),this.mouseDown=!1,this.mouseDownX=0,this.mouseDownY=0,this.mouseDragDiffX=0,this.mouseDragDiffY=0,this.html.bind("mouseup touchend",(function(t){if(!1===r.mouseDown)return;t=r._getEvent(t),r.calculateConnectionIntersection(),r.mouseDown=!1;let e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);r.editPolicy.each((function(n,i){i.onMouseUp(r,e.x,e.y,t.shiftKey,t.ctrlKey)})),r.mouseDragDiffX=0,r.mouseDragDiffY=0})),this.html.bind("mousemove touchmove",(function(t){t=r._getEvent(t);let e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);if(!1===r.mouseDown){try{let t=r.getBestFigure(e.x,e.y);t!==r.currentHoverFigure&&null!==r.currentHoverFigure&&(r.currentHoverFigure.onMouseLeave(),r.currentHoverFigure.fireEvent("mouseleave"),r.fireEvent("mouseleave",{figure:r.currentHoverFigure})),t!==r.currentHoverFigure&&null!==t&&(t.onMouseEnter(),t.fireEvent("mouseenter"),r.fireEvent("mouseenter",{figure:t})),r.currentHoverFigure=t}catch(t){console.log(t)}r.editPolicy.each((function(n,i){i.onMouseMove(r,e.x,e.y,t.shiftKey,t.ctrlKey)})),r.fireEvent("mousemove",{x:e.x,y:e.y,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,hoverFigure:r.currentHoverFigure})}else{let n=(t.clientX-r.mouseDownX)*r.zoomFactor,i=(t.clientY-r.mouseDownY)*r.zoomFactor;r.editPolicy.each((function(e,s){s.onMouseDrag(r,n,i,n-r.mouseDragDiffX,i-r.mouseDragDiffY,t.shiftKey,t.ctrlKey)})),r.mouseDragDiffX=n,r.mouseDragDiffY=i,r.fireEvent("mousemove",{x:e.x,y:e.y,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,hoverFigure:r.currentHoverFigure})}})),this.html.bind("mousedown",(function(t){try{let e=null;switch(t.which){case 1:case 0:try{t.preventDefault(),t=r._getEvent(t),r.mouseDownX=t.clientX,r.mouseDownY=t.clientY,r.mouseDragDiffX=0,r.mouseDragDiffY=0,e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY),r.mouseDown=!0,r.editPolicy.each((function(n,i){i.onMouseDown(r,e.x,e.y,t.shiftKey,t.ctrlKey)}))}catch(t){console.log(t)}break;case 3:return t.preventDefault(),void 0!==t.stopPropagation&&t.stopPropagation(),t=r._getEvent(t),e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY),r.onRightMouseDown(e.x,e.y,t.shiftKey,t.ctrlKey),!1}}catch(t){console.log(t)}})),this.html.on("dblclick",(function(t){t=r._getEvent(t),r.mouseDownX=t.clientX,r.mouseDownY=t.clientY;let e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);r.onDoubleClick(e.x,e.y,t.shiftKey,t.ctrlKey)})),this.html.on("click",(function(t){if(t=r._getEvent(t),r.mouseDownX===t.clientX||r.mouseDownY===t.clientY){let e=r.fromDocumentToCanvasCoordinate(t.clientX,t.clientY);r.onClick(e.x,e.y,t.shiftKey,t.ctrlKey)}})),this.html.on("MozMousePixelScroll DOMMouseScroll mousewheel",(function(t){let e=r._getEvent(t),n=r.fromDocumentToCanvasCoordinate(e.originalEvent.clientX,e.originalEvent.clientY),i=0;"mousewheel"===t.type?i=-1*t.originalEvent.wheelDelta:"DOMMouseScroll"===t.type&&(i=40*t.originalEvent.detail),!1===r.onMouseWheel(i,n.x,n.y,e.shiftKey,e.ctrlKey)&&t.preventDefault()})),this.keyupCallback=function(t){let e=$(t.target);e.is("input")||e.is("textarea")||r.editPolicy.each((function(e,n){n instanceof i.default.policy.canvas.KeyboardPolicy&&n.onKeyUp(r,t.keyCode,t.shiftKey,t.ctrlKey)}))},$(document).bind("keyup",this.keyupCallback),this.keydownCallback=function(t){let e=$(t.target);e.is("input")||e.is("textarea")||r.editPolicy.each((function(e,n){n instanceof i.default.policy.canvas.KeyboardPolicy&&n.onKeyDown(r,t.keyCode,t.shiftKey,t.ctrlKey)}))},$(document).bind("keydown",this.keydownCallback)},destroy:function(){this.clear(),$(document).unbind("keydown",this.keydownCallback),$(document).unbind("keyup",this.keyupCallback),this.eventSubscriptions={};try{this.paper.remove()}catch(t){}},clear:function(){this.fireEvent("clear");let t=this;return this.lines.clone().each((function(e,n){t.remove(n)})),this.figures.clone().each((function(e,n){t.remove(n)})),this.zoomFactor=1,this.selection.clear(),this.currentDropTarget=null,this.figures=new i.default.util.ArrayList,this.lines=new i.default.util.ArrayList,this.commonPorts=new i.default.util.ArrayList,this.commandStack.markSaveLocation(),this.linesToRepaintAfterDragDrop=new i.default.util.ArrayList,this.lineIntersections=new i.default.util.ArrayList,this},hideDecoration:function(){},showDecoration:function(){},calculateConnectionIntersection:function(){this.lineIntersections=new i.default.util.ArrayList;let t=this.getLines().clone();for(;t.getSize()>0;){let e=t.removeElementAt(0);t.each(((t,n)=>{let r=e.intersection(n);r.getSize()>0&&(this.lineIntersections.add({line:e,other:n,intersection:r}),this.lineIntersections.add({line:n,other:e,intersection:r}))}))}return this},installEditPolicy:function(t){return t instanceof i.default.policy.canvas.SelectionPolicy?(this.getSelection().getAll().each(((t,e)=>{e.unselect()})),this.editPolicy.grep((t=>{let e=!(t instanceof i.default.policy.canvas.SelectionPolicy);return!1===e&&t.onUninstall(this),e}))):t instanceof i.default.policy.canvas.ZoomPolicy?(this.editPolicy.grep((t=>{let e=!(t instanceof i.default.policy.canvas.ZoomPolicy);return!1===e&&t.onUninstall(this),e})),this.zoomPolicy=t):t instanceof i.default.policy.connection.ConnectionCreatePolicy?this.editPolicy.grep((t=>{let e=!(t instanceof i.default.policy.connection.ConnectionCreatePolicy);return!1===e&&t.onUninstall(this),e})):i.default.policy.canvas.DropInterceptorPolicy,t.NAME&&this.uninstallEditPolicy(t.NAME),t.onInstall(this),this.editPolicy.add(t),this},uninstallEditPolicy:function(t){if(null===t)return;let e=this.editPolicy.remove(t);if(null!==e)e.onUninstall(this),e instanceof i.default.policy.canvas.ZoomPolicy&&(this.zoomPolicy=null);else{let e=this,n="string"==typeof t?t:t.NAME;this.editPolicy.grep((function(t){return t.NAME!==n||(t.onUninstall(e),t instanceof i.default.policy.canvas.ZoomPolicy&&(e.zoomPolicy=null),!1)}))}return this},getDropInterceptorPolicies:function(){return this.editPolicy.clone().grep((function(t){return t instanceof i.default.policy.canvas.DropInterceptorPolicy}))},setZoom:function(t,e){this.zoomPolicy&&this.zoomPolicy.setZoom(t,e)},getZoom:function(){return this.zoomFactor},getDimension:function(){return new i.default.geo.Rectangle(0,0,this.initialWidth,this.initialHeight)},setDimension:function(t,e){if(void 0===t){let t=this.getFigures().clone().map((function(t){return t.getAbsoluteX()+t.getWidth()})),e=this.getFigures().clone().map((function(t){return t.getAbsoluteY()+t.getHeight()}));this.initialHeight=Math.max(...e.asArray()),this.initialWidth=Math.max(...t.asArray())}else t instanceof i.default.geo.Rectangle?(this.initialWidth=t.w,this.initialHeight=t.h):"number"==typeof t.width&&"number"==typeof t.height?(this.initialWidth=t.width,this.initialHeight=t.height):"number"==typeof t&&"number"==typeof e&&(this.initialWidth=t,this.initialHeight=e);return this.html.css({width:this.initialWidth+"px",height:this.initialHeight+"px"}),this.paper.setSize(this.initialWidth,this.initialHeight),this.setZoom(this.zoomFactor,!1),this},fromDocumentToCanvasCoordinate:function(t,e){return new i.default.geo.Point((t-this.getAbsoluteX()+this.getScrollLeft())*this.zoomFactor,(e-this.getAbsoluteY()+this.getScrollTop())*this.zoomFactor)},fromCanvasToDocumentCoordinate:function(t,e){return new i.default.geo.Point(t*(1/this.zoomFactor)+this.getAbsoluteX()-this.getScrollLeft(),e*(1/this.zoomFactor)+this.getAbsoluteY()-this.getScrollTop())},getHtmlContainer:function(){return this.html},_getEvent:function(t){if(void 0!==t.originalEvent){if(t.originalEvent.touches&&t.originalEvent.touches.length)return t.originalEvent.touches[0];if(t.originalEvent.changedTouches&&t.originalEvent.changedTouches.length)return t.originalEvent.changedTouches[0]}return t},setScrollArea:function(t){return this.scrollArea=$(t),this},getScrollArea:function(){return this.scrollArea},getScrollLeft:function(){return this.getScrollArea().scrollLeft()},getScrollTop:function(){return this.getScrollArea().scrollTop()},setScrollLeft:function(t){return this.getScrollArea().scrollLeft(t),this},setScrollTop:function(t){return this.getScrollArea().scrollTop(t),this},scrollTo:function(t,e){return this.getScrollArea().scrollTop(t).scrollLeft(e),this},getAbsoluteX:function(){return this.html.offset().left},getAbsoluteY:function(){return this.html.offset().top},getWidth:function(){return this.html.width()},getHeight:function(){return this.html.height()},add:function(t,e,n){if(t.getCanvas()!==this)return t instanceof i.default.shape.basic.Line?(this.linesToRepaintAfterDragDrop=this.lines,this.lines.add(t)):this.figures.add(t),void 0!==e&&t.setPosition(e,n),t.setCanvas(this),t.installEditPolicy(this.regionDragDropConstraint),t.getShapeElement(),t.repaint(),this.fireEvent("figure:add",{figure:t,canvas:this}),t.fireEvent("added",{figure:t,canvas:this}),t.fireEvent("move",{figure:t,x:t.getX(),y:t.getY(),dx:0,dy:0}),t instanceof i.default.shape.basic.PolyLine&&(this.calculateConnectionIntersection(),this.linesToRepaintAfterDragDrop.each(((t,e)=>{e.svgPathString=null,e.repaint()})),this.linesToRepaintAfterDragDrop=new i.default.util.ArrayList),this},remove:function(t){return t.getCanvas()!==this||(this.getSelection().contains(t)&&this.editPolicy.each(((e,n)=>{"function"==typeof n.unselect&&n.unselect(this,t)})),t instanceof i.default.shape.basic.Line?this.lines.remove(t):this.figures.remove(t),t.setCanvas(null),t instanceof i.default.Connection&&t.disconnect(),this.fireEvent("figure:remove",{figure:t}),t.fireEvent("removed",{figure:t,canvas:this})),this},getLines:function(){return this.lines},getFigures:function(){return this.figures},getLine:function(t){let e=this.lines.getSize();for(let n=0;n<e;n++){let e=this.lines.get(n);if(e.getId()===t)return e}return null},getFigure:function(t){let e=null;return this.figures.each(((n,r)=>{if(r.id===t)return e=r,!1})),e},getIntersection:function(t){let e=new i.default.util.ArrayList;return this.lineIntersections.each(((n,r)=>{r.line===t&&r.intersection.each(((t,n)=>{e.add({x:n.x,y:n.y,justTouching:n.justTouching,other:r.other})}))})),e},snapToHelper:function(t,e){if(this.getSelection().getSize()>1)return e;let n=e.clone();return this.editPolicy.each(((r,s)=>{s instanceof i.default.policy.canvas.SnapToEditPolicy&&(e=s.snap(this,t,e,n))})),e},registerPort:function(t){return this.commonPorts.contains(t)||this.commonPorts.add(t),this},unregisterPort:function(t){return this.commonPorts.remove(t),this},getAllPorts:function(){return this.commonPorts},getCommandStack:function(){return this.commandStack},getPrimarySelection:function(){return this.selection.getPrimary()},getSelection:function(){return this.selection},setCurrentSelection:function(t){return this.selection.getAll().each(((t,e)=>{this.editPolicy.each(((t,n)=>{"function"==typeof n.unselect&&n.unselect(this,e)}))})),this.addSelection(t),this},addSelection:function(t){let e=(t,e)=>{this.editPolicy.each(((t,n)=>{"function"==typeof n.select&&n.select(this,e)}))};return t instanceof i.default.util.ArrayList||t instanceof i.default.Selection?t.each(e):e(0,t),this},getBestFigure:function(t,e,n,r){Array.isArray(n)||(n=n?[n]:[]),Array.isArray(r)||(r=r?[r]:[]);let i=null,s=null,a=function(t,e){for(let n=0,r=e.length;n<r;n++){let r=e[n];if("function"==typeof r){if(t instanceof r)return!0}else if(r===t||r.contains(t))return!0}return!1},o=function(t){return a(t,n)},c=0===r.length?function(){return!0}:function(t){return a(t,r)},l=function(n){n.each((function(n,r){let s=r.figure;return l(s.children),null===i&&s.isVisible()&&s.hitTest(t,e)&&!o(s)&&c(s)&&(i=s),null===i}))};for(let n=0,r=this.resizeHandles.getSize();n<r;n++)if(s=this.resizeHandles.get(n),s.isVisible()&&s.hitTest(t,e)&&!o(s)&&c(s))return s;for(let n=0,r=this.commonPorts.getSize();n<r;n++){let r=this.commonPorts.get(n);if(l(r.children),null===i&&r.isVisible()&&r.hitTest(t,e)&&!o(r)&&c(r)&&(i=r),null!==i)return i}for(let n=this.figures.getSize()-1;n>=0;n--){let r=this.figures.get(n);if(l(r.children),null===i&&r.isVisible()&&r.hitTest(t,e)&&!o(r)&&c(r)){i=r;break}}let h=i,u=null,d=this.getBestLine(t,e,n,r);i=null;let p=this.lines.getSize();for(let t=0;t<p;t++){let e=this.lines.get(t);if(l(e.children),null!==i){u=i;break}}let f=[{i:null!==h?$(h.shape.node).index():-1,f:h},{i:null!==u?$(u.shape.node).index():-1,f:u},{i:null!==d?$(d.shape.node).index():-1,f:d}];return f=f.filter((t=>-1!==t.i)),f=f.sort(((t,e)=>e.i-t.i)),f.length>0&&(i=f[0].f),i},getBestLine:function(t,e,n){Array.isArray(n)||(n=n instanceof i.default.Figure?[n]:[]);let r=this.lines.getSize();for(let i=0;i<r;i++){let r=this.lines.get(i);if(!0===r.isVisible()&&!0===r.hitTest(t,e)&&-1===$.inArray(r,n))return r}return null},onDragEnter:function(t){},onDrag:function(t,e,n){},onDragLeave:function(t){},onDrop:function(t,e,n,r,i){},onDoubleClick:function(t,e,n,r){let i=this.getBestFigure(t,e);null===i&&(i=this.getBestLine(t,e)),this.fireEvent("dblclick",{figure:i,x:t,y:e,shiftKey:n,ctrlKey:r}),this.editPolicy.each((function(s,a){a.onDoubleClick(i,t,e,n,r)}))},onClick:function(t,e,n,r){let i=this.getBestFigure(t,e);this.fireEvent("click",{figure:i,x:t,y:e,relX:null!==i?t-i.getAbsoluteX():0,relY:null!==i?e-i.getAbsoluteY():0,shiftKey:n,ctrlKey:r}),this.editPolicy.each((function(s,a){a.onClick(i,t,e,n,r)}))},onRightMouseDown:function(t,e,n,r){let i=this.getBestFigure(t,e);this.fireEvent("contextmenu",{figure:i,x:t,y:e,shiftKey:n,ctrlKey:r}),null!==i&&(i.fireEvent("contextmenu",{figure:i,x:t,y:e,shiftKey:n,ctrlKey:r}),i.onContextMenu(t,e),i.editPolicy.each((function(s,a){a.onRightMouseDown(i,t,e,n,r)}))),this.editPolicy.each((function(s,a){a.onRightMouseDown(i,t,e,n,r)}))},onMouseWheel:function(t,e,n,r,i){let s=!0;return this.fireEvent("wheel",{wheelDelta:t,x:e,y:n,shiftKey:r,ctrlKey:i}),this.editPolicy.each((function(a,o){s=o.onMouseWheel(t,e,n,r,i)&&s})),s},fireEvent:function(t,e){if(void 0===this.eventSubscriptions[t])return;let n=this.eventSubscriptions[t];for(let t=0;t<n.length;t++)try{n[t](this,e)}catch(e){console.log(e),console.log(n[t])}},on:function(t,e){let n=t.split(" ");for(let t=0;t<n.length;t++)void 0===this.eventSubscriptions[n[t]]&&(this.eventSubscriptions[n[t]]=[]),this.eventSubscriptions[n[t]].push(e);return this},off:function(t){if(void 0===t)this.eventSubscriptions={};else if("string"==typeof t)this.eventSubscriptions[t]=[];else for(let e in this.eventSubscriptions)this.eventSubscriptions[e]=this.eventSubscriptions[e].filter((function(e){return e!==t}));return this}})},"./src/Configuration.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.Configuration={version:"@VERSION@",i18n:{command:{move:"Move Shape",assignShape:"Add Shapes to Composite",groupShapes:"Group Shapes",ungroupShapes:"Ungroup Shapes",deleteShape:"Delete Shape",moveShape:"Move Shape",moveLine:"Move Line",addShape:"Add Shape",moveVertex:"Move Vertex",moveVertices:"Move Vertices",deleteVertex:"Delete Vertex",resizeShape:"Resize Shape",rotateShape:"Rotate Shape",collection:"Execute Commands",addVertex:"Add Vertex",changeAttributes:"Change Attributes",connectPorts:"Connect Ports"},menu:{deleteSegment:"Delete Segment",addSegment:"Add Segment"},dialog:{filenamePrompt:"Enter Filename:"}},factory:{createResizeHandle:function(t,e,n,r){return console.log("deprecated call factory.createResizeHandle"),new i.default.ResizeHandle({owner:t,type:e,width:n,height:r})},createConnection:function(t,e,n,r){return console.log("deprecated call factory.createConnection"),new i.default.Connection},createInputPort:function(t){return new i.default.InputPort},createOutputPort:function(t){return new i.default.OutputPort},createHybridPort:function(t){return new i.default.HybridPort}}}},"./src/Connection.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.Connection=i.default.shape.basic.PolyLine.extend({NAME:"draw2d.Connection",init:function(t,e,n){this.sourcePort=null,this.targetPort=null,this.oldPoint=null,this.sourceDecorator=null,this.targetDecorator=null,this.sourceDecoratorNode=null,this.targetDecoratorNode=null,this.isMoving=!1,this.moveListener=t=>{t===this.sourcePort?this.setStartPoint(this.sourcePort.getAbsoluteX(),this.sourcePort.getAbsoluteY()):this.setEndPoint(this.targetPort.getAbsoluteX(),this.targetPort.getAbsoluteY())},this._super({color:"#129CE4",stroke:2,radius:3,...t},{sourceDecorator:this.setSourceDecorator,targetDecorator:this.setTargetDecorator,source:this.setSource,target:this.setTarget,...e},{sourceDecorator:this.getSourceDecorator,targetDecorator:this.getTargetDecorator,source:this.getSource,target:this.getTarget,...n})},disconnect:function(){null!==this.sourcePort&&(this.sourcePort.off(this.moveListener),this.sourcePort.connections.remove(this),this.sourcePort.fireEvent("disconnect",{port:this.sourcePort,connection:this}),this.canvas?.fireEvent("disconnect",{port:this.sourcePort,connection:this}),this.sourcePort.onDisconnect(this),this.fireSourcePortRouteEvent()),null!==this.targetPort&&(this.targetPort.off(this.moveListener),this.targetPort.connections.remove(this),this.targetPort.fireEvent("disconnect",{port:this.targetPort,connection:this}),this.canvas?.fireEvent("disconnect",{port:this.targetPort,connection:this}),this.targetPort.onDisconnect(this),this.fireTargetPortRouteEvent())},reconnect:function(){null!==this.sourcePort&&(this.sourcePort.on("move",this.moveListener),this.sourcePort.connections.add(this),this.sourcePort.fireEvent("connect",{port:this.sourcePort,connection:this}),this.canvas?.fireEvent("connect",{port:this.sourcePort,connection:this}),this.sourcePort.onConnect(this),this.fireSourcePortRouteEvent()),null!==this.targetPort&&(this.targetPort.on("move",this.moveListener),this.targetPort.connections.add(this),this.targetPort.fireEvent("connect",{port:this.targetPort,connection:this}),this.canvas?.fireEvent("connect",{port:this.targetPort,connection:this}),this.targetPort.onConnect(this),this.fireTargetPortRouteEvent()),this.routingRequired=!0,this.repaint()},isResizeable:function(){return this.isDraggable()},add:function(t,e,n){if(!(e instanceof i.default.layout.locator.ConnectionLocator))throw"Locator must implement the class draw2d.layout.locator.ConnectionLocator";this._super(t,e,n)},setSourceDecorator:function(t){return this.sourceDecorator?.setParent(null),this.sourceDecorator=t,this.routingRequired=!0,this.sourceDecorator.setParent(this),this.sourceDecoratorNode?.remove(),this.sourceDecoratorNode=null,this.repaint(),this},getSourceDecorator:function(){return this.sourceDecorator},setTargetDecorator:function(t){return this.targetDecorator?.setParent(null),this.targetDecorator=t,this.routingRequired=!0,this.targetDecorator.setParent(this),this.targetDecoratorNode?.remove(),this.targetDecoratorNode=null,this.repaint(),this},getTargetDecorator:function(){return this.targetDecorator},calculatePath:function(t){if(null===this.sourcePort||null===this.targetPort)return this;if(this._super(t),null!==this.shape){let t=this.sourcePort.getZOrder(),e=this.targetPort.getZOrder();this.toBack(t<e?this.sourcePort:this.targetPort)}return this},repaint:function(t){if(!0!==this.repaintBlocked&&null!==this.shape&&null!==this.sourcePort&&null!==this.targetPort){if(this._super(t),null!==this.targetDecorator&&null===this.targetDecoratorNode&&(this.targetDecoratorNode=this.targetDecorator.paint(this.getCanvas().paper)),null!==this.sourceDecorator&&null===this.sourceDecoratorNode&&(this.sourceDecoratorNode=this.sourceDecorator.paint(this.getCanvas().paper)),null!==this.sourceDecoratorNode){let t=this.getVertices().first();this.sourceDecoratorNode.transform("r"+this.getStartAngle()+","+t.x+","+t.y+" t"+t.x+","+t.y),this.sourceDecoratorNode.attr({opacity:this.alpha}),null===this.sourceDecorator.getColor()?this.sourceDecoratorNode.attr({stroke:"#"+this.lineColor.hex()}):this.sourceDecoratorNode.attr({stroke:"#"+this.sourceDecorator.getColor().hex()}),this.sourceDecoratorNode.forEach((t=>{t.node.setAttribute("class",null!==this.cssClass?this.cssClass:"")}))}if(null!==this.targetDecoratorNode){let t=this.getVertices().last();this.targetDecoratorNode.transform("r"+this.getEndAngle()+","+t.x+","+t.y+" t"+t.x+","+t.y),this.targetDecoratorNode.attr({opacity:this.alpha}),null===this.targetDecorator.getColor()?this.targetDecoratorNode.attr({stroke:this.lineColor.hash()}):this.targetDecoratorNode.attr({stroke:this.targetDecorator.getColor().hash()}),this.targetDecoratorNode.forEach((t=>{t.node.setAttribute("class",null!==this.cssClass?this.cssClass:"")}))}}},getAbsoluteX:function(){return 0},getAbsoluteY:function(){return 0},postProcess:function(t){this.router.postProcess(this,this.getCanvas(),t)},onDrag:function(t,e,n,r){null!==this.command&&(this.router.onDrag(this,t,e,n,r),this.command.updateVertices(this.getVertices().clone()),this.editPolicy.each(((t,e)=>{e instanceof i.default.policy.figure.DragDropEditPolicy&&e.onDrag(this.canvas,this)})),this.svgPathString=null,this.repaint(),this.editPolicy.each(((t,e)=>{e instanceof i.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this.fireEvent("move",{figure:this,dx:t,dy:t}))},toFront:function(t){return this._super(t),null!==this.shape&&(this.targetDecoratorNode?.insertAfter(this.shape),this.sourceDecoratorNode?.insertAfter(this.shape)),this},toBack:function(t){return this._super(t),null!==this.shape&&(this.targetDecoratorNode?.insertAfter(this.shape),this.sourceDecoratorNode?.insertAfter(this.shape)),this},getStartPoint:function(t){return this.getStartPosition(t)},getStartPosition:function(t){return!1===this.isMoving?t?this.sourcePort.getConnectionAnchorLocation(t,this):this.sourcePort.getConnectionAnchorLocation(this.targetPort.getConnectionAnchorReferencePoint(this),this):this._super()},getEndPoint:function(t){return this.getEndPosition(t)},getEndPosition:function(t){return!1===this.isMoving?t?this.targetPort.getConnectionAnchorLocation(t,this):this.targetPort.getConnectionAnchorLocation(this.sourcePort.getConnectionAnchorReferencePoint(this),this):this._super()},setSource:function(t){null!==this.sourcePort&&(this.sourcePort.off(this.moveListener),this.sourcePort.connections.remove(this),this.sourcePort.fireEvent("disconnect",{port:this.sourcePort,connection:this}),this.canvas?.fireEvent("disconnect",{port:this.sourcePort,connection:this}),this.sourcePort.onDisconnect(this)),this.sourcePort=t,null!==this.sourcePort&&(this.routingRequired=!0,this.fireSourcePortRouteEvent(),this.sourcePort.connections.add(this),this.sourcePort.on("move",this.moveListener),this.canvas?.fireEvent("connect",{port:this.sourcePort,connection:this}),this.sourcePort.fireEvent("connect",{port:this.sourcePort,connection:this}),this.sourcePort.onConnect(this),this.setStartPoint(t.getAbsoluteX(),t.getAbsoluteY()),this.fireEvent("connect",{port:this.sourcePort,connection:this}))},getSource:function(){return this.sourcePort},setTarget:function(t){null!==this.targetPort&&(this.targetPort.off(this.moveListener),this.targetPort.connections.remove(this),this.targetPort.fireEvent("disconnect",{port:this.targetPort,connection:this}),this.canvas?.fireEvent("disconnect",{port:this.targetPort,connection:this}),this.targetPort.onDisconnect(this)),this.targetPort=t,null!==this.targetPort&&(this.routingRequired=!0,this.fireTargetPortRouteEvent(),this.targetPort.connections.add(this),this.targetPort.on("move",this.moveListener),this.canvas?.fireEvent("connect",{port:this.targetPort,connection:this}),this.targetPort.fireEvent("connect",{port:this.targetPort,connection:this}),this.targetPort.onConnect(this),this.setEndPoint(t.getAbsoluteX(),t.getAbsoluteY()),this.fireEvent("connect",{port:this.targetPort,connection:this}))},getTarget:function(){return this.targetPort},getPeerPort:function(t){return t===this.sourcePort?this.targetPort:t===this.targetPort?this.sourcePort:null},sharingPorts:function(t){return this.sourcePort==t.sourcePort||this.sourcePort==t.targetPort||this.targetPort==t.sourcePort||this.targetPort==t.targetPort},setCanvas:function(t){if(this.canvas===t)return;let e=null===this.canvas?t:this.canvas;this._super(t),this.sourceDecoratorNode?.remove(),this.sourceDecoratorNode=null,this.targetDecoratorNode?.remove(),this.targetDecoratorNode=null,null===this.canvas?(null!==this.sourcePort&&(this.sourcePort.off(this.moveListener),e.fireEvent("disconnect",{port:this.sourcePort,connection:this}),this.sourcePort.onDisconnect(this)),null!==this.targetPort&&(this.targetPort.off(this.moveListener),e.fireEvent("disconnect",{port:this.targetPort,connection:this}),this.targetPort.onDisconnect(this))):(null!==this.sourcePort&&(this.sourcePort.on("move",this.moveListener),this.canvas.fireEvent("connect",{port:this.sourcePort,connection:this}),this.sourcePort.onConnect(this)),null!==this.targetPort&&(this.targetPort.on("move",this.moveListener),this.canvas.fireEvent("connect",{port:this.targetPort,connection:this}),this.targetPort.onConnect(this)))},getStartAngle:function(){if(0===this.lineSegments.getSize())return 0;let t=this.lineSegments.get(0).start,e=this.lineSegments.get(0).end;this.router instanceof i.default.layout.connection.SplineConnectionRouter&&(e=this.lineSegments.get(5)?.end??e);let n=Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)),r=-180/Math.PI*Math.asin((t.y-e.y)/n);return r<0?r=e.x<t.x?Math.abs(r)+180:360-Math.abs(r):e.x<t.x&&(r=180-r),r},getEndAngle:function(){if(0===this.lineSegments.getSize())return 90;let t=this.lineSegments.get(this.lineSegments.getSize()-1).end,e=this.lineSegments.get(this.lineSegments.getSize()-1).start;this.router instanceof i.default.layout.connection.SplineConnectionRouter&&(e=this.lineSegments.get(this.lineSegments.getSize()-5)?.end??e);let n=Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)),r=-180/Math.PI*Math.asin((t.y-e.y)/n);return r<0?r=e.x<t.x?Math.abs(r)+180:360-Math.abs(r):e.x<t.x&&(r=180-r),r},fireSourcePortRouteEvent:function(){this.sourcePort.getConnections().each(((t,e)=>{e.routingRequired=!0,e.repaint()}))},fireTargetPortRouteEvent:function(){this.targetPort.getConnections().each(((t,e)=>{e.routingRequired=!0,e.repaint()}))},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.MOVE&&this.isDraggable()?new i.default.command.CommandMoveVertices(this):t.getPolicy()===i.default.command.CommandType.MOVE_BASEPOINT?new i.default.command.CommandReconnect(this):this._super(t)},getPersistentAttributes:function(){let t=this._super(),e=this.getSource().getParent();for(;null!==e.getParent();)e=e.getParent();for(t.source={node:e.getId(),port:this.getSource().getName()},e=this.getTarget().getParent();null!==e.getParent();)e=e.getParent();return t.target={node:e.getId(),port:this.getTarget().getName()},null!==this.sourceDecorator&&(t.source.decoration=this.sourceDecorator.NAME),null!==this.targetDecorator&&(t.target.decoration=this.targetDecorator.NAME),t},setPersistentAttributes:function(t){return this._super(t),void 0!==t.target.decoration&&null!=t.target.decoration&&this.setTargetDecorator(Function(`return new ${t.target.decoration}()`)()),void 0!==t.source.decoration&&null!=t.source.decoration&&this.setSourceDecorator(Function(`return new ${t.source.decoration}()`)()),this}})},"./src/Figure.js":(t,e,n)=>{"use strict";var r=o(n("./src/packages.js")),i=o(n("./src/util/JSONUtil.js")),s=o(n("./src/util/UUID.js")),a=o(n("./src/util/extend.js"));function o(t){return t&&t.__esModule?t:{default:t}}r.default.Figure=Class.extend({NAME:"draw2d.Figure",MIN_TIMER_INTERVAL:50,init:function(t,e,n){this.setterWhitelist={id:this.setId,x:this.setX,y:this.setY,width:this.setWidth,height:this.setHeight,boundingBox:this.setBoundingBox,minWidth:this.setMinWidth,minHeight:this.setMinHeight,cssClass:this.setCssClass,userData:this.setUserData,draggable:this.setDraggable,resizeable:this.setResizeable,selectable:this.setSelectable,angle:this.setRotationAngle,alpha:this.setAlpha,opacity:this.setAlpha,glow:this.setGlow,visible:this.setVisible,keepAspectRatio:this.setKeepAspectRatio,...e},this.getterWhitelist={id:this.getId,visible:this.isVisible,angle:this.getRotationAngle,x:this.getX,y:this.getY,userData:this.getUserData,width:this.getWidth,height:this.getHeight,draggable:this.isDraggable,resizeable:this.isResizeable,selectable:this.isSelectable,alpha:this.getAlpha,opacity:this.getAlpha,...n},this.id=s.default.create(),this.cachedZOrder=-1,this.isResizeHandle=!1,this.command=null,this.canvas=null,this.shape=null,this.children=new r.default.util.ArrayList,this.selectable=!0,this.deleteable=!0,this.resizeable=!0,this.draggable=!0,this.visible=!0,this.keepAspectRatio=!1,this.canSnapToHelper=!0,this.snapToGridAnchor=new r.default.geo.Point(0,0),this.editPolicy=new r.default.util.ArrayList,this.timerId=-1,this.timerInterval=0,this.parent=null,this.composite=null,this.userData=null,this.x=0,this.y=0,this.minHeight=5,this.minWidth=5,this.rotationAngle=0,this.cssClass=this.NAME.replace(new RegExp("[.]","g"),"_"),this.width=this.getMinWidth(),this.height=this.getMinHeight(),this.alpha=1,this.isInDragDrop=!1,this.ox=0,this.oy=0,this.repaintBlocked=!1,this.lastAppliedAttributes={},this.selectionHandles=new r.default.util.ArrayList,this.panningDelegate=null,this.eventSubscriptions={},this.relocateChildrenEventCallback=()=>{this.children.each(((t,e)=>{e.locator.relocate(t,e.figure)}))},this.defaultSelectionAdapter=this.selectionAdapter=()=>this,this.installEditPolicy(new r.default.policy.figure.RectangleSelectionFeedbackPolicy),this.attr(t)},attr:function(t,e){let n=this.repaintBlocked;try{if($.isPlainObject(t))for(let e in t)if("userData."===e.substring(0,9))this.userData??={},i.default.set({userData:this.userData},e,t[e]),this.fireEvent("change:"+e,{value:t[e]});else{let n=this.setterWhitelist[e],r=t[e];n&&void 0!==r?n.call(this,r):"function"==typeof t[e]&&(this[e]=r.bind(this))}else if("string"==typeof t){if(void 0===e){let e=this.getterWhitelist[t];if("function"==typeof e)return e.call(this);if("userData."===t.substring(0,9)){let e={userData:this.userData};return i.default.get(e,t)}return}if("function"==typeof e&&(e=e()),"userData."===t.substring(0,9))this.userData??={},i.default.set({userData:this.userData},t,e),this.fireEvent("change:"+t,{value:e});else{let n=this.setterWhitelist[t];n?.call(this,e)}}else{if(Array.isArray(t))return Object.assign({},...Object.keys(t).map((t=>({[t]:this.attr(t)}))));if(void 0===t){let t={};for(let e in this.getterWhitelist)t[e]=this.getterWhitelist[e].call(this);return t}}}finally{this.repaintBlocked=n}return this},pick:function(t,e){let n,r="string"!=typeof arguments[1]?arguments[1]:Array.prototype.slice.call(arguments,1),i={};for(n in r)void 0!==t[n]&&(i[n]=t[n]);return i},select:function(t){return void 0===t&&(t=!0),this.editPolicy.each(((e,n)=>{n instanceof r.default.policy.figure.SelectionPolicy&&n.onSelect(this.canvas,this,t)})),this.canvas?.getSelection().add(this),this.fireEvent("select",{figure:this}),this},unselect:function(){return this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.SelectionPolicy&&e.onUnselect(this.canvas,this)})),this.canvas?.getSelection().remove(this),this.fireEvent("unselect",{figure:this}),this},setSelectionAdapter:function(t){return this.selectionAdapter=t??this.defaultSelectionAdapter,this},getSelectionAdapter:function(){return this.selectionAdapter},isSelected:function(){return this.canvas?.getSelection().contains(this)},setUserData:function(t){return this.userData=t,this.fireEvent("change:userData",{value:t}),this},getUserData:function(){return this.userData},getId:function(){return this.id},setId:function(t){return this.id=t,this},getCssClass:function(){return this.cssClass},setCssClass:function(t){return this.cssClass=null===t?null:t.trim(),null===this.shape||(null===this.cssClass?this.shape.node.removeAttribute("class"):this.shape.node.setAttribute("class",this.cssClass),this.fireEvent("change:cssClass",{value:this.cssClass})),this},hasCssClass:function(t){return null!==this.cssClass&&new RegExp(" "+t.trim()+" ").test(" "+this.cssClass+" ")},addCssClass:function(t){return t=t.trim(),this.hasCssClass(t)||(null===this.cssClass?this.setCssClass(t):this.setCssClass(this.cssClass+" "+t),this.fireEvent("change:cssClass",{value:this.cssClass})),this},removeCssClass:function(t){t=t.trim();let e=" "+this.cssClass.replace(/[\t\r\n]/g," ")+" ";if(this.hasCssClass(t)){for(;e.indexOf(" "+t+" ")>=0;)e=e.replace(" "+t+" "," ");this.setCssClass(e.replace(/^\s+|\s+$/g,"")),this.fireEvent("change:cssClass",{value:this.cssClass})}return this},toggleCssClass:function(t){t=t.trim();let e=" "+this.cssClass.replace(/[\t\r\n]/g," ")+" ";if(this.hasCssClass(t)){for(;e.indexOf(" "+t+" ")>=0;)e=e.replace(" "+t+" "," ");this.setCssClass(e.replace(/^\s+|\s+$/g,""))}else this.setCssClass(this.cssClass+" "+t);return this.fireEvent("change:cssClass",{value:this.cssClass}),this},setCanvas:function(t){return null===t&&null!==this.shape&&(this.isSelected()&&this.unselect(),this.shape.remove(),this.shape=null),this.canvas=t,null!==this.canvas&&this.getShapeElement(),this.lastAppliedAttributes={},null===t?this.stopTimer():this.timerInterval>=this.MIN_TIMER_INTERVAL&&this.startTimer(this.timerInterval),this.children.each(((e,n)=>{n.figure.setCanvas(t)})),this},getCanvas:function(){return this.canvas},startTimer:function(t){return this.stopTimer(),this.timerInterval=Math.max(this.MIN_TIMER_INTERVAL,t),null!==this.canvas&&(this.timerId=window.setInterval((()=>{this.onTimer(),this.fireEvent("timer")}),this.timerInterval)),this},stopTimer:function(){return this.timerId>=0&&(window.clearInterval(this.timerId),this.timerId=-1),this},onTimer:function(){},toFront:function(t){if(this.composite instanceof r.default.shape.composite.StrongComposite&&void 0!==t){t.getZOrder()<this.composite.getZOrder()&&(t=this.composite)}if(void 0===t){if(this.getShapeElement().toFront(),null!==this.canvas){let t=this.canvas.getFigures(),e=this.canvas.getLines();null!==t.remove(this)?t.add(this):null!==e.remove(this)&&e.add(this)}}else if(this.getShapeElement().insertAfter(t.getTopLevelShapeElement()),null!==this.canvas){let e=this.canvas.getFigures(),n=this.canvas.getLines();if(null!==e.remove(this)){let n=e.indexOf(t);e.insertElementAt(this,n+1)}else null!==n.remove(this)&&n.add(this)}return this.children.each(((t,e)=>e.figure.toFront(this))),this.selectionHandles.each(((t,e)=>e.toFront())),this.cachedZOrder=-1,this},toBack:function(t){if(!(this.composite instanceof r.default.shape.composite.StrongComposite)){if(null!==this.canvas){let e=this.canvas.getFigures(),n=this.canvas.getLines();null!==e.remove(this)?e.insertElementAt(this,0):null!==n.remove(this)&&n.insertElementAt(this,0),void 0!==t?this.getShapeElement().insertBefore(t.getShapeElement()):this.getShapeElement().toBack()}return this.children.each(((t,e)=>{e.figure.toFront(this)}),!0),this.cachedZOrder=-1,this}this.toFront(this.composite)},installEditPolicy:function(t){return t instanceof r.default.policy.figure.SelectionFeedbackPolicy&&this.editPolicy.grep((t=>{let e=!(t instanceof r.default.policy.figure.SelectionFeedbackPolicy);return e||t.onUninstall(this),e})),this.editPolicy.grep((e=>{let n=e.__proto__!==t.__proto__;return n||e.onUninstall(this),n})),t.onInstall(this),this.editPolicy.add(t),this},uninstallEditPolicy:function(t){let e=this.editPolicy.remove(t);if(null!==e)return void e.onUninstall(this);let n="string"==typeof t?t:t.NAME;this.editPolicy.grep((t=>t.NAME!==n||(t.onUninstall(this),!1)))},add:function(t,e,n){if(null==e)throw"Second parameter 'locator' is required for method 'Figure#add'";return t.setParent(this),e.bind(this,t),t.on("resize",this.relocateChildrenEventCallback),isNaN(parseInt(n))?this.children.add({figure:t,locator:e}):this.children.insertElementAt({figure:t,locator:e},n),null!==this.canvas&&t.setCanvas(this.canvas),this.repaint(),this},remove:function(t){if(null==t)return debug.warn("The parameter child is required for Figure.remove"),null;let e=null;return this.children.grep((function(n){let r=n.figure!==t;return r||(e=n),r})),null!==e?(t.setParent(null),t.setCanvas(null),e.locator.unbind(this,t),t.off(this.relocateChildrenEventCallback),this.repaint(),e):null},getChildren:function(){return this.children.clone().map((t=>t.figure))},resetChildren:function(){return this.children.each(((t,e)=>{e.figure.setCanvas(null)})),this.children=new r.default.util.ArrayList,this.repaint(),this},getShapeElement:function(){return null!==this.shape||(this.shape=this.createShapeElement(),this.isVisible()||this.shape.hide(),null!==this.cssClass&&this.shape.node.setAttribute("class",this.cssClass)),this.shape},getTopLevelShapeElement:function(){return this.getShapeElement()},createShapeElement:function(){throw"Inherited class ["+this.NAME+"] must override the abstract method createShapeElement"},repaint:function(t){return!0===this.repaintBlocked||null===this.shape?this:(t??={},!0!==this.visible?(!0===this.shape.isVisible()&&(isNaN(parseFloat(t.visibleDuration))?this.shape.hide():$(this.shape.node).fadeOut(t.visibleDuration,(()=>this.shape.hide()))),this):(!1===this.shape.isVisible()&&(isNaN(parseFloat(t.visibleDuration))?this.shape.show():$(this.shape.node).fadeIn(t.visibleDuration,(()=>this.shape.show()))),t.opacity=this.alpha,t=i.default.flatDiff(t,this.lastAppliedAttributes),Object.getOwnPropertyNames(t).length>0&&this.shape.attr(t),this.lastAppliedAttributes=t,this.applyTransformation(),("x"in t||"width"in t||"cx"in t||"path"in t)&&this.children.each(((t,e)=>{e.locator.relocate(t,e.figure)})),this))},applyTransformation:function(){return this},setGlow:function(t){return this},getHandleBBox:function(){return null},onDragStart:function(t,e,n,i){this.isInDragDrop=!1;let s=this.getHandleBBox();if(null!==s&&!1===s.translate(this.getAbsolutePosition().scale(-1)).hitTest(t,e))return this.panningDelegate=this.getBestChild(this.getX()+t,this.getY()+e),null!==this.panningDelegate&&this.panningDelegate.onDragStart(t-this.panningDelegate.x,e-this.panningDelegate.y,n,i),!1;if(this.command=this.createCommand(new r.default.command.CommandType(r.default.command.CommandType.MOVE)),null!==this.command){this.ox=this.getX(),this.oy=this.getY(),this.isInDragDrop=!0;let s=this,a=!0;return this.editPolicy.each((function(o,c){c instanceof r.default.policy.figure.DragDropEditPolicy&&(a=a&&c.onDragStart(s.canvas,s,t,e,n,i))})),a&&this.fireEvent("dragstart",{x:t,y:e,shiftKey:n,ctrlKey:i}),a}return!1},onDrag:function(t,e,n,i,s,a){this.editPolicy.each(((n,i)=>{if(i instanceof r.default.policy.figure.DragDropEditPolicy){let n=i.adjustPosition(this,this.ox+t,this.oy+e);n&&(t=n.x-this.ox,e=n.y-this.oy)}}));let o=new r.default.geo.Point(this.ox+t,this.oy+e);this.getCanSnapToHelper()&&(o=this.getCanvas().snapToHelper(this,o)),this.setPosition(o),this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.onDrag(this.canvas,this)})),this.fireEvent("drag",{dx:t,dy:e,dx2:n,dy2:i,shiftKey:s,ctrlKey:a})},onPanning:function(t,e,n,r,i,s){},onPanningEnd:function(){},onDragEnd:function(t,e,n,i){null!==this.command&&(this.command.setPosition(this.x,this.y),this.canvas.getCommandStack().execute(this.command),this.command=null),this.isInDragDrop=!1,this.panningDelegate=null,this.editPolicy.each(((s,a)=>{a instanceof r.default.policy.figure.DragDropEditPolicy&&a.onDragEnd(this.canvas,this,t,e,n,i)})),this.fireEvent("move",{x:this.getX(),y:this.getY(),dx:0,dy:0}),this.fireEvent("change:x",{x:this.getX(),dx:0}),this.fireEvent("change:y",{y:this.getY(),dy:0}),this.fireEvent("dragend",{x:t,y:e,shiftKey:n,ctrlKey:i})},delegateTarget:function(t){let e=t;return this.getCanvas().getDropInterceptorPolicies().each(((n,r)=>{if(e=r.delegateTarget(t,this),null!==e)return!1})),e},onDragEnter:function(t){},onDragLeave:function(t){},onDrop:function(t,e,n,r,i){},onCatch:function(t,e,n,r,i){},onMouseEnter:function(){},onMouseLeave:function(){},onDoubleClick:function(){},onClick:function(){},onContextMenu:function(t,e){},setAlpha:function(t){if((t=Math.min(1,Math.max(0,parseFloat(t))))!==this.alpha)return this.alpha=t,this.repaint(),this.fireEvent("change:opacity",{value:this.alpha}),this},getAlpha:function(){return this.alpha},setRotationAngle:function(t){return this.rotationAngle=t,this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this.fireEvent("change:angle",{value:this.rotationAngle}),this.repaint(),this},getRotationAngle:function(){return this.rotationAngle},setVisible:function(t,e){if((t=!!t)!==this.visible)return this.visible=t,this.repaint({visibleDuration:e}),this.fireEvent(this.visible?"show":"hide"),this.fireEvent("change:visibility",{value:this.visible}),this},isVisible:function(){return this.visible&&null!==this.shape},setKeepAspectRatio:function(t){return this.keepAspectRatio=t,this},getKeepAspectRatio:function(){return this.keepAspectRatio},getZOrder:function(){let t=this.shape?.node;return!t||this.cachedZOrder>=0||(this.cachedZOrder=Array.from(t.parentNode.children).indexOf(t)),this.cachedZOrder},setCanSnapToHelper:function(t){return this.canSnapToHelper=!!t,this},getCanSnapToHelper:function(){return this.canSnapToHelper},getSnapToGridAnchor:function(){return this.snapToGridAnchor},setSnapToGridAnchor:function(t){return this.snapToGridAnchor=t,this},setWidth:function(t){return this.setDimension(parseFloat(t),this.getHeight()),this.fireEvent("change:width",{value:this.width}),this},getWidth:function(){return this.width},setHeight:function(t){return this.setDimension(this.getWidth(),parseFloat(t)),this.fireEvent("change:height",{value:this.height}),this},getHeight:function(){return this.height},getMinWidth:function(){return this.minWidth},setMinWidth:function(t){return this.minWidth=parseFloat(t),this.fireEvent("change:minWidth",{value:this.minWidth}),this.setWidth(this.getWidth()),this},getMinHeight:function(){return this.minHeight},setMinHeight:function(t){return this.minHeight=parseFloat(t),this.fireEvent("change:minHeight",{value:this.minHeight}),this.setHeight(this.getHeight()),this},setX:function(t){return this.setPosition(parseFloat(t),this.y),this},getX:function(){return this.x},setY:function(t){return this.setPosition(this.x,parseFloat(t)),this},getY:function(){return this.y},getAbsoluteX:function(){return this.parent?this.getX()+this.parent.getAbsoluteX():this.getX()},getAbsoluteY:function(){return this.parent?this.getY()+this.parent.getAbsoluteY():this.getY()},getAbsolutePosition:function(){return new r.default.geo.Point(this.getAbsoluteX(),this.getAbsoluteY())},getAbsoluteBounds:function(){return new r.default.geo.Rectangle(this.getAbsoluteX(),this.getAbsoluteY(),this.getWidth(),this.getHeight())},setPosition:function(t,e){let n=this.x,i=this.y;t instanceof r.default.geo.Point?(this.x=t.x,this.y=t.y):(this.x=t,this.y=e),this.editPolicy.each(((t,e)=>{if(e instanceof r.default.policy.figure.DragDropEditPolicy){let t=e.adjustPosition(this,this.x,this.y);this.x=t.x,this.y=t.y}})),this.repaint(),this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)}));let s={x:this.x,y:this.y,dx:this.x-n,dy:this.y-i};return this.fireEvent("move",s),this.fireEvent("change:x",s),this.fireEvent("change:y",s),this},getPosition:function(){return new r.default.geo.Point(this.getX(),this.getY())},translate:function(t,e){return this.setPosition(this.getX()+t,this.getY()+e),this},setDimension:function(t,e){let n={width:this.width,height:this.height};return t=Math.max(this.getMinWidth(),t),e=Math.max(this.getMinHeight(),e),this.width===t&&this.height===e?(this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this):(this.editPolicy.each(((n,i)=>{if(i instanceof r.default.policy.figure.DragDropEditPolicy){let n=i.adjustDimension(this,t,e);t=n.w,e=n.h}})),!0===this.keepAspectRatio?t>=this.getMinWidth()&&(e=this.getHeight()*(t/this.getWidth()))>=this.getMinHeight()&&(this.width=t,this.height=e):(this.width=Math.max(this.getMinWidth(),t),this.height=Math.max(this.getMinHeight(),e)),this.repaint(),this.fireEvent("resize"),this.fireEvent("change:dimension",{height:this.height,width:this.width,old:n}),this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this)},setBoundingBox:function(t){t=new r.default.geo.Rectangle(t);let e=this.repaintBlocked;return this.repaintBlocked=!0,this.setPosition(t.x,t.y),this.repaintBlocked=e,this.setDimension(t.w,t.h),this},getBoundingBox:function(){return new r.default.geo.Rectangle(this.getAbsoluteX(),this.getAbsoluteY(),this.getWidth(),this.getHeight())},getOuterBoundingBox:function(){let t=new r.default.geo.Rectangle(this.getAbsoluteX(),this.getAbsoluteY(),this.getWidth(),this.getHeight());return this.getChildren().each(((e,n)=>{let r=n.getOuterBoundingBox();t.merge(r)})),t},hitTest:function(t,e,n){return"number"==typeof n?this.getBoundingBox().scale(n,n).hitTest(t,e):this.getBoundingBox().hitTest(t,e)},setDraggable:function(t){return this.draggable=!!t,this},isDraggable:function(){return null!==this.composite?this.composite.isMemberDraggable(this,this.draggable):this.draggable},isResizeable:function(){return this.resizeable},setResizeable:function(t){return this.resizeable=!!t,this.fireEvent("change:resizeable",{value:this.resizeable}),this},isSelectable:function(){return null!==this.composite?this.composite.isMemberSelectable(this,this.selectable):this.selectable},setSelectable:function(t){return this.selectable=!!t,this.fireEvent("change:selectable",{value:this.selectable}),this},isStrechable:function(){return!this.getKeepAspectRatio()},isDeleteable:function(){return this.deleteable},setDeleteable:function(t){return this.deleteable=!!t,this.fireEvent("change:deleteable",{value:this.deleteable}),this},setParent:function(t){return this.parent=t,null!==t?this.setSelectionAdapter(t.getSelectionAdapter()):this.setSelectionAdapter(null),this},getParent:function(){return this.parent},contains:function(t){if(t.getParent()===this)return!0;for(let e=0,n=this.children.getSize();e<n;e++){if(this.children.get(e).figure.contains(t))return!0}return!1},getRoot:function(){let t=this.parent;for(;null!==t&&null!==t.parent;)t=t.parent;return t},setComposite:function(t){if(null!==t&&!(t instanceof r.default.shape.composite.StrongComposite))throw"'composite must inherit from 'draw2d.shape.composite.StrongComposite'";return this.composite=t,this},getComposite:function(){return this.composite},fireEvent:function(t,e){try{if(void 0===this.eventSubscriptions[t])return;if(!0===this._inEvent)return;this._inEvent=!0;let n=this.eventSubscriptions[t];for(let t=0;t<n.length;t++)n[t](this,e)}catch(t){throw console.log(t),t}finally{this._inEvent=!1,"change:"===t.substring(0,7)&&this.fireEvent("change",t.substring(7))}},on:function(t,e,n){let r=t.split(" ");n&&((e=e.bind(n)).___originalCallback=e);for(let t=0;t<r.length;t++)void 0===this.eventSubscriptions[r[t]]&&(this.eventSubscriptions[r[t]]=[]),-1!==$.inArray(e,this.eventSubscriptions[r[t]])||this.eventSubscriptions[r[t]].push(e);return this},off:function(t){if(void 0===t)this.eventSubscriptions={};else if("string"==typeof t)this.eventSubscriptions[t]=[];else for(let e in this.eventSubscriptions)this.eventSubscriptions[e]=this.eventSubscriptions[e].filter((e=>void 0!==e.___originalCallback?e.___originalCallback!==t:e!==t));return this},getBestChild:function(t,e,n){Array.isArray(n)||(n=n instanceof r.default.Figure?[n]:[]);let i=null,s=function(r){r.each((function(r,a){let o=a.figure;return s(o.children),null===i&&!0===o.isVisible()&&!0===o.hitTest(t,e)&&-1===$.inArray(o,n)&&(i=o),null===i}))};return s(this.children),i},createCommand:function(t){return null===t?null:t.getPolicy()===r.default.command.CommandType.MOVE?this.isDraggable()?new r.default.command.CommandMove(this):null:t.getPolicy()===r.default.command.CommandType.DELETE?this.isDeleteable()?new r.default.command.CommandDelete(this):null:t.getPolicy()===r.default.command.CommandType.RESIZE&&this.isResizeable()?new r.default.command.CommandResize(this):null},clone:function(t){t={excludeChildren:!1,...t};let e=Function(`return new ${this.NAME}()`)(),n=e.id;return e.setPersistentAttributes(this.getPersistentAttributes()),e.id=n,!1===t.excludeChildren&&(e.resetChildren(),this.children.each(((t,n)=>{let r=n.figure.clone(),i=n.locator.NAME?Function(`return new ${n.locator.NAME}()`)():null;e.add(r,i)}))),e},getPersistentAttributes:function(){let t={type:this.NAME,id:this.id,x:this.getX(),y:this.getY(),width:this.width,height:this.height,alpha:this.alpha,selectable:this.selectable,draggable:this.draggable,angle:this.rotationAngle,userData:(0,a.default)(!0,{},this.userData)};return null!==this.cssClass&&(t.cssClass=this.cssClass),null!==this.composite&&(t.composite=this.composite.getId()),t},setPersistentAttributes:function(t){return this.id=t.id,t.x&&t.y&&this.setPosition(parseFloat(t.x),parseFloat(t.y)),void 0!==t.width&&(this.width=parseFloat(t.width)),void 0!==t.height&&(this.height=parseFloat(t.height)),void 0!==t.userData&&(this.userData=t.userData),void 0!==t.selectable&&(this.selectable=t.selectable),void 0!==t.draggable&&(this.draggable=t.draggable),void 0!==t.cssClass&&this.setCssClass(t.cssClass),void 0!==t.alpha&&this.setAlpha(parseFloat(t.alpha)),void 0!==t.angle&&(this.rotationAngle=parseFloat(t.angle)),this}})},"./src/HeadlessCanvas.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.HeadlessCanvas=Class.extend({NAME:"draw2d.HeadlessCanvas",init:function(){this.figures=new i.default.util.ArrayList,this.lines=new i.default.util.ArrayList,this.commonPorts=new i.default.util.ArrayList,this.eventSubscriptions={},this.commandStack=new i.default.command.CommandStack},clear:function(){return this.figures=new i.default.util.ArrayList,this.lines=new i.default.util.ArrayList,this.commonPorts=new i.default.util.ArrayList,this.commandStack.markSaveLocation(),this},calculateConnectionIntersection:function(){},hideDecoration:function(){},showDecoration:function(){},add:function(t,e,n){if(t.getCanvas()!==this)return t instanceof i.default.shape.basic.Line?this.lines.add(t):this.figures.add(t),t.canvas=this,this},getLines:function(){return this.lines},getFigures:function(){return this.figures},getLine:function(t){for(var e=this.lines.getSize(),n=0;n<e;n++){var r=this.lines.get(n);if(r.getId()===t)return r}return null},getFigure:function(t){var e=null;return this.figures.each((function(n,r){if(r.id===t)return e=r,!1})),e},registerPort:function(t){return this.commonPorts.contains(t)||this.commonPorts.add(t),this},getAllPorts:function(){return this.commonPorts},getCommandStack:function(){return this.commandStack},fireEvent:function(t,e){if(void 0!==this.eventSubscriptions[t])for(var n=this.eventSubscriptions[t],r=0;r<n.length;r++)try{n[r](this,e)}catch(t){console.log(t),console.log(n[r])}},on:function(t,e){for(var n=t.split(" "),r=0;r<n.length;r++)void 0===this.eventSubscriptions[n[r]]&&(this.eventSubscriptions[n[r]]=[]),this.eventSubscriptions[n[r]].push(e);return this},off:function(t){if(void 0===t)this.eventSubscriptions={};else if("string"==typeof t)this.eventSubscriptions[t]=[];else for(var e in this.eventSubscriptions)this.eventSubscriptions[e]=this.eventSubscriptions[e].filter((e=>e!==t));return this}})},"./src/HybridPort.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.HybridPort=i.default.Port.extend({NAME:"draw2d.HybridPort",init:function(t,e,n){this._super(t,e,n),this.locator=new i.default.layout.locator.InputPortLocator,this.maxFanIn=Number.MAX_SAFE_INTEGER},setMaxFanIn:function(t){return this.maxFanIn=Math.max(1,t),this.fireEvent("change:maxFanIn",{value:this.maxFanIn}),this},getMaxFanIn:function(){return this.maxFanIn},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.CONNECT?t.source.getParent().getId()===t.target.getParent().getId()?null:t.source instanceof i.default.InputPort?new i.default.command.CommandConnect(t.target,t.source,t.source):t.source instanceof i.default.OutputPort?new i.default.command.CommandConnect(t.source,t.target,t.source):t.source instanceof i.default.HybridPort?new i.default.command.CommandConnect(t.target,t.source,t.source):null:this._super(t)}})},"./src/InputPort.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.InputPort=i.default.Port.extend({NAME:"draw2d.InputPort",init:function(t,e,n){this._super(t,e,n),this.locator=new i.default.layout.locator.InputPortLocator},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.CONNECT?new i.default.command.CommandConnect(t.source,t.target,t.source):this._super(t)}})},"./src/OutputPort.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.OutputPort=i.default.Port.extend({NAME:"draw2d.OutputPort",init:function(t,e,n){this._super(t,e,n),this.locator=new i.default.layout.locator.OutputPortLocator},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.CONNECT?new i.default.command.CommandConnect(t.target,t.source,t.source):this._super(t)}})},"./src/Port.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.Port=i.default.shape.basic.Circle.extend({NAME:"draw2d.Port",DEFAULT_BORDER_COLOR:new i.default.util.Color("#1B1B1B"),init:function(t,e,n){this.locator=null,this.lighterBgColor=null,this.name=null,this.coronaWidth=5,this._super({bgColor:"#4f6870",stroke:1,diameter:10,color:"#1B1B1B",selectable:!1,...t},{coronaWidth:this.setCoronaWidth,semanticGroup:this.setSemanticGroup,...e},{coronaWidth:this.getCoronaWidth,semanticGroup:this.getSemanticGroup,...n}),this.ox=this.x,this.oy=this.y,this.corona=null,this.useGradient=!0,this.preferredConnectionDirection=null,this.connections=new i.default.util.ArrayList,this.moveListener=(t,e)=>{this.repaint(),this.fireEvent("move",{figure:this,dx:0,dy:0})},this.connectionAnchor=new i.default.layout.anchor.ConnectionAnchor(this),this.value=null,this.maxFanOut=Number.MAX_SAFE_INTEGER,this.semanticGroup="global",this.setCanSnapToHelper(!1),this.editPolicy.each(((t,e)=>this.uninstallEditPolicy(e))),this.installEditPolicy(new i.default.policy.port.IntrusivePortsFeedbackPolicy),this.portSelectionAdapter=()=>this},getSelectionAdapter:function(){return this.portSelectionAdapter},setMaxFanOut:function(t){return this.maxFanOut=Math.max(1,t),this.fireEvent("change:maxFanOut",{value:this.maxFanOut}),this},getMaxFanOut:function(){return this.maxFanOut},setSemanticGroup:function(t){return this.semanticGroup=t,this.fireEvent("change:semanticGroup",{value:this.semanticGroup}),this},getSemanticGroup:function(){return this.semanticGroup},setConnectionAnchor:function(t){return this.connectionAnchor=t??new i.default.layout.anchor.ConnectionAnchor,this.connectionAnchor.setOwner(this),this.fireEvent("move",{figure:this,dx:0,dy:0}),this},getConnectionAnchorLocation:function(t,e){return this.connectionAnchor.getLocation(t,e)},getConnectionAnchorReferencePoint:function(t){return this.connectionAnchor.getReferencePoint(t)},getConnectionDirection:function(t){return void 0===this.preferredConnectionDirection||null===this.preferredConnectionDirection?this.getParent().getBoundingBox().getDirection(this.getAbsolutePosition()):this.preferredConnectionDirection},setConnectionDirection:function(t){return this.preferredConnectionDirection=t,this.fireEvent("move",{figure:this,dx:0,dy:0}),this},setLocator:function(t){return this.locator=t,this},getLocator:function(){return this.locator},setBackgroundColor:function(t){return this.lighterBgColor=new i.default.util.Color(t).lighter(.3).hash(),this._super(t),this},setValue:function(t){if(t===this.value)return this;let e=this.value;return this.value=t,this.getParent()?.onPortValueChanged(this),this.fireEvent("change:value",{value:this.value,old:e}),this},getValue:function(){return this.value},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(t??={},t.cx=this.getAbsoluteX(),t.cy=this.getAbsoluteY(),t.rx=this.width/2,t.ry=t.rx,t.cursor="move",this.getAlpha()<.9||!1===this.useGradient?t.fill=this.bgColor.rgba():t.fill=["90",this.bgColor.hash(),this.lighterBgColor].join("-"),this._super(t))},onMouseEnter:function(){this._oldstroke=this.getStroke(),this.setStroke(2)},onMouseLeave:function(){this.setStroke(this._oldstroke)},getConnections:function(){return this.connections},setParent:function(t){this.parent?.off(this.moveListener),this._super(t),this.parent?.on("move",this.moveListener)},getCoronaWidth:function(){return this.coronaWidth},setCoronaWidth:function(t){return this.coronaWidth=t,this},onDragStart:function(t,e,n,r){if(this.getConnections().getSize()>=this.maxFanOut)return!1;this.ox=this.x,this.oy=this.y;let s=!0;return this.editPolicy.each(((a,o)=>{o instanceof i.default.policy.figure.DragDropEditPolicy&&(s=s&&o.onDragStart(this.canvas,this,t,e,n,r))})),s},onDrag:function(t,e,n,r,i,s){this._super(t,e)},onDragEnd:function(t,e,n,r){this.setAlpha(1),this.setPosition(this.ox,this.oy)},onDrop:function(t,e,n,r,i){},onConnect:function(t){},onDisconnect:function(t){},getName:function(){return this.name},setName:function(t){return this.name=t,this},hitTest:function(t,e,n){let r=this.getAbsoluteX()-this.coronaWidth-this.getWidth()/2,i=this.getAbsoluteY()-this.coronaWidth-this.getHeight()/2,s=r+this.getWidth()+2*this.coronaWidth,a=i+this.getHeight()+2*this.coronaWidth;return t>=r&&t<=s&&e>=i&&e<=a},setGlow:function(t){return!0===t&&null===this.corona?(this.corona=new i.default.Corona,this.corona.setDimension(this.getWidth()+2*this.getCoronaWidth(),this.getWidth()+2*this.getCoronaWidth()),this.corona.setPosition(this.getAbsoluteX()-this.getCoronaWidth()-this.getWidth()/2,this.getAbsoluteY()-this.getCoronaWidth()-this.getHeight()/2),this.corona.setCanvas(this.getCanvas()),this.corona.getShapeElement(),this.corona.repaint()):!1===t&&null!==this.corona&&(this.corona.setCanvas(null),this.corona=null),this},setDiameter:function(t){return this.setDimension(t,t),this.fireEvent("change:diameter",{value:t}),this},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.MOVE&&this.isDraggable()?new i.default.command.CommandMovePort(this):null},fireEvent:function(t,e){!0===this.isInDragDrop&&"drag"!==t||this._super(t,e)},getPersistentAttributes:function(){let t=this._super();return t.maxFanOut=this.maxFanOut,t.name=this.name,t.semanticGroup=this.semanticGroup,delete t.x,delete t.y,delete t.ports,t},setPersistentAttributes:function(t){return this._super(t),void 0!==t.maxFanOut&&("number"==typeof t.maxFanOut?this.maxFanOut=t.maxFanOut:this.maxFanOut=Math.max(1,parseInt(t.maxFanOut))),void 0!==t.name&&this.setName(t.name),void 0!==t.semanticGroup&&this.setSemanticGroup(t.semanticGroup),this}}),i.default.Corona=i.default.shape.basic.Circle.extend({init:function(){this._super(),this.setAlpha(.3),this.setBackgroundColor(new i.default.util.Color(178,225,255)),this.setColor(new i.default.util.Color(102,182,252))},setAlpha:function(t){return this._super(Math.min(.3,t)),this.setDeleteable(!1),this.setDraggable(!1),this.setResizeable(!1),this.setSelectable(!1),this}})},"./src/ResizeHandle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.ResizeHandle=i.default.shape.basic.Rectangle.extend({NAME:"draw2d.ResizeHandle",init:function(t,e,n){this.zoomCallback=()=>{this.attr({width:this.origWidth*this.getCanvas().getZoom(),height:this.origHeight*this.getCanvas().getZoom(),radius:this.origRadius*this.getCanvas().getZoom(),stroke:this.origStroke*this.getCanvas().getZoom()}),this.blockEvent||this.owner.fireEvent("move",{})},this._super({bgColor:"#FDFDFD",stroke:.5,width:10,height:10,minWidth:.3,minHeight:.3,color:"#a0a0a0",radius:1,selectable:!1,...t},{owner:this.setOwner,type:this.setType,...e},{owner:this.getOwner,type:this.getType,...n}),this.isResizeHandle=!0,this.command=null,this.commandMove=null,this.commandResize=null,this.useGradient=!0,this.origRadius=this.radius,this.origWidth=this.width,this.origHeight=this.height,this.origStroke=this.stroke},getSnapToDirection:function(){switch(this.type){case 1:return i.default.SnapToHelper.NORTH_WEST;case 2:return i.default.SnapToHelper.NORTH;case 3:return i.default.SnapToHelper.NORTH_EAST;case 4:default:return i.default.SnapToHelper.EAST;case 5:return i.default.SnapToHelper.SOUTH_EAST;case 6:return i.default.SnapToHelper.SOUTH;case 7:return i.default.SnapToHelper.SOUTH_WEST;case 8:return i.default.SnapToHelper.WEST;case 9:return i.default.SnapToHelper.NSEW}},createShapeElement:function(){return this.shape=this._super(),this.shape.node.setAttribute("type",this.type),this.updateCursor(this.shape),this.shape},getOwner:function(){return this.owner},setOwner:function(t){return this.owner=t,this},getType:function(){return this.type},setType:function(t){return this.type=t,this},updateCursor:function(t){if(null===t)return this;if(!1===this.isDraggable())return t.attr({cursor:"default"}),this;switch(this.type){case 1:t.attr({cursor:"nw-resize"});break;case 2:t.attr({cursor:"n-resize"});break;case 3:t.attr({cursor:"ne-resize"});break;case 4:t.attr({cursor:"e-resize"});break;case 5:t.attr({cursor:"se-resize"});break;case 6:t.attr({cursor:"s-resize"});break;case 7:t.attr({cursor:"sw-resize"});break;case 8:t.attr({cursor:"w-resize"});break;default:t.attr({cursor:"move"})}return this},setDraggable:function(t){return this._super(t),this.updateCursor(this.shape),this},onDragStart:function(t,e,n,r){return!!this.isDraggable()&&(this.ox=this.getAbsoluteX(),this.oy=this.getAbsoluteY(),this.commandMove=this.owner.createCommand(new i.default.command.CommandType(i.default.command.CommandType.MOVE)),this.commandResize=this.owner.createCommand(new i.default.command.CommandType(i.default.command.CommandType.RESIZE)),!0)},onDrag:function(t,e,n,r,i,s){if(!1===this.isDraggable())return;let a=this.getAbsoluteX(),o=this.getAbsoluteY();this._super(t,e,n,r);let c=this.getAbsoluteX()-a,l=this.getAbsoluteY()-o,h=this.owner,u=h.getAbsoluteX(),d=h.getAbsoluteY(),p=h.getWidth(),f=h.getHeight(),g=null,m=null,y=null;switch(this.type){case 1:h.setDimension(p-c,f-l),g=u+(p-h.getWidth()),m=d+(f-h.getHeight()),h.setPosition(g,m);break;case 2:h.setDimension(p,f-l),g=u,m=d+(f-h.getHeight()),h.setPosition(g,m);break;case 3:h.setDimension(p+c,f-l),g=u,m=d+(f-h.getHeight()),h.setPosition(g,m);break;case 4:h.setDimension(p+c,f);break;case 5:h.setDimension(p+c,f+l);break;case 6:h.setDimension(p,f+l);break;case 7:h.setDimension(p-c,f+l),g=u+(p-h.getWidth()),m=d,h.setPosition(g,m);break;case 8:h.setDimension(p-c,f),g=u+(p-h.getWidth()),m=d,h.setPosition(g,m)}null!==g&&(y=h.getPosition(),y.x===g&&y.y===m||h.setDimension(h.getWidth()-(y.x-g),h.getHeight()-(y.y-m)))},onDragEnd:function(t,e,n,r){this.isDraggable()&&(null!==this.commandMove&&(this.commandMove.setPosition(this.owner.getX(),this.owner.getY()),this.canvas.getCommandStack().execute(this.commandMove),this.commandMove=null),null!==this.commandResize&&(this.commandResize.setDimension(this.owner.getWidth(),this.owner.getHeight()),this.canvas.getCommandStack().execute(this.commandResize),this.commandResize=null))},setPosition:function(t,e){if(t instanceof i.default.geo.Point?(this.x=t.x,this.y=t.y):(this.x=t,this.y=e),!0===this.repaintBlocked||null===this.shape)return this;this.shape.attr({x:this.x,y:this.y}),this.applyTransformation()},setDimension:function(t,e){void 0!==e?this._super(t,e):i.default.isTouchDevice?this._super(15,15):this._super(8,8);let n=this.getWidth(),r=n/2;switch(this.type){case 1:this.setSnapToGridAnchor(new i.default.geo.Point(n,n));break;case 2:this.setSnapToGridAnchor(new i.default.geo.Point(r,n));break;case 3:this.setSnapToGridAnchor(new i.default.geo.Point(0,n));break;case 4:this.setSnapToGridAnchor(new i.default.geo.Point(0,r));break;case 5:this.setSnapToGridAnchor(new i.default.geo.Point(0,0));break;case 6:this.setSnapToGridAnchor(new i.default.geo.Point(r,0));break;case 7:this.setSnapToGridAnchor(new i.default.geo.Point(n,0));break;case 8:this.setSnapToGridAnchor(new i.default.geo.Point(n,r));break;case 9:this.setSnapToGridAnchor(new i.default.geo.Point(r,r))}return this},show:function(t){this.setCanvas(t),this.canvas.resizeHandles.add(this),this.shape.insertAfter(this.owner.getShapeElement());try{this.blockEvent=!0,this.zoomCallback()}finally{this.blockEvent=!1}return this.repaint(),this},hide:function(){if(null!==this.shape)return this.canvas.resizeHandles.remove(this),this.setCanvas(null),this},setCanvas:function(t){null!==this.canvas&&this.canvas.off(this.zoomCallback),this._super(t),null!==this.canvas&&this.canvas.on("zoom",this.zoomCallback)},setBackgroundColor:function(t){return t=new i.default.util.Color(t),this.bgGradient="90-"+t.darker(.2).hash()+"-"+t.hash(),this._super(t),this},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(t??={},"none"===this.bgColor.hash()?t.fill="none":this.getAlpha()<.9||!1===this.useGradient?t.fill=this.bgColor.rgba():t.fill=this.bgGradient,this._super(t))},supportsSnapToHelper:function(){return!0},onKeyDown:function(t,e){this.canvas.onKeyDown(t,e)},fireEvent:function(t,e){}})},"./src/SVGFigure.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.SVGFigure=i.default.SetFigure.extend({NAME:"draw2d.SVGFigure",init:function(t,e,n){this.svg=null,this._super(t,{svg:this.setSVG,...e},{svg:this.getSVG,...n})},createSet:function(){return this.svg??=this.getSVG(),this.importSVG(this.canvas,this.svg)},getSVG:function(){return this.svg},setSVG:function(t,e){if(this.svg=t,null!==this.canvas&&null!==this.svgNodes){let t=this.createSet();if(isNaN(parseFloat(e)))t.insertAfter(this.svgNodes),this.svgNodes.remove(),this.svgNodes=t,this.applyTransformation();else{t.hide(),t.insertAfter(this.svgNodes);let n=this.svgNodes;this.svgNodes=t,this.applyTransformation(),n.forEach((function(t){$(t.node).fadeOut(e,(function(){t.remove()}))})),t.forEach((function(t){$(t.node).fadeIn(e)}))}}return this},importSVG:function(t,e){let n=t.paper.set();try{if(void 0===e)throw"No data was provided.";let r=$(e);void 0===this._dimensionReadFromJSON&&(r.attr("width")&&r.attr("height")&&this.setDimension(parseFloat(r.attr("width")),parseFloat(r.attr("height"))),delete this._dimensionReadFromJSON);let i=new RegExp("([a-z0-9-]+) ?: ?([^ ;]+)[ ;]?","gi");r.children().each((function(e,r){let s=null,a=null,o={},c=r.tagName,l=c.indexOf(":");if(-1!=l&&(c=c.substr(l+1)),$(r.attributes).each((function(){switch(this.nodeName){case"stroke-dasharray":o[this.nodeName]="- ";break;case"style":a=this.nodeValue;break;case"id":case"xml:space":break;default:this.value?o[this.nodeName]=this.value:o[this.nodeName]=this.nodeValue}})),null!==a)for(;i.exec(a);)o[RegExp.$1]=RegExp.$2;switch(void 0===o["stroke-width"]&&(o["stroke-width"]=void 0===o.stroke?0:1.2),c){case"rect":s=t.paper.rect(),void 0!==o.rx&&(o.r=parseInt(o.rx),delete o.rx);break;case"circle":s=t.paper.circle();break;case"ellipse":s=t.paper.ellipse();break;case"path":o.fill="none",s=t.paper.path(o.d);break;case"line":o.d="M "+o.x1+" "+o.y1+"L"+o.x2+" "+o.y2,o.fill="none",s=t.paper.path(o.d);break;case"polyline":let e=o.points;o.d="M "+e.replace(" "," L"),s=t.paper.path(o.d);break;case"polygon":s=t.paper.polygon(o.points);break;case"image":s=t.paper.image();break;case"tspan":case"text":if(r.childNodes.length>0){let e=r.firstChild;do{switch(e.nodeType){case 2:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:return;case 3:e=r}let i=t.paper.text(0,0,$(e).text()),s={x:parseFloat(e.attributes.x.value),y:parseFloat(e.attributes.y.value),"text-anchor":"start"};void 0!==e.attributes["text-anchor"]?s["text-anchor"]=e.attributes["text-anchor"].value:void 0!==o["text-anchor"]&&(s["text-anchor"]=o["text-anchor"]),void 0!==e.attributes["font-size"]?s["font-size"]=parseInt(e.attributes["font-size"].value):void 0!==o["font-size"]&&(s["font-size"]=parseInt(o["font-size"])),void 0!==e.attributes["font-family"]?s["font-family"]=e.attributes["font-family"].value:void 0!==o["font-family"]&&(s["font-family"]=o["font-family"]),s.fill="#000000",void 0!==e.attributes.fill?s.fill=e.attributes.fill.value:void 0!==o.fill&&(s.fill=o.fill),s.y=s.y+i.getBBox().height/2,i.attr(s),n.push(i),e=e.nextSibling}while(e&&3===e.nodeType)}else s=t.paper.text(0,0,$(r).html()),void 0===o.fill&&(o.fill="#000000"),void 0===o["text-anchor"]&&(o["text-anchor"]="start"),void 0!==o["font-size"]&&(o["font-size"]=parseInt(o["font-size"])),void 0!==o["font-family"]&&(o["font-family"]=parseInt(o["font-family"])),o.y=parseFloat(o.y)+s.getBBox().height/2}null!==s&&(s.attr(o),n.push(s))}))}catch(t){alert("The SVG data you entered was invalid! ("+t+")")}return n},setPersistentAttributes:function(t){return this._super(t),(void 0!==t.width||void 0!==t.height)&&(this._dimensionReadFromJSON=!0),this}})},"./src/Selection.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.Selection=Class.extend({NAME:"draw2d.Selection",init:function(){this.primary=null,this.all=new i.default.util.ArrayList},clear:function(){return this.primary=null,this.all=new i.default.util.ArrayList,this},getPrimary:function(){return this.primary},setPrimary:function(t){return this.primary=t,this.add(t),this},remove:function(t){return this.all.remove(t),this.primary===t&&(this.primary=null),this},add:function(t){return null===t||this.all.contains(t)||this.all.add(t),this},contains:function(t,e){if(e){for(let e=0;e<this.all.getSize();e++){let n=this.all.get(e);if(n===t||n.contains(t))return!0}return!1}return this.all.contains(t)},isEmpty:function(){return this.all.isEmpty()},getSize:function(){return this.all.getSize()},getAll:function(t){if(!0===t){let t=new i.default.util.ArrayList,e=n=>{t.addAll(n,!0),n.each(((t,n)=>{n instanceof i.default.shape.composite.StrongComposite&&e(n.getAssignedFigures())}))};return e(this.all),t}return this.all.clone()},each:function(t,e){return this.all.each(t,e),this}})},"./src/SetFigure.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.SetFigure=i.default.shape.basic.Rectangle.extend({NAME:"draw2d.SetFigure",init:function(t,e,n){this.svgNodes=null,this.originalWidth=null,this.originalHeight=null,this.scaleX=1,this.scaleY=1,this.strokeScale=!0,this._super({stroke:0,bgColor:null,...t},e,n)},setCanvas:function(t){null===t&&null!==this.svgNodes&&(this.svgNodes.remove(),this.svgNodes=null),this._super(t)},setCssClass:function(t){return this._super(t),null===this.svgNodes||(null===this.cssClass?this.svgNodes.forEach((t=>{t.node.removeAttribute("class")})):this.svgNodes.forEach((e=>{e.node.setAttribute("class",t)}))),this},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(null!==this.originalWidth&&(this.scaleX=this.width/this.originalWidth,this.scaleY=this.height/this.originalHeight),t??={},this.applyAlpha(),this._super(t))},setVisible:function(t,e){this._super(t,e),null!==this.svgNodes&&(e?!0===this.visible?this.svgNodes.forEach((t=>{$(t.node).fadeIn(e,(()=>t.show()))})):this.svgNodes.forEach((t=>{$(t.node).fadeOut(e,(()=>t.hide()))})):!0===this.visible?this.svgNodes.show():this.svgNodes.hide())},applyAlpha:function(){this.svgNodes.attr({opacity:this.alpha})},applyTransformation:function(){let t="S"+this.scaleX+","+this.scaleY+",0,0 R"+this.rotationAngle+","+(this.getWidth()/2|0)+","+(this.getHeight()/2|0)+"T"+this.getAbsoluteX()+","+this.getAbsoluteY();if(this.svgNodes.transform(t),90===this.rotationAngle||270===this.rotationAngle){let t=this.svgNodes.getBBox(!0),e="...S"+t.height/t.width+","+t.width/t.height+","+(this.getAbsoluteX()+this.getWidth()/2)+","+(this.getAbsoluteY()+this.getHeight()/2);this.svgNodes.transform(e)}return this},toFront:function(t){if(this.composite instanceof i.default.shape.composite.StrongComposite&&void 0!==t){t.getZOrder()<this.composite.getZOrder()&&(t=this.composite)}if(void 0===t){if(this.getShapeElement().toFront(),this.svgNodes?.toFront(),null!==this.canvas){let t=this.canvas.getFigures(),e=this.canvas.getLines();null!==t.remove(this)?t.add(this):null!==e.remove(this)&&e.add(this)}}else if(null!==this.svgNodes&&this.svgNodes.insertAfter(t.getTopLevelShapeElement()),this.getShapeElement().insertAfter(t.getTopLevelShapeElement()),null!==this.canvas){let e=this.canvas.getFigures(),n=this.canvas.getLines();if(null!==e.remove(this)){let n=e.indexOf(t);e.insertElementAt(this,n+1)}else null!==n.remove(this)&&n.add(this)}this.children.each((function(e,n){n.figure.toFront(t)}));let e=this;return this.getPorts().each((function(n,r){r.getConnections().each((function(e,n){n.toFront(t)})),r.toFront(e)})),this.selectionHandles.each((function(t,e){e.toFront()})),this},toBack:function(t){if(!(this.composite instanceof i.default.shape.composite.StrongComposite)){if(null!==this.canvas){let t=this.canvas.getFigures(),e=this.canvas.getLines();null!==t.remove(this)?t.insertElementAt(this,0):null!==e.remove(this)&&e.insertElementAt(this,0)}return this.children.each(((e,n)=>{n.figure.toBack(t)}),!0),null!==this.svgNodes&&(void 0!==t?this.svgNodes.insertBefore(t.getShapeElement()):this.svgNodes.toBack()),null!==this.canvas&&(void 0!==t?this.getShapeElement().insertBefore(t.getShapeElement()):this.getShapeElement().toBack()),this.getPorts().each(((t,e)=>{e.getConnections().each(((t,e)=>{e.toFront(this)})),e.toFront(this)})),this}this.toFront(this.composite)},getTopLevelShapeElement:function(){return 0===this.svgNodes.length?this.shape:this.svgNodes},createShapeElement:function(){let t=this.canvas.paper.rect(this.getX(),this.getY(),this.getWidth(),this.getHeight());if(this.svgNodes=this.createSet(),void 0===this.svgNodes.forEach){let t=this.canvas.paper.set();t.push(this.svgNodes),this.svgNodes=t}this.svgNodes.attr({"stroke-scale":this.strokeScale}),this.setVisible(this.visible),this.setCssClass(this.cssClass);let e=this.svgNodes.getBBox();return this.originalWidth=e.width,this.originalHeight=e.height,t},createSet:function(){return this.canvas.paper.set()}})},"./src/VectorFigure.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.VectorFigure=i.default.shape.node.Node.extend({NAME:"draw2d.VectorFigure",init:function(t,e,n){this.stroke=1,this.radius=0,this.bgColor=new i.default.util.Color("#ffffff"),this.color=new i.default.util.Color("#303030"),this.dasharray=null,this.strokeBeforeGlow=this.stroke,this.glowIsActive=!1,this._super(t,{dasharray:this.setDashArray,radius:this.setRadius,bgColor:this.setBackgroundColor,color:this.setColor,stroke:this.setStroke,...e},{dasharray:this.getDashArray,radius:this.getRadius,bgColor:this.getBackgroundColor,color:this.getColor,stroke:this.getStroke,...n})},setRadius:function(t){return this.radius=t,this.repaint(),this.fireEvent("change:radius",{value:this.radius}),this},getRadius:function(){return this.radius},setDashArray:function(t){return this.dasharray=t,this.repaint(),this.fireEvent("change:dashArray",{value:this.dasharray}),this},getDashArray:function(){return this.dasharray},setGlow:function(t){return t===this.glowIsActive||(this.glowIsActive=t,!0===t?(this.strokeBeforeGlow=this.getStroke(),this.setStroke(1.5*this.strokeBeforeGlow)):this.setStroke(this.strokeBeforeGlow)),this},repaint:function(t){if(!0!==this.repaintBlocked&&null!==this.shape)return t??={},t.x=this.getAbsoluteX(),t.y=this.getAbsoluteY(),void 0===t.stroke&&(null===this.color||0===this.stroke?t.stroke="none":t.stroke=this.color.rgba()),t["stroke-width"]??=this.stroke,t.fill??=this.bgColor.rgba(),t.dasharray??=this.dasharray,t["stroke-dasharray"]??=this.dasharray,this._super(t),this},setBackgroundColor:function(t){return this.bgColor=new i.default.util.Color(t),this.repaint(),this.fireEvent("change:bgColor",{value:this.bgColor}),this},getBackgroundColor:function(){return this.bgColor},setStroke:function(t){return this.stroke=t,this.repaint(),this.fireEvent("change:stroke",{value:this.stroke}),this},getStroke:function(){return this.stroke},setColor:function(t){return this.color=new i.default.util.Color(t),this.repaint(),this.fireEvent("change:color",{value:this.color}),this},getColor:function(){return this.color},getPersistentAttributes:function(){return{...this._super(),bgColor:this.bgColor.rgba(),color:this.color.rgba(),stroke:this.stroke,radius:this.radius,dasharray:this.dasharray}},setPersistentAttributes:function(t){return this._super(t),void 0!==t.radius&&this.setRadius(t.radius),void 0!==t.bgColor&&this.setBackgroundColor(t.bgColor),void 0!==t.color&&this.setColor(t.color),void 0!==t.stroke&&this.setStroke(null===t.stroke?0:parseFloat(t.stroke)),"string"==typeof t.dasharray&&(this.dasharray=t.dasharray),this}})},"./src/command/Command.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.command.Command=Class.extend({NAME:"draw2d.command.Command",init:function(t){this.label=t},getLabel:function(){return this.label},canExecute:function(){return!0},execute:function(){},cancel:function(){},undo:function(){},redo:function(){}})},"./src/command/CommandAdd.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandAdd=i.default.command.Command.extend({NAME:"draw2d.command.CommandAdd",init:function(t,e,n,r){this._super(i.default.Configuration.i18n.command.addShape),this.figure=e,this.canvas=t,this.pos=new i.default.geo.Point(n,r)},canExecute:function(){return null===this.figure.getCanvas()},execute:function(){this.canvas.add(this.figure,this.pos.x,this.pos.y)},redo:function(){this.execute()},undo:function(){this.canvas.remove(this.figure)}})},"./src/command/CommandAddVertex.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandAddVertex=i.default.command.Command.extend({NAME:"draw2d.command.CommandAddVertex",init:function(t,e,n,r){this._super(i.default.Configuration.i18n.command.addVertex),this.line=t,this.index=e,this.newPoint=new i.default.geo.Point(n,r)},canExecute:function(){return!0},execute:function(){this.redo()},undo:function(){this.line.removeVertexAt(this.index)},redo:function(){this.line.insertVertexAt(this.index,this.newPoint.x,this.newPoint.y)}})},"./src/command/CommandAssignFigure.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandAssignFigure=i.default.command.Command.extend({NAME:"draw2d.command.CommandAssignFigure",init:function(t,e){this._super(i.default.Configuration.i18n.command.assignShape),this.figure=t,this.composite=e,this.assignedConnections=new i.default.util.ArrayList,this.isNode=this.figure instanceof i.default.shape.node.Node,this.oldBoundingBox=e.getBoundingBox()},canExecute:function(){return!0},execute:function(){if(this.composite.assignFigure(this.figure),!0===this.isNode){let t=this.figure.getConnections(),e=this;t.each((function(t,n){n.getSource().getParent().getComposite()===e.composite&&n.getTarget().getParent().getComposite()===e.composite&&n.getComposite()!==e.composite&&(e.assignedConnections.add({oldComposite:n.getComposite(),connection:n}),e.composite.assignFigure(n))}))}},undo:function(){this.composite.unassignFigure(this.figure),this.assignedConnections.each(((t,e)=>{null!==e.oldComposite?e.oldComposite.assignFigure(e.connection):e.connection.getComposite().unassignFigure(e.connection)})),this.composite.stickFigures=!0,this.composite.setBoundingBox(this.oldBoundingBox),this.composite.stickFigures=!1},redo:function(){this.composite.setBoundingBox(this.oldBoundingBox),this.composite.assignFigure(this.figure),this.assignedConnections.each(((t,e)=>this.composite.assignFigure(e.connection)))}})},"./src/command/CommandAttr.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandAttr=i.default.command.Command.extend({NAME:"draw2d.command.CommandAttr",init:function(t,e){this._super(i.default.Configuration.i18n.command.changeAttributes),this.figure=t,this.newAttributes=e,this.oldAttributes={},Object.keys(e).forEach((e=>{this.oldAttributes[e]=t.attr(e)}))},canExecute:function(){return!0},execute:function(){this.redo()},undo:function(){this.figure.attr(this.oldAttributes)},redo:function(){this.figure.attr(this.newAttributes)}})},"./src/command/CommandBoundingBox.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandBoundingBox=i.default.command.Command.extend({NAME:"draw2d.command.CommandResize",init:function(t,e){this._super(i.default.Configuration.i18n.command.resizeShape),this.figure=t,this.oldBoundingBox=this.figure.getBoundingBox(),this.newBoundingBox=e},canExecute:function(){return!this.oldBoundingBox.equals(this.newBoundingBox)},execute:function(){this.redo()},undo:function(){this.figure.setBoundingBox(this.oldBoundingBox)},redo:function(){this.figure.setBoundingBox(this.newBoundingBox)}})},"./src/command/CommandCollection.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandCollection=i.default.command.Command.extend({NAME:"draw2d.command.CommandCollection",init:function(t){this._super(void 0===t?i.default.Configuration.i18n.command.collection:t),this.commands=new i.default.util.ArrayList},getLabel:function(){if(1===this.commands.getSize())return this.commands.first().getLabel();if(this.commands.getSize()>1){let t=this.commands.clone().map((function(t){return t.getLabel()}));if(t.unique(),1===t.getSize())return t.first()}return this._super()},add:function(t){this.commands.add(t)},canExecute:function(){let t=!1;return this.commands.each((function(e,n){t=t||n.canExecute()})),t},execute:function(){this.commands.each((function(t,e){e.execute()}))},redo:function(){this.commands.each((function(t,e){e.redo()}))},undo:function(){this.commands.reverse(),this.commands.each((function(t,e){e.undo()})),this.commands.reverse()}})},"./src/command/CommandConnect.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandConnect=i.default.command.Command.extend({NAME:"draw2d.command.CommandConnect",init:function(t,e,n){this._super(i.default.Configuration.i18n.command.connectPorts),this.canvas=e.getCanvas(),this.source=t,this.target=e,this.connection=null,this.dropTarget=n},setConnection:function(t){this.connection=t},getConnection:function(){return this.connection},execute:function(){let t=t=>{this.connection=t,this.connection.setSource(this.source),this.connection.setTarget(this.target),this.canvas.add(this.connection)};if(null===this.connection){let e=i.default.Configuration.factory.createConnection(this.source,this.target,t,this.dropTarget);if(void 0===e)return;this.connection=e}t(this.connection)},redo:function(){this.canvas.add(this.connection),this.connection.reconnect()},undo:function(){this.canvas.remove(this.connection)}})},"./src/command/CommandDelete.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandDelete=i.default.command.Command.extend({NAME:"draw2d.command.CommandDelete",init:function(t){this._super(i.default.Configuration.i18n.command.deleteShape),this.parent=t.getParent(),this.figure=t,this.canvas=t.getCanvas(),this.connections=null,this.removedParentEntry=null,this.indexOfChild=-1},canExecute:function(){return null!==this.figure.getCanvas()},execute:function(){this.redo()},undo:function(){null!==this.parent?(this.parent.add(this.removedParentEntry.figure,this.removedParentEntry.locator,this.indexOfChild),this.canvas.setCurrentSelection(this.parent)):(this.canvas.add(this.figure),this.canvas.setCurrentSelection(this.figure)),this.figure instanceof i.default.Connection&&this.figure.reconnect();for(let t=0;t<this.connections.getSize();++t)this.canvas.add(this.connections.get(t)),this.connections.get(t).reconnect()},redo:function(){this.canvas.setCurrentSelection(null),null===this.connections&&(this.figure instanceof i.default.shape.node.Node?this.connections=this.figure.getConnections():this.connections=new i.default.util.ArrayList);for(let t=0;t<this.connections.getSize();++t)this.canvas.remove(this.connections.get(t));null!==this.parent?(this.indexOfChild=this.parent.getChildren().indexOf(this.figure),this.removedParentEntry=this.parent.remove(this.figure)):this.canvas.remove(this.figure)}})},"./src/command/CommandDeleteGroup.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandDeleteGroup=i.default.command.Command.extend({NAME:"draw2d.command.CommandDeleteGroup",init:function(t){this._super(i.default.Configuration.i18n.command.deleteShape),this.parent=t.getParent(),this.group=t,this.canvas=t.getCanvas(),this.batchDelete=null},canExecute:function(){let t=this.group.getAssignedFigures();for(let e=0;e<t.getSize();e++)if(!1===t.get(e).isDeleteable())return!1;return null!==this.group.getCanvas()},execute:function(){this.redo()},undo:function(){this.batchDelete.undo(),this.canvas.setCurrentSelection(this.group)},redo:function(){if(null===this.batchDelete){this.batchDelete=new i.default.command.CommandCollection,this.batchDelete.add(new i.default.command.CommandUngroup(this.canvas,this.group));let t=this.group.getAssignedFigures();for(let e=0;e<t.getSize();e++){let n=t.get(e).createCommand(new i.default.command.CommandType(i.default.command.CommandType.DELETE));this.batchDelete.add(n)}}this.batchDelete.execute()}})},"./src/command/CommandGroup.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandGroup=i.default.command.Command.extend({NAME:"draw2d.command.CommandGroup",init:function(t,e){this._super(i.default.Configuration.i18n.command.groupShapes),e instanceof i.default.Selection?this.figures=e.getAll():this.figures=e,this.figures.grep((function(t){return null===t.getComposite()})),this.canvas=t,this.group=new i.default.shape.composite.Group},canExecute:function(){return!this.figures.isEmpty()},execute:function(){this.redo()},undo:function(){let t=this;this.figures.each((function(e,n){t.group.unassignFigure(n)})),this.canvas.remove(this.group),this.canvas.setCurrentSelection(this.figures)},redo:function(){let t=this;this.figures.each((function(e,n){t.group.assignFigure(n)})),this.canvas.add(this.group),this.canvas.setCurrentSelection(this.group)}})},"./src/command/CommandMove.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandMove=i.default.command.Command.extend({NAME:"draw2d.command.CommandMove",init:function(t,e,n){this._super(i.default.Configuration.i18n.command.moveShape),this.figure=t,void 0===e?(this.oldX=t.getX(),this.oldY=t.getY()):(this.oldX=e,this.oldY=n)},setStartPosition:function(t,e){this.oldX=t,this.oldY=e},setPosition:function(t,e){this.newX=t,this.newY=e},canExecute:function(){return this.newX!==this.oldX||this.newY!==this.oldY},execute:function(){this.redo()},undo:function(){this.figure.setPosition(this.oldX,this.oldY)},redo:function(){this.figure.setPosition(this.newX,this.newY)}})},"./src/command/CommandMoveConnection.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandMoveConnection=i.default.command.Command.extend({NAME:"draw2d.command.CommandMoveConnection",init:function(t){this._super(i.default.Configuration.i18n.command.moveLine),this.line=t,this.dx=0,this.dy=0},setTranslation:function(t,e){this.dx=t,this.dy=e},canExecute:function(){return 0!==this.dx&&0!==this.dy},execute:function(){this.redo()},undo:function(){let t=this;this.line.getVertices().each((function(e,n){n.translate(-t.dx,-t.dy)})),this.line.svgPathString=null,this.line.setPosition(this.line.getStartPosition())},redo:function(){let t=this;this.line.getVertices().each((function(e,n){n.translate(t.dx,t.dy)})),this.line.svgPathString=null,this.line.setPosition(this.line.getStartPosition())}})},"./src/command/CommandMoveLine.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandMoveLine=i.default.command.Command.extend({NAME:"draw2d.command.CommandMoveLine",init:function(t){this._super(i.default.Configuration.i18n.command.moveLine),this.line=t,this.dx=0,this.dy=0},setTranslation:function(t,e){this.dx=t,this.dy=e},canExecute:function(){return 0!==this.dx&&0!==this.dy},execute:function(){this.redo()},undo:function(){let t=this;this.line.getVertices().each((function(e,n){n.translate(-t.dx,-t.dy)})),this.line.svgPathString=null,this.line.setPosition(this.line.getStartPosition())},redo:function(){let t=this;this.line.getVertices().each((function(e,n){n.translate(t.dx,t.dy)})),this.line.svgPathString=null,this.line.setPosition(this.line.getStartPosition())}})},"./src/command/CommandMoveVertex.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandMoveVertex=i.default.command.Command.extend({NAME:"draw2d.command.CommandMoveVertex",init:function(t){this._super(i.default.Configuration.i18n.command.moveVertex),this.line=t,this.index=-1,this.newPoint=null},setIndex:function(t){this.index=t,this.origPoint=this.line.getVertices().get(this.index).clone()},updatePosition:function(t,e){this.newPoint=new i.default.geo.Point(t,e)},canExecute:function(){return-1!==this.index&&null!==this.newPoint},execute:function(){this.redo()},undo:function(){this.line.setVertex(this.index,this.origPoint.x,this.origPoint.y)},redo:function(){this.line.setVertex(this.index,this.newPoint.x,this.newPoint.y)}})},"./src/command/CommandMoveVertices.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandMoveVertices=i.default.command.Command.extend({NAME:"draw2d.command.CommandMoveVertices",init:function(t){this._super(i.default.Configuration.i18n.command.moveVertices),this.line=t,this.oldVertices=t.getVertices().clone(!0),this.newVertices=null},updateVertices:function(t){this.newVertices=t},canExecute:function(){return null!==this.newVertices},execute:function(){this.redo()},undo:function(){this.line.setVertices(this.oldVertices)},redo:function(){this.line.setVertices(this.newVertices)}})},"./src/command/CommandReconnect.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandReconnect=i.default.command.Command.extend({NAME:"draw2d.command.CommandReconnect",init:function(t){this._super(i.default.Configuration.i18n.command.connectPorts),this.con=t,this.oldSourcePort=t.getSource(),this.oldTargetPort=t.getTarget()},canExecute:function(){return!0},setNewPorts:function(t,e){this.newSourcePort=t,this.newTargetPort=e},setIndex:function(t){},updatePosition:function(t,e){},execute:function(){this.redo()},cancel:function(){this.con.setSource(this.oldSourcePort),this.con.setTarget(this.oldTargetPort),this.con.routingRequired=!0,this.con.repaint()},undo:function(){this.con.setSource(this.oldSourcePort),this.con.setTarget(this.oldTargetPort),this.con.routingRequired=!0,this.con.repaint()},redo:function(){this.con.setSource(this.newSourcePort),this.con.setTarget(this.newTargetPort),this.con.routingRequired=!0,this.con.repaint()}})},"./src/command/CommandRemoveVertex.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandRemoveVertex=i.default.command.Command.extend({NAME:"draw2d.command.CommandRemoveVertex",init:function(t,e){this._super(i.default.Configuration.i18n.command.deleteVertex),this.line=t,this.index=e,this.oldPoint=t.getVertices().get(e).clone()},canExecute:function(){return!0},execute:function(){this.redo()},undo:function(){this.line.insertVertexAt(this.index,this.oldPoint.x,this.oldPoint.y)},redo:function(){this.line.removeVertexAt(this.index)}})},"./src/command/CommandReplaceVertices.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandReplaceVertices=i.default.command.Command.extend({NAME:"draw2d.command.CommandReplaceVertices",init:function(t,e,n){this._super(i.default.Configuration.i18n.command.addSegment),this.line=t,this.originalVertices=e,this.newVertices=n},canExecute:function(){return!0},execute:function(){this.redo()},undo:function(){this.line.setVertices(this.originalVertices)},redo:function(){this.line.setVertices(this.newVertices)}})},"./src/command/CommandResize.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandResize=i.default.command.Command.extend({NAME:"draw2d.command.CommandResize",init:function(t,e,n){this._super(i.default.Configuration.i18n.command.resizeShape),this.figure=t,void 0===e?(this.oldWidth=t.getWidth(),this.oldHeight=t.getHeight()):(this.oldWidth=e,this.oldHeight=n)},setDimension:function(t,e){this.newWidth=0|t,this.newHeight=0|e},canExecute:function(){return this.newWidth!==this.oldWidth||this.newHeight!==this.oldHeight},execute:function(){this.redo()},undo:function(){this.figure.setDimension(this.oldWidth,this.oldHeight)},redo:function(){this.figure.setDimension(this.newWidth,this.newHeight)}})},"./src/command/CommandRotate.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandRotate=i.default.command.Command.extend({NAME:"draw2d.command.CommandRotate",init:function(t,e){this._super(i.default.Configuration.i18n.command.rotateShape),this.figure=t,this.oldAngle=t.getRotationAngle(),this.newAngle=e},canExecute:function(){return this.oldAngle!==this.newAngle},execute:function(){this.redo()},undo:function(){this.rotate(this.oldAngle)},redo:function(){this.rotate(this.newAngle)},rotate:function(t){let e=this.figure.getWidth(),n=this.figure.getHeight();this.figure.setRotationAngle(t),this.figure.setDimension(n,e),this.figure.portRelayoutRequired=!0}})},"./src/command/CommandStack.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandStack=Class.extend({NAME:"draw2d.command.CommandStack",init:function(){this.undostack=[],this.redostack=[],this.maxundo=50,this.transactionCommand=null,this.eventListeners=new i.default.util.ArrayList},setUndoLimit:function(t){return this.maxundo=t,this},markSaveLocation:function(){return this.undostack=[],this.redostack=[],this.notifyListeners(new i.default.command.Command,i.default.command.CommandStack.POST_EXECUTE),this},execute:function(t){if(void 0===t)throw"Missing parameter [command] for method call CommandStack.execute";return null===t||!1===t.canExecute()?this:null!==this.transactionCommand?(this.transactionCommand.add(t),this):(this.notifyListeners(t,i.default.command.CommandStack.PRE_EXECUTE,"PRE_EXECUTE"),this.undostack.push(t),t.execute(),this.redostack=[],this.undostack.length>this.maxundo&&(this.undostack=this.undostack.slice(this.undostack.length-this.maxundo)),this.notifyListeners(t,i.default.command.CommandStack.POST_EXECUTE,"POST_EXECUTE"),this)},startTransaction:function(t){if(null!==this.transactionCommand)throw"CommandStack is already within transactional mode. Don't call 'startTransaction";return this.transactionCommand=new i.default.command.CommandCollection(t),this},isInTransaction:function(){return null!==this.transactionCommand},commitTransaction:function(){if(null===this.transactionCommand)return this;let t=this.transactionCommand;return this.transactionCommand=null,1===t.commands.getSize()?this.execute(t.commands.first()):this.execute(t),this},undo:function(){let t=this.undostack.pop();return t&&(this.notifyListeners(t,i.default.command.CommandStack.PRE_UNDO),this.redostack.push(t),t.undo(),this.notifyListeners(t,i.default.command.CommandStack.POST_UNDO)),this},redo:function(){let t=this.redostack.pop();return t&&(this.notifyListeners(t,i.default.command.CommandStack.PRE_REDO),this.undostack.push(t),t.redo(),this.notifyListeners(t,i.default.command.CommandStack.POST_REDO)),this},getRedoLabel:function(){if(0===this.redostack.length)return"";let t=this.redostack[this.redostack.length-1];return t?t.getLabel():""},getUndoLabel:function(){if(0===this.undostack.length)return"";let t=this.undostack[this.undostack.length-1];return t?t.getLabel():""},canRedo:function(){return this.redostack.length>0},canUndo:function(){return this.undostack.length>0},addEventListener:function(t){return this.on("change",t)},on:function(t,e){if("change"!==t)throw"only event of kind 'change' is supported";if(e instanceof i.default.command.CommandStackEventListener)this.eventListeners.add(e);else if("function"==typeof e.stackChanged)this.eventListeners.add(e);else{if("function"!=typeof e)throw"Object doesn't implement required callback interface [draw2d.command.CommandStackListener]";this.eventListeners.add({stackChanged:e})}return this},removeEventListener:function(t){return this.off(t),this},off:function(t){return this.eventListeners.grep((e=>e===t||e.stackChanged===t)),this},notifyListeners:function(t,e,n){let r=new i.default.command.CommandStackEvent(this,t,e,n),s=this.eventListeners.getSize();for(let t=0;t<s;t++)this.eventListeners.get(t).stackChanged(r)}}),i.default.command.CommandStack.PRE_EXECUTE=1,i.default.command.CommandStack.PRE_REDO=2,i.default.command.CommandStack.PRE_UNDO=4,i.default.command.CommandStack.POST_EXECUTE=8,i.default.command.CommandStack.POST_REDO=16,i.default.command.CommandStack.POST_UNDO=32,i.default.command.CommandStack.POST_INIT=64,i.default.command.CommandStack.POST_MASK=i.default.command.CommandStack.POST_EXECUTE|i.default.command.CommandStack.POST_UNDO|i.default.command.CommandStack.POST_REDO,i.default.command.CommandStack.PRE_MASK=i.default.command.CommandStack.PRE_EXECUTE|i.default.command.CommandStack.PRE_UNDO|i.default.command.CommandStack.PRE_REDO},"./src/command/CommandStackEvent.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandStackEvent=Class.extend({NAME:"draw2d.command.CommandStackEvent",init:function(t,e,n,r){this.stack=t,this.command=e,this.details=n,this.action=r},getStack:function(){return this.stack},getCommand:function(){return this.command},getDetails:function(){return this.details},isPostChangeEvent:function(){return!!(this.getDetails()&i.default.command.CommandStack.POST_MASK)},isPreChangeEvent:function(){return!!(this.getDetails()&i.default.command.CommandStack.PRE_MASK)}})},"./src/command/CommandStackEventListener.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.command.CommandStackEventListener=Class.extend({NAME:"draw2d.command.CommandStackEventListener",init:function(){},stackChanged:function(t){}})},"./src/command/CommandType.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandType=Class.extend({NAME:"draw2d.command.CommandType",init:function(t){this.policy=t},getPolicy:function(){return this.policy}}),i.default.command.CommandType.DELETE="DELETE",i.default.command.CommandType.MOVE="MOVE",i.default.command.CommandType.CONNECT="CONNECT",i.default.command.CommandType.MOVE_BASEPOINT="MOVE_BASEPOINT",i.default.command.CommandType.MOVE_VERTEX="MOVE_VERTEX",i.default.command.CommandType.MOVE_VERTICES="MOVE_VERTICES",i.default.command.CommandType.MOVE_GHOST_VERTEX="MOVE_GHOST_VERTEX",i.default.command.CommandType.RESIZE="RESIZE",i.default.command.CommandType.RESET="RESET",i.default.command.CommandType.ROTATE="ROTATE"},"./src/command/CommandUngroup.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.command.CommandUngroup=i.default.command.Command.extend({NAME:"draw2d.command.CommandUngroup",init:function(t,e){this._super(i.default.Configuration.i18n.command.ungroupShapes),e instanceof i.default.Selection?this.group=e.getAll().first():this.group=e,this.canvas=t,this.figures=this.group.getAssignedFigures().clone()},canExecute:function(){return!this.figures.isEmpty()},execute:function(){this.redo()},undo:function(){let t=this;this.figures.each((function(e,n){t.group.assignFigure(n)})),this.canvas.add(this.group),this.canvas.setCurrentSelection(this.group)},redo:function(){let t=this;this.figures.each((function(e,n){t.group.unassignFigure(n)})),this.canvas.setCurrentSelection(this.figures),this.canvas.remove(this.group)}})},"./src/decoration/connection/ArrowDecorator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.decoration.connection.ArrowDecorator=i.default.decoration.connection.Decorator.extend({NAME:"draw2d.decoration.connection.ArrowDecorator",init:function(t,e){this._super(t,e)},paint:function(t){let e=t.set();return e.push(t.path(["M0 0","L",this.width," ",-this.height/2,"L",this.width," ",this.height/2,"L0 0"].join(""))),e.attr({fill:this.backgroundColor.rgba()}),e}})},"./src/decoration/connection/BarDecorator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.decoration.connection.BarDecorator=i.default.decoration.connection.Decorator.extend({NAME:"draw2d.decoration.connection.BarDecorator",init:function(t,e){this._super(t,e)},paint:function(t){let e=t.set(),n=["M",this.width/2," ",-this.height/2];return n.push("L",this.width/2," ",this.height/2),e.push(t.path(n.join(""))),e.attr({fill:this.backgroundColor.rgba()}),e}})},"./src/decoration/connection/CircleDecorator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.decoration.connection.CircleDecorator=i.default.decoration.connection.Decorator.extend({NAME:"draw2d.decoration.connection.CircleDecorator",init:function(t,e){this._super(t,e)},paint:function(t){let e=t.set();return e.push(t.circle(0,0,this.width/2)),e.attr({fill:this.backgroundColor.rgba()}),e}})},"./src/decoration/connection/Decorator.js":(t,e,n)=>{"use strict";var r=s(n("./src/packages.js")),i=s(n("./src/util/Color.js"));function s(t){return t&&t.__esModule?t:{default:t}}r.default.decoration.connection.Decorator=Class.extend({NAME:"draw2d.decoration.connection.Decorator",init:function(t,e){this.width=void 0===t||t<1?20:t,this.height=void 0===e||e<1?15:e,this.parent=null,this.color=null,this.backgroundColor=new i.default(250,250,250)},paint:function(t){},setParent:function(t){this.parent=t},setColor:function(t){return this.color=new i.default(t),this.parent?.repaint(),this},getColor:function(){return this.color},setBackgroundColor:function(t){return this.backgroundColor=new i.default(t),this.parent?.repaint(),this},getBackgroundColor:function(){return this.backgroundColor},setDimension:function(t,e){return this.width=t,this.height=e,this}})},"./src/decoration/connection/DiamondDecorator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.decoration.connection.DiamondDecorator=i.default.decoration.connection.Decorator.extend({NAME:"draw2d.decoration.connection.DiamondDecorator",init:function(t,e){this._super(t,e)},paint:function(t){let e=t.set();return e.push(t.path(["M",this.width/2," ",-this.height/2,"L",this.width," ",0,"L",this.width/2," ",this.height/2,"L",0," ",0,"L",this.width/2," ",-this.height/2,"Z"].join(""))),e.attr({fill:this.backgroundColor.rgba()}),e}})},"./src/geo/Line.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.geo.Line={inverseLerp:function(t,e,n,r,i,s){let a=Math.abs(n-t),o=Math.abs(n-i);return 0===a&&(a=Math.abs(r-e),o=Math.abs(r-s),0===a)?1:o/a},pointProjection:function(t,e,n,r,s,a){let o=new i.default.geo.Point(0,0);t===n&&e===r&&(t-=1e-5);let c,l,h,u,d=(s-t)*(n-t)+(a-e)*(r-e);return d/=Math.pow(n-t,2)+Math.pow(r-e,2),o.x=t+d*(n-t),o.y=e+d*(r-e),c=Math.min(t,n),l=Math.max(t,n),h=Math.min(e,r),u=Math.max(e,r),o.x>=c&&o.x<=l&&o.y>=h&&o.y<=u?o:null},distance:function(t,e,n,r,i,s){let a,o=(i-=t)*(n-=t)+(s-=e)*(r-=e);o<=0?a=0:(o=(i=n-i)*n+(s=r-s)*r,a=o<=0?0:o*o/(n*n+r*r));let c=i*i+s*s-a;return c<0&&(c=0),Math.sqrt(c)}}},"./src/geo/Point.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.geo.Point=Class.extend({NAME:"draw2d.geo.Point",init:function(t,e){t instanceof i.default.geo.Point?(this.x=t.x,this.y=t.y):isNaN(parseFloat(t.x))||isNaN(parseFloat(t.y))?(this.x=t,this.y=e):(this.x=t.x,this.y=t.y),this.bx=null,this.by=null,this.bw=null,this.bh=null},setBoundary:function(t,e,n,r){return t instanceof i.default.geo.Rectangle?(this.bx=t.x,this.by=t.y,this.bw=t.w,this.bh=t.h):(this.bx=t,this.by=e,this.bw=n,this.bh=r),this.adjustBoundary(),this},adjustBoundary:function(){return null===this.bx||(this.x=Math.min(Math.max(this.bx,this.x),this.bw),this.y=Math.min(Math.max(this.by,this.y),this.bh)),this},translate:function(t,e){return this.x+=t,this.y+=e,this.adjustBoundary(),this},getX:function(){return this.x},getY:function(){return this.y},setX:function(t){return this.x=t,this.adjustBoundary(),this},setY:function(t){return this.y=t,this.adjustBoundary(),this},setPosition:function(t,e){return t instanceof i.default.geo.Point?(this.x=t.x,this.y=t.y):(this.x=t,this.y=e),this.adjustBoundary(),this},getPosition:function(t){let e=t.x-this.x,n=t.y-this.y;return Math.abs(e)>Math.abs(n)?e<0?i.default.geo.PositionConstants.WEST:i.default.geo.PositionConstants.EAST:n<0?i.default.geo.PositionConstants.NORTH:i.default.geo.PositionConstants.SOUTH},equals:function(t){return this.x===t.x&&this.y===t.y},distance:function(t){return Math.sqrt((this.x-t.x)*(this.x-t.x)+(this.y-t.y)*(this.y-t.y))},getDistance:function(t){return this.distance(t)},length:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},translated:function(t,e){let n=new i.default.geo.Point(t,e);return new i.default.geo.Point(this.x+n.x,this.y+n.y)},scale:function(t){return this.x*=t,this.y*=t,this.adjustBoundary(),this},scaled:function(t){return new i.default.geo.Point(this.x*t,this.y*t)},getScaled:function(t){return this.scaled(t)},getPersistentAttributes:function(){return{x:this.x,y:this.y}},setPersistentAttributes:function(t){return this.x=t.x,this.y=t.y,this},subtract:function(t){return new i.default.geo.Point(this.x-t.x,this.y-t.y)},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){return new i.default.geo.Point(this.x+(t.x-this.x)*e,this.y+(t.y-this.y)*e)},clone:function(){return new i.default.geo.Point(this.x,this.y)}})},"./src/geo/PositionConstants.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.geo.PositionConstants={NORTH:1,SOUTH:4,WEST:8,EAST:16}},"./src/geo/Ray.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.geo.Ray=i.default.geo.Point.extend({NAME:"draw2d.geo.Ray",init:function(t,e){this._super(t,e)},isHorizontal:function(){return 0!=this.x},similarity:function(t){return Math.abs(this.dot(t))},getAveraged:function(t){return new i.default.geo.Ray((this.x+t.x)/2,(this.y+t.y)/2)}})},"./src/geo/Rectangle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.geo.Rectangle=i.default.geo.Point.extend({NAME:"draw2d.geo.Rectangle",init:function(t,e,n,r){t instanceof i.default.geo.Rectangle?(e=t.y,n=t.w,r=t.h,t=t.x):"number"==typeof t.x&&"number"==typeof t.y?(e=t.y,n=t.w|t.width,r=t.h|t.height,t=t.x):"number"==typeof t.top&&"number"==typeof t.left&&(e=t.top,n=t.w|t.width,r=t.h|t.height,t=t.left),this._super(t,e),this.w=n,this.h=r},adjustBoundary:function(){null!==this.bx&&(this.x=Math.min(Math.max(this.bx,this.x),this.bw-this.w),this.y=Math.min(Math.max(this.by,this.y),this.bh-this.h),this.w=Math.min(this.w,this.bw),this.h=Math.min(this.h,this.bh))},resize:function(t,e){return this.w+=t,this.h+=e,this.adjustBoundary(),this},scale:function(t,e){return this.w+=t,this.h+=e,this.x-=t/2,this.y-=e/2,this.adjustBoundary(),this},translate:function(t,e){let n=new i.default.geo.Point(t,e);return this.x+=n.x,this.y+=n.y,this.adjustBoundary(),this},translated:function(t,e){let n=new i.default.geo.Point(t,e);return new i.default.geo.Rectangle(this.x+n.x,this.y+n.y,this.w,this.h)},setBounds:function(t){return this.setPosition(t.x,t.y),this.w=t.w,this.h=t.h,this},isEmpty:function(){return this.w<=0||this.h<=0},getWidth:function(){return this.w},setWidth:function(t){return this.w=t,this.adjustBoundary(),this},getHeight:function(){return this.h},setHeight:function(t){return this.h=t,this.adjustBoundary(),this},getLeft:function(){return this.x},getRight:function(){return this.x+this.w},getTop:function(){return this.y},getBottom:function(){return this.y+this.h},getTopLeft:function(){return new i.default.geo.Point(this.x,this.y)},getTopCenter:function(){return new i.default.geo.Point(this.x+this.w/2,this.y)},getTopRight:function(){return new i.default.geo.Point(this.x+this.w,this.y)},getCenterLeft:function(){return new i.default.geo.Point(this.x,this.y+this.h/2)},getCenterRight:function(){return new i.default.geo.Point(this.x+this.w,this.y+this.h/2)},getBottomLeft:function(){return new i.default.geo.Point(this.x,this.y+this.h)},getBottomCenter:function(){return new i.default.geo.Point(this.x+this.w/2,this.y+this.h)},getCenter:function(){return new i.default.geo.Point(this.x+this.w/2,this.y+this.h/2)},getBottomRight:function(){return new i.default.geo.Point(this.x+this.w,this.y+this.h)},getVertices:function(){let t=new i.default.util.ArrayList;return t.add(this.getTopLeft()),t.add(this.getTopRight()),t.add(this.getBottomRight()),t.add(this.getBottomLeft()),t},moveInside:function(t){let e=new i.default.geo.Rectangle(t.x,t.y,t.w,t.h);return e.x=Math.max(e.x,this.x),e.y=Math.max(e.y,this.y),e.w<this.w?e.x=Math.min(e.x+e.w,this.x+this.w)-e.w:e.x=this.x,e.h<this.h?e.y=Math.min(e.y+e.h,this.y+this.h)-e.h:e.y=this.y,e},getDistance:function(t){let e=this.x,n=this.y,r=this.w,s=this.h,a=t.getX(),o=t.getY(),c=1,l=1;t instanceof i.default.geo.Rectangle&&(c=t.getWidth(),l=t.getHeight());let h=9;if(e+r<=a)h=n+s<=o?0:n>=o+l?6:7;else if(e>=a+c)h=n+s<=o?2:n>=o+l?4:3;else if(n+s<=o)h=1;else{if(!(n>=o+l))return 0;h=5}switch(h){case 0:return e=e+r-a,n=n+s-o,-(e+n);case 1:return-(n+s-o);case 2:return e=a+c-e,n=n+s-o,-(e+n);case 3:return-(a+c-e);case 4:return e=a+c-e,n=o+l-n,-(e+n);case 5:return-(o+l-n);case 6:return e=e+r-a,n=o+l-n,-(e+n);case 7:return-(e+r-a)}throw"Unknown data type of parameter for distance calculation in draw2d.geo.Rectangle.getDistance(..)"},determineOctant:function(t){let e=this.x+3,n=this.y+3,r=this.w-6,s=this.h-6,a=t.x,o=t.y,c=2,l=2;t instanceof i.default.geo.Rectangle&&(c=t.w,l=t.h);let h=0;return h=a+c<=e?o+l<=n?0:o>=n+s?6:7:a>=e+r?o+l<=n?2:o>=n+s?4:3:o+l<=n?1:o>=n+s?5:8,h},getDirection:function(t){let e=this.getTopLeft();switch(this.determineOctant(t)){case 0:return e.x-t.x<e.y-t.y?i.default.geo.Rectangle.DIRECTION_UP:i.default.geo.Rectangle.DIRECTION_LEFT;case 1:return i.default.geo.Rectangle.DIRECTION_UP;case 2:return e=this.getTopRight(),t.x-e.x<e.y-t.y?i.default.geo.Rectangle.DIRECTION_UP:i.default.geo.Rectangle.DIRECTION_RIGHT;case 3:return i.default.geo.Rectangle.DIRECTION_RIGHT;case 4:return e=this.getBottomRight(),t.x-e.x<t.y-e.y?i.default.geo.Rectangle.DIRECTION_DOWN:i.default.geo.Rectangle.DIRECTION_RIGHT;case 5:return i.default.geo.Rectangle.DIRECTION_DOWN;case 6:return e=this.getBottomLeft(),e.x-t.x<t.y-e.y?i.default.geo.Rectangle.DIRECTION_DOWN:i.default.geo.Rectangle.DIRECTION_LEFT;case 7:return i.default.geo.Rectangle.DIRECTION_LEFT;case 8:return t.y>this.y?i.default.geo.Rectangle.DIRECTION_DOWN:i.default.geo.Rectangle.DIRECTION_UP}return i.default.geo.Rectangle.DIRECTION_UP},equals:function(t){return this.x==t.x&&this.y==t.y&&this.w==t.w&&this.h==t.h},hitTest:function(t,e){t instanceof i.default.geo.Point&&(e=t.y,t=t.x);let n=this.x+this.getWidth(),r=this.y+this.getHeight();return t>=this.x&&t<=n&&e>=this.y&&e<=r},isInside:function(t){return t.hitTest(this.getTopLeft())&&t.hitTest(this.getTopRight())&&t.hitTest(this.getBottomLeft())&&t.hitTest(this.getBottomRight())},contains:function(t){return this.hitTest(t.getTopLeft())&&this.hitTest(t.getTopRight())&&this.hitTest(t.getBottomLeft())&&this.hitTest(t.getBottomRight())},intersects:function(t){let e=t.x,n=t.y,r=t.x+t.w,i=t.y+t.h,s=this.x,a=this.y,o=this.x+this.w,c=this.y+this.h;return Math.max(0,Math.min(r,o)-Math.max(e,s))*Math.max(0,Math.min(i,c)-Math.max(n,a))!=0},merge:function(t){let e=Math.max(t.getRight(),this.getRight()),n=Math.max(t.getBottom(),this.getBottom());return this.setPosition(Math.min(this.x,t.x),Math.min(this.y,t.y)),this.w=e-this.x,this.h=n-this.y,this},intersectionWithLine:function(t,e){let n=new i.default.util.ArrayList,r=this.getVertices();r.add(r.first());let s=r.first(),a=null;for(let o=1;o<5;o++)a=r.get(o),s=i.default.shape.basic.Line.intersection(t,e,s,a),null!==s&&n.add(s),s=a;return n},clone:function(){return new i.default.geo.Rectangle(this.x,this.y,this.w,this.h)},toJSON:function(){return{width:this.w,height:this.h,x:this.x,y:this.y}}}),i.default.geo.Rectangle.DIRECTION_UP=0,i.default.geo.Rectangle.DIRECTION_RIGHT=1,i.default.geo.Rectangle.DIRECTION_DOWN=2,i.default.geo.Rectangle.DIRECTION_LEFT=3},"./src/geo/Util.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.geo.Util={insetPoint:function(t,e,n){if(t.equals(e))return t;let r=t.x-e.x,i=t.y-e.y,s=Math.sqrt(r*r+i*i),a=Math.min(s/2,n);return{x:e.x+r/s*(s-a),y:e.y+i/s*(s-a)}}}},"./src/index.js":(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("./src/packages.js"));i(n("./src/lib/raphael.exec.js")),i(n("./src/lib/Class.exec.js")),i(n("./src/lib/pathfinding.exec.js"));function i(t){return t&&t.__esModule?t:{default:t}}e.default=r.default;n("./src/util/raphael_ext.js"),n("./src/util/Polyfill.js"),n("./src/util/Base64.js"),n("./src/util/Debug.js"),n("./src/util/ArrayList.js"),n("./src/util/SVGUtil.js"),n("./src/util/spline/Spline.js"),n("./src/util/spline/CubicSpline.js"),n("./src/util/spline/CatmullRomSpline.js"),n("./src/util/spline/BezierSpline.js"),n("./src/geo/PositionConstants.js"),n("./src/geo/Point.js"),n("./src/geo/Rectangle.js"),n("./src/geo/Util.js"),n("./src/geo/Ray.js"),n("./src/geo/Line.js"),n("./src/command/CommandType.js"),n("./src/command/Command.js"),n("./src/command/CommandCollection.js"),n("./src/command/CommandStack.js"),n("./src/command/CommandStackEvent.js"),n("./src/command/CommandStackEventListener.js"),n("./src/command/CommandMove.js"),n("./src/command/CommandAttr.js"),n("./src/command/CommandMoveLine.js"),n("./src/command/CommandMoveConnection.js"),n("./src/command/CommandMoveVertex.js"),n("./src/command/CommandMoveVertices.js"),n("./src/command/CommandResize.js"),n("./src/command/CommandRotate.js"),n("./src/command/CommandConnect.js"),n("./src/command/CommandReconnect.js"),n("./src/command/CommandDelete.js"),n("./src/command/CommandDeleteGroup.js"),n("./src/command/CommandAdd.js"),n("./src/command/CommandGroup.js"),n("./src/command/CommandUngroup.js"),n("./src/command/CommandAddVertex.js"),n("./src/command/CommandAssignFigure.js"),n("./src/command/CommandBoundingBox.js"),n("./src/command/CommandRemoveVertex.js"),n("./src/command/CommandReplaceVertices.js"),n("./src/layout/connection/ConnectionRouter.js"),n("./src/layout/connection/DirectRouter.js"),n("./src/layout/connection/RubberbandRouter.js"),n("./src/layout/connection/VertexRouter.js"),n("./src/layout/connection/ManhattanConnectionRouter.js"),n("./src/layout/connection/ManhattanBridgedConnectionRouter.js"),n("./src/layout/connection/InteractiveManhattanConnectionRouter.js"),n("./src/layout/connection/CircuitConnectionRouter.js"),n("./src/layout/connection/SplineConnectionRouter.js"),n("./src/layout/connection/FanConnectionRouter.js"),n("./src/layout/connection/MazeConnectionRouter.js"),n("./src/layout/connection/MuteableManhattanConnectionRouter.js"),n("./src/layout/connection/SketchConnectionRouter.js"),n("./src/layout/mesh/MeshLayouter.js"),n("./src/layout/mesh/ExplodeLayouter.js"),n("./src/layout/mesh/ProposedMeshChange.js"),n("./src/layout/locator/Locator.js"),n("./src/layout/locator/PortLocator.js"),n("./src/layout/locator/DraggableLocator.js"),n("./src/layout/locator/SmartDraggableLocator.js"),n("./src/layout/locator/XYAbsPortLocator.js"),n("./src/layout/locator/XYRelPortLocator.js"),n("./src/layout/locator/InputPortLocator.js"),n("./src/layout/locator/OutputPortLocator.js"),n("./src/layout/locator/ConnectionLocator.js"),n("./src/layout/locator/ManhattanMidpointLocator.js"),n("./src/layout/locator/PolylineMidpointLocator.js"),n("./src/layout/locator/ParallelMidpointLocator.js"),n("./src/layout/locator/TopLocator.js"),n("./src/layout/locator/BottomLocator.js"),n("./src/layout/locator/LeftLocator.js"),n("./src/layout/locator/RightLocator.js"),n("./src/layout/locator/CenterLocator.js"),n("./src/policy/EditPolicy.js"),n("./src/policy/canvas/CanvasPolicy.js"),n("./src/policy/canvas/ZoomPolicy.js"),n("./src/policy/canvas/WheelZoomPolicy.js"),n("./src/policy/canvas/KeyboardPolicy.js"),n("./src/policy/canvas/DefaultKeyboardPolicy.js"),n("./src/policy/canvas/ExtendedKeyboardPolicy.js"),n("./src/policy/canvas/SelectionPolicy.js"),n("./src/policy/canvas/SingleSelectionPolicy.js"),n("./src/policy/canvas/GhostMoveSelectionPolicy.js"),n("./src/policy/canvas/PanningSelectionPolicy.js"),n("./src/policy/canvas/BoundingboxSelectionPolicy.js"),n("./src/policy/canvas/ReadOnlySelectionPolicy.js"),n("./src/policy/canvas/DecorationPolicy.js"),n("./src/policy/canvas/FadeoutDecorationPolicy.js"),n("./src/policy/canvas/CoronaDecorationPolicy.js"),n("./src/policy/canvas/SnapToEditPolicy.js"),n("./src/policy/canvas/ShowDimetricGridEditPolicy.js"),n("./src/policy/canvas/SnapToDimetricGridEditPolicy.js"),n("./src/policy/canvas/ShowGridEditPolicy.js"),n("./src/policy/canvas/SnapToGridEditPolicy.js"),n("./src/policy/canvas/ShowDotEditPolicy.js"),n("./src/policy/canvas/ShowChessboardEditPolicy.js"),n("./src/policy/canvas/SnapToGeometryEditPolicy.js"),n("./src/policy/canvas/SnapToVerticesEditPolicy.js"),n("./src/policy/canvas/SnapToInBetweenEditPolicy.js"),n("./src/policy/canvas/SnapToCenterEditPolicy.js"),n("./src/policy/canvas/DropInterceptorPolicy.js"),n("./src/policy/connection/ConnectionCreatePolicy.js"),n("./src/policy/connection/ComposedConnectionCreatePolicy.js"),n("./src/policy/connection/ClickConnectionCreatePolicy.js"),n("./src/policy/connection/OrthogonalConnectionCreatePolicy.js"),n("./src/policy/connection/DragConnectionCreatePolicy.js"),n("./src/policy/figure/FigureEditPolicy.js"),n("./src/policy/figure/DragDropEditPolicy.js"),n("./src/policy/figure/RegionEditPolicy.js"),n("./src/policy/figure/HorizontalEditPolicy.js"),n("./src/policy/figure/VerticalEditPolicy.js"),n("./src/policy/figure/SelectionPolicy.js"),n("./src/policy/figure/SelectionFeedbackPolicy.js"),n("./src/policy/figure/ResizeSelectionFeedbackPolicy.js"),n("./src/policy/figure/RectangleSelectionFeedbackPolicy.js"),n("./src/policy/figure/RaftSelectionFeedbackPolicy.js"),n("./src/policy/figure/BigRectangleSelectionFeedbackPolicy.js"),n("./src/policy/figure/RoundRectangleSelectionFeedbackPolicy.js"),n("./src/policy/figure/BusSelectionFeedbackPolicy.js"),n("./src/policy/figure/WidthSelectionFeedbackPolicy.js"),n("./src/policy/figure/VBusSelectionFeedbackPolicy.js"),n("./src/policy/figure/HBusSelectionFeedbackPolicy.js"),n("./src/policy/figure/AntSelectionFeedbackPolicy.js"),n("./src/policy/figure/GlowSelectionFeedbackPolicy.js"),n("./src/policy/figure/SlimSelectionFeedbackPolicy.js"),n("./src/policy/figure/VertexSelectionFeedbackPolicy.js"),n("./src/policy/line/LineSelectionFeedbackPolicy.js"),n("./src/policy/line/VertexSelectionFeedbackPolicy.js"),n("./src/policy/line/OrthogonalSelectionFeedbackPolicy.js"),n("./src/policy/port/PortFeedbackPolicy.js"),n("./src/policy/port/ElasticStrapFeedbackPolicy.js"),n("./src/policy/port/IntrusivePortsFeedbackPolicy.js"),n("./src/Configuration.js"),n("./src/HeadlessCanvas.js"),n("./src/Canvas.js"),n("./src/Selection.js"),n("./src/Figure.js"),n("./src/shape/node/Node.js"),n("./src/VectorFigure.js"),n("./src/shape/basic/Rectangle.js"),n("./src/SetFigure.js"),n("./src/SVGFigure.js"),n("./src/shape/node/Hub.js"),n("./src/shape/node/HorizontalBus.js"),n("./src/shape/node/VerticalBus.js"),n("./src/shape/node/Fulcrum.js"),n("./src/shape/basic/Arc.js"),n("./src/shape/basic/Oval.js"),n("./src/shape/basic/Circle.js"),n("./src/shape/basic/Label.js"),n("./src/shape/basic/Text.js"),n("./src/shape/basic/Line.js"),n("./src/shape/basic/PolyLine.js"),n("./src/shape/basic/Image.js"),n("./src/shape/basic/Polygon.js"),n("./src/shape/basic/Diamond.js"),n("./src/shape/dimetric/Rectangle.js"),n("./src/shape/composite/Composite.js"),n("./src/shape/composite/StrongComposite.js"),n("./src/shape/composite/Group.js"),n("./src/shape/composite/Jailhouse.js"),n("./src/shape/composite/WeakComposite.js"),n("./src/shape/composite/Raft.js"),n("./src/Connection.js"),n("./src/VectorFigure.js"),n("./src/ResizeHandle.js"),n("./src/shape/composite/RaftResizeHandle.js"),n("./src/shape/basic/LineResizeHandle.js"),n("./src/shape/basic/LineStartResizeHandle.js"),n("./src/shape/basic/LineEndResizeHandle.js"),n("./src/shape/basic/VertexResizeHandle.js"),n("./src/shape/basic/GhostVertexResizeHandle.js"),n("./src/Port.js"),n("./src/InputPort.js"),n("./src/OutputPort.js"),n("./src/HybridPort.js"),n("./src/layout/anchor/ConnectionAnchor.js"),n("./src/layout/anchor/ChopboxConnectionAnchor.js"),n("./src/layout/anchor/FanConnectionAnchor.js"),n("./src/layout/anchor/ShortesPathConnectionAnchor.js"),n("./src/layout/anchor/CenterEdgeConnectionAnchor.js"),n("./src/shape/arrow/CalligrapherArrowLeft.js"),n("./src/shape/arrow/CalligrapherArrowDownLeft.js"),n("./src/shape/node/Start.js"),n("./src/shape/node/End.js"),n("./src/shape/node/Between.js"),n("./src/shape/note/PostIt.js"),n("./src/shape/flowchart/Document.js"),n("./src/shape/widget/Widget.js"),n("./src/shape/widget/Slider.js"),n("./src/shape/diagram/Diagram.js"),n("./src/shape/diagram/Pie.js"),n("./src/shape/diagram/Sparkline.js"),n("./src/shape/analog/OpAmp.js"),n("./src/shape/analog/ResistorBridge.js"),n("./src/shape/analog/ResistorVertical.js"),n("./src/shape/analog/VoltageSupplyHorizontal.js"),n("./src/shape/analog/VoltageSupplyVertical.js"),n("./src/shape/layout/Layout.js"),n("./src/shape/layout/HorizontalLayout.js"),n("./src/shape/layout/VerticalLayout.js"),n("./src/shape/layout/TableLayout.js"),n("./src/shape/layout/FlexGridLayout.js"),n("./src/shape/layout/StackLayout.js"),n("./src/shape/icon/Icon.js"),n("./src/shape/icon/Thunder.js"),n("./src/shape/icon/Snow.js"),n("./src/shape/icon/Hail.js"),n("./src/shape/icon/Rain.js"),n("./src/shape/icon/Cloudy.js"),n("./src/shape/icon/Sun.js"),n("./src/shape/icon/Undo.js"),n("./src/shape/icon/Detour.js"),n("./src/shape/icon/Merge.js"),n("./src/shape/icon/Split.js"),n("./src/shape/icon/Fork.js"),n("./src/shape/icon/ForkAlt.js"),n("./src/shape/icon/Exchange.js"),n("./src/shape/icon/Shuffle.js"),n("./src/shape/icon/Refresh.js"),n("./src/shape/icon/Ccw.js"),n("./src/shape/icon/Acw.js"),n("./src/shape/icon/Contract.js"),n("./src/shape/icon/Expand.js"),n("./src/shape/icon/Stop.js"),n("./src/shape/icon/End.js"),n("./src/shape/icon/Start.js"),n("./src/shape/icon/Ff.js"),n("./src/shape/icon/Rw.js"),n("./src/shape/icon/ArrowRight.js"),n("./src/shape/icon/ArrowLeft.js"),n("./src/shape/icon/ArrowUp.js"),n("./src/shape/icon/ArrowDown.js"),n("./src/shape/icon/ArrowLeft2.js"),n("./src/shape/icon/ArrowRight2.js"),n("./src/shape/icon/Smile2.js"),n("./src/shape/icon/Smile.js"),n("./src/shape/icon/Alarm.js"),n("./src/shape/icon/Clock.js"),n("./src/shape/icon/StopWatch.js"),n("./src/shape/icon/History.js"),n("./src/shape/icon/Future.js"),n("./src/shape/icon/GlobeAlt2.js"),n("./src/shape/icon/GlobeAlt.js"),n("./src/shape/icon/Globe.js"),n("./src/shape/icon/Warning.js"),n("./src/shape/icon/Code.js"),n("./src/shape/icon/Pensil.js"),n("./src/shape/icon/Pen.js"),n("./src/shape/icon/Plus.js"),n("./src/shape/icon/Minus.js"),n("./src/shape/icon/TShirt.js"),n("./src/shape/icon/Sticker.js"),n("./src/shape/icon/Page2.js"),n("./src/shape/icon/Page.js"),n("./src/shape/icon/Landscape1.js"),n("./src/shape/icon/Landscape2.js"),n("./src/shape/icon/Plugin.js"),n("./src/shape/icon/Bookmark.js"),n("./src/shape/icon/Hammer.js"),n("./src/shape/icon/Users.js"),n("./src/shape/icon/User.js"),n("./src/shape/icon/Customer.js"),n("./src/shape/icon/Employee.js"),n("./src/shape/icon/Anonymous.js"),n("./src/shape/icon/Skull.js"),n("./src/shape/icon/Mail.js"),n("./src/shape/icon/Picture.js"),n("./src/shape/icon/Bubble.js"),n("./src/shape/icon/CodeTalk.js"),n("./src/shape/icon/Talkq.js"),n("./src/shape/icon/Talke.js"),n("./src/shape/icon/Home.js"),n("./src/shape/icon/Lock.js"),n("./src/shape/icon/Clip.js"),n("./src/shape/icon/Star.js"),n("./src/shape/icon/StarOff.js"),n("./src/shape/icon/Star2.js"),n("./src/shape/icon/Star2Off.js"),n("./src/shape/icon/Star3.js"),n("./src/shape/icon/Star3Off.js"),n("./src/shape/icon/Chat.js"),n("./src/shape/icon/Quote.js"),n("./src/shape/icon/Gear2.js"),n("./src/shape/icon/Gear.js"),n("./src/shape/icon/Wrench.js"),n("./src/shape/icon/Wrench2.js"),n("./src/shape/icon/Wrench3.js"),n("./src/shape/icon/ScrewDriver.js"),n("./src/shape/icon/HammerAndScrewDriver.js"),n("./src/shape/icon/Magic.js"),n("./src/shape/icon/Download.js"),n("./src/shape/icon/View.js"),n("./src/shape/icon/Noview.js"),n("./src/shape/icon/Cloud.js"),n("./src/shape/icon/Cloud2.js"),n("./src/shape/icon/CloudDown.js"),n("./src/shape/icon/CloudUp.js"),n("./src/shape/icon/Location.js"),n("./src/shape/icon/Volume0.js"),n("./src/shape/icon/Volume1.js"),n("./src/shape/icon/Volume2.js"),n("./src/shape/icon/Volume3.js"),n("./src/shape/icon/Key.js"),n("./src/shape/icon/Ruler.js"),n("./src/shape/icon/Power.js"),n("./src/shape/icon/Unlock.js"),n("./src/shape/icon/Flag.js"),n("./src/shape/icon/Tag.js"),n("./src/shape/icon/Search.js"),n("./src/shape/icon/ZoomOut.js"),n("./src/shape/icon/ZoomIn.js"),n("./src/shape/icon/Cross.js"),n("./src/shape/icon/Check.js"),n("./src/shape/icon/Settings.js"),n("./src/shape/icon/SettingsAlt.js"),n("./src/shape/icon/Feed.js"),n("./src/shape/icon/Bug.js"),n("./src/shape/icon/Link.js"),n("./src/shape/icon/Calendar.js"),n("./src/shape/icon/Picker.js"),n("./src/shape/icon/No.js"),n("./src/shape/icon/CommandLine.js"),n("./src/shape/icon/Photo.js"),n("./src/shape/icon/Printer.js"),n("./src/shape/icon/Export.js"),n("./src/shape/icon/Import.js"),n("./src/shape/icon/Run.js"),n("./src/shape/icon/Magnet.js"),n("./src/shape/icon/NoMagnet.js"),n("./src/shape/icon/ReflectH.js"),n("./src/shape/icon/ReflectV.js"),n("./src/shape/icon/Resize2.js"),n("./src/shape/icon/Rotate.js"),n("./src/shape/icon/Connect.js"),n("./src/shape/icon/Disconnect.js"),n("./src/shape/icon/Folder.js"),n("./src/shape/icon/Man.js"),n("./src/shape/icon/Woman.js"),n("./src/shape/icon/People.js"),n("./src/shape/icon/Parent.js"),n("./src/shape/icon/Notebook.js"),n("./src/shape/icon/Diagram.js"),n("./src/shape/icon/BarChart.js"),n("./src/shape/icon/PieChart.js"),n("./src/shape/icon/LineChart.js"),n("./src/shape/icon/Apps.js"),n("./src/shape/icon/Locked.js"),n("./src/shape/icon/Ppt.js"),n("./src/shape/icon/Lab.js"),n("./src/shape/icon/Umbrella.js"),n("./src/shape/icon/Dry.js"),n("./src/shape/icon/Ipad.js"),n("./src/shape/icon/Iphone.js"),n("./src/shape/icon/Jigsaw.js"),n("./src/shape/icon/Lamp.js"),n("./src/shape/icon/Lamp_alt.js"),n("./src/shape/icon/Video.js"),n("./src/shape/icon/Palm.js"),n("./src/shape/icon/Fave.js"),n("./src/shape/icon/Help.js"),n("./src/shape/icon/Crop.js"),n("./src/shape/icon/BioHazard.js"),n("./src/shape/icon/WheelChair.js"),n("./src/shape/icon/Mic.js"),n("./src/shape/icon/MicMute.js"),n("./src/shape/icon/IMac.js"),n("./src/shape/icon/Pc.js"),n("./src/shape/icon/Cube.js"),n("./src/shape/icon/FullCube.js"),n("./src/shape/icon/Font.js"),n("./src/shape/icon/Trash.js"),n("./src/shape/icon/NewWindow.js"),n("./src/shape/icon/DockRight.js"),n("./src/shape/icon/DockLeft.js"),n("./src/shape/icon/DockBottom.js"),n("./src/shape/icon/DockTop.js"),n("./src/shape/icon/Pallete.js"),n("./src/shape/icon/Cart.js"),n("./src/shape/icon/Glasses.js"),n("./src/shape/icon/Package.js"),n("./src/shape/icon/Book.js"),n("./src/shape/icon/Books.js"),n("./src/shape/icon/Icons.js"),n("./src/shape/icon/List.js"),n("./src/shape/icon/Db.js"),n("./src/shape/icon/Paper.js"),n("./src/shape/icon/TakeOff.js"),n("./src/shape/icon/Landing.js"),n("./src/shape/icon/Plane.js"),n("./src/shape/icon/Phone.js"),n("./src/shape/icon/HangUp.js"),n("./src/shape/icon/SlideShare.js"),n("./src/shape/icon/Twitter.js"),n("./src/shape/icon/TwitterBird.js"),n("./src/shape/icon/Skype.js"),n("./src/shape/icon/Windows.js"),n("./src/shape/icon/Apple.js"),n("./src/shape/icon/Linux.js"),n("./src/shape/icon/NodeJs.js"),n("./src/shape/icon/JQuery.js"),n("./src/shape/icon/Sencha.js"),n("./src/shape/icon/Vim.js"),n("./src/shape/icon/InkScape.js"),n("./src/shape/icon/Aumade.js"),n("./src/shape/icon/Firefox.js"),n("./src/shape/icon/Ie.js"),n("./src/shape/icon/Ie9.js"),n("./src/shape/icon/Opera.js"),n("./src/shape/icon/Chrome.js"),n("./src/shape/icon/Safari.js"),n("./src/shape/icon/LinkedIn.js"),n("./src/shape/icon/Flickr.js"),n("./src/shape/icon/GitHub.js"),n("./src/shape/icon/GitHubAlt.js"),n("./src/shape/icon/Raphael.js"),n("./src/shape/icon/GRaphael.js"),n("./src/shape/icon/Svg.js"),n("./src/shape/icon/Usb.js"),n("./src/shape/icon/Ethernet.js"),n("./src/shape/pert/Activity.js"),n("./src/shape/pert/Start.js"),n("./src/shape/state/Start.js"),n("./src/shape/state/End.js"),n("./src/shape/state/State.js"),n("./src/shape/state/Connection.js"),n("./src/ui/LabelEditor.js"),n("./src/ui/LabelInplaceEditor.js"),n("./src/decoration/connection/Decorator.js"),n("./src/decoration/connection/ArrowDecorator.js"),n("./src/decoration/connection/DiamondDecorator.js"),n("./src/decoration/connection/CircleDecorator.js"),n("./src/decoration/connection/BarDecorator.js"),n("./src/io/Reader.js"),n("./src/io/Writer.js"),n("./src/io/svg/Writer.js"),n("./src/io/png/Writer.js"),n("./src/io/json/Writer.js"),n("./src/io/json/Reader.js"),t.exports=e.default},"./src/io/Reader.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.io.Reader=Class.extend({init:function(){},unmarshal:function(t,e){}})},"./src/io/Writer.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.io.Writer=Class.extend({init:function(){},marshal:function(t,e){if("function"!=typeof e)throw"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.";e("","")},formatXml:function(t){let e="",n=new RegExp("(>)(<)(/*)","g");t=t.replace(n,"$1\r\n$2$3");let r=0;return t.split("\r\n").forEach((function(t){let n=0;t.match(new RegExp(".+</w[^>]*>$"))?n=0:t.match(new RegExp("^</w"))?0!=r&&(r-=1):n=t.match(new RegExp("^<w[^>]*[^/]>.*$"))?1:0;for(var i="",s=0;s<r;s++)i+=" ";e+=i+t+"\r\n",r+=n})),e}})},"./src/io/json/Reader.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.io.json.Reader=i.default.io.Reader.extend({NAME:"draw2d.io.json.Reader",init:function(){this._super()},unmarshal:function(t,e){let n=new i.default.util.ArrayList;"string"==typeof e&&(e=JSON.parse(e));let r=null;return e.forEach((e=>{try{let i=this.createFigureFromElement(e)||this.createFigureFromType(e.type),s=null,a=null;for(let n in e){let i=e[n];if("source"===n){if(r=t.getFigure(i.node),null===r)throw"Source figure with id '"+i.node+"' not found";if(s=r.getPort(i.port),null===s)throw"Unable to find source port '"+i.port+"' at figure '"+i.node+"' to unmarschal '"+e.type+"'"}else if("target"===n){if(r=t.getFigure(i.node),null===r)throw"Target figure with id '"+i.node+"' not found";if(a=r.getPort(i.port),null===a)throw"Unable to find target port '"+i.port+"' at figure '"+i.node+"' to unmarschal '"+e.type+"'"}}null!==s&&null!==a&&(i.setSource(s),i.setTarget(a)),i.setPersistentAttributes(e),t.add(i),n.add(i)}catch(t){debug.error(e,"Unable to instantiate figure type '"+e.type+"' with id '"+e.id+"' during unmarshal by "+this.NAME+". Skipping figure.."),debug.error(t),debug.warn(e)}})),e.forEach((e=>{if(void 0!==e.composite){let n=t.getFigure(e.id);null===n&&(n=t.getLine(e.id)),t.getFigure(e.composite).assignFigure(n)}})),t.calculateConnectionIntersection(),t.getLines().each(((t,e)=>{e.svgPathString=null,e.repaint()})),t.linesToRepaintAfterDragDrop=t.getLines().clone(),t.showDecoration(),n},createFigureFromType:function(t){return Function(`return new ${t}()`)()},createFigureFromElement:function(t){return null}})},"./src/io/json/Writer.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.io.json.Writer=i.default.io.Writer.extend({init:function(){this._super()},marshal:function(t,e){if("function"!=typeof e)throw"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.";var n=[];t.getFigures().each(((t,e)=>{n.push(e.getPersistentAttributes())})),t.getLines().each(((t,e)=>{n.push(e.getPersistentAttributes())}));var r=i.default.util.Base64.encode(JSON.stringify(n,null,2));e(n,r)}})},"./src/io/png/Writer.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};const s=n("./node_modules/canvg/dist/index.cjs");i.default.io.png.Writer=i.default.io.Writer.extend({init:function(){this._super()},marshal:function(t,e,n){if("function"!=typeof e)throw"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.";let r="",a=!1;if(t instanceof i.default.Figure){let e=t,n=e.getPosition();e.setPosition(1,1),r='<svg xmlns:xlink="http://www.w3.org/1999/xlink" >'+e.shape.node.outerHTML+"</svg>",e.setPosition(n),e.initialWidth=e.getWidth()+2,e.initialHeight=e.getHeight()+2}else a={zoom:t.getZoom(),scrollLeft:t.getScrollLeft(),scrollTop:t.getScrollTop()},t.setZoom(1),t.hideDecoration(),r=(new XMLSerializer).serializeToString(t.getHtmlContainer().find("svg")[0]);let o=$('<canvas id="canvas_png_export_for_draw2d"></canvas>');$("body").append(o);let c=$("#canvas_png_export_for_draw2d")[0];c.width=t.initialWidth,c.height=t.initialHeight,s("canvas_png_export_for_draw2d",r,{ignoreMouse:!0,ignoreAnimation:!0,renderCallback:function(){try{if(t instanceof i.default.Canvas&&(a&&(t.setZoom(a.zoom),t.setScrollLeft(a.scrollLeft),t.setScrollTop(a.scrollTop)),t.showDecoration()),void 0!==n){let t=n.x,r=n.y,i=n.w,s=n.h,a=document.createElement("canvas");a.width=i,a.height=s,a.getContext("2d").drawImage(c,t,r,i,s,0,0,i,s);let o=a.toDataURL("image/png"),l=o.replace("data:image/png;base64,","");e(o,l)}else{let t=c.toDataURL("image/png");e(t,t.replace("data:image/png;base64,",""))}}finally{o.remove()}}})}})},"./src/io/svg/Writer.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.io.svg.Writer=i.default.io.Writer.extend({init:function(){this._super()},marshal:function(t,e){if("function"!=typeof e)throw"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.";let n=t.getPrimarySelection();t.setCurrentSelection(null);let r=t.getHtmlContainer().html().replace(/>\s+/g,">").replace(/\s+</g,"<");r=this.formatXml(r),r=r.replace(/<desc>.*<\/desc>/g,"<desc>Create with draw2d JS graph library and RaphaelJS</desc>"),t.setCurrentSelection(n),e(r,i.default.util.Base64.encode(r))}})},"./src/layout/anchor/CenterEdgeConnectionAnchor.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.anchor.CenterEdgeConnectionAnchor=i.default.layout.anchor.ConnectionAnchor.extend({NAME:"draw2d.layout.anchor.CenterEdgeConnectionAnchor",init:function(t){this._super(t)},getLocation:function(t,e){let n=this.getOwner().getParent().getBoundingBox(),r=n.getDirection(t),i=n.getCenter();switch(r){case 0:i.y=n.y;break;case 1:i.x=n.x+n.w;break;case 2:i.y=n.y+n.h;break;case 3:i.x=n.x}return i},getBox:function(){return this.getOwner().getParent().getBoundingBox()},getReferencePoint:function(t){return this.getBox().getCenter()}})},"./src/layout/anchor/ChopboxConnectionAnchor.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.anchor.ChopboxConnectionAnchor=i.default.layout.anchor.ConnectionAnchor.extend({NAME:"draw2d.layout.anchor.ChopboxConnectionAnchor",init:function(t){this._super(t)},getLocation:function(t,e){let n=new i.default.geo.Rectangle(0,0);n.setBounds(this.getBox()),n.translate(-1,-1),n.resize(1,1);let r=n.getCenter();if(n.isEmpty()||t.x===r.x&&t.y===r.y)return r;let s=t.x-r.x,a=t.y-r.y,o=.5/Math.max(Math.abs(s)/n.w,Math.abs(a)/n.h);return s*=o,a*=o,r.translate(s,a),r},getBox:function(){return this.getOwner().getParent().getBoundingBox()},getReferencePoint:function(t){return this.getBox().getCenter()}})},"./src/layout/anchor/ConnectionAnchor.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.layout.anchor.ConnectionAnchor=Class.extend({NAME:"draw2d.layout.anchor.ConnectionAnchor",init:function(t){this.owner=t},getLocation:function(t,e){return this.getReferencePoint(e)},getOwner:function(){return this.owner},setOwner:function(t){if(void 0===t)throw"Missing parameter for 'owner' in ConnectionAnchor.setOwner";this.owner=t},getBox:function(){return this.getOwner().getAbsoluteBounds()},getReferencePoint:function(t){return this.getOwner().getAbsolutePosition()}})},"./src/layout/anchor/FanConnectionAnchor.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.anchor.FanConnectionAnchor=i.default.layout.anchor.ConnectionAnchor.extend({NAME:"draw2d.layout.anchor.FanConnectionAnchor",init:function(t,e){this._super(t),this.separation=e?parseInt(e):10},getLocation:function(t,e){let n=new i.default.geo.Rectangle(0,0);n.setBounds(this.getBox()),n.translate(-1,-1),n.resize(1,1);let r=n.getCenter();if(n.isEmpty()||t.x===r.x&&t.y===r.y)return r;let s=e.getSource(),a=e.getTarget(),o=this.getOwner().getConnections().clone();o.grep((function(t){return t.getTarget()===a&&t.getSource()===s||t.getTarget()===s&&t.getSource()===a}));let c,l=o.indexOf(e)+1,h=r.getPosition(t);c=h===i.default.geo.PositionConstants.SOUTH||h===i.default.geo.PositionConstants.EAST?new i.default.geo.Point(t.x-r.x,t.y-r.y):new i.default.geo.Point(r.x-t.x,r.y-t.y);let u=Math.sqrt(c.x*c.x+c.y*c.y);l<=2&&(u*=1.5);let d=this.separation*c.x/u,p=this.separation*c.y/u;r=l%2==0?new i.default.geo.Point(r.x+l/2*(-1*p),r.y+l/2*d):new i.default.geo.Point(r.x+l/2*p,r.y+l/2*(-1*d));let f=this.getBox().intersectionWithLine(r,t);switch(f.getSize()){case 0:let e=this.getBox().getVertices(),n=e.first();return n.distance=t.distance(n),e.asArray().reduce((function(e,n){return n.distance=t.distance(n),n.distance<e.distance?n:e}));case 1:return f.get(0);case 2:let r=f.get(0),i=f.get(1);return t.distance(r)<t.distance(i)?r:i}},getBox:function(){return this.getOwner().getParent().getBoundingBox()},getReferencePoint:function(t){return this.getBox().getCenter()}})},"./src/layout/anchor/ShortesPathConnectionAnchor.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.anchor.ShortesPathConnectionAnchor=i.default.layout.anchor.ConnectionAnchor.extend({NAME:"draw2d.layout.anchor.ShortesPathConnectionAnchor",init:function(t){this._super(t)},getLocation:function(t,e){let n=this.getOwner().getParent().getBoundingBox(),r=n.getCenter();if(this.getOwner().getParent()instanceof i.default.shape.basic.Oval){let e=this.getOwner().getParent().intersectionWithLine(t,r);if(1===e.getSize())return e.get(0)}switch(n.determineOctant(new i.default.geo.Rectangle(t.x,t.y,2,2))){case 0:return n.getTopLeft();case 1:return new i.default.geo.Point(t.x,n.getTop());case 2:return n.getTopRight();case 3:return new i.default.geo.Point(n.getRight(),t.y);case 4:return n.getBottomRight();case 5:return new i.default.geo.Point(t.x,n.getBottom());case 6:return n.getBottomLeft();case 7:return new i.default.geo.Point(n.getLeft(),t.y)}return n.getTopLeft()},getBox:function(){return this.getOwner().getParent().getBoundingBox()},getReferencePoint:function(t){return this.getBox().getCenter()}})},"./src/layout/connection/CircuitConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.CircuitConnectionRouter=i.default.layout.connection.ManhattanConnectionRouter.extend({NAME:"draw2d.layout.connection.CircuitConnectionRouter",init:function(){this._super(),this.setBridgeRadius(4),this.setVertexRadius(2),this.abortRoutingOnFirstVertexNode=!1},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},onUninstall:function(t){void 0!==t.vertexNodes&&null!==t.vertexNodes&&(t.vertexNodes.remove(),t.vertexNodes=null)},setVertexRadius:function(t){return this.vertexRadius=t,this},setJunctionRadius:function(t){this.vertexRadius=t},setBridgeRadius:function(t){return this.bridgeRadius=t,this.bridge_LR=[" r",.5,-.5,t-t/2,-(t-t/4),t,-t,t+t/2,-(t-t/4),2*t,"0 "].join(" "),this.bridge_RL=[" r",-.5,-.5,-(t-t/2),-(t-t/4),-t,-t,-(t+t/2),-(t-t/4),2*-t,"0 "].join(" "),this},route:function(t,e){let n=t.getStartPoint(),r=t.getSource().getConnectionDirection(t.getTarget()),s=t.getEndPoint(),a=t.getTarget().getConnectionDirection(t.getSource());this._route(t,s,a,n,r);let o=t.getCanvas().getIntersection(t).sort("x"),c=o.clone().reverse(),l=o;void 0!==t.vertexNodes&&null!==t.vertexNodes&&t.vertexNodes.remove(),t.vertexNodes=t.canvas.paper.set();let h=t.getVertices(),u=h.get(0),d=["M",.5+(0|u.x)," ",.5+(0|u.y)],p=u,f=null,g=null,m=null;for(let e=1;e<h.getSize();e++)u=h.get(e),p.x>u.x?(l=c,g=this.bridge_RL,f=-this.bridgeRadius):(l=o,g=this.bridge_LR,f=this.bridgeRadius),l.each(((e,n)=>{if(!0===i.default.shape.basic.Line.hit(1,p.x,p.y,u.x,u.y,n.x,n.y))if(t.sharingPorts(n.other)){let e=n.other,r=e.getZOrder();if(t.getZOrder()<r){let r=t.canvas.paper.ellipse(n.x,n.y,this.vertexRadius,this.vertexRadius).attr({fill:t.lineColor.rgba()});t.vertexNodes.push(r),!0===this.abortRoutingOnFirstVertexNode&&(t.getSource()!==e.getSource()&&t.getSource()!==e.getTarget()||(d=["M",.5+(0|n.x)," ",.5+(0|n.y)],null!==m&&(m.remove(),t.vertexNodes.exclude(m))),m=r)}}else u.y===n.y&&(d.push(" L",.5+(n.x-f|0)," ",.5+(0|n.y)),d.push(g))})),d.push(" L",.5+(0|u.x)," ",.5+(0|u.y)),p=u;t.svgPathString=d.join("")}})},"./src/layout/connection/ConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.ConnectionRouter=Class.extend({NAME:"draw2d.layout.connection.ConnectionRouter",init:function(){},route:function(t,e){throw"subclasses must implement the method [ConnectionRouter.route]"},_paint:function(t){let e,n,r,s=t=>t.toFixed(2),a=t.getVertices(),o=a.get(0),c=t.getRadius(),l=["M",s(o.x)," ",s(o.y)],h=1;if(c>0){let t=o;for(e=a.getSize()-1;h<e;h++)o=a.get(h),n=i.default.geo.Util.insetPoint(o,t,c),l.push("L",s(n.x),",",s(n.y)),r=a.get(h+1),n=i.default.geo.Util.insetPoint(o,r,c),l.push("Q",o.x,",",o.y," ",s(n.x),", ",s(n.y)),t=o;o=a.get(h),l.push("L",s(o.x),",",s(o.y))}else for(e=a.getSize();h<e;h++)o=a.get(h),l.push("L",s(o.x),",",s(o.y));t.svgPathString=l.join("")},onInstall:function(t){},onUninstall:function(t){},canRemoveVertexAt:function(t){return!1},canRemoveSegmentAt:function(t){return!1},getPersistentAttributes:function(t,e){return e},setPersistentAttributes:function(t,e){},onDrag:function(t,e,n,r,i){},verticesSet:function(t){}})},"./src/layout/connection/DirectRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.DirectRouter=i.default.layout.connection.ConnectionRouter.extend({NAME:"draw2d.layout.connection.DirectRouter",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},invalidate:function(){},route:function(t,e){let n=t.getStartPosition(),r=t.getEndPosition();t.addPoint(n),t.addPoint(r);let i=["M",n.x," ",n.y];i.push("L",r.x," ",r.y),t.svgPathString=i.join("")}})},"./src/layout/connection/FanConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.FanConnectionRouter=i.default.layout.connection.DirectRouter.extend({NAME:"draw2d.layout.connection.FanConnectionRouter",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},route:function(t,e){let n=t.getSource().getConnections().clone();n.grep((e=>e.getTarget()===t.getTarget()||e.getSource()===t.getTarget())),n.getSize()>1?this.routeCollision(t,n.indexOf(t)):this._super(t,e)},routeCollision:function(t,e){e+=1;let n,r=t.getStartPoint(),s=t.getEndPoint(),a=new i.default.geo.Point((s.x+r.x)/2,(s.y+r.y)/2),o=s.getPosition(r);n=o===i.default.geo.PositionConstants.SOUTH||o===i.default.geo.PositionConstants.EAST?new i.default.geo.Point(s.x-r.x,s.y-r.y):new i.default.geo.Point(r.x-s.x,r.y-s.y);let c,l=Math.sqrt(n.x*n.x+n.y*n.y),h=15*n.x/l,u=15*n.y/l;c=e%2==0?new i.default.geo.Point(a.x+e/2*(-1*u),a.y+e/2*h):new i.default.geo.Point(a.x+e/2*u,a.y+e/2*(-1*h)),t.addPoint(r),t.addPoint(c),t.addPoint(s),this._paint(t)}})},"./src/layout/connection/InteractiveManhattanConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.InteractiveManhattanConnectionRouter=i.default.layout.connection.ManhattanConnectionRouter.extend({NAME:"draw2d.layout.connection.InteractiveManhattanConnectionRouter",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.OrthogonalSelectionFeedbackPolicy),t._routingMetaData??={routedByUserInteraction:!1,fromDir:-1,toDir:-1}},onUninstall:function(t){delete t._routingMetaData},route:function(t,e){e.oldVertices,0===e.oldVertices.getSize()||!1===t._routingMetaData.routedByUserInteraction?(this._super(t,e),t._routingMetaData.fromDir=t.getSource().getConnectionDirection(t.getTarget()),t._routingMetaData.toDir=t.getTarget().getConnectionDirection(t.getSource())):(this.halfRoute(t,e),this._paint(t))},halfRoute:function(t,e){let n=this.MINDIST,r=Math.max,s=Math.min;e??={oldVertices:new i.default.util.ArrayList};let a=e.oldVertices,o=a.getSize(),c=t.getStartPosition(),l=t.getSource().getConnectionDirection(t.getTarget()),h=t.getEndPosition(),u=t.getTarget().getConnectionDirection(t.getSource());if(t._routingMetaData.fromDir===l&&t._routingMetaData.toDir===u||(t._routingMetaData.routedByUserInteraction=!1,this.route(t,e)),(l===i.default.geo.Rectangle.DIRECTION_RIGHT&&u===i.default.geo.Rectangle.DIRECTION_LEFT&&c.x>h.x&&o<=4||2===t.getVertices().getSize()&&!0===t._routingMetaData.routedByUserInteraction)&&(t._routingMetaData.routedByUserInteraction=!1,this.route(t,e)),a.each(((e,n)=>{t.addPoint(n)})),!t.isInDragDrop){if(e.startMoved||!c.equals(a.get(0))){let e=a.get(1),o=a.get(2);switch(t.setVertex(0,c),l){case i.default.geo.Rectangle.DIRECTION_RIGHT:t.setVertex(1,r(c.x+n,e.x),c.y),o&&t.setVertex(2,r(c.x+n,e.x),o.y);break;case i.default.geo.Rectangle.DIRECTION_LEFT:t.setVertex(1,s(c.x-n,e.x),c.y),o&&t.setVertex(2,s(c.x-n,e.x),o.y);break;case i.default.geo.Rectangle.DIRECTION_UP:t.setVertex(1,c.x,s(c.y-n,e.y)),o&&t.setVertex(2,o.x,s(c.y-n,e.y));break;case i.default.geo.Rectangle.DIRECTION_DOWN:t.setVertex(1,c.x,r(c.y+n,e.y)),o&&t.setVertex(2,o.x,r(c.y+n,e.y))}}if(e.endMoved||!h.equals(a.get(o-1))){let e=a.get(o-2),c=a.get(o-3);switch(t.setVertex(o-1,h),u){case i.default.geo.Rectangle.DIRECTION_RIGHT:t.setVertex(o-2,r(h.x+n,e.x),h.y),c&&t.setVertex(o-3,r(h.x+n,e.x),c.y);break;case i.default.geo.Rectangle.DIRECTION_LEFT:t.setVertex(o-2,s(h.x-n,e.x),h.y),c&&t.setVertex(o-3,s(h.x-n,e.x),c.y);break;case i.default.geo.Rectangle.DIRECTION_UP:t.setVertex(o-2,h.x,s(h.y-n,e.y)),c&&t.setVertex(o-3,c.x,s(h.y-n,e.y));break;case i.default.geo.Rectangle.DIRECTION_DOWN:t.setVertex(o-2,h.x,r(h.y+n,e.y)),c&&t.setVertex(o-3,c.x,r(h.y+n,e.y))}}}},canRemoveSegmentAt:function(t,e){let n=t.getVertices().getSize()-1;if(e<=0||e+1>=n)return!1;if(n<4)return!1;let r=t.getStartPosition(),s=t.getSource().getConnectionDirection(t.getTarget()),a=t.getEndPosition(),o=t.getTarget().getConnectionDirection(t.getSource());if(n<=5){if(s===i.default.geo.Rectangle.DIRECTION_RIGHT&&o===i.default.geo.Rectangle.DIRECTION_LEFT&&r.x>=a.x)return!1;if(s==i.default.geo.Rectangle.DIRECTION_LEFT&o==i.default.geo.Rectangle.DIRECTION_RIGHT&&r.x<=a.x)return!1;if(s==i.default.geo.Rectangle.DIRECTION_UP&o==i.default.geo.Rectangle.DIRECTION_DOWN&&r.y<=a.y)return!1;if(s==i.default.geo.Rectangle.DIRECTION_DOWN&o==i.default.geo.Rectangle.DIRECTION_UP&&r.y>=a.y)return!1;let e=new i.default.Connection;if(e.lineSegments=new i.default.util.ArrayList,e.vertices=new i.default.util.ArrayList,e.sourcePort=t.sourcePort,e.targetPort=t.targetPort,e._routingMetaData={routedByUserInteraction:!1,fromDir:-1,toDir:-1},this.route(e,{oldVertices:new i.default.util.ArrayList}),t.getVertices().getSize()-1<=e.getVertices().getSize()-1)return!1}return!0},onDrag:function(t,e,n,r,i){let s=0;if(null===t.draggedSegment){let e=t.getVertices().getSize()-1;for(s=1;s<e;s++)t.getVertex(s).translate(r,i);return}if(0===t.draggedSegment.index||t.draggedSegment.index===t.getSegments().getSize()-1)return;t._routingMetaData.routedByUserInteraction=!0;let a=t.draggedSegment.start,o=t.draggedSegment.end;s=t.draggedSegment.index;let c=t.getVertices().first(),l=t.getVertices().last(),h=0;a.y===o.y?(1===s&&(h=a.y-c.y),s===t.getSegments().getSize()-2&&(h=o.y-l.y),h<0&&i>0?i=Math.min(i,-h-this.MINDIST):h>0&&i<0&&(i=-Math.min(-i,h-this.MINDIST)),t.getVertex(s).translate(0,i),t.getVertex(s+1).translate(0,i)):a.x===o.x&&(1===s&&(h=a.x-c.x,h<0&&r>0?r=Math.min(r,-h-this.MINDIST):h>0&&r<0&&(r=-Math.min(-r,h-this.MINDIST))),s===t.getSegments().getSize()-2&&(h=o.x-l.x,h<0&&r>0?r=Math.min(r,-h-this.MINDIST):h>0&&r<0&&(r=-Math.min(-r,h-this.MINDIST))),t.getVertex(s).translate(r,0),t.getVertex(s+1).translate(r,0))},verticesSet:function(t){t._routingMetaData.routedByUserInteraction=!0,null!==t.getSource()&&null!==t.getTarget()&&(t._routingMetaData.fromDir=t.getSource().getConnectionDirection(t.getTarget()),t._routingMetaData.toDir=t.getTarget().getConnectionDirection(t.getSource()))},getPersistentAttributes:function(t,e){return e.vertex=[],t.getVertices().each(((t,n)=>{e.vertex.push({x:n.x,y:n.y})})),e.routingMetaData={...t._routingMetaData},e},setPersistentAttributes:function(t,e){Array.isArray(e.vertex)&&(t.oldPoint=null,t.lineSegments=new i.default.util.ArrayList,t.setVertices(e.vertex)),void 0!==e.routingMetaData&&(t._routingMetaData={...e.routingMetaData})}})},"./src/layout/connection/ManhattanBridgedConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.ManhattanBridgedConnectionRouter=i.default.layout.connection.ManhattanConnectionRouter.extend({NAME:"draw2d.layout.connection.ManhattanBridgedConnectionRouter",BRIDGE_HORIZONTAL_LR:" r 0 0 3 -4 7 -4 10 0 13 0 ",BRIDGE_HORIZONTAL_RL:" r 0 0 -3 -4 -7 -4 -10 0 -13 0 ",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},route:function(t,e){let n=t.getStartPoint(),r=t.getSource().getConnectionDirection(t.getTarget()),s=t.getEndPoint(),a=t.getTarget().getConnectionDirection(t.getSource());this._route(t,s,a,n,r),t.getVertices().getSize()<2&&t.addPoint(n);let o=t.getCanvas().getIntersection(t).sort("x"),c=o.clone().reverse(),l=o,h=t.getVertices(),u=h.get(0),d=["M",.5+(0|u.x)," ",.5+(0|u.y)],p=u;for(let t=1;t<h.getSize();t++){u=h.get(t);let e=5,n=this.BRIDGE_HORIZONTAL_LR;p.x>=u.x&&(l=c,n=this.BRIDGE_HORIZONTAL_RL,e=-e),l.each((function(t,r){!1===r.justTouching&&!0===i.default.shape.basic.Line.hit(1,p.x,p.y,u.x,u.y,r.x,r.y)&&Math.floor(u.y)===Math.floor(r.y)&&(d.push(" L",.5+(r.x-e|0)," ",.5+(0|r.y)),d.push(n))})),d.push(" L",.5+(0|u.x)," ",.5+(0|u.y)),p=u}t.svgPathString=d.join("")}})},"./src/layout/connection/ManhattanConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.ManhattanConnectionRouter=i.default.layout.connection.ConnectionRouter.extend({NAME:"draw2d.layout.connection.ManhattanConnectionRouter",MINDIST:20,TOL:.1,TOLxTOL:.01,TOGGLE_DIST:20,init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},route:function(t,e){let n=t.getStartPosition(),r=t.getSource().getConnectionDirection(t.getTarget()),i=t.getEndPosition(),s=t.getTarget().getConnectionDirection(t.getSource());this._route(t,i,s,n,r),t.getVertices().getSize()<2&&t.addPoint(n),this._paint(t)},_route:function(t,e,n,r,s){let a,o,c,l=i.default.geo.Rectangle.DIRECTION_UP,h=i.default.geo.Rectangle.DIRECTION_RIGHT,u=i.default.geo.Rectangle.DIRECTION_DOWN,d=i.default.geo.Rectangle.DIRECTION_LEFT,p=e.x-r.x,f=e.y-r.y;p*p<this.TOLxTOL&&f*f<this.TOLxTOL?t.addPoint(new i.default.geo.Point(r.x,r.y)):(n===d?p>0&&f*f<this.TOL&&s===h?(a=r,o=s):(p<0?a=new i.default.geo.Point(e.x-this.MINDIST,e.y):f>0&&s===u||f<0&&s===l?a=new i.default.geo.Point(r.x,e.y):n===s?(c=Math.min(e.x,r.x)-this.MINDIST,a=new i.default.geo.Point(c,e.y)):a=new i.default.geo.Point(e.x-p/2,e.y),o=f>0?l:u):n===h?p<0&&f*f<this.TOL&&s===d?(a=r,o=s):(p>0?a=new i.default.geo.Point(e.x+this.MINDIST,e.y):f>0&&s===u||f<0&&s===l?a=new i.default.geo.Point(r.x,e.y):n===s?(c=Math.max(e.x,r.x)+this.MINDIST,a=new i.default.geo.Point(c,e.y)):a=new i.default.geo.Point(e.x-p/2,e.y),o=f>0?l:u):n===u?p*p<this.TOL&&f<0&&s===l?(a=r,o=s):(f>0?a=new i.default.geo.Point(e.x,e.y+this.MINDIST):p>0&&s===h||p<0&&s===d?a=new i.default.geo.Point(e.x,r.y):n===s?(c=Math.max(e.y,r.y)+this.MINDIST,a=new i.default.geo.Point(e.x,c)):a=new i.default.geo.Point(e.x,e.y-f/2),o=p>0?d:h):n===l&&(p*p<this.TOL&&f>0&&s===u?(a=r,o=s):(f<0?a=new i.default.geo.Point(e.x,e.y-this.MINDIST):p>0&&s===h||p<0&&s===d?a=new i.default.geo.Point(e.x,r.y):n===s?(c=Math.min(e.y,r.y)-this.MINDIST,a=new i.default.geo.Point(e.x,c)):a=new i.default.geo.Point(e.x,e.y-f/2),o=p>0?d:h)),this._route(t,a,o,r,s),t.addPoint(e))}})},"./src/layout/connection/MazeConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};let s=null;i.default.layout.connection.MazeConnectionRouter=i.default.layout.connection.ConnectionRouter.extend({NAME:"draw2d.layout.connection.MazeConnectionRouter",init:function(){this._super(),this.useSpline=!1,this.useSimplify=!0,this.useSimplifyValue=2,this.useDebug=!1,this.useShift=4,this.portOutletOffset=15,this.finder=new PF.JumpPointFinder({allowDiagonal:!1,dontCrossCorners:!0})},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},route:function(t,e){let n=t.getStartPoint(),r=t.getSource().getConnectionDirection(t.getTarget()),i=t.getEndPoint(),s=t.getTarget().getConnectionDirection(t.getSource());this._route(t,i,s,n,r),this._paint(t)},_route:function(t,e,n,r,a){let o=this.useShift,c=r,l=e;e=this.getAdjustedPoint(e,n,this.portOutletOffset),r=this.getAdjustedPoint(r,a,this.portOutletOffset);let h=this.generateNoGoGrid(t,e,n,r,a),u=this.finder.findPath(Math.max(e.x)>>o,Math.max(e.y)>>o,Math.max(r.x)>>o,Math.max(0,r.y)>>o,h);if(u.forEach((t=>{t.x=t[0]=t[0]<<o,t.y=t[1]=t[1]<<o})),this.useDebug){null!==s&&s.remove(),s=t.canvas.paper.set();for(let e=0;e<h.width;e++)for(let n=0;n<h.height;n++)h.isWalkableAt(e,n)||s.push(t.canvas.paper.rect(e<<o,n<<o,1<<o,1<<o).attr({fill:"red",opacity:"0.1"}));if(s.push(t.canvas.paper.rect(e.x-3,e.y-3,6,6).attr({fill:"#ff0000",opacity:"0.8"})),s.push(t.canvas.paper.rect(r.x-3,r.y-3,6,6).attr({fill:"#ff0000",opacity:"0.8"})),u.forEach((e=>{s.push(t.canvas.paper.rect(e.x-3,e.y-3,6,6).attr({fill:"#0000ff",opacity:"0.8"}))})),u.length>0){let e=u[0],n=["M",e.x.toFixed(2)," ",e.y.toFixed(2)];for(let t=1;t<u.length;t++)e=u[t],n.push("L",e.x.toFixed(2)," ",e.y.toFixed(2));n=n.join(""),s.push(t.canvas.paper.path(n).attr({stroke:"#0000ff"}))}}if(this.adjustPath(e,u,n),u.reverse(),this.adjustPath(r,u,a),u.reverse(),u.forEach((t=>{t.x=t[0],t.y=t[1]})),this.useSpline){let e=new i.default.util.ArrayList;if(e.add(l),u.forEach((t=>{e.add(new i.default.geo.Point(t[0],t[1]))})),e.add(c),this.useDebug){u.forEach((e=>{s.push(t.canvas.paper.rect(e.x-3,e.y-3,6,6).attr({fill:"#00ff00",opacity:"0.8"}))}));let e=u[0],n=["M",e.x.toFixed(2)," ",e.y.toFixed(2)];for(let t=1;t<u.length;t++)e=u[t],n.push("L",e.x.toFixed(2)," ",e.y.toFixed(2));n=n.join(""),s.push(t.canvas.paper.path(n).attr({stroke:"#00ff00"}))}this.spline=new i.default.util.spline.CubicSpline;let n=this.spline.generate(e,8);this.useSimplify?(u=[],n.each((function(t,e){u.push({x:e.x,y:e.y})})),u=this.simplify(u,this.useSimplifyValue,!0),u.forEach((e=>{t.addPoint(e.x,e.y)}))):n.each((function(e,n){t.addPoint(n)}))}else{if(this.useSimplify&&(u=this.simplify(u,this.useSimplifyValue,!0)),this.useDebug&&(u.forEach((e=>{s.push(t.canvas.paper.rect(e.x-3,e.y-3,6,6).attr({fill:"#00ff00",opacity:"0.8"}))})),u.length>0)){let e=u[0],n=["M",e.x.toFixed(2)," ",e.y.toFixed(2)];for(let t=1;t<u.length;t++)e=u[t],n.push("L",e.x.toFixed(2)," ",e.y.toFixed(2));n=n.join(""),s.push(t.canvas.paper.path(n).attr({stroke:"#00ff00"}))}t.addPoint(l),u.forEach((e=>{t.addPoint(e[0],e[1])})),t.addPoint(c)}},generateNoGoGrid:function(t,e,n,r,i){let s=this.useShift,a=(1<<s)/2,o=t.getCanvas().paper.width>>s,c=t.getCanvas().paper.height>>s,l=new PF.Grid(o,c);t.getCanvas().getFigures().each((function(t,n){let i=n.getBoundingBox();if(!0===i.hitTest(e.x,e.y)||i.hitTest(r.x,r.y))return;let o=i.x>>s,c=i.y>>s;if(o<1||c<1)return;let h=i.x+i.w+a>>s,u=i.y+i.h+a>>s;for(let t=o;t<=h;t++)for(let e=c;e<=u;e++)l.setWalkableAt(t,e,!1)}));let h=t.getSource().getParent().getBoundingBox();if(1===i||3===i){let t=h.y>>s;if(t>0){let e=h.y+h.h,n=r.x>>s;for(let r=t-1;r<<s<=e;r++)l.setWalkableAt(n,r,!0)}}else{let t=h.x>>s;if(t>0){let e=h.x+h.w,n=r.x>>s;for(let r=t-1;r<<s<=e;r++)l.setWalkableAt(r,n,!0)}}if(h=t.getTarget().getParent().getBoundingBox(),1===n||3===n){let t=h.y>>s;if(t>0){let n=h.y+h.h,r=e.x>>s;for(let e=t-1;e<<s<=n;e++)l.setWalkableAt(r,e,!0)}}else{let t=h.x>>s;if(t>0){let n=h.x+h.w,r=e.x>>s;for(let e=t-1;e<<s<=n;e++)l.setWalkableAt(e,r,!0)}}return l},getAdjustedPoint:function(t,e,n){switch(e){case i.default.geo.Rectangle.DIRECTION_UP:return new i.default.geo.Point(t.x,t.y-n);case i.default.geo.Rectangle.DIRECTION_RIGHT:return new i.default.geo.Point(t.x+n,t.y);case i.default.geo.Rectangle.DIRECTION_DOWN:return new i.default.geo.Point(t.x,t.y+n);case i.default.geo.Rectangle.DIRECTION_LEFT:return new i.default.geo.Point(t.x-n,t.y)}},adjustPath:function(t,e,n){let r=this.useShift,i=t.x>>r,s=t.y>>r;e.forEach((e=>{if(s!==e[1]>>r)return!1;e[1]=t.y})),e.forEach((e=>{if(i!==e[0]>>r)return!1;e[0]=t.x}))},getSquareDistance:function(t,e){let n=t.x-e.x,r=t.y-e.y;return n*n+r*r},getSquareSegmentDistance:function(t,e,n){let r,i=e.x,s=e.y,a=n.x-i,o=n.y-s;return 0===a&&0===o||(r=((t.x-i)*a+(t.y-s)*o)/(a*a+o*o),r>1?(i=n.x,s=n.y):r>0&&(i+=a*r,s+=o*r)),a=t.x-i,o=t.y-s,a*a+o*o},simplifyRadialDistance:function(t,e){let n,r=t.length,i=null,s=t[0],a=[s];for(n=1;n<r;n++)i=t[n],this.getSquareDistance(i,s)>e&&(a.push(i),s=i);return s!==i&&a.push(i),a},simplifyDouglasPeucker:function(t,e){let n,r,i,s,a=t.length,o=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(a),c=0,l=a-1,h=[],u=[],d=[];for(o[c]=o[l]=1;l;){for(r=0,n=c+1;n<l;n++)i=this.getSquareSegmentDistance(t[n],t[c],t[l]),i>r&&(s=n,r=i);r>e&&(o[s]=1,h.push(c),u.push(s),h.push(s),u.push(l)),c=h.pop(),l=u.pop()}for(n=0;n<a;n++)o[n]&&d.push(t[n]);return d},simplify:function(t,e,n){let r=void 0!==e?e*e:1;return n||(t=this.simplifyRadialDistance(t,r)),t=this.simplifyDouglasPeucker(t,r)}})},"./src/layout/connection/MuteableManhattanConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.MuteableManhattanConnectionRouter=i.default.layout.connection.ManhattanConnectionRouter.extend({NAME:"draw2d.layout.connection.MuteableManhattanConnectionRouter",UP:new i.default.geo.Ray(0,-1),DOWN:new i.default.geo.Ray(0,1),LEFT:new i.default.geo.Ray(-1,0),RIGHT:new i.default.geo.Ray(1,0),init:function(){this._super(),this.rowsUsed={},this.colsUsed={},this.constraints={},this.reservedInfo={}},route:function(t,e){this.rowsUsed={},this.colsUsed={},this.constraints={},this.reservedInfo={};let n,r=t.getCanvas(),s=t.getStartPoint(),a=t.getEndPoint(),o=new i.default.geo.Ray(s),c=new i.default.geo.Ray(a),l=new i.default.geo.Ray((o.x+c.x)/2,(o.y+c.y)/2),h=new i.default.geo.Ray(c.x-o.x,c.y-o.y),u=this.getStartDirection(t),d=this.getEndDirection(t),p=new i.default.util.ArrayList,f=u.isHorizontal();if(f?p.add(o.y):p.add(o.x),f=!f,0===u.dot(d))u.dot(h)>=0&&d.dot(h)<=0||(n=u.dot(h)<0?u.similarity(o.translated(u.scaled(10))):f?l.y:l.x,p.add(n),f=!f,n=d.dot(h)>0?d.similarity(c.translated(d.scaled(10))):f?l.y:l.x,p.add(n),f=!f);else if(u.dot(d)>0)n=u.dot(h)>=0?u.similarity(o.translated(u.scaled(10))):d.similarity(c.translated(d.scaled(10))),p.add(n),f=!f;else{if(u.dot(h)<0&&(n=u.similarity(o.translated(u.scaled(10))),p.add(n),f=!f),this.isCycle(t))n=f?t.getSource().getParent().getBoundingBox().getTop()-10:t.getSource().getParent().getBoundingBox().getRight()+10;else if(f){let t=l.y,e=d.similarity(c.translated(d.scaled(10))),s=new i.default.geo.Ray(p.get(p.getSize()-1),t),a=this.findFirstFigureAtStraightLine(r,s,this.LEFT,i.default.util.ArrayList.EMPTY_LIST);for(;null!=a&&a.getBoundingBox().x+a.getBoundingBox().width>e;)t=a.getBoundingBox().y+a.getBoundingBox().height+5,s.y=t,a=this.findFirstFigureAtStraightLine(r,s,this.LEFT,i.default.util.ArrayList.EMPTY_LIST);n=t}else{let e=this.findFirstFigureAtStraightLine(r,o,this.RIGHT,this.getExcludingFigures(t));null==e?n=l.x:(n=Math.min(l.x,o.translated(new i.default.geo.Ray(3*(e.getBoundingBox().x-o.x)/4,0)).x),n=Math.max(o.x,n)),n=this.adjust(t,n)}p.add(n),f=!f}f?p.add(c.y):p.add(c.x),this.processPositions(o,c,p,u.isHorizontal(),t),this._paint(t)},getColumnNear:function(t,e,n,r){let i=Math.min(n,r),s=Math.max(n,r);i>e&&(s=i,i=e-(i-e)),s<e&&(i=s,s=e+(e-s));let a,o=0,c=-1;for(e%6!=0&&(e-=e%6);o<e;){if(a=parseInt(e+o*c),!(a in this.colsUsed))return this.colsUsed[a]=a,this.reserveColumn(t,a),a;if(a<=i)return a+6;if(a>=s)return a-6;1===c?c=-1:(c=1,o+=6)}return e},getRowNear:function(t,e,n,r){let i=Math.min(n,r),s=Math.max(n,r);i>e&&(s=i,i=e-(i-e)),s<e&&(i=s,s=e+(e-s));let a,o=0,c=-1;for(e%6!=0&&(e-=e%6);o<e;){if(a=parseInt(e+o*c),!(a in this.rowsUsed))return this.rowsUsed[a]=a,this.reserveRow(t,a),a;if(a<=i)return a+6;if(a>=s)return a-6;1===c?c=-1:(c=1,o+=6)}return e},getEndDirection:function(t){let e=t.getEndPoint(),n=t.getTarget().getParent().getBoundingBox();return this.getDirection(n,e)},getStartDirection:function(t){let e=t.getStartPoint(),n=t.getSource().getParent().getBoundingBox();return this.getDirection(n,e)},getDirection:function(t,e){let n=Math.abs(t.y-e.y),r=Math.abs(t.x-e.x),i=this.LEFT;return n<=r&&(r=n,i=this.UP),n=Math.abs(t.getBottom()-e.y),n<=r&&(r=n,i=this.DOWN),n=Math.abs(t.getRight()-e.x),n<r&&(i=this.RIGHT),i},processPositions:function(t,e,n,r,s){this.removeReservedLines(s);let a,o,c,l,h,u,d,p=[];for(r?p.push(t.x):p.push(t.y),a=0;a<n.getSize();a++)p.push(n.get(a));for(r===(n.getSize()%2==1)?p.push(e.x):p.push(e.y),s.addPoint(new i.default.geo.Point(t.x,t.y)),a=2;a<p.length-1;a++)r=!r,l=p[a-1],c=p[a],d=a!==p.length-2,r?(d&&(h=p[a-2],u=p[a+2],p[a]=c=this.getRowNear(s,c,h,u)),o=new i.default.geo.Point(l,c)):(d&&(h=p[a-2],u=p[a+2],p[a]=c=this.getColumnNear(s,c,h,u)),o=new i.default.geo.Point(c,l)),s.addPoint(o);s.addPoint(new i.default.geo.Point(e.x,e.y))},removeReservedLines:function(t){let e=this.reservedInfo[t];if(null!=e){for(let t=0;t<e.reservedRows.getSize();t++)delete this.rowsUsed[e.reservedRows.get(t)];for(let t=0;t<e.reservedCols.getSize();t++)delete this.colsUsed[e.reservedCols.get(t)];delete this.reservedInfo[t]}},reserveColumn:function(t,e){let n=this.reservedInfo[t];null==n&&(n={reservedCols:new i.default.util.ArrayList,reservedRows:new i.default.util.ArrayList},this.reservedInfo[t]=n),n.reservedCols.add(e)},reserveRow:function(t,e){let n=this.reservedInfo[t];null==n&&(n={reservedCols:new i.default.util.ArrayList,reservedRows:new i.default.util.ArrayList},this.reservedInfo[t]=n),n.reservedRows.add(e)},getConstraint:function(t){return this.constraints[t]},setConstraint:function(t,e){this.constraints[t]=e},isCycle:function(t){let e=t.getSource().getParent(),n=t.getTarget().getParent();return e.id===n.id},getExcludingFigures:function(t){let e=new i.default.util.ArrayList;return e.add(t.getSource().getParent()),e.add(t.getTarget().getParent()),e},findFirstFigureAtStraightLine:function(t,e,n,r){let i=null,s=t.getFigures(),a=this;return s.each((function(t,s){try{if(!r.contains(s)){let t=s.getBoundingBox();a.LEFT.equals(n)?e.x>t.x&&e.y>=t.y&&e.y<=t.y+t.h&&(null===i||t.x>i.getBoundingBox().x)&&(i=s):a.RIGHT.equals(n)?e.x<t.x+t.w&&e.y>=t.y&&e.y<=t.y+t.h&&(null==i||t.x<i.getBoundingBox().x)&&(i=s):a.UP.equals(n)?e.y>t.y&&e.x>=t.x&&e.x<=t.x+t.w&&(null===i||t.y>i.getBoundingBox().y)&&(i=s):a.DOWN.equals(n)&&e.y<t.y+t.h&&e.x>=t.x&&e.x<=t.x+t.w&&(null===i||t.y<i.getBoundingBox().y)&&(i=s)}}catch(t){console.log(t)}})),i},adjust:function(t,e){let n=e,r=t.getSource().getPosition();return t.getCanvas().getLines().each((function(i,s){try{if(s===t)return;let i=s.getTarget().getPosition();r.x<i.x&&r.y===i.y&&s.getVertices().getMidpoint().x<=e&&(n=s.getVertices().getMidpoint().x-5)}catch(t){console.log(t)}})),n}})},"./src/layout/connection/RubberbandRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.RubberbandRouter=i.default.layout.connection.ConnectionRouter.extend({NAME:"draw2d.layout.connection.RubberbandRouter",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},invalidate:function(){},route:function(t,e){let n=10,r=t.getStartPoint(),s=t.getEndPoint(),a=s.subtract(r),o=a.clone(),c=a.length(),l=1-Math.min(.75,.002*c),h=r.lerp(s,.25*l),u=r.lerp(s,.5),d=r.lerp(s,1-.25*l);n=Math.max(5,n*l),a.x=a.x/c*n,a.y=a.y/c*n,o.x=o.x/c*(n*l),o.y=o.y/c*(n*l);let p=new i.default.geo.Point(-a.y+r.x,a.x+r.y),f=new i.default.geo.Point(a.y+r.x,-a.x+r.y),g=new i.default.geo.Point(-o.y+h.x,o.x+h.y),m=new i.default.geo.Point(o.y+h.x,-o.x+h.y),y=new i.default.geo.Point(-o.y+u.x,o.x+u.y),x=new i.default.geo.Point(o.y+u.x,-o.x+u.y),v=new i.default.geo.Point(-o.y+d.x,o.x+d.y),b=new i.default.geo.Point(o.y+d.x,-o.x+d.y),w=new i.default.geo.Point(-a.y+s.x,a.x+s.y),C=new i.default.geo.Point(a.y+s.x,-a.x+s.y);t.addPoint(r),t.addPoint(s);let M=["M",p.x,",",p.y];M.push("A",n,",",n,"0 0 1 ",f.x,",",f.y),M.push("C",f.x,",",f.y,m.x,",",m.y,x.x,",",x.y),M.push("C",x.x,",",x.y,b.x,",",b.y,C.x,",",C.y),M.push("A",n,",",n,"0 0 1",w.x,",",w.y),M.push("C",w.x,",",w.y,v.x,",",v.y,y.x,",",y.y),M.push("C",y.x,",",y.y,g.x,",",g.y,p.x,",",p.y),t.svgPathString=M.join(" ")}})},"./src/layout/connection/SketchConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.SketchConnectionRouter=i.default.layout.connection.MazeConnectionRouter.extend({NAME:"draw2d.layout.connection.SketchConnectionRouter",init:function(){this._super(),this.useSpline=!0,this.useShift=5,this.useSimplifyValue=.2,this.finder=new PF.JumpPointFinder({allowDiagonal:!1,dontCrossCorners:!0})},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)}})},"./src/layout/connection/SplineConnectionRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.SplineConnectionRouter=i.default.layout.connection.ManhattanConnectionRouter.extend({NAME:"draw2d.layout.connection.SplineConnectionRouter",init:function(){this._super(),this.spline=new i.default.util.spline.CubicSpline,this.MINDIST=50},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},route:function(t,e){let n,r=t.getStartPoint(),s=t.getSource().getConnectionDirection(t.getTarget()),a=t.getEndPoint(),o=t.getTarget().getConnectionDirection(t.getSource());this._route(t,a,o,r,s);let c=t.getVertices();c.getSize()<2&&t.addPoint(r),t.oldPoint=null,t.lineSegments=new i.default.util.ArrayList,t.vertices=new i.default.util.ArrayList,this.spline.generate(c,8).each(((e,n)=>{t.addPoint(n)})),c=t.getVertices();let l=c.getSize(),h=c.get(0),u=["M",h.x.toFixed(2)," ",h.y.toFixed(2)];for(n=1;n<l;n++)h=c.get(n),u.push("L",h.x.toFixed(2)," ",h.y.toFixed(2));t.svgPathString=u.join("")}})},"./src/layout/connection/VertexRouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.connection.VertexRouter=i.default.layout.connection.ConnectionRouter.extend({NAME:"draw2d.layout.connection.VertexRouter",init:function(){this._super()},onInstall:function(t){t.installEditPolicy(new i.default.policy.line.VertexSelectionFeedbackPolicy)},invalidate:function(){},route:function(t,e){let n=e.oldVertices.getSize();for(let r=0;r<n;r++)t.addPoint(e.oldVertices.get(r));let r=t.getVertices(),i=t.getStartPosition(r.get(1)),s=t.getEndPosition(r.get(r.getSize()-2));r.first().setPosition(i),r.last().setPosition(s),this._paint(t)},canRemoveVertexAt:function(t,e){return!1},canRemoveSegmentAt:function(t,e){let n=t.getVertices().getSize()-1;return!(e<=0||e>=n)&&n>=2},getPersistentAttributes:function(t,e){return e.vertex=[],t.getVertices().each((function(t,n){e.vertex.push({x:n.x,y:n.y})})),e},setPersistentAttributes:function(t,e){Array.isArray(e.vertex)&&e.vertex.length>1&&(t.oldPoint=null,t.lineSegments=new i.default.util.ArrayList,t.setVertices(e.vertex))},onDrag:function(t,e,n,r,i){let s=t.getVertices().getSize()-1;for(let e=1;e<s;e++)t.getVertex(e).translate(r,i)}})},"./src/layout/locator/BottomLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.BottomLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.BottomLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent(),r=n.getBoundingBox(),s=n instanceof i.default.Port?r.w/2:0,a=e.getBoundingBox();e instanceof i.default.Port?e.setPosition(r.w/2-s,r.h):e.setPosition(r.w/2-a.w/2-s,2+r.h)}})},"./src/layout/locator/CenterLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.CenterLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.CenterLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent().getBoundingBox();if(e instanceof i.default.Port)e.setPosition(n.w/2,n.h/2);else{let t=e.getBoundingBox();e.setPosition(.5+(n.w/2-t.w/2|0),.5+(n.h/2-t.h/2|0))}}})},"./src/layout/locator/ConnectionLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.ConnectionLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.ConnectionLocator",init:function(t,e,n){this._super(t,e,n)}})},"./src/layout/locator/DraggableLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.DraggableLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.DraggableLocator",init:function(t,e,n){this._super(t,e,n)},bind:function(t,e){e.setSelectionAdapter((()=>e))},unbind:function(t,e){e.setSelectionAdapter(null)}})},"./src/layout/locator/InputPortLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.InputPortLocator=i.default.layout.locator.PortLocator.extend({NAME:"draw2d.layout.locator.InputPortLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent(),r=1,i=this.NAME,s=1;n.getPorts().each(((t,n)=>{s=n===e?r:s,r+=n.getLocator().NAME===i?1:0})),this.applyConsiderRotation(e,0,n.getHeight()/r*s)}})},"./src/layout/locator/LeftLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.LeftLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.LeftLocator",init:function(t,e,n){this._super(t,e,n),this.margin=t&&"margin"in t?t.margin:5},relocate:function(t,e){let n=e.getParent(),r=n.getBoundingBox(),s=n instanceof i.default.Port?r.h/2:0;if(e instanceof i.default.Port)e.setPosition(0,r.h/2-s);else{let t=e.getBoundingBox();e.setPosition(-t.w-this.margin,r.h/2-t.h/2-s)}}})},"./src/layout/locator/Locator.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.layout.locator.Locator=Class.extend({NAME:"draw2d.layout.locator.Locator",init:function(t,e,n){this.setterWhitelist={...e},this.getterWhitelist={...n},this.attr(t)},attr:function(t,e){let n=this;if($.isPlainObject(t))for(let e in t){let n=this.setterWhitelist[e],r=t[e];n&&void 0!==r&&n.call(this,r)}else if("string"==typeof t){if(void 0===e){let e=this.getterWhitelist[t];return"function"==typeof e?e.call(this):void 0}"function"==typeof e&&(e=e());let n=this.setterWhitelist[t];n&&n.call(this,e)}else{if(Array.isArray(t))return Object.assign({},...Object.keys(t).map((t=>({[t]:n.attr(t)}))));if(void 0===t){let t={};for(let e in this.getterWhitelist)t[e]=this.getterWhitelist[e].call(this);return t}}return this},bind:function(t,e){return e.setDraggable(!1),e.setSelectable(!1),this},unbind:function(t,e){return this},relocate:function(t,e){e.repaint()},clone:function(){return Function(`return new ${this.NAME}()`)()}})},"./src/layout/locator/ManhattanMidpointLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.ManhattanMidpointLocator=i.default.layout.locator.ConnectionLocator.extend({NAME:"draw2d.layout.locator.ManhattanMidpointLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent().getVertices(),r=Math.floor((n.getSize()-2)/2);if(n.getSize()<=r+1)return;let i=n.get(r),s=n.get(r+1);e.setPosition((s.x-i.x)/2+i.x-e.getWidth()/2|0,(s.y-i.y)/2+i.y-e.getHeight()/2|0)}})},"./src/layout/locator/OutputPortLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.OutputPortLocator=i.default.layout.locator.PortLocator.extend({NAME:"draw2d.layout.locator.OutputPortLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent(),r=1,i=this.NAME,s=1;n.getPorts().each(((t,n)=>{s=n===e?r:s,r+=n.getLocator().NAME===i?1:0})),this.applyConsiderRotation(e,n.getWidth(),n.getHeight()/r*s)}})},"./src/layout/locator/ParallelMidpointLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.ParallelMidpointLocator=i.default.layout.locator.ConnectionLocator.extend({NAME:"draw2d.layout.locator.ParallelMidpointLocator",init:function(t,e,n){this.distance=0,this._super({distance:-5,...t},{x:this.setDistance,...e},{distance:this.getDistance,...n})},setDistance:function(t){return this.distance=t,this},getDistance:function(){return this.distance},relocate:function(t,e){let n=e.getParent().getVertices(),r=Math.floor((n.getSize()-2)/2);if(n.getSize()<=r+1)return;let i=n.get(r),s=n.get(r+1),a=this.distance<=0?this.distance-e.getHeight():this.distance,o=i.x-s.x,c=i.y-s.y,l=Math.sqrt(o*o+c*c),h=-Math.asin(c/l),u=180/Math.PI*h;h<0?s.x<i.x?(h=Math.abs(h)+Math.PI,u=360-u,a=-a-e.getHeight()):(h=2*Math.PI-Math.abs(h),u=360+u):s.x<i.x&&(h=Math.PI-h,u=360-u,a=-a-e.getHeight());let d=this.rotate(l/2-e.getWidth()/2,a,0,0,h),p=this.rotate(0,0,e.getWidth()/2,e.getHeight()/2,h);e.setRotationAngle(u),e.setPosition(d.x-p.x+i.x,d.y-p.y+i.y)},rotate:function(t,e,n,r,i){let s=Math.cos,a=Math.sin;return{x:(t-n)*s(i)-(e-r)*a(i)+n,y:(t-n)*a(i)+(e-r)*s(i)+r}}})},"./src/layout/locator/PolylineMidpointLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.PolylineMidpointLocator=i.default.layout.locator.ManhattanMidpointLocator.extend({NAME:"draw2d.layout.locator.PolylineMidpointLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){var n=e.getParent().getVertices();if(n.getSize()%2==0)this._super(t,e);else{t=Math.floor(n.getSize()/2);var r=n.get(t);e.setPosition(r.x-e.getWidth()/2,r.y-e.getHeight()/2)}}})},"./src/layout/locator/PortLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.PortLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.PortLocator",init:function(t,e,n){this._super(t,e,n)},applyConsiderRotation:function(t,e,n){let r=t.getParent(),i=r.getWidth()/2,s=r.getHeight()/2,a=r.getRotationAngle(),o=Raphael.matrix();if(o.rotate(a,i,s),90===a||270===a){let t=r.getHeight()/r.getWidth();o.scale(t,1/t,i,s)}t.setPosition(o.x(e,n),o.y(e,n))}})},"./src/layout/locator/RightLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.RightLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.RightLocator",init:function(t,e,n){this._super(t,e,n),this.margin=t&&"margin"in t?t.margin:5},relocate:function(t,e){var n=e.getParent(),r=n.getBoundingBox(),s=n instanceof i.default.Port?r.h/2:0;if(e instanceof i.default.Port)e.setPosition(r.w,r.h/2-s);else{var a=e.getBoundingBox();e.setPosition(r.w+this.margin,r.h/2-a.h/2-s)}}})},"./src/layout/locator/SmartDraggableLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.SmartDraggableLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.SmartDraggableLocator",init:function(t,e,n){this._super(t,e,n),this.boundedCorners={init:!1,parent:0,child:0,dist:Number.MAX_SAFE_INTEGER,xOffset:0,yOffset:0}},bind:function(t,e){let n=this,r=function(){n.boundedCorners={init:!1,parent:0,child:0,dist:Number.MAX_SAFE_INTEGER,xOffset:0,yOffset:0};let t,r,i,s,a,o=e.getParent().getBoundingBox().getVertices(),c=e.getBoundingBox().getVertices();for(t=0;t<o.getSize();t++)for(r=0;r<c.getSize();r++)i=o.get(t),s=c.get(r),a=Math.abs(i.distance(s)),a<n.boundedCorners.dist&&(n.boundedCorners={parent:t,child:r,dist:a,xOffset:i.x-s.x,yOffset:i.y-s.y});n.boundedCorners.init=!0};e.setSelectionAdapter((()=>e)),e.getParent().on("added",r),e.on("dragend",r)},unbind:function(t,e){e.setSelectionAdapter(null)},relocate:function(t,e){if(this._super(t,e),!0===this.boundedCorners.init){let t=e.getParent().getBoundingBox().getVertices(),n=e.getBoundingBox().getVertices(),r=t.get(this.boundedCorners.parent),i=n.get(this.boundedCorners.child),s=r.x-i.x,a=r.y-i.y;e.translate(s-this.boundedCorners.xOffset,a-this.boundedCorners.yOffset)}}})},"./src/layout/locator/TopLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.TopLocator=i.default.layout.locator.Locator.extend({NAME:"draw2d.layout.locator.TopLocator",init:function(t,e,n){this._super(t,e,n)},relocate:function(t,e){let n=e.getParent(),r=n.getBoundingBox(),s=n instanceof i.default.Port?r.w/2:0,a=e.getBoundingBox();e instanceof i.default.Port?e.setPosition(r.w/2-s,0):e.setPosition(r.w/2-a.w/2-s,-(a.h+2))}})},"./src/layout/locator/XYAbsPortLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.XYAbsPortLocator=i.default.layout.locator.PortLocator.extend({NAME:"draw2d.layout.locator.XYAbsPortLocator",init:function(t,e,n){this.x=0,this.y=0,this._super(t,{x:this.setX,y:this.setY,...e},{x:this.getX,y:this.getY,...n})},setX:function(t){this.x=t},setY:function(t){this.y=t},getX:function(){return this.x},getY:function(){return this.y},relocate:function(t,e){this.applyConsiderRotation(e,this.x,this.y)}})},"./src/layout/locator/XYRelPortLocator.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.locator.XYRelPortLocator=i.default.layout.locator.PortLocator.extend({NAME:"draw2d.layout.locator.XYRelPortLocator",init:function(t,e,n){"number"==typeof t&&"number"==typeof e?(this.x=t,this.y=e,this._super()):(this.x=0,this.y=0,this._super(t,{x:this.setX,y:this.setY,...e},{x:this.getX,y:this.getY,...n}))},setX:function(t){this.x=t},setY:function(t){this.y=t},getX:function(){return this.x},getY:function(){return this.y},relocate:function(t,e){let n=e.getParent();this.applyConsiderRotation(e,n.getWidth()/100*this.x,n.getHeight()/100*this.y)}})},"./src/layout/mesh/ExplodeLayouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.mesh.ExplodeLayouter=i.default.layout.mesh.MeshLayouter.extend({MIN_MARGIN:40,init:function(){},add:function(t,e){var n=[];n[0]={x:0,y:0},n[1]={x:0,y:0},n[2]={x:0,y:0},n[3]={x:0,y:0},n[4]={x:0,y:0},n[5]={x:0,y:0},n[6]={x:0,y:0},n[7]={x:0,y:0},n[8]={x:0,y:0};var r=e.getBoundingBox(),s=t.getFigures(),a=null,o=0,c=null,l=0;for(l=0;l<s.getSize();l++)if((a=s.get(l))!==e&&(o=a.getBoundingBox().getDistance(r))<this.MIN_MARGIN)switch(this.determineOctant(r,a.getBoundingBox())){case 2:case 3:n[2].x=Math.max(n[2].x,this.MIN_MARGIN-o),n[3].x=Math.max(n[3].x,this.MIN_MARGIN-o),n[4].x=Math.max(n[4].x,this.MIN_MARGIN-o);break;case 4:n[2].x=Math.max(n[2].x,this.MIN_MARGIN-o),n[3].x=Math.max(n[3].x,this.MIN_MARGIN-o),n[4].x=Math.max(n[4].x,this.MIN_MARGIN-o),n[4].y=Math.max(n[4].y,this.MIN_MARGIN-o),n[5].y=Math.max(n[5].y,this.MIN_MARGIN-o),n[6].y=Math.max(n[6].y,this.MIN_MARGIN-o);break;case 5:case 6:n[4].y=Math.max(n[4].y,this.MIN_MARGIN-o),n[5].y=Math.max(n[5].y,this.MIN_MARGIN-o),n[6].y=Math.max(n[6].y,this.MIN_MARGIN-o);break;case 8:o=0|r.getBottomRight().getDistance(a.getBoundingBox().getTopLeft()),n[2].x=Math.max(n[2].x,this.MIN_MARGIN+o),n[3].x=Math.max(n[3].x,this.MIN_MARGIN+o),n[4].x=Math.max(n[4].x,this.MIN_MARGIN+o),n[4].y=Math.max(n[4].y,this.MIN_MARGIN+o),n[5].y=Math.max(n[5].y,this.MIN_MARGIN+o),n[6].y=Math.max(n[6].y,this.MIN_MARGIN+o),n[8].x=Math.max(n[8].x,this.MIN_MARGIN+o)}var h=new i.default.util.ArrayList;for(l=0;l<s.getSize();l++)(a=s.get(l))!==e&&(0===(c=n[this.determineOctant(r,a.getBoundingBox())]).x&&0===c.y||h.add(new i.default.layout.mesh.ProposedMeshChange(a,c.x,c.y)));return h},determineOctant:function(t,e){var n=t.x,r=t.y,i=t.w,s=t.h,a=e.x,o=e.y,c=e.w,l=e.h;return a+c<=n?o+l<=r?0:o>=r+s?6:7:a>=n+i?o+l<=r?2:o>=r+s?4:3:o+l<=r?1:o>=r+s?5:8}})},"./src/layout/mesh/MeshLayouter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.layout.mesh.MeshLayouter=Class.extend({init:function(){},add:function(t,e){return new i.default.util.ArrayList}})},"./src/layout/mesh/ProposedMeshChange.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.layout.mesh.ProposedMeshChange=Class.extend({init:function(t,e,n){this.figure=t,this.x=e,this.y=n},getFigure:function(){return this.figure},getX:function(){return this.x},getY:function(){return this.y}})},"./src/lib/jquery.autoresize.js":()=>{"use strict";!function(t){var e="ar"+ +new Date;n.defaults={onResize:function(){},onBeforeResize:function(){return 123},onAfterResize:function(){return 555},animate:{duration:200,complete:function(){}},extraSpace:50,minHeight:"original",maxHeight:500,minWidth:"original",maxWidth:500};function n(e){return this.filter(n.resizableFilterSelector).each((function(){new r(t(this),e)})),this}function r(e,r){var i;e.data("AutoResizer")&&e.data("AutoResizer").destroy(),r=this.config=t.extend({},n.defaults,r),this.el=e,this.nodeName=e[0].nodeName.toLowerCase(),this.originalHeight=e.height(),this.previousScrollTop=null,this.value=e.val(),"original"===r.maxWidth&&(r.maxWidth=e.width()),"original"===r.minWidth&&(r.minWidth=e.width()),"original"===r.maxHeight&&(r.maxHeight=e.height()),"original"===r.minHeight&&(r.minHeight=e.height()),"textarea"===this.nodeName&&e.css({resize:"none",overflowY:"hidden"}),e.data("AutoResizer",this),r.animate.complete=(i=r.animate.complete,function(){return r.onAfterResize.call(e),i.apply(this,arguments)}),this.bind()}n.cloneCSSProperties=["lineHeight","textDecoration","letterSpacing","fontSize","fontFamily","fontStyle","fontWeight","textTransform","textAlign","direction","wordSpacing","fontSizeAdjust","paddingTop","paddingLeft","paddingBottom","paddingRight","width"],n.cloneCSSValues={position:"absolute",top:-9999,left:-9999,opacity:0,overflow:"hidden"},n.resizableFilterSelector=["textarea:not(textarea."+e+")","input:not(input[type])","input[type=text]","input[type=password]","input[type=email]","input[type=url]"].join(","),n.AutoResizer=r,t.fn.autoResize=n,r.prototype={bind:function(){var e=t.proxy((function(){return this.check(),!0}),this);this.unbind(),this.el.bind("keyup.autoResize",e).bind("change.autoResize",e).bind("paste.autoResize",(function(){setTimeout((function(){e()}),0)})),this.el.is(":hidden")||this.check(null,!0)},unbind:function(){this.el.unbind(".autoResize")},createClone:function(){var r=this.el,i="textarea"===this.nodeName?r.clone():t("<span/>");this.clone=i,t.each(n.cloneCSSProperties,(function(t,e){i[0].style[e]=r.css(e)})),i.removeAttr("name").removeAttr("id").addClass(e).attr("tabIndex",-1).css(n.cloneCSSValues),"textarea"===this.nodeName?i.height("auto"):i.width("auto").css({whiteSpace:"nowrap"})},check:function(t,e){this.clone||(this.createClone(),this.injectClone());var n=this.config,r=this.clone,i=this.el,s=i.val();if(s===this.prevValue)return!0;if(this.prevValue=s,"input"!==this.nodeName){r.width(i.width()).height(0).val(s).scrollTop(1e4);var a=r[0].scrollTop;if(s){if(this.previousScrollTop===a)return;this.previousScrollTop=a,a+n.extraSpace>=n.maxHeight?(i.css("overflowY",""),a=n.maxHeight,e=!0):a+n.extraSpace<=n.minHeight?a=n.minHeight:(i.css("overflowY","hidden"),a+=n.extraSpace)}else a=n.minHeight,this.previousScrollTop=null;n.onBeforeResize.call(i),n.onResize.call(i),n.animate&&!e?i.stop(1,1).animate({height:a},n.animate):(i.height(a),n.onAfterResize.call(i))}else{r.text(s);var o=r.width(),c=o+n.extraSpace>=n.minWidth?o+n.extraSpace:n.minWidth,l=i.width();((c=Math.min(c,n.maxWidth))<l&&c>=n.minWidth||c>=n.minWidth&&c<=n.maxWidth)&&(n.onBeforeResize.call(i),n.onResize.call(i),i.scrollLeft(0),n.animate&&!e?i.stop(1,1).animate({width:c},n.animate):(i.width(c),n.onAfterResize.call(i)))}},destroy:function(){this.unbind(),this.el.removeData("AutoResizer"),this.clone.remove(),delete this.el,delete this.clone},injectClone:function(){(n.cloneContainer||(n.cloneContainer=t("<arclones/>").appendTo("body"))).append(this.clone)}}}(jQuery)},"./src/lib/jquery.contextmenu.js":()=>{"use strict";!function(t,e){if(t.support.htmlMenuitem="HTMLMenuItemElement"in window,t.support.htmlCommand="HTMLCommandElement"in window,t.support.eventSelectstart="onselectstart"in document.documentElement,!t.ui||!t.ui.widget){var n=t.cleanData;t.cleanData=function(e){for(var r,i=0;null!=(r=e[i]);i++)try{t(r).triggerHandler("remove")}catch(t){}n(e)}}var r=null,i=!1,s=t(window),a=0,o={},c={},l={},h={selector:null,appendTo:null,trigger:"right",autoHide:!1,delay:200,reposition:!1,determinePosition:function(e){if(t.ui&&t.ui.position)e.css("display","block").position({my:"center top",at:"center bottom",of:this,offset:"0 5",collision:"fit"}).css("display","none");else{var n=this.offset();n.top+=this.outerHeight(),n.left+=this.outerWidth()/2-e.outerWidth()/2,e.css(n)}},position:function(t,e,n){var r;if(e||n){r="maintain"===e&&"maintain"===n?t.$menu.position():{top:n,left:e};var i=s.scrollTop()+s.height(),a=s.scrollLeft()+s.width(),o=t.$menu.height(),c=t.$menu.width();r.top+o>i&&(r.top-=o),r.left+c>a&&(r.left-=c),t.$menu.css(r)}else t.determinePosition.call(this,t.$menu)},positionSubmenu:function(e){if(t.ui&&t.ui.position)e.css("display","block").position({my:"left top",at:"right top",of:this,collision:"flipfit fit"}).css("display","");else{var n={top:0,left:this.outerWidth()};e.css(n)}},zIndex:1,animation:{duration:50,show:"slideDown",hide:"slideUp"},events:{show:t.noop,hide:t.noop},callback:null,items:{}},u={timer:null,pageX:null,pageY:null},d={abortevent:function(t){t.preventDefault(),t.stopImmediatePropagation()},contextmenu:function(e){var n=t(this);if(e.preventDefault(),e.stopImmediatePropagation(),!("right"!=e.data.trigger&&e.originalEvent||n.hasClass("context-menu-active")||n.hasClass("context-menu-disabled"))){if(r=n,e.data.build){var i=e.data.build(r,e);if(!1===i)return;if(e.data=t.extend(!0,{},h,e.data,i||{}),!e.data.items||t.isEmptyObject(e.data.items))throw window.console&&(console.error||console.log)("No items specified to show in contextMenu"),new Error("No Items sepcified");e.data.$trigger=r,p.create(e.data)}p.show.call(n,e.data,e.pageX,e.pageY)}},click:function(e){e.preventDefault(),e.stopImmediatePropagation(),t(this).trigger(t.Event("contextmenu",{data:e.data,pageX:e.pageX,pageY:e.pageY}))},mousedown:function(e){var n=t(this);r&&r.length&&!r.is(n)&&r.data("contextMenu").$menu.trigger("contextmenu:hide"),2==e.button&&(r=n.data("contextMenuActive",!0))},mouseup:function(e){var n=t(this);n.data("contextMenuActive")&&r&&r.length&&r.is(n)&&!n.hasClass("context-menu-disabled")&&(e.preventDefault(),e.stopImmediatePropagation(),r=n,n.trigger(t.Event("contextmenu",{data:e.data,pageX:e.pageX,pageY:e.pageY}))),n.removeData("contextMenuActive")},mouseenter:function(e){var n=t(this),i=t(e.relatedTarget),s=t(document);i.is(".context-menu-list")||i.closest(".context-menu-list").length||r&&r.length||(u.pageX=e.pageX,u.pageY=e.pageY,u.data=e.data,s.on("mousemove.contextMenuShow",d.mousemove),u.timer=setTimeout((function(){u.timer=null,s.off("mousemove.contextMenuShow"),r=n,n.trigger(t.Event("contextmenu",{data:u.data,pageX:u.pageX,pageY:u.pageY}))}),e.data.delay))},mousemove:function(t){u.pageX=t.pageX,u.pageY=t.pageY},mouseleave:function(e){var n=t(e.relatedTarget);if(!n.is(".context-menu-list")&&!n.closest(".context-menu-list").length){try{clearTimeout(u.timer)}catch(e){}u.timer=null}},layerClick:function(e){var n,r,i=t(this).data("contextMenuRoot"),a=e.button,o=e.pageX,c=e.pageY;e.preventDefault(),e.stopImmediatePropagation(),setTimeout((function(){var l,h="left"==i.trigger&&0===a||"right"==i.trigger&&2===a;if(document.elementFromPoint&&(i.$layer.hide(),n=document.elementFromPoint(o-s.scrollLeft(),c-s.scrollTop()),i.$layer.show()),i.reposition&&h)if(document.elementFromPoint){if(i.$trigger.is(n)||i.$trigger.has(n).length)return void i.position.call(i.$trigger,i,o,c)}else if(r=i.$trigger.offset(),l=t(window),r.top+=l.scrollTop(),r.top<=e.pageY&&(r.left+=l.scrollLeft(),r.left<=e.pageX&&(r.bottom=r.top+i.$trigger.outerHeight(),r.bottom>=e.pageY&&(r.right=r.left+i.$trigger.outerWidth(),r.right>=e.pageX))))return void i.position.call(i.$trigger,i,o,c);n&&h&&i.$trigger.one("contextmenu:hidden",(function(){t(n).contextMenu({x:o,y:c})})),i.$menu.trigger("contextmenu:hide")}),50)},keyStop:function(t,e){e.isInput||t.preventDefault(),t.stopPropagation()},key:function(t){var e=r.data("contextMenu")||{};switch(t.keyCode){case 9:case 38:if(d.keyStop(t,e),e.isInput){if(9==t.keyCode&&t.shiftKey)return t.preventDefault(),e.$selected&&e.$selected.find("input, textarea, select").blur(),void e.$menu.trigger("prevcommand");if(38==t.keyCode&&"checkbox"==e.$selected.find("input, textarea, select").prop("type"))return void t.preventDefault()}else if(9!=t.keyCode||t.shiftKey)return void e.$menu.trigger("prevcommand");case 40:if(d.keyStop(t,e),!e.isInput)return void e.$menu.trigger("nextcommand");if(9==t.keyCode)return t.preventDefault(),e.$selected&&e.$selected.find("input, textarea, select").blur(),void e.$menu.trigger("nextcommand");if(40==t.keyCode&&"checkbox"==e.$selected.find("input, textarea, select").prop("type"))return void t.preventDefault();break;case 37:if(d.keyStop(t,e),e.isInput||!e.$selected||!e.$selected.length)break;if(!e.$selected.parent().hasClass("context-menu-root")){var n=e.$selected.parent().parent();return e.$selected.trigger("contextmenu:blur"),void(e.$selected=n)}break;case 39:if(d.keyStop(t,e),e.isInput||!e.$selected||!e.$selected.length)break;var i=e.$selected.data("contextMenu")||{};if(i.$menu&&e.$selected.hasClass("context-menu-submenu"))return e.$selected=null,i.$selected=null,void i.$menu.trigger("nextcommand");break;case 35:case 36:return e.$selected&&e.$selected.find("input, textarea, select").length?void 0:((e.$selected&&e.$selected.parent()||e.$menu).children(":not(.disabled, .not-selectable)")[36==t.keyCode?"first":"last"]().trigger("contextmenu:focus"),void t.preventDefault());case 13:if(d.keyStop(t,e),e.isInput){if(e.$selected&&!e.$selected.is("textarea, select"))return void t.preventDefault();break}return void(e.$selected&&e.$selected.trigger("mouseup"));case 32:case 33:case 34:return void d.keyStop(t,e);case 27:return d.keyStop(t,e),void e.$menu.trigger("contextmenu:hide");default:var s=String.fromCharCode(t.keyCode).toUpperCase();if(e.accesskeys[s])return void e.accesskeys[s].$node.trigger(e.accesskeys[s].$menu?"contextmenu:focus":"mouseup")}t.stopPropagation(),e.$selected&&e.$selected.trigger(t)},prevItem:function(e){e.stopPropagation();var n=t(this).data("contextMenu")||{};if(n.$selected){var r=n.$selected;(n=n.$selected.parent().data("contextMenu")||{}).$selected=r}for(var i=n.$menu.children(),s=n.$selected&&n.$selected.prev().length?n.$selected.prev():i.last(),a=s;s.hasClass("disabled")||s.hasClass("not-selectable");)if((s=s.prev().length?s.prev():i.last()).is(a))return;n.$selected&&d.itemMouseleave.call(n.$selected.get(0),e),d.itemMouseenter.call(s.get(0),e);var o=s.find("input, textarea, select");o.length&&o.focus()},nextItem:function(e){e.stopPropagation();var n=t(this).data("contextMenu")||{};if(n.$selected){var r=n.$selected;(n=n.$selected.parent().data("contextMenu")||{}).$selected=r}for(var i=n.$menu.children(),s=n.$selected&&n.$selected.next().length?n.$selected.next():i.first(),a=s;s.hasClass("disabled")||s.hasClass("not-selectable");)if((s=s.next().length?s.next():i.first()).is(a))return;n.$selected&&d.itemMouseleave.call(n.$selected.get(0),e),d.itemMouseenter.call(s.get(0),e);var o=s.find("input, textarea, select");o.length&&o.focus()},focusInput:function(e){var n=t(this).closest(".context-menu-item"),r=n.data(),i=r.contextMenu,s=r.contextMenuRoot;s.$selected=i.$selected=n,s.isInput=i.isInput=!0},blurInput:function(e){var n=t(this).closest(".context-menu-item").data(),r=n.contextMenu;n.contextMenuRoot.isInput=r.isInput=!1},menuMouseenter:function(e){var n=t(this).data().contextMenuRoot;n&&(n.hovering=!0)},menuMouseleave:function(e){var n=t(this).data().contextMenuRoot;n&&n.$layer&&n.$layer.is(e.relatedTarget)&&(n.hovering=!1)},itemMouseenter:function(e){var n=t(this),r=n.data(),i=r.contextMenu,s=r.contextMenuRoot;s&&(s.hovering=!0,e&&s.$layer&&s.$layer.is(e.relatedTarget)&&(e.preventDefault(),e.stopImmediatePropagation()),(i.$menu?i:s).$menu.children(".hover").trigger("contextmenu:blur"),n.hasClass("disabled")||n.hasClass("not-selectable")?i.$selected=null:n.trigger("contextmenu:focus"))},itemMouseleave:function(e){var n=t(this),r=n.data(),i=r.contextMenu,s=r.contextMenuRoot;if(s&&s!==i&&s.$layer&&s.$layer.is(e.relatedTarget))return s.$selected&&s.$selected.trigger("contextmenu:blur"),e.preventDefault(),e.stopImmediatePropagation(),void(s.$selected=i.$selected=i.$node);n.trigger("contextmenu:blur")},itemClick:function(e){var n,r=t(this),i=r.data(),s=i.contextMenu,a=i.contextMenuRoot,o=i.contextMenuKey;if(s.items[o]&&!r.is(".disabled, .context-menu-submenu, .context-menu-separator, .not-selectable")){if(e.preventDefault(),e.stopImmediatePropagation(),t.isFunction(a.callbacks[o])&&Object.prototype.hasOwnProperty.call(a.callbacks,o))n=a.callbacks[o];else{if(!t.isFunction(a.callback))return;n=a.callback}!1!==n.call(a.$trigger,o,a)?a.$menu.trigger("contextmenu:hide"):a.$menu.parent().length&&p.update.call(a.$trigger,a)}},inputClick:function(t){t.stopImmediatePropagation()},hideMenu:function(e,n){var r=t(this).data("contextMenuRoot");p.hide.call(r.$trigger,r,n&&n.force)},focusItem:function(e){e.stopPropagation();var n=t(this),r=n.data(),i=r.contextMenu,s=r.contextMenuRoot;n.addClass("hover").siblings(".hover").trigger("contextmenu:blur"),i.$selected=s.$selected=n,i.$node&&s.positionSubmenu.call(i.$node,i.$menu)},blurItem:function(e){e.stopPropagation();var n=t(this),r=n.data().contextMenu;n.removeClass("hover"),r&&(r.$selected=null)}},p={show:function(e,n,i){var s=t(this),a={};t("#context-menu-layer").trigger("mousedown"),e.$trigger=s,!1!==e.events.show.call(s,e)?(p.update.call(s,e),e.position.call(s,e,n,i),e.zIndex&&(a.zIndex=function(t){for(var e=0,n=t;e=Math.max(e,parseInt(n.css("z-index"),10)||0),(n=n.parent())&&n.length&&!("html body".indexOf(n.prop("nodeName").toLowerCase())>-1););return e}(s)+e.zIndex),p.layer.call(e.$menu,e,a.zIndex),e.$menu.find("ul").css("zIndex",a.zIndex+1),e.$menu.css(a)[e.animation.show](e.animation.duration,(function(){s.trigger("contextmenu:visible")})),s.data("contextMenu",e).addClass("context-menu-active"),t(document).off("keydown.contextMenu").on("keydown.contextMenu",d.key),e.autoHide&&t(document).on("mousemove.contextMenuAutoHide",(function(t){var n=s.offset();n.right=n.left+s.outerWidth(),n.bottom=n.top+s.outerHeight(),!e.$layer||e.hovering||t.pageX>=n.left&&t.pageX<=n.right&&t.pageY>=n.top&&t.pageY<=n.bottom||e.$menu.trigger("contextmenu:hide")}))):r=null},hide:function(n,i){var s=t(this);if(n||(n=s.data("contextMenu")||{}),i||!n.events||!1!==n.events.hide.call(s,n)){if(s.removeData("contextMenu").removeClass("context-menu-active"),n.$layer){setTimeout((a=n.$layer,function(){a.remove()}),10);try{delete n.$layer}catch(t){n.$layer=null}}var a;r=null,n.$menu.find(".hover").trigger("contextmenu:blur"),n.$selected=null,t(document).off(".contextMenuAutoHide").off("keydown.contextMenu"),n.$menu&&n.$menu[n.animation.hide](n.animation.duration,(function(){n.build&&(n.$menu.remove(),t.each(n,(function(t,r){switch(t){case"ns":case"selector":case"build":case"trigger":return!0;default:n[t]=e;try{delete n[t]}catch(t){}return!0}}))),setTimeout((function(){s.trigger("contextmenu:hidden")}),10)}))}},create:function(n,r){r===e&&(r=n),n.$menu=t('<ul class="context-menu-list"></ul>').addClass(n.className||"").data({contextMenu:n,contextMenuRoot:r}),t.each(["callbacks","commands","inputs"],(function(t,e){n[e]={},r[e]||(r[e]={})})),r.accesskeys||(r.accesskeys={}),t.each(n.items,(function(e,i){var s=t('<li class="context-menu-item"></li>').addClass(i.className||""),a=null,o=null;if(s.on("click",t.noop),"string"!=typeof i&&(i.$node=s.data({contextMenu:n,contextMenuRoot:r,contextMenuKey:e})),i.accesskey)for(var c,h=function(t){for(var e,n=t.split(/\s+/),r=[],i=0;e=n[i];i++)e=e[0].toUpperCase(),r.push(e);return r}(i.accesskey),u=0;c=h[u];u++)if(!r.accesskeys[c]){r.accesskeys[c]=i,i._name=i.name.replace(new RegExp("("+c+")","i"),'<span class="context-menu-accesskey">$1</span>');break}if("string"==typeof i)s.addClass("context-menu-separator not-selectable");else if(i.type&&l[i.type])l[i.type].call(s,i,n,r),t.each([n,r],(function(n,r){r.commands[e]=i,t.isFunction(i.callback)&&(r.callbacks[e]=i.callback)}));else{switch("html"==i.type?s.addClass("context-menu-html not-selectable"):i.type?(a=t("<label></label>").appendTo(s),t("<span></span>").html(i._name||i.name).appendTo(a),s.addClass("context-menu-input"),n.hasTypes=!0,t.each([n,r],(function(t,n){n.commands[e]=i,n.inputs[e]=i}))):i.items&&(i.type="sub"),i.type){case"text":o=t('<input type="text" value="1" name="" value="">').attr("name","context-menu-input-"+e).val(i.value||"").appendTo(a);break;case"textarea":o=t('<textarea name=""></textarea>').attr("name","context-menu-input-"+e).val(i.value||"").appendTo(a),i.height&&o.height(i.height);break;case"checkbox":o=t('<input type="checkbox" value="1" name="" value="">').attr("name","context-menu-input-"+e).val(i.value||"").prop("checked",!!i.selected).prependTo(a);break;case"radio":o=t('<input type="radio" value="1" name="" value="">').attr("name","context-menu-input-"+i.radio).val(i.value||"").prop("checked",!!i.selected).prependTo(a);break;case"select":o=t('<select name="">').attr("name","context-menu-input-"+e).appendTo(a),i.options&&(t.each(i.options,(function(e,n){t("<option></option>").val(e).text(n).appendTo(o)})),o.val(i.selected));break;case"sub":t("<span></span>").html(i._name||i.name).appendTo(s),i.appendTo=i.$node,p.create(i,r),s.data("contextMenu",i).addClass("context-menu-submenu"),i.callback=null;break;case"html":t(i.html).appendTo(s);break;default:t.each([n,r],(function(n,r){r.commands[e]=i,t.isFunction(i.callback)&&(r.callbacks[e]=i.callback)})),t("<span></span>").html(i._name||i.name||"").appendTo(s)}i.type&&"sub"!=i.type&&"html"!=i.type&&(o.on("focus",d.focusInput).on("blur",d.blurInput),i.events&&o.on(i.events,n)),i.icon&&s.addClass("icon icon-"+i.icon)}"string"!=typeof i&&(i.$input=o,i.$label=a),s.appendTo(n.$menu),!n.hasTypes&&t.support.eventSelectstart&&s.on("selectstart.disableTextSelect",d.abortevent)})),n.$node||n.$menu.css("display","none").addClass("context-menu-root"),n.$menu.appendTo(n.appendTo||document.body)},resize:function(e,n){e.css({position:"absolute",display:"block"}),e.data("width",Math.ceil(e.width())+1),e.css({position:"static",minWidth:"0px",maxWidth:"100000px"}),e.find("> li > ul").each((function(){p.resize(t(this),!0)})),n||e.find("ul").andSelf().css({position:"",display:"",minWidth:"",maxWidth:""}).width((function(){return t(this).data("width")}))},update:function(n,r){var i=this;r===e&&(r=n,p.resize(n.$menu)),n.$menu.children().each((function(){var s=t(this),a=s.data("contextMenuKey"),o=n.items[a],c=o===e||"string"==typeof o||t.isFunction(o.disabled)&&o.disabled.call(i,a,r)||!0===o.disabled;if(s[c?"addClass":"removeClass"]("disabled"),o&&o.type)switch(s.find("input, select, textarea").prop("disabled",c),o.type){case"text":case"textarea":o.$input.val(o.value||"");break;case"checkbox":case"radio":o.$input.val(o.value||"").prop("checked",!!o.selected);break;case"select":o.$input.val(o.selected||"")}o&&o.$menu&&p.update.call(i,o,r)}))},layer:function(e,n){var r=e.$layer=t('<div id="context-menu-layer" style="position:fixed; z-index:'+n+'; top:0; left:0; opacity: 0; filter: alpha(opacity=0); background-color: #000;"></div>').css({height:s.height(),width:s.width(),display:"block"}).data("contextMenuRoot",e).insertBefore(this).on("contextmenu",d.abortevent).on("mousedown",d.layerClick);return t.support.fixedPosition||r.css({position:"absolute",height:t(document).height()}),r}};function f(e){return e.id&&t('label[for="'+e.id+'"]').val()||e.name}function g(n,r,i){return i||(i=0),r.each((function(){var r,s,a=t(this),o=this,c=this.nodeName.toLowerCase();switch("label"==c&&a.find("input, textarea, select").length&&(r=a.text(),c=(o=(a=a.children().first()).get(0)).nodeName.toLowerCase()),c){case"menu":s={name:a.attr("label"),items:{}},i=g(s.items,a.children(),i);break;case"a":case"button":s={name:a.text(),disabled:!!a.attr("disabled"),callback:function(){a.click()}};break;case"menuitem":case"command":switch(a.attr("type")){case e:case"command":case"menuitem":s={name:a.attr("label"),disabled:!!a.attr("disabled"),callback:function(){a.click()}};break;case"checkbox":s={type:"checkbox",disabled:!!a.attr("disabled"),name:a.attr("label"),selected:!!a.attr("checked")};break;case"radio":s={type:"radio",disabled:!!a.attr("disabled"),name:a.attr("label"),radio:a.attr("radiogroup"),value:a.attr("id"),selected:!!a.attr("checked")};break;default:s=e}break;case"hr":s="-------";break;case"input":switch(a.attr("type")){case"text":s={type:"text",name:r||f(o),disabled:!!a.attr("disabled"),value:a.val()};break;case"checkbox":s={type:"checkbox",name:r||f(o),disabled:!!a.attr("disabled"),selected:!!a.attr("checked")};break;case"radio":s={type:"radio",name:r||f(o),disabled:!!a.attr("disabled"),radio:!!a.attr("name"),value:a.val(),selected:!!a.attr("checked")};break;default:s=e}break;case"select":s={type:"select",name:r||f(o),disabled:!!a.attr("disabled"),selected:a.val(),options:{}},a.children().each((function(){s.options[this.value]=t(this).text()}));break;case"textarea":s={type:"textarea",name:r||f(o),disabled:!!a.attr("disabled"),value:a.val()};break;case"label":break;default:s={type:"html",html:a.clone(!0)}}s&&(i++,n["key"+i]=s)})),i}t.fn.contextMenu=function(n){if(n===e)this.first().trigger("contextmenu");else if(n.x&&n.y)this.first().trigger(t.Event("contextmenu",{pageX:n.x,pageY:n.y}));else if("hide"===n){var r=this.data("contextMenu").$menu;r&&r.trigger("contextmenu:hide")}else"destroy"===n?t.contextMenu("destroy",{context:this}):t.isPlainObject(n)?(n.context=this,t.contextMenu("create",n)):n?this.removeClass("context-menu-disabled"):n||this.addClass("context-menu-disabled");return this},t.contextMenu=function(n,r){"string"!=typeof n&&(r=n,n="create"),"string"==typeof r?r={selector:r}:r===e&&(r={});var s=t.extend(!0,{},h,r||{}),l=t(document),u=l,f=!1;switch(s.context&&s.context.length?(u=t(s.context).first(),s.context=u.get(0),f=s.context!==document):s.context=document,n){case"create":if(!s.selector)throw new Error("No selector specified");if(s.selector.match(/.context-menu-(list|item|input)($|\s)/))throw new Error('Cannot bind to selector "'+s.selector+'" as it contains a reserved className');if(!s.build&&(!s.items||t.isEmptyObject(s.items)))throw new Error("No Items sepcified");switch(a++,s.ns=".contextMenu"+a,f||(o[s.selector]=s.ns),c[s.ns]=s,s.trigger||(s.trigger="right"),i||(l.on({"contextmenu:hide.contextMenu":d.hideMenu,"prevcommand.contextMenu":d.prevItem,"nextcommand.contextMenu":d.nextItem,"contextmenu.contextMenu":d.abortevent,"mouseenter.contextMenu":d.menuMouseenter,"mouseleave.contextMenu":d.menuMouseleave},".context-menu-list").on("mouseup.contextMenu",".context-menu-input",d.inputClick).on({"mouseup.contextMenu":d.itemClick,"contextmenu:focus.contextMenu":d.focusItem,"contextmenu:blur.contextMenu":d.blurItem,"contextmenu.contextMenu":d.abortevent,"mouseenter.contextMenu":d.itemMouseenter,"mouseleave.contextMenu":d.itemMouseleave},".context-menu-item"),i=!0),u.on("contextmenu"+s.ns,s.selector,s,d.contextmenu),f&&u.on("remove"+s.ns,(function(){t(this).contextMenu("destroy")})),s.trigger){case"hover":u.on("mouseenter"+s.ns,s.selector,s,d.mouseenter).on("mouseleave"+s.ns,s.selector,s,d.mouseleave);break;case"left":u.on("click"+s.ns,s.selector,s,d.click)}s.build||p.create(s);break;case"destroy":var g;if(f){var m=s.context;t.each(c,(function(e,n){if(n.context!==m)return!0;(g=t(".context-menu-list").filter(":visible")).length&&g.data().contextMenuRoot.$trigger.is(t(n.context).find(n.selector))&&g.trigger("contextmenu:hide",{force:!0});try{c[n.ns].$menu&&c[n.ns].$menu.remove(),delete c[n.ns]}catch(t){c[n.ns]=null}return t(n.context).off(n.ns),!0}))}else if(s.selector){if(o[s.selector]){(g=t(".context-menu-list").filter(":visible")).length&&g.data().contextMenuRoot.$trigger.is(s.selector)&&g.trigger("contextmenu:hide",{force:!0});try{c[o[s.selector]].$menu&&c[o[s.selector]].$menu.remove(),delete c[o[s.selector]]}catch(t){c[o[s.selector]]=null}l.off(o[s.selector])}}else l.off(".contextMenu .contextMenuAutoHide"),t.each(c,(function(e,n){t(n.context).off(n.ns)})),o={},c={},a=0,i=!1,t("#context-menu-layer, .context-menu-list").remove();break;case"html5":(!t.support.htmlCommand&&!t.support.htmlMenuitem||"boolean"==typeof r&&r)&&t('menu[type="context"]').each((function(){this.id&&t.contextMenu({selector:"[contextmenu="+this.id+"]",items:t.contextMenu.fromMenu(this)})})).css("display","none");break;default:throw new Error('Unknown operation "'+n+'"')}return this},t.contextMenu.setInputValues=function(n,r){r===e&&(r={}),t.each(n.inputs,(function(t,e){switch(e.type){case"text":case"textarea":e.value=r[t]||"";break;case"checkbox":e.selected=!!r[t];break;case"radio":e.selected=(r[e.radio]||"")==e.value;break;case"select":e.selected=r[t]||""}}))},t.contextMenu.getInputValues=function(n,r){return r===e&&(r={}),t.each(n.inputs,(function(t,e){switch(e.type){case"text":case"textarea":case"select":r[t]=e.$input.val();break;case"checkbox":r[t]=e.$input.prop("checked");break;case"radio":e.$input.prop("checked")&&(r[e.radio]=e.value)}})),r},t.contextMenu.fromMenu=function(e){var n={};return g(n,t(e).children()),n},t.contextMenu.defaults=h,t.contextMenu.types=l,t.contextMenu.handle=d,t.contextMenu.op=p,t.contextMenu.menus=c}(jQuery)},"./src/packages.js":(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={geo:{},io:{json:{},png:{},svg:{}},util:{spline:{}},policy:{canvas:{},connection:{},line:{},port:{},figure:{}},shape:{basic:{},dimetric:{},composite:{},arrow:{},node:{},note:{},diagram:{},flowchart:{},analog:{},icon:{},layout:{},pert:{},state:{},widget:{}},command:{},decoration:{connection:{}},layout:{connection:{},anchor:{},mesh:{},locator:{}},ui:{},isTouchDevice:-1!=navigator.platform.indexOf("iPhone")||-1!=navigator.platform.indexOf("iPod")||-1!=navigator.platform.indexOf("iPad")};t.exports=e.default},"./src/policy/EditPolicy.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.policy.EditPolicy=Class.extend({NAME:"draw2d.policy.EditPolicy",init:function(t,e,n){this.setterWhitelist={...e},this.getterWhitelist={...n},this.attr(t)},attr:function(t,e){if($.isPlainObject(t))for(let e in t){let n=this.setterWhitelist[e];n?n.call(this,t[e]):"function"==typeof t[e]&&(this[e]=t[e].bind(this))}else if("string"==typeof t){if(void 0===e){let e=this.getterWhitelist[t];return"function"==typeof e?e.call(this):void 0}"function"==typeof e&&(e=e());let n=this.setterWhitelist[t];n&&n.call(this,e)}else if(void 0===t){let t={};for(key in this.getterWhitelist)t[key]=this.getterWhitelist[key].call(this);return t}return this},onInstall:function(t){},onUninstall:function(t){}})},"./src/policy/canvas/BoundingboxSelectionPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.BoundingboxSelectionPolicy=i.default.policy.canvas.SingleSelectionPolicy.extend({NAME:"draw2d.policy.canvas.BoundingboxSelectionPolicy",init:function(){this.isInsideMode=(t,e)=>t.isInside(e),this.intersectsMode=(t,e)=>t.intersects(e),this.decision=this.isInsideMode,this._super(),this.boundingBoxFigure1=null,this.boundingBoxFigure2=null,this.x=0,this.y=0,this.canDrawBoundingBox=!1},select:function(t,e){if(t.getSelection().contains(e))return;let n=t.getSelection().getPrimary();null!==e&&e.select(!0),n!==e&&(t.getSelection().setPrimary(e),t.fireEvent("select",{figure:e,selection:t.getSelection()}));let r=t.getSelection();t.getLines().each(((e,n)=>{n instanceof i.default.Connection&&r.contains(n.getSource().getRoot())&&r.contains(n.getTarget().getRoot())&&this.select(t,n,!1)}))},setDecisionMode:function(t){return this.decision=!0===t?this.intersectsMode:this.isInsideMode,this},onMouseDown:function(t,e,n,r,s){try{this.x=e,this.y=n;let a=t.getSelection().getAll();this.mouseMovedDuringMouseDown=!1;let o=!0;this.canDrawBoundingBox=!1;let c=t.getBestFigure(e,n);for(;null!==c;){let t=c.getSelectionAdapter()();if(t===c)break;c=t}if(c instanceof i.default.Port)return;null!==c&&!1===c.isSelectable()&&!1===c.isDraggable()&&(c=null),this.canDrawBoundingBox=!0,null!==c&&c.isDraggable()&&(o=c.onDragStart(e-c.getAbsoluteX(),n-c.getAbsoluteY(),r,s),this.mouseDraggingElement=!1===o?null:c),this.mouseDownElement=c,this.mouseDownElement?.fireEvent("mousedown",{x:e,y:n,relX:e-this.mouseDownElement.getAbsoluteX(),relY:n-this.mouseDownElement.getAbsoluteY(),shiftKey:r,ctrlKey:s}),!1===r&&(null===this.mouseDownElement||!1!==this.mouseDownElement.isResizeHandle||a.contains(this.mouseDownElement)||a.each(((e,n)=>{this.unselect(t,n)}))),c!==t.getSelection().getPrimary()&&null!==c&&!0===c.isSelectable()&&(this.select(t,c),c instanceof i.default.shape.basic.Line?c instanceof i.default.Connection||(t.draggingLineCommand=c.createCommand(new i.default.command.CommandType(i.default.command.CommandType.MOVE)),null!==t.draggingLineCommand&&(t.draggingLine=c)):!1===o&&c.unselect()),null!==this.mouseDownElement&&!1===this.mouseDownElement.isResizeHandle&&(a=t.getSelection().getAll(),a.each(((e,n)=>{let a=1,o=1,c=n.getHandleBBox();null!==c&&(c.translate(n.getAbsolutePosition().scale(-1)),a=c.x+1,o=c.y+1);let l=n.onDragStart(a,o,r,s,!0);n instanceof i.default.shape.basic.Line||!1===l&&this.unselect(t,n)})))}catch(t){throw console.log(t),t}},onMouseDrag:function(t,e,n,r,s,a,o){if(!1!==this.canDrawBoundingBox)try{this._super(t,e,n,r,s,a,o),null===this.mouseDraggingElement&&null===this.mouseDownElement&&null===this.boundingBoxFigure1&&(this.boundingBoxFigure1=new i.default.shape.basic.Rectangle({width:1,height:1,x:this.x,y:this.y,bgColor:"#d4d1d4",alpha:.1}),this.boundingBoxFigure1.setCanvas(t),this.boundingBoxFigure2=new i.default.shape.basic.Rectangle({width:1,height:1,x:this.x,y:this.y,dash:"--..",stroke:.5,color:"#37a8ff",bgColor:null}),this.boundingBoxFigure2.setCanvas(t));let c=Math.abs,l=Math.min;null!==this.boundingBoxFigure1&&(this.boundingBoxFigure1.setDimension(c(e),c(n)),this.boundingBoxFigure1.setPosition(this.x+l(0,e),this.y+l(0,n)),this.boundingBoxFigure2.setDimension(c(e),c(n)),this.boundingBoxFigure2.setPosition(this.x+l(0,e),this.y+l(0,n)))}catch(t){console.log(t)}},onMouseUp:function(t,e,n,r,s){try{if(null===this.mouseDownElement)t.getSelection().getAll().each(((e,n)=>{this.unselect(t,n)}));else if(this.mouseDownElement instanceof i.default.ResizeHandle||this.mouseDownElement instanceof i.default.shape.basic.LineResizeHandle);else if(null!==this.mouseDownElement&&!1===this.mouseMovedDuringMouseDown){t.getSelection().getAll().contains(this.mouseDownElement)||t.getSelection().getAll().each(((e,n)=>{this.unselect(t,n)}))}if(this._super(t,e,n,r,s),null!==this.boundingBoxFigure1){let e=this.boundingBoxFigure1.getBoundingBox();t.getFigures().each(((n,i)=>{if(!0===i.isSelectable()&&!0===i.isVisible()&&this.decision(i.getBoundingBox(),e)){let e=1,n=1,a=i.getHandleBBox();null!==a&&(a.translate(i.getAbsolutePosition().scale(-1)),e=a.x+1,n=a.y+1),!0===i.onDragStart(e,n,r,s)&&this.select(t,i)}})),this.boundingBoxFigure1.setCanvas(null),this.boundingBoxFigure1=null,this.boundingBoxFigure2.setCanvas(null),this.boundingBoxFigure2=null}}catch(t){console.log(t)}}})},"./src/policy/canvas/CanvasPolicy.js":(t,e,n)=>{"use strict";var r=s(n("./src/packages.js")),i=s(n("./src/util/Color.js"));function s(t){return t&&t.__esModule?t:{default:t}}r.default.policy.canvas.CanvasPolicy=r.default.policy.EditPolicy.extend({NAME:"draw2d.policy.canvas.CanvasPolicy",init:function(t,e,n){this.canvas=null,this._super(t,e,n)},onInstall:function(t){this.canvas=t},onUninstall:function(t){this.canvas=null},onMouseMove:function(t,e,n,r,i){},onMouseDown:function(t,e,n,r,i){},onMouseDrag:function(t,e,n,r,i,s,a){},onMouseUp:function(t,e,n,r,i){},onRightMouseDown:function(t,e,n,r,i){},onClick:function(t,e,n,r,i){},onDoubleClick:function(t,e,n,r,i){},onMouseWheel:function(t,e,n,r,i){return!0},createMonochromGif:function(t,e,n,s){s=new i.default(s);let a=String.fromCharCode(t%256)+String.fromCharCode(t/256)+String.fromCharCode(e%256)+String.fromCharCode(e/256),o="GIF89a"+a+"ð\0\0ÿÿÿ"+String.fromCharCode(s.red)+String.fromCharCode(s.green)+String.fromCharCode(s.blue)+"!ù\0\0\0,\0\0\0\0"+a+"\0",c={bit:1,byte_:0,data:"",writeBit:function(t){t&&(this.byte_|=this.bit),this.bit<<=1,256===this.bit&&(this.bit=1,this.data+=String.fromCharCode(this.byte_),this.byte_=0)},get:function(){let t="",e=this.data;1!==this.bit&&(e+=String.fromCharCode(this.byte_));for(let n=0;n<e.length+1;n+=255){let r=e.length-n;r<0&&(r=0),r>255&&(r=255),t+=String.fromCharCode(r)+e.substring(n,n+255)}return t+"\0"}};for(let r=0;r<e;r++)for(let e=0;e<t;e++)c.writeBit(n[e+t*r]),c.writeBit(0),c.writeBit(0),c.writeBit(0),c.writeBit(0),c.writeBit(1);return o+=c.get()+";","data:image/gif;base64,"+r.default.util.Base64.encode(o)}})},"./src/policy/canvas/CoronaDecorationPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.CoronaDecorationPolicy=i.default.policy.canvas.DecorationPolicy.extend({NAME:"draw2d.policy.canvas.CoronaDecorationPolicy",init:function(t,e,n){this.startDragX=0,this.startDragY=0,this.diameterToBeFullVisible=0,this.diameterToBeVisible=0,this.sumDiameter=0,this._super({diameterToBeVisible:200,diameterToBeFullVisible:20,...t},{diameterToBeVisible:this.setDiameterToBeVisible,diameterToBeFullVisible:this.setDiameterToBeFullVisible,...e},{diameterToBeVisible:this.getDiameterToBeVisible,diameterToBeFullVisible:this.getDiameterToBeFullVisible,...n})},setDiameterToBeVisible:function(t){this.diameterToBeVisible=t,this.sumDiameter=this.diameterToBeFullVisible+this.diameterToBeVisible},getDiameterToBeVisible:function(){return this.diameterToBeVisible},setDiameterToBeFullVisible:function(t){this.diameterToBeFullVisible=t,this.sumDiameter=this.diameterToBeFullVisible+this.diameterToBeVisible},getDiameterToBeFullVisible:function(){return this.diameterToBeFullVisible},onInstall:function(t){this._super(t),t.getFigures().each(((t,e)=>{e.getPorts().each(((t,e)=>e.setAlpha(0)))}))},onUninstall:function(t){this._super(t),t.getFigures().each((function(t,e){e.getPorts().each((function(t,e){e.__origAlpha&&(e.setAlpha(e.__origAlpha),delete e.__origAlpha)}))}))},onMouseDown:function(t,e,n,r,i){this.startDragX=e,this.startDragY=n},onMouseMove:function(t,e,n,r,i){this.updatePorts(t,e,n)},onMouseDrag:function(t,e,n,r,i,s,a){this.updatePorts(t,this.startDragX+e,this.startDragY+n)},updatePorts:function(t,e,n){t.getFigures().each(((t,r)=>{r instanceof i.default.shape.node.Node&&(!0===r.isVisible()&&!0===r.hitTest(e,n,this.sumDiameter)?r.getPorts().each(((t,s)=>{!1===s.isVisible()&&(s.__origAlpha=r.getAlpha());let a=r.getBoundingBox().getDistance(new i.default.geo.Point(e,n)),o=Math.max(0,1-100/(this.diameterToBeVisible-this.diameterToBeFullVisible)*a/100);s.setAlpha(o)})):r.getPorts().each(((t,e)=>{e.setAlpha(0)})))}))}})},"./src/policy/canvas/DecorationPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.DecorationPolicy=i.default.policy.canvas.CanvasPolicy.extend({NAME:"draw2d.policy.canvas.DecorationPolicy",init:function(t,e,n){this._super(t,e,n)}})},"./src/policy/canvas/DefaultKeyboardPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.DefaultKeyboardPolicy=i.default.policy.canvas.KeyboardPolicy.extend({NAME:"draw2d.policy.canvas.DefaultKeyboardPolicy",init:function(){this._super()},onKeyDown:function(t,e,n,r){if(46===e&&null!==t.getPrimarySelection()){t.getCommandStack().startTransaction(i.default.Configuration.i18n.command.deleteShape);let e=t.getSelection();e.each((function(n,r){if(r instanceof i.default.Connection){if(e.contains(r.getSource(),!0))return;if(e.contains(r.getTarget(),!0))return}let s=r.createCommand(new i.default.command.CommandType(i.default.command.CommandType.DELETE));null!==s&&t.getCommandStack().execute(s)})),t.getCommandStack().commitTransaction()}else this._super(t,e,n,r)}})},"./src/policy/canvas/DropInterceptorPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.DropInterceptorPolicy=i.default.policy.canvas.CanvasPolicy.extend({NAME:"draw2d.policy.canvas.DropInterceptorPolicy",init:function(t,e,n){this._super(t,e,n)},delegateTarget:function(t,e){if(!(t instanceof i.default.Port)&&e instanceof i.default.shape.composite.StrongComposite)return e;if(e instanceof i.default.Port&&t instanceof i.default.Port&&e.getSemanticGroup()!==t.getSemanticGroup())return null;if(!(e instanceof i.default.Port&&t instanceof i.default.Port))return null;if(t.getParent()===e.getParent())return null;if(t instanceof i.default.OutputPort&&e instanceof i.default.OutputPort)return null;if(t instanceof i.default.InputPort&&e instanceof i.default.InputPort)return null;if(e.getParent()instanceof i.default.shape.node.Hub){let n=e.getConnections().asArray().filter((t=>t.getPeerPort(e)instanceof i.default.OutputPort)),r=e.getConnections().asArray().filter((t=>t.getPeerPort(e)instanceof i.default.InputPort));return t instanceof i.default.InputPort&&r.length>=e.getMaxFanOut()||(t instanceof i.default.OutputPort&&n.length>=e.getMaxFanIn()||t instanceof i.default.HybridPort&&n.length>=e.getMaxFanIn())?null:e}return e}})},"./src/policy/canvas/ExtendedKeyboardPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.ExtendedKeyboardPolicy=i.default.policy.canvas.KeyboardPolicy.extend({NAME:"draw2d.policy.canvas.ExtendedKeyboardPolicy",init:function(){this._super()},onKeyDown:function(t,e,n,r){if(null!==t.getPrimarySelection()&&!0===r)switch(e){case 71:t.getPrimarySelection()instanceof i.default.shape.composite.Group&&1===t.getSelection().getSize()?t.getCommandStack().execute(new i.default.command.CommandUngroup(t,t.getPrimarySelection())):t.getCommandStack().execute(new i.default.command.CommandGroup(t,t.getSelection()));break;case 66:t.getPrimarySelection().toBack();break;case 70:t.getPrimarySelection().toFront()}else this._super(t,e,n,r)}})},"./src/policy/canvas/FadeoutDecorationPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.FadeoutDecorationPolicy=i.default.policy.canvas.DecorationPolicy.extend({NAME:"draw2d.policy.canvas.FadeoutDecorationPolicy",DEFAULT_FADEOUT_DURATION:60,DEFAULT_ALPHA_DECREMENT:.05,init:function(){this._super(),this.alpha=1,this.alphaDec=this.DEFAULT_ALPHA_DECREMENT,this.hidePortsCounter=this.DEFAULT_FADEOUT_DURATION,this.portDragging=!1},onInstall:function(t){this._super(t),this.timerId=window.setInterval(this.onTimer.bind(this),50),this.hidePortsCounter=1,this.alpha=.1},onUninstall:function(t){window.clearInterval(this.timerId),this.canvas.getAllPorts().each((function(t,e){e.setAlpha(1)})),this._super(t)},onTimer:function(){this.hidePortsCounter--,this.hidePortsCounter<=0&&this.alpha>0?(this.alpha=Math.max(0,this.alpha-this.alphaDec),this.canvas.getAllPorts().each(((t,e)=>{e.setAlpha(this.alpha)})),this.canvas.getSelection().getAll().each(((t,e)=>{e.selectionHandles.each(((t,e)=>{e.setAlpha(this.alpha)}))}))):this.hidePortsCounter>0&&1!==this.alpha&&(this.alpha=1,this.alphaDec=this.DEFAULT_ALPHA_DECREMENT,this.duringHide=!1,this.canvas.getAllPorts().each(((t,e)=>{e.setAlpha(this.alpha)})),this.canvas.getSelection().getAll().each(((t,e)=>{e.selectionHandles.each(((t,e)=>{e.setAlpha(this.alpha)}))})))},onMouseDown:function(t,e,n,r,s){this.hidePortsCounter=this.DEFAULT_FADEOUT_DURATION,this.portDragging=t.getBestFigure(e,n)instanceof i.default.Port},onMouseMove:function(t,e,n,r,i){this.hidePortsCounter=this.DEFAULT_FADEOUT_DURATION,this.portDragging=!1},onMouseDrag:function(t,e,n,r,i,s,a){!1===this.portDragging&&(this.hidePortsCounter=0,this.alphaDec=.1,this.onTimer())},onMouseUp:function(t,e,n,r,i){this.hidePortsCounter=this.DEFAULT_FADEOUT_DURATION,this.portDragging=!1}})},"./src/policy/canvas/GhostMoveSelectionPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.GhostMoveSelectionPolicy=i.default.policy.canvas.SingleSelectionPolicy.extend({NAME:"draw2d.policy.canvas.GhostMoveSelectionPolicy",init:function(){this.clone=null,this.ghostRectangle1=null,this.ghostRectangle2=null,this._super()},onMouseDrag:function(t,e,n,r,s,a,o){if(this.mouseMovedDuringMouseDown=!0,null!==this.mouseDraggingElement){let c=t.getSelection().getAll();c.contains(this.mouseDraggingElement)?(null===this.ghostRectangle1?(this.ghostRectangle1=new i.default.shape.basic.Rectangle,this.ghostRectangle1.setBackgroundColor("#303030"),this.ghostRectangle1.setAlpha(.1),this.ghostRectangle2=new i.default.shape.basic.Rectangle,this.ghostRectangle2.setDashArray("- "),this.ghostRectangle2.setStroke(1),this.ghostRectangle2.setColor("#5497DC"),this.ghostRectangle2.setBackgroundColor(null),this.ghostRectangle1.setBoundingBox(this.mouseDraggingElement.getBoundingBox()),this.ghostRectangle2.setBoundingBox(this.mouseDraggingElement.getBoundingBox()),this.ghostRectangle1.setCanvas(t),this.ghostRectangle1.toFront(),this.ghostRectangle2.setCanvas(t),this.ghostRectangle2.toFront(),this.clone=this.mouseDraggingElement.clone(),this.clone instanceof i.default.shape.node.Node&&this.clone.resetPorts(),this.clone.setCanvas(t),this.clone.getShapeElement(),this.clone.setAlpha(.4),this.clone.repaint()):(this.ghostRectangle1.translate(r,s),this.ghostRectangle2.translate(r,s),this.clone.translate(r,s)),c.each((function(t,r){r._newPos=new i.default.geo.Point(r.ox+e,r.oy+n)}))):this.mouseDraggingElement.onDrag(e,n,r,s,a,o);let l=t.fromDocumentToCanvasCoordinate(t.mouseDownX+e/t.zoomFactor,t.mouseDownY+n/t.zoomFactor),h=t.getBestFigure(l.x,l.y,this.mouseDraggingElement);h!==t.currentDropTarget&&(null!==t.currentDropTarget&&(t.currentDropTarget.onDragLeave(this.mouseDraggingElement),t.currentDropTarget.fireEvent("dragLeave",{draggingElement:this.draggingElement}),t.currentDropTarget=null),null!==h&&(t.currentDropTarget=h.delegateTarget(this.mouseDraggingElement),null!==t.currentDropTarget&&(t.currentDropTarget.onDragEnter(this.mouseDraggingElement),t.currentDropTarget.fireEvent("dragEnter",{draggingElement:this.draggingElement}))))}else null===this.mouseDownElement||this.mouseDownElement instanceof i.default.Connection||(null!==this.mouseDownElement.panningDelegate?(this.mouseDownElement.panningDelegate.fireEvent("panning",{dx:e,dy:n,dx2:r,dy2:s,shiftKey:a,ctrlKey:o}),this.mouseDownElement.panningDelegate.onPanning(e,n,r,s,a,o)):(this.mouseDownElement.fireEvent("panning",{dx:e,dy:n,dx2:r,dy2:s,shiftKey:a,ctrlKey:o}),this.mouseDownElement.onPanning(e,n,r,s,a,o)))},onMouseUp:function(t,e,n,r,s){if(null!==this.ghostRectangle1&&(this.ghostRectangle1.setCanvas(null),this.ghostRectangle1=null,this.ghostRectangle2.setCanvas(null),this.ghostRectangle2=null,this.clone.setCanvas(null),this.clone=null),null!==this.mouseDraggingElement){let a=new i.default.util.ArrayList;this.mouseDraggingElement instanceof i.default.shape.node.Node&&t.lineIntersections.each((function(t,e){a.contains(e.line)||a.add(e.line),a.contains(e.other)||a.add(e.other)})),t.getCommandStack().startTransaction(),t.getSelection().getAll().contains(this.mouseDraggingElement)?t.getSelection().getAll().each((function(t,i){i._newPos&&(i.setPosition(i._newPos),delete i._newPos),i.onDragEnd(e,n,r,s)})):this.mouseDraggingElement.onDragEnd(e,n,r,s),null===t.currentDropTarget||this.mouseDraggingElement.isResizeHandle||(this.mouseDraggingElement.onDrop(t.currentDropTarget,e,n,r,s),t.currentDropTarget.onDragLeave(this.mouseDraggingElement),t.currentDropTarget.onCatch(this.mouseDraggingElement,e,n,r,s),t.currentDropTarget=null),t.getCommandStack().commitTransaction(),this.mouseDraggingElement instanceof i.default.shape.node.Node&&(t.lineIntersections.each(((t,e)=>{a.contains(e.line)||a.add(e.line),a.contains(e.other)||a.add(e.other)})),a.each(((t,e)=>{e.svgPathString=null,e.repaint()}))),this.mouseDraggingElement=null}null===this.mouseDownElement&&!1===this.mouseMovedDuringMouseDown&&this.select(t,null),this.mouseDownElement=null,this.mouseMovedDuringMouseDown=!1}})},"./src/policy/canvas/KeyboardPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.KeyboardPolicy=i.default.policy.canvas.CanvasPolicy.extend({NAME:"draw2d.policy.canvas.KeyboardPolicy",init:function(t,e,n){this._super(t,e,n)},onKeyUp:function(t,e,n,r){},onKeyDown:function(t,e,n,r){}})},"./src/policy/canvas/PanningSelectionPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.PanningSelectionPolicy=i.default.policy.canvas.SingleSelectionPolicy.extend({NAME:"draw2d.policy.canvas.PanningSelectionPolicy",init:function(){this._super()},onMouseDrag:function(t,e,n,r,i,s,a){if(this._super(t,e,n,r,i,s,a),null===this.mouseDraggingElement&&null===this.mouseDownElement){let s=t.fromDocumentToCanvasCoordinate(t.mouseDownX+e/t.zoomFactor,t.mouseDownY+n/t.zoomFactor);if(null===t.getBestFigure(s.x,s.y)){let e=t.getScrollArea();e.scrollTop(e.scrollTop()-i),e.scrollLeft(e.scrollLeft()-r)}}}})},"./src/policy/canvas/ReadOnlySelectionPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.ReadOnlySelectionPolicy=i.default.policy.canvas.SelectionPolicy.extend({NAME:"draw2d.policy.canvas.ReadOnlySelectionPolicy",init:function(t,e,n){this._super(t,e,n)},onInstall:function(t){this._super(t),t.getAllPorts().each((function(t,e){e.setVisible(!1)}))},onUninstall:function(t){t.getAllPorts().each((function(t,e){e.setVisible(!0)})),this._super(t)},onMouseDrag:function(t,e,n,r,i,s,a){let o=t.getScrollArea();o.scrollTop(o.scrollTop()-i),o.scrollLeft(o.scrollLeft()-r)}})},"./src/policy/canvas/SelectionPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.SelectionPolicy=i.default.policy.canvas.CanvasPolicy.extend({NAME:"draw2d.policy.canvas.SelectionPolicy",init:function(t,e,n){this._super(t,e,n)},select:function(t,e){},unselect:function(t,e){t.getSelection().remove(e),e.unselect(),t.fireEvent("unselect",{figure:e})}})},"./src/policy/canvas/ShowChessboardEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.ShowChessboardEditPolicy=i.default.policy.canvas.DecorationPolicy.extend({NAME:"draw2d.policy.canvas.ShowChessboardEditPolicy",GRID_COLOR:"#e0e0e0",GRID_WIDTH:20,init:function(t){this._super(),this.grid=t||this.GRID_WIDTH},onInstall:function(t){this._super(t),this.oldBg=this.canvas.html.css("background"),this.setGrid(1/t.getZoom()),this.onZoomCallback=(t,e)=>{this.setGrid(1/e.value)},t.on("zoom",this.onZoomCallback)},onUninstall:function(t){this._super(t),$(t.paper.canvas).css({background:this.oldBg}),t.off(this.onZoomCallback)},setGrid:function(t){let e=this.GRID_COLOR,n=`linear-gradient(45deg, ${e} 25%, transparent 25%, transparent 75%, ${e} 75%, ${e} 100%),\nlinear-gradient(45deg, ${e} 25%, transparent 25%, transparent 75%, ${e} 75%, ${e} 100%)`,r=`${2*this.grid*t}px ${2*this.grid*t}px`,i=`0 0, ${this.grid*t}px ${this.grid*t}px`;$(this.canvas.paper.canvas).css({background:n,"background-size":r,"background-position":i})}})},"./src/policy/canvas/ShowDimetricGridEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.ShowDimetricGridEditPolicy=i.default.policy.canvas.DecorationPolicy.extend({NAME:"draw2d.policy.canvas.ShowDimetricGridEditPolicy",GRID_COLOR:"#f0f0f0",GRID_WIDTH:30,init:function(t){this.color=new i.default.util.Color(this.GRID_COLOR),this.zoom=1,this.shapes=null,this._super(),this.grid="number"==typeof t?t:this.GRID_WIDTH},onInstall:function(t){this._super(t),this.zoom=t.getZoom(),this.setGrid(this.grid)},onUninstall:function(t){this._super(t),null!==this.shapes&&this.shapes.remove()},setGridColor:function(t){this.color=new i.default.util.Color(t),this.setGrid(this.grid)},setGrid:function(t){if(this.grid=t,null!=this.canvas){null!==this.shapes&&this.shapes.remove();let t,e=this.canvas.paper,n=this.grid,r=e.width,i=e.height,s={stroke:this.color.rgba()},a=Math.sqrt(r*r+i*i),o=Math.atan(.5),c=Math.PI-o,l=Math.cos(o),h=Math.sin(o),u=Math.cos(c),d=Math.sin(c);for(e.setStart(),t=0;t<=r;t+=2*n)e.path([["M",t,0],["L",t+l*a,h*a]]).attr(s),e.path([["M",t,0],["L",t+u*a,d*a]]).attr(s);for(t=n;t<=i;t+=n)e.path([["M",0,t],["L",l*a,t+h*a]]).attr(s),e.path([["M",r,t],["L",r+u*a,t+d*a]]).attr(s);this.shapes=e.setFinish(),this.shapes.toBack()}}})},"./src/policy/canvas/ShowDotEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.ShowDotEditPolicy=i.default.policy.canvas.DecorationPolicy.extend({NAME:"draw2d.policy.canvas.ShowDotEditPolicy",DOT_COLOR:"#999999",DOT_RADIUS:1,DOT_DISTANCE:20,init:function(t,e,n){this._super(),this.dotDistance=t||this.DOT_DISTANCE,this.dotRadius=e||this.DOT_RADIUS,this.dotColor=new i.default.util.Color(n||this.DOT_COLOR),this.onZoomCallback=(t,e)=>{this.setGrid(1/e.value)}},onInstall:function(t){this._super(t),this.oldBg=this.canvas.html.css("background"),this.setGrid(1/t.getZoom()),t.on("zoom",this.onZoomCallback)},onUninstall:function(t){this._super(t),$(t.paper.canvas).css({background:this.oldBg}),t.off(this.onZoomCallback)},setGrid:function(t){let e="#FFFFFF",n=this.dotColor.rgba(),r=`linear-gradient(90deg, ${e} ${(this.dotDistance-this.dotRadius)*t}px, transparent 1%) center, \n linear-gradient(${e} ${(this.dotDistance-this.dotRadius)*t}px, transparent 1%) center, ${n}`,i=`${this.dotDistance*t}px ${this.dotDistance*t}px`;$(this.canvas.paper.canvas).css({background:r,"background-size":i})}})},"./src/policy/canvas/ShowGridEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.ShowGridEditPolicy=i.default.policy.canvas.DecorationPolicy.extend({NAME:"draw2d.policy.canvas.ShowGridEditPolicy",DEFAULTS:{width:20,stroke:1,color:"#f0f0f0",bgColor:"#FFFFFF"},init:function(t){const e={...this.DEFAULTS,...t};this.gridWidth=e.width,this.gridStroke=e.stroke,this.gridColor=new i.default.util.Color(e.color),this.bgColor=e.bgColor,this._super(),this.onZoomCallback=(t,e)=>{this.setGrid(1/e.value)}},setGridColor:function(t){this.gridColor=new i.default.util.Color(t),this.setGrid(1/this.canvas.getZoom())},onInstall:function(t){this._super(t),this.oldBg=this.canvas.html.css("background"),this.setGrid(1/t.getZoom()),t.on("zoom",this.onZoomCallback)},onUninstall:function(t){this._super(t),$(t.paper.canvas).css({background:this.oldBg}),t.off(this.onZoomCallback)},setGrid:function(t){let e=this.gridColor.rgba(),n=` linear-gradient(to right, ${e} ${this.gridStroke}px, transparent ${this.gridStroke}px),\n linear-gradient(to bottom, ${e} ${this.gridStroke}px, ${this.bgColor} ${this.gridStroke}px)`,r=`${this.gridWidth*t}px ${this.gridWidth*t}px`;$(this.canvas.paper.canvas).css({background:n,"background-size":r})}})},"./src/policy/canvas/SingleSelectionPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.SingleSelectionPolicy=i.default.policy.canvas.SelectionPolicy.extend({NAME:"draw2d.policy.canvas.SingleSelectionPolicy",init:function(){this._super(),this.mouseMovedDuringMouseDown=!1,this.mouseDraggingElement=null,this.mouseDownElement=null},select:function(t,e){if(t.getSelection().contains(e))return;let n=t.getSelection().getPrimary();n&&this.unselect(t,n),e?.select(!0),t.getSelection().setPrimary(e),n!==e&&t.fireEvent("select",{figure:e,selection:t.getSelection()})},onMouseDown:function(t,e,n,r,s){this.mouseMovedDuringMouseDown=!1;let a=!0,o=t.getBestFigure(e,n);for(;null!==o;){let t=o.getSelectionAdapter()();if(t===o)break;o=t}o instanceof i.default.Port||(null!==o&&o.isDraggable()&&(a=o.onDragStart(e-o.getAbsoluteX(),n-o.getAbsoluteY(),r,s),this.mouseDraggingElement=!1===a?null:o),this.mouseDownElement=o,null!==this.mouseDownElement&&this.mouseDownElement.fireEvent("mousedown",{x:e,y:n,relX:e-this.mouseDownElement.getAbsoluteX(),relY:n-this.mouseDownElement.getAbsoluteY(),shiftKey:r,ctrlKey:s}),o!==t.getSelection().getPrimary()&&null!==o&&!0===o.isSelectable()&&(this.select(t,o),o instanceof i.default.shape.basic.Line?o instanceof i.default.Connection||(t.draggingLineCommand=o.createCommand(new i.default.command.CommandType(i.default.command.CommandType.MOVE)),null!==t.draggingLineCommand&&(t.draggingLine=o)):!1===a&&o.unselect()))},onMouseDrag:function(t,e,n,r,s,a,o){if(this.mouseMovedDuringMouseDown=!0,null!==this.mouseDraggingElement){let i=t.getSelection();i.contains(this.mouseDraggingElement)?i.each(((t,i)=>{i.onDrag(e,n,r,s,a,o)})):this.mouseDraggingElement.onDrag(e,n,r,s,a,o);let c=t.fromDocumentToCanvasCoordinate(t.mouseDownX+e/t.zoomFactor,t.mouseDownY+n/t.zoomFactor),l=t.getBestFigure(c.x,c.y,this.mouseDraggingElement);l!==t.currentDropTarget&&(null!==t.currentDropTarget&&(t.currentDropTarget.onDragLeave(this.mouseDraggingElement),t.currentDropTarget.fireEvent("dragLeave",{draggingElement:this.mouseDraggingElement}),t.currentDropTarget=null),null!==l&&(t.currentDropTarget=l.delegateTarget(this.mouseDraggingElement),null!==t.currentDropTarget&&(t.currentDropTarget.onDragEnter(this.mouseDraggingElement),t.currentDropTarget.fireEvent("dragEnter",{draggingElement:this.mouseDraggingElement}))))}else null===this.mouseDownElement||this.mouseDownElement instanceof i.default.Connection||(null!==this.mouseDownElement.panningDelegate?(this.mouseDownElement.panningDelegate.fireEvent("panning",{dx:e,dy:n,dx2:r,dy2:s,shiftKey:a,ctrlKey:o}),this.mouseDownElement.panningDelegate.onPanning(e,n,r,s,a,o)):(this.mouseDownElement.fireEvent("panning",{dx:e,dy:n,dx2:r,dy2:s,shiftKey:a,ctrlKey:o}),this.mouseDownElement.onPanning(e,n,r,s,a,o)))},onMouseUp:function(t,e,n,r,s){if(null!==this.mouseDraggingElement){let a=new i.default.util.ArrayList;this.mouseDraggingElement instanceof i.default.shape.node.Node&&t.lineIntersections.each((function(t,e){a.contains(e.line)||a.add(e.line),a.contains(e.other)||a.add(e.other)})),t.getCommandStack().startTransaction(),t.getSelection().getAll().contains(this.mouseDraggingElement)?t.getSelection().getAll().each((function(t,i){i.onDragEnd(e,n,r,s)})):this.mouseDraggingElement.onDragEnd(e,n,r,s),null===t.currentDropTarget||this.mouseDraggingElement.isResizeHandle||(this.mouseDraggingElement.onDrop(t.currentDropTarget,e,n,r,s),t.currentDropTarget.onDragLeave(this.mouseDraggingElement),t.currentDropTarget.fireEvent("dragLeave",{draggingElement:this.mouseDraggingElement}),t.currentDropTarget.onCatch(this.mouseDraggingElement,e,n,r,s),t.currentDropTarget=null),t.getCommandStack().commitTransaction(),this.mouseDraggingElement instanceof i.default.shape.node.Node&&(t.lineIntersections.each((function(t,e){a.contains(e.line)||a.add(e.line),a.contains(e.other)||a.add(e.other)})),a.each((function(t,e){e.svgPathString=null,e.repaint()}))),this.mouseDraggingElement=null}else null===this.mouseDownElement||this.mouseDownElement instanceof i.default.Connection||(null!==this.mouseDownElement.panningDelegate?(this.mouseDownElement.panningDelegate.fireEvent("panningEnd"),this.mouseDownElement.panningDelegate.onPanningEnd()):(this.mouseDownElement.fireEvent("panningEnd"),this.mouseDownElement.onPanningEnd()));null===this.mouseDownElement&&!1===this.mouseMovedDuringMouseDown&&this.select(t,null),this.mouseDownElement?.fireEvent("mouseup",{x:e,y:n,relX:e-this.mouseDownElement.getAbsoluteX(),relY:n-this.mouseDownElement.getAbsoluteY(),shiftKey:r,ctrlKey:s}),this.mouseDownElement=null,this.mouseMovedDuringMouseDown=!1},onClick:function(t,e,n,r,i){null!==t&&(t.fireEvent("click",{figure:t,x:e,y:n,relX:e-t.getAbsoluteX(),relY:n-t.getAbsoluteY(),shiftKey:r,ctrlKey:i}),t.onClick())},onDoubleClick:function(t,e,n,r,i){null!==t&&(t.fireEvent("dblclick",{x:e,y:n,relX:e-t.getAbsoluteX(),relY:e-t.getAbsoluteY(),shiftKey:r,ctrlKey:i}),t.onDoubleClick())}})},"./src/policy/canvas/SnapToCenterEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.SnapToCenterEditPolicy=i.default.policy.canvas.SnapToEditPolicy.extend({NAME:"draw2d.policy.canvas.SnapToCenterEditPolicy",SNAP_THRESHOLD:5,FADEOUT_DURATION:500,init:function(t,e,n){this._super(t,e,n),this.centers=null,this.horizontalGuideLines=null,this.verticalGuideLines=null},onMouseUp:function(t,e,n,r,i){this.centers=null,this.hideHorizontalGuides(!1),this.hideVerticalGuides(!1)},snap:function(t,e,n,r){if(e instanceof i.default.ResizeHandle)return n;if(e instanceof i.default.shape.basic.Line)return n;let s=n.x===r.x,a=n.y===r.y,o=new i.default.geo.Rectangle(n.x,n.y,e.getWidth(),e.getHeight()).getCenter();if(n=n.clone(),!0===s){let t=this.snapHorizontal(o);t.snapped?(this.showHorizontalGuides(e,t),n.y+=t.diff):this.hideHorizontalGuides(!0)}else this.hideHorizontalGuides(!0);if(!0===a){let t=this.snapVertical(o);t.snapped?(this.showVerticalGuides(e,t),n.x+=t.diff):this.hideVerticalGuides(!0)}else this.hideVerticalGuides(!0);return n},snapVertical:function(t){let e=this;null===this.centers&&this.populateCenters();let n={point:t,snapped:!1,diff:0},r=[];if(this.centers.forEach((n=>{Math.abs(n.x-t.x)<e.SNAP_THRESHOLD&&r.push(n)})),0===r.length)return n;r.sort(((t,e)=>t.x-e.x));let i=r[0].x-t.x,s=t.clone();return s.x+=i,{snapped:!0,diff:i,point:r[0],snappedPoint:s}},snapHorizontal:function(t){let e=this;null===this.centers&&this.populateCenters();let n={point:t,snapped:!1,diff:0},r=[];if(this.centers.forEach((n=>{Math.abs(n.y-t.y)<e.SNAP_THRESHOLD&&r.push(n)})),0===r.length)return n;r.sort(((t,e)=>t.y-e.y));let i=r[0].y-t.y,s=t.clone();return s.y+=i,{snapped:!0,diff:i,point:r[0],snappedPoint:s}},populateCenters:function(){let t=this.canvas.getSelection().getAll(!0),e=this.centers=[];this.canvas.getFigures().each(((n,r)=>{t.contains(r)||e.push(r.getBoundingBox().getCenter())}))},showHorizontalGuides:function(t,e){null!==this.horizontalGuideLines&&(this.horizontalGuideLines.stop(),this.horizontalGuideLines.remove());let n=e.point,r=e.snappedPoint;this.canvas.paper.setStart(),this.canvas.paper.path("M "+n.x+" "+(.5+(0|n.y))+" L "+r.x+" "+(.5+(0|r.y))).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.horizontalGuideLines=this.canvas.paper.setFinish(),this.horizontalGuideLines.toFront()},hideHorizontalGuides:function(t){null!==this.horizontalGuideLines&&(!0===t?null!==this.horizontalGuideLines&&(this.horizontalGuideLines.remove(),this.horizontalGuideLines=null):this.horizontalGuideLines.animate({opacity:.1},this.FADEOUT_DURATION,(()=>{null!==this.horizontalGuideLines&&(this.horizontalGuideLines.remove(),this.horizontalGuideLines=null)})))},showVerticalGuides:function(t,e){null!==this.verticalGuideLines&&(this.verticalGuideLines.stop(),this.verticalGuideLines.remove());let n=e.point,r=e.snappedPoint;this.canvas.paper.setStart(),this.canvas.paper.path("M "+(.5+(0|n.x))+" "+n.y+" L "+(.5+(0|r.x))+" "+r.y).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.verticalGuideLines=this.canvas.paper.setFinish(),this.verticalGuideLines.toFront()},hideVerticalGuides:function(t){null!==this.verticalGuideLines&&(!0===t?null!==this.verticalGuideLines&&(this.verticalGuideLines.remove(),this.verticalGuideLines=null):this.verticalGuideLines.animate({opacity:.1},this.FADEOUT_DURATION,(()=>{null!==this.verticalGuideLines&&(this.verticalGuideLines.remove(),this.verticalGuideLines=null)})))}})},"./src/policy/canvas/SnapToDimetricGridEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.SnapToDimetricGridEditPolicy=i.default.policy.canvas.ShowDimetricGridEditPolicy.extend({NAME:"draw2d.policy.canvas.SnapToDimetricGridEditPolicy",init:function(t){this._super(t)},snap:function(t,e,n,r){if(e instanceof i.default.shape.basic.Line)return n;let s=e.getSnapToGridAnchor();n.x=n.x+s.x,n.y=n.y+s.y;let a=this.grid/5;return n.x=a*Math.floor((n.x+a/2)/a),n.y=a*Math.floor((n.y+a/2)/a),n.x=n.x-s.x,n.y=n.y-s.y,n}})},"./src/policy/canvas/SnapToEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.SnapToHelper={},i.default.SnapToHelper.NORTH=1,i.default.SnapToHelper.SOUTH=4,i.default.SnapToHelper.WEST=8,i.default.SnapToHelper.EAST=16,i.default.SnapToHelper.CENTER_H=32,i.default.SnapToHelper.CENTER_V=642,i.default.SnapToHelper.NORTH_EAST=i.default.SnapToHelper.NORTH|i.default.SnapToHelper.EAST,i.default.SnapToHelper.NORTH_WEST=i.default.SnapToHelper.NORTH|i.default.SnapToHelper.WEST,i.default.SnapToHelper.SOUTH_EAST=i.default.SnapToHelper.SOUTH|i.default.SnapToHelper.EAST,i.default.SnapToHelper.SOUTH_WEST=i.default.SnapToHelper.SOUTH|i.default.SnapToHelper.WEST,i.default.SnapToHelper.NORTH_SOUTH=i.default.SnapToHelper.NORTH|i.default.SnapToHelper.SOUTH,i.default.SnapToHelper.EAST_WEST=i.default.SnapToHelper.EAST|i.default.SnapToHelper.WEST,i.default.SnapToHelper.NSEW=i.default.SnapToHelper.NORTH_SOUTH|i.default.SnapToHelper.EAST_WEST,i.default.policy.canvas.SnapToEditPolicy=i.default.policy.canvas.CanvasPolicy.extend({NAME:"draw2d.policy.canvas.SnapToEditPolicy",init:function(t,e,n){this.lineColor=null,this._super({lineColor:"#51C1FC",...t},{lineColor:this.setLineColor,...e},{lineColor:this.getLineColor,...n})},setLineColor:function(t){return this.lineColor=new i.default.util.Color(t),this},getLineColor:function(){return this.lineColor},snap:function(t,e,n,r){return n}})},"./src/policy/canvas/SnapToGeometryEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.SnapToGeometryEditPolicy=i.default.policy.canvas.SnapToEditPolicy.extend({NAME:"draw2d.policy.canvas.SnapToGeometryEditPolicy",SNAP_THRESHOLD:3,FADEOUT_DURATION:300,init:function(t,e,n){this._super(t,e,n),this.rows=null,this.cols=null,this.vline=null,this.hline=null},onMouseUp:function(t,e,n,r,i){this.rows=null,this.cols=null,this.hideVerticalLine(),this.hideHorizontalLine()},snap:function(t,e,n,r){if(e instanceof i.default.shape.basic.Line)return n;let s,a=n.x===r.x,o=n.y===r.y;if(!a&&!o)return n;if(e instanceof i.default.ResizeHandle){let t=e.getSnapToGridAnchor();n.x+=t.x,n.y+=t.y;let r=e.getSnapToDirection();return s=this.snapPoint(r,n),a&&r&i.default.SnapToHelper.EAST_WEST&&!(s.edge&i.default.SnapToHelper.EAST_WEST)?this.showVerticalLine(e,i.default.SnapToHelper.WEST,s.point.x):this.hideVerticalLine(),o&&r&i.default.SnapToHelper.NORTH_SOUTH&&!(s.edge&i.default.SnapToHelper.NORTH_SOUTH)?this.showHorizontalLine(e,i.default.SnapToHelper.NORTH,s.point.y):this.hideHorizontalLine(),s.point.x=a?s.point.x-t.x:n.x,s.point.y=o?s.point.y-t.y:n.y,s.point}let c=new i.default.geo.Rectangle(n.x,n.y,e.getWidth(),e.getHeight());return s=this.snapRectangle(c),a||(s.bounds.x=n.x),o||(s.bounds.y=n.y),!a||s.edge&i.default.SnapToHelper.WEST?!a||s.edge&i.default.SnapToHelper.EAST?this.hideVerticalLine():this.showVerticalLine(e,i.default.SnapToHelper.EAST,s.bounds.x+s.bounds.getWidth()):this.showVerticalLine(e,i.default.SnapToHelper.WEST,s.bounds.x),!o||s.edge&i.default.SnapToHelper.NORTH?!o||s.edge&i.default.SnapToHelper.SOUTH?this.hideHorizontalLine():this.showHorizontalLine(e,i.default.SnapToHelper.SOUTH,s.bounds.y+s.bounds.getHeight()):this.showHorizontalLine(e,i.default.SnapToHelper.NORTH,s.bounds.y),s.bounds.getTopLeft()},snapRectangle:function(t){let e=t.clone(),n=this.snapPoint(i.default.SnapToHelper.NORTH_WEST,t.getTopLeft());e.x=n.point.x,e.y=n.point.y;let r=this.snapPoint(i.default.SnapToHelper.SOUTH_EAST,t.getBottomRight());return n.edge&i.default.SnapToHelper.WEST&&(e.x=r.point.x-t.getWidth()),n.edge&i.default.SnapToHelper.NORTH&&(e.y=r.point.y-t.getHeight()),{edge:n.edge|r.edge,bounds:e}},snapPoint:function(t,e){let n=e.clone();if(null!==this.rows&&null!==this.cols||this.populateRowsAndCols(),t&i.default.SnapToHelper.EAST){let r=this.getCorrectionFor(this.cols,e.x+1,1);r!==this.SNAP_THRESHOLD&&(t&=~i.default.SnapToHelper.EAST,n.x+=r)}if(t&i.default.SnapToHelper.WEST){let r=this.getCorrectionFor(this.cols,e.x,-1);r!==this.SNAP_THRESHOLD&&(t&=~i.default.SnapToHelper.WEST,n.x+=r)}if(t&i.default.SnapToHelper.SOUTH){let r=this.getCorrectionFor(this.rows,e.y+1,1);r!==this.SNAP_THRESHOLD&&(t&=~i.default.SnapToHelper.SOUTH,n.y+=r)}if(t&i.default.SnapToHelper.NORTH){let r=this.getCorrectionFor(this.rows,e.y,-1);r!==this.SNAP_THRESHOLD&&(t&=~i.default.SnapToHelper.NORTH,n.y+=r)}return{edge:t,point:n}},populateRowsAndCols:function(){let t=this.canvas.getSelection();this.rows=[],this.cols=[];let e=this.canvas.getFigures();for(let n=0;n<e.getSize();n++){let r=e.get(n);if(!t.contains(r,!0)){let t=r.getBoundingBox();this.cols.push({type:-1,location:t.x}),this.cols.push({type:0,location:t.x+(t.w-1)/2}),this.cols.push({type:1,location:t.getRight()+1}),this.rows.push({type:-1,location:t.y}),this.rows.push({type:0,location:t.y+(t.h-1)/2}),this.rows.push({type:1,location:t.getBottom()+1})}}},getCorrectionFor:function(t,e,n){let r=this.SNAP_THRESHOLD,i=this.SNAP_THRESHOLD;for(let s=0;s<t.length;s++){let a,o=t[s];(-1===o.type&&0!==n||0===o.type&&0===n||1===o.type&&0!==n)&&(a=Math.abs(e-o.location),a<r&&(r=a,i=o.location-e))}return i},showVerticalLine:function(t,e,n){null!=this.vline&&(this.vline.stop(),this.vline.remove());let r=this.canvas.getFigures().clone();if(r.removeAll(this.canvas.getSelection().getAll(!0)),r.map((function(t){return t.getBoundingBox()})),r.grep((function(t){return Math.abs(t.x-n)<=1||Math.abs(t.getRight()-n)<=1})),0===r.getSize())return;let i=t.getBoundingBox(),s=i.getCenter();r.sort((function(t,e){return t.getCenter().distance(s)-e.getCenter().distance(s)}));let a=0,o=this.canvas.getHeight()*Math.max(1,this.canvas.getZoom()),c=o,l=r.get(0);i.y<l.y?(a=i.y,c=l.getBottom()-i.y):(a=l.y,c=i.getBottom()-l.y),n=.5+(0|n),this.canvas.paper.setStart(),this.canvas.paper.path("M "+n+" 0 l 0 "+o).attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+n+" "+a+" l 0 "+c).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.vline=this.canvas.paper.setFinish(),this.vline.toBack()},hideVerticalLine:function(){null!=this.vline&&this.vline.animate({opacity:.1},this.FADEOUT_DURATION,(()=>{null!==this.vline&&(this.vline.remove(),this.vline=null)}))},showHorizontalLine:function(t,e,n){null!=this.hline&&(this.hline.stop(),this.hline.remove());let r=this.canvas.getFigures().clone();if(r.removeAll(this.canvas.getSelection().getAll(!0)),r.map((function(t){return t.getBoundingBox()})),r.grep((function(t){return Math.abs(t.y-n)<=1||Math.abs(t.getBottom()-n)<=1})),0===r.getSize())return;let i=t.getBoundingBox(),s=i.getCenter();r.sort((function(t,e){return t.getCenter().distance(s)-e.getCenter().distance(s)}));let a,o=0,c=a=this.canvas.getWidth()*Math.max(1,this.canvas.getZoom()),l=r.get(0);i.x<l.x?(o=i.x,c=l.getRight()-i.x):(o=l.x,c=i.getRight()-l.x),n=.5+(0|n),this.canvas.paper.setStart(),this.canvas.paper.path("M 0 "+n+" l "+a+" 0").attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+o+" "+n+" l "+c+" 0").attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.hline=this.canvas.paper.setFinish(),this.hline.toBack()},hideHorizontalLine:function(){null!==this.hline&&this.hline.animate({opacity:.1},this.FADEOUT_DURATION,(()=>{null!==this.hline&&(this.hline.remove(),this.hline=null)}))}})},"./src/policy/canvas/SnapToGridEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.SnapToGridEditPolicy=i.default.policy.canvas.SnapToEditPolicy.extend({NAME:"draw2d.policy.canvas.SnapToGridEditPolicy",init:function(t,e){this._super(),this.grid=t||20,void 0!==e&&!0!==e||(this.renderer=new i.default.policy.canvas.ShowGridEditPolicy({width:this.grid}))},onInstall:function(t){this._super(t),this.renderer&&this.renderer.onInstall(t)},onUninstall:function(t){this._super(t),this.renderer&&this.renderer.onUninstall(t)},setGrid:function(t){this.grid=t,this.renderer&&this.renderer.setGrid(t)},snap:function(t,e,n,r){if(e instanceof i.default.shape.basic.Line)return n;let s=e.getSnapToGridAnchor();return n.x=n.x+s.x,n.y=n.y+s.y,n.x=this.grid*Math.floor((n.x+this.grid/2)/this.grid),n.y=this.grid*Math.floor((n.y+this.grid/2)/this.grid),n.x=n.x-s.x,n.y=n.y-s.y,n}})},"./src/policy/canvas/SnapToInBetweenEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.SnapToInBetweenEditPolicy=i.default.policy.canvas.SnapToEditPolicy.extend({NAME:"draw2d.policy.canvas.SnapToInBetweenEditPolicy",SNAP_THRESHOLD:5,FADEOUT_DURATION:500,init:function(t,e,n){this._super(t,e,n),this.bounds=null,this.horizontalGuideLines=null,this.verticalGuideLines=null},onMouseUp:function(t,e,n,r,i){this.bounds=null,this.hideHorizontalGuides(!1),this.hideVerticalGuides(!1)},snap:function(t,e,n,r){if(e instanceof i.default.ResizeHandle)return n;if(e instanceof i.default.shape.basic.Line)return n;var s=n.x===r.x,a=n.y===r.y,o=new i.default.geo.Rectangle(n.x,n.y,e.getWidth(),e.getHeight());if(n=n.clone(),!0===s){var c=this.snapHorizontal(o);c.snapped?(this.showHorizontalGuides(e,c),n.x+=c.diff):this.hideHorizontalGuides(!0)}else this.hideHorizontalGuides(!0);if(!0===a){var l=this.snapVertical(o);l.snapped?(this.showVerticalGuides(e,l),n.y+=l.diff):this.hideVerticalGuides(!0)}else this.hideVerticalGuides(!0);return n},snapHorizontal:function(t){var e=t.getCenter();null===this.bounds&&this.populateBounds();var n={point:e,snapped:!1,snappedBox:t.clone()},r=null,s=[],a=e.clone();if(a.x=0,this.bounds.forEach((function(t,n){null!==(r=i.default.shape.basic.Line.intersection(t.getTopRight(),t.getBottomRight(),e,a))&&(r.causedBBox=t,s.push(r))})),0===s.length)return n;s.sort((function(t,e){return e.x-t.x}));var o=[],c=e.clone();if(c.x=Number.MAX_SAFE_INTEGER,this.bounds.forEach((function(t,n){null!==(r=i.default.shape.basic.Line.intersection(t.getTopLeft(),t.getBottomLeft(),e,c))&&(r.causedBBox=t,o.push(r))})),0===o.length)return n;o.sort((function(t,e){return t.x-e.x}));var l=t.clone(),h=(s[0].x+o[0].x)/2-e.x;return l.x+=h,{snapped:Math.abs(h)<this.SNAP_THRESHOLD,snappedRect:l,diff:h,leftSide:s[0],rightSide:o[0]}},snapVertical:function(t){var e=t.getCenter();null===this.bounds&&this.populateBounds();var n={point:e,snapped:!1,snappedBox:t.clone()},r=null,s=[],a=e.clone();if(a.y=0,this.bounds.forEach((function(t){null!==(r=i.default.shape.basic.Line.intersection(t.getBottomLeft(),t.getBottomRight(),e,a))&&(r.causedBBox=t,s.push(r))})),0===s.length)return n;s.sort((function(t,e){return e.y-t.y}));var o=[],c=e.clone();if(c.y=Number.MAX_SAFE_INTEGER,this.bounds.forEach((function(t){null!==(r=i.default.shape.basic.Line.intersection(t.getTopLeft(),t.getTopRight(),e,c))&&(r.causedBBox=t,o.push(r))})),0===o.length)return n;o.sort((function(t,e){return t.y-e.y}));var l=t.clone(),h=(s[0].y+o[0].y)/2-e.y;return l.y+=h,{snapped:Math.abs(h)<this.SNAP_THRESHOLD,snappedRect:l,diff:h,topSide:s[0],bottomSide:o[0]}},populateBounds:function(){var t=this.canvas.getSelection().getAll(!0),e=this.bounds=[];this.canvas.getFigures().each((function(n,r){t.contains(r)||e.push(r.getBoundingBox())}))},showHorizontalGuides:function(t,e){null!=this.horizontalGuideLines&&(this.horizontalGuideLines.stop(),this.horizontalGuideLines.remove());var n=e.snappedRect.getTopLeft(),r=e.snappedRect.getTopRight(),i=.5+(Math.min(e.leftSide.causedBBox.getTopRight().y,Math.min(e.rightSide.causedBBox.y,t.getY()))-50|0);this.canvas.paper.setStart(),this.canvas.paper.path("M "+(.5+(0|e.leftSide.x))+" "+i+" L "+(.5+(0|e.leftSide.x))+" "+e.leftSide.y).attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+(.5+(0|n.x))+" "+i+" L "+(.5+(0|n.x))+" "+n.y).attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+(.5+(0|r.x))+" "+i+" L "+(.5+(0|r.x))+" "+r.y).attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+(.5+(0|e.rightSide.x))+" "+i+" L "+(.5+(0|e.rightSide.x))+" "+e.rightSide.y).attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+e.leftSide.x+" "+(i+5)+" L "+n.x+" "+(i+5)).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.canvas.paper.path("M "+e.rightSide.x+" "+(i+5)+" L "+r.x+" "+(i+5)).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.canvas.paper.path(" M "+(e.leftSide.x+5)+" "+i+" L "+e.leftSide.x+" "+(i+5)+" L "+(e.leftSide.x+5)+" "+(i+10)).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.canvas.paper.path(" M "+(n.x-5)+" "+i+" L "+n.x+" "+(i+5)+" L "+(n.x-5)+" "+(i+10)).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.canvas.paper.path(" M "+(r.x+5)+" "+i+" L "+r.x+" "+(i+5)+" L "+(r.x+5)+" "+(i+10)).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.canvas.paper.path(" M "+(e.rightSide.x-5)+" "+i+" L "+e.rightSide.x+" "+(i+5)+" L "+(e.rightSide.x-5)+" "+(i+10)).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.horizontalGuideLines=this.canvas.paper.setFinish(),this.horizontalGuideLines.toFront()},hideHorizontalGuides:function(t){null!=this.horizontalGuideLines&&(!0===t?null!==this.horizontalGuideLines&&(this.horizontalGuideLines.remove(),this.horizontalGuideLines=null):this.horizontalGuideLines.animate({opacity:.1},this.FADEOUT_DURATION,(()=>{null!==this.horizontalGuideLines&&(this.horizontalGuideLines.remove(),this.horizontalGuideLines=null)})))},showVerticalGuides:function(t,e){null!=this.verticalGuideLines&&(this.verticalGuideLines.stop(),this.verticalGuideLines.remove());var n=e.snappedRect.getTopRight(),r=e.snappedRect.getBottomRight(),i=.5+(Math.max(e.topSide.causedBBox.getRight(),Math.max(e.bottomSide.causedBBox.getRight(),t.getX()))+40|0);this.canvas.paper.setStart(),this.canvas.paper.path("M "+i+" "+(.5+(0|e.topSide.y))+" L "+(.5+(0|e.topSide.x))+" "+(.5+(0|e.topSide.y))).attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+i+" "+(.5+(0|n.y))+" L "+(.5+(0|n.x))+" "+(.5+(0|n.y))).attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+i+" "+(.5+(0|r.y))+" L "+(.5+(0|r.x))+" "+(.5+(0|r.y))).attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+i+" "+(.5+(0|e.bottomSide.y))+" L "+(.5+(0|e.bottomSide.x))+" "+(.5+(0|e.bottomSide.y))).attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+(i-5)+" "+(.5+(0|e.topSide.y))+" L "+(i-5)+" "+(.5+(0|n.y))).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.canvas.paper.path("M "+(i-5)+" "+(.5+(0|e.bottomSide.y))+" L "+(i-5)+" "+(.5+(0|r.y))).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.canvas.paper.path(" M "+(i-10)+" "+(e.topSide.y+5)+" L "+(i-5)+" "+e.topSide.y+" L "+i+" "+(e.topSide.y+5)).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.canvas.paper.path(" M "+(i-10)+" "+(n.y-5)+" L "+(i-5)+" "+n.y+" L "+i+" "+(n.y-5)).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.canvas.paper.path(" M "+(i-10)+" "+(r.y+5)+" L "+(i-5)+" "+r.y+" L "+i+" "+(r.y+5)).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.canvas.paper.path(" M "+(i-10)+" "+(e.bottomSide.y-5)+" L "+(i-5)+" "+e.bottomSide.y+" L "+i+" "+(e.bottomSide.y-5)).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.verticalGuideLines=this.canvas.paper.setFinish(),this.verticalGuideLines.toFront()},hideVerticalGuides:function(){null!=this.verticalGuideLines&&this.verticalGuideLines.animate({opacity:.1},this.FADEOUT_DURATION,(()=>{null!==this.verticalGuideLines&&(this.verticalGuideLines.remove(),this.verticalGuideLines=null)}))}})},"./src/policy/canvas/SnapToVerticesEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.canvas.SnapToVerticesEditPolicy=i.default.policy.canvas.SnapToEditPolicy.extend({NAME:"draw2d.policy.canvas.SnapToVerticesEditPolicy",SNAP_THRESHOLD:3,FADEOUT_DURATION:300,init:function(t,e,n){this._super(t,e,n),this.constraints=null,this.vline=null,this.hline=null},onMouseUp:function(t,e,n,r,i){this.constraints=null,this.hideVerticalLine(),this.hideHorizontalLine()},snap:function(t,e,n,r){if(!(e instanceof i.default.shape.basic.VertexResizeHandle))return n;var s=n.x===r.x,a=n.y===r.y;if(!s&&!a)return n;var o=n.clone(),c=this.getCorrectionFor(e,r);return s&&c.vertical.x!==Number.MAX_SAFE_INTEGER?(o.x=c.vertical.x,this.showVerticalLine(r,c.vertical)):this.hideVerticalLine(),a&&c.horizontal.y!==Number.MAX_SAFE_INTEGER?(o.y=c.horizontal.y,this.showHorizontalLine(r,c.horizontal)):this.hideHorizontalLine(),o},getCorrectionFor:function(t,e){var n=this;null===this.constraints&&(this.constraints=[],this.canvas.getLines().each((function(e,r){r.getVertices().each((function(e,i){t.index===e&&t.owner===r||n.constraints.push(i)}))})));for(var r,i,s=this.SNAP_THRESHOLD,a={x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER,diffy:Number.MAX_SAFE_INTEGER},o={x:Number.MAX_SAFE_INTEGER,y:Number.MAX_SAFE_INTEGER,diffx:Number.MAX_SAFE_INTEGER},c=0;c<this.constraints.length;c++){var l=this.constraints[c];r=Math.abs(e.x-l.x),i=Math.abs(e.y-l.y),r<s&&i<a.diffy&&(a={x:l.x,y:l.y,diffy:i}),i<s&&r<o.diffx&&(o={x:l.x,y:l.y,diffx:r})}return{vertical:a,horizontal:o}},showVerticalLine:function(t,e){null!=this.vline&&(this.vline.stop(),this.vline.remove());var n=this.canvas.getHeight(),r=.5+(0|e.x);this.canvas.paper.setStart(),this.canvas.paper.path("M "+r+" 0 l 0 "+n).attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+r+" "+t.y+" L "+r+" "+e.y).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.vline=this.canvas.paper.setFinish(),this.vline.toBack()},hideVerticalLine:function(){null!=this.vline&&this.vline.animate({opacity:.1},this.FADEOUT_DURATION,(()=>{null!==this.vline&&(this.vline.remove(),this.vline=null)}))},showHorizontalLine:function(t,e){null!=this.hline&&(this.hline.stop(),this.hline.remove());var n=this.canvas.getWidth(),r=.5+(0|e.y);this.canvas.paper.setStart(),this.canvas.paper.path("M 0 "+r+" l "+n+" 0").attr({stroke:this.lineColor.rgba(),"stroke-width":1,"stroke-dasharray":". "}),this.canvas.paper.path("M "+t.x+" "+r+" L "+e.x+" "+r).attr({stroke:this.lineColor.rgba(),"stroke-width":1}),this.hline=this.canvas.paper.setFinish(),this.hline.toBack()},hideHorizontalLine:function(){null!==this.hline&&this.hline.animate({opacity:.1},this.FADEOUT_DURATION,(()=>{null!==this.hline&&(this.hline.remove(),this.hline=null)}))}})},"./src/policy/canvas/WheelZoomPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r},s=n("./node_modules/shifty/dist/shifty.js");i.default.policy.canvas.WheelZoomPolicy=i.default.policy.canvas.ZoomPolicy.extend({NAME:"draw2d.policy.canvas.WheelZoomPolicy",init:function(){this._super(),this.center=null,this.debouncedZoomedCallback=this._debounce((()=>{let t=this.canvas;null!==t&&t.fireEvent("zoomed",{value:t.zoomFactor}),this.center=null}),200)},onInstall:function(t){this._super(t),t.setZoom(1),t.__wheelZoom=1},onUninstall:function(t){this._super(t),delete t.__wheelZoom},onMouseWheel:function(t,e,n,r,i){if(!1===r)return!0;t/=1024;let s=(1e4*Math.min(5,Math.max(.1,this.canvas.zoomFactor+t))|0)/1e4;if(null===this.center){let t=this.canvas.fromCanvasToDocumentCoordinate(e,n);this.center={x:e,y:n,clientX:t.x,clientY:t.y}}return this._zoom(s,this.center),this.debouncedZoomedCallback(),!1},setZoom:function(t,e){let n=this.canvas.getScrollTop(),r=this.canvas.getScrollLeft(),i=this.canvas.getScrollArea().width(),a=n+this.canvas.getScrollArea().height()/2*this.canvas.zoomFactor,o=r+i/2*this.canvas.zoomFactor;if(e){(new s.Tweenable).tween({from:{x:this.canvas.zoomFactor},to:{x:t},duration:300,easing:"easeOutSine",step:t=>{this._zoom(t.x,o,a)},finish:t=>{this.debouncedZoomedCallback()}})}else this._zoom(t,{x:o,y:a}),this.debouncedZoomedCallback()},_zoom:function(t,e){let n=this.canvas;if(t!==n.zoomFactor){if(n.zoomFactor=t,n.paper.setViewBox(0,0,n.initialWidth,n.initialHeight),n.html.find("svg").attr({width:n.initialWidth/t,height:n.initialHeight/t}),e.clientX){let t=n.fromCanvasToDocumentCoordinate(e.x,e.y);n.scrollTo(this.canvas.getScrollTop()-(e.clientY-t.y),n.getScrollLeft()-(e.clientX-t.x))}n.fireEvent("zoom",{value:n.zoomFactor})}},_debounce:function(t,e,n){let r;return()=>{let i=this,s=arguments,a=n&&!r;clearTimeout(r),r=setTimeout((()=>{r=null,n||t.apply(i,s)}),e),a&&t.apply(i,s)}}})},"./src/policy/canvas/ZoomPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r},s=n("./node_modules/shifty/dist/shifty.js");i.default.policy.canvas.ZoomPolicy=i.default.policy.canvas.CanvasPolicy.extend({NAME:"draw2d.policy.canvas.ZoomPolicy",init:function(){this._super()},onInstall:function(t){this._super(t),t.setZoom(1)},onUninstall:function(t){this._super(t)},setZoom:function(t,e){let n=this.canvas,r=function(t){n.zoomFactor=Math.min(Math.max(.01,t),10);let e=n.initialWidth*n.zoomFactor|0,r=n.initialHeight*n.zoomFactor|0;n.paper.setViewBox(0,0,e,r),n.fireEvent("zoom",{value:n.zoomFactor})};if(e){(new s.Tweenable).tween({from:{x:n.zoomFactor},to:{x:t},duration:300,easing:"easeOutSine",step:t=>r(t.x),finish:t=>n.fireEvent("zoomed",{value:n.zoomFactor})})}else r(t),n.fireEvent("zoomed",{value:n.zoomFactor})}})},"./src/policy/connection/ClickConnectionCreatePolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.connection.ClickConnectionCreatePolicy=i.default.policy.connection.ConnectionCreatePolicy.extend({NAME:"draw2d.policy.connection.ClickConnectionCreatePolicy",init:function(t,e,n){this._super(t,e,n),this.port1=null,this.beeline=null,this.pulse=null,this.tempConnection=null,this.vertices=[]},onClick:function(t,e,n,r,s){var a=this,o=t;if(null!==o||null!==this.port1){if(null===o)return this.vertices.push(new i.default.geo.Point(e,n)),this.beeline.setStartPosition(e,n),this.tempConnection.setVertices(this.vertices),null!==this.pulse&&(this.pulse.remove(),this.pulse=null),void this.ripple(e,n,0);if(o instanceof i.default.Port)if(null!==this.port1){if(o.delegateTarget(this.port1)instanceof i.default.Port){var c=new i.default.command.CommandType(i.default.command.CommandType.CONNECT);c.source=this.port1,c.target=o;var l=null;null!==(l=this.port1 instanceof i.default.InputPort?this.port1.createCommand(c):o.createCommand(c))&&(this.vertices.push(o.getPosition()),l.setConnection(this.createConnection()),t.getCanvas().getCommandStack().execute(l),this.beeline.hide(),this.tempConnection.hide(),null!==this.pulse&&(this.pulse.remove(),this.pulse=null),this.beeline=null,this.port1=null,this.vertices=[])}}else{var h=o.getCanvas();this.port1=o,this.vertices.push(o.getAbsolutePosition()),this.beeline=new i.default.shape.basic.Line({start:this.port1.getAbsolutePosition(),end:this.port1.getAbsolutePosition(),dasharray:"- ",color:"#2C70FF"}),this.beeline.hide=function(){a.beeline.setCanvas(null)},this.beeline.show=function(t){a.beeline.setCanvas(t),a.beeline.shape.toFront()},this.beeline.show(h),this.tempConnection=new i.default.shape.basic.PolyLine({start:this.port1.getAbsolutePosition(),end:this.port1.getAbsolutePosition(),stroke:2,color:"#2C70FF"}),this.tempConnection.hide=function(){a.tempConnection.setCanvas(null)},this.tempConnection.show=function(t){a.tempConnection.setCanvas(t),a.tempConnection.shape.toFront()},this.tempConnection.show(h),this.tempConnection.setVertices([this.port1.getAbsolutePosition(),this.port1.getAbsolutePosition()]);var u=function(){a.tempConnection.shape.animate({"stroke-width":2},800,d)},d=function(){a.tempConnection.shape.animate({"stroke-width":1},800,u)};u();var p=o.getAbsolutePosition();this.pulse=this.ripple(p.x,p.y,1)}}},onMouseMove:function(t,e,n,r,i){null!==this.beeline&&this.beeline.setEndPosition(e,n)},onKeyDown:function(t,e,n,r){27===e&&null!==this.beeline&&(this.beeline.hide(),this.tempConnection.hide(),this.beeline=null,this.port1=null,this.vertices=[],null!=this.pulse&&(this.pulse.remove(),this.pulse=null))},createConnection:function(){var t=this._super();return 2===this.vertices.length?t.setRouter(new i.default.layout.connection.DirectRouter):(t.setRouter(new i.default.layout.connection.VertexRouter),t.setVertices(this.vertices)),t.setRadius(10),t}})},"./src/policy/connection/ComposedConnectionCreatePolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.connection.ComposedConnectionCreatePolicy=i.default.policy.connection.ConnectionCreatePolicy.extend({NAME:"draw2d.policy.connection.ComposedConnectionCreatePolicy",init:function(t){this.policies=t,this._super()},onMouseDown:function(){let t=arguments;this.policies.forEach((e=>{e.onMouseDown.apply(e,t)}))},onMouseDrag:function(){let t=arguments;this.policies.forEach((e=>{e.onMouseDrag.apply(e,t)}))},onMouseUp:function(){let t=arguments;this.policies.forEach((e=>{e.onMouseUp.apply(e,t)}))},onClick:function(){let t=arguments;this.policies.forEach((e=>{e.onClick.apply(e,t)}))},onMouseMove:function(){let t=arguments;this.policies.forEach((e=>{e.onMouseMove.apply(e,t)}))},onKeyUp:function(t,e,n,r){let i=arguments;this.policies.forEach((t=>{t.onKeyUp.apply(t,i)}))},onKeyDown:function(t,e,n,r){let i=arguments;this.policies.forEach((t=>{t.onKeyDown.apply(t,i)}))},onInstall:function(t){let e=arguments;this.policies.forEach((t=>{t.onInstall.apply(t,e)}))},onUninstall:function(t){let e=arguments;this.policies.forEach((t=>{t.onUninstall.apply(t,e)}))}})},"./src/policy/connection/ConnectionCreatePolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.connection.ConnectionCreatePolicy=i.default.policy.canvas.KeyboardPolicy.extend({NAME:"draw2d.policy.connection.ConnectionCreatePolicy",init:function(t,e,n){this._super(t,e,n)},createConnection:function(){return new i.default.Connection({router:new i.default.layout.connection.DirectRouter})},ripple:function(t,e,n){switch(n){case 0:var r=this.canvas.paper.circle(t,e,3,3).attr({fill:null,stroke:"#d0d0ff"}),i=Raphael.animation({transform:"s6",opacity:0,"stroke-width":3},500,"linear",(function(){r.remove()}));return r.animate(i),this.canvas.paper.set();case 1:var s=this.canvas.paper.circle(t,e,3,3).attr({fill:null,stroke:"#3f72bf"}),a=this.canvas.paper.circle(t,e,3,3).attr({fill:null,stroke:"#ff0000"}),o=Raphael.animation({transform:"s6",opacity:0,"stroke-width":1},1200,"linear").repeat(1/0);s.animate(o);var c=Raphael.animation({transform:"s12",opacity:0,"stroke-width":4},500,"linear",(function(){a.remove()}));return a.animate(c),s}}})},"./src/policy/connection/DragConnectionCreatePolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.connection.DragConnectionCreatePolicy=i.default.policy.connection.ConnectionCreatePolicy.extend({NAME:"draw2d.policy.connection.DragConnectionCreatePolicy",init:function(t,e,n){this._super(t,e,n),this.mouseDraggingElement=null,this.currentDropTarget=null,this.currentTarget=null},onMouseDown:function(t,e,n,r,s){var a=t.getBestFigure(e,n);if(null!==a&&a instanceof i.default.Port&&(!0===a.isInDragDrop&&(a.onDragEnd(e,n,r,s),a.isInDragDrop=!1),a.isDraggable())){var o=a.onDragStart(e-a.getAbsoluteX(),n-a.getAbsoluteY(),r,s);o&&a.fireEvent("dragstart",{x:e-a.getAbsoluteX(),y:n-a.getAbsoluteY(),shiftKey:r,ctrlKey:s}),this.mouseDraggingElement=!1===o?null:a,this.mouseDownElement=a}},onMouseDrag:function(t,e,n,r,s,a,o){try{if(null!==this.mouseDraggingElement){var c=this.mouseDraggingElement,l=this.currentTarget;c.isInDragDrop=!0,c.onDrag(e,n,r,s,a,o),(h=t.getBestFigure(c.getAbsoluteX(),c.getAbsoluteY(),c))!==l&&(null!==l&&(l.onDragLeave(c),l.fireEvent("dragLeave",{draggingElement:c}),c.editPolicy.each((function(e,n){n instanceof i.default.policy.port.PortFeedbackPolicy&&n.onHoverLeave(t,c,l)}))),null!==h?(this.currentTarget=l=h.delegateTarget(c),null!==l&&(l.onDragEnter(c),l.fireEvent("dragEnter",{draggingElement:c}),c.editPolicy.each((function(e,n){n instanceof i.default.policy.port.PortFeedbackPolicy&&n.onHoverEnter(t,c,l)})))):this.currentTarget=null);var h,u=t.fromDocumentToCanvasCoordinate(t.mouseDownX+e/t.zoomFactor,t.mouseDownY+n/t.zoomFactor);(h=t.getBestFigure(u.x,u.y,this.mouseDraggingElement))!==this.currentDropTarget&&(null!==this.currentDropTarget&&(this.currentDropTarget.onDragLeave(this.mouseDraggingElement),this.currentDropTarget.fireEvent("dragLeave",{draggingElement:this.mouseDraggingElement}),this.currentDropTarget=null),null!==h&&(this.currentDropTarget=h.delegateTarget(this.mouseDraggingElement),null!==this.currentDropTarget&&(this.currentDropTarget.onDragEnter(this.mouseDraggingElement),this.currentDropTarget.fireEvent("dragEnter",{draggingElement:this.mouseDraggingElement}))))}}catch(t){console.log(t)}},onMouseUp:function(t,e,n,r,s){if(null!==this.mouseDraggingElement){var a=this.mouseDraggingElement,o=this.currentTarget;if(t.getCommandStack().startTransaction(),a.onDragEnd(e,n,r,s),o&&a.editPolicy.each((function(e,n){n instanceof i.default.policy.port.PortFeedbackPolicy&&n.onHoverLeave(t,a,o)})),a.editPolicy.each((function(o,c){c instanceof i.default.policy.figure.DragDropEditPolicy&&c.onDragEnd(t,a,e,n,r,s)})),this.currentTarget=null,a.isInDragDrop=!1,a.fireEvent("dragend",{x:e,y:n,shiftKey:r,ctrlKey:s}),null!==this.currentDropTarget&&(this.mouseDraggingElement.onDrop(this.currentDropTarget,e,n,r,s),this.currentDropTarget.onDragLeave(this.mouseDraggingElement),this.currentDropTarget.fireEvent("dragLeave",{draggingElement:this.mouseDraggingElement}),this.currentDropTarget instanceof i.default.Port)){var c=new i.default.command.CommandType(i.default.command.CommandType.CONNECT);c.source=this.currentDropTarget,c.target=this.mouseDraggingElement;var l=this.mouseDraggingElement.createCommand(c);null!==l&&(l.setConnection(this.createConnection()),t.getCommandStack().execute(l),this.currentDropTarget.onCatch(this.mouseDraggingElement,e,n,r,s))}t.getCommandStack().commitTransaction(),this.currentDropTarget=null,this.mouseDraggingElement=null}},createConnection:function(){var t=this._super();return t.setRouter(new i.default.layout.connection.DirectRouter),t}})},"./src/policy/connection/OrthogonalConnectionCreatePolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.connection.OrthogonalConnectionCreatePolicy=i.default.policy.connection.ConnectionCreatePolicy.extend({NAME:"draw2d.policy.connection.ClickConnectionCreatePolicy",init:function(t,e,n){this._super(t,e,n),this.port1=null,this.beeline=null,this.pulse=null,this.tempConnection=null,this.vertices=new i.default.util.ArrayList},onClick:function(t,e,n,r,s){var a=i.default.geo.Rectangle.DIRECTION_UP,o=i.default.geo.Rectangle.DIRECTION_RIGHT,c=i.default.geo.Rectangle.DIRECTION_DOWN,l=i.default.geo.Rectangle.DIRECTION_LEFT,h=this,u=t;if(null!==u||null!==this.port1){if(null===u){var d=this.port1.getCanvas(),p=this.beeline.getEndPosition();return this.vertices.add(p),this.beeline.setStartPosition(this.beeline.getEndPosition()),this.tempConnection.setVertices(this.vertices),null!==this.pulse&&(this.pulse.remove(),this.pulse=null),void this.ripple(p.x,p.y,0)}if(u instanceof i.default.Port)if(null===this.port1){d=u.getCanvas();this.port1=u,this.vertices.add(u.getAbsolutePosition()),this.beeline=new i.default.shape.basic.Line({start:this.port1.getAbsolutePosition(),end:this.port1.getAbsolutePosition(),dasharray:"- ",color:"#2C70FF"}),this.beeline.hide=function(){h.beeline.setCanvas(null)},this.beeline.show=function(t){h.beeline.setCanvas(t),h.beeline.shape.toFront()},this.beeline.show(d),this.tempConnection=new i.default.shape.basic.PolyLine({start:this.port1.getAbsolutePosition(),end:this.port1.getAbsolutePosition(),stroke:2,color:"#2C70FF"}),this.tempConnection.hide=function(){h.tempConnection.setCanvas(null)},this.tempConnection.show=function(t){h.tempConnection.setCanvas(t),h.tempConnection.shape.toFront()},this.tempConnection.show(d),this.tempConnection.setVertices([this.port1.getAbsolutePosition(),this.port1.getAbsolutePosition()]);var f=function(){h.tempConnection.shape.animate({"stroke-width":2},800,g)},g=function(){h.tempConnection.shape.animate({"stroke-width":1},800,f)};f(),d.paper.setStart(),null!==this.pulse&&(this.pulse.remove(),this.pulse=null);var m=u.getAbsolutePosition();this.ripple(m.x,m.y,1),this.pulse=d.paper.setFinish()}else{if(!(u.delegateTarget(this.port1)instanceof i.default.Port))return;var y=new i.default.command.CommandType(i.default.command.CommandType.CONNECT);y.source=this.port1,y.target=u;var x=null;if(null!==(x=this.port1 instanceof i.default.InputPort?this.port1.createCommand(y):u.createCommand(y))){var v=this.createConnection();if(x.setConnection(v),u.getCanvas().getCommandStack().execute(x),this.beeline.hide(),this.tempConnection.hide(),null!==this.pulse&&(this.pulse.remove(),this.pulse=null),this.beeline=null,this.port1=null,this.vertices.getSize()<=2)return;var b=x.getConnection().getRouter().MINDIST,w=this.vertices.get(this.vertices.getSize()-2),C=this.vertices.last(),M=u.getAbsolutePosition(),S=a;switch(S=C.x===w.x?C.y<w.y?a:c:C.x<w.x?l:o,u.getConnectionDirection(this.port1)){case a:switch(S){case a:C.y<M.y-b?(this.vertices.add(new i.default.geo.Point(M.x,C.y)),this.vertices.add(M)):(C.y=M.y-b,this.vertices.add(new i.default.geo.Point(M.x,C.y)),this.vertices.add(M));break;case o:C.y>M.y-b?(w.y=M.y-b,C.x=M.x,C.y=w.y,this.vertices.add(M)):(C.x=M.x,this.vertices.add(M));break;case c:C.y<M.y-b?(w.x=M.x,C.setPosition(M)):(C.y=M.y-b,this.vertices.add(new i.default.geo.Point(M.x,C.y)),this.vertices.add(M));break;case l:C.y>M.y-b?(w.y=M.y-b,C.x=M.x,C.y=w.y,this.vertices.add(M)):(C.x=M.x,this.vertices.add(M))}break;case o:switch(S){case a:C.x>M.x+b?(C.y=M.y,this.vertices.add(M)):(this.vertices.add(new i.default.geo.Point(M.x+b,C.y)),this.vertices.add(new i.default.geo.Point(M.x+b,M.y)),this.vertices.add(M));break;case o:C.x>M.x+b?(this.vertices.add(new i.default.geo.Point(C.x,M.y)),this.vertices.add(M)):(C.x=M.x+b,this.vertices.add(new i.default.geo.Point(C.x,M.y)),this.vertices.add(M));break;case c:C.x>M.x+b?(C.y=M.y,this.vertices.add(M)):(this.vertices.add(new i.default.geo.Point(M.x+b,C.y)),this.vertices.add(new i.default.geo.Point(M.x+b,M.y)),this.vertices.add(M));break;case l:C.x>M.x+b?(this.vertices.add(new i.default.geo.Point(C.x,M.y)),this.vertices.add(M)):(C.x=M.x+b,this.vertices.add(new i.default.geo.Point(C.x,M.y)),this.vertices.add(M))}break;case c:switch(S){case a:C.y<M.y+b?(C.y=M.y+b,this.vertices.add(new i.default.geo.Point(M.x,C.y)),this.vertices.add(M)):(C.x=M.x,C.y=M.y,w.x=M.x);break;case o:C.y<M.y+b?(this.vertices.add(new i.default.geo.Point(C.x,M.y+b)),this.vertices.add(new i.default.geo.Point(M.x,M.y+b)),this.vertices.add(M)):(C.x=M.x,this.vertices.add(M));break;case c:C.y<M.y+b?(C.y=M.y+b,this.vertices.add(new i.default.geo.Point(M.x,C.y)),this.vertices.add(M)):(this.vertices.add(new i.default.geo.Point(M.x,C.y)),this.vertices.add(M));break;case l:C.y<M.y-b?(w.y=M.y-b,C.x=M.x,C.y=w.y,this.vertices.add(M)):(C.x=M.x,this.vertices.add(M))}break;case l:switch(S){case a:C.x>=M.x-b?(this.vertices.add(new i.default.geo.Point(M.x-b,C.y)),this.vertices.add(new i.default.geo.Point(M.x-b,M.y)),this.vertices.add(M)):C.y>M.y&&C.x<M.x-b?(C.y=M.y,this.vertices.add(M)):(this.vertices.add(new i.default.geo.Point(M.x-b,C.y)),this.vertices.add(new i.default.geo.Point(M.x-b,M.y)),this.vertices.add(M));break;case o:if(C.y<M.y&&C.x>M.x-b){var _=M.y-(M.y-C.y)/2;this.vertices.add(new i.default.geo.Point(C.x,_)),this.vertices.add(new i.default.geo.Point(M.x-b,_)),this.vertices.add(new i.default.geo.Point(M.x-b,M.y)),this.vertices.add(M)}else if(C.y>M.y&&C.x>M.x-b){_=M.y+(C.y-M.y)/2;this.vertices.add(new i.default.geo.Point(C.x,_)),this.vertices.add(new i.default.geo.Point(M.x-b,_)),this.vertices.add(new i.default.geo.Point(M.x-b,M.y)),this.vertices.add(M)}else this.vertices.add(new i.default.geo.Point(C.x,M.y)),this.vertices.add(M);break;case c:C.x>=M.x-b?(this.vertices.add(new i.default.geo.Point(M.x-b,C.y)),this.vertices.add(new i.default.geo.Point(M.x-b,M.y)),this.vertices.add(M)):(C.y=M.y,this.vertices.add(M));break;case l:C.x<M.x-b?(this.vertices.add(new i.default.geo.Point(C.x,M.y)),this.vertices.add(M)):(C.x=M.x-b,this.vertices.add(new i.default.geo.Point(C.x,M.y)),this.vertices.add(M))}}this.vertices.getSize()>3&&(v._routingMetaData.routedByUserInteraction=!0,v.setVertices(this.vertices)),this.vertices.clear()}}}},onMouseMove:function(t,e,n,r,i){null!==this.beeline&&this.beeline.setEndPosition(this.orthogonal(this.vertices.last(),{x:e,y:n}))},onKeyDown:function(t,e,n,r){27===e&&null!==this.beeline&&(this.beeline.hide(),this.tempConnection.hide(),this.beeline=null,this.port1=null,this.vertices.clear(),null!=this.pulse&&(this.pulse.remove(),this.pulse=null))},orthogonal:function(t,e){var n=Math.abs(t.x-e.x)+10,r=i.default.geo.Line.distance(t.x-n,t.y,t.x+n,t.y,e.x,e.y),s=Math.abs(t.y-e.y)+10;return i.default.geo.Line.distance(t.x,t.y-s,t.x,t.y+s,e.x,e.y)>r?{x:e.x,y:t.y}:{x:t.x,y:e.y}},createConnection:function(){var t=this._super();return t.attr({radius:7,stroke:3}),t.setRouter(new i.default.layout.connection.InteractiveManhattanConnectionRouter),t}})},"./src/policy/figure/AntSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.AntSelectionFeedbackPolicy=i.default.policy.figure.SelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.AntSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onSelect:function(t,e,n){if(e.selectionHandles.isEmpty()){let n=new i.default.shape.basic.Rectangle({bgColor:null,dasharray:"- ",color:"#2C70FF"});if(n.hide=function(){n.setCanvas(null)},n.show=function(t){n.setCanvas(t),n.shape.toFront()},n.show(t),e.selectionHandles.add(n),null!==e.getParent()){let n=new i.default.shape.basic.Line({opacity:.5,bgColor:null,dasharray:"- ",color:"#2C70FF"});n.show=t=>n.setCanvas(t),n.hide=()=>n.setCanvas(null),n.show(t),e.selectionHandles.add(n),this._updateBeeLine(n,e)}}this.moved(t,e)},moved:function(t,e){if(e.selectionHandles.isEmpty())return;let n=e.selectionHandles.first();n.setPosition(e.getAbsolutePosition().translate(-2,-2)),n.setDimension(e.getWidth()+4,e.getHeight()+4),n.setRotationAngle(e.getRotationAngle()),e.selectionHandles.getSize()>1&&this._updateBeeLine(e.selectionHandles.get(1),e)},_updateBeeLine:function(t,e){let n=e.getParent();if(null!==n)if(n instanceof i.default.shape.basic.Line){let r=e.getBoundingBox().getCenter(),i=n.pointProjection(r);if(null===i){let e=t.getStartPosition(),n=t.getEndPosition();i=r.distance(e)<r.distance(e)?e:n}e.getBoundingBox().intersectionWithLine(r,i).getSize()>0?t.setStartPosition(e.getBoundingBox().intersectionWithLine(r,i).get(0)).setEndPosition(i):t.setStartPosition(e.getBoundingBox().getCenter()).setEndPosition(i)}else{let r=e.getBoundingBox(),i=n.getBoundingBox(),s=r.getCenter(),a=i.getCenter();r.intersects(i)||r.hitTest(a)||i.hitTest(s)?t.setStartPosition(s).setEndPosition(a):(r.scale(3,3),i.scale(3,3),t.setStartPosition(r.intersectionWithLine(s,a).get(0)).setEndPosition(i.intersectionWithLine(s,a).get(0)))}}})},"./src/policy/figure/BigRectangleSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.BigRectangleSelectionFeedbackPolicy=i.default.policy.figure.RectangleSelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.BigRectangleSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},createResizeHandle:function(t,e){return new i.default.ResizeHandle({owner:t,type:e,width:15,height:15})}})},"./src/policy/figure/BusSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.BusSelectionFeedbackPolicy=i.default.policy.figure.SelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.BusSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onSelect:function(t,e,n){if(e.selectionHandles.isEmpty()){let n=this.createResizeHandle(e,2),r=this.createResizeHandle(e,4),i=this.createResizeHandle(e,6),s=this.createResizeHandle(e,8);e.selectionHandles.add(n,r,i,s),n.setDraggable(e.isResizeable()),r.setDraggable(e.isResizeable()),i.setDraggable(e.isResizeable()),s.setDraggable(e.isResizeable()),n.show(t),r.show(t),i.show(t),s.show(t)}this.moved(t,e)},moved:function(t,e){if(e.selectionHandles.isEmpty())return;let n=e.selectionHandles.find((t=>2===t.type)),r=e.selectionHandles.find((t=>4===t.type)),i=e.selectionHandles.find((t=>6===t.type)),s=e.selectionHandles.find((t=>8===t.type)),a=e.getHeight(),o=e.getWidth(),c=e.getX(),l=e.getY();n?.setPosition(c+o/2-n.getWidth()/2,l-n.getHeight()),r?.setPosition(c+o,l+a/2-r.getHeight()/2),i?.setPosition(c+o/2-i.getWidth()/2,l+a),s?.setPosition(c-s.getWidth(),l+a/2-s.getHeight()/2)},createResizeHandle:function(t,e){return new i.default.ResizeHandle({owner:t,type:e,width:10,height:10})}})},"./src/policy/figure/DragDropEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.DragDropEditPolicy=i.default.policy.figure.FigureEditPolicy.extend({NAME:"draw2d.policy.figure.DragDropEditPolicy",init:function(t,e,n){this._super(t,e,n),this.moveCallback=(t,e)=>{this.moved(t.getCanvas(),t)}},onInstall:function(t){this._super(t),t.on("move",this.moveCallback)},onUninstall:function(t){this._super(t),t.off(this.moveCallback)},onDragStart:function(t,e,n,r,i,s){return e.shape.attr({cursor:"move"}),!0===e.isMoving&&e.setAlpha(e.originalAlpha),e.originalAlpha=e.getAlpha(),e.isMoving=!1,!0},onDrag:function(t,e){!1===e.isMoving&&(e.isMoving=!0,e.setAlpha(.4*e.originalAlpha))},onDragEnd:function(t,e,n,r,i,s){e.shape.attr({cursor:"default"}),e.isMoving=!1,e.setAlpha(e.originalAlpha)},adjustPosition:function(t,e,n){return e instanceof i.default.geo.Point?e:new i.default.geo.Point(e,n)},adjustDimension:function(t,e,n){return new i.default.geo.Rectangle(0,0,e,n)},moved:function(t,e){}})},"./src/policy/figure/FigureEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.FigureEditPolicy=i.default.policy.EditPolicy.extend({NAME:"draw2d.policy.figure.FigureEditPolicy",init:function(t,e,n){this._super(t,e,n)},onRightMouseDown:function(t,e,n,r,i){}})},"./src/policy/figure/GlowSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.GlowSelectionFeedbackPolicy=i.default.policy.figure.SelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.GlowSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onSelect:function(t,e,n){e.setGlow(!0),this.moved(t,e)},onUnselect:function(t,e){this._super(t,e),e.setGlow(!1)}})},"./src/policy/figure/HBusSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.HBusSelectionFeedbackPolicy=i.default.policy.figure.BusSelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.HBusSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},moved:function(t,e){if(!e.selectionHandles.isEmpty()){var n=e.selectionHandles.find((function(t){return 4===t.type})),r=e.selectionHandles.find((function(t){return 8===t.type}));n.setDimension(n.getWidth(),e.getHeight()),r.setDimension(n.getWidth(),e.getHeight()),this._super(t,e)}}})},"./src/policy/figure/HorizontalEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.HorizontalEditPolicy=i.default.policy.figure.DragDropEditPolicy.extend({NAME:"draw2d.policy.figure.HorizontalEditPolicy",init:function(t,e,n){this._super(t,e,n)},adjustPosition:function(t,e,n){return new i.default.geo.Point(e,t.getY())}})},"./src/policy/figure/RaftSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.RaftSelectionFeedbackPolicy=i.default.policy.figure.RectangleSelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.RaftSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},createResizeHandle:function(t,e){return new i.default.shape.composite.RaftResizeHandle({owner:t,type:e,width:10,height:10})}})},"./src/policy/figure/RectangleSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.RectangleSelectionFeedbackPolicy=i.default.policy.figure.SelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.RectangleSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onSelect:function(t,e,n){if(e.selectionHandles.isEmpty()){let n=new i.default.shape.basic.Rectangle({bgColor:null,dashArray:"- ",color:"#2C70FF",stroke:.5});n.hide=function(){n.setCanvas(null)},n.show=function(t){n.setCanvas(t),n.toFront(e)};let r=this.createResizeHandle(e,1),s=this.createResizeHandle(e,3),a=this.createResizeHandle(e,5),o=this.createResizeHandle(e,7);if(e.selectionHandles.add(r,s,a,o),r.show(t),s.show(t),a.show(t),o.show(t),!1===e.isResizeable()){let t={bgColor:null,draggable:!1};r.attr(t),s.attr(t),a.attr(t),o.attr(t),r.setDraggable(!1),s.setDraggable(!1),a.setDraggable(!1),o.setDraggable(!1)}if(!e.getKeepAspectRatio()&&e.isResizeable()){let n=this.createResizeHandle(e,2),r=this.createResizeHandle(e,4),i=this.createResizeHandle(e,6),s=this.createResizeHandle(e,8);e.selectionHandles.add(n,r,i,s),n.show(t),r.show(t),i.show(t),s.show(t)}e.selectionHandles.add(n),n.show(t)}this.moved(t,e)},moved:function(t,e){if(e.selectionHandles.isEmpty())return;let n=3*t.getZoom(),r=e.getHeight(),i=e.getWidth(),s=e.getAbsoluteX(),a=e.getAbsoluteY(),o=e.selectionHandles.find((t=>1===t.type)),c=e.selectionHandles.find((t=>3===t.type)),l=e.selectionHandles.find((t=>5===t.type)),h=e.selectionHandles.find((t=>7===t.type));if(o.setPosition(s-o.getWidth(),a-o.getHeight()),c.setPosition(s+i,a-c.getHeight()),l.setPosition(s+i,a+r),h.setPosition(s-h.getWidth(),a+r),!e.getKeepAspectRatio()&&e.isResizeable()){let t=e.selectionHandles.find((t=>2===t.type)),n=e.selectionHandles.find((t=>4===t.type)),o=e.selectionHandles.find((t=>6===t.type)),c=e.selectionHandles.find((t=>8===t.type));t.setPosition(s+i/2-t.getWidth()/2,a-t.getHeight()),n.setPosition(s+i,a+r/2-n.getHeight()/2),o.setPosition(s+i/2-o.getWidth()/2,a+r),c.setPosition(s-c.getWidth(),a+r/2-c.getHeight()/2)}let u=e.selectionHandles.last();u.attr({x:s-n,y:a-n,width:i+2*n,height:r+2*n,stroke:t.getZoom()}),u.setRotationAngle(e.getRotationAngle())},createResizeHandle:function(t,e){return new i.default.ResizeHandle({owner:t,type:e,width:10,height:10})}})},"./src/policy/figure/RegionEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.RegionEditPolicy=i.default.policy.figure.DragDropEditPolicy.extend({NAME:"draw2d.policy.figure.RegionEditPolicy",init:function(t,e,n,r){if(this._super(),t instanceof i.default.geo.Rectangle)this.constRect=t;else{if("number"!=typeof r)throw"Invalid parameter. RegionEditPolicy need a rectangle as parameter in the constructor";this.constRect=new i.default.geo.Rectangle(t,e,n,r)}},setBoundingBox:function(t){return this.constRect=t,this},getBoundingBox:function(){return this.constRect},adjustPosition:function(t,e,n){let r=null;return r=e instanceof i.default.geo.Point?new i.default.geo.Rectangle(e.x,e.y,t.getWidth(),t.getHeight()):new i.default.geo.Rectangle(e,n,t.getWidth(),t.getHeight()),r=this.constRect.moveInside(r),r.getTopLeft()},adjustDimension:function(t,e,n){let r=t.getAbsoluteX()+e-this.constRect.getRight(),s=t.getAbsoluteY()+n-this.constRect.getBottom();return r>0&&(e-=r),s>0&&(n-=s),new i.default.geo.Rectangle(0,0,e,n)}})},"./src/policy/figure/ResizeSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.ResizeSelectionFeedbackPolicy=i.default.policy.figure.SelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.ResizeSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onSelect:function(t,e,n){if(e.selectionHandles.isEmpty()){var r=i.default.Configuration.factory.createResizeHandle(e,1),s=i.default.Configuration.factory.createResizeHandle(e,3),a=i.default.Configuration.factory.createResizeHandle(e,5),o=i.default.Configuration.factory.createResizeHandle(e,7);if(e.selectionHandles.add(r,s,a,o),r.show(t),s.show(t),a.show(t),o.show(t),!1===e.isResizeable()&&(r.setBackgroundColor(null),s.setBackgroundColor(null),a.setBackgroundColor(null),o.setBackgroundColor(null),r.setDraggable(!1),s.setDraggable(!1),a.setDraggable(!1),o.setDraggable(!1)),!e.getKeepAspectRatio()&&e.isResizeable()){var c=i.default.Configuration.factory.createResizeHandle(e,2),l=i.default.Configuration.factory.createResizeHandle(e,4),h=i.default.Configuration.factory.createResizeHandle(e,6),u=i.default.Configuration.factory.createResizeHandle(e,8);e.selectionHandles.add(c,l,h,u),c.show(t),l.show(t),h.show(t),u.show(t)}}this.moved(t,e)},moved:function(t,e){if(!e.selectionHandles.isEmpty()){var n=e.getHeight(),r=e.getWidth(),i=e.getX(),s=e.getY(),a=e.selectionHandles.find((function(t){return 1===t.type})),o=e.selectionHandles.find((function(t){return 3===t.type})),c=e.selectionHandles.find((function(t){return 5===t.type})),l=e.selectionHandles.find((function(t){return 7===t.type}));if(a.setPosition(i-a.getWidth(),s-a.getHeight()),o.setPosition(i+r,s-o.getHeight()),c.setPosition(i+r,s+n),l.setPosition(i-l.getWidth(),s+n),!e.getKeepAspectRatio()){var h=e.selectionHandles.find((function(t){return 2===t.type})),u=e.selectionHandles.find((function(t){return 4===t.type})),d=e.selectionHandles.find((function(t){return 6===t.type})),p=e.selectionHandles.find((function(t){return 8===t.type}));h.setPosition(i+r/2-h.getWidth()/2,s-h.getHeight()),u.setPosition(i+r,s+n/2-u.getHeight()/2),d.setPosition(i+r/2-d.getWidth()/2,s+n),p.setPosition(i-p.getWidth(),s+n/2-p.getHeight()/2)}}}})},"./src/policy/figure/RoundRectangleSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.RoundRectangleSelectionFeedbackPolicy=i.default.policy.figure.RectangleSelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.RoundRectangleSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},createResizeHandle:function(t,e){return new i.default.ResizeHandle({owner:t,type:e,width:12,height:12,radius:4})}})},"./src/policy/figure/SelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.SelectionFeedbackPolicy=i.default.policy.figure.SelectionPolicy.extend({NAME:"draw2d.policy.figure.SelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onUnselect:function(t,e){this._super(t,e),e.selectionHandles.each(((t,e)=>e.hide())),e.selectionHandles=new i.default.util.ArrayList},onInstall:function(t){this._super(t);let e=t.getCanvas();null!==e&&e.getSelection().contains(t)&&this.onSelect(e,t,!0)},onUninstall:function(t){this._super(t),t.selectionHandles.each(((t,e)=>e.hide())),t.selectionHandles=new i.default.util.ArrayList}})},"./src/policy/figure/SelectionPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.SelectionPolicy=i.default.policy.figure.DragDropEditPolicy.extend({NAME:"draw2d.policy.figure.SelectionPolicy",init:function(t,e,n){this._super(t,e,n)},onSelect:function(t,e,n){},onUnselect:function(t,e){}})},"./src/policy/figure/SlimSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.SlimSelectionFeedbackPolicy=i.default.policy.figure.RectangleSelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.SlimSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},createResizeHandle:function(t,e){return new i.default.ResizeHandle({owner:t,type:e,width:6,height:6,radius:0})}})},"./src/policy/figure/VBusSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.VBusSelectionFeedbackPolicy=i.default.policy.figure.BusSelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.VBusSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onSelect:function(t,e,n){if(e.selectionHandles.isEmpty()){let n=this.createResizeHandle(e,2),r=this.createResizeHandle(e,6);e.selectionHandles.add(n,r),n.setDraggable(e.isResizeable()),r.setDraggable(e.isResizeable()),n.show(t),r.show(t)}this.moved(t,e)},moved:function(t,e){if(!e.selectionHandles.isEmpty()){var n=e.selectionHandles.find((t=>2===t.type)),r=e.selectionHandles.find((t=>6===t.type)),i=e.getWidth();n.setDimension(i,n.getHeight()),r.setDimension(i,r.getHeight()),this._super(t,e)}}})},"./src/policy/figure/VertexSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.VertexSelectionFeedbackPolicy=i.default.policy.figure.SelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.VertexSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onSelect:function(t,e,n){let r=e.getVertices();for(let n=0;n<r.getSize();n++){let r=new i.default.shape.basic.VertexResizeHandle(e,n);if(e.selectionHandles.add(r),r.setDraggable(e.isResizeable()),r.show(t),0!==n){let r=new i.default.shape.basic.GhostVertexResizeHandle(e,n-1);e.selectionHandles.add(r),r.setDraggable(e.isResizeable()),r.show(t)}}this.moved(t,e)},moved:function(t,e){e.selectionHandles.each(((t,e)=>e.relocate()))}})},"./src/policy/figure/VerticalEditPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.VerticalEditPolicy=i.default.policy.figure.DragDropEditPolicy.extend({NAME:"draw2d.policy.figure.VerticalEditPolicy",init:function(t,e,n){this._super(t,e,n)},adjustPosition:function(t,e,n){return new i.default.geo.Point(t.getX(),n)}})},"./src/policy/figure/WidthSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.figure.WidthSelectionFeedbackPolicy=i.default.policy.figure.SelectionFeedbackPolicy.extend({NAME:"draw2d.policy.figure.BusSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onSelect:function(t,e,n){if(e.selectionHandles.isEmpty()){let n=new i.default.ResizeHandle({owner:e,type:4}),r=new i.default.ResizeHandle({owner:e,type:8});n.installEditPolicy(new i.default.policy.figure.HorizontalEditPolicy),r.installEditPolicy(new i.default.policy.figure.HorizontalEditPolicy),e.selectionHandles.add(n,r),n.setDraggable(e.isResizeable()),r.setDraggable(e.isResizeable()),n.show(t),r.show(t)}this.moved(t,e)},moved:function(t,e){if(e.selectionHandles.isEmpty())return;let n=e.selectionHandles.find((t=>4===t.type)),r=e.selectionHandles.find((t=>8===t.type)),i=e.getWidth(),s=e.getX(),a=e.getY();n.setDimension(n.getWidth(),e.getHeight()),r.setDimension(r.getWidth(),e.getHeight()),n.setPosition(s+i,a),r.setPosition(s-r.getWidth(),a)}})},"./src/policy/line/LineSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.line.LineSelectionFeedbackPolicy=i.default.policy.figure.SelectionFeedbackPolicy.extend({NAME:"draw2d.policy.line.LineSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onSelect:function(t,e,n){e.selectionHandles.isEmpty()&&(e.selectionHandles.add(new i.default.shape.basic.LineStartResizeHandle(e)),e.selectionHandles.add(new i.default.shape.basic.LineEndResizeHandle(e)),e.selectionHandles.each(((n,r)=>{r.setDraggable(e.isResizeable()),r.show(t)}))),this.moved(t,e)},moved:function(t,e){e.selectionHandles.each(((t,e)=>e.relocate()))}})},"./src/policy/line/OrthogonalSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r=i(n("./src/packages.js"));i(n("./src/lib/jquery.contextmenu.js")),i(n("./src/css/contextmenu.css"));function i(t){return t&&t.__esModule?t:{default:t}}r.default.policy.line.OrthogonalSelectionFeedbackPolicy=r.default.policy.line.LineSelectionFeedbackPolicy.extend({NAME:"draw2d.policy.line.OrthogonalSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n),this.ResizeHandle=r.default.ResizeHandle.extend({NAME:"draw2d.policy.line.OrthogonalSelectionFeedbackPolicy.ResizeHandle",init:function(t,e){this._super({owner:t}),this.index=e},onDragStart:function(t,e,n,i){this._super(t,e,n,i),this.command=this.getCanvas().getPrimarySelection().createCommand(new r.default.command.CommandType(r.default.command.CommandType.MOVE_VERTICES)),this.vertex=this.owner.getVertex(this.index).clone()},onDrag:function(t,e,n,i){if(null==this.command)return!1;let s=this.owner.getRouter().MINDIST||10,a=this.owner.getSource().getConnectionDirection(this.owner.getTarget()),o=this.owner.getTarget().getConnectionDirection(this.owner.getSource());this.vertex.translate(n,i);let c=this.owner.getVertices(),l=c.getSize(),h=Math.max,u=Math.min;if(1===this.index){let t=c.get(this.index-1),e=c.get(this.index),n=c.get(this.index+1);if(e.x===n.x&&t.y===e.y)switch(a){case r.default.geo.Rectangle.DIRECTION_RIGHT:this.owner.setVertex(1,h(t.x+s,this.vertex.x),e.y),this.owner.setVertex(2,h(t.x+s,this.vertex.x),n.y);break;case r.default.geo.Rectangle.DIRECTION_LEFT:this.owner.setVertex(1,u(t.x-s,this.vertex.x),e.y),this.owner.setVertex(2,u(t.x-s,this.vertex.x),n.y)}else switch(a){case r.default.geo.Rectangle.DIRECTION_UP:this.owner.setVertex(1,e.x,u(t.y-s,this.vertex.y)),this.owner.setVertex(2,n.x,u(t.y-s,this.vertex.y));break;case r.default.geo.Rectangle.DIRECTION_DOWN:this.owner.setVertex(1,e.x,h(t.y+s,this.vertex.y)),this.owner.setVertex(2,n.x,h(t.y+s,this.vertex.y))}}else if(this.index===l-2){let t=c.get(this.index-1),e=c.get(this.index),n=c.get(this.index+1);if(n.x===e.x&&t.y===e.y)switch(o){case r.default.geo.Rectangle.DIRECTION_UP:this.owner.setVertex(l-2,e.x,u(n.y-s,this.vertex.y)),this.owner.setVertex(l-3,t.x,u(n.y-s,this.vertex.y));break;case r.default.geo.Rectangle.DIRECTION_DOWN:this.owner.setVertex(l-2,e.x,h(n.y+s,this.vertex.y)),this.owner.setVertex(l-3,t.x,h(n.y+s,this.vertex.y))}else switch(o){case r.default.geo.Rectangle.DIRECTION_RIGHT:this.owner.setVertex(l-2,h(n.x+s,this.vertex.x),e.y),this.owner.setVertex(l-3,h(n.x+s,this.vertex.x),t.y);break;case r.default.geo.Rectangle.DIRECTION_LEFT:this.owner.setVertex(l-2,u(n.x-s,this.vertex.x),e.y),this.owner.setVertex(l-3,u(n.x-s,this.vertex.x),t.y)}}else{let t=c.get(this.index-2),e=c.get(this.index-1),n=c.get(this.index),i=c.get(this.index+1),d=c.get(this.index+2);if(n.x===i.x&&n.y===e.y)if(this.index-2==0)switch(a){case r.default.geo.Rectangle.DIRECTION_RIGHT:this.owner.setVertex(this.index-1,e.x,h(this.vertex.y,t.y-s)),this.owner.setVertex(this.index,this.vertex.x,h(this.vertex.y,t.y-s)),this.owner.setVertex(this.index+1,this.vertex.x,i.y);break;case r.default.geo.Rectangle.DIRECTION_LEFT:this.owner.setVertex(this.index-1,e.x,u(this.vertex.y,t.y+s)),this.owner.setVertex(this.index,this.vertex.x,this.vertex.y),this.owner.setVertex(this.index+1,this.vertex.x,i.y);break;case r.default.geo.Rectangle.DIRECTION_UP:this.owner.setVertex(this.index-1,e.x,u(this.vertex.y,t.y-s)),this.owner.setVertex(this.index,this.vertex.x,u(this.vertex.y,t.y-s)),this.owner.setVertex(this.index+1,this.vertex.x,i.y);break;case r.default.geo.Rectangle.DIRECTION_DOWN:this.owner.setVertex(this.index-1,e.x,h(this.vertex.y,t.y+s)),this.owner.setVertex(this.index,this.vertex.x,h(this.vertex.y,t.y+s)),this.owner.setVertex(this.index+1,this.vertex.x,i.y)}else if(this.index-l+3==0)switch(o){case r.default.geo.Rectangle.DIRECTION_RIGHT:this.owner.setVertex(this.index-1,e.x,this.vertex.y),this.owner.setVertex(this.index,h(this.vertex.x,d.x+s),this.vertex.y),this.owner.setVertex(this.index+1,h(this.vertex.x,d.x+s),i.y);break;case r.default.geo.Rectangle.DIRECTION_LEFT:this.owner.setVertex(this.index-1,e.x,this.vertex.y),this.owner.setVertex(this.index,u(this.vertex.x,d.x-s),this.vertex.y),this.owner.setVertex(this.index+1,u(this.vertex.x,d.x-s),i.y)}else this.owner.setVertex(this.index-1,e.x,this.vertex.y),this.owner.setVertex(this.index,this.vertex),this.owner.setVertex(this.index+1,this.vertex.x,i.y);else if(e.x===n.x&&n.y===i.y)if(this.index-2==0)switch(a){case r.default.geo.Rectangle.DIRECTION_RIGHT:this.owner.setVertex(this.index-1,h(this.vertex.x,t.x+s),e.y),this.owner.setVertex(this.index,h(this.vertex.x,t.x+s),this.vertex.y),this.owner.setVertex(this.index+1,i.x,this.vertex.y);break;case r.default.geo.Rectangle.DIRECTION_LEFT:this.owner.setVertex(this.index-1,u(this.vertex.x,t.x-s),e.y),this.owner.setVertex(this.index,u(this.vertex.x,t.x-s),this.vertex.y),this.owner.setVertex(this.index+1,i.x,this.vertex.y)}else if(this.index-l+3==0)switch(o){case r.default.geo.Rectangle.DIRECTION_UP:this.owner.setVertex(this.index-1,this.vertex.x,h(this.vertex.y,e.y)),this.owner.setVertex(this.index,this.vertex.x,u(this.vertex.y,d.y-s)),this.owner.setVertex(this.index+1,i.x,u(this.vertex.y,d.y-s));break;case r.default.geo.Rectangle.DIRECTION_DOWN:this.owner.setVertex(this.index-1,this.vertex.x,e.y),this.owner.setVertex(this.index,this.vertex.x,h(this.vertex.y,d.y+s)),this.owner.setVertex(this.index+1,i.x,h(this.vertex.y,d.y+s))}else this.owner.setVertex(this.index-1,this.vertex.x,e.y),this.owner.setVertex(this.index,this.vertex),this.owner.setVertex(this.index+1,i.x,this.vertex.y)}return this.relocate(),null!==this.command&&this.command.updateVertices(this.owner.getVertices().clone()),this.owner._routingMetaData.routedByUserInteraction=!0,!0},onDragEnd:function(t,e,n,r){return this.getCanvas().getCommandStack().execute(this.command),this.command=null,!0},relocate:function(){let t=this.getWidth()/2,e=this.getHeight()/2,n=this.owner.getVertices().get(this.index);n&&this.setPosition(n.x-t,n.y-e)}})},onSelect:function(t,e,n){this._super(t,e,n);let r=e.getVertices(),i=1;for(;i<r.getSize()-1;i++){let n=new this.ResizeHandle(e,i);e.selectionHandles.add(n),n.setDraggable(e.isResizeable()),n.show(t)}this.moved(t,e)},removeSegment:function(t,e){let n=t.getVertices().getSize()-1,i=t.getStartPoint(),s=t.getSource().getConnectionDirection(t.getTarget()),a=t.getEndPoint(),o=t.getTarget().getConnectionDirection(t.getSource()),c=t.getVertex(e-1),l=t.getVertex(e),h=t.getVertex(e+1),u=t.getVertex(e+2);if(l.y===h.y){let o=(l.x+h.x)/2;if(1===e)switch(s){case r.default.geo.Rectangle.DIRECTION_RIGHT:o=Math.max(o,i.x+10);break;case r.default.geo.Rectangle.DIRECTION_LEFT:o=Math.min(o,i.x-10);break;case r.default.geo.Rectangle.DIRECTION_UP:case r.default.geo.Rectangle.DIRECTION_DOWN:o=i.x}if(e===n-2)switch(s){case r.default.geo.Rectangle.DIRECTION_RIGHT:o=Math.max(o,a.x+10);break;case r.default.geo.Rectangle.DIRECTION_LEFT:o=Math.min(o,a.x-10);break;case r.default.geo.Rectangle.DIRECTION_UP:case r.default.geo.Rectangle.DIRECTION_DOWN:o=a.x}t.setVertex(e-1,new r.default.geo.Point(o,c.y)),t.setVertex(e+2,new r.default.geo.Point(o,u.y)),t.removeVertexAt(e),t.removeVertexAt(e),t._routingMetaData.routedByUserInteraction=!0}else if(l.x===h.x){let d=(l.y+h.y)/2;if(1===e)switch(s){case r.default.geo.Rectangle.DIRECTION_RIGHT:case r.default.geo.Rectangle.DIRECTION_LEFT:d=i.y;break;case r.default.geo.Rectangle.DIRECTION_UP:case r.default.geo.Rectangle.DIRECTION_DOWN:newX=i.x}if(e===n-2)switch(o){case r.default.geo.Rectangle.DIRECTION_RIGHT:case r.default.geo.Rectangle.DIRECTION_LEFT:d=a.y;break;case r.default.geo.Rectangle.DIRECTION_UP:case r.default.geo.Rectangle.DIRECTION_DOWN:newX=a.x}t.setVertex(e-1,new r.default.geo.Point(c.x,d)),t.setVertex(e+2,new r.default.geo.Point(u.x,d)),t.removeVertexAt(e),t.removeVertexAt(e),t._routingMetaData.routedByUserInteraction=!0}},splitSegment:function(t,e,n,i){let s=t.getVertices().getSize()-1,a=t.getVertex(e),o=t.getVertex(e+1),c=40;if(a.x===o.x)if(t._routingMetaData.routedByUserInteraction=!0,1===s){let n=a.getDistance(o)/4/2,s=new r.default.geo.Point(a.x,i-n),l=new r.default.geo.Point(o.x+c,i-n),h=new r.default.geo.Point(o.x+c,i+n),u=new r.default.geo.Point(o.x,i+n);t.insertVertexAt(e+1,s),t.insertVertexAt(e+2,l),t.insertVertexAt(e+3,h),t.insertVertexAt(e+4,u)}else{let n=new r.default.geo.Point(0,0),l=new r.default.geo.Point(0,0);0===e?(n.y=i,n.x=a.x,l.y=i,l.x=o.x+c,t.setVertex(e+1,new r.default.geo.Point(l.x,o.y))):e===s-1?(n.y=i,n.x=a.x-c,l.y=i,l.x=o.x,t.setVertex(e,new r.default.geo.Point(n.x,a.y))):(n.y=i,n.x=a.x-20,l.y=i,l.x=o.x+20,t.setVertex(e,new r.default.geo.Point(n.x,a.y)),t.setVertex(e+1,new r.default.geo.Point(l.x,o.y))),t.insertVertexAt(e+1,n),t.insertVertexAt(e+2,l)}else if(a.y==o.y)if(t._routingMetaData.routedByUserInteraction=!0,1===s){let i=a.getDistance(o)/4/2,s=new r.default.geo.Point(n-i,a.y),l=new r.default.geo.Point(n-i,a.y-c),h=new r.default.geo.Point(n+i,a.y-c),u=new r.default.geo.Point(n+i,a.y);t.insertVertexAt(e+1,s),t.insertVertexAt(e+2,l),t.insertVertexAt(e+3,h),t.insertVertexAt(e+4,u)}else{let i=new r.default.geo.Point(0,0),l=new r.default.geo.Point(0,0);0===e?(i.x=n,i.y=a.y,l.x=n,l.y=o.y+c,t.setVertex(e+1,new r.default.geo.Point(o.x,l.y))):e===s-1?(i.x=n,i.y=a.y-c,l.x=n,l.y=o.y,t.setVertex(e,new r.default.geo.Point(a.x,i.y))):(i.x=n,i.y=a.y-20,l.x=n,l.y=o.y+20,t.setVertex(e,new r.default.geo.Point(a.x,i.y)),t.setVertex(e+1,new r.default.geo.Point(o.x,l.y))),t.insertVertexAt(e+1,i),t.insertVertexAt(e+2,l)}},onRightMouseDown:function(t,e,n,i,s){let a=t.hitSegment(e,n),o={split:{name:r.default.Configuration.i18n.menu.addSegment}};null!==a&&(t.getRouter().canRemoveSegmentAt(t,a.index)&&(o.remove={name:r.default.Configuration.i18n.menu.deleteSegment}),$.contextMenu({selector:"body",events:{hide:function(){$.contextMenu("destroy")}},callback:(i,s)=>{switch(i){case"remove":{let e=t.getVertices().clone(!0);this.removeSegment(t,a.index);let n=t.getVertices().clone(!0);t.getCanvas().getCommandStack().execute(new r.default.command.CommandReplaceVertices(t,e,n))}break;case"split":{let i=t.getVertices().clone(!0);this.splitSegment(t,a.index,e,n);let s=t.getVertices().clone(!0);t.getCanvas().getCommandStack().execute(new r.default.command.CommandReplaceVertices(t,i,s))}}},x:e,y:n,items:o}))}})},"./src/policy/line/VertexSelectionFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.line.VertexSelectionFeedbackPolicy=i.default.policy.line.LineSelectionFeedbackPolicy.extend({NAME:"draw2d.policy.line.VertexSelectionFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onSelect:function(t,e,n){let r=new i.default.shape.basic.LineStartResizeHandle(e),s=new i.default.shape.basic.LineEndResizeHandle(e);e.selectionHandles.add(r),e.selectionHandles.add(s);let a=e.getVertices().getSize()-1,o=1;for(;o<a;o++)e.selectionHandles.add(new i.default.shape.basic.VertexResizeHandle(e,o)),e.selectionHandles.add(new i.default.shape.basic.GhostVertexResizeHandle(e,o-1));e.selectionHandles.add(new i.default.shape.basic.GhostVertexResizeHandle(e,o-1)),e.selectionHandles.each(((n,r)=>{r.setDraggable(e.isResizeable()),r.show(t)})),this.moved(t,e)}})},"./src/policy/port/ElasticStrapFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.port.ElasticStrapFeedbackPolicy=i.default.policy.port.PortFeedbackPolicy.extend({NAME:"draw2d.policy.port.ElasticStrapFeedbackPolicy",init:function(t,e,n){this._super(t,e,n),this.connectionLine=null},onDragStart:function(t,e,n,r,s,a){return this.connectionLine=new i.default.shape.basic.Line,this.connectionLine.setCanvas(t),this.connectionLine.getShapeElement(),this.onDrag(t,e),!0},onDrag:function(t,e){let n=e.ox+e.getParent().getAbsoluteX(),r=e.oy+e.getParent().getAbsoluteY();this.connectionLine.setStartPosition(n,r),this.connectionLine.setEndPosition(e.getAbsoluteX(),e.getAbsoluteY())},onDragEnd:function(t,e,n,r,i,s){this.connectionLine.setCanvas(null),this.connectionLine=null},onHoverEnter:function(t,e,n){this.connectionLine.setGlow(!0),n.setGlow(!0)},onHoverLeave:function(t,e,n){n.setGlow(!1),this.connectionLine.setGlow(!1)}})},"./src/policy/port/IntrusivePortsFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r},s=n("./node_modules/shifty/dist/shifty.js");i.default.policy.port.IntrusivePortsFeedbackPolicy=i.default.policy.port.PortFeedbackPolicy.extend({NAME:"draw2d.policy.port.IntrusivePortsFeedbackPolicy",init:function(t,e,n){this._super(t,e,n),this.connectionLine=null,this.tweenable=null,this.growFactor=2},onDragStart:function(t,e,n,r,a,o){let c=t.getAllPorts().clone();c.grep((function(t){return t.NAME!==e.NAME&&t.parent!==e.parent&&t.getSemanticGroup()===e.getSemanticGroup()||t instanceof i.default.HybridPort||e instanceof i.default.HybridPort}));let l=0;return c.each((function(t,e){void 0===e.__beforeInflate&&(e.__beforeInflate=e.getWidth()),l=e.__beforeInflate})),this.tweenable=new s.Tweenable,this.tweenable.tween({from:{size:l},to:{size:l*this.growFactor},duration:200,easing:"easeOutSine",step:function(t){c.each((function(e,n){n.shape.attr({rx:t.size/2,ry:t.size/2}),n.width=n.height=t.size,n.fireEvent("resize")}))}}),this.connectionLine=new i.default.shape.basic.Line,this.connectionLine.setCanvas(t),this.connectionLine.getShapeElement(),this.connectionLine.setDashArray("- "),this.connectionLine.setColor("#30c48a"),this.onDrag(t,e),!0},onDrag:function(t,e){let n=e.ox+e.getParent().getAbsoluteX(),r=e.oy+e.getParent().getAbsoluteY();this.connectionLine.setStartPosition(n,r),this.connectionLine.setEndPosition(e.getAbsoluteX(),e.getAbsoluteY())},onDragEnd:function(t,e,n,r,i,s){this.tweenable&&(this.tweenable.stop(!0),this.tweenable.dispose(),this.tweenable=null);let a=t.getAllPorts().clone();a.grep((function(t){return t.__beforeInflate})),a.each((function(t,e){e.shape.attr({rx:e.__beforeInflate/2,ry:e.__beforeInflate/2}),e.width=e.height=e.__beforeInflate,delete e.__beforeInflate})),this.connectionLine.setCanvas(null),this.connectionLine=null},onHoverEnter:function(t,e,n){this.connectionLine.setGlow(!0),n.setGlow(!0)},onHoverLeave:function(t,e,n){n.setGlow(!1),this.connectionLine,this.connectionLine.setGlow(!1)}})},"./src/policy/port/PortFeedbackPolicy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.policy.port.PortFeedbackPolicy=i.default.policy.figure.DragDropEditPolicy.extend({NAME:"draw2d.policy.port.PortFeedbackPolicy",init:function(t,e,n){this._super(t,e,n)},onHoverEnter:function(t,e,n){},onHoverLeave:function(t,e,n){}})},"./src/shape/analog/OpAmp.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.analog.OpAmp=i.default.SVGFigure.extend({NAME:"draw2d.shape.analog.OpAmp",MyInputPortLocator:i.default.layout.locator.PortLocator.extend({init:function(){this._super()},relocate:function(t,e){let n=(8+18.5*t)*e.getParent().scaleY;this.applyConsiderRotation(e,1,n)}}),init:function(t,e,n){this._super(extend({stroke:0,bgColor:"#f0f0ff"},t),e,n),this.inputLocator=new this.MyInputPortLocator,this.createPort("input",this.inputLocator),this.createPort("input",this.inputLocator),this.createPort("output")},getSVG:function(){return'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="50" height="50"><path d="m8.2627,0l0,35.36035l31.23926,-17.76025l-31.23926,-17.60011l0,0l0,0.00001zm2.27832,27.36719l4.08105,0m-2.10449,-2.20703l0,4.27979m2.26367,-21.35938l-4.15918,0" stroke="#1B1B1B" fill="none"/><line x1="0.53516" y1="8" x2="8.21191" y2="8" stroke="#010101"/><line x1="39.14941" y1="18" x2="45.81055" y2="18" stroke="#010101" /><line x1="0.53516" y1="27" x2="8.21191" y2="27" stroke="#010101" /></svg>'},repaint:function(t){if(!0!==this.repaintBlocked&&null!==this.shape)return t??={},t.fill="none",null!=this.bgColor&&this.svgNodes[0].attr({fill:this.bgColor.rgba()}),this._super(t),this}})},"./src/shape/analog/ResistorBridge.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.analog.ResistorBridge=i.default.SVGFigure.extend({NAME:"draw2d.shape.analog.ResistorBridge",MyInputPortLocator:i.default.layout.locator.PortLocator.extend({init:function(){this._super()},relocate:function(t,e){let n=e.getParent().getWidth(),r=e.getParent().getHeight();this.applyConsiderRotation(e,n/2+1,r*t)}}),MyOutputPortLocator:i.default.layout.locator.PortLocator.extend({init:function(){this._super()},relocate:function(t,e){let n=e.getParent().getWidth(),r=e.getParent().getHeight();this.applyConsiderRotation(e,n*(t-2),r/2)}}),init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n),this.inputLocator=new this.MyInputPortLocator,this.outputLocator=new this.MyOutputPortLocator,this.createPort("hybrid",this.inputLocator),this.createPort("hybrid",this.inputLocator),this.createPort("hybrid",this.outputLocator),this.createPort("hybrid",this.outputLocator)},getSVG:function(){return'<svg xmlns="http://www.w3.org/2000/svg" version="1.1"><path fill="#010101" stroke="#010101" stroke-miterlimit="14.3" id="path12322" d="m47.62207,22.71094l0,0c0.73145,0.73242 0.71777,1.93359 -0.03027,2.68164c-0.74805,0.74951 -1.94922,0.76123 -2.68073,0.0293c-0.73138,-0.73242 -0.71967,-1.93211 0.03033,-2.68115c0.74707,-0.74803 1.94727,-0.76219 2.68066,-0.02979l0,0z"/><path fill="#010101" stroke="#010101" stroke-miterlimit="14.3" id="path12324" d="m25.84082,0.93115l0,0c0.73145,0.73096 0.71875,1.93359 -0.02832,2.68066c-0.75,0.74951 -1.94922,0.76123 -2.68164,0.0293c-0.73242,-0.73241 -0.71973,-1.93164 0.0293,-2.68065c0.74805,-0.74756 1.94922,-0.76172 2.68066,-0.0293l0,0l0,-0.00002z"/><path fill="#010101" stroke="#010101" stroke-miterlimit="14.3" id="path12326" d="m25.75098,44.58203l0,0c0.73145,0.73193 0.71875,1.93311 -0.02832,2.68115c-0.75,0.74902 -1.94922,0.76074 -2.68262,0.0293c-0.73145,-0.73193 -0.71973,-1.93262 0.03033,-2.68164c0.74707,-0.74756 1.94922,-0.76123 2.68066,-0.02879l0,0l-0.00006,-0.00002z"/><path fill="#010101" stroke="#010101" stroke-miterlimit="14.3" id="path12328" d="m3.9707,22.80127l0,0c0.73242,0.73193 0.71777,1.93359 -0.0293,2.68115c-0.74902,0.74951 -1.94922,0.76172 -2.68164,0.0293c-0.73145,-0.73242 -0.71973,-1.93164 0.03027,-2.68115c0.74707,-0.74707 1.94922,-0.76074 2.68066,-0.0293l0,0z"/><polyline fill="none" stroke="#010101" id="polyline12334" points="24.908203125,45.49267578125 31.71875,38.68310546875 31.2119140625,36.98876953125 34.892578125,37.95703125 33.953125,34.22265625 37.6650390625,35.18359375 36.6767578125,31.52490234375 40.3759765625,32.47314453125 39.873046875,30.52783203125 45.884765625,24.51708984375 " stroke-miterlimit="14.3"/><polyline fill="#010101" id="polyline12338" points="36.3408203125,23.98876953125 38.146484375,29.55810546875 33.630859375,29.55810546875 35.435546875,23.98779296875 "/><line fill="none" stroke="#010101" id="line12340" y2="28.90967" x2="35.8877" y1="41.13428" x1="35.88867" stroke-miterlimit="14.3"/><polyline fill="none" stroke="#010101" id="polyline12346" points="3.2109375,23.79248046875 10.01953125,16.98388671875 9.513671875,15.2890625 13.193359375,16.25732421875 12.251953125,12.5234375 15.9658203125,13.48486328125 14.9775390625,9.82568359375 18.6767578125,10.7734375 18.173828125,8.82958984375 24.185546875,2.81787109375 " stroke-miterlimit="14.3"/><polyline fill="#010101" id="polyline12350" points="13.126953125,23.80419921875 11.3212890625,18.236328125 15.8369140625,18.236328125 14.0322265625,23.806640625 "/><line fill="none" stroke="#010101" id="line12352" y2="18.8833" x2="13.58008" y1="6.65967" x1="13.5791" stroke-miterlimit="14.3"/><polyline fill="none" stroke="#010101" id="polyline12358" points="46.65625,24.33642578125 39.84765625,17.52783203125 38.154296875,18.033203125 39.1220703125,14.353515625 35.3876953125,15.29345703125 36.34765625,11.58056640625 32.689453125,12.56884765625 33.6376953125,8.86865234375 31.6923828125,9.373046875 24.322265625,2.00341796875 " stroke-miterlimit="14.3"/><polyline fill="#010101" id="polyline12362" points="36.578125,1.87109375 38.3828125,7.439453125 33.8681640625,7.439453125 35.6728515625,1.869140625 "/><line fill="none" stroke="#010101" id="line12364" y2="6.7915" x2="36.125" y1="19.01758" x1="36.125" stroke-miterlimit="14.3"/><polyline fill="none" stroke="#010101" id="polyline12370" points="24.494140625,46.49951171875 17.685546875,39.69091796875 15.9921875,40.1953125 16.958984375,36.515625 13.2265625,37.45556640625 14.185546875,33.7421875 10.52734375,34.73193359375 11.474609375,31.03125 9.529296875,31.53515625 2.1611328125,24.166015625 " stroke-miterlimit="14.3"/><polyline fill="#010101" id="polyline12374" points="12.150390625,44.80029296875 10.34765625,39.23193359375 14.861328125,39.23095703125 13.0556640625,44.80224609375 "/><line fill="none" stroke="#010101" id="line12376" y2="39.87891" x2="12.60352" y1="27.6543" x1="12.60352" stroke-miterlimit="14.3"/></svg>'}})},"./src/shape/analog/ResistorVertical.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.analog.ResistorVertical=i.default.SetFigure.extend({NAME:"draw2d.shape.analog.ResistorVertical",MyInputPortLocator:i.default.layout.locator.PortLocator.extend({init:function(){this._super()},relocate:function(t,e){let n=e.getParent().getWidth(),r=e.getParent().getHeight();this.applyConsiderRotation(e,n/2,r)}}),MyOutputPortLocator:i.default.layout.locator.PortLocator.extend({init:function(){this._super()},relocate:function(t,e){let n=e.getParent().getWidth();this.applyConsiderRotation(e,n/2,0)}}),init:function(t,e,n){this._super(extend({width:30,height:50,bgColor:null},t),e,n),this.inputLocator=new this.MyInputPortLocator,this.outputLocator=new this.MyOutputPortLocator,this.createPort("hybrid",this.inputLocator),this.createPort("hybrid",this.outputLocator)},createSet:function(){let t=this._super();return t.push(this.canvas.paper.path("M15,0 L15,5 L0,7.5 L30,10 L0,15 L30,20 L0,25 L30,30 L15,32.5 L15,40")),t}})},"./src/shape/analog/VoltageSupplyHorizontal.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.analog.VoltageSupplyHorizontal=i.default.SVGFigure.extend({NAME:"draw2d.shape.analog.VoltageSupplyHorizontal",MyInputPortLocator:i.default.layout.locator.PortLocator.extend({init:function(){this._super()},relocate:function(t,e){let n=e.getParent().getHeight();this.applyConsiderRotation(e,0,n/2)}}),MyOutputPortLocator:i.default.layout.locator.PortLocator.extend({init:function(){this._super()},relocate:function(t,e){let n=e.getParent().getWidth(),r=e.getParent().getHeight();this.applyConsiderRotation(e,n,r/2)}}),init:function(t,e,n){this._super(extend({width:50,height:30},t),e,n),this.createPort("hybrid",new this.MyInputPortLocator),this.createPort("hybrid",new this.MyOutputPortLocator)},getSVG:function(){return'<svg width="49" height="28" xmlns="http://www.w3.org/2000/svg" version="1.1"><path d="m24.99933,18.95592l0,-9.54576m-5.78374,-9.40907l0,28.35939m-5.78718,-9.40457l0,-9.54576m-5.78374,-9.40907l0,28.35939" id="path10566" stroke-miterlimit="14.3" stroke="#010101" fill="none"/><path d="m26.79878,14.13039l6.90583,0m-33.22691,0l6.90583,0" id="path10568" stroke-miterlimit="14.3" stroke-linecap="square" stroke="#010101" fill="none"/></svg>'}})},"./src/shape/analog/VoltageSupplyVertical.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.analog.VoltageSupplyVertical=i.default.SVGFigure.extend({NAME:"draw2d.shape.analog.VoltageSupplyVertical",MyInputPortLocator:i.default.layout.locator.PortLocator.extend({init:function(){this._super()},relocate:function(t,e){let n=e.getParent().getWidth(),r=e.getParent().getHeight();this.applyConsiderRotation(e,n/2,r)}}),MyOutputPortLocator:i.default.layout.locator.PortLocator.extend({init:function(){this._super()},relocate:function(t,e){let n=e.getParent().getWidth();this.applyConsiderRotation(e,n/2,0)}}),init:function(t,e,n){this._super(extend({width:30,height:50},t),e,n),this.inputLocator=new this.MyInputPortLocator,this.outputLocator=new this.MyOutputPortLocator,this.createPort("hybrid",this.inputLocator),this.createPort("hybrid",this.outputLocator)},getSVG:function(){return'<svg xmlns="http://www.w3.org/2000/svg" version="1.1"><path d="m19.62398,12.37594l-9.87926,0m-9.74355,8.22145l29.36289,0m-9.74007,8.22469l-9.87927,0m-9.74355,8.22145l29.36289,0" id="path10560" stroke-miterlimit="14.3" stroke="#010101" fill="none"/><path d="m14.63157,9.81646l0,-9.81646m0,47.2328l0,-9.81646" id="path10562" stroke-miterlimit="14.3" stroke-linecap="square" stroke="#010101" fill="none"/></svg>'}})},"./src/shape/arrow/CalligrapherArrowDownLeft.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.arrow.CalligrapherArrowDownLeft=i.default.SVGFigure.extend({NAME:"draw2d.shape.arrow.CalligrapherArrowDownLeft",init:function(t,e,n){this._super(t)},getSVG:function(){return'<svg width="180" height="300" xmlns="http://www.w3.org/2000/svg" version="1.1"> <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path3084" d="m 159.63578,17.846597 c 0.43137,9.44641 -0.0636,18.88035 -0.8284,28.30165 c -1.73211,18.38336 -4.05381,36.71698 -6.08253,55.075313 c -1.61738,13.7075 -3.03402,27.43467 -3.97611,41.19113 c -1.09101,11.16584 -1.31019,22.36559 -1.28541,33.56466 c -0.1328,4.82188 0.3218,9.6468 0.14332,14.46812 c -0.0888,2.39977 -0.28315,3.73625 -0.55012,6.12095 c -0.85848,4.73147 -2.27416,9.40019 -4.7769,13.68272 c -1.47003,2.51544 -3.78493,5.6647 -5.47739,8.05048 c -5.02888,6.66256 -11.08555,12.65652 -18.10552,17.75963 c -4.23302,3.07716 -7.74942,5.12065 -12.22081,7.86298 c -13.253319,6.72606 -25.889792,15.11686 -40.84124,18.60576 c -3.016829,0.7039 -4.431417,0.8157 -7.450859,1.2076 c -6.983246,0.5774 -14.009174,0.3375 -21.010676,0.2509 c -3.278795,-0.033 -6.55749,0.01 -9.835897,0.045 c 0,0 20.838833,-13.2364 20.838833,-13.2364 l 0,0 c 3.147056,0.093 6.294483,0.1852 9.443646,0.2007 c 6.966697,0.011 13.971433,0.1301 20.897176,-0.6344 c 3.732439,-0.5577 7.321215,-1.2431 10.881203,-2.4145 c 1.517208,-0.4992 5.830867,-2.43339 4.487902,-1.6386 c -6.098183,3.6088 -25.104875,12.8748 -9.52514,5.223 c 4.40875,-2.5927 8.262057,-4.7459 12.425175,-7.65986 c 6.839117,-4.78709 12.633657,-10.50427 17.500607,-16.86761 c 2.53518,-3.56692 5.24684,-7.12748 7.07617,-11.03446 c 1.42357,-3.0404 2.21532,-6.28727 2.91146,-9.50152 c 0.91919,-6.88822 1.03991,-13.81392 1.25118,-20.74151 c 0.47683,-11.27871 0.96259,-22.55877 1.61689,-33.83062 c 1.21127,-14.03392 3.64191,-27.94339 5.46543,-41.92167 c 2.26899,-18.186603 4.6835,-36.384373 5.4487,-54.679643 c 0.0788,-2.46092 0.23808,-4.92087 0.23618,-7.38276 c -0.005,-6.45916 -0.62194,-13.00218 -2.13821,-19.32664 c 0,0 23.48134,-10.73998 23.48134,-10.73998 z" inkscape:connector-curvature="0" /> <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path3086" d="m 41.271518,252.40239 c 2.465518,-0.7264 4.879503,-1.7726 7.145328,-2.9859 c 0.955597,-0.5117 3.736822,-2.1986 2.791991,-1.6673 c -5.218817,2.9348 -10.409826,5.9187 -15.61474,8.878 c 5.366557,-3.4898 10.227818,-7.6685 14.119927,-12.75576 c 3.507157,-5.09382 4.097613,-11.17122 4.301158,-17.17644 c 0.02635,-3.95844 -0.31227,-7.90612 -0.635377,-11.84752 c 0,0 19.920693,-10.3059 19.920693,-10.3059 l 0,0 c 0.171761,4.05015 0.409899,8.09777 0.50079,12.15101 c -0.185739,6.23619 -0.347804,12.66862 -3.492579,18.24747 c -0.503375,0.75197 -0.961922,1.53596 -1.510126,2.25591 c -3.478528,4.56826 -8.226837,8.04586 -12.757403,11.47443 c -7.345206,4.3297 -14.671333,8.692 -22.035619,12.9891 c -3.551305,2.0723 -7.368692,3.8726 -11.394645,4.7773 c 0,0 18.660602,-14.0344 18.660602,-14.0344 z" inkscape:connector-curvature="0" /> <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path3088" d="m 37.815923,255.49919 c 3.41111,0.1581 6.814569,0.2213 10.182693,0.8184 c 6.92998,2.6928 13.533527,6.2357 20.043462,9.8162 c 3.912139,2.1362 7.91195,4.4644 10.690321,8.0298 c 1.039962,1.2802 1.510411,2.7604 1.893523,4.3313 c 0,0 -20.370847,10.9259 -20.370847,10.9259 l 0,0 c -0.225419,-1.2711 -0.55067,-2.4558 -1.329618,-3.5184 c -2.332229,-3.3633 -5.869056,-5.6279 -9.247191,-7.8233 c -6.335066,-3.7106 -12.98611,-7.1834 -20.232784,-8.6836 c -3.497247,-0.3814 -7.011372,-0.4307 -10.521829,-0.1703 c 0,0 18.89227,-13.726 18.89227,-13.726 z" inkscape:connector-curvature="0" /></svg>'},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(this.svgNodes?.attr({fill:this.color.rgba()}),this._super(t))}})},"./src/shape/arrow/CalligrapherArrowLeft.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.arrow.CalligrapherArrowLeft=i.default.SVGFigure.extend({NAME:"draw2d.shape.arrow.CalligrapherArrowLeft",init:function(t,e,n){this._super(t)},getSVG:function(){return'<svg width="230" height="60" xmlns="http://www.w3.org/2000/svg" version="1.1"> <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path3024" d="m 218.87943,27.464763 c -1.21088,-0.0563 -2.42064,-0.14616 -3.63262,-0.16893 c -5.82495,-0.10948 -18.61676,-0.0226 -22.97385,0.0122 c -7.12848,0.057 -14.25673,0.14021 -21.38495,0.22333 c -9.03765,0.10539 -18.07511,0.22813 -27.11266,0.3422 c -10.2269,0.11878 -20.4538,0.23756 -30.6807,0.35634 c -35.488759,0.4089 -70.975849,0.82793 -106.4669238,0.95195 c 0,0 7.9718628,-5.70244 7.9718628,-5.70244 l 0,0 c 6.374241,0.28694 12.745594,0.64561 19.122722,0.86083 c 28.09499,0.94816 56.21338,0.92473 84.315959,0.32205 c 10.51273,-0.32805 21.0288,-0.56402 31.53819,-0.98412 c 27.47361,-1.09824 54.91405,-2.91665 82.28177,-5.53697 c 0,0 -12.9788,9.32351 -12.9788,9.32351 z" inkscape:connector-curvature="0" /> <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path3026" d="m 100.75066,1.6309831 c -7.165239,3.9571 -14.284929,7.47866 -22.036659,10.2707299 c -5.00195,1.80163 -10.10374,3.31886 -15.2402,4.79424 c -8.25878,2.37815 -16.55626,4.65805 -24.9012,6.79479 c -2.89107,0.71593 -5.74687,1.56407 -8.66266,2.20424 c -3.211679,0.70512 -6.49468,1.17333 -9.752959,1.6747 c -5.447101,0.92112 -10.9044008,1.81762 -16.3983488,2.50082 c -1.608931,0.0814 -0.850754,0.10697 -2.275834,-0.0365 C 20.004071,21.041553 19.256899,21.517873 32.515691,19.216243 c 6.21537,-1.05913 12.34875,-2.37668 18.3945,-4.03234 c 8.12719,-2.02803 16.23765,-4.1157 24.26421,-6.4321199 c 5.23574,-1.55053 10.41682,-3.15473 15.46857,-5.12875 c 1.38953,-0.54295 2.7579,-1.12682 4.12253,-1.71603 c 0.98421,-0.42496 3.86537,-1.81801999 2.92296,-1.32600999 C 93.642191,2.6934931 89.529511,4.7073031 85.450031,6.7704531 l 15.300629,-5.1394 z" inkscape:connector-curvature="0" sodipodi:nodetypes="csccsccccccsssccc" /> <path style="fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none" id="path3028" d="m 80.764281,58.068863 c -2.45498,-3.50762 -6.58178,-6.10525 -10.40324,-8.66732 c -4.30614,-2.72676 -7.93958,-6.28283 -12.6021,-8.28702 c -7.39912,-4.50257 -11.70055,-7.85592 -20.85866,-9.23429 c -4.9257,-0.85706 -17.294247,-1.32043 -22.226462,-2.15427 c -3.445882,-0.42869 -6.2035918,0.70541 -9.6845138,0.57715 c -1.496337,-0.0586 -2.99355,-0.0965 -4.491229,-0.12472 l 13.9525278,-6.24562 l 3.25,-1.17153 c 1.441459,0.0813 -1.116338,0.15309 0.325505,0.23016 c 3.574557,0.17902 7.211864,0.0695 10.712655,0.73822 c 4.723107,1.08097 9.443947,2.1624 14.234177,3.05317 c 2.76739,0.64203 3.92627,0.87082 6.64127,1.66289 c 4.42146,1.28993 8.60075,3.01513 12.86503,4.58129 c 1.90199,0.73446 5.05193,1.93181 6.89302,2.7216 c 4.92005,2.11061 9.5916,4.57045 13.9716,7.31023 c 4.16708,2.62011 8.48023,5.20033 11.72012,8.56863 z" inkscape:connector-curvature="0" sodipodi:nodetypes="ccccccccccccscsccc" /></svg>'},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(null!==this.svgNodes&&this.svgNodes.attr({fill:this.color.rgba()}),this._super(t))}})},"./src/shape/basic/Arc.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.Arc=i.default.SetFigure.extend({NAME:"draw2d.shape.basic.Arc",init:function(t,e,n){this.startAngle=180,this.endAngle=360,this._super({width:80,height:50,bgColor:null,color:"#1B1B1B",...t},e,n),this.strokeScale=!1},createSet:function(){this.canvas.paper.setStart();let t=this.endAngle-this.startAngle>180,e=this.startAngle%360*Math.PI/180,n=this.endAngle%360*Math.PI/180,r=this.getWidth()/2,i=this.getHeight()/2;return this.canvas.paper.path([["M",r,i,"l",r*Math.cos(e),i*Math.sin(e),"A",r,i,0,+t,1,r+r*Math.cos(n),i+i*Math.sin(n),"z"]].join("")).attr({fill:"#fff0f0"}),this.canvas.paper.setFinish()}})},"./src/shape/basic/Circle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.Circle=i.default.shape.basic.Oval.extend({NAME:"draw2d.shape.basic.Circle",init:function(t,e,n){this._super(t,{diameter:this.setDiameter,radius:this.setRadius,...e},{diameter:this.getDiameter,radius:this.getRadius,...n}),this.setKeepAspectRatio(!0)},setDiameter:function(t){let e=this.getCenter();return this.setDimension(t,t),this.setCenter(e),this.fireEvent("change:diameter",{value:t}),this},getDiameter:function(){return this.getWidth()},setRadius:function(t){return this.setDiameter(2*t),this.fireEvent("change:radius",{value:t}),this},getRadius:function(){return this.getWidth()/2},getPersistentAttributes:function(){let t=this._super();return delete t.radius,t}})},"./src/shape/basic/Diamond.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.Diamond=i.default.shape.basic.Polygon.extend({NAME:"draw2d.shape.basic.Diamond",init:function(t,e,n){this._super(extend({bgColor:"#00a3f6",color:"#1B1B1B"},t),e,n);let r=this.getPosition();this.resetVertices();let s=this.getBoundingBox();this.addVertex(s.w/2,0),this.addVertex(s.w,s.h/2),this.addVertex(s.w/2,s.h),this.addVertex(0,s.h/2),this.installEditPolicy(new i.default.policy.figure.RectangleSelectionFeedbackPolicy),this.setPosition(r)}})},"./src/shape/basic/GhostVertexResizeHandle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.GhostVertexResizeHandle=i.default.shape.basic.LineResizeHandle.extend({NAME:"draw2d.shape.basic.GhostVertexResizeHandle",init:function(t,e){this.maxOpacity=.35,this.precursorIndex=e,this._super({owner:t,opacity:this.maxOpacity})},createShapeElement:function(){let t=this._super();return t.attr({cursor:"pointer"}),t},setAlpha:function(t){return this._super(Math.min(this.maxOpacity,Math.max(0,parseFloat(t)))),this},onClick:function(){let t=new i.default.command.CommandAddVertex(this.owner,this.precursorIndex+1,this.getAbsoluteX()+this.getWidth()/2,this.getAbsoluteY()+this.getHeight()/2);this.getCanvas().getCommandStack().execute(t)},onDragStart:function(t,e,n,r){return!0},onDrag:function(t,e,n,r){return!0},onDragEnd:function(t,e,n,r){return this.fireEvent("dragend",{x:t,y:e,shiftKey:n,ctrlKey:r}),!0},relocate:function(){let t=this.owner.getVertices().get(this.precursorIndex),e=this.owner.getVertices().get(this.precursorIndex+1);this.setPosition((e.x-t.x)/2+t.x-this.getWidth()/2,(e.y-t.y)/2+t.y-this.getHeight()/2)}})},"./src/shape/basic/Image.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.Image=i.default.shape.node.Node.extend({NAME:"draw2d.shape.basic.Image",init:function(t,e,n){this._super(t,{path:this.setPath,...e},{path:this.getPath,...n})},setPath:function(t){return this.path=t,this.shape?.attr({src:this.path}),this.fireEvent("change:path",{value:this.path}),this},getPath:function(){return this.path},repaint:function(t){return!0===this.repaintBlocked||null===this.shape||(t??={},t.x=this.getAbsoluteX(),t.y=this.getAbsoluteY(),t.width=this.getWidth(),t.height=this.getHeight(),t.src=this.path,$(this.shape.node).css({display:"inline-block",width:t.width,height:t.height}),this._super(t)),this},createShapeElement:function(){return this.canvas.paper.image(this.path,this.getX(),this.getY(),this.getWidth(),this.getHeight())},getPersistentAttributes:function(){return{...this._super(),path:this.path}},setPersistentAttributes:function(t){this._super(t),void 0!==t.path&&this.setPath(t.path)}})},"./src/shape/basic/Label.js":(t,e,n)=>{"use strict";var r=s(n("./src/packages.js")),i=s(n("./src/util/JSONUtil.js"));function s(t){return t&&t.__esModule?t:{default:t}}r.default.shape.basic.Label=r.default.SetFigure.extend({NAME:"draw2d.shape.basic.Label",FONT_FALLBACK:{Georgia:"Georgia, serif","Palatino Linotype":'"Palatino Linotype", "Book Antiqua", Palatino, serif',"Times New Roman":'"Times New Roman", Times, serif',Arial:"Arial, Helvetica, sans-serif","Arial Black":'"Arial Black", Gadget, sans-serif',"Comic Sans MS":'"Comic Sans MS", cursive, sans-serif',Impact:"Impact, Charcoal, sans-serif","Lucida Sans Unicode":'"Lucida Sans Unicode", "Lucida Grande", sans-serif',"Tahoma, Geneva":"Tahoma, Geneva, sans-seri","Trebuchet MS":'"Trebuchet MS", Helvetica, sans-serif',Verdana:"Verdana, Geneva, sans-serif","Courier New":'"Courier New", Courier, monospace',"Lucida Console":'"Lucida Console", Monaco, monospace'},init:function(t,e,n){this.text="",this.cachedWidth=null,this.cachedHeight=null,this.cachedMinWidth=null,this.cachedMinHeight=null,this.fontSize=12,this.fontColor=new r.default.util.Color("#080808"),this.fontFamily=null,this.padding={top:4,right:4,bottom:4,left:4},this.outlineStroke=0,this.outlineColor=new r.default.util.Color(null),this.textAlign="start",this.bold=!1,this.editor=null,this._super({stroke:1,width:1,height:1,resizeable:!1,...t},{text:this.setText,editor:this.installEditor,outlineStroke:this.setOutlineStroke,outlineColor:this.setOutlineColor,fontFamily:this.setFontFamily,fontSize:this.setFontSize,fontColor:this.setFontColor,padding:this.setPadding,bold:this.setBold,textAlign:this.textAlign,...e},{text:this.getText,outlineStroke:this.getOutlineStroke,outlineColor:this.getOutlineColor,fontFamily:this.getFontFamily,fontSize:this.getFontSize,fontColor:this.getFontColor,padding:this.getPadding,bold:this.isBold,textAlign:this.textAlign,...n}),this.installEditPolicy(new r.default.policy.figure.AntSelectionFeedbackPolicy),this.lastAppliedLabelRotation="",this.lastAppliedTextAttributes={}},createSet:function(){return this.canvas.paper.set([this.canvas.paper.text(0,0,this.text)])},setCanvas:function(t){this.clearCache(),this._super(t),this.clearCache()},repaint:function(t){if(!0===this.repaintBlocked||null===this.shape||this.parent&&!0===this.parent.repaintBlocked)return;let e=this.calculateTextAttr();e.text=this.text;let n=i.default.flatDiff(e,this.lastAppliedTextAttributes);this.lastAppliedTextAttributes=e,Object.getOwnPropertyNames(n).length>0&&(this.svgNodes.attr(e),this.svgNodes.attr({x:this.padding.left+this.stroke,y:this.svgNodes.getBBox(!0).height/2+this.padding.top+this.getStroke()})),this._super(t)},calculateTextAttr:function(){let t={"text-anchor":this.textAlign,"font-size":this.fontSize,"font-weight":!0===this.bold?"bold":"normal",fill:this.fontColor.rgba(),stroke:this.outlineColor.rgba(),"stroke-width":this.outlineStroke};return null!==this.fontFamily&&(t["font-family"]=this.fontFamily),t},applyTransformation:function(){let t="R"+this.rotationAngle;return this.shape.transform(t),this.lastAppliedLabelRotation=t,this.svgNodes.transform("R"+this.rotationAngle+"T"+this.getAbsoluteX()+","+this.getAbsoluteY()),this},setFontSize:function(t){return this.clearCache(),this.fontSize=t,this.repaint(),this.fireEvent("change:fontSize",{value:this.fontSize}),this.fireEvent("resize"),this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this},getTextAlign:function(){return this.textAlign},setTextAlign:function(t){return this.clearCache(),this.textAlign=t,this.repaint(),this.fireEvent("change:textAlign",{value:this.textAlign}),this.fireEvent("resize"),this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this},setBold:function(t){return this.clearCache(),this.bold=t,this.repaint(),this.fireEvent("change:bold",{value:this.bold}),this.fireEvent("resize"),this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this},isBold:function(){return this.bold},setOutlineColor:function(t){return this.outlineColor=new r.default.util.Color(t),this.repaint(),this.fireEvent("change:outlineColor",{value:this.outlineColor}),this},getOutlineColor:function(){return this.outlineColor},setOutlineStroke:function(t){return this.outlineStroke=t,this.repaint(),this.fireEvent("change:outlineStroke",{value:this.outlineStroke}),this},getOutlineStroke:function(){return this.outlineStroke},setFontColor:function(t){return this.fontColor=new r.default.util.Color(t),this.repaint(),this.fireEvent("change:fontColor",{value:this.fontColor}),this},getFontColor:function(){return this.fontColor},setPadding:function(t){return this.clearCache(),this.padding="number"==typeof t?{top:t,right:t,bottom:t,left:t}:{...this.padding,...t},this.repaint(),this.fireEvent("change:padding",{value:this.padding}),this},getPadding:function(){return this.padding},setFontFamily:function(t){return this.clearCache(),null!=t&&void 0!==this.FONT_FALLBACK[t]&&(t=this.FONT_FALLBACK[t]),this.fontFamily=t,this.repaint(),this.fireEvent("change:fontFamily",{value:this.fontFamily}),this},getFontFamily:function(){return this.fontFamily},setDimension:function(t,e){return this.clearCache(),this._super(t,e),this},clearCache:function(){return this.portRelayoutRequired=!0,this.cachedMinWidth=null,this.cachedMinHeight=null,this.cachedWidth=null,this.cachedHeight=null,this.lastAppliedTextAttributes={},this},getMinWidth:function(){return null===this.shape?0:(this.cachedMinWidth??=this.svgNodes.getBBox(!0).width+this.padding.left+this.padding.right+2*this.getStroke(),this.cachedMinWidth)},getMinHeight:function(){return null===this.shape?0:(this.cachedMinHeight??=this.svgNodes.getBBox(!0).height+this.padding.top+this.padding.bottom+2*this.getStroke(),this.cachedMinHeight)},getWidth:function(){return null===this.shape?0:(null===this.cachedWidth&&(!0===this.resizeable?this.cachedWidth=Math.max(this.width,this.getMinWidth()):this.cachedWidth=this.getMinWidth()),this.cachedWidth)},getHeight:function(){return null===this.shape?0:(this.cachedHeight??=Math.max(this.height,this.getMinHeight()),this.cachedHeight)},installEditor:function(t){return"string"==typeof t&&(t=Function(`return new ${t}()`)()),this.editor=t,this},onDoubleClick:function(){this.editor?.start(this)},getText:function(){return this.text},setText:function(t){return this.clearCache(),this.text=t,this.repaint(),this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this.fireEvent("resize"),this.fireEvent("change:text",{value:this.text}),this.parent?.repaint(),this},hitTest:function(t,e,n){if(0===this.rotationAngle)return this._super(t,e,n);let r=this.getBoundingBox();"number"==typeof n&&r.scale(n,n);let i=this.shape.matrix,s=r.getVertices();s.each(((t,e)=>{e.x=i.x(e.x,e.y),e.y=i.y(e.x,e.y)}));let a=3,o=!1;for(let n=0;n<4;n++){let r=s.get(n),i=s.get(a);(r.y<e&&i.y>=e||i.y<e&&r.y>=e)&&(r.x<=t||i.x<=t)&&r.x+(e-r.y)/(i.y-r.y)*(i.x-r.x)<t&&(o=!o),a=n}return o},getPersistentAttributes:function(){let t=this._super();return t.text=this.text,t.outlineStroke=this.outlineStroke,t.outlineColor=this.outlineColor.rgba(),t.fontSize=this.fontSize,t.fontColor=this.fontColor.rgba(),t.fontFamily=this.fontFamily,t.bold=this.bold,null!==this.editor&&(t.editor=this.editor.NAME),t},setPersistentAttributes:function(t){return this._super(t),void 0!==t.text&&this.setText(t.text),void 0!==t.outlineStroke&&this.setOutlineStroke(t.outlineStroke),void 0!==t.outlineColor&&this.setOutlineColor(t.outlineColor),void 0!==t.fontFamily&&this.setFontFamily(t.fontFamily),void 0!==t.fontSize&&this.setFontSize(t.fontSize),void 0!==t.fontColor&&this.setFontColor(t.fontColor),void 0!==t.bold&&this.setBold(t.bold),"string"==typeof t.editor&&this.installEditor(Function(`return new ${t.editor}()`)()),this}})},"./src/shape/basic/Line.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.Line=i.default.Figure.extend({NAME:"draw2d.shape.basic.Line",DEFAULT_COLOR:new i.default.util.Color(0,0,0),init:function(t,e,n){this.corona=10,this.isGlowing=!1,this.lineColor=this.DEFAULT_COLOR,this.stroke=1,this.outlineStroke=0,this.outlineColor=new i.default.util.Color(null),this.outlineVisible=!1,this.draggedSegment=null,this.dasharray=null,this.dasharrayOffset=null,this.animate=!1,this.animateDirection=!1,this.start=new i.default.geo.Point(30,30),this.end=new i.default.geo.Point(100,100),this.glowColor=new i.default.util.Color("#3f72bf"),this.glowStrokeSize=2.5*this.stroke,this.vertices=new i.default.util.ArrayList,this.vertices.add(this.start.clone()),this.vertices.add(this.end.clone()),this._super({deleteable:!1,selectable:!0,...t},{start:this.setStartPosition,startX:this.setStartX,startY:this.setStartY,end:this.setEndPosition,endX:this.setEndX,endY:this.setEndY,vertices:this.setVertices,outlineColor:this.setOutlineColor,outlineStroke:this.setOutlineStroke,color:this.setColor,stroke:this.setStroke,corona:this.setCorona,dasharray:this.setDashArray,glow:this.setGlow,glowStrokeSize:this.setGlowStrokeSize,animate:this.setAnmiate,animateDirection:this.setAnimateDirection,dasharrayOffset:this.setDasharrayOffset,...e},{start:this.getStartPosition,end:this.getEndPosition,outlineColor:this.getOutlineColor,outlineStroke:this.getOutlineStroke,stroke:this.getStroke,corona:this.getCorona,color:this.getColor,dasharray:this.getDashArray,vertices:this.getVertices,glowStrokeSize:this.getGlowStrokeSize,animate:this.getAnmiate,animateDirection:this.getAnimateDirection,dasharrayOffset:this.getDasharrayOffset,...n}),0===this.editPolicy.getSize()&&this.installEditPolicy(new i.default.policy.line.LineSelectionFeedbackPolicy)},setOutlineColor:function(t){return this.outlineColor=new i.default.util.Color(t),this.repaint(),this.fireEvent("change:outlineColor",{value:this.outlineColor}),this},getOutlineColor:function(){return this.outlineColor},setOutlineStroke:function(t){return this.outlineStroke=t,this.repaint(),this.fireEvent("change:outlineStroke",{value:this.outlineStroke}),this},getOutlineStroke:function(){return this.outlineStroke},onDragStart:function(t,e,n,r,i){let s=this._super(t,e,n,r);return!0===s&&!0!==i&&(this.draggedSegment={index:0,start:this.start,end:this.end}),s},onDrag:function(t,e,n,r){null!==this.command&&(this.vertices.each((function(t,e){e.translate(n,r)})),this.command.updateVertices(this.vertices.clone()),this.start.translate(n,r),this.end.translate(n,r),this.svgPathString=null,this._super(t,e,n,r))},onDragEnd:function(t,e,n,r){this.isInDragDrop=!1,this.draggedSegment=null,null!==this.command&&(this.canvas.getCommandStack().execute(this.command),this.command=null,this.isMoving=!1,this.editPolicy.each(((s,a)=>{a instanceof i.default.policy.figure.DragDropEditPolicy&&a.onDragEnd(this.canvas,this,t,e,n,r)})),this.fireEvent("move",{figure:this,dx:0,dy:0}),this.fireEvent("dragend",{x:t,y:e,shiftKey:n,ctrlKey:r}))},setPosition:function(t,e){let n=this.getX(),r=this.getY(),s={x:0,y:0};t instanceof i.default.geo.Point?(s.x=t.x-n,s.y=t.y-r):(s.x=t-n,s.y=e-r),this.translate(s.x,s.y)},onClick:function(){},setDashArray:function(t){return this.dasharray=t,this.repaint(),this.fireEvent("change:dashArray",{value:this.dasharray}),this},getDashArray:function(){return this.dasharray},createShapeElement:function(){let t=this.canvas.paper.set();return t.push(this.canvas.paper.path("M"+this.start.x+" "+this.start.y+"L"+this.end.x+" "+this.end.y)),t.push(this.canvas.paper.path("M"+this.start.x+" "+this.start.y+"L"+this.end.x+" "+this.end.y)),t.node=t.items[1].node,this.outlineVisible=!0,t},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(void 0===t?t={stroke:this.lineColor.rgba(),"stroke-width":this.stroke,path:["M",this.start.x,this.start.y,"L",this.end.x,this.end.y].join(" ")}:(void 0===t.path&&(t.path=["M",this.start.x,this.start.y,"L",this.end.x,this.end.y].join(" ")),t.stroke??=this.lineColor.rgba(),t["stroke-width"]??=this.stroke),t["stroke-dasharray"]??=this.dasharray,this._super(t),this.outlineStroke>0?(this.shape.items[0].attr({"stroke-width":this.outlineStroke+this.stroke,stroke:this.outlineColor.rgba()}),!1===this.outlineVisible&&this.shape.items[0].show(),this.outlineVisible=!0):!0===this.outlineVisible&&(this.shape.items[0].attr({"stroke-width":0,stroke:"none"}),this.shape.items[0].hide(),this.outlineVisible=!1),this.animate&&$(this.shape.items[1].node).css({"stroke-dashoffset":this.animateDirection?"200":"-200",animation:"lineAnimation 5s linear infinite"}))},toBack:function(t){return this._super(t),!0===this.outlineVisible&&this.shape.items[0].insertBefore(this.shape.items[1]),this},setGlowColor:function(t){return this.glowColor=t,this.repaint(),this.fireEvent("change:glowColor",{value:this.glowColor}),this},getGlowStrokeSize:function(){return this.glowStrokeSize},setGlowStrokeSize:function(t){return this.glowStrokeSize=t,this.repaint(),this.fireEvent("change:glowStrokeSize",{value:this.glowStrokeSize}),this},getGlowColor:function(){return this.glowColor},getDasharrayOffset:function(){return this.dasharrayOffset},setDasharrayOffset:function(t){return this.dasharrayOffset=t,this.repaint(),this.fireEvent("change:dasharrayOffset",{value:this.dasharrayOffset}),this},getAnimate:function(){return this.animate},setAnimate:function(t){return this.animate=t,this.repaint(),this.fireEvent("change:animate",{value:this.animate}),this},getAnimateDirection:function(){return this.animateDirection},setAnimateDirection:function(t){return this.animateDirection=t,this.repaint(),this.fireEvent("change:animateDirection",{value:this.animateDirection}),this},setGlow:function(t){if(this.isGlowing!==t)return!0===t?(this._lineColor=this.lineColor,this._stroke=this.stroke,this.setColor(this.glowColor),this.setStroke(this.glowStrokeSize)):(this.setColor(this._lineColor),this.setStroke(this._stroke)),this.isGlowing=t,this},isResizeable:function(){return!0},setStroke:function(t){return this.stroke=parseFloat(t),this.repaint(),this.fireEvent("change:stroke",{value:this.stroke}),this},getStroke:function(){return this.stroke},setCorona:function(t){return this.corona=parseFloat(t),this},getCorona:function(){return this.corona},setColor:function(t){return this.lineColor=new i.default.util.Color(t),this.repaint(),this.fireEvent("change:color",{value:this.lineColor}),this},getColor:function(){return this.lineColor},translate:function(t,e){this.vertices.each((function(n,r){r.translate(t,e)})),this.start=this.vertices.first().clone(),this.end=this.vertices.last().clone();let n=this;return this.editPolicy.each((function(t,e){e instanceof i.default.policy.figure.DragDropEditPolicy&&e.moved(n.canvas,n)})),this.svgPathString=null,this.repaint(),this},getBoundingBox:function(){let t=Math.min(...this.vertices.asArray().map((t=>t.x))),e=Math.min(...this.vertices.asArray().map((t=>t.y))),n=Math.max(...this.vertices.asArray().map((t=>t.x)))-t,r=Math.max(...this.vertices.asArray().map((t=>t.y)))-e;return new i.default.geo.Rectangle(t,e,n,r)},setStartPosition:function(t,e){let n=new i.default.geo.Point(t,e);if(this.start.equals(n))return this;this.start.setPosition(n),this.vertices.first().setPosition(n),this.repaint();let r=this;return this.editPolicy.each((function(t,e){e instanceof i.default.policy.figure.DragDropEditPolicy&&e.moved(r.canvas,r)})),this.fireEvent("change:start",{value:this.start}),this},setStartPoint:function(t,e){return this.setStartPosition(t,e)},setStartX:function(t){this.setStartPosition(t,this.start.y)},setStartY:function(t){this.setStartPosition(this.start.x,t)},setEndX:function(t){this.setEndPosition(t,this.end.y)},setEndY:function(t){this.setEndPosition(this.end.x,t)},setEndPosition:function(t,e){let n=new i.default.geo.Point(t,e);return this.end.equals(n)||(this.end.setPosition(n),this.vertices.last().setPosition(n),this.repaint(),this.editPolicy.each(((t,e)=>{e instanceof i.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this.fireEvent("change:end",{value:this.end})),this},setEndPoint:function(t,e){return this.setEndPosition(t,e)},getStartX:function(){return this.start.x},getStartY:function(){return this.start.y},getStartPosition:function(){return this.start.clone()},getStartPoint:function(){return this.getStartPosition()},getEndX:function(){return this.end.x},getEndY:function(){return this.end.y},getEndPosition:function(){return this.end.clone()},getEndPoint:function(){return this.getEndPosition()},getX:function(){return this.getBoundingBox().x},getY:function(){return this.getBoundingBox().y},getVertex:function(t){return this.vertices.get(t)},setVertex:function(t,e,n){e instanceof i.default.geo.Point&&(n=e.y,e=e.x);let r=this.vertices.get(t);if(null!==r&&(r.x!==e||r.y!==n))return r.x=parseFloat(e),r.y=parseFloat(n),this.start=this.vertices.first().clone(),this.end=this.vertices.last().clone(),this.svgPathString=null,this.routingRequired=!0,this.repaint(),this.editPolicy.each(((t,e)=>{e instanceof i.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this.fireEvent("change:vertices",{value:this.vertices}),this},getVertices:function(){return this.vertices},setVertices:function(t){if(Array.isArray(t))this.vertices=new i.default.util.ArrayList,t.forEach((t=>{this.vertices.add(new i.default.geo.Point(t))}));else{if(!(t instanceof i.default.util.ArrayList))throw"invalid argument for Line.setVertices";this.vertices=t.clone(!0)}return this.vertices.getSize()>1&&(this.start=this.vertices.first().clone(),this.end=this.vertices.last().clone()),this.svgPathString=null,this.repaint(),this.selectionHandles.isEmpty()||this.editPolicy.each(((t,e)=>{e instanceof i.default.policy.figure.SelectionFeedbackPolicy&&(e.onUnselect(this.canvas,this),e.onSelect(this.canvas,this))})),this.editPolicy.each(((t,e)=>{e instanceof i.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this.fireEvent("change:vertices",{value:this.vertices}),this},getSegments:function(){let t=new i.default.util.ArrayList;return t.add({start:this.getStartPosition(),end:this.getEndPosition()}),t},getLength:function(){return Math.sqrt((this.start.x-this.end.x)*(this.start.x-this.end.x)+(this.start.y-this.end.y)*(this.start.y-this.end.y))},getAngle:function(){let t=this.getLength(),e=-180/Math.PI*Math.asin((this.start.y-this.end.y)/t);return e<0?e=this.end.x<this.start.x?Math.abs(e)+180:360-Math.abs(e):this.end.x<this.start.x&&(e=180-e),e},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.MOVE&&this.isDraggable()?new i.default.command.CommandMoveVertices(this):t.getPolicy()===i.default.command.CommandType.DELETE&&this.isDeleteable()?new i.default.command.CommandDelete(this):t.getPolicy()===i.default.command.CommandType.MOVE_BASEPOINT&&this.isDraggable()?new i.default.command.CommandMoveVertex(this):null},installEditPolicy:function(t){!(t instanceof i.default.policy.line.LineSelectionFeedbackPolicy)&&t instanceof i.default.policy.figure.SelectionFeedbackPolicy||this._super(t)},hitTest:function(t,e){return i.default.shape.basic.Line.hit(this.corona+this.stroke,this.start.x,this.start.y,this.end.x,this.end.y,t,e)},pointProjection:function(t,e){let n=new i.default.geo.Point(t,e),r=this.getStartPosition(),s=this.getEndPosition();return i.default.geo.Line.pointProjection(r.x,r.y,s.x,s.y,n.x,n.y)},lerp:function(t){let e=this.getStartPosition(),n=this.getEndPosition();return t=Math.min(1,Math.max(0,t)),new i.default.geo.Point(e.x+(n.x-e.x)*t,e.y+(n.y-e.y)*t)},intersection:function(t){let e=new i.default.util.ArrayList;if(t===this)return e;let n=this.getSegments(),r=t.getSegments();return n.each((function(t,n){r.each((function(t,r){let s=i.default.shape.basic.Line.intersection(n.start,n.end,r.start,r.end);null!==s&&e.add(s)}))})),e},getPersistentAttributes:function(){let t=this._super();return delete t.x,delete t.y,delete t.width,delete t.height,t.stroke=this.stroke,t.color=this.getColor().rgba(),t.outlineStroke=this.outlineStroke,t.outlineColor=this.outlineColor.rgba(),null!==this.dasharray&&(t.dasharray=this.dasharray),this.editPolicy.getSize()>0&&(t.policy=this.editPolicy.first().NAME),t.vertex=[],this.getVertices().each(((e,n)=>{t.vertex.push({x:n.x,y:n.y})})),t},setPersistentAttributes:function(t){if(this._super(t),"string"==typeof t.dasharray&&(this.dasharray=t.dasharray),void 0!==t.stroke&&this.setStroke(parseFloat(t.stroke)),void 0!==t.color&&this.setColor(t.color),void 0!==t.outlineStroke&&this.setOutlineStroke(t.outlineStroke),void 0!==t.outlineColor&&this.setOutlineColor(t.outlineColor),void 0!==t.policy)try{this.installEditPolicy(Function(`return new ${t.policy}()`)())}catch(e){debug.warn("Unable to install edit policy '"+t.policy+"' forced by "+this.NAME+".setPersistentAttributes. Using default.")}return Array.isArray(t.vertex)&&t.vertex.length>1&&this.setVertices(t.vertex),this}}),i.default.shape.basic.Line.intersection=function(t,e,n,r){let s=null,a=(r.x-n.x)*(t.y-n.y)-(r.y-n.y)*(t.x-n.x),o=(e.x-t.x)*(t.y-n.y)-(e.y-t.y)*(t.x-n.x),c=(r.y-n.y)*(e.x-t.x)-(r.x-n.x)*(e.y-t.y);if(0!==c){let n=a/c,r=o/c;0<=n&&n<=1&&0<=r&&r<=1&&(s=new i.default.geo.Point(t.x+n*(e.x-t.x)|0,t.y+n*(e.y-t.y)|0),s.justTouching=0===n||1===n||0===r||1===r)}return s},i.default.shape.basic.Line.hit=function(t,e,n,r,s,a,o){return i.default.geo.Line.distance(e,n,r,s,a,o)<t}},"./src/shape/basic/LineEndResizeHandle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.LineEndResizeHandle=i.default.shape.basic.LineResizeHandle.extend({NAME:"draw2d.shape.basic.LineEndResizeHandle",init:function(t){this._super({owner:t,index:t.getVertices().getSize()-1})},getRelatedPort:function(){return this.owner instanceof i.default.Connection?this.owner.getTarget():null},getOppositePort:function(){return this.owner instanceof i.default.Connection?this.owner.getSource():null},onDrag:function(t,e,n,r){this._super(t,e,n,r);let i=this.owner.getEndPoint().clone();return i.translate(n,r),null!==this.command&&this.command.updatePosition(i),this.owner.setEndPoint(i),this.owner.isMoving=!0,!0},onDrop:function(t,e,n,r,s){this.owner.isMoving=!1,this.owner instanceof i.default.Connection&&null!==this.command&&(this.command.setNewPorts(this.owner.getSource(),t),this.getCanvas().getCommandStack().execute(this.command)),this.command=null},relocate:function(){let t=this.getWidth()/2,e=this.getHeight()/2,n=this.owner.getEndPoint();return this.setPosition(n.x-t,n.y-e),this}})},"./src/shape/basic/LineResizeHandle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.LineResizeHandle=i.default.shape.basic.Circle.extend({NAME:"draw2d.shape.basic.LineResizeHandle",init:function(t,e,n){this.zoomCallback=()=>{this.attr({width:this.origWidth*this.getCanvas().getZoom(),height:this.origHeight*this.getCanvas().getZoom(),stroke:this.origStroke*this.getCanvas().getZoom()}),this.blockEvent||this.owner.fireEvent("move",{})},this._super({bgColor:"#5bcaff",stroke:1,width:10,height:10,minWidth:.3,minHeight:.3,selectable:!1,...t},{owner:this.setOwner,index:this.setIndex,...e},{owner:this.getOwner,index:this.getIndex,...n}),this.isResizeHandle=!0,this.currentTarget=null,this.origWidth=this.width,this.origHeight=this.height,this.origStroke=this.stroke},getOwner:function(){return this.owner},setOwner:function(t){return this.owner=t,this},getIndex:function(){return this.index},setIndex:function(t){return this.index=t,this},createShapeElement:function(){let t=this._super();return t.attr({cursor:"move"}),t},setBackgroundColor:function(t){return t=new i.default.util.Color(t),this.bgGradient="r(.4,.3)"+t.hash()+"-"+t.darker(.1).hash()+":60-"+t.darker(.2).hash(),this._super(t),this.setColor(t.darker(.3)),this},getRelatedPort:function(){return null},getOppositePort:function(){return null},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(t??={},"none"===this.bgColor.hash()||this.getAlpha()<.9?t.fill=this.bgColor.rgba():t.fill=this.bgGradient,this._super(t))},onDragStart:function(t,e,n,r){return this.command=this.owner.createCommand(new i.default.command.CommandType(i.default.command.CommandType.MOVE_BASEPOINT)),null!==this.command&&this.command.setIndex(this.index),this.setAlpha(.2),this.shape.attr({cursor:"crosshair"}),this.fireEvent("dragstart",{x:t,y:e,shiftKey:n,ctrlKey:r}),!0},onDrag:function(t,e,n,r){this.setPosition(this.x+n,this.y+r);let i=this.getOppositePort(),s=null!==i?i.getCanvas().getBestFigure(this.getX(),this.getY(),[this,this.owner]):null;return s!==this.currentTarget&&(null!==this.currentTarget&&(this.currentTarget.onDragLeave(i),this.currentTarget.setGlow(!1),this.currentTarget.fireEvent("dragLeave",{draggingElement:i})),null!==s&&(this.currentTarget=s.delegateTarget(i),null!==this.currentTarget&&(this.currentTarget.setGlow(!0),this.currentTarget.onDragEnter(i),this.currentTarget.fireEvent("dragEnter",{draggingElement:i})))),!0},onDragEnd:function(t,e,n,r){if(!this.isDraggable())return!1;this.shape.attr({cursor:"move"});let s=this.getOppositePort();null!==s&&null!==this.currentTarget&&(this.onDrop(this.currentTarget,t,e,n,r),this.currentTarget.onDragLeave(s),this.currentTarget.setGlow(!1),this.currentTarget.fireEvent("dragLeave",{draggingElement:s}),this.currentTarget.onCatch(this,t,e,n,r),this.currentTarget=null),this.owner.isMoving=!1,this.owner instanceof i.default.Connection?null!==this.command&&this.command.cancel():null!==this.command&&this.getCanvas().getCommandStack().execute(this.command),this.command=null,this.setAlpha(1),this.fireEvent("dragend",{x:t,y:e,shiftKey:n,ctrlKey:r})},relocate:function(){return this},supportsSnapToHelper:function(){return!(this.owner instanceof i.default.Connection)},show:function(t,e,n){this.setCanvas(t);try{this.blockEvent=!0,this.zoomCallback()}finally{this.blockEvent=!1}this.shape.toFront(),this.canvas.resizeHandles.add(this)},hide:function(){null!==this.shape&&(this.canvas.resizeHandles.remove(this),this.setCanvas(null))},setCanvas:function(t){null!==this.canvas&&this.canvas.off(this.zoomCallback),this._super(t),null!==this.canvas&&this.canvas.on("zoom",this.zoomCallback)},onKeyDown:function(t,e){this.canvas.onKeyDown(t,e)}})},"./src/shape/basic/LineStartResizeHandle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.LineStartResizeHandle=i.default.shape.basic.LineResizeHandle.extend({NAME:"draw2d.shape.basic.LineStartResizeHandle",init:function(t){this._super({owner:t,index:0})},getRelatedPort:function(){return this.owner instanceof i.default.Connection?this.owner.getSource():null},getOppositePort:function(){return this.owner instanceof i.default.Connection?this.owner.getTarget():null},onDrag:function(t,e,n,r){this._super(t,e,n,r);let i=this.owner.getStartPoint();return i.translate(n,r),null!==this.command&&this.command.updatePosition(i),this.owner.setStartPoint(i),this.owner.isMoving=!0,!0},onDrop:function(t,e,n,r,s){this.owner.isMoving=!1,this.owner instanceof i.default.Connection&&null!==this.command&&(this.command.setNewPorts(t,this.owner.getTarget()),this.getCanvas().getCommandStack().execute(this.command)),this.command=null},relocate:function(){let t=this.getWidth()/2,e=this.getHeight()/2,n=this.owner.getStartPoint();return this.setPosition(n.x-t,n.y-e),this}})},"./src/shape/basic/Oval.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.Oval=i.default.VectorFigure.extend({NAME:"draw2d.shape.basic.Oval",init:function(t,e,n){this._super({bgColor:"#C02B1D",color:"#1B1B1B",...t},{center:this.setCenter,...e},n)},createShapeElement:function(){let t=this.getWidth()/2,e=this.getHeight()/2;return this.canvas.paper.ellipse(this.getAbsoluteX()+t,this.getAbsoluteY()+e,t,e)},applyTransformation:function(){var t="R"+this.rotationAngle;return this.shape.transform(t),this},getCenter:function(){let t=this.getWidth()/2,e=this.getHeight()/2;return this.getPosition().translated(t,e)},setCenter:function(t,e){let n=new i.default.geo.Point(t,e),r=this.getWidth()/2,s=this.getHeight()/2;return n.translate(-r,-s),this.setPosition(n),this.fireEvent("change:center",{value:{x:t,y:e}}),this},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(t??={},void 0===t.rx&&(t.rx=this.width/2,t.ry=this.height/2),void 0===t.cx&&(t.cx=this.getAbsoluteX()+t.rx,t.cy=this.getAbsoluteY()+t.ry),this._super(t))},intersectionWithLine:function(t,e){let n=this.getWidth()/2,r=this.getHeight()/2,s=new i.default.util.ArrayList,a=new i.default.geo.Point(t.x,t.y),o=e.subtract(t),c=new i.default.geo.Point(this.getAbsoluteX()+n,this.getAbsoluteY()+r),l=a.subtract(c),h=new i.default.geo.Point(o.x/(n*n),o.y/(r*r)),u=new i.default.geo.Point(l.x/(n*n),l.y/(r*r)),d=o.dot(h),p=o.dot(u),f=p*p-d*(l.dot(u)-1);if(f<0);else if(f>0){let n=Math.sqrt(f),r=(-p-n)/d,i=(-p+n)/d;(r<0||1<r)&&(i<0||1<i)||(0<=r&&r<=1&&s.add(t.lerp(e,r)),0<=i&&i<=1&&s.add(t.lerp(e,i)))}else{let n=-p/d;0<=n&&n<=1&&s.add(t.lerp(e,n))}return s}})},"./src/shape/basic/PolyLine.js":(t,e,n)=>{"use strict";var r,s=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};s.default.shape.basic.PolyLine=s.default.shape.basic.Line.extend({NAME:"draw2d.shape.basic.PolyLine",init:function(t,e,n){this.svgPathString=null,this.oldPoint=null,this.router=null,this.routingRequired=!0,this.lineSegments=new s.default.util.ArrayList,this.radius="",this._super({router:new s.default.layout.connection.VertexRouter,...t},{router:this.setRouter,radius:this.setRadius,...e},{router:this.getRouter,radius:this.getRadius,...n})},setRadius:function(t){return this.radius=t,this.svgPathString=null,this.repaint(),this.fireEvent("change:radius",{value:this.radius}),this},setOutlineStroke:function(t){return this.outlineStroke!==t&&(this.svgPathString=null,this.routingRequired=!0),this._super(t),this},getRadius:function(){return this.radius},setStartPoint:function(t,e){return this.vertices.getSize()>0?this.vertices.first().setPosition(t,e):this.vertices.add(new s.default.geo.Point(t,e)),this.start=this.vertices.first().clone(),this.calculatePath({startMoved:!0,endMoved:!1}),this.repaint(),this.editPolicy.each(((t,e)=>{e instanceof s.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this.fireEvent("change:start",{value:this.start}),this},setEndPoint:function(t,e){return this.vertices.getSize()>1?this.vertices.last().setPosition(t,e):this.vertices.add(new s.default.geo.Point(t,e)),this.end=this.vertices.last().clone(),!1===this.isInDragDrop&&this.calculatePath({startMoved:!1,endMoved:!0}),this.repaint(),this.editPolicy.each(((t,e)=>{e instanceof s.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this.fireEvent("change:end",{value:this.end}),this},addVertex:function(t,e){return this.vertices.add(new s.default.geo.Point(t,e)),this.start=this.vertices.first().clone(),this.end=this.vertices.last().clone(),this.svgPathString=null,this.repaint(),this.selectionHandles.isEmpty()||this.editPolicy.each(((t,e)=>{e instanceof s.default.policy.figure.SelectionFeedbackPolicy&&(e.onUnselect(this.canvas,this),e.onSelect(this.canvas,this))})),this.fireEvent("change:vertices",{value:this.vertices}),this},insertVertexAt:function(t,e,n){let r=new s.default.geo.Point(e,n);return this.vertices.insertElementAt(r,t),this.start=this.vertices.first().clone(),this.end=this.vertices.last().clone(),this.svgPathString=null,this.repaint(),this.selectionHandles.isEmpty()||this.editPolicy.each(((t,e)=>{e instanceof s.default.policy.figure.SelectionFeedbackPolicy&&(e.onUnselect(this.canvas,this),e.onSelect(this.canvas,this))})),this.fireEvent("change:vertices",{value:this.vertices}),this},removeVertexAt:function(t){let e=this.vertices.removeElementAt(t);return this.start=this.vertices.first().clone(),this.end=this.vertices.last().clone(),this.svgPathString=null,this.repaint(),this.selectionHandles.isEmpty()||this.editPolicy.each(((t,e)=>{e instanceof s.default.policy.figure.SelectionFeedbackPolicy&&(e.onUnselect(this.canvas,this),e.onSelect(this.canvas,this))})),this.fireEvent("change:vertices",{value:this.vertices}),e},setRouter:function(t){return null!==this.router&&this.router.onUninstall(this),this.router=t??new s.default.layout.connection.DirectRouter,this.router.onInstall(this),this.routingRequired=!0,this.repaint(),this.fireEvent("change:router",{value:this.router}),this},getRouter:function(){return this.router},calculatePath:function(t){t??={},null!==this.shape&&(this.svgPathString=null,t.oldVertices=this.vertices,this.oldPoint=null,this.lineSegments=new s.default.util.ArrayList,this.vertices=new s.default.util.ArrayList,this.router.route(this,t),this.routingRequired=!1,this.fireEvent("routed"),this.fireEvent("change:route",{}))},repaint:function(t){return!0===this.repaintBlocked||null===this.shape?this:(null!==this.svgPathString&&!0!==this.routingRequired||this.calculatePath(),t??={},t.path=this.svgPathString,t["stroke-linecap"]??="round",t["stroke-linejoin"]??="round",this._super(t))},getSegments:function(){return this.lineSegments},addPoint:function(t,e){void 0!==e&&(t=new s.default.geo.Point(t,e)),this.vertices.add(t),null!==this.oldPoint&&this.lineSegments.add({start:this.oldPoint,end:t}),this.svgPathString=null,this.oldPoint=t},onDragStart:function(t,e,n,r,i){let s=this._super(t,e,n,r,i);return!0===s&&!0!==i&&(this.draggedSegment=this.hitSegment(t,e)),s},getLength:function(){let t=0;return this.lineSegments.each((e=>{let n=e.start,r=e.end;t+=Math.sqrt((n.x-r.x)*(n.x-r.x)+(n.y-r.y)*(n.y-r.y))})),t},setVertices:function(t){this.router.verticesSet(this),this._super(t)},pointProjection:function(t,e){let n=null,r=null,a=null,o=null,c=Number.MAX_SAFE_INTEGER,l=new s.default.geo.Point(t,e);if(this.lineSegments.each((t=>{if(a=t.start,o=t.end,r=s.default.geo.Line.pointProjection(a.x,a.y,o.x,o.y,l.x,l.y),null!==r){let t=r.distance(l);(null==n||t<c)&&(n=r,n.index=i,c=t)}})),null!==n){let t=0;this.lineSegments.each((e=>{t+=e.start.distance(e.end)}));let e=this.lineSegments.get(n.index);a=e.start,o=e.end,t+=a.distance(o)*s.default.geo.Line.inverseLerp(o.x,o.y,a.x,a.y,n.x,n.y),n.percentage=1/this.getLength()*t}return n},lerp:function(t){let e=this.getLength()*t,n=e,r=null,i=null,a=null;for(let o=0;o<this.lineSegments.getSize();o++){if(r=this.lineSegments.get(o),i=r.start,a=r.end,e-=i.distance(a),e<=0)return t=1/i.distance(a)*n,new s.default.geo.Point(i.x+(a.x-i.x)*t,i.y+(a.y-i.y)*t);n=e}return a},hitSegment:function(t,e){for(let n=0;n<this.lineSegments.getSize();n++){let r=this.lineSegments.get(n);if(s.default.shape.basic.Line.hit(this.corona+this.stroke,r.start.x,r.start.y,r.end.x,r.end.y,t,e))return{index:n,start:r.start,end:r.end}}return null},hitTest:function(t,e){return null!==this.hitSegment(t,e)},createCommand:function(t){if(t.getPolicy()===s.default.command.CommandType.DELETE){if(!0===this.isDeleteable())return new s.default.command.CommandDelete(this)}else if(t.getPolicy()===s.default.command.CommandType.MOVE_VERTEX){if(!0===this.isResizeable())return new s.default.command.CommandMoveVertex(this)}else if(t.getPolicy()===s.default.command.CommandType.MOVE_VERTICES&&!0===this.isResizeable())return new s.default.command.CommandMoveVertices(this);return this._super(t)},getPersistentAttributes:function(){return this.router.getPersistentAttributes(this,{...this._super(),router:this.router.NAME,radius:this.radius})},setPersistentAttributes:function(t){if(this._super(t),void 0!==t.router)try{this.setRouter(Function(`return new ${t.router}()`)())}catch(e){debug.warn("Unable to install router '"+t.router+"' forced by "+this.NAME+".setPersistentAttributes. Using default")}void 0!==t.radius&&this.setRadius(t.radius),this.router.setPersistentAttributes(this,t),this.vertices.getSize()>1&&(this.start=this.vertices.first().clone(),this.end=this.vertices.last().clone())}})},"./src/shape/basic/Polygon.js":(t,e,n)=>{"use strict";var r=i(n("./src/packages.js"));i(n("./src/util/JSONUtil.js"));function i(t){return t&&t.__esModule?t:{default:t}}r.default.shape.basic.Polygon=r.default.VectorFigure.extend({NAME:"draw2d.shape.basic.Polygon",init:function(t,e,n){if(this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.vertices=new r.default.util.ArrayList,this._super(t,e,n),0===this.vertices.getSize()){let t=this.width,e=this.height,n=this.getPosition();this.addVertex(new r.default.geo.Point(0,0)),this.addVertex(new r.default.geo.Point(t,0)),this.addVertex(new r.default.geo.Point(t,e)),this.setPosition(n)}this.svgPathString=null,this.installEditPolicy(new r.default.policy.figure.VertexSelectionFeedbackPolicy)},setRadius:function(t){return this.svgPathString=null,this._super(t),this.fireEvent("change:radius",{value:t}),this},createShapeElement:function(){return this.canvas.paper.path("M0 10L100 100")},calculatePath:function(){let t=this.getRadius(),e=[];if(0===t){let t=this.vertices.getSize(),n=this.vertices.get(0);e.push("M",n.x," ",n.y);for(let r=1;r<t;r++)n=this.vertices.get(r),e.push("L",n.x," ",n.y);e.push("Z")}else{length=this.vertices.getSize();let n=this.vertices.first(),i=this.vertices.last();n.equals(i)&&(length-=1,i=this.vertices.get(length-1));let s=r.default.geo.Util.insetPoint(n,i,t);e.push("M",s.x,",",s.y);for(let s=0;s<length;s++){n=this.vertices.get(s),i=this.vertices.get((s+1)%length);let a=r.default.geo.Util.insetPoint(n,i,t),o=r.default.geo.Util.insetPoint(i,n,t);e.push("Q",n.x,",",n.y," ",a.x,", ",a.y),e.push("L",o.x,",",o.y)}}return this.svgPathString=e.join(""),this},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(null===this.svgPathString&&this.calculatePath(),t??={},t.path??=this.svgPathString,this._super(t))},translate:function(t,e){let n=this;return t=this.x+t,e=this.y+e,this.editPolicy.each((function(i,s){if(s instanceof r.default.policy.figure.DragDropEditPolicy){let r=s.adjustPosition(n,t,e);t=r.x,e=r.y}})),t-=this.x,e-=this.y,this.vertices.each((function(n,r){r.translate(t,e)})),this.svgPathString=null,this.updateBoundingBox(),this.repaint(),this.editPolicy.each((function(t,e){e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(n.canvas,n)})),this.fireEvent("move",{figure:this,dx:t,dy:e}),this.fireEvent("change:x",{value:this.x}),this.fireEvent("change:y",{value:this.y}),this},setPosition:function(t,e){t instanceof r.default.geo.Point&&(e=t.y,t=t.x),this.svgPathString=null;let n=t-this.minX,i=e-this.minY;return this.translate(n,i),this.x=t,this.y=e,this},setDimension:function(t,e){let n=this.width,r=this.height;this._super(t,e);let i=1/n*this.width,s=1/r*this.height,a=this.x,o=this.y;return this.vertices.each((function(t,e){let n=(e.getX()-a)*i,r=(e.getY()-o)*s;e.setPosition(a+n,o+r)})),this.svgPathString=null,this.repaint(),this.fireEvent("change:dimension",{value:{width:this.width,height:this.height}}),this},getVertices:function(){return this.vertices},getVertex:function(t){return this.vertices.get(t)},resetVertices:function(){return this.vertices=new r.default.util.ArrayList,this.svgPathString=null,this.repaint(),this.updateBoundingBox(),this.editPolicy.each(((t,e)=>{e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(this.canvas,this)})),this},setVertex:function(t,e,n){let i=this.vertices.get(t);if(null===i||i.x===e&&i.y===n)return this;i.x=parseFloat(e),i.y=parseFloat(n),this.svgPathString=null,this.repaint(),this.updateBoundingBox();let s=this;return this.editPolicy.each((function(t,e){e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(s.canvas,s)})),this.fireEvent("change:vertices",{value:this.vertices}),this},addVertex:function(t,e){this.vertices.add(new r.default.geo.Point(t,e)),this.svgPathString=null,this.repaint(),this.updateBoundingBox();let n=this;return this.editPolicy.each((function(t,e){e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(n.canvas,n)})),this.fireEvent("change:vertices",{value:this.vertices}),this},insertVertexAt:function(t,e,n){if(this.vertices.insertElementAt(new r.default.geo.Point(e,n),t),this.svgPathString=null,this.repaint(),this.updateBoundingBox(),!this.selectionHandles.isEmpty()){let t=this;this.editPolicy.each((function(e,n){n instanceof r.default.policy.figure.SelectionFeedbackPolicy&&(n.onUnselect(t.canvas,t),n.onSelect(t.canvas,t))}))}return this.fireEvent("change:vertices",{value:this.vertices}),this},removeVertexAt:function(t){if(this.vertices.getSize()<=3)return null;let e=this.vertices.removeElementAt(t);if(this.svgPathString=null,this.repaint(),this.updateBoundingBox(),!this.selectionHandles.isEmpty()){let t=this;this.editPolicy.each((function(e,n){n instanceof r.default.policy.figure.SelectionFeedbackPolicy&&(n.onUnselect(t.canvas,t),n.onSelect(t.canvas,t))}))}return this.fireEvent("change:vertices",{value:this.vertices}),e},setRotationAngle:function(t){this.rotationAngle=360%t;let e=t/(180/Math.PI),n=this.getBoundingBox().getCenter();this.vertices.each((function(t,r){let i=function(t,e,n,r,i){let s=Math.cos,a=Math.sin;return{x:(t-n)*s(i)-(e-r)*a(i)+n,y:(t-n)*a(i)+(e-r)*s(i)+r}}(r.x,r.y,n.x,n.y,e);r.setPosition(i.x,i.y)})),this.updateBoundingBox();let i=this;return this.editPolicy.each((function(t,e){e instanceof r.default.policy.figure.DragDropEditPolicy&&e.moved(i.canvas,i)})),this.repaint(),this.fireEvent("change:angle",{value:this.rotationAngle}),this},updateBoundingBox:function(){this.vertices.isEmpty()?(this.minX=this.x,this.minY=this.y,this.maxX=this.x+this.width,this.maxY=this.y+this.height):(this.minX=this.x=Math.min(...this.vertices.asArray().map((t=>t.x))),this.minY=this.y=Math.min(...this.vertices.asArray().map((t=>t.y))),this.maxX=Math.max(...this.vertices.asArray().map((t=>t.x))),this.maxY=Math.max(...this.vertices.asArray().map((t=>t.y))),this.width=this.maxX-this.minX,this.height=this.maxY-this.minY)},createCommand:function(t){return t.getPolicy()===r.default.command.CommandType.MOVE_VERTEX&&!0===this.isResizeable()?new r.default.command.CommandMoveVertex(this):this._super(t)},getPersistentAttributes:function(){let t=this._super();return t.vertices=[],this.vertices.each((function(e,n){t.vertices.push({x:n.x,y:n.y})})),t},setPersistentAttributes:function(t){this._super(t),void 0!==t.vertices&&(this.vertices=new r.default.util.ArrayList,t.vertices.forEach((t=>{this.addVertex(t)})))}})},"./src/shape/basic/Rectangle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.Rectangle=i.default.VectorFigure.extend({NAME:"draw2d.shape.basic.Rectangle",init:function(t,e,n){this.dasharray=null,this._super({bgColor:"#a0a0a0",color:"#1B1B1B",...t},{dash:this.setDashArray,dasharray:this.setDashArray,...e},{dash:this.getDashArray,dasharray:this.getDashArray,...n})},repaint:function(t){if(!0!==this.repaintBlocked&&null!==this.shape)return t??={},t.width??=this.getWidth(),t.height??=this.getHeight(),t.r??=this.getRadius(),null!==this.dasharray&&(t["stroke-dasharray"]=this.dasharray),this._super(t),this},applyTransformation:function(){let t="R"+this.rotationAngle;if(90===this.getRotationAngle()||270===this.getRotationAngle()){let e=this.getHeight()/this.getWidth();t=t+"S"+e+","+1/e+","+(this.getAbsoluteX()+this.getWidth()/2)+","+(this.getAbsoluteY()+this.getHeight()/2)}return this.shape.transform(t),this},createShapeElement:function(){return this.canvas.paper.rect(this.getAbsoluteX(),this.getAbsoluteY(),this.getWidth(),this.getHeight())},setDashArray:function(t){return this.dasharray=t,this.repaint(),this.fireEvent("change:dashArray",{value:this.dasharray}),this},getDashArray:function(){return this.dasharray},getPersistentAttributes:function(){let t=this._super();return null!==this.dasharray&&(t.dasharray=this.dasharray),t},setPersistentAttributes:function(t){return this._super(t),"string"==typeof t.dasharray&&(this.dasharray=t.dasharray),this}})},"./src/shape/basic/Text.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.Text=i.default.shape.basic.Label.extend({NAME:"draw2d.shape.basic.Text",init:function(t,e,n){this.cachedWrappedAttr=null,this._super({width:100,height:50,resizeable:!0,...t},e,n),this.installEditPolicy(new i.default.policy.figure.WidthSelectionFeedbackPolicy)},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(this.svgNodes.attr({...this.calculateTextAttr(),...this.wrappedTextAttr(this.text,this.getWidth()-this.padding.left-this.padding.right)}),this.svgNodes.attr({x:this.padding.left,y:this.getHeight()/2}),i.default.SetFigure.prototype.repaint.call(this,t))},setDimension:function(t,e){this.clearCache();let n=this.wrappedTextAttr(this.text,t);return this.cachedMinWidth=Math.max(t,n.width),this.cachedMinHeight=n.height,i.default.shape.node.Node.prototype.setDimension.call(this,this.cachedMinWidth,this.cachedMinHeight),this.fireEvent("change:dimension",{value:{width:this.cachedMinWidth,height:this.cachedMinHeight}}),this},clearCache:function(){return this._super(),this.cachedWrappedAttr=null,this},getMinWidth:function(){if(null===this.shape)return 0;if(null===this.cachedMinWidth){let t=this.text.split(" ").reduce(((t,e)=>t.length>e.length?t:e)),e=this.canvas.paper.text(0,0,t).attr({...this.calculateTextAttr(),text:t});this.cachedMinWidth=e.getBBox(!0).width+this.padding.left+this.padding.right+2*this.getStroke(),e.remove()}return this.cachedMinWidth},wrappedTextAttr:function(t,e){let n=t.split(" ");if(null===this.canvas||0===n.length)return{text:t,width:e,height:20};if(null===this.cachedWrappedAttr){let t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",r=this.canvas.paper.text(0,0,"");r.attr({...this.calculateTextAttr(),text:t});let i=r.getBBox(!0).width/t.length,s=[n[0]],a=s[0].length*i,o=null;for(let t=1;t<n.length;t++){o=n[t];let r=o.length*i;a+r>e?(s.push("\n"),a=r):(s.push(" "),a+=r),s.push(o)}r.attr({text:s.join("")});let c=r.getBBox(!0);r.remove(),this.cachedWrappedAttr={text:s.join(""),width:Math.max(e,c.width)+this.padding.left+this.padding.right,height:c.height+this.padding.top+this.padding.bottom}}return this.cachedWrappedAttr}})},"./src/shape/basic/VertexResizeHandle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.basic.VertexResizeHandle=i.default.ResizeHandle.extend({NAME:"draw2d.shape.basic.VertexResizeHandle",SNAP_THRESHOLD:3,LINE_COLOR:"#1387E6",FADEOUT_DURATION:300,init:function(t,e){this._super({owner:t}),this.index=e,this.isDead=!1},onDoubleClick:function(){let t=new i.default.command.CommandRemoveVertex(this.owner,this.index);this.getCanvas().getCommandStack().execute(t),this.isDead=!0},onDragStart:function(t,e,n,r){if(!0!==this.isDead)return this._super(),this.command=this.getCanvas().getPrimarySelection().createCommand(new i.default.command.CommandType(i.default.command.CommandType.MOVE_VERTEX)),null!=this.command&&(this.command.setIndex(this.index),this.setAlpha(.2),this.shape.attr({cursor:"crosshair"})),this.vertex=this.owner.getVertex(this.index).clone(),this.fireEvent("dragstart",{x:t,y:e,shiftKey:n,ctrlKey:r}),!0},onDrag:function(t,e,n,r){if(!0===this.isDead||null==this.command)return;this.setPosition(this.x+n,this.y+r),this.vertex.translate(n,r);let i=this.vertex.clone();this.getCanSnapToHelper()&&(i=this.getCanvas().snapToHelper(this,i)),this.owner.setVertex(this.index,i.x,i.y),this.command.updatePosition(this.vertex.x,this.vertex.y)},onDragEnd:function(t,e,n,r){if(!0===this.isDead||null===this.command)return;this.shape.attr({cursor:"move"});let s=this.getCanvas().getCommandStack(),a=new i.default.command.CommandCollection;try{a.add(this.command),this.command=null,this.getEnclosingAngle()>178&&a.add(new i.default.command.CommandRemoveVertex(this.owner,this.index))}finally{s.execute(a)}this.setAlpha(1),this.fireEvent("dragend",{x:t,y:e,shiftKey:n,ctrlKey:r})},relocate:function(){let t=this.getWidth()/2,e=this.getHeight()/2,n=this.owner.getVertex(this.index);this.setPosition(n.x-t,n.y-e)},getEnclosingAngle:function(){let t=this.owner.getVertices(),e=this.vertex.getScaled(-1),n=t.getSize(),r=t.get((this.index-1+n)%n).translated(e),i=t.get((this.index+1)%n).translated(e),s=r.dot(i);return 180*Math.acos(s/(r.length()*i.length()))/Math.PI}})},"./src/shape/composite/Composite.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.composite.Composite=i.default.SetFigure.extend({NAME:"draw2d.shape.composite.Composite",init:function(t,e,n){this._super({stroke:1,color:"#f0f0f0",...t},e,n)},onDoubleClick:function(){},isMemberSelectable:function(t,e){return e},isMemberDraggable:function(t,e){return e},setCanvas:function(t){return this._super(t),null!==t&&this.toBack(),this}})},"./src/shape/composite/Group.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.composite.Group=i.default.shape.composite.StrongComposite.extend({NAME:"draw2d.shape.composite.Group",init:function(t,e,n){this._super(extend({bgColor:null,color:null,resizeable:!1},t),e,n),this.stickFigures=!1},isMemberSelectable:function(t,e){return!1},isMemberDraggable:function(t,e){return!1},setPosition:function(t,e){let n=this.x,r=this.y;this._super(t,e);let i=this.x-n,s=this.y-r;return 0===i&&0===s||!1===this.stickFigures&&this.assignedFigures.each((function(t,e){e.translate(i,s)})),this},assignFigure:function(t){if(!this.assignedFigures.contains(t)){let e=this;this.stickFigures=!0,!0===this.assignedFigures.isEmpty()?this.setBoundingBox(t.getBoundingBox()):this.setBoundingBox(this.getBoundingBox().merge(t.getBoundingBox())),this.assignedFigures.add(t),t.setComposite(this),t.setSelectionAdapter((function(){return e})),this.stickFigures=!1}return this},unassignFigure:function(t){if(this.assignedFigures.contains(t)){if(this.stickFigures=!0,t.setComposite(null),t.setSelectionAdapter(null),this.assignedFigures.remove(t),!this.assignedFigures.isEmpty()){let t=this.assignedFigures.first().getBoundingBox();this.assignedFigures.each((function(e,n){t.merge(n.getBoundingBox())})),this.setBoundingBox(t)}this.stickFigures=!1}return this},createCommand:function(t){return null===t?null:t.getPolicy()===i.default.command.CommandType.DELETE?this.isDeleteable()?new i.default.command.CommandDeleteGroup(this):null:this._super(t)}})},"./src/shape/composite/Jailhouse.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.composite.Jailhouse=i.default.shape.composite.StrongComposite.extend({NAME:"draw2d.shape.composite.Jailhouse",init:function(t,e,n){this.policy=new i.default.policy.figure.RegionEditPolicy(0,0,10,10),this._super(extend({bgColor:"#f0f0f0",color:"#333333"},t),e,n),this.stickFigures=!1},setDimension:function(t,e){this._super(t,e),this.policy.setBoundingBox(this.getAbsoluteBounds())},setPosition:function(t,e){let n=this.x,r=this.y;this._super(t,e);let i=this.x-n,s=this.y-r;return 0===i&&0===s||(this.policy.getBoundingBox().setPosition(t,e),!1===this.stickFigures&&this.assignedFigures.each((function(t,e){e.translate(i,s)}))),this},assignFigure:function(t){return this.assignedFigures.contains(t)||t===this||(this.stickFigures=!0,this.setBoundingBox(this.getBoundingBox().merge(t.getBoundingBox())),this.assignedFigures.add(t),t.setComposite(this),t.installEditPolicy(this.policy),t.toFront(this),this.stickFigures=!1),this},getAssignedFigures:function(){return this.assignedFigures},unassignFigure:function(t){if(this.assignedFigures.contains(t)){if(this.stickFigures=!0,t.setComposite(null),t.uninstallEditPolicy(this.policy),this.assignedFigures.remove(t),!this.assignedFigures.isEmpty()){let t=this.assignedFigures.first().getBoundingBox();this.assignedFigures.each((function(e,n){t.merge(n.getBoundingBox())})),this.setBoundingBox(t)}this.stickFigures=!1}return this},onCatch:function(t,e,n,r,s){this.getCanvas().getCommandStack().execute(new i.default.command.CommandAssignFigure(t,this))},getMinWidth:function(){let t=0;return this.assignedFigures.each((function(e,n){t=Math.max(t,n.getBoundingBox().getRight())})),t-this.getAbsoluteX()},getMinHeight:function(){let t=0;return this.assignedFigures.each((function(e,n){t=Math.max(t,n.getBoundingBox().getBottom())})),t-this.getAbsoluteY()}})},"./src/shape/composite/Raft.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.composite.Raft=i.default.shape.composite.WeakComposite.extend({NAME:"draw2d.shape.composite.Raft",init:function(t,e,n){this.aboardFigures=new i.default.util.ArrayList,this._super({bgColor:"#f0f0f0",color:"#1B1B1B",...t},e,n),this.installEditPolicy(new i.default.policy.figure.RaftSelectionFeedbackPolicy)},onDragStart:function(t,e,n,r){return this._super(t,e,n,r),this.aboardFigures=new i.default.util.ArrayList,this.getAboardFigures(this.isInDragDrop),!0},setPosition:function(t,e,n){let r=this.x,s=this.y,a=n?i.default.util.ArrayList.EMPTY_LIST:this.getAboardFigures(!1===this.isInDragDrop);this._super(t,e);let o=this.x-r,c=this.y-s;return 0===o&&0===c||(null!==this.canvas&&(a=a.clone(),this.canvas.getLines().each(((t,e)=>{e instanceof i.default.Connection&&a.contains(e.getSource().getRoot())&&a.contains(e.getTarget().getRoot())&&a.add(e)}))),a.each(((t,e)=>{e.translate(o,c)}))),this},onDrag:function(t,e,n,r,s,a){this.editPolicy.each(((n,r)=>{if(r instanceof i.default.policy.figure.DragDropEditPolicy){let n=r.adjustPosition(this,this.ox+t,this.oy+e);n&&(t=n.x-this.ox,e=n.y-this.oy)}}));let o=new i.default.geo.Point(this.ox+t,this.oy+e);this.getCanSnapToHelper()&&(o=this.getCanvas().snapToHelper(this,o)),this.setPosition(o.x,o.y,s),this.editPolicy.each(((t,e)=>{e instanceof i.default.policy.figure.DragDropEditPolicy&&e.onDrag(this.canvas,this)})),this.fireEvent("drag",{dx:t,dy:e,dx2:n,dy2:r,shiftKey:s,ctrlKey:a})},getAboardFigures:function(t){if(!0===t&&null!==this.canvas){let t=this.getBoundingBox(),e=this.getZOrder();this.aboardFigures=new i.default.util.ArrayList;let n=this;this.getCanvas().getFigures().each((function(r,i){if(i!==n&&!0===i.isSelectable()&&i.getBoundingBox().isInside(t)){if(n.getNextComposite(i)!==n)return;i.getZOrder()>e&&n.aboardFigures.add(i)}}))}return this.aboardFigures},getNextComposite:function(t){let e=null;return this.getCanvas().getFigures().each(((n,r)=>{if(t!==r&&r instanceof i.default.shape.composite.Composite){if(null!==e&&e.getZOrder()>r.getZOrder())return;r.getBoundingBox().contains(t.getBoundingBox())&&(e=r)}})),e}})},"./src/shape/composite/RaftResizeHandle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.composite.RaftResizeHandle=i.default.ResizeHandle.extend({NAME:"draw2d.shape.composite.RaftResizeHandle",init:function(t,e,n){this._super(t,e,n)},onDrag:function(t,e,n,r,s,a){if(!1===this.isDraggable())return;let o=this.getAbsoluteX(),c=this.getAbsoluteY();i.default.shape.basic.Rectangle.prototype.onDrag.call(this,t,e,n,r);let l=this.getAbsoluteX()-o,h=this.getAbsoluteY()-c,u=this.owner,d=u.getAbsoluteX(),p=u.getAbsoluteY(),f=u.getWidth(),g=u.getHeight(),m=null,y=null,x=null,v=!0===s;switch(this.type){case 1:u.setDimension(f-l,g-h),m=d+(f-u.getWidth()),y=p+(g-u.getHeight()),u.setPosition(m,y,v);break;case 2:u.setDimension(f,g-h),m=d,y=p+(g-u.getHeight()),u.setPosition(m,y,v);break;case 3:u.setDimension(f+l,g-h),m=d,y=p+(g-u.getHeight()),u.setPosition(m,y,v);break;case 4:u.setDimension(f+l,g);break;case 5:u.setDimension(f+l,g+h);break;case 6:u.setDimension(f,g+h);break;case 7:u.setDimension(f-l,g+h),m=d+(f-u.getWidth()),y=p,u.setPosition(m,y,v);break;case 8:u.setDimension(f-l,g),m=d+(f-u.getWidth()),y=p,u.setPosition(m,y,v)}null!==m&&(x=u.getPosition(),x.x===m&&x.y===y||u.setDimension(u.getWidth()-(x.x-m),u.getHeight()-(x.y-y)))}})},"./src/shape/composite/StrongComposite.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.composite.StrongComposite=i.default.shape.composite.Composite.extend({NAME:"draw2d.shape.composite.StrongComposite",init:function(t,e,n){this.assignedFigures=new i.default.util.ArrayList,this._super(t,e,n)},contains:function(t){for(let e=0,n=this.assignedFigures.getSize();e<n;e++){let n=this.assignedFigures.get(e);if(n===t||n.contains(t))return!0}return this._super(t)},assignFigure:function(t){return this},unassignFigure:function(t){return this},getAssignedFigures:function(){return this.assignedFigures},onDrop:function(t,e,n,r,i){},onCatch:function(t,e,n,r,i){},toFront:function(t){this._super(t);let e=this.getAssignedFigures().clone();e.sort((function(t,e){return t.getZOrder()>e.getZOrder()?-1:1}));let n=this;return e.each((function(t,e){e.toFront(n)})),this},toBack:function(t){this._super(t);let e=this.getAssignedFigures().clone();e.sort((function(t,e){return t.getZOrder()>e.getZOrder()?-1:1}));let n=this;return e.each((function(t,e){e.toBack(n)})),this}})},"./src/shape/composite/WeakComposite.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.composite.WeakComposite=i.default.shape.composite.Composite.extend({NAME:"draw2d.shape.composite.WeakComposite",init:function(t,e,n){this._super(t,e,n)}})},"./src/shape/diagram/Diagram.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.diagram.Diagram=i.default.SetFigure.extend({init:function(t,e,n){this.data=[],this.cache={},this._super({data:[],bgColor:"#8dabf2",stroke:1,color:"#f0f0f0",radius:2,resizeable:!0,...t},{data:this.setData,...e},{data:this.getData,...n})},setData:function(t){this.data=t,this.cache={},null!==this.svgNodes&&(this.svgNodes.remove(),this.svgNodes=this.createSet()),this.repaint(),this.fireEvent("change:data",{value:t})},getData:function(){return this.data},setDimension:function(t,e){return this.cache={},this._super(t,e),this},getWidth:function(){return this.width},getHeight:function(){return this.height},repaint:function(t){return!0===this.repaintBlocked||null==this.shape?this:(t??={},t.fill??="none",this._super(t))},applyTransformation:function(){return!0===this.isResizeable()?this.svgNodes.transform("S"+this.scaleX+","+this.scaleY+","+this.getAbsoluteX()+","+this.getAbsoluteY()+"t"+this.getAbsoluteX()+","+this.getAbsoluteY()):this.svgNodes.transform("T"+this.getAbsoluteX()+","+this.getAbsoluteY()),this}})},"./src/shape/diagram/Pie.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.diagram.Pie=i.default.shape.diagram.Diagram.extend({NAME:"draw2d.shape.diagram.Pie",COLORS:["#00A8F0","#b9dd69","#f3546a","#4DA74D","#9440ED"],TWO_PI:2*Math.PI,init:function(t,e,n){this._super({stroke:0,...t},{diameter:this.setDiameter,radius:this.setRadius,...e},{diameter:this.getDiameter,radius:this.getRadius,...n})},setDiameter:function(t){let e=this.getCenter();return this.setDimension(t,t),this.setCenter(e),this.fireEvent("change:diameter",{value:this.width}),this},getDiameter:function(){return this.getWidth()},setRadius:function(t){return this.setDiameter(2*t),this.fireEvent("change:radius",{value:this.width/2}),this},getCenter:function(){let t=this.getDiameter()/2;return this.getPosition().translate(t,t)},setCenter:function(t,e){let n=new i.default.geo.Point(t,e),r=this.getDiameter()/2;return n.translate(-r,-r),this.setPosition(n),this.fireEvent("change:center",{value:{x:t,y:e}}),this},setData:function(t){this.sum=0,t.forEach((t=>{this.sum+=t}));let e=1/this.sum;return t.forEach(((n,r)=>{t[r]=e*n})),this._super(t),this.fireEvent("change:data",{value:t}),this},createSet:function(){let t=this.getWidth()/2,e=this.data.length,n=this.canvas.paper.set(),r=0;for(let i=0;i<e;i++){let s=this.TWO_PI*this.data[i],a=this.COLORS[i%e],o=this.drawSegment(t,s,r,.1);o.attr({stroke:this.color.rgba(),fill:a}),n.push(o),r+=s}return n},setDimension:function(t,e){return t>e?this._super(t,t):this._super(e,e),null!==this.svgNodes&&(this.svgNodes.remove(),this.svgNodes=this.createSet()),this.repaint(),this},polarPath:function(t,e,n){let r,i;return r=t*Math.cos(e+n)+t,i=t*Math.sin(e+n)+t,"L "+r+" "+i+" "},drawSegment:function(t,e,n,r){let i="M "+t+" "+t;for(let s=0;s<e;s+=r)i+=this.polarPath(t,s,n);return i+=this.polarPath(t,e,n),i+="L "+t+" "+t,this.getCanvas().paper.path(i)},applyTransformation:function(){return this.svgNodes.transform("T"+this.getAbsoluteX()+","+this.getAbsoluteY()),this}})},"./src/shape/diagram/Sparkline.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.diagram.Sparkline=i.default.shape.diagram.Diagram.extend({NAME:"draw2d.shape.diagram.Sparkline",init:function(t,e,n){this.min=0,this.max=10,this.padding=4,this._super({width:180,height:50,...t},e,n)},setData:function(t){return t.length>0?(this.min=Math.min(...t),this.max=Math.max(...t)):(this.min=0,this.max=1),this.max===this.min&&(this.max=this.min+1),this._super(t),this.fireEvent("change:data",{value:t}),this},createSet:function(){return this.canvas.paper.path("M0 0 l0 0")},repaint:function(t){if(!0===this.repaintBlocked||null===this.shape)return;t??={},t.fill="90-#000:5-#4d4d4d:95";let e=this.padding,n=this.getWidth()-2*e,r=this.getHeight()-2*e,i=this.data.length,s=this.min,a=this.max;if(null!==this.svgNodes&&void 0===this.cache.pathString){let t=null;this.data.forEach(((o,c)=>{let l=function(t,o){let c=1;return i>1&&(c=n/(i-1)),{y:-(t-s)/(a-s)*r+r+e,x:e+o*c}}(o,c);this.cache.pathString=null===t?["M",l.x,l.y].join(" "):[this.cache.pathString,"L",l.x,l.y].join(" "),t=l})),this.svgNodes.attr({path:this.cache.pathString,stroke:"#f0f0f0"})}return this._super(t),this}})},"./src/shape/dimetric/Rectangle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.dimetric.Rectangle=i.default.shape.basic.Polygon.extend({NAME:"draw2d.shape.dimetric.Rectangle",init:function(t,e,n){this._super(extend({bgColor:"#00a3f6",color:"#1B1B1B"},t),e,n);let r=this.getPosition();this.resetVertices();let s=Math.atan(.5),a=Math.cos(s),o=Math.sin(s),c=this.getBoundingBox(),l=c.w,h=c.h;this.addVertex(0,0),this.addVertex(a*l,o*l),this.addVertex(a*l-a*h,o*l+o*h),this.addVertex(-a*h,o*h),this.installEditPolicy(new i.default.policy.figure.RectangleSelectionFeedbackPolicy),this.setPosition(r)}})},"./src/shape/flowchart/Document.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.flowchart.Document=i.default.VectorFigure.extend({NAME:"draw2d.shape.flowchart.Document",init:function(t,e,n){this.amplitude=.08,this._super(extend({width:80,height:50,bgColor:"#2196f3",color:"#1B1B1B",stroke:1},t),e,n)},createShapeElement:function(){return this.canvas.paper.path(this.calcPath())},calcPath:function(){let t=this.getWidth(),e=this.getHeight(),n=t/2,r=t/4,i=e*this.amplitude|0;return["M",this.getAbsoluteX(),",",this.getAbsoluteY(),"l",t,",",0,"l",0,",",e-i,"q",-r,",",-i,-n,",",0,"q",-r,",",i,-n,",",0,"z"].join(" ")},repaint:function(t){if(!0!==this.repaintBlocked&&null!==this.shape)return t=extend({},{path:this.calcPath()},t),this._super(t),this}})},"./src/shape/icon/Acw.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Acw=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Acw",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M19.275,3.849l1.695,8.56l1.875-1.642c2.311,3.59,1.72,8.415-1.584,11.317c-2.24,1.96-5.186,2.57-7.875,1.908l-0.84,3.396c3.75,0.931,7.891,0.066,11.02-2.672c4.768-4.173,5.521-11.219,1.94-16.279l2.028-1.775L19.275,3.849zM8.154,20.232c-2.312-3.589-1.721-8.416,1.582-11.317c2.239-1.959,5.186-2.572,7.875-1.909l0.842-3.398c-3.752-0.93-7.893-0.067-11.022,2.672c-4.765,4.174-5.519,11.223-1.939,16.283l-2.026,1.772l8.26,2.812l-1.693-8.559L8.154,20.232z")}})},"./src/shape/icon/Alarm.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Alarm=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Alarm",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M8.179,20.115c-0.478,0.277-0.642,0.889-0.365,1.366c0.275,0.479,0.889,0.642,1.365,0.366c0.479-0.275,0.643-0.888,0.367-1.367C9.27,20.004,8.658,19.84,8.179,20.115zM9.18,12.239c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,13.126,9.657,12.516,9.18,12.239zM8.625,17.043c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,18.043,8.624,17.596,8.625,17.043zM16.312,3.957V3.031h1c0.275,0,0.5-0.225,0.5-0.5v-0.5c0-0.275-0.225-0.5-0.5-0.5h-3.625c-0.275,0-0.5,0.225-0.5,0.5v0.5c0,0.275,0.225,0.5,0.5,0.5h1v0.926C7.819,4.381,2.376,10.068,2.374,17.042C2.376,24.291,8.251,30.166,15.5,30.169c7.249-0.003,13.124-5.878,13.125-13.127C28.624,10.067,23.181,4.38,16.312,3.957zM15.5,27.166C9.909,27.157,5.385,22.633,5.375,17.042C5.385,11.451,9.909,6.927,15.5,6.917c5.59,0.01,10.115,4.535,10.124,10.125C25.615,22.633,21.091,27.157,15.5,27.166zM12.062,22.998c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,23.887,12.54,23.275,12.062,22.998zM12.062,11.088c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,11.2,11.584,11.364,12.062,11.088zM22.822,13.971c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,14.083,22.344,14.247,22.822,13.971zM15.501,23.92c-0.552,0-1,0.447-1,1c0,0.552,0.448,1,1,1s1-0.448,1-1C16.501,24.367,16.053,23.92,15.501,23.92zM19.938,9.355c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,10.245,20.418,9.632,19.938,9.355zM23.378,16.042c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,16.492,23.929,16.042,23.378,16.042zM22.823,20.115c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.091,0.367,1.367c0.477,0.275,1.089,0.112,1.365-0.366C23.464,21.004,23.3,20.391,22.823,20.115zM15.501,8.167c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.366c0.275,0.479,0.889,0.642,1.365,0.366l3.305-1.676c0.055,0.006,0.109,0.017,0.166,0.017c0.828,0,1.5-0.672,1.5-1.5l-0.5-7.876C16.501,8.614,16.053,8.167,15.501,8.167zM18.939,22.998c-0.479,0.276-0.643,0.888-0.366,1.367c0.275,0.477,0.888,0.642,1.366,0.365c0.478-0.276,0.642-0.889,0.366-1.365C20.028,22.886,19.417,22.723,18.939,22.998zM11.197,3.593c-0.836-1.04-2.103-1.718-3.541-1.718c-2.52,0-4.562,2.042-4.562,4.562c0,0.957,0.297,1.843,0.8,2.576C5.649,6.484,8.206,4.553,11.197,3.593zM27.106,9.014c0.503-0.733,0.8-1.619,0.8-2.576c0-2.52-2.043-4.562-4.562-4.562c-1.438,0-2.704,0.678-3.541,1.717C22.794,4.553,25.351,6.484,27.106,9.014z")}})},"./src/shape/icon/Anonymous.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Anonymous=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Anonymous",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h26.954C28.977,26.709,29.039,24.332,28.523,23.813zM16.618,13.693c-0.398-0.251-0.783-1.211-0.783-1.64c0-0.133,0-0.236,0-0.236c-0.105-0.106-0.574-0.096-0.67,0c0,0,0,0.104,0,0.236c0,0.429-0.385,1.389-0.783,1.64c-0.399,0.251-1.611,0.237-2.084-0.236c-0.473-0.473-0.524-1.663-0.643-1.78c-0.118-0.119-0.185-0.185-0.185-0.185l0.029-0.414c0,0,0.842-0.207,1.699-0.207s1.803,0.502,1.803,0.502c0.231-0.074,0.784-0.083,0.996,0c0,0,0.945-0.502,1.803-0.502s1.699,0.207,1.699,0.207l0.029,0.414c0,0-0.066,0.066-0.185,0.185c-0.118,0.118-0.169,1.308-0.643,1.78C18.229,13.93,17.018,13.944,16.618,13.693z")}})},"./src/shape/icon/Apple.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Apple=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Apple",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.32,10.85c-1.743,1.233-2.615,2.719-2.615,4.455c0,2.079,1.078,3.673,3.232,4.786c-0.578,1.677-1.416,3.134-2.514,4.375c-1.097,1.241-2.098,1.862-3.004,1.862c-0.427,0-1.009-0.143-1.748-0.423l-0.354-0.138c-0.725-0.281-1.363-0.423-1.92-0.423c-0.525,0-1.1,0.11-1.725,0.331l-0.445,0.16l-0.56,0.229c-0.441,0.176-0.888,0.264-1.337,0.264c-1.059,0-2.228-0.872-3.507-2.616c-1.843-2.498-2.764-5.221-2.764-8.167c0-2.095,0.574-3.781,1.725-5.061c1.149-1.279,2.673-1.92,4.568-1.92c0.709,0,1.371,0.13,1.988,0.389l0.423,0.172l0.445,0.183c0.396,0.167,0.716,0.251,0.959,0.251c0.312,0,0.659-0.072,1.04-0.217l0.582-0.229l0.435-0.16c0.693-0.251,1.459-0.377,2.297-0.377C21.512,8.576,23.109,9.334,24.32,10.85zM19.615,3.287c0.021,0.267,0.033,0.473,0.033,0.617c0,1.317-0.479,2.473-1.438,3.467s-2.075,1.49-3.347,1.49c-0.038-0.297-0.058-0.51-0.058-0.639c0-1.12,0.445-2.171,1.337-3.153c0.891-0.982,1.922-1.558,3.096-1.725C19.32,3.329,19.447,3.311,19.615,3.287z")}})},"./src/shape/icon/Apps.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Apps=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Apps",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.359,18.424l-2.326,1.215c0.708,1.174,1.384,2.281,1.844,3.033l2.043-1.066C25.538,20.822,24.966,19.652,24.359,18.424zM19.143,14.688c0.445,0.84,1.342,2.367,2.274,3.926l2.414-1.261c-0.872-1.769-1.72-3.458-2.087-4.122c-0.896-1.621-1.982-3.108-3.454-5.417c-1.673-2.625-3.462-5.492-4.052-4.947c-1.194,0.384,1.237,4.094,1.876,5.715C16.73,10.147,17.991,12.512,19.143,14.688zM26.457,22.673l-1.961,1.022l1.982,4.598c0,0,0.811,0.684,1.92,0.213c1.104-0.469,0.81-1.706,0.81-1.706L26.457,22.673zM24.35,15.711c0.168,0.339,2.924,5.93,2.924,5.93h1.983v-5.93H24.35zM18.34,15.704h-4.726l-3.424,5.935h11.66C21.559,21.159,18.771,16.479,18.34,15.704zM3.231,21.613l3.437-5.902H2.083v5.93h1.133L3.231,21.613zM15.048,10.145c0-0.93-0.754-1.685-1.685-1.685c-0.661,0-1.231,0.381-1.507,0.936l2.976,1.572C14.97,10.725,15.048,10.444,15.048,10.145zM14.343,12.06l-3.188-1.684L9.62,13.012l3.197,1.689L14.343,12.06zM3.192,26.886l-0.384,1.108v0.299l0.298-0.128l0.725-0.896l2.997-2.354l-3.137-1.651L3.192,26.886zM9.02,14.044l-4.757,8.17l3.23,1.706l4.728-8.186L9.02,14.044z")}})},"./src/shape/icon/ArrowDown.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ArrowDown=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ArrowDown",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M5.318,6.684L15.5,24.316L25.682,6.684H5.318z")}})},"./src/shape/icon/ArrowLeft.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ArrowLeft=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ArrowLeft",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.316,5.318L6.684,15.5l17.632,10.182V5.318L24.316,5.318z")}})},"./src/shape/icon/ArrowLeft2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ArrowLeft2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ArrowLeft2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.871,9.814 15.684,16.001 21.871,22.188 18.335,25.725 8.612,16.001 18.335,6.276z")}})},"./src/shape/icon/ArrowRight.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ArrowRight=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ArrowRight",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M6.684,25.682L24.316,15.5L6.684,5.318V25.682z")}})},"./src/shape/icon/ArrowRight2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ArrowRight2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ArrowRight2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M10.129,22.186 16.316,15.999 10.129,9.812 13.665,6.276 23.389,15.999 13.665,25.725z")}})},"./src/shape/icon/ArrowUp.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ArrowUp=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ArrowUp",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.682,24.316L15.5,6.684L5.318,24.316H25.682z")}})},"./src/shape/icon/Aumade.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Aumade=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Aumade",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M14.513,24.52c-0.131-0.217-0.14-0.481-0.022-0.711l1.987-3.844l0,0c0.186-0.357,0.625-0.497,0.981-0.312c0.357,0.188,0.498,0.625,0.312,0.982l-1.801,3.48l2.228,3.699h12.269l-14.8-25.631L6.433,18.178c0.434,0.242,0.909,0.479,1.391,0.654c0.571,0.211,1.148,0.342,1.658,0.342c0.276,0,0.579-0.078,0.916-0.238c0.337-0.158,0.7-0.396,1.073-0.688c0.749-0.582,1.527-1.354,2.334-2.021c0.539-0.442,1.091-0.844,1.706-1.099c0.352-0.145,0.729-0.239,1.128-0.239c0.622,0,1.174,0.214,1.622,0.5c0.449,0.287,0.813,0.646,1.11,0.995c0.59,0.697,0.902,1.359,0.924,1.394l0,0c0.18,0.361,0.021,0.801-0.341,0.977c-0.356,0.176-0.798,0.021-0.978-0.34c0-0.002-0.002-0.004-0.004-0.007c-0.002-0.011-0.008-0.021-0.018-0.034c-0.018-0.033-0.043-0.082-0.078-0.146c-0.07-0.125-0.179-0.305-0.312-0.496c-0.271-0.391-0.668-0.845-1.092-1.104c-0.281-0.178-0.561-0.272-0.844-0.272c-0.216,0-0.479,0.069-0.788,0.229c-0.309,0.153-0.653,0.396-1.016,0.688c-0.727,0.584-1.511,1.362-2.351,2.033c-0.562,0.445-1.15,0.853-1.809,1.103c-0.375,0.143-0.776,0.229-1.195,0.229c-0.749,0-1.48-0.181-2.164-0.433c-0.58-0.219-1.125-0.482-1.613-0.764L0.86,27.816h15.63L14.513,24.52zM18.214,22.242c0.222-0.557,0.537-1.217,0.963-1.848c0.427-0.627,0.957-1.232,1.646-1.646c0.379-0.229,0.812-0.391,1.282-0.438l-0.604-0.934l0,0c-0.22-0.339-0.123-0.789,0.215-1.009c0.341-0.219,0.789-0.123,1.013,0.216l1.545,2.391c0.184,0.274,0.147,0.646-0.075,0.893c-0.228,0.247-0.591,0.305-0.886,0.145c-0.354-0.191-0.646-0.258-0.901-0.258c-0.291,0-0.562,0.084-0.845,0.25c-0.277,0.164-0.562,0.414-0.813,0.719c-0.519,0.607-0.937,1.422-1.185,2.055c-0.111,0.285-0.387,0.466-0.678,0.466c-0.092,0-0.183-0.021-0.271-0.056C18.249,23.039,18.064,22.615,18.214,22.242z")}})},"./src/shape/icon/BarChart.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.BarChart=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.BarChart",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.25,8.375V28h6.5V8.375H21.25zM12.25,28h6.5V4.125h-6.5V28zM3.25,28h6.5V12.625h-6.5V28z")}})},"./src/shape/icon/BioHazard.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.BioHazard=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.BioHazard",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M26.154,13.988c-0.96-0.554-1.982-0.892-3.019-1.032c0.396-0.966,0.616-2.023,0.616-3.131c0-4.399-3.438-8.001-7.772-8.264c3.245,0.258,5.803,2.979,5.803,6.292c0,3.373-2.653,6.123-5.983,6.294v1.292c0.908,0.144,1.605,0.934,1.605,1.883c0,0.232-0.043,0.454-0.118,0.66l1.181,0.683c1.826-2.758,5.509-3.658,8.41-1.981c2.896,1.672,3.965,5.299,2.506,8.254C31.386,21.038,29.992,16.204,26.154,13.988zM4.122,16.587c2.92-1.686,6.628-0.764,8.442,2.034l1.141-0.657c-0.072-0.2-0.109-0.417-0.109-0.642c0-0.909,0.638-1.67,1.489-1.859v-1.319c-3.3-0.202-5.92-2.94-5.92-6.292c0-3.297,2.532-6.007,5.757-6.286c-4.312,0.285-7.729,3.875-7.729,8.258c0,1.078,0.206,2.106,0.581,3.05c-1.004,0.147-1.999,0.481-2.931,1.02c-3.812,2.201-5.209,6.985-3.264,10.87C0.174,21.823,1.251,18.244,4.122,16.587zM11.15,11.452c0.114,0.139,0.235,0.271,0.362,0.398c0.126,0.126,0.259,0.247,0.397,0.361c0.102,0.084,0.211,0.16,0.318,0.236c0.93-0.611,2.045-0.969,3.244-0.969c1.201,0,2.312,0.357,3.242,0.969c0.107-0.077,0.217-0.152,0.318-0.236c0.139-0.114,0.271-0.235,0.397-0.361c0.127-0.127,0.248-0.259,0.362-0.398c0.113-0.138,0.222-0.283,0.323-0.431c-1.307-0.956-2.908-1.528-4.643-1.528c-0.042,0-0.083-0.001-0.124,0c-0.019,0-0.04-0.001-0.06,0c-1.666,0.038-3.201,0.605-4.462,1.528C10.929,11.17,11.037,11.314,11.15,11.452zM9.269,16.787c-0.168-0.062-0.338-0.117-0.512-0.164c-0.173-0.047-0.348-0.083-0.525-0.113c-0.177-0.03-0.355-0.053-0.535-0.065c-0.175,1.609,0.13,3.282,0.998,4.786c0.868,1.503,2.164,2.606,3.645,3.259c0.079-0.162,0.15-0.328,0.212-0.496c0.063-0.169,0.118-0.338,0.164-0.512c0.047-0.173,0.087-0.349,0.115-0.525c0.022-0.13,0.034-0.262,0.046-0.394c-0.993-0.5-1.86-1.286-2.461-2.325c-0.6-1.04-0.847-2.182-0.783-3.294C9.512,16.889,9.392,16.833,9.269,16.787zM18.122,22.657c0.014,0.132,0.024,0.263,0.046,0.394c0.03,0.177,0.067,0.352,0.113,0.524c0.047,0.174,0.102,0.346,0.165,0.514c0.062,0.169,0.132,0.333,0.212,0.495c1.48-0.653,2.777-1.755,3.644-3.257c0.868-1.504,1.176-3.179,1.001-4.788c-0.18,0.013-0.358,0.035-0.535,0.065c-0.177,0.029-0.353,0.067-0.525,0.113s-0.345,0.101-0.513,0.163c-0.124,0.047-0.241,0.105-0.362,0.16c0.063,1.11-0.183,2.253-0.784,3.292C19.984,21.373,19.116,22.157,18.122,22.657zM20.569,27.611c-2.92-1.687-3.977-5.358-2.46-8.329l-1.192-0.689c-0.349,0.389-0.854,0.634-1.417,0.634c-0.571,0-1.086-0.254-1.436-0.653l-1.146,0.666c1.475,2.96,0.414,6.598-2.488,8.272c-2.888,1.668-6.552,0.791-8.386-1.935c2.38,3.667,7.249,4.87,11.079,2.658c0.929-0.535,1.711-1.227,2.339-2.018c0.64,0.832,1.45,1.554,2.416,2.112c3.835,2.213,8.709,1.006,11.086-2.671C27.132,28.396,23.463,29.282,20.569,27.611z")}})},"./src/shape/icon/Book.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Book=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Book",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.754,4.626c-0.233-0.161-0.536-0.198-0.802-0.097L12.16,9.409c-0.557,0.213-1.253,0.316-1.968,0.316c-0.997,0.002-2.029-0.202-2.747-0.48C7.188,9.148,6.972,9.04,6.821,8.943c0.056-0.024,0.12-0.05,0.193-0.075L18.648,4.43l1.733,0.654V3.172c0-0.284-0.14-0.554-0.374-0.714c-0.233-0.161-0.538-0.198-0.802-0.097L6.414,7.241c-0.395,0.142-0.732,0.312-1.02,0.564C5.111,8.049,4.868,8.45,4.872,8.896c0,0.012,0.004,0.031,0.004,0.031v17.186c0,0.008-0.003,0.015-0.003,0.021c0,0.006,0.003,0.01,0.003,0.016v0.017h0.002c0.028,0.601,0.371,0.983,0.699,1.255c1.034,0.803,2.769,1.252,4.614,1.274c0.874,0,1.761-0.116,2.583-0.427l12.796-4.881c0.337-0.128,0.558-0.448,0.558-0.809V5.341C26.128,5.057,25.988,4.787,25.754,4.626zM5.672,11.736c0.035,0.086,0.064,0.176,0.069,0.273l0.004,0.054c0.016,0.264,0.13,0.406,0.363,0.611c0.783,0.626,2.382,1.08,4.083,1.093c0.669,0,1.326-0.083,1.931-0.264v1.791c-0.647,0.143-1.301,0.206-1.942,0.206c-1.674-0.026-3.266-0.353-4.509-1.053V11.736zM10.181,24.588c-1.674-0.028-3.266-0.354-4.508-1.055v-2.712c0.035,0.086,0.065,0.176,0.07,0.275l0.002,0.053c0.018,0.267,0.13,0.408,0.364,0.613c0.783,0.625,2.381,1.079,4.083,1.091c0.67,0,1.327-0.082,1.932-0.262v1.789C11.476,24.525,10.821,24.588,10.181,24.588z")}})},"./src/shape/icon/Bookmark.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Bookmark=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Bookmark",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M17.396,1.841L6.076,25.986l7.341-4.566l1.186,8.564l11.32-24.146L17.396,1.841zM19.131,9.234c-0.562-0.264-0.805-0.933-0.541-1.495c0.265-0.562,0.934-0.805,1.496-0.541s0.805,0.934,0.541,1.496S19.694,9.498,19.131,9.234z")}})},"./src/shape/icon/Books.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Books=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Books",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M26.679,7.858c-0.176-0.138-0.404-0.17-0.606-0.083l-9.66,4.183c-0.42,0.183-0.946,0.271-1.486,0.271c-0.753,0.002-1.532-0.173-2.075-0.412c-0.194-0.083-0.356-0.176-0.471-0.259c0.042-0.021,0.09-0.042,0.146-0.064l8.786-3.804l1.31,0.561V6.612c0-0.244-0.106-0.475-0.283-0.612c-0.176-0.138-0.406-0.17-0.605-0.083l-9.66,4.183c-0.298,0.121-0.554,0.268-0.771,0.483c-0.213,0.208-0.397,0.552-0.394,0.934c0,0.01,0.003,0.027,0.003,0.027v14.73c0,0.006-0.002,0.012-0.002,0.019c0,0.005,0.002,0.007,0.002,0.012v0.015h0.002c0.021,0.515,0.28,0.843,0.528,1.075c0.781,0.688,2.091,1.073,3.484,1.093c0.66,0,1.33-0.1,1.951-0.366l9.662-4.184c0.255-0.109,0.422-0.383,0.422-0.692V8.471C26.961,8.227,26.855,7.996,26.679,7.858zM20.553,5.058c-0.017-0.221-0.108-0.429-0.271-0.556c-0.176-0.138-0.404-0.17-0.606-0.083l-9.66,4.183C9.596,8.784,9.069,8.873,8.53,8.873C7.777,8.874,6.998,8.699,6.455,8.46C6.262,8.378,6.099,8.285,5.984,8.202C6.026,8.181,6.075,8.16,6.13,8.138l8.787-3.804l1.309,0.561V3.256c0-0.244-0.106-0.475-0.283-0.612c-0.176-0.138-0.407-0.17-0.606-0.083l-9.66,4.183C5.379,6.864,5.124,7.011,4.907,7.227C4.693,7.435,4.51,7.779,4.513,8.161c0,0.011,0.003,0.027,0.003,0.027v14.73c0,0.006-0.001,0.013-0.001,0.019c0,0.005,0.001,0.007,0.001,0.012v0.016h0.002c0.021,0.515,0.28,0.843,0.528,1.075c0.781,0.688,2.091,1.072,3.485,1.092c0.376,0,0.754-0.045,1.126-0.122V11.544c-0.01-0.7,0.27-1.372,0.762-1.856c0.319-0.315,0.708-0.564,1.19-0.756L20.553,5.058z")}})},"./src/shape/icon/Bubble.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Bubble=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Bubble",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z")}})},"./src/shape/icon/Bug.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Bug=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Bug",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.589,10.903l-5.828,1.612c-0.534-1.419-1.338-2.649-2.311-3.628l3.082-5.44c0.271-0.48,0.104-1.092-0.38-1.365c-0.479-0.271-1.09-0.102-1.36,0.377l-2.924,5.162c-0.604-0.383-1.24-0.689-1.9-0.896c-0.416-1.437-1.652-2.411-3.058-2.562c-0.001-0.004-0.002-0.008-0.003-0.012c-0.061-0.242-0.093-0.46-0.098-0.65c-0.005-0.189,0.012-0.351,0.046-0.479c0.037-0.13,0.079-0.235,0.125-0.317c0.146-0.26,0.34-0.43,0.577-0.509c0.023,0.281,0.142,0.482,0.352,0.601c0.155,0.088,0.336,0.115,0.546,0.086c0.211-0.031,0.376-0.152,0.496-0.363c0.105-0.186,0.127-0.389,0.064-0.607c-0.064-0.219-0.203-0.388-0.414-0.507c-0.154-0.087-0.314-0.131-0.482-0.129c-0.167,0.001-0.327,0.034-0.481,0.097c-0.153,0.063-0.296,0.16-0.429,0.289c-0.132,0.129-0.241,0.271-0.33,0.426c-0.132,0.234-0.216,0.496-0.25,0.783c-0.033,0.286-0.037,0.565-0.009,0.84c0.017,0.16,0.061,0.301,0.094,0.449c-0.375-0.021-0.758,0.002-1.14,0.108c-0.482,0.133-0.913,0.36-1.28,0.653c-0.052-0.172-0.098-0.344-0.18-0.518c-0.116-0.249-0.263-0.486-0.438-0.716c-0.178-0.229-0.384-0.41-0.618-0.543C9.904,3.059,9.737,2.994,9.557,2.951c-0.18-0.043-0.352-0.052-0.516-0.027s-0.318,0.08-0.463,0.164C8.432,3.172,8.318,3.293,8.23,3.445C8.111,3.656,8.08,3.873,8.136,4.092c0.058,0.221,0.181,0.384,0.367,0.49c0.21,0.119,0.415,0.138,0.611,0.056C9.31,4.556,9.451,4.439,9.539,4.283c0.119-0.21,0.118-0.443-0.007-0.695c0.244-0.055,0.497-0.008,0.757,0.141c0.081,0.045,0.171,0.115,0.27,0.208c0.097,0.092,0.193,0.222,0.286,0.388c0.094,0.166,0.179,0.368,0.251,0.608c0.013,0.044,0.023,0.098,0.035,0.146c-0.911,0.828-1.357,2.088-1.098,3.357c-0.582,0.584-1.072,1.27-1.457,2.035l-5.16-2.926c-0.48-0.271-1.092-0.102-1.364,0.377C1.781,8.404,1.95,9.016,2.43,9.289l5.441,3.082c-0.331,1.34-0.387,2.807-0.117,4.297l-5.828,1.613c-0.534,0.147-0.846,0.699-0.698,1.231c0.147,0.53,0.697,0.843,1.231,0.694l5.879-1.627c0.503,1.057,1.363,2.28,2.371,3.443l-3.194,5.639c-0.272,0.481-0.104,1.092,0.378,1.363c0.239,0.137,0.512,0.162,0.758,0.094c0.248-0.068,0.469-0.229,0.604-0.471l2.895-5.109c2.7,2.594,5.684,4.123,5.778,1.053c1.598,2.56,3.451-0.338,4.502-3.976l5.203,2.947c0.24,0.138,0.514,0.162,0.762,0.094c0.246-0.067,0.467-0.229,0.603-0.471c0.272-0.479,0.104-1.091-0.377-1.362l-5.701-3.229c0.291-1.505,0.422-2.983,0.319-4.138l5.886-1.627c0.53-0.147,0.847-0.697,0.696-1.229C29.673,11.068,29.121,10.756,28.589,10.903z")}})},"./src/shape/icon/Calendar.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Calendar=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Calendar",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M11.758,15.318c0.312-0.3,0.408-0.492,0.408-0.492h0.024c0,0-0.012,0.264-0.012,0.528v5.469h-1.871v1.031h4.87v-1.031H13.33v-7.436h-1.055l-2.027,1.967l0.719,0.744L11.758,15.318zM16.163,21.207c0,0.205,0.024,0.42,0.06,0.647h5.457v-1.031h-4.197c0.023-1.931,4.065-2.362,4.065-5.146c0-1.463-1.114-2.436-2.674-2.436c-1.907,0-2.675,1.607-2.675,1.607l0.875,0.587c0,0,0.6-1.08,1.716-1.08c0.887,0,1.522,0.563,1.522,1.403C20.312,17.754,16.163,18.186,16.163,21.207zM12,3.604h-2v3.335h2V3.604zM23,4.77v3.17h-4V4.77h-6v3.168H9.002V4.77H6.583v21.669h18.833V4.77H23zM24.417,25.438H7.584V10.522h16.833V25.438zM22,3.604h-2v3.335h2V3.604z")}})},"./src/shape/icon/Cart.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Cart=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Cart",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M29.02,11.754L8.416,9.473L7.16,4.716C7.071,4.389,6.772,4.158,6.433,4.158H3.341C3.114,3.866,2.775,3.667,2.377,3.667c-0.686,0-1.242,0.556-1.242,1.242c0,0.686,0.556,1.242,1.242,1.242c0.399,0,0.738-0.201,0.965-0.493h2.512l5.23,19.8c-0.548,0.589-0.891,1.373-0.891,2.242c0,1.821,1.473,3.293,3.293,3.293c1.82,0,3.294-1.472,3.297-3.293c0-0.257-0.036-0.504-0.093-0.743h5.533c-0.056,0.239-0.092,0.486-0.092,0.743c0,1.821,1.475,3.293,3.295,3.293s3.295-1.472,3.295-3.293c0-1.82-1.473-3.295-3.295-3.297c-0.951,0.001-1.801,0.409-2.402,1.053h-7.136c-0.601-0.644-1.451-1.052-2.402-1.053c-0.379,0-0.738,0.078-1.077,0.196l-0.181-0.685H26.81c1.157-0.027,2.138-0.83,2.391-1.959l1.574-7.799c0.028-0.145,0.041-0.282,0.039-0.414C30.823,12.733,30.051,11.86,29.02,11.754zM25.428,27.994c-0.163,0-0.295-0.132-0.297-0.295c0.002-0.165,0.134-0.297,0.297-0.297s0.295,0.132,0.297,0.297C25.723,27.862,25.591,27.994,25.428,27.994zM27.208,20.499l0.948-0.948l-0.318,1.578L27.208,20.499zM12.755,11.463l1.036,1.036l-1.292,1.292l-1.292-1.292l1.087-1.087L12.755,11.463zM17.253,11.961l0.538,0.538l-1.292,1.292l-1.292-1.292l0.688-0.688L17.253,11.961zM9.631,14.075l0.868-0.868l1.292,1.292l-1.292,1.292l-0.564-0.564L9.631,14.075zM9.335,12.956l-0.328-1.24L9.792,12.5L9.335,12.956zM21.791,16.499l-1.292,1.292l-1.292-1.292l1.292-1.292L21.791,16.499zM21.207,14.5l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,14.5zM18.5,15.791l-1.293-1.292l1.292-1.292l1.292,1.292L18.5,15.791zM17.791,16.499L16.5,17.791l-1.292-1.292l1.292-1.292L17.791,16.499zM14.499,15.791l-1.292-1.292l1.292-1.292l1.292,1.292L14.499,15.791zM13.791,16.499l-1.292,1.291l-1.292-1.291l1.292-1.292L13.791,16.499zM10.499,17.207l1.292,1.292l-0.785,0.784l-0.54-2.044L10.499,17.207zM11.302,20.404l1.197-1.197l1.292,1.292L12.5,21.791l-1.131-1.13L11.302,20.404zM13.208,18.499l1.291-1.292l1.292,1.292L14.5,19.791L13.208,18.499zM16.5,19.207l1.292,1.292L16.5,21.79l-1.292-1.291L16.5,19.207zM17.208,18.499l1.292-1.292l1.291,1.292L18.5,19.79L17.208,18.499zM20.499,19.207l1.292,1.292L20.5,21.79l-1.292-1.292L20.499,19.207zM21.207,18.499l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,18.499zM23.207,16.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,16.499zM25.207,14.499l1.292-1.292L27.79,14.5l-1.291,1.292L25.207,14.499zM24.499,13.792l-1.156-1.156l2.082,0.23L24.499,13.792zM21.791,12.5l-1.292,1.292L19.207,12.5l0.29-0.29l2.253,0.25L21.791,12.5zM14.5,11.791l-0.152-0.152l0.273,0.03L14.5,11.791zM10.5,11.792l-0.65-0.65l1.171,0.129L10.5,11.792zM14.5,21.207l1.205,1.205h-2.409L14.5,21.207zM18.499,21.207l1.206,1.206h-2.412L18.499,21.207zM22.499,21.207l1.208,1.207l-2.414-0.001L22.499,21.207zM23.207,20.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,20.499zM25.207,18.499l1.292-1.291l1.291,1.291l-1.291,1.292L25.207,18.499zM28.499,17.791l-1.291-1.292l1.291-1.291l0.444,0.444l-0.429,2.124L28.499,17.791zM29.001,13.289l-0.502,0.502l-0.658-0.658l1.016,0.112C28.911,13.253,28.956,13.271,29.001,13.289zM13.487,27.994c-0.161,0-0.295-0.132-0.295-0.295c0-0.165,0.134-0.297,0.295-0.297c0.163,0,0.296,0.132,0.296,0.297C13.783,27.862,13.651,27.994,13.487,27.994zM26.81,22.414h-1.517l1.207-1.207l0.93,0.93C27.243,22.306,27.007,22.428,26.81,22.414z")}})},"./src/shape/icon/Ccw.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Ccw=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Ccw",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z")}})},"./src/shape/icon/Chat.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Chat=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Chat",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.985,5.972c-7.563,0-13.695,4.077-13.695,9.106c0,2.877,2.013,5.44,5.147,7.108c-0.446,1.479-1.336,3.117-3.056,4.566c0,0,4.015-0.266,6.851-3.143c0.163,0.04,0.332,0.07,0.497,0.107c-0.155-0.462-0.246-0.943-0.246-1.443c0-3.393,3.776-6.05,8.599-6.05c3.464,0,6.379,1.376,7.751,3.406c1.168-1.34,1.847-2.892,1.847-4.552C29.68,10.049,23.548,5.972,15.985,5.972zM27.68,22.274c0-2.79-3.401-5.053-7.599-5.053c-4.196,0-7.599,2.263-7.599,5.053c0,2.791,3.403,5.053,7.599,5.053c0.929,0,1.814-0.116,2.637-0.319c1.573,1.597,3.801,1.744,3.801,1.744c-0.954-0.804-1.447-1.713-1.695-2.534C26.562,25.293,27.68,23.871,27.68,22.274z")}})},"./src/shape/icon/Check.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Check=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Check",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M2.379,14.729 5.208,11.899 12.958,19.648 25.877,6.733 28.707,9.561 12.958,25.308z")}})},"./src/shape/icon/Chrome.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Chrome=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Chrome",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.318,7.677c0.071-0.029,0.148-0.046,0.229-0.046h11.949c-2.533-3.915-6.938-6.506-11.949-6.506c-5.017,0-9.428,2.598-11.959,6.522l4.291,7.431C8.018,11.041,11.274,7.796,15.318,7.677zM28.196,8.84h-8.579c2.165,1.357,3.605,3.763,3.605,6.506c0,1.321-0.334,2.564-0.921,3.649c-0.012,0.071-0.035,0.142-0.073,0.209l-5.973,10.347c7.526-0.368,13.514-6.587,13.514-14.205C29.77,13.002,29.201,10.791,28.196,8.84zM15.547,23.022c-2.761,0-5.181-1.458-6.533-3.646c-0.058-0.046-0.109-0.103-0.149-0.171L2.89,8.855c-1,1.946-1.565,4.153-1.565,6.492c0,7.624,5.999,13.846,13.534,14.205l4.287-7.425C18.073,22.698,16.848,23.022,15.547,23.022zM9.08,15.347c0,1.788,0.723,3.401,1.894,4.573c1.172,1.172,2.785,1.895,4.573,1.895c1.788,0,3.401-0.723,4.573-1.895s1.895-2.785,1.895-4.573c0-1.788-0.723-3.4-1.895-4.573c-1.172-1.171-2.785-1.894-4.573-1.894c-1.788,0-3.401,0.723-4.573,1.894C9.803,11.946,9.081,13.559,9.08,15.347z")}})},"./src/shape/icon/Clip.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Clip=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Clip",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M23.898,6.135c-1.571-1.125-3.758-0.764-4.884,0.808l-8.832,12.331c-0.804,1.122-0.546,2.684,0.577,3.488c1.123,0.803,2.684,0.545,3.488-0.578l6.236-8.706l-0.813-0.583l-6.235,8.707h0c-0.483,0.672-1.42,0.828-2.092,0.347c-0.673-0.481-0.827-1.419-0.345-2.093h0l8.831-12.33l0.001-0.001l-0.002-0.001c0.803-1.119,2.369-1.378,3.489-0.576c1.12,0.803,1.379,2.369,0.577,3.489v-0.001l-9.68,13.516l0.001,0.001c-1.124,1.569-3.316,1.931-4.885,0.808c-1.569-1.125-1.93-3.315-0.807-4.885l7.035-9.822l-0.813-0.582l-7.035,9.822c-1.447,2.02-0.982,4.83,1.039,6.277c2.021,1.448,4.831,0.982,6.278-1.037l9.68-13.516C25.83,9.447,25.47,7.261,23.898,6.135z")}})},"./src/shape/icon/Clock.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Clock=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Clock",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z")}})},"./src/shape/icon/Cloud.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Cloud=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Cloud",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h15.875c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z")}})},"./src/shape/icon/Cloud2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Cloud2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Cloud2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M7.562,24.812c-3.313,0-6-2.687-6-6l0,0c0.002-2.659,1.734-4.899,4.127-5.684l0,0c0.083-2.26,1.937-4.064,4.216-4.066l0,0c0.73,0,1.415,0.19,2.01,0.517l0,0c1.266-2.105,3.57-3.516,6.208-3.517l0,0c3.947,0.002,7.157,3.155,7.248,7.079l0,0c2.362,0.804,4.062,3.034,4.064,5.671l0,0c0,3.313-2.687,6-6,6l0,0H7.562L7.562,24.812zM24.163,14.887c-0.511-0.095-0.864-0.562-0.815-1.079l0,0c0.017-0.171,0.027-0.336,0.027-0.497l0,0c-0.007-2.899-2.352-5.245-5.251-5.249l0,0c-2.249-0.002-4.162,1.418-4.911,3.41l0,0c-0.122,0.323-0.406,0.564-0.748,0.63l0,0c-0.34,0.066-0.694-0.052-0.927-0.309l0,0c-0.416-0.453-0.986-0.731-1.633-0.731l0,0c-1.225,0.002-2.216,0.993-2.22,2.218l0,0c0,0.136,0.017,0.276,0.045,0.424l0,0c0.049,0.266-0.008,0.54-0.163,0.762l0,0c-0.155,0.223-0.392,0.371-0.657,0.414l0,0c-1.9,0.313-3.352,1.949-3.35,3.931l0,0c0.004,2.209,1.792,3.995,4.001,4.001l0,0h15.874c2.209-0.006,3.994-1.792,3.999-4.001l0,0C27.438,16.854,26.024,15.231,24.163,14.887L24.163,14.887")}})},"./src/shape/icon/CloudDown.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.CloudDown=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.CloudDown",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h3.404l-0.707-0.707c-0.377-0.377-0.585-0.879-0.585-1.413c0-0.533,0.208-1.035,0.585-1.412l0.556-0.557c0.4-0.399,0.937-0.628,1.471-0.628c0.027,0,0.054,0,0.08,0.002v-0.472c0-1.104,0.898-2.002,2-2.002h3.266c1.103,0,2,0.898,2,2.002v0.472c0.027-0.002,0.054-0.002,0.081-0.002c0.533,0,1.07,0.229,1.47,0.63l0.557,0.552c0.78,0.781,0.78,2.05,0,2.828l-0.706,0.707h2.403c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z M21.033,20.986l-0.556-0.555c-0.39-0.389-0.964-0.45-1.276-0.137c-0.312,0.312-0.568,0.118-0.568-0.432v-1.238c0-0.55-0.451-1-1-1h-3.265c-0.55,0-1,0.45-1,1v1.238c0,0.55-0.256,0.744-0.569,0.432c-0.312-0.313-0.887-0.252-1.276,0.137l-0.556,0.555c-0.39,0.389-0.39,1.024-0.001,1.413l4.328,4.331c0.194,0.194,0.451,0.291,0.707,0.291s0.512-0.097,0.707-0.291l4.327-4.331C21.424,22.011,21.423,21.375,21.033,20.986z")}})},"./src/shape/icon/CloudUp.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.CloudUp=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.CloudUp",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h2.312c-0.126-0.266-0.2-0.556-0.2-0.859c0-0.535,0.208-1.04,0.587-1.415l4.325-4.329c0.375-0.377,0.877-0.585,1.413-0.585c0.54,0,1.042,0.21,1.417,0.587l4.323,4.329c0.377,0.373,0.585,0.878,0.585,1.413c0,0.304-0.073,0.594-0.2,0.859h1.312c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z M16.706,17.916c-0.193-0.195-0.45-0.291-0.706-0.291s-0.512,0.096-0.707,0.291l-4.327,4.33c-0.39,0.389-0.389,1.025,0.001,1.414l0.556,0.555c0.39,0.389,0.964,0.449,1.276,0.137s0.568-0.119,0.568,0.432v1.238c0,0.549,0.451,1,1,1h3.265c0.551,0,1-0.451,1-1v-1.238c0-0.551,0.256-0.744,0.569-0.432c0.312,0.312,0.887,0.252,1.276-0.137l0.556-0.555c0.39-0.389,0.39-1.025,0.001-1.414L16.706,17.916z")}})},"./src/shape/icon/Cloudy.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Cloudy=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Cloudy",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M14.378,6.781c0.41,0.988,1.938,0.346,1.524-0.648C15.708,5.667,15.515,5.2,15.32,4.734c-0.289-0.695-0.875-3.233-2.042-2.747c-1.03,0.433-0.128,1.846,0.142,2.494C13.739,5.248,14.059,6.015,14.378,6.781M20.8,7.223c1.094,0.453,1.538-1.551,1.813-2.216c0.281-0.677,1.478-2.565,0.357-3.029c-1.092-0.453-1.537,1.548-1.813,2.216C20.876,4.872,19.68,6.757,20.8,7.223M18.137,6.692c1.183,0,0.829-2.019,0.829-2.742c0-0.732,0.383-2.935-0.829-2.935c-1.183,0-0.828,2.019-0.828,2.742C17.309,4.49,16.926,6.692,18.137,6.692M23.058,8.729c0.852,0.85,2.142-0.972,2.659-1.49c0.512-0.513,2.187-1.687,1.352-2.524c-0.834-0.836-2.013,0.843-2.522,1.353C24.028,6.585,22.198,7.874,23.058,8.729M24.565,10.986c0.448,1.091,2.183-0.01,2.849-0.286c0.676-0.28,2.858-0.771,2.394-1.89c-0.455-1.091-2.181,0.008-2.849,0.285C26.281,9.377,24.102,9.866,24.565,10.986M12.036,8.742c0.752,0.75,1.932-0.415,1.17-1.173c-0.253-0.347-0.646-0.645-0.949-0.946c-0.541-0.539-2.162-2.799-3.068-1.889c-0.79,0.791,0.586,1.755,1.083,2.25C10.859,7.57,11.447,8.156,12.036,8.742M29.365,17.397c-0.768-0.317-1.534-0.635-2.302-0.952c-0.646-0.268-2.07-1.169-2.495-0.135c-0.481,1.168,2.054,1.747,2.751,2.035c0.455,0.188,0.911,0.377,1.367,0.565C29.7,19.331,30.379,17.816,29.365,17.397M29.942,12.817c-0.83,0-1.66,0-2.49,0c-0.701,0-2.357-0.288-2.355,0.83c0,1.262,2.567,0.827,3.319,0.827c0.493,0,0.986,0,1.479-0.001C30.99,14.473,31.043,12.815,29.942,12.817M24.234,18.568c-0.673-0.673-1.773,0.189-1.281,1.007c-0.295-0.264-0.614-0.499-0.961-0.69c3.894-2.866,3.328-9.006-1.021-11.107c-2.024-0.978-4.481-0.828-6.368,0.394c-0.871,0.564-1.603,1.336-2.119,2.236c-0.262,0.456-0.468,0.943-0.612,1.449c-0.074,0.258-0.131,0.521-0.172,0.786c-0.083,0.534-0.109,0.553-0.553,0.871c-0.182-0.957-1.64-0.675-2.326-0.674c-0.815,0.001-1.963-0.217-2.752,0.046c-0.867,0.289-0.652,1.615,0.263,1.613c0.324,0.052,0.701-0.001,1.028-0.001c0.904-0.001,1.809-0.002,2.713-0.003c-0.308,0.352-0.496,0.969-0.94,0.77c-0.467-0.209-0.978-0.319-1.49-0.319c-0.951,0-1.877,0.375-2.561,1.036c-0.681,0.658-1.088,1.569-1.123,2.516c-0.944,0.31-1.791,0.891-2.421,1.658c-2.756,3.354-0.265,8.554,4.058,8.554v-0.002c3.597,0,7.194,0,10.792,0c1.341,0,2.843,0.167,4.168-0.113c3.652-0.772,5.361-5.21,3.133-8.229c0.548,0.547,1.096,1.094,1.644,1.641c0.183,0.183,0.364,0.424,0.575,0.574c0.552,0.552,1.524,0.066,1.403-0.713c-0.097-0.622-1.042-1.267-1.448-1.673C25.319,19.652,24.776,19.11,24.234,18.568M18.137,8.787c4.559,0.009,6.576,5.979,2.912,8.734c-0.637-3.505-4.161-5.824-7.629-5.03C13.943,10.367,15.852,8.792,18.137,8.787M22.895,24.08c-0.633,3.346-4.149,2.879-6.68,2.879c-3.017,0-6.033,0-9.049,0c-0.767,0-1.62,0.084-2.373-0.095c-2.274-0.538-3.416-3.242-2.172-5.235c0.678-1.087,1.568-1.19,2.626-1.67c0.604-0.273,0.456-0.807,0.456-1.331c0.002-0.597,0.284-1.169,0.756-1.533c0.787-0.608,1.943-0.497,2.611,0.234c1.098,1.205,1.96-1.346,2.507-1.893c2.025-2.025,5.475-1.708,7.068,0.684c0.344,0.516,0.581,1.102,0.693,1.712c0.097,0.529-0.115,1.341,0.188,1.796c0.291,0.47,0.943,0.463,1.397,0.68c0.508,0.23,0.963,0.591,1.304,1.034C22.834,22.125,23.064,23.107,22.895,24.08M6.906,9.917c0.881,0.364,1.763,0.727,2.644,1.091c0.353,0.146,0.707,0.292,1.06,0.437c0.997,0.412,1.637-1.119,0.642-1.526C10.47,9.441,9.456,9.177,8.609,8.828c-0.354-0.146-0.707-0.292-1.06-0.437C6.554,7.98,5.912,9.505,6.906,9.917")}})},"./src/shape/icon/Code.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Code=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Code",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M8.982,7.107L0.322,15.77l8.661,8.662l3.15-3.15L6.621,15.77l5.511-5.511L8.982,7.107zM21.657,7.107l-3.148,3.151l5.511,5.511l-5.511,5.511l3.148,3.15l8.662-8.662L21.657,7.107z")}})},"./src/shape/icon/CodeTalk.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.CodeTalk=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.CodeTalk",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM13.704,19.47l-2.338,2.336l-6.43-6.431l6.429-6.432l2.339,2.341l-4.091,4.091L13.704,19.47zM20.775,21.803l-2.337-2.339l4.092-4.09l-4.092-4.092l2.337-2.339l6.43,6.426L20.775,21.803z")}})},"./src/shape/icon/CommandLine.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.CommandLine=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.CommandLine",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M2.021,9.748L2.021,9.748V9.746V9.748zM2.022,9.746l5.771,5.773l-5.772,5.771l2.122,2.123l7.894-7.895L4.143,7.623L2.022,9.746zM12.248,23.269h14.419V20.27H12.248V23.269zM16.583,17.019h10.084V14.02H16.583V17.019zM12.248,7.769v3.001h14.419V7.769H12.248z")}})},"./src/shape/icon/Connect.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Connect=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Connect",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.06,13.719c-0.944-5.172-5.461-9.094-10.903-9.094v4c3.917,0.006,7.085,3.176,7.094,7.094c-0.009,3.917-3.177,7.085-7.094,7.093v4.002c5.442-0.004,9.959-3.926,10.903-9.096h4.69v-3.999H25.06zM20.375,15.719c0-3.435-2.784-6.219-6.219-6.219c-2.733,0-5.05,1.766-5.884,4.218H1.438v4.001h6.834c0.833,2.452,3.15,4.219,5.884,4.219C17.591,21.938,20.375,19.153,20.375,15.719z")}})},"./src/shape/icon/Contract.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Contract=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Contract",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.083,18.895l-8.428-2.259l2.258,8.428l1.838-1.837l7.053,7.053l2.476-2.476l-7.053-7.053L25.083,18.895zM5.542,11.731l8.428,2.258l-2.258-8.428L9.874,7.398L3.196,0.72L0.72,3.196l6.678,6.678L5.542,11.731zM7.589,20.935l-6.87,6.869l2.476,2.476l6.869-6.869l1.858,1.857l2.258-8.428l-8.428,2.258L7.589,20.935zM23.412,10.064l6.867-6.87l-2.476-2.476l-6.868,6.869l-1.856-1.856l-2.258,8.428l8.428-2.259L23.412,10.064z")}})},"./src/shape/icon/Crop.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Crop=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Crop",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.303,21.707V8.275l4.48-4.421l-2.021-2.048l-4.126,4.07H8.761V2.083H5.882v3.793H1.8v2.877h4.083v15.832h15.542v4.609h2.878v-4.609H29.2v-2.878H24.303zM19.72,8.753L8.761,19.565V8.753H19.72zM10.688,21.706l10.735-10.591l0.001,10.592L10.688,21.706z")}})},"./src/shape/icon/Cross.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Cross=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Cross",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z")}})},"./src/shape/icon/Cube.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Cube=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Cube",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.5,3.029l-10.8,6.235L4.7,21.735L15.5,27.971l10.8-6.235V9.265L15.5,3.029zM24.988,10.599L16,15.789v10.378c0,0.275-0.225,0.5-0.5,0.5s-0.5-0.225-0.5-0.5V15.786l-8.987-5.188c-0.239-0.138-0.321-0.444-0.183-0.683c0.138-0.238,0.444-0.321,0.683-0.183l8.988,5.189l8.988-5.189c0.238-0.138,0.545-0.055,0.684,0.184C25.309,10.155,25.227,10.461,24.988,10.599z")}})},"./src/shape/icon/Customer.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Customer=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Customer",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h12.036l0.878-3.459l-0.781-0.781l1.344-1.344l1.344,1.344l-0.781,0.781l0.879,3.459h12.035C28.977,26.709,29.039,24.332,28.523,23.813z")}})},"./src/shape/icon/Db.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Db=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Db",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.499,23.438c-3.846,0-7.708-0.987-9.534-3.117c-0.054,0.236-0.09,0.48-0.09,0.737v3.877c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998v-3.877c0-0.258-0.036-0.501-0.09-0.737C23.209,22.451,19.347,23.438,15.499,23.438zM15.499,15.943c-3.846,0-7.708-0.987-9.533-3.117c-0.054,0.236-0.091,0.479-0.091,0.736v3.877c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998v-3.877c0-0.257-0.036-0.501-0.09-0.737C23.209,14.956,19.347,15.943,15.499,15.943zM15.5,1.066c-4.637,0-9.625,1.565-9.625,5.001v3.876c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998V6.067C25.125,2.632,20.137,1.066,15.5,1.066zM15.5,9.066c-4.211,0-7.625-1.343-7.625-3c0-1.656,3.414-3,7.625-3s7.625,1.344,7.625,3C23.125,7.724,19.711,9.066,15.5,9.066z")}})},"./src/shape/icon/Detour.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Detour=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Detour",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M29.342,15.5l-7.556-4.363v2.614H18.75c-1.441-0.004-2.423,1.002-2.875,1.784c-0.735,1.222-1.056,2.561-1.441,3.522c-0.135,0.361-0.278,0.655-0.376,0.817c-1.626,0-0.998,0-2.768,0c-0.213-0.398-0.571-1.557-0.923-2.692c-0.237-0.676-0.5-1.381-1.013-2.071C8.878,14.43,7.89,13.726,6.75,13.75H2.812v3.499c0,0,0.358,0,1.031,0h2.741c0.008,0.013,0.018,0.028,0.029,0.046c0.291,0.401,0.634,1.663,1.031,2.888c0.218,0.623,0.455,1.262,0.92,1.897c0.417,0.614,1.319,1.293,2.383,1.293H11c2.25,0,1.249,0,3.374,0c0.696,0.01,1.371-0.286,1.809-0.657c1.439-1.338,1.608-2.886,2.13-4.127c0.218-0.608,0.453-1.115,0.605-1.314c0.006-0.01,0.012-0.018,0.018-0.025h2.85v2.614L29.342,15.5zM10.173,14.539c0.568,0.76,0.874,1.559,1.137,2.311c0.04,0.128,0.082,0.264,0.125,0.399h2.58c0.246-0.697,0.553-1.479,1.005-2.228c0.252-0.438,0.621-0.887,1.08-1.272H9.43C9.735,14.003,9.99,14.277,10.173,14.539z")}})},"./src/shape/icon/Diagram.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Diagram=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Diagram",init:function(t,e,n){this._super({width:50,height:50,...t},e,n)},createSet:function(){return this.canvas.paper.path("M6.812,17.202l7.396-3.665v-2.164h-0.834c-0.414,0-0.808-0.084-1.167-0.237v1.159l-7.396,3.667v2.912h2V17.202zM26.561,18.875v-2.913l-7.396-3.666v-1.158c-0.358,0.152-0.753,0.236-1.166,0.236h-0.832l-0.001,2.164l7.396,3.666v1.672H26.561zM16.688,18.875v-7.501h-2v7.501H16.688zM27.875,19.875H23.25c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2h4.625c1.104,0,2-0.896,2-2v-4.625C29.875,20.771,28.979,19.875,27.875,19.875zM8.125,19.875H3.5c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2h4.625c1.104,0,2-0.896,2-2v-4.625C10.125,20.771,9.229,19.875,8.125,19.875zM13.375,10.375H18c1.104,0,2-0.896,2-2V3.75c0-1.104-0.896-2-2-2h-4.625c-1.104,0-2,0.896-2,2v4.625C11.375,9.479,12.271,10.375,13.375,10.375zM18,19.875h-4.625c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2H18c1.104,0,2-0.896,2-2v-4.625C20,20.771,19.104,19.875,18,19.875z")}})},"./src/shape/icon/Disconnect.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Disconnect=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Disconnect",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M9.219,9.5c-2.733,0-5.05,1.766-5.884,4.218H1.438v4.001h1.897c0.833,2.452,3.15,4.219,5.884,4.219c3.435,0,6.219-2.784,6.219-6.219S12.653,9.5,9.219,9.5zM27.685,13.719c-0.944-5.172-5.461-9.094-10.903-9.094v4c3.917,0.006,7.085,3.176,7.094,7.094c-0.009,3.917-3.177,7.085-7.094,7.093v4.002c5.442-0.004,9.959-3.926,10.903-9.096h2.065v-3.999H27.685z")}})},"./src/shape/icon/DockBottom.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.DockBottom=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.DockBottom",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M3.083,7.333v16.334h24.833V7.333H3.083zM24.915,16.833H6.083v-6.501h18.833L24.915,16.833L24.915,16.833z")}})},"./src/shape/icon/DockLeft.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.DockLeft=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.DockLeft",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M3.084,7.333v16.334h24.832V7.333H3.084z M11.667,10.332h13.251v10.336H11.667V10.332z")}})},"./src/shape/icon/DockRight.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.DockRight=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.DockRight",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M3.083,7.333v16.334h24.833V7.333H3.083z M19.333,20.668H6.083V10.332h13.25V20.668z")}})},"./src/shape/icon/DockTop.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.DockTop=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.DockTop",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M27.916,23.667V7.333H3.083v16.334H27.916zM24.915,20.668H6.083v-6.501h18.833L24.915,20.668L24.915,20.668z")}})},"./src/shape/icon/Download.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Download=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Download",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM16,28.792c-1.549,0-2.806-1.256-2.806-2.806s1.256-2.806,2.806-2.806c1.55,0,2.806,1.256,2.806,2.806S17.55,28.792,16,28.792zM16,21.087l-7.858-6.562h3.469V5.747h8.779v8.778h3.468L16,21.087z")}})},"./src/shape/icon/Dry.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Dry=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Dry",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M14.784,26.991c0,1.238-1.329,1.696-1.835,1.696c-0.504,0-1.536-0.413-1.65-1.812c0-0.354-0.288-0.642-0.644-0.642c-0.354,0-0.641,0.287-0.641,0.642c0.045,1.056,0.756,3.052,2.935,3.052c2.432,0,3.166-1.882,3.166-3.144v-8.176l-1.328-0.024C14.787,18.584,14.784,25.889,14.784,26.991zM15.584,9.804c-6.807,0-11.084,4.859-11.587,8.326c0.636-0.913,1.694-1.51,2.89-1.51c1.197,0,2.22,0.582,2.855,1.495c0.638-0.904,1.69-1.495,2.88-1.495c1.2,0,2.26,0.6,2.896,1.517c0.635-0.917,1.83-1.517,3.03-1.517c1.19,0,2.241,0.591,2.879,1.495c0.636-0.913,1.659-1.495,2.855-1.495c1.197,0,2.254,0.597,2.89,1.51C26.669,14.663,22.393,9.804,15.584,9.804zM14.733,7.125v2.081h1.323V7.125c0-0.365-0.296-0.661-0.661-0.661C15.029,6.464,14.733,6.76,14.733,7.125zM7.562,6.015c0.54,0.312,1.229,0.128,1.54-0.412c0.109-0.189,0.157-0.398,0.15-0.602L9.251,3.09L7.59,4.047c-0.178,0.095-0.333,0.24-0.441,0.428C6.837,5.015,7.022,5.703,7.562,6.015zM5.572,11.717c0.109-0.19,0.158-0.398,0.151-0.602L5.721,9.203l-1.66,0.957c-0.178,0.096-0.333,0.241-0.441,0.429c-0.311,0.539-0.127,1.229,0.413,1.539C4.571,12.44,5.26,12.256,5.572,11.717zM10.523,9.355c0.539,0.312,1.229,0.126,1.541-0.412c0.109-0.189,0.156-0.398,0.15-0.603L12.214,6.43l-1.662,0.956c-0.177,0.097-0.332,0.241-0.441,0.43C9.799,8.354,9.984,9.044,10.523,9.355zM15.251,3.998c0.539,0.312,1.229,0.126,1.54-0.412c0.11-0.19,0.157-0.398,0.15-0.603L16.94,1.072l-1.661,0.956c-0.178,0.097-0.332,0.242-0.441,0.43C14.526,2.998,14.711,3.687,15.251,3.998zM19.348,8.914c0.539,0.312,1.228,0.128,1.541-0.412c0.109-0.189,0.156-0.398,0.149-0.602h-0.001V5.988l-1.661,0.957c-0.178,0.096-0.332,0.241-0.441,0.429C18.623,7.914,18.809,8.603,19.348,8.914zM23.633,5.196c0.54,0.312,1.23,0.126,1.542-0.413c0.109-0.189,0.156-0.398,0.149-0.602h-0.001V2.27l-1.662,0.957c-0.177,0.096-0.331,0.24-0.44,0.43C22.909,4.195,23.094,4.885,23.633,5.196zM27.528,8.51l-1.659,0.956c-0.18,0.097-0.334,0.242-0.443,0.43c-0.312,0.539-0.127,1.229,0.413,1.54c0.539,0.312,1.229,0.127,1.541-0.412c0.109-0.19,0.158-0.398,0.151-0.603L27.528,8.51z")}})},"./src/shape/icon/Employee.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Employee=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Employee",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h26.954C28.977,26.709,29.039,24.332,28.523,23.813zM22.188,26.062h-4.562v-1.25h4.562V26.062z")}})},"./src/shape/icon/End.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.End=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.End",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.167,5.5,21.167,13.681,6.684,5.318,6.684,25.682,21.167,17.318,21.167,25.5,25.5,25.5,25.5,5.5z")}})},"./src/shape/icon/Ethernet.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Ethernet=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Ethernet",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M22.5,8.5v3.168l3.832,3.832L22.5,19.332V22.5l7-7L22.5,8.5zM8.5,22.5v-3.168L4.667,15.5L8.5,11.668V8.5l-7,7L8.5,22.5zM15.5,14.101c-0.928,0-1.68,0.751-1.68,1.68c0,0.927,0.752,1.681,1.68,1.681c0.927,0,1.68-0.754,1.68-1.681C17.18,14.852,16.427,14.101,15.5,14.101zM10.46,14.101c-0.928,0-1.68,0.751-1.68,1.68c0,0.927,0.752,1.681,1.68,1.681s1.68-0.754,1.68-1.681C12.14,14.852,11.388,14.101,10.46,14.101zM20.541,14.101c-0.928,0-1.682,0.751-1.682,1.68c0,0.927,0.754,1.681,1.682,1.681s1.68-0.754,1.68-1.681C22.221,14.852,21.469,14.101,20.541,14.101z")}})},"./src/shape/icon/Exchange.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Exchange=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Exchange",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.786,12.876l7.556-4.363l-7.556-4.363v2.598H2.813v3.5h18.973V12.876zM10.368,18.124l-7.556,4.362l7.556,4.362V24.25h18.974v-3.501H10.368V18.124z")}})},"./src/shape/icon/Expand.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Expand=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Expand",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.545,23.328,17.918,15.623,25.534,8.007,27.391,9.864,29.649,1.436,21.222,3.694,23.058,5.53,15.455,13.134,7.942,5.543,9.809,3.696,1.393,1.394,3.608,9.833,5.456,8.005,12.98,15.608,5.465,23.123,3.609,21.268,1.351,29.695,9.779,27.438,7.941,25.6,15.443,18.098,23.057,25.791,21.19,27.638,29.606,29.939,27.393,21.5z")}})},"./src/shape/icon/Export.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Export=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Export",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.086,20.904c-1.805,3.113-5.163,5.212-9.023,5.219c-5.766-0.01-10.427-4.672-10.438-10.435C4.636,9.922,9.297,5.261,15.063,5.25c3.859,0.007,7.216,2.105,9.022,5.218l3.962,2.284l0.143,0.082C26.879,6.784,21.504,2.25,15.063,2.248C7.64,2.25,1.625,8.265,1.624,15.688c0.002,7.42,6.017,13.435,13.439,13.437c6.442-0.002,11.819-4.538,13.127-10.589l-0.141,0.081L24.086,20.904zM28.4,15.688l-7.15-4.129v2.297H10.275v3.661H21.25v2.297L28.4,15.688z")}})},"./src/shape/icon/Fave.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Fave=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Fave",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z")}})},"./src/shape/icon/Feed.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Feed=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Feed",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M4.135,16.762c3.078,0,5.972,1.205,8.146,3.391c2.179,2.187,3.377,5.101,3.377,8.202h4.745c0-9.008-7.299-16.335-16.269-16.335V16.762zM4.141,8.354c10.973,0,19.898,8.975,19.898,20.006h4.743c0-13.646-11.054-24.749-24.642-24.749V8.354zM10.701,25.045c0,1.815-1.471,3.287-3.285,3.287s-3.285-1.472-3.285-3.287c0-1.813,1.471-3.285,3.285-3.285S10.701,23.231,10.701,25.045z")}})},"./src/shape/icon/Ff.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Ff=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Ff",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.5,15.5,15.2,9.552,15.2,15.153,5.5,9.552,5.5,21.447,15.2,15.847,15.2,21.447z")}})},"./src/shape/icon/Firefox.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Firefox=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Firefox",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.4,22.469c0.479-0.964,0.851-1.991,1.095-3.066c0.953-3.661,0.666-6.854,0.666-6.854l-0.327,2.104c0,0-0.469-3.896-1.044-5.353c-0.881-2.231-1.273-2.214-1.274-2.21c0.542,1.379,0.494,2.169,0.483,2.288c-0.01-0.016-0.019-0.032-0.027-0.047c-0.131-0.324-0.797-1.819-2.225-2.878c-2.502-2.481-5.943-4.014-9.745-4.015c-4.056,0-7.705,1.745-10.238,4.525C5.444,6.5,5.183,5.938,5.159,5.317c0,0-0.002,0.002-0.006,0.005c0-0.011-0.003-0.021-0.003-0.031c0,0-1.61,1.247-1.436,4.612c-0.299,0.574-0.56,1.172-0.777,1.791c-0.375,0.817-0.75,2.004-1.059,3.746c0,0,0.133-0.422,0.399-0.988c-0.064,0.482-0.103,0.971-0.116,1.467c-0.09,0.845-0.118,1.865-0.039,3.088c0,0,0.032-0.406,0.136-1.021c0.834,6.854,6.667,12.165,13.743,12.165l0,0c1.86,0,3.636-0.37,5.256-1.036C24.938,27.771,27.116,25.196,28.4,22.469zM16.002,3.356c2.446,0,4.73,0.68,6.68,1.86c-2.274-0.528-3.433-0.261-3.423-0.248c0.013,0.015,3.384,0.589,3.981,1.411c0,0-1.431,0-2.856,0.41c-0.065,0.019,5.242,0.663,6.327,5.966c0,0-0.582-1.213-1.301-1.42c0.473,1.439,0.351,4.17-0.1,5.528c-0.058,0.174-0.118-0.755-1.004-1.155c0.284,2.037-0.018,5.268-1.432,6.158c-0.109,0.07,0.887-3.189,0.201-1.93c-4.093,6.276-8.959,2.539-10.934,1.208c1.585,0.388,3.267,0.108,4.242-0.559c0.982-0.672,1.564-1.162,2.087-1.047c0.522,0.117,0.87-0.407,0.464-0.872c-0.405-0.466-1.392-1.105-2.725-0.757c-0.94,0.247-2.107,1.287-3.886,0.233c-1.518-0.899-1.507-1.63-1.507-2.095c0-0.366,0.257-0.88,0.734-1.028c0.58,0.062,1.044,0.214,1.537,0.466c0.005-0.135,0.006-0.315-0.001-0.519c0.039-0.077,0.015-0.311-0.047-0.596c-0.036-0.287-0.097-0.582-0.19-0.851c0.01-0.002,0.017-0.007,0.021-0.021c0.076-0.344,2.147-1.544,2.299-1.659c0.153-0.114,0.55-0.378,0.506-1.183c-0.015-0.265-0.058-0.294-2.232-0.286c-0.917,0.003-1.425-0.894-1.589-1.245c0.222-1.231,0.863-2.11,1.919-2.704c0.02-0.011,0.015-0.021-0.008-0.027c0.219-0.127-2.524-0.006-3.76,1.604C9.674,8.045,9.219,7.95,8.71,7.95c-0.638,0-1.139,0.07-1.603,0.187c-0.05,0.013-0.122,0.011-0.208-0.001C6.769,8.04,6.575,7.88,6.365,7.672c0.161-0.18,0.324-0.356,0.495-0.526C9.201,4.804,12.43,3.357,16.002,3.356z")}})},"./src/shape/icon/Flag.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Flag=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Flag",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M26.04,9.508c0.138-0.533,0.15-1.407,0.028-1.943l-0.404-1.771c-0.122-0.536-0.665-1.052-1.207-1.146l-3.723-0.643c-0.542-0.094-1.429-0.091-1.97,0.007l-4.033,0.726c-0.542,0.098-1.429,0.108-1.973,0.023L8.812,4.146C8.817,4.165,8.826,4.182,8.83,4.201l2.701,12.831l1.236,0.214c0.542,0.094,1.428,0.09,1.97-0.007l4.032-0.727c0.541-0.097,1.429-0.107,1.973-0.022l4.329,0.675c0.544,0.085,0.906-0.288,0.807-0.829l-0.485-2.625c-0.1-0.541-0.069-1.419,0.068-1.952L26.04,9.508zM6.667,3.636C6.126,3.75,5.78,4.279,5.894,4.819l5.763,27.378H13.7L7.852,4.409C7.736,3.867,7.207,3.521,6.667,3.636z")}})},"./src/shape/icon/Flickr.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Flickr=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Flickr",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.77,8.895c-2.379,0-4.479,1.174-5.77,2.969c-1.289-1.795-3.39-2.969-5.77-2.969c-3.924,0-7.105,3.181-7.105,7.105c0,3.924,3.181,7.105,7.105,7.105c2.379,0,4.48-1.175,5.77-2.97c1.29,1.795,3.391,2.97,5.77,2.97c3.925,0,7.105-3.182,7.105-7.105C28.875,12.075,25.694,8.895,21.77,8.895zM21.769,21.822c-3.211,0-5.821-2.61-5.821-5.821c0-3.213,2.61-5.824,5.821-5.824c3.213,0,5.824,2.611,5.824,5.824C27.593,19.212,24.981,21.822,21.769,21.822z")}})},"./src/shape/icon/Folder.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Folder=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Folder",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.625,26.75h-26.5V8.375h1.124c1.751,0,0.748-3.125,3-3.125c3.215,0,1.912,0,5.126,0c2.251,0,1.251,3.125,3.001,3.125h14.25V26.75z")}})},"./src/shape/icon/Font.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Font=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Font",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M22.255,19.327l-1.017,0.131c-0.609,0.081-1.067,0.208-1.375,0.382c-0.521,0.293-0.779,0.76-0.779,1.398c0,0.484,0.178,0.867,0.532,1.146c0.354,0.28,0.774,0.421,1.262,0.421c0.593,0,1.164-0.138,1.72-0.412c0.938-0.453,1.4-1.188,1.4-2.229v-1.354c-0.205,0.131-0.469,0.229-0.792,0.328C22.883,19.229,22.564,19.29,22.255,19.327zM8.036,18.273h4.309l-2.113-6.063L8.036,18.273zM28.167,7.75H3.168c-0.552,0-1,0.448-1,1v16.583c0,0.553,0.448,1,1,1h24.999c0.554,0,1-0.447,1-1V8.75C29.167,8.198,28.721,7.75,28.167,7.75zM14.305,23.896l-1.433-4.109H7.488L6,23.896H4.094L9.262,10.17h2.099l4.981,13.727H14.305L14.305,23.896zM26.792,23.943c-0.263,0.074-0.461,0.121-0.599,0.141c-0.137,0.02-0.323,0.027-0.562,0.027c-0.579,0-0.999-0.204-1.261-0.615c-0.138-0.219-0.231-0.525-0.29-0.926c-0.344,0.449-0.834,0.839-1.477,1.169c-0.646,0.329-1.354,0.493-2.121,0.493c-0.928,0-1.688-0.28-2.273-0.844c-0.589-0.562-0.884-1.271-0.884-2.113c0-0.928,0.29-1.646,0.868-2.155c0.578-0.511,1.34-0.824,2.279-0.942l2.682-0.336c0.388-0.05,0.646-0.211,0.775-0.484c0.063-0.146,0.104-0.354,0.104-0.646c0-0.575-0.203-0.993-0.604-1.252c-0.408-0.26-0.99-0.389-1.748-0.389c-0.877,0-1.5,0.238-1.865,0.713c-0.205,0.263-0.34,0.654-0.399,1.174H17.85c0.031-1.237,0.438-2.097,1.199-2.582c0.77-0.484,1.659-0.726,2.674-0.726c1.176,0,2.131,0.225,2.864,0.673c0.729,0.448,1.093,1.146,1.093,2.093v5.766c0,0.176,0.035,0.313,0.106,0.422c0.071,0.104,0.223,0.156,0.452,0.156c0.076,0,0.16-0.005,0.254-0.015c0.093-0.011,0.191-0.021,0.299-0.041L26.792,23.943L26.792,23.943z")}})},"./src/shape/icon/Fork.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Fork=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Fork",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M13.741,10.249h8.045v2.627l7.556-4.363l-7.556-4.363v2.598H9.826C11.369,7.612,12.616,8.922,13.741,10.249zM21.786,20.654c-0.618-0.195-1.407-0.703-2.291-1.587c-1.79-1.756-3.712-4.675-5.731-7.227c-2.049-2.486-4.159-4.972-7.451-5.091h-3.5v3.5h3.5c0.656-0.027,1.683,0.486,2.879,1.683c1.788,1.753,3.712,4.674,5.731,7.226c1.921,2.331,3.907,4.639,6.863,5.016v2.702l7.556-4.362l-7.556-4.362V20.654z")}})},"./src/shape/icon/ForkAlt.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ForkAlt=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ForkAlt",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.786,12.873l7.556-4.361l-7.556-4.362v2.701c-2.929,0.374-4.905,2.64-6.809,4.952c0.545,0.703,1.08,1.418,1.604,2.127c0.192,0.26,0.383,0.514,0.573,0.77c0.802-1.043,1.584-1.999,2.341-2.74c0.884-0.885,1.673-1.393,2.291-1.588V12.873zM17.661,17.006c-1.893-2.371-3.815-5.354-6.009-7.537c-1.461-1.428-3.155-2.664-5.34-2.693h-3.5v3.5h3.5c0.971-0.119,2.845,1.333,4.712,3.771c1.895,2.371,3.815,5.354,6.011,7.537c1.326,1.297,2.847,2.426,4.751,2.645v2.646l7.556-4.363l-7.556-4.362v2.535C20.746,20.346,19.205,19.022,17.661,17.006z")}})},"./src/shape/icon/FullCube.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.FullCube=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.FullCube",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.5,3.029l-10.8,6.235L4.7,21.735L15.5,27.971l10.8-6.235V9.265L15.5,3.029zM15.5,7.029l6.327,3.652L15.5,14.334l-6.326-3.652L15.5,7.029zM24.988,10.599L16,15.789v10.378c0,0.275-0.225,0.5-0.5,0.5s-0.5-0.225-0.5-0.5V15.786l-8.987-5.188c-0.239-0.138-0.321-0.444-0.183-0.683c0.138-0.238,0.444-0.321,0.683-0.183l8.988,5.189l8.988-5.189c0.238-0.138,0.545-0.055,0.684,0.184C25.309,10.155,25.227,10.461,24.988,10.599z")}})},"./src/shape/icon/Future.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Future=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Future",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M17.001,15.5l-0.5-7.876c0-0.552-0.448-1-1-1c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.89-0.365,1.365c0.275,0.479,0.889,0.644,1.365,0.367l3.305-1.677C15.39,16.99,15.444,17,15.501,17C16.329,17,17.001,16.329,17.001,15.5zM18.939,21.455c-0.479,0.277-0.644,0.889-0.366,1.367c0.274,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.89,0.365-1.365C20.027,21.344,19.417,21.18,18.939,21.455zM19.938,7.813c-0.477-0.276-1.09-0.111-1.364,0.366c-0.275,0.48-0.111,1.091,0.366,1.367c0.477,0.276,1.088,0.112,1.365-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM21.823,20.305c0.477,0.274,1.089,0.112,1.364-0.365c0.276-0.479,0.112-1.092-0.364-1.367c-0.48-0.275-1.093-0.111-1.367,0.365C21.182,19.416,21.344,20.029,21.823,20.305zM22.822,12.428c0.478-0.275,0.643-0.888,0.365-1.366c-0.274-0.478-0.89-0.642-1.365-0.366c-0.479,0.278-0.643,0.89-0.366,1.367S22.344,12.705,22.822,12.428zM24.378,15.5c0-0.551-0.448-1-1-1c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1C23.93,16.5,24.378,16.053,24.378,15.5zM9.546,12.062c0.275-0.478,0.111-1.089-0.366-1.366c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366C8.658,12.704,9.269,12.541,9.546,12.062zM6.624,15.5c0,0.553,0.449,1,1,1c0.552,0,1-0.447,1.001-1c-0.001-0.552-0.448-0.999-1.001-1C7.071,14.5,6.624,14.948,6.624,15.5zM9.179,20.305c0.479-0.275,0.643-0.888,0.367-1.367c-0.276-0.477-0.888-0.641-1.367-0.365c-0.478,0.277-0.642,0.889-0.365,1.367C8.089,20.418,8.703,20.58,9.179,20.305zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM14.501,23.377c0,0.553,0.448,1,1,1c0.552,0,1-0.447,1-1s-0.448-1-1-1C14.949,22.377,14.501,22.824,14.501,23.377zM10.696,21.822c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.276,1.091,0.11,1.365-0.365c0.277-0.479,0.113-1.09-0.365-1.367C11.584,21.18,10.973,21.344,10.696,21.822zM28.674,14.087l-3.27-1.186c0.291,1.105,0.41,2.274,0.309,3.478c-0.492,5.639-5.449,9.809-11.091,9.333c-5.639-0.495-9.809-5.45-9.333-11.09c0.494-5.641,5.449-9.812,11.089-9.335c2.428,0.212,4.567,1.266,6.194,2.833l-1.637,1.377l7.031,2.548l-1.309-7.364l-1.771,1.492c-2.133-2.151-4.996-3.597-8.25-3.877C9.346,1.67,2.926,7.072,2.297,14.364c-0.625,7.291,4.777,13.71,12.066,14.339c7.293,0.625,13.713-4.776,14.342-12.066C28.779,15.771,28.762,14.919,28.674,14.087z")}})},"./src/shape/icon/GRaphael.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.GRaphael=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.GRaphael",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.833,15.709c0-1.477-0.574-2.862-1.617-3.904l-7.002-7.001l-0.003,0.002c-1.027-1.03-2.445-1.62-3.9-1.62c-1.455,0-2.871,0.59-3.9,1.621l-0.002-0.002l-7,7C4.376,12.836,3.79,14.25,3.79,15.709s0.586,2.873,1.619,3.902l6.312,6.312c0.253,0.285,0.519,0.556,0.8,0.8c1.049,0.989,2.463,1.534,3.908,1.51c1.417-0.021,2.783-0.604,3.785-1.604l6.812-6.812c0.021-0.021,0.035-0.029,0.062-0.062l0.143-0.146c0.271-0.271,0.484-0.562,0.725-0.86l-0.012-0.002C28.516,17.85,28.833,16.805,28.833,15.709zM18.77,25.17c-1.121,1.119-2.917,1.336-4.271,0.514l0.002-0.002c-0.213-0.145-0.414-0.303-0.61-0.471c-0.016-0.016-7.04-7.041-7.04-7.041c-1.34-1.34-1.342-3.584,0-4.92l7-6.998c1.121-1.121,2.908-1.338,4.259-0.512v0.002c0.213,0.141,0.414,0.299,0.604,0.467c0.021,0.016,7.053,7.043,7.053,7.043c0.396,0.388,0.655,0.852,0.818,1.348l-2.607,0.006c-0.537-3.754-3.769-6.641-7.667-6.641c-4.277,0-7.744,3.468-7.745,7.746c0.001,4.277,3.468,7.744,7.745,7.744c3.917,0,7.156-2.91,7.668-6.688l2.638-0.021c-0.16,0.521-0.441,1.02-0.849,1.412L18.77,25.17zM16.312,16.789c0.002,0,0.002,0,0.004,0l5.476-0.02c-0.5,2.562-2.76,4.518-5.48,4.521c-3.084-0.004-5.578-2.5-5.584-5.582c0.006-3.084,2.5-5.58,5.584-5.584c2.708,0.004,4.959,1.929,5.472,4.484l-5.476,0.018c-0.596,0.002-1.078,0.488-1.076,1.084C15.233,16.308,15.715,16.789,16.312,16.789z")}})},"./src/shape/icon/Gear.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Gear=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Gear",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M26.974,16.514l3.765-1.991c-0.074-0.738-0.217-1.454-0.396-2.157l-4.182-0.579c-0.362-0.872-0.84-1.681-1.402-2.423l1.594-3.921c-0.524-0.511-1.09-0.977-1.686-1.406l-3.551,2.229c-0.833-0.438-1.73-0.77-2.672-0.984l-1.283-3.976c-0.364-0.027-0.728-0.056-1.099-0.056s-0.734,0.028-1.099,0.056l-1.271,3.941c-0.967,0.207-1.884,0.543-2.738,0.986L7.458,4.037C6.863,4.466,6.297,4.932,5.773,5.443l1.55,3.812c-0.604,0.775-1.11,1.629-1.49,2.55l-4.05,0.56c-0.178,0.703-0.322,1.418-0.395,2.157l3.635,1.923c0.041,1.013,0.209,1.994,0.506,2.918l-2.742,3.032c0.319,0.661,0.674,1.303,1.085,1.905l4.037-0.867c0.662,0.72,1.416,1.351,2.248,1.873l-0.153,4.131c0.663,0.299,1.352,0.549,2.062,0.749l2.554-3.283C15.073,26.961,15.532,27,16,27c0.507,0,1.003-0.046,1.491-0.113l2.567,3.301c0.711-0.2,1.399-0.45,2.062-0.749l-0.156-4.205c0.793-0.513,1.512-1.127,2.146-1.821l4.142,0.889c0.411-0.602,0.766-1.243,1.085-1.905l-2.831-3.131C26.778,18.391,26.93,17.467,26.974,16.514zM20.717,21.297l-1.785,1.162l-1.098-1.687c-0.571,0.22-1.186,0.353-1.834,0.353c-2.831,0-5.125-2.295-5.125-5.125c0-2.831,2.294-5.125,5.125-5.125c2.83,0,5.125,2.294,5.125,5.125c0,1.414-0.573,2.693-1.499,3.621L20.717,21.297z")}})},"./src/shape/icon/Gear2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Gear2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Gear2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M17.047,27.945c-0.34,0.032-0.688,0.054-1.046,0.054l0,0c-0.32,0-0.631-0.017-0.934-0.043l0,0l-2.626,3.375l-0.646-0.183c-0.758-0.213-1.494-0.48-2.202-0.8l0,0L8.979,30.07l0.158-4.24c-0.558-0.39-1.079-0.825-1.561-1.302l0,0L3.424,25.42l-0.379-0.557c-0.445-0.654-0.824-1.339-1.16-2.032l0,0l-0.292-0.605l2.819-3.12c-0.176-0.661-0.293-1.343-0.353-2.038l0,0l-3.736-1.975l0.068-0.669c0.08-0.801,0.235-1.567,0.42-2.303l0,0l0.165-0.653l4.167-0.577c0.297-0.627,0.647-1.221,1.041-1.78l0,0l-1.59-3.914l0.48-0.47c0.564-0.55,1.168-1.048,1.798-1.503l0,0l0.546-0.394l3.597,2.259c0.606-0.279,1.24-0.509,1.897-0.685l0,0l1.304-4.046l0.672-0.051c0.362-0.027,0.751-0.058,1.174-0.058l0,0c0.422,0,0.81,0.031,1.172,0.058l0,0l0.672,0.051l1.318,4.088c0.632,0.176,1.244,0.401,1.831,0.674l0,0l3.647-2.291l0.548,0.394c0.63,0.455,1.235,0.954,1.798,1.501l0,0l0.482,0.47l-1.639,4.031c0.357,0.519,0.679,1.068,0.954,1.646l0,0l4.297,0.595l0.167,0.653c0.188,0.735,0.342,1.501,0.42,2.303l0,0l0.068,0.669l-3.866,2.044c-0.058,0.634-0.161,1.258-0.315,1.866l0,0l2.913,3.218l-0.293,0.608c-0.335,0.695-0.712,1.382-1.159,2.034l0,0l-0.379,0.555l-4.255-0.912c-0.451,0.451-0.939,0.866-1.461,1.241l0,0l0.162,4.323l-0.615,0.278c-0.709,0.319-1.444,0.587-2.202,0.8l0,0l-0.648,0.183L17.047,27.945L17.047,27.945zM20.424,29.028c0.227-0.076,0.45-0.157,0.671-0.244l0,0l-0.152-4.083l0.479-0.307c0.717-0.466,1.37-1.024,1.95-1.658l0,0l0.386-0.423l4.026,0.862c0.121-0.202,0.238-0.409,0.351-0.62l0,0l-2.754-3.045l0.171-0.544c0.243-0.783,0.381-1.623,0.422-2.5l0,0l0.025-0.571l3.658-1.933c-0.038-0.234-0.082-0.467-0.132-0.7l0,0l-4.07-0.563l-0.219-0.527c-0.327-0.787-0.76-1.524-1.277-2.204l0,0l-0.342-0.453l1.548-3.808c-0.179-0.157-0.363-0.31-0.552-0.458l0,0l-3.455,2.169L20.649,7.15c-0.754-0.397-1.569-0.698-2.429-0.894l0,0l-0.556-0.127l-1.248-3.87c-0.121-0.006-0.239-0.009-0.354-0.009l0,0c-0.117,0-0.235,0.003-0.357,0.009l0,0l-1.239,3.845l-0.564,0.12c-0.875,0.188-1.709,0.494-2.486,0.896l0,0l-0.508,0.264L7.509,5.249c-0.188,0.148-0.372,0.301-0.55,0.458l0,0l1.507,3.708L8.112,9.869c-0.552,0.709-1.011,1.485-1.355,2.319l0,0l-0.218,0.529l-3.939,0.545c-0.05,0.233-0.094,0.466-0.131,0.7l0,0l3.531,1.867l0.022,0.575c0.037,0.929,0.192,1.82,0.459,2.653l0,0l0.175,0.548l-2.667,2.95c0.112,0.212,0.229,0.419,0.351,0.621l0,0l3.916-0.843l0.39,0.423c0.601,0.657,1.287,1.229,2.043,1.703l0,0l0.488,0.305l-0.149,4.02c0.221,0.087,0.445,0.168,0.672,0.244l0,0l2.479-3.188l0.566,0.07c0.427,0.054,0.843,0.089,1.257,0.089l0,0c0.445,0,0.894-0.039,1.353-0.104l0,0l0.571-0.08L20.424,29.028L20.424,29.028zM21.554,20.75l0.546,0.839l-3.463,2.253l-1.229-1.891l0,0c-0.447,0.109-0.917,0.173-1.406,0.173l0,0c-3.384,0-6.126-2.743-6.126-6.123l0,0c0-3.384,2.742-6.126,6.126-6.126l0,0c3.38,0,6.123,2.742,6.123,6.126l0,0c0,1.389-0.467,2.676-1.25,3.704l0,0L21.554,20.75M19.224,21.073l0.108-0.069l-0.987-1.519l0.572-0.572c0.748-0.75,1.207-1.773,1.207-2.912l0,0c-0.004-2.278-1.848-4.122-4.123-4.126l0,0c-2.28,0.004-4.122,1.846-4.126,4.126l0,0c0.004,2.275,1.848,4.119,4.126,4.123l0,0c0.509,0,0.999-0.104,1.473-0.286l0,0l0.756-0.29L19.224,21.073L19.224,21.073z")}})},"./src/shape/icon/GitHub.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.GitHub=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.GitHub",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.436,15.099c-1.201-0.202-2.451-0.335-3.466-0.371l-0.179-0.006c0.041-0.09,0.072-0.151,0.082-0.16c0.022-0.018,0.04-0.094,0.042-0.168c0-0.041,0.018-0.174,0.046-0.35c0.275,0.01,0.64,0.018,1.038,0.021c1.537,0.012,3.145,0.136,4.248,0.331c0.657,0.116,0.874,0.112,0.389-0.006c-0.491-0.119-1.947-0.294-3.107-0.37c-0.779-0.053-1.896-0.073-2.554-0.062c0.019-0.114,0.041-0.241,0.064-0.371c0.093-0.503,0.124-1.009,0.126-2.016c0.002-1.562-0.082-1.992-0.591-3.025c-0.207-0.422-0.441-0.78-0.724-1.104c0.247-0.729,0.241-1.858-0.015-2.848c-0.211-0.812-0.285-0.864-1.021-0.708C22.19,4.019,21.69,4.2,21.049,4.523c-0.303,0.153-0.721,0.391-1.024,0.578c-0.79-0.278-1.607-0.462-2.479-0.561c-0.884-0.1-3.051-0.044-3.82,0.098c-0.752,0.139-1.429,0.309-2.042,0.511c-0.306-0.189-0.75-0.444-1.067-0.604C9.973,4.221,9.473,4.041,8.847,3.908c-0.734-0.157-0.81-0.104-1.02,0.708c-0.26,1.003-0.262,2.151-0.005,2.878C7.852,7.577,7.87,7.636,7.877,7.682c-1.042,1.312-1.382,2.78-1.156,4.829c0.059,0.534,0.15,1.024,0.277,1.473c-0.665-0.004-1.611,0.02-2.294,0.064c-1.162,0.077-2.618,0.25-3.109,0.369c-0.484,0.118-0.269,0.122,0.389,0.007c1.103-0.194,2.712-0.32,4.248-0.331c0.29-0.001,0.561-0.007,0.794-0.013c0.07,0.237,0.15,0.463,0.241,0.678L7.26,14.759c-1.015,0.035-2.264,0.168-3.465,0.37c-0.901,0.151-2.231,0.453-2.386,0.54c-0.163,0.091-0.03,0.071,0.668-0.106c1.273-0.322,2.928-0.569,4.978-0.741l0.229-0.02c0.44,1.022,1.118,1.802,2.076,2.41c0.586,0.373,1.525,0.756,1.998,0.816c0.13,0.016,0.508,0.094,0.84,0.172c0.333,0.078,0.984,0.195,1.446,0.262h0.011c-0.009,0.006-0.017,0.01-0.025,0.016c-0.56,0.291-0.924,0.744-1.169,1.457c-0.11,0.033-0.247,0.078-0.395,0.129c-0.529,0.18-0.735,0.217-1.271,0.221c-0.556,0.004-0.688-0.02-1.02-0.176c-0.483-0.225-0.933-0.639-1.233-1.133c-0.501-0.826-1.367-1.41-2.089-1.41c-0.617,0-0.734,0.25-0.288,0.615c0.672,0.549,1.174,1.109,1.38,1.537c0.116,0.24,0.294,0.611,0.397,0.824c0.109,0.227,0.342,0.535,0.564,0.748c0.522,0.498,1.026,0.736,1.778,0.848c0.504,0.074,0.628,0.074,1.223-0.002c0.287-0.035,0.529-0.076,0.746-0.127c0,0.244,0,0.525,0,0.855c0,1.766-0.021,2.334-0.091,2.5c-0.132,0.316-0.428,0.641-0.716,0.787c-0.287,0.146-0.376,0.307-0.255,0.455c0.067,0.08,0.196,0.094,0.629,0.066c0.822-0.051,1.403-0.355,1.699-0.891c0.095-0.172,0.117-0.518,0.147-2.318c0.032-1.953,0.046-2.141,0.173-2.42c0.077-0.166,0.188-0.346,0.25-0.395c0.104-0.086,0.111,0.084,0.111,2.42c-0.001,2.578-0.027,2.889-0.285,3.385c-0.058,0.113-0.168,0.26-0.245,0.33c-0.135,0.123-0.192,0.438-0.098,0.533c0.155,0.154,0.932-0.088,1.356-0.422c0.722-0.572,0.808-1.045,0.814-4.461l0.003-2.004l0.219,0.021l0.219,0.02l0.036,2.621c0.041,2.951,0.047,2.994,0.549,3.564c0.285,0.322,0.572,0.5,1.039,0.639c0.625,0.188,0.813-0.102,0.393-0.605c-0.457-0.547-0.479-0.756-0.454-3.994c0.017-2.076,0.017-2.076,0.151-1.955c0.282,0.256,0.336,0.676,0.336,2.623c0,2.418,0.069,2.648,0.923,3.07c0.399,0.195,0.511,0.219,1.022,0.221c0.544,0.002,0.577-0.006,0.597-0.148c0.017-0.115-0.05-0.193-0.304-0.348c-0.333-0.205-0.564-0.467-0.709-0.797c-0.055-0.127-0.092-0.959-0.117-2.672c-0.036-2.393-0.044-2.502-0.193-2.877c-0.201-0.504-0.508-0.902-0.897-1.166c-0.101-0.066-0.202-0.121-0.333-0.162c0.161-0.016,0.317-0.033,0.468-0.055c1.572-0.209,2.403-0.383,3.07-0.641c1.411-0.543,2.365-1.445,2.882-2.724c0.046-0.114,0.092-0.222,0.131-0.309l0.398,0.033c2.051,0.173,3.706,0.42,4.979,0.743c0.698,0.177,0.831,0.198,0.668,0.105C30.666,15.551,29.336,15.25,28.436,15.099zM22.422,15.068c-0.233,0.512-0.883,1.17-1.408,1.428c-0.518,0.256-1.33,0.451-2.25,0.544c-0.629,0.064-4.137,0.083-4.716,0.026c-1.917-0.188-2.991-0.557-3.783-1.296c-0.75-0.702-1.1-1.655-1.039-2.828c0.039-0.734,0.216-1.195,0.679-1.755c0.421-0.51,0.864-0.825,1.386-0.985c0.437-0.134,1.778-0.146,3.581-0.03c0.797,0.051,1.456,0.051,2.252,0c1.886-0.119,3.145-0.106,3.61,0.038c0.731,0.226,1.397,0.834,1.797,1.644c0.18,0.362,0.215,0.516,0.241,1.075C22.808,13.699,22.675,14.517,22.422,15.068zM12.912,11.762c-1.073-0.188-1.686,1.649-0.863,2.587c0.391,0.445,0.738,0.518,1.172,0.248c0.402-0.251,0.62-0.72,0.62-1.328C13.841,12.458,13.472,11.862,12.912,11.762zM19.425,11.872c-1.073-0.188-1.687,1.647-0.864,2.586c0.392,0.445,0.738,0.519,1.173,0.247c0.401-0.25,0.62-0.72,0.62-1.328C20.354,12.569,19.985,11.971,19.425,11.872zM16.539,15.484c-0.023,0.074-0.135,0.184-0.248,0.243c-0.286,0.147-0.492,0.096-0.794-0.179c-0.187-0.169-0.272-0.258-0.329-0.081c-0.053,0.164,0.28,0.493,0.537,0.594c0.236,0.094,0.405,0.097,0.661-0.01c0.254-0.106,0.476-0.391,0.476-0.576C16.842,15.303,16.595,15.311,16.539,15.484zM16.222,14.909c0.163-0.144,0.2-0.44,0.044-0.597s-0.473-0.133-0.597,0.043c-0.144,0.206-0.067,0.363,0.036,0.53C15.865,15.009,16.08,15.034,16.222,14.909z")}})},"./src/shape/icon/GitHubAlt.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.GitHubAlt=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.GitHubAlt",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M23.356,17.485c-0.004,0.007-0.007,0.013-0.01,0.021l0.162,0.005c0.107,0.004,0.218,0.01,0.33,0.016c-0.046-0.004-0.09-0.009-0.136-0.013L23.356,17.485zM15.5,1.249C7.629,1.25,1.25,7.629,1.249,15.5C1.25,23.371,7.629,29.75,15.5,29.751c7.871-0.001,14.25-6.38,14.251-14.251C29.75,7.629,23.371,1.25,15.5,1.249zM3.771,17.093c0.849-0.092,1.833-0.148,2.791-0.156c0.262,0,0.507-0.006,0.717-0.012c0.063,0.213,0.136,0.419,0.219,0.613H7.492c-0.918,0.031-2.047,0.152-3.134,0.335c-0.138,0.023-0.288,0.051-0.441,0.08C3.857,17.67,3.81,17.383,3.771,17.093zM12.196,22.224c-0.1,0.028-0.224,0.07-0.357,0.117c-0.479,0.169-0.665,0.206-1.15,0.206c-0.502,0.015-0.621-0.019-0.921-0.17C9.33,22.171,8.923,21.8,8.651,21.353c-0.453-0.746-1.236-1.275-1.889-1.275c-0.559,0-0.664,0.227-0.261,0.557c0.608,0.496,1.062,0.998,1.248,1.385c0.105,0.215,0.266,0.546,0.358,0.744c0.099,0.206,0.311,0.474,0.511,0.676c0.472,0.441,0.928,0.659,1.608,0.772c0.455,0.06,0.567,0.06,1.105-0.004c0.26-0.03,0.479-0.067,0.675-0.118v0.771c0,1.049-0.008,1.628-0.031,1.945c-1.852-0.576-3.507-1.595-4.848-2.934c-1.576-1.578-2.706-3.592-3.195-5.848c0.952-0.176,2.073-0.32,3.373-0.43l0.208-0.018c0.398,0.925,1.011,1.631,1.876,2.179c0.53,0.337,1.38,0.685,1.808,0.733c0.118,0.02,0.46,0.09,0.76,0.16c0.302,0.066,0.89,0.172,1.309,0.236h0.009c-0.007,0.018-0.014,0.02-0.022,0.02C12.747,21.169,12.418,21.579,12.196,22.224zM13.732,27.207c-0.168-0.025-0.335-0.056-0.5-0.087c0.024-0.286,0.038-0.785,0.054-1.723c0.028-1.767,0.041-1.94,0.156-2.189c0.069-0.15,0.17-0.32,0.226-0.357c0.095-0.078,0.101,0.076,0.101,2.188C13.769,26.143,13.763,26.786,13.732,27.207zM15.5,27.339c-0.148,0-0.296-0.006-0.443-0.012c0.086-0.562,0.104-1.428,0.106-2.871l0.003-1.82l0.197,0.019l0.199,0.02l0.032,2.365c0.017,1.21,0.027,1.878,0.075,2.296C15.613,27.335,15.558,27.339,15.5,27.339zM17.006,27.24c-0.039-0.485-0.037-1.243-0.027-2.553c0.019-1.866,0.019-1.866,0.131-1.769c0.246,0.246,0.305,0.623,0.305,2.373c0,0.928,0.011,1.497,0.082,1.876C17.334,27.196,17.17,27.22,17.006,27.24zM27.089,17.927c-0.155-0.029-0.307-0.057-0.446-0.08c-0.96-0.162-1.953-0.275-2.804-0.32c1.25,0.108,2.327,0.248,3.246,0.418c-0.479,2.289-1.618,4.33-3.214,5.928c-1.402,1.4-3.15,2.448-5.106,3.008c-0.034-0.335-0.058-1.048-0.066-2.212c-0.03-2.167-0.039-2.263-0.17-2.602c-0.181-0.458-0.47-0.811-0.811-1.055c-0.094-0.057-0.181-0.103-0.301-0.14c0.145-0.02,0.282-0.021,0.427-0.057c1.418-0.188,2.168-0.357,2.772-0.584c1.263-0.492,2.129-1.301,2.606-2.468c0.044-0.103,0.088-0.2,0.123-0.279l0.011,0.001c0.032-0.07,0.057-0.118,0.064-0.125c0.02-0.017,0.036-0.085,0.038-0.151c0-0.037,0.017-0.157,0.041-0.317c0.249,0.01,0.58,0.018,0.938,0.02c0.959,0.008,1.945,0.064,2.794,0.156C27.194,17.356,27.148,17.644,27.089,17.927zM25.823,16.87c-0.697-0.049-1.715-0.064-2.311-0.057c0.02-0.103,0.037-0.218,0.059-0.336c0.083-0.454,0.111-0.912,0.113-1.823c0.002-1.413-0.074-1.801-0.534-2.735c-0.188-0.381-0.399-0.705-0.655-0.998c0.225-0.659,0.207-1.68-0.02-2.575c-0.19-0.734-0.258-0.781-0.924-0.64c-0.563,0.12-1.016,0.283-1.598,0.576c-0.274,0.138-0.652,0.354-0.923,0.522c-0.715-0.251-1.451-0.419-2.242-0.508c-0.799-0.092-2.759-0.04-3.454,0.089c-0.681,0.126-1.293,0.28-1.848,0.462c-0.276-0.171-0.678-0.4-0.964-0.547C9.944,8.008,9.491,7.846,8.925,7.727c-0.664-0.144-0.732-0.095-0.922,0.64c-0.235,0.907-0.237,1.945-0.004,2.603c0.026,0.075,0.043,0.129,0.05,0.17c-0.942,1.187-1.25,2.515-1.046,4.367c0.053,0.482,0.136,0.926,0.251,1.333c-0.602-0.004-1.457,0.018-2.074,0.057c-0.454,0.031-0.957,0.076-1.418,0.129c-0.063-0.5-0.101-1.008-0.101-1.524c0-3.273,1.323-6.225,3.468-8.372c2.146-2.144,5.099-3.467,8.371-3.467c3.273,0,6.226,1.323,8.371,3.467c2.145,2.147,3.468,5.099,3.468,8.372c0,0.508-0.036,1.008-0.098,1.499C26.78,16.946,26.276,16.899,25.823,16.87z")}})},"./src/shape/icon/Glasses.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Glasses=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Glasses",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M14.075,9.531c0,0-2.705-1.438-5.158-1.438c-2.453,0-4.862,0.593-4.862,0.593L3.971,9.869c0,0,0.19,0.19,0.528,0.53c0.338,0.336,0.486,3.741,1.838,5.094c1.353,1.354,4.82,1.396,5.963,0.676c1.14-0.718,2.241-3.466,2.241-4.693c0-0.38,0-0.676,0-0.676c0.274-0.275,1.615-0.303,1.917,0c0,0,0,0.296,0,0.676c0,1.227,1.101,3.975,2.241,4.693c1.144,0.72,4.611,0.678,5.963-0.676c1.355-1.353,1.501-4.757,1.839-5.094c0.338-0.34,0.528-0.53,0.528-0.53l-0.084-1.183c0,0-2.408-0.593-4.862-0.593c-2.453,0-5.158,1.438-5.158,1.438C16.319,9.292,14.737,9.32,14.075,9.531z")}})},"./src/shape/icon/Globe.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Globe=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Globe",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM19.158,23.269c-0.079,0.064-0.183,0.13-0.105,0.207c0.078,0.078-0.09,0.131-0.09,0.17s0.104,0.246,0.052,0.336c-0.052,0.092-0.091,0.223-0.13,0.301c-0.039,0.077-0.131,0.155-0.104,0.272c0.025,0.116-0.104,0.077-0.104,0.194c0,0.116,0.116,0.065,0.09,0.208c-0.025,0.144-0.09,0.183-0.09,0.285c0,0.104,0.064,0.247,0.064,0.286s-0.064,0.17-0.155,0.272c-0.092,0.104-0.155,0.17-0.144,0.233c0.014,0.065,0.104,0.144,0.091,0.184c-0.013,0.037-0.129,0.168-0.116,0.259c0.014,0.09,0.129,0.053,0.155,0.116c0.026,0.065-0.155,0.118-0.078,0.183c0.078,0.064,0.183,0.051,0.156,0.208c-0.019,0.112,0.064,0.163,0.126,0.198c-0.891,0.221-1.818,0.352-2.777,0.352C9.639,27.533,4.466,22.36,4.466,16c0-2.073,0.557-4.015,1.518-5.697c0.079-0.042,0.137-0.069,0.171-0.062c0.065,0.013,0.079,0.104,0.183,0.13c0.104,0.026,0.195-0.078,0.26-0.117c0.064-0.039,0.116-0.195,0.051-0.182c-0.065,0.013-0.234,0-0.234,0s0.183-0.104,0.183-0.169s0.025-0.169,0.129-0.208C6.83,9.655,6.83,9.681,6.765,9.837C6.7,9.993,6.896,9.928,6.973,9.863s0.13-0.013,0.272-0.104c0.143-0.091,0.143-0.143,0.221-0.143c0.078,0,0.221,0.143,0.299,0.091c0.077-0.052,0.299,0.065,0.429,0.065c0.129,0,0.545,0.169,0.624,0.169c0.078,0,0.312,0.09,0.325,0.259c0.013,0.169,0.09,0.156,0.168,0.156s0.26,0.065,0.26,0.13c0,0.065-0.052,0.325,0.078,0.39c0.129,0.064,0.247,0.169,0.299,0.143c0.052-0.026,0-0.233-0.064-0.26c-0.065-0.026-0.027-0.117-0.052-0.169c-0.026-0.051,0.078-0.051,0.117,0.039c0.039,0.091,0.143,0.26,0.208,0.26c0.064,0,0.208,0.156,0.168,0.247c-0.039,0.091,0.039,0.221,0.156,0.221c0.116,0,0.26,0.182,0.312,0.195c0.052,0.013,0.117,0.078,0.117,0.117c0,0.04,0.065,0.26,0.065,0.351c0,0.09-0.04,0.454-0.053,0.597s0.104,0.39,0.234,0.52c0.129,0.13,0.246,0.377,0.324,0.429c0.079,0.052,0.13,0.195,0.247,0.182c0.117-0.013,0.195,0.078,0.299,0.26c0.104,0.182,0.208,0.48,0.286,0.506c0.078,0.026,0.208,0.117,0.142,0.182c-0.064,0.064-0.168,0.208-0.051,0.208c0.117,0,0.156-0.065,0.247,0.053c0.09,0.116,0.208,0.181,0.194,0.26c-0.013,0.077,0.104,0.103,0.156,0.116c0.052,0.013,0.169,0.247,0.286,0.143c0.117-0.104-0.155-0.259-0.234-0.326c-0.078-0.064,0-0.207-0.182-0.35c-0.182-0.143-0.156-0.247-0.286-0.351c-0.13-0.104-0.233-0.195-0.104-0.286c0.13-0.091,0.143,0.091,0.195,0.208c0.052,0.116,0.324,0.351,0.441,0.454c0.117,0.104,0.326,0.468,0.39,0.468s0.247,0.208,0.247,0.208s0.103,0.168,0.064,0.22c-0.039,0.052,0.053,0.247,0.144,0.299c0.09,0.052,0.455,0.22,0.507,0.247c0.052,0.027,0.155,0.221,0.299,0.221c0.142,0,0.247,0.014,0.286,0.053c0.039,0.038,0.155,0.194,0.234,0.104c0.078-0.092,0.09-0.131,0.208-0.131c0.117,0,0.168,0.091,0.233,0.156c0.065,0.065,0.247,0.235,0.338,0.222c0.091-0.013,0.208,0.104,0.273,0.064s0.169,0.025,0.22,0.052c0.054,0.026,0.234,0.118,0.222,0.272c-0.013,0.157,0.103,0.195,0.182,0.234c0.078,0.039,0.182,0.13,0.248,0.195c0.064,0.063,0.206,0.077,0.246,0.116c0.039,0.039,0.065,0.117,0.182,0.052c0.116-0.064,0.092-0.181,0.092-0.181s0.129-0.026,0.194,0.026c0.064,0.05,0.104,0.22,0.144,0.246c0.038,0.026,0.115,0.221,0.063,0.362c-0.051,0.145-0.038,0.286-0.091,0.286c-0.052,0-0.116,0.17-0.195,0.209c-0.076,0.039-0.285,0.221-0.272,0.286c0.013,0.063,0.131,0.258,0.104,0.35c-0.025,0.091-0.194,0.195-0.154,0.338c0.038,0.144,0.312,0.183,0.323,0.312c0.014,0.131,0.209,0.417,0.235,0.546c0.025,0.13,0.246,0.272,0.246,0.453c0,0.184,0.312,0.3,0.377,0.312c0.063,0.013,0.182,0.131,0.272,0.17s0.169,0.116,0.233,0.221s0.053,0.261,0.053,0.299c0,0.039-0.039,0.44-0.078,0.674C19.145,23.021,19.235,23.203,19.158,23.269zM10.766,11.188c0.039,0.013,0.117,0.091,0.156,0.091c0.04,0,0.234,0.156,0.286,0.208c0.053,0.052,0.053,0.195-0.013,0.208s-0.104-0.143-0.117-0.208c-0.013-0.065-0.143-0.065-0.208-0.104C10.805,11.344,10.66,11.152,10.766,11.188zM27.51,16.41c-0.144,0.182-0.13,0.272-0.195,0.286c-0.064,0.013,0.065,0.065,0.09,0.194c0.022,0.112-0.065,0.224,0.063,0.327c-0.486,4.619-3.71,8.434-8.016,9.787c-0.007-0.011-0.019-0.025-0.021-0.034c-0.027-0.078-0.027-0.233,0.064-0.285c0.091-0.053,0.312-0.233,0.363-0.272c0.052-0.04,0.13-0.221,0.091-0.247c-0.038-0.026-0.232,0-0.26-0.039c-0.026-0.039-0.026-0.092,0.104-0.182c0.13-0.091,0.195-0.222,0.247-0.26c0.052-0.039,0.155-0.117,0.195-0.209c0.038-0.09-0.041-0.039-0.118-0.039s-0.117-0.142-0.117-0.207s0.195,0.026,0.339,0.052c0.143,0.024,0.077-0.065,0.064-0.142c-0.013-0.078,0.026-0.209,0.105-0.17c0.076,0.039,0.479-0.013,0.531-0.026c0.052-0.013,0.194-0.246,0.246-0.312c0.053-0.065,0.064-0.129,0-0.168c-0.065-0.04-0.143-0.184-0.168-0.221c-0.026-0.041-0.039-0.274-0.013-0.34c0.025-0.063,0,0.377,0.181,0.43c0.183,0.052,0.286,0.078,0.455-0.078c0.169-0.155,0.298-0.26,0.312-0.363c0.013-0.104,0.052-0.209,0.117-0.246c0.065-0.039,0.104,0.103,0.182-0.065c0.078-0.17,0.156-0.157,0.234-0.299c0.077-0.144-0.13-0.325,0.024-0.43c0.157-0.103,0.43-0.233,0.43-0.233s0.078-0.039,0.234-0.078c0.155-0.038,0.324-0.014,0.376-0.09c0.052-0.079,0.104-0.247,0.182-0.338c0.079-0.092,0.169-0.234,0.13-0.299c-0.039-0.065,0.104-0.352,0.091-0.429c-0.013-0.078-0.13-0.261,0.065-0.416s0.402-0.391,0.416-0.454c0.012-0.065,0.169-0.338,0.154-0.469c-0.012-0.129-0.154-0.285-0.245-0.325c-0.092-0.037-0.286-0.05-0.364-0.154s-0.299-0.208-0.377-0.182c-0.077,0.026-0.208,0.051-0.312-0.015c-0.104-0.063-0.272-0.143-0.337-0.194c-0.066-0.051-0.234-0.09-0.312-0.09s-0.065-0.053-0.182,0.103c-0.117,0.157,0,0.209-0.208,0.182c-0.209-0.024,0.025-0.038,0.144-0.194c0.115-0.155-0.014-0.247-0.144-0.207c-0.13,0.039-0.039,0.117-0.247,0.156c-0.207,0.038-0.207-0.092-0.077-0.117c0.13-0.026,0.363-0.143,0.363-0.194c0-0.053-0.026-0.196-0.13-0.196s-0.078-0.129-0.233-0.297c-0.156-0.17-0.351-0.274-0.508-0.249c-0.154,0.026-0.272,0.065-0.35-0.076c-0.078-0.144-0.169-0.17-0.222-0.247c-0.051-0.078-0.182,0-0.221-0.039s-0.039-0.039-0.039-0.039s-0.169,0.039-0.077-0.078c0.09-0.117,0.129-0.338,0.09-0.325c-0.038,0.013-0.104,0.196-0.168,0.183c-0.064-0.013-0.014-0.04-0.144-0.117c-0.13-0.078-0.337-0.013-0.337,0.052c0,0.065-0.065,0.117-0.065,0.117s-0.039-0.038-0.078-0.117c-0.039-0.078-0.221-0.091-0.312-0.013c-0.09,0.078-0.142-0.196-0.207-0.196s-0.194,0.065-0.26,0.184c-0.064,0.116-0.038,0.285-0.092,0.272c-0.05-0.013-0.063-0.233-0.05-0.312c0.012-0.079,0.155-0.208,0.05-0.234c-0.103-0.026-0.259,0.13-0.323,0.143c-0.065,0.013-0.195,0.104-0.273,0.209c-0.077,0.103-0.116,0.168-0.195,0.207c-0.077,0.039-0.193,0-0.167-0.039c0.025-0.039-0.222-0.181-0.261-0.13c-0.04,0.052-0.155,0.091-0.272,0.144c-0.117,0.052-0.222-0.065-0.247-0.117s-0.079-0.064-0.091-0.234c-0.013-0.168,0.027-0.351,0.065-0.454c0.038-0.104-0.195-0.312-0.286-0.3c-0.091,0.015-0.182,0.105-0.272,0.091c-0.092-0.012-0.052-0.038-0.195-0.038c-0.143,0-0.026-0.025,0-0.143c0.025-0.116-0.052-0.273,0.092-0.377c0.142-0.104,0.091-0.351,0-0.363c-0.092-0.014-0.261,0.039-0.377,0.026c-0.116-0.014-0.208,0.091-0.169,0.207c0.039,0.117-0.065,0.195-0.104,0.183c-0.039-0.013-0.09-0.078-0.234,0.026c-0.142,0.103-0.194,0.064-0.337-0.052c-0.143-0.118-0.299-0.234-0.325-0.416c-0.026-0.182-0.04-0.364,0.013-0.468c0.051-0.104,0.051-0.285-0.026-0.312c-0.078-0.025,0.09-0.155,0.181-0.181c0.092-0.026,0.234-0.143,0.26-0.195c0.026-0.052,0.156-0.04,0.298-0.04c0.143,0,0.169,0,0.312,0.078c0.143,0.078,0.169-0.039,0.169-0.078c0-0.039,0.052-0.117,0.208-0.104c0.156,0.013,0.376-0.052,0.416-0.013s0.116,0.195,0.194,0.143c0.079-0.051,0.104-0.143,0.131,0.014c0.025,0.155,0.09,0.39,0.208,0.429c0.116,0.039,0.052,0.194,0.168,0.207c0.115,0.013,0.17-0.246,0.131-0.337c-0.04-0.09-0.118-0.363-0.183-0.428c-0.064-0.065-0.064-0.234,0.064-0.286c0.13-0.052,0.442-0.312,0.532-0.389c0.092-0.079,0.338-0.144,0.261-0.248c-0.078-0.104-0.104-0.168-0.104-0.247s0.078-0.052,0.117,0s0.194-0.078,0.155-0.143c-0.038-0.064-0.026-0.155,0.065-0.143c0.091,0.013,0.116-0.065,0.078-0.117c-0.039-0.052,0.091-0.117,0.182-0.091c0.092,0.026,0.325-0.013,0.364-0.065c0.038-0.052-0.078-0.104-0.078-0.208c0-0.104,0.155-0.195,0.247-0.208c0.091-0.013,0.207,0,0.221-0.039c0.012-0.039,0.143-0.143,0.155-0.052c0.014,0.091,0,0.247,0.104,0.247c0.104,0,0.232-0.117,0.272-0.129c0.038-0.013,0.286-0.065,0.338-0.078c0.052-0.013,0.363-0.039,0.325-0.13c-0.039-0.09-0.078-0.181-0.118-0.22c-0.039-0.039-0.077,0.013-0.13,0.078c-0.051,0.065-0.143,0.065-0.168,0.013c-0.026-0.051,0.012-0.207-0.078-0.156c-0.092,0.052-0.104,0.104-0.157,0.078c-0.052-0.026-0.103-0.117-0.103-0.117s0.129-0.064,0.038-0.182c-0.09-0.117-0.221-0.091-0.35-0.025c-0.13,0.064-0.118,0.051-0.273,0.09s-0.234,0.078-0.234,0.078s0.209-0.129,0.299-0.208c0.091-0.078,0.209-0.117,0.286-0.195c0.078-0.078,0.285,0.039,0.285,0.039s0.105-0.104,0.105-0.039s-0.027,0.234,0.051,0.234c0.079,0,0.299-0.104,0.21-0.131c-0.093-0.026,0.129,0,0.219-0.065c0.092-0.065,0.194-0.065,0.247-0.09c0.052-0.026,0.092-0.143,0.182-0.143c0.092,0,0.13,0.117,0,0.195s-0.143,0.273-0.208,0.325c-0.064,0.052-0.026,0.117,0.078,0.104c0.104-0.013,0.194,0.013,0.286-0.013s0.143,0.026,0.168,0.065c0.026,0.039,0.104-0.039,0.104-0.039s0.169-0.039,0.221,0.026c0.053,0.064,0.092-0.039,0.053-0.104c-0.039-0.064-0.092-0.129-0.13-0.208c-0.039-0.078-0.091-0.104-0.194-0.078c-0.104,0.026-0.13-0.026-0.195-0.064c-0.065-0.04-0.118,0.052-0.065-0.04c0.053-0.09,0.078-0.117,0.117-0.195c0.039-0.078,0.209-0.221,0.039-0.259c-0.169-0.04-0.222-0.065-0.247-0.143c-0.026-0.078-0.221-0.221-0.272-0.221c-0.053,0-0.233,0-0.247-0.065c-0.013-0.065-0.143-0.208-0.208-0.273c-0.064-0.065-0.312-0.351-0.351-0.377c-0.039-0.026-0.091-0.013-0.208,0.143c-0.116,0.157-0.22,0.183-0.312,0.144c-0.091-0.039-0.104-0.026-0.193-0.13c-0.093-0.104,0.09-0.117,0.051-0.182c-0.04-0.064-0.247-0.091-0.377-0.104c-0.13-0.013-0.221-0.156-0.416-0.169c-0.194-0.013-0.428,0.026-0.493,0.026c-0.064,0-0.064,0.091-0.09,0.234c-0.027,0.143,0.09,0.182-0.027,0.208c-0.116,0.026-0.169,0.039-0.052,0.091c0.117,0.052,0.273,0.26,0.273,0.26s0,0.117-0.092,0.182c-0.09,0.065-0.182,0.13-0.233,0.053c-0.053-0.079-0.195-0.065-0.155,0.013c0.038,0.078,0.116,0.117,0.116,0.195c0,0.077,0.117,0.272,0.039,0.337c-0.078,0.065-0.168,0.014-0.233,0.026s-0.131-0.104-0.078-0.13c0.051-0.026-0.014-0.221-0.014-0.221s-0.155,0.221-0.143,0.104c0.014-0.117-0.064-0.13-0.064-0.221c0-0.091-0.079-0.13-0.194-0.104c-0.118,0.026-0.26-0.04-0.482-0.079c-0.22-0.039-0.311-0.064-0.493-0.156c-0.182-0.091-0.247-0.026-0.338-0.013c-0.091,0.013-0.052-0.182-0.169-0.207c-0.116-0.027-0.181,0.025-0.207-0.144c-0.026-0.168,0.039-0.208,0.324-0.39c0.286-0.182,0.247-0.26,0.468-0.286c0.22-0.026,0.325,0.026,0.325-0.039s0.052-0.325,0.052-0.195S16.95,9.109,16.832,9.2c-0.116,0.091-0.052,0.104,0.04,0.104c0.091,0,0.259-0.091,0.259-0.091s0.208-0.091,0.26-0.013c0.053,0.078,0.053,0.156,0.144,0.156s0.285-0.104,0.116-0.195c-0.168-0.091-0.272-0.078-0.376-0.182s-0.078-0.065-0.195-0.039c-0.116,0.026-0.116-0.039-0.156-0.039s-0.104,0.026-0.13-0.026c-0.025-0.052,0.014-0.065,0.145-0.065c0.129,0,0.285,0.039,0.285,0.039s0.155-0.052,0.194-0.065c0.039-0.013,0.247-0.039,0.208-0.155c-0.04-0.117-0.169-0.117-0.208-0.156s0.078-0.09,0.143-0.117c0.065-0.026,0.247,0,0.247,0s0.117,0.013,0.117-0.039S17.897,8.2,17.976,8.239s0,0.156,0.117,0.13c0.116-0.026,0.143,0,0.207,0.039c0.065,0.039-0.013,0.195-0.077,0.221c-0.065,0.025-0.169,0.077-0.026,0.09c0.144,0.014,0.246,0.014,0.246,0.014s0.092-0.091,0.131-0.169c0.038-0.078,0.104-0.026,0.155,0c0.052,0.025,0.247,0.065,0.065,0.117c-0.183,0.052-0.221,0.117-0.26,0.182c-0.038,0.065-0.053,0.104-0.221,0.065c-0.17-0.039-0.26-0.026-0.299,0.039c-0.039,0.064-0.013,0.273,0.053,0.247c0.063-0.026,0.129-0.026,0.207-0.052c0.078-0.026,0.39,0.026,0.467,0.013c0.078-0.013,0.209,0.13,0.248,0.104c0.039-0.026,0.117,0.052,0.194,0.104c0.078,0.052,0.052-0.117,0.194-0.013c0.144,0.104,0.065,0.104,0.144,0.104c0.076,0,0.246,0.013,0.246,0.013s0.014-0.129,0.144-0.104c0.13,0.026,0.245,0.169,0.232,0.064c-0.012-0.103,0.013-0.181-0.09-0.259c-0.104-0.078-0.272-0.13-0.299-0.169c-0.026-0.039-0.052-0.091-0.013-0.117c0.039-0.025,0.221,0.013,0.324,0.079c0.104,0.065,0.195,0.13,0.273,0.078c0.077-0.052,0.17-0.078,0.208-0.117c0.038-0.04,0.13-0.156,0.13-0.156s-0.391-0.051-0.441-0.117c-0.053-0.065-0.235-0.156-0.287-0.156s-0.194,0.091-0.246-0.039s-0.052-0.286-0.105-0.299c-0.05-0.013-0.597-0.091-0.674-0.13c-0.078-0.039-0.39-0.13-0.507-0.195s-0.286-0.156-0.389-0.156c-0.104,0-0.533,0.052-0.611,0.039c-0.078-0.013-0.312,0.026-0.403,0.039c-0.091,0.013,0.117,0.182-0.077,0.221c-0.195,0.039-0.169,0.065-0.13-0.13c0.038-0.195-0.131-0.247-0.299-0.169c-0.169,0.078-0.442,0.13-0.377,0.221c0.065,0.091-0.012,0.157,0.117,0.247c0.13,0.091,0.183,0.117,0.35,0.104c0.17-0.013,0.339,0.025,0.339,0.025s0,0.157-0.064,0.182c-0.065,0.026-0.169,0.026-0.196,0.104c-0.025,0.078-0.155,0.117-0.155,0.078s0.065-0.169-0.026-0.234c-0.09-0.065-0.117-0.078-0.221-0.013c-0.104,0.065-0.116,0.091-0.169-0.013C16.053,8.291,15.897,8.2,15.897,8.2s-0.104-0.129-0.182-0.194c-0.077-0.065-0.22-0.052-0.234,0.013c-0.013,0.064,0.026,0.129,0.078,0.247c0.052,0.117,0.104,0.337,0.013,0.351c-0.091,0.013-0.104,0.026-0.195,0.052c-0.091,0.026-0.13-0.039-0.13-0.143s-0.04-0.195-0.013-0.234c0.026-0.039-0.104,0.027-0.234,0c-0.13-0.025-0.233,0.052-0.104,0.092c0.13,0.039,0.157,0.194,0.039,0.233c-0.117,0.039-0.559,0-0.702,0s-0.35,0.039-0.39-0.039c-0.039-0.078,0.118-0.129,0.208-0.129c0.091,0,0.363,0.012,0.467-0.13c0.104-0.143-0.13-0.169-0.233-0.169c-0.104,0-0.183-0.039-0.299-0.155c-0.118-0.117,0.078-0.195,0.052-0.247c-0.026-0.052-0.156-0.014-0.272-0.014c-0.117,0-0.299-0.09-0.299,0.014c0,0.104,0.143,0.402,0.052,0.337c-0.091-0.064-0.078-0.156-0.143-0.234c-0.065-0.078-0.168-0.065-0.299-0.052c-0.129,0.013-0.35,0.052-0.415,0.039c-0.064-0.013-0.013-0.013-0.156-0.078c-0.142-0.065-0.208-0.052-0.312-0.117C12.091,7.576,12.182,7.551,12,7.538c-0.181-0.013-0.168,0.09-0.35,0.065c-0.182-0.026-0.234,0.013-0.416,0c-0.182-0.013-0.272-0.026-0.299,0.065c-0.025,0.091-0.078,0.247-0.156,0.247c-0.077,0-0.169,0.091,0.078,0.104c0.247,0.013,0.105,0.129,0.325,0.117c0.221-0.013,0.416-0.013,0.468-0.117c0.052-0.104,0.091-0.104,0.117-0.065c0.025,0.039,0.22,0.272,0.22,0.272s0.131,0.104,0.183,0.13c0.051,0.026-0.052,0.143-0.156,0.078c-0.104-0.065-0.299-0.051-0.377-0.116c-0.078-0.065-0.429-0.065-0.52-0.052c-0.09,0.013-0.247-0.039-0.299-0.039c-0.051,0-0.221,0.13-0.221,0.13S10.532,8.252,10.494,8.2c-0.039-0.052-0.104,0.052-0.156,0.065c-0.052,0.013-0.208-0.104-0.364-0.052C9.818,8.265,9.87,8.317,9.649,8.304s-0.272-0.052-0.35-0.039C9.22,8.278,9.22,8.278,9.22,8.278S9.233,8.33,9.143,8.382C9.052,8.434,8.986,8.499,8.921,8.421C8.857,8.343,8.818,8.343,8.779,8.33c-0.04-0.013-0.118-0.078-0.286-0.04C8.324,8.33,8.064,8.239,8.013,8.239c-0.04,0-0.313-0.015-0.491-0.033c2.109-2.292,5.124-3.74,8.478-3.74c2.128,0,4.117,0.589,5.83,1.598c-0.117,0.072-0.319,0.06-0.388,0.023c-0.078-0.043-0.158-0.078-0.475-0.061c-0.317,0.018-0.665,0.122-0.595,0.226c0.072,0.104-0.142,0.165-0.197,0.113c-0.055-0.052-0.309,0.06-0.293,0.165c0.016,0.104-0.039,0.225-0.175,0.199c-0.134-0.027-0.229,0.06-0.237,0.146c-0.007,0.087-0.309,0.147-0.332,0.147c-0.024,0-0.412-0.008-0.27,0.095c0.097,0.069,0.15,0.027,0.27,0.052c0.119,0.026,0.214,0.217,0.277,0.243c0.062,0.026,0.15,0,0.189-0.052c0.04-0.052,0.095-0.234,0.095-0.234s0,0.173,0.097,0.208c0.095,0.035,0.331-0.026,0.395-0.017c0.064,0.008,0.437,0.061,0.538,0.112c0.104,0.052,0.356,0.087,0.428,0.199c0.071,0.113,0.08,0.503,0.119,0.546c0.04,0.043,0.174-0.139,0.205-0.182c0.031-0.044,0.198-0.018,0.254,0.042c0.056,0.061,0.182,0.208,0.175,0.269C21.9,8.365,21.877,8.459,21.83,8.425c-0.048-0.034-0.127-0.025-0.096-0.095c0.032-0.069,0.048-0.217-0.015-0.217c-0.064,0-0.119,0-0.119,0s-0.12-0.035-0.199,0.095s-0.015,0.26,0.04,0.26s0.184,0,0.184,0.034c0,0.035-0.136,0.139-0.128,0.2c0.009,0.061,0.11,0.268,0.144,0.312c0.031,0.043,0.197,0.086,0.244,0.096c0.049,0.008-0.111,0.017-0.07,0.077c0.04,0.061,0.102,0.208,0.189,0.243c0.087,0.035,0.333,0.19,0.363,0.26c0.032,0.069,0.222-0.052,0.262-0.061c0.04-0.008,0.032,0.182,0.143,0.191c0.11,0.008,0.15-0.018,0.245-0.096s0.072-0.182,0.079-0.26c0.009-0.078,0-0.138,0.104-0.113c0.104,0.026,0.158-0.018,0.15-0.104c-0.008-0.087-0.095-0.191,0.07-0.217c0.167-0.026,0.254-0.138,0.357-0.138c0.103,0,0.389,0.043,0.419,0c0.032-0.043,0.167-0.243,0.254-0.251c0.067-0.007,0.224-0.021,0.385-0.042c1.582,1.885,2.561,4.284,2.673,6.905c-0.118,0.159-0.012,0.305,0.021,0.408c0.001,0.03,0.005,0.058,0.005,0.088c0,0.136-0.016,0.269-0.021,0.404C27.512,16.406,27.512,16.408,27.51,16.41zM17.794,12.084c-0.064,0.013-0.169-0.052-0.169-0.143s-0.091,0.169-0.04,0.247c0.053,0.078-0.104,0.169-0.155,0.169s-0.091-0.116-0.078-0.233c0.014-0.117-0.077-0.221-0.221-0.208c-0.143,0.014-0.208,0.13-0.259,0.169c-0.053,0.039-0.053,0.259-0.04,0.312s0.013,0.235-0.116,0.221c-0.118-0.013-0.092-0.233-0.079-0.312c0.014-0.078-0.039-0.273,0.014-0.376c0.053-0.104,0.207-0.143,0.312-0.156s0.324,0.065,0.363,0.052c0.04-0.014,0.222-0.014,0.312,0C17.729,11.837,17.858,12.071,17.794,12.084zM18.027,12.123c0.04,0.026,0.311-0.039,0.364,0.026c0.051,0.065-0.054,0.078-0.183,0.13c-0.129,0.052-0.169,0.039-0.221,0.104s-0.221,0.09-0.299,0.168c-0.078,0.079-0.217,0.125-0.246,0.065c-0.04-0.078,0.013-0.039,0.025-0.078c0.013-0.039,0.245-0.129,0.245-0.129S17.988,12.097,18.027,12.123zM16.988,11.668c-0.038,0.013-0.182-0.026-0.3-0.026c-0.116,0-0.091-0.078-0.143-0.064c-0.051,0.013-0.168,0.039-0.247,0.078c-0.078,0.039-0.208,0.03-0.208-0.04c0-0.104,0.052-0.078,0.221-0.143c0.169-0.065,0.352-0.247,0.429-0.169c0.078,0.078,0.221,0.169,0.312,0.182C17.144,11.5,17.026,11.655,16.988,11.668zM15.659,7.637c-0.079,0.026-0.347,0.139-0.321,0.199c0.01,0.023,0.078,0.069,0.19,0.052c0.113-0.018,0.276-0.035,0.355-0.043c0.078-0.009,0.095-0.139,0.009-0.147C15.805,7.689,15.736,7.611,15.659,7.637zM14.698,7.741c-0.061,0.026-0.243-0.043-0.338,0.018c-0.061,0.038-0.026,0.164,0.07,0.172c0.095,0.009,0.259-0.06,0.276-0.008c0.018,0.052,0.078,0.286,0.234,0.208c0.156-0.078,0.147-0.147,0.19-0.156c0.043-0.009-0.008-0.199-0.078-0.243C14.983,7.689,14.758,7.715,14.698,7.741zM14.385,7.005c0.017,0.044-0.008,0.078,0.113,0.095c0.121,0.018,0.173,0.035,0.243,0.035c0.069,0,0.042-0.113-0.018-0.19c-0.061-0.078-0.043-0.069-0.199-0.113c-0.156-0.043-0.312-0.043-0.416-0.035c-0.104,0.009-0.217-0.017-0.243,0.104c-0.013,0.062,0.07,0.112,0.174,0.112S14.368,6.962,14.385,7.005zM14.611,7.481c0.043,0.095,0.043,0.051,0.165,0.061C14.896,7.551,14.991,7.421,15,7.378c0.009-0.044-0.061-0.13-0.225-0.113c-0.165,0.017-0.667-0.026-0.736,0.034c-0.066,0.058,0,0.233-0.026,0.251c-0.026,0.017,0.009,0.095,0.077,0.078c0.069-0.017,0.104-0.182,0.157-0.182C14.299,7.447,14.568,7.386,14.611,7.481zM12.982,7.126c0.052,0.043,0.183,0.008,0.173-0.035c-0.008-0.043,0.053-0.217-0.051-0.225C13,6.858,12.854,6.962,12.697,7.014c-0.101,0.033-0.078,0.13-0.009,0.13S12.931,7.083,12.982,7.126zM13.72,7.282c-0.087,0.043-0.114,0.069-0.191,0.052c-0.078-0.017-0.078-0.156-0.217-0.13c-0.138,0.026-0.164,0.104-0.207,0.139s-0.139,0.061-0.173,0.043c-0.034-0.017-0.234-0.129-0.234-0.129s-0.416-0.018-0.433-0.07c-0.017-0.052-0.086-0.138-0.277-0.121s-0.52,0.13-0.572,0.13c-0.052,0,0.062,0.104-0.009,0.104c-0.069,0-0.155-0.008-0.181,0.069c-0.018,0.053,0.078,0.052,0.189,0.052c0.112,0,0.295,0,0.347-0.026c0.052-0.026,0.312-0.087,0.303-0.009c-0.009,0.079,0.104,0.199,0.164,0.182c0.061-0.017,0.183-0.13,0.243-0.086c0.061,0.043,0.07,0.146,0.13,0.173c0.061,0.025,0.226,0.025,0.304,0c0.077-0.027,0.294-0.027,0.389-0.009c0.095,0.018,0.373,0.069,0.399,0.018c0.026-0.053,0.104-0.061,0.112-0.113s0.051-0.216,0.051-0.216S13.806,7.239,13.72,7.282zM18.105,16.239c-0.119,0.021-0.091,0.252,0.052,0.21C18.3,16.407,18.223,16.217,18.105,16.239zM19.235,15.929c-0.104-0.026-0.221,0-0.299,0.013c-0.078,0.013-0.299,0.208-0.299,0.208s0.143,0.026,0.233,0.026c0.092,0,0.144,0.051,0.221,0.09c0.078,0.04,0.221-0.052,0.272-0.052c0.053,0,0.118,0.156,0.131-0.013C19.508,16.032,19.339,15.955,19.235,15.929zM15.616,7.507c-0.043-0.104-0.259-0.139-0.304-0.035C15.274,7.563,15.659,7.611,15.616,7.507zM18.093,15.292c0.143-0.026,0.064-0.144-0.053-0.13C17.922,15.175,17.949,15.318,18.093,15.292zM19.82,16.095c-0.119,0.022-0.092,0.253,0.051,0.211C20.015,16.264,19.937,16.074,19.82,16.095zM18.247,15.708c-0.09,0.013-0.285-0.09-0.389-0.182c-0.104-0.091-0.299-0.091-0.377-0.091c-0.077,0-0.39,0.091-0.39,0.091c-0.013,0.13,0.117,0.091,0.273,0.091s0.429-0.026,0.479,0.039c0.053,0.064,0.286,0.168,0.352,0.221c0.064,0.052,0.272,0.065,0.285,0.013S18.338,15.695,18.247,15.708zM16.698,7.412c-0.13-0.009-0.295-0.009-0.399,0c-0.104,0.008-0.182-0.069-0.26-0.113c-0.077-0.043-0.251-0.182-0.354-0.199c-0.104-0.017-0.086-0.017-0.303-0.069c-0.11-0.027-0.294-0.061-0.294-0.086c0-0.026-0.052,0.121,0.043,0.165c0.095,0.043,0.251,0.121,0.363,0.164c0.114,0.043,0.329,0.052,0.399,0.139c0.069,0.086,0.303,0.156,0.303,0.156l0.277,0.026c0,0,0.191-0.043,0.39-0.026c0.199,0.017,0.493,0.043,0.659,0.035c0.163-0.008,0.189-0.061,0.208-0.095c0.016-0.035-0.304-0.104-0.383-0.095C17.271,7.42,16.827,7.42,16.698,7.412zM17.182,9.404c-0.034,0.039,0.157,0.095,0.191,0.043C17.407,9.396,17.271,9.309,17.182,9.404zM17.764,9.585c0.086-0.035,0.043-0.139-0.079-0.104C17.547,9.521,17.676,9.62,17.764,9.585z")}})},"./src/shape/icon/GlobeAlt.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.GlobeAlt=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.GlobeAlt",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM27.436,17.39c0.001,0.002,0.004,0.002,0.005,0.004c-0.022,0.187-0.054,0.37-0.085,0.554c-0.015-0.012-0.034-0.025-0.047-0.036c-0.103-0.09-0.254-0.128-0.318-0.115c-0.157,0.032,0.229,0.305,0.267,0.342c0.009,0.009,0.031,0.03,0.062,0.058c-1.029,5.312-5.709,9.338-11.319,9.338c-4.123,0-7.736-2.18-9.776-5.441c0.123-0.016,0.24-0.016,0.28-0.076c0.051-0.077,0.102-0.241,0.178-0.331c0.077-0.089,0.165-0.229,0.127-0.292c-0.039-0.064,0.101-0.344,0.088-0.419c-0.013-0.076-0.127-0.256,0.064-0.407s0.394-0.382,0.407-0.444c0.012-0.063,0.166-0.331,0.152-0.458c-0.012-0.127-0.152-0.28-0.24-0.318c-0.09-0.037-0.28-0.05-0.356-0.151c-0.077-0.103-0.292-0.203-0.368-0.178c-0.076,0.025-0.204,0.05-0.305-0.015c-0.102-0.062-0.267-0.139-0.33-0.189c-0.065-0.05-0.229-0.088-0.305-0.088c-0.077,0-0.065-0.052-0.178,0.101c-0.114,0.153,0,0.204-0.204,0.177c-0.204-0.023,0.025-0.036,0.141-0.189c0.113-0.152-0.013-0.242-0.141-0.203c-0.126,0.038-0.038,0.115-0.241,0.153c-0.203,0.036-0.203-0.09-0.076-0.115s0.355-0.139,0.355-0.19c0-0.051-0.025-0.191-0.127-0.191s-0.077-0.126-0.229-0.291c-0.092-0.101-0.196-0.164-0.299-0.204c-0.09-0.579-0.15-1.167-0.15-1.771c0-2.844,1.039-5.446,2.751-7.458c0.024-0.02,0.048-0.034,0.069-0.036c0.084-0.009,0.31-0.025,0.51-0.059c0.202-0.034,0.418-0.161,0.489-0.153c0.069,0.008,0.241,0.008,0.186-0.042C8.417,8.2,8.339,8.082,8.223,8.082S8.215,7.896,8.246,7.896c0.03,0,0.186,0.025,0.178,0.11C8.417,8.091,8.471,8.2,8.625,8.167c0.156-0.034,0.132-0.162,0.102-0.195C8.695,7.938,8.672,7.853,8.642,7.794c-0.031-0.06-0.023-0.136,0.14-0.153C8.944,7.625,9.168,7.708,9.16,7.573s0-0.28,0.046-0.356C9.253,7.142,9.354,7.09,9.299,7.065C9.246,7.04,9.176,7.099,9.121,6.972c-0.054-0.127,0.047-0.22,0.108-0.271c0.02-0.015,0.067-0.06,0.124-0.112C11.234,5.257,13.524,4.466,16,4.466c3.213,0,6.122,1.323,8.214,3.45c-0.008,0.022-0.01,0.052-0.031,0.056c-0.077,0.013-0.166,0.063-0.179-0.051c-0.013-0.114-0.013-0.331-0.102-0.203c-0.089,0.127-0.127,0.127-0.127,0.191c0,0.063,0.076,0.127,0.051,0.241C23.8,8.264,23.8,8.341,23.84,8.341c0.036,0,0.126-0.115,0.239-0.141c0.116-0.025,0.319-0.088,0.332,0.026c0.013,0.115,0.139,0.152,0.013,0.203c-0.128,0.051-0.267,0.026-0.293-0.051c-0.025-0.077-0.114-0.077-0.203-0.013c-0.088,0.063-0.279,0.292-0.279,0.292s-0.306,0.139-0.343,0.114c-0.04-0.025,0.101-0.165,0.203-0.228c0.102-0.064,0.178-0.204,0.14-0.242c-0.038-0.038-0.088-0.279-0.063-0.343c0.025-0.063,0.139-0.152,0.013-0.216c-0.127-0.063-0.217-0.14-0.318-0.178s-0.216,0.152-0.305,0.204c-0.089,0.051-0.076,0.114-0.191,0.127c-0.114,0.013-0.189,0.165,0,0.254c0.191,0.089,0.255,0.152,0.204,0.204c-0.051,0.051-0.267-0.025-0.267-0.025s-0.165-0.076-0.268-0.076c-0.101,0-0.229-0.063-0.33-0.076c-0.102-0.013-0.306-0.013-0.355,0.038c-0.051,0.051-0.179,0.203-0.28,0.152c-0.101-0.051-0.101-0.102-0.241-0.051c-0.14,0.051-0.279-0.038-0.355,0.038c-0.077,0.076-0.013,0.076-0.255,0c-0.241-0.076-0.189,0.051-0.419,0.089s-0.368-0.038-0.432,0.038c-0.064,0.077-0.153,0.217-0.19,0.127c-0.038-0.088,0.126-0.241,0.062-0.292c-0.062-0.051-0.33-0.025-0.367,0.013c-0.039,0.038-0.014,0.178,0.011,0.229c0.026,0.05,0.064,0.254-0.011,0.216c-0.077-0.038-0.064-0.166-0.141-0.152c-0.076,0.013-0.165,0.051-0.203,0.077c-0.038,0.025-0.191,0.025-0.229,0.076c-0.037,0.051,0.014,0.191-0.051,0.203c-0.063,0.013-0.114,0.064-0.254-0.025c-0.14-0.089-0.14-0.038-0.178-0.012c-0.038,0.025-0.216,0.127-0.229,0.012c-0.013-0.114,0.025-0.152-0.089-0.229c-0.115-0.076-0.026-0.076,0.127-0.025c0.152,0.05,0.343,0.075,0.622-0.013c0.28-0.089,0.395-0.127,0.28-0.178c-0.115-0.05-0.229-0.101-0.406-0.127c-0.179-0.025-0.42-0.025-0.7-0.127c-0.279-0.102-0.343-0.14-0.457-0.165c-0.115-0.026-0.813-0.14-1.132-0.089c-0.317,0.051-1.193,0.28-1.245,0.318s-0.128,0.19-0.292,0.318c-0.165,0.127-0.47,0.419-0.712,0.47c-0.241,0.051-0.521,0.254-0.521,0.305c0,0.051,0.101,0.242,0.076,0.28c-0.025,0.038,0.05,0.229,0.191,0.28c0.139,0.05,0.381,0.038,0.393-0.039c0.014-0.076,0.204-0.241,0.217-0.127c0.013,0.115,0.14,0.292,0.114,0.368c-0.025,0.077,0,0.153,0.09,0.14c0.088-0.012,0.559-0.114,0.559-0.114s0.153-0.064,0.127-0.166c-0.026-0.101,0.166-0.241,0.203-0.279c0.038-0.038,0.178-0.191,0.014-0.241c-0.167-0.051-0.293-0.064-0.115-0.216s0.292,0,0.521-0.229c0.229-0.229-0.051-0.292,0.191-0.305c0.241-0.013,0.496-0.025,0.444,0.051c-0.05,0.076-0.342,0.242-0.508,0.318c-0.166,0.077-0.14,0.216-0.076,0.292c0.063,0.076,0.09,0.254,0.204,0.229c0.113-0.025,0.254-0.114,0.38-0.101c0.128,0.012,0.383-0.013,0.42-0.013c0.039,0,0.216,0.178,0.114,0.203c-0.101,0.025-0.229,0.013-0.445,0.025c-0.215,0.013-0.456,0.013-0.456,0.051c0,0.039,0.292,0.127,0.19,0.191c-0.102,0.063-0.203-0.013-0.331-0.026c-0.127-0.012-0.203,0.166-0.241,0.267c-0.039,0.102,0.063,0.28-0.127,0.216c-0.191-0.063-0.331-0.063-0.381-0.038c-0.051,0.025-0.203,0.076-0.331,0.114c-0.126,0.038-0.076-0.063-0.242-0.063c-0.164,0-0.164,0-0.164,0l-0.103,0.013c0,0-0.101-0.063-0.114-0.165c-0.013-0.102,0.05-0.216-0.013-0.241c-0.064-0.026-0.292,0.012-0.33,0.088c-0.038,0.076-0.077,0.216-0.026,0.28c0.052,0.063,0.204,0.19,0.064,0.152c-0.14-0.038-0.317-0.051-0.419,0.026c-0.101,0.076-0.279,0.241-0.279,0.241s-0.318,0.025-0.318,0.102c0,0.077,0,0.178-0.114,0.191c-0.115,0.013-0.268,0.05-0.42,0.076c-0.153,0.025-0.139,0.088-0.317,0.102s-0.204,0.089-0.038,0.114c0.165,0.025,0.418,0.127,0.431,0.241c0.014,0.114-0.013,0.242-0.076,0.356c-0.043,0.079-0.305,0.026-0.458,0.026c-0.152,0-0.456-0.051-0.584,0c-0.127,0.051-0.102,0.305-0.064,0.419c0.039,0.114-0.012,0.178-0.063,0.216c-0.051,0.038-0.065,0.152,0,0.204c0.063,0.051,0.114,0.165,0.166,0.178c0.051,0.013,0.215-0.038,0.279,0.025c0.064,0.064,0.127,0.216,0.165,0.178c0.039-0.038,0.089-0.203,0.153-0.166c0.064,0.039,0.216-0.012,0.331-0.025s0.177-0.14,0.292-0.204c0.114-0.063,0.05-0.063,0.013-0.14c-0.038-0.076,0.114-0.165,0.204-0.254c0.088-0.089,0.253-0.013,0.292-0.115c0.038-0.102,0.051-0.279,0.151-0.267c0.103,0.013,0.243,0.076,0.331,0.076c0.089,0,0.279-0.14,0.332-0.165c0.05-0.025,0.241-0.013,0.267,0.102c0.025,0.114,0.241,0.254,0.292,0.279c0.051,0.025,0.381,0.127,0.433,0.165c0.05,0.038,0.126,0.153,0.152,0.254c0.025,0.102,0.114,0.102,0.128,0.013c0.012-0.089-0.065-0.254,0.025-0.242c0.088,0.013,0.191-0.026,0.191-0.026s-0.243-0.165-0.331-0.203c-0.088-0.038-0.255-0.114-0.331-0.241c-0.076-0.127-0.267-0.153-0.254-0.279c0.013-0.127,0.191-0.051,0.292,0.051c0.102,0.102,0.356,0.241,0.445,0.33c0.088,0.089,0.229,0.127,0.267,0.242c0.039,0.114,0.152,0.241,0.19,0.292c0.038,0.051,0.165,0.331,0.204,0.394c0.038,0.063,0.165-0.012,0.229-0.063c0.063-0.051,0.179-0.076,0.191-0.178c0.013-0.102-0.153-0.178-0.203-0.216c-0.051-0.038,0.127-0.076,0.191-0.127c0.063-0.05,0.177-0.14,0.228-0.063c0.051,0.077,0.026,0.381,0.051,0.432c0.025,0.051,0.279,0.127,0.331,0.191c0.05,0.063,0.267,0.089,0.304,0.051c0.039-0.038,0.242,0.026,0.294,0.038c0.049,0.013,0.202-0.025,0.304-0.05c0.103-0.025,0.204-0.102,0.191,0.063c-0.013,0.165-0.051,0.419-0.179,0.546c-0.127,0.127-0.076,0.191-0.202,0.191c-0.06,0-0.113,0-0.156,0.021c-0.041-0.065-0.098-0.117-0.175-0.097c-0.152,0.038-0.344,0.038-0.47,0.19c-0.128,0.153-0.178,0.165-0.204,0.114c-0.025-0.051,0.369-0.267,0.317-0.331c-0.05-0.063-0.355-0.038-0.521-0.038c-0.166,0-0.305-0.102-0.433-0.127c-0.126-0.025-0.292,0.127-0.418,0.254c-0.128,0.127-0.216,0.038-0.331,0.038c-0.115,0-0.331-0.165-0.331-0.165s-0.216-0.089-0.305-0.089c-0.088,0-0.267-0.165-0.318-0.165c-0.05,0-0.19-0.115-0.088-0.166c0.101-0.05,0.202,0.051,0.101-0.229c-0.101-0.279-0.33-0.216-0.419-0.178c-0.088,0.039-0.724,0.025-0.775,0.025c-0.051,0-0.419,0.127-0.533,0.178c-0.116,0.051-0.318,0.115-0.369,0.14c-0.051,0.025-0.318-0.051-0.433,0.013c-0.151,0.084-0.291,0.216-0.33,0.216c-0.038,0-0.153,0.089-0.229,0.28c-0.077,0.19,0.013,0.355-0.128,0.419c-0.139,0.063-0.394,0.204-0.495,0.305c-0.102,0.101-0.229,0.458-0.355,0.623c-0.127,0.165,0,0.317,0.025,0.419c0.025,0.101,0.114,0.292-0.025,0.471c-0.14,0.178-0.127,0.266-0.191,0.279c-0.063,0.013,0.063,0.063,0.088,0.19c0.025,0.128-0.114,0.255,0.128,0.369c0.241,0.113,0.355,0.217,0.418,0.367c0.064,0.153,0.382,0.407,0.382,0.407s0.229,0.205,0.344,0.293c0.114,0.089,0.152,0.038,0.177-0.05c0.025-0.09,0.178-0.104,0.355-0.104c0.178,0,0.305,0.04,0.483,0.014c0.178-0.025,0.356-0.141,0.42-0.166c0.063-0.025,0.279-0.164,0.443-0.063c0.166,0.103,0.141,0.241,0.23,0.332c0.088,0.088,0.24,0.037,0.355-0.051c0.114-0.09,0.064-0.052,0.203,0.025c0.14,0.075,0.204,0.151,0.077,0.267c-0.128,0.113-0.051,0.293-0.128,0.47c-0.076,0.178-0.063,0.203,0.077,0.278c0.14,0.076,0.394,0.548,0.47,0.638c0.077,0.088-0.025,0.342,0.064,0.495c0.089,0.151,0.178,0.254,0.077,0.331c-0.103,0.075-0.28,0.216-0.292,0.47s0.051,0.431,0.102,0.521s0.177,0.331,0.241,0.419c0.064,0.089,0.14,0.305,0.152,0.445c0.013,0.14-0.024,0.306,0.039,0.381c0.064,0.076,0.102,0.191,0.216,0.292c0.115,0.103,0.152,0.318,0.152,0.318s0.039,0.089,0.051,0.229c0.012,0.14,0.025,0.228,0.152,0.292c0.126,0.063,0.215,0.076,0.28,0.013c0.063-0.063,0.381-0.077,0.546-0.063c0.165,0.013,0.355-0.075,0.521-0.19s0.407-0.419,0.496-0.508c0.089-0.09,0.292-0.255,0.268-0.356c-0.025-0.101-0.077-0.203,0.024-0.254c0.102-0.052,0.344-0.152,0.356-0.229c0.013-0.077-0.09-0.395-0.115-0.457c-0.024-0.064,0.064-0.18,0.165-0.306c0.103-0.128,0.421-0.216,0.471-0.267c0.051-0.053,0.191-0.267,0.217-0.433c0.024-0.167-0.051-0.369,0-0.457c0.05-0.09,0.013-0.165-0.103-0.268c-0.114-0.102-0.089-0.407-0.127-0.457c-0.037-0.051-0.013-0.319,0.063-0.345c0.076-0.023,0.242-0.279,0.344-0.393c0.102-0.114,0.394-0.47,0.534-0.496c0.139-0.025,0.355-0.229,0.368-0.343c0.013-0.115,0.38-0.547,0.394-0.635c0.013-0.09,0.166-0.42,0.102-0.497c-0.062-0.076-0.559,0.115-0.622,0.141c-0.064,0.025-0.241,0.127-0.446,0.113c-0.202-0.013-0.114-0.177-0.127-0.254c-0.012-0.076-0.228-0.368-0.279-0.381c-0.051-0.012-0.203-0.166-0.267-0.317c-0.063-0.153-0.152-0.343-0.254-0.458c-0.102-0.114-0.165-0.38-0.268-0.559c-0.101-0.178-0.189-0.407-0.279-0.572c-0.021-0.041-0.045-0.079-0.067-0.117c0.118-0.029,0.289-0.082,0.31-0.009c0.024,0.088,0.165,0.279,0.19,0.419s0.165,0.089,0.178,0.216c0.014,0.128,0.14,0.433,0.19,0.47c0.052,0.038,0.28,0.242,0.318,0.318c0.038,0.076,0.089,0.178,0.127,0.369c0.038,0.19,0.076,0.444,0.179,0.482c0.102,0.038,0.444-0.064,0.508-0.102s0.482-0.242,0.635-0.255c0.153-0.012,0.179-0.115,0.368-0.152c0.191-0.038,0.331-0.177,0.458-0.28c0.127-0.101,0.28-0.355,0.33-0.444c0.052-0.088,0.179-0.152,0.115-0.253c-0.063-0.103-0.331-0.254-0.433-0.268c-0.102-0.012-0.089-0.178-0.152-0.178s-0.051,0.088-0.178,0.153c-0.127,0.063-0.255,0.19-0.344,0.165s0.026-0.089-0.113-0.203s-0.192-0.14-0.192-0.228c0-0.089-0.278-0.255-0.304-0.382c-0.026-0.127,0.19-0.305,0.254-0.19c0.063,0.114,0.115,0.292,0.279,0.368c0.165,0.076,0.318,0.204,0.395,0.229c0.076,0.025,0.267-0.14,0.33-0.114c0.063,0.024,0.191,0.253,0.306,0.292c0.113,0.038,0.495,0.051,0.559,0.051s0.33,0.013,0.381-0.063c0.051-0.076,0.089-0.076,0.153-0.076c0.062,0,0.177,0.229,0.267,0.254c0.089,0.025,0.254,0.013,0.241,0.179c-0.012,0.164,0.076,0.305,0.165,0.317c0.09,0.012,0.293-0.191,0.293-0.191s0,0.318-0.012,0.433c-0.014,0.113,0.139,0.534,0.139,0.534s0.19,0.393,0.241,0.482s0.267,0.355,0.267,0.47c0,0.115,0.025,0.293,0.103,0.293c0.076,0,0.152-0.203,0.24-0.331c0.091-0.126,0.116-0.305,0.153-0.432c0.038-0.127,0.038-0.356,0.038-0.444c0-0.09,0.075-0.166,0.255-0.242c0.178-0.076,0.304-0.292,0.456-0.407c0.153-0.115,0.141-0.305,0.446-0.305c0.305,0,0.278,0,0.355-0.077c0.076-0.076,0.151-0.127,0.19,0.013c0.038,0.14,0.254,0.343,0.292,0.394c0.038,0.052,0.114,0.191,0.103,0.344c-0.013,0.152,0.012,0.33,0.075,0.33s0.191-0.216,0.191-0.216s0.279-0.189,0.267,0.013c-0.014,0.203,0.025,0.419,0.025,0.545c0,0.053,0.042,0.135,0.088,0.21c-0.005,0.059-0.004,0.119-0.009,0.178C27.388,17.153,27.387,17.327,27.436,17.39zM20.382,12.064c0.076,0.05,0.102,0.127,0.152,0.203c0.052,0.076,0.14,0.05,0.203,0.114c0.063,0.064-0.178,0.14-0.075,0.216c0.101,0.077,0.151,0.381,0.165,0.458c0.013,0.076-0.279,0.114-0.369,0.102c-0.089-0.013-0.354-0.102-0.445-0.127c-0.089-0.026-0.139-0.343-0.025-0.331c0.116,0.013,0.141-0.025,0.267-0.139c0.128-0.115-0.189-0.166-0.278-0.191c-0.089-0.025-0.268-0.305-0.331-0.394c-0.062-0.089-0.014-0.228,0.141-0.331c0.076-0.051,0.279,0.063,0.381,0c0.101-0.063,0.203-0.14,0.241-0.165c0.039-0.025,0.293,0.038,0.33,0.114c0.039,0.076,0.191,0.191,0.141,0.229c-0.052,0.038-0.281,0.076-0.356,0c-0.075-0.077-0.255,0.012-0.268,0.152C20.242,12.115,20.307,12.013,20.382,12.064zM16.875,12.28c-0.077-0.025,0.025-0.178,0.102-0.229c0.075-0.051,0.164-0.178,0.241-0.305c0.076-0.127,0.178-0.14,0.241-0.127c0.063,0.013,0.203,0.241,0.241,0.318c0.038,0.076,0.165-0.026,0.217-0.051c0.05-0.025,0.127-0.102,0.14-0.165s0.127-0.102,0.254-0.102s0.013,0.102-0.076,0.127c-0.09,0.025-0.038,0.077,0.113,0.127c0.153,0.051,0.293,0.191,0.459,0.279c0.165,0.089,0.19,0.267,0.088,0.292c-0.101,0.025-0.406,0.051-0.521,0.038c-0.114-0.013-0.254-0.127-0.419-0.153c-0.165-0.025-0.369-0.013-0.433,0.077s-0.292,0.05-0.395,0.05c-0.102,0-0.228,0.127-0.253,0.077C16.875,12.534,16.951,12.306,16.875,12.28zM17.307,9.458c0.063-0.178,0.419,0.038,0.355,0.127C17.599,9.675,17.264,9.579,17.307,9.458zM17.802,18.584c0.063,0.102-0.14,0.431-0.254,0.407c-0.113-0.027-0.076-0.318-0.038-0.382C17.548,18.545,17.769,18.529,17.802,18.584zM13.189,12.674c0.025-0.051-0.039-0.153-0.127-0.013C13.032,12.71,13.164,12.725,13.189,12.674zM20.813,8.035c0.141,0.076,0.339,0.107,0.433,0.013c0.076-0.076,0.013-0.204-0.05-0.216c-0.064-0.013-0.104-0.115,0.062-0.203c0.165-0.089,0.343-0.204,0.534-0.229c0.19-0.025,0.622-0.038,0.774,0c0.152,0.039,0.382-0.166,0.445-0.254s-0.203-0.152-0.279-0.051c-0.077,0.102-0.444,0.076-0.521,0.051c-0.076-0.025-0.686,0.102-0.812,0.102c-0.128,0-0.179,0.152-0.356,0.229c-0.179,0.076-0.42,0.191-0.509,0.229c-0.088,0.038-0.177,0.19-0.101,0.216C20.509,7.947,20.674,7.959,20.813,8.035zM14.142,12.674c0.064-0.089-0.051-0.217-0.114-0.217c-0.12,0-0.178,0.191-0.103,0.254C14.002,12.776,14.078,12.763,14.142,12.674zM14.714,13.017c0.064,0.025,0.114,0.102,0.165,0.114c0.052,0.013,0.217,0,0.167-0.127s-0.167-0.127-0.204-0.127c-0.038,0-0.203-0.038-0.267,0C14.528,12.905,14.65,12.992,14.714,13.017zM11.308,10.958c0.101,0.013,0.217-0.063,0.305-0.101c0.088-0.038,0.216-0.114,0.216-0.229c0-0.114-0.025-0.216-0.077-0.267c-0.051-0.051-0.14-0.064-0.216-0.051c-0.115,0.02-0.127,0.14-0.203,0.14c-0.076,0-0.165,0.025-0.14,0.114s0.077,0.152,0,0.19C11.117,10.793,11.205,10.946,11.308,10.958zM11.931,10.412c0.127,0.051,0.394,0.102,0.292,0.153c-0.102,0.051-0.28,0.19-0.305,0.267s0.216,0.153,0.216,0.153s-0.077,0.089-0.013,0.114c0.063,0.025,0.102-0.089,0.203-0.089c0.101,0,0.304,0.063,0.406,0.063c0.103,0,0.267-0.14,0.254-0.229c-0.013-0.089-0.14-0.229-0.254-0.28c-0.113-0.051-0.241-0.28-0.317-0.331c-0.076-0.051,0.076-0.178-0.013-0.267c-0.09-0.089-0.153-0.076-0.255-0.14c-0.102-0.063-0.191,0.013-0.254,0.089c-0.063,0.076-0.14-0.013-0.217,0.012c-0.102,0.035-0.063,0.166-0.012,0.229C11.714,10.221,11.804,10.361,11.931,10.412zM24.729,17.198c-0.083,0.037-0.153,0.47,0,0.521c0.152,0.052,0.241-0.202,0.191-0.267C24.868,17.39,24.843,17.147,24.729,17.198zM20.114,20.464c-0.159-0.045-0.177,0.166-0.304,0.306c-0.128,0.141-0.267,0.254-0.317,0.241c-0.052-0.013-0.331,0.089-0.242,0.279c0.089,0.191,0.076,0.382-0.013,0.472c-0.089,0.088,0.076,0.342,0.052,0.482c-0.026,0.139,0.037,0.229,0.215,0.229s0.242-0.064,0.318-0.229c0.076-0.166,0.088-0.331,0.164-0.47c0.077-0.141,0.141-0.434,0.179-0.51c0.038-0.075,0.114-0.316,0.102-0.457C20.254,20.669,20.204,20.489,20.114,20.464zM10.391,8.802c-0.069-0.06-0.229-0.102-0.306-0.11c-0.076-0.008-0.152,0.06-0.321,0.06c-0.168,0-0.279,0.067-0.347,0C9.349,8.684,9.068,8.65,9.042,8.692C9.008,8.749,8.941,8.751,9.008,8.87c0.069,0.118,0.12,0.186,0.179,0.178s0.262-0.017,0.288,0.051C9.5,9.167,9.569,9.226,9.712,9.184c0.145-0.042,0.263-0.068,0.296-0.119c0.033-0.051,0.263-0.059,0.263-0.059S10.458,8.861,10.391,8.802z")}})},"./src/shape/icon/GlobeAlt2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.GlobeAlt2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.GlobeAlt2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM8.251,7.48c0.122,0.055,0.255,0.104,0.28,0.137C8.57,7.668,8.621,7.823,8.557,7.861C8.492,7.9,8.39,7.887,8.376,7.771c-0.013-0.115-0.026-0.128-0.18-0.18c-0.022-0.007-0.035-0.01-0.051-0.015C8.18,7.544,8.216,7.512,8.251,7.48zM7.733,7.974c0.031,0.087,0.113,0.125,0,0.17C7.673,8.168,7.611,8.172,7.559,8.165C7.617,8.102,7.672,8.035,7.733,7.974zM16,27.533C9.639,27.533,4.466,22.36,4.466,16c0-0.085,0.011-0.168,0.013-0.254c0.004-0.003,0.008-0.006,0.012-0.009c0.129-0.102,0.283-0.359,0.334-0.45c0.052-0.089,0.181-0.154,0.116-0.256c-0.059-0.096-0.292-0.23-0.407-0.261c0.01-0.099,0.032-0.195,0.045-0.294c0.063,0.077,0.137,0.17,0.208,0.194c0.115,0.038,0.501,0.052,0.566,0.052c0.063,0,0.334,0.014,0.386-0.064c0.051-0.077,0.09-0.077,0.154-0.077c0.064,0,0.18,0.231,0.271,0.257c0.089,0.026,0.257,0.013,0.244,0.181c-0.012,0.166,0.077,0.309,0.167,0.321c0.09,0.013,0.296-0.194,0.296-0.194s0,0.322-0.012,0.438C6.846,15.698,7,16.124,7,16.124s0.193,0.397,0.244,0.488c0.052,0.09,0.27,0.36,0.27,0.476c0,0.117,0.026,0.297,0.104,0.297s0.155-0.206,0.244-0.335c0.091-0.128,0.117-0.31,0.155-0.438c0.039-0.129,0.039-0.36,0.039-0.45c0-0.091,0.076-0.168,0.257-0.245c0.181-0.077,0.309-0.296,0.463-0.412c0.155-0.116,0.142-0.309,0.452-0.309c0.308,0,0.282,0,0.36-0.078c0.077-0.077,0.154-0.128,0.192,0.013c0.039,0.142,0.257,0.347,0.296,0.399c0.039,0.052,0.116,0.193,0.104,0.348c-0.013,0.153,0.012,0.334,0.077,0.334c0.064,0,0.193-0.219,0.193-0.219s0.283-0.192,0.27,0.014c-0.014,0.205,0.025,0.425,0.025,0.552c0,0.13,0.232,0.438,0.232,0.362c0-0.079,0.103-0.296,0.103-0.413c0-0.114,0.064-0.063,0.231,0.051c0.167,0.116,0.283,0.349,0.283,0.349s0.168,0.154,0.193,0.219c0.026,0.064,0.206-0.025,0.244-0.104c0.039-0.076,0.065-0.115,0.167-0.141c0.104-0.026,0.231-0.026,0.271-0.168c0.039-0.142,0.154-0.308,0-0.502c-0.154-0.193-0.232-0.321-0.347-0.412c-0.117-0.09-0.206-0.322-0.206-0.322s0.244-0.218,0.321-0.296c0.079-0.077,0.193-0.025,0.207,0.064c0.013,0.091-0.115,0.168-0.141,0.361c-0.026,0.192,0.154,0.257,0.206,0.192c0.051-0.065,0.18-0.219,0.18-0.257c0-0.039-0.089-0.026-0.102-0.167c-0.013-0.142,0.166-0.245,0.23-0.207c0.066,0.039,0.477-0.051,0.67-0.154s0.308-0.322,0.425-0.412c0.116-0.089,0.515-0.386,0.489-0.527c-0.026-0.142,0.012-0.334-0.09-0.515c-0.103-0.18-0.232-0.295-0.283-0.373c-0.051-0.077,0.219-0.09,0.347-0.206c0.129-0.116,0-0.219-0.064-0.206c-0.064,0.013-0.232,0.052-0.296,0.039c-0.064-0.013-0.103-0.077-0.206-0.155c-0.102-0.077,0.026-0.192,0.091-0.179c0.064,0.013,0.23-0.129,0.308-0.193c0.077-0.064,0.193-0.115,0.154-0.051c-0.038,0.064-0.128,0.296-0.026,0.309c0.104,0.013,0.348-0.193,0.388-0.18c0.038,0.013,0.102,0.18,0.064,0.257c-0.039,0.077-0.039,0.206,0.013,0.193c0.051-0.013,0.154-0.129,0.18-0.09c0.027,0.039,0.154,0.116,0.09,0.257c-0.063,0.142-0.193,0.193-0.039,0.284c0.154,0.089,0.206,0.012,0.322-0.052c0.115-0.064,0.193-0.347,0.128-0.438c-0.064-0.09-0.218-0.27-0.218-0.334c0-0.064,0.257-0.064,0.257-0.167s0.09-0.18,0.18-0.219c0.091-0.039,0.206-0.206,0.244-0.154c0.039,0.052,0.271,0.116,0.334,0.039c0.064-0.077,0.4-0.36,0.605-0.515c0.206-0.154,0.283-0.334,0.336-0.515c0.051-0.18,0.128-0.296,0.102-0.437v0c0.077,0.18,0.09,0.309,0.077,0.45c-0.013,0.142,0,0.438,0.026,0.476c0.025,0.039,0.129,0.128,0.192,0.103c0.064-0.025-0.025-0.283-0.025-0.334c0-0.052,0.09-0.129,0.142-0.142c0.052-0.013,0-0.231-0.065-0.322c-0.063-0.09-0.154-0.142-0.102-0.154c0.051-0.013,0.115-0.116,0.077-0.142c-0.039-0.025-0.014-0.116-0.103-0.09c-0.065,0.019-0.241-0.015-0.235,0.095c-0.037-0.11-0.116-0.183-0.216-0.172c-0.116,0.013-0.181,0.077-0.296,0.077s-0.025-0.18-0.077-0.18c-0.051,0-0.168,0.167-0.231,0.077c-0.064-0.09,0.18-0.206,0.373-0.27c0.192-0.064,0.514-0.438,0.644-0.451c0.128-0.013,0.45,0.026,0.733,0.013c0.283-0.013,0.373-0.129,0.463-0.064s0.283,0.142,0.399,0.129c0.116-0.014,0.064,0,0.244-0.129c0.18-0.129,0.348-0.193,0.438-0.296c0.09-0.103,0.335-0.18,0.348-0.077c0.014,0.103-0.026,0.206,0.077,0.206s0.258-0.103,0.386-0.154c0.129-0.051,0.231-0.116,0.231-0.116s-0.527,0.36-0.655,0.438c-0.129,0.077-0.438,0.129-0.567,0.283c-0.128,0.155-0.205,0.206-0.192,0.374c0.014,0.167,0.231,0.386,0.128,0.54c-0.103,0.154-0.141,0.373-0.141,0.373s0.154-0.219,0.373-0.36s0.348-0.334,0.425-0.412s0.309-0.091,0.309-0.181s0.064-0.206,0.104-0.309c0.038-0.103-0.077-0.078,0-0.206c0.076-0.129,0.064-0.232,0.45-0.232s0.257,0.026,0.566,0.013c0.309-0.013,0.424-0.167,0.72-0.245c0.296-0.077,0.527-0.128,0.618-0.089c0.09,0.038,0.232,0.012,0.141-0.078c-0.089-0.09-0.295-0.219-0.193-0.245c0.104-0.026,0.207-0.039,0.246-0.142c0.039-0.103-0.142-0.283-0.039-0.386c0.104-0.103-0.077-0.231-0.207-0.257c-0.128-0.025-0.63,0.026-0.731-0.025c-0.104-0.052-0.271-0.116-0.322-0.078c-0.052,0.039-0.168,0.245-0.168,0.245s-0.09,0.025-0.168-0.09c-0.076-0.116-0.5-0.103-0.629-0.103s-0.271,0.025-0.413,0.039c-0.141,0.013-0.219,0.052-0.322-0.039c-0.102-0.09-0.243-0.129-0.296-0.167c-0.051-0.039-0.334-0.039-0.553-0.012c-0.218,0.025-0.438,0.025-0.438,0.025s-0.104-0.039-0.257-0.129c-0.154-0.09-0.309-0.154-0.361-0.154c-0.051,0-0.449,0.064-0.539,0c-0.091-0.064-0.181-0.103-0.245-0.103s-0.115-0.103-0.038-0.103s0.437-0.103,0.437-0.103s-0.103-0.142-0.231-0.142c-0.128,0-0.359-0.064-0.424-0.064s-0.014,0.064-0.142,0.039c-0.13-0.026-0.258-0.078-0.335-0.026c-0.076,0.051-0.258,0.128-0.064,0.18c0.193,0.052,0.373,0,0.425,0.078c0.052,0.077,0,0.115,0,0.167s-0.103,0.193-0.167,0.219c-0.064,0.025-0.143-0.039-0.27,0.025c-0.129,0.064-0.451,0.013-0.49,0.052c-0.038,0.039-0.115-0.103-0.18-0.077c-0.064,0.025-0.232,0.193-0.322,0.18c-0.089-0.013-0.206-0.103-0.206-0.206s-0.038-0.232-0.077-0.258c-0.038-0.025-0.322-0.039-0.425-0.025c-0.103,0.013-0.424,0.038-0.477,0.09c-0.052,0.052-0.193,0.09-0.283,0.09s-0.167-0.09-0.36-0.116c-0.192-0.026-0.617-0.039-0.669-0.026s-0.218-0.025-0.155-0.077c0.065-0.051,0.257-0.219,0.143-0.295c-0.117-0.078-0.375-0.078-0.489-0.09c-0.117-0.013-0.232-0.039-0.413-0.013c-0.181,0.026-0.219,0.116-0.296,0.039c-0.077-0.077,0.193,0.039-0.077-0.077c-0.27-0.116-0.399-0.103-0.477-0.064c-0.077,0.039,0.013,0.025-0.192,0.103c-0.206,0.078-0.322,0.116-0.374,0.129c-0.051,0.012-0.372-0.065-0.411-0.091c-0.038-0.025-0.181,0.013-0.309,0.064S9.895,7.025,9.767,7C9.638,6.973,9.432,6.973,9.303,7.025C9.174,7.076,9.084,7.076,8.956,7.166c-0.13,0.09-0.373,0.142-0.373,0.142S8.522,7.305,8.448,7.301C10.474,5.541,13.111,4.466,16,4.466c6.361,0,11.534,5.173,11.534,11.534S22.36,27.533,16,27.533zM14.888,19.92c0,0,0.207-0.026,0.207-0.117c0-0.089-0.207-0.205-0.282-0.102c-0.078,0.102-0.219,0.205-0.207,0.296C14.625,20.138,14.888,19.92,14.888,19.92zM14.875,17.023c-0.181,0.233-0.167,0.182-0.296,0.128c-0.128-0.05-0.334,0.116-0.296,0.182c0.039,0.064,0.322-0.014,0.386,0.102c0.065,0.116,0.065,0.129,0.193,0.104c0.128-0.026,0.257-0.205,0.219-0.295C15.043,17.151,14.875,17.023,14.875,17.023zM14.837,18.245c-0.051,0-0.412,0.064-0.451,0.079c-0.039,0.013-0.27-0.025-0.27-0.025c-0.09,0.089-0.026,0.179,0.116,0.166s0.438-0.052,0.502-0.052C14.799,18.413,14.888,18.245,14.837,18.245zM14.284,14.668c-0.19,0.03-0.308,0.438-0.155,0.425C14.284,15.081,14.451,14.643,14.284,14.668zM14.734,16.959c-0.052-0.064-0.181-0.271-0.323-0.219c-0.042,0.017-0.153,0.245-0.012,0.245C14.541,16.985,14.786,17.023,14.734,16.959zM14.85,16.805c0.232-0.013,0.167-0.245-0.013-0.257C14.786,16.544,14.618,16.818,14.85,16.805zM17.591,18.928c-0.193-0.039-0.244-0.102-0.45-0.205c-0.207-0.103-0.67-0.103-0.682-0.039c-0.014,0.064,0,0-0.155-0.05c-0.153-0.054-0.271,0-0.309-0.091c-0.038-0.091-0.128-0.117-0.244-0.002c-0.097,0.097-0.142,0.104,0.078,0.143c0.218,0.039,0.283,0.039,0.192,0.141c-0.09,0.104-0.154,0.233-0.077,0.244c0.077,0.015,0.309-0.05,0.334,0c0.026,0.054-0.051,0.064,0.207,0.105c0.258,0.037,0.309,0.128,0.359,0.178c0.051,0.052,0.206,0.22,0.104,0.22c-0.104,0-0.219,0.128-0.142,0.143c0.077,0.013,0.309-0.039,0.321,0c0.014,0.037,0.143,0.283,0.271,0.271c0.129-0.013,0.206-0.244,0.27-0.31c0.065-0.064,0.322-0.104,0.349,0.012c0.026,0.116,0.104,0.233,0.257,0.311c0.154,0.076,0.335,0.154,0.348,0.089c0.013-0.064-0.077-0.309-0.181-0.346c-0.103-0.041-0.282-0.259-0.282-0.348c0-0.091-0.155-0.117-0.232-0.182C17.849,19.147,17.784,18.967,17.591,18.928zM8.042,17.023c-0.084,0.037-0.155,0.476,0,0.527c0.154,0.052,0.244-0.205,0.193-0.271C8.183,17.218,8.158,16.973,8.042,17.023zM15.429,18.117c-0.118-0.05-0.335,0.424-0.181,0.463C15.403,18.62,15.518,18.156,15.429,18.117zM15.687,13.703c0.077,0,0.18-0.051,0.18-0.193c0-0.142,0.18,0,0.27-0.013s0.141-0.103,0.18-0.206c0.005-0.013,0.008-0.021,0.009-0.027c-0.003,0.024-0.001,0.093,0.095,0.117c0.154,0.038,0.205-0.064,0.205-0.103s0.283-0.103,0.336-0.142c0.051-0.038,0.258-0.103,0.27-0.154c0.013-0.051,0-0.348,0.064-0.373c0.064-0.026,0.154-0.026,0.052-0.206c-0.104-0.181-0.104-0.348-0.232-0.271c-0.095,0.057-0.038,0.284-0.115,0.438s-0.142,0.296-0.193,0.296s-0.321,0.103-0.399,0.18c-0.076,0.077-0.45-0.064-0.501,0c-0.052,0.064-0.154,0.141-0.219,0.193c-0.065,0.051-0.245,0.013-0.207,0.167C15.518,13.562,15.609,13.703,15.687,13.703zM17.449,12.056c0.18-0.013,0.348-0.064,0.348-0.064s0.271,0.013,0.232-0.116c-0.04-0.128-0.322-0.141-0.375-0.128c-0.051,0.013-0.142-0.142-0.244-0.116c-0.096,0.023-0.128,0.155-0.128,0.193c0,0.039-0.36,0.115-0.245,0.219C17.153,12.146,17.27,12.069,17.449,12.056zM13.91,19.058c0.104,0.064,0.296-0.219,0.349-0.13c0.051,0.091-0.013,0.13,0.076,0.246c0.091,0.114,0.258,0.102,0.258,0.102s-0.013-0.309-0.155-0.387c-0.142-0.077-0.232-0.166-0.064-0.141c0.167,0.026,0.257-0.039,0.219-0.114c-0.039-0.078-0.283-0.039-0.361-0.026s-0.193-0.052-0.193-0.052c-0.077,0.024-0.063,0.089-0.09,0.219C13.923,18.902,13.807,18.992,13.91,19.058zM20.924,21.618c-0.231-0.052-0.077,0.039,0,0.154c0.077,0.116,0.232,0.176,0.258,0.05C21.193,21.759,21.155,21.67,20.924,21.618zM21.915,24.744c-0.077,0.064,0,0.091-0.219,0.22c-0.22,0.13-0.49,0.271-0.541,0.386c-0.052,0.116,0.051,0.181,0.258,0.192c0.206,0.013,0.154,0.053,0.296-0.103s0.271-0.244,0.438-0.373c0.168-0.128,0.168-0.322,0.168-0.322s-0.181-0.178-0.193-0.141C22.1,24.665,21.992,24.681,21.915,24.744zM18.504,21.618c0.014-0.116-0.219-0.116-0.334-0.207c-0.116-0.089-0.128-0.359-0.193-0.515c-0.064-0.153-0.192-0.257-0.322-0.397c-0.128-0.143-0.192-0.465-0.23-0.438c-0.039,0.025-0.154,0.399-0.064,0.515c0.09,0.116-0.039,0.348-0.103,0.503c-0.065,0.153-0.22-0.026-0.349-0.104c-0.129-0.078-0.308-0.128-0.398-0.219c-0.09-0.091,0.155-0.335,0.091-0.426c-0.065-0.09-0.412-0.013-0.45-0.013c-0.039,0-0.116-0.128-0.194-0.128c-0.077,0-0.064,0.258-0.064,0.258s-0.078-0.091-0.193-0.207c-0.117-0.115,0.012,0.077-0.103,0.193c-0.117,0.117-0.079,0.078-0.129,0.206c-0.051,0.129-0.167,0.077-0.283-0.052c-0.116-0.128-0.179-0.037-0.258,0c-0.077,0.039-0.141,0.259-0.18,0.309c-0.039,0.052-0.309,0.117-0.374,0.182c-0.064,0.062-0.09,0.27-0.09,0.322c0,0.05-0.271,0.023-0.361,0.089c-0.09,0.064-0.23,0.025-0.321,0.025c-0.09,0-0.399,0.244-0.502,0.308c-0.103,0.066-0.103,0.298-0.051,0.362c0.051,0.063,0.154,0.219,0.09,0.244c-0.064,0.026-0.104,0.206,0.051,0.359c0.154,0.155,0.103,0.194,0.115,0.271c0.014,0.077,0.078,0.104,0.181,0.232c0.102,0.128-0.181,0.231-0.219,0.31c-0.039,0.076,0.091,0.192,0.167,0.257c0.077,0.063,0.271,0.026,0.386-0.013c0.117-0.039,0.245-0.143,0.321-0.155c0.079-0.013,0.438-0.026,0.438-0.026s0.129-0.192,0.219-0.296c0.089-0.102,0.372-0.013,0.372-0.013s0.117-0.076,0.426-0.141c0.309-0.065,0.179,0.064,0.296,0.104c0.115,0.037,0.27,0.062,0.359,0.128c0.09,0.064,0,0.218-0.012,0.283c-0.014,0.064,0.219,0.038,0.23-0.026c0.014-0.064,0.077-0.128,0.207-0.205c0.128-0.078,0.025,0.114,0.076,0.231c0.052,0.116,0.129-0.157,0.129-0.026c0,0.039,0.039,0.078,0.051,0.116c0.014,0.039,0.181,0.052,0.181,0.18c0,0.13,0,0.207,0.039,0.231c0.038,0.026,0.244,0,0.335,0.155c0.089,0.154,0.154,0.013,0.205-0.052c0.052-0.064,0.231,0.026,0.283,0.078c0.052,0.05,0.193-0.104,0.387-0.155c0.192-0.051,0.167-0.039,0.219-0.115c0.051-0.078,0.09-0.283,0.205-0.438c0.115-0.153,0.271-0.424,0.271-0.631c0-0.206-0.014-0.682-0.155-0.899C18.761,21.953,18.492,21.733,18.504,21.618zM18.029,24.77c-0.065-0.013-0.207-0.062-0.207-0.062c-0.142,0.141,0.142,0.141,0.104,0.283c-0.039,0.141,0.193,0.089,0.257,0.064c0.063-0.027,0.22-0.323,0.193-0.399C18.351,24.577,18.093,24.783,18.029,24.77zM22.803,24.178c-0.052,0-0.077,0.064-0.192,0c-0.117-0.063-0.091-0.037-0.168-0.167c-0.077-0.127-0.091-0.296-0.219-0.23c-0.051,0.025,0,0.168,0.051,0.218c0.053,0.052,0.077,0.231,0.064,0.283c-0.012,0.052-0.231,0.116-0.129,0.18c0.104,0.064,0.297,0,0.271,0.078c-0.025,0.077-0.129,0.179-0.013,0.205c0.115,0.025,0.154-0.089,0.207-0.178c0.051-0.093,0.089-0.169,0.179-0.221C22.944,24.294,22.854,24.178,22.803,24.178zM22.815,21.18c0.168,0.064,0.464-0.231,0.347-0.27C23.047,20.871,22.815,21.18,22.815,21.18zM13.923,19.906c-0.029,0.115,0.193,0.167,0.206,0.039C14.141,19.816,13.949,19.803,13.923,19.906zM14.27,16.47c-0.064,0.065-0.257,0.193-0.283,0.31c-0.025,0.115,0.309-0.182,0.399-0.296c0.091-0.117,0.27-0.052,0.308-0.117c0.04-0.063,0.04-0.063,0.04-0.063s-0.142-0.025-0.257-0.063c-0.117-0.039-0.258,0.102-0.193-0.104c0.064-0.206,0.257-0.167,0.219-0.322c-0.039-0.154-0.168-0.193-0.207-0.193c-0.09,0,0.013,0.141-0.116,0.231c-0.128,0.09-0.271,0.128-0.193,0.283C14.064,16.29,14.334,16.405,14.27,16.47zM13.254,19.751c0.013-0.076-0.142-0.192-0.206-0.192c-0.065,0-0.386-0.077-0.386-0.077c-0.058,0.023-0.135,0.045-0.158,0.077c-0.007-0.011-0.022-0.024-0.049-0.039c-0.142-0.075-0.309,0-0.361-0.102c-0.05-0.104-0.127-0.104-0.179-0.039c-0.094,0.117,0.025,0.206,0.063,0.231c0.038,0.024,0.181,0.052,0.309,0.039c0.08-0.008,0.181-0.027,0.21-0.059c0.004,0.014,0.016,0.027,0.035,0.044c0.103,0.092,0.167,0.13,0.321,0.116C13.009,19.74,13.241,19.829,13.254,19.751zM12.881,18.992c0.065,0,0.193,0,0.283,0.026c0.09,0.025,0.386,0.05,0.373-0.064c-0.013-0.115-0.038-0.297,0.089-0.411c0.13-0.117,0.257-0.18,0.193-0.348c-0.063-0.167-0.193-0.271-0.103-0.349c0.09-0.076,0.192-0.102,0.192-0.166c0-0.065-0.217,0.18-0.244-0.246c-0.005-0.091-0.206,0.025-0.219,0.116c-0.012,0.091,0.142,0.167-0.103,0.167c-0.245,0-0.257,0.194-0.309,0.232c-0.052,0.039-0.103,0.051-0.207,0.076c-0.102,0.026-0.127,0.13-0.153,0.194c-0.025,0.063-0.206-0.116-0.257-0.064c-0.051,0.052-0.013,0.296,0.077,0.501C12.585,18.863,12.816,18.992,12.881,18.992zM11.979,18.928c0.065-0.077,0.038-0.192-0.063-0.18c-0.103,0.013-0.193-0.168-0.36-0.283c-0.168-0.114-0.296-0.194-0.451-0.36c-0.154-0.167-0.347-0.271-0.45-0.359c-0.104-0.091-0.257-0.13-0.322-0.116c-0.159,0.032,0.231,0.309,0.271,0.346c0.039,0.041,0.387,0.335,0.387,0.478s0.231,0.476,0.296,0.527c0.064,0.052,0.385,0.244,0.437,0.348c0.052,0.103,0.167,0.13,0.167-0.013C11.89,19.174,11.916,19.006,11.979,18.928zM11.002,17.474c0.064,0.232,0.193,0.464,0.244,0.555c0.052,0.089,0.271,0.217,0.348,0.281c0.077,0.064,0.192-0.024,0.143-0.102c-0.052-0.078-0.155-0.192-0.167-0.283c-0.013-0.091-0.078-0.233-0.181-0.387c-0.102-0.153-0.192-0.192-0.257-0.295c-0.064-0.104-0.296-0.297-0.296-0.297c-0.102,0.013-0.102,0.205-0.051,0.271C10.834,17.28,10.938,17.243,11.002,17.474z")}})},"./src/shape/icon/Hail.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Hail=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Hail",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM11.503,23.709c-0.784-0.002-1.418-0.636-1.418-1.416c0-0.785,0.634-1.416,1.418-1.418c0.78,0.002,1.413,0.633,1.416,1.418C12.917,23.073,12.284,23.707,11.503,23.709zM19.002,23.709c-0.783-0.002-1.418-0.636-1.418-1.416c0-0.785,0.635-1.416,1.418-1.418c0.779,0.002,1.414,0.633,1.414,1.418C20.417,23.073,19.784,23.707,19.002,23.709zM7.503,28.771c-0.783-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.415,0.635,1.415,1.416C8.917,28.135,8.284,28.77,7.503,28.771zM15.001,28.771c-0.782-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.413,0.635,1.415,1.416C16.415,28.135,15.784,28.77,15.001,28.771zM22.5,28.771c-0.782-0.002-1.416-0.634-1.416-1.416c0-0.785,0.634-1.418,1.416-1.42c0.781,0.002,1.414,0.635,1.418,1.42C23.915,28.138,23.282,28.77,22.5,28.771z")}})},"./src/shape/icon/Hammer.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Hammer=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Hammer",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M7.831,29.354c0.685,0.353,1.62,1.178,2.344,0.876c0.475-0.195,0.753-1.301,1.048-1.883c2.221-4.376,4.635-9.353,6.392-13.611c0-0.19,0.101-0.337-0.049-0.595c0.983-1.6,1.65-3.358,2.724-5.138c0.34-0.566,0.686-1.351,1.163-1.577l0.881-0.368c1.12-0.288,1.938-0.278,2.719,0.473c0.396,0.383,0.578,1.015,0.961,1.395c0.259,0.26,1.246,0.899,1.613,0.8c0.285-0.077,0.52-0.364,0.72-0.728l0.696-1.286c0.195-0.366,0.306-0.718,0.215-0.999c-0.117-0.362-1.192-0.84-1.552-0.915c-0.528-0.113-1.154,0.081-1.692-0.041c-1.057-0.243-1.513-0.922-1.883-2.02c-2.608-1.533-6.119-2.53-10.207-1.244c-1.109,0.349-2.172,0.614-2.901,1.323c-0.146,0.412,0.143,0.494,0.446,0.489c-0.237,0.216-0.62,0.341-0.399,0.848c2.495-1.146,7.34-1.542,7.669,0.804c0.072,0.522-0.395,1.241-0.682,1.835c-0.905,1.874-2.011,3.394-2.813,5.091c-0.298,0.017-0.366,0.18-0.525,0.287c-2.604,3.8-5.451,8.541-7.9,12.794c-0.326,0.566-1.098,1.402-1.002,1.906C5.961,28.641,7.146,29,7.831,29.354z")}})},"./src/shape/icon/HammerAndScrewDriver.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.HammerAndScrewDriver=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.HammerAndScrewDriver",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.537,9.859c-0.473-0.259-1.127-0.252-1.609-0.523c-0.943-0.534-1.186-1.316-1.226-2.475c-2.059-2.215-5.138-4.176-9.424-4.114c-1.162,0.017-2.256-0.035-3.158,0.435c-0.258,0.354-0.004,0.516,0.288,0.599c-0.29,0.138-0.692,0.147-0.626,0.697c2.72-0.383,7.475,0.624,7.116,2.966c-0.08,0.521-0.735,1.076-1.179,1.563c-1.263,1.382-2.599,2.45-3.761,3.667l0.336,0.336c0.742-0.521,1.446-0.785,2.104-0.785c0.707,0,1.121,0.297,1.276,0.433c0.575-0.618,1.166-1.244,1.839-1.853c0.488-0.444,1.047-1.099,1.566-1.178l0.949-0.101c1.156,0.047,1.937,0.29,2.471,1.232c0.27,0.481,0.262,1.139,0.521,1.613c0.175,0.324,0.937,1.218,1.316,1.228c0.294,0.009,0.603-0.199,0.899-0.49l1.033-1.034c0.291-0.294,0.501-0.6,0.492-0.896C29.754,10.801,28.861,10.035,28.537,9.859zM13.021,15.353l-0.741-0.741c-3.139,2.643-6.52,5.738-9.531,8.589c-0.473,0.443-1.452,1.021-1.506,1.539c-0.083,0.781,0.95,1.465,1.506,2c0.556,0.533,1.212,1.602,1.994,1.51c0.509-0.043,1.095-1.029,1.544-1.502c2.255-2.374,4.664-4.976,6.883-7.509c-0.312-0.371-0.498-0.596-0.498-0.596C12.535,18.451,11.779,17.272,13.021,15.353zM20.64,15.643c-0.366-0.318-1.466,0.143-1.777-0.122c-0.311-0.266,0.171-1.259-0.061-1.455c-0.482-0.406-0.77-0.646-0.77-0.646s-0.862-0.829-2.812,0.928L7.44,6.569C7.045,6.173,7.203,4.746,7.203,4.746L3.517,2.646L2.623,3.541l2.1,3.686c0,0,1.428-0.158,1.824,0.237l7.792,7.793c-1.548,1.831-0.895,2.752-0.895,2.752s0.238,0.288,0.646,0.771c0.196,0.23,1.188-0.249,1.455,0.061c0.264,0.312-0.196,1.41,0.12,1.777c2.666,3.064,6.926,7.736,8.125,7.736c0.892,0,2.021-0.724,2.948-1.64c0.925-0.917,1.639-2.055,1.639-2.947C28.377,22.567,23.704,18.309,20.64,15.643z")}})},"./src/shape/icon/HangUp.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.HangUp=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.HangUp",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.563,10.494c-7.35-7.349-19.265-7.348-26.612,0.001c-1.796,1.796-0.247,6.84-0.247,6.84c0.135,0.443,0.616,0.72,1.067,0.614l6.898-1.604c0.451-0.105,0.82-0.57,0.82-1.033l0.001-3.685c0-0.463,0.379-0.842,0.842-0.842h8.285c0.464,0,0.843,0.379,0.843,0.842l-0.001,3.471c0.001,0.462,0.375,0.907,0.83,0.986l7.635,1.316c0.456,0.08,0.873-0.232,0.926-0.692C29.851,16.708,30.359,12.29,28.563,10.494zM17.264,14.072h-3.501v4.39h-2.625l4.363,7.556l4.363-7.556h-2.6V14.072z")}})},"./src/shape/icon/Help.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Help=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Help",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M4.834,4.834L4.833,4.833c-5.889,5.892-5.89,15.443,0.001,21.334s15.44,5.888,21.33-0.002c5.891-5.891,5.893-15.44,0.002-21.33C20.275-1.056,10.725-1.056,4.834,4.834zM25.459,5.542c0.833,0.836,1.523,1.757,2.104,2.726l-4.08,4.08c-0.418-1.062-1.053-2.06-1.912-2.918c-0.859-0.859-1.857-1.494-2.92-1.913l4.08-4.08C23.7,4.018,24.622,4.709,25.459,5.542zM10.139,20.862c-2.958-2.968-2.959-7.758-0.001-10.725c2.966-2.957,7.756-2.957,10.725,0c2.954,2.965,2.955,7.757-0.001,10.724C17.896,23.819,13.104,23.817,10.139,20.862zM5.542,25.459c-0.833-0.837-1.524-1.759-2.105-2.728l4.081-4.081c0.418,1.063,1.055,2.06,1.914,2.919c0.858,0.859,1.855,1.494,2.917,1.913l-4.081,4.081C7.299,26.982,6.379,26.292,5.542,25.459zM8.268,3.435l4.082,4.082C11.288,7.935,10.29,8.571,9.43,9.43c-0.858,0.859-1.494,1.855-1.912,2.918L3.436,8.267c0.58-0.969,1.271-1.89,2.105-2.727C6.377,4.707,7.299,4.016,8.268,3.435zM22.732,27.563l-4.082-4.082c1.062-0.418,2.061-1.053,2.919-1.912c0.859-0.859,1.495-1.857,1.913-2.92l4.082,4.082c-0.58,0.969-1.271,1.891-2.105,2.728C24.623,26.292,23.701,26.983,22.732,27.563z")}})},"./src/shape/icon/History.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.History=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.History",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M10.666,18.292c0.275,0.479,0.889,0.644,1.365,0.367l3.305-1.677C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876c0-0.552-0.448-1-1-1c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96C10.553,17.204,10.389,17.816,10.666,18.292zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.888,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM6.624,15.5c0,0.553,0.449,1,1,1c0.552,0,1-0.447,1.001-1c-0.001-0.552-0.448-0.999-1.001-1C7.071,14.5,6.624,14.948,6.624,15.5zM14.501,23.377c0,0.553,0.448,1,1,1c0.552,0,1-0.447,1-1s-0.448-1-1-1C14.949,22.377,14.501,22.824,14.501,23.377zM10.696,21.822c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.276,1.091,0.11,1.365-0.365c0.277-0.479,0.113-1.09-0.365-1.367C11.584,21.18,10.973,21.344,10.696,21.822zM21.822,10.696c-0.479,0.278-0.643,0.89-0.366,1.367s0.888,0.642,1.366,0.365c0.478-0.275,0.643-0.888,0.365-1.366C22.913,10.584,22.298,10.42,21.822,10.696zM21.456,18.938c-0.274,0.479-0.112,1.092,0.367,1.367c0.477,0.274,1.089,0.112,1.364-0.365c0.276-0.479,0.112-1.092-0.364-1.367C22.343,18.297,21.73,18.461,21.456,18.938zM24.378,15.5c0-0.551-0.448-1-1-1c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1C23.93,16.5,24.378,16.053,24.378,15.5zM18.573,22.822c0.274,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.89,0.365-1.365c-0.277-0.479-0.888-0.643-1.365-0.367C18.46,21.732,18.296,22.344,18.573,22.822zM18.939,9.546c0.477,0.276,1.088,0.112,1.365-0.366c0.276-0.478,0.113-1.091-0.367-1.367c-0.477-0.276-1.09-0.111-1.364,0.366C18.298,8.659,18.462,9.27,18.939,9.546zM28.703,14.364C28.074,7.072,21.654,1.67,14.364,2.295c-3.254,0.281-6.118,1.726-8.25,3.877L4.341,4.681l-1.309,7.364l7.031-2.548L8.427,8.12c1.627-1.567,3.767-2.621,6.194-2.833c5.64-0.477,10.595,3.694,11.089,9.335c0.477,5.64-3.693,10.595-9.333,11.09c-5.643,0.476-10.599-3.694-11.092-9.333c-0.102-1.204,0.019-2.373,0.31-3.478l-3.27,1.186c-0.089,0.832-0.106,1.684-0.031,2.55c0.629,7.29,7.048,12.691,14.341,12.066C23.926,28.074,29.328,21.655,28.703,14.364z")}})},"./src/shape/icon/Home.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Home=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Home",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M27.812,16l-3.062-3.062V5.625h-2.625v4.688L16,4.188L4.188,16L7,15.933v11.942h17.875V16H27.812zM16,26.167h-5.833v-7H16V26.167zM21.667,23.167h-3.833v-4.042h3.833V23.167z")}})},"./src/shape/icon/IMac.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.IMac=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.IMac",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.936,2.099H2.046c-0.506,0-0.919,0.414-0.919,0.92v21.097c0,0.506,0.413,0.919,0.919,0.919h17.062v-0.003h9.828c0.506,0,0.92-0.413,0.92-0.921V3.019C29.854,2.513,29.439,2.099,28.936,2.099zM28.562,20.062c0,0.412-0.338,0.75-0.75,0.75H3.062c-0.413,0-0.75-0.338-0.75-0.75v-16c0-0.413,0.337-0.75,0.75-0.75h24.75c0.412,0,0.75,0.337,0.75,0.75V20.062zM20.518,28.4c-0.033-0.035-0.062-0.055-0.068-0.062l-0.01-0.004l-0.008-0.004c0,0-0.046-0.021-0.119-0.062c-0.108-0.056-0.283-0.144-0.445-0.237c-0.162-0.097-0.32-0.199-0.393-0.271c-0.008-0.014-0.035-0.079-0.058-0.17c-0.083-0.32-0.161-0.95-0.22-1.539h-7.5c-0.023,0.23-0.048,0.467-0.076,0.691c-0.035,0.272-0.073,0.524-0.113,0.716c-0.02,0.096-0.039,0.175-0.059,0.23c-0.009,0.025-0.018,0.05-0.024,0.062c-0.003,0.006-0.005,0.01-0.007,0.013c-0.094,0.096-0.34,0.246-0.553,0.36c-0.107,0.062-0.209,0.11-0.283,0.146c-0.074,0.037-0.119,0.062-0.119,0.062l-0.007,0.004l-0.008,0.004c-0.01,0.009-0.038,0.022-0.07,0.062c-0.031,0.037-0.067,0.103-0.067,0.185c0.002,0.002-0.004,0.037-0.006,0.088c0,0.043,0.007,0.118,0.068,0.185c0.061,0.062,0.143,0.08,0.217,0.08h9.716c0.073,0,0.153-0.021,0.215-0.08c0.062-0.063,0.068-0.142,0.068-0.185c-0.001-0.051-0.008-0.086-0.007-0.088C20.583,28.503,20.548,28.439,20.518,28.4z")}})},"./src/shape/icon/Icon.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Icon=i.default.SetFigure.extend({NAME:"draw2d.shape.icon.Icon",init:function(t,e,n){this._super(extend({width:50,height:50,color:"#333333",bgColor:null},t),e,n),this.keepAspectRatio=!1},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(t??={},this.svgNodes?.attr({fill:this.color.rgba(),stroke:"none"}),this._super(t))},applyTransformation:function(){let t=[];if(0!==this.rotationAngle&&t.push("R"+this.rotationAngle),90===this.getRotationAngle()||270===this.getRotationAngle()){let e=this.getHeight()/this.getWidth();t.push("T"+-this.offsetY+","+-this.offsetX),t.push("S"+e+","+1/e+",0,0")}else t.push("T"+-this.offsetX+","+-this.offsetY);return!0===this.isResizeable()?t.push("T"+this.getAbsoluteX()+","+this.getAbsoluteY()+"S"+this.scaleX+","+this.scaleY+","+this.getAbsoluteX()+","+this.getAbsoluteY()):t.push("T"+this.getAbsoluteX()+","+this.getAbsoluteY()),this.svgNodes.transform(t.join(" ")),this},createShapeElement:function(){let t=this._super(),e=this.svgNodes.getBBox();return this.offsetX=e.x,this.offsetY=e.y,t}})},"./src/shape/icon/Icons.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Icons=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Icons",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M4.083,14H14V4.083H4.083V14zM17,4.083V14h9.917V4.083H17zM17,26.917h9.917v-9.918H17V26.917zM4.083,26.917H14v-9.918H4.083V26.917z")}})},"./src/shape/icon/Ie.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Ie=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Ie",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M27.998,2.266c-2.12-1.91-6.925,0.382-9.575,1.93c-0.76-0.12-1.557-0.185-2.388-0.185c-3.349,0-6.052,0.985-8.106,2.843c-2.336,2.139-3.631,4.94-3.631,8.177c0,0.028,0.001,0.056,0.001,0.084c3.287-5.15,8.342-7.79,9.682-8.487c0.212-0.099,0.338,0.155,0.141,0.253c-0.015,0.042-0.015,0,0,0c-2.254,1.35-6.434,5.259-9.146,10.886l-0.003-0.007c-1.717,3.547-3.167,8.529-0.267,10.358c2.197,1.382,6.13-0.248,9.295-2.318c0.764,0.108,1.567,0.165,2.415,0.165c5.84,0,9.937-3.223,11.399-7.924l-8.022-0.014c-0.337,1.661-1.464,2.548-3.223,2.548c-2.21,0-3.729-1.211-3.828-4.012l15.228-0.014c0.028-0.578-0.042-0.985-0.042-1.436c0-5.251-3.143-9.355-8.255-10.663c2.081-1.294,5.974-3.209,7.848-1.681c1.407,1.14,0.633,3.533,0.295,4.518c-0.056,0.254,0.24,0.296,0.296,0.057C28.814,5.573,29.026,3.194,27.998,2.266zM13.272,25.676c-2.469,1.475-5.873,2.539-7.539,1.289c-1.243-0.935-0.696-3.468,0.398-5.938c0.664,0.992,1.495,1.886,2.473,2.63C9.926,24.651,11.479,25.324,13.272,25.676zM12.714,13.046c0.042-2.435,1.787-3.49,3.617-3.49c1.928,0,3.49,1.112,3.49,3.49H12.714z")}})},"./src/shape/icon/Ie9.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Ie9=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Ie9",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M27.751,17.887c0.054-0.434,0.081-0.876,0.081-1.324c0-1.744-0.413-3.393-1.146-4.854c1.133-2.885,1.155-5.369-0.201-6.777c-1.756-1.822-5.391-1.406-9.433,0.721c-0.069-0.001-0.138-0.003-0.206-0.003c-6.069,0-10.988,4.888-10.988,10.917c0,0.183,0.005,0.354,0.014,0.529c-2.688,4.071-3.491,7.967-1.688,9.838c1.557,1.613,4.691,1.344,8.2-0.392c1.363,0.604,2.873,0.938,4.462,0.938c4.793,0,8.867-3.049,10.369-7.299H21.26c-0.814,1.483-2.438,2.504-4.307,2.504c-2.688,0-4.867-2.104-4.867-4.688c0-0.036,0.002-0.071,0.003-0.106h15.662V17.887zM26.337,6.099c0.903,0.937,0.806,2.684-0.087,4.818c-1.27-2.083-3.221-3.71-5.546-4.576C23.244,5.217,25.324,5.047,26.337,6.099zM16.917,10.372c2.522,0,4.585,1.991,4.748,4.509h-9.496C12.333,12.363,14.396,10.372,16.917,10.372zM5.687,26.501c-1.103-1.146-0.712-3.502,0.799-6.298c0.907,2.546,2.736,4.658,5.09,5.938C8.92,27.368,6.733,27.587,5.687,26.501z")}})},"./src/shape/icon/Import.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Import=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Import",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.067,2.25c-5.979,0-11.035,3.91-12.778,9.309h3.213c1.602-3.705,5.271-6.301,9.565-6.309c5.764,0.01,10.428,4.674,10.437,10.437c-0.009,5.764-4.673,10.428-10.437,10.438c-4.294-0.007-7.964-2.605-9.566-6.311H2.289c1.744,5.399,6.799,9.31,12.779,9.312c7.419-0.002,13.437-6.016,13.438-13.438C28.504,8.265,22.486,2.252,15.067,2.25zM10.918,19.813l7.15-4.126l-7.15-4.129v2.297H-0.057v3.661h10.975V19.813z")}})},"./src/shape/icon/InkScape.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.InkScape=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.InkScape",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M20.402,17.626c0.84-0.772,2.468-0.381,5.979-1.853c1.716-0.72,1.572-1.265,1.566-1.928c-0.001-0.014,0-0.027,0-0.041h-0.005c-0.012-0.667-0.291-1.332-0.846-1.845L17.049,2.684c-0.566-0.522-1.304-0.782-2.042-0.782V1.898c-0.738,0-1.475,0.261-2.04,0.783l-10.05,9.276c-0.554,0.512-0.832,1.176-0.843,1.844H2.07c0,0,0.003,0.011,0.004,0.011c0,0.012-0.004,0.024-0.004,0.034h0.017c0.193,0.676,5.164,1.536,5.718,2.049c0.838,0.774-3.211,1.339-2.374,2.114c0.838,0.773,5.062,1.496,5.898,2.271c0.838,0.771-1.711,1.596-0.874,2.366c0.837,0.773,3.651-0.191,3.142,1.822c1.13,1.045,3.49,0.547,5.071-0.498c0.837-0.771-1.607-0.703-0.77-1.477c0.836-0.774,2.949-0.777,4.73-2.627C21.913,18.838,19.566,18.398,20.402,17.626zM10.973,16.868l-0.42-0.504c1.497,0.358,3.162,0.827,4.498,0.837l0.058,0.554C13.964,17.646,11.544,17.137,10.973,16.868zM18.161,8.58l-1.396-0.74L14.53,9.594l-1.067-3.192l-1.177,2.545L8.998,9.25l0.036-1.352c0-0.324,1.895-2.596,3.05-3.136l2.112-1.401c0.312-0.186,0.53-0.261,0.727-0.257c0.327,0.011,0.593,0.239,1.112,0.55l4.748,3.25c0.357,0.215,0.619,0.522,0.626,0.898l-2.813-1.254L18.161,8.58zM26.434,19.594c-0.313-0.07-1.688-0.691-2.035,0.165c0.968,0.981,2.645,2.181,3.316,1.482C28.391,20.543,27.102,19.745,26.434,19.594zM4.663,21.566c-0.315,0.074-1.842,0.115-1.719,1.021c1.351,0.451,3.438,0.792,3.684-0.113C6.873,21.566,5.33,21.414,4.663,21.566zM17.877,26.396c-0.232,0.209-1.53,0.953-0.929,1.681c1.413-0.236,3.403-0.914,3.12-1.812C19.786,25.369,18.37,25.953,17.877,26.396z")}})},"./src/shape/icon/Ipad.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Ipad=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Ipad",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.221,1.417H6.11c-0.865,0-1.566,0.702-1.566,1.566v25.313c0,0.865,0.701,1.565,1.566,1.565h19.111c0.865,0,1.565-0.7,1.565-1.565V2.984C26.787,2.119,26.087,1.417,25.221,1.417zM15.666,29.299c-0.346,0-0.626-0.279-0.626-0.625s0.281-0.627,0.626-0.627c0.346,0,0.627,0.281,0.627,0.627S16.012,29.299,15.666,29.299zM24.376,26.855c0,0.174-0.142,0.312-0.313,0.312H7.27c-0.173,0-0.313-0.142-0.313-0.312V4.3c0-0.173,0.14-0.313,0.313-0.313h16.792c0.172,0,0.312,0.14,0.312,0.313L24.376,26.855L24.376,26.855z")}})},"./src/shape/icon/Iphone.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Iphone=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Iphone",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M20.755,1H10.62C9.484,1,8.562,1.921,8.562,3.058v24.385c0,1.136,0.921,2.058,2.058,2.058h10.135c1.136,0,2.058-0.922,2.058-2.058V3.058C22.812,1.921,21.891,1,20.755,1zM14.659,3.264h2.057c0.101,0,0.183,0.081,0.183,0.18c0,0.1-0.082,0.18-0.183,0.18h-2.057c-0.1,0-0.181-0.081-0.181-0.18C14.478,3.344,14.559,3.264,14.659,3.264zM13.225,3.058c0.199,0,0.359,0.162,0.359,0.36c0,0.198-0.161,0.36-0.359,0.36c-0.2,0-0.36-0.161-0.36-0.36S13.025,3.058,13.225,3.058zM15.688,28.473c-0.796,0-1.44-0.646-1.44-1.438c0-0.799,0.645-1.439,1.44-1.439s1.44,0.646,1.44,1.439S16.483,28.473,15.688,28.473zM22.041,24.355c0,0.17-0.139,0.309-0.309,0.309H9.642c-0.17,0-0.308-0.139-0.308-0.309V6.042c0-0.17,0.138-0.309,0.308-0.309h12.09c0.17,0,0.309,0.138,0.309,0.309V24.355z")}})},"./src/shape/icon/JQuery.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.JQuery=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.JQuery",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M10.322,23.041C4.579,18.723,2.777,11.07,5.494,4.583c-0.254,0.291-0.502,0.59-0.739,0.904c-5.177,6.887-4.008,16.505,2.613,21.482c6.62,4.979,16.184,3.432,21.362-3.455c0.237-0.314,0.454-0.635,0.663-0.959C23.915,26.963,16.064,27.357,10.322,23.041zM13.662,18.598c4.765,3.582,11.604,2.564,15.567-2.198c-3.609,2.641-9.09,2.475-13.361-0.736S9.916,7.231,11.451,3.03C7.976,8.161,8.897,15.015,13.662,18.598zM18.642,11.976c3.254,2.447,8.146,1.438,10.967-2.242c-2.604,1.921-6.341,1.955-9.157-0.164c-2.819-2.118-3.826-5.718-2.701-8.754C14.998,4.549,15.387,9.528,18.642,11.976z")}})},"./src/shape/icon/Jigsaw.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Jigsaw=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Jigsaw",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M3.739,13.619c0,0,3.516-4.669,5.592-3.642c2.077,1.027-0.414,2.795,1.598,3.719c2.011,0.924,5.048-0.229,4.376-2.899c-0.672-2.67-1.866-0.776-2.798-2.208c-0.934-1.432,4.586-4.59,4.586-4.59s3.361,6.651,4.316,4.911c1.157-2.105,3.193-4.265,5.305-1.025c0,0,1.814,2.412,0.246,3.434s-2.917,0.443-3.506,1.553c-0.586,1.112,3.784,4.093,3.784,4.093s-2.987,4.81-4.926,3.548c-1.939-1.262,0.356-3.364-2.599-3.989c-1.288-0.23-3.438,0.538-3.818,2.34c-0.13,2.709,1.604,2.016,2.797,3.475c1.191,1.457-4.484,4.522-4.484,4.522s-1.584-3.923-3.811-4.657c-2.227-0.735-0.893,2.135-2.917,2.531c-2.024,0.396-4.816-2.399-3.46-4.789c1.358-2.391,3.275-0.044,3.441-1.951C7.629,16.087,3.739,13.619,3.739,13.619z")}})},"./src/shape/icon/Key.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Key=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Key",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M18.386,16.009l0.009-0.006l-0.58-0.912c1.654-2.226,1.876-5.319,0.3-7.8c-2.043-3.213-6.303-4.161-9.516-2.118c-3.212,2.042-4.163,6.302-2.12,9.517c1.528,2.402,4.3,3.537,6.944,3.102l0.424,0.669l0.206,0.045l0.779-0.447l-0.305,1.377l2.483,0.552l-0.296,1.325l1.903,0.424l-0.68,3.06l1.406,0.313l-0.424,1.906l4.135,0.918l0.758-3.392L18.386,16.009z M10.996,8.944c-0.685,0.436-1.593,0.233-2.029-0.452C8.532,7.807,8.733,6.898,9.418,6.463s1.594-0.233,2.028,0.452C11.883,7.6,11.68,8.509,10.996,8.944z")}})},"./src/shape/icon/Lab.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Lab=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Lab",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M22.121,24.438l-3.362-7.847c-0.329-0.769-0.599-2.081-0.599-2.917s0.513-1.521,1.14-1.521s1.141-0.513,1.141-1.14s-0.685-1.14-1.521-1.14h-6.84c-0.836,0-1.52,0.513-1.52,1.14s0.513,1.14,1.14,1.14s1.14,0.685,1.14,1.521s-0.269,2.148-0.599,2.917l-3.362,7.847C8.55,25.206,8.28,26.177,8.28,26.595s0.342,1.103,0.76,1.521s1.444,0.76,2.28,0.76h8.359c0.836,0,1.862-0.342,2.28-0.76s0.76-1.103,0.76-1.521S22.45,25.206,22.121,24.438zM16.582,7.625c0,0.599,0.484,1.083,1.083,1.083s1.083-0.484,1.083-1.083s-0.484-1.084-1.083-1.084S16.582,7.026,16.582,7.625zM13.667,7.792c0.276,0,0.5-0.224,0.5-0.5s-0.224-0.5-0.5-0.5s-0.5,0.224-0.5,0.5S13.391,7.792,13.667,7.792zM15.584,5.292c0.874,0,1.583-0.709,1.583-1.583c0-0.875-0.709-1.584-1.583-1.584C14.709,2.125,14,2.834,14,3.709C14,4.583,14.709,5.292,15.584,5.292z")}})},"./src/shape/icon/Lamp.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Lamp=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Lamp",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.5,2.833c-3.866,0-7,3.134-7,7c0,3.859,3.945,4.937,4.223,9.499h5.553c0.278-4.562,4.224-5.639,4.224-9.499C22.5,5.968,19.366,2.833,15.5,2.833zM15.5,28.166c1.894,0,2.483-1.027,2.667-1.666h-5.334C13.017,27.139,13.606,28.166,15.5,28.166zM12.75,25.498h5.5v-5.164h-5.5V25.498z")}})},"./src/shape/icon/Lamp_alt.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Lamp_alt=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Lamp_alt",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M12.75,25.498h5.5v-5.164h-5.5V25.498zM15.5,28.166c1.894,0,2.483-1.027,2.667-1.666h-5.334C13.017,27.139,13.606,28.166,15.5,28.166zM15.5,2.833c-3.866,0-7,3.134-7,7c0,3.859,3.945,4.937,4.223,9.499h1.271c-0.009-0.025-0.024-0.049-0.029-0.078L11.965,8.256c-0.043-0.245,0.099-0.485,0.335-0.563c0.237-0.078,0.494,0.026,0.605,0.25l0.553,1.106l0.553-1.106c0.084-0.17,0.257-0.277,0.446-0.277c0.189,0,0.362,0.107,0.446,0.277l0.553,1.106l0.553-1.106c0.084-0.17,0.257-0.277,0.448-0.277c0.189,0,0.36,0.107,0.446,0.277l0.554,1.106l0.553-1.106c0.111-0.224,0.368-0.329,0.604-0.25s0.377,0.318,0.333,0.563l-1.999,10.998c-0.005,0.029-0.02,0.053-0.029,0.078h1.356c0.278-4.562,4.224-5.639,4.224-9.499C22.5,5.968,19.366,2.833,15.5,2.833zM17.458,10.666c-0.191,0-0.364-0.107-0.446-0.275l-0.554-1.106l-0.553,1.106c-0.086,0.168-0.257,0.275-0.446,0.275c-0.191,0-0.364-0.107-0.449-0.275l-0.553-1.106l-0.553,1.106c-0.084,0.168-0.257,0.275-0.446,0.275c-0.012,0-0.025,0-0.037-0.001l1.454,8.001h1.167l1.454-8.001C17.482,10.666,17.47,10.666,17.458,10.666z")}})},"./src/shape/icon/Landing.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Landing=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Landing",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M23.322,19.491c0,0,1.903,0.342,0.299-1.869c-1.353-1.866-5.261-3.104-5.261-3.104l-4.213-8.229l-2.47-0.394l0.973,5.449L9.241,10.11L8.772,7.273L7.008,6.302c0,0-0.496,2.742-0.149,5.271C6.859,11.573,13.965,17.999,23.322,19.491zM3.251,23.106v1.998h24.498v-1.998H3.251zM14,17.94c0,0.414,0.336,0.75,0.75,0.75s0.75-0.336,0.75-0.75s-0.336-0.75-0.75-0.75S14,17.526,14,17.94z")}})},"./src/shape/icon/Landscape1.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Landscape1=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Landscape1",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M19.883,5.71H2.746c-0.163,0-0.319,0.071-0.435,0.188c-0.118,0.117-0.18,0.272-0.18,0.435v18.364c0,0.164,0.063,0.318,0.18,0.436c0.123,0.117,0.287,0.18,0.435,0.18h25.75c0.164,0,0.324-0.066,0.438-0.18c0.118-0.114,0.182-0.273,0.182-0.436V14.551c-0.002-0.102-0.01-0.188-0.021-0.271c-0.186-1.543-1.543-3.424-3.236-5.168C24.039,7.31,21.869,5.753,19.883,5.71zM26.914,12.314c-0.008-0.005-0.019-0.007-0.029-0.01c-1.092-0.293-2.33-0.355-3.199-0.355c-0.162,0-0.312,0.002-0.445,0.004c-0.037-0.604-0.129-1.604-0.356-2.625c-0.11-0.461-0.246-0.94-0.433-1.42c0.857,0.541,1.748,1.264,2.535,2.068C25.74,10.718,26.41,11.551,26.914,12.314zM3.365,6.947h16.517c0.058,0,0.12,0,0.183,0.004c0.694,0.105,1.307,1.221,1.616,2.646c0.335,1.484,0.354,2.997,0.354,3l0.007,0.656l0.651-0.051c0,0,0.398-0.027,0.99-0.025c0.809,0,1.977,0.062,2.871,0.312c0.939,0.275,1.352,0.635,1.326,1.051h0.002v9.542H3.365V6.951V6.947z")}})},"./src/shape/icon/Landscape2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Landscape2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Landscape2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M19.883,5.71H2.746c-0.163,0-0.319,0.071-0.435,0.188c-0.118,0.117-0.18,0.272-0.18,0.435v18.364c0,0.164,0.063,0.318,0.18,0.436c0.123,0.117,0.287,0.18,0.435,0.18h25.75c0.164,0,0.324-0.066,0.438-0.18c0.118-0.114,0.182-0.273,0.182-0.436V14.551c-0.002-0.102-0.01-0.188-0.021-0.271c-0.186-1.543-1.543-3.424-3.236-5.168C24.039,7.31,21.869,5.753,19.883,5.71zM3.365,6.947h16.517c0.058,0,0.12,0,0.183,0.004c0.694,0.105,1.307,1.221,1.616,2.646c0.335,1.484,0.354,2.997,0.354,3l0.007,0.656l0.651-0.051c0,0,0.398-0.027,0.99-0.025c0.809,0,1.977,0.062,2.871,0.312c0.939,0.275,1.352,0.635,1.326,1.051h0.002v9.542H3.365V6.951V6.947z")}})},"./src/shape/icon/LineChart.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.LineChart=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.LineChart",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M3.625,25.062c-0.539-0.115-0.885-0.646-0.77-1.187l0,0L6.51,6.584l2.267,9.259l1.923-5.188l3.581,3.741l3.883-13.103l2.934,11.734l1.96-1.509l5.271,11.74c0.226,0.504,0,1.095-0.505,1.321l0,0c-0.505,0.227-1.096,0-1.322-0.504l0,0l-4.23-9.428l-2.374,1.826l-1.896-7.596l-2.783,9.393l-3.754-3.924L8.386,22.66l-1.731-7.083l-1.843,8.711c-0.101,0.472-0.515,0.794-0.979,0.794l0,0C3.765,25.083,3.695,25.076,3.625,25.062L3.625,25.062z")}})},"./src/shape/icon/Link.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Link=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Link",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16.45,18.085l-2.47,2.471c0.054,1.023-0.297,2.062-1.078,2.846c-1.465,1.459-3.837,1.459-5.302-0.002c-1.461-1.465-1.46-3.836-0.001-5.301c0.783-0.781,1.824-1.131,2.847-1.078l2.469-2.469c-2.463-1.057-5.425-0.586-7.438,1.426c-2.634,2.637-2.636,6.907,0,9.545c2.638,2.637,6.909,2.635,9.545,0l0.001,0.002C17.033,23.511,17.506,20.548,16.45,18.085zM14.552,12.915l2.467-2.469c-0.053-1.023,0.297-2.062,1.078-2.848C19.564,6.139,21.934,6.137,23.4,7.6c1.462,1.465,1.462,3.837,0,5.301c-0.783,0.783-1.822,1.132-2.846,1.079l-2.469,2.468c2.463,1.057,5.424,0.584,7.438-1.424c2.634-2.639,2.633-6.91,0-9.546c-2.639-2.636-6.91-2.637-9.545-0.001C13.967,7.489,13.495,10.451,14.552,12.915zM18.152,10.727l-7.424,7.426c-0.585,0.584-0.587,1.535,0,2.121c0.585,0.584,1.536,0.584,2.121-0.002l7.425-7.424c0.584-0.586,0.584-1.535,0-2.121C19.687,10.141,18.736,10.142,18.152,10.727z")}})},"./src/shape/icon/LinkedIn.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.LinkedIn=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.LinkedIn",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M27.25,3.125h-22c-1.104,0-2,0.896-2,2v22c0,1.104,0.896,2,2,2h22c1.104,0,2-0.896,2-2v-22C29.25,4.021,28.354,3.125,27.25,3.125zM11.219,26.781h-4v-14h4V26.781zM9.219,11.281c-1.383,0-2.5-1.119-2.5-2.5s1.117-2.5,2.5-2.5s2.5,1.119,2.5,2.5S10.602,11.281,9.219,11.281zM25.219,26.781h-4v-8.5c0-0.4-0.403-1.055-0.687-1.213c-0.375-0.211-1.261-0.229-1.665-0.034l-1.648,0.793v8.954h-4v-14h4v0.614c1.583-0.723,3.78-0.652,5.27,0.184c1.582,0.886,2.73,2.864,2.73,4.702V26.781z")}})},"./src/shape/icon/Linux.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Linux=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Linux",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M11.791,25.229c1.027-0.104,1.162-1.191,0.68-1.666c-0.398-0.392-2.598-2.022-3.171-2.664C9.033,20.6,8.673,20.454,8.52,20.12c-0.352-0.771-0.598-1.869-0.151-2.658c0.081-0.144,0.133-0.078,0.071,0.22c-0.351,1.684,0.746,3.059,0.986,2.354c0.167-0.487,0.013-1.358,0.102-2.051c0.158-1.226,1.273-3.577,1.763-3.712c-0.755-1.398,0.886-2.494,0.866-3.723c-0.014-0.798,0.701,0.982,1.419,1.359c0.802,0.422,1.684-0.794,2.936-1.41c0.354-0.176,0.809-0.376,0.776-0.524c-0.146-0.718-1.644,0.886-2.979,0.939c-0.61,0.024-0.837-0.12-1.072-0.347c-0.712-0.689,0.073-0.115,1.132-0.307c0.471-0.085,0.629-0.163,1.128-0.365c0.5-0.201,1.069-0.5,1.636-0.654c0.395-0.106,0.361-0.402,0.208-0.491c-0.088-0.051-0.219-0.046-0.321,0.133c-0.244,0.419-1.383,0.661-1.74,0.771c-0.457,0.14-0.962,0.271-1.634,0.243c-1.021-0.042-0.782-0.509-1.513-0.928c-0.213-0.122-0.156-0.444,0.129-0.729c0.148-0.148,0.557-0.232,0.76-0.572c0.028-0.047,0.289-0.32,0.494-0.461c0.07-0.049,0.076-1.295-0.562-1.32c-0.543-0.021-0.697,0.398-0.675,0.818c0.022,0.419,0.245,0.765,0.393,0.764c0.285-0.004,0.019,0.311-0.138,0.361c-0.237,0.078-0.562-0.934-0.525-1.418c0.039-0.506,0.303-1.4,0.942-1.383c0.576,0.016,0.993,0.737,0.973,1.983c-0.003,0.211,0.935-0.101,1.247,0.229c0.224,0.236-0.767-2.207,1.438-2.375c0.582,0.111,1.14,0.305,1.371,1.641c-0.086,0.139,0.146,1.07-0.215,1.182c-0.438,0.135-0.707-0.02-0.453-0.438c0.172-0.418,0.004-1.483-0.882-1.42c-0.887,0.064-0.769,1.637-0.526,1.668c0.243,0.031,0.854,0.465,1.282,0.549c1.401,0.271,0.371,1.075,0.555,2.048c0.205,1.099,0.929,0.809,1.578,3.717c0.137,0.177,0.676,0.345,1.199,2.579c0.473,2.011-0.195,3.473,0.938,3.353c0.256-0.026,0.629-0.1,0.792-0.668c0.425-1.489-0.213-3.263-0.855-4.46c-0.375-0.698-0.729-1.174-0.916-1.337c0.738,0.436,1.683,1.829,1.898,2.862c0.286,1.358,0.49,1.934,0.059,3.37c0.25,0.125,0.871,0.39,0.871,0.685c-0.647-0.53-2.629-0.625-2.68,0.646c-0.338,0.008-0.594,0.034-0.811,0.293c-0.797,0.944-0.059,2.842-0.139,3.859c-0.07,0.896-0.318,1.783-0.46,2.683c-0.474-0.019-0.428-0.364-0.274-0.852c0.135-0.431,0.351-0.968,0.365-1.484c0.012-0.467-0.039-0.759-0.156-0.831c-0.118-0.072-0.303,0.074-0.559,0.485c-0.543,0.875-1.722,1.261-2.821,1.397c-1.099,0.138-2.123,0.028-2.664-0.578c-0.186-0.207-0.492,0.058-0.529,0.111c-0.049,0.074,0.18,0.219,0.352,0.533c0.251,0.461,0.49,1.159-0.105,1.479C12.83,26.314,12.316,26.221,11.791,25.229L11.791,25.229zM11.398,25.188c0.395,0.621,1.783,3.232-0.652,3.571c-0.814,0.114-2.125-0.474-3.396-0.784c-1.142-0.279-2.301-0.444-2.949-0.627c-0.391-0.108-0.554-0.25-0.588-0.414c-0.091-0.434,0.474-1.041,0.503-1.555c0.028-0.514-0.188-0.779-0.364-1.199c-0.177-0.42-0.224-0.734-0.081-0.914c0.109-0.141,0.334-0.199,0.698-0.164c0.462,0.047,1.02-0.049,1.319-0.23c0.505-0.309,0.742-0.939,0.516-1.699c0,0.744-0.244,1.025-0.855,1.366c-0.577,0.319-1.467,0.062-1.875,0.416c-0.492,0.427,0.175,1.528,0.12,2.338c-0.042,0.622-0.69,1.322-0.401,1.946c0.291,0.627,1.648,0.695,3.064,0.99c2.012,0.422,3.184,1.153,4.113,1.188c1.356,0.05,1.564-1.342,3.693-1.36c0.621-0.033,1.229-0.052,1.835-0.06c0.688-0.009,1.375-0.003,2.079,0.014c1.417,0.034,0.931,0.773,1.851,1.246c0.774,0.397,2.17,0.241,2.504-0.077c0.451-0.431,1.662-1.467,2.592-1.935c1.156-0.583,3.876-1.588,1.902-2.812c-0.461-0.285-1.547-0.588-1.639-2.676c-0.412,0.366-0.365,2.312,0.784,2.697c1.283,0.431,2.085,1.152-0.301,1.969c-1.58,0.54-1.849,0.706-3.099,1.747c-1.267,1.054-3.145,0.636-2.815-1.582c0.171-1.155,0.269-2.11-0.019-3.114c-0.142-0.49-0.211-1.119-0.114-1.562c0.187-0.858,0.651-1.117,1.106-0.293c0.285,0.519,0.385,1.122,1.408,1.171c1.607,0.077,1.926-1.553,2.439-1.627c0.343-0.05,0.686-1.02,0.425-2.589c-0.28-1.681-1.269-4.332-2.536-5.677c-1.053-1.118-1.717-2.098-2.135-3.497c-0.352-1.175-0.547-2.318-0.475-3.412c0.094-1.417-0.691-3.389-1.943-4.316c-0.782-0.581-2.011-0.893-3.122-0.88c-0.623,0.007-1.21,0.099-1.661,0.343c-1.855,1.008-2.113,2.445-2.086,4.088c0.025,1.543,0.078,3.303,0.254,4.977c-0.208,0.77-1.288,2.227-1.979,3.114C8.59,14.233,8.121,16.01,7.52,17.561c-0.321,0.828-0.862,1.2-0.908,2.265C6.6,20.122,6.61,20.891,6.894,20.672C7.98,19.829,9.343,21.95,11.398,25.188L11.398,25.188zM17.044,2.953c-0.06,0.176-0.3,0.321-0.146,0.443c0.152,0.123,0.24-0.171,0.549-0.281c0.08-0.028,0.449,0.012,0.519-0.164c0.03-0.077-0.19-0.164-0.321-0.291c-0.133-0.125-0.262-0.236-0.386-0.229C16.938,2.451,17.096,2.798,17.044,2.953L17.044,2.953zM18.934,9.35c0.115-0.121,0.174,0.207,0.483,0.402c0.244,0.154,0.481,0.04,0.545,0.354c0.044,0.225-0.097,0.467-0.284,0.436C19.35,10.486,18.596,9.705,18.934,9.35L18.934,9.35zM13.832,7.375c-0.508-0.037-0.543,0.33-0.375,0.324C13.629,7.693,13.523,7.408,13.832,7.375L13.832,7.375zM12.96,6.436c0.06-0.013,0.146,0.09,0.119,0.233c-0.037,0.199-0.021,0.324,0.117,0.325c0.022,0,0.048-0.005,0.056-0.057c0.066-0.396-0.14-0.688-0.225-0.711C12.834,6.178,12.857,6.458,12.96,6.436L12.96,6.436zM16.663,6.268c0.129,0.039,0.253,0.262,0.28,0.504c0.002,0.021,0.168-0.035,0.17-0.088c0.011-0.389-0.321-0.571-0.408-0.562C16.506,6.139,16.562,6.238,16.663,6.268L16.663,6.268zM14.765,7.423c0.463-0.214,0.625,0.118,0.465,0.171C15.066,7.648,15.065,7.345,14.765,7.423L14.765,7.423zM9.178,15.304c-0.219-0.026,0.063-0.19,0.184-0.397c0.131-0.227,0.105-0.511,0.244-0.469s0.061,0.2-0.033,0.461C9.491,15.121,9.258,15.313,9.178,15.304L9.178,15.304z")}})},"./src/shape/icon/List.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.List=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.List",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M4.082,4.083v2.999h22.835V4.083H4.082zM4.082,20.306h22.835v-2.999H4.082V20.306zM4.082,13.694h22.835v-2.999H4.082V13.694zM4.082,26.917h22.835v-2.999H4.082V26.917z")}})},"./src/shape/icon/Location.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Location=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Location",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,3.5c-4.142,0-7.5,3.358-7.5,7.5c0,4.143,7.5,18.121,7.5,18.121S23.5,15.143,23.5,11C23.5,6.858,20.143,3.5,16,3.5z M16,14.584c-1.979,0-3.584-1.604-3.584-3.584S14.021,7.416,16,7.416S19.584,9.021,19.584,11S17.979,14.584,16,14.584z")}})},"./src/shape/icon/Lock.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Lock=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Lock",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M22.335,12.833V9.999h-0.001C22.333,6.501,19.498,3.666,16,3.666S9.666,6.502,9.666,10h0v2.833H7.375V25h17.25V12.833H22.335zM11.667,10C11.667,10,11.667,10,11.667,10c0-2.39,1.944-4.334,4.333-4.334c2.391,0,4.335,1.944,4.335,4.333c0,0,0,0,0,0v2.834h-8.668V10z")}})},"./src/shape/icon/Locked.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Locked=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Locked",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M26.711,14.085L16.914,4.29c-0.778-0.778-2.051-0.778-2.829,0L4.29,14.086c-0.778,0.778-0.778,2.05,0,2.829l9.796,9.796c0.778,0.777,2.051,0.777,2.829,0l9.797-9.797C27.488,16.136,27.488,14.863,26.711,14.085zM8.218,16.424c-0.4-0.153-0.687-0.533-0.687-0.987s0.287-0.834,0.687-0.987V16.424zM8.969,16.424v-1.974c0.4,0.152,0.687,0.533,0.687,0.987S9.369,16.272,8.969,16.424zM13.5,19.188l1.203-3.609c-0.689-0.306-1.172-0.994-1.172-1.797c0-1.087,0.881-1.969,1.969-1.969c1.087,0,1.969,0.881,1.969,1.969c0,0.803-0.482,1.491-1.172,1.797l1.203,3.609H13.5zM22.03,16.549c-0.399-0.152-0.687-0.533-0.687-0.986s0.287-0.834,0.687-0.987V16.549zM22.781,16.549v-1.973c0.4,0.152,0.688,0.533,0.688,0.987S23.182,16.397,22.781,16.549z")}})},"./src/shape/icon/Magic.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Magic=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Magic",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M23.043,4.649l-0.404-2.312l-1.59,1.727l-2.323-0.33l1.151,2.045l-1.032,2.108l2.302-0.463l1.686,1.633l0.271-2.332l2.074-1.099L23.043,4.649zM26.217,18.198l-0.182-1.25l-0.882,0.905l-1.245-0.214l0.588,1.118l-0.588,1.118l1.245-0.214l0.882,0.905l0.182-1.25l1.133-0.56L26.217,18.198zM4.92,7.672L5.868,7.3l0.844,0.569L6.65,6.853l0.802-0.627L6.467,5.97L6.118,5.013L5.571,5.872L4.553,5.908l0.647,0.786L4.92,7.672zM10.439,10.505l1.021-1.096l1.481,0.219l-0.727-1.31l0.667-1.341l-1.47,0.287l-1.069-1.048L10.16,7.703L8.832,8.396l1.358,0.632L10.439,10.505zM17.234,12.721c-0.588-0.368-1.172-0.618-1.692-0.729c-0.492-0.089-1.039-0.149-1.425,0.374L2.562,30.788h6.68l9.669-15.416c0.303-0.576,0.012-1.041-0.283-1.447C18.303,13.508,17.822,13.09,17.234,12.721zM13.613,21.936c-0.254-0.396-0.74-0.857-1.373-1.254c-0.632-0.396-1.258-0.634-1.726-0.69l4.421-7.052c0.064-0.013,0.262-0.021,0.543,0.066c0.346,0.092,0.785,0.285,1.225,0.562c0.504,0.313,0.908,0.677,1.133,0.97c0.113,0.145,0.178,0.271,0.195,0.335c0.002,0.006,0.004,0.011,0.004,0.015L13.613,21.936z")}})},"./src/shape/icon/Magnet.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Magnet=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Magnet",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M20.812,19.5h5.002v-6.867c-0.028-1.706-0.61-3.807-2.172-5.841c-1.539-2.014-4.315-3.72-7.939-3.687C12.076,3.073,9.3,4.779,7.762,6.792C6.2,8.826,5.617,10.928,5.588,12.634V19.5h5v-6.866c-0.027-0.377,0.303-1.789,1.099-2.748c0.819-0.979,1.848-1.747,4.014-1.778c2.165,0.032,3.195,0.799,4.013,1.778c0.798,0.959,1.126,2.372,1.099,2.748V19.5L20.812,19.5zM25.814,25.579c0,0,0-2.354,0-5.079h-5.002c0,2.727,0,5.08,0,5.08l5.004-0.001H25.814zM5.588,25.58h5c0,0,0-2.354,0-5.08h-5C5.588,23.227,5.588,25.58,5.588,25.58z")}})},"./src/shape/icon/Mail.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Mail=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Mail",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.516,7.167H3.482l12.517,7.108L28.516,7.167zM16.74,17.303C16.51,17.434,16.255,17.5,16,17.5s-0.51-0.066-0.741-0.197L2.5,10.06v14.773h27V10.06L16.74,17.303z")}})},"./src/shape/icon/Man.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Man=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Man",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.021,16.349c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.103,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.55,0.307,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.932,1.139,5.307,2.543,5.307c0.846,0,1.265-0.865,1.466-2.189c0.201,1.324,0.62,2.189,1.463,2.189c1.406,0,2.545-2.375,2.545-5.307c0-0.66-0.061-1.291-0.168-1.873c0.598,0.574,1.174,0.803,1.725,0.496C22.602,21.541,22.443,18.912,21.021,16.349zM15.808,13.757c2.362,0,4.278-1.916,4.278-4.279s-1.916-4.279-4.278-4.279c-2.363,0-4.28,1.916-4.28,4.279S13.445,13.757,15.808,13.757z")}})},"./src/shape/icon/Merge.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Merge=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Merge",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M29.342,15.5l-7.556-4.363v2.613h-1.411c-0.788-0.01-1.331-0.241-2.019-0.743c-1.021-0.745-2.094-2.181-3.551-3.568C13.367,8.06,11.291,6.73,8.5,6.749H2.812v3.5H8.5c2.231,0.012,3.441,1.185,5.07,2.934c0.697,0.753,1.428,1.58,2.324,2.323c-1.396,1.165-2.412,2.516-3.484,3.501c-1.183,1.081-2.202,1.723-3.912,1.741H2.813v3.5h5.716c3.752,0.001,6.035-2.319,7.619-4.066c0.817-0.895,1.537-1.691,2.209-2.191c0.686-0.502,1.23-0.732,2.017-0.742h1.412v2.614L29.342,15.5z")}})},"./src/shape/icon/Mic.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Mic=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Mic",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.5,21.125c2.682,0,4.875-2.25,4.875-5V5.875c0-2.75-2.193-5-4.875-5s-4.875,2.25-4.875,5v10.25C10.625,18.875,12.818,21.125,15.5,21.125zM21.376,11v5.125c0,3.308-2.636,6-5.876,6s-5.875-2.691-5.875-6V11H6.626v5.125c0,4.443,3.194,8.132,7.372,8.861v2.139h-3.372v3h9.749v-3h-3.376v-2.139c4.181-0.727,7.375-4.418,7.375-8.861V11H21.376z")}})},"./src/shape/icon/MicMute.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.MicMute=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.MicMute",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M10.121,18.529c-0.317-0.736-0.496-1.549-0.496-2.404V11H6.626v5.125c0,1.693,0.466,3.275,1.272,4.627L10.121,18.529zM20.375,8.276V5.875c0-2.75-2.193-5-4.875-5s-4.875,2.25-4.875,5v10.25c0,0.568,0.113,1.105,0.285,1.615L20.375,8.276zM21.376,12.931v3.195c0,3.308-2.636,6-5.876,6c-0.958,0-1.861-0.24-2.661-0.657l-2.179,2.179c0.995,0.659,2.123,1.128,3.338,1.34v2.139h-3.372v3h9.749v-3h-3.376v-2.139c4.181-0.727,7.375-4.418,7.375-8.861V11h-1.068L21.376,12.931zM20.375,16.125v-2.194l-6.788,6.788c0.588,0.26,1.234,0.405,1.913,0.405C18.182,21.125,20.375,18.875,20.375,16.125zM25.542,4.522L4.855,25.209l1.415,1.416L26.956,5.937L25.542,4.522z")}})},"./src/shape/icon/Minus.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Minus=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Minus",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.979,12.896,5.979,12.896,5.979,19.562,25.979,19.562z")}})},"./src/shape/icon/NewWindow.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.NewWindow=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.NewWindow",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M5.896,5.333V21.25h23.417V5.333H5.896zM26.312,18.25H8.896V8.334h17.417V18.25L26.312,18.25zM4.896,9.542H1.687v15.917h23.417V22.25H4.896V9.542z")}})},"./src/shape/icon/No.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.No=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.No",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,2.939C9.006,2.942,3.338,8.61,3.335,15.605C3.335,22.6,9.005,28.268,16,28.27c6.994-0.002,12.662-5.67,12.664-12.664C28.663,8.61,22.995,2.939,16,2.939zM25.663,15.605c-0.003,1.943-0.583,3.748-1.569,5.264L10.736,7.513c1.515-0.988,3.32-1.569,5.265-1.573C21.337,5.951,25.654,10.269,25.663,15.605zM6.335,15.605c0.004-1.943,0.584-3.75,1.573-5.266l13.355,13.357c-1.516,0.986-3.32,1.566-5.264,1.569C10.664,25.26,6.346,20.941,6.335,15.605z")}})},"./src/shape/icon/NoMagnet.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.NoMagnet=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.NoMagnet",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M10.59,17.857v-5.225c-0.027-0.376,0.303-1.789,1.099-2.748c0.819-0.979,1.849-1.748,4.014-1.778c1.704,0.026,2.699,0.508,3.447,1.189l3.539-3.539c-1.616-1.526-4.01-2.679-6.986-2.652C12.077,3.073,9.3,4.779,7.762,6.793C6.2,8.826,5.617,10.928,5.59,12.634V19.5h3.357L10.59,17.857zM5.59,20.5v2.357L7.947,20.5H5.59zM20.812,13.29v6.21h5.002v-6.866c-0.021-1.064-0.252-2.283-0.803-3.542L20.812,13.29zM25.339,4.522L4.652,25.209l1.415,1.416L26.753,5.937L25.339,4.522zM20.812,25.58h5.002c0,0,0-2.354,0-5.08h-5.002C20.812,23.227,20.812,25.58,20.812,25.58zM10.59,25.58c0,0,0-0.827,0-2.064L8.525,25.58H10.59z")}})},"./src/shape/icon/NodeJs.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.NodeJs=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.NodeJs",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M4.783,4.458L2.59,3.196C2.553,3.174,2.511,3.163,2.469,3.161H2.447C2.405,3.163,2.363,3.174,2.326,3.196L0.133,4.458C0.051,4.505,0,4.593,0,4.688l0.005,3.398c0,0.047,0.024,0.092,0.066,0.114c0.041,0.024,0.091,0.024,0.132,0l1.303-0.746c0.083-0.049,0.132-0.136,0.132-0.229V5.637c0-0.095,0.05-0.183,0.132-0.229l0.555-0.32c0.041-0.023,0.086-0.035,0.132-0.035c0.045,0,0.092,0.012,0.132,0.035l0.555,0.32c0.082,0.047,0.133,0.135,0.133,0.229v1.588c0,0.094,0.051,0.182,0.132,0.229l1.303,0.746c0.041,0.024,0.092,0.024,0.132,0c0.041-0.022,0.066-0.067,0.066-0.114l0.004-3.398C4.915,4.593,4.865,4.505,4.783,4.458zM17.93,0.745l-1.305-0.729c-0.042-0.023-0.091-0.022-0.132,0.001c-0.041,0.024-0.065,0.067-0.065,0.114v3.365c0,0.033-0.018,0.064-0.046,0.081s-0.064,0.017-0.093,0l-0.549-0.316c-0.082-0.047-0.183-0.047-0.265,0l-2.193,1.266c-0.082,0.047-0.133,0.135-0.133,0.229V7.29c0,0.095,0.051,0.182,0.132,0.229l2.194,1.267c0.082,0.048,0.183,0.048,0.265,0l2.194-1.267c0.082-0.048,0.133-0.135,0.133-0.229V0.977C18.066,0.88,18.014,0.792,17.93,0.745zM16.421,6.458c0,0.023-0.013,0.045-0.033,0.057l-0.753,0.435c-0.021,0.012-0.045,0.012-0.066,0l-0.753-0.435c-0.021-0.012-0.033-0.034-0.033-0.057v-0.87c0-0.023,0.013-0.045,0.033-0.058l0.753-0.435c0.021-0.012,0.045-0.012,0.066,0l0.753,0.435c0.021,0.012,0.033,0.034,0.033,0.058V6.458zM24.473,4.493l-2.18-1.266c-0.082-0.047-0.183-0.048-0.265,0l-2.193,1.266c-0.082,0.047-0.132,0.135-0.132,0.229v2.532c0,0.096,0.051,0.184,0.133,0.23l2.18,1.242c0.08,0.045,0.179,0.046,0.26,0.001l1.318-0.732c0.042-0.023,0.067-0.067,0.068-0.115c0-0.048-0.025-0.092-0.066-0.116l-2.207-1.266c-0.041-0.023-0.066-0.067-0.066-0.115V5.59c0-0.047,0.025-0.091,0.065-0.115l0.688-0.396c0.041-0.024,0.091-0.024,0.132,0l0.688,0.396c0.041,0.023,0.066,0.067,0.066,0.115v0.625c0,0.047,0.025,0.091,0.066,0.114c0.041,0.024,0.092,0.024,0.132,0l1.314-0.764c0.081-0.047,0.132-0.135,0.132-0.229V4.722C24.605,4.628,24.555,4.541,24.473,4.493zM11.363,4.48L9.169,3.214c-0.082-0.047-0.183-0.047-0.265,0L6.711,4.48C6.629,4.527,6.579,4.615,6.579,4.709v2.534c0,0.095,0.051,0.182,0.133,0.229l2.193,1.267c0.082,0.048,0.183,0.048,0.265,0l2.193-1.267c0.082-0.048,0.132-0.135,0.132-0.229V4.709C11.495,4.615,11.445,4.527,11.363,4.48zM31.019,4.382L28.95,3.187c-0.13-0.074-0.304-0.074-0.435,0l-2.068,1.195c-0.135,0.077-0.218,0.222-0.218,0.377v2.386c0,0.156,0.083,0.301,0.218,0.378l0.542,0.312c0.263,0.13,0.356,0.13,0.477,0.13c0.389,0,0.612-0.236,0.612-0.646V4.962c0-0.033-0.027-0.06-0.06-0.06h-0.263c-0.033,0-0.061,0.026-0.061,0.06v2.356c0,0.182-0.188,0.363-0.495,0.209l-0.566-0.326c-0.021-0.012-0.033-0.033-0.033-0.057V4.759c0-0.023,0.013-0.045,0.033-0.057l2.067-1.193c0.019-0.011,0.044-0.011,0.063,0l2.067,1.193c0.02,0.012,0.032,0.034,0.032,0.057v2.386c0,0.023-0.013,0.046-0.032,0.057l-2.068,1.193c-0.018,0.012-0.045,0.012-0.063,0l-0.53-0.314c-0.017-0.01-0.036-0.013-0.052-0.004c-0.146,0.083-0.175,0.094-0.312,0.143c-0.034,0.012-0.084,0.031,0.019,0.09l0.691,0.408c0.065,0.038,0.141,0.059,0.217,0.059s0.151-0.021,0.218-0.059l2.068-1.194c0.134-0.078,0.217-0.222,0.217-0.378V4.759C31.235,4.604,31.152,4.459,31.019,4.382zM29.371,6.768c-0.548,0-0.668-0.138-0.708-0.41c-0.005-0.029-0.029-0.051-0.06-0.051h-0.268c-0.033,0-0.06,0.026-0.06,0.06c0,0.349,0.189,0.765,1.095,0.765c0.655,0,1.031-0.259,1.031-0.709c0-0.447-0.302-0.566-0.938-0.65c-0.643-0.085-0.708-0.128-0.708-0.279c0-0.125,0.056-0.29,0.531-0.29c0.425,0,0.581,0.091,0.646,0.378c0.006,0.027,0.03,0.047,0.059,0.047h0.269c0.017,0,0.032-0.007,0.044-0.019c0.011-0.013,0.017-0.029,0.016-0.046c-0.042-0.493-0.37-0.723-1.032-0.723c-0.59,0-0.941,0.249-0.941,0.666c0,0.453,0.35,0.578,0.916,0.634c0.677,0.066,0.729,0.166,0.729,0.298C29.992,6.669,29.807,6.768,29.371,6.768zM22.128,5.446l-0.42,0.243c-0.016,0.009-0.025,0.026-0.025,0.044v0.486c0,0.019,0.01,0.035,0.025,0.044l0.42,0.243c0.016,0.009,0.035,0.009,0.052,0l0.421-0.243c0.016-0.009,0.025-0.025,0.025-0.044V5.733c0-0.018-0.01-0.035-0.025-0.044L22.18,5.446C22.163,5.438,22.144,5.438,22.128,5.446z")}})},"./src/shape/icon/Notebook.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Notebook=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Notebook",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.875,1.375H8c-1.033,0-1.874,0.787-1.979,1.792h1.604c1.102,0,2,0.898,2,2c0,1.102-0.898,2-2,2H6v0.999h1.625c1.104,0,2.002,0.898,2.002,2.002c0,1.104-0.898,2.001-2.002,2.001H6v0.997h1.625c1.102,0,2,0.898,2,2c0,1.104-0.898,2.004-2,2.004H6v0.994h1.625c1.102,0,2,0.898,2,2.002s-0.898,2.002-2,2.002H6v0.997h1.624c1.104,0,2.002,0.897,2.002,2.001c0,1.104-0.898,2.002-2.002,2.002H6.004C6.027,28.252,6.91,29.125,8,29.125h16.875c1.104,0,2-0.896,2-2V3.375C26.875,2.271,25.979,1.375,24.875,1.375zM25.25,8.375c0,0.552-0.447,1-1,1H14c-0.553,0-1-0.448-1-1V4c0-0.552,0.447-1,1-1h10.25c0.553,0,1,0.448,1,1V8.375zM8.625,25.166c0-0.554-0.449-1.001-1-1.001h-3.25c-0.552,0-1,0.447-1,1.001c0,0.552,0.449,1,1,1h3.25C8.176,26.166,8.625,25.718,8.625,25.166zM4.375,6.166h3.251c0.551,0,0.999-0.448,0.999-0.999c0-0.555-0.448-1-0.999-1H4.375c-0.553,0-1,0.445-1,1C3.374,5.718,3.822,6.166,4.375,6.166zM4.375,11.167h3.25c0.553,0,1-0.448,1-1s-0.448-1-1-1h-3.25c-0.553,0-1,0.448-1,1S3.822,11.167,4.375,11.167zM4.375,16.167h3.25c0.551,0,1-0.448,1-1.001s-0.448-0.999-1-0.999h-3.25c-0.553,0-1.001,0.446-1.001,0.999S3.822,16.167,4.375,16.167zM3.375,20.165c0,0.553,0.446,1.002,1,1.002h3.25c0.551,0,1-0.449,1-1.002c0-0.552-0.448-1-1-1h-3.25C3.821,19.165,3.375,19.613,3.375,20.165z")}})},"./src/shape/icon/Noview.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Noview=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Noview",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M11.478,17.568c-0.172-0.494-0.285-1.017-0.285-1.568c0-2.65,2.158-4.807,4.807-4.807c0.552,0,1.074,0.113,1.568,0.285l2.283-2.283C18.541,8.647,17.227,8.286,16,8.286C8.454,8.286,2.5,16,2.5,16s2.167,2.791,5.53,5.017L11.478,17.568zM23.518,11.185l-3.056,3.056c0.217,0.546,0.345,1.138,0.345,1.76c0,2.648-2.158,4.807-4.807,4.807c-0.622,0-1.213-0.128-1.76-0.345l-2.469,2.47c1.327,0.479,2.745,0.783,4.229,0.783c5.771,0,13.5-7.715,13.5-7.715S26.859,13.374,23.518,11.185zM25.542,4.917L4.855,25.604L6.27,27.02L26.956,6.332L25.542,4.917z")}})},"./src/shape/icon/Opera.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Opera=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Opera",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.954,2.046c-7.489,0-12.872,5.432-12.872,13.581c0,7.25,5.234,13.835,12.873,13.835c7.712,0,12.974-6.583,12.974-13.835C28.929,7.413,23.375,2.046,15.954,2.046zM15.952,26.548L15.952,26.548c-2.289,0-3.49-1.611-4.121-3.796c-0.284-1.037-0.458-2.185-0.563-3.341c-0.114-1.374-0.129-2.773-0.129-4.028c0-0.993,0.018-1.979,0.074-2.926c0.124-1.728,0.386-3.431,0.89-4.833c0.694-1.718,1.871-2.822,3.849-2.822c2.5,0,3.763,1.782,4.385,4.322c0.429,1.894,0.56,4.124,0.56,6.274c0,2.299-0.103,5.153-0.763,7.442C19.473,24.979,18.242,26.548,15.952,26.548z")}})},"./src/shape/icon/Package.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Package=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Package",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M17.078,22.004l-1.758-4.129l-2.007,4.752l-7.519-3.289l0.174,3.905l9.437,4.374l10.909-5.365l-0.149-4.989L17.078,22.004zM29.454,6.619L18.521,3.383l-3.006,2.671l-3.091-2.359L1.546,8.199l3.795,3.048l-3.433,5.302l10.879,4.757l2.53-5.998l2.257,5.308l11.393-5.942l-3.105-4.709L29.454,6.619zM15.277,14.579l-9.059-3.83l9.275-4.101l9.608,3.255L15.277,14.579z")}})},"./src/shape/icon/Page.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Page=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Page",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M23.024,5.673c-1.744-1.694-3.625-3.051-5.168-3.236c-0.084-0.012-0.171-0.019-0.263-0.021H7.438c-0.162,0-0.322,0.063-0.436,0.18C6.889,2.71,6.822,2.87,6.822,3.033v25.75c0,0.162,0.063,0.317,0.18,0.435c0.117,0.116,0.271,0.179,0.436,0.179h18.364c0.162,0,0.317-0.062,0.434-0.179c0.117-0.117,0.182-0.272,0.182-0.435V11.648C26.382,9.659,24.824,7.49,23.024,5.673zM25.184,28.164H8.052V3.646h9.542v0.002c0.416-0.025,0.775,0.386,1.05,1.326c0.25,0.895,0.313,2.062,0.312,2.871c0.002,0.593-0.027,0.991-0.027,0.991l-0.049,0.652l0.656,0.007c0.003,0,1.516,0.018,3,0.355c1.426,0.308,2.541,0.922,2.645,1.617c0.004,0.062,0.005,0.124,0.004,0.182V28.164z")}})},"./src/shape/icon/Page2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Page2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Page2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M23.024,5.673c-1.744-1.694-3.625-3.051-5.168-3.236c-0.084-0.012-0.171-0.019-0.263-0.021H7.438c-0.162,0-0.322,0.063-0.436,0.18C6.889,2.71,6.822,2.87,6.822,3.033v25.75c0,0.162,0.063,0.317,0.18,0.435c0.117,0.116,0.271,0.179,0.436,0.179h18.364c0.162,0,0.317-0.062,0.434-0.179c0.117-0.117,0.182-0.272,0.182-0.435V11.648C26.382,9.659,24.824,7.49,23.024,5.673zM22.157,6.545c0.805,0.786,1.529,1.676,2.069,2.534c-0.468-0.185-0.959-0.322-1.42-0.431c-1.015-0.228-2.008-0.32-2.625-0.357c0.003-0.133,0.004-0.283,0.004-0.446c0-0.869-0.055-2.108-0.356-3.2c-0.003-0.01-0.005-0.02-0.009-0.03C20.584,5.119,21.416,5.788,22.157,6.545zM25.184,28.164H8.052V3.646h9.542v0.002c0.416-0.025,0.775,0.386,1.05,1.326c0.25,0.895,0.313,2.062,0.312,2.871c0.002,0.593-0.027,0.991-0.027,0.991l-0.049,0.652l0.656,0.007c0.003,0,1.516,0.018,3,0.355c1.426,0.308,2.541,0.922,2.645,1.617c0.004,0.062,0.005,0.124,0.004,0.182V28.164z")}})},"./src/shape/icon/Pallete.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Pallete=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Pallete",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.653,7.25c-3.417,0-8.577,0.983-8.577,3.282c0,1.91,2.704,3.229,1.691,3.889c-1.02,0.666-2.684-1.848-4.048-1.848c-1.653,0-2.815,1.434-2.815,2.926c0,4.558,6.326,8.25,13.749,8.25c7.424,0,13.443-3.692,13.443-8.25C29.096,10.944,23.077,7.25,15.653,7.25zM10.308,13.521c0-0.645,0.887-1.166,1.98-1.166c1.093,0,1.979,0.521,1.979,1.166c0,0.644-0.886,1.166-1.979,1.166C11.195,14.687,10.308,14.164,10.308,13.521zM14.289,22.299c-1.058,0-1.914-0.68-1.914-1.518s0.856-1.518,1.914-1.518c1.057,0,1.914,0.68,1.914,1.518S15.346,22.299,14.289,22.299zM19.611,21.771c-1.057,0-1.913-0.681-1.913-1.519c0-0.84,0.856-1.521,1.913-1.521c1.059,0,1.914,0.681,1.914,1.521C21.525,21.092,20.67,21.771,19.611,21.771zM20.075,10.66c0-0.838,0.856-1.518,1.914-1.518s1.913,0.68,1.913,1.518c0,0.839-0.855,1.518-1.913,1.518C20.934,12.178,20.075,11.499,20.075,10.66zM24.275,19.482c-1.057,0-1.914-0.681-1.914-1.519s0.857-1.518,1.914-1.518c1.059,0,1.914,0.68,1.914,1.518S25.334,19.482,24.275,19.482zM25.286,15.475c-1.058,0-1.914-0.68-1.914-1.519c0-0.838,0.856-1.518,1.914-1.518c1.057,0,1.913,0.68,1.913,1.518C27.199,14.795,26.343,15.475,25.286,15.475z")}})},"./src/shape/icon/Palm.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Palm=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Palm",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M14.296,27.885v-2.013c0,0-0.402-1.408-1.073-2.013c-0.671-0.604-1.274-1.274-1.409-1.61c0,0-0.268,0.135-0.737-0.335s-1.812-2.616-1.812-2.616l-0.671-0.872c0,0-0.47-0.671-1.275-1.342c-0.805-0.672-0.938-0.067-1.476-0.738s0.604-1.275,1.006-1.409c0.403-0.134,1.946,0.134,2.684,0.872c0.738,0.738,0.738,0.738,0.738,0.738l1.073,1.141l0.537,0.201l0.671-1.073l-0.269-2.281c0,0-0.604-2.55-0.737-4.764c-0.135-2.214-0.47-5.703,1.006-5.837s1.007,2.55,1.073,3.489c0.067,0.938,0.806,5.232,1.208,5.568c0.402,0.335,0.671,0.066,0.671,0.066l0.402-7.514c0,0-0.479-2.438,1.073-2.549c0.939-0.067,0.872,1.543,0.872,2.147c0,0.604,0.269,7.514,0.269,7.514l0.537,0.135c0,0,0.402-2.214,0.604-3.153s0.604-2.416,0.537-3.087c-0.067-0.671-0.135-2.348,1.006-2.348s0.872,1.812,0.939,2.415s-0.134,3.153-0.134,3.757c0,0.604-0.738,3.623-0.537,3.824s2.08-2.817,2.349-3.958c0.268-1.141,0.201-3.02,1.408-2.885c1.208,0.134,0.47,2.817,0.402,3.086c-0.066,0.269-0.671,2.349-0.872,2.952s-0.805,1.476-1.006,2.013s0.402,2.349,0,4.629c-0.402,2.281-1.61,5.166-1.61,5.166l0.604,2.08c0,0-1.744,0.671-3.824,0.805C16.443,28.221,14.296,27.885,14.296,27.885z")}})},"./src/shape/icon/Paper.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Paper=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Paper",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.916,8.009L15.953,1.888c-0.251-0.119-0.548-0.115-0.798,0.008c-0.25,0.125-0.433,0.357-0.491,0.629c-0.002,0.01-1.04,4.83-2.578,9.636c-0.526,1.646-1.114,3.274-1.728,4.704l1.665,0.786c2-4.643,3.584-11.052,4.181-13.614l11.264,5.316c-0.346,1.513-1.233,5.223-2.42,8.927c-0.767,2.399-1.665,4.797-2.585,6.532c-0.889,1.79-1.958,2.669-2.197,2.552c-1.419,0.03-2.418-1.262-3.09-2.918c-0.32-0.803-0.53-1.63-0.657-2.246c-0.127-0.618-0.166-1.006-0.168-1.006c-0.034-0.317-0.232-0.597-0.52-0.731l-12.962-6.12c-0.301-0.142-0.654-0.11-0.925,0.081c-0.27,0.193-0.416,0.518-0.38,0.847c0.008,0.045,0.195,1.848,0.947,3.736c0.521,1.321,1.406,2.818,2.845,3.575l12.956,6.131l0.006-0.013c0.562,0.295,1.201,0.487,1.947,0.496c1.797-0.117,2.777-1.668,3.818-3.525c3-5.69,5.32-16.602,5.338-16.642C29.512,8.615,29.302,8.19,28.916,8.009z")}})},"./src/shape/icon/Parent.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Parent=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Parent",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M14.423,12.17c-0.875,0.641-1.941,1.031-3.102,1.031c-1.164,0-2.231-0.391-3.104-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.549,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.2,1.314,0.62,2.188,1.461,2.188c1.396,0,2.545-2.375,2.545-5.312c0-0.66-0.062-1.291-0.168-1.873c0.6,0.574,1.176,0.812,1.726,0.496c1.227-0.682,1.068-3.311-0.354-5.874C15.921,13.689,15.173,12.795,14.423,12.17zM11.32,12.201c2.361,0,4.277-1.916,4.277-4.279s-1.916-4.279-4.277-4.279c-2.363,0-4.28,1.916-4.28,4.279S8.957,12.201,11.32,12.201zM21.987,17.671c1.508,0,2.732-1.225,2.732-2.735c0-1.51-1.225-2.735-2.732-2.735c-1.511,0-2.736,1.225-2.736,2.735C19.251,16.446,20.477,17.671,21.987,17.671zM25.318,19.327c-0.391-0.705-0.869-1.277-1.349-1.677c-0.56,0.41-1.24,0.659-1.982,0.659c-0.744,0-1.426-0.25-1.983-0.659c-0.479,0.399-0.958,0.972-1.35,1.677c-0.909,1.638-1.009,3.318-0.224,3.754c0.351,0.2,0.721,0.05,1.101-0.317c-0.067,0.372-0.105,0.775-0.105,1.197c0,1.878,0.728,3.396,1.625,3.396c0.54,0,0.808-0.553,0.937-1.398c0.128,0.841,0.396,1.398,0.934,1.398c0.893,0,1.627-1.518,1.627-3.396c0-0.422-0.04-0.825-0.107-1.197c0.383,0.367,0.752,0.52,1.104,0.317C26.328,22.646,26.227,20.965,25.318,19.327z")}})},"./src/shape/icon/Pc.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Pc=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Pc",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M29.249,3.14h-9.188l-0.459,0.459v18.225l0.33,2.389H19.57v0.245h-0.307v-0.306h-0.611v0.244h-0.311v-0.367h-0.486v0.307h-1.104l-2.022-0.367v-0.92h0.858l0.302-1.47h2.728c0.188,0,0.339-0.152,0.339-0.339V7.828c0-0.187-0.149-0.338-0.339-0.338H1.591c-0.187,0-0.339,0.152-0.339,0.338V21.24c0,0.187,0.152,0.339,0.339,0.339h3.016l0.199,1.47h1.409l-3.4,3.4L2.11,27.951c0,0,2.941,1.102,6.678,1.102c3.737,0,9.679-0.857,10.476-0.857s4.84,0,4.84,0v-1.225l-0.137-1.068h1.744c-0.2,0.106-0.322,0.244-0.322,0.396v0.979c0,0.341,0.604,0.613,1.352,0.613c0.742,0,1.348-0.272,1.348-0.613v-0.979c0-0.339-0.604-0.611-1.348-0.611c-0.188,0-0.364,0.019-0.525,0.049v-0.17h-2.29l-0.055-0.432h5.382L29.249,3.14L29.249,3.14zM2.478,20.17V8.714h15.07V20.17H2.478z")}})},"./src/shape/icon/Pen.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Pen=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Pen",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M13.587,12.074c-0.049-0.074-0.11-0.147-0.188-0.202c-0.333-0.243-0.803-0.169-1.047,0.166c-0.244,0.336-0.167,0.805,0.167,1.048c0.303,0.22,0.708,0.167,0.966-0.091l-7.086,9.768l-2.203,7.997l6.917-4.577L26.865,4.468l-4.716-3.42l-1.52,2.096c-0.087-0.349-0.281-0.676-0.596-0.907c-0.73-0.529-1.751-0.369-2.28,0.363C14.721,6.782,16.402,7.896,13.587,12.074zM10.118,25.148L6.56,27.503l1.133-4.117L10.118,25.148zM14.309,11.861c2.183-3.225,1.975-4.099,3.843-6.962c0.309,0.212,0.664,0.287,1.012,0.269L14.309,11.861z")}})},"./src/shape/icon/Pensil.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Pensil=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Pensil",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.31,2.872l-3.384-2.127c-0.854-0.536-1.979-0.278-2.517,0.576l-1.334,2.123l6.474,4.066l1.335-2.122C26.42,4.533,26.164,3.407,25.31,2.872zM6.555,21.786l6.474,4.066L23.581,9.054l-6.477-4.067L6.555,21.786zM5.566,26.952l-0.143,3.819l3.379-1.787l3.14-1.658l-6.246-3.925L5.566,26.952z")}})},"./src/shape/icon/People.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.People=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.People",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.066,20.667c1.227-0.682,1.068-3.311-0.354-5.874c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.102,1.031c-1.164,0-2.231-0.391-3.104-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.549,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.2,1.314,0.62,2.188,1.461,2.188c1.396,0,2.545-2.375,2.545-5.312c0-0.66-0.062-1.291-0.168-1.873C19.939,20.745,20.516,20.983,21.066,20.667zM15.5,12.201c2.361,0,4.277-1.916,4.277-4.279S17.861,3.644,15.5,3.644c-2.363,0-4.28,1.916-4.28,4.279S13.137,12.201,15.5,12.201zM24.094,14.914c1.938,0,3.512-1.573,3.512-3.513c0-1.939-1.573-3.513-3.512-3.513c-1.94,0-3.513,1.573-3.513,3.513C20.581,13.341,22.153,14.914,24.094,14.914zM28.374,17.043c-0.502-0.907-1.116-1.641-1.732-2.154c-0.718,0.526-1.594,0.846-2.546,0.846c-0.756,0-1.459-0.207-2.076-0.55c0.496,1.093,0.803,2.2,0.861,3.19c0.093,1.516-0.381,2.641-1.329,3.165c-0.204,0.117-0.426,0.183-0.653,0.224c-0.056,0.392-0.095,0.801-0.095,1.231c0,2.412,0.935,4.361,2.088,4.361c0.694,0,1.039-0.71,1.204-1.796c0.163,1.079,0.508,1.796,1.199,1.796c1.146,0,2.09-1.95,2.09-4.361c0-0.542-0.052-1.06-0.139-1.538c0.492,0.472,0.966,0.667,1.418,0.407C29.671,21.305,29.541,19.146,28.374,17.043zM6.906,14.914c1.939,0,3.512-1.573,3.512-3.513c0-1.939-1.573-3.513-3.512-3.513c-1.94,0-3.514,1.573-3.514,3.513C3.392,13.341,4.966,14.914,6.906,14.914zM9.441,21.536c-1.593-0.885-1.739-3.524-0.457-6.354c-0.619,0.346-1.322,0.553-2.078,0.553c-0.956,0-1.832-0.321-2.549-0.846c-0.616,0.513-1.229,1.247-1.733,2.154c-1.167,2.104-1.295,4.262-0.287,4.821c0.451,0.257,0.925,0.064,1.414-0.407c-0.086,0.479-0.136,0.996-0.136,1.538c0,2.412,0.935,4.361,2.088,4.361c0.694,0,1.039-0.71,1.204-1.796c0.165,1.079,0.509,1.796,1.201,1.796c1.146,0,2.089-1.95,2.089-4.361c0-0.432-0.04-0.841-0.097-1.233C9.874,21.721,9.651,21.656,9.441,21.536z")}})},"./src/shape/icon/Phone.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Phone=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Phone",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M22.065,18.53c-0.467-0.29-1.167-0.21-1.556,0.179l-3.093,3.092c-0.389,0.389-1.025,0.389-1.414,0L9.05,14.848c-0.389-0.389-0.389-1.025,0-1.414l2.913-2.912c0.389-0.389,0.447-1.075,0.131-1.524L6.792,1.485C6.476,1.036,5.863,0.948,5.433,1.29c0,0-4.134,3.281-4.134,6.295c0,12.335,10,22.334,22.334,22.334c3.015,0,5.948-5.533,5.948-5.533c0.258-0.486,0.087-1.122-0.38-1.412L22.065,18.53z")}})},"./src/shape/icon/Photo.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Photo=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Photo",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.25,10.25H20.5v-1.5h-9.375v1.5h-3.75c-1.104,0-2,0.896-2,2v10.375c0,1.104,0.896,2,2,2H24.25c1.104,0,2-0.896,2-2V12.25C26.25,11.146,25.354,10.25,24.25,10.25zM15.812,23.499c-3.342,0-6.06-2.719-6.06-6.061c0-3.342,2.718-6.062,6.06-6.062s6.062,2.72,6.062,6.062C21.874,20.78,19.153,23.499,15.812,23.499zM15.812,13.375c-2.244,0-4.062,1.819-4.062,4.062c0,2.244,1.819,4.062,4.062,4.062c2.244,0,4.062-1.818,4.062-4.062C19.875,15.194,18.057,13.375,15.812,13.375z")}})},"./src/shape/icon/Picker.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Picker=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Picker",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M22.221,10.853c-0.111-0.414-0.261-0.412,0.221-1.539l1.66-3.519c0.021-0.051,0.2-0.412,0.192-0.946c0.015-0.529-0.313-1.289-1.119-1.642c-1.172-0.555-1.17-0.557-2.344-1.107c-0.784-0.396-1.581-0.171-1.979,0.179c-0.42,0.333-0.584,0.7-0.609,0.75L16.58,6.545c-0.564,1.084-0.655,0.97-1.048,1.147c-0.469,0.129-1.244,0.558-1.785,1.815c-1.108,2.346-1.108,2.346-1.108,2.346l-0.276,0.586l1.17,0.553l-3.599,7.623c-0.38,0.828-0.166,1.436-0.166,2.032c0.01,0.627-0.077,1.509-0.876,3.21l-0.276,0.586l3.517,1.661l0.276-0.585c0.808-1.699,1.431-2.326,1.922-2.717c0.46-0.381,1.066-0.6,1.465-1.42l3.599-7.618l1.172,0.554l0.279-0.589c0,0,0,0,1.105-2.345C22.578,12.166,22.419,11.301,22.221,10.853zM14.623,22.83c-0.156,0.353-0.413,0.439-1.091,0.955c-0.577,0.448-1.264,1.172-2.009,2.6l-1.191-0.562c0.628-1.48,0.75-2.474,0.73-3.203c-0.031-0.851-0.128-1.104,0.045-1.449l3.599-7.621l3.517,1.662L14.623,22.83z")}})},"./src/shape/icon/Picture.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Picture=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Picture",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M2.5,4.833v22.334h27V4.833H2.5zM25.25,25.25H6.75V6.75h18.5V25.25zM11.25,14c1.426,0,2.583-1.157,2.583-2.583c0-1.427-1.157-2.583-2.583-2.583c-1.427,0-2.583,1.157-2.583,2.583C8.667,12.843,9.823,14,11.25,14zM24.251,16.25l-4.917-4.917l-6.917,6.917L10.5,16.333l-2.752,2.752v5.165h16.503V16.25z")}})},"./src/shape/icon/PieChart.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.PieChart=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.PieChart",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.583,15.917l1.648-10.779C16.692,5.056,16.145,5,15.583,5C9.554,5,4.666,9.888,4.666,15.917c0,6.029,4.888,10.917,10.917,10.917S26.5,21.946,26.5,15.917c0-0.256-0.021-0.507-0.038-0.759L15.583,15.917zM19.437,3.127l-1.648,10.779l10.879-0.759C28.313,8.026,24.436,3.886,19.437,3.127z")}})},"./src/shape/icon/Plane.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Plane=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Plane",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M19.671,8.11l-2.777,2.777l-3.837-0.861c0.362-0.505,0.916-1.683,0.464-2.135c-0.518-0.517-1.979,0.278-2.305,0.604l-0.913,0.913L7.614,8.804l-2.021,2.021l2.232,1.061l-0.082,0.082l1.701,1.701l0.688-0.687l3.164,1.504L9.571,18.21H6.413l-1.137,1.138l3.6,0.948l1.83,1.83l0.947,3.598l1.137-1.137V21.43l3.725-3.725l1.504,3.164l-0.687,0.687l1.702,1.701l0.081-0.081l1.062,2.231l2.02-2.02l-0.604-2.689l0.912-0.912c0.326-0.326,1.121-1.789,0.604-2.306c-0.452-0.452-1.63,0.101-2.135,0.464l-0.861-3.838l2.777-2.777c0.947-0.947,3.599-4.862,2.62-5.839C24.533,4.512,20.618,7.163,19.671,8.11z")}})},"./src/shape/icon/Plugin.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Plugin=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Plugin",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M26.33,15.836l-3.893-1.545l3.136-7.9c0.28-0.705-0.064-1.505-0.771-1.785c-0.707-0.28-1.506,0.065-1.785,0.771l-3.136,7.9l-4.88-1.937l3.135-7.9c0.281-0.706-0.064-1.506-0.77-1.786c-0.706-0.279-1.506,0.065-1.785,0.771l-3.136,7.9L8.554,8.781l-1.614,4.066l2.15,0.854l-2.537,6.391c-0.61,1.54,0.143,3.283,1.683,3.895l1.626,0.646L8.985,26.84c-0.407,1.025,0.095,2.188,1.122,2.596l0.93,0.369c1.026,0.408,2.188-0.095,2.596-1.121l0.877-2.207l1.858,0.737c1.54,0.611,3.284-0.142,3.896-1.682l2.535-6.391l1.918,0.761L26.33,15.836z")}})},"./src/shape/icon/Plus.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Plus=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Plus",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.979,12.896 19.312,12.896 19.312,6.229 12.647,6.229 12.647,12.896 5.979,12.896 5.979,19.562 12.647,19.562 12.647,26.229 19.312,26.229 19.312,19.562 25.979,19.562z")}})},"./src/shape/icon/Power.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Power=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Power",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.542,8.354c-1.47-1.766-2.896-2.617-3.025-2.695c-0.954-0.565-2.181-0.241-2.739,0.724c-0.556,0.961-0.24,2.194,0.705,2.763c0,0,0.001,0,0.002,0.001c0.001,0,0.002,0.001,0.003,0.002c0.001,0,0.003,0.001,0.004,0.001c0.102,0.062,1.124,0.729,2.08,1.925c1.003,1.261,1.933,3.017,1.937,5.438c-0.001,2.519-1.005,4.783-2.64,6.438c-1.637,1.652-3.877,2.668-6.368,2.669c-2.491-0.001-4.731-1.017-6.369-2.669c-1.635-1.654-2.639-3.919-2.64-6.438c0.005-2.499,0.995-4.292,2.035-5.558c0.517-0.625,1.043-1.098,1.425-1.401c0.191-0.152,0.346-0.263,0.445-0.329c0.049-0.034,0.085-0.058,0.104-0.069c0.005-0.004,0.009-0.006,0.012-0.008s0.004-0.002,0.004-0.002l0,0c0.946-0.567,1.262-1.802,0.705-2.763c-0.559-0.965-1.785-1.288-2.739-0.724c-0.128,0.079-1.555,0.93-3.024,2.696c-1.462,1.751-2.974,4.511-2.97,8.157C2.49,23.775,8.315,29.664,15.5,29.667c7.186-0.003,13.01-5.892,13.012-13.155C28.516,12.864,27.005,10.105,25.542,8.354zM15.5,17.523c1.105,0,2.002-0.907,2.002-2.023h-0.001V3.357c0-1.118-0.896-2.024-2.001-2.024s-2.002,0.906-2.002,2.024V15.5C13.498,16.616,14.395,17.523,15.5,17.523z")}})},"./src/shape/icon/Ppt.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Ppt=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Ppt",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16.604,1.914c0-0.575-0.466-1.041-1.041-1.041s-1.041,0.466-1.041,1.041v1.04h2.082V1.914zM16.604,22.717h-2.082v3.207c0,0.574-4.225,4.031-4.225,4.031l2.468-0.003l2.807-2.673l3.013,2.693l2.272-0.039l-4.254-4.011V22.717L16.604,22.717zM28.566,7.113c0.86,0,1.56-0.698,1.56-1.56c0-0.861-0.698-1.56-1.56-1.56H2.561c-0.861,0-1.56,0.699-1.56,1.56c0,0.862,0.699,1.56,1.56,1.56h1.583v12.505l-0.932-0.022c-0.861,0-1.213,0.467-1.213,1.04c0,0.576,0.352,1.041,1.213,1.041h24.597c0.86,0,1.299-0.465,1.299-1.041c0-1.094-1.299-1.04-1.299-1.04l-0.804,0.109V7.113H28.566zM11.435,17.516c-3.771,0-4.194-4.191-4.194-4.191c0-4.096,4.162-4.161,4.162-4.161v4.161h4.193C15.596,17.516,11.435,17.516,11.435,17.516zM18.716,13.388h-1.071v-1.073h1.071V13.388zM18.716,10.267h-1.071V9.194h1.071V10.267zM23.314,13.388H20.26c-0.296,0-0.535-0.24-0.535-0.536c0-0.297,0.239-0.537,0.535-0.537h3.057c0.297,0,0.535,0.24,0.535,0.537C23.852,13.147,23.611,13.388,23.314,13.388zM23.314,10.267H20.26c-0.296,0-0.535-0.239-0.535-0.535c0-0.297,0.239-0.537,0.535-0.537h3.057c0.297,0,0.535,0.24,0.535,0.537C23.852,10.027,23.611,10.267,23.314,10.267z")}})},"./src/shape/icon/Printer.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Printer=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Printer",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.569,12.125h-2.12c-0.207-1.34-1.247-2.759-2.444-3.967c-1.277-1.24-2.654-2.234-3.784-2.37c-0.062-0.008-0.124-0.014-0.198-0.015H8.594c-0.119,0-0.235,0.047-0.319,0.132c-0.083,0.083-0.132,0.2-0.132,0.32v5.9H6.069c-1.104,0-2,0.896-2,2V23h4.074v2.079c0,0.118,0.046,0.23,0.132,0.318c0.086,0.085,0.199,0.131,0.319,0.131h13.445c0.118,0,0.232-0.046,0.318-0.131s0.138-0.199,0.138-0.318V23h4.074v-8.875C26.569,13.021,25.674,12.125,24.569,12.125zM21.589,24.626H9.043V21.5h12.546V24.626zM21.589,13.921c0-0.03,0-0.063-0.003-0.096c-0.015-0.068-0.062-0.135-0.124-0.2H9.043v-6.95h6.987v0.001c0.305-0.019,0.567,0.282,0.769,0.971c0.183,0.655,0.229,1.509,0.229,2.102c0.001,0.433-0.019,0.725-0.019,0.725l-0.037,0.478l0.48,0.005c0.002,0,1.109,0.014,2.196,0.26c1.044,0.226,1.86,0.675,1.938,1.184c0.003,0.045,0.003,0.091,0.003,0.133V13.921z")}})},"./src/shape/icon/Quote.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Quote=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Quote",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M14.505,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.128,0,2.07,0.411,2.826,1.229c0.756,0.82,1.134,1.832,1.134,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.259,0.443-4.327,1.332-6.203c0.888-1.875,2.243-3.57,4.067-5.085c1.824-1.514,2.988-2.272,3.492-2.272c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L14.505,5.873zM27.465,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.104,0,2.04,0.411,2.808,1.229c0.769,0.82,1.152,1.832,1.152,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.284,0.449-4.369,1.35-6.256c0.9-1.887,2.256-3.577,4.068-5.067c1.812-1.49,2.97-2.236,3.474-2.236c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L27.465,5.873z")}})},"./src/shape/icon/Rain.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Rain=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Rain",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.874c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979zM9.029,26.682c0-1.115,0.021-5.425,0.021-5.432c0.002-0.409-0.247-0.779-0.628-0.932c-0.38-0.152-0.815-0.059-1.099,0.24c-0.006,0.008-1.037,1.098-2.081,2.342c-0.523,0.627-1.048,1.287-1.463,1.896c-0.399,0.648-0.753,1.066-0.811,1.885C2.971,28.355,4.324,29.711,6,29.714C7.672,29.71,9.029,28.354,9.029,26.682zM4.971,26.727c0.091-0.349,1.081-1.719,1.993-2.764c0.025-0.029,0.051-0.061,0.076-0.089c-0.005,1.124-0.01,2.294-0.01,2.808c0,0.567-0.461,1.028-1.029,1.03C5.447,27.71,4.997,27.273,4.971,26.727zM16.425,26.682c0-1.115,0.021-5.424,0.021-5.43c0.002-0.41-0.247-0.779-0.628-0.934c-0.381-0.152-0.814-0.058-1.1,0.242c-0.006,0.008-1.035,1.094-2.08,2.342c-0.522,0.623-1.047,1.285-1.463,1.894c-0.399,0.649-0.753,1.068-0.809,1.888c0,1.672,1.354,3.028,3.029,3.028C15.068,29.711,16.425,28.354,16.425,26.682zM12.365,26.729c0.092-0.349,1.081-1.72,1.993-2.765c0.025-0.03,0.05-0.06,0.075-0.089c-0.005,1.123-0.011,2.294-0.011,2.807c-0.002,0.568-0.461,1.027-1.028,1.029C12.84,27.709,12.392,27.273,12.365,26.729zM23.271,20.317c-0.38-0.153-0.816-0.06-1.099,0.24c-0.009,0.008-1.037,1.097-2.08,2.342c-0.523,0.625-1.049,1.285-1.462,1.896c-0.402,0.649-0.754,1.067-0.812,1.886c0,1.672,1.354,3.029,3.03,3.029c1.673,0,3.027-1.357,3.027-3.029c0-1.115,0.022-5.425,0.022-5.431C23.9,20.84,23.651,20.47,23.271,20.317zM21.879,26.681c-0.004,0.568-0.463,1.027-1.031,1.029c-0.553-0.002-1.002-0.438-1.028-0.982c0.092-0.349,1.081-1.72,1.993-2.765c0.025-0.028,0.05-0.059,0.074-0.088C21.883,24.998,21.879,26.167,21.879,26.681z")}})},"./src/shape/icon/Raphael.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Raphael=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Raphael",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M27.777,18.941c0.584-0.881,0.896-1.914,0.896-2.998c0-1.457-0.567-2.826-1.598-3.854l-6.91-6.911l-0.003,0.002c-0.985-0.988-2.35-1.6-3.851-1.6c-1.502,0-2.864,0.612-3.85,1.6H12.46l-6.911,6.911c-1.031,1.029-1.598,2.398-1.598,3.854c0,1.457,0.567,2.826,1.598,3.854l6.231,6.229c0.25,0.281,0.512,0.544,0.789,0.785c1.016,0.961,2.338,1.49,3.743,1.49c1.456,0,2.825-0.565,3.854-1.598l6.723-6.725c0.021-0.019,0.034-0.032,0.051-0.051l0.14-0.138c0.26-0.26,0.487-0.54,0.688-0.838c0.004-0.008,0.01-0.015,0.014-0.021L27.777,18.941zM26.658,15.946c0,0.678-0.197,1.326-0.561,1.879c-0.222,0.298-0.447,0.559-0.684,0.784L25.4,18.625c-1.105,1.052-2.354,1.35-3.414,1.35c-0.584,0-1.109-0.09-1.523-0.195c-2.422-0.608-5.056-2.692-6.261-5.732c0.649,0.274,1.362,0.426,2.11,0.426c2.811,0,5.129-2.141,5.415-4.877l3.924,3.925C26.301,14.167,26.658,15.029,26.658,15.946zM16.312,5.6c1.89,0,3.426,1.538,3.426,3.427c0,1.89-1.536,3.427-3.426,3.427c-1.889,0-3.426-1.537-3.426-3.427C12.886,7.138,14.423,5.6,16.312,5.6zM6.974,18.375c-0.649-0.648-1.007-1.512-1.007-2.429c0-0.917,0.357-1.78,1.007-2.428l2.655-2.656c-0.693,2.359-0.991,4.842-0.831,7.221c0.057,0.854,0.175,1.677,0.345,2.46L6.974,18.375zM11.514,11.592c0.583,4.562,4.195,9.066,8.455,10.143c0.693,0.179,1.375,0.265,2.033,0.265c0.01,0,0.02,0,0.027,0l-3.289,3.289c-0.648,0.646-1.512,1.006-2.428,1.006c-0.638,0-1.248-0.177-1.779-0.5l0.001-0.002c-0.209-0.142-0.408-0.295-0.603-0.461c-0.015-0.019-0.031-0.026-0.046-0.043l-0.665-0.664c-1.367-1.567-2.227-3.903-2.412-6.671C10.669,15.856,10.921,13.673,11.514,11.592")}})},"./src/shape/icon/ReflectH.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ReflectH=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ReflectH",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.57,20.273h0.854v-1.705H15.57V20.273zM15.57,23.686h0.854V21.98H15.57V23.686zM15.57,27.096h0.854v-1.705H15.57V27.096zM15.57,29.689h0.854V28.8H15.57V29.689zM15.57,16.865h0.854V15.16H15.57V16.865zM15.57,3.225h0.854V1.52H15.57V3.225zM15.57,6.635h0.854V4.93H15.57V6.635zM15.57,10.045h0.854V8.34H15.57V10.045zM15.57,13.455h0.854V11.75H15.57V13.455zM18.41,3.327V25.46h12.015L18.41,3.327zM19.264,6.68l9.729,17.93h-9.729V6.68zM13.535,25.46V3.327L1.521,25.46H13.535z")}})},"./src/shape/icon/ReflectV.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ReflectV=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ReflectV",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M20.643,16.008v-0.854h-1.705v0.854H20.643zM24.053,16.008v-0.854h-1.705v0.854H24.053zM27.463,16.008v-0.854h-1.705v0.854H27.463zM30.059,16.008v-0.854h-0.891v0.854H30.059zM17.232,16.008v-0.854h-1.709v0.854H17.232zM3.593,16.008v-0.854H1.888v0.854H3.593zM7.003,16.008v-0.854H5.298v0.854H7.003zM10.414,16.008v-0.854H8.709v0.854H10.414zM13.824,16.008v-0.854h-1.705v0.854H13.824zM3.694,13.167h22.134V1.152L3.694,13.167zM7.048,12.314l17.929-9.729v9.729H7.048zM25.828,18.042H3.694l22.134,12.015V18.042z")}})},"./src/shape/icon/Refresh.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Refresh=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Refresh",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.083,15.5c-0.009,4.739-3.844,8.574-8.583,8.583c-4.741-0.009-8.577-3.844-8.585-8.583c0.008-4.741,3.844-8.577,8.585-8.585c1.913,0,3.665,0.629,5.09,1.686l-1.782,1.783l8.429,2.256l-2.26-8.427l-1.89,1.89c-2.072-1.677-4.717-2.688-7.587-2.688C8.826,3.418,3.418,8.826,3.416,15.5C3.418,22.175,8.826,27.583,15.5,27.583S27.583,22.175,27.583,15.5H24.083z")}})},"./src/shape/icon/Resize2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Resize2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Resize2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M1.999,2.332v26.499H28.5V2.332H1.999zM26.499,26.832H4V12.5h8.167V4.332h14.332V26.832zM15.631,17.649l5.468,5.469l-1.208,1.206l5.482,1.469l-1.47-5.481l-1.195,1.195l-5.467-5.466l1.209-1.208l-5.482-1.469l1.468,5.48L15.631,17.649z")}})},"./src/shape/icon/Rotate.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Rotate=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Rotate",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.5,5.27c1.914,0,3.666,0.629,5.089,1.686l-1.781,1.783l8.428,2.256l-2.26-8.427l-1.889,1.89C21.016,2.781,18.371,1.77,15.5,1.77C8.827,1.773,3.418,7.181,3.417,13.855c0.001,4.063,2.012,7.647,5.084,9.838v-4.887c-0.993-1.4-1.583-3.105-1.585-4.952C6.923,9.114,10.759,5.278,15.5,5.27zM9.5,29.23h12V12.355h-12V29.23z")}})},"./src/shape/icon/Ruler.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Ruler=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Ruler",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M6.63,21.796l-5.122,5.121h25.743V1.175L6.63,21.796zM18.702,10.48c0.186-0.183,0.48-0.183,0.664,0l1.16,1.159c0.184,0.183,0.186,0.48,0.002,0.663c-0.092,0.091-0.213,0.137-0.332,0.137c-0.121,0-0.24-0.046-0.33-0.137l-1.164-1.159C18.519,10.96,18.519,10.664,18.702,10.48zM17.101,12.084c0.184-0.183,0.48-0.183,0.662,0l2.156,2.154c0.184,0.183,0.184,0.48,0.002,0.661c-0.092,0.092-0.213,0.139-0.334,0.139s-0.24-0.046-0.33-0.137l-2.156-2.154C16.917,12.564,16.917,12.267,17.101,12.084zM15.497,13.685c0.184-0.183,0.48-0.183,0.664,0l1.16,1.161c0.184,0.183,0.182,0.48-0.002,0.663c-0.092,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.24-0.046-0.332-0.138l-1.16-1.16C15.314,14.166,15.314,13.868,15.497,13.685zM13.896,15.288c0.184-0.183,0.48-0.181,0.664,0.002l1.158,1.159c0.183,0.184,0.183,0.48,0,0.663c-0.092,0.092-0.212,0.138-0.332,0.138c-0.119,0-0.24-0.046-0.332-0.138l-1.158-1.161C13.713,15.767,13.713,15.471,13.896,15.288zM12.293,16.892c0.183-0.184,0.479-0.184,0.663,0l2.154,2.153c0.184,0.184,0.184,0.481,0,0.665c-0.092,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.242-0.046-0.334-0.138l-2.153-2.155C12.11,17.371,12.11,17.075,12.293,16.892zM10.302,24.515c-0.091,0.093-0.212,0.139-0.332,0.139c-0.119,0-0.238-0.045-0.33-0.137l-2.154-2.153c-0.184-0.183-0.184-0.479,0-0.663s0.479-0.184,0.662,0l2.154,2.153C10.485,24.036,10.485,24.332,10.302,24.515zM10.912,21.918c-0.093,0.093-0.214,0.139-0.333,0.139c-0.12,0-0.24-0.045-0.33-0.137l-1.162-1.161c-0.184-0.183-0.184-0.479,0-0.66c0.184-0.185,0.48-0.187,0.664-0.003l1.161,1.162C11.095,21.438,11.095,21.735,10.912,21.918zM12.513,20.316c-0.092,0.092-0.211,0.138-0.332,0.138c-0.119,0-0.239-0.046-0.331-0.138l-1.159-1.16c-0.184-0.184-0.184-0.48,0-0.664s0.48-0.182,0.663,0.002l1.159,1.161C12.696,19.838,12.696,20.135,12.513,20.316zM22.25,21.917h-8.67l8.67-8.67V21.917zM22.13,10.7c-0.09,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.242-0.046-0.334-0.138l-1.16-1.159c-0.184-0.183-0.184-0.479,0-0.663c0.182-0.183,0.479-0.183,0.662,0l1.16,1.159C22.312,10.221,22.313,10.517,22.13,10.7zM24.726,10.092c-0.092,0.092-0.213,0.137-0.332,0.137s-0.24-0.045-0.33-0.137l-2.154-2.154c-0.184-0.183-0.184-0.481,0-0.664s0.482-0.181,0.664,0.002l2.154,2.154C24.911,9.613,24.909,9.91,24.726,10.092z")}})},"./src/shape/icon/Run.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Run=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Run",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M17.41,20.395l-0.778-2.723c0.228-0.2,0.442-0.414,0.644-0.643l2.721,0.778c0.287-0.418,0.534-0.862,0.755-1.323l-2.025-1.96c0.097-0.288,0.181-0.581,0.241-0.883l2.729-0.684c0.02-0.252,0.039-0.505,0.039-0.763s-0.02-0.51-0.039-0.762l-2.729-0.684c-0.061-0.302-0.145-0.595-0.241-0.883l2.026-1.96c-0.222-0.46-0.469-0.905-0.756-1.323l-2.721,0.777c-0.201-0.228-0.416-0.442-0.644-0.643l0.778-2.722c-0.418-0.286-0.863-0.534-1.324-0.755l-1.96,2.026c-0.287-0.097-0.581-0.18-0.883-0.241l-0.683-2.73c-0.253-0.019-0.505-0.039-0.763-0.039s-0.51,0.02-0.762,0.039l-0.684,2.73c-0.302,0.061-0.595,0.144-0.883,0.241l-1.96-2.026C7.048,3.463,6.604,3.71,6.186,3.997l0.778,2.722C6.736,6.919,6.521,7.134,6.321,7.361L3.599,6.583C3.312,7.001,3.065,7.446,2.844,7.907l2.026,1.96c-0.096,0.288-0.18,0.581-0.241,0.883l-2.73,0.684c-0.019,0.252-0.039,0.505-0.039,0.762s0.02,0.51,0.039,0.763l2.73,0.684c0.061,0.302,0.145,0.595,0.241,0.883l-2.026,1.96c0.221,0.46,0.468,0.905,0.755,1.323l2.722-0.778c0.2,0.229,0.415,0.442,0.643,0.643l-0.778,2.723c0.418,0.286,0.863,0.533,1.323,0.755l1.96-2.026c0.288,0.097,0.581,0.181,0.883,0.241l0.684,2.729c0.252,0.02,0.505,0.039,0.763,0.039s0.51-0.02,0.763-0.039l0.683-2.729c0.302-0.061,0.596-0.145,0.883-0.241l1.96,2.026C16.547,20.928,16.992,20.681,17.41,20.395zM11.798,15.594c-1.877,0-3.399-1.522-3.399-3.399s1.522-3.398,3.399-3.398s3.398,1.521,3.398,3.398S13.675,15.594,11.798,15.594zM27.29,22.699c0.019-0.547-0.06-1.104-0.23-1.654l1.244-1.773c-0.188-0.35-0.4-0.682-0.641-0.984l-2.122,0.445c-0.428-0.364-0.915-0.648-1.436-0.851l-0.611-2.079c-0.386-0.068-0.777-0.105-1.173-0.106l-0.974,1.936c-0.279,0.054-0.558,0.128-0.832,0.233c-0.257,0.098-0.497,0.22-0.727,0.353L17.782,17.4c-0.297,0.262-0.568,0.545-0.813,0.852l0.907,1.968c-0.259,0.495-0.437,1.028-0.519,1.585l-1.891,1.06c0.019,0.388,0.076,0.776,0.164,1.165l2.104,0.519c0.231,0.524,0.541,0.993,0.916,1.393l-0.352,2.138c0.32,0.23,0.66,0.428,1.013,0.6l1.715-1.32c0.536,0.141,1.097,0.195,1.662,0.15l1.452,1.607c0.2-0.057,0.399-0.118,0.596-0.193c0.175-0.066,0.34-0.144,0.505-0.223l0.037-2.165c0.455-0.339,0.843-0.747,1.152-1.206l2.161-0.134c0.152-0.359,0.279-0.732,0.368-1.115L27.29,22.699zM23.127,24.706c-1.201,0.458-2.545-0.144-3.004-1.345s0.143-2.546,1.344-3.005c1.201-0.458,2.547,0.144,3.006,1.345C24.931,22.902,24.328,24.247,23.127,24.706z")}})},"./src/shape/icon/Rw.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Rw=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Rw",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M5.5,15.499,15.8,21.447,15.8,15.846,25.5,21.447,25.5,9.552,15.8,15.152,15.8,9.552z")}})},"./src/shape/icon/Safari.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Safari=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Safari",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16.154,5.135c-0.504,0-1,0.031-1.488,0.089l-0.036-0.18c-0.021-0.104-0.06-0.198-0.112-0.283c0.381-0.308,0.625-0.778,0.625-1.306c0-0.927-0.751-1.678-1.678-1.678s-1.678,0.751-1.678,1.678c0,0.745,0.485,1.376,1.157,1.595c-0.021,0.105-0.021,0.216,0,0.328l0.033,0.167C7.645,6.95,3.712,11.804,3.712,17.578c0,6.871,5.571,12.441,12.442,12.441c6.871,0,12.441-5.57,12.441-12.441C28.596,10.706,23.025,5.135,16.154,5.135zM16.369,8.1c4.455,0,8.183,3.116,9.123,7.287l-0.576,0.234c-0.148-0.681-0.755-1.191-1.48-1.191c-0.837,0-1.516,0.679-1.516,1.516c0,0.075,0.008,0.148,0.018,0.221l-2.771-0.028c-0.054-0.115-0.114-0.226-0.182-0.333l3.399-5.11l0.055-0.083l-4.766,4.059c-0.352-0.157-0.74-0.248-1.148-0.256l0.086-0.018l-1.177-2.585c0.64-0.177,1.111-0.763,1.111-1.459c0-0.837-0.678-1.515-1.516-1.515c-0.075,0-0.147,0.007-0.219,0.018l0.058-0.634C15.357,8.141,15.858,8.1,16.369,8.1zM12.146,3.455c0-0.727,0.591-1.318,1.318-1.318c0.727,0,1.318,0.591,1.318,1.318c0,0.425-0.203,0.802-0.516,1.043c-0.183-0.123-0.413-0.176-0.647-0.13c-0.226,0.045-0.413,0.174-0.535,0.349C12.542,4.553,12.146,4.049,12.146,3.455zM7.017,17.452c0-4.443,3.098-8.163,7.252-9.116l0.297,0.573c-0.61,0.196-1.051,0.768-1.051,1.442c0,0.837,0.678,1.516,1.515,1.516c0.068,0,0.135-0.006,0.2-0.015l-0.058,2.845l0.052-0.011c-0.442,0.204-0.824,0.513-1.116,0.895l0.093-0.147l-1.574-0.603l1.172,1.239l0.026-0.042c-0.19,0.371-0.306,0.788-0.324,1.229l-0.003-0.016l-2.623,1.209c-0.199-0.604-0.767-1.041-1.438-1.041c-0.837,0-1.516,0.678-1.516,1.516c0,0.064,0.005,0.128,0.013,0.191l-0.783-0.076C7.063,18.524,7.017,17.994,7.017,17.452zM16.369,26.805c-4.429,0-8.138-3.078-9.106-7.211l0.691-0.353c0.146,0.686,0.753,1.2,1.482,1.2c0.837,0,1.515-0.679,1.515-1.516c0-0.105-0.011-0.207-0.031-0.307l2.858,0.03c0.045,0.095,0.096,0.187,0.15,0.276l-3.45,5.277l0.227-0.195l4.529-3.92c0.336,0.153,0.705,0.248,1.094,0.266l-0.019,0.004l1.226,2.627c-0.655,0.166-1.142,0.76-1.142,1.468c0,0.837,0.678,1.515,1.516,1.515c0.076,0,0.151-0.007,0.225-0.018l0.004,0.688C17.566,26.746,16.975,26.805,16.369,26.805zM18.662,26.521l-0.389-0.6c0.661-0.164,1.152-0.759,1.152-1.47c0-0.837-0.68-1.516-1.516-1.516c-0.066,0-0.13,0.005-0.193,0.014v-2.86l-0.025,0.004c0.409-0.185,0.77-0.459,1.055-0.798l1.516,0.659l-1.104-1.304c0.158-0.335,0.256-0.704,0.278-1.095l2.552-1.164c0.19,0.618,0.766,1.068,1.447,1.068c0.838,0,1.516-0.679,1.516-1.516c0-0.069-0.006-0.137-0.016-0.204l0.65,0.12c0.089,0.517,0.136,1.049,0.136,1.591C25.722,21.826,22.719,25.499,18.662,26.521z")}})},"./src/shape/icon/ScrewDriver.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ScrewDriver=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ScrewDriver",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M19.387,14.373c2.119-2.619,5.322-6.77,5.149-7.75c-0.128-0.729-0.882-1.547-1.763-2.171c-0.883-0.625-1.916-1.044-2.645-0.915c-0.98,0.173-3.786,4.603-5.521,7.49c-0.208,0.344,0.328,1.177,0.156,1.468c-0.172,0.292-1.052,0.042-1.18,0.261c-0.263,0.451-0.417,0.722-0.417,0.722s-0.553,0.823,1.163,2.163l-5.233,7.473c-0.267,0.381-1.456,0.459-1.456,0.459l-1.184,3.312l0.859,0.602l2.708-2.246c0,0-0.334-1.143-0.068-1.523l5.242-7.489c1.719,1,2.377,0.336,2.377,0.336s0.201-0.238,0.536-0.639c0.161-0.194-0.374-0.936-0.159-1.197C18.169,14.467,19.133,14.685,19.387,14.373z")}})},"./src/shape/icon/Search.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Search=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Search",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z")}})},"./src/shape/icon/Sencha.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Sencha=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Sencha",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M18.265,22.734c1.365,0.662,2.309,2.062,2.309,3.682c0,1.566-0.881,2.928-2.176,3.615l1.922-0.98c3.16-1.58,5.332-4.846,5.332-8.617c0-3.719-2.109-6.945-5.195-8.547l-6.272-3.144c-1.366-0.662-2.308-2.062-2.308-3.682c0-1.567,0.881-2.928,2.175-3.614L12.13,2.428c-3.161,1.578-5.332,4.843-5.332,8.616c0,3.718,2.108,6.944,5.195,8.546L18.265,22.734z")}})},"./src/shape/icon/Settings.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Settings=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Settings",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16.015,12.03c-2.156,0-3.903,1.747-3.903,3.903c0,2.155,1.747,3.903,3.903,3.903c0.494,0,0.962-0.102,1.397-0.27l0.836,1.285l1.359-0.885l-0.831-1.276c0.705-0.706,1.142-1.681,1.142-2.757C19.918,13.777,18.171,12.03,16.015,12.03zM16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM26.174,20.809c-0.241,0.504-0.513,0.99-0.826,1.45L22.19,21.58c-0.481,0.526-1.029,0.994-1.634,1.385l0.119,3.202c-0.507,0.23-1.028,0.421-1.569,0.57l-1.955-2.514c-0.372,0.051-0.75,0.086-1.136,0.086c-0.356,0-0.706-0.029-1.051-0.074l-1.945,2.5c-0.541-0.151-1.065-0.342-1.57-0.569l0.117-3.146c-0.634-0.398-1.208-0.88-1.712-1.427L6.78,22.251c-0.313-0.456-0.583-0.944-0.826-1.448l2.088-2.309c-0.226-0.703-0.354-1.451-0.385-2.223l-2.768-1.464c0.055-0.563,0.165-1.107,0.301-1.643l3.084-0.427c0.29-0.702,0.675-1.352,1.135-1.942L8.227,7.894c0.399-0.389,0.83-0.744,1.283-1.07l2.663,1.672c0.65-0.337,1.349-0.593,2.085-0.75l0.968-3.001c0.278-0.021,0.555-0.042,0.837-0.042c0.282,0,0.56,0.022,0.837,0.042l0.976,3.028c0.72,0.163,1.401,0.416,2.036,0.75l2.704-1.697c0.455,0.326,0.887,0.681,1.285,1.07l-1.216,2.986c0.428,0.564,0.793,1.181,1.068,1.845l3.185,0.441c0.135,0.535,0.247,1.081,0.302,1.643l-2.867,1.516c-0.034,0.726-0.15,1.43-0.355,2.1L26.174,20.809z")}})},"./src/shape/icon/SettingsAlt.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.SettingsAlt=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.SettingsAlt",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM24.386,14.968c-1.451,1.669-3.706,2.221-5.685,1.586l-7.188,8.266c-0.766,0.88-2.099,0.97-2.979,0.205s-0.973-2.099-0.208-2.979l7.198-8.275c-0.893-1.865-0.657-4.164,0.787-5.824c1.367-1.575,3.453-2.151,5.348-1.674l-2.754,3.212l0.901,2.621l2.722,0.529l2.761-3.22C26.037,11.229,25.762,13.387,24.386,14.968z")}})},"./src/shape/icon/Shuffle.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Shuffle=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Shuffle",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.786,20.654c-0.618-0.195-1.407-0.703-2.291-1.587c-0.757-0.742-1.539-1.698-2.34-2.741c-0.191,0.256-0.382,0.51-0.574,0.77c-0.524,0.709-1.059,1.424-1.604,2.127c1.904,2.31,3.88,4.578,6.809,4.952v2.701l7.556-4.362l-7.556-4.362V20.654zM9.192,11.933c0.756,0.741,1.538,1.697,2.339,2.739c0.195-0.262,0.39-0.521,0.587-0.788c0.52-0.703,1.051-1.412,1.592-2.11c-2.032-2.463-4.133-4.907-7.396-5.025h-3.5v3.5h3.5C6.969,10.223,7.996,10.735,9.192,11.933zM21.786,10.341v2.535l7.556-4.363l-7.556-4.363v2.647c-1.904,0.219-3.425,1.348-4.751,2.644c-2.196,2.183-4.116,5.167-6.011,7.538c-1.867,2.438-3.741,3.888-4.712,3.771h-3.5v3.5h3.5c2.185-0.029,3.879-1.266,5.34-2.693c2.194-2.184,4.116-5.167,6.009-7.538C19.205,12.003,20.746,10.679,21.786,10.341z")}})},"./src/shape/icon/Skull.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Skull=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Skull",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.947,11.14c0-5.174-3.979-9.406-10.613-9.406c-6.633,0-10.282,4.232-10.282,9.406c0,5.174,1.459,4.511,1.459,7.43c0,1.095-1.061,0.564-1.061,2.919c0,2.587,3.615,2.223,4.677,3.283c1.061,1.062,0.961,3.019,0.961,3.019s0.199,0.796,0.564,0.563c0,0,0.232,0.564,0.498,0.232c0,0,0.265,0.563,0.531,0.1c0,0,0.265,0.631,0.696,0.166c0,0,0.431,0.63,0.929,0.133c0,0,0.564,0.53,1.194,0.133c0.63,0.397,1.194-0.133,1.194-0.133c0.497,0.497,0.929-0.133,0.929-0.133c0.432,0.465,0.695-0.166,0.695-0.166c0.268,0.464,0.531-0.1,0.531-0.1c0.266,0.332,0.498-0.232,0.498-0.232c0.365,0.232,0.564-0.563,0.564-0.563s-0.1-1.957,0.961-3.019c1.062-1.061,4.676-0.696,4.676-3.283c0-2.354-1.061-1.824-1.061-2.919C24.488,15.651,25.947,16.314,25.947,11.14zM10.333,20.992c-1.783,0.285-2.59-0.215-2.785-1.492c-0.508-3.328,2.555-3.866,4.079-3.683c0.731,0.088,1.99,0.862,1.99,1.825C13.617,20.229,11.992,20.727,10.333,20.992zM16.461,25.303c-0.331,0-0.862-0.431-0.895-1.227c-0.033,0.796-0.63,1.227-0.961,1.227c-0.332,0-0.83-0.331-0.863-1.127c-0.033-0.796,1.028-4.013,1.792-4.013c0.762,0,1.824,3.217,1.791,4.013S16.794,25.303,16.461,25.303zM23.361,19.5c-0.195,1.277-1.004,1.777-2.787,1.492c-1.658-0.266-3.283-0.763-3.283-3.35c0-0.963,1.258-1.737,1.99-1.825C20.805,15.634,23.869,16.172,23.361,19.5z")}})},"./src/shape/icon/Skype.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Skype=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Skype",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.777,18.438c0.209-0.948,0.318-1.934,0.318-2.944c0-7.578-6.144-13.722-13.724-13.722c-0.799,0-1.584,0.069-2.346,0.2C11.801,1.199,10.35,0.75,8.793,0.75c-4.395,0-7.958,3.562-7.958,7.958c0,1.47,0.399,2.845,1.094,4.024c-0.183,0.893-0.277,1.814-0.277,2.76c0,7.58,6.144,13.723,13.722,13.723c0.859,0,1.699-0.078,2.515-0.23c1.119,0.604,2.399,0.945,3.762,0.945c4.395,0,7.957-3.562,7.957-7.959C29.605,20.701,29.309,19.502,28.777,18.438zM22.412,22.051c-0.635,0.898-1.573,1.609-2.789,2.115c-1.203,0.5-2.646,0.754-4.287,0.754c-1.971,0-3.624-0.346-4.914-1.031C9.5,23.391,8.74,22.717,8.163,21.885c-0.583-0.842-0.879-1.676-0.879-2.479c0-0.503,0.192-0.939,0.573-1.296c0.375-0.354,0.857-0.532,1.432-0.532c0.471,0,0.878,0.141,1.209,0.422c0.315,0.269,0.586,0.662,0.805,1.174c0.242,0.558,0.508,1.027,0.788,1.397c0.269,0.355,0.656,0.656,1.151,0.89c0.497,0.235,1.168,0.354,1.992,0.354c1.135,0,2.064-0.241,2.764-0.721c0.684-0.465,1.016-1.025,1.016-1.711c0-0.543-0.173-0.969-0.529-1.303c-0.373-0.348-0.865-0.621-1.465-0.807c-0.623-0.195-1.47-0.404-2.518-0.623c-1.424-0.306-2.634-0.668-3.596-1.076c-0.984-0.419-1.777-1-2.357-1.727c-0.59-0.736-0.889-1.662-0.889-2.75c0-1.036,0.314-1.971,0.933-2.776c0.613-0.8,1.51-1.423,2.663-1.849c1.139-0.422,2.494-0.635,4.027-0.635c1.225,0,2.303,0.141,3.201,0.421c0.904,0.282,1.668,0.662,2.267,1.13c0.604,0.472,1.054,0.977,1.335,1.5c0.284,0.529,0.43,1.057,0.43,1.565c0,0.49-0.189,0.937-0.563,1.324c-0.375,0.391-0.851,0.589-1.408,0.589c-0.509,0-0.905-0.124-1.183-0.369c-0.258-0.227-0.523-0.58-0.819-1.09c-0.342-0.65-0.756-1.162-1.229-1.523c-0.463-0.351-1.232-0.529-2.292-0.529c-0.984,0-1.784,0.197-2.379,0.588c-0.572,0.375-0.85,0.805-0.85,1.314c0,0.312,0.09,0.574,0.273,0.799c0.195,0.238,0.471,0.447,0.818,0.621c0.36,0.182,0.732,0.326,1.104,0.429c0.382,0.106,1.021,0.263,1.899,0.466c1.11,0.238,2.131,0.506,3.034,0.793c0.913,0.293,1.703,0.654,2.348,1.072c0.656,0.429,1.178,0.979,1.547,1.635c0.369,0.658,0.558,1.471,0.558,2.416C23.371,20.119,23.049,21.148,22.412,22.051z")}})},"./src/shape/icon/SlideShare.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.SlideShare=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.SlideShare",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.952,12.795c-0.956,1.062-5.073,2.409-5.604,2.409h-4.513c-0.749,0-1.877,0.147-2.408,0.484c0.061,0.054,0.122,0.108,0.181,0.163c0.408,0.379,1.362,0.913,2.206,0.913c0.397,0,0.723-0.115,1-0.354c1.178-1.007,1.79-1.125,2.145-1.125c0.421,0,0.783,0.193,0.996,0.531c0.4,0.626,0.106,1.445-0.194,2.087c-0.718,1.524-3.058,3.171-5.595,3.171c-0.002,0-0.002,0-0.004,0c-0.354,0-0.701-0.033-1.033-0.099v3.251c0,0.742,1.033,2.533,4.167,2.533s3.955-3.701,3.955-4.338v-4.512c2.23-1.169,4.512-1.805,5.604-3.895C30.882,12.05,29.907,11.733,28.952,12.795zM21.942,17.521c0.796-1.699-0.053-1.699-1.54-0.425s-3.665,0.105-4.408-0.585c-0.743-0.689-1.486-1.22-2.814-1.167c-1.328,0.053-4.46-0.161-6.267-0.585c-1.805-0.425-4.895-3-5.15-2.335c-0.266,0.69,0.211,1.168,1.168,2.335c0.955,1.169,5.075,2.778,5.075,2.778s0,3.453,0,4.886c0,1.435,2.973,3.61,4.512,3.61s2.708-1.062,2.708-1.806v-4.512C17.775,21.045,21.146,19.221,21.942,17.521zM20.342,13.73c1.744,0,3.159-1.414,3.159-3.158c0-1.745-1.415-3.159-3.159-3.159s-3.158,1.414-3.158,3.159C17.184,12.316,18.598,13.73,20.342,13.73zM12.019,13.73c1.744,0,3.158-1.414,3.158-3.158c0-1.745-1.414-3.159-3.158-3.159c-1.745,0-3.159,1.414-3.159,3.159C8.86,12.316,10.273,13.73,12.019,13.73z")}})},"./src/shape/icon/Smile.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Smile=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Smile",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM20.729,7.375c0.934,0,1.688,1.483,1.688,3.312S21.661,14,20.729,14c-0.932,0-1.688-1.483-1.688-3.312S19.798,7.375,20.729,7.375zM11.104,7.375c0.932,0,1.688,1.483,1.688,3.312S12.037,14,11.104,14s-1.688-1.483-1.688-3.312S10.172,7.375,11.104,7.375zM16.021,26c-2.873,0-5.563-1.757-7.879-4.811c2.397,1.564,5.021,2.436,7.774,2.436c2.923,0,5.701-0.98,8.215-2.734C21.766,24.132,18.99,26,16.021,26z")}})},"./src/shape/icon/Smile2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Smile2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Smile2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM16,29.534C8.539,29.534,2.466,23.462,2.466,16C2.466,8.539,8.539,2.466,16,2.466c7.462,0,13.535,6.072,13.535,13.533C29.534,23.462,23.462,29.534,16,29.534zM11.104,14c0.932,0,1.688-1.483,1.688-3.312s-0.755-3.312-1.688-3.312s-1.688,1.483-1.688,3.312S10.172,14,11.104,14zM20.729,14c0.934,0,1.688-1.483,1.688-3.312s-0.756-3.312-1.688-3.312c-0.932,0-1.688,1.483-1.688,3.312S19.798,14,20.729,14zM8.143,21.189C10.458,24.243,13.148,26,16.021,26c2.969,0,5.745-1.868,8.11-5.109c-2.515,1.754-5.292,2.734-8.215,2.734C13.164,23.625,10.54,22.756,8.143,21.189z")}})},"./src/shape/icon/Snow.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Snow=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Snow",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM16.667,24.09l1.119-1.119c0.389-0.391,0.389-1.025,0-1.416c-0.392-0.391-1.025-0.391-1.415,0l-1.119,1.119l-1.119-1.119c-0.391-0.391-1.025-0.391-1.415,0c-0.391,0.391-0.391,1.025,0,1.416l1.118,1.117l-1.12,1.121c-0.389,0.393-0.389,1.021,0,1.414c0.195,0.188,0.451,0.293,0.707,0.293c0.256,0,0.512-0.104,0.708-0.293l1.12-1.119l1.12,1.119c0.195,0.188,0.451,0.293,0.708,0.293c0.256,0,0.512-0.104,0.707-0.293c0.391-0.396,0.391-1.021,0-1.414L16.667,24.09zM25.119,21.817c-0.393-0.392-1.025-0.392-1.415,0l-1.12,1.121l-1.12-1.121c-0.391-0.392-1.022-0.392-1.414,0c-0.39,0.392-0.39,1.022,0,1.416l1.119,1.119l-1.119,1.119c-0.39,0.391-0.39,1.022,0,1.413c0.195,0.195,0.451,0.294,0.707,0.294c0.257,0,0.513-0.099,0.707-0.294l1.12-1.118l1.12,1.118c0.194,0.195,0.45,0.294,0.707,0.294c0.256,0,0.513-0.099,0.708-0.294c0.389-0.391,0.389-1.022,0-1.413l-1.12-1.119l1.12-1.119C25.507,22.842,25.507,22.209,25.119,21.817zM9.334,23.953l1.119-1.119c0.389-0.394,0.389-1.021,0-1.414c-0.391-0.394-1.025-0.394-1.415,0l-1.119,1.119l-1.12-1.121c-0.391-0.39-1.023-0.39-1.415,0c-0.391,0.396-0.391,1.024,0,1.418l1.119,1.117l-1.12,1.118c-0.391,0.394-0.391,1.025,0,1.414c0.196,0.195,0.452,0.293,0.708,0.293c0.256,0,0.511-0.098,0.707-0.293l1.12-1.119l1.121,1.121c0.195,0.195,0.451,0.293,0.707,0.293s0.513-0.098,0.708-0.293c0.389-0.391,0.389-1.022,0-1.416L9.334,23.953z")}})},"./src/shape/icon/Split.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Split=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Split",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.786,20.698c-1.792-0.237-2.912-1.331-4.358-2.886c-0.697-0.751-1.428-1.577-2.324-2.319c1.396-1.165,2.411-2.519,3.483-3.503c1.01-0.92,1.901-1.519,3.199-1.688v2.574l7.556-4.363L21.786,4.15v2.652c-3.34,0.266-5.45,2.378-6.934,4.013c-0.819,0.896-1.537,1.692-2.212,2.192c-0.685,0.501-1.227,0.731-2.013,0.742c-0.001,0-0.002,0-0.003,0H2.812v3.5h0.001v0.001c0,0,0.046-0.001,0.136-0.001h7.677c0.786,0.011,1.33,0.241,2.017,0.743c1.021,0.743,2.095,2.181,3.552,3.568c1.312,1.258,3.162,2.46,5.592,2.649v2.664l7.556-4.36l-7.556-4.361V20.698z")}})},"./src/shape/icon/Star.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Star=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Star",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,22.375L7.116,28.83l3.396-10.438l-8.883-6.458l10.979,0.002L16.002,1.5l3.391,10.434h10.981l-8.886,6.457l3.396,10.439L16,22.375L16,22.375z")}})},"./src/shape/icon/Star2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Star2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Star2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M14.615,4.928c0.487-0.986,1.284-0.986,1.771,0l2.249,4.554c0.486,0.986,1.775,1.923,2.864,2.081l5.024,0.73c1.089,0.158,1.335,0.916,0.547,1.684l-3.636,3.544c-0.788,0.769-1.28,2.283-1.095,3.368l0.859,5.004c0.186,1.085-0.459,1.553-1.433,1.041l-4.495-2.363c-0.974-0.512-2.567-0.512-3.541,0l-4.495,2.363c-0.974,0.512-1.618,0.044-1.432-1.041l0.858-5.004c0.186-1.085-0.307-2.6-1.094-3.368L3.93,13.977c-0.788-0.768-0.542-1.525,0.547-1.684l5.026-0.73c1.088-0.158,2.377-1.095,2.864-2.081L14.615,4.928z")}})},"./src/shape/icon/Star2Off.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Star2Off=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Star2Off",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M26.522,12.293l-5.024-0.73c-1.089-0.158-2.378-1.095-2.864-2.081l-2.249-4.554c-0.487-0.986-1.284-0.986-1.771,0l-2.247,4.554c-0.487,0.986-1.776,1.923-2.864,2.081l-5.026,0.73c-1.088,0.158-1.334,0.916-0.547,1.684l3.637,3.544c0.788,0.769,1.28,2.283,1.094,3.368l-0.858,5.004c-0.186,1.085,0.458,1.553,1.432,1.041l4.495-2.363c0.974-0.512,2.566-0.512,3.541,0l4.495,2.363c0.974,0.512,1.618,0.044,1.433-1.041l-0.859-5.004c-0.186-1.085,0.307-2.6,1.095-3.368l3.636-3.544C27.857,13.209,27.611,12.452,26.522,12.293zM22.037,16.089c-1.266,1.232-1.966,3.394-1.67,5.137l0.514,2.984l-2.679-1.409c-0.757-0.396-1.715-0.612-2.702-0.612s-1.945,0.216-2.7,0.61l-2.679,1.409l0.511-2.982c0.297-1.743-0.404-3.905-1.671-5.137l-2.166-2.112l2.995-0.435c1.754-0.255,3.592-1.591,4.373-3.175L15.5,7.652l1.342,2.716c0.781,1.583,2.617,2.92,4.369,3.173l2.992,0.435L22.037,16.089z")}})},"./src/shape/icon/Star3.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Star3=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Star3",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M22.441,28.181c-0.419,0-0.835-0.132-1.189-0.392l-5.751-4.247L9.75,27.789c-0.354,0.26-0.771,0.392-1.189,0.392c-0.412,0-0.824-0.128-1.175-0.384c-0.707-0.511-1-1.422-0.723-2.25l2.26-6.783l-5.815-4.158c-0.71-0.509-1.009-1.416-0.74-2.246c0.268-0.826,1.037-1.382,1.904-1.382c0.004,0,0.01,0,0.014,0l7.15,0.056l2.157-6.816c0.262-0.831,1.035-1.397,1.906-1.397s1.645,0.566,1.906,1.397l2.155,6.816l7.15-0.056c0.004,0,0.01,0,0.015,0c0.867,0,1.636,0.556,1.903,1.382c0.271,0.831-0.028,1.737-0.739,2.246l-5.815,4.158l2.263,6.783c0.276,0.826-0.017,1.737-0.721,2.25C23.268,28.053,22.854,28.181,22.441,28.181L22.441,28.181z")}})},"./src/shape/icon/Star3Off.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Star3Off=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Star3Off",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M28.631,12.359c-0.268-0.826-1.036-1.382-1.903-1.382h-0.015l-7.15,0.056l-2.155-6.816c-0.262-0.831-1.035-1.397-1.906-1.397s-1.645,0.566-1.906,1.397l-2.157,6.816l-7.15-0.056H4.273c-0.868,0-1.636,0.556-1.904,1.382c-0.27,0.831,0.029,1.737,0.74,2.246l5.815,4.158l-2.26,6.783c-0.276,0.828,0.017,1.739,0.723,2.25c0.351,0.256,0.763,0.384,1.175,0.384c0.418,0,0.834-0.132,1.189-0.392l5.751-4.247l5.751,4.247c0.354,0.26,0.771,0.392,1.189,0.392c0.412,0,0.826-0.128,1.177-0.384c0.704-0.513,0.997-1.424,0.721-2.25l-2.263-6.783l5.815-4.158C28.603,14.097,28.901,13.19,28.631,12.359zM19.712,17.996l2.729,8.184l-6.94-5.125L8.56,26.18l2.729-8.184l-7.019-5.018l8.627,0.066L15.5,4.82l2.603,8.225l8.627-0.066L19.712,17.996z")}})},"./src/shape/icon/StarOff.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.StarOff=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.StarOff",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,22.375L7.116,28.83l3.396-10.438l-8.883-6.458l10.979,0.002L16.002,1.5l3.391,10.434h10.981l-8.886,6.457l3.396,10.439L16,22.375L16,22.375zM22.979,26.209l-2.664-8.205l6.979-5.062h-8.627L16,4.729l-2.666,8.206H4.708l6.979,5.07l-2.666,8.203L16,21.146L22.979,26.209L22.979,26.209z")}})},"./src/shape/icon/Start.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Start=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Start",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z")}})},"./src/shape/icon/Sticker.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Sticker=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Sticker",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.5,1.999c-1.042,0-1.916,0.377-2.57,1.088L2.895,13.138C2.302,13.784,1.999,14.58,1.999,15.5C1.999,22.943,8.057,29,15.5,29S29,22.943,29,15.5S22.943,1.999,15.5,1.999zM15.5,28C8.596,28,3,22.404,3,15.5c0-3.452,5.239-2.737,7.501-4.999C12.762,8.239,12.048,3,15.5,3C22.404,3,28,8.597,28,15.5S22.404,28,15.5,28z")}})},"./src/shape/icon/Stop.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Stop=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Stop",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M5.5,5.5h20v20h-20z")}})},"./src/shape/icon/StopWatch.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.StopWatch=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.StopWatch",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M27.216,18.533c0-3.636-1.655-6.883-4.253-9.032l0.733-0.998l0.482,0.354c0.198,0.146,0.481,0.104,0.628-0.097l0.442-0.604c0.146-0.198,0.103-0.482-0.097-0.628l-2.052-1.506c-0.199-0.146-0.481-0.103-0.628,0.097L22.03,6.724c-0.146,0.199-0.104,0.482,0.096,0.628l0.483,0.354l-0.736,1.003c-1.28-0.834-2.734-1.419-4.296-1.699c0.847-0.635,1.402-1.638,1.403-2.778h-0.002c0-1.922-1.557-3.48-3.479-3.48c-1.925,0-3.48,1.559-3.48,3.48c0,1.141,0.556,2.144,1.401,2.778c-1.549,0.277-2.99,0.857-4.265,1.68L8.424,7.684l0.484-0.353c0.198-0.145,0.245-0.428,0.098-0.628l-0.44-0.604C8.42,5.899,8.136,5.855,7.937,6.001L5.881,7.5c-0.2,0.146-0.243,0.428-0.099,0.628l0.442,0.604c0.145,0.2,0.428,0.244,0.627,0.099l0.483-0.354l0.729,0.999c-2.615,2.149-4.282,5.407-4.282,9.057c0,6.471,5.245,11.716,11.718,11.716c6.47,0,11.716-5.243,11.718-11.716H27.216zM12.918,4.231c0.002-1.425,1.155-2.58,2.582-2.582c1.426,0.002,2.579,1.157,2.581,2.582c-0.002,1.192-0.812,2.184-1.908,2.482v-1.77h0.6c0.246,0,0.449-0.203,0.449-0.449V3.746c0-0.247-0.203-0.449-0.449-0.449h-2.545c-0.247,0-0.449,0.202-0.449,0.449v0.749c0,0.246,0.202,0.449,0.449,0.449h0.599v1.77C13.729,6.415,12.919,5.424,12.918,4.231zM15.5,27.554c-4.983-0.008-9.015-4.038-9.022-9.021c0.008-4.982,4.039-9.013,9.022-9.022c4.981,0.01,9.013,4.04,9.021,9.022C24.513,23.514,20.481,27.546,15.5,27.554zM15.5,12.138c0.476,0,0.861-0.385,0.861-0.86s-0.386-0.861-0.861-0.861s-0.861,0.386-0.861,0.861S15.024,12.138,15.5,12.138zM15.5,24.927c-0.476,0-0.861,0.386-0.861,0.861s0.386,0.861,0.861,0.861s0.861-0.386,0.861-0.861S15.976,24.927,15.5,24.927zM12.618,11.818c-0.237-0.412-0.764-0.553-1.176-0.315c-0.412,0.238-0.554,0.765-0.315,1.177l2.867,6.722c0.481,0.831,1.543,1.116,2.375,0.637c0.829-0.479,1.114-1.543,0.635-2.374L12.618,11.818zM18.698,24.07c-0.412,0.237-0.555,0.765-0.316,1.176c0.237,0.412,0.764,0.554,1.176,0.315c0.413-0.238,0.553-0.765,0.316-1.176C19.635,23.974,19.108,23.832,18.698,24.07zM8.787,15.65c0.412,0.238,0.938,0.097,1.176-0.315c0.237-0.413,0.097-0.938-0.314-1.176c-0.412-0.239-0.938-0.098-1.177,0.313C8.234,14.886,8.375,15.412,8.787,15.65zM22.215,21.413c-0.412-0.236-0.938-0.096-1.176,0.316c-0.238,0.412-0.099,0.938,0.314,1.176c0.41,0.238,0.937,0.098,1.176-0.314C22.768,22.178,22.625,21.652,22.215,21.413zM9.107,18.531c-0.002-0.476-0.387-0.86-0.861-0.86c-0.477,0-0.862,0.385-0.862,0.86c0.001,0.476,0.386,0.86,0.861,0.861C8.722,19.393,9.106,19.008,9.107,18.531zM21.896,18.531c0,0.477,0.384,0.862,0.859,0.86c0.476,0.002,0.862-0.382,0.862-0.859s-0.387-0.86-0.862-0.862C22.279,17.671,21.896,18.056,21.896,18.531zM8.787,21.413c-0.412,0.238-0.554,0.765-0.316,1.176c0.239,0.412,0.765,0.553,1.177,0.316c0.413-0.239,0.553-0.765,0.315-1.178C9.725,21.317,9.198,21.176,8.787,21.413zM21.352,14.157c-0.411,0.238-0.551,0.764-0.312,1.176c0.237,0.413,0.764,0.555,1.174,0.315c0.412-0.236,0.555-0.762,0.316-1.176C22.29,14.06,21.766,13.921,21.352,14.157zM12.304,24.067c-0.413-0.235-0.939-0.096-1.176,0.315c-0.238,0.413-0.098,0.939,0.312,1.178c0.413,0.236,0.939,0.096,1.178-0.315C12.857,24.832,12.715,24.308,12.304,24.067zM18.698,12.992c0.41,0.238,0.938,0.099,1.174-0.313c0.238-0.411,0.1-0.938-0.314-1.177c-0.414-0.238-0.937-0.097-1.177,0.315C18.144,12.229,18.286,12.755,18.698,12.992z")}})},"./src/shape/icon/Sun.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Sun=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Sun",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.502,7.504c-4.35,0-7.873,3.523-7.873,7.873c0,4.347,3.523,7.872,7.873,7.872c4.346,0,7.871-3.525,7.871-7.872C23.374,11.027,19.85,7.504,15.502,7.504zM15.502,21.25c-3.244-0.008-5.866-2.63-5.874-5.872c0.007-3.243,2.63-5.866,5.874-5.874c3.242,0.008,5.864,2.631,5.871,5.874C21.366,18.62,18.744,21.242,15.502,21.25zM15.502,6.977c0.553,0,1-0.448,1-1.001V1.125c-0.002-0.553-0.448-1-1-1c-0.553,0-1.001,0.449-1,1.002v4.85C14.502,6.528,14.949,6.977,15.502,6.977zM18.715,7.615c0.125,0.053,0.255,0.076,0.382,0.077c0.394,0,0.765-0.233,0.925-0.618l1.856-4.483c0.21-0.511-0.031-1.095-0.541-1.306c-0.511-0.211-1.096,0.031-1.308,0.541L18.174,6.31C17.963,6.82,18.205,7.405,18.715,7.615zM21.44,9.436c0.195,0.194,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293l3.43-3.433c0.391-0.39,0.39-1.023,0-1.415c-0.392-0.39-1.025-0.39-1.415,0.002L21.44,8.021C21.049,8.412,21.049,9.045,21.44,9.436zM23.263,12.16c0.158,0.385,0.531,0.617,0.923,0.617c0.127,0,0.257-0.025,0.383-0.078l4.48-1.857c0.511-0.211,0.753-0.797,0.541-1.307s-0.796-0.752-1.307-0.54l-4.481,1.857C23.292,11.064,23.051,11.65,23.263,12.16zM29.752,14.371l-4.851,0.001c-0.552,0-1,0.448-0.998,1.001c0,0.553,0.447,0.999,0.998,0.999l4.852-0.002c0.553,0,0.999-0.449,0.999-1C30.752,14.817,30.304,14.369,29.752,14.371zM29.054,19.899l-4.482-1.854c-0.512-0.212-1.097,0.03-1.307,0.541c-0.211,0.511,0.031,1.096,0.541,1.308l4.482,1.854c0.126,0.051,0.256,0.075,0.383,0.075c0.393,0,0.765-0.232,0.925-0.617C29.806,20.695,29.563,20.109,29.054,19.899zM22.86,21.312c-0.391-0.391-1.023-0.391-1.414,0.001c-0.391,0.39-0.39,1.022,0,1.413l3.434,3.429c0.195,0.195,0.45,0.293,0.706,0.293s0.513-0.098,0.708-0.293c0.391-0.392,0.389-1.025,0-1.415L22.86,21.312zM20.029,23.675c-0.211-0.511-0.796-0.752-1.307-0.541c-0.51,0.212-0.752,0.797-0.54,1.308l1.86,4.48c0.159,0.385,0.531,0.617,0.925,0.617c0.128,0,0.258-0.024,0.383-0.076c0.511-0.211,0.752-0.797,0.54-1.309L20.029,23.675zM15.512,23.778c-0.553,0-1,0.448-1,1l0.004,4.851c0,0.553,0.449,0.999,1,0.999c0.553,0,1-0.448,0.998-1l-0.003-4.852C16.511,24.226,16.062,23.777,15.512,23.778zM12.296,23.142c-0.51-0.21-1.094,0.031-1.306,0.543l-1.852,4.483c-0.21,0.511,0.033,1.096,0.543,1.307c0.125,0.052,0.254,0.076,0.382,0.076c0.392,0,0.765-0.234,0.924-0.619l1.853-4.485C13.051,23.937,12.807,23.353,12.296,23.142zM9.57,21.325c-0.392-0.391-1.025-0.389-1.415,0.002L4.729,24.76c-0.391,0.392-0.389,1.023,0.002,1.415c0.195,0.194,0.45,0.292,0.706,0.292c0.257,0,0.513-0.098,0.708-0.293l3.427-3.434C9.961,22.349,9.961,21.716,9.57,21.325zM7.746,18.604c-0.213-0.509-0.797-0.751-1.307-0.54L1.96,19.925c-0.511,0.212-0.752,0.798-0.54,1.308c0.16,0.385,0.531,0.616,0.924,0.616c0.127,0,0.258-0.024,0.383-0.076l4.479-1.861C7.715,19.698,7.957,19.113,7.746,18.604zM7.1,15.392c0-0.553-0.447-0.999-1-0.999l-4.851,0.006c-0.553,0-1.001,0.448-0.999,1.001c0.001,0.551,0.449,1,1,0.998l4.852-0.006C6.654,16.392,7.102,15.942,7.1,15.392zM1.944,10.869l4.485,1.85c0.125,0.053,0.254,0.076,0.381,0.076c0.393,0,0.766-0.232,0.925-0.618c0.212-0.511-0.032-1.097-0.544-1.306L2.708,9.021c-0.511-0.21-1.095,0.032-1.306,0.542C1.19,10.074,1.435,10.657,1.944,10.869zM8.137,9.451c0.195,0.193,0.449,0.291,0.705,0.291s0.513-0.098,0.709-0.295c0.391-0.389,0.389-1.023-0.004-1.414L6.113,4.609C5.723,4.219,5.088,4.221,4.699,4.612c-0.391,0.39-0.389,1.024,0.002,1.414L8.137,9.451zM10.964,7.084c0.16,0.384,0.532,0.615,0.923,0.615c0.128,0,0.258-0.025,0.384-0.077c0.51-0.212,0.753-0.798,0.54-1.307l-1.864-4.479c-0.212-0.51-0.798-0.751-1.308-0.539C9.129,1.51,8.888,2.096,9.1,2.605L10.964,7.084z")}})},"./src/shape/icon/Svg.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Svg=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Svg",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M31.274,15.989c0-2.473-2.005-4.478-4.478-4.478l0,0c0.81-0.811,1.312-1.93,1.312-3.167c0-2.474-2.005-4.479-4.479-4.479c-1.236,0-2.356,0.501-3.167,1.312c0-2.473-2.005-4.478-4.478-4.478c-2.474,0-4.479,2.005-4.479,4.478c-0.811-0.81-1.93-1.312-3.167-1.312c-2.474,0-4.479,2.005-4.479,4.479c0,1.236,0.501,2.356,1.312,3.166c-2.474,0-4.479,2.005-4.479,4.479c0,2.474,2.005,4.479,4.479,4.479c-0.811,0.81-1.312,1.93-1.312,3.167c0,2.473,2.005,4.478,4.479,4.478c1.236,0,2.356-0.501,3.167-1.312c0,2.473,2.005,4.479,4.479,4.479c2.473,0,4.478-2.006,4.478-4.479l0,0c0.811,0.811,1.931,1.312,3.167,1.312c2.474,0,4.478-2.005,4.478-4.478c0-1.237-0.501-2.357-1.312-3.168c0.001,0,0.001,0,0.001,0C29.27,20.467,31.274,18.463,31.274,15.989zM23.583,21.211c0.016,0,0.031-0.001,0.047-0.001c1.339,0,2.424,1.085,2.424,2.425c0,1.338-1.085,2.424-2.424,2.424s-2.424-1.086-2.424-2.424c0-0.017,0.001-0.031,0.001-0.047l-3.541-3.542v5.009c0.457,0.44,0.743,1.06,0.743,1.746c0,1.339-1.086,2.424-2.424,2.424c-1.339,0-2.425-1.085-2.425-2.424c0-0.687,0.286-1.306,0.743-1.746v-5.009l-3.541,3.542c0,0.016,0.001,0.031,0.001,0.047c0,1.338-1.085,2.424-2.424,2.424s-2.424-1.086-2.424-2.424c0-1.34,1.085-2.425,2.424-2.425c0.015,0,0.031,0.001,0.046,0.001l3.542-3.541H6.919c-0.44,0.458-1.06,0.743-1.746,0.743c-1.339,0-2.424-1.085-2.424-2.424s1.085-2.424,2.424-2.424c0.686,0,1.305,0.285,1.746,0.744h5.008l-3.542-3.542c-0.015,0-0.031,0.001-0.046,0.001c-1.339,0-2.424-1.085-2.424-2.424S7.001,5.92,8.34,5.92s2.424,1.085,2.424,2.424c0,0.015-0.001,0.031-0.001,0.046l3.541,3.542V6.924c-0.457-0.441-0.743-1.06-0.743-1.746c0-1.339,1.086-2.425,2.425-2.425c1.338,0,2.424,1.085,2.424,2.425c0,0.686-0.286,1.305-0.743,1.746v5.008l3.541-3.542c0-0.015-0.001-0.031-0.001-0.046c0-1.339,1.085-2.424,2.424-2.424s2.424,1.085,2.424,2.424c0,1.339-1.085,2.424-2.424,2.424c-0.016,0-0.031-0.001-0.047-0.001l-3.541,3.542h5.008c0.441-0.458,1.061-0.744,1.747-0.744c1.338,0,2.423,1.085,2.423,2.424s-1.085,2.424-2.423,2.424c-0.687,0-1.306-0.285-1.747-0.743h-5.008L23.583,21.211z")}})},"./src/shape/icon/TShirt.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.TShirt=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.TShirt",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M20.1,4.039c-0.681,1.677-2.32,2.862-4.24,2.862c-1.921,0-3.56-1.185-4.24-2.862L1.238,8.442l2.921,6.884l3.208-1.361V28h17.099V14.015l3.093,1.312l2.922-6.884L20.1,4.039z")}})},"./src/shape/icon/Tag.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Tag=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Tag",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M14.263,2.826H7.904L2.702,8.028v6.359L18.405,30.09l11.561-11.562L14.263,2.826zM6.495,8.859c-0.619-0.619-0.619-1.622,0-2.24C7.114,6,8.117,6,8.736,6.619c0.62,0.62,0.619,1.621,0,2.241C8.117,9.479,7.114,9.479,6.495,8.859z")}})},"./src/shape/icon/TakeOff.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.TakeOff=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.TakeOff",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M10.27,19.267c0,0,9.375-1.981,16.074-8.681c0,0,1.395-1.339-1.338-1.339c-2.305,0-5.6,2.438-5.6,2.438l-9.137-1.42l-1.769,1.769l4.983,2.411l-3.001,2.035l-2.571-1.285L6.09,16.052C6.09,16.052,8.02,18.062,10.27,19.267zM3.251,23.106v1.998h24.498v-1.998H3.251z")}})},"./src/shape/icon/Talke.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Talke=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Talke",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.982,21.375h-1.969v-1.889h1.969V21.375zM16.982,17.469v0.625h-1.969v-0.769c0-2.321,2.641-2.689,2.641-4.337c0-0.752-0.672-1.329-1.553-1.329c-0.912,0-1.713,0.672-1.713,0.672l-1.12-1.393c0,0,1.104-1.153,3.009-1.153c1.81,0,3.49,1.121,3.49,3.009C19.768,15.437,16.982,15.741,16.982,17.469z")}})},"./src/shape/icon/Talkq.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Talkq=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Talkq",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z")}})},"./src/shape/icon/Thunder.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Thunder=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Thunder",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h5.271l-2.166,3.398l1.977-0.411L10,30.875l9.138-10.102L17,21l2.167-2.023h4.269c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979z")}})},"./src/shape/icon/Trash.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Trash=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Trash",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M20.826,5.75l0.396,1.188c1.54,0.575,2.589,1.44,2.589,2.626c0,2.405-4.308,3.498-8.312,3.498c-4.003,0-8.311-1.093-8.311-3.498c0-1.272,1.21-2.174,2.938-2.746l0.388-1.165c-2.443,0.648-4.327,1.876-4.327,3.91v2.264c0,1.224,0.685,2.155,1.759,2.845l0.396,9.265c0,1.381,3.274,2.5,7.312,2.5c4.038,0,7.313-1.119,7.313-2.5l0.405-9.493c0.885-0.664,1.438-1.521,1.438-2.617V9.562C24.812,7.625,23.101,6.42,20.826,5.75zM11.093,24.127c-0.476-0.286-1.022-0.846-1.166-1.237c-1.007-2.76-0.73-4.921-0.529-7.509c0.747,0.28,1.58,0.491,2.45,0.642c-0.216,2.658-0.43,4.923,0.003,7.828C11.916,24.278,11.567,24.411,11.093,24.127zM17.219,24.329c-0.019,0.445-0.691,0.856-1.517,0.856c-0.828,0-1.498-0.413-1.517-0.858c-0.126-2.996-0.032-5.322,0.068-8.039c0.418,0.022,0.835,0.037,1.246,0.037c0.543,0,1.097-0.02,1.651-0.059C17.251,18.994,17.346,21.325,17.219,24.329zM21.476,22.892c-0.143,0.392-0.69,0.95-1.165,1.235c-0.474,0.284-0.817,0.151-0.754-0.276c0.437-2.93,0.214-5.209-0.005-7.897c0.881-0.174,1.708-0.417,2.44-0.731C22.194,17.883,22.503,20.076,21.476,22.892zM11.338,9.512c0.525,0.173,1.092-0.109,1.268-0.633h-0.002l0.771-2.316h4.56l0.771,2.316c0.14,0.419,0.53,0.685,0.949,0.685c0.104,0,0.211-0.017,0.316-0.052c0.524-0.175,0.808-0.742,0.633-1.265l-1.002-3.001c-0.136-0.407-0.518-0.683-0.945-0.683h-6.002c-0.428,0-0.812,0.275-0.948,0.683l-1,2.999C10.532,8.77,10.815,9.337,11.338,9.512z")}})},"./src/shape/icon/Twitter.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Twitter=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Twitter",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M23.295,22.567h-7.213c-2.125,0-4.103-2.215-4.103-4.736v-1.829h11.232c1.817,0,3.291-1.469,3.291-3.281c0-1.813-1.474-3.282-3.291-3.282H11.979V6.198c0-1.835-1.375-3.323-3.192-3.323c-1.816,0-3.29,1.488-3.29,3.323v11.633c0,6.23,4.685,11.274,10.476,11.274h7.211c1.818,0,3.318-1.463,3.318-3.298S25.112,22.567,23.295,22.567z")}})},"./src/shape/icon/TwitterBird.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.TwitterBird=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.TwitterBird",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M14.605,13.11c0.913-2.851,2.029-4.698,3.313-6.038c0.959-1,1.453-1.316,0.891-0.216c0.25-0.199,0.606-0.464,0.885-0.605c1.555-0.733,1.442-0.119,0.373,0.54c2.923-1.045,2.82,0.286-0.271,0.949c2.527,0.047,5.214,1.656,5.987,5.077c0.105,0.474-0.021,0.428,0.464,0.514c1.047,0.186,2.03,0.174,2.991-0.13c-0.104,0.708-1.039,1.167-2.497,1.471c-0.541,0.112-0.651,0.083-0.005,0.229c0.799,0.179,1.69,0.226,2.634,0.182c-0.734,0.846-1.905,1.278-3.354,1.296c-0.904,3.309-2.976,5.678-5.596,7.164c-6.152,3.492-15.108,2.984-19.599-3.359c2.947,2.312,7.312,2.821,10.555-0.401c-2.125,0-2.674-1.591-0.99-2.449c-1.595-0.017-2.608-0.521-3.203-1.434c-0.226-0.347-0.229-0.374,0.14-0.64c0.405-0.293,0.958-0.423,1.528-0.467c-1.651-0.473-2.66-1.335-3.009-2.491c-0.116-0.382-0.134-0.363,0.256-0.462c0.38-0.097,0.87-0.148,1.309-0.17C6.11,10.88,5.336,9.917,5.139,8.852c-0.186-1.006,0.005-0.748,0.758-0.46C9.263,9.68,12.619,11.062,14.605,13.11L14.605,13.11z")}})},"./src/shape/icon/Umbrella.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Umbrella=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Umbrella",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M14.784,26.991c0,1.238-1.329,1.696-1.835,1.696c-0.504,0-1.536-0.413-1.65-1.812c0-0.354-0.288-0.642-0.644-0.642c-0.354,0-0.641,0.287-0.641,0.642c0.045,1.056,0.756,3.052,2.935,3.052c2.432,0,3.166-1.882,3.166-3.144v-8.176l-1.328-0.024C14.787,18.584,14.784,25.889,14.784,26.991zM15.584,9.804c-6.807,0-11.084,4.859-11.587,8.326c0.636-0.913,1.694-1.51,2.89-1.51c1.197,0,2.22,0.582,2.855,1.495c0.638-0.904,1.69-1.495,2.88-1.495c1.2,0,2.26,0.6,2.896,1.517c0.635-0.917,1.83-1.517,3.03-1.517c1.19,0,2.241,0.591,2.879,1.495c0.636-0.913,1.659-1.495,2.855-1.495c1.197,0,2.254,0.597,2.89,1.51C26.669,14.663,22.393,9.804,15.584,9.804zM14.733,7.125v2.081h1.323V7.125c0-0.365-0.296-0.661-0.661-0.661C15.029,6.464,14.733,6.76,14.733,7.125z")}})},"./src/shape/icon/Undo.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Undo=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Undo",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M12.981,9.073V6.817l-12.106,6.99l12.106,6.99v-2.422c3.285-0.002,9.052,0.28,9.052,2.269c0,2.78-6.023,4.263-6.023,4.263v2.132c0,0,13.53,0.463,13.53-9.823C29.54,9.134,17.952,8.831,12.981,9.073z")}})},"./src/shape/icon/Unlock.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Unlock=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Unlock",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M20.375,12.833h-2.209V10c0,0,0,0,0-0.001c0-2.389,1.945-4.333,4.334-4.333c2.391,0,4.335,1.944,4.335,4.333c0,0,0,0,0,0v2.834h2V9.999h-0.001c-0.001-3.498-2.836-6.333-6.334-6.333S16.166,6.502,16.166,10v2.833H3.125V25h17.25V12.833z")}})},"./src/shape/icon/Usb.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Usb=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Usb",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M15.5,1.667L13.745,4.74h1.252v15.709L11.8,17.391c-0.205-0.26-0.351-0.601-0.358-0.952c0-1.417-0.001-2.258-0.001-2.568c0.592-0.21,1.02-0.774,1.02-1.444c0-0.849-0.682-1.538-1.521-1.538c-0.84,0-1.521,0.689-1.521,1.538c0,0.67,0.427,1.234,1.019,1.444l-0.001,2.539c0,0.688,0.373,1.409,0.812,1.868c-0.013-0.013-0.027-0.025,0,0c0.011,0.01,3.392,3.245,3.392,3.245c0.205,0.26,0.35,0.6,0.357,0.951v1.776c-1.161,0.236-2.036,1.272-2.036,2.517c0,1.418,1.137,2.566,2.539,2.566c1.403,0,2.54-1.148,2.54-2.566c0-1.244-0.875-2.28-2.038-2.517v-1.746c0-0.005,0-0.009,0-0.014v-3.861c0.008-0.35,0.152-0.689,0.358-0.949c0,0,3.38-3.234,3.392-3.245c0.027-0.026,0.012-0.013,0,0c0.438-0.459,0.811-1.181,0.811-1.869V10.12h1.02V7.046h-3.041v3.075h1.018c0,0-0.002,0.644-0.002,2.476c-0.008,0.351-0.152,0.692-0.357,0.952l-3.198,3.06V4.74h1.254L15.5,1.667z")}})},"./src/shape/icon/User.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.User=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.User",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M20.771,12.364c0,0,0.849-3.51,0-4.699c-0.85-1.189-1.189-1.981-3.058-2.548s-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.792-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.321s0.283,3.058,0.566,3.624l-0.337,0.113c-0.283,3.283,1.132,3.68,1.132,3.68c0.509,3.058,1.019,1.756,1.019,2.548s-0.51,0.51-0.51,0.51s-0.452,1.245-1.584,1.698c-1.132,0.452-7.416,2.886-7.927,3.396c-0.511,0.511-0.453,2.888-0.453,2.888h26.947c0,0,0.059-2.377-0.452-2.888c-0.512-0.511-6.796-2.944-7.928-3.396c-1.132-0.453-1.584-1.698-1.584-1.698s-0.51,0.282-0.51-0.51s0.51,0.51,1.02-2.548c0,0,1.414-0.397,1.132-3.68H20.771z")}})},"./src/shape/icon/Users.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Users=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Users",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.053,20.8c-1.132-0.453-1.584-1.698-1.584-1.698s-0.51,0.282-0.51-0.51s0.51,0.51,1.02-2.548c0,0,1.414-0.397,1.132-3.68h-0.34c0,0,0.849-3.51,0-4.699c-0.85-1.189-1.189-1.981-3.058-2.548s-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.792-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.321s0.283,3.058,0.566,3.624l-0.337,0.113c-0.283,3.283,1.132,3.68,1.132,3.68c0.509,3.058,1.019,1.756,1.019,2.548s-0.51,0.51-0.51,0.51s-0.452,1.245-1.584,1.698c-1.132,0.452-7.416,2.886-7.927,3.396c-0.511,0.511-0.453,2.888-0.453,2.888h26.947c0,0,0.059-2.377-0.452-2.888C28.469,23.686,22.185,21.252,21.053,20.8zM8.583,20.628c-0.099-0.18-0.148-0.31-0.148-0.31s-0.432,0.239-0.432-0.432s0.432,0.432,0.864-2.159c0,0,1.199-0.336,0.959-3.119H9.538c0,0,0.143-0.591,0.237-1.334c-0.004-0.308,0.006-0.636,0.037-0.996l0.038-0.426c-0.021-0.492-0.107-0.939-0.312-1.226C8.818,9.619,8.53,8.947,6.947,8.467c-1.583-0.48-1.008-0.385-2.159-0.336C3.636,8.179,2.676,8.802,2.676,9.139c0,0-0.72,0.048-1.008,0.336c-0.271,0.271-0.705,1.462-0.757,1.885v0.281c0.047,0.653,0.258,2.449,0.469,2.872l-0.286,0.096c-0.239,2.783,0.959,3.119,0.959,3.119c0.432,2.591,0.864,1.488,0.864,2.159s-0.432,0.432-0.432,0.432s-0.383,1.057-1.343,1.439c-0.061,0.024-0.139,0.056-0.232,0.092v5.234h0.575c-0.029-1.278,0.077-2.927,0.746-3.594C2.587,23.135,3.754,22.551,8.583,20.628zM30.913,11.572c-0.04-0.378-0.127-0.715-0.292-0.946c-0.719-1.008-1.008-1.679-2.59-2.159c-1.584-0.48-1.008-0.385-2.16-0.336C24.72,8.179,23.76,8.802,23.76,9.139c0,0-0.719,0.048-1.008,0.336c-0.271,0.272-0.709,1.472-0.758,1.891h0.033l0.08,0.913c0.02,0.231,0.022,0.436,0.027,0.645c0.09,0.666,0.21,1.35,0.33,1.589l-0.286,0.096c-0.239,2.783,0.96,3.119,0.96,3.119c0.432,2.591,0.863,1.488,0.863,2.159s-0.432,0.432-0.432,0.432s-0.053,0.142-0.163,0.338c4.77,1.9,5.927,2.48,6.279,2.834c0.67,0.667,0.775,2.315,0.746,3.594h0.48v-5.306c-0.016-0.006-0.038-0.015-0.052-0.021c-0.959-0.383-1.343-1.439-1.343-1.439s-0.433,0.239-0.433-0.432s0.433,0.432,0.864-2.159c0,0,0.804-0.229,0.963-1.841v-1.227c-0.001-0.018-0.001-0.033-0.003-0.051h-0.289c0,0,0.215-0.89,0.292-1.861V11.572z")}})},"./src/shape/icon/Video.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Video=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Video",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M27.188,4.875v1.094h-4.5V4.875H8.062v1.094h-4.5V4.875h-1v21.25h1v-1.094h4.5v1.094h14.625v-1.094h4.5v1.094h1.25V4.875H27.188zM8.062,23.719h-4.5v-3.125h4.5V23.719zM8.062,19.281h-4.5v-3.125h4.5V19.281zM8.062,14.844h-4.5v-3.125h4.5V14.844zM8.062,10.406h-4.5V7.281h4.5V10.406zM11.247,20.59V9.754l9.382,5.418L11.247,20.59zM27.188,23.719h-4.5v-3.125h4.5V23.719zM27.188,19.281h-4.5v-3.125h4.5V19.281zM27.188,14.844h-4.5v-3.125h4.5V14.844zM27.188,10.406h-4.5V7.281h4.5V10.406z")}})},"./src/shape/icon/View.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.View=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.View",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M16,8.286C8.454,8.286,2.5,16,2.5,16s5.954,7.715,13.5,7.715c5.771,0,13.5-7.715,13.5-7.715S21.771,8.286,16,8.286zM16,20.807c-2.649,0-4.807-2.157-4.807-4.807s2.158-4.807,4.807-4.807s4.807,2.158,4.807,4.807S18.649,20.807,16,20.807zM16,13.194c-1.549,0-2.806,1.256-2.806,2.806c0,1.55,1.256,2.806,2.806,2.806c1.55,0,2.806-1.256,2.806-2.806C18.806,14.451,17.55,13.194,16,13.194z")}})},"./src/shape/icon/Vim.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Vim=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Vim",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M25.012,10.44l4.571-4.645c0.11-0.113,0.173-0.264,0.173-0.423V3.134c0-0.159-0.064-0.314-0.177-0.427l-0.604-0.602c-0.111-0.112-0.261-0.176-0.42-0.177l-9.646-0.086C18.71,1.84,18.523,1.935,18.41,2.099L17.807,2.96c-0.033,0.047-0.059,0.099-0.076,0.154l-2.144-2.156l0,0l-1.646,1.666l-0.447-0.497c-0.112-0.125-0.27-0.197-0.438-0.199L3.324,1.756c-0.163-0.003-0.322,0.06-0.437,0.176L2.284,2.535C2.171,2.647,2.107,2.803,2.107,2.962v2.325c0,0.164,0.066,0.32,0.183,0.434l0.657,0.635C3.056,6.461,3.2,6.521,3.352,6.525l0.285,0.007l0.007,6.512l-2.527,2.557l2.533,2.533l0.008,8.084c0,0.159,0.065,0.314,0.177,0.427l0.861,0.861c0.112,0.111,0.268,0.176,0.427,0.176h2.67c0.161,0,0.317-0.064,0.43-0.181l2.378-2.417l4.9,4.9l14.47-14.558L25.012,10.44zM9.747,24.232l-2.208,2.242H5.372l-0.509-0.509L4.856,19.34l-0.008-7.515L4.842,5.943c0-0.328-0.261-0.594-0.588-0.603L3.617,5.326L3.313,5.031v-1.82l0.245-0.245l9.215,0.163l0.319,0.354l0.126,0.141v1.419l-0.352,0.362H12.26c-0.331,0-0.6,0.266-0.603,0.597l-0.076,7.203c-0.002,0.244,0.141,0.463,0.365,0.56c0.224,0.096,0.482,0.049,0.657-0.12l7.495-7.235c0.174-0.171,0.23-0.432,0.139-0.66c-0.09-0.228-0.312-0.377-0.56-0.377h-0.479l-0.296-0.379V3.496l0.312-0.445l9.083,0.081l0.252,0.252v1.743l-4.388,4.458L9.747,24.232z")}})},"./src/shape/icon/Volume0.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Volume0=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Volume0",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z")}})},"./src/shape/icon/Volume1.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Volume1=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Volume1",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z")}})},"./src/shape/icon/Volume2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Volume2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Volume2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z M21.101,8.925c-0.393-0.391-1.024-0.391-1.413,0c-0.392,0.391-0.392,1.025,0,1.414c1.45,1.451,2.344,3.447,2.344,5.661c0,2.212-0.894,4.207-2.342,5.659c-0.392,0.39-0.392,1.023,0,1.414c0.195,0.195,0.451,0.293,0.708,0.293c0.256,0,0.512-0.098,0.707-0.293c1.808-1.809,2.929-4.315,2.927-7.073C24.033,13.24,22.912,10.732,21.101,8.925z")}})},"./src/shape/icon/Volume3.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Volume3=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Volume3",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z M21.101,8.925c-0.393-0.391-1.024-0.391-1.413,0c-0.392,0.391-0.392,1.025,0,1.414c1.45,1.451,2.344,3.447,2.344,5.661c0,2.212-0.894,4.207-2.342,5.659c-0.392,0.39-0.392,1.023,0,1.414c0.195,0.195,0.451,0.293,0.708,0.293c0.256,0,0.512-0.098,0.707-0.293c1.808-1.809,2.929-4.315,2.927-7.073C24.033,13.24,22.912,10.732,21.101,8.925z M23.28,6.746c-0.393-0.391-1.025-0.389-1.414,0.002c-0.391,0.389-0.391,1.023,0.002,1.413h-0.002c2.009,2.009,3.248,4.773,3.248,7.839c0,3.063-1.239,5.828-3.246,7.838c-0.391,0.39-0.391,1.023,0.002,1.415c0.194,0.194,0.45,0.291,0.706,0.291s0.513-0.098,0.708-0.293c2.363-2.366,3.831-5.643,3.829-9.251C27.115,12.389,25.647,9.111,23.28,6.746z")}})},"./src/shape/icon/Warning.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Warning=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Warning",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M29.225,23.567l-3.778-6.542c-1.139-1.972-3.002-5.2-4.141-7.172l-3.778-6.542c-1.14-1.973-3.003-1.973-4.142,0L9.609,9.853c-1.139,1.972-3.003,5.201-4.142,7.172L1.69,23.567c-1.139,1.974-0.207,3.587,2.071,3.587h23.391C29.432,27.154,30.363,25.541,29.225,23.567zM16.536,24.58h-2.241v-2.151h2.241V24.58zM16.428,20.844h-2.023l-0.201-9.204h2.407L16.428,20.844z")}})},"./src/shape/icon/WheelChair.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.WheelChair=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.WheelChair",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M20.373,19.85c0,4.079-3.318,7.397-7.398,7.397c-4.079,0-7.398-3.318-7.398-7.397c0-2.466,1.213-4.652,3.073-5.997l-0.251-2.21c-2.875,1.609-4.825,4.684-4.825,8.207c0,5.184,4.217,9.4,9.401,9.4c4.395,0,8.093-3.031,9.117-7.111L20.37,19.73C20.37,19.771,20.373,19.81,20.373,19.85zM11.768,6.534c1.321,0,2.392-1.071,2.392-2.392c0-1.321-1.071-2.392-2.392-2.392c-1.321,0-2.392,1.071-2.392,2.392C9.375,5.463,10.446,6.534,11.768,6.534zM27.188,22.677l-5.367-7.505c-0.28-0.393-0.749-0.579-1.226-0.538c-0.035-0.003-0.071-0.006-0.106-0.006h-6.132l-0.152-1.335h4.557c0.53,0,0.96-0.429,0.96-0.959c0-0.53-0.43-0.959-0.96-0.959h-4.776l-0.25-2.192c-0.146-1.282-1.303-2.203-2.585-2.057C9.869,7.271,8.948,8.428,9.094,9.71l0.705,6.19c0.136,1.197,1.154,2.078,2.332,2.071c0.004,0,0.007,0.001,0.012,0.001h8.023l4.603,6.436c0.439,0.615,1.338,0.727,2.007,0.248C27.442,24.178,27.628,23.292,27.188,22.677z")}})},"./src/shape/icon/Windows.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Windows=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Windows",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M20.023,17.484c-1.732-0.205-3.022-0.908-4.212-1.701l0,0l-0.559,0.279l-2.578,8.924l0,0c1.217,0.805,2.905,1.707,4.682,1.914c2.686,0.312,5.56-0.744,6.391-1.195l2.617-9.061l-0.559-0.279C25.805,16.365,23.193,17.857,20.023,17.484zM14.424,14.825c-1.267-0.87-2.578-1.652-4.375-1.816c-0.318-0.029-0.627-0.042-0.925-0.042c-3.011,0-4.948,1.347-4.948,1.347l-2.565,8.877l0,0l0.526,0.281c0.981-0.476,2.78-1.145,5.09-0.984c1.665,0.113,2.92,0.781,4.117,1.531l0.507-0.26l0,0L14.424,14.825zM10.201,12.094c1.664,0.114,2.921,0.78,4.117,1.533l0.509-0.26l0,0L17.4,4.431c-1.27-0.87-2.579-1.653-4.377-1.816c-0.318-0.029-0.626-0.042-0.924-0.042C9.088,2.573,7.15,3.92,7.15,3.92l-2.566,8.878L5.11,13.08C6.092,12.604,7.891,11.936,10.201,12.094zM28.779,5.971L28.779,5.971c0,0.001-2.609,1.492-5.779,1.119c-1.734-0.204-3.023-0.907-4.213-1.701L18.227,5.67l-2.576,8.923l0,0c1.215,0.803,2.906,1.709,4.68,1.915c2.687,0.312,5.558-0.745,6.392-1.197l2.615-9.059L28.779,5.971z")}})},"./src/shape/icon/Woman.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Woman=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Woman",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M21.022,16.349c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.104,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.579,5.192-0.351,5.874c0.55,0.307,1.127,0.078,1.723-0.496c-0.105,0.582-0.167,1.213-0.167,1.873c0,2.932,1.139,5.307,2.543,5.307c0.846,0,1.265-0.865,1.466-2.189c0.201,1.324,0.62,2.189,1.464,2.189c1.406,0,2.545-2.375,2.545-5.307c0-0.66-0.061-1.291-0.168-1.873c0.598,0.574,1.174,0.803,1.725,0.496C22.603,21.541,22.444,18.912,21.022,16.349zM15.808,13.757c2.363,0,4.279-1.916,4.279-4.279s-1.916-4.279-4.279-4.279c-2.363,0-4.28,1.916-4.28,4.279S13.445,13.757,15.808,13.757zM18.731,4.974c1.235,0.455,0.492-0.725,0.492-1.531s0.762-1.792-0.492-1.391c-1.316,0.422-2.383,0.654-2.383,1.461S17.415,4.489,18.731,4.974zM15.816,4.4c0.782,0,0.345-0.396,0.345-0.884c0-0.488,0.438-0.883-0.345-0.883s-0.374,0.396-0.374,0.883C15.442,4.005,15.034,4.4,15.816,4.4zM12.884,4.974c1.316-0.484,2.383-0.654,2.383-1.461S14.2,2.474,12.884,2.052c-1.254-0.402-0.492,0.584-0.492,1.391S11.648,5.428,12.884,4.974z")}})},"./src/shape/icon/Wrench.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Wrench=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Wrench",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M26.834,14.693c1.816-2.088,2.181-4.938,1.193-7.334l-3.646,4.252l-3.594-0.699L19.596,7.45l3.637-4.242c-2.502-0.63-5.258,0.13-7.066,2.21c-1.907,2.193-2.219,5.229-1.039,7.693L5.624,24.04c-1.011,1.162-0.888,2.924,0.274,3.935c1.162,1.01,2.924,0.888,3.935-0.274l9.493-10.918C21.939,17.625,24.918,16.896,26.834,14.693z")}})},"./src/shape/icon/Wrench2.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Wrench2=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Wrench2",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M24.946,9.721l-2.872-0.768l-0.771-2.874l3.188-3.231c-1.992-0.653-4.268-0.192-5.848,1.391c-1.668,1.668-2.095,4.111-1.279,6.172l-3.476,3.478l-3.478,3.478c-2.062-0.816-4.504-0.391-6.173,1.277c-1.583,1.581-2.043,3.856-1.39,5.849l3.231-3.188l2.874,0.77l0.769,2.872l-3.239,3.197c1.998,0.665,4.288,0.207,5.876-1.384c1.678-1.678,2.1-4.133,1.271-6.202l3.463-3.464l3.464-3.463c2.069,0.828,4.523,0.406,6.202-1.272c1.592-1.589,2.049-3.878,1.384-5.876L24.946,9.721z")}})},"./src/shape/icon/Wrench3.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.Wrench3=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.Wrench3",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M27.839,6.775l-3.197,3.239L21.77,9.246l-0.771-2.874l3.188-3.231c-1.992-0.653-4.268-0.192-5.848,1.391c-1.668,1.668-2.095,4.111-1.279,6.172L7.42,20.344c-0.204-0.032-0.408-0.062-0.621-0.062c-2.173,0-3.933,1.759-3.933,3.933c0,2.173,1.76,3.933,3.933,3.933c2.171,0,3.931-1.76,3.933-3.933c0-0.24-0.03-0.473-0.071-0.7l9.592-9.59c2.069,0.828,4.523,0.406,6.202-1.272C28.047,11.062,28.504,8.772,27.839,6.775zM6.799,25.146c-0.517,0-0.933-0.418-0.935-0.933c0.002-0.515,0.418-0.933,0.935-0.933c0.514,0,0.932,0.418,0.932,0.933S7.313,25.146,6.799,25.146z")}})},"./src/shape/icon/ZoomIn.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ZoomIn=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ZoomIn",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M22.646,19.307c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127l3.535-3.537L22.646,19.307zM13.688,20.369c-3.582-0.008-6.478-2.904-6.484-6.484c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486C20.165,17.465,17.267,20.361,13.688,20.369zM15.687,9.051h-4v2.833H8.854v4.001h2.833v2.833h4v-2.834h2.832v-3.999h-2.833V9.051z")}})},"./src/shape/icon/ZoomOut.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.icon.ZoomOut=i.default.shape.icon.Icon.extend({NAME:"draw2d.shape.icon.ZoomOut",init:function(t,e,n){this._super(extend({width:50,height:50},t),e,n)},createSet:function(){return this.canvas.paper.path("M22.646,19.307c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127l3.535-3.537L22.646,19.307zM13.688,20.369c-3.582-0.008-6.478-2.904-6.484-6.484c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486C20.165,17.465,17.267,20.361,13.688,20.369zM8.854,11.884v4.001l9.665-0.001v-3.999L8.854,11.884z")}})},"./src/shape/layout/FlexGridLayout.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.layout.FlexGridLayout=i.default.shape.layout.Layout.extend({NAME:"draw2d.shape.layout.FlexGridLayout",init:function(t,e,n){this.cellLocator={relocate:(t,e)=>{!0===this.gridDef.layoutRequired&&this._layout();let n=e.__cellConstraint,r=n.x,i=n.y;if(e.isResizeable())e.setDimension(Math.max(e.getMinWidth(),n.width),Math.max(e.getMinHeight(),n.height));else{switch(n.valign){case"middle":i+=(n.height-e.getHeight())/2;break;case"bottom":i+=n.height-e.getHeight()}switch(n.align){case"center":r+=(n.width-e.getWidth())/2;break;case"right":r+=n.width-e.getWidth()}}e.setPosition(r,i)},bind:()=>{},unbind:()=>{},translate:(t,e)=>{t.setPosition(t.x+e.x,t.y+e.y)}},this.debug=!1,this.gridDef={debugLines:[],def_cols:[],def_rows:[],min_height:[],min_width:[],minGridWidth:10,minGridHeight:10,hResizeable:!1,vResizeable:!1,layoutRequired:!0},this._super({stroke:2,...t},e,n),this.resizeListener=t=>{this.gridDef.layoutRequired=!0,this.getParent()instanceof i.default.shape.layout.Layout?this.fireEvent("resize"):this.setDimension(!0===this.gridDef.hResizeable?this.getWidth():1,!0===this.gridDef.vResizeable?this.getHeight():1)};let r=t.rows.split(","),s=t.columns.split(",");for(let t=0;t<s.length;t++)this.gridDef.def_cols[t]=this.cellWidthFromDef(s[t]);for(let t=0;t<r.length;t++)this.gridDef.def_rows[t]=this.cellWidthFromDef(r[t]);this.installEditPolicy(new i.default.policy.figure.RectangleSelectionFeedbackPolicy)},add:function(t,e){t.__cellConstraint={row:0,col:0,rowspan:1,colspan:1,align:"left",valign:"top",width:1,height:1,...e},this.gridDef.layoutRequired=!0,this._super(t,this.cellLocator),this._layout()},getMinWidth:function(){return this.gridDef.minGridWidth},getMinHeight:function(){return this.gridDef.minGridHeight},setCanvas:function(t){return this.gridDef.layoutRequired=!0,this._super(t),this},repaint:function(t){return!0===this.repaintBlocked||null===this.shape||(this._super(t),this.debug&&this.paintDebugGrid()),this},setDimension:function(t,e){return!0===this.gridDef.layoutRequired&&this._layout(),this._super(t,e),this.gridDef.layoutRequired=!0,this.repaint(),this},_layout:function(){this.gridDef.layoutRequired=!1;let t=this.getChildren();this.gridDef.min_height=this.gridDef.def_rows.slice(0),this.gridDef.min_width=this.gridDef.def_cols.slice(0);for(let e=0;e<t.getSize();e++){let n=t.get(e),r=n.__cellConstraint;if(this.gridDef.min_width[r.col]=Math.max(this.gridDef.min_width[r.col],n.getMinWidth()),r.rowspan>1){let t=n.getMinHeight(),e=this.cellHeight(r.row,r.row+r.rowspan);if(e<t){let n=t-e;this.gridDef.min_height[r.row+r.rowspan-1]=this.gridDef.min_height[r.row+r.rowspan-1]+n}}else this.gridDef.min_height[r.row]=Math.max(this.gridDef.min_height[r.row],n.getMinHeight())}this.gridDef.minGridWidth=this._getGridWidth(),this.gridDef.minGridHeight=this._getGridHeight();let e=this._getGridHeight();for(let t=0;t<this.gridDef.def_rows.length;t++)if(-1===this.gridDef.def_rows[t]){this.gridDef.min_height[t]=this.gridDef.min_height[t]+Math.max(0,this.getHeight()-e),this.gridDef.vResizeable=!0;break}let n=this._getGridWidth();for(let t=0;t<this.gridDef.def_cols.length;t++)if(-1===this.gridDef.def_cols[t]){this.gridDef.min_width[t]=this.gridDef.min_width[t]+Math.max(0,this.getWidth()-n),this.gridDef.hResizeable=!0;break}for(let e=0;e<t.getSize();e++){let n=t.get(e).__cellConstraint;n.width=this.cellWidth(n.col,n.col+n.colspan),n.height=this.cellHeight(n.row,n.row+n.rowspan),n.x=this.cellX(n.col),n.y=this.cellY(n.row)}return this},cellX:function(t){let e=0;for(let n=0;n<t;n++)e+=this.gridDef.min_width[n];return e},cellY:function(t){let e=0;for(let n=0;n<t;n++)e+=this.gridDef.min_height[n];return e},cellWidth:function(t,e){let n=0;for(let r=t;r<e;r++)n+=this.gridDef.min_width[r];return n},cellHeight:function(t,e){let n=0;for(let r=t;r<e;r++)n+=this.gridDef.min_height[r];return n},paintDebugGrid:function(){for(let t=0;t<this.gridDef.debugLines.length;t++)this.gridDef.debugLines[t].remove();this.gridDef.debugLines=[];let t=this._getGridHeight(),e=this._getGridWidth(),n=this.getAbsoluteX(),r=this.getAbsoluteY(),i=n;for(let e=0;e<=this.gridDef.min_width.length;e++){let n=this.canvas.paper.path("M "+i+" "+r+" l 0 "+t).attr({stroke:"#FF0000","stroke-width":1});this.gridDef.debugLines.push(n),e<this.gridDef.min_width.length&&(i+=this.gridDef.min_width[e])}let s=r;for(let t=0;t<=this.gridDef.min_height.length;t++){let r=this.canvas.paper.path("M "+n+" "+s+" l "+e+" 0").attr({stroke:"#FF0000","stroke-width":1});this.gridDef.debugLines.push(r),t<this.gridDef.min_height.length&&(s+=this.gridDef.min_height[t])}},_getGridWidth:function(){let t=0;for(let e=0;e<this.gridDef.min_width.length;e++)t+=this.gridDef.min_width[e];return t},_getGridHeight:function(){let t=0;for(let e=0;e<this.gridDef.min_height.length;e++)t+=this.gridDef.min_height[e];return t},cellWidthFromDef:function(t){let e=new RegExp("(\\d+)(?:px)?"),n=t.match(e);return null!=n?parseInt(n[1]):(e=new RegExp("p(?:ref)?"),n=t.match(e),null!=n?0:(e=new RegExp("g(?:row)?"),n=t.match(e),null!=n?(this.autoResize=!1,-1):0))}})},"./src/shape/layout/HorizontalLayout.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.layout.HorizontalLayout=i.default.shape.layout.Layout.extend({NAME:"draw2d.shape.layout.HorizontalLayout",init:function(t,e,n){this.gap=0;let r=this;this.locator={translate:function(t,e){t.setPosition(t.x+e.x,t.y+e.y)},bind:function(){},unbind:function(){},relocate:function(t,e){let n=r.getStroke(),i=n+r.padding.top,s=n+r.padding.left;for(let e=0;e<t;e++){let t=r.children.get(e).figure;t.isVisible()&&(s+=t.getWidth()+r.gap)}e.setPosition(s,i)}},this._super({width:1,height:1,gap:0,...t},{gap:this.setGap,...e},{gap:this.getGap,...n})},add:function(t,e,n){return this._super(t,this.locator,n),this.setDimension(1,1),this},setGap:function(t){return this.gap=t,this.setDimension(1,1),this},getGap:function(){return this.gap},getMinWidth:function(){let t=this,e=2*this.stroke+this.padding.left+this.padding.right,n=0;return this.children.each((function(r,i){i.figure.isVisible()&&(e+=i.figure.isResizeable()?i.figure.getMinWidth():i.figure.getWidth()+n,n=t.gap)})),e},getMinHeight:function(){let t=2*this.stroke+this.padding.top+this.padding.bottom,e=0;return this.children.each((function(t,n){e=Math.max(e,n.figure.isResizeable()?n.figure.getMinHeight():n.figure.getHeight())})),e+t},setDimension:function(t,e){this._super(t,e);let n=this.width-this.getMinWidth();if(n>0)n=n/this.children.getSize()|0,this.children.each((function(t,e){!0===e.figure.isResizeable()&&e.figure.setDimension(e.figure.getMinWidth()+n,e.figure.getHeight())}));else{let t=this.getMinHeight();this.children.each((function(e,n){!0===n.figure.isResizeable()&&n.figure.setDimension(1,t)}))}return this},getPersistentAttributes:function(){let t=this._super();return t.gap=this.gap,t},setPersistentAttributes:function(t){return this._super(t),"number"==typeof t.gap&&(this.gap=t.gap),this}})},"./src/shape/layout/Layout.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.layout.Layout=i.default.shape.basic.Rectangle.extend({NAME:"draw2d.shape.layout.Layout",init:function(t,e,n){this.padding={top:0,right:0,bottom:0,left:0},this._super({bgColor:null,radius:0,stroke:0,...t},{padding:this.setPadding,...e},{padding:this.getPadding,...n}),this.resizeListener=t=>{this.getParent()instanceof i.default.shape.layout.Layout||this.setDimension(1,1),this.fireEvent("resize")},this.installEditPolicy(new i.default.policy.figure.AntSelectionFeedbackPolicy)},add:function(t,e,n){return this._super(t,e,n),t.on("resize",this.resizeListener),t.on("change:visibility",this.resizeListener),t.visible=t.visible&&this.visible,this},remove:function(t){let e=this._super(t);return t.off(this.resizeListener),this.setDimension(1,1),e},setPadding:function(t){return this.padding="number"==typeof t?{top:t,right:t,bottom:t,left:t}:{...this.padding,...t},this.fireEvent("change:padding",{value:this.padding}),this.setDimension(1,1),this},getPadding:function(){return this.padding},setVisible:function(t){return this.children.each((function(e,n){n.figure.setVisible(t)})),this._super(t),this.setDimension(1,1),this},createCommand:function(t){return t.getPolicy()===i.default.command.CommandType.ROTATE?null:this._super(t)}})},"./src/shape/layout/StackLayout.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.layout.StackLayout=i.default.shape.layout.Layout.extend({NAME:"draw2d.shape.layout.StackLayout",init:function(t,e,n){this.visibleLayer=0,this.locator=new i.default.layout.locator.XYAbsPortLocator(0,0),this._super({resizeable:!0,width:10,height:10,...t},{...e},{...n}),this.resizeListener=()=>{},this.installEditPolicy(new i.default.policy.figure.RectangleSelectionFeedbackPolicy)},setVisibleLayer:function(t,e){return this.visibleLayer>=0&&this.getChildren().get(this.visibleLayer).setVisible(!1,e),this.visibleLayer=Math.min(this.getChildren().getSize()-1,Math.max(-1,t)),this.visibleLayer>=0&&this.getChildren().get(this.visibleLayer).setVisible(!0,e),this},getVisibleLayer:function(){return this.visibleLayer},add:function(t,e,n){return t.hitTest=()=>!1,this.getChildren().each(((t,e)=>{e.setVisible(!1)})),this.visibleLayer=this.getChildren().getSize(),this._super(t,this.locator,n)},setVisible:function(t){return i.default.shape.basic.Rectangle.prototype.setVisible.call(this,t),this},getMinWidth:function(){let t=2*this.stroke+this.padding.left+this.padding.right,e=10;return this.children.each(((t,n)=>{e=Math.max(e,n.figure.isResizeable()?n.figure.getMinWidth():n.figure.getWidth())})),e+t},getMinHeight:function(){let t=2*this.stroke+this.padding.top+this.padding.bottom,e=10;return this.children.each(((t,n)=>{e=Math.max(e,n.figure.isResizeable()?n.figure.getMinHeight():n.figure.getHeight())})),e+t},setDimension:function(t,e){this._super(t,e);let n=this.width-this.padding.left-this.padding.right,r=this.height-this.padding.top-this.padding.bottom;return n===this._recursiveWidth&&r===this._recursiveHeight||(this._recursiveHeight=r,this._recursiveWidth=n,this.children.each(((t,e)=>{e.figure.isResizeable()&&e.figure.setDimension(n,r)})),delete this._recursiveHeight,delete this._recursiveWidth),this}})},"./src/shape/layout/TableLayout.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.layout.TableLayout=i.default.shape.layout.Layout.extend({NAME:"draw2d.shape.layout.TableLayout",DUMMY_CELL:{getMinHeight:function(){return 1},getMinWidth:function(){return 1},off:function(){}},init:function(t,e,n){let r=this;this.cellLocator={relocate:function(t,e){if(!0===r.repaintBlocked)return;let n=e.__cell,i=r.getCellLayout(n.row,n.column),s=r.getWidth(),a=r.getMinWidth(),o=0;s!=a&&(o=(s-a)/r.layoutInfos[0].length*n.column);let c=e.getWidth(),l=e.getHeight(),h=i.x+r.padding.left+i.padding.left+o,u=i.y+r.padding.top+i.padding.top;if(e.isResizeable()){let t=Math.max(e.getMinWidth(),i.w-(i.padding.left+i.padding.right)+o),n=Math.max(e.getMinHeight(),i.h-(i.padding.top+i.padding.bottom));e.setDimension(t,n)}else{switch(i.valign){case"middle":u+=(i.h-(l+i.padding.top+i.padding.bottom))/2;break;case"bottom":u+=i.h-(l+i.padding.top+i.padding.bottom)}switch(i.align){case"center":h=h+(i.w-(c+i.padding.left+i.padding.right))/2+o/2;break;case"right":h=h+(i.w-(c+i.padding.left+i.padding.right))+o}}e.setPosition(h,u)},bind:function(){},unbind:function(){},translate:function(t,e){t.setPosition(t.x+e.x,t.y+e.y)}},this.padding={top:4,right:4,bottom:4,left:4},this.grid=[],this.layoutInfos=[],this.layoutInfos[0]=[],this.layoutInfos[0][0]={x:0,y:0,w:1,h:1,valign:"top",align:"left"},this._super(extend({stroke:1,resizeable:!1},t),extend({padding:this.setPadding},e),extend({padding:this.getPadding},n))},setCellPadding:function(t,e,n){let r=this.getCellLayout(t,e);return null===r||("number"==typeof n?r.padding={top:n,right:n,bottom:n,left:n}:extend(r.padding,n),this.calculateLayout(),this.setDimension(1,1)),this},getCellPadding:function(t,e){let n=this.getCellLayout(t,e);return null===n||void 0===n.padding?{top:0,right:0,bottom:0,left:0}:n.padding},setPadding:function(t){return this.padding="number"==typeof t?{top:t,right:t,bottom:t,left:t}:extend(this.padding,t),this.calculateLayout(),this.setDimension(1,1),this.fireEvent("change:padding",{value:this.padding}),this},getPadding:function(){return this.padding},setCanvas:function(t){return this._super(t),this.calculateLayout(),this.setDimension(2,2),this},add:function(t,e,n){return this._super(t,e,n),this.setDimension(1,1),this},removeRow:function(t){let e=this,n=this.grid.splice(t,1);return n[0].forEach((function(t){e.remove(t)})),this.calculateLayout(),this.setDimension(2,2),n},addRow:function(){let t=[],e=this,n=Array.prototype.slice.call(arguments),r=(this.grid.length,this.grid.length>0?Math.max(this.grid[0].length,n.length):n.length),s=[];n.forEach((function(e,n){"string"==typeof e&&(e=new i.default.shape.basic.Label({text:e})),s.push(e),t.push(e)})),this.grid.push(s),this.grid.forEach((function(t,n){let i=r-t.length;for(let n=0;n<i;n++)t.push(e.DUMMY_CELL)}));let a=this.repaintBlocked;return this.repaintBlocked=!0,t.forEach((function(t){e.add(t,e.cellLocator)})),this.repaintBlocked=a,this.calculateLayout(),this.setDimension(1,1),this},getMinWidth:function(){if(null===this.canvas||0===this.layoutInfos.length)return 10;let t=this.layoutInfos[this.layoutInfos.length-1],e=t[t.length-1];return e.w+e.x+this.padding.left+this.padding.right},getMinHeight:function(){if(null===this.canvas||0===this.layoutInfos.length)return 10;let t=this.layoutInfos[this.layoutInfos.length-1],e=t[t.length-1];return e.h+e.y+this.padding.top+this.padding.bottom},setCellVerticalAlign:function(t,e,n){let r=this.getCellLayout(t,e);if(null!==r){switch(n){case"top":case"middle":case"bottom":r.valign=n,this.calculateLayout(),this.setDimension(1,1)}return this}},getCellVerticalAlign:function(t,e){let n=this.getCellLayout(t,e);return null===n?"top":n.valign},setCellAlign:function(t,e,n){let r=this.getCellLayout(t,e);if(null!==r){switch(n){case"left":case"center":case"right":r.align=n,this.calculateLayout(),this.setDimension(1,1)}return this}},getCellAlign:function(t,e){let n=this.getCellLayout(t,e);return null===n?"left":n.align},getCellLayout:function(t,e){if(t<0||e<0)return null;if(t>=this.layoutInfos.length)return null;let n=this.layoutInfos[t];return e>=n.length?null:n[e]},calculateLayout:function(){let t=this.grid.length,e=this.grid.length>0?this.grid[0].length:0,n=[];for(let r=0;r<t;r++){n[r]=[];for(let t=0;t<e;t++)n[r][t]={width:0,height:0,x:0,y:0,valign:this.getCellVerticalAlign(r,t),align:this.getCellAlign(r,t),padding:this.getCellPadding(r,t)}}let r=new Array(e+1).join("0").split("").map(parseFloat),i=new Array(t+1).join("0").split("").map(parseFloat);this.grid.forEach((function(t,s){for(let a=0;a<e;a++){let e=n[s][a],o=t[a];o.__cell={row:s,column:a},i[s]=Math.max(i[s],o.getMinHeight()+e.padding.top+e.padding.bottom),r[a]=Math.max(r[a],o.getMinWidth()+e.padding.left+e.padding.right)}}));let s=0,a=0;for(let o=0;o<t;o++){for(let t=0;t<e;t++){let e=n[o][t];e.w=r[t],e.h=i[o],e.x=s,e.y=a,s+=e.w}a+=i[o],s=0}return this.layoutInfos=n,this}})},"./src/shape/layout/VerticalLayout.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.layout.VerticalLayout=i.default.shape.layout.Layout.extend({NAME:"draw2d.shape.layout.VerticalLayout",init:function(t,e,n){this.gap=0;let r=this;this.locator={translate:function(t,e){t.setPosition(t.x+e.x,t.y+e.y)},bind:function(){},unbind:function(){},relocate:function(t,e){let n=r.getStroke()+r.padding.top,i=r.padding.left;for(let e=0;e<t;e++){let t=r.children.get(e).figure;t.isVisible()&&(n+=t.getHeight()+r.gap)}e.setPosition(i,n)}},this._super(extend({width:10,height:10},t),extend({gap:this.setGap},e),extend({gap:this.getGap},n))},add:function(t,e,n){return this._super(t,this.locator,n),this.setDimension(1,1),this},setGap:function(t){this.gap=t,this.setDimension(1,1)},getMinWidth:function(){let t=2*this.stroke+this.padding.left+this.padding.right,e=10;return this.children.each((function(t,n){n.figure.isVisible()&&(e=Math.max(e,n.figure.isResizeable()?n.figure.getMinWidth():n.figure.getWidth()))})),e+t},getMinHeight:function(){let t=this,e=0,n=2*this.stroke+this.padding.top+this.padding.bottom,r=0;return this.children.each((function(n,i){i.figure.isVisible()&&(r+=(i.figure.isResizeable()?i.figure.getMinHeight():i.figure.getHeight())+e,e=t.gap)})),r+n},setDimension:function(t,e){this._super(t,e);let n=this.width-this.padding.left-this.padding.right;return n===this._recursiveWidth||(this._recursiveWidth=n,this.children.each((function(t,e){e.figure.isResizeable()&&e.figure.isVisible()&&e.figure.setDimension(n,e.figure.getMinHeight())})),delete this._recursiveWidth),this},getPersistentAttributes:function(){let t=this._super();return t.gap=this.gap,t},setPersistentAttributes:function(t){return this._super(t),"number"==typeof t.gap&&(this.gap=t.gap),this}})},"./src/shape/node/Between.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.node.Between=i.default.shape.basic.Rectangle.extend({NAME:"draw2d.shape.node.Between",DEFAULT_COLOR:new i.default.util.Color("#4D90FE"),init:function(t,e,n){this._super(extend({bgColor:this.DEFAULT_COLOR,color:this.DEFAULT_COLOR.darker(),width:50,height:50},t),e,n),this.createPort("output"),this.createPort("input")}})},"./src/shape/node/End.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.node.End=i.default.shape.basic.Rectangle.extend({NAME:"draw2d.shape.node.End",DEFAULT_COLOR:new i.default.util.Color("#4D90FE"),init:function(t,e,n){this._super(extend({bgColor:this.DEFAULT_COLOR,color:this.DEFAULT_COLOR.darker(),width:50,height:50},t),e,n),this.createPort("input")}})},"./src/shape/node/Fulcrum.js":(t,e,n)=>{"use strict";var r=i(n("./src/packages.js"));i(n("./src/util/JSONUtil.js"));function i(t){return t&&t.__esModule?t:{default:t}}r.default.shape.node.Fulcrum=r.default.shape.node.Hub.extend({NAME:"draw2d.shape.node.Fulcrum",init:function(t,e,n){this._super(extend({width:40,height:40},t),e,n),this.port.setConnectionAnchor(new r.default.layout.anchor.ConnectionAnchor(this.port)),this.port.setVisible(!0),this.port.hitTest=this.port._orig_hitTest,this.setConnectionDirStrategy(0),this.setColor(null),this.setRadius(10),this.setBackgroundColor(null),this.setStroke(0),this.installEditPolicy(new r.default.policy.figure.AntSelectionFeedbackPolicy)},repaint:function(t){return!0===this.repaintBlocked||null===this.shape?this:(t??={},t.fill??=this.bgColor.rgba(),this._super(t))}})},"./src/shape/node/HorizontalBus.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.node.HorizontalBus=i.default.shape.node.Hub.extend({NAME:"draw2d.shape.node.HorizontalBus",init:function(t,e,n){this._super(t,e,n),this.setConnectionDirStrategy(1),this.installEditPolicy(new i.default.policy.figure.HBusSelectionFeedbackPolicy)}})},"./src/shape/node/Hub.js":(t,e,n)=>{"use strict";var r=s(n("./src/packages.js")),i=s(n("./src/util/Color.js"));function s(t){return t&&t.__esModule?t:{default:t}}r.default.shape.node.Hub=r.default.shape.basic.Rectangle.extend({NAME:"draw2d.shape.node.Hub",DEFAULT_COLOR:new i.default("#4DF0FE"),BACKGROUND_COLOR:new i.default("#29AA77"),init:function(t,e,n){this.label=null,this._super({color:this.DEFAULT_COLOR.darker(),bgColor:this.BACKGROUND_COLOR,...t},extend({label:this.setLabel,text:this.setLabel},e),extend({label:this.getLabel,text:this.getLabel},n));let i=this.port=this.createPort("hybrid",new r.default.layout.locator.CenterLocator),s=r.default.geo.Rectangle;this.CONNECTION_DIR_STRATEGY=[function(t){return i.getParent().getBoundingBox().getDirection(t.getAbsolutePosition())},function(t){return i.getAbsoluteY()>t.getAbsoluteY()?s.DIRECTION_UP:s.DIRECTION_DOWN},function(t){return i.getAbsoluteX()>t.getAbsoluteX()?s.DIRECTION_LEFT:s.DIRECTION_RIGHT}],this.port.setGlow=this.setGlow.bind(this),this.port._orig_hitTest=this.port.hitTest,this.port.hitTest=this.hitTest.bind(this),this.port.setConnectionAnchor(new r.default.layout.anchor.ShortesPathConnectionAnchor(this.port)),this.port.setVisible(!1),this.port.setVisible=function(){},this.setConnectionDirStrategy(0)},delegateTarget:function(t){return this.getHybridPort(0).delegateTarget(t)},getMinWidth:function(){return null!==this.label?Math.max(this.label.getMinWidth(),this._super()):this._super()},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(t??={},void 0===t.fill&&(null!==this.bgColor?t.fill="90-"+this.bgColor.hash()+":5-"+this.bgColor.lighter(.3).hash()+":95":t.fill="none"),this._super(t))},setLabel:function(t){null===this.label?(this.label=new r.default.shape.basic.Label({text:t,color:"#0d0d0d",fontColor:"#0d0d0d",stroke:0}),this.add(this.label,new r.default.layout.locator.CenterLocator),this.label.setSelectionAdapter((()=>this)),this.label.delegateTarget=()=>this.port):this.label.setText(t)},setConnectionDirStrategy:function(t){switch(t){case 0:case 1:case 2:this.port.getConnectionDirection=this.CONNECTION_DIR_STRATEGY[t]}},getPersistentAttributes:function(){let t=this._super();return t.dirStrategy=this.CONNECTION_DIR_STRATEGY.indexOf(this.port.getConnectionDirection),null!==this.label&&(t.label=this.label.getText()),t},setPersistentAttributes:function(t){this._super(t),"number"==typeof t.dirStrategy&&this.setConnectionDirStrategy(t.dirStrategy),void 0!==t.label&&this.setLabel(t.label)}})},"./src/shape/node/Node.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.node.Node=i.default.Figure.extend({NAME:"draw2d.shape.node.Node",init:function(t,e,n){this.inputPorts=new i.default.util.ArrayList,this.outputPorts=new i.default.util.ArrayList,this.hybridPorts=new i.default.util.ArrayList,this.persistPorts=!0,this.portRelayoutRequired=!0,this.cachedPorts=null,this._super({width:50,height:50,...t},{persistPorts:this.setPersistPorts,...e},{persistPorts:this.getPersistPorts,...n})},setPersistPorts:function(t){return this.persistPorts=t,this.fireEvent("change:persistPorts",{value:this.persistPorts}),this},getPersistPorts:function(){return this.persistPorts},toFront:function(t){return this._super(t),this.getPorts().each(((e,n)=>{n.getConnections().each(((e,n)=>n.toFront(t))),n.toFront(this)})),this},toBack:function(t){return this.getPorts().each(((e,n)=>{n.getConnections().each(((e,n)=>n.toBack(t))),n.toBack(t)})),this._super(t),this},setVisible:function(t,e){t?this.getPorts().each(((t,n)=>{void 0!==n.__initialVisibilityState?n.setVisible(n.__initialVisibilityState,e):n.setVisible(!0,e),delete n.__initialVisibilityState})):this.getPorts().each(((t,n)=>{n.__initialVisibilityState=n.isVisible(),n.setVisible(!1,e)})),this._super(t,e)},getPorts:function(t){if("boolean"==typeof t&&!1===t){let t=new i.default.util.ArrayList;return t.addAll(this.inputPorts),t.addAll(this.outputPorts),t.addAll(this.hybridPorts),t}return null===this.cachedPorts&&(this.cachedPorts=new i.default.util.ArrayList,this.cachedPorts.addAll(this.inputPorts),this.cachedPorts.addAll(this.outputPorts),this.cachedPorts.addAll(this.hybridPorts),this.children.each(((t,e)=>{this.cachedPorts.addAll(e.figure.getPorts())}))),this.cachedPorts},getInputPorts:function(){return this.inputPorts.clone().addAll(this.hybridPorts)},getOutputPorts:function(){return this.outputPorts.clone().addAll(this.hybridPorts)},clone:function(t){t={excludePorts:!1,...t};let e=this._super(t);if(!1===t.excludePorts){e.resetPorts(),this.getPorts(!1).each((function(t,n){let r=n.clone(),i=n.getLocator().clone();e.addPort(r,i)}))}return e},getPort:function(t){return this.getPorts().find((e=>e.getName()===t))},getInputPort:function(t){return"number"==typeof t?this.inputPorts.get(t):this.inputPorts.find((e=>e.getName()===t))},getOutputPort:function(t){return"number"==typeof t?this.outputPorts.get(t):this.outputPorts.find((e=>e.getName()===t))},getHybridPort:function(t){return"number"==typeof t?this.hybridPorts.get(t):this.hybridPorts.find((e=>e.getName()===t))},addPort:function(t,e){if(!(t instanceof i.default.Port))throw"Argument is not typeof 'draw2d.Port'. \nFunction: draw2d.shape.node.Node#addPort";return null!==this.cachedPorts&&this.cachedPorts.add(t),this.portRelayoutRequired=!0,t instanceof i.default.InputPort?this.inputPorts.add(t):t instanceof i.default.OutputPort?this.outputPorts.add(t):t instanceof i.default.HybridPort&&this.hybridPorts.add(t),void 0!==e&&e instanceof i.default.layout.locator.Locator&&t.setLocator(e),t.setParent(this),t.setCanvas(this.canvas),t.setDeleteable(!1),null!==this.canvas&&(t.getShapeElement(),this.canvas.registerPort(t)),t},resetPorts:function(){return this.getPorts().each(((t,e)=>this.removePort(e))),this},removePort:function(t){if(this.portRelayoutRequired=!0,this.cachedPorts=null,this.inputPorts.remove(t),this.outputPorts.remove(t),this.hybridPorts.remove(t),null!==t.getCanvas()){let e=t.getCanvas();e.unregisterPort(t),t.getConnections().clone().each(((t,n)=>{e.remove(n)}))}return t.setCanvas(null),this},createPort:function(t,e){let n=null,r=0;switch(t){case"input":n=i.default.Configuration.factory.createInputPort(this),r=this.inputPorts.getSize();break;case"output":n=i.default.Configuration.factory.createOutputPort(this),r=this.outputPorts.getSize();break;case"hybrid":n=i.default.Configuration.factory.createHybridPort(this),r=this.hybridPorts.getSize();break;default:throw"Unknown type ["+t+"] of port requested"}return n.setName(t+r),this.addPort(n,e),this.setDimension(this.width,this.height),n},getConnections:function(){let t=new i.default.util.ArrayList,e=this.getPorts();for(let n=0;n<e.getSize();n++){let r=e.get(n);for(let e=0,n=r.getConnections().getSize();e<n;e++)t.contains(r.getConnections().get(e))||t.add(r.getConnections().get(e))}return t},setCanvas:function(t){let e=this.canvas;this._super(t);let n=this.getPorts();return null!==e&&n.each(((t,n)=>e.unregisterPort(n))),null!==t?(n.each(((e,n)=>{n.setCanvas(t),t.registerPort(n)})),this.setDimension(this.width,this.height)):n.each(((t,e)=>e.setCanvas(null))),this},setRotationAngle:function(t){return this.portRelayoutRequired=!0,this._super(t),this.layoutPorts(),this},setDimension:function(t,e){return this.portRelayoutRequired=!0,this._super(t,e),this},onPortValueChanged:function(t){},repaint:function(t){return!0===this.repaintBlocked||null===this.shape||(this._super(t),this.layoutPorts()),this},layoutPorts:function(){return!1===this.portRelayoutRequired||(this.portRelayoutRequired=!1,this.outputPorts.each(((t,e)=>e.locator.relocate(t,e))),this.inputPorts.each(((t,e)=>e.locator.relocate(t,e))),this.hybridPorts.each(((t,e)=>e.locator.relocate(t,e)))),this},createCommand:function(t){return null===t?null:t.getPolicy()===i.default.command.CommandType.ROTATE?new i.default.command.CommandRotate(this,(this.getRotationAngle()+90)%360):this._super(t)},getPersistentAttributes:function(){let t=this._super();return!0===this.persistPorts&&(t.ports=[],this.getPorts().each((function(e,n){t.ports.push({...n.getPersistentAttributes(),name:n.getName(),port:n.NAME,locator:n.getLocator().NAME,locatorAttr:n.getLocator().attr()})}))),t},setPersistentAttributes:function(t){return this._super(t),void 0!==t.ports&&(this.persistPorts=!0,this.resetPorts(),t.ports.forEach((t=>{let e=Function(`return new ${t.locator}()`)();t.locatorAttr&&e.attr(t.locatorAttr);let n=Function(`return new ${t.port}()`)();n.setPersistentAttributes(t),this.addPort(n,e)}))),this}})},"./src/shape/node/Start.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.node.Start=i.default.shape.basic.Rectangle.extend({NAME:"draw2d.shape.node.Start",DEFAULT_COLOR:new i.default.util.Color("#4D90FE"),init:function(t,e,n){this._super(extend({bgColor:this.DEFAULT_COLOR,color:this.DEFAULT_COLOR.darker(),width:50,height:50},t),e,n),this.createPort("output")}})},"./src/shape/node/VerticalBus.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.node.VerticalBus=i.default.shape.node.Hub.extend({NAME:"draw2d.shape.node.VerticalBus",init:function(t,e,n){this._super(t,e,n),this.setConnectionDirStrategy(2),this.installEditPolicy(new i.default.policy.figure.VBusSelectionFeedbackPolicy)},setLabel:function(t){let e=null===this.label;this._super(t),!0===e&&null!==this.label&&this.label.setRotationAngle(90)},getMinHeight:function(){return null===this.shape&&null===this.label?0:null!==this.label?this.label.getMinWidth():this._super()},getMinWidth:function(){return null===this.shape&&null===this.label?0:null!==this.label?this.label.getMinHeight():this._super()}})},"./src/shape/note/PostIt.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.note.PostIt=i.default.shape.basic.Label.extend({NAME:"draw2d.shape.note.PostIt",init:function(t,e,n){this._super(t,e,n),this.setStroke(1),this.setBackgroundColor("#5b5b5b"),this.setColor("#FFFFFF"),this.setFontColor("#ffffff"),this.setFontSize(14),this.setPadding(5),this.setRadius(5)}})},"./src/shape/pert/Activity.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.pert.Activity=i.default.shape.layout.VerticalLayout.extend({NAME:"draw2d.shape.pert.Activity",init:function(t,e,n){let r=this;this.mementoValues={duration:null},this.bgColor=new i.default.util.Color("#f3f3f3"),this.lighterBgColor=this.bgColor.lighter(.2).rgba(),this.darkerBgColor=this.bgColor.darker(.2).rgba(),this._super(extend({bgColor:this.bgColor,stroke:2,radius:2,color:this.darkerBgColor},t),e,n);let s=new i.default.shape.layout.HorizontalLayout({stroke:0});this.earlyStartLabel=this.createLabel("Early Start").setStroke(0),this.durationLabel=new i.default.shape.basic.Label({text:"Duration",stroke:1,color:this.darkerBgColor,radius:0,bgColor:null,padding:5}),this.durationLabel.installEditor(new i.default.ui.LabelEditor({onCommit:function(t){r.setDuration(parseFloat(t))}})),this.earlyEndLabel=this.createLabel({text:"Early End",stroke:0}),s.add(this.earlyStartLabel),s.add(this.durationLabel),s.add(this.earlyEndLabel),this.activityLabel=new i.default.shape.basic.Label({text:"Activity Name",radius:0,padding:10,color:this.darkerBgColor,bgColor:null}),this.activityLabel.installEditor(new i.default.ui.LabelInplaceEditor),this.inputPort=this.activityLabel.createPort("input"),this.inputPort.getActivity=function(){return r},this.inputPort.onConnect=function(){r.setDuration(r.mementoValues.duration)},this.inputPort.onDisconnect=function(){r.setDuration(r.mementoValues.duration)},this.inputPort.setValue=function(t){r.setDuration(r.mementoValues.duration)},this.outputPort=this.activityLabel.createPort("output"),this.outputPort.getActivity=function(){return r},this.outputPort.onConnect=function(){r.setDuration(r.mementoValues.duration)},this.outputPort.onDisconnect=function(){r.setDuration(r.mementoValues.duration)};let a=new i.default.shape.layout.HorizontalLayout({stroke:0});this.lateStartLabel=this.createLabel("Late Start").setStroke(0),this.stackLabel=this.createLabel("Stack"),this.lateEndLabel=this.createLabel("Late End").setStroke(0),a.add(this.lateStartLabel),a.add(this.stackLabel),a.add(this.lateEndLabel),this.add(s),this.add(this.activityLabel),this.add(a),this.setDuration(1)},setDuration:function(t){this.mementoValues.duration!==t&&(this.mementoValues.duration=t,this.durationLabel.setText(this.mementoValues.duration));let e=this.getEarlyStart();this.earlyStartLabel.setText(e),this.earlyEndLabel.setText(e+this.mementoValues.duration);let n=this.outputPort.getConnections();if(n.each((function(t,e){e.getTarget().setValue()})),0===n.getSize()){let t=parseFloat(this.earlyEndLabel.getText());this.setLateFinish(t)}},getEarlyEnd:function(){return this.getEarlyStart()+this.mementoValues.duration},getEarlyStart:function(){let t=0;return this.inputPort.getConnections().each((function(e,n){let r=n.getSource().getActivity();t=Math.max(t,r.getEarlyEnd())})),t},setLateFinish:function(t){let e=t-this.mementoValues.duration;this.lateEndLabel.setText(t),this.lateStartLabel.setText(e),this.stackLabel.setText(e-parseFloat(this.earlyStartLabel.getText())),this.inputPort.getConnections().each((function(t,n){n.getSource().getActivity().setLateFinish(e)}))},createLabel:function(t){let e=new i.default.shape.basic.Label({text:t});return e.setStroke(1),e.setColor(this.darkerBgColor),e.setRadius(0),e.setBackgroundColor(null),e.setPadding(5),e.setColor(this.bgColor.darker(.2)),e.onDoubleClick=function(t){},e},setBackgroundColor:function(t){this._super(t),this.lighterBgColor=this.bgColor.lighter(.2).rgba(),this.darkerBgColor=this.bgColor.darker(.2).rgba()},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(t??={},this.getAlpha()<.9?t.fill=this.bgColor.rgba():t.fill=["90",this.bgColor.hash(),this.lighterBgColor].join("-"),this._super(t))}})},"./src/shape/pert/Start.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.pert.Start=i.default.shape.layout.VerticalLayout.extend({NAME:"draw2d.shape.pert.Start",init:function(t,e,n){let r=this;this.mementoValues={duration:null},this.bgColor=new i.default.util.Color("#f3f3f3"),this.lighterBgColor=this.bgColor.lighter(.2).rgba(),this.darkerBgColor=this.bgColor.darker(.2).rgba(),this._super(extend({bgColor:this.bgColor,stroke:2,radius:2,color:this.darkerBgColor},t),e,n);let s=new i.default.shape.layout.HorizontalLayout({stroke:0});this.durationLabel=new i.default.shape.basic.Label({text:"Duration",stroke:1,color:this.darkerBgColor,radius:0,bgColor:null,padding:5}),this.durationLabel.installEditor(new i.default.ui.LabelEditor({text:"Enter new duration",onCommit:function(t){r.setDuration(parseFloat(t))}})),this.earlyEndLabel=this.createLabel({text:"Early End",stroke:0}),s.add(this.durationLabel),s.add(this.earlyEndLabel),this.activityLabel=new i.default.shape.basic.Label({text:"Start",radius:0,padding:10,color:this.darkerBgColor,bgColor:null}),this.activityLabel.installEditor(new i.default.ui.LabelInplaceEditor),this.outputPort=this.activityLabel.createPort("output"),this.outputPort.getActivity=function(){return r},this.outputPort.onConnect=function(){r.setDuration(r.mementoValues.duration)},this.outputPort.onDisconnect=function(){r.setDuration(r.mementoValues.duration)};let a=this.createLabel(" ");a.setPadding(10),a.setStroke(0),this.lateEndLabel=a,this.add(s),this.add(this.activityLabel),this.add(a),this.setDuration(1)},setDuration:function(t){this.mementoValues.duration!==t&&(this.mementoValues.duration=t,this.durationLabel.setText(this.mementoValues.duration)),this.earlyEndLabel.setText(this.mementoValues.duration);let e=this.outputPort.getConnections();if(e.each((function(t,e){e.getTarget().setValue()})),0===e.getSize()){let t=parseFloat(this.earlyEndLabel.getText());this.setLateFinish(t)}},getEarlyEnd:function(){return this.mementoValues.duration},setLateFinish:function(t){this.mementoValues.duration;this.lateEndLabel.setText(t)},createLabel:function(t){let e=new i.default.shape.basic.Label({text:t});return e.setStroke(1),e.setColor(this.darkerBgColor),e.setRadius(0),e.setBackgroundColor(null),e.setPadding(5),e.setColor(this.bgColor.darker(.2)),e.onDoubleClick=function(t){},e},setBackgroundColor:function(t){this._super(t),this.lighterBgColor=this.bgColor.lighter(.2).rgba(),this.darkerBgColor=this.bgColor.darker(.2).rgba()},repaint:function(t){!0!==this.repaintBlocked&&null!==this.shape&&(t??={},this.getAlpha()<.9?t.fill=this.bgColor.rgba():t.fill=["90",this.bgColor.hash(),this.lighterBgColor].join("-"),this._super(t))}})},"./src/shape/state/Connection.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.state.Connection=i.default.Connection.extend({NAME:"draw2d.shape.state.Connection",DEFAULT_COLOR:new i.default.util.Color("#4D90FE"),init:function(t,e,n){this._super(extend({router:null,stroke:2},t),e,n),this.setTargetDecorator(new i.default.decoration.connection.ArrowDecorator(17,8)),this.label=new i.default.shape.basic.Label({text:"label"}),this.label.setStroke(1),this.label.setPadding(2),this.label.setBackgroundColor("#f0f0f0"),this.add(this.label,new i.default.layout.locator.ParallelMidpointLocator)},setLabel:function(t){return this.label.setText(t),this.label.setVisible(!(null===t||""===t)),this.fireEvent("change:label",{value:t}),this},getLabel:function(){return this.label.getText()},getPersistentAttributes:function(){return extend(this._super(),{label:this.getLabel()})},setPersistentAttributes:function(t){this._super(t),void 0!==t.label&&this.setLabel(t.label)}})},"./src/shape/state/End.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.state.End=i.default.shape.basic.Circle.extend({NAME:"draw2d.shape.state.End",DEFAULT_COLOR:new i.default.util.Color("#4D90FE"),init:function(t,e,n){this.innerCircle=new i.default.shape.basic.Circle(20),this._super(t,e,n),this.port=this.createPort("input",new i.default.layout.locator.TopLocator),this.port.setConnectionAnchor(new i.default.layout.anchor.ShortesPathConnectionAnchor(this.port)),this.setDimension(50,50),this.setBackgroundColor(this.DEFAULT_COLOR),this.installEditPolicy(new i.default.policy.figure.AntSelectionFeedbackPolicy),this.innerCircle.setStroke(2),this.innerCircle.setBackgroundColor(null),this.add(this.innerCircle,new i.default.layout.locator.CenterLocator),this.setStroke(0)},setDimension:function(t,e){this._super(t,e),this.innerCircle.setDimension(this.getWidth()-10,this.getHeight()-10)}})},"./src/shape/state/Start.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.state.Start=i.default.shape.basic.Circle.extend({NAME:"draw2d.shape.state.Start",DEFAULT_COLOR:new i.default.util.Color("#3369E8"),init:function(t,e,n){this._super(t,e,n),this.port=this.createPort("output",new i.default.layout.locator.BottomLocator),this.port.setConnectionAnchor(new i.default.layout.anchor.ShortesPathConnectionAnchor(this.port)),this.setDimension(50,50),this.setBackgroundColor(this.DEFAULT_COLOR),this.installEditPolicy(new i.default.policy.figure.AntSelectionFeedbackPolicy),this.setStroke(0);let r=new i.default.shape.basic.Label({text:"START"});r.setStroke(0),r.setFontColor("#ffffff"),r.setFontFamily('"Open Sans",sans-serif'),this.add(r,new i.default.layout.locator.CenterLocator)}})},"./src/shape/state/State.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.state.State=i.default.shape.layout.VerticalLayout.extend({NAME:"draw2d.shape.state.State",init:function(t,e,n){this._super(t,e,n),this.port=this.createPort("hybrid",new i.default.layout.locator.BottomLocator),this.port.setConnectionAnchor(new i.default.layout.anchor.ChopboxConnectionAnchor(this.port)),this.setBackgroundColor("#f3f3f3"),this.setStroke(1),this.setColor("#e0e0e0"),this.setRadius(5);let r=this.createLabel("State").setStroke(0);this.label=r;let s=new i.default.shape.basic.Rectangle;s.getHeight=function(){return 1},s.setMinWidth(90),s.setColor("#e0e0e0");let a=new i.default.shape.basic.Rectangle;a.setMinHeight(30),a.setStroke(0),a.setBackgroundColor(null),this.add(r),this.add(s),this.add(a)},setLabel:function(t){return this.label.setText(t),this.fireEvent("change:label",{value:t}),this},getLabel:function(){return this.label.getText()},createLabel:function(t){let e=new i.default.shape.basic.Label(t);return e.setStroke(1),e.setColor(this.darkerBgColor),e.setRadius(0),e.setBackgroundColor(null),e.setPadding(5),e.setColor(this.bgColor.darker(.2)),e.onDoubleClick=function(t){},e},getPersistentAttributes:function(){return extend(this._super(),{label:this.getLabel()})},setPersistentAttributes:function(t){this._super(t),void 0!==t.label&&this.setLabel(t.label)}})},"./src/shape/widget/Slider.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r},s=n("./node_modules/shifty/dist/shifty.js");i.default.shape.widget.Slider=i.default.shape.widget.Widget.extend({NAME:"draw2d.shape.widget.Slider",DEFAULT_COLOR_THUMB:new i.default.util.Color("#bddf69"),DEFAULT_COLOR_BG:new i.default.util.Color("#d3d3d3"),init:function(t,e,n){this.currentValue=0,this.slideBoundingBox=new i.default.geo.Rectangle(0,0,10,20),this.padding={top:4,right:4,bottom:4,left:4},this.panning=!1,this.thumbGrow=0,this._super({width:150,height:15,stroke:1,radius:4,resizeable:!0,color:this.DEFAULT_COLOR_THUMB,bgColor:this.DEFAULT_COLOR_BG,value:50,...t},extend({padding:this.setPadding,value:this.setValue},e),extend({padding:this.getPadding,value:this.getValue},n)),this.setMinHeight(15),this.setMinWidth(80)},createSet:function(){let t=this.canvas.paper.set(),e=this.canvas.paper.rect(0,0,10,20);return e.node.style.cursor="col-resize",t.push(e),t},setDimension:function(t,e){this._super(t,e),this.slideBoundingBox.setBoundary(this.padding.left,0,this.getWidth()-this.padding.right,this.getHeight()),this.slideBoundingBox.setHeight(this.getHeight()+1),this.repaint()},setPadding:function(t){return this.clearCache(),this.padding="number"==typeof t?{top:t,right:t,bottom:t,left:t}:extend(this.padding,t),this.repaint(),this.fireEvent("change:padding",{value:this.padding}),this},getPadding:function(){return this.padding},onValueChange:function(t){},onDragStart:function(t,e,n,r){if(this.slideBoundingBox.hitTest(t,e)){this.panningX=t,this.panningY=e,this.panning=!0;let n=new s.Tweenable;return n.tween({from:{grow:this.thumbGrow},to:{grow:10},duration:500,easing:"easeOutQuart",step:function(t){this.thumbGrow=t.grow,this.repaint()}.bind(this),finish:function(){n.dispose()}}),!1}return this._super(t,e,n,r)},onPanning:function(t,e,n,r){let i=this.getWidth(),s=i-this.padding.left-this.padding.right,a=Math.min(i,Math.max(0,this.panningX+t)),o=Math.min(i-this.padding.left-this.padding.right,a);this.setValue(100/s*o)},onPanningEnd:function(){this.panning=!1;let t=new s.Tweenable;t.tween({from:{grow:this.thumbGrow},to:{grow:0},duration:300,easing:"easeOutQuart",step:function(t){this.thumbGrow=t.grow,this.repaint()}.bind(this),finish:function(){t.dispose()}}),this.thumbGrow=0,this.repaint()},setValue:function(t){return this.currentValue=Math.min(Math.max(0,0|t),100),this.repaint(),this.onValueChange(this.currentValue),this.fireEvent("change:value",{value:this.currentValue}),this},getValue:function(){return this.currentValue},repaint:function(t){if(!0===this.repaintBlocked||null===this.shape)return;t??={};let e=(this.getWidth()-this.padding.left-this.padding.right)/100*this.currentValue+this.padding.left|0;if(this.slideBoundingBox.setX(e),null!==this.svgNodes){let t=this.slideBoundingBox.toJSON();t.y-=this.thumbGrow/2,t.height+=this.thumbGrow,t.fill=this.getColor().rgba(),t.stroke=this.getColor().darker(.2).rgba(),t.r=4,this.svgNodes.attr(t)}t.fill="90-"+this.bgColor.hash()+":5-"+this.bgColor.lighter(.3).hash()+":95",t.stroke=this.bgColor.darker(.1).rgba(),this._super(t)},applyTransformation:function(){return this.svgNodes.transform("T"+this.getAbsoluteX()+","+this.getAbsoluteY()),this}})},"./src/shape/widget/Widget.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.shape.widget.Widget=i.default.SetFigure.extend({init:function(t,e,n){this._super(t,e,n)}})},"./src/ui/LabelEditor.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.ui.LabelEditor=Class.extend({NAME:"draw2d.ui.LabelEditor",init:function(t){this.configuration={onCommit:()=>{},onCancel:()=>{},onStart:()=>{},text:"Value",...t}},start:function(t){this.configuration.onStart();let e=prompt(this.configuration.text,t.getText());if(e){let n=new i.default.command.CommandAttr(t,{text:e});t.getCanvas().getCommandStack().execute(n),this.configuration.onCommit(t.getText())}else this.configuration.onCancel()}})},"./src/ui/LabelInplaceEditor.js":(t,e,n)=>{"use strict";var r=i(n("./src/packages.js"));i(n("./src/lib/jquery.autoresize.js"));function i(t){return t&&t.__esModule?t:{default:t}}r.default.ui.LabelInplaceEditor=r.default.ui.LabelEditor.extend({NAME:"draw2d.ui.LabelInplaceEditor",init:function(t){this._super(),this.listener=extend({onCommit:function(){},onCancel:function(){},onStart:function(){}},t)},start:function(t){this.label=t,this.commitCallback=this.commit.bind(this),$("body").bind("click",this.commitCallback),this.html=$('<input id="inplaceeditor">'),this.html.val(t.getText()),this.html.hide(),$("body").append(this.html),this.html.autoResize(),this.html.bind("keyup",function(t){switch(t.which){case 13:this.commit();break;case 27:this.cancel()}}.bind(this)),this.html.bind("blur",this.commitCallback),this.html.bind("click",(function(t){t.stopPropagation(),t.preventDefault()}));var e=this.label.getCanvas(),n=this.label.getBoundingBox();n.setPosition(e.fromCanvasToDocumentCoordinate(n.x,n.y)),e.getScrollArea().is($("body"))&&n.translate(e.getScrollLeft(),e.getScrollTop()),n.translate(-1,-1),n.resize(2,2),this.html.css({position:"absolute",top:n.y,left:n.x,"min-width":n.w*(1/e.getZoom()),height:Math.max(25,n.h*(1/e.getZoom()))}),this.html.fadeIn((()=>{this.html.focus(),this.listener.onStart()}))},commit:function(){this.html.unbind("blur",this.commitCallback),$("body").unbind("click",this.commitCallback);var t=this.html.val(),e=new r.default.command.CommandAttr(this.label,{text:t});this.label.getCanvas().getCommandStack().execute(e),this.html.fadeOut((()=>{this.html.remove(),this.html=null,this.listener.onCommit(this.label.getText())}))},cancel:function(){this.html.unbind("blur",this.commitCallback),$("body").unbind("click",this.commitCallback),this.html.fadeOut((()=>{this.html.remove(),this.html=null,this.listener.onCancel()}))}})},"./src/util/ArrayList.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.ArrayList=Class.extend({init:function(t){Array.isArray(t)?this.data=t:this.data=[]},clear:function(){return this.data=[],this},reverse:function(){return this.data.reverse(),this},getSize:function(){return this.data.length},isEmpty:function(){return 0===this.getSize()},last:function(){return this.data[this.data.length-1]},asArray:function(){return this.data},first:function(){return this.data.length>0?this.data[0]:null},get:function(t){return this.data[t]},add:function(...t){return this.data.push(...t),this},grep:function(t){return this.data=this.data.filter(t),this},find:function(t){return this.data.find(t)},map:function(t){return this.data=this.data.map(t),this},unique:function(){return this.data=this.data.filter(((t,e,n)=>n.indexOf(t)===e)),this},addAll:function(t,e){if(!(t instanceof i.default.util.ArrayList))throw"Unable to handle unknown object type in ArrayList.addAll";return this.data=this.data.concat(t.data),e&&this.unique(),this},pop:function(){return this.removeElementAt(this.data.length-1)},push:function(t){this.add(t)},remove:function(t){let e=this.indexOf(t);return e>=0?this.removeElementAt(e):null},insertElementAt:function(t,e){return this.data.splice(e,0,t),this},removeElementAt:function(t){let e=this.data[t];return this.data.splice(t,1),e},removeAll:function(t){return t instanceof i.default.util.ArrayList&&(t=t.data),Array.isArray(t)&&t.forEach((t=>{this.remove(t)})),this},indexOf:function(t){return this.data.indexOf(t)},contains:function(t){return this.data.includes(t)},sort:function(t){return"function"==typeof t?this.data.sort(t):this.data.sort((function(e,n){return e[t]<n[t]?-1:e[t]>n[t]?1:0})),this},clone:function(t){let e=new i.default.util.ArrayList;if(t)for(let t=0;t<this.data.length;t++)e.data.push(this.data[t].clone());else e.data=this.data.slice(0);return e},each:function(t,e){if(void 0!==e&&!0===e)for(let e=this.data.length-1;e>=0&&!1!==t(e,this.data[e]);e--);else for(let e=0;e<this.data.length&&!1!==t(e,this.data[e]);e++);return this},overwriteElementAt:function(t,e){return this.data[e]=t,this},getPersistentAttributes:function(){return{data:this.data}},setPersistentAttributes:function(t){return this.data=t.data,this}}),i.default.util.ArrayList.EMPTY_LIST=new i.default.util.ArrayList},"./src/util/Base64.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.Base64={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",ENCODED_VALS:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ENCODED_VALS_WEBSAFE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.",encodeByteArray:function(t,e){i.default.util.Base64.init();for(var n=e?i.default.util.Base64.byteToCharMapWebSafe_:i.default.util.Base64.byteToCharMap_,r=[],s=0;s<t.length;s+=3){var a=t[s],o=s+1<t.length,c=o?t[s+1]:0,l=s+2<t.length,h=l?t[s+2]:0,u=a>>2,d=(3&a)<<4|c>>4,p=(15&c)<<2|h>>6,f=63&h;l||(f=64,o||(p=64)),r.push(n[u],n[d],n[p],n[f])}return r.join("")},encode:function(t,e){return i.default.util.Base64.encodeByteArray(i.default.util.Base64.stringToByteArray(t),e)},decode:function(t,e){i.default.util.Base64.init();for(var n=e?i.default.util.Base64.charToByteMapWebSafe_:i.default.util.Base64.charToByteMap_,r=[],s=0;s<t.length;){var a=n[t.charAt(s++)],o=s<t.length?n[t.charAt(s)]:0,c=++s<t.length?n[t.charAt(s)]:0,l=++s<t.length?n[t.charAt(s)]:0;if(++s,null==a||null==o||null==c||null==l)throw Error();var h=a<<2|o>>4;if(r.push(h),64!=c){var u=o<<4&240|c>>2;if(r.push(u),64!=l){var d=c<<6&192|l;r.push(d)}}}return r},stringToByteArray:function(t){for(var e=[],n=0,r=0;r<t.length;r++){for(var i=t.charCodeAt(r);i>255;)e[n++]=255&i,i>>=8;e[n++]=i}return e},init:function(){if(!i.default.util.Base64.byteToCharMap_){i.default.util.Base64.byteToCharMap_={},i.default.util.Base64.charToByteMap_={},i.default.util.Base64.byteToCharMapWebSafe_={},i.default.util.Base64.charToByteMapWebSafe_={};for(var t=0;t<i.default.util.Base64.ENCODED_VALS.length;t++)i.default.util.Base64.byteToCharMap_[t]=i.default.util.Base64.ENCODED_VALS.charAt(t),i.default.util.Base64.charToByteMap_[i.default.util.Base64.byteToCharMap_[t]]=t,i.default.util.Base64.byteToCharMapWebSafe_[t]=i.default.util.Base64.ENCODED_VALS_WEBSAFE.charAt(t),i.default.util.Base64.charToByteMapWebSafe_[i.default.util.Base64.byteToCharMapWebSafe_[t]]=t}}}},"./src/util/Color.js":(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.Color=Class.extend({init:function(t,e,n,r){if(this.hashString=null,null==t)this.hashString="none";else if(t instanceof i.default.util.Color)"none"===t.hashString?this.hashString="none":(this.red=t.red,this.green=t.green,this.blue=t.blue,this.alpha=t.alpha);else if("string"==typeof t)if("none"===t)this.hashString="none";else{let e=this.hex2rgb(t);this.red=e[0],this.green=e[1],this.blue=e[2],this.alpha=e[3]}else"object"==typeof t&&"number"==typeof t.red?(this.red=t.red,this.green=t.green,this.blue=t.blue,this.alpha=t.alpha):t instanceof Array&&3===t.length||"object"==typeof t&&"number"==typeof t.length&&3===t.length?(this.red=t[0],this.green=t[1],this.blue=t[2],this.alpha=t[3]):(this.red=parseInt(t),this.green=parseInt(e),this.blue=parseInt(n),this.alpha=void 0===r?1:parseFloat(r))},getHTMLStyle:function(){return void 0===this.red?"rgba(0,0,0,0)":"rgba("+this.red+","+this.green+","+this.blue+","+this.alpha+")"},getRed:function(){return this.red},getGreen:function(){return this.green},getBlue:function(){return this.blue},getAlpha:function(){return this.alpha},getIdealTextColor:function(){return 255-(.299*this.red+.587*this.green+.114*this.blue)<105?new i.default.util.Color(0,0,0):new i.default.util.Color(255,255,255)},hex2rgb:function(t){if(!t)return[0,0,0,1];if("transparent"===t.toLowerCase())return[0,0,0,0];if("#"===t[0])return t.length<7&&(t="#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+(t.length>4?t[4]+t[4]:"")),[parseInt(t.substr(1,2),16),parseInt(t.substr(3,2),16),parseInt(t.substr(5,2),16),t.length>7?parseInt(t.substr(7,2),16)/255:1];if(-1===t.indexOf("rgb")){let e=document.body.appendChild(document.createElement("fictum")),n="rgb(1, 2, 3)";if(e.style.color=n,e.style.color!==n)return[0,0,0,1];if(e.style.color=t,e.style.color===n||""===e.style.color)return[0,0,0,1];t=getComputedStyle(e).color,document.body.removeChild(e)}return 0===t.indexOf("rgb")?(-1===t.indexOf("rgba")&&(t+=",1"),t.match(/[\.\d]+/g).map((t=>+t))):void 0},hex:function(){return this.int2hex(this.red)+this.int2hex(this.green)+this.int2hex(this.blue)},rgba:function(){return this.getHTMLStyle()},hash:function(){return null===this.hashString&&(this.hashString="#"+this.hex()),this.hashString},int2hex:function(t){return t=Math.round(Math.min(Math.max(0,t),255)),"0123456789ABCDEF".charAt((t-t%16)/16)+"0123456789ABCDEF".charAt(t%16)},darker:function(t){if("none"===this.hashString)return this;t=void 0===t?.1:t;let e=parseInt(Math.round(this.getRed()*(1-t))),n=parseInt(Math.round(this.getGreen()*(1-t))),r=parseInt(Math.round(this.getBlue()*(1-t)));return e<0?e=0:e>255&&(e=255),n<0?n=0:n>255&&(n=255),r<0?r=0:r>255&&(r=255),new i.default.util.Color(e,n,r,this.alpha)},lighter:function(t){if("none"===this.hashString)return this;t=void 0===t?.1:t;let e=parseInt(Math.round(this.getRed()*(1+t))),n=parseInt(Math.round(this.getGreen()*(1+t))),r=parseInt(Math.round(this.getBlue()*(1+t)));return e<0?e=0:e>255&&(e=255),n<0?n=0:n>255&&(n=255),r<0?r=0:r>255&&(r=255),new i.default.util.Color(e,n,r,this.alpha)},fadeTo:function(t,e){let n=Math.floor(this.red+e*(t.red-this.red)+.5),r=Math.floor(this.green+e*(t.green-this.green)+.5),s=Math.floor(this.blue+e*(t.blue-this.blue)+.5),a=Math.floor(this.alpha+e*(t.alpha-this.alpha)+.5);return new i.default.util.Color(n,r,s,a)},equals:function(t){return t instanceof i.default.util.Color&&this.rgba()===t.rgba()}});e.default=i.default.util.Color;t.exports=e.default},"./src/util/Debug.js":()=>{"use strict";window.debug=function(){for(var t,e,n=this,r=Array.prototype.slice,i=console,s={},a=9,o=["error","warn","info","debug","log"],c="assert clear count dir dirxml exception group groupCollapsed groupEnd profile profileEnd table time timeEnd trace".split(" "),l=c.length,h=[];--l>=0;)!function(t){s[t]=function(){0!==a&&i&&i[t]&&i[t].apply(i,arguments)}}(c[l]);for(l=o.length;--l>=0;)!function(t,e){s[e]=function(){var s=r.call(arguments),a=[e].concat(s);h.push(a),u(a),i&&d(t)&&(i.firebug?i[e].apply(n,s):i[e]?i[e](s):i.log(s))}}(l,o[l]);function u(r){!t||!e&&i&&i.log||t.apply(n,r)}function d(t){return a>0?a>t:o.length+a<=t}return s.setLevel=function(t){a="number"==typeof t?t:9},s.setCallback=function(){var n=r.call(arguments),i=h.length,s=i;for(t=n.shift()||null,e="boolean"==typeof n[0]&&n.shift(),s-="number"==typeof n[0]?n.shift():i;s<i;)u(h[s++])},s}()},"./src/util/JSONUtil.js":(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.JSON={set:function(t,e,n){if(!e||""===e)return;let r,i=e.match(/[\w-]+|\[\]|([^\[[\w]\]]|["'](.*?)['"])/g),s=t,a=null,o=null,c=function(t,e,n){"[]"===e?t.push(n):t[e]=n};for(;i.length>0;)r=i.shift().replace(/["']/g,""),isNaN(+r)&&"[]"!==r?"string"==typeof r&&($.isPlainObject(s)||(s={},c(a,o,s))):s.constructor!==Array&&(s=[],c(a,o,s)),a=s,o=r,s=s[r];c(a,o,n)},get:function(t,e){if(!e)return;let n=e.match(/[\w-]+|\[\]|([^\[[\w]\]]|["'](.*?)['"])/g);for(;null!==t&&n.length>0;){if(!t.propertyIsEnumerable(n[0].replace(/"/g,"")))return;t=t[n.shift().replace(/"/g,"")]}return t},diff:function(t,e){let n={};for(let r in t){let i=t[r],s=e[r];i!==s&&(i.equals&&i.equals(s)||(n[r]=t[r]))}return n},flatDiff:function(t,e){let n={};for(let r in t)t[r]!==e[r]&&(n[r]=t[r]);return n},ensureDefault:function(t,e,n){t.hasOwnProperty(e)||(t[e]=n)}};e.default=i.default.util.JSON;t.exports=e.default},"./src/util/Polyfill.js":()=>{"use strict";document.ontouchmove=function(t){t.preventDefault()}},"./src/util/SVGUtil.js":()=>{"use strict";Raphael.fn.polygon=function(t){for(var e=["M"],n=t.split(" "),r=0;r<n.length;r++){for(var i=n[r].split(","),s=0;s<i.length;s++){var a=parseFloat(i[s]);isNaN(a)||e.push(a)}0==r&&e.push("L")}return e.push("Z"),this.path(e)}},"./src/util/UUID.js":(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.UUID={create:function(){let t=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return t()+t()+"-"+t()+"-"+t()+"-"+t()+"-"+t()+t()+t()}};e.default=i.default.util.UUID;t.exports=e.default},"./src/util/extend.js":(t,e,n)=>{"use strict";let r=function(){let t={},e=!1,n=0,r=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],n++);let i=function(n){for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e&&"[object Object]"===Object.prototype.toString.call(n[r])?t[r]=extend(!0,t[r],n[r]):t[r]=n[r])};for(;n<r;n++){i(arguments[n])}return t};t.exports=r,n.g.extend=r},"./src/util/raphael_ext.js":()=>{"use strict";Raphael.el.isVisible=function(){return"none"!==this.node.style.display}},"./src/util/spline/BezierSpline.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.spline.BezierSpline=i.default.util.spline.Spline.extend({NAME:"draw2d.util.spline.BezierSpline",init:function(){this._super()},generate:function(t,e){var n=t.getSize();if(n<4)return t.clone(!0);var r=new i.default.util.ArrayList;r.add(this.p(0,0,t));for(var s=0;s<n-3;s+=3)for(var a=1;a<=e;a++)r.add(this.p(s,a/e,t));return r},p:function(t,e,n){for(var r=0,s=0,a=t,o=0;o<=3;o++){var c=this.blend(o,e),l=n.get(a++);r+=c*l.x,s+=c*l.y}return new i.default.geo.Point(r,s)},blend:function(t,e){return 0==t?(1-e)*(1-e)*(1-e):1==t?3*e*(1-e)*(1-e):2==t?3*e*e*(1-e):e*e*e}})},"./src/util/spline/CatmullRomSpline.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.spline.CatmullRomSpline=i.default.util.spline.CubicSpline.extend({NAME:"draw2d.util.spline.CatmullRomSpline",init:function(){this._super()},blend:function(t,e){return-2==t?((2-e)*e-1)*e/2:-1==t?((3*e-5)*e*e+2)/2:0==t?((-3*e+4)*e+1)*e/2:(e-1)*e*e/2}})},"./src/util/spline/CubicSpline.js":(t,e,n)=>{"use strict";var r,i=(r=n("./src/packages.js"))&&r.__esModule?r:{default:r};i.default.util.spline.CubicSpline=i.default.util.spline.Spline.extend({NAME:"draw2d.util.spline.CubicSpline",init:function(){this._super()},generate:function(t,e){if(r<3)return t.clone(!0);var n=new i.default.util.ArrayList;n.add(t.get(0)),n.addAll(t),n.add(t.get(t.getSize()-1));var r=n.getSize(),s=new i.default.util.ArrayList;s.add(t.get(0)),s.add(this.p(1,0,n));for(var a=1;a<r-2;a++)for(var o=1;o<=e;o++)s.add(this.p(a,o/e,n));return s.add(t.get(t.getSize()-1)),s},p:function(t,e,n){for(var r=0,s=0,a=t-1,o=-2;o<=1;o++){var c=this.blend(o,e),l=n.get(a++);l||console.log("error"),r+=c*l.x,s+=c*l.y}return new i.default.geo.Point(r,s)},blend:function(t,e){return-2===t?(((3-e)*e-3)*e+1)/6:-1===t?((3*e-6)*e*e+4)/6:0===t?(((-3*e+3)*e+3)*e+1)/6:e*e*e/6}})},"./src/util/spline/Spline.js":(t,e,n)=>{"use strict";var r;((r=n("./src/packages.js"))&&r.__esModule?r:{default:r}).default.util.spline.Spline=Class.extend({NAME:"draw2d.util.spline.Spline",init:function(){},generate:function(t,e){throw"inherit classes must implement the method 'draw2d.util.spline.Spline.generate()'"}})},"./node_modules/css-loader/dist/cjs.js!./src/css/contextmenu.css":(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var r=n("./node_modules/css-loader/dist/runtime/sourceMaps.js"),i=n.n(r),s=n("./node_modules/css-loader/dist/runtime/api.js"),a=n.n(s)()(i());a.push([t.id,'\n\n/*!\n * jQuery contextMenu - Plugin for simple contextMenu handling\n *\n * Version: 1.5.24\n *\n * Authors: Rodney Rehm, Addy Osmani (patches for FF)\n * Web: http://medialize.github.com/jQuery-contextMenu/\n *\n * Licensed under\n * MIT License http://www.opensource.org/licenses/mit-license\n * GPL v3 http://opensource.org/licenses/GPL-3.0\n *\n */\n.context-menu-list {\n margin:0;\n padding:0;\n\n min-width: 120px;\n max-width: 250px;\n display: inline-block;\n position: absolute;\n list-style-type: none;\n\n border: 1px solid #DDD;\n background: #EEE;\n\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\n -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\n -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\n -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\n\n font-family: Verdana, Arial, Helvetica, sans-serif;\n font-size: 11px;\n}\n\n.context-menu-item {\n padding: 2px 2px 2px 24px;\n background-color: #EEE;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: -moz-none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.context-menu-separator {\n padding-bottom:0;\n border-bottom: 1px solid #DDD;\n}\n\n.context-menu-item > label > input,\n.context-menu-item > label > textarea {\n -webkit-user-select: text;\n -moz-user-select: text;\n -ms-user-select: text;\n user-select: text;\n}\n\n.context-menu-item.hover {\n cursor: pointer;\n background-color: #39F;\n}\n\n.context-menu-item.disabled {\n color: #666;\n}\n\n.context-menu-input.hover,\n.context-menu-item.disabled.hover {\n cursor: default;\n background-color: #EEE;\n}\n\n.context-menu-submenu:after {\n content: ">";\n color: #666;\n position: absolute;\n top: 0;\n right: 3px;\n z-index: 1;\n}\n\n/* icons\n #protip:\n In case you want to use sprites for icons (which I would suggest you do) have a look at\n http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement\n .context-menu-item.icon:before {}\n */\n.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }\n\n/* vertically align inside labels */\n.context-menu-input > label > * { vertical-align: top; }\n\n/* position checkboxes and radios as icons */\n.context-menu-input > label > input[type="checkbox"],\n.context-menu-input > label > input[type="radio"] {\n margin-left: -17px;\n}\n.context-menu-input > label > span {\n margin-left: 5px;\n}\n\n.context-menu-input > label,\n.context-menu-input > label > input[type="text"],\n.context-menu-input > label > textarea,\n.context-menu-input > label > select {\n display: block;\n width: 100%;\n\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n -ms-box-sizing: border-box;\n -o-box-sizing: border-box;\n box-sizing: border-box;\n}\n\n.context-menu-input > label > textarea {\n height: 100px;\n}\n.context-menu-item > .context-menu-list {\n display: none;\n /* re-positioned by js */\n right: -5px;\n top: 5px;\n}\n\n.context-menu-item.hover > .context-menu-list {\n display: block;\n}\n\n.context-menu-accesskey {\n text-decoration: underline;\n}\n',"",{version:3,sources:["webpack://./src/css/contextmenu.css"],names:[],mappings:";;AAEA;;;;;;;;;;;;EAYE;AACF;IACI,QAAQ;IACR,SAAS;;IAET,gBAAgB;IAChB,gBAAgB;IAChB,qBAAqB;IACrB,kBAAkB;IAClB,qBAAqB;;IAErB,sBAAsB;IACtB,gBAAgB;;IAEhB,gDAAgD;OAC7C,6CAA6C;QAC5C,4CAA4C;SAC3C,2CAA2C;YACxC,wCAAwC;;IAEhD,kDAAkD;IAClD,eAAe;AACnB;;AAEA;IACI,yBAAyB;IACzB,sBAAsB;IACtB,kBAAkB;IAClB,yBAAyB;OACtB,2BAA2B;QAC1B,qBAAqB;YACjB,iBAAiB;AAC7B;;AAEA;IACI,gBAAgB;IAChB,6BAA6B;AACjC;;AAEA;;IAEI,yBAAyB;OACtB,sBAAsB;QACrB,qBAAqB;YACjB,iBAAiB;AAC7B;;AAEA;IACI,eAAe;IACf,sBAAsB;AAC1B;;AAEA;IACI,WAAW;AACf;;AAEA;;IAEI,eAAe;IACf,sBAAsB;AAC1B;;AAEA;IACI,YAAY;IACZ,WAAW;IACX,kBAAkB;IAClB,MAAM;IACN,UAAU;IACV,UAAU;AACd;;AAEA;;;;;EAKE;AACF,0BAA0B,gBAAgB,EAAE,4BAA4B,EAAE,4BAA4B,EAAE;;AAExG,mCAAmC;AACnC,kCAAkC,mBAAmB,EAAE;;AAEvD,4CAA4C;AAC5C;;IAEI,kBAAkB;AACtB;AACA;IACI,gBAAgB;AACpB;;AAEA;;;;IAII,cAAc;IACd,WAAW;;IAEX,8BAA8B;OAC3B,2BAA2B;QAC1B,0BAA0B;SACzB,yBAAyB;YACtB,sBAAsB;AAClC;;AAEA;IACI,aAAa;AACjB;AACA;IACI,aAAa;IACb,wBAAwB;IACxB,WAAW;IACX,QAAQ;AACZ;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,0BAA0B;AAC9B",sourcesContent:['\r\n\r\n/*!\r\n * jQuery contextMenu - Plugin for simple contextMenu handling\r\n *\r\n * Version: 1.5.24\r\n *\r\n * Authors: Rodney Rehm, Addy Osmani (patches for FF)\r\n * Web: http://medialize.github.com/jQuery-contextMenu/\r\n *\r\n * Licensed under\r\n * MIT License http://www.opensource.org/licenses/mit-license\r\n * GPL v3 http://opensource.org/licenses/GPL-3.0\r\n *\r\n */\r\n.context-menu-list {\r\n margin:0;\r\n padding:0;\r\n\r\n min-width: 120px;\r\n max-width: 250px;\r\n display: inline-block;\r\n position: absolute;\r\n list-style-type: none;\r\n\r\n border: 1px solid #DDD;\r\n background: #EEE;\r\n\r\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n\r\n font-family: Verdana, Arial, Helvetica, sans-serif;\r\n font-size: 11px;\r\n}\r\n\r\n.context-menu-item {\r\n padding: 2px 2px 2px 24px;\r\n background-color: #EEE;\r\n position: relative;\r\n -webkit-user-select: none;\r\n -moz-user-select: -moz-none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n}\r\n\r\n.context-menu-separator {\r\n padding-bottom:0;\r\n border-bottom: 1px solid #DDD;\r\n}\r\n\r\n.context-menu-item > label > input,\r\n.context-menu-item > label > textarea {\r\n -webkit-user-select: text;\r\n -moz-user-select: text;\r\n -ms-user-select: text;\r\n user-select: text;\r\n}\r\n\r\n.context-menu-item.hover {\r\n cursor: pointer;\r\n background-color: #39F;\r\n}\r\n\r\n.context-menu-item.disabled {\r\n color: #666;\r\n}\r\n\r\n.context-menu-input.hover,\r\n.context-menu-item.disabled.hover {\r\n cursor: default;\r\n background-color: #EEE;\r\n}\r\n\r\n.context-menu-submenu:after {\r\n content: ">";\r\n color: #666;\r\n position: absolute;\r\n top: 0;\r\n right: 3px;\r\n z-index: 1;\r\n}\r\n\r\n/* icons\r\n #protip:\r\n In case you want to use sprites for icons (which I would suggest you do) have a look at\r\n http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement\r\n .context-menu-item.icon:before {}\r\n */\r\n.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }\r\n\r\n/* vertically align inside labels */\r\n.context-menu-input > label > * { vertical-align: top; }\r\n\r\n/* position checkboxes and radios as icons */\r\n.context-menu-input > label > input[type="checkbox"],\r\n.context-menu-input > label > input[type="radio"] {\r\n margin-left: -17px;\r\n}\r\n.context-menu-input > label > span {\r\n margin-left: 5px;\r\n}\r\n\r\n.context-menu-input > label,\r\n.context-menu-input > label > input[type="text"],\r\n.context-menu-input > label > textarea,\r\n.context-menu-input > label > select {\r\n display: block;\r\n width: 100%;\r\n\r\n -webkit-box-sizing: border-box;\r\n -moz-box-sizing: border-box;\r\n -ms-box-sizing: border-box;\r\n -o-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.context-menu-input > label > textarea {\r\n height: 100px;\r\n}\r\n.context-menu-item > .context-menu-list {\r\n display: none;\r\n /* re-positioned by js */\r\n right: -5px;\r\n top: 5px;\r\n}\r\n\r\n.context-menu-item.hover > .context-menu-list {\r\n display: block;\r\n}\r\n\r\n.context-menu-accesskey {\r\n text-decoration: underline;\r\n}\r\n'],sourceRoot:""}]);const o=a},"./node_modules/css-loader/dist/runtime/api.js":t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var o=0;o<this.length;o++){var c=this[o][0];null!=c&&(a[c]=!0)}for(var l=0;l<t.length;l++){var h=[].concat(t[l]);r&&a[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},"./node_modules/css-loader/dist/runtime/sourceMaps.js":t=>{"use strict";t.exports=function(t){var e=t[1],n=t[3];if(!n)return e;if("function"==typeof btoa){var r=btoa(unescape(encodeURIComponent(JSON.stringify(n)))),i="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(r),s="/*# ".concat(i," */");return[e].concat([s]).join("\n")}return[e].join("\n")}},"./node_modules/performance-now/lib/performance-now.js":function(t){(function(){var e,n,r,i,s,a;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(t.exports=function(){return(e()-s)/1e6},n=process.hrtime,i=(e=function(){var t;return 1e9*(t=n())[0]+t[1]})(),a=1e9*process.uptime(),s=i-a):Date.now?(t.exports=function(){return Date.now()-r},r=Date.now()):(t.exports=function(){return(new Date).getTime()-r},r=(new Date).getTime())}).call(this)},"./node_modules/raf/index.js":(t,e,n)=>{for(var r=n("./node_modules/performance-now/lib/performance-now.js"),i="undefined"==typeof window?n.g:window,s=["moz","webkit"],a="AnimationFrame",o=i["request"+a],c=i["cancel"+a]||i["cancelRequest"+a],l=0;!o&&l<s.length;l++)o=i[s[l]+"Request"+a],c=i[s[l]+"Cancel"+a]||i[s[l]+"CancelRequest"+a];if(!o||!c){var h=0,u=0,d=[],p=1e3/60;o=function(t){if(0===d.length){var e=r(),n=Math.max(0,p-(e-h));h=n+e,setTimeout((function(){var t=d.slice(0);d.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(h)}catch(t){setTimeout((function(){throw t}),0)}}),Math.round(n))}return d.push({handle:++u,callback:t,cancelled:!1}),u},c=function(t){for(var e=0;e<d.length;e++)d[e].handle===t&&(d[e].cancelled=!0)}}t.exports=function(t){return o.call(i,t)},t.exports.cancel=function(){c.apply(i,arguments)},t.exports.polyfill=function(t){t||(t=i),t.requestAnimationFrame=o,t.cancelAnimationFrame=c}},"./node_modules/raw-loader/index.js!./src/lib/Class.exec.js":t=>{t.exports='/* \r\n * Simple JavaScript Inheritance \r\n * By John Resig http://ejohn.org/ \r\n * MIT Licensed. \r\n * \r\n ****************************************************** \r\n * Example Usage \r\n ****************************************************** \r\n var Person = Class.extend({ \r\n init: function(isDancing){ \r\n this.dancing = isDancing; \r\n }, \r\n dance: function(){ \r\n return this.dancing; \r\n } \r\n}); \r\n\r\nvar Ninja = Person.extend({ \r\n init: function(){ \r\n this._super( false ); \r\n }, \r\n dance: function(){ \r\n // Call the inherited version of dance() \r\n return this._super(); \r\n }, \r\n swingSword: function(){ \r\n return true; \r\n } \r\n}); \r\n\r\nvar p = new Person(true); \r\np.dance(); // => true \r\n\r\nvar n = new Ninja(); \r\nn.dance(); // => false \r\nn.swingSword(); // => true \r\n\r\n// Should all be true \r\np instanceof Person && p instanceof Class && \r\nn instanceof Ninja && n instanceof Person && n instanceof Class \r\n\r\n ****************************************************** \r\n */ \r\n \r\n// Inspired by base2 and Prototype \r\n(function(){ \r\n var fnTest = /xyz/.test(function(){xyz;}) ? /\\b_super\\b/ : /.*/; \r\n\r\n // The base Class implementation (does nothing) \r\n this.Class = function(){}; \r\n \r\n\r\n // Create a new Class that inherits from this class \r\n Class.extend = function(prop) { \r\n var _super = this.prototype; \r\n \r\n // Instantiate a base class (but only create the instance, \r\n // don\'t run the init constructor) \r\n initializing = true; \r\n var prototype = new this(); \r\n initializing = false; \r\n \r\n \r\n // Copy the properties over onto the new prototype \r\n for (var name in prop) { \r\n // Check if we\'re overwriting an existing function \r\n prototype[name] = typeof prop[name] == "function" && \r\n typeof _super[name] == "function" && fnTest.test(prop[name]) ? \r\n (function(name, fn){ \r\n return function() { \r\n var tmp = this._super; \r\n \r\n // Add a new ._super() method that is the same method \r\n // but on the super-class \r\n this._super = _super[name]; \r\n \r\n // The method only need to be bound temporarily, so we \r\n // remove it when we\'re done executing \r\n var ret = fn.apply(this, arguments); \r\n this._super = tmp; \r\n \r\n return ret; \r\n }; \r\n })(name, prop[name]) : \r\n prop[name]; \r\n } \r\n \r\n // The dummy class constructor \r\n function Class() { \r\n // All construction is actually done in the init method \r\n if ( !initializing && this.init ) \r\n this.init.apply(this, arguments); \r\n } \r\n \r\n // Populate our constructed prototype object \r\n Class.prototype = prototype; \r\n \r\n // Enforce the constructor to be what we expect \r\n Class.prototype.constructor = Class; \r\n\r\n // And make this class extendable \r\n Class.extend = arguments.callee; \r\n \r\n // EXTENSION BY Draw2D.org to inject methods into an existing class to provide plugins or \r\n // bugfixes for further releases \r\n // \r\n Class.inject = function (prop) { \r\n var proto = this.prototype; \r\n var parent = {}; \r\n for (var name in prop) { \r\n if (typeof (prop[name]) == "function" && typeof (proto[name]) == "function" && fnTest.test(prop[name])) { \r\n parent[name] = proto[name]; \r\n proto[name] = (function (name, fn) { \r\n return function () { \r\n var tmp = this.parent; \r\n this.parent = parent[name]; \r\n var ret = fn.apply(this, arguments); \r\n this.parent = tmp; \r\n return ret; \r\n }; \r\n })(name, prop[name]); \r\n } else { \r\n proto[name] = prop[name]; \r\n } \r\n } \r\n }; \r\n \r\n return Class; \r\n }; \r\n})();\r\n \r\n'},"./node_modules/raw-loader/index.js!./src/lib/pathfinding.exec.js":t=>{t.exports='var PF=function(){var e=function(t,n){var r=e.resolve(t,n||"/"),i=e.modules[r];if(!i)throw new Error("Failed to resolve module "+t+", tried "+r);var s=i._cached?i._cached:i();return s};return e.paths=[],e.modules={},e.extensions=[".js",".coffee"],e._core={assert:!0,events:!0,fs:!0,path:!0,vm:!0},e.resolve=function(){return function(t,n){function u(t){if(e.modules[t])return t;for(var n=0;n<e.extensions.length;n++){var r=e.extensions[n];if(e.modules[t+r])return t+r}}function a(t){t=t.replace(/\\/+$/,"");var n=t+"/package.json";if(e.modules[n]){var i=e.modules[n](),s=i.browserify;if(typeof s=="object"&&s.main){var o=u(r.resolve(t,s.main));if(o)return o}else if(typeof s=="string"){var o=u(r.resolve(t,s));if(o)return o}else if(i.main){var o=u(r.resolve(t,i.main));if(o)return o}}return u(t+"/index")}function f(e,t){var n=l(t);for(var r=0;r<n.length;r++){var i=n[r],s=u(i+"/"+e);if(s)return s;var o=a(i+"/"+e);if(o)return o}var s=u(e);if(s)return s}function l(e){var t;e==="/"?t=[""]:t=r.normalize(e).split("/");var n=[];for(var i=t.length-1;i>=0;i--){if(t[i]==="node_modules")continue;var s=t.slice(0,i+1).join("/")+"/node_modules";n.push(s)}return n}n||(n="/");if(e._core[t])return t;var r=e.modules.path();n=r.resolve("/",n);var i=n||"/";if(t.match(/^(?:\\.\\.?\\/|\\/)/)){var s=u(r.resolve(i,t))||a(r.resolve(i,t));if(s)return s}var o=f(t,i);if(o)return o;throw new Error("Cannot find module \'"+t+"\'")}}(),e.alias=function(t,n){var r=e.modules.path(),i=null;try{i=e.resolve(t+"/package.json","/")}catch(s){i=e.resolve(t,"/")}var o=r.dirname(i),u=(Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t})(e.modules);for(var a=0;a<u.length;a++){var f=u[a];if(f.slice(0,o.length+1)===o+"/"){var l=f.slice(o.length);e.modules[n+l]=e.modules[o+l]}else f===o&&(e.modules[n]=e.modules[o])}},e.define=function(t,n){var r=e._core[t]?"":e.modules.path().dirname(t),i=function(t){return e(t,r)};i.resolve=function(t){return e.resolve(t,r)},i.modules=e.modules,i.define=e.define;var s={exports:{}};e.modules[t]=function(){return e.modules[t]._cached=s.exports,n.call(s.exports,i,s,s.exports,r,t),e.modules[t]._cached=s.exports,s.exports}},typeof process=="undefined"&&(process={}),process.nextTick||(process.nextTick=function(){var e=[],t=typeof window!="undefined"&&window.postMessage&&window.addEventListener;return t&&window.addEventListener("message",function(t){if(t.source===window&&t.data==="browserify-tick"){t.stopPropagation();if(e.length>0){var n=e.shift();n()}}},!0),function(n){t?(e.push(n),window.postMessage("browserify-tick","*")):setTimeout(n,0)}}()),process.title||(process.title="browser"),process.binding||(process.binding=function(t){if(t==="evals")return e("vm");throw new Error("No such module")}),process.cwd||(process.cwd=function(){return"."}),process.env||(process.env={}),process.argv||(process.argv=[]),e.define("path",function(e,t,n,r,i){function s(e,t){var n=[];for(var r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}function o(e,t){var n=0;for(var r=e.length;r>=0;r--){var i=e[r];i=="."?e.splice(r,1):i===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var u=/^(.+\\/(?!$)|\\/)?((?:.+?)?(\\.[^.]*)?)$/;n.resolve=function(){var e="",t=!1;for(var n=arguments.length;n>=-1&&!t;n--){var r=n>=0?arguments[n]:process.cwd();if(typeof r!="string"||!r)continue;e=r+"/"+e,t=r.charAt(0)==="/"}return e=o(s(e.split("/"),function(e){return!!e}),!t).join("/"),(t?"/":"")+e||"."},n.normalize=function(e){var t=e.charAt(0)==="/",n=e.slice(-1)==="/";return e=o(s(e.split("/"),function(e){return!!e}),!t).join("/"),!e&&!t&&(e="."),e&&n&&(e+="/"),(t?"/":"")+e},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(s(e,function(e,t){return e&&typeof e=="string"}).join("/"))},n.dirname=function(e){var t=u.exec(e)[1]||"",n=!1;return t?t.length===1||n&&t.length<=3&&t.charAt(1)===":"?t:t.substring(0,t.length-1):"."},n.basename=function(e,t){var n=u.exec(e)[2]||"";return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return u.exec(e)[3]||""}}),e.define("/core/Node.js",function(e,t,n,r,i){function s(e,t,n){this.x=e,this.y=t,this.walkable=n===undefined?!0:n}t.exports=s}),e.define("/core/Grid.js",function(e,t,n,r,i){function o(e,t,n){this.width=e,this.height=t,this.nodes=this._buildNodes(e,t,n)}var s=e("./Node");o.prototype._buildNodes=function(e,t,n){var r,i,o=new Array(t),u;for(r=0;r<t;++r){o[r]=new Array(e);for(i=0;i<e;++i)o[r][i]=new s(i,r)}if(n===undefined)return o;if(n.length!==t||n[0].length!==e)throw new Error("Matrix size does not fit");for(r=0;r<t;++r)for(i=0;i<e;++i)n[r][i]&&(o[r][i].walkable=!1);return o},o.prototype.getNodeAt=function(e,t){return this.nodes[t][e]},o.prototype.isWalkableAt=function(e,t){return this.isInside(e,t)&&this.nodes[t][e].walkable},o.prototype.isInside=function(e,t){return e>=0&&e<this.width&&t>=0&&t<this.height},o.prototype.setWalkableAt=function(e,t,n){this.nodes[t][e].walkable=n},o.prototype.getNeighbors=function(e,t,n){var r=e.x,i=e.y,s=[],o=!1,u=!1,a=!1,f=!1,l=!1,c=!1,h=!1,p=!1,d=this.nodes;return this.isWalkableAt(r,i-1)&&(s.push(d[i-1][r]),o=!0),this.isWalkableAt(r+1,i)&&(s.push(d[i][r+1]),a=!0),this.isWalkableAt(r,i+1)&&(s.push(d[i+1][r]),l=!0),this.isWalkableAt(r-1,i)&&(s.push(d[i][r-1]),h=!0),t?(n?(u=h&&o,f=o&&a,c=a&&l,p=l&&h):(u=h||o,f=o||a,c=a||l,p=l||h),u&&this.isWalkableAt(r-1,i-1)&&s.push(d[i-1][r-1]),f&&this.isWalkableAt(r+1,i-1)&&s.push(d[i-1][r+1]),c&&this.isWalkableAt(r+1,i+1)&&s.push(d[i+1][r+1]),p&&this.isWalkableAt(r-1,i+1)&&s.push(d[i+1][r-1]),s):s},o.prototype.clone=function(){var e,t,n=this.width,r=this.height,i=this.nodes,u=new o(n,r),a=new Array(r),f;for(e=0;e<r;++e){a[e]=new Array(n);for(t=0;t<n;++t)a[e][t]=new s(t,e,i[e][t].walkable)}return u.nodes=a,u},t.exports=o}),e.define("/core/Heap.js",function(e,t,n,r,i){(function(){var e,n,r,i,s,o,u,a,f,l,c,h,p,d,v;r=Math.floor,l=Math.min,n=function(e,t){return e<t?-1:e>t?1:0},f=function(e,t,i,s,o){var u;i==null&&(i=0),o==null&&(o=n);if(i<0)throw new Error("lo must be non-negative");s==null&&(s=e.length);while(o(i,s)<0)u=r((i+s)/2),o(t,e[u])<0?s=u:i=u+1;return[].splice.apply(e,[i,i-i].concat(t)),t},o=function(e,t,r){return r==null&&(r=n),e.push(t),d(e,0,e.length-1,r)},s=function(e,t){var r,i;return t==null&&(t=n),r=e.pop(),e.length?(i=e[0],e[0]=r,v(e,0,t)):i=r,i},a=function(e,t,r){var i;return r==null&&(r=n),i=e[0],e[0]=t,v(e,0,r),i},u=function(e,t,r){var i;return r==null&&(r=n),e.length&&r(e[0],t)<0&&(i=[e[0],t],t=i[0],e[0]=i[1],v(e,0,r)),t},i=function(e,t){var i,s,o,u,a,f,l,c;t==null&&(t=n),f=function(){c=[];for(var t=0,n=r(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)c.push(t);return c}.apply(this).reverse(),l=[];for(s=0,u=f.length;s<u;s++)i=f[s],l.push(v(e,i,t));return l},p=function(e,t,r){var i;return r==null&&(r=n),i=e.indexOf(t),d(e,0,i,r),v(e,i,r)},c=function(e,t,r){var s,o,a,f,l;r==null&&(r=n),o=e.slice(0,t);if(!o.length)return o;i(o,r),l=e.slice(t);for(a=0,f=l.length;a<f;a++)s=l[a],u(o,s,r);return o.sort(r).reverse()},h=function(e,t,r){var o,u,a,c,h,p,d,v,m,g;r==null&&(r=n);if(t*10<=e.length){c=e.slice(0,t).sort(r);if(!c.length)return c;a=c[c.length-1],v=e.slice(t);for(h=0,d=v.length;h<d;h++)o=v[h],r(o,a)<0&&(f(c,o,0,null,r),c.pop(),a=c[c.length-1]);return c}i(e,r),g=[];for(u=p=0,m=l(t,e.length);0<=m?p<m:p>m;u=0<=m?++p:--p)g.push(s(e,r));return g},d=function(e,t,r,i){var s,o,u;i==null&&(i=n),s=e[r];while(r>t){u=r-1>>1,o=e[u];if(i(s,o)<0){e[r]=o,r=u;continue}break}return e[r]=s},v=function(e,t,r){var i,s,o,u,a;r==null&&(r=n),s=e.length,a=t,o=e[t],i=2*t+1;while(i<s)u=i+1,u<s&&!(r(e[i],e[u])<0)&&(i=u),e[t]=e[i],t=i,i=2*t+1;return e[t]=o,d(e,a,t,r)},e=function(){function e(e){this.cmp=e!=null?e:n,this.nodes=[]}return e.name="Heap",e.push=o,e.pop=s,e.replace=a,e.pushpop=u,e.heapify=i,e.nlargest=c,e.nsmallest=h,e.prototype.push=function(e){return o(this.nodes,e,this.cmp)},e.prototype.pop=function(){return s(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return this.nodes.indexOf(e)!==-1},e.prototype.replace=function(e){return a(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return u(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return i(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return p(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return this.nodes.length===0},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return t=new e,t.nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.remove=e.prototype.pop,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),(typeof t!="undefined"&&t!==null?t.exports:void 0)?t.exports=e:window.Heap=e}).call(this)}),e.define("/core/Util.js",function(e,t,n,r,i){function s(e){var t=[[e.x,e.y]];while(e.parent)e=e.parent,t.push([e.x,e.y]);return t.reverse()}function o(e,t){var n=s(e),r=s(t);return n.concat(r.reverse())}function u(e){var t,n=0,r,i,s,o;for(t=1;t<e.length;++t)r=e[t-1],i=e[t],s=r[0]-i[0],o=r[1]-i[1],n+=Math.sqrt(s*s+o*o);return n}function a(e,t,n,r){var i=Math.abs,s=[],o,u,a,f,l,c;a=i(n-e),f=i(r-t),o=e<n?1:-1,u=t<r?1:-1,l=a-f;for(;;){s.push([e,t]);if(e===n&&t===r)break;c=2*l,c>-f&&(l-=f,e+=o),c<a&&(l+=a,t+=u)}return s}function f(e,t){var n=t.length,r=t[0][0],i=t[0][1],s=t[n-1][0],o=t[n-1][1],u,f,l,c,h,p,d,v,m,g,y,b,w;u=r,f=i,h=t[1][0],p=t[1][1],d=[[u,f]];for(v=2;v<n;++v){g=t[v],l=g[0],c=g[1],y=a(u,f,l,c),w=!1;for(m=1;m<y.length;++m){b=y[m];if(!e.isWalkableAt(b[0],b[1])){w=!0,d.push([h,p]),u=h,f=p;break}}w||(h=l,p=c)}return d.push([s,o]),d}n.backtrace=s,n.biBacktrace=o,n.pathLength=u,n.getLine=a,n.smoothenPath=f}),e.define("/core/Heuristic.js",function(e,t,n,r,i){t.exports={manhattan:function(e,t){return e+t},euclidean:function(e,t){return Math.sqrt(e*e+t*t)},chebyshev:function(e,t){return Math.max(e,t)}}}),e.define("/finders/AStarFinder.js",function(e,t,n,r,i){function a(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.heuristic=e.heuristic||u.manhattan}var s=e("../core/Heap"),o=e("../core/Util"),u=e("../core/Heuristic");a.prototype.findPath=function(e,t,n,r,i){var u=new s(function(e,t){return e.f-t.f}),a=i.getNodeAt(e,t),f=i.getNodeAt(n,r),l=this.heuristic,c=this.allowDiagonal,h=this.dontCrossCorners,p=Math.abs,d=Math.SQRT2,v,m,g,y,b,w,E,S;a.g=0,a.f=0,u.push(a),a.opened=!0;while(!u.empty()){v=u.pop(),v.closed=!0;if(v===f)return o.backtrace(f);m=i.getNeighbors(v,c,h);for(y=0,b=m.length;y<b;++y){g=m[y];if(g.closed)continue;w=g.x,E=g.y,S=v.g+(w-v.x===0||E-v.y===0?1:d);if(!g.opened||S<g.g)g.g=S,g.h=g.h||l(p(w-n),p(E-r)),g.f=g.g+g.h,g.parent=v,g.opened?u.updateItem(g):(u.push(g),g.opened=!0)}}return[]},t.exports=a}),e.define("/finders/BestFirstFinder.js",function(e,t,n,r,i){function o(e){s.call(this,e);var t=this.heuristic;this.heuristic=function(e,n){return t(e,n)*1e6}}var s=e("./AStarFinder");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define("/finders/BreadthFirstFinder.js",function(e,t,n,r,i){function o(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners}var s=e("../core/Util");o.prototype.findPath=function(e,t,n,r,i){var o=[],u=this.allowDiagonal,a=this.dontCrossCorners,f=i.getNodeAt(e,t),l=i.getNodeAt(n,r),c,h,p,d,v;o.push(f),f.opened=!0;while(o.length){p=o.shift(),p.closed=!0;if(p===l)return s.backtrace(l);c=i.getNeighbors(p,u,a);for(d=0,v=c.length;d<v;++d){h=c[d];if(h.closed||h.opened)continue;o.push(h),h.opened=!0,h.parent=p}}return[]},t.exports=o}),e.define("/finders/DijkstraFinder.js",function(e,t,n,r,i){function o(e){s.call(this,e),this.heuristic=function(e,t){return 0}}var s=e("./AStarFinder");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define("/finders/BiAStarFinder.js",function(e,t,n,r,i){function a(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.heuristic=e.heuristic||u.manhattan}var s=e("../core/Heap"),o=e("../core/Util"),u=e("../core/Heuristic");a.prototype.findPath=function(e,t,n,r,i){var u=function(e,t){return e.f-t.f},a=new s(u),f=new s(u),l=i.getNodeAt(e,t),c=i.getNodeAt(n,r),h=this.heuristic,p=this.allowDiagonal,d=this.dontCrossCorners,v=Math.abs,m=Math.SQRT2,g,y,b,w,E,S,x,T,N=1,C=2;l.g=0,l.f=0,a.push(l),l.opened=N,c.g=0,c.f=0,f.push(c),c.opened=C;while(!a.empty()&&!f.empty()){g=a.pop(),g.closed=!0,y=i.getNeighbors(g,p,d);for(w=0,E=y.length;w<E;++w){b=y[w];if(b.closed)continue;if(b.opened===C)return o.biBacktrace(g,b);S=b.x,x=b.y,T=g.g+(S-g.x===0||x-g.y===0?1:m);if(!b.opened||T<b.g)b.g=T,b.h=b.h||h(v(S-n),v(x-r)),b.f=b.g+b.h,b.parent=g,b.opened?a.updateItem(b):(a.push(b),b.opened=N)}g=f.pop(),g.closed=!0,y=i.getNeighbors(g,p,d);for(w=0,E=y.length;w<E;++w){b=y[w];if(b.closed)continue;if(b.opened===N)return o.biBacktrace(b,g);S=b.x,x=b.y,T=g.g+(S-g.x===0||x-g.y===0?1:m);if(!b.opened||T<b.g)b.g=T,b.h=b.h||h(v(S-e),v(x-t)),b.f=b.g+b.h,b.parent=g,b.opened?f.updateItem(b):(f.push(b),b.opened=C)}}return[]},t.exports=a}),e.define("/finders/BiBestFirstFinder.js",function(e,t,n,r,i){function o(e){s.call(this,e);var t=this.heuristic;this.heuristic=function(e,n){return t(e,n)*1e6}}var s=e("./BiAStarFinder");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define("/finders/BiBreadthFirstFinder.js",function(e,t,n,r,i){function o(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners}var s=e("../core/Util");o.prototype.findPath=function(e,t,n,r,i){var o=i.getNodeAt(e,t),u=i.getNodeAt(n,r),a=[],f=[],l,c,h,p=this.allowDiagonal,d=this.dontCrossCorners,v=0,m=1,g,y;a.push(o),o.opened=!0,o.by=v,f.push(u),u.opened=!0,u.by=m;while(a.length&&f.length){h=a.shift(),h.closed=!0,l=i.getNeighbors(h,p,d);for(g=0,y=l.length;g<y;++g){c=l[g];if(c.closed)continue;if(c.opened){if(c.by===m)return s.biBacktrace(h,c);continue}a.push(c),c.parent=h,c.opened=!0,c.by=v}h=f.shift(),h.closed=!0,l=i.getNeighbors(h,p,d);for(g=0,y=l.length;g<y;++g){c=l[g];if(c.closed)continue;if(c.opened){if(c.by===v)return s.biBacktrace(c,h);continue}f.push(c),c.parent=h,c.opened=!0,c.by=m}}return[]},t.exports=o}),e.define("/finders/BiDijkstraFinder.js",function(e,t,n,r,i){function o(e){s.call(this,e),this.heuristic=function(e,t){return 0}}var s=e("./BiAStarFinder");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define("/finders/JumpPointFinder.js",function(e,t,n,r,i){function a(e){e=e||{},this.heuristic=e.heuristic||u.manhattan}var s=e("../core/Heap"),o=e("../core/Util"),u=e("../core/Heuristic");a.prototype.findPath=function(e,t,n,r,i){var u=this.openList=new s(function(e,t){return e.f-t.f}),a=this.startNode=i.getNodeAt(e,t),f=this.endNode=i.getNodeAt(n,r),l;this.grid=i,a.g=0,a.f=0,u.push(a),a.opened=!0;while(!u.empty()){l=u.pop(),l.closed=!0;if(l===f)return o.backtrace(f);this._identifySuccessors(l)}return[]},a.prototype._identifySuccessors=function(e){var t=this.grid,n=this.heuristic,r=this.openList,i=this.endNode.x,s=this.endNode.y,o,a,f,l,c,h=e.x,p=e.y,d,v,m,g,y,b,w,E=Math.abs,S=Math.max;o=this._findNeighbors(e);for(l=0,c=o.length;l<c;++l){a=o[l],f=this._jump(a[0],a[1],h,p);if(f){d=f[0],v=f[1],w=t.getNodeAt(d,v);if(w.closed)continue;y=u.euclidean(E(d-h),E(v-p)),b=e.g+y;if(!w.opened||b<w.g)w.g=b,w.h=w.h||n(E(d-i),E(v-s)),w.f=w.g+w.h,w.parent=e,w.opened?r.updateItem(w):(r.push(w),w.opened=!0)}}},a.prototype._jump=function(e,t,n,r){var i=this.grid,s=e-n,o=t-r,u,a;if(!i.isWalkableAt(e,t))return null;if(i.getNodeAt(e,t)===this.endNode)return[e,t];if(s!==0&&o!==0){if(i.isWalkableAt(e-s,t+o)&&!i.isWalkableAt(e-s,t)||i.isWalkableAt(e+s,t-o)&&!i.isWalkableAt(e,t-o))return[e,t]}else if(s!==0){if(i.isWalkableAt(e+s,t+1)&&!i.isWalkableAt(e,t+1)||i.isWalkableAt(e+s,t-1)&&!i.isWalkableAt(e,t-1))return[e,t]}else if(i.isWalkableAt(e+1,t+o)&&!i.isWalkableAt(e+1,t)||i.isWalkableAt(e-1,t+o)&&!i.isWalkableAt(e-1,t))return[e,t];if(s!==0&&o!==0){u=this._jump(e+s,t,e,t),a=this._jump(e,t+o,e,t);if(u||a)return[e,t]}return i.isWalkableAt(e+s,t)||i.isWalkableAt(e,t+o)?this._jump(e+s,t+o,e,t):null},a.prototype._findNeighbors=function(e){var t=e.parent,n=e.x,r=e.y,i=this.grid,s,o,u,a,f,l,c=[],h,p,d,v;if(t)s=t.x,o=t.y,f=(n-s)/Math.max(Math.abs(n-s),1),l=(r-o)/Math.max(Math.abs(r-o),1),f!==0&&l!==0?(i.isWalkableAt(n,r+l)&&c.push([n,r+l]),i.isWalkableAt(n+f,r)&&c.push([n+f,r]),(i.isWalkableAt(n,r+l)||i.isWalkableAt(n+f,r))&&c.push([n+f,r+l]),!i.isWalkableAt(n-f,r)&&i.isWalkableAt(n,r+l)&&c.push([n-f,r+l]),!i.isWalkableAt(n,r-l)&&i.isWalkableAt(n+f,r)&&c.push([n+f,r-l])):f===0?i.isWalkableAt(n,r+l)&&(i.isWalkableAt(n,r+l)&&c.push([n,r+l]),i.isWalkableAt(n+1,r)||c.push([n+1,r+l]),i.isWalkableAt(n-1,r)||c.push([n-1,r+l])):i.isWalkableAt(n+f,r)&&(i.isWalkableAt(n+f,r)&&c.push([n+f,r]),i.isWalkableAt(n,r+1)||c.push([n+f,r+1]),i.isWalkableAt(n,r-1)||c.push([n+f,r-1]));else{h=i.getNeighbors(e,!0);for(d=0,v=h.length;d<v;++d)p=h[d],c.push([p.x,p.y])}return c},t.exports=a}),e.define("/PathFinding.js",function(e,t,n,r,i){t.exports={Node:e("./core/Node"),Grid:e("./core/Grid"),Heap:e("./core/Heap"),Util:e("./core/Util"),Heuristic:e("./core/Heuristic"),AStarFinder:e("./finders/AStarFinder"),BestFirstFinder:e("./finders/BestFirstFinder"),BreadthFirstFinder:e("./finders/BreadthFirstFinder"),DijkstraFinder:e("./finders/DijkstraFinder"),BiAStarFinder:e("./finders/BiAStarFinder"),BiBestFirstFinder:e("./finders/BiBestFirstFinder"),BiBreadthFirstFinder:e("./finders/BiBreadthFirstFinder"),BiDijkstraFinder:e("./finders/BiDijkstraFinder"),JumpPointFinder:e("./finders/JumpPointFinder")}}),e("/PathFinding.js"),e("/PathFinding")}()'},"./node_modules/raw-loader/index.js!./src/lib/raphael.exec.js":t=>{t.exports='\r\n\r\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\// │ Raphaël 2.1.0 - JavaScript Vector Library │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\r\n// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\r\n// └────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n// ┌──────────────────────────────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Eve 0.3.4 - JavaScript Events Library │ \\\\\r\n// ├──────────────────────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\\\\r\n// │ Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. │ \\\\\r\n// └──────────────────────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n// THIS FILES IS PATCHED BY FREEGROUP\r\n// you can\'t replace this file with a new version without migrate all changes\r\n// tagged with "FREEGROUP"\r\n//\r\n// Licensed under the Apache License, Version 2.0 (the "License");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n// http://www.apache.org/licenses/LICENSE-2.0\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an "AS IS" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n// ┌────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Eve 0.4.2 - JavaScript Events Library │ \\\\\r\n// ├────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Author Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\\\\r\n// └────────────────────────────────────────────────────────────┘ \\\\\r\n(function (glob, factory) {\r\n if (typeof define === "function" && define.amd) {\r\n define("eve", function() {\r\n return factory();\r\n });\r\n } else if (typeof exports === "object") {\r\n module.exports = factory();\r\n } else {\r\n glob.eve = factory();\r\n }\r\n}(this, function(){\r\n var version = "0.4.2",\r\n has = "hasOwnProperty",\r\n separator = /[\\.\\/]/,\r\n wildcard = "*",\r\n fun = function () {},\r\n numsort = function (a, b) {\r\n return a - b;\r\n },\r\n current_event,\r\n stop,\r\n events = {n: {}},\r\n /*\\\r\n * eve\r\n [ method ]\r\n\r\n * Fires event with given `name`, given scope and other parameters.\r\n\r\n > Arguments\r\n\r\n - name (string) name of the *event*, dot (`.`) or slash (`/`) separated\r\n - scope (object) context for the event handlers\r\n - varargs (...) the rest of arguments will be sent to event handlers\r\n\r\n = (object) array of returned values from the listeners\r\n \\*/\r\n eve = function (name, scope) {\r\n name = String(name);\r\n var e = events,\r\n oldstop = stop,\r\n args = Array.prototype.slice.call(arguments, 2),\r\n listeners = eve.listeners(name),\r\n z = 0,\r\n f = false,\r\n l,\r\n indexed = [],\r\n queue = {},\r\n out = [],\r\n ce = current_event,\r\n errors = [];\r\n current_event = name;\r\n stop = 0;\r\n for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) {\r\n indexed.push(listeners[i].zIndex);\r\n if (listeners[i].zIndex < 0) {\r\n queue[listeners[i].zIndex] = listeners[i];\r\n }\r\n }\r\n indexed.sort(numsort);\r\n while (indexed[z] < 0) {\r\n l = queue[indexed[z++]];\r\n out.push(l.apply(scope, args));\r\n if (stop) {\r\n stop = oldstop;\r\n return out;\r\n }\r\n }\r\n for (i = 0; i < ii; i++) {\r\n l = listeners[i];\r\n if ("zIndex" in l) {\r\n if (l.zIndex == indexed[z]) {\r\n out.push(l.apply(scope, args));\r\n if (stop) {\r\n break;\r\n }\r\n do {\r\n z++;\r\n l = queue[indexed[z]];\r\n l && out.push(l.apply(scope, args));\r\n if (stop) {\r\n break;\r\n }\r\n } while (l)\r\n } else {\r\n queue[l.zIndex] = l;\r\n }\r\n } else {\r\n out.push(l.apply(scope, args));\r\n if (stop) {\r\n break;\r\n }\r\n }\r\n }\r\n stop = oldstop;\r\n current_event = ce;\r\n return out.length ? out : null;\r\n };\r\n // Undocumented. Debug only.\r\n eve._events = events;\r\n /*\\\r\n * eve.listeners\r\n [ method ]\r\n\r\n * Internal method which gives you array of all event handlers that will be triggered by the given `name`.\r\n\r\n > Arguments\r\n\r\n - name (string) name of the event, dot (`.`) or slash (`/`) separated\r\n\r\n = (array) array of event handlers\r\n \\*/\r\n eve.listeners = function (name) {\r\n var names = name.split(separator),\r\n e = events,\r\n item,\r\n items,\r\n k,\r\n i,\r\n ii,\r\n j,\r\n jj,\r\n nes,\r\n es = [e],\r\n out = [];\r\n for (i = 0, ii = names.length; i < ii; i++) {\r\n nes = [];\r\n for (j = 0, jj = es.length; j < jj; j++) {\r\n e = es[j].n;\r\n items = [e[names[i]], e[wildcard]];\r\n k = 2;\r\n while (k--) {\r\n item = items[k];\r\n if (item) {\r\n nes.push(item);\r\n out = out.concat(item.f || []);\r\n }\r\n }\r\n }\r\n es = nes;\r\n }\r\n return out;\r\n };\r\n\r\n /*\\\r\n * eve.on\r\n [ method ]\r\n **\r\n * Binds given event handler with a given name. You can use wildcards “`*`” for the names:\r\n | eve.on("*.under.*", f);\r\n | eve("mouse.under.floor"); // triggers f\r\n * Use @eve to trigger the listener.\r\n **\r\n > Arguments\r\n **\r\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\r\n - f (function) event handler function\r\n **\r\n = (function) returned function accepts a single numeric parameter that represents z-index of the handler. It is an optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment.\r\n > Example:\r\n | eve.on("mouse", eatIt)(2);\r\n | eve.on("mouse", scream);\r\n | eve.on("mouse", catchIt)(1);\r\n * This will ensure that `catchIt()` function will be called before `eatIt()`.\r\n *\r\n * If you want to put your handler before non-indexed handlers, specify a negative value.\r\n * Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”.\r\n \\*/\r\n eve.on = function (name, f) {\r\n name = String(name);\r\n if (typeof f != "function") {\r\n return function () {};\r\n }\r\n var names = name.split(separator),\r\n e = events;\r\n for (var i = 0, ii = names.length; i < ii; i++) {\r\n e = e.n;\r\n e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}});\r\n }\r\n e.f = e.f || [];\r\n for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) {\r\n return fun;\r\n }\r\n e.f.push(f);\r\n return function (zIndex) {\r\n if (+zIndex == +zIndex) {\r\n f.zIndex = +zIndex;\r\n }\r\n };\r\n };\r\n /*\\\r\n * eve.f\r\n [ method ]\r\n **\r\n * Returns function that will fire given event with optional arguments.\r\n * Arguments that will be passed to the result function will be also\r\n * concated to the list of final arguments.\r\n | el.onclick = eve.f("click", 1, 2);\r\n | eve.on("click", function (a, b, c) {\r\n | console.log(a, b, c); // 1, 2, [event object]\r\n | });\r\n > Arguments\r\n - event (string) event name\r\n - varargs (…) and any other arguments\r\n = (function) possible event handler function\r\n \\*/\r\n eve.f = function (event) {\r\n var attrs = [].slice.call(arguments, 1);\r\n return function () {\r\n eve.apply(null, [event, null].concat(attrs).concat([].slice.call(arguments, 0)));\r\n };\r\n };\r\n /*\\\r\n * eve.stop\r\n [ method ]\r\n **\r\n * Is used inside an event handler to stop the event, preventing any subsequent listeners from firing.\r\n \\*/\r\n eve.stop = function () {\r\n stop = 1;\r\n };\r\n /*\\\r\n * eve.nt\r\n [ method ]\r\n **\r\n * Could be used inside event handler to figure out actual name of the event.\r\n **\r\n > Arguments\r\n **\r\n - subname (string) #optional subname of the event\r\n **\r\n = (string) name of the event, if `subname` is not specified\r\n * or\r\n = (boolean) `true`, if current event’s name contains `subname`\r\n \\*/\r\n eve.nt = function (subname) {\r\n if (subname) {\r\n return new RegExp("(?:\\\\.|\\\\/|^)" + subname + "(?:\\\\.|\\\\/|$)").test(current_event);\r\n }\r\n return current_event;\r\n };\r\n /*\\\r\n * eve.nts\r\n [ method ]\r\n **\r\n * Could be used inside event handler to figure out actual name of the event.\r\n **\r\n **\r\n = (array) names of the event\r\n \\*/\r\n eve.nts = function () {\r\n return current_event.split(separator);\r\n };\r\n /*\\\r\n * eve.off\r\n [ method ]\r\n **\r\n * Removes given function from the list of event listeners assigned to given name.\r\n * If no arguments specified all the events will be cleared.\r\n **\r\n > Arguments\r\n **\r\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\r\n - f (function) event handler function\r\n \\*/\r\n /*\\\r\n * eve.unbind\r\n [ method ]\r\n **\r\n * See @eve.off\r\n \\*/\r\n eve.off = eve.unbind = function (name, f) {\r\n if (!name) {\r\n eve._events = events = {n: {}};\r\n return;\r\n }\r\n var names = name.split(separator),\r\n e,\r\n key,\r\n splice,\r\n i, ii, j, jj,\r\n cur = [events];\r\n for (i = 0, ii = names.length; i < ii; i++) {\r\n for (j = 0; j < cur.length; j += splice.length - 2) {\r\n splice = [j, 1];\r\n e = cur[j].n;\r\n if (names[i] != wildcard) {\r\n if (e[names[i]]) {\r\n splice.push(e[names[i]]);\r\n }\r\n } else {\r\n for (key in e) if (e[has](key)) {\r\n splice.push(e[key]);\r\n }\r\n }\r\n cur.splice.apply(cur, splice);\r\n }\r\n }\r\n for (i = 0, ii = cur.length; i < ii; i++) {\r\n e = cur[i];\r\n while (e.n) {\r\n if (f) {\r\n if (e.f) {\r\n for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) {\r\n e.f.splice(j, 1);\r\n break;\r\n }\r\n !e.f.length && delete e.f;\r\n }\r\n for (key in e.n) if (e.n[has](key) && e.n[key].f) {\r\n var funcs = e.n[key].f;\r\n for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) {\r\n funcs.splice(j, 1);\r\n break;\r\n }\r\n !funcs.length && delete e.n[key].f;\r\n }\r\n } else {\r\n delete e.f;\r\n for (key in e.n) if (e.n[has](key) && e.n[key].f) {\r\n delete e.n[key].f;\r\n }\r\n }\r\n e = e.n;\r\n }\r\n }\r\n };\r\n /*\\\r\n * eve.once\r\n [ method ]\r\n **\r\n * Binds given event handler with a given name to only run once then unbind itself.\r\n | eve.once("login", f);\r\n | eve("login"); // triggers f\r\n | eve("login"); // no listeners\r\n * Use @eve to trigger the listener.\r\n **\r\n > Arguments\r\n **\r\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\r\n - f (function) event handler function\r\n **\r\n = (function) same return function as @eve.on\r\n \\*/\r\n eve.once = function (name, f) {\r\n var f2 = function () {\r\n eve.unbind(name, f2);\r\n return f.apply(this, arguments);\r\n };\r\n return eve.on(name, f2);\r\n };\r\n /*\\\r\n * eve.version\r\n [ property (string) ]\r\n **\r\n * Current version of the library.\r\n \\*/\r\n eve.version = version;\r\n eve.toString = function () {\r\n return "You are running Eve " + version;\r\n };\r\n\r\n return eve;\r\n}));\r\n\r\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Core Module │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\r\n// └────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n(function (glob, factory) {\r\n if (typeof define === "function" && define.amd) {\r\n define("raphael.core", ["eve"], function(eve) {\r\n return factory(eve);\r\n });\r\n } else if (typeof exports === "object") {\r\n module.exports = factory(require("eve"));\r\n } else {\r\n glob.Raphael = factory(glob.eve);\r\n }\r\n}(this, function (eve) {\r\n /*\\\r\n * Raphael\r\n [ method ]\r\n **\r\n * Creates a canvas object on which to draw.\r\n * You must do this first, as all future calls to drawing methods\r\n * from this instance will be bound to this canvas.\r\n > Parameters\r\n **\r\n - container (HTMLElement|string) DOM element or its ID which is going to be a parent for drawing surface\r\n - width (number)\r\n - height (number)\r\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\r\n * or\r\n - x (number)\r\n - y (number)\r\n - width (number)\r\n - height (number)\r\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\r\n * or\r\n - all (array) (first 3 or 4 elements in the array are equal to [containerID, width, height] or [x, y, width, height]. The rest are element descriptions in format {type: type, <attributes>}). See @Paper.add.\r\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\r\n * or\r\n - onReadyCallback (function) function that is going to be called on DOM ready event. You can also subscribe to this event via Eve’s “DOMLoad” event. In this case method returns `undefined`.\r\n = (object) @Paper\r\n > Usage\r\n | // Each of the following examples create a canvas\r\n | // that is 320px wide by 200px high.\r\n | // Canvas is created at the viewport’s 10,50 coordinate.\r\n | var paper = Raphael(10, 50, 320, 200);\r\n | // Canvas is created at the top left corner of the #notepad element\r\n | // (or its top right corner in dir="rtl" elements)\r\n | var paper = Raphael(document.getElementById("notepad"), 320, 200);\r\n | // Same as above\r\n | var paper = Raphael("notepad", 320, 200);\r\n | // Image dump\r\n | var set = Raphael(["notepad", 320, 200, {\r\n | type: "rect",\r\n | x: 10,\r\n | y: 10,\r\n | width: 25,\r\n | height: 25,\r\n | stroke: "#f00"\r\n | }, {\r\n | type: "text",\r\n | x: 30,\r\n | y: 40,\r\n | text: "Dump"\r\n | }]);\r\n \\*/\r\n function R(first) {\r\n if (R.is(first, "function")) {\r\n return loaded ? first() : eve.on("raphael.DOMload", first);\r\n } else if (R.is(first, array)) {\r\n return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first);\r\n } else {\r\n var args = Array.prototype.slice.call(arguments, 0);\r\n if (R.is(args[args.length - 1], "function")) {\r\n var f = args.pop();\r\n return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () {\r\n f.call(R._engine.create[apply](R, args));\r\n });\r\n } else {\r\n return R._engine.create[apply](R, arguments);\r\n }\r\n }\r\n }\r\n R.version = "2.1.4";\r\n R.eve = eve;\r\n var loaded,\r\n separator = /[, ]+/,\r\n elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1},\r\n formatrg = /\\{(\\d+)\\}/g,\r\n proto = "prototype",\r\n has = "hasOwnProperty",\r\n g = {\r\n doc: document,\r\n win: window\r\n },\r\n oldRaphael = {\r\n was: Object.prototype[has].call(g.win, "Raphael"),\r\n is: g.win.Raphael\r\n },\r\n Paper = function () {\r\n /*\\\r\n * Paper.ca\r\n [ property (object) ]\r\n **\r\n * Shortcut for @Paper.customAttributes\r\n \\*/\r\n /*\\\r\n * Paper.customAttributes\r\n [ property (object) ]\r\n **\r\n * If you have a set of attributes that you would like to represent\r\n * as a function of some number you can do it easily with custom attributes:\r\n > Usage\r\n | paper.customAttributes.hue = function (num) {\r\n | num = num % 1;\r\n | return {fill: "hsb(" + num + ", 0.75, 1)"};\r\n | };\r\n | // Custom attribute “hue” will change fill\r\n | // to be given hue with fixed saturation and brightness.\r\n | // Now you can use it like this:\r\n | var c = paper.circle(10, 10, 10).attr({hue: .45});\r\n | // or even like this:\r\n | c.animate({hue: 1}, 1e3);\r\n |\r\n | // You could also create custom attribute\r\n | // with multiple parameters:\r\n | paper.customAttributes.hsb = function (h, s, b) {\r\n | return {fill: "hsb(" + [h, s, b].join(",") + ")"};\r\n | };\r\n | c.attr({hsb: "0.5 .8 1"});\r\n | c.animate({hsb: [1, 0, 0.5]}, 1e3);\r\n \\*/\r\n this.ca = this.customAttributes = {};\r\n },\r\n paperproto,\r\n appendChild = "appendChild",\r\n apply = "apply",\r\n concat = "concat",\r\n supportsTouch = (\'ontouchstart\' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test\r\n E = "",\r\n S = " ",\r\n Str = String,\r\n split = "split",\r\n events = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel"[split](S),\r\n touchMap = {\r\n mousedown: "touchstart",\r\n mousemove: "touchmove",\r\n mouseup: "touchend"\r\n },\r\n lowerCase = Str.prototype.toLowerCase,\r\n math = Math,\r\n mmax = math.max,\r\n mmin = math.min,\r\n abs = math.abs,\r\n pow = math.pow,\r\n PI = math.PI,\r\n nu = "number",\r\n string = "string",\r\n array = "array",\r\n toString = "toString",\r\n fillString = "fill",\r\n objectToString = Object.prototype.toString,\r\n paper = {},\r\n push = "push",\r\n ISURL = R._ISURL = /^url\\([\'"]?(.+?)[\'"]?\\)$/i,\r\n colourRegExp = /^\\s*((#[a-f\\d]{6})|(#[a-f\\d]{3})|rgba?\\(\\s*([\\d\\.]+%?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+%?(?:\\s*,\\s*[\\d\\.]+%?)?)\\s*\\)|hsba?\\(\\s*([\\d\\.]+(?:deg|\\xb0|%)?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+(?:%?\\s*,\\s*[\\d\\.]+)?)%?\\s*\\)|hsla?\\(\\s*([\\d\\.]+(?:deg|\\xb0|%)?\\s*,\\s*[\\d\\.]+%?\\s*,\\s*[\\d\\.]+(?:%?\\s*,\\s*[\\d\\.]+)?)%?\\s*\\))\\s*$/i,\r\n isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1},\r\n bezierrg = /^(?:cubic-)?bezier\\(([^,]+),([^,]+),([^,]+),([^\\)]+)\\)/,\r\n round = math.round,\r\n setAttribute = "setAttribute",\r\n toFloat = parseFloat,\r\n toInt = parseInt,\r\n upperCase = Str.prototype.toUpperCase,\r\n availableAttrs = R._availableAttrs = {\r\n "arrow-end": "none",\r\n "arrow-start": "none",\r\n blur: 0,\r\n "clip-rect": "0 0 1e9 1e9",\r\n cursor: "default",\r\n cx: 0,\r\n cy: 0,\r\n fill: "#fff",\r\n "fill-opacity": 1,\r\n font: \'10px "Arial"\',\r\n "font-family": \'"Arial"\',\r\n "font-size": "10",\r\n "font-style": "normal",\r\n "font-weight": 400,\r\n gradient: 0,\r\n height: 0,\r\n href: "http://raphaeljs.com/",\r\n "letter-spacing": 0,\r\n opacity: 1,\r\n path: "M0,0",\r\n r: 0,\r\n rx: 0,\r\n ry: 0,\r\n src: "",\r\n stroke: "#000",\r\n "stroke-dasharray": "",\r\n "stroke-linecap": "butt",\r\n "stroke-linejoin": "butt",\r\n "stroke-miterlimit": 0,\r\n "stroke-opacity": 1,\r\n "stroke-width": 1,\r\n "stroke-scale": false, // FreeGroup: draw2d enhancement\r\n target: "_blank",\r\n "text-anchor": "middle",\r\n title: "Raphael",\r\n transform: "",\r\n width: 0,\r\n x: 0,\r\n y: 0\r\n },\r\n availableAnimAttrs = R._availableAnimAttrs = {\r\n blur: nu,\r\n "clip-rect": "csv",\r\n cx: nu,\r\n cy: nu,\r\n fill: "colour",\r\n "fill-opacity": nu,\r\n "font-size": nu,\r\n height: nu,\r\n opacity: nu,\r\n path: "path",\r\n r: nu,\r\n rx: nu,\r\n ry: nu,\r\n stroke: "colour",\r\n "stroke-opacity": nu,\r\n "stroke-width": nu,\r\n transform: "transform",\r\n width: nu,\r\n x: nu,\r\n y: nu\r\n },\r\n whitespace = /[\\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]/g,\r\n commaSpaces = /[\\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]*,[\\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]*/,\r\n hsrg = {hs: 1, rg: 1},\r\n p2s = /,?([achlmqrstvxz]),?/gi,\r\n pathCommand = /([achlmrqstvz])[\\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,]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[\\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]*,?[\\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]*)+)/ig,\r\n tCommand = /([rstm])[\\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,]*((-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?[\\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]*,?[\\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]*)+)/ig,\r\n pathValues = /(-?\\d*\\.?\\d*(?:e[\\-+]?\\d+)?)[\\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]*,?[\\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]*/ig,\r\n radial_gradient = R._radial_gradient = /^r(?:\\(([^,]+?)[\\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]*,[\\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]*([^\\)]+?)\\))?/,\r\n eldata = {},\r\n sortByKey = function (a, b) {\r\n return a.key - b.key;\r\n },\r\n sortByNumber = function (a, b) {\r\n return toFloat(a) - toFloat(b);\r\n },\r\n fun = function () {},\r\n pipe = function (x) {\r\n return x;\r\n },\r\n rectPath = R._rectPath = function (x, y, w, h, r) {\r\n if (r) {\r\n return [["M", x + r, y], ["l", w - r * 2, 0], ["a", r, r, 0, 0, 1, r, r], ["l", 0, h - r * 2], ["a", r, r, 0, 0, 1, -r, r], ["l", r * 2 - w, 0], ["a", r, r, 0, 0, 1, -r, -r], ["l", 0, r * 2 - h], ["a", r, r, 0, 0, 1, r, -r], ["z"]];\r\n }\r\n return [["M", x, y], ["l", w, 0], ["l", 0, h], ["l", -w, 0], ["z"]];\r\n },\r\n ellipsePath = function (x, y, rx, ry) {\r\n if (ry == null) {\r\n ry = rx;\r\n }\r\n return [["M", x, y], ["m", 0, -ry], ["a", rx, ry, 0, 1, 1, 0, 2 * ry], ["a", rx, ry, 0, 1, 1, 0, -2 * ry], ["z"]];\r\n },\r\n getPath = R._getPath = {\r\n path: function (el) {\r\n return el.attr("path");\r\n },\r\n circle: function (el) {\r\n var a = el.attrs;\r\n return ellipsePath(a.cx, a.cy, a.r);\r\n },\r\n ellipse: function (el) {\r\n var a = el.attrs;\r\n return ellipsePath(a.cx, a.cy, a.rx, a.ry);\r\n },\r\n rect: function (el) {\r\n var a = el.attrs;\r\n return rectPath(a.x, a.y, a.width, a.height, a.r);\r\n },\r\n image: function (el) {\r\n var a = el.attrs;\r\n return rectPath(a.x, a.y, a.width, a.height);\r\n },\r\n text: function (el) {\r\n var bbox = el._getBBox();\r\n return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);\r\n },\r\n set : function(el) {\r\n var bbox = el._getBBox();\r\n return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);\r\n }\r\n },\r\n /*\\\r\n * Raphael.mapPath\r\n [ method ]\r\n **\r\n * Transform the path string with given matrix.\r\n > Parameters\r\n - path (string) path string\r\n - matrix (object) see @Matrix\r\n = (string) transformed path string\r\n \\*/\r\n mapPath = R.mapPath = function (path, matrix) {\r\n if (!matrix) {\r\n return path;\r\n }\r\n var x, y, i, j, ii, jj, pathi;\r\n path = path2curve(path);\r\n for (i = 0, ii = path.length; i < ii; i++) {\r\n pathi = path[i];\r\n for (j = 1, jj = pathi.length; j < jj; j += 2) {\r\n x = matrix.x(pathi[j], pathi[j + 1]);\r\n y = matrix.y(pathi[j], pathi[j + 1]);\r\n pathi[j] = x;\r\n pathi[j + 1] = y;\r\n }\r\n }\r\n return path;\r\n };\r\n\r\n R._g = g;\r\n /*\\\r\n * Raphael.type\r\n [ property (string) ]\r\n **\r\n * Can be “SVG”, “VML” or empty, depending on browser support.\r\n \\*/\r\n R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML");\r\n if (R.type == "VML") {\r\n var d = g.doc.createElement("div"),\r\n b;\r\n d.innerHTML = \'<v:shape adj="1"/>\';\r\n b = d.firstChild;\r\n b.style.behavior = "url(#default#VML)";\r\n if (!(b && typeof b.adj == "object")) {\r\n return (R.type = E);\r\n }\r\n d = null;\r\n }\r\n /*\\\r\n * Raphael.svg\r\n [ property (boolean) ]\r\n **\r\n * `true` if browser supports SVG.\r\n \\*/\r\n /*\\\r\n * Raphael.vml\r\n [ property (boolean) ]\r\n **\r\n * `true` if browser supports VML.\r\n \\*/\r\n R.svg = !(R.vml = R.type == "VML");\r\n R._Paper = Paper;\r\n /*\\\r\n * Raphael.fn\r\n [ property (object) ]\r\n **\r\n * You can add your own method to the canvas. For example if you want to draw a pie chart,\r\n * you can create your own pie chart function and ship it as a Raphaël plugin. To do this\r\n * you need to extend the `Raphael.fn` object. You should modify the `fn` object before a\r\n * Raphaël instance is created, otherwise it will take no effect. Please note that the\r\n * ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to\r\n * ensure any namespacing ensures proper context.\r\n > Usage\r\n | Raphael.fn.arrow = function (x1, y1, x2, y2, size) {\r\n | return this.path( ... );\r\n | };\r\n | // or create namespace\r\n | Raphael.fn.mystuff = {\r\n | arrow: function () {…},\r\n | star: function () {…},\r\n | // etc…\r\n | };\r\n | var paper = Raphael(10, 10, 630, 480);\r\n | // then use it\r\n | paper.arrow(10, 10, 30, 30, 5).attr({fill: "#f00"});\r\n | paper.mystuff.arrow();\r\n | paper.mystuff.star();\r\n \\*/\r\n R.fn = paperproto = Paper.prototype = R.prototype;\r\n R._id = 0;\r\n R._oid = 0;\r\n /*\\\r\n * Raphael.is\r\n [ method ]\r\n **\r\n * Handful of replacements for `typeof` operator.\r\n > Parameters\r\n - o (…) any object or primitive\r\n - type (string) name of the type, i.e. “string”, “function”, “number”, etc.\r\n = (boolean) is given value is of given type\r\n \\*/\r\n R.is = function (o, type) {\r\n type = lowerCase.call(type);\r\n if (type == "finite") {\r\n return !isnan[has](+o);\r\n }\r\n if (type == "array") {\r\n return o instanceof Array;\r\n }\r\n return (type == "null" && o === null) ||\r\n (type == typeof o && o !== null) ||\r\n (type == "object" && o === Object(o)) ||\r\n (type == "array" && Array.isArray && Array.isArray(o)) ||\r\n objectToString.call(o).slice(8, -1).toLowerCase() == type;\r\n };\r\n\r\n function clone(obj) {\r\n if (typeof obj == "function" || Object(obj) !== obj) {\r\n return obj;\r\n }\r\n var res = new obj.constructor;\r\n for (var key in obj) if (obj[has](key)) {\r\n res[key] = clone(obj[key]);\r\n }\r\n return res;\r\n }\r\n\r\n /*\\\r\n * Raphael.angle\r\n [ method ]\r\n **\r\n * Returns angle between two or three points\r\n > Parameters\r\n - x1 (number) x coord of first point\r\n - y1 (number) y coord of first point\r\n - x2 (number) x coord of second point\r\n - y2 (number) y coord of second point\r\n - x3 (number) #optional x coord of third point\r\n - y3 (number) #optional y coord of third point\r\n = (number) angle in degrees.\r\n \\*/\r\n R.angle = function (x1, y1, x2, y2, x3, y3) {\r\n if (x3 == null) {\r\n var x = x1 - x2,\r\n y = y1 - y2;\r\n if (!x && !y) {\r\n return 0;\r\n }\r\n return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360;\r\n } else {\r\n return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3);\r\n }\r\n };\r\n /*\\\r\n * Raphael.rad\r\n [ method ]\r\n **\r\n * Transform angle to radians\r\n > Parameters\r\n - deg (number) angle in degrees\r\n = (number) angle in radians.\r\n \\*/\r\n R.rad = function (deg) {\r\n return deg % 360 * PI / 180;\r\n };\r\n /*\\\r\n * Raphael.deg\r\n [ method ]\r\n **\r\n * Transform angle to degrees\r\n > Parameters\r\n - rad (number) angle in radians\r\n = (number) angle in degrees.\r\n \\*/\r\n R.deg = function (rad) {\r\n return Math.round ((rad * 180 / PI% 360)* 1000) / 1000;\r\n };\r\n /*\\\r\n * Raphael.snapTo\r\n [ method ]\r\n **\r\n * Snaps given value to given grid.\r\n > Parameters\r\n - values (array|number) given array of values or step of the grid\r\n - value (number) value to adjust\r\n - tolerance (number) #optional tolerance for snapping. Default is `10`.\r\n = (number) adjusted value.\r\n \\*/\r\n R.snapTo = function (values, value, tolerance) {\r\n tolerance = R.is(tolerance, "finite") ? tolerance : 10;\r\n if (R.is(values, array)) {\r\n var i = values.length;\r\n while (i--) if (abs(values[i] - value) <= tolerance) {\r\n return values[i];\r\n }\r\n } else {\r\n values = +values;\r\n var rem = value % values;\r\n if (rem < tolerance) {\r\n return value - rem;\r\n }\r\n if (rem > values - tolerance) {\r\n return value - rem + values;\r\n }\r\n }\r\n return value;\r\n };\r\n\r\n /*\\\r\n * Raphael.createUUID\r\n [ method ]\r\n **\r\n * Returns RFC4122, version 4 ID\r\n \\*/\r\n var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) {\r\n return function () {\r\n return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase();\r\n };\r\n })(/[xy]/g, function (c) {\r\n var r = math.random() * 16 | 0,\r\n v = c == "x" ? r : (r & 3 | 8);\r\n return v.toString(16);\r\n });\r\n\r\n /*\\\r\n * Raphael.setWindow\r\n [ method ]\r\n **\r\n * Used when you need to draw in `<iframe>`. Switched window to the iframe one.\r\n > Parameters\r\n - newwin (window) new window object\r\n \\*/\r\n R.setWindow = function (newwin) {\r\n eve("raphael.setWindow", R, g.win, newwin);\r\n g.win = newwin;\r\n g.doc = g.win.document;\r\n if (R._engine.initWin) {\r\n R._engine.initWin(g.win);\r\n }\r\n };\r\n var toHex = function (color) {\r\n if (R.vml) {\r\n // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/\r\n var trim = /^\\s+|\\s+$/g;\r\n var bod;\r\n try {\r\n var docum = new ActiveXObject("htmlfile");\r\n docum.write("<body>");\r\n docum.close();\r\n bod = docum.body;\r\n } catch(e) {\r\n bod = createPopup().document.body;\r\n }\r\n var range = bod.createTextRange();\r\n toHex = cacher(function (color) {\r\n try {\r\n bod.style.color = Str(color).replace(trim, E);\r\n var value = range.queryCommandValue("ForeColor");\r\n value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16);\r\n return "#" + ("000000" + value.toString(16)).slice(-6);\r\n } catch(e) {\r\n return "none";\r\n }\r\n });\r\n } else {\r\n var i = g.doc.createElement("i");\r\n i.title = "Rapha\\xebl Colour Picker";\r\n i.style.display = "none";\r\n g.doc.body.appendChild(i);\r\n toHex = cacher(function (color) {\r\n i.style.color = color;\r\n return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue("color");\r\n });\r\n }\r\n return toHex(color);\r\n },\r\n hsbtoString = function () {\r\n return "hsb(" + [this.h, this.s, this.b] + ")";\r\n },\r\n hsltoString = function () {\r\n return "hsl(" + [this.h, this.s, this.l] + ")";\r\n },\r\n rgbtoString = function () {\r\n return this.hex;\r\n },\r\n prepareRGB = function (r, g, b) {\r\n if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) {\r\n b = r.b;\r\n g = r.g;\r\n r = r.r;\r\n }\r\n if (g == null && R.is(r, string)) {\r\n var clr = R.getRGB(r);\r\n r = clr.r;\r\n g = clr.g;\r\n b = clr.b;\r\n }\r\n if (r > 1 || g > 1 || b > 1) {\r\n r /= 255;\r\n g /= 255;\r\n b /= 255;\r\n }\r\n\r\n return [r, g, b];\r\n },\r\n packageRGB = function (r, g, b, o) {\r\n r *= 255;\r\n g *= 255;\r\n b *= 255;\r\n var rgb = {\r\n r: r,\r\n g: g,\r\n b: b,\r\n hex: R.rgb(r, g, b),\r\n toString: rgbtoString\r\n };\r\n R.is(o, "finite") && (rgb.opacity = o);\r\n return rgb;\r\n };\r\n\r\n /*\\\r\n * Raphael.color\r\n [ method ]\r\n **\r\n * Parses the color string and returns object with all values for the given color.\r\n > Parameters\r\n - clr (string) color string in one of the supported formats (see @Raphael.getRGB)\r\n = (object) Combined RGB & HSB object in format:\r\n o {\r\n o r (number) red,\r\n o g (number) green,\r\n o b (number) blue,\r\n o hex (string) color in HTML/CSS format: #••••••,\r\n o error (boolean) `true` if string can’t be parsed,\r\n o h (number) hue,\r\n o s (number) saturation,\r\n o v (number) value (brightness),\r\n o l (number) lightness\r\n o }\r\n \\*/\r\n R.color = function (clr) {\r\n var rgb;\r\n if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) {\r\n rgb = R.hsb2rgb(clr);\r\n clr.r = rgb.r;\r\n clr.g = rgb.g;\r\n clr.b = rgb.b;\r\n clr.hex = rgb.hex;\r\n } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) {\r\n rgb = R.hsl2rgb(clr);\r\n clr.r = rgb.r;\r\n clr.g = rgb.g;\r\n clr.b = rgb.b;\r\n clr.hex = rgb.hex;\r\n } else {\r\n if (R.is(clr, "string")) {\r\n clr = R.getRGB(clr);\r\n }\r\n if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) {\r\n rgb = R.rgb2hsl(clr);\r\n clr.h = rgb.h;\r\n clr.s = rgb.s;\r\n clr.l = rgb.l;\r\n rgb = R.rgb2hsb(clr);\r\n clr.v = rgb.b;\r\n } else {\r\n clr = {hex: "none"};\r\n clr.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1;\r\n }\r\n }\r\n clr.toString = rgbtoString;\r\n return clr;\r\n };\r\n /*\\\r\n * Raphael.hsb2rgb\r\n [ method ]\r\n **\r\n * Converts HSB values to RGB object.\r\n > Parameters\r\n - h (number) hue\r\n - s (number) saturation\r\n - v (number) value or brightness\r\n = (object) RGB object in format:\r\n o {\r\n o r (number) red,\r\n o g (number) green,\r\n o b (number) blue,\r\n o hex (string) color in HTML/CSS format: #••••••\r\n o }\r\n \\*/\r\n R.hsb2rgb = function (h, s, v, o) {\r\n if (this.is(h, "object") && "h" in h && "s" in h && "b" in h) {\r\n v = h.b;\r\n s = h.s;\r\n o = h.o;\r\n h = h.h;\r\n }\r\n h *= 360;\r\n var R, G, B, X, C;\r\n h = (h % 360) / 60;\r\n C = v * s;\r\n X = C * (1 - abs(h % 2 - 1));\r\n R = G = B = v - C;\r\n\r\n h = ~~h;\r\n R += [C, X, 0, 0, X, C][h];\r\n G += [X, C, C, X, 0, 0][h];\r\n B += [0, 0, X, C, C, X][h];\r\n return packageRGB(R, G, B, o);\r\n };\r\n /*\\\r\n * Raphael.hsl2rgb\r\n [ method ]\r\n **\r\n * Converts HSL values to RGB object.\r\n > Parameters\r\n - h (number) hue\r\n - s (number) saturation\r\n - l (number) luminosity\r\n = (object) RGB object in format:\r\n o {\r\n o r (number) red,\r\n o g (number) green,\r\n o b (number) blue,\r\n o hex (string) color in HTML/CSS format: #••••••\r\n o }\r\n \\*/\r\n R.hsl2rgb = function (h, s, l, o) {\r\n if (this.is(h, "object") && "h" in h && "s" in h && "l" in h) {\r\n l = h.l;\r\n s = h.s;\r\n h = h.h;\r\n }\r\n if (h > 1 || s > 1 || l > 1) {\r\n h /= 360;\r\n s /= 100;\r\n l /= 100;\r\n }\r\n h *= 360;\r\n var R, G, B, X, C;\r\n h = (h % 360) / 60;\r\n C = 2 * s * (l < .5 ? l : 1 - l);\r\n X = C * (1 - abs(h % 2 - 1));\r\n R = G = B = l - C / 2;\r\n\r\n h = ~~h;\r\n R += [C, X, 0, 0, X, C][h];\r\n G += [X, C, C, X, 0, 0][h];\r\n B += [0, 0, X, C, C, X][h];\r\n return packageRGB(R, G, B, o);\r\n };\r\n /*\\\r\n * Raphael.rgb2hsb\r\n [ method ]\r\n **\r\n * Converts RGB values to HSB object.\r\n > Parameters\r\n - r (number) red\r\n - g (number) green\r\n - b (number) blue\r\n = (object) HSB object in format:\r\n o {\r\n o h (number) hue\r\n o s (number) saturation\r\n o b (number) brightness\r\n o }\r\n \\*/\r\n R.rgb2hsb = function (r, g, b) {\r\n b = prepareRGB(r, g, b);\r\n r = b[0];\r\n g = b[1];\r\n b = b[2];\r\n\r\n var H, S, V, C;\r\n V = mmax(r, g, b);\r\n C = V - mmin(r, g, b);\r\n H = (C == 0 ? null :\r\n V == r ? (g - b) / C :\r\n V == g ? (b - r) / C + 2 :\r\n (r - g) / C + 4\r\n );\r\n H = ((H + 360) % 6) * 60 / 360;\r\n S = C == 0 ? 0 : C / V;\r\n return {h: H, s: S, b: V, toString: hsbtoString};\r\n };\r\n /*\\\r\n * Raphael.rgb2hsl\r\n [ method ]\r\n **\r\n * Converts RGB values to HSL object.\r\n > Parameters\r\n - r (number) red\r\n - g (number) green\r\n - b (number) blue\r\n = (object) HSL object in format:\r\n o {\r\n o h (number) hue\r\n o s (number) saturation\r\n o l (number) luminosity\r\n o }\r\n \\*/\r\n R.rgb2hsl = function (r, g, b) {\r\n b = prepareRGB(r, g, b);\r\n r = b[0];\r\n g = b[1];\r\n b = b[2];\r\n\r\n var H, S, L, M, m, C;\r\n M = mmax(r, g, b);\r\n m = mmin(r, g, b);\r\n C = M - m;\r\n H = (C == 0 ? null :\r\n M == r ? (g - b) / C :\r\n M == g ? (b - r) / C + 2 :\r\n (r - g) / C + 4);\r\n H = ((H + 360) % 6) * 60 / 360;\r\n L = (M + m) / 2;\r\n S = (C == 0 ? 0 :\r\n L < .5 ? C / (2 * L) :\r\n C / (2 - 2 * L));\r\n return {h: H, s: S, l: L, toString: hsltoString};\r\n };\r\n R._path2string = function () {\r\n return this.join(",").replace(p2s, "$1");\r\n };\r\n function repush(array, item) {\r\n for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) {\r\n return array.push(array.splice(i, 1)[0]);\r\n }\r\n }\r\n function cacher(f, scope, postprocessor) {\r\n function newf() {\r\n var arg = Array.prototype.slice.call(arguments, 0),\r\n args = arg.join("\\u2400"),\r\n cache = newf.cache = newf.cache || {},\r\n count = newf.count = newf.count || [];\r\n if (cache[has](args)) {\r\n repush(count, args);\r\n return postprocessor ? postprocessor(cache[args]) : cache[args];\r\n }\r\n count.length >= 1e3 && delete cache[count.shift()];\r\n count.push(args);\r\n cache[args] = f[apply](scope, arg);\r\n return postprocessor ? postprocessor(cache[args]) : cache[args];\r\n }\r\n return newf;\r\n }\r\n\r\n var preload = R._preload = function (src, f) {\r\n var img = g.doc.createElement("img");\r\n img.style.cssText = "position:absolute;left:-9999em;top:-9999em";\r\n img.onload = function () {\r\n f.call(this);\r\n this.onload = null;\r\n g.doc.body.removeChild(this);\r\n };\r\n img.onerror = function () {\r\n g.doc.body.removeChild(this);\r\n };\r\n g.doc.body.appendChild(img);\r\n img.src = src;\r\n };\r\n\r\n function clrToString() {\r\n return this.hex;\r\n }\r\n\r\n /*\\\r\n * Raphael.getRGB\r\n [ method ]\r\n **\r\n * Parses colour string as RGB object\r\n > Parameters\r\n - colour (string) colour string in one of formats:\r\n # <ul>\r\n # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>\r\n # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>\r\n # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>\r\n # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li>\r\n # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li>\r\n # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li>\r\n # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>\r\n # <li>hsl(•••, •••, •••) — same as hsb</li>\r\n # <li>hsl(•••%, •••%, •••%) — same as hsb</li>\r\n # </ul>\r\n = (object) RGB object in format:\r\n o {\r\n o r (number) red,\r\n o g (number) green,\r\n o b (number) blue\r\n o hex (string) color in HTML/CSS format: #••••••,\r\n o error (boolean) true if string can’t be parsed\r\n o }\r\n \\*/\r\n R.getRGB = cacher(function (colour) {\r\n if (!colour || !!((colour = Str(colour)).indexOf("-") + 1)) {\r\n return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString};\r\n }\r\n if (colour == "none") {\r\n return {r: -1, g: -1, b: -1, hex: "none", toString: clrToString};\r\n }\r\n !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == "#") && (colour = toHex(colour));\r\n var res,\r\n red,\r\n green,\r\n blue,\r\n opacity,\r\n t,\r\n values,\r\n rgb = colour.match(colourRegExp);\r\n if (rgb) {\r\n if (rgb[2]) {\r\n blue = toInt(rgb[2].substring(5), 16);\r\n green = toInt(rgb[2].substring(3, 5), 16);\r\n red = toInt(rgb[2].substring(1, 3), 16);\r\n }\r\n if (rgb[3]) {\r\n blue = toInt((t = rgb[3].charAt(3)) + t, 16);\r\n green = toInt((t = rgb[3].charAt(2)) + t, 16);\r\n red = toInt((t = rgb[3].charAt(1)) + t, 16);\r\n }\r\n if (rgb[4]) {\r\n values = rgb[4][split](commaSpaces);\r\n red = toFloat(values[0]);\r\n values[0].slice(-1) == "%" && (red *= 2.55);\r\n green = toFloat(values[1]);\r\n values[1].slice(-1) == "%" && (green *= 2.55);\r\n blue = toFloat(values[2]);\r\n values[2].slice(-1) == "%" && (blue *= 2.55);\r\n rgb[1].toLowerCase().slice(0, 4) == "rgba" && (opacity = toFloat(values[3]));\r\n values[3] && values[3].slice(-1) == "%" && (opacity /= 100);\r\n }\r\n if (rgb[5]) {\r\n values = rgb[5][split](commaSpaces);\r\n red = toFloat(values[0]);\r\n values[0].slice(-1) == "%" && (red *= 2.55);\r\n green = toFloat(values[1]);\r\n values[1].slice(-1) == "%" && (green *= 2.55);\r\n blue = toFloat(values[2]);\r\n values[2].slice(-1) == "%" && (blue *= 2.55);\r\n (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\\xb0") && (red /= 360);\r\n rgb[1].toLowerCase().slice(0, 4) == "hsba" && (opacity = toFloat(values[3]));\r\n values[3] && values[3].slice(-1) == "%" && (opacity /= 100);\r\n return R.hsb2rgb(red, green, blue, opacity);\r\n }\r\n if (rgb[6]) {\r\n values = rgb[6][split](commaSpaces);\r\n red = toFloat(values[0]);\r\n values[0].slice(-1) == "%" && (red *= 2.55);\r\n green = toFloat(values[1]);\r\n values[1].slice(-1) == "%" && (green *= 2.55);\r\n blue = toFloat(values[2]);\r\n values[2].slice(-1) == "%" && (blue *= 2.55);\r\n (values[0].slice(-3) == "deg" || values[0].slice(-1) == "\\xb0") && (red /= 360);\r\n rgb[1].toLowerCase().slice(0, 4) == "hsla" && (opacity = toFloat(values[3]));\r\n values[3] && values[3].slice(-1) == "%" && (opacity /= 100);\r\n return R.hsl2rgb(red, green, blue, opacity);\r\n }\r\n rgb = {r: red, g: green, b: blue, toString: clrToString};\r\n rgb.hex = "#" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1);\r\n R.is(opacity, "finite") && (rgb.opacity = opacity);\r\n return rgb;\r\n }\r\n return {r: -1, g: -1, b: -1, hex: "none", error: 1, toString: clrToString};\r\n }, R);\r\n /*\\\r\n * Raphael.hsb\r\n [ method ]\r\n **\r\n * Converts HSB values to hex representation of the colour.\r\n > Parameters\r\n - h (number) hue\r\n - s (number) saturation\r\n - b (number) value or brightness\r\n = (string) hex representation of the colour.\r\n \\*/\r\n R.hsb = cacher(function (h, s, b) {\r\n return R.hsb2rgb(h, s, b).hex;\r\n });\r\n /*\\\r\n * Raphael.hsl\r\n [ method ]\r\n **\r\n * Converts HSL values to hex representation of the colour.\r\n > Parameters\r\n - h (number) hue\r\n - s (number) saturation\r\n - l (number) luminosity\r\n = (string) hex representation of the colour.\r\n \\*/\r\n R.hsl = cacher(function (h, s, l) {\r\n return R.hsl2rgb(h, s, l).hex;\r\n });\r\n /*\\\r\n * Raphael.rgb\r\n [ method ]\r\n **\r\n * Converts RGB values to hex representation of the colour.\r\n > Parameters\r\n - r (number) red\r\n - g (number) green\r\n - b (number) blue\r\n = (string) hex representation of the colour.\r\n \\*/\r\n R.rgb = cacher(function (r, g, b) {\r\n function round(x) { return (x + 0.5) | 0; }\r\n return "#" + (16777216 | round(b) | (round(g) << 8) | (round(r) << 16)).toString(16).slice(1);\r\n });\r\n /*\\\r\n * Raphael.getColor\r\n [ method ]\r\n **\r\n * On each call returns next colour in the spectrum. To reset it back to red call @Raphael.getColor.reset\r\n > Parameters\r\n - value (number) #optional brightness, default is `0.75`\r\n = (string) hex representation of the colour.\r\n \\*/\r\n R.getColor = function (value) {\r\n var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75},\r\n rgb = this.hsb2rgb(start.h, start.s, start.b);\r\n start.h += .075;\r\n if (start.h > 1) {\r\n start.h = 0;\r\n start.s -= .2;\r\n start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b});\r\n }\r\n return rgb.hex;\r\n };\r\n /*\\\r\n * Raphael.getColor.reset\r\n [ method ]\r\n **\r\n * Resets spectrum position for @Raphael.getColor back to red.\r\n \\*/\r\n R.getColor.reset = function () {\r\n delete this.start;\r\n };\r\n\r\n // http://schepers.cc/getting-to-the-point\r\n function catmullRom2bezier(crp, z) {\r\n var d = [];\r\n for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {\r\n var p = [\r\n {x: +crp[i - 2], y: +crp[i - 1]},\r\n {x: +crp[i], y: +crp[i + 1]},\r\n {x: +crp[i + 2], y: +crp[i + 3]},\r\n {x: +crp[i + 4], y: +crp[i + 5]}\r\n ];\r\n if (z) {\r\n if (!i) {\r\n p[0] = {x: +crp[iLen - 2], y: +crp[iLen - 1]};\r\n } else if (iLen - 4 == i) {\r\n p[3] = {x: +crp[0], y: +crp[1]};\r\n } else if (iLen - 2 == i) {\r\n p[2] = {x: +crp[0], y: +crp[1]};\r\n p[3] = {x: +crp[2], y: +crp[3]};\r\n }\r\n } else {\r\n if (iLen - 4 == i) {\r\n p[3] = p[2];\r\n } else if (!i) {\r\n p[0] = {x: +crp[i], y: +crp[i + 1]};\r\n }\r\n }\r\n d.push(["C",\r\n (-p[0].x + 6 * p[1].x + p[2].x) / 6,\r\n (-p[0].y + 6 * p[1].y + p[2].y) / 6,\r\n (p[1].x + 6 * p[2].x - p[3].x) / 6,\r\n (p[1].y + 6*p[2].y - p[3].y) / 6,\r\n p[2].x,\r\n p[2].y\r\n ]);\r\n }\r\n\r\n return d;\r\n }\r\n /*\\\r\n * Raphael.parsePathString\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Parses given path string into an array of arrays of path segments.\r\n > Parameters\r\n - pathString (string|array) path string or array of segments (in the last case it will be returned straight away)\r\n = (array) array of segments.\r\n \\*/\r\n R.parsePathString = function (pathString) {\r\n if (!pathString) {\r\n return null;\r\n }\r\n var pth = paths(pathString);\r\n if (pth.arr) {\r\n return pathClone(pth.arr);\r\n }\r\n\r\n var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0},\r\n data = [];\r\n if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption\r\n data = pathClone(pathString);\r\n }\r\n if (!data.length) {\r\n Str(pathString).replace(pathCommand, function (a, b, c) {\r\n var params = [],\r\n name = b.toLowerCase();\r\n c.replace(pathValues, function (a, b) {\r\n b && params.push(+b);\r\n });\r\n if (name == "m" && params.length > 2) {\r\n data.push([b][concat](params.splice(0, 2)));\r\n name = "l";\r\n b = b == "m" ? "l" : "L";\r\n }\r\n if (name == "r") {\r\n data.push([b][concat](params));\r\n } else while (params.length >= paramCounts[name]) {\r\n data.push([b][concat](params.splice(0, paramCounts[name])));\r\n if (!paramCounts[name]) {\r\n break;\r\n }\r\n }\r\n });\r\n }\r\n data.toString = R._path2string;\r\n pth.arr = pathClone(data);\r\n return data;\r\n };\r\n /*\\\r\n * Raphael.parseTransformString\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Parses given path string into an array of transformations.\r\n > Parameters\r\n - TString (string|array) transform string or array of transformations (in the last case it will be returned straight away)\r\n = (array) array of transformations.\r\n \\*/\r\n R.parseTransformString = cacher(function (TString) {\r\n if (!TString) {\r\n return null;\r\n }\r\n var paramCounts = {r: 3, s: 4, t: 2, m: 6},\r\n data = [];\r\n if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption\r\n data = pathClone(TString);\r\n }\r\n if (!data.length) {\r\n Str(TString).replace(tCommand, function (a, b, c) {\r\n var params = [],\r\n name = lowerCase.call(b);\r\n c.replace(pathValues, function (a, b) {\r\n b && params.push(+b);\r\n });\r\n data.push([b][concat](params));\r\n });\r\n }\r\n data.toString = R._path2string;\r\n return data;\r\n });\r\n // PATHS\r\n var paths = function (ps) {\r\n var p = paths.ps = paths.ps || {};\r\n if (p[ps]) {\r\n p[ps].sleep = 100;\r\n } else {\r\n p[ps] = {\r\n sleep: 100\r\n };\r\n }\r\n setTimeout(function () {\r\n for (var key in p) if (p[has](key) && key != ps) {\r\n p[key].sleep--;\r\n !p[key].sleep && delete p[key];\r\n }\r\n });\r\n return p[ps];\r\n };\r\n /*\\\r\n * Raphael.findDotsAtSegment\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Find dot coordinates on the given cubic bezier curve at the given t.\r\n > Parameters\r\n - p1x (number) x of the first point of the curve\r\n - p1y (number) y of the first point of the curve\r\n - c1x (number) x of the first anchor of the curve\r\n - c1y (number) y of the first anchor of the curve\r\n - c2x (number) x of the second anchor of the curve\r\n - c2y (number) y of the second anchor of the curve\r\n - p2x (number) x of the second point of the curve\r\n - p2y (number) y of the second point of the curve\r\n - t (number) position on the curve (0..1)\r\n = (object) point information in format:\r\n o {\r\n o x: (number) x coordinate of the point\r\n o y: (number) y coordinate of the point\r\n o m: {\r\n o x: (number) x coordinate of the left anchor\r\n o y: (number) y coordinate of the left anchor\r\n o }\r\n o n: {\r\n o x: (number) x coordinate of the right anchor\r\n o y: (number) y coordinate of the right anchor\r\n o }\r\n o start: {\r\n o x: (number) x coordinate of the start of the curve\r\n o y: (number) y coordinate of the start of the curve\r\n o }\r\n o end: {\r\n o x: (number) x coordinate of the end of the curve\r\n o y: (number) y coordinate of the end of the curve\r\n o }\r\n o alpha: (number) angle of the curve derivative at the point\r\n o }\r\n \\*/\r\n R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\r\n var t1 = 1 - t,\r\n t13 = pow(t1, 3),\r\n t12 = pow(t1, 2),\r\n t2 = t * t,\r\n t3 = t2 * t,\r\n x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x,\r\n y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y,\r\n mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x),\r\n my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y),\r\n nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x),\r\n ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y),\r\n ax = t1 * p1x + t * c1x,\r\n ay = t1 * p1y + t * c1y,\r\n cx = t1 * c2x + t * p2x,\r\n cy = t1 * c2y + t * p2y,\r\n alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI);\r\n (mx > nx || my < ny) && (alpha += 180);\r\n return {\r\n x: x,\r\n y: y,\r\n m: {x: mx, y: my},\r\n n: {x: nx, y: ny},\r\n start: {x: ax, y: ay},\r\n end: {x: cx, y: cy},\r\n alpha: alpha\r\n };\r\n };\r\n /*\\\r\n * Raphael.bezierBBox\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Return bounding box of a given cubic bezier curve\r\n > Parameters\r\n - p1x (number) x of the first point of the curve\r\n - p1y (number) y of the first point of the curve\r\n - c1x (number) x of the first anchor of the curve\r\n - c1y (number) y of the first anchor of the curve\r\n - c2x (number) x of the second anchor of the curve\r\n - c2y (number) y of the second anchor of the curve\r\n - p2x (number) x of the second point of the curve\r\n - p2y (number) y of the second point of the curve\r\n * or\r\n - bez (array) array of six points for bezier curve\r\n = (object) point information in format:\r\n o {\r\n o min: {\r\n o x: (number) x coordinate of the left point\r\n o y: (number) y coordinate of the top point\r\n o }\r\n o max: {\r\n o x: (number) x coordinate of the right point\r\n o y: (number) y coordinate of the bottom point\r\n o }\r\n o }\r\n \\*/\r\n R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\r\n if (!R.is(p1x, "array")) {\r\n p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y];\r\n }\r\n var bbox = curveDim.apply(null, p1x);\r\n return {\r\n x: bbox.min.x,\r\n y: bbox.min.y,\r\n x2: bbox.max.x,\r\n y2: bbox.max.y,\r\n width: bbox.max.x - bbox.min.x,\r\n height: bbox.max.y - bbox.min.y\r\n };\r\n };\r\n /*\\\r\n * Raphael.isPointInsideBBox\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns `true` if given point is inside bounding boxes.\r\n > Parameters\r\n - bbox (string) bounding box\r\n - x (string) x coordinate of the point\r\n - y (string) y coordinate of the point\r\n = (boolean) `true` if point inside\r\n \\*/\r\n R.isPointInsideBBox = function (bbox, x, y) {\r\n return x >= bbox.x && x <= bbox.x2 && y >= bbox.y && y <= bbox.y2;\r\n };\r\n /*\\\r\n * Raphael.isBBoxIntersect\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns `true` if two bounding boxes intersect\r\n > Parameters\r\n - bbox1 (string) first bounding box\r\n - bbox2 (string) second bounding box\r\n = (boolean) `true` if they intersect\r\n \\*/\r\n R.isBBoxIntersect = function (bbox1, bbox2) {\r\n var i = R.isPointInsideBBox;\r\n return i(bbox2, bbox1.x, bbox1.y)\r\n || i(bbox2, bbox1.x2, bbox1.y)\r\n || i(bbox2, bbox1.x, bbox1.y2)\r\n || i(bbox2, bbox1.x2, bbox1.y2)\r\n || i(bbox1, bbox2.x, bbox2.y)\r\n || i(bbox1, bbox2.x2, bbox2.y)\r\n || i(bbox1, bbox2.x, bbox2.y2)\r\n || i(bbox1, bbox2.x2, bbox2.y2)\r\n || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x)\r\n && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y);\r\n };\r\n function base3(t, p1, p2, p3, p4) {\r\n var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4,\r\n t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;\r\n return t * t2 - 3 * p1 + 3 * p2;\r\n }\r\n function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {\r\n if (z == null) {\r\n z = 1;\r\n }\r\n z = z > 1 ? 1 : z < 0 ? 0 : z;\r\n var z2 = z / 2,\r\n n = 12,\r\n Tvalues = [-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816],\r\n Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],\r\n sum = 0;\r\n for (var i = 0; i < n; i++) {\r\n var ct = z2 * Tvalues[i] + z2,\r\n xbase = base3(ct, x1, x2, x3, x4),\r\n ybase = base3(ct, y1, y2, y3, y4),\r\n comb = xbase * xbase + ybase * ybase;\r\n sum += Cvalues[i] * math.sqrt(comb);\r\n }\r\n return z2 * sum;\r\n }\r\n function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {\r\n if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) {\r\n return;\r\n }\r\n var t = 1,\r\n step = t / 2,\r\n t2 = t - step,\r\n l,\r\n e = .01;\r\n l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);\r\n while (abs(l - ll) > e) {\r\n step /= 2;\r\n t2 += (l < ll ? 1 : -1) * step;\r\n l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);\r\n }\r\n return t2;\r\n }\r\n function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {\r\n if (\r\n mmax(x1, x2) < mmin(x3, x4) ||\r\n mmin(x1, x2) > mmax(x3, x4) ||\r\n mmax(y1, y2) < mmin(y3, y4) ||\r\n mmin(y1, y2) > mmax(y3, y4)\r\n ) {\r\n return;\r\n }\r\n var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\r\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\r\n denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\r\n\r\n if (!denominator) {\r\n return;\r\n }\r\n var px = nx / denominator,\r\n py = ny / denominator,\r\n px2 = +px.toFixed(2),\r\n py2 = +py.toFixed(2);\r\n if (\r\n px2 < +mmin(x1, x2).toFixed(2) ||\r\n px2 > +mmax(x1, x2).toFixed(2) ||\r\n px2 < +mmin(x3, x4).toFixed(2) ||\r\n px2 > +mmax(x3, x4).toFixed(2) ||\r\n py2 < +mmin(y1, y2).toFixed(2) ||\r\n py2 > +mmax(y1, y2).toFixed(2) ||\r\n py2 < +mmin(y3, y4).toFixed(2) ||\r\n py2 > +mmax(y3, y4).toFixed(2)\r\n ) {\r\n return;\r\n }\r\n return {x: px, y: py};\r\n }\r\n function inter(bez1, bez2) {\r\n return interHelper(bez1, bez2);\r\n }\r\n function interCount(bez1, bez2) {\r\n return interHelper(bez1, bez2, 1);\r\n }\r\n function interHelper(bez1, bez2, justCount) {\r\n var bbox1 = R.bezierBBox(bez1),\r\n bbox2 = R.bezierBBox(bez2);\r\n if (!R.isBBoxIntersect(bbox1, bbox2)) {\r\n return justCount ? 0 : [];\r\n }\r\n var l1 = bezlen.apply(0, bez1),\r\n l2 = bezlen.apply(0, bez2),\r\n n1 = mmax(~~(l1 / 5), 1),\r\n n2 = mmax(~~(l2 / 5), 1),\r\n dots1 = [],\r\n dots2 = [],\r\n xy = {},\r\n res = justCount ? 0 : [];\r\n for (var i = 0; i < n1 + 1; i++) {\r\n var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1));\r\n dots1.push({x: p.x, y: p.y, t: i / n1});\r\n }\r\n for (i = 0; i < n2 + 1; i++) {\r\n p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2));\r\n dots2.push({x: p.x, y: p.y, t: i / n2});\r\n }\r\n for (i = 0; i < n1; i++) {\r\n for (var j = 0; j < n2; j++) {\r\n var di = dots1[i],\r\n di1 = dots1[i + 1],\r\n dj = dots2[j],\r\n dj1 = dots2[j + 1],\r\n ci = abs(di1.x - di.x) < .001 ? "y" : "x",\r\n cj = abs(dj1.x - dj.x) < .001 ? "y" : "x",\r\n is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y);\r\n if (is) {\r\n if (xy[is.x.toFixed(4)] == is.y.toFixed(4)) {\r\n continue;\r\n }\r\n xy[is.x.toFixed(4)] = is.y.toFixed(4);\r\n var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t),\r\n t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);\r\n if (t1 >= 0 && t1 <= 1.001 && t2 >= 0 && t2 <= 1.001) {\r\n if (justCount) {\r\n res++;\r\n } else {\r\n res.push({\r\n x: is.x,\r\n y: is.y,\r\n t1: mmin(t1, 1),\r\n t2: mmin(t2, 1)\r\n });\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return res;\r\n }\r\n /*\\\r\n * Raphael.pathIntersection\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Finds intersections of two paths\r\n > Parameters\r\n - path1 (string) path string\r\n - path2 (string) path string\r\n = (array) dots of intersection\r\n o [\r\n o {\r\n o x: (number) x coordinate of the point\r\n o y: (number) y coordinate of the point\r\n o t1: (number) t value for segment of path1\r\n o t2: (number) t value for segment of path2\r\n o segment1: (number) order number for segment of path1\r\n o segment2: (number) order number for segment of path2\r\n o bez1: (array) eight coordinates representing beziér curve for the segment of path1\r\n o bez2: (array) eight coordinates representing beziér curve for the segment of path2\r\n o }\r\n o ]\r\n \\*/\r\n R.pathIntersection = function (path1, path2) {\r\n return interPathHelper(path1, path2);\r\n };\r\n R.pathIntersectionNumber = function (path1, path2) {\r\n return interPathHelper(path1, path2, 1);\r\n };\r\n function interPathHelper(path1, path2, justCount) {\r\n path1 = R._path2curve(path1);\r\n path2 = R._path2curve(path2);\r\n var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2,\r\n res = justCount ? 0 : [];\r\n for (var i = 0, ii = path1.length; i < ii; i++) {\r\n var pi = path1[i];\r\n if (pi[0] == "M") {\r\n x1 = x1m = pi[1];\r\n y1 = y1m = pi[2];\r\n } else {\r\n if (pi[0] == "C") {\r\n bez1 = [x1, y1].concat(pi.slice(1));\r\n x1 = bez1[6];\r\n y1 = bez1[7];\r\n } else {\r\n bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m];\r\n x1 = x1m;\r\n y1 = y1m;\r\n }\r\n for (var j = 0, jj = path2.length; j < jj; j++) {\r\n var pj = path2[j];\r\n if (pj[0] == "M") {\r\n x2 = x2m = pj[1];\r\n y2 = y2m = pj[2];\r\n } else {\r\n if (pj[0] == "C") {\r\n bez2 = [x2, y2].concat(pj.slice(1));\r\n x2 = bez2[6];\r\n y2 = bez2[7];\r\n } else {\r\n bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m];\r\n x2 = x2m;\r\n y2 = y2m;\r\n }\r\n var intr = interHelper(bez1, bez2, justCount);\r\n if (justCount) {\r\n res += intr;\r\n } else {\r\n for (var k = 0, kk = intr.length; k < kk; k++) {\r\n intr[k].segment1 = i;\r\n intr[k].segment2 = j;\r\n intr[k].bez1 = bez1;\r\n intr[k].bez2 = bez2;\r\n }\r\n res = res.concat(intr);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return res;\r\n }\r\n /*\\\r\n * Raphael.isPointInsidePath\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns `true` if given point is inside a given closed path.\r\n > Parameters\r\n - path (string) path string\r\n - x (number) x of the point\r\n - y (number) y of the point\r\n = (boolean) true, if point is inside the path\r\n \\*/\r\n R.isPointInsidePath = function (path, x, y) {\r\n var bbox = R.pathBBox(path);\r\n return R.isPointInsideBBox(bbox, x, y) &&\r\n interPathHelper(path, [["M", x, y], ["H", bbox.x2 + 10]], 1) % 2 == 1;\r\n };\r\n R._removedFactory = function (methodname) {\r\n return function () {\r\n eve("raphael.log", null, "Rapha\\xebl: you are calling to method \\u201c" + methodname + "\\u201d of removed object", methodname);\r\n };\r\n };\r\n /*\\\r\n * Raphael.pathBBox\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Return bounding box of a given path\r\n > Parameters\r\n - path (string) path string\r\n = (object) bounding box\r\n o {\r\n o x: (number) x coordinate of the left top point of the box\r\n o y: (number) y coordinate of the left top point of the box\r\n o x2: (number) x coordinate of the right bottom point of the box\r\n o y2: (number) y coordinate of the right bottom point of the box\r\n o width: (number) width of the box\r\n o height: (number) height of the box\r\n o cx: (number) x coordinate of the center of the box\r\n o cy: (number) y coordinate of the center of the box\r\n o }\r\n \\*/\r\n var pathDimensions = R.pathBBox = function (path) {\r\n var pth = paths(path);\r\n if (pth.bbox) {\r\n var b= pth.bbox;\r\n return {x: b.x, y: b.y, width: b.width, height: b.height, x2: b.x2, y2: b.y2} ; // FREEGROUP FIX!!!!!!\r\n // raphael reuse the returned bbox. You must clone it here if the caller need the bbxo for\r\n //further calculation\r\n }\r\n if (!path) {\r\n return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0};\r\n }\r\n path = path2curve(path);\r\n var x = 0,\r\n y = 0,\r\n X = [],\r\n Y = [],\r\n p;\r\n for (var i = 0, ii = path.length; i < ii; i++) {\r\n p = path[i];\r\n if (p[0] == "M") {\r\n x = p[1];\r\n y = p[2];\r\n X.push(x);\r\n Y.push(y);\r\n } else {\r\n var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);\r\n X = X[concat](dim.min.x, dim.max.x);\r\n Y = Y[concat](dim.min.y, dim.max.y);\r\n x = p[5];\r\n y = p[6];\r\n }\r\n }\r\n var xmin = mmin[apply](0, X),\r\n ymin = mmin[apply](0, Y),\r\n xmax = mmax[apply](0, X),\r\n ymax = mmax[apply](0, Y),\r\n width = xmax - xmin,\r\n height = ymax - ymin,\r\n bb = {\r\n x: xmin,\r\n y: ymin,\r\n x2: xmax,\r\n y2: ymax,\r\n width: width,\r\n height: height,\r\n cx: xmin + width / 2,\r\n cy: ymin + height / 2\r\n };\r\n pth.bbox = clone(bb);\r\n return bb;\r\n },\r\n pathClone = function (pathArray) {\r\n var res = clone(pathArray);\r\n res.toString = R._path2string;\r\n return res;\r\n },\r\n pathToRelative = R._pathToRelative = function (pathArray) {\r\n var pth = paths(pathArray);\r\n if (pth.rel) {\r\n return pathClone(pth.rel);\r\n }\r\n if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption\r\n pathArray = R.parsePathString(pathArray);\r\n }\r\n var res = [],\r\n x = 0,\r\n y = 0,\r\n mx = 0,\r\n my = 0,\r\n start = 0;\r\n if (pathArray[0][0] == "M") {\r\n x = pathArray[0][1];\r\n y = pathArray[0][2];\r\n mx = x;\r\n my = y;\r\n start++;\r\n res.push(["M", x, y]);\r\n }\r\n for (var i = start, ii = pathArray.length; i < ii; i++) {\r\n var r = res[i] = [],\r\n pa = pathArray[i];\r\n if (pa[0] != lowerCase.call(pa[0])) {\r\n r[0] = lowerCase.call(pa[0]);\r\n switch (r[0]) {\r\n case "a":\r\n r[1] = pa[1];\r\n r[2] = pa[2];\r\n r[3] = pa[3];\r\n r[4] = pa[4];\r\n r[5] = pa[5];\r\n r[6] = +(pa[6] - x).toFixed(3);\r\n r[7] = +(pa[7] - y).toFixed(3);\r\n break;\r\n case "v":\r\n r[1] = +(pa[1] - y).toFixed(3);\r\n break;\r\n case "m":\r\n mx = pa[1];\r\n my = pa[2];\r\n default:\r\n for (var j = 1, jj = pa.length; j < jj; j++) {\r\n r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3);\r\n }\r\n }\r\n } else {\r\n r = res[i] = [];\r\n if (pa[0] == "m") {\r\n mx = pa[1] + x;\r\n my = pa[2] + y;\r\n }\r\n for (var k = 0, kk = pa.length; k < kk; k++) {\r\n res[i][k] = pa[k];\r\n }\r\n }\r\n var len = res[i].length;\r\n switch (res[i][0]) {\r\n case "z":\r\n x = mx;\r\n y = my;\r\n break;\r\n case "h":\r\n x += +res[i][len - 1];\r\n break;\r\n case "v":\r\n y += +res[i][len - 1];\r\n break;\r\n default:\r\n x += +res[i][len - 2];\r\n y += +res[i][len - 1];\r\n }\r\n }\r\n res.toString = R._path2string;\r\n pth.rel = pathClone(res);\r\n return res;\r\n },\r\n pathToAbsolute = R._pathToAbsolute = function (pathArray) {\r\n var pth = paths(pathArray);\r\n if (pth.abs) {\r\n return pathClone(pth.abs);\r\n }\r\n if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption\r\n pathArray = R.parsePathString(pathArray);\r\n }\r\n if (!pathArray || !pathArray.length) {\r\n return [["M", 0, 0]];\r\n }\r\n var res = [],\r\n x = 0,\r\n y = 0,\r\n mx = 0,\r\n my = 0,\r\n start = 0;\r\n if (pathArray[0][0] == "M") {\r\n x = +pathArray[0][1];\r\n y = +pathArray[0][2];\r\n mx = x;\r\n my = y;\r\n start++;\r\n res[0] = ["M", x, y];\r\n }\r\n var crz = pathArray.length == 3 && pathArray[0][0] == "M" && pathArray[1][0].toUpperCase() == "R" && pathArray[2][0].toUpperCase() == "Z";\r\n for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) {\r\n res.push(r = []);\r\n pa = pathArray[i];\r\n if (pa[0] != upperCase.call(pa[0])) {\r\n r[0] = upperCase.call(pa[0]);\r\n switch (r[0]) {\r\n case "A":\r\n r[1] = pa[1];\r\n r[2] = pa[2];\r\n r[3] = pa[3];\r\n r[4] = pa[4];\r\n r[5] = pa[5];\r\n r[6] = +(pa[6] + x);\r\n r[7] = +(pa[7] + y);\r\n break;\r\n case "V":\r\n r[1] = +pa[1] + y;\r\n break;\r\n case "H":\r\n r[1] = +pa[1] + x;\r\n break;\r\n case "R":\r\n var dots = [x, y][concat](pa.slice(1));\r\n for (var j = 2, jj = dots.length; j < jj; j++) {\r\n dots[j] = +dots[j] + x;\r\n dots[++j] = +dots[j] + y;\r\n }\r\n res.pop();\r\n res = res[concat](catmullRom2bezier(dots, crz));\r\n break;\r\n case "M":\r\n mx = +pa[1] + x;\r\n my = +pa[2] + y;\r\n default:\r\n for (j = 1, jj = pa.length; j < jj; j++) {\r\n r[j] = +pa[j] + ((j % 2) ? x : y);\r\n }\r\n }\r\n } else if (pa[0] == "R") {\r\n dots = [x, y][concat](pa.slice(1));\r\n res.pop();\r\n res = res[concat](catmullRom2bezier(dots, crz));\r\n r = ["R"][concat](pa.slice(-2));\r\n } else {\r\n for (var k = 0, kk = pa.length; k < kk; k++) {\r\n r[k] = pa[k];\r\n }\r\n }\r\n switch (r[0]) {\r\n case "Z":\r\n x = mx;\r\n y = my;\r\n break;\r\n case "H":\r\n x = r[1];\r\n break;\r\n case "V":\r\n y = r[1];\r\n break;\r\n case "M":\r\n mx = r[r.length - 2];\r\n my = r[r.length - 1];\r\n default:\r\n x = r[r.length - 2];\r\n y = r[r.length - 1];\r\n }\r\n }\r\n res.toString = R._path2string;\r\n pth.abs = pathClone(res);\r\n return res;\r\n },\r\n l2c = function (x1, y1, x2, y2) {\r\n return [x1, y1, x2, y2, x2, y2];\r\n },\r\n q2c = function (x1, y1, ax, ay, x2, y2) {\r\n var _13 = 1 / 3,\r\n _23 = 2 / 3;\r\n return [\r\n _13 * x1 + _23 * ax,\r\n _13 * y1 + _23 * ay,\r\n _13 * x2 + _23 * ax,\r\n _13 * y2 + _23 * ay,\r\n x2,\r\n y2\r\n ];\r\n },\r\n a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {\r\n // for more information of where this math came from visit:\r\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\r\n var _120 = PI * 120 / 180,\r\n rad = PI / 180 * (+angle || 0),\r\n res = [],\r\n xy,\r\n rotate = cacher(function (x, y, rad) {\r\n var X = x * math.cos(rad) - y * math.sin(rad),\r\n Y = x * math.sin(rad) + y * math.cos(rad);\r\n return {x: X, y: Y};\r\n });\r\n if (!recursive) {\r\n xy = rotate(x1, y1, -rad);\r\n x1 = xy.x;\r\n y1 = xy.y;\r\n xy = rotate(x2, y2, -rad);\r\n x2 = xy.x;\r\n y2 = xy.y;\r\n var cos = math.cos(PI / 180 * angle),\r\n sin = math.sin(PI / 180 * angle),\r\n x = (x1 - x2) / 2,\r\n y = (y1 - y2) / 2;\r\n var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);\r\n if (h > 1) {\r\n h = math.sqrt(h);\r\n rx = h * rx;\r\n ry = h * ry;\r\n }\r\n var rx2 = rx * rx,\r\n ry2 = ry * ry,\r\n k = (large_arc_flag == sweep_flag ? -1 : 1) *\r\n math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))),\r\n cx = k * rx * y / ry + (x1 + x2) / 2,\r\n cy = k * -ry * x / rx + (y1 + y2) / 2,\r\n f1 = math.asin(((y1 - cy) / ry).toFixed(9)),\r\n f2 = math.asin(((y2 - cy) / ry).toFixed(9));\r\n\r\n f1 = x1 < cx ? PI - f1 : f1;\r\n f2 = x2 < cx ? PI - f2 : f2;\r\n f1 < 0 && (f1 = PI * 2 + f1);\r\n f2 < 0 && (f2 = PI * 2 + f2);\r\n if (sweep_flag && f1 > f2) {\r\n f1 = f1 - PI * 2;\r\n }\r\n if (!sweep_flag && f2 > f1) {\r\n f2 = f2 - PI * 2;\r\n }\r\n } else {\r\n f1 = recursive[0];\r\n f2 = recursive[1];\r\n cx = recursive[2];\r\n cy = recursive[3];\r\n }\r\n var df = f2 - f1;\r\n if (abs(df) > _120) {\r\n var f2old = f2,\r\n x2old = x2,\r\n y2old = y2;\r\n f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);\r\n x2 = cx + rx * math.cos(f2);\r\n y2 = cy + ry * math.sin(f2);\r\n res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);\r\n }\r\n df = f2 - f1;\r\n var c1 = math.cos(f1),\r\n s1 = math.sin(f1),\r\n c2 = math.cos(f2),\r\n s2 = math.sin(f2),\r\n t = math.tan(df / 4),\r\n hx = 4 / 3 * rx * t,\r\n hy = 4 / 3 * ry * t,\r\n m1 = [x1, y1],\r\n m2 = [x1 + hx * s1, y1 - hy * c1],\r\n m3 = [x2 + hx * s2, y2 - hy * c2],\r\n m4 = [x2, y2];\r\n m2[0] = 2 * m1[0] - m2[0];\r\n m2[1] = 2 * m1[1] - m2[1];\r\n if (recursive) {\r\n return [m2, m3, m4][concat](res);\r\n } else {\r\n res = [m2, m3, m4][concat](res).join()[split](",");\r\n var newres = [];\r\n for (var i = 0, ii = res.length; i < ii; i++) {\r\n newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;\r\n }\r\n return newres;\r\n }\r\n },\r\n findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\r\n var t1 = 1 - t;\r\n return {\r\n x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x,\r\n y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y\r\n };\r\n },\r\n curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\r\n var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x),\r\n b = 2 * (c1x - p1x) - 2 * (c2x - c1x),\r\n c = p1x - c1x,\r\n t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a,\r\n t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a,\r\n y = [p1y, p2y],\r\n x = [p1x, p2x],\r\n dot;\r\n abs(t1) > "1e12" && (t1 = .5);\r\n abs(t2) > "1e12" && (t2 = .5);\r\n if (t1 > 0 && t1 < 1) {\r\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);\r\n x.push(dot.x);\r\n y.push(dot.y);\r\n }\r\n if (t2 > 0 && t2 < 1) {\r\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);\r\n x.push(dot.x);\r\n y.push(dot.y);\r\n }\r\n a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y);\r\n b = 2 * (c1y - p1y) - 2 * (c2y - c1y);\r\n c = p1y - c1y;\r\n t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a;\r\n t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a;\r\n abs(t1) > "1e12" && (t1 = .5);\r\n abs(t2) > "1e12" && (t2 = .5);\r\n if (t1 > 0 && t1 < 1) {\r\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);\r\n x.push(dot.x);\r\n y.push(dot.y);\r\n }\r\n if (t2 > 0 && t2 < 1) {\r\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);\r\n x.push(dot.x);\r\n y.push(dot.y);\r\n }\r\n return {\r\n min: {x: mmin[apply](0, x), y: mmin[apply](0, y)},\r\n max: {x: mmax[apply](0, x), y: mmax[apply](0, y)}\r\n };\r\n }),\r\n path2curve = R._path2curve = cacher(function (path, path2) {\r\n var pth = !path2 && paths(path);\r\n if (!path2 && pth.curve) {\r\n return pathClone(pth.curve);\r\n }\r\n var p = pathToAbsolute(path),\r\n p2 = path2 && pathToAbsolute(path2),\r\n attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},\r\n attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},\r\n processPath = function (path, d, pcom) {\r\n var nx, ny, tq = {T:1, Q:1};\r\n if (!path) {\r\n return ["C", d.x, d.y, d.x, d.y, d.x, d.y];\r\n }\r\n !(path[0] in tq) && (d.qx = d.qy = null);\r\n switch (path[0]) {\r\n case "M":\r\n d.X = path[1];\r\n d.Y = path[2];\r\n break;\r\n case "A":\r\n path = ["C"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1))));\r\n break;\r\n case "S":\r\n if (pcom == "C" || pcom == "S") { // In "S" case we have to take into account, if the previous command is C/S.\r\n nx = d.x * 2 - d.bx; // And reflect the previous\r\n ny = d.y * 2 - d.by; // command\'s control point relative to the current point.\r\n }\r\n else { // or some else or nothing\r\n nx = d.x;\r\n ny = d.y;\r\n }\r\n path = ["C", nx, ny][concat](path.slice(1));\r\n break;\r\n case "T":\r\n if (pcom == "Q" || pcom == "T") { // In "T" case we have to take into account, if the previous command is Q/T.\r\n d.qx = d.x * 2 - d.qx; // And make a reflection similar\r\n d.qy = d.y * 2 - d.qy; // to case "S".\r\n }\r\n else { // or something else or nothing\r\n d.qx = d.x;\r\n d.qy = d.y;\r\n }\r\n path = ["C"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));\r\n break;\r\n case "Q":\r\n d.qx = path[1];\r\n d.qy = path[2];\r\n path = ["C"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4]));\r\n break;\r\n case "L":\r\n path = ["C"][concat](l2c(d.x, d.y, path[1], path[2]));\r\n break;\r\n case "H":\r\n path = ["C"][concat](l2c(d.x, d.y, path[1], d.y));\r\n break;\r\n case "V":\r\n path = ["C"][concat](l2c(d.x, d.y, d.x, path[1]));\r\n break;\r\n case "Z":\r\n path = ["C"][concat](l2c(d.x, d.y, d.X, d.Y));\r\n break;\r\n }\r\n return path;\r\n },\r\n fixArc = function (pp, i) {\r\n if (pp[i].length > 7) {\r\n pp[i].shift();\r\n var pi = pp[i];\r\n while (pi.length) {\r\n pcoms1[i]="A"; // if created multiple C:s, their original seg is saved\r\n p2 && (pcoms2[i]="A"); // the same as above\r\n pp.splice(i++, 0, ["C"][concat](pi.splice(0, 6)));\r\n }\r\n pp.splice(i, 1);\r\n ii = mmax(p.length, p2 && p2.length || 0);\r\n }\r\n },\r\n fixM = function (path1, path2, a1, a2, i) {\r\n if (path1 && path2 && path1[i][0] == "M" && path2[i][0] != "M") {\r\n path2.splice(i, 0, ["M", a2.x, a2.y]);\r\n a1.bx = 0;\r\n a1.by = 0;\r\n a1.x = path1[i][1];\r\n a1.y = path1[i][2];\r\n ii = mmax(p.length, p2 && p2.length || 0);\r\n }\r\n },\r\n pcoms1 = [], // path commands of original path p\r\n pcoms2 = [], // path commands of original path p2\r\n pfirst = "", // temporary holder for original path command\r\n pcom = ""; // holder for previous path command of original path\r\n for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) {\r\n p[i] && (pfirst = p[i][0]); // save current path command\r\n\r\n if (pfirst != "C") // C is not saved yet, because it may be result of conversion\r\n {\r\n pcoms1[i] = pfirst; // Save current path command\r\n i && ( pcom = pcoms1[i-1]); // Get previous path command pcom\r\n }\r\n p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath\r\n\r\n if (pcoms1[i] != "A" && pfirst == "C") pcoms1[i] = "C"; // A is the only command\r\n // which may produce multiple C:s\r\n // so we have to make sure that C is also C in original path\r\n\r\n fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1\r\n\r\n if (p2) { // the same procedures is done to p2\r\n p2[i] && (pfirst = p2[i][0]);\r\n if (pfirst != "C")\r\n {\r\n pcoms2[i] = pfirst;\r\n i && (pcom = pcoms2[i-1]);\r\n }\r\n p2[i] = processPath(p2[i], attrs2, pcom);\r\n\r\n if (pcoms2[i]!="A" && pfirst=="C") pcoms2[i]="C";\r\n\r\n fixArc(p2, i);\r\n }\r\n fixM(p, p2, attrs, attrs2, i);\r\n fixM(p2, p, attrs2, attrs, i);\r\n var seg = p[i],\r\n seg2 = p2 && p2[i],\r\n seglen = seg.length,\r\n seg2len = p2 && seg2.length;\r\n attrs.x = seg[seglen - 2];\r\n attrs.y = seg[seglen - 1];\r\n attrs.bx = toFloat(seg[seglen - 4]) || attrs.x;\r\n attrs.by = toFloat(seg[seglen - 3]) || attrs.y;\r\n attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x);\r\n attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y);\r\n attrs2.x = p2 && seg2[seg2len - 2];\r\n attrs2.y = p2 && seg2[seg2len - 1];\r\n }\r\n if (!p2) {\r\n pth.curve = pathClone(p);\r\n }\r\n return p2 ? [p, p2] : p;\r\n }, null, pathClone),\r\n parseDots = R._parseDots = cacher(function (gradient) {\r\n var dots = [];\r\n for (var i = 0, ii = gradient.length; i < ii; i++) {\r\n var dot = {},\r\n par = gradient[i].match(/^([^:]*):?([\\d\\.]*)/);\r\n dot.color = R.getRGB(par[1]);\r\n if (dot.color.error) {\r\n return null;\r\n }\r\n dot.opacity = dot.color.opacity;\r\n dot.color = dot.color.hex;\r\n par[2] && (dot.offset = par[2] + "%");\r\n dots.push(dot);\r\n }\r\n for (i = 1, ii = dots.length - 1; i < ii; i++) {\r\n if (!dots[i].offset) {\r\n var start = toFloat(dots[i - 1].offset || 0),\r\n end = 0;\r\n for (var j = i + 1; j < ii; j++) {\r\n if (dots[j].offset) {\r\n end = dots[j].offset;\r\n break;\r\n }\r\n }\r\n if (!end) {\r\n end = 100;\r\n j = ii;\r\n }\r\n end = toFloat(end);\r\n var d = (end - start) / (j - i + 1);\r\n for (; i < j; i++) {\r\n start += d;\r\n dots[i].offset = start + "%";\r\n }\r\n }\r\n }\r\n return dots;\r\n }),\r\n tear = R._tear = function (el, paper) {\r\n el == paper.top && (paper.top = el.prev);\r\n el == paper.bottom && (paper.bottom = el.next);\r\n el.next && (el.next.prev = el.prev);\r\n el.prev && (el.prev.next = el.next);\r\n },\r\n tofront = R._tofront = function (el, paper) {\r\n if (paper.top === el) {\r\n return;\r\n }\r\n tear(el, paper);\r\n el.next = null;\r\n el.prev = paper.top;\r\n paper.top.next = el;\r\n paper.top = el;\r\n },\r\n toback = R._toback = function (el, paper) {\r\n if (paper.bottom === el) {\r\n return;\r\n }\r\n tear(el, paper);\r\n el.next = paper.bottom;\r\n el.prev = null;\r\n paper.bottom.prev = el;\r\n paper.bottom = el;\r\n },\r\n insertafter = R._insertafter = function (el, el2, paper) {\r\n tear(el, paper);\r\n el2 == paper.top && (paper.top = el);\r\n el2.next && (el2.next.prev = el);\r\n el.next = el2.next;\r\n el.prev = el2;\r\n el2.next = el;\r\n },\r\n insertbefore = R._insertbefore = function (el, el2, paper) {\r\n tear(el, paper);\r\n el2 == paper.bottom && (paper.bottom = el);\r\n el2.prev && (el2.prev.next = el);\r\n el.prev = el2.prev;\r\n el2.prev = el;\r\n el.next = el2;\r\n },\r\n /*\\\r\n * Raphael.toMatrix\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns matrix of transformations applied to a given path\r\n > Parameters\r\n - path (string) path string\r\n - transform (string|array) transformation string\r\n = (object) @Matrix\r\n \\*/\r\n toMatrix = R.toMatrix = function (path, transform) {\r\n var bb = pathDimensions(path),\r\n el = {\r\n _: {\r\n transform: E\r\n },\r\n getBBox: function () {\r\n return bb;\r\n }\r\n };\r\n extractTransform(el, transform);\r\n return el.matrix;\r\n },\r\n /*\\\r\n * Raphael.transformPath\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns path transformed by a given transformation\r\n > Parameters\r\n - path (string) path string\r\n - transform (string|array) transformation string\r\n = (string) path\r\n \\*/\r\n transformPath = R.transformPath = function (path, transform) {\r\n return mapPath(path, toMatrix(path, transform));\r\n },\r\n extractTransform = R._extractTransform = function (el, tstr) {\r\n if (tstr == null) {\r\n return el._.transform;\r\n }\r\n tstr = Str(tstr).replace(/\\.{3}|\\u2026/g, el._.transform || E);\r\n var tdata = R.parseTransformString(tstr),\r\n deg = 0,\r\n dx = 0,\r\n dy = 0,\r\n sx = 1,\r\n sy = 1,\r\n _ = el._,\r\n m = new Matrix;\r\n _.transform = tdata || [];\r\n if (tdata) {\r\n for (var i = 0, ii = tdata.length; i < ii; i++) {\r\n var t = tdata[i],\r\n tlen = t.length,\r\n command = Str(t[0]).toLowerCase(),\r\n absolute = t[0] != command,\r\n inver = absolute ? m.invert() : 0,\r\n x1,\r\n y1,\r\n x2,\r\n y2,\r\n bb;\r\n if (command == "t" && tlen == 3) {\r\n if (absolute) {\r\n x1 = inver.x(0, 0);\r\n y1 = inver.y(0, 0);\r\n x2 = inver.x(t[1], t[2]);\r\n y2 = inver.y(t[1], t[2]);\r\n m.translate(x2 - x1, y2 - y1);\r\n } else {\r\n m.translate(t[1], t[2]);\r\n }\r\n } else if (command == "r") {\r\n if (tlen == 2) {\r\n bb = bb || el.getBBox(1);\r\n m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2);\r\n deg += t[1];\r\n } else if (tlen == 4) {\r\n if (absolute) {\r\n x2 = inver.x(t[2], t[3]);\r\n y2 = inver.y(t[2], t[3]);\r\n m.rotate(t[1], x2, y2);\r\n } else {\r\n m.rotate(t[1], t[2], t[3]);\r\n }\r\n deg += t[1];\r\n }\r\n } else if (command == "s") {\r\n if (tlen == 2 || tlen == 3) {\r\n bb = bb || el.getBBox(1);\r\n m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2);\r\n sx *= t[1];\r\n sy *= t[tlen - 1];\r\n } else if (tlen == 5) {\r\n if (absolute) {\r\n x2 = inver.x(t[3], t[4]);\r\n y2 = inver.y(t[3], t[4]);\r\n m.scale(t[1], t[2], x2, y2);\r\n } else {\r\n m.scale(t[1], t[2], t[3], t[4]);\r\n }\r\n sx *= t[1];\r\n sy *= t[2];\r\n }\r\n } else if (command == "m" && tlen == 7) {\r\n m.add(t[1], t[2], t[3], t[4], t[5], t[6]);\r\n }\r\n _.dirtyT = 1;\r\n el.matrix = m;\r\n }\r\n }\r\n\r\n /*\\\r\n * Element.matrix\r\n [ property (object) ]\r\n **\r\n * Keeps @Matrix object, which represents element transformation\r\n \\*/\r\n el.matrix = m;\r\n\r\n _.sx = sx;\r\n _.sy = sy;\r\n _.deg = deg;\r\n _.dx = dx = m.e;\r\n _.dy = dy = m.f;\r\n\r\n if (sx == 1 && sy == 1 && !deg && _.bbox) {\r\n _.bbox.x += +dx;\r\n _.bbox.y += +dy;\r\n } else {\r\n _.dirtyT = 1;\r\n }\r\n },\r\n getEmpty = function (item) {\r\n var l = item[0];\r\n switch (l.toLowerCase()) {\r\n case "t": return [l, 0, 0];\r\n case "m": return [l, 1, 0, 0, 1, 0, 0];\r\n case "r": if (item.length == 4) {\r\n return [l, 0, item[2], item[3]];\r\n } else {\r\n return [l, 0];\r\n }\r\n case "s": if (item.length == 5) {\r\n return [l, 1, 1, item[3], item[4]];\r\n } else if (item.length == 3) {\r\n return [l, 1, 1];\r\n } else {\r\n return [l, 1];\r\n }\r\n }\r\n },\r\n equaliseTransform = R._equaliseTransform = function (t1, t2) {\r\n t2 = Str(t2).replace(/\\.{3}|\\u2026/g, t1);\r\n t1 = R.parseTransformString(t1) || [];\r\n t2 = R.parseTransformString(t2) || [];\r\n var maxlength = mmax(t1.length, t2.length),\r\n from = [],\r\n to = [],\r\n i = 0, j, jj,\r\n tt1, tt2;\r\n for (; i < maxlength; i++) {\r\n tt1 = t1[i] || getEmpty(t2[i]);\r\n tt2 = t2[i] || getEmpty(tt1);\r\n if ((tt1[0] != tt2[0]) ||\r\n (tt1[0].toLowerCase() == "r" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) ||\r\n (tt1[0].toLowerCase() == "s" && (tt1[3] != tt2[3] || tt1[4] != tt2[4]))\r\n ) {\r\n return;\r\n }\r\n from[i] = [];\r\n to[i] = [];\r\n for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) {\r\n j in tt1 && (from[i][j] = tt1[j]);\r\n j in tt2 && (to[i][j] = tt2[j]);\r\n }\r\n }\r\n return {\r\n from: from,\r\n to: to\r\n };\r\n };\r\n R._getContainer = function (x, y, w, h) {\r\n var container;\r\n container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x;\r\n if (container == null) {\r\n return;\r\n }\r\n if (container.tagName) {\r\n if (y == null) {\r\n return {\r\n container: container,\r\n width: container.style.pixelWidth || container.offsetWidth,\r\n height: container.style.pixelHeight || container.offsetHeight\r\n };\r\n } else {\r\n return {\r\n container: container,\r\n width: y,\r\n height: w\r\n };\r\n }\r\n }\r\n return {\r\n container: 1,\r\n x: x,\r\n y: y,\r\n width: w,\r\n height: h\r\n };\r\n };\r\n /*\\\r\n * Raphael.pathToRelative\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Converts path to relative form\r\n > Parameters\r\n - pathString (string|array) path string or array of segments\r\n = (array) array of segments.\r\n \\*/\r\n R.pathToRelative = pathToRelative;\r\n R._engine = {};\r\n /*\\\r\n * Raphael.path2curve\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Converts path to a new path where all segments are cubic bezier curves.\r\n > Parameters\r\n - pathString (string|array) path string or array of segments\r\n = (array) array of segments.\r\n \\*/\r\n R.path2curve = path2curve;\r\n /*\\\r\n * Raphael.matrix\r\n [ method ]\r\n **\r\n * Utility method\r\n **\r\n * Returns matrix based on given parameters.\r\n > Parameters\r\n - a (number)\r\n - b (number)\r\n - c (number)\r\n - d (number)\r\n - e (number)\r\n - f (number)\r\n = (object) @Matrix\r\n \\*/\r\n R.matrix = function (a, b, c, d, e, f) {\r\n return new Matrix(a, b, c, d, e, f);\r\n };\r\n function Matrix(a, b, c, d, e, f) {\r\n if (a != null) {\r\n this.a = +a;\r\n this.b = +b;\r\n this.c = +c;\r\n this.d = +d;\r\n this.e = +e;\r\n this.f = +f;\r\n } else {\r\n this.a = 1;\r\n this.b = 0;\r\n this.c = 0;\r\n this.d = 1;\r\n this.e = 0;\r\n this.f = 0;\r\n }\r\n }\r\n (function (matrixproto) {\r\n /*\\\r\n * Matrix.add\r\n [ method ]\r\n **\r\n * Adds given matrix to existing one.\r\n > Parameters\r\n - a (number)\r\n - b (number)\r\n - c (number)\r\n - d (number)\r\n - e (number)\r\n - f (number)\r\n or\r\n - matrix (object) @Matrix\r\n \\*/\r\n matrixproto.add = function (a, b, c, d, e, f) {\r\n var out = [[], [], []],\r\n m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]],\r\n matrix = [[a, c, e], [b, d, f], [0, 0, 1]],\r\n x, y, z, res;\r\n\r\n if (a && a instanceof Matrix) {\r\n matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]];\r\n }\r\n\r\n for (x = 0; x < 3; x++) {\r\n for (y = 0; y < 3; y++) {\r\n res = 0;\r\n for (z = 0; z < 3; z++) {\r\n res += m[x][z] * matrix[z][y];\r\n }\r\n out[x][y] = res;\r\n }\r\n }\r\n this.a = out[0][0];\r\n this.b = out[1][0];\r\n this.c = out[0][1];\r\n this.d = out[1][1];\r\n this.e = out[0][2];\r\n this.f = out[1][2];\r\n };\r\n /*\\\r\n * Matrix.invert\r\n [ method ]\r\n **\r\n * Returns inverted version of the matrix\r\n = (object) @Matrix\r\n \\*/\r\n matrixproto.invert = function () {\r\n var me = this,\r\n x = me.a * me.d - me.b * me.c;\r\n return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x);\r\n };\r\n /*\\\r\n * Matrix.clone\r\n [ method ]\r\n **\r\n * Returns copy of the matrix\r\n = (object) @Matrix\r\n \\*/\r\n matrixproto.clone = function () {\r\n return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f);\r\n };\r\n /*\\\r\n * Matrix.translate\r\n [ method ]\r\n **\r\n * Translate the matrix\r\n > Parameters\r\n - x (number)\r\n - y (number)\r\n \\*/\r\n matrixproto.translate = function (x, y) {\r\n this.add(1, 0, 0, 1, x, y);\r\n };\r\n /*\\\r\n * Matrix.scale\r\n [ method ]\r\n **\r\n * Scales the matrix\r\n > Parameters\r\n - x (number)\r\n - y (number) #optional\r\n - cx (number) #optional\r\n - cy (number) #optional\r\n \\*/\r\n matrixproto.scale = function (x, y, cx, cy) {\r\n y == null && (y = x);\r\n (cx || cy) && this.add(1, 0, 0, 1, cx, cy);\r\n this.add(x, 0, 0, y, 0, 0);\r\n (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy);\r\n };\r\n /*\\\r\n * Matrix.rotate\r\n [ method ]\r\n **\r\n * Rotates the matrix\r\n > Parameters\r\n - a (number)\r\n - x (number)\r\n - y (number)\r\n \\*/\r\n matrixproto.rotate = function (a, x, y) {\r\n a = R.rad(a);\r\n x = x || 0;\r\n y = y || 0;\r\n var cos = +math.cos(a).toFixed(9),\r\n sin = +math.sin(a).toFixed(9);\r\n this.add(cos, sin, -sin, cos, x, y);\r\n this.add(1, 0, 0, 1, -x, -y);\r\n };\r\n /*\\\r\n * Matrix.x\r\n [ method ]\r\n **\r\n * Return x coordinate for given point after transformation described by the matrix. See also @Matrix.y\r\n > Parameters\r\n - x (number)\r\n - y (number)\r\n = (number) x\r\n \\*/\r\n matrixproto.x = function (x, y) {\r\n return x * this.a + y * this.c + this.e;\r\n };\r\n /*\\\r\n * Matrix.y\r\n [ method ]\r\n **\r\n * Return y coordinate for given point after transformation described by the matrix. See also @Matrix.x\r\n > Parameters\r\n - x (number)\r\n - y (number)\r\n = (number) y\r\n \\*/\r\n matrixproto.y = function (x, y) {\r\n return x * this.b + y * this.d + this.f;\r\n };\r\n matrixproto.get = function (i) {\r\n return +this[Str.fromCharCode(97 + i)].toFixed(4);\r\n };\r\n matrixproto.toString = function () {\r\n return R.svg ?\r\n "matrix(" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + ")" :\r\n [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join();\r\n };\r\n matrixproto.toFilter = function () {\r\n return "progid:DXImageTransform.Microsoft.Matrix(M11=" + this.get(0) +\r\n ", M12=" + this.get(2) + ", M21=" + this.get(1) + ", M22=" + this.get(3) +\r\n ", Dx=" + this.get(4) + ", Dy=" + this.get(5) + ", sizingmethod=\'auto expand\')";\r\n };\r\n matrixproto.offset = function () {\r\n return [this.e.toFixed(4), this.f.toFixed(4)];\r\n };\r\n function norm(a) {\r\n return a[0] * a[0] + a[1] * a[1];\r\n }\r\n function normalize(a) {\r\n var mag = math.sqrt(norm(a));\r\n a[0] && (a[0] /= mag);\r\n a[1] && (a[1] /= mag);\r\n }\r\n /*\\\r\n * Matrix.split\r\n [ method ]\r\n **\r\n * Splits matrix into primitive transformations\r\n = (object) in format:\r\n o dx (number) translation by x\r\n o dy (number) translation by y\r\n o scalex (number) scale by x\r\n o scaley (number) scale by y\r\n o shear (number) shear\r\n o rotate (number) rotation in deg\r\n o isSimple (boolean) could it be represented via simple transformations\r\n \\*/\r\n matrixproto.split = function () {\r\n var out = {};\r\n // translation\r\n out.dx = this.e;\r\n out.dy = this.f;\r\n\r\n // scale and shear\r\n var row = [[this.a, this.c], [this.b, this.d]];\r\n out.scalex = math.sqrt(norm(row[0]));\r\n normalize(row[0]);\r\n\r\n out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1];\r\n row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear];\r\n\r\n out.scaley = math.sqrt(norm(row[1]));\r\n normalize(row[1]);\r\n out.shear /= out.scaley;\r\n\r\n // rotation\r\n var sin = -row[0][1],\r\n cos = row[1][1];\r\n if (cos < 0) {\r\n out.rotate = R.deg(math.acos(cos));\r\n if (sin < 0) {\r\n out.rotate = 360 - out.rotate;\r\n }\r\n } else {\r\n out.rotate = R.deg(math.asin(sin));\r\n }\r\n\r\n out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate);\r\n out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate;\r\n out.noRotation = !+out.shear.toFixed(9) && !out.rotate;\r\n return out;\r\n };\r\n /*\\\r\n * Matrix.toTransformString\r\n [ method ]\r\n **\r\n * Return transform string that represents given matrix\r\n = (string) transform string\r\n \\*/\r\n matrixproto.toTransformString = function (shorter) {\r\n var s = shorter || this[split]();\r\n if (s.isSimple) {\r\n s.scalex = +s.scalex.toFixed(4);\r\n s.scaley = +s.scaley.toFixed(4);\r\n s.rotate = +s.rotate.toFixed(4);\r\n return (s.dx || s.dy ? "t" + [s.dx, s.dy] : E) +\r\n (s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) +\r\n (s.rotate ? "r" + [s.rotate, 0, 0] : E);\r\n } else {\r\n return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)];\r\n }\r\n };\r\n })(Matrix.prototype);\r\n\r\n var preventDefault = function () {\r\n this.returnValue = false;\r\n },\r\n preventTouch = function () {\r\n return this.originalEvent.preventDefault();\r\n },\r\n stopPropagation = function () {\r\n this.cancelBubble = true;\r\n },\r\n stopTouch = function () {\r\n return this.originalEvent.stopPropagation();\r\n },\r\n getEventPosition = function (e) {\r\n var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\r\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;\r\n\r\n return {\r\n x: e.clientX + scrollX,\r\n y: e.clientY + scrollY\r\n };\r\n },\r\n addEvent = (function () {\r\n if (g.doc.addEventListener) {\r\n return function (obj, type, fn, element) {\r\n var f = function (e) {\r\n var pos = getEventPosition(e);\r\n return fn.call(element, e, pos.x, pos.y);\r\n };\r\n obj.addEventListener(type, f, false);\r\n\r\n if (supportsTouch && touchMap[type]) {\r\n var _f = function (e) {\r\n var pos = getEventPosition(e),\r\n olde = e;\r\n\r\n for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) {\r\n if (e.targetTouches[i].target == obj) {\r\n e = e.targetTouches[i];\r\n e.originalEvent = olde;\r\n e.preventDefault = preventTouch;\r\n e.stopPropagation = stopTouch;\r\n break;\r\n }\r\n }\r\n\r\n return fn.call(element, e, pos.x, pos.y);\r\n };\r\n obj.addEventListener(touchMap[type], _f, false);\r\n }\r\n\r\n return function () {\r\n obj.removeEventListener(type, f, false);\r\n\r\n if (supportsTouch && touchMap[type])\r\n obj.removeEventListener(touchMap[type], _f, false);\r\n\r\n return true;\r\n };\r\n };\r\n } else if (g.doc.attachEvent) {\r\n return function (obj, type, fn, element) {\r\n var f = function (e) {\r\n e = e || g.win.event;\r\n var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\r\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,\r\n x = e.clientX + scrollX,\r\n y = e.clientY + scrollY;\r\n e.preventDefault = e.preventDefault || preventDefault;\r\n e.stopPropagation = e.stopPropagation || stopPropagation;\r\n return fn.call(element, e, x, y);\r\n };\r\n obj.attachEvent("on" + type, f);\r\n var detacher = function () {\r\n obj.detachEvent("on" + type, f);\r\n return true;\r\n };\r\n return detacher;\r\n };\r\n }\r\n })(),\r\n drag = [],\r\n dragMove = function (e) {\r\n var x = e.clientX,\r\n y = e.clientY,\r\n scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\r\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,\r\n dragi,\r\n j = drag.length;\r\n while (j--) {\r\n dragi = drag[j];\r\n if (supportsTouch && e.touches) {\r\n var i = e.touches.length,\r\n touch;\r\n while (i--) {\r\n touch = e.touches[i];\r\n if (touch.identifier == dragi.el._drag.id) {\r\n x = touch.clientX;\r\n y = touch.clientY;\r\n (e.originalEvent ? e.originalEvent : e).preventDefault();\r\n break;\r\n }\r\n }\r\n } else {\r\n e.preventDefault();\r\n }\r\n var node = dragi.el.node,\r\n o,\r\n next = node.nextSibling,\r\n parent = node.parentNode,\r\n display = node.style.display;\r\n g.win.opera && parent.removeChild(node);\r\n node.style.display = "none";\r\n o = dragi.el.paper.getElementByPoint(x, y);\r\n node.style.display = display;\r\n g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node));\r\n o && eve("raphael.drag.over." + dragi.el.id, dragi.el, o);\r\n x += scrollX;\r\n y += scrollY;\r\n eve("raphael.drag.move." + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e);\r\n }\r\n },\r\n dragUp = function (e) {\r\n R.unmousemove(dragMove).unmouseup(dragUp);\r\n var i = drag.length,\r\n dragi;\r\n while (i--) {\r\n dragi = drag[i];\r\n dragi.el._drag = {};\r\n eve("raphael.drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e);\r\n }\r\n drag = [];\r\n },\r\n /*\\\r\n * Raphael.el\r\n [ property (object) ]\r\n **\r\n * You can add your own method to elements. This is usefull when you want to hack default functionality or\r\n * want to wrap some common transformation or attributes in one method. In difference to canvas methods,\r\n * you can redefine element method at any time. Expending element methods wouldn’t affect set.\r\n > Usage\r\n | Raphael.el.red = function () {\r\n | this.attr({fill: "#f00"});\r\n | };\r\n | // then use it\r\n | paper.circle(100, 100, 20).red();\r\n \\*/\r\n elproto = R.el = {};\r\n /*\\\r\n * Element.click\r\n [ method ]\r\n **\r\n * Adds event handler for click for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unclick\r\n [ method ]\r\n **\r\n * Removes event handler for click for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.dblclick\r\n [ method ]\r\n **\r\n * Adds event handler for double click for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.undblclick\r\n [ method ]\r\n **\r\n * Removes event handler for double click for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.mousedown\r\n [ method ]\r\n **\r\n * Adds event handler for mousedown for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unmousedown\r\n [ method ]\r\n **\r\n * Removes event handler for mousedown for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.mousemove\r\n [ method ]\r\n **\r\n * Adds event handler for mousemove for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unmousemove\r\n [ method ]\r\n **\r\n * Removes event handler for mousemove for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.mouseout\r\n [ method ]\r\n **\r\n * Adds event handler for mouseout for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unmouseout\r\n [ method ]\r\n **\r\n * Removes event handler for mouseout for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.mouseover\r\n [ method ]\r\n **\r\n * Adds event handler for mouseover for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unmouseover\r\n [ method ]\r\n **\r\n * Removes event handler for mouseover for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.mouseup\r\n [ method ]\r\n **\r\n * Adds event handler for mouseup for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.unmouseup\r\n [ method ]\r\n **\r\n * Removes event handler for mouseup for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.touchstart\r\n [ method ]\r\n **\r\n * Adds event handler for touchstart for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.untouchstart\r\n [ method ]\r\n **\r\n * Removes event handler for touchstart for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.touchmove\r\n [ method ]\r\n **\r\n * Adds event handler for touchmove for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.untouchmove\r\n [ method ]\r\n **\r\n * Removes event handler for touchmove for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.touchend\r\n [ method ]\r\n **\r\n * Adds event handler for touchend for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.untouchend\r\n [ method ]\r\n **\r\n * Removes event handler for touchend for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n\r\n /*\\\r\n * Element.touchcancel\r\n [ method ]\r\n **\r\n * Adds event handler for touchcancel for the element.\r\n > Parameters\r\n - handler (function) handler for the event\r\n = (object) @Element\r\n \\*/\r\n /*\\\r\n * Element.untouchcancel\r\n [ method ]\r\n **\r\n * Removes event handler for touchcancel for the element.\r\n > Parameters\r\n - handler (function) #optional handler for the event\r\n = (object) @Element\r\n \\*/\r\n for (var i = events.length; i--;) {\r\n (function (eventName) {\r\n R[eventName] = elproto[eventName] = function (fn, scope) {\r\n if (R.is(fn, "function")) {\r\n this.events = this.events || [];\r\n this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)});\r\n }\r\n return this;\r\n };\r\n R["un" + eventName] = elproto["un" + eventName] = function (fn) {\r\n var events = this.events || [],\r\n l = events.length;\r\n while (l--){\r\n if (events[l].name == eventName && (R.is(fn, "undefined") || events[l].f == fn)) {\r\n events[l].unbind();\r\n events.splice(l, 1);\r\n !events.length && delete this.events;\r\n }\r\n }\r\n return this;\r\n };\r\n })(events[i]);\r\n }\r\n\r\n /*\\\r\n * Element.data\r\n [ method ]\r\n **\r\n * Adds or retrieves given value asociated with given key.\r\n **\r\n * See also @Element.removeData\r\n > Parameters\r\n - key (string) key to store data\r\n - value (any) #optional value to store\r\n = (object) @Element\r\n * or, if value is not specified:\r\n = (any) value\r\n * or, if key and value are not specified:\r\n = (object) Key/value pairs for all the data associated with the element.\r\n > Usage\r\n | for (var i = 0, i < 5, i++) {\r\n | paper.circle(10 + 15 * i, 10, 10)\r\n | .attr({fill: "#000"})\r\n | .data("i", i)\r\n | .click(function () {\r\n | alert(this.data("i"));\r\n | });\r\n | }\r\n \\*/\r\n elproto.data = function (key, value) {\r\n var data = eldata[this.id] = eldata[this.id] || {};\r\n if (arguments.length == 0) {\r\n return data;\r\n }\r\n if (arguments.length == 1) {\r\n if (R.is(key, "object")) {\r\n for (var i in key) if (key[has](i)) {\r\n this.data(i, key[i]);\r\n }\r\n return this;\r\n }\r\n eve("raphael.data.get." + this.id, this, data[key], key);\r\n return data[key];\r\n }\r\n data[key] = value;\r\n eve("raphael.data.set." + this.id, this, value, key);\r\n return this;\r\n };\r\n /*\\\r\n * Element.removeData\r\n [ method ]\r\n **\r\n * Removes value associated with an element by given key.\r\n * If key is not provided, removes all the data of the element.\r\n > Parameters\r\n - key (string) #optional key\r\n = (object) @Element\r\n \\*/\r\n elproto.removeData = function (key) {\r\n if (key == null) {\r\n eldata[this.id] = {};\r\n } else {\r\n eldata[this.id] && delete eldata[this.id][key];\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Element.getData\r\n [ method ]\r\n **\r\n * Retrieves the element data\r\n = (object) data\r\n \\*/\r\n elproto.getData = function () {\r\n return clone(eldata[this.id] || {});\r\n };\r\n /*\\\r\n * Element.hover\r\n [ method ]\r\n **\r\n * Adds event handlers for hover for the element.\r\n > Parameters\r\n - f_in (function) handler for hover in\r\n - f_out (function) handler for hover out\r\n - icontext (object) #optional context for hover in handler\r\n - ocontext (object) #optional context for hover out handler\r\n = (object) @Element\r\n \\*/\r\n elproto.hover = function (f_in, f_out, scope_in, scope_out) {\r\n return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in);\r\n };\r\n /*\\\r\n * Element.unhover\r\n [ method ]\r\n **\r\n * Removes event handlers for hover for the element.\r\n > Parameters\r\n - f_in (function) handler for hover in\r\n - f_out (function) handler for hover out\r\n = (object) @Element\r\n \\*/\r\n elproto.unhover = function (f_in, f_out) {\r\n return this.unmouseover(f_in).unmouseout(f_out);\r\n };\r\n var draggable = [];\r\n /*\\\r\n * Element.drag\r\n [ method ]\r\n **\r\n * Adds event handlers for drag of the element.\r\n > Parameters\r\n - onmove (function) handler for moving\r\n - onstart (function) handler for drag start\r\n - onend (function) handler for drag end\r\n - mcontext (object) #optional context for moving handler\r\n - scontext (object) #optional context for drag start handler\r\n - econtext (object) #optional context for drag end handler\r\n * Additionaly following `drag` events will be triggered: `drag.start.<id>` on start,\r\n * `drag.end.<id>` on end and `drag.move.<id>` on every move. When element will be dragged over another element\r\n * `drag.over.<id>` will be fired as well.\r\n *\r\n * Start event and start handler will be called in specified context or in context of the element with following parameters:\r\n o x (number) x position of the mouse\r\n o y (number) y position of the mouse\r\n o event (object) DOM event object\r\n * Move event and move handler will be called in specified context or in context of the element with following parameters:\r\n o dx (number) shift by x from the start point\r\n o dy (number) shift by y from the start point\r\n o x (number) x position of the mouse\r\n o y (number) y position of the mouse\r\n o event (object) DOM event object\r\n * End event and end handler will be called in specified context or in context of the element with following parameters:\r\n o event (object) DOM event object\r\n = (object) @Element\r\n \\*/\r\n elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) {\r\n function start(e) {\r\n (e.originalEvent || e).preventDefault();\r\n var x = e.clientX,\r\n y = e.clientY,\r\n scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\r\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;\r\n this._drag.id = e.identifier;\r\n if (supportsTouch && e.touches) {\r\n var i = e.touches.length, touch;\r\n while (i--) {\r\n touch = e.touches[i];\r\n this._drag.id = touch.identifier;\r\n if (touch.identifier == this._drag.id) {\r\n x = touch.clientX;\r\n y = touch.clientY;\r\n break;\r\n }\r\n }\r\n }\r\n this._drag.x = x + scrollX;\r\n this._drag.y = y + scrollY;\r\n !drag.length && R.mousemove(dragMove).mouseup(dragUp);\r\n drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope});\r\n onstart && eve.on("raphael.drag.start." + this.id, onstart);\r\n onmove && eve.on("raphael.drag.move." + this.id, onmove);\r\n onend && eve.on("raphael.drag.end." + this.id, onend);\r\n eve("raphael.drag.start." + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e);\r\n }\r\n this._drag = {};\r\n draggable.push({el: this, start: start});\r\n this.mousedown(start);\r\n return this;\r\n };\r\n /*\\\r\n * Element.onDragOver\r\n [ method ]\r\n **\r\n * Shortcut for assigning event handler for `drag.over.<id>` event, where id is id of the element (see @Element.id).\r\n > Parameters\r\n - f (function) handler for event, first argument would be the element you are dragging over\r\n \\*/\r\n elproto.onDragOver = function (f) {\r\n f ? eve.on("raphael.drag.over." + this.id, f) : eve.unbind("raphael.drag.over." + this.id);\r\n };\r\n /*\\\r\n * Element.undrag\r\n [ method ]\r\n **\r\n * Removes all drag event handlers from given element.\r\n \\*/\r\n elproto.undrag = function () {\r\n var i = draggable.length;\r\n while (i--) if (draggable[i].el == this) {\r\n this.unmousedown(draggable[i].start);\r\n draggable.splice(i, 1);\r\n eve.unbind("raphael.drag.*." + this.id);\r\n }\r\n !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp);\r\n drag = [];\r\n };\r\n /*\\\r\n * Paper.circle\r\n [ method ]\r\n **\r\n * Draws a circle.\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the centre\r\n - y (number) y coordinate of the centre\r\n - r (number) radius\r\n = (object) Raphaël element object with type “circle”\r\n **\r\n > Usage\r\n | var c = paper.circle(50, 50, 40);\r\n \\*/\r\n paperproto.circle = function (x, y, r) {\r\n var out = R._engine.circle(this, x || 0, y || 0, r || 0);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.rect\r\n [ method ]\r\n *\r\n * Draws a rectangle.\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the top left corner\r\n - y (number) y coordinate of the top left corner\r\n - width (number) width\r\n - height (number) height\r\n - r (number) #optional radius for rounded corners, default is 0\r\n = (object) Raphaël element object with type “rect”\r\n **\r\n > Usage\r\n | // regular rectangle\r\n | var c = paper.rect(10, 10, 50, 50);\r\n | // rectangle with rounded corners\r\n | var c = paper.rect(40, 40, 50, 50, 10);\r\n \\*/\r\n paperproto.rect = function (x, y, w, h, r) {\r\n var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.ellipse\r\n [ method ]\r\n **\r\n * Draws an ellipse.\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the centre\r\n - y (number) y coordinate of the centre\r\n - rx (number) horizontal radius\r\n - ry (number) vertical radius\r\n = (object) Raphaël element object with type “ellipse”\r\n **\r\n > Usage\r\n | var c = paper.ellipse(50, 50, 40, 20);\r\n \\*/\r\n paperproto.ellipse = function (x, y, rx, ry) {\r\n var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.path\r\n [ method ]\r\n **\r\n * Creates a path element by given path data string.\r\n > Parameters\r\n - pathString (string) #optional path string in SVG format.\r\n * Path string consists of one-letter commands, followed by comma seprarated arguments in numercal form. Example:\r\n | "M10,20L30,40"\r\n * Here we can see two commands: “M”, with arguments `(10, 20)` and “L” with arguments `(30, 40)`. Upper case letter mean command is absolute, lower case—relative.\r\n *\r\n # <p>Here is short list of commands available, for more details see <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path\'s data attribute\'s format are described in the SVG specification.">SVG path string format</a>.</p>\r\n # <table><thead><tr><th>Command</th><th>Name</th><th>Parameters</th></tr></thead><tbody>\r\n # <tr><td>M</td><td>moveto</td><td>(x y)+</td></tr>\r\n # <tr><td>Z</td><td>closepath</td><td>(none)</td></tr>\r\n # <tr><td>L</td><td>lineto</td><td>(x y)+</td></tr>\r\n # <tr><td>H</td><td>horizontal lineto</td><td>x+</td></tr>\r\n # <tr><td>V</td><td>vertical lineto</td><td>y+</td></tr>\r\n # <tr><td>C</td><td>curveto</td><td>(x1 y1 x2 y2 x y)+</td></tr>\r\n # <tr><td>S</td><td>smooth curveto</td><td>(x2 y2 x y)+</td></tr>\r\n # <tr><td>Q</td><td>quadratic Bézier curveto</td><td>(x1 y1 x y)+</td></tr>\r\n # <tr><td>T</td><td>smooth quadratic Bézier curveto</td><td>(x y)+</td></tr>\r\n # <tr><td>A</td><td>elliptical arc</td><td>(rx ry x-axis-rotation large-arc-flag sweep-flag x y)+</td></tr>\r\n # <tr><td>R</td><td><a href="http://en.wikipedia.org/wiki/Catmull–Rom_spline#Catmull.E2.80.93Rom_spline">Catmull-Rom curveto</a>*</td><td>x1 y1 (x y)+</td></tr></tbody></table>\r\n * * “Catmull-Rom curveto” is a not standard SVG command and added in 2.0 to make life easier.\r\n * Note: there is a special case when path consist of just three commands: “M10,10R…z”. In this case path will smoothly connects to its beginning.\r\n > Usage\r\n | var c = paper.path("M10 10L90 90");\r\n | // draw a diagonal line:\r\n | // move to 10,10, line to 90,90\r\n * For example of path strings, check out these icons: http://raphaeljs.com/icons/\r\n \\*/\r\n paperproto.path = function (pathString) {\r\n pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E);\r\n var out = R._engine.path(R.format[apply](R, arguments), this);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.image\r\n [ method ]\r\n **\r\n * Embeds an image into the surface.\r\n **\r\n > Parameters\r\n **\r\n - src (string) URI of the source image\r\n - x (number) x coordinate position\r\n - y (number) y coordinate position\r\n - width (number) width of the image\r\n - height (number) height of the image\r\n = (object) Raphaël element object with type “image”\r\n **\r\n > Usage\r\n | var c = paper.image("apple.png", 10, 10, 80, 80);\r\n \\*/\r\n paperproto.image = function (src, x, y, w, h) {\r\n var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.text\r\n [ method ]\r\n **\r\n * Draws a text string. If you need line breaks, put “\\n” in the string.\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate position\r\n - y (number) y coordinate position\r\n - text (string) The text string to draw\r\n = (object) Raphaël element object with type “text”\r\n **\r\n > Usage\r\n | var t = paper.text(50, 50, "Raphaël\\nkicks\\nbutt!");\r\n \\*/\r\n paperproto.text = function (x, y, text, href) {\r\n var out = R._engine.text(this, x || 0, y || 0, Str(text), href);\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Paper.set\r\n [ method ]\r\n **\r\n * Creates array-like object to keep and operate several elements at once.\r\n * Warning: it doesn’t create any elements for itself in the page, it just groups existing elements.\r\n * Sets act as pseudo elements — all methods available to an element can be used on a set.\r\n = (object) array-like object that represents set of elements\r\n **\r\n > Usage\r\n | var st = paper.set();\r\n | st.push(\r\n | paper.circle(10, 10, 5),\r\n | paper.circle(30, 10, 5)\r\n | );\r\n | st.attr({fill: "red"}); // changes the fill of both circles\r\n \\*/\r\n paperproto.set = function (itemsArray) {\r\n !R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length));\r\n var out = new Set(itemsArray);\r\n this.__set__ && this.__set__.push(out);\r\n out["paper"] = this;\r\n out["type"] = "set";\r\n return out;\r\n };\r\n /*\\\r\n * Paper.setStart\r\n [ method ]\r\n **\r\n * Creates @Paper.set. All elements that will be created after calling this method and before calling\r\n * @Paper.setFinish will be added to the set.\r\n **\r\n > Usage\r\n | paper.setStart();\r\n | paper.circle(10, 10, 5),\r\n | paper.circle(30, 10, 5)\r\n | var st = paper.setFinish();\r\n | st.attr({fill: "red"}); // changes the fill of both circles\r\n \\*/\r\n paperproto.setStart = function (set) {\r\n this.__set__ = set || this.set();\r\n };\r\n /*\\\r\n * Paper.setFinish\r\n [ method ]\r\n **\r\n * See @Paper.setStart. This method finishes catching and returns resulting set.\r\n **\r\n = (object) set\r\n \\*/\r\n paperproto.setFinish = function (set) {\r\n var out = this.__set__;\r\n delete this.__set__;\r\n return out;\r\n };\r\n /*\\\r\n * Paper.getSize\r\n [ method ]\r\n **\r\n * Obtains current paper actual size.\r\n **\r\n = (object)\r\n \\*/\r\n paperproto.getSize = function () {\r\n var container = this.canvas.parentNode;\r\n return {\r\n width: container.offsetWidth,\r\n height: container.offsetHeight\r\n };\r\n };\r\n /*\\\r\n * Paper.setSize\r\n [ method ]\r\n **\r\n * If you need to change dimensions of the canvas call this method\r\n **\r\n > Parameters\r\n **\r\n - width (number) new width of the canvas\r\n - height (number) new height of the canvas\r\n \\*/\r\n paperproto.setSize = function (width, height) {\r\n return R._engine.setSize.call(this, width, height);\r\n };\r\n /*\\\r\n * Paper.setViewBox\r\n [ method ]\r\n **\r\n * Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by\r\n * specifying new boundaries.\r\n **\r\n > Parameters\r\n **\r\n - x (number) new x position, default is `0`\r\n - y (number) new y position, default is `0`\r\n - w (number) new width of the canvas\r\n - h (number) new height of the canvas\r\n - fit (boolean) `true` if you want graphics to fit into new boundary box\r\n \\*/\r\n paperproto.setViewBox = function (x, y, w, h, fit) {\r\n return R._engine.setViewBox.call(this, x, y, w, h, fit);\r\n };\r\n /*\\\r\n * Paper.top\r\n [ property ]\r\n **\r\n * Points to the topmost element on the paper\r\n \\*/\r\n /*\\\r\n * Paper.bottom\r\n [ property ]\r\n **\r\n * Points to the bottom element on the paper\r\n \\*/\r\n paperproto.top = paperproto.bottom = null;\r\n /*\\\r\n * Paper.raphael\r\n [ property ]\r\n **\r\n * Points to the @Raphael object/function\r\n \\*/\r\n paperproto.raphael = R;\r\n var getOffset = function (elem) {\r\n var box = elem.getBoundingClientRect(),\r\n doc = elem.ownerDocument,\r\n body = doc.body,\r\n docElem = doc.documentElement,\r\n clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,\r\n top = box.top + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop,\r\n left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft;\r\n return {\r\n y: top,\r\n x: left\r\n };\r\n };\r\n /*\\\r\n * Paper.getElementByPoint\r\n [ method ]\r\n **\r\n * Returns you topmost element under given point.\r\n **\r\n = (object) Raphaël element object\r\n > Parameters\r\n **\r\n - x (number) x coordinate from the top left corner of the window\r\n - y (number) y coordinate from the top left corner of the window\r\n > Usage\r\n | paper.getElementByPoint(mouseX, mouseY).attr({stroke: "#f00"});\r\n \\*/\r\n paperproto.getElementByPoint = function (x, y) {\r\n var paper = this,\r\n svg = paper.canvas,\r\n target = g.doc.elementFromPoint(x, y);\r\n if (g.win.opera && target.tagName == "svg") {\r\n var so = getOffset(svg),\r\n sr = svg.createSVGRect();\r\n sr.x = x - so.x;\r\n sr.y = y - so.y;\r\n sr.width = sr.height = 1;\r\n var hits = svg.getIntersectionList(sr, null);\r\n if (hits.length) {\r\n target = hits[hits.length - 1];\r\n }\r\n }\r\n if (!target) {\r\n return null;\r\n }\r\n while (target.parentNode && target != svg.parentNode && !target.raphael) {\r\n target = target.parentNode;\r\n }\r\n target == paper.canvas.parentNode && (target = svg);\r\n target = target && target.raphael ? paper.getById(target.raphaelid) : null;\r\n return target;\r\n };\r\n\r\n /*\\\r\n * Paper.getElementsByBBox\r\n [ method ]\r\n **\r\n * Returns set of elements that have an intersecting bounding box\r\n **\r\n > Parameters\r\n **\r\n - bbox (object) bbox to check with\r\n = (object) @Set\r\n \\*/\r\n paperproto.getElementsByBBox = function (bbox) {\r\n var set = this.set();\r\n this.forEach(function (el) {\r\n if (R.isBBoxIntersect(el.getBBox(), bbox)) {\r\n set.push(el);\r\n }\r\n });\r\n return set;\r\n };\r\n\r\n /*\\\r\n * Paper.getById\r\n [ method ]\r\n **\r\n * Returns you element by its internal ID.\r\n **\r\n > Parameters\r\n **\r\n - id (number) id\r\n = (object) Raphaël element object\r\n \\*/\r\n paperproto.getById = function (id) {\r\n var bot = this.bottom;\r\n while (bot) {\r\n if (bot.id == id) {\r\n return bot;\r\n }\r\n bot = bot.next;\r\n }\r\n return null;\r\n };\r\n /*\\\r\n * Paper.forEach\r\n [ method ]\r\n **\r\n * Executes given function for each element on the paper\r\n *\r\n * If callback function returns `false` it will stop loop running.\r\n **\r\n > Parameters\r\n **\r\n - callback (function) function to run\r\n - thisArg (object) context object for the callback\r\n = (object) Paper object\r\n > Usage\r\n | paper.forEach(function (el) {\r\n | el.attr({ stroke: "blue" });\r\n | });\r\n \\*/\r\n paperproto.forEach = function (callback, thisArg) {\r\n var bot = this.bottom;\r\n while (bot) {\r\n if (callback.call(thisArg, bot) === false) {\r\n return this;\r\n }\r\n bot = bot.next;\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Paper.getElementsByPoint\r\n [ method ]\r\n **\r\n * Returns set of elements that have common point inside\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the point\r\n - y (number) y coordinate of the point\r\n = (object) @Set\r\n \\*/\r\n paperproto.getElementsByPoint = function (x, y) {\r\n var set = this.set();\r\n this.forEach(function (el) {\r\n if (el.isPointInside(x, y)) {\r\n set.push(el);\r\n }\r\n });\r\n return set;\r\n };\r\n function x_y() {\r\n return this.x + S + this.y;\r\n }\r\n function x_y_w_h() {\r\n return this.x + S + this.y + S + this.width + " \\xd7 " + this.height;\r\n }\r\n /*\\\r\n * Element.isPointInside\r\n [ method ]\r\n **\r\n * Determine if given point is inside this element’s shape\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the point\r\n - y (number) y coordinate of the point\r\n = (boolean) `true` if point inside the shape\r\n \\*/\r\n elproto.isPointInside = function (x, y) {\r\n var rp = this.realPath = getPath[this.type](this);\r\n if (this.attr(\'transform\') && this.attr(\'transform\').length) {\r\n rp = R.transformPath(rp, this.attr(\'transform\'));\r\n }\r\n return R.isPointInsidePath(rp, x, y);\r\n };\r\n /*\\\r\n * Element.getBBox\r\n [ method ]\r\n **\r\n * Return bounding box for a given element\r\n **\r\n > Parameters\r\n **\r\n - isWithoutTransform (boolean) flag, `true` if you want to have bounding box before transformations. Default is `false`.\r\n = (object) Bounding box object:\r\n o {\r\n o x: (number) top left corner x\r\n o y: (number) top left corner y\r\n o x2: (number) bottom right corner x\r\n o y2: (number) bottom right corner y\r\n o width: (number) width\r\n o height: (number) height\r\n o }\r\n \\*/\r\n elproto.getBBox = function (isWithoutTransform) {\r\n if (this.removed) {\r\n return {};\r\n }\r\n var _ = this._;\r\n if (isWithoutTransform) {\r\n if (_.dirty || !_.bboxwt) {\r\n this.realPath = getPath[this.type](this);\r\n _.bboxwt = pathDimensions(this.realPath);\r\n _.bboxwt.toString = x_y_w_h;\r\n _.dirty = 0;\r\n }\r\n return _.bboxwt;\r\n }\r\n if (_.dirty || _.dirtyT || !_.bbox) {\r\n if (_.dirty || !this.realPath) {\r\n _.bboxwt = 0;\r\n this.realPath = getPath[this.type](this);\r\n }\r\n _.bbox = pathDimensions(mapPath(this.realPath, this.matrix));\r\n _.bbox.toString = x_y_w_h;\r\n _.dirty = _.dirtyT = 0;\r\n }\r\n return _.bbox;\r\n };\r\n /*\\\r\n * Element.clone\r\n [ method ]\r\n **\r\n = (object) clone of a given element\r\n **\r\n \\*/\r\n elproto.clone = function () {\r\n if (this.removed) {\r\n return null;\r\n }\r\n var out = this.paper[this.type]().attr(this.attr());\r\n this.__set__ && this.__set__.push(out);\r\n return out;\r\n };\r\n /*\\\r\n * Element.glow\r\n [ method ]\r\n **\r\n * Return set of elements that create glow-like effect around given element. See @Paper.set.\r\n *\r\n * Note: Glow is not connected to the element. If you change element attributes it won’t adjust itself.\r\n **\r\n > Parameters\r\n **\r\n - glow (object) #optional parameters object with all properties optional:\r\n o {\r\n o width (number) size of the glow, default is `10`\r\n o fill (boolean) will it be filled, default is `false`\r\n o opacity (number) opacity, default is `0.5`\r\n o offsetx (number) horizontal offset, default is `0`\r\n o offsety (number) vertical offset, default is `0`\r\n o color (string) glow colour, default is `black`\r\n o }\r\n = (object) @Paper.set of elements that represents glow\r\n \\*/\r\n elproto.glow = function (glow) {\r\n if (this.type == "text") {\r\n return null;\r\n }\r\n glow = glow || {};\r\n var s = {\r\n width: (glow.width || 10) + (+this.attr("stroke-width") || 1),\r\n fill: glow.fill || false,\r\n opacity: glow.opacity == null ? .5 : glow.opacity,\r\n offsetx: glow.offsetx || 0,\r\n offsety: glow.offsety || 0,\r\n color: glow.color || "#000"\r\n },\r\n c = s.width / 2,\r\n r = this.paper,\r\n out = r.set(),\r\n path = this.realPath || getPath[this.type](this);\r\n path = this.matrix ? mapPath(path, this.matrix) : path;\r\n for (var i = 1; i < c + 1; i++) {\r\n out.push(r.path(path).attr({\r\n stroke: s.color,\r\n fill: s.fill ? s.color : "none",\r\n "stroke-linejoin": "round",\r\n "stroke-linecap": "round",\r\n "stroke-width": +(s.width / c * i).toFixed(3),\r\n opacity: +(s.opacity / c).toFixed(3)\r\n }));\r\n }\r\n return out.insertBefore(this).translate(s.offsetx, s.offsety);\r\n };\r\n var curveslengths = {},\r\n getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) {\r\n if (length == null) {\r\n return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y);\r\n } else {\r\n return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length));\r\n }\r\n },\r\n getLengthFactory = function (istotal, subpath) {\r\n return function (path, length, onlystart) {\r\n path = path2curve(path);\r\n var x, y, p, l, sp = "", subpaths = {}, point,\r\n len = 0;\r\n for (var i = 0, ii = path.length; i < ii; i++) {\r\n p = path[i];\r\n if (p[0] == "M") {\r\n x = +p[1];\r\n y = +p[2];\r\n } else {\r\n l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);\r\n if (len + l > length) {\r\n if (subpath && !subpaths.start) {\r\n point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);\r\n sp += ["C" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y];\r\n if (onlystart) {return sp;}\r\n subpaths.start = sp;\r\n sp = ["M" + point.x, point.y + "C" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join();\r\n len += l;\r\n x = +p[5];\r\n y = +p[6];\r\n continue;\r\n }\r\n if (!istotal && !subpath) {\r\n point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);\r\n return {x: point.x, y: point.y, alpha: point.alpha};\r\n }\r\n }\r\n len += l;\r\n x = +p[5];\r\n y = +p[6];\r\n }\r\n sp += p.shift() + p;\r\n }\r\n subpaths.end = sp;\r\n point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1);\r\n point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha});\r\n return point;\r\n };\r\n };\r\n var getTotalLength = getLengthFactory(1),\r\n getPointAtLength = getLengthFactory(),\r\n getSubpathsAtLength = getLengthFactory(0, 1);\r\n /*\\\r\n * Raphael.getTotalLength\r\n [ method ]\r\n **\r\n * Returns length of the given path in pixels.\r\n **\r\n > Parameters\r\n **\r\n - path (string) SVG path string.\r\n **\r\n = (number) length.\r\n \\*/\r\n R.getTotalLength = getTotalLength;\r\n /*\\\r\n * Raphael.getPointAtLength\r\n [ method ]\r\n **\r\n * Return coordinates of the point located at the given length on the given path.\r\n **\r\n > Parameters\r\n **\r\n - path (string) SVG path string\r\n - length (number)\r\n **\r\n = (object) representation of the point:\r\n o {\r\n o x: (number) x coordinate\r\n o y: (number) y coordinate\r\n o alpha: (number) angle of derivative\r\n o }\r\n \\*/\r\n R.getPointAtLength = getPointAtLength;\r\n /*\\\r\n * Raphael.getSubpath\r\n [ method ]\r\n **\r\n * Return subpath of a given path from given length to given length.\r\n **\r\n > Parameters\r\n **\r\n - path (string) SVG path string\r\n - from (number) position of the start of the segment\r\n - to (number) position of the end of the segment\r\n **\r\n = (string) pathstring for the segment\r\n \\*/\r\n R.getSubpath = function (path, from, to) {\r\n if (this.getTotalLength(path) - to < 1e-6) {\r\n return getSubpathsAtLength(path, from).end;\r\n }\r\n var a = getSubpathsAtLength(path, to, 1);\r\n return from ? getSubpathsAtLength(a, from).end : a;\r\n };\r\n /*\\\r\n * Element.getTotalLength\r\n [ method ]\r\n **\r\n * Returns length of the path in pixels. Only works for element of “path” type.\r\n = (number) length.\r\n \\*/\r\n elproto.getTotalLength = function () {\r\n var path = this.getPath();\r\n if (!path) {\r\n return;\r\n }\r\n\r\n if (this.node.getTotalLength) {\r\n return this.node.getTotalLength();\r\n }\r\n\r\n return getTotalLength(path);\r\n };\r\n /*\\\r\n * Element.getPointAtLength\r\n [ method ]\r\n **\r\n * Return coordinates of the point located at the given length on the given path. Only works for element of “path” type.\r\n **\r\n > Parameters\r\n **\r\n - length (number)\r\n **\r\n = (object) representation of the point:\r\n o {\r\n o x: (number) x coordinate\r\n o y: (number) y coordinate\r\n o alpha: (number) angle of derivative\r\n o }\r\n \\*/\r\n elproto.getPointAtLength = function (length) {\r\n var path = this.getPath();\r\n if (!path) {\r\n return;\r\n }\r\n\r\n return getPointAtLength(path, length);\r\n };\r\n /*\\\r\n * Element.getPath\r\n [ method ]\r\n **\r\n * Returns path of the element. Only works for elements of “path” type and simple elements like circle.\r\n = (object) path\r\n **\r\n \\*/\r\n elproto.getPath = function () {\r\n var path,\r\n getPath = R._getPath[this.type];\r\n\r\n if (this.type == "text" || this.type == "set") {\r\n return;\r\n }\r\n\r\n if (getPath) {\r\n path = getPath(this);\r\n }\r\n\r\n return path;\r\n };\r\n /*\\\r\n * Element.getSubpath\r\n [ method ]\r\n **\r\n * Return subpath of a given element from given length to given length. Only works for element of “path” type.\r\n **\r\n > Parameters\r\n **\r\n - from (number) position of the start of the segment\r\n - to (number) position of the end of the segment\r\n **\r\n = (string) pathstring for the segment\r\n \\*/\r\n elproto.getSubpath = function (from, to) {\r\n var path = this.getPath();\r\n if (!path) {\r\n return;\r\n }\r\n\r\n return R.getSubpath(path, from, to);\r\n };\r\n /*\\\r\n * Raphael.easing_formulas\r\n [ property ]\r\n **\r\n * Object that contains easing formulas for animation. You could extend it with your own. By default it has following list of easing:\r\n # <ul>\r\n # <li>“linear”</li>\r\n # <li>“<” or “easeIn” or “ease-in”</li>\r\n # <li>“>” or “easeOut” or “ease-out”</li>\r\n # <li>“<>” or “easeInOut” or “ease-in-out”</li>\r\n # <li>“backIn” or “back-in”</li>\r\n # <li>“backOut” or “back-out”</li>\r\n # <li>“elastic”</li>\r\n # <li>“bounce”</li>\r\n # </ul>\r\n # <p>See also <a href="http://raphaeljs.com/easing.html">Easing demo</a>.</p>\r\n \\*/\r\n var ef = R.easing_formulas = {\r\n linear: function (n) {\r\n return n;\r\n },\r\n "<": function (n) {\r\n return pow(n, 1.7);\r\n },\r\n ">": function (n) {\r\n return pow(n, .48);\r\n },\r\n "<>": function (n) {\r\n var q = .48 - n / 1.04,\r\n Q = math.sqrt(.1734 + q * q),\r\n x = Q - q,\r\n X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1),\r\n y = -Q - q,\r\n Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1),\r\n t = X + Y + .5;\r\n return (1 - t) * 3 * t * t + t * t * t;\r\n },\r\n backIn: function (n) {\r\n var s = 1.70158;\r\n return n * n * ((s + 1) * n - s);\r\n },\r\n backOut: function (n) {\r\n n = n - 1;\r\n var s = 1.70158;\r\n return n * n * ((s + 1) * n + s) + 1;\r\n },\r\n elastic: function (n) {\r\n if (n == !!n) {\r\n return n;\r\n }\r\n return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1;\r\n },\r\n bounce: function (n) {\r\n var s = 7.5625,\r\n p = 2.75,\r\n l;\r\n if (n < (1 / p)) {\r\n l = s * n * n;\r\n } else {\r\n if (n < (2 / p)) {\r\n n -= (1.5 / p);\r\n l = s * n * n + .75;\r\n } else {\r\n if (n < (2.5 / p)) {\r\n n -= (2.25 / p);\r\n l = s * n * n + .9375;\r\n } else {\r\n n -= (2.625 / p);\r\n l = s * n * n + .984375;\r\n }\r\n }\r\n }\r\n return l;\r\n }\r\n };\r\n ef.easeIn = ef["ease-in"] = ef["<"];\r\n ef.easeOut = ef["ease-out"] = ef[">"];\r\n ef.easeInOut = ef["ease-in-out"] = ef["<>"];\r\n ef["back-in"] = ef.backIn;\r\n ef["back-out"] = ef.backOut;\r\n\r\n var animationElements = [],\r\n requestAnimFrame = window.requestAnimationFrame ||\r\n window.webkitRequestAnimationFrame ||\r\n window.mozRequestAnimationFrame ||\r\n window.oRequestAnimationFrame ||\r\n window.msRequestAnimationFrame ||\r\n function (callback) {\r\n setTimeout(callback, 16);\r\n },\r\n animation = function () {\r\n var Now = +new Date,\r\n l = 0;\r\n for (; l < animationElements.length; l++) {\r\n var e = animationElements[l];\r\n if (e.el.removed || e.paused) {\r\n continue;\r\n }\r\n var time = Now - e.start,\r\n ms = e.ms,\r\n easing = e.easing,\r\n from = e.from,\r\n diff = e.diff,\r\n to = e.to,\r\n t = e.t,\r\n that = e.el,\r\n set = {},\r\n now,\r\n init = {},\r\n key;\r\n if (e.initstatus) {\r\n time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms;\r\n e.status = e.initstatus;\r\n delete e.initstatus;\r\n e.stop && animationElements.splice(l--, 1);\r\n } else {\r\n e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top;\r\n }\r\n if (time < 0) {\r\n continue;\r\n }\r\n if (time < ms) {\r\n var pos = easing(time / ms);\r\n for (var attr in from) if (from[has](attr)) {\r\n switch (availableAnimAttrs[attr]) {\r\n case nu:\r\n now = +from[attr] + pos * ms * diff[attr];\r\n break;\r\n case "colour":\r\n now = "rgb(" + [\r\n upto255(round(from[attr].r + pos * ms * diff[attr].r)),\r\n upto255(round(from[attr].g + pos * ms * diff[attr].g)),\r\n upto255(round(from[attr].b + pos * ms * diff[attr].b))\r\n ].join(",") + ")";\r\n break;\r\n case "path":\r\n now = [];\r\n for (var i = 0, ii = from[attr].length; i < ii; i++) {\r\n now[i] = [from[attr][i][0]];\r\n for (var j = 1, jj = from[attr][i].length; j < jj; j++) {\r\n now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j];\r\n }\r\n now[i] = now[i].join(S);\r\n }\r\n now = now.join(S);\r\n break;\r\n case "transform":\r\n if (diff[attr].real) {\r\n now = [];\r\n for (i = 0, ii = from[attr].length; i < ii; i++) {\r\n now[i] = [from[attr][i][0]];\r\n for (j = 1, jj = from[attr][i].length; j < jj; j++) {\r\n now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j];\r\n }\r\n }\r\n } else {\r\n var get = function (i) {\r\n return +from[attr][i] + pos * ms * diff[attr][i];\r\n };\r\n // now = [["r", get(2), 0, 0], ["t", get(3), get(4)], ["s", get(0), get(1), 0, 0]];\r\n now = [["m", get(0), get(1), get(2), get(3), get(4), get(5)]];\r\n }\r\n break;\r\n case "csv":\r\n if (attr == "clip-rect") {\r\n now = [];\r\n i = 4;\r\n while (i--) {\r\n now[i] = +from[attr][i] + pos * ms * diff[attr][i];\r\n }\r\n }\r\n break;\r\n default:\r\n var from2 = [][concat](from[attr]);\r\n now = [];\r\n i = that.paper.customAttributes[attr].length;\r\n while (i--) {\r\n now[i] = +from2[i] + pos * ms * diff[attr][i];\r\n }\r\n break;\r\n }\r\n set[attr] = now;\r\n }\r\n that.attr(set);\r\n (function (id, that, anim) {\r\n setTimeout(function () {\r\n eve("raphael.anim.frame." + id, that, anim);\r\n });\r\n })(that.id, that, e.anim);\r\n } else {\r\n (function(f, el, a) {\r\n setTimeout(function() {\r\n eve("raphael.anim.frame." + el.id, el, a);\r\n eve("raphael.anim.finish." + el.id, el, a);\r\n R.is(f, "function") && f.call(el);\r\n });\r\n })(e.callback, that, e.anim);\r\n that.attr(to);\r\n animationElements.splice(l--, 1);\r\n if (e.repeat > 1 && !e.next) {\r\n for (key in to) if (to[has](key)) {\r\n init[key] = e.totalOrigin[key];\r\n }\r\n e.el.attr(init);\r\n runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1);\r\n }\r\n if (e.next && !e.stop) {\r\n runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat);\r\n }\r\n }\r\n }\r\n animationElements.length && requestAnimFrame(animation);\r\n },\r\n upto255 = function (color) {\r\n return color > 255 ? 255 : color < 0 ? 0 : color;\r\n };\r\n /*\\\r\n * Element.animateWith\r\n [ method ]\r\n **\r\n * Acts similar to @Element.animate, but ensure that given animation runs in sync with another given element.\r\n **\r\n > Parameters\r\n **\r\n - el (object) element to sync with\r\n - anim (object) animation to sync with\r\n - params (object) #optional final attributes for the element, see also @Element.attr\r\n - ms (number) #optional number of milliseconds for animation to run\r\n - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\r\n - callback (function) #optional callback function. Will be called at the end of animation.\r\n * or\r\n - element (object) element to sync with\r\n - anim (object) animation to sync with\r\n - animation (object) #optional animation object, see @Raphael.animation\r\n **\r\n = (object) original element\r\n \\*/\r\n elproto.animateWith = function (el, anim, params, ms, easing, callback) {\r\n var element = this;\r\n if (element.removed) {\r\n callback && callback.call(element);\r\n return element;\r\n }\r\n var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback),\r\n x, y;\r\n runAnimation(a, element, a.percents[0], null, element.attr());\r\n for (var i = 0, ii = animationElements.length; i < ii; i++) {\r\n if (animationElements[i].anim == anim && animationElements[i].el == el) {\r\n animationElements[ii - 1].start = animationElements[i].start;\r\n break;\r\n }\r\n }\r\n return element;\r\n //\r\n //\r\n // var a = params ? R.animation(params, ms, easing, callback) : anim,\r\n // status = element.status(anim);\r\n // return this.animate(a).status(a, status * anim.ms / a.ms);\r\n };\r\n function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) {\r\n var cx = 3 * p1x,\r\n bx = 3 * (p2x - p1x) - cx,\r\n ax = 1 - cx - bx,\r\n cy = 3 * p1y,\r\n by = 3 * (p2y - p1y) - cy,\r\n ay = 1 - cy - by;\r\n function sampleCurveX(t) {\r\n return ((ax * t + bx) * t + cx) * t;\r\n }\r\n function solve(x, epsilon) {\r\n var t = solveCurveX(x, epsilon);\r\n return ((ay * t + by) * t + cy) * t;\r\n }\r\n function solveCurveX(x, epsilon) {\r\n var t0, t1, t2, x2, d2, i;\r\n for(t2 = x, i = 0; i < 8; i++) {\r\n x2 = sampleCurveX(t2) - x;\r\n if (abs(x2) < epsilon) {\r\n return t2;\r\n }\r\n d2 = (3 * ax * t2 + 2 * bx) * t2 + cx;\r\n if (abs(d2) < 1e-6) {\r\n break;\r\n }\r\n t2 = t2 - x2 / d2;\r\n }\r\n t0 = 0;\r\n t1 = 1;\r\n t2 = x;\r\n if (t2 < t0) {\r\n return t0;\r\n }\r\n if (t2 > t1) {\r\n return t1;\r\n }\r\n while (t0 < t1) {\r\n x2 = sampleCurveX(t2);\r\n if (abs(x2 - x) < epsilon) {\r\n return t2;\r\n }\r\n if (x > x2) {\r\n t0 = t2;\r\n } else {\r\n t1 = t2;\r\n }\r\n t2 = (t1 - t0) / 2 + t0;\r\n }\r\n return t2;\r\n }\r\n return solve(t, 1 / (200 * duration));\r\n }\r\n elproto.onAnimation = function (f) {\r\n f ? eve.on("raphael.anim.frame." + this.id, f) : eve.unbind("raphael.anim.frame." + this.id);\r\n return this;\r\n };\r\n function Animation(anim, ms) {\r\n var percents = [],\r\n newAnim = {};\r\n this.ms = ms;\r\n this.times = 1;\r\n if (anim) {\r\n for (var attr in anim) if (anim[has](attr)) {\r\n newAnim[toFloat(attr)] = anim[attr];\r\n percents.push(toFloat(attr));\r\n }\r\n percents.sort(sortByNumber);\r\n }\r\n this.anim = newAnim;\r\n this.top = percents[percents.length - 1];\r\n this.percents = percents;\r\n }\r\n /*\\\r\n * Animation.delay\r\n [ method ]\r\n **\r\n * Creates a copy of existing animation object with given delay.\r\n **\r\n > Parameters\r\n **\r\n - delay (number) number of ms to pass between animation start and actual animation\r\n **\r\n = (object) new altered Animation object\r\n | var anim = Raphael.animation({cx: 10, cy: 20}, 2e3);\r\n | circle1.animate(anim); // run the given animation immediately\r\n | circle2.animate(anim.delay(500)); // run the given animation after 500 ms\r\n \\*/\r\n Animation.prototype.delay = function (delay) {\r\n var a = new Animation(this.anim, this.ms);\r\n a.times = this.times;\r\n a.del = +delay || 0;\r\n return a;\r\n };\r\n /*\\\r\n * Animation.repeat\r\n [ method ]\r\n **\r\n * Creates a copy of existing animation object with given repetition.\r\n **\r\n > Parameters\r\n **\r\n - repeat (number) number iterations of animation. For infinite animation pass `Infinity`\r\n **\r\n = (object) new altered Animation object\r\n \\*/\r\n Animation.prototype.repeat = function (times) {\r\n var a = new Animation(this.anim, this.ms);\r\n a.del = this.del;\r\n a.times = math.floor(mmax(times, 0)) || 1;\r\n return a;\r\n };\r\n function runAnimation(anim, element, percent, status, totalOrigin, times) {\r\n percent = toFloat(percent);\r\n var params,\r\n isInAnim,\r\n isInAnimSet,\r\n percents = [],\r\n next,\r\n prev,\r\n timestamp,\r\n ms = anim.ms,\r\n from = {},\r\n to = {},\r\n diff = {};\r\n if (status) {\r\n for (i = 0, ii = animationElements.length; i < ii; i++) {\r\n var e = animationElements[i];\r\n if (e.el.id == element.id && e.anim == anim) {\r\n if (e.percent != percent) {\r\n animationElements.splice(i, 1);\r\n isInAnimSet = 1;\r\n } else {\r\n isInAnim = e;\r\n }\r\n element.attr(e.totalOrigin);\r\n break;\r\n }\r\n }\r\n } else {\r\n status = +to; // NaN\r\n }\r\n for (var i = 0, ii = anim.percents.length; i < ii; i++) {\r\n if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) {\r\n percent = anim.percents[i];\r\n prev = anim.percents[i - 1] || 0;\r\n ms = ms / anim.top * (percent - prev);\r\n next = anim.percents[i + 1];\r\n params = anim.anim[percent];\r\n break;\r\n } else if (status) {\r\n element.attr(anim.anim[anim.percents[i]]);\r\n }\r\n }\r\n if (!params) {\r\n return;\r\n }\r\n if (!isInAnim) {\r\n for (var attr in params) if (params[has](attr)) {\r\n if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) {\r\n from[attr] = element.attr(attr);\r\n (from[attr] == null) && (from[attr] = availableAttrs[attr]);\r\n to[attr] = params[attr];\r\n switch (availableAnimAttrs[attr]) {\r\n case nu:\r\n diff[attr] = (to[attr] - from[attr]) / ms;\r\n break;\r\n case "colour":\r\n from[attr] = R.getRGB(from[attr]);\r\n var toColour = R.getRGB(to[attr]);\r\n diff[attr] = {\r\n r: (toColour.r - from[attr].r) / ms,\r\n g: (toColour.g - from[attr].g) / ms,\r\n b: (toColour.b - from[attr].b) / ms\r\n };\r\n break;\r\n case "path":\r\n var pathes = path2curve(from[attr], to[attr]),\r\n toPath = pathes[1];\r\n from[attr] = pathes[0];\r\n diff[attr] = [];\r\n for (i = 0, ii = from[attr].length; i < ii; i++) {\r\n diff[attr][i] = [0];\r\n for (var j = 1, jj = from[attr][i].length; j < jj; j++) {\r\n diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms;\r\n }\r\n }\r\n break;\r\n case "transform":\r\n var _ = element._,\r\n eq = equaliseTransform(_[attr], to[attr]);\r\n if (eq) {\r\n from[attr] = eq.from;\r\n to[attr] = eq.to;\r\n diff[attr] = [];\r\n diff[attr].real = true;\r\n for (i = 0, ii = from[attr].length; i < ii; i++) {\r\n diff[attr][i] = [from[attr][i][0]];\r\n for (j = 1, jj = from[attr][i].length; j < jj; j++) {\r\n diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms;\r\n }\r\n }\r\n } else {\r\n var m = (element.matrix || new Matrix),\r\n to2 = {\r\n _: {transform: _.transform},\r\n getBBox: function () {\r\n return element.getBBox(1);\r\n }\r\n };\r\n from[attr] = [\r\n m.a,\r\n m.b,\r\n m.c,\r\n m.d,\r\n m.e,\r\n m.f\r\n ];\r\n extractTransform(to2, to[attr]);\r\n to[attr] = to2._.transform;\r\n diff[attr] = [\r\n (to2.matrix.a - m.a) / ms,\r\n (to2.matrix.b - m.b) / ms,\r\n (to2.matrix.c - m.c) / ms,\r\n (to2.matrix.d - m.d) / ms,\r\n (to2.matrix.e - m.e) / ms,\r\n (to2.matrix.f - m.f) / ms\r\n ];\r\n // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy];\r\n // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }};\r\n // extractTransform(to2, to[attr]);\r\n // diff[attr] = [\r\n // (to2._.sx - _.sx) / ms,\r\n // (to2._.sy - _.sy) / ms,\r\n // (to2._.deg - _.deg) / ms,\r\n // (to2._.dx - _.dx) / ms,\r\n // (to2._.dy - _.dy) / ms\r\n // ];\r\n }\r\n break;\r\n case "csv":\r\n var values = Str(params[attr])[split](separator),\r\n from2 = Str(from[attr])[split](separator);\r\n if (attr == "clip-rect") {\r\n from[attr] = from2;\r\n diff[attr] = [];\r\n i = from2.length;\r\n while (i--) {\r\n diff[attr][i] = (values[i] - from[attr][i]) / ms;\r\n }\r\n }\r\n to[attr] = values;\r\n break;\r\n default:\r\n values = [][concat](params[attr]);\r\n from2 = [][concat](from[attr]);\r\n diff[attr] = [];\r\n i = element.paper.customAttributes[attr].length;\r\n while (i--) {\r\n diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n var easing = params.easing,\r\n easyeasy = R.easing_formulas[easing];\r\n if (!easyeasy) {\r\n easyeasy = Str(easing).match(bezierrg);\r\n if (easyeasy && easyeasy.length == 5) {\r\n var curve = easyeasy;\r\n easyeasy = function (t) {\r\n return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms);\r\n };\r\n } else {\r\n easyeasy = pipe;\r\n }\r\n }\r\n timestamp = params.start || anim.start || +new Date;\r\n e = {\r\n anim: anim,\r\n percent: percent,\r\n timestamp: timestamp,\r\n start: timestamp + (anim.del || 0),\r\n status: 0,\r\n initstatus: status || 0,\r\n stop: false,\r\n ms: ms,\r\n easing: easyeasy,\r\n from: from,\r\n diff: diff,\r\n to: to,\r\n el: element,\r\n callback: params.callback,\r\n prev: prev,\r\n next: next,\r\n repeat: times || anim.times,\r\n origin: element.attr(),\r\n totalOrigin: totalOrigin\r\n };\r\n animationElements.push(e);\r\n if (status && !isInAnim && !isInAnimSet) {\r\n e.stop = true;\r\n e.start = new Date - ms * status;\r\n if (animationElements.length == 1) {\r\n return animation();\r\n }\r\n }\r\n if (isInAnimSet) {\r\n e.start = new Date - e.ms * status;\r\n }\r\n animationElements.length == 1 && requestAnimFrame(animation);\r\n } else {\r\n isInAnim.initstatus = status;\r\n isInAnim.start = new Date - isInAnim.ms * status;\r\n }\r\n eve("raphael.anim.start." + element.id, element, anim);\r\n }\r\n /*\\\r\n * Raphael.animation\r\n [ method ]\r\n **\r\n * Creates an animation object that can be passed to the @Element.animate or @Element.animateWith methods.\r\n * See also @Animation.delay and @Animation.repeat methods.\r\n **\r\n > Parameters\r\n **\r\n - params (object) final attributes for the element, see also @Element.attr\r\n - ms (number) number of milliseconds for animation to run\r\n - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\r\n - callback (function) #optional callback function. Will be called at the end of animation.\r\n **\r\n = (object) @Animation\r\n \\*/\r\n R.animation = function (params, ms, easing, callback) {\r\n if (params instanceof Animation) {\r\n return params;\r\n }\r\n if (R.is(easing, "function") || !easing) {\r\n callback = callback || easing || null;\r\n easing = null;\r\n }\r\n params = Object(params);\r\n ms = +ms || 0;\r\n var p = {},\r\n json,\r\n attr;\r\n for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) {\r\n json = true;\r\n p[attr] = params[attr];\r\n }\r\n if (!json) {\r\n // if percent-like syntax is used and end-of-all animation callback used\r\n if(callback){\r\n // find the last one\r\n var lastKey = 0;\r\n for(var i in params){\r\n var percent = toInt(i);\r\n if(params[has](i) && percent > lastKey){\r\n lastKey = percent;\r\n }\r\n }\r\n lastKey += \'%\';\r\n // if already defined callback in the last keyframe, skip\r\n !params[lastKey].callback && (params[lastKey].callback = callback);\r\n }\r\n return new Animation(params, ms);\r\n } else {\r\n easing && (p.easing = easing);\r\n callback && (p.callback = callback);\r\n return new Animation({100: p}, ms);\r\n }\r\n };\r\n /*\\\r\n * Element.animate\r\n [ method ]\r\n **\r\n * Creates and starts animation for given element.\r\n **\r\n > Parameters\r\n **\r\n - params (object) final attributes for the element, see also @Element.attr\r\n - ms (number) number of milliseconds for animation to run\r\n - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\r\n - callback (function) #optional callback function. Will be called at the end of animation.\r\n * or\r\n - animation (object) animation object, see @Raphael.animation\r\n **\r\n = (object) original element\r\n \\*/\r\n elproto.animate = function (params, ms, easing, callback) {\r\n var element = this;\r\n if (element.removed) {\r\n callback && callback.call(element);\r\n return element;\r\n }\r\n var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback);\r\n runAnimation(anim, element, anim.percents[0], null, element.attr());\r\n return element;\r\n };\r\n /*\\\r\n * Element.setTime\r\n [ method ]\r\n **\r\n * Sets the status of animation of the element in milliseconds. Similar to @Element.status method.\r\n **\r\n > Parameters\r\n **\r\n - anim (object) animation object\r\n - value (number) number of milliseconds from the beginning of the animation\r\n **\r\n = (object) original element if `value` is specified\r\n * Note, that during animation following events are triggered:\r\n *\r\n * On each animation frame event `anim.frame.<id>`, on start `anim.start.<id>` and on end `anim.finish.<id>`.\r\n \\*/\r\n elproto.setTime = function (anim, value) {\r\n if (anim && value != null) {\r\n this.status(anim, mmin(value, anim.ms) / anim.ms);\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Element.status\r\n [ method ]\r\n **\r\n * Gets or sets the status of animation of the element.\r\n **\r\n > Parameters\r\n **\r\n - anim (object) #optional animation object\r\n - value (number) #optional 0 – 1. If specified, method works like a setter and sets the status of a given animation to the value. This will cause animation to jump to the given position.\r\n **\r\n = (number) status\r\n * or\r\n = (array) status if `anim` is not specified. Array of objects in format:\r\n o {\r\n o anim: (object) animation object\r\n o status: (number) status\r\n o }\r\n * or\r\n = (object) original element if `value` is specified\r\n \\*/\r\n elproto.status = function (anim, value) {\r\n var out = [],\r\n i = 0,\r\n len,\r\n e;\r\n if (value != null) {\r\n runAnimation(anim, this, -1, mmin(value, 1));\r\n return this;\r\n } else {\r\n len = animationElements.length;\r\n for (; i < len; i++) {\r\n e = animationElements[i];\r\n if (e.el.id == this.id && (!anim || e.anim == anim)) {\r\n if (anim) {\r\n return e.status;\r\n }\r\n out.push({\r\n anim: e.anim,\r\n status: e.status\r\n });\r\n }\r\n }\r\n if (anim) {\r\n return 0;\r\n }\r\n return out;\r\n }\r\n };\r\n /*\\\r\n * Element.pause\r\n [ method ]\r\n **\r\n * Stops animation of the element with ability to resume it later on.\r\n **\r\n > Parameters\r\n **\r\n - anim (object) #optional animation object\r\n **\r\n = (object) original element\r\n \\*/\r\n elproto.pause = function (anim) {\r\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\r\n if (eve("raphael.anim.pause." + this.id, this, animationElements[i].anim) !== false) {\r\n animationElements[i].paused = true;\r\n }\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Element.resume\r\n [ method ]\r\n **\r\n * Resumes animation if it was paused with @Element.pause method.\r\n **\r\n > Parameters\r\n **\r\n - anim (object) #optional animation object\r\n **\r\n = (object) original element\r\n \\*/\r\n elproto.resume = function (anim) {\r\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\r\n var e = animationElements[i];\r\n if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) {\r\n delete e.paused;\r\n this.status(e.anim, e.status);\r\n }\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Element.stop\r\n [ method ]\r\n **\r\n * Stops animation of the element.\r\n **\r\n > Parameters\r\n **\r\n - anim (object) #optional animation object\r\n **\r\n = (object) original element\r\n \\*/\r\n elproto.stop = function (anim) {\r\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\r\n if (eve("raphael.anim.stop." + this.id, this, animationElements[i].anim) !== false) {\r\n animationElements.splice(i--, 1);\r\n }\r\n }\r\n return this;\r\n };\r\n function stopAnimation(paper) {\r\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) {\r\n animationElements.splice(i--, 1);\r\n }\r\n }\r\n eve.on("raphael.remove", stopAnimation);\r\n eve.on("raphael.clear", stopAnimation);\r\n elproto.toString = function () {\r\n return "Rapha\\xebl\\u2019s object";\r\n };\r\n\r\n // Set\r\n var Set = function (items) {\r\n this.items = [];\r\n this.length = 0;\r\n this.type = "set";\r\n if (items) {\r\n for (var i = 0, ii = items.length; i < ii; i++) {\r\n if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) {\r\n this[this.items.length] = this.items[this.items.length] = items[i];\r\n this.length++;\r\n }\r\n }\r\n }\r\n },\r\n setproto = Set.prototype;\r\n /*\\\r\n * Set.push\r\n [ method ]\r\n **\r\n * Adds each argument to the current set.\r\n = (object) original element\r\n \\*/\r\n setproto.push = function () {\r\n var item,\r\n len;\r\n for (var i = 0, ii = arguments.length; i < ii; i++) {\r\n item = arguments[i];\r\n if (item && (item.constructor == elproto.constructor || item.constructor == Set)) {\r\n len = this.items.length;\r\n this[len] = this.items[len] = item;\r\n this.length++;\r\n }\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Set.pop\r\n [ method ]\r\n **\r\n * Removes last element and returns it.\r\n = (object) element\r\n \\*/\r\n setproto.pop = function () {\r\n this.length && delete this[this.length--];\r\n return this.items.pop();\r\n };\r\n /*\\\r\n * Set.forEach\r\n [ method ]\r\n **\r\n * Executes given function for each element in the set.\r\n *\r\n * If function returns `false` it will stop loop running.\r\n **\r\n > Parameters\r\n **\r\n - callback (function) function to run\r\n - thisArg (object) context object for the callback\r\n = (object) Set object\r\n \\*/\r\n setproto.forEach = function (callback, thisArg) {\r\n for (var i = 0, ii = this.items.length; i < ii; i++) {\r\n if (callback.call(thisArg, this.items[i], i) === false) {\r\n return this;\r\n }\r\n }\r\n return this;\r\n };\r\n for (var method in elproto) if (elproto[has](method)) {\r\n setproto[method] = (function (methodname) {\r\n return function () {\r\n var arg = arguments;\r\n return this.forEach(function (el) {\r\n el[methodname][apply](el, arg);\r\n });\r\n };\r\n })(method);\r\n }\r\n setproto.attr = function (name, value) {\r\n if (name && R.is(name, array) && R.is(name[0], "object")) {\r\n for (var j = 0, jj = name.length; j < jj; j++) {\r\n this.items[j].attr(name[j]);\r\n }\r\n } else {\r\n for (var i = 0, ii = this.items.length; i < ii; i++) {\r\n this.items[i].attr(name, value);\r\n }\r\n }\r\n return this;\r\n };\r\n /*\\\r\n * Set.clear\r\n [ method ]\r\n **\r\n * Removes all elements from the set\r\n \\*/\r\n setproto.clear = function () {\r\n while (this.length) {\r\n this.pop();\r\n }\r\n };\r\n /*\\\r\n * Set.splice\r\n [ method ]\r\n **\r\n * Removes given element from the set\r\n **\r\n > Parameters\r\n **\r\n - index (number) position of the deletion\r\n - count (number) number of element to remove\r\n - insertion… (object) #optional elements to insert\r\n = (object) set elements that were deleted\r\n \\*/\r\n setproto.splice = function (index, count, insertion) {\r\n index = index < 0 ? mmax(this.length + index, 0) : index;\r\n count = mmax(0, mmin(this.length - index, count));\r\n var tail = [],\r\n todel = [],\r\n args = [],\r\n i;\r\n for (i = 2; i < arguments.length; i++) {\r\n args.push(arguments[i]);\r\n }\r\n for (i = 0; i < count; i++) {\r\n todel.push(this[index + i]);\r\n }\r\n for (; i < this.length - index; i++) {\r\n tail.push(this[index + i]);\r\n }\r\n var arglen = args.length;\r\n for (i = 0; i < arglen + tail.length; i++) {\r\n this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen];\r\n }\r\n i = this.items.length = this.length -= count - arglen;\r\n while (this[i]) {\r\n delete this[i++];\r\n }\r\n return new Set(todel);\r\n };\r\n /*\\\r\n * Set.exclude\r\n [ method ]\r\n **\r\n * Removes given element from the set\r\n **\r\n > Parameters\r\n **\r\n - element (object) element to remove\r\n = (boolean) `true` if object was found & removed from the set\r\n \\*/\r\n setproto.exclude = function (el) {\r\n for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) {\r\n this.splice(i, 1);\r\n return true;\r\n }\r\n };\r\n setproto.animate = function (params, ms, easing, callback) {\r\n (R.is(easing, "function") || !easing) && (callback = easing || null);\r\n var len = this.items.length,\r\n i = len,\r\n item,\r\n set = this,\r\n collector;\r\n if (!len) {\r\n return this;\r\n }\r\n callback && (collector = function () {\r\n !--len && callback.call(set);\r\n });\r\n easing = R.is(easing, string) ? easing : collector;\r\n var anim = R.animation(params, ms, easing, collector);\r\n item = this.items[--i].animate(anim);\r\n while (i--) {\r\n this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim, anim);\r\n (this.items[i] && !this.items[i].removed) || len--;\r\n }\r\n return this;\r\n };\r\n setproto.insertAfter = function (el) {\r\n var i = this.items.length;\r\n while (i--) {\r\n this.items[i].insertAfter(el);\r\n }\r\n return this;\r\n };\r\n\r\n // FREEGROUP Fix: RaphaelJS changes the order of the elements of the \'set\' by calling the toBack method.\r\n // "toBack" must be called reverse to care about the rendering order. In this case we override\r\n // the buggy default implementation here.\r\n //\r\n setproto.toBack = function () {\r\n var i = this.items.length;\r\n while (i--) {\r\n this.items[i].toBack();\r\n }\r\n return this;\r\n };\r\n\r\n // FREEGROUP Fix: Unfortunately raphael didn\'T expose the "set.prototype". In this case\r\n // I must add all extension to the raphael implementation itself.\r\n // Provide support method for easy check if the elements are visible.\r\n setproto.isVisible = function () {\r\n var i = this.items.length;\r\n var visible = false;\r\n while (i--) {\r\n visible = visible ||this.items[i].isVisible();\r\n }\r\n return visible;\r\n };\r\n\r\n\r\n // FREEGROUP FIX: Adding "isWithoutTransform" to the function and redirect them to the elements\r\n setproto.getBBox = function (isWithoutTransform) {\r\n var x = [],\r\n y = [],\r\n x2 = [],\r\n y2 = [];\r\n for (var i = this.items.length; i--;) if (!this.items[i].removed) {\r\n var box = this.items[i].getBBox(isWithoutTransform);\r\n x.push(box.x);\r\n y.push(box.y);\r\n x2.push(box.x + box.width);\r\n y2.push(box.y + box.height);\r\n }\r\n x = mmin[apply](0, x);\r\n y = mmin[apply](0, y);\r\n x2 = mmax[apply](0, x2);\r\n y2 = mmax[apply](0, y2);\r\n return {\r\n x: x,\r\n y: y,\r\n x2: x2,\r\n y2: y2,\r\n width: x2 - x,\r\n height: y2 - y\r\n };\r\n };\r\n setproto.clone = function (s) {\r\n s = this.paper.set();\r\n for (var i = 0, ii = this.items.length; i < ii; i++) {\r\n s.push(this.items[i].clone());\r\n }\r\n return s;\r\n };\r\n setproto.toString = function () {\r\n return "Rapha\\xebl\\u2018s set";\r\n };\r\n\r\n setproto.glow = function(glowConfig) {\r\n var ret = this.paper.set();\r\n this.forEach(function(shape, index){\r\n var g = shape.glow(glowConfig);\r\n if(g != null){\r\n g.forEach(function(shape2, index2){\r\n ret.push(shape2);\r\n });\r\n }\r\n });\r\n return ret;\r\n };\r\n\r\n\r\n /*\\\r\n * Set.isPointInside\r\n [ method ]\r\n **\r\n * Determine if given point is inside this set’s elements\r\n **\r\n > Parameters\r\n **\r\n - x (number) x coordinate of the point\r\n - y (number) y coordinate of the point\r\n = (boolean) `true` if point is inside any of the set\'s elements\r\n \\*/\r\n setproto.isPointInside = function (x, y) {\r\n var isPointInside = false;\r\n this.forEach(function (el) {\r\n if (el.isPointInside(x, y)) {\r\n isPointInside = true;\r\n return false; // stop loop\r\n }\r\n });\r\n return isPointInside;\r\n };\r\n\r\n /*\\\r\n * Raphael.registerFont\r\n [ method ]\r\n **\r\n * Adds given font to the registered set of fonts for Raphaël. Should be used as an internal call from within Cufón’s font file.\r\n * Returns original parameter, so it could be used with chaining.\r\n # <a href="http://wiki.github.com/sorccu/cufon/about">More about Cufón and how to convert your font form TTF, OTF, etc to JavaScript file.</a>\r\n **\r\n > Parameters\r\n **\r\n - font (object) the font to register\r\n = (object) the font you passed in\r\n > Usage\r\n | Cufon.registerFont(Raphael.registerFont({…}));\r\n \\*/\r\n R.registerFont = function (font) {\r\n if (!font.face) {\r\n return font;\r\n }\r\n this.fonts = this.fonts || {};\r\n var fontcopy = {\r\n w: font.w,\r\n face: {},\r\n glyphs: {}\r\n },\r\n family = font.face["font-family"];\r\n for (var prop in font.face) if (font.face[has](prop)) {\r\n fontcopy.face[prop] = font.face[prop];\r\n }\r\n if (this.fonts[family]) {\r\n this.fonts[family].push(fontcopy);\r\n } else {\r\n this.fonts[family] = [fontcopy];\r\n }\r\n if (!font.svg) {\r\n fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10);\r\n for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) {\r\n var path = font.glyphs[glyph];\r\n fontcopy.glyphs[glyph] = {\r\n w: path.w,\r\n k: {},\r\n d: path.d && "M" + path.d.replace(/[mlcxtrv]/g, function (command) {\r\n return {l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[command] || "M";\r\n }) + "z"\r\n };\r\n if (path.k) {\r\n for (var k in path.k) if (path[has](k)) {\r\n fontcopy.glyphs[glyph].k[k] = path.k[k];\r\n }\r\n }\r\n }\r\n }\r\n return font;\r\n };\r\n /*\\\r\n * Paper.getFont\r\n [ method ]\r\n **\r\n * Finds font object in the registered fonts by given parameters. You could specify only one word from the font name, like “Myriad” for “Myriad Pro”.\r\n **\r\n > Parameters\r\n **\r\n - family (string) font family name or any word from it\r\n - weight (string) #optional font weight\r\n - style (string) #optional font style\r\n - stretch (string) #optional font stretch\r\n = (object) the font object\r\n > Usage\r\n | paper.print(100, 100, "Test string", paper.getFont("Times", 800), 30);\r\n \\*/\r\n paperproto.getFont = function (family, weight, style, stretch) {\r\n stretch = stretch || "normal";\r\n style = style || "normal";\r\n weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400;\r\n if (!R.fonts) {\r\n return;\r\n }\r\n var font = R.fonts[family];\r\n if (!font) {\r\n var name = new RegExp("(^|\\\\s)" + family.replace(/[^\\w\\d\\s+!~.:_-]/g, E) + "(\\\\s|$)", "i");\r\n for (var fontName in R.fonts) if (R.fonts[has](fontName)) {\r\n if (name.test(fontName)) {\r\n font = R.fonts[fontName];\r\n break;\r\n }\r\n }\r\n }\r\n var thefont;\r\n if (font) {\r\n for (var i = 0, ii = font.length; i < ii; i++) {\r\n thefont = font[i];\r\n if (thefont.face["font-weight"] == weight && (thefont.face["font-style"] == style || !thefont.face["font-style"]) && thefont.face["font-stretch"] == stretch) {\r\n break;\r\n }\r\n }\r\n }\r\n return thefont;\r\n };\r\n /*\\\r\n * Paper.print\r\n [ method ]\r\n **\r\n * Creates path that represent given text written using given font at given position with given size.\r\n * Result of the method is path element that contains whole text as a separate path.\r\n **\r\n > Parameters\r\n **\r\n - x (number) x position of the text\r\n - y (number) y position of the text\r\n - string (string) text to print\r\n - font (object) font object, see @Paper.getFont\r\n - size (number) #optional size of the font, default is `16`\r\n - origin (string) #optional could be `"baseline"` or `"middle"`, default is `"middle"`\r\n - letter_spacing (number) #optional number in range `-1..1`, default is `0`\r\n - line_spacing (number) #optional number in range `1..3`, default is `1`\r\n = (object) resulting path element, which consist of all letters\r\n > Usage\r\n | var txt = r.print(10, 50, "print", r.getFont("Museo"), 30).attr({fill: "#fff"});\r\n \\*/\r\n paperproto.print = function (x, y, string, font, size, origin, letter_spacing, line_spacing) {\r\n origin = origin || "middle"; // baseline|middle\r\n letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1);\r\n line_spacing = mmax(mmin(line_spacing || 1, 3), 1);\r\n var letters = Str(string)[split](E),\r\n shift = 0,\r\n notfirst = 0,\r\n path = E,\r\n scale;\r\n R.is(font, "string") && (font = this.getFont(font));\r\n if (font) {\r\n scale = (size || 16) / font.face["units-per-em"];\r\n var bb = font.face.bbox[split](separator),\r\n top = +bb[0],\r\n lineHeight = bb[3] - bb[1],\r\n shifty = 0,\r\n height = +bb[1] + (origin == "baseline" ? lineHeight + (+font.face.descent) : lineHeight / 2);\r\n for (var i = 0, ii = letters.length; i < ii; i++) {\r\n if (letters[i] == "\\n") {\r\n shift = 0;\r\n curr = 0;\r\n notfirst = 0;\r\n shifty += lineHeight * line_spacing;\r\n } else {\r\n var prev = notfirst && font.glyphs[letters[i - 1]] || {},\r\n curr = font.glyphs[letters[i]];\r\n shift += notfirst ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0;\r\n notfirst = 1;\r\n }\r\n if (curr && curr.d) {\r\n path += R.transformPath(curr.d, ["t", shift * scale, shifty * scale, "s", scale, scale, top, height, "t", (x - top) / scale, (y - height) / scale]);\r\n }\r\n }\r\n }\r\n return this.path(path).attr({\r\n fill: "#000",\r\n stroke: "none"\r\n });\r\n };\r\n\r\n /*\\\r\n * Paper.add\r\n [ method ]\r\n **\r\n * Imports elements in JSON array in format `{type: type, <attributes>}`\r\n **\r\n > Parameters\r\n **\r\n - json (array)\r\n = (object) resulting set of imported elements\r\n > Usage\r\n | paper.add([\r\n | {\r\n | type: "circle",\r\n | cx: 10,\r\n | cy: 10,\r\n | r: 5\r\n | },\r\n | {\r\n | type: "rect",\r\n | x: 10,\r\n | y: 10,\r\n | width: 10,\r\n | height: 10,\r\n | fill: "#fc0"\r\n | }\r\n | ]);\r\n \\*/\r\n paperproto.add = function (json) {\r\n if (R.is(json, "array")) {\r\n var res = this.set(),\r\n i = 0,\r\n ii = json.length,\r\n j;\r\n for (; i < ii; i++) {\r\n j = json[i] || {};\r\n elements[has](j.type) && res.push(this[j.type]().attr(j));\r\n }\r\n }\r\n return res;\r\n };\r\n\r\n /*\\\r\n * Raphael.format\r\n [ method ]\r\n **\r\n * Simple format function. Replaces construction of type “`{<number>}`” to the corresponding argument.\r\n **\r\n > Parameters\r\n **\r\n - token (string) string to format\r\n - … (string) rest of arguments will be treated as parameters for replacement\r\n = (string) formated string\r\n > Usage\r\n | var x = 10,\r\n | y = 20,\r\n | width = 40,\r\n | height = 50;\r\n | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z"\r\n | paper.path(Raphael.format("M{0},{1}h{2}v{3}h{4}z", x, y, width, height, -width));\r\n \\*/\r\n R.format = function (token, params) {\r\n var args = R.is(params, array) ? [0][concat](params) : arguments;\r\n token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) {\r\n return args[++i] == null ? E : args[i];\r\n }));\r\n return token || E;\r\n };\r\n /*\\\r\n * Raphael.fullfill\r\n [ method ]\r\n **\r\n * A little bit more advanced format function than @Raphael.format. Replaces construction of type “`{<name>}`” to the corresponding argument.\r\n **\r\n > Parameters\r\n **\r\n - token (string) string to format\r\n - json (object) object which properties will be used as a replacement\r\n = (string) formated string\r\n > Usage\r\n | // this will draw a rectangular shape equivalent to "M10,20h40v50h-40z"\r\n | paper.path(Raphael.fullfill("M{x},{y}h{dim.width}v{dim.height}h{dim[\'negative width\']}z", {\r\n | x: 10,\r\n | y: 20,\r\n | dim: {\r\n | width: 40,\r\n | height: 50,\r\n | "negative width": -40\r\n | }\r\n | }));\r\n \\*/\r\n R.fullfill = (function () {\r\n var tokenRegex = /\\{([^\\}]+)\\}/g,\r\n objNotationRegex = /(?:(?:^|\\.)(.+?)(?=\\[|\\.|$|\\()|\\[(\'|")(.+?)\\2\\])(\\(\\))?/g, // matches .xxxxx or ["xxxxx"] to run over object properties\r\n replacer = function (all, key, obj) {\r\n var res = obj;\r\n key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) {\r\n name = name || quotedName;\r\n if (res) {\r\n if (name in res) {\r\n res = res[name];\r\n }\r\n typeof res == "function" && isFunc && (res = res());\r\n }\r\n });\r\n res = (res == null || res == obj ? all : res) + "";\r\n return res;\r\n };\r\n return function (str, obj) {\r\n return String(str).replace(tokenRegex, function (all, key) {\r\n return replacer(all, key, obj);\r\n });\r\n };\r\n })();\r\n /*\\\r\n * Raphael.ninja\r\n [ method ]\r\n **\r\n * If you want to leave no trace of Raphaël (Well, Raphaël creates only one global variable `Raphael`, but anyway.) You can use `ninja` method.\r\n * Beware, that in this case plugins could stop working, because they are depending on global variable existence.\r\n **\r\n = (object) Raphael object\r\n > Usage\r\n | (function (local_raphael) {\r\n | var paper = local_raphael(10, 10, 320, 200);\r\n | …\r\n | })(Raphael.ninja());\r\n \\*/\r\n R.ninja = function () {\r\n oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;\r\n return R;\r\n };\r\n /*\\\r\n * Raphael.st\r\n [ property (object) ]\r\n **\r\n * You can add your own method to elements and sets. It is wise to add a set method for each element method\r\n * you added, so you will be able to call the same method on sets too.\r\n **\r\n * See also @Raphael.el.\r\n > Usage\r\n | Raphael.el.red = function () {\r\n | this.attr({fill: "#f00"});\r\n | };\r\n | Raphael.st.red = function () {\r\n | this.forEach(function (el) {\r\n | el.red();\r\n | });\r\n | };\r\n | // then use it\r\n | paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red();\r\n \\*/\r\n R.st = setproto;\r\n\r\n eve.on("raphael.DOMload", function () {\r\n loaded = true;\r\n });\r\n\r\n // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html\r\n (function (doc, loaded, f) {\r\n if (doc.readyState == null && doc.addEventListener){\r\n doc.addEventListener(loaded, f = function () {\r\n doc.removeEventListener(loaded, f, false);\r\n doc.readyState = "complete";\r\n }, false);\r\n doc.readyState = "loading";\r\n }\r\n function isLoaded() {\r\n (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("raphael.DOMload");\r\n }\r\n isLoaded();\r\n })(document, "DOMContentLoaded");\r\n\r\n return R;\r\n}));\r\n\r\n// ┌─────────────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\r\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ SVG Module │ \\\\\r\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\r\n// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\\\\r\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\\\\r\n// └─────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n(function (glob, factory) {\r\n if (typeof define === "function" && define.amd) {\r\n define("raphael.svg", ["raphael.core"], function(raphael) {\r\n return factory(raphael);\r\n });\r\n } else if (typeof exports === "object") {\r\n factory(require("./raphael.core"));\r\n } else {\r\n factory(glob.Raphael);\r\n }\r\n}(this, function(R) {\r\n if (R && !R.svg) {\r\n return;\r\n }\r\n\r\n var has = "hasOwnProperty",\r\n Str = String,\r\n toFloat = parseFloat,\r\n toInt = parseInt,\r\n math = Math,\r\n mmax = math.max,\r\n abs = math.abs,\r\n pow = math.pow,\r\n separator = /[, ]+/,\r\n eve = R.eve,\r\n E = "",\r\n S = " ";\r\n var xlink = "http://www.w3.org/1999/xlink",\r\n markers = {\r\n block: "M5,0 0,2.5 5,5z",\r\n classic: "M5,0 0,2.5 5,5 3.5,3 3.5,2z",\r\n diamond: "M2.5,0 5,2.5 2.5,5 0,2.5z",\r\n open: "M6,1 1,3.5 6,6",\r\n oval: "M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"\r\n },\r\n markerCounter = {};\r\n R.toString = function () {\r\n return "Your browser supports SVG.\\nYou are running Rapha\\xebl " + this.version;\r\n };\r\n var $ = function (el, attr) {\r\n if (attr) {\r\n if (typeof el == "string") {\r\n el = $(el);\r\n }\r\n for (var key in attr) if (attr[has](key)) {\r\n if (key.substring(0, 6) == "xlink:") {\r\n el.setAttributeNS(xlink, key.substring(6), Str(attr[key]));\r\n } else {\r\n try {\r\n el.setAttribute(key, Str(attr[key]));\r\n }\r\n catch(e){\r\n debugger\r\n }\r\n }\r\n }\r\n } else {\r\n el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el);\r\n el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)");\r\n }\r\n return el;\r\n },\r\n addGradientFill = function (element, gradient) {\r\n // even called if we reset the fill of an shape.\r\n if (gradient === null)\r\n return\r\n\r\n var type = "linear",\r\n id = gradient.replace(/[\\(\\)\\s,\\xb0#]/g, "_"),\r\n fx = .5, fy = .5,\r\n o = element.node,\r\n SVG = element.paper,\r\n s = o.style,\r\n el = R._g.doc.getElementById(id);\r\n if (!el) {\r\n gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) {\r\n type = "radial";\r\n if (_fx && _fy) {\r\n fx = toFloat(_fx);\r\n fy = toFloat(_fy);\r\n var dir = ((fy > .5) * 2 - 1);\r\n pow(fx - .5, 2) + pow(fy - .5, 2) > .25 &&\r\n (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) &&\r\n fy != .5 &&\r\n (fy = fy.toFixed(5) - 1e-5 * dir);\r\n }\r\n return E;\r\n });\r\n gradient = gradient.split(/\\s*\\-\\s*/);\r\n if (type == "linear") {\r\n var angle = gradient.shift();\r\n angle = -toFloat(angle);\r\n if (isNaN(angle)) {\r\n return null;\r\n }\r\n var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))],\r\n max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1);\r\n vector[2] *= max;\r\n vector[3] *= max;\r\n if (vector[2] < 0) {\r\n vector[0] = -vector[2];\r\n vector[2] = 0;\r\n }\r\n if (vector[3] < 0) {\r\n vector[1] = -vector[3];\r\n vector[3] = 0;\r\n }\r\n }\r\n var dots = R._parseDots(gradient);\r\n if (!dots) {\r\n return null;\r\n }\r\n id = id.replace(/[\\(\\)\\s,\\xb0#]/g, "_");\r\n\r\n if (element.gradient && id != element.gradient.id) {\r\n SVG.defs.removeChild(element.gradient);\r\n delete element.gradient;\r\n }\r\n\r\n if (!element.gradient) {\r\n el = $(type + "Gradient", {id: id});\r\n element.gradient = el;\r\n $(el, type == "radial" ? {\r\n fx: fx,\r\n fy: fy\r\n } : {\r\n x1: vector[0],\r\n y1: vector[1],\r\n x2: vector[2],\r\n y2: vector[3],\r\n gradientTransform: element.matrix.invert()\r\n });\r\n SVG.defs.appendChild(el);\r\n for (var i = 0, ii = dots.length; i < ii; i++) {\r\n el.appendChild($("stop", {\r\n offset: dots[i].offset ? dots[i].offset : i ? "100%" : "0%",\r\n "stop-color": dots[i].color || "#fff",\r\n "stop-opacity": isFinite(dots[i].opacity) ? dots[i].opacity : 1\r\n }));\r\n }\r\n }\r\n }\r\n /* FREEGROUP: don\'t push URL parameter into the drawing. This will break Apps with "?" in the URL\r\n * see: https://github.com/DmitryBaranovskiy/raphael/issues/693\r\n **/\r\n var url ="";//document.location.protocol + "//" + document.location.host + document.location.pathname;\r\n $(o, {\r\n fill: "url(\'" + url + "#" + id + "\')",\r\n opacity: 1,\r\n "fill-opacity": 1\r\n });\r\n\r\n s.fill = E;\r\n s.opacity = 1;\r\n s.fillOpacity = 1;\r\n return 1;\r\n },\r\n updatePosition = function (o) {\r\n var bbox = o.getBBox(1);\r\n $(o.pattern, {patternTransform: o.matrix.invert() + " translate(" + bbox.x + "," + bbox.y + ")"});\r\n },\r\n addArrow = function (o, value, isEnd) {\r\n if (o.type == "path") {\r\n var values = Str(value).toLowerCase().split("-"),\r\n p = o.paper,\r\n se = isEnd ? "end" : "start",\r\n node = o.node,\r\n attrs = o.attrs,\r\n stroke = attrs["stroke-width"],\r\n i = values.length,\r\n type = "classic",\r\n from,\r\n to,\r\n dx,\r\n refX,\r\n attr,\r\n w = 3,\r\n h = 3,\r\n t = 5;\r\n while (i--) {\r\n switch (values[i]) {\r\n case "block":\r\n case "classic":\r\n case "oval":\r\n case "diamond":\r\n case "open":\r\n case "none":\r\n type = values[i];\r\n break;\r\n case "wide": h = 5; break;\r\n case "narrow": h = 2; break;\r\n case "long": w = 5; break;\r\n case "short": w = 2; break;\r\n }\r\n }\r\n if (type == "open") {\r\n w += 2;\r\n h += 2;\r\n t += 2;\r\n dx = 1;\r\n refX = isEnd ? 4 : 1;\r\n attr = {\r\n fill: "none",\r\n stroke: attrs.stroke\r\n };\r\n } else {\r\n refX = dx = w / 2;\r\n attr = {\r\n fill: attrs.stroke,\r\n stroke: "none"\r\n };\r\n }\r\n if (o._.arrows) {\r\n if (isEnd) {\r\n o._.arrows.endPath && markerCounter[o._.arrows.endPath]--;\r\n o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--;\r\n } else {\r\n o._.arrows.startPath && markerCounter[o._.arrows.startPath]--;\r\n o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--;\r\n }\r\n } else {\r\n o._.arrows = {};\r\n }\r\n if (type != "none") {\r\n var pathId = "raphael-marker-" + type,\r\n markerId = "raphael-marker-" + se + type + w + h + "-obj" + o.id;\r\n if (!R._g.doc.getElementById(pathId)) {\r\n p.defs.appendChild($($("path"), {\r\n "stroke-linecap": "round",\r\n d: markers[type],\r\n id: pathId\r\n }));\r\n markerCounter[pathId] = 1;\r\n } else {\r\n markerCounter[pathId]++;\r\n }\r\n var marker = R._g.doc.getElementById(markerId),\r\n use;\r\n if (!marker) {\r\n marker = $($("marker"), {\r\n id: markerId,\r\n markerHeight: h,\r\n markerWidth: w,\r\n orient: "auto",\r\n refX: refX,\r\n refY: h / 2\r\n });\r\n use = $($("use"), {\r\n "xlink:href": "#" + pathId,\r\n transform: (isEnd ? "rotate(180 " + w / 2 + " " + h / 2 + ") " : E) + "scale(" + w / t + "," + h / t + ")",\r\n "stroke-width": (1 / ((w / t + h / t) / 2)).toFixed(4)\r\n });\r\n marker.appendChild(use);\r\n p.defs.appendChild(marker);\r\n markerCounter[markerId] = 1;\r\n } else {\r\n markerCounter[markerId]++;\r\n use = marker.getElementsByTagName("use")[0];\r\n }\r\n $(use, attr);\r\n var delta = dx * (type != "diamond" && type != "oval");\r\n if (isEnd) {\r\n from = o._.arrows.startdx * stroke || 0;\r\n to = R.getTotalLength(attrs.path) - delta * stroke;\r\n } else {\r\n from = delta * stroke;\r\n to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);\r\n }\r\n attr = {};\r\n attr["marker-" + se] = "url(#" + markerId + ")";\r\n if (to || from) {\r\n attr.d = R.getSubpath(attrs.path, from, to);\r\n }\r\n $(node, attr);\r\n o._.arrows[se + "Path"] = pathId;\r\n o._.arrows[se + "Marker"] = markerId;\r\n o._.arrows[se + "dx"] = delta;\r\n o._.arrows[se + "Type"] = type;\r\n o._.arrows[se + "String"] = value;\r\n } else {\r\n if (isEnd) {\r\n from = o._.arrows.startdx * stroke || 0;\r\n to = R.getTotalLength(attrs.path) - from;\r\n } else {\r\n from = 0;\r\n to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);\r\n }\r\n o._.arrows[se + "Path"] && $(node, {d: R.getSubpath(attrs.path, from, to)});\r\n delete o._.arrows[se + "Path"];\r\n delete o._.arrows[se + "Marker"];\r\n delete o._.arrows[se + "dx"];\r\n delete o._.arrows[se + "Type"];\r\n delete o._.arrows[se + "String"];\r\n }\r\n for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) {\r\n var item = R._g.doc.getElementById(attr);\r\n item && item.parentNode.removeChild(item);\r\n }\r\n }\r\n },\r\n dasharray = {\r\n "-": [3, 1],\r\n ".": [1, 1],\r\n "-.": [3, 1, 1, 1],\r\n "-..": [3, 1, 1, 1, 1, 1],\r\n ". ": [1, 3],\r\n "- ": [4, 3],\r\n "--": [8, 3],\r\n "- .": [4, 3, 1, 3],\r\n "--.": [8, 3, 1, 3],\r\n "--..": [8, 3, 1, 3, 1, 3]\r\n },\r\n addDashes = function (o, value, params) {\r\n value = dasharray[Str(value).toLowerCase()];\r\n if (value) {\r\n var width = o.attrs["stroke-width"] || "1",\r\n butt = {round: width, square: width, butt: 0}[o.attrs["stroke-linecap"] || params["stroke-linecap"]] || 0,\r\n dashes = [],\r\n i = value.length;\r\n while (i--) {\r\n dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt;\r\n }\r\n $(o.node, {"stroke-dasharray": dashes.join(",")});\r\n }\r\n else {\r\n $(o.node, {"stroke-dasharray": "none"});\r\n }\r\n },\r\n setFillAndStroke = function (o, params) {\r\n var node = o.node,\r\n attrs = o.attrs,\r\n vis = node.style.visibility;\r\n node.style.visibility = "hidden";\r\n for (var att in params) {\r\n if (params[has](att)) {\r\n if (!R._availableAttrs[has](att)) {\r\n continue;\r\n }\r\n var value = params[att];\r\n attrs[att] = value;\r\n switch (att) {\r\n case "blur":\r\n o.blur(value);\r\n break;\r\n case "title":\r\n var title = node.getElementsByTagName("title");\r\n\r\n // Use the existing <title>.\r\n if (title.length && (title = title[0])) {\r\n title.firstChild.nodeValue = value;\r\n } else {\r\n title = $("title");\r\n var val = R._g.doc.createTextNode(value);\r\n title.appendChild(val);\r\n node.appendChild(title);\r\n }\r\n break;\r\n case "href":\r\n case "target":\r\n var pn = node.parentNode;\r\n if (pn.tagName.toLowerCase() != "a") {\r\n var hl = $("a");\r\n pn.insertBefore(hl, node);\r\n hl.appendChild(node);\r\n pn = hl;\r\n }\r\n if (att == "target") {\r\n pn.setAttributeNS(xlink, "show", value == "blank" ? "new" : value);\r\n } else {\r\n pn.setAttributeNS(xlink, att, value);\r\n }\r\n break;\r\n case "cursor":\r\n node.style.cursor = value;\r\n break;\r\n case "transform":\r\n o.transform(value);\r\n break;\r\n case "arrow-start":\r\n addArrow(o, value);\r\n break;\r\n case "arrow-end":\r\n addArrow(o, value, 1);\r\n break;\r\n case "clip-rect":\r\n var rect = Str(value).split(separator);\r\n if (rect.length == 4) {\r\n o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode);\r\n var el = $("clipPath"),\r\n rc = $("rect");\r\n el.id = R.createUUID();\r\n $(rc, {\r\n x: rect[0],\r\n y: rect[1],\r\n width: rect[2],\r\n height: rect[3]\r\n });\r\n el.appendChild(rc);\r\n o.paper.defs.appendChild(el);\r\n $(node, {"clip-path": "url(#" + el.id + ")"});\r\n o.clip = rc;\r\n }\r\n if (!value) {\r\n var path = node.getAttribute("clip-path");\r\n if (path) {\r\n var clip = R._g.doc.getElementById(path.replace(/(^url\\(#|\\)$)/g, E));\r\n clip && clip.parentNode.removeChild(clip);\r\n $(node, {"clip-path": E});\r\n delete o.clip;\r\n }\r\n }\r\n break;\r\n case "path":\r\n if (o.type == "path") {\r\n $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : "M0,0"});\r\n o._.dirty = 1;\r\n if (o._.arrows) {\r\n "startString" in o._.arrows && addArrow(o, o._.arrows.startString);\r\n "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\r\n }\r\n }\r\n break;\r\n case "width":\r\n node.setAttribute(att, value);\r\n o._.dirty = 1;\r\n if (attrs.fx) {\r\n att = "x";\r\n value = attrs.x;\r\n } else {\r\n break;\r\n }\r\n case "x":\r\n if (attrs.fx) {\r\n value = -attrs.x - (attrs.width || 0);\r\n }\r\n case "rx":\r\n if (att == "rx" && o.type == "rect") {\r\n break;\r\n }\r\n case "cx":\r\n node.setAttribute(att, value);\r\n o.pattern && updatePosition(o);\r\n o._.dirty = 1;\r\n break;\r\n case "height":\r\n node.setAttribute(att, value);\r\n o._.dirty = 1;\r\n if (attrs.fy) {\r\n att = "y";\r\n value = attrs.y;\r\n } else {\r\n break;\r\n }\r\n case "y":\r\n if (attrs.fy) {\r\n value = -attrs.y - (attrs.height || 0);\r\n }\r\n case "ry":\r\n if (att == "ry" && o.type == "rect") {\r\n break;\r\n }\r\n case "cy":\r\n node.setAttribute(att, value);\r\n o.pattern && updatePosition(o);\r\n o._.dirty = 1;\r\n break;\r\n case "r":\r\n if (o.type == "rect") {\r\n $(node, {rx: value, ry: value});\r\n } else {\r\n node.setAttribute(att, value);\r\n }\r\n o._.dirty = 1;\r\n break;\r\n case "src":\r\n if (o.type == "image") {\r\n node.setAttributeNS(xlink, "href", value);\r\n }\r\n break;\r\n case "stroke-width":\r\n /* FREEGROUP fix\r\n * draw2d version 3.0.3\r\n *\r\n * don\'t scale the line width if the user resize an shape/element.\r\n * Obscure stroke-width in case of "Draw2D touch" usage\r\n */\r\n if(!attrs["stroke-scale"]){\r\n if (o._.sx != 1 || o._.sy != 1) {\r\n value /= mmax(abs(o._.sx), abs(o._.sy)) || 1;\r\n }\r\n if (o.paper._vbSize) {\r\n // value *= o.paper._vbSize;\r\n }\r\n }\r\n\r\n\r\n node.setAttribute(att, value);\r\n if (attrs["stroke-dasharray"]) {\r\n addDashes(o, attrs["stroke-dasharray"], params);\r\n }\r\n if (o._.arrows) {\r\n "startString" in o._.arrows && addArrow(o, o._.arrows.startString);\r\n "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\r\n }\r\n break;\r\n case "stroke-dasharray":\r\n addDashes(o, value, params);\r\n break;\r\n case "fill":\r\n var isURL = Str(value).match(R._ISURL);\r\n if (isURL) {\r\n el = $("pattern");\r\n var ig = $("image");\r\n el.id = R.createUUID();\r\n $(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1});\r\n $(ig, {x: 0, y: 0, "xlink:href": isURL[1]});\r\n el.appendChild(ig);\r\n\r\n (function (el) {\r\n R._preload(isURL[1], function () {\r\n var w = this.offsetWidth,\r\n h = this.offsetHeight;\r\n $(el, {width: w, height: h});\r\n $(ig, {width: w, height: h});\r\n });\r\n })(el);\r\n o.paper.defs.appendChild(el);\r\n $(node, {fill: "url(#" + el.id + ")"});\r\n o.pattern = el;\r\n o.pattern && updatePosition(o);\r\n break;\r\n }\r\n var clr = R.getRGB(value);\r\n if (!clr.error) {\r\n delete params.gradient;\r\n delete attrs.gradient;\r\n !R.is(attrs.opacity, "undefined") &&\r\n R.is(params.opacity, "undefined") &&\r\n $(node, {opacity: attrs.opacity});\r\n !R.is(attrs["fill-opacity"], "undefined") &&\r\n R.is(params["fill-opacity"], "undefined") &&\r\n $(node, {"fill-opacity": attrs["fill-opacity"]});\r\n } else if ((o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value)) {\r\n if ("opacity" in attrs || "fill-opacity" in attrs) {\r\n var gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\\(#|\\)$/g, E));\r\n if (gradient) {\r\n var stops = gradient.getElementsByTagName("stop");\r\n $(stops[stops.length - 1], {"stop-opacity": ("opacity" in attrs ? attrs.opacity : 1) * ("fill-opacity" in attrs ? attrs["fill-opacity"] : 1)});\r\n }\r\n }\r\n attrs.gradient = value;\r\n attrs.fill = "none";\r\n break;\r\n }\r\n clr[has]("opacity") && $(node, {"fill-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});\r\n case "stroke":\r\n clr = R.getRGB(value);\r\n node.setAttribute(att, clr.hex);\r\n att == "stroke" && clr[has]("opacity") && $(node, {"stroke-opacity": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});\r\n if (att == "stroke" && o._.arrows) {\r\n "startString" in o._.arrows && addArrow(o, o._.arrows.startString);\r\n "endString" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\r\n }\r\n break;\r\n case "gradient":\r\n (o.type == "circle" || o.type == "ellipse" || Str(value).charAt() != "r") && addGradientFill(o, value);\r\n break;\r\n case "opacity":\r\n if (attrs.gradient && !attrs[has]("stroke-opacity")) {\r\n $(node, {"stroke-opacity": value > 1 ? value / 100 : value});\r\n }\r\n // fall\r\n case "fill-opacity":\r\n\r\n if (attrs.gradient) {\r\n gradient = R._g.doc.getElementById(node.getAttribute("fill").replace(/^url\\(#|\\)$/g, E));\r\n if (gradient) {\r\n stops = gradient.getElementsByTagName("stop");\r\n // FREEGROUP FIX\r\n for (gri = 0, grii = stops.length; gri < grii; gri++) {\r\n $(stops[gri], {"stop-opacity": value});\r\n }\r\n // END FIX\r\n }\r\n break;\r\n }\r\n default:\r\n att == "font-size" && (value = toInt(value, 10) + "px");\r\n var cssrule = att.replace(/(\\-.)/g, function (w) {\r\n return w.substring(1).toUpperCase();\r\n });\r\n node.style[cssrule] = value;\r\n o._.dirty = 1;\r\n node.setAttribute(att, value);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n tuneText(o, params);\r\n node.style.visibility = vis;\r\n },\r\n leading = 1.2,\r\n tuneText = function (el, params) {\r\n if (el.type != "text" || !(params[has]("text") || params[has]("font") || params[has]("font-size") || params[has]("x") || params[has]("y"))) {\r\n return;\r\n }\r\n var a = el.attrs,\r\n node = el.node,\r\n fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue("font-size"), 10) : 10;\r\n\r\n if (params[has]("text")) {\r\n a.text = params.text;\r\n while (node.firstChild) {\r\n node.removeChild(node.firstChild);\r\n }\r\n var texts = Str(params.text).split("\\n"),\r\n tspans = [],\r\n tspan;\r\n for (var i = 0, ii = texts.length; i < ii; i++) {\r\n tspan = $("tspan");\r\n i && $(tspan, {dy: fontSize * leading, x: a.x});\r\n tspan.appendChild(R._g.doc.createTextNode(texts[i]));\r\n node.appendChild(tspan);\r\n tspans[i] = tspan;\r\n }\r\n } else {\r\n tspans = node.getElementsByTagName("tspan");\r\n for (i = 0, ii = tspans.length; i < ii; i++) if (i) {\r\n $(tspans[i], {dy: fontSize * leading, x: a.x});\r\n } else {\r\n $(tspans[0], {dy: 0});\r\n }\r\n }\r\n $(node, {x: a.x, y: a.y});\r\n el._.dirty = 1;\r\n var bb = el._getBBox(),\r\n dif = a.y - (bb.y + bb.height / 2);\r\n dif && R.is(dif, "finite") && $(tspans[0], {dy: dif});\r\n },\r\n getRealNode = function (node) {\r\n if (node.parentNode && node.parentNode.tagName.toLowerCase() === "a") {\r\n return node.parentNode;\r\n } else {\r\n return node;\r\n }\r\n },\r\n Element = function (node, svg) {\r\n var X = 0,\r\n Y = 0;\r\n /*\\\r\n * Element.node\r\n [ property (object) ]\r\n **\r\n * Gives you a reference to the DOM object, so you can assign event handlers or just mess around.\r\n **\r\n * Note: Don’t mess with it.\r\n > Usage\r\n | // draw a circle at coordinate 10,10 with radius of 10\r\n | var c = paper.circle(10, 10, 10);\r\n | c.node.onclick = function () {\r\n | c.attr("fill", "red");\r\n | };\r\n \\*/\r\n this[0] = this.node = node;\r\n /*\\\r\n * Element.raphael\r\n [ property (object) ]\r\n **\r\n * Internal reference to @Raphael object. In case it is not available.\r\n > Usage\r\n | Raphael.el.red = function () {\r\n | var hsb = this.paper.raphael.rgb2hsb(this.attr("fill"));\r\n | hsb.h = 1;\r\n | this.attr({fill: this.paper.raphael.hsb2rgb(hsb).hex});\r\n | }\r\n \\*/\r\n node.raphael = true;\r\n /*\\\r\n * Element.id\r\n [ property (number) ]\r\n **\r\n * Unique id of the element. Especially useful when you want to listen to events of the element,\r\n * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method.\r\n \\*/\r\n this.id = R._oid++;\r\n node.raphaelid = this.id;\r\n this.matrix = R.matrix();\r\n this.realPath = null;\r\n /*\\\r\n * Element.paper\r\n [ property (object) ]\r\n **\r\n * Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions.\r\n > Usage\r\n | Raphael.el.cross = function () {\r\n | this.attr({fill: "red"});\r\n | this.paper.path("M10,10L50,50M50,10L10,50")\r\n | .attr({stroke: "red"});\r\n | }\r\n \\*/\r\n this.paper = svg;\r\n this.attrs = this.attrs || {};\r\n this._ = {\r\n transform: [],\r\n sx: 1,\r\n sy: 1,\r\n deg: 0,\r\n dx: 0,\r\n dy: 0,\r\n dirty: 1\r\n };\r\n !svg.bottom && (svg.bottom = this);\r\n /*\\\r\n * Element.prev\r\n [ property (object) ]\r\n **\r\n * Reference to the previous element in the hierarchy.\r\n \\*/\r\n this.prev = svg.top;\r\n svg.top && (svg.top.next = this);\r\n svg.top = this;\r\n /*\\\r\n * Element.next\r\n [ property (object) ]\r\n **\r\n * Reference to the next element in the hierarchy.\r\n \\*/\r\n this.next = null;\r\n },\r\n elproto = R.el;\r\n\r\n Element.prototype = elproto;\r\n elproto.constructor = Element;\r\n\r\n R._engine.path = function (pathString, SVG) {\r\n var el = $("path");\r\n SVG.canvas && SVG.canvas.appendChild(el);\r\n var p = new Element(el, SVG);\r\n p.type = "path";\r\n setFillAndStroke(p, {\r\n fill: "none",\r\n stroke: "#000",\r\n path: pathString\r\n });\r\n return p;\r\n };\r\n /*\\\r\n * Element.rotate\r\n [ method ]\r\n **\r\n * Deprecated! Use @Element.transform instead.\r\n * Adds rotation by given angle around given point to the list of\r\n * transformations of the element.\r\n > Parameters\r\n - deg (number) angle in degrees\r\n - cx (number) #optional x coordinate of the centre of rotation\r\n - cy (number) #optional y coordinate of the centre of rotation\r\n * If cx & cy aren’t specified centre of the shape is used as a point of rotation.\r\n = (object) @Element\r\n \\*/\r\n elproto.rotate = function (deg, cx, cy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n deg = Str(deg).split(separator);\r\n if (deg.length - 1) {\r\n cx = toFloat(deg[1]);\r\n cy = toFloat(deg[2]);\r\n }\r\n deg = toFloat(deg[0]);\r\n (cy == null) && (cx = cy);\r\n if (cx == null || cy == null) {\r\n var bbox = this.getBBox(1);\r\n cx = bbox.x + bbox.width / 2;\r\n cy = bbox.y + bbox.height / 2;\r\n }\r\n this.transform(this._.transform.concat([["r", deg, cx, cy]]));\r\n return this;\r\n };\r\n /*\\\r\n * Element.scale\r\n [ method ]\r\n **\r\n * Deprecated! Use @Element.transform instead.\r\n * Adds scale by given amount relative to given point to the list of\r\n * transformations of the element.\r\n > Parameters\r\n - sx (number) horisontal scale amount\r\n - sy (number) vertical scale amount\r\n - cx (number) #optional x coordinate of the centre of scale\r\n - cy (number) #optional y coordinate of the centre of scale\r\n * If cx & cy aren’t specified centre of the shape is used instead.\r\n = (object) @Element\r\n \\*/\r\n elproto.scale = function (sx, sy, cx, cy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n sx = Str(sx).split(separator);\r\n if (sx.length - 1) {\r\n sy = toFloat(sx[1]);\r\n cx = toFloat(sx[2]);\r\n cy = toFloat(sx[3]);\r\n }\r\n sx = toFloat(sx[0]);\r\n (sy == null) && (sy = sx);\r\n (cy == null) && (cx = cy);\r\n if (cx == null || cy == null) {\r\n var bbox = this.getBBox(1);\r\n }\r\n cx = cx == null ? bbox.x + bbox.width / 2 : cx;\r\n cy = cy == null ? bbox.y + bbox.height / 2 : cy;\r\n this.transform(this._.transform.concat([["s", sx, sy, cx, cy]]));\r\n return this;\r\n };\r\n /*\\\r\n * Element.translate\r\n [ method ]\r\n **\r\n * Deprecated! Use @Element.transform instead.\r\n * Adds translation by given amount to the list of transformations of the element.\r\n > Parameters\r\n - dx (number) horisontal shift\r\n - dy (number) vertical shift\r\n = (object) @Element\r\n \\*/\r\n elproto.translate = function (dx, dy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n dx = Str(dx).split(separator);\r\n if (dx.length - 1) {\r\n dy = toFloat(dx[1]);\r\n }\r\n dx = toFloat(dx[0]) || 0;\r\n dy = +dy || 0;\r\n this.transform(this._.transform.concat([["t", dx, dy]]));\r\n return this;\r\n };\r\n /*\\\r\n * Element.transform\r\n [ method ]\r\n **\r\n * Adds transformation to the element which is separate to other attributes,\r\n * i.e. translation doesn’t change `x` or `y` of the rectange. The format\r\n * of transformation string is similar to the path string syntax:\r\n | "t100,100r30,100,100s2,2,100,100r45s1.5"\r\n * Each letter is a command. There are four commands: `t` is for translate, `r` is for rotate, `s` is for\r\n * scale and `m` is for matrix.\r\n *\r\n * There are also alternative “absolute” translation, rotation and scale: `T`, `R` and `S`. They will not take previous transformation into account. For example, `...T100,0` will always move element 100 px horisontally, while `...t100,0` could move it vertically if there is `r90` before. Just compare results of `r90t100,0` and `r90T100,0`.\r\n *\r\n * So, the example line above could be read like “translate by 100, 100; rotate 30° around 100, 100; scale twice around 100, 100;\r\n * rotate 45° around centre; scale 1.5 times relative to centre”. As you can see rotate and scale commands have origin\r\n * coordinates as optional parameters, the default is the centre point of the element.\r\n * Matrix accepts six parameters.\r\n > Usage\r\n | var el = paper.rect(10, 20, 300, 200);\r\n | // translate 100, 100, rotate 45°, translate -100, 0\r\n | el.transform("t100,100r45t-100,0");\r\n | // if you want you can append or prepend transformations\r\n | el.transform("...t50,50");\r\n | el.transform("s2...");\r\n | // or even wrap\r\n | el.transform("t50,50...t-50-50");\r\n | // to reset transformation call method with empty string\r\n | el.transform("");\r\n | // to get current value call it without parameters\r\n | console.log(el.transform());\r\n > Parameters\r\n - tstr (string) #optional transformation string\r\n * If tstr isn’t specified\r\n = (string) current transformation string\r\n * else\r\n = (object) @Element\r\n \\*/\r\n elproto.transform = function (tstr) {\r\n var _ = this._;\r\n if (tstr == null) {\r\n return _.transform;\r\n }\r\n R._extractTransform(this, tstr);\r\n\r\n this.clip && $(this.clip, {transform: this.matrix.invert()});\r\n this.pattern && updatePosition(this);\r\n this.node && $(this.node, {transform: this.matrix});\r\n\r\n if (_.sx != 1 || _.sy != 1) {\r\n var sw = this.attrs[has]("stroke-width") ? this.attrs["stroke-width"] : 1;\r\n this.attr({"stroke-width": sw});\r\n }\r\n\r\n //Reduce transform string\r\n _.transform = this.matrix.toTransformString();\r\n\r\n return this;\r\n };\r\n /*\\\r\n * Element.hide\r\n [ method ]\r\n **\r\n * Makes element invisible. See @Element.show.\r\n = (object) @Element\r\n \\*/\r\n elproto.hide = function () {\r\n if(!this.removed) this.node.style.display = "none";\r\n return this;\r\n };\r\n /*\\\r\n * Element.show\r\n [ method ]\r\n **\r\n * Makes element visible. See @Element.hide.\r\n = (object) @Element\r\n \\*/\r\n elproto.show = function () {\r\n if(!this.removed) this.node.style.display = "";\r\n return this;\r\n };\r\n /*\\\r\n * Element.remove\r\n [ method ]\r\n **\r\n * Removes element from the paper.\r\n \\*/\r\n elproto.remove = function () {\r\n var node = getRealNode(this.node);\r\n if (this.removed || !node.parentNode) {\r\n return;\r\n }\r\n var paper = this.paper;\r\n paper.__set__ && paper.__set__.exclude(this);\r\n eve.unbind("raphael.*.*." + this.id);\r\n if (this.gradient) {\r\n paper.defs.removeChild(this.gradient);\r\n }\r\n R._tear(this, paper);\r\n\r\n node.parentNode.removeChild(node);\r\n\r\n // Remove custom data for element\r\n this.removeData();\r\n\r\n for (var i in this) {\r\n this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;\r\n }\r\n this.removed = true;\r\n };\r\n elproto._getBBox = function () {\r\n if (this.node.style.display == "none") {\r\n this.show();\r\n var hide = true;\r\n }\r\n var canvasHidden = false,\r\n containerStyle;\r\n if (this.paper.canvas.parentElement) {\r\n containerStyle = this.paper.canvas.parentElement.style;\r\n } //IE10+ can\'t find parentElement\r\n else if (this.paper.canvas.parentNode) {\r\n containerStyle = this.paper.canvas.parentNode.style;\r\n }\r\n\r\n if(containerStyle && containerStyle.display == "none") {\r\n canvasHidden = true;\r\n containerStyle.display = "";\r\n }\r\n var bbox = {};\r\n try {\r\n bbox = this.node.getBBox();\r\n } catch(e) {\r\n // Firefox 3.0.x, 25.0.1 (probably more versions affected) play badly here - possible fix\r\n bbox = {\r\n x: this.node.clientLeft,\r\n y: this.node.clientTop,\r\n width: this.node.clientWidth,\r\n height: this.node.clientHeight\r\n }\r\n } finally {\r\n bbox = bbox || {};\r\n if(canvasHidden){\r\n containerStyle.display = "none";\r\n }\r\n }\r\n hide && this.hide();\r\n return bbox;\r\n };\r\n /*\\\r\n * Element.attr\r\n [ method ]\r\n **\r\n * Sets the attributes of the element.\r\n > Parameters\r\n - attrName (string) attribute’s name\r\n - value (string) value\r\n * or\r\n - params (object) object of name/value pairs\r\n * or\r\n - attrName (string) attribute’s name\r\n * or\r\n - attrNames (array) in this case method returns array of current values for given attribute names\r\n = (object) @Element if attrsName & value or params are passed in.\r\n = (...) value of the attribute if only attrsName is passed in.\r\n = (array) array of values of the attribute if attrsNames is passed in.\r\n = (object) object of attributes if nothing is passed in.\r\n > Possible parameters\r\n # <p>Please refer to the <a href="http://www.w3.org/TR/SVG/" title="The W3C Recommendation for the SVG language describes these properties in detail.">SVG specification</a> for an explanation of these parameters.</p>\r\n o arrow-end (string) arrowhead on the end of the path. The format for string is `<type>[-<width>[-<length>]]`. Possible types: `classic`, `block`, `open`, `oval`, `diamond`, `none`, width: `wide`, `narrow`, `medium`, length: `long`, `short`, `midium`.\r\n o clip-rect (string) comma or space separated values: x, y, width and height\r\n o cursor (string) CSS type of the cursor\r\n o cx (number) the x-axis coordinate of the center of the circle, or ellipse\r\n o cy (number) the y-axis coordinate of the center of the circle, or ellipse\r\n o fill (string) colour, gradient or image\r\n o fill-opacity (number)\r\n o font (string)\r\n o font-family (string)\r\n o font-size (number) font size in pixels\r\n o font-weight (string)\r\n o height (number)\r\n o href (string) URL, if specified element behaves as hyperlink\r\n o opacity (number)\r\n o path (string) SVG path string format\r\n o r (number) radius of the circle, ellipse or rounded corner on the rect\r\n o rx (number) horisontal radius of the ellipse\r\n o ry (number) vertical radius of the ellipse\r\n o src (string) image URL, only works for @Element.image element\r\n o stroke (string) stroke colour\r\n o stroke-dasharray (string) [“”, “none”, “`-`”, “`.`”, “`-.`”, “`-..`”, “`. `”, “`- `”, “`--`”, “`- .`”, “`--.`”, “`--..`”]\r\n o stroke-linecap (string) [“`butt`”, “`square`”, “`round`”]\r\n o stroke-linejoin (string) [“`bevel`”, “`round`”, “`miter`”]\r\n o stroke-miterlimit (number)\r\n o stroke-opacity (number)\r\n o stroke-width (number) stroke width in pixels, default is \'1\'\r\n o target (string) used with href\r\n o text (string) contents of the text element. Use `\\n` for multiline text\r\n o text-anchor (string) [“`start`”, “`middle`”, “`end`”], default is “`middle`”\r\n o title (string) will create tooltip with a given text\r\n o transform (string) see @Element.transform\r\n o width (number)\r\n o x (number)\r\n o y (number)\r\n > Gradients\r\n * Linear gradient format: “`‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`90-#fff-#000`” – 90°\r\n * gradient from white to black or “`0-#fff-#f00:20-#000`” – 0° gradient from white via red (at 20%) to black.\r\n *\r\n * radial gradient: “`r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`r#fff-#000`” –\r\n * gradient from white to black or “`r(0.25, 0.75)#fff-#000`” – gradient from white to black with focus point\r\n * at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses.\r\n > Path String\r\n # <p>Please refer to <a href="http://www.w3.org/TR/SVG/paths.html#PathData" title="Details of a path’s data attribute’s format are described in the SVG specification.">SVG documentation regarding path string</a>. Raphaël fully supports it.</p>\r\n > Colour Parsing\r\n # <ul>\r\n # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>\r\n # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>\r\n # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>\r\n # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li>\r\n # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li>\r\n # <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200, 100, 0, .5)</code>”)</li>\r\n # <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%, 175%, 0%, 50%)</code>”)</li>\r\n # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li>\r\n # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>\r\n # <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li>\r\n # <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href="http://en.wikipedia.org/wiki/HSL_and_HSV" title="HSL and HSV - Wikipedia, the free encyclopedia">Wikipedia page</a></li>\r\n # <li>hsl(•••%, •••%, •••%) — same as above, but in %</li>\r\n # <li>hsla(•••, •••, •••, •••) — same as above, but with opacity</li>\r\n # <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg, 1, .5)</code>” or, if you want to go fancy, “<code>hsl(240°, 1, .5)</code>”</li>\r\n # </ul>\r\n \\*/\r\n elproto.attr = function (name, value) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (name == null) {\r\n var res = {};\r\n for (var a in this.attrs) if (this.attrs[has](a)) {\r\n res[a] = this.attrs[a];\r\n }\r\n res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;\r\n res.transform = this._.transform;\r\n return res;\r\n }\r\n if (value == null && R.is(name, "string")) {\r\n if (name == "fill" && this.attrs.fill == "none" && this.attrs.gradient) {\r\n return this.attrs.gradient;\r\n }\r\n if (name == "transform") {\r\n return this._.transform;\r\n }\r\n var names = name.split(separator),\r\n out = {};\r\n for (var i = 0, ii = names.length; i < ii; i++) {\r\n name = names[i];\r\n if (name in this.attrs) {\r\n out[name] = this.attrs[name];\r\n } else if (R.is(this.paper.customAttributes[name], "function")) {\r\n out[name] = this.paper.customAttributes[name].def;\r\n } else {\r\n out[name] = R._availableAttrs[name];\r\n }\r\n }\r\n return ii - 1 ? out : out[names[0]];\r\n }\r\n if (value == null && R.is(name, "array")) {\r\n out = {};\r\n for (i = 0, ii = name.length; i < ii; i++) {\r\n out[name[i]] = this.attr(name[i]);\r\n }\r\n return out;\r\n }\r\n if (value != null) {\r\n var params = {};\r\n params[name] = value;\r\n } else if (name != null && R.is(name, "object")) {\r\n params = name;\r\n }\r\n for (var key in params) {\r\n eve("raphael.attr." + key + "." + this.id, this, params[key]);\r\n }\r\n for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {\r\n var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));\r\n this.attrs[key] = params[key];\r\n for (var subkey in par) if (par[has](subkey)) {\r\n params[subkey] = par[subkey];\r\n }\r\n }\r\n setFillAndStroke(this, params);\r\n return this;\r\n };\r\n /*\\\r\n * Element.toFront\r\n [ method ]\r\n **\r\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements.\r\n = (object) @Element\r\n \\*/\r\n elproto.toFront = function () {\r\n if (this.removed) {\r\n return this;\r\n }\r\n var node = getRealNode(this.node);\r\n node.parentNode.appendChild(node);\r\n var svg = this.paper;\r\n svg.top != this && R._tofront(this, svg);\r\n return this;\r\n };\r\n /*\\\r\n * Element.toBack\r\n [ method ]\r\n **\r\n * Moves the element so it is the furthest from the viewer’s eyes, behind other elements.\r\n = (object) @Element\r\n \\*/\r\n elproto.toBack = function () {\r\n if (this.removed) {\r\n return this;\r\n }\r\n var node = getRealNode(this.node);\r\n var parentNode = node.parentNode;\r\n parentNode.insertBefore(node, parentNode.firstChild);\r\n R._toback(this, this.paper);\r\n var svg = this.paper;\r\n return this;\r\n };\r\n /*\\\r\n * Element.insertAfter\r\n [ method ]\r\n **\r\n * Inserts current object after the given one.\r\n = (object) @Element\r\n \\*/\r\n elproto.insertAfter = function (element) {\r\n if (this.removed || !element) {\r\n return this;\r\n }\r\n\r\n var node = getRealNode(this.node);\r\n var afterNode = getRealNode(element.node || element[element.length - 1].node);\r\n if (afterNode.nextSibling) {\r\n afterNode.parentNode.insertBefore(node, afterNode.nextSibling);\r\n } else {\r\n afterNode.parentNode.appendChild(node);\r\n }\r\n R._insertafter(this, element, this.paper);\r\n return this;\r\n };\r\n /*\\\r\n * Element.insertBefore\r\n [ method ]\r\n **\r\n * Inserts current object before the given one.\r\n = (object) @Element\r\n \\*/\r\n elproto.insertBefore = function (element) {\r\n if (this.removed || !element) {\r\n return this;\r\n }\r\n\r\n var node = getRealNode(this.node);\r\n var beforeNode = getRealNode(element.node || element[0].node);\r\n beforeNode.parentNode.insertBefore(node, beforeNode);\r\n R._insertbefore(this, element, this.paper);\r\n return this;\r\n };\r\n elproto.blur = function (size) {\r\n // Experimental. No Safari support. Use it on your own risk.\r\n var t = this;\r\n if (+size !== 0) {\r\n var fltr = $("filter"),\r\n blur = $("feGaussianBlur");\r\n t.attrs.blur = size;\r\n fltr.id = R.createUUID();\r\n $(blur, {stdDeviation: +size || 1.5});\r\n fltr.appendChild(blur);\r\n t.paper.defs.appendChild(fltr);\r\n t._blur = fltr;\r\n $(t.node, {filter: "url(#" + fltr.id + ")"});\r\n } else {\r\n if (t._blur) {\r\n t._blur.parentNode.removeChild(t._blur);\r\n delete t._blur;\r\n delete t.attrs.blur;\r\n }\r\n t.node.removeAttribute("filter");\r\n }\r\n return t;\r\n };\r\n R._engine.circle = function (svg, x, y, r) {\r\n var el = $("circle");\r\n svg.canvas && svg.canvas.appendChild(el);\r\n var res = new Element(el, svg);\r\n res.attrs = {cx: x, cy: y, r: r, fill: "none", stroke: "#000"};\r\n res.type = "circle";\r\n $(el, res.attrs);\r\n return res;\r\n };\r\n R._engine.rect = function (svg, x, y, w, h, r) {\r\n var el = $("rect");\r\n svg.canvas && svg.canvas.appendChild(el);\r\n var res = new Element(el, svg);\r\n res.attrs = {x: x, y: y, width: w, height: h, rx: r || 0, ry: r || 0, fill: "none", stroke: "#000"};\r\n res.type = "rect";\r\n $(el, res.attrs);\r\n return res;\r\n };\r\n R._engine.ellipse = function (svg, x, y, rx, ry) {\r\n var el = $("ellipse");\r\n svg.canvas && svg.canvas.appendChild(el);\r\n var res = new Element(el, svg);\r\n res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: "none", stroke: "#000"};\r\n res.type = "ellipse";\r\n $(el, res.attrs);\r\n return res;\r\n };\r\n R._engine.image = function (svg, src, x, y, w, h) {\r\n var el = $("image");\r\n $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: "none"});\r\n el.setAttributeNS(xlink, "href", src);\r\n svg.canvas && svg.canvas.appendChild(el);\r\n var res = new Element(el, svg);\r\n res.attrs = {x: x, y: y, width: w, height: h, src: src};\r\n res.type = "image";\r\n return res;\r\n };\r\n R._engine.text = function (svg, x, y, text, href) {\r\n var el = $("text");\r\n svg.canvas && svg.canvas.appendChild(el);\r\n var res = new Element(el, svg);\r\n res.attrs = {\r\n x: x,\r\n y: y,\r\n "text-anchor": "middle",\r\n text: text,\r\n "font-family": R._availableAttrs["font-family"],\r\n "font-size": R._availableAttrs["font-size"],\r\n stroke: "none",\r\n fill: "#000",\r\n ...(href ? { href } : null),\r\n };\r\n res.type = "text";\r\n setFillAndStroke(res, res.attrs);\r\n return res;\r\n };\r\n R._engine.setSize = function (width, height) {\r\n this.width = width || this.width;\r\n this.height = height || this.height;\r\n this.canvas.setAttribute("width", this.width);\r\n this.canvas.setAttribute("height", this.height);\r\n if (this._viewBox) {\r\n this.setViewBox.apply(this, this._viewBox);\r\n }\r\n return this;\r\n };\r\n R._engine.create = function () {\r\n var con = R._getContainer.apply(0, arguments),\r\n container = con && con.container,\r\n x = con.x,\r\n y = con.y,\r\n width = con.width,\r\n height = con.height;\r\n if (!container) {\r\n throw new Error("SVG container not found.");\r\n }\r\n var cnvs = $("svg"),\r\n css = "overflow:hidden;",\r\n isFloating;\r\n x = x || 0;\r\n y = y || 0;\r\n width = width || 512;\r\n height = height || 342;\r\n $(cnvs, {\r\n height: height,\r\n version: 1.1,\r\n width: width,\r\n xmlns: "http://www.w3.org/2000/svg",\r\n "xmlns:xlink": "http://www.w3.org/1999/xlink"\r\n });\r\n if (container == 1) {\r\n cnvs.style.cssText = css + "position:absolute;left:" + x + "px;top:" + y + "px";\r\n R._g.doc.body.appendChild(cnvs);\r\n isFloating = 1;\r\n } else {\r\n cnvs.style.cssText = css + "position:relative";\r\n if (container.firstChild) {\r\n container.insertBefore(cnvs, container.firstChild);\r\n } else {\r\n container.appendChild(cnvs);\r\n }\r\n }\r\n container = new R._Paper;\r\n container.width = width;\r\n container.height = height;\r\n container.canvas = cnvs;\r\n container.clear();\r\n container._left = container._top = 0;\r\n isFloating && (container.renderfix = function () {});\r\n container.renderfix();\r\n return container;\r\n };\r\n R._engine.setViewBox = function (x, y, w, h, fit) {\r\n eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);\r\n var paperSize = this.getSize(),\r\n size = mmax(w / paperSize.width, h / paperSize.height),\r\n top = this.top,\r\n aspectRatio = fit ? "xMidYMid meet" : "xMinYMin",\r\n vb,\r\n sw;\r\n if (x == null) {\r\n if (this._vbSize) {\r\n size = 1;\r\n }\r\n delete this._vbSize;\r\n vb = "0 0 " + this.width + S + this.height;\r\n } else {\r\n this._vbSize = size;\r\n vb = x + S + y + S + w + S + h;\r\n }\r\n $(this.canvas, {\r\n viewBox: vb,\r\n preserveAspectRatio: aspectRatio\r\n });\r\n while (size && top) {\r\n sw = "stroke-width" in top.attrs ? top.attrs["stroke-width"] : 1;\r\n top.attr({"stroke-width": sw});\r\n top._.dirty = 1;\r\n top._.dirtyT = 1;\r\n top = top.prev;\r\n }\r\n this._viewBox = [x, y, w, h, !!fit];\r\n return this;\r\n };\r\n /*\\\r\n * Paper.renderfix\r\n [ method ]\r\n **\r\n * Fixes the issue of Firefox and IE9 regarding subpixel rendering. If paper is dependant\r\n * on other elements after reflow it could shift half pixel which cause for lines to lost their crispness.\r\n * This method fixes the issue.\r\n **\r\n Special thanks to Mariusz Nowak (http://www.medikoo.com/) for this method.\r\n \\*/\r\n R.prototype.renderfix = function () {\r\n var cnvs = this.canvas,\r\n s = cnvs.style,\r\n pos;\r\n try {\r\n pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix();\r\n } catch (e) {\r\n pos = cnvs.createSVGMatrix();\r\n }\r\n var left = -pos.e % 1,\r\n top = -pos.f % 1;\r\n if (left || top) {\r\n if (left) {\r\n this._left = (this._left + left) % 1;\r\n s.left = this._left + "px";\r\n }\r\n if (top) {\r\n this._top = (this._top + top) % 1;\r\n s.top = this._top + "px";\r\n }\r\n }\r\n };\r\n /*\\\r\n * Paper.clear\r\n [ method ]\r\n **\r\n * Clears the paper, i.e. removes all the elements.\r\n \\*/\r\n R.prototype.clear = function () {\r\n R.eve("raphael.clear", this);\r\n var c = this.canvas;\r\n while (c.firstChild) {\r\n c.removeChild(c.firstChild);\r\n }\r\n this.bottom = this.top = null;\r\n (this.desc = $("desc")).appendChild(R._g.doc.createTextNode("Created with Rapha\\xebl " + R.version));\r\n c.appendChild(this.desc);\r\n c.appendChild(this.defs = $("defs"));\r\n };\r\n /*\\\r\n * Paper.remove\r\n [ method ]\r\n **\r\n * Removes the paper from the DOM.\r\n \\*/\r\n R.prototype.remove = function () {\r\n eve("raphael.remove", this);\r\n this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);\r\n for (var i in this) {\r\n this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;\r\n }\r\n };\r\n var setproto = R.st;\r\n for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {\r\n setproto[method] = (function (methodname) {\r\n return function () {\r\n var arg = arguments;\r\n return this.forEach(function (el) {\r\n el[methodname].apply(el, arg);\r\n });\r\n };\r\n })(method);\r\n }\r\n}));\r\n\r\n// ┌─────────────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\r\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ VML Module │ \\\\\r\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\r\n// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\\\\r\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\\\\r\n// └─────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n(function (glob, factory) {\r\n if (typeof define === "function" && define.amd) {\r\n define("raphael.vml", ["raphael.core"], function(raphael) {\r\n return factory(raphael);\r\n });\r\n } else if (typeof exports === "object") {\r\n factory(require("./raphael.core"));\r\n } else {\r\n factory(glob.Raphael);\r\n }\r\n}(this, function(R) {\r\n if (R && !R.vml) {\r\n return;\r\n }\r\n\r\n var has = "hasOwnProperty",\r\n Str = String,\r\n toFloat = parseFloat,\r\n math = Math,\r\n round = math.round,\r\n mmax = math.max,\r\n mmin = math.min,\r\n abs = math.abs,\r\n fillString = "fill",\r\n separator = /[, ]+/,\r\n eve = R.eve,\r\n ms = " progid:DXImageTransform.Microsoft",\r\n S = " ",\r\n E = "",\r\n map = {M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x"},\r\n bites = /([clmz]),?([^clmz]*)/gi,\r\n blurregexp = / progid:\\S+Blur\\([^\\)]+\\)/g,\r\n val = /-?[^,\\s-]+/g,\r\n cssDot = "position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)",\r\n zoom = 21600,\r\n pathTypes = {path: 1, rect: 1, image: 1},\r\n ovalTypes = {circle: 1, ellipse: 1},\r\n path2vml = function (path) {\r\n var total = /[ahqstv]/ig,\r\n command = R._pathToAbsolute;\r\n Str(path).match(total) && (command = R._path2curve);\r\n total = /[clmz]/g;\r\n if (command == R._pathToAbsolute && !Str(path).match(total)) {\r\n var res = Str(path).replace(bites, function (all, command, args) {\r\n var vals = [],\r\n isMove = command.toLowerCase() == "m",\r\n res = map[command];\r\n args.replace(val, function (value) {\r\n if (isMove && vals.length == 2) {\r\n res += vals + map[command == "m" ? "l" : "L"];\r\n vals = [];\r\n }\r\n vals.push(round(value * zoom));\r\n });\r\n return res + vals;\r\n });\r\n return res;\r\n }\r\n var pa = command(path), p, r;\r\n res = [];\r\n for (var i = 0, ii = pa.length; i < ii; i++) {\r\n p = pa[i];\r\n r = pa[i][0].toLowerCase();\r\n r == "z" && (r = "x");\r\n for (var j = 1, jj = p.length; j < jj; j++) {\r\n r += round(p[j] * zoom) + (j != jj - 1 ? "," : E);\r\n }\r\n res.push(r);\r\n }\r\n return res.join(S);\r\n },\r\n compensation = function (deg, dx, dy) {\r\n var m = R.matrix();\r\n m.rotate(-deg, .5, .5);\r\n return {\r\n dx: m.x(dx, dy),\r\n dy: m.y(dx, dy)\r\n };\r\n },\r\n setCoords = function (p, sx, sy, dx, dy, deg) {\r\n var _ = p._,\r\n m = p.matrix,\r\n fillpos = _.fillpos,\r\n o = p.node,\r\n s = o.style,\r\n y = 1,\r\n flip = "",\r\n dxdy,\r\n kx = zoom / sx,\r\n ky = zoom / sy;\r\n s.visibility = "hidden";\r\n if (!sx || !sy) {\r\n return;\r\n }\r\n o.coordsize = abs(kx) + S + abs(ky);\r\n s.rotation = deg * (sx * sy < 0 ? -1 : 1);\r\n if (deg) {\r\n var c = compensation(deg, dx, dy);\r\n dx = c.dx;\r\n dy = c.dy;\r\n }\r\n sx < 0 && (flip += "x");\r\n sy < 0 && (flip += " y") && (y = -1);\r\n s.flip = flip;\r\n o.coordorigin = (dx * -kx) + S + (dy * -ky);\r\n if (fillpos || _.fillsize) {\r\n var fill = o.getElementsByTagName(fillString);\r\n fill = fill && fill[0];\r\n o.removeChild(fill);\r\n if (fillpos) {\r\n c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1]));\r\n fill.position = c.dx * y + S + c.dy * y;\r\n }\r\n if (_.fillsize) {\r\n fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy);\r\n }\r\n o.appendChild(fill);\r\n }\r\n s.visibility = "visible";\r\n };\r\n R.toString = function () {\r\n return "Your browser doesn\\u2019t support SVG. Falling down to VML.\\nYou are running Rapha\\xebl " + this.version;\r\n };\r\n var addArrow = function (o, value, isEnd) {\r\n var values = Str(value).toLowerCase().split("-"),\r\n se = isEnd ? "end" : "start",\r\n i = values.length,\r\n type = "classic",\r\n w = "medium",\r\n h = "medium";\r\n while (i--) {\r\n switch (values[i]) {\r\n case "block":\r\n case "classic":\r\n case "oval":\r\n case "diamond":\r\n case "open":\r\n case "none":\r\n type = values[i];\r\n break;\r\n case "wide":\r\n case "narrow": h = values[i]; break;\r\n case "long":\r\n case "short": w = values[i]; break;\r\n }\r\n }\r\n var stroke = o.node.getElementsByTagName("stroke")[0];\r\n stroke[se + "arrow"] = type;\r\n stroke[se + "arrowlength"] = w;\r\n stroke[se + "arrowwidth"] = h;\r\n },\r\n setFillAndStroke = function (o, params) {\r\n // o.paper.canvas.style.display = "none";\r\n o.attrs = o.attrs || {};\r\n var node = o.node,\r\n a = o.attrs,\r\n s = node.style,\r\n xy,\r\n newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r),\r\n isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry),\r\n res = o;\r\n\r\n\r\n for (var par in params) if (params[has](par)) {\r\n a[par] = params[par];\r\n }\r\n if (newpath) {\r\n a.path = R._getPath[o.type](o);\r\n o._.dirty = 1;\r\n }\r\n params.href && (node.href = params.href);\r\n params.title && (node.title = params.title);\r\n params.target && (node.target = params.target);\r\n params.cursor && (s.cursor = params.cursor);\r\n "blur" in params && o.blur(params.blur);\r\n if (params.path && o.type == "path" || newpath) {\r\n node.path = path2vml(~Str(a.path).toLowerCase().indexOf("r") ? R._pathToAbsolute(a.path) : a.path);\r\n o._.dirty = 1;\r\n if (o.type == "image") {\r\n o._.fillpos = [a.x, a.y];\r\n o._.fillsize = [a.width, a.height];\r\n setCoords(o, 1, 1, 0, 0, 0);\r\n }\r\n }\r\n "transform" in params && o.transform(params.transform);\r\n if (isOval) {\r\n var cx = +a.cx,\r\n cy = +a.cy,\r\n rx = +a.rx || +a.r || 0,\r\n ry = +a.ry || +a.r || 0;\r\n node.path = R.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom));\r\n o._.dirty = 1;\r\n }\r\n if ("clip-rect" in params) {\r\n var rect = Str(params["clip-rect"]).split(separator);\r\n if (rect.length == 4) {\r\n rect[2] = +rect[2] + (+rect[0]);\r\n rect[3] = +rect[3] + (+rect[1]);\r\n var div = node.clipRect || R._g.doc.createElement("div"),\r\n dstyle = div.style;\r\n dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect);\r\n if (!node.clipRect) {\r\n dstyle.position = "absolute";\r\n dstyle.top = 0;\r\n dstyle.left = 0;\r\n dstyle.width = o.paper.width + "px";\r\n dstyle.height = o.paper.height + "px";\r\n node.parentNode.insertBefore(div, node);\r\n div.appendChild(node);\r\n node.clipRect = div;\r\n }\r\n }\r\n if (!params["clip-rect"]) {\r\n node.clipRect && (node.clipRect.style.clip = "auto");\r\n }\r\n }\r\n if (o.textpath) {\r\n var textpathStyle = o.textpath.style;\r\n params.font && (textpathStyle.font = params.font);\r\n params["font-family"] && (textpathStyle.fontFamily = \'"\' + params["font-family"].split(",")[0].replace(/^[\'"]+|[\'"]+$/g, E) + \'"\');\r\n params["font-size"] && (textpathStyle.fontSize = params["font-size"]);\r\n params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]);\r\n params["font-style"] && (textpathStyle.fontStyle = params["font-style"]);\r\n }\r\n if ("arrow-start" in params) {\r\n addArrow(res, params["arrow-start"]);\r\n }\r\n if ("arrow-end" in params) {\r\n addArrow(res, params["arrow-end"], 1);\r\n }\r\n if (params.opacity != null ||\r\n params["stroke-width"] != null ||\r\n params.fill != null ||\r\n params.src != null ||\r\n params.stroke != null ||\r\n params["stroke-width"] != null ||\r\n params["stroke-opacity"] != null ||\r\n params["fill-opacity"] != null ||\r\n params["stroke-dasharray"] != null ||\r\n params["stroke-miterlimit"] != null ||\r\n params["stroke-linejoin"] != null ||\r\n params["stroke-linecap"] != null) {\r\n var fill = node.getElementsByTagName(fillString),\r\n newfill = false;\r\n fill = fill && fill[0];\r\n !fill && (newfill = fill = createNode(fillString));\r\n if (o.type == "image" && params.src) {\r\n fill.src = params.src;\r\n }\r\n params.fill && (fill.on = true);\r\n if (fill.on == null || params.fill == "none" || params.fill === null) {\r\n fill.on = false;\r\n }\r\n if (fill.on && params.fill) {\r\n var isURL = Str(params.fill).match(R._ISURL);\r\n if (isURL) {\r\n fill.parentNode == node && node.removeChild(fill);\r\n fill.rotate = true;\r\n fill.src = isURL[1];\r\n fill.type = "tile";\r\n var bbox = o.getBBox(1);\r\n fill.position = bbox.x + S + bbox.y;\r\n o._.fillpos = [bbox.x, bbox.y];\r\n\r\n R._preload(isURL[1], function () {\r\n o._.fillsize = [this.offsetWidth, this.offsetHeight];\r\n });\r\n } else {\r\n fill.color = R.getRGB(params.fill).hex;\r\n fill.src = E;\r\n fill.type = "solid";\r\n if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != "r") && addGradientFill(res, params.fill, fill)) {\r\n a.fill = "none";\r\n a.gradient = params.fill;\r\n fill.rotate = false;\r\n }\r\n }\r\n }\r\n if ("fill-opacity" in params || "opacity" in params) {\r\n var opacity = ((+a["fill-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1);\r\n opacity = mmin(mmax(opacity, 0), 1);\r\n fill.opacity = opacity;\r\n if (fill.src) {\r\n fill.color = "none";\r\n }\r\n }\r\n node.appendChild(fill);\r\n var stroke = (node.getElementsByTagName("stroke") && node.getElementsByTagName("stroke")[0]),\r\n newstroke = false;\r\n !stroke && (newstroke = stroke = createNode("stroke"));\r\n if ((params.stroke && params.stroke != "none") ||\r\n params["stroke-width"] ||\r\n params["stroke-opacity"] != null ||\r\n params["stroke-dasharray"] ||\r\n params["stroke-miterlimit"] ||\r\n params["stroke-linejoin"] ||\r\n params["stroke-linecap"]) {\r\n stroke.on = true;\r\n }\r\n (params.stroke == "none" || params.stroke === null || stroke.on == null || params.stroke == 0 || params["stroke-width"] == 0) && (stroke.on = false);\r\n var strokeColor = R.getRGB(params.stroke);\r\n stroke.on && params.stroke && (stroke.color = strokeColor.hex);\r\n opacity = ((+a["stroke-opacity"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1);\r\n var width = (toFloat(params["stroke-width"]) || 1) * .75;\r\n opacity = mmin(mmax(opacity, 0), 1);\r\n params["stroke-width"] == null && (width = a["stroke-width"]);\r\n params["stroke-width"] && (stroke.weight = width);\r\n width && width < 1 && (opacity *= width) && (stroke.weight = 1);\r\n stroke.opacity = opacity;\r\n\r\n params["stroke-linejoin"] && (stroke.joinstyle = params["stroke-linejoin"] || "miter");\r\n stroke.miterlimit = params["stroke-miterlimit"] || 8;\r\n params["stroke-linecap"] && (stroke.endcap = params["stroke-linecap"] == "butt" ? "flat" : params["stroke-linecap"] == "square" ? "square" : "round");\r\n if ("stroke-dasharray" in params) {\r\n var dasharray = {\r\n "-": "shortdash",\r\n ".": "shortdot",\r\n "-.": "shortdashdot",\r\n "-..": "shortdashdotdot",\r\n ". ": "dot",\r\n "- ": "dash",\r\n "--": "longdash",\r\n "- .": "dashdot",\r\n "--.": "longdashdot",\r\n "--..": "longdashdotdot"\r\n };\r\n stroke.dashstyle = dasharray[has](params["stroke-dasharray"]) ? dasharray[params["stroke-dasharray"]] : E;\r\n }\r\n newstroke && node.appendChild(stroke);\r\n }\r\n if (res.type == "text") {\r\n res.paper.canvas.style.display = E;\r\n var span = res.paper.span,\r\n m = 100,\r\n fontSize = a.font && a.font.match(/\\d+(?:\\.\\d*)?(?=px)/);\r\n s = span.style;\r\n a.font && (s.font = a.font);\r\n a["font-family"] && (s.fontFamily = a["font-family"]);\r\n a["font-weight"] && (s.fontWeight = a["font-weight"]);\r\n a["font-style"] && (s.fontStyle = a["font-style"]);\r\n fontSize = toFloat(a["font-size"] || fontSize && fontSize[0]) || 10;\r\n s.fontSize = fontSize * m + "px";\r\n res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, "<").replace(/&/g, "&").replace(/\\n/g, "<br>"));\r\n var brect = span.getBoundingClientRect();\r\n res.W = a.w = (brect.right - brect.left) / m;\r\n res.H = a.h = (brect.bottom - brect.top) / m;\r\n // res.paper.canvas.style.display = "none";\r\n res.X = a.x;\r\n res.Y = a.y + res.H / 2;\r\n\r\n ("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1));\r\n var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"];\r\n for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) {\r\n res._.dirty = 1;\r\n break;\r\n }\r\n\r\n // text-anchor emulation\r\n switch (a["text-anchor"]) {\r\n case "start":\r\n res.textpath.style["v-text-align"] = "left";\r\n res.bbx = res.W / 2;\r\n break;\r\n case "end":\r\n res.textpath.style["v-text-align"] = "right";\r\n res.bbx = -res.W / 2;\r\n break;\r\n default:\r\n res.textpath.style["v-text-align"] = "center";\r\n res.bbx = 0;\r\n break;\r\n }\r\n res.textpath.style["v-text-kern"] = true;\r\n }\r\n // res.paper.canvas.style.display = E;\r\n },\r\n addGradientFill = function (o, gradient, fill) {\r\n o.attrs = o.attrs || {};\r\n var attrs = o.attrs,\r\n pow = Math.pow,\r\n opacity,\r\n oindex,\r\n type = "linear",\r\n fxfy = ".5 .5";\r\n o.attrs.gradient = gradient;\r\n gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) {\r\n type = "radial";\r\n if (fx && fy) {\r\n fx = toFloat(fx);\r\n fy = toFloat(fy);\r\n pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5);\r\n fxfy = fx + S + fy;\r\n }\r\n return E;\r\n });\r\n gradient = gradient.split(/\\s*\\-\\s*/);\r\n if (type == "linear") {\r\n var angle = gradient.shift();\r\n angle = -toFloat(angle);\r\n if (isNaN(angle)) {\r\n return null;\r\n }\r\n }\r\n var dots = R._parseDots(gradient);\r\n if (!dots) {\r\n return null;\r\n }\r\n o = o.shape || o.node;\r\n if (dots.length) {\r\n o.removeChild(fill);\r\n fill.on = true;\r\n fill.method = "none";\r\n fill.color = dots[0].color;\r\n fill.color2 = dots[dots.length - 1].color;\r\n var clrs = [];\r\n for (var i = 0, ii = dots.length; i < ii; i++) {\r\n dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color);\r\n }\r\n fill.colors = clrs.length ? clrs.join() : "0% " + fill.color;\r\n if (type == "radial") {\r\n fill.type = "gradientTitle";\r\n fill.focus = "100%";\r\n fill.focussize = "0 0";\r\n fill.focusposition = fxfy;\r\n fill.angle = 0;\r\n } else {\r\n // fill.rotate= true;\r\n fill.type = "gradient";\r\n fill.angle = (270 - angle) % 360;\r\n }\r\n o.appendChild(fill);\r\n }\r\n return 1;\r\n },\r\n Element = function (node, vml) {\r\n this[0] = this.node = node;\r\n node.raphael = true;\r\n this.id = R._oid++;\r\n node.raphaelid = this.id;\r\n this.X = 0;\r\n this.Y = 0;\r\n this.attrs = {};\r\n this.paper = vml;\r\n this.matrix = R.matrix();\r\n this._ = {\r\n transform: [],\r\n sx: 1,\r\n sy: 1,\r\n dx: 0,\r\n dy: 0,\r\n deg: 0,\r\n dirty: 1,\r\n dirtyT: 1\r\n };\r\n !vml.bottom && (vml.bottom = this);\r\n this.prev = vml.top;\r\n vml.top && (vml.top.next = this);\r\n vml.top = this;\r\n this.next = null;\r\n };\r\n var elproto = R.el;\r\n\r\n Element.prototype = elproto;\r\n elproto.constructor = Element;\r\n elproto.transform = function (tstr) {\r\n if (tstr == null) {\r\n return this._.transform;\r\n }\r\n var vbs = this.paper._viewBoxShift,\r\n vbt = vbs ? "s" + [vbs.scale, vbs.scale] + "-1-1t" + [vbs.dx, vbs.dy] : E,\r\n oldt;\r\n if (vbs) {\r\n oldt = tstr = Str(tstr).replace(/\\.{3}|\\u2026/g, this._.transform || E);\r\n }\r\n R._extractTransform(this, vbt + tstr);\r\n var matrix = this.matrix.clone(),\r\n skew = this.skew,\r\n o = this.node,\r\n split,\r\n isGrad = ~Str(this.attrs.fill).indexOf("-"),\r\n isPatt = !Str(this.attrs.fill).indexOf("url(");\r\n matrix.translate(1, 1);\r\n if (isPatt || isGrad || this.type == "image") {\r\n skew.matrix = "1 0 0 1";\r\n skew.offset = "0 0";\r\n split = matrix.split();\r\n if ((isGrad && split.noRotation) || !split.isSimple) {\r\n o.style.filter = matrix.toFilter();\r\n var bb = this.getBBox(),\r\n bbt = this.getBBox(1),\r\n dx = bb.x - bbt.x,\r\n dy = bb.y - bbt.y;\r\n o.coordorigin = (dx * -zoom) + S + (dy * -zoom);\r\n setCoords(this, 1, 1, dx, dy, 0);\r\n } else {\r\n o.style.filter = E;\r\n setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate);\r\n }\r\n } else {\r\n o.style.filter = E;\r\n skew.matrix = Str(matrix);\r\n skew.offset = matrix.offset();\r\n }\r\n if (oldt !== null) { // empty string value is true as well\r\n this._.transform = oldt;\r\n R._extractTransform(this, oldt);\r\n }\r\n return this;\r\n };\r\n elproto.rotate = function (deg, cx, cy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (deg == null) {\r\n return;\r\n }\r\n deg = Str(deg).split(separator);\r\n if (deg.length - 1) {\r\n cx = toFloat(deg[1]);\r\n cy = toFloat(deg[2]);\r\n }\r\n deg = toFloat(deg[0]);\r\n (cy == null) && (cx = cy);\r\n if (cx == null || cy == null) {\r\n var bbox = this.getBBox(1);\r\n cx = bbox.x + bbox.width / 2;\r\n cy = bbox.y + bbox.height / 2;\r\n }\r\n this._.dirtyT = 1;\r\n this.transform(this._.transform.concat([["r", deg, cx, cy]]));\r\n return this;\r\n };\r\n elproto.translate = function (dx, dy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n dx = Str(dx).split(separator);\r\n if (dx.length - 1) {\r\n dy = toFloat(dx[1]);\r\n }\r\n dx = toFloat(dx[0]) || 0;\r\n dy = +dy || 0;\r\n if (this._.bbox) {\r\n this._.bbox.x += dx;\r\n this._.bbox.y += dy;\r\n }\r\n this.transform(this._.transform.concat([["t", dx, dy]]));\r\n return this;\r\n };\r\n elproto.scale = function (sx, sy, cx, cy) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n sx = Str(sx).split(separator);\r\n if (sx.length - 1) {\r\n sy = toFloat(sx[1]);\r\n cx = toFloat(sx[2]);\r\n cy = toFloat(sx[3]);\r\n isNaN(cx) && (cx = null);\r\n isNaN(cy) && (cy = null);\r\n }\r\n sx = toFloat(sx[0]);\r\n (sy == null) && (sy = sx);\r\n (cy == null) && (cx = cy);\r\n if (cx == null || cy == null) {\r\n var bbox = this.getBBox(1);\r\n }\r\n cx = cx == null ? bbox.x + bbox.width / 2 : cx;\r\n cy = cy == null ? bbox.y + bbox.height / 2 : cy;\r\n\r\n this.transform(this._.transform.concat([["s", sx, sy, cx, cy]]));\r\n this._.dirtyT = 1;\r\n return this;\r\n };\r\n elproto.hide = function () {\r\n !this.removed && (this.node.style.display = "none");\r\n return this;\r\n };\r\n elproto.show = function () {\r\n !this.removed && (this.node.style.display = E);\r\n return this;\r\n };\r\n // Needed to fix the vml setViewBox issues\r\n elproto.auxGetBBox = R.el.getBBox;\r\n elproto.getBBox = function(){\r\n var b = this.auxGetBBox();\r\n if (this.paper && this.paper._viewBoxShift)\r\n {\r\n var c = {};\r\n var z = 1/this.paper._viewBoxShift.scale;\r\n c.x = b.x - this.paper._viewBoxShift.dx;\r\n c.x *= z;\r\n c.y = b.y - this.paper._viewBoxShift.dy;\r\n c.y *= z;\r\n c.width = b.width * z;\r\n c.height = b.height * z;\r\n c.x2 = c.x + c.width;\r\n c.y2 = c.y + c.height;\r\n return c;\r\n }\r\n return b;\r\n };\r\n elproto._getBBox = function () {\r\n if (this.removed) {\r\n return {};\r\n }\r\n return {\r\n x: this.X + (this.bbx || 0) - this.W / 2,\r\n y: this.Y - this.H,\r\n width: this.W,\r\n height: this.H\r\n };\r\n };\r\n elproto.remove = function () {\r\n if (this.removed || !this.node.parentNode) {\r\n return;\r\n }\r\n this.paper.__set__ && this.paper.__set__.exclude(this);\r\n R.eve.unbind("raphael.*.*." + this.id);\r\n R._tear(this, this.paper);\r\n this.node.parentNode.removeChild(this.node);\r\n this.shape && this.shape.parentNode.removeChild(this.shape);\r\n for (var i in this) {\r\n this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;\r\n }\r\n this.removed = true;\r\n };\r\n elproto.attr = function (name, value) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (name == null) {\r\n var res = {};\r\n for (var a in this.attrs) if (this.attrs[has](a)) {\r\n res[a] = this.attrs[a];\r\n }\r\n res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient;\r\n res.transform = this._.transform;\r\n return res;\r\n }\r\n if (value == null && R.is(name, "string")) {\r\n if (name == fillString && this.attrs.fill == "none" && this.attrs.gradient) {\r\n return this.attrs.gradient;\r\n }\r\n var names = name.split(separator),\r\n out = {};\r\n for (var i = 0, ii = names.length; i < ii; i++) {\r\n name = names[i];\r\n if (name in this.attrs) {\r\n out[name] = this.attrs[name];\r\n } else if (R.is(this.paper.customAttributes[name], "function")) {\r\n out[name] = this.paper.customAttributes[name].def;\r\n } else {\r\n out[name] = R._availableAttrs[name];\r\n }\r\n }\r\n return ii - 1 ? out : out[names[0]];\r\n }\r\n if (this.attrs && value == null && R.is(name, "array")) {\r\n out = {};\r\n for (i = 0, ii = name.length; i < ii; i++) {\r\n out[name[i]] = this.attr(name[i]);\r\n }\r\n return out;\r\n }\r\n var params;\r\n if (value != null) {\r\n params = {};\r\n params[name] = value;\r\n }\r\n value == null && R.is(name, "object") && (params = name);\r\n for (var key in params) {\r\n eve("raphael.attr." + key + "." + this.id, this, params[key]);\r\n }\r\n if (params) {\r\n for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) {\r\n var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));\r\n this.attrs[key] = params[key];\r\n for (var subkey in par) if (par[has](subkey)) {\r\n params[subkey] = par[subkey];\r\n }\r\n }\r\n // this.paper.canvas.style.display = "none";\r\n if (params.text && this.type == "text") {\r\n this.textpath.string = params.text;\r\n }\r\n setFillAndStroke(this, params);\r\n // this.paper.canvas.style.display = E;\r\n }\r\n return this;\r\n };\r\n elproto.toFront = function () {\r\n !this.removed && this.node.parentNode.appendChild(this.node);\r\n this.paper && this.paper.top != this && R._tofront(this, this.paper);\r\n return this;\r\n };\r\n elproto.toBack = function () {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (this.node.parentNode.firstChild != this.node) {\r\n this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild);\r\n R._toback(this, this.paper);\r\n }\r\n return this;\r\n };\r\n elproto.insertAfter = function (element) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (element.constructor == R.st.constructor) {\r\n element = element[element.length - 1];\r\n }\r\n if (element.node.nextSibling) {\r\n element.node.parentNode.insertBefore(this.node, element.node.nextSibling);\r\n } else {\r\n element.node.parentNode.appendChild(this.node);\r\n }\r\n R._insertafter(this, element, this.paper);\r\n return this;\r\n };\r\n elproto.insertBefore = function (element) {\r\n if (this.removed) {\r\n return this;\r\n }\r\n if (element.constructor == R.st.constructor) {\r\n element = element[0];\r\n }\r\n element.node.parentNode.insertBefore(this.node, element.node);\r\n R._insertbefore(this, element, this.paper);\r\n return this;\r\n };\r\n elproto.blur = function (size) {\r\n var s = this.node.runtimeStyle,\r\n f = s.filter;\r\n f = f.replace(blurregexp, E);\r\n if (+size !== 0) {\r\n this.attrs.blur = size;\r\n s.filter = f + S + ms + ".Blur(pixelradius=" + (+size || 1.5) + ")";\r\n s.margin = R.format("-{0}px 0 0 -{0}px", round(+size || 1.5));\r\n } else {\r\n s.filter = f;\r\n s.margin = 0;\r\n delete this.attrs.blur;\r\n }\r\n return this;\r\n };\r\n\r\n R._engine.path = function (pathString, vml) {\r\n var el = createNode("shape");\r\n el.style.cssText = cssDot;\r\n el.coordsize = zoom + S + zoom;\r\n el.coordorigin = vml.coordorigin;\r\n var p = new Element(el, vml),\r\n attr = {fill: "none", stroke: "#000"};\r\n pathString && (attr.path = pathString);\r\n p.type = "path";\r\n p.path = [];\r\n p.Path = E;\r\n setFillAndStroke(p, attr);\r\n vml.canvas.appendChild(el);\r\n var skew = createNode("skew");\r\n skew.on = true;\r\n el.appendChild(skew);\r\n p.skew = skew;\r\n p.transform(E);\r\n return p;\r\n };\r\n R._engine.rect = function (vml, x, y, w, h, r) {\r\n var path = R._rectPath(x, y, w, h, r),\r\n res = vml.path(path),\r\n a = res.attrs;\r\n res.X = a.x = x;\r\n res.Y = a.y = y;\r\n res.W = a.width = w;\r\n res.H = a.height = h;\r\n a.r = r;\r\n a.path = path;\r\n res.type = "rect";\r\n return res;\r\n };\r\n R._engine.ellipse = function (vml, x, y, rx, ry) {\r\n var res = vml.path(),\r\n a = res.attrs;\r\n res.X = x - rx;\r\n res.Y = y - ry;\r\n res.W = rx * 2;\r\n res.H = ry * 2;\r\n res.type = "ellipse";\r\n setFillAndStroke(res, {\r\n cx: x,\r\n cy: y,\r\n rx: rx,\r\n ry: ry\r\n });\r\n return res;\r\n };\r\n R._engine.circle = function (vml, x, y, r) {\r\n var res = vml.path(),\r\n a = res.attrs;\r\n res.X = x - r;\r\n res.Y = y - r;\r\n res.W = res.H = r * 2;\r\n res.type = "circle";\r\n setFillAndStroke(res, {\r\n cx: x,\r\n cy: y,\r\n r: r\r\n });\r\n return res;\r\n };\r\n R._engine.image = function (vml, src, x, y, w, h) {\r\n var path = R._rectPath(x, y, w, h),\r\n res = vml.path(path).attr({stroke: "none"}),\r\n a = res.attrs,\r\n node = res.node,\r\n fill = node.getElementsByTagName(fillString)[0];\r\n a.src = src;\r\n res.X = a.x = x;\r\n res.Y = a.y = y;\r\n res.W = a.width = w;\r\n res.H = a.height = h;\r\n a.path = path;\r\n res.type = "image";\r\n fill.parentNode == node && node.removeChild(fill);\r\n fill.rotate = true;\r\n fill.src = src;\r\n fill.type = "tile";\r\n res._.fillpos = [x, y];\r\n res._.fillsize = [w, h];\r\n node.appendChild(fill);\r\n setCoords(res, 1, 1, 0, 0, 0);\r\n return res;\r\n };\r\n R._engine.text = function (vml, x, y, text) {\r\n var el = createNode("shape"),\r\n path = createNode("path"),\r\n o = createNode("textpath");\r\n x = x || 0;\r\n y = y || 0;\r\n text = text || "";\r\n path.v = R.format("m{0},{1}l{2},{1}", round(x * zoom), round(y * zoom), round(x * zoom) + 1);\r\n path.textpathok = true;\r\n o.string = Str(text);\r\n o.on = true;\r\n el.style.cssText = cssDot;\r\n el.coordsize = zoom + S + zoom;\r\n el.coordorigin = "0 0";\r\n var p = new Element(el, vml),\r\n attr = {\r\n fill: "#000",\r\n stroke: "none",\r\n font: R._availableAttrs.font,\r\n text: text\r\n };\r\n p.shape = el;\r\n p.path = path;\r\n p.textpath = o;\r\n p.type = "text";\r\n p.attrs.text = Str(text);\r\n p.attrs.x = x;\r\n p.attrs.y = y;\r\n p.attrs.w = 1;\r\n p.attrs.h = 1;\r\n setFillAndStroke(p, attr);\r\n el.appendChild(o);\r\n el.appendChild(path);\r\n vml.canvas.appendChild(el);\r\n var skew = createNode("skew");\r\n skew.on = true;\r\n el.appendChild(skew);\r\n p.skew = skew;\r\n p.transform(E);\r\n return p;\r\n };\r\n R._engine.setSize = function (width, height) {\r\n var cs = this.canvas.style;\r\n this.width = width;\r\n this.height = height;\r\n width == +width && (width += "px");\r\n height == +height && (height += "px");\r\n cs.width = width;\r\n cs.height = height;\r\n cs.clip = "rect(0 " + width + " " + height + " 0)";\r\n if (this._viewBox) {\r\n R._engine.setViewBox.apply(this, this._viewBox);\r\n }\r\n return this;\r\n };\r\n R._engine.setViewBox = function (x, y, w, h, fit) {\r\n R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);\r\n var paperSize = this.getSize(),\r\n width = paperSize.width,\r\n height = paperSize.height,\r\n H, W;\r\n if (fit) {\r\n H = height / h;\r\n W = width / w;\r\n if (w * H < width) {\r\n x -= (width - w * H) / 2 / H;\r\n }\r\n if (h * W < height) {\r\n y -= (height - h * W) / 2 / W;\r\n }\r\n }\r\n this._viewBox = [x, y, w, h, !!fit];\r\n this._viewBoxShift = {\r\n dx: -x,\r\n dy: -y,\r\n scale: paperSize\r\n };\r\n this.forEach(function (el) {\r\n el.transform("...");\r\n });\r\n return this;\r\n };\r\n var createNode;\r\n R._engine.initWin = function (win) {\r\n var doc = win.document;\r\n if (doc.styleSheets.length < 31) {\r\n doc.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)");\r\n } else {\r\n // no more room, add to the existing one\r\n // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx\r\n doc.styleSheets[0].addRule(".rvml", "behavior:url(#default#VML)");\r\n }\r\n try {\r\n !doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml");\r\n createNode = function (tagName) {\r\n return doc.createElement(\'<rvml:\' + tagName + \' class="rvml">\');\r\n };\r\n } catch (e) {\r\n createNode = function (tagName) {\r\n return doc.createElement(\'<\' + tagName + \' xmlns="urn:schemas-microsoft.com:vml" class="rvml">\');\r\n };\r\n }\r\n };\r\n R._engine.initWin(R._g.win);\r\n R._engine.create = function () {\r\n var con = R._getContainer.apply(0, arguments),\r\n container = con.container,\r\n height = con.height,\r\n s,\r\n width = con.width,\r\n x = con.x,\r\n y = con.y;\r\n if (!container) {\r\n throw new Error("VML container not found.");\r\n }\r\n var res = new R._Paper,\r\n c = res.canvas = R._g.doc.createElement("div"),\r\n cs = c.style;\r\n x = x || 0;\r\n y = y || 0;\r\n width = width || 512;\r\n height = height || 342;\r\n res.width = width;\r\n res.height = height;\r\n width == +width && (width += "px");\r\n height == +height && (height += "px");\r\n res.coordsize = zoom * 1e3 + S + zoom * 1e3;\r\n res.coordorigin = "0 0";\r\n res.span = R._g.doc.createElement("span");\r\n res.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;";\r\n c.appendChild(res.span);\r\n cs.cssText = R.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", width, height);\r\n if (container == 1) {\r\n R._g.doc.body.appendChild(c);\r\n cs.left = x + "px";\r\n cs.top = y + "px";\r\n cs.position = "absolute";\r\n } else {\r\n if (container.firstChild) {\r\n container.insertBefore(c, container.firstChild);\r\n } else {\r\n container.appendChild(c);\r\n }\r\n }\r\n res.renderfix = function () {};\r\n return res;\r\n };\r\n R.prototype.clear = function () {\r\n R.eve("raphael.clear", this);\r\n this.canvas.innerHTML = E;\r\n this.span = R._g.doc.createElement("span");\r\n this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;";\r\n this.canvas.appendChild(this.span);\r\n this.bottom = this.top = null;\r\n };\r\n R.prototype.remove = function () {\r\n R.eve("raphael.remove", this);\r\n this.canvas.parentNode.removeChild(this.canvas);\r\n for (var i in this) {\r\n this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null;\r\n }\r\n return true;\r\n };\r\n\r\n var setproto = R.st;\r\n for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {\r\n setproto[method] = (function (methodname) {\r\n return function () {\r\n var arg = arguments;\r\n return this.forEach(function (el) {\r\n el[methodname].apply(el, arg);\r\n });\r\n };\r\n })(method);\r\n }\r\n}));\r\n\r\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\\r\n// │ Raphaël @VERSION - JavaScript Vector Library │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\r\n// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\\\\r\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\r\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\r\n// └────────────────────────────────────────────────────────────────────┘ \\\\\r\n\r\n(function (glob, factory) {\r\n if (typeof define === "function" && define.amd) {\r\n define("raphael", ["raphael.core", "raphael.svg", "raphael.vml"], function(Raphael) {\r\n return (glob.Raphael = factory(Raphael));\r\n });\r\n } else if (typeof exports === "object") {\r\n var raphael = require("raphael.core");\r\n\r\n require("raphael.svg");\r\n require("raphael.vml");\r\n\r\n module.exports = factory(raphael);\r\n } else {\r\n glob.Raphael = factory(glob.Raphael);\r\n }\r\n}(this, function (Raphael) {\r\n return Raphael.ninja();\r\n}));\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n/**\r\n * FRaphael\r\n * \tAn extension for Raphael.js to make it easier to work with Filter Effects\r\n *\r\n * Copyright © 2013 Chris Scott <chris.scott@factmint.com>\r\n * Delivered with and licensed under the MIT licence\r\n *\r\n */\r\n\r\n// Create the global FRaphael object\r\n(function(scope) {\r\n var\tversion = "0.0.1",\r\n license = "MIT";\r\n\r\n var\tns = "http://www.w3.org/2000/svg",\r\n idCounter = 0;\r\n\r\n var FR = {\r\n // Object prototype for a filter\r\n Filter: function(id) {\r\n if (id == undefined) {\r\n id = "filter-" + idCounter++;\r\n while(FR.filters[id] != undefined) {\r\n id = "filter-" + idCounter++;\r\n }\r\n }\r\n\r\n if (FR.filters[id] != undefined) {\r\n throw "A filter with id " + id + " already exists";\r\n }\r\n\r\n this.element = document.createElementNS(ns, "filter");\r\n this.element.setAttribute("id", id);\r\n this.element.setAttribute("x", "-25%");\r\n this.element.setAttribute("y", "-25%");\r\n this.element.setAttribute("width", "150%");\r\n this.element.setAttribute("height", "150%");\r\n\r\n this.lastFEResult = null;\r\n\r\n FR.filters[id] = this;\r\n this.id = id;\r\n },\r\n\r\n // Object prototype for an effect\r\n FilterEffect: function(type, attributes) {\r\n this.element = document.createElementNS(ns, type);\r\n for (var key in attributes) {\r\n this.element.setAttribute(key, attributes[key]);\r\n }\r\n },\r\n\r\n // Return the filter applied to an element or a new filter if none are currently applied\r\n getFilter: function(element) {\r\n var filterId = element.data("filterId");\r\n var filter = null;\r\n\r\n if (filterId == undefined) {\r\n filterId = "element-filter-" + element.id;\r\n filter = element.paper.createFilter(filterId);\r\n element.filter(filterId);\r\n } else {\r\n filter = FR.filters[filterId];\r\n }\r\n\r\n return filter;\r\n },\r\n\r\n // maintain a list of filters by id\r\n filters: {}\r\n };\r\n\r\n FR.Filter.prototype = {\r\n addEffect: function(type, attributes, children) {\r\n var effect = new FR.FilterEffect(type, attributes);\r\n\r\n if (children) {\r\n if (children instanceof Array) {\r\n for (var x in children) {\r\n if (!children.hasOwnProperty(x)) continue;\r\n\r\n effect.element.appendChild(children[x].element);\r\n }\r\n } else {\r\n effect.element.appendChild(children.element);\r\n }\r\n }\r\n\r\n this.element.appendChild(effect.element);\r\n\r\n return this;\r\n },\r\n\r\n chainEffect: function(type, attributes, children) {\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n var inId;\r\n var outId;\r\n if (attributes.in == undefined) {\r\n inId = this.getLastResult();\r\n } else {\r\n inId = attributes.in;\r\n }\r\n if (attributes.result == undefined) {\r\n outId = idCounter++;\r\n } else {\r\n outId = attributes.result;\r\n }\r\n\r\n this.lastFEResult = outId;\r\n\r\n attributes.in = inId;\r\n attributes.result = outId;\r\n\r\n this.addEffect(type, attributes, children);\r\n\r\n return this;\r\n },\r\n\r\n getLastResult: function() {\r\n return (this.lastFEResult == undefined) ? "SourceGraphic" : this.lastFEResult;\r\n },\r\n\r\n merge: function(in1, in2, attributes) {\r\n var mergeNode1 = new FR.FilterEffect("feMergeNode", {\r\n in: in1\r\n });\r\n var mergeNode2 = new FR.FilterEffect("feMergeNode", {\r\n in: in2\r\n });\r\n\r\n this.chainEffect("feMerge", attributes, [mergeNode1, mergeNode2]);\r\n\r\n return this;\r\n },\r\n\r\n compose: function(in1, in2, operator, attributes) {\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n if (operator == undefined) {\r\n operator = "over";\r\n }\r\n\r\n attributes.in = in1;\r\n attributes.in2 = in2;\r\n attributes.operator = operator;\r\n\r\n this.chainEffect("feComposite", attributes);\r\n\r\n return this;\r\n },\r\n\r\n arithmeticCompose: function(in1, in2, k1, k2, k3, k4) {\r\n if (k1 == undefined) {\r\n k1 = 0;\r\n }\r\n if (k2 == undefined) {\r\n k2 = 0;\r\n }\r\n if (k3 == undefined) {\r\n k3 = 0;\r\n }\r\n if (k4 == undefined) {\r\n k4 = 0;\r\n }\r\n\r\n this.compose(in1, in2, "arithmetic", {\r\n k1: k1,\r\n k2: k2,\r\n k3: k3,\r\n k4: k4\r\n });\r\n\r\n return this;\r\n },\r\n\r\n addBlur: function(stdDeviation, attributes) {\r\n if (!stdDeviation) {\r\n throw "Standard deviation is required to perform a blur filter";\r\n }\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n attributes.stdDeviation = stdDeviation;\r\n\r\n this.chainEffect("feGaussianBlur", attributes);\r\n\r\n return this;\r\n },\r\n\r\n addOffset: function(dx, dy, attributes) {\r\n if (dx == undefined | dy == undefined) {\r\n throw "dx and dy values are required to perform an offset FE";\r\n }\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n attributes.dx = dx;\r\n attributes.dy = dy;\r\n\r\n this.chainEffect("feOffset", attributes);\r\n\r\n return this;\r\n },\r\n\r\n addLighting: function(x, y, z, color, type, attributes) {\r\n if (x == undefined | y == undefined | z == undefined) {\r\n throw "Three co-ordinates are required to create a light source";\r\n }\r\n\r\n var previousResult = this.getLastResult();\r\n\r\n var id = idCounter++;\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n attributes.result = id;\r\n if (color != undefined) {\r\n attributes["lighting-color"] = color;\r\n }\r\n\r\n if (type == undefined || type == "diffuse") {\r\n type = "feDiffuseLighting";\r\n } else if (type == "specular") {\r\n type = "feSpecularLighting";\r\n }\r\n\r\n var lightSource = new FR.FilterEffect("fePointLight", {\r\n x: x,\r\n y: y,\r\n z: z\r\n });\r\n\r\n this.chainEffect(type, attributes, lightSource).arithmeticCompose(previousResult, id, 3, 0.2, 0, 0);\r\n\r\n return this;\r\n },\r\n\r\n addShiftToColor: function(color, moveBy, attributes) {\r\n if (color == undefined) {\r\n throw "A colour string is a required argument to create a colorMatrix";\r\n }\r\n if (moveBy == undefined) {\r\n moveBy = 0.5;\r\n }\r\n\r\n var remainingColor = 1 - moveBy, x = remainingColor;\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n var colorObject = Raphael.color(color);\r\n var\tr = colorObject.r * moveBy / 255,\r\n g = colorObject.g * moveBy / 255,\r\n b = colorObject.b * moveBy / 255;\r\n\r\n /**\r\n * r\'\tx 0 0 0 r\t\tr\r\n * g\'\t0 x 0 0 g\t\tg\r\n * b\' =\t0 0 x 0 b\t.\tb\r\n * a\'\t0 0 0 1 0\t\to\r\n * 1\t\t\t\t\t1\r\n */\r\n attributes.values = x + " 0 0 0 " + r + " 0 " + x + " 0 0 " + g + " 0 0 " + x + " 0 " + b + " 0 0 0 1 0 ";\r\n\r\n this.chainEffect("feColorMatrix", attributes);\r\n\r\n return this;\r\n },\r\n\r\n addRecolor: function(color, opacity, attributes) {\r\n if (color == undefined) {\r\n throw "A colour string is a required argument to create a colorMatrix";\r\n }\r\n if (opacity == undefined) {\r\n opacity = 1;\r\n }\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n var colorObject = Raphael.color(color);\r\n var\tr = colorObject.r / 255,\r\n g = colorObject.g / 255,\r\n b = colorObject.b / 255;\r\n\r\n /**\r\n * r\'\t0 0 0 0 r\t\tr\r\n * g\'\t0 0 0 0 g\t\tg\r\n * b\' =\t0 0 0 0 b\t.\tb\r\n * a\'\t0 0 0 a 0\t\ta\r\n * 1\t\t\t\t\t1\r\n */\r\n attributes.values = "0 0 0 0 " + r + " 0 0 0 0 " + g + " 0 0 0 0 " + b + " 0 0 0 " + opacity + " 0 ";\r\n\r\n this.chainEffect("feColorMatrix", attributes);\r\n\r\n return this;\r\n },\r\n\r\n addDesaturate: function(saturation, attributes) {\r\n if (saturation == undefined) {\r\n saturnation = 0;\r\n }\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n attributes.values = saturation;\r\n attributes.type = "saturate";\r\n\r\n this.chainEffect("feColorMatrix", attributes);\r\n\r\n return this;\r\n },\r\n\r\n addConvolveMatrix: function(matrix, attributes) {\r\n if (matrix == undefined) {\r\n throw "A matrix (usually 9 numbers) must be provided to apply a convolve matrix transform";\r\n }\r\n\r\n if (attributes == undefined) {\r\n attributes = {};\r\n }\r\n\r\n attributes.kernelMatrix = matrix;\r\n\r\n this.chainEffect("feConvolveMatrix", attributes);\r\n\r\n return this;\r\n },\r\n\r\n createShadow: function(dx, dy, blur, opacity, color) {\r\n if (dx == undefined) {\r\n throw "dx is required for the shadow effect";\r\n }\r\n if (dy == undefined) {\r\n throw "dy is required for the shadow effect";\r\n }\r\n if (blur == undefined) {\r\n throw "blur (stdDeviation) is required for the shadow effect";\r\n }\r\n\r\n if (opacity == undefined) {\r\n opacity = 0.6;\r\n }\r\n\r\n var previousResult = this.getLastResult();\r\n\r\n if (color == undefined) {\r\n color = "#000000";\r\n }\r\n\r\n this.addOffset(dx, dy, {\r\n in: "SourceAlpha"\r\n });\r\n\r\n this.addRecolor(color, opacity);\r\n\r\n this.addBlur(blur);\r\n\r\n this.merge(this.getLastResult(), previousResult);\r\n\r\n return this;\r\n },\r\n\r\n createEmboss: function(height, x, y, z) {\r\n if (height == undefined) {\r\n height = 2;\r\n }\r\n if (x == undefined) {\r\n x = -1000;\r\n }\r\n if (y == undefined) {\r\n y = -5000;\r\n }\r\n if (z == undefined) {\r\n z = 300;\r\n }\r\n\r\n // Create the highlight\r\n\r\n this.addOffset(height * x / (x + y), height * y / (x + y), {\r\n in: "SourceAlpha"\r\n });\r\n\r\n this.addBlur(height * 0.5);\r\n\r\n var whiteLightSource = new FR.FilterEffect("fePointLight", {\r\n x: x,\r\n y: y,\r\n z: z\r\n });\r\n\r\n this.chainEffect("feSpecularLighting", {\r\n surfaceScale: height,\r\n specularConstant: 0.8,\r\n specularExponent: 15\r\n }, whiteLightSource);\r\n\r\n this.compose(this.getLastResult(), "SourceAlpha", "in");\r\n var whiteLight = this.getLastResult();\r\n\r\n // Create the lowlight\r\n\r\n this.addOffset(height * -1 * x / (x + y), height * -1 * y / (x + y), {\r\n in: "SourceAlpha"\r\n });\r\n\r\n this.addBlur(height * 0.5);\r\n\r\n var darkLightSource = new FR.FilterEffect("fePointLight", {\r\n x: -1 * x,\r\n y: -1 * y,\r\n z: z\r\n });\r\n\r\n this.chainEffect("feSpecularLighting", {\r\n surfaceScale: height,\r\n specularConstant: 1.8,\r\n specularExponent: 6\r\n }, darkLightSource);\r\n\r\n this.compose(this.getLastResult(), "SourceAlpha", "in");\r\n this.chainEffect("feColorMatrix", {\r\n values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0"\r\n });\r\n var darkLight = this.getLastResult();\r\n\r\n this.arithmeticCompose(whiteLight, darkLight, 0, 0.8, 0.5, 0);\r\n\r\n this.merge("SourceGraphic", this.getLastResult());\r\n\r\n return this;\r\n }\r\n };\r\n\r\n scope.FRaphael = FR;\r\n})(this);\r\n\r\n/**\r\n * add a filter to the paper by id\r\n */\r\nRaphael.fn.createFilter = function(id) {\r\n var paper = this;\r\n var filter = new FRaphael.Filter(id);\r\n paper.defs.appendChild(filter.element);\r\n\r\n return filter;\r\n};\r\n\r\n/**\r\n * Apply a filter to an element by id\r\n */\r\nRaphael.el.filter = function(filter) {\r\n var id = (filter instanceof FRaphael.Filter) ? filter.id : filter;\r\n\r\n this.node.setAttribute("filter", "url(#" + id + ")");\r\n this.data("filterId", id);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * Get the current filter for an element or a new one if not\r\n */\r\nRaphael.el.getFilter = function() {\r\n return FRaphael.getFilter(this);\r\n};\r\n\r\n/**\r\n * A shorthand method for applying blur\r\n */\r\nRaphael.el.blur = function(stdDeviation) {\r\n if (stdDeviation == undefined) {\r\n stdDeviation = 3;\r\n }\r\n\r\n this.getFilter().addBlur(stdDeviation);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for applying a drop shadow\r\n */\r\nRaphael.el.shadow = function(dx, dy, blur, opacity, color) {\r\n if (dx == undefined) {\r\n dx = 3;\r\n }\r\n if (dy == undefined) {\r\n dy = 3;\r\n }\r\n if (blur == undefined) {\r\n blur = 3;\r\n }\r\n\r\n this.getFilter().createShadow(dx, dy, blur, opacity, color);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for applying lighting\r\n */\r\nRaphael.el.light = function(x, y, z, color, type) {\r\n if (x == undefined) {\r\n x = this.paper.width;\r\n }\r\n if (y == undefined) {\r\n y = 0;\r\n }\r\n if (z == undefined) {\r\n z = 20;\r\n }\r\n\r\n this.getFilter().addLighting(x, y, z, color, type);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for applying a colour shift\r\n */\r\nRaphael.el.colorShift = function(color, shift) {\r\n if (color == undefined) {\r\n color = "black";\r\n }\r\n if (shift == undefined) {\r\n shift = 0.5;\r\n }\r\n\r\n this.getFilter().addShiftToColor(color, shift);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for embossing\r\n */\r\nRaphael.el.emboss = function(height) {\r\n this.getFilter().createEmboss(height);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for desaturating\r\n */\r\nRaphael.el.desaturate = function(saturation) {\r\n this.getFilter().addDesaturate(saturation);\r\n\r\n return this;\r\n};\r\n\r\n/**\r\n * A shorthand method for complete desaturation\r\n */\r\nRaphael.el.greyScale = function() {\r\n this.getFilter().addDesaturate(0);\r\n\r\n return this;\r\n};\r\n'},"./node_modules/rgbcolor/index.js":t=>{t.exports=function(t){this.ok=!1,this.alpha=1,"#"==t.charAt(0)&&(t=t.substr(1,6)),t=(t=t.replace(/ /g,"")).toLowerCase();var e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"};t=e[t]||t;for(var n=[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3]),parseFloat(t[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(t){return[parseInt(t[1]),parseInt(t[2]),parseInt(t[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(t){return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(t){return[parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16),parseInt(t[3]+t[3],16)]}}],r=0;r<n.length;r++){var i=n[r].re,s=n[r].process,a=i.exec(t);if(a){var o=s(a);this.r=o[0],this.g=o[1],this.b=o[2],o.length>3&&(this.alpha=o[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var t=this.r.toString(16),e=this.g.toString(16),n=this.b.toString(16);return 1==t.length&&(t="0"+t),1==e.length&&(e="0"+e),1==n.length&&(n="0"+n),"#"+t+e+n},this.getHelpXML=function(){for(var t=new Array,r=0;r<n.length;r++)for(var i=n[r].example,s=0;s<i.length;s++)t[t.length]=i[s];for(var a in e)t[t.length]=a;var o=document.createElement("ul");o.setAttribute("id","rgbcolor-examples");for(r=0;r<t.length;r++)try{var c=document.createElement("li"),l=new RGBColor(t[r]),h=document.createElement("div");h.style.cssText="margin: 3px; border: 1px solid black; background:"+l.toHex()+"; color:"+l.toHex(),h.appendChild(document.createTextNode("test"));var u=document.createTextNode(" "+t[r]+" -> "+l.toRGB()+" -> "+l.toHex());c.appendChild(h),c.appendChild(u),o.appendChild(c)}catch(t){}return o}}},"./node_modules/script-loader/addScript.js":t=>{t.exports=function(t){function e(t){"undefined"!=typeof console&&(console.error||console.log)("[Script Loader]",t)}try{"undefined"!=typeof execScript&&"undefined"!=typeof attachEvent&&"undefined"==typeof addEventListener?execScript(t):"undefined"!=typeof eval?eval.call(null,t):e("EvalError: No eval function available")}catch(t){e(t)}}},"./node_modules/shifty/dist/shifty.js":t=>{self,t.exports=function(){"use strict";var t={55:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.setBezierFunction=e.getCubicBezierTransition=void 0;const r=n(188);e.getCubicBezierTransition=(t=.25,e=.25,n=.75,r=.75)=>i=>function(t,e,n,r,i){let s=0,a=0,o=0,c=0,l=0,h=0;const u=t=>((s*t+a)*t+o)*t,d=t=>(3*s*t+2*a)*t+o,p=t=>t>=0?t:0-t;return o=3*e,a=3*(r-e)-o,s=1-o-a,h=3*n,l=3*(i-n)-h,c=1-h-l,f=t,g=(t=>1/(200*t))(1),(t=>((c*t+l)*t+h)*t)(((t,e)=>{let n,r,i,s,a,o;for(i=t,o=0;o<8;o++){if(s=u(i)-t,p(s)<e)return i;if(a=d(i),p(a)<1e-6)break;i-=s/a}if(n=0,r=1,i=t,i<n)return n;if(i>r)return r;for(;n<r;){if(s=u(i),p(s-t)<e)return i;t>s?n=i:r=i,i=.5*(r-n)+n}return i})(f,g));var f,g}(i,t,e,n,r),e.setBezierFunction=(t,n,i,s,a)=>{const o=(0,e.getCubicBezierTransition)(n,i,s,a);return o.displayName=t,o.x1=n,o.y1=i,o.x2=s,o.y2=a,r.Tweenable.easing[t]=o}},607:function(t,e,n){var r=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),i=this&&this.__exportStar||function(t,e){for(var n in t)"default"===n||Object.prototype.hasOwnProperty.call(e,n)||r(e,t,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=e.standardEasingFunctions=e.setBezierFunction=e.Scene=e.interpolate=e.tween=e.Tweenable=e.shouldScheduleUpdate=e.processTweens=void 0;const s=n(188);Object.defineProperty(e,"processTweens",{enumerable:!0,get:function(){return s.processTweens}}),Object.defineProperty(e,"shouldScheduleUpdate",{enumerable:!0,get:function(){return s.shouldScheduleUpdate}}),Object.defineProperty(e,"Tweenable",{enumerable:!0,get:function(){return s.Tweenable}}),Object.defineProperty(e,"tween",{enumerable:!0,get:function(){return s.tween}});var a=n(166);Object.defineProperty(e,"interpolate",{enumerable:!0,get:function(){return a.interpolate}});var o=n(147);Object.defineProperty(e,"Scene",{enumerable:!0,get:function(){return o.Scene}});var c=n(55);Object.defineProperty(e,"setBezierFunction",{enumerable:!0,get:function(){return c.setBezierFunction}});var l=n(64);Object.defineProperty(e,"standardEasingFunctions",{enumerable:!0,get:function(){return l.standardEasingFunctions}}),i(n(699),e),e.VERSION=String("3.0.3")},166:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.interpolate=void 0;const r=n(188),i=new r.Tweenable,{filters:s}=r.Tweenable;e.interpolate=(t,e,n,a=r.Tweenable.easing.linear,o=0)=>{const c=Object.assign({},t),l=(0,r.composeEasingObject)(t,a);i._filters.length=0,i.setState({}),i._currentState=c,i._originalState=t,i._targetState=e,i._easing=l;for(const t in s)s[t].doesApply(i)&&i._filters.push(s[t]);i._applyFilter("tweenCreated"),i._applyFilter("beforeTween");const h=(0,r.tweenProps)(n,c,t,e,1,o,l);return i._applyFilter("afterTween"),h}},147:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.Scene=void 0,e.Scene=class{constructor(...t){this._tweenables=[],t.forEach(this.add.bind(this))}get tweenables(){return[...this._tweenables]}get promises(){return this._tweenables.map((t=>t.then()))}add(t){return this._tweenables.push(t),t}remove(t){const e=this._tweenables.indexOf(t);return e>-1&&this._tweenables.splice(e,1),t}empty(){return this.tweenables.map(this.remove.bind(this))}get isPlaying(){return this._tweenables.some((({isPlaying:t})=>t))}tween(){return this._tweenables.forEach((t=>t.tween())),this}pause(){return this._tweenables.forEach((t=>t.pause())),this}resume(){return this._tweenables.filter((({hasEnded:t})=>!t)).forEach((t=>t.resume())),this}stop(t){return this._tweenables.forEach((e=>e.stop(t))),this}}},64:function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.standardEasingFunctions=void 0,e.standardEasingFunctions=Object.freeze({linear:t=>t,easeInQuad:t=>Math.pow(t,2),easeOutQuad:t=>-(Math.pow(t-1,2)-1),easeInOutQuad:t=>(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2),easeInCubic:t=>Math.pow(t,3),easeOutCubic:t=>Math.pow(t-1,3)+1,easeInOutCubic:t=>(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2),easeInQuart:t=>Math.pow(t,4),easeOutQuart:t=>-(Math.pow(t-1,4)-1),easeInOutQuart:t=>(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2),easeInQuint:t=>Math.pow(t,5),easeOutQuint:t=>Math.pow(t-1,5)+1,easeInOutQuint:t=>(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2),easeInSine:t=>1-Math.cos(t*(Math.PI/2)),easeOutSine:t=>Math.sin(t*(Math.PI/2)),easeInOutSine:t=>-.5*(Math.cos(Math.PI*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t)),easeInCirc:t=>-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-Math.pow(t-1,2)),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeOutBounce:t=>t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,easeInBack:t=>{const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack:t=>{const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack:t=>{let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},elastic:t=>-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1,swingFromTo:t=>{let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},swingFrom:t=>{const e=1.70158;return t*t*((e+1)*t-e)},swingTo:t=>{const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},bounce:t=>t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,bouncePast:t=>t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375),easeFromTo:t=>(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2),easeFrom:t=>Math.pow(t,4),easeTo:t=>Math.pow(t,.25)})},432:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.afterTween=e.beforeTween=e.tweenCreated=e.doesApply=void 0;const r=n(699),i=/(\d|-|\.)/,s=/([^\-0-9.]+)/g,a=/[0-9.-]+/g,o=(()=>{const t=a.source,e=/,\s*/.source;return new RegExp(`rgba?\\(${t}${e}${t}${e}${t}(${e}${t})?\\)`,"g")})(),c=/^.*\(/,l=/#([0-9]|[a-f]){3,6}/gi,h="VAL",u=(t,e)=>t.map(((t,n)=>`_${e}_${n}`)),d=t=>{let e=t.match(s);return e?(1===e.length||t.charAt(0).match(i))&&e.unshift(""):e=["",""],e.join(h)};function p(t){return parseInt(t,16)}const f=t=>`rgb(${(t=>{if(3===(t=t.replace(/#/,"")).length){const[e,n,r]=t.split("");t=e+e+n+n+r+r}return[p(t.substring(0,2)),p(t.substring(2,4)),p(t.substring(4,6))]})(t).join(",")})`,g=(t,e,n)=>{const r=e.match(t);let i=e.replace(t,h);return r&&r.forEach((t=>i=i.replace(h,n(t)))),i},m=t=>{for(const e in t){const n=t[e];"string"==typeof n&&n.match(l)&&(t[e]=g(l,n,f))}},y=t=>{var e,n;const r=null!==(e=t.match(a))&&void 0!==e?e:[],i=r.slice(0,3).map((t=>Math.floor(Number(t)))),s=null===(n=t.match(c))||void 0===n?void 0:n[0];if(3===r.length)return`${s}${i.join(",")})`;if(4===r.length)return`${s}${i.join(",")},${r[3]})`;throw new Error(`Invalid rgbChunk: ${t}`)},x=t=>{var e;return null!==(e=t.match(a))&&void 0!==e?e:[]},v=(t,e)=>{const n={};return e.forEach((e=>{n[e]=t[e],delete t[e]})),n},b=(t,e)=>e.map((e=>Number(t[e]))),w=(t,e)=>(e.forEach((e=>t=t.replace(h,String(+e.toFixed(4))))),t);e.doesApply=t=>{for(const e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1},e.tweenCreated=function(t){const{_currentState:e,_originalState:n,_targetState:r}=t;[e,n,r].forEach(m),t._tokenData=(t=>{var e;const n={};for(const r in t){const i=t[r];"string"==typeof i&&(n[r]={formatString:d(i),chunkNames:u(null===(e=x(i))||void 0===e?void 0:e.map(Number),r)})}return n})(e)},e.beforeTween=function(t){const{_currentState:e,_originalState:n,_targetState:i,_easing:s,_tokenData:a}=t;"function"!=typeof s&&a&&((t,e)=>{var n;for(const i in e){const{chunkNames:s}=e[i],a=t[i];if("string"==typeof a){const e=a.split(" "),i=e[e.length-1];for(let a=0;a<s.length;a++){const o=s[a],c=null!==(n=e[a])&&void 0!==n?n:i;(0,r.isEasingKey)(c)&&(t[o]=c)}}else s.forEach((e=>t[e]=a));delete t[i]}})(s,a),[e,n,i].forEach((t=>((t,e)=>{for(const n in e)x(String(t[n])).forEach(((r,i)=>t[e[n].chunkNames[i]]=+r)),delete t[n]})(t,null!=a?a:{})))},e.afterTween=function(t){const{_currentState:e,_originalState:n,_targetState:r,_easing:i,_tokenData:s}=t;[e,n,r].forEach((t=>((t,e)=>{for(const n in e){const{chunkNames:r,formatString:i}=e[n],s=w(i,b(v(t,r),r));t[n]=g(o,s,y)}})(t,null!=s?s:{}))),"function"!=typeof i&&s&&((t,e)=>{for(const n in e){const{chunkNames:r}=e[n],i=t[r[0]];t[n]="string"==typeof i?r.map((e=>{const n=t[e];return delete t[e],n})).join(" "):i}})(i,s)}},188:function(t,e,n){var r,i=this&&this.__createBinding||(Object.create?function(t,e,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(e,n);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[n]}}),Object.defineProperty(t,r,i)}:function(t,e,n,r){void 0===r&&(r=n),t[r]=e[n]}),s=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),a=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)"default"!==n&&Object.prototype.hasOwnProperty.call(t,n)&&i(e,t,n);return s(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.shouldScheduleUpdate=e.tween=e.Tweenable=e.composeEasingObject=e.scheduleUpdate=e.processTweens=e.tweenProps=e.getListTail=e.getListHead=e.resetList=void 0;const o=n(64),c=n(55),l=n(699),h=a(n(432)),u="linear",d="undefined"!=typeof window?window:n.g,p="afterTween",f="beforeTween",g="string",m="function";let y=d.requestAnimationFrame;y||(y="undefined"==typeof window?setTimeout:window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame||setTimeout);const x=()=>{};let v=null,b=null;e.resetList=()=>{v=b=null},e.getListHead=()=>v,e.getListTail=()=>b,e.tweenProps=(t,e,n,r,i,s,a)=>{var c;let l,h=0;const u=t<s?0:(t-s)/i;let d;for(const t in e){if(typeof a===m)d=a;else{const e=a[t];d=typeof e===m?e:null!==(c=A.easing[e])&&void 0!==c?c:o.standardEasingFunctions.linear}h=d(u),l=n[t],e[t]=l+(r[t]-l)*h}return e};const w=(t,n)=>{var r;let i=null!==(r=t._timestamp)&&void 0!==r?r:0;const s=t._currentState,a=t._delay;if(n<i+a)return;let o=t._duration;const c=t._targetState,l=i+a+o;let h=n>l?l:n;t._hasEnded=h>=l;const u=o-(l-h);if(t._hasEnded)return t._render(c,u,t._data),t.stop(!0);t._applyFilter(f),h<i+a?i=o=h=1:i+=a,(0,e.tweenProps)(h,s,t._originalState,c,o,i,t._easing),t._applyFilter(p),t._render(s,u,t._data)};e.processTweens=()=>{let t;const e=A.now();let n=v;for(;n;)t=n._next,w(n,e),n=t};const{now:C}=Date;let M,S=!1;e.scheduleUpdate=()=>{M=C(),S&&y.call(d,e.scheduleUpdate,16.666666666666668),(0,e.processTweens)()},e.composeEasingObject=(t,e=u,n={})=>{if(typeof e===g&&(0,l.isEasingKey)(e))return A.easing[e];if(Array.isArray(e))return(0,c.getCubicBezierTransition)(...e);if("object"==typeof n)if(typeof e===g||typeof e===m)for(const r in t)n[r]=e;else for(const r in t)n[r]=e[r]||u;return n};const _=(()=>{let t,e;return n=>{t=null,e=null,n===v?(v=n._next,v?v._previous=null:b=null):n===b?(b=n._previous,b?b._next=null:v=null):(t=n._previous,e=n._next,t&&(t._next=e),e&&(e._previous=t)),n._previous=n._next=null}})(),P=typeof Promise===m?Promise:null;class A{constructor(t={},e){this[r]="Promise",this._next=null,this._previous=null,this._config={},this._data={},this._delay=0,this._duration=500,this._filters=[],this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._originalState={},this._targetState={},this._start=x,this._render=x,this._promiseCtor=P,this._promise=null,this._isPlaying=!1,this._pausedAtTime=null,this._easing={},this._currentState=t||{},e&&this.setConfig(e)}_applyFilter(t){var e;for(let n=this._filters.length;n>0;n--){const r=this._filters[n-n];null===(e=r[t])||void 0===e||e.call(r,this)}}tween(t){return this._isPlaying&&this.stop(),!t&&this._config||this.setConfig(t),this._pausedAtTime=null,this._timestamp=A.now(),this._start(this.state,this._data),this._delay&&this._render(this._currentState,0,this._data),this._resume(this._timestamp)}setConfig(t={}){var n;const{_config:r}=this;let i;for(i in t)r[i]=t[i];const{promise:s=this._promiseCtor,start:a=x,finish:o,render:c=x}=r;this._data=r.data||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._delay=t.delay||0,this._start=a,this._render=c,this._duration=r.duration||500,this._promiseCtor=s,o&&(this._resolve=o);const{from:l,to:h={}}=t,{_currentState:u,_originalState:d,_targetState:p}=this;for(const t in l)u[t]=l[t];let f=!1;for(const t in u){const e=u[t];f||typeof e!==g||(f=!0),d[t]=e,p[t]=null!==(n=h[t])&&void 0!==n?n:e}if(this._easing=(0,e.composeEasingObject)(this._currentState,r.easing,this._easing),this._filters.length=0,f){for(const t in A.filters)A.filters[t].doesApply(this)&&this._filters.push(A.filters[t]);this._applyFilter("tweenCreated")}return this}then(t,e){if(!this._promiseCtor)throw new Error("Promise implementation is unavailable");return this._promise=new this._promiseCtor(((t,e)=>{this._resolve=t,this._reject=e})),this._promise.then(t,e)}catch(t){return this.then().catch(t)}finally(t){return this.then().finally(t)}get state(){return Object.assign({},this._currentState)}setState(t){this._currentState=t}pause(){return this._isPlaying?(this._pausedAtTime=A.now(),this._isPlaying=!1,_(this),this):this}resume(){return this._resume()}_resume(t=A.now()){return null===this._timestamp?this.tween():(this._isPlaying&&this._promise||(this._pausedAtTime&&(this._timestamp+=t-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===v?(v=this,b=this):(this._previous=b,b&&(b._next=this),b=this)),this)}seek(t){var e;t=Math.max(t,0);const n=A.now();return(null!==(e=this._timestamp)&&void 0!==e?e:0)+t===0||(this._timestamp=n-t,w(this,n)),this}stop(t=!1){var n;return this._isPlaying?(this._isPlaying=!1,_(this),t&&(this._applyFilter(f),(0,e.tweenProps)(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),this._applyFilter(p),this._applyFilter("afterTweenEnd")),null===(n=this._resolve)||void 0===n||n.call(this,{data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this):this}cancel(t=!1){var e;const{_currentState:n,_data:r,_isPlaying:i}=this;return i?(null===(e=this._reject)||void 0===e||e.call(this,{data:r,state:n,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}get isPlaying(){return this._isPlaying}get hasEnded(){return this._hasEnded}data(t=null){return t&&(this._data=Object.assign({},t)),this._data}dispose(){for(const t in this)delete this[t]}}e.Tweenable=A,r=Symbol.toStringTag,A.now=()=>M,A.setScheduleFunction=t=>y=t,A.filters={token:h},A.easing=Object.create(o.standardEasingFunctions),e.tween=function(t={}){return new A({},{}).tween(t)},e.shouldScheduleUpdate=t=>{t&&S||(S=t,t&&(0,e.scheduleUpdate)())},(0,e.shouldScheduleUpdate)(!0)},699:function(t,e,n){Object.defineProperty(e,"__esModule",{value:!0}),e.isEasingKey=void 0;const r=n(188);e.isEasingKey=t=>t in r.Tweenable.easing}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n(607)}()},"./node_modules/stackblur-canvas/dist/stackblur-es.js":(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.r(e),n.d(e,{BlurStack:()=>d,canvasRGB:()=>h,canvasRGBA:()=>c,image:()=>a,imageDataRGB:()=>u,imageDataRGBA:()=>l});var i=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],s=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function a(t,e,n,r,i,s){if("string"==typeof t&&(t=document.getElementById(t)),t&&("HTMLImageElement"!==Object.prototype.toString.call(t).slice(8,-1)||"naturalWidth"in t)){var a=i?"offset":"natural",o=t[a+"Width"],l=t[a+"Height"];if("ImageBitmap"===Object.prototype.toString.call(t).slice(8,-1)&&(o=t.width,l=t.height),"string"==typeof e&&(e=document.getElementById(e)),e&&"getContext"in e){s||(e.style.width=o+"px",e.style.height=l+"px"),e.width=o,e.height=l;var u=e.getContext("2d");u.clearRect(0,0,o,l),u.drawImage(t,0,0,t.naturalWidth,t.naturalHeight,0,0,o,l),isNaN(n)||n<1||(r?c(e,0,0,o,l,n):h(e,0,0,o,l,n))}}}function o(t,e,n,i,s){if("string"==typeof t&&(t=document.getElementById(t)),!t||"object"!==r(t)||!("getContext"in t))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");var a=t.getContext("2d");try{return a.getImageData(e,n,i,s)}catch(t){throw new Error("unable to access image data: "+t)}}function c(t,e,n,r,i,s){if(!(isNaN(s)||s<1)){s|=0;var a=o(t,e,n,r,i);a=l(a,e,n,r,i,s),t.getContext("2d").putImageData(a,e,n)}}function l(t,e,n,r,a,o){for(var c,l=t.data,h=2*o+1,u=r-1,p=a-1,f=o+1,g=f*(f+1)/2,m=new d,y=m,x=1;x<h;x++)y=y.next=new d,x===f&&(c=y);y.next=m;for(var v=null,b=null,w=0,C=0,M=i[o],S=s[o],_=0;_<a;_++){y=m;for(var P=l[C],A=l[C+1],E=l[C+2],k=l[C+3],R=0;R<f;R++)y.r=P,y.g=A,y.b=E,y.a=k,y=y.next;for(var j=0,T=0,D=0,L=0,z=f*P,N=f*A,I=f*E,B=f*k,F=g*P,V=g*A,H=g*E,O=g*k,W=1;W<f;W++){var G=C+((u<W?u:W)<<2),U=l[G],X=l[G+1],Y=l[G+2],$=l[G+3],q=f-W;F+=(y.r=U)*q,V+=(y.g=X)*q,H+=(y.b=Y)*q,O+=(y.a=$)*q,j+=U,T+=X,D+=Y,L+=$,y=y.next}v=m,b=c;for(var K=0;K<r;K++){var Z=O*M>>>S;if(l[C+3]=Z,0!==Z){var Q=255/Z;l[C]=(F*M>>>S)*Q,l[C+1]=(V*M>>>S)*Q,l[C+2]=(H*M>>>S)*Q}else l[C]=l[C+1]=l[C+2]=0;F-=z,V-=N,H-=I,O-=B,z-=v.r,N-=v.g,I-=v.b,B-=v.a;var J=K+o+1;J=w+(J<u?J:u)<<2,F+=j+=v.r=l[J],V+=T+=v.g=l[J+1],H+=D+=v.b=l[J+2],O+=L+=v.a=l[J+3],v=v.next;var tt=b,et=tt.r,nt=tt.g,rt=tt.b,it=tt.a;z+=et,N+=nt,I+=rt,B+=it,j-=et,T-=nt,D-=rt,L-=it,b=b.next,C+=4}w+=r}for(var st=0;st<r;st++){var at=l[C=st<<2],ot=l[C+1],ct=l[C+2],lt=l[C+3],ht=f*at,ut=f*ot,dt=f*ct,pt=f*lt,ft=g*at,gt=g*ot,mt=g*ct,yt=g*lt;y=m;for(var xt=0;xt<f;xt++)y.r=at,y.g=ot,y.b=ct,y.a=lt,y=y.next;for(var vt=r,bt=0,wt=0,Ct=0,Mt=0,St=1;St<=o;St++){C=vt+st<<2;var _t=f-St;ft+=(y.r=at=l[C])*_t,gt+=(y.g=ot=l[C+1])*_t,mt+=(y.b=ct=l[C+2])*_t,yt+=(y.a=lt=l[C+3])*_t,Mt+=at,bt+=ot,wt+=ct,Ct+=lt,y=y.next,St<p&&(vt+=r)}C=st,v=m,b=c;for(var Pt=0;Pt<a;Pt++){var At=C<<2;l[At+3]=lt=yt*M>>>S,lt>0?(lt=255/lt,l[At]=(ft*M>>>S)*lt,l[At+1]=(gt*M>>>S)*lt,l[At+2]=(mt*M>>>S)*lt):l[At]=l[At+1]=l[At+2]=0,ft-=ht,gt-=ut,mt-=dt,yt-=pt,ht-=v.r,ut-=v.g,dt-=v.b,pt-=v.a,At=st+((At=Pt+f)<p?At:p)*r<<2,ft+=Mt+=v.r=l[At],gt+=bt+=v.g=l[At+1],mt+=wt+=v.b=l[At+2],yt+=Ct+=v.a=l[At+3],v=v.next,ht+=at=b.r,ut+=ot=b.g,dt+=ct=b.b,pt+=lt=b.a,Mt-=at,bt-=ot,wt-=ct,Ct-=lt,b=b.next,C+=r}}return t}function h(t,e,n,r,i,s){if(!(isNaN(s)||s<1)){s|=0;var a=o(t,e,n,r,i);a=u(a,e,n,r,i,s),t.getContext("2d").putImageData(a,e,n)}}function u(t,e,n,r,a,o){for(var c,l=t.data,h=2*o+1,u=r-1,p=a-1,f=o+1,g=f*(f+1)/2,m=new d,y=m,x=1;x<h;x++)y=y.next=new d,x===f&&(c=y);y.next=m;for(var v,b,w=null,C=null,M=i[o],S=s[o],_=0,P=0,A=0;A<a;A++){var E=l[P],k=l[P+1],R=l[P+2],j=f*E,T=f*k,D=f*R,L=g*E,z=g*k,N=g*R;y=m;for(var I=0;I<f;I++)y.r=E,y.g=k,y.b=R,y=y.next;for(var B=0,F=0,V=0,H=1;H<f;H++)v=P+((u<H?u:H)<<2),L+=(y.r=E=l[v])*(b=f-H),z+=(y.g=k=l[v+1])*b,N+=(y.b=R=l[v+2])*b,B+=E,F+=k,V+=R,y=y.next;w=m,C=c;for(var O=0;O<r;O++)l[P]=L*M>>>S,l[P+1]=z*M>>>S,l[P+2]=N*M>>>S,L-=j,z-=T,N-=D,j-=w.r,T-=w.g,D-=w.b,v=_+((v=O+o+1)<u?v:u)<<2,L+=B+=w.r=l[v],z+=F+=w.g=l[v+1],N+=V+=w.b=l[v+2],w=w.next,j+=E=C.r,T+=k=C.g,D+=R=C.b,B-=E,F-=k,V-=R,C=C.next,P+=4;_+=r}for(var W=0;W<r;W++){var G=l[P=W<<2],U=l[P+1],X=l[P+2],Y=f*G,$=f*U,q=f*X,K=g*G,Z=g*U,Q=g*X;y=m;for(var J=0;J<f;J++)y.r=G,y.g=U,y.b=X,y=y.next;for(var tt=0,et=0,nt=0,rt=1,it=r;rt<=o;rt++)P=it+W<<2,K+=(y.r=G=l[P])*(b=f-rt),Z+=(y.g=U=l[P+1])*b,Q+=(y.b=X=l[P+2])*b,tt+=G,et+=U,nt+=X,y=y.next,rt<p&&(it+=r);P=W,w=m,C=c;for(var st=0;st<a;st++)l[v=P<<2]=K*M>>>S,l[v+1]=Z*M>>>S,l[v+2]=Q*M>>>S,K-=Y,Z-=$,Q-=q,Y-=w.r,$-=w.g,q-=w.b,v=W+((v=st+f)<p?v:p)*r<<2,K+=tt+=w.r=l[v],Z+=et+=w.g=l[v+1],Q+=nt+=w.b=l[v+2],w=w.next,Y+=G=C.r,$+=U=C.g,q+=X=C.b,tt-=G,et-=U,nt-=X,C=C.next,P+=r}return t}var d=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}},"./src/css/contextmenu.css":(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>y});var r=n("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=n.n(r),s=n("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),a=n.n(s),o=n("./node_modules/style-loader/dist/runtime/insertBySelector.js"),c=n.n(o),l=n("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),h=n.n(l),u=n("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),d=n.n(u),p=n("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),f=n.n(p),g=n("./node_modules/css-loader/dist/cjs.js!./src/css/contextmenu.css"),m={};m.styleTagTransform=f(),m.setAttributes=h(),m.insert=c().bind(null,"head"),m.domAPI=a(),m.insertStyleElement=d();i()(g.default,m);const y=g.default&&g.default.locals?g.default.locals:void 0},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},a=[],o=0;o<t.length;o++){var c=t[o],l=r.base?c[0]+r.base:c[0],h=s[l]||0,u="".concat(l," ").concat(h);s[l]=h+1;var d=n(u),p={css:c[1],media:c[2],sourceMap:c[3],supports:c[4],layer:c[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var f=i(p,r);r.byIndex=o,e.splice(o,0,{identifier:u,updater:f,references:1})}a.push(u)}return a}function i(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var a=0;a<s.length;a++){var o=n(s[a]);e[o].references--}for(var c=r(t,i),l=0;l<s.length;l++){var h=n(s[l]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=c}}},"./node_modules/style-loader/dist/runtime/insertBySelector.js":t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},"./node_modules/style-loader/dist/runtime/insertStyleElement.js":t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},"./node_modules/style-loader/dist/runtime/styleDomAPI.js":t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},"./node_modules/canvg/dist/index.cjs":(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n("./node_modules/raf/index.js"),i=n("./node_modules/rgbcolor/index.js"),s=n("./node_modules/svg-pathdata/lib/SVGPathData.cjs"),a=n("./node_modules/stackblur-canvas/dist/stackblur-es.js");function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=o(r),l=o(i);var h=Object.freeze({__proto__:null,offscreen:function(){let{DOMParser:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const e={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:t,createCanvas:(t,e)=>new OffscreenCanvas(t,e),async createImage(t){const e=await fetch(t),n=await e.blob();return await createImageBitmap(n)}};return void 0===globalThis.DOMParser&&void 0!==t||Reflect.deleteProperty(e,"DOMParser"),e},node:function(t){let{DOMParser:e,canvas:n,fetch:r}=t;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:r,createCanvas:n.createCanvas,createImage:n.loadImage}}});function u(t){return t.replace(/(?!\u3000)\s+/gm," ")}function d(t){return t.replace(/^[\n \t]+/,"")}function p(t){return t.replace(/[\n \t]+$/,"")}function f(t){const e=t.match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm);return e?e.map(parseFloat):[]}function g(t){const e=f(t);return[e[0]||0,e[1]||0,e[2]||0,e[3]||0,e[4]||0,e[5]||0]}const m=/^[A-Z-]+$/;function y(t){return m.test(t)?t.toLowerCase():t}function x(t){const e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(t);return e&&(e[2]||e[3]||e[4])||""}function v(t){if(!t.startsWith("rgb"))return t;let e=3;return t.replace(/\d+(\.\d+)?/g,((t,n)=>e--&&n?String(Math.round(parseFloat(t))):t))}const b=/(\[[^\]]+\])/g,w=/(#[^\s+>~.[:]+)/g,C=/(\.[^\s+>~.[:]+)/g,M=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,S=/(:[\w-]+\([^)]*\))/gi,_=/(:[^\s+>~.[:]+)/g,P=/([^\s+>~.[:]+)/g;function A(t,e){const n=e.exec(t);return n?[t.replace(e," "),n.length]:[t,0]}function E(t){const e=[0,0,0];let n=t.replace(/:not\(([^)]*)\)/g," $1 ").replace(/{[\s\S]*/gm," "),r=0;return[n,r]=A(n,b),e[1]+=r,[n,r]=A(n,w),e[0]+=r,[n,r]=A(n,C),e[1]+=r,[n,r]=A(n,M),e[2]+=r,[n,r]=A(n,S),e[1]+=r,[n,r]=A(n,_),e[1]+=r,n=n.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[n,r]=A(n,P),e[2]+=r,e.join("")}const k=1e-8;function R(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2))}function j(t,e){return(t[0]*e[0]+t[1]*e[1])/(R(t)*R(e))}function T(t,e){return(t[0]*e[1]<t[1]*e[0]?-1:1)*Math.acos(j(t,e))}function D(t){return t*t*t}function L(t){return 3*t*t*(1-t)}function z(t){return 3*t*(1-t)*(1-t)}function N(t){return(1-t)*(1-t)*(1-t)}function I(t){return t*t}function B(t){return 2*t*(1-t)}function F(t){return(1-t)*(1-t)}class V{static empty(t){return new V(t,"EMPTY","")}split(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:" ";const{document:e,name:n}=this;return u(this.getString()).trim().split(t).map((t=>new V(e,n,t)))}hasValue(t){const e=this.value;return null!==e&&""!==e&&(t||0!==e)&&void 0!==e}isString(t){const{value:e}=this,n="string"==typeof e;return n&&t?t.test(e):n}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;const t=this.getString();switch(!0){case t.endsWith("px"):case/^[0-9]+$/.test(t):return!0;default:return!1}}setValue(t){return this.value=t,this}getValue(t){return void 0===t||this.hasValue()?this.value:t}getNumber(t){if(!this.hasValue())return void 0===t?0:parseFloat(t);const{value:e}=this;let n=parseFloat(e);return this.isString(/%$/)&&(n/=100),n}getString(t){return void 0===t||this.hasValue()?void 0===this.value?"":String(this.value):String(t)}getColor(t){let e=this.getString(t);return this.isNormalizedColor||(this.isNormalizedColor=!0,e=v(e),this.value=e),e}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;const[n,r]="boolean"==typeof t?[void 0,t]:[t],{viewPort:i}=this.document.screen;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(i.computeSize("x"),i.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(i.computeSize("x"),i.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*i.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*i.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&r:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*i.computeSize(n);default:{const t=this.getNumber();return e&&t<1?t*i.computeSize(n):t}}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){const t=this.getString(),e=/#([^)'"]+)/.exec(t),n=(null==e?void 0:e[1])||t;return this.document.definitions[n]}getFillStyleDefinition(t,e){let n=this.getDefinition();if(!n)return null;if("function"==typeof n.createGradient&&"getBoundingBox"in t)return n.createGradient(this.document.ctx,t,e);if("function"==typeof n.createPattern){if(n.getHrefAttribute().hasValue()){const t=n.getAttribute("patternTransform");n=n.getHrefAttribute().getDefinition(),n&&t.hasValue()&&n.getAttribute("patternTransform",!0).setValue(t.value)}if(n)return n.createPattern(this.document.ctx,t,e)}return null}getTextBaseline(){if(!this.hasValue())return null;const t=this.getString();return V.textBaselineMapping[t]||null}addOpacity(t){let e=this.getColor();const n=e.length;let r=0;for(let t=0;t<n&&(","===e[t]&&r++,3!==r);t++);if(t.hasValue()&&this.isString()&&3!==r){const n=new l.default(e);n.ok&&(n.alpha=t.getNumber(),e=n.toRGBA())}return new V(this.document,this.name,e)}constructor(t,e,n){this.document=t,this.name=e,this.value=n,this.isNormalizedColor=!1}}V.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class H{clear(){this.viewPorts=[]}setCurrent(t,e){this.viewPorts.push({width:t,height:e})}removeCurrent(){this.viewPorts.pop()}getRoot(){const[t]=this.viewPorts;return t||O()}getCurrent(){const{viewPorts:t}=this,e=t[t.length-1];return e||O()}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(t){return"number"==typeof t?t:"x"===t?this.width:"y"===t?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}constructor(){this.viewPorts=[]}}function O(){return{width:H.DEFAULT_VIEWPORT_WIDTH,height:H.DEFAULT_VIEWPORT_HEIGHT}}H.DEFAULT_VIEWPORT_WIDTH=800,H.DEFAULT_VIEWPORT_HEIGHT=600;class W{static parse(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const[n=e,r=e]=f(t);return new W(n,r)}static parseScale(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const[n=e,r=n]=f(t);return new W(n,r)}static parsePath(t){const e=f(t),n=e.length,r=[];for(let t=0;t<n;t+=2)r.push(new W(e[t],e[t+1]));return r}angleTo(t){return Math.atan2(t.y-this.y,t.x-this.x)}applyTransform(t){const{x:e,y:n}=this,r=e*t[0]+n*t[2]+t[4],i=e*t[1]+n*t[3]+t[5];this.x=r,this.y=i}constructor(t,e){this.x=t,this.y=e}}class G{isWorking(){return this.working}start(){if(this.working)return;const{screen:t,onClick:e,onMouseMove:n}=this,r=t.ctx.canvas;r.onclick=e,r.onmousemove=n,this.working=!0}stop(){if(!this.working)return;const t=this.screen.ctx.canvas;this.working=!1,t.onclick=null,t.onmousemove=null}hasEvents(){return this.working&&this.events.length>0}runEvents(){if(!this.working)return;const{screen:t,events:e,eventElements:n}=this,{style:r}=t.ctx.canvas;let i;r&&(r.cursor=""),e.forEach(((t,e)=>{let{run:r}=t;for(i=n[e];i;)r(i),i=i.parent})),this.events=[],this.eventElements=[]}checkPath(t,e){if(!this.working||!e)return;const{events:n,eventElements:r}=this;n.forEach(((n,i)=>{let{x:s,y:a}=n;!r[i]&&e.isPointInPath&&e.isPointInPath(s,a)&&(r[i]=t)}))}checkBoundingBox(t,e){if(!this.working||!e)return;const{events:n,eventElements:r}=this;n.forEach(((n,i)=>{let{x:s,y:a}=n;!r[i]&&e.isPointInBox(s,a)&&(r[i]=t)}))}mapXY(t,e){const{window:n,ctx:r}=this.screen,i=new W(t,e);let s=r.canvas;for(;s;)i.x-=s.offsetLeft,i.y-=s.offsetTop,s=s.offsetParent;return(null==n?void 0:n.scrollX)&&(i.x+=n.scrollX),(null==n?void 0:n.scrollY)&&(i.y+=n.scrollY),i}onClick(t){const{x:e,y:n}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onclick",x:e,y:n,run(t){t.onClick&&t.onClick()}})}onMouseMove(t){const{x:e,y:n}=this.mapXY(t.clientX,t.clientY);this.events.push({type:"onmousemove",x:e,y:n,run(t){t.onMouseMove&&t.onMouseMove()}})}constructor(t){this.screen=t,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}}const U="undefined"!=typeof window?window:null,X="undefined"!=typeof fetch?fetch.bind(void 0):void 0;class Y{wait(t){this.waits.push(t)}ready(){return this.readyPromise?this.readyPromise:Promise.resolve()}isReady(){if(this.isReadyLock)return!0;const t=this.waits.every((t=>t()));return t&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=t,t}setDefaults(t){t.strokeStyle="rgba(0,0,0,0)",t.lineCap="butt",t.lineJoin="miter",t.miterLimit=4}setViewBox(t){let{document:e,ctx:n,aspectRatio:r,width:i,desiredWidth:s,height:a,desiredHeight:o,minX:c=0,minY:l=0,refX:h,refY:d,clip:p=!1,clipX:f=0,clipY:g=0}=t;const m=u(r).replace(/^defer\s/,""),[y,x]=m.split(" "),v=y||"xMidYMid",b=x||"meet",w=i/s,C=a/o,M=Math.min(w,C),S=Math.max(w,C);let _=s,P=o;"meet"===b&&(_*=M,P*=M),"slice"===b&&(_*=S,P*=S);const A=new V(e,"refX",h),E=new V(e,"refY",d),k=A.hasValue()&&E.hasValue();if(k&&n.translate(-M*A.getPixels("x"),-M*E.getPixels("y")),p){const t=M*f,e=M*g;n.beginPath(),n.moveTo(t,e),n.lineTo(i,e),n.lineTo(i,a),n.lineTo(t,a),n.closePath(),n.clip()}if(!k){const t="meet"===b&&M===C,e="slice"===b&&S===C,r="meet"===b&&M===w,s="slice"===b&&S===w;v.startsWith("xMid")&&(t||e)&&n.translate(i/2-_/2,0),v.endsWith("YMid")&&(r||s)&&n.translate(0,a/2-P/2),v.startsWith("xMax")&&(t||e)&&n.translate(i-_,0),v.endsWith("YMax")&&(r||s)&&n.translate(0,a-P)}switch(!0){case"none"===v:n.scale(w,C);break;case"meet"===b:n.scale(M,M);break;case"slice"===b:n.scale(S,S)}n.translate(-c,-l)}start(t){let{enableRedraw:e=!1,ignoreMouse:n=!1,ignoreAnimation:r=!1,ignoreDimensions:i=!1,ignoreClear:s=!1,forceRedraw:a,scaleWidth:o,scaleHeight:l,offsetX:h,offsetY:u}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{mouse:d}=this,p=1e3/Y.FRAMERATE;if(this.isReadyLock=!1,this.frameDuration=p,this.readyPromise=new Promise((t=>{this.resolveReady=t})),this.isReady()&&this.render(t,i,s,o,l,h,u),!e)return;let f=Date.now(),g=f,m=0;const y=()=>{f=Date.now(),m=f-g,m>=p&&(g=f-m%p,this.shouldUpdate(r,a)&&(this.render(t,i,s,o,l,h,u),d.runEvents())),this.intervalId=c.default(y)};n||d.start(),this.intervalId=c.default(y)}stop(){this.intervalId&&(c.default.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(t,e){if(!t){const{frameDuration:t}=this;if(this.animations.reduce(((e,n)=>n.update(t)||e),!1))return!0}return!("function"!=typeof e||!e())||(!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents())}render(t,e,n,r,i,s,a){const{viewPort:o,ctx:c,isFirstRender:l}=this,h=c.canvas;o.clear(),h.width&&h.height&&o.setCurrent(h.width,h.height);const u=t.getStyle("width"),d=t.getStyle("height");!e&&(l||"number"!=typeof r&&"number"!=typeof i)&&(u.hasValue()&&(h.width=u.getPixels("x"),h.style&&(h.style.width="".concat(h.width,"px"))),d.hasValue()&&(h.height=d.getPixels("y"),h.style&&(h.style.height="".concat(h.height,"px"))));let p=h.clientWidth||h.width,g=h.clientHeight||h.height;if(e&&u.hasValue()&&d.hasValue()&&(p=u.getPixels("x"),g=d.getPixels("y")),o.setCurrent(p,g),"number"==typeof s&&t.getAttribute("x",!0).setValue(s),"number"==typeof a&&t.getAttribute("y",!0).setValue(a),"number"==typeof r||"number"==typeof i){const e=f(t.getAttribute("viewBox").getString());let n=0,s=0;if("number"==typeof r){const i=t.getStyle("width");i.hasValue()?n=i.getPixels("x")/r:e[2]&&!isNaN(e[2])&&(n=e[2]/r)}if("number"==typeof i){const n=t.getStyle("height");n.hasValue()?s=n.getPixels("y")/i:e[3]&&!isNaN(e[3])&&(s=e[3]/i)}n||(n=s),s||(s=n),t.getAttribute("width",!0).setValue(r),t.getAttribute("height",!0).setValue(i);const a=t.getStyle("transform",!0,!0);a.setValue("".concat(a.getString()," scale(").concat(1/n,", ").concat(1/s,")"))}n||c.clearRect(0,0,p,g),t.render(c),l&&(this.isFirstRender=!1)}constructor(t,{fetch:e=X,window:n=U}={}){if(this.ctx=t,this.viewPort=new H,this.mouse=new G(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=n,!e)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");this.fetch=e}}Y.defaultWindow=U,Y.defaultFetch=X,Y.FRAMERATE=30,Y.MAX_VIRTUAL_PIXELS=3e4;const{defaultFetch:$}=Y,q="undefined"!=typeof DOMParser?DOMParser:void 0;class K{async parse(t){return t.startsWith("<")?this.parseFromString(t):this.load(t)}parseFromString(t){const e=new this.DOMParser;try{return this.checkDocument(e.parseFromString(t,"image/svg+xml"))}catch(n){return this.checkDocument(e.parseFromString(t,"text/xml"))}}checkDocument(t){const e=t.getElementsByTagName("parsererror")[0];if(e)throw new Error(e.textContent||"Unknown parse error");return t}async load(t){const e=await this.fetch(t),n=await e.text();return this.parseFromString(n)}constructor({fetch:t=$,DOMParser:e=q}={}){if(!t)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");if(!e)throw new Error("Can't find 'DOMParser' in 'globalThis', please provide it via options");this.fetch=t,this.DOMParser=e}}class Z{apply(t){const{x:e,y:n}=this.point;t.translate(e||0,n||0)}unapply(t){const{x:e,y:n}=this.point;t.translate(-1*e||0,-1*n||0)}applyToPoint(t){const{x:e,y:n}=this.point;t.applyTransform([1,0,0,1,e||0,n||0])}constructor(t,e){this.type="translate",this.point=W.parse(e)}}class Q{apply(t){const{cx:e,cy:n,originX:r,originY:i,angle:s}=this,a=e+r.getPixels("x"),o=n+i.getPixels("y");t.translate(a,o),t.rotate(s.getRadians()),t.translate(-a,-o)}unapply(t){const{cx:e,cy:n,originX:r,originY:i,angle:s}=this,a=e+r.getPixels("x"),o=n+i.getPixels("y");t.translate(a,o),t.rotate(-1*s.getRadians()),t.translate(-a,-o)}applyToPoint(t){const{cx:e,cy:n,angle:r}=this,i=r.getRadians();t.applyTransform([1,0,0,1,e||0,n||0]),t.applyTransform([Math.cos(i),Math.sin(i),-Math.sin(i),Math.cos(i),0,0]),t.applyTransform([1,0,0,1,-e||0,-n||0])}constructor(t,e,n){this.type="rotate";const r=f(e);this.angle=new V(t,"angle",r[0]),this.originX=n[0],this.originY=n[1],this.cx=r[1]||0,this.cy=r[2]||0}}class J{apply(t){const{scale:{x:e,y:n},originX:r,originY:i}=this,s=r.getPixels("x"),a=i.getPixels("y");t.translate(s,a),t.scale(e,n||e),t.translate(-s,-a)}unapply(t){const{scale:{x:e,y:n},originX:r,originY:i}=this,s=r.getPixels("x"),a=i.getPixels("y");t.translate(s,a),t.scale(1/e,1/n||e),t.translate(-s,-a)}applyToPoint(t){const{x:e,y:n}=this.scale;t.applyTransform([e||0,0,0,n||0,0,0])}constructor(t,e,n){this.type="scale";const r=W.parseScale(e);0!==r.x&&0!==r.y||(r.x=k,r.y=k),this.scale=r,this.originX=n[0],this.originY=n[1]}}class tt{apply(t){const{originX:e,originY:n,matrix:r}=this,i=e.getPixels("x"),s=n.getPixels("y");t.translate(i,s),t.transform(r[0],r[1],r[2],r[3],r[4],r[5]),t.translate(-i,-s)}unapply(t){const{originX:e,originY:n,matrix:r}=this,i=r[0],s=r[2],a=r[4],o=r[1],c=r[3],l=r[5],h=1/(i*(1*c-0*l)-s*(1*o-0*l)+a*(0*o-0*c)),u=e.getPixels("x"),d=n.getPixels("y");t.translate(u,d),t.transform(h*(1*c-0*l),h*(0*l-1*o),h*(0*a-1*s),h*(1*i-0*a),h*(s*l-a*c),h*(a*o-i*l)),t.translate(-u,-d)}applyToPoint(t){t.applyTransform(this.matrix)}constructor(t,e,n){this.type="matrix",this.matrix=g(e),this.originX=n[0],this.originY=n[1]}}class et extends tt{constructor(t,e,n){super(t,e,n),this.type="skew",this.angle=new V(t,"angle",e)}}class nt extends et{constructor(t,e,n){super(t,e,n),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class rt extends et{constructor(t,e,n){super(t,e,n),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}class it{static fromElement(t,e){const n=e.getStyle("transform",!1,!0);if(n.hasValue()){const[r,i=r]=e.getStyle("transform-origin",!1,!0).split();if(r&&i){const e=[r,i];return new it(t,n.getString(),e)}}return null}apply(t){this.transforms.forEach((e=>e.apply(t)))}unapply(t){this.transforms.forEach((e=>e.unapply(t)))}applyToPoint(t){this.transforms.forEach((e=>e.applyToPoint(t)))}constructor(t,e,n){this.document=t,this.transforms=[];u(e).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/).forEach((t=>{if("none"===t)return;const[e,r]=function(t){const[e="",n=""]=t.split("(");return[e.trim(),n.trim().replace(")","")]}(t),i=it.transformTypes[e];i&&this.transforms.push(new i(this.document,r,n))}))}}it.transformTypes={translate:Z,rotate:Q,scale:J,matrix:tt,skewX:nt,skewY:rt};class st{getAttribute(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.attributes[t];if(!n&&e){const e=new V(this.document,t,"");return this.attributes[t]=e,e}return n||V.empty(this.document)}getHrefAttribute(){let t;for(const e in this.attributes)if("href"===e||e.endsWith(":href")){t=this.attributes[e];break}return t||V.empty(this.document)}getStyle(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.styles[t];if(r)return r;const i=this.getAttribute(t);if(i.hasValue())return this.styles[t]=i,i;if(!n){const{parent:e}=this;if(e){const n=e.getStyle(t);if(n.hasValue())return n}}if(e){const e=new V(this.document,t,"");return this.styles[t]=e,e}return V.empty(this.document)}render(t){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(t.save(),this.getStyle("mask").hasValue()){const e=this.getStyle("mask").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else if("none"!==this.getStyle("filter").getValue("none")){const e=this.getStyle("filter").getDefinition();e&&(this.applyEffects(t),e.apply(t,this))}else this.setContext(t),this.renderChildren(t),this.clearContext(t);t.restore()}}setContext(t){}applyEffects(t){const e=it.fromElement(this.document,this);e&&e.apply(t);const n=this.getStyle("clip-path",!1,!0);if(n.hasValue()){const e=n.getDefinition();e&&e.apply(t)}}clearContext(t){}renderChildren(t){this.children.forEach((e=>{e.render(t)}))}addChild(t){const e=t instanceof st?t:this.document.createElement(t);e.parent=this,st.ignoreChildTypes.includes(e.type)||this.children.push(e)}matchesSelector(t){var e;const{node:n}=this;if("function"==typeof n.matches)return n.matches(t);const r=null===(e=n.getAttribute)||void 0===e?void 0:e.call(n,"class");return!(!r||""===r)&&r.split(" ").some((e=>".".concat(e)===t))}addStylesFromStyleDefinition(){const{styles:t,stylesSpecificity:e}=this.document;let n;for(const r in t)if(!r.startsWith("@")&&this.matchesSelector(r)){const i=t[r],s=e[r];if(i)for(const t in i){let e=this.stylesSpecificity[t];void 0===e&&(e="000"),s&&s>=e&&(n=i[t],n&&(this.styles[t]=n),this.stylesSpecificity[t]=s)}}}removeStyles(t,e){return e.reduce(((e,n)=>{const r=t.getStyle(n);if(!r.hasValue())return e;const i=r.getString();return r.setValue(""),[...e,[n,i]]}),[])}restoreStyles(t,e){e.forEach((e=>{let[n,r]=e;t.getStyle(n,!0).setValue(r)}))}isFirstChild(){var t;return 0===(null===(t=this.parent)||void 0===t?void 0:t.children.indexOf(this))}constructor(t,e,n=!1){if(this.document=t,this.node=e,this.captureTextNodes=n,this.type="",this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],!e||1!==e.nodeType)return;if(Array.from(e.attributes).forEach((e=>{const n=y(e.nodeName);this.attributes[n]=new V(t,n,e.value)})),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){this.getAttribute("style").getString().split(";").map((t=>t.trim())).forEach((e=>{if(!e)return;const[n,r]=e.split(":").map((t=>t.trim()));n&&(this.styles[n]=new V(t,n,r))}))}const{definitions:r}=t,i=this.getAttribute("id");i.hasValue()&&(r[i.getString()]||(r[i.getString()]=this)),Array.from(e.childNodes).forEach((e=>{if(1===e.nodeType)this.addChild(e);else if(n&&(3===e.nodeType||4===e.nodeType)){const n=t.createTextNode(e);n.getText().length>0&&this.addChild(n)}}))}}st.ignoreChildTypes=["title"];class at extends st{constructor(t,e,n){super(t,e,n)}}function ot(t){const e=t.trim();return/^('|")/.test(e)?e:'"'.concat(e,'"')}function ct(t){if(!t)return"";const e=t.trim().toLowerCase();switch(e){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return e;default:return/^oblique\s+(-|)\d+deg$/.test(e)?e:""}}function lt(t){if(!t)return"";const e=t.trim().toLowerCase();switch(e){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return e;default:return/^[\d.]+$/.test(e)?e:""}}class ht{static parse(){let t=arguments.length>1?arguments[1]:void 0,e="",n="",r="",i="",s="";const a=u(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").trim().split(" "),o={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return a.forEach((t=>{switch(!0){case!o.fontStyle&&ht.styles.includes(t):"inherit"!==t&&(e=t),o.fontStyle=!0;break;case!o.fontVariant&&ht.variants.includes(t):"inherit"!==t&&(n=t),o.fontStyle=!0,o.fontVariant=!0;break;case!o.fontWeight&&ht.weights.includes(t):"inherit"!==t&&(r=t),o.fontStyle=!0,o.fontVariant=!0,o.fontWeight=!0;break;case!o.fontSize:"inherit"!==t&&(i=t.split("/")[0]||""),o.fontStyle=!0,o.fontVariant=!0,o.fontWeight=!0,o.fontSize=!0;break;default:"inherit"!==t&&(s+=t)}})),new ht(e,n,r,i,s,t)}toString(){return[ct(this.fontStyle),this.fontVariant,lt(this.fontWeight),this.fontSize,(t=this.fontFamily,"undefined"==typeof process?t:t.trim().split(",").map(ot).join(","))].join(" ").trim();var t}constructor(t,e,n,r,i,s){const a=s?"string"==typeof s?ht.parse(s):s:{};this.fontFamily=i||a.fontFamily,this.fontSize=r||a.fontSize,this.fontStyle=t||a.fontStyle,this.fontWeight=n||a.fontWeight,this.fontVariant=e||a.fontVariant}}ht.styles="normal|italic|oblique|inherit",ht.variants="normal|small-caps|inherit",ht.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class ut{get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(t,e){void 0!==t&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=t,this.x2=t),t<this.x1&&(this.x1=t),t>this.x2&&(this.x2=t)),void 0!==e&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=e,this.y2=e),e<this.y1&&(this.y1=e),e>this.y2&&(this.y2=e))}addX(t){this.addPoint(t,0)}addY(t){this.addPoint(0,t)}addBoundingBox(t){if(!t)return;const{x1:e,y1:n,x2:r,y2:i}=t;this.addPoint(e,n),this.addPoint(r,i)}sumCubic(t,e,n,r,i){return Math.pow(1-t,3)*e+3*Math.pow(1-t,2)*t*n+3*(1-t)*Math.pow(t,2)*r+Math.pow(t,3)*i}bezierCurveAdd(t,e,n,r,i){const s=6*e-12*n+6*r,a=-3*e+9*n-9*r+3*i,o=3*n-3*e;if(0===a){if(0===s)return;const a=-o/s;return void(0<a&&a<1&&(t?this.addX(this.sumCubic(a,e,n,r,i)):this.addY(this.sumCubic(a,e,n,r,i))))}const c=Math.pow(s,2)-4*o*a;if(c<0)return;const l=(-s+Math.sqrt(c))/(2*a);0<l&&l<1&&(t?this.addX(this.sumCubic(l,e,n,r,i)):this.addY(this.sumCubic(l,e,n,r,i)));const h=(-s-Math.sqrt(c))/(2*a);0<h&&h<1&&(t?this.addX(this.sumCubic(h,e,n,r,i)):this.addY(this.sumCubic(h,e,n,r,i)))}addBezierCurve(t,e,n,r,i,s,a,o){this.addPoint(t,e),this.addPoint(a,o),this.bezierCurveAdd(!0,t,n,i,a),this.bezierCurveAdd(!1,e,r,s,o)}addQuadraticCurve(t,e,n,r,i,s){const a=t+2/3*(n-t),o=e+2/3*(r-e),c=a+1/3*(i-t),l=o+1/3*(s-e);this.addBezierCurve(t,e,a,c,o,l,i,s)}isPointInBox(t,e){const{x1:n,y1:r,x2:i,y2:s}=this;return n<=t&&t<=i&&r<=e&&e<=s}constructor(t=Number.NaN,e=Number.NaN,n=Number.NaN,r=Number.NaN){this.x1=t,this.y1=e,this.x2=n,this.y2=r,this.addPoint(t,e),this.addPoint(n,r)}}class dt extends st{calculateOpacity(){let t=1,e=this;for(;e;){const n=e.getStyle("opacity",!1,!0);n.hasValue(!0)&&(t*=n.getNumber()),e=e.parent}return t}setContext(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!e){const e=this.getStyle("fill"),n=this.getStyle("fill-opacity"),r=this.getStyle("stroke"),i=this.getStyle("stroke-opacity");if(e.isUrlDefinition()){const r=e.getFillStyleDefinition(this,n);r&&(t.fillStyle=r)}else if(e.hasValue()){"currentColor"===e.getString()&&e.setValue(this.getStyle("color").getColor());const n=e.getColor();"inherit"!==n&&(t.fillStyle="none"===n?"rgba(0,0,0,0)":n)}if(n.hasValue()){const e=new V(this.document,"fill",t.fillStyle).addOpacity(n).getColor();t.fillStyle=e}if(r.isUrlDefinition()){const e=r.getFillStyleDefinition(this,i);e&&(t.strokeStyle=e)}else if(r.hasValue()){"currentColor"===r.getString()&&r.setValue(this.getStyle("color").getColor());const e=r.getString();"inherit"!==e&&(t.strokeStyle="none"===e?"rgba(0,0,0,0)":e)}if(i.hasValue()){const e=new V(this.document,"stroke",t.strokeStyle).addOpacity(i).getString();t.strokeStyle=e}const s=this.getStyle("stroke-width");if(s.hasValue()){const e=s.getPixels();t.lineWidth=e||k}const a=this.getStyle("stroke-linecap"),o=this.getStyle("stroke-linejoin"),c=this.getStyle("stroke-miterlimit"),l=this.getStyle("stroke-dasharray"),h=this.getStyle("stroke-dashoffset");if(a.hasValue()&&(t.lineCap=a.getString()),o.hasValue()&&(t.lineJoin=o.getString()),c.hasValue()&&(t.miterLimit=c.getNumber()),l.hasValue()&&"none"!==l.getString()){const e=f(l.getString());void 0!==t.setLineDash?t.setLineDash(e):void 0!==t.webkitLineDash?t.webkitLineDash=e:void 0===t.mozDash||1===e.length&&0===e[0]||(t.mozDash=e);const n=h.getPixels();void 0!==t.lineDashOffset?t.lineDashOffset=n:void 0!==t.webkitLineDashOffset?t.webkitLineDashOffset=n:void 0!==t.mozDashOffset&&(t.mozDashOffset=n)}}if(this.modifiedEmSizeStack=!1,void 0!==t.font){const e=this.getStyle("font"),n=this.getStyle("font-style"),r=this.getStyle("font-variant"),i=this.getStyle("font-weight"),s=this.getStyle("font-size"),a=this.getStyle("font-family"),o=new ht(n.getString(),r.getString(),i.getString(),s.hasValue()?"".concat(s.getPixels(!0),"px"):"",a.getString(),ht.parse(e.getString(),t.font));n.setValue(o.fontStyle),r.setValue(o.fontVariant),i.setValue(o.fontWeight),s.setValue(o.fontSize),a.setValue(o.fontFamily),t.font=o.toString(),s.isPixels()&&(this.document.emSize=s.getPixels(),this.modifiedEmSizeStack=!0)}e||(this.applyEffects(t),t.globalAlpha=this.calculateOpacity())}clearContext(t){super.clearContext(t),this.modifiedEmSizeStack&&this.document.popEmSize()}constructor(...t){super(...t),this.modifiedEmSizeStack=!1}}class pt extends dt{setContext(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.setContext(t,e);const n=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();n&&(t.textBaseline=n)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(t){if("text"!==this.type)return this.getTElementBoundingBox(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t);let e=null;return this.children.forEach(((n,r)=>{const i=this.getChildBoundingBox(t,this,this,r);e?e.addBoundingBox(i):e=i})),e}getFontSize(){const{document:t,parent:e}=this,n=ht.parse(t.ctx.font).fontSize;return e.getStyle("font-size").getNumber(n)}getTElementBoundingBox(t){const e=this.getFontSize();return new ut(this.x,this.y-e,this.x+this.measureText(t),this.y)}getGlyph(t,e,n){const r=e[n];let i;if(t.isArabic){var s;const a=e.length,o=e[n-1],c=e[n+1];let l="isolated";(0===n||" "===o)&&n<a-1&&" "!==c&&(l="terminal"),n>0&&" "!==o&&n<a-1&&" "!==c&&(l="medial"),n>0&&" "!==o&&(n===a-1||" "===c)&&(l="initial"),i=(null===(s=t.arabicGlyphs[r])||void 0===s?void 0:s[l])||t.glyphs[r]}else i=t.glyphs[r];return i||(i=t.missingGlyph),i}getText(){return""}getTextFromNode(t){const e=t||this.node,n=Array.from(e.parentNode.childNodes),r=n.indexOf(e),i=n.length-1;let s=u(e.textContent||"");return 0===r&&(s=d(s)),r===i&&(s=p(s)),s}renderChildren(t){if("text"!==this.type)return void this.renderTElementChildren(t);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(t),this.children.forEach(((e,n)=>{this.renderChild(t,this,this,n)}));const{mouse:e}=this.document.screen;e.isWorking()&&e.checkBoundingBox(this,this.getBoundingBox(t))}renderTElementChildren(t){const{document:e,parent:n}=this,r=this.getText(),i=n.getStyle("font-family").getDefinition();if(i){const{unitsPerEm:s}=i.fontFace,a=ht.parse(e.ctx.font),o=n.getStyle("font-size").getNumber(a.fontSize),c=n.getStyle("font-style").getString(a.fontStyle),l=o/s,h=i.isRTL?r.split("").reverse().join(""):r,u=f(n.getAttribute("dx").getString()),d=h.length;for(let e=0;e<d;e++){const n=this.getGlyph(i,h,e);t.translate(this.x,this.y),t.scale(l,-l);const r=t.lineWidth;t.lineWidth=t.lineWidth*s/o,"italic"===c&&t.transform(1,0,.4,1,0,0),n.render(t),"italic"===c&&t.transform(1,0,-.4,1,0,0),t.lineWidth=r,t.scale(1/l,-1/l),t.translate(-this.x,-this.y),this.x+=o*(n.horizAdvX||i.horizAdvX)/s,void 0===u[e]||isNaN(u[e])||(this.x+=u[e])}return}const{x:s,y:a}=this;t.fillStyle&&t.fillText(r,s,a),t.strokeStyle&&t.strokeText(r,s,a)}applyAnchoring(){if(this.textChunkStart>=this.leafTexts.length)return;const t=this.leafTexts[this.textChunkStart],e=t.getStyle("text-anchor").getString("start");let n=0;n="start"===e?t.x-this.minX:"end"===e?t.x-this.maxX:t.x-(this.minX+this.maxX)/2;for(let t=this.textChunkStart;t<this.leafTexts.length;t++)this.leafTexts[t].x+=n;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}adjustChildCoordinatesRecursive(t){this.children.forEach(((e,n)=>{this.adjustChildCoordinatesRecursiveCore(t,this,this,n)})),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(t,e,n,r){const i=n.children[r];i.children.length>0?i.children.forEach(((n,r)=>{e.adjustChildCoordinatesRecursiveCore(t,e,i,r)})):this.adjustChildCoordinates(t,e,n,r)}adjustChildCoordinates(t,e,n,r){const i=n.children[r];if("function"!=typeof i.measureText)return i;t.save(),i.setContext(t,!0);const s=i.getAttribute("x"),a=i.getAttribute("y"),o=i.getAttribute("dx"),c=i.getAttribute("dy"),l=i.getStyle("font-family").getDefinition(),h=Boolean(null==l?void 0:l.isRTL);0===r&&(s.hasValue()||s.setValue(i.getInheritedAttribute("x")),a.hasValue()||a.setValue(i.getInheritedAttribute("y")),o.hasValue()||o.setValue(i.getInheritedAttribute("dx")),c.hasValue()||c.setValue(i.getInheritedAttribute("dy")));const u=i.measureText(t);return h&&(e.x-=u),s.hasValue()?(e.applyAnchoring(),i.x=s.getPixels("x"),o.hasValue()&&(i.x+=o.getPixels("x"))):(o.hasValue()&&(e.x+=o.getPixels("x")),i.x=e.x),e.x=i.x,h||(e.x+=u),a.hasValue()?(i.y=a.getPixels("y"),c.hasValue()&&(i.y+=c.getPixels("y"))):(c.hasValue()&&(e.y+=c.getPixels("y")),i.y=e.y),e.y=i.y,e.leafTexts.push(i),e.minX=Math.min(e.minX,i.x,i.x+u),e.maxX=Math.max(e.maxX,i.x,i.x+u),i.clearContext(t),t.restore(),i}getChildBoundingBox(t,e,n,r){const i=n.children[r];if("function"!=typeof i.getBoundingBox)return null;const s=i.getBoundingBox(t);return s&&i.children.forEach(((n,r)=>{const a=e.getChildBoundingBox(t,e,i,r);s.addBoundingBox(a)})),s}renderChild(t,e,n,r){const i=n.children[r];i.render(t),i.children.forEach(((n,r)=>{e.renderChild(t,e,i,r)}))}measureText(t){const{measureCache:e}=this;if(~e)return e;const n=this.getText(),r=this.measureTargetText(t,n);return this.measureCache=r,r}measureTargetText(t,e){if(!e.length)return 0;const{parent:n}=this,r=n.getStyle("font-family").getDefinition();if(r){const t=this.getFontSize(),i=r.isRTL?e.split("").reverse().join(""):e,s=f(n.getAttribute("dx").getString()),a=i.length;let o=0;for(let e=0;e<a;e++){o+=(this.getGlyph(r,i,e).horizAdvX||r.horizAdvX)*t/r.fontFace.unitsPerEm,void 0===s[e]||isNaN(s[e])||(o+=s[e])}return o}if(!t.measureText)return 10*e.length;t.save(),this.setContext(t,!0);const{width:i}=t.measureText(e);return this.clearContext(t),t.restore(),i}getInheritedAttribute(t){let e=this;for(;e instanceof pt&&e.isFirstChild()&&e.parent;){const n=e.parent.getAttribute(t);if(n.hasValue(!0))return n.getString("0");e=e.parent}return null}constructor(t,e,n){super(t,e,new.target===pt||n),this.type="text",this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.measureCache=-1}}class ft extends pt{getText(){return this.text}constructor(t,e,n){super(t,e,new.target===ft||n),this.type="tspan",this.text=this.children.length>0?"":this.getTextFromNode()}}class gt extends ft{constructor(...t){super(...t),this.type="textNode"}}class mt extends s.SVGPathData{reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new W(0,0),this.control=new W(0,0),this.current=new W(0,0),this.points=[],this.angles=[]}isEnd(){const{i:t,commands:e}=this;return t>=e.length-1}next(){const t=this.commands[++this.i];return this.previousCommand=this.command,this.command=t,t}getPoint(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"x",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"y";const n=new W(this.command[t],this.command[e]);return this.makeAbsolute(n)}getAsControlPoint(t,e){const n=this.getPoint(t,e);return this.control=n,n}getAsCurrentPoint(t,e){const n=this.getPoint(t,e);return this.current=n,n}getReflectedControlPoint(){const t=this.previousCommand.type;if(t!==s.SVGPathData.CURVE_TO&&t!==s.SVGPathData.SMOOTH_CURVE_TO&&t!==s.SVGPathData.QUAD_TO&&t!==s.SVGPathData.SMOOTH_QUAD_TO)return this.current;const{current:{x:e,y:n},control:{x:r,y:i}}=this;return new W(2*e-r,2*n-i)}makeAbsolute(t){if(this.command.relative){const{x:e,y:n}=this.current;t.x+=e,t.y+=n}return t}addMarker(t,e,n){const{points:r,angles:i}=this;n&&i.length>0&&!i[i.length-1]&&(i[i.length-1]=r[r.length-1].angleTo(n)),this.addMarkerAngle(t,e?e.angleTo(t):null)}addMarkerAngle(t,e){this.points.push(t),this.angles.push(e)}getMarkerPoints(){return this.points}getMarkerAngles(){const{angles:t}=this,e=t.length;for(let n=0;n<e;n++)if(!t[n])for(let r=n+1;r<e;r++)if(t[r]){t[n]=t[r];break}return t}constructor(t){super(t.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=new W(0,0),this.start=new W(0,0),this.current=new W(0,0),this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}}class yt extends dt{path(t){const{pathParser:e}=this,n=new ut;for(e.reset(),t&&t.beginPath();!e.isEnd();)switch(e.next().type){case mt.MOVE_TO:this.pathM(t,n);break;case mt.LINE_TO:this.pathL(t,n);break;case mt.HORIZ_LINE_TO:this.pathH(t,n);break;case mt.VERT_LINE_TO:this.pathV(t,n);break;case mt.CURVE_TO:this.pathC(t,n);break;case mt.SMOOTH_CURVE_TO:this.pathS(t,n);break;case mt.QUAD_TO:this.pathQ(t,n);break;case mt.SMOOTH_QUAD_TO:this.pathT(t,n);break;case mt.ARC:this.pathA(t,n);break;case mt.CLOSE_PATH:this.pathZ(t,n)}return n}getBoundingBox(t){return this.path()}getMarkers(){const{pathParser:t}=this,e=t.getMarkerPoints(),n=t.getMarkerAngles();return e.map(((t,e)=>[t,n[e]]))}renderChildren(t){this.path(t),this.document.screen.mouse.checkPath(this,t);const e=this.getStyle("fill-rule");""!==t.fillStyle&&("inherit"!==e.getString("inherit")?t.fill(e.getString()):t.fill()),""!==t.strokeStyle&&("non-scaling-stroke"===this.getAttribute("vector-effect").getString()?(t.save(),t.setTransform(1,0,0,1,0,0),t.stroke(),t.restore()):t.stroke());const n=this.getMarkers();if(n){const e=n.length-1,r=this.getStyle("marker-start"),i=this.getStyle("marker-mid"),s=this.getStyle("marker-end");if(r.isUrlDefinition()){const e=r.getDefinition(),[i,s]=n[0];e.render(t,i,s)}if(i.isUrlDefinition()){const r=i.getDefinition();for(let i=1;i<e;i++){const[e,s]=n[i];r.render(t,e,s)}}if(s.isUrlDefinition()){const r=s.getDefinition(),[i,a]=n[e];r.render(t,i,a)}}}static pathM(t){const e=t.getAsCurrentPoint();return t.start=t.current,{point:e}}pathM(t,e){const{pathParser:n}=this,{point:r}=yt.pathM(n),{x:i,y:s}=r;n.addMarker(r),e.addPoint(i,s),t&&t.moveTo(i,s)}static pathL(t){const{current:e}=t;return{current:e,point:t.getAsCurrentPoint()}}pathL(t,e){const{pathParser:n}=this,{current:r,point:i}=yt.pathL(n),{x:s,y:a}=i;n.addMarker(i,r),e.addPoint(s,a),t&&t.lineTo(s,a)}static pathH(t){const{current:e,command:n}=t,r=new W((n.relative?e.x:0)+n.x,e.y);return t.current=r,{current:e,point:r}}pathH(t,e){const{pathParser:n}=this,{current:r,point:i}=yt.pathH(n),{x:s,y:a}=i;n.addMarker(i,r),e.addPoint(s,a),t&&t.lineTo(s,a)}static pathV(t){const{current:e,command:n}=t,r=new W(e.x,(n.relative?e.y:0)+n.y);return t.current=r,{current:e,point:r}}pathV(t,e){const{pathParser:n}=this,{current:r,point:i}=yt.pathV(n),{x:s,y:a}=i;n.addMarker(i,r),e.addPoint(s,a),t&&t.lineTo(s,a)}static pathC(t){const{current:e}=t;return{current:e,point:t.getPoint("x1","y1"),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}pathC(t,e){const{pathParser:n}=this,{current:r,point:i,controlPoint:s,currentPoint:a}=yt.pathC(n);n.addMarker(a,s,i),e.addBezierCurve(r.x,r.y,i.x,i.y,s.x,s.y,a.x,a.y),t&&t.bezierCurveTo(i.x,i.y,s.x,s.y,a.x,a.y)}static pathS(t){const{current:e}=t;return{current:e,point:t.getReflectedControlPoint(),controlPoint:t.getAsControlPoint("x2","y2"),currentPoint:t.getAsCurrentPoint()}}pathS(t,e){const{pathParser:n}=this,{current:r,point:i,controlPoint:s,currentPoint:a}=yt.pathS(n);n.addMarker(a,s,i),e.addBezierCurve(r.x,r.y,i.x,i.y,s.x,s.y,a.x,a.y),t&&t.bezierCurveTo(i.x,i.y,s.x,s.y,a.x,a.y)}static pathQ(t){const{current:e}=t;return{current:e,controlPoint:t.getAsControlPoint("x1","y1"),currentPoint:t.getAsCurrentPoint()}}pathQ(t,e){const{pathParser:n}=this,{current:r,controlPoint:i,currentPoint:s}=yt.pathQ(n);n.addMarker(s,i,i),e.addQuadraticCurve(r.x,r.y,i.x,i.y,s.x,s.y),t&&t.quadraticCurveTo(i.x,i.y,s.x,s.y)}static pathT(t){const{current:e}=t,n=t.getReflectedControlPoint();t.control=n;return{current:e,controlPoint:n,currentPoint:t.getAsCurrentPoint()}}pathT(t,e){const{pathParser:n}=this,{current:r,controlPoint:i,currentPoint:s}=yt.pathT(n);n.addMarker(s,i,i),e.addQuadraticCurve(r.x,r.y,i.x,i.y,s.x,s.y),t&&t.quadraticCurveTo(i.x,i.y,s.x,s.y)}static pathA(t){const{current:e,command:n}=t;let{rX:r,rY:i,xRot:s,lArcFlag:a,sweepFlag:o}=n;const c=s*(Math.PI/180),l=t.getAsCurrentPoint(),h=new W(Math.cos(c)*(e.x-l.x)/2+Math.sin(c)*(e.y-l.y)/2,-Math.sin(c)*(e.x-l.x)/2+Math.cos(c)*(e.y-l.y)/2),u=Math.pow(h.x,2)/Math.pow(r,2)+Math.pow(h.y,2)/Math.pow(i,2);u>1&&(r*=Math.sqrt(u),i*=Math.sqrt(u));let d=(a===o?-1:1)*Math.sqrt((Math.pow(r,2)*Math.pow(i,2)-Math.pow(r,2)*Math.pow(h.y,2)-Math.pow(i,2)*Math.pow(h.x,2))/(Math.pow(r,2)*Math.pow(h.y,2)+Math.pow(i,2)*Math.pow(h.x,2)));isNaN(d)&&(d=0);const p=new W(d*r*h.y/i,d*-i*h.x/r),f=new W((e.x+l.x)/2+Math.cos(c)*p.x-Math.sin(c)*p.y,(e.y+l.y)/2+Math.sin(c)*p.x+Math.cos(c)*p.y),g=T([1,0],[(h.x-p.x)/r,(h.y-p.y)/i]),m=[(h.x-p.x)/r,(h.y-p.y)/i],y=[(-h.x-p.x)/r,(-h.y-p.y)/i];let x=T(m,y);return j(m,y)<=-1&&(x=Math.PI),j(m,y)>=1&&(x=0),{currentPoint:l,rX:r,rY:i,sweepFlag:o,xAxisRotation:c,centp:f,a1:g,ad:x}}pathA(t,e){const{pathParser:n}=this,{currentPoint:r,rX:i,rY:s,sweepFlag:a,xAxisRotation:o,centp:c,a1:l,ad:h}=yt.pathA(n),u=1-a?1:-1,d=l+u*(h/2),p=new W(c.x+i*Math.cos(d),c.y+s*Math.sin(d));if(n.addMarkerAngle(p,d-u*Math.PI/2),n.addMarkerAngle(r,d-u*Math.PI),e.addPoint(r.x,r.y),t&&!isNaN(l)&&!isNaN(h)){const e=i>s?i:s,n=i>s?1:i/s,r=i>s?s/i:1;t.translate(c.x,c.y),t.rotate(o),t.scale(n,r),t.arc(0,0,e,l,l+h,Boolean(1-a)),t.scale(1/n,1/r),t.rotate(-o),t.translate(-c.x,-c.y)}}static pathZ(t){t.current=t.start}pathZ(t,e){yt.pathZ(this.pathParser),t&&e.x1!==e.x2&&e.y1!==e.y2&&t.closePath()}constructor(t,e,n){super(t,e,n),this.type="path",this.pathParser=new mt(this.getAttribute("d").getString())}}class xt extends dt{setContext(t){var e;const{document:n}=this,{screen:r,window:i}=n,s=t.canvas;if(r.setDefaults(t),"style"in s&&void 0!==t.font&&i&&void 0!==i.getComputedStyle){t.font=i.getComputedStyle(s).getPropertyValue("font");const e=new V(n,"fontSize",ht.parse(t.font).fontSize);e.hasValue()&&(n.rootEmSize=e.getPixels("y"),n.emSize=n.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);let{width:a,height:o}=r.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");const c=this.getAttribute("refX"),l=this.getAttribute("refY"),h=this.getAttribute("viewBox"),u=h.hasValue()?f(h.getString()):null,d=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden");let p=0,g=0,m=0,y=0;u&&(p=u[0],g=u[1]),this.root||(a=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y"),"marker"===this.type&&(m=p,y=g,p=0,g=0)),r.viewPort.setCurrent(a,o),!this.node||this.parent&&"foreignObject"!==(null===(e=this.node.parentNode)||void 0===e?void 0:e.nodeName)||!this.getStyle("transform",!1,!0).hasValue()||this.getStyle("transform-origin",!1,!0).hasValue()||this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(t),t.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),u&&(a=u[2],o=u[3]),n.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:r.viewPort.width,desiredWidth:a,height:r.viewPort.height,desiredHeight:o,minX:p,minY:g,refX:c.getValue(),refY:l.getValue(),clip:d,clipX:m,clipY:y}),u&&(r.viewPort.removeCurrent(),r.viewPort.setCurrent(a,o))}clearContext(t){super.clearContext(t),this.document.screen.viewPort.removeCurrent()}resize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.getAttribute("width",!0),i=this.getAttribute("height",!0),s=this.getAttribute("viewBox"),a=this.getAttribute("style"),o=r.getNumber(0),c=i.getNumber(0);if(n)if("string"==typeof n)this.getAttribute("preserveAspectRatio",!0).setValue(n);else{const t=this.getAttribute("preserveAspectRatio");t.hasValue()&&t.setValue(t.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(r.setValue(t),i.setValue(e),s.hasValue()||s.setValue("0 0 ".concat(o||t," ").concat(c||e)),a.hasValue()){const n=this.getStyle("width"),r=this.getStyle("height");n.hasValue()&&n.setValue("".concat(t,"px")),r.hasValue()&&r.setValue("".concat(e,"px"))}}constructor(...t){super(...t),this.type="svg",this.root=!1}}class vt extends yt{path(t){const e=this.getAttribute("x").getPixels("x"),n=this.getAttribute("y").getPixels("y"),r=this.getStyle("width",!1,!0).getPixels("x"),i=this.getStyle("height",!1,!0).getPixels("y"),s=this.getAttribute("rx"),a=this.getAttribute("ry");let o=s.getPixels("x"),c=a.getPixels("y");if(s.hasValue()&&!a.hasValue()&&(c=o),a.hasValue()&&!s.hasValue()&&(o=c),o=Math.min(o,r/2),c=Math.min(c,i/2),t){const s=(Math.sqrt(2)-1)/3*4;t.beginPath(),i>0&&r>0&&(t.moveTo(e+o,n),t.lineTo(e+r-o,n),t.bezierCurveTo(e+r-o+s*o,n,e+r,n+c-s*c,e+r,n+c),t.lineTo(e+r,n+i-c),t.bezierCurveTo(e+r,n+i-c+s*c,e+r-o+s*o,n+i,e+r-o,n+i),t.lineTo(e+o,n+i),t.bezierCurveTo(e+o-s*o,n+i,e,n+i-c+s*c,e,n+i-c),t.lineTo(e,n+c),t.bezierCurveTo(e,n+c-s*c,e+o-s*o,n,e+o,n),t.closePath())}return new ut(e,n,e+r,n+i)}getMarkers(){return null}constructor(...t){super(...t),this.type="rect"}}class bt extends yt{path(t){const e=this.getAttribute("cx").getPixels("x"),n=this.getAttribute("cy").getPixels("y"),r=this.getAttribute("r").getPixels();return t&&r>0&&(t.beginPath(),t.arc(e,n,r,0,2*Math.PI,!1),t.closePath()),new ut(e-r,n-r,e+r,n+r)}getMarkers(){return null}constructor(...t){super(...t),this.type="circle"}}class wt extends yt{path(t){const e=(Math.sqrt(2)-1)/3*4,n=this.getAttribute("rx").getPixels("x"),r=this.getAttribute("ry").getPixels("y"),i=this.getAttribute("cx").getPixels("x"),s=this.getAttribute("cy").getPixels("y");return t&&n>0&&r>0&&(t.beginPath(),t.moveTo(i+n,s),t.bezierCurveTo(i+n,s+e*r,i+e*n,s+r,i,s+r),t.bezierCurveTo(i-e*n,s+r,i-n,s+e*r,i-n,s),t.bezierCurveTo(i-n,s-e*r,i-e*n,s-r,i,s-r),t.bezierCurveTo(i+e*n,s-r,i+n,s-e*r,i+n,s),t.closePath()),new ut(i-n,s-r,i+n,s+r)}getMarkers(){return null}constructor(...t){super(...t),this.type="ellipse"}}class Ct extends yt{getPoints(){return[new W(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new W(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(t){const[{x:e,y:n},{x:r,y:i}]=this.getPoints();return t&&(t.beginPath(),t.moveTo(e,n),t.lineTo(r,i)),new ut(e,n,r,i)}getMarkers(){const[t,e]=this.getPoints(),n=t.angleTo(e);return[[t,n],[e,n]]}constructor(...t){super(...t),this.type="line"}}class Mt extends yt{path(t){const{points:e}=this,[{x:n,y:r}]=e,i=new ut(n,r);return t&&(t.beginPath(),t.moveTo(n,r)),e.forEach((e=>{let{x:n,y:r}=e;i.addPoint(n,r),t&&t.lineTo(n,r)})),i}getMarkers(){const{points:t}=this,e=t.length-1,n=[];return t.forEach(((r,i)=>{i!==e&&n.push([r,r.angleTo(t[i+1])])})),n.length>0&&n.push([t[t.length-1],n[n.length-1][1]]),n}constructor(t,e,n){super(t,e,n),this.type="polyline",this.points=[],this.points=W.parsePath(this.getAttribute("points").getString())}}class St extends Mt{path(t){const e=super.path(t),[{x:n,y:r}]=this.points;return t&&(t.lineTo(n,r),t.closePath()),e}constructor(...t){super(...t),this.type="polygon"}}class _t extends st{createPattern(t,e,n){const r=this.getStyle("width").getPixels("x",!0),i=this.getStyle("height").getPixels("y",!0),s=new xt(this.document,null);s.attributes.viewBox=new V(this.document,"viewBox",this.getAttribute("viewBox").getValue()),s.attributes.width=new V(this.document,"width","".concat(r,"px")),s.attributes.height=new V(this.document,"height","".concat(i,"px")),s.attributes.transform=new V(this.document,"transform",this.getAttribute("patternTransform").getValue()),s.children=this.children;const a=this.document.createCanvas(r,i),o=a.getContext("2d"),c=this.getAttribute("x"),l=this.getAttribute("y");c.hasValue()&&l.hasValue()&&o.translate(c.getPixels("x",!0),l.getPixels("y",!0)),n.hasValue()?this.styles["fill-opacity"]=n:Reflect.deleteProperty(this.styles,"fill-opacity");for(let t=-1;t<=1;t++)for(let e=-1;e<=1;e++)o.save(),s.attributes.x=new V(this.document,"x",t*a.width),s.attributes.y=new V(this.document,"y",e*a.height),s.render(o),o.restore();return t.createPattern(a,"repeat")}constructor(...t){super(...t),this.type="pattern"}}class Pt extends st{render(t,e,n){if(!e)return;const{x:r,y:i}=e,s=this.getAttribute("orient").getString("auto"),a=this.getAttribute("markerUnits").getString("strokeWidth");t.translate(r,i),"auto"===s&&t.rotate(n),"strokeWidth"===a&&t.scale(t.lineWidth,t.lineWidth),t.save();const o=new xt(this.document);o.type=this.type,o.attributes.viewBox=new V(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.refX=new V(this.document,"refX",this.getAttribute("refX").getValue()),o.attributes.refY=new V(this.document,"refY",this.getAttribute("refY").getValue()),o.attributes.width=new V(this.document,"width",this.getAttribute("markerWidth").getValue()),o.attributes.height=new V(this.document,"height",this.getAttribute("markerHeight").getValue()),o.attributes.overflow=new V(this.document,"overflow",this.getAttribute("overflow").getValue()),o.attributes.fill=new V(this.document,"fill",this.getAttribute("fill").getColor("black")),o.attributes.stroke=new V(this.document,"stroke",this.getAttribute("stroke").getValue("none")),o.children=this.children,o.render(t),t.restore(),"strokeWidth"===a&&t.scale(1/t.lineWidth,1/t.lineWidth),"auto"===s&&t.rotate(-n),t.translate(-r,-i)}constructor(...t){super(...t),this.type="marker"}}class At extends st{render(){}constructor(...t){super(...t),this.type="defs"}}class Et extends dt{getBoundingBox(t){const e=new ut;return this.children.forEach((n=>{e.addBoundingBox(n.getBoundingBox(t))})),e}constructor(...t){super(...t),this.type="g"}}class kt extends st{getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(t,e,n){let r=this;this.getHrefAttribute().hasValue()&&(r=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(r));const{stops:i}=r,s=this.getGradient(t,e);if(!s)return this.addParentOpacity(n,i[i.length-1].color);if(i.forEach((t=>{s.addColorStop(t.offset,this.addParentOpacity(n,t.color))})),this.getAttribute("gradientTransform").hasValue()){const{document:t}=this,{MAX_VIRTUAL_PIXELS:e}=Y,{viewPort:n}=t.screen,r=n.getRoot(),i=new vt(t);i.attributes.x=new V(t,"x",-e/3),i.attributes.y=new V(t,"y",-e/3),i.attributes.width=new V(t,"width",e),i.attributes.height=new V(t,"height",e);const a=new Et(t);a.attributes.transform=new V(t,"transform",this.getAttribute("gradientTransform").getValue()),a.children=[i];const o=new xt(t);o.attributes.x=new V(t,"x",0),o.attributes.y=new V(t,"y",0),o.attributes.width=new V(t,"width",r.width),o.attributes.height=new V(t,"height",r.height),o.children=[a];const c=t.createCanvas(r.width,r.height),l=c.getContext("2d");return l.fillStyle=s,o.render(l),l.createPattern(c,"no-repeat")}return s}inheritStopContainer(t){this.attributesToInherit.forEach((e=>{!this.getAttribute(e).hasValue()&&t.getAttribute(e).hasValue()&&this.getAttribute(e,!0).setValue(t.getAttribute(e).getValue())}))}addParentOpacity(t,e){if(t.hasValue()){return new V(this.document,"color",e).addOpacity(t).getColor()}return e}constructor(t,e,n){super(t,e,n),this.attributesToInherit=["gradientUnits"],this.stops=[];const{stops:r,children:i}=this;i.forEach((t=>{"stop"===t.type&&r.push(t)}))}}class Rt extends kt{getGradient(t,e){const n="objectBoundingBox"===this.getGradientUnits(),r=n?e.getBoundingBox(t):null;if(n&&!r)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));const i=n?r.x+r.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),s=n?r.y+r.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),a=n?r.x+r.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=n?r.y+r.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return i===a&&s===o?null:t.createLinearGradient(i,s,a,o)}constructor(t,e,n){super(t,e,n),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}}class jt extends kt{getGradient(t,e){const n="objectBoundingBox"===this.getGradientUnits(),r=e.getBoundingBox(t);if(n&&!r)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");const i=n?r.x+r.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),s=n?r.y+r.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y");let a=i,o=s;this.getAttribute("fx").hasValue()&&(a=n?r.x+r.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(o=n?r.y+r.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y"));const c=n?(r.width+r.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),l=this.getAttribute("fr").getPixels();return t.createRadialGradient(a,o,l,i,s,c)}constructor(t,e,n){super(t,e,n),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}}class Tt extends st{constructor(t,e,n){super(t,e,n),this.type="stop";const r=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber())),i=this.getStyle("stop-opacity");let s=this.getStyle("stop-color",!0);""===s.getString()&&s.setValue("#000"),i.hasValue()&&(s=s.addOpacity(i)),this.offset=r,this.color=s.getColor()}}class Dt extends st{getProperty(){const t=this.getAttribute("attributeType").getString(),e=this.getAttribute("attributeName").getString();return"CSS"===t?this.parent.getStyle(e,!0):this.parent.getAttribute(e,!0)}calcValue(){const{initialUnits:t}=this,{progress:e,from:n,to:r}=this.getProgress();let i=n.getNumber()+(r.getNumber()-n.getNumber())*e;return"%"===t&&(i*=100),"".concat(i).concat(t)}update(t){const{parent:e}=this,n=this.getProperty();if(this.initialValue||(this.initialValue=n.getString(),this.initialUnits=n.getUnits()),this.duration>this.maxDuration){const t=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==t||this.frozen){if("remove"===t&&!this.removed)return this.removed=!0,e&&n&&n.setValue(e.animationFrozen?e.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,e&&n&&(e.animationFrozen=!0,e.animationFrozenValue=n.getString());return!1}this.duration+=t;let r=!1;if(this.begin<this.duration){let t=this.calcValue();const e=this.getAttribute("type");if(e.hasValue()){const n=e.getString();t="".concat(n,"(").concat(t,")")}n.setValue(t),r=!0}return r}getProgress(){const{document:t,values:e}=this;let n,r,i=(this.duration-this.begin)/(this.maxDuration-this.begin);if(e.hasValue()){const s=i*(e.getValue().length-1),a=Math.floor(s),o=Math.ceil(s);let c;c=e.getValue()[a],n=new V(t,"from",c?parseFloat(c):0),c=e.getValue()[o],r=new V(t,"to",c?parseFloat(c):0),i=(s-a)/(o-a)}else n=this.from,r=this.to;return{progress:i,from:n,to:r}}constructor(t,e,n){super(t,e,n),this.type="animate",this.duration=0,this.initialUnits="",this.removed=!1,this.frozen=!1,t.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new V(t,"values",null);const r=this.getAttribute("values");r.hasValue()&&this.values.setValue(r.getString().split(";"))}}class Lt extends Dt{calcValue(){const{progress:t,from:e,to:n}=this.getProgress(),r=new l.default(e.getColor()),i=new l.default(n.getColor());if(r.ok&&i.ok){const e=r.r+(i.r-r.r)*t,n=r.g+(i.g-r.g)*t,s=r.b+(i.b-r.b)*t;return"rgb(".concat(Math.floor(e),", ").concat(Math.floor(n),", ").concat(Math.floor(s),")")}return this.getAttribute("from").getColor()}constructor(...t){super(...t),this.type="animateColor"}}class zt extends Dt{calcValue(){const{progress:t,from:e,to:n}=this.getProgress(),r=f(e.getString()),i=f(n.getString());return r.map(((e,n)=>e+(i[n]-e)*t)).join(" ")}constructor(...t){super(...t),this.type="animateTransform"}}class Nt extends st{constructor(t,e,n){super(t,e,n),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class It extends yt{constructor(t,e,n){super(t,e,n),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class Bt extends It{constructor(...t){super(...t),this.type="missing-glyph",this.horizAdvX=0}}class Ft extends st{render(){}constructor(t,e,n){super(t,e,n),this.type="font",this.isArabic=!1,this.glyphs={},this.arabicGlyphs={},this.isRTL=!1,this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();const{definitions:r}=t,{children:i}=this;for(const t of i)if(t instanceof Nt){this.fontFace=t;const e=t.getStyle("font-family");e.hasValue()&&(r[e.getString()]=this)}else if(t instanceof Bt)this.missingGlyph=t;else if(t instanceof It)if(t.arabicForm){this.isRTL=!0,this.isArabic=!0;const e=this.arabicGlyphs[t.unicode];void 0===e?this.arabicGlyphs[t.unicode]={[t.arabicForm]:t}:e[t.arabicForm]=t}else this.glyphs[t.unicode]=t}}class Vt extends pt{getText(){const t=this.getHrefAttribute().getDefinition();if(t){const e=t.children[0];if(e)return e.getText()}return""}constructor(...t){super(...t),this.type="tref"}}class Ht extends pt{getText(){return this.text}renderChildren(t){if(this.hasText){super.renderChildren(t);const{document:e,x:n,y:r}=this,{mouse:i}=e.screen,s=new V(e,"fontSize",ht.parse(e.ctx.font).fontSize);i.isWorking()&&i.checkBoundingBox(this,new ut(n,r-s.getPixels("y"),n+this.measureText(t),r))}else if(this.children.length>0){const e=new Et(this.document);e.children=this.children,e.parent=this,e.render(t)}}onClick(){const{window:t}=this.document;t&&t.open(this.getHrefAttribute().getString())}onMouseMove(){this.document.ctx.canvas.style.cursor="pointer"}constructor(t,e,n){super(t,e,n),this.type="a";const{childNodes:r}=e,i=r[0],s=r.length>0&&Array.from(r).every((t=>3===t.nodeType));this.hasText=s,this.text=s?this.getTextFromNode(i):""}}class Ot extends pt{getText(){return this.text}path(t){const{dataArray:e}=this;t&&t.beginPath(),e.forEach((e=>{let{type:n,points:r}=e;switch(n){case mt.LINE_TO:t&&t.lineTo(r[0],r[1]);break;case mt.MOVE_TO:t&&t.moveTo(r[0],r[1]);break;case mt.CURVE_TO:t&&t.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]);break;case mt.QUAD_TO:t&&t.quadraticCurveTo(r[0],r[1],r[2],r[3]);break;case mt.ARC:{const[e,n,i,s,a,o,c,l]=r,h=i>s?i:s,u=i>s?1:i/s,d=i>s?s/i:1;t&&(t.translate(e,n),t.rotate(c),t.scale(u,d),t.arc(0,0,h,a,a+o,Boolean(1-l)),t.scale(1/u,1/d),t.rotate(-c),t.translate(-e,-n));break}case mt.CLOSE_PATH:t&&t.closePath()}}))}renderChildren(t){this.setTextData(t),t.save();const e=this.parent.getStyle("text-decoration").getString(),n=this.getFontSize(),{glyphInfo:r}=this,i=t.fillStyle;"underline"===e&&t.beginPath(),r.forEach(((r,i)=>{const{p0:s,p1:a,rotation:o,text:c}=r;t.save(),t.translate(s.x,s.y),t.rotate(o),t.fillStyle&&t.fillText(c,0,0),t.strokeStyle&&t.strokeText(c,0,0),t.restore(),"underline"===e&&(0===i&&t.moveTo(s.x,s.y+n/8),t.lineTo(a.x,a.y+n/5))})),"underline"===e&&(t.lineWidth=n/20,t.strokeStyle=i,t.stroke(),t.closePath()),t.restore()}getLetterSpacingAt(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.letterSpacingCache[t]||0}findSegmentToFitChar(t,e,n,r,i,s,a,o,c){let l=s,h=this.measureText(t,o);" "===o&&"justify"===e&&n<r&&(h+=(r-n)/i),c>-1&&(l+=this.getLetterSpacingAt(c));const u=this.textHeight/20,d=this.getEquidistantPointOnPath(l,u,0),p=this.getEquidistantPointOnPath(l+h,u,0),f={p0:d,p1:p},g=d&&p?Math.atan2(p.y-d.y,p.x-d.x):0;if(a){const t=Math.cos(Math.PI/2+g)*a,e=Math.cos(-g)*a;f.p0={...d,x:d.x+t,y:d.y+e},f.p1={...p,x:p.x+t,y:p.y+e}}return l+=h,{offset:l,segment:f,rotation:g}}measureText(t,e){const{measuresCache:n}=this,r=e||this.getText();if(n.has(r))return n.get(r);const i=this.measureTargetText(t,r);return n.set(r,i),i}setTextData(t){if(this.glyphInfo)return;const e=this.getText(),n=e.split(""),r=e.split(" ").length-1,i=this.parent.getAttribute("dx").split().map((t=>t.getPixels("x"))),s=this.parent.getAttribute("dy").getPixels("y"),a=this.parent.getStyle("text-anchor").getString("start"),o=this.getStyle("letter-spacing"),c=this.parent.getStyle("letter-spacing");let l=0;o.hasValue()&&"inherit"!==o.getValue()?o.hasValue()&&"initial"!==o.getValue()&&"unset"!==o.getValue()&&(l=o.getPixels()):l=c.getPixels();const h=[],u=e.length;this.letterSpacingCache=h;for(let t=0;t<u;t++)h.push(void 0!==i[t]?i[t]:l);const d=h.reduce(((t,e,n)=>0===n?0:t+e||0),0),p=this.measureText(t),f=Math.max(p+d,0);this.textWidth=p,this.textHeight=this.getFontSize(),this.glyphInfo=[];const g=this.getPathLength(),m=this.getStyle("startOffset").getNumber(0)*g;let y=0;"middle"!==a&&"center"!==a||(y=-f/2),"end"!==a&&"right"!==a||(y=-f),y+=m,n.forEach(((e,i)=>{const{offset:o,segment:c,rotation:l}=this.findSegmentToFitChar(t,a,f,g,r,y,s,e,i);y=o,c.p0&&c.p1&&this.glyphInfo.push({text:n[i],p0:c.p0,p1:c.p1,rotation:l})}))}parsePathData(t){if(this.pathLength=-1,!t)return[];const e=[],{pathParser:n}=t;for(n.reset();!n.isEnd();){const{current:t}=n,r=t?t.x:0,i=t?t.y:0,s=n.next();let a=s.type,o=[];switch(s.type){case mt.MOVE_TO:this.pathM(n,o);break;case mt.LINE_TO:a=this.pathL(n,o);break;case mt.HORIZ_LINE_TO:a=this.pathH(n,o);break;case mt.VERT_LINE_TO:a=this.pathV(n,o);break;case mt.CURVE_TO:this.pathC(n,o);break;case mt.SMOOTH_CURVE_TO:a=this.pathS(n,o);break;case mt.QUAD_TO:this.pathQ(n,o);break;case mt.SMOOTH_QUAD_TO:a=this.pathT(n,o);break;case mt.ARC:o=this.pathA(n);break;case mt.CLOSE_PATH:yt.pathZ(n)}s.type!==mt.CLOSE_PATH?e.push({type:a,points:o,start:{x:r,y:i},pathLength:this.calcLength(r,i,a,o)}):e.push({type:mt.CLOSE_PATH,points:[],pathLength:0})}return e}pathM(t,e){const{x:n,y:r}=yt.pathM(t).point;e.push(n,r)}pathL(t,e){const{x:n,y:r}=yt.pathL(t).point;return e.push(n,r),mt.LINE_TO}pathH(t,e){const{x:n,y:r}=yt.pathH(t).point;return e.push(n,r),mt.LINE_TO}pathV(t,e){const{x:n,y:r}=yt.pathV(t).point;return e.push(n,r),mt.LINE_TO}pathC(t,e){const{point:n,controlPoint:r,currentPoint:i}=yt.pathC(t);e.push(n.x,n.y,r.x,r.y,i.x,i.y)}pathS(t,e){const{point:n,controlPoint:r,currentPoint:i}=yt.pathS(t);return e.push(n.x,n.y,r.x,r.y,i.x,i.y),mt.CURVE_TO}pathQ(t,e){const{controlPoint:n,currentPoint:r}=yt.pathQ(t);e.push(n.x,n.y,r.x,r.y)}pathT(t,e){const{controlPoint:n,currentPoint:r}=yt.pathT(t);return e.push(n.x,n.y,r.x,r.y),mt.QUAD_TO}pathA(t){let{rX:e,rY:n,sweepFlag:r,xAxisRotation:i,centp:s,a1:a,ad:o}=yt.pathA(t);return 0===r&&o>0&&(o-=2*Math.PI),1===r&&o<0&&(o+=2*Math.PI),[s.x,s.y,e,n,a,o,i,r]}calcLength(t,e,n,r){let i=0,s=null,a=null,o=0;switch(n){case mt.LINE_TO:return this.getLineLength(t,e,r[0],r[1]);case mt.CURVE_TO:for(i=0,s=this.getPointOnCubicBezier(0,t,e,r[0],r[1],r[2],r[3],r[4],r[5]),o=.01;o<=1;o+=.01)a=this.getPointOnCubicBezier(o,t,e,r[0],r[1],r[2],r[3],r[4],r[5]),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return i;case mt.QUAD_TO:for(i=0,s=this.getPointOnQuadraticBezier(0,t,e,r[0],r[1],r[2],r[3]),o=.01;o<=1;o+=.01)a=this.getPointOnQuadraticBezier(o,t,e,r[0],r[1],r[2],r[3]),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return i;case mt.ARC:{i=0;const t=r[4],e=r[5],n=r[4]+e;let c=Math.PI/180;if(Math.abs(t-n)<c&&(c=Math.abs(t-n)),s=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],t,0),e<0)for(o=t-c;o>n;o-=c)a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],o,0),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;else for(o=t+c;o<n;o+=c)a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],o,0),i+=this.getLineLength(s.x,s.y,a.x,a.y),s=a;return a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],n,0),i+=this.getLineLength(s.x,s.y,a.x,a.y),i}}return 0}getPointOnLine(t,e,n,r,i){let s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:n;const o=(i-n)/(r-e+k);let c=Math.sqrt(t*t/(1+o*o));r<e&&(c*=-1);let l=o*c,h=null;if(r===e)h={x:s,y:a+l};else if((a-n)/(s-e+k)===o)h={x:s+c,y:a+l};else{let u=0,d=0;const p=this.getLineLength(e,n,r,i);if(p<k)return null;let f=(s-e)*(r-e)+(a-n)*(i-n);f/=p*p,u=e+f*(r-e),d=n+f*(i-n);const g=this.getLineLength(s,a,u,d),m=Math.sqrt(t*t-g*g);c=Math.sqrt(m*m/(1+o*o)),r<e&&(c*=-1),l=o*c,h={x:u+c,y:d+l}}return h}getPointOnPath(t){const e=this.getPathLength();let n=0,r=null;if(t<-5e-5||t-5e-5>e)return null;const{dataArray:i}=this;for(const e of i){if(e&&(e.pathLength<5e-5||n+e.pathLength+5e-5<t)){n+=e.pathLength;continue}const i=t-n;let s=0;switch(e.type){case mt.LINE_TO:r=this.getPointOnLine(i,e.start.x,e.start.y,e.points[0],e.points[1],e.start.x,e.start.y);break;case mt.ARC:{const t=e.points[4],n=e.points[5],a=e.points[4]+n;if(s=t+i/e.pathLength*n,n<0&&s<a||n>=0&&s>a)break;r=this.getPointOnEllipticalArc(e.points[0],e.points[1],e.points[2],e.points[3],s,e.points[6]);break}case mt.CURVE_TO:s=i/e.pathLength,s>1&&(s=1),r=this.getPointOnCubicBezier(s,e.start.x,e.start.y,e.points[0],e.points[1],e.points[2],e.points[3],e.points[4],e.points[5]);break;case mt.QUAD_TO:s=i/e.pathLength,s>1&&(s=1),r=this.getPointOnQuadraticBezier(s,e.start.x,e.start.y,e.points[0],e.points[1],e.points[2],e.points[3])}if(r)return r;break}return null}getLineLength(t,e,n,r){return Math.sqrt((n-t)*(n-t)+(r-e)*(r-e))}getPathLength(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce(((t,e)=>e.pathLength>0?t+e.pathLength:t),0)),this.pathLength}getPointOnCubicBezier(t,e,n,r,i,s,a,o,c){return{x:o*D(t)+s*L(t)+r*z(t)+e*N(t),y:c*D(t)+a*L(t)+i*z(t)+n*N(t)}}getPointOnQuadraticBezier(t,e,n,r,i,s,a){return{x:s*I(t)+r*B(t)+e*F(t),y:a*I(t)+i*B(t)+n*F(t)}}getPointOnEllipticalArc(t,e,n,r,i,s){const a=Math.cos(s),o=Math.sin(s),c=n*Math.cos(i),l=r*Math.sin(i);return{x:t+(c*a-l*o),y:e+(c*o+l*a)}}buildEquidistantCache(t,e){const n=this.getPathLength(),r=e||.25,i=t||n/100;if(!this.equidistantCache||this.equidistantCache.step!==i||this.equidistantCache.precision!==r){this.equidistantCache={step:i,precision:r,points:[]};let t=0;for(let e=0;e<=n;e+=r){const n=this.getPointOnPath(e),s=this.getPointOnPath(e+r);n&&s&&(t+=this.getLineLength(n.x,n.y,s.x,s.y),t>=i&&(this.equidistantCache.points.push({x:n.x,y:n.y,distance:e}),t-=i))}}}getEquidistantPointOnPath(t,e,n){if(this.buildEquidistantCache(e,n),t<0||t-this.getPathLength()>5e-5)return null;const r=Math.round(t/this.getPathLength()*(this.equidistantCache.points.length-1));return this.equidistantCache.points[r]||null}constructor(t,e,n){super(t,e,n),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]);const r=this.getHrefAttribute().getDefinition();this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(r)}}const Wt=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Gt extends dt{async loadImage(t){try{const e=await this.document.createImage(t);this.image=e}catch(e){console.error('Error while loading image "'.concat(t,'":'),e)}this.loaded=!0}async loadSvg(t){const e=Wt.exec(t);if(e){const t=e[5];t&&("base64"===e[4]?this.image=atob(t):this.image=decodeURIComponent(t))}else try{const e=await this.document.fetch(t),n=await e.text();this.image=n}catch(e){console.error('Error while loading image "'.concat(t,'":'),e)}this.loaded=!0}renderChildren(t){const{document:e,image:n,loaded:r}=this,i=this.getAttribute("x").getPixels("x"),s=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),o=this.getStyle("height").getPixels("y");if(r&&n&&a&&o){if(t.save(),t.translate(i,s),"string"==typeof n){const r=e.canvg.forkString(t,n,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:o}),{documentElement:i}=r.document;i&&(i.parent=this),r.render()}else e.setViewBox({ctx:t,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:n.width,height:o,desiredHeight:n.height}),this.loaded&&("complete"in n&&!n.complete||t.drawImage(n,0,0));t.restore()}}getBoundingBox(){const t=this.getAttribute("x").getPixels("x"),e=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),r=this.getStyle("height").getPixels("y");return new ut(t,e,t+n,e+r)}constructor(t,e,n){super(t,e,n),this.type="image",this.loaded=!1;const r=this.getHrefAttribute().getString();if(!r)return;const i=r.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(r);t.images.push(this),i?this.loadSvg(r):this.loadImage(r)}}class Ut extends dt{render(t){}constructor(...t){super(...t),this.type="symbol"}}class Xt{async load(t,e){try{const{document:n}=this,r=(await n.canvg.parser.load(e)).getElementsByTagName("font");Array.from(r).forEach((e=>{const r=n.createElement(e);n.definitions[t]=r}))}catch(t){console.error('Error while loading font "'.concat(e,'":'),t)}this.loaded=!0}constructor(t){this.document=t,this.loaded=!1,t.fonts.push(this)}}class Yt extends st{constructor(t,e,n){super(t,e,n),this.type="style";u(Array.from(e.childNodes).map((t=>t.textContent)).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach((e=>{const n=e.trim();if(!n)return;const r=n.split("{"),i=r[0].split(","),s=r[1].split(";");i.forEach((e=>{const n=e.trim();if(!n)return;const r=t.styles[n]||{};if(s.forEach((e=>{const n=e.indexOf(":"),i=e.substr(0,n).trim(),s=e.substr(n+1,e.length-n).trim();i&&s&&(r[i]=new V(t,i,s))})),t.styles[n]=r,t.stylesSpecificity[n]=E(n),"@font-face"===n){const e=r["font-family"].getString().replace(/"|'/g,"");r.src.getString().split(",").forEach((n=>{if(n.indexOf('format("svg")')>0){const r=x(n);r&&new Xt(t).load(e,r)}}))}}))}))}}Yt.parseExternalUrl=x;class $t extends dt{setContext(t){super.setContext(t);const e=this.getAttribute("x"),n=this.getAttribute("y");e.hasValue()&&t.translate(e.getPixels("x"),0),n.hasValue()&&t.translate(0,n.getPixels("y"))}path(t){const{element:e}=this;e&&e.path(t)}renderChildren(t){const{document:e,element:n}=this;if(n){let r=n;if("symbol"===n.type&&(r=new xt(e),r.attributes.viewBox=new V(e,"viewBox",n.getAttribute("viewBox").getString()),r.attributes.preserveAspectRatio=new V(e,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),r.attributes.overflow=new V(e,"overflow",n.getAttribute("overflow").getString()),r.children=n.children,n.styles.opacity=new V(e,"opacity",this.calculateOpacity())),"svg"===r.type){const t=this.getStyle("width",!1,!0),n=this.getStyle("height",!1,!0);t.hasValue()&&(r.attributes.width=new V(e,"width",t.getString())),n.hasValue()&&(r.attributes.height=new V(e,"height",n.getString()))}const i=r.parent;r.parent=this,r.render(t),r.parent=i}}getBoundingBox(t){const{element:e}=this;return e?e.getBoundingBox(t):null}elementTransform(){const{document:t,element:e}=this;return e?it.fromElement(t,e):null}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}constructor(...t){super(...t),this.type="use"}}function qt(t,e,n,r,i,s){return t[n*r*4+4*e+s]}function Kt(t,e,n,r,i,s,a){t[n*r*4+4*e+s]=a}function Zt(t,e,n){return t[e]*n}function Qt(t,e,n,r){return e+Math.cos(t)*n+Math.sin(t)*r}class Jt extends st{apply(t,e,n,r,i){const{includeOpacity:s,matrix:a}=this,o=t.getImageData(0,0,r,i);for(let t=0;t<i;t++)for(let e=0;e<r;e++){const n=qt(o.data,e,t,r,0,0),i=qt(o.data,e,t,r,0,1),c=qt(o.data,e,t,r,0,2),l=qt(o.data,e,t,r,0,3);let h=Zt(a,0,n)+Zt(a,1,i)+Zt(a,2,c)+Zt(a,3,l)+Zt(a,4,1),u=Zt(a,5,n)+Zt(a,6,i)+Zt(a,7,c)+Zt(a,8,l)+Zt(a,9,1),d=Zt(a,10,n)+Zt(a,11,i)+Zt(a,12,c)+Zt(a,13,l)+Zt(a,14,1),p=Zt(a,15,n)+Zt(a,16,i)+Zt(a,17,c)+Zt(a,18,l)+Zt(a,19,1);s&&(h=0,u=0,d=0,p*=l/255),Kt(o.data,e,t,r,0,0,h),Kt(o.data,e,t,r,0,1,u),Kt(o.data,e,t,r,0,2,d),Kt(o.data,e,t,r,0,3,p)}t.clearRect(0,0,r,i),t.putImageData(o,0,0)}constructor(t,e,n){super(t,e,n),this.type="feColorMatrix";let r=f(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":{const t=r[0];r=[.213+.787*t,.715-.715*t,.072-.072*t,0,0,.213-.213*t,.715+.285*t,.072-.072*t,0,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,0,1,0,0,0,0,0,1];break}case"hueRotate":{const t=r[0]*Math.PI/180;r=[Qt(t,.213,.787,-.213),Qt(t,.715,-.715,-.715),Qt(t,.072,-.072,.928),0,0,Qt(t,.213,-.213,.143),Qt(t,.715,.285,.14),Qt(t,.072,-.072,-.283),0,0,Qt(t,.213,-.213,-.787),Qt(t,.715,-.715,.715),Qt(t,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break}case"luminanceToAlpha":r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.matrix=r,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}}class te extends st{apply(t,e){const{document:n}=this;let r=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),s=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(!s&&!a){const e=new ut;this.children.forEach((n=>{e.addBoundingBox(n.getBoundingBox(t))})),r=Math.floor(e.x1),i=Math.floor(e.y1),s=Math.floor(e.width),a=Math.floor(e.height)}const o=this.removeStyles(e,te.ignoreStyles),c=n.createCanvas(r+s,i+a),l=c.getContext("2d");n.screen.setDefaults(l),this.renderChildren(l),new Jt(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(l,0,0,r+s,i+a);const h=n.createCanvas(r+s,i+a),u=h.getContext("2d");n.screen.setDefaults(u),e.render(u),u.globalCompositeOperation="destination-in",u.fillStyle=l.createPattern(c,"no-repeat"),u.fillRect(0,0,r+s,i+a),t.fillStyle=u.createPattern(h,"no-repeat"),t.fillRect(0,0,r+s,i+a),this.restoreStyles(e,o)}render(t){}constructor(...t){super(...t),this.type="mask"}}te.ignoreStyles=["mask","transform","clip-path"];const ee=()=>{};class ne extends st{apply(t){const{document:e}=this,n=Reflect.getPrototypeOf(t),{beginPath:r,closePath:i}=t;n&&(n.beginPath=ee,n.closePath=ee),Reflect.apply(r,t,[]),this.children.forEach((r=>{if(!("path"in r))return;let s="elementTransform"in r?r.elementTransform():null;s||(s=it.fromElement(e,r)),s&&s.apply(t),r.path(t),n&&(n.closePath=i),s&&s.unapply(t)})),Reflect.apply(i,t,[]),t.clip(),n&&(n.beginPath=r,n.closePath=i)}render(t){}constructor(...t){super(...t),this.type="clipPath"}}class re extends st{apply(t,e){const{document:n,children:r}=this,i="getBoundingBox"in e?e.getBoundingBox(t):null;if(!i)return;let s=0,a=0;r.forEach((t=>{const e=t.extraFilterDistance||0;s=Math.max(s,e),a=Math.max(a,e)}));const o=Math.floor(i.width),c=Math.floor(i.height),l=o+2*s,h=c+2*a;if(l<1||h<1)return;const u=Math.floor(i.x),d=Math.floor(i.y),p=this.removeStyles(e,re.ignoreStyles),f=n.createCanvas(l,h),g=f.getContext("2d");n.screen.setDefaults(g),g.translate(-u+s,-d+a),e.render(g),r.forEach((t=>{"function"==typeof t.apply&&t.apply(g,0,0,l,h)})),t.drawImage(f,0,0,l,h,u-s,d-a,l,h),this.restoreStyles(e,p)}render(t){}constructor(...t){super(...t),this.type="filter"}}re.ignoreStyles=["filter","transform","clip-path"];class ie extends st{apply(t,e,n,r,i){}constructor(t,e,n){super(t,e,n),this.type="feDropShadow",this.addStylesFromStyleDefinition()}}class se extends st{apply(t,e,n,r,i){}constructor(...t){super(...t),this.type="feMorphology"}}class ae extends st{apply(t,e,n,r,i){}constructor(...t){super(...t),this.type="feComposite"}}class oe extends st{apply(t,e,n,r,i){const{document:s,blurRadius:o}=this,c=s.window?s.window.document.body:null,l=t.canvas;l.id=s.getUniqueId(),c&&(l.style.display="none",c.appendChild(l)),a.canvasRGBA(l,e,n,r,i,o),c&&c.removeChild(l)}constructor(t,e,n){super(t,e,n),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}}class ce extends st{constructor(...t){super(...t),this.type="title"}}class le extends st{constructor(...t){super(...t),this.type="desc"}}const he={svg:xt,rect:vt,circle:bt,ellipse:wt,line:Ct,polyline:Mt,polygon:St,path:yt,pattern:_t,marker:Pt,defs:At,linearGradient:Rt,radialGradient:jt,stop:Tt,animate:Dt,animateColor:Lt,animateTransform:zt,font:Ft,"font-face":Nt,"missing-glyph":Bt,glyph:It,text:pt,tspan:ft,tref:Vt,a:Ht,textPath:Ot,image:Gt,g:Et,symbol:Ut,style:Yt,use:$t,mask:te,clipPath:ne,filter:re,feDropShadow:ie,feMorphology:se,feComposite:ae,feColorMatrix:Jt,feGaussianBlur:oe,title:ce,desc:le};class ue{bindCreateImage(t,e){return"boolean"==typeof e?(n,r)=>t(n,"boolean"==typeof r?r:e):t}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){const{emSizeStack:t}=this;return t[t.length-1]||12}set emSize(t){const{emSizeStack:e}=this;e.push(t)}popEmSize(){const{emSizeStack:t}=this;t.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every((t=>t.loaded))}isFontsLoaded(){return this.fonts.every((t=>t.loaded))}createDocumentElement(t){const e=this.createElement(t.documentElement);return e.root=!0,e.addStylesFromStyleDefinition(),this.documentElement=e,e}createElement(t){const e=t.nodeName.replace(/^[^:]+:/,""),n=ue.elementTypes[e];return n?new n(this,t):new at(this,t)}createTextNode(t){return new gt(this,t)}setViewBox(t){this.screen.setViewBox({document:this,...t})}constructor(t,{rootEmSize:e=12,emSize:n=12,createCanvas:r=ue.createCanvas,createImage:i=ue.createImage,anonymousCrossOrigin:s}={}){this.canvg=t,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=t.screen,this.rootEmSize=e,this.emSize=n,this.createCanvas=r,this.createImage=this.bindCreateImage(i,s),this.screen.wait((()=>this.isImagesLoaded())),this.screen.wait((()=>this.isFontsLoaded()))}}ue.createCanvas=function(t,e){const n=document.createElement("canvas");return n.width=t,n.height=e,n},ue.createImage=async function(t){let e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("img");return e&&(n.crossOrigin="Anonymous"),new Promise(((e,r)=>{n.onload=()=>{e(n)},n.onerror=(t,e,n,i,s)=>{r(s)},n.src=t}))},ue.elementTypes=he;class de{static async from(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new K(n),i=await r.parse(e);return new de(t,i,n)}static fromString(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=new K(n).parseFromString(e);return new de(t,r,n)}fork(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return de.from(t,e,{...this.options,...n})}forkString(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return de.fromString(t,e,{...this.options,...n})}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}async render(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.start({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0,...t}),await this.ready(),this.stop()}start(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{documentElement:e,screen:n,options:r}=this;n.start(e,{enableRedraw:!0,...r,...t})}stop(){this.screen.stop()}resize(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.documentElement.resize(t,e,n)}constructor(t,e,n={}){this.parser=new K(n),this.screen=new Y(t,n),this.options=n;const r=new ue(this,n),i=r.createDocumentElement(e);this.document=r,this.documentElement=i}}e.AElement=Ht,e.AnimateColorElement=Lt,e.AnimateElement=Dt,e.AnimateTransformElement=zt,e.BoundingBox=ut,e.CB1=D,e.CB2=L,e.CB3=z,e.CB4=N,e.Canvg=de,e.CircleElement=bt,e.ClipPathElement=ne,e.DefsElement=At,e.DescElement=le,e.Document=ue,e.Element=st,e.EllipseElement=wt,e.FeColorMatrixElement=Jt,e.FeCompositeElement=ae,e.FeDropShadowElement=ie,e.FeGaussianBlurElement=oe,e.FeMorphologyElement=se,e.FilterElement=re,e.Font=ht,e.FontElement=Ft,e.FontFaceElement=Nt,e.GElement=Et,e.GlyphElement=It,e.GradientElement=kt,e.ImageElement=Gt,e.LineElement=Ct,e.LinearGradientElement=Rt,e.MarkerElement=Pt,e.MaskElement=te,e.Matrix=tt,e.MissingGlyphElement=Bt,e.Mouse=G,e.PSEUDO_ZERO=k,e.Parser=K,e.PathElement=yt,e.PathParser=mt,e.PatternElement=_t,e.Point=W,e.PolygonElement=St,e.PolylineElement=Mt,e.Property=V,e.QB1=I,e.QB2=B,e.QB3=F,e.RadialGradientElement=jt,e.RectElement=vt,e.RenderedElement=dt,e.Rotate=Q,e.SVGElement=xt,e.SVGFontLoader=Xt,e.Scale=J,e.Screen=Y,e.Skew=et,e.SkewX=nt,e.SkewY=rt,e.StopElement=Tt,e.StyleElement=Yt,e.SymbolElement=Ut,e.TRefElement=Vt,e.TSpanElement=ft,e.TextElement=pt,e.TextPathElement=Ot,e.TitleElement=ce,e.Transform=it,e.Translate=Z,e.UnknownElement=at,e.UseElement=$t,e.ViewPort=H,e.compressSpaces=u,e.elements=he,e.getSelectorSpecificity=E,e.normalizeAttributeName=y,e.normalizeColor=v,e.parseExternalUrl=x,e.presets=h,e.toMatrixValue=g,e.toNumbers=f,e.trimLeft=d,e.trimRight=p,e.vectorMagnitude=R,e.vectorsAngle=T,e.vectorsRatio=j},"./node_modules/svg-pathdata/lib/SVGPathData.cjs":function(t,e){!function(t){"use strict";var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,n)};function n(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r=" ";function i(t){var e="";Array.isArray(t)||(t=[t]);for(var n=0;n<t.length;n++){var i=t[n];if(i.type===b.CLOSE_PATH)e+="z";else if(i.type===b.HORIZ_LINE_TO)e+=(i.relative?"h":"H")+i.x;else if(i.type===b.VERT_LINE_TO)e+=(i.relative?"v":"V")+i.y;else if(i.type===b.MOVE_TO)e+=(i.relative?"m":"M")+i.x+r+i.y;else if(i.type===b.LINE_TO)e+=(i.relative?"l":"L")+i.x+r+i.y;else if(i.type===b.CURVE_TO)e+=(i.relative?"c":"C")+i.x1+r+i.y1+r+i.x2+r+i.y2+r+i.x+r+i.y;else if(i.type===b.SMOOTH_CURVE_TO)e+=(i.relative?"s":"S")+i.x2+r+i.y2+r+i.x+r+i.y;else if(i.type===b.QUAD_TO)e+=(i.relative?"q":"Q")+i.x1+r+i.y1+r+i.x+r+i.y;else if(i.type===b.SMOOTH_QUAD_TO)e+=(i.relative?"t":"T")+i.x+r+i.y;else{if(i.type!==b.ARC)throw new Error('Unexpected command type "'+i.type+'" at index '+n+".");e+=(i.relative?"a":"A")+i.rX+r+i.rY+r+i.xRot+r+ +i.lArcFlag+r+ +i.sweepFlag+r+i.x+r+i.y}}return e}function s(t,e){var n=t[0],r=t[1];return[n*Math.cos(e)-r*Math.sin(e),n*Math.sin(e)+r*Math.cos(e)]}function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=0;n<t.length;n++)if("number"!=typeof t[n])throw new Error("assertNumbers arguments["+n+"] is not a number. "+typeof t[n]+" == typeof "+t[n]);return!0}var o=Math.PI;function c(t,e,n){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var r=t.rX,i=t.rY,a=t.x,c=t.y;r=Math.abs(t.rX),i=Math.abs(t.rY);var l=s([(e-a)/2,(n-c)/2],-t.xRot/180*o),h=l[0],u=l[1],d=Math.pow(h,2)/Math.pow(r,2)+Math.pow(u,2)/Math.pow(i,2);1<d&&(r*=Math.sqrt(d),i*=Math.sqrt(d)),t.rX=r,t.rY=i;var p=Math.pow(r,2)*Math.pow(u,2)+Math.pow(i,2)*Math.pow(h,2),f=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(r,2)*Math.pow(i,2)-p)/p)),g=r*u/i*f,m=-i*h/r*f,y=s([g,m],t.xRot/180*o);t.cX=y[0]+(e+a)/2,t.cY=y[1]+(n+c)/2,t.phi1=Math.atan2((u-m)/i,(h-g)/r),t.phi2=Math.atan2((-u-m)/i,(-h-g)/r),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*o),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*o),t.phi1*=180/o,t.phi2*=180/o}function l(t,e,n){a(t,e,n);var r=t*t+e*e-n*n;if(0>r)return[];if(0===r)return[[t*n/(t*t+e*e),e*n/(t*t+e*e)]];var i=Math.sqrt(r);return[[(t*n+e*i)/(t*t+e*e),(e*n-t*i)/(t*t+e*e)],[(t*n-e*i)/(t*t+e*e),(e*n+t*i)/(t*t+e*e)]]}var h=Math.PI/180;function u(t,e,n){return(1-n)*t+n*e}function d(t,e,n,r){return t+Math.cos(r/180*o)*e+Math.sin(r/180*o)*n}function p(t,e,n,r){var i=1e-6,s=e-t,a=n-e,o=3*s+3*(r-n)-6*a,c=6*(a-s),l=3*s;return Math.abs(o)<i?[-l/c]:function(t,e,n){void 0===n&&(n=1e-6);var r=t*t/4-e;if(r<-n)return[];if(r<=n)return[-t/2];var i=Math.sqrt(r);return[-t/2-i,-t/2+i]}(c/o,l/o,i)}function f(t,e,n,r,i){var s=1-i;return t*(s*s*s)+e*(3*s*s*i)+n*(3*s*i*i)+r*(i*i*i)}t.SVGPathDataTransformer=void 0,function(t){function e(){return i((function(t,e,n){return t.relative&&(void 0!==t.x1&&(t.x1+=e),void 0!==t.y1&&(t.y1+=n),void 0!==t.x2&&(t.x2+=e),void 0!==t.y2&&(t.y2+=n),void 0!==t.x&&(t.x+=e),void 0!==t.y&&(t.y+=n),t.relative=!1),t}))}function n(){var t=NaN,e=NaN,n=NaN,r=NaN;return i((function(i,s,a){return i.type&b.SMOOTH_CURVE_TO&&(i.type=b.CURVE_TO,t=isNaN(t)?s:t,e=isNaN(e)?a:e,i.x1=i.relative?s-t:2*s-t,i.y1=i.relative?a-e:2*a-e),i.type&b.CURVE_TO?(t=i.relative?s+i.x2:i.x2,e=i.relative?a+i.y2:i.y2):(t=NaN,e=NaN),i.type&b.SMOOTH_QUAD_TO&&(i.type=b.QUAD_TO,n=isNaN(n)?s:n,r=isNaN(r)?a:r,i.x1=i.relative?s-n:2*s-n,i.y1=i.relative?a-r:2*a-r),i.type&b.QUAD_TO?(n=i.relative?s+i.x1:i.x1,r=i.relative?a+i.y1:i.y1):(n=NaN,r=NaN),i}))}function r(){var t=NaN,e=NaN;return i((function(n,r,i){if(n.type&b.SMOOTH_QUAD_TO&&(n.type=b.QUAD_TO,t=isNaN(t)?r:t,e=isNaN(e)?i:e,n.x1=n.relative?r-t:2*r-t,n.y1=n.relative?i-e:2*i-e),n.type&b.QUAD_TO){t=n.relative?r+n.x1:n.x1,e=n.relative?i+n.y1:n.y1;var s=n.x1,a=n.y1;n.type=b.CURVE_TO,n.x1=((n.relative?0:r)+2*s)/3,n.y1=((n.relative?0:i)+2*a)/3,n.x2=(n.x+2*s)/3,n.y2=(n.y+2*a)/3}else t=NaN,e=NaN;return n}))}function i(t){var e=0,n=0,r=NaN,i=NaN;return function(s){if(isNaN(r)&&!(s.type&b.MOVE_TO))throw new Error("path must start with moveto");var a=t(s,e,n,r,i);return s.type&b.CLOSE_PATH&&(e=r,n=i),void 0!==s.x&&(e=s.relative?e+s.x:s.x),void 0!==s.y&&(n=s.relative?n+s.y:s.y),s.type&b.MOVE_TO&&(r=e,i=n),a}}function o(t,e,n,r,s,o){return a(t,e,n,r,s,o),i((function(i,a,c,l){var h=i.x1,u=i.x2,d=i.relative&&!isNaN(l),p=void 0!==i.x?i.x:d?0:a,f=void 0!==i.y?i.y:d?0:c;function g(t){return t*t}i.type&b.HORIZ_LINE_TO&&0!==e&&(i.type=b.LINE_TO,i.y=i.relative?0:c),i.type&b.VERT_LINE_TO&&0!==n&&(i.type=b.LINE_TO,i.x=i.relative?0:a),void 0!==i.x&&(i.x=i.x*t+f*n+(d?0:s)),void 0!==i.y&&(i.y=p*e+i.y*r+(d?0:o)),void 0!==i.x1&&(i.x1=i.x1*t+i.y1*n+(d?0:s)),void 0!==i.y1&&(i.y1=h*e+i.y1*r+(d?0:o)),void 0!==i.x2&&(i.x2=i.x2*t+i.y2*n+(d?0:s)),void 0!==i.y2&&(i.y2=u*e+i.y2*r+(d?0:o));var m=t*r-e*n;if(void 0!==i.xRot&&(1!==t||0!==e||0!==n||1!==r))if(0===m)delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag,i.type=b.LINE_TO;else{var y=i.xRot*Math.PI/180,x=Math.sin(y),v=Math.cos(y),w=1/g(i.rX),C=1/g(i.rY),M=g(v)*w+g(x)*C,S=2*x*v*(w-C),_=g(x)*w+g(v)*C,P=M*r*r-S*e*r+_*e*e,A=S*(t*r+e*n)-2*(M*n*r+_*t*e),E=M*n*n-S*t*n+_*t*t,k=(Math.atan2(A,P-E)+Math.PI)%Math.PI/2,R=Math.sin(k),j=Math.cos(k);i.rX=Math.abs(m)/Math.sqrt(P*g(j)+A*R*j+E*g(R)),i.rY=Math.abs(m)/Math.sqrt(P*g(R)-A*R*j+E*g(j)),i.xRot=180*k/Math.PI}return void 0!==i.sweepFlag&&0>m&&(i.sweepFlag=+!i.sweepFlag),i}))}function g(){return function(t){var e={};for(var n in t)e[n]=t[n];return e}}t.ROUND=function(t){function e(e){return Math.round(e*t)/t}return void 0===t&&(t=1e13),a(t),function(t){return void 0!==t.x1&&(t.x1=e(t.x1)),void 0!==t.y1&&(t.y1=e(t.y1)),void 0!==t.x2&&(t.x2=e(t.x2)),void 0!==t.y2&&(t.y2=e(t.y2)),void 0!==t.x&&(t.x=e(t.x)),void 0!==t.y&&(t.y=e(t.y)),void 0!==t.rX&&(t.rX=e(t.rX)),void 0!==t.rY&&(t.rY=e(t.rY)),t}},t.TO_ABS=e,t.TO_REL=function(){return i((function(t,e,n){return t.relative||(void 0!==t.x1&&(t.x1-=e),void 0!==t.y1&&(t.y1-=n),void 0!==t.x2&&(t.x2-=e),void 0!==t.y2&&(t.y2-=n),void 0!==t.x&&(t.x-=e),void 0!==t.y&&(t.y-=n),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,e,n){return void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===n&&(n=!0),i((function(r,i,s,a,o){if(isNaN(a)&&!(r.type&b.MOVE_TO))throw new Error("path must start with moveto");return e&&r.type&b.HORIZ_LINE_TO&&(r.type=b.LINE_TO,r.y=r.relative?0:s),n&&r.type&b.VERT_LINE_TO&&(r.type=b.LINE_TO,r.x=r.relative?0:i),t&&r.type&b.CLOSE_PATH&&(r.type=b.LINE_TO,r.x=r.relative?a-i:a,r.y=r.relative?o-s:o),r.type&b.ARC&&(0===r.rX||0===r.rY)&&(r.type=b.LINE_TO,delete r.rX,delete r.rY,delete r.xRot,delete r.lArcFlag,delete r.sweepFlag),r}))},t.NORMALIZE_ST=n,t.QT_TO_C=r,t.INFO=i,t.SANITIZE=function(t){void 0===t&&(t=0),a(t);var e=NaN,n=NaN,r=NaN,s=NaN;return i((function(i,a,o,c,l){var h=Math.abs,u=!1,d=0,p=0;if(i.type&b.SMOOTH_CURVE_TO&&(d=isNaN(e)?0:a-e,p=isNaN(n)?0:o-n),i.type&(b.CURVE_TO|b.SMOOTH_CURVE_TO)?(e=i.relative?a+i.x2:i.x2,n=i.relative?o+i.y2:i.y2):(e=NaN,n=NaN),i.type&b.SMOOTH_QUAD_TO?(r=isNaN(r)?a:2*a-r,s=isNaN(s)?o:2*o-s):i.type&b.QUAD_TO?(r=i.relative?a+i.x1:i.x1,s=i.relative?o+i.y1:i.y2):(r=NaN,s=NaN),i.type&b.LINE_COMMANDS||i.type&b.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&b.CURVE_TO||i.type&b.SMOOTH_CURVE_TO||i.type&b.QUAD_TO||i.type&b.SMOOTH_QUAD_TO){var f=void 0===i.x?0:i.relative?i.x:i.x-a,g=void 0===i.y?0:i.relative?i.y:i.y-o;d=isNaN(r)?void 0===i.x1?d:i.relative?i.x:i.x1-a:r-a,p=isNaN(s)?void 0===i.y1?p:i.relative?i.y:i.y1-o:s-o;var m=void 0===i.x2?0:i.relative?i.x:i.x2-a,y=void 0===i.y2?0:i.relative?i.y:i.y2-o;h(f)<=t&&h(g)<=t&&h(d)<=t&&h(p)<=t&&h(m)<=t&&h(y)<=t&&(u=!0)}return i.type&b.CLOSE_PATH&&h(a-c)<=t&&h(o-l)<=t&&(u=!0),u?[]:i}))},t.MATRIX=o,t.ROTATE=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=0),a(t,e,n);var r=Math.sin(t),i=Math.cos(t);return o(i,r,-r,i,e-e*i+n*r,n-e*r-n*i)},t.TRANSLATE=function(t,e){return void 0===e&&(e=0),a(t,e),o(1,0,0,1,t,e)},t.SCALE=function(t,e){return void 0===e&&(e=t),a(t,e),o(t,0,0,e,0,0)},t.SKEW_X=function(t){return a(t),o(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return a(t),o(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),a(t),o(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),a(t),o(1,0,0,-1,0,t)},t.A_TO_C=function(){return i((function(t,e,n){return b.ARC===t.type?function(t,e,n){var r,i,a,o;t.cX||c(t,e,n);for(var l=Math.min(t.phi1,t.phi2),d=Math.max(t.phi1,t.phi2)-l,p=Math.ceil(d/90),f=new Array(p),g=e,m=n,y=0;y<p;y++){var x=u(t.phi1,t.phi2,y/p),v=u(t.phi1,t.phi2,(y+1)/p),w=v-x,C=4/3*Math.tan(w*h/4),M=[Math.cos(x*h)-C*Math.sin(x*h),Math.sin(x*h)+C*Math.cos(x*h)],S=M[0],_=M[1],P=[Math.cos(v*h),Math.sin(v*h)],A=P[0],E=P[1],k=[A+C*Math.sin(v*h),E-C*Math.cos(v*h)],R=k[0],j=k[1];f[y]={relative:t.relative,type:b.CURVE_TO};var T=function(e,n){var r=s([e*t.rX,n*t.rY],t.xRot),i=r[0],a=r[1];return[t.cX+i,t.cY+a]};r=T(S,_),f[y].x1=r[0],f[y].y1=r[1],i=T(R,j),f[y].x2=i[0],f[y].y2=i[1],a=T(A,E),f[y].x=a[0],f[y].y=a[1],t.relative&&(f[y].x1-=g,f[y].y1-=m,f[y].x2-=g,f[y].y2-=m,f[y].x-=g,f[y].y-=m),g=(o=[f[y].x,f[y].y])[0],m=o[1]}return f}(t,t.relative?0:e,t.relative?0:n):t}))},t.ANNOTATE_ARCS=function(){return i((function(t,e,n){return t.relative&&(e=0,n=0),b.ARC===t.type&&c(t,e,n),t}))},t.CLONE=g,t.CALCULATE_BOUNDS=function(){var t=function(t){var e={};for(var n in t)e[n]=t[n];return e},s=e(),a=r(),o=n(),h=i((function(e,n,r){var i=o(a(s(t(e))));function u(t){t>h.maxX&&(h.maxX=t),t<h.minX&&(h.minX=t)}function g(t){t>h.maxY&&(h.maxY=t),t<h.minY&&(h.minY=t)}if(i.type&b.DRAWING_COMMANDS&&(u(n),g(r)),i.type&b.HORIZ_LINE_TO&&u(i.x),i.type&b.VERT_LINE_TO&&g(i.y),i.type&b.LINE_TO&&(u(i.x),g(i.y)),i.type&b.CURVE_TO){u(i.x),g(i.y);for(var m=0,y=p(n,i.x1,i.x2,i.x);m<y.length;m++)0<(L=y[m])&&1>L&&u(f(n,i.x1,i.x2,i.x,L));for(var x=0,v=p(r,i.y1,i.y2,i.y);x<v.length;x++)0<(L=v[x])&&1>L&&g(f(r,i.y1,i.y2,i.y,L))}if(i.type&b.ARC){u(i.x),g(i.y),c(i,n,r);for(var w=i.xRot/180*Math.PI,C=Math.cos(w)*i.rX,M=Math.sin(w)*i.rX,S=-Math.sin(w)*i.rY,_=Math.cos(w)*i.rY,P=i.phi1<i.phi2?[i.phi1,i.phi2]:-180>i.phi2?[i.phi2+360,i.phi1+360]:[i.phi2,i.phi1],A=P[0],E=P[1],k=function(t){var e=t[0],n=t[1],r=180*Math.atan2(n,e)/Math.PI;return r<A?r+360:r},R=0,j=l(S,-C,0).map(k);R<j.length;R++)(L=j[R])>A&&L<E&&u(d(i.cX,C,S,L));for(var T=0,D=l(_,-M,0).map(k);T<D.length;T++){var L;(L=D[T])>A&&L<E&&g(d(i.cY,M,_,L))}}return e}));return h.minX=1/0,h.maxX=-1/0,h.minY=1/0,h.maxY=-1/0,h}}(t.SVGPathDataTransformer||(t.SVGPathDataTransformer={}));var g,m=function(){function e(){}return e.prototype.round=function(e){return this.transform(t.SVGPathDataTransformer.ROUND(e))},e.prototype.toAbs=function(){return this.transform(t.SVGPathDataTransformer.TO_ABS())},e.prototype.toRel=function(){return this.transform(t.SVGPathDataTransformer.TO_REL())},e.prototype.normalizeHVZ=function(e,n,r){return this.transform(t.SVGPathDataTransformer.NORMALIZE_HVZ(e,n,r))},e.prototype.normalizeST=function(){return this.transform(t.SVGPathDataTransformer.NORMALIZE_ST())},e.prototype.qtToC=function(){return this.transform(t.SVGPathDataTransformer.QT_TO_C())},e.prototype.aToC=function(){return this.transform(t.SVGPathDataTransformer.A_TO_C())},e.prototype.sanitize=function(e){return this.transform(t.SVGPathDataTransformer.SANITIZE(e))},e.prototype.translate=function(e,n){return this.transform(t.SVGPathDataTransformer.TRANSLATE(e,n))},e.prototype.scale=function(e,n){return this.transform(t.SVGPathDataTransformer.SCALE(e,n))},e.prototype.rotate=function(e,n,r){return this.transform(t.SVGPathDataTransformer.ROTATE(e,n,r))},e.prototype.matrix=function(e,n,r,i,s,a){return this.transform(t.SVGPathDataTransformer.MATRIX(e,n,r,i,s,a))},e.prototype.skewX=function(e){return this.transform(t.SVGPathDataTransformer.SKEW_X(e))},e.prototype.skewY=function(e){return this.transform(t.SVGPathDataTransformer.SKEW_Y(e))},e.prototype.xSymmetry=function(e){return this.transform(t.SVGPathDataTransformer.X_AXIS_SYMMETRY(e))},e.prototype.ySymmetry=function(e){return this.transform(t.SVGPathDataTransformer.Y_AXIS_SYMMETRY(e))},e.prototype.annotateArcs=function(){return this.transform(t.SVGPathDataTransformer.ANNOTATE_ARCS())},e}(),y=function(t){return" "===t||"\t"===t||"\r"===t||"\n"===t},x=function(t){return"0".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<="9".charCodeAt(0)},v=function(t){function e(){var e=t.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}return n(e,t),e.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(" ",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError("Unterminated command at the path end.");return t},e.prototype.parse=function(t,e){var n=this;void 0===e&&(e=[]);for(var r=function(t){e.push(t),n.curArgs.length=0,n.canParseCommandOrComma=!0},i=0;i<t.length;i++){var s=t[i],a=!(this.curCommandType!==b.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),o=x(s)&&("0"===this.curNumber&&"0"===s||a);if(!x(s)||o)if("e"!==s&&"E"!==s)if("-"!==s&&"+"!==s||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==s||this.curNumberHasExp||this.curNumberHasDecimal||a){if(this.curNumber&&-1!==this.curCommandType){var c=Number(this.curNumber);if(isNaN(c))throw new SyntaxError("Invalid number ending at "+i);if(this.curCommandType===b.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>c)throw new SyntaxError('Expected positive number, got "'+c+'" at index "'+i+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"');this.curArgs.push(c),this.curArgs.length===w[this.curCommandType]&&(b.HORIZ_LINE_TO===this.curCommandType?r({type:b.HORIZ_LINE_TO,relative:this.curCommandRelative,x:c}):b.VERT_LINE_TO===this.curCommandType?r({type:b.VERT_LINE_TO,relative:this.curCommandRelative,y:c}):this.curCommandType===b.MOVE_TO||this.curCommandType===b.LINE_TO||this.curCommandType===b.SMOOTH_QUAD_TO?(r({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),b.MOVE_TO===this.curCommandType&&(this.curCommandType=b.LINE_TO)):this.curCommandType===b.CURVE_TO?r({type:b.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===b.SMOOTH_CURVE_TO?r({type:b.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===b.QUAD_TO?r({type:b.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===b.ARC&&r({type:b.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!y(s))if(","===s&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==s&&"-"!==s&&"."!==s)if(o)this.curNumber=s,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+s+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==s&&"Z"!==s)if("h"===s||"H"===s)this.curCommandType=b.HORIZ_LINE_TO,this.curCommandRelative="h"===s;else if("v"===s||"V"===s)this.curCommandType=b.VERT_LINE_TO,this.curCommandRelative="v"===s;else if("m"===s||"M"===s)this.curCommandType=b.MOVE_TO,this.curCommandRelative="m"===s;else if("l"===s||"L"===s)this.curCommandType=b.LINE_TO,this.curCommandRelative="l"===s;else if("c"===s||"C"===s)this.curCommandType=b.CURVE_TO,this.curCommandRelative="c"===s;else if("s"===s||"S"===s)this.curCommandType=b.SMOOTH_CURVE_TO,this.curCommandRelative="s"===s;else if("q"===s||"Q"===s)this.curCommandType=b.QUAD_TO,this.curCommandRelative="q"===s;else if("t"===s||"T"===s)this.curCommandType=b.SMOOTH_QUAD_TO,this.curCommandRelative="t"===s;else{if("a"!==s&&"A"!==s)throw new SyntaxError('Unexpected character "'+s+'" at index '+i+".");this.curCommandType=b.ARC,this.curCommandRelative="a"===s}else e.push({type:b.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=s,this.curNumberHasDecimal="."===s}else this.curNumber+=s,this.curNumberHasDecimal=!0;else this.curNumber+=s;else this.curNumber+=s,this.curNumberHasExp=!0;else this.curNumber+=s,this.curNumberHasExpDigits=this.curNumberHasExp}return e},e.prototype.transform=function(t){return Object.create(this,{parse:{value:function(e,n){void 0===n&&(n=[]);for(var r=0,i=Object.getPrototypeOf(this).parse.call(this,e);r<i.length;r++){var s=i[r],a=t(s);Array.isArray(a)?n.push.apply(n,a):n.push(a)}return n}}})},e}(m),b=function(e){function r(t){var n=e.call(this)||this;return n.commands="string"==typeof t?r.parse(t):t,n}return n(r,e),r.prototype.encode=function(){return r.encode(this.commands)},r.prototype.getBounds=function(){var e=t.SVGPathDataTransformer.CALCULATE_BOUNDS();return this.transform(e),e},r.prototype.transform=function(t){for(var e=[],n=0,r=this.commands;n<r.length;n++){var i=t(r[n]);Array.isArray(i)?e.push.apply(e,i):e.push(i)}return this.commands=e,this},r.encode=function(t){return i(t)},r.parse=function(t){var e=new v,n=[];return e.parse(t,n),e.finish(n),n},r.CLOSE_PATH=1,r.MOVE_TO=2,r.HORIZ_LINE_TO=4,r.VERT_LINE_TO=8,r.LINE_TO=16,r.CURVE_TO=32,r.SMOOTH_CURVE_TO=64,r.QUAD_TO=128,r.SMOOTH_QUAD_TO=256,r.ARC=512,r.LINE_COMMANDS=r.LINE_TO|r.HORIZ_LINE_TO|r.VERT_LINE_TO,r.DRAWING_COMMANDS=r.HORIZ_LINE_TO|r.VERT_LINE_TO|r.LINE_TO|r.CURVE_TO|r.SMOOTH_CURVE_TO|r.QUAD_TO|r.SMOOTH_QUAD_TO|r.ARC,r}(m),w=((g={})[b.MOVE_TO]=2,g[b.LINE_TO]=2,g[b.HORIZ_LINE_TO]=1,g[b.VERT_LINE_TO]=1,g[b.CLOSE_PATH]=0,g[b.QUAD_TO]=4,g[b.SMOOTH_QUAD_TO]=2,g[b.CURVE_TO]=6,g[b.SMOOTH_CURVE_TO]=4,g[b.ARC]=7,g);t.COMMAND_ARG_COUNTS=w,t.SVGPathData=b,t.SVGPathDataParser=v,t.encodeSVGPath=i,Object.defineProperty(t,"__esModule",{value:!0})}(e)}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}return n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0,n("./src/index.js")})())); //# sourceMappingURL=draw2d.js.map \ No newline at end of file diff --git a/dist/draw2d.js.map b/dist/draw2d.js.map index 2616f730..246853e7 100644 --- a/dist/draw2d.js.map +++ b/dist/draw2d.js.map @@ -1 +1 @@ -{"version":3,"file":"draw2d.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAgB,OAAID,IAEpBD,EAAa,OAAIC,GAClB,CATD,CASGK,MAAM,kECTTC,EAAQ,4CAARA,CAA0EA,EAAQ,uHCAlFA,EAAQ,4CAARA,CAA0EA,EAAQ,yHCAlFA,EAAQ,4CAARA,CAA0EA,EAAQ,2GCAlF,IAA6BC,EAA7BC,GAA6BD,EAA7BD,EAAA,uBAA6BC,EAAAE,WAAAF,EAAA,CAAAG,QAAAH,GAU7BI,EAAAA,QAAOC,OAASC,MAAMC,OAEpB,CAEEC,KAAM,gBAONC,KAAM,SAAUC,EAAUC,EAAOC,GAC/B,IAAIC,EAAQC,KAGZA,KAAKC,cAAcC,SAASC,MAC5BH,KAAKJ,SAAWA,EAChBI,KAAKI,KAAOC,EAAE,IAAMT,GACpBI,KAAKI,KAAKE,IAAI,CAAC,OAAU,YACpBC,MAAMC,WAAWX,KAAYU,MAAMC,WAAWV,KAOjDE,KAAKS,aAAeT,KAAKU,WACzBV,KAAKW,cAAgBX,KAAKY,cAP1BZ,KAAKS,aAAeI,SAAShB,GAC7BG,KAAKW,cAAgBE,SAASf,GAC9BE,KAAKI,KACFN,OAAOE,KAAKW,eACZd,MAAMG,KAAKS,eAQhBT,KAAKI,KAAKE,IAAI,CAAC,8BAA+B,kBAS9CD,EAAEL,KAAKI,MAAMU,UAAU,CACrBC,OAAQ,oBACRC,KAAM,SAAUC,EAAOC,GACrBnB,EAAMoB,YAAYD,EAAGE,UACvB,EACAC,IAAK,SAAUJ,EAAOC,GACpBnB,EAAMuB,YAAYJ,EAAGE,UACv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CAACztB,EAASs3H,KACjC,IAAI,IAAIr2G,KAAOq2G,EACXJ,EAAoB11F,EAAE81F,EAAYr2G,KAASi2G,EAAoB11F,EAAExhC,EAASihB,IAC5ES,OAAO4zE,eAAet1F,EAASihB,EAAK,CAAEk0E,YAAY,EAAMhmF,IAAKmoH,EAAWr2G,IAE1E,ECNDi2G,EAAoBhrE,EAAI,WACvB,GAA0B,iBAAfmwC,WAAyB,OAAOA,WAC3C,IACC,OAAOj7F,MAAQ,IAAIyb,SAAS,cAAb,EAChB,CAAE,MAAO5Y,GACR,GAAsB,iBAAXwf,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCAxByzG,EAAoB11F,EAAI,CAAClhC,EAAK69C,IAAUz8B,OAAOO,UAAU+9B,eAAex+B,KAAKlhB,EAAK69C,GCClF+4E,EAAoBvlG,EAAK3xB,IACH,oBAAXw1F,QAA0BA,OAAOmD,aAC1Cj3E,OAAO4zE,eAAet1F,EAASw1F,OAAOmD,YAAa,CAAE53E,MAAO,WAE7DW,OAAO4zE,eAAet1F,EAAS,aAAc,CAAE+gB,OAAO,GAAO,ECL9Dm2G,EAAoBK,QAAKh2G,ECGC21G,EAAoB","sources":["webpack://draw2d/webpack/universalModuleDefinition","webpack://draw2d/./src/lib/Class.exec.js","webpack://draw2d/./src/lib/pathfinding.exec.js","webpack://draw2d/./src/lib/raphael.exec.js","webpack://draw2d/./src/Canvas.js","webpack://draw2d/./src/Configuration.js","webpack://draw2d/./src/Connection.js","webpack://draw2d/./src/Figure.js","webpack://draw2d/./src/HeadlessCanvas.js","webpack://draw2d/./src/HybridPort.js","webpack://draw2d/./src/InputPort.js","webpack://draw2d/./src/OutputPort.js","webpack://draw2d/./src/Port.js","webpack://draw2d/./src/ResizeHandle.js","webpack://draw2d/./src/SVGFigure.js","webpack://draw2d/./src/Selection.js","webpack://draw2d/./src/SetFigure.js","webpack://draw2d/./src/VectorFigure.js","webpack://draw2d/./src/command/Command.js","webpack://draw2d/./src/command/CommandAdd.js","webpack://draw2d/./src/command/CommandAddVertex.js","webpack://draw2d/./src/command/CommandAssignFigure.js","webpack://draw2d/./src/command/CommandAttr.js","webpack://draw2d/./src/command/CommandBoundingBox.js","webpack://draw2d/./src/command/CommandCollection.js","webpack://draw2d/./src/command/CommandConnect.js","webpack://draw2d/./src/command/CommandDelete.js","webpack://draw2d/./src/command/CommandDeleteGroup.js","webpack://draw2d/./src/command/CommandGroup.js","webpack://draw2d/./src/command/CommandMove.js","webpack://draw2d/./src/command/CommandMoveConnection.js","webpack://draw2d/./src/command/CommandMoveLine.js","webpack://draw2d/./src/command/CommandMoveVertex.js","webpack://draw2d/./src/command/CommandMoveVertices.js","webpack://draw2d/./src/command/CommandReconnect.js","webpack://draw2d/./src/command/CommandRemoveVertex.js","webpack://draw2d/./src/command/CommandReplaceVertices.js","webpack://draw2d/./src/command/CommandResize.js","webpack://draw2d/./src/command/CommandRotate.js","webpack://draw2d/./src/command/CommandStack.js","webpack://draw2d/./src/command/CommandStackEvent.js","webpack://draw2d/./src/command/CommandStackEventListener.js","webpack://draw2d/./src/command/CommandType.js","webpack://draw2d/./src/command/CommandUngroup.js","webpack://draw2d/./src/decoration/connection/ArrowDecorator.js","webpack://draw2d/./src/decoration/connection/BarDecorator.js","webpack://draw2d/./src/decoration/connection/CircleDecorator.js","webpack://draw2d/./src/decoration/connection/Decorator.js","webpack://draw2d/./src/decoration/connection/DiamondDecorator.js","webpack://draw2d/./src/geo/Line.js","webpack://draw2d/./src/geo/Point.js","webpack://draw2d/./src/geo/PositionConstants.js","webpack://draw2d/./src/geo/Ray.js","webpack://draw2d/./src/geo/Rectangle.js","webpack://draw2d/./src/geo/Util.js","webpack://draw2d/./src/index.js","webpack://draw2d/./src/io/Reader.js","webpack://draw2d/./src/io/Writer.js","webpack://draw2d/./src/io/json/Reader.js","webpack://draw2d/./src/io/json/Writer.js","webpack://draw2d/./src/io/png/Writer.js","webpack://draw2d/./src/io/svg/Writer.js","webpack://draw2d/./src/layout/anchor/CenterEdgeConnectionAnchor.js","webpack://draw2d/./src/layout/anchor/ChopboxConnectionAnchor.js","webpack://draw2d/./src/layout/anchor/ConnectionAnchor.js","webpack://draw2d/./src/layout/anchor/FanConnectionAnchor.js","webpack://draw2d/./src/layout/anchor/ShortesPathConnectionAnchor.js","webpack://draw2d/./src/layout/connection/CircuitConnectionRouter.js","webpack://draw2d/./src/layout/connection/ConnectionRouter.js","webpack://draw2d/./src/layout/connection/DirectRouter.js","webpack://draw2d/./src/layout/connection/FanConnectionRouter.js","webpack://draw2d/./src/layout/connection/InteractiveManhattanConnectionRouter.js","webpack://draw2d/./src/layout/connection/ManhattanBridgedConnectionRouter.js","webpack://draw2d/./src/layout/connection/ManhattanConnectionRouter.js","webpack://draw2d/./src/layout/connection/MazeConnectionRouter.js","webpack://draw2d/./src/layout/connection/MuteableManhattanConnectionRouter.js","webpack://draw2d/./src/layout/connection/RubberbandRouter.js","webpack://draw2d/./src/layout/connection/SketchConnectionRouter.js","webpack://draw2d/./src/layout/connection/SplineConnectionRouter.js","webpack://draw2d/./src/layout/connection/VertexRouter.js","webpack://draw2d/./src/layout/locator/BottomLocator.js","webpack://draw2d/./src/layout/locator/CenterLocator.js","webpack://draw2d/./src/layout/locator/ConnectionLocator.js","webpack://draw2d/./src/layout/locator/DraggableLocator.js","webpack://draw2d/./src/layout/locator/InputPortLocator.js","webpack://draw2d/./src/layout/locator/LeftLocator.js","webpack://draw2d/./src/layout/locator/Locator.js","webpack://draw2d/./src/layout/locator/ManhattanMidpointLocator.js","webpack://draw2d/./src/layout/locator/OutputPortLocator.js","webpack://draw2d/./src/layout/locator/ParallelMidpointLocator.js","webpack://draw2d/./src/layout/locator/PolylineMidpointLocator.js","webpack://draw2d/./src/layout/locator/PortLocator.js","webpack://draw2d/./src/layout/locator/RightLocator.js","webpack://draw2d/./src/layout/locator/SmartDraggableLocator.js","webpack://draw2d/./src/layout/locator/TopLocator.js","webpack://draw2d/./src/layout/locator/XYAbsPortLocator.js","webpack://draw2d/./src/layout/locator/XYRelPortLocator.js","webpack://draw2d/./src/layout/mesh/ExplodeLayouter.js","webpack://draw2d/./src/layout/mesh/MeshLayouter.js","webpack://draw2d/./src/layout/mesh/ProposedMeshChange.js","webpack://draw2d/./src/lib/jquery.autoresize.js","webpack://draw2d/./src/lib/jquery.contextmenu.js","webpack://draw2d/./src/packages.js","webpack://draw2d/./src/policy/EditPolicy.js","webpack://draw2d/./src/policy/canvas/BoundingboxSelectionPolicy.js","webpack://draw2d/./src/policy/canvas/CanvasPolicy.js","webpack://draw2d/./src/policy/canvas/CoronaDecorationPolicy.js","webpack://draw2d/./src/policy/canvas/DecorationPolicy.js","webpack://draw2d/./src/policy/canvas/DefaultKeyboardPolicy.js","webpack://draw2d/./src/policy/canvas/DropInterceptorPolicy.js","webpack://draw2d/./src/policy/canvas/ExtendedKeyboardPolicy.js","webpack://draw2d/./src/policy/canvas/FadeoutDecorationPolicy.js","webpack://draw2d/./src/policy/canvas/GhostMoveSelectionPolicy.js","webpack://draw2d/./src/policy/canvas/KeyboardPolicy.js","webpack://draw2d/./src/policy/canvas/PanningSelectionPolicy.js","webpack://draw2d/./src/policy/canvas/ReadOnlySelectionPolicy.js","webpack://draw2d/./src/policy/canvas/SelectionPolicy.js","webpack://draw2d/./src/policy/canvas/ShowChessboardEditPolicy.js","webpack://draw2d/./src/policy/canvas/ShowDimetricGridEditPolicy.js","webpack://draw2d/./src/policy/canvas/ShowDotEditPolicy.js","webpack://draw2d/./src/policy/canvas/ShowGridEditPolicy.js","webpack://draw2d/./src/policy/canvas/SingleSelectionPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToCenterEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToDimetricGridEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToGeometryEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToGridEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToInBetweenEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToVerticesEditPolicy.js","webpack://draw2d/./src/policy/canvas/WheelZoomPolicy.js","webpack://draw2d/./src/policy/canvas/ZoomPolicy.js","webpack://draw2d/./src/policy/connection/ClickConnectionCreatePolicy.js","webpack://draw2d/./src/policy/connection/ComposedConnectionCreatePolicy.js","webpack://draw2d/./src/policy/connection/ConnectionCreatePolicy.js","webpack://draw2d/./src/policy/connection/DragConnectionCreatePolicy.js","webpack://draw2d/./src/policy/connection/OrthogonalConnectionCreatePolicy.js","webpack://draw2d/./src/policy/figure/AntSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/BigRectangleSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/BusSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/DragDropEditPolicy.js","webpack://draw2d/./src/policy/figure/FigureEditPolicy.js","webpack://draw2d/./src/policy/figure/GlowSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/HBusSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/HorizontalEditPolicy.js","webpack://draw2d/./src/policy/figure/RaftSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/RectangleSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/RegionEditPolicy.js","webpack://draw2d/./src/policy/figure/ResizeSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/RoundRectangleSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/SelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/SelectionPolicy.js","webpack://draw2d/./src/policy/figure/SlimSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/VBusSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/VertexSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/VerticalEditPolicy.js","webpack://draw2d/./src/policy/figure/WidthSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/line/LineSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/line/OrthogonalSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/line/VertexSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/port/ElasticStrapFeedbackPolicy.js","webpack://draw2d/./src/policy/port/IntrusivePortsFeedbackPolicy.js","webpack://draw2d/./src/policy/port/PortFeedbackPolicy.js","webpack://draw2d/./src/shape/analog/OpAmp.js","webpack://draw2d/./src/shape/analog/ResistorBridge.js","webpack://draw2d/./src/shape/analog/ResistorVertical.js","webpack://draw2d/./src/shape/analog/VoltageSupplyHorizontal.js","webpack://draw2d/./src/shape/analog/VoltageSupplyVertical.js","webpack://draw2d/./src/shape/arrow/CalligrapherArrowDownLeft.js","webpack://draw2d/./src/shape/arrow/CalligrapherArrowLeft.js","webpack://draw2d/./src/shape/basic/Arc.js","webpack://draw2d/./src/shape/basic/Circle.js","webpack://draw2d/./src/shape/basic/Diamond.js","webpack://draw2d/./src/shape/basic/GhostVertexResizeHandle.js","webpack://draw2d/./src/shape/basic/Image.js","webpack://draw2d/./src/shape/basic/Label.js","webpack://draw2d/./src/shape/basic/Line.js","webpack://draw2d/./src/shape/basic/LineEndResizeHandle.js","webpack://draw2d/./src/shape/basic/LineResizeHandle.js","webpack://draw2d/./src/shape/basic/LineStartResizeHandle.js","webpack://draw2d/./src/shape/basic/Oval.js","webpack://draw2d/./src/shape/basic/PolyLine.js","webpack://draw2d/./src/shape/basic/Polygon.js","webpack://draw2d/./src/shape/basic/Rectangle.js","webpack://draw2d/./src/shape/basic/Text.js","webpack://draw2d/./src/shape/basic/VertexResizeHandle.js","webpack://draw2d/./src/shape/composite/Composite.js","webpack://draw2d/./src/shape/composite/Group.js","webpack://draw2d/./src/shape/composite/Jailhouse.js","webpack://draw2d/./src/shape/composite/Raft.js","webpack://draw2d/./src/shape/composite/RaftResizeHandle.js","webpack://draw2d/./src/shape/composite/StrongComposite.js","webpack://draw2d/./src/shape/composite/WeakComposite.js","webpack://draw2d/./src/shape/diagram/Diagram.js","webpack://draw2d/./src/shape/diagram/Pie.js","webpack://draw2d/./src/shape/diagram/Sparkline.js","webpack://draw2d/./src/shape/dimetric/Rectangle.js","webpack://draw2d/./src/shape/flowchart/Document.js","webpack://draw2d/./src/shape/icon/Acw.js","webpack://draw2d/./src/shape/icon/Alarm.js","webpack://draw2d/./src/shape/icon/Anonymous.js","webpack://draw2d/./src/shape/icon/Apple.js","webpack://draw2d/./src/shape/icon/Apps.js","webpack://draw2d/./src/shape/icon/ArrowDown.js","webpack://draw2d/./src/shape/icon/ArrowLeft.js","webpack://draw2d/./src/shape/icon/ArrowLeft2.js","webpack://draw2d/./src/shape/icon/ArrowRight.js","webpack://draw2d/./src/shape/icon/ArrowRight2.js","webpack://draw2d/./src/shape/icon/ArrowUp.js","webpack://draw2d/./src/shape/icon/Aumade.js","webpack://draw2d/./src/shape/icon/BarChart.js","webpack://draw2d/./src/shape/icon/BioHazard.js","webpack://draw2d/./src/shape/icon/Book.js","webpack://draw2d/./src/shape/icon/Bookmark.js","webpack://draw2d/./src/shape/icon/Books.js","webpack://draw2d/./src/shape/icon/Bubble.js","webpack://draw2d/./src/shape/icon/Bug.js","webpack://draw2d/./src/shape/icon/Calendar.js","webpack://draw2d/./src/shape/icon/Cart.js","webpack://draw2d/./src/shape/icon/Ccw.js","webpack://draw2d/./src/shape/icon/Chat.js","webpack://draw2d/./src/shape/icon/Check.js","webpack://draw2d/./src/shape/icon/Chrome.js","webpack://draw2d/./src/shape/icon/Clip.js","webpack://draw2d/./src/shape/icon/Clock.js","webpack://draw2d/./src/shape/icon/Cloud.js","webpack://draw2d/./src/shape/icon/Cloud2.js","webpack://draw2d/./src/shape/icon/CloudDown.js","webpack://draw2d/./src/shape/icon/CloudUp.js","webpack://draw2d/./src/shape/icon/Cloudy.js","webpack://draw2d/./src/shape/icon/Code.js","webpack://draw2d/./src/shape/icon/CodeTalk.js","webpack://draw2d/./src/shape/icon/CommandLine.js","webpack://draw2d/./src/shape/icon/Connect.js","webpack://draw2d/./src/shape/icon/Contract.js","webpack://draw2d/./src/shape/icon/Crop.js","webpack://draw2d/./src/shape/icon/Cross.js","webpack://draw2d/./src/shape/icon/Cube.js","webpack://draw2d/./src/shape/icon/Customer.js","webpack://draw2d/./src/shape/icon/Db.js","webpack://draw2d/./src/shape/icon/Detour.js","webpack://draw2d/./src/shape/icon/Diagram.js","webpack://draw2d/./src/shape/icon/Disconnect.js","webpack://draw2d/./src/shape/icon/DockBottom.js","webpack://draw2d/./src/shape/icon/DockLeft.js","webpack://draw2d/./src/shape/icon/DockRight.js","webpack://draw2d/./src/shape/icon/DockTop.js","webpack://draw2d/./src/shape/icon/Download.js","webpack://draw2d/./src/shape/icon/Dry.js","webpack://draw2d/./src/shape/icon/Employee.js","webpack://draw2d/./src/shape/icon/End.js","webpack://draw2d/./src/shape/icon/Ethernet.js","webpack://draw2d/./src/shape/icon/Exchange.js","webpack://draw2d/./src/shape/icon/Expand.js","webpack://draw2d/./src/shape/icon/Export.js","webpack://draw2d/./src/shape/icon/Fave.js","webpack://draw2d/./src/shape/icon/Feed.js","webpack://draw2d/./src/shape/icon/Ff.js","webpack://draw2d/./src/shape/icon/Firefox.js","webpack://draw2d/./src/shape/icon/Flag.js","webpack://draw2d/./src/shape/icon/Flickr.js","webpack://draw2d/./src/shape/icon/Folder.js","webpack://draw2d/./src/shape/icon/Font.js","webpack://draw2d/./src/shape/icon/Fork.js","webpack://draw2d/./src/shape/icon/ForkAlt.js","webpack://draw2d/./src/shape/icon/FullCube.js","webpack://draw2d/./src/shape/icon/Future.js","webpack://draw2d/./src/shape/icon/GRaphael.js","webpack://draw2d/./src/shape/icon/Gear.js","webpack://draw2d/./src/shape/icon/Gear2.js","webpack://draw2d/./src/shape/icon/GitHub.js","webpack://draw2d/./src/shape/icon/GitHubAlt.js","webpack://draw2d/./src/shape/icon/Glasses.js","webpack://draw2d/./src/shape/icon/Globe.js","webpack://draw2d/./src/shape/icon/GlobeAlt.js","webpack://draw2d/./src/shape/icon/GlobeAlt2.js","webpack://draw2d/./src/shape/icon/Hail.js","webpack://draw2d/./src/shape/icon/Hammer.js","webpack://draw2d/./src/shape/icon/HammerAndScrewDriver.js","webpack://draw2d/./src/shape/icon/HangUp.js","webpack://draw2d/./src/shape/icon/Help.js","webpack://draw2d/./src/shape/icon/History.js","webpack://draw2d/./src/shape/icon/Home.js","webpack://draw2d/./src/shape/icon/IMac.js","webpack://draw2d/./src/shape/icon/Icon.js","webpack://draw2d/./src/shape/icon/Icons.js","webpack://draw2d/./src/shape/icon/Ie.js","webpack://draw2d/./src/shape/icon/Ie9.js","webpack://draw2d/./src/shape/icon/Import.js","webpack://draw2d/./src/shape/icon/InkScape.js","webpack://draw2d/./src/shape/icon/Ipad.js","webpack://draw2d/./src/shape/icon/Iphone.js","webpack://draw2d/./src/shape/icon/JQuery.js","webpack://draw2d/./src/shape/icon/Jigsaw.js","webpack://draw2d/./src/shape/icon/Key.js","webpack://draw2d/./src/shape/icon/Lab.js","webpack://draw2d/./src/shape/icon/Lamp.js","webpack://draw2d/./src/shape/icon/Lamp_alt.js","webpack://draw2d/./src/shape/icon/Landing.js","webpack://draw2d/./src/shape/icon/Landscape1.js","webpack://draw2d/./src/shape/icon/Landscape2.js","webpack://draw2d/./src/shape/icon/LineChart.js","webpack://draw2d/./src/shape/icon/Link.js","webpack://draw2d/./src/shape/icon/LinkedIn.js","webpack://draw2d/./src/shape/icon/Linux.js","webpack://draw2d/./src/shape/icon/List.js","webpack://draw2d/./src/shape/icon/Location.js","webpack://draw2d/./src/shape/icon/Lock.js","webpack://draw2d/./src/shape/icon/Locked.js","webpack://draw2d/./src/shape/icon/Magic.js","webpack://draw2d/./src/shape/icon/Magnet.js","webpack://draw2d/./src/shape/icon/Mail.js","webpack://draw2d/./src/shape/icon/Man.js","webpack://draw2d/./src/shape/icon/Merge.js","webpack://draw2d/./src/shape/icon/Mic.js","webpack://draw2d/./src/shape/icon/MicMute.js","webpack://draw2d/./src/shape/icon/Minus.js","webpack://draw2d/./src/shape/icon/NewWindow.js","webpack://draw2d/./src/shape/icon/No.js","webpack://draw2d/./src/shape/icon/NoMagnet.js","webpack://draw2d/./src/shape/icon/NodeJs.js","webpack://draw2d/./src/shape/icon/Notebook.js","webpack://draw2d/./src/shape/icon/Noview.js","webpack://draw2d/./src/shape/icon/Opera.js","webpack://draw2d/./src/shape/icon/Package.js","webpack://draw2d/./src/shape/icon/Page.js","webpack://draw2d/./src/shape/icon/Page2.js","webpack://draw2d/./src/shape/icon/Pallete.js","webpack://draw2d/./src/shape/icon/Palm.js","webpack://draw2d/./src/shape/icon/Paper.js","webpack://draw2d/./src/shape/icon/Parent.js","webpack://draw2d/./src/shape/icon/Pc.js","webpack://draw2d/./src/shape/icon/Pen.js","webpack://draw2d/./src/shape/icon/Pensil.js","webpack://draw2d/./src/shape/icon/People.js","webpack://draw2d/./src/shape/icon/Phone.js","webpack://draw2d/./src/shape/icon/Photo.js","webpack://draw2d/./src/shape/icon/Picker.js","webpack://draw2d/./src/shape/icon/Picture.js","webpack://draw2d/./src/shape/icon/PieChart.js","webpack://draw2d/./src/shape/icon/Plane.js","webpack://draw2d/./src/shape/icon/Plugin.js","webpack://draw2d/./src/shape/icon/Plus.js","webpack://draw2d/./src/shape/icon/Power.js","webpack://draw2d/./src/shape/icon/Ppt.js","webpack://draw2d/./src/shape/icon/Printer.js","webpack://draw2d/./src/shape/icon/Quote.js","webpack://draw2d/./src/shape/icon/Rain.js","webpack://draw2d/./src/shape/icon/Raphael.js","webpack://draw2d/./src/shape/icon/ReflectH.js","webpack://draw2d/./src/shape/icon/ReflectV.js","webpack://draw2d/./src/shape/icon/Refresh.js","webpack://draw2d/./src/shape/icon/Resize2.js","webpack://draw2d/./src/shape/icon/Rotate.js","webpack://draw2d/./src/shape/icon/Ruler.js","webpack://draw2d/./src/shape/icon/Run.js","webpack://draw2d/./src/shape/icon/Rw.js","webpack://draw2d/./src/shape/icon/Safari.js","webpack://draw2d/./src/shape/icon/ScrewDriver.js","webpack://draw2d/./src/shape/icon/Search.js","webpack://draw2d/./src/shape/icon/Sencha.js","webpack://draw2d/./src/shape/icon/Settings.js","webpack://draw2d/./src/shape/icon/SettingsAlt.js","webpack://draw2d/./src/shape/icon/Shuffle.js","webpack://draw2d/./src/shape/icon/Skull.js","webpack://draw2d/./src/shape/icon/Skype.js","webpack://draw2d/./src/shape/icon/SlideShare.js","webpack://draw2d/./src/shape/icon/Smile.js","webpack://draw2d/./src/shape/icon/Smile2.js","webpack://draw2d/./src/shape/icon/Snow.js","webpack://draw2d/./src/shape/icon/Split.js","webpack://draw2d/./src/shape/icon/Star.js","webpack://draw2d/./src/shape/icon/Star2.js","webpack://draw2d/./src/shape/icon/Star2Off.js","webpack://draw2d/./src/shape/icon/Star3.js","webpack://draw2d/./src/shape/icon/Star3Off.js","webpack://draw2d/./src/shape/icon/StarOff.js","webpack://draw2d/./src/shape/icon/Start.js","webpack://draw2d/./src/shape/icon/Sticker.js","webpack://draw2d/./src/shape/icon/Stop.js","webpack://draw2d/./src/shape/icon/StopWatch.js","webpack://draw2d/./src/shape/icon/Sun.js","webpack://draw2d/./src/shape/icon/Svg.js","webpack://draw2d/./src/shape/icon/TShirt.js","webpack://draw2d/./src/shape/icon/Tag.js","webpack://draw2d/./src/shape/icon/TakeOff.js","webpack://draw2d/./src/shape/icon/Talke.js","webpack://draw2d/./src/shape/icon/Talkq.js","webpack://draw2d/./src/shape/icon/Thunder.js","webpack://draw2d/./src/shape/icon/Trash.js","webpack://draw2d/./src/shape/icon/Twitter.js","webpack://draw2d/./src/shape/icon/TwitterBird.js","webpack://draw2d/./src/shape/icon/Umbrella.js","webpack://draw2d/./src/shape/icon/Undo.js","webpack://draw2d/./src/shape/icon/Unlock.js","webpack://draw2d/./src/shape/icon/Usb.js","webpack://draw2d/./src/shape/icon/User.js","webpack://draw2d/./src/shape/icon/Users.js","webpack://draw2d/./src/shape/icon/Video.js","webpack://draw2d/./src/shape/icon/View.js","webpack://draw2d/./src/shape/icon/Vim.js","webpack://draw2d/./src/shape/icon/Volume0.js","webpack://draw2d/./src/shape/icon/Volume1.js","webpack://draw2d/./src/shape/icon/Volume2.js","webpack://draw2d/./src/shape/icon/Volume3.js","webpack://draw2d/./src/shape/icon/Warning.js","webpack://draw2d/./src/shape/icon/WheelChair.js","webpack://draw2d/./src/shape/icon/Windows.js","webpack://draw2d/./src/shape/icon/Woman.js","webpack://draw2d/./src/shape/icon/Wrench.js","webpack://draw2d/./src/shape/icon/Wrench2.js","webpack://draw2d/./src/shape/icon/Wrench3.js","webpack://draw2d/./src/shape/icon/ZoomIn.js","webpack://draw2d/./src/shape/icon/ZoomOut.js","webpack://draw2d/./src/shape/layout/FlexGridLayout.js","webpack://draw2d/./src/shape/layout/HorizontalLayout.js","webpack://draw2d/./src/shape/layout/Layout.js","webpack://draw2d/./src/shape/layout/StackLayout.js","webpack://draw2d/./src/shape/layout/TableLayout.js","webpack://draw2d/./src/shape/layout/VerticalLayout.js","webpack://draw2d/./src/shape/node/Between.js","webpack://draw2d/./src/shape/node/End.js","webpack://draw2d/./src/shape/node/Fulcrum.js","webpack://draw2d/./src/shape/node/HorizontalBus.js","webpack://draw2d/./src/shape/node/Hub.js","webpack://draw2d/./src/shape/node/Node.js","webpack://draw2d/./src/shape/node/Start.js","webpack://draw2d/./src/shape/node/VerticalBus.js","webpack://draw2d/./src/shape/note/PostIt.js","webpack://draw2d/./src/shape/pert/Activity.js","webpack://draw2d/./src/shape/pert/Start.js","webpack://draw2d/./src/shape/state/Connection.js","webpack://draw2d/./src/shape/state/End.js","webpack://draw2d/./src/shape/state/Start.js","webpack://draw2d/./src/shape/state/State.js","webpack://draw2d/./src/shape/widget/Slider.js","webpack://draw2d/./src/shape/widget/Widget.js","webpack://draw2d/./src/ui/LabelEditor.js","webpack://draw2d/./src/ui/LabelInplaceEditor.js","webpack://draw2d/./src/util/ArrayList.js","webpack://draw2d/./src/util/Base64.js","webpack://draw2d/./src/util/Color.js","webpack://draw2d/./src/util/Debug.js","webpack://draw2d/./src/util/JSONUtil.js","webpack://draw2d/./src/util/Polyfill.js","webpack://draw2d/./src/util/SVGUtil.js","webpack://draw2d/./src/util/UUID.js","webpack://draw2d/./src/util/extend.js","webpack://draw2d/./src/util/raphael_ext.js","webpack://draw2d/./src/util/spline/BezierSpline.js","webpack://draw2d/./src/util/spline/CatmullRomSpline.js","webpack://draw2d/./src/util/spline/CubicSpline.js","webpack://draw2d/./src/util/spline/Spline.js","webpack://draw2d/./src/css/contextmenu.css","webpack://draw2d/./node_modules/css-loader/dist/runtime/api.js","webpack://draw2d/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://draw2d/./node_modules/performance-now/lib/performance-now.js","webpack://draw2d/./node_modules/raf/index.js","webpack://draw2d/./src/lib/Class.exec.js?f59a","webpack://draw2d/./src/lib/pathfinding.exec.js?a448","webpack://draw2d/./src/lib/raphael.exec.js?8a35","webpack://draw2d/./node_modules/rgbcolor/index.js","webpack://draw2d/./node_modules/script-loader/addScript.js","webpack://draw2d/./node_modules/shifty/dist/shifty.js","webpack://draw2d/./node_modules/stackblur-canvas/dist/stackblur-es.js","webpack://draw2d/./src/css/contextmenu.css?3c4d","webpack://draw2d/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://draw2d/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://draw2d/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://draw2d/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://draw2d/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://draw2d/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://draw2d/./node_modules/canvg/dist/index.cjs","webpack://draw2d/./node_modules/svg-pathdata/lib/SVGPathData.cjs","webpack://draw2d/webpack/bootstrap","webpack://draw2d/webpack/runtime/compat get default export","webpack://draw2d/webpack/runtime/define property getters","webpack://draw2d/webpack/runtime/global","webpack://draw2d/webpack/runtime/hasOwnProperty shorthand","webpack://draw2d/webpack/runtime/make namespace object","webpack://draw2d/webpack/runtime/nonce","webpack://draw2d/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"draw2d\"] = factory();\n\telse\n\t\troot[\"draw2d\"] = factory();\n})(self, () => {\nreturn ","require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\script-loader\\\\addScript.js\")(require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\raw-loader\\\\index.js!C:\\\\repos\\\\draw2d\\\\src\\\\lib\\\\Class.exec.js\"))","require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\script-loader\\\\addScript.js\")(require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\raw-loader\\\\index.js!C:\\\\repos\\\\draw2d\\\\src\\\\lib\\\\pathfinding.exec.js\"))","require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\script-loader\\\\addScript.js\")(require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\raw-loader\\\\index.js!C:\\\\repos\\\\draw2d\\\\src\\\\lib\\\\raphael.exec.js\"))","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A scrolling Canvas that contains Figures. Call `add(draw2d.Figure)` to add shapes to the Viewport.\r\n *\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.Canvas = Class.extend(\r\n /** @lends draw2d.Canvas.prototype */\r\n {\r\n\r\n NAME: \"draw2d.Canvas\",\r\n\r\n /**\r\n * Create a new canvas with the given HTML DOM references.\r\n *\r\n * @param {String} canvasId the id of the DOM element to use a parent container\r\n */\r\n init: function (canvasId, width, height) {\r\n let _this = this\r\n\r\n\r\n this.setScrollArea(document.body)\r\n this.canvasId = canvasId\r\n this.html = $(\"#\" + canvasId)\r\n this.html.css({\"cursor\": \"default\"})\r\n if (!isNaN(parseFloat(width)) && !isNaN(parseFloat(height))) {\r\n this.initialWidth = parseInt(width)\r\n this.initialHeight = parseInt(height)\r\n this.html\r\n .height(this.initialHeight)\r\n .width(this.initialWidth)\r\n } else {\r\n this.initialWidth = this.getWidth()\r\n this.initialHeight = this.getHeight()\r\n }\r\n\r\n // avoid the \"highlighting\" in iPad, iPhone if the user tab/touch on the canvas.\r\n // .... I didn't like this.\r\n this.html.css({\"-webkit-tap-highlight-color\": \"rgba(0,0,0,0)\"})\r\n\r\n // Drag&Drop handling from foreign DIV into the Canvas\r\n // Only available in combination with jQuery-UI\r\n //\r\n // Create the droppable area for the css class \"draw2d_droppable\"\r\n // This can be done by a palette of toolbar or something else.\r\n // For more information see : http://jqueryui.com/demos/droppable/\r\n //\r\n $(this.html).droppable({\r\n accept: '.draw2d_droppable',\r\n over: function (event, ui) {\r\n _this.onDragEnter(ui.draggable)\r\n },\r\n out: function (event, ui) {\r\n _this.onDragLeave(ui.draggable)\r\n },\r\n drop: function drop(event, ui) {\r\n event = _this._getEvent(event);\r\n let helperPos = $(ui.helper).position()\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY);\r\n _this.onDrop(ui.draggable,\r\n pos.getX()- (event.clientX-helperPos.left)+5,\r\n pos.getY()- (event.clientY-helperPos.top)+5, event.shiftKey, event.ctrlKey);\r\n }\r\n })\r\n\r\n\r\n // Create the jQuery-Draggable for the palette -> canvas drag&drop interaction\r\n //\r\n $(\".draw2d_droppable\").draggable({\r\n appendTo: \"body\",\r\n stack: \"body\",\r\n zIndex: 27000,\r\n helper: \"clone\",\r\n drag: function (event, ui) {\r\n event = _this._getEvent(event)\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.onDrag(ui.draggable, pos.getX(), pos.getY(), event.shiftKey, event.ctrlKey)\r\n },\r\n stop: function (e, ui) {\r\n },\r\n start: function (e, ui) {\r\n $(ui.helper).addClass(\"shadow\")\r\n }\r\n })\r\n\r\n\r\n // painting stuff\r\n //\r\n if (!isNaN(parseFloat(height))) {\r\n this.paper = Raphael(canvasId, width, height)\r\n } else {\r\n this.paper = Raphael(canvasId, this.getWidth(), this.getHeight())\r\n }\r\n this.paper.canvas.style.position = \"absolute\"\r\n\r\n // Status handling\r\n //\r\n this.zoomPolicy = null // default ZoomEditPolicy\r\n this.zoomFactor = 1.0 // range [0.001..10]\r\n this.selection = new draw2d.Selection()\r\n this.currentDropTarget = null\r\n this.currentHoverFigure = null\r\n\r\n // installed to all added figures to avoid that a figure can be placed outside the canvas area\r\n // during a drag&drop operation\r\n this.regionDragDropConstraint = new draw2d.policy.figure.RegionEditPolicy(0, 0, this.getWidth(), this.getHeight())\r\n\r\n // event handling since version 5.0.0\r\n this.eventSubscriptions = {}\r\n\r\n this.editPolicy = new draw2d.util.ArrayList()\r\n\r\n // internal document with all figures, ports, ....\r\n //\r\n this.figures = new draw2d.util.ArrayList()\r\n this.lines = new draw2d.util.ArrayList() // crap - why are connections not just figures. Design by accident\r\n this.commonPorts = new draw2d.util.ArrayList()\r\n\r\n // all visible resize handles which can be drag&drop around. Selection handles like AntRectangleSelectionFeedback\r\n // are not part of this collection. Required for hitTest only\r\n this.resizeHandles = new draw2d.util.ArrayList()\r\n\r\n // The CommandStack for undo/redo operations\r\n //\r\n this.commandStack = new draw2d.command.CommandStack()\r\n\r\n // INTERSECTION/CROSSING handling for connections and lines\r\n //\r\n this.linesToRepaintAfterDragDrop = new draw2d.util.ArrayList()\r\n this.lineIntersections = new draw2d.util.ArrayList()\r\n\r\n // alternative/legacy zoom implementation\r\n // this.installEditPolicy( new draw2d.policy.canvas.ZoomPolicy()); // Responsible for zooming\r\n this.installEditPolicy(new draw2d.policy.canvas.WheelZoomPolicy()) // Responsible for zooming with mouse wheel\r\n this.installEditPolicy(new draw2d.policy.canvas.DefaultKeyboardPolicy()) // Handles the keyboard interaction\r\n this.installEditPolicy(new draw2d.policy.canvas.BoundingboxSelectionPolicy()) // Responsible for selection handling\r\n this.installEditPolicy(new draw2d.policy.canvas.DropInterceptorPolicy()) // Responsible for drop operations\r\n this.installEditPolicy(new draw2d.policy.connection.ComposedConnectionCreatePolicy(// Responsible for connection creation....\r\n [\r\n new draw2d.policy.connection.DragConnectionCreatePolicy(), // ....via drag/´drop\r\n new draw2d.policy.connection.ClickConnectionCreatePolicy() // or clicking on the ports and canvas.\r\n ])\r\n )\r\n\r\n // Calculate all intersection between the different lines\r\n //\r\n this.commandStack.addEventListener(function (event) {\r\n if (event.isPostChangeEvent() === true) {\r\n _this.calculateConnectionIntersection()\r\n _this.linesToRepaintAfterDragDrop.each((i, line) => {\r\n line.svgPathString = null\r\n line.repaint()\r\n })\r\n _this.linesToRepaintAfterDragDrop = new draw2d.util.ArrayList()\r\n }\r\n })\r\n\r\n // DragDrop status handling\r\n //\r\n this.mouseDown = false\r\n this.mouseDownX = 0\r\n this.mouseDownY = 0\r\n this.mouseDragDiffX = 0\r\n this.mouseDragDiffY = 0\r\n\r\n this.html.bind(\"mouseup touchend\", function (event) {\r\n if (_this.mouseDown === false) {\r\n return\r\n }\r\n\r\n event = _this._getEvent(event)\r\n _this.calculateConnectionIntersection()\r\n\r\n _this.mouseDown = false\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.editPolicy.each(function (i, policy) {\r\n policy.onMouseUp(_this, pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n })\r\n\r\n _this.mouseDragDiffX = 0\r\n _this.mouseDragDiffY = 0\r\n })\r\n\r\n this.html.bind(\"mousemove touchmove\", function (event) {\r\n event = _this._getEvent(event)\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n if (_this.mouseDown === false) {\r\n // mouseEnter/mouseLeave events for Figures. Don't use the Raphael or DOM native functions.\r\n // Raphael didn't work for Rectangle with transparent fill (events only fired for the border line)\r\n // DOM didn't work well for lines. No eclipse area - you must hit the line exact to retrieve the event.\r\n // In this case I implement my own stuff...again and again.\r\n //\r\n // don't break the main event loop if one element fires an error during enter/leave event.\r\n try {\r\n let hover = _this.getBestFigure(pos.x, pos.y)\r\n if (hover !== _this.currentHoverFigure && _this.currentHoverFigure !== null) {\r\n _this.currentHoverFigure.onMouseLeave() // deprecated\r\n _this.currentHoverFigure.fireEvent(\"mouseleave\")\r\n _this.fireEvent(\"mouseleave\", {figure: _this.currentHoverFigure})\r\n }\r\n if (hover !== _this.currentHoverFigure && hover !== null) {\r\n hover.onMouseEnter()\r\n hover.fireEvent(\"mouseenter\")\r\n _this.fireEvent(\"mouseenter\", {figure: hover})\r\n }\r\n _this.currentHoverFigure = hover\r\n } catch (exc) {\r\n // just write it to the console\r\n console.log(exc)\r\n }\r\n\r\n _this.editPolicy.each(function (i, policy) {\r\n policy.onMouseMove(_this, pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n })\r\n _this.fireEvent(\"mousemove\", {\r\n x: pos.x,\r\n y: pos.y,\r\n shiftKey: event.shiftKey,\r\n ctrlKey: event.ctrlKey,\r\n hoverFigure: _this.currentHoverFigure\r\n })\r\n } else {\r\n let diffXAbs = (event.clientX - _this.mouseDownX) * _this.zoomFactor\r\n let diffYAbs = (event.clientY - _this.mouseDownY) * _this.zoomFactor\r\n _this.editPolicy.each(function (i, policy) {\r\n policy.onMouseDrag(_this, diffXAbs, diffYAbs, diffXAbs - _this.mouseDragDiffX, diffYAbs - _this.mouseDragDiffY, event.shiftKey, event.ctrlKey)\r\n })\r\n _this.mouseDragDiffX = diffXAbs\r\n _this.mouseDragDiffY = diffYAbs\r\n _this.fireEvent(\"mousemove\", {\r\n x: pos.x,\r\n y: pos.y,\r\n shiftKey: event.shiftKey,\r\n ctrlKey: event.ctrlKey,\r\n hoverFigure: _this.currentHoverFigure\r\n })\r\n }\r\n })\r\n\r\n this.html.bind(\"mousedown\", function (event) {\r\n try {\r\n let pos = null\r\n switch (event.which) {\r\n case 1: //touch pressed\r\n case 0: //Left mouse button pressed\r\n try {\r\n event.preventDefault()\r\n event = _this._getEvent(event)\r\n _this.mouseDownX = event.clientX\r\n _this.mouseDownY = event.clientY\r\n _this.mouseDragDiffX = 0\r\n _this.mouseDragDiffY = 0\r\n pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.mouseDown = true\r\n _this.editPolicy.each(function (i, policy) {\r\n policy.onMouseDown(_this, pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n })\r\n } catch (exc) {\r\n console.log(exc)\r\n }\r\n break\r\n case 3: //Right mouse button pressed\r\n event.preventDefault()\r\n if (typeof event.stopPropagation !== \"undefined\")\r\n event.stopPropagation()\r\n event = _this._getEvent(event)\r\n pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.onRightMouseDown(pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n return false\r\n case 2:\r\n //Middle mouse button pressed\r\n break\r\n default:\r\n //You have a strange mouse\r\n }\r\n } catch (exc) {\r\n console.log(exc)\r\n }\r\n })\r\n\r\n\r\n // Catch the dblclick and route them to the Canvas hook.\r\n //\r\n this.html.on(\"dblclick\", function (event) {\r\n event = _this._getEvent(event)\r\n\r\n _this.mouseDownX = event.clientX\r\n _this.mouseDownY = event.clientY\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.onDoubleClick(pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n })\r\n\r\n\r\n // Catch the click event and route them to the canvas hook\r\n //\r\n this.html.on(\"click\", function (event) {\r\n event = _this._getEvent(event)\r\n\r\n // fire only the click event if we didn't move the mouse (drag&drop)\r\n //\r\n if (_this.mouseDownX === event.clientX || _this.mouseDownY === event.clientY) {\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.onClick(pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n }\r\n })\r\n\r\n // Important: MozMousePixelScroll is required to prevent 1px scrolling\r\n // in FF event if we call \"e.preventDefault()\"\r\n this.html.on('MozMousePixelScroll DOMMouseScroll mousewheel', function (e) {\r\n let event = _this._getEvent(e)\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.originalEvent.clientX, event.originalEvent.clientY)\r\n\r\n let delta = 0\r\n if (e.type === 'mousewheel') {\r\n delta = (e.originalEvent.wheelDelta * -1)\r\n } else if (e.type === 'DOMMouseScroll') {\r\n delta = 40 * e.originalEvent.detail\r\n }\r\n\r\n let returnValue = _this.onMouseWheel(delta, pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n\r\n if (returnValue === false) {\r\n e.preventDefault()\r\n }\r\n })\r\n\r\n // Catch the keyUp and CTRL-key and route them to the Canvas hook.\r\n //\r\n this.keyupCallback = function (event) {\r\n // don't initiate the delete command if the event comes from an INPUT field. In this case the user want delete\r\n // a character in the input field and not the related shape\r\n let target = $(event.target)\r\n if (!target.is(\"input\") && !target.is(\"textarea\")) {\r\n _this.editPolicy.each(function (i, policy) {\r\n if (policy instanceof draw2d.policy.canvas.KeyboardPolicy) {\r\n policy.onKeyUp(_this, event.keyCode, event.shiftKey, event.ctrlKey)\r\n }\r\n })\r\n }\r\n }\r\n $(document).bind(\"keyup\", this.keyupCallback)\r\n\r\n // Catch the keyDown and CTRL-key and route them to the Canvas hook.\r\n //\r\n this.keydownCallback = function (event) {\r\n // don't initiate the delete command if the event comes from an INPUT field. In this case the user want delete\r\n // a character in the input field and not the related shape\r\n let target = $(event.target)\r\n if (!target.is(\"input\") && !target.is(\"textarea\")) {\r\n _this.editPolicy.each(function (i, policy) {\r\n if (policy instanceof draw2d.policy.canvas.KeyboardPolicy) {\r\n policy.onKeyDown(_this, event.keyCode, event.shiftKey, event.ctrlKey)\r\n }\r\n })\r\n }\r\n }\r\n $(document).bind(\"keydown\", this.keydownCallback)\r\n\r\n },\r\n\r\n /**\r\n *\r\n * Call this method if you didn't need the canvas anymore. The method unregister all even handlers\r\n * and frees all resources. The canvas is unusable after this call\r\n *\r\n * @since. 4.7.4\r\n */\r\n destroy: function () {\r\n this.clear()\r\n $(document).unbind(\"keydown\", this.keydownCallback)\r\n $(document).unbind(\"keyup\", this.keyupCallback)\r\n // reset the event handlers of the canvas without any notice\r\n //\r\n this.eventSubscriptions = {}\r\n\r\n try {\r\n this.paper.remove()\r\n } catch (exc) {\r\n // breaks in some ie7 version....don't care about this because ie7/8 isn't a state of the art browser ;-)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Reset the canvas and delete all model elements.<br>\r\n * You can now reload another model to the canvas with a {@link draw2d.io.Reader}\r\n *\r\n * @since 1.1.0\r\n * @returns {this}\r\n */\r\n clear: function () {\r\n // notice all listener that the canvas will be cleared\r\n this.fireEvent(\"clear\")\r\n\r\n let _this = this\r\n\r\n this.lines.clone().each(function (i, e) {\r\n _this.remove(e)\r\n })\r\n\r\n this.figures.clone().each(function (i, e) {\r\n _this.remove(e)\r\n })\r\n\r\n this.zoomFactor = 1.0\r\n this.selection.clear()\r\n this.currentDropTarget = null\r\n\r\n // internal document with all figures, ports, ....\r\n //\r\n this.figures = new draw2d.util.ArrayList()\r\n this.lines = new draw2d.util.ArrayList()\r\n this.commonPorts = new draw2d.util.ArrayList()\r\n\r\n this.commandStack.markSaveLocation()\r\n\r\n // INTERSECTION/CROSSING handling for connections and lines\r\n //\r\n this.linesToRepaintAfterDragDrop = new draw2d.util.ArrayList()\r\n this.lineIntersections = new draw2d.util.ArrayList()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Callback for any kind of image export tools to trigger the canvas to hide all unwanted\r\n * decorations. The method is called e.g. from the draw2d.io.png.Writer\r\n *\r\n * @since 4.0.0\r\n * @@interface\r\n */\r\n hideDecoration: function () {\r\n },\r\n\r\n /**\r\n *\r\n * callback method for any image export writer to reactivate the decoration\r\n * of the canvas. e.g. grids, rulers,...\r\n *\r\n *\r\n * @since 4.0.0\r\n * @template\r\n */\r\n showDecoration: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Calculate all connection intersection of the canvas.\r\n * Required for \"bridging\" or \"crossing decoration\"\r\n *\r\n * @private\r\n */\r\n calculateConnectionIntersection: function () {\r\n\r\n this.lineIntersections = new draw2d.util.ArrayList()\r\n let lines = this.getLines().clone()\r\n while (lines.getSize() > 0) {\r\n let l1 = lines.removeElementAt(0)\r\n lines.each((ii, l2) => {\r\n let partInter = l1.intersection(l2)\r\n if (partInter.getSize() > 0) {\r\n this.lineIntersections.add({line: l1, other: l2, intersection: partInter})\r\n this.lineIntersections.add({line: l2, other: l1, intersection: partInter})\r\n }\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * Install a new selection and edit policy into the canvas\r\n *\r\n * @since 2.2.0\r\n * @param {draw2d.policy.EditPolicy} policy\r\n */\r\n installEditPolicy: function (policy) {\r\n\r\n // a canvas can handle only one selection policy\r\n //\r\n if (policy instanceof draw2d.policy.canvas.SelectionPolicy) {\r\n // reset old selection before install new selection strategy\r\n this.getSelection().getAll().each((i, figure) => {\r\n figure.unselect()\r\n })\r\n\r\n // remove existing selection policy\r\n this.editPolicy.grep((p) => {\r\n let stay = !(p instanceof draw2d.policy.canvas.SelectionPolicy)\r\n if (stay === false) {\r\n p.onUninstall(this)\r\n }\r\n return stay\r\n })\r\n }\r\n // only one zoom policy at once\r\n //\r\n else if (policy instanceof draw2d.policy.canvas.ZoomPolicy) {\r\n // remove existing zoom policy\r\n this.editPolicy.grep((p) => {\r\n let stay = !(p instanceof draw2d.policy.canvas.ZoomPolicy)\r\n if (stay === false) {\r\n p.onUninstall(this)\r\n }\r\n return stay\r\n })\r\n // replace the short cut handle for faster access\r\n this.zoomPolicy = policy\r\n } else if (policy instanceof draw2d.policy.connection.ConnectionCreatePolicy) {\r\n this.editPolicy.grep((p) => {\r\n let stay = !(p instanceof draw2d.policy.connection.ConnectionCreatePolicy)\r\n if (stay === false) {\r\n p.onUninstall(this)\r\n }\r\n return stay\r\n })\r\n } else if (policy instanceof draw2d.policy.canvas.DropInterceptorPolicy) {\r\n // think about if I allow to install only one drop policy\r\n }\r\n\r\n // remove doublicate edit policies\r\n if(policy.NAME) {\r\n this.uninstallEditPolicy(policy.NAME)\r\n }\r\n\r\n policy.onInstall(this)\r\n this.editPolicy.add(policy)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * UnInstall the selection and edit policy from the canvas.\r\n *\r\n * @since 2.2.0\r\n * @param {draw2d.policy.EditPolicy|String} policy\r\n */\r\n uninstallEditPolicy: function (policy) {\r\n if (policy === null) {\r\n return //silently\r\n }\r\n\r\n // either remove exact the policy instance...\r\n //\r\n let removed = this.editPolicy.remove(policy)\r\n if (removed !== null) {\r\n removed.onUninstall(this)\r\n if (removed instanceof draw2d.policy.canvas.ZoomPolicy) {\r\n this.zoomPolicy = null\r\n }\r\n } else {\r\n // ..or all of the same class if the policy isn't installed before\r\n // With this kind of behaviour it is possible to deinstall all policies with\r\n // the same class at once\r\n //\r\n let _this = this\r\n let name = (typeof policy === \"string\") ? policy : policy.NAME\r\n this.editPolicy.grep(function (p) {\r\n if (p.NAME === name) {\r\n p.onUninstall(_this)\r\n // remove short cut handle to the zoom policy\r\n if (p instanceof draw2d.policy.canvas.ZoomPolicy) {\r\n _this.zoomPolicy = null\r\n }\r\n return false\r\n }\r\n return true\r\n })\r\n }\r\n return this\r\n },\r\n\r\n getDropInterceptorPolicies: function () {\r\n return this.editPolicy.clone().grep(function (p) {\r\n return (p instanceof draw2d.policy.canvas.DropInterceptorPolicy)\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * Set the new zoom factor for the canvas. The value must be between [0.01..10]\r\n *\r\n * // you can register an eventhandler if the zoom factor did change\r\n * canvas.on(\"zoom\", function(emitterFigure, zoomData){\r\n * alert(\"canvas zoomed to:\"+zoomData.value);\r\n * });\r\n *\r\n * @param {Number} zoomFactor new zoom factor. range [0.001..10]. 1.0 is no zoom.\r\n * @param {Boolean} [animated] set it to true for smooth zoom in/out\r\n */\r\n setZoom: function (zoomFactor, animated) {\r\n // redirect this legacy method to the new CanvasEditPolicy\r\n //\r\n if (this.zoomPolicy) {\r\n this.zoomPolicy.setZoom(zoomFactor, animated)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Return the current zoom factor of the canvas.\r\n *\r\n * @returns {Number}\r\n */\r\n getZoom: function () {\r\n return this.zoomFactor\r\n },\r\n\r\n /**\r\n *\r\n * Return the dimension of the drawing area\r\n *\r\n * @since 4.4.0\r\n * @returns {draw2d.geo.Rectangle}\r\n */\r\n getDimension: function () {\r\n return new draw2d.geo.Rectangle(0, 0, this.initialWidth, this.initialHeight)\r\n },\r\n\r\n /**\r\n *\r\n * Tells the canvas to resize. If you do not specific any parameters\r\n * the canvas will attempt to determine the height and width by the enclosing bounding box\r\n * of all elements and set the dimension accordingly. If you would like to set the dimension\r\n * explicitly pass in an draw2d.geo.Rectangle or an object with <b>height</b> and <b>width</b> properties.\r\n *\r\n * @since 4.4.0\r\n * @param {draw2d.geo.Rectangle} [dim] the dimension to set or null for autodetect\r\n * @param {Number} [height] the height of the canvas if the first argument is a number and not a Rectangle\r\n */\r\n setDimension: function (dim, height) {\r\n if (typeof dim === \"undefined\") {\r\n let widths = this.getFigures().clone().map(function (f) {\r\n return f.getAbsoluteX() + f.getWidth()\r\n })\r\n let heights = this.getFigures().clone().map(function (f) {\r\n return f.getAbsoluteY() + f.getHeight()\r\n })\r\n this.initialHeight = Math.max(...heights.asArray())\r\n this.initialWidth = Math.max(...widths.asArray())\r\n } else if (dim instanceof draw2d.geo.Rectangle) {\r\n this.initialWidth = dim.w\r\n this.initialHeight = dim.h\r\n } else if (typeof dim.width === \"number\" && typeof dim.height === \"number\") {\r\n this.initialWidth = dim.width\r\n this.initialHeight = dim.height\r\n } else if (typeof dim === \"number\" && typeof height === \"number\") {\r\n this.initialWidth = dim\r\n this.initialHeight = height\r\n }\r\n this.html.css({\"width\": this.initialWidth + \"px\", \"height\": this.initialHeight + \"px\"})\r\n this.paper.setSize(this.initialWidth, this.initialHeight)\r\n this.setZoom(this.zoomFactor, false)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Transforms a document coordinate to canvas coordinate.\r\n *\r\n * @param {Number} x the x coordinate relative to the window\r\n * @param {Number} y the y coordinate relative to the window\r\n *\r\n * @returns {draw2d.geo.Point} The coordinate in relation to the canvas [0,0] position\r\n */\r\n fromDocumentToCanvasCoordinate: function (x, y) {\r\n return new draw2d.geo.Point(\r\n (x - this.getAbsoluteX() + this.getScrollLeft()) * this.zoomFactor,\r\n (y - this.getAbsoluteY() + this.getScrollTop()) * this.zoomFactor)\r\n },\r\n\r\n /**\r\n *\r\n * Transforms a canvas coordinate to document coordinate.\r\n *\r\n * @param {Number} x the x coordinate in the canvas\r\n * @param {Number} y the y coordinate in the canvas\r\n *\r\n * @returns {draw2d.geo.Point} the coordinate in relation to the document [0,0] position\r\n */\r\n fromCanvasToDocumentCoordinate: function (x, y) {\r\n return new draw2d.geo.Point(\r\n ((x * (1 / this.zoomFactor)) + this.getAbsoluteX() - this.getScrollLeft()),\r\n ((y * (1 / this.zoomFactor)) + this.getAbsoluteY() - this.getScrollTop()))\r\n },\r\n\r\n /**\r\n *\r\n * The DOM host of the canvas\r\n *\r\n * @returns {HTMLElement}\r\n */\r\n getHtmlContainer: function () {\r\n return this.html\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return a common event object independed if we run on an iPad or desktop.\r\n *\r\n * @param event\r\n * @returns {DOMEventObject}\r\n * @private\r\n */\r\n _getEvent: function (event) {\r\n // check for iPad, Android touch events\r\n //\r\n if (typeof event.originalEvent !== \"undefined\") {\r\n if (event.originalEvent.touches && event.originalEvent.touches.length) {\r\n return event.originalEvent.touches[0]\r\n } else if (event.originalEvent.changedTouches && event.originalEvent.changedTouches.length) {\r\n return event.originalEvent.changedTouches[0]\r\n }\r\n }\r\n return event\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Set the area which are scrolling the canvas. This can be a jquery selector or\r\n * a jQuery node.\r\n *\r\n * @param {String/HTMLElement} elementSelector\r\n * @returns {this}\r\n **/\r\n setScrollArea: function (elementSelector) {\r\n this.scrollArea = $(elementSelector)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * return the scrolling area of the canvas. This is jQuery object\r\n *\r\n * @returns {JQueryElement}\r\n **/\r\n getScrollArea: function () {\r\n return this.scrollArea\r\n },\r\n\r\n /**\r\n *\r\n * The left scroll position.\r\n *\r\n * @returns {Number} the left scroll offset of the canvas\r\n **/\r\n getScrollLeft: function () {\r\n return this.getScrollArea().scrollLeft()\r\n },\r\n\r\n /**\r\n *\r\n * The top scroll position\r\n *\r\n * @returns {Number} the top scroll offset of the cnavas.\r\n **/\r\n getScrollTop: function () {\r\n return this.getScrollArea().scrollTop()\r\n },\r\n\r\n /**\r\n *\r\n * Set left scroll position.\r\n *\r\n * @param {Number} left the left scroll offset of the canvas\r\n **/\r\n setScrollLeft: function (left) {\r\n this.getScrollArea().scrollLeft(left)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * set top scroll position\r\n *\r\n * @param {Number} top the top scroll offset of the canvas.\r\n **/\r\n setScrollTop: function (top) {\r\n this.getScrollArea().scrollTop(top)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * set the new scroll position of the canvas\r\n *\r\n * @param {Number} top the top scroll offset of the canvas.\r\n * @param {Number} left the left scroll offset of the canvas\r\n * @since 5.8.0\r\n **/\r\n scrollTo: function (top, left) {\r\n this.getScrollArea().scrollTop(top).scrollLeft(left)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The absolute document x offset.\r\n *\r\n * @returns {Number}\r\n **/\r\n getAbsoluteX: function () {\r\n return this.html.offset().left\r\n },\r\n\r\n /**\r\n *\r\n * The absolute document y offset.\r\n *\r\n * @returns {Number}\r\n **/\r\n getAbsoluteY: function () {\r\n return this.html.offset().top\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the width of the canvas\r\n *\r\n * @returns {Number}\r\n **/\r\n getWidth: function () {\r\n return this.html.width()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the height of the canvas.\r\n *\r\n * @returns {Number}\r\n **/\r\n getHeight: function () {\r\n return this.html.height()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Add a figure at the given x/y coordinate. This method fires an event.\r\n *\r\n * Example:\r\n *\r\n * canvas.on(\"figure:add\", function(emitter, event){\r\n * alert(\"figure added:\");\r\n * });\r\n *\r\n * // or more general if you want catch all figure related events\r\n * //\r\n * canvas.on(\"figure\", function(emitter, event){\r\n * // use event.figure.getCanvas()===null to determine if the\r\n * // figure part of the canvas\r\n *\r\n * alert(\"figure added or removed:\");\r\n * });\r\n *\r\n * @param {draw2d.Figure} figure The figure to add.\r\n * @param {Number/draw2d.geo.Point} [x] The new x coordinate of the figure or the x/y coordinate if it is an draw2d.geo.Point\r\n * @param {Number} [y] The y position.\r\n **/\r\n add: function (figure, x, y) {\r\n if (figure.getCanvas() === this) {\r\n return\r\n }\r\n\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n this.linesToRepaintAfterDragDrop = this.lines\r\n this.lines.add(figure)\r\n } else {\r\n this.figures.add(figure)\r\n }\r\n \r\n if (typeof x !== \"undefined\") {\r\n figure.setPosition(x,y)\r\n }\r\n\r\n figure.setCanvas(this)\r\n\r\n // to avoid drag&drop outside of this canvas\r\n figure.installEditPolicy(this.regionDragDropConstraint)\r\n\r\n // important initial call\r\n figure.getShapeElement()\r\n\r\n // init a repaint of the figure. This enforce that all properties\r\n // ( color, dim, stroke,...) will be set and pushed to SVG node.\r\n figure.repaint()\r\n\r\n // fire the figure:add event before the \"move\" event and after the figure.repaint() call!\r\n // - the move event can only be fired if the figure part of the canvas.\r\n // and in this case the notification event should be fired to the listener before\r\n this.fireEvent(\"figure:add\", {figure: figure, canvas: this})\r\n\r\n // fire the event that the figure is part of the canvas\r\n figure.fireEvent(\"added\", {figure: figure, canvas: this})\r\n\r\n // ...now we can fire the initial move event\r\n figure.fireEvent(\"move\", {figure: figure, x: figure.getX(), y: figure.getY(), dx: 0, dy: 0})\r\n\r\n // this is only required if the used router requires the crossing information\r\n // of the connections\r\n if (figure instanceof draw2d.shape.basic.PolyLine) {\r\n this.calculateConnectionIntersection()\r\n this.linesToRepaintAfterDragDrop.each((i, line) => {\r\n line.svgPathString = null\r\n line.repaint()\r\n })\r\n this.linesToRepaintAfterDragDrop = new draw2d.util.ArrayList()\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Remove a figure or connection from the Canvas. This method fires an event\r\n * which can be catched.\r\n *\r\n * Example:\r\n *\r\n * canvas.on(\"figure:remove\", function(emitter, event){\r\n * alert(\"figure removed:\");\r\n * });\r\n *\r\n * // or more general if you want catch all figure related events\r\n * //\r\n * canvas.on(\"figure\", function(emitter, event){\r\n * // use event.figure.getCanvas()===null to determine if the\r\n * // figure part of the canvas\r\n *\r\n * alert(\"figure added or removed:\");\r\n * });\r\n *\r\n *\r\n * @param {draw2d.Figure} figure The figure to remove\r\n **/\r\n remove: function (figure) {\r\n // don't fire events of calll callbacks if the fire isn'T part of this canvas\r\n //\r\n if (figure.getCanvas() !== this) {\r\n return this\r\n }\r\n\r\n // remove the figure from a selection handler as well and cleanup the\r\n // selection feedback\r\n if (this.getSelection().contains(figure)) {\r\n this.editPolicy.each((i, policy) => {\r\n if (typeof policy.unselect === \"function\") {\r\n policy.unselect(this, figure)\r\n }\r\n })\r\n }\r\n\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n this.lines.remove(figure)\r\n } else {\r\n this.figures.remove(figure)\r\n }\r\n\r\n figure.setCanvas(null)\r\n\r\n if (figure instanceof draw2d.Connection) {\r\n figure.disconnect()\r\n }\r\n\r\n this.fireEvent(\"figure:remove\", {figure: figure})\r\n\r\n figure.fireEvent(\"removed\", {figure: figure, canvas: this})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns all lines/connections in this workflow/canvas.<br>\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getLines: function () {\r\n return this.lines\r\n },\r\n\r\n /**\r\n *\r\n * Returns the internal figures.<br>\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getFigures: function () {\r\n return this.figures\r\n },\r\n\r\n /**\r\n *\r\n * Returns the line or connection with the given id.\r\n *\r\n * @param {String} id The id of the line.\r\n *\r\n * @returns {draw2d.shape.basic.Line}\r\n **/\r\n getLine: function (id) {\r\n let count = this.lines.getSize()\r\n for (let i = 0; i < count; i++) {\r\n let line = this.lines.get(i)\r\n if (line.getId() === id) {\r\n return line\r\n }\r\n }\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Returns the figure with the given id.\r\n *\r\n * @param {String} id The id of the figure.\r\n * @returns {draw2d.Figure}\r\n **/\r\n getFigure: function (id) {\r\n let figure = null\r\n this.figures.each((i, e) => {\r\n if (e.id === id) {\r\n figure = e\r\n return false\r\n }\r\n })\r\n return figure\r\n },\r\n\r\n /**\r\n *\r\n * Return all intersections draw2d.geo.Point between the given line and all other\r\n * lines in the canvas.\r\n *\r\n * @param {draw2d.shape.basic.Line} line the line for the intersection test\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getIntersection: function (line) {\r\n let result = new draw2d.util.ArrayList()\r\n\r\n this.lineIntersections.each((i, entry) => {\r\n if (entry.line === line) {\r\n entry.intersection.each((j, p) => {\r\n result.add({x: p.x, y: p.y, justTouching: p.justTouching, other: entry.other})\r\n })\r\n }\r\n })\r\n\r\n return result\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Adjust the coordinate with the installed SnapToHelper.\r\n *\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {draw2d.geo.Point} pos The position to adjust\r\n *\r\n * @returns {draw2d.geo.Point} the adjusted position\r\n * @private\r\n **/\r\n snapToHelper: function (figure, pos) {\r\n // disable snapToPos if we have select more than one element\r\n // which are currently in Drag&Drop operation\r\n //\r\n if (this.getSelection().getSize() > 1) {\r\n return pos\r\n }\r\n\r\n let orig = pos.clone()\r\n this.editPolicy.each((i, policy) => {\r\n if (policy instanceof draw2d.policy.canvas.SnapToEditPolicy) {\r\n pos = policy.snap(this, figure, pos, orig)\r\n }\r\n })\r\n\r\n return pos\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Register a port to the canvas. This is required for other ports to find a valid drop target.\r\n *\r\n * @param {draw2d.Port} port The new port which has been added to the Canvas.\r\n **/\r\n registerPort: function (port) {\r\n // All elements have the same drop targets.\r\n //\r\n if (!this.commonPorts.contains(port)) {\r\n this.commonPorts.add(port)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Remove a port from the internal cnavas registration. Now other ports can't find the\r\n * port anymore as drop target. The port itself is still visible.\r\n *\r\n * @param {draw2d.Port} port The port to unregister as potential drop target\r\n * @private\r\n * @returns {this}\r\n **/\r\n unregisterPort: function (port) {\r\n this.commonPorts.remove(port)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return all ports in the canvas\r\n *\r\n * @returns {draw2d.util.ArrayList} all ports from all figures\r\n */\r\n getAllPorts: function () {\r\n return this.commonPorts\r\n },\r\n\r\n /**\r\n *\r\n * Returns the command stack for the Canvas. Required for undo/redo support.\r\n *\r\n * @returns {draw2d.command.CommandStack}\r\n **/\r\n getCommandStack: function () {\r\n return this.commandStack\r\n },\r\n\r\n /**\r\n *\r\n * Returns the current selected figure in the Canvas.\r\n *\r\n * @returns {draw2d.Figure}\r\n **/\r\n getPrimarySelection: function () {\r\n return this.selection.getPrimary()\r\n },\r\n\r\n /**\r\n *\r\n * Returns the current selection.\r\n *\r\n * @returns {draw2d.Selection}\r\n **/\r\n getSelection: function () {\r\n return this.selection\r\n },\r\n\r\n /**\r\n *\r\n * Set the current selected figure or figures in the canvas.<br>\r\n * <br>\r\n * You can hand over a draw2d.util.ArrayList since version 4.8.0 for multiple selection.\r\n *\r\n * @param {draw2d.Figure| draw2d.util.ArrayList} object The figure or list of figures to select.\r\n * @returns {this}\r\n **/\r\n setCurrentSelection: function (object) {\r\n // deselect the current selected figures\r\n //\r\n // clone the array (getAll) before iterate and modify the initial array\r\n this.selection.getAll().each((i, e) => {\r\n this.editPolicy.each((i, policy) => {\r\n if (typeof policy.unselect === \"function\") {\r\n policy.unselect(this, e)\r\n }\r\n })\r\n })\r\n this.addSelection(object)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Add the current figure to the selection. If a single selection policy is installed in the\r\n * canvas the selection before is reseted and the figure is the one and only selection.\r\n *\r\n * @param {draw2d.Figure | draw2d.util.ArrayList} object The figure(s) to add to the selection\r\n * @since 4.6.0\r\n * @returns {this}\r\n **/\r\n addSelection: function (object) {\r\n\r\n let add = (i, figure) =>{\r\n this.editPolicy.each( (i, policy) =>{\r\n if (typeof policy.select === \"function\") {\r\n policy.select(this, figure)\r\n }\r\n })\r\n }\r\n\r\n if (object instanceof draw2d.util.ArrayList || object instanceof draw2d.Selection) {\r\n object.each(add)\r\n } else {\r\n add(0, object)\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the best figure at the location [x,y]. It is a simple hit test. Keep in mind that only visible objects\r\n * are returned.\r\n *\r\n *\r\n * @param {Number} x The x position.\r\n * @param {Number} y The y position.\r\n * @param {draw2d.Figure|Array|Class} [blacklist] The figures or class which should be ignored.\r\n * @param {draw2d.Figure|Array|Class} [whitelist] The figures or class should be considered.\r\n *\r\n * @returns {draw2d.Figure}\r\n **/\r\n getBestFigure: function (x, y, blacklist, whitelist) {\r\n if (!Array.isArray(blacklist)) {\r\n if (blacklist)\r\n blacklist = [blacklist]\r\n else\r\n blacklist = []\r\n }\r\n\r\n if (!Array.isArray(whitelist)) {\r\n if (whitelist)\r\n whitelist = [whitelist]\r\n else\r\n whitelist = []\r\n }\r\n\r\n let result = null\r\n let testFigure = null\r\n\r\n\r\n let isInList = function (testFigure, list) {\r\n for (let i = 0, len = list.length; i < len; i++) {\r\n let considering = list[i]\r\n if (typeof considering === \"function\") {\r\n if (testFigure instanceof considering) {\r\n return true\r\n }\r\n } else if ((considering === testFigure) || (considering.contains(testFigure))) {\r\n return true\r\n }\r\n }\r\n return false\r\n }\r\n let isInBlacklist = function (item) {\r\n return isInList(item, blacklist)\r\n }\r\n // empty whitelist means that every kind of object is allowed\r\n let isInWhitelist = whitelist.length === 0 ? function () {\r\n return true\r\n } : function (item) {\r\n return isInList(item, whitelist)\r\n }\r\n\r\n\r\n // tool method to check recursive a figure for hitTest\r\n //\r\n let checkRecursive = function (children) {\r\n children.each(function (i, e) {\r\n let c = e.figure\r\n checkRecursive(c.children)\r\n if (result === null && c.isVisible() && c.hitTest(x, y) && !isInBlacklist(c) && isInWhitelist(c)) {\r\n result = c\r\n }\r\n return result === null // break the each-loop if we found an element\r\n })\r\n }\r\n\r\n\r\n // ResizeHandles\r\n //\r\n for (let i = 0, len = this.resizeHandles.getSize(); i < len; i++) {\r\n testFigure = this.resizeHandles.get(i)\r\n if (testFigure.isVisible() && testFigure.hitTest(x, y) && !isInBlacklist(testFigure) && isInWhitelist(testFigure)) {\r\n return testFigure\r\n }\r\n }\r\n\r\n // Checking ports\r\n //\r\n for (let i = 0, len = this.commonPorts.getSize(); i < len; i++) {\r\n let port = this.commonPorts.get(i)\r\n // check first a children of the figure\r\n //\r\n checkRecursive(port.children)\r\n\r\n if (result === null && port.isVisible() && port.hitTest(x, y) && !isInBlacklist(port) && isInWhitelist(port)) {\r\n result = port\r\n }\r\n\r\n if (result !== null) {\r\n return result\r\n }\r\n }\r\n\r\n\r\n // Check now the common objects.\r\n // run reverse to aware the z-oder of the figures\r\n for (let i = (this.figures.getSize() - 1); i >= 0; i--) {\r\n let figure = this.figures.get(i)\r\n // check first a children of the figure\r\n //\r\n checkRecursive(figure.children)\r\n\r\n // ...and the figure itself\r\n //\r\n if (result === null && figure.isVisible() && figure.hitTest(x, y) && !isInBlacklist(figure) && isInWhitelist(figure)) {\r\n result = figure\r\n break\r\n }\r\n }\r\n\r\n let figureResult = result\r\n let childResult = null\r\n let lineResult = this.getBestLine(x, y, blacklist, whitelist)\r\n result = null\r\n\r\n\r\n // Check the children of the lines as well\r\n // Not selectable/draggable. But should receive onClick/onDoubleClick events\r\n // as well.\r\n let count = this.lines.getSize()\r\n for (let i = 0; i < count; i++) {\r\n let line = this.lines.get(i)\r\n // check first a children of the figure\r\n //\r\n checkRecursive(line.children)\r\n\r\n if (result !== null) {\r\n childResult = result\r\n break\r\n }\r\n }\r\n\r\n let figureIndex = figureResult !== null ? $(figureResult.shape.node).index() : -1\r\n let childIndex = childResult !== null ? $(childResult.shape.node).index() : -1\r\n let lineIndex = lineResult !== null ? $(lineResult.shape.node).index() : -1\r\n let array = [\r\n {i: figureIndex, f: figureResult},\r\n {i: childIndex, f: childResult},\r\n {i: lineIndex, f: lineResult}\r\n ]\r\n array = array.filter((e) => e.i !== -1);\r\n array = array.sort((a, b) => b.i - a.i)\r\n\r\n\r\n if (array.length > 0) {\r\n result = array[0].f\r\n }\r\n\r\n return result\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the line which match the hands over coordinate\r\n *\r\n * @param {Number} x the x-coordinate for the hit test\r\n * @param {Number} y the x-coordinate for the hit test\r\n * @param {draw2d.shape.basic.Line} [lineToIgnore] a possible line which should be ignored for the hit test\r\n *\r\n * @private\r\n * @returns {draw2d.shape.basic.Line}\r\n **/\r\n getBestLine: function (x, y, lineToIgnore) {\r\n if (!Array.isArray(lineToIgnore)) {\r\n if (lineToIgnore instanceof draw2d.Figure) {\r\n lineToIgnore = [lineToIgnore]\r\n } else {\r\n lineToIgnore = []\r\n }\r\n }\r\n let count = this.lines.getSize()\r\n\r\n for (let i = 0; i < count; i++) {\r\n let line = this.lines.get(i)\r\n if (line.isVisible() === true && line.hitTest(x, y) === true && $.inArray(line, lineToIgnore) === -1) {\r\n return line\r\n }\r\n }\r\n return null\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework during drag&drop operations.<br>\r\n * Droppable can be setup with:\r\n * <pre>\r\n * $(\".draw2d_droppable\").draggable({\r\n * appendTo:\"#container\",\r\n * stack:\"#container\",\r\n * zIndex: 27000,\r\n * helper:\"clone\",\r\n * start: function(e, ui){$(ui.helper).addClass(\"shadow\");}\r\n * });\r\n * </pre>\r\n * Draw2D use the jQuery draggable/droppable lib. Please inspect\r\n * http://jqueryui.com/demos/droppable/ for further information.\r\n *\r\n * @param {HTMLElement} draggedDomNode The DOM element which is currently dragging\r\n *\r\n * @template\r\n **/\r\n onDragEnter: function (draggedDomNode) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the DragDrop object is moving around.<br>\r\n * <br>\r\n * Draw2D use the jQuery draggable/droppable lib. Please inspect\r\n * http://jqueryui.com/demos/droppable/ for further information.\r\n *\r\n * @param {HTMLElement} draggedDomNode The dragged DOM element.\r\n * @param {Number} x the x coordinate of the drag\r\n * @param {Number} y the y coordinate of the drag\r\n *\r\n * @template\r\n **/\r\n onDrag: function (draggedDomNode, x, y) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the DragDrop object leaving the current hover figure.<br>\r\n * <br>\r\n * Graphiti use the jQuery draggable/droppable lib. Please inspect\r\n * http://jqueryui.com/demos/droppable/ for further information.\r\n *\r\n * @param {HTMLElement} draggedDomNode The figure which is currently dragging\r\n *\r\n * @template\r\n **/\r\n onDragLeave: function (draggedDomNode) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the user drop the droppedDomNode onto the canvas.<br>\r\n * <br>\r\n * Draw2D use the jQuery draggable/droppable lib. Please inspect\r\n * http://jqueryui.com/demos/droppable/ for further information.\r\n *\r\n * @param {HTMLElement} droppedDomNode The dropped DOM element.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @template\r\n **/\r\n onDrop: function (droppedDomNode, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method for the double click event. The x/y coordinates are relative to the top left\r\n * corner of the canvas.\r\n *\r\n * @private\r\n **/\r\n onDoubleClick: function (x, y, shiftKey, ctrlKey) {\r\n // check if a line has been hit\r\n //\r\n let figure = this.getBestFigure(x, y)\r\n\r\n // or a line/connection. May we should test the line before a figure..?\r\n // (since 4.0.0)\r\n if (figure === null) {\r\n figure = this.getBestLine(x, y)\r\n }\r\n\r\n this.fireEvent(\"dblclick\", {figure: figure, x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n // forward the event to all install policies as well.\r\n // (since 4.0.0)\r\n this.editPolicy.each(function (i, policy) {\r\n policy.onDoubleClick(figure, x, y, shiftKey, ctrlKey)\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * @param {Number} x the x coordinate of the event\r\n * @param {Number} y the y coordinate of the event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onClick: function (x, y, shiftKey, ctrlKey) {\r\n // check if a figure has been hit\r\n //\r\n let figure = this.getBestFigure(x, y)\r\n\r\n this.fireEvent(\"click\", {\r\n figure: figure,\r\n x: x,\r\n y: y,\r\n relX: figure !== null ? x - figure.getAbsoluteX() : 0,\r\n relY: figure !== null ? y - figure.getAbsoluteY() : 0,\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n\r\n // forward the event to all install policies as well.\r\n // (since 3.0.0)\r\n this.editPolicy.each(function (i, policy) {\r\n policy.onClick(figure, x, y, shiftKey, ctrlKey)\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * The user has triggered a right click. Redirect them to a responsible figure.\r\n *\r\n * @param {Number} x The x-coordinate of the click\r\n * @param {Number} y The y-coordinate of the click\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @private\r\n * @since 1.1.0\r\n **/\r\n onRightMouseDown: function (x, y, shiftKey, ctrlKey) {\r\n let figure = this.getBestFigure(x, y)\r\n this.fireEvent(\"contextmenu\", {figure: figure, x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n if (figure !== null) {\r\n figure.fireEvent(\"contextmenu\", {figure: figure, x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n // @deprecated legacy call\r\n figure.onContextMenu(x, y)\r\n\r\n // forward the event to all installed policies of the figure\r\n // soft migration from onHookXYZ to Policies.\r\n // since 4.4.0\r\n figure.editPolicy.each(function (i, policy) {\r\n policy.onRightMouseDown(figure, x, y, shiftKey, ctrlKey)\r\n })\r\n }\r\n\r\n // forward the event to all install policies as well.\r\n // (since 4.4.0)\r\n this.editPolicy.each(function (i, policy) {\r\n policy.onRightMouseDown(figure, x, y, shiftKey, ctrlKey)\r\n })\r\n\r\n },\r\n\r\n /**\r\n *\r\n * @param {Number} wheelDelta the delata of the wheel rotation\r\n * @param {Number} x the x coordinate of the event\r\n * @param {Number} y the y coordinate of the event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onMouseWheel: function (wheelDelta, x, y, shiftKey, ctrlKey) {\r\n let returnValue = true\r\n this.fireEvent(\"wheel\", {wheelDelta: wheelDelta, x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n // forward the event to all install policies as well.\r\n // (since 3.0.0)\r\n this.editPolicy.each(function (i, policy) {\r\n returnValue = policy.onMouseWheel(wheelDelta, x, y, shiftKey, ctrlKey) && returnValue\r\n })\r\n\r\n return returnValue\r\n },\r\n\r\n\r\n // NEW EVENT HANDLING SINCE VERSION 5.0.0\r\n /**\r\n *\r\n * Execute all handlers and behaviors attached to the canvas for the given event type.\r\n *\r\n *\r\n * @param {String} event the event to trigger\r\n * @param {Object} [args] optional parameters for the triggered event callback\r\n * @private\r\n * @since 5.0.0\r\n */\r\n fireEvent: function (event, args) {\r\n if (typeof this.eventSubscriptions[event] === 'undefined') {\r\n return\r\n }\r\n\r\n let subscribers = this.eventSubscriptions[event]\r\n for (let i = 0; i < subscribers.length; i++) {\r\n try {\r\n subscribers[i](this, args)\r\n } catch (exc) {\r\n console.log(exc)\r\n console.log(subscribers[i])\r\n debugger\r\n }\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Attach an event handler function for one or more events to the canvas.\r\n * To remove events bound with .on(), see {@link #off}.\r\n *\r\n * possible events are:<br>\r\n * <ul>\r\n * <li>reset</li>\r\n * <li>select</li>\r\n * </ul>\r\n *\r\n * Example:\r\n *\r\n * canvas.on(\"clear\", function(emitter, event){\r\n * alert(\"canvas.clear() called.\");\r\n * });\r\n *\r\n * canvas.on(\"select\", function(emitter,event){\r\n * alert(\"figure selected\");\r\n * });\r\n *\r\n * canvas.on(\"unselect\", function(emitter,event){\r\n * alert(\"figure unselected\");\r\n * });\r\n * \r\n * @param {String} event One or more space-separated event types\r\n * @param {Function} callback A function to execute when the event is triggered.\r\n * @param {draw2d.Canvas} callback.emitter the emitter of the event\r\n * @param {Object} [callback.obj] optional event related data\r\n *\r\n * @since 5.0.0\r\n */\r\n on: function (event, callback) {\r\n let events = event.split(\" \")\r\n for (let i = 0; i < events.length; i++) {\r\n if (typeof this.eventSubscriptions[events[i]] === 'undefined') {\r\n this.eventSubscriptions[events[i]] = []\r\n }\r\n this.eventSubscriptions[events[i]].push(callback)\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The `off()` method removes event handlers that were attached with {@link #on}.<br>\r\n * Calling .off() with no arguments removes all handlers attached to the canvas.<br>\r\n * <br>\r\n * If a simple event name such as \"reset\" is provided, all events of that type are removed from the canvas.\r\n *\r\n *\r\n * @param {String|Function} eventOrFunction the event name of the registerd function\r\n * @since 5.0.0\r\n */\r\n off: function (eventOrFunction) {\r\n if (typeof eventOrFunction === \"undefined\") {\r\n this.eventSubscriptions = {}\r\n } else if (typeof eventOrFunction === 'string') {\r\n this.eventSubscriptions[eventOrFunction] = []\r\n } else {\r\n for (let event in this.eventSubscriptions) {\r\n this.eventSubscriptions[event] = this.eventSubscriptions[event].filter(function (callback) {\r\n return callback !== eventOrFunction\r\n })\r\n }\r\n }\r\n\r\n return this\r\n }\r\n })\r\n","import draw2d from 'packages'\r\n\r\ndraw2d.Configuration = {\r\n version : \"@VERSION@\",\r\n i18n : {\r\n command : {\r\n move : \"Move Shape\",\r\n assignShape : \"Add Shapes to Composite\",\r\n groupShapes : \"Group Shapes\",\r\n ungroupShapes : \"Ungroup Shapes\",\r\n deleteShape : \"Delete Shape\",\r\n moveShape : \"Move Shape\",\r\n moveLine : \"Move Line\",\r\n addShape : \"Add Shape\",\r\n moveVertex : \"Move Vertex\",\r\n moveVertices : \"Move Vertices\",\r\n deleteVertex : \"Delete Vertex\",\r\n resizeShape : \"Resize Shape\",\r\n rotateShape : \"Rotate Shape\",\r\n collection : \"Execute Commands\",\r\n addVertex : \"Add Vertex\",\r\n changeAttributes:\"Change Attributes\",\r\n connectPorts : \"Connect Ports\"\r\n },\r\n menu : {\r\n deleteSegment : \"Delete Segment\",\r\n addSegment : \"Add Segment\"\r\n },\r\n dialog : {\r\n filenamePrompt : \"Enter Filename:\"\r\n }\r\n },\r\n\r\n factory:{\r\n \t// all selection policies calles this method to create a ResizeHandle.\r\n \t// It is possible to replace this method with a custom implementation\r\n \t// @since 5.2.0\r\n \tcreateResizeHandle: function(owner, type, width, height){\r\n // create a custom SelectionPolicy instead\r\n console.log(\"deprecated call factory.createResizeHandle\");\r\n \t\treturn new draw2d.ResizeHandle({ owner, type, width, height });\r\n \t},\r\n \t// The commands an canvas calles this method to create a new connection.\r\n \t// all parameters are optional.\r\n \t// @since 5.3.0\r\n // @deprecated\r\n \tcreateConnection: function(sourcePort, targetPort, callback, dropTarget){\r\n console.log(\"deprecated call factory.createConnection\");\r\n debugger;\r\n \t return new draw2d.Connection();\r\n \t},\r\n // @since 5.3.0\r\n \tcreateInputPort: function(relatedFigure){\r\n \t return new draw2d.InputPort();\r\n \t},\r\n // @since 5.3.0\r\n createOutputPort: function(relatedFigure){\r\n return new draw2d.OutputPort();\r\n },\r\n // @since 5.3.0\r\n createHybridPort: function(relatedFigure){\r\n return new draw2d.HybridPort();\r\n }\r\n }\r\n};\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Connections figures are used to display a line between two points. The Connection interface extends\r\n * {@link draw2d.shape.basic.PolyLine PolyLine}.<br>\r\n * The source and target endpoints of a connection are each defined using a {@link draw2d.layout.anchor.ConnectionAnchor ConnectionAnchor}.\r\n * These endpoints, along with any other points on the connection, are set by the connection's {@link draw2d.layout.connection.ConnectionRouter ConnectionRouter}.\r\n * <br>\r\n * Usually every connection in a drawing has the same router instance. Connections with\r\n * common endpoints can share anchor instances as well.\r\n *\r\n * <h2>Connection Usage</h2>\r\n *\r\n * Connections are created and added just like any other figure. Unlike normal figures, you must not set the\r\n * bounds of a connection. Instead, you must provide the source and target port and let the connection router\r\n * calculate the connection's points. The connection then determines its own bounding box.<br>\r\n * <br>\r\n * A connection has a simple router by default - one that can connect the source and target anchors. But additional routers\r\n * are available and can be set on the connection. Some routers can handle constraints for the connection. Note that when\r\n * setting a routing constraint on a connection, you must first set the router which will use that constraint.<br>\r\n * <br>\r\n *\r\n * <b>TODO:<br></b>\r\n * <i>\r\n * A convenient way to share the router with all connections and to place connections above the drawing is to use a\r\n * ConnectionLayer. The layer has a connection router property which it shares with every child that's a connection.\r\n * You can update this property and easily change every connection's router at once.\r\n * </i>\r\n * <br>\r\n * <br>\r\n * <h2>Routing and Anchors</h2>\r\n * A connection always has a router and it must set at least two ports on the connection: the source and target\r\n * endpoints. By default, or when set to null, the connection's routing will be performed by an internal default router.\r\n * The ends are placed with the help of {@link draw2d.layout.anchor.ConnectionAnchor anchors}. An\r\n * {@link draw2d.layout.anchor.ConnectionAnchor anchors} is a fixed or calculated location, usually associated with some\r\n * figure. For example, the {@link draw2d.layout.anchor.ChopboxConnectionAnchor ChopboxAnchor} finds the point at which a\r\n * line going to the reference point intersects a box, such as the bounds of a figure. The reference point is either\r\n * the anchor at the opposite end, or a bendpoint or some other point nearest to the anchor.\r\n * <br>\r\n * {@img jsdoc_chopbox.gif ChopboxAnchor}\r\n * <br>\r\n * The router calculates the endpoints and any other points in the middle of the connection. It then sets the points on the\r\n * connection by calling {@link draw2d.shape.basic.PolyLine#addPoint Polyline.addPoint}. The connection's existing point list\r\n * can be reused to reduce garbage, but the points must be set on the connection anyway so that it knows about any changes made.\r\n * <br>\r\n * <h2>Adding Decorations and Children to Connections</h2>\r\n * Like most figures, Connection supports the addition of children. The children might be a label that\r\n * decorate the connection. The placement of each type of decoration can vary, so a {@link draw2d.layout.locator.ConnectionLocator ConnectionLocator}\r\n * is used to delegate to each child's constraint object, a Locator. <br>\r\n * <br>\r\n * {@link draw2d.decoration.connection.Decorator Decorator} can be used to create and render a rotatable shape at\r\n * the end or start of a connection like arrows or boxes. Examples are {@link draw2d.decoration.connection.ArrowDecorator ArrowDecorator}, {@link draw2d.decoration.connection.BarDecorator BarDecorator} or {@link draw2d.decoration.connection.CircleDecorator CircleDecorator}\r\n * <br>\r\n * <h2>Connection Layout</h2>\r\n * Connections extend the process of validation and layout to include routing. Since layout is the process of positioning children, routing must\r\n * come first. This allows a child's locator to operate on the connection's newly-routed points.<br>\r\n * Check out [Class System Guide](#!/guide/class_system) for additional reading.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.PolyLine\r\n */\r\n\r\ndraw2d.Connection = draw2d.shape.basic.PolyLine.extend(\r\n /** @lends draw2d.Connection.prototype */\r\n {\r\n\r\n NAME: \"draw2d.Connection\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.sourcePort = null\r\n this.targetPort = null\r\n\r\n this.oldPoint = null\r\n\r\n this.sourceDecorator = null\r\n /*:draw2d.ConnectionDecorator*/\r\n this.targetDecorator = null\r\n /*:draw2d.ConnectionDecorator*/\r\n\r\n // decoration of the polyline\r\n //\r\n this.sourceDecoratorNode = null\r\n this.targetDecoratorNode = null\r\n\r\n // helper let to restore the initial visual representation if the user drag&drop\r\n // the port outside of the browser window. In this case some events get lost and\r\n // I can restore the initial state of the connection if the mouse comes in the browser window\r\n // again.\r\n this.isMoving = false\r\n\r\n this.moveListener = (figure) => {\r\n if (figure === this.sourcePort) {\r\n this.setStartPoint(this.sourcePort.getAbsoluteX(), this.sourcePort.getAbsoluteY())\r\n } else {\r\n this.setEndPoint(this.targetPort.getAbsoluteX(), this.targetPort.getAbsoluteY())\r\n }\r\n }\r\n\r\n this._super(\r\n {\r\n color: \"#129CE4\",\r\n stroke: 2,\r\n // outlineStroke:1,\r\n // outlineColor:\"#ffffff\",\r\n radius: 3,\r\n ...attr},\r\n {\r\n sourceDecorator: this.setSourceDecorator,\r\n targetDecorator: this.setTargetDecorator,\r\n source: this.setSource,\r\n target: this.setTarget,\r\n ...setter\r\n },\r\n {\r\n sourceDecorator: this.getSourceDecorator,\r\n targetDecorator: this.getTargetDecorator,\r\n source: this.getSource,\r\n target: this.getTarget,\r\n ...getter\r\n })\r\n },\r\n\r\n\r\n /**\r\n * @private\r\n **/\r\n disconnect: function () {\r\n if (this.sourcePort !== null) {\r\n this.sourcePort.off(this.moveListener)\r\n this.sourcePort.connections.remove(this)\r\n\r\n // fire the events to all listener\r\n this.sourcePort.fireEvent(\"disconnect\", {port: this.sourcePort, connection: this})\r\n this.canvas?.fireEvent(\"disconnect\", {port: this.sourcePort, connection: this})\r\n this.sourcePort.onDisconnect(this)\r\n\r\n this.fireSourcePortRouteEvent()\r\n }\r\n\r\n if (this.targetPort !== null) {\r\n this.targetPort.off(this.moveListener)\r\n this.targetPort.connections.remove(this)\r\n\r\n // fire the events to all listener\r\n this.targetPort.fireEvent(\"disconnect\", {port: this.targetPort, connection: this})\r\n this.canvas?.fireEvent(\"disconnect\", {port: this.targetPort, connection: this})\r\n this.targetPort.onDisconnect(this)\r\n\r\n this.fireTargetPortRouteEvent()\r\n }\r\n },\r\n\r\n\r\n /**\r\n * @private\r\n **/\r\n reconnect: function () {\r\n if (this.sourcePort !== null) {\r\n this.sourcePort.on(\"move\", this.moveListener)\r\n this.sourcePort.connections.add(this)\r\n\r\n // fire the events to all listener\r\n this.sourcePort.fireEvent(\"connect\", {port: this.sourcePort, connection: this})\r\n this.canvas?.fireEvent(\"connect\", {port: this.sourcePort, connection: this})\r\n this.sourcePort.onConnect(this)\r\n\r\n this.fireSourcePortRouteEvent()\r\n }\r\n\r\n if (this.targetPort !== null) {\r\n this.targetPort.on(\"move\", this.moveListener)\r\n this.targetPort.connections.add(this)\r\n\r\n // fire the events to all listener\r\n this.targetPort.fireEvent(\"connect\", {port: this.targetPort, connection: this})\r\n this.canvas?.fireEvent(\"connect\", {port: this.targetPort, connection: this})\r\n this.targetPort.onConnect(this)\r\n\r\n this.fireTargetPortRouteEvent()\r\n }\r\n this.routingRequired = true\r\n this.repaint()\r\n },\r\n\r\n\r\n /**\r\n * You can't drag&drop the resize handles of a connector.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n isResizeable: function () {\r\n return this.isDraggable()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Add a child figure to the Connection. The hands over figure doesn't support drag&drop\r\n * operations. It's only a decorator for the connection.<br>\r\n * Mainly for labels or other fancy decorations :-)\r\n *\r\n * @param {draw2d.Figure} child the figure to add as decoration to the connection.\r\n * @param {draw2d.layout.locator.ConnectionLocator} locator the locator for the child.\r\n * @param {Number} [index] optional index where to insert the figure\r\n * @returns {this}\r\n **/\r\n add: function (child, locator, index) {\r\n // just to ensure the right interface for the locator.\r\n // The base class needs only 'draw2d.layout.locator.Locator'.\r\n if (!(locator instanceof draw2d.layout.locator.ConnectionLocator)) {\r\n throw \"Locator must implement the class draw2d.layout.locator.ConnectionLocator\"\r\n }\r\n\r\n this._super(child, locator, index)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the ConnectionDecorator for this object.\r\n *\r\n * @param {draw2d.decoration.connection.Decorator} decorator the new source decorator for the connection\r\n * @returns {this}\r\n **/\r\n setSourceDecorator: function (decorator) {\r\n\r\n this.sourceDecorator?.setParent(null)\r\n\r\n this.sourceDecorator = decorator\r\n this.routingRequired = true\r\n this.sourceDecorator.setParent(this)\r\n\r\n this.sourceDecoratorNode?.remove()\r\n this.sourceDecoratorNode = null\r\n\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the current source ConnectionDecorator for this object.\r\n *\r\n * @returns draw2d.decoration.connection.Decorator\r\n **/\r\n getSourceDecorator: function () {\r\n return this.sourceDecorator\r\n },\r\n\r\n /**\r\n *\r\n * Set the ConnectionDecorator for this object.\r\n *\r\n * @param {draw2d.decoration.connection.Decorator} decorator the new target decorator for the connection\r\n * @returns {this}\r\n **/\r\n setTargetDecorator: function (decorator) {\r\n this.targetDecorator?.setParent(null)\r\n\r\n this.targetDecorator = decorator\r\n this.routingRequired = true\r\n this.targetDecorator.setParent(this)\r\n\r\n this.targetDecoratorNode?.remove()\r\n this.targetDecoratorNode = null\r\n\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the current target ConnectionDecorator for this object.\r\n *\r\n * @returns draw2d.decoration.connection.Decorator\r\n **/\r\n getTargetDecorator: function () {\r\n return this.targetDecorator\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Calculate the path of the polyline.\r\n *\r\n * @param {Object} routingHints some helper attributes for the router\r\n * @param {Boolean} routingHints.startMoved is true if just the start location has moved\r\n * @param {Boolean} routingHints.destMoved is true if the destination location has changed\r\n * @private\r\n */\r\n calculatePath: function (routingHints) {\r\n\r\n if (this.sourcePort === null || this.targetPort === null) {\r\n return this\r\n }\r\n\r\n this._super(routingHints)\r\n\r\n if (this.shape !== null) {\r\n let z1 = this.sourcePort.getZOrder()\r\n let z2 = this.targetPort.getZOrder()\r\n this.toBack(z1 < z2 ? this.sourcePort:this.targetPort)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @private\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || \r\n this.shape === null || \r\n this.sourcePort === null || \r\n this.targetPort === null) {\r\n return\r\n }\r\n\r\n\r\n this._super(attributes)\r\n\r\n // paint the decorator if any exists\r\n //\r\n if (this.targetDecorator !== null && this.targetDecoratorNode === null) {\r\n this.targetDecoratorNode = this.targetDecorator.paint(this.getCanvas().paper)\r\n }\r\n\r\n if (this.sourceDecorator !== null && this.sourceDecoratorNode === null) {\r\n this.sourceDecoratorNode = this.sourceDecorator.paint(this.getCanvas().paper)\r\n }\r\n\r\n // translate/transform the decorations to the end/start of the connection\r\n // and rotate them as well\r\n //\r\n if (this.sourceDecoratorNode !== null) {\r\n let start = this.getVertices().first()\r\n this.sourceDecoratorNode.transform(\"r\" + this.getStartAngle() + \",\" + start.x + \",\" + start.y + \" t\" + start.x + \",\" + start.y)\r\n // propagate the color and the opacity to the decoration as well\r\n this.sourceDecoratorNode.attr({opacity: this.alpha})\r\n // apply the color of the connection if the decoration doesn't have any\r\n if (this.sourceDecorator.getColor() === null) {\r\n this.sourceDecoratorNode.attr({\"stroke\": \"#\" + this.lineColor.hex()})\r\n } else {\r\n this.sourceDecoratorNode.attr({\"stroke\": \"#\" + this.sourceDecorator.getColor().hex()})\r\n }\r\n this.sourceDecoratorNode.forEach(shape => {\r\n shape.node.setAttribute(\"class\", this.cssClass !== null ? this.cssClass : \"\")\r\n })\r\n }\r\n\r\n if (this.targetDecoratorNode !== null) {\r\n let end = this.getVertices().last()\r\n this.targetDecoratorNode.transform(\"r\" + this.getEndAngle() + \",\" + end.x + \",\" + end.y + \" t\" + end.x + \",\" + end.y)\r\n this.targetDecoratorNode.attr({opacity: this.alpha})\r\n // apply the color of the connection if the decoration doesn't have any\r\n if (this.targetDecorator.getColor() === null) {\r\n this.targetDecoratorNode.attr({stroke: this.lineColor.hash()})\r\n } else {\r\n this.targetDecoratorNode.attr({stroke: this.targetDecorator.getColor().hash()})\r\n }\r\n this.targetDecoratorNode.forEach(shape => {\r\n shape.node.setAttribute(\"class\", this.cssClass !== null ? this.cssClass : \"\")\r\n })\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * The x-offset related to the canvas.\r\n * Didn't provided by a connection. Return always '0'. This is required\r\n * for children position calculation. (e.g. Label decoration)\r\n *\r\n * @returns {Number} the x-offset to the parent figure\r\n **/\r\n getAbsoluteX: function () {\r\n return 0\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The y-offset related to the canvas.\r\n * Didn't provided by a connection. Return always '0'. This is required\r\n * for children position calculation. (e.g. Label decoration)\r\n *\r\n * @returns {Number} The y-offset to the parent figure.\r\n **/\r\n getAbsoluteY: function () {\r\n return 0\r\n },\r\n\r\n\r\n postProcess: function (postProcessCache) {\r\n this.router.postProcess(this, this.getCanvas(), postProcessCache)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Don't call them manually. This will be done by the framework.<br>\r\n * Will be called if the object are moved via drag and drop.\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call\r\n * the super implementation via <code>this._super(dx, dy, dx2, dy2);</code>\r\n * @private\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n if (this.command === null) {\r\n return\r\n }\r\n\r\n // Delegate the drag&drop operation to the router. The router has\r\n // all the meta information how to update start/end vertices\r\n //\r\n this.router.onDrag(this, dx, dy, dx2, dy2)\r\n\r\n this.command.updateVertices(this.getVertices().clone())\r\n\r\n // notify all installed policies\r\n //\r\n this.editPolicy.each( (i, e) =>{\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.onDrag(this.canvas, this)\r\n }\r\n })\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n // Update the resize handles if the user change the position of the\r\n // element via an API call.\r\n //\r\n this.editPolicy.each((i, e) =>{\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"move\", {figure: this, dx: dx, dy: dx})\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. Additional\r\n * the internal model changed as well.\r\n *\r\n * Optional: Inserts current object in front of the given one.\r\n *\r\n * @param {draw2d.Figure} [figure] move current object in front of the given one.\r\n * @since 3.0.0\r\n */\r\n toFront: function (figure) {\r\n this._super(figure)\r\n\r\n // ensure that the decoration is always in front of the connection\r\n //\r\n if (this.shape !== null) {\r\n this.targetDecoratorNode?.insertAfter(this.shape)\r\n this.sourceDecoratorNode?.insertAfter(this.shape)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Moves the element to the background. Additional\r\n * the internal model changed as well.\r\n *\r\n * @param {draw2d.Figure} [figure] move this object behind of the 'figure'.\r\n * @since 4.7.2\r\n */\r\n toBack: function (figure) {\r\n this._super(figure)\r\n\r\n if (this.shape !== null) {\r\n this.targetDecoratorNode?.insertAfter(this.shape)\r\n this.sourceDecoratorNode?.insertAfter(this.shape)\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the recalculated position of the start point with the usage of\r\n * the installed connection anchor locator.\r\n *\r\n * @returns {draw2d.geo.Point}\r\n * @deprecated\r\n **/\r\n getStartPoint: function (refPoint) {\r\n return this.getStartPosition(refPoint)\r\n },\r\n\r\n getStartPosition: function (refPoint) {\r\n if (this.isMoving === false) {\r\n if (refPoint) {\r\n return this.sourcePort.getConnectionAnchorLocation(refPoint, this)\r\n }\r\n return this.sourcePort.getConnectionAnchorLocation(this.targetPort.getConnectionAnchorReferencePoint(this), this)\r\n }\r\n\r\n return this._super()\r\n },\r\n\r\n /**\r\n *\r\n * Return the recalculated position of the start point with the usage of\r\n * the installed connection anchor locator.\r\n *\r\n * @returns {draw2d.geo.Point}\r\n * @deprecated\r\n **/\r\n getEndPoint: function (refPoint) {\r\n return this.getEndPosition(refPoint)\r\n },\r\n\r\n getEndPosition: function (refPoint) {\r\n if (this.isMoving === false) {\r\n if (refPoint) {\r\n return this.targetPort.getConnectionAnchorLocation(refPoint, this)\r\n }\r\n return this.targetPort.getConnectionAnchorLocation(this.sourcePort.getConnectionAnchorReferencePoint(this), this)\r\n }\r\n\r\n return this._super()\r\n },\r\n\r\n /**\r\n *\r\n * Set the new source port of this connection. This enforce a repaint of the connection.\r\n *\r\n * @param {draw2d.Port} port The new source port of this connection.\r\n *\r\n **/\r\n setSource: function (port) {\r\n if (this.sourcePort !== null) {\r\n this.sourcePort.off(this.moveListener)\r\n this.sourcePort.connections.remove(this)\r\n this.sourcePort.fireEvent(\"disconnect\", {port: this.sourcePort, connection: this})\r\n // it is possible that a connection has already a port but is not assigned to\r\n // a canvas. In this case we must check if the canvas set correct before we fire this event\r\n this.canvas?.fireEvent(\"disconnect\", {port: this.sourcePort, connection: this})\r\n\r\n this.sourcePort.onDisconnect(this)\r\n }\r\n\r\n this.sourcePort = port\r\n if (this.sourcePort === null) {\r\n return\r\n }\r\n\r\n this.routingRequired = true\r\n this.fireSourcePortRouteEvent()\r\n this.sourcePort.connections.add(this)\r\n this.sourcePort.on(\"move\", this.moveListener)\r\n\r\n this.canvas?.fireEvent(\"connect\", {port: this.sourcePort, connection: this})\r\n\r\n this.sourcePort.fireEvent(\"connect\", {port: this.sourcePort, connection: this})\r\n this.sourcePort.onConnect(this)\r\n\r\n this.setStartPoint(port.getAbsoluteX(), port.getAbsoluteY())\r\n this.fireEvent(\"connect\", {port: this.sourcePort, connection: this})\r\n },\r\n\r\n /**\r\n *\r\n * Returns the source port of this connection.\r\n *\r\n * @returns {draw2d.Port}\r\n **/\r\n getSource: function () {\r\n return this.sourcePort\r\n },\r\n\r\n /**\r\n *\r\n * Set the target port of this connection. This enforce a repaint of the connection.\r\n *\r\n * @param {draw2d.Port} port The new target port of this connection\r\n **/\r\n setTarget: function (port) {\r\n if (this.targetPort !== null) {\r\n this.targetPort.off(this.moveListener)\r\n this.targetPort.connections.remove(this)\r\n this.targetPort.fireEvent(\"disconnect\", {port: this.targetPort, connection: this})\r\n // it is possible that a connection has already a port but is not assigned to\r\n // a canvas. In this case we must check if the canvas set correct before we fire this event\r\n this.canvas?.fireEvent(\"disconnect\", {port: this.targetPort, connection: this})\r\n\r\n this.targetPort.onDisconnect(this)\r\n }\r\n\r\n this.targetPort = port\r\n if (this.targetPort === null) {\r\n return\r\n }\r\n\r\n this.routingRequired = true\r\n this.fireTargetPortRouteEvent()\r\n this.targetPort.connections.add(this)\r\n this.targetPort.on(\"move\", this.moveListener)\r\n this.canvas?.fireEvent(\"connect\", {port: this.targetPort, connection: this})\r\n this.targetPort.fireEvent(\"connect\", {port: this.targetPort, connection: this})\r\n this.targetPort.onConnect(this)\r\n\r\n this.setEndPoint(port.getAbsoluteX(), port.getAbsoluteY())\r\n this.fireEvent(\"connect\", {port: this.targetPort, connection: this})\r\n },\r\n\r\n /**\r\n *\r\n * Returns the target port of this connection.\r\n *\r\n * @returns {draw2d.Port}\r\n **/\r\n getTarget: function () {\r\n return this.targetPort\r\n },\r\n\r\n /**\r\n * Returns the peer port of the connection for a given port or nulll if `port` not part of this connection\r\n * @param {draw2d.Port} port \r\n * @returns {draw2d.Port}\r\n */\r\n getPeerPort: function(port) {\r\n if(port === this.sourcePort){\r\n return this.targetPort\r\n }\r\n if(port === this.targetPort){\r\n return this.sourcePort\r\n }\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Method returns true if the connection has at least one common draw2d.Port with the given connection.\r\n *\r\n * @param {draw2d.Connection} other\r\n *\r\n * @returns {Boolean}\r\n */\r\n sharingPorts: function (other) {\r\n return this.sourcePort == other.sourcePort ||\r\n this.sourcePort == other.targetPort ||\r\n this.targetPort == other.sourcePort ||\r\n this.targetPort == other.targetPort\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the canvas element of this figures.\r\n *\r\n * @param {draw2d.Canvas} canvas the new parent of the figure or null\r\n */\r\n setCanvas: function (canvas) {\r\n if (this.canvas === canvas) {\r\n return // nothing to do\r\n }\r\n\r\n let notiCanvas = this.canvas === null ? canvas : this.canvas\r\n\r\n this._super(canvas)\r\n\r\n this.sourceDecoratorNode?.remove()\r\n this.sourceDecoratorNode = null\r\n\r\n this.targetDecoratorNode?.remove()\r\n this.targetDecoratorNode = null\r\n\r\n if (this.canvas === null) {\r\n if (this.sourcePort !== null) {\r\n this.sourcePort.off(this.moveListener)\r\n notiCanvas.fireEvent(\"disconnect\", { port: this.sourcePort, connection: this})\r\n this.sourcePort.onDisconnect(this)\r\n }\r\n if (this.targetPort !== null) {\r\n this.targetPort.off(this.moveListener)\r\n notiCanvas.fireEvent(\"disconnect\", { port: this.targetPort, connection: this})\r\n this.targetPort.onDisconnect(this)\r\n }\r\n } else {\r\n\r\n if (this.sourcePort !== null) {\r\n this.sourcePort.on(\"move\", this.moveListener)\r\n this.canvas.fireEvent(\"connect\", { port: this.sourcePort, connection: this})\r\n this.sourcePort.onConnect(this)\r\n }\r\n if (this.targetPort !== null) {\r\n this.targetPort.on(\"move\", this.moveListener)\r\n this.canvas.fireEvent(\"connect\", { port: this.targetPort, connection: this})\r\n this.targetPort.onConnect(this)\r\n }\r\n }\r\n },\r\n\r\n\r\n /**\r\n * Returns the angle of the connection at the output port (source)\r\n *\r\n **/\r\n getStartAngle: function () {\r\n // return a good default value if the connection is not routed at the\r\n // moment\r\n if (this.lineSegments.getSize() === 0) {\r\n return 0\r\n }\r\n\r\n let p1 = this.lineSegments.get(0).start\r\n let p2 = this.lineSegments.get(0).end\r\n // Since the points are too close to each other in a spline routing, an \r\n // angle is obtained which does not correspond to the optical impression. \r\n // In this case, a point is taken which is a little further away \r\n // from the port....if ppossible\r\n if (this.router instanceof draw2d.layout.connection.SplineConnectionRouter) {\r\n p2 = this.lineSegments.get(5)?.end ?? p2\r\n }\r\n\r\n let length = Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y))\r\n let angle = -(180 / Math.PI) * Math.asin((p1.y - p2.y) / length)\r\n\r\n if (angle < 0) {\r\n if (p2.x < p1.x) {\r\n angle = Math.abs(angle) + 180\r\n } else {\r\n angle = 360 - Math.abs(angle)\r\n }\r\n } else {\r\n if (p2.x < p1.x) {\r\n angle = 180 - angle\r\n }\r\n }\r\n return angle\r\n },\r\n\r\n getEndAngle: function () {\r\n // return a good default value if the connection is not routed at the\r\n // moment\r\n if (this.lineSegments.getSize() === 0) {\r\n return 90\r\n }\r\n\r\n let p1 = this.lineSegments.get(this.lineSegments.getSize() - 1).end\r\n let p2 = this.lineSegments.get(this.lineSegments.getSize() - 1).start\r\n\r\n // Since the points are too close to each other in a spline routing, an \r\n // angle is obtained which does not correspond to the optical impression. \r\n // In this case, a point is taken which is a little further away \r\n // from the port....if ppossible\r\n if (this.router instanceof draw2d.layout.connection.SplineConnectionRouter) {\r\n p2 = this.lineSegments.get(this.lineSegments.getSize() - 5)?.end ?? p2\r\n }\r\n\r\n let length = Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y))\r\n let angle = -(180 / Math.PI) * Math.asin((p1.y - p2.y) / length)\r\n\r\n if (angle < 0) {\r\n if (p2.x < p1.x) {\r\n angle = Math.abs(angle) + 180\r\n } else {\r\n angle = 360 - Math.abs(angle)\r\n }\r\n } else {\r\n if (p2.x < p1.x) {\r\n angle = 180 - angle\r\n }\r\n }\r\n return angle\r\n },\r\n\r\n\r\n /**\r\n * @private\r\n **/\r\n fireSourcePortRouteEvent: function () {\r\n this.sourcePort.getConnections().each((i, conn) => {\r\n conn.routingRequired = true\r\n conn.repaint()\r\n })\r\n },\r\n\r\n /**\r\n * @private\r\n **/\r\n fireTargetPortRouteEvent: function () {\r\n // enforce a repaint of all connections which are related to this port\r\n // this is required for a \"FanConnectionRouter\" or \"ShortesPathConnectionRouter\"\r\n //\r\n this.targetPort.getConnections().each((i, conn) => {\r\n conn.routingRequired = true\r\n conn.repaint()\r\n })\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the Command to perform the specified Request or null.\r\n *\r\n * @param {draw2d.command.CommandType} request describes the Command being requested\r\n *\r\n * @returns {draw2d.command.Command} null or a Command\r\n **/\r\n createCommand: function (request) {\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE) {\r\n if (this.isDraggable()) {\r\n return new draw2d.command.CommandMoveVertices(this)\r\n }\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE_BASEPOINT) {\r\n // DragDrop of a connection doesn't create a undo command at this point. This will be done in\r\n // the onDrop method\r\n return new draw2d.command.CommandReconnect(this)\r\n }\r\n\r\n return this._super(request)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n let parentNode = this.getSource().getParent()\r\n while (parentNode.getParent() !== null) {\r\n parentNode = parentNode.getParent()\r\n }\r\n memento.source = {\r\n node: parentNode.getId(),\r\n port: this.getSource().getName()\r\n }\r\n\r\n parentNode = this.getTarget().getParent()\r\n while (parentNode.getParent() !== null) {\r\n parentNode = parentNode.getParent()\r\n }\r\n memento.target = {\r\n node: parentNode.getId(),\r\n port: this.getTarget().getName()\r\n }\r\n\r\n if (this.sourceDecorator !== null) {\r\n memento.source.decoration = this.sourceDecorator.NAME\r\n }\r\n\r\n if (this.targetDecorator !== null) {\r\n memento.target.decoration = this.targetDecorator.NAME\r\n }\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n // nothing to to for the connection creation. This will be done in the draw2d.io.Reader\r\n // implementation\r\n //\r\n // restore your custom attributes here\r\n if (typeof memento.target.decoration !== \"undefined\" && memento.target.decoration != null) {\r\n this.setTargetDecorator(Function(`return new ${memento.target.decoration}()`)())\r\n }\r\n\r\n if (typeof memento.source.decoration !== \"undefined\" && memento.source.decoration != null) {\r\n this.setSourceDecorator(Function(`return new ${memento.source.decoration}()`)())\r\n }\r\n\r\n return this\r\n\r\n }\r\n })\r\n","import draw2d from 'packages'\r\nimport jsonUtil from 'util/JSONUtil'\r\nimport UUID from 'util/UUID'\r\nimport extend from 'util/extend'\r\n\r\n/**\r\n * @class\r\n * Base class for all draw2d shapes-\r\n *\r\n */\r\ndraw2d.Figure = Class.extend(\r\n /** @lends draw2d.Figure.prototype */\r\n {\r\n NAME: \"draw2d.Figure\",\r\n MIN_TIMER_INTERVAL: 50, // minimum timer interval in milliseconds\r\n\r\n /**\r\n * Creates a new Figure object\r\n *\r\n * @param attr\r\n * @param setter\r\n * @param getter\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n // @private\r\n this.setterWhitelist = {\r\n // id the unique id of the figure\r\n id: this.setId,\r\n // x the x offset of the figure in relation to the parent figure or canvas\r\n x: this.setX,\r\n // y the y offset of the figure in relation to the parent figure or canvas\r\n y: this.setY,\r\n // width the new width of the figure. Considering the minWidth of the shape\r\n width: this.setWidth,\r\n // height the new height of the figure. Considering the minHeight of the shape\r\n height: this.setHeight,\r\n // boundingBox set the new bounding box of the shape\r\n boundingBox: this.setBoundingBox,\r\n // minWidth the new min width of the figure.\r\n minWidth: this.setMinWidth,\r\n // minHeight the new min height of the figure.\r\n minHeight: this.setMinHeight,\r\n // cssClass the css class of the shape. can be used to style the shape via CSS3 (SVG only)\r\n cssClass: this.setCssClass,\r\n // userData additional custom data which can be stored by the shape\r\n userData: this.setUserData,\r\n // draggable drives the dragging behaviour of the shape\r\n draggable: this.setDraggable,\r\n // resizeable drives the resizeable behaviour of the shape\r\n resizeable: this.setResizeable,\r\n // selectable drives the selectable behaviour of the shape\r\n selectable: this.setSelectable,\r\n // angle the rotation angle of the shape. At the moment only 90 degree increments are possible\r\n angle: this.setRotationAngle,\r\n // alpha the the alpha/opacity of the shape. value must be between [0..1]\r\n alpha: this.setAlpha,\r\n // opacity the the alpha/opacity of the shape. value must be between [0..1]\r\n opacity: this.setAlpha,\r\n // glow the glow flag for the shape. The representation of the \"glow\" depends on the shape\r\n glow: this.setGlow,\r\n // visible set the visibility flag of the shape\r\n visible: this.setVisible,\r\n // keepAspectRatio indicate if the shape should keep the aspect ratio during resize\r\n keepAspectRatio: this.setKeepAspectRatio,\r\n ...setter\r\n }\r\n\r\n this.getterWhitelist = {\r\n id: this.getId,\r\n visible: this.isVisible,\r\n angle: this.getRotationAngle,\r\n x: this.getX,\r\n y: this.getY,\r\n userData: this.getUserData,\r\n width: this.getWidth,\r\n height: this.getHeight,\r\n draggable: this.isDraggable,\r\n resizeable: this.isResizeable,\r\n selectable: this.isSelectable,\r\n alpha: this.getAlpha,\r\n opacity: this.getAlpha,\r\n ...getter\r\n }\r\n\r\n // all figures has an unique id. Required for figure get and persistence storage\r\n this.id = UUID.create()\r\n\r\n this.cachedZOrder = -1\r\n\r\n // required for the SelectionEditPolicy to indicate the type of figure\r\n // which the user clicks\r\n this.isResizeHandle = false\r\n\r\n // for undo/redo operation. It holds the command during a drag/drop operation\r\n // and execute it on the CommandStack if the user drop the figure.\r\n this.command = null\r\n\r\n // the assigned canvas\r\n this.canvas = null\r\n\r\n // the RaphaelJS element reference\r\n this.shape = null\r\n\r\n // possible decorations ( e.g. a Label) of the Connection\r\n // children are fixed bounded the figure. Most of the events of the child will bee\r\n // routed to the parent\r\n this.children = new draw2d.util.ArrayList()\r\n\r\n // behavior flags\r\n //\r\n this.selectable = true\r\n this.deleteable = true\r\n this.resizeable = true\r\n this.draggable = true\r\n this.visible = true\r\n // since 4.1.0.\r\n this.keepAspectRatio = false\r\n\r\n\r\n this.canSnapToHelper = true\r\n this.snapToGridAnchor = new draw2d.geo.Point(0, 0) // hot spot for snap to grid\r\n this.editPolicy = new draw2d.util.ArrayList()\r\n\r\n\r\n // timer for animation or automatic update\r\n //\r\n this.timerId = -1\r\n this.timerInterval = 0\r\n\r\n // possible parent of the figure.\r\n // @see: this.children\r\n this.parent = null\r\n\r\n // a figure can be part of a StrongComposite like a group, ...\r\n //\r\n this.composite = null\r\n\r\n // generic handle for the JSON read/write of user defined data\r\n this.userData = null\r\n\r\n // appearance, position and dim properties\r\n //\r\n this.x = 0\r\n this.y = 0\r\n this.minHeight = 5\r\n this.minWidth = 5\r\n this.rotationAngle = 0\r\n // add the name of the class to the css attribute\r\n this.cssClass = this.NAME.replace(new RegExp(\"[.]\", \"g\"), \"_\")\r\n\r\n this.width = this.getMinWidth()\r\n this.height = this.getMinHeight()\r\n\r\n this.alpha = 1.0\r\n\r\n // internal status flags for the Drag&Drop operation handling and other stuff\r\n //\r\n this.isInDragDrop = false\r\n\r\n this.ox = 0\r\n this.oy = 0\r\n this.repaintBlocked = false\r\n this.lastAppliedAttributes = {}\r\n this.selectionHandles = new draw2d.util.ArrayList()\r\n this.panningDelegate = null\r\n\r\n // even handling since version 5.0.0\r\n this.eventSubscriptions = {}\r\n\r\n this.relocateChildrenEventCallback = () => {\r\n this.children.each((i, e) => {\r\n e.locator.relocate(i, e.figure)\r\n })\r\n }\r\n\r\n // new approach to delegate selection requests.\r\n //\r\n this.defaultSelectionAdapter = this.selectionAdapter = () => this\r\n\r\n // install default selection handler. Can be overridden or replaced\r\n this.installEditPolicy(new draw2d.policy.figure.RectangleSelectionFeedbackPolicy())\r\n\r\n\r\n // the new style attr call with object attributes\r\n this.attr(attr)\r\n },\r\n\r\n /**\r\n *\r\n * Read or set shape attributes.<br>\r\n * When no value is given, reads specified attribute from the element.<br>\r\n * When value is given, sets the attribute to that value.\r\n * Multiple attributes can be set by passing an object with name-value pairs.\r\n *\r\n * let figure = new draw2d.shape.basic.Rectangle();\r\n * figure.attr('x'); //=> read value\r\n * figure.attr('x', 30); //=> set value\r\n *\r\n * // multiple attributes:\r\n * figure.attr({\r\n * x: 30,\r\n * y: 40,\r\n * width : 200,\r\n * height: 50,\r\n * cssClass: \"red_border_figure\"\r\n * });\r\n *\r\n * // it is possible to override any method of the figure as well\r\n * // Instead of inheritance you can just override the callback methods\r\n * // like\r\n * //\r\n * figure.attr({\r\n * onClick : function(){\r\n * alert(\"click\");\r\n * }\r\n * });\r\n *\r\n * // or you can pass the attr values in the constructor\r\n * //\r\n * let clickFigure = new draw2d.shape.basic.Rectangle({\r\n * onClick : function(){\r\n * alert(\"click\");\r\n * }\r\n * });\r\n *\r\n *\r\n * Additional you can set the user defined values (userData) with this method\r\n * using the dot-notation. User defined values are always part of the exported\r\n * JSON data.\r\n *\r\n * // setting multiple attributes:\r\n * figure.attr({\r\n * \"userData.my.property.x\": 30,\r\n * \"userData.my.property.y\": 40\r\n * });\r\n *\r\n * Also set using array notation is possible for the userData:\r\n *\r\n * // dot notation and array brackets:\r\n * figure.attr({\r\n * \"userData.my.names[0]\": \"John\",\r\n * \"userData.my.names[1]\": \"Doe\"\r\n * });\r\n *\r\n *\r\n * The Object returned should be the equivalent structured object:\r\n *\r\n * let obj = figure.getUserData();\r\n *\r\n * That is, where obj is equivalent to:\r\n *\r\n * let obj = {\r\n * my:{\r\n * property:{\r\n * x: 30,\r\n * y: 40\r\n * },\r\n * names: [\"John\", \"Doe\"]\r\n * }\r\n * };\r\n *\r\n *\r\n *\r\n * @param {String/Object} name\r\n * @param {Object} [value]\r\n * @since 5.0.1\r\n * @experimental\r\n * @returns {Object} either the requested attribute if this method used as getter or `this` if the method uses as setter\r\n **/\r\n attr: function (name, value) {\r\n let orig = this.repaintBlocked\r\n\r\n try {\r\n // call of attr as setter method with {name1:val1, name2:val2 } argument list\r\n //\r\n if ($.isPlainObject(name)) {\r\n for (let key in name) {\r\n // user can set the \"userData\" with path notation. In this case we\r\n // expand the path to a real JSON object and set the data.\r\n // index/brackets are allowed too.\r\n //\r\n if (key.substring(0, 9) === \"userData.\") {\r\n this.userData ??= {}\r\n\r\n jsonUtil.set({userData: this.userData}, key, name[key])\r\n this.fireEvent(\"change:\" + key, {value: name[key]})\r\n } else {\r\n let func = this.setterWhitelist[key]\r\n let param = name[key]\r\n if (func && param !== undefined) {\r\n func.call(this, param)\r\n }\r\n // maybe the user adds a function as property to the attr call\r\n // e.g.:\r\n // {\r\n // doIt: function(){}\r\n // }\r\n //\r\n // in this case we assign the method to this object and wrap it with \"this\" as context\r\n // a very, very simple method to replace default implemenations of the object\r\n else if (typeof name[key] === \"function\") {\r\n this[key] = param.bind(this)\r\n }\r\n }\r\n }\r\n } else if (typeof name === \"string\") {\r\n // call attr as getter\r\n //\r\n if (typeof value === \"undefined\") {\r\n let getter = this.getterWhitelist[name]\r\n if (typeof getter === \"function\") {\r\n return getter.call(this)\r\n }\r\n // or it is a userData path notation like \"userData.any.path.value\"\r\n else if (name.substring(0, 9) === \"userData.\") {\r\n let data = {userData: this.userData}\r\n return jsonUtil.get(data, name)\r\n }\r\n return // undefined\r\n }\r\n // call attr as simple setter with (key , value)\r\n //\r\n\r\n // the value can be a function. In this case we must call the value().\r\n if (typeof value === \"function\") {\r\n value = value()\r\n }\r\n if (name.substring(0, 9) === \"userData.\") {\r\n this.userData ??= {}\r\n jsonUtil.set({userData: this.userData}, name, value)\r\n this.fireEvent(\"change:\" + name, {value: value})\r\n } else {\r\n let setter = this.setterWhitelist[name]\r\n setter?.call(this, value)\r\n }\r\n }\r\n // may it is a array of attributes used for the getter\r\n //\r\n else if (Array.isArray(name)) {\r\n return Object.assign({}, ...Object.keys(name).map(k => ({[k]: this.attr(k)})))\r\n }\r\n // generic getter of all registered attributes\r\n else if (typeof name === \"undefined\") {\r\n let result = {}\r\n for (let key in this.getterWhitelist) {\r\n result[key] = this.getterWhitelist[key].call(this)\r\n }\r\n return result\r\n }\r\n } finally {\r\n this.repaintBlocked = orig\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n * Return a copy of the object, filtered to only have values for the whitelisted keys.\r\n * @deprecated\r\n */\r\n pick: function (obj, var_keys) {\r\n let keys = typeof arguments[1] !== 'string' ? arguments[1] : Array.prototype.slice.call(arguments, 1)\r\n let out = {}, key\r\n for (key in keys) {\r\n if (typeof obj[key] !== \"undefined\")\r\n out[key] = obj[key]\r\n }\r\n return out\r\n },\r\n\r\n /**\r\n *\r\n * Add the figure to the current selection and propagate this to all edit policies.\r\n *\r\n * @param {Boolean} [asPrimarySelection] true if the element should be the primary selection\r\n * @private\r\n */\r\n select: function (asPrimarySelection) {\r\n if (typeof asPrimarySelection === \"undefined\") {\r\n asPrimarySelection = true\r\n }\r\n\r\n // apply all EditPolicy for select Operations\r\n //\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.SelectionPolicy) {\r\n e.onSelect(this.canvas, this, asPrimarySelection)\r\n }\r\n })\r\n\r\n this.canvas?.getSelection().add(this)\r\n\r\n this.fireEvent(\"select\", {figure: this})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Unselect the figure and propagete this event to all edit policies.\r\n *\r\n * @private\r\n **/\r\n unselect: function () {\r\n // apply all EditPolicy for select Operations\r\n //\r\n this.editPolicy.each((i, e) =>{\r\n if (e instanceof draw2d.policy.figure.SelectionPolicy) {\r\n e.onUnselect(this.canvas, this)\r\n }\r\n })\r\n\r\n this.canvas?.getSelection().remove(this)\r\n\r\n this.fireEvent(\"unselect\", {figure: this})\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns a function which returns the the figure which must handle the selection handling.\r\n *\r\n * @param {Function} [adapter] function which returns the figure which handles the selection handling\r\n */\r\n setSelectionAdapter: function (adapter) {\r\n this.selectionAdapter = adapter ?? this.defaultSelectionAdapter\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @returns {Function}\r\n */\r\n getSelectionAdapter: function () {\r\n return this.selectionAdapter\r\n },\r\n\r\n /**\r\n *\r\n * Returns true if the figure part of the current canvas selection.\r\n *\r\n * @since 5.5.6\r\n *\r\n * @returns {Boolean}\r\n */\r\n isSelected: function () {\r\n return this.canvas?.getSelection().contains(this)\r\n },\r\n\r\n /**\r\n *\r\n * Allows a user to attach (or remove) data to an element, without needing to create a custom figure or shape.\r\n * The data must be a valid JSON object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * userData: object\r\n * });\r\n *\r\n * @since 2.7.2\r\n * @param {Object} object\r\n */\r\n setUserData: function (object) {\r\n this.userData = object\r\n this.fireEvent(\"change:userData\", {value: object})\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns any user data set previously on the given figure by setUserData.\r\n *\r\n * @since 2.7.2\r\n * @returns {Object}\r\n */\r\n getUserData: function () {\r\n return this.userData\r\n },\r\n\r\n /**\r\n *\r\n * Return the UUID of this element.\r\n *\r\n * @returns {String}\r\n */\r\n getId: function () {\r\n return this.id\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the id of this element.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * id: newId\r\n * });\r\n *\r\n * @param {String} newId the new id for this figure\r\n */\r\n setId: function (newId) {\r\n this.id = newId\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the css styling class name of the element.\r\n *\r\n *\r\n * @returns {String}\r\n */\r\n getCssClass: function () {\r\n return this.cssClass\r\n },\r\n\r\n /**\r\n *\r\n * Set the css class of the node.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * \"cssClass\": \"red_border_figure\"\r\n * });\r\n *\r\n * @param {String} cssClass the new css class name of the node\r\n * @since 2.9.0\r\n */\r\n setCssClass: function (cssClass) {\r\n this.cssClass = cssClass === null ? null : cssClass.trim()\r\n\r\n if (this.shape === null) {\r\n return this\r\n }\r\n\r\n if (this.cssClass === null) {\r\n this.shape.node.removeAttribute(\"class\")\r\n } else {\r\n this.shape.node.setAttribute(\"class\", this.cssClass)\r\n }\r\n this.fireEvent(\"change:cssClass\", {value: this.cssClass})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The method will return true if the class is assigned to the element, even if other classes also are.\r\n *\r\n * @param {String} className the class name to check\r\n * @since 2.9.0\r\n */\r\n hasCssClass: function (className) {\r\n if (this.cssClass === null) {\r\n return false\r\n }\r\n\r\n return new RegExp(' ' + className.trim() + ' ').test(' ' + this.cssClass + ' ')\r\n },\r\n\r\n /**\r\n *\r\n * Add a CSS class to the figure.<br>\r\n * It's important to note that this method does not replace a class. It simply adds the class,\r\n * appending it to any which may already be assigned to the elements.\r\n *\r\n * @param {String} className\r\n * @since 2.9.0\r\n */\r\n addCssClass: function (className) {\r\n className = className.trim()\r\n if (!this.hasCssClass(className)) {\r\n if (this.cssClass === null) {\r\n this.setCssClass(className)\r\n } else {\r\n this.setCssClass(this.cssClass + ' ' + className)\r\n }\r\n this.fireEvent(\"change:cssClass\", {value: this.cssClass})\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Remove the given css class name from the figure\r\n *\r\n * @param {String} className the css class name to add\r\n */\r\n removeCssClass: function (className) {\r\n className = className.trim()\r\n let newClass = ' ' + this.cssClass.replace(/[\\t\\r\\n]/g, ' ') + ' '\r\n if (this.hasCssClass(className)) {\r\n while (newClass.indexOf(' ' + className + ' ') >= 0) {\r\n newClass = newClass.replace(' ' + className + ' ', ' ')\r\n }\r\n this.setCssClass(newClass.replace(/^\\s+|\\s+$/g, ''))\r\n this.fireEvent(\"change:cssClass\", {value: this.cssClass})\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Add or remove the given css class name from the figure\r\n *\r\n * @param {String} className the class name to toggle\r\n */\r\n toggleCssClass: function (className) {\r\n className = className.trim()\r\n let newClass = ' ' + this.cssClass.replace(/[\\t\\r\\n]/g, ' ') + ' '\r\n if (this.hasCssClass(className)) {\r\n while (newClass.indexOf(' ' + className + ' ') >= 0) {\r\n newClass = newClass.replace(' ' + className + ' ', ' ')\r\n }\r\n this.setCssClass(newClass.replace(/^\\s+|\\s+$/g, ''))\r\n } else {\r\n this.setCssClass(this.cssClass + ' ' + className)\r\n }\r\n this.fireEvent(\"change:cssClass\", {value: this.cssClass})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set the canvas element of this figures. This can be used to determine whenever an element\r\n * is added or removed to the canvas.\r\n *\r\n * @param {draw2d.Canvas} canvas the new parent of the figure or null\r\n */\r\n setCanvas: function (canvas) {\r\n // remove the shape if we reset the canvas and the element\r\n // was already drawn\r\n if (canvas === null && this.shape !== null) {\r\n if (this.isSelected()) {\r\n this.unselect()\r\n }\r\n this.shape.remove()\r\n this.shape = null\r\n }\r\n\r\n this.canvas = canvas\r\n\r\n if (this.canvas !== null) {\r\n this.getShapeElement()\r\n }\r\n\r\n // reset the attribute cache. We must start by paint all attributes\r\n //\r\n this.lastAppliedAttributes = {}\r\n\r\n\r\n if (canvas === null) {\r\n this.stopTimer()\r\n } else {\r\n if (this.timerInterval >= this.MIN_TIMER_INTERVAL) {\r\n this.startTimer(this.timerInterval)\r\n }\r\n }\r\n\r\n this.children.each( (i, e) => { e.figure.setCanvas(canvas)})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the current assigned canvas container.\r\n *\r\n * @returns {draw2d.Canvas}\r\n */\r\n getCanvas: function () {\r\n return this.canvas\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Start a timer which calls the onTimer method in the given interval.\r\n *\r\n * @param {Number} milliSeconds\r\n */\r\n startTimer: function (milliSeconds) {\r\n this.stopTimer()\r\n this.timerInterval = Math.max(this.MIN_TIMER_INTERVAL, milliSeconds)\r\n\r\n if (this.canvas !== null) {\r\n this.timerId = window.setInterval(() => {\r\n this.onTimer()\r\n this.fireEvent(\"timer\")\r\n }, this.timerInterval)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Stop the internal timer.\r\n *\r\n */\r\n stopTimer: function () {\r\n if (this.timerId >= 0) {\r\n window.clearInterval(this.timerId)\r\n this.timerId = -1\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Callback method for the internal timer handling<br>\r\n * Inherit classes must override this method if they want use the timer feature.\r\n *\r\n * // Alternatively you can register for this event with\r\n * figure.on(\"timer\", function(emitter){\r\n * alert(\"timer fired\");\r\n * });\r\n *\r\n * @template\r\n */\r\n onTimer: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. Additional\r\n * the internal model changed as well.\r\n *\r\n * Optional: Inserts current object in front of the given one.\r\n *\r\n * @param {draw2d.Figure} [figure] move current object in front of the given one.\r\n * @since 3.0.0\r\n */\r\n toFront: function (figure) {\r\n // ensure that the z-oder is still correct if the figure is assigned\r\n // to a StrongComposite\r\n //\r\n if (this.composite instanceof draw2d.shape.composite.StrongComposite && (typeof figure !== \"undefined\")) {\r\n let indexFigure = figure.getZOrder()\r\n let indexComposite = this.composite.getZOrder()\r\n if (indexFigure < indexComposite) {\r\n figure = this.composite\r\n }\r\n }\r\n\r\n if (typeof figure === \"undefined\") {\r\n this.getShapeElement().toFront()\r\n\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n figures.add(this)\r\n } else if (lines.remove(this) !== null) {\r\n lines.add(this)\r\n }\r\n }\r\n } else {\r\n this.getShapeElement().insertAfter(figure.getTopLevelShapeElement())\r\n\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n let index = figures.indexOf(figure)\r\n figures.insertElementAt(this, index + 1)\r\n } else if (lines.remove(this) !== null) {\r\n lines.add(this)\r\n }\r\n }\r\n }\r\n\r\n // bring all children in front of the parent\r\n this.children.each( (i, child) =>child.figure.toFront(this))\r\n\r\n // and last but not least, the ResizeHandles if any present\r\n //\r\n this.selectionHandles.each( (i, handle) => handle.toFront())\r\n\r\n this.cachedZOrder = -1\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Moves the element to the background. Additional\r\n * the internal model changed as well.\r\n *\r\n * @since 4.7.2\r\n */\r\n toBack: function (figure) {\r\n // it is not allowed that a figure is behind an assigned composite\r\n //\r\n if (this.composite instanceof draw2d.shape.composite.StrongComposite) {\r\n this.toFront(this.composite)\r\n return\r\n }\r\n\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n figures.insertElementAt(this, 0)\r\n } else if (lines.remove(this) !== null) {\r\n lines.insertElementAt(this, 0)\r\n }\r\n if (typeof figure !== \"undefined\") {\r\n this.getShapeElement().insertBefore(figure.getShapeElement())\r\n } else {\r\n this.getShapeElement().toBack()\r\n }\r\n }\r\n\r\n // Bring all children in front of \"this\" figure\r\n //\r\n this.children.each((i, child) => {\r\n child.figure.toFront(this)\r\n }, true)\r\n\r\n this.cachedZOrder = -1\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Install a new edit policy to the figure. Each editpolicy is able to focus on a single editing\r\n * task or group of related tasks. This also allows editing behavior to be selectively reused across\r\n * different figure implementations. Also, behavior can change dynamically, such as when the layouts\r\n * or routing methods change.\r\n *\r\n * Example for limited DragDrop behavior can be a draw2d.layout.constraint.RegionConstriantPolicy.\r\n *\r\n * @param {draw2d.policy.EditPolicy} policy\r\n */\r\n installEditPolicy: function (policy) {\r\n // it is only possible to install one SelectionFeedbackPolicy at once\r\n //\r\n if (policy instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n this.editPolicy.grep((p) => {\r\n let stay = !(p instanceof draw2d.policy.figure.SelectionFeedbackPolicy)\r\n if (!stay) {\r\n p.onUninstall(this)\r\n }\r\n return stay\r\n })\r\n }\r\n\r\n // It is only allowed to install a policy of the same type once\r\n //\r\n this.editPolicy.grep((p) => {\r\n let stay = p.__proto__ !== policy.__proto__\r\n if (!stay) {\r\n p.onUninstall(this)\r\n }\r\n return stay\r\n })\r\n\r\n\r\n policy.onInstall(this)\r\n this.editPolicy.add(policy)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * UnInstall the edit policy from the figure. Either the instance itself if found\r\n * or all kind of the given edit policies.\r\n *\r\n *\r\n * @param {draw2d.policy.EditPolicy} policy\r\n * @since 4.81\r\n */\r\n uninstallEditPolicy: function (policy) {\r\n let removedPolicy = this.editPolicy.remove(policy)\r\n\r\n // we found the policy and we are happy\r\n //\r\n if (removedPolicy !== null) {\r\n removedPolicy.onUninstall(this)\r\n return\r\n }\r\n\r\n // The policy isn't part of the figure. In this case we \"think\" the user want\r\n // deinstall all instances of the policy\r\n //\r\n let name = (typeof policy === \"string\") ? policy : policy.NAME\r\n this.editPolicy.grep((p) =>{\r\n if (p.NAME === name) {\r\n p.onUninstall(this)\r\n return false\r\n }\r\n return true\r\n })\r\n },\r\n\r\n /**\r\n * Add a child figure to the figure. The hands over figure doesn't support drag&drop\r\n * operations. It's only a decorator for the connection.<br>\r\n * Mainly for labels or other decorations\r\n *\r\n *\r\n * let start = new draw2d.shape.node.Start({x:80, y:150});\r\n * start.add(new draw2d.shape.basic.Label({text:\"Test Label\"}), new draw2d.layout.locator.TopLocator());\r\n *\r\n * canvas.add( start);\r\n *\r\n *\r\n * @param {draw2d.Figure} child the figure to add as decoration to the connection.\r\n * @param {draw2d.layout.locator.Locator} locator the locator for the child.\r\n * @param {Number} [index] optional index where to insert the figure\r\n * @returns {this}\r\n **/\r\n add: function (child, locator, index) {\r\n if (typeof locator === \"undefined\" || locator === null) {\r\n throw \"Second parameter 'locator' is required for method 'Figure#add'\"\r\n }\r\n\r\n // the child is now a slave of the parent\r\n //\r\n child.setParent(this)\r\n\r\n // inform the locator that a new child is bounded to the parent\r\n // The call must happen after parent assignment. Reason: the locator\r\n // can override some behaviours which are propagated from the parent.\r\n //\r\n locator.bind(this, child)\r\n\r\n child.on(\"resize\", this.relocateChildrenEventCallback)\r\n\r\n if (!isNaN(parseInt(index))) {\r\n this.children.insertElementAt({figure: child, locator: locator}, index)\r\n } else {\r\n this.children.add({figure: child, locator: locator})\r\n }\r\n\r\n if (this.canvas !== null) {\r\n child.setCanvas(this.canvas)\r\n }\r\n\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Remove the child figure from this figure and the canvas\r\n *\r\n * @param {draw2d.Figure} child the figure to remove.\r\n *\r\n * @returns {Object} the removed tupple of figure/locator or null if the child isn't found\r\n * @returns {draw2d.Figure} return.figure The removed figure\r\n * @returns {draw2d.shape.layout.Layout} return.locator The used locator of the figure\r\n *\r\n * @since 5.0.0\r\n **/\r\n remove: function (child) {\r\n if (typeof child === \"undefined\" || child === null) {\r\n debug.warn(\"The parameter child is required for Figure.remove\")\r\n return null\r\n }\r\n\r\n let removed = null\r\n this.children.grep(function (e) {\r\n let stay = e.figure !== child\r\n if (!stay) {\r\n removed = e\r\n }\r\n return stay\r\n })\r\n\r\n if (removed !== null) {\r\n child.setParent(null)\r\n child.setCanvas(null)\r\n removed.locator.unbind(this, child)\r\n child.off(this.relocateChildrenEventCallback)\r\n\r\n this.repaint()\r\n return removed\r\n }\r\n\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Return all children/decorations of this shape which has been added with\r\n * draw2d.Figure.add\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getChildren: function () {\r\n return this.children.clone().map( e => e.figure)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Remove all children/decorations of this shape\r\n *\r\n */\r\n resetChildren: function () {\r\n this.children.each((i, e) => { e.figure.setCanvas(null)})\r\n this.children = new draw2d.util.ArrayList()\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * return the current SVG shape element or create it on demand.\r\n *\r\n * @protected\r\n */\r\n getShapeElement: function () {\r\n if (this.shape !== null) {\r\n return this.shape\r\n }\r\n\r\n this.shape = this.createShapeElement()\r\n if (!this.isVisible()) {\r\n this.shape.hide()\r\n }\r\n\r\n // add CSS class to enable styling of the element with CSS rules/files\r\n //\r\n if (this.cssClass !== null) {\r\n this.shape.node.setAttribute(\"class\", this.cssClass)\r\n }\r\n\r\n return this.shape\r\n },\r\n\r\n /**\r\n *\r\n * Get the top level shape element. May the figure has a set of SVG elements. In this case this\r\n * method must return the top level node.<br>\r\n * This method is used for the toFront/toBack method to order the nodes in the correct way.\r\n *\r\n * @since 5.0.0\r\n * @private\r\n */\r\n getTopLevelShapeElement: function () {\r\n return this.getShapeElement()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Inherited classes must override this method to implement it's own draw functionality.\r\n *\r\n * @template\r\n * @abstract\r\n */\r\n createShapeElement: function () {\r\n throw \"Inherited class [\" + this.NAME + \"] must override the abstract method createShapeElement\"\r\n },\r\n\r\n\r\n /**\r\n *\r\n * propagate all attributes like color, stroke,... to the shape element\r\n *\r\n * @param {Object} [attributes] the style attributes for the SVG shape\r\n * @private\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n attributes ??= {}\r\n\r\n if (this.visible === true) {\r\n if (this.shape.isVisible() === false) {\r\n if (!isNaN(parseFloat(attributes.visibleDuration))) {\r\n $(this.shape.node).fadeIn(attributes.visibleDuration, () => this.shape.show())\r\n } else {\r\n this.shape.show()\r\n }\r\n }\r\n } else {\r\n if (this.shape.isVisible() === true) {\r\n if (!isNaN(parseFloat(attributes.visibleDuration))) {\r\n $(this.shape.node).fadeOut(attributes.visibleDuration, () => this.shape.hide())\r\n } else {\r\n this.shape.hide()\r\n }\r\n }\r\n return this\r\n }\r\n\r\n // enrich with common properties\r\n attributes.opacity = this.alpha\r\n\r\n // performance improvement\r\n // Only apply attributes which has changed. This ends in a big performance improvement\r\n // because the raphael shape isn't redraw at all.\r\n //\r\n attributes = jsonUtil.flatDiff(attributes, this.lastAppliedAttributes)\r\n\r\n if (Object.getOwnPropertyNames(attributes).length > 0) {\r\n this.shape.attr(attributes)\r\n }\r\n this.lastAppliedAttributes = attributes\r\n\r\n\r\n this.applyTransformation()\r\n\r\n // Relocate all children of the figure if the dimension or location of the\r\n // shape has changed\r\n //\r\n if(\"x\" in attributes || \"width\" in attributes || \"cx\" in attributes || \"path\" in attributes) {\r\n this.children.each((i, e) => { e.locator.relocate(i, e.figure) })\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * apply a transformation to the shape like rotation, translate,..\r\n *\r\n * @private\r\n * @template\r\n */\r\n applyTransformation: function () {\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Highlight the element or remove the highlighting\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * glow: flag\r\n * });\r\n *\r\n * @param {Boolean} flag indicates glow/noGlow\r\n * @template\r\n */\r\n setGlow: function (flag) {\r\n // do nothing in the base class.\r\n // Subclasses must implement this method.\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Allow dragging only when the cursor is over a specific part of the figure.\r\n * <br>\r\n * Override this method to specify the bounding box of an element or a draw2d.util.ArrayList\r\n * of draw2d.geo.Rectangle of bounding boxes used to drag the figure. The returned coordinates\r\n * are absolute coordinates to the canvas.\r\n * <br>\r\n * <br>\r\n * Default implementation returns <b>null</b> to indicate to use the complete figures as\r\n * drag handle.\r\n *\r\n * @since 5.6.0\r\n * @returns {draw2d.geo.Rectangle|draw2d.util.ArrayList}\r\n */\r\n getHandleBBox: function () {\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Called if the drag and drop action begins. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true if the figure accepts dragging\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n this.isInDragDrop = false\r\n\r\n // Check whenever the figures has a drag-handle. Allow drag&drop\r\n // operation only if the x/y is inside this area.\r\n //\r\n // @since 5.6.0\r\n let bbox = this.getHandleBBox()\r\n if (bbox !== null && bbox.translate(this.getAbsolutePosition().scale(-1)).hitTest(x, y) === false) {\r\n // design failure: we must catch the figure below the mouse to forward\r\n // the panning event to this figure. Special handling to provide sliders\r\n // and other UI elements which requires the panning event. Hack.\r\n this.panningDelegate = this.getBestChild(this.getX() + x, this.getY() + y)\r\n if (this.panningDelegate !== null) {\r\n // transform x/y relative to the panning figure and request the dragStart event\r\n this.panningDelegate.onDragStart(x - this.panningDelegate.x, y - this.panningDelegate.y, shiftKey, ctrlKey)\r\n }\r\n return false\r\n }\r\n\r\n\r\n this.command = this.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE))\r\n\r\n if (this.command !== null) {\r\n this.ox = this.getX()\r\n this.oy = this.getY()\r\n this.isInDragDrop = true\r\n\r\n // notify all installed policies\r\n //\r\n let _this = this\r\n let canStartDrag = true\r\n\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n canStartDrag = canStartDrag && e.onDragStart(_this.canvas, _this, x, y, shiftKey, ctrlKey)\r\n }\r\n })\r\n\r\n if (canStartDrag) {\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragstart\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n }\r\n return canStartDrag\r\n }\r\n\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Don't call them manually. This will be done by the framework.<br>\r\n * Will be called if the object are moved via drag and drop.\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call\r\n * the super implementation via <code>this._super(dx, dy, dx2, dy2);</code>\r\n *\r\n * @private\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n // apply all EditPolicy for DragDrop Operations. This is something like\r\n // an policy that forces that an object can only move vertical, horizontal or in a given\r\n // rectangle.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n let newPos = e.adjustPosition(this, this.ox + dx, this.oy + dy)\r\n if (newPos) {\r\n dx = newPos.x - this.ox\r\n dy = newPos.y - this.oy\r\n }\r\n }\r\n })\r\n let newPos = new draw2d.geo.Point(this.ox + dx, this.oy + dy)\r\n\r\n // Adjust the new location if the object can snap to a helper\r\n // like grid, geometry, ruler,...\r\n //\r\n if (this.getCanSnapToHelper()) {\r\n newPos = this.getCanvas().snapToHelper(this, newPos)\r\n }\r\n\r\n\r\n this.setPosition(newPos)\r\n\r\n // notify all installed policies that the object has moved.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.onDrag(this.canvas, this)\r\n }\r\n })\r\n\r\n\r\n // notify all installed listener that th object has moved\r\n // @since 5.3.3\r\n this.fireEvent(\"drag\", {dx: dx, dy: dy, dx2: dx2, dy2: dy2, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the figure returns false for the drag operation. In this\r\n * case we send a \"panning\" event - mouseDown + mouseMove. This is very useful for\r\n * UI-Widget like slider, spinner,...\r\n *\r\n * // You can alternatively register an event handler with:\r\n * figure.on(\"panning\", function(emitter, eventData){\r\n * alert(\"panning of the figure called\");\r\n * });\r\n *\r\n * @param {Number} dx the x difference between the mouse down operation and now\r\n * @param {Number} dy the y difference between the mouse down operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onPanning: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the panning event of the figures ends. This happens\r\n * after the mous up event if the panning is active.\r\n *\r\n * // You can alternatively register an event handler with:\r\n * figure.on(\"panningEnd\", function(emitter){\r\n * alert(\"panning of the figure called\");\r\n * });\r\n *\r\n */\r\n onPanningEnd: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Will be called after a drag and drop action.<br>\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call\r\n * the super implementation via <code>this._super();</code>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n **/\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n // Element ist zwar schon an seine Position, das Command muss aber trotzdem\r\n // in dem CommandStack gelegt werden damit das Undo funktioniert.\r\n //\r\n if (this.command !== null) {\r\n this.command.setPosition(this.x, this.y)\r\n this.canvas.getCommandStack().execute(this.command)\r\n this.command = null\r\n }\r\n this.isInDragDrop = false\r\n this.panningDelegate = null\r\n\r\n // notify all installed policies\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.onDragEnd(this.canvas, this, x, y, shiftKey, ctrlKey)\r\n }\r\n })\r\n\r\n this.fireEvent(\"move\", { x: this.getX(), y: this.getY(), dx: 0, dy: 0})\r\n this.fireEvent(\"change:x\", { x: this.getX(), dx: 0})\r\n this.fireEvent(\"change:y\", { y: this.getY(), dy: 0})\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragend\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework during drag&drop operations if the user drag a figure over this figure\r\n *\r\n * @param {draw2d.Figure} draggedFigure The figure which is currently dragging\r\n *\r\n * @returns {draw2d.Figure} the figure which should receive the drop event or null if the element didn't want a drop event\r\n * @since 6.1.0\r\n * @private\r\n **/\r\n delegateTarget: function (draggedFigure) {\r\n\r\n let delegate = draggedFigure\r\n this.getCanvas().getDropInterceptorPolicies().each((i, policy) => {\r\n delegate = policy.delegateTarget(draggedFigure, this)\r\n if (delegate !== null) {\r\n return false // break the loop\r\n }\r\n })\r\n\r\n return delegate\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework during drag&drop operations if the user drag a figure over this figure\r\n *\r\n * @param {draw2d.Figure} draggedFigure The figure which is currently dragging\r\n *\r\n * @template\r\n **/\r\n onDragEnter: function (draggedFigure) {\r\n },\r\n\r\n /**\r\n *\r\n * Called if the DragDrop object leaving the current hover figure.\r\n *\r\n * @param {draw2d.Figure} draggedFigure The figure which is currently dragging\r\n * @template\r\n **/\r\n onDragLeave: function (draggedFigure) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the user drop this element onto the dropTarget. This event is ONLY fired if the\r\n * shape return \"this\" in the {@link draw2d.Figure#onDragEnter} method.\r\n *\r\n *\r\n * @param {draw2d.Figure} dropTarget The drop target.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n **/\r\n onDrop: function (dropTarget, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n * Called if the user dropped an figure onto this element. This event is ONLY fired if the\r\n * in the canvas installed {@link draw2d.policy.canvas.DropInterceptorPolicy} allow this.\r\n *\r\n *\r\n * @param {draw2d.Figure} droppedFigure The dropped figure.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n * @since 4.8.0\r\n **/\r\n onCatch: function (droppedFigure, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method for the mouse enter event. Usefull for mouse hover-effects.\r\n * Override this method for your own effects. Don't call them manually.\r\n *\r\n * @template\r\n **/\r\n onMouseEnter: function () {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method for the mouse leave event. Useful for mouse hover-effects.\r\n *\r\n * @template\r\n **/\r\n onMouseLeave: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Called when a user dbl clicks on the element\r\n *\r\n * // Alternatively you can register an event with:\r\n * //\r\n * figure.on(\"dblclick\", function(emitter, event){\r\n * alert(\"user dbl click on the figure\");\r\n * });\r\n *\r\n * @template\r\n */\r\n onDoubleClick: function () {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called when a user clicks on the element.\r\n *\r\n * // You can alternatively register an event handler with:\r\n * figure.on(\"click\", function(emitter, event){\r\n * alert(\"user click on the figure\");\r\n * });\r\n *\r\n * @template\r\n * @deprecated\r\n */\r\n onClick: function () {\r\n },\r\n\r\n /**\r\n *\r\n * called by the framework if the figure should show the context menu.<br>\r\n * The strategy to show the context menu depends on the platform. Either looong press or\r\n * right click with the mouse.\r\n *\r\n * // Alternatively you register for this event with:\r\n * figure.on(\"contextmenu\", function(emitter, event){\r\n * alert(\"user press the right mouse button for a context menu\");\r\n * });\r\n *\r\n * @param {Number} x the x-coordinate to show the menu\r\n * @param {Number} y the y-coordinate to show the menu\r\n * @since 1.1.0\r\n * @template\r\n */\r\n onContextMenu: function (x, y) {\r\n },\r\n\r\n /**\r\n *\r\n * Set the alpha blending of this figure.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * \"alpha\": percent\r\n * });\r\n *\r\n * // ...or:\r\n * figure.attr({\r\n * \"opacity\": percent\r\n * });\r\n *\r\n * @param {Number} percent value between [0..1].\r\n **/\r\n setAlpha: function (percent) {\r\n percent = Math.min(1, Math.max(0, parseFloat(percent)))\r\n if (percent === this.alpha) {\r\n return\r\n }\r\n\r\n this.alpha = percent\r\n this.repaint()\r\n this.fireEvent(\"change:opacity\", {value: this.alpha})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the alpha blending of the figure\r\n *\r\n * @returns {Number} the current alpha blending\r\n */\r\n getAlpha: function () {\r\n return this.alpha\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the rotation angle in degree [0..356]<br>\r\n * <b>Only steps of 90 degree is working well</b>\r\n * <br>\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * angle: angle\r\n * });\r\n *\r\n * @param {Number} angle the rotation angle in degree\r\n */\r\n setRotationAngle: function (angle) {\r\n this.rotationAngle = angle\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"change:angle\", {value: this.rotationAngle})\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * return the rotation angle of the figure in degree of [0..356].\r\n *\r\n * <br>\r\n * <b>NOTE: this method is pre alpha and not for production. Only steps of 90 degree is working well</b>\r\n * <br>\r\n * @returns {Number}\r\n */\r\n getRotationAngle: function () {\r\n return this.rotationAngle\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Show/hide the element. The element didn't receive any mouse events (click, dblclick) if you hide the\r\n * figure.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * visible: flag\r\n * });\r\n *\r\n * @param {Boolean} flag\r\n * @param {Number} [duration] the optional number for the fadeIn /fadeOut of the figure\r\n * @since 1.1.0\r\n */\r\n setVisible: function (flag, duration) {\r\n flag = !!flag\r\n if (flag === this.visible) {\r\n return\r\n }\r\n this.visible = flag\r\n\r\n this.repaint({visibleDuration: duration})\r\n\r\n this.fireEvent(this.visible?\"show\":\"hide\")\r\n this.fireEvent(\"change:visibility\", {value: this.visible})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return true if the figure visible.\r\n *\r\n * @returns {Boolean}\r\n * @since 1.1.0\r\n */\r\n isVisible: function () {\r\n return this.visible && this.shape !== null\r\n },\r\n\r\n /**\r\n *\r\n * Guarantee, that the figure width/height will not be distorted. Applicable before calling setDimension().\r\n * It is false by default.\r\n *\r\n * @since 4.1.0\r\n * @param {Boolean} flag boolean flag if the figure should respect the aspect ratio\r\n */\r\n setKeepAspectRatio: function (flag) {\r\n this.keepAspectRatio = flag\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the flag if the shape keep the aspect ratio.\r\n *\r\n * @since 4.1.0\r\n */\r\n getKeepAspectRatio: function () {\r\n return this.keepAspectRatio\r\n },\r\n\r\n /**\r\n *\r\n * Return the current z-index of the element. Currently this is an expensive method. The index will be calculated\r\n * all the time. Caching is not implemented at the moment.\r\n *\r\n * @returns {Number}\r\n */\r\n getZOrder: function () {\r\n let child = this.shape?.node\r\n if(!child || this.cachedZOrder>=0){\r\n return this.cachedZOrder\r\n }\r\n this.cachedZOrder = Array.from(child.parentNode.children).indexOf(child)\r\n \r\n return this.cachedZOrder\r\n },\r\n\r\n /**\r\n *\r\n * Set the flag if this object can snap to grid or geometry.\r\n * A window of dialog should set this flag to false.\r\n *\r\n * @param {Boolean} flag The snap to grid/geometry enable flag.\r\n *\r\n **/\r\n setCanSnapToHelper: function (flag) {\r\n this.canSnapToHelper = !!flag\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns true if the figure can snap to any helper like a grid, guide, geometrie\r\n * or something else.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n getCanSnapToHelper: function () {\r\n return this.canSnapToHelper\r\n },\r\n\r\n /**\r\n *\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n getSnapToGridAnchor: function () {\r\n return this.snapToGridAnchor\r\n },\r\n\r\n /**\r\n *\r\n * Set the hot spot for all snapTo### operations.\r\n *\r\n * @param {draw2d.geo.Point} point\r\n **/\r\n setSnapToGridAnchor: function (point) {\r\n this.snapToGridAnchor = point\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set the width of the figure and consider the minWidth attribute\r\n *\r\n * @param {Number} width the new width of the figure\r\n * @since 5.1.0\r\n */\r\n setWidth: function (width) {\r\n this.setDimension(parseFloat(width), this.getHeight())\r\n this.fireEvent(\"change:width\", {value: this.width})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The current width of the figure.\r\n *\r\n * @type {Number}\r\n **/\r\n getWidth: function () {\r\n return this.width\r\n },\r\n\r\n /**\r\n *\r\n * Set the heigth of the figure and consider the minWidth attribute\r\n *\r\n * @param {Number} height the new height of the figure\r\n * @since 5.1.0\r\n */\r\n setHeight: function (height) {\r\n this.setDimension(this.getWidth(), parseFloat(height))\r\n this.fireEvent(\"change:height\", {value: this.height})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The current height of the figure.\r\n *\r\n * @returns {Number}\r\n **/\r\n getHeight: function () {\r\n return this.height\r\n },\r\n\r\n\r\n /**\r\n *\r\n * This value is relevant for the interactive resize of the figure.\r\n *\r\n * @returns {Number} Returns the min. width of this object.\r\n */\r\n getMinWidth: function () {\r\n return this.minWidth\r\n },\r\n\r\n /**\r\n *\r\n * Set the minimum width of this figure\r\n *\r\n * @param {Number} w\r\n */\r\n setMinWidth: function (w) {\r\n this.minWidth = parseFloat(w)\r\n this.fireEvent(\"change:minWidth\", {value: this.minWidth})\r\n\r\n // fit the width with the new constraint\r\n this.setWidth(this.getWidth())\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * This value is relevant for the interactive resize of the figure.\r\n *\r\n * @returns {Number} Returns the min. height of this object.\r\n */\r\n getMinHeight: function () {\r\n return this.minHeight\r\n },\r\n\r\n /**\r\n *\r\n * Set the minimum height of the figure.\r\n *\r\n * @param {Number} h\r\n */\r\n setMinHeight: function (h) {\r\n this.minHeight = parseFloat(h)\r\n this.fireEvent(\"change:minHeight\", {value: this.minHeight})\r\n\r\n // fit the height with the new constraint\r\n this.setHeight(this.getHeight())\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * the the x-offset related to the parent figure or canvas\r\n *\r\n * @param {Number} x the new x offset of the figure\r\n * @since 5.0.8\r\n */\r\n setX: function (x) {\r\n this.setPosition(parseFloat(x), this.y)\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The x-offset related to the parent figure or canvas.\r\n *\r\n * @returns {Number} the x-offset to the parent figure\r\n **/\r\n getX: function () {\r\n return this.x\r\n },\r\n\r\n /**\r\n *\r\n * the the y-offset related to the parent figure or canvas\r\n *\r\n * @param {Number} y the new x offset of the figure\r\n * @since 5.0.8\r\n */\r\n setY: function (y) {\r\n this.setPosition(this.x, parseFloat(y))\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The y-offset related to the parent figure or canvas.\r\n *\r\n * @returns {Number} The y-offset to the parent figure.\r\n **/\r\n getY: function () {\r\n return this.y\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The x-offset related to the canvas.\r\n *\r\n * @returns {Number} the x-offset to the canvas\r\n **/\r\n getAbsoluteX: function () {\r\n if (!this.parent) {\r\n return this.getX()\r\n }\r\n\r\n return this.getX() + this.parent.getAbsoluteX()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The y-offset related to the canvas.\r\n *\r\n * @returns {Number} The y-offset to the canvas.\r\n **/\r\n getAbsoluteY: function () {\r\n if (!this.parent) {\r\n return this.getY()\r\n }\r\n return this.getY() + this.parent.getAbsoluteY()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the absolute y-position of the port.\r\n *\r\n * @type {draw2d.geo.Point}\r\n **/\r\n getAbsolutePosition: function () {\r\n return new draw2d.geo.Point(this.getAbsoluteX(), this.getAbsoluteY())\r\n },\r\n\r\n /**\r\n *\r\n * Returns the absolute y-position of the port.\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n **/\r\n getAbsoluteBounds: function () {\r\n return new draw2d.geo.Rectangle(this.getAbsoluteX(), this.getAbsoluteY(), this.getWidth(), this.getHeight())\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the position of the object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * x: x,\r\n * y: y\r\n * });\r\n *\r\n * @param {Number|draw2d.geo.Point} x The new x coordinate of the figure or the x/y coordinate if it is an draw2d.geo.Point\r\n * @param {Number} [y] The new y coordinate of the figure\r\n **/\r\n setPosition: function (x, y) {\r\n if (typeof x === \"undefined\") {\r\n debugger\r\n }\r\n\r\n let oldPos = {x: this.x, y: this.y}\r\n\r\n if (x instanceof draw2d.geo.Point) {\r\n this.x = x.x\r\n this.y = x.y\r\n } else {\r\n this.x = x\r\n this.y = y\r\n }\r\n\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n let newPos = e.adjustPosition(this, this.x, this.y)\r\n this.x = newPos.x\r\n this.y = newPos.y\r\n }\r\n })\r\n\r\n this.repaint()\r\n\r\n\r\n // Update the resize handles if the user change the position of the\r\n // element via an API call.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n\r\n let event = {\r\n x: this.x,\r\n y: this.y,\r\n dx: this.x - oldPos.x,\r\n dy: this.y - oldPos.y\r\n }\r\n this.fireEvent(\"move\", event)\r\n this.fireEvent(\"change:x\", event)\r\n this.fireEvent(\"change:y\", event)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Get the current position of the figure\r\n *\r\n * @returns {draw2d.geo.Point}\r\n * @since 2.0.0\r\n */\r\n getPosition: function () {\r\n return new draw2d.geo.Point(this.getX(), this.getY())\r\n },\r\n\r\n /**\r\n *\r\n * Translate the figure with the given x/y offset.\r\n *\r\n * @param {Number} dx The x offset to translate\r\n * @param {Number} dy The y offset to translate\r\n **/\r\n translate: function (dx, dy) {\r\n this.setPosition(this.getX() + dx, this.getY() + dy)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the new width and height of the figure.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * width: w,\r\n * height: h\r\n * });\r\n *\r\n * @param {Number} w The new width of the figure\r\n * @param {Number} h The new height of the figure\r\n **/\r\n setDimension: function (w, h) {\r\n let old = {width: this.width, height: this.height}\r\n\r\n w = Math.max(this.getMinWidth(), w)\r\n h = Math.max(this.getMinHeight(), h)\r\n\r\n if (this.width === w && this.height === h) {\r\n // required if an inherit figure changed the w/h to a given constraint.\r\n // In this case the Resize handles must be informed that the shape didn't resized.\r\n // because the minWidth/minHeight did have a higher prio.\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n return this\r\n }\r\n\r\n\r\n // apply all EditPolicy to adjust/modify the new dimension\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n let newDim = e.adjustDimension(this, w, h)\r\n w = newDim.w\r\n h = newDim.h\r\n }\r\n })\r\n\r\n // respect the aspect ratio if required\r\n //\r\n if (this.keepAspectRatio === true) {\r\n if (w >= this.getMinWidth()) {\r\n // scale the height to the given ratio\r\n h = this.getHeight() * (w / this.getWidth())\r\n // and apply the new dimension only if the values are in range of the given constraints\r\n if (h >= this.getMinHeight()) {\r\n this.width = w\r\n this.height = h\r\n }\r\n }\r\n } else {\r\n this.width = Math.max(this.getMinWidth(), w)\r\n this.height = Math.max(this.getMinHeight(), h)\r\n }\r\n\r\n\r\n this.repaint()\r\n\r\n this.fireEvent(\"resize\")\r\n this.fireEvent(\"change:dimension\", { height: this.height, width: this.width, old: old})\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the bounding box of the figure\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * width: w,\r\n * height: h,\r\n * x: x,\r\n * y: y\r\n * });\r\n *\r\n * // or\r\n * figure.attr({\r\n * boundingBox: {x:1, y:100, width:30, height:30}\r\n * });\r\n *\r\n * @param {draw2d.geo.Rectangle} rect\r\n * @since 4.8.0\r\n */\r\n setBoundingBox: function (rect) {\r\n rect = new draw2d.geo.Rectangle(rect)\r\n\r\n let orig = this.repaintBlocked\r\n this.repaintBlocked = true\r\n this.setPosition(rect.x, rect.y)\r\n this.repaintBlocked = orig\r\n this.setDimension(rect.w, rect.h)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns the bounding box of the figure in absolute position to the canvas.\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n **/\r\n getBoundingBox: function () {\r\n return new draw2d.geo.Rectangle(this.getAbsoluteX(), this.getAbsoluteY(), this.getWidth(), this.getHeight())\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the bounding box of the figure in absolute position to the canvas. All child shapes included.\r\n * The result BoundingBox spans the parent figured plus all children.\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n **/\r\n getOuterBoundingBox: function () {\r\n let parentBB = new draw2d.geo.Rectangle(this.getAbsoluteX(), this.getAbsoluteY(), this.getWidth(), this.getHeight())\r\n this.getChildren().each( (i, child)=>{\r\n let childBB = child.getOuterBoundingBox()\r\n parentBB.merge(childBB)\r\n })\r\n return parentBB\r\n },\r\n\r\n /**\r\n *\r\n * Detect whenever the hands over coordinate is inside the figure.\r\n * The default implementation is a simple bounding box test.\r\n *\r\n * @param {Number} iX\r\n * @param {Number} iY\r\n * @param {Number} [corona]\r\n *\r\n * @returns {Boolean}\r\n */\r\n hitTest: function (iX, iY, corona) {\r\n if (typeof corona === \"number\") {\r\n return this.getBoundingBox().scale(corona, corona).hitTest(iX, iY)\r\n }\r\n return this.getBoundingBox().hitTest(iX, iY)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Switch on/off the drag drop behaviour of this object\r\n *\r\n * @param {Boolean} flag The new drag drop indicator\r\n **/\r\n setDraggable: function (flag) {\r\n this.draggable = !!flag\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the Drag drop enable flag\r\n *\r\n * @returns {Boolean} The new drag drop indicator\r\n **/\r\n isDraggable: function () {\r\n // delegate to the composite if given\r\n if (this.composite !== null) {\r\n return this.composite.isMemberDraggable(this, this.draggable)\r\n }\r\n\r\n return this.draggable\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the true if the figure can be resized.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n isResizeable: function () {\r\n return this.resizeable\r\n },\r\n\r\n /**\r\n *\r\n * You can change the resizeable behaviour of this object. Hands over [false] and\r\n * the figure has no resizehandles if you select them with the mouse.<br>\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * resizeable: flag\r\n * });\r\n *\r\n * @param {Boolean} flag The resizeable flag.\r\n **/\r\n setResizeable: function (flag) {\r\n this.resizeable = !!flag\r\n this.fireEvent(\"change:resizeable\", {value: this.resizeable})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Indicates whenever the element is selectable by user interaction or API.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n isSelectable: function () {\r\n // delegate to the composite if given\r\n if (this.composite !== null) {\r\n return this.composite.isMemberSelectable(this, this.selectable)\r\n }\r\n\r\n return this.selectable\r\n },\r\n\r\n\r\n /**\r\n *\r\n * You can change the selectable behavior of this object. Hands over [false] and\r\n * the figure has no selection handles if you try to select them with the mouse.<br>\r\n *\r\n * @param {Boolean} flag The selectable flag.\r\n **/\r\n setSelectable: function (flag) {\r\n this.selectable = !!flag\r\n this.fireEvent(\"change:selectable\", {value: this.selectable})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return true if the object doesn't care about the aspect ratio.\r\n * You can change the height and width independent.<br>\r\n *\r\n * Replaced with \"getKeepAspectRatio\"\r\n * @returns {Boolean}\r\n * @deprecated\r\n */\r\n isStrechable: function () {\r\n return !this.getKeepAspectRatio()\r\n },\r\n\r\n /**\r\n *\r\n * Return false if you avoid that the user can delete your figure.\r\n * Sub class can override this method.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n isDeleteable: function () {\r\n return this.deleteable\r\n },\r\n\r\n /**\r\n *\r\n * Set the flag if the shape is deleteable.\r\n *\r\n * @param {Boolean} flag enable or disable flag for the delete operation\r\n **/\r\n setDeleteable: function (flag) {\r\n this.deleteable = !!flag\r\n this.fireEvent(\"change:deleteable\", {value: this.deleteable})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set the parent of this figure.\r\n * Don't call them manually.\r\n *\r\n * @param {draw2d.Figure} parent The new parent of this figure\r\n * @private\r\n **/\r\n setParent: function (parent) {\r\n this.parent = parent\r\n\r\n if (parent !== null) {\r\n // inherit the selection handling impl from the parent\r\n this.setSelectionAdapter(parent.getSelectionAdapter())\r\n } else {\r\n // use default\r\n this.setSelectionAdapter(null)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the parent of this figure.\r\n *\r\n * @returns {draw2d.Figure}\r\n **/\r\n getParent: function () {\r\n return this.parent\r\n },\r\n\r\n /**\r\n *\r\n * Check to see if a figure is a descendant of another figure.\r\n * <br>\r\n * The contains() method returns true if the figure provided by the argument is a descendant of this figure,\r\n * whether it is a direct child or nested more deeply. Otherwise, it returns false.\r\n *\r\n * @param {draw2d.Figure} containedFigure The figure that may be contained by (a descendant of) this figure.\r\n * @since 5.5.4\r\n */\r\n contains: function (containedFigure) {\r\n if (containedFigure.getParent() === this) {\r\n return true\r\n }\r\n\r\n for (let i = 0, len = this.children.getSize(); i < len; i++) {\r\n let child = this.children.get(i).figure\r\n if (child.contains(containedFigure)) {\r\n return true\r\n }\r\n }\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Get the top most parent of this figure. This can be an layout figure or parent container\r\n *\r\n * @returns {draw2d.Figure}\r\n * @since 5.0.6\r\n **/\r\n getRoot: function () {\r\n let root = this.parent\r\n while (root !== null && root.parent !== null) {\r\n root = root.parent\r\n }\r\n return root\r\n },\r\n\r\n /**\r\n *\r\n * Set the assigned composite of this figure.\r\n *\r\n * @param {draw2d.shape.composite.StrongComposite} composite The assigned composite of this figure\r\n * @since 4.8.0\r\n **/\r\n setComposite: function (composite) {\r\n if (composite !== null && !(composite instanceof draw2d.shape.composite.StrongComposite)) {\r\n throw \"'composite must inherit from 'draw2d.shape.composite.StrongComposite'\"\r\n }\r\n\r\n this.composite = composite\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the assigned composite of this figure.\r\n *\r\n * @returns {draw2d.shape.composite.StrongComposite}\r\n * @since 4.8.0\r\n **/\r\n getComposite: function () {\r\n return this.composite\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Execute all handlers and behaviors attached to the figure for the given event type.\r\n *\r\n *\r\n * @param {String} event the event to trigger\r\n * @param {Object} [args] optional parameters for the triggered event callback\r\n *\r\n * @since 5.0.0\r\n */\r\n fireEvent: function (event, args) {\r\n try {\r\n if (typeof this.eventSubscriptions[event] === 'undefined') {\r\n return\r\n }\r\n\r\n // avoid recursion\r\n if (this._inEvent === true) {\r\n return\r\n }\r\n this._inEvent = true\r\n let subscribers = this.eventSubscriptions[event]\r\n for (let i = 0; i < subscribers.length; i++) {\r\n subscribers[i](this, args)\r\n }\r\n } catch (exc) {\r\n console.log(exc)\r\n throw exc\r\n } finally {\r\n this._inEvent = false\r\n\r\n // fire a generic change event if an attribute has changed\r\n // required for some DataBinding frameworks or for the Backbone.Model compatibility\r\n // the event \"change\" with the corresponding attribute name as additional parameter\r\n if (event.substring(0, 7) === \"change:\") {\r\n this.fireEvent(\"change\", event.substring(7))\r\n }\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Attach an event handler function for one or more events to the figure.\r\n * To remove events bound with .on(), see {@link #off}.\r\n *\r\n * possible events are:<br>\r\n * <ul>\r\n * <li>click</li>\r\n * <li>dblclick</li>\r\n * <li>move</li>\r\n * <li>resize</li>\r\n * <li>timer</li>\r\n * <li>contextmenu</li>\r\n * <li>show</li>\r\n * <li>hide</li>\r\n * <li>added</li>\r\n * <li>removed</li>\r\n * <li>change:[attr]</li>\r\n * </ul>\r\n *\r\n * @param {String} event One or more space-separated event types\r\n * @param {Function} callback A function to execute when the event is triggered.\r\n * @param {draw2d.Figure} callback.emitter the emitter of the event\r\n * @param {Object} [callback.obj] optional event related data\r\n * @param {Object} [context] optional context of the function callback.\r\n * @since 5.0.0\r\n */\r\n on: function (event, callback, context) {\r\n let events = event.split(\" \")\r\n if (typeof callback === \"undefined\") {\r\n debugger\r\n }\r\n // the \"context\" param is add to be compatible with Backbone.Model.\r\n // The project \"backbone.ModelBinder\" requires this signature and we want to be nice.\r\n //\r\n if (context) {\r\n callback = callback.bind(context)\r\n callback.___originalCallback = callback\r\n }\r\n\r\n for (let i = 0; i < events.length; i++) {\r\n if (typeof this.eventSubscriptions[events[i]] === 'undefined') {\r\n this.eventSubscriptions[events[i]] = []\r\n }\r\n // avoid duplicate registration for the same event with the same callback method\r\n if (-1 !== $.inArray(callback, this.eventSubscriptions[events[i]])) {\r\n // debugger\r\n } else {\r\n this.eventSubscriptions[events[i]].push(callback)\r\n }\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The .off() method removes event handlers that were attached with {@link #on}.<br>\r\n * Calling .off() with no arguments removes all handlers attached to the elements.<br>\r\n * <br>\r\n * If a simple event name such as \"move\" is provided, all events of that type are removed from the figure.\r\n *\r\n *\r\n * @param {String|Function} eventOrFunction the event name of the registerd function or the function itself\r\n * @since 5.0.0\r\n */\r\n off: function (eventOrFunction) {\r\n if (typeof eventOrFunction === \"undefined\") {\r\n this.eventSubscriptions = {}\r\n } else if (typeof eventOrFunction === 'string') {\r\n this.eventSubscriptions[eventOrFunction] = []\r\n } else {\r\n for (let event in this.eventSubscriptions) {\r\n this.eventSubscriptions[event] = this.eventSubscriptions[event].filter(callback => {\r\n if (typeof callback.___originalCallback !== \"undefined\") {\r\n return callback.___originalCallback !== eventOrFunction\r\n }\r\n return callback !== eventOrFunction\r\n })\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the best figure at the location [x,y]. It is a simple hit test. Keep in mind that only visible objects\r\n * are returned.\r\n *\r\n * @param {Number} x The x position.\r\n * @param {Number} y The y position.\r\n * @param {draw2d.Figure|Array} [figureToIgnore] The figures which should be ignored.\r\n **/\r\n getBestChild: function (x, y, figureToIgnore) {\r\n if (!Array.isArray(figureToIgnore)) {\r\n if (figureToIgnore instanceof draw2d.Figure) {\r\n figureToIgnore = [figureToIgnore]\r\n } else {\r\n figureToIgnore = []\r\n }\r\n }\r\n\r\n let result = null\r\n\r\n // tool method to check recursive a figure for hitTest\r\n //\r\n let checkRecursive = function (children) {\r\n children.each(function (i, e) {\r\n let c = e.figure\r\n checkRecursive(c.children)\r\n if (result === null && c.isVisible() === true && c.hitTest(x, y) === true && $.inArray(c, figureToIgnore) === -1) {\r\n result = c\r\n }\r\n return result === null // break the each-loop if we found an element\r\n })\r\n }\r\n\r\n checkRecursive(this.children)\r\n\r\n return result\r\n },\r\n\r\n /**\r\n *\r\n * Returns the Command to perform the specified Request or null.\r\n *\r\n * @param {draw2d.command.CommandType} request describes the Command being requested\r\n * @returns {draw2d.command.Command} null or a Command\r\n * @private\r\n **/\r\n createCommand: function (request) {\r\n if (request === null) {\r\n return null\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE) {\r\n if (!this.isDraggable()) {\r\n return null\r\n }\r\n return new draw2d.command.CommandMove(this)\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.DELETE) {\r\n if (!this.isDeleteable()) {\r\n return null\r\n }\r\n return new draw2d.command.CommandDelete(this)\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.RESIZE) {\r\n if (!this.isResizeable()) {\r\n return null\r\n }\r\n return new draw2d.command.CommandResize(this)\r\n }\r\n\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Clone the figure. <br>\r\n * You must override and implement the methods <b>getPersistentAttributes</b> and <b>setPersistentAttributes</b> for your custom\r\n * figures if the have special attributes.\r\n *\r\n * The clone() method performs a deep copy of the object, meaning that it copies the children, ports and decorations\r\n * per default. You can control the clone procedure with the 'cloneMetaData'.\r\n *\r\n *\r\n * @param {Object} [cloneMetaData] controls the clone procedure\r\n * @param {Boolean} [cloneMetaData.excludeChildren] set it to true if you want exclude the children.\r\n *\r\n * @since 4.1.0\r\n * @experimental\r\n */\r\n clone: function (cloneMetaData) {\r\n cloneMetaData = {excludeChildren: false, ...cloneMetaData}\r\n\r\n let clone = Function(`return new ${this.NAME}()`)()\r\n let initialId = clone.id\r\n\r\n clone.setPersistentAttributes(this.getPersistentAttributes())\r\n\r\n clone.id = initialId\r\n\r\n // add all decorations to the memento\r\n //\r\n if (cloneMetaData.excludeChildren === false) {\r\n clone.resetChildren()\r\n this.children.each((i, entry) => {\r\n let child = entry.figure.clone()\r\n // we can ignore the locator if this didn't provide a \"correct\" name, this can happen in some\r\n // Layout shapes like VerticalLayout or Horziontal Layout. This figures injects it own kind\r\n // of layouter...so didn'T care about this.\r\n\r\n let locator = entry.locator.NAME ? Function(`return new ${entry.locator.NAME}()`)() : null\r\n clone.add(child, locator)\r\n })\r\n }\r\n\r\n return clone\r\n },\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @return {Object} all attributes of the figure required for the persistency\r\n */\r\n getPersistentAttributes: function () {\r\n // force deep copy of userData to avoid side effects in the clone method.\r\n //\r\n let memento = {\r\n type: this.NAME,\r\n id: this.id,\r\n x: this.getX(),\r\n y: this.getY(),\r\n width: this.width,\r\n height: this.height,\r\n alpha: this.alpha,\r\n selectable: this.selectable,\r\n draggable: this.draggable,\r\n angle: this.rotationAngle,\r\n userData: extend(true, {}, this.userData)\r\n }\r\n\r\n\r\n if (this.cssClass !== null) {\r\n memento.cssClass = this.cssClass\r\n }\r\n\r\n if (this.composite !== null) {\r\n memento.composite = this.composite.getId()\r\n }\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this.id = memento.id\r\n // in some cases, e.g. a Connection, the x/y attribute is not set.\r\n //\r\n if(memento.x && memento.y){\r\n this.setPosition(parseFloat(memento.x), parseFloat(memento.y))\r\n }\r\n\r\n // width and height are optional parameter for the JSON stuff.\r\n // We use the defaults if the attributes not present\r\n if (typeof memento.width !== \"undefined\") {\r\n this.width = parseFloat(memento.width)\r\n }\r\n\r\n if (typeof memento.height !== \"undefined\") {\r\n this.height = parseFloat(memento.height)\r\n }\r\n\r\n if (typeof memento.userData !== \"undefined\") {\r\n this.userData = memento.userData\r\n }\r\n\r\n if (typeof memento.selectable !== \"undefined\") {\r\n this.selectable = memento.selectable\r\n }\r\n\r\n if (typeof memento.draggable !== \"undefined\") {\r\n this.draggable = memento.draggable\r\n }\r\n\r\n if (typeof memento.cssClass !== \"undefined\") {\r\n this.setCssClass(memento.cssClass)\r\n }\r\n\r\n if (typeof memento.alpha !== \"undefined\") {\r\n this.setAlpha(parseFloat(memento.alpha))\r\n }\r\n\r\n if (typeof memento.angle !== \"undefined\") {\r\n this.rotationAngle = parseFloat(memento.angle)\r\n }\r\n\r\n return this\r\n }\r\n })\r\n\r\n\r\n","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Required for Node.js draw2d model read/write operations.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n */\r\n\r\ndraw2d.HeadlessCanvas = Class.extend(\r\n /** @lends draw2d.HeadlessCanvas.prototype */\r\n\r\n /** @lends draw2d.HeadlessCanvas.prototype */\r\n {\r\n\r\n NAME: \"draw2d.HeadlessCanvas\",\r\n\r\n /**\r\n * Create a new canvas with the given HTML DOM references.\r\n *\r\n * @param {String} canvasId the id of the DOM element to use a parent container\r\n */\r\n init: function()\r\n {\r\n // internal document with all figures, ports, ....\r\n //\r\n this.figures = new draw2d.util.ArrayList();\r\n this.lines = new draw2d.util.ArrayList(); // crap - why are connections not just figures. Design by accident\r\n this.commonPorts = new draw2d.util.ArrayList();\r\n\r\n this.eventSubscriptions = {};\r\n\r\n // The CommandStack for undo/redo operations\r\n //\r\n this.commandStack = new draw2d.command.CommandStack();\r\n },\r\n\r\n /**\r\n * \r\n * Reset the canvas and delete all model elements.<br>\r\n * You can now reload another model to the canvas with a {@link draw2d.io.Reader}\r\n *\r\n * @since 1.1.0\r\n */\r\n clear: function()\r\n {\r\n // internal document with all figures, ports, ....\r\n //\r\n this.figures = new draw2d.util.ArrayList();\r\n this.lines = new draw2d.util.ArrayList();\r\n this.commonPorts = new draw2d.util.ArrayList();\r\n\r\n this.commandStack.markSaveLocation();\r\n\r\n return this;\r\n },\r\n\r\n calculateConnectionIntersection:function()\r\n {\r\n },\r\n\r\n /**\r\n * \r\n * Callback for any kind of image export tools to trigger the canvas to hide all unwanted\r\n * decorations. The method is called e.g. from the draw2d.io.png.Writer\r\n *\r\n * @since 4.0.0\r\n * @template\r\n */\r\n hideDecoration: function()\r\n {\r\n },\r\n\r\n /**\r\n * \r\n * callback method for any image export writer to reactivate the decoration\r\n * of the canvas. e.g. grids, rulers,...\r\n *\r\n *\r\n * @since 4.0.0\r\n * @template\r\n */\r\n showDecoration: function()\r\n {\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Add a figure at the given x/y coordinate. This method fires an event.\r\n *\r\n * Example:\r\n *\r\n * canvas.on(\"figure:add\", function(emitter, event){\r\n * alert(\"figure added:\");\r\n * });\r\n *\r\n * // or more general if you want catch all figure related events\r\n * //\r\n * canvas.on(\"figure\", function(emitter, event){\r\n * // use event.figure.getCanvas()===null to determine if the\r\n * // figure part of the canvas\r\n *\r\n * alert(\"figure added or removed:\");\r\n * });\r\n *\r\n * @param {draw2d.Figure} figure The figure to add.\r\n * @param {Number/draw2d.geo.Point} [x] The new x coordinate of the figure or the x/y coordinate if it is an draw2d.geo.Point\r\n * @param {Number} [y] The y position.\r\n **/\r\n add: function( figure , x, y)\r\n {\r\n if(figure.getCanvas()===this){\r\n return;\r\n }\r\n\r\n if(figure instanceof draw2d.shape.basic.Line){\r\n this.lines.add(figure);\r\n }\r\n else{\r\n this.figures.add(figure);\r\n }\r\n figure.canvas=this;\r\n\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Returns all lines/connections in this workflow/canvas.<br>\r\n *\r\n * @protected\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getLines: function()\r\n {\r\n return this.lines;\r\n },\r\n\r\n /**\r\n * \r\n * Returns the internal figures.<br>\r\n *\r\n * @protected\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getFigures: function()\r\n {\r\n return this.figures;\r\n },\r\n\r\n /**\r\n * \r\n * Returns the line or connection with the given id.\r\n *\r\n * @param {String} id The id of the line.\r\n *\r\n * @returns {draw2d.shape.basic.Line}\r\n **/\r\n getLine: function( id)\r\n {\r\n var count = this.lines.getSize();\r\n for(var i=0; i<count;i++)\r\n {\r\n var line = this.lines.get(i);\r\n if(line.getId()===id){\r\n return line;\r\n }\r\n }\r\n return null;\r\n },\r\n\r\n /**\r\n * \r\n * Returns the figure with the given id.\r\n *\r\n * @param {String} id The id of the figure.\r\n * @returns {draw2d.Figure}\r\n **/\r\n getFigure: function( id)\r\n {\r\n var figure = null;\r\n this.figures.each(function(i,e){\r\n if(e.id===id){\r\n figure=e;\r\n return false;\r\n }\r\n });\r\n return figure;\r\n },\r\n\r\n /**\r\n * \r\n * Register a port to the canvas. This is required for other ports to find a valid drop target.\r\n *\r\n * @param {draw2d.Port} port The new port which has been added to the Canvas.\r\n **/\r\n registerPort: function(port )\r\n {\r\n // All elements have the same drop targets.\r\n //\r\n if(!this.commonPorts.contains(port)){\r\n this.commonPorts.add(port);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Return all ports in the canvas\r\n *\r\n */\r\n getAllPorts: function()\r\n {\r\n return this.commonPorts;\r\n },\r\n\r\n /**\r\n * \r\n * Returns the command stack for the Canvas. Required for undo/redo support.\r\n *\r\n * @returns {draw2d.command.CommandStack}\r\n **/\r\n getCommandStack: function()\r\n {\r\n return this.commandStack;\r\n },\r\n\r\n\r\n // NEW EVENT HANDLING SINCE VERSION 5.0.0\r\n /**\r\n * \r\n * Execute all handlers and behaviors attached to the canvas for the given event type.\r\n *\r\n *\r\n * @param {String} event the event to trigger\r\n * @param {Object} [args] optional parameters for the triggered event callback\r\n *\r\n * @since 5.0.0\r\n */\r\n fireEvent: function(event, args)\r\n {\r\n if (typeof this.eventSubscriptions[event] === 'undefined') {\r\n return;\r\n }\r\n\r\n var subscribers = this.eventSubscriptions[event];\r\n for (var i=0; i<subscribers.length; i++) {\r\n try{\r\n subscribers[i](this, args);\r\n }\r\n catch(exc){\r\n console.log(exc);\r\n console.log(subscribers[i]);\r\n debugger;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Attach an event handler function for one or more events to the canvas.\r\n * To remove events bound with .on(), see {@link #off}.\r\n *\r\n * possible events are:<br>\r\n * <ul>\r\n * <li>reset</li>\r\n * <li>select</li>\r\n * </ul>\r\n *\r\n * Example:\r\n *\r\n * canvas.on(\"clear\", function(emitter, event){\r\n * alert(\"canvas.clear() called.\");\r\n * });\r\n *\r\n * canvas.on(\"select\", function(emitter,event){\r\n * if(event.figure!==null){\r\n * alert(\"figure selected\");\r\n * }\r\n * else{\r\n * alert(\"selection cleared\");\r\n * }\r\n * });\r\n *\r\n * @param {String} event One or more space-separated event types\r\n * @param {Function} callback A function to execute when the event is triggered.\r\n * @param {draw2d.Canvas} callback.emitter the emitter of the event\r\n * @param {Object} [callback.obj] optional event related data\r\n *\r\n * @since 5.0.0\r\n */\r\n on: function(event, callback)\r\n {\r\n var events = event.split(\" \");\r\n for(var i=0; i<events.length; i++){\r\n if (typeof this.eventSubscriptions[events[i]] === 'undefined') {\r\n this.eventSubscriptions[events[i]] = [];\r\n }\r\n this.eventSubscriptions[events[i]].push(callback);\r\n }\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * The .off() method removes event handlers that were attached with {@link #on}.<br>\r\n * Calling .off() with no arguments removes all handlers attached to the canvas.<br>\r\n * <br>\r\n * If a simple event name such as \"reset\" is provided, all events of that type are removed from the canvas.\r\n *\r\n *\r\n * @param {String|Function} eventOrFunction the event name of the registerd function\r\n * @since 5.0.0\r\n */\r\n off: function( eventOrFunction)\r\n {\r\n if(typeof eventOrFunction ===\"undefined\"){\r\n this.eventSubscriptions = {};\r\n }\r\n else if( typeof eventOrFunction === 'string'){\r\n this.eventSubscriptions[eventOrFunction] = [];\r\n }\r\n else{\r\n for(var event in this.eventSubscriptions ){\r\n this.eventSubscriptions[event] =this.eventSubscriptions[event].filter( callback => { return callback !== eventOrFunction; });\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n});\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n * A HybridPort can work as Input and as Output port in the same way for a {@link draw2d.Connection}.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.Port\r\n */\r\ndraw2d.HybridPort = draw2d.Port.extend(\r\n /** @lends draw2d.HybridPort.prototype */\r\n {\r\n NAME: \"draw2d.HybridPort\",\r\n\r\n /**\r\n * Create a new HybridPort element\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super(attr, setter, getter);\r\n\r\n // responsive for the arrangement of the port\r\n // calculates the x/y coordinates in relation to the parent node\r\n this.locator=new draw2d.layout.locator.InputPortLocator();\r\n\r\n // a Hybrid port has fanIn and fanOut connections. All of them can be handeled \r\n // differently. \r\n this.maxFanIn = Number.MAX_SAFE_INTEGER\r\n },\r\n\r\n\r\n /**\r\n *\r\n * set the maximal possible count of incomming connections for this port.<br>\r\n * A \"incomming\" connection has always either a hybrid or output source port.\r\n * \r\n * This method didn't delete any connection if you reduce the number and a bunch of\r\n * connection are bounded already.\r\n *\r\n * @param {Number} count the maximal number of connection related to this port\r\n * @returns {this}\r\n */\r\n setMaxFanIn: function (count) {\r\n this.maxFanIn = Math.max(1, count)\r\n this.fireEvent(\"change:maxFanIn\", {value: this.maxFanIn})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * return the maximal possible connections (in+out) for this port.\r\n *\r\n * @returns {Number}\r\n */\r\n getMaxFanIn: function () \r\n {\r\n return this.maxFanIn\r\n },\r\n\r\n /**\r\n * @param {draw2d.command.CommandType} request The requested operation to perform on the object\r\n * @returns {draw2d.command.Command} The matching command to the requested operation.\r\n */\r\n createCommand: function(request)\r\n {\r\n // Connect request between two ports\r\n //\r\n if(request.getPolicy() === draw2d.command.CommandType.CONNECT) {\r\n\r\n if(request.source.getParent().getId() === request.target.getParent().getId()){\r\n return null;\r\n }\r\n\r\n if (request.source instanceof draw2d.InputPort) {\r\n // This is the difference to the InputPort implementation of createCommand.\r\n return new draw2d.command.CommandConnect(request.target, request.source, request.source);\r\n }\r\n else if (request.source instanceof draw2d.OutputPort) {\r\n // This is the different to the OutputPort implementation of createCommand\r\n return new draw2d.command.CommandConnect(request.source, request.target, request.source);\r\n }\r\n else if (request.source instanceof draw2d.HybridPort) {\r\n // This is the different to the OutputPort implementation of createCommand\r\n return new draw2d.command.CommandConnect(request.target,request.source, request.source);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // ...else call the base class\r\n return this._super(request);\r\n }\r\n});\r\n","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A InputPort is the start anchor for a {@link draw2d.Connection}.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.Port\r\n */\r\ndraw2d.InputPort = draw2d.Port.extend(\r\n /** @lends draw2d.InputPort.prototype */\r\n {\r\n\r\n NAME: \"draw2d.InputPort\",\r\n\r\n /**\r\n * Create a new InputPort element\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n // responsive for the arrangement of the port\r\n // calculates the x/y coordinates in relation to the parent node\r\n this.locator = new draw2d.layout.locator.InputPortLocator()\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createCommand: function (request) {\r\n // Connect request between two ports\r\n //\r\n if (request.getPolicy() === draw2d.command.CommandType.CONNECT) {\r\n return new draw2d.command.CommandConnect(request.source, request.target, request.source)\r\n }\r\n\r\n // ...else call the base class\r\n return this._super(request)\r\n }\r\n})\r\n","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A OutputPort is the start anchor for a {@link draw2d.Connection}.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.Port\r\n */\r\ndraw2d.OutputPort = draw2d.Port.extend(\r\n /** @lends draw2d.OutputPort.prototype */\r\n {\r\n\r\n NAME: \"draw2d.OutputPort\",\r\n\r\n /**\r\n * Create a new OutputPort element\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super(attr, setter, getter);\r\n\r\n // responsive for the arrangement of the port\r\n // calculates the x/y coordinates in relation to the parent node\r\n this.locator=new draw2d.layout.locator.OutputPortLocator();\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createCommand: function(request)\r\n {\r\n // Connect request between two ports\r\n //\r\n if(request.getPolicy() === draw2d.command.CommandType.CONNECT){\r\n // source and target are changed.\r\n return new draw2d.command.CommandConnect(request.target, request.source, request.source);\r\n }\r\n\r\n // ...else call the base class\r\n return this._super(request);\r\n }\r\n});\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n * A port is an object that is used to establish a connection between a node and a {@link draw2d.Connection}. The port can\r\n * be placed anywhere within a node ( see {@link draw2d.layout.locator.PortLocator} for details)\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @param {Object} [attr] the configuration of the shape\r\n * @extends draw2d.shape.basic.Circle\r\n */\r\n\r\ndraw2d.Port = draw2d.shape.basic.Circle.extend(\r\n /** @lends draw2d.Port.prototype */\r\n {\r\n\r\n NAME: \"draw2d.Port\",\r\n\r\n DEFAULT_BORDER_COLOR: new draw2d.util.Color(\"#1B1B1B\"),\r\n\r\n init: function (attr, setter, getter) {\r\n this.locator = null\r\n this.lighterBgColor = null\r\n this.name = null\r\n this.coronaWidth = 5 // the corona width for the hitTest method. Useful during drag&drop of ports. Better SnapTo behavior.\r\n\r\n this._super({\r\n bgColor: \"#4f6870\",\r\n stroke: 1,\r\n diameter: 10,\r\n color: \"#1B1B1B\",\r\n selectable: false\r\n , ...attr},\r\n {\r\n coronaWidth: this.setCoronaWidth,\r\n semanticGroup: this.setSemanticGroup,\r\n ...setter},\r\n {\r\n coronaWidth: this.getCoronaWidth,\r\n semanticGroup: this.getSemanticGroup,\r\n ...getter})\r\n\r\n\r\n // status vars for user interaction\r\n //\r\n this.ox = this.x\r\n this.oy = this.y\r\n this.corona = null // draw2d.shape.basic.Circle\r\n this.useGradient = true\r\n\r\n this.preferredConnectionDirection = null\r\n\r\n // current attached connections\r\n this.connections = new draw2d.util.ArrayList()\r\n\r\n\r\n this.moveListener = (emitter, event) => {\r\n this.repaint()\r\n // Falls sich der parent bewegt hat, dann muss der Port dies seinen\r\n // Connections mitteilen\r\n this.fireEvent(\"move\", {figure: this, dx: 0, dy: 0})\r\n }\r\n\r\n this.connectionAnchor = new draw2d.layout.anchor.ConnectionAnchor(this)\r\n\r\n // for dynamic diagrams. A Port can have a value which is set by a connector\r\n //\r\n this.value = null\r\n this.maxFanOut = Number.MAX_SAFE_INTEGER\r\n\r\n // semantic group. Only ports in the same semantic group can be connected\r\n //\r\n this.semanticGroup = \"global\"\r\n\r\n this.setCanSnapToHelper(false)\r\n\r\n // uninstall all default selection policies. This is not required for Ports\r\n this.editPolicy.each((i, policy) => this.uninstallEditPolicy(policy))\r\n\r\n this.installEditPolicy(new draw2d.policy.port.IntrusivePortsFeedbackPolicy())\r\n // this.installEditPolicy(new draw2d.policy.port.ElasticStrapFeedbackPolicy());\r\n\r\n // a port handles the selection handling always by its own, regardless if\r\n // the port is part of an composite, node, group or whatever.\r\n this.portSelectionAdapter = () => this\r\n },\r\n\r\n getSelectionAdapter: function () {\r\n return this.portSelectionAdapter\r\n },\r\n\r\n /**\r\n *\r\n * set the maximal possible count of connections for this port.<br>\r\n * This method didn't delete any connection if you reduce the number and a bunch of\r\n * connection are bounded already.\r\n *\r\n * @param {Number} count the maximal number of connection related to this port\r\n * @returns {this}\r\n */\r\n setMaxFanOut: function (count) {\r\n this.maxFanOut = Math.max(1, count)\r\n this.fireEvent(\"change:maxFanOut\", {value: this.maxFanOut})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * return the maximal possible connections (in+out) for this port.\r\n *\r\n * @returns {Number}\r\n */\r\n getMaxFanOut: function () {\r\n return this.maxFanOut\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the semantic group of this port. Only ports in the same semantic group\r\n * can be connected.\r\n *\r\n * The default for all ports is \"global\"\r\n *\r\n * @param {String} group the semantic group of this port\r\n * @returns {this}\r\n */\r\n setSemanticGroup: function (group) {\r\n this.semanticGroup = group\r\n this.fireEvent(\"change:semanticGroup\", {value: this.semanticGroup})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the semantic group of this port. Only ports in the same semantic group\r\n * can be connected.\r\n *\r\n * The default for all ports is \"global\"\r\n *\r\n * @returns {String}\r\n */\r\n getSemanticGroup: function () {\r\n return this.semanticGroup\r\n },\r\n\r\n /**\r\n *\r\n * Set the Anchor for this object. An anchor is responsible for the endpoint calculation\r\n * of an connection. just visible representation.\r\n *\r\n * @param {draw2d.layout.anchor.ConnectionAnchor} [anchor] the new source anchor for the connection or \"null\" to use the default anchor.\r\n * @returns {this}\r\n **/\r\n setConnectionAnchor: function (anchor) {\r\n // set some good defaults.\r\n this.connectionAnchor = anchor ?? new draw2d.layout.anchor.ConnectionAnchor()\r\n this.connectionAnchor.setOwner(this)\r\n\r\n // the anchor has changed. In this case all connections needs an change event to recalculate\r\n // the anchor and the routing itself\r\n this.fireEvent(\"move\", {figure: this, dx: 0, dy: 0})\r\n\r\n return this\r\n },\r\n\r\n getConnectionAnchorLocation: function (referencePoint, inquiringConnection) {\r\n return this.connectionAnchor.getLocation(referencePoint, inquiringConnection)\r\n },\r\n\r\n getConnectionAnchorReferencePoint: function (inquiringConnection) {\r\n return this.connectionAnchor.getReferencePoint(inquiringConnection)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the **direction** for the connection in relation to the given port and it's parent.\r\n *\r\n * <p>\r\n * Possible values:\r\n * <ul>\r\n * <li>draw2d.geo.Rectangle.DIRECTION_UP</li>\r\n * <li>draw2d.geo.Rectangle.DIRECTION_RIGHT</li>\r\n * <li>draw2d.geo.Rectangle.DIRECTION_DOWN</li>\r\n * <li>draw2d.geo.Rectangle.DIRECTION_LEFT</li>\r\n * </ul>\r\n * <p>\r\n *\r\n * @param {draw2d.Port} peerPort the counterpart port\r\n *\r\n * @returns {Number} the direction.\r\n */\r\n getConnectionDirection: function (peerPort) {\r\n // return the calculated connection direction if the port didn't have set any\r\n //\r\n if (typeof this.preferredConnectionDirection === \"undefined\" || this.preferredConnectionDirection === null) {\r\n return this.getParent().getBoundingBox().getDirection(this.getAbsolutePosition())\r\n }\r\n\r\n return this.preferredConnectionDirection\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the **direction** for the connection in relation to the given port and it's parent.\r\n *\r\n * <p>\r\n * Possible values:\r\n * <ul>\r\n * <li>up -> 0</li>\r\n * <li>right -> 1</li>\r\n * <li>down -> 2</li>\r\n * <li>left -> 3</li>\r\n * <li>calculated -> null</li>\r\n * </ul>\r\n * <p>\r\n *\r\n * @since 5.2.1\r\n * @param {Number} direction the preferred connection direction.\r\n * @returns {this}\r\n */\r\n setConnectionDirection: function (direction) {\r\n this.preferredConnectionDirection = direction\r\n\r\n // needs an change event to recalculate the route\r\n this.fireEvent(\"move\", {figure: this, dx: 0, dy: 0})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set the locator/layouter of the port. A locator is responsive for the x/y arrangement of the\r\n * port in relation to the parent node.\r\n *\r\n * @param {draw2d.layout.locator.Locator} locator\r\n * @returns {this}\r\n */\r\n setLocator: function (locator) {\r\n this.locator = locator\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the locator/layouter of the port. A locator is responsive for the x/y arrangement of the\r\n * port in relation to the parent node.\r\n *\r\n * @since 4.2.0\r\n */\r\n getLocator: function () {\r\n return this.locator\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the new background color of the figure. It is possible to hands over\r\n * <code>null</code> to set the background transparent.\r\n *\r\n * @param {draw2d.util.Color|String} color The new background color of the figure\r\n * @returns {this}\r\n **/\r\n setBackgroundColor: function (color) {\r\n this.lighterBgColor = new draw2d.util.Color(color).lighter(0.3).hash()\r\n this._super(color)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set a value for the port. This is useful for interactive/dynamic diagrams like circuits, simulator,...\r\n *\r\n * @param {Object} value the new value for the port. Can be \"undefined\" or \"null\"\r\n * @returns {this}\r\n */\r\n setValue: function (value) {\r\n\r\n if (value === this.value) {\r\n return this\r\n }\r\n let old = this.value\r\n this.value = value\r\n\r\n this.getParent()?.onPortValueChanged(this)\r\n \r\n this.fireEvent(\"change:value\", {value: this.value, old: old})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the user defined value of the port.\r\n *\r\n * @returns {Object}\r\n */\r\n getValue: function () {\r\n return this.value\r\n },\r\n\r\n /**\r\n * @private\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n // a port did have the 0/0 coordinate in the center and not in the top/left corner\r\n //\r\n attributes.cx = this.getAbsoluteX()\r\n attributes.cy = this.getAbsoluteY()\r\n attributes.rx = this.width / 2\r\n attributes.ry = attributes.rx\r\n attributes.cursor = \"move\"\r\n\r\n if (this.getAlpha() < 0.9 || this.useGradient === false) {\r\n attributes.fill = this.bgColor.rgba()\r\n } else {\r\n attributes.fill = [\"90\", this.bgColor.hash(), this.lighterBgColor].join(\"-\")\r\n }\r\n\r\n this._super(attributes)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n **/\r\n onMouseEnter: function () {\r\n this._oldstroke = this.getStroke()\r\n this.setStroke(2)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n **/\r\n onMouseLeave: function () {\r\n this.setStroke(this._oldstroke)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns a {@link draw2d.util.ArrayList} of {@link draw2d.Connection}s of all related connections to this port.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getConnections: function () {\r\n return this.connections\r\n },\r\n\r\n\r\n /**\r\n * @private\r\n */\r\n setParent: function (parent) {\r\n this.parent?.off(this.moveListener)\r\n\r\n this._super(parent)\r\n\r\n this.parent?.on(\"move\", this.moveListener)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the corona width of the Port. The corona width will be used during the\r\n * drag&drop of a port.\r\n *\r\n * @returns {Number}\r\n **/\r\n getCoronaWidth: function () {\r\n return this.coronaWidth\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the corona width of the Port. The corona width will be used during the\r\n * drag&drop of a port. You can drop a port in the corona of this port to create\r\n * a connection. It is not necessary to drop exactly on the port.\r\n *\r\n * @param {Number} width The new corona width of the port\r\n * @returns {this}\r\n **/\r\n setCoronaWidth: function (width) {\r\n this.coronaWidth = width\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean}\r\n * @private\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n // just allow the DragOperation if the port didn't have reached the max fanOut\r\n // limit.\r\n if (this.getConnections().getSize() >= this.maxFanOut) {\r\n return false\r\n }\r\n\r\n// this.getShapeElement().insertAfter(this.parent.getShapeElement());\r\n // don't call the super method. This creates a command and this is not necessary for a port\r\n this.ox = this.x\r\n this.oy = this.y\r\n\r\n let canStartDrag = true\r\n\r\n // notify all installed policies\r\n //\r\n this.editPolicy.each( (i, e)=> {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n // DragStart operation can send a veto for the dragStart\r\n // @since 6.1.0\r\n canStartDrag = canStartDrag && e.onDragStart(this.canvas, this, x, y, shiftKey, ctrlKey)\r\n }\r\n })\r\n\r\n return canStartDrag\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n *\r\n * @private\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n // TODO: warum wurde diese methode überschrieben?!\r\n this._super(dx, dy)\r\n },\r\n\r\n\r\n /**\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @private\r\n **/\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n // Don't call the parent implementation. This will create an CommandMove object\r\n // and store them o the CommandStack for the undo operation. This makes no sense for a\r\n // port.\r\n // draw2d.shape.basic.Rectangle.prototype.onDragEnd.call(this); DON'T call the super implementation!!!\r\n\r\n this.setAlpha(1.0)\r\n\r\n // 1.) Restore the old Position of the node\r\n //\r\n this.setPosition(this.ox, this.oy)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the user drop this element onto the dropTarget\r\n *\r\n * @param {draw2d.Figure} dropTarget The drop target.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @@private\r\n **/\r\n onDrop: function (dropTarget, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method if a new connection has created with this port\r\n *\r\n * // Alternatively you register for this event with:\r\n * port.on(\"connect\", function(emitterPort, connection){\r\n * alert(\"port connected\");\r\n * });\r\n *\r\n * @param {draw2d.Connection} connection The connection which has been created\r\n * @since 2.5.1\r\n *\r\n * @template\r\n **/\r\n onConnect: function (connection) {\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if a new connection has created with this port\r\n *\r\n * // Alternatively you register for this event with:\r\n * port.on(\"connect\", function(emitterPort, connection){\r\n * alert(\"port disconnected\");\r\n * });\r\n *\r\n * @param {draw2d.Connection} connection The connection which has been deleted\r\n * @since 2.5.1\r\n *\r\n * @template\r\n **/\r\n onDisconnect: function (connection) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the name of this port.\r\n *\r\n * @returns {String}\r\n **/\r\n getName: function () {\r\n return this.name\r\n },\r\n\r\n /**\r\n *\r\n * Set the name of this port. The name of the port can be referenced by the lookup of\r\n * ports in the node.\r\n *\r\n *\r\n * @param {String} name The new name of this port.\r\n * @returns {this}\r\n **/\r\n setName: function (name) {\r\n this.name = name\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Hit test for ports. This method respect the corona diameter of the port for the hit test.\r\n * The corona width can be set with {@link draw2d.Port#setCoronaWidth}\r\n *\r\n * @param {Number} iX\r\n * @param {Number} iY\r\n * @param {Number} [corona]\r\n * @returns {Boolean}\r\n */\r\n hitTest: function (iX, iY, corona) {\r\n let x = this.getAbsoluteX() - this.coronaWidth - this.getWidth() / 2\r\n let y = this.getAbsoluteY() - this.coronaWidth - this.getHeight() / 2\r\n let iX2 = x + this.getWidth() + (this.coronaWidth * 2)\r\n let iY2 = y + this.getHeight() + (this.coronaWidth * 2)\r\n\r\n return (iX >= x && iX <= iX2 && iY >= y && iY <= iY2)\r\n },\r\n\r\n /**\r\n *\r\n * Highlight this port\r\n *\r\n * @param {Boolean} flag indicator if the figure should glow.\r\n * @returns {this}\r\n */\r\n setGlow: function (flag) {\r\n if (flag === true && this.corona === null) {\r\n this.corona = new draw2d.Corona()\r\n this.corona.setDimension(this.getWidth() + (this.getCoronaWidth() * 2), this.getWidth() + (this.getCoronaWidth() * 2))\r\n this.corona.setPosition(this.getAbsoluteX() - this.getCoronaWidth() - this.getWidth() / 2, this.getAbsoluteY() - this.getCoronaWidth() - this.getHeight() / 2)\r\n\r\n this.corona.setCanvas(this.getCanvas())\r\n\r\n // important inital\r\n this.corona.getShapeElement()\r\n this.corona.repaint()\r\n } else if (flag === false && this.corona !== null) {\r\n this.corona.setCanvas(null)\r\n this.corona = null\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the diameter of the port. The center of the circle will be retained.\r\n *\r\n * @param {Number} d The new diameter of the circle.\r\n * @since 4.0.0\r\n * @returns {this}\r\n **/\r\n setDiameter: function (d) {\r\n //let center = this.getCenter()\r\n this.setDimension(d, d)\r\n // the port has its center in the middle. In this case there is no need to shift the center of the circle\r\n // like it is done in the base implementation.\r\n //this.setCenter(center)\r\n this.fireEvent(\"change:diameter\", {value: d})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createCommand: function (request) {\r\n // the port has its own implementation of the CommandMove\r\n //\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE) {\r\n if (!this.isDraggable()) {\r\n return null\r\n }\r\n return new draw2d.command.CommandMovePort(this)\r\n }\r\n\r\n return null\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called from the figure itself when any position changes happens. All listener\r\n * will be informed.\r\n * <br>\r\n * DON'T fire this event if the Port is during a Drag&Drop operation. This can happen\r\n * if we try to connect two ports\r\n *\r\n * @private\r\n **/\r\n fireEvent: function (event, args) {\r\n if (this.isInDragDrop === true && event !== \"drag\") {\r\n return\r\n }\r\n\r\n this._super(event, args)\r\n },\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @return {Object} all attributes required for the persistency\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.maxFanOut = this.maxFanOut\r\n memento.name = this.name\r\n memento.semanticGroup = this.semanticGroup\r\n\r\n // defined by the locator. Don't persist\r\n //\r\n delete memento.x\r\n delete memento.y\r\n\r\n // ports didn't have children ports. In this case we\r\n // delete this attribute as well to avoid confusions.\r\n //\r\n delete memento.ports\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.maxFanOut !== \"undefined\") {\r\n // Big bug in the past.\r\n // I used Number.MAX_VALUE as maxFanOut which is 1.7976931348623157e+308\r\n // parseInt creates \"1\" during the reading of the JSON - which is crap.\r\n // BIG BIG BUG!!! my fault.\r\n // Now check if the memento.maxFanOut is a number and take this without crappy parsing.\r\n if (typeof memento.maxFanOut === \"number\") {\r\n this.maxFanOut = memento.maxFanOut\r\n } else {\r\n this.maxFanOut = Math.max(1, parseInt(memento.maxFanOut))\r\n }\r\n }\r\n\r\n if (typeof memento.name !== \"undefined\") {\r\n this.setName(memento.name)\r\n }\r\n\r\n if (typeof memento.semanticGroup !== \"undefined\") {\r\n this.setSemanticGroup(memento.semanticGroup)\r\n }\r\n\r\n return this\r\n }\r\n })\r\n\r\n\r\n/**\r\n * @class\r\n * Glow effect for ports. Just for internal use.\r\n *\r\n * @private\r\n * @extend draw2d.shape.basic.Circle\r\n */\r\ndraw2d.Corona = draw2d.shape.basic.Circle.extend(\r\n /** @lends draw2d.shape.basic.Circle.prototype */\r\n {\r\n\r\n init: function () {\r\n this._super()\r\n this.setAlpha(0.3)\r\n this.setBackgroundColor(new draw2d.util.Color(178, 225, 255))\r\n this.setColor(new draw2d.util.Color(102, 182, 252))\r\n },\r\n\r\n /**\r\n *\r\n * the the opacity of the element.\r\n *\r\n * @param {Number} percent\r\n */\r\n setAlpha: function (percent) {\r\n this._super(Math.min(0.3, percent))\r\n this.setDeleteable(false)\r\n this.setDraggable(false)\r\n this.setResizeable(false)\r\n this.setSelectable(false)\r\n\r\n return this\r\n }\r\n })\r\n","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n * The Resizehandles for Figures.\r\n\r\n * <pre>\r\n * Possible Type:\r\n *\r\n * 1 2 3\r\n * O-----------O-------------O\r\n * | |\r\n * | |\r\n * 8 O + 9 O 4\r\n * | |\r\n * | |\r\n * O-----------O-------------O\r\n * 7 6 5\r\n * </pre>\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.ResizeHandle = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.ResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.ResizeHandle\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {draw2d.Figure} the owner if the resize handle\r\n * @param {Number} type the type of the ResizeHandle.\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.zoomCallback = ()=> {\r\n this.attr({\r\n width: this.origWidth*this.getCanvas().getZoom(),\r\n height: this.origHeight*this.getCanvas().getZoom(),\r\n radius: this.origRadius*this.getCanvas().getZoom(),\r\n stroke: this.origStroke*this.getCanvas().getZoom()\r\n })\r\n\r\n // size of the ResizeHandle has changed. Force a reposition of handle\r\n //\r\n if(!this.blockEvent)\r\n this.owner.fireEvent(\"move\",{})\r\n }\r\n\r\n this._super(\r\n {\r\n // set some good defaults\r\n bgColor: \"#FDFDFD\",\r\n stroke: 0.5,\r\n width:10,\r\n height:10,\r\n minWidth:0.3,\r\n minHeight:0.3,\r\n color: \"#a0a0a0\",\r\n radius: 1,\r\n selectable:false\r\n // and allow to override them\r\n , ...attr},\r\n {\r\n owner : this.setOwner,\r\n type : this.setType,\r\n ...setter},\r\n {\r\n owner : this.getOwner,\r\n type : this.getType,\r\n ...getter})\r\n\r\n // required in the SelectionEditPolicy to indicate the type of figure\r\n // which the user clicks\r\n this.isResizeHandle = true\r\n\r\n this.command = null\r\n this.commandMove = null\r\n this.commandResize = null\r\n this.useGradient = true\r\n\r\n\r\n this.origRadius = this.radius\r\n this.origWidth = this.width\r\n this.origHeight = this.height\r\n this.origStroke = this.stroke\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The edge of the rectangle for the snapTo mechanism.\r\n *\r\n * @return {draw2d.SnapToHelper} enum of the direction (NORTH, NORTH_WEST, EAST,...)\r\n */\r\n getSnapToDirection: function () {\r\n switch (this.type) {\r\n case 1:\r\n return draw2d.SnapToHelper.NORTH_WEST\r\n case 2:\r\n return draw2d.SnapToHelper.NORTH\r\n case 3:\r\n return draw2d.SnapToHelper.NORTH_EAST\r\n case 4:\r\n return draw2d.SnapToHelper.EAST\r\n case 5:\r\n return draw2d.SnapToHelper.SOUTH_EAST\r\n case 6:\r\n return draw2d.SnapToHelper.SOUTH\r\n case 7:\r\n return draw2d.SnapToHelper.SOUTH_WEST\r\n case 8:\r\n return draw2d.SnapToHelper.WEST\r\n case 9:\r\n return draw2d.SnapToHelper.NSEW\r\n default:\r\n return draw2d.SnapToHelper.EAST\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n this.shape = this._super()\r\n\r\n this.shape.node.setAttribute(\"type\", this.type)\r\n this.updateCursor(this.shape)\r\n\r\n return this.shape\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the current used SVG as string\r\n *\r\n * @returns {String}\r\n */\r\n getOwner: function()\r\n {\r\n return this.owner;\r\n },\r\n\r\n setOwner: function( owner){\r\n this.owner = owner\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the current used SVG as string\r\n *\r\n * @returns {String}\r\n */\r\n getType: function()\r\n {\r\n return this.type;\r\n },\r\n\r\n setType: function( type){\r\n this.type = type\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * calculate and set the cursor of the reize handle\r\n * @private\r\n */\r\n updateCursor: function (shape) {\r\n if (shape === null) {\r\n return this\r\n }\r\n\r\n if (this.isDraggable() === false) {\r\n shape.attr({\"cursor\": \"default\"})\r\n return this\r\n }\r\n\r\n /*\r\n * 1 2 3\r\n * O-----------O-------------O\r\n * | |\r\n * | |\r\n * 8 O + 9 O 4\r\n * | |\r\n * | |\r\n * O-----------O-------------O\r\n * 7 6 5\r\n */\r\n switch (this.type) {\r\n case 1:\r\n shape.attr({\"cursor\": \"nw-resize\"})\r\n break\r\n case 2:\r\n shape.attr({\"cursor\": \"n-resize\"})\r\n break\r\n case 3:\r\n shape.attr({\"cursor\": \"ne-resize\"})\r\n break\r\n case 4:\r\n shape.attr({\"cursor\": \"e-resize\"})\r\n break\r\n case 5:\r\n shape.attr({\"cursor\": \"se-resize\"})\r\n break\r\n case 6:\r\n shape.attr({\"cursor\": \"s-resize\"})\r\n break\r\n case 7:\r\n shape.attr({\"cursor\": \"sw-resize\"})\r\n break\r\n case 8:\r\n shape.attr({\"cursor\": \"w-resize\"})\r\n break\r\n default:\r\n shape.attr({\"cursor\": \"move\"})\r\n break\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the draggable flag of the resize handle and update the cursor of the shape in relation\r\n * to the type of resize handle. north, south,west,..\r\n *\r\n * @param flag\r\n * @returns {this}\r\n */\r\n setDraggable: function (flag) {\r\n this._super(flag)\r\n this.updateCursor(this.shape)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Will be called if the drag and drop action beginns. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true whenever the drag drop operation is allowed.\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n // This happens if the selected figure has set the \"nonResizeable\" flag\r\n // In this case the ResizeHandle can't be dragged. => no resize\r\n //\r\n if (!this.isDraggable()) {\r\n return false\r\n }\r\n\r\n this.ox = this.getAbsoluteX()\r\n this.oy = this.getAbsoluteY()\r\n\r\n this.commandMove = this.owner.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE))\r\n this.commandResize = this.owner.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.RESIZE))\r\n\r\n return true\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework if the figure is moved by user interaction.\r\n *\r\n * @param {Number} dx the move x offset\r\n * @param {Number} dy the move y offset\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n */\r\n onDrag: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n if (this.isDraggable() === false) {\r\n return\r\n }\r\n\r\n let oldX = this.getAbsoluteX()\r\n let oldY = this.getAbsoluteY()\r\n\r\n // call the super.drag method with all snapTo### handler and adjustments\r\n this._super(dx, dy, dx2, dy2)\r\n\r\n let diffX = this.getAbsoluteX() - oldX\r\n let diffY = this.getAbsoluteY() - oldY\r\n\r\n let obj = this.owner\r\n let objPosX = obj.getAbsoluteX()\r\n let objPosY = obj.getAbsoluteY()\r\n let objWidth = obj.getWidth()\r\n let objHeight = obj.getHeight()\r\n\r\n let newX = null\r\n let newY = null\r\n let corrPos = null\r\n /*\r\n * 1 2 3\r\n * O-----------O-------------O\r\n * | |\r\n * | |\r\n * 8 O + 9 O 4\r\n * | |\r\n * | |\r\n * O-----------O-------------O\r\n * 7 6 5\r\n */\r\n switch (this.type) {\r\n case 1:\r\n obj.setDimension(objWidth - diffX, objHeight - diffY)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY)\r\n break\r\n case 2:\r\n obj.setDimension(objWidth, objHeight - diffY)\r\n newX = objPosX\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY)\r\n break\r\n case 3:\r\n obj.setDimension(objWidth + diffX, objHeight - diffY)\r\n newX = objPosX\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY)\r\n break\r\n case 4:\r\n obj.setDimension(objWidth + diffX, objHeight)\r\n break\r\n case 5:\r\n obj.setDimension(objWidth + diffX, objHeight + diffY)\r\n break\r\n case 6:\r\n obj.setDimension(objWidth, objHeight + diffY)\r\n break\r\n case 7:\r\n obj.setDimension(objWidth - diffX, objHeight + diffY)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY\r\n obj.setPosition(newX, newY)\r\n break\r\n case 8:\r\n obj.setDimension(objWidth - diffX, objHeight)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY\r\n obj.setPosition(newX, newY)\r\n break\r\n }\r\n\r\n if (newX !== null) {\r\n // may the setPosition has changed regarding any constraint or edit policies. In this case\r\n // we must adjust the dimension with the related correction\r\n //\r\n corrPos = obj.getPosition()\r\n if (corrPos.x !== newX || corrPos.y !== newY) {\r\n obj.setDimension(obj.getWidth() - (corrPos.x - newX), obj.getHeight() - (corrPos.y - newY))\r\n }\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Will be called after a drag and drop action.<br>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n if (!this.isDraggable()) {\r\n return\r\n }\r\n\r\n // An non draggable resizeHandle doesn't create a move/resize command.\r\n // This happens if the selected figure has set the \"nonResizeable\" flag.\r\n //\r\n if (this.commandMove !== null) {\r\n this.commandMove.setPosition(this.owner.getX(), this.owner.getY())\r\n this.canvas.getCommandStack().execute(this.commandMove)\r\n this.commandMove = null\r\n }\r\n\r\n if (this.commandResize !== null) {\r\n this.commandResize.setDimension(this.owner.getWidth(), this.owner.getHeight())\r\n this.canvas.getCommandStack().execute(this.commandResize)\r\n this.commandResize = null\r\n }\r\n },\r\n\r\n /**\r\n * Set the position of the object.<br>\r\n * The ResizeHandle overrides the Figure.setPosition method. The base\r\n * class updates the resize handles during the update of the Dimension/Position. This\r\n * is not neccessary for the ResizeHandles. Performance issue.\r\n *\r\n * @param {Number|draw2d.geo.Point} x The new x coordinate of the figure\r\n * @param {Number} y The new y coordinate of the figure\r\n **/\r\n setPosition: function (x, y) {\r\n // don't call base implementation. Base implementation will show\r\n // ResizeHandles...but I'm the ResizeHandle\r\n if (x instanceof draw2d.geo.Point) {\r\n this.x = x.x\r\n this.y = x.y\r\n }\r\n else {\r\n this.x = x\r\n this.y = y\r\n }\r\n\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n // performance improvement by setting the coordinates direct.\r\n this.shape.attr({x: this.x, y: this.y})\r\n\r\n this.applyTransformation()\r\n },\r\n\r\n /**\r\n *\r\n * Set the new dimension of the the ResizeHandle. If you didn't pass any width/height the best default for the\r\n * platform will be used.\r\n *\r\n * Additional the \"snapTo\" anchor is re-calculated in relation to the type of ResizeHandle\r\n *\r\n * @param {Number} [width] new width of the resize handle\r\n * @param {Number} [height] new width of the resize handle\r\n */\r\n setDimension: function (width, height) {\r\n\r\n if (typeof height !== \"undefined\") {\r\n this._super(width, height)\r\n }\r\n else {\r\n if (draw2d.isTouchDevice) {\r\n this._super(15, 15)\r\n }\r\n else {\r\n this._super(8, 8)\r\n }\r\n }\r\n\r\n\r\n let offset = this.getWidth()\r\n let offset2 = offset / 2\r\n\r\n switch (this.type) {\r\n case 1:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset, offset))\r\n break\r\n case 2:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset2, offset))\r\n break\r\n case 3:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(0, offset))\r\n break\r\n case 4:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(0, offset2))\r\n break\r\n case 5:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(0, 0))\r\n break\r\n case 6:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset2, 0))\r\n break\r\n case 7:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset, 0))\r\n break\r\n case 8:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset, offset2))\r\n break\r\n case 9:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset2, offset2))\r\n break\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Show the ResizeHandle and add it to the canvas.<br>\r\n * Additional bring it in to the front of other figures if we didn't use\r\n * an overlayCanvas.\r\n *\r\n * If the ResizeHandle is place inside an overlayCanvas it is automatically on top.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to use\r\n **/\r\n show: function (canvas) {\r\n // don't call the parent function. The parent functions delete this object\r\n // and a resize handle can't be deleted.\r\n this.setCanvas(canvas)\r\n\r\n this.canvas.resizeHandles.add(this)\r\n this.shape.insertAfter(this.owner.getShapeElement())\r\n\r\n try{\r\n this.blockEvent=true\r\n this.zoomCallback()\r\n }\r\n finally{\r\n this.blockEvent=false\r\n }\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Hide the resize handle and remove it from the canvas.\r\n *\r\n **/\r\n hide: function () {\r\n // don't call the parent function. The parent functions delete this object\r\n // and a resize handle shouldn't be deleted.\r\n if (this.shape === null) {\r\n return\r\n }\r\n\r\n this.canvas.resizeHandles.remove(this)\r\n this.setCanvas(null)\r\n\r\n return this\r\n },\r\n\r\n setCanvas: function (canvas) {\r\n\r\n if(this.canvas!==null){\r\n this.canvas.off(this.zoomCallback);\r\n }\r\n\r\n this._super(canvas)\r\n\r\n if(this.canvas!==null){\r\n this.canvas.on(\"zoom\", this.zoomCallback);\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Set the new background color of the figure. It is possible to hands over\r\n * <code>null</code> to set the background transparent.\r\n *\r\n * @param {draw2d.util.Color} color The new background color of the figure\r\n **/\r\n setBackgroundColor: function (color) {\r\n color = new draw2d.util.Color(color)\r\n\r\n this.bgGradient = \"90-\" + color.darker(0.2).hash() + \"-\" + color.hash()\r\n this._super(color)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n if (this.bgColor.hash() === \"none\") {\r\n attributes.fill = \"none\"\r\n }\r\n else if (this.getAlpha() < 0.9 || this.useGradient === false) {\r\n attributes.fill = this.bgColor.rgba()\r\n }\r\n else {\r\n attributes.fill = this.bgGradient\r\n }\r\n\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n *\r\n * return true if the element can be used in combination with the\r\n * SnapToHelper feature.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n supportsSnapToHelper: function () {\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Override this method and redirect them to the cavas. A ResizeHandle didn't support\r\n * Keyboard interaction at the moment.\r\n *\r\n * @param {Number} keyCode the id of the pressed key\r\n * @param {Boolean} ctrl true if the user has pressed the CTRL/STRG key as well.\r\n **/\r\n onKeyDown: function (keyCode, ctrl) {\r\n // don't call the parent function. The parent functions delete this object\r\n // and a resize handle can't be deleted.\r\n this.canvas.onKeyDown(keyCode, ctrl)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n fireEvent: function (event, args) {\r\n // A resizeHandle doesn't fire this event.\r\n // Normally this set the document dirty. This is not necessary for a ResizeHandle.\r\n }\r\n})\r\n\r\n","\r\nimport draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n * Abstract class which can handle plain SVG content.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.SetFigure\r\n */\r\ndraw2d.SVGFigure = draw2d.SetFigure.extend(\r\n /** @lends draw2d.SVGFigure.prototype */\r\n {\r\n \r\n NAME: \"draw2d.SVGFigure\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this.svg = null\r\n this._super(\r\n attr,\r\n {\r\n svg : this.setSVG,\r\n ...setter},\r\n {\r\n svg : this.getSVG,\r\n ...getter}\r\n )\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createSet: function()\r\n {\r\n // legacy behaviour. Legacy code of Draw2D didn't have the \"svg\" attribute.\r\n // in this case we must call the overridden method \"getSVG\" to retrieve the SVG from inherit\r\n // the inherit class.\r\n //\r\n this.svg ??= this.getSVG()\r\n\t\treturn this.importSVG(this.canvas, this.svg)\r\n\t},\r\n\r\n /**\r\n * \r\n * Returns the current used SVG as string\r\n * @returns {String}\r\n */\r\n getSVG: function()\r\n {\r\n return this.svg\r\n },\r\n\r\n /**\r\n * \r\n * Set the SVG of this shape\r\n *\r\n * @param {String} svg The new SVG to render as String\r\n * @param {Number} [duration] the optional duration for the change of the SVG of the figure\r\n *\r\n * @returns {draw2d.SVGFigure}\r\n */\r\n setSVG: function(svg, duration)\r\n {\r\n this.svg = svg\r\n\r\n // SVG has changed. Update the rendering\r\n //\r\n if(this.canvas !==null && this.svgNodes !==null){\r\n let newSVGNodes = this.createSet();\r\n if(!isNaN(parseFloat(duration))) {\r\n newSVGNodes.hide();\r\n newSVGNodes.insertAfter(this.svgNodes);\r\n let oldSVG = this.svgNodes;\r\n this.svgNodes = newSVGNodes;\r\n this.applyTransformation();\r\n oldSVG.forEach(function ( shape) {\r\n $(shape.node).fadeOut(duration, function () {\r\n shape.remove();\r\n });\r\n });\r\n newSVGNodes.forEach(function (shape) {\r\n $(shape.node).fadeIn(duration);\r\n });\r\n }\r\n else {\r\n newSVGNodes.insertAfter(this.svgNodes);\r\n this.svgNodes.remove();\r\n this.svgNodes = newSVGNodes;\r\n this.applyTransformation();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Helper method to transform the SVG string into a raphaelJS set.\r\n *\r\n * @private\r\n */\r\n importSVG : function (canvas, rawSVG)\r\n {\r\n let set = canvas.paper.set()\r\n\r\n try {\r\n if (typeof rawSVG === 'undefined'){\r\n throw 'No data was provided.';\r\n }\r\n\r\n // Override the dimension from the JSON if the SVG contains any\r\n //\r\n let svgDOM= $(rawSVG)\r\n\r\n // set the dimension of the element if the JSON import didn't provide\r\n // a dimension already\r\n //\r\n if(typeof this._dimensionReadFromJSON ===\"undefined\"){\r\n if(svgDOM.attr(\"width\") && svgDOM.attr(\"height\")){\r\n this.setDimension(parseFloat(svgDOM.attr(\"width\")), parseFloat(svgDOM.attr(\"height\")));\r\n }\r\n delete this._dimensionReadFromJSON\r\n }\r\n\r\n let findStyle = new RegExp('([a-z0-9\\-]+) ?: ?([^ ;]+)[ ;]?','gi');\r\n\r\n svgDOM.children().each(function(i,element){\r\n //element = $(element);\r\n let shape=null;\r\n let style=null;\r\n let attr = { };\r\n let node = element.tagName;\r\n\r\n // remove the namespace of the node if existing. This can happen in IE8\r\n //\r\n let index = node.indexOf(\":\");\r\n if(index != -1)\r\n node = node.substr(index+1);\r\n\r\n // map some element to Raphael specifix attributes or ignore some unknown attributes\r\n //\r\n $(element.attributes).each(function() {\r\n switch(this.nodeName) {\r\n case 'stroke-dasharray':\r\n attr[this.nodeName] = '- ';\r\n break;\r\n case 'style':\r\n style = this.nodeValue;\r\n break;\r\n case 'id':\r\n case 'xml:space':\r\n // just to ignore\r\n break;\r\n default:\r\n if(this.value){\r\n attr[this.nodeName] = this.value;\r\n }\r\n else{\r\n // @deprecated\r\n attr[this.nodeName] = this.nodeValue;\r\n }\r\n break;\r\n }\r\n });\r\n\r\n\r\n if ( style !== null){\r\n while(findStyle.exec(style)){\r\n attr[RegExp.$1] = RegExp.$2;\r\n }\r\n }\r\n\r\n // set some good defaults if the element didn't provide a stroke-width but has a \"stroke\" attribute\r\n //\r\n if (typeof attr['stroke-width'] === 'undefined'){\r\n attr['stroke-width'] = (typeof attr.stroke === 'undefined' ? 0 : 1.2);\r\n }\r\n\r\n switch(node) {\r\n case 'rect':\r\n shape = canvas.paper.rect();\r\n\r\n // transfer rx-SVG attribute to the \"r\" attribute of raphael\r\n if(typeof attr[\"rx\"]!==\"undefined\") {\r\n attr.r = parseInt(attr.rx);\r\n delete attr.rx;\r\n }\r\n break;\r\n case 'circle':\r\n shape = canvas.paper.circle();\r\n break;\r\n case 'ellipse':\r\n shape = canvas.paper.ellipse();\r\n break;\r\n case 'path':\r\n attr.fill =\"none\";\r\n shape = canvas.paper.path(attr.d);\r\n break;\r\n case 'line':\r\n attr.d= \"M \"+attr.x1+\" \"+attr.y1+\"L\"+attr.x2+\" \"+attr.y2;\r\n attr.fill =\"none\";\r\n shape = canvas.paper.path(attr.d);\r\n break;\r\n case 'polyline':\r\n let path = attr.points;\r\n attr.d = \"M \"+path.replace(\" \",\" L\");\r\n shape = canvas.paper.path(attr.d);\r\n break;\r\n case 'polygon':\r\n shape = canvas.paper.polygon(attr.points);\r\n break;\r\n case 'image':\r\n shape = canvas.paper.image();\r\n break;\r\n case 'tspan':\r\n case 'text':\r\n if(element.childNodes.length>0){\r\n let child = element.firstChild;\r\n do {\r\n switch(child.nodeType){\r\n case 2://ATTRIBUTE_NODE\r\n case 4://CDATA_SECTION_NODE\r\n case 5://ENTITY_REFERENCE_NODE\r\n case 6://ENTITY_NODE\r\n case 7://PROCESSING_INSTRUCTION_NODE\r\n case 8://COMMENT_NODE\r\n case 9://DOCUMENT_NODE\r\n case 10://DOCUMENT_TYPE_NODE\r\n case 11://DOCUMENT_FRAGMENT_NODE\r\n case 12://NOTATION_NODE\r\n return;\r\n case 3://TEXT_NODE\r\n \t // redirect to the parent node if we found a simple TEXT without any attributes\r\n \tchild = element;\r\n \tbreak;\r\n case 1://ELEMENT_NODE\r\n }\r\n let subShape = canvas.paper.text(0,0,$(child).text());\r\n let subAttr ={\"x\":parseFloat(child.attributes.x.value), \"y\":parseFloat(child.attributes.y.value)};\r\n subAttr[\"text-anchor\"] = \"start\";\r\n if(typeof child.attributes[\"text-anchor\"]!==\"undefined\"){\r\n subAttr[\"text-anchor\"] = child.attributes[\"text-anchor\"].value;\r\n }\r\n else if(typeof attr[\"text-anchor\"]!==\"undefined\"){\r\n subAttr[\"text-anchor\"] = attr[\"text-anchor\"];\r\n }\r\n\r\n if(typeof child.attributes[\"font-size\"]!==\"undefined\"){\r\n subAttr[\"font-size\"] = parseInt(child.attributes[\"font-size\"].value);\r\n }\r\n else if(typeof attr[\"font-size\"]!==\"undefined\"){\r\n // inherit the font size from the parent node\r\n subAttr[\"font-size\"] = parseInt(attr[\"font-size\"]);\r\n }\r\n\r\n if(typeof child.attributes[\"font-family\"]!==\"undefined\"){\r\n subAttr[\"font-family\"] = child.attributes[\"font-family\"].value;\r\n }\r\n else if(typeof attr[\"font-family\"]!==\"undefined\"){\r\n // inherit the font size from the parent node\r\n subAttr[\"font-family\"] = attr[\"font-family\"];\r\n }\r\n\r\n subAttr[\"fill\"] = \"#000000\";\r\n if(typeof child.attributes[\"fill\"]!==\"undefined\"){\r\n subAttr[\"fill\"] = child.attributes[\"fill\"].value;\r\n }\r\n else if(typeof attr[\"fill\"]!==\"undefined\"){\r\n // inherit the font size from the parent node\r\n subAttr[\"fill\"] = attr[\"fill\"];\r\n }\r\n\r\n subAttr.y= subAttr.y+subShape.getBBox().height/2;\r\n\r\n subShape.attr(subAttr);\r\n set.push(subShape);\r\n child = child.nextSibling;\r\n\r\n }while(child && child.nodeType === 3); // 3= TEXT_NODE\r\n }\r\n else{\r\n shape = canvas.paper.text(0,0,$(element).html());\r\n if(typeof attr[\"fill\"]===\"undefined\")\r\n attr[\"fill\"] = \"#000000\";\r\n if(typeof attr[\"text-anchor\"]===\"undefined\")\r\n attr[\"text-anchor\"] = \"start\";\r\n if(typeof attr[\"font-size\"]!==\"undefined\")\r\n attr[\"font-size\"] = parseInt(attr[\"font-size\"]);\r\n if(typeof attr[\"font-family\"]!==\"undefined\")\r\n attr[\"font-family\"] = parseInt(attr[\"font-family\"]);\r\n attr.y= parseFloat(attr.y)+shape.getBBox().height/2;\r\n }\r\n break;\r\n }\r\n if(shape!==null){\r\n shape.attr(attr);\r\n set.push(shape);\r\n }\r\n });\r\n } catch (error) {\r\n alert('The SVG data you entered was invalid! (' + error + ')');\r\n }\r\n\r\n\r\n return set;\r\n },\r\n\r\n /**\r\n * \r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n */\r\n setPersistentAttributes: function(memento)\r\n {\r\n this._super(memento);\r\n\r\n // keep a temp flag to indicate the we have read the dimension of the\r\n // element from the JSON struct. In this case we didn't care about the dimension\r\n // from the SVG data\r\n //\r\n if(typeof memento.width !== \"undefined\"){\r\n this._dimensionReadFromJSON=true;\r\n }\r\n else if(typeof memento.height !== \"undefined\"){\r\n this._dimensionReadFromJSON=true;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n\r\n});\r\n","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Represents the current selection in the canvas. The selection element is a pure passive element which\r\n * manage/store the selection.\r\n *\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.Selection = Class.extend(\r\n /** @lends draw2d.Selection.prototype */\r\n {\r\n\r\n NAME: \"draw2d.Selection\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n */\r\n init: function () {\r\n this.primary = null;\r\n this.all = new draw2d.util.ArrayList();\r\n },\r\n\r\n /**\r\n * \r\n * Reset the current selection\r\n *\r\n */\r\n clear: function () {\r\n this.primary = null;\r\n this.all = new draw2d.util.ArrayList();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Return the primary selection. This can only one figure at once.\r\n *\r\n * @returns {draw2d.Figure} the primary selected figure\r\n */\r\n getPrimary: function () {\r\n return this.primary;\r\n },\r\n\r\n /**\r\n * \r\n * Set the primary selection.\r\n *\r\n * @param {draw2d.Figure} figure The new primary selection\r\n */\r\n setPrimary: function (figure) {\r\n this.primary = figure;\r\n this.add(figure);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Remove the given figure from the selection (primary,all)\r\n *\r\n * @param {draw2d.Figure} figure\r\n */\r\n remove: function (figure) {\r\n this.all.remove(figure);\r\n if (this.primary === figure) {\r\n this.primary = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Add a figure to the selection. No events are fired or update the selection handle. This method just\r\n * add the figure to the internal management data structure.\r\n *\r\n * @param figure\r\n * @private\r\n */\r\n add: function (figure) {\r\n if (figure !== null && !this.all.contains(figure)) {\r\n this.all.add(figure);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n\r\n /**\r\n * \r\n * return true if the given figure part of the selection.\r\n *\r\n * @param {draw2d.Figure} figure The figure to check\r\n * @param {Boolean} [checkDescendant] Check if the figure provided by the argument is a descendant of the selection whether it is a direct child or nested more deeply.\r\n *\r\n * @since 2.2.0\r\n * @returns {Boolean}\r\n */\r\n contains: function (figure, checkDescendant) {\r\n if (checkDescendant) {\r\n for (let i = 0; i < this.all.getSize(); i++) {\r\n let figureToCheck = this.all.get(i);\r\n if (figureToCheck === figure || figureToCheck.contains(figure)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n return this.all.contains(figure);\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return if the selection is empty\r\n *\r\n * @since 4.8.0\r\n */\r\n isEmpty: function () {\r\n return this.all.isEmpty();\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the size of the selection\r\n *\r\n * @since 4.8.0\r\n */\r\n getSize: function () {\r\n return this.all.getSize();\r\n },\r\n\r\n /**\r\n * \r\n * Return the complete selection - including the primary selection.\r\n *\r\n * @param {Boolean} [expand] expand all StrongComposite and WeakComposite to get all figures. Didn't expand any SetFigures or LayoutFigures\r\n * @returns {draw2d.util.ArrayList}\r\n *\r\n */\r\n getAll: function (expand) {\r\n if (expand === true) {\r\n let result = new draw2d.util.ArrayList();\r\n let addRecursive = (figures) => {\r\n result.addAll(figures, true);\r\n figures.each((index, figure) => {\r\n if (figure instanceof draw2d.shape.composite.StrongComposite) {\r\n addRecursive(figure.getAssignedFigures());\r\n }\r\n });\r\n };\r\n addRecursive(this.all);\r\n\r\n return result;\r\n }\r\n\r\n return this.all.clone();\r\n },\r\n\r\n /**\r\n * \r\n * Iterates over the current selection with <b>func</b> as callback handler.\r\n *\r\n * @param {Function} func the callback function to call for each element\r\n * @param {Number} func.i index of the element in iteration\r\n * @param {Object} func.value value of the element in iteration.\r\n * @param {Boolean} [reverse] optional parameter. Iterate the collection reverse if it set to <b>true</b>\r\n */\r\n each: function (func, reverse) {\r\n this.all.each(func, reverse);\r\n\r\n return this;\r\n }\r\n});\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * A SetFigure is a composition of different SVG elements.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.SetFigure = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.SetFigure.prototype */\r\n {\r\n\r\n NAME: \"draw2d.SetFigure\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // collection of SVG DOM nodes\r\n this.svgNodes = null\r\n\r\n this.originalWidth = null\r\n this.originalHeight = null\r\n\r\n this.scaleX = 1\r\n this.scaleY = 1\r\n\r\n this.strokeScale = true // scale the stroke width of the children nodes if the parent resize\r\n\r\n this._super({stroke: 0, bgColor: null, ...attr}, setter, getter)\r\n },\r\n\r\n /**\r\n * \r\n * Set/Reset the canvas for the element.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to use\r\n */\r\n setCanvas: function (canvas) {\r\n // remove the shape if we reset the canvas and the element\r\n // was already drawn\r\n if (canvas === null && this.svgNodes !== null) {\r\n this.svgNodes.remove()\r\n this.svgNodes = null\r\n }\r\n\r\n this._super(canvas)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the css class if the node.\r\n *\r\n * @param {String} cssClass the new css class name of the node\r\n * @since 2.9.0\r\n */\r\n setCssClass: function (cssClass) {\r\n this._super(cssClass)\r\n\r\n if (this.svgNodes === null) {\r\n return this\r\n }\r\n\r\n if (this.cssClass === null) {\r\n this.svgNodes.forEach( (e) => {\r\n e.node.removeAttribute(\"class\")\r\n })\r\n }\r\n else {\r\n this.svgNodes.forEach( (e) => {\r\n e.node.setAttribute(\"class\", cssClass)\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * propagate all attributes like color, stroke,... to the shape element and\r\n * repaint them.\r\n *\r\n * @protected\r\n **/\r\n repaint: function (attributes) {\r\n // repaint can be blocked during deserialization and if the shape\r\n // not part of any canvas.\r\n //\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n if (this.originalWidth !== null) {\r\n this.scaleX = this.width / this.originalWidth\r\n this.scaleY = this.height / this.originalHeight\r\n }\r\n\r\n attributes ??= {}\r\n\r\n this.applyAlpha()\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setVisible: function (flag, duration) {\r\n this._super(flag, duration)\r\n\r\n if (this.svgNodes !== null) {\r\n if (duration) {\r\n if (this.visible === true) {\r\n this.svgNodes.forEach( (shape) =>{\r\n $(shape.node).fadeIn(duration, ()=>shape.show())\r\n })\r\n }\r\n else {\r\n this.svgNodes.forEach( (shape) =>{\r\n $(shape.node).fadeOut(duration, () => shape.hide())\r\n })\r\n }\r\n }\r\n else {\r\n if (this.visible === true) {\r\n this.svgNodes.show()\r\n }\r\n else {\r\n this.svgNodes.hide()\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Apply the opacity to all child set elements. Override this if you want to avoid opacity changes.\r\n * @private\r\n *\r\n */\r\n applyAlpha: function () {\r\n this.svgNodes.attr({opacity: this.alpha})\r\n },\r\n\r\n /**\r\n * @private\r\n */\r\n applyTransformation: function () {\r\n let s =\r\n \"S\" + this.scaleX + \",\" + this.scaleY + \",0,0 \" +\r\n \"R\" + this.rotationAngle + \",\" + ((this.getWidth() / 2) | 0) + \",\" + ((this.getHeight() / 2) | 0) +\r\n \"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY() +\r\n \"\"\r\n this.svgNodes.transform(s)\r\n if (this.rotationAngle === 90 || this.rotationAngle === 270) {\r\n let before = this.svgNodes.getBBox(true)\r\n let ratio = before.height / before.width\r\n let reverseRatio = before.width / before.height\r\n let rs = \"...S\" + ratio + \",\" + reverseRatio + \",\" + (this.getAbsoluteX() + this.getWidth() / 2) + \",\" + (this.getAbsoluteY() + this.getHeight() / 2)\r\n this.svgNodes.transform(rs)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. Additional\r\n * the internal model changed as well.\r\n *\r\n * Optional: Inserts current object in front of the given one.\r\n *\r\n * @param {draw2d.Figure} [figure] move current object in front of the given one.\r\n * @since 3.0.0\r\n */\r\n toFront: function (figure) {\r\n ////////////////////////////////////////////////////////////////////\r\n // NOTE: the code has a complete different order of draw2d.Figure.\r\n // we must respect the svgNodes here\r\n ////////////////////////////////////////////////////////////////////\r\n\r\n // ensure that the z-oder is still correct if the figure is assigned\r\n // to a StrongComposite\r\n //\r\n if (this.composite instanceof draw2d.shape.composite.StrongComposite && (typeof figure !== \"undefined\")) {\r\n let indexFigure = figure.getZOrder()\r\n let indexComposite = this.composite.getZOrder()\r\n if (indexFigure < indexComposite) {\r\n figure = this.composite\r\n }\r\n }\r\n\r\n if (typeof figure === \"undefined\") {\r\n // bring the outer frame in front...\r\n this.getShapeElement().toFront()\r\n\r\n // and all inner children\r\n //\r\n this.svgNodes?.toFront()\r\n\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n figures.add(this)\r\n } else if (lines.remove(this) !== null) {\r\n lines.add(this)\r\n }\r\n }\r\n }\r\n else {\r\n // Bring the SVG shapes between the \"figure\" and the container of this shape\r\n //\r\n if (this.svgNodes !== null) {\r\n this.svgNodes.insertAfter(figure.getTopLevelShapeElement())\r\n }\r\n this.getShapeElement().insertAfter(figure.getTopLevelShapeElement())\r\n\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n let index = figures.indexOf(figure)\r\n figures.insertElementAt(this, index + 1)\r\n } else if (lines.remove(this) !== null) {\r\n lines.add(this)\r\n }\r\n }\r\n }\r\n\r\n\r\n // bring all children in front of the parent\r\n //\r\n this.children.each(function (i, child) {\r\n child.figure.toFront(figure)\r\n })\r\n\r\n // the ports are always on top\r\n //\r\n let _this = this\r\n this.getPorts().each(function (i, port) {\r\n port.getConnections().each(function (i, connection) {\r\n connection.toFront(figure)\r\n })\r\n // a port should always be in front of the shape doesn't matter what the\r\n // \"figure\" parameter says.\r\n //\r\n port.toFront(_this)\r\n })\r\n\r\n // and last but not lease the ResizeHandles if any present\r\n //\r\n this.selectionHandles.each(function (i, handle) {\r\n handle.toFront()\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Moves the element to the background. Additional\r\n * the internal model changed as well.\r\n *\r\n * Optional: Inserts current object in front of the given one.\r\n *\r\n * @param {draw2d.Figure} [figure] move current object in front of the given one.\r\n * @since 4.7.2\r\n */\r\n toBack: function (figure) {\r\n // it is not allowed that a figure is behind the assigned composite\r\n //\r\n if (this.composite instanceof draw2d.shape.composite.StrongComposite) {\r\n this.toFront(this.composite)\r\n return\r\n }\r\n\r\n // sort the JSON Doc\r\n //\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n figures.insertElementAt(this, 0)\r\n }\r\n else if (lines.remove(this) !== null) {\r\n lines.insertElementAt(this, 0)\r\n }\r\n }\r\n\r\n // bring all children figures in front of the parent\r\n // run reverse to the collection to care about the z-order of the children)\r\n this.children.each( (i, child) => {\r\n child.figure.toBack(figure)\r\n }, true)\r\n\r\n if (this.svgNodes !== null) {\r\n if (typeof figure !== \"undefined\") {\r\n this.svgNodes.insertBefore(figure.getShapeElement())\r\n }\r\n else {\r\n this.svgNodes.toBack()\r\n }\r\n }\r\n\r\n\r\n if (this.canvas !== null) {\r\n if (typeof figure !== \"undefined\") {\r\n this.getShapeElement().insertBefore(figure.getShapeElement())\r\n }\r\n else {\r\n this.getShapeElement().toBack()\r\n }\r\n }\r\n\r\n // and last but not least - the ports are always on top\r\n //\r\n this.getPorts().each((i, port) => {\r\n port.getConnections().each((i, connection) => {\r\n connection.toFront(this)\r\n })\r\n // a port should always be in front of the shape doesn't matter what the\r\n // \"figure\" parameter says.\r\n //\r\n port.toFront(this)\r\n })\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getTopLevelShapeElement: function () {\r\n if (this.svgNodes.length === 0) {\r\n return this.shape\r\n }\r\n return this.svgNodes\r\n },\r\n\r\n /**\r\n * @private\r\n */\r\n createShapeElement: function () {\r\n // NOTE: don't change the order of the two calls. This defines the z-oder in the canvas.\r\n // The \"set\" must always be on top.\r\n let shape = this.canvas.paper.rect(this.getX(), this.getY(), this.getWidth(), this.getHeight())\r\n this.svgNodes = this.createSet()\r\n\r\n // check if the element is a \"set\" or a simple raphael shape. otherwise we wrap them into a set\r\n //\r\n if (typeof this.svgNodes.forEach === \"undefined\") {\r\n let set = this.canvas.paper.set()\r\n set.push(this.svgNodes)\r\n this.svgNodes = set\r\n }\r\n\r\n this.svgNodes.attr({\"stroke-scale\": this.strokeScale})\r\n\r\n // update the visibility of the children\r\n this.setVisible(this.visible)\r\n\r\n // propagate the CSS style to all set elements\r\n this.setCssClass(this.cssClass)\r\n\r\n let bb = this.svgNodes.getBBox()\r\n this.originalWidth = bb.width\r\n this.originalHeight = bb.height\r\n\r\n return shape\r\n },\r\n\r\n /**\r\n * \r\n * Override this method to add your own SVG elements. See {@link draw2d.shape.basic.Label} as example.\r\n *\r\n * @template\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.set() // return empty set as default;\r\n }\r\n\r\n})\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n * The base class for all vector based figures like {@link draw2d.shape.basic.Rectangle} or {@link draw2d.shape.basic.Oval}\r\n * inside a canvas.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.node.Node\r\n */\r\ndraw2d.VectorFigure = draw2d.shape.node.Node.extend(\r\n /** @lends draw2d.VectorFigure.prototype */\r\n {\r\n \r\n NAME: \"draw2d.VectorFigure\",\r\n \r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function( attr, setter, getter)\r\n {\r\n this.stroke = 1;\r\n this.radius = 0;\r\n this.bgColor= new draw2d.util.Color(\"#ffffff\");\r\n this.color = new draw2d.util.Color(\"#303030\");\r\n this.dasharray = null;\r\n\r\n // memento for the stroke if we reset the glow effect of this shape\r\n //\r\n this.strokeBeforeGlow = this.stroke;\r\n this.glowIsActive = false;\r\n\r\n this._super( attr,\r\n {\r\n // @attr {String} dasharray the line pattern see {@link draw2d.shape.basic.Line#setDashArray} for more information*/\r\n dasharray : this.setDashArray,\r\n // @attr {Number} radius the radius to render the line edges */\r\n radius : this.setRadius,\r\n // @attr {String|draw2d.util.Color} bgColor the background color of the shape */\r\n bgColor: this.setBackgroundColor,\r\n // @attr {String|draw2d.util.Color} color the main color of the shape */\r\n color : this.setColor,\r\n // @attr {Number} stroke the stroke width */\r\n stroke : this.setStroke,\r\n ...setter},\r\n {\r\n dasharray: this.getDashArray,\r\n radius : this.getRadius,\r\n bgColor: this.getBackgroundColor,\r\n color : this.getColor,\r\n stroke : this.getStroke,\r\n ...getter}\r\n )\r\n },\r\n\r\n /**\r\n * \r\n * Sets the corner radius or the edges.\r\n *\r\n * @param {Number} radius\r\n * @since 4.2.1\r\n */\r\n setRadius: function(radius)\r\n {\r\n this.radius = radius;\r\n this.repaint();\r\n this.fireEvent(\"change:radius\",{value:this.radius});\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Get the corner radius of the edges.\r\n *\r\n * @returns {Number}\r\n * @since 4.2.1\r\n */\r\n getRadius: function()\r\n {\r\n return this.radius;\r\n },\r\n\r\n\r\n\r\n /**\r\n * \r\n * Set the line style for this object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * dash: dashPattern\r\n * });\r\n *\r\n * @param {String} dash can be one of this [\"\", \"-\", \".\", \"-.\", \"-..\", \". \", \"- \", \"--\", \"- .\", \"--.\", \"--..\"]\r\n */\r\n setDashArray: function(dashPattern)\r\n {\r\n this.dasharray = dashPattern;\r\n this.repaint();\r\n\r\n this.fireEvent(\"change:dashArray\",{value:this.dasharray});\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Get the line style for this object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr(\"dash\");\r\n *\r\n * @since 5.1.0\r\n */\r\n getDashArray: function()\r\n {\r\n return this.dasharray;\r\n },\r\n\r\n /**\r\n * \r\n * Highlight the element or remove the highlighting\r\n *\r\n * @param {Boolean} flag indicates glow/noGlow\r\n */\r\n setGlow: function(flag)\r\n {\r\n\r\n if(flag === this.glowIsActive) {\r\n return this;\r\n }\r\n\r\n this.glowIsActive = flag;\r\n if(flag===true){\r\n this.strokeBeforeGlow = this.getStroke();\r\n this.setStroke(this.strokeBeforeGlow*1.5);\r\n }\r\n else {\r\n this.setStroke(this.strokeBeforeGlow);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function(attributes)\r\n {\r\n if (this.repaintBlocked===true || this.shape === null){\r\n return;\r\n }\r\n\r\n attributes??={};\r\n\r\n attributes.x = this.getAbsoluteX();\r\n attributes.y = this.getAbsoluteY();\r\n\r\n if(typeof attributes.stroke===\"undefined\"){\r\n if(this.color === null || this.stroke ===0){\r\n attributes.stroke = \"none\";\r\n }\r\n else {\r\n attributes.stroke = this.color.rgba();\r\n }\r\n }\r\n\r\n attributes[\"stroke-width\"] ??= this.stroke\r\n attributes[\"fill\"] ??=this.bgColor.rgba()\r\n attributes[\"dasharray\"] ??= this.dasharray\r\n attributes[\"stroke-dasharray\"] ??= this.dasharray\r\n\r\n this._super(attributes);\r\n\r\n return this;\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the new background color of the figure. It is possible to hands over\r\n * <code>null</code> to set the background transparent.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * \"bgColor\": \"#f0f0f0\"\r\n * });\r\n *\r\n * @param {String|draw2d.util.Color} color The new background color of the figure\r\n **/\r\n setBackgroundColor: function(color)\r\n {\r\n this.bgColor = new draw2d.util.Color(color);\r\n\r\n this.repaint();\r\n this.fireEvent(\"change:bgColor\",{value:this.bgColor});\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * The current used background color.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * var color =figure.attr(\"bgColor\");\r\n *\r\n * @returns {draw2d.util.Color}\r\n */\r\n getBackgroundColor: function()\r\n {\r\n return this.bgColor;\r\n },\r\n\r\n /**\r\n * \r\n * Set the stroke to use.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * \"stroke\": 2\r\n * });\r\n *\r\n * @param {Number} w The new line width of the figure\r\n **/\r\n setStroke: function( w )\r\n {\r\n this.stroke=w;\r\n this.repaint();\r\n this.fireEvent(\"change:stroke\",{value:this.stroke});\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * The used line width.\r\n *\r\n * @returns {Number}\r\n **/\r\n getStroke: function( )\r\n {\r\n return this.stroke;\r\n },\r\n\r\n /**\r\n * \r\n * Set the foreground color of the figure.\r\n * This method fires a <i>document dirty</i> event.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * \"color\": \"#f3f3f3\"\r\n * });\r\n *\r\n * @param {String|draw2d.util.Color} color The new color of the line.\r\n **/\r\n setColor: function( color)\r\n {\r\n this.color = new draw2d.util.Color(color);\r\n this.repaint();\r\n this.fireEvent(\"change:color\",{value:this.color});\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Get the current used foreground color\r\n *\r\n *\r\n * @returns {draw2d.util.Color}\r\n */\r\n getColor: function()\r\n {\r\n return this.color;\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function()\r\n {\r\n return {...this._super(), \r\n bgColor : this.bgColor.rgba(),\r\n color : this.color.rgba(),\r\n stroke : this.stroke,\r\n radius : this.radius,\r\n dasharray : this.dasharray\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function(memento)\r\n {\r\n this._super(memento);\r\n\r\n if(typeof memento.radius !==\"undefined\"){\r\n this.setRadius(memento.radius);\r\n }\r\n\r\n if(typeof memento.bgColor !== \"undefined\"){\r\n this.setBackgroundColor(memento.bgColor);\r\n }\r\n\r\n if(typeof memento.color !== \"undefined\"){\r\n this.setColor(memento.color);\r\n }\r\n\r\n if(typeof memento.stroke !== \"undefined\" ){\r\n this.setStroke(memento.stroke===null?0:parseFloat(memento.stroke));\r\n }\r\n\r\n if(typeof memento.dasharray ===\"string\"){\r\n this.dasharray = memento.dasharray;\r\n }\r\n\r\n\r\n return this;\r\n }\r\n\r\n\r\n});\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Commands are passed around throughout editing. They are used to encapsulate and combine\r\n * changes to the application's model. An application has a single command stack. Commands must\r\n * be executed using the command stack rather than directly calling execute.\r\n * <br>\r\n * This is required for a generic support for the undo/redo concept within draw2d.<br>\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n */\r\ndraw2d.command.Command = Class.extend(\r\n /** @lends draw2d.command.Command.prototype */\r\n {\r\n \r\n NAME: \"draw2d.command.Command\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {String} label\r\n */\r\n init: function (label) {\r\n this.label = label\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns a label of the Command. e.g. `move figure`.\r\n *\r\n * @returns {String} the label for this command\r\n **/\r\n getLabel: function () {\r\n return this.label\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time.\r\n * Sup-classes must implement this method.\r\n *\r\n * @template\r\n **/\r\n execute: function () {\r\n },\r\n\r\n /**\r\n * \r\n * Will be called if the user cancel the operation.\r\n *\r\n * @template\r\n **/\r\n cancel: function () {\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command.\r\n * Sup-classes must implement this method.\r\n *\r\n * @template\r\n **/\r\n undo: function () {\r\n },\r\n\r\n /**\r\n * \r\n * Redo the command after the user has undo this command.\r\n * Sup-classes must implement this method.\r\n *\r\n * @template\r\n **/\r\n redo: function () {\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command to add a figure with CommandStack support.\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandAdd = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandAdd.prototype */\r\n {\r\n \r\n NAME: \"draw2d.command.CommandAdd\",\r\n\r\n /**\r\n * Create a add command for the given figure.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to use\r\n * @param {draw2d.Figure} figure the figure to add\r\n * @param {Number|draw2d.geo.Point} x the x-coordinate or a complete point where to place the figure\r\n * @param {Number} [y] the y-coordinate if x is a number and not a complete point\r\n */\r\n init: function (canvas, figure, x, y) {\r\n this._super(draw2d.Configuration.i18n.command.addShape)\r\n this.figure = figure\r\n this.canvas = canvas\r\n this.pos = new draw2d.geo.Point(x, y)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n // we can only add the figure once to the canvas\r\n return this.figure.getCanvas() === null\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.canvas.add(this.figure, this.pos.x, this.pos.y)\r\n },\r\n\r\n /**\r\n * \r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.execute()\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.canvas.remove(this.figure)\r\n }\r\n\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Add a vertex to a polyline or polygon\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandAddVertex = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandAddVertex.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandAddVertex\",\r\n\r\n /**\r\n * Create a new Command objects which add a vertex to a PolyLine / Polygon.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} line the related line\r\n * @param {Number} index the index where to add\r\n * @param {Number} x the x coordinate for the new vertex\r\n * @param {Number} y the y coordinate for the new vertex\r\n */\r\n init: function (line, index, x, y) {\r\n this._super(draw2d.Configuration.i18n.command.addVertex)\r\n\r\n this.line = line\r\n this.index = index\r\n this.newPoint = new draw2d.geo.Point(x, y)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.line.removeVertexAt(this.index)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.line.insertVertexAt(this.index, this.newPoint.x, this.newPoint.y)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Assign a figure to a compiste\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n * @since 4.9.0\r\n */\r\ndraw2d.command.CommandAssignFigure = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandAssignFigure.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandAssignFigure\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Figure} figure the figure to assign\r\n * @param {draw2d.Figure} composite the composite where the figure should assign\r\n */\r\n init: function (figure, composite) {\r\n this._super(draw2d.Configuration.i18n.command.assignShape)\r\n\r\n this.figure = figure\r\n this.composite = composite\r\n this.assignedConnections = new draw2d.util.ArrayList()\r\n this.isNode = this.figure instanceof draw2d.shape.node.Node\r\n this.oldBoundingBox = composite.getBoundingBox()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.composite.assignFigure(this.figure)\r\n\r\n // get all connections of the shape and check if source/target node\r\n // part of the composite. In this case the connection will be part of\r\n // the composite as well\r\n if (this.isNode === true) {\r\n let connections = this.figure.getConnections()\r\n let _this = this\r\n connections.each(function (i, connection) {\r\n if (connection.getSource().getParent().getComposite() === _this.composite && connection.getTarget().getParent().getComposite() === _this.composite) {\r\n if (connection.getComposite() !== _this.composite) {\r\n _this.assignedConnections.add({oldComposite: connection.getComposite(), connection: connection})\r\n _this.composite.assignFigure(connection)\r\n }\r\n }\r\n })\r\n }\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.composite.unassignFigure(this.figure)\r\n this.assignedConnections.each( (i, entry) =>{\r\n if (entry.oldComposite !== null) {\r\n entry.oldComposite.assignFigure(entry.connection)\r\n }\r\n else {\r\n entry.connection.getComposite().unassignFigure(entry.connection)\r\n }\r\n })\r\n this.composite.stickFigures = true\r\n this.composite.setBoundingBox(this.oldBoundingBox)\r\n this.composite.stickFigures = false\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.composite.setBoundingBox(this.oldBoundingBox)\r\n this.composite.assignFigure(this.figure)\r\n this.assignedConnections.each( (i, entry) => this.composite.assignFigure(entry.connection))\r\n }\r\n})\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *Command to change attributes of a shape with undo/redo support\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandAttr = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandAttr.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandAttr\",\r\n\r\n /**\r\n * Create a new Command objects which provides undo/redo for attributes.\r\n *\r\n * @param {draw2d.Figure} figure the figure to handle\r\n * @param {Object} attributes new attributes to set\r\n */\r\n init: function (figure, newAttributes) {\r\n this._super(draw2d.Configuration.i18n.command.changeAttributes)\r\n\r\n this.figure = figure\r\n this.newAttributes = newAttributes\r\n this.oldAttributes = {}\r\n // Get the current attributes from the shape before we modify them.\r\n // Required for undo/redo\r\n Object.keys(newAttributes).forEach( (key) => {\r\n this.oldAttributes[key] = figure.attr(key)\r\n })\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.figure.attr(this.oldAttributes)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.figure.attr(this.newAttributes)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Set the bounding box of a figure with undo/redo support\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandBoundingBox = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandResize.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandResize\",\r\n\r\n /**\r\n * Create a new resize Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Figure} figure the figure to resize\r\n * @param {draw2d.geo.Rectangle} boundingBox the new bounding box of the figure\r\n */\r\n init: function (figure, boundingBox) {\r\n this._super(draw2d.Configuration.i18n.command.resizeShape)\r\n this.figure = figure\r\n this.oldBoundingBox = this.figure.getBoundingBox()\r\n this.newBoundingBox = boundingBox\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return !this.oldBoundingBox.equals(this.newBoundingBox)\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.figure.setBoundingBox(this.oldBoundingBox)\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.figure.setBoundingBox(this.newBoundingBox)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A CommandCollection works as a single command. You can add more than one\r\n * Command to this CommandCollection and execute/undo them onto the CommandStack as a\r\n * single Command.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandCollection = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandCollection.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandCollection\",\r\n\r\n /**\r\n * Create a new CommandConnect objects which can be execute via the CommandStack.\r\n *\r\n * @param {String} [commandLabel] the label to show on the command stack for the undo/redo operation\r\n */\r\n init: function (commandLabel) {\r\n this._super((typeof commandLabel === 'undefined') ? draw2d.Configuration.i18n.command.collection : commandLabel)\r\n\r\n this.commands = new draw2d.util.ArrayList()\r\n },\r\n\r\n /**\r\n *\r\n * Returns a label of the Command. e.g. \"move figure\".\r\n *\r\n * @returns {String} the label for this command\r\n **/\r\n getLabel: function () {\r\n //return the label of the one and only command\r\n //\r\n if (this.commands.getSize() === 1) {\r\n return this.commands.first().getLabel()\r\n }\r\n\r\n // return a common label if all commands have the same label.\r\n //\r\n if (this.commands.getSize() > 1) {\r\n let labels = this.commands.clone().map(function (e) {\r\n return e.getLabel()\r\n })\r\n labels.unique()\r\n if (labels.getSize() === 1) {\r\n return labels.first()\r\n }\r\n }\r\n\r\n // return the all purpose label.\r\n return this._super()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Add a command to the collection.\r\n *\r\n * @param {draw2d.command.Command} command\r\n */\r\n add: function (command) {\r\n this.commands.add(command)\r\n },\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // We ask all cmd's if they make any changes.\r\n // Keep in mind: the command will be execute if at least ONE command return [true]!!!!\r\n // doesn't matter if the other commands return [false].\r\n // The method should be renamed into: modifiesTheModel()....design flaw.\r\n let canExec = false\r\n this.commands.each(function (i, cmd) {\r\n canExec = canExec || cmd.canExecute()\r\n })\r\n return canExec\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.commands.each(function (i, cmd) {\r\n cmd.execute()\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command.\r\n *\r\n **/\r\n redo: function () {\r\n this.commands.each(function (i, cmd) {\r\n cmd.redo()\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command.\r\n *\r\n **/\r\n undo: function () {\r\n // execute the undo operation in reverse direction.\r\n\r\n this.commands.reverse()\r\n this.commands.each(function (i, cmd) {\r\n cmd.undo()\r\n })\r\n this.commands.reverse()\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Connects two ports with a connection.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandConnect = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandConnect.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandConnect\",\r\n\r\n /**\r\n * Create a new CommandConnect objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Port} source the source port for the connection to create\r\n * @param {draw2d.Port} target the target port for the connection to create\r\n * @param {draw2d.Port} [dropTarget] the port who has initiate the connection creation. mainly the drop target\r\n */\r\n init: function (source, target, dropTarget) {\r\n this._super(draw2d.Configuration.i18n.command.connectPorts)\r\n this.canvas = target.getCanvas()\r\n this.source = source\r\n this.target = target\r\n this.connection = null\r\n this.dropTarget = dropTarget // optional\r\n },\r\n\r\n /**\r\n *\r\n * set the connection to use. called by the ConnectionCreatePolicy\r\n */\r\n setConnection: function (connection) {\r\n this.connection = connection\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the fresh created connection if available. Used in the\r\n * ClickConnectionCreatePolicy to customize the router and vertices.\r\n *\r\n * @returns {null|draw2d.Connection}\r\n * @since 6.1.0\r\n */\r\n getConnection: function () {\r\n return this.connection\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n let optionalCallback = conn => {\r\n this.connection = conn\r\n this.connection.setSource(this.source)\r\n this.connection.setTarget(this.target)\r\n this.canvas.add(this.connection)\r\n }\r\n\r\n // the createConnection must return either a connection or \"undefined\". If the method return \"undefined\"\r\n // the asynch callback must be called. Usefull if the createConnection shows a selection dialog\r\n //\r\n if (this.connection === null) {\r\n // deprecated call!!!!\r\n //\r\n let result = draw2d.Configuration.factory.createConnection(this.source, this.target, optionalCallback, this.dropTarget)\r\n debugger\r\n // will be handled by the optional callback\r\n if (typeof result === \"undefined\") {\r\n return\r\n }\r\n\r\n this.connection = result\r\n }\r\n\r\n optionalCallback(this.connection)\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command.\r\n *\r\n **/\r\n redo: function () {\r\n this.canvas.add(this.connection)\r\n this.connection.reconnect()\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command.\r\n *\r\n **/\r\n undo: function () {\r\n this.canvas.remove(this.connection)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Command to remove a figure with CommandStack support.\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandDelete = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandDelete.prototype */\r\n {\r\n NAME: \"draw2d.command.CommandDelete\",\r\n\r\n /**\r\n * Create a delete command for the given figure.\r\n *\r\n * @param {draw2d.Figure} figure\r\n */\r\n init: function (figure) {\r\n this._super(draw2d.Configuration.i18n.command.deleteShape)\r\n\r\n this.parent = figure.getParent()\r\n this.figure = figure\r\n this.canvas = figure.getCanvas()\r\n this.connections = null\r\n this.removedParentEntry = null // can be null if the figure didn't have any parent shape assigned\r\n this.indexOfChild = -1\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n // we can only delete the figure if its part of the canvas.\r\n return this.figure.getCanvas() !== null\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n if (this.parent !== null) {\r\n this.parent.add(this.removedParentEntry.figure, this.removedParentEntry.locator, this.indexOfChild)\r\n this.canvas.setCurrentSelection(this.parent)\r\n }\r\n else {\r\n this.canvas.add(this.figure)\r\n this.canvas.setCurrentSelection(this.figure)\r\n }\r\n\r\n if (this.figure instanceof draw2d.Connection) {\r\n this.figure.reconnect()\r\n }\r\n\r\n\r\n for (let i = 0; i < this.connections.getSize(); ++i) {\r\n this.canvas.add(this.connections.get(i))\r\n this.connections.get(i).reconnect()\r\n }\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.canvas.setCurrentSelection(null)\r\n\r\n // Collect all connections that are bounded to the figure to delete. This connections\r\n // must be deleted too.\r\n //\r\n if (this.connections === null) {\r\n if (this.figure instanceof draw2d.shape.node.Node) {\r\n this.connections = this.figure.getConnections()\r\n }\r\n else {\r\n this.connections = new draw2d.util.ArrayList()\r\n }\r\n }\r\n\r\n // already done in the canvas.remove(..) method\r\n // if(this.figure instanceof draw2d.Connection){\r\n // this.figure.disconnect();\r\n // }\r\n\r\n\r\n // remove all connections\r\n //\r\n for (let i = 0; i < this.connections.getSize(); ++i) {\r\n this.canvas.remove(this.connections.get(i))\r\n }\r\n\r\n // remove this figure from the parent\r\n //\r\n if (this.parent !== null) {\r\n // determine the index of the child before remove\r\n this.indexOfChild = this.parent.getChildren().indexOf(this.figure)\r\n this.removedParentEntry = this.parent.remove(this.figure)\r\n }\r\n // or from the canvas\r\n else {\r\n this.canvas.remove(this.figure)\r\n }\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command to remove a group with all related children.\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandDeleteGroup = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandDeleteGroup.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandDeleteGroup\",\r\n\r\n /**\r\n * Create a delete command for the given figure.\r\n *\r\n * @param {draw2d.shape.composite.Group} group\r\n */\r\n init: function (group) {\r\n this._super(draw2d.Configuration.i18n.command.deleteShape)\r\n\r\n this.parent = group.getParent()\r\n this.group = group\r\n this.canvas = group.getCanvas()\r\n this.batchDelete = null\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n // we can only delete the shape if a children can be deleted\r\n //\r\n let children = this.group.getAssignedFigures()\r\n for (let i = 0; i < children.getSize(); i++) {\r\n if (children.get(i).isDeleteable() === false) {\r\n return false\r\n }\r\n }\r\n\r\n // we can only delete the figure if its part of the canvas.\r\n return this.group.getCanvas() !== null\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.batchDelete.undo()\r\n this.canvas.setCurrentSelection(this.group)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n if (this.batchDelete === null) {\r\n this.batchDelete = new draw2d.command.CommandCollection()\r\n\r\n // remove the assignment of the children to the group before we delete the group\r\n //\r\n this.batchDelete.add(new draw2d.command.CommandUngroup(this.canvas, this.group))\r\n\r\n // add the delete command of the children to the batch\r\n //\r\n let children = this.group.getAssignedFigures()\r\n for (let i = 0; i < children.getSize(); i++) {\r\n let child = children.get(i)\r\n // request a delete Command from the child instead of create one by my own. May the child\r\n // provides its own implementation\r\n let cmd = child.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.DELETE))\r\n this.batchDelete.add(cmd)\r\n }\r\n\r\n }\r\n\r\n\r\n this.batchDelete.execute()\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Command to group a given set of figures\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandGroup = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandGroup.prototype */\r\n {\r\n \r\n NAME: \"draw2d.command.CommandGroup\",\r\n\r\n /**\r\n * Create a group command for the given figure.\r\n *\r\n * @param {draw2d.util.ArrayList} figures the figures to group\r\n */\r\n init: function (canvas, figures) {\r\n this._super(draw2d.Configuration.i18n.command.groupShapes)\r\n if (figures instanceof draw2d.Selection) {\r\n this.figures = figures.getAll()\r\n }\r\n else {\r\n this.figures = figures\r\n }\r\n\r\n // figures which already part of an non \"Group\" composite will be removed from the set.\r\n // It is not possible to assign a figure to two different composites.\r\n //\r\n this.figures.grep(function (figure) {\r\n return figure.getComposite() === null\r\n })\r\n\r\n this.canvas = canvas\r\n this.group = new draw2d.shape.composite.Group()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n return !this.figures.isEmpty()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n let _this = this\r\n this.figures.each(function (i, figure) {\r\n _this.group.unassignFigure(figure)\r\n })\r\n\r\n this.canvas.remove(this.group)\r\n this.canvas.setCurrentSelection(this.figures)\r\n },\r\n\r\n /**\r\n * \r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n let _this = this\r\n this.figures.each(function (i, figure) {\r\n _this.group.assignFigure(figure)\r\n })\r\n\r\n this.canvas.add(this.group)\r\n this.canvas.setCurrentSelection(this.group)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command for the movement of figures.\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandMove = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandMove.prototype */\r\n {\r\n NAME: \"draw2d.command.CommandMove\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Figure} figure the figure to move\r\n * @param {Number} [x] the current x position\r\n * @param {Number} [y] the current y position\r\n */\r\n init: function (figure, x, y) {\r\n this._super(draw2d.Configuration.i18n.command.moveShape)\r\n this.figure = figure\r\n if (typeof x === \"undefined\") {\r\n this.oldX = figure.getX()\r\n this.oldY = figure.getY()\r\n }\r\n else {\r\n this.oldX = x\r\n this.oldY = y\r\n }\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the initial position of the element\r\n *\r\n * @param {Number} x the new initial x position\r\n * @param {Number} y the new initial y position\r\n **/\r\n setStartPosition: function (x, y) {\r\n this.oldX = x\r\n this.oldY = y\r\n },\r\n\r\n /**\r\n * \r\n * Set the target/final position of the figure move command.\r\n *\r\n * @param {Number} x the new x position\r\n * @param {Number} y the new y position\r\n **/\r\n setPosition: function (x, y) {\r\n this.newX = x\r\n this.newY = y\r\n },\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.newX !== this.oldX || this.newY !== this.oldY\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.figure.setPosition(this.oldX, this.oldY)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.figure.setPosition(this.newX, this.newY)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command for the movement of figures.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandMoveConnection = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandMoveConnection.prototype */\r\n {\r\n \r\n NAME: \"draw2d.command.CommandMoveConnection\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Connection} figure the connection to move\r\n */\r\n init: function (figure) {\r\n this._super(draw2d.Configuration.i18n.command.moveLine)\r\n this.line = figure\r\n this.dx = 0\r\n this.dy = 0\r\n },\r\n\r\n /**\r\n * \r\n * set the offset of the line translation\r\n *\r\n * @param {Number} dx\r\n * @param {Number} dy\r\n */\r\n setTranslation: function (dx, dy) {\r\n this.dx = dx\r\n this.dy = dy\r\n },\r\n\r\n /**\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.dx !== 0 && this.dy !== 0\r\n },\r\n\r\n /**\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n let _this = this\r\n this.line.getVertices().each(function (i, e) {\r\n e.translate(-_this.dx, -_this.dy)\r\n })\r\n this.line.svgPathString = null\r\n // required to update resize handles and the painting of the line\r\n this.line.setPosition(this.line.getStartPosition())\r\n },\r\n\r\n /**\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n let _this = this\r\n this.line.getVertices().each(function (i, e) {\r\n e.translate(_this.dx, _this.dy)\r\n })\r\n this.line.svgPathString = null\r\n\r\n // required to update resize handles and the painting of the line\r\n this.line.setPosition(this.line.getStartPosition())\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command for the movement of figures.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandMoveLine = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandMoveLine.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandMoveLine\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.shape.basic.Line} figure the line to move\r\n */\r\n init: function (figure) {\r\n this._super(draw2d.Configuration.i18n.command.moveLine)\r\n this.line = figure\r\n this.dx = 0\r\n this.dy = 0\r\n },\r\n\r\n /**\r\n *\r\n * set the offset of the line translation\r\n *\r\n * @param {Number} dx\r\n * @param {Number} dy\r\n */\r\n setTranslation: function (dx, dy) {\r\n this.dx = dx\r\n this.dy = dy\r\n },\r\n\r\n /**\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.dx !== 0 && this.dy !== 0\r\n },\r\n\r\n /**\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n let _this = this\r\n this.line.getVertices().each(function (i, e) {\r\n e.translate(-_this.dx, -_this.dy)\r\n })\r\n this.line.svgPathString = null\r\n // required to update resize handles and the painting of the line\r\n this.line.setPosition(this.line.getStartPosition())\r\n },\r\n\r\n /**\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n let _this = this\r\n this.line.getVertices().each(function (i, e) {\r\n e.translate(_this.dx, _this.dy)\r\n })\r\n this.line.svgPathString = null\r\n\r\n // required to update resize handles and the painting of the line\r\n this.line.setPosition(this.line.getStartPosition())\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command for the vertex movement of a polyline/polygon.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandMoveVertex = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandMoveVertex.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandMoveVertex\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} line the related line\r\n */\r\n init: function (line) {\r\n this._super(draw2d.Configuration.i18n.command.moveVertex)\r\n\r\n this.line = line\r\n this.index = -1\r\n this.newPoint = null\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the index of the vertex of the polyline/polygon to modify.\r\n *\r\n * @param {Number} index the related index of the vertex\r\n **/\r\n setIndex: function (index) {\r\n this.index = index\r\n this.origPoint = this.line.getVertices().get(this.index).clone()\r\n },\r\n\r\n updatePosition: function (x, y) {\r\n this.newPoint = new draw2d.geo.Point(x, y)\r\n },\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.index !== -1 && this.newPoint !== null\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.line.setVertex(this.index, this.origPoint.x, this.origPoint.y)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.line.setVertex(this.index, this.newPoint.x, this.newPoint.y)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command for the vertices movement of a polyline/polygon.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandMoveVertices = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandMoveVertices.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandMoveVertices\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} line the related line\r\n */\r\n init: function (line) {\r\n this._super(draw2d.Configuration.i18n.command.moveVertices)\r\n\r\n this.line = line\r\n this.oldVertices = line.getVertices().clone(true)\r\n this.newVertices = null\r\n },\r\n\r\n\r\n updateVertices: function (newVertices) {\r\n this.newVertices = newVertices\r\n },\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.newVertices !== null\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.line.setVertices(this.oldVertices)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.line.setVertices(this.newVertices)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Reconnects two ports. This command is used during the DragDrop operation of a draw2d.Connection.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandReconnect = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandReconnect.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandReconnect\",\r\n\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Connection} conn the related Connection which is currently in the drag&drop operation\r\n */\r\n init: function (conn) {\r\n this._super(draw2d.Configuration.i18n.command.connectPorts)\r\n this.con = conn\r\n this.oldSourcePort = conn.getSource()\r\n this.oldTargetPort = conn.getTarget()\r\n },\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * The new ports to use during the execute of this command.\r\n *\r\n * @param {draw2d.Port} source\r\n * @param {draw2d.Port} target\r\n */\r\n setNewPorts: function (source, target) {\r\n this.newSourcePort = source\r\n this.newTargetPort = target\r\n },\r\n\r\n\r\n setIndex: function (index) {\r\n // do nothing....but method is required for LineResizeHandle\r\n // With this common interface the ResizeHandle can handle Lines and Connections\r\n // with the same code\r\n },\r\n\r\n /**\r\n * compatibily method to the CommandMoveVertex to handle Line and Connections\r\n * transparent in the ResizeHandles\r\n *\r\n * @param x\r\n * @param y\r\n */\r\n updatePosition: function (x, y) {\r\n // do nothing....but method is required for LineResizeHandle\r\n // With this common interface the ResizeHandle can handle Lines and Connections\r\n // with the same code\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n cancel: function () {\r\n this.con.setSource(this.oldSourcePort)\r\n this.con.setTarget(this.oldTargetPort)\r\n\r\n // force a routing of the connection and DON'T set the old reouter again because this reset all manual added\r\n // vertices\r\n this.con.routingRequired = true\r\n this.con.repaint()\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.con.setSource(this.oldSourcePort)\r\n this.con.setTarget(this.oldTargetPort)\r\n // force a routing of the connection and DON'T set the old reouter again because this reset all manual added\r\n // vertices\r\n this.con.routingRequired = true\r\n this.con.repaint()\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.con.setSource(this.newSourcePort)\r\n this.con.setTarget(this.newTargetPort)\r\n // force a routing of the connection and DON'T set the old reouter again because this reset all manual added\r\n // vertices\r\n this.con.routingRequired = true\r\n this.con.repaint()\r\n }\r\n\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Remove a vertex from a polyline or polygon\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandRemoveVertex = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandRemoveVertex.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandRemoveVertex\",\r\n\r\n /**\r\n * Create a new Command objects which add a vertex to a PloyLine.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} line the related line\r\n * @param {Number} index the index where to add\r\n */\r\n init: function (line, index) {\r\n this._super(draw2d.Configuration.i18n.command.deleteVertex)\r\n\r\n this.line = line\r\n this.index = index\r\n this.oldPoint = line.getVertices().get(index).clone()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.line.insertVertexAt(this.index, this.oldPoint.x, this.oldPoint.y)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.line.removeVertexAt(this.index)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Replace the vertices of a polyline.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandReplaceVertices = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandReplaceVertices.prototype */\r\n {\r\n \r\n NAME: \"draw2d.command.CommandReplaceVertices\",\r\n\r\n /**\r\n * Create a new Command objects which add a segment to a PolyLine / Polygon.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} line the related line\r\n * @param {draw2d.util.ArrayList} originalVertices the original vertices of the polyline\r\n * @param {draw2d.util.ArrayList} newVertices the new vertices of the polyline\r\n */\r\n init: function (line, originalVertices, newVertices) {\r\n this._super(draw2d.Configuration.i18n.command.addSegment)\r\n\r\n this.line = line\r\n this.originalVertices = originalVertices\r\n this.newVertices = newVertices\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.line.setVertices(this.originalVertices)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.line.setVertices(this.newVertices)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Resize command for figures. Can be execute/undo/redo via a CommandStack.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandResize = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandResize.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandResize\",\r\n\r\n /**\r\n * Create a new resize Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Figure} figure the figure to resize\r\n * @param {Number} [width] the current width\r\n * @param {Number} [height] the current height\r\n */\r\n init: function (figure, width, height) {\r\n this._super(draw2d.Configuration.i18n.command.resizeShape)\r\n this.figure = figure\r\n\r\n if (typeof width === \"undefined\") {\r\n this.oldWidth = figure.getWidth()\r\n this.oldHeight = figure.getHeight()\r\n }\r\n else {\r\n this.oldWidth = width\r\n this.oldHeight = height\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Set the new dimension of the element.\r\n *\r\n * @param {Number} width the new width.\r\n * @param {Number} height the new height of the element.\r\n **/\r\n setDimension: function (width, height) {\r\n this.newWidth = width | 0\r\n this.newHeight = height | 0\r\n },\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.newWidth !== this.oldWidth || this.newHeight !== this.oldHeight\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.figure.setDimension(this.oldWidth, this.oldHeight)\r\n },\r\n\r\n /**\r\n * \r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.figure.setDimension(this.newWidth, this.newHeight)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Set the rotation angle of the given figure\r\n *\r\n * @since 4.4.1\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandRotate = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandRotate.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandRotate\",\r\n\r\n /**\r\n * Create a new resize Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Figure} figure the figure to resize\r\n * @param {Number} angle the angle to rotate\r\n */\r\n init: function (figure, angle) {\r\n this._super(draw2d.Configuration.i18n.command.rotateShape)\r\n this.figure = figure\r\n\r\n this.oldAngle = figure.getRotationAngle()\r\n this.newAngle = angle\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.oldAngle !== this.newAngle\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.rotate(this.oldAngle)\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.rotate(this.newAngle)\r\n },\r\n\r\n rotate: function (angle) {\r\n let w = this.figure.getWidth()\r\n let h = this.figure.getHeight()\r\n\r\n this.figure.setRotationAngle(angle)\r\n\r\n this.figure.setDimension(h, w)\r\n\r\n this.figure.portRelayoutRequired = true\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * An implementation of a command stack. A stack manages the executing, undoing, and redoing of Commands. Executed\r\n * commands are pushed onto a a stack for undoing later. Commands which are undone are pushed onto a redo stack.\r\n * Whenever a new command is executed, the redo stack is flushed.\r\n *\r\n * You can retrieve the current used CommandStack just by calling <code>canvas.getCommandStack()</code>\r\n *\r\n */\r\ndraw2d.command.CommandStack = Class.extend(\r\n /** @lends draw2d.command.CommandStack.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandStack\",\r\n\r\n\r\n /**\r\n * Create a new CommandStack objects which can be execute via the CommandStack.\r\n *\r\n */\r\n init: function () {\r\n this.undostack = []\r\n this.redostack = []\r\n this.maxundo = 50\r\n this.transactionCommand = null\r\n this.eventListeners = new draw2d.util.ArrayList()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the maximal undo stack size. Entries will be remove if the max. stack\r\n * size has been reached.\r\n *\r\n * @param {Number} count The maximal undo stack size.\r\n * @returns {this}\r\n **/\r\n setUndoLimit: function (count) {\r\n this.maxundo = count\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Remove the undo / redo history. This is useful if the user has been save the\r\n * document.\r\n *\r\n * @returns {this}\r\n **/\r\n markSaveLocation: function () {\r\n this.undostack = []\r\n this.redostack = []\r\n\r\n // fire an empty command to inform all listener that the stack has been changed\r\n this.notifyListeners(new draw2d.command.Command(), draw2d.command.CommandStack.POST_EXECUTE)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Executes the specified Command if possible. Prior to executing the command, a\r\n * draw2d.command.CommandStackEvent for {@link #PRE_EXECUTE} will be fired to event listeners.\r\n * Similarly, after attempting to execute the command, an event for {@link #POST_EXECUTE}\r\n * will be fired.\r\n *\r\n * @param {draw2d.command.Command} command The command to execute.\r\n * @returns {this}\r\n **/\r\n execute: function (command) {\r\n if (typeof command === \"undefined\")\r\n throw \"Missing parameter [command] for method call CommandStack.execute\"\r\n\r\n // nothing to do\r\n if (command === null)\r\n return this//silently\r\n\r\n // return if the command can't execute or it doesn't change the model\r\n // => Empty command\r\n if (command.canExecute() === false)\r\n return this\r\n\r\n // A command stack transaction is open.\r\n // The execution will be postpone until the transaction will commit\r\n //\r\n if (this.transactionCommand !== null) {\r\n this.transactionCommand.add(command)\r\n return this\r\n }\r\n\r\n this.notifyListeners(command, draw2d.command.CommandStack.PRE_EXECUTE, \"PRE_EXECUTE\")\r\n\r\n this.undostack.push(command)\r\n command.execute()\r\n\r\n // cleanup the redo stack if the user execute a new command.\r\n // I think this will create a \"clean\" behaviour of the unde/redo mechanism.\r\n //\r\n this.redostack = []\r\n\r\n // monitor only the max. undo stack size\r\n //\r\n if (this.undostack.length > this.maxundo) {\r\n this.undostack = this.undostack.slice(this.undostack.length - this.maxundo)\r\n }\r\n this.notifyListeners(command, draw2d.command.CommandStack.POST_EXECUTE, \"POST_EXECUTE\")\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Opens a transaction for further multiple commands. If you execute a command all\r\n * {@ #execute} calls will be ignored until you commit the current transaction.\r\n *\r\n * @param {String} [commandLabel] the label to show for the undo/redo operation\r\n * @returns {this}\r\n * @since 4.0.0\r\n */\r\n startTransaction: function (commandLabel) {\r\n if (this.transactionCommand !== null) {\r\n debugger\r\n throw \"CommandStack is already within transactional mode. Don't call 'startTransaction\"\r\n }\r\n\r\n this.transactionCommand = new draw2d.command.CommandCollection(commandLabel)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns true if the Command Stack has an open transaction.\r\n * You can start or stop a transaction with `startTransaction`and `commitTransaction`.\r\n *\r\n * A transaction is one undo/redo operation.\r\n *\r\n * @returns {Boolean}\r\n */\r\n isInTransaction: function () {\r\n return this.transactionCommand !== null\r\n },\r\n\r\n /**\r\n *\r\n * Commit the running transaction. All commands between the start/end of a transaction\r\n * can be undo/redo in a single step.\r\n *\r\n * @since 4.0.0\r\n * @returns {this}\r\n */\r\n commitTransaction: function () {\r\n if (this.transactionCommand === null) {\r\n return this//silently\r\n }\r\n\r\n let cmd = this.transactionCommand\r\n this.transactionCommand = null\r\n // we can drop the CommandCollection if the collection contains only one command.\r\n if (cmd.commands.getSize() === 1) {\r\n this.execute(cmd.commands.first())\r\n }\r\n else {\r\n this.execute(cmd)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Undo on command from the stack and store them on the redo command stack.\r\n * @returns {this}\r\n **/\r\n undo: function () {\r\n let command = this.undostack.pop()\r\n if (command) {\r\n this.notifyListeners(command, draw2d.command.CommandStack.PRE_UNDO)\r\n this.redostack.push(command)\r\n command.undo()\r\n this.notifyListeners(command, draw2d.command.CommandStack.POST_UNDO)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Redo a command after the user has undo a command\r\n *\r\n * @returns {this}\r\n **/\r\n redo: function () {\r\n let command = this.redostack.pop()\r\n\r\n if (command) {\r\n this.notifyListeners(command, draw2d.command.CommandStack.PRE_REDO)\r\n this.undostack.push(command)\r\n command.redo()\r\n this.notifyListeners(command, draw2d.command.CommandStack.POST_REDO)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the label of the next REDO command.\r\n *\r\n * @returns {String}\r\n **/\r\n getRedoLabel: function () {\r\n if (this.redostack.length === 0)\r\n return \"\"\r\n\r\n let command = this.redostack[this.redostack.length - 1]\r\n\r\n if (command) {\r\n return command.getLabel()\r\n }\r\n return \"\"\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the label of the next UNDO command.\r\n *\r\n * @returns {String}\r\n **/\r\n getUndoLabel: function () {\r\n if (this.undostack.length === 0)\r\n return \"\"\r\n\r\n let command = this.undostack[this.undostack.length - 1]\r\n\r\n if (command) {\r\n return command.getLabel()\r\n }\r\n return \"\"\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Indicates whenever a REDO is possible.\r\n *\r\n * @returns {Boolean} <code>true</code> if it is appropriate to call {@link #redo()}.\r\n */\r\n canRedo: function () {\r\n return this.redostack.length > 0\r\n },\r\n\r\n /**\r\n *\r\n * indicator whenever a undo is possible.\r\n *\r\n * @returns {Boolean} <code>true</code> if {@link #undo()} can be called\r\n **/\r\n canUndo: function () {\r\n return this.undostack.length > 0\r\n },\r\n\r\n /**\r\n *\r\n * Adds a listener to the command stack, which will be notified whenever a command has been processed on the stack.\r\n * @deprecated use on/off to register events\r\n * @param {draw2d.command.CommandStackEventListener|Function} listener the listener to add.\r\n * @returns {this}\r\n */\r\n addEventListener: function (listener) {\r\n return this.on(\"change\", listener)\r\n },\r\n /**\r\n * Adds a listener to the command stack, which will be notified whenever a command has been processed on the stack.\r\n *\r\n * @param event\r\n * @param func\r\n * @returns {this}\r\n */\r\n on: function (event, listener) {\r\n if (event !== \"change\")\r\n throw \"only event of kind 'change' is supported\"\r\n\r\n if (listener instanceof draw2d.command.CommandStackEventListener) {\r\n this.eventListeners.add(listener)\r\n }\r\n else if (typeof listener.stackChanged === \"function\") {\r\n this.eventListeners.add(listener)\r\n }\r\n else if (typeof listener === \"function\") {\r\n this.eventListeners.add({stackChanged: listener})\r\n }\r\n else {\r\n throw \"Object doesn't implement required callback interface [draw2d.command.CommandStackListener]\"\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Removes a listener from the command stack.\r\n *\r\n * @deprecated use on/off to register events\r\n * @param {draw2d.command.CommandStackEventListener} listener the listener to remove.\r\n * @returns {this}\r\n */\r\n removeEventListener: function (listener) {\r\n this.off(listener)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * @param listener\r\n * @returns {this}\r\n */\r\n off: function (listener) {\r\n this.eventListeners.grep(entry => (entry === listener || entry.stackChanged === listener))\r\n /*\r\n let size = this.eventListeners.getSize()\r\n for (let i = 0; i < size; i++) {\r\n let entry = this.eventListeners.get(i)\r\n if (entry === listener || entry.stackChanged === listener) {\r\n this.eventListeners.remove(entry)\r\n return\r\n }\r\n }\r\n */\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Notifies command stack event listeners that the command stack has changed to the\r\n * specified state.\r\n *\r\n * @param {draw2d.command.Command} command the command\r\n * @param {Number} state the current stack state\r\n * @private\r\n **/\r\n notifyListeners: function (command, state, action) {\r\n let event = new draw2d.command.CommandStackEvent(this, command, state, action)\r\n let size = this.eventListeners.getSize()\r\n\r\n for (let i = 0; i < size; i++) {\r\n this.eventListeners.get(i).stackChanged(event)\r\n }\r\n }\r\n})\r\n\r\n\r\n// Constant indicating notification prior to executing a command (value is 1).\r\ndraw2d.command.CommandStack.PRE_EXECUTE = 1\r\n// Constant indicating notification prior to redoing a command (value is 2).\r\ndraw2d.command.CommandStack.PRE_REDO = 2\r\n// Constant indicating notification prior to undoing a command (value is 4).\r\ndraw2d.command.CommandStack.PRE_UNDO = 4\r\n// Constant indicating notification after a command has been executed (value is 8).\r\ndraw2d.command.CommandStack.POST_EXECUTE = 8\r\n// Constant indicating notification after a command has been redone (value is 16).\r\ndraw2d.command.CommandStack.POST_REDO = 16\r\n// Constant indicating notification after a command has been undone (value is 32).\r\ndraw2d.command.CommandStack.POST_UNDO = 32\r\n// Constant indicating notification after the stack has been (re)init (value is 64).\r\ndraw2d.command.CommandStack.POST_INIT = 64\r\n\r\ndraw2d.command.CommandStack.POST_MASK = draw2d.command.CommandStack.POST_EXECUTE | draw2d.command.CommandStack.POST_UNDO | draw2d.command.CommandStack.POST_REDO\r\ndraw2d.command.CommandStack.PRE_MASK = draw2d.command.CommandStack.PRE_EXECUTE | draw2d.command.CommandStack.PRE_UNDO | draw2d.command.CommandStack.PRE_REDO\r\n\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Event class which will be fired for every CommandStack operation. Required for CommandStackListener.\r\n */\r\ndraw2d.command.CommandStackEvent = Class.extend(\r\n /** @lends draw2d.command.CommandStackEvent.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandStackEvent\",\r\n\r\n /**\r\n * Create a new CommandStack objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.command.Command} command the related command\r\n * @param {Number} details the current state of the command execution\r\n *\r\n */\r\n init: function (stack, command, details, action) {\r\n this.stack = stack\r\n this.command = command\r\n this.details = details // deprecated\r\n this.action = action\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the corresponding stack of the event.\r\n *\r\n * @returns {draw2d.command.CommandStack}\r\n **/\r\n getStack: function () {\r\n return this.stack\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns null or a Command if a command is relevant to the current event.\r\n *\r\n * @returns {draw2d.command.Command}\r\n **/\r\n getCommand: function () {\r\n return this.command\r\n },\r\n\r\n /**\r\n *\r\n * Returns an integer identifying the type of event which has occurred.\r\n * Defined by {@link draw2d.command.CommandStack}.\r\n *\r\n * @returns {Number}\r\n **/\r\n getDetails: function () {\r\n return this.details\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns true if this event is fired after the stack having changed.\r\n *\r\n * @returns {Boolean} true if post-change event\r\n **/\r\n isPostChangeEvent: function () {\r\n return 0 !== (this.getDetails() & draw2d.command.CommandStack.POST_MASK)\r\n },\r\n\r\n /**\r\n *\r\n * Returns true if this event is fired prior to the stack changing.\r\n *\r\n * @returns {Boolean} true if pre-change event\r\n **/\r\n isPreChangeEvent: function () {\r\n return 0 !== (this.getDetails() & draw2d.command.CommandStack.PRE_MASK)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Event class which will be fired for every CommandStack operation. Required for CommandStackListener.\r\n * @author Andreas Herz\r\n */\r\n\r\ndraw2d.command.CommandStackEventListener = Class.extend(\r\n /** @lends draw2d.command.CommandStackEventListener.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandStackEventListener\",\r\n\r\n /**\r\n * Creates a new Listener Object\r\n *\r\n */\r\n init: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Sent when an event occurs on the command stack. draw2d.command.CommandStackEvent.getDetail()\r\n * can be used to identify the type of event which has occurred.\r\n *\r\n * @template\r\n *\r\n * @param {draw2d.command.CommandStackEvent} event\r\n **/\r\n stackChanged: function (event) {\r\n }\r\n\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * EditPolicies should determine an Figures editing capabilities.\r\n * It is possible to implement an Figure such that it handles all editing\r\n * responsibility.<br>\r\n * However, it is much more flexible and object-oriented to use\r\n * EditPolicies. Using policies, you can pick and choose the editing behavior for\r\n * an Figure without being bound to its class hierarchy. Code reuse is increased,\r\n * and code management is easier.\r\n *\r\n * @author Andreas Herz\r\n */\r\n\r\ndraw2d.command.CommandType = Class.extend(\r\n /** @lends draw2d.command.CommandType.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandType\",\r\n\r\n /**\r\n * Create a new edit policy object\r\n *\r\n * @param {String} policy\r\n */\r\n init: function (policy) {\r\n this.policy = policy\r\n },\r\n\r\n /**\r\n * \r\n * Return the String representation of the policy\r\n *\r\n * @returns {String}\r\n **/\r\n getPolicy: function () {\r\n return this.policy\r\n }\r\n})\r\n\r\ndraw2d.command.CommandType.DELETE = \"DELETE\"\r\ndraw2d.command.CommandType.MOVE = \"MOVE\"\r\ndraw2d.command.CommandType.CONNECT = \"CONNECT\"\r\ndraw2d.command.CommandType.MOVE_BASEPOINT = \"MOVE_BASEPOINT\"\r\ndraw2d.command.CommandType.MOVE_VERTEX = \"MOVE_VERTEX\"\r\ndraw2d.command.CommandType.MOVE_VERTICES = \"MOVE_VERTICES\"\r\ndraw2d.command.CommandType.MOVE_GHOST_VERTEX = \"MOVE_GHOST_VERTEX\"\r\ndraw2d.command.CommandType.RESIZE = \"RESIZE\"\r\ndraw2d.command.CommandType.RESET = \"RESET\"\r\ndraw2d.command.CommandType.ROTATE = \"ROTATE\"\r\n\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Command to ungroup a given group figures\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\n\r\ndraw2d.command.CommandUngroup = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandUngroup.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandUngroup\",\r\n\r\n /**\r\n * Create a group command for the given figure.\r\n *\r\n * @param {draw2d.Canvas} canvas the responsible canvas\r\n * @param {draw2d.util.ArrayList|draw2d.Selection} group the figures to group\r\n */\r\n init: function (canvas, group) {\r\n this._super(draw2d.Configuration.i18n.command.ungroupShapes)\r\n if (group instanceof draw2d.Selection) {\r\n this.group = group.getAll().first()\r\n }\r\n else {\r\n this.group = group\r\n }\r\n\r\n this.canvas = canvas\r\n this.figures = this.group.getAssignedFigures().clone()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n return !this.figures.isEmpty()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n let _this = this\r\n this.figures.each(function (i, figure) {\r\n _this.group.assignFigure(figure)\r\n })\r\n this.canvas.add(this.group)\r\n this.canvas.setCurrentSelection(this.group)\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n let _this = this\r\n this.figures.each(function (i, figure) {\r\n _this.group.unassignFigure(figure)\r\n })\r\n\r\n this.canvas.setCurrentSelection(this.figures)\r\n this.canvas.remove(this.group)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start();\r\n * var end = new draw2d.shape.node.End();\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * var c = new draw2d.Connection();\r\n *\r\n * // toggle from ManhattenRouter to DirectRouter to show the rotation of decorations\r\n * c.setRouter(new draw2d.layout.connection.DirectRouter());\r\n *\r\n * // Set the endpoint decorations for the connection\r\n * //\r\n * c.setSourceDecorator(new draw2d.decoration.connection.ArrowDecorator());\r\n * c.setTargetDecorator(new draw2d.decoration.connection.ArrowDecorator());\r\n *\r\n * // Connect the endpoints with the start and end port\r\n * //\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @param {Number} [width] the width of the arrow\r\n * @param {Number} [height] the height of the arrow\r\n * @extend draw2d.decoration.connection.Decorator\r\n */\r\ndraw2d.decoration.connection.ArrowDecorator = draw2d.decoration.connection.Decorator.extend(\r\n /** @lends draw2d.decoration.connection.ArrowDecorator */\r\n {\r\n NAME: \"draw2d.decoration.connection.ArrowDecorator\",\r\n\r\n init: function (width, height) {\r\n this._super(width, height)\r\n },\r\n\r\n /**\r\n * Draws a filled arrow decoration.\r\n *\r\n *\r\n * ```\r\n * ---+ [length , width/2]\r\n * ------- |\r\n * [0,0] -------- |\r\n * +--- |==========================\r\n * -------- |\r\n * ------- |\r\n * ---+ [length ,-width/2]\r\n *\r\n * ```\r\n *\r\n * @param {RaphaelPaper} paper the raphael paper object for the paint operation\r\n * @returns {RaphaelPath}\r\n * @private\r\n **/\r\n paint: function (paper) {\r\n let st = paper.set()\r\n\r\n st.push(paper.path([\"M0 0\",\r\n \"L\", this.width, \" \", -this.height / 2,\r\n \"L\", this.width, \" \", this.height / 2,\r\n \"L0 0\"].join(\"\")))\r\n\r\n st.attr({fill: this.backgroundColor.rgba()})\r\n\r\n return st\r\n }\r\n })\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start();\r\n * var end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * var c = new draw2d.Connection();\r\n *\r\n * // toggle from ManhattenRouter to DirectRouter to show the rotation of decorations\r\n * c.setRouter(new draw2d.layout.connection.DirectRouter());\r\n *\r\n * // Set the endpoint decorations for the connection\r\n * //\r\n * c.setSourceDecorator(new draw2d.decoration.connection.BarDecorator());\r\n * c.setTargetDecorator(new draw2d.decoration.connection.BarDecorator());\r\n * // Connect the endpoints with the start and end port\r\n * //\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n * @author Andreas Herz\r\n * @param {Number} [width] the width of the bar\r\n * @param {Number} [height] the height of the bar\r\n * @extend draw2d.decoration.connection.Decorator\r\n */\r\ndraw2d.decoration.connection.BarDecorator = draw2d.decoration.connection.Decorator.extend(\r\n /** @lends draw2d.decoration.connection.BarDecorator */\r\n {\r\n\r\n NAME: \"draw2d.decoration.connection.BarDecorator\",\r\n\r\n init: function (width, height) {\r\n this._super(width, height)\r\n },\r\n\r\n /**\r\n * Draw a bar decoration.\r\n *\r\n * ```\r\n *\r\n * | [length , width/2]\r\n * |\r\n * [0,0] | (Connection)\r\n * +==========|==========================\r\n * |\r\n * |\r\n * | [length ,-width/2]\r\n *\r\n * ```\r\n *\r\n * @param {RaphaelPaper} paper the raphael paper object for the paint operation\r\n * @returns {RaphaelPath}\r\n * @private\r\n **/\r\n paint: function (paper) {\r\n let st = paper.set();\r\n let path = [\"M\", this.width / 2, \" \", -this.height / 2] // Go to the top center..\r\n path.push(\"L\", this.width / 2, \" \", this.height / 2) // ...bottom center...\r\n\r\n st.push(paper.path(path.join(\"\")))\r\n st.attr({fill: this.backgroundColor.rgba()})\r\n return st\r\n }\r\n })\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start();\r\n * var end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * var c = new draw2d.Connection();\r\n *\r\n * // toggle from ManhattenRouter to DirectRouter to show the rotation of decorations\r\n * c.setRouter(new draw2d.layout.connection.DirectRouter());\r\n *\r\n * // Set the endpoint decorations for the connection\r\n * //\r\n * c.setSourceDecorator(new draw2d.decoration.connection.CircleDecorator());\r\n * c.setTargetDecorator(new draw2d.decoration.connection.CircleDecorator());\r\n * // Connect the endpoints with the start and end port\r\n * //\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n * @author Andreas Herz\r\n * @param {Number} [width] the width of the arrow\r\n * @param {Number} [height] the height of the arrow\r\n * @extend draw2d.decoration.connection.Decorator\r\n */\r\ndraw2d.decoration.connection.CircleDecorator = draw2d.decoration.connection.Decorator.extend(\r\n /** @lends draw2d.decoration.connection.CircleDecorator */\r\n {\r\n\r\n NAME: \"draw2d.decoration.connection.CircleDecorator\",\r\n\r\n init: function (width, height) {\r\n this._super(width, height)\r\n },\r\n\r\n /**\r\n * Draw a filled circle decoration.\r\n *\r\n * @param {RaphaelPaper} paper the raphael paper object for the paint operation\r\n * @returns {RaphaelPath}\r\n * @private\r\n **/\r\n paint: function (paper) {\r\n let st = paper.set()\r\n\r\n st.push(paper.circle(0, 0, this.width / 2))\r\n st.attr({fill: this.backgroundColor.rgba()})\r\n\r\n return st\r\n }\r\n })\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\nimport Color from '../../util/Color'\r\n\r\n/**\r\n * @class\r\n * Base class for any kind of Connection end/start decorations like arrows, bullets, circles, bars,...\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.decoration.connection.Decorator = Class.extend(\r\n /** @lends draw2d.decoration.connection.Decorator */\r\n {\r\n\r\n NAME: \"draw2d.decoration.connection.Decorator\",\r\n\r\n init: function (width, height) {\r\n\r\n if (typeof width === \"undefined\" || width < 1) {\r\n this.width = 20\r\n } else {\r\n this.width = width\r\n }\r\n\r\n if (typeof height === \"undefined\" || height < 1) {\r\n this.height = 15\r\n } else {\r\n this.height = height\r\n }\r\n this.parent = null\r\n this.color = null // null => use the color of the connection\r\n this.backgroundColor = new Color(250, 250, 250)\r\n },\r\n\r\n /**\r\n *\r\n * Paint the decoration for a connector. The Connector starts always in\r\n * [0,0] and ends in [x,0].\r\n * It is not necessary to consider any rotation of the connection. This will be done by the\r\n * framework.\r\n *\r\n * <pre>\r\n * | -Y\r\n * |\r\n * |\r\n * --------------+-----------------------------> +X\r\n * |\r\n * |\r\n * |\r\n * V +Y\r\n *\r\n *\r\n * </pre>\r\n *\r\n * See in ArrowConnectionDecorator for example implementation.\r\n * @param {RaphaelPaper} paper\r\n * @private\r\n */\r\n paint: function (paper) {\r\n // do nothing per default\r\n },\r\n\r\n /**\r\n *\r\n * @param {draw2d.Connection} parent\r\n * @private\r\n */\r\n setParent: function(parent){\r\n this.parent = parent\r\n },\r\n\r\n /**\r\n *\r\n * Set the stroke color for the decoration\r\n *\r\n * @param {draw2d.util.Color|String} c\r\n * @returns {this}\r\n */\r\n setColor: function (c) {\r\n this.color = new Color(c);\r\n\r\n this.parent?.repaint()\r\n return this\r\n },\r\n\r\n /**\r\n * Get the line color of the decoration\r\n *\r\n * @returns {drawd.util.Color} the current line color of null if the Decoration should use the color of the host connection\r\n */\r\n getColor: function(){\r\n return this.color\r\n },\r\n\r\n /**\r\n *\r\n * Set the background color for the decoration\r\n *\r\n * @param {draw2d.util.Color|String} c\r\n * @returns {this}\r\n */\r\n setBackgroundColor: function (c) {\r\n this.backgroundColor = new Color(c)\r\n \r\n this.parent?.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * Returns the fill color\r\n *\r\n * @returns {draw2d.util.Color}\r\n */\r\n getBackgroundColor: function(){\r\n return this.backgroundColor\r\n },\r\n\r\n /**\r\n *\r\n * Change the dimension of the decoration shape\r\n *\r\n * @param {Number} width The new width of the decoration\r\n * @param {Number} height The new height of the decoration\r\n * @returns {this}\r\n **/\r\n setDimension: function (width, height) {\r\n this.width = width\r\n this.height = height\r\n\r\n return this\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start();\r\n * var end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * var c = new draw2d.Connection();\r\n *\r\n * // toggle from ManhattenRouter to DirectRouter to show the rotation of decorations\r\n * c.setRouter(new draw2d.layout.connection.DirectRouter());\r\n *\r\n * // Set the endpoint decorations for the connection\r\n * //\r\n * c.setSourceDecorator(new draw2d.decoration.connection.DiamondDecorator());\r\n * c.setTargetDecorator(new draw2d.decoration.connection.DiamondDecorator());\r\n * // Connect the endpoints with the start and end port\r\n * //\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @param {Number} [width] the width of the arrow\r\n * @param {Number} [height] the height of the arrow\r\n * @extend draw2d.decoration.connection.Decorator\r\n */\r\n\r\ndraw2d.decoration.connection.DiamondDecorator = draw2d.decoration.connection.Decorator.extend(\r\n /** @lends draw2d.decoration.connection.DiamondDecorator */\r\n {\r\n\r\n NAME: \"draw2d.decoration.connection.DiamondDecorator\",\r\n\r\n init: function (width, height) {\r\n this._super(width, height)\r\n },\r\n\r\n /**\r\n * Draw a filled diamond decoration.\r\n *\r\n * It's not your work to rotate the arrow. The draw2d do this job for you.\r\n *\r\n * @param {RaphaelPaper} paper the raphael paper object for the paint operation\r\n * @returns {RaphaelPath}\r\n * @private\r\n **/\r\n paint: function (paper) {\r\n let st = paper.set()\r\n\r\n st.push(\r\n paper.path([\"M\", this.width / 2, \" \", -this.height / 2, // Go to the top center..\r\n \"L\", this.width, \" \", 0, // ...draw line to the right middle\r\n \"L\", this.width / 2, \" \", this.height / 2, // ...bottom center...\r\n \"L\", 0, \" \", 0, // ...left middle...\r\n \"L\", this.width / 2, \" \", -this.height / 2, // and close the path\r\n \"Z\"].join(\"\"))\r\n )\r\n\r\n st.attr({fill: this.backgroundColor.rgba()})\r\n return st\r\n }\r\n });\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * Static util function to determine the minimal distance of point(px,py) on the line(x1,y1,x2,y2)\r\n *\r\n *\r\n * @returns {Number}\r\n * @static\r\n * @private\r\n * @param {Number} X1 x coordinate of the start point of the line\r\n * @param {Number} Y1 y coordinate of the start point of the line\r\n * @param {Number} X2 x coordinate of the end point of the line\r\n * @param {Number} Y2 y coordinate of the end point of the line\r\n * @param {Number} px x coordinate of the point to test\r\n * @param {Number} py y coordinate of the point to test\r\n **/\r\ndraw2d.geo.Line = {\r\n\r\n /**\r\n * Returns the relative position of the point on the line between [0..1]\r\n * The point \"p\" must be part of the line!!\r\n *\r\n * 0 => given point is on the start location\r\n * ..=> given point is in between\r\n * 1 => given point is at the end\r\n *\r\n * @returns {Number}\r\n */\r\n inverseLerp: function (X1, Y1, X2, Y2, px, py) {\r\n let nenner = Math.abs(X2 - X1)\r\n let zaehler = Math.abs(X2 - px)\r\n if (nenner === 0) {\r\n nenner = Math.abs(Y2 - Y1)\r\n zaehler = Math.abs(Y2 - py)\r\n if (nenner === 0) {\r\n return 1\r\n }\r\n }\r\n\r\n return zaehler / nenner\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the projection of the point onto the line.\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n pointProjection: function (X1, Y1, X2, Y2, px, py) {\r\n let r = new draw2d.geo.Point(0, 0)\r\n if (X1 === X2 && Y1 === Y2) X1 -= 0.00001\r\n\r\n let U = ((px - X1) * (X2 - X1)) + ((py - Y1) * (Y2 - Y1))\r\n\r\n let Udenom = Math.pow(X2 - X1, 2) + Math.pow(Y2 - Y1, 2)\r\n\r\n U /= Udenom\r\n\r\n r.x = X1 + (U * (X2 - X1))\r\n r.y = Y1 + (U * (Y2 - Y1))\r\n\r\n let minx, maxx, miny, maxy\r\n\r\n minx = Math.min(X1, X2)\r\n maxx = Math.max(X1, X2)\r\n\r\n miny = Math.min(Y1, Y2)\r\n maxy = Math.max(Y1, Y2)\r\n\r\n let isValid = (r.x >= minx && r.x <= maxx) && (r.y >= miny && r.y <= maxy)\r\n\r\n return isValid ? r : null\r\n },\r\n\r\n distance: function (X1, Y1, X2, Y2, px, py) {\r\n // Adjust vectors relative to X1,Y1\r\n // X2,Y2 becomes relative vector from X1,Y1 to end of segment\r\n X2 -= X1\r\n Y2 -= Y1\r\n // px,py becomes relative vector from X1,Y1 to test point\r\n px -= X1\r\n py -= Y1\r\n let dotprod = px * X2 + py * Y2\r\n let projlenSq\r\n if (dotprod <= 0.0) {\r\n // px,py is on the side of X1,Y1 away from X2,Y2\r\n // distance to segment is length of px,py vector\r\n // \"length of its (clipped) projection\" is now 0.0\r\n projlenSq = 0.0\r\n } else {\r\n // switch to backwards vectors relative to X2,Y2\r\n // X2,Y2 are already the negative of X1,Y1=>X2,Y2\r\n // to get px,py to be the negative of px,py=>X2,Y2\r\n // the dot product of two negated vectors is the same\r\n // as the dot product of the two normal vectors\r\n px = X2 - px\r\n py = Y2 - py\r\n dotprod = px * X2 + py * Y2\r\n if (dotprod <= 0.0) {\r\n // px,py is on the side of X2,Y2 away from X1,Y1\r\n // distance to segment is length of (backwards) px,py vector\r\n // \"length of its (clipped) projection\" is now 0.0\r\n projlenSq = 0.0\r\n } else {\r\n // px,py is between X1,Y1 and X2,Y2\r\n // dotprod is the length of the px,py vector\r\n // projected on the X2,Y2=>X1,Y1 vector times the\r\n // length of the X2,Y2=>X1,Y1 vector\r\n projlenSq = dotprod * dotprod / (X2 * X2 + Y2 * Y2)\r\n }\r\n }\r\n // Distance to line is now the length of the relative point\r\n // vector minus the length of its projection onto the line\r\n // (which is zero if the projection falls outside the range\r\n // of the line segment).\r\n let lenSq = px * px + py * py - projlenSq\r\n if (lenSq < 0) {\r\n lenSq = 0\r\n }\r\n return Math.sqrt(lenSq)\r\n }\r\n}\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * Represents a point (x, y) in 2-dimensional space.\r\n *\r\n * @class\r\n */\r\n\r\ndraw2d.geo.Point = Class.extend(\r\n /** @lends draw2d.geo.Point.prototype */\r\n {\r\n \r\n NAME: \"draw2d.geo.Point\",\r\n\r\n /**\r\n * Creates a new Point object with the hands over coordinates.\r\n *\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {Number} y\r\n */\r\n init: function (x, y) {\r\n if (x instanceof draw2d.geo.Point) {\r\n this.x = x.x\r\n this.y = x.y\r\n }\r\n else if (!isNaN(parseFloat(x.x)) && !isNaN(parseFloat(x.y))) {\r\n this.x = x.x\r\n this.y = x.y\r\n }\r\n else {\r\n this.x = x\r\n this.y = y\r\n }\r\n\r\n\r\n // limit for the maxi/minimum boundary of this rectangle\r\n // It is not possible that the rect leave the boundary if set.\r\n this.bx = null\r\n this.by = null\r\n this.bw = null\r\n this.bh = null\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Ensure the boundary of the rectangle. If set, the rectangle keeps always inside\r\n * the boundary. It is like a virtual fence.\r\n *\r\n * @returns {this}\r\n */\r\n setBoundary: function (bx, by, bw, bh) {\r\n if (bx instanceof draw2d.geo.Rectangle) {\r\n this.bx = bx.x\r\n this.by = bx.y\r\n this.bw = bx.w\r\n this.bh = bx.h\r\n } else {\r\n this.bx = bx\r\n this.by = by\r\n this.bw = bw\r\n this.bh = bh\r\n }\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * @private\r\n * @returns {this}\r\n */\r\n adjustBoundary: function () {\r\n if (this.bx === null) {\r\n return this\r\n }\r\n this.x = Math.min(Math.max(this.bx, this.x), this.bw)\r\n this.y = Math.min(Math.max(this.by, this.y), this.bh)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Moves this Rectangle horizontally by dx and vertically by dy, then returns\r\n * this Rectangle for convenience.<br>\r\n * <br>\r\n * The method return the object itself. This allows you to do command chaining, where\r\n * you can perform multiple methods on the same elements.\r\n *\r\n * @param {Number} dx Shift along X axis\r\n * @param {Number} dy Shift along Y axis\r\n * @returns {this}\r\n **/\r\n translate: function (dx, dy) {\r\n this.x += dx\r\n this.y += dy\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * The X value of the point\r\n *\r\n * @since 0.1\r\n * @returns {Number} The x coordinate of the top left corner\r\n */\r\n getX: function () {\r\n return this.x\r\n },\r\n\r\n /**\r\n * \r\n * The y value of the point\r\n *\r\n * @returns {Number} The y coordinate of the top left corner\r\n */\r\n getY: function () {\r\n return this.y\r\n },\r\n\r\n /**\r\n * \r\n * Set the new X value of the point\r\n *\r\n * @param {Number} x the new x coordinate of the rect\r\n * @returns {this}\r\n */\r\n setX: function (x) {\r\n this.x = x\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Set the new Y value of the point\r\n *\r\n * @param {Number} y the new y coordinate of the rect\r\n * @returns {this}\r\n */\r\n setY: function (y) {\r\n this.y = y\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Set the new x/y coordinates of this point\r\n *\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {Number} [y]\r\n * @returns {this}\r\n */\r\n setPosition: function (x, y) {\r\n if (x instanceof draw2d.geo.Point) {\r\n this.x = x.x\r\n this.y = x.y\r\n }\r\n else {\r\n this.x = x\r\n this.y = y\r\n }\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Calculates the relative position of the specified Point to this Point.\r\n *\r\n * @param {draw2d.geo.Point} p The reference Point\r\n * @returns {Number} NORTH, SOUTH, EAST, or WEST, as defined in {@link draw2d.geo.PositionConstants}\r\n */\r\n getPosition: function (p) {\r\n let dx = p.x - this.x\r\n let dy = p.y - this.y\r\n if (Math.abs(dx) > Math.abs(dy)) {\r\n if (dx < 0)\r\n return draw2d.geo.PositionConstants.WEST\r\n return draw2d.geo.PositionConstants.EAST\r\n }\r\n if (dy < 0) {\r\n return draw2d.geo.PositionConstants.NORTH\r\n }\r\n return draw2d.geo.PositionConstants.SOUTH\r\n },\r\n\r\n /**\r\n * \r\n * Compares two points and return [true] if x and y are equals.\r\n *\r\n * @param {draw2d.geo.Point} p the point to compare with\r\n *\r\n * @returns {Boolean} True if the given p[x,y] has an exact match with the point\r\n */\r\n equals: function (p) {\r\n return this.x === p.x && this.y === p.y\r\n },\r\n\r\n /**\r\n * \r\n * Return the distance between this point and the hands over.\r\n *\r\n * @param {draw2d.geo.Point} other the point to use\r\n * @returns {Number} The distance to the given point\r\n */\r\n distance: function (other) {\r\n return Math.sqrt((this.x - other.x) * (this.x - other.x) + (this.y - other.y) * (this.y - other.y))\r\n },\r\n /* @deprecated */\r\n getDistance: function (other) {\r\n return this.distance(other)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the length of the vector measured from [0,0]\r\n *\r\n * @returns {Number} The length of the vector [0,0][x,y]\r\n * @since 2.10.0\r\n */\r\n length: function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y)\r\n },\r\n\r\n /**\r\n * \r\n * Return a new Point translated with the x/y values of the hands over point.\r\n *\r\n * @param {draw2d.geo.Point|Number} x the x translation or the complete point to translate\r\n * @param {Number} [y] the y translation. Required if x is a simple number instead of a draw2d.geo.Point\r\n * @returns {draw2d.geo.Point} A instance of a translated point.\r\n */\r\n translated: function (x, y) {\r\n let other = new draw2d.geo.Point(x, y)\r\n return new draw2d.geo.Point(this.x + other.x, this.y + other.y)\r\n },\r\n\r\n /**\r\n * \r\n * Scales this point with the handover factor\r\n *\r\n * @param {Number} factor the factor to scaled the point.\r\n * @returns {this}\r\n */\r\n scale: function (factor) {\r\n this.x *= factor\r\n this.y *= factor\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return a **new** Point scaled with the givben factor\r\n *\r\n * @param {Number} factor the factor to scaled the new point.\r\n * @returns {draw2d.geo.Point} The new translated point.\r\n */\r\n scaled: function (factor) {\r\n return new draw2d.geo.Point(this.x * factor, this.y * factor)\r\n },\r\n\r\n /* @deprecated */\r\n getScaled: function (factor) {\r\n return this.scaled(factor)\r\n },\r\n\r\n /**\r\n * \r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n return {\r\n x: this.x,\r\n y: this.y\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this.x = memento.x\r\n this.y = memento.y\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * substract the given point and return the **new** point.\r\n *\r\n * @param that\r\n * @returns {draw2d.geo.Point}\r\n */\r\n subtract: function (that) {\r\n return new draw2d.geo.Point(this.x - that.x, this.y - that.y)\r\n },\r\n\r\n\r\n dot: function (that) {\r\n return this.x * that.x + this.y * that.y\r\n },\r\n\r\n cross: function (that) {\r\n return this.x * that.y - this.y * that.x\r\n },\r\n\r\n\r\n lerp: function (that, t) {\r\n return new draw2d.geo.Point(this.x + (that.x - this.x) * t, this.y + (that.y - this.y) * t)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return a cloned point\r\n *\r\n * @returns {draw2d.geo.Point}\r\n */\r\n clone: function () {\r\n return new draw2d.geo.Point(this.x, this.y)\r\n }\r\n\r\n})\r\n","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n * Static values for point orientation.\r\n * \r\n */\r\ndraw2d.geo.PositionConstants = {\r\n /**\r\n *\r\n */\r\n NORTH: 1,\r\n SOUTH: 4,\r\n WEST: 8,\r\n EAST: 16\r\n}\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Represents a vector within 2-dimensional Euclidean space.\r\n * \r\n * @inheritable\r\n * @extends draw2d.geo.Point\r\n * @author Andreas Herz\r\n */\r\ndraw2d.geo.Ray = draw2d.geo.Point.extend(\r\n /** @lends draw2d.geo.Ray.prototype */\r\n {\r\n \r\n NAME: \"draw2d.geo.Ray\",\r\n \r\n /**\r\n * Creates a ray object.\r\n *\r\n * @param {Number} x\r\n * @param {Number} y\r\n */\r\n init: function( x, y)\r\n {\r\n this._super(x,y);\r\n },\r\n \r\n \r\n isHorizontal: function()\r\n {\r\n return this.x != 0;\r\n },\r\n \r\n similarity: function( otherRay)\r\n {\r\n return Math.abs(this.dot(otherRay));\r\n },\r\n \r\n getAveraged: function( otherRay)\r\n {\r\n return new draw2d.geo.Ray((this.x + otherRay.x) / 2, (this.y + otherRay.y) / 2);\r\n }\r\n\r\n});\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Represents a Rectangle(x, y, width, height).\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.geo.Point\r\n */\r\ndraw2d.geo.Rectangle = draw2d.geo.Point.extend(\r\n /** @lends draw2d.geo.Rectangle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.geo.Rectangle\",\r\n\r\n /**\r\n * Creates a new Point object with the hands over coordinates.\r\n * <br>\r\n * The constructor consumes almost any kind of rectangel definitions\r\n * like:\r\n * let rect0 = new draw2d.geo.Rectangle({x:0,y:0,width:20,height:20});\r\n * let rect1 = new draw2d.geo.Rectangle({x:0,y:0,w:20,h:20});\r\n * let rect2 = new draw2d.geo.Rectangle($(\"#divid\")[0].getBoundingClientRect());\r\n * let rect3 = new draw2d.geo.Rectangle(rect1);\r\n *\r\n * The rectangle class is usefull for any kind of intersection, hitTest, contains,...calculation\r\n * or to set the bounding box of any shape.\r\n *\r\n * @param {Number|draw2d.geo.Rectangle} x\r\n * @param {Number} y\r\n * @param {Number} w\r\n * @param {Number} h\r\n */\r\n init: function (x, y, w, h) {\r\n // try to consume any kind rectangle definitions\r\n //\r\n if (x instanceof draw2d.geo.Rectangle) {\r\n y = x.y;\r\n w = x.w;\r\n h = x.h;\r\n x = x.x;\r\n } else if (typeof x.x === \"number\" && typeof x.y === \"number\") {\r\n y = x.y;\r\n w = x.w | x.width;\r\n h = x.h | x.height;\r\n x = x.x;\r\n } else if (typeof x.top === \"number\" && typeof x.left === \"number\") {\r\n y = x.top;\r\n w = x.w | x.width;\r\n h = x.h | x.height;\r\n x = x.left;\r\n }\r\n this._super(x, y);\r\n this.w = w;\r\n this.h = h;\r\n },\r\n\r\n\r\n /**\r\n *\r\n * @private\r\n */\r\n adjustBoundary: function () {\r\n if (this.bx === null) {\r\n return;\r\n }\r\n this.x = Math.min(Math.max(this.bx, this.x), this.bw - this.w);\r\n this.y = Math.min(Math.max(this.by, this.y), this.bh - this.h);\r\n this.w = Math.min(this.w, this.bw);\r\n this.h = Math.min(this.h, this.bh);\r\n },\r\n\r\n /**\r\n *\r\n * Resizes this Rectangle by the values supplied as input and returns this for\r\n * convenience. This Rectangle's width will become this.width + dw. This\r\n * Rectangle's height will become this.height + dh.\r\n * <br>\r\n * The method return the object itself. This allows you to do command chaining, where\r\n * you can perform multiple methods on the same elements.\r\n *\r\n *\r\n * @param {Number} dw Amount by which width is to be resized\r\n * @param {Number} dh Amount by which height is to be resized\r\n * @returns {this}\r\n **/\r\n resize: function (dw, dh) {\r\n this.w += dw;\r\n this.h += dh;\r\n this.adjustBoundary();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the specified padding to the rectangle's bounds. This Rectangle's width\r\n * will become this.width + dw. The Rectangle's height will become this.height + dh.\r\n * The top left corner moves -dw/2, -dh/2\r\n *\r\n * @param {Number} dw Amount by which width is to be resized\r\n * @param {Number} dh Amount by which height is to be resized\r\n * @returns {this}\r\n **/\r\n scale: function (dw, dh) {\r\n this.w += (dw);\r\n this.h += (dh);\r\n this.x -= (dw / 2);\r\n this.y -= (dh / 2);\r\n this.adjustBoundary();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the rectangle with the given x/y coordiante.\r\n *\r\n * @param {draw2d.geo.Point|Number} x the x translation or the complete point to translate\r\n * @param {Number} [y] the y translation. Required if x is a simple number instead of a draw2d.geo.Point\r\n *\r\n *\r\n * @since 5.6.0\r\n * @returns {this}\r\n */\r\n translate: function (x, y) {\r\n let other = new draw2d.geo.Point(x, y);\r\n this.x += other.x;\r\n this.y += other.y;\r\n this.adjustBoundary();\r\n\r\n return this;\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns a copy of the translated rectangle\r\n *\r\n * @param {draw2d.geo.Point|Number} x the x translation or the complete point to translate\r\n * @param {Number} [y] the y translation. Required if x is a simple number instead of a draw2d.geo.Point\r\n *\r\n * @returns {draw2d.geo.Rectangle} The new translated rectangle.\r\n * @since 5.6.0\r\n */\r\n translated: function (x, y) {\r\n let other = new draw2d.geo.Point(x, y);\r\n return new draw2d.geo.Rectangle(this.x + other.x, this.y + other.y, this.w, this.h);\r\n },\r\n\r\n\r\n /**\r\n * Sets the parameters of this Rectangle from the Rectangle passed in and\r\n * returns this for convenience.<br>\r\n * <br>\r\n * The method return the object itself. This allows you to do command chaining, where\r\n * you can perform multiple methods on the same elements.\r\n *\r\n * @param {draw2d.geo.Rectangle} Rectangle providing the bounding values\r\n * @returns {this}\r\n */\r\n setBounds: function (rect) {\r\n this.setPosition(rect.x, rect.y);\r\n\r\n this.w = rect.w;\r\n this.h = rect.h;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n *\r\n * Returns <code>true</code> if this Rectangle's width or height is less than or\r\n * equal to 0.\r\n *\r\n * @returns {Boolean}\r\n */\r\n isEmpty: function () {\r\n return this.w <= 0 || this.h <= 0;\r\n },\r\n\r\n /**\r\n *\r\n * The width of the dimension element.\r\n *\r\n * @returns {Number}\r\n **/\r\n getWidth: function () {\r\n return this.w;\r\n },\r\n\r\n /**\r\n *\r\n * Set the new width of the rectangle.\r\n *\r\n * @param {Number} w the new width of the rectangle\r\n * @returns {this}\r\n */\r\n setWidth: function (w) {\r\n this.w = w;\r\n this.adjustBoundary();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n *\r\n * The height of the dimension element.\r\n *\r\n * @returns {Number}\r\n **/\r\n getHeight: function () {\r\n return this.h;\r\n },\r\n\r\n /**\r\n *\r\n * Set the new height of the rectangle.\r\n *\r\n * @param {Number} h the new height of the rectangle\r\n * @returns {this}\r\n */\r\n setHeight: function (h) {\r\n this.h = h;\r\n this.adjustBoundary();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n *\r\n * The x coordinate of the left corner.\r\n *\r\n * @returns {Number}\r\n **/\r\n getLeft: function () {\r\n return this.x;\r\n },\r\n\r\n /**\r\n *\r\n * The x coordinate of the right corner.\r\n *\r\n * @returns {Number}\r\n **/\r\n getRight: function () {\r\n return this.x + this.w;\r\n },\r\n\r\n /**\r\n *\r\n * The y coordinate of the top.\r\n *\r\n *@return {Number}\r\n **/\r\n getTop: function () {\r\n return this.y;\r\n },\r\n\r\n /**\r\n *\r\n * The y coordinate of the bottom.\r\n *\r\n *@return {Number}\r\n **/\r\n getBottom: function () {\r\n return this.y + this.h;\r\n },\r\n\r\n /**\r\n *\r\n * The top left corner of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getTopLeft: function () {\r\n return new draw2d.geo.Point(this.x, this.y);\r\n },\r\n\r\n /**\r\n *\r\n * The top center coordinate of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getTopCenter: function () {\r\n return new draw2d.geo.Point(this.x + (this.w / 2), this.y);\r\n },\r\n\r\n /**\r\n *\r\n * The top right corner of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getTopRight: function () {\r\n return new draw2d.geo.Point(this.x + this.w, this.y);\r\n },\r\n\r\n /**\r\n *\r\n * The center left of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getCenterLeft: function () {\r\n return new draw2d.geo.Point(this.x, this.y + (this.h / 2));\r\n },\r\n\r\n /**\r\n *\r\n * The center right of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getCenterRight: function () {\r\n return new draw2d.geo.Point(this.x+ this.w, this.y + (this.h / 2));\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The bottom left corner of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getBottomLeft: function () {\r\n return new draw2d.geo.Point(this.x, this.y + this.h);\r\n },\r\n\r\n /**\r\n *\r\n * The bottom center coordinate of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getBottomCenter: function () {\r\n return new draw2d.geo.Point(this.x + (this.w / 2), this.y + this.h);\r\n },\r\n\r\n /**\r\n *\r\n * The center of the dimension object\r\n *\r\n * @returns {draw2d.geo.Point} a new point which holds the center of the object\r\n **/\r\n getCenter: function () {\r\n return new draw2d.geo.Point(this.x + this.w / 2, this.y + this.h / 2);\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Bottom right corner of the object\r\n *\r\n * @returns {draw2d.geo.Point} a new point which holds the bottom right corner\r\n **/\r\n getBottomRight: function () {\r\n return new draw2d.geo.Point(this.x + this.w, this.y + this.h);\r\n },\r\n\r\n /**\r\n *\r\n * Return all points of the rectangle as array. Starting at topLeft and the\r\n * clockwise.\r\n *\r\n * @returns {draw2d.util.ArrayList} the points starting at top/left and the clockwise\r\n */\r\n getVertices: function () {\r\n let result = new draw2d.util.ArrayList();\r\n // don't change the order. We expect always that the top left corner has index[0]\r\n // and goes clock wise\r\n //\r\n result.add(this.getTopLeft());\r\n result.add(this.getTopRight());\r\n result.add(this.getBottomRight());\r\n result.add(this.getBottomLeft());\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n *\r\n * Return a new rectangle which fits into this rectangle. <b>ONLY</b> the x/y coordinates\r\n * will be changed. Not the dimension of the given rectangle.\r\n *\r\n * @param {draw2d.geo.Rectangle} rect the rectangle to adjust\r\n * @returns the new shifted rectangle\r\n */\r\n moveInside: function (rect) {\r\n let newRect = new draw2d.geo.Rectangle(rect.x, rect.y, rect.w, rect.h);\r\n // shift the coordinate right/down if coordinate not inside the rect\r\n //\r\n newRect.x = Math.max(newRect.x, this.x);\r\n newRect.y = Math.max(newRect.y, this.y);\r\n\r\n // ensure that the right border is inside this rect (if possible). \r\n //\r\n if (newRect.w < this.w) {\r\n newRect.x = Math.min(newRect.x + newRect.w, this.x + this.w) - newRect.w;\r\n } else {\r\n newRect.x = this.x;\r\n }\r\n\r\n // ensure that the bottom is inside this rectangle\r\n //\r\n if (newRect.h < this.h) {\r\n newRect.y = Math.min(newRect.y + newRect.h, this.y + this.h) - newRect.h;\r\n } else {\r\n newRect.y = this.y;\r\n }\r\n\r\n return newRect;\r\n },\r\n\r\n /**\r\n *\r\n * Return the minimum distance of this rectangle to the given {@link draw2d.geo.Point} or\r\n * {link draw2d.geo.Rectangle}.\r\n *\r\n * @param {draw2d.geo.Point|draw2d.geo.Rectangle} pointOrRectangle the reference point/rectangle for the distance calculation\r\n */\r\n getDistance: function (pointOrRectangle) {\r\n let cx = this.x;\r\n let cy = this.y;\r\n let cw = this.w;\r\n let ch = this.h;\r\n\r\n let ox = pointOrRectangle.getX();\r\n let oy = pointOrRectangle.getY();\r\n let ow = 1;\r\n let oh = 1;\r\n\r\n if (pointOrRectangle instanceof draw2d.geo.Rectangle) {\r\n ow = pointOrRectangle.getWidth();\r\n oh = pointOrRectangle.getHeight();\r\n }\r\n let oct = 9;\r\n\r\n // Determin Octant\r\n //\r\n // 0 | 1 | 2\r\n // __|___|__\r\n // 7 | 9 | 3\r\n // __|___|__\r\n // 6 | 5 | 4\r\n\r\n if (cx + cw <= ox) {\r\n if ((cy + ch) <= oy) {\r\n oct = 0;\r\n } else if (cy >= (oy + oh)) {\r\n oct = 6;\r\n } else {\r\n oct = 7;\r\n }\r\n } else if (cx >= ox + ow) {\r\n if (cy + ch <= oy) {\r\n oct = 2;\r\n } else if (cy >= oy + oh) {\r\n oct = 4;\r\n } else {\r\n oct = 3;\r\n }\r\n } else if (cy + ch <= oy) {\r\n oct = 1;\r\n } else if (cy >= oy + oh) {\r\n oct = 5;\r\n } else {\r\n return 0;\r\n }\r\n\r\n\r\n // Determine Distance based on Quad\r\n //\r\n switch (oct) {\r\n case 0:\r\n cx = (cx + cw) - ox;\r\n cy = (cy + ch) - oy;\r\n return -(cx + cy);\r\n case 1:\r\n return -((cy + ch) - oy);\r\n case 2:\r\n cx = (ox + ow) - cx;\r\n cy = (cy + ch) - oy;\r\n return -(cx + cy);\r\n case 3:\r\n return -((ox + ow) - cx);\r\n case 4:\r\n cx = (ox + ow) - cx;\r\n cy = (oy + oh) - cy;\r\n return -(cx + cy);\r\n case 5:\r\n return -((oy + oh) - cy);\r\n case 6:\r\n cx = (cx + cw) - ox;\r\n cy = (oy + oh) - cy;\r\n return -(cx + cy);\r\n case 7:\r\n return -((cx + cw) - ox);\r\n }\r\n\r\n throw \"Unknown data type of parameter for distance calculation in draw2d.geo.Rectangle.getDistance(..)\";\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Determin the octant of r2 in relation to this rectangle.\r\n * <pre>\r\n *\r\n * 0 | 1 | 2\r\n * __|___|__\r\n * 7 | 8 | 3\r\n * __|___|__\r\n * 6 | 5 | 4\r\n * </pre>\r\n *\r\n * @param {draw2d.geo.Rectangle} r2\r\n *\r\n */\r\n determineOctant: function (r2) {\r\n let HISTERESE = 3; // Toleranz um diese vermieden wird, dass der Octant \"8\" zurückgegeben wird\r\n\r\n let ox = this.x + HISTERESE;\r\n let oy = this.y + HISTERESE;\r\n let ow = this.w - (HISTERESE * 2);\r\n let oh = this.h - (HISTERESE * 2);\r\n\r\n let cx = r2.x;\r\n let cy = r2.y;\r\n let cw = 2;\r\n let ch = 2;\r\n if (r2 instanceof draw2d.geo.Rectangle) {\r\n cw = r2.w;\r\n ch = r2.h;\r\n }\r\n\r\n let oct = 0;\r\n\r\n if (cx + cw <= ox) {\r\n if ((cy + ch) <= oy) {\r\n oct = 0;\r\n } else if (cy >= (oy + oh)) {\r\n oct = 6;\r\n } else {\r\n oct = 7;\r\n }\r\n } else if (cx >= ox + ow) {\r\n if (cy + ch <= oy) {\r\n oct = 2;\r\n } else if (cy >= oy + oh) {\r\n oct = 4;\r\n } else {\r\n oct = 3;\r\n }\r\n } else if (cy + ch <= oy) {\r\n oct = 1;\r\n } else if (cy >= oy + oh) {\r\n oct = 5;\r\n } else {\r\n oct = 8;\r\n }\r\n\r\n return oct;\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the direction the point <i>p</i> is in relation to the given rectangle.\r\n * Util method for inherit router implementations.\r\n *\r\n * <p>\r\n * Possible values:\r\n * <ul>\r\n * <li>up -> 0</li>\r\n * <li>right -> 1</li>\r\n * <li>down -> 2</li>\r\n * <li>left -> 3</li>\r\n * </ul>\r\n * <p>\r\n *\r\n * @param {draw2d.geo.Point} other the point in relation to the given rectangle\r\n *\r\n * @returns {Number} the direction from <i>r</i> to <i>p</i>\r\n */\r\n getDirection: function (other) {\r\n let current = this.getTopLeft();\r\n switch (this.determineOctant(other)) {\r\n case 0:\r\n if ((current.x - other.x) < (current.y - other.y))\r\n return draw2d.geo.Rectangle.DIRECTION_UP;\r\n return draw2d.geo.Rectangle.DIRECTION_LEFT;\r\n case 1:\r\n return draw2d.geo.Rectangle.DIRECTION_UP;\r\n case 2:\r\n current = this.getTopRight();\r\n if ((other.x - current.x) < (current.y - other.y))\r\n return draw2d.geo.Rectangle.DIRECTION_UP;\r\n return draw2d.geo.Rectangle.DIRECTION_RIGHT;\r\n case 3:\r\n return draw2d.geo.Rectangle.DIRECTION_RIGHT;\r\n case 4:\r\n current = this.getBottomRight();\r\n if ((other.x - current.x) < (other.y - current.y))\r\n return draw2d.geo.Rectangle.DIRECTION_DOWN;\r\n return draw2d.geo.Rectangle.DIRECTION_RIGHT;\r\n case 5:\r\n return draw2d.geo.Rectangle.DIRECTION_DOWN;\r\n case 6:\r\n current = this.getBottomLeft();\r\n if ((current.x - other.x) < (other.y - current.y))\r\n return draw2d.geo.Rectangle.DIRECTION_DOWN;\r\n return draw2d.geo.Rectangle.DIRECTION_LEFT;\r\n case 7:\r\n return draw2d.geo.Rectangle.DIRECTION_LEFT;\r\n case 8:\r\n if (other.y > this.y) {\r\n return draw2d.geo.Rectangle.DIRECTION_DOWN;\r\n }\r\n return draw2d.geo.Rectangle.DIRECTION_UP;\r\n\r\n }\r\n return draw2d.geo.Rectangle.DIRECTION_UP;\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Compares two rectangle objects\r\n *\r\n * @param {draw2d.geo.Rectangle} o\r\n *\r\n * @returns {Boolean}\r\n **/\r\n equals: function (o) {\r\n return this.x == o.x && this.y == o.y && this.w == o.w && this.h == o.h;\r\n },\r\n\r\n /**\r\n *\r\n * Detect whenever the hands over coordinate is inside the rectangle.\r\n *\r\n * @param {Number/draw2d.geo.Point} iX\r\n * @param {Number} iY\r\n * @returns {Boolean}\r\n */\r\n hitTest: function (iX, iY) {\r\n if (iX instanceof draw2d.geo.Point) {\r\n iY = iX.y;\r\n iX = iX.x;\r\n }\r\n let iX2 = this.x + this.getWidth();\r\n let iY2 = this.y + this.getHeight();\r\n return (iX >= this.x && iX <= iX2 && iY >= this.y && iY <= iY2);\r\n },\r\n\r\n /**\r\n *\r\n * return true if this rectangle inside the hand over rectangle\r\n *\r\n *\r\n * @param {draw2d.geo.Rectangle} rect\r\n * @returns {Boolean}\r\n */\r\n isInside: function (rect) {\r\n return rect.hitTest(this.getTopLeft())\r\n && rect.hitTest(this.getTopRight())\r\n && rect.hitTest(this.getBottomLeft())\r\n && rect.hitTest(this.getBottomRight());\r\n },\r\n\r\n /**\r\n *\r\n * return true if this rectangle contains the hand over rectangle.\r\n *\r\n *\r\n * @param {draw2d.geo.Rectangle} rect\r\n * @returns {Boolean}\r\n * @since 4.7.2\r\n */\r\n contains: function (rect) {\r\n return this.hitTest(rect.getTopLeft())\r\n && this.hitTest(rect.getTopRight())\r\n && this.hitTest(rect.getBottomLeft())\r\n && this.hitTest(rect.getBottomRight());\r\n },\r\n\r\n /**\r\n *\r\n * checks whenever the rectangles has an intersection.\r\n *\r\n * @param {draw2d.geo.Rectangle} rect\r\n * @returns {Boolean}\r\n */\r\n intersects: function (rect) {\r\n let x11 = rect.x,\r\n y11 = rect.y,\r\n x12 = rect.x + rect.w,\r\n y12 = rect.y + rect.h,\r\n x21 = this.x,\r\n y21 = this.y,\r\n x22 = this.x + this.w,\r\n y22 = this.y + this.h;\r\n\r\n let x_overlap = Math.max(0, Math.min(x12, x22) - Math.max(x11, x21));\r\n let y_overlap = Math.max(0, Math.min(y12, y22) - Math.max(y11, y21));\r\n\r\n return x_overlap * y_overlap !== 0;\r\n },\r\n\r\n /**\r\n * Merge this rectangle with the given one.\r\n *\r\n * @param {draw2d.geo.Rectangle} rect\r\n * @since 4.8.0\r\n * @returns {this}\r\n */\r\n merge: function (rect) {\r\n let r = Math.max(rect.getRight(), this.getRight());\r\n let b = Math.max(rect.getBottom(), this.getBottom());\r\n\r\n this.setPosition(Math.min(this.x, rect.x), Math.min(this.y, rect.y));\r\n\r\n this.w = r - this.x;\r\n this.h = b - this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n *\r\n * returns the intersection points with the given line if any exists\r\n *\r\n * @param {draw2d.geo.Point} start\r\n * @param {draw2d.geo.Point} end\r\n */\r\n intersectionWithLine: function (start, end) {\r\n let result = new draw2d.util.ArrayList();\r\n let v = this.getVertices();\r\n v.add(v.first());\r\n let p1 = v.first();\r\n let p2 = null;\r\n for (let i = 1; i < 5; i++) {\r\n p2 = v.get(i);\r\n p1 = draw2d.shape.basic.Line.intersection(start, end, p1, p2);\r\n if (p1 !== null) {\r\n result.add(p1);\r\n }\r\n p1 = p2;\r\n }\r\n return result;\r\n },\r\n\r\n /**\r\n *\r\n * Returns a copy of this rectangle\r\n *\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n * @since 5.6.0\r\n */\r\n clone: function () {\r\n return new draw2d.geo.Rectangle(this.x, this.y, this.w, this.h);\r\n },\r\n\r\n /**\r\n *\r\n * converts the rectangle to JSON representation. required for the draw2d.io.Writer\r\n *\r\n * @returns {Object}\r\n */\r\n toJSON: function () {\r\n return {\r\n width: this.w,\r\n height: this.h,\r\n x: this.x,\r\n y: this.y\r\n };\r\n }\r\n\r\n });\r\n\r\n/**\r\n * ENUM for Direction\r\n */\r\ndraw2d.geo.Rectangle.DIRECTION_UP = 0;\r\ndraw2d.geo.Rectangle.DIRECTION_RIGHT = 1;\r\ndraw2d.geo.Rectangle.DIRECTION_DOWN = 2;\r\ndraw2d.geo.Rectangle.DIRECTION_LEFT = 3;\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Geometric utils functions used in ray, point and some routers.\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.geo.Util = {\r\n\r\n /**\r\n *\r\n * @param start {draw2d.geo.Point} start point of a line\r\n * @param end {draw2d.geo.Point} end point of a line\r\n * @param distanceFromStart {Number} distance from the start point to extrapolate a new point\r\n * @returns {{x: *, y: *}|*} a new point with the distance *distanceFromStart* from the start point\r\n */\r\n insetPoint: function (start, end, distanceFromStart) {\r\n if (start.equals(end)) {\r\n return start\r\n }\r\n let vx = start.x - end.x\r\n let vy = start.y - end.y\r\n let length = Math.sqrt(vx * vx + vy * vy)\r\n let localDistance = Math.min(length / 2, distanceFromStart)\r\n return {\r\n x: end.x + vx / length * (length - localDistance),\r\n y: end.y + vy / length * (length - localDistance)\r\n }\r\n }\r\n}\r\n","import draw2d from 'packages'\r\nexport default draw2d;\r\n\r\n\r\nimport raph from 'lib/raphael.exec.js'\r\nimport cl from 'lib/Class.exec.js'\r\nimport path from 'lib/pathfinding.exec.js'\r\n\r\n\r\nrequire('./util/raphael_ext');\r\nrequire('./util/Polyfill');\r\nrequire('./util/Base64');\r\nrequire('./util/Debug');\r\n// require('./util/Color');\r\n\r\nrequire('./util/ArrayList');\r\nrequire('./util/SVGUtil');\r\n//require('./util/JSONUtil');\r\n//require('./util/UUID');\r\nrequire('./util/spline/Spline');\r\nrequire('./util/spline/CubicSpline');\r\nrequire('./util/spline/CatmullRomSpline');\r\nrequire('./util/spline/BezierSpline');\r\nrequire('./geo/PositionConstants');\r\nrequire('./geo/Point');\r\nrequire('./geo/Rectangle');\r\nrequire('./geo/Util');\r\nrequire('./geo/Ray');\r\nrequire('./geo/Line');\r\nrequire('./command/CommandType');\r\nrequire('./command/Command');\r\nrequire('./command/CommandCollection');\r\nrequire('./command/CommandStack');\r\nrequire('./command/CommandStackEvent');\r\nrequire('./command/CommandStackEventListener');\r\nrequire('./command/CommandMove');\r\nrequire('./command/CommandAttr');\r\nrequire('./command/CommandMoveLine');\r\nrequire('./command/CommandMoveConnection');\r\nrequire('./command/CommandMoveVertex');\r\nrequire('./command/CommandMoveVertices');\r\nrequire('./command/CommandResize');\r\nrequire('./command/CommandRotate');\r\nrequire('./command/CommandConnect');\r\nrequire('./command/CommandReconnect');\r\nrequire('./command/CommandDelete');\r\nrequire('./command/CommandDeleteGroup');\r\nrequire('./command/CommandAdd');\r\nrequire('./command/CommandGroup');\r\nrequire('./command/CommandUngroup');\r\nrequire('./command/CommandAddVertex');\r\nrequire('./command/CommandAssignFigure');\r\nrequire('./command/CommandBoundingBox');\r\nrequire('./command/CommandRemoveVertex');\r\nrequire('./command/CommandReplaceVertices');\r\nrequire('./layout/connection/ConnectionRouter');\r\nrequire('./layout/connection/DirectRouter');\r\nrequire('./layout/connection/RubberbandRouter');\r\nrequire('./layout/connection/VertexRouter');\r\nrequire('./layout/connection/ManhattanConnectionRouter');\r\nrequire('./layout/connection/ManhattanBridgedConnectionRouter');\r\nrequire('./layout/connection/InteractiveManhattanConnectionRouter');\r\nrequire('./layout/connection/CircuitConnectionRouter');\r\nrequire('./layout/connection/SplineConnectionRouter');\r\nrequire('./layout/connection/FanConnectionRouter');\r\nrequire('./layout/connection/MazeConnectionRouter');\r\nrequire('./layout/connection/MuteableManhattanConnectionRouter');\r\nrequire('./layout/connection/SketchConnectionRouter');\r\nrequire('./layout/mesh/MeshLayouter');\r\nrequire('./layout/mesh/ExplodeLayouter');\r\nrequire('./layout/mesh/ProposedMeshChange');\r\nrequire('./layout/locator/Locator');\r\nrequire('./layout/locator/PortLocator');\r\nrequire('./layout/locator/DraggableLocator');\r\nrequire('./layout/locator/SmartDraggableLocator');\r\nrequire('./layout/locator/XYAbsPortLocator');\r\nrequire('./layout/locator/XYRelPortLocator');\r\nrequire('./layout/locator/InputPortLocator');\r\nrequire('./layout/locator/OutputPortLocator');\r\nrequire('./layout/locator/ConnectionLocator');\r\nrequire('./layout/locator/ManhattanMidpointLocator');\r\nrequire('./layout/locator/PolylineMidpointLocator');\r\nrequire('./layout/locator/ParallelMidpointLocator');\r\nrequire('./layout/locator/TopLocator');\r\nrequire('./layout/locator/BottomLocator');\r\nrequire('./layout/locator/LeftLocator');\r\nrequire('./layout/locator/RightLocator');\r\nrequire('./layout/locator/CenterLocator');\r\nrequire('./policy/EditPolicy');\r\nrequire('./policy/canvas/CanvasPolicy');\r\nrequire('./policy/canvas/ZoomPolicy');\r\nrequire('./policy/canvas/WheelZoomPolicy');\r\nrequire('./policy/canvas/KeyboardPolicy');\r\nrequire('./policy/canvas/DefaultKeyboardPolicy');\r\nrequire('./policy/canvas/ExtendedKeyboardPolicy');\r\nrequire('./policy/canvas/SelectionPolicy');\r\nrequire('./policy/canvas/SingleSelectionPolicy');\r\nrequire('./policy/canvas/GhostMoveSelectionPolicy');\r\nrequire('./policy/canvas/PanningSelectionPolicy');\r\nrequire('./policy/canvas/BoundingboxSelectionPolicy');\r\nrequire('./policy/canvas/ReadOnlySelectionPolicy');\r\nrequire('./policy/canvas/DecorationPolicy');\r\nrequire('./policy/canvas/FadeoutDecorationPolicy');\r\nrequire('./policy/canvas/CoronaDecorationPolicy');\r\nrequire('./policy/canvas/SnapToEditPolicy');\r\nrequire('./policy/canvas/ShowDimetricGridEditPolicy');\r\nrequire('./policy/canvas/SnapToDimetricGridEditPolicy');\r\nrequire('./policy/canvas/ShowGridEditPolicy');\r\nrequire('./policy/canvas/SnapToGridEditPolicy');\r\nrequire('./policy/canvas/ShowDotEditPolicy');\r\nrequire('./policy/canvas/ShowChessboardEditPolicy');\r\nrequire('./policy/canvas/SnapToGeometryEditPolicy');\r\nrequire('./policy/canvas/SnapToVerticesEditPolicy');\r\nrequire('./policy/canvas/SnapToInBetweenEditPolicy');\r\nrequire('./policy/canvas/SnapToCenterEditPolicy');\r\nrequire('./policy/canvas/DropInterceptorPolicy');\r\nrequire('./policy/connection/ConnectionCreatePolicy');\r\nrequire('./policy/connection/ComposedConnectionCreatePolicy');\r\nrequire('./policy/connection/ClickConnectionCreatePolicy');\r\nrequire('./policy/connection/OrthogonalConnectionCreatePolicy');\r\nrequire('./policy/connection/DragConnectionCreatePolicy');\r\nrequire('./policy/figure/FigureEditPolicy');\r\nrequire('./policy/figure/DragDropEditPolicy');\r\nrequire('./policy/figure/RegionEditPolicy');\r\nrequire('./policy/figure/HorizontalEditPolicy');\r\nrequire('./policy/figure/VerticalEditPolicy');\r\nrequire('./policy/figure/SelectionPolicy');\r\nrequire('./policy/figure/SelectionFeedbackPolicy');\r\nrequire('./policy/figure/ResizeSelectionFeedbackPolicy');\r\nrequire('./policy/figure/RectangleSelectionFeedbackPolicy');\r\nrequire('./policy/figure/RaftSelectionFeedbackPolicy');\r\nrequire('./policy/figure/BigRectangleSelectionFeedbackPolicy');\r\nrequire('./policy/figure/RoundRectangleSelectionFeedbackPolicy');\r\nrequire('./policy/figure/BusSelectionFeedbackPolicy');\r\nrequire('./policy/figure/WidthSelectionFeedbackPolicy');\r\nrequire('./policy/figure/VBusSelectionFeedbackPolicy');\r\nrequire('./policy/figure/HBusSelectionFeedbackPolicy');\r\nrequire('./policy/figure/AntSelectionFeedbackPolicy');\r\nrequire('./policy/figure/GlowSelectionFeedbackPolicy');\r\nrequire('./policy/figure/SlimSelectionFeedbackPolicy');\r\nrequire('./policy/figure/VertexSelectionFeedbackPolicy');\r\nrequire('./policy/line/LineSelectionFeedbackPolicy');\r\nrequire('./policy/line/VertexSelectionFeedbackPolicy');\r\nrequire('./policy/line/OrthogonalSelectionFeedbackPolicy');\r\nrequire('./policy/port/PortFeedbackPolicy');\r\nrequire('./policy/port/ElasticStrapFeedbackPolicy');\r\nrequire('./policy/port/IntrusivePortsFeedbackPolicy');\r\nrequire('./Configuration');\r\nrequire('./HeadlessCanvas');\r\nrequire('./Canvas');\r\nrequire('./Selection');\r\nrequire('./Figure');\r\nrequire('./shape/node/Node');\r\nrequire('./VectorFigure');\r\nrequire('./shape/basic/Rectangle');\r\nrequire('./SetFigure');\r\nrequire('./SVGFigure');\r\nrequire('./shape/node/Hub');\r\nrequire('./shape/node/HorizontalBus');\r\nrequire('./shape/node/VerticalBus');\r\nrequire('./shape/node/Fulcrum');\r\nrequire('./shape/basic/Arc');\r\nrequire('./shape/basic/Oval');\r\nrequire('./shape/basic/Circle');\r\nrequire('./shape/basic/Label');\r\nrequire('./shape/basic/Text');\r\nrequire('./shape/basic/Line');\r\nrequire('./shape/basic/PolyLine');\r\nrequire('./shape/basic/Image');\r\nrequire('./shape/basic/Polygon');\r\nrequire('./shape/basic/Diamond');\r\nrequire('./shape/dimetric/Rectangle');\r\nrequire('./shape/composite/Composite');\r\nrequire('./shape/composite/StrongComposite');\r\nrequire('./shape/composite/Group');\r\nrequire('./shape/composite/Jailhouse');\r\nrequire('./shape/composite/WeakComposite');\r\nrequire('./shape/composite/Raft');\r\nrequire('./Connection');\r\nrequire('./VectorFigure');\r\nrequire('./ResizeHandle');\r\nrequire('./shape/composite/RaftResizeHandle');\r\nrequire('./shape/basic/LineResizeHandle');\r\nrequire('./shape/basic/LineStartResizeHandle');\r\nrequire('./shape/basic/LineEndResizeHandle');\r\nrequire('./shape/basic/VertexResizeHandle');\r\nrequire('./shape/basic/GhostVertexResizeHandle');\r\nrequire('./Port');\r\nrequire('./InputPort');\r\nrequire('./OutputPort');\r\nrequire('./HybridPort');\r\nrequire('./layout/anchor/ConnectionAnchor');\r\nrequire('./layout/anchor/ChopboxConnectionAnchor');\r\nrequire('./layout/anchor/FanConnectionAnchor');\r\nrequire('./layout/anchor/ShortesPathConnectionAnchor');\r\nrequire('./layout/anchor/CenterEdgeConnectionAnchor');\r\nrequire('./shape/arrow/CalligrapherArrowLeft');\r\nrequire('./shape/arrow/CalligrapherArrowDownLeft');\r\nrequire('./shape/node/Start');\r\nrequire('./shape/node/End');\r\nrequire('./shape/node/Between');\r\nrequire('./shape/note/PostIt');\r\nrequire('./shape/flowchart/Document');\r\nrequire('./shape/widget/Widget');\r\nrequire('./shape/widget/Slider');\r\nrequire('./shape/diagram/Diagram');\r\nrequire('./shape/diagram/Pie');\r\nrequire('./shape/diagram/Sparkline');\r\nrequire('./shape/analog/OpAmp');\r\nrequire('./shape/analog/ResistorBridge');\r\nrequire('./shape/analog/ResistorVertical');\r\nrequire('./shape/analog/VoltageSupplyHorizontal');\r\nrequire('./shape/analog/VoltageSupplyVertical');\r\nrequire('./shape/layout/Layout');\r\nrequire('./shape/layout/HorizontalLayout');\r\nrequire('./shape/layout/VerticalLayout');\r\nrequire('./shape/layout/TableLayout');\r\nrequire('./shape/layout/FlexGridLayout');\r\nrequire('./shape/layout/StackLayout');\r\nrequire('./shape/icon/Icon');\r\nrequire('./shape/icon/Thunder');\r\nrequire('./shape/icon/Snow');\r\nrequire('./shape/icon/Hail');\r\nrequire('./shape/icon/Rain');\r\nrequire('./shape/icon/Cloudy');\r\nrequire('./shape/icon/Sun');\r\nrequire('./shape/icon/Undo');\r\nrequire('./shape/icon/Detour');\r\nrequire('./shape/icon/Merge');\r\nrequire('./shape/icon/Split');\r\nrequire('./shape/icon/Fork');\r\nrequire('./shape/icon/ForkAlt');\r\nrequire('./shape/icon/Exchange');\r\nrequire('./shape/icon/Shuffle');\r\nrequire('./shape/icon/Refresh');\r\nrequire('./shape/icon/Ccw');\r\nrequire('./shape/icon/Acw');\r\nrequire('./shape/icon/Contract');\r\nrequire('./shape/icon/Expand');\r\nrequire('./shape/icon/Stop');\r\nrequire('./shape/icon/End');\r\nrequire('./shape/icon/Start');\r\nrequire('./shape/icon/Ff');\r\nrequire('./shape/icon/Rw');\r\nrequire('./shape/icon/ArrowRight');\r\nrequire('./shape/icon/ArrowLeft');\r\nrequire('./shape/icon/ArrowUp');\r\nrequire('./shape/icon/ArrowDown');\r\nrequire('./shape/icon/ArrowLeft2');\r\nrequire('./shape/icon/ArrowRight2');\r\nrequire('./shape/icon/Smile2');\r\nrequire('./shape/icon/Smile');\r\nrequire('./shape/icon/Alarm');\r\nrequire('./shape/icon/Clock');\r\nrequire('./shape/icon/StopWatch');\r\nrequire('./shape/icon/History');\r\nrequire('./shape/icon/Future');\r\nrequire('./shape/icon/GlobeAlt2');\r\nrequire('./shape/icon/GlobeAlt');\r\nrequire('./shape/icon/Globe');\r\nrequire('./shape/icon/Warning');\r\nrequire('./shape/icon/Code');\r\nrequire('./shape/icon/Pensil');\r\nrequire('./shape/icon/Pen');\r\nrequire('./shape/icon/Plus');\r\nrequire('./shape/icon/Minus');\r\nrequire('./shape/icon/TShirt');\r\nrequire('./shape/icon/Sticker');\r\nrequire('./shape/icon/Page2');\r\nrequire('./shape/icon/Page');\r\nrequire('./shape/icon/Landscape1');\r\nrequire('./shape/icon/Landscape2');\r\nrequire('./shape/icon/Plugin');\r\nrequire('./shape/icon/Bookmark');\r\nrequire('./shape/icon/Hammer');\r\nrequire('./shape/icon/Users');\r\nrequire('./shape/icon/User');\r\nrequire('./shape/icon/Customer');\r\nrequire('./shape/icon/Employee');\r\nrequire('./shape/icon/Anonymous');\r\nrequire('./shape/icon/Skull');\r\nrequire('./shape/icon/Mail');\r\nrequire('./shape/icon/Picture');\r\nrequire('./shape/icon/Bubble');\r\nrequire('./shape/icon/CodeTalk');\r\nrequire('./shape/icon/Talkq');\r\nrequire('./shape/icon/Talke');\r\nrequire('./shape/icon/Home');\r\nrequire('./shape/icon/Lock');\r\nrequire('./shape/icon/Clip');\r\nrequire('./shape/icon/Star');\r\nrequire('./shape/icon/StarOff');\r\nrequire('./shape/icon/Star2');\r\nrequire('./shape/icon/Star2Off');\r\nrequire('./shape/icon/Star3');\r\nrequire('./shape/icon/Star3Off');\r\nrequire('./shape/icon/Chat');\r\nrequire('./shape/icon/Quote');\r\nrequire('./shape/icon/Gear2');\r\nrequire('./shape/icon/Gear');\r\nrequire('./shape/icon/Wrench');\r\nrequire('./shape/icon/Wrench2');\r\nrequire('./shape/icon/Wrench3');\r\nrequire('./shape/icon/ScrewDriver');\r\nrequire('./shape/icon/HammerAndScrewDriver');\r\nrequire('./shape/icon/Magic');\r\nrequire('./shape/icon/Download');\r\nrequire('./shape/icon/View');\r\nrequire('./shape/icon/Noview');\r\nrequire('./shape/icon/Cloud');\r\nrequire('./shape/icon/Cloud2');\r\nrequire('./shape/icon/CloudDown');\r\nrequire('./shape/icon/CloudUp');\r\nrequire('./shape/icon/Location');\r\nrequire('./shape/icon/Volume0');\r\nrequire('./shape/icon/Volume1');\r\nrequire('./shape/icon/Volume2');\r\nrequire('./shape/icon/Volume3');\r\nrequire('./shape/icon/Key');\r\nrequire('./shape/icon/Ruler');\r\nrequire('./shape/icon/Power');\r\nrequire('./shape/icon/Unlock');\r\nrequire('./shape/icon/Flag');\r\nrequire('./shape/icon/Tag');\r\nrequire('./shape/icon/Search');\r\nrequire('./shape/icon/ZoomOut');\r\nrequire('./shape/icon/ZoomIn');\r\nrequire('./shape/icon/Cross');\r\nrequire('./shape/icon/Check');\r\nrequire('./shape/icon/Settings');\r\nrequire('./shape/icon/SettingsAlt');\r\nrequire('./shape/icon/Feed');\r\nrequire('./shape/icon/Bug');\r\nrequire('./shape/icon/Link');\r\nrequire('./shape/icon/Calendar');\r\nrequire('./shape/icon/Picker');\r\nrequire('./shape/icon/No');\r\nrequire('./shape/icon/CommandLine');\r\nrequire('./shape/icon/Photo');\r\nrequire('./shape/icon/Printer');\r\nrequire('./shape/icon/Export');\r\nrequire('./shape/icon/Import');\r\nrequire('./shape/icon/Run');\r\nrequire('./shape/icon/Magnet');\r\nrequire('./shape/icon/NoMagnet');\r\nrequire('./shape/icon/ReflectH');\r\nrequire('./shape/icon/ReflectV');\r\nrequire('./shape/icon/Resize2');\r\nrequire('./shape/icon/Rotate');\r\nrequire('./shape/icon/Connect');\r\nrequire('./shape/icon/Disconnect');\r\nrequire('./shape/icon/Folder');\r\nrequire('./shape/icon/Man');\r\nrequire('./shape/icon/Woman');\r\nrequire('./shape/icon/People');\r\nrequire('./shape/icon/Parent');\r\nrequire('./shape/icon/Notebook');\r\nrequire('./shape/icon/Diagram');\r\nrequire('./shape/icon/BarChart');\r\nrequire('./shape/icon/PieChart');\r\nrequire('./shape/icon/LineChart');\r\nrequire('./shape/icon/Apps');\r\nrequire('./shape/icon/Locked');\r\nrequire('./shape/icon/Ppt');\r\nrequire('./shape/icon/Lab');\r\nrequire('./shape/icon/Umbrella');\r\nrequire('./shape/icon/Dry');\r\nrequire('./shape/icon/Ipad');\r\nrequire('./shape/icon/Iphone');\r\nrequire('./shape/icon/Jigsaw');\r\nrequire('./shape/icon/Lamp');\r\nrequire('./shape/icon/Lamp_alt');\r\nrequire('./shape/icon/Video');\r\nrequire('./shape/icon/Palm');\r\nrequire('./shape/icon/Fave');\r\nrequire('./shape/icon/Help');\r\nrequire('./shape/icon/Crop');\r\nrequire('./shape/icon/BioHazard');\r\nrequire('./shape/icon/WheelChair');\r\nrequire('./shape/icon/Mic');\r\nrequire('./shape/icon/MicMute');\r\nrequire('./shape/icon/IMac');\r\nrequire('./shape/icon/Pc');\r\nrequire('./shape/icon/Cube');\r\nrequire('./shape/icon/FullCube');\r\nrequire('./shape/icon/Font');\r\nrequire('./shape/icon/Trash');\r\nrequire('./shape/icon/NewWindow');\r\nrequire('./shape/icon/DockRight');\r\nrequire('./shape/icon/DockLeft');\r\nrequire('./shape/icon/DockBottom');\r\nrequire('./shape/icon/DockTop');\r\nrequire('./shape/icon/Pallete');\r\nrequire('./shape/icon/Cart');\r\nrequire('./shape/icon/Glasses');\r\nrequire('./shape/icon/Package');\r\nrequire('./shape/icon/Book');\r\nrequire('./shape/icon/Books');\r\nrequire('./shape/icon/Icons');\r\nrequire('./shape/icon/List');\r\nrequire('./shape/icon/Db');\r\nrequire('./shape/icon/Paper');\r\nrequire('./shape/icon/TakeOff');\r\nrequire('./shape/icon/Landing');\r\nrequire('./shape/icon/Plane');\r\nrequire('./shape/icon/Phone');\r\nrequire('./shape/icon/HangUp');\r\nrequire('./shape/icon/SlideShare');\r\nrequire('./shape/icon/Twitter');\r\nrequire('./shape/icon/TwitterBird');\r\nrequire('./shape/icon/Skype');\r\nrequire('./shape/icon/Windows');\r\nrequire('./shape/icon/Apple');\r\nrequire('./shape/icon/Linux');\r\nrequire('./shape/icon/NodeJs');\r\nrequire('./shape/icon/JQuery');\r\nrequire('./shape/icon/Sencha');\r\nrequire('./shape/icon/Vim');\r\nrequire('./shape/icon/InkScape');\r\nrequire('./shape/icon/Aumade');\r\nrequire('./shape/icon/Firefox');\r\nrequire('./shape/icon/Ie');\r\nrequire('./shape/icon/Ie9');\r\nrequire('./shape/icon/Opera');\r\nrequire('./shape/icon/Chrome');\r\nrequire('./shape/icon/Safari');\r\nrequire('./shape/icon/LinkedIn');\r\nrequire('./shape/icon/Flickr');\r\nrequire('./shape/icon/GitHub');\r\nrequire('./shape/icon/GitHubAlt');\r\nrequire('./shape/icon/Raphael');\r\nrequire('./shape/icon/GRaphael');\r\nrequire('./shape/icon/Svg');\r\nrequire('./shape/icon/Usb');\r\nrequire('./shape/icon/Ethernet');\r\nrequire('./shape/pert/Activity');\r\nrequire('./shape/pert/Start');\r\nrequire('./shape/state/Start');\r\nrequire('./shape/state/End');\r\nrequire('./shape/state/State');\r\nrequire('./shape/state/Connection');\r\nrequire('./ui/LabelEditor');\r\nrequire('./ui/LabelInplaceEditor');\r\nrequire('./decoration/connection/Decorator');\r\nrequire('./decoration/connection/ArrowDecorator');\r\nrequire('./decoration/connection/DiamondDecorator');\r\nrequire('./decoration/connection/CircleDecorator');\r\nrequire('./decoration/connection/BarDecorator');\r\nrequire('./io/Reader');\r\nrequire('./io/Writer');\r\nrequire('./io/svg/Writer');\r\nrequire('./io/png/Writer');\r\nrequire('./io/json/Writer');\r\nrequire('./io/json/Reader');\r\n","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n * Template class for general import of a document into the canvas.\r\n *\r\n * @author andreas Herz\r\n */\r\ndraw2d.io.Reader = Class.extend(\r\n /** @lends draw2d.io.Reader */\r\n {\r\n\r\n init: function(){\r\n\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Restore the canvas from a given String.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to restore\r\n * @param {Object} document the document to read\r\n *\r\n * @returns {draw2d.util.ArrayList} the added elements\r\n * @template\r\n */\r\n unmarshal: function(canvas, document){\r\n // do nothing. Inherit classes must implement this method\r\n }\r\n\r\n});\r\n","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Serialize the canvas to an external format. This is only a template/interface class.\r\n * Inherit classes must implement the export format.\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.io.Writer = Class.extend(\r\n /** @lends draw2d.io.Writer */\r\n\r\n {\r\n init: function(){\r\n },\r\n\r\n /**\r\n * \r\n * Export the content to the implemented data format. Inherit class implements\r\n * content specific writer.\r\n * <br>\r\n * <br>\r\n *\r\n * Method signature has been changed from version 2.10.1 to version 3.0.0.<br>\r\n * The parameter <b>resultCallback</b> is required and new. The method calls\r\n * the callback instead of return the result.\r\n *\r\n * @template\r\n * @since 2.10.1\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Function} resultCallback the method to call on success. The first argument is the result object, the second the base64 content of a corresponding file\r\n * @returns {Object}\r\n *\r\n */\r\n marshal: function(canvas, resultCallback){\r\n // I change the API signature from version 2.10.1 to 3.0.0. Throw an exception\r\n // if any application not care about this changes.\r\n if(typeof resultCallback !== \"function\"){\r\n throw \"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.\";\r\n }\r\n\r\n\r\n resultCallback(\"\", \"\");\r\n },\r\n\r\n /**\r\n * \r\n * utility method to format a given XML string.\r\n *\r\n * @param xml\r\n * @returns {String}\r\n */\r\n formatXml: function(xml) {\r\n let formatted = '';\r\n let reg = new RegExp(\"(>)(<)(\\/*)\",\"g\");\r\n xml = xml.replace(reg, '$1\\r\\n$2$3');\r\n let pad = 0;\r\n xml.split('\\r\\n').forEach(function(node) {\r\n let indent = 0;\r\n if (node.match( new RegExp(\".+<\\/\\w[^>]*>$\") )) {\r\n indent = 0;\r\n } else if (node.match( new RegExp(\"^<\\/\\w\") )) {\r\n if (pad != 0) {\r\n pad -= 1;\r\n }\r\n } else if (node.match( new RegExp(\"^<\\w[^>]*[^\\/]>.*$\") )) {\r\n indent = 1;\r\n } else {\r\n indent = 0;\r\n }\r\n\r\n var padding = '';\r\n for (var i = 0; i < pad; i++) {\r\n padding += ' ';\r\n }\r\n\r\n formatted += padding + node + '\\r\\n';\r\n pad += indent;\r\n });\r\n\r\n return formatted;\r\n }\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Read a JSON data and import them into the canvas. The JSON must be generated with the\r\n * {@link draw2d.io.json.Writer}.\r\n *\r\n * @example\r\n *\r\n * // Load a standard draw2d JSON object into the canvas\r\n * //\r\n * let jsonDocument =\r\n * [\r\n * {\r\n * \"type\": \"draw2d.shape.basic.Oval\",\r\n * \"id\": \"5b4c74 b0-96d1-1aa3-7eca-bbeaed5fffd7\",\r\n * \"x\": 237,\r\n * \"y\": 236,\r\n * \"width\": 93,\r\n * \"height\": 38\r\n * },\r\n * {\r\n * \"type\": \"draw2d.shape.basic.Rectangle\",\r\n * \"id\": \"354fa3b9-a834-0221-2009-abc2d6bd852a\",\r\n * \"x\": 225,\r\n * \"y\": 97,\r\n * \"width\": 201,\r\n * \"height\": 82,\r\n * \"radius\": 2\r\n * }\r\n * ];\r\n * // unmarshal the JSON document into the canvas\r\n * // (load)\r\n * let reader = new draw2d.io.json.Reader();\r\n * reader.unmarshal(canvas, jsonDocument);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.io.Reader\r\n */\r\ndraw2d.io.json.Reader = draw2d.io.Reader.extend(\r\n /** @lends draw2d.io.json.Reader.prototype */\r\n {\r\n NAME: \"draw2d.io.json.Reader\",\r\n\r\n init: function () {\r\n this._super();\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Restore the canvas from a given JSON object.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to restore\r\n * @param {Object|String} json the json object to load.\r\n */\r\n unmarshal: function (canvas, json) {\r\n let result = new draw2d.util.ArrayList();\r\n\r\n if (typeof json === \"string\") {\r\n json = JSON.parse(json);\r\n }\r\n\r\n let node = null;\r\n json.forEach((element) => {\r\n try {\r\n let o = this.createFigureFromElement(element) || this.createFigureFromType(element.type);\r\n let source = null;\r\n let target = null;\r\n for (let i in element) {\r\n let val = element[i];\r\n if (i === \"source\") {\r\n node = canvas.getFigure(val.node);\r\n if (node === null) {\r\n throw \"Source figure with id '\" + val.node + \"' not found\";\r\n }\r\n source = node.getPort(val.port);\r\n if (source === null) {\r\n throw \"Unable to find source port '\" + val.port + \"' at figure '\" + val.node + \"' to unmarschal '\" + element.type + \"'\";\r\n }\r\n } else if (i === \"target\") {\r\n node = canvas.getFigure(val.node);\r\n if (node === null) {\r\n throw \"Target figure with id '\" + val.node + \"' not found\";\r\n }\r\n target = node.getPort(val.port);\r\n if (target === null) {\r\n throw \"Unable to find target port '\" + val.port + \"' at figure '\" + val.node + \"' to unmarschal '\" + element.type + \"'\";\r\n }\r\n }\r\n }\r\n if (source !== null && target !== null) {\r\n // don't change the order or the source/target set.\r\n // TARGET must always be the second one because some applications needs the \"source\"\r\n // port in the \"connect\" event of the target.\r\n o.setSource(source)\r\n o.setTarget(target)\r\n }\r\n o.setPersistentAttributes(element)\r\n canvas.add(o)\r\n result.add(o)\r\n } catch (exc) {\r\n debug.error(element, \"Unable to instantiate figure type '\" + element.type + \"' with id '\" + element.id + \"' during unmarshal by \" + this.NAME + \". Skipping figure..\");\r\n debug.error(exc)\r\n debug.warn(element)\r\n }\r\n });\r\n\r\n // restore group assignment\r\n //\r\n json.forEach(element => {\r\n if (typeof element.composite !== \"undefined\") {\r\n let figure = canvas.getFigure(element.id);\r\n if (figure === null) {\r\n figure = canvas.getLine(element.id);\r\n }\r\n let group = canvas.getFigure(element.composite);\r\n group.assignFigure(figure);\r\n }\r\n });\r\n\r\n // recalculate all crossings and repaint the connections with\r\n // possible crossing decoration\r\n canvas.calculateConnectionIntersection();\r\n canvas.getLines().each((i, line) => {\r\n line.svgPathString = null;\r\n line.repaint();\r\n });\r\n canvas.linesToRepaintAfterDragDrop = canvas.getLines().clone();\r\n\r\n canvas.showDecoration();\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n *\r\n * Factory method to create an instance of the given element type.\r\n *\r\n * @param {String} type\r\n * @returns {draw2d.Figure}\r\n */\r\n createFigureFromType: function (type) {\r\n return Function(`return new ${type}()`)()\r\n },\r\n\r\n /**\r\n *\r\n * Factory method to create an instance of the given element.\r\n *\r\n * @param {Object} element\r\n * @returns {draw2d.Figure}\r\n */\r\n createFigureFromElement: function createFigureFromElement(element) {\r\n return null;\r\n }\r\n });\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Serialize the canvas document into a JSON object which can be read from the corresponding\r\n * {@link draw2d.io.json.Reader}.\r\n *\r\n * // Create a JSON writer and convert it into a JSON-String representation.\r\n * //\r\n * var writer = new draw2d.io.json.Writer();\r\n * writer.marshal(canvas, function(json){\r\n * // convert the json object into string representation\r\n * var jsonTxt = JSON.stringify(json,null,2);\r\n * \r\n * // insert the json string into a DIV for preview or post\r\n * // it via ajax to the server....\r\n * $(\"#json\").text(jsonTxt);\r\n * \r\n * });\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.io.Writer\r\n */\r\n\r\ndraw2d.io.json.Writer = draw2d.io.Writer.extend(\r\n /** @lends draw2d.io.json.Writer */\r\n {\r\n\r\n init: function () {\r\n this._super();\r\n },\r\n\r\n /**\r\n *\r\n * Export the content to the implemented data format. Inherit class implements\r\n * content specific writer.\r\n * <br>\r\n * <br>\r\n *\r\n * Method signature has been changed from version 2.10.1 to version 3.0.0.<br>\r\n * The parameter <b>resultCallback</b> is required and new. The method calls\r\n * the callback instead of return the result.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Function} resultCallback the method to call on success. The first argument is the result object, the second the base64 representation of the file content\r\n * @param {Object} resultCallback.json the canvas document as JSON object\r\n * @param {String} resultCallback.base64 the canvas document as base encoded JSON\r\n */\r\n marshal: function (canvas, resultCallback) {\r\n // I change the API signature from version 2.10.1 to 3.0.0. Throw an exception\r\n // if any application not care about this changes.\r\n if (typeof resultCallback !== \"function\") {\r\n throw \"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.\";\r\n }\r\n\r\n var result = [];\r\n\r\n canvas.getFigures().each( (i, figure)=> {\r\n result.push(figure.getPersistentAttributes());\r\n });\r\n\r\n canvas.getLines().each( (i, element)=> {\r\n result.push(element.getPersistentAttributes());\r\n });\r\n\r\n var base64Content = draw2d.util.Base64.encode(JSON.stringify(result, null, 2));\r\n\r\n resultCallback(result, base64Content);\r\n }\r\n });\r\n","import draw2d from '../../packages'\r\nconst canvg = require('canvg')\r\n\r\n/**\r\n * @class\r\n *\r\n * Converts the canvas document into a PNG Image.\r\n *\r\n * @example\r\n * // example how to create a PNG image and set an\r\n * // image src attribute.\r\n * //\r\n * let writer = new draw2d.io.png.Writer();\r\n * writer.marshal(canvas, function(png){\r\n * $(\"#preview\").attr(\"src\",png);\r\n * });\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.io.Writer\r\n */\r\ndraw2d.io.png.Writer = draw2d.io.Writer.extend(\r\n /** @lends draw2d.io.png.Writer */\r\n {\r\n\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n /**\r\n *\r\n * Export the content to a PNG image. The result can be set as <b>src=\"....\"</b> because\r\n * the result is encoded as data source url <b>data:image/png;base64....</b>\r\n * <br>\r\n * <br>\r\n *\r\n * Method signature has been changed from version 2.10.1 to version 3.0.0.<br>\r\n * The parameter <b>resultCallback</b> is required and new. The method calls\r\n * the callback instead of return the result.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Function} resultCallback the method to call on success. The first argument is the dataUrl, the second is the base64 formated png image\r\n * @param {String} resultCallback.img The image as data source url <b>data:image/png;base64....</b>\r\n * @param {String} resultCallback.base64 the image encoded in base64\r\n * @param {draw2d.geo.Rectangle} cropBoundingBox optional cropping/clipping bounding box\r\n */\r\n marshal: function (canvas, resultCallback, cropBoundingBox) {\r\n // I change the API signature from version 2.10.1 to 3.0.0. Throw an exception\r\n // if any application not care about this changes.\r\n if (typeof resultCallback !== \"function\") {\r\n throw \"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.\";\r\n }\r\n\r\n let svg = \"\"\r\n let canvasState = false\r\n\r\n // the png.Writer can create Snapshots of a single figure too.\r\n // Didn't work in IE <10\r\n // @status beta\r\n // @since 5.5.0\r\n if (canvas instanceof draw2d.Figure) {\r\n let figure = canvas\r\n let origPos = figure.getPosition()\r\n figure.setPosition(1, 1)\r\n svg = \"<svg xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" >\"\r\n + figure.shape.node.outerHTML\r\n + \"</svg>\";\r\n figure.setPosition(origPos);\r\n figure.initialWidth = figure.getWidth() + 2\r\n figure.initialHeight = figure.getHeight() + 2\r\n }\r\n // create a snapshot of a complete canvas\r\n //\r\n else {\r\n canvasState = {\r\n zoom: canvas.getZoom(),\r\n scrollLeft: canvas.getScrollLeft(),\r\n scrollTop: canvas.getScrollTop(),\r\n }\r\n canvas.setZoom(1.0)\r\n canvas.hideDecoration()\r\n svg = (new XMLSerializer()).serializeToString(canvas.getHtmlContainer().find(\"svg\")[0]);\r\n }\r\n\r\n let canvasDomNode = $('<canvas id=\"canvas_png_export_for_draw2d\"></canvas>')\r\n $('body').append(canvasDomNode)\r\n let fullSizeCanvas = $(\"#canvas_png_export_for_draw2d\")[0]\r\n fullSizeCanvas.width = canvas.initialWidth\r\n fullSizeCanvas.height = canvas.initialHeight\r\n\r\n canvg(\"canvas_png_export_for_draw2d\", svg, {\r\n ignoreMouse: true,\r\n ignoreAnimation: true,\r\n renderCallback: function () {\r\n try {\r\n if (canvas instanceof draw2d.Canvas) {\r\n if(canvasState) {\r\n canvas.setZoom(canvasState.zoom)\r\n canvas.setScrollLeft(canvasState.scrollLeft)\r\n canvas.setScrollTop(canvasState.scrollTop)\r\n }\r\n canvas.showDecoration();\r\n }\r\n\r\n if (typeof cropBoundingBox !== \"undefined\") {\r\n let sourceX = cropBoundingBox.x\r\n let sourceY = cropBoundingBox.y\r\n let sourceWidth = cropBoundingBox.w\r\n let sourceHeight = cropBoundingBox.h\r\n\r\n let croppedCanvas = document.createElement('canvas')\r\n croppedCanvas.width = sourceWidth\r\n croppedCanvas.height = sourceHeight\r\n\r\n croppedCanvas.getContext(\"2d\").drawImage(fullSizeCanvas, sourceX, sourceY, sourceWidth, sourceHeight, 0, 0, sourceWidth, sourceHeight);\r\n\r\n let dataUrl = croppedCanvas.toDataURL(\"image/png\")\r\n let base64Image = dataUrl.replace(\"data:image/png;base64,\", \"\")\r\n resultCallback(dataUrl, base64Image)\r\n } else {\r\n let img = fullSizeCanvas.toDataURL(\"image/png\")\r\n resultCallback(img, img.replace(\"data:image/png;base64,\", \"\"))\r\n }\r\n } finally {\r\n canvasDomNode.remove()\r\n }\r\n }\r\n })\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Serialize the canvas document into a SVG document.\r\n *\r\n * // Create a SVG writer and convert the canvas into a SVG document.\r\n * //\r\n * var writer = new draw2d.io.svg.Writer();\r\n * writer.marshal(canvas, function(svg){\r\n * // insert the svg string into a DIV for preview or post\r\n * // it via ajax to the server....\r\n * $(\"#svg\").text(svg);\r\n * });\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.io.Writer\r\n */\r\ndraw2d.io.svg.Writer = draw2d.io.Writer.extend(\r\n /** @lends draw2d.io.svg.Writer */\r\n {\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n /**\r\n *\r\n * Export the content of the canvas into SVG. The SVG document can be loaded with Inkscape or any other SVG Editor.\r\n * <br>\r\n * <br>\r\n *\r\n * Method signature has been changed from version 2.10.1 to version 3.0.0.<br>\r\n * The parameter <b>resultCallback</b> is required and new. The method calls\r\n * the callback instead of return the result.\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to marshal\r\n * @param {Function} callback the method to call on success. The first argument is the SVG document\r\n * @param {String} callback.svg the SVG document\r\n * @param {String} callback.base64 the SVG document encoded in base64\r\n */\r\n marshal: function (canvas, callback) {\r\n // I change the API signature from version 2.10.1 to 3.0.0. Throw an exception\r\n // if any application not care about this changes.\r\n if (typeof callback !== \"function\") {\r\n throw \"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.\";\r\n }\r\n\r\n let s = canvas.getPrimarySelection()\r\n canvas.setCurrentSelection(null)\r\n let svg = canvas.getHtmlContainer().html()\r\n .replace(/>\\s+/g, \">\")\r\n .replace(/\\s+</g, \"<\")\r\n svg = this.formatXml(svg)\r\n svg = svg.replace(/<desc>.*<\\/desc>/g, \"<desc>Create with draw2d JS graph library and RaphaelJS</desc>\")\r\n\r\n canvas.setCurrentSelection(s)\r\n\r\n let base64Content = draw2d.util.Base64.encode(svg)\r\n callback(svg, base64Content)\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The CenterEdgeConnectionAnchor's location is found by calculating the intersection of a\r\n * line drawn from the center point of its owner's box (the parent of the\r\n * connection port) to a reference point on that box. A Connection using the\r\n * ChopBoxAnchor will be oriented such that they point to their port owner's\r\n * center.\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.anchor.ConnectionAnchor\r\n */\r\n\r\ndraw2d.layout.anchor.CenterEdgeConnectionAnchor = draw2d.layout.anchor.ConnectionAnchor.extend(\r\n /** @lends draw2d.layout.anchor.CenterEdgeConnectionAnchor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.anchor.CenterEdgeConnectionAnchor\",\r\n\r\n /**\r\n *\r\n * @param {draw2d.Figure} [owner] the figure to use for the anchor calculation\r\n */\r\n init: function (owner) {\r\n this._super(owner)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the location where the Connection should be anchored in\r\n * absolute coordinates. The anchor may use the given reference\r\n * Point to calculate this location.\r\n *\r\n * @param {draw2d.geo.Point} ref The reference Point in absolute coordinates\r\n * @param {draw2d.Connection} [inquiringConnection] the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The anchor's location\r\n */\r\n getLocation: function (ref, inquiringConnection) {\r\n let r = this.getOwner().getParent().getBoundingBox()\r\n\r\n let dir = r.getDirection(ref)\r\n let center = r.getCenter()\r\n\r\n switch (dir) {\r\n case 0:\r\n center.y = r.y\r\n break\r\n case 1:\r\n center.x = r.x + r.w\r\n break\r\n case 2:\r\n center.y = r.y + r.h\r\n break\r\n case 3:\r\n center.x = r.x\r\n }\r\n\r\n return center\r\n },\r\n\r\n /**\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @returns {draw2d.geo.Rectangle} The bounds of this Anchor's owner\r\n */\r\n getBox: function () {\r\n return this.getOwner().getParent().getBoundingBox()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @param {draw2d.Connection} [inquiringConnection] the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The bounds of this Anchor's owner\r\n */\r\n getReferencePoint: function (inquiringConnection) {\r\n return this.getBox().getCenter()\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The ChopboxAnchor's location is found by calculating the intersection of a\r\n * line drawn from the center point of its owner's box (the parent of the\r\n * connection port) to a reference point on that box. A Connection using the\r\n * ChopBoxAnchor will be oriented such that they point to their port owner's\r\n * center.\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.layout.anchor.ConnectionAnchor\r\n */\r\n\r\ndraw2d.layout.anchor.ChopboxConnectionAnchor = draw2d.layout.anchor.ConnectionAnchor.extend(\r\n /** @lends draw2d.layout.anchor.ChopboxConnectionAnchor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.anchor.ChopboxConnectionAnchor\",\r\n\r\n /**\r\n *\r\n * @param {draw2d.Figure} owner the figure to use for the anchor calculation\r\n */\r\n init: function (owner) {\r\n this._super(owner)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Returns the location where the Connection should be anchored in\r\n * absolute coordinates. The anchor may use the given reference\r\n * Point to calculate this location.\r\n *\r\n * @param {draw2d.geo.Point} reference The reference Point in absolute coordinates\r\n * @param {draw2d.Connection} [inquiringConnection] the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The anchor's location\r\n */\r\n getLocation: function (reference, inquiringConnection) {\r\n let r = new draw2d.geo.Rectangle(0, 0)\r\n r.setBounds(this.getBox())\r\n r.translate(-1, -1)\r\n r.resize(1, 1)\r\n\r\n let center = r.getCenter()\r\n\r\n if (r.isEmpty() || (reference.x === center.x && reference.y === center.y)) {\r\n return center // This avoids divide-by-zero\r\n }\r\n\r\n let dx = reference.x - center.x\r\n let dy = reference.y - center.y\r\n\r\n // r.width, r.height, dx, and dy are guaranteed to be non-zero.\r\n let scale = 0.5 / Math.max(Math.abs(dx) / r.w, Math.abs(dy) / r.h)\r\n\r\n dx *= scale\r\n dy *= scale\r\n center.translate(dx, dy)\r\n\r\n return center\r\n },\r\n\r\n /**\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @returns {draw2d.geo.Rectangle} The bounds of this Anchor's owner\r\n */\r\n getBox: function () {\r\n return this.getOwner().getParent().getBoundingBox()\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Returns the reference point for this anchor in absolute coordinates. This might be used\r\n * by another anchor to determine its own location.\r\n *\r\n * @param {draw2d.Connection} [inquiringConnection] the connection who ask for the location.\r\n * @returns {draw2d.geo.Point} The bounds of this Anchor's owner\r\n */\r\n getReferencePoint: function (inquiringConnection) {\r\n return this.getBox().getCenter()\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * An object to which a {@link draw2d.Connection} will be anchored.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n */\r\n\r\ndraw2d.layout.anchor.ConnectionAnchor = Class.extend(\r\n /** @lends draw2d.layout.anchor.ConnectionAnchor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.anchor.ConnectionAnchor\",\r\n\r\n /**\r\n *\r\n * @param {draw2d.Figure} owner the figure to use for the anchor calculation\r\n */\r\n init: function (owner) {\r\n this.owner = owner\r\n },\r\n\r\n /**\r\n * \r\n * Returns the location where the Connection should be anchored in absolute coordinates.\r\n * The anchor may use the given reference Point to calculate this location.\r\n *\r\n * @param {draw2d.geo.Point} reference the opposite reference point\r\n * @param {draw2d.Connection} inquiringConnection the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point}\r\n */\r\n getLocation: function (reference, inquiringConnection) {\r\n // return the center of the owner/port.\r\n return this.getReferencePoint(inquiringConnection)\r\n },\r\n\r\n /**\r\n * \r\n * Returns the Figure that contains this ConnectionAnchor.\r\n *\r\n * @returns {draw2d.Figure} The Figure that contains this ConnectionAnchor\r\n */\r\n getOwner: function () {\r\n return this.owner\r\n },\r\n\r\n /**\r\n * \r\n * Set the owner of the Anchor.\r\n *\r\n * @param {draw2d.Figure} owner the new owner of the anchor locator\r\n */\r\n setOwner: function (owner) {\r\n if (typeof owner === \"undefined\") {\r\n throw \"Missing parameter for 'owner' in ConnectionAnchor.setOwner\"\r\n }\r\n this.owner = owner\r\n },\r\n\r\n /**\r\n * \r\n * Returns the bounds of this Anchor's owner. Subclasses can override this method\r\n * to adjust the box. Maybe you return the box of the port parent (the parent figure)\r\n *\r\n * @returns {draw2d.geo.Rectangle} The bounds of this Anchor's owner\r\n */\r\n getBox: function () {\r\n return this.getOwner().getAbsoluteBounds()\r\n },\r\n\r\n /**\r\n * \r\n * Returns the reference point for this anchor in absolute coordinates. This might be used\r\n * by another anchor to determine its own location.\r\n *\r\n * @param {draw2d.Connection} [inquiringConnection] the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The reference Point\r\n */\r\n getReferencePoint: function (inquiringConnection) {\r\n return this.getOwner().getAbsolutePosition()\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The FanConnectionAnchor's location is found by calculating the intersection of a\r\n * line drawn from the center point of its owner's box (the parent of the\r\n * connection port) to a reference point on that box.\r\n * Additional the anchor resolves conflicts by spread the anchor if more than one\r\n * connection has the same reference point. <br>\r\n * In a case of a DirectRouter parallel connections are the result.\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @since 4.6.0\r\n * @extends draw2d.layout.anchor.ConnectionAnchor\r\n */\r\n\r\ndraw2d.layout.anchor.FanConnectionAnchor = draw2d.layout.anchor.ConnectionAnchor.extend(\r\n /** @lends draw2d.layout.anchor.FanConnectionAnchor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.anchor.FanConnectionAnchor\",\r\n\r\n /**\r\n *\r\n * @param {draw2d.Figure} owner the figure to use for the anchor calculation\r\n * @param {Number} [separation] the separation or fan distance between the concurrent/conflicting anchors\r\n */\r\n init: function (owner, separation) {\r\n this._super(owner)\r\n\r\n if (separation) {\r\n this.separation = parseInt(separation)\r\n }\r\n else {\r\n this.separation = 10\r\n }\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the location where the Connection should be anchored in\r\n * absolute coordinates. The anchor may use the given reference\r\n * Point to calculate this location.\r\n *\r\n * @param {draw2d.geo.Point} reference The reference Point in absolute coordinates\r\n * @param {draw2d.Connection} inquiringConnection the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The anchor's location\r\n */\r\n getLocation: function (reference, inquiringConnection) {\r\n\r\n let r = new draw2d.geo.Rectangle(0, 0)\r\n r.setBounds(this.getBox())\r\n r.translate(-1, -1)\r\n r.resize(1, 1)\r\n\r\n let center = r.getCenter()\r\n\r\n if (r.isEmpty() || (reference.x === center.x && reference.y === center.y)) {\r\n return center // This avoids divide-by-zero\r\n }\r\n\r\n // translate the center if required\r\n //\r\n let s = inquiringConnection.getSource()\r\n let t = inquiringConnection.getTarget()\r\n let lines = this.getOwner().getConnections().clone()\r\n lines.grep(function (other) {\r\n return (other.getTarget() === t && other.getSource() === s) || (other.getTarget() === s && other.getSource() === t)\r\n })\r\n let index = lines.indexOf(inquiringConnection) + 1\r\n let position = center.getPosition(reference)\r\n let ray\r\n if (position === draw2d.geo.PositionConstants.SOUTH || position === draw2d.geo.PositionConstants.EAST) {\r\n ray = new draw2d.geo.Point(reference.x - center.x, reference.y - center.y)\r\n }\r\n else {\r\n ray = new draw2d.geo.Point(center.x - reference.x, center.y - reference.y)\r\n }\r\n let length = Math.sqrt(ray.x * ray.x + ray.y * ray.y)\r\n if (index <= 2) {\r\n length *= 1.5\r\n }\r\n let xSeparation = this.separation * ray.x / length\r\n let ySeparation = this.separation * ray.y / length\r\n if (index % 2 === 0) {\r\n center = new draw2d.geo.Point(center.x + (index / 2) * (-1 * ySeparation), center.y + (index / 2) * xSeparation)\r\n }\r\n else {\r\n center = new draw2d.geo.Point(center.x + (index / 2) * ySeparation, center.y + (index / 2) * (-1 * xSeparation))\r\n }\r\n\r\n let intersections = this.getBox().intersectionWithLine(center, reference)\r\n // perfect - one intersection mean that the shifted center point is inside the bounding box and has only one intersection with it.\r\n //\r\n switch (intersections.getSize()) {\r\n case 0:\r\n // calculate the edge of the bounding box which is nearest to the reference point\r\n //\r\n let v = this.getBox().getVertices()\r\n let first = v.first()\r\n first.distance = reference.distance(first)\r\n return v.asArray().reduce(function (previous, current) {\r\n current.distance = reference.distance(current)\r\n return current.distance < previous.distance ? current : previous\r\n })\r\n case 1:\r\n return intersections.get(0)\r\n case 2:\r\n // get the nearest of these points\r\n let p0 = intersections.get(0)\r\n let p1 = intersections.get(1)\r\n let p0diff = reference.distance(p0)\r\n let p1diff = reference.distance(p1)\r\n if (p0diff < p1diff) {\r\n return p0\r\n }\r\n return p1\r\n }\r\n\r\n // we have 0 or 2 intersections with the bounding box. This means the shifted\r\n // calculate the intersection if the new \"center\" with the bounding box of the\r\n // shape (if any exists)\r\n\r\n },\r\n\r\n /**\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @returns {draw2d.geo.Rectangle} The bounds of this Anchor's owner\r\n */\r\n getBox: function () {\r\n return this.getOwner().getParent().getBoundingBox()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the reference point for this anchor in absolute coordinates. This might be used\r\n * by another anchor to determine its own location.\r\n *\r\n * @param {draw2d.Connection} inquiringConnection the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The bounds of this Anchor's owner\r\n */\r\n getReferencePoint: function (inquiringConnection) {\r\n return this.getBox().getCenter()\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The ChopboxAnchor's location is found by calculating the intersection of a\r\n * line drawn from the center point of its owner's box (the parent of the\r\n * connection port) to a reference point on that box. A Connection using the\r\n * ChopBoxAnchor will be oriented such that they point to their port owner's\r\n * center.\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.layout.anchor.ConnectionAnchor\r\n */\r\n\r\ndraw2d.layout.anchor.ShortesPathConnectionAnchor = draw2d.layout.anchor.ConnectionAnchor.extend(\r\n /** @lends draw2d.layout.anchor.ShortesPathConnectionAnchor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.anchor.ShortesPathConnectionAnchor\",\r\n\r\n /**\r\n *\r\n * @param {draw2d.Figure} [owner] the figure to use for the anchor calculation\r\n */\r\n init: function (owner) {\r\n this._super(owner)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the location where the Connection should be anchored in\r\n * absolute coordinates. The anchor may use the given reference\r\n * Point to calculate this location.\r\n *\r\n * @param {draw2d.geo.Point} ref The reference Point in absolute coordinates\r\n * @param {draw2d.Connection} inquiringConnection the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The anchor's location\r\n */\r\n getLocation: function (ref, inquiringConnection) {\r\n let r = this.getOwner().getParent().getBoundingBox()\r\n let center = r.getCenter()\r\n\r\n // check if we can calculate with a circle/line intersection\r\n //\r\n if (this.getOwner().getParent() instanceof draw2d.shape.basic.Oval) {\r\n let result = this.getOwner().getParent().intersectionWithLine(ref, center)\r\n if (result.getSize() === 1) {\r\n return result.get(0)\r\n }\r\n }\r\n\r\n /* 0 | 1 | 2\r\n * __|___|__\r\n * 7 | 8 | 3\r\n * __|___|__\r\n * 6 | 5 | 4\r\n */\r\n let octant = r.determineOctant(new draw2d.geo.Rectangle(ref.x, ref.y, 2, 2))\r\n\r\n switch (octant) {\r\n case 0:\r\n return r.getTopLeft()\r\n case 1:\r\n return new draw2d.geo.Point(ref.x, r.getTop())\r\n case 2:\r\n return r.getTopRight()\r\n case 3:\r\n return new draw2d.geo.Point(r.getRight(), ref.y)\r\n case 4:\r\n return r.getBottomRight()\r\n case 5:\r\n return new draw2d.geo.Point(ref.x, r.getBottom())\r\n case 6:\r\n return r.getBottomLeft()\r\n case 7:\r\n return new draw2d.geo.Point(r.getLeft(), ref.y)\r\n }\r\n\r\n return r.getTopLeft()\r\n },\r\n\r\n /**\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @returns {draw2d.geo.Rectangle} The bounds of this Anchor's owner\r\n */\r\n getBox: function () {\r\n return this.getOwner().getParent().getBoundingBox()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @param {draw2d.Connection} inquiringConnection the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The bounds of this Anchor's owner\r\n */\r\n getReferencePoint: function (inquiringConnection) {\r\n return this.getBox().getCenter()\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Provides a {@link draw2d.Connection} with an orthogonal route between the Connection's source\r\n * and target anchors.\r\n * <br>\r\n * Additional a <b>bridge</b> is added to each connection which didn't have a common source or target\r\n * port.<br>\r\n * A <b>dot</b> is added at the crossing if the two connections have a common spurce or target port.\r\n *\r\n * <br>\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.CircuitConnectionRouter());\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let f1 = new draw2d.shape.analog.OpAmp({x:10, y:10});\r\n * let f2 = new draw2d.shape.analog.ResistorVertical({angle:90, height:20, x:300, y:150});\r\n * let f3 = new draw2d.shape.analog.ResistorVertical({x:250, y:70});\r\n * let f4 = new draw2d.shape.analog.ResistorVertical({x:10, y:90});\r\n *\r\n * // ...add it to the canvas\r\n * //\r\n * canvas.add( f1);\r\n * canvas.add( f2);\r\n * canvas.add( f3);\r\n * canvas.add( f4);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(f1.getOutputPort(0));\r\n * c.setTarget(f2.getHybridPort(0));\r\n * canvas.add(c);\r\n *\r\n * // second Connection between the other resistors\r\n * //\r\n * c = createConnection();\r\n * c.setSource(f3.getHybridPort(1));\r\n * c.setTarget(f4.getHybridPort(0));\r\n * canvas.add(c);\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ManhattanConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.CircuitConnectionRouter = draw2d.layout.connection.ManhattanConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.CircuitConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.CircuitConnectionRouter\",\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n this.setBridgeRadius(4)\r\n this.setVertexRadius(2)\r\n\r\n // experimental\r\n this.abortRoutingOnFirstVertexNode = false\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * \r\n * Callback method if the router has been removed from the connection. In the case of the CircuitRouter\r\n * all vertex nodes will be removed from the canvas.\r\n *\r\n * @param {draw2d.Connection} connection The related connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onUninstall: function (connection) {\r\n if (typeof connection.vertexNodes !== \"undefined\" && connection.vertexNodes !== null) {\r\n connection.vertexNodes.remove()\r\n connection.vertexNodes = null\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Set the radius of the vertex circle.\r\n *\r\n * @param {Number} radius\r\n */\r\n setVertexRadius: function (radius) {\r\n this.vertexRadius = radius\r\n\r\n return this\r\n },\r\n /** deprecated\r\n * @private\r\n * **/\r\n setJunctionRadius: function (radius) {\r\n this.vertexRadius = radius\r\n },\r\n\r\n /**\r\n * \r\n * Set the radius or span of the bridge. A bridge will be drawn if two connections are crossing and didn't have any\r\n * common port.\r\n *\r\n * @param {Number} radius\r\n */\r\n setBridgeRadius: function (radius) {\r\n this.bridgeRadius = radius\r\n this.bridge_LR = [\" r\", 0.5, -0.5, radius - (radius / 2), -(radius - radius / 4), radius, -radius, radius + (radius / 2), -(radius - radius / 4), radius * 2, \"0 \"].join(\" \")\r\n this.bridge_RL = [\" r\", -0.5, -0.5, -(radius - (radius / 2)), -(radius - radius / 4), -radius, -radius, -(radius + (radius / 2)), -(radius - radius / 4), -radius * 2, \"0 \"].join(\" \")\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n let fromPt = conn.getStartPoint()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPoint()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // calculate the lines between the two points with the standard ManhattanRouter.\r\n //\r\n this._route(conn, toPt, toDir, fromPt, fromDir)\r\n\r\n // get the intersections to the other connections\r\n //\r\n let intersectionsASC = conn.getCanvas().getIntersection(conn).sort(\"x\")\r\n let intersectionsDESC = intersectionsASC.clone().reverse()\r\n\r\n let intersectionForCalc = intersectionsASC\r\n\r\n // add a ArrayList of all added vertex nodes to the connection\r\n //\r\n if (typeof conn.vertexNodes !== \"undefined\" && conn.vertexNodes !== null) {\r\n conn.vertexNodes.remove()\r\n }\r\n conn.vertexNodes = conn.canvas.paper.set()\r\n\r\n // ATTENTION: we cast all x/y coordinates to integer and add 0.5 to avoid subpixel rendering of\r\n // the connection. The 1px or 2px lines look much clearer than before.\r\n //\r\n let ps = conn.getVertices()\r\n let p = ps.get(0)\r\n let path = [\"M\", (p.x | 0) + 0.5, \" \", (p.y | 0) + 0.5]\r\n\r\n let oldP = p\r\n let bridgeWidth = null\r\n let bridgeCode = null\r\n\r\n let lastVertexNode = null\r\n\r\n for (let i = 1; i < ps.getSize(); i++) {\r\n p = ps.get(i)\r\n\r\n // line goes from right->left.\r\n if (oldP.x > p.x) {\r\n intersectionForCalc = intersectionsDESC\r\n bridgeCode = this.bridge_RL\r\n bridgeWidth = -this.bridgeRadius\r\n }\r\n // line goes from left->right\r\n else {\r\n intersectionForCalc = intersectionsASC\r\n bridgeCode = this.bridge_LR\r\n bridgeWidth = this.bridgeRadius\r\n }\r\n\r\n // add a bridge or a vertex node depending to the intersection connection\r\n //\r\n // bridge => the connections didn't have a common port\r\n // vertex => the connections did have a common source or target port\r\n //\r\n intersectionForCalc.each((ii, interP) => {\r\n if (draw2d.shape.basic.Line.hit(1, oldP.x, oldP.y, p.x, p.y, interP.x, interP.y) === true) {\r\n\r\n // It is a vertex node..\r\n //\r\n if (conn.sharingPorts(interP.other)) {\r\n let other = interP.other\r\n let otherZ = other.getZOrder()\r\n let connZ = conn.getZOrder()\r\n if (connZ < otherZ) {\r\n let vertexNode = conn.canvas.paper.ellipse(interP.x, interP.y, this.vertexRadius, this.vertexRadius).attr({fill: conn.lineColor.rgba()})\r\n conn.vertexNodes.push(vertexNode)\r\n // we found a vertex node. In this case an already existing connection did draw the connection.\r\n //\r\n if (this.abortRoutingOnFirstVertexNode === true) {\r\n if (conn.getSource() === other.getSource() || conn.getSource() === other.getTarget()) {\r\n path = [\"M\", (interP.x | 0) + 0.5, \" \", (interP.y | 0) + 0.5]\r\n if (lastVertexNode !== null) {\r\n lastVertexNode.remove()\r\n conn.vertexNodes.exclude(lastVertexNode)\r\n }\r\n }\r\n lastVertexNode = vertexNode\r\n }\r\n }\r\n }\r\n // ..or a bridge. We draw only horizontal bridges. Just a design decision\r\n //\r\n else if (p.y === interP.y) {\r\n path.push(\" L\", ((interP.x - bridgeWidth) | 0) + 0.5, \" \", (interP.y | 0) + 0.5)\r\n path.push(bridgeCode)\r\n }\r\n }\r\n })\r\n\r\n path.push(\" L\", (p.x | 0) + 0.5, \" \", (p.y | 0) + 0.5)\r\n oldP = p\r\n }\r\n conn.svgPathString = path.join(\"\")\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Routes a {@link draw2d.Connection}, possibly using a constraint.\r\n *\r\n * @author Andreas Herz\r\n */\r\n\r\ndraw2d.layout.connection.ConnectionRouter = Class.extend(\r\n /** @lends draw2d.layout.connection.ConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.ConnectionRouter\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function () {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Routes the Connection.\r\n *\r\n * @param {draw2d.Connection} connection The Connection to route\r\n * @param {Object} [routingHints] some helper attributes for the router\r\n * @param {Boolean} [routingHints.startMoved] is true if just the start location has moved\r\n * @param {Boolean} [routingHints.endMoved] is true if the destination location has changed\r\n * @param {draw2d.util.ArrayList} [routingHints.oldVertices] the vertices before the reroute has been triggered\r\n *\r\n * @template\r\n */\r\n route: function (connection, routingHints) {\r\n throw \"subclasses must implement the method [ConnectionRouter.route]\"\r\n },\r\n\r\n _paint: function (conn) {\r\n // calculate the path string for the SVG rendering\r\n // Important: to avoid subpixel error rendering we add 0.5 to each coordinate\r\n // With this offset the canvas can paint the line on a \"full pixel\" instead\r\n // of subpixel rendering.\r\n// let adjust = val => (val| 0) +0.5\r\n let adjust = val => val.toFixed(2)\r\n\r\n let ps = conn.getVertices()\r\n let p = ps.get(0)\r\n let radius = conn.getRadius()\r\n let path = [\"M\", adjust(p.x), \" \", adjust(p.y)]\r\n let i = 1\r\n let length, inset, p2\r\n if (radius > 0) {\r\n let lastP = p\r\n length = (ps.getSize() - 1)\r\n for (; i < length; i++) {\r\n p = ps.get(i)\r\n inset = draw2d.geo.Util.insetPoint(p, lastP, radius)\r\n path.push(\"L\", adjust(inset.x), \",\", adjust(inset.y))\r\n\r\n p2 = ps.get(i + 1)\r\n inset = draw2d.geo.Util.insetPoint(p, p2, radius)\r\n\r\n path.push(\"Q\", p.x, \",\", p.y, \" \", adjust(inset.x), \", \", adjust(inset.y))\r\n lastP = p\r\n }\r\n p = ps.get(i)\r\n path.push(\"L\", adjust(p.x), \",\", adjust(p.y))\r\n }\r\n else {\r\n length = ps.getSize()\r\n for (; i < length; i++) {\r\n p = ps.get(i)\r\n path.push(\"L\", adjust(p.x), \",\", adjust(p.y))\r\n }\r\n }\r\n conn.svgPathString = path.join(\"\")\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if the router has been removed from the connection.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} connection The related connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onUninstall: function (connection) {\r\n },\r\n\r\n /**\r\n *\r\n * Callback method for the PolyLine or Connection to check if it possible to remove a vertex from\r\n * the list. The router can send an veto for this.\r\n * Per default it is not possible to remove any vertex from the PolyLine exceptional if any interactive\r\n * router is installed.\r\n *\r\n * @param {Number} index\r\n * @since 4.2.3\r\n */\r\n canRemoveVertexAt: function (index) {\r\n return false\r\n },\r\n\r\n /**\r\n * Callback method for the PolyLine or Connection to verify that a segment is deletable.\r\n *\r\n * @param {Number} index\r\n * @returns {Boolean}\r\n * @since 4.2.3\r\n */\r\n canRemoveSegmentAt: function (index) {\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Tweak or enrich the polyline persistence data with routing information\r\n *\r\n * @since 2.10.0\r\n * @param {draw2d.shape.basic.PolyLine} line\r\n * @param {Object} memento The memento data of the polyline\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function (line, memento) {\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * set the attributes for the polyline with routing information\r\n *\r\n * @since 2.10.0\r\n * @param {draw2d.shape.basic.Line} line\r\n * @param {Object} memento the JSON data to read\r\n */\r\n setPersistentAttributes: function (line, memento) {\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * The draw2d.Connection delegates the drag operation to the router. The router can\r\n * handle the different constraints of the connection.\r\n *\r\n * @param {draw2d.shape.basic.Line} line\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n */\r\n onDrag: function (line, dx, dy, dx2, dy2) {\r\n },\r\n\r\n /**\r\n *\r\n * Called by the connection if the vertices set outside.\r\n * This enforce the router to avoid full autoroute. E.g. InteractiveManhattanRouter\r\n *\r\n * @protected\r\n * @param {draw2d.shape.basic.Line} line\r\n */\r\n verticesSet: function (line) {\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Router for direct connections between two ports. Beeline\r\n * <br>\r\n * <br>\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.DirectRouter());\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.DirectRouter = draw2d.layout.connection.ConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.DirectRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.DirectRouter\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Invalidates the given Connection\r\n */\r\n invalidate: function () {\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (connection, routingHints) {\r\n let start = connection.getStartPosition()\r\n let end = connection.getEndPosition()\r\n\r\n // required for hit tests\r\n //\r\n connection.addPoint(start)\r\n connection.addPoint(end)\r\n\r\n // calculate the path\r\n let path = [\"M\", start.x, \" \", start.y]\r\n path.push(\"L\", end.x, \" \", end.y)\r\n\r\n connection.svgPathString = path.join(\"\")\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Automatic router that spreads its {@link draw2d.Connection Connections} in a fan-like fashion upon collision.\r\n *\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * // return my special kind of connection\r\n * let con = new draw2d.Connection({\r\n * radius: 14,\r\n * router: new draw2d.layout.connection.FanConnectionRouter()\r\n * });\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * // second Connection\r\n * //\r\n * c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * // third Connection\r\n * //\r\n * c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.DirectRouter\r\n */\r\n\r\ndraw2d.layout.connection.FanConnectionRouter = draw2d.layout.connection.DirectRouter.extend(\r\n /** @lends draw2d.layout.connection.FanConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.FanConnectionRouter\",\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * \r\n * Layout the hands over connection in a manhattan like layout\r\n *\r\n * @param {draw2d.Connection} conn\r\n * @param {draw2d.util.ArrayList} oldVertices old/existing vertices of the Connection\r\n * @param {Object} routingHints some helper attributes for the router\r\n * @param {Boolean} routingHints.startMoved is true if just the start location has moved\r\n * @param {Boolean} routingHints.destMoved is true if the destination location has changed\r\n */\r\n route: function (conn, routingHints) {\r\n let lines = conn.getSource().getConnections().clone()\r\n lines.grep( other => other.getTarget() === conn.getTarget() || other.getSource() === conn.getTarget())\r\n\r\n if (lines.getSize() > 1) {\r\n this.routeCollision(conn, lines.indexOf(conn))\r\n }\r\n else {\r\n this._super(conn, routingHints)\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * route the connection if connections overlap. Two connections overlap if the combination\r\n * of source and target anchors are equal.\r\n *\r\n * @param {draw2d.Connection} conn\r\n * @param {Number} index\r\n */\r\n routeCollision: function (conn, index) {\r\n index = index + 1\r\n let start = conn.getStartPoint()\r\n let end = conn.getEndPoint()\r\n\r\n let separation = 15\r\n\r\n let midPoint = new draw2d.geo.Point((end.x + start.x) / 2, (end.y + start.y) / 2)\r\n let position = end.getPosition(start)\r\n let ray\r\n if (position === draw2d.geo.PositionConstants.SOUTH || position === draw2d.geo.PositionConstants.EAST) {\r\n ray = new draw2d.geo.Point(end.x - start.x, end.y - start.y)\r\n }\r\n else {\r\n ray = new draw2d.geo.Point(start.x - end.x, start.y - end.y)\r\n }\r\n\r\n let length = Math.sqrt(ray.x * ray.x + ray.y * ray.y)\r\n\r\n let xSeparation = separation * ray.x / length\r\n let ySeparation = separation * ray.y / length\r\n\r\n let bendPoint\r\n\r\n if (index % 2 === 0) {\r\n bendPoint = new draw2d.geo.Point(midPoint.x + (index / 2) * (-1 * ySeparation), midPoint.y + (index / 2) * xSeparation)\r\n }\r\n else {\r\n bendPoint = new draw2d.geo.Point(midPoint.x + (index / 2) * ySeparation, midPoint.y + (index / 2) * (-1 * xSeparation))\r\n }\r\n\r\n // required for hit tests\r\n conn.addPoint(start)\r\n conn.addPoint(bendPoint)\r\n conn.addPoint(end)\r\n\r\n // calculate the path string for the SVG rendering\r\n //\r\n this._paint(conn)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * Route the connection in an Manhattan style and add resize handles to all vertex for interactive alignment of the\r\n * routing.\r\n *\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * // return my special kind of connection\r\n * let con = new draw2d.Connection({\r\n * radius: 4,\r\n * router: new draw2d.layout.connection.InteractiveManhattanConnectionRouter()\r\n * });\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * // select the connection to show the selection handles\r\n * //\r\n * c.select();\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @since 4.0.2\r\n * @extends draw2d.layout.connection.ManhattanConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.InteractiveManhattanConnectionRouter = draw2d.layout.connection.ManhattanConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.InteractiveManhattanConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.InteractiveManhattanConnectionRouter\",\r\n\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n onInstall: function (conn) {\r\n conn.installEditPolicy(new draw2d.policy.line.OrthogonalSelectionFeedbackPolicy())\r\n conn._routingMetaData ??= { routedByUserInteraction: false,fromDir: -1,toDir: -1}\r\n },\r\n\r\n onUninstall: function (conn) {\r\n delete conn._routingMetaData\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n */\r\n route: function (conn, routingHints) {\r\n if (!routingHints.oldVertices) {\r\n debugger\r\n }\r\n if (routingHints.oldVertices.getSize() === 0 || conn._routingMetaData.routedByUserInteraction === false) {\r\n this._super(conn, routingHints)\r\n conn._routingMetaData.fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n conn._routingMetaData.toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n }\r\n else {\r\n this.halfRoute(conn, routingHints)\r\n this._paint(conn)\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * The routing algorithm if the user has changed at least on of the vertices manually.\r\n * This kind of routing just align the start and end vertices to the new source/target port\r\n * location.\r\n * The vertices between keep untouched. Modification of this vertices are done by the\r\n * draw2d.policy.line.OrthogonalSelectionFeedbackPolicy\r\n *\r\n * @param {draw2d.Connection} conn the connection to route\r\n * @param {Object} routingHints some helper attributes for the router\r\n * @param {Boolean} routingHints.startMoved is true if just the start location has moved\r\n * @param {Boolean} routingHints.endMoved is true if the destination location has changed\r\n */\r\n halfRoute: function (conn, routingHints) {\r\n let MINDIST = this.MINDIST\r\n let max = Math.max\r\n let min = Math.min\r\n\r\n routingHints ??= {oldVertices: new draw2d.util.ArrayList()}\r\n let oldVertices = routingHints.oldVertices\r\n let vertexCount = oldVertices.getSize()\r\n\r\n let fromPt = conn.getStartPosition()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPosition()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // the port orientation has been changed. This can happen if the node rotates. In this case\r\n // we must recalculate the routing.\r\n if (conn._routingMetaData.fromDir !== fromDir || conn._routingMetaData.toDir !== toDir) {\r\n conn._routingMetaData.routedByUserInteraction = false\r\n this.route(conn, routingHints)\r\n }\r\n\r\n // TODO: detection for switch back to autoroute isn't good enough.\r\n // Add more logic. e.g. if the fromDir!==1. This happens if\r\n // The ports are at bottom and top.\r\n // The code below covers only the classic workflow configuration left->right\r\n //\r\n // go back to the default if no routing is possible anymore\r\n //\r\n if ((fromDir === draw2d.geo.Rectangle.DIRECTION_RIGHT) && (toDir === draw2d.geo.Rectangle.DIRECTION_LEFT)\r\n && (fromPt.x > toPt.x) && (vertexCount <= 4)) {\r\n\r\n conn._routingMetaData.routedByUserInteraction = false\r\n this.route(conn, routingHints)\r\n }\r\n // it makes no sense to have just 2 vertices and manual routing for Manhattan-style routing\r\n else if(conn.getVertices().getSize() ===2 && conn._routingMetaData.routedByUserInteraction === true){\r\n conn._routingMetaData.routedByUserInteraction = false\r\n this.route(conn, routingHints)\r\n }\r\n\r\n // transfer the old vertices into the connection\r\n //\r\n oldVertices.each( (i, vertex) =>{\r\n conn.addPoint(vertex)\r\n })\r\n\r\n\r\n // all points are adjusted with the drag&drop operation. There is no need to move\r\n // start/end points twice\r\n if (conn.isInDragDrop) {\r\n return\r\n }\r\n\r\n // The SOURCE port (labeled with p0) has been moved/changed.\r\n //\r\n if (routingHints.startMoved || !fromPt.equals(oldVertices.get(0))) {\r\n let p1 = oldVertices.get(1)\r\n let p2 = oldVertices.get(2) // optional. Happens if the connection has just 2 points\r\n conn.setVertex(0, fromPt)\r\n switch (fromDir) {\r\n // .\r\n // p0 . p1\r\n // x------+\r\n // .\r\n // .\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n conn.setVertex(1, max(fromPt.x + MINDIST, p1.x), fromPt.y)// p1\r\n if(p2)\r\n conn.setVertex(2, max(fromPt.x + MINDIST, p1.x), p2.y) // p2\r\n break\r\n // .\r\n // . p1 p0\r\n // +------x\r\n // .\r\n // .\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n conn.setVertex(1, min(fromPt.x - MINDIST, p1.x), fromPt.y)// p1\r\n if(p2)\r\n conn.setVertex(2, min(fromPt.x - MINDIST, p1.x), p2.y) // p2\r\n break\r\n // ...+....\r\n // p1 |\r\n // |\r\n // |\r\n // p0 x\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n conn.setVertex(1, fromPt.x, min(fromPt.y - MINDIST, p1.y)) // p1\r\n if(p2)\r\n conn.setVertex(2, p2.x, min(fromPt.y - MINDIST, p1.y)) // p2\r\n break\r\n // x\r\n // p0 |\r\n // |\r\n // p1 |\r\n // ....+....\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n conn.setVertex(1, fromPt.x, max(fromPt.y + MINDIST, p1.y)) // p1\r\n if(p2)\r\n conn.setVertex(2, p2.x, max(fromPt.y + MINDIST, p1.y)) // p2\r\n break\r\n }\r\n }\r\n //////////////////////////////////////////////////////////////////\r\n // the TARGET port (labeled with p0) has moved\r\n //\r\n if (routingHints.endMoved || !toPt.equals(oldVertices.get(vertexCount - 1))) {\r\n let p1 = oldVertices.get(vertexCount - 2)\r\n let p2 = oldVertices.get(vertexCount - 3) // optional\r\n conn.setVertex(vertexCount - 1, toPt) // p0\r\n\r\n switch (toDir) {\r\n // .\r\n // p0 . p1\r\n // x----------+\r\n // .\r\n // .\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n conn.setVertex(vertexCount - 2, max(toPt.x + MINDIST, p1.x), toPt.y) // p1\r\n if(p2)\r\n conn.setVertex(vertexCount - 3, max(toPt.x + MINDIST, p1.x), p2.y) // p2\r\n break\r\n\r\n // .\r\n // .\r\n // . p1 p0\r\n // +----------x\r\n // .\r\n // .\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n conn.setVertex(vertexCount - 2, min(toPt.x - MINDIST, p1.x), toPt.y) // p1\r\n if(p2)\r\n conn.setVertex(vertexCount - 3, min(toPt.x - MINDIST, p1.x), p2.y) // p2\r\n break\r\n\r\n // ...+....\r\n // p1 |\r\n // |\r\n // |\r\n // p0 x\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n conn.setVertex(vertexCount - 2, toPt.x, min(toPt.y - MINDIST, p1.y)) // p1\r\n if(p2)\r\n conn.setVertex(vertexCount - 3, p2.x, min(toPt.y - MINDIST, p1.y)) // p2\r\n break\r\n\r\n // +\r\n // p0 |\r\n // |\r\n // p1 |\r\n // ...+...\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n conn.setVertex(vertexCount - 2, toPt.x, max(toPt.y + MINDIST, p1.y)) // p1\r\n if(p2)\r\n conn.setVertex(vertexCount - 3, p2.x, max(toPt.y + MINDIST, p1.y)) // p2\r\n break\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Callback method for the PolyLine or Connection to verify that a segment is deletable.\r\n * @param {draw2d.Connection} conn\r\n * @param {Number} index\r\n *\r\n * @returns {Boolean}\r\n * @since 4.2.3\r\n */\r\n canRemoveSegmentAt: function (conn, index) {\r\n\r\n let segmentCount = conn.getVertices().getSize() - 1 // segmentCount is one less than vertex count\r\n\r\n // The first and last segment isn't deletable\r\n //\r\n if ((index <= 0) || ((index + 1) >= segmentCount)) {\r\n return false\r\n }\r\n\r\n // a connection need at least three strokes\r\n //\r\n if (segmentCount < 4) {\r\n return false\r\n }\r\n\r\n let fromPt = conn.getStartPosition()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPosition()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n if (segmentCount <= 5) {\r\n // ___\r\n // | | From\r\n // | 1 |-----+\r\n // |___| |\r\n // |\r\n // +----------+\r\n // |\r\n // | ___\r\n // | | |\r\n // +---| 2 | To\r\n // |___|\r\n // the connection needs at least 5 segments if the routing is like this\r\n //\r\n if ((fromDir === draw2d.geo.Rectangle.DIRECTION_RIGHT) && (toDir === draw2d.geo.Rectangle.DIRECTION_LEFT) && (fromPt.x >= toPt.x)) {\r\n return false\r\n }\r\n\r\n\r\n // ___\r\n // | | To\r\n // | 2 |-----+\r\n // |___| |\r\n // |\r\n // +----------+\r\n // |\r\n // | ___\r\n // | | |\r\n // +---| 1 | From\r\n // |___|\r\n // the connection needs at least 5 segments if the routing is like this\r\n //\r\n if ((fromDir == draw2d.geo.Rectangle.DIRECTION_LEFT) & (toDir == draw2d.geo.Rectangle.DIRECTION_RIGHT) && (fromPt.x <= toPt.x)) {\r\n return false\r\n }\r\n\r\n // ___\r\n // +_______ | |\r\n // | from | | 2 |\r\n // _+_ | |___|\r\n // | | | To +\r\n // | 1 | |____________|\r\n // |___|\r\n // the connection needs at least 5 segments if the routing is like this\r\n //\r\n if ((fromDir == draw2d.geo.Rectangle.DIRECTION_UP) & (toDir == draw2d.geo.Rectangle.DIRECTION_DOWN) && (fromPt.y <= toPt.y)) {\r\n return false\r\n }\r\n\r\n // ___\r\n // +_______ | |\r\n // | to | | 1 |\r\n // _+_ | |___|\r\n // | | | from +\r\n // | 2 | |____________|\r\n // |___|\r\n // the connection needs at least 5 segments if the routing is like this\r\n //\r\n if ((fromDir == draw2d.geo.Rectangle.DIRECTION_DOWN) & (toDir == draw2d.geo.Rectangle.DIRECTION_UP) && (fromPt.y >= toPt.y)) {\r\n return false\r\n }\r\n\r\n // unable to make the decision on the easy way. calculate the route again with an\r\n // temporary connection and check if the segment count of the new routed connection\r\n // allows a removal\r\n //\r\n let tmpConn = new draw2d.Connection()\r\n tmpConn.lineSegments = new draw2d.util.ArrayList()\r\n tmpConn.vertices = new draw2d.util.ArrayList()\r\n tmpConn.sourcePort = conn.sourcePort\r\n tmpConn.targetPort = conn.targetPort\r\n tmpConn._routingMetaData = {routedByUserInteraction: false, fromDir: -1, toDir: -1}\r\n this.route(tmpConn, {oldVertices: new draw2d.util.ArrayList()})\r\n let curSegmentCount = conn.getVertices().getSize() - 1\r\n let minSegmentCount = tmpConn.getVertices().getSize() - 1\r\n if (curSegmentCount <= minSegmentCount) {\r\n return false\r\n }\r\n }\r\n\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * The draw2d.Connection delegates the drag operation to the router. The router can\r\n * handle the different constraints of the connection and just drag&drop a single segment\r\n * instead of the complete connection.\r\n *\r\n * @param {draw2d.shape.basic.Line} line the related line to handle\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n *\r\n * @since 6.1.0\r\n */\r\n onDrag: function (line, dx, dy, dx2, dy2) {\r\n let i = 0\r\n // Connection is dragged by source and origin port movement\r\n // or MultiSelection in this case we drag the complete\r\n // connection\r\n if (line.draggedSegment === null) {\r\n let count = line.getVertices().getSize() - 1\r\n for (i = 1; i < count; i++) {\r\n line.getVertex(i).translate(dx2, dy2)\r\n }\r\n return\r\n }\r\n\r\n // don't drag start/end segments. This segments are bounded to the related\r\n // ports.\r\n if (line.draggedSegment.index === 0 || line.draggedSegment.index === (line.getSegments().getSize() - 1)) {\r\n return\r\n }\r\n\r\n line._routingMetaData.routedByUserInteraction = true\r\n\r\n let p0 = line.draggedSegment.start\r\n let p1 = line.draggedSegment.end\r\n i = line.draggedSegment.index\r\n let lp0 = line.getVertices().first()\r\n let lp1 = line.getVertices().last()\r\n\r\n // horizontal segment movement\r\n // x Py\r\n // .\r\n // P0 .\r\n // +---------------------------+ P1\r\n // .\r\n // .\r\n // x Px\r\n //\r\n let distance = 0\r\n if (p0.y === p1.y) {\r\n // ensure that the segment is the min distance away from the source/target port\r\n // (Px is endpoints of the connection and bounded to a port)\r\n if (i === 1) distance = p0.y - lp0.y\r\n // (Py is endpoints of the connection and bounded to a port)\r\n if (i === line.getSegments().getSize() - 2) distance = p1.y - lp1.y\r\n\r\n\r\n if (distance < 0 && dy2 > 0) {\r\n dy2 = Math.min(dy2, (-distance) - this.MINDIST)\r\n }\r\n else if (distance > 0 && dy2 < 0) {\r\n dy2 = -Math.min(-dy2, (distance) - this.MINDIST)\r\n }\r\n\r\n line.getVertex(i).translate(0, dy2)\r\n line.getVertex(i + 1).translate(0, dy2)\r\n }\r\n // vertical segment movement\r\n //\r\n else if (p0.x === p1.x) {\r\n // ensure that the segment is the min distance away from the source/target port\r\n //\r\n if (i === 1) {\r\n distance = p0.x - lp0.x\r\n if (distance < 0 && dx2 > 0) {\r\n dx2 = Math.min(dx2, (-distance) - this.MINDIST)\r\n }\r\n else if (distance > 0 && dx2 < 0) {\r\n dx2 = -Math.min(-dx2, (distance) - this.MINDIST)\r\n }\r\n }\r\n\r\n // we need this additional test too. No \"else if\" because the special\r\n // case of \"index===1\". In this case the segment can be the last AND first\r\n // segment if the connection has only three segments at all.\r\n //\r\n if (i === line.getSegments().getSize() - 2) {\r\n distance = p1.x - lp1.x\r\n if (distance < 0 && dx2 > 0) {\r\n dx2 = Math.min(dx2, (-distance) - this.MINDIST)\r\n }\r\n else if (distance > 0 && dx2 < 0) {\r\n dx2 = -Math.min(-dx2, (distance) - this.MINDIST)\r\n }\r\n }\r\n\r\n line.getVertex(i).translate(dx2, 0)\r\n line.getVertex(i + 1).translate(dx2, 0)\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Called by the connection if the vertices set outside.\r\n * This enforce the router to avoid full autoroute. E.g. InteractiveManhattanRouter\r\n *\r\n * @protected\r\n */\r\n verticesSet: function (conn) {\r\n conn._routingMetaData.routedByUserInteraction = true\r\n if (conn.getSource() !== null && conn.getTarget() !== null) {\r\n conn._routingMetaData.fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n conn._routingMetaData.toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Tweak or enrich the polyline persistence data with routing information\r\n *\r\n * @since 2.10.0\r\n * @param {draw2d.shape.basic.PolyLine} line\r\n * @param {Object} memento The memento data of the polyline\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function (line, memento) {\r\n memento.vertex = []\r\n\r\n line.getVertices().each( (i, e) =>{\r\n memento.vertex.push({x: e.x, y: e.y})\r\n })\r\n memento.routingMetaData = { ...line._routingMetaData}\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n * \r\n * set the attributes for the polyline with routing information of the interactive manhattan router.\r\n *\r\n * @since 4..0.0\r\n * @param {Object} memento\r\n */\r\n setPersistentAttributes: function (line, memento) {\r\n // restore the points from the JSON data and add them to the polyline\r\n //\r\n if (Array.isArray(memento.vertex)) {\r\n\r\n line.oldPoint = null\r\n line.lineSegments = new draw2d.util.ArrayList()\r\n\r\n line.setVertices(memento.vertex)\r\n }\r\n\r\n if (typeof memento.routingMetaData !== \"undefined\") {\r\n line._routingMetaData = {...memento.routingMetaData}\r\n }\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Provides a {@link draw2d.Connection} with an orthogonal route between the Connection's source\r\n * and target anchors.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ManhattanConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.ManhattanBridgedConnectionRouter = draw2d.layout.connection.ManhattanConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.ManhattanBridgedConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.ManhattanBridgedConnectionRouter\",\r\n\r\n BRIDGE_HORIZONTAL_LR: \" r 0 0 3 -4 7 -4 10 0 13 0 \", // Left to right\r\n BRIDGE_HORIZONTAL_RL: \" r 0 0 -3 -4 -7 -4 -10 0 -13 0 \", // right to left\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n let fromPt = conn.getStartPoint()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPoint()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // calculate the lines between the two points.\r\n //\r\n this._route(conn, toPt, toDir, fromPt, fromDir)\r\n // if the start/end are too close, the router do not route anything at all - shortcut. But for the drawing routine\r\n // and the later processing, we need at least two points - \"start\" and \"end\". we fix this here\r\n if(conn.getVertices().getSize()<2){\r\n conn.addPoint(fromPt)\r\n }\r\n \r\n // calculate the path string for the SVG rendering\r\n //\r\n let intersectionsASC = conn.getCanvas().getIntersection(conn).sort(\"x\")\r\n let intersectionsDESC = intersectionsASC.clone().reverse()\r\n\r\n let intersectionForCalc = intersectionsASC\r\n\r\n\r\n // ATTENTION: we cast all x/y coordinates to int and add 0.5 to avoid subpixel rendering of\r\n // the connection. The 1px or 2px lines look much clearer than before.\r\n //\r\n let ps = conn.getVertices()\r\n let p = ps.get(0)\r\n let path = [\"M\", (p.x | 0) + 0.5, \" \", (p.y | 0) + 0.5]\r\n let oldP = p\r\n for (let i = 1; i < ps.getSize(); i++) {\r\n p = ps.get(i)\r\n\r\n // check for intersection and paint a bridge if required\r\n // line goes from left to right\r\n //\r\n let bridgeWidth = 5\r\n let bridgeCode = this.BRIDGE_HORIZONTAL_LR\r\n\r\n // line goes from right->left. Inverse the bridge and the bridgeWidth\r\n //\r\n if (oldP.x >= p.x) {\r\n intersectionForCalc = intersectionsDESC\r\n bridgeCode = this.BRIDGE_HORIZONTAL_RL\r\n bridgeWidth = -bridgeWidth\r\n }\r\n\r\n intersectionForCalc.each(function (ii, interP) {\r\n if (interP.justTouching === false && draw2d.shape.basic.Line.hit(1, oldP.x, oldP.y, p.x, p.y, interP.x, interP.y) === true) {\r\n // we draw only horizontal bridges. Just a design decision\r\n //\r\n if (Math.floor(p.y) === Math.floor(interP.y)) {\r\n path.push(\" L\", ((interP.x - bridgeWidth) | 0) + 0.5, \" \", (interP.y | 0) + 0.5)\r\n path.push(bridgeCode)\r\n }\r\n }\r\n\r\n })\r\n\r\n path.push(\" L\", (p.x | 0) + 0.5, \" \", (p.y | 0) + 0.5)\r\n oldP = p\r\n }\r\n conn.svgPathString = path.join(\"\")\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Provides a {@link draw2d.Connection} with an orthogonal route between the Connection's source\r\n * and target anchors.\r\n *\r\n *\r\n * @example\r\n *\r\n * // Override the default connection type. This is used during drag&drop operations of ports.\r\n * //\r\n * let createConnection=function(sourcePort, targetPort){\r\n * // return my special kind of connection\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.ManhattanConnectionRouter());\r\n * return con;\r\n * };\r\n *\r\n * // Install a special policy into the canvas to use my own implementation of connection\r\n * // if we drag&drop a port\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.ManhattanConnectionRouter = draw2d.layout.connection.ConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.ManhattanConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.ManhattanConnectionRouter\",\r\n\r\n MINDIST: 20,\r\n TOL: 0.1,\r\n TOLxTOL: 0.01,\r\n TOGGLE_DIST: 20,\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n let fromPt = conn.getStartPosition()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPosition()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // calculate the lines between the two points.\r\n //\r\n this._route(conn, toPt, toDir, fromPt, fromDir)\r\n // if the start/end are too close, the router do not route anything at all - shortcut. But for the drawing routine\r\n // and the later processing, we need at least two points - \"start\" and \"end\". we fix this here\r\n if(conn.getVertices().getSize()<2){\r\n conn.addPoint(fromPt)\r\n }\r\n \r\n this._paint(conn)\r\n },\r\n\r\n /**\r\n *\r\n * Internal routing algorithm.\r\n *\r\n * @private\r\n * @param {draw2d.Connection} conn\r\n * @param {draw2d.geo.Point} fromPt\r\n * @param {Number} fromDir\r\n * @param {draw2d.geo.Point} toPt\r\n * @param {Number} toDir\r\n */\r\n _route: function (conn, fromPt, fromDir, toPt, toDir) {\r\n // fromPt is an x,y to start from.\r\n // fromDir is an angle that the first link must\r\n //\r\n let UP = draw2d.geo.Rectangle.DIRECTION_UP\r\n let RIGHT = draw2d.geo.Rectangle.DIRECTION_RIGHT\r\n let DOWN = draw2d.geo.Rectangle.DIRECTION_DOWN\r\n let LEFT = draw2d.geo.Rectangle.DIRECTION_LEFT\r\n\r\n let xDiff = fromPt.x - toPt.x\r\n let yDiff = fromPt.y - toPt.y\r\n let point\r\n let dir\r\n let pos\r\n\r\n if (((xDiff * xDiff) < (this.TOLxTOL)) && ((yDiff * yDiff) < (this.TOLxTOL))) {\r\n conn.addPoint(new draw2d.geo.Point(toPt.x, toPt.y))\r\n return\r\n }\r\n\r\n if (fromDir === LEFT) {\r\n if ((xDiff > 0) && ((yDiff * yDiff) < this.TOL) && (toDir === RIGHT)) {\r\n point = toPt\r\n dir = toDir\r\n }\r\n else {\r\n if (xDiff < 0) {\r\n point = new draw2d.geo.Point(fromPt.x - this.MINDIST, fromPt.y)\r\n }\r\n else if (((yDiff > 0) && (toDir === DOWN)) || ((yDiff < 0) && (toDir === UP))) {\r\n point = new draw2d.geo.Point(toPt.x, fromPt.y)\r\n }\r\n else if (fromDir === toDir) {\r\n pos = Math.min(fromPt.x, toPt.x) - this.MINDIST\r\n point = new draw2d.geo.Point(pos, fromPt.y)\r\n }\r\n else {\r\n point = new draw2d.geo.Point(fromPt.x - (xDiff / 2), fromPt.y)\r\n }\r\n\r\n if (yDiff > 0) {\r\n dir = UP\r\n }\r\n else {\r\n dir = DOWN\r\n }\r\n }\r\n }\r\n else if (fromDir === RIGHT) {\r\n if ((xDiff < 0) && ((yDiff * yDiff) < this.TOL) && (toDir === LEFT)) {\r\n point = toPt\r\n dir = toDir\r\n }\r\n else {\r\n if (xDiff > 0) {\r\n point = new draw2d.geo.Point(fromPt.x + this.MINDIST, fromPt.y)\r\n }\r\n else if (((yDiff > 0) && (toDir === DOWN)) || ((yDiff < 0) && (toDir === UP))) {\r\n point = new draw2d.geo.Point(toPt.x, fromPt.y)\r\n }\r\n else if (fromDir === toDir) {\r\n pos = Math.max(fromPt.x, toPt.x) + this.MINDIST\r\n point = new draw2d.geo.Point(pos, fromPt.y)\r\n }\r\n else {\r\n point = new draw2d.geo.Point(fromPt.x - (xDiff / 2), fromPt.y)\r\n }\r\n\r\n if (yDiff > 0) {\r\n dir = UP\r\n }\r\n else {\r\n dir = DOWN\r\n }\r\n }\r\n }\r\n else if (fromDir === DOWN) {\r\n if (((xDiff * xDiff) < this.TOL) && (yDiff < 0) && (toDir === UP)) {\r\n point = toPt\r\n dir = toDir\r\n }\r\n else {\r\n if (yDiff > 0) {\r\n point = new draw2d.geo.Point(fromPt.x, fromPt.y + this.MINDIST)\r\n }\r\n else if (((xDiff > 0) && (toDir === RIGHT)) || ((xDiff < 0) && (toDir === LEFT))) {\r\n point = new draw2d.geo.Point(fromPt.x, toPt.y)\r\n }\r\n else if (fromDir === toDir) {\r\n pos = Math.max(fromPt.y, toPt.y) + this.MINDIST\r\n point = new draw2d.geo.Point(fromPt.x, pos)\r\n }\r\n else {\r\n point = new draw2d.geo.Point(fromPt.x, fromPt.y - (yDiff / 2))\r\n }\r\n\r\n if (xDiff > 0) {\r\n dir = LEFT\r\n }\r\n else {\r\n dir = RIGHT\r\n }\r\n }\r\n }\r\n else if (fromDir === UP) {\r\n if (((xDiff * xDiff) < this.TOL) && (yDiff > 0) && (toDir === DOWN)) {\r\n point = toPt\r\n dir = toDir\r\n }\r\n else {\r\n if (yDiff < 0) {\r\n point = new draw2d.geo.Point(fromPt.x, fromPt.y - this.MINDIST)\r\n }\r\n else if (((xDiff > 0) && (toDir === RIGHT)) || ((xDiff < 0) && (toDir === LEFT))) {\r\n point = new draw2d.geo.Point(fromPt.x, toPt.y)\r\n }\r\n else if (fromDir === toDir) {\r\n pos = Math.min(fromPt.y, toPt.y) - this.MINDIST\r\n point = new draw2d.geo.Point(fromPt.x, pos)\r\n }\r\n else {\r\n point = new draw2d.geo.Point(fromPt.x, fromPt.y - (yDiff / 2))\r\n }\r\n\r\n if (xDiff > 0) {\r\n dir = LEFT\r\n }\r\n else {\r\n dir = RIGHT\r\n }\r\n }\r\n }\r\n this._route(conn, point, dir, toPt, toDir)\r\n conn.addPoint(fromPt)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * <b>BETA VERSION. Not for production!!!<br></b>\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ConnectionRouter\r\n */\r\n\r\nlet ROUTER_RECTS = null\r\n\r\ndraw2d.layout.connection.MazeConnectionRouter = draw2d.layout.connection.ConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.MazeConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.MazeConnectionRouter\",\r\n\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n this.useSpline = false\r\n this.useSimplify = true\r\n this.useSimplifyValue = 2\r\n this.useDebug = false\r\n this.useShift = 4\r\n this.portOutletOffset = 15\r\n\r\n\r\n// \tthis.finder = new PF.AStarFinder();\r\n// this.finder = new PF.AStarFinder({ allowDiagonal: true, dontCrossCorners: true});\r\n// this.finder = new PF.AStarFinder({ allowDiagonal: false});\r\n// this.finder = new PF.BiBreadthFirstFinder({ allowDiagonal: false});\r\n// this.finder = new PF.BreadthFirstFinder({ allowDiagonal: false});\r\n this.finder = new PF.JumpPointFinder({allowDiagonal: false, dontCrossCorners: true})\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n let fromPt = conn.getStartPoint()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPoint()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // calculate the lines between the two points.\r\n //\r\n this._route(conn, toPt, toDir, fromPt, fromDir)\r\n this._paint(conn)\r\n },\r\n\r\n /**\r\n * \r\n * Internal routing algorithm.\r\n * * <p>\r\n * Possible values:\r\n * <ul>\r\n * <li>up -> 0</li>\r\n * <li>right -> 1</li>\r\n * <li>down -> 2</li>\r\n * <li>left -> 3</li>\r\n * </ul>\r\n * <p>\r\n\r\n * @private\r\n * @param {draw2d.Connection} conn\r\n * @param {draw2d.geo.Point} fromPt\r\n * @param {Number} fromDir\r\n * @param {draw2d.geo.Point} toPt\r\n * @param {Number} toDir\r\n */\r\n _route: function (conn, fromPt, fromDir, toPt, toDir) {\r\n let shift = this.useShift\r\n\r\n let oldToPt = toPt\r\n let oldFromPt = fromPt\r\n\r\n // move the points with an offset in the prefered routing direction of the ports\r\n // to avoid that the routed connection is sticking on one side of the figure.\r\n //\r\n fromPt = this.getAdjustedPoint(fromPt, fromDir, this.portOutletOffset)\r\n toPt = this.getAdjustedPoint(toPt, toDir, this.portOutletOffset)\r\n\r\n let grid = this.generateNoGoGrid(conn, fromPt, fromDir, toPt, toDir)\r\n\r\n // 4. Calculate the shortest path from source to target based on the grid\r\n //\r\n let path = this.finder.findPath(\r\n Math.max(fromPt.x) >> shift, Math.max(fromPt.y) >> shift,\r\n Math.max(toPt.x )>> shift, Math.max(0,toPt.y) >> shift,\r\n grid)\r\n\r\n // transfer the path from the grid based coordinates back to the real coordinates\r\n //\r\n path.forEach(e => {\r\n e.x = e[0] = e[0] << shift\r\n e.y = e[1] = e[1] << shift\r\n })\r\n\r\n // 5. paint the \"no go\" area in read if we are in debug mode\r\n //\r\n if (this.useDebug) {\r\n if (ROUTER_RECTS !== null) {\r\n ROUTER_RECTS.remove()\r\n }\r\n ROUTER_RECTS = conn.canvas.paper.set()\r\n\r\n for (let i = 0; i < grid.width; i++) {\r\n for (let j = 0; j < grid.height; j++) {\r\n if (!grid.isWalkableAt(i, j))\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(i << shift, j << shift, 1 << shift, 1 << shift).attr({\r\n \"fill\": \"red\",\r\n \"opacity\": \"0.1\"\r\n }))\r\n }\r\n }\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(fromPt.x - 3, fromPt.y - 3, 6, 6).attr({\r\n \"fill\": \"#ff0000\",\r\n \"opacity\": \"0.8\"\r\n }))\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(toPt.x - 3, toPt.y - 3, 6, 6).attr({\r\n \"fill\": \"#ff0000\",\r\n \"opacity\": \"0.8\"\r\n }))\r\n\r\n // paint the original calculated path without any simplification in BLUE\r\n path.forEach(e => {\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(e.x - 3, e.y - 3, 6, 6).attr({\"fill\": \"#0000ff\", \"opacity\": \"0.8\"}))\r\n })\r\n if(path.length>0){\r\n let p = path[0]\r\n let svgPathBefore = [\"M\", p.x.toFixed(2), \" \", p.y.toFixed(2)]\r\n for (let i = 1; i < path.length; i++) {\r\n p = path[i]\r\n svgPathBefore.push(\"L\", p.x.toFixed(2), \" \", p.y.toFixed(2))\r\n }\r\n svgPathBefore = svgPathBefore.join(\"\")\r\n ROUTER_RECTS.push(conn.canvas.paper.path(svgPathBefore).attr({\"stroke\": \"#0000ff\"}))\r\n }\r\n }\r\n\r\n\r\n this.adjustPath(fromPt, path, fromDir)\r\n path.reverse()\r\n this.adjustPath(toPt, path, toDir)\r\n path.reverse()\r\n\r\n path.forEach(e => {\r\n e.x = e[0]\r\n e.y = e[1]\r\n })\r\n\r\n\r\n if (this.useSpline) {\r\n let p = new draw2d.util.ArrayList()\r\n p.add(oldFromPt)\r\n path.forEach(e => {\r\n p.add(new draw2d.geo.Point(e[0], e[1]))\r\n })\r\n p.add(oldToPt)\r\n\r\n if (this.useDebug) {\r\n path.forEach(e => {\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(e.x - 3, e.y - 3, 6, 6).attr({\"fill\": \"#00ff00\", \"opacity\": \"0.8\"}))\r\n })\r\n let pt = path[0]\r\n let svgPathBefore = [\"M\", pt.x.toFixed(2), \" \", pt.y.toFixed(2)]\r\n for (let i = 1; i < path.length; i++) {\r\n pt = path[i]\r\n svgPathBefore.push(\"L\", pt.x.toFixed(2), \" \", pt.y.toFixed(2))\r\n }\r\n svgPathBefore = svgPathBefore.join(\"\")\r\n ROUTER_RECTS.push(conn.canvas.paper.path(svgPathBefore).attr({\"stroke\": \"#00ff00\"}))\r\n }\r\n\r\n this.spline = new draw2d.util.spline.CubicSpline()\r\n let splinePoints = this.spline.generate(p, 8)\r\n\r\n if (this.useSimplify) {\r\n path = []\r\n splinePoints.each(function (i, e) {\r\n path.push({x: e.x, y: e.y})\r\n })\r\n path = this.simplify(path, this.useSimplifyValue, true)\r\n\r\n path.forEach(e => {\r\n conn.addPoint(e.x, e.y)\r\n })\r\n }\r\n else {\r\n splinePoints.each(function (i, e) {\r\n conn.addPoint(e)\r\n })\r\n }\r\n }\r\n else {\r\n if (this.useSimplify) {\r\n path = this.simplify(path, this.useSimplifyValue, true)\r\n }\r\n\r\n if (this.useDebug) {\r\n path.forEach(e => {\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(e.x - 3, e.y - 3, 6, 6).attr({\"fill\": \"#00ff00\", \"opacity\": \"0.8\"}))\r\n })\r\n if(path.length>0){\r\n let p = path[0]\r\n let svgPathBefore = [\"M\", p.x.toFixed(2), \" \", p.y.toFixed(2)]\r\n for (let i = 1; i < path.length; i++) {\r\n p = path[i]\r\n svgPathBefore.push(\"L\", p.x.toFixed(2), \" \", p.y.toFixed(2))\r\n }\r\n svgPathBefore = svgPathBefore.join(\"\")\r\n ROUTER_RECTS.push(conn.canvas.paper.path(svgPathBefore).attr({\"stroke\": \"#00ff00\"}))\r\n }\r\n }\r\n\r\n conn.addPoint(oldFromPt)\r\n path.forEach(e => {\r\n conn.addPoint(e[0], e[1])\r\n })\r\n conn.addPoint(oldToPt)\r\n\r\n }\r\n\r\n },\r\n\r\n /**\r\n * \r\n * Generate a grid base no go map required for the path finding algorithm\r\n *\r\n * @param conn\r\n * @returns {PF.Grid}\r\n * @private\r\n */\r\n generateNoGoGrid: function (conn, fromPt, fromDir, toPt, toDir) {\r\n let shift = this.useShift\r\n let oneShift2 = (1 << shift) / 2\r\n\r\n // 1. generate a map with all \"no go\" areas. The bounding box of the shapes defines\r\n // the no go areas.\r\n //\r\n let canvasWidth = conn.getCanvas().paper.width >> shift\r\n let canvasHeight = conn.getCanvas().paper.height >> shift\r\n let grid = new PF.Grid(canvasWidth, canvasHeight)\r\n let figures = conn.getCanvas().getFigures()\r\n figures.each(function (i, e) {\r\n let box = e.getBoundingBox()\r\n // remove shapes which are hit by the input or output ports. It is not possible to route\r\n // out from a not walkable area\r\n if (box.hitTest(fromPt.x, fromPt.y) === true || box.hitTest(toPt.x, toPt.y)) {\r\n return\r\n }\r\n\r\n let x = box.x >> shift\r\n let y = box.y >> shift\r\n if (x < 1 || y < 1) {\r\n return\r\n }\r\n let r_orig = (box.x + box.w + oneShift2) >> shift\r\n let b_orig = (box.y + box.h + oneShift2) >> shift\r\n for (let i = x; i <= r_orig; i++) {\r\n for (let j = y; j <= b_orig; j++) {\r\n grid.setWalkableAt(i, j, false)\r\n }\r\n }\r\n })\r\n\r\n\r\n // 3. make the are walkable on the edge of the port side. Otherwise we a\r\n // an enclosed area around the port if we are very close to another shape\r\n //\r\n let box = conn.getSource().getParent().getBoundingBox()\r\n if (toDir === 1 || toDir === 3) {\r\n let y = box.y >> shift\r\n if (y > 0) {\r\n let b_orig = box.y + box.h\r\n let i = (toPt.x >> shift)\r\n\r\n for (let j = y - 1; j << shift <= b_orig; j++) {\r\n grid.setWalkableAt(i, j, true)\r\n }\r\n }\r\n }\r\n else {\r\n let x = box.x >> shift\r\n if (x > 0) {\r\n let r_orig = box.x + box.w\r\n let j = (toPt.x >> shift)\r\n for (let i = x - 1; i << shift <= r_orig; i++) {\r\n grid.setWalkableAt(i, j, true)\r\n }\r\n }\r\n }\r\n\r\n box = conn.getTarget().getParent().getBoundingBox()\r\n if (fromDir === 1 || fromDir === 3) {\r\n let y = box.y >> shift\r\n if (y > 0) {\r\n let b_orig = box.y + box.h\r\n let i = (fromPt.x >> shift)\r\n for (let j = y - 1; j << shift <= b_orig; j++) {\r\n grid.setWalkableAt(i, j, true)\r\n }\r\n }\r\n }\r\n else {\r\n let x = box.x >> shift\r\n if (x > 0) {\r\n let r_orig = box.x + box.w\r\n let j = (fromPt.x >> shift)\r\n for (let i = x - 1; i << shift <= r_orig; i++) {\r\n grid.setWalkableAt(i, j, true)\r\n }\r\n }\r\n }\r\n\r\n return grid\r\n },\r\n\r\n /**\r\n * \r\n * move the point in the given direction with the given offset\r\n *\r\n * @param {draw2d.geo.Point} pt\r\n * @param {Number} direction\r\n * @param {Number} adjustment\r\n *\r\n * @returns {draw2d.geo.Point}\r\n */\r\n getAdjustedPoint: function (pt, direction, adjustment) {\r\n\r\n switch (direction) {\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n return new draw2d.geo.Point(pt.x, pt.y - adjustment)\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n return new draw2d.geo.Point(pt.x + adjustment, pt.y)\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n return new draw2d.geo.Point(pt.x, pt.y + adjustment)\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n return new draw2d.geo.Point(pt.x - adjustment, pt.y)\r\n }\r\n },\r\n\r\n adjustPath: function (pt, path, direction) {\r\n let shift = this.useShift\r\n let x = pt.x >> shift\r\n let y = pt.y >> shift\r\n path.forEach(e => {\r\n if (y === (e[1] >> shift)) {\r\n e[1] = pt.y\r\n }\r\n else {\r\n return false\r\n }\r\n })\r\n path.forEach(e => {\r\n if (x === (e[0] >> shift)) {\r\n e[0] = pt.x\r\n }\r\n else {\r\n return false\r\n }\r\n })\r\n },\r\n\r\n\r\n getSquareDistance: function (p1, p2) { // square distance between 2 points\r\n\r\n let dx = p1.x - p2.x,\r\n dy = p1.y - p2.y\r\n\r\n return dx * dx +\r\n dy * dy\r\n },\r\n\r\n getSquareSegmentDistance: function (p, p1, p2) { // square distance from a point to a segment\r\n\r\n let x = p1.x,\r\n y = p1.y,\r\n\r\n dx = p2.x - x,\r\n dy = p2.y - y,\r\n\r\n t\r\n\r\n if (dx !== 0 || dy !== 0) {\r\n\r\n t = ((p.x - x) * dx +\r\n (p.y - y) * dy) /\r\n (dx * dx +\r\n dy * dy)\r\n\r\n if (t > 1) {\r\n x = p2.x\r\n y = p2.y\r\n\r\n } else if (t > 0) {\r\n x += dx * t\r\n y += dy * t\r\n }\r\n }\r\n\r\n dx = p.x - x\r\n dy = p.y - y\r\n\r\n return dx * dx +\r\n dy * dy\r\n },\r\n\r\n simplifyRadialDistance: function (points, sqTolerance) { // distance-based simplification\r\n\r\n let i,\r\n len = points.length,\r\n point = null,\r\n prevPoint = points[0],\r\n newPoints = [prevPoint]\r\n\r\n for (i = 1; i < len; i++) {\r\n point = points[i]\r\n\r\n if (this.getSquareDistance(point, prevPoint) > sqTolerance) {\r\n newPoints.push(point)\r\n prevPoint = point\r\n }\r\n }\r\n\r\n if (prevPoint !== point) {\r\n newPoints.push(point)\r\n }\r\n\r\n return newPoints\r\n },\r\n\r\n\r\n // simplification using optimized Douglas-Peucker algorithm with recursion elimination\r\n\r\n simplifyDouglasPeucker: function (points, sqTolerance) {\r\n\r\n let len = points.length,\r\n\r\n MarkerArray = (typeof Uint8Array !== undefined + '')\r\n ? Uint8Array\r\n : Array,\r\n\r\n markers = new MarkerArray(len),\r\n\r\n first = 0,\r\n last = len - 1,\r\n\r\n i,\r\n maxSqDist,\r\n sqDist,\r\n index,\r\n\r\n firstStack = [],\r\n lastStack = [],\r\n\r\n newPoints = []\r\n\r\n markers[first] = markers[last] = 1\r\n\r\n while (last) {\r\n\r\n maxSqDist = 0\r\n\r\n for (i = first + 1; i < last; i++) {\r\n sqDist = this.getSquareSegmentDistance(points[i], points[first], points[last])\r\n\r\n if (sqDist > maxSqDist) {\r\n index = i\r\n maxSqDist = sqDist\r\n }\r\n }\r\n\r\n if (maxSqDist > sqTolerance) {\r\n markers[index] = 1\r\n\r\n firstStack.push(first)\r\n lastStack.push(index)\r\n\r\n firstStack.push(index)\r\n lastStack.push(last)\r\n }\r\n\r\n first = firstStack.pop()\r\n last = lastStack.pop()\r\n }\r\n\r\n for (i = 0; i < len; i++) {\r\n if (markers[i]) {\r\n newPoints.push(points[i])\r\n }\r\n }\r\n\r\n return newPoints\r\n },\r\n\r\n\r\n simplify: function (points, tolerance, highestQuality) {\r\n\r\n let sqTolerance = (tolerance !== undefined)\r\n ? tolerance * tolerance\r\n : 1\r\n\r\n if (!highestQuality) {\r\n points = this.simplifyRadialDistance(points, sqTolerance)\r\n }\r\n points = this.simplifyDouglasPeucker(points, sqTolerance)\r\n\r\n return points\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * JUST FOR RESEARCH AT THE MOMENT!!!!!!\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ManhattanConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.MuteableManhattanConnectionRouter = draw2d.layout.connection.ManhattanConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.MuteableManhattanConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.MuteableManhattanConnectionRouter\",\r\n\r\n UP: new draw2d.geo.Ray(0, -1),\r\n DOWN: new draw2d.geo.Ray(0, 1),\r\n LEFT: new draw2d.geo.Ray(-1, 0),\r\n RIGHT: new draw2d.geo.Ray(1, 0),\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n this.rowsUsed = {}//new HashMap<Integer, Integer>();\r\n this.colsUsed = {}//new HashMap<Integer, Integer>();\r\n this.constraints = {}//new HashMap<Connection, Object>();\r\n this.reservedInfo = {}//new HashMap<Connection, ReservedInfo>();\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n this.rowsUsed = {}//new HashMap<Integer, Integer>();\r\n this.colsUsed = {}//new HashMap<Integer, Integer>();\r\n this.constraints = {}//new HashMap<Connection, Object>();\r\n this.reservedInfo = {}//new HashMap<Connection, ReservedInfo>();\r\n\r\n let canvas = conn.getCanvas()\r\n let i\r\n\r\n let startPoint = conn.getStartPoint()\r\n let endPoint = conn.getEndPoint()\r\n\r\n let start = new draw2d.geo.Ray(startPoint)\r\n let end = new draw2d.geo.Ray(endPoint)\r\n let average = new draw2d.geo.Ray((start.x + end.x) / 2, (start.y + end.y) / 2)\r\n\r\n let direction = new draw2d.geo.Ray(end.x - start.x, end.y - start.y)\r\n let startNormal = this.getStartDirection(conn)\r\n let endNormal = this.getEndDirection(conn)\r\n\r\n let positions = new draw2d.util.ArrayList()\r\n let horizontal = startNormal.isHorizontal()\r\n\r\n if (horizontal) {\r\n positions.add(start.y)\r\n }\r\n else {\r\n positions.add(start.x)\r\n }\r\n\r\n horizontal = !horizontal\r\n\r\n // dot product is zero if the vector orthogonal (90°)\r\n if (startNormal.dot(endNormal) === 0) {\r\n if ((startNormal.dot(direction) >= 0) && (endNormal.dot(direction) <= 0)) {\r\n // 0\r\n } else {\r\n\r\n // 2\r\n if (startNormal.dot(direction) < 0)\r\n i = startNormal.similarity(start.translated(startNormal.scaled(10)))\r\n else {\r\n if (horizontal)\r\n i = average.y\r\n else\r\n i = average.x\r\n }\r\n\r\n positions.add(i)\r\n horizontal = !horizontal\r\n\r\n if (endNormal.dot(direction) > 0) {\r\n i = endNormal.similarity(end.translated(endNormal.scaled(10)))\r\n }\r\n else {\r\n if (horizontal) {\r\n i = average.y\r\n }\r\n else {\r\n i = average.x\r\n }\r\n }\r\n positions.add(i)\r\n horizontal = !horizontal\r\n }\r\n } else {\r\n if (startNormal.dot(endNormal) > 0) {\r\n //1\r\n if (startNormal.dot(direction) >= 0)\r\n i = startNormal.similarity(start.translated(startNormal.scaled(10)))\r\n else\r\n i = endNormal.similarity(end.translated(endNormal.scaled(10)))\r\n positions.add(i)\r\n horizontal = !horizontal\r\n } else {\r\n //3 or 1\r\n if (startNormal.dot(direction) < 0) {\r\n i = startNormal.similarity(start.translated(startNormal.scaled(10)))\r\n positions.add(i)\r\n horizontal = !horizontal\r\n }\r\n\r\n // my tweak to route SCA wires starts\r\n if (this.isCycle(conn)) {\r\n if (horizontal)\r\n i = conn.getSource().getParent().getBoundingBox().getTop() - 10// * index;\r\n else\r\n i = conn.getSource().getParent().getBoundingBox().getRight() + 10// * index;\r\n } else {\r\n if (horizontal) {\r\n let j = average.y\r\n\r\n let next = endNormal.similarity(end.translated(endNormal.scaled(10)))\r\n\r\n let trial = new draw2d.geo.Ray((positions.get(positions.getSize() - 1)), j)\r\n let figure = this.findFirstFigureAtStraightLine(canvas, trial, this.LEFT, draw2d.util.ArrayList.EMPTY_LIST)\r\n\r\n while (figure != null && figure.getBoundingBox().x + figure.getBoundingBox().width > next) {\r\n j = figure.getBoundingBox().y + figure.getBoundingBox().height + 5\r\n trial.y = j\r\n figure = this.findFirstFigureAtStraightLine(canvas, trial, this.LEFT, draw2d.util.ArrayList.EMPTY_LIST)\r\n }\r\n\r\n i = j\r\n\r\n } else {\r\n let figure = this.findFirstFigureAtStraightLine(canvas, start, this.RIGHT, this.getExcludingFigures(conn))\r\n if (figure == null)\r\n i = average.x\r\n else {\r\n i = Math.min(average.x, start.translated(new draw2d.geo.Ray(3 * (figure.getBoundingBox().x - start.x) / 4, 0)).x)\r\n i = Math.max(start.x, i)\r\n }\r\n i = this.adjust(conn, i)\r\n }\r\n }\r\n // my tweak to route SCA wires ends\r\n positions.add(i)\r\n horizontal = !horizontal\r\n }\r\n }\r\n if (horizontal)\r\n positions.add(end.y)\r\n else\r\n positions.add(end.x)\r\n\r\n this.processPositions(start, end, positions, startNormal.isHorizontal(), conn)\r\n\r\n\r\n this._paint(conn)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Connection} connection\r\n * @param {Number} r\r\n * @param {Number} n\r\n * @param {Number} x\r\n *\r\n * @private\r\n */\r\n getColumnNear: function (connection, r, n, x) {\r\n let min = Math.min(n, x)\r\n let max = Math.max(n, x)\r\n\r\n if (min > r) {\r\n max = min\r\n min = r - (min - r)\r\n }\r\n if (max < r) {\r\n min = max\r\n max = r + (r - max)\r\n }\r\n\r\n let proximity = 0\r\n let direction = -1\r\n if (r % 6 !== 0) {\r\n r = r - (r % 6)\r\n }\r\n\r\n let i\r\n while (proximity < r) {\r\n i = parseInt(r + proximity * direction)\r\n if (!(i in this.colsUsed)) {\r\n this.colsUsed[i] = i\r\n this.reserveColumn(connection, i)\r\n return i\r\n }\r\n\r\n if (i <= min) {\r\n return i + 6\r\n }\r\n\r\n if (i >= max) {\r\n return i - 6\r\n }\r\n\r\n if (direction === 1) {\r\n direction = -1\r\n }\r\n else {\r\n direction = 1\r\n proximity += 6\r\n }\r\n }\r\n return r\r\n },\r\n\r\n getRowNear: function (connection, r, n, x) {\r\n let min = Math.min(n, x)\r\n let max = Math.max(n, x)\r\n\r\n if (min > r) {\r\n max = min\r\n min = r - (min - r)\r\n }\r\n if (max < r) {\r\n min = max\r\n max = r + (r - max)\r\n }\r\n\r\n let proximity = 0\r\n let direction = -1\r\n if (r % 6 !== 0) {\r\n r = r - (r % 6)\r\n }\r\n\r\n let i\r\n while (proximity < r) {\r\n i = parseInt(r + proximity * direction)\r\n if (!(i in this.rowsUsed)) {\r\n this.rowsUsed[i] = i\r\n this.reserveRow(connection, i)\r\n return i\r\n }\r\n if (i <= min)\r\n return i + 6\r\n if (i >= max)\r\n return i - 6\r\n if (direction === 1)\r\n direction = -1\r\n else {\r\n direction = 1\r\n proximity += 6\r\n }\r\n }\r\n return r\r\n },\r\n\r\n /**\r\n * <li>up -> 0</li>\r\n * <li>right -> 1</li>\r\n * <li>down -> 2</li>\r\n * <li>left -> 3</li>\r\n **/\r\n getEndDirection: function (conn) {\r\n let p = conn.getEndPoint()\r\n let rect = conn.getTarget().getParent().getBoundingBox()\r\n return this.getDirection(rect, p)\r\n },\r\n\r\n\r\n /**\r\n * <li>up -> 0</li>\r\n * <li>right -> 1</li>\r\n * <li>down -> 2</li>\r\n * <li>left -> 3</li>\r\n **/\r\n getStartDirection: function (conn) {\r\n let p = conn.getStartPoint()\r\n let rect = conn.getSource().getParent().getBoundingBox()\r\n return this.getDirection(rect, p)\r\n },\r\n\r\n /**\r\n * Returns the direction the point <i>p</i> is in relation to the given rectangle.\r\n * Possible values are LEFT (-1,0), RIGHT (1,0), UP (0,-1) and DOWN (0,1).\r\n *\r\n * @param r the rectangle\r\n * @param p the point\r\n * @returns the direction from <i>r</i> to <i>p</i>\r\n */\r\n getDirection: function (r, p) {\r\n let i = Math.abs(r.y - p.y)\r\n let distance = Math.abs(r.x - p.x)\r\n let direction = this.LEFT\r\n\r\n if (i <= distance) {\r\n distance = i\r\n direction = this.UP\r\n }\r\n\r\n i = Math.abs(r.getBottom() - p.y)\r\n if (i <= distance) {\r\n distance = i\r\n direction = this.DOWN\r\n }\r\n\r\n i = Math.abs(r.getRight() - p.x)\r\n if (i < distance) {\r\n direction = this.RIGHT\r\n }\r\n\r\n return direction\r\n },\r\n\r\n processPositions: function (/*Ray*/ start, /*Ray*/ end, /*List*/ positions, /*boolean*/ horizontal, /*Connection*/ conn) {\r\n this.removeReservedLines(conn)\r\n\r\n let pos = []\r\n if (horizontal)\r\n pos.push(start.x)\r\n else\r\n pos.push(start.y)\r\n let i\r\n for (i = 0; i < positions.getSize(); i++) {\r\n pos.push(positions.get(i))\r\n }\r\n\r\n if (horizontal === (positions.getSize() % 2 === 1)) {\r\n pos.push(end.x)\r\n }\r\n else {\r\n pos.push(end.y)\r\n }\r\n\r\n conn.addPoint(new draw2d.geo.Point(start.x, start.y))\r\n let p\r\n let current, prev, min, max\r\n let adjust\r\n for (i = 2; i < pos.length - 1; i++) {\r\n horizontal = !horizontal\r\n prev = pos[i - 1]\r\n current = pos[i]\r\n\r\n adjust = (i !== pos.length - 2)\r\n if (horizontal) {\r\n if (adjust) {\r\n min = pos[i - 2]\r\n max = pos[i + 2]\r\n pos[i] = current = this.getRowNear(conn, current, min, max)\r\n }\r\n p = new draw2d.geo.Point(prev, current)\r\n } else {\r\n if (adjust) {\r\n min = pos[i - 2]\r\n max = pos[i + 2]\r\n pos[i] = current = this.getColumnNear(conn, current, min, max)\r\n }\r\n p = new draw2d.geo.Point(current, prev)\r\n }\r\n conn.addPoint(p)\r\n }\r\n conn.addPoint(new draw2d.geo.Point(end.x, end.y))\r\n },\r\n\r\n\r\n removeReservedLines: function (connection) {\r\n let rInfo = this.reservedInfo[connection]\r\n if (typeof rInfo === \"undefined\" || rInfo === null)\r\n return\r\n\r\n for (let i = 0; i < rInfo.reservedRows.getSize(); i++) {\r\n delete this.rowsUsed[rInfo.reservedRows.get(i)]\r\n }\r\n for (let i = 0; i < rInfo.reservedCols.getSize(); i++) {\r\n delete this.colsUsed[rInfo.reservedCols.get(i)]\r\n }\r\n delete this.reservedInfo[connection]\r\n },\r\n\r\n reserveColumn: function (connection, column) {\r\n let info = this.reservedInfo[connection]\r\n if (typeof info === \"undefined\" || info === null) {\r\n info = {reservedCols: new draw2d.util.ArrayList(), reservedRows: new draw2d.util.ArrayList()}\r\n this.reservedInfo[connection] = info\r\n }\r\n info.reservedCols.add(column)\r\n },\r\n\r\n reserveRow: function (connection, row) {\r\n let info = this.reservedInfo[connection]\r\n if (typeof info === \"undefined\" || info === null) {\r\n info = {reservedCols: new draw2d.util.ArrayList(), reservedRows: new draw2d.util.ArrayList()}\r\n this.reservedInfo[connection] = info\r\n }\r\n info.reservedRows.add(row)\r\n },\r\n\r\n getConstraint: function (connection) {\r\n return this.constraints[connection]\r\n },\r\n\r\n setConstraint: function (connection, constraint) {\r\n this.constraints[connection] = constraint\r\n },\r\n\r\n isCycle: function (conn) {\r\n let source = conn.getSource().getParent()\r\n let target = conn.getTarget().getParent()\r\n\r\n return source.id === target.id\r\n },\r\n\r\n getExcludingFigures: function (conn) {\r\n let excluding = new draw2d.util.ArrayList()\r\n\r\n excluding.add(conn.getSource().getParent())\r\n excluding.add(conn.getTarget().getParent())\r\n\r\n return excluding\r\n },\r\n\r\n findFirstFigureAtStraightLine: function (canvas, /*Ray*/ start, /*Ray*/ direction, /*List*/ excluding) {\r\n let figure = null\r\n\r\n let figures = canvas.getFigures()\r\n let _this = this\r\n figures.each(function (i, child) {\r\n try {\r\n if (!excluding.contains(child)) {\r\n let rect = child.getBoundingBox()\r\n if (_this.LEFT.equals(direction)) {\r\n if (start.x > rect.x && start.y >= rect.y && start.y <= rect.y + rect.h) {\r\n if (figure === null || rect.x > figure.getBoundingBox().x)\r\n figure = child\r\n }\r\n } else if (_this.RIGHT.equals(direction)) {\r\n if (start.x < rect.x + rect.w && start.y >= rect.y && start.y <= rect.y + rect.h) {\r\n if (figure == null || rect.x < figure.getBoundingBox().x)\r\n figure = child\r\n }\r\n } else if (_this.UP.equals(direction)) {\r\n if (start.y > rect.y && start.x >= rect.x && start.x <= rect.x + rect.w) {\r\n if (figure === null || rect.y > figure.getBoundingBox().y)\r\n figure = child\r\n }\r\n } else if (_this.DOWN.equals(direction)) {\r\n if (start.y < rect.y + rect.h && start.x >= rect.x && start.x <= rect.x + rect.w) {\r\n if (figure === null || rect.y < figure.getBoundingBox().y)\r\n figure = child\r\n }\r\n }\r\n }\r\n }\r\n catch (exc) {\r\n console.log(exc)\r\n debugger\r\n }\r\n })\r\n return figure\r\n },\r\n\r\n adjust: function (connection, col) {\r\n let column = col\r\n\r\n let start = connection.getSource().getPosition()\r\n\r\n let connections = connection.getCanvas().getLines()\r\n connections.each(function (i, conn) {\r\n try {\r\n if (conn === connection)\r\n return\r\n\r\n let end = conn.getTarget().getPosition()\r\n if (start.x < end.x && start.y === end.y) {\r\n if (conn.getVertices().getMidpoint().x <= col)\r\n column = conn.getVertices().getMidpoint().x - 5\r\n }\r\n }\r\n catch (exc) {\r\n console.log(exc)\r\n debugger\r\n }\r\n })\r\n return column\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Router for direct connections between two ports with a rubber band effect\r\n *\r\n *\r\n * @example\r\n *\r\n * let RubberConnection= draw2d.Connection.extend({\r\n * NAME: \"RubberConnection\",\r\n *\r\n * init:function(attr, setter, getter)\r\n * {\r\n * this._super(extend({\r\n * color: \"#33691e\",\r\n * stroke:1,\r\n * outlineStroke:0,\r\n * outlineColor:null\r\n * },attr),\r\n * setter,\r\n * getter);\r\n *\r\n *\r\n * this.setRouter(new draw2d.layout.connection.RubberbandRouter());\r\n * },\r\n *\r\n * repaint:function(attributes)\r\n * {\r\n * if (this.repaintBlocked===true || this.shape === null){\r\n * return;\r\n * }\r\n * attributes= attributes || {};\r\n * // enrich the rendering with a \"fill\" attribute\r\n * if(typeof attributes.fill === \"undefined\"){\r\n * \t attributes.fill = \"#aed581\";\r\n * }\r\n * this._super(attributes);\r\n * }\r\n * });\r\n *\r\n * let createConnection=function(){\r\n * let con = new RubberConnection();\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ConnectionRouter\r\n */\r\ndraw2d.layout.connection.RubberbandRouter = draw2d.layout.connection.ConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.RubberbandRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.RubberbandRouter\",\r\n\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n\r\n },\r\n\r\n /**\r\n * \r\n * Invalidates the given Connection\r\n */\r\n invalidate: function () {\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (connection, routingHints) {\r\n let thickness = 10\r\n\r\n let start = connection.getStartPoint()\r\n let end = connection.getEndPoint()\r\n\r\n // 1. Calculate the vector AB→ by subtracting the coordinates of A from the coordinates of B.\r\n // Let's say you get (u,v) as the vector components.\r\n //\r\n // 2. normalize the vector (u,v,) to a length of |1|\r\n //\r\n // 3. The vector (−v,u) is AB→ rotated by 90 degrees counterclockwise. (Why? Look up \"rotation matrix\").\r\n //\r\n // 4. Add (−v,u) to A to get C. Also add (−v,u) to B to get D.\r\n\r\n let uv = end.subtract(start)\r\n let uv2 = uv.clone()\r\n let length = uv.length()\r\n\r\n let strength = 1 - Math.min(0.75, (1 / 500 * length))\r\n let first = start.lerp(end, 0.25 * strength) // go closer to the start point if the strength grows\r\n let second = start.lerp(end, 0.5)\r\n let third = start.lerp(end, 1 - (0.25 * strength)) // go closer to the end point if the strengths grows\r\n\r\n thickness = Math.max(5, thickness * strength)\r\n\r\n uv.x = uv.x / length * thickness\r\n uv.y = uv.y / length * thickness\r\n\r\n uv2.x = uv2.x / length * (thickness * (strength))\r\n uv2.y = uv2.y / length * (thickness * (strength))\r\n\r\n // anchor points for the 180 arc at the start point of the connection\r\n //\r\n let start90 = new draw2d.geo.Point(-uv.y + start.x, uv.x + start.y)\r\n let start270 = new draw2d.geo.Point(uv.y + start.x, -uv.x + start.y)\r\n\r\n // anchor point in the first segment ( on the upside/downside) of the connection\r\n //\r\n let first90 = new draw2d.geo.Point(-uv2.y + first.x, uv2.x + first.y)\r\n let first270 = new draw2d.geo.Point(uv2.y + first.x, -uv2.x + first.y)\r\n\r\n // center upside/downside anchor point of the connection\r\n //\r\n let second90 = new draw2d.geo.Point(-uv2.y + second.x, uv2.x + second.y)\r\n let second270 = new draw2d.geo.Point(uv2.y + second.x, -uv2.x + second.y)\r\n\r\n // anchor point in the third segment of the connection\r\n //\r\n let third90 = new draw2d.geo.Point(-uv2.y + third.x, uv2.x + third.y)\r\n let third270 = new draw2d.geo.Point(uv2.y + third.x, -uv2.x + third.y)\r\n\r\n // anchor point for the 180 arc at the end\r\n //\r\n let end90 = new draw2d.geo.Point(-uv.y + end.x, uv.x + end.y)\r\n let end270 = new draw2d.geo.Point(uv.y + end.x, -uv.x + end.y)\r\n\r\n // required for hit tests\r\n //\r\n connection.addPoint(start)\r\n connection.addPoint(end)\r\n\r\n // calculate the path\r\n let path = [\"M\", start90.x, \",\", start90.y]\r\n path.push(\"A\", thickness, \",\", thickness, \"0 0 1 \", start270.x, \",\", start270.y)\r\n path.push(\"C\", start270.x, \",\", start270.y, first270.x, \",\", first270.y, second270.x, \",\", second270.y)\r\n path.push(\"C\", second270.x, \",\", second270.y, third270.x, \",\", third270.y, end270.x, \",\", end270.y)\r\n path.push(\"A\", thickness, \",\", thickness, \"0 0 1\", end90.x, \",\", end90.y)\r\n path.push(\"C\", end90.x, \",\", end90.y, third90.x, \",\", third90.y, second90.x, \",\", second90.y)\r\n path.push(\"C\", second90.x, \",\", second90.y, first90.x, \",\", first90.y, start90.x, \",\", start90.y)\r\n\r\n connection.svgPathString = path.join(\" \")\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Provide a router which routes the connection in a hand drawn manner.\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.SketchConnectionRouter());\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let f1 = new draw2d.shape.analog.OpAmp({x:10, y:10});\r\n * let f2 = new draw2d.shape.analog.ResistorVertical({angle:90, height:20, x:300, y:150});\r\n *\r\n * // ...add it to the canvas\r\n * //\r\n * canvas.add( f1);\r\n * canvas.add( f2);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(f1.getOutputPort(0));\r\n * c.setTarget(f2.getHybridPort(0));\r\n * canvas.add(c);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @since 2.7.2\r\n * @extends draw2d.layout.connection.MazeConnectionRouter\r\n */\r\ndraw2d.layout.connection.SketchConnectionRouter = draw2d.layout.connection.MazeConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.SketchConnectionRouter.prototype */\r\n {\r\n NAME: \"draw2d.layout.connection.SketchConnectionRouter\",\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n this.useSpline = true\r\n this.useShift = 5\r\n this.useSimplifyValue = 0.2\r\n this.finder = new PF.JumpPointFinder({allowDiagonal: false, dontCrossCorners: true})\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A ManhattanConnectionRouter with an spline interpolation between the bend points.\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.SplineConnectionRouter());\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let f1 = new draw2d.shape.analog.OpAmp({x:10, y:10});\r\n * let f2 = new draw2d.shape.analog.ResistorVertical({angle:90, height:20, x:300, y:150});\r\n *\r\n * // ...add it to the canvas\r\n * //\r\n * canvas.add( f1);\r\n * canvas.add( f2);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(f1.getOutputPort(0));\r\n * c.setTarget(f2.getHybridPort(0));\r\n * canvas.add(c);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.layout.connection.ManhattanConnectionRouter\r\n */\r\ndraw2d.layout.connection.SplineConnectionRouter = draw2d.layout.connection.ManhattanConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.SplineConnectionRouter.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.connection.SplineConnectionRouter\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n// this.spline = new draw2d.util.spline.CatmullRomSpline();\r\n this.spline = new draw2d.util.spline.CubicSpline()\r\n// this.spline = new draw2d.util.spline.BezierSpline();\r\n\r\n this.MINDIST = 50\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n let i\r\n let fromPt = conn.getStartPoint()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPoint()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // calculate the manhatten bend points between start/end.\r\n //\r\n this._route(conn, toPt, toDir, fromPt, fromDir)\r\n\r\n let ps = conn.getVertices()\r\n // if the start/end are too close, the router do not route anything at all - shortcut. But for the drawing routine\r\n // and the later processing, we need at least two points - \"start\" and \"end\". we fix this here\r\n if(ps.getSize()<2){\r\n conn.addPoint(fromPt)\r\n }\r\n\r\n conn.oldPoint = null\r\n conn.lineSegments = new draw2d.util.ArrayList()\r\n conn.vertices = new draw2d.util.ArrayList()\r\n\r\n let splinePoints = this.spline.generate(ps, 8)\r\n splinePoints.each( (i, e) => {\r\n conn.addPoint(e)\r\n })\r\n\r\n // calculate the path string for the SVG rendering\r\n //\r\n ps = conn.getVertices()\r\n let length = ps.getSize()\r\n let p = ps.get(0)\r\n let path = [\"M\", p.x.toFixed(2), \" \", p.y.toFixed(2)]\r\n for (i = 1; i < length; i++) {\r\n p = ps.get(i)\r\n path.push(\"L\", p.x.toFixed(2), \" \", p.y.toFixed(2))\r\n }\r\n conn.svgPathString = path.join(\"\")\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A Router with unlimited vertices.\r\n *\r\n *\r\n * @example\r\n *\r\n * // Override the default connection type. This is used during drag&drop operations of ports.\r\n * //\r\n * let createConnection=function(){\r\n * // return my special kind of connection\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.VertexRouter());\r\n * return con;\r\n * };\r\n *\r\n * // Install a special policy into the canvas to use my own implementation of connection\r\n * // if we drag&drop a port\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ConnectionRouter\r\n */\r\ndraw2d.layout.connection.VertexRouter = draw2d.layout.connection.ConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.VertexRouter.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.connection.VertexRouter\",\r\n\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.VertexSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n *\r\n * Invalidates the given Connection\r\n */\r\n invalidate: function () {\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (connection, routingHints) {\r\n // reuse all existing vertex points\r\n //\r\n let count = routingHints.oldVertices.getSize()\r\n for (let i = 0; i < count; i++) {\r\n connection.addPoint(routingHints.oldVertices.get(i))\r\n }\r\n\r\n let ps = connection.getVertices()\r\n\r\n // respect the calculated anchor position if the start/end port has set any Anchor impl.\r\n let startAnchor = connection.getStartPosition(ps.get(1))\r\n let endAnchor = connection.getEndPosition(ps.get(ps.getSize() - 2))\r\n ps.first().setPosition(startAnchor)\r\n ps.last().setPosition(endAnchor)\r\n\r\n this._paint(connection)\r\n },\r\n\r\n /**\r\n *\r\n * Callback method for the PolyLine or Connection to check if it possible to remove a vertex from\r\n * the list. The router can send an veto for this.\r\n * Per default it is not possible to remove any vertex from the PolyLine exceptional if any interactive\r\n * router is installed.\r\n *\r\n * @param {draw2d.Connection} conn\r\n * @param {Number} index\r\n *\r\n * @since 4.2.3\r\n */\r\n canRemoveVertexAt: function (conn, index) {\r\n return false\r\n },\r\n\r\n /**\r\n * Callback method for the PolyLine or Connection to verify that a segment is deletable.\r\n *\r\n * @param {draw2d.Connection} conn\r\n * @param {Number} index\r\n *\r\n * @returns {Boolean}\r\n * @since 4.2.3\r\n */\r\n canRemoveSegmentAt: function (conn, index) {\r\n\r\n let segmentCount = conn.getVertices().getSize() - 1 // segmentCount is one less than vertex count\r\n\r\n // The first and last segment isn't deletable\r\n //\r\n if ((index <= 0) || (index >= segmentCount)) {\r\n return false\r\n }\r\n\r\n // a connection need at least one strokes\r\n //\r\n return (segmentCount >= 2)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Tweak or enrich the polyline persistence data with routing information\r\n *\r\n * @since 2.10.0\r\n * @param {draw2d.shape.basic.PolyLine} line\r\n * @param {Object} memento The memento data of the polyline\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function (line, memento) {\r\n memento.vertex = []\r\n\r\n line.getVertices().each(function (i, e) {\r\n memento.vertex.push({x: e.x, y: e.y})\r\n })\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * set the attributes for the polyline with routing information\r\n *\r\n * @since 2.10.0\r\n * @param {Object} memento\r\n */\r\n setPersistentAttributes: function (line, memento) {\r\n // restore the points from the JSON data and add them to the polyline\r\n //\r\n if (Array.isArray(memento.vertex) && memento.vertex.length > 1) {\r\n\r\n line.oldPoint = null\r\n line.lineSegments = new draw2d.util.ArrayList()\r\n\r\n line.setVertices(memento.vertex)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * The draw2d.Connection delegates the drag operation to the router. The router can\r\n * handle the different constraints of the connection and just drag&drop a single segment\r\n * instead of the complete connection.\r\n *\r\n * @param {draw2d.shape.basic.Line} line the related line to handle\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n *\r\n * @since 6.1.0\r\n */\r\n onDrag: function (line, dx, dy, dx2, dy2) {\r\n let count = line.getVertices().getSize() - 1\r\n for (let i = 1; i < count; i++) {\r\n line.getVertex(i).translate(dx2, dy2)\r\n }\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A bottomLocator is used to place figures at the bottom of a parent shape.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // create a basic figure and add a Label/child via API call\r\n * //\r\n * let circle = new draw2d.shape.basic.Circle({\r\n * x:100,\r\n * y:50,\r\n * diameter:100,\r\n * stroke: 3,\r\n * color:\"#A63343\",\r\n * bgColor:\"#E65159\"\r\n * });\r\n *\r\n * circle.add(new draw2d.shape.basic.Label({text:\"Bottom Label\"}), new draw2d.layout.locator.BottomLocator());\r\n * canvas.add( circle);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.BottomLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.BottomLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.BottomLocator\",\r\n\r\n /**\r\n *\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let parent = target.getParent()\r\n let boundingBox = parent.getBoundingBox()\r\n // I made a wrong decision in the port handling: anchor point\r\n // is in the center and not topLeft. Now I must correct this flaw here, and there, and...\r\n // shit happens.\r\n let offset = (parent instanceof draw2d.Port) ? boundingBox.w / 2 : 0\r\n\r\n\r\n let targetBoundingBox = target.getBoundingBox()\r\n if (target instanceof draw2d.Port) {\r\n target.setPosition(boundingBox.w / 2 - offset, boundingBox.h)\r\n }\r\n else {\r\n target.setPosition(boundingBox.w / 2 - targetBoundingBox.w / 2 - offset, 2 + boundingBox.h)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A CenterLocator is used to place figures in the center of a parent shape.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n *\r\n * // create a basic figure and add a Label/child via API call\r\n * //\r\n * let circle = new draw2d.shape.basic.Circle({diameter:120});\r\n * circle.setStroke(3);\r\n * circle.setColor(\"#A63343\");\r\n * circle.setBackgroundColor(\"#E65159\");\r\n * circle.add(new draw2d.shape.basic.Label({text:\"Center Label\"}), new draw2d.layout.locator.CenterLocator());\r\n * canvas.add( circle, 100,50);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.CenterLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.CenterLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.CenterLocator\",\r\n\r\n /**\r\n * Constructs a locator with associated parent.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let parent = target.getParent()\r\n let boundingBox = parent.getBoundingBox()\r\n\r\n // TODO: instanceof is always a HACK. ugly. Redirect the call to the figure instead of \r\n // determine the position with a miracle.\r\n //\r\n if (target instanceof draw2d.Port) {\r\n target.setPosition(boundingBox.w / 2, boundingBox.h / 2)\r\n }\r\n else {\r\n let targetBoundingBox = target.getBoundingBox()\r\n target.setPosition(((boundingBox.w / 2 - targetBoundingBox.w / 2) | 0) + 0.5, ((boundingBox.h / 2 - (targetBoundingBox.h / 2)) | 0) + 0.5)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Repositions a Figure attached to a Connection when the\r\n * Connection is moved. Provides for alignment at the start\r\n * (source), middle, or end (target) of the Connection.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.ConnectionLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.ConnectionLocator.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.locator.ConnectionLocator\",\r\n\r\n /**\r\n * Default constructor for a Locator which can layout a figure in context of a\r\n * {@link draw2d.Connector}\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A DraggableLocator is used to place figures relative to the parent top left corner. It is\r\n * possible to move a child node via drag&drop.\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.DraggableLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.DraggableLocator.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.locator.DraggableLocator\",\r\n\r\n /**\r\n * Constructs a locator with associated parent.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n bind: function (parent, child) {\r\n // override the parent implementation to avoid\r\n // that the child is \"!selectable\" and \"!draggable\"\r\n\r\n // Don't redirect the selection handling to the parent\r\n // Using the DraggableLocator provides the ability to the children\r\n // that they are selectable and draggable. Remove the SelectionAdapter from the parent\r\n // assignment.\r\n child.setSelectionAdapter(() => child)\r\n },\r\n\r\n unbind: function (parent, child) {\r\n // use default\r\n child.setSelectionAdapter(null)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Repositions a Figure attached to a Connection when the\r\n * Connection is moved. Provides for alignment at the start\r\n * (source), middle, or end (target) of the Connection.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.PortLocator\r\n */\r\ndraw2d.layout.locator.InputPortLocator = draw2d.layout.locator.PortLocator.extend(\r\n /** @lends draw2d.layout.locator.InputPortLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.InputPortLocator\",\r\n\r\n /**\r\n * Default constructor for a Locator which can layout a port in context of a\r\n * {@link draw2d.shape.node.Node}\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Controls the location of an {@link draw2d.Figure}\r\n *\r\n * @param {Number} index port index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @template\r\n **/\r\n relocate: function (index, figure) {\r\n let node = figure.getParent()\r\n\r\n let dividerFactor = 1\r\n let thisNAME = this.NAME\r\n let portIndex = 1\r\n node.getPorts().each((i, p) => {\r\n portIndex = (p === figure) ? dividerFactor : portIndex\r\n dividerFactor += p.getLocator().NAME === thisNAME ? 1 : 0\r\n })\r\n this.applyConsiderRotation(figure, 0, (node.getHeight() / dividerFactor) * portIndex)\r\n }\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A LeftLocator is used to place figures to the left of a parent shape.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // create a basic figure and add a Label/child via API call\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * start.add(new draw2d.shape.basic.Label({text:\"Left Label\"}), new draw2d.layout.locator.LeftLocator({\r\n * margin:10 // distance to the parent shape\r\n * }));\r\n * canvas.add( start, 100,50);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.LeftLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.LeftLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.LeftLocator\",\r\n\r\n /**\r\n * Constructs a locator with associated parent.\r\n *\r\n * @param {Object} attr additional init attributes\r\n * @param {Object} setter key/value map of injected setter-methods\r\n * @param {Object} getter key/value map of injected getter-methods\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter,getter)\r\n\r\n this.margin = (attr && (\"margin\" in attr)) ? attr.margin : 5\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let parent = target.getParent()\r\n let boundingBox = parent.getBoundingBox()\r\n\r\n // I made a wrong decision in the port handling: anchor point\r\n // is in the center and not topLeft. Now I must correct this flaw here, and there, and...\r\n // shit happens.\r\n let offset = (parent instanceof draw2d.Port) ? boundingBox.h / 2 : 0\r\n\r\n\r\n if (target instanceof draw2d.Port) {\r\n target.setPosition(0, (boundingBox.h / 2) - offset)\r\n }\r\n else {\r\n let targetBoundingBox = target.getBoundingBox()\r\n target.setPosition(-targetBoundingBox.w - this.margin, (boundingBox.h / 2) - (targetBoundingBox.h / 2) - offset)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Controls the location of an IFigure.\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.layout.locator.Locator = Class.extend(\r\n /** @lends draw2d.layout.locator.Locator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.Locator\",\r\n\r\n /**\r\n * Initial Constructor\r\n *\r\n * @param {Object} attr additional init attributes\r\n * @param {Object} setter key/value map of injected setter-methods\r\n * @param {Object} getter key/value map of injected getter-methods\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.setterWhitelist = {...setter}\r\n this.getterWhitelist = {...getter}\r\n \r\n // propagate the attr to the new instance\r\n this.attr(attr)\r\n },\r\n\r\n /**\r\n *\r\n * Read or set locator attributes.<br>\r\n * When no value is given, reads specified attribute from the element.<br>\r\n * When value is given, sets the attribute to that value.\r\n * Multiple attributes can be set by passing an object with name-value pairs.\r\n *\r\n *\r\n * // multiple attributes:\r\n * locator.attr({\r\n * x: 30,\r\n * y: 40\r\n * });\r\n *\r\n * let data = locator.attr()\r\n *\r\n *\r\n * @param {String/Object} name\r\n * @param {Object} [value]\r\n * @since 5.0.1\r\n * @experimental\r\n * @returns {Object} either the requested attribute if this method used as getter or `this` if the method uses as setter\r\n **/\r\n attr: function (name, value) {\r\n let _this = this\r\n\r\n // call of attr as setter method with {name1:val1, name2:val2 } argument list\r\n //\r\n if ($.isPlainObject(name)) {\r\n for (let key in name) {\r\n let func = this.setterWhitelist[key]\r\n let param = name[key]\r\n if (func && param !== undefined) {\r\n func.call(this, param)\r\n }\r\n }\r\n } else if (typeof name === \"string\") {\r\n // call attr as getter\r\n //\r\n if (typeof value === \"undefined\") {\r\n let getter = this.getterWhitelist[name]\r\n if (typeof getter === \"function\") {\r\n return getter.call(this)\r\n }\r\n return // undefined\r\n }\r\n\r\n // the value can be a function. In this case we must call the value().\r\n if (typeof value === \"function\") {\r\n value = value()\r\n }\r\n let setter = this.setterWhitelist[name]\r\n if (setter) {\r\n setter.call(this, value)\r\n }\r\n }\r\n // may it is a array of attributes used for the getter\r\n //\r\n else if (Array.isArray(name)) {\r\n return Object.assign({}, ...Object.keys(name).map(k => ({[k]: _this.attr(k)})))\r\n }\r\n // generic getter of all registered attributes\r\n else if (typeof name === \"undefined\") {\r\n let result = {}\r\n for (let key in this.getterWhitelist) {\r\n result[key] = this.getterWhitelist[key].call(this)\r\n }\r\n return result\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if a child is bounded to a parent. This is\r\n * the perfect moment to prepare the child node with some basic\r\n * behaviour which are forced by the <code>Locator</code>\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {draw2d.Figure} child\r\n * @returns {this}\r\n */\r\n bind: function (figure, child) {\r\n // default behaviour of an Locator. The child isn't draggable and\r\n // the locator defines the position of the child.\r\n //\r\n child.setDraggable(false)\r\n child.setSelectable(false)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if a child is unbounded to the locator.\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {draw2d.Figure} child\r\n * @returns {this}\r\n */\r\n unbind: function (figure, child) {\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Controls the location of an I{@link draw2d.Figure}\r\n *\r\n * @param {Number} index child index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @private\r\n **/\r\n relocate: function (index, figure) {\r\n // just repaint the child to update the SVG related to the new location\r\n // of the parent.\r\n figure.repaint()\r\n },\r\n\r\n /**\r\n *\r\n * Return a clone of the locator object\r\n *\r\n * @returns {draw2d.layout.locator.Locator}\r\n */\r\n clone: function () {\r\n return Function(`return new ${this.NAME}()`)()\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A ManhattanMidpointLocator that is used to place figures at the midpoint of a Manhatten routed\r\n * connection. The midpoint is always in the center of an edge.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // create and add two Node which contains Ports (In and OUT)\r\n * let start = new draw2d.shape.node.Start({x:50,y:50});\r\n * let end = new draw2d.shape.node.End({x:230,y:100});\r\n *\r\n * canvas.add( start);\r\n * canvas.add( end);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * let c = new draw2d.Connection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * // create a label which should attach to the connection\r\n * //\r\n * let label = new draw2d.shape.basic.Label({text:\"I'm a Label\"});\r\n * label.setColor(\"#0d0d0d\");\r\n * label.setFontColor(\"#0d0d0d\");\r\n * label.setBackgroundColor(\"#f0f0f0\");\r\n *\r\n * // add the decoration to the connection with a ManhattanMidpointLocator.\r\n * //\r\n * c.add(label, new draw2d.layout.locator.ManhattanMidpointLocator());\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.layout.locator.ConnectionLocator\r\n */\r\ndraw2d.layout.locator.ManhattanMidpointLocator = draw2d.layout.locator.ConnectionLocator.extend(\r\n /** @lends draw2d.layout.locator.ManhattanMidpointLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.ManhattanMidpointLocator\",\r\n\r\n /**\r\n * Constructs a ManhattanMidpointLocator with associated Connection c.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Relocates the given Figure always in the center of an edge.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let conn = target.getParent()\r\n let points = conn.getVertices()\r\n\r\n let segmentIndex = Math.floor((points.getSize() - 2) / 2)\r\n if (points.getSize() <= segmentIndex + 1)\r\n return\r\n\r\n let p1 = points.get(segmentIndex)\r\n let p2 = points.get(segmentIndex + 1)\r\n\r\n target.setPosition(\r\n ((p2.x - p1.x) / 2 + p1.x - target.getWidth() / 2) | 0,\r\n ((p2.y - p1.y) / 2 + p1.y - target.getHeight() / 2) | 0)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Repositions a Figure attached to a Connection when the\r\n * Connection is moved. Provides for alignment at the start\r\n * (source), middle, or end (target) of the Connection.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.PortLocator\r\n */\r\ndraw2d.layout.locator.OutputPortLocator = draw2d.layout.locator.PortLocator.extend(\r\n /** @lends draw2d.layout.locator.OutputPortLocator.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.locator.OutputPortLocator\",\r\n\r\n /**\r\n * Default constructor for a Locator which can layout a port in context of a\r\n * {@link draw2d.shape.node.Node}\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Controls the location of an I{@link draw2d.Figure}\r\n *\r\n * @param {Number} index child index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @template\r\n **/\r\n relocate: function (index, figure) {\r\n let node = figure.getParent()\r\n let dividerFactor = 1\r\n let thisNAME = this.NAME\r\n let portIndex = 1\r\n node.getPorts().each((i, p) => {\r\n portIndex = (p === figure) ? dividerFactor : portIndex\r\n dividerFactor += p.getLocator().NAME === thisNAME ? 1 : 0\r\n })\r\n this.applyConsiderRotation(figure, node.getWidth(), (node.getHeight() / dividerFactor) * portIndex)\r\n }\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A ParallelMidpointLocator that is used to place label at the midpoint of a routed\r\n * connection. The midpoint is always in the center of an edge.\r\n * The label is aligned to the connection angle at the calculated conection segment.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.ConnectionLocator\r\n * @since 4.4.4\r\n */\r\ndraw2d.layout.locator.ParallelMidpointLocator = draw2d.layout.locator.ConnectionLocator.extend(\r\n /** @lends draw2d.layout.locator.ParallelMidpointLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.ParallelMidpointLocator\",\r\n\r\n /**\r\n * Constructs a ParallelMidpointLocator with optional padding to the connection.\r\n *\r\n * if the parameter <b>distance</b> is less than zero the label is\r\n * placed above of the connection. Else the label is below the connection.\r\n *\r\n * @param {Object} attr object with {distance: <NUMBER>>} distance of the label to the connection.\r\n */\r\n init: function (attr, setter, getter) {\r\n this.distance = 0\r\n\r\n this._super(\r\n {distance: -5, ...attr},\r\n {x: this.setDistance,...setter},\r\n {distance: this.getDistance,...getter}\r\n )\r\n },\r\n\r\n /**\r\n * Set the distance to the connection\r\n *\r\n * @param {Number} distance the distance to the connection\r\n * @returns {this}\r\n */\r\n setDistance: function (distance) {\r\n this.distance = distance\r\n return this\r\n },\r\n\r\n /**\r\n * Returns the distance to the connection\r\n *\r\n * @returns {Number}\r\n */\r\n getDistance: function () {\r\n return this.distance\r\n },\r\n\r\n /**\r\n *\r\n * Relocates the given Figure always in the center of an edge.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let conn = target.getParent()\r\n let points = conn.getVertices()\r\n\r\n let segmentIndex = Math.floor((points.getSize() - 2) / 2)\r\n if (points.getSize() <= segmentIndex + 1) {\r\n return\r\n }\r\n\r\n let p1 = points.get(segmentIndex)\r\n let p2 = points.get(segmentIndex + 1)\r\n\r\n // calculate the distance of the label (above or below the connection)\r\n let distance = this.distance <= 0 ? this.distance - target.getHeight() : this.distance\r\n\r\n // get the angle of the segment\r\n let nx = p1.x - p2.x\r\n let ny = p1.y - p2.y\r\n let length = Math.sqrt(nx * nx + ny * ny)\r\n let radian = -Math.asin(ny / length)\r\n let angle = (180 / Math.PI) * radian\r\n if (radian < 0) {\r\n if (p2.x < p1.x) {\r\n radian = Math.abs(radian) + Math.PI\r\n angle = 360 - angle\r\n distance = -distance - target.getHeight()\r\n } else {\r\n radian = Math.PI * 2 - Math.abs(radian)\r\n angle = 360 + angle\r\n }\r\n } else {\r\n if (p2.x < p1.x) {\r\n radian = Math.PI - radian\r\n angle = 360 - angle\r\n distance = -distance - target.getHeight()\r\n }\r\n }\r\n\r\n let rotAnchor = this.rotate(length / 2 - target.getWidth() / 2, distance, 0, 0, radian)\r\n\r\n // rotate the x/y coordinate with the calculated angle around \"p1\"\r\n //\r\n let rotCenterOfLabel = this.rotate(0, 0, target.getWidth() / 2, target.getHeight() / 2, radian)\r\n\r\n target.setRotationAngle(angle)\r\n target.setPosition(rotAnchor.x - rotCenterOfLabel.x + p1.x, rotAnchor.y - rotCenterOfLabel.y + p1.y)\r\n },\r\n\r\n rotate: function (x, y, xm, ym, radian) {\r\n let cos = Math.cos,\r\n sin = Math.sin\r\n\r\n // Subtract midpoints, so that midpoint is translated to origin\r\n // and add it in the end again\r\n return {\r\n x: (x - xm) * cos(radian) - (y - ym) * sin(radian) + xm,\r\n y: (x - xm) * sin(radian) + (y - ym) * cos(radian) + ym\r\n }\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A PolylineMidpointLocator is used to place figures at the midpoint of a routed\r\n * connection. <br>\r\n * If the connection did have an odd count of points the figure is located in the center vertex of the polyline.<br>\r\n * On an even count of junction point, the figure will be center on the middle segment of the ploy line.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.ManhattanMidpointLocator\r\n */\r\ndraw2d.layout.locator.PolylineMidpointLocator = draw2d.layout.locator.ManhattanMidpointLocator.extend(\r\n /** @lends draw2d.layout.locator.PolylineMidpointLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.PolylineMidpointLocator\",\r\n\r\n /**\r\n * Constructs a ManhattanMidpointLocator with associated Connection c.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n var conn = target.getParent()\r\n var points = conn.getVertices()\r\n\r\n // it has an event count of points -> use the manhattan algorithm...this is working\r\n // well in this case\r\n if (points.getSize() % 2 === 0) {\r\n this._super(index, target)\r\n }\r\n // odd count of points. take the center point as fulcrum\r\n else {\r\n var index = Math.floor(points.getSize() / 2)\r\n var p1 = points.get(index)\r\n target.setPosition(p1.x - (target.getWidth() / 2), p1.y - (target.getHeight() / 2))\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The port locator calculates the position of an port. All ports MUST have a locator\r\n * if you add them as child to a node.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.PortLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.PortLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.PortLocator\",\r\n\r\n /**\r\n * Default constructor for a Locator which can layout a port in context of a\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n applyConsiderRotation: function (port, x, y) {\r\n let parent = port.getParent()\r\n\r\n // determine the width/height before manipulate the \r\n // matrix of the shape\r\n let halfW = parent.getWidth() / 2\r\n let halfH = parent.getHeight() / 2\r\n\r\n let rotAngle = parent.getRotationAngle()\r\n let m = Raphael.matrix()\r\n m.rotate(rotAngle, halfW, halfH)\r\n if (rotAngle === 90 || rotAngle === 270) {\r\n let ratio = parent.getHeight() / parent.getWidth()\r\n m.scale(ratio, 1 / ratio, halfW, halfH)\r\n }\r\n\r\n port.setPosition(m.x(x, y), m.y(x, y))\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A RightLocator is used to place figures to the right of a parent shape.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n *\r\n * // create a basic figure and add a Label/child via API call\r\n * //\r\n * var end = new draw2d.shape.node.End();\r\n * end.add(new draw2d.shape.basic.Label({text:\"Right Label\"}), new draw2d.layout.locator.RightLocator({\r\n * margin: 10 // distance to the parent shape\r\n * }));\r\n * canvas.add( end, 50,50);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.RightLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.RightLocator.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.locator.RightLocator\",\r\n\r\n /**\r\n * Constructs a locator with associated parent.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.margin = (attr && (\"margin\" in attr)) ? attr.margin : 5\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n var parent = target.getParent()\r\n var boundingBox = parent.getBoundingBox()\r\n\r\n // I made a wrong decision in the port handling: anchor point\r\n // is in the center and not topLeft. Now I must correct this flaw here, and there, and...\r\n // shit happens.\r\n var offset = (parent instanceof draw2d.Port) ? boundingBox.h / 2 : 0\r\n\r\n if (target instanceof draw2d.Port) {\r\n target.setPosition(boundingBox.w, (boundingBox.h / 2) - offset)\r\n }\r\n else {\r\n var targetBoundingBox = target.getBoundingBox()\r\n target.setPosition(boundingBox.w + this.margin, (boundingBox.h / 2) - (targetBoundingBox.h / 2) - offset)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A DraggableLocator is used to place figures relative to the parent nearest corner. It is\r\n * possible to move a child node via drag&drop.\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.SmartDraggableLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.SmartDraggableLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.SmartDraggableLocator\",\r\n\r\n /**\r\n * Constructs a locator with associated parent.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n // description see \"bind\" method\r\n this.boundedCorners = {\r\n init: false,\r\n parent: 0,\r\n child: 0,\r\n dist: Number.MAX_SAFE_INTEGER,\r\n xOffset: 0,\r\n yOffset: 0\r\n }\r\n\r\n },\r\n\r\n bind: function (parent, child) {\r\n let _this = this\r\n // determine the best corner of the parent/child node and stick to the calculated corner\r\n // In the example below it is R1.2 in combination with R2.0\r\n //\r\n // 0 1\r\n // +-----------+\r\n // | |\r\n // | R1 |\r\n // +-----------+\r\n // 3 2\r\n //\r\n // 0 1\r\n // +-----------+\r\n // | |\r\n // | R2 |\r\n // +-----------+\r\n // 3 2\r\n //\r\n let calcBoundingCorner = function () {\r\n _this.boundedCorners = {\r\n init: false,\r\n parent: 0,\r\n child: 0,\r\n dist: Number.MAX_SAFE_INTEGER,\r\n xOffset: 0,\r\n yOffset: 0\r\n }\r\n let parentVertices = child.getParent().getBoundingBox().getVertices()\r\n let childVertices = child.getBoundingBox().getVertices()\r\n let i_parent, i_child\r\n let p1, p2, distance\r\n for (i_parent = 0; i_parent < parentVertices.getSize(); i_parent++) {\r\n for (i_child = 0; i_child < childVertices.getSize(); i_child++) {\r\n p1 = parentVertices.get(i_parent)\r\n p2 = childVertices.get(i_child)\r\n distance = Math.abs(p1.distance(p2))\r\n if (distance < _this.boundedCorners.dist) {\r\n _this.boundedCorners = {\r\n parent: i_parent,\r\n child: i_child,\r\n dist: distance,\r\n xOffset: p1.x - p2.x,\r\n yOffset: p1.y - p2.y\r\n }\r\n }\r\n }\r\n }\r\n _this.boundedCorners.init = true\r\n }\r\n\r\n // override the parent implementation to avoid\r\n // that the child is \"!selectable\" and \"!draggable\"\r\n\r\n // Don't redirect the selection handling to the parent\r\n // Using the DraggableLocator provides the ability to the children\r\n // that they are selectable and draggable. Remove the SelectionAdapter from the parent\r\n // assignment.\r\n child.setSelectionAdapter( () => child)\r\n\r\n child.getParent().on(\"added\", calcBoundingCorner)\r\n child.on(\"dragend\", calcBoundingCorner)\r\n },\r\n\r\n unbind: function (parent, child) {\r\n // use default\r\n child.setSelectionAdapter(null)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Controls the location of an I{@link draw2d.Figure}\r\n *\r\n * @param {Number} index child index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @template\r\n **/\r\n relocate: function (index, figure) {\r\n this._super(index, figure)\r\n if (this.boundedCorners.init === true) {\r\n let parentVertices = figure.getParent().getBoundingBox().getVertices()\r\n let childVertices = figure.getBoundingBox().getVertices()\r\n let p1 = parentVertices.get(this.boundedCorners.parent)\r\n let p2 = childVertices.get(this.boundedCorners.child)\r\n\r\n let xOffset = p1.x - p2.x\r\n let yOffset = p1.y - p2.y\r\n // restore the initial distance from the corner by adding the new offset\r\n // to the position of the child\r\n figure.translate(xOffset - this.boundedCorners.xOffset, yOffset - this.boundedCorners.yOffset)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A TopLocator is used to place figures at the top/center of a parent shape.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // create a basic figure and add a Label/child via API call\r\n * //\r\n * let circle = new draw2d.shape.basic.Circle({\r\n * x:100,\r\n * y:70,\r\n * diameter:80,\r\n * stroke: 3,\r\n * color:\"#A63343\",\r\n * bgColor:\"#E65159\"\r\n * });\r\n *\r\n * circle.add(new draw2d.shape.basic.Label({text:\"Top Label\"}), new draw2d.layout.locator.TopLocator());\r\n * canvas.add( circle);\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.TopLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.TopLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.TopLocator\",\r\n\r\n /**\r\n * Constructs a ManhattanMidpointLocator with associated Connection c.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let parent = target.getParent()\r\n let boundingBox = parent.getBoundingBox()\r\n\r\n // I made a wrong decision in the port handling: anchor point\r\n // is in the center and not topLeft. Now I must correct this flaw here, and there, and...\r\n // shit happens.\r\n let offset = (parent instanceof draw2d.Port) ? boundingBox.w / 2 : 0\r\n\r\n\r\n let targetBoundingBox = target.getBoundingBox()\r\n if (target instanceof draw2d.Port) {\r\n target.setPosition(boundingBox.w / 2 - offset, 0)\r\n }\r\n else {\r\n target.setPosition(boundingBox.w / 2 - (targetBoundingBox.w / 2) - offset, -(targetBoundingBox.h + 2))\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Create a locator for fixed x/y coordinate position. The port in the example below is\r\n * always 20px below of the top border.\r\n *\r\n *\r\n * @example\r\n *\r\n * var figure = new draw2d.shape.basic.Rectangle({x:130,y:30,width:100,height:60});\r\n * figure.createPort(\"input\", new draw2d.layout.locator.XYAbsPortLocator(0,20));\r\n *\r\n * canvas.add(figure);\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.PortLocator\r\n * @since 4.0.0\r\n */\r\ndraw2d.layout.locator.XYAbsPortLocator = draw2d.layout.locator.PortLocator.extend(\r\n /** @lends draw2d.layout.locator.XYAbsPortLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.XYAbsPortLocator\",\r\n\r\n /**\r\n *\r\n * {@link draw2d.shape.node.Node}\r\n *\r\n * @param {Number} x the x coordinate of the port relative to the left of the parent\r\n * @param {Number} y the y coordinate of the port relative to the top of the parent\r\n */\r\n init: function (attr, setter, getter) {\r\n this.x = 0\r\n this.y = 0\r\n\r\n this._super(attr,\r\n {\r\n x: this.setX,\r\n y: this.setY,\r\n ...setter},\r\n {\r\n x: this.getX,\r\n y: this.getY,\r\n ...getter})\r\n },\r\n\r\n /**\r\n * Set the X Offset for the Locator\r\n * @param {Number} x\r\n */\r\n setX: function (x) {\r\n this.x = x\r\n },\r\n\r\n /**\r\n * Set the y-offset of the locator\r\n *\r\n * @param {Number} y\r\n */\r\n setY: function (y) {\r\n this.y = y\r\n },\r\n\r\n /**\r\n * Get the X-Offset of the Locator\r\n *\r\n * @returns {Number}\r\n */\r\n getX: function(){\r\n return this.x\r\n },\r\n\r\n /**\r\n * Returns the Y-Offset of the Locator\r\n *\r\n * @returns {Number}\r\n */\r\n getY: function(){\r\n return this.y\r\n },\r\n\r\n /**\r\n *\r\n * Controls the location of an {@link draw2d.Figure}\r\n *\r\n * @param {Number} index child index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @template\r\n **/\r\n relocate: function (index, figure) {\r\n this.applyConsiderRotation(figure, this.x, this.y)\r\n }\r\n\r\n })\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Create a locator for a relative x/y coordinate position. The coordinates are named in percentage [0..100%]\r\n * relative to the top/left corner of the parent node.<br>\r\n * <br>\r\n * <br>\r\n * Resize the shape in the example to see what happens. The port top position is always 20% of the shape height.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.basic.Rectangle({x:130,y:30,width:100,height:60});\r\n * figure.createPort(\"input\", new draw2d.layout.locator.XYRelPortLocator(0,20));\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.PortLocator\r\n * @since 4.0.0\r\n */\r\ndraw2d.layout.locator.XYRelPortLocator = draw2d.layout.locator.PortLocator.extend(\r\n /** @lends draw2d.layout.locator.XYRelPortLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.XYRelPortLocator\",\r\n\r\n /**\r\n *\r\n *\r\n * @param {Number} xPercentage the x coordinate in percent of the port relative to the left of the parent\r\n * @param {Number} yPercentage the y coordinate in percent of the port relative to the top of the parent\r\n */\r\n init: function (attr, setter, getter) {\r\n // legacy code handling for calls like this:\r\n // new draw2d.layout.locator.XYRelPortLocator(10,30)\r\n if(typeof attr ===\"number\" && typeof setter === \"number\"){\r\n this.x = attr\r\n this.y = setter\r\n this._super()\r\n }\r\n // new constructor\r\n // new draw2d.layout.locator.XYRelPortLocator({x:10, y:30}})\r\n else {\r\n this.x = 0\r\n this.y = 0\r\n this._super(attr,\r\n {\r\n x: this.setX,\r\n y: this.setY,\r\n ...setter},\r\n {\r\n x: this.getX,\r\n y: this.getY,\r\n ...getter})\r\n }\r\n },\r\n\r\n\r\n /**\r\n * Set the X Offset for the Locator\r\n * @param {Number} x\r\n */\r\n setX: function (x) {\r\n this.x = x\r\n },\r\n\r\n /**\r\n * Set the y-offset of the locator\r\n *\r\n * @param {Number} y\r\n */\r\n setY: function (y) {\r\n this.y = y\r\n },\r\n\r\n /**\r\n * Get the X-Offset of the Locator\r\n *\r\n * @returns {Number}\r\n */\r\n getX: function () {\r\n return this.x\r\n },\r\n\r\n /**\r\n * Returns the Y-Offset of the Locator\r\n *\r\n * @returns {Number}\r\n */\r\n getY: function () {\r\n return this.y\r\n },\r\n\r\n /**\r\n *\r\n * Controls the location of an I{@link draw2d.Figure}\r\n *\r\n * @param {Number} index child index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @template\r\n **/\r\n relocate: function (index, figure) {\r\n let parent = figure.getParent()\r\n\r\n this.applyConsiderRotation(\r\n figure,\r\n parent.getWidth() / 100 * this.x,\r\n parent.getHeight() / 100 * this.y\r\n )\r\n }\r\n\r\n })\r\n\r\n\r\n\r\n","\r\n/**\r\n * @class\r\n * Routes a {@link draw2d.Connection}, possibly using a constraint.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.mesh.MeshLayouter\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.layout.mesh.ExplodeLayouter = draw2d.layout.mesh.MeshLayouter.extend(\r\n /** @lends draw2d.layout.mesh.ExplodeLayouter.prototype */\r\n {\r\n\r\n\tMIN_MARGIN : 40,\r\n\t\r\n\t/**\r\n\t * Creates a new layouter object.\r\n\t */\r\n init: function()\r\n\t{\r\n },\r\n \r\n /**\r\n *\r\n * Return a changes list for an existing mesh/canvas to ensure that the element to insert \r\n * did have enough space.\r\n * \r\n * @param {draw2d.Canvas} canvas the canvas to use for the analytic\r\n * @param {draw2d.Figure} figure The figure to add to the exising canvas\r\n * @param {Number} x requested x-position for the figure\r\n * @param {Number} y requested y-position for the figure\r\n * \r\n * \r\n * @returns {draw2d.util.ArrayList} a list of changes to apply if the user want to insert he figure.\r\n */\r\n add: function( canvas, figureToAdd)\r\n {\r\n \t// changes for the different octant areas\r\n \tvar changes = [];\r\n \tchanges[0]= {x:0, y:0};\r\n \tchanges[1]= {x:0, y:0};\r\n \tchanges[2]= {x:0, y:0};\r\n \tchanges[3]= {x:0, y:0};\r\n \tchanges[4]= {x:0, y:0};\r\n \tchanges[5]= {x:0, y:0};\r\n \tchanges[6]= {x:0, y:0};\r\n \tchanges[7]= {x:0, y:0};\r\n \tchanges[8]= {x:0, y:0};\r\n\r\n \tvar boundingBox = figureToAdd.getBoundingBox();\r\n\r\n \tvar figures = canvas.getFigures();\r\n \tvar figure = null;\r\n \t\r\n \tvar dis=0;\r\n \tvar oct =0;\r\n \tvar currentOctChanges =null;\r\n \tvar i=0;\r\n \tfor( i=0; i< figures.getSize();i++){\r\n \t\t\r\n \t\tfigure = figures.get(i);\r\n \t\t\r\n \t\t// calculate the distance of all corners in relation to the requested x/y coordinate\r\n \t\t//\r\n \t\tif(figure !== figureToAdd ){\r\n \t\t\tdis = figure.getBoundingBox().getDistance(boundingBox);\r\n \t\t\t// other figure is to close\r\n \t\t\t//\r\n \t\t\tif(dis<this.MIN_MARGIN){\r\n \t\t\t\t// determine the octant of the figure\r\n \t\t\t\toct = this.determineOctant(boundingBox, figure.getBoundingBox());\r\n \t\t\t\r\n \t\t\t\t// all other relevant segments must be arranged too!!\r\n \t\t\t\t//\r\n \t\t\tswitch(oct){\r\n \t\t\tcase 2:\r\n \t\t\t\tchanges[2].x = Math.max(changes[2].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[3].x = Math.max(changes[3].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[4].x = Math.max(changes[4].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tbreak;\r\n \t\t\tcase 3:\r\n \t\t\t\tchanges[2].x = Math.max(changes[2].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[3].x = Math.max(changes[3].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[4].x = Math.max(changes[4].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tbreak;\r\n \t\t\tcase 4:\r\n \t\t\t\tchanges[2].x = Math.max(changes[2].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[3].x = Math.max(changes[3].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[4].x = Math.max(changes[4].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[4].y = Math.max(changes[4].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[5].y = Math.max(changes[5].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[6].y = Math.max(changes[6].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tbreak;\r\n \t\t\tcase 5:\r\n \t\t\t\tchanges[4].y = Math.max(changes[4].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[5].y = Math.max(changes[5].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[6].y = Math.max(changes[6].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tbreak;\r\n \t\t\tcase 6:\r\n \t\t\t\tchanges[4].y = Math.max(changes[4].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[5].y = Math.max(changes[5].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[6].y = Math.max(changes[6].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tbreak;\r\n \t\t\tcase 8:\r\n \t\t\t\t// overlapping\r\n \t\t\t\t// we must determine the new distance with the border of the figures\r\n \t\t\t\tdis = (boundingBox.getBottomRight().getDistance(figure.getBoundingBox().getTopLeft()))|0;\r\n \t\t\t\t\r\n \t\t\t\tchanges[2].x = Math.max(changes[2].x,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[3].x = Math.max(changes[3].x,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[4].x = Math.max(changes[4].x,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[4].y = Math.max(changes[4].y,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[5].y = Math.max(changes[5].y,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[6].y = Math.max(changes[6].y,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[8].x = Math.max(changes[8].x,this.MIN_MARGIN+dis);\r\n// \t\t\t\tchanges[8].y = Math.max(changes[8].y,this.MIN_MARGIN+dis);\r\n \t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t// Falls die minimale Distance zu den Objecten kleiner 80 ist, muss ein layout erfolgen\r\n \t}\r\n\r\n \t// calculate the adjustment for each figure\r\n \t//\r\n \tvar result = new draw2d.util.ArrayList();\r\n \tfor( i=0; i< figures.getSize();i++){\r\n \t\tfigure = figures.get(i);\r\n \t\tif(figure !== figureToAdd ){\r\n\t\t\t\toct = this.determineOctant(boundingBox, figure.getBoundingBox());\r\n\t\t\t\tcurrentOctChanges = changes[oct];\r\n\t\t\t\tif(currentOctChanges.x!==0 || currentOctChanges.y!==0){\r\n\t\t\t\t\tresult.add(new draw2d.layout.mesh.ProposedMeshChange(figure, currentOctChanges.x,currentOctChanges.y));\r\n\t\t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \treturn result;\r\n },\r\n \r\n \r\n /**\r\n *\r\n * Determin Octant\r\n\t *\r\n\t * 0 | 1 | 2\r\n\t * __|___|__\r\n\t * 7 | 8 | 3\r\n * __|___|__\r\n\t * 6 | 5 | 4\r\n *\r\n\t * @returns {Number}\r\n */\r\n determineOctant: function(r1, r2){\r\n\t\tvar ox = r1.x;\r\n\t\tvar oy = r1.y;\r\n\t\tvar ow = r1.w;\r\n\t\tvar oh = r1.h;\r\n\t\t\r\n\t\tvar cx = r2.x;\r\n\t\tvar cy = r2.y;\r\n\t\tvar cw = r2.w;\r\n\t\tvar ch = r2.h;\r\n\t\tvar oct =0;\r\n\r\n\t\tif(cx + cw <= ox){\r\n\t\t\tif((cy + ch) <= oy){\r\n\t\t\t\toct = 0;\r\n\t\t\t}\r\n\t\t\telse if(cy >= (oy + oh)){\r\n\t\t\t\toct = 6;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\toct = 7;\r\n\t\t\t}\r\n\t }\r\n\t\telse if(cx >= ox + ow){\r\n\t\t\tif(cy + ch <= oy){\r\n\t\t\t\toct = 2;\r\n\t\t\t}\r\n\t\t\telse if(cy >= oy + oh){\r\n\t\t\t\toct = 4;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\toct = 3;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(cy + ch <= oy){\r\n\t\t\toct = 1;\r\n\t\t}\r\n\t\telse if(cy >= oy + oh){\r\n\t\t\toct = 5;\r\n\t\t}\r\n\t\telse{\r\n\t\t\toct= 8;\r\n\t\t}\r\n\t\t\r\n\t\treturn oct;\r\n }\r\n});\r\n","\r\n/**\r\n * @class\r\n * Layouter for a mesh or grid.\r\n *\r\n * @author Andreas Herz\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.layout.mesh.MeshLayouter = Class.extend(\r\n /** @lends draw2d.layout.mesh.MeshLayouter.prototype */\r\n\r\n {\r\n\r\n\t/**\r\n\t * Creates a new layouter object.\r\n\t */\r\n init: function(){\r\n },\r\n\r\n /**\r\n * \r\n * Return a changes list for an existing mesh/canvas to ensure that the element to insert\r\n * did have enough space.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to use for the analytic\r\n * @param {draw2d.Figure} figure The figure to add to the exising canvas\r\n *\r\n *\r\n * @returns {draw2d.util.ArrayList} a list of changes to apply if the user want to insert he figure.\r\n */\r\n add: function( canvas, figure)\r\n {\r\n \treturn new draw2d.util.ArrayList();\r\n }\r\n});\r\n","\r\n/**\r\n * @class\r\n * Change proposal for grid/mesh layout changes.\r\n *\r\n * @author Andreas Herz\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.layout.mesh.ProposedMeshChange = Class.extend(\r\n /** @lends draw2d.layout.mesh.ProposedMeshChange.prototype */\r\n\r\n {\r\n\r\n\t/**\r\n\t * Creates change object.\r\n\t */\r\n init: function(figure, x, y)\r\n {\r\n \tthis.figure = figure;\r\n \tthis.x = x;\r\n \tthis.y = y;\r\n },\r\n\r\n /**\r\n *\r\n * Return the related figure.\r\n *\r\n * @returns {draw2d.Figure} the figure to the related change proposal\r\n */\r\n getFigure: function( )\r\n {\r\n \treturn this.figure;\r\n },\r\n\r\n /**\r\n *\r\n * The proposed x-coordinate.\r\n *\r\n * @returns {Number}\r\n */\r\n getX: function()\r\n {\r\n \treturn this.x;\r\n },\r\n\r\n /**\r\n *\r\n * The proposed y-coordinate\r\n *\r\n * @returns {Number}\r\n */\r\n getY: function()\r\n {\r\n \treturn this.y;\r\n }\r\n\r\n});\r\n","\r\n\r\n/*\r\n * jQuery.fn.autoResize 1.14\r\n * --\r\n * https://github.com/padolsey/jQuery.fn.autoResize\r\n * --\r\n * This program is free software. It comes without any warranty, to\r\n * the extent permitted by applicable law. You can redistribute it\r\n * and/or modify it under the terms of the Do What The Fuck You Want\r\n * To Public License, Version 2, as published by Sam Hocevar. See\r\n * http://sam.zoy.org/wtfpl/COPYING for more details. */\r\n(function($){\r\n\r\n\tvar uid = 'ar' + +new Date,\r\n\r\n\t\tdefaults = autoResize.defaults = {\r\n\t\t\tonResize: function(){},\r\n\t\t\tonBeforeResize: function(){return 123},\r\n\t\t\tonAfterResize: function(){return 555},\r\n\t\t\tanimate: {\r\n\t\t\t\tduration: 200,\r\n\t\t\t\tcomplete: function(){}\r\n\t\t\t},\r\n\t\t\textraSpace: 50,\r\n\t\t\tminHeight: 'original',\r\n\t\t\tmaxHeight: 500,\r\n\t\t\tminWidth: 'original',\r\n\t\t\tmaxWidth: 500\r\n\t\t};\r\n\r\n\tautoResize.cloneCSSProperties = [\r\n\t\t'lineHeight', 'textDecoration', 'letterSpacing',\r\n\t\t'fontSize', 'fontFamily', 'fontStyle', 'fontWeight',\r\n\t\t'textTransform', 'textAlign', 'direction', 'wordSpacing', 'fontSizeAdjust',\r\n\t\t'paddingTop', 'paddingLeft', 'paddingBottom', 'paddingRight', 'width'\r\n\t];\r\n\r\n\tautoResize.cloneCSSValues = {\r\n\t\tposition: 'absolute',\r\n\t\ttop: -9999,\r\n\t\tleft: -9999,\r\n\t\topacity: 0,\r\n\t\toverflow: 'hidden'\r\n\t};\r\n\r\n\tautoResize.resizableFilterSelector = [\r\n\t\t'textarea:not(textarea.' + uid + ')',\r\n\t\t'input:not(input[type])',\r\n\t\t'input[type=text]',\r\n\t\t'input[type=password]',\r\n\t\t'input[type=email]',\r\n\t\t'input[type=url]'\r\n\t].join(',');\r\n\r\n\tautoResize.AutoResizer = AutoResizer;\r\n\r\n\t$.fn.autoResize = autoResize;\r\n\r\n\tfunction autoResize(config) {\r\n\t\tthis.filter(autoResize.resizableFilterSelector).each(function(){\r\n\t\t\tnew AutoResizer( $(this), config );\r\n\t\t});\r\n\t\treturn this;\r\n\t}\r\n\r\n\tfunction AutoResizer(el, config) {\r\n\r\n\t\tif (el.data('AutoResizer')) {\r\n\t\t\tel.data('AutoResizer').destroy();\r\n\t\t}\r\n\r\n\t\tconfig = this.config = $.extend({}, autoResize.defaults, config);\r\n\t\tthis.el = el;\r\n\r\n\t\tthis.nodeName = el[0].nodeName.toLowerCase();\r\n\r\n\t\tthis.originalHeight = el.height();\r\n\t\tthis.previousScrollTop = null;\r\n\r\n\t\tthis.value = el.val();\r\n\r\n\t\tif (config.maxWidth === 'original') config.maxWidth = el.width();\r\n\t\tif (config.minWidth === 'original') config.minWidth = el.width();\r\n\t\tif (config.maxHeight === 'original') config.maxHeight = el.height();\r\n\t\tif (config.minHeight === 'original') config.minHeight = el.height();\r\n\r\n\t\tif (this.nodeName === 'textarea') {\r\n\t\t\tel.css({\r\n\t\t\t\tresize: 'none',\r\n\t\t\t\toverflowY: 'hidden'\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tel.data('AutoResizer', this);\r\n\r\n\t\t// Make sure onAfterResize is called upon animation completion\r\n\t\tconfig.animate.complete = (function(f){\r\n\t\t\treturn function() {\r\n\t\t\t\tconfig.onAfterResize.call(el);\r\n\t\t\t\treturn f.apply(this, arguments);\r\n\t\t\t};\r\n\t\t}(config.animate.complete));\r\n\r\n\t\tthis.bind();\r\n\t}\r\n\r\n\tAutoResizer.prototype = {\r\n\r\n\t\tbind: function() {\r\n\r\n\t\t\tvar check = $.proxy(function(){\r\n\t\t\t\tthis.check();\r\n\t\t\t\treturn true;\r\n\t\t\t}, this);\r\n\r\n\t\t\tthis.unbind();\r\n\r\n\t\t\tthis.el\r\n\t\t\t\t.bind('keyup.autoResize', check)\r\n\t\t\t\t//.bind('keydown.autoResize', check)\r\n\t\t\t\t.bind('change.autoResize', check)\r\n\t\t\t\t.bind('paste.autoResize', function() {\r\n\t\t\t\t\tsetTimeout(function() { check(); }, 0);\r\n\t\t\t\t});\r\n\r\n\t\t\tif (!this.el.is(':hidden')) {\r\n\t\t\t\tthis.check(null, true);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tunbind: function() {\r\n\t\t\tthis.el.unbind('.autoResize');\r\n\t\t},\r\n\r\n\t\tcreateClone: function() {\r\n\r\n\t\t\tvar el = this.el,\r\n\t\t\t\tclone = this.nodeName === 'textarea' ? el.clone() : $('<span/>');\r\n\r\n\t\t\tthis.clone = clone;\r\n\r\n\t\t\t$.each(autoResize.cloneCSSProperties, function(i, p){\r\n\t\t\t\tclone[0].style[p] = el.css(p);\r\n\t\t\t});\r\n\r\n\t\t\tclone\r\n\t\t\t\t.removeAttr('name')\r\n\t\t\t\t.removeAttr('id')\r\n\t\t\t\t.addClass(uid)\r\n\t\t\t\t.attr('tabIndex', -1)\r\n\t\t\t\t.css(autoResize.cloneCSSValues);\r\n\r\n\t\t\tif (this.nodeName === 'textarea') {\r\n\t\t\t\tclone.height('auto');\r\n\t\t\t} else {\r\n\t\t\t\tclone.width('auto').css({\r\n\t\t\t\t\twhiteSpace: 'nowrap'\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tcheck: function(e, immediate) {\r\n\r\n\t\t\tif (!this.clone) {\r\n\t\tthis.createClone();\r\n\t\tthis.injectClone();\r\n\t\t\t}\r\n\r\n\t\t\tvar config = this.config,\r\n\t\t\t\tclone = this.clone,\r\n\t\t\t\tel = this.el,\r\n\t\t\t\tvalue = el.val();\r\n\r\n\t\t\t// Do nothing if value hasn't changed\r\n\t\t\tif (value === this.prevValue) { return true; }\r\n\t\t\tthis.prevValue = value;\r\n\r\n\t\t\tif (this.nodeName === 'input') {\r\n\r\n\t\t\t\tclone.text(value);\r\n\r\n\t\t\t\t// Calculate new width + whether to change\r\n\t\t\t\tvar cloneWidth = clone.width(),\r\n\t\t\t\t\tnewWidth = (cloneWidth + config.extraSpace) >= config.minWidth ?\r\n\t\t\t\t\t\tcloneWidth + config.extraSpace : config.minWidth,\r\n\t\t\t\t\tcurrentWidth = el.width();\r\n\r\n\t\t\t\tnewWidth = Math.min(newWidth, config.maxWidth);\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\t(newWidth < currentWidth && newWidth >= config.minWidth) ||\r\n\t\t\t\t\t(newWidth >= config.minWidth && newWidth <= config.maxWidth)\r\n\t\t\t\t) {\r\n\r\n\t\t\t\t\tconfig.onBeforeResize.call(el);\r\n\t\t\t\t\tconfig.onResize.call(el);\r\n\r\n\t\t\t\t\tel.scrollLeft(0);\r\n\r\n\t\t\t\t\tif (config.animate && !immediate) {\r\n\t\t\t\t\t\tel.stop(1,1).animate({\r\n\t\t\t\t\t\t\twidth: newWidth\r\n\t\t\t\t\t\t}, config.animate);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tel.width(newWidth);\r\n\t\t\t\t\t\tconfig.onAfterResize.call(el);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// TEXTAREA\r\n\r\n\t\t\tclone.width(el.width()).height(0).val(value).scrollTop(10000);\r\n\r\n\t\t\tvar scrollTop = clone[0].scrollTop;\r\n\r\n\t\t\tif(!value) {\r\n\t\t\t\t// empty textarea should be exactly minHeight\r\n\t\t\t\tscrollTop = config.minHeight;\r\n\t\t\t\tthis.previousScrollTop = null; // reset state\r\n\t\t\t} else {\r\n\t\t\t\t// Don't do anything if scrollTop hasen't changed:\r\n\t\t\t\tif (this.previousScrollTop === scrollTop) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.previousScrollTop = scrollTop;\r\n\r\n\t\t\t\tif (scrollTop + config.extraSpace >= config.maxHeight) {\r\n\t\t\t\t\tel.css('overflowY', '');\r\n\t\t\t\t\tscrollTop = config.maxHeight;\r\n\t\t\t\t\timmediate = true;\r\n\t\t\t\t} else if (scrollTop + config.extraSpace <= config.minHeight) {\r\n\t\t\t\t\t\t// include extraSpace in calculations so the code works correctly\r\n\t\t\t\t\t\t// when there are few lines\r\n\t\t\t\t\tscrollTop = config.minHeight;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tel.css('overflowY', 'hidden');\r\n\t\t\t\t\tscrollTop += config.extraSpace;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconfig.onBeforeResize.call(el);\r\n\t\t\tconfig.onResize.call(el);\r\n\r\n\t\t\t// Either animate or directly apply height:\r\n\t\t\tif (config.animate && !immediate) {\r\n\t\t\t\t\tel.stop(1,1).animate({\r\n\t\t\t\t\t\t\theight: scrollTop\r\n\t\t\t\t\t}, config.animate);\r\n\t\t\t} else {\r\n\t\t\t\t\tel.height(scrollTop);\r\n\t\t\t\t\tconfig.onAfterResize.call(el);\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tdestroy: function() {\r\n\t\t\tthis.unbind();\r\n\t\t\tthis.el.removeData('AutoResizer');\r\n\t\t\tthis.clone.remove();\r\n\t\t\tdelete this.el;\r\n\t\t\tdelete this.clone;\r\n\t\t},\r\n\r\n\t\tinjectClone: function() {\r\n\t\t\t(\r\n\t\t\t\tautoResize.cloneContainer ||\r\n\t\t\t\t(autoResize.cloneContainer = $('<arclones/>').appendTo('body'))\r\n\t\t\t).append(this.clone);\r\n\t\t}\r\n\r\n\t};\r\n\r\n})(jQuery);\r\n","\r\n\r\n/*!\r\n * jQuery contextMenu - Plugin for simple contextMenu handling\r\n *\r\n * Version: 1.6.5\r\n *\r\n * Authors: Rodney Rehm, Addy Osmani (patches for FF)\r\n * Web: http://medialize.github.com/jQuery-contextMenu/\r\n *\r\n * Licensed under\r\n * MIT License http://www.opensource.org/licenses/mit-license\r\n * GPL v3 http://opensource.org/licenses/GPL-3.0\r\n *\r\n */\r\n(function($, undefined){\r\n\r\n // TODO: -\r\n // ARIA stuff: menuitem, menuitemcheckbox und menuitemradio\r\n // create <menu> structure if $.support[htmlCommand || htmlMenuitem] and !opt.disableNative\r\n\r\n// determine html5 compatibility\r\n$.support.htmlMenuitem = ('HTMLMenuItemElement' in window);\r\n$.support.htmlCommand = ('HTMLCommandElement' in window);\r\n$.support.eventSelectstart = (\"onselectstart\" in document.documentElement);\r\n/* // should the need arise, test for css user-select\r\n$.support.cssUserSelect = (function(){\r\n var t = false,\r\n e = document.createElement('div');\r\n\r\n $.each('Moz|Webkit|Khtml|O|ms|Icab|'.split('|'), function(i, prefix) {\r\n var propCC = prefix + (prefix ? 'U' : 'u') + 'serSelect',\r\n prop = (prefix ? ('-' + prefix.toLowerCase() + '-') : '') + 'user-select';\r\n\r\n e.style.cssText = prop + ': text;';\r\n if (e.style[propCC] == 'text') {\r\n t = true;\r\n return false;\r\n }\r\n\r\n return true;\r\n });\r\n\r\n return t;\r\n})();\r\n*/\r\n\r\nif (!$.ui || !$.ui.widget) {\r\n // duck punch $.cleanData like jQueryUI does to get that remove event\r\n // https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js#L16-24\r\n var _cleanData = $.cleanData;\r\n $.cleanData = function( elems ) {\r\n for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\r\n try {\r\n $( elem ).triggerHandler( \"remove\" );\r\n // http://bugs.jquery.com/ticket/8235\r\n } catch( e ) {}\r\n }\r\n _cleanData( elems );\r\n };\r\n}\r\n\r\nvar // currently active contextMenu trigger\r\n $currentTrigger = null,\r\n // is contextMenu initialized with at least one menu?\r\n initialized = false,\r\n // window handle\r\n $win = $(window),\r\n // number of registered menus\r\n counter = 0,\r\n // mapping selector to namespace\r\n namespaces = {},\r\n // mapping namespace to options\r\n menus = {},\r\n // custom command type handlers\r\n types = {},\r\n // default values\r\n defaults = {\r\n // selector of contextMenu trigger\r\n selector: null,\r\n // where to append the menu to\r\n appendTo: null,\r\n // method to trigger context menu [\"right\", \"left\", \"hover\"]\r\n trigger: \"right\",\r\n // hide menu when mouse leaves trigger / menu elements\r\n autoHide: false,\r\n // ms to wait before showing a hover-triggered context menu\r\n delay: 200,\r\n // flag denoting if a second trigger should simply move (true) or rebuild (false) an open menu\r\n // as long as the trigger happened on one of the trigger-element's child nodes\r\n reposition: false,\r\n // determine position to show menu at\r\n determinePosition: function($menu) {\r\n // position to the lower middle of the trigger element\r\n if ($.ui && $.ui.position) {\r\n // .position() is provided as a jQuery UI utility\r\n // (...and it won't work on hidden elements)\r\n $menu.css('display', 'block').position({\r\n my: \"center top\",\r\n at: \"center bottom\",\r\n of: this,\r\n offset: \"0 5\",\r\n collision: \"fit\"\r\n }).css('display', 'none');\r\n } else {\r\n // determine contextMenu position\r\n var offset = this.offset();\r\n offset.top += this.outerHeight();\r\n offset.left += this.outerWidth() / 2 - $menu.outerWidth() / 2;\r\n $menu.css(offset);\r\n }\r\n },\r\n // position menu\r\n position: function(opt, x, y) {\r\n var $this = this,\r\n offset;\r\n // determine contextMenu position\r\n if (!x && !y) {\r\n opt.determinePosition.call(this, opt.$menu);\r\n return;\r\n } else if (x === \"maintain\" && y === \"maintain\") {\r\n // x and y must not be changed (after re-show on command click)\r\n offset = opt.$menu.position();\r\n } else {\r\n // x and y are given (by mouse event)\r\n offset = {top: y, left: x};\r\n }\r\n\r\n // correct offset if viewport demands it\r\n var bottom = $win.scrollTop() + $win.height(),\r\n right = $win.scrollLeft() + $win.width(),\r\n height = opt.$menu.height(),\r\n width = opt.$menu.width();\r\n\r\n if (offset.top + height > bottom) {\r\n offset.top -= height;\r\n }\r\n\r\n if (offset.left + width > right) {\r\n offset.left -= width;\r\n }\r\n\r\n opt.$menu.css(offset);\r\n },\r\n // position the sub-menu\r\n positionSubmenu: function($menu) {\r\n if ($.ui && $.ui.position) {\r\n // .position() is provided as a jQuery UI utility\r\n // (...and it won't work on hidden elements)\r\n $menu.css('display', 'block').position({\r\n my: \"left top\",\r\n at: \"right top\",\r\n of: this,\r\n collision: \"flipfit fit\"\r\n }).css('display', '');\r\n } else {\r\n // determine contextMenu position\r\n var offset = {\r\n top: 0,\r\n left: this.outerWidth()\r\n };\r\n $menu.css(offset);\r\n }\r\n },\r\n // offset to add to zIndex\r\n zIndex: 1,\r\n // show hide animation settings\r\n animation: {\r\n duration: 50,\r\n show: 'slideDown',\r\n hide: 'slideUp'\r\n },\r\n // events\r\n events: {\r\n show: $.noop,\r\n hide: $.noop\r\n },\r\n // default callback\r\n callback: null,\r\n // list of contextMenu items\r\n items: {}\r\n },\r\n // mouse position for hover activation\r\n hoveract = {\r\n timer: null,\r\n pageX: null,\r\n pageY: null\r\n },\r\n // determine zIndex\r\n zindex = function($t) {\r\n var zin = 0,\r\n $tt = $t;\r\n\r\n while (true) {\r\n zin = Math.max(zin, parseInt($tt.css('z-index'), 10) || 0);\r\n $tt = $tt.parent();\r\n if (!$tt || !$tt.length || \"html body\".indexOf($tt.prop('nodeName').toLowerCase()) > -1 ) {\r\n break;\r\n }\r\n }\r\n\r\n return zin;\r\n },\r\n // event handlers\r\n handle = {\r\n // abort anything\r\n abortevent: function(e){\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n },\r\n\r\n // contextmenu show dispatcher\r\n contextmenu: function(e) {\r\n var $this = $(this);\r\n\r\n // disable actual context-menu\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n\r\n // abort native-triggered events unless we're triggering on right click\r\n if (e.data.trigger != 'right' && e.originalEvent) {\r\n return;\r\n }\r\n\r\n // abort event if menu is visible for this trigger\r\n if ($this.hasClass('context-menu-active')) {\r\n return;\r\n }\r\n\r\n if (!$this.hasClass('context-menu-disabled')) {\r\n // theoretically need to fire a show event at <menu>\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#context-menus\r\n // var evt = jQuery.Event(\"show\", { data: data, pageX: e.pageX, pageY: e.pageY, relatedTarget: this });\r\n // e.data.$menu.trigger(evt);\r\n\r\n $currentTrigger = $this;\r\n if (e.data.build) {\r\n var built = e.data.build($currentTrigger, e);\r\n // abort if build() returned false\r\n if (built === false) {\r\n return;\r\n }\r\n\r\n // dynamically build menu on invocation\r\n e.data = $.extend(true, {}, defaults, e.data, built || {});\r\n\r\n // abort if there are no items to display\r\n if (!e.data.items || $.isEmptyObject(e.data.items)) {\r\n // Note: jQuery captures and ignores errors from event handlers\r\n if (window.console) {\r\n (console.error || console.log)(\"No items specified to show in contextMenu\");\r\n }\r\n\r\n throw new Error('No Items sepcified');\r\n }\r\n\r\n // backreference for custom command type creation\r\n e.data.$trigger = $currentTrigger;\r\n\r\n op.create(e.data);\r\n }\r\n // show menu\r\n op.show.call($this, e.data, e.pageX, e.pageY);\r\n }\r\n },\r\n // contextMenu left-click trigger\r\n click: function(e) {\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n $(this).trigger($.Event(\"contextmenu\", { data: e.data, pageX: e.pageX, pageY: e.pageY }));\r\n },\r\n // contextMenu right-click trigger\r\n mousedown: function(e) {\r\n // register mouse down\r\n var $this = $(this);\r\n\r\n // hide any previous menus\r\n if ($currentTrigger && $currentTrigger.length && !$currentTrigger.is($this)) {\r\n $currentTrigger.data('contextMenu').$menu.trigger('contextmenu:hide');\r\n }\r\n\r\n // activate on right click\r\n if (e.button == 2) {\r\n $currentTrigger = $this.data('contextMenuActive', true);\r\n }\r\n },\r\n // contextMenu right-click trigger\r\n mouseup: function(e) {\r\n // show menu\r\n var $this = $(this);\r\n if ($this.data('contextMenuActive') && $currentTrigger && $currentTrigger.length && $currentTrigger.is($this) && !$this.hasClass('context-menu-disabled')) {\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n $currentTrigger = $this;\r\n $this.trigger($.Event(\"contextmenu\", { data: e.data, pageX: e.pageX, pageY: e.pageY }));\r\n }\r\n\r\n $this.removeData('contextMenuActive');\r\n },\r\n // contextMenu hover trigger\r\n mouseenter: function(e) {\r\n var $this = $(this),\r\n $related = $(e.relatedTarget),\r\n $document = $(document);\r\n\r\n // abort if we're coming from a menu\r\n if ($related.is('.context-menu-list') || $related.closest('.context-menu-list').length) {\r\n return;\r\n }\r\n\r\n // abort if a menu is shown\r\n if ($currentTrigger && $currentTrigger.length) {\r\n return;\r\n }\r\n\r\n hoveract.pageX = e.pageX;\r\n hoveract.pageY = e.pageY;\r\n hoveract.data = e.data;\r\n $document.on('mousemove.contextMenuShow', handle.mousemove);\r\n hoveract.timer = setTimeout(function() {\r\n hoveract.timer = null;\r\n $document.off('mousemove.contextMenuShow');\r\n $currentTrigger = $this;\r\n $this.trigger($.Event(\"contextmenu\", { data: hoveract.data, pageX: hoveract.pageX, pageY: hoveract.pageY }));\r\n }, e.data.delay );\r\n },\r\n // contextMenu hover trigger\r\n mousemove: function(e) {\r\n hoveract.pageX = e.pageX;\r\n hoveract.pageY = e.pageY;\r\n },\r\n // contextMenu hover trigger\r\n mouseleave: function(e) {\r\n // abort if we're leaving for a menu\r\n var $related = $(e.relatedTarget);\r\n if ($related.is('.context-menu-list') || $related.closest('.context-menu-list').length) {\r\n return;\r\n }\r\n\r\n try {\r\n clearTimeout(hoveract.timer);\r\n } catch(e) {}\r\n\r\n hoveract.timer = null;\r\n },\r\n\r\n // click on layer to hide contextMenu\r\n layerClick: function(e) {\r\n var $this = $(this),\r\n root = $this.data('contextMenuRoot'),\r\n mouseup = false,\r\n button = e.button,\r\n x = e.pageX,\r\n y = e.pageY,\r\n target,\r\n offset,\r\n selectors;\r\n\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n\r\n setTimeout(function() {\r\n var $window, hideshow, possibleTarget;\r\n var triggerAction = ((root.trigger == 'left' && button === 0) || (root.trigger == 'right' && button === 2));\r\n\r\n // find the element that would've been clicked, wasn't the layer in the way\r\n if (document.elementFromPoint) {\r\n root.$layer.hide();\r\n target = document.elementFromPoint(x - $win.scrollLeft(), y - $win.scrollTop());\r\n root.$layer.show();\r\n }\r\n\r\n if (root.reposition && triggerAction) {\r\n if (document.elementFromPoint) {\r\n if (root.$trigger.is(target) || root.$trigger.has(target).length) {\r\n root.position.call(root.$trigger, root, x, y);\r\n return;\r\n }\r\n } else {\r\n offset = root.$trigger.offset();\r\n $window = $(window);\r\n // while this looks kinda awful, it's the best way to avoid\r\n // unnecessarily calculating any positions\r\n offset.top += $window.scrollTop();\r\n if (offset.top <= e.pageY) {\r\n offset.left += $window.scrollLeft();\r\n if (offset.left <= e.pageX) {\r\n offset.bottom = offset.top + root.$trigger.outerHeight();\r\n if (offset.bottom >= e.pageY) {\r\n offset.right = offset.left + root.$trigger.outerWidth();\r\n if (offset.right >= e.pageX) {\r\n // reposition\r\n root.position.call(root.$trigger, root, x, y);\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (target && triggerAction) {\r\n root.$trigger.one('contextmenu:hidden', function() {\r\n $(target).contextMenu({x: x, y: y});\r\n });\r\n }\r\n\r\n root.$menu.trigger('contextmenu:hide');\r\n }, 50);\r\n },\r\n // key handled :hover\r\n keyStop: function(e, opt) {\r\n if (!opt.isInput) {\r\n e.preventDefault();\r\n }\r\n\r\n e.stopPropagation();\r\n },\r\n key: function(e) {\r\n var opt = $currentTrigger.data('contextMenu') || {};\r\n\r\n switch (e.keyCode) {\r\n case 9:\r\n case 38: // up\r\n handle.keyStop(e, opt);\r\n // if keyCode is [38 (up)] or [9 (tab) with shift]\r\n if (opt.isInput) {\r\n if (e.keyCode == 9 && e.shiftKey) {\r\n e.preventDefault();\r\n opt.$selected && opt.$selected.find('input, textarea, select').blur();\r\n opt.$menu.trigger('prevcommand');\r\n return;\r\n } else if (e.keyCode == 38 && opt.$selected.find('input, textarea, select').prop('type') == 'checkbox') {\r\n // checkboxes don't capture this key\r\n e.preventDefault();\r\n return;\r\n }\r\n } else if (e.keyCode != 9 || e.shiftKey) {\r\n opt.$menu.trigger('prevcommand');\r\n return;\r\n }\r\n // omitting break;\r\n\r\n // case 9: // tab - reached through omitted break;\r\n case 40: // down\r\n handle.keyStop(e, opt);\r\n if (opt.isInput) {\r\n if (e.keyCode == 9) {\r\n e.preventDefault();\r\n opt.$selected && opt.$selected.find('input, textarea, select').blur();\r\n opt.$menu.trigger('nextcommand');\r\n return;\r\n } else if (e.keyCode == 40 && opt.$selected.find('input, textarea, select').prop('type') == 'checkbox') {\r\n // checkboxes don't capture this key\r\n e.preventDefault();\r\n return;\r\n }\r\n } else {\r\n opt.$menu.trigger('nextcommand');\r\n return;\r\n }\r\n break;\r\n\r\n case 37: // left\r\n handle.keyStop(e, opt);\r\n if (opt.isInput || !opt.$selected || !opt.$selected.length) {\r\n break;\r\n }\r\n\r\n if (!opt.$selected.parent().hasClass('context-menu-root')) {\r\n var $parent = opt.$selected.parent().parent();\r\n opt.$selected.trigger('contextmenu:blur');\r\n opt.$selected = $parent;\r\n return;\r\n }\r\n break;\r\n\r\n case 39: // right\r\n handle.keyStop(e, opt);\r\n if (opt.isInput || !opt.$selected || !opt.$selected.length) {\r\n break;\r\n }\r\n\r\n var itemdata = opt.$selected.data('contextMenu') || {};\r\n if (itemdata.$menu && opt.$selected.hasClass('context-menu-submenu')) {\r\n opt.$selected = null;\r\n itemdata.$selected = null;\r\n itemdata.$menu.trigger('nextcommand');\r\n return;\r\n }\r\n break;\r\n\r\n case 35: // end\r\n case 36: // home\r\n if (opt.$selected && opt.$selected.find('input, textarea, select').length) {\r\n return;\r\n } else {\r\n (opt.$selected && opt.$selected.parent() || opt.$menu)\r\n .children(':not(.disabled, .not-selectable)')[e.keyCode == 36 ? 'first' : 'last']()\r\n .trigger('contextmenu:focus');\r\n e.preventDefault();\r\n return;\r\n }\r\n break;\r\n\r\n case 13: // enter\r\n handle.keyStop(e, opt);\r\n if (opt.isInput) {\r\n if (opt.$selected && !opt.$selected.is('textarea, select')) {\r\n e.preventDefault();\r\n return;\r\n }\r\n break;\r\n }\r\n opt.$selected && opt.$selected.trigger('mouseup');\r\n return;\r\n\r\n case 32: // space\r\n case 33: // page up\r\n case 34: // page down\r\n // prevent browser from scrolling down while menu is visible\r\n handle.keyStop(e, opt);\r\n return;\r\n\r\n case 27: // esc\r\n handle.keyStop(e, opt);\r\n opt.$menu.trigger('contextmenu:hide');\r\n return;\r\n\r\n default: // 0-9, a-z\r\n var k = (String.fromCharCode(e.keyCode)).toUpperCase();\r\n if (opt.accesskeys[k]) {\r\n // according to the specs accesskeys must be invoked immediately\r\n opt.accesskeys[k].$node.trigger(opt.accesskeys[k].$menu\r\n ? 'contextmenu:focus'\r\n : 'mouseup'\r\n );\r\n return;\r\n }\r\n break;\r\n }\r\n // pass event to selected item,\r\n // stop propagation to avoid endless recursion\r\n e.stopPropagation();\r\n opt.$selected && opt.$selected.trigger(e);\r\n },\r\n\r\n // select previous possible command in menu\r\n prevItem: function(e) {\r\n e.stopPropagation();\r\n var opt = $(this).data('contextMenu') || {};\r\n\r\n // obtain currently selected menu\r\n if (opt.$selected) {\r\n var $s = opt.$selected;\r\n opt = opt.$selected.parent().data('contextMenu') || {};\r\n opt.$selected = $s;\r\n }\r\n\r\n var $children = opt.$menu.children(),\r\n $prev = !opt.$selected || !opt.$selected.prev().length ? $children.last() : opt.$selected.prev(),\r\n $round = $prev;\r\n\r\n // skip disabled\r\n while ($prev.hasClass('disabled') || $prev.hasClass('not-selectable')) {\r\n if ($prev.prev().length) {\r\n $prev = $prev.prev();\r\n } else {\r\n $prev = $children.last();\r\n }\r\n if ($prev.is($round)) {\r\n // break endless loop\r\n return;\r\n }\r\n }\r\n\r\n // leave current\r\n if (opt.$selected) {\r\n handle.itemMouseleave.call(opt.$selected.get(0), e);\r\n }\r\n\r\n // activate next\r\n handle.itemMouseenter.call($prev.get(0), e);\r\n\r\n // focus input\r\n var $input = $prev.find('input, textarea, select');\r\n if ($input.length) {\r\n $input.focus();\r\n }\r\n },\r\n // select next possible command in menu\r\n nextItem: function(e) {\r\n e.stopPropagation();\r\n var opt = $(this).data('contextMenu') || {};\r\n\r\n // obtain currently selected menu\r\n if (opt.$selected) {\r\n var $s = opt.$selected;\r\n opt = opt.$selected.parent().data('contextMenu') || {};\r\n opt.$selected = $s;\r\n }\r\n\r\n var $children = opt.$menu.children(),\r\n $next = !opt.$selected || !opt.$selected.next().length ? $children.first() : opt.$selected.next(),\r\n $round = $next;\r\n\r\n // skip disabled\r\n while ($next.hasClass('disabled') || $next.hasClass('not-selectable')) {\r\n if ($next.next().length) {\r\n $next = $next.next();\r\n } else {\r\n $next = $children.first();\r\n }\r\n if ($next.is($round)) {\r\n // break endless loop\r\n return;\r\n }\r\n }\r\n\r\n // leave current\r\n if (opt.$selected) {\r\n handle.itemMouseleave.call(opt.$selected.get(0), e);\r\n }\r\n\r\n // activate next\r\n handle.itemMouseenter.call($next.get(0), e);\r\n\r\n // focus input\r\n var $input = $next.find('input, textarea, select');\r\n if ($input.length) {\r\n $input.focus();\r\n }\r\n },\r\n\r\n // flag that we're inside an input so the key handler can act accordingly\r\n focusInput: function(e) {\r\n var $this = $(this).closest('.context-menu-item'),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot;\r\n\r\n root.$selected = opt.$selected = $this;\r\n root.isInput = opt.isInput = true;\r\n },\r\n // flag that we're inside an input so the key handler can act accordingly\r\n blurInput: function(e) {\r\n var $this = $(this).closest('.context-menu-item'),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot;\r\n\r\n root.isInput = opt.isInput = false;\r\n },\r\n\r\n // :hover on menu\r\n menuMouseenter: function(e) {\r\n var root = $(this).data().contextMenuRoot;\r\n if(root)root.hovering = true;\r\n },\r\n // :hover on menu\r\n menuMouseleave: function(e) {\r\n var root = $(this).data().contextMenuRoot;\r\n if (root && root.$layer && root.$layer.is(e.relatedTarget)) {\r\n root.hovering = false;\r\n }\r\n },\r\n\r\n // :hover done manually so key handling is possible\r\n itemMouseenter: function(e) {\r\n var $this = $(this),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot;\r\n\r\n if(!root)\r\n return\r\n\r\n root.hovering = true;\r\n\r\n // abort if we're re-entering\r\n if (e && root.$layer && root.$layer.is(e.relatedTarget)) {\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n }\r\n\r\n // make sure only one item is selected\r\n (opt.$menu ? opt : root).$menu\r\n .children('.hover').trigger('contextmenu:blur');\r\n\r\n if ($this.hasClass('disabled') || $this.hasClass('not-selectable')) {\r\n opt.$selected = null;\r\n return;\r\n }\r\n\r\n $this.trigger('contextmenu:focus');\r\n },\r\n // :hover done manually so key handling is possible\r\n itemMouseleave: function(e) {\r\n var $this = $(this),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot;\r\n\r\n if (root && root !== opt && root.$layer && root.$layer.is(e.relatedTarget)) {\r\n root.$selected && root.$selected.trigger('contextmenu:blur');\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n root.$selected = opt.$selected = opt.$node;\r\n return;\r\n }\r\n\r\n $this.trigger('contextmenu:blur');\r\n },\r\n // contextMenu item click\r\n itemClick: function(e) {\r\n var $this = $(this),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot,\r\n key = data.contextMenuKey,\r\n callback;\r\n\r\n // abort if the key is unknown or disabled or is a menu\r\n if (!opt.items[key] || $this.is('.disabled, .context-menu-submenu, .context-menu-separator, .not-selectable')) {\r\n return;\r\n }\r\n\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n\r\n if ($.isFunction(root.callbacks[key]) && Object.prototype.hasOwnProperty.call(root.callbacks, key)) {\r\n // item-specific callback\r\n callback = root.callbacks[key];\r\n } else if ($.isFunction(root.callback)) {\r\n // default callback\r\n callback = root.callback;\r\n } else {\r\n // no callback, no action\r\n return;\r\n }\r\n\r\n // hide menu if callback doesn't stop that\r\n if (callback.call(root.$trigger, key, root) !== false) {\r\n root.$menu.trigger('contextmenu:hide');\r\n } else if (root.$menu.parent().length) {\r\n op.update.call(root.$trigger, root);\r\n }\r\n },\r\n // ignore click events on input elements\r\n inputClick: function(e) {\r\n e.stopImmediatePropagation();\r\n },\r\n\r\n // hide <menu>\r\n hideMenu: function(e, data) {\r\n var root = $(this).data('contextMenuRoot');\r\n op.hide.call(root.$trigger, root, data && data.force);\r\n },\r\n // focus <command>\r\n focusItem: function(e) {\r\n e.stopPropagation();\r\n var $this = $(this),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot;\r\n\r\n $this.addClass('hover')\r\n .siblings('.hover').trigger('contextmenu:blur');\r\n\r\n // remember selected\r\n opt.$selected = root.$selected = $this;\r\n\r\n // position sub-menu - do after show so dumb $.ui.position can keep up\r\n if (opt.$node) {\r\n root.positionSubmenu.call(opt.$node, opt.$menu);\r\n }\r\n },\r\n // blur <command>\r\n blurItem: function(e) {\r\n e.stopPropagation();\r\n var $this = $(this),\r\n data = $this.data(),\r\n opt = data.contextMenu;\r\n\r\n $this.removeClass('hover');\r\n if(opt)opt.$selected = null;\r\n }\r\n },\r\n // operations\r\n op = {\r\n show: function(opt, x, y) {\r\n var $trigger = $(this),\r\n offset,\r\n css = {};\r\n\r\n // hide any open menus\r\n $('#context-menu-layer').trigger('mousedown');\r\n\r\n // backreference for callbacks\r\n opt.$trigger = $trigger;\r\n\r\n // show event\r\n if (opt.events.show.call($trigger, opt) === false) {\r\n $currentTrigger = null;\r\n return;\r\n }\r\n\r\n // create or update context menu\r\n op.update.call($trigger, opt);\r\n\r\n // position menu\r\n opt.position.call($trigger, opt, x, y);\r\n\r\n // make sure we're in front\r\n if (opt.zIndex) {\r\n css.zIndex = zindex($trigger) + opt.zIndex;\r\n }\r\n\r\n // add layer\r\n op.layer.call(opt.$menu, opt, css.zIndex);\r\n\r\n // adjust sub-menu zIndexes\r\n opt.$menu.find('ul').css('zIndex', css.zIndex + 1);\r\n\r\n // position and show context menu\r\n opt.$menu.css( css )[opt.animation.show](opt.animation.duration, function() {\r\n $trigger.trigger('contextmenu:visible');\r\n });\r\n // make options available and set state\r\n $trigger\r\n .data('contextMenu', opt)\r\n .addClass(\"context-menu-active\");\r\n\r\n // register key handler\r\n $(document).off('keydown.contextMenu').on('keydown.contextMenu', handle.key);\r\n // register autoHide handler\r\n if (opt.autoHide) {\r\n // mouse position handler\r\n $(document).on('mousemove.contextMenuAutoHide', function(e) {\r\n // need to capture the offset on mousemove,\r\n // since the page might've been scrolled since activation\r\n var pos = $trigger.offset();\r\n pos.right = pos.left + $trigger.outerWidth();\r\n pos.bottom = pos.top + $trigger.outerHeight();\r\n\r\n if (opt.$layer && !opt.hovering && (!(e.pageX >= pos.left && e.pageX <= pos.right) || !(e.pageY >= pos.top && e.pageY <= pos.bottom))) {\r\n // if mouse in menu...\r\n opt.$menu.trigger('contextmenu:hide');\r\n }\r\n });\r\n }\r\n },\r\n hide: function(opt, force) {\r\n var $trigger = $(this);\r\n if (!opt) {\r\n opt = $trigger.data('contextMenu') || {};\r\n }\r\n\r\n // hide event\r\n if (!force && opt.events && opt.events.hide.call($trigger, opt) === false) {\r\n return;\r\n }\r\n\r\n // remove options and revert state\r\n $trigger\r\n .removeData('contextMenu')\r\n .removeClass(\"context-menu-active\");\r\n\r\n if (opt.$layer) {\r\n // keep layer for a bit so the contextmenu event can be aborted properly by opera\r\n setTimeout((function($layer) {\r\n return function(){\r\n $layer.remove();\r\n };\r\n })(opt.$layer), 10);\r\n\r\n try {\r\n delete opt.$layer;\r\n } catch(e) {\r\n opt.$layer = null;\r\n }\r\n }\r\n\r\n // remove handle\r\n $currentTrigger = null;\r\n // remove selected\r\n opt.$menu.find('.hover').trigger('contextmenu:blur');\r\n opt.$selected = null;\r\n // unregister key and mouse handlers\r\n //$(document).off('.contextMenuAutoHide keydown.contextMenu'); // http://bugs.jquery.com/ticket/10705\r\n $(document).off('.contextMenuAutoHide').off('keydown.contextMenu');\r\n // hide menu\r\n opt.$menu && opt.$menu[opt.animation.hide](opt.animation.duration, function (){\r\n // tear down dynamically built menu after animation is completed.\r\n if (opt.build) {\r\n opt.$menu.remove();\r\n $.each(opt, function(key, value) {\r\n switch (key) {\r\n case 'ns':\r\n case 'selector':\r\n case 'build':\r\n case 'trigger':\r\n return true;\r\n\r\n default:\r\n opt[key] = undefined;\r\n try {\r\n delete opt[key];\r\n } catch (e) {}\r\n return true;\r\n }\r\n });\r\n }\r\n\r\n setTimeout(function() {\r\n $trigger.trigger('contextmenu:hidden');\r\n }, 10);\r\n });\r\n },\r\n create: function(opt, root) {\r\n if (root === undefined) {\r\n root = opt;\r\n }\r\n // create contextMenu\r\n opt.$menu = $('<ul class=\"context-menu-list\"></ul>').addClass(opt.className || \"\").data({\r\n 'contextMenu': opt,\r\n 'contextMenuRoot': root\r\n });\r\n\r\n $.each(['callbacks', 'commands', 'inputs'], function(i,k){\r\n opt[k] = {};\r\n if (!root[k]) {\r\n root[k] = {};\r\n }\r\n });\r\n\r\n root.accesskeys || (root.accesskeys = {});\r\n\r\n // create contextMenu items\r\n $.each(opt.items, function(key, item) {\r\n var $t = $('<li class=\"context-menu-item\"></li>').addClass(item.className || \"\"),\r\n $label = null,\r\n $input = null;\r\n\r\n // iOS needs to see a click-event bound to an element to actually\r\n // have the TouchEvents infrastructure trigger the click event\r\n $t.on('click', $.noop);\r\n\r\n if (typeof item !== \"string\"){\r\n item.$node = $t.data({\r\n 'contextMenu': opt,\r\n 'contextMenuRoot': root,\r\n 'contextMenuKey': key\r\n });\r\n }\r\n\r\n // register accesskey\r\n // NOTE: the accesskey attribute should be applicable to any element, but Safari5 and Chrome13 still can't do that\r\n if (item.accesskey) {\r\n var aks = splitAccesskey(item.accesskey);\r\n for (var i=0, ak; ak = aks[i]; i++) {\r\n if (!root.accesskeys[ak]) {\r\n root.accesskeys[ak] = item;\r\n item._name = item.name.replace(new RegExp('(' + ak + ')', 'i'), '<span class=\"context-menu-accesskey\">$1</span>');\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (typeof item == \"string\") {\r\n $t.addClass('context-menu-separator not-selectable');\r\n } else if (item.type && types[item.type]) {\r\n // run custom type handler\r\n types[item.type].call($t, item, opt, root);\r\n // register commands\r\n $.each([opt, root], function(i,k){\r\n k.commands[key] = item;\r\n if ($.isFunction(item.callback)) {\r\n k.callbacks[key] = item.callback;\r\n }\r\n });\r\n } else {\r\n // add label for input\r\n if (item.type == 'html') {\r\n $t.addClass('context-menu-html not-selectable');\r\n } else if (item.type) {\r\n $label = $('<label></label>').appendTo($t);\r\n $('<span></span>').html(item._name || item.name).appendTo($label);\r\n $t.addClass('context-menu-input');\r\n opt.hasTypes = true;\r\n $.each([opt, root], function(i,k){\r\n k.commands[key] = item;\r\n k.inputs[key] = item;\r\n });\r\n } else if (item.items) {\r\n item.type = 'sub';\r\n }\r\n\r\n switch (item.type) {\r\n case 'text':\r\n $input = $('<input type=\"text\" value=\"1\" name=\"\" value=\"\">')\r\n .attr('name', 'context-menu-input-' + key)\r\n .val(item.value || \"\")\r\n .appendTo($label);\r\n break;\r\n\r\n case 'textarea':\r\n $input = $('<textarea name=\"\"></textarea>')\r\n .attr('name', 'context-menu-input-' + key)\r\n .val(item.value || \"\")\r\n .appendTo($label);\r\n\r\n if (item.height) {\r\n $input.height(item.height);\r\n }\r\n break;\r\n\r\n case 'checkbox':\r\n $input = $('<input type=\"checkbox\" value=\"1\" name=\"\" value=\"\">')\r\n .attr('name', 'context-menu-input-' + key)\r\n .val(item.value || \"\")\r\n .prop(\"checked\", !!item.selected)\r\n .prependTo($label);\r\n break;\r\n\r\n case 'radio':\r\n $input = $('<input type=\"radio\" value=\"1\" name=\"\" value=\"\">')\r\n .attr('name', 'context-menu-input-' + item.radio)\r\n .val(item.value || \"\")\r\n .prop(\"checked\", !!item.selected)\r\n .prependTo($label);\r\n break;\r\n\r\n case 'select':\r\n $input = $('<select name=\"\">')\r\n .attr('name', 'context-menu-input-' + key)\r\n .appendTo($label);\r\n if (item.options) {\r\n $.each(item.options, function(value, text) {\r\n $('<option></option>').val(value).text(text).appendTo($input);\r\n });\r\n $input.val(item.selected);\r\n }\r\n break;\r\n\r\n case 'sub':\r\n // FIXME: shouldn't this .html() be a .text()?\r\n $('<span></span>').html(item._name || item.name).appendTo($t);\r\n item.appendTo = item.$node;\r\n op.create(item, root);\r\n $t.data('contextMenu', item).addClass('context-menu-submenu');\r\n item.callback = null;\r\n break;\r\n\r\n case 'html':\r\n $(item.html).appendTo($t);\r\n break;\r\n\r\n default:\r\n $.each([opt, root], function(i,k){\r\n k.commands[key] = item;\r\n if ($.isFunction(item.callback)) {\r\n k.callbacks[key] = item.callback;\r\n }\r\n });\r\n // FIXME: shouldn't this .html() be a .text()?\r\n $('<span></span>').html(item._name || item.name || \"\").appendTo($t);\r\n break;\r\n }\r\n\r\n // disable key listener in <input>\r\n if (item.type && item.type != 'sub' && item.type != 'html') {\r\n $input\r\n .on('focus', handle.focusInput)\r\n .on('blur', handle.blurInput);\r\n\r\n if (item.events) {\r\n $input.on(item.events, opt);\r\n }\r\n }\r\n\r\n // add icons\r\n if (item.icon) {\r\n $t.addClass(\"icon icon-\" + item.icon);\r\n }\r\n }\r\n\r\n // cache contained elements\r\n if(typeof item !==\"string\") {\r\n item.$input = $input;\r\n item.$label = $label;\r\n }\r\n\r\n // attach item to menu\r\n $t.appendTo(opt.$menu);\r\n\r\n // Disable text selection\r\n if (!opt.hasTypes && $.support.eventSelectstart) {\r\n // browsers support user-select: none,\r\n // IE has a special event for text-selection\r\n // browsers supporting neither will not be preventing text-selection\r\n $t.on('selectstart.disableTextSelect', handle.abortevent);\r\n }\r\n });\r\n // attach contextMenu to <body> (to bypass any possible overflow:hidden issues on parents of the trigger element)\r\n if (!opt.$node) {\r\n opt.$menu.css('display', 'none').addClass('context-menu-root');\r\n }\r\n opt.$menu.appendTo(opt.appendTo || document.body);\r\n },\r\n resize: function($menu, nested) {\r\n // determine widths of submenus, as CSS won't grow them automatically\r\n // position:absolute within position:absolute; min-width:100; max-width:200; results in width: 100;\r\n // kinda sucks hard...\r\n\r\n // determine width of absolutely positioned element\r\n $menu.css({position: 'absolute', display: 'block'});\r\n // don't apply yet, because that would break nested elements' widths\r\n // add a pixel to circumvent word-break issue in IE9 - #80\r\n $menu.data('width', Math.ceil($menu.width()) + 1);\r\n // reset styles so they allow nested elements to grow/shrink naturally\r\n $menu.css({\r\n position: 'static',\r\n minWidth: '0px',\r\n maxWidth: '100000px'\r\n });\r\n // identify width of nested menus\r\n $menu.find('> li > ul').each(function() {\r\n op.resize($(this), true);\r\n });\r\n // reset and apply changes in the end because nested\r\n // elements' widths wouldn't be calculatable otherwise\r\n if (!nested) {\r\n $menu.find('ul').andSelf().css({\r\n position: '',\r\n display: '',\r\n minWidth: '',\r\n maxWidth: ''\r\n }).width(function() {\r\n return $(this).data('width');\r\n });\r\n }\r\n },\r\n update: function(opt, root) {\r\n var $trigger = this;\r\n if (root === undefined) {\r\n root = opt;\r\n op.resize(opt.$menu);\r\n }\r\n // re-check disabled for each item\r\n opt.$menu.children().each(function(){\r\n var $item = $(this),\r\n key = $item.data('contextMenuKey'),\r\n item = opt.items[key],\r\n disabled = (item === undefined)||(typeof item ===\"string\") || ($.isFunction(item.disabled) && item.disabled.call($trigger, key, root)) || item.disabled === true;\r\n\r\n // dis- / enable item\r\n $item[disabled ? 'addClass' : 'removeClass']('disabled');\r\n\r\n if (item && item.type) {\r\n // dis- / enable input elements\r\n $item.find('input, select, textarea').prop('disabled', disabled);\r\n\r\n // update input states\r\n switch (item.type) {\r\n case 'text':\r\n case 'textarea':\r\n item.$input.val(item.value || \"\");\r\n break;\r\n\r\n case 'checkbox':\r\n case 'radio':\r\n item.$input.val(item.value || \"\").prop('checked', !!item.selected);\r\n break;\r\n\r\n case 'select':\r\n item.$input.val(item.selected || \"\");\r\n break;\r\n }\r\n }\r\n\r\n if (item && item.$menu) {\r\n // update sub-menu\r\n op.update.call($trigger, item, root);\r\n }\r\n });\r\n },\r\n layer: function(opt, zIndex) {\r\n // add transparent layer for click area\r\n // filter and background for Internet Explorer, Issue #23\r\n var $layer = opt.$layer = $('<div id=\"context-menu-layer\" style=\"position:fixed; z-index:' + zIndex + '; top:0; left:0; opacity: 0; filter: alpha(opacity=0); background-color: #000;\"></div>')\r\n .css({height: $win.height(), width: $win.width(), display: 'block'})\r\n .data('contextMenuRoot', opt)\r\n .insertBefore(this)\r\n .on('contextmenu', handle.abortevent)\r\n .on('mousedown', handle.layerClick);\r\n\r\n // IE6 doesn't know position:fixed;\r\n if (!$.support.fixedPosition) {\r\n $layer.css({\r\n 'position' : 'absolute',\r\n 'height' : $(document).height()\r\n });\r\n }\r\n\r\n return $layer;\r\n }\r\n };\r\n\r\n// split accesskey according to http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#assigned-access-key\r\nfunction splitAccesskey(val) {\r\n var t = val.split(/\\s+/),\r\n keys = [];\r\n\r\n for (var i=0, k; k = t[i]; i++) {\r\n k = k[0].toUpperCase(); // first character only\r\n // theoretically non-accessible characters should be ignored, but different systems, different keyboard layouts, ... screw it.\r\n // a map to look up already used access keys would be nice\r\n keys.push(k);\r\n }\r\n\r\n return keys;\r\n}\r\n\r\n// handle contextMenu triggers\r\n$.fn.contextMenu = function(operation) {\r\n if (operation === undefined) {\r\n this.first().trigger('contextmenu');\r\n } else if (operation.x && operation.y) {\r\n this.first().trigger($.Event(\"contextmenu\", {pageX: operation.x, pageY: operation.y}));\r\n } else if (operation === \"hide\") {\r\n var $menu = this.data('contextMenu').$menu;\r\n $menu && $menu.trigger('contextmenu:hide');\r\n } else if (operation === \"destroy\") {\r\n $.contextMenu(\"destroy\", {context: this});\r\n } else if ($.isPlainObject(operation)) {\r\n operation.context = this;\r\n $.contextMenu(\"create\", operation);\r\n } else if (operation) {\r\n this.removeClass('context-menu-disabled');\r\n } else if (!operation) {\r\n this.addClass('context-menu-disabled');\r\n }\r\n\r\n return this;\r\n};\r\n\r\n// manage contextMenu instances\r\n$.contextMenu = function(operation, options) {\r\n if (typeof operation != 'string') {\r\n options = operation;\r\n operation = 'create';\r\n }\r\n\r\n if (typeof options == 'string') {\r\n options = {selector: options};\r\n } else if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n // merge with default options\r\n var o = $.extend(true, {}, defaults, options || {});\r\n var $document = $(document);\r\n var $context = $document;\r\n var _hasContext = false;\r\n\r\n if (!o.context || !o.context.length) {\r\n o.context = document;\r\n } else {\r\n // you never know what they throw at you...\r\n $context = $(o.context).first();\r\n o.context = $context.get(0);\r\n _hasContext = o.context !== document;\r\n }\r\n\r\n switch (operation) {\r\n case 'create':\r\n // no selector no joy\r\n if (!o.selector) {\r\n throw new Error('No selector specified');\r\n }\r\n // make sure internal classes are not bound to\r\n if (o.selector.match(/.context-menu-(list|item|input)($|\\s)/)) {\r\n throw new Error('Cannot bind to selector \"' + o.selector + '\" as it contains a reserved className');\r\n }\r\n if (!o.build && (!o.items || $.isEmptyObject(o.items))) {\r\n throw new Error('No Items sepcified');\r\n }\r\n counter ++;\r\n o.ns = '.contextMenu' + counter;\r\n if (!_hasContext) {\r\n namespaces[o.selector] = o.ns;\r\n }\r\n menus[o.ns] = o;\r\n\r\n // default to right click\r\n if (!o.trigger) {\r\n o.trigger = 'right';\r\n }\r\n\r\n if (!initialized) {\r\n // make sure item click is registered first\r\n $document\r\n .on({\r\n 'contextmenu:hide.contextMenu': handle.hideMenu,\r\n 'prevcommand.contextMenu': handle.prevItem,\r\n 'nextcommand.contextMenu': handle.nextItem,\r\n 'contextmenu.contextMenu': handle.abortevent,\r\n 'mouseenter.contextMenu': handle.menuMouseenter,\r\n 'mouseleave.contextMenu': handle.menuMouseleave\r\n }, '.context-menu-list')\r\n .on('mouseup.contextMenu', '.context-menu-input', handle.inputClick)\r\n .on({\r\n 'mouseup.contextMenu': handle.itemClick,\r\n 'contextmenu:focus.contextMenu': handle.focusItem,\r\n 'contextmenu:blur.contextMenu': handle.blurItem,\r\n 'contextmenu.contextMenu': handle.abortevent,\r\n 'mouseenter.contextMenu': handle.itemMouseenter,\r\n 'mouseleave.contextMenu': handle.itemMouseleave\r\n }, '.context-menu-item');\r\n\r\n initialized = true;\r\n }\r\n\r\n // engage native contextmenu event\r\n $context\r\n .on('contextmenu' + o.ns, o.selector, o, handle.contextmenu);\r\n\r\n if (_hasContext) {\r\n // add remove hook, just in case\r\n $context.on('remove' + o.ns, function() {\r\n $(this).contextMenu(\"destroy\");\r\n });\r\n }\r\n\r\n switch (o.trigger) {\r\n case 'hover':\r\n $context\r\n .on('mouseenter' + o.ns, o.selector, o, handle.mouseenter)\r\n .on('mouseleave' + o.ns, o.selector, o, handle.mouseleave);\r\n break;\r\n\r\n case 'left':\r\n $context.on('click' + o.ns, o.selector, o, handle.click);\r\n break;\r\n /*\r\n default:\r\n // http://www.quirksmode.org/dom/events/contextmenu.html\r\n $document\r\n .on('mousedown' + o.ns, o.selector, o, handle.mousedown)\r\n .on('mouseup' + o.ns, o.selector, o, handle.mouseup);\r\n break;\r\n */\r\n }\r\n\r\n // create menu\r\n if (!o.build) {\r\n op.create(o);\r\n }\r\n break;\r\n\r\n case 'destroy':\r\n var $visibleMenu;\r\n if (_hasContext) {\r\n // get proper options\r\n var context = o.context;\r\n $.each(menus, function(ns, o) {\r\n if (o.context !== context) {\r\n return true;\r\n }\r\n\r\n $visibleMenu = $('.context-menu-list').filter(':visible');\r\n if ($visibleMenu.length && $visibleMenu.data().contextMenuRoot.$trigger.is($(o.context).find(o.selector))) {\r\n $visibleMenu.trigger('contextmenu:hide', {force: true});\r\n }\r\n\r\n try {\r\n if (menus[o.ns].$menu) {\r\n menus[o.ns].$menu.remove();\r\n }\r\n\r\n delete menus[o.ns];\r\n } catch(e) {\r\n menus[o.ns] = null;\r\n }\r\n\r\n $(o.context).off(o.ns);\r\n\r\n return true;\r\n });\r\n } else if (!o.selector) {\r\n $document.off('.contextMenu .contextMenuAutoHide');\r\n $.each(menus, function(ns, o) {\r\n $(o.context).off(o.ns);\r\n });\r\n\r\n namespaces = {};\r\n menus = {};\r\n counter = 0;\r\n initialized = false;\r\n\r\n $('#context-menu-layer, .context-menu-list').remove();\r\n } else if (namespaces[o.selector]) {\r\n $visibleMenu = $('.context-menu-list').filter(':visible');\r\n if ($visibleMenu.length && $visibleMenu.data().contextMenuRoot.$trigger.is(o.selector)) {\r\n $visibleMenu.trigger('contextmenu:hide', {force: true});\r\n }\r\n\r\n try {\r\n if (menus[namespaces[o.selector]].$menu) {\r\n menus[namespaces[o.selector]].$menu.remove();\r\n }\r\n\r\n delete menus[namespaces[o.selector]];\r\n } catch(e) {\r\n menus[namespaces[o.selector]] = null;\r\n }\r\n\r\n $document.off(namespaces[o.selector]);\r\n }\r\n break;\r\n\r\n case 'html5':\r\n // if <command> or <menuitem> are not handled by the browser,\r\n // or options was a bool true,\r\n // initialize $.contextMenu for them\r\n if ((!$.support.htmlCommand && !$.support.htmlMenuitem) || (typeof options == \"boolean\" && options)) {\r\n $('menu[type=\"context\"]').each(function() {\r\n if (this.id) {\r\n $.contextMenu({\r\n selector: '[contextmenu=' + this.id +']',\r\n items: $.contextMenu.fromMenu(this)\r\n });\r\n }\r\n }).css('display', 'none');\r\n }\r\n break;\r\n\r\n default:\r\n throw new Error('Unknown operation \"' + operation + '\"');\r\n }\r\n\r\n return this;\r\n};\r\n\r\n// import values into <input> commands\r\n$.contextMenu.setInputValues = function(opt, data) {\r\n if (data === undefined) {\r\n data = {};\r\n }\r\n\r\n $.each(opt.inputs, function(key, item) {\r\n switch (item.type) {\r\n case 'text':\r\n case 'textarea':\r\n item.value = data[key] || \"\";\r\n break;\r\n\r\n case 'checkbox':\r\n item.selected = data[key] ? true : false;\r\n break;\r\n\r\n case 'radio':\r\n item.selected = (data[item.radio] || \"\") == item.value ? true : false;\r\n break;\r\n\r\n case 'select':\r\n item.selected = data[key] || \"\";\r\n break;\r\n }\r\n });\r\n};\r\n\r\n// export values from <input> commands\r\n$.contextMenu.getInputValues = function(opt, data) {\r\n if (data === undefined) {\r\n data = {};\r\n }\r\n\r\n $.each(opt.inputs, function(key, item) {\r\n switch (item.type) {\r\n case 'text':\r\n case 'textarea':\r\n case 'select':\r\n data[key] = item.$input.val();\r\n break;\r\n\r\n case 'checkbox':\r\n data[key] = item.$input.prop('checked');\r\n break;\r\n\r\n case 'radio':\r\n if (item.$input.prop('checked')) {\r\n data[item.radio] = item.value;\r\n }\r\n break;\r\n }\r\n });\r\n\r\n return data;\r\n};\r\n\r\n// find <label for=\"xyz\">\r\nfunction inputLabel(node) {\r\n return (node.id && $('label[for=\"'+ node.id +'\"]').val()) || node.name;\r\n}\r\n\r\n// convert <menu> to items object\r\nfunction menuChildren(items, $children, counter) {\r\n if (!counter) {\r\n counter = 0;\r\n }\r\n\r\n $children.each(function() {\r\n var $node = $(this),\r\n node = this,\r\n nodeName = this.nodeName.toLowerCase(),\r\n label,\r\n item;\r\n\r\n // extract <label><input>\r\n if (nodeName == 'label' && $node.find('input, textarea, select').length) {\r\n label = $node.text();\r\n $node = $node.children().first();\r\n node = $node.get(0);\r\n nodeName = node.nodeName.toLowerCase();\r\n }\r\n\r\n /*\r\n * <menu> accepts flow-content as children. that means <embed>, <canvas> and such are valid menu items.\r\n * Not being the sadistic kind, $.contextMenu only accepts:\r\n * <command>, <menuitem>, <hr>, <span>, <p> <input [text, radio, checkbox]>, <textarea>, <select> and of course <menu>.\r\n * Everything else will be imported as an html node, which is not interfaced with contextMenu.\r\n */\r\n\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#concept-command\r\n switch (nodeName) {\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#the-menu-element\r\n case 'menu':\r\n item = {name: $node.attr('label'), items: {}};\r\n counter = menuChildren(item.items, $node.children(), counter);\r\n break;\r\n\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#using-the-a-element-to-define-a-command\r\n case 'a':\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#using-the-button-element-to-define-a-command\r\n case 'button':\r\n item = {\r\n name: $node.text(),\r\n disabled: !!$node.attr('disabled'),\r\n callback: (function(){ return function(){ $node.click(); }; })()\r\n };\r\n break;\r\n\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#using-the-command-element-to-define-a-command\r\n\r\n case 'menuitem':\r\n case 'command':\r\n switch ($node.attr('type')) {\r\n case undefined:\r\n case 'command':\r\n case 'menuitem':\r\n item = {\r\n name: $node.attr('label'),\r\n disabled: !!$node.attr('disabled'),\r\n callback: (function(){ return function(){ $node.click(); }; })()\r\n };\r\n break;\r\n\r\n case 'checkbox':\r\n item = {\r\n type: 'checkbox',\r\n disabled: !!$node.attr('disabled'),\r\n name: $node.attr('label'),\r\n selected: !!$node.attr('checked')\r\n };\r\n break;\r\n\r\n case 'radio':\r\n item = {\r\n type: 'radio',\r\n disabled: !!$node.attr('disabled'),\r\n name: $node.attr('label'),\r\n radio: $node.attr('radiogroup'),\r\n value: $node.attr('id'),\r\n selected: !!$node.attr('checked')\r\n };\r\n break;\r\n\r\n default:\r\n item = undefined;\r\n }\r\n break;\r\n\r\n case 'hr':\r\n item = '-------';\r\n break;\r\n\r\n case 'input':\r\n switch ($node.attr('type')) {\r\n case 'text':\r\n item = {\r\n type: 'text',\r\n name: label || inputLabel(node),\r\n disabled: !!$node.attr('disabled'),\r\n value: $node.val()\r\n };\r\n break;\r\n\r\n case 'checkbox':\r\n item = {\r\n type: 'checkbox',\r\n name: label || inputLabel(node),\r\n disabled: !!$node.attr('disabled'),\r\n selected: !!$node.attr('checked')\r\n };\r\n break;\r\n\r\n case 'radio':\r\n item = {\r\n type: 'radio',\r\n name: label || inputLabel(node),\r\n disabled: !!$node.attr('disabled'),\r\n radio: !!$node.attr('name'),\r\n value: $node.val(),\r\n selected: !!$node.attr('checked')\r\n };\r\n break;\r\n\r\n default:\r\n item = undefined;\r\n break;\r\n }\r\n break;\r\n\r\n case 'select':\r\n item = {\r\n type: 'select',\r\n name: label || inputLabel(node),\r\n disabled: !!$node.attr('disabled'),\r\n selected: $node.val(),\r\n options: {}\r\n };\r\n $node.children().each(function(){\r\n item.options[this.value] = $(this).text();\r\n });\r\n break;\r\n\r\n case 'textarea':\r\n item = {\r\n type: 'textarea',\r\n name: label || inputLabel(node),\r\n disabled: !!$node.attr('disabled'),\r\n value: $node.val()\r\n };\r\n break;\r\n\r\n case 'label':\r\n break;\r\n\r\n default:\r\n item = {type: 'html', html: $node.clone(true)};\r\n break;\r\n }\r\n\r\n if (item) {\r\n counter++;\r\n items['key' + counter] = item;\r\n }\r\n });\r\n\r\n return counter;\r\n}\r\n\r\n// convert html5 menu\r\n$.contextMenu.fromMenu = function(element) {\r\n var $this = $(element),\r\n items = {};\r\n\r\n menuChildren(items, $this.children());\r\n\r\n return items;\r\n};\r\n\r\n// make defaults accessible\r\n$.contextMenu.defaults = defaults;\r\n$.contextMenu.types = types;\r\n// export internal functions - undocumented, for hacking only!\r\n$.contextMenu.handle = handle;\r\n$.contextMenu.op = op;\r\n$.contextMenu.menus = menus;\r\n\r\n})(jQuery);\r\n","\r\n\r\n/**\r\n *\r\n * @private\r\n */\r\n/**\r\n * Primary package containing general interfaces and implementation classes.\r\n * @namespace draw2d */\r\nexport default {\r\n /**\r\n * Types representing or manipulating geometric values, such as Points, Rectangles, etc.\r\n * @namespace draw2d.geo\r\n * */\r\n geo: {},\r\n\r\n /** \r\n * Contains classes to load and save Draw2D files into, or from, a Canvas.\r\n * @namespace draw2d.io \r\n **/\r\n io: {\r\n /** @namespace draw2d.io.json\r\n * */\r\n json: {},\r\n /** @namespace draw2d.io.png */\r\n png: {},\r\n /** @namespace draw2d.io.svg */\r\n svg: {}\r\n },\r\n\r\n /** @namespace draw2d.util */\r\n util: {\r\n /** @namespace draw2d.util.spline */\r\n spline: {}\r\n },\r\n\r\n /**\r\n * This package contains EditPolicy implementations for all used elements. A *EditPolicy*\r\n * is a pluggable contribution implementing a portion of an element behavior. Editpolicies contribute to the\r\n * overall editing behavior of an EditPart.\r\n *\r\n * Editing behavior is defined as one or more of the following:\r\n * - Selection handling\r\n * - Routing\r\n * - Feedback management\r\n * - Delegation and Forwarding of commands\r\n * - Drag&Drop behaviour\r\n *\r\n * @namespace draw2d.policy\r\n * */\r\n policy: {\r\n /**\r\n * Editpolicies for selection handling, highlighting, background rendering, snapTo behaviour.\r\n *\r\n * @namespace draw2d.policy.canvas\r\n * */\r\n canvas: {},\r\n /** \r\n * Policies for Connection creation. Like 'ClickPolicy'...creates a connection if you click into the canvas. \r\n * @namespace draw2d.policy.connection \r\n **/\r\n connection: {},\r\n /** @namespace draw2d.policy.line */\r\n line: {},\r\n /** @namespace draw2d.policy.port */\r\n port: {},\r\n /** \r\n * Selection decorations for figures. Movement contrains. Width limitation,...\r\n * @namespace draw2d.policy.figure \r\n **/\r\n figure: {}\r\n },\r\n\r\n /** \r\n * Contains all predefined visual shapes of Draw2D\r\n * \r\n * @namespace draw2d.shape \r\n **/\r\n shape: {\r\n /** \r\n * @namespace draw2d.shape.basic \r\n **/\r\n basic: {},\r\n /** @namespace draw2d.shape.dimetric */\r\n dimetric: {},\r\n /** @namespace draw2d.shape.composite */\r\n composite: {},\r\n /** @namespace draw2d.shape.arrow */\r\n arrow: {},\r\n /** @namespace draw2d.shape.node */\r\n node: {},\r\n /** @namespace draw2d.shape.note */\r\n note: {},\r\n /** @namespace draw2d.shape.diagram */\r\n diagram: {},\r\n /** @namespace draw2d.shape.flowchart */\r\n flowchart: {},\r\n /** @namespace draw2d.shape.analog */\r\n analog: {},\r\n /** @namespace draw2d.shape.icon */\r\n icon: {},\r\n /** @namespace draw2d.shape.layout */\r\n layout: {},\r\n /** @namespace draw2d.shape.pert */\r\n pert: {},\r\n /** @namespace draw2d.shape.state */\r\n state: {},\r\n /** @namespace draw2d.shape.widget */\r\n widget: {}\r\n },\r\n\r\n /** \r\n * The command is what eventually changes the model. Figures are asked for a command for a given request. Commands also help \r\n * determine if the interaction is possible. If there is no command, or it is not executable, the UI will indicate that the \r\n * interaction is not allowed. \r\n * \r\n * All commands (move, drag&drop, insert, remove,....) are stored on top of a CommandStack and available for undo and redo.\r\n * An `draw2d.Canvas` has a single command stack. **Commands must be executed using the command stack rather than directly calling execute.**\r\n * \r\n * @namespace draw2d.command \r\n **/\r\n command: {},\r\n\r\n /** @namespace draw2d.decoration */\r\n decoration: {\r\n /** @namespace draw2d.decoration.connection */\r\n connection: {}\r\n },\r\n\r\n /** @namespace draw2d.layout */\r\n layout: {\r\n /** @namespace draw2d.layout.connection\r\n * @memberof draw2d.layout\r\n * */\r\n connection: {},\r\n /** @namespace draw2d.layout.anchor */\r\n anchor: {},\r\n /** @namespace draw2d.layout.mesh */\r\n mesh: {},\r\n /** @namespace draw2d.layout.locator */\r\n locator: {}\r\n },\r\n\r\n /** @namespace draw2d.ui */\r\n ui: {},\r\n\r\n isTouchDevice: (\r\n //Detect iPhone\r\n (navigator.platform.indexOf(\"iPhone\") != -1) ||\r\n //Detect iPod\r\n (navigator.platform.indexOf(\"iPod\") != -1) ||\r\n //Detect iPad\r\n (navigator.platform.indexOf(\"iPad\") != -1)\r\n )\r\n\r\n}\r\n\r\n\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A plugable contribution implementing a portion of an behavior.\r\n *\r\n *\r\n * EditPolicies should determine an Canvas or figure editing capabilities. It is possible to implement\r\n * an figure such that it handles all editing responsibility. However, it is much more flexible\r\n * and object-oriented to use EditPolicies. Using policies, you can pick and choose the editing\r\n * behavior for an figure/canvas without being bound to its class hierarchy. Code management is easier.\r\n *\r\n *\r\n * This interface is not intended to be implemented by clients. Clients should inherit from {@link draw2d.policy.figure.SelectionFeedbackPolicy}\r\n * or {@link draw2d.policy.canvas.SelectionPolicy}.\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.policy.EditPolicy = Class.extend(\r\n /** @lends draw2d.policy.EditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.EditPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this.setterWhitelist = { ...setter}\r\n this.getterWhitelist = { ...getter}\r\n\r\n this.attr(attr)\r\n },\r\n\r\n /**\r\n * \r\n * Read or set object attributes.<br>\r\n * When no value is given, reads specified attribute from the element.<br>\r\n * When value is given, sets the attribute to that value.\r\n * Multiple attributes can be set by passing an object with name-value pairs.\r\n *\r\n * @param {String/Object} name\r\n * @param {Object} [value]\r\n * @since 5.3.2\r\n * @returns {Object}\r\n **/\r\n attr: function (name, value) {\r\n // call of attr as setter method with {name1:val1, name2:val2 } argument list\r\n //\r\n if ($.isPlainObject(name)) {\r\n for (let key in name) {\r\n let func = this.setterWhitelist[key]\r\n // call the assigned method if given\r\n if (func) {\r\n func.call(this, name[key])\r\n }\r\n // maby the ussser adds a function as property to the attr call\r\n // e.g.:\r\n // {\r\n // doIt: function(){}\r\n // }\r\n //\r\n // in this case we assign the method to this object and wrap it with \"this\" as context\r\n // a very, very simple method to replace default implemenations of the object\r\n else if (typeof name[key] === \"function\") {\r\n this[key] = name[key].bind(this)\r\n }\r\n }\r\n }\r\n else if (typeof name === \"string\") {\r\n // call attr as getter\r\n //\r\n if (typeof value === \"undefined\") {\r\n let getter = this.getterWhitelist[name]\r\n if (typeof getter === \"function\") {\r\n return getter.call(this)\r\n }\r\n return // undefined\r\n }\r\n // call attr as simple setter with (key , value)\r\n //\r\n\r\n // the value can be a function. In this case we must call the value().\r\n if (typeof value === \"function\") {\r\n value = value()\r\n }\r\n let setter = this.setterWhitelist[name]\r\n if (setter) {\r\n setter.call(this, value)\r\n }\r\n }\r\n // generic getter of all registered attributes\r\n else if (typeof name === \"undefined\") {\r\n let result = {}\r\n for (key in this.getterWhitelist) {\r\n result[key] = this.getterWhitelist[key].call(this)\r\n }\r\n return result\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been installed.\r\n *\r\n * @param {draw2d.Canvas|draw2d.Figure} host\r\n */\r\n onInstall: function (host) {\r\n },\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been uninstalled.\r\n *\r\n * @param {draw2d.Canvas|draw2d.Figure} host\r\n */\r\n onUninstall: function (host) {\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.SelectionPolicy\r\n */\r\ndraw2d.policy.canvas.BoundingboxSelectionPolicy = draw2d.policy.canvas.SingleSelectionPolicy.extend(\r\n /** @lends draw2d.policy.canvas.BoundingboxSelectionPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.BoundingboxSelectionPolicy\",\r\n\r\n /**\r\n * Creates a new selection policy for a canvas.\r\n */\r\n init: function () {\r\n this.isInsideMode = (rect1, rect2) => rect1.isInside(rect2)\r\n this.intersectsMode = (rect1, rect2) => rect1.intersects(rect2)\r\n\r\n this.decision = this.isInsideMode\r\n\r\n this._super()\r\n\r\n this.boundingBoxFigure1 = null\r\n this.boundingBoxFigure2 = null\r\n this.x = 0\r\n this.y = 0\r\n\r\n // falls ein Port getroffen wird, dann darf keine BoundingBox gezeichnet werden.\r\n //\r\n this.canDrawBoundingBox = false\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n select: function (canvas, figure) {\r\n if (canvas.getSelection().contains(figure)) {\r\n return // nothing to to\r\n }\r\n\r\n let oldSelection = canvas.getSelection().getPrimary()\r\n\r\n if (figure !== null) {\r\n figure.select(true) // primary selection\r\n }\r\n\r\n if (oldSelection !== figure) {\r\n canvas.getSelection().setPrimary(figure)\r\n\r\n // inform all selection listeners about the new selection.\r\n //\r\n canvas.fireEvent(\"select\", {figure: figure, selection: canvas.getSelection()})\r\n }\r\n\r\n // adding connections to the selection of the source and target port part of the current selection\r\n //\r\n let selection = canvas.getSelection()\r\n canvas.getLines().each((i, line) => {\r\n if (line instanceof draw2d.Connection) {\r\n if (selection.contains(line.getSource().getRoot()) && selection.contains(line.getTarget().getRoot())) {\r\n this.select(canvas, line, false)\r\n }\r\n }\r\n })\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the selection handling mode to <b>intersection</b> or to <b>isInside</b>.\r\n * <ul>\r\n * <li>true = intersection, shapes must only touch the selection bounding box </li>\r\n * <li>false = isInside, shapes must complete inside the selection bounding box (default)</li>\r\n * </ul>\r\n *\r\n * @param {Boolean} useIntersectionMode set true if the selection handle should use the alternative selection approach\r\n * @since 4.9.0\r\n */\r\n setDecisionMode: function (useIntersectionMode) {\r\n if (useIntersectionMode === true) {\r\n this.decision = this.intersectsMode\r\n }\r\n else {\r\n this.decision = this.isInsideMode\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDown: function (canvas, x, y, shiftKey, ctrlKey) {\r\n\r\n try {\r\n this.x = x\r\n this.y = y\r\n\r\n let currentSelection = canvas.getSelection().getAll()\r\n\r\n // COPY_PARENT\r\n // this code part is copied from the parent implementation. The main problem is, that\r\n // the sequence of unselect/select of elements is broken if we call the base implementation\r\n // in this case wrong events are fired if we select a figure if already a figure is selected!\r\n // WRONG: selectNewFigure -> unselectOldFigure\r\n // RIGHT: unselectOldFigure -> selectNewFigure\r\n // To ensure this I must copy the parent code and postbound the event propagation\r\n //\r\n this.mouseMovedDuringMouseDown = false\r\n let canDragStart = true\r\n\r\n this.canDrawBoundingBox = false\r\n\r\n let figure = canvas.getBestFigure(x, y)\r\n\r\n // may the figure is assigned to a composite. In this case the composite can\r\n // override the event receiver\r\n while (figure !== null) {\r\n let delegated = figure.getSelectionAdapter()()\r\n if (delegated === figure) {\r\n break\r\n }\r\n figure = delegated\r\n }\r\n\r\n // ignore ports since version 6.1.0. This is handled by the ConnectionCreatePolicy\r\n //\r\n if (figure instanceof draw2d.Port) {\r\n return// silently\r\n }\r\n\r\n if( figure !==null && figure.isSelectable() === false && figure.isDraggable()===false){\r\n figure=null;\r\n }\r\n\r\n this.canDrawBoundingBox = true\r\n\r\n if (figure !== null && figure.isDraggable()) {\r\n canDragStart = figure.onDragStart(x - figure.getAbsoluteX(), y - figure.getAbsoluteY(), shiftKey, ctrlKey)\r\n // Element send a veto about the drag&drop operation\r\n this.mouseDraggingElement = canDragStart === false ? null : figure\r\n }\r\n\r\n this.mouseDownElement = figure\r\n\r\n this.mouseDownElement?.fireEvent(\"mousedown\",\r\n {\r\n x: x, \r\n y: y, \r\n relX: x - this.mouseDownElement.getAbsoluteX(),\r\n relY: y - this.mouseDownElement.getAbsoluteY(),\r\n shiftKey: \r\n shiftKey, \r\n ctrlKey: ctrlKey\r\n })\r\n\r\n // we click on an element which are not part of the current selection\r\n // => reset the \"old\" current selection if we didn't press the shift key\r\n if (shiftKey === false) {\r\n if (this.mouseDownElement !== null && this.mouseDownElement.isResizeHandle === false && !currentSelection.contains(this.mouseDownElement)) {\r\n currentSelection.each((i, figure) => {\r\n this.unselect(canvas, figure)\r\n })\r\n }\r\n }\r\n\r\n if (figure !== canvas.getSelection().getPrimary() && figure !== null && figure.isSelectable() === true) {\r\n this.select(canvas, figure)\r\n\r\n // its a line\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n // you can move a line with Drag&Drop...but not a connection.\r\n // A Connection is fixed linked with the corresponding ports.\r\n //\r\n if (!(figure instanceof draw2d.Connection)) {\r\n canvas.draggingLineCommand = figure.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE))\r\n if (canvas.draggingLineCommand !== null) {\r\n canvas.draggingLine = figure\r\n }\r\n }\r\n }\r\n else if (canDragStart === false) {\r\n figure.unselect()\r\n }\r\n }\r\n // END_COPY FROM PARENT\r\n\r\n\r\n // inform all figures that they have a new ox/oy position for the relative\r\n // drag/drop operation\r\n if (this.mouseDownElement !== null && this.mouseDownElement.isResizeHandle === false) {\r\n currentSelection = canvas.getSelection().getAll()\r\n currentSelection.each((i, figure) => {\r\n let fakeDragX = 1\r\n let fakeDragY = 1\r\n\r\n let handleRect = figure.getHandleBBox()\r\n if (handleRect !== null) {\r\n handleRect.translate(figure.getAbsolutePosition().scale(-1))\r\n fakeDragX = handleRect.x + 1\r\n fakeDragY = handleRect.y + 1\r\n }\r\n\r\n let canDragStart = figure.onDragStart(fakeDragX, fakeDragY, shiftKey, ctrlKey, true /*fakeFlag*/)\r\n // its a line\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n // no special handling\r\n }\r\n else if (canDragStart === false) {\r\n this.unselect(canvas, figure)\r\n }\r\n })\r\n }\r\n }\r\n catch (exc) {\r\n console.log(exc)\r\n throw exc\r\n }\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n // don't drag a selection box if we drag&drop a port\r\n //\r\n if (this.canDrawBoundingBox === false) {\r\n return\r\n }\r\n\r\n try {\r\n this._super(canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n\r\n if (this.mouseDraggingElement === null && this.mouseDownElement === null && this.boundingBoxFigure1 === null) {\r\n this.boundingBoxFigure1 = new draw2d.shape.basic.Rectangle({\r\n width: 1,\r\n height: 1,\r\n x: this.x,\r\n y: this.y,\r\n bgColor: \"#d4d1d4\",\r\n alpha: 0.1\r\n })\r\n this.boundingBoxFigure1.setCanvas(canvas)\r\n\r\n this.boundingBoxFigure2 = new draw2d.shape.basic.Rectangle({\r\n width: 1,\r\n height: 1,\r\n x: this.x,\r\n y: this.y,\r\n dash: \"--..\",\r\n stroke: 0.5,\r\n color: \"#37a8ff\",\r\n bgColor: null\r\n })\r\n this.boundingBoxFigure2.setCanvas(canvas)\r\n }\r\n let abs = Math.abs\r\n let min = Math.min\r\n if (this.boundingBoxFigure1 !== null) {\r\n this.boundingBoxFigure1.setDimension(abs(dx), abs(dy))\r\n this.boundingBoxFigure1.setPosition(this.x + min(0, dx), this.y + min(0, dy))\r\n this.boundingBoxFigure2.setDimension(abs(dx), abs(dy))\r\n this.boundingBoxFigure2.setPosition(this.x + min(0, dx), this.y + min(0, dy))\r\n }\r\n }\r\n catch (exc) {\r\n console.log(exc)\r\n }\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (canvas, x, y, shiftKey, ctrlKey) {\r\n try {\r\n // delete the current selection if you have clicked in the empty\r\n // canvas.\r\n if (this.mouseDownElement === null) {\r\n canvas.getSelection().getAll().each((i, figure) => {\r\n this.unselect(canvas, figure)\r\n })\r\n }\r\n else if (this.mouseDownElement instanceof draw2d.ResizeHandle || (this.mouseDownElement instanceof draw2d.shape.basic.LineResizeHandle)) {\r\n // Do nothing\r\n // A click on a resize handle didn't change the selection of the canvas\r\n //\r\n }\r\n // delete the current selection if you click on another figure than the current\r\n // selection and you didn't drag the complete selection.\r\n else if (this.mouseDownElement !== null && this.mouseMovedDuringMouseDown === false) {\r\n let sel = canvas.getSelection().getAll()\r\n if (!sel.contains(this.mouseDownElement)) {\r\n canvas.getSelection().getAll().each((i, figure) => {\r\n this.unselect(canvas, figure)\r\n })\r\n }\r\n }\r\n this._super(canvas, x, y, shiftKey, ctrlKey)\r\n\r\n if (this.boundingBoxFigure1 !== null) {\r\n // retrieve all figures which are inside the bounding box and select all of them\r\n //\r\n let selectionRect = this.boundingBoxFigure1.getBoundingBox()\r\n canvas.getFigures().each((i, figure) => {\r\n if (figure.isSelectable() === true && figure.isVisible()===true && this.decision(figure.getBoundingBox(), selectionRect)) {\r\n let fakeDragX = 1\r\n let fakeDragY = 1\r\n\r\n let handleRect = figure.getHandleBBox()\r\n if (handleRect !== null) {\r\n handleRect.translate(figure.getAbsolutePosition().scale(-1))\r\n fakeDragX = handleRect.x + 1\r\n fakeDragY = handleRect.y + 1\r\n }\r\n let canDragStart = figure.onDragStart(fakeDragX, fakeDragY, shiftKey, ctrlKey)\r\n if (canDragStart === true) {\r\n this.select(canvas, figure)\r\n }\r\n }\r\n })\r\n\r\n this.boundingBoxFigure1.setCanvas(null)\r\n this.boundingBoxFigure1 = null\r\n this.boundingBoxFigure2.setCanvas(null)\r\n this.boundingBoxFigure2 = null\r\n }\r\n }\r\n catch (exc) {\r\n console.log(exc)\r\n debugger\r\n }\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\nimport Color from '../../util/Color'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.EditPolicy\r\n */\r\ndraw2d.policy.canvas.CanvasPolicy = draw2d.policy.EditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.CanvasPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.CanvasPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this.canvas = null\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Called if the policy is installed into the canvas.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n */\r\n onInstall: function (canvas) {\r\n this.canvas = canvas\r\n },\r\n\r\n /**\r\n *\r\n * Called if the policy is deinstalled from the canvas\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n */\r\n onUninstall: function (canvas) {\r\n this.canvas = null\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseMove: function (canvas, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDown: function (canvas, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas the shape below the mouse or null\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (canvas, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the user press the right mouse in the canvas.\r\n *\r\n * @param {draw2d.Figure|draw2d.shape.basic.Line} figure the figure below the mouse\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @since 4.4.0\r\n */\r\n onRightMouseDown: function (figure, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the canvas if the user click on a figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure under the click event. Can be null\r\n * @param {Number} mouseX the x coordinate of the mouse during the click event\r\n * @param {Number} mouseY the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 3.0.0\r\n *\r\n * @template\r\n */\r\n onClick: function (figure, mouseX, mouseY, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n * Called by the canvas if the user double click on a figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure under the double click event. Can be null\r\n * @param {Number} mouseX the x coordinate of the mouse during the click event\r\n * @param {Number} mouseY the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 4.1.0\r\n *\r\n * @template\r\n */\r\n onDoubleClick: function (figure, mouseX, mouseY, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n * called if the user uses the mouse wheel.\r\n *\r\n *\r\n * @param {Number} wheelDelta\r\n * @param {Number} x the x coordinate of the event\r\n * @param {Number} y the y coordinate of the event\r\n * @param shiftKey\r\n * @param ctrlKey\r\n * @since 5.8.0\r\n * @template\r\n *\r\n * @returns {Boolean} return <b>false</b> to preven tthe default event operation (e.g. scrolling)\r\n */\r\n onMouseWheel: function (wheelDelta, x, y, shiftKey, ctrlKey) {\r\n // return \"false\" to prevent the default event operation\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Helper method to make an monochrome GIF image WxH pixels big, first create a properly sized array: let pixels = new Array(W*H);.\r\n * Then, for each pixel X,Y that should be opaque, store a 1 at the proper location: pixels[X+Y*W] = 1;.\r\n * Finally, create the image: let my_gif = createGif(W, H, pixels, color);\r\n * \"0\" pixels are transparent.\r\n * The <b>color</b> defines the foreground color.\r\n *\r\n * Now, you can specify this image as the SRC attribute of an IMG tag: document.write(\"<IMG SRC=\\\"\" + my_gif + \"\\\">\");\r\n * or for the canvas as background-image css attribute.\r\n *\r\n *\r\n * @param w\r\n * @param h\r\n * @param d\r\n * @param color\r\n * @returns {String}\r\n *\r\n * @private\r\n */\r\n createMonochromGif: function (w, h, d, color) {\r\n color = new Color(color)\r\n let r = String.fromCharCode(w % 256) + String.fromCharCode(w / 256) + String.fromCharCode(h % 256) + String.fromCharCode(h / 256)\r\n\r\n let gif = 'GIF89a' + r + '\\xf0\\0\\0\\xff\\xff\\xff' + String.fromCharCode(color.red) + String.fromCharCode(color.green) + String.fromCharCode(color.blue) + '\\x21\\xf9\\u{4}\\u{1}\\0\\0\\0,\\0\\0\\0\\0' + r + '\\0\\u{2}'\r\n\r\n // help method to generate uncompressed in memory GIF data structure without the usage of a canvas or any other\r\n // heavy weight stuff.\r\n let b = {\r\n bit: 1,\r\n byte_: 0,\r\n data: '',\r\n\r\n writeBit: function (b) {\r\n if (b) this.byte_ |= this.bit\r\n this.bit <<= 1\r\n if (this.bit === 256) {\r\n this.bit = 1\r\n this.data += String.fromCharCode(this.byte_)\r\n this.byte_ = 0\r\n }\r\n },\r\n\r\n get: function () {\r\n let result = \"\"\r\n let data = this.data\r\n if (this.bit !== 1) {\r\n data += String.fromCharCode(this.byte_)\r\n }\r\n for (let i = 0; i < data.length + 1; i += 255) {\r\n let chunklen = data.length - i\r\n if (chunklen < 0) chunklen = 0\r\n if (chunklen > 255) chunklen = 255\r\n result += String.fromCharCode(chunklen) + data.substring(i, i + 255)\r\n }\r\n return result + \"\\0\"\r\n }\r\n }\r\n\r\n for (let y = 0; y < h; y++) {\r\n for (let x = 0; x < w; x++) {\r\n b.writeBit(d[x + w * y])\r\n b.writeBit(0)\r\n b.writeBit(0)\r\n b.writeBit(0)\r\n b.writeBit(0)\r\n b.writeBit(1)\r\n }\r\n }\r\n gif += b.get() + ';'\r\n\r\n return 'data:image/gif;base64,' + draw2d.util.Base64.encode(gif)\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * This decorations hides draw2d.Ports which are to far from the current cursor position.\r\n * This makes the canvas more clean if you have a lot of nodes on it.<br>\r\n * You didn't see a bunch of ports.\r\n *\r\n *\r\n * @example\r\n *\r\n * // install the policy to the canvas\r\n *\r\n * // add some demo figure to the canvas\r\n * canvas.add(new draw2d.shape.node.Start({x: 10, y: 30}));\r\n * canvas.add(new draw2d.shape.node.End({x: 90, y: 90}));\r\n * canvas.add(new draw2d.shape.node.Between({ x: 310, y: 30}));\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"move the mouse and you see that ports are hidden if the mouse far from it\"}),5,5);\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.CoronaDecorationPolicy());\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n */\r\ndraw2d.policy.canvas.CoronaDecorationPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.CoronaDecorationPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.CoronaDecorationPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.startDragX = 0\r\n this.startDragY = 0\r\n this.diameterToBeFullVisible = 0\r\n this.diameterToBeVisible = 0\r\n this.sumDiameter = 0\r\n\r\n this._super(\r\n {\r\n diameterToBeVisible: 200, \r\n diameterToBeFullVisible: 20,\r\n ...attr\r\n },\r\n {\r\n diameterToBeVisible: this.setDiameterToBeVisible,\r\n diameterToBeFullVisible: this.setDiameterToBeFullVisible,\r\n ...setter},\r\n\r\n {\r\n diameterToBeVisible: this.getDiameterToBeVisible,\r\n diameterToBeFullVisible: this.getDiameterToBeFullVisible,\r\n ...getter}\r\n )\r\n },\r\n\r\n setDiameterToBeVisible: function (diameter) {\r\n this.diameterToBeVisible = diameter\r\n this.sumDiameter = this.diameterToBeFullVisible + this.diameterToBeVisible\r\n },\r\n\r\n getDiameterToBeVisible: function () {\r\n return this.diameterToBeVisible\r\n },\r\n\r\n setDiameterToBeFullVisible: function (diameter) {\r\n this.diameterToBeFullVisible = diameter\r\n this.sumDiameter = this.diameterToBeFullVisible + this.diameterToBeVisible\r\n },\r\n\r\n getDiameterToBeFullVisible: function () {\r\n return this.diameterToBeFullVisible\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n canvas.getFigures().each((i, figure) => {\r\n figure.getPorts().each((i, p) => p.setAlpha(0.0))\r\n })\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n\r\n canvas.getFigures().each(function (i, figure) {\r\n figure.getPorts().each(function (i, p) {\r\n if (p.__origAlpha) {\r\n p.setAlpha(p.__origAlpha)\r\n delete p.__origAlpha\r\n }\r\n })\r\n })\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onMouseDown: function (canvas, x, y, shiftKey, ctrlKey) {\r\n this.startDragX = x\r\n this.startDragY = y\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onMouseMove: function (canvas, x, y, shiftKey, ctrlKey) {\r\n this.updatePorts(canvas, x, y)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n this.updatePorts(canvas, this.startDragX + dx, this.startDragY + dy)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Update all ports with the new calculated opacity in relation to the distance to the current\r\n * mouse position\r\n *\r\n * @param canvas\r\n * @param x\r\n * @param y\r\n * @private\r\n */\r\n updatePorts: function (canvas, x, y) {\r\n canvas.getFigures().each((i, figure) => {\r\n if (figure instanceof draw2d.shape.node.Node) {\r\n if (figure.isVisible() === true && figure.hitTest(x, y, this.sumDiameter) === true) {\r\n figure.getPorts().each((i, p) => {\r\n if (p.isVisible() === false) {\r\n p.__origAlpha = figure.getAlpha()\r\n }\r\n let dist = figure.getBoundingBox().getDistance(new draw2d.geo.Point(x, y))\r\n let alpha = Math.max(0, (1 - (((100 / (this.diameterToBeVisible - this.diameterToBeFullVisible)) * dist) / 100.0)))\r\n p.setAlpha(alpha)\r\n })\r\n }\r\n else {\r\n figure.getPorts().each((i, p) => {\r\n p.setAlpha(0.0)\r\n })\r\n }\r\n }\r\n })\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * The base class for any canvas decoration like grid, chessboard, graph paper or\r\n * other.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n */\r\ndraw2d.policy.canvas.DecorationPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.DecorationPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.DecorationPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n }\r\n\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Standard keyboard policy. This is the standard installed keyboard policy.\r\n * <br>\r\n * <br>\r\n * Keyboard commands\r\n * <ul>\r\n * <li>DEL - delete selection</li>\r\n * </ul>\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.KeyboardPolicy\r\n */\r\ndraw2d.policy.canvas.DefaultKeyboardPolicy = draw2d.policy.canvas.KeyboardPolicy.extend(\r\n /** @lends draw2d.policy.canvas.DefaultKeyboardPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.DefaultKeyboardPolicy\",\r\n\r\n /**\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user press a key.<br>\r\n * This implementation checks only if the <b>DEL</b> has been pressed and creates an\r\n * CommandDelete if this happens.\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onKeyDown: function (canvas, keyCode, shiftKey, ctrlKey) {\r\n //\r\n if (keyCode === 46 && canvas.getPrimarySelection() !== null) {\r\n // create a single undo/redo transaction if the user delete more than one element. \r\n // This happens with command stack transactions.\r\n //\r\n canvas.getCommandStack().startTransaction(draw2d.Configuration.i18n.command.deleteShape)\r\n let selection = canvas.getSelection()\r\n selection.each(function (index, figure) {\r\n // don't delete a connection if the source or target figure is part of the selection.\r\n // In this case the connection is deleted by the DeleteCommand itself and it is not allowed to\r\n // delete a figure twice.\r\n //\r\n if (figure instanceof draw2d.Connection) {\r\n if (selection.contains(figure.getSource(), true)) {\r\n return\r\n }\r\n if (selection.contains(figure.getTarget(), true)) {\r\n return\r\n }\r\n }\r\n let cmd = figure.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.DELETE))\r\n if (cmd !== null) {\r\n canvas.getCommandStack().execute(cmd)\r\n }\r\n })\r\n // execute all single commands at once.\r\n canvas.getCommandStack().commitTransaction()\r\n }\r\n else {\r\n this._super(canvas, keyCode, shiftKey, ctrlKey)\r\n }\r\n\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Drop interceptors are basically event handlers from which you can return a value\r\n * that tells draw2d to abort what it is that it was doing.<br>\r\n * <br>\r\n * Interceptors can be registered via the registerEditPolicy method on the draw2d canvas just like any other\r\n * edit policies.<br>\r\n * <br>\r\n * The <b>delegateTarget</b> method is responsible for all drop event especially to all connection and port handling.\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n * @since 5.0.0\r\n */\r\ndraw2d.policy.canvas.DropInterceptorPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.DropInterceptorPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.canvas.DropInterceptorPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called if the user want connect a port with any kind draw2d.Figure.<br>\r\n * Return a non <b>null</b> value if the interceptor accept the connect event.<br>\r\n * <br>\r\n * It is possible to delegate the drop event to another figure if the policy\r\n * returns another figure. This is useful if a figure want to accept a port\r\n * drop event and delegates this drop event to another port.<br>\r\n *\r\n *\r\n * @param {draw2d.Figure} connectInquirer the figure who wants connect\r\n * @param {draw2d.Figure} connectIntent the potential connect target\r\n *\r\n * @returns {draw2d.Figure} the calculated connect intent or <b>null</b> if the interceptor uses the veto right\r\n */\r\n delegateTarget: function (connectInquirer, connectIntent) {\r\n\r\n // a composite accept any kind of figures exceptional ports\r\n //\r\n if (!(connectInquirer instanceof draw2d.Port) && connectIntent instanceof draw2d.shape.composite.StrongComposite) {\r\n return connectIntent\r\n }\r\n\r\n // Ports accepts only Ports from the same semanticGroup as DropTarget\r\n //\r\n if ((connectIntent instanceof draw2d.Port) && (connectInquirer instanceof draw2d.Port)) {\r\n if(connectIntent.getSemanticGroup() !== connectInquirer.getSemanticGroup()) {\r\n return null\r\n }\r\n }\r\n\r\n // Ports accepts only Ports as DropTarget\r\n //\r\n if (!(connectIntent instanceof draw2d.Port) || !(connectInquirer instanceof draw2d.Port)) {\r\n return null\r\n }\r\n\r\n // ////////////////////////////////////////////////////////////\r\n // at this stage we a sure, that we have two ports as argument\r\n // ////////////////////////////////////////////////////////////\r\n\r\n // It is not possible to create a loop back connection at the moment.\r\n // Reason: no connection router implemented for this case\r\n if (connectInquirer.getParent() === connectIntent.getParent()) {\r\n return null\r\n }\r\n\r\n // It is not allowed to connect two output ports\r\n if (connectInquirer instanceof draw2d.OutputPort && connectIntent instanceof draw2d.OutputPort) {\r\n return null\r\n }\r\n\r\n // It is not allowed to connect two input ports\r\n if (connectInquirer instanceof draw2d.InputPort && connectIntent instanceof draw2d.InputPort) {\r\n return null\r\n }\r\n\r\n\r\n // redirect the dragEnter handling to the hybrid port\r\n //\r\n if ((connectIntent.getParent() instanceof draw2d.shape.node.Hub)) {\r\n\r\n let inputConnections = connectIntent.getConnections().asArray().filter( con => (con.getPeerPort(connectIntent) instanceof draw2d.OutputPort))\r\n let outputConnections = connectIntent.getConnections().asArray().filter( con => (con.getPeerPort(connectIntent) instanceof draw2d.InputPort))\r\n\r\n if (connectInquirer instanceof draw2d.InputPort && outputConnections.length >= connectIntent.getMaxFanOut()) {\r\n return null\r\n }\r\n\r\n if (connectInquirer instanceof draw2d.OutputPort && inputConnections.length >= connectIntent.getMaxFanIn()) {\r\n return null\r\n }\r\n\r\n if (connectInquirer instanceof draw2d.HybridPort && inputConnections.length >= connectIntent.getMaxFanIn()) {\r\n return null\r\n }\r\n\r\n return connectIntent\r\n } \r\n\r\n return connectIntent\r\n\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Extended keyboard policy to <b>delete</b> and <b>group</b> figures in the canvas.\r\n * <br>\r\n * Keyboard commands\r\n * <ul>\r\n * <li>DEL - delete selection</li>\r\n * <li>Ctrl+G - group/ungroup selection</li>\r\n * <li>Ctrl+B - send current selection in the background (toBack)</li>\r\n * <li>Ctrl+F - send current selection in the foreground (toFront)</li>\r\n * </ul>\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.KeyboardPolicy\r\n */\r\ndraw2d.policy.canvas.ExtendedKeyboardPolicy = draw2d.policy.canvas.KeyboardPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ExtendedKeyboardPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.ExtendedKeyboardPolicy\",\r\n\r\n /**\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user press a key\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onKeyDown: function (canvas, keyCode, shiftKey, ctrlKey) {\r\n if (canvas.getPrimarySelection() !== null && ctrlKey === true) {\r\n switch (keyCode) {\r\n\r\n case 71: // G\r\n if (canvas.getPrimarySelection() instanceof draw2d.shape.composite.Group && canvas.getSelection().getSize() === 1) {\r\n canvas.getCommandStack().execute(new draw2d.command.CommandUngroup(canvas, canvas.getPrimarySelection()))\r\n }\r\n else {\r\n canvas.getCommandStack().execute(new draw2d.command.CommandGroup(canvas, canvas.getSelection()))\r\n }\r\n break\r\n case 66: // B\r\n canvas.getPrimarySelection().toBack()\r\n break\r\n case 70: // F\r\n canvas.getPrimarySelection().toFront()\r\n }\r\n }\r\n else {\r\n this._super(canvas, keyCode, shiftKey, ctrlKey)\r\n }\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Install this edit policy in a canvas if you want fadeout all decorations like ports, resize handles\r\n * if the user didn't move the mouse. This is good for a clean representation of your diagram.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n */\r\ndraw2d.policy.canvas.FadeoutDecorationPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.FadeoutDecorationPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.FadeoutDecorationPolicy\",\r\n\r\n DEFAULT_FADEOUT_DURATION: 60,\r\n DEFAULT_ALPHA_DECREMENT: 0.05,\r\n\r\n /**\r\n * Creates a new fade out policy. Don't forget to install them into the canvas.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n this.alpha = 1.0\r\n this.alphaDec = this.DEFAULT_ALPHA_DECREMENT\r\n this.hidePortsCounter = this.DEFAULT_FADEOUT_DURATION\r\n this.portDragging = false\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n **/\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n this.timerId = window.setInterval(this.onTimer.bind(this), 50)\r\n\r\n // initial hide all decorations after install of this policy\r\n //\r\n this.hidePortsCounter = 1\r\n this.alpha = 0.1\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n **/\r\n onUninstall: function (canvas) {\r\n window.clearInterval(this.timerId)\r\n this.canvas.getAllPorts().each(function (i, port) {\r\n port.setAlpha(1.0)\r\n })\r\n\r\n this._super(canvas)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Timerfucntion to show/hide the related ports\r\n * @private\r\n **/\r\n onTimer: function () {\r\n this.hidePortsCounter--\r\n\r\n if (this.hidePortsCounter <= 0 && this.alpha > 0) {\r\n this.alpha = Math.max(0, this.alpha - this.alphaDec)\r\n\r\n this.canvas.getAllPorts().each((i, port) => {\r\n port.setAlpha(this.alpha)\r\n })\r\n\r\n this.canvas.getSelection().getAll().each((i, figure) => {\r\n figure.selectionHandles.each((i, handle) => {\r\n handle.setAlpha(this.alpha)\r\n })\r\n })\r\n } else if (this.hidePortsCounter > 0 && this.alpha !== 1.0) {\r\n this.alpha = 1// Math.min(1,this.alpha+0.1);\r\n this.alphaDec = this.DEFAULT_ALPHA_DECREMENT\r\n this.duringHide = false\r\n this.canvas.getAllPorts().each((i, port) => {\r\n port.setAlpha(this.alpha)\r\n })\r\n this.canvas.getSelection().getAll().each((i, figure) => {\r\n figure.selectionHandles.each((i, handle) => {\r\n handle.setAlpha(this.alpha)\r\n })\r\n })\r\n }\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDown: function (canvas, x, y, shiftKey, ctrlKey) {\r\n this.hidePortsCounter = this.DEFAULT_FADEOUT_DURATION\r\n this.portDragging = (canvas.getBestFigure(x, y) instanceof draw2d.Port)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseMove: function (canvas, x, y, shiftKey, ctrlKey) {\r\n this.hidePortsCounter = this.DEFAULT_FADEOUT_DURATION\r\n this.portDragging = false\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n if (this.portDragging === false) {\r\n this.hidePortsCounter = 0\r\n this.alphaDec = 0.1\r\n this.onTimer()\r\n }\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (figure, x, y, shiftKey, ctrlKey) {\r\n this.hidePortsCounter = this.DEFAULT_FADEOUT_DURATION\r\n this.portDragging = false\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A drag&Drop feedback handler for the canvas. The policy didn't move the\r\n * shapes in real time rather it shows a ghost rectangle as feedback. <br>\r\n * <br>\r\n * The shapes are updated after the drag&drop operation.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // install the policy to the canvas\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.GhostMoveSelectionPolicy());\r\n *\r\n * // add some demo figure to the canvas\r\n * canvas.add(new draw2d.shape.basic.Circle({diameter: 50, x: 10, y: 30}));\r\n * canvas.add(new draw2d.shape.basic.Circle({diameter: 30, x: 90, y: 50}));\r\n * canvas.add(new draw2d.shape.basic.Circle({diameter: 60, x: 110, y: 30}));\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"move the circle to see the drag&drop feedback\"}),5,5);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.SingleSelectionPolicy\r\n */\r\ndraw2d.policy.canvas.GhostMoveSelectionPolicy = draw2d.policy.canvas.SingleSelectionPolicy.extend(\r\n /** @lends draw2d.policy.canvas.GhostMoveSelectionPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.GhostMoveSelectionPolicy\",\r\n\r\n /**\r\n */\r\n init: function () {\r\n this.clone = null\r\n this.ghostRectangle1 = null\r\n this.ghostRectangle2 = null\r\n\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n this.mouseMovedDuringMouseDown = true\r\n if (this.mouseDraggingElement !== null) {\r\n\r\n // if the figure not part of the selection it must be a ResizeHandle...\r\n let sel = canvas.getSelection().getAll()\r\n if (!sel.contains(this.mouseDraggingElement)) {\r\n this.mouseDraggingElement.onDrag(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n }\r\n // it is a normal draw2d.Figure\r\n else {\r\n // create the ghost handles for the figure to move and update the position\r\n //\r\n if (this.ghostRectangle1 === null) {\r\n this.ghostRectangle1 = new draw2d.shape.basic.Rectangle(/*{bgColor:\"#303030\", alpha:0.1}*/) // new API with version 5.0.0\r\n // old API\r\n this.ghostRectangle1.setBackgroundColor(\"#303030\")\r\n this.ghostRectangle1.setAlpha(0.1)\r\n\r\n this.ghostRectangle2 = new draw2d.shape.basic.Rectangle(/*{dash:\"- \", stroke:1, color:\"#5497DC\", bgColor:null}*/)\r\n this.ghostRectangle2.setDashArray(\"- \")\r\n this.ghostRectangle2.setStroke(1)\r\n this.ghostRectangle2.setColor(\"#5497DC\")\r\n this.ghostRectangle2.setBackgroundColor(null)\r\n\r\n this.ghostRectangle1.setBoundingBox(this.mouseDraggingElement.getBoundingBox())\r\n this.ghostRectangle2.setBoundingBox(this.mouseDraggingElement.getBoundingBox())\r\n\r\n this.ghostRectangle1.setCanvas(canvas)\r\n this.ghostRectangle1.toFront()\r\n\r\n this.ghostRectangle2.setCanvas(canvas)\r\n this.ghostRectangle2.toFront()\r\n\r\n this.clone = this.mouseDraggingElement.clone()\r\n if (this.clone instanceof draw2d.shape.node.Node) {\r\n this.clone.resetPorts()\r\n }\r\n this.clone.setCanvas(canvas)\r\n this.clone.getShapeElement()\r\n this.clone.setAlpha(0.4)\r\n this.clone.repaint()\r\n }\r\n else {\r\n this.ghostRectangle1.translate(dx2, dy2)\r\n this.ghostRectangle2.translate(dx2, dy2)\r\n this.clone.translate(dx2, dy2)\r\n }\r\n\r\n sel.each(function (i, figure) {\r\n // store the new location in a tmp var.\r\n figure._newPos = new draw2d.geo.Point(figure.ox + dx, figure.oy + dy)\r\n\r\n // don't move the figure. This will be done in the MouseUp event\r\n //figure.onDrag(dx, dy, dx2, dy2);\r\n })\r\n }\r\n\r\n let p = canvas.fromDocumentToCanvasCoordinate(canvas.mouseDownX + (dx / canvas.zoomFactor), canvas.mouseDownY + (dy / canvas.zoomFactor))\r\n let target = canvas.getBestFigure(p.x, p.y, this.mouseDraggingElement)\r\n\r\n if (target !== canvas.currentDropTarget) {\r\n if (canvas.currentDropTarget !== null) {\r\n canvas.currentDropTarget.onDragLeave(this.mouseDraggingElement)\r\n canvas.currentDropTarget.fireEvent(\"dragLeave\", {draggingElement: this.draggingElement})\r\n canvas.currentDropTarget = null\r\n }\r\n if (target !== null) {\r\n canvas.currentDropTarget = target.delegateTarget(this.mouseDraggingElement)\r\n // inform all listener that the element has accept a dropEnter event\r\n if (canvas.currentDropTarget !== null) {\r\n canvas.currentDropTarget.onDragEnter(this.mouseDraggingElement) // legacy\r\n canvas.currentDropTarget.fireEvent(\"dragEnter\", {draggingElement: this.draggingElement})\r\n }\r\n }\r\n }\r\n }\r\n // Connection didn't support panning at the moment. There is no special reason for that. Just an interaction\r\n // decision.\r\n //\r\n else if (this.mouseDownElement !== null && !(this.mouseDownElement instanceof draw2d.Connection)) {\r\n if (this.mouseDownElement.panningDelegate !== null) {\r\n this.mouseDownElement.panningDelegate.fireEvent(\"panning\", {\r\n dx: dx,\r\n dy: dy,\r\n dx2: dx2,\r\n dy2: dy2,\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n this.mouseDownElement.panningDelegate.onPanning(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n }\r\n else {\r\n this.mouseDownElement.fireEvent(\"panning\", {\r\n dx: dx,\r\n dy: dy,\r\n dx2: dx2,\r\n dy2: dy2,\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n this.mouseDownElement.onPanning(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onMouseUp: function (canvas, x, y, shiftKey, ctrlKey) {\r\n\r\n if (this.ghostRectangle1 !== null) {\r\n this.ghostRectangle1.setCanvas(null)\r\n this.ghostRectangle1 = null\r\n this.ghostRectangle2.setCanvas(null)\r\n this.ghostRectangle2 = null\r\n this.clone.setCanvas(null)\r\n this.clone = null\r\n }\r\n\r\n if (this.mouseDraggingElement !== null) {\r\n let redrawConnection = new draw2d.util.ArrayList()\r\n if (this.mouseDraggingElement instanceof draw2d.shape.node.Node) {\r\n canvas.lineIntersections.each(function (i, inter) {\r\n if (!redrawConnection.contains(inter.line)) redrawConnection.add(inter.line)\r\n if (!redrawConnection.contains(inter.other)) redrawConnection.add(inter.other)\r\n })\r\n }\r\n\r\n\r\n // start CommandStack transaction\r\n // Trigger an update of the connections if we have move a draw2d.shape.node.Node figure.\r\n // (only \"nodes\" can have ports and connections)\r\n //\r\n canvas.getCommandStack().startTransaction()\r\n\r\n\r\n let sel = canvas.getSelection().getAll()\r\n // We move a resize handle...\r\n //\r\n if (!sel.contains(this.mouseDraggingElement)) {\r\n this.mouseDraggingElement.onDragEnd(x, y, shiftKey, ctrlKey)\r\n }\r\n // ... or a real figure.\r\n //\r\n else {\r\n canvas.getSelection().getAll().each(function (i, figure) {\r\n // set position and cleanup tmp variable\r\n if (figure._newPos) {\r\n figure.setPosition(figure._newPos)\r\n delete figure._newPos\r\n }\r\n // done\r\n figure.onDragEnd(x, y, shiftKey, ctrlKey)\r\n })\r\n }\r\n\r\n // May we drop the figure onto another shape..handle this here\r\n //\r\n if (canvas.currentDropTarget !== null && !this.mouseDraggingElement.isResizeHandle) {\r\n this.mouseDraggingElement.onDrop(canvas.currentDropTarget, x, y, shiftKey, ctrlKey)\r\n canvas.currentDropTarget.onDragLeave(this.mouseDraggingElement)\r\n canvas.currentDropTarget.onCatch(this.mouseDraggingElement, x, y, shiftKey, ctrlKey)\r\n canvas.currentDropTarget = null\r\n }\r\n\r\n // end command stack trans\r\n canvas.getCommandStack().commitTransaction()\r\n\r\n if (this.mouseDraggingElement instanceof draw2d.shape.node.Node) {\r\n canvas.lineIntersections.each((i, inter) => {\r\n if (!redrawConnection.contains(inter.line)) redrawConnection.add(inter.line)\r\n if (!redrawConnection.contains(inter.other)) redrawConnection.add(inter.other)\r\n })\r\n redrawConnection.each((i, line) => {\r\n line.svgPathString = null\r\n line.repaint()\r\n })\r\n }\r\n\r\n this.mouseDraggingElement = null\r\n }\r\n\r\n // Reset the current selection if the user click in the blank canvas.\r\n // Don't reset the selection if the user is panning the canvas\r\n //\r\n if (this.mouseDownElement === null && this.mouseMovedDuringMouseDown === false) {\r\n this.select(canvas, null)\r\n }\r\n\r\n this.mouseDownElement = null\r\n this.mouseMovedDuringMouseDown = false\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Default interface for keyboard interaction with the canvas.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n */\r\ndraw2d.policy.canvas.KeyboardPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.KeyboardPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.KeyboardPolicy\",\r\n\r\n /**\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user release a key\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onKeyUp: function (canvas, keyCode, shiftKey, ctrlKey) {\r\n // do nothing per default\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user press a key down\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onKeyDown: function (canvas, keyCode, shiftKey, ctrlKey) {\r\n // do nothing per default\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.SingleSelectionPolicy\r\n */\r\ndraw2d.policy.canvas.PanningSelectionPolicy = draw2d.policy.canvas.SingleSelectionPolicy.extend(\r\n /** @lends draw2d.policy.canvas.PanningSelectionPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.PanningSelectionPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n this._super(canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n\r\n if (this.mouseDraggingElement === null && this.mouseDownElement === null) {\r\n\r\n // check if we are dragging a port. This isn't reported by the selection handler anymore\r\n //\r\n let p = canvas.fromDocumentToCanvasCoordinate(canvas.mouseDownX + (dx / canvas.zoomFactor), canvas.mouseDownY + (dy / canvas.zoomFactor))\r\n let figure = canvas.getBestFigure(p.x, p.y)\r\n\r\n if (figure === null) {\r\n let area = canvas.getScrollArea()\r\n area.scrollTop(area.scrollTop() - dy2)\r\n area.scrollLeft(area.scrollLeft() - dx2)\r\n }\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.SelectionPolicy\r\n */\r\ndraw2d.policy.canvas.ReadOnlySelectionPolicy = draw2d.policy.canvas.SelectionPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ReadOnlySelectionPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.canvas.ReadOnlySelectionPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been installed.\r\n *\r\n * @param {draw2d.Canvas/draw2d.Canvas} canvas\r\n */\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n canvas.getAllPorts().each(function (i, port) {\r\n port.setVisible(false)\r\n })\r\n },\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been uninstalled.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n */\r\n onUninstall: function (canvas) {\r\n canvas.getAllPorts().each(function (i, port) {\r\n port.setVisible(true)\r\n })\r\n\r\n this._super(canvas)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n let area = canvas.getScrollArea()\r\n area.scrollTop(area.scrollTop() - dy2)\r\n area.scrollLeft(area.scrollLeft() - dx2)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n */\r\ndraw2d.policy.canvas.SelectionPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SelectionPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SelectionPolicy\",\r\n\r\n /**\r\n * Creates a new selection policy\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Selects the given figure within the canvas. The policy must unselect already selected\r\n * figures or show any decorations.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {draw2d.Figure} figure\r\n *\r\n */\r\n select: function (canvas, figure) {\r\n },\r\n\r\n /**\r\n *\r\n * Unselect the given figure in the canvas and remove all resize handles\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {draw2d.Figure} figure\r\n */\r\n unselect: function (canvas, figure) {\r\n canvas.getSelection().remove(figure)\r\n\r\n figure.unselect()\r\n\r\n // @since 6.1.42\r\n canvas.fireEvent(\"unselect\", {figure: figure})\r\n }\r\n})\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Just to paint a grid in the background of a canvas.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.ShowChessboardEditPolicy());\r\n * let shape = new draw2d.shape.basic.Text({text:\"This is a simple text in a canvas with chessboard background.\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n */\r\ndraw2d.policy.canvas.ShowChessboardEditPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ShowChessboardEditPolicy.prototype */\r\n {\r\n NAME: \"draw2d.policy.canvas.ShowChessboardEditPolicy\",\r\n\r\n GRID_COLOR: \"#e0e0e0\",\r\n GRID_WIDTH: 20,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n * @param {Number} grid the grid width of the canvas\r\n */\r\n init: function (grid) {\r\n this._super()\r\n if (grid) {\r\n this.grid = grid\r\n } else {\r\n this.grid = this.GRID_WIDTH\r\n }\r\n },\r\n\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n\r\n this.oldBg = this.canvas.html.css(\"background\")\r\n this.setGrid(1/canvas.getZoom())\r\n this.onZoomCallback =(emitterFigure, zoomData) => {\r\n this.setGrid(1/zoomData.value)\r\n }\r\n canvas.on(\"zoom\", this.onZoomCallback)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n $(canvas.paper.canvas).css({\"background\": this.oldBg})\r\n canvas.off(this.onZoomCallback)\r\n },\r\n\r\n /**\r\n * Activate the grid and set the CSS properties for the SVG canvas\r\n * @private\r\n */\r\n setGrid: function(zoom){\r\n\r\n let gridColor = this.GRID_COLOR\r\n\r\n let background =\r\n `linear-gradient(45deg, ${gridColor} 25%, transparent 25%, transparent 75%, ${gridColor} 75%, ${gridColor} 100%),\\n` +\r\n `linear-gradient(45deg, ${gridColor} 25%, transparent 25%, transparent 75%, ${gridColor} 75%, ${gridColor} 100%)`\r\n let backgroundSize = `${(this.grid*2*zoom)}px ${(this.grid*2*zoom)}px`\r\n let backgroundPosition = `0 0, ${(this.grid*zoom)}px ${(this.grid*zoom)}px`\r\n\r\n $(this.canvas.paper.canvas).css({\r\n \"background\": background,\r\n \"background-size\": backgroundSize,\r\n \"background-position\": backgroundPosition\r\n })\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A canvas decoration which paints a dimetric in the background.\r\n * <br>\r\n * <br>\r\n *\r\n * @example\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.ShowDimetricGridEditPolicy());\r\n * let shape = new draw2d.shape.basic.Text({text:\"This is a simple text in a canvas with grid background.\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n */\r\ndraw2d.policy.canvas.ShowDimetricGridEditPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ShowDimetricGridEditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.canvas.ShowDimetricGridEditPolicy\",\r\n\r\n GRID_COLOR: \"#f0f0f0\",\r\n GRID_WIDTH: 30,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n * @param {Number} [grid] the grid width of the canvas\r\n */\r\n init: function (grid) {\r\n this.color = new draw2d.util.Color(this.GRID_COLOR)\r\n this.zoom = 1\r\n this.shapes = null\r\n\r\n this._super()\r\n\r\n if (typeof grid === \"number\") {\r\n this.grid = grid\r\n }\r\n else {\r\n this.grid = this.GRID_WIDTH\r\n }\r\n },\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n this.zoom = canvas.getZoom()\r\n this.setGrid(this.grid)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n if (this.shapes !== null) {\r\n this.shapes.remove()\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Set the grid color\r\n *\r\n * @param {draw2d.util.Color|String} color a color object or the CSS string declaration for a color\r\n * @since 5.0.3\r\n */\r\n setGridColor: function (color) {\r\n this.color = new draw2d.util.Color(color)\r\n this.setGrid(this.grid)\r\n },\r\n\r\n /**\r\n * \r\n * Set a new grid width/height\r\n *\r\n * @param {Number} grid\r\n * @since 5.0.3\r\n */\r\n setGrid: function (grid) {\r\n this.grid = grid\r\n\r\n if (this.canvas != null) {\r\n if (this.shapes !== null) {\r\n this.shapes.remove()\r\n }\r\n\r\n let r = this.canvas.paper\r\n let d = this.grid, i\r\n let w = r.width\r\n let h = r.height\r\n let props = {stroke: this.color.rgba()}\r\n\r\n let max = Math.sqrt(w * w + h * h)\r\n let angle26 = Math.atan(.5)\r\n let angle153 = Math.PI - angle26\r\n let cos30 = Math.cos(angle26)\r\n let sin30 = Math.sin(angle26)\r\n let cos150 = Math.cos(angle153)\r\n let sin150 = Math.sin(angle153)\r\n\r\n r.setStart()\r\n // horizontal\r\n for (i = 0; i <= w; i += d * 2) {\r\n r.path([[\"M\", i, 0], [\"L\", i + cos30 * max, sin30 * max]]).attr(props)\r\n r.path([[\"M\", i, 0], [\"L\", i + cos150 * max, sin150 * max]]).attr(props)\r\n }\r\n for (i = d; i <= h; i += d) {\r\n r.path([[\"M\", 0, i], [\"L\", cos30 * max, i + sin30 * max]]).attr(props)\r\n r.path([[\"M\", w, i], [\"L\", w + cos150 * max, i + sin150 * max]]).attr(props)\r\n }\r\n // vertical\r\n this.shapes = r.setFinish()\r\n\r\n this.shapes.toBack()\r\n }\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Paint a dotted pattern in the background of the canvas.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.ShowDotEditPolicy());\r\n * let shape = new draw2d.shape.basic.Text({text:\"This is a simple text in a canvas with dotted background.\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n * @since 4.0.1\r\n */\r\n\r\ndraw2d.policy.canvas.ShowDotEditPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ShowDotEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.ShowDotEditPolicy\",\r\n\r\n DOT_COLOR: \"#999999\",\r\n DOT_RADIUS: 1,\r\n DOT_DISTANCE: 20,\r\n\r\n /**\r\n * show a dot grid in the canvas for decoration.\r\n *\r\n * @param {Number} [dotDistance] the distance or grid width between the dots.\r\n * @param {Number} [dotRadius] the radius of the dots.\r\n * @param {draw2d.util.Color|String} [dotColor] the color for the dots.\r\n */\r\n init: function (dotDistance, dotRadius, dotColor) {\r\n this._super()\r\n\r\n this.dotDistance = dotDistance ? dotDistance : this.DOT_DISTANCE\r\n this.dotRadius = dotRadius ? dotRadius : this.DOT_RADIUS\r\n this.dotColor = new draw2d.util.Color(dotColor ? dotColor : this.DOT_COLOR)\r\n this.onZoomCallback =(emitterFigure, zoomData) => {\r\n this.setGrid(1/zoomData.value)\r\n }\r\n },\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n\r\n this.oldBg = this.canvas.html.css(\"background\")\r\n this.setGrid(1/canvas.getZoom())\r\n canvas.on(\"zoom\", this.onZoomCallback)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n $(canvas.paper.canvas).css({\"background\": this.oldBg})\r\n canvas.off(this.onZoomCallback)\r\n },\r\n\r\n /**\r\n * @private\r\n * @param {Number} zoom \r\n */\r\n setGrid: function (zoom) {\r\n let bgColor = \"#FFFFFF\"\r\n let dotColor = this.dotColor.rgba()\r\n\r\n let background = `linear-gradient(90deg, ${bgColor} ${(this.dotDistance - this.dotRadius)*zoom}px, transparent 1%) center, \r\n linear-gradient(${bgColor} ${(this.dotDistance - this.dotRadius)*zoom}px, transparent 1%) center, ${dotColor}`\r\n let backgroundSize = `${this.dotDistance*zoom}px ${this.dotDistance*zoom}px`\r\n\r\n $(this.canvas.paper.canvas).css({\r\n \"background\": background,\r\n \"background-size\": backgroundSize\r\n })\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A cavas decoration which paints a grid in the background.\r\n * <br>\r\n * <br>\r\n *\r\n * @example\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.ShowGridEditPolicy());\r\n * let shape = new draw2d.shape.basic.Text({text:\"This is a simple text in a canvas with grid background.\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n */\r\ndraw2d.policy.canvas.ShowGridEditPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ShowGridEditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.canvas.ShowGridEditPolicy\",\r\n\r\n DEFAULTS: {\r\n width: 20,\r\n stroke: 1,\r\n color: \"#f0f0f0\",\r\n bgColor: \"#FFFFFF\"\r\n },\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n * @param {Number} [grid] the grid width of the canvas\r\n */\r\n init: function (attr) {\r\n \r\n // Merge defaults with the provided attr object\r\n const config = { ...this.DEFAULTS, ...attr };\r\n\r\n this.gridWidth = config.width;\r\n this.gridStroke = config.stroke;\r\n this.gridColor = new draw2d.util.Color(config.color);\r\n this.bgColor = config.bgColor;\r\n\r\n this._super()\r\n this.onZoomCallback =(emitterFigure, zoomData) => {\r\n this.setGrid(1/zoomData.value)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Set the grid color\r\n *\r\n * @param {draw2d.util.Color|String} color a color object or the CSS string declaration for a color\r\n * @since 5.0.3\r\n */\r\n setGridColor: function (color) {\r\n this.gridColor = new draw2d.util.Color(color)\r\n this.setGrid(1/this.canvas.getZoom())\r\n },\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n\r\n this.oldBg = this.canvas.html.css(\"background\")\r\n this.setGrid(1/canvas.getZoom())\r\n canvas.on(\"zoom\", this.onZoomCallback)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n \r\n $(canvas.paper.canvas).css({\"background\": this.oldBg})\r\n canvas.off(this.onZoomCallback)\r\n },\r\n\r\n /**\r\n * @private\r\n * @param {Number} zoom \r\n */\r\n setGrid: function (zoom) {\r\n let color = this.gridColor.rgba()\r\n\r\n let background = \r\n ` linear-gradient(to right, ${color} ${this.gridStroke}px, transparent ${this.gridStroke}px),\r\n linear-gradient(to bottom, ${color} ${this.gridStroke}px, ${this.bgColor} ${this.gridStroke}px)`\r\n let backgroundSize = `${this.gridWidth*zoom}px ${this.gridWidth*zoom}px`\r\n\r\n $(this.canvas.paper.canvas).css({\r\n \"background\": background,\r\n \"background-size\": backgroundSize\r\n })\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.SelectionPolicy\r\n */\r\ndraw2d.policy.canvas.SingleSelectionPolicy = draw2d.policy.canvas.SelectionPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SingleSelectionPolicy.prototype */\r\n {\r\n NAME: \"draw2d.policy.canvas.SingleSelectionPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function () {\r\n this._super()\r\n this.mouseMovedDuringMouseDown = false\r\n this.mouseDraggingElement = null\r\n this.mouseDownElement = null\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n select: function (canvas, figure) {\r\n if (canvas.getSelection().contains(figure)) {\r\n return // nothing to to\r\n }\r\n\r\n let oldSelection = canvas.getSelection().getPrimary()\r\n if (oldSelection) {\r\n this.unselect(canvas, oldSelection)\r\n }\r\n\r\n figure?.select(true) // primary selection\r\n\r\n canvas.getSelection().setPrimary(figure)\r\n\r\n // inform all selection listeners about the new selection.\r\n //\r\n if (oldSelection !== figure) {\r\n canvas.fireEvent(\"select\", {figure: figure, selection: canvas.getSelection()})\r\n }\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDown: function (canvas, x, y, shiftKey, ctrlKey) {\r\n this.mouseMovedDuringMouseDown = false\r\n let canDragStart = true\r\n\r\n // ignore ports since version 6.1.0. This is handled by the ConnectionCreatePolicy\r\n //\r\n let figure = canvas.getBestFigure(x, y)\r\n\r\n // may the figure is assigned to a composite. In this case the composite can\r\n // override the event receiver\r\n while (figure !== null) {\r\n let delegate = figure.getSelectionAdapter()()\r\n if (delegate === figure) {\r\n break\r\n }\r\n figure = delegate\r\n }\r\n\r\n // ignore ports since version 6.1.0. This is handled by the ConnectionCreatePolicy\r\n //\r\n if (figure instanceof draw2d.Port) {\r\n return// silently\r\n }\r\n\r\n if (figure !== null && figure.isDraggable()) {\r\n canDragStart = figure.onDragStart(x - figure.getAbsoluteX(), y - figure.getAbsoluteY(), shiftKey, ctrlKey)\r\n // Element send a veto about the drag&drop operation\r\n this.mouseDraggingElement = canDragStart === false ? null : figure\r\n }\r\n\r\n this.mouseDownElement = figure\r\n if (this.mouseDownElement !== null) {\r\n this.mouseDownElement.fireEvent(\"mousedown\", {\r\n x: x, \r\n y: y, \r\n relX: x - this.mouseDownElement.getAbsoluteX(),\r\n relY: y - this.mouseDownElement.getAbsoluteY(),\r\n shiftKey: shiftKey, \r\n ctrlKey: ctrlKey\r\n })\r\n }\r\n\r\n if (figure !== canvas.getSelection().getPrimary() && figure !== null && figure.isSelectable() === true) {\r\n this.select(canvas, figure)\r\n\r\n // it's a line\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n // you can move a line with Drag&Drop...but not a connection.\r\n // A Connection is fixed linked with the corresponding ports.\r\n //\r\n if (!(figure instanceof draw2d.Connection)) {\r\n canvas.draggingLineCommand = figure.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE))\r\n if (canvas.draggingLineCommand !== null) {\r\n canvas.draggingLine = figure\r\n }\r\n }\r\n } else if (canDragStart === false) {\r\n figure.unselect()\r\n }\r\n }\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n\r\n this.mouseMovedDuringMouseDown = true\r\n if (this.mouseDraggingElement !== null) {\r\n\r\n // mouseDraggingElement be a ResizeHandle...in this case it is not part of the selection\r\n //\r\n let sel = canvas.getSelection()\r\n if (sel.contains(this.mouseDraggingElement)) {\r\n sel.each((i, figure) => { figure.onDrag(dx, dy, dx2, dy2, shiftKey, ctrlKey) })\r\n } else {\r\n this.mouseDraggingElement.onDrag(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n }\r\n\r\n let p = canvas.fromDocumentToCanvasCoordinate(canvas.mouseDownX + (dx / canvas.zoomFactor), canvas.mouseDownY + (dy / canvas.zoomFactor))\r\n let target = canvas.getBestFigure(p.x, p.y, this.mouseDraggingElement)\r\n\r\n if (target !== canvas.currentDropTarget) {\r\n if (canvas.currentDropTarget !== null) {\r\n canvas.currentDropTarget.onDragLeave(this.mouseDraggingElement)\r\n canvas.currentDropTarget.fireEvent(\"dragLeave\", {draggingElement: this.mouseDraggingElement})\r\n canvas.currentDropTarget = null\r\n }\r\n if (target !== null) {\r\n canvas.currentDropTarget = target.delegateTarget(this.mouseDraggingElement)\r\n // inform all listener that the element has accept the dragEnter event\r\n //\r\n if (canvas.currentDropTarget !== null) {\r\n canvas.currentDropTarget.onDragEnter(this.mouseDraggingElement) // legacy\r\n canvas.currentDropTarget.fireEvent(\"dragEnter\", {draggingElement: this.mouseDraggingElement})\r\n }\r\n }\r\n }\r\n }\r\n // Connection didn't support panning at the moment. There is no special reason for that. Just an interaction\r\n // decision.\r\n //\r\n else if (this.mouseDownElement !== null && !(this.mouseDownElement instanceof draw2d.Connection)) {\r\n if (this.mouseDownElement.panningDelegate !== null) {\r\n this.mouseDownElement.panningDelegate.fireEvent(\"panning\", {\r\n dx: dx,\r\n dy: dy,\r\n dx2: dx2,\r\n dy2: dy2,\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n this.mouseDownElement.panningDelegate.onPanning(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n } else {\r\n this.mouseDownElement.fireEvent(\"panning\", {\r\n dx: dx,\r\n dy: dy,\r\n dx2: dx2,\r\n dy2: dy2,\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n this.mouseDownElement.onPanning(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n }\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * @param {draw2d.Canvas} canvas the related Canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (canvas, x, y, shiftKey, ctrlKey) {\r\n if (this.mouseDraggingElement !== null) {\r\n let redrawConnection = new draw2d.util.ArrayList()\r\n if (this.mouseDraggingElement instanceof draw2d.shape.node.Node) {\r\n // TODO: don't add the connections with to check if a repaint is required\r\n // may a moved connection didn't have an intersection with the named lines.\r\n // in this case a redraw is useless\r\n canvas.lineIntersections.each(function (i, inter) {\r\n if (!redrawConnection.contains(inter.line)) redrawConnection.add(inter.line)\r\n if (!redrawConnection.contains(inter.other)) redrawConnection.add(inter.other)\r\n })\r\n }\r\n\r\n // start CommandStack transaction\r\n canvas.getCommandStack().startTransaction()\r\n\r\n let sel = canvas.getSelection().getAll()\r\n if (!sel.contains(this.mouseDraggingElement)) {\r\n this.mouseDraggingElement.onDragEnd(x, y, shiftKey, ctrlKey)\r\n } else {\r\n canvas.getSelection().getAll().each(function (i, figure) {\r\n figure.onDragEnd(x, y, shiftKey, ctrlKey)\r\n })\r\n }\r\n\r\n if (canvas.currentDropTarget !== null && !this.mouseDraggingElement.isResizeHandle) {\r\n this.mouseDraggingElement.onDrop(canvas.currentDropTarget, x, y, shiftKey, ctrlKey)\r\n canvas.currentDropTarget.onDragLeave(this.mouseDraggingElement)\r\n canvas.currentDropTarget.fireEvent(\"dragLeave\", {draggingElement: this.mouseDraggingElement})\r\n canvas.currentDropTarget.onCatch(this.mouseDraggingElement, x, y, shiftKey, ctrlKey)\r\n canvas.currentDropTarget = null\r\n }\r\n\r\n // end command stack trans\r\n canvas.getCommandStack().commitTransaction()\r\n\r\n if (this.mouseDraggingElement instanceof draw2d.shape.node.Node) {\r\n canvas.lineIntersections.each(function (i, inter) {\r\n if (!redrawConnection.contains(inter.line)) redrawConnection.add(inter.line)\r\n if (!redrawConnection.contains(inter.other)) redrawConnection.add(inter.other)\r\n })\r\n redrawConnection.each(function (i, line) {\r\n line.svgPathString = null\r\n line.repaint()\r\n })\r\n }\r\n\r\n this.mouseDraggingElement = null\r\n }\r\n // Connection didn't support panning at the moment. There is no special reason for that. Just an interaction\r\n // decision.\r\n //\r\n else if (this.mouseDownElement !== null && !(this.mouseDownElement instanceof draw2d.Connection)) {\r\n if (this.mouseDownElement.panningDelegate !== null) {\r\n this.mouseDownElement.panningDelegate.fireEvent(\"panningEnd\")\r\n this.mouseDownElement.panningDelegate.onPanningEnd()\r\n } else {\r\n this.mouseDownElement.fireEvent(\"panningEnd\")\r\n this.mouseDownElement.onPanningEnd()\r\n }\r\n }\r\n\r\n // Reset the current selection if the user click in the blank canvas.\r\n // Don't reset the selection if the user pan the canvas\r\n //\r\n if (this.mouseDownElement === null && this.mouseMovedDuringMouseDown === false) {\r\n this.select(canvas, null)\r\n }\r\n\r\n this.mouseDownElement?.fireEvent(\"mouseup\", {\r\n x: x, \r\n y: y, \r\n relX: x - this.mouseDownElement.getAbsoluteX(),\r\n relY: y - this.mouseDownElement.getAbsoluteY(),\r\n shiftKey: shiftKey, \r\n ctrlKey: ctrlKey\r\n })\r\n\r\n this.mouseDownElement = null\r\n this.mouseMovedDuringMouseDown = false\r\n },\r\n\r\n /**\r\n *\r\n * Called by the canvas if the user click on a figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure under the click event. Can be null\r\n * @param {Number} mouseX the x coordinate of the mouse during the click event\r\n * @param {Number} mouseY the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 3.0.0\r\n */\r\n onClick: function (figure, mouseX, mouseY, shiftKey, ctrlKey) {\r\n if (figure !== null) {\r\n figure.fireEvent(\"click\", {\r\n figure: figure,\r\n x: mouseX,\r\n y: mouseY,\r\n relX: mouseX - figure.getAbsoluteX(),\r\n relY: mouseY - figure.getAbsoluteY(),\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n\r\n figure.onClick()\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Called by the canvas if the user double click on a figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure under the double click event. Can be null\r\n * @param {Number} mouseX the x coordinate of the mouse during the click event\r\n * @param {Number} mouseY the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 4.1.0\r\n */\r\n onDoubleClick: function (figure, mouseX, mouseY, shiftKey, ctrlKey) {\r\n if (figure !== null) {\r\n figure.fireEvent(\"dblclick\", \r\n {\r\n x: mouseX, \r\n y: mouseY, \r\n relX: mouseX - figure.getAbsoluteX(),\r\n relY: mouseX - figure.getAbsoluteY(), \r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n figure.onDoubleClick()\r\n }\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Snapping is based on the existing children of a container. When snapping a shape,\r\n * the center of the bounding box will snap to the center of other figures of the given canvas.\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.SnapToEditPolicy\r\n * @since 5.6.4\r\n */\r\ndraw2d.policy.canvas.SnapToCenterEditPolicy = draw2d.policy.canvas.SnapToEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToCenterEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToCenterEditPolicy\",\r\n\r\n SNAP_THRESHOLD: 5,\r\n FADEOUT_DURATION: 500,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to geometry\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.centers = null\r\n\r\n this.horizontalGuideLines = null\r\n this.verticalGuideLines = null\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Figure} figure the shape below the mouse or null\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (figure, x, y, shiftKey, ctrlKey) {\r\n this.centers = null\r\n this.hideHorizontalGuides(false)\r\n this.hideVerticalGuides(false)\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the coordinates to the canvas neighbours\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // do nothing for resize handles\r\n if (figure instanceof draw2d.ResizeHandle) {\r\n return modifiedPos\r\n }\r\n\r\n // do nothing for lines\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n return modifiedPos\r\n }\r\n\r\n\r\n let allowXChanges = modifiedPos.x === originalPos.x\r\n let allowYChanges = modifiedPos.y === originalPos.y\r\n\r\n let inputBounds = new draw2d.geo.Rectangle(modifiedPos.x, modifiedPos.y, figure.getWidth(), figure.getHeight())\r\n let inputCenter = inputBounds.getCenter()\r\n\r\n modifiedPos = modifiedPos.clone()\r\n\r\n if (allowXChanges === true) {\r\n let horizontal = this.snapHorizontal(inputCenter)\r\n\r\n // Show a horizontal line if the snapper has modified the inputPoint\r\n //\r\n if (horizontal.snapped) {\r\n // show the snap lines..\r\n this.showHorizontalGuides(figure, horizontal)\r\n\r\n // and snap the x coordinate\r\n modifiedPos.y += horizontal.diff\r\n }\r\n else {\r\n this.hideHorizontalGuides(true)\r\n }\r\n }\r\n else {\r\n this.hideHorizontalGuides(true)\r\n }\r\n\r\n if (allowYChanges === true) {\r\n let vertical = this.snapVertical(inputCenter)\r\n\r\n // Show a vertical guides if the snapper has modified the inputPoint\r\n //\r\n if (vertical.snapped) {\r\n // show the snap lines..\r\n this.showVerticalGuides(figure, vertical)\r\n\r\n // and snap the x coordinate\r\n modifiedPos.x += vertical.diff\r\n }\r\n else {\r\n this.hideVerticalGuides(true)\r\n }\r\n }\r\n else {\r\n this.hideVerticalGuides(true)\r\n }\r\n\r\n return modifiedPos\r\n },\r\n\r\n\r\n snapVertical: function (center) {\r\n let _this = this\r\n if (this.centers === null) {\r\n this.populateCenters()\r\n }\r\n\r\n let result = {\r\n point: center,\r\n snapped: false,\r\n diff: 0\r\n }\r\n\r\n\r\n let candidates = []\r\n this.centers.forEach( (point) =>{\r\n if (Math.abs(point.x - center.x) < _this.SNAP_THRESHOLD) {\r\n candidates.push(point)\r\n }\r\n })\r\n\r\n // we can abort if we didn't find an intersection on the right hand side\r\n if (candidates.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greatest X coordinate\r\n //\r\n candidates.sort( (a, b) => a.x - b.x )\r\n\r\n let diff = candidates[0].x - center.x\r\n let snappedPoint = center.clone()\r\n snappedPoint.x += diff\r\n return {snapped: true, diff: diff, point: candidates[0], snappedPoint: snappedPoint}\r\n },\r\n\r\n\r\n snapHorizontal: function (center) {\r\n let _this = this\r\n if (this.centers === null) {\r\n this.populateCenters()\r\n }\r\n\r\n let result = {\r\n point: center,\r\n snapped: false,\r\n diff: 0\r\n }\r\n\r\n\r\n let candidates = []\r\n this.centers.forEach( (point) => {\r\n if (Math.abs(point.y - center.y) < _this.SNAP_THRESHOLD) {\r\n candidates.push(point)\r\n }\r\n })\r\n\r\n // we can abort if we didn't find an intersection on the right hand side\r\n if (candidates.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greatest X coordinate\r\n //\r\n candidates.sort( (a, b) => a.y - b.y)\r\n\r\n let diff = candidates[0].y - center.y\r\n let snappedPoint = center.clone()\r\n snappedPoint.y += diff\r\n return {snapped: true, diff: diff, point: candidates[0], snappedPoint: snappedPoint}\r\n },\r\n\r\n populateCenters: function () {\r\n let selection = this.canvas.getSelection().getAll(true)\r\n let centers = this.centers = []\r\n\r\n let figures = this.canvas.getFigures()\r\n figures.each( (index, figure) =>{\r\n if (!selection.contains(figure)) {\r\n centers.push(figure.getBoundingBox().getCenter())\r\n }\r\n })\r\n },\r\n\r\n showHorizontalGuides: function (causedFigure, constraint) {\r\n if (this.horizontalGuideLines !== null) {\r\n this.horizontalGuideLines.stop()\r\n this.horizontalGuideLines.remove()\r\n }\r\n\r\n let start = constraint.point\r\n let end = constraint.snappedPoint\r\n\r\n this.canvas.paper.setStart()\r\n\r\n // horizontal lines\r\n //\r\n this.canvas.paper\r\n .path(\r\n \"M \" + (start.x) + \" \" + ((start.y | 0) + 0.5) + \" L \" + (end.x) + \" \" + ((end.y | 0) + 0.5))\r\n .attr({\r\n \"stroke\": this.lineColor.rgba(),\r\n \"stroke-width\": 1\r\n })\r\n\r\n this.horizontalGuideLines = this.canvas.paper.setFinish()\r\n this.horizontalGuideLines.toFront()\r\n },\r\n\r\n /**\r\n *\r\n * Hide the horizontal snapping guides\r\n *\r\n * @param {Boolean} fast\r\n */\r\n hideHorizontalGuides: function (fast) {\r\n if (this.horizontalGuideLines === null) {\r\n return\r\n }\r\n if (fast === true) {\r\n if (this.horizontalGuideLines !== null) {\r\n this.horizontalGuideLines.remove()\r\n this.horizontalGuideLines = null\r\n }\r\n }\r\n else {\r\n this.horizontalGuideLines.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.horizontalGuideLines !== null) {\r\n this.horizontalGuideLines.remove()\r\n this.horizontalGuideLines = null\r\n }\r\n }\r\n )\r\n }\r\n },\r\n\r\n\r\n showVerticalGuides: function (causedFigure, constraint) {\r\n if (this.verticalGuideLines !== null) {\r\n this.verticalGuideLines.stop()\r\n this.verticalGuideLines.remove()\r\n }\r\n\r\n let start = constraint.point\r\n let end = constraint.snappedPoint\r\n\r\n this.canvas.paper.setStart()\r\n\r\n // horizontal lines\r\n //\r\n this.canvas.paper\r\n .path(\r\n \"M \" + ((start.x | 0) + 0.5) + \" \" + (start.y) + \" L \" + ((end.x | 0) + 0.5) + \" \" + (end.y))\r\n .attr({\r\n \"stroke\": this.lineColor.rgba(),\r\n \"stroke-width\": 1\r\n })\r\n\r\n\r\n this.verticalGuideLines = this.canvas.paper.setFinish()\r\n this.verticalGuideLines.toFront()\r\n },\r\n\r\n /**\r\n *\r\n * Hide the horizontal snapüing guides\r\n *\r\n * @param soft\r\n */\r\n hideVerticalGuides: function (fast) {\r\n if (this.verticalGuideLines === null) {\r\n return\r\n }\r\n if (fast === true) {\r\n if (this.verticalGuideLines !== null) {\r\n this.verticalGuideLines.remove()\r\n this.verticalGuideLines = null\r\n }\r\n }\r\n else {\r\n this.verticalGuideLines.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.verticalGuideLines !== null) {\r\n this.verticalGuideLines.remove()\r\n this.verticalGuideLines = null\r\n }\r\n }\r\n )\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A helper used to perform snapping to a grid, which is specified on the canvas via the various\r\n * properties defined in this class.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.ShowDimetricGridEditPolicy\r\n */\r\ndraw2d.policy.canvas.SnapToDimetricGridEditPolicy = draw2d.policy.canvas.ShowDimetricGridEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToDimetricGridEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToDimetricGridEditPolicy\",\r\n\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n * @param {Number} grid the grid width of the canvas\r\n */\r\n init: function (grid) {\r\n this._super(grid)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Applies a snapping correction to the given result.\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n * @since 2.3.0\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // do nothing for lines\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n return modifiedPos\r\n }\r\n\r\n let snapPoint = figure.getSnapToGridAnchor()\r\n\r\n modifiedPos.x = modifiedPos.x + snapPoint.x\r\n modifiedPos.y = modifiedPos.y + snapPoint.y\r\n\r\n let g = this.grid / 5\r\n\r\n modifiedPos.x = g * Math.floor(((modifiedPos.x + g / 2.0) / g))\r\n modifiedPos.y = g * Math.floor(((modifiedPos.y + g / 2.0) / g))\r\n\r\n modifiedPos.x = modifiedPos.x - snapPoint.x\r\n modifiedPos.y = modifiedPos.y - snapPoint.y\r\n\r\n return modifiedPos\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\ndraw2d.SnapToHelper = {}\r\n\r\ndraw2d.SnapToHelper.NORTH = 1\r\ndraw2d.SnapToHelper.SOUTH = 4\r\ndraw2d.SnapToHelper.WEST = 8\r\ndraw2d.SnapToHelper.EAST = 16\r\ndraw2d.SnapToHelper.CENTER_H = 32\r\ndraw2d.SnapToHelper.CENTER_V = 642\r\n\r\ndraw2d.SnapToHelper.NORTH_EAST = draw2d.SnapToHelper.NORTH | draw2d.SnapToHelper.EAST\r\ndraw2d.SnapToHelper.NORTH_WEST = draw2d.SnapToHelper.NORTH | draw2d.SnapToHelper.WEST\r\ndraw2d.SnapToHelper.SOUTH_EAST = draw2d.SnapToHelper.SOUTH | draw2d.SnapToHelper.EAST\r\ndraw2d.SnapToHelper.SOUTH_WEST = draw2d.SnapToHelper.SOUTH | draw2d.SnapToHelper.WEST\r\ndraw2d.SnapToHelper.NORTH_SOUTH = draw2d.SnapToHelper.NORTH | draw2d.SnapToHelper.SOUTH\r\ndraw2d.SnapToHelper.EAST_WEST = draw2d.SnapToHelper.EAST | draw2d.SnapToHelper.WEST\r\ndraw2d.SnapToHelper.NSEW = draw2d.SnapToHelper.NORTH_SOUTH | draw2d.SnapToHelper.EAST_WEST\r\n\r\n/**\r\n * @class\r\n *\r\n * A helper used by Tools for snapping certain mouse interactions.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n */\r\ndraw2d.policy.canvas.SnapToEditPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToEditPolicy\",\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this.lineColor = null\r\n\r\n this._super(\r\n {\r\n lineColor: \"#51C1FC\",\r\n ...attr\r\n },\r\n {\r\n // @attr {draw2d.util.Color} color the line color of the snapTo lines */\r\n lineColor: this.setLineColor,\r\n ...setter},\r\n {\r\n lineColor: this.getLineColor,\r\n ...getter})\r\n },\r\n\r\n /**\r\n *\r\n * Set the color of the snap line.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * policy.attr({\r\n * lineColor: color\r\n * });\r\n *\r\n * @param {draw2d.util.Color|String} color The new color of the line.\r\n **/\r\n setLineColor: function (color) {\r\n this.lineColor = new draw2d.util.Color(color)\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the current paint color.\r\n *\r\n * @returns {draw2d.util.Color} The paint color of the line.\r\n * @since 5.6.1\r\n **/\r\n getLineColor: function () {\r\n return this.lineColor\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Adjust the coordinates to the given constraint of the policy.\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n return modifiedPos\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Snapping is based on the existing children of a container. When snapping a shape,\r\n * the edges of the bounding box will snap to edges of other rectangles generated\r\n * from the children of the given canvas.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.SnapToEditPolicy\r\n */\r\ndraw2d.policy.canvas.SnapToGeometryEditPolicy = draw2d.policy.canvas.SnapToEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToGeometryEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToGeometryEditPolicy\",\r\n\r\n SNAP_THRESHOLD: 3,\r\n FADEOUT_DURATION: 300,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to geometry\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.rows = null\r\n this.cols = null\r\n this.vline = null\r\n this.hline = null\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Figure} figure the shape below the mouse or null\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (figure, x, y, shiftKey, ctrlKey) {\r\n this.rows = null\r\n this.cols = null\r\n this.hideVerticalLine()\r\n this.hideHorizontalLine()\r\n },\r\n\r\n /**\r\n * \r\n * Adjust the coordinates to the canvas neighbours\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // do nothing for lines\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n return modifiedPos\r\n }\r\n\r\n let result\r\n let allowXChanges = modifiedPos.x === originalPos.x\r\n let allowYChanges = modifiedPos.y === originalPos.y\r\n\r\n // Coordinates already snapped to an x/y coordinate.\r\n // Don't change them and in this case no further calculation is requried.\r\n //\r\n if (!allowXChanges && !allowYChanges) {\r\n return modifiedPos\r\n }\r\n\r\n if (figure instanceof draw2d.ResizeHandle) {\r\n let snapPoint = figure.getSnapToGridAnchor()\r\n modifiedPos.x += snapPoint.x\r\n modifiedPos.y += snapPoint.y\r\n\r\n let snapDirections = figure.getSnapToDirection()\r\n result = this.snapPoint(snapDirections, modifiedPos)\r\n\r\n // Show a vertical line if the snapper has modified the inputPoint\r\n //\r\n if (allowXChanges && (snapDirections & draw2d.SnapToHelper.EAST_WEST) && !(result.edge & draw2d.SnapToHelper.EAST_WEST)) {\r\n this.showVerticalLine(figure, draw2d.SnapToHelper.WEST, result.point.x)\r\n }\r\n else {\r\n this.hideVerticalLine()\r\n }\r\n\r\n // Show a horizontal line if the snapper has modified the inputPoint\r\n //\r\n if (allowYChanges && (snapDirections & draw2d.SnapToHelper.NORTH_SOUTH) && !(result.edge & draw2d.SnapToHelper.NORTH_SOUTH)) {\r\n this.showHorizontalLine(figure, draw2d.SnapToHelper.NORTH, result.point.y)\r\n }\r\n else {\r\n this.hideHorizontalLine()\r\n }\r\n\r\n // restore the original pos coordinate if x or y coordinate already snapped to any axis\r\n // or subtract the added snapOffset\r\n //\r\n result.point.x = allowXChanges ? result.point.x - snapPoint.x : modifiedPos.x\r\n result.point.y = allowYChanges ? result.point.y - snapPoint.y : modifiedPos.y\r\n\r\n return result.point\r\n }\r\n\r\n // The user drag&drop a normal figure\r\n let inputBounds = new draw2d.geo.Rectangle(modifiedPos.x, modifiedPos.y, figure.getWidth(), figure.getHeight())\r\n\r\n result = this.snapRectangle(inputBounds)\r\n\r\n if (!allowXChanges) {\r\n result.bounds.x = modifiedPos.x\r\n }\r\n\r\n if (!allowYChanges) {\r\n result.bounds.y = modifiedPos.y\r\n }\r\n\r\n // Show a vertical line if the snapper has modified the inputPoint\r\n //\r\n if (allowXChanges && !(result.edge & draw2d.SnapToHelper.WEST)) {\r\n this.showVerticalLine(figure, draw2d.SnapToHelper.WEST, result.bounds.x)\r\n }\r\n else if (allowXChanges && !(result.edge & draw2d.SnapToHelper.EAST)) {\r\n this.showVerticalLine(figure, draw2d.SnapToHelper.EAST, result.bounds.x + result.bounds.getWidth())\r\n }\r\n else {\r\n this.hideVerticalLine()\r\n }\r\n\r\n\r\n // Show a horizontal line if the snapper has modified the inputPoint\r\n //\r\n if (allowYChanges && !(result.edge & draw2d.SnapToHelper.NORTH)) {\r\n this.showHorizontalLine(figure, draw2d.SnapToHelper.NORTH, result.bounds.y)\r\n }\r\n else if (allowYChanges && !(result.edge & draw2d.SnapToHelper.SOUTH)) {\r\n this.showHorizontalLine(figure, draw2d.SnapToHelper.SOUTH, result.bounds.y + result.bounds.getHeight())\r\n }\r\n else {\r\n this.hideHorizontalLine()\r\n }\r\n\r\n return result.bounds.getTopLeft()\r\n },\r\n\r\n /**\r\n * \r\n * calculates the snapped position of the rectangle.\r\n *\r\n * @param {draw2d.geo.Rectangle} inputBounds\r\n *\r\n * @returns {Object}\r\n */\r\n snapRectangle: function (inputBounds) {\r\n let resultBounds = inputBounds.clone()\r\n\r\n let topLeft = this.snapPoint(draw2d.SnapToHelper.NORTH_WEST, inputBounds.getTopLeft())\r\n resultBounds.x = topLeft.point.x\r\n resultBounds.y = topLeft.point.y\r\n\r\n let bottomRight = this.snapPoint(draw2d.SnapToHelper.SOUTH_EAST, inputBounds.getBottomRight())\r\n\r\n // The first test (topLeft) has not modified the point. so we can modify them with the bottomRight adjustment\r\n //\r\n if (topLeft.edge & draw2d.SnapToHelper.WEST) {\r\n resultBounds.x = bottomRight.point.x - inputBounds.getWidth()\r\n }\r\n\r\n // The first test (topLeft) has not modified the point. so we can modify them with the bottomRight adjustment\r\n //\r\n if (topLeft.edge & draw2d.SnapToHelper.NORTH) {\r\n resultBounds.y = bottomRight.point.y - inputBounds.getHeight()\r\n }\r\n\r\n return {edge: topLeft.edge | bottomRight.edge, bounds: resultBounds}\r\n },\r\n\r\n snapPoint: function (/*:int*/ snapOrientation, /*:draw2d.Point*/ inputPoint) {\r\n let resultPoint = inputPoint.clone()\r\n\r\n if (this.rows === null || this.cols === null)\r\n this.populateRowsAndCols()\r\n\r\n if ((snapOrientation & draw2d.SnapToHelper.EAST) !== 0) {\r\n let rightCorrection = this.getCorrectionFor(this.cols, inputPoint.x + 1, 1)\r\n if (rightCorrection !== this.SNAP_THRESHOLD) {\r\n snapOrientation &= ~draw2d.SnapToHelper.EAST\r\n resultPoint.x += rightCorrection\r\n }\r\n }\r\n\r\n if ((snapOrientation & draw2d.SnapToHelper.WEST) !== 0) {\r\n let leftCorrection = this.getCorrectionFor(this.cols, inputPoint.x, -1)\r\n if (leftCorrection !== this.SNAP_THRESHOLD) {\r\n snapOrientation &= ~draw2d.SnapToHelper.WEST\r\n resultPoint.x += leftCorrection\r\n }\r\n }\r\n\r\n if ((snapOrientation & draw2d.SnapToHelper.SOUTH) !== 0) {\r\n let bottomCorrection = this.getCorrectionFor(this.rows, inputPoint.y + 1, 1)\r\n if (bottomCorrection !== this.SNAP_THRESHOLD) {\r\n snapOrientation &= ~draw2d.SnapToHelper.SOUTH\r\n resultPoint.y += bottomCorrection\r\n }\r\n }\r\n\r\n if ((snapOrientation & draw2d.SnapToHelper.NORTH) !== 0) {\r\n let topCorrection = this.getCorrectionFor(this.rows, inputPoint.y, -1)\r\n if (topCorrection !== this.SNAP_THRESHOLD) {\r\n snapOrientation &= ~draw2d.SnapToHelper.NORTH\r\n resultPoint.y += topCorrection\r\n }\r\n }\r\n\r\n return {edge: snapOrientation, point: resultPoint}\r\n },\r\n\r\n populateRowsAndCols: function () {\r\n let selection = this.canvas.getSelection()\r\n this.rows = []\r\n this.cols = []\r\n\r\n let figures = this.canvas.getFigures()\r\n for (let i = 0; i < figures.getSize(); i++) {\r\n let figure = figures.get(i)\r\n if (!selection.contains(figure, true)) {\r\n let bounds = figure.getBoundingBox()\r\n this.cols.push({type: -1, location: bounds.x})\r\n this.cols.push({type: 0, location: bounds.x + (bounds.w - 1) / 2})\r\n this.cols.push({type: 1, location: bounds.getRight() + 1})\r\n this.rows.push({type: -1, location: bounds.y})\r\n this.rows.push({type: 0, location: bounds.y + (bounds.h - 1) / 2})\r\n this.rows.push({type: 1, location: bounds.getBottom() + 1})\r\n }\r\n }\r\n\r\n // TODO: remove duplicate entries in the rows/cols array\r\n\r\n },\r\n\r\n getCorrectionFor: function (/*:Array*/ entries, /*:double*/ value, /*:int*/ side) {\r\n let resultMag = this.SNAP_THRESHOLD\r\n let result = this.SNAP_THRESHOLD\r\n\r\n for (let i = 0; i < entries.length; i++) {\r\n let entry = entries[i]\r\n let magnitude\r\n\r\n if (entry.type === -1 && side !== 0) {\r\n magnitude = Math.abs(value - entry.location)\r\n if (magnitude < resultMag) {\r\n resultMag = magnitude\r\n result = entry.location - value\r\n }\r\n }\r\n else if (entry.type === 0 && side === 0) {\r\n magnitude = Math.abs(value - entry.location)\r\n if (magnitude < resultMag) {\r\n resultMag = magnitude\r\n result = entry.location - value\r\n }\r\n }\r\n else if (entry.type === 1 && side !== 0) {\r\n magnitude = Math.abs(value - entry.location)\r\n if (magnitude < resultMag) {\r\n resultMag = magnitude\r\n result = entry.location - value\r\n }\r\n }\r\n }\r\n return result\r\n },\r\n\r\n showVerticalLine: function (causedFigure, edge, x) {\r\n if (this.vline != null) {\r\n this.vline.stop()\r\n this.vline.remove()\r\n }\r\n\r\n let figures = this.canvas.getFigures().clone()\r\n figures.removeAll(this.canvas.getSelection().getAll(true))\r\n figures.map(function (figure) {\r\n return figure.getBoundingBox()\r\n })\r\n figures.grep(function (bbox) {\r\n return (Math.abs(bbox.x - x) <= 1) || (Math.abs(bbox.getRight() - x) <= 1)\r\n })\r\n\r\n // return silently if no figure bounding box is left\r\n //\r\n if (figures.getSize() === 0) {\r\n return\r\n }\r\n\r\n // figure to align is above the current shape\r\n //\r\n let causedBox = causedFigure.getBoundingBox()\r\n let causedCenter = causedBox.getCenter()\r\n figures.sort(function (a, b) {\r\n let d_a = a.getCenter().distance(causedCenter)\r\n let d_b = b.getCenter().distance(causedCenter)\r\n return d_a - d_b\r\n })\r\n let fromY = 0\r\n let maxLength = this.canvas.getHeight() * Math.max(1, this.canvas.getZoom())\r\n let yLength = maxLength\r\n let snappedBox = figures.get(0)\r\n if (causedBox.y < snappedBox.y) {\r\n fromY = causedBox.y\r\n yLength = snappedBox.getBottom() - causedBox.y\r\n }\r\n else {\r\n fromY = snappedBox.y\r\n yLength = causedBox.getBottom() - snappedBox.y\r\n }\r\n\r\n x = (x | 0) + 0.5 // force a .5 number to avoid subpixel rendering. Blurry lines...\r\n this.canvas.paper.setStart()\r\n this.canvas.paper.path(\"M \" + x + \" 0 l 0 \" + maxLength)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + x + \" \" + fromY + \" l 0 \" + yLength)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.vline = this.canvas.paper.setFinish()\r\n this.vline.toBack()\r\n },\r\n\r\n hideVerticalLine: function () {\r\n if (this.vline == null) {\r\n return\r\n }\r\n this.vline.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.vline !== null) {\r\n this.vline.remove()\r\n this.vline = null\r\n }\r\n }\r\n )\r\n },\r\n\r\n showHorizontalLine: function (causedFigure, edge, y) {\r\n if (this.hline != null) {\r\n this.hline.stop()\r\n this.hline.remove()\r\n }\r\n\r\n let figures = this.canvas.getFigures().clone()\r\n figures.removeAll(this.canvas.getSelection().getAll(true))\r\n figures.map(function (figure) {\r\n return figure.getBoundingBox()\r\n })\r\n figures.grep(function (bbox) {\r\n return (Math.abs(bbox.y - y) <= 1) || (Math.abs(bbox.getBottom() - y) <= 1)\r\n })\r\n\r\n // return silently if no figure bounding box is left\r\n //\r\n if (figures.getSize() === 0) {\r\n return\r\n }\r\n\r\n // figure to align is above the current shape\r\n //\r\n let causedBox = causedFigure.getBoundingBox()\r\n let causedCenter = causedBox.getCenter()\r\n figures.sort(function (a, b) {\r\n let d_a = a.getCenter().distance(causedCenter)\r\n let d_b = b.getCenter().distance(causedCenter)\r\n return d_a - d_b\r\n })\r\n let fromX = 0\r\n let maxLength\r\n let xLength = maxLength = this.canvas.getWidth() * Math.max(1, this.canvas.getZoom())\r\n let snappedBox = figures.get(0)\r\n if (causedBox.x < snappedBox.x) {\r\n fromX = causedBox.x\r\n xLength = snappedBox.getRight() - causedBox.x\r\n }\r\n else {\r\n fromX = snappedBox.x\r\n xLength = causedBox.getRight() - snappedBox.x\r\n }\r\n\r\n\r\n y = (y | 0) + 0.5 // force a .5 number to avoid subpixel rendering. Blurry lines...\r\n\r\n this.canvas.paper.setStart()\r\n this.canvas.paper.path(\"M 0 \" + y + \" l \" + maxLength + \" 0\")\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + fromX + \" \" + y + \" l \" + xLength + \" 0\")\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.hline = this.canvas.paper.setFinish()\r\n this.hline.toBack()\r\n\r\n },\r\n\r\n hideHorizontalLine: function () {\r\n if (this.hline === null) {\r\n return //silently\r\n }\r\n this.hline.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.hline !== null) {\r\n this.hline.remove()\r\n this.hline = null\r\n }\r\n }\r\n )\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A helper used to perform snapping to a grid, which is specified on the canvas via the various\r\n * properties defined in this class.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.ShowGridEditPolicy\r\n */\r\ndraw2d.policy.canvas.SnapToGridEditPolicy = draw2d.policy.canvas.SnapToEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToGridEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToGridEditPolicy\",\r\n\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n * @param {Number} grid the grid width of the canvas\r\n */\r\n init: function (grid, showGrid) {\r\n this._super()\r\n this.grid = grid || 20\r\n\r\n // Default Value for \"showGrid=true\"\r\n if (typeof showGrid ===\"undefined\" || showGrid===true) {\r\n this.renderer = new draw2d.policy.canvas.ShowGridEditPolicy({width: this.grid})\r\n }\r\n },\r\n\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n if (this.renderer) this.renderer.onInstall(canvas)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n if (this.renderer) this.renderer.onUninstall(canvas)\r\n },\r\n\r\n /**\r\n *\r\n * Set a new grid width/height\r\n *\r\n * @param {Number} grid\r\n * @since 5.0.3\r\n */\r\n setGrid: function (grid) {\r\n this.grid = grid\r\n if (this.renderer) this.renderer.setGrid(grid)\r\n },\r\n\r\n /**\r\n *\r\n * Applies a snapping correction to the given result.\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n * @since 2.3.0\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // do nothing for lines\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n return modifiedPos\r\n }\r\n\r\n let snapPoint = figure.getSnapToGridAnchor()\r\n\r\n modifiedPos.x = modifiedPos.x + snapPoint.x\r\n modifiedPos.y = modifiedPos.y + snapPoint.y\r\n\r\n\r\n modifiedPos.x = this.grid * Math.floor(((modifiedPos.x + this.grid / 2.0) / this.grid))\r\n modifiedPos.y = this.grid * Math.floor(((modifiedPos.y + this.grid / 2.0) / this.grid))\r\n\r\n modifiedPos.x = modifiedPos.x - snapPoint.x\r\n modifiedPos.y = modifiedPos.y - snapPoint.y\r\n\r\n return modifiedPos\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Snapping is based on the existing children of a container. When snapping a shape,\r\n * the edges of the bounding box will snap to edges of other rectangles generated\r\n * from the children of the given canvas.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.SnapToEditPolicy\r\n * @since 5.6.4\r\n */\r\ndraw2d.policy.canvas.SnapToInBetweenEditPolicy = draw2d.policy.canvas.SnapToEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToInBetweenEditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.canvas.SnapToInBetweenEditPolicy\",\r\n\r\n SNAP_THRESHOLD: 5,\r\n FADEOUT_DURATION: 500,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to geometry\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this._super(attr, setter, getter)\r\n\r\n this.bounds = null\r\n\r\n this.horizontalGuideLines = null\r\n this.verticalGuideLines = null\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseUp: function (figure, x, y, shiftKey, ctrlKey) {\r\n this.bounds = null\r\n this.hideHorizontalGuides(false)\r\n this.hideVerticalGuides(false)\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the coordinates to the canvas neighbours\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // do nothing for resize handles\r\n if (figure instanceof draw2d.ResizeHandle) {\r\n return modifiedPos\r\n }\r\n // do nothing for lines\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n return modifiedPos\r\n }\r\n\r\n\r\n var allowXChanges = modifiedPos.x === originalPos.x\r\n var allowYChanges = modifiedPos.y === originalPos.y\r\n\r\n var inputBounds = new draw2d.geo.Rectangle(modifiedPos.x, modifiedPos.y, figure.getWidth(), figure.getHeight())\r\n\r\n modifiedPos = modifiedPos.clone()\r\n\r\n if (allowXChanges === true) {\r\n var horizontal = this.snapHorizontal(inputBounds)\r\n\r\n // Show a horizontal line if the snapper has modified the inputPoint\r\n //\r\n if (horizontal.snapped) {\r\n // show the snap lines..\r\n this.showHorizontalGuides(figure, horizontal)\r\n\r\n // and snap the x coordinate\r\n modifiedPos.x += horizontal.diff\r\n }\r\n else {\r\n this.hideHorizontalGuides(true)\r\n }\r\n }\r\n else {\r\n this.hideHorizontalGuides(true)\r\n }\r\n\r\n if (allowYChanges === true) {\r\n var vertical = this.snapVertical(inputBounds)\r\n\r\n // Show a vertical guides if the snapper has modified the inputPoint\r\n //\r\n if (vertical.snapped) {\r\n // show the snap lines..\r\n this.showVerticalGuides(figure, vertical)\r\n\r\n // and snap the x coordinate\r\n modifiedPos.y += vertical.diff\r\n }\r\n else {\r\n this.hideVerticalGuides(true)\r\n }\r\n }\r\n else {\r\n this.hideVerticalGuides(true)\r\n }\r\n\r\n return modifiedPos\r\n },\r\n\r\n\r\n snapHorizontal: function (boundingBox) {\r\n var center = boundingBox.getCenter()\r\n if (this.bounds === null)\r\n this.populateBounds()\r\n\r\n var result = {\r\n point: center,\r\n snapped: false,\r\n snappedBox: boundingBox.clone()\r\n }\r\n\r\n\r\n var intersectionPoint = null\r\n\r\n // Calculate the intersections points p(i) of all left side edges of the bounding boxes\r\n // and the ray from the center of the drag&drop object to the left edge of the canva\r\n //\r\n // BBox of Drag&Drop\r\n // any Figure Figure\r\n //\r\n // ....+ ........\r\n // | . .\r\n // . |p(i) . .\r\n // . X<------------->+ .\r\n // . | . .\r\n // ....+ . .\r\n // ........\r\n //\r\n //\r\n var leftIntersections = []\r\n var leftInputPoint = center.clone()\r\n leftInputPoint.x = 0\r\n this.bounds.forEach(function (bbox, index) {\r\n intersectionPoint = draw2d.shape.basic.Line.intersection(bbox.getTopRight(), bbox.getBottomRight(), center, leftInputPoint)\r\n if (intersectionPoint !== null) {\r\n intersectionPoint.causedBBox = bbox\r\n leftIntersections.push(intersectionPoint)\r\n }\r\n })\r\n // we can abort if we didn't find an intersection on the left hand side\r\n if (leftIntersections.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greates X coordinate\r\n //\r\n leftIntersections.sort(function (a, b) {\r\n return b.x - a.x\r\n })\r\n\r\n\r\n // Calculate the intersections points p(i) of all right hand side edges of the\r\n // bounding boxes and the ray from the center of the drag&drop object to the\r\n // left edge of the canvas\r\n //\r\n // Drag&Drop bbox of any\r\n // Figure figure\r\n //\r\n // ........\r\n // . .\r\n // . . ...........\r\n // . +<-------------->X |\r\n // . . p(i)| |\r\n // . . | |\r\n // ........ | |\r\n // ...........\r\n //\r\n var rightIntersections = []\r\n var rightInputPoint = center.clone()\r\n rightInputPoint.x = Number.MAX_SAFE_INTEGER\r\n this.bounds.forEach(function (bbox, index) {\r\n intersectionPoint = draw2d.shape.basic.Line.intersection(bbox.getTopLeft(), bbox.getBottomLeft(), center, rightInputPoint)\r\n if (intersectionPoint !== null) {\r\n intersectionPoint.causedBBox = bbox\r\n rightIntersections.push(intersectionPoint)\r\n }\r\n })\r\n // we can abort if we didn't find an intersection on the right hand side\r\n if (rightIntersections.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greates X coordinate\r\n //\r\n rightIntersections.sort(function (a, b) {\r\n return a.x - b.x\r\n })\r\n\r\n\r\n // Snap the point (S) between the two founded intersections\r\n // p(i1) and p(i2)\r\n //\r\n // BBox FigureA Drag&Drop BBox of FigureB\r\n // Figure\r\n //\r\n // ....+ ........\r\n // | . .\r\n // . |p(i1) . S . ...........\r\n // . X<------------->X<-------------->X |\r\n // . | . . p(i2)| |\r\n // ....+ . . | |\r\n // ........ | |\r\n // ...........\r\n //\r\n var snappedRect = boundingBox.clone()\r\n var diff = ((leftIntersections[0].x + rightIntersections[0].x) / 2) - center.x\r\n\r\n snappedRect.x += diff\r\n\r\n return {\r\n snapped: Math.abs(diff) < this.SNAP_THRESHOLD,\r\n snappedRect: snappedRect,\r\n diff: diff,\r\n leftSide: leftIntersections[0],\r\n rightSide: rightIntersections[0]\r\n }\r\n },\r\n\r\n\r\n snapVertical: function (boundingBox) {\r\n var center = boundingBox.getCenter()\r\n\r\n if (this.bounds === null) {\r\n this.populateBounds()\r\n }\r\n\r\n var result = {\r\n point: center,\r\n snapped: false,\r\n snappedBox: boundingBox.clone()\r\n }\r\n\r\n\r\n var intersectionPoint = null\r\n\r\n // Calculate the intersections points p(i) of all left side edges of the bounding boxes\r\n // and the ray from the center of the drag&drop object to the left edge of the canva\r\n //\r\n // BBox of Drag&Drop\r\n // any Figure Figure\r\n //\r\n // ....+ ........\r\n // | . .\r\n // . |p(i) . .\r\n // . X<------------->+ .\r\n // . | . .\r\n // ....+ . .\r\n // ........\r\n //\r\n //\r\n var topIntersections = []\r\n var topInputPoint = center.clone()\r\n topInputPoint.y = 0\r\n this.bounds.forEach(function (bbox) {\r\n intersectionPoint = draw2d.shape.basic.Line.intersection(bbox.getBottomLeft(), bbox.getBottomRight(), center, topInputPoint)\r\n if (intersectionPoint !== null) {\r\n intersectionPoint.causedBBox = bbox\r\n topIntersections.push(intersectionPoint)\r\n }\r\n })\r\n // we can abort if we didn't find an intersection on the left hand side\r\n if (topIntersections.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greates X coordinate\r\n //\r\n topIntersections.sort(function (a, b) {\r\n return b.y - a.y\r\n })\r\n\r\n\r\n // Calculate the intersections points p(i) of all right hand side edges of the\r\n // bounding boxes and the ray from the center of the drag&drop object to the\r\n // left edge of the canvas\r\n //\r\n // Drag&Drop bbox of any\r\n // Figure figure\r\n //\r\n // ........\r\n // . .\r\n // . . ...........\r\n // . +<-------------->X |\r\n // . . p(i)| |\r\n // . . | |\r\n // ........ | |\r\n // ...........\r\n //\r\n var bottomIntersections = []\r\n var bottomInputPoint = center.clone()\r\n bottomInputPoint.y = Number.MAX_SAFE_INTEGER\r\n this.bounds.forEach(function (bbox) {\r\n intersectionPoint = draw2d.shape.basic.Line.intersection(bbox.getTopLeft(), bbox.getTopRight(), center, bottomInputPoint)\r\n if (intersectionPoint !== null) {\r\n intersectionPoint.causedBBox = bbox\r\n bottomIntersections.push(intersectionPoint)\r\n }\r\n })\r\n // we can abort if we didn't find an intersection on the right hand side\r\n if (bottomIntersections.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greates X coordinate\r\n //\r\n bottomIntersections.sort(function (a, b) {\r\n return a.y - b.y\r\n })\r\n\r\n\r\n // Snap the point (S) between the two founded intersections\r\n // p(i1) and p(i2)\r\n //\r\n // BBox FigureA Drag&Drop BBox of FigureB\r\n // Figure\r\n //\r\n // ....+ ........\r\n // | . .\r\n // . |p(i1) . S . ...........\r\n // . X<------------->X<-------------->X |\r\n // . | . . p(i2)| |\r\n // ....+ . . | |\r\n // ........ | |\r\n // ...........\r\n //\r\n var snappedRect = boundingBox.clone()\r\n var diff = ((topIntersections[0].y + bottomIntersections[0].y) / 2) - center.y\r\n\r\n snappedRect.y += diff\r\n\r\n return {\r\n snapped: Math.abs(diff) < this.SNAP_THRESHOLD,\r\n snappedRect: snappedRect,\r\n diff: diff,\r\n topSide: topIntersections[0],\r\n bottomSide: bottomIntersections[0]\r\n }\r\n },\r\n\r\n populateBounds: function () {\r\n var selection = this.canvas.getSelection().getAll(true)\r\n var bounds = this.bounds = []\r\n\r\n var figures = this.canvas.getFigures()\r\n figures.each(function (index, figure) {\r\n if (!selection.contains(figure)) {\r\n bounds.push(figure.getBoundingBox())\r\n }\r\n })\r\n },\r\n\r\n showHorizontalGuides: function (causedFigure, constraint) {\r\n if (this.horizontalGuideLines != null) {\r\n this.horizontalGuideLines.stop()\r\n this.horizontalGuideLines.remove()\r\n }\r\n\r\n var snapTopLeft = constraint.snappedRect.getTopLeft()\r\n var snapTopRight = constraint.snappedRect.getTopRight()\r\n var y = ((Math.min(constraint.leftSide.causedBBox.getTopRight().y, Math.min(constraint.rightSide.causedBBox.y, causedFigure.getY())) - 50) | 0) + 0.5\r\n\r\n this.canvas.paper.setStart()\r\n\r\n // Vertical lines from left to the right order\r\n //\r\n this.canvas.paper.path(\"M \" + ((constraint.leftSide.x | 0) + 0.5) + \" \" + y + \" L \" + ((constraint.leftSide.x | 0) + 0.5) + \" \" + constraint.leftSide.y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n\r\n this.canvas.paper.path(\"M \" + ((snapTopLeft.x | 0) + 0.5) + \" \" + y + \" L \" + ((snapTopLeft.x | 0) + 0.5) + \" \" + snapTopLeft.y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n\r\n this.canvas.paper.path(\"M \" + ((snapTopRight.x | 0) + 0.5) + \" \" + y + \" L \" + ((snapTopRight.x | 0) + 0.5) + \" \" + snapTopRight.y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n\r\n this.canvas.paper.path(\"M \" + ((constraint.rightSide.x | 0) + 0.5) + \" \" + y + \" L \" + ((constraint.rightSide.x | 0) + 0.5) + \" \" + constraint.rightSide.y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n\r\n\r\n // horizontal lines\r\n //\r\n this.canvas.paper.path(\"M \" + (constraint.leftSide.x) + \" \" + (y + 5) + \" L \" + (snapTopLeft.x) + \" \" + (y + 5)).attr({\r\n \"stroke\": this.lineColor.rgba(),\r\n \"stroke-width\": 1\r\n })\r\n this.canvas.paper.path(\"M \" + (constraint.rightSide.x) + \" \" + (y + 5) + \" L \" + (snapTopRight.x) + \" \" + (y + 5)).attr({\r\n \"stroke\": this.lineColor.rgba(),\r\n \"stroke-width\": 1\r\n })\r\n\r\n // 4 arrow heads starting on the left side and add one by one\r\n //\r\n this.canvas.paper.path(\r\n \" M \" + (constraint.leftSide.x + 5) + \" \" + (y)\r\n + \" L \" + (constraint.leftSide.x) + \" \" + (y + 5)\r\n + \" L \" + (constraint.leftSide.x + 5) + \" \" + (y + 10))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (snapTopLeft.x - 5) + \" \" + (y)\r\n + \" L \" + (snapTopLeft.x) + \" \" + (y + 5)\r\n + \" L \" + (snapTopLeft.x - 5) + \" \" + (y + 10))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (snapTopRight.x + 5) + \" \" + (y)\r\n + \" L \" + (snapTopRight.x) + \" \" + (y + 5)\r\n + \" L \" + (snapTopRight.x + 5) + \" \" + (y + 10))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (constraint.rightSide.x - 5) + \" \" + (y)\r\n + \" L \" + (constraint.rightSide.x) + \" \" + (y + 5)\r\n + \" L \" + (constraint.rightSide.x - 5) + \" \" + (y + 10))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n\r\n this.horizontalGuideLines = this.canvas.paper.setFinish()\r\n this.horizontalGuideLines.toFront()\r\n },\r\n\r\n /**\r\n *\r\n * Hide the horizontal snaping guides\r\n *\r\n * @param {Boolean} fast\r\n */\r\n hideHorizontalGuides: function (fast) {\r\n if (this.horizontalGuideLines == null) {\r\n return\r\n }\r\n\r\n if (fast === true) {\r\n if (this.horizontalGuideLines !== null) {\r\n this.horizontalGuideLines.remove()\r\n this.horizontalGuideLines = null\r\n }\r\n }\r\n else {\r\n this.horizontalGuideLines.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.horizontalGuideLines !== null) {\r\n this.horizontalGuideLines.remove()\r\n this.horizontalGuideLines = null\r\n }\r\n }\r\n )\r\n }\r\n },\r\n\r\n showVerticalGuides: function (causedFigure, constraint) {\r\n if (this.verticalGuideLines != null) {\r\n this.verticalGuideLines.stop()\r\n this.verticalGuideLines.remove()\r\n }\r\n\r\n var snapTopRight = constraint.snappedRect.getTopRight()\r\n var snapBottomRight = constraint.snappedRect.getBottomRight()\r\n var x = ((Math.max(constraint.topSide.causedBBox.getRight(), Math.max(constraint.bottomSide.causedBBox.getRight(), causedFigure.getX())) + 40) | 0) + 0.5\r\n\r\n this.canvas.paper.setStart()\r\n\r\n // Vertical lines from left to the right order\r\n //\r\n this.canvas.paper.path(\"M \" + x + \" \" + ((constraint.topSide.y | 0) + 0.5) + \" L \" + ((constraint.topSide.x | 0) + 0.5) + \" \" + ((constraint.topSide.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + x + \" \" + ((snapTopRight.y | 0) + 0.5) + \" L \" + ((snapTopRight.x | 0) + 0.5) + \" \" + ((snapTopRight.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + x + \" \" + ((snapBottomRight.y | 0) + 0.5) + \" L \" + ((snapBottomRight.x | 0) + 0.5) + \" \" + ((snapBottomRight.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + x + \" \" + ((constraint.bottomSide.y | 0) + 0.5) + \" L \" + ((constraint.bottomSide.x | 0) + 0.5) + \" \" + ((constraint.bottomSide.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n\r\n // horizontal lines\r\n //\r\n this.canvas.paper.path(\"M \" + (x - 5) + \" \" + (((constraint.topSide.y | 0) + 0.5)) + \" L \" + (x - 5) + \" \" + ((snapTopRight.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n this.canvas.paper.path(\"M \" + (x - 5) + \" \" + (((constraint.bottomSide.y | 0) + 0.5)) + \" L \" + (x - 5) + \" \" + ((snapBottomRight.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n\r\n // 4 arrow heads starting on the left side and add one by one\r\n //\r\n this.canvas.paper.path(\r\n \" M \" + (x - 10) + \" \" + (constraint.topSide.y + 5)\r\n + \" L \" + (x - 5) + \" \" + (constraint.topSide.y)\r\n + \" L \" + (x) + \" \" + (constraint.topSide.y + 5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (x - 10) + \" \" + (snapTopRight.y - 5)\r\n + \" L \" + (x - 5) + \" \" + (snapTopRight.y)\r\n + \" L \" + (x) + \" \" + (snapTopRight.y - 5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (x - 10) + \" \" + (snapBottomRight.y + 5)\r\n + \" L \" + (x - 5) + \" \" + (snapBottomRight.y)\r\n + \" L \" + (x) + \" \" + (snapBottomRight.y + 5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (x - 10) + \" \" + (constraint.bottomSide.y - 5)\r\n + \" L \" + (x - 5) + \" \" + (constraint.bottomSide.y)\r\n + \" L \" + (x) + \" \" + (constraint.bottomSide.y - 5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.verticalGuideLines = this.canvas.paper.setFinish()\r\n this.verticalGuideLines.toFront()\r\n },\r\n\r\n hideVerticalGuides: function () {\r\n if (this.verticalGuideLines == null) {\r\n return //silently\r\n }\r\n\r\n this.verticalGuideLines.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.verticalGuideLines !== null) {\r\n this.verticalGuideLines.remove()\r\n this.verticalGuideLines = null\r\n }\r\n }\r\n )\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Snapping is based on the existing children of a container. When snapping a shape,\r\n * the edges of the bounding box will snap to edges of other rectangles generated\r\n * from the children of the given canvas.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.SnapToEditPolicy\r\n */\r\ndraw2d.policy.canvas.SnapToVerticesEditPolicy = draw2d.policy.canvas.SnapToEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToVerticesEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToVerticesEditPolicy\",\r\n\r\n SNAP_THRESHOLD: 3,\r\n FADEOUT_DURATION: 300,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to geometry\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.constraints = null\r\n this.vline = null\r\n this.hline = null\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Figure} figure the shape below the mouse or null\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (figure, x, y, shiftKey, ctrlKey) {\r\n this.constraints = null\r\n this.hideVerticalLine()\r\n this.hideHorizontalLine()\r\n },\r\n\r\n /**\r\n * \r\n * Adjust the coordinates to the canvas neighbours\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // can only handle PolyLies at the moment\r\n //\r\n if (!(figure instanceof draw2d.shape.basic.VertexResizeHandle)) {\r\n return modifiedPos\r\n }\r\n\r\n var allowXChanges = modifiedPos.x === originalPos.x\r\n var allowYChanges = modifiedPos.y === originalPos.y\r\n\r\n // Coordinates already snapped to an x/y coordinate.\r\n // Don't change them and in this case no further calculation is required.\r\n //\r\n if (!allowXChanges && !allowYChanges) {\r\n return modifiedPos\r\n }\r\n\r\n var result = modifiedPos.clone()\r\n var correction = this.getCorrectionFor(figure, originalPos)\r\n\r\n if (allowXChanges && (correction.vertical.x !== Number.MAX_SAFE_INTEGER)) {\r\n result.x = correction.vertical.x\r\n this.showVerticalLine(originalPos, correction.vertical)\r\n }\r\n else {\r\n this.hideVerticalLine()\r\n }\r\n\r\n if (allowYChanges && (correction.horizontal.y !== Number.MAX_SAFE_INTEGER)) {\r\n result.y = correction.horizontal.y\r\n this.showHorizontalLine(originalPos, correction.horizontal)\r\n }\r\n else {\r\n this.hideHorizontalLine()\r\n }\r\n\r\n\r\n return result\r\n },\r\n\r\n\r\n getCorrectionFor: function (vertexResizeHandle, point) {\r\n var _this = this\r\n if (this.constraints === null) {\r\n this.constraints = []\r\n\r\n var lines = this.canvas.getLines()\r\n lines.each(function (i, line) {\r\n line.getVertices().each(function (ii, vertex) {\r\n if (vertexResizeHandle.index !== ii || vertexResizeHandle.owner !== line)\r\n _this.constraints.push(vertex)\r\n })\r\n })\r\n }\r\n\r\n var SNAP = this.SNAP_THRESHOLD\r\n var vertical = {x: Number.MAX_SAFE_INTEGER, y: Number.MAX_SAFE_INTEGER, diffy: Number.MAX_SAFE_INTEGER}\r\n var horizontal = {x: Number.MAX_SAFE_INTEGER, y: Number.MAX_SAFE_INTEGER, diffx: Number.MAX_SAFE_INTEGER}\r\n var diffx, diffy\r\n\r\n\r\n for (var i = 0; i < this.constraints.length; i++) {\r\n var entry = this.constraints[i]\r\n\r\n diffx = Math.abs(point.x - entry.x)\r\n diffy = Math.abs(point.y - entry.y)\r\n // we found a possible candidate for the vertical snap line\r\n //\r\n if (diffx < SNAP) {\r\n if (diffy < vertical.diffy) {\r\n vertical = {x: entry.x, y: entry.y, diffy: diffy}\r\n }\r\n }\r\n\r\n\r\n if (diffy < SNAP) {\r\n if (diffx < horizontal.diffx) {\r\n horizontal = {x: entry.x, y: entry.y, diffx: diffx}\r\n }\r\n }\r\n\r\n }\r\n return {vertical: vertical, horizontal: horizontal}\r\n },\r\n\r\n showVerticalLine: function (originalPos, snappedPos) {\r\n if (this.vline != null) {\r\n this.vline.stop()\r\n this.vline.remove()\r\n }\r\n\r\n\r\n var maxLength = this.canvas.getHeight()\r\n var x = (snappedPos.x | 0) + 0.5 // force a .5 number to avoid subpixel rendering. Blurry lines...\r\n this.canvas.paper.setStart()\r\n this.canvas.paper.path(\"M \" + x + \" 0 l 0 \" + maxLength)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + x + \" \" + originalPos.y + \" L \" + x + \" \" + snappedPos.y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.vline = this.canvas.paper.setFinish()\r\n this.vline.toBack()\r\n },\r\n\r\n hideVerticalLine: function () {\r\n if (this.vline == null) {\r\n return\r\n }\r\n this.vline.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.vline !== null) {\r\n this.vline.remove()\r\n this.vline = null\r\n }\r\n }\r\n )\r\n },\r\n\r\n showHorizontalLine: function (originalPos, snappedPos) {\r\n if (this.hline != null) {\r\n this.hline.stop()\r\n this.hline.remove()\r\n }\r\n\r\n var maxLength = this.canvas.getWidth()\r\n var y = (snappedPos.y | 0) + 0.5 // force a .5 number to avoid subpixel rendering. Blurry lines...\r\n\r\n this.canvas.paper.setStart()\r\n this.canvas.paper.path(\"M 0 \" + y + \" l \" + maxLength + \" 0\")\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + originalPos.x + \" \" + y + \" L \" + snappedPos.x + \" \" + y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.hline = this.canvas.paper.setFinish()\r\n this.hline.toBack()\r\n\r\n },\r\n\r\n hideHorizontalLine: function () {\r\n if (this.hline === null) {\r\n return //silently\r\n }\r\n this.hline.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.hline !== null) {\r\n this.hline.remove()\r\n this.hline = null\r\n }\r\n }\r\n )\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\nimport {Tweenable} from \"shifty\"\r\n\r\n\r\n/**\r\n * @class\r\n * Zoom support for a canvas. Use the mouse wheel and the shift key to zoom in/out.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.WheelZoomPolicy());\r\n * let shape = new draw2d.shape.basic.Text({text:\"Use the mouse wheel + SHIFT to zoom\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n * @since 5.8.0\r\n */\r\ndraw2d.policy.canvas.WheelZoomPolicy = draw2d.policy.canvas.ZoomPolicy.extend(\r\n /** @lends draw2d.policy.canvas.WheelZoomPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.WheelZoomPolicy\",\r\n\r\n /**\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n this.center = null\r\n this.debouncedZoomedCallback = this._debounce(() => {\r\n let canvas = this.canvas\r\n if (canvas !== null) {\r\n canvas.fireEvent(\"zoomed\", {value: canvas.zoomFactor})\r\n }\r\n this.center = null\r\n }, 200)\r\n },\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n canvas.setZoom(1)\r\n canvas.__wheelZoom = 1\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n\r\n // cleanup the canvas object and remove custom properties\r\n //\r\n delete canvas.__wheelZoom\r\n },\r\n\r\n\r\n /**\r\n *\r\n * called if the user uses the mouse wheel.\r\n *\r\n *\r\n * @param wheelDelta\r\n * @param {Number} x the x coordinate of the event\r\n * @param {Number} y the y coordinate of the event\r\n * @param shiftKey\r\n * @param ctrlKey\r\n * @since 5.8.0\r\n * @template\r\n * @returns {Boolean} return <b>false</b> to preven tthe default event operation (e.g. scrolling)\r\n */\r\n onMouseWheel: function (wheelDelta, x, y, shiftKey, ctrlKey) {\r\n // mouse wheel is only supported if the user presses the shift key.\r\n // normally the canvas scrolls during mouseWheel usage.\r\n //\r\n if (shiftKey === false) {\r\n return true\r\n }\r\n\r\n wheelDelta = wheelDelta / 1024\r\n\r\n let newZoom = ((Math.min(5, Math.max(0.1, this.canvas.zoomFactor + wheelDelta)) * 10000 | 0) / 10000)\r\n if (this.center === null) {\r\n let client = this.canvas.fromCanvasToDocumentCoordinate(x, y)\r\n\r\n this.center = {\r\n x: x,\r\n y: y,\r\n clientX: client.x,\r\n clientY: client.y\r\n }\r\n }\r\n this._zoom(newZoom, this.center)\r\n this.debouncedZoomedCallback()\r\n\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Set the new zoom level of the canvas.\r\n *\r\n * @param zoomFactor\r\n * @param animated\r\n */\r\n setZoom: function (zoomFactor, animated) {\r\n\r\n // determine the center of the current canvas. We try to keep the\r\n // current center during zoom operation\r\n //\r\n let scrollTop = this.canvas.getScrollTop()\r\n let scrollLeft = this.canvas.getScrollLeft()\r\n let scrollWidth = this.canvas.getScrollArea().width()\r\n let scrollHeight = this.canvas.getScrollArea().height()\r\n let centerY = scrollTop + (scrollHeight / 2) * this.canvas.zoomFactor\r\n let centerX = scrollLeft + (scrollWidth / 2) * this.canvas.zoomFactor\r\n\r\n if (animated) {\r\n let myTweenable = new Tweenable()\r\n myTweenable.tween({\r\n from: {'x': this.canvas.zoomFactor},\r\n to: {'x': zoomFactor},\r\n duration: 300,\r\n easing: \"easeOutSine\",\r\n step: params => {\r\n this._zoom(params.x, centerX, centerY)\r\n },\r\n finish: state => {\r\n this.debouncedZoomedCallback()\r\n }\r\n })\r\n }\r\n else {\r\n this._zoom(zoomFactor, {x: centerX, y: centerY})\r\n this.debouncedZoomedCallback()\r\n }\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {Number} zoom\r\n * @param {draw2d.geo.Point} center\r\n * @private\r\n */\r\n _zoom: function (zoom, center) {\r\n let canvas = this.canvas\r\n\r\n if (zoom === canvas.zoomFactor) {\r\n return\r\n }\r\n\r\n canvas.zoomFactor = zoom\r\n\r\n canvas.paper.setViewBox(0, 0, canvas.initialWidth, canvas.initialHeight)\r\n // Change the width and the height attributes manually through DOM\r\n // unfortunately the raphaelJS 'setSize' method changes the viewBox as well and this is unwanted in this case\r\n //\r\n canvas.html\r\n .find(\"svg\")\r\n .attr({\r\n 'width': canvas.initialWidth / zoom,\r\n 'height': canvas.initialHeight / zoom\r\n })\r\n\r\n\r\n // try to keep the document position to the given client position\r\n //\r\n if (center.clientX) {\r\n let coordsAfter = canvas.fromCanvasToDocumentCoordinate(center.x, center.y)\r\n canvas.scrollTo(this.canvas.getScrollTop() - (center.clientY - coordsAfter.y), canvas.getScrollLeft() - (center.clientX - coordsAfter.x))\r\n }\r\n\r\n canvas.fireEvent(\"zoom\", {value: canvas.zoomFactor})\r\n },\r\n\r\n\r\n // Returns a function, that, as long as it continues to be invoked, will not\r\n // be triggered. The function will be called after it stops being called for\r\n // N milliseconds. If `immediate` is passed, trigger the function on the\r\n // leading edge, instead of the trailing.\r\n _debounce: function (func, wait, immediate) {\r\n let timeout\r\n return () => {\r\n let context = this, args = arguments\r\n let later = () => {\r\n timeout = null\r\n if (!immediate) func.apply(context, args)\r\n }\r\n let callNow = immediate && !timeout\r\n clearTimeout(timeout)\r\n timeout = setTimeout(later, wait)\r\n if (callNow) func.apply(context, args)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\nimport {Tweenable} from \"shifty\"\r\n\r\n\r\n/**\r\n * @class\r\n * Generic zoom policy installable into a canvas object.\r\n * This is the legacy implementation of the very first zooming in\r\n * Draw2D. You can use this implementation if you want backward compatible.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n * @since 5.8.0\r\n */\r\ndraw2d.policy.canvas.ZoomPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ZoomPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.ZoomPolicy\",\r\n\r\n /**\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n canvas.setZoom(1)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n },\r\n\r\n /** \r\n * Set the new zoom factor for the canvas. The value must be between [0.01..10]\r\n *\r\n * // you can register an eventhandler to listen to the zoom factor of the canvas.\r\n * //\r\n * canvas.on(\"zoom\", function(emitterFigure, zoomData){\r\n * alert(\"canvas zoomed to:\"+zoomData.factor);\r\n * });\r\n *\r\n * @param {Number} zoomFactor new zoom factor.\r\n * @param {Boolean} [animated] set it to true for smooth zoom in/out\r\n **/\r\n setZoom: function (zoomFactor, animated) {\r\n let canvas = this.canvas\r\n\r\n let _zoom = function (z) {\r\n canvas.zoomFactor = Math.min(Math.max(0.01, z), 10)\r\n\r\n let viewBoxWidth = (canvas.initialWidth * (canvas.zoomFactor)) | 0\r\n let viewBoxHeight = (canvas.initialHeight * (canvas.zoomFactor)) | 0\r\n\r\n canvas.paper.setViewBox(0, 0, viewBoxWidth, viewBoxHeight)\r\n\r\n canvas.fireEvent(\"zoom\", {value: canvas.zoomFactor})\r\n }\r\n\r\n if (animated) {\r\n let myTweenable = new Tweenable()\r\n myTweenable.tween({\r\n from: {'x': canvas.zoomFactor},\r\n to: {'x': zoomFactor},\r\n duration: 300,\r\n easing: \"easeOutSine\",\r\n step: params => _zoom(params.x),\r\n finish: state => canvas.fireEvent(\"zoomed\", {value: canvas.zoomFactor})\r\n })\r\n }\r\n else {\r\n _zoom(zoomFactor)\r\n canvas.fireEvent(\"zoomed\", {value: canvas.zoomFactor})\r\n }\r\n }\r\n})\r\n","\r\n/**\r\n * @class\r\n *\r\n * The ClickConnectionCreatePolicy can be installed into the canvas to override the\r\n * default connection crate behaviour. Normally you can create connections by drag&drop a port.\r\n *\r\n * With this policy you can route the connection during creation.\r\n *\r\n * Creates a connection by clicking on a port.\r\n * <ul>\r\n * <li> click on the first port</li>\r\n * <li> click within the canvas to add additional vertices</li>\r\n * <li> click on the target port to draw the connection</li>\r\n * <li> press ESC to abort the operation (didn't work within this JSDoc)</li>\r\n * </ul>\r\n * <br>\r\n * <br>\r\n * <b>The generated connections didn't have any orthogonal constraints nor any other restrictions or guidance.</b>\r\n * <br>\r\n * <br>\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // Override the default connection creation.\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.ClickConnectionCreatePolicy());\r\n *\r\n * // create and add two Node which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start({x:50, y:50});\r\n * var endNode = new draw2d.shape.node.End({x:200, y:70});\r\n *\r\n * // add the two nodes to the canvas\r\n * //\r\n * canvas.add( start);\r\n * canvas.add( endNode);\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.connection.ConnectionCreatePolicy\r\n * @since 6.1.0\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.connection.ClickConnectionCreatePolicy = draw2d.policy.connection.ConnectionCreatePolicy.extend(\r\n /** @lends draw2d.policy.connection.ClickConnectionCreatePolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.connection.ClickConnectionCreatePolicy\",\r\n \r\n /**\r\n *\r\n * Creates a new connection create policy instance\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super( attr, setter, getter);\r\n\r\n this.port1 = null;\r\n this.beeline = null;\r\n this.pulse= null;\r\n this.tempConnection = null;\r\n\r\n this.vertices = [];\r\n },\r\n\r\n /**\r\n * \r\n * Called by the canvas if the user click on a figure.\r\n *\r\n * @param {draw2d.Figure} the figure under the click event. Can be null\r\n * @param {Number} x the x coordinate of the mouse during the click event\r\n * @param {Number} y the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 6.1.0\r\n */\r\n onClick: function(figure, x, y, shiftKey, ctrlKey)\r\n {\r\n var _this = this;\r\n var port = figure;\r\n\r\n if(port === null && this.port1 === null){\r\n return;\r\n }\r\n\r\n // nothing found at all\r\n //\r\n if(port===null){\r\n this.vertices.push(new draw2d.geo.Point(x,y));\r\n this.beeline.setStartPosition(x,y);\r\n this.tempConnection.setVertices(this.vertices);\r\n if(this.pulse!==null) {\r\n this.pulse.remove();\r\n this.pulse = null;\r\n }\r\n this.ripple(x,y,0);\r\n return;\r\n }\r\n\r\n //just consider ports\r\n //\r\n if(!(port instanceof draw2d.Port)){\r\n return;\r\n }\r\n\r\n // start connection create by selection the start port\r\n //\r\n if(this.port1===null){\r\n var canvas = port.getCanvas();\r\n this.port1 = port;\r\n this.vertices.push(port.getAbsolutePosition());\r\n this.beeline = new draw2d.shape.basic.Line({\r\n start: this.port1.getAbsolutePosition(),\r\n end: this.port1.getAbsolutePosition(),\r\n dasharray:\"- \",\r\n color:\"#2C70FF\"\r\n });\r\n\r\n this.beeline.hide= function(){\r\n _this.beeline.setCanvas(null);\r\n };\r\n\r\n this.beeline.show= function(canvas){\r\n _this.beeline.setCanvas(canvas);\r\n _this.beeline.shape.toFront();\r\n };\r\n this.beeline.show(canvas);\r\n\r\n this.tempConnection = new draw2d.shape.basic.PolyLine({\r\n start: this.port1.getAbsolutePosition(),\r\n end: this.port1.getAbsolutePosition(),\r\n stroke:2,\r\n color:\"#2C70FF\"\r\n });\r\n\r\n this.tempConnection.hide= function(){\r\n _this.tempConnection.setCanvas(null);\r\n };\r\n\r\n this.tempConnection.show= function(canvas){\r\n _this.tempConnection.setCanvas(canvas);\r\n _this.tempConnection.shape.toFront();\r\n };\r\n this.tempConnection.show(canvas);\r\n this.tempConnection.setVertices([this.port1.getAbsolutePosition(),this.port1.getAbsolutePosition()]);\r\n\r\n var a= function() {\r\n _this.tempConnection.shape.animate({\"stroke-width\" : 2}, 800, b);\r\n };\r\n var b=function() {\r\n _this.tempConnection.shape.animate({\"stroke-width\":1}, 800, a);\r\n };\r\n a();\r\n\r\n var pos = port.getAbsolutePosition();\r\n this.pulse =this.ripple(pos.x, pos.y, 1);\r\n return;\r\n }\r\n\r\n\r\n var possibleTarget = port.delegateTarget(this.port1);\r\n\r\n if(!(possibleTarget instanceof draw2d.Port)){\r\n return; // silently\r\n }\r\n\r\n var request = new draw2d.command.CommandType(draw2d.command.CommandType.CONNECT);\r\n request.source = this.port1;\r\n request.target = port;\r\n\r\n var command = null;\r\n if(this.port1 instanceof draw2d.InputPort) {\r\n command = this.port1.createCommand(request);\r\n }\r\n else{\r\n command = port.createCommand(request);\r\n }\r\n\r\n if(command!==null){\r\n this.vertices.push(port.getPosition());\r\n command.setConnection( this.createConnection());\r\n figure.getCanvas().getCommandStack().execute(command);\r\n this.beeline.hide();\r\n this.tempConnection.hide();\r\n if(this.pulse!==null) {\r\n this.pulse.remove();\r\n this.pulse = null;\r\n }\r\n this.beeline = null;\r\n this.port1=null;\r\n this.vertices = [];\r\n }\r\n\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseMove: function(canvas, x, y, shiftKey, ctrlKey)\r\n {\r\n if(this.beeline!==null){\r\n this.beeline.setEndPosition(x,y);\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user press a key down\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n **/\r\n onKeyDown: function(canvas, keyCode, shiftKey, ctrlKey)\r\n {\r\n var KEYCODE_ENTER = 13;\r\n var KEYCODE_ESC = 27;\r\n if (keyCode === KEYCODE_ESC && this.beeline!==null){\r\n this.beeline.hide();\r\n this.tempConnection.hide();\r\n this.beeline = null;\r\n this.port1=null;\r\n this.vertices = [];\r\n if(this.pulse!=null) {\r\n this.pulse.remove();\r\n this.pulse=null;\r\n }\r\n }\r\n },\r\n\r\n\r\n createConnection: function()\r\n {\r\n var connection = this._super();\r\n if(this.vertices.length===2){\r\n connection.setRouter(new draw2d.layout.connection.DirectRouter());\r\n }\r\n else {\r\n connection.setRouter(new draw2d.layout.connection.VertexRouter());\r\n connection.setVertices(this.vertices);\r\n }\r\n connection.setRadius(10);\r\n return connection;\r\n }\r\n\r\n\r\n\r\n});\r\n\r\n","\r\n/**\r\n * @class\r\n * A composed connection create policy. Use this to install more than one\r\n * ConnectionCreatePolicy into the canvas. Normally it is not allowed to install\r\n * more than one policy from the same type.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.connection.ConnectionCreatePolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.connection.ComposedConnectionCreatePolicy = draw2d.policy.connection.ConnectionCreatePolicy.extend(\r\n /** @lends draw2d.policy.connection.ComposedConnectionCreatePolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.connection.ComposedConnectionCreatePolicy\",\r\n\r\n /**\r\n *\r\n * Creates a new connection create policy instance\r\n *\r\n * @param {array} policies the policies to use\r\n */\r\n init: function( policies )\r\n {\r\n this.policies = policies;\r\n this._super();\r\n },\r\n\r\n onMouseDown: function()\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onMouseDown.apply(p,_arg);\r\n });\r\n },\r\n onMouseDrag: function()\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onMouseDrag.apply(p,_arg);\r\n });\r\n },\r\n\r\n onMouseUp: function()\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onMouseUp.apply(p,_arg);\r\n });\r\n },\r\n\r\n onClick: function()\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onClick.apply(p,_arg);\r\n });\r\n },\r\n onMouseMove: function()\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onMouseMove.apply(p,_arg);\r\n });\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n **/\r\n onKeyUp: function(canvas, keyCode, shiftKey, ctrlKey)\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onKeyUp.apply(p,_arg);\r\n });\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n **/\r\n onKeyDown: function(canvas, keyCode, shiftKey, ctrlKey)\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onKeyDown.apply(p,_arg);\r\n });\r\n },\r\n\r\n /**\r\n * \r\n * Called if the policy is installed into the canvas.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n */\r\n onInstall: function(canvas)\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onInstall.apply(p,_arg);\r\n });\r\n },\r\n\r\n /**\r\n * \r\n * Called if the policy is deinstalled from the canvas\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n */\r\n onUninstall: function(canvas)\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onUninstall.apply(p,_arg);\r\n });\r\n }\r\n\r\n});\r\n\r\n","\r\n/**\r\n * @class\r\n * Base class for connection creation by user interaction.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.KeyboardPolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.connection.ConnectionCreatePolicy = draw2d.policy.canvas.KeyboardPolicy.extend(\r\n /** @lends draw2d.policy.connection.ConnectionCreatePolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.connection.ConnectionCreatePolicy\",\r\n\r\n /**\r\n *\r\n * Creates a new connection create policy instance\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super( attr,setter,getter);\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Factory method to create the connection to insert.\r\n *\r\n * @returns {draw2d.Connection}\r\n * @template\r\n */\r\n createConnection:function()\r\n {\r\n return new draw2d.Connection({\r\n router: new draw2d.layout.connection.DirectRouter()\r\n });\r\n },\r\n\r\n\r\n ripple: function(x,y, type)\r\n {\r\n switch(type){\r\n case 0:\r\n var circle = this.canvas.paper.circle(x, y, 3, 3).attr({fill: null, stroke:\"#d0d0ff\"});\r\n var anim = Raphael.animation(\r\n {transform: \"s6\", opacity:0.0, \"stroke-width\":3 },\r\n 500,\r\n \"linear\",\r\n function(){circle.remove()}\r\n );\r\n circle.animate(anim);\r\n // return an emmpty raphael.set. The circle removes itself after animation is done\r\n //\r\n return this.canvas.paper.set();\r\n break;\r\n case 1:\r\n var circle1 = this.canvas.paper.circle(x, y, 3, 3).attr({fill: null, stroke:\"#3f72bf\"});\r\n var circle2 = this.canvas.paper.circle(x, y, 3, 3).attr({fill: null, stroke:\"#ff0000\"});\r\n var anim1 = Raphael.animation(\r\n {transform: \"s6\", opacity:0.0, \"stroke-width\":1 },\r\n 1200,\r\n \"linear\"\r\n ).repeat(Infinity);\r\n circle1.animate(anim1);\r\n var anim2 = Raphael.animation(\r\n {transform: \"s12\", opacity:0.0, \"stroke-width\":4 },\r\n 500,\r\n \"linear\",\r\n function(){circle2.remove()}\r\n );\r\n circle2.animate(anim2);\r\n\r\n // return the \"circle1\". This shape must be remove by the caller\r\n // \"circle2\" is removed automaticly\r\n //\r\n return circle1;\r\n break;\r\n }\r\n }\r\n\r\n\r\n});\r\n\r\n","\r\n/**\r\n * @class\r\n *\r\n * The DragConnectionCreatePolicy is the default configuration for connection creation.\r\n * You must drag a port and drop them onto another port to create connection.\r\n *\r\n * Creates a connection by drag&drop on a port.\r\n * <ul>\r\n * <li> click on the first port</li>\r\n * <li> drag it to the target port</li>\r\n * <li> drop it onto the target</li>\r\n * </ul>\r\n * <br>\r\n * <br>\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // Override the default connection creation.\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy());\r\n *\r\n * // create and add two Node which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start({x:50, y:50});\r\n * var endNode = new draw2d.shape.node.End({x:200, y:70});\r\n *\r\n * // add the two nodes to the canvas\r\n * //\r\n * canvas.add( start);\r\n * canvas.add( endNode);\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.connection.ConnectionCreatePolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.connection.DragConnectionCreatePolicy = draw2d.policy.connection.ConnectionCreatePolicy.extend(\r\n /** @lends draw2d.policy.connection.DragConnectionCreatePolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.connection.DragConnectionCreatePolicy\",\r\n \r\n /**\r\n *\r\n * Creates a new connection create policy instance\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super(attr, setter, getter);\r\n\r\n this.mouseDraggingElement =null;\r\n this.currentDropTarget = null;\r\n this.currentTarget = null;\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDown: function(canvas, x, y, shiftKey, ctrlKey)\r\n {\r\n //just consider ports\r\n //\r\n var port = canvas.getBestFigure(x, y);\r\n\r\n\r\n // nothing found at all\r\n //\r\n if(port===null){\r\n return;\r\n }\r\n\r\n // may there is a resize handle below the port or another figure\r\n // in this case the ResizeHandle has prio. and handled by another\r\n // Policy\r\n if(!(port instanceof draw2d.Port)){\r\n return;\r\n }\r\n\r\n // this can happen if the user release the mouse button outside the window during a drag&drop\r\n // operation. In this case we must fire the \"onDragEnd\" event postpond.\r\n //\r\n if(port.isInDragDrop===true){\r\n port.onDragEnd( x, y, shiftKey, ctrlKey);\r\n port.isInDragDrop=false;\r\n }\r\n\r\n // introspect the port only if it is draggable at all\r\n //\r\n if (port.isDraggable()) {\r\n var canDragStart = port.onDragStart(x - port.getAbsoluteX(), y - port.getAbsoluteY(), shiftKey, ctrlKey);\r\n if(canDragStart) {\r\n port.fireEvent(\"dragstart\", {x: x - port.getAbsoluteX(), y: y - port.getAbsoluteY(), shiftKey: shiftKey, ctrlKey: ctrlKey});\r\n }\r\n\r\n // Element send a veto about the drag&drop operation\r\n this.mouseDraggingElement = canDragStart===false ? null : port;\r\n this.mouseDownElement = port;\r\n }\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @template\r\n */\r\n onMouseDrag: function(canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n {\r\n try{\r\n if (this.mouseDraggingElement !== null) {\r\n var de = this.mouseDraggingElement;\r\n var ct = this.currentTarget;\r\n\r\n de.isInDragDrop = true;\r\n de.onDrag(dx, dy, dx2, dy2, shiftKey, ctrlKey);\r\n\r\n var target=canvas.getBestFigure(de.getAbsoluteX(),de.getAbsoluteY(), de);\r\n\r\n // the hovering element has been changed\r\n if(target!==ct){\r\n if(ct!==null){\r\n ct.onDragLeave(de);\r\n ct.fireEvent(\"dragLeave\",{draggingElement:de});\r\n de.editPolicy.each(function(i,e){\r\n if(e instanceof draw2d.policy.port.PortFeedbackPolicy){\r\n e.onHoverLeave(canvas, de, ct);\r\n }\r\n });\r\n }\r\n\r\n // possible hoverEnter event\r\n //\r\n if(target!==null){\r\n this.currentTarget= ct = target.delegateTarget(de);\r\n if(ct!==null){\r\n ct.onDragEnter(de); // legacy\r\n ct.fireEvent(\"dragEnter\",{draggingElement:de});\r\n de.editPolicy.each(function(i,e){\r\n if(e instanceof draw2d.policy.port.PortFeedbackPolicy){\r\n e.onHoverEnter(canvas, de, ct);\r\n }\r\n });\r\n }\r\n }\r\n else{\r\n this.currentTarget = null;\r\n }\r\n }\r\n\r\n\r\n var p = canvas.fromDocumentToCanvasCoordinate(canvas.mouseDownX + (dx/canvas.zoomFactor), canvas.mouseDownY + (dy/canvas.zoomFactor));\r\n var target = canvas.getBestFigure(p.x, p.y,this.mouseDraggingElement);\r\n\r\n if (target !== this.currentDropTarget) {\r\n if (this.currentDropTarget !== null) {\r\n this.currentDropTarget.onDragLeave(this.mouseDraggingElement);\r\n this.currentDropTarget.fireEvent(\"dragLeave\",{draggingElement:this.mouseDraggingElement});\r\n this.currentDropTarget = null;\r\n }\r\n if (target !== null) {\r\n this.currentDropTarget = target.delegateTarget(this.mouseDraggingElement);\r\n // inform all listener that the element has accept the dragEnter event\r\n //\r\n if( this.currentDropTarget !==null) {\r\n this.currentDropTarget.onDragEnter(this.mouseDraggingElement); // legacy\r\n this.currentDropTarget.fireEvent(\"dragEnter\", {draggingElement: this.mouseDraggingElement});\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch(exc){\r\n console.log(exc);\r\n debugger;\r\n }\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Figure} figure the shape below the mouse or null\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function(canvas, x, y, shiftKey, ctrlKey)\r\n {\r\n if (this.mouseDraggingElement !== null) {\r\n\r\n var de = this.mouseDraggingElement;\r\n var ct = this.currentTarget;\r\n // start CommandStack transaction\r\n canvas.getCommandStack().startTransaction();\r\n\r\n de.onDragEnd(x, y, shiftKey, ctrlKey);\r\n // notify all installed policies\r\n //\r\n if(ct){\r\n de.editPolicy.each(function(i,e){\r\n if(e instanceof draw2d.policy.port.PortFeedbackPolicy){\r\n e.onHoverLeave(canvas, de, ct);\r\n }\r\n });\r\n }\r\n\r\n de.editPolicy.each(function(i,e){\r\n if(e instanceof draw2d.policy.figure.DragDropEditPolicy){\r\n e.onDragEnd(canvas, de, x, y, shiftKey, ctrlKey);\r\n }\r\n });\r\n\r\n // Reset the drag&drop flyover information\r\n //\r\n this.currentTarget = null;\r\n de.isInDragDrop =false;\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n de.fireEvent(\"dragend\",{x:x, y:y, shiftKey:shiftKey, ctrlKey:ctrlKey});\r\n\r\n\r\n // check if we drop the port onto a valid\r\n // drop target and create a connection if possible\r\n //\r\n if (this.currentDropTarget !== null) {\r\n this.mouseDraggingElement.onDrop(this.currentDropTarget, x, y, shiftKey, ctrlKey);\r\n\r\n this.currentDropTarget.onDragLeave(this.mouseDraggingElement);\r\n this.currentDropTarget.fireEvent(\"dragLeave\", {draggingElement: this.mouseDraggingElement});\r\n\r\n // Ports accepts only Ports as DropTarget\r\n //\r\n if(this.currentDropTarget instanceof draw2d.Port){\r\n var request = new draw2d.command.CommandType(draw2d.command.CommandType.CONNECT);\r\n request.source = this.currentDropTarget;\r\n request.target = this.mouseDraggingElement;\r\n var command = this.mouseDraggingElement.createCommand(request);\r\n\r\n if(command!==null){\r\n command.setConnection(this.createConnection());\r\n canvas.getCommandStack().execute(command);\r\n this.currentDropTarget.onCatch(this.mouseDraggingElement, x, y, shiftKey, ctrlKey);\r\n }\r\n }\r\n }\r\n\r\n // end command stack trans\r\n canvas.getCommandStack().commitTransaction();\r\n this.currentDropTarget = null;\r\n this.mouseDraggingElement = null;\r\n }\r\n },\r\n\r\n\r\n createConnection: function()\r\n {\r\n var connection = this._super();\r\n connection.setRouter(new draw2d.layout.connection.DirectRouter());\r\n\r\n return connection;\r\n }\r\n\r\n\r\n});\r\n\r\n","\r\n/**\r\n * @class\r\n *\r\n * The OrthogonalConnectionCreatePolicy can be installed into the canvas to override the\r\n * default connection crate behaviour. Normaly you can create connections by drag&drop a port.\r\n *\r\n * With this policy you can route the connection during creation.\r\n *\r\n * Creates a connection by clicking on a port.\r\n * <ul>\r\n * <li> click on the first port</li>\r\n * <li> click within the canvas to add additional vertices</li>\r\n * <li> click on the target port to draw the connection</li>\r\n * <li> press ESC to abort the operation (didn't work within this JSDoc)</li>\r\n * </ul>\r\n * <br>\r\n * <br>\r\n * <b>The generated connection has always perpendicular segments.</b>\r\n * <br>\r\n * <br>\r\n *\r\n *\r\n * @example\r\n *\r\n * // Override the default connection creation.\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.OrthogonalConnectionCreatePolicy());\r\n *\r\n * // create and add two Node which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start({x:50, y:50});\r\n * var endNode = new draw2d.shape.node.End({x:200, y:70});\r\n *\r\n * // add the two nodes to the canvas\r\n * //\r\n * canvas.add( start);\r\n * canvas.add( endNode);\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.connection.ConnectionCreatePolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.connection.OrthogonalConnectionCreatePolicy = draw2d.policy.connection.ConnectionCreatePolicy.extend(\r\n /** @lends draw2d.policy.connection.ClickConnectionCreatePolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.connection.ClickConnectionCreatePolicy\",\r\n\r\n /**\r\n *\r\n * Creates a new connection create policy instance\r\n\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super( attr, setter, getter);\r\n\r\n this.port1 = null;\r\n this.beeline = null;\r\n this.pulse= null;\r\n this.tempConnection = null;\r\n\r\n this.vertices = new draw2d.util.ArrayList();\r\n },\r\n\r\n /**\r\n * \r\n * Called by the canvas if the user click on a figure.\r\n *\r\n * @param {draw2d.Figure} the figure under the click event. Can be null\r\n * @param {Number} x the x coordinate of the mouse during the click event\r\n * @param {Number} y the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 6.1.0\r\n *\r\n * @template\r\n */\r\n onClick: function(figure, x, y, shiftKey, ctrlKey)\r\n {\r\n var UP = draw2d.geo.Rectangle.DIRECTION_UP;\r\n var RIGHT= draw2d.geo.Rectangle.DIRECTION_RIGHT;\r\n var DOWN = draw2d.geo.Rectangle.DIRECTION_DOWN;\r\n var LEFT = draw2d.geo.Rectangle.DIRECTION_LEFT;\r\n\r\n var _this = this;\r\n var port = figure;// .getCanvas().getBestFigure(x, y);\r\n\r\n // nothing to do\r\n if(port === null && this.port1 === null){\r\n return;\r\n }\r\n\r\n // nothing found at all\r\n //\r\n if(port===null){\r\n var canvas = this.port1.getCanvas();\r\n var newPos = this.beeline.getEndPosition();\r\n this.vertices.add(newPos);\r\n this.beeline.setStartPosition(this.beeline.getEndPosition());\r\n this.tempConnection.setVertices(this.vertices);\r\n if(this.pulse!==null) {\r\n this.pulse.remove();\r\n this.pulse = null;\r\n }\r\n this.ripple(newPos.x, newPos.y, 0);\r\n return;\r\n }\r\n\r\n // we just considering ports\r\n //\r\n if(!(port instanceof draw2d.Port)){\r\n return;\r\n }\r\n\r\n // start connection create by selection the start port\r\n //\r\n if(this.port1===null){\r\n var canvas = port.getCanvas();\r\n this.port1 = port;\r\n this.vertices.add(port.getAbsolutePosition());\r\n this.beeline = new draw2d.shape.basic.Line({\r\n start: this.port1.getAbsolutePosition(),\r\n end: this.port1.getAbsolutePosition(),\r\n dasharray:\"- \",\r\n color:\"#2C70FF\"\r\n });\r\n\r\n this.beeline.hide= function(){\r\n _this.beeline.setCanvas(null);\r\n };\r\n\r\n this.beeline.show= function(canvas){\r\n _this.beeline.setCanvas(canvas);\r\n _this.beeline.shape.toFront();\r\n };\r\n this.beeline.show(canvas);\r\n\r\n this.tempConnection = new draw2d.shape.basic.PolyLine({\r\n start: this.port1.getAbsolutePosition(),\r\n end: this.port1.getAbsolutePosition(),\r\n stroke:2,\r\n color:\"#2C70FF\"\r\n });\r\n\r\n this.tempConnection.hide= function(){\r\n _this.tempConnection.setCanvas(null);\r\n };\r\n\r\n this.tempConnection.show= function(canvas){\r\n _this.tempConnection.setCanvas(canvas);\r\n _this.tempConnection.shape.toFront();\r\n };\r\n this.tempConnection.show(canvas);\r\n this.tempConnection.setVertices([this.port1.getAbsolutePosition(),this.port1.getAbsolutePosition()]);\r\n\r\n var a= function() {\r\n _this.tempConnection.shape.animate({\"stroke-width\" : 2}, 800, b);\r\n };\r\n var b=function() {\r\n _this.tempConnection.shape.animate({\"stroke-width\":1}, 800, a);\r\n };\r\n a();\r\n\r\n canvas.paper.setStart();\r\n\r\n // delete the previews puls if the user press twice on the starting port\r\n //\r\n if(this.pulse!==null) {\r\n this.pulse.remove();\r\n this.pulse = null;\r\n }\r\n\r\n var pos = port.getAbsolutePosition();\r\n this.ripple(pos.x, pos.y, 1);\r\n this.pulse = canvas.paper.setFinish();\r\n }\r\n else {\r\n var possibleTarget = port.delegateTarget(this.port1);\r\n\r\n if (!(possibleTarget instanceof draw2d.Port)) {\r\n return; // silently\r\n }\r\n\r\n // check whenever the target port allows a connection\r\n //\r\n var request = new draw2d.command.CommandType(draw2d.command.CommandType.CONNECT);\r\n request.source = this.port1;\r\n request.target = port;\r\n var command = null;\r\n if (this.port1 instanceof draw2d.InputPort) {\r\n command = this.port1.createCommand(request);\r\n }\r\n else {\r\n command = port.createCommand(request);\r\n }\r\n\r\n if (command !== null) {\r\n var connection = this.createConnection();\r\n command.setConnection(connection);\r\n port.getCanvas().getCommandStack().execute(command);\r\n\r\n\r\n this.beeline.hide();\r\n this.tempConnection.hide();\r\n if (this.pulse !== null) {\r\n this.pulse.remove();\r\n this.pulse = null;\r\n }\r\n this.beeline = null;\r\n this.port1 = null;\r\n\r\n // use the default routing if the user didn't add some\r\n // vertices\r\n if(this.vertices.getSize()<=2){\r\n return;\r\n }\r\n\r\n var MINDIST = command.getConnection().getRouter().MINDIST;\r\n var beforeVertex = this.vertices.get(this.vertices.getSize()-2);\r\n var lastVertex = this.vertices.last();\r\n var portPos = port.getAbsolutePosition();\r\n var lastSegmentDir = UP;\r\n if(lastVertex.x === beforeVertex.x){\r\n lastSegmentDir = lastVertex.y< beforeVertex.y ? UP : DOWN;\r\n }\r\n else{\r\n lastSegmentDir = lastVertex.x< beforeVertex.x ? LEFT : RIGHT;\r\n }\r\n\r\n // CALCULATE THE LAST MILE OF THE CONNECTION\r\n //\r\n // ensure that we have a valid \"manhattan style\" connection.\r\n // We must add or adjust some points or segments.\r\n //\r\n // The code below creates and adjust the points in that way that the\r\n // DOTTED line is the calculated part to the user defined vertices.\r\n // ==================================\r\n //\r\n switch(port.getConnectionDirection(this.port1)){\r\n case UP:\r\n switch(lastSegmentDir){\r\n case UP:\r\n // o..................o lastVertex\r\n // | . |\r\n // | . |\r\n // | +----O----+ |\r\n // ------o | portPos | o------------\r\n // | | beforeVertex\r\n // +---------+\r\n //\r\n if(lastVertex.y<(portPos.y-MINDIST)) {\r\n this.vertices.add(new draw2d.geo.Point(portPos.x, lastVertex.y));\r\n this.vertices.add(portPos);\r\n }\r\n // ...................\r\n // . . .\r\n // . +----O----+ .\r\n // o | portPos | o lastVertex\r\n // | | | |\r\n // | +---------+ |\r\n // -------o o------------\r\n // beforeVertex\r\n //\r\n else{\r\n lastVertex.y = portPos.y-MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(portPos.x, lastVertex.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case RIGHT:\r\n // ..............................\r\n // . . .\r\n // . . .\r\n // o------->o +----O----+ o---------------->O\r\n // | | portPos | | beforeVertex lastVertex\r\n // | | | |\r\n // | +---------+\r\n if(lastVertex.y>(portPos.y-MINDIST)){\r\n beforeVertex.y = portPos.y-MINDIST;\r\n lastVertex.x = portPos.x;\r\n lastVertex.y = beforeVertex.y;\r\n this.vertices.add(portPos);\r\n }\r\n //\r\n // beforeVertex lastVertex\r\n // o---------->o..................o------------->O\r\n // | . |\r\n // | +----O----+ |\r\n // | | portPos | |\r\n // | | | |\r\n // +---------+\r\n else{\r\n lastVertex.x = portPos.x;\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case DOWN:\r\n // beforeVertex\r\n // ------o..................o------------\r\n // | . |\r\n // | . |\r\n // V +----O----+ V\r\n // o | portPos | o lastVertex\r\n // | |\r\n // +---------+\r\n //\r\n if(lastVertex.y<(portPos.y-MINDIST)) {\r\n beforeVertex.x = portPos.x;\r\n lastVertex.setPosition(portPos);\r\n }\r\n // ...................\r\n // . . .\r\n // . +----O----+ . beforeVertex\r\n // -------o | portPos | o------------\r\n // | | | |\r\n // V +---------+ V\r\n // o o\r\n // lastVertex\r\n //\r\n else{\r\n lastVertex.y = portPos.y-MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(portPos.x,lastVertex.y ));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case LEFT:\r\n // ..................................\r\n // . . .\r\n // . . .\r\n // o<--------o +----O----+ o<-------------O beforeVertex\r\n // | | portPos | lastVertex |\r\n // | | | |\r\n // +---------+\r\n if(lastVertex.y>(portPos.y-MINDIST)){\r\n beforeVertex.y = portPos.y-MINDIST;\r\n lastVertex.x = portPos.x;\r\n lastVertex.y = beforeVertex.y;\r\n this.vertices.add(portPos);\r\n }\r\n // | |\r\n // | |\r\n // o<--------o................o<-------------O\r\n // . lastVertex beforeVertex\r\n // +----O----+\r\n // | portPos |\r\n // | |\r\n // +---------+\r\n else{\r\n lastVertex.x = portPos.x;\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n }\r\n break;\r\n case RIGHT:\r\n switch(lastSegmentDir){\r\n case UP:\r\n // o lastVertex\r\n // |\r\n // |\r\n // ------------------o beforeVertex\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O.......\r\n // | | .\r\n // +----------+ .\r\n // o lastVertex\r\n // |\r\n // |\r\n // -----------------o beforeVertex\r\n //\r\n if(lastVertex.x > (portPos.x+MINDIST)){\r\n lastVertex.y = portPos.y;\r\n this.vertices.add(portPos);\r\n }\r\n // lastVertex\r\n // o...............\r\n // | .\r\n // | .\r\n // ----o beforeVertex .\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O........\r\n // | | .\r\n // +----------+ .\r\n // o...............\r\n // | lastVertex\r\n // |\r\n //------o\r\n // beforeVertex\r\n //\r\n //\r\n else{\r\n this.vertices.add(new draw2d.geo.Point(portPos.x+MINDIST, lastVertex.y));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x+MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case RIGHT:\r\n // beforeVertex lastVertex\r\n // o-------------->o\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O.......\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // o-------------->o\r\n // beforeVertex lastVertex\r\n //\r\n if(lastVertex.x > (portPos.x+MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // beforeVertex lastVertex\r\n // o------------>o.........\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O.......\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // o----------->o..........\r\n // beforeVertex lastVertex\r\n //\r\n else{\r\n lastVertex.x = portPos.x+MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case DOWN:\r\n // ----------------o beforeVertex\r\n // |\r\n // |\r\n // o lastVertex\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O.......\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // --------------o beforeVertex\r\n // |\r\n // |\r\n // o lastVertex\r\n //\r\n if(lastVertex.x > (portPos.x+MINDIST)){\r\n lastVertex.y = portPos.y;\r\n this.vertices.add(portPos);\r\n }\r\n // -----o beforeVertex\r\n // |\r\n // | lastVertex\r\n // o...........\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O.......\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // ----o beforeVertex .\r\n // | .\r\n // | lastVertex .\r\n // o...............\r\n //\r\n else{\r\n this.vertices.add(new draw2d.geo.Point(portPos.x+MINDIST, lastVertex.y));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x+MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case LEFT:\r\n // lastVertex beforeVertex\r\n // o<--------------o\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O..\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // o<--------------o\r\n // lastVertex beforeVertex\r\n //\r\n if(lastVertex.x > (portPos.x+MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // lastVertex beforeVertex\r\n // o<-----------------------o\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O....\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // o<----------------------o\r\n // lastVertex beforeVertex\r\n //\r\n else{\r\n lastVertex.x = portPos.x+MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n }\r\n break;\r\n case DOWN:\r\n switch(lastSegmentDir){\r\n case UP:\r\n // o o lastVertex\r\n // | |\r\n // | |\r\n // | +---------+ |\r\n // ------o | | o------------\r\n // . | portPos | . beforeVertex\r\n // . +----O----+ .\r\n // . . .\r\n // ....................\r\n //\r\n if(lastVertex.y<(portPos.y+MINDIST)) {\r\n lastVertex.y = portPos.y+MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(portPos.x, lastVertex.y));\r\n this.vertices.add(portPos);\r\n }\r\n // +---------+\r\n // | |\r\n // | portPos |\r\n // +----O----+\r\n // .\r\n // o.................o lastVertex\r\n // | |\r\n // | |\r\n // -------o o------------\r\n // beforeVertex\r\n //\r\n else{\r\n lastVertex.x = portPos.x;\r\n lastVertex.y = portPos.y;\r\n beforeVertex.x = portPos.x;\r\n }\r\n break;\r\n case RIGHT:\r\n // +---------+\r\n // | |\r\n // | portPos |\r\n // o------->o +----O----+ o--------------->O\r\n // | . . | beforeVertex . lastVertex\r\n // | .....................|.................\r\n // |\r\n //\r\n //\r\n if(lastVertex.y<(portPos.y+MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y+MINDIST));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x, portPos.y+MINDIST));\r\n this.vertices.add(portPos);\r\n }\r\n // +---------+\r\n // | |\r\n // | portPos |\r\n // +----O----+\r\n // .\r\n // ...................................\r\n // . beforeVertex . lastVertex\r\n // o---------->o o------------->O\r\n // | |\r\n // | |\r\n //\r\n else{\r\n lastVertex.x = portPos.x;\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case DOWN:\r\n // beforeVertex\r\n // ------o o------------\r\n // | |\r\n // | |\r\n // V +---------+ V\r\n // o | | o lastVertex\r\n // . | portPos | .\r\n // . +----O----+ .\r\n // . . .\r\n // ....................\r\n //\r\n if(lastVertex.y<(portPos.y+MINDIST)) {\r\n lastVertex.y = portPos.y+MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(portPos.x,lastVertex.y ));\r\n this.vertices.add(portPos);\r\n }\r\n //\r\n // +---------+ beforeVertex\r\n // -------o | portPos | o------------\r\n // | | | |\r\n // V +----O----+ V\r\n // o . o\r\n // .................. lastVertex\r\n //\r\n else{\r\n this.vertices.add(new draw2d.geo.Point(portPos.x,lastVertex.y ));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case LEFT:\r\n //\r\n // o<--------o +---------+ o<-------------O beforeVertex\r\n // . | | | . lastVertex |\r\n // . | | portPos | . |\r\n // . +----O----+ .\r\n // . . .\r\n // ..............................\r\n //\r\n if(lastVertex.y<(portPos.y-MINDIST)){\r\n beforeVertex.y = portPos.y-MINDIST;\r\n lastVertex.x = portPos.x;\r\n lastVertex.y = beforeVertex.y;\r\n this.vertices.add(portPos);\r\n }\r\n //\r\n // +---------+\r\n // | | | |\r\n // | | portPos | |\r\n // | +----O----+ |\r\n // | . |\r\n // o<--------o...................o<---------o\r\n //\r\n else{\r\n lastVertex.x = portPos.x;\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n }\r\n break;\r\n case LEFT:\r\n switch(lastSegmentDir){\r\n case UP:\r\n // ................o lastVertex\r\n // . |\r\n // . |\r\n // --.---------------o beforeVertex\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ....o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // ................o lastVertex\r\n // |\r\n // |\r\n // -----------------o beforeVertex\r\n //\r\n if(lastVertex.x >= (portPos.x-MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, lastVertex.y));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n //\r\n // +----------+\r\n // | |\r\n // ......o portPos |\r\n // . | |\r\n // . +----------+\r\n // o\r\n // | lastVertex\r\n // |\r\n //------o\r\n // beforeVertex\r\n //\r\n //\r\n else if(lastVertex.y > portPos.y && lastVertex.x < (portPos.x-MINDIST)){\r\n lastVertex.y = portPos.y;\r\n this.vertices.add(portPos);\r\n }\r\n // lastVertex\r\n // o..\r\n // | .\r\n // | .\r\n // ----o . beforeVertex\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ....o portPos |\r\n // | |\r\n // +----------+\r\n //\r\n else{\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, lastVertex.y));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case RIGHT:\r\n // beforeVertex lastVertex\r\n // o-------------->o\r\n // .\r\n // ....................\r\n // .\r\n // . +----------+\r\n // . | |\r\n // .......o portPos |\r\n // | |\r\n // +----------+\r\n //\r\n if(lastVertex.y<portPos.y && lastVertex.x > (portPos.x-MINDIST)){\r\n var center = portPos.y-(portPos.y-lastVertex.y)/2;\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, center));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, center));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // +----------+\r\n // | |\r\n // .......o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // ....................\r\n // .\r\n // o-------------->o\r\n // beforeVertex lastVertex\r\n //\r\n else if(lastVertex.y>portPos.y && lastVertex.x > (portPos.x-MINDIST)){\r\n var center = portPos.y+(lastVertex.y-portPos.y)/2;\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, center));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, center));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // beforeVertex lastVertex\r\n // o------------>o\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ....o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // o----------->o\r\n // beforeVertex lastVertex\r\n //\r\n else{\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case DOWN:\r\n // -----------o beforeVertex\r\n // |\r\n // |\r\n // V\r\n // ................o lastVertex\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ........o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // . --------o beforeVertex\r\n // . |\r\n // . |\r\n // . V\r\n // .................o lastVertex\r\n //\r\n if(lastVertex.x >= (portPos.x-MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, lastVertex.y));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // -----o beforeVertex\r\n // |\r\n // |\r\n // o lastVertex\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ........o portPos |\r\n // . | |\r\n // . +----------+\r\n // beforeVertex.\r\n // ------------o\r\n // |\r\n // |\r\n // lastVertex o\r\n //\r\n else{\r\n lastVertex.y=portPos.y;\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case LEFT:\r\n // lastVertex beforeVertex\r\n // o<--------------o\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ....... o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // o<--------------o\r\n // lastVertex beforeVertex\r\n //\r\n if(lastVertex.x < (portPos.x-MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // lastVertex beforeVertex\r\n // .......o<-----------------------o\r\n // .\r\n // . +----------+\r\n // . | |\r\n // .....o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // ........o<----------------------o\r\n // lastVertex beforeVertex\r\n //\r\n else{\r\n lastVertex.x = portPos.x-MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n }\r\n break;\r\n }\r\n\r\n if(this.vertices.getSize()>3) {\r\n connection._routingMetaData.routedByUserInteraction = true;\r\n connection.setVertices(this.vertices);\r\n }\r\n this.vertices.clear();\r\n }\r\n }\r\n\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseMove: function(canvas, x, y, shiftKey, ctrlKey)\r\n {\r\n if(this.beeline!==null){\r\n this.beeline.setEndPosition(this.orthogonal(this.vertices.last(), {x:x,y:y}));\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user press a key down\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onKeyDown: function(canvas, keyCode, shiftKey, ctrlKey)\r\n {\r\n var KEYCODE_ENTER = 13;\r\n var KEYCODE_ESC = 27;\r\n if (keyCode === KEYCODE_ESC && this.beeline!==null){\r\n this.beeline.hide();\r\n this.tempConnection.hide();\r\n this.beeline = null;\r\n this.port1=null;\r\n this.vertices.clear();\r\n if(this.pulse!=null) {\r\n this.pulse.remove();\r\n this.pulse=null;\r\n }\r\n }\r\n },\r\n\r\n orthogonal: function(anchor, p)\r\n {\r\n // calculate vertical line distance\r\n //\r\n var xDiff = Math.abs(anchor.x- p.x)+10;\r\n var xDist = draw2d.geo.Line.distance(anchor.x-xDiff, anchor.y, anchor.x+xDiff, anchor.y, p.x, p.y);\r\n\r\n // calculate horizontal line distance\r\n //\r\n var yDiff = Math.abs(anchor.y- p.y)+10;\r\n var yDist = draw2d.geo.Line.distance(anchor.x, anchor.y-yDiff, anchor.x, anchor.y+yDiff, p.x, p.y);\r\n\r\n return yDist>xDist? {x: p.x, y:anchor.y}:{x: anchor.x, y: p.y};\r\n },\r\n\r\n createConnection: function()\r\n {\r\n var connection = this._super();\r\n connection.attr({radius:7, stroke:3});\r\n connection.setRouter(new draw2d.layout.connection.InteractiveManhattanConnectionRouter());\r\n return connection;\r\n }\r\n\r\n});\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Provide support for selecting and positioning a non-resizable figure.\r\n * Selection is indicated via rectangular handle that outlines the figure with a 1-pixel black\r\n * dotted line.\r\n *\r\n *\r\n * @example\r\n *\r\n * circle =new draw2d.shape.basic.Circle({diameter:50, x:90, y:50});\r\n * circle.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy());\r\n * canvas.add(circle);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.AntSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.AntSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.AntSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {draw2d.Canvas} canvas the responsible canvas\r\n * @param {draw2d.Figure} figure the figure to decorate with a selection feedback\r\n * @param {Boolean} [isPrimarySelection]\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n let box = new draw2d.shape.basic.Rectangle({bgColor: null, dasharray: \"- \", color: \"#2C70FF\"})\r\n box.hide = function () {\r\n // IMPORTANT\r\n // don't add/remove this rectangle to the canvas resizeHandles. This rect isn't responsible for any hitTest or\r\n // dragDrop operation\r\n //canvas.resizeHandles.remove(box);\r\n box.setCanvas(null)\r\n }\r\n box.show = function (canvas) {\r\n box.setCanvas(canvas)\r\n // IMPORTANT\r\n // don't add/remove this rectangle to the canvas resizeHandles. This rect isn't responsible for any hitTest or\r\n // dragDrop operation\r\n //canvas.resizeHandles.remove(box);\r\n //canvas.resizeHandles.add(box);\r\n box.shape.toFront()\r\n }\r\n box.show(canvas)\r\n figure.selectionHandles.add(box)\r\n\r\n // add a bee line to the parent if a parent is given and if the bounding box\r\n // of the parent and the figure didn't have intersections\r\n if (figure.getParent() !== null) {\r\n let line = new draw2d.shape.basic.Line({opacity: 0.5, bgColor: null, dasharray: \"- \", color: \"#2C70FF\"})\r\n //line.setStartPosition(figure.getBoundingBox().getCenter());\r\n //line.setEndPosition(figure.getParent().getBoundingBox().getCenter());\r\n line.show = (canvas) => line.setCanvas(canvas)\r\n line.hide = () => line.setCanvas(null)\r\n line.show(canvas)\r\n figure.selectionHandles.add(line)\r\n this._updateBeeLine(line, figure)\r\n }\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback if the figure has been moved\r\n *\r\n * @param figure\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n return // silently\r\n }\r\n\r\n let margin = 2\r\n let box = figure.selectionHandles.first()\r\n box.setPosition(figure.getAbsolutePosition().translate(-margin, -margin))\r\n box.setDimension(figure.getWidth() + margin*2, figure.getHeight() + margin*2)\r\n box.setRotationAngle(figure.getRotationAngle())\r\n\r\n if (figure.selectionHandles.getSize() > 1) {\r\n this._updateBeeLine(figure.selectionHandles.get(1), figure)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * @param {draw2d.shape.basic.Line} line\r\n * @param {draw2d.Figure} figure\r\n * @private\r\n */\r\n _updateBeeLine: function (line, figure) {\r\n let parent = figure.getParent()\r\n\r\n if (parent === null) {\r\n return\r\n }\r\n\r\n if (parent instanceof draw2d.shape.basic.Line) {\r\n let center = figure.getBoundingBox().getCenter()\r\n let projection = parent.pointProjection(center)\r\n if (projection === null) {\r\n let p1 = line.getStartPosition()\r\n let p2 = line.getEndPosition()\r\n let d1 = center.distance(p1)\r\n let d2 = center.distance(p1)\r\n projection = d1 < d2 ? p1 : p2\r\n }\r\n let intersection = figure.getBoundingBox().intersectionWithLine(center, projection)\r\n if (intersection.getSize() > 0) {\r\n line.setStartPosition(figure.getBoundingBox().intersectionWithLine(center, projection).get(0))\r\n .setEndPosition(projection)\r\n }\r\n else {\r\n line.setStartPosition(figure.getBoundingBox().getCenter())\r\n .setEndPosition(projection)\r\n }\r\n }\r\n else {\r\n let rect1 = figure.getBoundingBox(),\r\n rect2 = parent.getBoundingBox()\r\n\r\n let center1 = rect1.getCenter()\r\n let center2 = rect2.getCenter()\r\n // the rectangle overlaps -> return the center of booth\r\n if (rect1.intersects(rect2)) {\r\n line.setStartPosition(center1)\r\n .setEndPosition(center2)\r\n }\r\n // one rect is inside the other rect\r\n //\r\n else if (rect1.hitTest(center2) || rect2.hitTest(center1)) {\r\n line.setStartPosition(center1)\r\n .setEndPosition(center2)\r\n }\r\n else {\r\n rect1.scale(3, 3)\r\n rect2.scale(3, 3)\r\n\r\n line.setStartPosition(rect1.intersectionWithLine(center1, center2).get(0))\r\n .setEndPosition(rect2.intersectionWithLine(center1, center2).get(0))\r\n }\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * circle =new draw2d.shape.basic.Circle();\r\n * circle.installEditPolicy(new draw2d.policy.figure.BigRectangleSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.BigRectangleSelectionFeedbackPolicy = draw2d.policy.figure.RectangleSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.BigRectangleSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.BigRectangleSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n\r\n createResizeHandle: function (owner, type){\r\n return new draw2d.ResizeHandle({ owner:owner, type:type, width:15, height:15 });\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.BusSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.BusSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.BusSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n let r2 = this.createResizeHandle(figure, 2) // 2 = CENTER_TOP\r\n let r4 = this.createResizeHandle(figure, 4) // 4 = RIGHT_MIDDLE\r\n let r6 = this.createResizeHandle(figure, 6) // 6 = CENTER_BOTTOM\r\n let r8 = this.createResizeHandle(figure, 8) // 8 = LEFT_MIDDLE\r\n\r\n figure.selectionHandles.add(r2, r4, r6, r8)\r\n\r\n r2.setDraggable(figure.isResizeable())\r\n r4.setDraggable(figure.isResizeable())\r\n r6.setDraggable(figure.isResizeable())\r\n r8.setDraggable(figure.isResizeable())\r\n\r\n r2.show(canvas)\r\n r4.show(canvas)\r\n r6.show(canvas)\r\n r8.show(canvas)\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback if the figure has been moved\r\n *\r\n * @param figure\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n return // silently\r\n }\r\n let r2 = figure.selectionHandles.find(handle => handle.type === 2)\r\n let r4 = figure.selectionHandles.find(handle => handle.type === 4)\r\n let r6 = figure.selectionHandles.find(handle => handle.type === 6)\r\n let r8 = figure.selectionHandles.find(handle => handle.type === 8)\r\n\r\n let objHeight = figure.getHeight()\r\n let objWidth = figure.getWidth()\r\n let xPos = figure.getX()\r\n let yPos = figure.getY()\r\n\r\n r2?.setPosition(xPos + (objWidth / 2) - (r2.getWidth() / 2), yPos - r2.getHeight())\r\n r4?.setPosition(xPos + objWidth, yPos + (objHeight / 2) - (r4.getHeight() / 2))\r\n r6?.setPosition(xPos + (objWidth / 2) - (r6.getWidth() / 2), yPos + objHeight)\r\n r8?.setPosition(xPos - r8.getWidth(), yPos + (objHeight / 2) - (r8.getHeight() / 2))\r\n },\r\n\r\n createResizeHandle: function (owner, type){\r\n return new draw2d.ResizeHandle({ owner:owner, type:type, width:10, height:10 });\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Called by the framework if the user edit the position of a figure with a drag drop operation.\r\n * Sub class like SelectionEditPolicy or RegionEditPolicy can adjust the position of the figure or the selections handles.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.FigureEditPolicy\r\n */\r\ndraw2d.policy.figure.DragDropEditPolicy = draw2d.policy.figure.FigureEditPolicy.extend(\r\n /** @lends draw2d.policy.figure.DragDropEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.DragDropEditPolicy\",\r\n\r\n /**\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n this.moveCallback = (emitter, event) => {\r\n this.moved(emitter.getCanvas(), emitter)\r\n }\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the host if the policy has been installed.\r\n *\r\n * @param {draw2d.Canvas|draw2d.Figure} host\r\n */\r\n onInstall: function (host) {\r\n this._super(host)\r\n host.on(\"move\", this.moveCallback)\r\n },\r\n\r\n /**\r\n *\r\n * Called by the host if the policy has been uninstalled.\r\n *\r\n * @param {draw2d.Canvas|draw2d.Figure} host\r\n */\r\n onUninstall: function (host) {\r\n this._super(host)\r\n host.off(this.moveCallback)\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the related shape has init a drag&drop\r\n * operation\r\n *\r\n * The Policy can send a veto to prevent the DragDrop operation\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} return <b>false</b> to send a veto to the drag operation\r\n */\r\n onDragStart: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n figure.shape.attr({cursor: \"move\"})\r\n\r\n // this happens if you drag&drop the shape outside of the screen and\r\n // release the mouse button outside the window. We restore the alpha\r\n // with the next drag&drop operation\r\n if (figure.isMoving === true) {\r\n figure.setAlpha(figure.originalAlpha)\r\n }\r\n\r\n figure.originalAlpha = figure.getAlpha()\r\n figure.isMoving = false\r\n\r\n // return value since 6.1.0\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework during drag a figure.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @template\r\n */\r\n onDrag: function (canvas, figure) {\r\n // enable the alpha blending of the first real move of the object\r\n //\r\n if (figure.isMoving === false) {\r\n figure.isMoving = true\r\n figure.setAlpha(figure.originalAlpha * 0.4)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the drag drop operation ends.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onDragEnd: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n figure.shape.attr({cursor: \"default\"})\r\n figure.isMoving = false\r\n figure.setAlpha(figure.originalAlpha)\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the coordinates to the rectangle/region of this constraint.\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {Number} [y]\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n *\r\n * @template\r\n */\r\n adjustPosition: function (figure, x, y) {\r\n // do nothing per default implementation\r\n if (x instanceof draw2d.geo.Point) {\r\n return x\r\n }\r\n\r\n return new draw2d.geo.Point(x, y)\r\n },\r\n\r\n /**\r\n *\r\n * ensure that the dimension didn't goes outside the given restrictions\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {Number} w\r\n * @param {number} h\r\n * @returns {draw2d.geo.Rectangle} the constraint position of the figure\r\n */\r\n adjustDimension: function (figure, w, h) {\r\n return new draw2d.geo.Rectangle(0, 0, w, h)\r\n },\r\n\r\n /**\r\n *\r\n * Callback if the figure has moved\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Called by the framework if the user edit the position of a figure with a drag drop operation.\r\n * Sub class like SelectionEditPolicy or RegionEditPolicy can adjust the position of the figure\r\n * or the selections handles.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.EditPolicy\r\n * @since 4.4.0\r\n */\r\ndraw2d.policy.figure.FigureEditPolicy = draw2d.policy.EditPolicy.extend(\r\n /** @lends draw2d.policy.figure.FigureEditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.FigureEditPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n * \r\n * Called if the user press the right mouse on the figure.<br>\r\n * You can either override the \"onContextMenu\" method of the figure or install an editor policy and override this method.\r\n * Booth is valid and possible.\r\n *\r\n * @param {draw2d.Figure|draw2d.shape.basic.Line} figure the figure below the mouse\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n * @since 4.4.0\r\n */\r\n onRightMouseDown: function (figure, x, y, shiftKey, ctrlKey) {\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * circle =new draw2d.shape.basic.Circle();\r\n * circle.installEditPolicy(new draw2d.policy.figure.GlowSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label(\"Click on the circle to see the selection feedback\"),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.GlowSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.GlowSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.GlowSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n figure.setGlow(true)\r\n this.moved(canvas, figure)\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Figure} figure the unselected figure\r\n */\r\n onUnselect: function (canvas, figure) {\r\n this._super(canvas, figure)\r\n figure.setGlow(false)\r\n }\r\n\r\n})\r\n","\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.BusSelectionFeedbackPolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.figure.HBusSelectionFeedbackPolicy = draw2d.policy.figure.BusSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.HBusSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.HBusSelectionFeedbackPolicy\",\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function( attr, setter, getter)\r\n {\r\n this._super( attr, setter, getter);\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the figure has been moved\r\n *\r\n * @param figure\r\n *\r\n * @template\r\n */\r\n moved: function(canvas, figure){\r\n if(figure.selectionHandles.isEmpty()){\r\n return; // silently\r\n }\r\n var r4= figure.selectionHandles.find(function(handle){return handle.type===4});\r\n var r8= figure.selectionHandles.find(function(handle){return handle.type===8});\r\n\r\n r4.setDimension(r4.getWidth(), figure.getHeight());\r\n r8.setDimension(r4.getWidth(), figure.getHeight());\r\n\r\n this._super(canvas,figure);\r\n }\r\n\r\n\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * An EditPolicy for use with Figures. With this edit policy you can move the shape only in a horizontal manner.\r\n *\r\n *\r\n * @example\r\n * // add some demo figure to the canvas\r\n * var circle =new draw2d.shape.basic.Circle({diameter:50, x:10, y:30});\r\n * canvas.add(circle);\r\n *\r\n * // add the edit policy to the shape. At this point you can move the shape only\r\n * // horizontal\r\n * circle.installEditPolicy(new draw2d.policy.figure.HorizontalEditPolicy());\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.figure.HorizontalEditPolicy = draw2d.policy.figure.DragDropEditPolicy.extend(\r\n /** @lends draw2d.policy.figure.HorizontalEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.HorizontalEditPolicy\",\r\n\r\n /**\r\n * Creates a new constraint object\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * It is only possible to drag&drop the element in a horizontal line\r\n *\r\n * @param figure\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {number} [y]\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n adjustPosition: function (figure, x, y) {\r\n return new draw2d.geo.Point(x, figure.getY())\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A SelectionFeedbackPolicy with resize handles (rectangles) on each side and corner of the shape\r\n *\r\n *\r\n * @example\r\n *\r\n * circle =new draw2d.shape.basic.Circle({diameter:50});\r\n * circle.installEditPolicy(new draw2d.policy.RectangleSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.RaftSelectionFeedbackPolicy = draw2d.policy.figure.RectangleSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.RaftSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.RaftSelectionFeedbackPolicy\",\r\n\r\n\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n createResizeHandle: function (owner, type){\r\n return new draw2d.shape.composite.RaftResizeHandle({ owner:owner, type:type, width:10, height:10 });\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A SelectionFeedbackPolicy with resize handles (rectangles) on each side and corner of the shape\r\n *\r\n *\r\n * @example\r\n *\r\n * circle =new draw2d.shape.basic.Circle({diameter:50});\r\n * circle.installEditPolicy(new draw2d.policy.RectangleSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.RectangleSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.RectangleSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.RectangleSelectionFeedbackPolicy\",\r\n /**\r\n * Creates a selection feedback for a shape.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n // Add a dotted line rectangle to the figure. Override the show/hide method of the standard\r\n // figure to avoid adding these element to the hit test of the canvas. In this case the element\r\n // is just visible but not part of the model or responsible for any drag/drop operation\r\n // #2C70FF #2096fc\r\n let box = new draw2d.shape.basic.Rectangle({bgColor: null, dashArray: \"- \", color: \"#2C70FF\", stroke: 0.5})\r\n box.hide = function () {\r\n // IMPORTANT\r\n // don't add/remove this rectangle to the canvas resizeHandles. This rect isn't responsible for any hitTest or\r\n // dragDrop operation\r\n //canvas.resizeHandles.remove(box);\r\n box.setCanvas(null)\r\n }\r\n box.show = function (canvas) {\r\n box.setCanvas(canvas)\r\n // IMPORTANT\r\n // don't add/remove this rectangle to the canvas resizeHandles. This rect isn't responsible for any hitTest or\r\n // dragDrop operation\r\n //canvas.resizeHandles.remove(box);\r\n //canvas.resizeHandles.add(box);\r\n box.toFront(figure)\r\n }\r\n\r\n // create standard Resize handles for the figure\r\n //\r\n let r1 = this.createResizeHandle(figure, 1) // 1 = LEFT TOP\r\n let r3 = this.createResizeHandle(figure, 3) // 3 = RIGHT_TOP\r\n let r5 = this.createResizeHandle(figure, 5) // 5 = RIGHT_BOTTOM\r\n let r7 = this.createResizeHandle(figure, 7) // 7 = LEFT_BOTTOM\r\n figure.selectionHandles.add(r1, r3, r5, r7)\r\n r1.show(canvas)\r\n r3.show(canvas)\r\n r5.show(canvas)\r\n r7.show(canvas)\r\n\r\n\r\n // change the look&feel of the corner resizehandles if the\r\n // figure isn't resizeable\r\n //\r\n if (figure.isResizeable() === false) {\r\n let attr = {bgColor: null, draggable:false}\r\n r1.attr(attr)\r\n r3.attr(attr)\r\n r5.attr(attr)\r\n r7.attr(attr)\r\n r1.setDraggable(false)\r\n r3.setDraggable(false)\r\n r5.setDraggable(false)\r\n r7.setDraggable(false)\r\n }\r\n\r\n // show only the additional resizehandles if the figure is resizeable and didn't care about\r\n // the aspect ration\r\n //\r\n if ((!figure.getKeepAspectRatio()) && figure.isResizeable()) {\r\n let r2 = this.createResizeHandle(figure, 2) // 2 = CENTER_TOP\r\n let r4 = this.createResizeHandle(figure, 4) // 4 = RIGHT_MIDDLE\r\n let r6 = this.createResizeHandle(figure, 6) // 6 = CENTER_BOTTOM\r\n let r8 = this.createResizeHandle(figure, 8) // 8 = LEFT_MIDDLE\r\n figure.selectionHandles.add(r2, r4, r6, r8)\r\n r2.show(canvas)\r\n r4.show(canvas)\r\n r6.show(canvas)\r\n r8.show(canvas)\r\n }\r\n\r\n // add the reference of the \"ant box\" to the figure as well. But wee add them\r\n // to the end of the array because inherit classes expect the resizehandles\r\n // on index 0-7.\r\n //\r\n figure.selectionHandles.add(box)\r\n\r\n // call the box.show() at last to ensure that the resize handles are above the\r\n // rectangle. The rectangle did a toFront(parentShape);\r\n box.show(canvas)\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback if the figure has been moved. In this case we must update the position of the\r\n * resize handles and the \"ant\" box.\r\n *\r\n * @param figure\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n\r\n if (figure.selectionHandles.isEmpty()) {\r\n return // silently\r\n }\r\n\r\n let margin = 3 * canvas.getZoom()\r\n let objHeight = figure.getHeight()\r\n let objWidth = figure.getWidth()\r\n let xPos = figure.getAbsoluteX()\r\n let yPos = figure.getAbsoluteY()\r\n\r\n let r1 = figure.selectionHandles.find(handle => handle.type === 1)\r\n let r3 = figure.selectionHandles.find(handle => handle.type === 3)\r\n let r5 = figure.selectionHandles.find(handle => handle.type === 5)\r\n let r7 = figure.selectionHandles.find(handle => handle.type === 7)\r\n\r\n r1.setPosition(xPos-r1.getWidth(),yPos-r1.getHeight());\r\n r3.setPosition(xPos+objWidth,yPos-r3.getHeight());\r\n r5.setPosition(xPos+objWidth,yPos+objHeight);\r\n r7.setPosition(xPos-r7.getWidth(),yPos+objHeight);\r\n\r\n if (!figure.getKeepAspectRatio() && figure.isResizeable()) {\r\n let r2 = figure.selectionHandles.find(handle => handle.type === 2)\r\n let r4 = figure.selectionHandles.find(handle => handle.type === 4)\r\n let r6 = figure.selectionHandles.find(handle => handle.type === 6)\r\n let r8 = figure.selectionHandles.find(handle => handle.type === 8)\r\n\r\n r2.setPosition(xPos+(objWidth/2)-(r2.getWidth()/2),yPos-r2.getHeight());\r\n r4.setPosition(xPos+objWidth,yPos+(objHeight/2)-(r4.getHeight()/2));\r\n r6.setPosition(xPos+(objWidth/2)-(r6.getWidth()/2),yPos+objHeight);\r\n r8.setPosition(xPos-r8.getWidth(),yPos+(objHeight/2)-(r8.getHeight()/2));\r\n }\r\n let box = figure.selectionHandles.last()\r\n box.attr({\r\n x:xPos-margin,\r\n y:yPos-margin,\r\n width:objWidth + margin*2,\r\n height: objHeight + margin*2,\r\n stroke:canvas.getZoom()\r\n })\r\n\r\n box.setRotationAngle(figure.getRotationAngle())\r\n },\r\n\r\n createResizeHandle: function (owner, type){\r\n return new draw2d.ResizeHandle({ owner:owner, type:type, width:10, height:10 });\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * An EditPolicy for use with Figures. The constraint for RegionEditPolicy is a Rectangle. It is\r\n * not possible to move the related figure outside this constrained area.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.figure.RegionEditPolicy = draw2d.policy.figure.DragDropEditPolicy.extend(\r\n /** @lends draw2d.policy.figure.RegionEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.RegionEditPolicy\",\r\n\r\n /**\r\n * Creates a new constraint object\r\n *\r\n * @param {Number|draw2d.geo.Rectangle} x x coordinate or a rectangle as constraint for the assigned figure.\r\n * @param {Number} y\r\n * @param {Number} w\r\n * @param {Number} h\r\n */\r\n init: function (x, y, w, h) {\r\n this._super()\r\n if (x instanceof draw2d.geo.Rectangle) {\r\n this.constRect = x\r\n } else if (typeof h === \"number\") {\r\n this.constRect = new draw2d.geo.Rectangle(x, y, w, h)\r\n } else {\r\n throw \"Invalid parameter. RegionEditPolicy need a rectangle as parameter in the constructor\"\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Update the constraint bounding box for the policy.\r\n *\r\n * @param {draw2d.geo.Rectangle} boundingBox the constraint rectangle\r\n * @since 4.8.2\r\n * @returns {this}\r\n */\r\n setBoundingBox: function (boundingBox) {\r\n this.constRect = boundingBox\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns the constraint bounding box for the policy.\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n */\r\n getBoundingBox: function () {\r\n return this.constRect\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the coordinates to the rectangle/region of this constraint.\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {Number} [y]\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n adjustPosition: function (figure, x, y) {\r\n let r = null\r\n if (x instanceof draw2d.geo.Point) {\r\n r = new draw2d.geo.Rectangle(x.x, x.y, figure.getWidth(), figure.getHeight())\r\n } else {\r\n r = new draw2d.geo.Rectangle(x, y, figure.getWidth(), figure.getHeight())\r\n }\r\n r = this.constRect.moveInside(r)\r\n return r.getTopLeft()\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the dimension of the rectangle to fit into the region of the policy\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {Number} w\r\n * @param {Number} h\r\n * @returns {draw2d.geo.Rectangle} the constraint position of the figure\r\n */\r\n adjustDimension: function (figure, w, h) {\r\n let diffW = (figure.getAbsoluteX() + w) - this.constRect.getRight()\r\n let diffH = (figure.getAbsoluteY() + h) - this.constRect.getBottom()\r\n\r\n if (diffW > 0) {\r\n w = w - diffW\r\n }\r\n if (diffH > 0) {\r\n h = h - diffH\r\n }\r\n\r\n return new draw2d.geo.Rectangle(0, 0, w, h)\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Selection feedback policy without \"marching ant lines\" or any other rectangle highlight. Just\r\n * some resize handles at each corner of the shape.\r\n *\r\n *\r\n * @example\r\n * circle =new draw2d.shape.basic.Circle();\r\n * circle.installEditPolicy(new draw2d.policy.ResizeSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @since 4.0.0\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n *\r\n */\r\ndraw2d.policy.figure.ResizeSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.ResizeSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.ResizeSelectionFeedbackPolicy\",\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the selected figure\r\n * @param {Boolean} [isPrimarySelection]\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n\r\n if (figure.selectionHandles.isEmpty()) {\r\n // create standard Resize handles for the figure\r\n //\r\n var r1 = draw2d.Configuration.factory.createResizeHandle(figure, 1) // 1 = LEFT TOP\r\n var r3 = draw2d.Configuration.factory.createResizeHandle(figure, 3) // 3 = RIGHT_TOP\r\n var r5 = draw2d.Configuration.factory.createResizeHandle(figure, 5) // 5 = RIGHT_BOTTOM\r\n var r7 = draw2d.Configuration.factory.createResizeHandle(figure, 7) // 7 = LEFT_BOTTOM\r\n figure.selectionHandles.add(r1, r3, r5, r7)\r\n r1.show(canvas)\r\n r3.show(canvas)\r\n r5.show(canvas)\r\n r7.show(canvas)\r\n\r\n // The corner ResizeHandles are only draggable fi the figure is\r\n // resizeable. But the Resize handles are visible\r\n //\r\n\r\n // change the look&feel of the corner resizehandles if the\r\n // figure isn't resizeable\r\n //\r\n if (figure.isResizeable() === false) {\r\n r1.setBackgroundColor(null)\r\n r3.setBackgroundColor(null)\r\n r5.setBackgroundColor(null)\r\n r7.setBackgroundColor(null)\r\n r1.setDraggable(false)\r\n r3.setDraggable(false)\r\n r5.setDraggable(false)\r\n r7.setDraggable(false)\r\n }\r\n\r\n // show only the additional resizehandles if the figure is resizeable\r\n //\r\n if ((!figure.getKeepAspectRatio()) && figure.isResizeable()) {\r\n var r2 = draw2d.Configuration.factory.createResizeHandle(figure, 2) // 2 = CENTER_TOP\r\n var r4 = draw2d.Configuration.factory.createResizeHandle(figure, 4) // 4 = RIGHT_MIDDLE\r\n var r6 = draw2d.Configuration.factory.createResizeHandle(figure, 6) // 6 = CENTER_BOTTOM\r\n var r8 = draw2d.Configuration.factory.createResizeHandle(figure, 8) // 8 = LEFT_MIDDLE\r\n figure.selectionHandles.add(r2, r4, r6, r8)\r\n r2.show(canvas)\r\n r4.show(canvas)\r\n r6.show(canvas)\r\n r8.show(canvas)\r\n }\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n /**\r\n *\r\n * Callback if the figure has been moved. In this case we must update the position of the\r\n * resize handles.\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the moved figure\r\n *\r\n */\r\n moved: function (canvas, figure) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n return // silently\r\n }\r\n\r\n var objHeight = figure.getHeight()\r\n var objWidth = figure.getWidth()\r\n var xPos = figure.getX()\r\n var yPos = figure.getY()\r\n\r\n var r1 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 1\r\n })\r\n var r3 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 3\r\n })\r\n var r5 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 5\r\n })\r\n var r7 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 7\r\n })\r\n r1.setPosition(xPos - r1.getWidth(), yPos - r1.getHeight())\r\n r3.setPosition(xPos + objWidth, yPos - r3.getHeight())\r\n r5.setPosition(xPos + objWidth, yPos + objHeight)\r\n r7.setPosition(xPos - r7.getWidth(), yPos + objHeight)\r\n\r\n if (!figure.getKeepAspectRatio()) {\r\n var r2 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 2\r\n })\r\n var r4 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 4\r\n })\r\n var r6 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 6\r\n })\r\n var r8 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 8\r\n })\r\n\r\n r2.setPosition(xPos + (objWidth / 2) - (r2.getWidth() / 2), yPos - r2.getHeight())\r\n r4.setPosition(xPos + objWidth, yPos + (objHeight / 2) - (r4.getHeight() / 2))\r\n r6.setPosition(xPos + (objWidth / 2) - (r6.getWidth() / 2), yPos + objHeight)\r\n r8.setPosition(xPos - r8.getWidth(), yPos + (objHeight / 2) - (r8.getHeight() / 2))\r\n }\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n * circle =new draw2d.shape.basic.Circle();\r\n * circle.installEditPolicy(new draw2d.policy.RoundRectangleSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.RectangleSelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.RoundRectangleSelectionFeedbackPolicy = draw2d.policy.figure.RectangleSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.RoundRectangleSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.RoundRectangleSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n createResizeHandle: function (owner, type) {\r\n return new draw2d.ResizeHandle({owner: owner, type: type, width: 12, height: 12, radius: 4})\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A {@link draw2d.policy.SelectionFeedbackPolicy} that is sensitive to the canvas selection. Subclasses will typically\r\n * decorate the {@link draw2d.Figure figure} with things like selection handles and/or focus feedback.\r\n * <br>\r\n * If you want to change the handle visibility for a figure, then you should use SelectionFeedbackPolicy to do that.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.figure.SelectionFeedbackPolicy = draw2d.policy.figure.SelectionPolicy.extend(\r\n /** @lends draw2d.policy.figure.SelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.SelectionFeedbackPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Figure} figure the unselected figure\r\n */\r\n onUnselect: function (canvas, figure) {\r\n this._super(canvas, figure)\r\n\r\n figure.selectionHandles.each( (i, e) => e.hide())\r\n figure.selectionHandles = new draw2d.util.ArrayList()\r\n },\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been installed.\r\n *\r\n * @param {draw2d.Figure} figure\r\n */\r\n onInstall: function (figure) {\r\n this._super(figure)\r\n\r\n let canvas = figure.getCanvas()\r\n if (canvas !== null) {\r\n if (canvas.getSelection().contains(figure)) {\r\n this.onSelect(canvas, figure, true)\r\n }\r\n }\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been uninstalled.\r\n *\r\n * @param {draw2d.Figure} figure\r\n */\r\n onUninstall: function (figure) {\r\n this._super(figure)\r\n\r\n figure.selectionHandles.each( (i, e) => e.hide())\r\n figure.selectionHandles = new draw2d.util.ArrayList()\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A {@link draw2d.policy.SelectionFeedbackPolicy} that is sensitive to the canvas selection. Subclasses will typically\r\n * decorate the {@link draw2d.Figure figure} with things like selection handles and/or focus feedback.\r\n * <br>\r\n * If you want to change the handle visibility for a figure, then you should use SelectionFeedbackPolicy to do that.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.figure.SelectionPolicy = draw2d.policy.figure.DragDropEditPolicy.extend(\r\n /** @lends draw2d.policy.figure.SelectionPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.SelectionPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @template\r\n * @param figure\r\n * @param isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Figure} figure the unselected figure\r\n */\r\n onUnselect: function (canvas, figure) {\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Add only very small resize handles to the figure.\r\n *\r\n *\r\n *\r\n * @example\r\n * circle =new draw2d.shape.basic.Circle();\r\n * circle.installEditPolicy(new draw2d.policy.SlimSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.RectangleSelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.SlimSelectionFeedbackPolicy = draw2d.policy.figure.RectangleSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.SlimSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.SlimSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n createResizeHandle: function (owner, type) {\r\n return new draw2d.ResizeHandle({owner: owner, type: type, width: 6, height: 6, radius: 0})\r\n }\r\n})\r\n","\r\n/**\r\n * @class\r\n *\r\n * Selection feedback policy for vertical bus figures.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.BusSelectionFeedbackPolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.figure.VBusSelectionFeedbackPolicy = draw2d.policy.figure.BusSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.VBusSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.VBusSelectionFeedbackPolicy\",\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function( attr, setter, getter)\r\n {\r\n this._super( attr, setter, getter);\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n let r2 = this.createResizeHandle(figure, 2) // 2 = CENTER_TOP\r\n let r6 = this.createResizeHandle(figure, 6) // 6 = CENTER_BOTTOM\r\n\r\n figure.selectionHandles.add(r2, r6)\r\n\r\n r2.setDraggable(figure.isResizeable())\r\n r6.setDraggable(figure.isResizeable())\r\n\r\n r2.show(canvas)\r\n r6.show(canvas)\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n /**\r\n *\r\n * Callback if the figure has been moved\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n *\r\n **/\r\n moved: function(canvas,figure)\r\n {\r\n if(figure.selectionHandles.isEmpty()){\r\n return; // silently\r\n }\r\n\r\n var r2= figure.selectionHandles.find( handle => handle.type===2);\r\n var r6= figure.selectionHandles.find( handle => handle.type===6);\r\n\r\n var objWidth = figure.getWidth();\r\n // adjust the resize handles on the left/right to the new dimension of the shape\r\n //\r\n r2.setDimension(objWidth, r2.getHeight());\r\n r6.setDimension(objWidth, r6.getHeight());\r\n\r\n this._super(canvas,figure);\r\n }\r\n\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Called by the framework if the user edit the position of a figure with a drag drop operation.\r\n * Sub class like SelectionEditPolicy or RegionEditPolicy cam adjust th e position of the figure or the selections handles.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.VertexSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.VertexSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.VertexSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Connection} connection the selected figure\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, connection, isPrimarySelection) {\r\n// \tthis._super(canvas, connection, isPrimarySelection);\r\n\r\n let points = connection.getVertices()\r\n for (let i = 0; i < points.getSize(); i++) {\r\n let handle = new draw2d.shape.basic.VertexResizeHandle(connection, i)\r\n connection.selectionHandles.add(handle)\r\n handle.setDraggable(connection.isResizeable())\r\n handle.show(canvas)\r\n\r\n if (i !== 0) {\r\n let handle = new draw2d.shape.basic.GhostVertexResizeHandle(connection, i - 1)\r\n connection.selectionHandles.add(handle)\r\n handle.setDraggable(connection.isResizeable())\r\n handle.show(canvas)\r\n }\r\n }\r\n\r\n this.moved(canvas, connection)\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if the figure has been moved.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n */\r\n moved: function (canvas, figure) {\r\n figure.selectionHandles.each( (i, e) => e.relocate())\r\n }\r\n\r\n\r\n})\r\n","\r\n/**\r\n * @class\r\n *\r\n * An EditPolicy for use with Figures. With this edit policy you can move the shape only in a vertical manner.\r\n *\r\n *\r\n * @example\r\n * // add some demo figure to the canvas\r\n * var circle =new draw2d.shape.basic.Circle({diameter:50, x:10, y:30});\r\n * canvas.add(circle);\r\n *\r\n * // add the edit policy to the shape. At this point you can move the shape only\r\n * // horizontal\r\n * circle.installEditPolicy(new draw2d.policy.figure.VerticalEditPolicy());\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.figure.VerticalEditPolicy = draw2d.policy.figure.DragDropEditPolicy.extend(\r\n /** @lends draw2d.policy.figure.VerticalEditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.VerticalEditPolicy\",\r\n\r\n /**\r\n * Creates a new constraint object\r\n */\r\n init: function( attr, setter, getter)\r\n {\r\n this._super( attr, setter, getter);\r\n },\r\n\r\n\r\n /**\r\n *\r\n * It is only possible to drag&drop the element in a vertical line\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {number} [y]\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n adjustPosition: function(figure, x, y)\r\n {\r\n return new draw2d.geo.Point(figure.getX(),y);\r\n }\r\n\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * This selection shows only selection handles for the width. It is only possible to change the width\r\n * of an shaped. The height stays always the same or is recalculated by the figure itself.\r\n *\r\n * @example\r\n * // add some demo figure to the canvas\r\n * //\r\n * let shape =new draw2d.shape.basic.Rectangle({width:50, height:100, x:10, y:30});\r\n * canvas.add(shape);\r\n *\r\n * // At this point you can only change the width of the shape\r\n * //\r\n * shape.installEditPolicy(new draw2d.policy.figure.WidthSelectionFeedbackPolicy());\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.WidthSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.BusSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.BusSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {draw2d.Canvas} canvas the host of the diagram\r\n * @param {draw2d.Figure} figure the figure to select\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n let r4 = new draw2d.ResizeHandle({owner: figure, type: 4}) // 4 = RIGHT_MIDDLE\r\n let r8 = new draw2d.ResizeHandle({owner: figure, type: 8}) // 8 = LEFT_MIDDLE\r\n\r\n r4.installEditPolicy(new draw2d.policy.figure.HorizontalEditPolicy())\r\n r8.installEditPolicy(new draw2d.policy.figure.HorizontalEditPolicy())\r\n figure.selectionHandles.add(r4, r8)\r\n\r\n r4.setDraggable(figure.isResizeable())\r\n r8.setDraggable(figure.isResizeable())\r\n\r\n r4.show(canvas)\r\n r8.show(canvas)\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback if the figure has been moved\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n return // silently\r\n }\r\n let r4 = figure.selectionHandles.find(handle => handle.type === 4)\r\n let r8 = figure.selectionHandles.find(handle => handle.type === 8)\r\n\r\n let objWidth = figure.getWidth()\r\n\r\n let xPos = figure.getX()\r\n let yPos = figure.getY()\r\n r4.setDimension(r4.getWidth(), figure.getHeight())\r\n r8.setDimension(r8.getWidth(), figure.getHeight())\r\n r4.setPosition(xPos + objWidth, yPos)\r\n r8.setPosition(xPos - r8.getWidth(), yPos)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.line.LineSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.line.LineSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.line.LineSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new selection feedback policy for a line or connection\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Boolean} [isPrimarySelection]\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n figure.selectionHandles.add(new draw2d.shape.basic.LineStartResizeHandle(figure))\r\n figure.selectionHandles.add(new draw2d.shape.basic.LineEndResizeHandle(figure))\r\n\r\n figure.selectionHandles.each( (i, e) => {\r\n e.setDraggable(figure.isResizeable())\r\n e.show(canvas)\r\n })\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n /**\r\n * \r\n * Callback method if the figure has been moved.\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n figure.selectionHandles.each( (i, e) => e.relocate())\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Feedback and edit policy for the InteractiveManhattanRouter.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.line.LineSelectionFeedbackPolicy\r\n */\r\n// do not delete them\r\nimport plugin from \"lib/jquery.contextmenu\"\r\nimport css from 'css/contextmenu.css'\r\n\r\ndraw2d.policy.line.OrthogonalSelectionFeedbackPolicy = draw2d.policy.line.LineSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.line.OrthogonalSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.line.OrthogonalSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n // The ResizeHandle for the Policy. This is inline to avoid that a user want to use them without\r\n // the right installed policy.\r\n //\r\n this.ResizeHandle = draw2d.ResizeHandle.extend(\r\n /** @lends draw2d.policy.line.OrthogonalSelectionFeedbackPolicy.ResizeHandle.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.line.OrthogonalSelectionFeedbackPolicy.ResizeHandle\",\r\n\r\n init: function (owner, index) {\r\n this._super({owner})\r\n this.index = index\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called if a drag&drop operation starts.<br>\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @private\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n this._super(x, y, shiftKey, ctrlKey)\r\n this.command = this.getCanvas().getPrimarySelection().createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE_VERTICES))\r\n\r\n // Vertex is a reference and not a copy of the point\r\n this.vertex = this.owner.getVertex(this.index).clone()\r\n },\r\n\r\n /**\r\n * \r\n * Called from the framework during a drag&drop operation of the ResizeHandles\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n *\r\n * @returns {Boolean}\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n if (this.command == null) {\r\n return false\r\n }\r\n\r\n let MINDIST = this.owner.getRouter().MINDIST || 10\r\n\r\n let fromDir = this.owner.getSource().getConnectionDirection(this.owner.getTarget())\r\n let toDir = this.owner.getTarget().getConnectionDirection(this.owner.getSource())\r\n\r\n this.vertex.translate(dx2, dy2)\r\n\r\n let vertices = this.owner.getVertices()\r\n let count = vertices.getSize()\r\n //shortcut for math operations\r\n let max = Math.max\r\n let min = Math.min\r\n\r\n\r\n // Keep in mind: \"p1\" is always the dragged handle in the coding below\r\n // marked with an '*' in the diagram\r\n //\r\n\r\n // FIRST handle of the connection\r\n //\r\n if (this.index === 1) {\r\n let p0 = vertices.get(this.index - 1) // first vertex of the connection\r\n let p1 = vertices.get(this.index) // dragged vertex\r\n let p2 = vertices.get(this.index + 1) // additional neighbor\r\n\r\n // vertex alignment to handle:\r\n //\r\n // p0 +-----* p1 p1 *------+ p0\r\n // | |\r\n // | |\r\n // + p2 p2 +\r\n if ((p1.x === p2.x) && (p0.y === p1.y)) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n // p0 is on the left of p1\r\n //\r\n this.owner.setVertex(1, max(p0.x + MINDIST, this.vertex.x), p1.y) // p1\r\n this.owner.setVertex(2, max(p0.x + MINDIST, this.vertex.x), p2.y) // p2\r\n break\r\n // p0 is on the right of p2\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n this.owner.setVertex(1, min(p0.x - MINDIST, this.vertex.x), p1.y) // p1\r\n this.owner.setVertex(2, min(p0.x - MINDIST, this.vertex.x), p2.y) // p2\r\n break\r\n }\r\n }\r\n\r\n // vertices alignment to handle:\r\n //\r\n // p0 + p1 *--------+ p2\r\n // | |\r\n // | |\r\n // p1 *-----+ p2 p0 +\r\n else {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n // p0 is below of p1\r\n //\r\n this.owner.setVertex(1, p1.x, min(p0.y - MINDIST, this.vertex.y)) // p1\r\n this.owner.setVertex(2, p2.x, min(p0.y - MINDIST, this.vertex.y)) // p2\r\n break\r\n // p0 is above of p2\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n this.owner.setVertex(1, p1.x, max(p0.y + MINDIST, this.vertex.y)) // p1\r\n this.owner.setVertex(2, p2.x, max(p0.y + MINDIST, this.vertex.y)) // p2\r\n break\r\n }\r\n }\r\n }\r\n\r\n // LAST handle: Only the left hand side sibling can be changed\r\n //\r\n else if (this.index === (count - 2)) {\r\n let p2 = vertices.get(this.index - 1) // neighbor of the dragged vertex\r\n let p1 = vertices.get(this.index) // dragged vertex\r\n let p0 = vertices.get(this.index + 1) // last vertex of the connection\r\n\r\n // vertices with this alignment.\r\n //\r\n // p2 +-----* p1 + p0\r\n // | |\r\n // | |\r\n // + p0 p2 +--------* p1\r\n if ((p0.x === p1.x) && (p2.y === p1.y)) {\r\n switch (toDir) {\r\n // p0 is below of p1\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n this.owner.setVertex(count - 2, p1.x, min(p0.y - MINDIST, this.vertex.y)) // p1\r\n this.owner.setVertex(count - 3, p2.x, min(p0.y - MINDIST, this.vertex.y)) // p2\r\n break\r\n // p0 is above p2\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n this.owner.setVertex(count - 2, p1.x, max(p0.y + MINDIST, this.vertex.y)) // p1\r\n this.owner.setVertex(count - 3, p2.x, max(p0.y + MINDIST, this.vertex.y)) // p2\r\n break\r\n }\r\n }\r\n\r\n // vertices with this alignment.\r\n //\r\n // p2 + p0 +--------* p1\r\n // | |\r\n // | |\r\n // p1 *-----+ p0 p2 +\r\n else {\r\n switch (toDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n // p0 is on the left of p1\r\n //\r\n this.owner.setVertex(count - 2, max(p0.x + MINDIST, this.vertex.x), p1.y) // p1\r\n this.owner.setVertex(count - 3, max(p0.x + MINDIST, this.vertex.x), p2.y) // p2\r\n break\r\n // p0 is on the right of p2\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n this.owner.setVertex(count - 2, min(p0.x - MINDIST, this.vertex.x), p1.y) // p1\r\n this.owner.setVertex(count - 3, min(p0.x - MINDIST, this.vertex.x), p2.y) // p2\r\n break\r\n }\r\n }\r\n }\r\n // The resize handle is in the middle of the connection.\r\n // -> In this case the connection MUST HAVE at least 5 vertices\r\n //\r\n else {\r\n let p_m1 = vertices.get(this.index - 2)\r\n let p0 = vertices.get(this.index - 1)\r\n let p1 = vertices.get(this.index) // selected DragHandle\r\n let p2 = vertices.get(this.index + 1)\r\n let p3 = vertices.get(this.index + 2)\r\n\r\n // vertices alignment to handle\r\n //\r\n // . .\r\n // . .\r\n // p1 *------->+ p0 p0 +<---------* p1\r\n // | . . |\r\n // | . . |\r\n // p2 | | p2\r\n // ...+... ......+.....\r\n //\r\n if ((p1.x === p2.x) && (p1.y === p0.y)) {\r\n // Exception handling if the dragged handle (p1) is near by the start of the connection\r\n // p_m1 is the start of the connection\r\n // p0 must be the immediate neighbor of p_m1\r\n //\r\n if (this.index - 2 === 0) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n this.owner.setVertex(this.index - 1, p0.x, max(this.vertex.y, p_m1.y - MINDIST)) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, max(this.vertex.y, p_m1.y - MINDIST)) // p1\r\n this.owner.setVertex(this.index + 1, this.vertex.x, p2.y) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n this.owner.setVertex(this.index - 1, p0.x, min(this.vertex.y, p_m1.y + MINDIST)) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, this.vertex.y) // p1\r\n this.owner.setVertex(this.index + 1, this.vertex.x, p2.y) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n this.owner.setVertex(this.index - 1, p0.x, min(this.vertex.y, p_m1.y - MINDIST)) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, min(this.vertex.y, p_m1.y - MINDIST)) // p1\r\n this.owner.setVertex(this.index + 1, this.vertex.x, p2.y) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n this.owner.setVertex(this.index - 1, p0.x, max(this.vertex.y, p_m1.y + MINDIST)) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, max(this.vertex.y, p_m1.y + MINDIST)) // p1\r\n this.owner.setVertex(this.index + 1, this.vertex.x, p2.y) // p2\r\n break\r\n }\r\n }\r\n // Exception handling if the dragged handle (p1L) near by the end of the connection\r\n // p3 is the end of the connection\r\n //\r\n else if ((this.index - count + 3) === 0) {\r\n switch (toDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n this.owner.setVertex(this.index - 1, p0.x, this.vertex.y) // p0\r\n this.owner.setVertex(this.index, max(this.vertex.x, p3.x + MINDIST), this.vertex.y) // p1\r\n this.owner.setVertex(this.index + 1, max(this.vertex.x, p3.x + MINDIST), p2.y) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n this.owner.setVertex(this.index - 1, p0.x, this.vertex.y) // p0\r\n this.owner.setVertex(this.index, min(this.vertex.x, p3.x - MINDIST), this.vertex.y) // p1\r\n this.owner.setVertex(this.index + 1, min(this.vertex.x, p3.x - MINDIST), p2.y) // p2\r\n break\r\n }\r\n }\r\n else {\r\n this.owner.setVertex(this.index - 1, p0.x, this.vertex.y) // p0\r\n this.owner.setVertex(this.index, this.vertex) // p1\r\n this.owner.setVertex(this.index + 1, this.vertex.x, p2.y) // p2\r\n }\r\n }\r\n // vertices alignment to handle\r\n //\r\n // ...+... ...+...\r\n // p0 | . | p0\r\n // | . . |\r\n // | . . |\r\n // p1 *----------+ p2 p2 +---------* p1\r\n // . .\r\n // . .\r\n else if ((p0.x === p1.x) && (p1.y === p2.y)) {\r\n // p_m1 is the start of the analyzed segment\r\n // p0 must be the immediate neighbor of p_m1\r\n //\r\n if (this.index - 2 === 0) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n this.owner.setVertex(this.index - 1, max(this.vertex.x, p_m1.x + MINDIST), p0.y) // p0\r\n this.owner.setVertex(this.index, max(this.vertex.x, p_m1.x + MINDIST), this.vertex.y) // p1\r\n this.owner.setVertex(this.index + 1, p2.x, this.vertex.y) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n this.owner.setVertex(this.index - 1, min(this.vertex.x, p_m1.x - MINDIST), p0.y) // p0\r\n this.owner.setVertex(this.index, min(this.vertex.x, p_m1.x - MINDIST), this.vertex.y) // p1\r\n this.owner.setVertex(this.index + 1, p2.x, this.vertex.y) // p2\r\n break\r\n }\r\n }\r\n // p3 is the end point\r\n //\r\n else if ((this.index - count + 3) === 0) {\r\n switch (toDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n this.owner.setVertex(this.index - 1, this.vertex.x, max(this.vertex.y, p0.y)) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, min(this.vertex.y, p3.y - MINDIST)) // p1\r\n this.owner.setVertex(this.index + 1, p2.x, min(this.vertex.y, p3.y - MINDIST)) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n this.owner.setVertex(this.index - 1, this.vertex.x, p0.y) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, max(this.vertex.y, p3.y + MINDIST)) // p1\r\n this.owner.setVertex(this.index + 1, p2.x, max(this.vertex.y, p3.y + MINDIST)) // p2\r\n break\r\n }\r\n }\r\n // just any element in the middle of the connection\r\n //\r\n else {\r\n this.owner.setVertex(this.index - 1, this.vertex.x, p0.y) // p0\r\n this.owner.setVertex(this.index, this.vertex) // p1\r\n this.owner.setVertex(this.index + 1, p2.x, this.vertex.y) // p2\r\n }\r\n }\r\n }\r\n\r\n this.relocate()\r\n\r\n // update the command for the undo/redo stuff\r\n //\r\n if (this.command !== null) {\r\n this.command.updateVertices(this.owner.getVertices().clone())\r\n }\r\n\r\n // note that the user has changed the routing manually.\r\n // This skips the automatic routing.\r\n this.owner._routingMetaData.routedByUserInteraction = true\r\n return true\r\n },\r\n\r\n /**\r\n * Called after a drag and drop action.<br>\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call the super implementation via <code>this._super();</code>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean}\r\n */\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n let stack = this.getCanvas().getCommandStack()\r\n\r\n stack.execute(this.command)\r\n this.command = null\r\n return true\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Controls the location of the resize handle\r\n *\r\n * @template\r\n **/\r\n relocate: function () {\r\n\r\n let resizeWidthHalf = this.getWidth() / 2\r\n let resizeHeightHalf = this.getHeight() / 2\r\n\r\n let anchor = this.owner.getVertices().get(this.index)\r\n if (anchor)\r\n this.setPosition(anchor.x - resizeWidthHalf, anchor.y - resizeHeightHalf)\r\n }\r\n\r\n })\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @template\r\n * @param {draw2d.Connection} connection the selected figure\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, connection, isPrimarySelection) {\r\n this._super(canvas, connection, isPrimarySelection)\r\n\r\n let points = connection.getVertices()\r\n let i = 1\r\n for (; i < (points.getSize() - 1); i++) {\r\n let handle = new this.ResizeHandle(connection, i)\r\n connection.selectionHandles.add(handle)\r\n handle.setDraggable(connection.isResizeable())\r\n handle.show(canvas)\r\n }\r\n\r\n this.moved(canvas, connection)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * remove the segment with the given index.\r\n * You must check if it possible to remove the segment before. The method didn'T do any consistency checks.\r\n *\r\n * @param conn\r\n * @param segmentIndex\r\n */\r\n removeSegment: function (conn, segmentIndex) {\r\n let PADDING = 10\r\n\r\n let segmentCount = conn.getVertices().getSize() - 1\r\n\r\n let fromPt = conn.getStartPoint()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPoint()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n let p0 = conn.getVertex(segmentIndex - 1)\r\n let p1 = conn.getVertex(segmentIndex)\r\n let p2 = conn.getVertex(segmentIndex + 1)\r\n let p3 = conn.getVertex(segmentIndex + 2)\r\n\r\n // p0 .\r\n // Es wird ein Horizontales Segment .\r\n // geloescht. Es muessen somit die Punkte .\r\n // p0 und p3 neu gesetzt werden. p1 +------*-----+ p2\r\n // Ihre neue X-Koordinate ist somit in der ^ .\r\n // Mitte des geloeschten Segmentes newX .\r\n // . p3\r\n //\r\n if (p1.y === p2.y) {\r\n let newX = (p1.x + p2.x) / 2\r\n // Die neue X-Koordinate muss auf jeden Falls zwischen p-1 und p4 liegen\r\n //\r\n if (segmentIndex === 1) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n newX = Math.max(newX, fromPt.x + PADDING)\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n newX = Math.min(newX, fromPt.x - PADDING)\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n newX = fromPt.x\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n newX = fromPt.x\r\n break\r\n }\r\n }\r\n\r\n if (segmentIndex === segmentCount - 2) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n newX = Math.max(newX, toPt.x + PADDING)\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n newX = Math.min(newX, toPt.x - PADDING)\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n newX = toPt.x\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n newX = toPt.x\r\n break\r\n }\r\n }\r\n\r\n conn.setVertex(segmentIndex - 1, new draw2d.geo.Point(newX, p0.y))\r\n conn.setVertex(segmentIndex + 2, new draw2d.geo.Point(newX, p3.y))\r\n\r\n conn.removeVertexAt(segmentIndex)\r\n conn.removeVertexAt(segmentIndex)\r\n conn._routingMetaData.routedByUserInteraction = true\r\n }\r\n\r\n // p2 p3\r\n // Es wird ein vertikales Segment +..........+\r\n // geloescht. Es muessen somit die Punkte |\r\n // p0 und p3 neu gesetzt werden. |\r\n // Ihre neue Y-Koordinate ist somit in der |\r\n // Mitte des geloeschten Segmentes p0 | p1\r\n // +........+\r\n //\r\n else if (p1.x === p2.x) {\r\n let newY = (p1.y + p2.y) / 2\r\n // Die neue Y-Koordinate muss auf jeden Falls zwischen p-1 und p4 liegen\r\n //\r\n if (segmentIndex === 1) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n newY = fromPt.y\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n debugger // newX is newer read....why did I calculate them?!\r\n newX = fromPt.x\r\n break\r\n }\r\n }\r\n if (segmentIndex === segmentCount - 2) {\r\n switch (toDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n newY = toPt.y\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n debugger // newX is newer read....why did I calculate them?!\r\n newX = toPt.x\r\n break\r\n }\r\n }\r\n\r\n conn.setVertex(segmentIndex - 1, new draw2d.geo.Point(p0.x, newY))\r\n conn.setVertex(segmentIndex + 2, new draw2d.geo.Point(p3.x, newY))\r\n\r\n conn.removeVertexAt(segmentIndex)\r\n conn.removeVertexAt(segmentIndex)\r\n conn._routingMetaData.routedByUserInteraction = true\r\n }\r\n },\r\n\r\n\r\n /**\r\n * \r\n * split the segment with the given index and insert a new segment.\r\n *\r\n * @param conn\r\n * @param segmentIndex\r\n */\r\n splitSegment: function (conn, segmentIndex, x, y) {\r\n let segmentCount = conn.getVertices().getSize() - 1\r\n let p1 = conn.getVertex(segmentIndex)\r\n let p2 = conn.getVertex(segmentIndex + 1)\r\n let length = 40\r\n\r\n // the selected segment is vertical\r\n //\r\n if (p1.x === p2.x) {\r\n conn._routingMetaData.routedByUserInteraction = true\r\n // edge case of an ManhattanRouter: One segment. This happens if the source/target on the same x - coordinate\r\n //\r\n if (segmentCount === 1) {\r\n // + p1\r\n // |\r\n // np1 +-----+ np2\r\n // |\r\n // |\r\n // np3 +-----+ np3\r\n // |\r\n // |\r\n // + p2\r\n //\r\n let newSegLength = (p1.getDistance(p2) / 4) / 2\r\n let np1 = new draw2d.geo.Point(p1.x, y - newSegLength)\r\n let np2 = new draw2d.geo.Point(p2.x + length, y - newSegLength)\r\n let np3 = new draw2d.geo.Point(p2.x + length, y + newSegLength)\r\n let np4 = new draw2d.geo.Point(p2.x, y + newSegLength)\r\n\r\n conn.insertVertexAt(segmentIndex + 1, np1)\r\n conn.insertVertexAt(segmentIndex + 2, np2)\r\n conn.insertVertexAt(segmentIndex + 3, np3)\r\n conn.insertVertexAt(segmentIndex + 4, np4)\r\n }\r\n else {\r\n let np1 = new draw2d.geo.Point(0, 0)\r\n let np2 = new draw2d.geo.Point(0, 0)\r\n // p2 +\r\n // .\r\n // np1 +----+ np2\r\n // .\r\n // .\r\n // + p1\r\n // p1 ist der Startpunkt und darf somit nicht verschoben werden\r\n //\r\n if (segmentIndex === 0) {\r\n np1.y = y\r\n np1.x = p1.x\r\n np2.y = y\r\n np2.x = p2.x + length\r\n conn.setVertex(segmentIndex + 1, new draw2d.geo.Point(np2.x, p2.y))\r\n }\r\n // p2 ist der Schlusspunkt und darf somit nicht veaendert werden\r\n //\r\n else if (segmentIndex === segmentCount - 1) {\r\n np1.y = y\r\n np1.x = p1.x - length\r\n np2.y = y\r\n np2.x = p2.x\r\n conn.setVertex(segmentIndex, new draw2d.geo.Point(np1.x, p1.y))\r\n }\r\n else {\r\n np1.y = y\r\n np1.x = p1.x - (length / 2)\r\n np2.y = y\r\n np2.x = p2.x + (length / 2)\r\n conn.setVertex(segmentIndex, new draw2d.geo.Point(np1.x, p1.y))\r\n conn.setVertex(segmentIndex + 1, new draw2d.geo.Point(np2.x, p2.y))\r\n }\r\n\r\n conn.insertVertexAt(segmentIndex + 1, np1)\r\n conn.insertVertexAt(segmentIndex + 2, np2)\r\n }\r\n }\r\n // the selected segment is horizontal\r\n //\r\n else if (p1.y == p2.y) {\r\n conn._routingMetaData.routedByUserInteraction = true\r\n // edge case of an ManhattanRouter: One segment. This happens if the source/target on the same y - coordinate\r\n //\r\n if (segmentCount === 1) {\r\n // np2 +---------+ np3\r\n // | |\r\n // --------+np1 np4+--------\r\n //\r\n let newSegLength = (p1.getDistance(p2) / 4) / 2\r\n let np1 = new draw2d.geo.Point(x - newSegLength, p1.y)\r\n let np2 = new draw2d.geo.Point(x - newSegLength, p1.y - length)\r\n let np3 = new draw2d.geo.Point(x + newSegLength, p1.y - length)\r\n let np4 = new draw2d.geo.Point(x + newSegLength, p1.y)\r\n\r\n conn.insertVertexAt(segmentIndex + 1, np1)\r\n conn.insertVertexAt(segmentIndex + 2, np2)\r\n conn.insertVertexAt(segmentIndex + 3, np3)\r\n conn.insertVertexAt(segmentIndex + 4, np4)\r\n }\r\n else {\r\n // p1 np1\r\n // +.........+\r\n // |\r\n // |\r\n // | np2 p2\r\n // +.........+\r\n let np1 = new draw2d.geo.Point(0, 0)\r\n let np2 = new draw2d.geo.Point(0, 0)\r\n\r\n // p1 ist der Startpunkt und darf somit nicht verschoben werden\r\n //\r\n if (segmentIndex === 0) {\r\n np1.x = x\r\n np1.y = p1.y\r\n np2.x = x\r\n np2.y = p2.y + length\r\n conn.setVertex(segmentIndex + 1, new draw2d.geo.Point(p2.x, np2.y))\r\n }\r\n // p2 ist der Schlusspunkt und darf somit nicht veaendert werden\r\n //\r\n else if (segmentIndex === segmentCount - 1) {\r\n np1.x = x\r\n np1.y = p1.y - length\r\n np2.x = x\r\n np2.y = p2.y\r\n conn.setVertex(segmentIndex, new draw2d.geo.Point(p1.x, np1.y))\r\n }\r\n else {\r\n np1.x = x\r\n np1.y = p1.y - (length / 2)\r\n np2.x = x\r\n np2.y = p2.y + (length / 2)\r\n conn.setVertex(segmentIndex, new draw2d.geo.Point(p1.x, np1.y))\r\n conn.setVertex(segmentIndex + 1, new draw2d.geo.Point(p2.x, np2.y))\r\n }\r\n conn.insertVertexAt(segmentIndex + 1, np1)\r\n conn.insertVertexAt(segmentIndex + 2, np2)\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Called if the user press the right mouse on the figure.<br>\r\n * You can either override the \"onContextMenu\" method of the figure or install an editor policy and override this method.\r\n * Booth is valid and possible.\r\n *\r\n * @param {draw2d.shape.basic.Line} conn the polyline below the mouse\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n * @since 4.4.0\r\n */\r\n onRightMouseDown: function (conn, x, y, shiftKey, ctrlKey) {\r\n let segment = conn.hitSegment(x, y)\r\n let items = {\"split\": {name: draw2d.Configuration.i18n.menu.addSegment}}\r\n\r\n if (segment === null) {\r\n return\r\n }\r\n\r\n if (conn.getRouter().canRemoveSegmentAt(conn, segment.index)) {\r\n items.remove = {name: draw2d.Configuration.i18n.menu.deleteSegment}\r\n }\r\n\r\n $.contextMenu({\r\n selector: 'body',\r\n events:\r\n {\r\n hide: function () {\r\n $.contextMenu('destroy')\r\n }\r\n },\r\n callback: (key, options) => {\r\n switch (key) {\r\n case \"remove\": {\r\n // deep copy of the vertices of the connection for the command stack to avoid side effects\r\n let originalVertices = conn.getVertices().clone(true)\r\n this.removeSegment(conn, segment.index)\r\n let newVertices = conn.getVertices().clone(true)\r\n conn.getCanvas().getCommandStack().execute(new draw2d.command.CommandReplaceVertices(conn, originalVertices, newVertices))\r\n }\r\n break\r\n case \"split\": {\r\n // deep copy of the vertices of the connection for the command stack to avoid side effects\r\n let originalVertices = conn.getVertices().clone(true)\r\n this.splitSegment(conn, segment.index, x, y)\r\n let newVertices = conn.getVertices().clone(true)\r\n conn.getCanvas().getCommandStack().execute(new draw2d.command.CommandReplaceVertices(conn, originalVertices, newVertices))\r\n }\r\n break\r\n default:\r\n break\r\n }\r\n\r\n },\r\n x: x,\r\n y: y,\r\n items: items\r\n })\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Feedback and edit policy for the VertexRouter.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.line.LineSelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.line.VertexSelectionFeedbackPolicy = draw2d.policy.line.LineSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.line.VertexSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.line.VertexSelectionFeedbackPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Connection} figure the selected figure\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n let startHandle = new draw2d.shape.basic.LineStartResizeHandle(figure)\r\n let endHandle = new draw2d.shape.basic.LineEndResizeHandle(figure)\r\n figure.selectionHandles.add(startHandle)\r\n figure.selectionHandles.add(endHandle)\r\n\r\n let points = figure.getVertices()\r\n let count = points.getSize() - 1\r\n let i = 1\r\n for (; i < count; i++) {\r\n figure.selectionHandles.add(new draw2d.shape.basic.VertexResizeHandle(figure, i))\r\n figure.selectionHandles.add(new draw2d.shape.basic.GhostVertexResizeHandle(figure, i - 1))\r\n }\r\n\r\n figure.selectionHandles.add(new draw2d.shape.basic.GhostVertexResizeHandle(figure, i - 1))\r\n\r\n figure.selectionHandles.each( (i, e) => {\r\n e.setDraggable(figure.isResizeable())\r\n e.show(canvas)\r\n })\r\n\r\n this.moved(canvas, figure)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A draw2d.policy.SelectionFeedbackPolicy that is sensitive to the canvas selection. Subclasses will typically\r\n * decorate the {@link draw2d.Figure figure} with things like selection handles and/or focus feedback.\r\n * <br>\r\n * If you want to change the handle visibility for a figure, then you should use SelectionFeedbackPolicy to do that.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.port.ElasticStrapFeedbackPolicy = draw2d.policy.port.PortFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.port.ElasticStrapFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.port.ElasticStrapFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n this.connectionLine = null\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the related shape has init a drag&drop\r\n * operation\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} return <b>false</b> to send a veto to the drag operation\r\n */\r\n onDragStart: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n this.connectionLine = new draw2d.shape.basic.Line()\r\n this.connectionLine.setCanvas(canvas)\r\n this.connectionLine.getShapeElement()\r\n\r\n this.onDrag(canvas, figure)\r\n\r\n return true\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework during drag a figure.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n */\r\n onDrag: function (canvas, figure) {\r\n let x1 = figure.ox + figure.getParent().getAbsoluteX()\r\n let y1 = figure.oy + figure.getParent().getAbsoluteY()\r\n\r\n this.connectionLine.setStartPosition(x1, y1)\r\n this.connectionLine.setEndPosition(figure.getAbsoluteX(), figure.getAbsoluteY())\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the drag drop operation ends.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onDragEnd: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n this.connectionLine.setCanvas(null)\r\n this.connectionLine = null\r\n },\r\n\r\n onHoverEnter: function (canvas, draggedFigure, hoverFiger) {\r\n this.connectionLine.setGlow(true)\r\n hoverFiger.setGlow(true)\r\n },\r\n\r\n onHoverLeave: function (canvas, draggedFigure, hoverFiger) {\r\n hoverFiger.setGlow(false)\r\n this.connectionLine.setGlow(false)\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\nimport {Tweenable} from \"shifty\"\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.port.IntrusivePortsFeedbackPolicy = draw2d.policy.port.PortFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.port.IntrusivePortsFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.port.IntrusivePortsFeedbackPolicy\",\r\n\r\n /**\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n this.connectionLine = null\r\n this.tweenable = null\r\n this.growFactor = 2\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework if the related shape has init a drag&drop\r\n * operation\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onDragStart: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n let allPorts = canvas.getAllPorts().clone()\r\n\r\n // filter all candidates for the DropEvent\r\n //\r\n allPorts.grep(function (p) {\r\n return (p.NAME !== figure.NAME && p.parent !== figure.parent && p.getSemanticGroup() === figure.getSemanticGroup())\r\n || (p instanceof draw2d.HybridPort)\r\n || (figure instanceof draw2d.HybridPort)\r\n })\r\n\r\n let start = 0\r\n allPorts.each(function (i, element) {\r\n if (typeof element.__beforeInflate === \"undefined\") {\r\n element.__beforeInflate = element.getWidth()\r\n }\r\n start = element.__beforeInflate\r\n })\r\n\r\n // Animate the ports for a visual feedback\r\n //\r\n this.tweenable = new Tweenable()\r\n this.tweenable.tween({\r\n from: {'size': start},\r\n to: {'size': start* this.growFactor},\r\n duration: 200,\r\n easing: \"easeOutSine\",\r\n step: function (params) {\r\n allPorts.each(function (i, element) {\r\n // IMPORTANT shortcut to avoid rendering errors!!\r\n // performance shortcut to avoid a lot of events and recalculate/routing of all related connections\r\n // for each setDimension call. Additional the connection is following a port during Drag&Drop operation\r\n element.shape.attr({rx: params.size/2, ry: params.size/2})\r\n element.width = element.height = params.size\r\n element.fireEvent(\"resize\")\r\n })\r\n }\r\n })\r\n\r\n this.connectionLine = new draw2d.shape.basic.Line()\r\n this.connectionLine.setCanvas(canvas)\r\n this.connectionLine.getShapeElement()\r\n this.connectionLine.setDashArray(\"- \")\r\n this.connectionLine.setColor(\"#30c48a\")\r\n\r\n this.onDrag(canvas, figure)\r\n\r\n return true\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework during drag a figure.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @template\r\n */\r\n onDrag: function (canvas, figure) {\r\n let x1 = figure.ox + figure.getParent().getAbsoluteX()\r\n let y1 = figure.oy + figure.getParent().getAbsoluteY()\r\n\r\n this.connectionLine.setStartPosition(x1, y1)\r\n this.connectionLine.setEndPosition(figure.getAbsoluteX(), figure.getAbsoluteY())\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the drag drop operation ends.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onDragEnd: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n if (this.tweenable) {\r\n this.tweenable.stop(true)\r\n this.tweenable.dispose()\r\n this.tweenable = null\r\n }\r\n\r\n let allPorts = canvas.getAllPorts().clone()\r\n // filter all candidates for the DropEvent\r\n //\r\n allPorts.grep(function (p) {\r\n return p.__beforeInflate\r\n })\r\n\r\n allPorts.each(function (i, element) {\r\n // IMPORTANT shortcut to avoid rendering errors!!\r\n // performance shortcut to avoid a lot of events and recalculate/routing of all related connections\r\n // for each setDimension call. Additional the connection is following a port during Drag&Drop operation\r\n element.shape.attr({rx: element.__beforeInflate / 2, ry: element.__beforeInflate / 2})\r\n element.width = element.height = element.__beforeInflate\r\n delete element.__beforeInflate\r\n })\r\n this.connectionLine.setCanvas(null)\r\n this.connectionLine = null\r\n },\r\n\r\n onHoverEnter: function (canvas, draggedFigure, hoverFigure) {\r\n this.connectionLine.setGlow(true)\r\n hoverFigure.setGlow(true)\r\n },\r\n\r\n onHoverLeave: function (canvas, draggedFigure, hoverFigure) {\r\n hoverFigure.setGlow(false)\r\n if (this.connectionLine === null) {\r\n debugger\r\n }\r\n this.connectionLine.setGlow(false)\r\n }\r\n\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Base class for all port feedback policies. Used for grow, highlight or\r\n * other decorations during drag&drop and connecting of ports.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.port.PortFeedbackPolicy = draw2d.policy.figure.DragDropEditPolicy.extend(\r\n /** @lends draw2d.policy.port.PortFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.port.PortFeedbackPolicy\",\r\n\r\n /**\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Called if the dragged port hove another port\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {draw2d.Port} draggedFigure\r\n * @param {draw2d.Figure} hoverFigure\r\n */\r\n onHoverEnter: function (canvas, draggedFigure, hoverFigure) {\r\n },\r\n\r\n /**\r\n *\r\n * Fired if the dragged figures leaves the hover figure\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {draw2d.Port} draggedFigure\r\n * @param {draw2d.Figure} hoverFigure\r\n */\r\n onHoverLeave: function (canvas, draggedFigure, hoverFigure) {\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Hand drawn arrow which points down left\r\n *\r\n *\r\n * @example\r\n * let figure = new draw2d.shape.analog.OpAmp({x:10, y:10});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.analog.OpAmp = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.analog.OpAmp.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.analog.OpAmp\",\r\n\r\n // custom locator for the special design of the OpAmp Input area\r\n MyInputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, port) {\r\n let parent = port.getParent()\r\n let calcY = (8 + 18.5 * index) * parent.scaleY\r\n this.applyConsiderRotation(port, 1, calcY)\r\n }\r\n }),\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({stroke: 0, bgColor: \"#f0f0ff\"}, attr), setter, getter)\r\n\r\n this.inputLocator = new this.MyInputPortLocator()\r\n\r\n this.createPort(\"input\", this.inputLocator)\r\n this.createPort(\"input\", this.inputLocator)\r\n\r\n this.createPort(\"output\")\r\n\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getSVG: function () {\r\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"50\" height=\"50\">' +\r\n '<path d=\"m8.2627,0l0,35.36035l31.23926,-17.76025l-31.23926,-17.60011l0,0l0,0.00001zm2.27832,27.36719l4.08105,0m-2.10449,-2.20703l0,4.27979m2.26367,-21.35938l-4.15918,0\" stroke=\"#1B1B1B\" fill=\"none\"/>' +\r\n '<line x1=\"0.53516\" y1=\"8\" x2=\"8.21191\" y2=\"8\" stroke=\"#010101\"/>' +\r\n '<line x1=\"39.14941\" y1=\"18\" x2=\"45.81055\" y2=\"18\" stroke=\"#010101\" />' +\r\n '<line x1=\"0.53516\" y1=\"27\" x2=\"8.21191\" y2=\"27\" stroke=\"#010101\" />' +\r\n '</svg>'\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n // redirect the backgroundColor to an internal SVG node.\r\n // In this case only a small part of the shape are filled with the background color\r\n // and not the complete rectangle/bounding box\r\n //\r\n attributes[\"fill\"] = \"none\"\r\n if (this.bgColor != null) {\r\n this.svgNodes[0].attr({fill: this.bgColor.rgba()})\r\n }\r\n\r\n this._super(attributes)\r\n\r\n return this\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.analog.ResistorBridge({x:10, y:10});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.analog.ResistorBridge = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.analog.ResistorBridge.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.analog.ResistorBridge\",\r\n\r\n // custom locator for the special design of the ResistorBridge Input area\r\n MyInputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n let h = figure.getParent().getHeight()\r\n this.applyConsiderRotation(figure, w / 2 + 1, h * index)\r\n }\r\n }),\r\n\r\n // custom locator for the special design of the ResistorBridge Input area\r\n MyOutputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n let h = figure.getParent().getHeight()\r\n\r\n this.applyConsiderRotation(figure, w * (index - 2), h / 2)\r\n }\r\n }),\r\n\r\n\r\n /**\r\n * Create a new instance\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n\r\n this.inputLocator = new this.MyInputPortLocator()\r\n this.outputLocator = new this.MyOutputPortLocator()\r\n\r\n this.createPort(\"hybrid\", this.inputLocator)\r\n this.createPort(\"hybrid\", this.inputLocator)\r\n\r\n this.createPort(\"hybrid\", this.outputLocator)\r\n this.createPort(\"hybrid\", this.outputLocator)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getSVG: function () {\r\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">' +\r\n '<path fill=\"#010101\" stroke=\"#010101\" stroke-miterlimit=\"14.3\" id=\"path12322\" d=\"m47.62207,22.71094l0,0c0.73145,0.73242 0.71777,1.93359 -0.03027,2.68164c-0.74805,0.74951 -1.94922,0.76123 -2.68073,0.0293c-0.73138,-0.73242 -0.71967,-1.93211 0.03033,-2.68115c0.74707,-0.74803 1.94727,-0.76219 2.68066,-0.02979l0,0z\"/>' +\r\n '<path fill=\"#010101\" stroke=\"#010101\" stroke-miterlimit=\"14.3\" id=\"path12324\" d=\"m25.84082,0.93115l0,0c0.73145,0.73096 0.71875,1.93359 -0.02832,2.68066c-0.75,0.74951 -1.94922,0.76123 -2.68164,0.0293c-0.73242,-0.73241 -0.71973,-1.93164 0.0293,-2.68065c0.74805,-0.74756 1.94922,-0.76172 2.68066,-0.0293l0,0l0,-0.00002z\"/>' +\r\n '<path fill=\"#010101\" stroke=\"#010101\" stroke-miterlimit=\"14.3\" id=\"path12326\" d=\"m25.75098,44.58203l0,0c0.73145,0.73193 0.71875,1.93311 -0.02832,2.68115c-0.75,0.74902 -1.94922,0.76074 -2.68262,0.0293c-0.73145,-0.73193 -0.71973,-1.93262 0.03033,-2.68164c0.74707,-0.74756 1.94922,-0.76123 2.68066,-0.02879l0,0l-0.00006,-0.00002z\"/>' +\r\n '<path fill=\"#010101\" stroke=\"#010101\" stroke-miterlimit=\"14.3\" id=\"path12328\" d=\"m3.9707,22.80127l0,0c0.73242,0.73193 0.71777,1.93359 -0.0293,2.68115c-0.74902,0.74951 -1.94922,0.76172 -2.68164,0.0293c-0.73145,-0.73242 -0.71973,-1.93164 0.03027,-2.68115c0.74707,-0.74707 1.94922,-0.76074 2.68066,-0.0293l0,0z\"/>' +\r\n '<polyline fill=\"none\" stroke=\"#010101\" id=\"polyline12334\" points=\"24.908203125,45.49267578125 31.71875,38.68310546875 31.2119140625,36.98876953125 34.892578125,37.95703125 33.953125,34.22265625 37.6650390625,35.18359375 36.6767578125,31.52490234375 40.3759765625,32.47314453125 39.873046875,30.52783203125 45.884765625,24.51708984375 \" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"#010101\" id=\"polyline12338\" points=\"36.3408203125,23.98876953125 38.146484375,29.55810546875 33.630859375,29.55810546875 35.435546875,23.98779296875 \"/>' +\r\n '<line fill=\"none\" stroke=\"#010101\" id=\"line12340\" y2=\"28.90967\" x2=\"35.8877\" y1=\"41.13428\" x1=\"35.88867\" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"none\" stroke=\"#010101\" id=\"polyline12346\" points=\"3.2109375,23.79248046875 10.01953125,16.98388671875 9.513671875,15.2890625 13.193359375,16.25732421875 12.251953125,12.5234375 15.9658203125,13.48486328125 14.9775390625,9.82568359375 18.6767578125,10.7734375 18.173828125,8.82958984375 24.185546875,2.81787109375 \" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"#010101\" id=\"polyline12350\" points=\"13.126953125,23.80419921875 11.3212890625,18.236328125 15.8369140625,18.236328125 14.0322265625,23.806640625 \"/>' +\r\n '<line fill=\"none\" stroke=\"#010101\" id=\"line12352\" y2=\"18.8833\" x2=\"13.58008\" y1=\"6.65967\" x1=\"13.5791\" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"none\" stroke=\"#010101\" id=\"polyline12358\" points=\"46.65625,24.33642578125 39.84765625,17.52783203125 38.154296875,18.033203125 39.1220703125,14.353515625 35.3876953125,15.29345703125 36.34765625,11.58056640625 32.689453125,12.56884765625 33.6376953125,8.86865234375 31.6923828125,9.373046875 24.322265625,2.00341796875 \" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"#010101\" id=\"polyline12362\" points=\"36.578125,1.87109375 38.3828125,7.439453125 33.8681640625,7.439453125 35.6728515625,1.869140625 \"/>' +\r\n '<line fill=\"none\" stroke=\"#010101\" id=\"line12364\" y2=\"6.7915\" x2=\"36.125\" y1=\"19.01758\" x1=\"36.125\" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"none\" stroke=\"#010101\" id=\"polyline12370\" points=\"24.494140625,46.49951171875 17.685546875,39.69091796875 15.9921875,40.1953125 16.958984375,36.515625 13.2265625,37.45556640625 14.185546875,33.7421875 10.52734375,34.73193359375 11.474609375,31.03125 9.529296875,31.53515625 2.1611328125,24.166015625 \" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"#010101\" id=\"polyline12374\" points=\"12.150390625,44.80029296875 10.34765625,39.23193359375 14.861328125,39.23095703125 13.0556640625,44.80224609375 \"/>' +\r\n '<line fill=\"none\" stroke=\"#010101\" id=\"line12376\" y2=\"39.87891\" x2=\"12.60352\" y1=\"27.6543\" x1=\"12.60352\" stroke-miterlimit=\"14.3\"/>' +\r\n '</svg>'\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.analog.ResistorVertical({x:10, y:10});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.analog.ResistorVertical = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.analog.ResistorVertical.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.analog.ResistorVertical\",\r\n\r\n // custom locator for the special design of the Input area\r\n MyInputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n let h = figure.getParent().getHeight()\r\n this.applyConsiderRotation(figure, w / 2, h)\r\n }\r\n }),\r\n\r\n // custom locator for the special design of the Output area\r\n MyOutputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n this.applyConsiderRotation(figure, w / 2, 0)\r\n }\r\n }),\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this._super(extend({width: 30, height: 50, bgColor: null}, attr), setter, getter)\r\n\r\n this.inputLocator = new this.MyInputPortLocator()\r\n this.outputLocator = new this.MyOutputPortLocator()\r\n\r\n this.createPort(\"hybrid\", this.inputLocator)\r\n this.createPort(\"hybrid\", this.outputLocator)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createSet: function () {\r\n let set = this._super()\r\n\r\n set.push(this.canvas.paper.path(\"M15,0 L15,5 L0,7.5 L30,10 L0,15 L30,20 L0,25 L30,30 L15,32.5 L15,40\"))\r\n\r\n return set\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.analog.VoltageSupplyHorizontal({x:10, y:10});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.analog.VoltageSupplyHorizontal = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.analog.VoltageSupplyHorizontal.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.analog.VoltageSupplyHorizontal\",\r\n\r\n // custom locator for the special design of the Input area\r\n MyInputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let h = figure.getParent().getHeight()\r\n this.applyConsiderRotation(figure, 0, h / 2)\r\n }\r\n }),\r\n\r\n // custom locator for the special design of the Output area\r\n MyOutputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n let h = figure.getParent().getHeight()\r\n this.applyConsiderRotation(figure, w, h / 2)\r\n }\r\n }),\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 30}, attr), setter, getter)\r\n\r\n this.createPort(\"hybrid\", new this.MyInputPortLocator()) // GND\r\n this.createPort(\"hybrid\", new this.MyOutputPortLocator()) // VCC\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getSVG: function () {\r\n return '<svg width=\"49\" height=\"28\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">' +\r\n '<path d=\"m24.99933,18.95592l0,-9.54576m-5.78374,-9.40907l0,28.35939m-5.78718,-9.40457l0,-9.54576m-5.78374,-9.40907l0,28.35939\" id=\"path10566\" stroke-miterlimit=\"14.3\" stroke=\"#010101\" fill=\"none\"/>' +\r\n '<path d=\"m26.79878,14.13039l6.90583,0m-33.22691,0l6.90583,0\" id=\"path10568\" stroke-miterlimit=\"14.3\" stroke-linecap=\"square\" stroke=\"#010101\" fill=\"none\"/>' +\r\n '</svg>'\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.analog.VoltageSupplyVertical({x:10, y:10});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.analog.VoltageSupplyVertical = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.analog.VoltageSupplyVertical.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.analog.VoltageSupplyVertical\",\r\n\r\n // custom locator for the special design of the Input area\r\n MyInputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n let h = figure.getParent().getHeight()\r\n this.applyConsiderRotation(figure, w / 2, h)\r\n }\r\n }),\r\n\r\n // custom locator for the special design of the Output area\r\n MyOutputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n this.applyConsiderRotation(figure, w / 2, 0)\r\n }\r\n }),\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 30, height: 50}, attr), setter, getter)\r\n\r\n this.inputLocator = new this.MyInputPortLocator()\r\n this.outputLocator = new this.MyOutputPortLocator()\r\n\r\n this.createPort(\"hybrid\", this.inputLocator) // GND\r\n this.createPort(\"hybrid\", this.outputLocator)// VCC\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getSVG: function () {\r\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">' +\r\n '<path d=\"m19.62398,12.37594l-9.87926,0m-9.74355,8.22145l29.36289,0m-9.74007,8.22469l-9.87927,0m-9.74355,8.22145l29.36289,0\" id=\"path10560\" stroke-miterlimit=\"14.3\" stroke=\"#010101\" fill=\"none\"/>' +\r\n '<path d=\"m14.63157,9.81646l0,-9.81646m0,47.2328l0,-9.81646\" id=\"path10562\" stroke-miterlimit=\"14.3\" stroke-linecap=\"square\" stroke=\"#010101\" fill=\"none\"/>' +\r\n '</svg>'\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Hand drawn arrow which points down left\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.arrow.CalligrapherArrowDownLeft({x:10,y:10, color:\"#3d3d3d\"});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.arrow.CalligrapherArrowDownLeft = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.arrow.CalligrapherArrowDownLeft.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.arrow.CalligrapherArrowDownLeft\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr)\r\n },\r\n\r\n\r\n getSVG: function () {\r\n return '<svg width=\"180\" height=\"300\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3084\" d=\"m 159.63578,17.846597 c 0.43137,9.44641 -0.0636,18.88035 -0.8284,28.30165 c -1.73211,18.38336 -4.05381,36.71698 -6.08253,55.075313 c -1.61738,13.7075 -3.03402,27.43467 -3.97611,41.19113 c -1.09101,11.16584 -1.31019,22.36559 -1.28541,33.56466 c -0.1328,4.82188 0.3218,9.6468 0.14332,14.46812 c -0.0888,2.39977 -0.28315,3.73625 -0.55012,6.12095 c -0.85848,4.73147 -2.27416,9.40019 -4.7769,13.68272 c -1.47003,2.51544 -3.78493,5.6647 -5.47739,8.05048 c -5.02888,6.66256 -11.08555,12.65652 -18.10552,17.75963 c -4.23302,3.07716 -7.74942,5.12065 -12.22081,7.86298 c -13.253319,6.72606 -25.889792,15.11686 -40.84124,18.60576 c -3.016829,0.7039 -4.431417,0.8157 -7.450859,1.2076 c -6.983246,0.5774 -14.009174,0.3375 -21.010676,0.2509 c -3.278795,-0.033 -6.55749,0.01 -9.835897,0.045 c 0,0 20.838833,-13.2364 20.838833,-13.2364 l 0,0 c 3.147056,0.093 6.294483,0.1852 9.443646,0.2007 c 6.966697,0.011 13.971433,0.1301 20.897176,-0.6344 c 3.732439,-0.5577 7.321215,-1.2431 10.881203,-2.4145 c 1.517208,-0.4992 5.830867,-2.43339 4.487902,-1.6386 c -6.098183,3.6088 -25.104875,12.8748 -9.52514,5.223 c 4.40875,-2.5927 8.262057,-4.7459 12.425175,-7.65986 c 6.839117,-4.78709 12.633657,-10.50427 17.500607,-16.86761 c 2.53518,-3.56692 5.24684,-7.12748 7.07617,-11.03446 c 1.42357,-3.0404 2.21532,-6.28727 2.91146,-9.50152 c 0.91919,-6.88822 1.03991,-13.81392 1.25118,-20.74151 c 0.47683,-11.27871 0.96259,-22.55877 1.61689,-33.83062 c 1.21127,-14.03392 3.64191,-27.94339 5.46543,-41.92167 c 2.26899,-18.186603 4.6835,-36.384373 5.4487,-54.679643 c 0.0788,-2.46092 0.23808,-4.92087 0.23618,-7.38276 c -0.005,-6.45916 -0.62194,-13.00218 -2.13821,-19.32664 c 0,0 23.48134,-10.73998 23.48134,-10.73998 z\" inkscape:connector-curvature=\"0\" />' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3086\" d=\"m 41.271518,252.40239 c 2.465518,-0.7264 4.879503,-1.7726 7.145328,-2.9859 c 0.955597,-0.5117 3.736822,-2.1986 2.791991,-1.6673 c -5.218817,2.9348 -10.409826,5.9187 -15.61474,8.878 c 5.366557,-3.4898 10.227818,-7.6685 14.119927,-12.75576 c 3.507157,-5.09382 4.097613,-11.17122 4.301158,-17.17644 c 0.02635,-3.95844 -0.31227,-7.90612 -0.635377,-11.84752 c 0,0 19.920693,-10.3059 19.920693,-10.3059 l 0,0 c 0.171761,4.05015 0.409899,8.09777 0.50079,12.15101 c -0.185739,6.23619 -0.347804,12.66862 -3.492579,18.24747 c -0.503375,0.75197 -0.961922,1.53596 -1.510126,2.25591 c -3.478528,4.56826 -8.226837,8.04586 -12.757403,11.47443 c -7.345206,4.3297 -14.671333,8.692 -22.035619,12.9891 c -3.551305,2.0723 -7.368692,3.8726 -11.394645,4.7773 c 0,0 18.660602,-14.0344 18.660602,-14.0344 z\" inkscape:connector-curvature=\"0\" />' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3088\" d=\"m 37.815923,255.49919 c 3.41111,0.1581 6.814569,0.2213 10.182693,0.8184 c 6.92998,2.6928 13.533527,6.2357 20.043462,9.8162 c 3.912139,2.1362 7.91195,4.4644 10.690321,8.0298 c 1.039962,1.2802 1.510411,2.7604 1.893523,4.3313 c 0,0 -20.370847,10.9259 -20.370847,10.9259 l 0,0 c -0.225419,-1.2711 -0.55067,-2.4558 -1.329618,-3.5184 c -2.332229,-3.3633 -5.869056,-5.6279 -9.247191,-7.8233 c -6.335066,-3.7106 -12.98611,-7.1834 -20.232784,-8.6836 c -3.497247,-0.3814 -7.011372,-0.4307 -10.521829,-0.1703 c 0,0 18.89227,-13.726 18.89227,-13.726 z\" inkscape:connector-curvature=\"0\" />' +\r\n '</svg>'\r\n },\r\n\r\n /**\r\n *\r\n * propagate all attributes like color, stroke,... to the shape element\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n this.svgNodes?.attr({fill: this.color.rgba()})\r\n\r\n this._super(attributes)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Hand drawn arrow to the left.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.arrow.CalligrapherArrowLeft({x:10, y:10, color:\"#3d3d3d\"});\r\n *\r\n * canvas.add(figure);\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.arrow.CalligrapherArrowLeft = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.arrow.CalligrapherArrowLeft.prototype */\r\n {\r\n NAME: \"draw2d.shape.arrow.CalligrapherArrowLeft\",\r\n\r\n /**\r\n * Creates a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr)\r\n },\r\n\r\n\r\n getSVG: function () {\r\n return '<svg width=\"230\" height=\"60\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3024\" d=\"m 218.87943,27.464763 c -1.21088,-0.0563 -2.42064,-0.14616 -3.63262,-0.16893 c -5.82495,-0.10948 -18.61676,-0.0226 -22.97385,0.0122 c -7.12848,0.057 -14.25673,0.14021 -21.38495,0.22333 c -9.03765,0.10539 -18.07511,0.22813 -27.11266,0.3422 c -10.2269,0.11878 -20.4538,0.23756 -30.6807,0.35634 c -35.488759,0.4089 -70.975849,0.82793 -106.4669238,0.95195 c 0,0 7.9718628,-5.70244 7.9718628,-5.70244 l 0,0 c 6.374241,0.28694 12.745594,0.64561 19.122722,0.86083 c 28.09499,0.94816 56.21338,0.92473 84.315959,0.32205 c 10.51273,-0.32805 21.0288,-0.56402 31.53819,-0.98412 c 27.47361,-1.09824 54.91405,-2.91665 82.28177,-5.53697 c 0,0 -12.9788,9.32351 -12.9788,9.32351 z\" inkscape:connector-curvature=\"0\" />' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3026\" d=\"m 100.75066,1.6309831 c -7.165239,3.9571 -14.284929,7.47866 -22.036659,10.2707299 c -5.00195,1.80163 -10.10374,3.31886 -15.2402,4.79424 c -8.25878,2.37815 -16.55626,4.65805 -24.9012,6.79479 c -2.89107,0.71593 -5.74687,1.56407 -8.66266,2.20424 c -3.211679,0.70512 -6.49468,1.17333 -9.752959,1.6747 c -5.447101,0.92112 -10.9044008,1.81762 -16.3983488,2.50082 c -1.608931,0.0814 -0.850754,0.10697 -2.275834,-0.0365 C 20.004071,21.041553 19.256899,21.517873 32.515691,19.216243 c 6.21537,-1.05913 12.34875,-2.37668 18.3945,-4.03234 c 8.12719,-2.02803 16.23765,-4.1157 24.26421,-6.4321199 c 5.23574,-1.55053 10.41682,-3.15473 15.46857,-5.12875 c 1.38953,-0.54295 2.7579,-1.12682 4.12253,-1.71603 c 0.98421,-0.42496 3.86537,-1.81801999 2.92296,-1.32600999 C 93.642191,2.6934931 89.529511,4.7073031 85.450031,6.7704531 l 15.300629,-5.1394 z\" inkscape:connector-curvature=\"0\" sodipodi:nodetypes=\"csccsccccccsssccc\" />' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3028\" d=\"m 80.764281,58.068863 c -2.45498,-3.50762 -6.58178,-6.10525 -10.40324,-8.66732 c -4.30614,-2.72676 -7.93958,-6.28283 -12.6021,-8.28702 c -7.39912,-4.50257 -11.70055,-7.85592 -20.85866,-9.23429 c -4.9257,-0.85706 -17.294247,-1.32043 -22.226462,-2.15427 c -3.445882,-0.42869 -6.2035918,0.70541 -9.6845138,0.57715 c -1.496337,-0.0586 -2.99355,-0.0965 -4.491229,-0.12472 l 13.9525278,-6.24562 l 3.25,-1.17153 c 1.441459,0.0813 -1.116338,0.15309 0.325505,0.23016 c 3.574557,0.17902 7.211864,0.0695 10.712655,0.73822 c 4.723107,1.08097 9.443947,2.1624 14.234177,3.05317 c 2.76739,0.64203 3.92627,0.87082 6.64127,1.66289 c 4.42146,1.28993 8.60075,3.01513 12.86503,4.58129 c 1.90199,0.73446 5.05193,1.93181 6.89302,2.7216 c 4.92005,2.11061 9.5916,4.57045 13.9716,7.31023 c 4.16708,2.62011 8.48023,5.20033 11.72012,8.56863 z\" inkscape:connector-curvature=\"0\" sodipodi:nodetypes=\"ccccccccccccscsccc\" />' +\r\n '</svg>'\r\n },\r\n\r\n /**\r\n *\r\n * propagate all attributes like color, stroke,... to the shape element\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n\r\n if (this.svgNodes !== null) {\r\n this.svgNodes.attr({fill: this.color.rgba()})\r\n }\r\n\r\n this._super(attributes)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * Oval figure.\r\n * @example\r\n *\r\n * let arc = new draw2d.shape.basic.Arc({diameter:150, x:50, y:10, startAngle:0, endAngle:45});\r\n *\r\n * canvas.add(arc);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.basic.Arc = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.basic.Arc.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Arc\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.startAngle = 180\r\n this.endAngle = 360\r\n\r\n this._super({width: 80, height: 50, bgColor: null, color: \"#1B1B1B\", ...attr}, setter, getter)\r\n this.strokeScale = false // scale the stroke width of the children nodes if the parent resize\r\n },\r\n\r\n\r\n /**\r\n * @template\r\n **/\r\n createSet: function () {\r\n this.canvas.paper.setStart()\r\n\r\n\r\n let flag = (this.endAngle - this.startAngle) > 180\r\n let a1 = (this.startAngle % 360) * Math.PI / 180\r\n let a2 = (this.endAngle % 360) * Math.PI / 180\r\n\r\n let w2 = this.getWidth() / 2\r\n let h2 = this.getHeight() / 2\r\n\r\n this.canvas.paper.path([\r\n [\"M\", w2, h2,\r\n \"l\", w2 * Math.cos(a1), h2 * Math.sin(a1),\r\n \"A\", w2, h2, 0, +flag, 1, w2 + w2 * Math.cos(a2), h2 + h2 * Math.sin(a2),\r\n \"z\"]\r\n ].join(\"\")).attr({\"fill\": \"#fff0f0\"})\r\n\r\n return this.canvas.paper.setFinish()\r\n\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * A circle figure with basic background and stroke API. <br>\r\n * A circle can not be streched. <strong>The aspect ration is always 1:1</strong>.\r\n *\r\n *\r\n * @example\r\n *\r\n * let shape = new draw2d.shape.basic.Circle({x:40,y:10, stroke:3, color:\"#3d3d3d\", bgColor:\"#3dff3d\"});\r\n *\r\n * canvas.add(shape);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Oval\r\n */\r\ndraw2d.shape.basic.Circle = draw2d.shape.basic.Oval.extend(\r\n /** @lends draw2d.shape.basic.Circle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Circle\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n * @param {Object} [setter] add or replace setter methods\r\n * @param {Object} [getter] add or replace getter methods\r\n **/\r\n init: function (attr, setter, getter) {\r\n this._super(\r\n attr,\r\n {\r\n // @attr {Number} diameter the diameter of the circle */\r\n diameter: this.setDiameter,\r\n // @attr {Number} radius the radius of the circle */\r\n radius: this.setRadius,\r\n ...setter},\r\n {\r\n diameter: this.getDiameter,\r\n radius: this.getRadius,\r\n ...getter\r\n }\r\n )\r\n\r\n this.setKeepAspectRatio(true)\r\n },\r\n\r\n /**\r\n *\r\n * Set the diameter of the circle. The center of the circle will be retained.\r\n *\r\n * @param {Number} d The new diameter of the circle.\r\n * @since 4.0.0\r\n * @returns {this}\r\n **/\r\n setDiameter: function (d) {\r\n let center = this.getCenter()\r\n this.setDimension(d, d)\r\n this.setCenter(center)\r\n this.fireEvent(\"change:diameter\", {value: d})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the diameter of the circle.\r\n *\r\n * @since 4.0.0\r\n * @returns {Number} the diameter of the circle\r\n **/\r\n getDiameter: function () {\r\n return this.getWidth()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the radius of the circle. The center of the circle will be retained.\r\n *\r\n * @param {Number} r The new radius of the circle.\r\n * @since 4.0.0\r\n * @returns {this}\r\n **/\r\n setRadius: function (r) {\r\n this.setDiameter(r * 2)\r\n this.fireEvent(\"change:radius\", {value: r})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * Get the radius of the circle\r\n *\r\n * @returns {Number} the radius of the circle\r\n */\r\n getRadius: function(){\r\n return this.getWidth()/2\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n // delete the radius attribute of the parent. Because the \"radius\" is the corner radius\r\n // of the shape and not the \"radius\" of the circle. Design flaw. :-/\r\n delete memento.radius\r\n\r\n return memento\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A Diamond Figure.\r\n *\r\n *\r\n * @example\r\n *\r\n * let d1 = new draw2d.shape.basic.Diamond({x:10,y:10});\r\n * let d2 = new draw2d.shape.basic.Diamond({x:100,y:10, bgColor:\"#f0f000\", alpha:0.7, width:100, height:60});\r\n *\r\n * canvas.add(d1);\r\n * canvas.add(d2);\r\n *\r\n * canvas.setCurrentSelection(d2);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.basic.Diamond = draw2d.shape.basic.Polygon.extend(\r\n /** @lends draw2d.shape.basic.Diamond.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.basic.Diamond\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({bgColor: \"#00a3f6\", color: \"#1B1B1B\"}, attr), setter, getter)\r\n\r\n let pos = this.getPosition()\r\n\r\n this.resetVertices()\r\n\r\n let box = this.getBoundingBox()\r\n this.addVertex(box.w / 2, 0) // Go to the top center..\r\n this.addVertex(box.w, box.h / 2) // ...draw line to the right middle\r\n this.addVertex(box.w / 2, box.h) // ...bottom center...\r\n this.addVertex(0, box.h / 2) // ...left middle...\r\n\r\n // override the selection handler from the polygon. Because the vertices of\r\n // the diamond are not selectable and modifiable\r\n //\r\n this.installEditPolicy(new draw2d.policy.figure.RectangleSelectionFeedbackPolicy())\r\n\r\n this.setPosition(pos)\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * ResizeHandle for a vertex edit policy. Click of this kind of resize handles\r\n * adds a new vertex to the polyline or polygon.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.LineResizeHandle\r\n */\r\ndraw2d.shape.basic.GhostVertexResizeHandle = draw2d.shape.basic.LineResizeHandle.extend(\r\n /** @lends draw2d.shape.basic.GhostVertexResizeHandle.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.basic.GhostVertexResizeHandle\",\r\n\r\n /**\r\n *\r\n *\r\n */\r\n init: function (owner, precursorIndex) {\r\n this.maxOpacity = 0.35\r\n this.precursorIndex = precursorIndex\r\n\r\n this._super({owner: owner, opacity: this.maxOpacity})\r\n },\r\n\r\n createShapeElement: function () {\r\n let shape = this._super()\r\n\r\n shape.attr({\"cursor\": \"pointer\"})\r\n\r\n return shape\r\n },\r\n\r\n /**\r\n *\r\n * Set the alpha blending of this figure.\r\n *\r\n * @param {Number} percent Value between [0..1].\r\n * @template\r\n **/\r\n setAlpha: function (percent) {\r\n this._super(Math.min(this.maxOpacity, Math.max(0, parseFloat(percent))))\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Called when a user clicks on the element\r\n *\r\n * @template\r\n */\r\n onClick: function () {\r\n let cmd = new draw2d.command.CommandAddVertex(this.owner, this.precursorIndex + 1, this.getAbsoluteX() + this.getWidth() / 2, this.getAbsoluteY() + this.getHeight() / 2)\r\n this.getCanvas().getCommandStack().execute(cmd)\r\n },\r\n\r\n /**\r\n * Called if the drag and drop action begins. You can return [false] if you\r\n * want avoid the that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @type {Boolean}\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Called from the framework during a drag&drop operation\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @returns {Boolean}\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n return true\r\n },\r\n\r\n /**\r\n * Called after a drag and drop action.<br>\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call the super implementation via <code>this._super();</code>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean}\r\n */\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragend\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n return true\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Controls the location of the resize handle\r\n *\r\n * @template\r\n **/\r\n relocate: function () {\r\n let p1 = this.owner.getVertices().get(this.precursorIndex)\r\n let p2 = this.owner.getVertices().get(this.precursorIndex + 1)\r\n\r\n this.setPosition(\r\n ((p2.x - p1.x) / 2 + p1.x - this.getWidth() / 2),\r\n ((p2.y - p1.y) / 2 + p1.y - this.getHeight() / 2)\r\n )\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Simple Image shape.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.node.Node\r\n */\r\ndraw2d.shape.basic.Image = draw2d.shape.node.Node.extend(\r\n /** @lends draw2d.shape.basic.Image.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Image\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(\r\n attr,\r\n {\r\n // @attr {String} path the image path (absolute or relative) of the shape */\r\n path: this.setPath,\r\n ...setter\r\n },\r\n {\r\n path: this.getPath,\r\n ...getter\r\n })\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the image path attribute of the Image shape and repaint them.\r\n * The path can be relative or absolute\r\n *\r\n * @param path\r\n * @since 2.8.0\r\n */\r\n setPath: function (path) {\r\n this.path = path\r\n\r\n this.shape?.attr({src: this.path})\r\n this.fireEvent(\"change:path\", {value: this.path})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return the image path attribute of the shape.\r\n *\r\n * @returns {String}\r\n * @since 2.8.0\r\n */\r\n getPath: function () {\r\n return this.path\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n attributes ??= {}\r\n\r\n attributes.x = this.getAbsoluteX()\r\n attributes.y = this.getAbsoluteY()\r\n attributes.width = this.getWidth()\r\n attributes.height = this.getHeight()\r\n attributes.src = this.path\r\n\r\n // propagate the width/height and the display:inline-block as CSS attribute as well because Chrome\r\n // did some \"flickering\" in some versions and sometimes the image disappear complete\r\n $(this.shape.node).css({display: \"inline-block\", \"width\": attributes.width, \"height\": attributes.height})\r\n\r\n this._super(attributes)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n return this.canvas.paper.image(this.path, this.getX(), this.getY(), this.getWidth(), this.getHeight())\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n return {\r\n ...this._super(),\r\n path: this.path\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n if (typeof memento.path !== \"undefined\") {\r\n this.setPath(memento.path)\r\n }\r\n }\r\n\r\n})\r\n\r\n","import draw2d from '../../packages'\r\nimport jsonUtil from '../../util/JSONUtil'\r\n\r\n/**\r\n * @class\r\n * Implements a simple text label.\r\n *\r\n *\r\n * @example\r\n *\r\n * let shape = new draw2d.shape.basic.Label({text:\"This is a simple label\", x:40, y:10});\r\n *\r\n * canvas.add(shape);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.SetFigure\r\n */\r\ndraw2d.shape.basic.Label = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.basic.Label.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Label\",\r\n\r\n FONT_FALLBACK: {\r\n 'Georgia': 'Georgia, serif',\r\n 'Palatino Linotype': '\"Palatino Linotype\", \"Book Antiqua\", Palatino, serif',\r\n 'Times New Roman': '\"Times New Roman\", Times, serif',\r\n 'Arial': 'Arial, Helvetica, sans-serif',\r\n 'Arial Black': '\"Arial Black\", Gadget, sans-serif',\r\n 'Comic Sans MS': '\"Comic Sans MS\", cursive, sans-serif',\r\n 'Impact': 'Impact, Charcoal, sans-serif',\r\n 'Lucida Sans Unicode': '\"Lucida Sans Unicode\", \"Lucida Grande\", sans-serif',\r\n 'Tahoma, Geneva': 'Tahoma, Geneva, sans-seri',\r\n 'Trebuchet MS': '\"Trebuchet MS\", Helvetica, sans-serif',\r\n 'Verdana': 'Verdana, Geneva, sans-serif',\r\n 'Courier New': '\"Courier New\", Courier, monospace',\r\n 'Lucida Console': '\"Lucida Console\", Monaco, monospace'\r\n },\r\n\r\n\r\n /**\r\n * Creates a new text element.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.text = \"\"\r\n // for performance reasons\r\n //\r\n this.cachedWidth = null\r\n this.cachedHeight = null\r\n this.cachedMinWidth = null\r\n this.cachedMinHeight = null\r\n\r\n // appearance of the shape\r\n //\r\n this.fontSize = 12\r\n this.fontColor = new draw2d.util.Color(\"#080808\")\r\n this.fontFamily = null\r\n this.padding = {top: 4, right: 4, bottom: 4, left: 4}\r\n\r\n this.outlineStroke = 0\r\n this.outlineColor = new draw2d.util.Color(null)\r\n\r\n this.textAlign = \"start\";\r\n\r\n this.bold = false\r\n\r\n // behavior of the shape\r\n //\r\n this.editor = null\r\n\r\n this._super(\r\n {stroke: 1, width: 1, height: 1, resizeable: false, ...attr},\r\n {\r\n // @attr {String} text the text to show */\r\n text: this.setText,\r\n // @attr {String} set the editor to use see {@link draw2d.ui.LabelEditor} */\r\n editor: this.installEditor,\r\n // @attr {Number} outlineStroke the line width of the text to draw. Fill color and outline of the text can be different. */\r\n outlineStroke: this.setOutlineStroke,\r\n // @attr {String|draw2d.util.Color} outlineColor the outline color of the text */\r\n outlineColor: this.setOutlineColor,\r\n // @attr {String} fontFamily the font to use*/\r\n fontFamily: this.setFontFamily,\r\n // @attr {Number} fontSize the font size to use */\r\n fontSize: this.setFontSize,\r\n // @attr {String|draw2d.util.Color} fontColor the font color */\r\n fontColor: this.setFontColor,\r\n // @attr {Number} padding the padding in pixel around the text */\r\n padding: this.setPadding,\r\n // @attr {Boolean} bold indicator if bold text should be used*/\r\n bold: this.setBold,\r\n\r\n textAlign: this.textAlign,\r\n ...setter},\r\n {\r\n text: this.getText,\r\n outlineStroke: this.getOutlineStroke,\r\n outlineColor: this.getOutlineColor,\r\n fontFamily: this.getFontFamily,\r\n fontSize: this.getFontSize,\r\n fontColor: this.getFontColor,\r\n padding: this.getPadding,\r\n bold: this.isBold,\r\n textAlign: this.textAlign,\r\n ...getter\r\n }\r\n )\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy())\r\n // some performance improvements\r\n this.lastAppliedLabelRotation = \"\"\r\n this.lastAppliedTextAttributes = {}\r\n },\r\n\r\n /**\r\n *\r\n * Creates the shape object for a text node.\r\n *\r\n * @private\r\n **/\r\n createSet: function () {\r\n return this.canvas.paper.set([this.canvas.paper.text(0, 0, this.text)])\r\n },\r\n\r\n /**\r\n *\r\n * Set the canvas element of this figures.\r\n *\r\n * @param {draw2d.Canvas} canvas the new parent of the figure or null\r\n * @private\r\n */\r\n setCanvas: function (canvas) {\r\n this.clearCache()\r\n this._super(canvas)\r\n this.clearCache()\r\n },\r\n\r\n /**\r\n *\r\n * Trigger the repaint of the element and transport all style properties to the visual representation.<br>\r\n * Called by the framework.\r\n *\r\n * @private\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null || (this.parent && this.parent.repaintBlocked === true)) {\r\n return\r\n }\r\n\r\n // style the label\r\n let lattr = this.calculateTextAttr()\r\n lattr.text = this.text\r\n\r\n let attrDiff = jsonUtil.flatDiff(lattr, this.lastAppliedTextAttributes)\r\n this.lastAppliedTextAttributes = lattr\r\n\r\n // the two \"attr\" calls takes 2/3 of the complete method call (chrome performance check).\r\n // now we check if any changes happens and call this method only if necessary.\r\n if (Object.getOwnPropertyNames(attrDiff).length > 0) {\r\n this.svgNodes.attr(lattr)\r\n // set of the x/y must be done AFTER the font-size and bold has been set.\r\n // Reason: the getBBox method needs the font attributes for calculation\r\n this.svgNodes.attr({\r\n x: (this.padding.left + this.stroke),\r\n y: (this.svgNodes.getBBox(true).height / 2 + this.padding.top + this.getStroke())\r\n })\r\n }\r\n this._super(attributes)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * @private\r\n */\r\n calculateTextAttr: function () {\r\n let lattr = {\r\n \"text-anchor\": this.textAlign,\r\n \"font-size\": this.fontSize,\r\n \"font-weight\": (this.bold === true) ? \"bold\" : \"normal\",\r\n fill: this.fontColor.rgba(),\r\n stroke: this.outlineColor.rgba(),\r\n \"stroke-width\": this.outlineStroke,\r\n }\r\n if (this.fontFamily !== null) {\r\n lattr[\"font-family\"] = this.fontFamily\r\n }\r\n return lattr\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {this}\r\n */\r\n applyTransformation: function () {\r\n let ts = \"R\" + this.rotationAngle\r\n this.shape.transform(ts)\r\n this.lastAppliedLabelRotation = ts\r\n\r\n this.svgNodes.transform(\r\n \"R\" + this.rotationAngle +\r\n \"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the new font size in [pt].\r\n *\r\n * @returns {this}\r\n * @param {Number} size The new font size in <code>pt</code>\r\n **/\r\n setFontSize: function (size) {\r\n this.clearCache()\r\n this.fontSize = size\r\n\r\n this.repaint()\r\n\r\n this.fireEvent(\"change:fontSize\", {value: this.fontSize})\r\n this.fireEvent(\"resize\")\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each( (i, e) =>{\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the current used font size in px.\r\n *\r\n * @returns {Number}\r\n * @since 4.0.1\r\n */\r\n getTextAlign: function () {\r\n return this.textAlign\r\n },\r\n\r\n /**\r\n *\r\n * Set the new text align in [pt].\r\n *\r\n * @returns {this}\r\n * @param {String} textAlign The new textAlign in <code>pt</code>\r\n **/\r\n setTextAlign: function (textAlign) {\r\n this.clearCache()\r\n this.textAlign = textAlign\r\n\r\n this.repaint()\r\n\r\n this.fireEvent(\"change:textAlign\", {value: this.textAlign})\r\n this.fireEvent(\"resize\")\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each( (i, e) =>{\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the label to <b>bold</b> or <b>normal</b> font weight.\r\n *\r\n * @param {Boolean} bold The bold flag for the label\r\n * @since 2.4.1\r\n * @returns {this}\r\n **/\r\n setBold: function (bold) {\r\n this.clearCache()\r\n this.bold = bold\r\n this.repaint()\r\n\r\n this.fireEvent(\"change:bold\", {value: this.bold})\r\n this.fireEvent(\"resize\")\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each((i, e) =>{\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the \"bold\" attribute of the label\r\n *\r\n * @since 5.0.0\r\n * @returns {Boolean}\r\n */\r\n isBold: function () {\r\n return this.bold\r\n },\r\n\r\n /**\r\n *\r\n * Set the outline color of the font.\r\n *\r\n * @param {draw2d.util.Color/String} color The new color of the line.\r\n * @since 4.2.1\r\n * @returns {this}\r\n **/\r\n setOutlineColor: function (color) {\r\n this.outlineColor = new draw2d.util.Color(color)\r\n this.repaint()\r\n this.fireEvent(\"change:outlineColor\", {value: this.outlineColor})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The outline color of the text\r\n *\r\n * @returns {draw2d.util.Color}\r\n * @since 4.2.1\r\n */\r\n getOutlineColor: function () {\r\n return this.outlineColor\r\n },\r\n\r\n /**\r\n *\r\n * Set the stroke of the text to use.\r\n *\r\n * @param {Number} w The new line width of the figure\r\n * @since 4.2.1\r\n * @returns {this}\r\n **/\r\n setOutlineStroke: function (w) {\r\n this.outlineStroke = w\r\n this.repaint()\r\n this.fireEvent(\"change:outlineStroke\", {value: this.outlineStroke})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The used outline line width.\r\n *\r\n * @type {Number}\r\n * @since 4.2.1\r\n **/\r\n getOutlineStroke: function () {\r\n return this.outlineStroke\r\n },\r\n\r\n /**\r\n *\r\n * Set the color of the font.\r\n *\r\n * @param {draw2d.util.Color|String} color The new color of the line.\r\n * @returns {this}\r\n **/\r\n setFontColor: function (color) {\r\n this.fontColor = new draw2d.util.Color(color)\r\n this.repaint()\r\n this.fireEvent(\"change:fontColor\", {value: this.fontColor})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The current used font color\r\n *\r\n * @returns {draw2d.util.Color}\r\n */\r\n getFontColor: function () {\r\n return this.fontColor\r\n },\r\n\r\n /**\r\n *\r\n * Set the padding of the element\r\n *\r\n * // Alternatively you can use the attr method:\r\n * //\r\n * // set the padding for top,left,bottom,right in one call\r\n * figure.attr({\r\n * padding: 3\r\n * });\r\n *\r\n * // update the padding left and top\r\n * figure.attr({\r\n * padding: {left:3, top:30}\r\n * });\r\n *\r\n * @param {Number|Object} padding The new padding\r\n * @returns {this}\r\n **/\r\n setPadding: function (padding) {\r\n this.clearCache()\r\n if (typeof padding === \"number\") {\r\n this.padding = {top: padding, right: padding, bottom: padding, left: padding}\r\n } else {\r\n this.padding = {...this.padding, ...padding}\r\n }\r\n this.repaint()\r\n this.fireEvent(\"change:padding\", {value: this.padding})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Get the padding of the element.\r\n *\r\n * @since 4.0.1\r\n **/\r\n getPadding: function () {\r\n return this.padding\r\n },\r\n\r\n /**\r\n *\r\n * Set the font family to use. If you use the shown font names the typical fallback\r\n * font are installed as well.\r\n *\r\n * <b>Serif Fonts</b>\r\n * <ul>\r\n * <li><span style=\"font-family:'Georgia'\">Georgia</span></li>\r\n * <li><span style=\"font-family:'Palatino Linotype'\">Palatino Linotype</span></li>\r\n * <li><span style=\"font-family:'Times New Roman'\">Times New Roman</span></li>\r\n * </ul>\r\n *\r\n * <b>Sans-Serif Fonts</b>\r\n * <ul>\r\n * <li><span style=\"font-family:'Arial'\">Arial</span></li>\r\n * <li><span style=\"font-family:'Arial Black'\">Arial Black</span></li>\r\n * <li><span style=\"font-family:'Comic Sans MS'\">Comic Sans MS</span></li>\r\n * <li><span style=\"font-family:'Impact, Charcoal'\">Impact, Charcoal</span></li>\r\n * <li><span style=\"font-family:'Lucida Sans Unicode'\">Lucida Sans Unicode</span></li>\r\n * <li><span style=\"font-family:'Tahoma, Geneva'\">Tahoma, Geneva</span></li>\r\n * <li><span style=\"font-family:'Trebuchet MS'\">Trebuchet MS</span> </li>\r\n * <li><span style=\"font-family:'Verdana'\">Verdana</span></li>\r\n * </ul>\r\n *\r\n * <b>Monospace Fonts</b>\r\n * <ul>\r\n * <li><span style=\"font-family:'Courier New'\">Courier New</span></li>\r\n * <li><span style=\"font-family:'Lucida Console'\">Lucida Console</span></li>\r\n * </ul>\r\n *\r\n * @param {String} font The font to use\r\n * @returns {this}\r\n **/\r\n setFontFamily: function (font) {\r\n this.clearCache()\r\n\r\n // check for fallback\r\n //\r\n if ((typeof font !== \"undefined\") && font !== null && typeof this.FONT_FALLBACK[font] !== \"undefined\") {\r\n font = this.FONT_FALLBACK[font]\r\n }\r\n\r\n this.fontFamily = font\r\n this.repaint()\r\n this.fireEvent(\"change:fontFamily\", {value: this.fontFamily})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the used font family of the label.\r\n *\r\n * @returns {String}\r\n */\r\n getFontFamily: function () {\r\n return this.fontFamily\r\n },\r\n\r\n\r\n /**\r\n *\r\n * A Label did have \"autosize\". Do nothing at all.\r\n *\r\n * @returns {this}\r\n **/\r\n setDimension: function (w, h) {\r\n this.clearCache()\r\n\r\n this._super(w, h)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * clear the internal cache for width/height precalculation\r\n * @private\r\n */\r\n clearCache: function () {\r\n this.portRelayoutRequired = true\r\n this.cachedMinWidth = null\r\n this.cachedMinHeight = null\r\n this.cachedWidth = null\r\n this.cachedHeight = null\r\n this.lastAppliedTextAttributes = {}\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * This value is relevant for the interactive resize of the figure.\r\n *\r\n * @returns {Number} Returns the min. width of this object.\r\n */\r\n getMinWidth: function () {\r\n if (this.shape === null) {\r\n return 0\r\n }\r\n\r\n this.cachedMinWidth ??= (this.svgNodes.getBBox(true).width + this.padding.left+ this.padding.right + 2*this.getStroke())\r\n\r\n return this.cachedMinWidth\r\n },\r\n\r\n /**\r\n *\r\n * This value is relevant for the interactive resize of the figure.\r\n *\r\n * @returns {Number} Returns the min. width of this object.\r\n */\r\n getMinHeight: function () {\r\n if (this.shape === null) {\r\n return 0\r\n }\r\n this.cachedMinHeight ??= (this.svgNodes.getBBox(true).height+ this.padding.top+ this.padding.bottom+ 2*this.getStroke())\r\n\r\n return this.cachedMinHeight\r\n },\r\n\r\n /**\r\n *\r\n * Return the calculate width of the set. This calculates the bounding box of all elements.\r\n *\r\n * @returns {Number} the calculated width of the label\r\n **/\r\n getWidth: function () {\r\n if (this.shape === null) {\r\n return 0\r\n }\r\n\r\n if (this.cachedWidth === null) {\r\n if (this.resizeable === true) {\r\n this.cachedWidth = Math.max(this.width, this.getMinWidth())\r\n } else {\r\n this.cachedWidth = this.getMinWidth()\r\n }\r\n }\r\n\r\n\r\n return this.cachedWidth\r\n },\r\n\r\n /**\r\n *\r\n * Return the calculated height of the set. This calculates the bounding box of all elements.\r\n *\r\n * @returns {Number} the calculated height of the label\r\n */\r\n getHeight: function () {\r\n if (this.shape === null) {\r\n return 0\r\n }\r\n\r\n this.cachedHeight ??= Math.max(this.height, this.getMinHeight())\r\n\r\n return this.cachedHeight\r\n },\r\n\r\n /**\r\n *\r\n * Set an editor for the label. This can be a dialog or inplace editor for the\r\n * Text.<br>\r\n * The editor will be activated if you doubleClick on the label.\r\n *\r\n * @param {draw2d.ui.LabelEditor|String} editor\r\n */\r\n installEditor: function (editor) {\r\n if (typeof editor === \"string\") {\r\n editor = Function(`return new ${editor}()`)()\r\n }\r\n this.editor = editor\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Called when a user dbl clicks on the element\r\n *\r\n */\r\n onDoubleClick: function () {\r\n this.editor?.start(this)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the current text of the label.\r\n *\r\n * @returns the current display text of the label\r\n * @type {String}\r\n **/\r\n getText: function () {\r\n return this.text\r\n },\r\n\r\n /**\r\n *\r\n * Set the text for the label. Use \\n for multiline text.\r\n *\r\n * @param {String} text The new text for the label.\r\n * @returns {this}\r\n **/\r\n setText: function (text) {\r\n this.clearCache()\r\n this.text = text\r\n\r\n this.repaint()\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"resize\")\r\n this.fireEvent(\"change:text\", {value: this.text})\r\n\r\n this.parent?.repaint()\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Detect whenever the hands over coordinate is inside the figure.\r\n * The default implementation is a simple bounding box test.\r\n *\r\n * @param {Number} iX\r\n * @param {Number} iY\r\n * @param {Number} [corona]\r\n *\r\n * @returns {Boolean}\r\n */\r\n hitTest: function (x, y, corona) {\r\n\r\n // apply a simple bounding box test if the label isn'T rotated\r\n //\r\n if (this.rotationAngle === 0) {\r\n return this._super(x, y, corona)\r\n }\r\n\r\n let boundingBox = this.getBoundingBox()\r\n if (typeof corona === \"number\") {\r\n boundingBox.scale(corona, corona)\r\n }\r\n\r\n // rotate the box with the current matrix of the\r\n // shape\r\n let matrix = this.shape.matrix\r\n let points = boundingBox.getVertices()\r\n points.each( (i, point) => {\r\n point.x = matrix.x(point.x, point.y)\r\n point.y = matrix.y(point.x, point.y)\r\n })\r\n\r\n let polySides = 4\r\n\r\n let j = polySides - 1\r\n let oddNodes = false\r\n\r\n for (let i = 0; i < polySides; i++) {\r\n let pi = points.get(i)\r\n let pj = points.get(j)\r\n if ((pi.y < y && pj.y >= y\r\n || pj.y < y && pi.y >= y)\r\n && (pi.x <= x || pj.x <= x)) {\r\n if (pi.x + (y - pi.y) / (pj.y - pi.y) * (pj.x - pi.x) < x) {\r\n oddNodes = !oddNodes\r\n }\r\n }\r\n j = i\r\n }\r\n return oddNodes\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.text = this.text\r\n memento.outlineStroke = this.outlineStroke\r\n memento.outlineColor = this.outlineColor.rgba()\r\n memento.fontSize = this.fontSize\r\n memento.fontColor = this.fontColor.rgba()\r\n memento.fontFamily = this.fontFamily\r\n memento.bold = this.bold\r\n\r\n if (this.editor !== null) {\r\n memento.editor = this.editor.NAME\r\n }\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Apply all attributes from the serialized properties to the shape.\r\n * Used during JSON serialisation.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n if (typeof memento.text !== \"undefined\") {\r\n this.setText(memento.text)\r\n }\r\n if (typeof memento.outlineStroke !== \"undefined\") {\r\n this.setOutlineStroke(memento.outlineStroke)\r\n }\r\n if (typeof memento.outlineColor !== \"undefined\") {\r\n this.setOutlineColor(memento.outlineColor)\r\n }\r\n if (typeof memento.fontFamily !== \"undefined\") {\r\n this.setFontFamily(memento.fontFamily)\r\n }\r\n if (typeof memento.fontSize !== \"undefined\") {\r\n this.setFontSize(memento.fontSize)\r\n }\r\n if (typeof memento.fontColor !== \"undefined\") {\r\n this.setFontColor(memento.fontColor)\r\n }\r\n if (typeof memento.bold !== \"undefined\") {\r\n this.setBold(memento.bold)\r\n }\r\n\r\n if (typeof memento.editor === \"string\") {\r\n this.installEditor(Function(`return new ${memento.editor}()`)())\r\n }\r\n\r\n return this\r\n }\r\n\r\n })\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * The base class for all visible elements inside a canvas.\r\n *\r\n *\r\n * @example\r\n *\r\n * // Create the line and modify the start/end after inserting them into\r\n * // the canvas\r\n * let line1 = new draw2d.shape.basic.Line({startX:30, startY:30, endX:100, endY:80});\r\n *\r\n * canvas.add(line1);\r\n *\r\n * // Create the line with a given start/end coordinate in the constructor\r\n * //\r\n * let line2 = new draw2d.shape.basic.Line({\r\n * startX:20,\r\n * startY:80,\r\n * endX:200,\r\n * endY:150,\r\n * stroke:3,\r\n * color:\"#1d1dff\"\r\n * });\r\n * canvas.add(line2);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.Figure\r\n */\r\ndraw2d.shape.basic.Line = draw2d.Figure.extend(\r\n /** @lends draw2d.shape.basic.Line.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Line\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(0, 0, 0),\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas witht he given start and\r\n * end coordinate.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // click area for the line hit test\r\n this.corona = 10\r\n this.isGlowing = false\r\n this.lineColor = this.DEFAULT_COLOR\r\n this.stroke = 1\r\n this.outlineStroke = 0\r\n this.outlineColor = new draw2d.util.Color(null)\r\n this.outlineVisible = false\r\n\r\n this.draggedSegment = null\r\n\r\n this.dasharray = null\r\n this.dasharrayOffset = null;\r\n this.animate = false;\r\n this.animateDirection = false;\r\n\r\n this.start = new draw2d.geo.Point(30, 30)\r\n this.end = new draw2d.geo.Point(100, 100)\r\n\r\n this.glowColor = new draw2d.util.Color(\"#3f72bf\")\r\n this.glowStrokeSize = this.stroke * 2.5;\r\n\r\n this.vertices = new draw2d.util.ArrayList()\r\n this.vertices.add(this.start.clone())\r\n this.vertices.add(this.end.clone())\r\n\r\n this._super(\r\n {\r\n deleteable: false,\r\n selectable: true,\r\n ...attr},\r\n {\r\n // @attr {Number} start the coordinates of the start point */\r\n start: this.setStartPosition,\r\n // @attr {Number} startX the x coordinate of the start point */\r\n startX: this.setStartX,\r\n // @attr {Number} startY the y coordinate of the start point */\r\n startY: this.setStartY,\r\n // @attr {Number} end the coordinates of the end point */\r\n end: this.setEndPosition,\r\n // @attr {Number} endX the x coordinate of the end */\r\n endX: this.setEndX,\r\n // @attr {Number} endY the y coordinate of the end */\r\n endY: this.setEndY,\r\n // @attr {Number} vertices the x coordinate of the start point */\r\n vertices: this.setVertices,\r\n // @attr {String | draw2d.util.Color} outlineColor the outline color of the line */\r\n outlineColor: this.setOutlineColor,\r\n // @attr {Number} outlineStroke the line width of the outline */\r\n outlineStroke: this.setOutlineStroke,\r\n // @attr {String|draw2d.util.Color} color the color of the line */\r\n color: this.setColor,\r\n // @attr {Number} stroke the line width of the color */\r\n stroke: this.setStroke,\r\n corona: this.setCorona,\r\n // @attr {String} dasharray the line pattern see {@link draw2d.shape.basic.Line#setDashArray} for more information*/\r\n dasharray: this.setDashArray,\r\n // @attr {Boolean} glow the glow flag for the shape. The representation of the \"glow\" depends on the shape */\r\n glow: this.setGlow,\r\n glowStrokeSize: this.setGlowStrokeSize,\r\n animate: this.setAnmiate,\r\n animateDirection: this.setAnimateDirection,\r\n dasharrayOffset: this.setDasharrayOffset,\r\n\r\n ...setter},\r\n {\r\n start: this.getStartPosition,\r\n end: this.getEndPosition,\r\n outlineColor: this.getOutlineColor,\r\n outlineStroke: this.getOutlineStroke,\r\n stroke: this.getStroke,\r\n corona: this.getCorona,\r\n color: this.getColor,\r\n dasharray: this.getDashArray,\r\n vertices: this.getVertices,\r\n glowStrokeSize: this.getGlowStrokeSize,\r\n animate: this.getAnmiate,\r\n animateDirection: this.getAnimateDirection,\r\n dasharrayOffset: this.getDasharrayOffset,\r\n \r\n ...getter})\r\n\r\n // some router installs a edit policy. In this case we want delete them\r\n //\r\n if (this.editPolicy.getSize() === 0) {\r\n this.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Set the outline color of the line.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * outlineColor: color\r\n * });\r\n *\r\n * @param {draw2d.util.Color/String} color The new color of the line.\r\n * @since 4.2.1\r\n **/\r\n setOutlineColor: function (color) {\r\n this.outlineColor = new draw2d.util.Color(color)\r\n this.repaint()\r\n this.fireEvent(\"change:outlineColor\", {value: this.outlineColor})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The outline color of the text\r\n *\r\n * @returns {draw2d.util.Color}\r\n * @since 4.2.1\r\n */\r\n getOutlineColor: function () {\r\n return this.outlineColor\r\n },\r\n\r\n /**\r\n *\r\n * Set the outline stroke of the line to use.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * outlineStroke: w\r\n * });\r\n *\r\n * @param {Number} w The new outline width of the line\r\n * @since 4.2.1\r\n **/\r\n setOutlineStroke: function (w) {\r\n this.outlineStroke = w\r\n this.repaint()\r\n this.fireEvent(\"change:outlineStroke\", {value: this.outlineStroke})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The used outline line width.\r\n *\r\n * @returns {Number}\r\n * @since 4.2.1\r\n **/\r\n getOutlineStroke: function () {\r\n return this.outlineStroke\r\n },\r\n\r\n /**\r\n *\r\n * Called if the drag and drop action begins. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true if the figure accepts dragging\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey, isFaked) {\r\n let result = this._super(x, y, shiftKey, ctrlKey)\r\n\r\n if (result === true && isFaked !== true) {\r\n this.draggedSegment = {index: 0, start: this.start, end: this.end}\r\n }\r\n return result\r\n },\r\n\r\n /**\r\n *\r\n * Don't call them manually. This will be done by the framework.<br>\r\n * Will be called if the object are moved via drag and drop.\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call\r\n * the super implementation via <code>this._super(dx, dy, dx2, dy2);</code>\r\n * @private\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n if (this.command === null) {\r\n return\r\n }\r\n\r\n this.vertices.each(function (i, e) {\r\n e.translate(dx2, dy2)\r\n })\r\n this.command.updateVertices(this.vertices.clone())\r\n\r\n // start/end are separate draw2d.geo.Point objects. Required for routing and determining if a node is dragged away\r\n // from the connection. In this case we must modify the start/end by hand\r\n this.start.translate(dx2, dy2)\r\n this.end.translate(dx2, dy2)\r\n\r\n\r\n this.svgPathString = null\r\n this._super(dx, dy, dx2, dy2)\r\n },\r\n\r\n /**\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n // Element ist zwar schon an seine Position, das Command muss aber trotzdem\r\n // in dem CommandStack gelegt werden damit das Undo funktioniert.\r\n //\r\n this.isInDragDrop = false\r\n this.draggedSegment = null\r\n\r\n if (this.command === null) {\r\n return\r\n }\r\n\r\n this.canvas.getCommandStack().execute(this.command)\r\n this.command = null\r\n this.isMoving = false\r\n\r\n // notify all installed policies\r\n //\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.onDragEnd(this.canvas, this, x, y, shiftKey, ctrlKey)\r\n }\r\n })\r\n\r\n // inform all other listener\r\n this.fireEvent(\"move\", {figure: this, dx: 0, dy: 0})\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragend\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n },\r\n\r\n /**\r\n *\r\n * Set the position of the object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * x: x,\r\n * y: y\r\n * });\r\n *\r\n * @param {Number|draw2d.geo.Point} x The new x coordinate of the figure or the x/y coordinate if it is an draw2d.geo.Point\r\n * @param {Number} [y] The new y coordinate of the figure\r\n **/\r\n setPosition: function (x, y) {\r\n if (typeof x === \"undefined\") {\r\n debugger\r\n }\r\n\r\n // get the top left corner of the Line\r\n let topLeft = {x: this.getX(), y: this.getY()}\r\n let diff = {x:0 , y:0}\r\n\r\n if (x instanceof draw2d.geo.Point) {\r\n diff.x = x.x - topLeft.x\r\n diff.y = x.y - topLeft.y\r\n } else {\r\n diff.x = x - topLeft.x\r\n diff.y = y - topLeft.y\r\n }\r\n this.translate(diff.x, diff.y)\r\n },\r\n\r\n /**\r\n *\r\n * Called when a user clicks on the element.\r\n *\r\n * // Alternatively you can register for this event with\r\n * figure.on(\"click\", function(emitterFigure){\r\n * alert(\"clicked\");\r\n * });\r\n *\r\n * @template\r\n * @since 4.0.0\r\n */\r\n onClick: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Set the line style for this object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * dasharray: dashPattern\r\n * });\r\n *\r\n * @param {String} dashPattern Can be one of this [\"\", \"-\", \".\", \"-.\", \"-..\", \". \", \"- \", \"--\", \"- .\", \"--.\", \"--..\"]\r\n */\r\n setDashArray: function (dashPattern) {\r\n this.dasharray = dashPattern\r\n this.repaint()\r\n\r\n this.fireEvent(\"change:dashArray\", {value: this.dasharray})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the line style for this object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr(\"dasharray\");\r\n *\r\n * @since 5.1.0\r\n */\r\n getDashArray: function () {\r\n return this.dasharray\r\n },\r\n\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework. Don't call them manually.\r\n *\r\n * @private\r\n **/\r\n createShapeElement: function () {\r\n let set = this.canvas.paper.set()\r\n\r\n // the drop shadow or border line\r\n set.push(this.canvas.paper.path(\"M\" + this.start.x + \" \" + this.start.y + \"L\" + this.end.x + \" \" + this.end.y))\r\n // the main path\r\n set.push(this.canvas.paper.path(\"M\" + this.start.x + \" \" + this.start.y + \"L\" + this.end.x + \" \" + this.end.y))\r\n set.node = set.items[1].node\r\n\r\n // indicate that the outline is visible at the moment\r\n // the repaint update the status correct and set the attributes for\r\n // the first time\r\n this.outlineVisible = true//this.outlineStroke>0;\r\n\r\n return set\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n // don't override existing values\r\n //\r\n if (typeof attributes === \"undefined\") {\r\n attributes = {\r\n \"stroke\": this.lineColor.rgba(),\r\n \"stroke-width\": this.stroke,\r\n \"path\": [\"M\", this.start.x, this.start.y, \"L\", this.end.x, this.end.y].join(\" \")\r\n }\r\n }\r\n else {\r\n // may a router has calculate another path. don't override them.\r\n if (typeof attributes.path === \"undefined\") {\r\n attributes.path = [\"M\", this.start.x, this.start.y, \"L\", this.end.x, this.end.y].join(\" \")\r\n }\r\n attributes.stroke??=this.lineColor.rgba()\r\n attributes[\"stroke-width\"]??=this.stroke\r\n }\r\n\r\n attributes[\"stroke-dasharray\"]??=this.dasharray\r\n \r\n this._super(attributes)\r\n\r\n \r\n if (this.outlineStroke > 0) {\r\n this.shape.items[0].attr({\r\n \"stroke-width\": (this.outlineStroke + this.stroke),\r\n \"stroke\": this.outlineColor.rgba()\r\n })\r\n if (this.outlineVisible === false)\r\n this.shape.items[0].show()\r\n this.outlineVisible = true\r\n }\r\n else if (this.outlineVisible === true) {\r\n // reset them once\r\n this.shape.items[0].attr({\"stroke-width\": 0, \"stroke\": \"none\"})\r\n this.shape.items[0].hide()\r\n this.outlineVisible = false\r\n }\r\n if(this.animate) {\r\n $(this.shape.items[1].node).css({\"stroke-dashoffset\": this.animateDirection ? \"200\" : \"-200\", \"animation\": \"lineAnimation 5s linear infinite\"});\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Moves the element to the background. Additional\r\n * the internal model changed as well.\r\n *\r\n * @since 4.7.2\r\n */\r\n toBack: function (figure) {\r\n this._super(figure)\r\n\r\n if (this.outlineVisible === true) {\r\n this.shape.items[0].insertBefore(this.shape.items[1])\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n setGlowColor: function (w) {\r\n this.glowColor = w\r\n this.repaint()\r\n this.fireEvent(\"change:glowColor\", {value: this.glowColor})\r\n\r\n return this\r\n },\r\n\r\n\r\n getGlowStrokeSize: function () {\r\n return this.glowStrokeSize\r\n },\r\n\r\n setGlowStrokeSize: function (w) {\r\n this.glowStrokeSize = w\r\n this.repaint()\r\n this.fireEvent(\"change:glowStrokeSize\", {value: this.glowStrokeSize})\r\n\r\n return this\r\n },\r\n\r\n\r\n getGlowColor: function () {\r\n return this.glowColor\r\n },\r\n\r\n getDasharrayOffset: function () {\r\n return this.dasharrayOffset\r\n },\r\n\r\n setDasharrayOffset: function (w) {\r\n this.dasharrayOffset = w\r\n this.repaint()\r\n this.fireEvent(\"change:dasharrayOffset\", {value: this.dasharrayOffset})\r\n\r\n return this\r\n },\r\n\r\n getAnimate: function () {\r\n return this.animate\r\n },\r\n\r\n setAnimate: function (w) {\r\n this.animate = w\r\n this.repaint()\r\n this.fireEvent(\"change:animate\", {value: this.animate})\r\n\r\n return this\r\n },\r\n\r\n getAnimateDirection: function () {\r\n return this.animateDirection\r\n },\r\n\r\n setAnimateDirection: function (w) {\r\n this.animateDirection = w\r\n this.repaint()\r\n this.fireEvent(\"change:animateDirection\", {value: this.animateDirection})\r\n\r\n return this\r\n },\r\n \r\n /**\r\n *\r\n * Highlight the element or remove the highlighting\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * glow: flag\r\n * });\r\n *\r\n * @param {Boolean} flag indicates glow/noGlow\r\n * @template\r\n */\r\n setGlow: function (flag) {\r\n if (this.isGlowing === flag) {\r\n return\r\n }\r\n\r\n if (flag === true) {\r\n // store old values for restore\r\n this._lineColor = this.lineColor\r\n this._stroke = this.stroke\r\n\r\n this.setColor(this.glowColor) \r\n this.setStroke(this.glowStrokeSize)\r\n }\r\n else {\r\n this.setColor(this._lineColor)\r\n this.setStroke(this._stroke)\r\n }\r\n\r\n this.isGlowing = flag\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * You can't drag&drop the resize handles if the line not resizeable.\r\n * @returns boolean\r\n **/\r\n isResizeable: function () {\r\n return true\r\n },\r\n\r\n\r\n /**\r\n * Set the line width. This enforce a repaint of the line.\r\n * This method fires a <i>document dirty</i> event.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * stroke: w\r\n * });\r\n *\r\n * @param {Number} w The new line width of the figure.\r\n **/\r\n setStroke: function (w) {\r\n this.stroke = parseFloat(w)\r\n\r\n this.repaint()\r\n this.fireEvent(\"change:stroke\", {value: this.stroke})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The used line width.\r\n *\r\n * @returns {Number}\r\n **/\r\n getStroke: function () {\r\n return this.stroke\r\n },\r\n\r\n\r\n\r\n /**\r\n * click area for the line hit test.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * corona: w\r\n * });\r\n *\r\n * @param {Number} w The new click hit offset\r\n **/\r\n setCorona: function (w) {\r\n this.corona = parseFloat(w)\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The used corona hitTest area.\r\n *\r\n * @returns {Number}\r\n **/\r\n getCorona: function () {\r\n return this.corona\r\n },\r\n\r\n /**\r\n *\r\n * Set the color of the line.\r\n * This method fires a <i>document dirty</i> event.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * color: color\r\n * });\r\n *\r\n * @param {draw2d.util.Color|String} color The new color of the line.\r\n **/\r\n setColor: function (color) {\r\n this.lineColor = new draw2d.util.Color(color)\r\n this.repaint()\r\n this.fireEvent(\"change:color\", {value: this.lineColor})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the current paint color.\r\n *\r\n * @returns {draw2d.util.Color} The paint color of the line.\r\n **/\r\n getColor: function () {\r\n return this.lineColor\r\n },\r\n\r\n /**\r\n *\r\n * Translate the line with the given x/y offset.\r\n *\r\n * @param {Number} dx The new x translate offset\r\n * @param {Number} dy The new y translate offset\r\n * @since 4.1.0\r\n **/\r\n translate: function (dx, dy) {\r\n this.vertices.each(function (i, e) {\r\n e.translate(dx, dy)\r\n })\r\n\r\n // update start/end if the first or last vertex has been changed\r\n //\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * return the bounding box of the line or polygon\r\n *\r\n * TODO: precalculate or cache this values\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n * @since 4.8.2\r\n */\r\n getBoundingBox: function () {\r\n let minX = Math.min(...this.vertices.asArray().map(n => n.x))\r\n let minY = Math.min(...this.vertices.asArray().map(n => n.y))\r\n let maxX = Math.max(...this.vertices.asArray().map(n => n.x))\r\n let maxY = Math.max(...this.vertices.asArray().map(n => n.y))\r\n let width = maxX - minX\r\n let height = maxY - minY\r\n\r\n return new draw2d.geo.Rectangle(minX, minY, width, height)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the start point of the line.\r\n * This method fires a <i>document dirty</i> event.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * startX: x,\r\n * startY: y\r\n * });\r\n *\r\n * @param {Number|draw2d.geo.Point} x the x coordinate of the start point\r\n * @param {Number} [y] the y coordinate of the start point\r\n **/\r\n setStartPosition: function (x, y) {\r\n let pos = new draw2d.geo.Point(x, y)\r\n if (this.start.equals(pos)) {\r\n return this\r\n }\r\n\r\n this.start.setPosition(pos)\r\n this.vertices.first().setPosition(pos)\r\n this.repaint()\r\n\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n this.fireEvent(\"change:start\", {value: this.start})\r\n\r\n return this\r\n },\r\n /** @deprecated */\r\n setStartPoint: function (x, y) {\r\n return this.setStartPosition(x, y)\r\n },\r\n\r\n setStartX: function (x) {\r\n this.setStartPosition(x, this.start.y)\r\n },\r\n\r\n setStartY: function (y) {\r\n this.setStartPosition(this.start.x, y)\r\n },\r\n\r\n setEndX: function (x) {\r\n this.setEndPosition(x, this.end.y)\r\n },\r\n\r\n setEndY: function (y) {\r\n this.setEndPosition(this.end.x, y)\r\n },\r\n\r\n /**\r\n * Set the end point of the line.\r\n * This method fires a <i>document dirty</i> event.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * endX: 3,\r\n * endY: 10\r\n * });\r\n *\r\n * // or\r\n * figure.attr({\r\n * end: {x:3, y:10}\r\n * });\r\n * @param {Number|draw2d.geo.Point} x the x coordinate or a draw2d.geo.Point of the end point\r\n * @param {Number} [y] the y coordinate of the end point\r\n **/\r\n setEndPosition: function (x, y) {\r\n let pos = new draw2d.geo.Point(x, y)\r\n if (this.end.equals(pos)) {\r\n return this\r\n }\r\n\r\n this.end.setPosition(pos)\r\n this.vertices.last().setPosition(pos)\r\n this.repaint()\r\n\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"change:end\", {value: this.end})\r\n\r\n return this\r\n },\r\n /** @deprecated **/\r\n setEndPoint: function (x, y) {\r\n return this.setEndPosition(x, y)\r\n },\r\n\r\n /**\r\n *\r\n * Return the x coordinate of the start.\r\n * @returns {Number}\r\n **/\r\n getStartX: function () {\r\n return this.start.x\r\n },\r\n\r\n /**\r\n *\r\n * Return the y coordinate of the start.\r\n *\r\n * @returns {Number}\r\n **/\r\n getStartY: function () {\r\n return this.start.y\r\n },\r\n\r\n /**\r\n *\r\n * Return the start point.\r\n *\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n getStartPosition: function () {\r\n return this.start.clone()\r\n },\r\n /** @deprecated **/\r\n getStartPoint: function () {\r\n return this.getStartPosition()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the x coordinate of the end point\r\n *\r\n * @returns {Number}\r\n **/\r\n getEndX: function () {\r\n return this.end.x\r\n },\r\n\r\n /**\r\n *\r\n * Return the y coordinate of the end point.\r\n *\r\n * @returns {Number}\r\n **/\r\n getEndY: function () {\r\n return this.end.y\r\n },\r\n\r\n /**\r\n *\r\n * Return the end point.\r\n *\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n getEndPosition: function () {\r\n return this.end.clone()\r\n },\r\n /**\r\n * @deprecated use `getEndPosition`\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n getEndPoint: function () {\r\n return this.getEndPosition()\r\n },\r\n\r\n /**\r\n *\r\n * The x-offset related to the parent figure or canvas.\r\n *\r\n * @returns {Number} the x-offset to the parent figure\r\n **/\r\n getX: function () {\r\n return this.getBoundingBox().x\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The x-offset related to the parent figure or canvas.\r\n *\r\n * @returns {Number} the x-offset to the parent figure\r\n **/\r\n getY: function () {\r\n return this.getBoundingBox().y\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the Vertex with the given index.\r\n *\r\n * @param {Number} index the index of the vertex to return\r\n */\r\n getVertex: function (index) {\r\n return this.vertices.get(index)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Update the vertex at the give position with the new coordinate\r\n *\r\n * @param {Number} index the index of the vertex to update\r\n * @param {Number|draw2d.geo.Point} x the x coordinate or the draw2d.geo.Point object\r\n * @param {Number} [y] the y coordinate or undefined of the second argument is a point\r\n *\r\n * @since 4.0.0\r\n */\r\n setVertex: function (index, x, y) {\r\n if (x instanceof draw2d.geo.Point) {\r\n y = x.y\r\n x = x.x\r\n }\r\n\r\n let vertex = this.vertices.get(index)\r\n\r\n // invalid point or nothing to do\r\n //\r\n if (vertex === null || (vertex.x === x && vertex.y === y)) {\r\n return\r\n }\r\n\r\n vertex.x = parseFloat(x)\r\n vertex.y = parseFloat(y)\r\n\r\n // update start/end if the first or last vertex has been changed\r\n //\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n\r\n this.svgPathString = null\r\n this.routingRequired = true\r\n this.repaint()\r\n\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns the vertices of the connection\r\n *\r\n * @returns {draw2d.util.ArrayList} an draw2d.util.ArrayList of type draw2d.Point\r\n **/\r\n getVertices: function () {\r\n return this.vertices\r\n },\r\n\r\n /**\r\n *\r\n * Update the vertices of the object. The given array is copied and assigned.\r\n *\r\n * @param {draw2d.util.ArrayList|Array} vertices the new vertices of the polyline.\r\n *\r\n * @since 4.0.1\r\n */\r\n setVertices: function (vertices) {\r\n\r\n // convert json document/array to draw2d ArrayList\r\n //\r\n if (Array.isArray(vertices)) {\r\n this.vertices = new draw2d.util.ArrayList()\r\n vertices.forEach(element => {\r\n this.vertices.add(new draw2d.geo.Point(element))\r\n })\r\n }\r\n // use the given ArrayList\r\n //\r\n else if (vertices instanceof draw2d.util.ArrayList) {\r\n this.vertices = vertices.clone(true)\r\n }\r\n else {\r\n throw \"invalid argument for Line.setVertices\"\r\n }\r\n\r\n // can happen if the given vertices array is empty\r\n //\r\n if (this.vertices.getSize() > 1) {\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n }\r\n\r\n // update the UI and the segment parts\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n // align the SelectionHandles to the new situation\r\n // This is a Hack....normally this should be done below and the Line shouldn't know\r\n // something about this issue....this is complete a \"EditPolicy\" domain to handle this.\r\n if (!this.selectionHandles.isEmpty()) {\r\n this.editPolicy.each((i, e) =>{\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(this.canvas, this)\r\n e.onSelect(this.canvas, this)\r\n }\r\n })\r\n }\r\n\r\n // notify the listener about the changes\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the segments of the line with {start:s, end: e} JSON array list\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getSegments: function () {\r\n let result = new draw2d.util.ArrayList()\r\n result.add({start: this.getStartPosition(), end: this.getEndPosition()})\r\n\r\n return result\r\n },\r\n\r\n /**\r\n *\r\n * Returns the length of the line.\r\n *\r\n * @returns {Number}\r\n **/\r\n getLength: function () {\r\n return Math.sqrt((this.start.x - this.end.x) * (this.start.x - this.end.x) + (this.start.y - this.end.y) * (this.start.y - this.end.y))\r\n },\r\n\r\n /**\r\n *\r\n * Returns the angle of the line in degree.\r\n *\r\n * <pre>\r\n * 270°\r\n * |\r\n * |\r\n * |\r\n * |\r\n * 180° -------------------------+------------------------> +X\r\n * | 0°\r\n * |\r\n * |\r\n * |\r\n * V +Y\r\n * 90°\r\n * </pre>\r\n * @returns {Number}\r\n **/\r\n getAngle: function () {\r\n let length = this.getLength()\r\n let angle = -(180 / Math.PI) * Math.asin((this.start.y - this.end.y) / length)\r\n\r\n if (angle < 0) {\r\n if (this.end.x < this.start.x) {\r\n angle = Math.abs(angle) + 180\r\n }\r\n else {\r\n angle = 360 - Math.abs(angle)\r\n }\r\n }\r\n else {\r\n if (this.end.x < this.start.x) {\r\n angle = 180 - angle\r\n }\r\n }\r\n return angle\r\n },\r\n\r\n /**\r\n *\r\n * Returns the Command to perform the specified Request or null if the shape want cancel the\r\n * operation or it can't operate the command.\r\n *\r\n * @param {draw2d.command.CommandType} request describes the Command being requested\r\n * @returns {draw2d.command.Command} null or a Command\r\n * @private\r\n **/\r\n createCommand: function (request) {\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE) {\r\n if (this.isDraggable()) {\r\n return new draw2d.command.CommandMoveVertices(this)\r\n }\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.DELETE) {\r\n if (this.isDeleteable()) {\r\n return new draw2d.command.CommandDelete(this)\r\n }\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE_BASEPOINT) {\r\n if (this.isDraggable()) {\r\n return new draw2d.command.CommandMoveVertex(this)\r\n }\r\n }\r\n\r\n return null\r\n },\r\n\r\n installEditPolicy: function (policy) {\r\n if (!(policy instanceof draw2d.policy.line.LineSelectionFeedbackPolicy) && policy instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n return// silently\r\n }\r\n\r\n this._super(policy)\r\n\r\n },\r\n\r\n /**\r\n *\r\n * Checks if the hands over coordinate close to the line. The 'corona' is considered\r\n * for this test. This means the point isn't direct on the line. Is it only close to the\r\n * line!\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {Boolean}\r\n **/\r\n hitTest: function (px, py) {\r\n return draw2d.shape.basic.Line.hit(this.corona + this.stroke, this.start.x, this.start.y, this.end.x, this.end.y, px, py)\r\n },\r\n\r\n /**\r\n *\r\n * Returns the projection of the point on the line.\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n pointProjection: function (px, py) {\r\n let pt = new draw2d.geo.Point(px, py)\r\n let p1 = this.getStartPosition()\r\n let p2 = this.getEndPosition()\r\n return draw2d.geo.Line.pointProjection(p1.x, p1.y, p2.x, p2.y, pt.x, pt.y)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the point onto the line which has the 'percentage' position onto the line.\r\n *\r\n * @param {Number} percentage value between [0..1]\r\n * @returns {*}\r\n */\r\n lerp: function (percentage) {\r\n let p1 = this.getStartPosition()\r\n let p2 = this.getEndPosition()\r\n percentage = Math.min(1, Math.max(0, percentage))\r\n return new draw2d.geo.Point(p1.x + (p2.x - p1.x) * percentage, p1.y + (p2.y - p1.y) * percentage)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return all intersection points between the given Line.\r\n *\r\n * @param {draw2d.shape.basic.Line} other\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n intersection: function (other) {\r\n let result = new draw2d.util.ArrayList()\r\n\r\n // empty result. the lines are equal...infinit array\r\n if (other === this) {\r\n return result\r\n }\r\n\r\n let segments1 = this.getSegments()\r\n let segments2 = other.getSegments()\r\n\r\n segments1.each(function (i, s1) {\r\n segments2.each(function (j, s2) {\r\n let p = draw2d.shape.basic.Line.intersection(s1.start, s1.end, s2.start, s2.end)\r\n if (p !== null) {\r\n result.add(p)\r\n }\r\n })\r\n })\r\n return result\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n delete memento.x\r\n delete memento.y\r\n delete memento.width\r\n delete memento.height\r\n\r\n memento.stroke = this.stroke\r\n memento.color = this.getColor().rgba()\r\n memento.outlineStroke = this.outlineStroke\r\n memento.outlineColor = this.outlineColor.rgba()\r\n if (this.dasharray !== null) {\r\n memento.dasharray = this.dasharray\r\n }\r\n\r\n if (this.editPolicy.getSize() > 0) {\r\n memento.policy = this.editPolicy.first().NAME\r\n }\r\n\r\n // the attribute \"vertex\" will be overridden by a router if the element is a\r\n // \"PolyLine\" instance and has the correct router. Connections mainly ignore this\r\n // attribute because the start/end is defined by the ports and the vertices in between are\r\n // calculated by a router.\r\n memento.vertex = []\r\n this.getVertices().each( (i, e) => {\r\n memento.vertex.push({x: e.x, y: e.y})\r\n })\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.dasharray === \"string\") {\r\n this.dasharray = memento.dasharray\r\n }\r\n if (typeof memento.stroke !== \"undefined\") {\r\n this.setStroke(parseFloat(memento.stroke))\r\n }\r\n if (typeof memento.color !== \"undefined\") {\r\n this.setColor(memento.color)\r\n }\r\n if (typeof memento.outlineStroke !== \"undefined\") {\r\n this.setOutlineStroke(memento.outlineStroke)\r\n }\r\n if (typeof memento.outlineColor !== \"undefined\") {\r\n this.setOutlineColor(memento.outlineColor)\r\n }\r\n if (typeof memento.policy !== \"undefined\") {\r\n try {\r\n this.installEditPolicy(Function(`return new ${memento.policy}()`)())\r\n }\r\n catch (exc) {\r\n debug.warn(\"Unable to install edit policy '\" + memento.policy + \"' forced by \" + this.NAME + \".setPersistentAttributes. Using default.\")\r\n }\r\n }\r\n\r\n // restore the vertex of the connection/line if any are given\r\n //\r\n // it makes no sense to restore vertices with only zero or one vertex. This\r\n // isn't a \"line\" at all.\r\n if (Array.isArray(memento.vertex) && memento.vertex.length > 1) {\r\n this.setVertices(memento.vertex)\r\n }\r\n\r\n return this\r\n }\r\n})\r\n\r\n\r\n/**\r\n * see: http://en.wikipedia.org/wiki/Line-line_intersection\r\n *\r\n * @param {draw2d.geo.Point} a1\r\n * @param {draw2d.geo.Point} a2\r\n * @param {draw2d.geo.Point} b1\r\n * @param {draw2d.geo.Point} b2\r\n *\r\n * @static\r\n * @private\r\n * @returns {draw2d.geo.Point}\r\n */\r\ndraw2d.shape.basic.Line.intersection = function (a1, a2, b1, b2) {\r\n let result = null\r\n\r\n let ua_t = (b2.x - b1.x) * (a1.y - b1.y) - (b2.y - b1.y) * (a1.x - b1.x)\r\n let ub_t = (a2.x - a1.x) * (a1.y - b1.y) - (a2.y - a1.y) * (a1.x - b1.x)\r\n let u_b = (b2.y - b1.y) * (a2.x - a1.x) - (b2.x - b1.x) * (a2.y - a1.y)\r\n\r\n if (u_b !== 0) {\r\n let ua = ua_t / u_b\r\n let ub = ub_t / u_b\r\n\r\n if (0 <= ua && ua <= 1 && 0 <= ub && ub <= 1) {\r\n result = new draw2d.geo.Point((a1.x + ua * (a2.x - a1.x)) | 0, (a1.y + ua * (a2.y - a1.y)) | 0)\r\n\r\n // determine if the lines are crossing or just touching\r\n //\r\n result.justTouching = (0 === ua || ua === 1 || 0 === ub || ub === 1)\r\n }\r\n }\r\n\r\n return result\r\n}\r\n\r\n\r\n/**\r\n * Static util function to determine is a point(px,py) on the line(x1,y1,x2,y2)\r\n * A simple hit test.\r\n *\r\n * @returns {Boolean}\r\n * @static\r\n * @private\r\n * @param {Number} coronaWidth the accepted corona for the hit test\r\n * @param {Number} X1 x coordinate of the start point of the line\r\n * @param {Number} Y1 y coordinate of the start point of the line\r\n * @param {Number} X2 x coordinate of the end point of the line\r\n * @param {Number} Y2 y coordinate of the end point of the line\r\n * @param {Number} px x coordinate of the point to test\r\n * @param {Number} py y coordinate of the point to test\r\n **/\r\ndraw2d.shape.basic.Line.hit = function (coronaWidth, X1, Y1, X2, Y2, px, py) {\r\n return draw2d.geo.Line.distance(X1, Y1, X2, Y2, px, py) < coronaWidth\r\n}\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Selection handle for connections and normal lines.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.LineResizeHandle\r\n */\r\ndraw2d.shape.basic.LineEndResizeHandle = draw2d.shape.basic.LineResizeHandle.extend(\r\n /** @lends draw2d.shape.basic.LineEndResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.LineEndResizeHandle\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (figure) {\r\n this._super({owner: figure, index: figure.getVertices().getSize() - 1})\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the Port assigned to this ResizeHandle if the line is an instance of draw2d.Connection\r\n *\r\n * @returns {draw2d.Port}\r\n */\r\n getRelatedPort: function () {\r\n if (this.owner instanceof draw2d.Connection) {\r\n return this.owner.getTarget()\r\n }\r\n\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Return the peer Port assigned to this ResizeHandle if the line is an instance of draw2d.Connection\r\n *\r\n * @returns {draw2d.Port}\r\n */\r\n getOppositePort: function () {\r\n if (this.owner instanceof draw2d.Connection) {\r\n return this.owner.getSource()\r\n }\r\n\r\n return null\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called from the framework during a drag&drop operation\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @returns {Boolean}\r\n * @private\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n this._super(dx, dy, dx2, dy2)\r\n\r\n let objPos = this.owner.getEndPoint().clone()\r\n objPos.translate(dx2, dy2)\r\n\r\n if (this.command !== null) {\r\n this.command.updatePosition(objPos)\r\n }\r\n\r\n this.owner.setEndPoint(objPos)\r\n\r\n this.owner.isMoving = true\r\n\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Resizehandle has been drop on a InputPort/OutputPort.\r\n *\r\n * @param {draw2d.Figure} dropTarget\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onDrop: function (dropTarget, x, y, shiftKey, ctrlKey) {\r\n this.owner.isMoving = false\r\n\r\n if (this.owner instanceof draw2d.Connection && this.command !== null) {\r\n this.command.setNewPorts(this.owner.getSource(), dropTarget)\r\n this.getCanvas().getCommandStack().execute(this.command)\r\n }\r\n this.command = null\r\n },\r\n\r\n /**\r\n *\r\n * Controls the location of the resize handle\r\n *\r\n **/\r\n relocate: function () {\r\n\r\n let resizeWidthHalf = this.getWidth() / 2\r\n let resizeHeightHalf = this.getHeight() / 2\r\n\r\n let anchor = this.owner.getEndPoint()\r\n\r\n this.setPosition(anchor.x - resizeWidthHalf, anchor.y - resizeHeightHalf)\r\n\r\n return this\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Base class for selection handle for connections and normal lines.\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Circle\r\n */\r\ndraw2d.shape.basic.LineResizeHandle = draw2d.shape.basic.Circle.extend(\r\n /** @lends draw2d.shape.basic.LineResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.LineResizeHandle\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.zoomCallback = () => {\r\n this.attr({\r\n width: this.origWidth * this.getCanvas().getZoom(),\r\n height: this.origHeight * this.getCanvas().getZoom(),\r\n stroke: this.origStroke * this.getCanvas().getZoom()\r\n })\r\n // size of the ResizeHandle has changed. Force a reposition of handle\r\n //\r\n if (!this.blockEvent)\r\n this.owner.fireEvent(\"move\", {})\r\n }\r\n\r\n this._super(\r\n {\r\n bgColor: \"#5bcaff\",\r\n stroke: 1,\r\n width: 10,\r\n height: 10,\r\n minWidth: 0.3,\r\n minHeight: 0.3,\r\n selectable: false,\r\n ...attr},\r\n {\r\n owner: this.setOwner,\r\n index: this.setIndex,\r\n ...setter},\r\n {\r\n owner: this.getOwner,\r\n index: this.getIndex,\r\n ...getter})\r\n\r\n // required in the SelectionEditPolicy to indicate the type of figure\r\n // which the user clicks\r\n this.isResizeHandle = true\r\n this.currentTarget = null\r\n\r\n this.origWidth = this.width\r\n this.origHeight = this.height\r\n this.origStroke = this.stroke\r\n },\r\n\r\n /**\r\n * \r\n * Returns the current used SVG as string\r\n *\r\n * @returns {String}\r\n */\r\n getOwner: function () {\r\n return this.owner\r\n },\r\n\r\n setOwner: function (owner) {\r\n this.owner = owner\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns the index of the selection. In case of a PlyLine the count is dynamic.\r\n *\r\n * @returns {Number}\r\n */\r\n getIndex: function () {\r\n return this.index\r\n },\r\n\r\n setIndex: function (index) {\r\n this.index = index\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n let shape = this._super()\r\n\r\n shape.attr({\"cursor\": \"move\"})\r\n return shape\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n **/\r\n setBackgroundColor: function (color) {\r\n color = new draw2d.util.Color(color)\r\n\r\n this.bgGradient = \"r(.4,.3)\" + color.hash() + \"-\" + color.darker(0.1).hash() + \":60-\" + color.darker(0.2).hash()\r\n this._super(color)\r\n this.setColor(color.darker(0.3))\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the port below the ResizeHandle.\r\n *\r\n * @template\r\n * @returns {draw2d.Port}\r\n */\r\n getRelatedPort: function () {\r\n return null\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the port of the other side of the related connection.\r\n *\r\n * @template\r\n * @returns {draw2d.Port}\r\n */\r\n getOppositePort: function () {\r\n return null\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n\r\n if (this.bgColor.hash() === \"none\") {\r\n attributes.fill = this.bgColor.rgba()\r\n }\r\n else if (this.getAlpha() < 0.9) {\r\n attributes.fill = this.bgColor.rgba()\r\n }\r\n else {\r\n attributes.fill = this.bgGradient\r\n }\r\n\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n * Called if the drag and drop action begins. You can return [false] if you\r\n * want avoid the that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @type {Boolean}\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n this.command = this.owner.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE_BASEPOINT))\r\n // no drag&drop allowed if we didn'T have a valid command.\r\n // This is one way to send a veto for Connection reconnect\r\n if (this.command !== null) {\r\n this.command.setIndex(this.index)\r\n }\r\n\r\n this.setAlpha(0.2)\r\n this.shape.attr({\"cursor\": \"crosshair\"})\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragstart\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n return true\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called from the framework during a drag&drop operation\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @returns {Boolean}\r\n * @private\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n this.setPosition(this.x + dx2, this.y + dy2)\r\n\r\n let port = this.getOppositePort()\r\n\r\n let target = port !== null ? port.getCanvas().getBestFigure(this.getX(), this.getY(), [this, this.owner]) : null\r\n\r\n // the hovering element has been changed\r\n if (target !== this.currentTarget) {\r\n\r\n if (this.currentTarget !== null) {\r\n this.currentTarget.onDragLeave(port)\r\n this.currentTarget.setGlow(false)\r\n this.currentTarget.fireEvent(\"dragLeave\", {draggingElement: port})\r\n }\r\n\r\n if (target !== null) {\r\n this.currentTarget = target.delegateTarget(port)\r\n if (this.currentTarget !== null) {\r\n this.currentTarget.setGlow(true)\r\n this.currentTarget.onDragEnter(port) // legacy\r\n this.currentTarget.fireEvent(\"dragEnter\", {draggingElement: port})\r\n }\r\n }\r\n }\r\n\r\n return true\r\n },\r\n\r\n /**\r\n * Called after a drag and drop action.<br>\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call the super implementation via <code>this._super();</code>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean}\r\n */\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n if (!this.isDraggable()) {\r\n return false\r\n }\r\n\r\n this.shape.attr({\"cursor\": \"move\"})\r\n\r\n let port = this.getOppositePort()\r\n if (port !== null) {\r\n if (this.currentTarget !== null) {\r\n\r\n this.onDrop(this.currentTarget, x, y, shiftKey, ctrlKey)\r\n this.currentTarget.onDragLeave(port)\r\n this.currentTarget.setGlow(false)\r\n this.currentTarget.fireEvent(\"dragLeave\", {draggingElement: port})\r\n this.currentTarget.onCatch(this, x, y, shiftKey, ctrlKey)\r\n this.currentTarget = null\r\n }\r\n }\r\n\r\n this.owner.isMoving = false\r\n // A Connection is stuck to the corresponding ports. So we must reset the position\r\n // to the origin port if we doesn't drop the ResizeHandle on a other port.\r\n //\r\n if (this.owner instanceof draw2d.Connection) {\r\n if (this.command !== null) {\r\n this.command.cancel()\r\n }\r\n }\r\n //\r\n else {\r\n // An non draggable resizeHandle doesn't create a move/resize command.\r\n // This happens if the selected figure has set \"isResizeable=false\".\r\n //\r\n if (this.command !== null) {\r\n this.getCanvas().getCommandStack().execute(this.command)\r\n }\r\n }\r\n this.command = null\r\n\r\n this.setAlpha(1)\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragend\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Controls the position of the ResizeHandle\r\n * Called by the framework.\r\n *\r\n **/\r\n relocate: function () {\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * The LineResizeHandle didn't support the SnapToHelper feature if the\r\n * corresponding object is an Connection. A Connection is always bounded to\r\n * Port. In this case it makes no sense to use a Grid or Geometry for snapping.\r\n *\r\n * @returns {Boolean} return false if the corresponding object didn't support snapTo\r\n **/\r\n supportsSnapToHelper: function () {\r\n if (this.owner instanceof draw2d.Connection) {\r\n return false\r\n }\r\n\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n * Show the ResizeHandle and add it to the canvas.<br>\r\n * Additional bring it in to the front of other figures.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to use\r\n * @param {Number} x the x-position\r\n * @param {Number} y the y-position\r\n **/\r\n show: function (canvas, x, y) {\r\n if (x)\r\n debugger\r\n // don't call the parent function. The parent functions make this object selectable/deleteable\r\n // and a resize handle can't be deleted.\r\n this.setCanvas(canvas)\r\n try {\r\n this.blockEvent = true\r\n this.zoomCallback()\r\n }\r\n finally {\r\n this.blockEvent = false\r\n }\r\n\r\n // this.setPosition(x,y);\r\n this.shape.toFront()\r\n this.canvas.resizeHandles.add(this)\r\n },\r\n\r\n /**\r\n * \r\n * Hide the resize handle and remove it from the canvas.\r\n *\r\n **/\r\n hide: function () {\r\n // don't call the parent function. The parent functions delete this object\r\n // and a resize handle shouldn't be deleted.\r\n if (this.shape === null) {\r\n return\r\n }\r\n\r\n this.canvas.resizeHandles.remove(this)\r\n this.setCanvas(null)\r\n },\r\n\r\n\r\n setCanvas: function (canvas) {\r\n\r\n if (this.canvas !== null) {\r\n this.canvas.off(this.zoomCallback)\r\n }\r\n\r\n this._super(canvas)\r\n\r\n if (this.canvas !== null) {\r\n this.canvas.on(\"zoom\", this.zoomCallback)\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Override this method and redirect them to the canvas. A ResizeHandle didn't support\r\n * Keyboard interaction at the moment.\r\n *\r\n * @param {Number} keyCode the id of the pressed key\r\n * @param {Boolean} ctrl true if the user has pressed the CTRL/STRG key as well.\r\n **/\r\n onKeyDown: function (keyCode, ctrl) {\r\n // don't call the parent function. The parent functions delete this object\r\n // and a resize handle can't be deleted.\r\n this.canvas.onKeyDown(keyCode, ctrl)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Selection handle for connections and normal lines.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.LineResizeHandle\r\n */\r\ndraw2d.shape.basic.LineStartResizeHandle = draw2d.shape.basic.LineResizeHandle.extend(\r\n /** @lends draw2d.shape.basic.LineStartResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.LineStartResizeHandle\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (figure) {\r\n this._super({owner: figure, index: 0})\r\n },\r\n\r\n /**\r\n * Returns the Port below the ResizeHandle\r\n *\r\n * @returns {draw2d.Port}\r\n */\r\n getRelatedPort: function () {\r\n if (this.owner instanceof draw2d.Connection)\r\n return this.owner.getSource()\r\n\r\n return null\r\n },\r\n\r\n /**\r\n * Returns the Port on the opposite side of the ResizeHandle\r\n *\r\n * @returns {draw2d.Port}\r\n */\r\n getOppositePort: function () {\r\n if (this.owner instanceof draw2d.Connection)\r\n return this.owner.getTarget()\r\n\r\n return null\r\n },\r\n\r\n /**\r\n * \r\n * Called from the framework during a drag&drop operation\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @returns {Boolean}\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n this._super(dx, dy, dx2, dy2)\r\n\r\n let objPos = this.owner.getStartPoint()\r\n objPos.translate(dx2, dy2)\r\n\r\n if (this.command !== null) {\r\n this.command.updatePosition(objPos)\r\n\r\n }\r\n this.owner.setStartPoint(objPos)\r\n\r\n this.owner.isMoving = true\r\n\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n * Resize handle has been drop on a InputPort/OutputPort.\r\n *\r\n * @param {draw2d.Port} dropTarget\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n **/\r\n onDrop: function (dropTarget, x, y, shiftKey, ctrlKey) {\r\n this.owner.isMoving = false\r\n\r\n // The ResizeHandle of a Connection has been dropped on a Port\r\n // This will enforce a ReconnectCommand\r\n if (this.owner instanceof draw2d.Connection && this.command !== null) {\r\n this.command.setNewPorts(dropTarget, this.owner.getTarget())\r\n this.getCanvas().getCommandStack().execute(this.command)\r\n }\r\n this.command = null\r\n },\r\n\r\n /**\r\n * \r\n * Controls the location of the resize handle\r\n **/\r\n relocate: function () {\r\n let resizeWidthHalf = this.getWidth() / 2\r\n let resizeHeightHalf = this.getHeight() / 2\r\n\r\n let anchor = this.owner.getStartPoint()\r\n\r\n this.setPosition(anchor.x - resizeWidthHalf, anchor.y - resizeHeightHalf)\r\n\r\n return this\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * Oval figure.\r\n *\r\n * @example\r\n *\r\n * let oval = new draw2d.shape.basic.Oval({width:150, height:100, x:50, y:10});\r\n *\r\n * canvas.add(oval);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.basic.Oval = draw2d.VectorFigure.extend(\r\n /** @lends draw2d.shape.basic.Oval.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Oval\",\r\n\r\n /**\r\n *\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(\r\n {\r\n bgColor: \"#C02B1D\",\r\n color: \"#1B1B1B\",\r\n ...attr\r\n },\r\n {\r\n center: this.setCenter,\r\n ...setter\r\n },\r\n getter)\r\n },\r\n\r\n\r\n /**\r\n * @template\r\n **/\r\n createShapeElement: function () {\r\n let halfW = this.getWidth() / 2\r\n let halfH = this.getHeight() / 2\r\n\r\n return this.canvas.paper.ellipse(this.getAbsoluteX() + halfW, this.getAbsoluteY() + halfH, halfW, halfH)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n applyTransformation: function applyTransformation() {\r\n var ts = \"R\" + this.rotationAngle;\r\n\r\n this.shape.transform(ts);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n *\r\n * Get the center of the figure\r\n *\r\n */\r\n getCenter: function () {\r\n let w2 = this.getWidth() / 2\r\n let h2 = this.getHeight() / 2\r\n\r\n return this.getPosition().translated(w2, h2)\r\n },\r\n\r\n /**\r\n *\r\n * Set the center of the figure.\r\n *\r\n * @param {Number|draw2d.geo.Point} x the new x coordinate of the center or a draw2d.geo.Point object with the center\r\n * @param {Number} [y] the y coordinate of the new center of the first argument isn't a draw2d.geo.Point object\r\n */\r\n setCenter: function (x, y) {\r\n let pos = new draw2d.geo.Point(x, y)\r\n let w2 = this.getWidth() / 2\r\n let h2 = this.getHeight() / 2\r\n\r\n pos.translate(-w2, -h2)\r\n this.setPosition(pos)\r\n\r\n this.fireEvent(\"change:center\", {value: {x: x, y: y}})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n * @template\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n\r\n // don't override cx/cy if inherited class has set the center already.\r\n if (typeof attributes.rx === \"undefined\") {\r\n attributes.rx = this.width / 2\r\n attributes.ry = this.height / 2\r\n }\r\n\r\n // don't override cx/cy if inherited class has set the center already.\r\n if (typeof attributes.cx === \"undefined\") {\r\n attributes.cx = this.getAbsoluteX() + attributes.rx\r\n attributes.cy = this.getAbsoluteY() + attributes.ry\r\n }\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * NOTE: Rotation will need to be added to this function\r\n *\r\n **/\r\n intersectionWithLine: function (a1, a2) {\r\n let rx = this.getWidth() / 2\r\n let ry = this.getHeight() / 2\r\n\r\n let result = new draw2d.util.ArrayList()\r\n\r\n let origin = new draw2d.geo.Point(a1.x, a1.y)\r\n let dir = a2.subtract(a1)\r\n let center = new draw2d.geo.Point(this.getAbsoluteX() + rx, this.getAbsoluteY() + ry)\r\n let diff = origin.subtract(center)\r\n let mDir = new draw2d.geo.Point(dir.x / (rx * rx), dir.y / (ry * ry))\r\n let mDiff = new draw2d.geo.Point(diff.x / (rx * rx), diff.y / (ry * ry))\r\n\r\n let a = dir.dot(mDir)\r\n let b = dir.dot(mDiff)\r\n let c = diff.dot(mDiff) - 1.0\r\n let d = b * b - a * c\r\n\r\n if (d < 0) {\r\n // \"Outside\"\r\n } else if (d > 0) {\r\n let root = Math.sqrt(d)\r\n let t_a = (-b - root) / a\r\n let t_b = (-b + root) / a\r\n\r\n if ((t_a < 0 || 1 < t_a) && (t_b < 0 || 1 < t_b)) {\r\n if ((t_a < 0 && t_b < 0) || (t_a > 1 && t_b > 1)) {\r\n //\"Outside\";\r\n } else {\r\n //\"Inside\";\r\n }\r\n } else {\r\n if (0 <= t_a && t_a <= 1)\r\n result.add(a1.lerp(a2, t_a))\r\n if (0 <= t_b && t_b <= 1)\r\n result.add(a1.lerp(a2, t_b))\r\n }\r\n } else {\r\n let t = -b / a\r\n if (0 <= t && t <= 1) {\r\n result.add(a1.lerp(a2, t))\r\n } else {\r\n //\"Outside\";\r\n }\r\n }\r\n\r\n return result\r\n }\r\n\r\n })\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A PolyLine is a line with more than 2 points.\r\n *\r\n *\r\n * @example\r\n *\r\n * let line = new draw2d.shape.basic.PolyLine();\r\n * line.setVertices([{x:10,y:10},{x:80,y:70},{x:100,y:110}]);\r\n * canvas.add(line);\r\n *\r\n *\r\n * canvas.setCurrentSelection(line);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Line\r\n */\r\ndraw2d.shape.basic.PolyLine = draw2d.shape.basic.Line.extend(\r\n /** @lends draw2d.shape.basic.PolyLine.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.PolyLine\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // internal status handling for performance reasons\r\n //\r\n this.svgPathString = null\r\n this.oldPoint = null\r\n\r\n this.router = null\r\n this.routingRequired = true\r\n this.lineSegments = new draw2d.util.ArrayList()\r\n\r\n this.radius = \"\"\r\n\r\n this._super(\r\n {router: new draw2d.layout.connection.VertexRouter(), ...attr},\r\n {\r\n router: this.setRouter,\r\n radius: this.setRadius,\r\n ...setter,\r\n },\r\n {\r\n router: this.getRouter,\r\n radius: this.getRadius,\r\n ...getter\r\n }\r\n )\r\n },\r\n\r\n /**\r\n * \r\n * Sets the corner radius of the edges.\r\n *\r\n * @param {Number} radius the corner radius\r\n * @since 4.2.1\r\n */\r\n setRadius: function (radius) {\r\n this.radius = radius\r\n this.svgPathString = null\r\n this.repaint()\r\n this.fireEvent(\"change:radius\", {value: this.radius})\r\n\r\n return this\r\n },\r\n\r\n\r\n setOutlineStroke: function (w) {\r\n if (this.outlineStroke !== w) {\r\n this.svgPathString = null\r\n this.routingRequired = true\r\n }\r\n this._super(w)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Get the corner radius of the edges.\r\n *\r\n * @returns {Number}\r\n * @since 4.2.1\r\n */\r\n getRadius: function () {\r\n return this.radius\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the start point of the line.\r\n *\r\n * @param {Number} x the x coordinate of the start point\r\n * @param {Number} y the y coordinate of the start point\r\n **/\r\n setStartPoint: function (x, y) {\r\n if (this.vertices.getSize() > 0) {\r\n this.vertices.first().setPosition(x, y)\r\n }\r\n else {\r\n this.vertices.add(new draw2d.geo.Point(x, y))\r\n }\r\n this.start = this.vertices.first().clone()\r\n // if(this.isInDragDrop===false)\r\n this.calculatePath({startMoved: true, endMoved: false})\r\n\r\n this.repaint()\r\n\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"change:start\", {value: this.start})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Set the end point of the line.\r\n *\r\n * @param {Number} x the x coordinate of the end point\r\n * @param {Number} y the y coordinate of the end point\r\n */\r\n setEndPoint: function (x, y) {\r\n if (this.vertices.getSize() > 1) {\r\n this.vertices.last().setPosition(x, y)\r\n }\r\n else {\r\n this.vertices.add(new draw2d.geo.Point(x, y))\r\n }\r\n this.end = this.vertices.last().clone()\r\n\r\n if (this.isInDragDrop === false)\r\n this.calculatePath({startMoved: false, endMoved: true})\r\n\r\n this.repaint()\r\n\r\n\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n this.fireEvent(\"change:end\", {value: this.end})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Inserts the draw2d.geo.Point object into the vertex list of the polyline just after the object with the given index.\r\n *\r\n * @param {Number|draw2d.geo.Point} x the x coordinate or the draw2d.geo.Point object\r\n * @param {Number} [y] the y coordinate or undefined of the second argument is a point\r\n *\r\n * @since 4.0.0\r\n */\r\n addVertex: function (x, y) {\r\n this.vertices.add(new draw2d.geo.Point(x, y))\r\n\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n if (!this.selectionHandles.isEmpty()) {\r\n\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(this.canvas, this)\r\n e.onSelect(this.canvas, this)\r\n }\r\n })\r\n }\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Inserts the draw2d.geo.Point object into the vertex list of the polyline just after the object with the given index.\r\n *\r\n * @param {Number} index the insert index\r\n * @param {Number|draw2d.geo.Point} x the x coordinate or the draw2d.geo.Point object\r\n * @param {Number} [y] the y coordinate or undefined of the second argument is a point\r\n *\r\n * @since 4.0.0\r\n */\r\n insertVertexAt: function (index, x, y) {\r\n let vertex = new draw2d.geo.Point(x, y)\r\n\r\n this.vertices.insertElementAt(vertex, index)\r\n\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n if (!this.selectionHandles.isEmpty()) {\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(this.canvas, this)\r\n e.onSelect(this.canvas, this)\r\n }\r\n })\r\n }\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Remove a vertex from the polyline and return the removed point. The current installed connection router\r\n * can send an veto for this operation.\r\n *\r\n * @param index\r\n * @returns {draw2d.geo.Point} the removed point or null of the current router decline this operation\r\n * @since 4.0.0\r\n */\r\n removeVertexAt: function (index) {\r\n let removedPoint = this.vertices.removeElementAt(index)\r\n\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n if (!this.selectionHandles.isEmpty()) {\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(this.canvas, this)\r\n e.onSelect(this.canvas, this)\r\n }\r\n })\r\n }\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return removedPoint\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the router for this connection.\r\n *\r\n * @param {draw2d.layout.connection.ConnectionRouter} [router] the new router for this connection or null if the connection should use the default routing\r\n **/\r\n setRouter: function (router) {\r\n if (this.router !== null) {\r\n this.router.onUninstall(this)\r\n }\r\n\r\n this.router = router ?? new draw2d.layout.connection.DirectRouter()\r\n\r\n this.router.onInstall(this)\r\n\r\n this.routingRequired = true\r\n\r\n // repaint the connection with the new router\r\n this.repaint()\r\n\r\n this.fireEvent(\"change:router\", {value: this.router})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return the current active router of this connection.\r\n *\r\n * @returns draw2d.layout.connection.ConnectionRouter\r\n **/\r\n getRouter: function () {\r\n return this.router\r\n },\r\n\r\n /**\r\n * \r\n * Calculate the path of the polyline\r\n *\r\n * @param {Object} [routingHints] some helper attributes for the router\r\n * @param {Boolean} routingHints.startMoved is true if just the start location has moved\r\n * @param {Boolean} routingHints.endMoved is true if the destination location has changed\r\n * @param {Boolean} routingHints.oldVertices store old vertices for after processing\r\n *\r\n * @private\r\n */\r\n calculatePath: function (routingHints) {\r\n routingHints ??= {}\r\n\r\n if (this.shape === null) {\r\n return\r\n }\r\n\r\n this.svgPathString = null\r\n\r\n routingHints.oldVertices = this.vertices\r\n\r\n // cleanup the routing cache\r\n //\r\n this.oldPoint = null\r\n this.lineSegments = new draw2d.util.ArrayList()\r\n this.vertices = new draw2d.util.ArrayList()\r\n\r\n // Use the internal router\r\n //\r\n this.router.route(this, routingHints)\r\n this.routingRequired = false\r\n this.fireEvent(\"routed\")\r\n this.fireEvent(\"change:route\", {})\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n if (this.svgPathString === null || this.routingRequired === true) {\r\n this.calculatePath()\r\n }\r\n\r\n // It is important, that we keep the original \"attributes\" object and mutating them\r\n // Maybe the caller needs the modified 'attributes' object. The \"electra.academy designer\"\r\n // uses this pattern\r\n //\r\n // Won't work: attributes = {...attributes , path: this.svgPathString})\r\n //\r\n\r\n attributes??={}\r\n attributes.path = this.svgPathString\r\n // set some good defaults\r\n attributes[\"stroke-linecap\"] ??= \"round\"\r\n attributes[\"stroke-linejoin\"]??= \"round\"\r\n\r\n return this._super(attributes)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return all line segments of the polyline.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getSegments: function () {\r\n return this.lineSegments\r\n },\r\n\r\n\r\n /**\r\n * used for the router to add the calculated points\r\n *\r\n * @param p\r\n * @param y\r\n */\r\n addPoint: function ( p, y) {\r\n if (typeof y !== \"undefined\") {\r\n p = new draw2d.geo.Point(p, y)\r\n }\r\n this.vertices.add(p)\r\n\r\n if (this.oldPoint !== null) {\r\n // store the painted line segment for the \"mouse selection test\"\r\n // (required for user interaction)\r\n this.lineSegments.add({\r\n start: this.oldPoint,\r\n end: p\r\n })\r\n }\r\n this.svgPathString = null\r\n this.oldPoint = p\r\n },\r\n\r\n /**\r\n * \r\n * Called if the drag and drop action begins. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true if the figure accepts dragging\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey, isFaked) {\r\n let result = this._super(x, y, shiftKey, ctrlKey, isFaked)\r\n\r\n if (result === true && isFaked !== true) {\r\n this.draggedSegment = this.hitSegment(x, y)\r\n }\r\n return result\r\n },\r\n\r\n /**\r\n * \r\n * Returns the length of the polyline.\r\n *\r\n * @returns {Number}\r\n * @since 6.1.43\r\n **/\r\n getLength: function () {\r\n let result = 0\r\n this.lineSegments.each( segment => {\r\n let p1 = segment.start\r\n let p2 = segment.end\r\n result += Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y))\r\n })\r\n return result\r\n },\r\n\r\n setVertices: function (vertices) {\r\n // inform the router tha the vertices has set outside. This switch some\r\n // router from full autoroute to half autoroute\r\n this.router.verticesSet(this)\r\n\r\n this._super(vertices)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns the projection of the point on the line.\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n pointProjection: function (px, py) {\r\n let result = null,\r\n projection = null,\r\n p1 = null,\r\n p2 = null,\r\n segment = null\r\n let lastDist = Number.MAX_SAFE_INTEGER\r\n let pt = new draw2d.geo.Point(px, py)\r\n this.lineSegments.each( segment => {\r\n p1 = segment.start\r\n p2 = segment.end\r\n projection = draw2d.geo.Line.pointProjection(p1.x, p1.y, p2.x, p2.y, pt.x, pt.y)\r\n if (projection !== null) {\r\n let dist = projection.distance(pt)\r\n if (result == null || dist < lastDist) {\r\n result = projection\r\n result.index = i\r\n lastDist = dist\r\n }\r\n }\r\n })\r\n\r\n if (result !== null) {\r\n let length = 0\r\n this.lineSegments.each( segment => {\r\n length += segment.start.distance(segment.end)\r\n })\r\n let segment = this.lineSegments.get(result.index)\r\n p1 = segment.start\r\n p2 = segment.end\r\n length += p1.distance(p2) * draw2d.geo.Line.inverseLerp(p2.x, p2.y, p1.x, p1.y, result.x, result.y)\r\n result.percentage = (1.0 / this.getLength()) * length\r\n }\r\n return result\r\n },\r\n\r\n /**\r\n * \r\n * Returns the point onto the line which has the relative 'percentage' position onto the line.\r\n *\r\n * @param {Number} percentage the relative position between [0..1]\r\n * @returns {draw2d.geo.Point}\r\n */\r\n lerp: function (percentage) {\r\n let length = this.getLength() * percentage\r\n let lastValidLength = length\r\n let segment = null, p1 = null, p2 = null\r\n for (let i = 0; i < this.lineSegments.getSize(); i++) {\r\n segment = this.lineSegments.get(i)\r\n p1 = segment.start\r\n p2 = segment.end\r\n length = length - p1.distance(p2)\r\n if (length <= 0) {\r\n percentage = 1.0 / p1.distance(p2) * lastValidLength\r\n return new draw2d.geo.Point(p1.x + (p2.x - p1.x) * percentage, p1.y + (p2.y - p1.y) * percentage)\r\n }\r\n lastValidLength = length\r\n }\r\n return p2\r\n },\r\n\r\n /**\r\n * \r\n * get the best segment of the line which is below the given coordinate or null if\r\n * all segment are not below the coordinate. <br>\r\n * The 'corona' property of the polyline is considered for this test. This means\r\n * the point isn't direct on the line. Is it only close to the line!\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {Object}\r\n * @since 4.4.0\r\n **/\r\n hitSegment: function (px, py) {\r\n for (let i = 0; i < this.lineSegments.getSize(); i++) {\r\n let segment = this.lineSegments.get(i)\r\n if (draw2d.shape.basic.Line.hit(this.corona + this.stroke, segment.start.x, segment.start.y, segment.end.x, segment.end.y, px, py)) {\r\n return {index: i, start: segment.start, end: segment.end}\r\n }\r\n }\r\n return null\r\n },\r\n\r\n /**\r\n * \r\n * Checks if the hands over coordinate close to the line. The 'corona' property of the polyline\r\n * is considered for this test. This means the point isn't direct on the line. Is it only close to the\r\n * line!\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {Boolean}\r\n **/\r\n hitTest: function (px, py) {\r\n return this.hitSegment(px, py) !== null\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createCommand: function (request) {\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.DELETE) {\r\n if (this.isDeleteable() === true) {\r\n return new draw2d.command.CommandDelete(this)\r\n }\r\n }\r\n else if (request.getPolicy() === draw2d.command.CommandType.MOVE_VERTEX) {\r\n if (this.isResizeable() === true) {\r\n return new draw2d.command.CommandMoveVertex(this)\r\n }\r\n }\r\n else if (request.getPolicy() === draw2d.command.CommandType.MOVE_VERTICES) {\r\n if (this.isResizeable() === true) {\r\n return new draw2d.command.CommandMoveVertices(this)\r\n }\r\n }\r\n\r\n return this._super(request)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n return this.router.getPersistentAttributes(this, {...this._super(), \r\n router: this.router.NAME,\r\n radius: this.radius\r\n })\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.router !== \"undefined\") {\r\n try {\r\n this.setRouter(Function(`return new ${memento.router}()`)())\r\n }\r\n catch (exc) {\r\n debug.warn(\"Unable to install router '\" + memento.router + \"' forced by \" + this.NAME + \".setPersistentAttributes. Using default\")\r\n }\r\n }\r\n\r\n if (typeof memento.radius !== \"undefined\") {\r\n this.setRadius(memento.radius)\r\n }\r\n\r\n this.router.setPersistentAttributes(this, memento)\r\n\r\n if (this.vertices.getSize() > 1) {\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\nimport jsonUtil from '../../util/JSONUtil'\r\n\r\n\r\n/**\r\n * @class\r\n * A Polygon figure.\r\n *\r\n *\r\n * @example\r\n *\r\n * let p1 = new draw2d.shape.basic.Polygon({width:100, height:100});\r\n * let p2 = new draw2d.shape.basic.Polygon({width:100, height:60});\r\n *\r\n * canvas.add(p1,10,10);\r\n * canvas.add(p2,100,10);\r\n *\r\n * p2.attr({color:\"#f0f000\", alpha:0.7});\r\n *\r\n * canvas.setCurrentSelection(p2);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.basic.Polygon = draw2d.VectorFigure.extend(\r\n /** @lends draw2d.shape.basic.Polygon.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Polygon\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.minX = 0\r\n this.minY = 0\r\n this.maxX = 0\r\n this.maxY = 0\r\n this.vertices = new draw2d.util.ArrayList()\r\n\r\n this._super(attr, setter, getter)\r\n\r\n // we must cache the initial width/height because the width/height of the shape\r\n // is recalculated in the addVertex method. After the first call this values are 0/0\r\n if (this.vertices.getSize() === 0) {\r\n let w = this.width\r\n let h = this.height\r\n let pos = this.getPosition()\r\n this.addVertex(new draw2d.geo.Point(0, 0))\r\n this.addVertex(new draw2d.geo.Point(w, 0))\r\n this.addVertex(new draw2d.geo.Point(w, h))\r\n\r\n this.setPosition(pos)\r\n }\r\n\r\n this.svgPathString = null\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.VertexSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setRadius: function (radius) {\r\n this.svgPathString = null\r\n\r\n this._super(radius)\r\n this.fireEvent(\"change:radius\", {value: radius})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n // return some good default...\r\n return this.canvas.paper.path(\"M0 10L100 100\")\r\n },\r\n\r\n /**\r\n * \r\n * calculate the path of the polygon\r\n *\r\n */\r\n calculatePath: function () {\r\n let radius = this.getRadius()\r\n let path = []\r\n // hard corners\r\n //\r\n if (radius === 0) {\r\n let length = this.vertices.getSize()\r\n let p = this.vertices.get(0)\r\n path.push(\"M\", p.x, \" \", p.y)\r\n for (let i = 1; i < length; i++) {\r\n p = this.vertices.get(i)\r\n path.push(\"L\", p.x, \" \", p.y)\r\n }\r\n path.push(\"Z\")\r\n }\r\n // soften/round corners\r\n //\r\n else {\r\n length = this.vertices.getSize()\r\n let start = this.vertices.first()\r\n let end = this.vertices.last()\r\n if (start.equals(end)) {\r\n length = length - 1\r\n end = this.vertices.get(length - 1)\r\n }\r\n let begin = draw2d.geo.Util.insetPoint(start, end, radius)\r\n path.push(\"M\", begin.x, \",\", begin.y)\r\n for (let i = 0; i < length; i++) {\r\n start = this.vertices.get(i)\r\n end = this.vertices.get((i + 1) % length)\r\n let modStart = draw2d.geo.Util.insetPoint(start, end, radius)\r\n let modEnd = draw2d.geo.Util.insetPoint(end, start, radius)\r\n path.push(\"Q\", start.x, \",\", start.y, \" \", modStart.x, \", \", modStart.y)\r\n path.push(\"L\", modEnd.x, \",\", modEnd.y)\r\n }\r\n }\r\n this.svgPathString = path.join(\"\")\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n if (this.svgPathString === null) {\r\n this.calculatePath()\r\n }\r\n //\r\n attributes??={}\r\n attributes.path ??= this.svgPathString\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n * \r\n * Translate the figure with the given x/y offset. This method modifies all\r\n * vertices and the bounding box.\r\n *\r\n * @param {Number} dx The new x translate offset\r\n * @param {Number} dy The new y translate offset\r\n **/\r\n translate: function (dx, dy) {\r\n let _this = this\r\n\r\n // TODO: This is not good. If the polygon part of an \"Composite\" I should call\r\n // the adjustPosition. IF we DragDrap the composition the figures inside should follow\r\n // without modify the dx/dy.\r\n //\r\n dx = this.x + dx\r\n dy = this.y + dy\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n let newPos = e.adjustPosition(_this, dx, dy)\r\n dx = newPos.x\r\n dy = newPos.y\r\n }\r\n })\r\n dx = dx - this.x\r\n dy = dy - this.y\r\n\r\n\r\n this.vertices.each(function (i, e) {\r\n e.translate(dx, dy)\r\n })\r\n this.svgPathString = null\r\n this.updateBoundingBox()\r\n\r\n this.repaint()\r\n\r\n\r\n // Update the resize handles if the user change the position of the\r\n // element via an API call.\r\n //\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"move\", {figure: this, dx: dx, dy: dy})\r\n this.fireEvent(\"change:x\", {value: this.x})\r\n this.fireEvent(\"change:y\", {value: this.y})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Change the position of the polygon. This method updates all vertices.\r\n *\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {Number} [y]\r\n */\r\n setPosition: function (x, y) {\r\n if (x instanceof draw2d.geo.Point) {\r\n y = x.y\r\n x = x.x\r\n }\r\n this.svgPathString = null\r\n\r\n let dx = x - this.minX\r\n let dy = y - this.minY\r\n\r\n this.translate(dx, dy)\r\n\r\n this.x = x\r\n this.y = y\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n let oldWidth = this.width\r\n let oldHeight = this.height\r\n\r\n this._super(w, h)\r\n\r\n let fracWidth = (1 / oldWidth) * this.width\r\n let fracHeight = (1 / oldHeight) * this.height\r\n\r\n let thisX = this.x\r\n let thisY = this.y\r\n this.vertices.each(function (i, e) {\r\n // calculate difference between point and figure origin\r\n let diffX = (e.getX() - thisX) * fracWidth\r\n let diffY = (e.getY() - thisY) * fracHeight\r\n e.setPosition(thisX + diffX, thisY + diffY)\r\n })\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n this.fireEvent(\"change:dimension\", {value: {width: this.width, height: this.height}})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return all vertices of the polygon.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getVertices: function () {\r\n return this.vertices\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the Vertex with the given index.\r\n *\r\n * @param {Number} index the index of the vertex to return\r\n * @since 5.0.2\r\n */\r\n getVertex: function (index) {\r\n return this.vertices.get(index)\r\n },\r\n\r\n\r\n resetVertices: function () {\r\n this.vertices = new draw2d.util.ArrayList()\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n this.updateBoundingBox()\r\n\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Update the vertex at the given index. The method call didn't have any effect\r\n * if the vertex didn't exists.\r\n *\r\n * @param {Number} index\r\n * @param {Number} x\r\n * @param {Number} y\r\n */\r\n setVertex: function (index, x, y) {\r\n let vertex = this.vertices.get(index)\r\n\r\n // invalid point or nothing to do\r\n //\r\n if (vertex === null || (vertex.x === x && vertex.y === y)) {\r\n return this\r\n }\r\n\r\n vertex.x = parseFloat(x)\r\n vertex.y = parseFloat(y)\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n this.updateBoundingBox()\r\n\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Append a new vertex to the polygon.\r\n *\r\n * @param {Number | draw2d.geo.Point} x\r\n * @param {Number} [y]\r\n */\r\n addVertex: function (x, y) {\r\n this.vertices.add(new draw2d.geo.Point(x, y))\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n this.updateBoundingBox()\r\n\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Insert a new vertex at the given index. All vertices will be shifted to\r\n * free the requested index.\r\n *\r\n * @param {Number} index\r\n * @param {Number} x\r\n * @param {Number} y\r\n */\r\n insertVertexAt: function (index, x, y) {\r\n this.vertices.insertElementAt(new draw2d.geo.Point(x, y), index)\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n this.updateBoundingBox()\r\n\r\n if (!this.selectionHandles.isEmpty()) {\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(_this.canvas, _this)\r\n e.onSelect(_this.canvas, _this)\r\n }\r\n })\r\n }\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Remove a vertex from the polygon and return the removed point.\r\n *\r\n * @param {Number} index\r\n *\r\n * @returns {draw2d.geo.Point} the removed vertex\r\n */\r\n removeVertexAt: function (index) {\r\n // a polygon need at least 3 vertices\r\n //\r\n if (this.vertices.getSize() <= 3) {\r\n return null\r\n }\r\n\r\n let vertex = this.vertices.removeElementAt(index)\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n this.updateBoundingBox()\r\n\r\n if (!this.selectionHandles.isEmpty()) {\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(_this.canvas, _this)\r\n e.onSelect(_this.canvas, _this)\r\n }\r\n })\r\n }\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return vertex\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setRotationAngle: function (angle) {\r\n this.rotationAngle = 360 % angle\r\n\r\n // The different to the other figures is, the the vertices must rotated instead of\r\n // transform the shape with SVG matrix.\r\n //\r\n // Reason: the vertices are selectable and in this case the coordinates must transform\r\n // and not only the resulting SVG shape.\r\n //\r\n let radian = angle / (180 / Math.PI)\r\n let center = this.getBoundingBox().getCenter()\r\n let rotate = function (x, y, xm, ym, radian) {\r\n let cos = Math.cos,\r\n sin = Math.sin\r\n return {\r\n x: (x - xm) * cos(radian) - (y - ym) * sin(radian) + xm,\r\n y: (x - xm) * sin(radian) + (y - ym) * cos(radian) + ym\r\n }\r\n }\r\n\r\n this.vertices.each(function (i, e) {\r\n let rot = rotate(e.x, e.y, center.x, center.y, radian)\r\n e.setPosition(rot.x, rot.y)\r\n })\r\n\r\n this.updateBoundingBox()\r\n\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n\r\n this.repaint()\r\n this.fireEvent(\"change:angle\", {value: this.rotationAngle})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Calculate the bounding box of the shape and store them in an internal\r\n * variable for fast access.\r\n *\r\n * @private\r\n */\r\n updateBoundingBox: function () {\r\n if (this.vertices.isEmpty()) {\r\n this.minX = this.x\r\n this.minY = this.y\r\n this.maxX = this.x + this.width\r\n this.maxY = this.y + this.height\r\n }\r\n else {\r\n this.minX = this.x = Math.min(...this.vertices.asArray().map(n => n.x))\r\n this.minY = this.y = Math.min(...this.vertices.asArray().map(n => n.y))\r\n this.maxX = Math.max(...this.vertices.asArray().map(n => n.x))\r\n this.maxY = Math.max(...this.vertices.asArray().map(n => n.y))\r\n this.width = this.maxX - this.minX\r\n this.height = this.maxY - this.minY\r\n }\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createCommand: function (request) {\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE_VERTEX) {\r\n if (this.isResizeable() === true) {\r\n return new draw2d.command.CommandMoveVertex(this)\r\n }\r\n }\r\n\r\n return this._super(request)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.vertices = []\r\n\r\n this.vertices.each(function (i, e) {\r\n memento.vertices.push({x: e.x, y: e.y})\r\n })\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n // restore the points from the JSON data and add them to the polyline\r\n //\r\n if (typeof memento.vertices !== \"undefined\") {\r\n this.vertices = new draw2d.util.ArrayList()\r\n memento.vertices.forEach(point => {\r\n this.addVertex(point)\r\n })\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * A Rectangle Figure.\r\n *\r\n *\r\n * @example\r\n *\r\n * let rect1 = new draw2d.shape.basic.Rectangle({\r\n * \tx:10,\r\n * y:10\r\n * });\r\n *\r\n * let rect2 = new draw2d.shape.basic.Rectangle({\r\n * x: 100,\r\n * y: 10,\r\n * bgColor: \"#f0f000\",\r\n * alpha : 0.7,\r\n * width: 100,\r\n * height: 60,\r\n * radius: 10\r\n * });\r\n *\r\n * canvas.add(rect1);\r\n * canvas.add(rect2);\r\n *\r\n * canvas.setCurrentSelection(rect2);\r\n *\r\n * @author Andreas Herz\r\n * @param {Object} [attr] the configuration of the shape\r\n * @param {Object} [setter] add or replace setter methods\r\n * @param {Object} [getter] add or replace getter methods\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.basic.Rectangle = draw2d.VectorFigure.extend(\r\n /** @lends draw2d.shape.basic.Rectangle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Rectangle\",\r\n\r\n init: function (attr, setter, getter) {\r\n this.dasharray = null\r\n\r\n this._super(\r\n {\r\n bgColor: \"#a0a0a0\", color: \"#1B1B1B\",\r\n ...attr},\r\n {\r\n dash: this.setDashArray,\r\n dasharray: this.setDashArray,\r\n ...setter,\r\n },\r\n { \r\n dash: this.getDashArray,\r\n dasharray: this.getDashArray,\r\n ...getter\r\n }\r\n )\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??={}\r\n attributes.width ??= this.getWidth()\r\n attributes.height ??= this.getHeight()\r\n attributes.r ??= this.getRadius()\r\n if (this.dasharray !== null) {\r\n attributes[\"stroke-dasharray\"] = this.dasharray\r\n }\r\n\r\n this._super(attributes)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n applyTransformation: function () {\r\n let ts = \"R\" + this.rotationAngle\r\n\r\n if (this.getRotationAngle() === 90 || this.getRotationAngle() === 270) {\r\n let ratio = this.getHeight() / this.getWidth()\r\n ts = ts + \"S\" + ratio + \",\" + 1 / ratio + \",\" + (this.getAbsoluteX() + this.getWidth() / 2) + \",\" + (this.getAbsoluteY() + this.getHeight() / 2)\r\n }\r\n\r\n this.shape.transform(ts)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n return this.canvas.paper.rect(this.getAbsoluteX(), this.getAbsoluteY(), this.getWidth(), this.getHeight())\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the line style for dot/dash styling. Possible values are\r\n * [\"\", \"-\", \".\", \"-.\", \"-..\", \". \", \"- \", \"--\", \"- .\", \"--.\", \"--..\"]\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * dash: pattern\r\n * });\r\n *\r\n * @param {String} pattern the string with the dot/dash pattern. valid values: [\"\", \"-\", \".\", \"-.\", \"-..\", \". \", \"- \", \"--\", \"- .\", \"--.\", \"--..\"]\r\n */\r\n setDashArray: function (pattern) {\r\n this.dasharray = pattern\r\n this.repaint()\r\n this.fireEvent(\"change:dashArray\", {value: this.dasharray})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the line style for this object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr(\"dash\");\r\n *\r\n * @since 5.1.0\r\n */\r\n getDashArray: function () {\r\n return this.dasharray\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n if (this.dasharray !== null) {\r\n memento.dasharray = this.dasharray\r\n }\r\n\r\n return memento\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.dasharray === \"string\") {\r\n this.dasharray = memento.dasharray\r\n }\r\n\r\n return this\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Implements a simple text with word wrapping.<br>The height of the element is automatic calculated. The width of\r\n * the element is changeable by the user and respect the minWidth constraint.\r\n * <br>\r\n *\r\n *\r\n * @example\r\n *\r\n * let shape = new draw2d.shape.basic.Text({text:\"This is a simple text with some loooooong word in.\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n * @author Andreas Herz\r\n * @since 4.2.3\r\n * @extends draw2d.shape.basic.Label\r\n */\r\ndraw2d.shape.basic.Text = draw2d.shape.basic.Label.extend(\r\n /** @lends draw2d.shape.basic.Text.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Text\",\r\n\r\n /**\r\n * Creates a new text element.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.cachedWrappedAttr = null\r\n\r\n this._super({ width: 100, height: 50, resizeable: true,...attr}, setter, getter)\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.WidthSelectionFeedbackPolicy())\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n // style the label\r\n this.svgNodes.attr({...this.calculateTextAttr(), ...this.wrappedTextAttr(this.text, this.getWidth() - this.padding.left - this.padding.right)})\r\n\r\n // set of the x/y must be done AFTER the font-size and bold has been set.\r\n // Reason: the getHeight method needs the font-size for calculation because\r\n // it redirects the calculation to the SVG element.\r\n this.svgNodes.attr({x: this.padding.left, y: this.getHeight() / 2})\r\n\r\n // this is an exception call. Don't call the super method (Label) to avoid\r\n // the calculation in this method.\r\n draw2d.SetFigure.prototype.repaint.call(this, attributes)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this.clearCache()\r\n let attr = this.wrappedTextAttr(this.text, w)\r\n\r\n this.cachedMinWidth = Math.max(w, attr.width)\r\n this.cachedMinHeight = attr.height\r\n\r\n draw2d.shape.node.Node.prototype.setDimension.call(this, this.cachedMinWidth, this.cachedMinHeight)\r\n // this._super(Math.min(w,attr.width),attr.height);\r\n this.fireEvent(\"change:dimension\", {value: {width: this.cachedMinWidth, height: this.cachedMinHeight}})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * clear the internal cache for width/height precalculation\r\n * @private\r\n */\r\n clearCache: function () {\r\n this._super()\r\n this.cachedWrappedAttr = null\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n if (this.shape === null) {\r\n return 0\r\n }\r\n\r\n if (this.cachedMinWidth === null) {\r\n // get the longest word in the text\r\n //\r\n let longestWord = this.text.split(\" \").reduce( (arg1, arg2)=>arg1.length>arg2.length?arg1:arg2)\r\n let svgText = this.canvas.paper\r\n .text(0, 0, longestWord)\r\n .attr({...this.calculateTextAttr(), text: longestWord})\r\n this.cachedMinWidth = svgText.getBBox(true).width + this.padding.left + this.padding.right + 2 * this.getStroke()\r\n svgText.remove()\r\n }\r\n\r\n return this.cachedMinWidth\r\n },\r\n\r\n\r\n /**\r\n *\r\n * calculates the attributes (wrapped text and width, height) with the given parameter\r\n *\r\n * @private\r\n */\r\n wrappedTextAttr: function (text, width) {\r\n let words = text.split(\" \")\r\n if (this.canvas === null || words.length === 0) {\r\n return {text: text, width: width, height: 20}\r\n }\r\n\r\n if (this.cachedWrappedAttr === null) {\r\n let abc = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"\r\n let svgText = this.canvas.paper.text(0, 0, \"\")\r\n \r\n svgText.attr({ ...this.calculateTextAttr(), text: abc})\r\n\r\n // get a good estimation of a letter width...not correct but this is working for the very first draft implementation\r\n let letterWidth = svgText.getBBox(true).width / abc.length\r\n\r\n let s = [words[0]], x = s[0].length * letterWidth\r\n let w = null\r\n for (let i = 1; i < words.length; i++) {\r\n w = words[i]\r\n let l = w.length * letterWidth\r\n if ((x + l) > width) {\r\n s.push(\"\\n\")\r\n x = l\r\n } else {\r\n s.push(\" \")\r\n x += l\r\n }\r\n s.push(w)\r\n }\r\n // set the wrapped text and get the resulted bounding box\r\n //\r\n svgText.attr({text: s.join(\"\")})\r\n let bbox = svgText.getBBox(true)\r\n svgText.remove()\r\n this.cachedWrappedAttr = {\r\n text: s.join(\"\"),\r\n width: (Math.max(width, bbox.width) + this.padding.left + this.padding.right),\r\n height: (bbox.height + this.padding.top + this.padding.bottom)\r\n }\r\n }\r\n return this.cachedWrappedAttr\r\n }\r\n })\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Selection handle for polyline vertices.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.ResizeHandle\r\n */\r\ndraw2d.shape.basic.VertexResizeHandle = draw2d.ResizeHandle.extend(\r\n /** @lends draw2d.shape.basic.VertexResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.VertexResizeHandle\",\r\n\r\n SNAP_THRESHOLD: 3,\r\n LINE_COLOR: \"#1387E6\",\r\n FADEOUT_DURATION: 300,\r\n\r\n init: function (owner, index) {\r\n this._super({owner})\r\n this.index = index\r\n this.isDead = false\r\n },\r\n\r\n\r\n /**\r\n * Called when a user double clicks on the element\r\n *\r\n * @template\r\n */\r\n onDoubleClick: function () {\r\n let cmd = new draw2d.command.CommandRemoveVertex(this.owner, this.index)\r\n this.getCanvas().getCommandStack().execute(cmd)\r\n\r\n this.isDead = true\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if a drag&drop operation starts.<br>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n if (this.isDead === true) {\r\n return\r\n }\r\n\r\n this._super()\r\n this.command = this.getCanvas().getPrimarySelection().createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE_VERTEX))\r\n if (this.command != null) {\r\n this.command.setIndex(this.index)\r\n this.setAlpha(0.2)\r\n this.shape.attr({\"cursor\": \"crosshair\"})\r\n }\r\n\r\n // Vertex is a reference and not a copy of the point\r\n this.vertex = this.owner.getVertex(this.index).clone()\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragstart\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Called from the framework during a drag&drop operation\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n if (this.isDead === true || this.command == null) {\r\n return\r\n }\r\n\r\n this.setPosition(this.x + dx2, this.y + dy2)\r\n\r\n // update the polyline for immediately drag&drop feedback\r\n //\r\n this.vertex.translate(dx2, dy2)\r\n let newPos = this.vertex.clone()\r\n // Adjust the new location if the object can snap to a helper\r\n // like grid, geometry, ruler,...\r\n //\r\n if (this.getCanSnapToHelper()) {\r\n newPos = this.getCanvas().snapToHelper(this, newPos)\r\n }\r\n\r\n this.owner.setVertex(this.index, newPos.x, newPos.y)\r\n\r\n // update the command for the undo/redo stuff\r\n //\r\n this.command.updatePosition(this.vertex.x, this.vertex.y)\r\n },\r\n\r\n /**\r\n * Called after a drag and drop action.<br>\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call the super implementation via <code>this._super();</code>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n if (this.isDead === true || this.command === null) {\r\n return\r\n }\r\n\r\n this.shape.attr({\"cursor\": \"move\"})\r\n\r\n let stack = this.getCanvas().getCommandStack()\r\n\r\n let transactionCommand = new draw2d.command.CommandCollection()\r\n\r\n try {\r\n transactionCommand.add(this.command)\r\n this.command = null\r\n if (this.getEnclosingAngle() > 178) {\r\n transactionCommand.add(new draw2d.command.CommandRemoveVertex(this.owner, this.index))\r\n }\r\n }\r\n finally {\r\n stack.execute(transactionCommand)\r\n }\r\n\r\n this.setAlpha(1)\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragend\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Controls the location of the resize handle\r\n *\r\n * @template\r\n **/\r\n relocate: function () {\r\n let resizeWidthHalf = this.getWidth() / 2\r\n let resizeHeightHalf = this.getHeight() / 2\r\n\r\n let anchor = this.owner.getVertex(this.index)\r\n\r\n this.setPosition(anchor.x - resizeWidthHalf, anchor.y - resizeHeightHalf)\r\n },\r\n\r\n /**\r\n *\r\n * Calculates the angle between the siblings\r\n *\r\n * @returns {Number}\r\n */\r\n getEnclosingAngle: function () {\r\n // calculate the angle between the siblings\r\n let points = this.owner.getVertices()\r\n let trans = this.vertex.getScaled(-1)\r\n let size = points.getSize()\r\n let left = points.get((this.index - 1 + size) % size).translated(trans) // % is just to ensure the [0, size] interval\r\n let right = points.get((this.index + 1) % size).translated(trans) // % is just to ensure the [0, size] interval\r\n\r\n let dot = left.dot(right)\r\n\r\n let acos = Math.acos(dot / (left.length() * right.length()))\r\n return acos * 180 / Math.PI\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Base interface for the composite shapes\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Rectangle\r\n * @since 4.7.2\r\n */\r\ndraw2d.shape.composite.Composite = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.composite.Composite.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.Composite\",\r\n\r\n /**\r\n * Creates a new composite element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super({stroke: 1, \"color\": \"#f0f0f0\",...attr}, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Called when a user dbl clicks on the element\r\n *\r\n * @template\r\n */\r\n onDoubleClick: function () {\r\n // do nothing per default. no rotation of the shape.\r\n },\r\n\r\n /**\r\n *\r\n * Delegate method to calculate if a figure is selectable. A composite has the right to override the\r\n * initial selectable flag of the figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure to test\r\n * @param {Boolean} selectable the initial selectable flag of the figure\r\n * @returns {Boolean} returns `selectable`. A figure in a composite is per default selectable if the figure itself allows it.\r\n *\r\n */\r\n isMemberSelectable: function (figure, selectable) {\r\n return selectable\r\n },\r\n\r\n /**\r\n *\r\n * Delegate method to calculate if a figure is draggable. A composite has the right to override the\r\n * initial draggable flag of the figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure to test\r\n * @param {Boolean} draggable the initial draggable flag of the figure\r\n * @returns {Boolean} returns `draggable`. A figure in a composite is per default draggable if the figure itself allows it.\r\n *\r\n */\r\n isMemberDraggable: function (figure, draggable) {\r\n return draggable\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the canvas element of this figures. This can be used to determine whenever an element\r\n * is added or removed to the canvas.\r\n *\r\n * @param {draw2d.Canvas} canvas the new parent of the figure or null\r\n * @returns {this}\r\n */\r\n setCanvas: function (canvas) {\r\n this._super(canvas)\r\n\r\n // an composite shape goes always in the background\r\n //\r\n if (canvas !== null) {\r\n this.toBack()\r\n }\r\n\r\n return this\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A group is a figure that acts as a transparent container for other figures. A group\r\n * is a StrongComposite node that controls a set of child figures. The bounding rectangle of\r\n * a group is the union of the bounds of its children. Child nodes cannot be selected or\r\n * manipulated individually.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.composite.StrongComposite\r\n * @since 4.8.0\r\n */\r\ndraw2d.shape.composite.Group = draw2d.shape.composite.StrongComposite.extend(\r\n /** @lends draw2d.shape.composite.Group.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.Group\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({bgColor: null, color: null, resizeable: false}, attr), setter, getter)\r\n\r\n // used during figure assignment/unassignment. The Group is resizing during figure assignment\r\n // and we want avoid that already assigned figures are moving during this resize.\r\n //\r\n this.stickFigures = false\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Delegate method to calculate if a figure is selectable. A composite has the right to override the\r\n * initial selectable flag of the figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure to test\r\n * @param {Boolean} selectable the initial selectable flag of the figure\r\n * @returns {Boolean} returns false because it is not possible toselect single figures in the group\r\n */\r\n isMemberSelectable: function (figure, selectable) {\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Delegate method to calculate if a figure is draggable. A composite has the right to override the\r\n * initial draggable flag of the figure.\r\n * <br>\r\n * Returns false because only the complete group is draggable\r\n *\r\n * @param {draw2d.Figure} figure the figure to test\r\n * @param {Boolean} draggable the initial draggable flag of the figure\r\n * @returns {Boolean} returns always false because it is not possible to drag&drop single figures in a group\r\n *\r\n */\r\n isMemberDraggable: function (figure, draggable) {\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Set the position of the object.\r\n *\r\n * @param {Number/draw2d.geo.Point} x The new x coordinate of the figure\r\n * @param {Number} [y] The new y coordinate of the figure\r\n * @returns {this}\r\n **/\r\n setPosition: function (x, y) {\r\n let oldX = this.x\r\n let oldY = this.y\r\n\r\n\r\n this._super(x, y)\r\n\r\n let dx = this.x - oldX\r\n let dy = this.y - oldY\r\n\r\n if (dx === 0 && dy === 0) {\r\n return this\r\n }\r\n\r\n if (this.stickFigures === false) {\r\n this.assignedFigures.each(function (i, figure) {\r\n figure.translate(dx, dy)\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Assign a figure to the given group.\r\n * The bounding box of the group is recalculated and the union of the current bounding box with the\r\n * figure bounding box.\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @returns {this}\r\n */\r\n assignFigure: function (figure) {\r\n if (!this.assignedFigures.contains(figure)) {\r\n let _this = this\r\n this.stickFigures = true\r\n if (this.assignedFigures.isEmpty() === true) {\r\n this.setBoundingBox(figure.getBoundingBox())\r\n } else {\r\n this.setBoundingBox(this.getBoundingBox().merge(figure.getBoundingBox()))\r\n }\r\n this.assignedFigures.add(figure)\r\n figure.setComposite(this)\r\n // the selection adapter defines which figure should be selected if the user clicks on\r\n // \"figure\". The \"group\" redirects to the group instead to allowing select the child.\r\n figure.setSelectionAdapter(function () {\r\n return _this\r\n })\r\n this.stickFigures = false\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Remove the given figure from the group assignment\r\n *\r\n * @param {draw2d.Figure} figure the figure to remove\r\n * @returns {this}\r\n */\r\n unassignFigure: function (figure) {\r\n if (this.assignedFigures.contains(figure)) {\r\n this.stickFigures = true\r\n figure.setComposite(null)\r\n figure.setSelectionAdapter(null)\r\n this.assignedFigures.remove(figure)\r\n if (!this.assignedFigures.isEmpty()) {\r\n let box = this.assignedFigures.first().getBoundingBox()\r\n this.assignedFigures.each(function (i, figure) {\r\n box.merge(figure.getBoundingBox())\r\n })\r\n this.setBoundingBox(box)\r\n }\r\n this.stickFigures = false\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n */\r\n createCommand: function (request) {\r\n if (request === null) {\r\n return null\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.DELETE) {\r\n if (!this.isDeleteable()) {\r\n return null\r\n }\r\n return new draw2d.command.CommandDeleteGroup(this)\r\n }\r\n\r\n return this._super(request)\r\n }\r\n\r\n })\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A Jailhouse is a figure that acts as a container for other figures. A Jailhouse\r\n * is a StrongComposite node that controls a set of child figures. Child nodes can't\r\n * moved outside of the composite.<br>\r\n * Objects in a jailhouse have the same Z-order, which can be relatively controlled with\r\n * respect to other figures.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.composite.StrongComposite\r\n * @since 4.8.0\r\n */\r\ndraw2d.shape.composite.Jailhouse = draw2d.shape.composite.StrongComposite.extend(\r\n /** @lends draw2d.shape.composite.Jailhouse.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.Jailhouse\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.policy = new draw2d.policy.figure.RegionEditPolicy(0, 0, 10, 10)\r\n this._super(extend({bgColor: \"#f0f0f0\", color: \"#333333\"}, attr), setter, getter)\r\n\r\n this.stickFigures = false\r\n },\r\n\r\n /**\r\n *\r\n * Set the new width and height of the figure and update the constraint policy for the assigned\r\n * figures..\r\n *\r\n * @param {Number} w The new width of the figure\r\n * @param {Number} h The new height of the figure\r\n **/\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n this.policy.setBoundingBox(this.getAbsoluteBounds())\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the position of the object.\r\n *\r\n * @param {Number/draw2d.geo.Point} x The new x coordinate of the figure\r\n * @param {Number} [y] The new y coordinate of the figure\r\n **/\r\n setPosition: function (x, y) {\r\n let oldX = this.x\r\n let oldY = this.y\r\n\r\n\r\n this._super(x, y)\r\n\r\n let dx = this.x - oldX\r\n let dy = this.y - oldY\r\n\r\n if (dx === 0 && dy === 0) {\r\n return this\r\n }\r\n this.policy.getBoundingBox().setPosition(x,y)\r\n\r\n if (this.stickFigures === false) {\r\n this.assignedFigures.each(function (i, figure) {\r\n figure.translate(dx, dy)\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Assign a figure to the given group.\r\n * The bounding box of the group is recalculated and the union of the current bounding box with the\r\n * figure bounding box.\r\n *\r\n * @param {draw2d.Figure} figure\r\n */\r\n assignFigure: function (figure) {\r\n if (!this.assignedFigures.contains(figure) && figure !== this) {\r\n this.stickFigures = true\r\n this.setBoundingBox(this.getBoundingBox().merge(figure.getBoundingBox()))\r\n this.assignedFigures.add(figure)\r\n figure.setComposite(this)\r\n figure.installEditPolicy(this.policy)\r\n figure.toFront(this)\r\n this.stickFigures = false\r\n }\r\n return this\r\n },\r\n\r\n getAssignedFigures: function () {\r\n return this.assignedFigures\r\n },\r\n\r\n /**\r\n *\r\n * Remove the given figure from the group assignment\r\n *\r\n * @param {draw2d.Figure} figure the figure to remove\r\n *\r\n */\r\n unassignFigure: function (figure) {\r\n if (this.assignedFigures.contains(figure)) {\r\n this.stickFigures = true\r\n figure.setComposite(null)\r\n figure.uninstallEditPolicy(this.policy)\r\n this.assignedFigures.remove(figure)\r\n if (!this.assignedFigures.isEmpty()) {\r\n let box = this.assignedFigures.first().getBoundingBox()\r\n this.assignedFigures.each(function (i, figure) {\r\n box.merge(figure.getBoundingBox())\r\n })\r\n this.setBoundingBox(box)\r\n }\r\n this.stickFigures = false\r\n }\r\n\r\n return this\r\n },\r\n\r\n onCatch: function (droppedFigure, x, y, shiftKey, ctrlKey) {\r\n this.getCanvas().getCommandStack().execute(new draw2d.command.CommandAssignFigure(droppedFigure, this))\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the minWidth of the jailhouse. The minWidth is calculated by care the assigned figures.\r\n *\r\n * @returns {Number} the minimum width for the figure\r\n */\r\n getMinWidth: function () {\r\n let width = 0\r\n this.assignedFigures.each(function (i, figure) {\r\n width = Math.max(width, figure.getBoundingBox().getRight())\r\n })\r\n return width - this.getAbsoluteX()\r\n },\r\n\r\n /**\r\n *\r\n * @returns {Number} the minimum height of the figure\r\n */\r\n getMinHeight: function () {\r\n let height = 0\r\n this.assignedFigures.each(function (i, figure) {\r\n height = Math.max(height, figure.getBoundingBox().getBottom())\r\n })\r\n return height - this.getAbsoluteY()\r\n }\r\n })\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * Raft figures are shapes, which aggregate multiple figures. It works like a real raft. Aboard figures are\r\n * moved if the raft figures moves.\r\n *\r\n *\r\n * @example\r\n *\r\n * let rect1 = new draw2d.shape.composite.Raft({width:200, height:100});\r\n * let rect2 = new draw2d.shape.basic.Rectangle({width:50, height:50});\r\n *\r\n * canvas.add(rect1,10,10);\r\n * canvas.add(rect2,20,20);\r\n *\r\n * rect2.attr({bgColor:\"#f0f000\", width:50, height:50, radius:10});\r\n *\r\n * canvas.setCurrentSelection(rect1);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.composite.WeakComposite\r\n * @since 4.7.0\r\n */\r\ndraw2d.shape.composite.Raft = draw2d.shape.composite.WeakComposite.extend(\r\n /** @lends draw2d.shape.composite.Raft.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.Raft\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.aboardFigures = new draw2d.util.ArrayList()\r\n\r\n this._super({bgColor: \"#f0f0f0\", color: \"#1B1B1B\",...attr}, setter, getter)\r\n // install default selection handler. Can be overridden or replaced\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.RaftSelectionFeedbackPolicy())\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Will be called if the drag and drop action begins. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true if the figure accepts dragging\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n this._super(x, y, shiftKey, ctrlKey)\r\n\r\n this.aboardFigures = new draw2d.util.ArrayList()\r\n // force the recalculation of the aboard figures if the shape is in a drag&drop operation\r\n this.getAboardFigures(this.isInDragDrop)\r\n\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Set the position of the object.\r\n *\r\n * @param {Number/draw2d.geo.Point} x The new x coordinate of the figure\r\n * @param {Number} [y] The new y coordinate of the figure\r\n * @param {boolean} [dontApplyToChildren] don't move the children if this flag is set.\r\n **/\r\n setPosition: function (x, y, dontApplyToChildren) {\r\n let oldX = this.x\r\n let oldY = this.y\r\n\r\n // we need the figures before the composite has moved. Otherwise some figures are fall out of the raft\r\n //\r\n let aboardedFigures = (dontApplyToChildren) ? draw2d.util.ArrayList.EMPTY_LIST : this.getAboardFigures(this.isInDragDrop === false)\r\n\r\n this._super(x, y)\r\n\r\n let dx = this.x - oldX\r\n let dy = this.y - oldY\r\n\r\n if (dx === 0 && dy === 0) {\r\n return this\r\n }\r\n\r\n // we must move circuits with \"user routed\" elements as well if the start/target is withing\r\n // the raft. Some segments stay still because some coordinates has a fixed position\r\n //\r\n if (this.canvas !== null) {\r\n aboardedFigures = aboardedFigures.clone()\r\n this.canvas.getLines().each( (i, line) => {\r\n if (line instanceof draw2d.Connection) {\r\n if (aboardedFigures.contains(line.getSource().getRoot()) && aboardedFigures.contains(line.getTarget().getRoot())) {\r\n aboardedFigures.add(line)\r\n }\r\n }\r\n })\r\n }\r\n\r\n aboardedFigures.each( (i, figure) => { figure.translate(dx, dy) })\r\n\r\n return this\r\n },\r\n\r\n\r\n onDrag: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n\r\n // apply all EditPolicy for DragDrop Operations\r\n //\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n let newPos = e.adjustPosition(this, this.ox + dx, this.oy + dy)\r\n if (newPos) {\r\n dx = newPos.x - this.ox\r\n dy = newPos.y - this.oy\r\n }\r\n }\r\n })\r\n\r\n let newPos = new draw2d.geo.Point(this.ox + dx, this.oy + dy)\r\n\r\n // Adjust the new location if the object can snap to a helper\r\n // like grid, geometry, ruler,...\r\n //\r\n if (this.getCanSnapToHelper()) {\r\n newPos = this.getCanvas().snapToHelper(this, newPos)\r\n }\r\n\r\n // push the shiftKey to the setPosition method and avoid to move the children objects\r\n // if the user press the shift key\r\n this.setPosition(newPos.x, newPos.y, shiftKey)\r\n\r\n // notify all installed policies\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.onDrag(this.canvas, this)\r\n }\r\n })\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"drag\", {dx: dx, dy: dy, dx2: dx2, dy2: dy2, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n },\r\n\r\n /**\r\n *\r\n * Return all figures which are aboard of this shape. These shapes are moved as well if the raft\r\n * is moving.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getAboardFigures: function (recalculate) {\r\n if (recalculate === true && this.canvas !== null) {\r\n let raftBoundingBox = this.getBoundingBox()\r\n let zIndex = this.getZOrder()\r\n this.aboardFigures = new draw2d.util.ArrayList()\r\n\r\n let _this = this\r\n this.getCanvas().getFigures().each(function (i, figure) {\r\n if (figure !== _this && figure.isSelectable() === true && figure.getBoundingBox().isInside(raftBoundingBox)) {\r\n // Don't add the figure if it is already catched by another composite with a higher z-index\r\n //\r\n if (_this.getNextComposite(figure) !== _this) {\r\n return\r\n }\r\n // only add the shape if it is in front of the raft\r\n if (figure.getZOrder() > zIndex) {\r\n _this.aboardFigures.add(figure)\r\n }\r\n }\r\n })\r\n }\r\n return this.aboardFigures\r\n },\r\n\r\n /**\r\n *\r\n * return the next potential composite parent figure\r\n *\r\n * @param {draw2d.Figure} figureToTest\r\n * @returns {draw2d.Figure}\r\n */\r\n getNextComposite: function (figureToTest) {\r\n let nextComposite = null\r\n this.getCanvas().getFigures().each( (i, figure) => {\r\n if (figureToTest === figure) {\r\n return\r\n }\r\n if (figure instanceof draw2d.shape.composite.Composite) {\r\n if (nextComposite !== null && nextComposite.getZOrder() > figure.getZOrder()) {\r\n return\r\n }\r\n\r\n if (figure.getBoundingBox().contains(figureToTest.getBoundingBox())) {\r\n nextComposite = figure\r\n }\r\n }\r\n })\r\n\r\n return nextComposite\r\n }\r\n})\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n * The Resizehandles for Figures.\r\n\r\n * <pre>\r\n * Possible Type:\r\n *\r\n * 1 2 3\r\n * O-----------O-------------O\r\n * | |\r\n * | |\r\n * 8 O + 9 O 4\r\n * | |\r\n * | |\r\n * O-----------O-------------O\r\n * 7 6 5\r\n * </pre>\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.ResizeHandle\r\n */\r\ndraw2d.shape.composite.RaftResizeHandle = draw2d.ResizeHandle.extend(\r\n /** @lends draw2d.shape.composite.RaftResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.RaftResizeHandle\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {draw2d.Figure} the owner if the resize handle\r\n * @param {Number} type the type of the ResizeHandle.\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr,setter,getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework if the figure is moved by user interaction.\r\n *\r\n * @param {Number} dx the move x offset\r\n * @param {Number} dy the move y offset\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n */\r\n onDrag: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n if (this.isDraggable() === false) {\r\n return\r\n }\r\n\r\n let oldX = this.getAbsoluteX()\r\n let oldY = this.getAbsoluteY()\r\n\r\n // call the super.drag method with all snapTo### handler and adjustments\r\n draw2d.shape.basic.Rectangle.prototype.onDrag.call(this,dx, dy, dx2, dy2); //DON'T call the super implementation!!!\r\n\r\n let diffX = this.getAbsoluteX() - oldX\r\n let diffY = this.getAbsoluteY() - oldY\r\n\r\n let obj = this.owner\r\n let objPosX = obj.getAbsoluteX()\r\n let objPosY = obj.getAbsoluteY()\r\n let objWidth = obj.getWidth()\r\n let objHeight = obj.getHeight()\r\n\r\n let newX = null\r\n let newY = null\r\n let corrPos = null\r\n // declare new var just to make the semantic behind the flag more clear\r\n let dontMoveChildren = shiftKey===true\r\n\r\n /*\r\n * 1 2 3\r\n * O-----------O-------------O\r\n * | |\r\n * | |\r\n * 8 O + 9 O 4\r\n * | |\r\n * | |\r\n * O-----------O-------------O\r\n * 7 6 5\r\n */\r\n switch (this.type) {\r\n case 1:\r\n obj.setDimension(objWidth - diffX, objHeight - diffY)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY,dontMoveChildren)\r\n break\r\n case 2:\r\n obj.setDimension(objWidth, objHeight - diffY)\r\n newX = objPosX\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY,dontMoveChildren)\r\n break\r\n case 3:\r\n obj.setDimension(objWidth + diffX, objHeight - diffY)\r\n newX = objPosX\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY,dontMoveChildren)\r\n break\r\n case 4:\r\n obj.setDimension(objWidth + diffX, objHeight)\r\n break\r\n case 5:\r\n obj.setDimension(objWidth + diffX, objHeight + diffY)\r\n break\r\n case 6:\r\n obj.setDimension(objWidth, objHeight + diffY)\r\n break\r\n case 7:\r\n obj.setDimension(objWidth - diffX, objHeight + diffY)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY\r\n obj.setPosition(newX, newY,dontMoveChildren)\r\n break\r\n case 8:\r\n obj.setDimension(objWidth - diffX, objHeight)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY\r\n debugger\r\n obj.setPosition(newX, newY,dontMoveChildren)\r\n break\r\n }\r\n\r\n if (newX !== null) {\r\n // may the setPosition has changed regarding any constraint or edit policies. In this case\r\n // we must adjust the dimension with the related correction\r\n //\r\n corrPos = obj.getPosition()\r\n if (corrPos.x !== newX || corrPos.y !== newY) {\r\n obj.setDimension(obj.getWidth() - (corrPos.x - newX), obj.getHeight() - (corrPos.y - newY))\r\n }\r\n }\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A StrongComposite is a composite figure with strong assignment of the children and the composite.\r\n * The child knows everything about the assigned composite and receives events about assignment to a\r\n * composite.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.composite.Composite\r\n * @since 4.8.0\r\n */\r\ndraw2d.shape.composite.StrongComposite = draw2d.shape.composite.Composite.extend(\r\n /** @lends draw2d.shape.composite.StrongComposite.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.StrongComposite\",\r\n\r\n /**\r\n * Creates a new strong composite element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.assignedFigures = new draw2d.util.ArrayList()\r\n\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n * \r\n * Check to see if a figure is a descendant of another figure.\r\n * <br>\r\n * The contains() method returns true if the figure provided by the argument is a descendant of this figure,\r\n * whether it is a direct child or nested more deeply. Otherwise, it returns false.\r\n *\r\n * @param {draw2d.Figure} containedFigure The figure that may be contained by (a descendant of) this figure.\r\n * @since 5.5.4\r\n */\r\n contains: function (containedFigure) {\r\n for (let i = 0, len = this.assignedFigures.getSize(); i < len; i++) {\r\n let child = this.assignedFigures.get(i)\r\n if (child === containedFigure || child.contains(containedFigure)) {\r\n return true\r\n }\r\n }\r\n return this._super(containedFigure)\r\n },\r\n\r\n /**\r\n * \r\n * Assign a figure to the composite.\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @template\r\n */\r\n assignFigure: function (figure) {\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Remove the given figure from the group assignment\r\n *\r\n * @param {draw2d.Figure} figure the figure to remove\r\n * @template\r\n */\r\n unassignFigure: function (figure) {\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return all assigned figures of the composite\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getAssignedFigures: function () {\r\n return this.assignedFigures\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called if the user drop this element onto the dropTarget. This event is ONLY fired if the\r\n * shape return \"this\" in the onDragEnter method.\r\n *\r\n *\r\n * @param {draw2d.Figure} dropTarget The drop target.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n * @since 4.7.4\r\n **/\r\n onDrop: function (dropTarget, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n * \r\n * Called if the user dropped an figure onto this element. This event is ONLY fired if the\r\n * shape return \"this\" in the onDragEnter method.\r\n *\r\n *\r\n * @param {draw2d.Figure} droppedFigure The dropped figure.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n * @since 4.7.4\r\n **/\r\n onCatch: function (droppedFigure, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n * \r\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. Additional\r\n * the internal model changed as well.\r\n *\r\n * Optional: Inserts current object in front of the given one.\r\n *\r\n * @param {draw2d.Figure} [figure] move current object in front of the given one.\r\n */\r\n toFront: function (figure) {\r\n this._super(figure)\r\n // ensure that all assigned figures are in front of the composite\r\n //\r\n let figures = this.getAssignedFigures().clone()\r\n figures.sort(function (a, b) {\r\n // return 1 if a before b\r\n // return -1 if b before a\r\n return a.getZOrder() > b.getZOrder() ? -1 : 1\r\n })\r\n let _this = this\r\n figures.each(function (i, f) {\r\n f.toFront(_this)\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Moves the element to the background. Additional\r\n * the internal model changed as well.\r\n *\r\n * @since 4.7.2\r\n */\r\n toBack: function (figure) {\r\n this._super(figure)\r\n // ensure that all assigned figures are in front of the composite\r\n //\r\n let figures = this.getAssignedFigures().clone()\r\n figures.sort(function (a, b) {\r\n // return 1 if a before b\r\n // return -1 if b before a\r\n return a.getZOrder() > b.getZOrder() ? -1 : 1\r\n })\r\n\r\n let _this = this\r\n figures.each(function (i, f) {\r\n f.toBack(_this)\r\n })\r\n\r\n return this\r\n }\r\n})\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A WeakComposite is a composite figure with loose coupling of the children and the composite.\r\n * The child didn't know anything about the assigned composite nor did they receive any events\r\n * about assignment to a composite.\r\n *\r\n * Assignment without obligation.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.composite.Composite\r\n * @since 4.8.0\r\n */\r\ndraw2d.shape.composite.WeakComposite = draw2d.shape.composite.Composite.extend(\r\n /** @lends draw2d.shape.composite.WeakComposite.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.WeakComposite\",\r\n\r\n /**\r\n * Creates a new weak composite element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n }\r\n})\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Base class for all diagrams.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n * @extends draw2d.SetFigure\r\n */\r\ndraw2d.shape.diagram.Diagram = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.diagram.Diagram */\r\n {\r\n\r\n init: function (attr, setter, getter) {\r\n this.data = []\r\n this.cache = {}\r\n\r\n this._super(\r\n {\r\n data: [], \r\n bgColor: \"#8dabf2\", \r\n stroke: 1, \r\n color: \"#f0f0f0\", \r\n radius: 2, \r\n resizeable: true,\r\n ...attr},\r\n {\r\n // @attr {Array} data the data to display in the diagram */\r\n data: this.setData,\r\n ...setter\r\n },\r\n {\r\n data: this.getData,\r\n ...getter\r\n }\r\n )\r\n },\r\n\r\n /**\r\n * \r\n * Set the data for the chart/diagram element\r\n *\r\n * @param {Array} data\r\n *\r\n */\r\n setData: function (data) {\r\n this.data = data\r\n this.cache = {}\r\n\r\n\r\n if (this.svgNodes !== null) {\r\n this.svgNodes.remove()\r\n this.svgNodes = this.createSet()\r\n }\r\n\r\n this.repaint()\r\n this.fireEvent(\"change:data\", {value: data})\r\n\r\n },\r\n\r\n /**\r\n * \r\n * Return the data of the diagram\r\n *\r\n * @since 5.0.0\r\n */\r\n getData: function () {\r\n return this.data\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the dimension of the diagram and reset the cached calculation\r\n *\r\n * @since 5.0.0\r\n */\r\n setDimension: function (w, h) {\r\n this.cache = {}\r\n this._super(w, h)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the calculate width of the set. This calculates the bounding box of all elements.\r\n *\r\n * @returns {Number} the calculated width of the label\r\n **/\r\n getWidth: function () {\r\n return this.width\r\n },\r\n\r\n /**\r\n * \r\n * Return the calculated height of the set. This calculates the bounding box of all elements.\r\n *\r\n * @returns {Number} the calculated height of the label\r\n */\r\n getHeight: function () {\r\n return this.height\r\n },\r\n\r\n /**\r\n *\r\n * @param attributes\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape == null) {\r\n return this\r\n }\r\n\r\n attributes ??= {}\r\n\r\n attributes.fill ??= \"none\"\r\n\r\n return this._super(attributes)\r\n },\r\n\r\n applyTransformation: function () {\r\n if (this.isResizeable() === true) {\r\n this.svgNodes.transform(\"S\" + this.scaleX + \",\" + this.scaleY + \",\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY() + \"t\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n }\r\n else {\r\n this.svgNodes.transform(\"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n }\r\n\r\n return this\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Small data pie chart.\r\n *\r\n *\r\n * @example\r\n *\r\n * let pie = new draw2d.shape.diagram.Pie({\r\n * diameter:80,\r\n * data:[30,60,122,4],\r\n * x:100,\r\n * y:60\r\n * });\r\n *\r\n * canvas.add( pie);\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n * @extends draw2d.shape.diagram.Diagram\r\n */\r\ndraw2d.shape.diagram.Pie = draw2d.shape.diagram.Diagram.extend(\r\n /** @lends draw2d.shape.diagram.Pie */\r\n {\r\n\r\n NAME: \"draw2d.shape.diagram.Pie\",\r\n COLORS: ['#00A8F0', '#b9dd69', '#f3546a', '#4DA74D', '#9440ED'],\r\n TWO_PI: Math.PI * 2,\r\n\r\n init: function (attr, setter, getter) {\r\n\r\n\r\n this._super(\r\n {\r\n stroke: 0,\r\n ...attr\r\n },\r\n {\r\n // @attr {Number} diameter the diameter of the pie chart */\r\n diameter: this.setDiameter,\r\n // @attr {Number} radius the radius of the pie chart */\r\n radius: this.setRadius,\r\n ...setter\r\n },\r\n {\r\n diameter: this.getDiameter,\r\n radius: this.getRadius,\r\n ...getter\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * Set the diameter of the circle. The center of the circle will be retained.\r\n *\r\n * @param {Number} d The new diameter of the circle.\r\n * @since 4.0.0\r\n **/\r\n setDiameter: function (d) {\r\n let center = this.getCenter()\r\n this.setDimension(d, d)\r\n this.setCenter(center)\r\n this.fireEvent(\"change:diameter\", {value: this.width})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the diameter of the circle.\r\n *\r\n * @since 4.0.0\r\n **/\r\n getDiameter: function () {\r\n return this.getWidth()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the radius of the circle. The center of the circle will be retained.\r\n *\r\n * @param {Number} r The new radius of the circle.\r\n * @since 4.0.0\r\n **/\r\n setRadius: function (r) {\r\n this.setDiameter(r * 2)\r\n this.fireEvent(\"change:radius\", {value: this.width / 2})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Get the center of the circle\r\n *\r\n */\r\n getCenter: function () {\r\n let d2 = this.getDiameter() / 2\r\n return this.getPosition().translate(d2, d2)\r\n },\r\n\r\n /**\r\n *\r\n * Set the center of the circle.\r\n *\r\n * @param {Number|draw2d.geo.Point} x the new x coordinate of the center or a draw2d.geo.Point object with the center\r\n * @param {Number} y the y coordinate of the new center of the first argument isn't a draw2d.geo.Point object\r\n */\r\n setCenter: function (x, y) {\r\n let pos = new draw2d.geo.Point(x, y)\r\n let d2 = this.getDiameter() / 2\r\n pos.translate(-d2, -d2)\r\n this.setPosition(pos)\r\n this.fireEvent(\"change:center\", {value: {x: x, y: y}})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setData: function (data) {\r\n\r\n // Normalize the Data.\r\n // The SUM must be == 1.\r\n this.sum = 0\r\n data.forEach(val => {\r\n this.sum += val\r\n })\r\n let _sum = 1 / this.sum\r\n data.forEach((val, i) => {\r\n data[i] = _sum * val\r\n })\r\n\r\n // pass the normalize data to the base implementation\r\n //\r\n this._super(data)\r\n this.fireEvent(\"change:data\", {value: data})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createSet: function () {\r\n let radius = this.getWidth() / 2\r\n let length = this.data.length\r\n\r\n let pie = this.canvas.paper.set()\r\n\r\n let offsetAngle = 0\r\n\r\n for (let i = 0; i < length; i++) {\r\n // angle is percent of TWO_PI\r\n let angle = this.TWO_PI * this.data[i]\r\n let color = this.COLORS[i % length]\r\n let seg = this.drawSegment(radius, angle, offsetAngle, 0.1)\r\n seg.attr({stroke: this.color.rgba(), fill: color})\r\n pie.push(seg)\r\n offsetAngle += angle\r\n }\r\n return pie\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n // keep the aspect ration\r\n //\r\n if (w > h) {\r\n this._super(w, w)\r\n }\r\n else {\r\n this._super(h, h)\r\n }\r\n\r\n // we must recreate the diagram if we change the size.\r\n // low performance. Better: transfor/scale the set. Can be done in the next release\r\n //\r\n if (this.svgNodes !== null) {\r\n this.svgNodes.remove()\r\n this.svgNodes = this.createSet()\r\n }\r\n\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n polarPath: function (radius, theta, rotation) {\r\n let x, y\r\n x = radius * Math.cos(theta + rotation) + radius\r\n y = radius * Math.sin(theta + rotation) + radius\r\n return \"L \" + x + \" \" + y + \" \"\r\n },\r\n\r\n drawSegment: function (radius, value, rotation, resolution) {\r\n let path = \"M \" + radius + \" \" + radius\r\n\r\n for (let i = 0; i < value; i += resolution) {\r\n path += this.polarPath(radius, i, rotation)\r\n }\r\n path += this.polarPath(radius, value, rotation)\r\n\r\n path += \"L \" + radius + \" \" + radius\r\n return this.getCanvas().paper.path(path)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n applyTransformation: function () {\r\n this.svgNodes.transform(\"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n\r\n return this\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Small data line diagram.\r\n *\r\n *\r\n * @example\r\n *\r\n * let testData = [];\r\n * for(let i=0;i<100;i++) {\r\n * testData.push(Math.floor(Math.random() * 100));\r\n * }\r\n *\r\n * let sparkline = new draw2d.shape.diagram.Sparkline({\r\n * \tdata: testData,\r\n * width:150,\r\n * height:50,\r\n * x:100,\r\n * y:60\r\n * });\r\n *\r\n * canvas.add( sparkline);\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n * @extends draw2d.shape.diagram.Diagram\r\n */\r\ndraw2d.shape.diagram.Sparkline = draw2d.shape.diagram.Diagram.extend(\r\n /** @lends draw2d.shape.diagram.Sparkline */\r\n {\r\n\r\n NAME : \"draw2d.shape.diagram.Sparkline\",\r\n\r\n init: function (attr, setter, getter) {\r\n this.min = 0\r\n this.max = 10\r\n this.padding = 4\r\n\r\n this._super({width: 180, height: 50,...attr}, setter, getter)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setData: function (data) {\r\n if (data.length > 0) {\r\n // get the min/max from an array and not only from two elements..\r\n this.min = Math.min(...data)\r\n this.max = Math.max(...data)\r\n }\r\n else {\r\n this.min = 0\r\n this.max = 1\r\n }\r\n\r\n if (this.max === this.min) {\r\n this.max = this.min + 1\r\n }\r\n\r\n this._super(data)\r\n this.fireEvent(\"change:data\", {value: data})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M0 0 l0 0\")\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n attributes.fill = \"90-#000:5-#4d4d4d:95\"\r\n\r\n let padding = this.padding\r\n let width = this.getWidth() - 2 * padding\r\n let height = this.getHeight() - 2 * padding\r\n let length = this.data.length\r\n let min = this.min\r\n let max = this.max\r\n let toCoords = function (value, idx) {\r\n let step = 1\r\n // avoid divisionByZero\r\n if (length > 1) {\r\n step = (width / (length - 1))\r\n }\r\n\r\n return {\r\n y: -((value - min) / (max - min) * height) + height + padding,\r\n x: padding + idx * step\r\n }\r\n }\r\n\r\n if (this.svgNodes !== null && (typeof this.cache.pathString === \"undefined\")) {\r\n let prev_pt = null\r\n this.data.forEach((item, idx) => {\r\n let pt = toCoords(item, idx)\r\n if (prev_pt === null) {\r\n this.cache.pathString = [\"M\", pt.x, pt.y].join(\" \")\r\n }\r\n else {\r\n this.cache.pathString = [this.cache.pathString, \"L\", pt.x, pt.y].join(\" \")\r\n }\r\n prev_pt = pt\r\n })\r\n\r\n this.svgNodes.attr({path: this.cache.pathString, stroke: \"#f0f0f0\"})\r\n\r\n }\r\n this._super(attributes)\r\n\r\n return this\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A Rectangle Figure in a dimetric perspective.\r\n *\r\n *\r\n * @example\r\n *\r\n * let d1 = new draw2d.shape.dimetric.Rectangle({x:10,y:10});\r\n * let d2 = new draw2d.shape.dimetric.Rectangle({x:100,y:10, bgColor:\"#f0f000\", alpha:0.7, width:100, height:60});\r\n *\r\n * canvas.add(d1);\r\n * canvas.add(d2);\r\n *\r\n * canvas.setCurrentSelection(d2);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Polygon\r\n */\r\ndraw2d.shape.dimetric.Rectangle = draw2d.shape.basic.Polygon.extend(\r\n /** @lends draw2d.shape.dimetric.Rectangle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.dimetric.Rectangle\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({bgColor: \"#00a3f6\", color: \"#1B1B1B\"}, attr), setter, getter)\r\n\r\n let pos = this.getPosition()\r\n\r\n this.resetVertices()\r\n\r\n let angle26 = Math.atan(.5)\r\n let cos30 = Math.cos(angle26)\r\n let sin30 = Math.sin(angle26)\r\n\r\n let box = this.getBoundingBox()\r\n let w = box.w\r\n let h = box.h\r\n\r\n this.addVertex(0, 0) // topLeft\r\n this.addVertex(cos30 * w, sin30 * w) // topRight\r\n this.addVertex(cos30 * w - cos30 * h, sin30 * w + sin30 * h) // bottomRight\r\n this.addVertex(-cos30 * h, sin30 * h) // bottomLeft\r\n\r\n // override the selection handler from the polygon. Because the vertices of\r\n // the diamond are not selectable and modifiable\r\n //\r\n this.installEditPolicy(new draw2d.policy.figure.RectangleSelectionFeedbackPolicy())\r\n\r\n this.setPosition(pos)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Typical flowchart <b>Document</b> shape\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.flowchart.Document({\r\n * x:100,\r\n * y:60\r\n * });\r\n *\r\n * canvas.add( figure);\r\n *\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.flowchart.Document = draw2d.VectorFigure.extend(\r\n /** @lends draw2d.shape.flowchart.Document.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.flowchart.Document\",\r\n\r\n /**\r\n *\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.amplitude = 0.08 // percentage of height\r\n\r\n this._super(extend({\r\n width: 80,\r\n height: 50,\r\n bgColor: \"#2196f3\",\r\n color: \"#1B1B1B\",\r\n stroke: 1\r\n }, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n return this.canvas.paper.path(this.calcPath())\r\n },\r\n\r\n calcPath: function () {\r\n let w = this.getWidth()\r\n let h = this.getHeight()\r\n let w2 = w / 2\r\n let w4 = w / 4\r\n let h2 = (h * this.amplitude) | 0\r\n\r\n\r\n return [\r\n \"M\", this.getAbsoluteX(), \",\", this.getAbsoluteY(),\r\n \"l\", w, \",\", 0,\r\n \"l\", 0, \",\", h - h2,\r\n \"q\", -w4, \",\", -h2, -w2, \",\", 0,\r\n \"q\", -w4, \",\", h2, -w2, \",\", 0,\r\n \"z\"].join(\" \")\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes = extend({}, {\r\n path: this.calcPath()\r\n }, attributes)\r\n\r\n this._super(attributes)\r\n\r\n return this\r\n }\r\n /*\r\n function draw_curve(Ax, Ay, Bx, By, M) {\r\n\r\n // Find midpoint J\r\n let Jx = Ax + (Bx - Ax) / 2\r\n let Jy = Ay + (By - Ay) / 2\r\n\r\n // We need a and b to find theta, and we need to know the sign of each to make sure that the orientation is correct.\r\n let a = Bx - Ax\r\n let asign = (a < 0 ? -1 : 1)\r\n let b = By - Ay\r\n let bsign = (b < 0 ? -1 : 1)\r\n let theta = Math.atan(b / a)\r\n\r\n // Find the point that's perpendicular to J on side\r\n let costheta = asign * Math.cos(theta)\r\n let sintheta = asign * Math.sin(theta)\r\n\r\n // Find c and d\r\n let c = M * sintheta\r\n let d = M * costheta\r\n\r\n // Use c and d to find Kx and Ky\r\n let Kx = Jx - c\r\n let Ky = Jy + d\r\n\r\n return \"M\" + Ax + \",\" + Ay +\r\n \"Q\" + Kx + \",\" + Ky +\r\n \" \" + Bx + \",\" + By\r\n }*/\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Acw();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Acw = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Acw.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Acw\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M19.275,3.849l1.695,8.56l1.875-1.642c2.311,3.59,1.72,8.415-1.584,11.317c-2.24,1.96-5.186,2.57-7.875,1.908l-0.84,3.396c3.75,0.931,7.891,0.066,11.02-2.672c4.768-4.173,5.521-11.219,1.94-16.279l2.028-1.775L19.275,3.849zM8.154,20.232c-2.312-3.589-1.721-8.416,1.582-11.317c2.239-1.959,5.186-2.572,7.875-1.909l0.842-3.398c-3.752-0.93-7.893-0.067-11.022,2.672c-4.765,4.174-5.519,11.223-1.939,16.283l-2.026,1.772l8.26,2.812l-1.693-8.559L8.154,20.232z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Alarm();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Alarm = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Alarm.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Alarm\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M8.179,20.115c-0.478,0.277-0.642,0.889-0.365,1.366c0.275,0.479,0.889,0.642,1.365,0.366c0.479-0.275,0.643-0.888,0.367-1.367C9.27,20.004,8.658,19.84,8.179,20.115zM9.18,12.239c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,13.126,9.657,12.516,9.18,12.239zM8.625,17.043c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,18.043,8.624,17.596,8.625,17.043zM16.312,3.957V3.031h1c0.275,0,0.5-0.225,0.5-0.5v-0.5c0-0.275-0.225-0.5-0.5-0.5h-3.625c-0.275,0-0.5,0.225-0.5,0.5v0.5c0,0.275,0.225,0.5,0.5,0.5h1v0.926C7.819,4.381,2.376,10.068,2.374,17.042C2.376,24.291,8.251,30.166,15.5,30.169c7.249-0.003,13.124-5.878,13.125-13.127C28.624,10.067,23.181,4.38,16.312,3.957zM15.5,27.166C9.909,27.157,5.385,22.633,5.375,17.042C5.385,11.451,9.909,6.927,15.5,6.917c5.59,0.01,10.115,4.535,10.124,10.125C25.615,22.633,21.091,27.157,15.5,27.166zM12.062,22.998c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,23.887,12.54,23.275,12.062,22.998zM12.062,11.088c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,11.2,11.584,11.364,12.062,11.088zM22.822,13.971c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,14.083,22.344,14.247,22.822,13.971zM15.501,23.92c-0.552,0-1,0.447-1,1c0,0.552,0.448,1,1,1s1-0.448,1-1C16.501,24.367,16.053,23.92,15.501,23.92zM19.938,9.355c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,10.245,20.418,9.632,19.938,9.355zM23.378,16.042c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,16.492,23.929,16.042,23.378,16.042zM22.823,20.115c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.091,0.367,1.367c0.477,0.275,1.089,0.112,1.365-0.366C23.464,21.004,23.3,20.391,22.823,20.115zM15.501,8.167c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.366c0.275,0.479,0.889,0.642,1.365,0.366l3.305-1.676c0.055,0.006,0.109,0.017,0.166,0.017c0.828,0,1.5-0.672,1.5-1.5l-0.5-7.876C16.501,8.614,16.053,8.167,15.501,8.167zM18.939,22.998c-0.479,0.276-0.643,0.888-0.366,1.367c0.275,0.477,0.888,0.642,1.366,0.365c0.478-0.276,0.642-0.889,0.366-1.365C20.028,22.886,19.417,22.723,18.939,22.998zM11.197,3.593c-0.836-1.04-2.103-1.718-3.541-1.718c-2.52,0-4.562,2.042-4.562,4.562c0,0.957,0.297,1.843,0.8,2.576C5.649,6.484,8.206,4.553,11.197,3.593zM27.106,9.014c0.503-0.733,0.8-1.619,0.8-2.576c0-2.52-2.043-4.562-4.562-4.562c-1.438,0-2.704,0.678-3.541,1.717C22.794,4.553,25.351,6.484,27.106,9.014z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Anonymous();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Anonymous = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Anonymous.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Anonymous\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h26.954C28.977,26.709,29.039,24.332,28.523,23.813zM16.618,13.693c-0.398-0.251-0.783-1.211-0.783-1.64c0-0.133,0-0.236,0-0.236c-0.105-0.106-0.574-0.096-0.67,0c0,0,0,0.104,0,0.236c0,0.429-0.385,1.389-0.783,1.64c-0.399,0.251-1.611,0.237-2.084-0.236c-0.473-0.473-0.524-1.663-0.643-1.78c-0.118-0.119-0.185-0.185-0.185-0.185l0.029-0.414c0,0,0.842-0.207,1.699-0.207s1.803,0.502,1.803,0.502c0.231-0.074,0.784-0.083,0.996,0c0,0,0.945-0.502,1.803-0.502s1.699,0.207,1.699,0.207l0.029,0.414c0,0-0.066,0.066-0.185,0.185c-0.118,0.118-0.169,1.308-0.643,1.78C18.229,13.93,17.018,13.944,16.618,13.693z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Apple();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Apple = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Apple.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Apple\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.32,10.85c-1.743,1.233-2.615,2.719-2.615,4.455c0,2.079,1.078,3.673,3.232,4.786c-0.578,1.677-1.416,3.134-2.514,4.375c-1.097,1.241-2.098,1.862-3.004,1.862c-0.427,0-1.009-0.143-1.748-0.423l-0.354-0.138c-0.725-0.281-1.363-0.423-1.92-0.423c-0.525,0-1.1,0.11-1.725,0.331l-0.445,0.16l-0.56,0.229c-0.441,0.176-0.888,0.264-1.337,0.264c-1.059,0-2.228-0.872-3.507-2.616c-1.843-2.498-2.764-5.221-2.764-8.167c0-2.095,0.574-3.781,1.725-5.061c1.149-1.279,2.673-1.92,4.568-1.92c0.709,0,1.371,0.13,1.988,0.389l0.423,0.172l0.445,0.183c0.396,0.167,0.716,0.251,0.959,0.251c0.312,0,0.659-0.072,1.04-0.217l0.582-0.229l0.435-0.16c0.693-0.251,1.459-0.377,2.297-0.377C21.512,8.576,23.109,9.334,24.32,10.85zM19.615,3.287c0.021,0.267,0.033,0.473,0.033,0.617c0,1.317-0.479,2.473-1.438,3.467s-2.075,1.49-3.347,1.49c-0.038-0.297-0.058-0.51-0.058-0.639c0-1.12,0.445-2.171,1.337-3.153c0.891-0.982,1.922-1.558,3.096-1.725C19.32,3.329,19.447,3.311,19.615,3.287z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Apps();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Apps = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Apps.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Apps\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.359,18.424l-2.326,1.215c0.708,1.174,1.384,2.281,1.844,3.033l2.043-1.066C25.538,20.822,24.966,19.652,24.359,18.424zM19.143,14.688c0.445,0.84,1.342,2.367,2.274,3.926l2.414-1.261c-0.872-1.769-1.72-3.458-2.087-4.122c-0.896-1.621-1.982-3.108-3.454-5.417c-1.673-2.625-3.462-5.492-4.052-4.947c-1.194,0.384,1.237,4.094,1.876,5.715C16.73,10.147,17.991,12.512,19.143,14.688zM26.457,22.673l-1.961,1.022l1.982,4.598c0,0,0.811,0.684,1.92,0.213c1.104-0.469,0.81-1.706,0.81-1.706L26.457,22.673zM24.35,15.711c0.168,0.339,2.924,5.93,2.924,5.93h1.983v-5.93H24.35zM18.34,15.704h-4.726l-3.424,5.935h11.66C21.559,21.159,18.771,16.479,18.34,15.704zM3.231,21.613l3.437-5.902H2.083v5.93h1.133L3.231,21.613zM15.048,10.145c0-0.93-0.754-1.685-1.685-1.685c-0.661,0-1.231,0.381-1.507,0.936l2.976,1.572C14.97,10.725,15.048,10.444,15.048,10.145zM14.343,12.06l-3.188-1.684L9.62,13.012l3.197,1.689L14.343,12.06zM3.192,26.886l-0.384,1.108v0.299l0.298-0.128l0.725-0.896l2.997-2.354l-3.137-1.651L3.192,26.886zM9.02,14.044l-4.757,8.17l3.23,1.706l4.728-8.186L9.02,14.044z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowDown();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowDown = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowDown.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ArrowDown\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M5.318,6.684L15.5,24.316L25.682,6.684H5.318z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowLeft();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowLeft = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowLeft.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ArrowLeft\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.316,5.318L6.684,15.5l17.632,10.182V5.318L24.316,5.318z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowLeft2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowLeft2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowLeft2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ArrowLeft2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.871,9.814 15.684,16.001 21.871,22.188 18.335,25.725 8.612,16.001 18.335,6.276z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowRight();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowRight = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowRight.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ArrowRight\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowRight2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowRight2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowRight2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ArrowRight2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.129,22.186 16.316,15.999 10.129,9.812 13.665,6.276 23.389,15.999 13.665,25.725z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowUp();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowUp = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowUp.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.ArrowUp\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.682,24.316L15.5,6.684L5.318,24.316H25.682z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Aumade();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Aumade = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Aumade.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Aumade\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.513,24.52c-0.131-0.217-0.14-0.481-0.022-0.711l1.987-3.844l0,0c0.186-0.357,0.625-0.497,0.981-0.312c0.357,0.188,0.498,0.625,0.312,0.982l-1.801,3.48l2.228,3.699h12.269l-14.8-25.631L6.433,18.178c0.434,0.242,0.909,0.479,1.391,0.654c0.571,0.211,1.148,0.342,1.658,0.342c0.276,0,0.579-0.078,0.916-0.238c0.337-0.158,0.7-0.396,1.073-0.688c0.749-0.582,1.527-1.354,2.334-2.021c0.539-0.442,1.091-0.844,1.706-1.099c0.352-0.145,0.729-0.239,1.128-0.239c0.622,0,1.174,0.214,1.622,0.5c0.449,0.287,0.813,0.646,1.11,0.995c0.59,0.697,0.902,1.359,0.924,1.394l0,0c0.18,0.361,0.021,0.801-0.341,0.977c-0.356,0.176-0.798,0.021-0.978-0.34c0-0.002-0.002-0.004-0.004-0.007c-0.002-0.011-0.008-0.021-0.018-0.034c-0.018-0.033-0.043-0.082-0.078-0.146c-0.07-0.125-0.179-0.305-0.312-0.496c-0.271-0.391-0.668-0.845-1.092-1.104c-0.281-0.178-0.561-0.272-0.844-0.272c-0.216,0-0.479,0.069-0.788,0.229c-0.309,0.153-0.653,0.396-1.016,0.688c-0.727,0.584-1.511,1.362-2.351,2.033c-0.562,0.445-1.15,0.853-1.809,1.103c-0.375,0.143-0.776,0.229-1.195,0.229c-0.749,0-1.48-0.181-2.164-0.433c-0.58-0.219-1.125-0.482-1.613-0.764L0.86,27.816h15.63L14.513,24.52zM18.214,22.242c0.222-0.557,0.537-1.217,0.963-1.848c0.427-0.627,0.957-1.232,1.646-1.646c0.379-0.229,0.812-0.391,1.282-0.438l-0.604-0.934l0,0c-0.22-0.339-0.123-0.789,0.215-1.009c0.341-0.219,0.789-0.123,1.013,0.216l1.545,2.391c0.184,0.274,0.147,0.646-0.075,0.893c-0.228,0.247-0.591,0.305-0.886,0.145c-0.354-0.191-0.646-0.258-0.901-0.258c-0.291,0-0.562,0.084-0.845,0.25c-0.277,0.164-0.562,0.414-0.813,0.719c-0.519,0.607-0.937,1.422-1.185,2.055c-0.111,0.285-0.387,0.466-0.678,0.466c-0.092,0-0.183-0.021-0.271-0.056C18.249,23.039,18.064,22.615,18.214,22.242z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.BarChart();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.BarChart = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.BarChart.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.BarChart\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.25,8.375V28h6.5V8.375H21.25zM12.25,28h6.5V4.125h-6.5V28zM3.25,28h6.5V12.625h-6.5V28z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.BioHazard();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.BioHazard = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.BioHazard.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.BioHazard\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.154,13.988c-0.96-0.554-1.982-0.892-3.019-1.032c0.396-0.966,0.616-2.023,0.616-3.131c0-4.399-3.438-8.001-7.772-8.264c3.245,0.258,5.803,2.979,5.803,6.292c0,3.373-2.653,6.123-5.983,6.294v1.292c0.908,0.144,1.605,0.934,1.605,1.883c0,0.232-0.043,0.454-0.118,0.66l1.181,0.683c1.826-2.758,5.509-3.658,8.41-1.981c2.896,1.672,3.965,5.299,2.506,8.254C31.386,21.038,29.992,16.204,26.154,13.988zM4.122,16.587c2.92-1.686,6.628-0.764,8.442,2.034l1.141-0.657c-0.072-0.2-0.109-0.417-0.109-0.642c0-0.909,0.638-1.67,1.489-1.859v-1.319c-3.3-0.202-5.92-2.94-5.92-6.292c0-3.297,2.532-6.007,5.757-6.286c-4.312,0.285-7.729,3.875-7.729,8.258c0,1.078,0.206,2.106,0.581,3.05c-1.004,0.147-1.999,0.481-2.931,1.02c-3.812,2.201-5.209,6.985-3.264,10.87C0.174,21.823,1.251,18.244,4.122,16.587zM11.15,11.452c0.114,0.139,0.235,0.271,0.362,0.398c0.126,0.126,0.259,0.247,0.397,0.361c0.102,0.084,0.211,0.16,0.318,0.236c0.93-0.611,2.045-0.969,3.244-0.969c1.201,0,2.312,0.357,3.242,0.969c0.107-0.077,0.217-0.152,0.318-0.236c0.139-0.114,0.271-0.235,0.397-0.361c0.127-0.127,0.248-0.259,0.362-0.398c0.113-0.138,0.222-0.283,0.323-0.431c-1.307-0.956-2.908-1.528-4.643-1.528c-0.042,0-0.083-0.001-0.124,0c-0.019,0-0.04-0.001-0.06,0c-1.666,0.038-3.201,0.605-4.462,1.528C10.929,11.17,11.037,11.314,11.15,11.452zM9.269,16.787c-0.168-0.062-0.338-0.117-0.512-0.164c-0.173-0.047-0.348-0.083-0.525-0.113c-0.177-0.03-0.355-0.053-0.535-0.065c-0.175,1.609,0.13,3.282,0.998,4.786c0.868,1.503,2.164,2.606,3.645,3.259c0.079-0.162,0.15-0.328,0.212-0.496c0.063-0.169,0.118-0.338,0.164-0.512c0.047-0.173,0.087-0.349,0.115-0.525c0.022-0.13,0.034-0.262,0.046-0.394c-0.993-0.5-1.86-1.286-2.461-2.325c-0.6-1.04-0.847-2.182-0.783-3.294C9.512,16.889,9.392,16.833,9.269,16.787zM18.122,22.657c0.014,0.132,0.024,0.263,0.046,0.394c0.03,0.177,0.067,0.352,0.113,0.524c0.047,0.174,0.102,0.346,0.165,0.514c0.062,0.169,0.132,0.333,0.212,0.495c1.48-0.653,2.777-1.755,3.644-3.257c0.868-1.504,1.176-3.179,1.001-4.788c-0.18,0.013-0.358,0.035-0.535,0.065c-0.177,0.029-0.353,0.067-0.525,0.113s-0.345,0.101-0.513,0.163c-0.124,0.047-0.241,0.105-0.362,0.16c0.063,1.11-0.183,2.253-0.784,3.292C19.984,21.373,19.116,22.157,18.122,22.657zM20.569,27.611c-2.92-1.687-3.977-5.358-2.46-8.329l-1.192-0.689c-0.349,0.389-0.854,0.634-1.417,0.634c-0.571,0-1.086-0.254-1.436-0.653l-1.146,0.666c1.475,2.96,0.414,6.598-2.488,8.272c-2.888,1.668-6.552,0.791-8.386-1.935c2.38,3.667,7.249,4.87,11.079,2.658c0.929-0.535,1.711-1.227,2.339-2.018c0.64,0.832,1.45,1.554,2.416,2.112c3.835,2.213,8.709,1.006,11.086-2.671C27.132,28.396,23.463,29.282,20.569,27.611z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Book();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Book = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Book.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Book\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.754,4.626c-0.233-0.161-0.536-0.198-0.802-0.097L12.16,9.409c-0.557,0.213-1.253,0.316-1.968,0.316c-0.997,0.002-2.029-0.202-2.747-0.48C7.188,9.148,6.972,9.04,6.821,8.943c0.056-0.024,0.12-0.05,0.193-0.075L18.648,4.43l1.733,0.654V3.172c0-0.284-0.14-0.554-0.374-0.714c-0.233-0.161-0.538-0.198-0.802-0.097L6.414,7.241c-0.395,0.142-0.732,0.312-1.02,0.564C5.111,8.049,4.868,8.45,4.872,8.896c0,0.012,0.004,0.031,0.004,0.031v17.186c0,0.008-0.003,0.015-0.003,0.021c0,0.006,0.003,0.01,0.003,0.016v0.017h0.002c0.028,0.601,0.371,0.983,0.699,1.255c1.034,0.803,2.769,1.252,4.614,1.274c0.874,0,1.761-0.116,2.583-0.427l12.796-4.881c0.337-0.128,0.558-0.448,0.558-0.809V5.341C26.128,5.057,25.988,4.787,25.754,4.626zM5.672,11.736c0.035,0.086,0.064,0.176,0.069,0.273l0.004,0.054c0.016,0.264,0.13,0.406,0.363,0.611c0.783,0.626,2.382,1.08,4.083,1.093c0.669,0,1.326-0.083,1.931-0.264v1.791c-0.647,0.143-1.301,0.206-1.942,0.206c-1.674-0.026-3.266-0.353-4.509-1.053V11.736zM10.181,24.588c-1.674-0.028-3.266-0.354-4.508-1.055v-2.712c0.035,0.086,0.065,0.176,0.07,0.275l0.002,0.053c0.018,0.267,0.13,0.408,0.364,0.613c0.783,0.625,2.381,1.079,4.083,1.091c0.67,0,1.327-0.082,1.932-0.262v1.789C11.476,24.525,10.821,24.588,10.181,24.588z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Bookmark();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Bookmark = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Bookmark.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Bookmark\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M17.396,1.841L6.076,25.986l7.341-4.566l1.186,8.564l11.32-24.146L17.396,1.841zM19.131,9.234c-0.562-0.264-0.805-0.933-0.541-1.495c0.265-0.562,0.934-0.805,1.496-0.541s0.805,0.934,0.541,1.496S19.694,9.498,19.131,9.234z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Books();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Books = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Books.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Books\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.679,7.858c-0.176-0.138-0.404-0.17-0.606-0.083l-9.66,4.183c-0.42,0.183-0.946,0.271-1.486,0.271c-0.753,0.002-1.532-0.173-2.075-0.412c-0.194-0.083-0.356-0.176-0.471-0.259c0.042-0.021,0.09-0.042,0.146-0.064l8.786-3.804l1.31,0.561V6.612c0-0.244-0.106-0.475-0.283-0.612c-0.176-0.138-0.406-0.17-0.605-0.083l-9.66,4.183c-0.298,0.121-0.554,0.268-0.771,0.483c-0.213,0.208-0.397,0.552-0.394,0.934c0,0.01,0.003,0.027,0.003,0.027v14.73c0,0.006-0.002,0.012-0.002,0.019c0,0.005,0.002,0.007,0.002,0.012v0.015h0.002c0.021,0.515,0.28,0.843,0.528,1.075c0.781,0.688,2.091,1.073,3.484,1.093c0.66,0,1.33-0.1,1.951-0.366l9.662-4.184c0.255-0.109,0.422-0.383,0.422-0.692V8.471C26.961,8.227,26.855,7.996,26.679,7.858zM20.553,5.058c-0.017-0.221-0.108-0.429-0.271-0.556c-0.176-0.138-0.404-0.17-0.606-0.083l-9.66,4.183C9.596,8.784,9.069,8.873,8.53,8.873C7.777,8.874,6.998,8.699,6.455,8.46C6.262,8.378,6.099,8.285,5.984,8.202C6.026,8.181,6.075,8.16,6.13,8.138l8.787-3.804l1.309,0.561V3.256c0-0.244-0.106-0.475-0.283-0.612c-0.176-0.138-0.407-0.17-0.606-0.083l-9.66,4.183C5.379,6.864,5.124,7.011,4.907,7.227C4.693,7.435,4.51,7.779,4.513,8.161c0,0.011,0.003,0.027,0.003,0.027v14.73c0,0.006-0.001,0.013-0.001,0.019c0,0.005,0.001,0.007,0.001,0.012v0.016h0.002c0.021,0.515,0.28,0.843,0.528,1.075c0.781,0.688,2.091,1.072,3.485,1.092c0.376,0,0.754-0.045,1.126-0.122V11.544c-0.01-0.7,0.27-1.372,0.762-1.856c0.319-0.315,0.708-0.564,1.19-0.756L20.553,5.058z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Bubble();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Bubble = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Bubble.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Bubble\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Bug();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Bug = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Bug.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Bug\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.589,10.903l-5.828,1.612c-0.534-1.419-1.338-2.649-2.311-3.628l3.082-5.44c0.271-0.48,0.104-1.092-0.38-1.365c-0.479-0.271-1.09-0.102-1.36,0.377l-2.924,5.162c-0.604-0.383-1.24-0.689-1.9-0.896c-0.416-1.437-1.652-2.411-3.058-2.562c-0.001-0.004-0.002-0.008-0.003-0.012c-0.061-0.242-0.093-0.46-0.098-0.65c-0.005-0.189,0.012-0.351,0.046-0.479c0.037-0.13,0.079-0.235,0.125-0.317c0.146-0.26,0.34-0.43,0.577-0.509c0.023,0.281,0.142,0.482,0.352,0.601c0.155,0.088,0.336,0.115,0.546,0.086c0.211-0.031,0.376-0.152,0.496-0.363c0.105-0.186,0.127-0.389,0.064-0.607c-0.064-0.219-0.203-0.388-0.414-0.507c-0.154-0.087-0.314-0.131-0.482-0.129c-0.167,0.001-0.327,0.034-0.481,0.097c-0.153,0.063-0.296,0.16-0.429,0.289c-0.132,0.129-0.241,0.271-0.33,0.426c-0.132,0.234-0.216,0.496-0.25,0.783c-0.033,0.286-0.037,0.565-0.009,0.84c0.017,0.16,0.061,0.301,0.094,0.449c-0.375-0.021-0.758,0.002-1.14,0.108c-0.482,0.133-0.913,0.36-1.28,0.653c-0.052-0.172-0.098-0.344-0.18-0.518c-0.116-0.249-0.263-0.486-0.438-0.716c-0.178-0.229-0.384-0.41-0.618-0.543C9.904,3.059,9.737,2.994,9.557,2.951c-0.18-0.043-0.352-0.052-0.516-0.027s-0.318,0.08-0.463,0.164C8.432,3.172,8.318,3.293,8.23,3.445C8.111,3.656,8.08,3.873,8.136,4.092c0.058,0.221,0.181,0.384,0.367,0.49c0.21,0.119,0.415,0.138,0.611,0.056C9.31,4.556,9.451,4.439,9.539,4.283c0.119-0.21,0.118-0.443-0.007-0.695c0.244-0.055,0.497-0.008,0.757,0.141c0.081,0.045,0.171,0.115,0.27,0.208c0.097,0.092,0.193,0.222,0.286,0.388c0.094,0.166,0.179,0.368,0.251,0.608c0.013,0.044,0.023,0.098,0.035,0.146c-0.911,0.828-1.357,2.088-1.098,3.357c-0.582,0.584-1.072,1.27-1.457,2.035l-5.16-2.926c-0.48-0.271-1.092-0.102-1.364,0.377C1.781,8.404,1.95,9.016,2.43,9.289l5.441,3.082c-0.331,1.34-0.387,2.807-0.117,4.297l-5.828,1.613c-0.534,0.147-0.846,0.699-0.698,1.231c0.147,0.53,0.697,0.843,1.231,0.694l5.879-1.627c0.503,1.057,1.363,2.28,2.371,3.443l-3.194,5.639c-0.272,0.481-0.104,1.092,0.378,1.363c0.239,0.137,0.512,0.162,0.758,0.094c0.248-0.068,0.469-0.229,0.604-0.471l2.895-5.109c2.7,2.594,5.684,4.123,5.778,1.053c1.598,2.56,3.451-0.338,4.502-3.976l5.203,2.947c0.24,0.138,0.514,0.162,0.762,0.094c0.246-0.067,0.467-0.229,0.603-0.471c0.272-0.479,0.104-1.091-0.377-1.362l-5.701-3.229c0.291-1.505,0.422-2.983,0.319-4.138l5.886-1.627c0.53-0.147,0.847-0.697,0.696-1.229C29.673,11.068,29.121,10.756,28.589,10.903z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Calendar();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Calendar = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Calendar.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Calendar\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M11.758,15.318c0.312-0.3,0.408-0.492,0.408-0.492h0.024c0,0-0.012,0.264-0.012,0.528v5.469h-1.871v1.031h4.87v-1.031H13.33v-7.436h-1.055l-2.027,1.967l0.719,0.744L11.758,15.318zM16.163,21.207c0,0.205,0.024,0.42,0.06,0.647h5.457v-1.031h-4.197c0.023-1.931,4.065-2.362,4.065-5.146c0-1.463-1.114-2.436-2.674-2.436c-1.907,0-2.675,1.607-2.675,1.607l0.875,0.587c0,0,0.6-1.08,1.716-1.08c0.887,0,1.522,0.563,1.522,1.403C20.312,17.754,16.163,18.186,16.163,21.207zM12,3.604h-2v3.335h2V3.604zM23,4.77v3.17h-4V4.77h-6v3.168H9.002V4.77H6.583v21.669h18.833V4.77H23zM24.417,25.438H7.584V10.522h16.833V25.438zM22,3.604h-2v3.335h2V3.604z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cart();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cart = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cart.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Cart\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.02,11.754L8.416,9.473L7.16,4.716C7.071,4.389,6.772,4.158,6.433,4.158H3.341C3.114,3.866,2.775,3.667,2.377,3.667c-0.686,0-1.242,0.556-1.242,1.242c0,0.686,0.556,1.242,1.242,1.242c0.399,0,0.738-0.201,0.965-0.493h2.512l5.23,19.8c-0.548,0.589-0.891,1.373-0.891,2.242c0,1.821,1.473,3.293,3.293,3.293c1.82,0,3.294-1.472,3.297-3.293c0-0.257-0.036-0.504-0.093-0.743h5.533c-0.056,0.239-0.092,0.486-0.092,0.743c0,1.821,1.475,3.293,3.295,3.293s3.295-1.472,3.295-3.293c0-1.82-1.473-3.295-3.295-3.297c-0.951,0.001-1.801,0.409-2.402,1.053h-7.136c-0.601-0.644-1.451-1.052-2.402-1.053c-0.379,0-0.738,0.078-1.077,0.196l-0.181-0.685H26.81c1.157-0.027,2.138-0.83,2.391-1.959l1.574-7.799c0.028-0.145,0.041-0.282,0.039-0.414C30.823,12.733,30.051,11.86,29.02,11.754zM25.428,27.994c-0.163,0-0.295-0.132-0.297-0.295c0.002-0.165,0.134-0.297,0.297-0.297s0.295,0.132,0.297,0.297C25.723,27.862,25.591,27.994,25.428,27.994zM27.208,20.499l0.948-0.948l-0.318,1.578L27.208,20.499zM12.755,11.463l1.036,1.036l-1.292,1.292l-1.292-1.292l1.087-1.087L12.755,11.463zM17.253,11.961l0.538,0.538l-1.292,1.292l-1.292-1.292l0.688-0.688L17.253,11.961zM9.631,14.075l0.868-0.868l1.292,1.292l-1.292,1.292l-0.564-0.564L9.631,14.075zM9.335,12.956l-0.328-1.24L9.792,12.5L9.335,12.956zM21.791,16.499l-1.292,1.292l-1.292-1.292l1.292-1.292L21.791,16.499zM21.207,14.5l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,14.5zM18.5,15.791l-1.293-1.292l1.292-1.292l1.292,1.292L18.5,15.791zM17.791,16.499L16.5,17.791l-1.292-1.292l1.292-1.292L17.791,16.499zM14.499,15.791l-1.292-1.292l1.292-1.292l1.292,1.292L14.499,15.791zM13.791,16.499l-1.292,1.291l-1.292-1.291l1.292-1.292L13.791,16.499zM10.499,17.207l1.292,1.292l-0.785,0.784l-0.54-2.044L10.499,17.207zM11.302,20.404l1.197-1.197l1.292,1.292L12.5,21.791l-1.131-1.13L11.302,20.404zM13.208,18.499l1.291-1.292l1.292,1.292L14.5,19.791L13.208,18.499zM16.5,19.207l1.292,1.292L16.5,21.79l-1.292-1.291L16.5,19.207zM17.208,18.499l1.292-1.292l1.291,1.292L18.5,19.79L17.208,18.499zM20.499,19.207l1.292,1.292L20.5,21.79l-1.292-1.292L20.499,19.207zM21.207,18.499l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,18.499zM23.207,16.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,16.499zM25.207,14.499l1.292-1.292L27.79,14.5l-1.291,1.292L25.207,14.499zM24.499,13.792l-1.156-1.156l2.082,0.23L24.499,13.792zM21.791,12.5l-1.292,1.292L19.207,12.5l0.29-0.29l2.253,0.25L21.791,12.5zM14.5,11.791l-0.152-0.152l0.273,0.03L14.5,11.791zM10.5,11.792l-0.65-0.65l1.171,0.129L10.5,11.792zM14.5,21.207l1.205,1.205h-2.409L14.5,21.207zM18.499,21.207l1.206,1.206h-2.412L18.499,21.207zM22.499,21.207l1.208,1.207l-2.414-0.001L22.499,21.207zM23.207,20.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,20.499zM25.207,18.499l1.292-1.291l1.291,1.291l-1.291,1.292L25.207,18.499zM28.499,17.791l-1.291-1.292l1.291-1.291l0.444,0.444l-0.429,2.124L28.499,17.791zM29.001,13.289l-0.502,0.502l-0.658-0.658l1.016,0.112C28.911,13.253,28.956,13.271,29.001,13.289zM13.487,27.994c-0.161,0-0.295-0.132-0.295-0.295c0-0.165,0.134-0.297,0.295-0.297c0.163,0,0.296,0.132,0.296,0.297C13.783,27.862,13.651,27.994,13.487,27.994zM26.81,22.414h-1.517l1.207-1.207l0.93,0.93C27.243,22.306,27.007,22.428,26.81,22.414z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ccw();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ccw = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ccw.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ccw\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Chat();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Chat = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Chat.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Chat\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.985,5.972c-7.563,0-13.695,4.077-13.695,9.106c0,2.877,2.013,5.44,5.147,7.108c-0.446,1.479-1.336,3.117-3.056,4.566c0,0,4.015-0.266,6.851-3.143c0.163,0.04,0.332,0.07,0.497,0.107c-0.155-0.462-0.246-0.943-0.246-1.443c0-3.393,3.776-6.05,8.599-6.05c3.464,0,6.379,1.376,7.751,3.406c1.168-1.34,1.847-2.892,1.847-4.552C29.68,10.049,23.548,5.972,15.985,5.972zM27.68,22.274c0-2.79-3.401-5.053-7.599-5.053c-4.196,0-7.599,2.263-7.599,5.053c0,2.791,3.403,5.053,7.599,5.053c0.929,0,1.814-0.116,2.637-0.319c1.573,1.597,3.801,1.744,3.801,1.744c-0.954-0.804-1.447-1.713-1.695-2.534C26.562,25.293,27.68,23.871,27.68,22.274z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Check();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Check = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Check.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Check\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M2.379,14.729 5.208,11.899 12.958,19.648 25.877,6.733 28.707,9.561 12.958,25.308z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Chrome();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Chrome = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Chrome.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Chrome\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.318,7.677c0.071-0.029,0.148-0.046,0.229-0.046h11.949c-2.533-3.915-6.938-6.506-11.949-6.506c-5.017,0-9.428,2.598-11.959,6.522l4.291,7.431C8.018,11.041,11.274,7.796,15.318,7.677zM28.196,8.84h-8.579c2.165,1.357,3.605,3.763,3.605,6.506c0,1.321-0.334,2.564-0.921,3.649c-0.012,0.071-0.035,0.142-0.073,0.209l-5.973,10.347c7.526-0.368,13.514-6.587,13.514-14.205C29.77,13.002,29.201,10.791,28.196,8.84zM15.547,23.022c-2.761,0-5.181-1.458-6.533-3.646c-0.058-0.046-0.109-0.103-0.149-0.171L2.89,8.855c-1,1.946-1.565,4.153-1.565,6.492c0,7.624,5.999,13.846,13.534,14.205l4.287-7.425C18.073,22.698,16.848,23.022,15.547,23.022zM9.08,15.347c0,1.788,0.723,3.401,1.894,4.573c1.172,1.172,2.785,1.895,4.573,1.895c1.788,0,3.401-0.723,4.573-1.895s1.895-2.785,1.895-4.573c0-1.788-0.723-3.4-1.895-4.573c-1.172-1.171-2.785-1.894-4.573-1.894c-1.788,0-3.401,0.723-4.573,1.894C9.803,11.946,9.081,13.559,9.08,15.347z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Clip();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Clip = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Clip.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Clip\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.898,6.135c-1.571-1.125-3.758-0.764-4.884,0.808l-8.832,12.331c-0.804,1.122-0.546,2.684,0.577,3.488c1.123,0.803,2.684,0.545,3.488-0.578l6.236-8.706l-0.813-0.583l-6.235,8.707h0c-0.483,0.672-1.42,0.828-2.092,0.347c-0.673-0.481-0.827-1.419-0.345-2.093h0l8.831-12.33l0.001-0.001l-0.002-0.001c0.803-1.119,2.369-1.378,3.489-0.576c1.12,0.803,1.379,2.369,0.577,3.489v-0.001l-9.68,13.516l0.001,0.001c-1.124,1.569-3.316,1.931-4.885,0.808c-1.569-1.125-1.93-3.315-0.807-4.885l7.035-9.822l-0.813-0.582l-7.035,9.822c-1.447,2.02-0.982,4.83,1.039,6.277c2.021,1.448,4.831,0.982,6.278-1.037l9.68-13.516C25.83,9.447,25.47,7.261,23.898,6.135z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Clock();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Clock = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Clock.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Clock\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cloud();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cloud = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cloud.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Cloud\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h15.875c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cloud2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cloud2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cloud2.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Cloud2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M7.562,24.812c-3.313,0-6-2.687-6-6l0,0c0.002-2.659,1.734-4.899,4.127-5.684l0,0c0.083-2.26,1.937-4.064,4.216-4.066l0,0c0.73,0,1.415,0.19,2.01,0.517l0,0c1.266-2.105,3.57-3.516,6.208-3.517l0,0c3.947,0.002,7.157,3.155,7.248,7.079l0,0c2.362,0.804,4.062,3.034,4.064,5.671l0,0c0,3.313-2.687,6-6,6l0,0H7.562L7.562,24.812zM24.163,14.887c-0.511-0.095-0.864-0.562-0.815-1.079l0,0c0.017-0.171,0.027-0.336,0.027-0.497l0,0c-0.007-2.899-2.352-5.245-5.251-5.249l0,0c-2.249-0.002-4.162,1.418-4.911,3.41l0,0c-0.122,0.323-0.406,0.564-0.748,0.63l0,0c-0.34,0.066-0.694-0.052-0.927-0.309l0,0c-0.416-0.453-0.986-0.731-1.633-0.731l0,0c-1.225,0.002-2.216,0.993-2.22,2.218l0,0c0,0.136,0.017,0.276,0.045,0.424l0,0c0.049,0.266-0.008,0.54-0.163,0.762l0,0c-0.155,0.223-0.392,0.371-0.657,0.414l0,0c-1.9,0.313-3.352,1.949-3.35,3.931l0,0c0.004,2.209,1.792,3.995,4.001,4.001l0,0h15.874c2.209-0.006,3.994-1.792,3.999-4.001l0,0C27.438,16.854,26.024,15.231,24.163,14.887L24.163,14.887\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.CloudDown();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.CloudDown = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.CloudDown.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.CloudDown\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h3.404l-0.707-0.707c-0.377-0.377-0.585-0.879-0.585-1.413c0-0.533,0.208-1.035,0.585-1.412l0.556-0.557c0.4-0.399,0.937-0.628,1.471-0.628c0.027,0,0.054,0,0.08,0.002v-0.472c0-1.104,0.898-2.002,2-2.002h3.266c1.103,0,2,0.898,2,2.002v0.472c0.027-0.002,0.054-0.002,0.081-0.002c0.533,0,1.07,0.229,1.47,0.63l0.557,0.552c0.78,0.781,0.78,2.05,0,2.828l-0.706,0.707h2.403c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z M21.033,20.986l-0.556-0.555c-0.39-0.389-0.964-0.45-1.276-0.137c-0.312,0.312-0.568,0.118-0.568-0.432v-1.238c0-0.55-0.451-1-1-1h-3.265c-0.55,0-1,0.45-1,1v1.238c0,0.55-0.256,0.744-0.569,0.432c-0.312-0.313-0.887-0.252-1.276,0.137l-0.556,0.555c-0.39,0.389-0.39,1.024-0.001,1.413l4.328,4.331c0.194,0.194,0.451,0.291,0.707,0.291s0.512-0.097,0.707-0.291l4.327-4.331C21.424,22.011,21.423,21.375,21.033,20.986z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.CloudUp();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.CloudUp = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.CloudUp.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.CloudUp\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h2.312c-0.126-0.266-0.2-0.556-0.2-0.859c0-0.535,0.208-1.04,0.587-1.415l4.325-4.329c0.375-0.377,0.877-0.585,1.413-0.585c0.54,0,1.042,0.21,1.417,0.587l4.323,4.329c0.377,0.373,0.585,0.878,0.585,1.413c0,0.304-0.073,0.594-0.2,0.859h1.312c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z M16.706,17.916c-0.193-0.195-0.45-0.291-0.706-0.291s-0.512,0.096-0.707,0.291l-4.327,4.33c-0.39,0.389-0.389,1.025,0.001,1.414l0.556,0.555c0.39,0.389,0.964,0.449,1.276,0.137s0.568-0.119,0.568,0.432v1.238c0,0.549,0.451,1,1,1h3.265c0.551,0,1-0.451,1-1v-1.238c0-0.551,0.256-0.744,0.569-0.432c0.312,0.312,0.887,0.252,1.276-0.137l0.556-0.555c0.39-0.389,0.39-1.025,0.001-1.414L16.706,17.916z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cloudy();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cloudy = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cloudy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Cloudy\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.378,6.781c0.41,0.988,1.938,0.346,1.524-0.648C15.708,5.667,15.515,5.2,15.32,4.734c-0.289-0.695-0.875-3.233-2.042-2.747c-1.03,0.433-0.128,1.846,0.142,2.494C13.739,5.248,14.059,6.015,14.378,6.781M20.8,7.223c1.094,0.453,1.538-1.551,1.813-2.216c0.281-0.677,1.478-2.565,0.357-3.029c-1.092-0.453-1.537,1.548-1.813,2.216C20.876,4.872,19.68,6.757,20.8,7.223M18.137,6.692c1.183,0,0.829-2.019,0.829-2.742c0-0.732,0.383-2.935-0.829-2.935c-1.183,0-0.828,2.019-0.828,2.742C17.309,4.49,16.926,6.692,18.137,6.692M23.058,8.729c0.852,0.85,2.142-0.972,2.659-1.49c0.512-0.513,2.187-1.687,1.352-2.524c-0.834-0.836-2.013,0.843-2.522,1.353C24.028,6.585,22.198,7.874,23.058,8.729M24.565,10.986c0.448,1.091,2.183-0.01,2.849-0.286c0.676-0.28,2.858-0.771,2.394-1.89c-0.455-1.091-2.181,0.008-2.849,0.285C26.281,9.377,24.102,9.866,24.565,10.986M12.036,8.742c0.752,0.75,1.932-0.415,1.17-1.173c-0.253-0.347-0.646-0.645-0.949-0.946c-0.541-0.539-2.162-2.799-3.068-1.889c-0.79,0.791,0.586,1.755,1.083,2.25C10.859,7.57,11.447,8.156,12.036,8.742M29.365,17.397c-0.768-0.317-1.534-0.635-2.302-0.952c-0.646-0.268-2.07-1.169-2.495-0.135c-0.481,1.168,2.054,1.747,2.751,2.035c0.455,0.188,0.911,0.377,1.367,0.565C29.7,19.331,30.379,17.816,29.365,17.397M29.942,12.817c-0.83,0-1.66,0-2.49,0c-0.701,0-2.357-0.288-2.355,0.83c0,1.262,2.567,0.827,3.319,0.827c0.493,0,0.986,0,1.479-0.001C30.99,14.473,31.043,12.815,29.942,12.817M24.234,18.568c-0.673-0.673-1.773,0.189-1.281,1.007c-0.295-0.264-0.614-0.499-0.961-0.69c3.894-2.866,3.328-9.006-1.021-11.107c-2.024-0.978-4.481-0.828-6.368,0.394c-0.871,0.564-1.603,1.336-2.119,2.236c-0.262,0.456-0.468,0.943-0.612,1.449c-0.074,0.258-0.131,0.521-0.172,0.786c-0.083,0.534-0.109,0.553-0.553,0.871c-0.182-0.957-1.64-0.675-2.326-0.674c-0.815,0.001-1.963-0.217-2.752,0.046c-0.867,0.289-0.652,1.615,0.263,1.613c0.324,0.052,0.701-0.001,1.028-0.001c0.904-0.001,1.809-0.002,2.713-0.003c-0.308,0.352-0.496,0.969-0.94,0.77c-0.467-0.209-0.978-0.319-1.49-0.319c-0.951,0-1.877,0.375-2.561,1.036c-0.681,0.658-1.088,1.569-1.123,2.516c-0.944,0.31-1.791,0.891-2.421,1.658c-2.756,3.354-0.265,8.554,4.058,8.554v-0.002c3.597,0,7.194,0,10.792,0c1.341,0,2.843,0.167,4.168-0.113c3.652-0.772,5.361-5.21,3.133-8.229c0.548,0.547,1.096,1.094,1.644,1.641c0.183,0.183,0.364,0.424,0.575,0.574c0.552,0.552,1.524,0.066,1.403-0.713c-0.097-0.622-1.042-1.267-1.448-1.673C25.319,19.652,24.776,19.11,24.234,18.568M18.137,8.787c4.559,0.009,6.576,5.979,2.912,8.734c-0.637-3.505-4.161-5.824-7.629-5.03C13.943,10.367,15.852,8.792,18.137,8.787M22.895,24.08c-0.633,3.346-4.149,2.879-6.68,2.879c-3.017,0-6.033,0-9.049,0c-0.767,0-1.62,0.084-2.373-0.095c-2.274-0.538-3.416-3.242-2.172-5.235c0.678-1.087,1.568-1.19,2.626-1.67c0.604-0.273,0.456-0.807,0.456-1.331c0.002-0.597,0.284-1.169,0.756-1.533c0.787-0.608,1.943-0.497,2.611,0.234c1.098,1.205,1.96-1.346,2.507-1.893c2.025-2.025,5.475-1.708,7.068,0.684c0.344,0.516,0.581,1.102,0.693,1.712c0.097,0.529-0.115,1.341,0.188,1.796c0.291,0.47,0.943,0.463,1.397,0.68c0.508,0.23,0.963,0.591,1.304,1.034C22.834,22.125,23.064,23.107,22.895,24.08M6.906,9.917c0.881,0.364,1.763,0.727,2.644,1.091c0.353,0.146,0.707,0.292,1.06,0.437c0.997,0.412,1.637-1.119,0.642-1.526C10.47,9.441,9.456,9.177,8.609,8.828c-0.354-0.146-0.707-0.292-1.06-0.437C6.554,7.98,5.912,9.505,6.906,9.917\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Code();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Code = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Code.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Code\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M8.982,7.107L0.322,15.77l8.661,8.662l3.15-3.15L6.621,15.77l5.511-5.511L8.982,7.107zM21.657,7.107l-3.148,3.151l5.511,5.511l-5.511,5.511l3.148,3.15l8.662-8.662L21.657,7.107z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.CodeTalk();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.CodeTalk = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.CodeTalk.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.CodeTalk\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM13.704,19.47l-2.338,2.336l-6.43-6.431l6.429-6.432l2.339,2.341l-4.091,4.091L13.704,19.47zM20.775,21.803l-2.337-2.339l4.092-4.09l-4.092-4.092l2.337-2.339l6.43,6.426L20.775,21.803z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.CommandLine();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.CommandLine = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.CommandLine.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.CommandLine\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M2.021,9.748L2.021,9.748V9.746V9.748zM2.022,9.746l5.771,5.773l-5.772,5.771l2.122,2.123l7.894-7.895L4.143,7.623L2.022,9.746zM12.248,23.269h14.419V20.27H12.248V23.269zM16.583,17.019h10.084V14.02H16.583V17.019zM12.248,7.769v3.001h14.419V7.769H12.248z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Connect();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Connect = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Connect.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Connect\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.06,13.719c-0.944-5.172-5.461-9.094-10.903-9.094v4c3.917,0.006,7.085,3.176,7.094,7.094c-0.009,3.917-3.177,7.085-7.094,7.093v4.002c5.442-0.004,9.959-3.926,10.903-9.096h4.69v-3.999H25.06zM20.375,15.719c0-3.435-2.784-6.219-6.219-6.219c-2.733,0-5.05,1.766-5.884,4.218H1.438v4.001h6.834c0.833,2.452,3.15,4.219,5.884,4.219C17.591,21.938,20.375,19.153,20.375,15.719z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Contract();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Contract = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Contract.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Contract\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.083,18.895l-8.428-2.259l2.258,8.428l1.838-1.837l7.053,7.053l2.476-2.476l-7.053-7.053L25.083,18.895zM5.542,11.731l8.428,2.258l-2.258-8.428L9.874,7.398L3.196,0.72L0.72,3.196l6.678,6.678L5.542,11.731zM7.589,20.935l-6.87,6.869l2.476,2.476l6.869-6.869l1.858,1.857l2.258-8.428l-8.428,2.258L7.589,20.935zM23.412,10.064l6.867-6.87l-2.476-2.476l-6.868,6.869l-1.856-1.856l-2.258,8.428l8.428-2.259L23.412,10.064z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Crop();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Crop = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Crop.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Crop\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.303,21.707V8.275l4.48-4.421l-2.021-2.048l-4.126,4.07H8.761V2.083H5.882v3.793H1.8v2.877h4.083v15.832h15.542v4.609h2.878v-4.609H29.2v-2.878H24.303zM19.72,8.753L8.761,19.565V8.753H19.72zM10.688,21.706l10.735-10.591l0.001,10.592L10.688,21.706z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cross();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cross = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cross.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Cross\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cube();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cube = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cube.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Cube\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,3.029l-10.8,6.235L4.7,21.735L15.5,27.971l10.8-6.235V9.265L15.5,3.029zM24.988,10.599L16,15.789v10.378c0,0.275-0.225,0.5-0.5,0.5s-0.5-0.225-0.5-0.5V15.786l-8.987-5.188c-0.239-0.138-0.321-0.444-0.183-0.683c0.138-0.238,0.444-0.321,0.683-0.183l8.988,5.189l8.988-5.189c0.238-0.138,0.545-0.055,0.684,0.184C25.309,10.155,25.227,10.461,24.988,10.599z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Customer();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Customer = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Customer.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Customer\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h12.036l0.878-3.459l-0.781-0.781l1.344-1.344l1.344,1.344l-0.781,0.781l0.879,3.459h12.035C28.977,26.709,29.039,24.332,28.523,23.813z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Db();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Db = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Db.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Db\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.499,23.438c-3.846,0-7.708-0.987-9.534-3.117c-0.054,0.236-0.09,0.48-0.09,0.737v3.877c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998v-3.877c0-0.258-0.036-0.501-0.09-0.737C23.209,22.451,19.347,23.438,15.499,23.438zM15.499,15.943c-3.846,0-7.708-0.987-9.533-3.117c-0.054,0.236-0.091,0.479-0.091,0.736v3.877c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998v-3.877c0-0.257-0.036-0.501-0.09-0.737C23.209,14.956,19.347,15.943,15.499,15.943zM15.5,1.066c-4.637,0-9.625,1.565-9.625,5.001v3.876c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998V6.067C25.125,2.632,20.137,1.066,15.5,1.066zM15.5,9.066c-4.211,0-7.625-1.343-7.625-3c0-1.656,3.414-3,7.625-3s7.625,1.344,7.625,3C23.125,7.724,19.711,9.066,15.5,9.066z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Detour();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Detour = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Detour.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Detour\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.342,15.5l-7.556-4.363v2.614H18.75c-1.441-0.004-2.423,1.002-2.875,1.784c-0.735,1.222-1.056,2.561-1.441,3.522c-0.135,0.361-0.278,0.655-0.376,0.817c-1.626,0-0.998,0-2.768,0c-0.213-0.398-0.571-1.557-0.923-2.692c-0.237-0.676-0.5-1.381-1.013-2.071C8.878,14.43,7.89,13.726,6.75,13.75H2.812v3.499c0,0,0.358,0,1.031,0h2.741c0.008,0.013,0.018,0.028,0.029,0.046c0.291,0.401,0.634,1.663,1.031,2.888c0.218,0.623,0.455,1.262,0.92,1.897c0.417,0.614,1.319,1.293,2.383,1.293H11c2.25,0,1.249,0,3.374,0c0.696,0.01,1.371-0.286,1.809-0.657c1.439-1.338,1.608-2.886,2.13-4.127c0.218-0.608,0.453-1.115,0.605-1.314c0.006-0.01,0.012-0.018,0.018-0.025h2.85v2.614L29.342,15.5zM10.173,14.539c0.568,0.76,0.874,1.559,1.137,2.311c0.04,0.128,0.082,0.264,0.125,0.399h2.58c0.246-0.697,0.553-1.479,1.005-2.228c0.252-0.438,0.621-0.887,1.08-1.272H9.43C9.735,14.003,9.99,14.277,10.173,14.539z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Diagram();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Diagram = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Diagram.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Diagram\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super({width: 50, height: 50, ...attr}, setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M6.812,17.202l7.396-3.665v-2.164h-0.834c-0.414,0-0.808-0.084-1.167-0.237v1.159l-7.396,3.667v2.912h2V17.202zM26.561,18.875v-2.913l-7.396-3.666v-1.158c-0.358,0.152-0.753,0.236-1.166,0.236h-0.832l-0.001,2.164l7.396,3.666v1.672H26.561zM16.688,18.875v-7.501h-2v7.501H16.688zM27.875,19.875H23.25c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2h4.625c1.104,0,2-0.896,2-2v-4.625C29.875,20.771,28.979,19.875,27.875,19.875zM8.125,19.875H3.5c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2h4.625c1.104,0,2-0.896,2-2v-4.625C10.125,20.771,9.229,19.875,8.125,19.875zM13.375,10.375H18c1.104,0,2-0.896,2-2V3.75c0-1.104-0.896-2-2-2h-4.625c-1.104,0-2,0.896-2,2v4.625C11.375,9.479,12.271,10.375,13.375,10.375zM18,19.875h-4.625c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2H18c1.104,0,2-0.896,2-2v-4.625C20,20.771,19.104,19.875,18,19.875z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Disconnect();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Disconnect = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Disconnect.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Disconnect\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M9.219,9.5c-2.733,0-5.05,1.766-5.884,4.218H1.438v4.001h1.897c0.833,2.452,3.15,4.219,5.884,4.219c3.435,0,6.219-2.784,6.219-6.219S12.653,9.5,9.219,9.5zM27.685,13.719c-0.944-5.172-5.461-9.094-10.903-9.094v4c3.917,0.006,7.085,3.176,7.094,7.094c-0.009,3.917-3.177,7.085-7.094,7.093v4.002c5.442-0.004,9.959-3.926,10.903-9.096h2.065v-3.999H27.685z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.DockBottom();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.DockBottom = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.DockBottom.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.DockBottom\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M3.083,7.333v16.334h24.833V7.333H3.083zM24.915,16.833H6.083v-6.501h18.833L24.915,16.833L24.915,16.833z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.DockLeft();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.DockLeft = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.DockLeft.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.DockLeft\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M3.084,7.333v16.334h24.832V7.333H3.084z M11.667,10.332h13.251v10.336H11.667V10.332z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.DockRight();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.DockRight = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.DockRight.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.DockRight\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M3.083,7.333v16.334h24.833V7.333H3.083z M19.333,20.668H6.083V10.332h13.25V20.668z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.DockTop();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.DockTop = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.DockTop.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.DockTop\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.916,23.667V7.333H3.083v16.334H27.916zM24.915,20.668H6.083v-6.501h18.833L24.915,20.668L24.915,20.668z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Download();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Download = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Download.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Download\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM16,28.792c-1.549,0-2.806-1.256-2.806-2.806s1.256-2.806,2.806-2.806c1.55,0,2.806,1.256,2.806,2.806S17.55,28.792,16,28.792zM16,21.087l-7.858-6.562h3.469V5.747h8.779v8.778h3.468L16,21.087z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Dry();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Dry = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Dry.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Dry\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.784,26.991c0,1.238-1.329,1.696-1.835,1.696c-0.504,0-1.536-0.413-1.65-1.812c0-0.354-0.288-0.642-0.644-0.642c-0.354,0-0.641,0.287-0.641,0.642c0.045,1.056,0.756,3.052,2.935,3.052c2.432,0,3.166-1.882,3.166-3.144v-8.176l-1.328-0.024C14.787,18.584,14.784,25.889,14.784,26.991zM15.584,9.804c-6.807,0-11.084,4.859-11.587,8.326c0.636-0.913,1.694-1.51,2.89-1.51c1.197,0,2.22,0.582,2.855,1.495c0.638-0.904,1.69-1.495,2.88-1.495c1.2,0,2.26,0.6,2.896,1.517c0.635-0.917,1.83-1.517,3.03-1.517c1.19,0,2.241,0.591,2.879,1.495c0.636-0.913,1.659-1.495,2.855-1.495c1.197,0,2.254,0.597,2.89,1.51C26.669,14.663,22.393,9.804,15.584,9.804zM14.733,7.125v2.081h1.323V7.125c0-0.365-0.296-0.661-0.661-0.661C15.029,6.464,14.733,6.76,14.733,7.125zM7.562,6.015c0.54,0.312,1.229,0.128,1.54-0.412c0.109-0.189,0.157-0.398,0.15-0.602L9.251,3.09L7.59,4.047c-0.178,0.095-0.333,0.24-0.441,0.428C6.837,5.015,7.022,5.703,7.562,6.015zM5.572,11.717c0.109-0.19,0.158-0.398,0.151-0.602L5.721,9.203l-1.66,0.957c-0.178,0.096-0.333,0.241-0.441,0.429c-0.311,0.539-0.127,1.229,0.413,1.539C4.571,12.44,5.26,12.256,5.572,11.717zM10.523,9.355c0.539,0.312,1.229,0.126,1.541-0.412c0.109-0.189,0.156-0.398,0.15-0.603L12.214,6.43l-1.662,0.956c-0.177,0.097-0.332,0.241-0.441,0.43C9.799,8.354,9.984,9.044,10.523,9.355zM15.251,3.998c0.539,0.312,1.229,0.126,1.54-0.412c0.11-0.19,0.157-0.398,0.15-0.603L16.94,1.072l-1.661,0.956c-0.178,0.097-0.332,0.242-0.441,0.43C14.526,2.998,14.711,3.687,15.251,3.998zM19.348,8.914c0.539,0.312,1.228,0.128,1.541-0.412c0.109-0.189,0.156-0.398,0.149-0.602h-0.001V5.988l-1.661,0.957c-0.178,0.096-0.332,0.241-0.441,0.429C18.623,7.914,18.809,8.603,19.348,8.914zM23.633,5.196c0.54,0.312,1.23,0.126,1.542-0.413c0.109-0.189,0.156-0.398,0.149-0.602h-0.001V2.27l-1.662,0.957c-0.177,0.096-0.331,0.24-0.44,0.43C22.909,4.195,23.094,4.885,23.633,5.196zM27.528,8.51l-1.659,0.956c-0.18,0.097-0.334,0.242-0.443,0.43c-0.312,0.539-0.127,1.229,0.413,1.54c0.539,0.312,1.229,0.127,1.541-0.412c0.109-0.19,0.158-0.398,0.151-0.603L27.528,8.51z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Employee();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Employee = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Employee.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Employee\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h26.954C28.977,26.709,29.039,24.332,28.523,23.813zM22.188,26.062h-4.562v-1.25h4.562V26.062z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.End();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.End = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.End.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.End\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.167,5.5,21.167,13.681,6.684,5.318,6.684,25.682,21.167,17.318,21.167,25.5,25.5,25.5,25.5,5.5z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ethernet();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ethernet = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ethernet.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ethernet\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.5,8.5v3.168l3.832,3.832L22.5,19.332V22.5l7-7L22.5,8.5zM8.5,22.5v-3.168L4.667,15.5L8.5,11.668V8.5l-7,7L8.5,22.5zM15.5,14.101c-0.928,0-1.68,0.751-1.68,1.68c0,0.927,0.752,1.681,1.68,1.681c0.927,0,1.68-0.754,1.68-1.681C17.18,14.852,16.427,14.101,15.5,14.101zM10.46,14.101c-0.928,0-1.68,0.751-1.68,1.68c0,0.927,0.752,1.681,1.68,1.681s1.68-0.754,1.68-1.681C12.14,14.852,11.388,14.101,10.46,14.101zM20.541,14.101c-0.928,0-1.682,0.751-1.682,1.68c0,0.927,0.754,1.681,1.682,1.681s1.68-0.754,1.68-1.681C22.221,14.852,21.469,14.101,20.541,14.101z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Exchange();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Exchange = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Exchange.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Exchange\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.786,12.876l7.556-4.363l-7.556-4.363v2.598H2.813v3.5h18.973V12.876zM10.368,18.124l-7.556,4.362l7.556,4.362V24.25h18.974v-3.501H10.368V18.124z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Expand();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Expand = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Expand.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Expand\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.545,23.328,17.918,15.623,25.534,8.007,27.391,9.864,29.649,1.436,21.222,3.694,23.058,5.53,15.455,13.134,7.942,5.543,9.809,3.696,1.393,1.394,3.608,9.833,5.456,8.005,12.98,15.608,5.465,23.123,3.609,21.268,1.351,29.695,9.779,27.438,7.941,25.6,15.443,18.098,23.057,25.791,21.19,27.638,29.606,29.939,27.393,21.5z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Export();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Export = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Export.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Export\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.086,20.904c-1.805,3.113-5.163,5.212-9.023,5.219c-5.766-0.01-10.427-4.672-10.438-10.435C4.636,9.922,9.297,5.261,15.063,5.25c3.859,0.007,7.216,2.105,9.022,5.218l3.962,2.284l0.143,0.082C26.879,6.784,21.504,2.25,15.063,2.248C7.64,2.25,1.625,8.265,1.624,15.688c0.002,7.42,6.017,13.435,13.439,13.437c6.442-0.002,11.819-4.538,13.127-10.589l-0.141,0.081L24.086,20.904zM28.4,15.688l-7.15-4.129v2.297H10.275v3.661H21.25v2.297L28.4,15.688z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Fave();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Fave = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Fave.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Fave\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Feed();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Feed = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Feed.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Feed\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.135,16.762c3.078,0,5.972,1.205,8.146,3.391c2.179,2.187,3.377,5.101,3.377,8.202h4.745c0-9.008-7.299-16.335-16.269-16.335V16.762zM4.141,8.354c10.973,0,19.898,8.975,19.898,20.006h4.743c0-13.646-11.054-24.749-24.642-24.749V8.354zM10.701,25.045c0,1.815-1.471,3.287-3.285,3.287s-3.285-1.472-3.285-3.287c0-1.813,1.471-3.285,3.285-3.285S10.701,23.231,10.701,25.045z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ff();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ff = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ff.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Ff\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.5,15.5,15.2,9.552,15.2,15.153,5.5,9.552,5.5,21.447,15.2,15.847,15.2,21.447z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Firefox();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Firefox = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Firefox.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Firefox\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.4,22.469c0.479-0.964,0.851-1.991,1.095-3.066c0.953-3.661,0.666-6.854,0.666-6.854l-0.327,2.104c0,0-0.469-3.896-1.044-5.353c-0.881-2.231-1.273-2.214-1.274-2.21c0.542,1.379,0.494,2.169,0.483,2.288c-0.01-0.016-0.019-0.032-0.027-0.047c-0.131-0.324-0.797-1.819-2.225-2.878c-2.502-2.481-5.943-4.014-9.745-4.015c-4.056,0-7.705,1.745-10.238,4.525C5.444,6.5,5.183,5.938,5.159,5.317c0,0-0.002,0.002-0.006,0.005c0-0.011-0.003-0.021-0.003-0.031c0,0-1.61,1.247-1.436,4.612c-0.299,0.574-0.56,1.172-0.777,1.791c-0.375,0.817-0.75,2.004-1.059,3.746c0,0,0.133-0.422,0.399-0.988c-0.064,0.482-0.103,0.971-0.116,1.467c-0.09,0.845-0.118,1.865-0.039,3.088c0,0,0.032-0.406,0.136-1.021c0.834,6.854,6.667,12.165,13.743,12.165l0,0c1.86,0,3.636-0.37,5.256-1.036C24.938,27.771,27.116,25.196,28.4,22.469zM16.002,3.356c2.446,0,4.73,0.68,6.68,1.86c-2.274-0.528-3.433-0.261-3.423-0.248c0.013,0.015,3.384,0.589,3.981,1.411c0,0-1.431,0-2.856,0.41c-0.065,0.019,5.242,0.663,6.327,5.966c0,0-0.582-1.213-1.301-1.42c0.473,1.439,0.351,4.17-0.1,5.528c-0.058,0.174-0.118-0.755-1.004-1.155c0.284,2.037-0.018,5.268-1.432,6.158c-0.109,0.07,0.887-3.189,0.201-1.93c-4.093,6.276-8.959,2.539-10.934,1.208c1.585,0.388,3.267,0.108,4.242-0.559c0.982-0.672,1.564-1.162,2.087-1.047c0.522,0.117,0.87-0.407,0.464-0.872c-0.405-0.466-1.392-1.105-2.725-0.757c-0.94,0.247-2.107,1.287-3.886,0.233c-1.518-0.899-1.507-1.63-1.507-2.095c0-0.366,0.257-0.88,0.734-1.028c0.58,0.062,1.044,0.214,1.537,0.466c0.005-0.135,0.006-0.315-0.001-0.519c0.039-0.077,0.015-0.311-0.047-0.596c-0.036-0.287-0.097-0.582-0.19-0.851c0.01-0.002,0.017-0.007,0.021-0.021c0.076-0.344,2.147-1.544,2.299-1.659c0.153-0.114,0.55-0.378,0.506-1.183c-0.015-0.265-0.058-0.294-2.232-0.286c-0.917,0.003-1.425-0.894-1.589-1.245c0.222-1.231,0.863-2.11,1.919-2.704c0.02-0.011,0.015-0.021-0.008-0.027c0.219-0.127-2.524-0.006-3.76,1.604C9.674,8.045,9.219,7.95,8.71,7.95c-0.638,0-1.139,0.07-1.603,0.187c-0.05,0.013-0.122,0.011-0.208-0.001C6.769,8.04,6.575,7.88,6.365,7.672c0.161-0.18,0.324-0.356,0.495-0.526C9.201,4.804,12.43,3.357,16.002,3.356z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Flag();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Flag = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Flag.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Flag\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.04,9.508c0.138-0.533,0.15-1.407,0.028-1.943l-0.404-1.771c-0.122-0.536-0.665-1.052-1.207-1.146l-3.723-0.643c-0.542-0.094-1.429-0.091-1.97,0.007l-4.033,0.726c-0.542,0.098-1.429,0.108-1.973,0.023L8.812,4.146C8.817,4.165,8.826,4.182,8.83,4.201l2.701,12.831l1.236,0.214c0.542,0.094,1.428,0.09,1.97-0.007l4.032-0.727c0.541-0.097,1.429-0.107,1.973-0.022l4.329,0.675c0.544,0.085,0.906-0.288,0.807-0.829l-0.485-2.625c-0.1-0.541-0.069-1.419,0.068-1.952L26.04,9.508zM6.667,3.636C6.126,3.75,5.78,4.279,5.894,4.819l5.763,27.378H13.7L7.852,4.409C7.736,3.867,7.207,3.521,6.667,3.636z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Flickr();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Flickr = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Flickr.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Flickr\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.77,8.895c-2.379,0-4.479,1.174-5.77,2.969c-1.289-1.795-3.39-2.969-5.77-2.969c-3.924,0-7.105,3.181-7.105,7.105c0,3.924,3.181,7.105,7.105,7.105c2.379,0,4.48-1.175,5.77-2.97c1.29,1.795,3.391,2.97,5.77,2.97c3.925,0,7.105-3.182,7.105-7.105C28.875,12.075,25.694,8.895,21.77,8.895zM21.769,21.822c-3.211,0-5.821-2.61-5.821-5.821c0-3.213,2.61-5.824,5.821-5.824c3.213,0,5.824,2.611,5.824,5.824C27.593,19.212,24.981,21.822,21.769,21.822z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Folder();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Folder = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Folder.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Folder\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.625,26.75h-26.5V8.375h1.124c1.751,0,0.748-3.125,3-3.125c3.215,0,1.912,0,5.126,0c2.251,0,1.251,3.125,3.001,3.125h14.25V26.75z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Font();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Font = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Font.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Font\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.255,19.327l-1.017,0.131c-0.609,0.081-1.067,0.208-1.375,0.382c-0.521,0.293-0.779,0.76-0.779,1.398c0,0.484,0.178,0.867,0.532,1.146c0.354,0.28,0.774,0.421,1.262,0.421c0.593,0,1.164-0.138,1.72-0.412c0.938-0.453,1.4-1.188,1.4-2.229v-1.354c-0.205,0.131-0.469,0.229-0.792,0.328C22.883,19.229,22.564,19.29,22.255,19.327zM8.036,18.273h4.309l-2.113-6.063L8.036,18.273zM28.167,7.75H3.168c-0.552,0-1,0.448-1,1v16.583c0,0.553,0.448,1,1,1h24.999c0.554,0,1-0.447,1-1V8.75C29.167,8.198,28.721,7.75,28.167,7.75zM14.305,23.896l-1.433-4.109H7.488L6,23.896H4.094L9.262,10.17h2.099l4.981,13.727H14.305L14.305,23.896zM26.792,23.943c-0.263,0.074-0.461,0.121-0.599,0.141c-0.137,0.02-0.323,0.027-0.562,0.027c-0.579,0-0.999-0.204-1.261-0.615c-0.138-0.219-0.231-0.525-0.29-0.926c-0.344,0.449-0.834,0.839-1.477,1.169c-0.646,0.329-1.354,0.493-2.121,0.493c-0.928,0-1.688-0.28-2.273-0.844c-0.589-0.562-0.884-1.271-0.884-2.113c0-0.928,0.29-1.646,0.868-2.155c0.578-0.511,1.34-0.824,2.279-0.942l2.682-0.336c0.388-0.05,0.646-0.211,0.775-0.484c0.063-0.146,0.104-0.354,0.104-0.646c0-0.575-0.203-0.993-0.604-1.252c-0.408-0.26-0.99-0.389-1.748-0.389c-0.877,0-1.5,0.238-1.865,0.713c-0.205,0.263-0.34,0.654-0.399,1.174H17.85c0.031-1.237,0.438-2.097,1.199-2.582c0.77-0.484,1.659-0.726,2.674-0.726c1.176,0,2.131,0.225,2.864,0.673c0.729,0.448,1.093,1.146,1.093,2.093v5.766c0,0.176,0.035,0.313,0.106,0.422c0.071,0.104,0.223,0.156,0.452,0.156c0.076,0,0.16-0.005,0.254-0.015c0.093-0.011,0.191-0.021,0.299-0.041L26.792,23.943L26.792,23.943z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Fork();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Fork = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Fork.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Fork\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M13.741,10.249h8.045v2.627l7.556-4.363l-7.556-4.363v2.598H9.826C11.369,7.612,12.616,8.922,13.741,10.249zM21.786,20.654c-0.618-0.195-1.407-0.703-2.291-1.587c-1.79-1.756-3.712-4.675-5.731-7.227c-2.049-2.486-4.159-4.972-7.451-5.091h-3.5v3.5h3.5c0.656-0.027,1.683,0.486,2.879,1.683c1.788,1.753,3.712,4.674,5.731,7.226c1.921,2.331,3.907,4.639,6.863,5.016v2.702l7.556-4.362l-7.556-4.362V20.654z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ForkAlt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ForkAlt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ForkAlt.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.ForkAlt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.786,12.873l7.556-4.361l-7.556-4.362v2.701c-2.929,0.374-4.905,2.64-6.809,4.952c0.545,0.703,1.08,1.418,1.604,2.127c0.192,0.26,0.383,0.514,0.573,0.77c0.802-1.043,1.584-1.999,2.341-2.74c0.884-0.885,1.673-1.393,2.291-1.588V12.873zM17.661,17.006c-1.893-2.371-3.815-5.354-6.009-7.537c-1.461-1.428-3.155-2.664-5.34-2.693h-3.5v3.5h3.5c0.971-0.119,2.845,1.333,4.712,3.771c1.895,2.371,3.815,5.354,6.011,7.537c1.326,1.297,2.847,2.426,4.751,2.645v2.646l7.556-4.363l-7.556-4.362v2.535C20.746,20.346,19.205,19.022,17.661,17.006z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.FullCube();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.FullCube = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.FullCube.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.FullCube\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,3.029l-10.8,6.235L4.7,21.735L15.5,27.971l10.8-6.235V9.265L15.5,3.029zM15.5,7.029l6.327,3.652L15.5,14.334l-6.326-3.652L15.5,7.029zM24.988,10.599L16,15.789v10.378c0,0.275-0.225,0.5-0.5,0.5s-0.5-0.225-0.5-0.5V15.786l-8.987-5.188c-0.239-0.138-0.321-0.444-0.183-0.683c0.138-0.238,0.444-0.321,0.683-0.183l8.988,5.189l8.988-5.189c0.238-0.138,0.545-0.055,0.684,0.184C25.309,10.155,25.227,10.461,24.988,10.599z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Future();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Future = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Future.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Future\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M17.001,15.5l-0.5-7.876c0-0.552-0.448-1-1-1c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.89-0.365,1.365c0.275,0.479,0.889,0.644,1.365,0.367l3.305-1.677C15.39,16.99,15.444,17,15.501,17C16.329,17,17.001,16.329,17.001,15.5zM18.939,21.455c-0.479,0.277-0.644,0.889-0.366,1.367c0.274,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.89,0.365-1.365C20.027,21.344,19.417,21.18,18.939,21.455zM19.938,7.813c-0.477-0.276-1.09-0.111-1.364,0.366c-0.275,0.48-0.111,1.091,0.366,1.367c0.477,0.276,1.088,0.112,1.365-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM21.823,20.305c0.477,0.274,1.089,0.112,1.364-0.365c0.276-0.479,0.112-1.092-0.364-1.367c-0.48-0.275-1.093-0.111-1.367,0.365C21.182,19.416,21.344,20.029,21.823,20.305zM22.822,12.428c0.478-0.275,0.643-0.888,0.365-1.366c-0.274-0.478-0.89-0.642-1.365-0.366c-0.479,0.278-0.643,0.89-0.366,1.367S22.344,12.705,22.822,12.428zM24.378,15.5c0-0.551-0.448-1-1-1c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1C23.93,16.5,24.378,16.053,24.378,15.5zM9.546,12.062c0.275-0.478,0.111-1.089-0.366-1.366c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366C8.658,12.704,9.269,12.541,9.546,12.062zM6.624,15.5c0,0.553,0.449,1,1,1c0.552,0,1-0.447,1.001-1c-0.001-0.552-0.448-0.999-1.001-1C7.071,14.5,6.624,14.948,6.624,15.5zM9.179,20.305c0.479-0.275,0.643-0.888,0.367-1.367c-0.276-0.477-0.888-0.641-1.367-0.365c-0.478,0.277-0.642,0.889-0.365,1.367C8.089,20.418,8.703,20.58,9.179,20.305zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM14.501,23.377c0,0.553,0.448,1,1,1c0.552,0,1-0.447,1-1s-0.448-1-1-1C14.949,22.377,14.501,22.824,14.501,23.377zM10.696,21.822c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.276,1.091,0.11,1.365-0.365c0.277-0.479,0.113-1.09-0.365-1.367C11.584,21.18,10.973,21.344,10.696,21.822zM28.674,14.087l-3.27-1.186c0.291,1.105,0.41,2.274,0.309,3.478c-0.492,5.639-5.449,9.809-11.091,9.333c-5.639-0.495-9.809-5.45-9.333-11.09c0.494-5.641,5.449-9.812,11.089-9.335c2.428,0.212,4.567,1.266,6.194,2.833l-1.637,1.377l7.031,2.548l-1.309-7.364l-1.771,1.492c-2.133-2.151-4.996-3.597-8.25-3.877C9.346,1.67,2.926,7.072,2.297,14.364c-0.625,7.291,4.777,13.71,12.066,14.339c7.293,0.625,13.713-4.776,14.342-12.066C28.779,15.771,28.762,14.919,28.674,14.087z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.GRaphael();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.GRaphael = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.GRaphael.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.GRaphael\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.833,15.709c0-1.477-0.574-2.862-1.617-3.904l-7.002-7.001l-0.003,0.002c-1.027-1.03-2.445-1.62-3.9-1.62c-1.455,0-2.871,0.59-3.9,1.621l-0.002-0.002l-7,7C4.376,12.836,3.79,14.25,3.79,15.709s0.586,2.873,1.619,3.902l6.312,6.312c0.253,0.285,0.519,0.556,0.8,0.8c1.049,0.989,2.463,1.534,3.908,1.51c1.417-0.021,2.783-0.604,3.785-1.604l6.812-6.812c0.021-0.021,0.035-0.029,0.062-0.062l0.143-0.146c0.271-0.271,0.484-0.562,0.725-0.86l-0.012-0.002C28.516,17.85,28.833,16.805,28.833,15.709zM18.77,25.17c-1.121,1.119-2.917,1.336-4.271,0.514l0.002-0.002c-0.213-0.145-0.414-0.303-0.61-0.471c-0.016-0.016-7.04-7.041-7.04-7.041c-1.34-1.34-1.342-3.584,0-4.92l7-6.998c1.121-1.121,2.908-1.338,4.259-0.512v0.002c0.213,0.141,0.414,0.299,0.604,0.467c0.021,0.016,7.053,7.043,7.053,7.043c0.396,0.388,0.655,0.852,0.818,1.348l-2.607,0.006c-0.537-3.754-3.769-6.641-7.667-6.641c-4.277,0-7.744,3.468-7.745,7.746c0.001,4.277,3.468,7.744,7.745,7.744c3.917,0,7.156-2.91,7.668-6.688l2.638-0.021c-0.16,0.521-0.441,1.02-0.849,1.412L18.77,25.17zM16.312,16.789c0.002,0,0.002,0,0.004,0l5.476-0.02c-0.5,2.562-2.76,4.518-5.48,4.521c-3.084-0.004-5.578-2.5-5.584-5.582c0.006-3.084,2.5-5.58,5.584-5.584c2.708,0.004,4.959,1.929,5.472,4.484l-5.476,0.018c-0.596,0.002-1.078,0.488-1.076,1.084C15.233,16.308,15.715,16.789,16.312,16.789z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Gear();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Gear = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Gear.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Gear\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.974,16.514l3.765-1.991c-0.074-0.738-0.217-1.454-0.396-2.157l-4.182-0.579c-0.362-0.872-0.84-1.681-1.402-2.423l1.594-3.921c-0.524-0.511-1.09-0.977-1.686-1.406l-3.551,2.229c-0.833-0.438-1.73-0.77-2.672-0.984l-1.283-3.976c-0.364-0.027-0.728-0.056-1.099-0.056s-0.734,0.028-1.099,0.056l-1.271,3.941c-0.967,0.207-1.884,0.543-2.738,0.986L7.458,4.037C6.863,4.466,6.297,4.932,5.773,5.443l1.55,3.812c-0.604,0.775-1.11,1.629-1.49,2.55l-4.05,0.56c-0.178,0.703-0.322,1.418-0.395,2.157l3.635,1.923c0.041,1.013,0.209,1.994,0.506,2.918l-2.742,3.032c0.319,0.661,0.674,1.303,1.085,1.905l4.037-0.867c0.662,0.72,1.416,1.351,2.248,1.873l-0.153,4.131c0.663,0.299,1.352,0.549,2.062,0.749l2.554-3.283C15.073,26.961,15.532,27,16,27c0.507,0,1.003-0.046,1.491-0.113l2.567,3.301c0.711-0.2,1.399-0.45,2.062-0.749l-0.156-4.205c0.793-0.513,1.512-1.127,2.146-1.821l4.142,0.889c0.411-0.602,0.766-1.243,1.085-1.905l-2.831-3.131C26.778,18.391,26.93,17.467,26.974,16.514zM20.717,21.297l-1.785,1.162l-1.098-1.687c-0.571,0.22-1.186,0.353-1.834,0.353c-2.831,0-5.125-2.295-5.125-5.125c0-2.831,2.294-5.125,5.125-5.125c2.83,0,5.125,2.294,5.125,5.125c0,1.414-0.573,2.693-1.499,3.621L20.717,21.297z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Gear2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Gear2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Gear2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Gear2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M17.047,27.945c-0.34,0.032-0.688,0.054-1.046,0.054l0,0c-0.32,0-0.631-0.017-0.934-0.043l0,0l-2.626,3.375l-0.646-0.183c-0.758-0.213-1.494-0.48-2.202-0.8l0,0L8.979,30.07l0.158-4.24c-0.558-0.39-1.079-0.825-1.561-1.302l0,0L3.424,25.42l-0.379-0.557c-0.445-0.654-0.824-1.339-1.16-2.032l0,0l-0.292-0.605l2.819-3.12c-0.176-0.661-0.293-1.343-0.353-2.038l0,0l-3.736-1.975l0.068-0.669c0.08-0.801,0.235-1.567,0.42-2.303l0,0l0.165-0.653l4.167-0.577c0.297-0.627,0.647-1.221,1.041-1.78l0,0l-1.59-3.914l0.48-0.47c0.564-0.55,1.168-1.048,1.798-1.503l0,0l0.546-0.394l3.597,2.259c0.606-0.279,1.24-0.509,1.897-0.685l0,0l1.304-4.046l0.672-0.051c0.362-0.027,0.751-0.058,1.174-0.058l0,0c0.422,0,0.81,0.031,1.172,0.058l0,0l0.672,0.051l1.318,4.088c0.632,0.176,1.244,0.401,1.831,0.674l0,0l3.647-2.291l0.548,0.394c0.63,0.455,1.235,0.954,1.798,1.501l0,0l0.482,0.47l-1.639,4.031c0.357,0.519,0.679,1.068,0.954,1.646l0,0l4.297,0.595l0.167,0.653c0.188,0.735,0.342,1.501,0.42,2.303l0,0l0.068,0.669l-3.866,2.044c-0.058,0.634-0.161,1.258-0.315,1.866l0,0l2.913,3.218l-0.293,0.608c-0.335,0.695-0.712,1.382-1.159,2.034l0,0l-0.379,0.555l-4.255-0.912c-0.451,0.451-0.939,0.866-1.461,1.241l0,0l0.162,4.323l-0.615,0.278c-0.709,0.319-1.444,0.587-2.202,0.8l0,0l-0.648,0.183L17.047,27.945L17.047,27.945zM20.424,29.028c0.227-0.076,0.45-0.157,0.671-0.244l0,0l-0.152-4.083l0.479-0.307c0.717-0.466,1.37-1.024,1.95-1.658l0,0l0.386-0.423l4.026,0.862c0.121-0.202,0.238-0.409,0.351-0.62l0,0l-2.754-3.045l0.171-0.544c0.243-0.783,0.381-1.623,0.422-2.5l0,0l0.025-0.571l3.658-1.933c-0.038-0.234-0.082-0.467-0.132-0.7l0,0l-4.07-0.563l-0.219-0.527c-0.327-0.787-0.76-1.524-1.277-2.204l0,0l-0.342-0.453l1.548-3.808c-0.179-0.157-0.363-0.31-0.552-0.458l0,0l-3.455,2.169L20.649,7.15c-0.754-0.397-1.569-0.698-2.429-0.894l0,0l-0.556-0.127l-1.248-3.87c-0.121-0.006-0.239-0.009-0.354-0.009l0,0c-0.117,0-0.235,0.003-0.357,0.009l0,0l-1.239,3.845l-0.564,0.12c-0.875,0.188-1.709,0.494-2.486,0.896l0,0l-0.508,0.264L7.509,5.249c-0.188,0.148-0.372,0.301-0.55,0.458l0,0l1.507,3.708L8.112,9.869c-0.552,0.709-1.011,1.485-1.355,2.319l0,0l-0.218,0.529l-3.939,0.545c-0.05,0.233-0.094,0.466-0.131,0.7l0,0l3.531,1.867l0.022,0.575c0.037,0.929,0.192,1.82,0.459,2.653l0,0l0.175,0.548l-2.667,2.95c0.112,0.212,0.229,0.419,0.351,0.621l0,0l3.916-0.843l0.39,0.423c0.601,0.657,1.287,1.229,2.043,1.703l0,0l0.488,0.305l-0.149,4.02c0.221,0.087,0.445,0.168,0.672,0.244l0,0l2.479-3.188l0.566,0.07c0.427,0.054,0.843,0.089,1.257,0.089l0,0c0.445,0,0.894-0.039,1.353-0.104l0,0l0.571-0.08L20.424,29.028L20.424,29.028zM21.554,20.75l0.546,0.839l-3.463,2.253l-1.229-1.891l0,0c-0.447,0.109-0.917,0.173-1.406,0.173l0,0c-3.384,0-6.126-2.743-6.126-6.123l0,0c0-3.384,2.742-6.126,6.126-6.126l0,0c3.38,0,6.123,2.742,6.123,6.126l0,0c0,1.389-0.467,2.676-1.25,3.704l0,0L21.554,20.75M19.224,21.073l0.108-0.069l-0.987-1.519l0.572-0.572c0.748-0.75,1.207-1.773,1.207-2.912l0,0c-0.004-2.278-1.848-4.122-4.123-4.126l0,0c-2.28,0.004-4.122,1.846-4.126,4.126l0,0c0.004,2.275,1.848,4.119,4.126,4.123l0,0c0.509,0,0.999-0.104,1.473-0.286l0,0l0.756-0.29L19.224,21.073L19.224,21.073z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.GitHub();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.GitHub = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.GitHub.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.GitHub\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.436,15.099c-1.201-0.202-2.451-0.335-3.466-0.371l-0.179-0.006c0.041-0.09,0.072-0.151,0.082-0.16c0.022-0.018,0.04-0.094,0.042-0.168c0-0.041,0.018-0.174,0.046-0.35c0.275,0.01,0.64,0.018,1.038,0.021c1.537,0.012,3.145,0.136,4.248,0.331c0.657,0.116,0.874,0.112,0.389-0.006c-0.491-0.119-1.947-0.294-3.107-0.37c-0.779-0.053-1.896-0.073-2.554-0.062c0.019-0.114,0.041-0.241,0.064-0.371c0.093-0.503,0.124-1.009,0.126-2.016c0.002-1.562-0.082-1.992-0.591-3.025c-0.207-0.422-0.441-0.78-0.724-1.104c0.247-0.729,0.241-1.858-0.015-2.848c-0.211-0.812-0.285-0.864-1.021-0.708C22.19,4.019,21.69,4.2,21.049,4.523c-0.303,0.153-0.721,0.391-1.024,0.578c-0.79-0.278-1.607-0.462-2.479-0.561c-0.884-0.1-3.051-0.044-3.82,0.098c-0.752,0.139-1.429,0.309-2.042,0.511c-0.306-0.189-0.75-0.444-1.067-0.604C9.973,4.221,9.473,4.041,8.847,3.908c-0.734-0.157-0.81-0.104-1.02,0.708c-0.26,1.003-0.262,2.151-0.005,2.878C7.852,7.577,7.87,7.636,7.877,7.682c-1.042,1.312-1.382,2.78-1.156,4.829c0.059,0.534,0.15,1.024,0.277,1.473c-0.665-0.004-1.611,0.02-2.294,0.064c-1.162,0.077-2.618,0.25-3.109,0.369c-0.484,0.118-0.269,0.122,0.389,0.007c1.103-0.194,2.712-0.32,4.248-0.331c0.29-0.001,0.561-0.007,0.794-0.013c0.07,0.237,0.15,0.463,0.241,0.678L7.26,14.759c-1.015,0.035-2.264,0.168-3.465,0.37c-0.901,0.151-2.231,0.453-2.386,0.54c-0.163,0.091-0.03,0.071,0.668-0.106c1.273-0.322,2.928-0.569,4.978-0.741l0.229-0.02c0.44,1.022,1.118,1.802,2.076,2.41c0.586,0.373,1.525,0.756,1.998,0.816c0.13,0.016,0.508,0.094,0.84,0.172c0.333,0.078,0.984,0.195,1.446,0.262h0.011c-0.009,0.006-0.017,0.01-0.025,0.016c-0.56,0.291-0.924,0.744-1.169,1.457c-0.11,0.033-0.247,0.078-0.395,0.129c-0.529,0.18-0.735,0.217-1.271,0.221c-0.556,0.004-0.688-0.02-1.02-0.176c-0.483-0.225-0.933-0.639-1.233-1.133c-0.501-0.826-1.367-1.41-2.089-1.41c-0.617,0-0.734,0.25-0.288,0.615c0.672,0.549,1.174,1.109,1.38,1.537c0.116,0.24,0.294,0.611,0.397,0.824c0.109,0.227,0.342,0.535,0.564,0.748c0.522,0.498,1.026,0.736,1.778,0.848c0.504,0.074,0.628,0.074,1.223-0.002c0.287-0.035,0.529-0.076,0.746-0.127c0,0.244,0,0.525,0,0.855c0,1.766-0.021,2.334-0.091,2.5c-0.132,0.316-0.428,0.641-0.716,0.787c-0.287,0.146-0.376,0.307-0.255,0.455c0.067,0.08,0.196,0.094,0.629,0.066c0.822-0.051,1.403-0.355,1.699-0.891c0.095-0.172,0.117-0.518,0.147-2.318c0.032-1.953,0.046-2.141,0.173-2.42c0.077-0.166,0.188-0.346,0.25-0.395c0.104-0.086,0.111,0.084,0.111,2.42c-0.001,2.578-0.027,2.889-0.285,3.385c-0.058,0.113-0.168,0.26-0.245,0.33c-0.135,0.123-0.192,0.438-0.098,0.533c0.155,0.154,0.932-0.088,1.356-0.422c0.722-0.572,0.808-1.045,0.814-4.461l0.003-2.004l0.219,0.021l0.219,0.02l0.036,2.621c0.041,2.951,0.047,2.994,0.549,3.564c0.285,0.322,0.572,0.5,1.039,0.639c0.625,0.188,0.813-0.102,0.393-0.605c-0.457-0.547-0.479-0.756-0.454-3.994c0.017-2.076,0.017-2.076,0.151-1.955c0.282,0.256,0.336,0.676,0.336,2.623c0,2.418,0.069,2.648,0.923,3.07c0.399,0.195,0.511,0.219,1.022,0.221c0.544,0.002,0.577-0.006,0.597-0.148c0.017-0.115-0.05-0.193-0.304-0.348c-0.333-0.205-0.564-0.467-0.709-0.797c-0.055-0.127-0.092-0.959-0.117-2.672c-0.036-2.393-0.044-2.502-0.193-2.877c-0.201-0.504-0.508-0.902-0.897-1.166c-0.101-0.066-0.202-0.121-0.333-0.162c0.161-0.016,0.317-0.033,0.468-0.055c1.572-0.209,2.403-0.383,3.07-0.641c1.411-0.543,2.365-1.445,2.882-2.724c0.046-0.114,0.092-0.222,0.131-0.309l0.398,0.033c2.051,0.173,3.706,0.42,4.979,0.743c0.698,0.177,0.831,0.198,0.668,0.105C30.666,15.551,29.336,15.25,28.436,15.099zM22.422,15.068c-0.233,0.512-0.883,1.17-1.408,1.428c-0.518,0.256-1.33,0.451-2.25,0.544c-0.629,0.064-4.137,0.083-4.716,0.026c-1.917-0.188-2.991-0.557-3.783-1.296c-0.75-0.702-1.1-1.655-1.039-2.828c0.039-0.734,0.216-1.195,0.679-1.755c0.421-0.51,0.864-0.825,1.386-0.985c0.437-0.134,1.778-0.146,3.581-0.03c0.797,0.051,1.456,0.051,2.252,0c1.886-0.119,3.145-0.106,3.61,0.038c0.731,0.226,1.397,0.834,1.797,1.644c0.18,0.362,0.215,0.516,0.241,1.075C22.808,13.699,22.675,14.517,22.422,15.068zM12.912,11.762c-1.073-0.188-1.686,1.649-0.863,2.587c0.391,0.445,0.738,0.518,1.172,0.248c0.402-0.251,0.62-0.72,0.62-1.328C13.841,12.458,13.472,11.862,12.912,11.762zM19.425,11.872c-1.073-0.188-1.687,1.647-0.864,2.586c0.392,0.445,0.738,0.519,1.173,0.247c0.401-0.25,0.62-0.72,0.62-1.328C20.354,12.569,19.985,11.971,19.425,11.872zM16.539,15.484c-0.023,0.074-0.135,0.184-0.248,0.243c-0.286,0.147-0.492,0.096-0.794-0.179c-0.187-0.169-0.272-0.258-0.329-0.081c-0.053,0.164,0.28,0.493,0.537,0.594c0.236,0.094,0.405,0.097,0.661-0.01c0.254-0.106,0.476-0.391,0.476-0.576C16.842,15.303,16.595,15.311,16.539,15.484zM16.222,14.909c0.163-0.144,0.2-0.44,0.044-0.597s-0.473-0.133-0.597,0.043c-0.144,0.206-0.067,0.363,0.036,0.53C15.865,15.009,16.08,15.034,16.222,14.909z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.GitHubAlt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.GitHubAlt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.GitHubAlt.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.GitHubAlt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.356,17.485c-0.004,0.007-0.007,0.013-0.01,0.021l0.162,0.005c0.107,0.004,0.218,0.01,0.33,0.016c-0.046-0.004-0.09-0.009-0.136-0.013L23.356,17.485zM15.5,1.249C7.629,1.25,1.25,7.629,1.249,15.5C1.25,23.371,7.629,29.75,15.5,29.751c7.871-0.001,14.25-6.38,14.251-14.251C29.75,7.629,23.371,1.25,15.5,1.249zM3.771,17.093c0.849-0.092,1.833-0.148,2.791-0.156c0.262,0,0.507-0.006,0.717-0.012c0.063,0.213,0.136,0.419,0.219,0.613H7.492c-0.918,0.031-2.047,0.152-3.134,0.335c-0.138,0.023-0.288,0.051-0.441,0.08C3.857,17.67,3.81,17.383,3.771,17.093zM12.196,22.224c-0.1,0.028-0.224,0.07-0.357,0.117c-0.479,0.169-0.665,0.206-1.15,0.206c-0.502,0.015-0.621-0.019-0.921-0.17C9.33,22.171,8.923,21.8,8.651,21.353c-0.453-0.746-1.236-1.275-1.889-1.275c-0.559,0-0.664,0.227-0.261,0.557c0.608,0.496,1.062,0.998,1.248,1.385c0.105,0.215,0.266,0.546,0.358,0.744c0.099,0.206,0.311,0.474,0.511,0.676c0.472,0.441,0.928,0.659,1.608,0.772c0.455,0.06,0.567,0.06,1.105-0.004c0.26-0.03,0.479-0.067,0.675-0.118v0.771c0,1.049-0.008,1.628-0.031,1.945c-1.852-0.576-3.507-1.595-4.848-2.934c-1.576-1.578-2.706-3.592-3.195-5.848c0.952-0.176,2.073-0.32,3.373-0.43l0.208-0.018c0.398,0.925,1.011,1.631,1.876,2.179c0.53,0.337,1.38,0.685,1.808,0.733c0.118,0.02,0.46,0.09,0.76,0.16c0.302,0.066,0.89,0.172,1.309,0.236h0.009c-0.007,0.018-0.014,0.02-0.022,0.02C12.747,21.169,12.418,21.579,12.196,22.224zM13.732,27.207c-0.168-0.025-0.335-0.056-0.5-0.087c0.024-0.286,0.038-0.785,0.054-1.723c0.028-1.767,0.041-1.94,0.156-2.189c0.069-0.15,0.17-0.32,0.226-0.357c0.095-0.078,0.101,0.076,0.101,2.188C13.769,26.143,13.763,26.786,13.732,27.207zM15.5,27.339c-0.148,0-0.296-0.006-0.443-0.012c0.086-0.562,0.104-1.428,0.106-2.871l0.003-1.82l0.197,0.019l0.199,0.02l0.032,2.365c0.017,1.21,0.027,1.878,0.075,2.296C15.613,27.335,15.558,27.339,15.5,27.339zM17.006,27.24c-0.039-0.485-0.037-1.243-0.027-2.553c0.019-1.866,0.019-1.866,0.131-1.769c0.246,0.246,0.305,0.623,0.305,2.373c0,0.928,0.011,1.497,0.082,1.876C17.334,27.196,17.17,27.22,17.006,27.24zM27.089,17.927c-0.155-0.029-0.307-0.057-0.446-0.08c-0.96-0.162-1.953-0.275-2.804-0.32c1.25,0.108,2.327,0.248,3.246,0.418c-0.479,2.289-1.618,4.33-3.214,5.928c-1.402,1.4-3.15,2.448-5.106,3.008c-0.034-0.335-0.058-1.048-0.066-2.212c-0.03-2.167-0.039-2.263-0.17-2.602c-0.181-0.458-0.47-0.811-0.811-1.055c-0.094-0.057-0.181-0.103-0.301-0.14c0.145-0.02,0.282-0.021,0.427-0.057c1.418-0.188,2.168-0.357,2.772-0.584c1.263-0.492,2.129-1.301,2.606-2.468c0.044-0.103,0.088-0.2,0.123-0.279l0.011,0.001c0.032-0.07,0.057-0.118,0.064-0.125c0.02-0.017,0.036-0.085,0.038-0.151c0-0.037,0.017-0.157,0.041-0.317c0.249,0.01,0.58,0.018,0.938,0.02c0.959,0.008,1.945,0.064,2.794,0.156C27.194,17.356,27.148,17.644,27.089,17.927zM25.823,16.87c-0.697-0.049-1.715-0.064-2.311-0.057c0.02-0.103,0.037-0.218,0.059-0.336c0.083-0.454,0.111-0.912,0.113-1.823c0.002-1.413-0.074-1.801-0.534-2.735c-0.188-0.381-0.399-0.705-0.655-0.998c0.225-0.659,0.207-1.68-0.02-2.575c-0.19-0.734-0.258-0.781-0.924-0.64c-0.563,0.12-1.016,0.283-1.598,0.576c-0.274,0.138-0.652,0.354-0.923,0.522c-0.715-0.251-1.451-0.419-2.242-0.508c-0.799-0.092-2.759-0.04-3.454,0.089c-0.681,0.126-1.293,0.28-1.848,0.462c-0.276-0.171-0.678-0.4-0.964-0.547C9.944,8.008,9.491,7.846,8.925,7.727c-0.664-0.144-0.732-0.095-0.922,0.64c-0.235,0.907-0.237,1.945-0.004,2.603c0.026,0.075,0.043,0.129,0.05,0.17c-0.942,1.187-1.25,2.515-1.046,4.367c0.053,0.482,0.136,0.926,0.251,1.333c-0.602-0.004-1.457,0.018-2.074,0.057c-0.454,0.031-0.957,0.076-1.418,0.129c-0.063-0.5-0.101-1.008-0.101-1.524c0-3.273,1.323-6.225,3.468-8.372c2.146-2.144,5.099-3.467,8.371-3.467c3.273,0,6.226,1.323,8.371,3.467c2.145,2.147,3.468,5.099,3.468,8.372c0,0.508-0.036,1.008-0.098,1.499C26.78,16.946,26.276,16.899,25.823,16.87z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Glasses();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Glasses = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Glasses.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Glasses\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.075,9.531c0,0-2.705-1.438-5.158-1.438c-2.453,0-4.862,0.593-4.862,0.593L3.971,9.869c0,0,0.19,0.19,0.528,0.53c0.338,0.336,0.486,3.741,1.838,5.094c1.353,1.354,4.82,1.396,5.963,0.676c1.14-0.718,2.241-3.466,2.241-4.693c0-0.38,0-0.676,0-0.676c0.274-0.275,1.615-0.303,1.917,0c0,0,0,0.296,0,0.676c0,1.227,1.101,3.975,2.241,4.693c1.144,0.72,4.611,0.678,5.963-0.676c1.355-1.353,1.501-4.757,1.839-5.094c0.338-0.34,0.528-0.53,0.528-0.53l-0.084-1.183c0,0-2.408-0.593-4.862-0.593c-2.453,0-5.158,1.438-5.158,1.438C16.319,9.292,14.737,9.32,14.075,9.531z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Globe();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Globe = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Globe.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Globe\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM19.158,23.269c-0.079,0.064-0.183,0.13-0.105,0.207c0.078,0.078-0.09,0.131-0.09,0.17s0.104,0.246,0.052,0.336c-0.052,0.092-0.091,0.223-0.13,0.301c-0.039,0.077-0.131,0.155-0.104,0.272c0.025,0.116-0.104,0.077-0.104,0.194c0,0.116,0.116,0.065,0.09,0.208c-0.025,0.144-0.09,0.183-0.09,0.285c0,0.104,0.064,0.247,0.064,0.286s-0.064,0.17-0.155,0.272c-0.092,0.104-0.155,0.17-0.144,0.233c0.014,0.065,0.104,0.144,0.091,0.184c-0.013,0.037-0.129,0.168-0.116,0.259c0.014,0.09,0.129,0.053,0.155,0.116c0.026,0.065-0.155,0.118-0.078,0.183c0.078,0.064,0.183,0.051,0.156,0.208c-0.019,0.112,0.064,0.163,0.126,0.198c-0.891,0.221-1.818,0.352-2.777,0.352C9.639,27.533,4.466,22.36,4.466,16c0-2.073,0.557-4.015,1.518-5.697c0.079-0.042,0.137-0.069,0.171-0.062c0.065,0.013,0.079,0.104,0.183,0.13c0.104,0.026,0.195-0.078,0.26-0.117c0.064-0.039,0.116-0.195,0.051-0.182c-0.065,0.013-0.234,0-0.234,0s0.183-0.104,0.183-0.169s0.025-0.169,0.129-0.208C6.83,9.655,6.83,9.681,6.765,9.837C6.7,9.993,6.896,9.928,6.973,9.863s0.13-0.013,0.272-0.104c0.143-0.091,0.143-0.143,0.221-0.143c0.078,0,0.221,0.143,0.299,0.091c0.077-0.052,0.299,0.065,0.429,0.065c0.129,0,0.545,0.169,0.624,0.169c0.078,0,0.312,0.09,0.325,0.259c0.013,0.169,0.09,0.156,0.168,0.156s0.26,0.065,0.26,0.13c0,0.065-0.052,0.325,0.078,0.39c0.129,0.064,0.247,0.169,0.299,0.143c0.052-0.026,0-0.233-0.064-0.26c-0.065-0.026-0.027-0.117-0.052-0.169c-0.026-0.051,0.078-0.051,0.117,0.039c0.039,0.091,0.143,0.26,0.208,0.26c0.064,0,0.208,0.156,0.168,0.247c-0.039,0.091,0.039,0.221,0.156,0.221c0.116,0,0.26,0.182,0.312,0.195c0.052,0.013,0.117,0.078,0.117,0.117c0,0.04,0.065,0.26,0.065,0.351c0,0.09-0.04,0.454-0.053,0.597s0.104,0.39,0.234,0.52c0.129,0.13,0.246,0.377,0.324,0.429c0.079,0.052,0.13,0.195,0.247,0.182c0.117-0.013,0.195,0.078,0.299,0.26c0.104,0.182,0.208,0.48,0.286,0.506c0.078,0.026,0.208,0.117,0.142,0.182c-0.064,0.064-0.168,0.208-0.051,0.208c0.117,0,0.156-0.065,0.247,0.053c0.09,0.116,0.208,0.181,0.194,0.26c-0.013,0.077,0.104,0.103,0.156,0.116c0.052,0.013,0.169,0.247,0.286,0.143c0.117-0.104-0.155-0.259-0.234-0.326c-0.078-0.064,0-0.207-0.182-0.35c-0.182-0.143-0.156-0.247-0.286-0.351c-0.13-0.104-0.233-0.195-0.104-0.286c0.13-0.091,0.143,0.091,0.195,0.208c0.052,0.116,0.324,0.351,0.441,0.454c0.117,0.104,0.326,0.468,0.39,0.468s0.247,0.208,0.247,0.208s0.103,0.168,0.064,0.22c-0.039,0.052,0.053,0.247,0.144,0.299c0.09,0.052,0.455,0.22,0.507,0.247c0.052,0.027,0.155,0.221,0.299,0.221c0.142,0,0.247,0.014,0.286,0.053c0.039,0.038,0.155,0.194,0.234,0.104c0.078-0.092,0.09-0.131,0.208-0.131c0.117,0,0.168,0.091,0.233,0.156c0.065,0.065,0.247,0.235,0.338,0.222c0.091-0.013,0.208,0.104,0.273,0.064s0.169,0.025,0.22,0.052c0.054,0.026,0.234,0.118,0.222,0.272c-0.013,0.157,0.103,0.195,0.182,0.234c0.078,0.039,0.182,0.13,0.248,0.195c0.064,0.063,0.206,0.077,0.246,0.116c0.039,0.039,0.065,0.117,0.182,0.052c0.116-0.064,0.092-0.181,0.092-0.181s0.129-0.026,0.194,0.026c0.064,0.05,0.104,0.22,0.144,0.246c0.038,0.026,0.115,0.221,0.063,0.362c-0.051,0.145-0.038,0.286-0.091,0.286c-0.052,0-0.116,0.17-0.195,0.209c-0.076,0.039-0.285,0.221-0.272,0.286c0.013,0.063,0.131,0.258,0.104,0.35c-0.025,0.091-0.194,0.195-0.154,0.338c0.038,0.144,0.312,0.183,0.323,0.312c0.014,0.131,0.209,0.417,0.235,0.546c0.025,0.13,0.246,0.272,0.246,0.453c0,0.184,0.312,0.3,0.377,0.312c0.063,0.013,0.182,0.131,0.272,0.17s0.169,0.116,0.233,0.221s0.053,0.261,0.053,0.299c0,0.039-0.039,0.44-0.078,0.674C19.145,23.021,19.235,23.203,19.158,23.269zM10.766,11.188c0.039,0.013,0.117,0.091,0.156,0.091c0.04,0,0.234,0.156,0.286,0.208c0.053,0.052,0.053,0.195-0.013,0.208s-0.104-0.143-0.117-0.208c-0.013-0.065-0.143-0.065-0.208-0.104C10.805,11.344,10.66,11.152,10.766,11.188zM27.51,16.41c-0.144,0.182-0.13,0.272-0.195,0.286c-0.064,0.013,0.065,0.065,0.09,0.194c0.022,0.112-0.065,0.224,0.063,0.327c-0.486,4.619-3.71,8.434-8.016,9.787c-0.007-0.011-0.019-0.025-0.021-0.034c-0.027-0.078-0.027-0.233,0.064-0.285c0.091-0.053,0.312-0.233,0.363-0.272c0.052-0.04,0.13-0.221,0.091-0.247c-0.038-0.026-0.232,0-0.26-0.039c-0.026-0.039-0.026-0.092,0.104-0.182c0.13-0.091,0.195-0.222,0.247-0.26c0.052-0.039,0.155-0.117,0.195-0.209c0.038-0.09-0.041-0.039-0.118-0.039s-0.117-0.142-0.117-0.207s0.195,0.026,0.339,0.052c0.143,0.024,0.077-0.065,0.064-0.142c-0.013-0.078,0.026-0.209,0.105-0.17c0.076,0.039,0.479-0.013,0.531-0.026c0.052-0.013,0.194-0.246,0.246-0.312c0.053-0.065,0.064-0.129,0-0.168c-0.065-0.04-0.143-0.184-0.168-0.221c-0.026-0.041-0.039-0.274-0.013-0.34c0.025-0.063,0,0.377,0.181,0.43c0.183,0.052,0.286,0.078,0.455-0.078c0.169-0.155,0.298-0.26,0.312-0.363c0.013-0.104,0.052-0.209,0.117-0.246c0.065-0.039,0.104,0.103,0.182-0.065c0.078-0.17,0.156-0.157,0.234-0.299c0.077-0.144-0.13-0.325,0.024-0.43c0.157-0.103,0.43-0.233,0.43-0.233s0.078-0.039,0.234-0.078c0.155-0.038,0.324-0.014,0.376-0.09c0.052-0.079,0.104-0.247,0.182-0.338c0.079-0.092,0.169-0.234,0.13-0.299c-0.039-0.065,0.104-0.352,0.091-0.429c-0.013-0.078-0.13-0.261,0.065-0.416s0.402-0.391,0.416-0.454c0.012-0.065,0.169-0.338,0.154-0.469c-0.012-0.129-0.154-0.285-0.245-0.325c-0.092-0.037-0.286-0.05-0.364-0.154s-0.299-0.208-0.377-0.182c-0.077,0.026-0.208,0.051-0.312-0.015c-0.104-0.063-0.272-0.143-0.337-0.194c-0.066-0.051-0.234-0.09-0.312-0.09s-0.065-0.053-0.182,0.103c-0.117,0.157,0,0.209-0.208,0.182c-0.209-0.024,0.025-0.038,0.144-0.194c0.115-0.155-0.014-0.247-0.144-0.207c-0.13,0.039-0.039,0.117-0.247,0.156c-0.207,0.038-0.207-0.092-0.077-0.117c0.13-0.026,0.363-0.143,0.363-0.194c0-0.053-0.026-0.196-0.13-0.196s-0.078-0.129-0.233-0.297c-0.156-0.17-0.351-0.274-0.508-0.249c-0.154,0.026-0.272,0.065-0.35-0.076c-0.078-0.144-0.169-0.17-0.222-0.247c-0.051-0.078-0.182,0-0.221-0.039s-0.039-0.039-0.039-0.039s-0.169,0.039-0.077-0.078c0.09-0.117,0.129-0.338,0.09-0.325c-0.038,0.013-0.104,0.196-0.168,0.183c-0.064-0.013-0.014-0.04-0.144-0.117c-0.13-0.078-0.337-0.013-0.337,0.052c0,0.065-0.065,0.117-0.065,0.117s-0.039-0.038-0.078-0.117c-0.039-0.078-0.221-0.091-0.312-0.013c-0.09,0.078-0.142-0.196-0.207-0.196s-0.194,0.065-0.26,0.184c-0.064,0.116-0.038,0.285-0.092,0.272c-0.05-0.013-0.063-0.233-0.05-0.312c0.012-0.079,0.155-0.208,0.05-0.234c-0.103-0.026-0.259,0.13-0.323,0.143c-0.065,0.013-0.195,0.104-0.273,0.209c-0.077,0.103-0.116,0.168-0.195,0.207c-0.077,0.039-0.193,0-0.167-0.039c0.025-0.039-0.222-0.181-0.261-0.13c-0.04,0.052-0.155,0.091-0.272,0.144c-0.117,0.052-0.222-0.065-0.247-0.117s-0.079-0.064-0.091-0.234c-0.013-0.168,0.027-0.351,0.065-0.454c0.038-0.104-0.195-0.312-0.286-0.3c-0.091,0.015-0.182,0.105-0.272,0.091c-0.092-0.012-0.052-0.038-0.195-0.038c-0.143,0-0.026-0.025,0-0.143c0.025-0.116-0.052-0.273,0.092-0.377c0.142-0.104,0.091-0.351,0-0.363c-0.092-0.014-0.261,0.039-0.377,0.026c-0.116-0.014-0.208,0.091-0.169,0.207c0.039,0.117-0.065,0.195-0.104,0.183c-0.039-0.013-0.09-0.078-0.234,0.026c-0.142,0.103-0.194,0.064-0.337-0.052c-0.143-0.118-0.299-0.234-0.325-0.416c-0.026-0.182-0.04-0.364,0.013-0.468c0.051-0.104,0.051-0.285-0.026-0.312c-0.078-0.025,0.09-0.155,0.181-0.181c0.092-0.026,0.234-0.143,0.26-0.195c0.026-0.052,0.156-0.04,0.298-0.04c0.143,0,0.169,0,0.312,0.078c0.143,0.078,0.169-0.039,0.169-0.078c0-0.039,0.052-0.117,0.208-0.104c0.156,0.013,0.376-0.052,0.416-0.013s0.116,0.195,0.194,0.143c0.079-0.051,0.104-0.143,0.131,0.014c0.025,0.155,0.09,0.39,0.208,0.429c0.116,0.039,0.052,0.194,0.168,0.207c0.115,0.013,0.17-0.246,0.131-0.337c-0.04-0.09-0.118-0.363-0.183-0.428c-0.064-0.065-0.064-0.234,0.064-0.286c0.13-0.052,0.442-0.312,0.532-0.389c0.092-0.079,0.338-0.144,0.261-0.248c-0.078-0.104-0.104-0.168-0.104-0.247s0.078-0.052,0.117,0s0.194-0.078,0.155-0.143c-0.038-0.064-0.026-0.155,0.065-0.143c0.091,0.013,0.116-0.065,0.078-0.117c-0.039-0.052,0.091-0.117,0.182-0.091c0.092,0.026,0.325-0.013,0.364-0.065c0.038-0.052-0.078-0.104-0.078-0.208c0-0.104,0.155-0.195,0.247-0.208c0.091-0.013,0.207,0,0.221-0.039c0.012-0.039,0.143-0.143,0.155-0.052c0.014,0.091,0,0.247,0.104,0.247c0.104,0,0.232-0.117,0.272-0.129c0.038-0.013,0.286-0.065,0.338-0.078c0.052-0.013,0.363-0.039,0.325-0.13c-0.039-0.09-0.078-0.181-0.118-0.22c-0.039-0.039-0.077,0.013-0.13,0.078c-0.051,0.065-0.143,0.065-0.168,0.013c-0.026-0.051,0.012-0.207-0.078-0.156c-0.092,0.052-0.104,0.104-0.157,0.078c-0.052-0.026-0.103-0.117-0.103-0.117s0.129-0.064,0.038-0.182c-0.09-0.117-0.221-0.091-0.35-0.025c-0.13,0.064-0.118,0.051-0.273,0.09s-0.234,0.078-0.234,0.078s0.209-0.129,0.299-0.208c0.091-0.078,0.209-0.117,0.286-0.195c0.078-0.078,0.285,0.039,0.285,0.039s0.105-0.104,0.105-0.039s-0.027,0.234,0.051,0.234c0.079,0,0.299-0.104,0.21-0.131c-0.093-0.026,0.129,0,0.219-0.065c0.092-0.065,0.194-0.065,0.247-0.09c0.052-0.026,0.092-0.143,0.182-0.143c0.092,0,0.13,0.117,0,0.195s-0.143,0.273-0.208,0.325c-0.064,0.052-0.026,0.117,0.078,0.104c0.104-0.013,0.194,0.013,0.286-0.013s0.143,0.026,0.168,0.065c0.026,0.039,0.104-0.039,0.104-0.039s0.169-0.039,0.221,0.026c0.053,0.064,0.092-0.039,0.053-0.104c-0.039-0.064-0.092-0.129-0.13-0.208c-0.039-0.078-0.091-0.104-0.194-0.078c-0.104,0.026-0.13-0.026-0.195-0.064c-0.065-0.04-0.118,0.052-0.065-0.04c0.053-0.09,0.078-0.117,0.117-0.195c0.039-0.078,0.209-0.221,0.039-0.259c-0.169-0.04-0.222-0.065-0.247-0.143c-0.026-0.078-0.221-0.221-0.272-0.221c-0.053,0-0.233,0-0.247-0.065c-0.013-0.065-0.143-0.208-0.208-0.273c-0.064-0.065-0.312-0.351-0.351-0.377c-0.039-0.026-0.091-0.013-0.208,0.143c-0.116,0.157-0.22,0.183-0.312,0.144c-0.091-0.039-0.104-0.026-0.193-0.13c-0.093-0.104,0.09-0.117,0.051-0.182c-0.04-0.064-0.247-0.091-0.377-0.104c-0.13-0.013-0.221-0.156-0.416-0.169c-0.194-0.013-0.428,0.026-0.493,0.026c-0.064,0-0.064,0.091-0.09,0.234c-0.027,0.143,0.09,0.182-0.027,0.208c-0.116,0.026-0.169,0.039-0.052,0.091c0.117,0.052,0.273,0.26,0.273,0.26s0,0.117-0.092,0.182c-0.09,0.065-0.182,0.13-0.233,0.053c-0.053-0.079-0.195-0.065-0.155,0.013c0.038,0.078,0.116,0.117,0.116,0.195c0,0.077,0.117,0.272,0.039,0.337c-0.078,0.065-0.168,0.014-0.233,0.026s-0.131-0.104-0.078-0.13c0.051-0.026-0.014-0.221-0.014-0.221s-0.155,0.221-0.143,0.104c0.014-0.117-0.064-0.13-0.064-0.221c0-0.091-0.079-0.13-0.194-0.104c-0.118,0.026-0.26-0.04-0.482-0.079c-0.22-0.039-0.311-0.064-0.493-0.156c-0.182-0.091-0.247-0.026-0.338-0.013c-0.091,0.013-0.052-0.182-0.169-0.207c-0.116-0.027-0.181,0.025-0.207-0.144c-0.026-0.168,0.039-0.208,0.324-0.39c0.286-0.182,0.247-0.26,0.468-0.286c0.22-0.026,0.325,0.026,0.325-0.039s0.052-0.325,0.052-0.195S16.95,9.109,16.832,9.2c-0.116,0.091-0.052,0.104,0.04,0.104c0.091,0,0.259-0.091,0.259-0.091s0.208-0.091,0.26-0.013c0.053,0.078,0.053,0.156,0.144,0.156s0.285-0.104,0.116-0.195c-0.168-0.091-0.272-0.078-0.376-0.182s-0.078-0.065-0.195-0.039c-0.116,0.026-0.116-0.039-0.156-0.039s-0.104,0.026-0.13-0.026c-0.025-0.052,0.014-0.065,0.145-0.065c0.129,0,0.285,0.039,0.285,0.039s0.155-0.052,0.194-0.065c0.039-0.013,0.247-0.039,0.208-0.155c-0.04-0.117-0.169-0.117-0.208-0.156s0.078-0.09,0.143-0.117c0.065-0.026,0.247,0,0.247,0s0.117,0.013,0.117-0.039S17.897,8.2,17.976,8.239s0,0.156,0.117,0.13c0.116-0.026,0.143,0,0.207,0.039c0.065,0.039-0.013,0.195-0.077,0.221c-0.065,0.025-0.169,0.077-0.026,0.09c0.144,0.014,0.246,0.014,0.246,0.014s0.092-0.091,0.131-0.169c0.038-0.078,0.104-0.026,0.155,0c0.052,0.025,0.247,0.065,0.065,0.117c-0.183,0.052-0.221,0.117-0.26,0.182c-0.038,0.065-0.053,0.104-0.221,0.065c-0.17-0.039-0.26-0.026-0.299,0.039c-0.039,0.064-0.013,0.273,0.053,0.247c0.063-0.026,0.129-0.026,0.207-0.052c0.078-0.026,0.39,0.026,0.467,0.013c0.078-0.013,0.209,0.13,0.248,0.104c0.039-0.026,0.117,0.052,0.194,0.104c0.078,0.052,0.052-0.117,0.194-0.013c0.144,0.104,0.065,0.104,0.144,0.104c0.076,0,0.246,0.013,0.246,0.013s0.014-0.129,0.144-0.104c0.13,0.026,0.245,0.169,0.232,0.064c-0.012-0.103,0.013-0.181-0.09-0.259c-0.104-0.078-0.272-0.13-0.299-0.169c-0.026-0.039-0.052-0.091-0.013-0.117c0.039-0.025,0.221,0.013,0.324,0.079c0.104,0.065,0.195,0.13,0.273,0.078c0.077-0.052,0.17-0.078,0.208-0.117c0.038-0.04,0.13-0.156,0.13-0.156s-0.391-0.051-0.441-0.117c-0.053-0.065-0.235-0.156-0.287-0.156s-0.194,0.091-0.246-0.039s-0.052-0.286-0.105-0.299c-0.05-0.013-0.597-0.091-0.674-0.13c-0.078-0.039-0.39-0.13-0.507-0.195s-0.286-0.156-0.389-0.156c-0.104,0-0.533,0.052-0.611,0.039c-0.078-0.013-0.312,0.026-0.403,0.039c-0.091,0.013,0.117,0.182-0.077,0.221c-0.195,0.039-0.169,0.065-0.13-0.13c0.038-0.195-0.131-0.247-0.299-0.169c-0.169,0.078-0.442,0.13-0.377,0.221c0.065,0.091-0.012,0.157,0.117,0.247c0.13,0.091,0.183,0.117,0.35,0.104c0.17-0.013,0.339,0.025,0.339,0.025s0,0.157-0.064,0.182c-0.065,0.026-0.169,0.026-0.196,0.104c-0.025,0.078-0.155,0.117-0.155,0.078s0.065-0.169-0.026-0.234c-0.09-0.065-0.117-0.078-0.221-0.013c-0.104,0.065-0.116,0.091-0.169-0.013C16.053,8.291,15.897,8.2,15.897,8.2s-0.104-0.129-0.182-0.194c-0.077-0.065-0.22-0.052-0.234,0.013c-0.013,0.064,0.026,0.129,0.078,0.247c0.052,0.117,0.104,0.337,0.013,0.351c-0.091,0.013-0.104,0.026-0.195,0.052c-0.091,0.026-0.13-0.039-0.13-0.143s-0.04-0.195-0.013-0.234c0.026-0.039-0.104,0.027-0.234,0c-0.13-0.025-0.233,0.052-0.104,0.092c0.13,0.039,0.157,0.194,0.039,0.233c-0.117,0.039-0.559,0-0.702,0s-0.35,0.039-0.39-0.039c-0.039-0.078,0.118-0.129,0.208-0.129c0.091,0,0.363,0.012,0.467-0.13c0.104-0.143-0.13-0.169-0.233-0.169c-0.104,0-0.183-0.039-0.299-0.155c-0.118-0.117,0.078-0.195,0.052-0.247c-0.026-0.052-0.156-0.014-0.272-0.014c-0.117,0-0.299-0.09-0.299,0.014c0,0.104,0.143,0.402,0.052,0.337c-0.091-0.064-0.078-0.156-0.143-0.234c-0.065-0.078-0.168-0.065-0.299-0.052c-0.129,0.013-0.35,0.052-0.415,0.039c-0.064-0.013-0.013-0.013-0.156-0.078c-0.142-0.065-0.208-0.052-0.312-0.117C12.091,7.576,12.182,7.551,12,7.538c-0.181-0.013-0.168,0.09-0.35,0.065c-0.182-0.026-0.234,0.013-0.416,0c-0.182-0.013-0.272-0.026-0.299,0.065c-0.025,0.091-0.078,0.247-0.156,0.247c-0.077,0-0.169,0.091,0.078,0.104c0.247,0.013,0.105,0.129,0.325,0.117c0.221-0.013,0.416-0.013,0.468-0.117c0.052-0.104,0.091-0.104,0.117-0.065c0.025,0.039,0.22,0.272,0.22,0.272s0.131,0.104,0.183,0.13c0.051,0.026-0.052,0.143-0.156,0.078c-0.104-0.065-0.299-0.051-0.377-0.116c-0.078-0.065-0.429-0.065-0.52-0.052c-0.09,0.013-0.247-0.039-0.299-0.039c-0.051,0-0.221,0.13-0.221,0.13S10.532,8.252,10.494,8.2c-0.039-0.052-0.104,0.052-0.156,0.065c-0.052,0.013-0.208-0.104-0.364-0.052C9.818,8.265,9.87,8.317,9.649,8.304s-0.272-0.052-0.35-0.039C9.22,8.278,9.22,8.278,9.22,8.278S9.233,8.33,9.143,8.382C9.052,8.434,8.986,8.499,8.921,8.421C8.857,8.343,8.818,8.343,8.779,8.33c-0.04-0.013-0.118-0.078-0.286-0.04C8.324,8.33,8.064,8.239,8.013,8.239c-0.04,0-0.313-0.015-0.491-0.033c2.109-2.292,5.124-3.74,8.478-3.74c2.128,0,4.117,0.589,5.83,1.598c-0.117,0.072-0.319,0.06-0.388,0.023c-0.078-0.043-0.158-0.078-0.475-0.061c-0.317,0.018-0.665,0.122-0.595,0.226c0.072,0.104-0.142,0.165-0.197,0.113c-0.055-0.052-0.309,0.06-0.293,0.165c0.016,0.104-0.039,0.225-0.175,0.199c-0.134-0.027-0.229,0.06-0.237,0.146c-0.007,0.087-0.309,0.147-0.332,0.147c-0.024,0-0.412-0.008-0.27,0.095c0.097,0.069,0.15,0.027,0.27,0.052c0.119,0.026,0.214,0.217,0.277,0.243c0.062,0.026,0.15,0,0.189-0.052c0.04-0.052,0.095-0.234,0.095-0.234s0,0.173,0.097,0.208c0.095,0.035,0.331-0.026,0.395-0.017c0.064,0.008,0.437,0.061,0.538,0.112c0.104,0.052,0.356,0.087,0.428,0.199c0.071,0.113,0.08,0.503,0.119,0.546c0.04,0.043,0.174-0.139,0.205-0.182c0.031-0.044,0.198-0.018,0.254,0.042c0.056,0.061,0.182,0.208,0.175,0.269C21.9,8.365,21.877,8.459,21.83,8.425c-0.048-0.034-0.127-0.025-0.096-0.095c0.032-0.069,0.048-0.217-0.015-0.217c-0.064,0-0.119,0-0.119,0s-0.12-0.035-0.199,0.095s-0.015,0.26,0.04,0.26s0.184,0,0.184,0.034c0,0.035-0.136,0.139-0.128,0.2c0.009,0.061,0.11,0.268,0.144,0.312c0.031,0.043,0.197,0.086,0.244,0.096c0.049,0.008-0.111,0.017-0.07,0.077c0.04,0.061,0.102,0.208,0.189,0.243c0.087,0.035,0.333,0.19,0.363,0.26c0.032,0.069,0.222-0.052,0.262-0.061c0.04-0.008,0.032,0.182,0.143,0.191c0.11,0.008,0.15-0.018,0.245-0.096s0.072-0.182,0.079-0.26c0.009-0.078,0-0.138,0.104-0.113c0.104,0.026,0.158-0.018,0.15-0.104c-0.008-0.087-0.095-0.191,0.07-0.217c0.167-0.026,0.254-0.138,0.357-0.138c0.103,0,0.389,0.043,0.419,0c0.032-0.043,0.167-0.243,0.254-0.251c0.067-0.007,0.224-0.021,0.385-0.042c1.582,1.885,2.561,4.284,2.673,6.905c-0.118,0.159-0.012,0.305,0.021,0.408c0.001,0.03,0.005,0.058,0.005,0.088c0,0.136-0.016,0.269-0.021,0.404C27.512,16.406,27.512,16.408,27.51,16.41zM17.794,12.084c-0.064,0.013-0.169-0.052-0.169-0.143s-0.091,0.169-0.04,0.247c0.053,0.078-0.104,0.169-0.155,0.169s-0.091-0.116-0.078-0.233c0.014-0.117-0.077-0.221-0.221-0.208c-0.143,0.014-0.208,0.13-0.259,0.169c-0.053,0.039-0.053,0.259-0.04,0.312s0.013,0.235-0.116,0.221c-0.118-0.013-0.092-0.233-0.079-0.312c0.014-0.078-0.039-0.273,0.014-0.376c0.053-0.104,0.207-0.143,0.312-0.156s0.324,0.065,0.363,0.052c0.04-0.014,0.222-0.014,0.312,0C17.729,11.837,17.858,12.071,17.794,12.084zM18.027,12.123c0.04,0.026,0.311-0.039,0.364,0.026c0.051,0.065-0.054,0.078-0.183,0.13c-0.129,0.052-0.169,0.039-0.221,0.104s-0.221,0.09-0.299,0.168c-0.078,0.079-0.217,0.125-0.246,0.065c-0.04-0.078,0.013-0.039,0.025-0.078c0.013-0.039,0.245-0.129,0.245-0.129S17.988,12.097,18.027,12.123zM16.988,11.668c-0.038,0.013-0.182-0.026-0.3-0.026c-0.116,0-0.091-0.078-0.143-0.064c-0.051,0.013-0.168,0.039-0.247,0.078c-0.078,0.039-0.208,0.03-0.208-0.04c0-0.104,0.052-0.078,0.221-0.143c0.169-0.065,0.352-0.247,0.429-0.169c0.078,0.078,0.221,0.169,0.312,0.182C17.144,11.5,17.026,11.655,16.988,11.668zM15.659,7.637c-0.079,0.026-0.347,0.139-0.321,0.199c0.01,0.023,0.078,0.069,0.19,0.052c0.113-0.018,0.276-0.035,0.355-0.043c0.078-0.009,0.095-0.139,0.009-0.147C15.805,7.689,15.736,7.611,15.659,7.637zM14.698,7.741c-0.061,0.026-0.243-0.043-0.338,0.018c-0.061,0.038-0.026,0.164,0.07,0.172c0.095,0.009,0.259-0.06,0.276-0.008c0.018,0.052,0.078,0.286,0.234,0.208c0.156-0.078,0.147-0.147,0.19-0.156c0.043-0.009-0.008-0.199-0.078-0.243C14.983,7.689,14.758,7.715,14.698,7.741zM14.385,7.005c0.017,0.044-0.008,0.078,0.113,0.095c0.121,0.018,0.173,0.035,0.243,0.035c0.069,0,0.042-0.113-0.018-0.19c-0.061-0.078-0.043-0.069-0.199-0.113c-0.156-0.043-0.312-0.043-0.416-0.035c-0.104,0.009-0.217-0.017-0.243,0.104c-0.013,0.062,0.07,0.112,0.174,0.112S14.368,6.962,14.385,7.005zM14.611,7.481c0.043,0.095,0.043,0.051,0.165,0.061C14.896,7.551,14.991,7.421,15,7.378c0.009-0.044-0.061-0.13-0.225-0.113c-0.165,0.017-0.667-0.026-0.736,0.034c-0.066,0.058,0,0.233-0.026,0.251c-0.026,0.017,0.009,0.095,0.077,0.078c0.069-0.017,0.104-0.182,0.157-0.182C14.299,7.447,14.568,7.386,14.611,7.481zM12.982,7.126c0.052,0.043,0.183,0.008,0.173-0.035c-0.008-0.043,0.053-0.217-0.051-0.225C13,6.858,12.854,6.962,12.697,7.014c-0.101,0.033-0.078,0.13-0.009,0.13S12.931,7.083,12.982,7.126zM13.72,7.282c-0.087,0.043-0.114,0.069-0.191,0.052c-0.078-0.017-0.078-0.156-0.217-0.13c-0.138,0.026-0.164,0.104-0.207,0.139s-0.139,0.061-0.173,0.043c-0.034-0.017-0.234-0.129-0.234-0.129s-0.416-0.018-0.433-0.07c-0.017-0.052-0.086-0.138-0.277-0.121s-0.52,0.13-0.572,0.13c-0.052,0,0.062,0.104-0.009,0.104c-0.069,0-0.155-0.008-0.181,0.069c-0.018,0.053,0.078,0.052,0.189,0.052c0.112,0,0.295,0,0.347-0.026c0.052-0.026,0.312-0.087,0.303-0.009c-0.009,0.079,0.104,0.199,0.164,0.182c0.061-0.017,0.183-0.13,0.243-0.086c0.061,0.043,0.07,0.146,0.13,0.173c0.061,0.025,0.226,0.025,0.304,0c0.077-0.027,0.294-0.027,0.389-0.009c0.095,0.018,0.373,0.069,0.399,0.018c0.026-0.053,0.104-0.061,0.112-0.113s0.051-0.216,0.051-0.216S13.806,7.239,13.72,7.282zM18.105,16.239c-0.119,0.021-0.091,0.252,0.052,0.21C18.3,16.407,18.223,16.217,18.105,16.239zM19.235,15.929c-0.104-0.026-0.221,0-0.299,0.013c-0.078,0.013-0.299,0.208-0.299,0.208s0.143,0.026,0.233,0.026c0.092,0,0.144,0.051,0.221,0.09c0.078,0.04,0.221-0.052,0.272-0.052c0.053,0,0.118,0.156,0.131-0.013C19.508,16.032,19.339,15.955,19.235,15.929zM15.616,7.507c-0.043-0.104-0.259-0.139-0.304-0.035C15.274,7.563,15.659,7.611,15.616,7.507zM18.093,15.292c0.143-0.026,0.064-0.144-0.053-0.13C17.922,15.175,17.949,15.318,18.093,15.292zM19.82,16.095c-0.119,0.022-0.092,0.253,0.051,0.211C20.015,16.264,19.937,16.074,19.82,16.095zM18.247,15.708c-0.09,0.013-0.285-0.09-0.389-0.182c-0.104-0.091-0.299-0.091-0.377-0.091c-0.077,0-0.39,0.091-0.39,0.091c-0.013,0.13,0.117,0.091,0.273,0.091s0.429-0.026,0.479,0.039c0.053,0.064,0.286,0.168,0.352,0.221c0.064,0.052,0.272,0.065,0.285,0.013S18.338,15.695,18.247,15.708zM16.698,7.412c-0.13-0.009-0.295-0.009-0.399,0c-0.104,0.008-0.182-0.069-0.26-0.113c-0.077-0.043-0.251-0.182-0.354-0.199c-0.104-0.017-0.086-0.017-0.303-0.069c-0.11-0.027-0.294-0.061-0.294-0.086c0-0.026-0.052,0.121,0.043,0.165c0.095,0.043,0.251,0.121,0.363,0.164c0.114,0.043,0.329,0.052,0.399,0.139c0.069,0.086,0.303,0.156,0.303,0.156l0.277,0.026c0,0,0.191-0.043,0.39-0.026c0.199,0.017,0.493,0.043,0.659,0.035c0.163-0.008,0.189-0.061,0.208-0.095c0.016-0.035-0.304-0.104-0.383-0.095C17.271,7.42,16.827,7.42,16.698,7.412zM17.182,9.404c-0.034,0.039,0.157,0.095,0.191,0.043C17.407,9.396,17.271,9.309,17.182,9.404zM17.764,9.585c0.086-0.035,0.043-0.139-0.079-0.104C17.547,9.521,17.676,9.62,17.764,9.585z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.GlobeAlt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.GlobeAlt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.GlobeAlt.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.GlobeAlt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM27.436,17.39c0.001,0.002,0.004,0.002,0.005,0.004c-0.022,0.187-0.054,0.37-0.085,0.554c-0.015-0.012-0.034-0.025-0.047-0.036c-0.103-0.09-0.254-0.128-0.318-0.115c-0.157,0.032,0.229,0.305,0.267,0.342c0.009,0.009,0.031,0.03,0.062,0.058c-1.029,5.312-5.709,9.338-11.319,9.338c-4.123,0-7.736-2.18-9.776-5.441c0.123-0.016,0.24-0.016,0.28-0.076c0.051-0.077,0.102-0.241,0.178-0.331c0.077-0.089,0.165-0.229,0.127-0.292c-0.039-0.064,0.101-0.344,0.088-0.419c-0.013-0.076-0.127-0.256,0.064-0.407s0.394-0.382,0.407-0.444c0.012-0.063,0.166-0.331,0.152-0.458c-0.012-0.127-0.152-0.28-0.24-0.318c-0.09-0.037-0.28-0.05-0.356-0.151c-0.077-0.103-0.292-0.203-0.368-0.178c-0.076,0.025-0.204,0.05-0.305-0.015c-0.102-0.062-0.267-0.139-0.33-0.189c-0.065-0.05-0.229-0.088-0.305-0.088c-0.077,0-0.065-0.052-0.178,0.101c-0.114,0.153,0,0.204-0.204,0.177c-0.204-0.023,0.025-0.036,0.141-0.189c0.113-0.152-0.013-0.242-0.141-0.203c-0.126,0.038-0.038,0.115-0.241,0.153c-0.203,0.036-0.203-0.09-0.076-0.115s0.355-0.139,0.355-0.19c0-0.051-0.025-0.191-0.127-0.191s-0.077-0.126-0.229-0.291c-0.092-0.101-0.196-0.164-0.299-0.204c-0.09-0.579-0.15-1.167-0.15-1.771c0-2.844,1.039-5.446,2.751-7.458c0.024-0.02,0.048-0.034,0.069-0.036c0.084-0.009,0.31-0.025,0.51-0.059c0.202-0.034,0.418-0.161,0.489-0.153c0.069,0.008,0.241,0.008,0.186-0.042C8.417,8.2,8.339,8.082,8.223,8.082S8.215,7.896,8.246,7.896c0.03,0,0.186,0.025,0.178,0.11C8.417,8.091,8.471,8.2,8.625,8.167c0.156-0.034,0.132-0.162,0.102-0.195C8.695,7.938,8.672,7.853,8.642,7.794c-0.031-0.06-0.023-0.136,0.14-0.153C8.944,7.625,9.168,7.708,9.16,7.573s0-0.28,0.046-0.356C9.253,7.142,9.354,7.09,9.299,7.065C9.246,7.04,9.176,7.099,9.121,6.972c-0.054-0.127,0.047-0.22,0.108-0.271c0.02-0.015,0.067-0.06,0.124-0.112C11.234,5.257,13.524,4.466,16,4.466c3.213,0,6.122,1.323,8.214,3.45c-0.008,0.022-0.01,0.052-0.031,0.056c-0.077,0.013-0.166,0.063-0.179-0.051c-0.013-0.114-0.013-0.331-0.102-0.203c-0.089,0.127-0.127,0.127-0.127,0.191c0,0.063,0.076,0.127,0.051,0.241C23.8,8.264,23.8,8.341,23.84,8.341c0.036,0,0.126-0.115,0.239-0.141c0.116-0.025,0.319-0.088,0.332,0.026c0.013,0.115,0.139,0.152,0.013,0.203c-0.128,0.051-0.267,0.026-0.293-0.051c-0.025-0.077-0.114-0.077-0.203-0.013c-0.088,0.063-0.279,0.292-0.279,0.292s-0.306,0.139-0.343,0.114c-0.04-0.025,0.101-0.165,0.203-0.228c0.102-0.064,0.178-0.204,0.14-0.242c-0.038-0.038-0.088-0.279-0.063-0.343c0.025-0.063,0.139-0.152,0.013-0.216c-0.127-0.063-0.217-0.14-0.318-0.178s-0.216,0.152-0.305,0.204c-0.089,0.051-0.076,0.114-0.191,0.127c-0.114,0.013-0.189,0.165,0,0.254c0.191,0.089,0.255,0.152,0.204,0.204c-0.051,0.051-0.267-0.025-0.267-0.025s-0.165-0.076-0.268-0.076c-0.101,0-0.229-0.063-0.33-0.076c-0.102-0.013-0.306-0.013-0.355,0.038c-0.051,0.051-0.179,0.203-0.28,0.152c-0.101-0.051-0.101-0.102-0.241-0.051c-0.14,0.051-0.279-0.038-0.355,0.038c-0.077,0.076-0.013,0.076-0.255,0c-0.241-0.076-0.189,0.051-0.419,0.089s-0.368-0.038-0.432,0.038c-0.064,0.077-0.153,0.217-0.19,0.127c-0.038-0.088,0.126-0.241,0.062-0.292c-0.062-0.051-0.33-0.025-0.367,0.013c-0.039,0.038-0.014,0.178,0.011,0.229c0.026,0.05,0.064,0.254-0.011,0.216c-0.077-0.038-0.064-0.166-0.141-0.152c-0.076,0.013-0.165,0.051-0.203,0.077c-0.038,0.025-0.191,0.025-0.229,0.076c-0.037,0.051,0.014,0.191-0.051,0.203c-0.063,0.013-0.114,0.064-0.254-0.025c-0.14-0.089-0.14-0.038-0.178-0.012c-0.038,0.025-0.216,0.127-0.229,0.012c-0.013-0.114,0.025-0.152-0.089-0.229c-0.115-0.076-0.026-0.076,0.127-0.025c0.152,0.05,0.343,0.075,0.622-0.013c0.28-0.089,0.395-0.127,0.28-0.178c-0.115-0.05-0.229-0.101-0.406-0.127c-0.179-0.025-0.42-0.025-0.7-0.127c-0.279-0.102-0.343-0.14-0.457-0.165c-0.115-0.026-0.813-0.14-1.132-0.089c-0.317,0.051-1.193,0.28-1.245,0.318s-0.128,0.19-0.292,0.318c-0.165,0.127-0.47,0.419-0.712,0.47c-0.241,0.051-0.521,0.254-0.521,0.305c0,0.051,0.101,0.242,0.076,0.28c-0.025,0.038,0.05,0.229,0.191,0.28c0.139,0.05,0.381,0.038,0.393-0.039c0.014-0.076,0.204-0.241,0.217-0.127c0.013,0.115,0.14,0.292,0.114,0.368c-0.025,0.077,0,0.153,0.09,0.14c0.088-0.012,0.559-0.114,0.559-0.114s0.153-0.064,0.127-0.166c-0.026-0.101,0.166-0.241,0.203-0.279c0.038-0.038,0.178-0.191,0.014-0.241c-0.167-0.051-0.293-0.064-0.115-0.216s0.292,0,0.521-0.229c0.229-0.229-0.051-0.292,0.191-0.305c0.241-0.013,0.496-0.025,0.444,0.051c-0.05,0.076-0.342,0.242-0.508,0.318c-0.166,0.077-0.14,0.216-0.076,0.292c0.063,0.076,0.09,0.254,0.204,0.229c0.113-0.025,0.254-0.114,0.38-0.101c0.128,0.012,0.383-0.013,0.42-0.013c0.039,0,0.216,0.178,0.114,0.203c-0.101,0.025-0.229,0.013-0.445,0.025c-0.215,0.013-0.456,0.013-0.456,0.051c0,0.039,0.292,0.127,0.19,0.191c-0.102,0.063-0.203-0.013-0.331-0.026c-0.127-0.012-0.203,0.166-0.241,0.267c-0.039,0.102,0.063,0.28-0.127,0.216c-0.191-0.063-0.331-0.063-0.381-0.038c-0.051,0.025-0.203,0.076-0.331,0.114c-0.126,0.038-0.076-0.063-0.242-0.063c-0.164,0-0.164,0-0.164,0l-0.103,0.013c0,0-0.101-0.063-0.114-0.165c-0.013-0.102,0.05-0.216-0.013-0.241c-0.064-0.026-0.292,0.012-0.33,0.088c-0.038,0.076-0.077,0.216-0.026,0.28c0.052,0.063,0.204,0.19,0.064,0.152c-0.14-0.038-0.317-0.051-0.419,0.026c-0.101,0.076-0.279,0.241-0.279,0.241s-0.318,0.025-0.318,0.102c0,0.077,0,0.178-0.114,0.191c-0.115,0.013-0.268,0.05-0.42,0.076c-0.153,0.025-0.139,0.088-0.317,0.102s-0.204,0.089-0.038,0.114c0.165,0.025,0.418,0.127,0.431,0.241c0.014,0.114-0.013,0.242-0.076,0.356c-0.043,0.079-0.305,0.026-0.458,0.026c-0.152,0-0.456-0.051-0.584,0c-0.127,0.051-0.102,0.305-0.064,0.419c0.039,0.114-0.012,0.178-0.063,0.216c-0.051,0.038-0.065,0.152,0,0.204c0.063,0.051,0.114,0.165,0.166,0.178c0.051,0.013,0.215-0.038,0.279,0.025c0.064,0.064,0.127,0.216,0.165,0.178c0.039-0.038,0.089-0.203,0.153-0.166c0.064,0.039,0.216-0.012,0.331-0.025s0.177-0.14,0.292-0.204c0.114-0.063,0.05-0.063,0.013-0.14c-0.038-0.076,0.114-0.165,0.204-0.254c0.088-0.089,0.253-0.013,0.292-0.115c0.038-0.102,0.051-0.279,0.151-0.267c0.103,0.013,0.243,0.076,0.331,0.076c0.089,0,0.279-0.14,0.332-0.165c0.05-0.025,0.241-0.013,0.267,0.102c0.025,0.114,0.241,0.254,0.292,0.279c0.051,0.025,0.381,0.127,0.433,0.165c0.05,0.038,0.126,0.153,0.152,0.254c0.025,0.102,0.114,0.102,0.128,0.013c0.012-0.089-0.065-0.254,0.025-0.242c0.088,0.013,0.191-0.026,0.191-0.026s-0.243-0.165-0.331-0.203c-0.088-0.038-0.255-0.114-0.331-0.241c-0.076-0.127-0.267-0.153-0.254-0.279c0.013-0.127,0.191-0.051,0.292,0.051c0.102,0.102,0.356,0.241,0.445,0.33c0.088,0.089,0.229,0.127,0.267,0.242c0.039,0.114,0.152,0.241,0.19,0.292c0.038,0.051,0.165,0.331,0.204,0.394c0.038,0.063,0.165-0.012,0.229-0.063c0.063-0.051,0.179-0.076,0.191-0.178c0.013-0.102-0.153-0.178-0.203-0.216c-0.051-0.038,0.127-0.076,0.191-0.127c0.063-0.05,0.177-0.14,0.228-0.063c0.051,0.077,0.026,0.381,0.051,0.432c0.025,0.051,0.279,0.127,0.331,0.191c0.05,0.063,0.267,0.089,0.304,0.051c0.039-0.038,0.242,0.026,0.294,0.038c0.049,0.013,0.202-0.025,0.304-0.05c0.103-0.025,0.204-0.102,0.191,0.063c-0.013,0.165-0.051,0.419-0.179,0.546c-0.127,0.127-0.076,0.191-0.202,0.191c-0.06,0-0.113,0-0.156,0.021c-0.041-0.065-0.098-0.117-0.175-0.097c-0.152,0.038-0.344,0.038-0.47,0.19c-0.128,0.153-0.178,0.165-0.204,0.114c-0.025-0.051,0.369-0.267,0.317-0.331c-0.05-0.063-0.355-0.038-0.521-0.038c-0.166,0-0.305-0.102-0.433-0.127c-0.126-0.025-0.292,0.127-0.418,0.254c-0.128,0.127-0.216,0.038-0.331,0.038c-0.115,0-0.331-0.165-0.331-0.165s-0.216-0.089-0.305-0.089c-0.088,0-0.267-0.165-0.318-0.165c-0.05,0-0.19-0.115-0.088-0.166c0.101-0.05,0.202,0.051,0.101-0.229c-0.101-0.279-0.33-0.216-0.419-0.178c-0.088,0.039-0.724,0.025-0.775,0.025c-0.051,0-0.419,0.127-0.533,0.178c-0.116,0.051-0.318,0.115-0.369,0.14c-0.051,0.025-0.318-0.051-0.433,0.013c-0.151,0.084-0.291,0.216-0.33,0.216c-0.038,0-0.153,0.089-0.229,0.28c-0.077,0.19,0.013,0.355-0.128,0.419c-0.139,0.063-0.394,0.204-0.495,0.305c-0.102,0.101-0.229,0.458-0.355,0.623c-0.127,0.165,0,0.317,0.025,0.419c0.025,0.101,0.114,0.292-0.025,0.471c-0.14,0.178-0.127,0.266-0.191,0.279c-0.063,0.013,0.063,0.063,0.088,0.19c0.025,0.128-0.114,0.255,0.128,0.369c0.241,0.113,0.355,0.217,0.418,0.367c0.064,0.153,0.382,0.407,0.382,0.407s0.229,0.205,0.344,0.293c0.114,0.089,0.152,0.038,0.177-0.05c0.025-0.09,0.178-0.104,0.355-0.104c0.178,0,0.305,0.04,0.483,0.014c0.178-0.025,0.356-0.141,0.42-0.166c0.063-0.025,0.279-0.164,0.443-0.063c0.166,0.103,0.141,0.241,0.23,0.332c0.088,0.088,0.24,0.037,0.355-0.051c0.114-0.09,0.064-0.052,0.203,0.025c0.14,0.075,0.204,0.151,0.077,0.267c-0.128,0.113-0.051,0.293-0.128,0.47c-0.076,0.178-0.063,0.203,0.077,0.278c0.14,0.076,0.394,0.548,0.47,0.638c0.077,0.088-0.025,0.342,0.064,0.495c0.089,0.151,0.178,0.254,0.077,0.331c-0.103,0.075-0.28,0.216-0.292,0.47s0.051,0.431,0.102,0.521s0.177,0.331,0.241,0.419c0.064,0.089,0.14,0.305,0.152,0.445c0.013,0.14-0.024,0.306,0.039,0.381c0.064,0.076,0.102,0.191,0.216,0.292c0.115,0.103,0.152,0.318,0.152,0.318s0.039,0.089,0.051,0.229c0.012,0.14,0.025,0.228,0.152,0.292c0.126,0.063,0.215,0.076,0.28,0.013c0.063-0.063,0.381-0.077,0.546-0.063c0.165,0.013,0.355-0.075,0.521-0.19s0.407-0.419,0.496-0.508c0.089-0.09,0.292-0.255,0.268-0.356c-0.025-0.101-0.077-0.203,0.024-0.254c0.102-0.052,0.344-0.152,0.356-0.229c0.013-0.077-0.09-0.395-0.115-0.457c-0.024-0.064,0.064-0.18,0.165-0.306c0.103-0.128,0.421-0.216,0.471-0.267c0.051-0.053,0.191-0.267,0.217-0.433c0.024-0.167-0.051-0.369,0-0.457c0.05-0.09,0.013-0.165-0.103-0.268c-0.114-0.102-0.089-0.407-0.127-0.457c-0.037-0.051-0.013-0.319,0.063-0.345c0.076-0.023,0.242-0.279,0.344-0.393c0.102-0.114,0.394-0.47,0.534-0.496c0.139-0.025,0.355-0.229,0.368-0.343c0.013-0.115,0.38-0.547,0.394-0.635c0.013-0.09,0.166-0.42,0.102-0.497c-0.062-0.076-0.559,0.115-0.622,0.141c-0.064,0.025-0.241,0.127-0.446,0.113c-0.202-0.013-0.114-0.177-0.127-0.254c-0.012-0.076-0.228-0.368-0.279-0.381c-0.051-0.012-0.203-0.166-0.267-0.317c-0.063-0.153-0.152-0.343-0.254-0.458c-0.102-0.114-0.165-0.38-0.268-0.559c-0.101-0.178-0.189-0.407-0.279-0.572c-0.021-0.041-0.045-0.079-0.067-0.117c0.118-0.029,0.289-0.082,0.31-0.009c0.024,0.088,0.165,0.279,0.19,0.419s0.165,0.089,0.178,0.216c0.014,0.128,0.14,0.433,0.19,0.47c0.052,0.038,0.28,0.242,0.318,0.318c0.038,0.076,0.089,0.178,0.127,0.369c0.038,0.19,0.076,0.444,0.179,0.482c0.102,0.038,0.444-0.064,0.508-0.102s0.482-0.242,0.635-0.255c0.153-0.012,0.179-0.115,0.368-0.152c0.191-0.038,0.331-0.177,0.458-0.28c0.127-0.101,0.28-0.355,0.33-0.444c0.052-0.088,0.179-0.152,0.115-0.253c-0.063-0.103-0.331-0.254-0.433-0.268c-0.102-0.012-0.089-0.178-0.152-0.178s-0.051,0.088-0.178,0.153c-0.127,0.063-0.255,0.19-0.344,0.165s0.026-0.089-0.113-0.203s-0.192-0.14-0.192-0.228c0-0.089-0.278-0.255-0.304-0.382c-0.026-0.127,0.19-0.305,0.254-0.19c0.063,0.114,0.115,0.292,0.279,0.368c0.165,0.076,0.318,0.204,0.395,0.229c0.076,0.025,0.267-0.14,0.33-0.114c0.063,0.024,0.191,0.253,0.306,0.292c0.113,0.038,0.495,0.051,0.559,0.051s0.33,0.013,0.381-0.063c0.051-0.076,0.089-0.076,0.153-0.076c0.062,0,0.177,0.229,0.267,0.254c0.089,0.025,0.254,0.013,0.241,0.179c-0.012,0.164,0.076,0.305,0.165,0.317c0.09,0.012,0.293-0.191,0.293-0.191s0,0.318-0.012,0.433c-0.014,0.113,0.139,0.534,0.139,0.534s0.19,0.393,0.241,0.482s0.267,0.355,0.267,0.47c0,0.115,0.025,0.293,0.103,0.293c0.076,0,0.152-0.203,0.24-0.331c0.091-0.126,0.116-0.305,0.153-0.432c0.038-0.127,0.038-0.356,0.038-0.444c0-0.09,0.075-0.166,0.255-0.242c0.178-0.076,0.304-0.292,0.456-0.407c0.153-0.115,0.141-0.305,0.446-0.305c0.305,0,0.278,0,0.355-0.077c0.076-0.076,0.151-0.127,0.19,0.013c0.038,0.14,0.254,0.343,0.292,0.394c0.038,0.052,0.114,0.191,0.103,0.344c-0.013,0.152,0.012,0.33,0.075,0.33s0.191-0.216,0.191-0.216s0.279-0.189,0.267,0.013c-0.014,0.203,0.025,0.419,0.025,0.545c0,0.053,0.042,0.135,0.088,0.21c-0.005,0.059-0.004,0.119-0.009,0.178C27.388,17.153,27.387,17.327,27.436,17.39zM20.382,12.064c0.076,0.05,0.102,0.127,0.152,0.203c0.052,0.076,0.14,0.05,0.203,0.114c0.063,0.064-0.178,0.14-0.075,0.216c0.101,0.077,0.151,0.381,0.165,0.458c0.013,0.076-0.279,0.114-0.369,0.102c-0.089-0.013-0.354-0.102-0.445-0.127c-0.089-0.026-0.139-0.343-0.025-0.331c0.116,0.013,0.141-0.025,0.267-0.139c0.128-0.115-0.189-0.166-0.278-0.191c-0.089-0.025-0.268-0.305-0.331-0.394c-0.062-0.089-0.014-0.228,0.141-0.331c0.076-0.051,0.279,0.063,0.381,0c0.101-0.063,0.203-0.14,0.241-0.165c0.039-0.025,0.293,0.038,0.33,0.114c0.039,0.076,0.191,0.191,0.141,0.229c-0.052,0.038-0.281,0.076-0.356,0c-0.075-0.077-0.255,0.012-0.268,0.152C20.242,12.115,20.307,12.013,20.382,12.064zM16.875,12.28c-0.077-0.025,0.025-0.178,0.102-0.229c0.075-0.051,0.164-0.178,0.241-0.305c0.076-0.127,0.178-0.14,0.241-0.127c0.063,0.013,0.203,0.241,0.241,0.318c0.038,0.076,0.165-0.026,0.217-0.051c0.05-0.025,0.127-0.102,0.14-0.165s0.127-0.102,0.254-0.102s0.013,0.102-0.076,0.127c-0.09,0.025-0.038,0.077,0.113,0.127c0.153,0.051,0.293,0.191,0.459,0.279c0.165,0.089,0.19,0.267,0.088,0.292c-0.101,0.025-0.406,0.051-0.521,0.038c-0.114-0.013-0.254-0.127-0.419-0.153c-0.165-0.025-0.369-0.013-0.433,0.077s-0.292,0.05-0.395,0.05c-0.102,0-0.228,0.127-0.253,0.077C16.875,12.534,16.951,12.306,16.875,12.28zM17.307,9.458c0.063-0.178,0.419,0.038,0.355,0.127C17.599,9.675,17.264,9.579,17.307,9.458zM17.802,18.584c0.063,0.102-0.14,0.431-0.254,0.407c-0.113-0.027-0.076-0.318-0.038-0.382C17.548,18.545,17.769,18.529,17.802,18.584zM13.189,12.674c0.025-0.051-0.039-0.153-0.127-0.013C13.032,12.71,13.164,12.725,13.189,12.674zM20.813,8.035c0.141,0.076,0.339,0.107,0.433,0.013c0.076-0.076,0.013-0.204-0.05-0.216c-0.064-0.013-0.104-0.115,0.062-0.203c0.165-0.089,0.343-0.204,0.534-0.229c0.19-0.025,0.622-0.038,0.774,0c0.152,0.039,0.382-0.166,0.445-0.254s-0.203-0.152-0.279-0.051c-0.077,0.102-0.444,0.076-0.521,0.051c-0.076-0.025-0.686,0.102-0.812,0.102c-0.128,0-0.179,0.152-0.356,0.229c-0.179,0.076-0.42,0.191-0.509,0.229c-0.088,0.038-0.177,0.19-0.101,0.216C20.509,7.947,20.674,7.959,20.813,8.035zM14.142,12.674c0.064-0.089-0.051-0.217-0.114-0.217c-0.12,0-0.178,0.191-0.103,0.254C14.002,12.776,14.078,12.763,14.142,12.674zM14.714,13.017c0.064,0.025,0.114,0.102,0.165,0.114c0.052,0.013,0.217,0,0.167-0.127s-0.167-0.127-0.204-0.127c-0.038,0-0.203-0.038-0.267,0C14.528,12.905,14.65,12.992,14.714,13.017zM11.308,10.958c0.101,0.013,0.217-0.063,0.305-0.101c0.088-0.038,0.216-0.114,0.216-0.229c0-0.114-0.025-0.216-0.077-0.267c-0.051-0.051-0.14-0.064-0.216-0.051c-0.115,0.02-0.127,0.14-0.203,0.14c-0.076,0-0.165,0.025-0.14,0.114s0.077,0.152,0,0.19C11.117,10.793,11.205,10.946,11.308,10.958zM11.931,10.412c0.127,0.051,0.394,0.102,0.292,0.153c-0.102,0.051-0.28,0.19-0.305,0.267s0.216,0.153,0.216,0.153s-0.077,0.089-0.013,0.114c0.063,0.025,0.102-0.089,0.203-0.089c0.101,0,0.304,0.063,0.406,0.063c0.103,0,0.267-0.14,0.254-0.229c-0.013-0.089-0.14-0.229-0.254-0.28c-0.113-0.051-0.241-0.28-0.317-0.331c-0.076-0.051,0.076-0.178-0.013-0.267c-0.09-0.089-0.153-0.076-0.255-0.14c-0.102-0.063-0.191,0.013-0.254,0.089c-0.063,0.076-0.14-0.013-0.217,0.012c-0.102,0.035-0.063,0.166-0.012,0.229C11.714,10.221,11.804,10.361,11.931,10.412zM24.729,17.198c-0.083,0.037-0.153,0.47,0,0.521c0.152,0.052,0.241-0.202,0.191-0.267C24.868,17.39,24.843,17.147,24.729,17.198zM20.114,20.464c-0.159-0.045-0.177,0.166-0.304,0.306c-0.128,0.141-0.267,0.254-0.317,0.241c-0.052-0.013-0.331,0.089-0.242,0.279c0.089,0.191,0.076,0.382-0.013,0.472c-0.089,0.088,0.076,0.342,0.052,0.482c-0.026,0.139,0.037,0.229,0.215,0.229s0.242-0.064,0.318-0.229c0.076-0.166,0.088-0.331,0.164-0.47c0.077-0.141,0.141-0.434,0.179-0.51c0.038-0.075,0.114-0.316,0.102-0.457C20.254,20.669,20.204,20.489,20.114,20.464zM10.391,8.802c-0.069-0.06-0.229-0.102-0.306-0.11c-0.076-0.008-0.152,0.06-0.321,0.06c-0.168,0-0.279,0.067-0.347,0C9.349,8.684,9.068,8.65,9.042,8.692C9.008,8.749,8.941,8.751,9.008,8.87c0.069,0.118,0.12,0.186,0.179,0.178s0.262-0.017,0.288,0.051C9.5,9.167,9.569,9.226,9.712,9.184c0.145-0.042,0.263-0.068,0.296-0.119c0.033-0.051,0.263-0.059,0.263-0.059S10.458,8.861,10.391,8.802z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.GlobeAlt2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.GlobeAlt2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.GlobeAlt2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.GlobeAlt2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM8.251,7.48c0.122,0.055,0.255,0.104,0.28,0.137C8.57,7.668,8.621,7.823,8.557,7.861C8.492,7.9,8.39,7.887,8.376,7.771c-0.013-0.115-0.026-0.128-0.18-0.18c-0.022-0.007-0.035-0.01-0.051-0.015C8.18,7.544,8.216,7.512,8.251,7.48zM7.733,7.974c0.031,0.087,0.113,0.125,0,0.17C7.673,8.168,7.611,8.172,7.559,8.165C7.617,8.102,7.672,8.035,7.733,7.974zM16,27.533C9.639,27.533,4.466,22.36,4.466,16c0-0.085,0.011-0.168,0.013-0.254c0.004-0.003,0.008-0.006,0.012-0.009c0.129-0.102,0.283-0.359,0.334-0.45c0.052-0.089,0.181-0.154,0.116-0.256c-0.059-0.096-0.292-0.23-0.407-0.261c0.01-0.099,0.032-0.195,0.045-0.294c0.063,0.077,0.137,0.17,0.208,0.194c0.115,0.038,0.501,0.052,0.566,0.052c0.063,0,0.334,0.014,0.386-0.064c0.051-0.077,0.09-0.077,0.154-0.077c0.064,0,0.18,0.231,0.271,0.257c0.089,0.026,0.257,0.013,0.244,0.181c-0.012,0.166,0.077,0.309,0.167,0.321c0.09,0.013,0.296-0.194,0.296-0.194s0,0.322-0.012,0.438C6.846,15.698,7,16.124,7,16.124s0.193,0.397,0.244,0.488c0.052,0.09,0.27,0.36,0.27,0.476c0,0.117,0.026,0.297,0.104,0.297s0.155-0.206,0.244-0.335c0.091-0.128,0.117-0.31,0.155-0.438c0.039-0.129,0.039-0.36,0.039-0.45c0-0.091,0.076-0.168,0.257-0.245c0.181-0.077,0.309-0.296,0.463-0.412c0.155-0.116,0.142-0.309,0.452-0.309c0.308,0,0.282,0,0.36-0.078c0.077-0.077,0.154-0.128,0.192,0.013c0.039,0.142,0.257,0.347,0.296,0.399c0.039,0.052,0.116,0.193,0.104,0.348c-0.013,0.153,0.012,0.334,0.077,0.334c0.064,0,0.193-0.219,0.193-0.219s0.283-0.192,0.27,0.014c-0.014,0.205,0.025,0.425,0.025,0.552c0,0.13,0.232,0.438,0.232,0.362c0-0.079,0.103-0.296,0.103-0.413c0-0.114,0.064-0.063,0.231,0.051c0.167,0.116,0.283,0.349,0.283,0.349s0.168,0.154,0.193,0.219c0.026,0.064,0.206-0.025,0.244-0.104c0.039-0.076,0.065-0.115,0.167-0.141c0.104-0.026,0.231-0.026,0.271-0.168c0.039-0.142,0.154-0.308,0-0.502c-0.154-0.193-0.232-0.321-0.347-0.412c-0.117-0.09-0.206-0.322-0.206-0.322s0.244-0.218,0.321-0.296c0.079-0.077,0.193-0.025,0.207,0.064c0.013,0.091-0.115,0.168-0.141,0.361c-0.026,0.192,0.154,0.257,0.206,0.192c0.051-0.065,0.18-0.219,0.18-0.257c0-0.039-0.089-0.026-0.102-0.167c-0.013-0.142,0.166-0.245,0.23-0.207c0.066,0.039,0.477-0.051,0.67-0.154s0.308-0.322,0.425-0.412c0.116-0.089,0.515-0.386,0.489-0.527c-0.026-0.142,0.012-0.334-0.09-0.515c-0.103-0.18-0.232-0.295-0.283-0.373c-0.051-0.077,0.219-0.09,0.347-0.206c0.129-0.116,0-0.219-0.064-0.206c-0.064,0.013-0.232,0.052-0.296,0.039c-0.064-0.013-0.103-0.077-0.206-0.155c-0.102-0.077,0.026-0.192,0.091-0.179c0.064,0.013,0.23-0.129,0.308-0.193c0.077-0.064,0.193-0.115,0.154-0.051c-0.038,0.064-0.128,0.296-0.026,0.309c0.104,0.013,0.348-0.193,0.388-0.18c0.038,0.013,0.102,0.18,0.064,0.257c-0.039,0.077-0.039,0.206,0.013,0.193c0.051-0.013,0.154-0.129,0.18-0.09c0.027,0.039,0.154,0.116,0.09,0.257c-0.063,0.142-0.193,0.193-0.039,0.284c0.154,0.089,0.206,0.012,0.322-0.052c0.115-0.064,0.193-0.347,0.128-0.438c-0.064-0.09-0.218-0.27-0.218-0.334c0-0.064,0.257-0.064,0.257-0.167s0.09-0.18,0.18-0.219c0.091-0.039,0.206-0.206,0.244-0.154c0.039,0.052,0.271,0.116,0.334,0.039c0.064-0.077,0.4-0.36,0.605-0.515c0.206-0.154,0.283-0.334,0.336-0.515c0.051-0.18,0.128-0.296,0.102-0.437v0c0.077,0.18,0.09,0.309,0.077,0.45c-0.013,0.142,0,0.438,0.026,0.476c0.025,0.039,0.129,0.128,0.192,0.103c0.064-0.025-0.025-0.283-0.025-0.334c0-0.052,0.09-0.129,0.142-0.142c0.052-0.013,0-0.231-0.065-0.322c-0.063-0.09-0.154-0.142-0.102-0.154c0.051-0.013,0.115-0.116,0.077-0.142c-0.039-0.025-0.014-0.116-0.103-0.09c-0.065,0.019-0.241-0.015-0.235,0.095c-0.037-0.11-0.116-0.183-0.216-0.172c-0.116,0.013-0.181,0.077-0.296,0.077s-0.025-0.18-0.077-0.18c-0.051,0-0.168,0.167-0.231,0.077c-0.064-0.09,0.18-0.206,0.373-0.27c0.192-0.064,0.514-0.438,0.644-0.451c0.128-0.013,0.45,0.026,0.733,0.013c0.283-0.013,0.373-0.129,0.463-0.064s0.283,0.142,0.399,0.129c0.116-0.014,0.064,0,0.244-0.129c0.18-0.129,0.348-0.193,0.438-0.296c0.09-0.103,0.335-0.18,0.348-0.077c0.014,0.103-0.026,0.206,0.077,0.206s0.258-0.103,0.386-0.154c0.129-0.051,0.231-0.116,0.231-0.116s-0.527,0.36-0.655,0.438c-0.129,0.077-0.438,0.129-0.567,0.283c-0.128,0.155-0.205,0.206-0.192,0.374c0.014,0.167,0.231,0.386,0.128,0.54c-0.103,0.154-0.141,0.373-0.141,0.373s0.154-0.219,0.373-0.36s0.348-0.334,0.425-0.412s0.309-0.091,0.309-0.181s0.064-0.206,0.104-0.309c0.038-0.103-0.077-0.078,0-0.206c0.076-0.129,0.064-0.232,0.45-0.232s0.257,0.026,0.566,0.013c0.309-0.013,0.424-0.167,0.72-0.245c0.296-0.077,0.527-0.128,0.618-0.089c0.09,0.038,0.232,0.012,0.141-0.078c-0.089-0.09-0.295-0.219-0.193-0.245c0.104-0.026,0.207-0.039,0.246-0.142c0.039-0.103-0.142-0.283-0.039-0.386c0.104-0.103-0.077-0.231-0.207-0.257c-0.128-0.025-0.63,0.026-0.731-0.025c-0.104-0.052-0.271-0.116-0.322-0.078c-0.052,0.039-0.168,0.245-0.168,0.245s-0.09,0.025-0.168-0.09c-0.076-0.116-0.5-0.103-0.629-0.103s-0.271,0.025-0.413,0.039c-0.141,0.013-0.219,0.052-0.322-0.039c-0.102-0.09-0.243-0.129-0.296-0.167c-0.051-0.039-0.334-0.039-0.553-0.012c-0.218,0.025-0.438,0.025-0.438,0.025s-0.104-0.039-0.257-0.129c-0.154-0.09-0.309-0.154-0.361-0.154c-0.051,0-0.449,0.064-0.539,0c-0.091-0.064-0.181-0.103-0.245-0.103s-0.115-0.103-0.038-0.103s0.437-0.103,0.437-0.103s-0.103-0.142-0.231-0.142c-0.128,0-0.359-0.064-0.424-0.064s-0.014,0.064-0.142,0.039c-0.13-0.026-0.258-0.078-0.335-0.026c-0.076,0.051-0.258,0.128-0.064,0.18c0.193,0.052,0.373,0,0.425,0.078c0.052,0.077,0,0.115,0,0.167s-0.103,0.193-0.167,0.219c-0.064,0.025-0.143-0.039-0.27,0.025c-0.129,0.064-0.451,0.013-0.49,0.052c-0.038,0.039-0.115-0.103-0.18-0.077c-0.064,0.025-0.232,0.193-0.322,0.18c-0.089-0.013-0.206-0.103-0.206-0.206s-0.038-0.232-0.077-0.258c-0.038-0.025-0.322-0.039-0.425-0.025c-0.103,0.013-0.424,0.038-0.477,0.09c-0.052,0.052-0.193,0.09-0.283,0.09s-0.167-0.09-0.36-0.116c-0.192-0.026-0.617-0.039-0.669-0.026s-0.218-0.025-0.155-0.077c0.065-0.051,0.257-0.219,0.143-0.295c-0.117-0.078-0.375-0.078-0.489-0.09c-0.117-0.013-0.232-0.039-0.413-0.013c-0.181,0.026-0.219,0.116-0.296,0.039c-0.077-0.077,0.193,0.039-0.077-0.077c-0.27-0.116-0.399-0.103-0.477-0.064c-0.077,0.039,0.013,0.025-0.192,0.103c-0.206,0.078-0.322,0.116-0.374,0.129c-0.051,0.012-0.372-0.065-0.411-0.091c-0.038-0.025-0.181,0.013-0.309,0.064S9.895,7.025,9.767,7C9.638,6.973,9.432,6.973,9.303,7.025C9.174,7.076,9.084,7.076,8.956,7.166c-0.13,0.09-0.373,0.142-0.373,0.142S8.522,7.305,8.448,7.301C10.474,5.541,13.111,4.466,16,4.466c6.361,0,11.534,5.173,11.534,11.534S22.36,27.533,16,27.533zM14.888,19.92c0,0,0.207-0.026,0.207-0.117c0-0.089-0.207-0.205-0.282-0.102c-0.078,0.102-0.219,0.205-0.207,0.296C14.625,20.138,14.888,19.92,14.888,19.92zM14.875,17.023c-0.181,0.233-0.167,0.182-0.296,0.128c-0.128-0.05-0.334,0.116-0.296,0.182c0.039,0.064,0.322-0.014,0.386,0.102c0.065,0.116,0.065,0.129,0.193,0.104c0.128-0.026,0.257-0.205,0.219-0.295C15.043,17.151,14.875,17.023,14.875,17.023zM14.837,18.245c-0.051,0-0.412,0.064-0.451,0.079c-0.039,0.013-0.27-0.025-0.27-0.025c-0.09,0.089-0.026,0.179,0.116,0.166s0.438-0.052,0.502-0.052C14.799,18.413,14.888,18.245,14.837,18.245zM14.284,14.668c-0.19,0.03-0.308,0.438-0.155,0.425C14.284,15.081,14.451,14.643,14.284,14.668zM14.734,16.959c-0.052-0.064-0.181-0.271-0.323-0.219c-0.042,0.017-0.153,0.245-0.012,0.245C14.541,16.985,14.786,17.023,14.734,16.959zM14.85,16.805c0.232-0.013,0.167-0.245-0.013-0.257C14.786,16.544,14.618,16.818,14.85,16.805zM17.591,18.928c-0.193-0.039-0.244-0.102-0.45-0.205c-0.207-0.103-0.67-0.103-0.682-0.039c-0.014,0.064,0,0-0.155-0.05c-0.153-0.054-0.271,0-0.309-0.091c-0.038-0.091-0.128-0.117-0.244-0.002c-0.097,0.097-0.142,0.104,0.078,0.143c0.218,0.039,0.283,0.039,0.192,0.141c-0.09,0.104-0.154,0.233-0.077,0.244c0.077,0.015,0.309-0.05,0.334,0c0.026,0.054-0.051,0.064,0.207,0.105c0.258,0.037,0.309,0.128,0.359,0.178c0.051,0.052,0.206,0.22,0.104,0.22c-0.104,0-0.219,0.128-0.142,0.143c0.077,0.013,0.309-0.039,0.321,0c0.014,0.037,0.143,0.283,0.271,0.271c0.129-0.013,0.206-0.244,0.27-0.31c0.065-0.064,0.322-0.104,0.349,0.012c0.026,0.116,0.104,0.233,0.257,0.311c0.154,0.076,0.335,0.154,0.348,0.089c0.013-0.064-0.077-0.309-0.181-0.346c-0.103-0.041-0.282-0.259-0.282-0.348c0-0.091-0.155-0.117-0.232-0.182C17.849,19.147,17.784,18.967,17.591,18.928zM8.042,17.023c-0.084,0.037-0.155,0.476,0,0.527c0.154,0.052,0.244-0.205,0.193-0.271C8.183,17.218,8.158,16.973,8.042,17.023zM15.429,18.117c-0.118-0.05-0.335,0.424-0.181,0.463C15.403,18.62,15.518,18.156,15.429,18.117zM15.687,13.703c0.077,0,0.18-0.051,0.18-0.193c0-0.142,0.18,0,0.27-0.013s0.141-0.103,0.18-0.206c0.005-0.013,0.008-0.021,0.009-0.027c-0.003,0.024-0.001,0.093,0.095,0.117c0.154,0.038,0.205-0.064,0.205-0.103s0.283-0.103,0.336-0.142c0.051-0.038,0.258-0.103,0.27-0.154c0.013-0.051,0-0.348,0.064-0.373c0.064-0.026,0.154-0.026,0.052-0.206c-0.104-0.181-0.104-0.348-0.232-0.271c-0.095,0.057-0.038,0.284-0.115,0.438s-0.142,0.296-0.193,0.296s-0.321,0.103-0.399,0.18c-0.076,0.077-0.45-0.064-0.501,0c-0.052,0.064-0.154,0.141-0.219,0.193c-0.065,0.051-0.245,0.013-0.207,0.167C15.518,13.562,15.609,13.703,15.687,13.703zM17.449,12.056c0.18-0.013,0.348-0.064,0.348-0.064s0.271,0.013,0.232-0.116c-0.04-0.128-0.322-0.141-0.375-0.128c-0.051,0.013-0.142-0.142-0.244-0.116c-0.096,0.023-0.128,0.155-0.128,0.193c0,0.039-0.36,0.115-0.245,0.219C17.153,12.146,17.27,12.069,17.449,12.056zM13.91,19.058c0.104,0.064,0.296-0.219,0.349-0.13c0.051,0.091-0.013,0.13,0.076,0.246c0.091,0.114,0.258,0.102,0.258,0.102s-0.013-0.309-0.155-0.387c-0.142-0.077-0.232-0.166-0.064-0.141c0.167,0.026,0.257-0.039,0.219-0.114c-0.039-0.078-0.283-0.039-0.361-0.026s-0.193-0.052-0.193-0.052c-0.077,0.024-0.063,0.089-0.09,0.219C13.923,18.902,13.807,18.992,13.91,19.058zM20.924,21.618c-0.231-0.052-0.077,0.039,0,0.154c0.077,0.116,0.232,0.176,0.258,0.05C21.193,21.759,21.155,21.67,20.924,21.618zM21.915,24.744c-0.077,0.064,0,0.091-0.219,0.22c-0.22,0.13-0.49,0.271-0.541,0.386c-0.052,0.116,0.051,0.181,0.258,0.192c0.206,0.013,0.154,0.053,0.296-0.103s0.271-0.244,0.438-0.373c0.168-0.128,0.168-0.322,0.168-0.322s-0.181-0.178-0.193-0.141C22.1,24.665,21.992,24.681,21.915,24.744zM18.504,21.618c0.014-0.116-0.219-0.116-0.334-0.207c-0.116-0.089-0.128-0.359-0.193-0.515c-0.064-0.153-0.192-0.257-0.322-0.397c-0.128-0.143-0.192-0.465-0.23-0.438c-0.039,0.025-0.154,0.399-0.064,0.515c0.09,0.116-0.039,0.348-0.103,0.503c-0.065,0.153-0.22-0.026-0.349-0.104c-0.129-0.078-0.308-0.128-0.398-0.219c-0.09-0.091,0.155-0.335,0.091-0.426c-0.065-0.09-0.412-0.013-0.45-0.013c-0.039,0-0.116-0.128-0.194-0.128c-0.077,0-0.064,0.258-0.064,0.258s-0.078-0.091-0.193-0.207c-0.117-0.115,0.012,0.077-0.103,0.193c-0.117,0.117-0.079,0.078-0.129,0.206c-0.051,0.129-0.167,0.077-0.283-0.052c-0.116-0.128-0.179-0.037-0.258,0c-0.077,0.039-0.141,0.259-0.18,0.309c-0.039,0.052-0.309,0.117-0.374,0.182c-0.064,0.062-0.09,0.27-0.09,0.322c0,0.05-0.271,0.023-0.361,0.089c-0.09,0.064-0.23,0.025-0.321,0.025c-0.09,0-0.399,0.244-0.502,0.308c-0.103,0.066-0.103,0.298-0.051,0.362c0.051,0.063,0.154,0.219,0.09,0.244c-0.064,0.026-0.104,0.206,0.051,0.359c0.154,0.155,0.103,0.194,0.115,0.271c0.014,0.077,0.078,0.104,0.181,0.232c0.102,0.128-0.181,0.231-0.219,0.31c-0.039,0.076,0.091,0.192,0.167,0.257c0.077,0.063,0.271,0.026,0.386-0.013c0.117-0.039,0.245-0.143,0.321-0.155c0.079-0.013,0.438-0.026,0.438-0.026s0.129-0.192,0.219-0.296c0.089-0.102,0.372-0.013,0.372-0.013s0.117-0.076,0.426-0.141c0.309-0.065,0.179,0.064,0.296,0.104c0.115,0.037,0.27,0.062,0.359,0.128c0.09,0.064,0,0.218-0.012,0.283c-0.014,0.064,0.219,0.038,0.23-0.026c0.014-0.064,0.077-0.128,0.207-0.205c0.128-0.078,0.025,0.114,0.076,0.231c0.052,0.116,0.129-0.157,0.129-0.026c0,0.039,0.039,0.078,0.051,0.116c0.014,0.039,0.181,0.052,0.181,0.18c0,0.13,0,0.207,0.039,0.231c0.038,0.026,0.244,0,0.335,0.155c0.089,0.154,0.154,0.013,0.205-0.052c0.052-0.064,0.231,0.026,0.283,0.078c0.052,0.05,0.193-0.104,0.387-0.155c0.192-0.051,0.167-0.039,0.219-0.115c0.051-0.078,0.09-0.283,0.205-0.438c0.115-0.153,0.271-0.424,0.271-0.631c0-0.206-0.014-0.682-0.155-0.899C18.761,21.953,18.492,21.733,18.504,21.618zM18.029,24.77c-0.065-0.013-0.207-0.062-0.207-0.062c-0.142,0.141,0.142,0.141,0.104,0.283c-0.039,0.141,0.193,0.089,0.257,0.064c0.063-0.027,0.22-0.323,0.193-0.399C18.351,24.577,18.093,24.783,18.029,24.77zM22.803,24.178c-0.052,0-0.077,0.064-0.192,0c-0.117-0.063-0.091-0.037-0.168-0.167c-0.077-0.127-0.091-0.296-0.219-0.23c-0.051,0.025,0,0.168,0.051,0.218c0.053,0.052,0.077,0.231,0.064,0.283c-0.012,0.052-0.231,0.116-0.129,0.18c0.104,0.064,0.297,0,0.271,0.078c-0.025,0.077-0.129,0.179-0.013,0.205c0.115,0.025,0.154-0.089,0.207-0.178c0.051-0.093,0.089-0.169,0.179-0.221C22.944,24.294,22.854,24.178,22.803,24.178zM22.815,21.18c0.168,0.064,0.464-0.231,0.347-0.27C23.047,20.871,22.815,21.18,22.815,21.18zM13.923,19.906c-0.029,0.115,0.193,0.167,0.206,0.039C14.141,19.816,13.949,19.803,13.923,19.906zM14.27,16.47c-0.064,0.065-0.257,0.193-0.283,0.31c-0.025,0.115,0.309-0.182,0.399-0.296c0.091-0.117,0.27-0.052,0.308-0.117c0.04-0.063,0.04-0.063,0.04-0.063s-0.142-0.025-0.257-0.063c-0.117-0.039-0.258,0.102-0.193-0.104c0.064-0.206,0.257-0.167,0.219-0.322c-0.039-0.154-0.168-0.193-0.207-0.193c-0.09,0,0.013,0.141-0.116,0.231c-0.128,0.09-0.271,0.128-0.193,0.283C14.064,16.29,14.334,16.405,14.27,16.47zM13.254,19.751c0.013-0.076-0.142-0.192-0.206-0.192c-0.065,0-0.386-0.077-0.386-0.077c-0.058,0.023-0.135,0.045-0.158,0.077c-0.007-0.011-0.022-0.024-0.049-0.039c-0.142-0.075-0.309,0-0.361-0.102c-0.05-0.104-0.127-0.104-0.179-0.039c-0.094,0.117,0.025,0.206,0.063,0.231c0.038,0.024,0.181,0.052,0.309,0.039c0.08-0.008,0.181-0.027,0.21-0.059c0.004,0.014,0.016,0.027,0.035,0.044c0.103,0.092,0.167,0.13,0.321,0.116C13.009,19.74,13.241,19.829,13.254,19.751zM12.881,18.992c0.065,0,0.193,0,0.283,0.026c0.09,0.025,0.386,0.05,0.373-0.064c-0.013-0.115-0.038-0.297,0.089-0.411c0.13-0.117,0.257-0.18,0.193-0.348c-0.063-0.167-0.193-0.271-0.103-0.349c0.09-0.076,0.192-0.102,0.192-0.166c0-0.065-0.217,0.18-0.244-0.246c-0.005-0.091-0.206,0.025-0.219,0.116c-0.012,0.091,0.142,0.167-0.103,0.167c-0.245,0-0.257,0.194-0.309,0.232c-0.052,0.039-0.103,0.051-0.207,0.076c-0.102,0.026-0.127,0.13-0.153,0.194c-0.025,0.063-0.206-0.116-0.257-0.064c-0.051,0.052-0.013,0.296,0.077,0.501C12.585,18.863,12.816,18.992,12.881,18.992zM11.979,18.928c0.065-0.077,0.038-0.192-0.063-0.18c-0.103,0.013-0.193-0.168-0.36-0.283c-0.168-0.114-0.296-0.194-0.451-0.36c-0.154-0.167-0.347-0.271-0.45-0.359c-0.104-0.091-0.257-0.13-0.322-0.116c-0.159,0.032,0.231,0.309,0.271,0.346c0.039,0.041,0.387,0.335,0.387,0.478s0.231,0.476,0.296,0.527c0.064,0.052,0.385,0.244,0.437,0.348c0.052,0.103,0.167,0.13,0.167-0.013C11.89,19.174,11.916,19.006,11.979,18.928zM11.002,17.474c0.064,0.232,0.193,0.464,0.244,0.555c0.052,0.089,0.271,0.217,0.348,0.281c0.077,0.064,0.192-0.024,0.143-0.102c-0.052-0.078-0.155-0.192-0.167-0.283c-0.013-0.091-0.078-0.233-0.181-0.387c-0.102-0.153-0.192-0.192-0.257-0.295c-0.064-0.104-0.296-0.297-0.296-0.297c-0.102,0.013-0.102,0.205-0.051,0.271C10.834,17.28,10.938,17.243,11.002,17.474z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Hail();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Hail = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Hail.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Hail\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM11.503,23.709c-0.784-0.002-1.418-0.636-1.418-1.416c0-0.785,0.634-1.416,1.418-1.418c0.78,0.002,1.413,0.633,1.416,1.418C12.917,23.073,12.284,23.707,11.503,23.709zM19.002,23.709c-0.783-0.002-1.418-0.636-1.418-1.416c0-0.785,0.635-1.416,1.418-1.418c0.779,0.002,1.414,0.633,1.414,1.418C20.417,23.073,19.784,23.707,19.002,23.709zM7.503,28.771c-0.783-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.415,0.635,1.415,1.416C8.917,28.135,8.284,28.77,7.503,28.771zM15.001,28.771c-0.782-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.413,0.635,1.415,1.416C16.415,28.135,15.784,28.77,15.001,28.771zM22.5,28.771c-0.782-0.002-1.416-0.634-1.416-1.416c0-0.785,0.634-1.418,1.416-1.42c0.781,0.002,1.414,0.635,1.418,1.42C23.915,28.138,23.282,28.77,22.5,28.771z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Hammer();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Hammer = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Hammer.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Hammer\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M7.831,29.354c0.685,0.353,1.62,1.178,2.344,0.876c0.475-0.195,0.753-1.301,1.048-1.883c2.221-4.376,4.635-9.353,6.392-13.611c0-0.19,0.101-0.337-0.049-0.595c0.983-1.6,1.65-3.358,2.724-5.138c0.34-0.566,0.686-1.351,1.163-1.577l0.881-0.368c1.12-0.288,1.938-0.278,2.719,0.473c0.396,0.383,0.578,1.015,0.961,1.395c0.259,0.26,1.246,0.899,1.613,0.8c0.285-0.077,0.52-0.364,0.72-0.728l0.696-1.286c0.195-0.366,0.306-0.718,0.215-0.999c-0.117-0.362-1.192-0.84-1.552-0.915c-0.528-0.113-1.154,0.081-1.692-0.041c-1.057-0.243-1.513-0.922-1.883-2.02c-2.608-1.533-6.119-2.53-10.207-1.244c-1.109,0.349-2.172,0.614-2.901,1.323c-0.146,0.412,0.143,0.494,0.446,0.489c-0.237,0.216-0.62,0.341-0.399,0.848c2.495-1.146,7.34-1.542,7.669,0.804c0.072,0.522-0.395,1.241-0.682,1.835c-0.905,1.874-2.011,3.394-2.813,5.091c-0.298,0.017-0.366,0.18-0.525,0.287c-2.604,3.8-5.451,8.541-7.9,12.794c-0.326,0.566-1.098,1.402-1.002,1.906C5.961,28.641,7.146,29,7.831,29.354z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.HammerAndScrewDriver();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.HammerAndScrewDriver = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.HammerAndScrewDriver.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.HammerAndScrewDriver\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.537,9.859c-0.473-0.259-1.127-0.252-1.609-0.523c-0.943-0.534-1.186-1.316-1.226-2.475c-2.059-2.215-5.138-4.176-9.424-4.114c-1.162,0.017-2.256-0.035-3.158,0.435c-0.258,0.354-0.004,0.516,0.288,0.599c-0.29,0.138-0.692,0.147-0.626,0.697c2.72-0.383,7.475,0.624,7.116,2.966c-0.08,0.521-0.735,1.076-1.179,1.563c-1.263,1.382-2.599,2.45-3.761,3.667l0.336,0.336c0.742-0.521,1.446-0.785,2.104-0.785c0.707,0,1.121,0.297,1.276,0.433c0.575-0.618,1.166-1.244,1.839-1.853c0.488-0.444,1.047-1.099,1.566-1.178l0.949-0.101c1.156,0.047,1.937,0.29,2.471,1.232c0.27,0.481,0.262,1.139,0.521,1.613c0.175,0.324,0.937,1.218,1.316,1.228c0.294,0.009,0.603-0.199,0.899-0.49l1.033-1.034c0.291-0.294,0.501-0.6,0.492-0.896C29.754,10.801,28.861,10.035,28.537,9.859zM13.021,15.353l-0.741-0.741c-3.139,2.643-6.52,5.738-9.531,8.589c-0.473,0.443-1.452,1.021-1.506,1.539c-0.083,0.781,0.95,1.465,1.506,2c0.556,0.533,1.212,1.602,1.994,1.51c0.509-0.043,1.095-1.029,1.544-1.502c2.255-2.374,4.664-4.976,6.883-7.509c-0.312-0.371-0.498-0.596-0.498-0.596C12.535,18.451,11.779,17.272,13.021,15.353zM20.64,15.643c-0.366-0.318-1.466,0.143-1.777-0.122c-0.311-0.266,0.171-1.259-0.061-1.455c-0.482-0.406-0.77-0.646-0.77-0.646s-0.862-0.829-2.812,0.928L7.44,6.569C7.045,6.173,7.203,4.746,7.203,4.746L3.517,2.646L2.623,3.541l2.1,3.686c0,0,1.428-0.158,1.824,0.237l7.792,7.793c-1.548,1.831-0.895,2.752-0.895,2.752s0.238,0.288,0.646,0.771c0.196,0.23,1.188-0.249,1.455,0.061c0.264,0.312-0.196,1.41,0.12,1.777c2.666,3.064,6.926,7.736,8.125,7.736c0.892,0,2.021-0.724,2.948-1.64c0.925-0.917,1.639-2.055,1.639-2.947C28.377,22.567,23.704,18.309,20.64,15.643z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.HangUp();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.HangUp = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.HangUp.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.HangUp\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.563,10.494c-7.35-7.349-19.265-7.348-26.612,0.001c-1.796,1.796-0.247,6.84-0.247,6.84c0.135,0.443,0.616,0.72,1.067,0.614l6.898-1.604c0.451-0.105,0.82-0.57,0.82-1.033l0.001-3.685c0-0.463,0.379-0.842,0.842-0.842h8.285c0.464,0,0.843,0.379,0.843,0.842l-0.001,3.471c0.001,0.462,0.375,0.907,0.83,0.986l7.635,1.316c0.456,0.08,0.873-0.232,0.926-0.692C29.851,16.708,30.359,12.29,28.563,10.494zM17.264,14.072h-3.501v4.39h-2.625l4.363,7.556l4.363-7.556h-2.6V14.072z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Help();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Help = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Help.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Help\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.834,4.834L4.833,4.833c-5.889,5.892-5.89,15.443,0.001,21.334s15.44,5.888,21.33-0.002c5.891-5.891,5.893-15.44,0.002-21.33C20.275-1.056,10.725-1.056,4.834,4.834zM25.459,5.542c0.833,0.836,1.523,1.757,2.104,2.726l-4.08,4.08c-0.418-1.062-1.053-2.06-1.912-2.918c-0.859-0.859-1.857-1.494-2.92-1.913l4.08-4.08C23.7,4.018,24.622,4.709,25.459,5.542zM10.139,20.862c-2.958-2.968-2.959-7.758-0.001-10.725c2.966-2.957,7.756-2.957,10.725,0c2.954,2.965,2.955,7.757-0.001,10.724C17.896,23.819,13.104,23.817,10.139,20.862zM5.542,25.459c-0.833-0.837-1.524-1.759-2.105-2.728l4.081-4.081c0.418,1.063,1.055,2.06,1.914,2.919c0.858,0.859,1.855,1.494,2.917,1.913l-4.081,4.081C7.299,26.982,6.379,26.292,5.542,25.459zM8.268,3.435l4.082,4.082C11.288,7.935,10.29,8.571,9.43,9.43c-0.858,0.859-1.494,1.855-1.912,2.918L3.436,8.267c0.58-0.969,1.271-1.89,2.105-2.727C6.377,4.707,7.299,4.016,8.268,3.435zM22.732,27.563l-4.082-4.082c1.062-0.418,2.061-1.053,2.919-1.912c0.859-0.859,1.495-1.857,1.913-2.92l4.082,4.082c-0.58,0.969-1.271,1.891-2.105,2.728C24.623,26.292,23.701,26.983,22.732,27.563z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.History();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.History = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.History.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.History\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.666,18.292c0.275,0.479,0.889,0.644,1.365,0.367l3.305-1.677C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876c0-0.552-0.448-1-1-1c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96C10.553,17.204,10.389,17.816,10.666,18.292zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.888,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM6.624,15.5c0,0.553,0.449,1,1,1c0.552,0,1-0.447,1.001-1c-0.001-0.552-0.448-0.999-1.001-1C7.071,14.5,6.624,14.948,6.624,15.5zM14.501,23.377c0,0.553,0.448,1,1,1c0.552,0,1-0.447,1-1s-0.448-1-1-1C14.949,22.377,14.501,22.824,14.501,23.377zM10.696,21.822c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.276,1.091,0.11,1.365-0.365c0.277-0.479,0.113-1.09-0.365-1.367C11.584,21.18,10.973,21.344,10.696,21.822zM21.822,10.696c-0.479,0.278-0.643,0.89-0.366,1.367s0.888,0.642,1.366,0.365c0.478-0.275,0.643-0.888,0.365-1.366C22.913,10.584,22.298,10.42,21.822,10.696zM21.456,18.938c-0.274,0.479-0.112,1.092,0.367,1.367c0.477,0.274,1.089,0.112,1.364-0.365c0.276-0.479,0.112-1.092-0.364-1.367C22.343,18.297,21.73,18.461,21.456,18.938zM24.378,15.5c0-0.551-0.448-1-1-1c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1C23.93,16.5,24.378,16.053,24.378,15.5zM18.573,22.822c0.274,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.89,0.365-1.365c-0.277-0.479-0.888-0.643-1.365-0.367C18.46,21.732,18.296,22.344,18.573,22.822zM18.939,9.546c0.477,0.276,1.088,0.112,1.365-0.366c0.276-0.478,0.113-1.091-0.367-1.367c-0.477-0.276-1.09-0.111-1.364,0.366C18.298,8.659,18.462,9.27,18.939,9.546zM28.703,14.364C28.074,7.072,21.654,1.67,14.364,2.295c-3.254,0.281-6.118,1.726-8.25,3.877L4.341,4.681l-1.309,7.364l7.031-2.548L8.427,8.12c1.627-1.567,3.767-2.621,6.194-2.833c5.64-0.477,10.595,3.694,11.089,9.335c0.477,5.64-3.693,10.595-9.333,11.09c-5.643,0.476-10.599-3.694-11.092-9.333c-0.102-1.204,0.019-2.373,0.31-3.478l-3.27,1.186c-0.089,0.832-0.106,1.684-0.031,2.55c0.629,7.29,7.048,12.691,14.341,12.066C23.926,28.074,29.328,21.655,28.703,14.364z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Home();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Home = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Home.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Home\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.812,16l-3.062-3.062V5.625h-2.625v4.688L16,4.188L4.188,16L7,15.933v11.942h17.875V16H27.812zM16,26.167h-5.833v-7H16V26.167zM21.667,23.167h-3.833v-4.042h3.833V23.167z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.IMac();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.IMac = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.IMac.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.IMac\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.936,2.099H2.046c-0.506,0-0.919,0.414-0.919,0.92v21.097c0,0.506,0.413,0.919,0.919,0.919h17.062v-0.003h9.828c0.506,0,0.92-0.413,0.92-0.921V3.019C29.854,2.513,29.439,2.099,28.936,2.099zM28.562,20.062c0,0.412-0.338,0.75-0.75,0.75H3.062c-0.413,0-0.75-0.338-0.75-0.75v-16c0-0.413,0.337-0.75,0.75-0.75h24.75c0.412,0,0.75,0.337,0.75,0.75V20.062zM20.518,28.4c-0.033-0.035-0.062-0.055-0.068-0.062l-0.01-0.004l-0.008-0.004c0,0-0.046-0.021-0.119-0.062c-0.108-0.056-0.283-0.144-0.445-0.237c-0.162-0.097-0.32-0.199-0.393-0.271c-0.008-0.014-0.035-0.079-0.058-0.17c-0.083-0.32-0.161-0.95-0.22-1.539h-7.5c-0.023,0.23-0.048,0.467-0.076,0.691c-0.035,0.272-0.073,0.524-0.113,0.716c-0.02,0.096-0.039,0.175-0.059,0.23c-0.009,0.025-0.018,0.05-0.024,0.062c-0.003,0.006-0.005,0.01-0.007,0.013c-0.094,0.096-0.34,0.246-0.553,0.36c-0.107,0.062-0.209,0.11-0.283,0.146c-0.074,0.037-0.119,0.062-0.119,0.062l-0.007,0.004l-0.008,0.004c-0.01,0.009-0.038,0.022-0.07,0.062c-0.031,0.037-0.067,0.103-0.067,0.185c0.002,0.002-0.004,0.037-0.006,0.088c0,0.043,0.007,0.118,0.068,0.185c0.061,0.062,0.143,0.08,0.217,0.08h9.716c0.073,0,0.153-0.021,0.215-0.08c0.062-0.063,0.068-0.142,0.068-0.185c-0.001-0.051-0.008-0.086-0.007-0.088C20.583,28.503,20.548,28.439,20.518,28.4z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.SetFigure\r\n */\r\ndraw2d.shape.icon.Icon = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.icon.Icon.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Icon\",\r\n\r\n /**\r\n *\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({\r\n width: 50,\r\n height: 50,\r\n color:\"#333333\",\r\n bgColor:null\r\n }, attr), setter, getter)\r\n this.keepAspectRatio = false\r\n },\r\n\r\n /**\r\n * \r\n * propagate all attributes like color, stroke,... to the shape element\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n this.svgNodes?.attr({fill: this.color.rgba(), stroke: \"none\"})\r\n\r\n this._super(attributes)\r\n },\r\n\r\n applyTransformation: function () {\r\n let trans = []\r\n\r\n if (this.rotationAngle !== 0) {\r\n trans.push(\"R\" + this.rotationAngle)\r\n }\r\n\r\n if (this.getRotationAngle() === 90 || this.getRotationAngle() === 270) {\r\n let ratio = this.getHeight() / this.getWidth()\r\n trans.push(\"T\" + (-this.offsetY) + \",\" + (-this.offsetX))\r\n trans.push(\"S\" + ratio + \",\" + 1 / ratio + \",0,0\")\r\n }\r\n else {\r\n trans.push(\"T\" + (-this.offsetX) + \",\" + (-this.offsetY))\r\n\r\n }\r\n if (this.isResizeable() === true) {\r\n trans.push(\r\n \"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY() +\r\n \"S\" + this.scaleX + \",\" + this.scaleY + \",\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY()\r\n )\r\n }\r\n else {\r\n trans.push(\"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n }\r\n\r\n this.svgNodes.transform(trans.join(\" \"))\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @private\r\n */\r\n createShapeElement: function () {\r\n let shape = this._super()\r\n\r\n let bb = this.svgNodes.getBBox()\r\n\r\n this.offsetX = bb.x\r\n this.offsetY = bb.y\r\n\r\n return shape\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Icons();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Icons = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Icons.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Icons\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.083,14H14V4.083H4.083V14zM17,4.083V14h9.917V4.083H17zM17,26.917h9.917v-9.918H17V26.917zM4.083,26.917H14v-9.918H4.083V26.917z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ie();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ie = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ie.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Ie\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.998,2.266c-2.12-1.91-6.925,0.382-9.575,1.93c-0.76-0.12-1.557-0.185-2.388-0.185c-3.349,0-6.052,0.985-8.106,2.843c-2.336,2.139-3.631,4.94-3.631,8.177c0,0.028,0.001,0.056,0.001,0.084c3.287-5.15,8.342-7.79,9.682-8.487c0.212-0.099,0.338,0.155,0.141,0.253c-0.015,0.042-0.015,0,0,0c-2.254,1.35-6.434,5.259-9.146,10.886l-0.003-0.007c-1.717,3.547-3.167,8.529-0.267,10.358c2.197,1.382,6.13-0.248,9.295-2.318c0.764,0.108,1.567,0.165,2.415,0.165c5.84,0,9.937-3.223,11.399-7.924l-8.022-0.014c-0.337,1.661-1.464,2.548-3.223,2.548c-2.21,0-3.729-1.211-3.828-4.012l15.228-0.014c0.028-0.578-0.042-0.985-0.042-1.436c0-5.251-3.143-9.355-8.255-10.663c2.081-1.294,5.974-3.209,7.848-1.681c1.407,1.14,0.633,3.533,0.295,4.518c-0.056,0.254,0.24,0.296,0.296,0.057C28.814,5.573,29.026,3.194,27.998,2.266zM13.272,25.676c-2.469,1.475-5.873,2.539-7.539,1.289c-1.243-0.935-0.696-3.468,0.398-5.938c0.664,0.992,1.495,1.886,2.473,2.63C9.926,24.651,11.479,25.324,13.272,25.676zM12.714,13.046c0.042-2.435,1.787-3.49,3.617-3.49c1.928,0,3.49,1.112,3.49,3.49H12.714z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ie9();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ie9 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ie9.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ie9\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.751,17.887c0.054-0.434,0.081-0.876,0.081-1.324c0-1.744-0.413-3.393-1.146-4.854c1.133-2.885,1.155-5.369-0.201-6.777c-1.756-1.822-5.391-1.406-9.433,0.721c-0.069-0.001-0.138-0.003-0.206-0.003c-6.069,0-10.988,4.888-10.988,10.917c0,0.183,0.005,0.354,0.014,0.529c-2.688,4.071-3.491,7.967-1.688,9.838c1.557,1.613,4.691,1.344,8.2-0.392c1.363,0.604,2.873,0.938,4.462,0.938c4.793,0,8.867-3.049,10.369-7.299H21.26c-0.814,1.483-2.438,2.504-4.307,2.504c-2.688,0-4.867-2.104-4.867-4.688c0-0.036,0.002-0.071,0.003-0.106h15.662V17.887zM26.337,6.099c0.903,0.937,0.806,2.684-0.087,4.818c-1.27-2.083-3.221-3.71-5.546-4.576C23.244,5.217,25.324,5.047,26.337,6.099zM16.917,10.372c2.522,0,4.585,1.991,4.748,4.509h-9.496C12.333,12.363,14.396,10.372,16.917,10.372zM5.687,26.501c-1.103-1.146-0.712-3.502,0.799-6.298c0.907,2.546,2.736,4.658,5.09,5.938C8.92,27.368,6.733,27.587,5.687,26.501z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Import();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Import = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Import.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Import\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.067,2.25c-5.979,0-11.035,3.91-12.778,9.309h3.213c1.602-3.705,5.271-6.301,9.565-6.309c5.764,0.01,10.428,4.674,10.437,10.437c-0.009,5.764-4.673,10.428-10.437,10.438c-4.294-0.007-7.964-2.605-9.566-6.311H2.289c1.744,5.399,6.799,9.31,12.779,9.312c7.419-0.002,13.437-6.016,13.438-13.438C28.504,8.265,22.486,2.252,15.067,2.25zM10.918,19.813l7.15-4.126l-7.15-4.129v2.297H-0.057v3.661h10.975V19.813z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.InkScape();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.InkScape = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.InkScape.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.InkScape\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.402,17.626c0.84-0.772,2.468-0.381,5.979-1.853c1.716-0.72,1.572-1.265,1.566-1.928c-0.001-0.014,0-0.027,0-0.041h-0.005c-0.012-0.667-0.291-1.332-0.846-1.845L17.049,2.684c-0.566-0.522-1.304-0.782-2.042-0.782V1.898c-0.738,0-1.475,0.261-2.04,0.783l-10.05,9.276c-0.554,0.512-0.832,1.176-0.843,1.844H2.07c0,0,0.003,0.011,0.004,0.011c0,0.012-0.004,0.024-0.004,0.034h0.017c0.193,0.676,5.164,1.536,5.718,2.049c0.838,0.774-3.211,1.339-2.374,2.114c0.838,0.773,5.062,1.496,5.898,2.271c0.838,0.771-1.711,1.596-0.874,2.366c0.837,0.773,3.651-0.191,3.142,1.822c1.13,1.045,3.49,0.547,5.071-0.498c0.837-0.771-1.607-0.703-0.77-1.477c0.836-0.774,2.949-0.777,4.73-2.627C21.913,18.838,19.566,18.398,20.402,17.626zM10.973,16.868l-0.42-0.504c1.497,0.358,3.162,0.827,4.498,0.837l0.058,0.554C13.964,17.646,11.544,17.137,10.973,16.868zM18.161,8.58l-1.396-0.74L14.53,9.594l-1.067-3.192l-1.177,2.545L8.998,9.25l0.036-1.352c0-0.324,1.895-2.596,3.05-3.136l2.112-1.401c0.312-0.186,0.53-0.261,0.727-0.257c0.327,0.011,0.593,0.239,1.112,0.55l4.748,3.25c0.357,0.215,0.619,0.522,0.626,0.898l-2.813-1.254L18.161,8.58zM26.434,19.594c-0.313-0.07-1.688-0.691-2.035,0.165c0.968,0.981,2.645,2.181,3.316,1.482C28.391,20.543,27.102,19.745,26.434,19.594zM4.663,21.566c-0.315,0.074-1.842,0.115-1.719,1.021c1.351,0.451,3.438,0.792,3.684-0.113C6.873,21.566,5.33,21.414,4.663,21.566zM17.877,26.396c-0.232,0.209-1.53,0.953-0.929,1.681c1.413-0.236,3.403-0.914,3.12-1.812C19.786,25.369,18.37,25.953,17.877,26.396z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ipad();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ipad = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ipad.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ipad\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.221,1.417H6.11c-0.865,0-1.566,0.702-1.566,1.566v25.313c0,0.865,0.701,1.565,1.566,1.565h19.111c0.865,0,1.565-0.7,1.565-1.565V2.984C26.787,2.119,26.087,1.417,25.221,1.417zM15.666,29.299c-0.346,0-0.626-0.279-0.626-0.625s0.281-0.627,0.626-0.627c0.346,0,0.627,0.281,0.627,0.627S16.012,29.299,15.666,29.299zM24.376,26.855c0,0.174-0.142,0.312-0.313,0.312H7.27c-0.173,0-0.313-0.142-0.313-0.312V4.3c0-0.173,0.14-0.313,0.313-0.313h16.792c0.172,0,0.312,0.14,0.312,0.313L24.376,26.855L24.376,26.855z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Iphone();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Iphone = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Iphone.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Iphone\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.755,1H10.62C9.484,1,8.562,1.921,8.562,3.058v24.385c0,1.136,0.921,2.058,2.058,2.058h10.135c1.136,0,2.058-0.922,2.058-2.058V3.058C22.812,1.921,21.891,1,20.755,1zM14.659,3.264h2.057c0.101,0,0.183,0.081,0.183,0.18c0,0.1-0.082,0.18-0.183,0.18h-2.057c-0.1,0-0.181-0.081-0.181-0.18C14.478,3.344,14.559,3.264,14.659,3.264zM13.225,3.058c0.199,0,0.359,0.162,0.359,0.36c0,0.198-0.161,0.36-0.359,0.36c-0.2,0-0.36-0.161-0.36-0.36S13.025,3.058,13.225,3.058zM15.688,28.473c-0.796,0-1.44-0.646-1.44-1.438c0-0.799,0.645-1.439,1.44-1.439s1.44,0.646,1.44,1.439S16.483,28.473,15.688,28.473zM22.041,24.355c0,0.17-0.139,0.309-0.309,0.309H9.642c-0.17,0-0.308-0.139-0.308-0.309V6.042c0-0.17,0.138-0.309,0.308-0.309h12.09c0.17,0,0.309,0.138,0.309,0.309V24.355z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.JQuery();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.JQuery = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.JQuery.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.JQuery\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.322,23.041C4.579,18.723,2.777,11.07,5.494,4.583c-0.254,0.291-0.502,0.59-0.739,0.904c-5.177,6.887-4.008,16.505,2.613,21.482c6.62,4.979,16.184,3.432,21.362-3.455c0.237-0.314,0.454-0.635,0.663-0.959C23.915,26.963,16.064,27.357,10.322,23.041zM13.662,18.598c4.765,3.582,11.604,2.564,15.567-2.198c-3.609,2.641-9.09,2.475-13.361-0.736S9.916,7.231,11.451,3.03C7.976,8.161,8.897,15.015,13.662,18.598zM18.642,11.976c3.254,2.447,8.146,1.438,10.967-2.242c-2.604,1.921-6.341,1.955-9.157-0.164c-2.819-2.118-3.826-5.718-2.701-8.754C14.998,4.549,15.387,9.528,18.642,11.976z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Jigsaw();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Jigsaw = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Jigsaw.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Jigsaw\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M3.739,13.619c0,0,3.516-4.669,5.592-3.642c2.077,1.027-0.414,2.795,1.598,3.719c2.011,0.924,5.048-0.229,4.376-2.899c-0.672-2.67-1.866-0.776-2.798-2.208c-0.934-1.432,4.586-4.59,4.586-4.59s3.361,6.651,4.316,4.911c1.157-2.105,3.193-4.265,5.305-1.025c0,0,1.814,2.412,0.246,3.434s-2.917,0.443-3.506,1.553c-0.586,1.112,3.784,4.093,3.784,4.093s-2.987,4.81-4.926,3.548c-1.939-1.262,0.356-3.364-2.599-3.989c-1.288-0.23-3.438,0.538-3.818,2.34c-0.13,2.709,1.604,2.016,2.797,3.475c1.191,1.457-4.484,4.522-4.484,4.522s-1.584-3.923-3.811-4.657c-2.227-0.735-0.893,2.135-2.917,2.531c-2.024,0.396-4.816-2.399-3.46-4.789c1.358-2.391,3.275-0.044,3.441-1.951C7.629,16.087,3.739,13.619,3.739,13.619z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Key();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Key = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Key.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Key\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M18.386,16.009l0.009-0.006l-0.58-0.912c1.654-2.226,1.876-5.319,0.3-7.8c-2.043-3.213-6.303-4.161-9.516-2.118c-3.212,2.042-4.163,6.302-2.12,9.517c1.528,2.402,4.3,3.537,6.944,3.102l0.424,0.669l0.206,0.045l0.779-0.447l-0.305,1.377l2.483,0.552l-0.296,1.325l1.903,0.424l-0.68,3.06l1.406,0.313l-0.424,1.906l4.135,0.918l0.758-3.392L18.386,16.009z M10.996,8.944c-0.685,0.436-1.593,0.233-2.029-0.452C8.532,7.807,8.733,6.898,9.418,6.463s1.594-0.233,2.028,0.452C11.883,7.6,11.68,8.509,10.996,8.944z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Lab();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Lab = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Lab.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Lab\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.121,24.438l-3.362-7.847c-0.329-0.769-0.599-2.081-0.599-2.917s0.513-1.521,1.14-1.521s1.141-0.513,1.141-1.14s-0.685-1.14-1.521-1.14h-6.84c-0.836,0-1.52,0.513-1.52,1.14s0.513,1.14,1.14,1.14s1.14,0.685,1.14,1.521s-0.269,2.148-0.599,2.917l-3.362,7.847C8.55,25.206,8.28,26.177,8.28,26.595s0.342,1.103,0.76,1.521s1.444,0.76,2.28,0.76h8.359c0.836,0,1.862-0.342,2.28-0.76s0.76-1.103,0.76-1.521S22.45,25.206,22.121,24.438zM16.582,7.625c0,0.599,0.484,1.083,1.083,1.083s1.083-0.484,1.083-1.083s-0.484-1.084-1.083-1.084S16.582,7.026,16.582,7.625zM13.667,7.792c0.276,0,0.5-0.224,0.5-0.5s-0.224-0.5-0.5-0.5s-0.5,0.224-0.5,0.5S13.391,7.792,13.667,7.792zM15.584,5.292c0.874,0,1.583-0.709,1.583-1.583c0-0.875-0.709-1.584-1.583-1.584C14.709,2.125,14,2.834,14,3.709C14,4.583,14.709,5.292,15.584,5.292z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Lamp();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Lamp = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Lamp.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Lamp\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,2.833c-3.866,0-7,3.134-7,7c0,3.859,3.945,4.937,4.223,9.499h5.553c0.278-4.562,4.224-5.639,4.224-9.499C22.5,5.968,19.366,2.833,15.5,2.833zM15.5,28.166c1.894,0,2.483-1.027,2.667-1.666h-5.334C13.017,27.139,13.606,28.166,15.5,28.166zM12.75,25.498h5.5v-5.164h-5.5V25.498z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Lamp_alt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Lamp_alt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Lamp_alt.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Lamp_alt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M12.75,25.498h5.5v-5.164h-5.5V25.498zM15.5,28.166c1.894,0,2.483-1.027,2.667-1.666h-5.334C13.017,27.139,13.606,28.166,15.5,28.166zM15.5,2.833c-3.866,0-7,3.134-7,7c0,3.859,3.945,4.937,4.223,9.499h1.271c-0.009-0.025-0.024-0.049-0.029-0.078L11.965,8.256c-0.043-0.245,0.099-0.485,0.335-0.563c0.237-0.078,0.494,0.026,0.605,0.25l0.553,1.106l0.553-1.106c0.084-0.17,0.257-0.277,0.446-0.277c0.189,0,0.362,0.107,0.446,0.277l0.553,1.106l0.553-1.106c0.084-0.17,0.257-0.277,0.448-0.277c0.189,0,0.36,0.107,0.446,0.277l0.554,1.106l0.553-1.106c0.111-0.224,0.368-0.329,0.604-0.25s0.377,0.318,0.333,0.563l-1.999,10.998c-0.005,0.029-0.02,0.053-0.029,0.078h1.356c0.278-4.562,4.224-5.639,4.224-9.499C22.5,5.968,19.366,2.833,15.5,2.833zM17.458,10.666c-0.191,0-0.364-0.107-0.446-0.275l-0.554-1.106l-0.553,1.106c-0.086,0.168-0.257,0.275-0.446,0.275c-0.191,0-0.364-0.107-0.449-0.275l-0.553-1.106l-0.553,1.106c-0.084,0.168-0.257,0.275-0.446,0.275c-0.012,0-0.025,0-0.037-0.001l1.454,8.001h1.167l1.454-8.001C17.482,10.666,17.47,10.666,17.458,10.666z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Landing();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Landing = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Landing.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Landing\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.322,19.491c0,0,1.903,0.342,0.299-1.869c-1.353-1.866-5.261-3.104-5.261-3.104l-4.213-8.229l-2.47-0.394l0.973,5.449L9.241,10.11L8.772,7.273L7.008,6.302c0,0-0.496,2.742-0.149,5.271C6.859,11.573,13.965,17.999,23.322,19.491zM3.251,23.106v1.998h24.498v-1.998H3.251zM14,17.94c0,0.414,0.336,0.75,0.75,0.75s0.75-0.336,0.75-0.75s-0.336-0.75-0.75-0.75S14,17.526,14,17.94z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Landscape1();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Landscape1 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Landscape1.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Landscape1\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M19.883,5.71H2.746c-0.163,0-0.319,0.071-0.435,0.188c-0.118,0.117-0.18,0.272-0.18,0.435v18.364c0,0.164,0.063,0.318,0.18,0.436c0.123,0.117,0.287,0.18,0.435,0.18h25.75c0.164,0,0.324-0.066,0.438-0.18c0.118-0.114,0.182-0.273,0.182-0.436V14.551c-0.002-0.102-0.01-0.188-0.021-0.271c-0.186-1.543-1.543-3.424-3.236-5.168C24.039,7.31,21.869,5.753,19.883,5.71zM26.914,12.314c-0.008-0.005-0.019-0.007-0.029-0.01c-1.092-0.293-2.33-0.355-3.199-0.355c-0.162,0-0.312,0.002-0.445,0.004c-0.037-0.604-0.129-1.604-0.356-2.625c-0.11-0.461-0.246-0.94-0.433-1.42c0.857,0.541,1.748,1.264,2.535,2.068C25.74,10.718,26.41,11.551,26.914,12.314zM3.365,6.947h16.517c0.058,0,0.12,0,0.183,0.004c0.694,0.105,1.307,1.221,1.616,2.646c0.335,1.484,0.354,2.997,0.354,3l0.007,0.656l0.651-0.051c0,0,0.398-0.027,0.99-0.025c0.809,0,1.977,0.062,2.871,0.312c0.939,0.275,1.352,0.635,1.326,1.051h0.002v9.542H3.365V6.951V6.947z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Landscape2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Landscape2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Landscape2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Landscape2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M19.883,5.71H2.746c-0.163,0-0.319,0.071-0.435,0.188c-0.118,0.117-0.18,0.272-0.18,0.435v18.364c0,0.164,0.063,0.318,0.18,0.436c0.123,0.117,0.287,0.18,0.435,0.18h25.75c0.164,0,0.324-0.066,0.438-0.18c0.118-0.114,0.182-0.273,0.182-0.436V14.551c-0.002-0.102-0.01-0.188-0.021-0.271c-0.186-1.543-1.543-3.424-3.236-5.168C24.039,7.31,21.869,5.753,19.883,5.71zM3.365,6.947h16.517c0.058,0,0.12,0,0.183,0.004c0.694,0.105,1.307,1.221,1.616,2.646c0.335,1.484,0.354,2.997,0.354,3l0.007,0.656l0.651-0.051c0,0,0.398-0.027,0.99-0.025c0.809,0,1.977,0.062,2.871,0.312c0.939,0.275,1.352,0.635,1.326,1.051h0.002v9.542H3.365V6.951V6.947z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.LineChart();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.LineChart = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.LineChart.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.LineChart\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M3.625,25.062c-0.539-0.115-0.885-0.646-0.77-1.187l0,0L6.51,6.584l2.267,9.259l1.923-5.188l3.581,3.741l3.883-13.103l2.934,11.734l1.96-1.509l5.271,11.74c0.226,0.504,0,1.095-0.505,1.321l0,0c-0.505,0.227-1.096,0-1.322-0.504l0,0l-4.23-9.428l-2.374,1.826l-1.896-7.596l-2.783,9.393l-3.754-3.924L8.386,22.66l-1.731-7.083l-1.843,8.711c-0.101,0.472-0.515,0.794-0.979,0.794l0,0C3.765,25.083,3.695,25.076,3.625,25.062L3.625,25.062z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Link();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Link = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Link.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Link\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16.45,18.085l-2.47,2.471c0.054,1.023-0.297,2.062-1.078,2.846c-1.465,1.459-3.837,1.459-5.302-0.002c-1.461-1.465-1.46-3.836-0.001-5.301c0.783-0.781,1.824-1.131,2.847-1.078l2.469-2.469c-2.463-1.057-5.425-0.586-7.438,1.426c-2.634,2.637-2.636,6.907,0,9.545c2.638,2.637,6.909,2.635,9.545,0l0.001,0.002C17.033,23.511,17.506,20.548,16.45,18.085zM14.552,12.915l2.467-2.469c-0.053-1.023,0.297-2.062,1.078-2.848C19.564,6.139,21.934,6.137,23.4,7.6c1.462,1.465,1.462,3.837,0,5.301c-0.783,0.783-1.822,1.132-2.846,1.079l-2.469,2.468c2.463,1.057,5.424,0.584,7.438-1.424c2.634-2.639,2.633-6.91,0-9.546c-2.639-2.636-6.91-2.637-9.545-0.001C13.967,7.489,13.495,10.451,14.552,12.915zM18.152,10.727l-7.424,7.426c-0.585,0.584-0.587,1.535,0,2.121c0.585,0.584,1.536,0.584,2.121-0.002l7.425-7.424c0.584-0.586,0.584-1.535,0-2.121C19.687,10.141,18.736,10.142,18.152,10.727z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.LinkedIn();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.LinkedIn = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.LinkedIn.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.LinkedIn\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.25,3.125h-22c-1.104,0-2,0.896-2,2v22c0,1.104,0.896,2,2,2h22c1.104,0,2-0.896,2-2v-22C29.25,4.021,28.354,3.125,27.25,3.125zM11.219,26.781h-4v-14h4V26.781zM9.219,11.281c-1.383,0-2.5-1.119-2.5-2.5s1.117-2.5,2.5-2.5s2.5,1.119,2.5,2.5S10.602,11.281,9.219,11.281zM25.219,26.781h-4v-8.5c0-0.4-0.403-1.055-0.687-1.213c-0.375-0.211-1.261-0.229-1.665-0.034l-1.648,0.793v8.954h-4v-14h4v0.614c1.583-0.723,3.78-0.652,5.27,0.184c1.582,0.886,2.73,2.864,2.73,4.702V26.781z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Linux();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Linux = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Linux.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Linux\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M11.791,25.229c1.027-0.104,1.162-1.191,0.68-1.666c-0.398-0.392-2.598-2.022-3.171-2.664C9.033,20.6,8.673,20.454,8.52,20.12c-0.352-0.771-0.598-1.869-0.151-2.658c0.081-0.144,0.133-0.078,0.071,0.22c-0.351,1.684,0.746,3.059,0.986,2.354c0.167-0.487,0.013-1.358,0.102-2.051c0.158-1.226,1.273-3.577,1.763-3.712c-0.755-1.398,0.886-2.494,0.866-3.723c-0.014-0.798,0.701,0.982,1.419,1.359c0.802,0.422,1.684-0.794,2.936-1.41c0.354-0.176,0.809-0.376,0.776-0.524c-0.146-0.718-1.644,0.886-2.979,0.939c-0.61,0.024-0.837-0.12-1.072-0.347c-0.712-0.689,0.073-0.115,1.132-0.307c0.471-0.085,0.629-0.163,1.128-0.365c0.5-0.201,1.069-0.5,1.636-0.654c0.395-0.106,0.361-0.402,0.208-0.491c-0.088-0.051-0.219-0.046-0.321,0.133c-0.244,0.419-1.383,0.661-1.74,0.771c-0.457,0.14-0.962,0.271-1.634,0.243c-1.021-0.042-0.782-0.509-1.513-0.928c-0.213-0.122-0.156-0.444,0.129-0.729c0.148-0.148,0.557-0.232,0.76-0.572c0.028-0.047,0.289-0.32,0.494-0.461c0.07-0.049,0.076-1.295-0.562-1.32c-0.543-0.021-0.697,0.398-0.675,0.818c0.022,0.419,0.245,0.765,0.393,0.764c0.285-0.004,0.019,0.311-0.138,0.361c-0.237,0.078-0.562-0.934-0.525-1.418c0.039-0.506,0.303-1.4,0.942-1.383c0.576,0.016,0.993,0.737,0.973,1.983c-0.003,0.211,0.935-0.101,1.247,0.229c0.224,0.236-0.767-2.207,1.438-2.375c0.582,0.111,1.14,0.305,1.371,1.641c-0.086,0.139,0.146,1.07-0.215,1.182c-0.438,0.135-0.707-0.02-0.453-0.438c0.172-0.418,0.004-1.483-0.882-1.42c-0.887,0.064-0.769,1.637-0.526,1.668c0.243,0.031,0.854,0.465,1.282,0.549c1.401,0.271,0.371,1.075,0.555,2.048c0.205,1.099,0.929,0.809,1.578,3.717c0.137,0.177,0.676,0.345,1.199,2.579c0.473,2.011-0.195,3.473,0.938,3.353c0.256-0.026,0.629-0.1,0.792-0.668c0.425-1.489-0.213-3.263-0.855-4.46c-0.375-0.698-0.729-1.174-0.916-1.337c0.738,0.436,1.683,1.829,1.898,2.862c0.286,1.358,0.49,1.934,0.059,3.37c0.25,0.125,0.871,0.39,0.871,0.685c-0.647-0.53-2.629-0.625-2.68,0.646c-0.338,0.008-0.594,0.034-0.811,0.293c-0.797,0.944-0.059,2.842-0.139,3.859c-0.07,0.896-0.318,1.783-0.46,2.683c-0.474-0.019-0.428-0.364-0.274-0.852c0.135-0.431,0.351-0.968,0.365-1.484c0.012-0.467-0.039-0.759-0.156-0.831c-0.118-0.072-0.303,0.074-0.559,0.485c-0.543,0.875-1.722,1.261-2.821,1.397c-1.099,0.138-2.123,0.028-2.664-0.578c-0.186-0.207-0.492,0.058-0.529,0.111c-0.049,0.074,0.18,0.219,0.352,0.533c0.251,0.461,0.49,1.159-0.105,1.479C12.83,26.314,12.316,26.221,11.791,25.229L11.791,25.229zM11.398,25.188c0.395,0.621,1.783,3.232-0.652,3.571c-0.814,0.114-2.125-0.474-3.396-0.784c-1.142-0.279-2.301-0.444-2.949-0.627c-0.391-0.108-0.554-0.25-0.588-0.414c-0.091-0.434,0.474-1.041,0.503-1.555c0.028-0.514-0.188-0.779-0.364-1.199c-0.177-0.42-0.224-0.734-0.081-0.914c0.109-0.141,0.334-0.199,0.698-0.164c0.462,0.047,1.02-0.049,1.319-0.23c0.505-0.309,0.742-0.939,0.516-1.699c0,0.744-0.244,1.025-0.855,1.366c-0.577,0.319-1.467,0.062-1.875,0.416c-0.492,0.427,0.175,1.528,0.12,2.338c-0.042,0.622-0.69,1.322-0.401,1.946c0.291,0.627,1.648,0.695,3.064,0.99c2.012,0.422,3.184,1.153,4.113,1.188c1.356,0.05,1.564-1.342,3.693-1.36c0.621-0.033,1.229-0.052,1.835-0.06c0.688-0.009,1.375-0.003,2.079,0.014c1.417,0.034,0.931,0.773,1.851,1.246c0.774,0.397,2.17,0.241,2.504-0.077c0.451-0.431,1.662-1.467,2.592-1.935c1.156-0.583,3.876-1.588,1.902-2.812c-0.461-0.285-1.547-0.588-1.639-2.676c-0.412,0.366-0.365,2.312,0.784,2.697c1.283,0.431,2.085,1.152-0.301,1.969c-1.58,0.54-1.849,0.706-3.099,1.747c-1.267,1.054-3.145,0.636-2.815-1.582c0.171-1.155,0.269-2.11-0.019-3.114c-0.142-0.49-0.211-1.119-0.114-1.562c0.187-0.858,0.651-1.117,1.106-0.293c0.285,0.519,0.385,1.122,1.408,1.171c1.607,0.077,1.926-1.553,2.439-1.627c0.343-0.05,0.686-1.02,0.425-2.589c-0.28-1.681-1.269-4.332-2.536-5.677c-1.053-1.118-1.717-2.098-2.135-3.497c-0.352-1.175-0.547-2.318-0.475-3.412c0.094-1.417-0.691-3.389-1.943-4.316c-0.782-0.581-2.011-0.893-3.122-0.88c-0.623,0.007-1.21,0.099-1.661,0.343c-1.855,1.008-2.113,2.445-2.086,4.088c0.025,1.543,0.078,3.303,0.254,4.977c-0.208,0.77-1.288,2.227-1.979,3.114C8.59,14.233,8.121,16.01,7.52,17.561c-0.321,0.828-0.862,1.2-0.908,2.265C6.6,20.122,6.61,20.891,6.894,20.672C7.98,19.829,9.343,21.95,11.398,25.188L11.398,25.188zM17.044,2.953c-0.06,0.176-0.3,0.321-0.146,0.443c0.152,0.123,0.24-0.171,0.549-0.281c0.08-0.028,0.449,0.012,0.519-0.164c0.03-0.077-0.19-0.164-0.321-0.291c-0.133-0.125-0.262-0.236-0.386-0.229C16.938,2.451,17.096,2.798,17.044,2.953L17.044,2.953zM18.934,9.35c0.115-0.121,0.174,0.207,0.483,0.402c0.244,0.154,0.481,0.04,0.545,0.354c0.044,0.225-0.097,0.467-0.284,0.436C19.35,10.486,18.596,9.705,18.934,9.35L18.934,9.35zM13.832,7.375c-0.508-0.037-0.543,0.33-0.375,0.324C13.629,7.693,13.523,7.408,13.832,7.375L13.832,7.375zM12.96,6.436c0.06-0.013,0.146,0.09,0.119,0.233c-0.037,0.199-0.021,0.324,0.117,0.325c0.022,0,0.048-0.005,0.056-0.057c0.066-0.396-0.14-0.688-0.225-0.711C12.834,6.178,12.857,6.458,12.96,6.436L12.96,6.436zM16.663,6.268c0.129,0.039,0.253,0.262,0.28,0.504c0.002,0.021,0.168-0.035,0.17-0.088c0.011-0.389-0.321-0.571-0.408-0.562C16.506,6.139,16.562,6.238,16.663,6.268L16.663,6.268zM14.765,7.423c0.463-0.214,0.625,0.118,0.465,0.171C15.066,7.648,15.065,7.345,14.765,7.423L14.765,7.423zM9.178,15.304c-0.219-0.026,0.063-0.19,0.184-0.397c0.131-0.227,0.105-0.511,0.244-0.469s0.061,0.2-0.033,0.461C9.491,15.121,9.258,15.313,9.178,15.304L9.178,15.304z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.List();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.List = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.List.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.List\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.082,4.083v2.999h22.835V4.083H4.082zM4.082,20.306h22.835v-2.999H4.082V20.306zM4.082,13.694h22.835v-2.999H4.082V13.694zM4.082,26.917h22.835v-2.999H4.082V26.917z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Location();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Location = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Location.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Location\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,3.5c-4.142,0-7.5,3.358-7.5,7.5c0,4.143,7.5,18.121,7.5,18.121S23.5,15.143,23.5,11C23.5,6.858,20.143,3.5,16,3.5z M16,14.584c-1.979,0-3.584-1.604-3.584-3.584S14.021,7.416,16,7.416S19.584,9.021,19.584,11S17.979,14.584,16,14.584z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Lock();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Lock = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Lock.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Lock\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.335,12.833V9.999h-0.001C22.333,6.501,19.498,3.666,16,3.666S9.666,6.502,9.666,10h0v2.833H7.375V25h17.25V12.833H22.335zM11.667,10C11.667,10,11.667,10,11.667,10c0-2.39,1.944-4.334,4.333-4.334c2.391,0,4.335,1.944,4.335,4.333c0,0,0,0,0,0v2.834h-8.668V10z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Locked();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Locked = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Locked.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Locked\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.711,14.085L16.914,4.29c-0.778-0.778-2.051-0.778-2.829,0L4.29,14.086c-0.778,0.778-0.778,2.05,0,2.829l9.796,9.796c0.778,0.777,2.051,0.777,2.829,0l9.797-9.797C27.488,16.136,27.488,14.863,26.711,14.085zM8.218,16.424c-0.4-0.153-0.687-0.533-0.687-0.987s0.287-0.834,0.687-0.987V16.424zM8.969,16.424v-1.974c0.4,0.152,0.687,0.533,0.687,0.987S9.369,16.272,8.969,16.424zM13.5,19.188l1.203-3.609c-0.689-0.306-1.172-0.994-1.172-1.797c0-1.087,0.881-1.969,1.969-1.969c1.087,0,1.969,0.881,1.969,1.969c0,0.803-0.482,1.491-1.172,1.797l1.203,3.609H13.5zM22.03,16.549c-0.399-0.152-0.687-0.533-0.687-0.986s0.287-0.834,0.687-0.987V16.549zM22.781,16.549v-1.973c0.4,0.152,0.688,0.533,0.688,0.987S23.182,16.397,22.781,16.549z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Magic();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Magic = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Magic.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Magic\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.043,4.649l-0.404-2.312l-1.59,1.727l-2.323-0.33l1.151,2.045l-1.032,2.108l2.302-0.463l1.686,1.633l0.271-2.332l2.074-1.099L23.043,4.649zM26.217,18.198l-0.182-1.25l-0.882,0.905l-1.245-0.214l0.588,1.118l-0.588,1.118l1.245-0.214l0.882,0.905l0.182-1.25l1.133-0.56L26.217,18.198zM4.92,7.672L5.868,7.3l0.844,0.569L6.65,6.853l0.802-0.627L6.467,5.97L6.118,5.013L5.571,5.872L4.553,5.908l0.647,0.786L4.92,7.672zM10.439,10.505l1.021-1.096l1.481,0.219l-0.727-1.31l0.667-1.341l-1.47,0.287l-1.069-1.048L10.16,7.703L8.832,8.396l1.358,0.632L10.439,10.505zM17.234,12.721c-0.588-0.368-1.172-0.618-1.692-0.729c-0.492-0.089-1.039-0.149-1.425,0.374L2.562,30.788h6.68l9.669-15.416c0.303-0.576,0.012-1.041-0.283-1.447C18.303,13.508,17.822,13.09,17.234,12.721zM13.613,21.936c-0.254-0.396-0.74-0.857-1.373-1.254c-0.632-0.396-1.258-0.634-1.726-0.69l4.421-7.052c0.064-0.013,0.262-0.021,0.543,0.066c0.346,0.092,0.785,0.285,1.225,0.562c0.504,0.313,0.908,0.677,1.133,0.97c0.113,0.145,0.178,0.271,0.195,0.335c0.002,0.006,0.004,0.011,0.004,0.015L13.613,21.936z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Magnet();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Magnet = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Magnet.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Magnet\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.812,19.5h5.002v-6.867c-0.028-1.706-0.61-3.807-2.172-5.841c-1.539-2.014-4.315-3.72-7.939-3.687C12.076,3.073,9.3,4.779,7.762,6.792C6.2,8.826,5.617,10.928,5.588,12.634V19.5h5v-6.866c-0.027-0.377,0.303-1.789,1.099-2.748c0.819-0.979,1.848-1.747,4.014-1.778c2.165,0.032,3.195,0.799,4.013,1.778c0.798,0.959,1.126,2.372,1.099,2.748V19.5L20.812,19.5zM25.814,25.579c0,0,0-2.354,0-5.079h-5.002c0,2.727,0,5.08,0,5.08l5.004-0.001H25.814zM5.588,25.58h5c0,0,0-2.354,0-5.08h-5C5.588,23.227,5.588,25.58,5.588,25.58z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Mail();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Mail = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Mail.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Mail\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.516,7.167H3.482l12.517,7.108L28.516,7.167zM16.74,17.303C16.51,17.434,16.255,17.5,16,17.5s-0.51-0.066-0.741-0.197L2.5,10.06v14.773h27V10.06L16.74,17.303z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Man();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Man = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Man.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Man\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.021,16.349c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.103,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.55,0.307,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.932,1.139,5.307,2.543,5.307c0.846,0,1.265-0.865,1.466-2.189c0.201,1.324,0.62,2.189,1.463,2.189c1.406,0,2.545-2.375,2.545-5.307c0-0.66-0.061-1.291-0.168-1.873c0.598,0.574,1.174,0.803,1.725,0.496C22.602,21.541,22.443,18.912,21.021,16.349zM15.808,13.757c2.362,0,4.278-1.916,4.278-4.279s-1.916-4.279-4.278-4.279c-2.363,0-4.28,1.916-4.28,4.279S13.445,13.757,15.808,13.757z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Merge();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Merge = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Merge.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Merge\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.342,15.5l-7.556-4.363v2.613h-1.411c-0.788-0.01-1.331-0.241-2.019-0.743c-1.021-0.745-2.094-2.181-3.551-3.568C13.367,8.06,11.291,6.73,8.5,6.749H2.812v3.5H8.5c2.231,0.012,3.441,1.185,5.07,2.934c0.697,0.753,1.428,1.58,2.324,2.323c-1.396,1.165-2.412,2.516-3.484,3.501c-1.183,1.081-2.202,1.723-3.912,1.741H2.813v3.5h5.716c3.752,0.001,6.035-2.319,7.619-4.066c0.817-0.895,1.537-1.691,2.209-2.191c0.686-0.502,1.23-0.732,2.017-0.742h1.412v2.614L29.342,15.5z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Mic();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Mic = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Mic.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Mic\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,21.125c2.682,0,4.875-2.25,4.875-5V5.875c0-2.75-2.193-5-4.875-5s-4.875,2.25-4.875,5v10.25C10.625,18.875,12.818,21.125,15.5,21.125zM21.376,11v5.125c0,3.308-2.636,6-5.876,6s-5.875-2.691-5.875-6V11H6.626v5.125c0,4.443,3.194,8.132,7.372,8.861v2.139h-3.372v3h9.749v-3h-3.376v-2.139c4.181-0.727,7.375-4.418,7.375-8.861V11H21.376z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.MicMute();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.MicMute = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.MicMute.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.MicMute\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.121,18.529c-0.317-0.736-0.496-1.549-0.496-2.404V11H6.626v5.125c0,1.693,0.466,3.275,1.272,4.627L10.121,18.529zM20.375,8.276V5.875c0-2.75-2.193-5-4.875-5s-4.875,2.25-4.875,5v10.25c0,0.568,0.113,1.105,0.285,1.615L20.375,8.276zM21.376,12.931v3.195c0,3.308-2.636,6-5.876,6c-0.958,0-1.861-0.24-2.661-0.657l-2.179,2.179c0.995,0.659,2.123,1.128,3.338,1.34v2.139h-3.372v3h9.749v-3h-3.376v-2.139c4.181-0.727,7.375-4.418,7.375-8.861V11h-1.068L21.376,12.931zM20.375,16.125v-2.194l-6.788,6.788c0.588,0.26,1.234,0.405,1.913,0.405C18.182,21.125,20.375,18.875,20.375,16.125zM25.542,4.522L4.855,25.209l1.415,1.416L26.956,5.937L25.542,4.522z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Minus();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Minus = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Minus.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Minus\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.979,12.896,5.979,12.896,5.979,19.562,25.979,19.562z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.NewWindow();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.NewWindow = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.NewWindow.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.NewWindow\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M5.896,5.333V21.25h23.417V5.333H5.896zM26.312,18.25H8.896V8.334h17.417V18.25L26.312,18.25zM4.896,9.542H1.687v15.917h23.417V22.25H4.896V9.542z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.No();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.No = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.No.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.No\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,2.939C9.006,2.942,3.338,8.61,3.335,15.605C3.335,22.6,9.005,28.268,16,28.27c6.994-0.002,12.662-5.67,12.664-12.664C28.663,8.61,22.995,2.939,16,2.939zM25.663,15.605c-0.003,1.943-0.583,3.748-1.569,5.264L10.736,7.513c1.515-0.988,3.32-1.569,5.265-1.573C21.337,5.951,25.654,10.269,25.663,15.605zM6.335,15.605c0.004-1.943,0.584-3.75,1.573-5.266l13.355,13.357c-1.516,0.986-3.32,1.566-5.264,1.569C10.664,25.26,6.346,20.941,6.335,15.605z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.NoMagnet();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.NoMagnet = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.NoMagnet.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.NoMagnet\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.59,17.857v-5.225c-0.027-0.376,0.303-1.789,1.099-2.748c0.819-0.979,1.849-1.748,4.014-1.778c1.704,0.026,2.699,0.508,3.447,1.189l3.539-3.539c-1.616-1.526-4.01-2.679-6.986-2.652C12.077,3.073,9.3,4.779,7.762,6.793C6.2,8.826,5.617,10.928,5.59,12.634V19.5h3.357L10.59,17.857zM5.59,20.5v2.357L7.947,20.5H5.59zM20.812,13.29v6.21h5.002v-6.866c-0.021-1.064-0.252-2.283-0.803-3.542L20.812,13.29zM25.339,4.522L4.652,25.209l1.415,1.416L26.753,5.937L25.339,4.522zM20.812,25.58h5.002c0,0,0-2.354,0-5.08h-5.002C20.812,23.227,20.812,25.58,20.812,25.58zM10.59,25.58c0,0,0-0.827,0-2.064L8.525,25.58H10.59z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.NodeJs();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.NodeJs = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.NodeJs.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.NodeJs\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.783,4.458L2.59,3.196C2.553,3.174,2.511,3.163,2.469,3.161H2.447C2.405,3.163,2.363,3.174,2.326,3.196L0.133,4.458C0.051,4.505,0,4.593,0,4.688l0.005,3.398c0,0.047,0.024,0.092,0.066,0.114c0.041,0.024,0.091,0.024,0.132,0l1.303-0.746c0.083-0.049,0.132-0.136,0.132-0.229V5.637c0-0.095,0.05-0.183,0.132-0.229l0.555-0.32c0.041-0.023,0.086-0.035,0.132-0.035c0.045,0,0.092,0.012,0.132,0.035l0.555,0.32c0.082,0.047,0.133,0.135,0.133,0.229v1.588c0,0.094,0.051,0.182,0.132,0.229l1.303,0.746c0.041,0.024,0.092,0.024,0.132,0c0.041-0.022,0.066-0.067,0.066-0.114l0.004-3.398C4.915,4.593,4.865,4.505,4.783,4.458zM17.93,0.745l-1.305-0.729c-0.042-0.023-0.091-0.022-0.132,0.001c-0.041,0.024-0.065,0.067-0.065,0.114v3.365c0,0.033-0.018,0.064-0.046,0.081s-0.064,0.017-0.093,0l-0.549-0.316c-0.082-0.047-0.183-0.047-0.265,0l-2.193,1.266c-0.082,0.047-0.133,0.135-0.133,0.229V7.29c0,0.095,0.051,0.182,0.132,0.229l2.194,1.267c0.082,0.048,0.183,0.048,0.265,0l2.194-1.267c0.082-0.048,0.133-0.135,0.133-0.229V0.977C18.066,0.88,18.014,0.792,17.93,0.745zM16.421,6.458c0,0.023-0.013,0.045-0.033,0.057l-0.753,0.435c-0.021,0.012-0.045,0.012-0.066,0l-0.753-0.435c-0.021-0.012-0.033-0.034-0.033-0.057v-0.87c0-0.023,0.013-0.045,0.033-0.058l0.753-0.435c0.021-0.012,0.045-0.012,0.066,0l0.753,0.435c0.021,0.012,0.033,0.034,0.033,0.058V6.458zM24.473,4.493l-2.18-1.266c-0.082-0.047-0.183-0.048-0.265,0l-2.193,1.266c-0.082,0.047-0.132,0.135-0.132,0.229v2.532c0,0.096,0.051,0.184,0.133,0.23l2.18,1.242c0.08,0.045,0.179,0.046,0.26,0.001l1.318-0.732c0.042-0.023,0.067-0.067,0.068-0.115c0-0.048-0.025-0.092-0.066-0.116l-2.207-1.266c-0.041-0.023-0.066-0.067-0.066-0.115V5.59c0-0.047,0.025-0.091,0.065-0.115l0.688-0.396c0.041-0.024,0.091-0.024,0.132,0l0.688,0.396c0.041,0.023,0.066,0.067,0.066,0.115v0.625c0,0.047,0.025,0.091,0.066,0.114c0.041,0.024,0.092,0.024,0.132,0l1.314-0.764c0.081-0.047,0.132-0.135,0.132-0.229V4.722C24.605,4.628,24.555,4.541,24.473,4.493zM11.363,4.48L9.169,3.214c-0.082-0.047-0.183-0.047-0.265,0L6.711,4.48C6.629,4.527,6.579,4.615,6.579,4.709v2.534c0,0.095,0.051,0.182,0.133,0.229l2.193,1.267c0.082,0.048,0.183,0.048,0.265,0l2.193-1.267c0.082-0.048,0.132-0.135,0.132-0.229V4.709C11.495,4.615,11.445,4.527,11.363,4.48zM31.019,4.382L28.95,3.187c-0.13-0.074-0.304-0.074-0.435,0l-2.068,1.195c-0.135,0.077-0.218,0.222-0.218,0.377v2.386c0,0.156,0.083,0.301,0.218,0.378l0.542,0.312c0.263,0.13,0.356,0.13,0.477,0.13c0.389,0,0.612-0.236,0.612-0.646V4.962c0-0.033-0.027-0.06-0.06-0.06h-0.263c-0.033,0-0.061,0.026-0.061,0.06v2.356c0,0.182-0.188,0.363-0.495,0.209l-0.566-0.326c-0.021-0.012-0.033-0.033-0.033-0.057V4.759c0-0.023,0.013-0.045,0.033-0.057l2.067-1.193c0.019-0.011,0.044-0.011,0.063,0l2.067,1.193c0.02,0.012,0.032,0.034,0.032,0.057v2.386c0,0.023-0.013,0.046-0.032,0.057l-2.068,1.193c-0.018,0.012-0.045,0.012-0.063,0l-0.53-0.314c-0.017-0.01-0.036-0.013-0.052-0.004c-0.146,0.083-0.175,0.094-0.312,0.143c-0.034,0.012-0.084,0.031,0.019,0.09l0.691,0.408c0.065,0.038,0.141,0.059,0.217,0.059s0.151-0.021,0.218-0.059l2.068-1.194c0.134-0.078,0.217-0.222,0.217-0.378V4.759C31.235,4.604,31.152,4.459,31.019,4.382zM29.371,6.768c-0.548,0-0.668-0.138-0.708-0.41c-0.005-0.029-0.029-0.051-0.06-0.051h-0.268c-0.033,0-0.06,0.026-0.06,0.06c0,0.349,0.189,0.765,1.095,0.765c0.655,0,1.031-0.259,1.031-0.709c0-0.447-0.302-0.566-0.938-0.65c-0.643-0.085-0.708-0.128-0.708-0.279c0-0.125,0.056-0.29,0.531-0.29c0.425,0,0.581,0.091,0.646,0.378c0.006,0.027,0.03,0.047,0.059,0.047h0.269c0.017,0,0.032-0.007,0.044-0.019c0.011-0.013,0.017-0.029,0.016-0.046c-0.042-0.493-0.37-0.723-1.032-0.723c-0.59,0-0.941,0.249-0.941,0.666c0,0.453,0.35,0.578,0.916,0.634c0.677,0.066,0.729,0.166,0.729,0.298C29.992,6.669,29.807,6.768,29.371,6.768zM22.128,5.446l-0.42,0.243c-0.016,0.009-0.025,0.026-0.025,0.044v0.486c0,0.019,0.01,0.035,0.025,0.044l0.42,0.243c0.016,0.009,0.035,0.009,0.052,0l0.421-0.243c0.016-0.009,0.025-0.025,0.025-0.044V5.733c0-0.018-0.01-0.035-0.025-0.044L22.18,5.446C22.163,5.438,22.144,5.438,22.128,5.446z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Notebook();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Notebook = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Notebook.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Notebook\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.875,1.375H8c-1.033,0-1.874,0.787-1.979,1.792h1.604c1.102,0,2,0.898,2,2c0,1.102-0.898,2-2,2H6v0.999h1.625c1.104,0,2.002,0.898,2.002,2.002c0,1.104-0.898,2.001-2.002,2.001H6v0.997h1.625c1.102,0,2,0.898,2,2c0,1.104-0.898,2.004-2,2.004H6v0.994h1.625c1.102,0,2,0.898,2,2.002s-0.898,2.002-2,2.002H6v0.997h1.624c1.104,0,2.002,0.897,2.002,2.001c0,1.104-0.898,2.002-2.002,2.002H6.004C6.027,28.252,6.91,29.125,8,29.125h16.875c1.104,0,2-0.896,2-2V3.375C26.875,2.271,25.979,1.375,24.875,1.375zM25.25,8.375c0,0.552-0.447,1-1,1H14c-0.553,0-1-0.448-1-1V4c0-0.552,0.447-1,1-1h10.25c0.553,0,1,0.448,1,1V8.375zM8.625,25.166c0-0.554-0.449-1.001-1-1.001h-3.25c-0.552,0-1,0.447-1,1.001c0,0.552,0.449,1,1,1h3.25C8.176,26.166,8.625,25.718,8.625,25.166zM4.375,6.166h3.251c0.551,0,0.999-0.448,0.999-0.999c0-0.555-0.448-1-0.999-1H4.375c-0.553,0-1,0.445-1,1C3.374,5.718,3.822,6.166,4.375,6.166zM4.375,11.167h3.25c0.553,0,1-0.448,1-1s-0.448-1-1-1h-3.25c-0.553,0-1,0.448-1,1S3.822,11.167,4.375,11.167zM4.375,16.167h3.25c0.551,0,1-0.448,1-1.001s-0.448-0.999-1-0.999h-3.25c-0.553,0-1.001,0.446-1.001,0.999S3.822,16.167,4.375,16.167zM3.375,20.165c0,0.553,0.446,1.002,1,1.002h3.25c0.551,0,1-0.449,1-1.002c0-0.552-0.448-1-1-1h-3.25C3.821,19.165,3.375,19.613,3.375,20.165z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Noview();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Noview = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Noview.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Noview\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M11.478,17.568c-0.172-0.494-0.285-1.017-0.285-1.568c0-2.65,2.158-4.807,4.807-4.807c0.552,0,1.074,0.113,1.568,0.285l2.283-2.283C18.541,8.647,17.227,8.286,16,8.286C8.454,8.286,2.5,16,2.5,16s2.167,2.791,5.53,5.017L11.478,17.568zM23.518,11.185l-3.056,3.056c0.217,0.546,0.345,1.138,0.345,1.76c0,2.648-2.158,4.807-4.807,4.807c-0.622,0-1.213-0.128-1.76-0.345l-2.469,2.47c1.327,0.479,2.745,0.783,4.229,0.783c5.771,0,13.5-7.715,13.5-7.715S26.859,13.374,23.518,11.185zM25.542,4.917L4.855,25.604L6.27,27.02L26.956,6.332L25.542,4.917z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Opera();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Opera = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Opera.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Opera\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.954,2.046c-7.489,0-12.872,5.432-12.872,13.581c0,7.25,5.234,13.835,12.873,13.835c7.712,0,12.974-6.583,12.974-13.835C28.929,7.413,23.375,2.046,15.954,2.046zM15.952,26.548L15.952,26.548c-2.289,0-3.49-1.611-4.121-3.796c-0.284-1.037-0.458-2.185-0.563-3.341c-0.114-1.374-0.129-2.773-0.129-4.028c0-0.993,0.018-1.979,0.074-2.926c0.124-1.728,0.386-3.431,0.89-4.833c0.694-1.718,1.871-2.822,3.849-2.822c2.5,0,3.763,1.782,4.385,4.322c0.429,1.894,0.56,4.124,0.56,6.274c0,2.299-0.103,5.153-0.763,7.442C19.473,24.979,18.242,26.548,15.952,26.548z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Package();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Package = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Package.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Package\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M17.078,22.004l-1.758-4.129l-2.007,4.752l-7.519-3.289l0.174,3.905l9.437,4.374l10.909-5.365l-0.149-4.989L17.078,22.004zM29.454,6.619L18.521,3.383l-3.006,2.671l-3.091-2.359L1.546,8.199l3.795,3.048l-3.433,5.302l10.879,4.757l2.53-5.998l2.257,5.308l11.393-5.942l-3.105-4.709L29.454,6.619zM15.277,14.579l-9.059-3.83l9.275-4.101l9.608,3.255L15.277,14.579z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Page();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Page = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Page.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Page\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.024,5.673c-1.744-1.694-3.625-3.051-5.168-3.236c-0.084-0.012-0.171-0.019-0.263-0.021H7.438c-0.162,0-0.322,0.063-0.436,0.18C6.889,2.71,6.822,2.87,6.822,3.033v25.75c0,0.162,0.063,0.317,0.18,0.435c0.117,0.116,0.271,0.179,0.436,0.179h18.364c0.162,0,0.317-0.062,0.434-0.179c0.117-0.117,0.182-0.272,0.182-0.435V11.648C26.382,9.659,24.824,7.49,23.024,5.673zM25.184,28.164H8.052V3.646h9.542v0.002c0.416-0.025,0.775,0.386,1.05,1.326c0.25,0.895,0.313,2.062,0.312,2.871c0.002,0.593-0.027,0.991-0.027,0.991l-0.049,0.652l0.656,0.007c0.003,0,1.516,0.018,3,0.355c1.426,0.308,2.541,0.922,2.645,1.617c0.004,0.062,0.005,0.124,0.004,0.182V28.164z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Page2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Page2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Page2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Page2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.024,5.673c-1.744-1.694-3.625-3.051-5.168-3.236c-0.084-0.012-0.171-0.019-0.263-0.021H7.438c-0.162,0-0.322,0.063-0.436,0.18C6.889,2.71,6.822,2.87,6.822,3.033v25.75c0,0.162,0.063,0.317,0.18,0.435c0.117,0.116,0.271,0.179,0.436,0.179h18.364c0.162,0,0.317-0.062,0.434-0.179c0.117-0.117,0.182-0.272,0.182-0.435V11.648C26.382,9.659,24.824,7.49,23.024,5.673zM22.157,6.545c0.805,0.786,1.529,1.676,2.069,2.534c-0.468-0.185-0.959-0.322-1.42-0.431c-1.015-0.228-2.008-0.32-2.625-0.357c0.003-0.133,0.004-0.283,0.004-0.446c0-0.869-0.055-2.108-0.356-3.2c-0.003-0.01-0.005-0.02-0.009-0.03C20.584,5.119,21.416,5.788,22.157,6.545zM25.184,28.164H8.052V3.646h9.542v0.002c0.416-0.025,0.775,0.386,1.05,1.326c0.25,0.895,0.313,2.062,0.312,2.871c0.002,0.593-0.027,0.991-0.027,0.991l-0.049,0.652l0.656,0.007c0.003,0,1.516,0.018,3,0.355c1.426,0.308,2.541,0.922,2.645,1.617c0.004,0.062,0.005,0.124,0.004,0.182V28.164z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Pallete();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Pallete = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Pallete.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Pallete\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.653,7.25c-3.417,0-8.577,0.983-8.577,3.282c0,1.91,2.704,3.229,1.691,3.889c-1.02,0.666-2.684-1.848-4.048-1.848c-1.653,0-2.815,1.434-2.815,2.926c0,4.558,6.326,8.25,13.749,8.25c7.424,0,13.443-3.692,13.443-8.25C29.096,10.944,23.077,7.25,15.653,7.25zM10.308,13.521c0-0.645,0.887-1.166,1.98-1.166c1.093,0,1.979,0.521,1.979,1.166c0,0.644-0.886,1.166-1.979,1.166C11.195,14.687,10.308,14.164,10.308,13.521zM14.289,22.299c-1.058,0-1.914-0.68-1.914-1.518s0.856-1.518,1.914-1.518c1.057,0,1.914,0.68,1.914,1.518S15.346,22.299,14.289,22.299zM19.611,21.771c-1.057,0-1.913-0.681-1.913-1.519c0-0.84,0.856-1.521,1.913-1.521c1.059,0,1.914,0.681,1.914,1.521C21.525,21.092,20.67,21.771,19.611,21.771zM20.075,10.66c0-0.838,0.856-1.518,1.914-1.518s1.913,0.68,1.913,1.518c0,0.839-0.855,1.518-1.913,1.518C20.934,12.178,20.075,11.499,20.075,10.66zM24.275,19.482c-1.057,0-1.914-0.681-1.914-1.519s0.857-1.518,1.914-1.518c1.059,0,1.914,0.68,1.914,1.518S25.334,19.482,24.275,19.482zM25.286,15.475c-1.058,0-1.914-0.68-1.914-1.519c0-0.838,0.856-1.518,1.914-1.518c1.057,0,1.913,0.68,1.913,1.518C27.199,14.795,26.343,15.475,25.286,15.475z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Palm();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Palm = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Palm.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Palm\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.296,27.885v-2.013c0,0-0.402-1.408-1.073-2.013c-0.671-0.604-1.274-1.274-1.409-1.61c0,0-0.268,0.135-0.737-0.335s-1.812-2.616-1.812-2.616l-0.671-0.872c0,0-0.47-0.671-1.275-1.342c-0.805-0.672-0.938-0.067-1.476-0.738s0.604-1.275,1.006-1.409c0.403-0.134,1.946,0.134,2.684,0.872c0.738,0.738,0.738,0.738,0.738,0.738l1.073,1.141l0.537,0.201l0.671-1.073l-0.269-2.281c0,0-0.604-2.55-0.737-4.764c-0.135-2.214-0.47-5.703,1.006-5.837s1.007,2.55,1.073,3.489c0.067,0.938,0.806,5.232,1.208,5.568c0.402,0.335,0.671,0.066,0.671,0.066l0.402-7.514c0,0-0.479-2.438,1.073-2.549c0.939-0.067,0.872,1.543,0.872,2.147c0,0.604,0.269,7.514,0.269,7.514l0.537,0.135c0,0,0.402-2.214,0.604-3.153s0.604-2.416,0.537-3.087c-0.067-0.671-0.135-2.348,1.006-2.348s0.872,1.812,0.939,2.415s-0.134,3.153-0.134,3.757c0,0.604-0.738,3.623-0.537,3.824s2.08-2.817,2.349-3.958c0.268-1.141,0.201-3.02,1.408-2.885c1.208,0.134,0.47,2.817,0.402,3.086c-0.066,0.269-0.671,2.349-0.872,2.952s-0.805,1.476-1.006,2.013s0.402,2.349,0,4.629c-0.402,2.281-1.61,5.166-1.61,5.166l0.604,2.08c0,0-1.744,0.671-3.824,0.805C16.443,28.221,14.296,27.885,14.296,27.885z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Paper();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Paper = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Paper.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Paper\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.916,8.009L15.953,1.888c-0.251-0.119-0.548-0.115-0.798,0.008c-0.25,0.125-0.433,0.357-0.491,0.629c-0.002,0.01-1.04,4.83-2.578,9.636c-0.526,1.646-1.114,3.274-1.728,4.704l1.665,0.786c2-4.643,3.584-11.052,4.181-13.614l11.264,5.316c-0.346,1.513-1.233,5.223-2.42,8.927c-0.767,2.399-1.665,4.797-2.585,6.532c-0.889,1.79-1.958,2.669-2.197,2.552c-1.419,0.03-2.418-1.262-3.09-2.918c-0.32-0.803-0.53-1.63-0.657-2.246c-0.127-0.618-0.166-1.006-0.168-1.006c-0.034-0.317-0.232-0.597-0.52-0.731l-12.962-6.12c-0.301-0.142-0.654-0.11-0.925,0.081c-0.27,0.193-0.416,0.518-0.38,0.847c0.008,0.045,0.195,1.848,0.947,3.736c0.521,1.321,1.406,2.818,2.845,3.575l12.956,6.131l0.006-0.013c0.562,0.295,1.201,0.487,1.947,0.496c1.797-0.117,2.777-1.668,3.818-3.525c3-5.69,5.32-16.602,5.338-16.642C29.512,8.615,29.302,8.19,28.916,8.009z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Parent();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Parent = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Parent.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Parent\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.423,12.17c-0.875,0.641-1.941,1.031-3.102,1.031c-1.164,0-2.231-0.391-3.104-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.549,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.2,1.314,0.62,2.188,1.461,2.188c1.396,0,2.545-2.375,2.545-5.312c0-0.66-0.062-1.291-0.168-1.873c0.6,0.574,1.176,0.812,1.726,0.496c1.227-0.682,1.068-3.311-0.354-5.874C15.921,13.689,15.173,12.795,14.423,12.17zM11.32,12.201c2.361,0,4.277-1.916,4.277-4.279s-1.916-4.279-4.277-4.279c-2.363,0-4.28,1.916-4.28,4.279S8.957,12.201,11.32,12.201zM21.987,17.671c1.508,0,2.732-1.225,2.732-2.735c0-1.51-1.225-2.735-2.732-2.735c-1.511,0-2.736,1.225-2.736,2.735C19.251,16.446,20.477,17.671,21.987,17.671zM25.318,19.327c-0.391-0.705-0.869-1.277-1.349-1.677c-0.56,0.41-1.24,0.659-1.982,0.659c-0.744,0-1.426-0.25-1.983-0.659c-0.479,0.399-0.958,0.972-1.35,1.677c-0.909,1.638-1.009,3.318-0.224,3.754c0.351,0.2,0.721,0.05,1.101-0.317c-0.067,0.372-0.105,0.775-0.105,1.197c0,1.878,0.728,3.396,1.625,3.396c0.54,0,0.808-0.553,0.937-1.398c0.128,0.841,0.396,1.398,0.934,1.398c0.893,0,1.627-1.518,1.627-3.396c0-0.422-0.04-0.825-0.107-1.197c0.383,0.367,0.752,0.52,1.104,0.317C26.328,22.646,26.227,20.965,25.318,19.327z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Pc();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Pc = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Pc.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Pc\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.249,3.14h-9.188l-0.459,0.459v18.225l0.33,2.389H19.57v0.245h-0.307v-0.306h-0.611v0.244h-0.311v-0.367h-0.486v0.307h-1.104l-2.022-0.367v-0.92h0.858l0.302-1.47h2.728c0.188,0,0.339-0.152,0.339-0.339V7.828c0-0.187-0.149-0.338-0.339-0.338H1.591c-0.187,0-0.339,0.152-0.339,0.338V21.24c0,0.187,0.152,0.339,0.339,0.339h3.016l0.199,1.47h1.409l-3.4,3.4L2.11,27.951c0,0,2.941,1.102,6.678,1.102c3.737,0,9.679-0.857,10.476-0.857s4.84,0,4.84,0v-1.225l-0.137-1.068h1.744c-0.2,0.106-0.322,0.244-0.322,0.396v0.979c0,0.341,0.604,0.613,1.352,0.613c0.742,0,1.348-0.272,1.348-0.613v-0.979c0-0.339-0.604-0.611-1.348-0.611c-0.188,0-0.364,0.019-0.525,0.049v-0.17h-2.29l-0.055-0.432h5.382L29.249,3.14L29.249,3.14zM2.478,20.17V8.714h15.07V20.17H2.478z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Pen();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Pen = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Pen.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Pen\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M13.587,12.074c-0.049-0.074-0.11-0.147-0.188-0.202c-0.333-0.243-0.803-0.169-1.047,0.166c-0.244,0.336-0.167,0.805,0.167,1.048c0.303,0.22,0.708,0.167,0.966-0.091l-7.086,9.768l-2.203,7.997l6.917-4.577L26.865,4.468l-4.716-3.42l-1.52,2.096c-0.087-0.349-0.281-0.676-0.596-0.907c-0.73-0.529-1.751-0.369-2.28,0.363C14.721,6.782,16.402,7.896,13.587,12.074zM10.118,25.148L6.56,27.503l1.133-4.117L10.118,25.148zM14.309,11.861c2.183-3.225,1.975-4.099,3.843-6.962c0.309,0.212,0.664,0.287,1.012,0.269L14.309,11.861z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Pensil();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Pensil = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Pensil.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Pensil\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.31,2.872l-3.384-2.127c-0.854-0.536-1.979-0.278-2.517,0.576l-1.334,2.123l6.474,4.066l1.335-2.122C26.42,4.533,26.164,3.407,25.31,2.872zM6.555,21.786l6.474,4.066L23.581,9.054l-6.477-4.067L6.555,21.786zM5.566,26.952l-0.143,3.819l3.379-1.787l3.14-1.658l-6.246-3.925L5.566,26.952z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.People();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.People = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.People.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.People\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.066,20.667c1.227-0.682,1.068-3.311-0.354-5.874c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.102,1.031c-1.164,0-2.231-0.391-3.104-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.549,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.2,1.314,0.62,2.188,1.461,2.188c1.396,0,2.545-2.375,2.545-5.312c0-0.66-0.062-1.291-0.168-1.873C19.939,20.745,20.516,20.983,21.066,20.667zM15.5,12.201c2.361,0,4.277-1.916,4.277-4.279S17.861,3.644,15.5,3.644c-2.363,0-4.28,1.916-4.28,4.279S13.137,12.201,15.5,12.201zM24.094,14.914c1.938,0,3.512-1.573,3.512-3.513c0-1.939-1.573-3.513-3.512-3.513c-1.94,0-3.513,1.573-3.513,3.513C20.581,13.341,22.153,14.914,24.094,14.914zM28.374,17.043c-0.502-0.907-1.116-1.641-1.732-2.154c-0.718,0.526-1.594,0.846-2.546,0.846c-0.756,0-1.459-0.207-2.076-0.55c0.496,1.093,0.803,2.2,0.861,3.19c0.093,1.516-0.381,2.641-1.329,3.165c-0.204,0.117-0.426,0.183-0.653,0.224c-0.056,0.392-0.095,0.801-0.095,1.231c0,2.412,0.935,4.361,2.088,4.361c0.694,0,1.039-0.71,1.204-1.796c0.163,1.079,0.508,1.796,1.199,1.796c1.146,0,2.09-1.95,2.09-4.361c0-0.542-0.052-1.06-0.139-1.538c0.492,0.472,0.966,0.667,1.418,0.407C29.671,21.305,29.541,19.146,28.374,17.043zM6.906,14.914c1.939,0,3.512-1.573,3.512-3.513c0-1.939-1.573-3.513-3.512-3.513c-1.94,0-3.514,1.573-3.514,3.513C3.392,13.341,4.966,14.914,6.906,14.914zM9.441,21.536c-1.593-0.885-1.739-3.524-0.457-6.354c-0.619,0.346-1.322,0.553-2.078,0.553c-0.956,0-1.832-0.321-2.549-0.846c-0.616,0.513-1.229,1.247-1.733,2.154c-1.167,2.104-1.295,4.262-0.287,4.821c0.451,0.257,0.925,0.064,1.414-0.407c-0.086,0.479-0.136,0.996-0.136,1.538c0,2.412,0.935,4.361,2.088,4.361c0.694,0,1.039-0.71,1.204-1.796c0.165,1.079,0.509,1.796,1.201,1.796c1.146,0,2.089-1.95,2.089-4.361c0-0.432-0.04-0.841-0.097-1.233C9.874,21.721,9.651,21.656,9.441,21.536z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Phone();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Phone = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Phone.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Phone\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.065,18.53c-0.467-0.29-1.167-0.21-1.556,0.179l-3.093,3.092c-0.389,0.389-1.025,0.389-1.414,0L9.05,14.848c-0.389-0.389-0.389-1.025,0-1.414l2.913-2.912c0.389-0.389,0.447-1.075,0.131-1.524L6.792,1.485C6.476,1.036,5.863,0.948,5.433,1.29c0,0-4.134,3.281-4.134,6.295c0,12.335,10,22.334,22.334,22.334c3.015,0,5.948-5.533,5.948-5.533c0.258-0.486,0.087-1.122-0.38-1.412L22.065,18.53z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Photo();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Photo = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Photo.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Photo\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.25,10.25H20.5v-1.5h-9.375v1.5h-3.75c-1.104,0-2,0.896-2,2v10.375c0,1.104,0.896,2,2,2H24.25c1.104,0,2-0.896,2-2V12.25C26.25,11.146,25.354,10.25,24.25,10.25zM15.812,23.499c-3.342,0-6.06-2.719-6.06-6.061c0-3.342,2.718-6.062,6.06-6.062s6.062,2.72,6.062,6.062C21.874,20.78,19.153,23.499,15.812,23.499zM15.812,13.375c-2.244,0-4.062,1.819-4.062,4.062c0,2.244,1.819,4.062,4.062,4.062c2.244,0,4.062-1.818,4.062-4.062C19.875,15.194,18.057,13.375,15.812,13.375z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Picker();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Picker = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Picker.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Picker\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.221,10.853c-0.111-0.414-0.261-0.412,0.221-1.539l1.66-3.519c0.021-0.051,0.2-0.412,0.192-0.946c0.015-0.529-0.313-1.289-1.119-1.642c-1.172-0.555-1.17-0.557-2.344-1.107c-0.784-0.396-1.581-0.171-1.979,0.179c-0.42,0.333-0.584,0.7-0.609,0.75L16.58,6.545c-0.564,1.084-0.655,0.97-1.048,1.147c-0.469,0.129-1.244,0.558-1.785,1.815c-1.108,2.346-1.108,2.346-1.108,2.346l-0.276,0.586l1.17,0.553l-3.599,7.623c-0.38,0.828-0.166,1.436-0.166,2.032c0.01,0.627-0.077,1.509-0.876,3.21l-0.276,0.586l3.517,1.661l0.276-0.585c0.808-1.699,1.431-2.326,1.922-2.717c0.46-0.381,1.066-0.6,1.465-1.42l3.599-7.618l1.172,0.554l0.279-0.589c0,0,0,0,1.105-2.345C22.578,12.166,22.419,11.301,22.221,10.853zM14.623,22.83c-0.156,0.353-0.413,0.439-1.091,0.955c-0.577,0.448-1.264,1.172-2.009,2.6l-1.191-0.562c0.628-1.48,0.75-2.474,0.73-3.203c-0.031-0.851-0.128-1.104,0.045-1.449l3.599-7.621l3.517,1.662L14.623,22.83z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Picture();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Picture = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Picture.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Picture\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M2.5,4.833v22.334h27V4.833H2.5zM25.25,25.25H6.75V6.75h18.5V25.25zM11.25,14c1.426,0,2.583-1.157,2.583-2.583c0-1.427-1.157-2.583-2.583-2.583c-1.427,0-2.583,1.157-2.583,2.583C8.667,12.843,9.823,14,11.25,14zM24.251,16.25l-4.917-4.917l-6.917,6.917L10.5,16.333l-2.752,2.752v5.165h16.503V16.25z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.PieChart();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.PieChart = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.PieChart.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.PieChart\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.583,15.917l1.648-10.779C16.692,5.056,16.145,5,15.583,5C9.554,5,4.666,9.888,4.666,15.917c0,6.029,4.888,10.917,10.917,10.917S26.5,21.946,26.5,15.917c0-0.256-0.021-0.507-0.038-0.759L15.583,15.917zM19.437,3.127l-1.648,10.779l10.879-0.759C28.313,8.026,24.436,3.886,19.437,3.127z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Plane();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Plane = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Plane.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Plane\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M19.671,8.11l-2.777,2.777l-3.837-0.861c0.362-0.505,0.916-1.683,0.464-2.135c-0.518-0.517-1.979,0.278-2.305,0.604l-0.913,0.913L7.614,8.804l-2.021,2.021l2.232,1.061l-0.082,0.082l1.701,1.701l0.688-0.687l3.164,1.504L9.571,18.21H6.413l-1.137,1.138l3.6,0.948l1.83,1.83l0.947,3.598l1.137-1.137V21.43l3.725-3.725l1.504,3.164l-0.687,0.687l1.702,1.701l0.081-0.081l1.062,2.231l2.02-2.02l-0.604-2.689l0.912-0.912c0.326-0.326,1.121-1.789,0.604-2.306c-0.452-0.452-1.63,0.101-2.135,0.464l-0.861-3.838l2.777-2.777c0.947-0.947,3.599-4.862,2.62-5.839C24.533,4.512,20.618,7.163,19.671,8.11z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Plugin();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Plugin = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Plugin.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Plugin\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.33,15.836l-3.893-1.545l3.136-7.9c0.28-0.705-0.064-1.505-0.771-1.785c-0.707-0.28-1.506,0.065-1.785,0.771l-3.136,7.9l-4.88-1.937l3.135-7.9c0.281-0.706-0.064-1.506-0.77-1.786c-0.706-0.279-1.506,0.065-1.785,0.771l-3.136,7.9L8.554,8.781l-1.614,4.066l2.15,0.854l-2.537,6.391c-0.61,1.54,0.143,3.283,1.683,3.895l1.626,0.646L8.985,26.84c-0.407,1.025,0.095,2.188,1.122,2.596l0.93,0.369c1.026,0.408,2.188-0.095,2.596-1.121l0.877-2.207l1.858,0.737c1.54,0.611,3.284-0.142,3.896-1.682l2.535-6.391l1.918,0.761L26.33,15.836z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Plus();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Plus = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Plus.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Plus\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.979,12.896 19.312,12.896 19.312,6.229 12.647,6.229 12.647,12.896 5.979,12.896 5.979,19.562 12.647,19.562 12.647,26.229 19.312,26.229 19.312,19.562 25.979,19.562z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Power();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Power = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Power.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Power\",\r\n\r\n /**\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.542,8.354c-1.47-1.766-2.896-2.617-3.025-2.695c-0.954-0.565-2.181-0.241-2.739,0.724c-0.556,0.961-0.24,2.194,0.705,2.763c0,0,0.001,0,0.002,0.001c0.001,0,0.002,0.001,0.003,0.002c0.001,0,0.003,0.001,0.004,0.001c0.102,0.062,1.124,0.729,2.08,1.925c1.003,1.261,1.933,3.017,1.937,5.438c-0.001,2.519-1.005,4.783-2.64,6.438c-1.637,1.652-3.877,2.668-6.368,2.669c-2.491-0.001-4.731-1.017-6.369-2.669c-1.635-1.654-2.639-3.919-2.64-6.438c0.005-2.499,0.995-4.292,2.035-5.558c0.517-0.625,1.043-1.098,1.425-1.401c0.191-0.152,0.346-0.263,0.445-0.329c0.049-0.034,0.085-0.058,0.104-0.069c0.005-0.004,0.009-0.006,0.012-0.008s0.004-0.002,0.004-0.002l0,0c0.946-0.567,1.262-1.802,0.705-2.763c-0.559-0.965-1.785-1.288-2.739-0.724c-0.128,0.079-1.555,0.93-3.024,2.696c-1.462,1.751-2.974,4.511-2.97,8.157C2.49,23.775,8.315,29.664,15.5,29.667c7.186-0.003,13.01-5.892,13.012-13.155C28.516,12.864,27.005,10.105,25.542,8.354zM15.5,17.523c1.105,0,2.002-0.907,2.002-2.023h-0.001V3.357c0-1.118-0.896-2.024-2.001-2.024s-2.002,0.906-2.002,2.024V15.5C13.498,16.616,14.395,17.523,15.5,17.523z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ppt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ppt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ppt.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ppt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16.604,1.914c0-0.575-0.466-1.041-1.041-1.041s-1.041,0.466-1.041,1.041v1.04h2.082V1.914zM16.604,22.717h-2.082v3.207c0,0.574-4.225,4.031-4.225,4.031l2.468-0.003l2.807-2.673l3.013,2.693l2.272-0.039l-4.254-4.011V22.717L16.604,22.717zM28.566,7.113c0.86,0,1.56-0.698,1.56-1.56c0-0.861-0.698-1.56-1.56-1.56H2.561c-0.861,0-1.56,0.699-1.56,1.56c0,0.862,0.699,1.56,1.56,1.56h1.583v12.505l-0.932-0.022c-0.861,0-1.213,0.467-1.213,1.04c0,0.576,0.352,1.041,1.213,1.041h24.597c0.86,0,1.299-0.465,1.299-1.041c0-1.094-1.299-1.04-1.299-1.04l-0.804,0.109V7.113H28.566zM11.435,17.516c-3.771,0-4.194-4.191-4.194-4.191c0-4.096,4.162-4.161,4.162-4.161v4.161h4.193C15.596,17.516,11.435,17.516,11.435,17.516zM18.716,13.388h-1.071v-1.073h1.071V13.388zM18.716,10.267h-1.071V9.194h1.071V10.267zM23.314,13.388H20.26c-0.296,0-0.535-0.24-0.535-0.536c0-0.297,0.239-0.537,0.535-0.537h3.057c0.297,0,0.535,0.24,0.535,0.537C23.852,13.147,23.611,13.388,23.314,13.388zM23.314,10.267H20.26c-0.296,0-0.535-0.239-0.535-0.535c0-0.297,0.239-0.537,0.535-0.537h3.057c0.297,0,0.535,0.24,0.535,0.537C23.852,10.027,23.611,10.267,23.314,10.267z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Printer();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Printer = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Printer.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Printer\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.569,12.125h-2.12c-0.207-1.34-1.247-2.759-2.444-3.967c-1.277-1.24-2.654-2.234-3.784-2.37c-0.062-0.008-0.124-0.014-0.198-0.015H8.594c-0.119,0-0.235,0.047-0.319,0.132c-0.083,0.083-0.132,0.2-0.132,0.32v5.9H6.069c-1.104,0-2,0.896-2,2V23h4.074v2.079c0,0.118,0.046,0.23,0.132,0.318c0.086,0.085,0.199,0.131,0.319,0.131h13.445c0.118,0,0.232-0.046,0.318-0.131s0.138-0.199,0.138-0.318V23h4.074v-8.875C26.569,13.021,25.674,12.125,24.569,12.125zM21.589,24.626H9.043V21.5h12.546V24.626zM21.589,13.921c0-0.03,0-0.063-0.003-0.096c-0.015-0.068-0.062-0.135-0.124-0.2H9.043v-6.95h6.987v0.001c0.305-0.019,0.567,0.282,0.769,0.971c0.183,0.655,0.229,1.509,0.229,2.102c0.001,0.433-0.019,0.725-0.019,0.725l-0.037,0.478l0.48,0.005c0.002,0,1.109,0.014,2.196,0.26c1.044,0.226,1.86,0.675,1.938,1.184c0.003,0.045,0.003,0.091,0.003,0.133V13.921z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Quote();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Quote = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Quote.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Quote\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.505,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.128,0,2.07,0.411,2.826,1.229c0.756,0.82,1.134,1.832,1.134,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.259,0.443-4.327,1.332-6.203c0.888-1.875,2.243-3.57,4.067-5.085c1.824-1.514,2.988-2.272,3.492-2.272c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L14.505,5.873zM27.465,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.104,0,2.04,0.411,2.808,1.229c0.769,0.82,1.152,1.832,1.152,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.284,0.449-4.369,1.35-6.256c0.9-1.887,2.256-3.577,4.068-5.067c1.812-1.49,2.97-2.236,3.474-2.236c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L27.465,5.873z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Rain();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Rain = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Rain.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Rain\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.874c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979zM9.029,26.682c0-1.115,0.021-5.425,0.021-5.432c0.002-0.409-0.247-0.779-0.628-0.932c-0.38-0.152-0.815-0.059-1.099,0.24c-0.006,0.008-1.037,1.098-2.081,2.342c-0.523,0.627-1.048,1.287-1.463,1.896c-0.399,0.648-0.753,1.066-0.811,1.885C2.971,28.355,4.324,29.711,6,29.714C7.672,29.71,9.029,28.354,9.029,26.682zM4.971,26.727c0.091-0.349,1.081-1.719,1.993-2.764c0.025-0.029,0.051-0.061,0.076-0.089c-0.005,1.124-0.01,2.294-0.01,2.808c0,0.567-0.461,1.028-1.029,1.03C5.447,27.71,4.997,27.273,4.971,26.727zM16.425,26.682c0-1.115,0.021-5.424,0.021-5.43c0.002-0.41-0.247-0.779-0.628-0.934c-0.381-0.152-0.814-0.058-1.1,0.242c-0.006,0.008-1.035,1.094-2.08,2.342c-0.522,0.623-1.047,1.285-1.463,1.894c-0.399,0.649-0.753,1.068-0.809,1.888c0,1.672,1.354,3.028,3.029,3.028C15.068,29.711,16.425,28.354,16.425,26.682zM12.365,26.729c0.092-0.349,1.081-1.72,1.993-2.765c0.025-0.03,0.05-0.06,0.075-0.089c-0.005,1.123-0.011,2.294-0.011,2.807c-0.002,0.568-0.461,1.027-1.028,1.029C12.84,27.709,12.392,27.273,12.365,26.729zM23.271,20.317c-0.38-0.153-0.816-0.06-1.099,0.24c-0.009,0.008-1.037,1.097-2.08,2.342c-0.523,0.625-1.049,1.285-1.462,1.896c-0.402,0.649-0.754,1.067-0.812,1.886c0,1.672,1.354,3.029,3.03,3.029c1.673,0,3.027-1.357,3.027-3.029c0-1.115,0.022-5.425,0.022-5.431C23.9,20.84,23.651,20.47,23.271,20.317zM21.879,26.681c-0.004,0.568-0.463,1.027-1.031,1.029c-0.553-0.002-1.002-0.438-1.028-0.982c0.092-0.349,1.081-1.72,1.993-2.765c0.025-0.028,0.05-0.059,0.074-0.088C21.883,24.998,21.879,26.167,21.879,26.681z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Raphael();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Raphael = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Raphael.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Raphael\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.777,18.941c0.584-0.881,0.896-1.914,0.896-2.998c0-1.457-0.567-2.826-1.598-3.854l-6.91-6.911l-0.003,0.002c-0.985-0.988-2.35-1.6-3.851-1.6c-1.502,0-2.864,0.612-3.85,1.6H12.46l-6.911,6.911c-1.031,1.029-1.598,2.398-1.598,3.854c0,1.457,0.567,2.826,1.598,3.854l6.231,6.229c0.25,0.281,0.512,0.544,0.789,0.785c1.016,0.961,2.338,1.49,3.743,1.49c1.456,0,2.825-0.565,3.854-1.598l6.723-6.725c0.021-0.019,0.034-0.032,0.051-0.051l0.14-0.138c0.26-0.26,0.487-0.54,0.688-0.838c0.004-0.008,0.01-0.015,0.014-0.021L27.777,18.941zM26.658,15.946c0,0.678-0.197,1.326-0.561,1.879c-0.222,0.298-0.447,0.559-0.684,0.784L25.4,18.625c-1.105,1.052-2.354,1.35-3.414,1.35c-0.584,0-1.109-0.09-1.523-0.195c-2.422-0.608-5.056-2.692-6.261-5.732c0.649,0.274,1.362,0.426,2.11,0.426c2.811,0,5.129-2.141,5.415-4.877l3.924,3.925C26.301,14.167,26.658,15.029,26.658,15.946zM16.312,5.6c1.89,0,3.426,1.538,3.426,3.427c0,1.89-1.536,3.427-3.426,3.427c-1.889,0-3.426-1.537-3.426-3.427C12.886,7.138,14.423,5.6,16.312,5.6zM6.974,18.375c-0.649-0.648-1.007-1.512-1.007-2.429c0-0.917,0.357-1.78,1.007-2.428l2.655-2.656c-0.693,2.359-0.991,4.842-0.831,7.221c0.057,0.854,0.175,1.677,0.345,2.46L6.974,18.375zM11.514,11.592c0.583,4.562,4.195,9.066,8.455,10.143c0.693,0.179,1.375,0.265,2.033,0.265c0.01,0,0.02,0,0.027,0l-3.289,3.289c-0.648,0.646-1.512,1.006-2.428,1.006c-0.638,0-1.248-0.177-1.779-0.5l0.001-0.002c-0.209-0.142-0.408-0.295-0.603-0.461c-0.015-0.019-0.031-0.026-0.046-0.043l-0.665-0.664c-1.367-1.567-2.227-3.903-2.412-6.671C10.669,15.856,10.921,13.673,11.514,11.592\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ReflectH();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ReflectH = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ReflectH.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.ReflectH\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.57,20.273h0.854v-1.705H15.57V20.273zM15.57,23.686h0.854V21.98H15.57V23.686zM15.57,27.096h0.854v-1.705H15.57V27.096zM15.57,29.689h0.854V28.8H15.57V29.689zM15.57,16.865h0.854V15.16H15.57V16.865zM15.57,3.225h0.854V1.52H15.57V3.225zM15.57,6.635h0.854V4.93H15.57V6.635zM15.57,10.045h0.854V8.34H15.57V10.045zM15.57,13.455h0.854V11.75H15.57V13.455zM18.41,3.327V25.46h12.015L18.41,3.327zM19.264,6.68l9.729,17.93h-9.729V6.68zM13.535,25.46V3.327L1.521,25.46H13.535z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ReflectV();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ReflectV = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ReflectV.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.ReflectV\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.643,16.008v-0.854h-1.705v0.854H20.643zM24.053,16.008v-0.854h-1.705v0.854H24.053zM27.463,16.008v-0.854h-1.705v0.854H27.463zM30.059,16.008v-0.854h-0.891v0.854H30.059zM17.232,16.008v-0.854h-1.709v0.854H17.232zM3.593,16.008v-0.854H1.888v0.854H3.593zM7.003,16.008v-0.854H5.298v0.854H7.003zM10.414,16.008v-0.854H8.709v0.854H10.414zM13.824,16.008v-0.854h-1.705v0.854H13.824zM3.694,13.167h22.134V1.152L3.694,13.167zM7.048,12.314l17.929-9.729v9.729H7.048zM25.828,18.042H3.694l22.134,12.015V18.042z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Refresh();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Refresh = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Refresh.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Refresh\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.083,15.5c-0.009,4.739-3.844,8.574-8.583,8.583c-4.741-0.009-8.577-3.844-8.585-8.583c0.008-4.741,3.844-8.577,8.585-8.585c1.913,0,3.665,0.629,5.09,1.686l-1.782,1.783l8.429,2.256l-2.26-8.427l-1.89,1.89c-2.072-1.677-4.717-2.688-7.587-2.688C8.826,3.418,3.418,8.826,3.416,15.5C3.418,22.175,8.826,27.583,15.5,27.583S27.583,22.175,27.583,15.5H24.083z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Resize2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Resize2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Resize2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Resize2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M1.999,2.332v26.499H28.5V2.332H1.999zM26.499,26.832H4V12.5h8.167V4.332h14.332V26.832zM15.631,17.649l5.468,5.469l-1.208,1.206l5.482,1.469l-1.47-5.481l-1.195,1.195l-5.467-5.466l1.209-1.208l-5.482-1.469l1.468,5.48L15.631,17.649z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Rotate();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Rotate = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Rotate.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Rotate\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,5.27c1.914,0,3.666,0.629,5.089,1.686l-1.781,1.783l8.428,2.256l-2.26-8.427l-1.889,1.89C21.016,2.781,18.371,1.77,15.5,1.77C8.827,1.773,3.418,7.181,3.417,13.855c0.001,4.063,2.012,7.647,5.084,9.838v-4.887c-0.993-1.4-1.583-3.105-1.585-4.952C6.923,9.114,10.759,5.278,15.5,5.27zM9.5,29.23h12V12.355h-12V29.23z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ruler();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ruler = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ruler.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ruler\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M6.63,21.796l-5.122,5.121h25.743V1.175L6.63,21.796zM18.702,10.48c0.186-0.183,0.48-0.183,0.664,0l1.16,1.159c0.184,0.183,0.186,0.48,0.002,0.663c-0.092,0.091-0.213,0.137-0.332,0.137c-0.121,0-0.24-0.046-0.33-0.137l-1.164-1.159C18.519,10.96,18.519,10.664,18.702,10.48zM17.101,12.084c0.184-0.183,0.48-0.183,0.662,0l2.156,2.154c0.184,0.183,0.184,0.48,0.002,0.661c-0.092,0.092-0.213,0.139-0.334,0.139s-0.24-0.046-0.33-0.137l-2.156-2.154C16.917,12.564,16.917,12.267,17.101,12.084zM15.497,13.685c0.184-0.183,0.48-0.183,0.664,0l1.16,1.161c0.184,0.183,0.182,0.48-0.002,0.663c-0.092,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.24-0.046-0.332-0.138l-1.16-1.16C15.314,14.166,15.314,13.868,15.497,13.685zM13.896,15.288c0.184-0.183,0.48-0.181,0.664,0.002l1.158,1.159c0.183,0.184,0.183,0.48,0,0.663c-0.092,0.092-0.212,0.138-0.332,0.138c-0.119,0-0.24-0.046-0.332-0.138l-1.158-1.161C13.713,15.767,13.713,15.471,13.896,15.288zM12.293,16.892c0.183-0.184,0.479-0.184,0.663,0l2.154,2.153c0.184,0.184,0.184,0.481,0,0.665c-0.092,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.242-0.046-0.334-0.138l-2.153-2.155C12.11,17.371,12.11,17.075,12.293,16.892zM10.302,24.515c-0.091,0.093-0.212,0.139-0.332,0.139c-0.119,0-0.238-0.045-0.33-0.137l-2.154-2.153c-0.184-0.183-0.184-0.479,0-0.663s0.479-0.184,0.662,0l2.154,2.153C10.485,24.036,10.485,24.332,10.302,24.515zM10.912,21.918c-0.093,0.093-0.214,0.139-0.333,0.139c-0.12,0-0.24-0.045-0.33-0.137l-1.162-1.161c-0.184-0.183-0.184-0.479,0-0.66c0.184-0.185,0.48-0.187,0.664-0.003l1.161,1.162C11.095,21.438,11.095,21.735,10.912,21.918zM12.513,20.316c-0.092,0.092-0.211,0.138-0.332,0.138c-0.119,0-0.239-0.046-0.331-0.138l-1.159-1.16c-0.184-0.184-0.184-0.48,0-0.664s0.48-0.182,0.663,0.002l1.159,1.161C12.696,19.838,12.696,20.135,12.513,20.316zM22.25,21.917h-8.67l8.67-8.67V21.917zM22.13,10.7c-0.09,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.242-0.046-0.334-0.138l-1.16-1.159c-0.184-0.183-0.184-0.479,0-0.663c0.182-0.183,0.479-0.183,0.662,0l1.16,1.159C22.312,10.221,22.313,10.517,22.13,10.7zM24.726,10.092c-0.092,0.092-0.213,0.137-0.332,0.137s-0.24-0.045-0.33-0.137l-2.154-2.154c-0.184-0.183-0.184-0.481,0-0.664s0.482-0.181,0.664,0.002l2.154,2.154C24.911,9.613,24.909,9.91,24.726,10.092z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Run();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Run = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Run.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Run\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M17.41,20.395l-0.778-2.723c0.228-0.2,0.442-0.414,0.644-0.643l2.721,0.778c0.287-0.418,0.534-0.862,0.755-1.323l-2.025-1.96c0.097-0.288,0.181-0.581,0.241-0.883l2.729-0.684c0.02-0.252,0.039-0.505,0.039-0.763s-0.02-0.51-0.039-0.762l-2.729-0.684c-0.061-0.302-0.145-0.595-0.241-0.883l2.026-1.96c-0.222-0.46-0.469-0.905-0.756-1.323l-2.721,0.777c-0.201-0.228-0.416-0.442-0.644-0.643l0.778-2.722c-0.418-0.286-0.863-0.534-1.324-0.755l-1.96,2.026c-0.287-0.097-0.581-0.18-0.883-0.241l-0.683-2.73c-0.253-0.019-0.505-0.039-0.763-0.039s-0.51,0.02-0.762,0.039l-0.684,2.73c-0.302,0.061-0.595,0.144-0.883,0.241l-1.96-2.026C7.048,3.463,6.604,3.71,6.186,3.997l0.778,2.722C6.736,6.919,6.521,7.134,6.321,7.361L3.599,6.583C3.312,7.001,3.065,7.446,2.844,7.907l2.026,1.96c-0.096,0.288-0.18,0.581-0.241,0.883l-2.73,0.684c-0.019,0.252-0.039,0.505-0.039,0.762s0.02,0.51,0.039,0.763l2.73,0.684c0.061,0.302,0.145,0.595,0.241,0.883l-2.026,1.96c0.221,0.46,0.468,0.905,0.755,1.323l2.722-0.778c0.2,0.229,0.415,0.442,0.643,0.643l-0.778,2.723c0.418,0.286,0.863,0.533,1.323,0.755l1.96-2.026c0.288,0.097,0.581,0.181,0.883,0.241l0.684,2.729c0.252,0.02,0.505,0.039,0.763,0.039s0.51-0.02,0.763-0.039l0.683-2.729c0.302-0.061,0.596-0.145,0.883-0.241l1.96,2.026C16.547,20.928,16.992,20.681,17.41,20.395zM11.798,15.594c-1.877,0-3.399-1.522-3.399-3.399s1.522-3.398,3.399-3.398s3.398,1.521,3.398,3.398S13.675,15.594,11.798,15.594zM27.29,22.699c0.019-0.547-0.06-1.104-0.23-1.654l1.244-1.773c-0.188-0.35-0.4-0.682-0.641-0.984l-2.122,0.445c-0.428-0.364-0.915-0.648-1.436-0.851l-0.611-2.079c-0.386-0.068-0.777-0.105-1.173-0.106l-0.974,1.936c-0.279,0.054-0.558,0.128-0.832,0.233c-0.257,0.098-0.497,0.22-0.727,0.353L17.782,17.4c-0.297,0.262-0.568,0.545-0.813,0.852l0.907,1.968c-0.259,0.495-0.437,1.028-0.519,1.585l-1.891,1.06c0.019,0.388,0.076,0.776,0.164,1.165l2.104,0.519c0.231,0.524,0.541,0.993,0.916,1.393l-0.352,2.138c0.32,0.23,0.66,0.428,1.013,0.6l1.715-1.32c0.536,0.141,1.097,0.195,1.662,0.15l1.452,1.607c0.2-0.057,0.399-0.118,0.596-0.193c0.175-0.066,0.34-0.144,0.505-0.223l0.037-2.165c0.455-0.339,0.843-0.747,1.152-1.206l2.161-0.134c0.152-0.359,0.279-0.732,0.368-1.115L27.29,22.699zM23.127,24.706c-1.201,0.458-2.545-0.144-3.004-1.345s0.143-2.546,1.344-3.005c1.201-0.458,2.547,0.144,3.006,1.345C24.931,22.902,24.328,24.247,23.127,24.706z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Rw();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Rw = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Rw.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Rw\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M5.5,15.499,15.8,21.447,15.8,15.846,25.5,21.447,25.5,9.552,15.8,15.152,15.8,9.552z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Safari();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Safari = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Safari.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Safari\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16.154,5.135c-0.504,0-1,0.031-1.488,0.089l-0.036-0.18c-0.021-0.104-0.06-0.198-0.112-0.283c0.381-0.308,0.625-0.778,0.625-1.306c0-0.927-0.751-1.678-1.678-1.678s-1.678,0.751-1.678,1.678c0,0.745,0.485,1.376,1.157,1.595c-0.021,0.105-0.021,0.216,0,0.328l0.033,0.167C7.645,6.95,3.712,11.804,3.712,17.578c0,6.871,5.571,12.441,12.442,12.441c6.871,0,12.441-5.57,12.441-12.441C28.596,10.706,23.025,5.135,16.154,5.135zM16.369,8.1c4.455,0,8.183,3.116,9.123,7.287l-0.576,0.234c-0.148-0.681-0.755-1.191-1.48-1.191c-0.837,0-1.516,0.679-1.516,1.516c0,0.075,0.008,0.148,0.018,0.221l-2.771-0.028c-0.054-0.115-0.114-0.226-0.182-0.333l3.399-5.11l0.055-0.083l-4.766,4.059c-0.352-0.157-0.74-0.248-1.148-0.256l0.086-0.018l-1.177-2.585c0.64-0.177,1.111-0.763,1.111-1.459c0-0.837-0.678-1.515-1.516-1.515c-0.075,0-0.147,0.007-0.219,0.018l0.058-0.634C15.357,8.141,15.858,8.1,16.369,8.1zM12.146,3.455c0-0.727,0.591-1.318,1.318-1.318c0.727,0,1.318,0.591,1.318,1.318c0,0.425-0.203,0.802-0.516,1.043c-0.183-0.123-0.413-0.176-0.647-0.13c-0.226,0.045-0.413,0.174-0.535,0.349C12.542,4.553,12.146,4.049,12.146,3.455zM7.017,17.452c0-4.443,3.098-8.163,7.252-9.116l0.297,0.573c-0.61,0.196-1.051,0.768-1.051,1.442c0,0.837,0.678,1.516,1.515,1.516c0.068,0,0.135-0.006,0.2-0.015l-0.058,2.845l0.052-0.011c-0.442,0.204-0.824,0.513-1.116,0.895l0.093-0.147l-1.574-0.603l1.172,1.239l0.026-0.042c-0.19,0.371-0.306,0.788-0.324,1.229l-0.003-0.016l-2.623,1.209c-0.199-0.604-0.767-1.041-1.438-1.041c-0.837,0-1.516,0.678-1.516,1.516c0,0.064,0.005,0.128,0.013,0.191l-0.783-0.076C7.063,18.524,7.017,17.994,7.017,17.452zM16.369,26.805c-4.429,0-8.138-3.078-9.106-7.211l0.691-0.353c0.146,0.686,0.753,1.2,1.482,1.2c0.837,0,1.515-0.679,1.515-1.516c0-0.105-0.011-0.207-0.031-0.307l2.858,0.03c0.045,0.095,0.096,0.187,0.15,0.276l-3.45,5.277l0.227-0.195l4.529-3.92c0.336,0.153,0.705,0.248,1.094,0.266l-0.019,0.004l1.226,2.627c-0.655,0.166-1.142,0.76-1.142,1.468c0,0.837,0.678,1.515,1.516,1.515c0.076,0,0.151-0.007,0.225-0.018l0.004,0.688C17.566,26.746,16.975,26.805,16.369,26.805zM18.662,26.521l-0.389-0.6c0.661-0.164,1.152-0.759,1.152-1.47c0-0.837-0.68-1.516-1.516-1.516c-0.066,0-0.13,0.005-0.193,0.014v-2.86l-0.025,0.004c0.409-0.185,0.77-0.459,1.055-0.798l1.516,0.659l-1.104-1.304c0.158-0.335,0.256-0.704,0.278-1.095l2.552-1.164c0.19,0.618,0.766,1.068,1.447,1.068c0.838,0,1.516-0.679,1.516-1.516c0-0.069-0.006-0.137-0.016-0.204l0.65,0.12c0.089,0.517,0.136,1.049,0.136,1.591C25.722,21.826,22.719,25.499,18.662,26.521z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ScrewDriver();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ScrewDriver = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ScrewDriver.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ScrewDriver\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M19.387,14.373c2.119-2.619,5.322-6.77,5.149-7.75c-0.128-0.729-0.882-1.547-1.763-2.171c-0.883-0.625-1.916-1.044-2.645-0.915c-0.98,0.173-3.786,4.603-5.521,7.49c-0.208,0.344,0.328,1.177,0.156,1.468c-0.172,0.292-1.052,0.042-1.18,0.261c-0.263,0.451-0.417,0.722-0.417,0.722s-0.553,0.823,1.163,2.163l-5.233,7.473c-0.267,0.381-1.456,0.459-1.456,0.459l-1.184,3.312l0.859,0.602l2.708-2.246c0,0-0.334-1.143-0.068-1.523l5.242-7.489c1.719,1,2.377,0.336,2.377,0.336s0.201-0.238,0.536-0.639c0.161-0.194-0.374-0.936-0.159-1.197C18.169,14.467,19.133,14.685,19.387,14.373z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Search();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Search = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Search.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Search\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Sencha();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Sencha = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Sencha.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Sencha\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M18.265,22.734c1.365,0.662,2.309,2.062,2.309,3.682c0,1.566-0.881,2.928-2.176,3.615l1.922-0.98c3.16-1.58,5.332-4.846,5.332-8.617c0-3.719-2.109-6.945-5.195-8.547l-6.272-3.144c-1.366-0.662-2.308-2.062-2.308-3.682c0-1.567,0.881-2.928,2.175-3.614L12.13,2.428c-3.161,1.578-5.332,4.843-5.332,8.616c0,3.718,2.108,6.944,5.195,8.546L18.265,22.734z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Settings();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Settings = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Settings.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Settings\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16.015,12.03c-2.156,0-3.903,1.747-3.903,3.903c0,2.155,1.747,3.903,3.903,3.903c0.494,0,0.962-0.102,1.397-0.27l0.836,1.285l1.359-0.885l-0.831-1.276c0.705-0.706,1.142-1.681,1.142-2.757C19.918,13.777,18.171,12.03,16.015,12.03zM16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM26.174,20.809c-0.241,0.504-0.513,0.99-0.826,1.45L22.19,21.58c-0.481,0.526-1.029,0.994-1.634,1.385l0.119,3.202c-0.507,0.23-1.028,0.421-1.569,0.57l-1.955-2.514c-0.372,0.051-0.75,0.086-1.136,0.086c-0.356,0-0.706-0.029-1.051-0.074l-1.945,2.5c-0.541-0.151-1.065-0.342-1.57-0.569l0.117-3.146c-0.634-0.398-1.208-0.88-1.712-1.427L6.78,22.251c-0.313-0.456-0.583-0.944-0.826-1.448l2.088-2.309c-0.226-0.703-0.354-1.451-0.385-2.223l-2.768-1.464c0.055-0.563,0.165-1.107,0.301-1.643l3.084-0.427c0.29-0.702,0.675-1.352,1.135-1.942L8.227,7.894c0.399-0.389,0.83-0.744,1.283-1.07l2.663,1.672c0.65-0.337,1.349-0.593,2.085-0.75l0.968-3.001c0.278-0.021,0.555-0.042,0.837-0.042c0.282,0,0.56,0.022,0.837,0.042l0.976,3.028c0.72,0.163,1.401,0.416,2.036,0.75l2.704-1.697c0.455,0.326,0.887,0.681,1.285,1.07l-1.216,2.986c0.428,0.564,0.793,1.181,1.068,1.845l3.185,0.441c0.135,0.535,0.247,1.081,0.302,1.643l-2.867,1.516c-0.034,0.726-0.15,1.43-0.355,2.1L26.174,20.809z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.SettingsAlt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.SettingsAlt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.SettingsAlt.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.SettingsAlt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM24.386,14.968c-1.451,1.669-3.706,2.221-5.685,1.586l-7.188,8.266c-0.766,0.88-2.099,0.97-2.979,0.205s-0.973-2.099-0.208-2.979l7.198-8.275c-0.893-1.865-0.657-4.164,0.787-5.824c1.367-1.575,3.453-2.151,5.348-1.674l-2.754,3.212l0.901,2.621l2.722,0.529l2.761-3.22C26.037,11.229,25.762,13.387,24.386,14.968z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Shuffle();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Shuffle = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Shuffle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Shuffle\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.786,20.654c-0.618-0.195-1.407-0.703-2.291-1.587c-0.757-0.742-1.539-1.698-2.34-2.741c-0.191,0.256-0.382,0.51-0.574,0.77c-0.524,0.709-1.059,1.424-1.604,2.127c1.904,2.31,3.88,4.578,6.809,4.952v2.701l7.556-4.362l-7.556-4.362V20.654zM9.192,11.933c0.756,0.741,1.538,1.697,2.339,2.739c0.195-0.262,0.39-0.521,0.587-0.788c0.52-0.703,1.051-1.412,1.592-2.11c-2.032-2.463-4.133-4.907-7.396-5.025h-3.5v3.5h3.5C6.969,10.223,7.996,10.735,9.192,11.933zM21.786,10.341v2.535l7.556-4.363l-7.556-4.363v2.647c-1.904,0.219-3.425,1.348-4.751,2.644c-2.196,2.183-4.116,5.167-6.011,7.538c-1.867,2.438-3.741,3.888-4.712,3.771h-3.5v3.5h3.5c2.185-0.029,3.879-1.266,5.34-2.693c2.194-2.184,4.116-5.167,6.009-7.538C19.205,12.003,20.746,10.679,21.786,10.341z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Skull();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Skull = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Skull.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Skull\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.947,11.14c0-5.174-3.979-9.406-10.613-9.406c-6.633,0-10.282,4.232-10.282,9.406c0,5.174,1.459,4.511,1.459,7.43c0,1.095-1.061,0.564-1.061,2.919c0,2.587,3.615,2.223,4.677,3.283c1.061,1.062,0.961,3.019,0.961,3.019s0.199,0.796,0.564,0.563c0,0,0.232,0.564,0.498,0.232c0,0,0.265,0.563,0.531,0.1c0,0,0.265,0.631,0.696,0.166c0,0,0.431,0.63,0.929,0.133c0,0,0.564,0.53,1.194,0.133c0.63,0.397,1.194-0.133,1.194-0.133c0.497,0.497,0.929-0.133,0.929-0.133c0.432,0.465,0.695-0.166,0.695-0.166c0.268,0.464,0.531-0.1,0.531-0.1c0.266,0.332,0.498-0.232,0.498-0.232c0.365,0.232,0.564-0.563,0.564-0.563s-0.1-1.957,0.961-3.019c1.062-1.061,4.676-0.696,4.676-3.283c0-2.354-1.061-1.824-1.061-2.919C24.488,15.651,25.947,16.314,25.947,11.14zM10.333,20.992c-1.783,0.285-2.59-0.215-2.785-1.492c-0.508-3.328,2.555-3.866,4.079-3.683c0.731,0.088,1.99,0.862,1.99,1.825C13.617,20.229,11.992,20.727,10.333,20.992zM16.461,25.303c-0.331,0-0.862-0.431-0.895-1.227c-0.033,0.796-0.63,1.227-0.961,1.227c-0.332,0-0.83-0.331-0.863-1.127c-0.033-0.796,1.028-4.013,1.792-4.013c0.762,0,1.824,3.217,1.791,4.013S16.794,25.303,16.461,25.303zM23.361,19.5c-0.195,1.277-1.004,1.777-2.787,1.492c-1.658-0.266-3.283-0.763-3.283-3.35c0-0.963,1.258-1.737,1.99-1.825C20.805,15.634,23.869,16.172,23.361,19.5z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Skype();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Skype = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Skype.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Skype\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.777,18.438c0.209-0.948,0.318-1.934,0.318-2.944c0-7.578-6.144-13.722-13.724-13.722c-0.799,0-1.584,0.069-2.346,0.2C11.801,1.199,10.35,0.75,8.793,0.75c-4.395,0-7.958,3.562-7.958,7.958c0,1.47,0.399,2.845,1.094,4.024c-0.183,0.893-0.277,1.814-0.277,2.76c0,7.58,6.144,13.723,13.722,13.723c0.859,0,1.699-0.078,2.515-0.23c1.119,0.604,2.399,0.945,3.762,0.945c4.395,0,7.957-3.562,7.957-7.959C29.605,20.701,29.309,19.502,28.777,18.438zM22.412,22.051c-0.635,0.898-1.573,1.609-2.789,2.115c-1.203,0.5-2.646,0.754-4.287,0.754c-1.971,0-3.624-0.346-4.914-1.031C9.5,23.391,8.74,22.717,8.163,21.885c-0.583-0.842-0.879-1.676-0.879-2.479c0-0.503,0.192-0.939,0.573-1.296c0.375-0.354,0.857-0.532,1.432-0.532c0.471,0,0.878,0.141,1.209,0.422c0.315,0.269,0.586,0.662,0.805,1.174c0.242,0.558,0.508,1.027,0.788,1.397c0.269,0.355,0.656,0.656,1.151,0.89c0.497,0.235,1.168,0.354,1.992,0.354c1.135,0,2.064-0.241,2.764-0.721c0.684-0.465,1.016-1.025,1.016-1.711c0-0.543-0.173-0.969-0.529-1.303c-0.373-0.348-0.865-0.621-1.465-0.807c-0.623-0.195-1.47-0.404-2.518-0.623c-1.424-0.306-2.634-0.668-3.596-1.076c-0.984-0.419-1.777-1-2.357-1.727c-0.59-0.736-0.889-1.662-0.889-2.75c0-1.036,0.314-1.971,0.933-2.776c0.613-0.8,1.51-1.423,2.663-1.849c1.139-0.422,2.494-0.635,4.027-0.635c1.225,0,2.303,0.141,3.201,0.421c0.904,0.282,1.668,0.662,2.267,1.13c0.604,0.472,1.054,0.977,1.335,1.5c0.284,0.529,0.43,1.057,0.43,1.565c0,0.49-0.189,0.937-0.563,1.324c-0.375,0.391-0.851,0.589-1.408,0.589c-0.509,0-0.905-0.124-1.183-0.369c-0.258-0.227-0.523-0.58-0.819-1.09c-0.342-0.65-0.756-1.162-1.229-1.523c-0.463-0.351-1.232-0.529-2.292-0.529c-0.984,0-1.784,0.197-2.379,0.588c-0.572,0.375-0.85,0.805-0.85,1.314c0,0.312,0.09,0.574,0.273,0.799c0.195,0.238,0.471,0.447,0.818,0.621c0.36,0.182,0.732,0.326,1.104,0.429c0.382,0.106,1.021,0.263,1.899,0.466c1.11,0.238,2.131,0.506,3.034,0.793c0.913,0.293,1.703,0.654,2.348,1.072c0.656,0.429,1.178,0.979,1.547,1.635c0.369,0.658,0.558,1.471,0.558,2.416C23.371,20.119,23.049,21.148,22.412,22.051z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.SlideShare();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.SlideShare = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.SlideShare.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.SlideShare\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.952,12.795c-0.956,1.062-5.073,2.409-5.604,2.409h-4.513c-0.749,0-1.877,0.147-2.408,0.484c0.061,0.054,0.122,0.108,0.181,0.163c0.408,0.379,1.362,0.913,2.206,0.913c0.397,0,0.723-0.115,1-0.354c1.178-1.007,1.79-1.125,2.145-1.125c0.421,0,0.783,0.193,0.996,0.531c0.4,0.626,0.106,1.445-0.194,2.087c-0.718,1.524-3.058,3.171-5.595,3.171c-0.002,0-0.002,0-0.004,0c-0.354,0-0.701-0.033-1.033-0.099v3.251c0,0.742,1.033,2.533,4.167,2.533s3.955-3.701,3.955-4.338v-4.512c2.23-1.169,4.512-1.805,5.604-3.895C30.882,12.05,29.907,11.733,28.952,12.795zM21.942,17.521c0.796-1.699-0.053-1.699-1.54-0.425s-3.665,0.105-4.408-0.585c-0.743-0.689-1.486-1.22-2.814-1.167c-1.328,0.053-4.46-0.161-6.267-0.585c-1.805-0.425-4.895-3-5.15-2.335c-0.266,0.69,0.211,1.168,1.168,2.335c0.955,1.169,5.075,2.778,5.075,2.778s0,3.453,0,4.886c0,1.435,2.973,3.61,4.512,3.61s2.708-1.062,2.708-1.806v-4.512C17.775,21.045,21.146,19.221,21.942,17.521zM20.342,13.73c1.744,0,3.159-1.414,3.159-3.158c0-1.745-1.415-3.159-3.159-3.159s-3.158,1.414-3.158,3.159C17.184,12.316,18.598,13.73,20.342,13.73zM12.019,13.73c1.744,0,3.158-1.414,3.158-3.158c0-1.745-1.414-3.159-3.158-3.159c-1.745,0-3.159,1.414-3.159,3.159C8.86,12.316,10.273,13.73,12.019,13.73z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Smile();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Smile = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Smile.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Smile\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM20.729,7.375c0.934,0,1.688,1.483,1.688,3.312S21.661,14,20.729,14c-0.932,0-1.688-1.483-1.688-3.312S19.798,7.375,20.729,7.375zM11.104,7.375c0.932,0,1.688,1.483,1.688,3.312S12.037,14,11.104,14s-1.688-1.483-1.688-3.312S10.172,7.375,11.104,7.375zM16.021,26c-2.873,0-5.563-1.757-7.879-4.811c2.397,1.564,5.021,2.436,7.774,2.436c2.923,0,5.701-0.98,8.215-2.734C21.766,24.132,18.99,26,16.021,26z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Smile2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Smile2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Smile2.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Smile2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM16,29.534C8.539,29.534,2.466,23.462,2.466,16C2.466,8.539,8.539,2.466,16,2.466c7.462,0,13.535,6.072,13.535,13.533C29.534,23.462,23.462,29.534,16,29.534zM11.104,14c0.932,0,1.688-1.483,1.688-3.312s-0.755-3.312-1.688-3.312s-1.688,1.483-1.688,3.312S10.172,14,11.104,14zM20.729,14c0.934,0,1.688-1.483,1.688-3.312s-0.756-3.312-1.688-3.312c-0.932,0-1.688,1.483-1.688,3.312S19.798,14,20.729,14zM8.143,21.189C10.458,24.243,13.148,26,16.021,26c2.969,0,5.745-1.868,8.11-5.109c-2.515,1.754-5.292,2.734-8.215,2.734C13.164,23.625,10.54,22.756,8.143,21.189z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Snow();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Snow = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Snow.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Snow\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM16.667,24.09l1.119-1.119c0.389-0.391,0.389-1.025,0-1.416c-0.392-0.391-1.025-0.391-1.415,0l-1.119,1.119l-1.119-1.119c-0.391-0.391-1.025-0.391-1.415,0c-0.391,0.391-0.391,1.025,0,1.416l1.118,1.117l-1.12,1.121c-0.389,0.393-0.389,1.021,0,1.414c0.195,0.188,0.451,0.293,0.707,0.293c0.256,0,0.512-0.104,0.708-0.293l1.12-1.119l1.12,1.119c0.195,0.188,0.451,0.293,0.708,0.293c0.256,0,0.512-0.104,0.707-0.293c0.391-0.396,0.391-1.021,0-1.414L16.667,24.09zM25.119,21.817c-0.393-0.392-1.025-0.392-1.415,0l-1.12,1.121l-1.12-1.121c-0.391-0.392-1.022-0.392-1.414,0c-0.39,0.392-0.39,1.022,0,1.416l1.119,1.119l-1.119,1.119c-0.39,0.391-0.39,1.022,0,1.413c0.195,0.195,0.451,0.294,0.707,0.294c0.257,0,0.513-0.099,0.707-0.294l1.12-1.118l1.12,1.118c0.194,0.195,0.45,0.294,0.707,0.294c0.256,0,0.513-0.099,0.708-0.294c0.389-0.391,0.389-1.022,0-1.413l-1.12-1.119l1.12-1.119C25.507,22.842,25.507,22.209,25.119,21.817zM9.334,23.953l1.119-1.119c0.389-0.394,0.389-1.021,0-1.414c-0.391-0.394-1.025-0.394-1.415,0l-1.119,1.119l-1.12-1.121c-0.391-0.39-1.023-0.39-1.415,0c-0.391,0.396-0.391,1.024,0,1.418l1.119,1.117l-1.12,1.118c-0.391,0.394-0.391,1.025,0,1.414c0.196,0.195,0.452,0.293,0.708,0.293c0.256,0,0.511-0.098,0.707-0.293l1.12-1.119l1.121,1.121c0.195,0.195,0.451,0.293,0.707,0.293s0.513-0.098,0.708-0.293c0.389-0.391,0.389-1.022,0-1.416L9.334,23.953z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Split();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Split = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Split.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Split\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.786,20.698c-1.792-0.237-2.912-1.331-4.358-2.886c-0.697-0.751-1.428-1.577-2.324-2.319c1.396-1.165,2.411-2.519,3.483-3.503c1.01-0.92,1.901-1.519,3.199-1.688v2.574l7.556-4.363L21.786,4.15v2.652c-3.34,0.266-5.45,2.378-6.934,4.013c-0.819,0.896-1.537,1.692-2.212,2.192c-0.685,0.501-1.227,0.731-2.013,0.742c-0.001,0-0.002,0-0.003,0H2.812v3.5h0.001v0.001c0,0,0.046-0.001,0.136-0.001h7.677c0.786,0.011,1.33,0.241,2.017,0.743c1.021,0.743,2.095,2.181,3.552,3.568c1.312,1.258,3.162,2.46,5.592,2.649v2.664l7.556-4.36l-7.556-4.361V20.698z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Star();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Star = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Star.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Star\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,22.375L7.116,28.83l3.396-10.438l-8.883-6.458l10.979,0.002L16.002,1.5l3.391,10.434h10.981l-8.886,6.457l3.396,10.439L16,22.375L16,22.375z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Star2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Star2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Star2.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Star2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.615,4.928c0.487-0.986,1.284-0.986,1.771,0l2.249,4.554c0.486,0.986,1.775,1.923,2.864,2.081l5.024,0.73c1.089,0.158,1.335,0.916,0.547,1.684l-3.636,3.544c-0.788,0.769-1.28,2.283-1.095,3.368l0.859,5.004c0.186,1.085-0.459,1.553-1.433,1.041l-4.495-2.363c-0.974-0.512-2.567-0.512-3.541,0l-4.495,2.363c-0.974,0.512-1.618,0.044-1.432-1.041l0.858-5.004c0.186-1.085-0.307-2.6-1.094-3.368L3.93,13.977c-0.788-0.768-0.542-1.525,0.547-1.684l5.026-0.73c1.088-0.158,2.377-1.095,2.864-2.081L14.615,4.928z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Star2Off();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Star2Off = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Star2Off.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Star2Off\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.522,12.293l-5.024-0.73c-1.089-0.158-2.378-1.095-2.864-2.081l-2.249-4.554c-0.487-0.986-1.284-0.986-1.771,0l-2.247,4.554c-0.487,0.986-1.776,1.923-2.864,2.081l-5.026,0.73c-1.088,0.158-1.334,0.916-0.547,1.684l3.637,3.544c0.788,0.769,1.28,2.283,1.094,3.368l-0.858,5.004c-0.186,1.085,0.458,1.553,1.432,1.041l4.495-2.363c0.974-0.512,2.566-0.512,3.541,0l4.495,2.363c0.974,0.512,1.618,0.044,1.433-1.041l-0.859-5.004c-0.186-1.085,0.307-2.6,1.095-3.368l3.636-3.544C27.857,13.209,27.611,12.452,26.522,12.293zM22.037,16.089c-1.266,1.232-1.966,3.394-1.67,5.137l0.514,2.984l-2.679-1.409c-0.757-0.396-1.715-0.612-2.702-0.612s-1.945,0.216-2.7,0.61l-2.679,1.409l0.511-2.982c0.297-1.743-0.404-3.905-1.671-5.137l-2.166-2.112l2.995-0.435c1.754-0.255,3.592-1.591,4.373-3.175L15.5,7.652l1.342,2.716c0.781,1.583,2.617,2.92,4.369,3.173l2.992,0.435L22.037,16.089z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Star3();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Star3 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Star3.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Star3\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.441,28.181c-0.419,0-0.835-0.132-1.189-0.392l-5.751-4.247L9.75,27.789c-0.354,0.26-0.771,0.392-1.189,0.392c-0.412,0-0.824-0.128-1.175-0.384c-0.707-0.511-1-1.422-0.723-2.25l2.26-6.783l-5.815-4.158c-0.71-0.509-1.009-1.416-0.74-2.246c0.268-0.826,1.037-1.382,1.904-1.382c0.004,0,0.01,0,0.014,0l7.15,0.056l2.157-6.816c0.262-0.831,1.035-1.397,1.906-1.397s1.645,0.566,1.906,1.397l2.155,6.816l7.15-0.056c0.004,0,0.01,0,0.015,0c0.867,0,1.636,0.556,1.903,1.382c0.271,0.831-0.028,1.737-0.739,2.246l-5.815,4.158l2.263,6.783c0.276,0.826-0.017,1.737-0.721,2.25C23.268,28.053,22.854,28.181,22.441,28.181L22.441,28.181z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Star3Off();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Star3Off = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Star3Off.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Star3Off\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.631,12.359c-0.268-0.826-1.036-1.382-1.903-1.382h-0.015l-7.15,0.056l-2.155-6.816c-0.262-0.831-1.035-1.397-1.906-1.397s-1.645,0.566-1.906,1.397l-2.157,6.816l-7.15-0.056H4.273c-0.868,0-1.636,0.556-1.904,1.382c-0.27,0.831,0.029,1.737,0.74,2.246l5.815,4.158l-2.26,6.783c-0.276,0.828,0.017,1.739,0.723,2.25c0.351,0.256,0.763,0.384,1.175,0.384c0.418,0,0.834-0.132,1.189-0.392l5.751-4.247l5.751,4.247c0.354,0.26,0.771,0.392,1.189,0.392c0.412,0,0.826-0.128,1.177-0.384c0.704-0.513,0.997-1.424,0.721-2.25l-2.263-6.783l5.815-4.158C28.603,14.097,28.901,13.19,28.631,12.359zM19.712,17.996l2.729,8.184l-6.94-5.125L8.56,26.18l2.729-8.184l-7.019-5.018l8.627,0.066L15.5,4.82l2.603,8.225l8.627-0.066L19.712,17.996z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.StarOff();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.StarOff = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.StarOff.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.StarOff\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,22.375L7.116,28.83l3.396-10.438l-8.883-6.458l10.979,0.002L16.002,1.5l3.391,10.434h10.981l-8.886,6.457l3.396,10.439L16,22.375L16,22.375zM22.979,26.209l-2.664-8.205l6.979-5.062h-8.627L16,4.729l-2.666,8.206H4.708l6.979,5.07l-2.666,8.203L16,21.146L22.979,26.209L22.979,26.209z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Start();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Start = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Start.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Start\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Sticker();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Sticker = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Sticker.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Sticker\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,1.999c-1.042,0-1.916,0.377-2.57,1.088L2.895,13.138C2.302,13.784,1.999,14.58,1.999,15.5C1.999,22.943,8.057,29,15.5,29S29,22.943,29,15.5S22.943,1.999,15.5,1.999zM15.5,28C8.596,28,3,22.404,3,15.5c0-3.452,5.239-2.737,7.501-4.999C12.762,8.239,12.048,3,15.5,3C22.404,3,28,8.597,28,15.5S22.404,28,15.5,28z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Stop();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Stop = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Stop.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Stop\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M5.5,5.5h20v20h-20z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.StopWatch();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.StopWatch = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.StopWatch.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.StopWatch\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.216,18.533c0-3.636-1.655-6.883-4.253-9.032l0.733-0.998l0.482,0.354c0.198,0.146,0.481,0.104,0.628-0.097l0.442-0.604c0.146-0.198,0.103-0.482-0.097-0.628l-2.052-1.506c-0.199-0.146-0.481-0.103-0.628,0.097L22.03,6.724c-0.146,0.199-0.104,0.482,0.096,0.628l0.483,0.354l-0.736,1.003c-1.28-0.834-2.734-1.419-4.296-1.699c0.847-0.635,1.402-1.638,1.403-2.778h-0.002c0-1.922-1.557-3.48-3.479-3.48c-1.925,0-3.48,1.559-3.48,3.48c0,1.141,0.556,2.144,1.401,2.778c-1.549,0.277-2.99,0.857-4.265,1.68L8.424,7.684l0.484-0.353c0.198-0.145,0.245-0.428,0.098-0.628l-0.44-0.604C8.42,5.899,8.136,5.855,7.937,6.001L5.881,7.5c-0.2,0.146-0.243,0.428-0.099,0.628l0.442,0.604c0.145,0.2,0.428,0.244,0.627,0.099l0.483-0.354l0.729,0.999c-2.615,2.149-4.282,5.407-4.282,9.057c0,6.471,5.245,11.716,11.718,11.716c6.47,0,11.716-5.243,11.718-11.716H27.216zM12.918,4.231c0.002-1.425,1.155-2.58,2.582-2.582c1.426,0.002,2.579,1.157,2.581,2.582c-0.002,1.192-0.812,2.184-1.908,2.482v-1.77h0.6c0.246,0,0.449-0.203,0.449-0.449V3.746c0-0.247-0.203-0.449-0.449-0.449h-2.545c-0.247,0-0.449,0.202-0.449,0.449v0.749c0,0.246,0.202,0.449,0.449,0.449h0.599v1.77C13.729,6.415,12.919,5.424,12.918,4.231zM15.5,27.554c-4.983-0.008-9.015-4.038-9.022-9.021c0.008-4.982,4.039-9.013,9.022-9.022c4.981,0.01,9.013,4.04,9.021,9.022C24.513,23.514,20.481,27.546,15.5,27.554zM15.5,12.138c0.476,0,0.861-0.385,0.861-0.86s-0.386-0.861-0.861-0.861s-0.861,0.386-0.861,0.861S15.024,12.138,15.5,12.138zM15.5,24.927c-0.476,0-0.861,0.386-0.861,0.861s0.386,0.861,0.861,0.861s0.861-0.386,0.861-0.861S15.976,24.927,15.5,24.927zM12.618,11.818c-0.237-0.412-0.764-0.553-1.176-0.315c-0.412,0.238-0.554,0.765-0.315,1.177l2.867,6.722c0.481,0.831,1.543,1.116,2.375,0.637c0.829-0.479,1.114-1.543,0.635-2.374L12.618,11.818zM18.698,24.07c-0.412,0.237-0.555,0.765-0.316,1.176c0.237,0.412,0.764,0.554,1.176,0.315c0.413-0.238,0.553-0.765,0.316-1.176C19.635,23.974,19.108,23.832,18.698,24.07zM8.787,15.65c0.412,0.238,0.938,0.097,1.176-0.315c0.237-0.413,0.097-0.938-0.314-1.176c-0.412-0.239-0.938-0.098-1.177,0.313C8.234,14.886,8.375,15.412,8.787,15.65zM22.215,21.413c-0.412-0.236-0.938-0.096-1.176,0.316c-0.238,0.412-0.099,0.938,0.314,1.176c0.41,0.238,0.937,0.098,1.176-0.314C22.768,22.178,22.625,21.652,22.215,21.413zM9.107,18.531c-0.002-0.476-0.387-0.86-0.861-0.86c-0.477,0-0.862,0.385-0.862,0.86c0.001,0.476,0.386,0.86,0.861,0.861C8.722,19.393,9.106,19.008,9.107,18.531zM21.896,18.531c0,0.477,0.384,0.862,0.859,0.86c0.476,0.002,0.862-0.382,0.862-0.859s-0.387-0.86-0.862-0.862C22.279,17.671,21.896,18.056,21.896,18.531zM8.787,21.413c-0.412,0.238-0.554,0.765-0.316,1.176c0.239,0.412,0.765,0.553,1.177,0.316c0.413-0.239,0.553-0.765,0.315-1.178C9.725,21.317,9.198,21.176,8.787,21.413zM21.352,14.157c-0.411,0.238-0.551,0.764-0.312,1.176c0.237,0.413,0.764,0.555,1.174,0.315c0.412-0.236,0.555-0.762,0.316-1.176C22.29,14.06,21.766,13.921,21.352,14.157zM12.304,24.067c-0.413-0.235-0.939-0.096-1.176,0.315c-0.238,0.413-0.098,0.939,0.312,1.178c0.413,0.236,0.939,0.096,1.178-0.315C12.857,24.832,12.715,24.308,12.304,24.067zM18.698,12.992c0.41,0.238,0.938,0.099,1.174-0.313c0.238-0.411,0.1-0.938-0.314-1.177c-0.414-0.238-0.937-0.097-1.177,0.315C18.144,12.229,18.286,12.755,18.698,12.992z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Sun();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Sun = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Sun.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Sun\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.502,7.504c-4.35,0-7.873,3.523-7.873,7.873c0,4.347,3.523,7.872,7.873,7.872c4.346,0,7.871-3.525,7.871-7.872C23.374,11.027,19.85,7.504,15.502,7.504zM15.502,21.25c-3.244-0.008-5.866-2.63-5.874-5.872c0.007-3.243,2.63-5.866,5.874-5.874c3.242,0.008,5.864,2.631,5.871,5.874C21.366,18.62,18.744,21.242,15.502,21.25zM15.502,6.977c0.553,0,1-0.448,1-1.001V1.125c-0.002-0.553-0.448-1-1-1c-0.553,0-1.001,0.449-1,1.002v4.85C14.502,6.528,14.949,6.977,15.502,6.977zM18.715,7.615c0.125,0.053,0.255,0.076,0.382,0.077c0.394,0,0.765-0.233,0.925-0.618l1.856-4.483c0.21-0.511-0.031-1.095-0.541-1.306c-0.511-0.211-1.096,0.031-1.308,0.541L18.174,6.31C17.963,6.82,18.205,7.405,18.715,7.615zM21.44,9.436c0.195,0.194,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293l3.43-3.433c0.391-0.39,0.39-1.023,0-1.415c-0.392-0.39-1.025-0.39-1.415,0.002L21.44,8.021C21.049,8.412,21.049,9.045,21.44,9.436zM23.263,12.16c0.158,0.385,0.531,0.617,0.923,0.617c0.127,0,0.257-0.025,0.383-0.078l4.48-1.857c0.511-0.211,0.753-0.797,0.541-1.307s-0.796-0.752-1.307-0.54l-4.481,1.857C23.292,11.064,23.051,11.65,23.263,12.16zM29.752,14.371l-4.851,0.001c-0.552,0-1,0.448-0.998,1.001c0,0.553,0.447,0.999,0.998,0.999l4.852-0.002c0.553,0,0.999-0.449,0.999-1C30.752,14.817,30.304,14.369,29.752,14.371zM29.054,19.899l-4.482-1.854c-0.512-0.212-1.097,0.03-1.307,0.541c-0.211,0.511,0.031,1.096,0.541,1.308l4.482,1.854c0.126,0.051,0.256,0.075,0.383,0.075c0.393,0,0.765-0.232,0.925-0.617C29.806,20.695,29.563,20.109,29.054,19.899zM22.86,21.312c-0.391-0.391-1.023-0.391-1.414,0.001c-0.391,0.39-0.39,1.022,0,1.413l3.434,3.429c0.195,0.195,0.45,0.293,0.706,0.293s0.513-0.098,0.708-0.293c0.391-0.392,0.389-1.025,0-1.415L22.86,21.312zM20.029,23.675c-0.211-0.511-0.796-0.752-1.307-0.541c-0.51,0.212-0.752,0.797-0.54,1.308l1.86,4.48c0.159,0.385,0.531,0.617,0.925,0.617c0.128,0,0.258-0.024,0.383-0.076c0.511-0.211,0.752-0.797,0.54-1.309L20.029,23.675zM15.512,23.778c-0.553,0-1,0.448-1,1l0.004,4.851c0,0.553,0.449,0.999,1,0.999c0.553,0,1-0.448,0.998-1l-0.003-4.852C16.511,24.226,16.062,23.777,15.512,23.778zM12.296,23.142c-0.51-0.21-1.094,0.031-1.306,0.543l-1.852,4.483c-0.21,0.511,0.033,1.096,0.543,1.307c0.125,0.052,0.254,0.076,0.382,0.076c0.392,0,0.765-0.234,0.924-0.619l1.853-4.485C13.051,23.937,12.807,23.353,12.296,23.142zM9.57,21.325c-0.392-0.391-1.025-0.389-1.415,0.002L4.729,24.76c-0.391,0.392-0.389,1.023,0.002,1.415c0.195,0.194,0.45,0.292,0.706,0.292c0.257,0,0.513-0.098,0.708-0.293l3.427-3.434C9.961,22.349,9.961,21.716,9.57,21.325zM7.746,18.604c-0.213-0.509-0.797-0.751-1.307-0.54L1.96,19.925c-0.511,0.212-0.752,0.798-0.54,1.308c0.16,0.385,0.531,0.616,0.924,0.616c0.127,0,0.258-0.024,0.383-0.076l4.479-1.861C7.715,19.698,7.957,19.113,7.746,18.604zM7.1,15.392c0-0.553-0.447-0.999-1-0.999l-4.851,0.006c-0.553,0-1.001,0.448-0.999,1.001c0.001,0.551,0.449,1,1,0.998l4.852-0.006C6.654,16.392,7.102,15.942,7.1,15.392zM1.944,10.869l4.485,1.85c0.125,0.053,0.254,0.076,0.381,0.076c0.393,0,0.766-0.232,0.925-0.618c0.212-0.511-0.032-1.097-0.544-1.306L2.708,9.021c-0.511-0.21-1.095,0.032-1.306,0.542C1.19,10.074,1.435,10.657,1.944,10.869zM8.137,9.451c0.195,0.193,0.449,0.291,0.705,0.291s0.513-0.098,0.709-0.295c0.391-0.389,0.389-1.023-0.004-1.414L6.113,4.609C5.723,4.219,5.088,4.221,4.699,4.612c-0.391,0.39-0.389,1.024,0.002,1.414L8.137,9.451zM10.964,7.084c0.16,0.384,0.532,0.615,0.923,0.615c0.128,0,0.258-0.025,0.384-0.077c0.51-0.212,0.753-0.798,0.54-1.307l-1.864-4.479c-0.212-0.51-0.798-0.751-1.308-0.539C9.129,1.51,8.888,2.096,9.1,2.605L10.964,7.084z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Svg();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Svg = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Svg.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Svg\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M31.274,15.989c0-2.473-2.005-4.478-4.478-4.478l0,0c0.81-0.811,1.312-1.93,1.312-3.167c0-2.474-2.005-4.479-4.479-4.479c-1.236,0-2.356,0.501-3.167,1.312c0-2.473-2.005-4.478-4.478-4.478c-2.474,0-4.479,2.005-4.479,4.478c-0.811-0.81-1.93-1.312-3.167-1.312c-2.474,0-4.479,2.005-4.479,4.479c0,1.236,0.501,2.356,1.312,3.166c-2.474,0-4.479,2.005-4.479,4.479c0,2.474,2.005,4.479,4.479,4.479c-0.811,0.81-1.312,1.93-1.312,3.167c0,2.473,2.005,4.478,4.479,4.478c1.236,0,2.356-0.501,3.167-1.312c0,2.473,2.005,4.479,4.479,4.479c2.473,0,4.478-2.006,4.478-4.479l0,0c0.811,0.811,1.931,1.312,3.167,1.312c2.474,0,4.478-2.005,4.478-4.478c0-1.237-0.501-2.357-1.312-3.168c0.001,0,0.001,0,0.001,0C29.27,20.467,31.274,18.463,31.274,15.989zM23.583,21.211c0.016,0,0.031-0.001,0.047-0.001c1.339,0,2.424,1.085,2.424,2.425c0,1.338-1.085,2.424-2.424,2.424s-2.424-1.086-2.424-2.424c0-0.017,0.001-0.031,0.001-0.047l-3.541-3.542v5.009c0.457,0.44,0.743,1.06,0.743,1.746c0,1.339-1.086,2.424-2.424,2.424c-1.339,0-2.425-1.085-2.425-2.424c0-0.687,0.286-1.306,0.743-1.746v-5.009l-3.541,3.542c0,0.016,0.001,0.031,0.001,0.047c0,1.338-1.085,2.424-2.424,2.424s-2.424-1.086-2.424-2.424c0-1.34,1.085-2.425,2.424-2.425c0.015,0,0.031,0.001,0.046,0.001l3.542-3.541H6.919c-0.44,0.458-1.06,0.743-1.746,0.743c-1.339,0-2.424-1.085-2.424-2.424s1.085-2.424,2.424-2.424c0.686,0,1.305,0.285,1.746,0.744h5.008l-3.542-3.542c-0.015,0-0.031,0.001-0.046,0.001c-1.339,0-2.424-1.085-2.424-2.424S7.001,5.92,8.34,5.92s2.424,1.085,2.424,2.424c0,0.015-0.001,0.031-0.001,0.046l3.541,3.542V6.924c-0.457-0.441-0.743-1.06-0.743-1.746c0-1.339,1.086-2.425,2.425-2.425c1.338,0,2.424,1.085,2.424,2.425c0,0.686-0.286,1.305-0.743,1.746v5.008l3.541-3.542c0-0.015-0.001-0.031-0.001-0.046c0-1.339,1.085-2.424,2.424-2.424s2.424,1.085,2.424,2.424c0,1.339-1.085,2.424-2.424,2.424c-0.016,0-0.031-0.001-0.047-0.001l-3.541,3.542h5.008c0.441-0.458,1.061-0.744,1.747-0.744c1.338,0,2.423,1.085,2.423,2.424s-1.085,2.424-2.423,2.424c-0.687,0-1.306-0.285-1.747-0.743h-5.008L23.583,21.211z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.TShirt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.TShirt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.TShirt.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.TShirt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.1,4.039c-0.681,1.677-2.32,2.862-4.24,2.862c-1.921,0-3.56-1.185-4.24-2.862L1.238,8.442l2.921,6.884l3.208-1.361V28h17.099V14.015l3.093,1.312l2.922-6.884L20.1,4.039z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Tag();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Tag = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Tag.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Tag\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.263,2.826H7.904L2.702,8.028v6.359L18.405,30.09l11.561-11.562L14.263,2.826zM6.495,8.859c-0.619-0.619-0.619-1.622,0-2.24C7.114,6,8.117,6,8.736,6.619c0.62,0.62,0.619,1.621,0,2.241C8.117,9.479,7.114,9.479,6.495,8.859z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.TakeOff();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.TakeOff = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.TakeOff.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.TakeOff\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.27,19.267c0,0,9.375-1.981,16.074-8.681c0,0,1.395-1.339-1.338-1.339c-2.305,0-5.6,2.438-5.6,2.438l-9.137-1.42l-1.769,1.769l4.983,2.411l-3.001,2.035l-2.571-1.285L6.09,16.052C6.09,16.052,8.02,18.062,10.27,19.267zM3.251,23.106v1.998h24.498v-1.998H3.251z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Talke();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Talke = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Talke.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Talke\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.982,21.375h-1.969v-1.889h1.969V21.375zM16.982,17.469v0.625h-1.969v-0.769c0-2.321,2.641-2.689,2.641-4.337c0-0.752-0.672-1.329-1.553-1.329c-0.912,0-1.713,0.672-1.713,0.672l-1.12-1.393c0,0,1.104-1.153,3.009-1.153c1.81,0,3.49,1.121,3.49,3.009C19.768,15.437,16.982,15.741,16.982,17.469z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Talkq();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Talkq = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Talkq.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Talkq\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Thunder();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Thunder = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Thunder.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Thunder\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h5.271l-2.166,3.398l1.977-0.411L10,30.875l9.138-10.102L17,21l2.167-2.023h4.269c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Trash();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Trash = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Trash.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Trash\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.826,5.75l0.396,1.188c1.54,0.575,2.589,1.44,2.589,2.626c0,2.405-4.308,3.498-8.312,3.498c-4.003,0-8.311-1.093-8.311-3.498c0-1.272,1.21-2.174,2.938-2.746l0.388-1.165c-2.443,0.648-4.327,1.876-4.327,3.91v2.264c0,1.224,0.685,2.155,1.759,2.845l0.396,9.265c0,1.381,3.274,2.5,7.312,2.5c4.038,0,7.313-1.119,7.313-2.5l0.405-9.493c0.885-0.664,1.438-1.521,1.438-2.617V9.562C24.812,7.625,23.101,6.42,20.826,5.75zM11.093,24.127c-0.476-0.286-1.022-0.846-1.166-1.237c-1.007-2.76-0.73-4.921-0.529-7.509c0.747,0.28,1.58,0.491,2.45,0.642c-0.216,2.658-0.43,4.923,0.003,7.828C11.916,24.278,11.567,24.411,11.093,24.127zM17.219,24.329c-0.019,0.445-0.691,0.856-1.517,0.856c-0.828,0-1.498-0.413-1.517-0.858c-0.126-2.996-0.032-5.322,0.068-8.039c0.418,0.022,0.835,0.037,1.246,0.037c0.543,0,1.097-0.02,1.651-0.059C17.251,18.994,17.346,21.325,17.219,24.329zM21.476,22.892c-0.143,0.392-0.69,0.95-1.165,1.235c-0.474,0.284-0.817,0.151-0.754-0.276c0.437-2.93,0.214-5.209-0.005-7.897c0.881-0.174,1.708-0.417,2.44-0.731C22.194,17.883,22.503,20.076,21.476,22.892zM11.338,9.512c0.525,0.173,1.092-0.109,1.268-0.633h-0.002l0.771-2.316h4.56l0.771,2.316c0.14,0.419,0.53,0.685,0.949,0.685c0.104,0,0.211-0.017,0.316-0.052c0.524-0.175,0.808-0.742,0.633-1.265l-1.002-3.001c-0.136-0.407-0.518-0.683-0.945-0.683h-6.002c-0.428,0-0.812,0.275-0.948,0.683l-1,2.999C10.532,8.77,10.815,9.337,11.338,9.512z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Twitter();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Twitter = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Twitter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Twitter\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.295,22.567h-7.213c-2.125,0-4.103-2.215-4.103-4.736v-1.829h11.232c1.817,0,3.291-1.469,3.291-3.281c0-1.813-1.474-3.282-3.291-3.282H11.979V6.198c0-1.835-1.375-3.323-3.192-3.323c-1.816,0-3.29,1.488-3.29,3.323v11.633c0,6.23,4.685,11.274,10.476,11.274h7.211c1.818,0,3.318-1.463,3.318-3.298S25.112,22.567,23.295,22.567z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.TwitterBird();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.TwitterBird = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.TwitterBird.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.TwitterBird\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.605,13.11c0.913-2.851,2.029-4.698,3.313-6.038c0.959-1,1.453-1.316,0.891-0.216c0.25-0.199,0.606-0.464,0.885-0.605c1.555-0.733,1.442-0.119,0.373,0.54c2.923-1.045,2.82,0.286-0.271,0.949c2.527,0.047,5.214,1.656,5.987,5.077c0.105,0.474-0.021,0.428,0.464,0.514c1.047,0.186,2.03,0.174,2.991-0.13c-0.104,0.708-1.039,1.167-2.497,1.471c-0.541,0.112-0.651,0.083-0.005,0.229c0.799,0.179,1.69,0.226,2.634,0.182c-0.734,0.846-1.905,1.278-3.354,1.296c-0.904,3.309-2.976,5.678-5.596,7.164c-6.152,3.492-15.108,2.984-19.599-3.359c2.947,2.312,7.312,2.821,10.555-0.401c-2.125,0-2.674-1.591-0.99-2.449c-1.595-0.017-2.608-0.521-3.203-1.434c-0.226-0.347-0.229-0.374,0.14-0.64c0.405-0.293,0.958-0.423,1.528-0.467c-1.651-0.473-2.66-1.335-3.009-2.491c-0.116-0.382-0.134-0.363,0.256-0.462c0.38-0.097,0.87-0.148,1.309-0.17C6.11,10.88,5.336,9.917,5.139,8.852c-0.186-1.006,0.005-0.748,0.758-0.46C9.263,9.68,12.619,11.062,14.605,13.11L14.605,13.11z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Umbrella();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Umbrella = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Umbrella.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Umbrella\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.784,26.991c0,1.238-1.329,1.696-1.835,1.696c-0.504,0-1.536-0.413-1.65-1.812c0-0.354-0.288-0.642-0.644-0.642c-0.354,0-0.641,0.287-0.641,0.642c0.045,1.056,0.756,3.052,2.935,3.052c2.432,0,3.166-1.882,3.166-3.144v-8.176l-1.328-0.024C14.787,18.584,14.784,25.889,14.784,26.991zM15.584,9.804c-6.807,0-11.084,4.859-11.587,8.326c0.636-0.913,1.694-1.51,2.89-1.51c1.197,0,2.22,0.582,2.855,1.495c0.638-0.904,1.69-1.495,2.88-1.495c1.2,0,2.26,0.6,2.896,1.517c0.635-0.917,1.83-1.517,3.03-1.517c1.19,0,2.241,0.591,2.879,1.495c0.636-0.913,1.659-1.495,2.855-1.495c1.197,0,2.254,0.597,2.89,1.51C26.669,14.663,22.393,9.804,15.584,9.804zM14.733,7.125v2.081h1.323V7.125c0-0.365-0.296-0.661-0.661-0.661C15.029,6.464,14.733,6.76,14.733,7.125z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Undo();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Undo = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Undo.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Undo\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M12.981,9.073V6.817l-12.106,6.99l12.106,6.99v-2.422c3.285-0.002,9.052,0.28,9.052,2.269c0,2.78-6.023,4.263-6.023,4.263v2.132c0,0,13.53,0.463,13.53-9.823C29.54,9.134,17.952,8.831,12.981,9.073z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Unlock();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Unlock = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Unlock.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Unlock\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.375,12.833h-2.209V10c0,0,0,0,0-0.001c0-2.389,1.945-4.333,4.334-4.333c2.391,0,4.335,1.944,4.335,4.333c0,0,0,0,0,0v2.834h2V9.999h-0.001c-0.001-3.498-2.836-6.333-6.334-6.333S16.166,6.502,16.166,10v2.833H3.125V25h17.25V12.833z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Usb();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Usb = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Usb.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Usb\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,1.667L13.745,4.74h1.252v15.709L11.8,17.391c-0.205-0.26-0.351-0.601-0.358-0.952c0-1.417-0.001-2.258-0.001-2.568c0.592-0.21,1.02-0.774,1.02-1.444c0-0.849-0.682-1.538-1.521-1.538c-0.84,0-1.521,0.689-1.521,1.538c0,0.67,0.427,1.234,1.019,1.444l-0.001,2.539c0,0.688,0.373,1.409,0.812,1.868c-0.013-0.013-0.027-0.025,0,0c0.011,0.01,3.392,3.245,3.392,3.245c0.205,0.26,0.35,0.6,0.357,0.951v1.776c-1.161,0.236-2.036,1.272-2.036,2.517c0,1.418,1.137,2.566,2.539,2.566c1.403,0,2.54-1.148,2.54-2.566c0-1.244-0.875-2.28-2.038-2.517v-1.746c0-0.005,0-0.009,0-0.014v-3.861c0.008-0.35,0.152-0.689,0.358-0.949c0,0,3.38-3.234,3.392-3.245c0.027-0.026,0.012-0.013,0,0c0.438-0.459,0.811-1.181,0.811-1.869V10.12h1.02V7.046h-3.041v3.075h1.018c0,0-0.002,0.644-0.002,2.476c-0.008,0.351-0.152,0.692-0.357,0.952l-3.198,3.06V4.74h1.254L15.5,1.667z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.User();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.User = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.User.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.User\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.771,12.364c0,0,0.849-3.51,0-4.699c-0.85-1.189-1.189-1.981-3.058-2.548s-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.792-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.321s0.283,3.058,0.566,3.624l-0.337,0.113c-0.283,3.283,1.132,3.68,1.132,3.68c0.509,3.058,1.019,1.756,1.019,2.548s-0.51,0.51-0.51,0.51s-0.452,1.245-1.584,1.698c-1.132,0.452-7.416,2.886-7.927,3.396c-0.511,0.511-0.453,2.888-0.453,2.888h26.947c0,0,0.059-2.377-0.452-2.888c-0.512-0.511-6.796-2.944-7.928-3.396c-1.132-0.453-1.584-1.698-1.584-1.698s-0.51,0.282-0.51-0.51s0.51,0.51,1.02-2.548c0,0,1.414-0.397,1.132-3.68H20.771z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Users();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Users = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Users.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Users\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.053,20.8c-1.132-0.453-1.584-1.698-1.584-1.698s-0.51,0.282-0.51-0.51s0.51,0.51,1.02-2.548c0,0,1.414-0.397,1.132-3.68h-0.34c0,0,0.849-3.51,0-4.699c-0.85-1.189-1.189-1.981-3.058-2.548s-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.792-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.321s0.283,3.058,0.566,3.624l-0.337,0.113c-0.283,3.283,1.132,3.68,1.132,3.68c0.509,3.058,1.019,1.756,1.019,2.548s-0.51,0.51-0.51,0.51s-0.452,1.245-1.584,1.698c-1.132,0.452-7.416,2.886-7.927,3.396c-0.511,0.511-0.453,2.888-0.453,2.888h26.947c0,0,0.059-2.377-0.452-2.888C28.469,23.686,22.185,21.252,21.053,20.8zM8.583,20.628c-0.099-0.18-0.148-0.31-0.148-0.31s-0.432,0.239-0.432-0.432s0.432,0.432,0.864-2.159c0,0,1.199-0.336,0.959-3.119H9.538c0,0,0.143-0.591,0.237-1.334c-0.004-0.308,0.006-0.636,0.037-0.996l0.038-0.426c-0.021-0.492-0.107-0.939-0.312-1.226C8.818,9.619,8.53,8.947,6.947,8.467c-1.583-0.48-1.008-0.385-2.159-0.336C3.636,8.179,2.676,8.802,2.676,9.139c0,0-0.72,0.048-1.008,0.336c-0.271,0.271-0.705,1.462-0.757,1.885v0.281c0.047,0.653,0.258,2.449,0.469,2.872l-0.286,0.096c-0.239,2.783,0.959,3.119,0.959,3.119c0.432,2.591,0.864,1.488,0.864,2.159s-0.432,0.432-0.432,0.432s-0.383,1.057-1.343,1.439c-0.061,0.024-0.139,0.056-0.232,0.092v5.234h0.575c-0.029-1.278,0.077-2.927,0.746-3.594C2.587,23.135,3.754,22.551,8.583,20.628zM30.913,11.572c-0.04-0.378-0.127-0.715-0.292-0.946c-0.719-1.008-1.008-1.679-2.59-2.159c-1.584-0.48-1.008-0.385-2.16-0.336C24.72,8.179,23.76,8.802,23.76,9.139c0,0-0.719,0.048-1.008,0.336c-0.271,0.272-0.709,1.472-0.758,1.891h0.033l0.08,0.913c0.02,0.231,0.022,0.436,0.027,0.645c0.09,0.666,0.21,1.35,0.33,1.589l-0.286,0.096c-0.239,2.783,0.96,3.119,0.96,3.119c0.432,2.591,0.863,1.488,0.863,2.159s-0.432,0.432-0.432,0.432s-0.053,0.142-0.163,0.338c4.77,1.9,5.927,2.48,6.279,2.834c0.67,0.667,0.775,2.315,0.746,3.594h0.48v-5.306c-0.016-0.006-0.038-0.015-0.052-0.021c-0.959-0.383-1.343-1.439-1.343-1.439s-0.433,0.239-0.433-0.432s0.433,0.432,0.864-2.159c0,0,0.804-0.229,0.963-1.841v-1.227c-0.001-0.018-0.001-0.033-0.003-0.051h-0.289c0,0,0.215-0.89,0.292-1.861V11.572z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Video();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Video = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Video.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Video\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.188,4.875v1.094h-4.5V4.875H8.062v1.094h-4.5V4.875h-1v21.25h1v-1.094h4.5v1.094h14.625v-1.094h4.5v1.094h1.25V4.875H27.188zM8.062,23.719h-4.5v-3.125h4.5V23.719zM8.062,19.281h-4.5v-3.125h4.5V19.281zM8.062,14.844h-4.5v-3.125h4.5V14.844zM8.062,10.406h-4.5V7.281h4.5V10.406zM11.247,20.59V9.754l9.382,5.418L11.247,20.59zM27.188,23.719h-4.5v-3.125h4.5V23.719zM27.188,19.281h-4.5v-3.125h4.5V19.281zM27.188,14.844h-4.5v-3.125h4.5V14.844zM27.188,10.406h-4.5V7.281h4.5V10.406z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.View();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.View = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.View.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.View\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,8.286C8.454,8.286,2.5,16,2.5,16s5.954,7.715,13.5,7.715c5.771,0,13.5-7.715,13.5-7.715S21.771,8.286,16,8.286zM16,20.807c-2.649,0-4.807-2.157-4.807-4.807s2.158-4.807,4.807-4.807s4.807,2.158,4.807,4.807S18.649,20.807,16,20.807zM16,13.194c-1.549,0-2.806,1.256-2.806,2.806c0,1.55,1.256,2.806,2.806,2.806c1.55,0,2.806-1.256,2.806-2.806C18.806,14.451,17.55,13.194,16,13.194z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Vim();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Vim = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Vim.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Vim\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.012,10.44l4.571-4.645c0.11-0.113,0.173-0.264,0.173-0.423V3.134c0-0.159-0.064-0.314-0.177-0.427l-0.604-0.602c-0.111-0.112-0.261-0.176-0.42-0.177l-9.646-0.086C18.71,1.84,18.523,1.935,18.41,2.099L17.807,2.96c-0.033,0.047-0.059,0.099-0.076,0.154l-2.144-2.156l0,0l-1.646,1.666l-0.447-0.497c-0.112-0.125-0.27-0.197-0.438-0.199L3.324,1.756c-0.163-0.003-0.322,0.06-0.437,0.176L2.284,2.535C2.171,2.647,2.107,2.803,2.107,2.962v2.325c0,0.164,0.066,0.32,0.183,0.434l0.657,0.635C3.056,6.461,3.2,6.521,3.352,6.525l0.285,0.007l0.007,6.512l-2.527,2.557l2.533,2.533l0.008,8.084c0,0.159,0.065,0.314,0.177,0.427l0.861,0.861c0.112,0.111,0.268,0.176,0.427,0.176h2.67c0.161,0,0.317-0.064,0.43-0.181l2.378-2.417l4.9,4.9l14.47-14.558L25.012,10.44zM9.747,24.232l-2.208,2.242H5.372l-0.509-0.509L4.856,19.34l-0.008-7.515L4.842,5.943c0-0.328-0.261-0.594-0.588-0.603L3.617,5.326L3.313,5.031v-1.82l0.245-0.245l9.215,0.163l0.319,0.354l0.126,0.141v1.419l-0.352,0.362H12.26c-0.331,0-0.6,0.266-0.603,0.597l-0.076,7.203c-0.002,0.244,0.141,0.463,0.365,0.56c0.224,0.096,0.482,0.049,0.657-0.12l7.495-7.235c0.174-0.171,0.23-0.432,0.139-0.66c-0.09-0.228-0.312-0.377-0.56-0.377h-0.479l-0.296-0.379V3.496l0.312-0.445l9.083,0.081l0.252,0.252v1.743l-4.388,4.458L9.747,24.232z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Volume0();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Volume0 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Volume0.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Volume0\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Volume1();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Volume1 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Volume1.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Volume1\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Volume2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Volume2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Volume2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Volume2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z M21.101,8.925c-0.393-0.391-1.024-0.391-1.413,0c-0.392,0.391-0.392,1.025,0,1.414c1.45,1.451,2.344,3.447,2.344,5.661c0,2.212-0.894,4.207-2.342,5.659c-0.392,0.39-0.392,1.023,0,1.414c0.195,0.195,0.451,0.293,0.708,0.293c0.256,0,0.512-0.098,0.707-0.293c1.808-1.809,2.929-4.315,2.927-7.073C24.033,13.24,22.912,10.732,21.101,8.925z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Volume3();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Volume3 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Volume3.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Volume3\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z M21.101,8.925c-0.393-0.391-1.024-0.391-1.413,0c-0.392,0.391-0.392,1.025,0,1.414c1.45,1.451,2.344,3.447,2.344,5.661c0,2.212-0.894,4.207-2.342,5.659c-0.392,0.39-0.392,1.023,0,1.414c0.195,0.195,0.451,0.293,0.708,0.293c0.256,0,0.512-0.098,0.707-0.293c1.808-1.809,2.929-4.315,2.927-7.073C24.033,13.24,22.912,10.732,21.101,8.925z M23.28,6.746c-0.393-0.391-1.025-0.389-1.414,0.002c-0.391,0.389-0.391,1.023,0.002,1.413h-0.002c2.009,2.009,3.248,4.773,3.248,7.839c0,3.063-1.239,5.828-3.246,7.838c-0.391,0.39-0.391,1.023,0.002,1.415c0.194,0.194,0.45,0.291,0.706,0.291s0.513-0.098,0.708-0.293c2.363-2.366,3.831-5.643,3.829-9.251C27.115,12.389,25.647,9.111,23.28,6.746z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Warning();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Warning = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Warning.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Warning\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.225,23.567l-3.778-6.542c-1.139-1.972-3.002-5.2-4.141-7.172l-3.778-6.542c-1.14-1.973-3.003-1.973-4.142,0L9.609,9.853c-1.139,1.972-3.003,5.201-4.142,7.172L1.69,23.567c-1.139,1.974-0.207,3.587,2.071,3.587h23.391C29.432,27.154,30.363,25.541,29.225,23.567zM16.536,24.58h-2.241v-2.151h2.241V24.58zM16.428,20.844h-2.023l-0.201-9.204h2.407L16.428,20.844z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.WheelChair();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.WheelChair = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.WheelChair.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.WheelChair\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.373,19.85c0,4.079-3.318,7.397-7.398,7.397c-4.079,0-7.398-3.318-7.398-7.397c0-2.466,1.213-4.652,3.073-5.997l-0.251-2.21c-2.875,1.609-4.825,4.684-4.825,8.207c0,5.184,4.217,9.4,9.401,9.4c4.395,0,8.093-3.031,9.117-7.111L20.37,19.73C20.37,19.771,20.373,19.81,20.373,19.85zM11.768,6.534c1.321,0,2.392-1.071,2.392-2.392c0-1.321-1.071-2.392-2.392-2.392c-1.321,0-2.392,1.071-2.392,2.392C9.375,5.463,10.446,6.534,11.768,6.534zM27.188,22.677l-5.367-7.505c-0.28-0.393-0.749-0.579-1.226-0.538c-0.035-0.003-0.071-0.006-0.106-0.006h-6.132l-0.152-1.335h4.557c0.53,0,0.96-0.429,0.96-0.959c0-0.53-0.43-0.959-0.96-0.959h-4.776l-0.25-2.192c-0.146-1.282-1.303-2.203-2.585-2.057C9.869,7.271,8.948,8.428,9.094,9.71l0.705,6.19c0.136,1.197,1.154,2.078,2.332,2.071c0.004,0,0.007,0.001,0.012,0.001h8.023l4.603,6.436c0.439,0.615,1.338,0.727,2.007,0.248C27.442,24.178,27.628,23.292,27.188,22.677z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Windows();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Windows = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Windows.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Windows\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.023,17.484c-1.732-0.205-3.022-0.908-4.212-1.701l0,0l-0.559,0.279l-2.578,8.924l0,0c1.217,0.805,2.905,1.707,4.682,1.914c2.686,0.312,5.56-0.744,6.391-1.195l2.617-9.061l-0.559-0.279C25.805,16.365,23.193,17.857,20.023,17.484zM14.424,14.825c-1.267-0.87-2.578-1.652-4.375-1.816c-0.318-0.029-0.627-0.042-0.925-0.042c-3.011,0-4.948,1.347-4.948,1.347l-2.565,8.877l0,0l0.526,0.281c0.981-0.476,2.78-1.145,5.09-0.984c1.665,0.113,2.92,0.781,4.117,1.531l0.507-0.26l0,0L14.424,14.825zM10.201,12.094c1.664,0.114,2.921,0.78,4.117,1.533l0.509-0.26l0,0L17.4,4.431c-1.27-0.87-2.579-1.653-4.377-1.816c-0.318-0.029-0.626-0.042-0.924-0.042C9.088,2.573,7.15,3.92,7.15,3.92l-2.566,8.878L5.11,13.08C6.092,12.604,7.891,11.936,10.201,12.094zM28.779,5.971L28.779,5.971c0,0.001-2.609,1.492-5.779,1.119c-1.734-0.204-3.023-0.907-4.213-1.701L18.227,5.67l-2.576,8.923l0,0c1.215,0.803,2.906,1.709,4.68,1.915c2.687,0.312,5.558-0.745,6.392-1.197l2.615-9.059L28.779,5.971z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Woman();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Woman = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Woman.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Woman\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.022,16.349c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.104,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.579,5.192-0.351,5.874c0.55,0.307,1.127,0.078,1.723-0.496c-0.105,0.582-0.167,1.213-0.167,1.873c0,2.932,1.139,5.307,2.543,5.307c0.846,0,1.265-0.865,1.466-2.189c0.201,1.324,0.62,2.189,1.464,2.189c1.406,0,2.545-2.375,2.545-5.307c0-0.66-0.061-1.291-0.168-1.873c0.598,0.574,1.174,0.803,1.725,0.496C22.603,21.541,22.444,18.912,21.022,16.349zM15.808,13.757c2.363,0,4.279-1.916,4.279-4.279s-1.916-4.279-4.279-4.279c-2.363,0-4.28,1.916-4.28,4.279S13.445,13.757,15.808,13.757zM18.731,4.974c1.235,0.455,0.492-0.725,0.492-1.531s0.762-1.792-0.492-1.391c-1.316,0.422-2.383,0.654-2.383,1.461S17.415,4.489,18.731,4.974zM15.816,4.4c0.782,0,0.345-0.396,0.345-0.884c0-0.488,0.438-0.883-0.345-0.883s-0.374,0.396-0.374,0.883C15.442,4.005,15.034,4.4,15.816,4.4zM12.884,4.974c1.316-0.484,2.383-0.654,2.383-1.461S14.2,2.474,12.884,2.052c-1.254-0.402-0.492,0.584-0.492,1.391S11.648,5.428,12.884,4.974z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Wrench();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Wrench = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Wrench.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Wrench\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.834,14.693c1.816-2.088,2.181-4.938,1.193-7.334l-3.646,4.252l-3.594-0.699L19.596,7.45l3.637-4.242c-2.502-0.63-5.258,0.13-7.066,2.21c-1.907,2.193-2.219,5.229-1.039,7.693L5.624,24.04c-1.011,1.162-0.888,2.924,0.274,3.935c1.162,1.01,2.924,0.888,3.935-0.274l9.493-10.918C21.939,17.625,24.918,16.896,26.834,14.693z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Wrench2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Wrench2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Wrench2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Wrench2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.946,9.721l-2.872-0.768l-0.771-2.874l3.188-3.231c-1.992-0.653-4.268-0.192-5.848,1.391c-1.668,1.668-2.095,4.111-1.279,6.172l-3.476,3.478l-3.478,3.478c-2.062-0.816-4.504-0.391-6.173,1.277c-1.583,1.581-2.043,3.856-1.39,5.849l3.231-3.188l2.874,0.77l0.769,2.872l-3.239,3.197c1.998,0.665,4.288,0.207,5.876-1.384c1.678-1.678,2.1-4.133,1.271-6.202l3.463-3.464l3.464-3.463c2.069,0.828,4.523,0.406,6.202-1.272c1.592-1.589,2.049-3.878,1.384-5.876L24.946,9.721z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Wrench3();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Wrench3 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Wrench3.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Wrench3\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.839,6.775l-3.197,3.239L21.77,9.246l-0.771-2.874l3.188-3.231c-1.992-0.653-4.268-0.192-5.848,1.391c-1.668,1.668-2.095,4.111-1.279,6.172L7.42,20.344c-0.204-0.032-0.408-0.062-0.621-0.062c-2.173,0-3.933,1.759-3.933,3.933c0,2.173,1.76,3.933,3.933,3.933c2.171,0,3.931-1.76,3.933-3.933c0-0.24-0.03-0.473-0.071-0.7l9.592-9.59c2.069,0.828,4.523,0.406,6.202-1.272C28.047,11.062,28.504,8.772,27.839,6.775zM6.799,25.146c-0.517,0-0.933-0.418-0.935-0.933c0.002-0.515,0.418-0.933,0.935-0.933c0.514,0,0.932,0.418,0.932,0.933S7.313,25.146,6.799,25.146z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ZoomIn();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ZoomIn = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ZoomIn.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ZoomIn\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.646,19.307c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127l3.535-3.537L22.646,19.307zM13.688,20.369c-3.582-0.008-6.478-2.904-6.484-6.484c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486C20.165,17.465,17.267,20.361,13.688,20.369zM15.687,9.051h-4v2.833H8.854v4.001h2.833v2.833h4v-2.834h2.832v-3.999h-2.833V9.051z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ZoomOut();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ZoomOut = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ZoomOut.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.ZoomOut\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.646,19.307c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127l3.535-3.537L22.646,19.307zM13.688,20.369c-3.582-0.008-6.478-2.904-6.484-6.484c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486C20.165,17.465,17.267,20.361,13.688,20.369zM8.854,11.884v4.001l9.665-0.001v-3.999L8.854,11.884z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * FlexGridLayout is a powerful, flexible and precise layout manager that aligns components vertically and\r\n * horizontally in a dynamic rectangular grid of cells, with each component occupying in one or more cell.\r\n * To define a form layout you specify the form's columns, rows. Everyhing that applies to columns applies\r\n * to rows too - just with a different orientation. FlexGridLayout uses the same API, algorithms and implementation\r\n * for column and rows.\r\n *\r\n * FlexGridLayout focuses on form-oriented panels much like the 'Segment' panel. Nevertheless, it is a general purpose\r\n * layout system that can be used for the vast majority of rectangular layouts.\r\n *\r\n * Define your layout with:\r\n * <ul>\r\n * <li>[number]px</li>\r\n * <li>grow</li>\r\n * <li>pref</li>\r\n * </ul>\r\n *\r\n * e.g. we want build a shape with a border on the left and right and a label in the\r\n * center. We allow the center to grow, the shape is resizeable.\r\n *\r\n * <pre>\r\n * 10px grow 10px\r\n *\r\n * -----+------------------+-----\r\n * | | [LABEL] | |\r\n * | | | |\r\n * | | | | grow\r\n * | | | |\r\n * | | | |\r\n * -----+------------------+-----\r\n * </pre>\r\n *\r\n * The number forces the exact width or height of the cell. <b>grow</b> respect the minimum width of the\r\n * element and allows to resize the shape. The row/col with the <b>grow</b> declaration will be resized.\r\n * The <b>pref</b> declaration forces the cell to the minimum width/height of the embedded figure.\r\n *\r\n * Example Implementation of a shape:\r\n *\r\n * @example\r\n * let PredefinedProcess = draw2d.shape.layout.FlexGridLayout.extend({\r\n *\r\n *\r\n * // 10px grow 10px\r\n * //\r\n * // -----+------------------+-----\r\n * // | | [LABEL] | |\r\n * // | | | |\r\n * // | | | | grow\r\n * // | | | |\r\n * // | | | |\r\n * // -----+------------------+-----\r\n * //\r\n * // @param attr\r\n * //\r\n * init: function(attr, setter, getter)\r\n * {\r\n * this._super(extend({\r\n * columns:\"10px, grow, 10px\",\r\n * rows: \"grow\",\r\n * bgColor:\"#FFFFFF\",\r\n * stroke:2\r\n * },attr),\r\n * setter,\r\n * getter);\r\n *\r\n *\r\n * this.label = new draw2d.shape.basic.Label({text:\"Process Name\", resizeable:true, stroke:2});\r\n * this.label.installEditor(new draw2d.ui.LabelInplaceEditor());\r\n * this.add(this.label, {row:0, col:1});\r\n *\r\n * this.setDimension(120,80);\r\n * }\r\n * });\r\n * let shape = new PredefinedProcess();\r\n * canvas.add(shape,10,10);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.layout.Layout\r\n * @since 2.5.1\r\n */\r\ndraw2d.shape.layout.FlexGridLayout = draw2d.shape.layout.Layout.extend(\r\n /** @lends draw2d.shape.layout.FlexGridLayout.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.layout.FlexGridLayout\",\r\n\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.cellLocator = {\r\n relocate: (index, figure) => {\r\n if (this.gridDef.layoutRequired === true) {\r\n this._layout()\r\n }\r\n let cell = figure.__cellConstraint\r\n let x = cell.x\r\n let y = cell.y\r\n\r\n // stretch the figure to fill the complete cell\r\n //\r\n if (figure.isResizeable()) {\r\n figure.setDimension(\r\n Math.max(figure.getMinWidth(), cell.width),\r\n Math.max(figure.getMinHeight(), cell.height))\r\n }\r\n // else apply the valign and align property\r\n //\r\n else {\r\n // apply vertical alignment\r\n //\r\n switch (cell.valign) {\r\n case \"middle\":\r\n y += (cell.height - figure.getHeight()) / 2\r\n break\r\n case \"bottom\":\r\n y += (cell.height - figure.getHeight())\r\n break\r\n }\r\n\r\n // apply horizontal alignment\r\n //\r\n switch (cell.align) {\r\n case \"center\":\r\n x += (cell.width - figure.getWidth()) / 2\r\n break\r\n case \"right\":\r\n x += (cell.width - figure.getWidth())\r\n break\r\n }\r\n }\r\n figure.setPosition(x, y)\r\n },\r\n bind: () => {},\r\n unbind: () => { },\r\n translate: (figure, diff) => {\r\n figure.setPosition(figure.x + diff.x, figure.y + diff.y)\r\n }\r\n }\r\n\r\n this.debug = false\r\n this.gridDef = {\r\n debugLines: [],\r\n def_cols: [],\r\n def_rows: [],\r\n min_height: [],\r\n min_width: [],\r\n minGridWidth: 10,\r\n minGridHeight: 10,\r\n hResizeable: false,\r\n vResizeable: false,\r\n layoutRequired: true\r\n }\r\n\r\n this._super(\r\n {stroke: 2, ...attr},\r\n setter,\r\n getter)\r\n\r\n this.resizeListener = (figure) => {\r\n this.gridDef.layoutRequired = true\r\n // propagate the event to the parent or other listener if existing\r\n //\r\n if (this.getParent() instanceof draw2d.shape.layout.Layout) {\r\n this.fireEvent(\"resize\")\r\n }\r\n // or we are the parent and must consume it self\r\n else {\r\n this.setDimension(\r\n this.gridDef.hResizeable === true ? this.getWidth() : 1,\r\n this.gridDef.vResizeable === true ? this.getHeight() : 1\r\n )\r\n }\r\n }\r\n\r\n let rows = attr.rows.split(\",\")\r\n let columns = attr.columns.split(\",\")\r\n for (let i = 0; i < columns.length; i++) {\r\n this.gridDef.def_cols[i] = this.cellWidthFromDef(columns[i])\r\n }\r\n\r\n for (let i = 0; i < rows.length; i++) {\r\n this.gridDef.def_rows[i] = this.cellWidthFromDef(rows[i])\r\n }\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.RectangleSelectionFeedbackPolicy())\r\n },\r\n\r\n add: function (figure, cellConstraint) {\r\n\r\n figure.__cellConstraint = {\r\n row: 0,\r\n col: 0,\r\n rowspan: 1,\r\n colspan: 1,\r\n align: \"left\",\r\n valign: \"top\",\r\n width: 1,\r\n height: 1,\r\n ...cellConstraint}\r\n this.gridDef.layoutRequired = true\r\n this._super(figure, this.cellLocator)\r\n this._layout()\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n return this.gridDef.minGridWidth\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinHeight: function () {\r\n return this.gridDef.minGridHeight\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setCanvas: function (canvas) {\r\n // layout must be recalculated if the shape will be assigned\r\n // to a canvas. \"Text\" elements can now calculate correct with the right font settings.\r\n //\r\n this.gridDef.layoutRequired = true\r\n this._super(canvas)\r\n\r\n return this\r\n },\r\n\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n this._super(attributes)\r\n if (this.debug) {\r\n this.paintDebugGrid()\r\n }\r\n\r\n return this\r\n },\r\n\r\n setDimension: function (w, h) {\r\n // we need the calculated layout to determine the min width/height of the figure\r\n //\r\n if (this.gridDef.layoutRequired === true) {\r\n this._layout()\r\n }\r\n // set the new dimension\r\n this._super(w, h)\r\n\r\n // after setting the new dimension a recalculation of the layout is required. May the shape\r\n // has grown up\r\n this.gridDef.layoutRequired = true\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n _layout: function () {\r\n this.gridDef.layoutRequired = false\r\n\r\n let figures = this.getChildren()\r\n\r\n // copy the initial requested width/heights\r\n //\r\n this.gridDef.min_height = this.gridDef.def_rows.slice(0)\r\n this.gridDef.min_width = this.gridDef.def_cols.slice(0)\r\n\r\n // Calculate the basic width/height of the elements without considering the \"span\" and \"grow\"\r\n //\r\n for (let i = 0; i < figures.getSize(); i++) {\r\n let figure = figures.get(i)\r\n let cell = figure.__cellConstraint\r\n // ermitteln der derzeitig zur verfügung stehenden weite\r\n this.gridDef.min_width[cell.col] = Math.max(this.gridDef.min_width[cell.col], figure.getMinWidth())\r\n\r\n // Falls das Elemente eine y_span hat, dann versuchen ob es auf die ganze\r\n // höhe rein passt. Wenn nicht wird der Teil der 'grow' angegeben hat verändert.\r\n // Wenn kein Element 'grow' angegeben hat, dann wird das letzte Element verändert\r\n if (cell.rowspan > 1) {\r\n let eHeight = figure.getMinHeight()\r\n let cHeight = this.cellHeight(cell.row, cell.row + cell.rowspan)\r\n if (cHeight < eHeight) {\r\n let diff = eHeight - cHeight\r\n this.gridDef.min_height[cell.row + cell.rowspan - 1] = this.gridDef.min_height[cell.row + cell.rowspan - 1] + diff\r\n }\r\n }\r\n else {\r\n this.gridDef.min_height[cell.row] = Math.max(this.gridDef.min_height[cell.row], figure.getMinHeight())\r\n }\r\n }\r\n this.gridDef.minGridWidth = this._getGridWidth()\r\n this.gridDef.minGridHeight = this._getGridHeight()\r\n\r\n // Resize the grid height if at least one row supports \"grow\"\r\n //\r\n let gridHeight = this._getGridHeight()\r\n for (let i = 0; i < this.gridDef.def_rows.length; i++) {\r\n // row found which can grow\r\n if (this.gridDef.def_rows[i] === -1) {\r\n this.gridDef.min_height[i] = this.gridDef.min_height[i] + Math.max(0, this.getHeight() - gridHeight)\r\n this.gridDef.vResizeable = true\r\n break\r\n }\r\n }\r\n\r\n // Resize the grid if at least one column supports \"grow\"\r\n //\r\n let gridWidth = this._getGridWidth()\r\n for (let i = 0; i < this.gridDef.def_cols.length; i++) {\r\n // column found which can grow\r\n if (this.gridDef.def_cols[i] === -1) {\r\n this.gridDef.min_width[i] = this.gridDef.min_width[i] + Math.max(0, this.getWidth() - gridWidth)\r\n this.gridDef.hResizeable = true\r\n break\r\n }\r\n }\r\n\r\n // apply the cell constraints to the elements\r\n //\r\n for (let i = 0; i < figures.getSize(); i++) {\r\n let cell = figures.get(i).__cellConstraint\r\n cell.width = this.cellWidth(cell.col, cell.col + cell.colspan)\r\n cell.height = this.cellHeight(cell.row, cell.row + cell.rowspan)\r\n cell.x = this.cellX(cell.col)\r\n cell.y = this.cellY(cell.row)\r\n }\r\n\r\n return this\r\n },\r\n\r\n cellX: function (col) {\r\n let r = 0\r\n for (let i = 0; i < col; i++) {\r\n r = r + this.gridDef.min_width[i]\r\n }\r\n\r\n return r\r\n },\r\n\r\n cellY: function (row) {\r\n let r = 0\r\n for (let i = 0; i < row; i++) {\r\n r = r + this.gridDef.min_height[i]\r\n }\r\n\r\n return r\r\n },\r\n\r\n cellWidth: function (from, to) {\r\n let r = 0\r\n for (let i = from; i < to; i++) {\r\n r = r + this.gridDef.min_width[i]\r\n }\r\n\r\n return r\r\n },\r\n\r\n cellHeight: function (from, to) {\r\n let r = 0\r\n for (let i = from; i < to; i++) {\r\n r = r + this.gridDef.min_height[i]\r\n }\r\n\r\n return r\r\n },\r\n\r\n paintDebugGrid: function () {\r\n // alte Linien erstmal entfernen bevor man neue zeichnet\r\n //\r\n for (let i = 0; i < this.gridDef.debugLines.length; i++)\r\n this.gridDef.debugLines[i].remove()\r\n this.gridDef.debugLines = []\r\n\r\n let gridHeight = this._getGridHeight()\r\n let gridWidth = this._getGridWidth()\r\n let posX = this.getAbsoluteX()\r\n let posY = this.getAbsoluteY()\r\n\r\n // draw the cols first\r\n let x = posX\r\n for (let i = 0; i <= this.gridDef.min_width.length; i++) {\r\n let newLine = this.canvas.paper.path(\"M \" + x + \" \" + posY + \" l 0 \" + gridHeight).attr({\r\n \"stroke\": \"#FF0000\",\r\n \"stroke-width\": 1\r\n })\r\n this.gridDef.debugLines.push(newLine)\r\n if (i < this.gridDef.min_width.length)\r\n x = x + this.gridDef.min_width[i]\r\n }\r\n\r\n let y = posY\r\n for (let i = 0; i <= this.gridDef.min_height.length; i++) {\r\n let newLine = this.canvas.paper.path(\"M \" + posX + \" \" + y + \" l \" + gridWidth + \" 0\").attr({\r\n \"stroke\": \"#FF0000\",\r\n \"stroke-width\": 1\r\n })\r\n this.gridDef.debugLines.push(newLine)\r\n if (i < this.gridDef.min_height.length)\r\n y = y + this.gridDef.min_height[i]\r\n }\r\n },\r\n\r\n _getGridWidth: function () {\r\n let gridWidth = 0\r\n for (let i = 0; i < this.gridDef.min_width.length; i++) {\r\n gridWidth = gridWidth + this.gridDef.min_width[i]\r\n }\r\n\r\n return gridWidth\r\n },\r\n\r\n _getGridHeight: function () {\r\n let gridHeight = 0\r\n for (let i = 0; i < this.gridDef.min_height.length; i++) {\r\n gridHeight = gridHeight + this.gridDef.min_height[i]\r\n }\r\n\r\n return gridHeight\r\n },\r\n\r\n\r\n cellWidthFromDef: function (def) {\r\n let pattern = new RegExp(\"(\\\\d+)(?:px)?\")\r\n let match = def.match(pattern)\r\n\r\n if (match != null) {\r\n return parseInt(match[1])\r\n }\r\n\r\n pattern = new RegExp(\"p(?:ref)?\")\r\n match = def.match(pattern)\r\n if (match != null) {\r\n return 0\r\n }\r\n\r\n pattern = new RegExp(\"g(?:row)?\")\r\n match = def.match(pattern)\r\n if (match != null) {\r\n this.autoResize = false\r\n return -1\r\n }\r\n\r\n return 0\r\n }\r\n\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * The HorizontalLayout class arranges the layout elements in a horizontal sequence,\r\n * left to right, with optional gaps between the elements.\r\n *\r\n * During the execution of the setDimension() method, the minimum width of the container is calculated\r\n * by accumulating the minimum sizes of the elements, including stroke, gaps and padding.\r\n *\r\n *\r\n * See the example below with and without gap and border settings\r\n *\r\n *\r\n * @example\r\n *\r\n * // first container without any gap and a border of the parent\r\n * // container\r\n * let label1 = new draw2d.shape.basic.Label({text:\"Label 1\"});\r\n * let label2 = new draw2d.shape.basic.Label({text:\"Label 2\"});\r\n * let label3 = new draw2d.shape.basic.Label({text:\"Label 3\"});\r\n *\r\n * let container1 = new draw2d.shape.layout.HorizontalLayout();\r\n *\r\n * container1.add(label1);\r\n * container1.add(label2);\r\n * container1.add(label3);\r\n * container1.setGap(10);\r\n * container1.setStroke(2);\r\n * canvas.add(container1,50,10);\r\n *\r\n * // second container without any gab or border\r\n * //\r\n * let label11 = new draw2d.shape.basic.Label({text:\"Label 1\"});\r\n * let label12 = new draw2d.shape.basic.Label({text:\"Label 2\"});\r\n * let label13 = new draw2d.shape.basic.Label({text:\"Label 3\"});\r\n *\r\n * let container2 = new draw2d.shape.layout.HorizontalLayout();\r\n *\r\n * container2.add(label11);\r\n * container2.add(label12);\r\n * container2.add(label13);\r\n *\r\n * canvas.add(container2,50,90);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.layout.Layout\r\n * @since 2.5.1\r\n */\r\ndraw2d.shape.layout.HorizontalLayout = draw2d.shape.layout.Layout.extend(\r\n /** @lends draw2d.shape.layout.HorizontalLayout.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.layout.HorizontalLayout\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.gap = 0\r\n let _this = this\r\n this.locator = {\r\n translate: function (figure, diff) {\r\n figure.setPosition(figure.x + diff.x, figure.y + diff.y)\r\n },\r\n bind: function () {\r\n },\r\n unbind: function () {\r\n },\r\n relocate: function (index, target) {\r\n let stroke = _this.getStroke()\r\n let yPos = stroke + _this.padding.top\r\n let xPos = stroke + _this.padding.left // respect the border and padding of the parent\r\n for (let i = 0; i < index; i++) {\r\n let child = _this.children.get(i).figure\r\n if (child.isVisible()) {\r\n xPos += child.getWidth() + _this.gap\r\n }\r\n }\r\n\r\n target.setPosition(xPos, yPos)\r\n }\r\n }\r\n\r\n this._super(\r\n {width: 1, height: 1, gap: 0, ...attr},\r\n {\r\n // @attr {Number} gap the gap between the children shapes */\r\n gap: this.setGap,\r\n ...setter},\r\n {\r\n gap: this.getGap,\r\n ...getter}\r\n )\r\n\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n add: function (child, locator, index) {\r\n this._super(child, this.locator, index)\r\n\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set the gap width between child components within this layout.\r\n * This will only affect the space between components, not the space around all the components in the layout.\r\n *\r\n * @param {Number} gap The space, in pixels, between items.\r\n * @since 2.5.1\r\n */\r\n setGap: function (gap) {\r\n this.gap = gap\r\n // this forces a relayout of the element\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the gap between the children shapes\r\n *\r\n * @since 5.0.0\r\n *\r\n */\r\n getGap: function () {\r\n return this.gap\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n let _this = this\r\n let width = this.stroke * 2 + this.padding.left + this.padding.right\r\n let gap = 0\r\n\r\n this.children.each(function (i, e) {\r\n if (e.figure.isVisible()) {\r\n width += (e.figure.isResizeable() ? e.figure.getMinWidth() : e.figure.getWidth() + gap)\r\n gap = _this.gap\r\n }\r\n })\r\n\r\n return width\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinHeight: function () {\r\n let markup = (this.stroke * 2) + this.padding.top + this.padding.bottom\r\n let height = 0\r\n\r\n this.children.each(function (i, e) {\r\n height = Math.max(height, (e.figure.isResizeable() ? e.figure.getMinHeight() : e.figure.getHeight()))\r\n })\r\n\r\n return height + markup\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n\r\n let diff = this.width - this.getMinWidth()\r\n if (diff > 0) {\r\n diff = (diff / this.children.getSize()) | 0\r\n this.children.each(function (i, e) {\r\n if (e.figure.isResizeable() === true) {\r\n e.figure.setDimension(e.figure.getMinWidth() + diff, e.figure.getHeight())\r\n }\r\n })\r\n } else {\r\n let minHeight = this.getMinHeight()\r\n this.children.each(function (i, e) {\r\n // The layout respect the \"resizeable\" flag because a layout is a kind of layouter and\r\n // any kind of autolayouter must respect this flag\r\n if (e.figure.isResizeable() === true) {\r\n // reset the shape to the minimum width/height. see setMinWidth/setMinHeight\r\n e.figure.setDimension(1, minHeight)\r\n }\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.gap = this.gap\r\n\r\n return memento\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.gap === \"number\") {\r\n this.gap = memento.gap\r\n }\r\n\r\n return this\r\n }\r\n\r\n })\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * A base class for positioning child figures and determining the ideal size for\r\n * a figure with children.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.layout.Layout = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.shape.layout.Layout.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.layout.Layout\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // @since 4.3.3\r\n this.padding = {top: 0, right: 0, bottom: 0, left: 0}\r\n\r\n this._super({bgColor: null, radius: 0, stroke: 0, ...attr},\r\n {\r\n // @attr {Number} padding the padding in pixel around the text */\r\n padding: this.setPadding,\r\n ...setter\r\n },\r\n {\r\n padding: this.getPadding,\r\n ...getter\r\n }\r\n )\r\n\r\n\r\n this.resizeListener = figure => {\r\n // propagate the event to the parent or other listener if existing\r\n //\r\n if (this.getParent() instanceof draw2d.shape.layout.Layout) {\r\n this.fireEvent(\"resize\")\r\n }\r\n // or we are the parent and must consume it self\r\n else {\r\n this.setDimension(1, 1)\r\n this.fireEvent(\"resize\")\r\n }\r\n }\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n add: function (child, locator, index) {\r\n this._super(child, locator, index)\r\n\r\n child.on(\"resize\", this.resizeListener)\r\n child.on(\"change:visibility\", this.resizeListener)\r\n\r\n // don't use the getter/setter. This considers the canvas assignment and\r\n // the child is always invisible. BIG BUG. The example shape_db will break if you change this.\r\n// child.setVisible(this.isVisible());\r\n // respect the \"visible\" flag of the child as well\r\n child.visible = child.visible && this.visible\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n remove: function (child) {\r\n let r = this._super(child)\r\n child.off(this.resizeListener)\r\n this.setDimension(1, 1)\r\n\r\n return r\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the padding of the element\r\n *\r\n * // Alternatively you can use the attr method:\r\n * //\r\n * // set the padding for top,left,bottom,right in one call\r\n * figure.attr({\r\n * padding: 3\r\n * });\r\n *\r\n * // update the padding left and top\r\n * figure.attr({\r\n * padding: {left:3, top:30}\r\n * });\r\n *\r\n * @param {Number|Object} padding The new padding\r\n * @since 4.3.3\r\n **/\r\n setPadding: function (padding) {\r\n if (typeof padding === \"number\") {\r\n this.padding = {top: padding, right: padding, bottom: padding, left: padding}\r\n }\r\n else {\r\n this.padding = {...this.padding, ...padding}\r\n }\r\n this.fireEvent(\"change:padding\", {value: this.padding})\r\n\r\n // force a relayout of the figure\r\n this.setDimension(1, 1)\r\n\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Get the padding of the element.\r\n *\r\n * @since 4.3.3\r\n * @returns {this}\r\n **/\r\n getPadding: function () {\r\n return this.padding\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n * @returns {this}\r\n */\r\n setVisible: function (flag) {\r\n // propagate the visibility to all children too.\r\n //\r\n this.children.each(function (i, e) {\r\n e.figure.setVisible(flag)\r\n })\r\n\r\n\r\n this._super(flag)\r\n\r\n // force a relayout of the shape because the dimension has been changed\r\n // by enable/disable of child shapes\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Returns the Command to perform the specified Request or null.\r\n *\r\n * @param {draw2d.command.CommandType} request describes the Command being requested\r\n * @returns {draw2d.command.Command} null or a Command\r\n * @private\r\n **/\r\n createCommand: function (request) {\r\n // it is not possible to rate a layout object\r\n // ..at the moment\r\n if (request.getPolicy() === draw2d.command.CommandType.ROTATE) {\r\n return null\r\n }\r\n\r\n\r\n return this._super(request)\r\n }\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * Using the StackLayout as their layout shape have their children placed on top of one another.\r\n * Order of placement is determined by the order in which the children were added, first child\r\n * added placed on the bottom. Only one child is visible at once.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.layout.Layout\r\n */\r\ndraw2d.shape.layout.StackLayout = draw2d.shape.layout.Layout.extend(\r\n /** @lends draw2d.shape.layout.StackLayout.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.layout.StackLayout\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.visibleLayer = 0\r\n this.locator = new draw2d.layout.locator.XYAbsPortLocator(0, 0)\r\n\r\n this._super(\r\n {resizeable: true, width: 10, height: 10, ...attr},\r\n { ...setter},\r\n { ...getter})\r\n\r\n this.resizeListener = () => {}\r\n\r\n // install default selection handler. Can be overridden or replaced\r\n this.installEditPolicy(new draw2d.policy.figure.RectangleSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n *\r\n * Set the current visible layer of the stack layout\r\n *\r\n * @param {Number} visibleLayer the layer to show or -1 to hide all of them\r\n */\r\n setVisibleLayer: function (visibleLayer, duration) {\r\n if(this.visibleLayer>=0) {\r\n this.getChildren().get(this.visibleLayer).setVisible(false, duration)\r\n }\r\n this.visibleLayer = Math.min(this.getChildren().getSize() - 1, Math.max(-1, visibleLayer))\r\n\r\n if(this.visibleLayer>=0){\r\n this.getChildren().get(this.visibleLayer).setVisible(true, duration)\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns the current visible layer\r\n *\r\n * @returns {Number}\r\n */\r\n getVisibleLayer: function () {\r\n return this.visibleLayer\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n add: function (child, locator, index) {\r\n // the child didn't care about events...at the moment\r\n //\r\n child.hitTest = () => false\r\n\r\n // make all existing shapes invisible\r\n //\r\n this.getChildren().each( (i, c) => {\r\n c.setVisible(false)\r\n })\r\n this.visibleLayer = this.getChildren().getSize()\r\n\r\n // ignore the parameter \"locator\" and use the locator for the stack layout instead\r\n return this._super(child, this.locator, index)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setVisible: function (flag) {\r\n draw2d.shape.basic.Rectangle.prototype.setVisible.call(this, flag)\r\n\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n let markup = (this.stroke * 2) + this.padding.left + this.padding.right\r\n let width = 10\r\n this.children.each( (i, e)=> {\r\n width = Math.max(width, e.figure.isResizeable() ? e.figure.getMinWidth() : e.figure.getWidth())\r\n })\r\n return width + markup\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinHeight: function () {\r\n let markup = (this.stroke * 2) + this.padding.top + this.padding.bottom\r\n let height = 10\r\n this.children.each( (i, e) =>{\r\n height = Math.max(height, e.figure.isResizeable() ? e.figure.getMinHeight() : e.figure.getHeight())\r\n })\r\n return height + markup\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n\r\n let width = this.width - this.padding.left - this.padding.right\r\n let height = this.height - this.padding.top - this.padding.bottom\r\n if (width === this._recursiveWidth && height === this._recursiveHeight) {\r\n return this\r\n }\r\n this._recursiveHeight = height\r\n this._recursiveWidth = width\r\n\r\n this.children.each( (i, e) =>{\r\n if (e.figure.isResizeable()) {\r\n e.figure.setDimension(width, height)\r\n }\r\n })\r\n\r\n delete this._recursiveHeight\r\n delete this._recursiveWidth\r\n\r\n return this\r\n }\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The TableLayout class arranges the children in a row/column order. Each cell can be styled\r\n * with valign, align and padding.\r\n *\r\n *\r\n * See the example below with and without padding or alignment settings\r\n *\r\n *\r\n * @example\r\n *\r\n * let label1 = new draw2d.shape.basic.Label({text:\"[0,1] with long long long long label\", fontColor:\"#00AF00\"});\r\n * let label2 = new draw2d.shape.basic.Label({text:\"[1,1] padding:10\", fontColor:\"#00AF00\"});\r\n * let label3 = new draw2d.shape.basic.Label({text:\"[2,1] align:right\", fontColor:\"#00AF00\"});\r\n * let label4 = new draw2d.shape.basic.Label({text:\"[3,1] resize:true\",resizeable:true, fontColor:\"#00AF00\"});\r\n *\r\n * let container = new draw2d.shape.layout.TableLayout();\r\n *\r\n * container.addRow(\"[0,0]\", label1 ,\"[0,2] align:center\");\r\n * container.addRow(\"[1,0] valign:bottom\", label2,\"[1,2] long long long label\");\r\n * container.addRow(\"[2,0]\", label3,\"[2,2]\");\r\n * container.addRow(\"[3,0]\", label4,\"[3,2]\");\r\n *\r\n * container.setPadding(0);\r\n * container.setCellPadding(1,1, 10);\r\n *\r\n * container.setCellAlign(0,2, \"center\");\r\n * container.setCellAlign(2,1, \"right\");\r\n *\r\n * container.setCellVerticalAlign(1, 0, \"bottom\");\r\n * canvas.add(container,10,10);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.layout.Layout\r\n * @since 5.3.0\r\n */\r\ndraw2d.shape.layout.TableLayout = draw2d.shape.layout.Layout.extend(\r\n /** @lends draw2d.shape.layout.TableLayout.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.layout.TableLayout\",\r\n\r\n DUMMY_CELL: {\r\n getMinHeight: function () {\r\n return 1\r\n },\r\n getMinWidth: function () {\r\n return 1\r\n },\r\n off: function () {\r\n }\r\n },\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n let _this = this\r\n this.cellLocator = {\r\n relocate: function (index, figure) {\r\n if (_this.repaintBlocked === true) {\r\n return\r\n }\r\n let cell = figure.__cell\r\n let layout = _this.getCellLayout(cell.row, cell.column)\r\n let outerWidth = _this.getWidth()\r\n let minWidth = _this.getMinWidth()\r\n let widthOffset = 0\r\n if (outerWidth != minWidth) {\r\n widthOffset = ((outerWidth - minWidth) / _this.layoutInfos[0].length) * cell.column\r\n }\r\n\r\n let width = figure.getWidth()\r\n let height = figure.getHeight()\r\n let x = layout.x + _this.padding.left + layout.padding.left + widthOffset\r\n let y = layout.y + _this.padding.top + layout.padding.top\r\n\r\n // stretch the figure to fill the complete cell\r\n //\r\n if (figure.isResizeable()) {\r\n let w = Math.max(figure.getMinWidth(), layout.w - (layout.padding.left + layout.padding.right) + widthOffset)\r\n let h = Math.max(figure.getMinHeight(), layout.h - (layout.padding.top + layout.padding.bottom))\r\n figure.setDimension(w, h)\r\n }\r\n // else apply the valign and align property\r\n //\r\n else {\r\n // apply vertical alignment\r\n //\r\n switch (layout.valign) {\r\n case \"middle\":\r\n y = y + (layout.h - (height + layout.padding.top + layout.padding.bottom)) / 2\r\n break\r\n case \"bottom\":\r\n y = y + (layout.h - (height + layout.padding.top + layout.padding.bottom))\r\n break\r\n }\r\n\r\n // apply horizontal alignment\r\n //\r\n switch (layout.align) {\r\n case \"center\":\r\n x = x + (layout.w - (width + layout.padding.left + layout.padding.right)) / 2 + (widthOffset / 2)\r\n break\r\n case \"right\":\r\n x = x + (layout.w - (width + layout.padding.left + layout.padding.right)) + widthOffset\r\n break\r\n }\r\n }\r\n figure.setPosition(x, y)\r\n },\r\n bind: function () {\r\n },\r\n unbind: function () {\r\n },\r\n translate: function (figure, diff) {\r\n figure.setPosition(figure.x + diff.x, figure.y + diff.y)\r\n }\r\n }\r\n\r\n this.padding = {top: 4, right: 4, bottom: 4, left: 4}\r\n\r\n this.grid = []\r\n this.layoutInfos = []\r\n this.layoutInfos[0] = []\r\n this.layoutInfos[0][0] = {x: 0, y: 0, w: 1, h: 1, valign: \"top\", align: \"left\"}\r\n\r\n\r\n this._super(\r\n extend({stroke: 1, resizeable: false}, attr),\r\n extend({\r\n // @attr {Number} padding the padding in pixel around the text */\r\n padding: this.setPadding\r\n }, setter),\r\n extend({\r\n padding: this.getPadding\r\n }, getter))\r\n\r\n\r\n },\r\n\r\n /**\r\n * \r\n * Set the padding of the given cell.\r\n *\r\n *\r\n * @param {Number|Object} padding The new padding\r\n **/\r\n setCellPadding: function (row, column, padding) {\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null) {\r\n return this\r\n }\r\n\r\n if (typeof padding === \"number\") {\r\n layout.padding = {top: padding, right: padding, bottom: padding, left: padding}\r\n }\r\n else {\r\n extend(layout.padding, padding)\r\n }\r\n\r\n this.calculateLayout()\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Get the padding of the outer grid.\r\n *\r\n **/\r\n getCellPadding: function (row, column) {\r\n\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null || typeof layout.padding === \"undefined\") {\r\n return {top: 0, right: 0, bottom: 0, left: 0}\r\n }\r\n return layout.padding\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the padding of the outer grid.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * //\r\n * // set the padding for top,left,bottom,right in one call\r\n * figure.attr({\r\n * padding: 3\r\n * });\r\n *\r\n * // update the padding left and top\r\n * figure.attr({\r\n * padding: {left:3, top:30}\r\n * });\r\n *\r\n * @param {Number|Object} padding The new padding\r\n **/\r\n setPadding: function (padding) {\r\n if (typeof padding === \"number\") {\r\n this.padding = {top: padding, right: padding, bottom: padding, left: padding}\r\n }\r\n else {\r\n this.padding = extend(this.padding, padding)\r\n }\r\n this.calculateLayout()\r\n this.setDimension(1, 1)\r\n this.fireEvent(\"change:padding\", {value: this.padding})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Get the padding of the outer grid.\r\n *\r\n **/\r\n getPadding: function () {\r\n return this.padding\r\n },\r\n\r\n setCanvas: function (canvas) {\r\n this._super(canvas)\r\n this.calculateLayout()\r\n this.setDimension(2, 2)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n add: function (child, locator, index) {\r\n this._super(child, locator, index)\r\n\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * \r\n * Removes the row from the TableLayout\r\n *\r\n * @returns the removed row\r\n */\r\n removeRow: function (index) {\r\n let _this = this\r\n let removedRow = this.grid.splice(index, 1)\r\n removedRow[0].forEach(function (figure) {\r\n _this.remove(figure)\r\n })\r\n\r\n this.calculateLayout()\r\n this.setDimension(2, 2)\r\n\r\n return removedRow\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Add a row to the table grid.\r\n * This method has a variable argument list. All arguments are added in one row.\r\n *\r\n * @param {Array} figures variable count of figures to add as one row\r\n */\r\n addRow: function () {\r\n let figuresToAdd = []\r\n let _this = this\r\n let args = Array.prototype.slice.call(arguments) // sometimes js is stupid...\r\n\r\n let rowCount = this.grid.length + 1\r\n let columnCount = this.grid.length > 0 ? Math.max(this.grid[0].length, args.length) : args.length\r\n\r\n let row = []\r\n\r\n args.forEach(function (figure, index) {\r\n if (typeof figure === \"string\") {\r\n figure = new draw2d.shape.basic.Label({text: figure})\r\n }\r\n row.push(figure)\r\n figuresToAdd.push(figure)\r\n })\r\n this.grid.push(row)\r\n\r\n // adjust the columns. All rows must have the same column count. Add empty cells\r\n // if required.\r\n //\r\n this.grid.forEach(function (row, index) {\r\n let missingColumns = columnCount - row.length\r\n for (let i = 0; i < missingColumns; i++) {\r\n row.push(_this.DUMMY_CELL)\r\n }\r\n })\r\n\r\n let orig = this.repaintBlocked\r\n this.repaintBlocked = true\r\n figuresToAdd.forEach(function (figure) {\r\n _this.add(figure, _this.cellLocator)\r\n })\r\n this.repaintBlocked = orig\r\n\r\n this.calculateLayout()\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n getMinWidth: function () {\r\n // return some good default if we are not part of the canvas.\r\n // A real width/height calculation isn'T possible if the canvas not set\r\n if (this.canvas === null || this.layoutInfos.length === 0) {\r\n return 10\r\n }\r\n\r\n let bottom = this.layoutInfos[this.layoutInfos.length - 1]\r\n let layout = bottom[bottom.length - 1]\r\n\r\n return layout.w + layout.x + this.padding.left + this.padding.right\r\n },\r\n\r\n getMinHeight: function () {\r\n // return some good default if we are not part of the canvas.\r\n // A real width/height calculation isn'T possible if the canvas not set\r\n if (this.canvas === null || this.layoutInfos.length === 0) {\r\n return 10\r\n }\r\n\r\n let bottom = this.layoutInfos[this.layoutInfos.length - 1]\r\n let layout = bottom[bottom.length - 1]\r\n\r\n return layout.h + layout.y + this.padding.top + this.padding.bottom\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the vertical alignment of a cell. Possible values are\r\n * <ul>\r\n * <li>top</li>\r\n * <li>middle</li>\r\n * <li>bottom</li>\r\n * </ul>\r\n *\r\n * @param {Number} row The row index of the cell. Starting by 0\r\n * @param {Number} column The column index of the cell. Starting by 0\r\n * @param {String} align The vertical alignment of the cell\r\n */\r\n setCellVerticalAlign: function (row, column, valign) {\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null) {\r\n return // silently\r\n }\r\n\r\n switch (valign) {\r\n case \"top\":\r\n case \"middle\":\r\n case \"bottom\":\r\n layout.valign = valign\r\n this.calculateLayout()\r\n this.setDimension(1, 1)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Get the vertical alignment of a cell. Possible values are\r\n * <ul>\r\n * <li>top</li>\r\n * <li>middle</li>\r\n * <li>bottom</li>\r\n * </ul>\r\n *\r\n * @param {Number} row The row index of the cell. Starting by 0\r\n * @param {Number} column The column index of the cell. Starting by 0\r\n * @returns {String} The vertical alignment of the cell\r\n */\r\n getCellVerticalAlign: function (row, column) {\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null) {\r\n return \"top\"\r\n }\r\n\r\n return layout.valign\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the alignment of a cell. Possible values are\r\n * <ul>\r\n * <li>left</li>\r\n * <li>center</li>\r\n * <li>right</li>\r\n * </ul>\r\n *\r\n *\r\n * @param {Number} row The row index of the cell. Starting by 0\r\n * @param {Number} column The column index of the cell. Starting by 0\r\n * @param {String} align The horizontal alignment of the cell\r\n */\r\n setCellAlign: function (row, column, align) {\r\n\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null) {\r\n return // silently\r\n }\r\n\r\n switch (align) {\r\n case \"left\":\r\n case \"center\":\r\n case \"right\":\r\n layout.align = align\r\n this.calculateLayout()\r\n this.setDimension(1, 1)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return the alignment of a cell. Possible values are\r\n * <ul>\r\n * <li>left</li>\r\n * <li>center</li>\r\n * <li>right</li>\r\n * </ul>\r\n *\r\n *\r\n * @param {Number} row The row index of the cell. Starting by 0\r\n * @param {Number} column The column index of the cell. Starting by 0\r\n * return {String} The horizontal alignment of the cell\r\n */\r\n getCellAlign: function (row, column) {\r\n\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null) {\r\n return \"left\"\r\n }\r\n return layout.align\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the layout information for the given row/column or <b>null</b>\r\n * if the row/column index is out of range.\r\n *\r\n * @private\r\n */\r\n getCellLayout: function (row, column) {\r\n if (row < 0 || column < 0) {\r\n return null // silently\r\n }\r\n\r\n if (row >= this.layoutInfos.length) {\r\n return null // silently\r\n }\r\n\r\n let layouts = this.layoutInfos[row]\r\n if (column >= layouts.length) {\r\n return null // silently\r\n }\r\n\r\n return layouts[column]\r\n },\r\n\r\n /**\r\n * \r\n * Recalculate the layout of the table\r\n *\r\n * @private\r\n */\r\n calculateLayout: function () {\r\n let _this = this\r\n let rowCount = this.grid.length\r\n let columnCount = this.grid.length > 0 ? this.grid[0].length : 0\r\n\r\n let newLayoutInfos = []\r\n for (let row = 0; row < rowCount; row++) {\r\n newLayoutInfos[row] = []\r\n for (let column = 0; column < columnCount; column++) {\r\n newLayoutInfos[row][column] = {\r\n width: 0,\r\n height: 0,\r\n x: 0,\r\n y: 0,\r\n valign: this.getCellVerticalAlign(row, column),\r\n align: this.getCellAlign(row, column),\r\n padding: this.getCellPadding(row, column)\r\n }\r\n }\r\n }\r\n\r\n // determine the heights/widths of the grid\r\n //\r\n let layoutWidths = new Array(columnCount + 1).join('0').split('').map(parseFloat)\r\n let layoutHeights = new Array(rowCount + 1).join('0').split('').map(parseFloat)\r\n this.grid.forEach(function (figures, row) {\r\n for (let column = 0; column < columnCount; column++) {\r\n let layout = newLayoutInfos[row][column]\r\n let figure = figures[column]\r\n figure.__cell = {row: row, column: column}\r\n layoutHeights[row] = Math.max(layoutHeights[row], figure.getMinHeight() + layout.padding.top + layout.padding.bottom)\r\n layoutWidths[column] = Math.max(layoutWidths[column], figure.getMinWidth() + layout.padding.left + layout.padding.right)\r\n }\r\n })\r\n\r\n let x = 0, y = 0\r\n for (let row = 0; row < rowCount; row++) {\r\n for (let column = 0; column < columnCount; column++) {\r\n let layout = newLayoutInfos[row][column]\r\n layout.w = layoutWidths[column]\r\n layout.h = layoutHeights[row]\r\n layout.x = x\r\n layout.y = y\r\n x = x + layout.w\r\n }\r\n y = y + layoutHeights[row]\r\n x = 0\r\n }\r\n\r\n this.layoutInfos = newLayoutInfos\r\n\r\n return this\r\n }\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * The VerticalLayout class arranges the layout elements in a vertical sequence,\r\n * left to right, with optional gaps between the elements.\r\n *\r\n * During the execution of the setDimension() method, the minimum height of the container is calculated\r\n * by accumulating the minimum sizes of the elements, including stroke, gaps and padding.\r\n *\r\n * See the example below with and without gap and border settings\r\n *\r\n *\r\n * @example\r\n *\r\n * // first container without any gap and a border of the parent\r\n * // container\r\n * let label1 = new draw2d.shape.basic.Label({text:\"Label 1\"});\r\n * let label2 = new draw2d.shape.basic.Label({text:\"Label 2\"});\r\n * let label3 = new draw2d.shape.basic.Label({text:\"Label 3\"});\r\n *\r\n * let container1 = new draw2d.shape.layout.VerticalLayout();\r\n *\r\n * container1.add(label1);\r\n * container1.add(label2);\r\n * container1.add(label3);\r\n * container1.setGap(10);\r\n * container1.setStroke(2);\r\n * canvas.add(container1,50,10);\r\n *\r\n * // second container without any gab or border\r\n * //\r\n * let label11 = new draw2d.shape.basic.Label({text:\"Label 1\"});\r\n * let label12 = new draw2d.shape.basic.Label({text:\"Label 2\"});\r\n * let label13 = new draw2d.shape.basic.Label({text:\"Label 3\"});\r\n *\r\n * let container2 = new draw2d.shape.layout.VerticalLayout();\r\n *\r\n * container2.add(label11);\r\n * container2.add(label12);\r\n * container2.add(label13);\r\n *\r\n * canvas.add(container2,150,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.layout.Layout\r\n */\r\ndraw2d.shape.layout.VerticalLayout = draw2d.shape.layout.Layout.extend(\r\n /** @lends draw2d.shape.layout.VerticalLayout.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.layout.VerticalLayout\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // some layout parameter\r\n //\r\n this.gap = 0\r\n\r\n // \"this\" shortcut to avoid $.proxy\r\n let _this = this\r\n\r\n this.locator = {\r\n translate: function (figure, diff) {\r\n figure.setPosition(figure.x + diff.x, figure.y + diff.y)\r\n },\r\n bind: function () {\r\n },\r\n unbind: function () {\r\n },\r\n relocate: function (index, target) {\r\n let stroke = _this.getStroke()\r\n let yPos = stroke + _this.padding.top // respect the border and padding of the shape\r\n let xPos = _this.padding.left\r\n\r\n for (let i = 0; i < index; i++) {\r\n let child = _this.children.get(i).figure\r\n if (child.isVisible()) {\r\n yPos += child.getHeight() + _this.gap\r\n }\r\n }\r\n\r\n target.setPosition(xPos, yPos)\r\n }\r\n }\r\n\r\n this._super(\r\n extend({width: 10, height: 10}, attr),\r\n extend({\r\n // @attr {Number} gap the gap between the children shapes */\r\n gap: this.setGap\r\n }, setter),\r\n extend({\r\n gap: this.getGap\r\n }, getter))\r\n\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n add: function (child, locator, index) {\r\n this._super(child, this.locator, index)\r\n\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the gap width between child components within this layout.\r\n * This will only affect the space between components, not the space around all the components in the layout.\r\n *\r\n * @param {Number} gap The space, in pixels, between items.\r\n */\r\n setGap: function (gap) {\r\n this.gap = gap\r\n // this forces a relayout of the element\r\n this.setDimension(1, 1)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n let markup = (this.stroke * 2) + this.padding.left + this.padding.right\r\n let width = 10\r\n this.children.each(function (i, e) {\r\n if (e.figure.isVisible())\r\n width = Math.max(width, e.figure.isResizeable() ? e.figure.getMinWidth() : e.figure.getWidth())\r\n })\r\n return width + markup\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinHeight: function () {\r\n let _this = this\r\n let gap = 0\r\n let markup = (this.stroke * 2) + this.padding.top + this.padding.bottom\r\n let height = 0\r\n\r\n this.children.each(function (i, e) {\r\n if (e.figure.isVisible()) {\r\n height += ((e.figure.isResizeable() ? e.figure.getMinHeight() : e.figure.getHeight()) + gap)\r\n // first element is iterated. Now we must add the gap to all next elements\r\n gap = _this.gap\r\n }\r\n })\r\n\r\n return height + markup\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n\r\n let width = this.width - this.padding.left - this.padding.right\r\n if (width === this._recursiveWidth) {\r\n return this\r\n }\r\n this._recursiveWidth = width\r\n\r\n this.children.each(function (i, e) {\r\n if (e.figure.isResizeable() && e.figure.isVisible()) {\r\n e.figure.setDimension(width, e.figure.getMinHeight())\r\n }\r\n })\r\n\r\n delete this._recursiveWidth\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.gap = this.gap\r\n\r\n return memento\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.gap === \"number\") {\r\n this.gap = memento.gap\r\n }\r\n\r\n return this\r\n }\r\n\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A simple Node which has a InputPort and OutputPort. Mainly used for demo and examples.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.node.Between({color: \"#3d3d3d\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.node.Between = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.shape.node.Between.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.node.Between\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#4D90FE\"),\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({\r\n bgColor: this.DEFAULT_COLOR,\r\n color: this.DEFAULT_COLOR.darker(),\r\n width: 50,\r\n height: 50\r\n }, attr), setter, getter)\r\n\r\n this.createPort(\"output\")\r\n this.createPort(\"input\")\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A simple Node which has a InputPort. Mainly used for demo and examples.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.node.End({color: \"#3d3d3d\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.node.End = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.shape.node.End.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.node.End\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#4D90FE\"),\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({\r\n bgColor: this.DEFAULT_COLOR,\r\n color: this.DEFAULT_COLOR.darker(),\r\n width: 50,\r\n height: 50\r\n }, attr), setter, getter)\r\n\r\n this.createPort(\"input\")\r\n\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\nimport jsonUtil from '../../util/JSONUtil'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A horizontal bus shape with a special kind of port handling. The hole figure is a hybrid port.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.add( new draw2d.shape.node.Fulcrum(),50,10);\r\n * canvas.add( new draw2d.shape.node.Fulcrum(),80,100);\r\n * canvas.add( new draw2d.shape.node.Fulcrum(),150,50);\r\n *\r\n * @extends draw2d.shape.node.Hub\r\n */\r\ndraw2d.shape.node.Fulcrum = draw2d.shape.node.Hub.extend(\r\n /** @lends draw2d.shape.node.Fulcrum.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.node.Fulcrum\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 40, height: 40}, attr), setter, getter)\r\n\r\n\r\n this.port.setConnectionAnchor(new draw2d.layout.anchor.ConnectionAnchor(this.port))\r\n this.port.setVisible(true)\r\n this.port.hitTest = this.port._orig_hitTest\r\n\r\n this.setConnectionDirStrategy(0)\r\n this.setColor(null)\r\n this.setRadius(10)\r\n this.setBackgroundColor(null)\r\n this.setStroke(0)\r\n this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n attributes ??= {}\r\n\r\n // set some good defaults if the parent didn't\r\n attributes.fill ??=this.bgColor.rgba()\r\n\r\n return this._super(attributes)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A horizontal bus shape with a special kind of port handling. The hole figure is a hybrid port.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.node.HorizontalBus({width:300, height:20, text:\"Horizontal Bus\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.node.Hub\r\n */\r\ndraw2d.shape.node.HorizontalBus = draw2d.shape.node.Hub.extend(\r\n /** @lends draw2d.shape.node.HorizontalBus.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.node.HorizontalBus\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.setConnectionDirStrategy(1)\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.HBusSelectionFeedbackPolicy())\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\nimport Color from '../../util/Color'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A hub is a shape with a special kind of port handling. The hole figure is a hybrid port. You can drag&drop a Port directly on\r\n * the figure.\r\n *\r\n *\r\n * @example\r\n *\r\n *\r\n * canvas.add(new draw2d.shape.node.Start({x:50, y:50}));\r\n * canvas.add(new draw2d.shape.node.Hub({x:150, y:50}));\r\n *\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.node.Hub = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.shape.node.Hub.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.node.Hub\",\r\n\r\n DEFAULT_COLOR: new Color(\"#4DF0FE\"),\r\n BACKGROUND_COLOR: new Color(\"#29AA77\"),\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.label = null\r\n\r\n this._super(\r\n {\r\n color: this.DEFAULT_COLOR.darker(), \r\n bgColor: this.BACKGROUND_COLOR, \r\n ...attr\r\n },\r\n extend({\r\n // deprecated\r\n label: this.setLabel,\r\n // @attr {String} text the text to display in the center of the hub */\r\n text: this.setLabel\r\n }, setter),\r\n extend({\r\n label: this.getLabel,\r\n text: this.getLabel\r\n }, getter))\r\n\r\n let _port = this.port = this.createPort(\"hybrid\", new draw2d.layout.locator.CenterLocator())\r\n\r\n let r = draw2d.geo.Rectangle\r\n this.CONNECTION_DIR_STRATEGY = [\r\n function (peerPort) {\r\n return _port.getParent().getBoundingBox().getDirection(peerPort.getAbsolutePosition())\r\n },\r\n function (peerPort) {\r\n return _port.getAbsoluteY() > peerPort.getAbsoluteY() ? r.DIRECTION_UP : r.DIRECTION_DOWN\r\n },\r\n function (peerPort) {\r\n return _port.getAbsoluteX() > peerPort.getAbsoluteX() ? r.DIRECTION_LEFT : r.DIRECTION_RIGHT\r\n }]\r\n\r\n // redirect the glow effect and the hitTest for the port to the parent node\r\n //\r\n this.port.setGlow = this.setGlow.bind(this)\r\n this.port._orig_hitTest = this.port.hitTest\r\n this.port.hitTest = this.hitTest.bind(this)\r\n\r\n\r\n // provide a special connection anchor for this port. We use the bounding box of the\r\n // parent as connection border\r\n //\r\n this.port.setConnectionAnchor(new draw2d.layout.anchor.ShortesPathConnectionAnchor(this.port))\r\n this.port.setVisible(false)\r\n this.port.setVisible = function () {\r\n }\r\n\r\n this.setConnectionDirStrategy(0)\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework during drag&drop operations if the user drag a figure over this figure\r\n *\r\n * @param {draw2d.Figure} draggedFigure The figure which is currently dragging\r\n *\r\n * @returns {draw2d.Figure} the figure which should receive the drop event or null if the element didn't want a drop event\r\n **/\r\n delegateTarget: function (draggedFigure) {\r\n // redirect the dragEnter handling to the hybrid port\r\n //\r\n return this.getHybridPort(0).delegateTarget(draggedFigure)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * This value is relevant for the interactive resize of the figure.\r\n *\r\n * @returns {Number} Returns the min. width of this object.\r\n */\r\n getMinWidth: function () {\r\n if (this.label !== null) {\r\n return Math.max(this.label.getMinWidth(), this._super())\r\n }\r\n return this._super()\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n * @private\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n // set some good defaults if the parent didn't\r\n if (typeof attributes.fill === \"undefined\") {\r\n if (this.bgColor !== null) {\r\n attributes.fill = \"90-\" + this.bgColor.hash() + \":5-\" + this.bgColor.lighter(0.3).hash() + \":95\"\r\n } else {\r\n attributes.fill = \"none\"\r\n }\r\n }\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n *\r\n * Set the label for the Hub\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * text: label\r\n * });\r\n *\r\n *\r\n * @param {String} label\r\n * @since 3.0.4\r\n */\r\n setLabel: function (label) {\r\n // Create any Draw2D figure as decoration for the connection\r\n //\r\n if (this.label === null) {\r\n\r\n this.label = new draw2d.shape.basic.Label({text: label, color: \"#0d0d0d\", fontColor: \"#0d0d0d\", stroke: 0})\r\n // add the new decoration to the connection with a position locator.\r\n //\r\n this.add(this.label, new draw2d.layout.locator.CenterLocator())\r\n this.label.setSelectionAdapter( () => this )\r\n this.label.delegateTarget = () => this.port\r\n } else {\r\n this.label.setText(label)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Set the strategy for the connection direction calculation.<br>\r\n * <br>\r\n *\r\n * <ul>\r\n * <li>0 - Use the best/shortest direction (UP/RIGHT/DOWN/LEFT) for the connection routing (default)</li>\r\n * <li>1 - Use UP/DOWN for the connection direction</li>\r\n * <li>2 - Use LEFT/RIGHT</li>\r\n * </ul>\r\n * @param {Number} strategy the connection routing strategy to use\r\n * @since 2.4.3\r\n */\r\n setConnectionDirStrategy: function (strategy) {\r\n switch (strategy) {\r\n case 0:\r\n case 1:\r\n case 2:\r\n this.port.getConnectionDirection = this.CONNECTION_DIR_STRATEGY[strategy]\r\n break\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.dirStrategy = this.CONNECTION_DIR_STRATEGY.indexOf(this.port.getConnectionDirection)\r\n if (this.label !== null) {\r\n memento.label = this.label.getText()\r\n }\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.dirStrategy === \"number\") {\r\n this.setConnectionDirStrategy(memento.dirStrategy)\r\n }\r\n\r\n if (typeof memento.label !== \"undefined\") {\r\n this.setLabel(memento.label)\r\n }\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A Node is the base class for all figures which can have {@link draw2d.Port}s. A {@link draw2d.Port} is the\r\n * anchor for a {@link draw2d.Connection} line.<br><br>A {@link draw2d.Port} is a green dot which can\r\n * be dragged and dropped over another port.<br>\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.Figure\r\n */\r\ndraw2d.shape.node.Node = draw2d.Figure.extend(\r\n /** @lends draw2d.shape.node.Node.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.node.Node\",\r\n\r\n /**\r\n * Creates a new Node element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.inputPorts = new draw2d.util.ArrayList()\r\n this.outputPorts = new draw2d.util.ArrayList()\r\n this.hybridPorts = new draw2d.util.ArrayList()\r\n\r\n // flag which indicates if the figure should read/write ports to\r\n // JSON\r\n this.persistPorts = true\r\n\r\n // Flags just for performance reasons\r\n //\r\n this.portRelayoutRequired = true\r\n\r\n // just for performance reasons\r\n //\r\n this.cachedPorts = null\r\n\r\n this._super(\r\n {width: 50, height: 50, ...attr},\r\n {\r\n // @attr {Number} indicate whenever you want persists the ports too */\r\n persistPorts: this.setPersistPorts,\r\n ...setter\r\n },\r\n {\r\n persistPorts: this.getPersistPorts,\r\n ...getter\r\n })\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Indicates if the node should read/write the ports via the draw2d.Figure.getPersistenAttributes\r\n * to the JSON object\r\n *\r\n * @param {Boolean} flag\r\n * @since 5.0.4\r\n */\r\n setPersistPorts: function (flag) {\r\n this.persistPorts = flag\r\n this.fireEvent(\"change:persistPorts\", {value: this.persistPorts})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Indicates if the figure writes the ports to the JSON structore too.\r\n * Default is \"false\"\r\n *\r\n * @returns {Boolean}\r\n */\r\n getPersistPorts: function () {\r\n return this.persistPorts\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n toFront: function (figure) {\r\n this._super(figure)\r\n\r\n this.getPorts().each((i, port) => {\r\n port.getConnections().each((i, connection) => connection.toFront(figure))\r\n port.toFront(this)\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n toBack: function (figure) {\r\n\r\n this.getPorts().each((i, port) => {\r\n port.getConnections().each((i, connection) => connection.toBack(figure))\r\n port.toBack(figure)\r\n })\r\n\r\n this._super(figure)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setVisible: function (flag, duration) {\r\n // adjust the visibility of the ports to the parent state\r\n //\r\n if (!flag) {\r\n this.getPorts().each( (i, port) => {\r\n port.__initialVisibilityState = port.isVisible()\r\n port.setVisible(false, duration)\r\n })\r\n }\r\n else {\r\n this.getPorts().each( (i, port) => {\r\n if (typeof port.__initialVisibilityState !== \"undefined\") {\r\n port.setVisible(port.__initialVisibilityState, duration)\r\n }\r\n else {\r\n port.setVisible(true, duration)\r\n }\r\n delete port.__initialVisibilityState\r\n })\r\n }\r\n this._super(flag, duration)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return all ports of the node. The results contains\r\n * all ports of the children too per default. Set <b>recursive</b>\r\n * to false to retrieve direct assigned ports only.\r\n *\r\n * @param {Boolean} [recursive] indicates if the method should return children ports too. Default is <b>true</b>\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getPorts: function (recursive) {\r\n\r\n if (typeof recursive === \"boolean\" && recursive === false) {\r\n let ports = new draw2d.util.ArrayList()\r\n ports.addAll(this.inputPorts)\r\n ports.addAll(this.outputPorts)\r\n ports.addAll(this.hybridPorts)\r\n return ports\r\n }\r\n\r\n if (this.cachedPorts === null) {\r\n this.cachedPorts = new draw2d.util.ArrayList()\r\n this.cachedPorts.addAll(this.inputPorts)\r\n this.cachedPorts.addAll(this.outputPorts)\r\n this.cachedPorts.addAll(this.hybridPorts)\r\n\r\n this.children.each((i, e) => {\r\n this.cachedPorts.addAll(e.figure.getPorts())\r\n })\r\n }\r\n return this.cachedPorts\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return all input ports of the node.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getInputPorts: function () {\r\n return this.inputPorts\r\n .clone()\r\n .addAll(this.hybridPorts)\r\n },\r\n\r\n /**\r\n *\r\n * Return all output ports of the node.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getOutputPorts: function () {\r\n return this.outputPorts\r\n .clone()\r\n .addAll(this.hybridPorts)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Clone the figure. <br>\r\n * You must override and implement the methods <b>getPersistentAttributes</b> and <b>setPersistentAttributes</b> for your custom\r\n * figures if the have special attributes.\r\n *\r\n * The clone() method performs a deep copy of the object, meaning that it copies the children, ports and decorations\r\n * per default. You can control the clone procedure with the 'cloneMetaData'.\r\n *\r\n *\r\n * @param {Object} [cloneMetaData] controls the clone procedure\r\n * @param {Boolean} [cloneMetaData.excludeChildren] set it to true if you want exclude the children.\r\n * @param {Boolean} [cloneMetaData.excludePorts] set it to true if you want exclude the ports of the node.\r\n *\r\n * @since 4.1.0\r\n * @experimental\r\n */\r\n clone: function (cloneMetaData) {\r\n cloneMetaData = {excludePorts: false, ...cloneMetaData}\r\n\r\n let clone = this._super(cloneMetaData)\r\n\r\n // remove all ports of the clone. the \"init\" method can have create some. but this must\r\n // removed because we want a clone of an existing figure\r\n //\r\n if (cloneMetaData.excludePorts === false) {\r\n clone.resetPorts()\r\n let ports = this.getPorts(false)\r\n\r\n ports.each(function (i, port) {\r\n let clonePort = port.clone()\r\n let locator = port.getLocator().clone()\r\n clone.addPort(clonePort, locator)\r\n })\r\n }\r\n\r\n return clone\r\n },\r\n\r\n /**\r\n *\r\n * Return the port with the corresponding name.\r\n *\r\n *\r\n * @param {String} portName The name of the port to return.\r\n * @returns {draw2d.Port} Returns the port with the hands over name or null.\r\n **/\r\n getPort: function (portName) {\r\n return this.getPorts().find(e => e.getName() === portName)\r\n },\r\n\r\n /**\r\n *\r\n * Return the input port with the corresponding name.\r\n *\r\n *\r\n * @param {String/Number} portNameOrIndex The name or numeric index of the port to return.\r\n * @returns {draw2d.InputPort} Returns the port with the hands over name or null.\r\n **/\r\n getInputPort: function (portNameOrIndex) {\r\n if (typeof portNameOrIndex === \"number\") {\r\n return this.inputPorts.get(portNameOrIndex)\r\n }\r\n\r\n return this.inputPorts.find( port => port.getName()===portNameOrIndex )\r\n },\r\n\r\n /**\r\n *\r\n * Return the output port with the corresponding name.\r\n *\r\n * @param {String/Number} portNameOrIndex The name or the numeric index of the port to return.\r\n * @returns {draw2d.OutputPort} Returns the port with the hands over name or null.\r\n **/\r\n getOutputPort: function (portNameOrIndex) {\r\n if (typeof portNameOrIndex === \"number\") {\r\n return this.outputPorts.get(portNameOrIndex)\r\n }\r\n\r\n return this.outputPorts.find( port => port.getName()===portNameOrIndex )\r\n },\r\n\r\n /**\r\n *\r\n * Return the input port with the corresponding name.\r\n *\r\n *\r\n * @param {String/Number} portNameOrIndex The name or numeric index of the port to return.\r\n * @returns {draw2d.InputPort} Returns the port with the hands over name or null.\r\n **/\r\n getHybridPort: function (portNameOrIndex) {\r\n if (typeof portNameOrIndex === \"number\") {\r\n return this.hybridPorts.get(portNameOrIndex)\r\n }\r\n\r\n return this.hybridPorts.find( port => port.getName()===portNameOrIndex )\r\n },\r\n\r\n /**\r\n *\r\n * Add a port to this node at the given position.<br>\r\n *\r\n * @param {draw2d.Port} port The new port to add.\r\n * @param {draw2d.layout.locator.Locator} locator The layout for the port.\r\n **/\r\n addPort: function (port, locator) {\r\n if (!(port instanceof draw2d.Port)) {\r\n throw \"Argument is not typeof 'draw2d.Port'. \\nFunction: draw2d.shape.node.Node#addPort\"\r\n }\r\n\r\n // add to the internal cache if already build\r\n if (this.cachedPorts !== null) {\r\n this.cachedPorts.add(port)\r\n }\r\n\r\n this.portRelayoutRequired = true\r\n\r\n if (port instanceof draw2d.InputPort) {\r\n this.inputPorts.add(port)\r\n }\r\n else if (port instanceof draw2d.OutputPort) {\r\n this.outputPorts.add(port)\r\n }\r\n else if (port instanceof draw2d.HybridPort) {\r\n this.hybridPorts.add(port)\r\n }\r\n\r\n if ((typeof locator !== \"undefined\") && (locator instanceof draw2d.layout.locator.Locator)) {\r\n port.setLocator(locator)\r\n }\r\n\r\n port.setParent(this)\r\n port.setCanvas(this.canvas)\r\n\r\n // You can't delete a port with the [DEL] key if a port is a child of a node\r\n port.setDeleteable(false)\r\n\r\n if (this.canvas !== null) {\r\n port.getShapeElement()\r\n this.canvas.registerPort(port)\r\n }\r\n\r\n return port\r\n },\r\n\r\n /**\r\n *\r\n * Remove all ports of this node\r\n *\r\n * @since 5.0.0\r\n * @returns {this}\r\n */\r\n resetPorts: function () {\r\n this.getPorts().each((i, port) => this.removePort(port))\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Removes a port and all related connections from this node.<br>\r\n *\r\n * @param {draw2d.Port} port The port to remove.\r\n * @returns {this}\r\n **/\r\n removePort: function (port) {\r\n this.portRelayoutRequired = true\r\n\r\n this.cachedPorts = null\r\n this.inputPorts.remove(port)\r\n this.outputPorts.remove(port)\r\n this.hybridPorts.remove(port)\r\n\r\n if (port.getCanvas() !== null) {\r\n let canvas = port.getCanvas()\r\n canvas.unregisterPort(port)\r\n // remove the related connections of the port too.\r\n let connections = port.getConnections().clone()\r\n connections.each( (i, connection) => {\r\n canvas.remove(connection)\r\n })\r\n }\r\n\r\n port.setCanvas(null)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Create a standard Port for this element. Inherited class can override this\r\n * method to create its own type of ports.\r\n *\r\n * @param {String} type the type of the requested port. possible [\"input\", \"output\"]\r\n * @param {draw2d.layout.locator.Locator} [locator] the layouter to use for this port\r\n * @template\r\n */\r\n createPort: function (type, locator) {\r\n let newPort = null\r\n let count = 0\r\n\r\n switch (type) {\r\n case \"input\":\r\n newPort = draw2d.Configuration.factory.createInputPort(this)\r\n count = this.inputPorts.getSize()\r\n break\r\n case \"output\":\r\n newPort = draw2d.Configuration.factory.createOutputPort(this)\r\n count = this.outputPorts.getSize()\r\n break\r\n case \"hybrid\":\r\n newPort = draw2d.Configuration.factory.createHybridPort(this)\r\n count = this.hybridPorts.getSize()\r\n break\r\n default:\r\n throw \"Unknown type [\" + type + \"] of port requested\"\r\n }\r\n\r\n newPort.setName(type + count)\r\n\r\n this.addPort(newPort, locator)\r\n // relayout the ports\r\n this.setDimension(this.width, this.height)\r\n\r\n return newPort\r\n },\r\n\r\n /**\r\n *\r\n * Return all connections related to this node.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getConnections: function () {\r\n let connections = new draw2d.util.ArrayList()\r\n let ports = this.getPorts()\r\n for (let i = 0; i < ports.getSize(); i++) {\r\n let port = ports.get(i)\r\n // Do NOT add twice the same connection if it is linking ports from the same node\r\n for (let c = 0, c_size = port.getConnections().getSize(); c < c_size; c++) {\r\n if (!connections.contains(port.getConnections().get(c))) {\r\n connections.add(port.getConnections().get(c))\r\n }\r\n }\r\n }\r\n return connections\r\n },\r\n\r\n\r\n /**\r\n * @returns {this}\r\n */\r\n setCanvas: function (canvas) {\r\n let oldCanvas = this.canvas\r\n this._super(canvas)\r\n\r\n let ports = this.getPorts()\r\n if (oldCanvas !== null) {\r\n ports.each((i, port) => oldCanvas.unregisterPort(port))\r\n }\r\n\r\n if (canvas !== null) {\r\n ports.each((i, port) => {\r\n port.setCanvas(canvas)\r\n canvas.registerPort(port)\r\n })\r\n // relayout the ports\r\n this.setDimension(this.width, this.height)\r\n }\r\n else {\r\n ports.each((i, port) => port.setCanvas(null))\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n * @returns {this}\r\n */\r\n setRotationAngle: function (angle) {\r\n this.portRelayoutRequired = true\r\n this._super(angle)\r\n\r\n this.layoutPorts()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @returns {this}\r\n */\r\n setDimension: function (w, h) {\r\n this.portRelayoutRequired = true\r\n this._super(w, h)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Called if the value of any port has been changed\r\n *\r\n * @param {draw2d.Port} relatedPort\r\n * @template\r\n */\r\n onPortValueChanged: function (relatedPort) {\r\n },\r\n\r\n /**\r\n * @private\r\n * @return {this}\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n this._super(attributes)\r\n this.layoutPorts()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @private\r\n * @returns {this}\r\n */\r\n layoutPorts: function () {\r\n if (this.portRelayoutRequired === false) {\r\n return this//silently\r\n }\r\n this.portRelayoutRequired = false\r\n\r\n // layout the ports\r\n //\r\n this.outputPorts.each((i, port) => port.locator.relocate(i, port))\r\n this.inputPorts.each((i, port) => port.locator.relocate(i, port))\r\n this.hybridPorts.each((i, port) => port.locator.relocate(i, port))\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns the Command to perform the specified Request or null.\r\n *\r\n * @param {draw2d.command.CommandType} request describes the Command being requested\r\n * @returns {draw2d.command.Command} null or a Command\r\n * @private\r\n **/\r\n createCommand: function (request) {\r\n if (request === null) {\r\n return null\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.ROTATE) {\r\n return new draw2d.command.CommandRotate(this, (this.getRotationAngle() + 90) % 360)\r\n }\r\n\r\n\r\n return this._super(request)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n // write all ports to the JSON\r\n //\r\n if (this.persistPorts === true) {\r\n memento.ports = []\r\n this.getPorts().each(function (i, port) {\r\n memento.ports.push(\r\n {...port.getPersistentAttributes(), \r\n name: port.getName(),\r\n port: port.NAME,\r\n locator: port.getLocator().NAME,\r\n locatorAttr: port.getLocator().attr()\r\n }\r\n )\r\n })\r\n }\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.ports !== \"undefined\") {\r\n // we read the ports from the JSON and now we save it to the JSON too.\r\n this.persistPorts = true\r\n\r\n // remove all ports created in the init method\r\n //\r\n this.resetPorts()\r\n\r\n // and restore all ports of the JSON document instead.\r\n //\r\n memento.ports.forEach((e) => {\r\n let locator = Function(`return new ${e.locator}()`)()\r\n if(e.locatorAttr) {\r\n locator.attr(e.locatorAttr)\r\n }\r\n\r\n let port = Function(`return new ${e.port}()`)()\r\n port.setPersistentAttributes(e)\r\n this.addPort(port, locator)\r\n })\r\n }\r\n\r\n return this\r\n }\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A generic Node which has an OutputPort. Mainly used for demos and examples.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.node.Start({color: \"#3d3d3d\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.node.Start = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.shape.node.Start.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.node.Start\",\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#4D90FE\"),\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({\r\n bgColor: this.DEFAULT_COLOR,\r\n color: this.DEFAULT_COLOR.darker(),\r\n width: 50,\r\n height: 50\r\n }, attr), setter, getter)\r\n this.createPort(\"output\")\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A horizontal bus shape with a special kind of port handling. The hole figure is a hybrid port.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.node.VerticalBus({width:40, height:300, text:\"Vertical Bus\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.node.Hub\r\n */\r\ndraw2d.shape.node.VerticalBus = draw2d.shape.node.Hub.extend(\r\n /** @lends draw2d.shape.node.VerticalBus.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.node.VerticalBus\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.setConnectionDirStrategy(2)\r\n this.installEditPolicy(new draw2d.policy.figure.VBusSelectionFeedbackPolicy())\r\n },\r\n\r\n\r\n /**\r\n * \r\n * set the label for the Hub\r\n *\r\n * @param {String} labelString\r\n * @since 3.0.4\r\n */\r\n setLabel: function (labelString) {\r\n let mustAdjustTheAngel = this.label === null\r\n\r\n this._super(labelString)\r\n\r\n if (mustAdjustTheAngel === true && this.label !== null) {\r\n this.label.setRotationAngle(90)\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinHeight: function () {\r\n if (this.shape === null && this.label === null) {\r\n return 0\r\n }\r\n\r\n if (this.label !== null) {\r\n return this.label.getMinWidth()\r\n }\r\n\r\n return this._super()\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n if (this.shape === null && this.label === null) {\r\n return 0\r\n }\r\n\r\n if (this.label !== null) {\r\n return this.label.getMinHeight()\r\n }\r\n\r\n return this._super()\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Simple Post-it like figure with text. Can be used for annotations or documentation.\r\n *\r\n *\r\n * @example\r\n *\r\n * let shape = new draw2d.shape.note.PostIt({\r\n * text:\"This is a simple sticky note\",\r\n * color:\"#000000\",\r\n * padding:20\r\n * });\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Label\r\n */\r\ndraw2d.shape.note.PostIt = draw2d.shape.basic.Label.extend(\r\n /** @lends draw2d.shape.note.PostIt.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.note.PostIt\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.setStroke(1)\r\n this.setBackgroundColor(\"#5b5b5b\")\r\n this.setColor(\"#FFFFFF\")\r\n this.setFontColor(\"#ffffff\")\r\n this.setFontSize(14)\r\n this.setPadding(5)\r\n this.setRadius(5)\r\n }\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * NOT FOR PRODUCTIVE\r\n *\r\n * Checkout [Wikipedia PERT][1] for more information.\r\n * [1] http://en.wikipedia.org/wiki/Program_Evaluation_and_Review_Technique\r\n *\r\n * Double click on the Task name or the top middle number to change the value.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.add( new draw2d.shape.pert.Start(),10,10);\r\n * canvas.add( new draw2d.shape.pert.Activity(),80,130);\r\n * canvas.add( new draw2d.shape.pert.Activity(),180,50);\r\n *\r\n *\r\n *\r\n *\r\n * @extends draw2d.shape.layout.VerticalLayout\r\n */\r\ndraw2d.shape.pert.Activity = draw2d.shape.layout.VerticalLayout.extend(\r\n /** @lends draw2d.shape.pert.Activity.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.pert.Activity\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // shortcut for some callback methods to avoid $.proxy wrapper\r\n let _this = this\r\n\r\n // persistence values for the activity\r\n // will be stored/read in the JSON\r\n this.mementoValues = {\r\n duration: null\r\n }\r\n\r\n // just some color attributes for the rendering/gradient\r\n this.bgColor = new draw2d.util.Color(\"#f3f3f3\")\r\n this.lighterBgColor = this.bgColor.lighter(0.2).rgba()\r\n this.darkerBgColor = this.bgColor.darker(0.2).rgba()\r\n\r\n\r\n this._super(extend({bgColor: this.bgColor, stroke: 2, radius: 2, color: this.darkerBgColor}, attr), setter, getter)\r\n\r\n // Compose the top row of the shape\r\n //\r\n let top = new draw2d.shape.layout.HorizontalLayout({stroke: 0})\r\n\r\n\r\n this.earlyStartLabel = this.createLabel(\"Early Start\").setStroke(0)\r\n\r\n this.durationLabel = new draw2d.shape.basic.Label({\r\n text: \"Duration\",\r\n stroke: 1,\r\n color: this.darkerBgColor,\r\n radius: 0,\r\n bgColor: null,\r\n padding: 5\r\n })\r\n // duration label has a inplaceEditor for the value\r\n this.durationLabel.installEditor(new draw2d.ui.LabelEditor({\r\n onCommit: function (value) {\r\n _this.setDuration(parseFloat(value))\r\n }\r\n }))\r\n\r\n this.earlyEndLabel = this.createLabel({text: \"Early End\", stroke: 0})\r\n\r\n top.add(this.earlyStartLabel)\r\n top.add(this.durationLabel)\r\n top.add(this.earlyEndLabel)\r\n\r\n\r\n // the middle part of the shape\r\n // This part contains the ports for the connection\r\n //\r\n this.activityLabel = new draw2d.shape.basic.Label({\r\n text: \"Activity Name\",\r\n radius: 0,\r\n padding: 10,\r\n color: this.darkerBgColor,\r\n bgColor: null\r\n })\r\n // direct editor for the label\r\n this.activityLabel.installEditor(new draw2d.ui.LabelInplaceEditor())\r\n\r\n this.inputPort = this.activityLabel.createPort(\"input\")\r\n this.inputPort.getActivity = function () {\r\n return _this\r\n }\r\n this.inputPort.onConnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n this.inputPort.onDisconnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n this.inputPort.setValue = function (anyValue) {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n\r\n this.outputPort = this.activityLabel.createPort(\"output\")\r\n this.outputPort.getActivity = function () {\r\n return _this\r\n }\r\n this.outputPort.onConnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n this.outputPort.onDisconnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n\r\n\r\n // the bottom of the activity shape\r\n //\r\n let bottom = new draw2d.shape.layout.HorizontalLayout({stroke: 0})\r\n\r\n\r\n this.lateStartLabel = this.createLabel(\"Late Start\").setStroke(0)\r\n this.stackLabel = this.createLabel(\"Stack\")\r\n this.lateEndLabel = this.createLabel(\"Late End\").setStroke(0)\r\n\r\n bottom.add(this.lateStartLabel)\r\n bottom.add(this.stackLabel)\r\n bottom.add(this.lateEndLabel)\r\n\r\n // finally compose the shape with top/middle/bottom in VerticalLayout\r\n //\r\n this.add(top)\r\n this.add(this.activityLabel)\r\n this.add(bottom)\r\n\r\n\r\n // set some good default value for the activity\r\n //\r\n this.setDuration(1)\r\n },\r\n\r\n /**\r\n * \r\n * Set the duration for the activity. This triggers a complete recalculation of the complete\r\n * diagram. No further calls are required\r\n *\r\n * @param {Number} duration the new Duration for the activity\r\n */\r\n setDuration: function (duration) {\r\n\r\n if (this.mementoValues.duration !== duration) {\r\n // store the new value\r\n this.mementoValues.duration = duration\r\n\r\n // update the labels for duration\r\n this.durationLabel.setText(this.mementoValues.duration)\r\n }\r\n\r\n // calculate the earlyStart and latestEnd and set the labels\r\n //\r\n let start = this.getEarlyStart()\r\n\r\n this.earlyStartLabel.setText(start)\r\n this.earlyEndLabel.setText(start + this.mementoValues.duration)\r\n\r\n // notify all children that a parent value has been changed\r\n // Just knock on the inputPort...\r\n //\r\n let connections = this.outputPort.getConnections()\r\n connections.each(function (i, conn) {\r\n let targetPort = conn.getTarget()\r\n targetPort.setValue()\r\n })\r\n\r\n // propagate the lateFinish up to all parent nodes if we are a leaf\r\n //\r\n if (connections.getSize() === 0) {\r\n let lateFinish = parseFloat(this.earlyEndLabel.getText())\r\n this.setLateFinish(lateFinish)\r\n }\r\n },\r\n\r\n getEarlyEnd: function () {\r\n return this.getEarlyStart() + this.mementoValues.duration\r\n },\r\n\r\n getEarlyStart: function () {\r\n let latestEarlyEnd = 0\r\n\r\n // retrieve the greatest \"earlyStart\" from all parent activities\r\n this.inputPort.getConnections().each(function (i, conn) {\r\n let parentActivity = conn.getSource().getActivity()\r\n latestEarlyEnd = Math.max(latestEarlyEnd, parentActivity.getEarlyEnd())\r\n })\r\n\r\n return latestEarlyEnd\r\n },\r\n\r\n setLateFinish: function (value) {\r\n let lateStart = value - this.mementoValues.duration\r\n\r\n this.lateEndLabel.setText(value)\r\n this.lateStartLabel.setText(lateStart)\r\n this.stackLabel.setText(lateStart - parseFloat(this.earlyStartLabel.getText()))\r\n\r\n let connections = this.inputPort.getConnections()\r\n connections.each(function (i, conn) {\r\n let sourcePort = conn.getSource()\r\n sourcePort.getActivity().setLateFinish(lateStart)\r\n })\r\n },\r\n\r\n /**\r\n * \r\n * help method to create some labels\r\n *\r\n * @param {String} txt the label to display\r\n * @returns {draw2d.shape.basic.Label}\r\n */\r\n createLabel: function (txt) {\r\n let label = new draw2d.shape.basic.Label({text: txt})\r\n label.setStroke(1)\r\n label.setColor(this.darkerBgColor)\r\n label.setRadius(0)\r\n label.setBackgroundColor(null)\r\n label.setPadding(5)\r\n label.setColor(this.bgColor.darker(0.2))\r\n label.onDoubleClick = function (angle) {/* ignore them for the layout elements*/\r\n }\r\n\r\n return label\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setBackgroundColor: function (color) {\r\n this._super(color)\r\n\r\n // calculate the new lighter and darker colors for the gradient\r\n //\r\n this.lighterBgColor = this.bgColor.lighter(0.2).rgba()\r\n this.darkerBgColor = this.bgColor.darker(0.2).rgba()\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n\r\n // repaint can be blocked during deserialization and if the shape\r\n // not part of any canvas.\r\n //\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n\r\n attributes ??= {}\r\n\r\n if (this.getAlpha() < 0.9) {\r\n attributes.fill = this.bgColor.rgba()\r\n }\r\n else {\r\n attributes.fill = [\"90\", this.bgColor.hash(), this.lighterBgColor].join(\"-\")\r\n }\r\n\r\n\r\n this._super(attributes)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * NOT FOR PRODUCTIVE\r\n *\r\n * Checkout [Wikipedia PERT][1] for more information.\r\n *\r\n * Double click on the Task name or the top middle number to change the value.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.add( new draw2d.shape.pert.Start(),10,10);\r\n * canvas.add( new draw2d.shape.pert.Activity(),80,130);\r\n * canvas.add( new draw2d.shape.pert.Activity(),180,50);\r\n *\r\n * [1] http://en.wikipedia.org/wiki/Program_Evaluation_and_Review_Technique\r\n *\r\n * @extends draw2d.shape.layout.VerticalLayout\r\n */\r\ndraw2d.shape.pert.Start = draw2d.shape.layout.VerticalLayout.extend(\r\n /** @lends draw2d.shape.pert.Start.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.pert.Start\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // shortcut for some callback methods to avoid $.proxy wrapper\r\n let _this = this\r\n\r\n // persistence values for the activity\r\n // will be stored/read in the JSON\r\n this.mementoValues = {\r\n duration: null\r\n }\r\n\r\n // just some color attributes for the rendering/gradient\r\n this.bgColor = new draw2d.util.Color(\"#f3f3f3\")\r\n this.lighterBgColor = this.bgColor.lighter(0.2).rgba()\r\n this.darkerBgColor = this.bgColor.darker(0.2).rgba()\r\n\r\n\r\n this._super(extend({bgColor: this.bgColor, stroke: 2, radius: 2, color: this.darkerBgColor}, attr), setter, getter)\r\n\r\n // Compose the top row of the shape\r\n //\r\n let top = new draw2d.shape.layout.HorizontalLayout({stroke: 0})\r\n\r\n\r\n this.durationLabel = new draw2d.shape.basic.Label({\r\n text: \"Duration\",\r\n stroke: 1,\r\n color: this.darkerBgColor,\r\n radius: 0,\r\n bgColor: null,\r\n padding: 5\r\n })\r\n // duration label has a inplaceEditor for the value\r\n this.durationLabel.installEditor(new draw2d.ui.LabelEditor({\r\n text: \"Enter new duration\",\r\n onCommit: function (value) {\r\n _this.setDuration(parseFloat(value))\r\n }\r\n }))\r\n\r\n this.earlyEndLabel = this.createLabel({text: \"Early End\", stroke: 0})\r\n\r\n top.add(this.durationLabel)\r\n top.add(this.earlyEndLabel)\r\n\r\n\r\n // the middle part of the shape\r\n // This part contains the ports for the connection\r\n //\r\n this.activityLabel = new draw2d.shape.basic.Label({\r\n text: \"Start\",\r\n radius: 0,\r\n padding: 10,\r\n color: this.darkerBgColor,\r\n bgColor: null\r\n })\r\n // direct editor for the label\r\n this.activityLabel.installEditor(new draw2d.ui.LabelInplaceEditor())\r\n\r\n this.outputPort = this.activityLabel.createPort(\"output\")\r\n this.outputPort.getActivity = function () {\r\n return _this\r\n }\r\n this.outputPort.onConnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n this.outputPort.onDisconnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n\r\n\r\n // the bottom of the activity shape\r\n //\r\n let bottom = this.createLabel(\" \")\r\n bottom.setPadding(10)\r\n bottom.setStroke(0)\r\n this.lateEndLabel = bottom\r\n\r\n // finally compose the shape with top/middle/bottom in VerticalLayout\r\n //\r\n this.add(top)\r\n this.add(this.activityLabel)\r\n this.add(bottom)\r\n\r\n // set some good default value for the activity\r\n //\r\n this.setDuration(1)\r\n },\r\n\r\n /**\r\n * \r\n * Set the duration for the activity. This triggers a complete recalculation of the complete\r\n * diagram. No further calls are required\r\n *\r\n * @param {Number} duration the new Duration for the activity\r\n */\r\n setDuration: function (duration) {\r\n\r\n if (this.mementoValues.duration !== duration) {\r\n // store the new value\r\n this.mementoValues.duration = duration\r\n\r\n // update the labels for duration\r\n this.durationLabel.setText(this.mementoValues.duration)\r\n }\r\n\r\n this.earlyEndLabel.setText(this.mementoValues.duration)\r\n\r\n // notify all children that a parent value has been changed\r\n // Just knock on the inputPort...\r\n //\r\n let connections = this.outputPort.getConnections()\r\n connections.each(function (i, conn) {\r\n let targetPort = conn.getTarget()\r\n targetPort.setValue()\r\n })\r\n\r\n // propagate the lateFinish up to all parent nodes if we are a leaf\r\n //\r\n if (connections.getSize() === 0) {\r\n let lateFinish = parseFloat(this.earlyEndLabel.getText())\r\n this.setLateFinish(lateFinish)\r\n }\r\n },\r\n\r\n getEarlyEnd: function () {\r\n return this.mementoValues.duration\r\n },\r\n\r\n\r\n setLateFinish: function (value) {\r\n let lateStart = value - this.mementoValues.duration\r\n\r\n this.lateEndLabel.setText(value)\r\n\r\n },\r\n\r\n /**\r\n * \r\n * help method to create some labels\r\n *\r\n * @param {String} txt the label to display\r\n * @returns {draw2d.shape.basic.Label}\r\n */\r\n createLabel: function (txt) {\r\n let label = new draw2d.shape.basic.Label({text: txt})\r\n label.setStroke(1)\r\n label.setColor(this.darkerBgColor)\r\n label.setRadius(0)\r\n label.setBackgroundColor(null)\r\n label.setPadding(5)\r\n label.setColor(this.bgColor.darker(0.2))\r\n label.onDoubleClick = function (angle) {/* ignore them for the layout elements*/\r\n }\r\n\r\n return label\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setBackgroundColor: function (color) {\r\n this._super(color)\r\n\r\n // calculate the new lighter and darker colors for the gradient\r\n //\r\n this.lighterBgColor = this.bgColor.lighter(0.2).rgba()\r\n this.darkerBgColor = this.bgColor.darker(0.2).rgba()\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n\r\n // repaint can be blocked during deserialization and if the shape\r\n // not part of any canvas.\r\n //\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n\r\n attributes ??= {}\r\n\r\n if (this.getAlpha() < 0.9) {\r\n attributes.fill = this.bgColor.rgba()\r\n }\r\n else {\r\n attributes.fill = [\"90\", this.bgColor.hash(), this.lighterBgColor].join(\"-\")\r\n }\r\n\r\n this._super(attributes)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Connection designed for a state diagram with arrow decoration at the\r\n * target of the connection and a label\r\n *\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.state.Start();\r\n * let end = new draw2d.shape.state.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,180);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * let c = new draw2d.shape.state.Connection({\r\n * \t source : start.getOutputPort(0),\r\n * target : end.getInputPort(0)\r\n * });\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n *\r\n * @extends draw2d.Connection\r\n */\r\ndraw2d.shape.state.Connection = draw2d.Connection.extend(\r\n /** @lends draw2d.shape.state.Connection.prototype */\r\n {\r\n NAME: \"draw2d.shape.state.Connection\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#4D90FE\"),\r\n\r\n init: function (attr, setter, getter) {\r\n this._super(extend({router: null, stroke: 2}, attr), setter, getter)\r\n\r\n this.setTargetDecorator(new draw2d.decoration.connection.ArrowDecorator(17, 8))\r\n\r\n\r\n this.label = new draw2d.shape.basic.Label({text: \"label\"})\r\n this.label.setStroke(1)\r\n this.label.setPadding(2)\r\n this.label.setBackgroundColor(\"#f0f0f0\")\r\n this.add(this.label, new draw2d.layout.locator.ParallelMidpointLocator())\r\n\r\n },\r\n /**\r\n * \r\n * Set the text to show if the state shape\r\n *\r\n * @param {String} text\r\n */\r\n setLabel: function (text) {\r\n this.label.setText(text)\r\n\r\n // hide the label if no text available\r\n this.label.setVisible(!(text === null || text === \"\"))\r\n this.fireEvent(\"change:label\", {value: text})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the label of the shape\r\n *\r\n */\r\n getLabel: function () {\r\n return this.label.getText()\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n return extend(this._super(), {\r\n label: this.getLabel()\r\n })\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.label !== \"undefined\") {\r\n this.setLabel(memento.label)\r\n }\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The end node for a state diagram\r\n *\r\n *\r\n * @example\r\n * let end = new draw2d.shape.state.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( end, 230,80);\r\n *\r\n * @extends draw2d.shape.basic.Circle\r\n */\r\ndraw2d.shape.state.End = draw2d.shape.basic.Circle.extend(\r\n /** @lends draw2d.shape.state.End.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.state.End\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#4D90FE\"),\r\n\r\n init: function (attr, setter, getter) {\r\n this.innerCircle = new draw2d.shape.basic.Circle(20)\r\n\r\n this._super(attr, setter, getter)\r\n\r\n this.port = this.createPort(\"input\", new draw2d.layout.locator.TopLocator())\r\n this.port.setConnectionAnchor(new draw2d.layout.anchor.ShortesPathConnectionAnchor(this.port))\r\n\r\n this.setDimension(50, 50)\r\n this.setBackgroundColor(this.DEFAULT_COLOR)\r\n this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy())\r\n\r\n this.innerCircle.setStroke(2)\r\n this.innerCircle.setBackgroundColor(null)\r\n this.add(this.innerCircle, new draw2d.layout.locator.CenterLocator())\r\n\r\n this.setStroke(0)\r\n //this.setColor(this.DEFAULT_COLOR.darker());\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n this.innerCircle.setDimension(this.getWidth() - 10, this.getHeight() - 10)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The start node for a state diagram\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.state.Start({color:\"#3d3d3d\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.state.Start = draw2d.shape.basic.Circle.extend(\r\n /** @lends draw2d.shape.state.Start.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.state.Start\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#3369E8\"),\r\n\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.port = this.createPort(\"output\", new draw2d.layout.locator.BottomLocator())\r\n this.port.setConnectionAnchor(new draw2d.layout.anchor.ShortesPathConnectionAnchor(this.port))\r\n\r\n this.setDimension(50, 50)\r\n this.setBackgroundColor(this.DEFAULT_COLOR)\r\n this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy())\r\n\r\n this.setStroke(0)\r\n //this.setColor(this.DEFAULT_COLOR.darker());\r\n\r\n let label = new draw2d.shape.basic.Label({text: \"START\"})\r\n label.setStroke(0)\r\n label.setFontColor(\"#ffffff\")\r\n label.setFontFamily('\"Open Sans\",sans-serif')\r\n this.add(label, new draw2d.layout.locator.CenterLocator())\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * a state shape for a state diagram\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.state.Start();\r\n * let state = new draw2d.shape.state.State();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( state, 230,180);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * let c = new draw2d.shape.state.Connection({\r\n * \t\tsource : start.getOutputPort(0),\r\n * target : state.getInputPort(0)\r\n * });\r\n *\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n * @extends draw2d.shape.layout.VerticalLayout\r\n */\r\ndraw2d.shape.state.State = draw2d.shape.layout.VerticalLayout.extend(\r\n /** @lends draw2d.shape.state.State.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.state.State\",\r\n\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.port = this.createPort(\"hybrid\", new draw2d.layout.locator.BottomLocator())\r\n this.port.setConnectionAnchor(new draw2d.layout.anchor.ChopboxConnectionAnchor(this.port))\r\n\r\n\r\n this.setBackgroundColor(\"#f3f3f3\")\r\n\r\n // UI representation\r\n this.setStroke(1)\r\n this.setColor(\"#e0e0e0\")\r\n this.setRadius(5)\r\n\r\n // Compose the top row of the shape\r\n //\r\n let top = this.createLabel(\"State\").setStroke(0)\r\n this.label = top\r\n\r\n // the middle part of the shape\r\n // This part contains the ports for the connection\r\n //\r\n let center = new draw2d.shape.basic.Rectangle()\r\n center.getHeight = function () {\r\n return 1\r\n }\r\n center.setMinWidth(90)\r\n center.setColor(\"#e0e0e0\")\r\n\r\n // the bottom of the activity shape\r\n //\r\n let bottom = new draw2d.shape.basic.Rectangle()\r\n bottom.setMinHeight(30)\r\n bottom.setStroke(0)\r\n bottom.setBackgroundColor(null)\r\n\r\n // finally compose the shape with top/middle/bottom in VerticalLayout\r\n //\r\n this.add(top)\r\n this.add(center)\r\n this.add(bottom)\r\n },\r\n\r\n /**\r\n *\r\n * Set the text to show if the state shape\r\n *\r\n * @param {String} text\r\n */\r\n setLabel: function (text) {\r\n this.label.setText(text)\r\n this.fireEvent(\"change:label\", {value: text})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the label of the shape\r\n *\r\n */\r\n getLabel: function () {\r\n return this.label.getText()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * helper method to create some labels\r\n *\r\n * @param {String} txt the label to display\r\n * @returns {draw2d.shape.basic.Label}\r\n * @private\r\n */\r\n createLabel: function (txt) {\r\n let label = new draw2d.shape.basic.Label(txt)\r\n label.setStroke(1)\r\n label.setColor(this.darkerBgColor)\r\n label.setRadius(0)\r\n label.setBackgroundColor(null)\r\n label.setPadding(5)\r\n label.setColor(this.bgColor.darker(0.2))\r\n label.onDoubleClick = function (angle) {/* ignore them for the layout elements*/\r\n }\r\n\r\n return label\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n return extend(this._super(), {\r\n label: this.getLabel()\r\n })\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.label !== \"undefined\") {\r\n this.setLabel(memento.label)\r\n }\r\n\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\nimport {Tweenable} from 'shifty'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * @example\r\n *\r\n * let slider = new draw2d.shape.widget.Slider({width:120, height:20});\r\n * canvas.add( slider,100,60);\r\n *\r\n * @extends draw2d.shape.widget.Widget\r\n */\r\ndraw2d.shape.widget.Slider = draw2d.shape.widget.Widget.extend(\r\n /** @lends draw2d.shape.widget.Slider.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.widget.Slider\",\r\n\r\n DEFAULT_COLOR_THUMB: new draw2d.util.Color(\"#bddf69\"),\r\n DEFAULT_COLOR_BG: new draw2d.util.Color(\"#d3d3d3\"),\r\n\r\n\r\n init: function (attr, setter, getter) {\r\n this.currentValue = 0 // [0..100]\r\n this.slideBoundingBox = new draw2d.geo.Rectangle(0, 0, 10, 20)\r\n this.padding = {top: 4, right: 4, bottom: 4, left: 4}\r\n this.panning = false\r\n this.thumbGrow = 0\r\n\r\n this._super(\r\n {\r\n width: 150,\r\n height: 15,\r\n stroke: 1,\r\n radius: 4,\r\n resizeable: true,\r\n color: this.DEFAULT_COLOR_THUMB,\r\n bgColor: this.DEFAULT_COLOR_BG,\r\n value: 50,\r\n ...attr},\r\n extend({\r\n // @attr {Number} padding the padding in pixel around the text */\r\n padding: this.setPadding,\r\n // @attr {Number} value the new value of the slider. values must be in range of [0..100] */\r\n value: this.setValue\r\n }, setter),\r\n extend({\r\n padding: this.getPadding,\r\n value: this.getValue\r\n }, getter))\r\n\r\n this.setMinHeight(15)\r\n this.setMinWidth(80)\r\n },\r\n\r\n /**\r\n * \r\n * Create the additional elements for the figure\r\n *\r\n */\r\n createSet: function () {\r\n let result = this.canvas.paper.set()\r\n let thumb = this.canvas.paper.rect(0, 0, 10, 20)\r\n thumb.node.style.cursor = \"col-resize\"\r\n result.push(thumb)\r\n\r\n return result\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n this.slideBoundingBox.setBoundary(this.padding.left, 0, this.getWidth() - this.padding.right, this.getHeight())\r\n this.slideBoundingBox.setHeight(this.getHeight() + 1)\r\n\r\n // TODO: and repaint again.....two repaints for one \"setDimension\"....BAD\r\n //\r\n this.repaint()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the padding of the element\r\n *\r\n * // Alternatively you can use the attr method:\r\n * //\r\n * // set the padding for top,left,bottom,right in one call\r\n * figure.attr({\r\n * padding: 3\r\n * });\r\n *\r\n * // update the padding left and top\r\n * figure.attr({\r\n * padding: {left:3, top:30}\r\n * });\r\n *\r\n * @param {Number|Object} padding The new padding\r\n * @since 5.6.0\r\n **/\r\n setPadding: function (padding) {\r\n this.clearCache()\r\n if (typeof padding === \"number\") {\r\n this.padding = {top: padding, right: padding, bottom: padding, left: padding}\r\n }\r\n else {\r\n this.padding = extend(this.padding, padding)\r\n }\r\n this.repaint()\r\n this.fireEvent(\"change:padding\", {value: this.padding})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Get the padding of the element.\r\n *\r\n * @since 5.6.0\r\n **/\r\n getPadding: function () {\r\n return this.padding\r\n },\r\n\r\n /**\r\n * \r\n * Called if the value of the slider has been changed.\r\n *\r\n * @param {Number} value The new value of the slider in percentage [0..100]\r\n * @template\r\n */\r\n onValueChange: function (value) {\r\n },\r\n\r\n /**\r\n * \r\n * Will be called if the drag and drop action begins. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true if the figure accepts dragging\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n // check if the use has been clicked on the thumb.\r\n // Return \"false\" to prevent drag&drop operation.\r\n //\r\n if (this.slideBoundingBox.hitTest(x, y)) {\r\n\r\n this.panningX = x\r\n this.panningY = y\r\n this.panning = true\r\n let tweenable = new Tweenable()\r\n tweenable.tween({\r\n from: {grow: this.thumbGrow},\r\n to: {grow: 10},\r\n duration: 500,\r\n easing: 'easeOutQuart',\r\n step: function (state) {\r\n this.thumbGrow = state.grow\r\n this.repaint()\r\n }.bind(this),\r\n finish: function () {\r\n tweenable.dispose()\r\n }\r\n })\r\n return false\r\n }\r\n\r\n return this._super(x, y, shiftKey, ctrlKey)\r\n },\r\n\r\n /**\r\n * \r\n * Called by the framework if the figure returns false for the drag operation. In this\r\n * case we send a \"panning\" event - mouseDown + mouseMove. This is very useful for\r\n * UI-Widget like slider, spinner,...\r\n *\r\n * @param {Number} dx the x difference between the mouse down operation and now\r\n * @param {Number} dy the y difference between the mouse down operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n */\r\n\r\n\r\n onPanning: function (dx, dy, dx2, dy2) {\r\n // calculate the current position of the mouse pos\r\n //\r\n let width = this.getWidth()\r\n let sliderWidth = width - this.padding.left - this.padding.right\r\n\r\n let figurePos = Math.min(width, Math.max(0, this.panningX + dx))\r\n let sliderPos = Math.min(width - this.padding.left - this.padding.right, figurePos)\r\n\r\n this.setValue(100 / sliderWidth * sliderPos)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onPanningEnd: function () {\r\n this.panning = false\r\n\r\n let tweenable = new Tweenable()\r\n tweenable.tween({\r\n from: {grow: this.thumbGrow},\r\n to: {grow: 0},\r\n duration: 300,\r\n easing: 'easeOutQuart',\r\n step: function (state) {\r\n this.thumbGrow = state.grow\r\n this.repaint()\r\n }.bind(this),\r\n finish: function () {\r\n tweenable.dispose()\r\n }\r\n })\r\n this.thumbGrow = 0\r\n this.repaint()\r\n },\r\n\r\n /**\r\n * \r\n * Set the current value of the slider. Valid values are [0..100]\r\n *\r\n * @param {Number} value values between [0..100]\r\n */\r\n setValue: function (value) {\r\n this.currentValue = Math.min(Math.max(0, (value | 0)), 100)\r\n this.repaint()\r\n this.onValueChange(this.currentValue)\r\n this.fireEvent(\"change:value\", {value: this.currentValue})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Returns the current value of the slider\r\n *\r\n * @since 5.6.0\r\n *\r\n * @returns {Number}\r\n */\r\n getValue: function () {\r\n return this.currentValue\r\n },\r\n\r\n /**\r\n *\r\n * @param attributes\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n // adjust the slider to the current value and the new dimension of the widget\r\n //\r\n let thumbX = (((this.getWidth() - this.padding.left - this.padding.right) / 100 * this.currentValue) + this.padding.left) | 0\r\n this.slideBoundingBox.setX(thumbX)\r\n\r\n\r\n // update slider\r\n //\r\n if (this.svgNodes !== null) {\r\n let attr = this.slideBoundingBox.toJSON()\r\n attr.y -= (this.thumbGrow / 2)\r\n attr.height += this.thumbGrow\r\n attr.fill = this.getColor().rgba()\r\n attr.stroke = this.getColor().darker(0.2).rgba()\r\n attr.r = 4\r\n this.svgNodes.attr(attr)\r\n }\r\n\r\n\r\n attributes.fill = \"90-\" + this.bgColor.hash() + \":5-\" + this.bgColor.lighter(0.3).hash() + \":95\"\r\n attributes.stroke = this.bgColor.darker(0.1).rgba()\r\n\r\n this._super(attributes)\r\n },\r\n\r\n\r\n applyTransformation: function () {\r\n this.svgNodes.transform(\"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n\r\n return this\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Base class for all diagrams.\r\n *\r\n * @extends draw2d.SetFigure\r\n */\r\ndraw2d.shape.widget.Widget = draw2d.SetFigure.extend({\r\n\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Base class for all draw2d.shape.basic.Label editors. The default implementation is to open\r\n * a simple javascript prompt dialog.<br>\r\n * Use LabelInplaceEditor or your own implementation if you need more comfort.\r\n *\r\n * @example\r\n *\r\n * let label = new draw2d.shape.basic.Label({text:\"Double Click on me\"});\r\n *\r\n * label.installEditor(new draw2d.ui.LabelEditor({\r\n * // called after the value has been set to the LabelFigure\r\n * onCommit: $.proxy(function(value){\r\n * alert(\"new value set to:\"+value);\r\n * },this),\r\n * // called if the user abort the operation\r\n * onCancel: function(){\r\n * }\r\n * }));\r\n *\r\n * canvas.add(label,50,10);\r\n *\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.ui.LabelEditor = Class.extend(\r\n /** @lends draw2d.ui.LabelEditor.prototype */\r\n {\r\n NAME: \"draw2d.ui.LabelEditor\",\r\n\r\n /**\r\n *\r\n * @param {Object} attr callback handler and configuration. **{ onCommit:function(){}}, onCancel: function(){}, onStart: function(){}, text:'My Dialog Title' }**\r\n */\r\n init: function (attr) {\r\n this.configuration = {\r\n onCommit: () =>{},\r\n onCancel: () =>{},\r\n onStart: () =>{},\r\n text: \"Value\"\r\n ,...attr}\r\n },\r\n\r\n /**\r\n *\r\n * Trigger the edit of the label text.\r\n *\r\n * @param {draw2d.shape.basic.Label} label the label to edit\r\n */\r\n start: function (label) {\r\n this.configuration.onStart()\r\n let newText = prompt(this.configuration.text, label.getText())\r\n if (newText) {\r\n let cmd = new draw2d.command.CommandAttr(label, {text: newText})\r\n label.getCanvas().getCommandStack().execute(cmd)\r\n\r\n this.configuration.onCommit(label.getText())\r\n } else {\r\n this.configuration.onCancel()\r\n }\r\n }\r\n })\r\n","import draw2d from '../packages'\r\nimport r from \"lib/jquery.autoresize\"\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Inplace editor for draw2d.shape.base.Label\r\n *\r\n * @example\r\n *\r\n * var label = new draw2d.shape.basic.Label({text:\"Double Click on me\"});\r\n *\r\n * label.installEditor(new draw2d.ui.LabelInplaceEditor({\r\n * // called after the value has been set to the LabelFigure\r\n * onCommit: $.proxy(function(value){\r\n * alert(\"new value set to:\"+value);\r\n * },this),\r\n * // called if the user abort the operation\r\n * onCancel: function(){\r\n * }\r\n * }));\r\n *\r\n * canvas.add(label,50,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.ui.LabelEditor\r\n */\r\ndraw2d.ui.LabelInplaceEditor = draw2d.ui.LabelEditor.extend(\r\n /** @lends draw2d.ui.LabelInplaceEditor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.ui.LabelInplaceEditor\",\r\n\r\n init: function (listener) {\r\n this._super();\r\n\r\n // register some default listener and override this with the handover one\r\n this.listener = extend({\r\n onCommit: function () {\r\n },\r\n onCancel: function () {\r\n },\r\n onStart: function () {\r\n }\r\n }, listener);\r\n },\r\n\r\n /**\r\n *\r\n * Trigger the edit of the label text.\r\n *\r\n * @param {draw2d.shape.basic.Label} label the label to edit\r\n */\r\n start: function (label) {\r\n this.label = label;\r\n\r\n this.commitCallback = this.commit.bind(this);\r\n\r\n // commit the editor if the user clicks anywhere in the document\r\n //\r\n $(\"body\").bind(\"click\", this.commitCallback);\r\n\r\n // append the input field to the document and register\r\n // the ENTER and ESC key to commit /cancel the operation\r\n //\r\n this.html = $('<input id=\"inplaceeditor\">');\r\n this.html.val(label.getText());\r\n this.html.hide();\r\n\r\n $(\"body\").append(this.html);\r\n\r\n this.html.autoResize();\r\n\r\n this.html.bind(\"keyup\", function (e) {\r\n switch (e.which) {\r\n case 13:\r\n this.commit();\r\n break;\r\n case 27:\r\n this.cancel();\r\n break;\r\n }\r\n }.bind(this));\r\n\r\n this.html.bind(\"blur\", this.commitCallback);\r\n\r\n // avoid commit of the operation if we click inside the editor\r\n //\r\n this.html.bind(\"click\", function (e) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n });\r\n\r\n // Position the INPUT and init the autoresize of the element\r\n //\r\n var canvas = this.label.getCanvas();\r\n var bb = this.label.getBoundingBox();\r\n\r\n bb.setPosition(canvas.fromCanvasToDocumentCoordinate(bb.x, bb.y));\r\n\r\n // remove the scroll from the body if we add the canvas directly into the body\r\n var scrollDiv = canvas.getScrollArea();\r\n if (scrollDiv.is($(\"body\"))) {\r\n bb.translate(canvas.getScrollLeft(), canvas.getScrollTop());\r\n }\r\n\r\n bb.translate(-1, -1);\r\n bb.resize(2, 2);\r\n\r\n this.html.css({\r\n position: \"absolute\",\r\n \"top\": bb.y,\r\n \"left\": bb.x,\r\n \"min-width\": bb.w * (1 / canvas.getZoom()),\r\n \"height\": Math.max(25, bb.h * (1 / canvas.getZoom()))\r\n });\r\n this.html.fadeIn(() => {\r\n this.html.focus();\r\n this.listener.onStart()\r\n });\r\n },\r\n\r\n /**\r\n *\r\n * Transfer the data from the editor into the label.<br>\r\n * Remove the editor.<br>\r\n *\r\n * @private\r\n */\r\n commit: function () {\r\n this.html.unbind(\"blur\", this.commitCallback);\r\n $(\"body\").unbind(\"click\", this.commitCallback);\r\n var label = this.html.val();\r\n var cmd = new draw2d.command.CommandAttr(this.label, {text: label});\r\n this.label.getCanvas().getCommandStack().execute(cmd);\r\n this.html.fadeOut(() => {\r\n this.html.remove();\r\n this.html = null;\r\n this.listener.onCommit(this.label.getText());\r\n });\r\n },\r\n\r\n /**\r\n *\r\n * Transfer the data from the editor into the label.<br>\r\n * Remove the editor.<br>\r\n * @private\r\n */\r\n cancel: function () {\r\n this.html.unbind(\"blur\", this.commitCallback);\r\n $(\"body\").unbind(\"click\", this.commitCallback);\r\n this.html.fadeOut(() => {\r\n this.html.remove();\r\n this.html = null;\r\n this.listener.onCancel();\r\n });\r\n\r\n }\r\n });\r\n\r\n","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * <Disclaimer> Writing my own class for arrays was one of my worst ideas...\r\n *\r\n * An ArrayList stores a variable number of objects. This is similar to making an array of\r\n * objects, but with an ArrayList, items can be easily added and removed from the ArrayList\r\n * and it is resized dynamically. This can be very convenient, but it's slower than making\r\n * an array of objects when using many elements.\r\n */\r\ndraw2d.util.ArrayList = Class.extend(\r\n /** @lends draw2d.util.ArrayList */\r\n {\r\n\r\n init: function (a) {\r\n if (Array.isArray(a)) {\r\n this.data = a\r\n } else {\r\n this.data = []\r\n }\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Clears the array\r\n *\r\n * @since 6.1.0\r\n * @returns {this}\r\n */\r\n clear: function () {\r\n this.data = []\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Reverses the order of the elements in the ArrayList. The array will be modified!\r\n *\r\n * @returns {this}\r\n */\r\n reverse: function () {\r\n this.data.reverse()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The size/count of the stored objects.\r\n *\r\n * @returns {Number}\r\n */\r\n getSize: function () {\r\n return this.data.length\r\n },\r\n\r\n\r\n /**\r\n *\r\n * checks to see if the Vector has any elements.\r\n *\r\n * @returns {Boolean} true if the list is empty\r\n **/\r\n isEmpty: function () {\r\n return this.getSize() === 0\r\n },\r\n\r\n /**\r\n *\r\n * return the last element.\r\n *\r\n * @returns {Object}\r\n */\r\n last: function () {\r\n return this.data[this.data.length - 1]\r\n },\r\n\r\n /**\r\n *\r\n * Return a reference to the internal javascript native array.\r\n *\r\n * @returns {Array}\r\n */\r\n asArray: function () {\r\n return this.data\r\n },\r\n\r\n /**\r\n *\r\n * returns the first element\r\n *\r\n * @returns {Object}\r\n */\r\n first: function () {\r\n if (this.data.length > 0) {\r\n return this.data[0]\r\n }\r\n return null\r\n },\r\n\r\n\r\n /**\r\n *\r\n * returns an element at a specified index\r\n *\r\n * @param {Number} i\r\n * @returns {Object}\r\n */\r\n get: function (i) {\r\n return this.data[i]\r\n },\r\n\r\n /**\r\n *\r\n * Adds a element at the end of the Vector.\r\n *\r\n * @param {Object} obj the object to add\r\n * @returns {this}\r\n */\r\n add: function (...objs) {\r\n this.data.push(...objs)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * The method modifies the array and removes items from an array as necessary so that all remaining items pass a\r\n * provided test. The test is a function that is passed an array item and the index of the\r\n * item within the array. Only if the test returns true will the item stay in the array.\r\n *\r\n * @param {Function} func the filter function(element,index)\r\n * @param {Object} func.value value of the element in iteration.\r\n * @since 2.0.0\r\n * @returns {this}\r\n */\r\n grep: function (func) {\r\n this.data = this.data.filter(func)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Return ONE element which matches by the given function or <b>null</b>\r\n * if no element is found.\r\n *\r\n * var r1= figures.find(function(figure){\r\n * return figure.id===123456\r\n * });\r\n *\r\n * @param {Function} func the filter function\r\n * @param {Object} func.value value of the element in iteration.\r\n * @param {Object} func.index index of the element in collection.\r\n * @since 2.0.0\r\n */\r\n find: function (func) {\r\n return this.data.find(func)\r\n },\r\n\r\n /**\r\n *\r\n * Translate all items in the array into new items. The array list is modified after this call.\r\n * You must clone the array before if you want avoid this.\r\n *\r\n * var labels = this.commands.clone().map(function(e){\r\n * return e.getLabel();\r\n * });\r\n *\r\n * @param {Function} func The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property.\r\n * @param {Object} func.value value of the element in iteration.\r\n * @param {Number} func.i index of the element in iteration\r\n *\r\n * @since 4.0.0\r\n * @returns {this}\r\n */\r\n map: function (func) {\r\n this.data = this.data.map(func)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Removes any duplicate elements from the array. The array is modified after this call. You\r\n * must clone the array before if you want avoid this\r\n *\r\n * @since 4.0.0\r\n * @returns {this}\r\n */\r\n unique: function () {\r\n this.data = this.data.filter((value, index, self) => self.indexOf(value) === index)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Add all elements into this array.\r\n *\r\n * @param {draw2d.util.ArrayList} list\r\n * @param {Boolean} [avoidDuplicates] checks whenever the new elements exists before insert if the parameter is to [true]\r\n * @returns {this}\r\n */\r\n addAll: function (list, avoidDuplicates) {\r\n if (!(list instanceof draw2d.util.ArrayList)) {\r\n throw \"Unable to handle unknown object type in ArrayList.addAll\"\r\n }\r\n\r\n this.data = this.data.concat(list.data)\r\n if (avoidDuplicates) {\r\n this.unique()\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * You can use the Array list as Stack as well. this is the pop method to remove one element\r\n * at the end of the stack.\r\n *\r\n * @returns {Object} the remove object\r\n */\r\n pop: function () {\r\n return this.removeElementAt(this.data.length - 1)\r\n },\r\n\r\n /**\r\n * Push one element at the top of the stack/array\r\n *\r\n * @param {Object} value The object to add\r\n * @returns {this}\r\n */\r\n push: function (value) {\r\n this.add(value)\r\n },\r\n\r\n /**\r\n *\r\n * Remove the element from the list\r\n *\r\n * @param {Object} obj the object to remove\r\n *\r\n * @returns {Object} the removed object or null\r\n */\r\n remove: function (obj) {\r\n let index = this.indexOf(obj)\r\n if (index >= 0) {\r\n return this.removeElementAt(index)\r\n }\r\n\r\n return null\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Inserts an element at a given position. Existing elements will be shifted\r\n * to the right.\r\n *\r\n * @param {Object} obj the object to insert.\r\n * @param {Number} index the insert position.\r\n * @returns {this}\r\n */\r\n insertElementAt: function (obj, index) {\r\n this.data.splice(index, 0, obj)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Removes an element at a specific index.\r\n *\r\n * @param {Number} index the index of the element to remove\r\n * @returns {Object} the removed object\r\n */\r\n removeElementAt: function (index) {\r\n let element = this.data[index]\r\n\r\n this.data.splice(index, 1)\r\n\r\n return element\r\n },\r\n\r\n /**\r\n *\r\n * removes all given elements in the ArrayList\r\n *\r\n * @param {draw2d.util.ArrayList} elements The elements to remove\r\n * @returns {this}\r\n */\r\n removeAll: function (elements) {\r\n if (elements instanceof draw2d.util.ArrayList) {\r\n elements = elements.data\r\n }\r\n\r\n if (Array.isArray(elements)) {\r\n elements.forEach((e) => {\r\n this.remove(e)\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the zero based index of the given element or -1 if the element\r\n * not in the list.\r\n *\r\n * @param {Object} obj the element to check\r\n *\r\n * @returns {Number} the index of the element or -1\r\n */\r\n indexOf: function (obj) {\r\n return this.data.indexOf(obj)\r\n },\r\n\r\n /**\r\n *\r\n * returns true if the element is in the Vector, otherwise false.\r\n *\r\n * @param {Object} obj the object to check\r\n *\r\n * @returns {Boolean}\r\n */\r\n contains: function (obj) {\r\n return this.data.includes(obj)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Sorts the collection based on a field name or sort a function. See on http://www.w3schools.com/jsref/jsref_sort.asp\r\n * if you use a sort function.\r\n *\r\n * @param {String|Function} f the field name for the sorting or a sort function\r\n *\r\n * @returns {this}\r\n *\r\n */\r\n sort: function (f) {\r\n if (typeof f === \"function\") {\r\n this.data.sort(f)\r\n } else {\r\n this.data.sort(function (a, b) {\r\n if (a[f] < b[f])\r\n return -1\r\n if (a[f] > b[f])\r\n return 1\r\n return 0\r\n })\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Copies the contents of a Vector to another Vector returning the new Vector.\r\n *\r\n * @param {Boolean} [deep] call \"clone\" of each elements and add the clone to the new ArrayList\r\n *\r\n * @returns {draw2d.util.ArrayList} the new ArrayList\r\n */\r\n clone: function (deep) {\r\n let newVector = new draw2d.util.ArrayList()\r\n\r\n\r\n if (deep) {\r\n for (let i = 0; i < this.data.length; i++) {\r\n newVector.data.push(this.data[i].clone())\r\n }\r\n } else {\r\n newVector.data = this.data.slice(0)\r\n }\r\n\r\n return newVector\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Iterates over the list of elements, yielding each in turn to an iterator\r\n * function.\r\n * Each invocation of iterator is called with two arguments: (index, element).\r\n *\r\n * @param {Function} func the callback function to call for each element\r\n * @param {Number} func.i index of the element in iteration\r\n * @param {Object} func.value value of the element in iteration.\r\n * @param {Boolean} [reverse] optional parameter. Iterate the collection reverse if it set to <b>true</b>\r\n * @returns {this}\r\n */\r\n each: function (func, reverse) {\r\n if (typeof reverse !== \"undefined\" && reverse === true) {\r\n for (let i = this.data.length - 1; i >= 0; i--) {\r\n if (func(i, this.data[i]) === false)\r\n break\r\n }\r\n } else {\r\n for (let i = 0; i < this.data.length; i++) {\r\n if (func(i, this.data[i]) === false)\r\n break\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * overwrites the element with an object at the specific index.\r\n *\r\n * @param {Object} obj The object to add\r\n * @param {Number} index the index where the object should places.\r\n *\r\n * @returns {this}\r\n */\r\n overwriteElementAt: function (obj, index) {\r\n this.data[index] = obj\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * @returns {Object} the attributes which are required for persistence\r\n */\r\n getPersistentAttributes: function () {\r\n return {data: this.data}\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this.data = memento.data\r\n\r\n return this\r\n }\r\n })\r\n\r\ndraw2d.util.ArrayList.EMPTY_LIST = new draw2d.util.ArrayList()\r\n\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\ndraw2d.util.Base64 = {\r\n\r\n /**\r\n * Maps bytes to characters.\r\n * @type {Object}\r\n * @private\r\n */\r\n byteToCharMap_ :null,\r\n\r\n\r\n /**\r\n * Maps characters to bytes.\r\n * @type {Object}\r\n * @private\r\n */\r\n charToByteMap_: null,\r\n\r\n\r\n /**\r\n * Maps bytes to websafe characters.\r\n * @type {Object}\r\n * @private\r\n */\r\n byteToCharMapWebSafe_ : null,\r\n\r\n /**\r\n * Maps websafe characters to bytes.\r\n * @type {Object}\r\n * @private\r\n */\r\n charToByteMapWebSafe_ : null,\r\n\r\n\r\n /**\r\n * Our default alphabet, shared between\r\n * ENCODED_VALS and ENCODED_VALS_WEBSAFE\r\n * @type {string}\r\n */\r\n ENCODED_VALS_BASE : 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',\r\n\r\n /**\r\n * Our default alphabet. Value 64 (=) is special; it means \"nothing.\"\r\n * @type {string}\r\n */\r\n ENCODED_VALS : 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' + '+/=',\r\n\r\n\r\n /**\r\n * Our websafe alphabet.\r\n * @type {string}\r\n */\r\n ENCODED_VALS_WEBSAFE :'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' + '-_.',\r\n\r\n\r\n encodeByteArray: function(input, opt_webSafe) {\r\n draw2d.util.Base64.init();\r\n\r\n var byteToCharMap = opt_webSafe ? draw2d.util.Base64.byteToCharMapWebSafe_ : draw2d.util.Base64.byteToCharMap_;\r\n\r\n var output = [];\r\n\r\n for (var i = 0; i < input.length; i += 3) {\r\n var byte1 = input[i];\r\n var haveByte2 = i + 1 < input.length;\r\n var byte2 = haveByte2 ? input[i + 1] : 0;\r\n var haveByte3 = i + 2 < input.length;\r\n var byte3 = haveByte3 ? input[i + 2] : 0;\r\n\r\n var outByte1 = byte1 >> 2;\r\n var outByte2 = ((byte1 & 0x03) << 4) | (byte2 >> 4);\r\n var outByte3 = ((byte2 & 0x0F) << 2) | (byte3 >> 6);\r\n var outByte4 = byte3 & 0x3F;\r\n\r\n if (!haveByte3) {\r\n outByte4 = 64;\r\n\r\n if (!haveByte2) {\r\n outByte3 = 64;\r\n }\r\n }\r\n\r\n output.push(byteToCharMap[outByte1],\r\n byteToCharMap[outByte2],\r\n byteToCharMap[outByte3],\r\n byteToCharMap[outByte4]);\r\n }\r\n\r\n return output.join('');\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Base64-encode a string.\r\n *\r\n * @param {string} input A string to encode.\r\n * @param {boolean=} opt_webSafe If true, we should use the alternative alphabet.\r\n * @returns {string} The base64 encoded string.\r\n */\r\n encode: function(input, opt_webSafe) {\r\n return draw2d.util.Base64.encodeByteArray( draw2d.util.Base64.stringToByteArray(input), opt_webSafe);\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Base64-decode a string.\r\n *\r\n * @param {String} input to decode (length not required to be a multiple of 4).\r\n * @param {boolean=} opt_webSafe True if we should use the\r\n * alternative alphabet.\r\n * @returns {Array} bytes representing the decoded value.\r\n */\r\n decode: function(input, opt_webSafe) {\r\n draw2d.util.Base64.init();\r\n\r\n var charToByteMap = opt_webSafe ?draw2d.util.Base64.charToByteMapWebSafe_ : draw2d.util.Base64.charToByteMap_;\r\n\r\n var output = [];\r\n\r\n for (var i = 0; i < input.length; ) {\r\n var byte1 = charToByteMap[input.charAt(i++)];\r\n\r\n var haveByte2 = i < input.length;\r\n var byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;\r\n ++i;\r\n\r\n var haveByte3 = i < input.length;\r\n var byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 0;\r\n ++i;\r\n\r\n var haveByte4 = i < input.length;\r\n var byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 0;\r\n ++i;\r\n\r\n if (byte1 == null || byte2 == null ||\r\n byte3 == null || byte4 == null) {\r\n throw Error();\r\n }\r\n\r\n var outByte1 = (byte1 << 2) | (byte2 >> 4);\r\n output.push(outByte1);\r\n\r\n if (byte3 != 64) {\r\n var outByte2 = ((byte2 << 4) & 0xF0) | (byte3 >> 2);\r\n output.push(outByte2);\r\n\r\n if (byte4 != 64) {\r\n var outByte3 = ((byte3 << 6) & 0xC0) | byte4;\r\n output.push(outByte3);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Turns a string into an array of bytes; a \"byte\" being a JS number in the\r\n * range 0-255.\r\n * @param {string} str String value to arrify.\r\n * @returns {!Array.<number>} Array of numbers corresponding to the\r\n * UCS character codes of each character in str.\r\n */\r\n stringToByteArray: function(str) {\r\n var output = [], p = 0;\r\n for (var i = 0; i < str.length; i++) {\r\n var c = str.charCodeAt(i);\r\n while (c > 0xff) {\r\n output[p++] = c & 0xff;\r\n c >>= 8;\r\n }\r\n output[p++] = c;\r\n }\r\n return output;\r\n },\r\n\r\n init: function() {\r\n if (!draw2d.util.Base64.byteToCharMap_) {\r\n draw2d.util.Base64.byteToCharMap_ = {};\r\n draw2d.util.Base64.charToByteMap_ = {};\r\n draw2d.util.Base64.byteToCharMapWebSafe_ = {};\r\n draw2d.util.Base64.charToByteMapWebSafe_ = {};\r\n\r\n // We want quick mappings back and forth, so we precompute two maps.\r\n for (var i = 0; i < draw2d.util.Base64.ENCODED_VALS.length; i++) {\r\n draw2d.util.Base64.byteToCharMap_[i] = draw2d.util.Base64.ENCODED_VALS.charAt(i);\r\n draw2d.util.Base64.charToByteMap_[draw2d.util.Base64.byteToCharMap_[i]] = i;\r\n draw2d.util.Base64.byteToCharMapWebSafe_[i] = draw2d.util.Base64.ENCODED_VALS_WEBSAFE.charAt(i);\r\n draw2d.util.Base64.charToByteMapWebSafe_[draw2d.util.Base64.byteToCharMapWebSafe_[i]] = i;\r\n }\r\n }\r\n }\r\n};\r\n","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n * Util class to handle colors in the draw2d enviroment.\r\n *\r\n * @example\r\n * // Create a new Color with RGB values\r\n * var color = new draw2d.util.Color(127,0,0);\r\n *\r\n * // of from a hex string\r\n * var color2 = new draw2d.util.Color(\"#f00000\");\r\n *\r\n * // Create a little bit darker color\r\n * var darkerColor = color.darker(0.2); // 20% darker\r\n *\r\n * // create a optimal text color if 'color' the background color\r\n * // (best in meaning of contrast and readability)\r\n * var fontColor = color.getIdealTextColor();\r\n *\r\n * @param {Number|String|draw2d.util.Color|Array} red\r\n * @param {Number} green\r\n * @param {Number} blue\r\n * @param {Number} [alpha]\r\n */\r\ndraw2d.util.Color = Class.extend(\r\n /** @lends draw2d.util.Color */\r\n {\r\n\r\n init: function(red, green, blue, alpha) {\r\n\r\n this.hashString = null;\r\n\r\n if(typeof red === \"undefined\" || red===null){\r\n this.hashString = \"none\";\r\n }\r\n else if(red instanceof draw2d.util.Color){\r\n if(red.hashString===\"none\"){\r\n this.hashString = \"none\";\r\n }\r\n else{\r\n this.red = red.red;\r\n this.green = red.green;\r\n this.blue = red.blue;\r\n this.alpha = red.alpha;\r\n }\r\n }\r\n else if(typeof red === \"string\")\r\n {\r\n if (red === \"none\") {\r\n this.hashString = \"none\";\r\n }\r\n else {\r\n let rgba = this.hex2rgb(red);\r\n this.red = rgba[0];\r\n this.green = rgba[1];\r\n this.blue = rgba[2];\r\n this.alpha = rgba[3];\r\n }\r\n }\r\n // JSON struct of {red:###, green:###, blue:### }\r\n else if(typeof red === \"object\" && typeof red.red===\"number\")\r\n {\r\n this.red= red.red;\r\n this.green = red.green;\r\n this.blue = red.blue;\r\n this.alpha = red.alpha;\r\n }\r\n // array detection 1\r\n else if(red instanceof Array && red.length===3)\r\n {\r\n this.red= red[0];\r\n this.green = red[1];\r\n this.blue = red[2];\r\n this.alpha = red[3];\r\n }\r\n // array detection 2\r\n else if(typeof red === \"object\" && typeof red.length ===\"number\" && red.length===3)\r\n {\r\n this.red= red[0]\r\n this.green = red[1]\r\n this.blue = red[2]\r\n this.alpha = red[3]\r\n }\r\n else\r\n {\r\n this.red= parseInt(red)\r\n this.green = parseInt(green)\r\n this.blue = parseInt(blue)\r\n this.alpha = (typeof alpha === 'undefined')? 1 : parseFloat(alpha)\r\n }\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Convert the color object into a HTML CSS representation\r\n * @returns {String} the color in rgb(##,##,##) representation\r\n **/\r\n getHTMLStyle: function()\r\n {\r\n if(typeof this.red ===\"undefined\")\r\n return \"rgba(0,0,0,0)\";\r\n\r\n return \"rgba(\"+this.red+\",\"+this.green+\",\"+this.blue+\",\"+this.alpha+\")\"\r\n },\r\n\r\n\r\n /**\r\n * \r\n * The red part of the color.\r\n *\r\n * @returns {Number} the [red] part of the color.\r\n **/\r\n getRed: function()\r\n {\r\n return this.red\r\n },\r\n\r\n\r\n /**\r\n * \r\n * The green part of the color.\r\n *\r\n * @returns {Number} the [green] part of the color.\r\n **/\r\n getGreen: function()\r\n {\r\n return this.green;\r\n },\r\n\r\n\r\n /**\r\n * \r\n * The blue part of the color\r\n *\r\n * @returns {Number} the [blue] part of the color.\r\n **/\r\n getBlue: function()\r\n {\r\n return this.blue;\r\n },\r\n\r\n\r\n /**\r\n * \r\n * The alpha part of the color\r\n *\r\n * @returns {Number} the [alpha] part of the color.\r\n **/\r\n getAlpha: function()\r\n {\r\n return this.alpha;\r\n },\r\n\r\n /**\r\n * \r\n * Returns the ideal Text Color. Useful for font color selection by a given background color.\r\n *\r\n * @returns {draw2d.util.Color} The <i>ideal</i> inverse color.\r\n **/\r\n getIdealTextColor: function()\r\n {\r\n let nThreshold = 105;\r\n let bgDelta = (this.red * 0.299) + (this.green * 0.587) + (this.blue * 0.114);\r\n return (255 - bgDelta < nThreshold) ? new draw2d.util.Color(0,0,0) : new draw2d.util.Color(255,255,255);\r\n },\r\n\r\n /**\r\n * return array of [r,g,b,a] from any valid color. if failed returns [0,0,0,1]\r\n *\r\n * @param hexcolor\r\n * @returns {*}\r\n */\r\n hex2rgb: function(color)\r\n {\r\n if (!color) {\r\n return [0, 0, 0, 1]\r\n }\r\n\r\n if (color.toLowerCase() === 'transparent') {\r\n return [0, 0, 0, 0]\r\n }\r\n\r\n if (color[0] === '#'){\r\n if (color.length < 7){\r\n // convert #RGB and #RGBA to #RRGGBB and #RRGGBBAA\r\n color = '#' + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : '');\r\n }\r\n return [parseInt(color.substr(1, 2), 16),\r\n parseInt(color.substr(3, 2), 16),\r\n parseInt(color.substr(5, 2), 16),\r\n color.length > 7 ? parseInt(color.substr(7, 2), 16)/255 : 1]\r\n }\r\n\r\n if (color.indexOf('rgb') === -1){\r\n // convert named colors\r\n let temp_elem = document.body.appendChild(document.createElement('fictum')); // intentionally use unknown tag to lower chances of css rule override with !important\r\n let flag = 'rgb(1, 2, 3)' // this flag tested on chrome 59, ff 53, ie9, ie10, ie11, edge 14\r\n temp_elem.style.color = flag\r\n if (temp_elem.style.color !== flag) {\r\n return [0, 0, 0, 1] // color set failed - some monstrous css rule is probably taking over the color of our object\r\n }\r\n temp_elem.style.color = color\r\n\r\n if (temp_elem.style.color === flag || temp_elem.style.color === '') {\r\n return [0, 0, 0, 1] // color parse failed\r\n }\r\n color = getComputedStyle(temp_elem).color\r\n document.body.removeChild(temp_elem)\r\n }\r\n\r\n if (color.indexOf('rgb') === 0) {\r\n if (color.indexOf('rgba') === -1) {\r\n color += ',1'; // convert 'rgb(R,G,B)' to 'rgb(R,G,B)A' which looks awful but will pass the regxep below\r\n }\r\n return color.match(/[\\.\\d]+/g).map( a => +a);\r\n }\r\n },\r\n\r\n /**\r\n *\r\n **/\r\n hex: function()\r\n {\r\n return(\r\n this.int2hex(this.red)+\r\n this.int2hex(this.green)+\r\n this.int2hex(this.blue)\r\n // breaks raphaelJS...so don'T use it right now\r\n //(this.alpha * 255).toString(16).substring(0,2).toUpperCase()\r\n );\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Convert the color object into a HTML CSS representation\r\n * @returns {String} the color in rgb(##,##,##) representation\r\n **/\r\n rgba: function()\r\n {\r\n return this.getHTMLStyle()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Convert the color object into a HTML CSS representation\r\n * @returns {String} the color in #RRGGBB representation\r\n **/\r\n hash: function()\r\n {\r\n if(this.hashString===null){\r\n this.hashString= \"#\"+this.hex();\r\n }\r\n return this.hashString;\r\n },\r\n\r\n /**\r\n * @private\r\n */\r\n int2hex: function(v)\r\n {\r\n v=Math.round(Math.min(Math.max(0,v),255));\r\n return(\"0123456789ABCDEF\".charAt((v-v%16)/16)+\"0123456789ABCDEF\".charAt(v%16));\r\n },\r\n\r\n /**\r\n * \r\n * Returns a darker color of the given one. The original color is unchanged.\r\n *\r\n * @param {Number} fraction Darkness fraction between [0..1].\r\n * @return{draw2d.util.Color} Darker color.\r\n */\r\n darker: function(fraction)\r\n {\r\n // we can't \"darker\" a undefined color. In this case we return the undefnied color itself\r\n //\r\n if(this.hashString===\"none\")\r\n return this;\r\n\r\n fraction = (typeof fraction === 'undefined') ? 0.1 : fraction;\r\n\r\n let red = parseInt(Math.round (this.getRed() * (1.0 - fraction)));\r\n let green = parseInt(Math.round (this.getGreen() * (1.0 - fraction)));\r\n let blue = parseInt(Math.round (this.getBlue() * (1.0 - fraction)));\r\n\r\n if (red < 0) red = 0; else if (red > 255) red = 255;\r\n if (green < 0) green = 0; else if (green > 255) green = 255;\r\n if (blue < 0) blue = 0; else if (blue > 255) blue = 255;\r\n\r\n return new draw2d.util.Color(red, green, blue, this.alpha);\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Make a color lighter. The original color is unchanged.\r\n *\r\n * @param {Number} fraction lighter fraction between [0..1].\r\n * @returns {draw2d.util.Color} Lighter color.\r\n */\r\n lighter: function( fraction)\r\n {\r\n // we can't \"lighter\" a undefined color. In this case we return the undefined color itself\r\n //\r\n if(this.hashString===\"none\")\r\n return this;\r\n\r\n fraction = (typeof fraction === 'undefined') ? 0.1 : fraction;\r\n\r\n let red = parseInt(Math.round (this.getRed() * (1.0 + fraction)));\r\n let green = parseInt(Math.round (this.getGreen() * (1.0 + fraction)));\r\n let blue = parseInt(Math.round (this.getBlue() * (1.0 + fraction)));\r\n\r\n if (red < 0) red = 0; else if (red > 255) red = 255;\r\n if (green < 0) green = 0; else if (green > 255) green = 255;\r\n if (blue < 0) blue = 0; else if (blue > 255) blue = 255;\r\n\r\n return new draw2d.util.Color(red, green, blue, this.alpha);\r\n },\r\n\r\n /**\r\n * \r\n * Return a new color wich is faded to the given color.\r\n * @param {draw2d.util.Color} color\r\n * @param {Number} pc the fade percentage in [0..1]\r\n * @returns {draw2d.util.Color}\r\n *\r\n * @since 2.1.0\r\n */\r\n fadeTo: function(color, pc){\r\n\r\n let r= Math.floor(this.red+(pc*(color.red-this.red)) + .5);\r\n let g= Math.floor(this.green+(pc*(color.green-this.green)) + .5);\r\n let b= Math.floor(this.blue+(pc*(color.blue-this.blue)) + .5);\r\n let a= Math.floor(this.alpha+(pc*(color.alpha-this.alpha)) + .5);\r\n\r\n return new draw2d.util.Color(r,g,b,a);\r\n },\r\n\r\n\t/**\r\n\t * \r\n\t * Compares two color objects\r\n\t *\r\n\t * @param {draw2d.util.Color} o\r\n\t * @returns {Boolean}\r\n\t **/\r\n\tequals: function( o)\r\n\t{\r\n\t\tif(!(o instanceof draw2d.util.Color)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn this.rgba()===o.rgba();\r\n\t}\r\n\r\n});\r\n\r\nexport default draw2d.util.Color;\r\n","\r\n\r\n/*!\r\n * JavaScript Debug - v0.4 - 6/22/2010\r\n * http://benalman.com/projects/javascript-debug-console-log/\r\n *\r\n * Copyright (c) 2010 \"Cowboy\" Ben Alman\r\n * Dual licensed under the MIT and GPL licenses.\r\n * http://benalman.com/about/license/\r\n *\r\n * With lots of help from Paul Irish!\r\n * http://paulirish.com/\r\n */\r\n// Script: JavaScript Debug: A simple wrapper for console.log\r\n//\r\n// *Version: 0.4, Last Updated: 6/22/2010*\r\n//\r\n// Tested with Internet Explorer 6-8, Firefox 3-3.6, Safari 3-4, Chrome 3-5, Opera 9.6-10.5\r\n//\r\n// Home - http://benalman.com/projects/javascript-debug-console-log/\r\n// GitHub - http://github.com/cowboy/javascript-debug/\r\n// Source - http://github.com/cowboy/javascript-debug/raw/master/ba-debug.js\r\n// (Minified) - http://github.com/cowboy/javascript-debug/raw/master/ba-debug.min.js (1.1kb)\r\n//\r\n// About: License\r\n//\r\n// Copyright (c) 2010 \"Cowboy\" Ben Alman,\r\n// Dual licensed under the MIT and GPL licenses.\r\n// http://benalman.com/about/license/\r\n//\r\n// About: Support and Testing\r\n//\r\n// Information about what browsers this code has been tested in.\r\n//\r\n// Browsers Tested - Internet Explorer 6-8, Firefox 3-3.6, Safari 3-4, Chrome\r\n// 3-5, Opera 9.6-10.5\r\n//\r\n// About: Examples\r\n//\r\n// These working examples, complete with fully commented code, illustrate a few\r\n// ways in which this plugin can be used.\r\n//\r\n// Examples - http://benalman.com/code/projects/javascript-debug/examples/debug/\r\n//\r\n// About: Revision History\r\n//\r\n// 0.4 - (6/22/2010) Added missing passthrough methods: exception,\r\n// groupCollapsed, table\r\n// 0.3 - (6/8/2009) Initial release\r\n//\r\n// Topic: Pass-through console methods\r\n//\r\n// assert, clear, count, dir, dirxml, exception, group, groupCollapsed,\r\n// groupEnd, profile, profileEnd, table, time, timeEnd, trace\r\n//\r\n// These console methods are passed through (but only if both the console and\r\n// the method exists), so use them without fear of reprisal. Note that these\r\n// methods will not be passed through if the logging level is set to 0 via\r\n// <debug.setLevel>.\r\n\r\nwindow.debug = (function(){\r\n var window = this,\r\n\r\n // Some convenient shortcuts.\r\n aps = Array.prototype.slice,\r\n con = console,\r\n\r\n // Public object to be returned.\r\n that = {},\r\n\r\n callback_func,\r\n callback_force,\r\n\r\n // Default logging level, show everything.\r\n log_level = 9,\r\n\r\n // Logging methods, in \"priority order\". Not all console implementations\r\n // will utilize these, but they will be used in the callback passed to\r\n // setCallback.\r\n log_methods = [ 'error', 'warn', 'info', 'debug', 'log' ],\r\n\r\n // Pass these methods through to the console if they exist, otherwise just\r\n // fail gracefully. These methods are provided for convenience.\r\n pass_methods = 'assert clear count dir dirxml exception group groupCollapsed groupEnd profile profileEnd table time timeEnd trace'.split(' '),\r\n idx = pass_methods.length,\r\n\r\n // Logs are stored here so that they can be recalled as necessary.\r\n logs = [];\r\n\r\n while ( --idx >= 0 ) {\r\n (function( method ){\r\n\r\n // Generate pass-through methods. These methods will be called, if they\r\n // exist, as long as the logging level is non-zero.\r\n that[ method ] = function() {\r\n log_level !== 0 && con && con[ method ]\r\n && con[ method ].apply( con, arguments );\r\n };\r\n\r\n })( pass_methods[idx] );\r\n }\r\n\r\n idx = log_methods.length;\r\n while ( --idx >= 0 ) {\r\n (function( idx, level ){\r\n\r\n // Method: debug.log\r\n //\r\n // Call the console.log method if available. Adds an entry into the logs\r\n // array for a callback specified via <debug.setCallback>.\r\n //\r\n // Usage:\r\n //\r\n // debug.log( object [, object, ...] ); - -\r\n //\r\n // Arguments:\r\n //\r\n // object - (Object) Any valid JavaScript object.\r\n\r\n // Method: debug.debug\r\n //\r\n // Call the console.debug method if available, otherwise call console.log.\r\n // Adds an entry into the logs array for a callback specified via\r\n // <debug.setCallback>.\r\n //\r\n // Usage:\r\n //\r\n // debug.debug( object [, object, ...] ); - -\r\n //\r\n // Arguments:\r\n //\r\n // object - (Object) Any valid JavaScript object.\r\n\r\n // Method: debug.info\r\n //\r\n // Call the console.info method if available, otherwise call console.log.\r\n // Adds an entry into the logs array for a callback specified via\r\n // <debug.setCallback>.\r\n //\r\n // Usage:\r\n //\r\n // debug.info( object [, object, ...] ); - -\r\n //\r\n // Arguments:\r\n //\r\n // object - (Object) Any valid JavaScript object.\r\n\r\n // Method: debug.warn\r\n //\r\n // Call the console.warn method if available, otherwise call console.log.\r\n // Adds an entry into the logs array for a callback specified via\r\n // <debug.setCallback>.\r\n //\r\n // Usage:\r\n //\r\n // debug.warn( object [, object, ...] ); - -\r\n //\r\n // Arguments:\r\n //\r\n // object - (Object) Any valid JavaScript object.\r\n\r\n // Method: debug.error\r\n //\r\n // Call the console.error method if available, otherwise call console.log.\r\n // Adds an entry into the logs array for a callback specified via\r\n // <debug.setCallback>.\r\n //\r\n // Usage:\r\n //\r\n // debug.error( object [, object, ...] ); - -\r\n //\r\n // Arguments:\r\n //\r\n // object - (Object) Any valid JavaScript object.\r\n\r\n that[ level ] = function() {\r\n var args = aps.call( arguments ),\r\n log_arr = [ level ].concat( args );\r\n\r\n logs.push( log_arr );\r\n exec_callback( log_arr );\r\n\r\n if ( !con || !is_level( idx ) ) { return; }\r\n\r\n con.firebug ? con[ level ].apply( window, args )\r\n : con[ level ] ? con[ level ]( args )\r\n : con.log( args );\r\n };\r\n\r\n })( idx, log_methods[idx] );\r\n }\r\n\r\n // Execute the callback function if set.\r\n function exec_callback( args ) {\r\n if ( callback_func && (callback_force || !con || !con.log) ) {\r\n callback_func.apply( window, args );\r\n }\r\n };\r\n\r\n // Method: debug.setLevel\r\n //\r\n // Set a minimum or maximum logging level for the console. Doesn't affect\r\n // the <debug.setCallback> callback function, but if set to 0 to disable\r\n // logging, <Pass-through console methods> will be disabled as well.\r\n //\r\n // Usage:\r\n //\r\n // debug.setLevel( [ level ] ) - -\r\n //\r\n // Arguments:\r\n //\r\n // level - (Number) If 0, disables logging. If negative, shows N lowest\r\n // priority levels of log messages. If positive, shows N highest priority\r\n // levels of log messages.\r\n //\r\n // Priority levels:\r\n //\r\n // log (1) < debug (2) < info (3) < warn (4) < error (5)\r\n\r\n that.setLevel = function( level ) {\r\n log_level = typeof level === 'number' ? level : 9;\r\n };\r\n\r\n // Determine if the level is visible given the current log_level.\r\n function is_level( level ) {\r\n return log_level > 0\r\n ? log_level > level\r\n : log_methods.length + log_level <= level;\r\n };\r\n\r\n // Method: debug.setCallback\r\n //\r\n // Set a callback to be used if logging isn't possible due to console.log\r\n // not existing. If unlogged logs exist when callback is set, they will all\r\n // be logged immediately unless a limit is specified.\r\n //\r\n // Usage:\r\n //\r\n // debug.setCallback( callback [, force ] [, limit ] )\r\n //\r\n // Arguments:\r\n //\r\n // callback - (Function) The aforementioned callback function. The first\r\n // argument is the logging level, and all subsequent arguments are those\r\n // passed to the initial debug logging method.\r\n // force - (Boolean) If false, log to console.log if available, otherwise\r\n // callback. If true, log to both console.log and callback.\r\n // limit - (Number) If specified, number of lines to limit initial scrollback\r\n // to.\r\n\r\n that.setCallback = function() {\r\n var args = aps.call( arguments ),\r\n max = logs.length,\r\n i = max;\r\n\r\n callback_func = args.shift() || null;\r\n callback_force = typeof args[0] === 'boolean' ? args.shift() : false;\r\n\r\n i -= typeof args[0] === 'number' ? args.shift() : max;\r\n\r\n while ( i < max ) {\r\n exec_callback( logs[i++] );\r\n }\r\n };\r\n\r\n return that;\r\n})();\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\ndraw2d.util.JSON = {\r\n\r\n /**\r\n * \r\n * Given a dot deliminated string set will create an object\r\n * based on the structure of the string with the desired value\r\n *\r\n * @param {Object} data the json object to modify\r\n * @param {String} path path indicating where value should be placed\r\n * @param {Object} value the value desired to be set at the location determined by path\r\n */\r\n set: function(data, path, value) {\r\n if(!path || path===''){\r\n return;\r\n }\r\n\r\n let re = /[\\w-]+|\\[\\]|([^\\[[\\w]\\]]|[\"'](.*?)['\"])/g;\r\n // parse path on dots, and brackets\r\n let pathList = path.match(re);\r\n let parent = data;\r\n let parentKey;\r\n let grandParent = null;\r\n let grandParentKey = null;\r\n\r\n let addObj = function(obj, key, data) {\r\n if(key === '[]') {\r\n obj.push(data);\r\n } else {\r\n obj[key] = data;\r\n }\r\n };\r\n\r\n while(pathList.length > 0) {\r\n parentKey = pathList.shift().replace(/[\"']/g, '');\r\n\r\n // Number, treat it as an array\r\n if (!isNaN(+parentKey) || parentKey === \"[]\") {\r\n if(parent.constructor !== Array ) {\r\n parent = [];\r\n addObj(grandParent, grandParentKey, parent);\r\n }\r\n // String, treat it as a key\r\n }\r\n else if (typeof parentKey===\"string\") {\r\n if(!$.isPlainObject(parent)) {\r\n parent = {};\r\n addObj(grandParent, grandParentKey, parent);\r\n }\r\n }\r\n // Next\r\n grandParent = parent;\r\n grandParentKey = parentKey;\r\n parent = parent[parentKey];\r\n }\r\n\r\n addObj(grandParent, grandParentKey, value);\r\n },\r\n\r\n /**\r\n * \r\n * Returns the value defined by the path passed in\r\n *\r\n * @param {Object} data the JSON data object\r\n * @param {String} path string leading to a desired value\r\n */\r\n get: function(data, path) {\r\n let regex = /[\\w-]+|\\[\\]|([^\\[[\\w]\\]]|[\"'](.*?)['\"])/g;\r\n //check if path is truthy\r\n if (!path){\r\n return undefined;\r\n }\r\n //parse path on dots and brackets\r\n let paths = path.match(regex);\r\n //step through data object until all keys in path have been processed\r\n while (data !== null && paths.length > 0) {\r\n if(data.propertyIsEnumerable(paths[0].replace(/\"/g, ''))){\r\n data = data[paths.shift().replace(/\"/g, '')];\r\n }\r\n else{\r\n return undefined;\r\n }\r\n }\r\n return data;\r\n },\r\n\r\n /**\r\n * \r\n * calculates the diff between the given json objects\r\n *\r\n */\r\n diff: function(obj1, obj2) {\r\n let result = {};\r\n for(let key in obj1) {\r\n let v1 = obj1[key];\r\n let v2 = obj2[key];\r\n if(v1 !== v2) {\r\n \tif(v1.equals ){\r\n \t\tif(!v1.equals(v2)){\r\n \t\t\tresult[key] = obj1[key];\r\n \t\t}\r\n \t}\r\n \telse{\r\n \t\t\tresult[key] = obj1[key];\r\n \t}\r\n }\r\n }\r\n return result;\r\n },\r\n\r\n flatDiff: function(obj1, obj2) {\r\n let result = {};\r\n for(let key in obj1) {\r\n if(obj1[key] !== obj2[key]) {\r\n result[key] = obj1[key];\r\n }\r\n }\r\n return result;\r\n },\r\n\r\n ensureDefault:function( json, attribute, value)\r\n {\r\n if (!json.hasOwnProperty(attribute)) {\r\n json[attribute] = value;\r\n }\r\n }\r\n};\r\n\r\nexport default draw2d.util.JSON;\r\n","// avoid iPad bounce effect during DragDrop//\r\ndocument.ontouchmove = function(e){e.preventDefault();};\r\n\r\n\r\n","\r\n// extending raphael with a polygon function\r\nRaphael.fn.polygon = function(pointString) {\r\n var poly = ['M'];\r\n var point = pointString.split(' ');\r\n \r\n for(var i=0; i < point.length; i++) {\r\n var c = point[i].split(',');\r\n for(var j=0; j < c.length; j++) {\r\n var d = parseFloat(c[j]);\r\n if (!isNaN(d))\r\n poly.push(d);\r\n };\r\n if (i == 0)\r\n poly.push('L');\r\n }\r\n poly.push('Z');\r\n \r\n return this.path(poly);\r\n};","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n * Generates a (pseudo) UUID's\r\n *\r\n * @example\r\n * // a UUID in the format\r\n * // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12)\r\n * var id = draw2d.util.UUID.create();\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.util.UUID = {\r\n /**\r\n *\r\n * Generates a unique id.<br>\r\n * But just for the correctness: <strong>this is no Global Unique Identifier</strong>, it is just a random generator\r\n * with the output that looks like a GUID. <br>\r\n * But may be also useful.\r\n *\r\n * @returns {String} the UUID in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12)\r\n **/\r\n create: function () {\r\n let segment = function () {\r\n return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1)\r\n }\r\n return (segment() + segment() + \"-\" + segment() + \"-\" + segment() + \"-\" + segment() + \"-\" + segment() + segment() + segment())\r\n }\r\n}\r\n\r\nexport default draw2d.util.UUID\r\n","\r\n\r\n// Pass in the objects to merge as arguments.// For a deep extend, set the first argument to `true`.\r\nlet fn = function () {\r\n\r\n // Variables\r\n let extended = {}\r\n let deep = false\r\n let i = 0\r\n let length = arguments.length\r\n\r\n // Check if a deep merge\r\n if ( Object.prototype.toString.call( arguments[0] ) === '[object Boolean]' ) {\r\n deep = arguments[0]\r\n i++\r\n }\r\n\r\n // Merge the object into the extended object\r\n /**\r\n *\r\n * @param obj\r\n */\r\n let merge = function (obj) {\r\n for ( let prop in obj ) {\r\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\r\n // If deep merge and property is an object, merge properties\r\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\r\n extended[prop] = extend( true, extended[prop], obj[prop] )\r\n } else {\r\n extended[prop] = obj[prop]\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Loop through each object and conduct a merge\r\n for ( ; i < length; i++ ) {\r\n let obj = arguments[i]\r\n merge(obj)\r\n }\r\n\r\n return extended\r\n\r\n}\r\nmodule.exports = fn\r\nglobal.extend = fn\r\n","/**\r\n * adding support method to check if the node is already visible\r\n **/\r\n(function() {\r\n Raphael.el.isVisible = function() {\r\n return (this.node.style.display !== \"none\");\r\n }\r\n})();\r\n","\r\n\r\n/**\r\n * @class\r\n *\r\n * A bezier spline object.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.util.spline.Spline\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.util.spline.BezierSpline = draw2d.util.spline.Spline.extend(\r\n\r\n /** @lends draw2d.util.spline.BezierSpline.prototype */\r\n {\r\n \r\n NAME: \"draw2d.util.spline.BezierSpline\",\r\n\r\n /**\r\n */\r\n init: function()\r\n {\r\n this._super();\r\n },\r\n\r\n\r\n\r\n /**\r\n * Create a spline based on the given control points.\r\n * The generated curve starts in the first control point and ends\r\n * in the last control point.\r\n *\r\n * @param {Array} controlPoints Control points of spline (x0,y0,z0,x1,y1,z1,...).\r\n * @param {Number} parts Number of parts to divide each leg into.\r\n *\r\n * @returns {Array} the new generated array with new draw2d.geo.Point\r\n */\r\n generate: function(controlPoints, parts)\r\n {\r\n var n = controlPoints.getSize();\r\n // This implementation of an bezier Spline needs at least 4 control points. Return the \r\n // original point if they do not meet them\r\n if(n<4) {\r\n return controlPoints.clone(true)\r\n }\r\n\r\n var spline = new draw2d.util.ArrayList();\r\n\r\n spline.add(this.p(0, 0, controlPoints));\r\n\r\n for (var i = 0; i < n - 3; i += 3) {\r\n for (var j = 1; j <= parts; j++) {\r\n spline.add(this.p (i, j / parts, controlPoints));\r\n }\r\n }\r\n return spline;\r\n },\r\n\r\n p: function( i, t, cp)\r\n {\r\n var x = 0.0;\r\n var y = 0.0;\r\n\r\n var k = i;\r\n for (var j = 0; j <= 3; j++) {\r\n var b = this.blend (j, t);\r\n var p = cp.get(k++);\r\n x += b * p.x;\r\n y += b * p.y;\r\n }\r\n\r\n return new draw2d.geo.Point( x, y);\r\n },\r\n\r\n blend: function ( i, t)\r\n {\r\n if (i == 0) return (1 - t) * (1 - t) * (1 - t);\r\n else if (i == 1) return 3 * t * (1 - t) * (1 - t);\r\n else if (i == 2) return 3 * t * t * (1 - t);\r\n else return t * t * t;\r\n }\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A catmull-rom spline object.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.util.spline.CubicSpline\r\n */\r\ndraw2d.util.spline.CatmullRomSpline = draw2d.util.spline.CubicSpline.extend(\r\n\r\n /** @lends draw2d.util.spline.CatmullRomSpline.prototype */\r\n {\r\n \r\n NAME: \"draw2d.util.spline.CatmullRomSpline\",\r\n\r\n /**\r\n */\r\n init: function()\r\n {\r\n this._super();\r\n },\r\n\r\n\r\n blend: function(i, t) \r\n {\r\n if (i == -2)\r\n return ((-t + 2) * t - 1) * t / 2;\r\n else if (i == -1)\r\n return (((3 * t - 5) * t) * t + 2) / 2;\r\n else if (i == 0)\r\n return ((-3 * t + 4) * t + 1) * t / 2;\r\n else\r\n return ((t - 1) * t * t) / 2;\r\n }\r\n\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A cubic spline object.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.util.spline.Spline\r\n */\r\ndraw2d.util.spline.CubicSpline = draw2d.util.spline.Spline.extend(\r\n\r\n /** @lends draw2d.util.spline.CubicSpline.prototype */\r\n {\r\n \r\n NAME: \"draw2d.util.spline.CubicSpline\",\r\n\r\n /**\r\n */\r\n init: function()\r\n {\r\n this._super();\r\n },\r\n\r\n\r\n /**\r\n * Create a spline based on the given control points.\r\n * The generated curve starts in the first control point and ends\r\n * in the last control point.\r\n *\r\n * @param {Array} controlPoints Control points of spline (x0,y0,z0,x1,y1,z1,...).\r\n * @param {Number} parts Number of parts to divide each leg into.\r\n *\r\n * @returns {Array} the new generated array with new draw2d.geo.Point\r\n */\r\n generate: function(controlPoints, parts)\r\n {\r\n // This implementation of an cubic spline needs at least 3 control points. Return the \r\n // original point if they do not meet them\r\n if(n<3) {\r\n return controlPoints.clone(true)\r\n }\r\n\r\n // Endpoints are added twice to get them include in the\r\n // generated array\r\n var cp = new draw2d.util.ArrayList();\r\n cp.add(controlPoints.get(0));\r\n cp.addAll(controlPoints);\r\n cp.add(controlPoints.get(controlPoints.getSize()-1));\r\n\r\n var n = cp.getSize();\r\n var spline = new draw2d.util.ArrayList();\r\n spline.add(controlPoints.get(0));\r\n spline.add( this.p(1, 0, cp) );\r\n\r\n for (var i = 1; i < n - 2; i++) {\r\n for (var j = 1; j <= parts; j++) {\r\n spline.add( this.p(i, j / parts, cp));\r\n }\r\n }\r\n spline.add(controlPoints.get(controlPoints.getSize()-1));\r\n\r\n return spline;\r\n },\r\n\r\n\r\n p: function( i, t, cp)\r\n {\r\n var x = 0.0;\r\n var y = 0.0;\r\n\r\n var k = i-1;\r\n for (var j = -2; j <= 1; j++) {\r\n var b = this.blend (j, t);\r\n var p = cp.get(k++);\r\n if(!p){\r\n console.log(\"error\")\r\n }\r\n x += b * p.x;\r\n y += b * p.y;\r\n }\r\n\r\n return new draw2d.geo.Point(x, y);\r\n },\r\n\r\n blend: function(i, t)\r\n {\r\n if (i === -2)\r\n return (((-t + 3) * t - 3) * t + 1) / 6;\r\n else if (i === -1)\r\n return (((3 * t - 6) * t) * t + 4) / 6;\r\n else if (i === 0)\r\n return (((-3 * t + 3) * t + 3) * t + 1) / 6;\r\n\r\n return (t * t * t) / 6;\r\n }\r\n\r\n});\r\n","\r\n/**\r\n * @class\r\n *\r\n * An abstract class defining a general spline object.\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.util.spline.Spline = Class.extend(\r\n /** @lends draw2d.util.spline.Spline.prototype */\r\n {\r\n \r\n NAME: \"draw2d.util.spline.Spline\",\r\n\r\n /**\r\n */\r\n init: function()\r\n {\r\n },\r\n\r\n /**\r\n * Create a spline based on the given control points.\r\n * The generated curve starts in the first control point and ends\r\n * in the last control point.\r\n *\r\n * @param {Array} controlPoints Control points of spline (x0,y0,z0,x1,y1,z1,...).\r\n * @param {Number} parts Number of parts to divide each leg into.\r\n **/\r\n generate: function(controlPoints, parts){\r\n throw \"inherit classes must implement the method 'draw2d.util.spline.Spline.generate()'\";\r\n }\r\n\r\n});\r\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"\\r\\n\\r\\n/*!\\r\\n * jQuery contextMenu - Plugin for simple contextMenu handling\\r\\n *\\r\\n * Version: 1.5.24\\r\\n *\\r\\n * Authors: Rodney Rehm, Addy Osmani (patches for FF)\\r\\n * Web: http://medialize.github.com/jQuery-contextMenu/\\r\\n *\\r\\n * Licensed under\\r\\n * MIT License http://www.opensource.org/licenses/mit-license\\r\\n * GPL v3 http://opensource.org/licenses/GPL-3.0\\r\\n *\\r\\n */\\r\\n.context-menu-list {\\r\\n margin:0;\\r\\n padding:0;\\r\\n\\r\\n min-width: 120px;\\r\\n max-width: 250px;\\r\\n display: inline-block;\\r\\n position: absolute;\\r\\n list-style-type: none;\\r\\n\\r\\n border: 1px solid #DDD;\\r\\n background: #EEE;\\r\\n\\r\\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n\\r\\n font-family: Verdana, Arial, Helvetica, sans-serif;\\r\\n font-size: 11px;\\r\\n}\\r\\n\\r\\n.context-menu-item {\\r\\n padding: 2px 2px 2px 24px;\\r\\n background-color: #EEE;\\r\\n position: relative;\\r\\n -webkit-user-select: none;\\r\\n -moz-user-select: -moz-none;\\r\\n -ms-user-select: none;\\r\\n user-select: none;\\r\\n}\\r\\n\\r\\n.context-menu-separator {\\r\\n padding-bottom:0;\\r\\n border-bottom: 1px solid #DDD;\\r\\n}\\r\\n\\r\\n.context-menu-item > label > input,\\r\\n.context-menu-item > label > textarea {\\r\\n -webkit-user-select: text;\\r\\n -moz-user-select: text;\\r\\n -ms-user-select: text;\\r\\n user-select: text;\\r\\n}\\r\\n\\r\\n.context-menu-item.hover {\\r\\n cursor: pointer;\\r\\n background-color: #39F;\\r\\n}\\r\\n\\r\\n.context-menu-item.disabled {\\r\\n color: #666;\\r\\n}\\r\\n\\r\\n.context-menu-input.hover,\\r\\n.context-menu-item.disabled.hover {\\r\\n cursor: default;\\r\\n background-color: #EEE;\\r\\n}\\r\\n\\r\\n.context-menu-submenu:after {\\r\\n content: \\\">\\\";\\r\\n color: #666;\\r\\n position: absolute;\\r\\n top: 0;\\r\\n right: 3px;\\r\\n z-index: 1;\\r\\n}\\r\\n\\r\\n/* icons\\r\\n #protip:\\r\\n In case you want to use sprites for icons (which I would suggest you do) have a look at\\r\\n http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement\\r\\n .context-menu-item.icon:before {}\\r\\n */\\r\\n.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }\\r\\n\\r\\n/* vertically align inside labels */\\r\\n.context-menu-input > label > * { vertical-align: top; }\\r\\n\\r\\n/* position checkboxes and radios as icons */\\r\\n.context-menu-input > label > input[type=\\\"checkbox\\\"],\\r\\n.context-menu-input > label > input[type=\\\"radio\\\"] {\\r\\n margin-left: -17px;\\r\\n}\\r\\n.context-menu-input > label > span {\\r\\n margin-left: 5px;\\r\\n}\\r\\n\\r\\n.context-menu-input > label,\\r\\n.context-menu-input > label > input[type=\\\"text\\\"],\\r\\n.context-menu-input > label > textarea,\\r\\n.context-menu-input > label > select {\\r\\n display: block;\\r\\n width: 100%;\\r\\n\\r\\n -webkit-box-sizing: border-box;\\r\\n -moz-box-sizing: border-box;\\r\\n -ms-box-sizing: border-box;\\r\\n -o-box-sizing: border-box;\\r\\n box-sizing: border-box;\\r\\n}\\r\\n\\r\\n.context-menu-input > label > textarea {\\r\\n height: 100px;\\r\\n}\\r\\n.context-menu-item > .context-menu-list {\\r\\n display: none;\\r\\n /* re-positioned by js */\\r\\n right: -5px;\\r\\n top: 5px;\\r\\n}\\r\\n\\r\\n.context-menu-item.hover > .context-menu-list {\\r\\n display: block;\\r\\n}\\r\\n\\r\\n.context-menu-accesskey {\\r\\n text-decoration: underline;\\r\\n}\\r\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/css/contextmenu.css\"],\"names\":[],\"mappings\":\";;AAEA;;;;;;;;;;;;EAYE;AACF;IACI,QAAQ;IACR,SAAS;;IAET,gBAAgB;IAChB,gBAAgB;IAChB,qBAAqB;IACrB,kBAAkB;IAClB,qBAAqB;;IAErB,sBAAsB;IACtB,gBAAgB;;IAEhB,gDAAgD;OAC7C,6CAA6C;QAC5C,4CAA4C;SAC3C,2CAA2C;YACxC,wCAAwC;;IAEhD,kDAAkD;IAClD,eAAe;AACnB;;AAEA;IACI,yBAAyB;IACzB,sBAAsB;IACtB,kBAAkB;IAClB,yBAAyB;OACtB,2BAA2B;QAC1B,qBAAqB;YACjB,iBAAiB;AAC7B;;AAEA;IACI,gBAAgB;IAChB,6BAA6B;AACjC;;AAEA;;IAEI,yBAAyB;OACtB,sBAAsB;QACrB,qBAAqB;YACjB,iBAAiB;AAC7B;;AAEA;IACI,eAAe;IACf,sBAAsB;AAC1B;;AAEA;IACI,WAAW;AACf;;AAEA;;IAEI,eAAe;IACf,sBAAsB;AAC1B;;AAEA;IACI,YAAY;IACZ,WAAW;IACX,kBAAkB;IAClB,MAAM;IACN,UAAU;IACV,UAAU;AACd;;AAEA;;;;;EAKE;AACF,0BAA0B,gBAAgB,EAAE,4BAA4B,EAAE,4BAA4B,EAAE;;AAExG,mCAAmC;AACnC,kCAAkC,mBAAmB,EAAE;;AAEvD,4CAA4C;AAC5C;;IAEI,kBAAkB;AACtB;AACA;IACI,gBAAgB;AACpB;;AAEA;;;;IAII,cAAc;IACd,WAAW;;IAEX,8BAA8B;OAC3B,2BAA2B;QAC1B,0BAA0B;SACzB,yBAAyB;YACtB,sBAAsB;AAClC;;AAEA;IACI,aAAa;AACjB;AACA;IACI,aAAa;IACb,wBAAwB;IACxB,WAAW;IACX,QAAQ;AACZ;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,0BAA0B;AAC9B\",\"sourcesContent\":[\"\\r\\n\\r\\n/*!\\r\\n * jQuery contextMenu - Plugin for simple contextMenu handling\\r\\n *\\r\\n * Version: 1.5.24\\r\\n *\\r\\n * Authors: Rodney Rehm, Addy Osmani (patches for FF)\\r\\n * Web: http://medialize.github.com/jQuery-contextMenu/\\r\\n *\\r\\n * Licensed under\\r\\n * MIT License http://www.opensource.org/licenses/mit-license\\r\\n * GPL v3 http://opensource.org/licenses/GPL-3.0\\r\\n *\\r\\n */\\r\\n.context-menu-list {\\r\\n margin:0;\\r\\n padding:0;\\r\\n\\r\\n min-width: 120px;\\r\\n max-width: 250px;\\r\\n display: inline-block;\\r\\n position: absolute;\\r\\n list-style-type: none;\\r\\n\\r\\n border: 1px solid #DDD;\\r\\n background: #EEE;\\r\\n\\r\\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n\\r\\n font-family: Verdana, Arial, Helvetica, sans-serif;\\r\\n font-size: 11px;\\r\\n}\\r\\n\\r\\n.context-menu-item {\\r\\n padding: 2px 2px 2px 24px;\\r\\n background-color: #EEE;\\r\\n position: relative;\\r\\n -webkit-user-select: none;\\r\\n -moz-user-select: -moz-none;\\r\\n -ms-user-select: none;\\r\\n user-select: none;\\r\\n}\\r\\n\\r\\n.context-menu-separator {\\r\\n padding-bottom:0;\\r\\n border-bottom: 1px solid #DDD;\\r\\n}\\r\\n\\r\\n.context-menu-item > label > input,\\r\\n.context-menu-item > label > textarea {\\r\\n -webkit-user-select: text;\\r\\n -moz-user-select: text;\\r\\n -ms-user-select: text;\\r\\n user-select: text;\\r\\n}\\r\\n\\r\\n.context-menu-item.hover {\\r\\n cursor: pointer;\\r\\n background-color: #39F;\\r\\n}\\r\\n\\r\\n.context-menu-item.disabled {\\r\\n color: #666;\\r\\n}\\r\\n\\r\\n.context-menu-input.hover,\\r\\n.context-menu-item.disabled.hover {\\r\\n cursor: default;\\r\\n background-color: #EEE;\\r\\n}\\r\\n\\r\\n.context-menu-submenu:after {\\r\\n content: \\\">\\\";\\r\\n color: #666;\\r\\n position: absolute;\\r\\n top: 0;\\r\\n right: 3px;\\r\\n z-index: 1;\\r\\n}\\r\\n\\r\\n/* icons\\r\\n #protip:\\r\\n In case you want to use sprites for icons (which I would suggest you do) have a look at\\r\\n http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement\\r\\n .context-menu-item.icon:before {}\\r\\n */\\r\\n.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }\\r\\n\\r\\n/* vertically align inside labels */\\r\\n.context-menu-input > label > * { vertical-align: top; }\\r\\n\\r\\n/* position checkboxes and radios as icons */\\r\\n.context-menu-input > label > input[type=\\\"checkbox\\\"],\\r\\n.context-menu-input > label > input[type=\\\"radio\\\"] {\\r\\n margin-left: -17px;\\r\\n}\\r\\n.context-menu-input > label > span {\\r\\n margin-left: 5px;\\r\\n}\\r\\n\\r\\n.context-menu-input > label,\\r\\n.context-menu-input > label > input[type=\\\"text\\\"],\\r\\n.context-menu-input > label > textarea,\\r\\n.context-menu-input > label > select {\\r\\n display: block;\\r\\n width: 100%;\\r\\n\\r\\n -webkit-box-sizing: border-box;\\r\\n -moz-box-sizing: border-box;\\r\\n -ms-box-sizing: border-box;\\r\\n -o-box-sizing: border-box;\\r\\n box-sizing: border-box;\\r\\n}\\r\\n\\r\\n.context-menu-input > label > textarea {\\r\\n height: 100px;\\r\\n}\\r\\n.context-menu-item > .context-menu-list {\\r\\n display: none;\\r\\n /* re-positioned by js */\\r\\n right: -5px;\\r\\n top: 5px;\\r\\n}\\r\\n\\r\\n.context-menu-item.hover > .context-menu-list {\\r\\n display: block;\\r\\n}\\r\\n\\r\\n.context-menu-accesskey {\\r\\n text-decoration: underline;\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n if (!object) {\n object = root;\n }\n object.requestAnimationFrame = raf\n object.cancelAnimationFrame = caf\n}\n","module.exports = \"/* \\r\\n * Simple JavaScript Inheritance \\r\\n * By John Resig http://ejohn.org/ \\r\\n * MIT Licensed. \\r\\n * \\r\\n ****************************************************** \\r\\n * Example Usage \\r\\n ****************************************************** \\r\\n var Person = Class.extend({ \\r\\n init: function(isDancing){ \\r\\n this.dancing = isDancing; \\r\\n }, \\r\\n dance: function(){ \\r\\n return this.dancing; \\r\\n } \\r\\n}); \\r\\n\\r\\nvar Ninja = Person.extend({ \\r\\n init: function(){ \\r\\n this._super( false ); \\r\\n }, \\r\\n dance: function(){ \\r\\n // Call the inherited version of dance() \\r\\n return this._super(); \\r\\n }, \\r\\n swingSword: function(){ \\r\\n return true; \\r\\n } \\r\\n}); \\r\\n\\r\\nvar p = new Person(true); \\r\\np.dance(); // => true \\r\\n\\r\\nvar n = new Ninja(); \\r\\nn.dance(); // => false \\r\\nn.swingSword(); // => true \\r\\n\\r\\n// Should all be true \\r\\np instanceof Person && p instanceof Class && \\r\\nn instanceof Ninja && n instanceof Person && n instanceof Class \\r\\n\\r\\n ****************************************************** \\r\\n */ \\r\\n \\r\\n// Inspired by base2 and Prototype \\r\\n(function(){ \\r\\n var fnTest = /xyz/.test(function(){xyz;}) ? /\\\\b_super\\\\b/ : /.*/; \\r\\n\\r\\n // The base Class implementation (does nothing) \\r\\n this.Class = function(){}; \\r\\n \\r\\n\\r\\n // Create a new Class that inherits from this class \\r\\n Class.extend = function(prop) { \\r\\n var _super = this.prototype; \\r\\n \\r\\n // Instantiate a base class (but only create the instance, \\r\\n // don't run the init constructor) \\r\\n initializing = true; \\r\\n var prototype = new this(); \\r\\n initializing = false; \\r\\n \\r\\n \\r\\n // Copy the properties over onto the new prototype \\r\\n for (var name in prop) { \\r\\n // Check if we're overwriting an existing function \\r\\n prototype[name] = typeof prop[name] == \\\"function\\\" && \\r\\n typeof _super[name] == \\\"function\\\" && fnTest.test(prop[name]) ? \\r\\n (function(name, fn){ \\r\\n return function() { \\r\\n var tmp = this._super; \\r\\n \\r\\n // Add a new ._super() method that is the same method \\r\\n // but on the super-class \\r\\n this._super = _super[name]; \\r\\n \\r\\n // The method only need to be bound temporarily, so we \\r\\n // remove it when we're done executing \\r\\n var ret = fn.apply(this, arguments); \\r\\n this._super = tmp; \\r\\n \\r\\n return ret; \\r\\n }; \\r\\n })(name, prop[name]) : \\r\\n prop[name]; \\r\\n } \\r\\n \\r\\n // The dummy class constructor \\r\\n function Class() { \\r\\n // All construction is actually done in the init method \\r\\n if ( !initializing && this.init ) \\r\\n this.init.apply(this, arguments); \\r\\n } \\r\\n \\r\\n // Populate our constructed prototype object \\r\\n Class.prototype = prototype; \\r\\n \\r\\n // Enforce the constructor to be what we expect \\r\\n Class.prototype.constructor = Class; \\r\\n\\r\\n // And make this class extendable \\r\\n Class.extend = arguments.callee; \\r\\n \\r\\n // EXTENSION BY Draw2D.org to inject methods into an existing class to provide plugins or \\r\\n // bugfixes for further releases \\r\\n // \\r\\n Class.inject = function (prop) { \\r\\n var proto = this.prototype; \\r\\n var parent = {}; \\r\\n for (var name in prop) { \\r\\n if (typeof (prop[name]) == \\\"function\\\" && typeof (proto[name]) == \\\"function\\\" && fnTest.test(prop[name])) { \\r\\n parent[name] = proto[name]; \\r\\n proto[name] = (function (name, fn) { \\r\\n return function () { \\r\\n var tmp = this.parent; \\r\\n this.parent = parent[name]; \\r\\n var ret = fn.apply(this, arguments); \\r\\n this.parent = tmp; \\r\\n return ret; \\r\\n }; \\r\\n })(name, prop[name]); \\r\\n } else { \\r\\n proto[name] = prop[name]; \\r\\n } \\r\\n } \\r\\n }; \\r\\n \\r\\n return Class; \\r\\n }; \\r\\n})();\\r\\n \\r\\n\"","module.exports = \"var PF=function(){var e=function(t,n){var r=e.resolve(t,n||\\\"/\\\"),i=e.modules[r];if(!i)throw new Error(\\\"Failed to resolve module \\\"+t+\\\", tried \\\"+r);var s=i._cached?i._cached:i();return s};return e.paths=[],e.modules={},e.extensions=[\\\".js\\\",\\\".coffee\\\"],e._core={assert:!0,events:!0,fs:!0,path:!0,vm:!0},e.resolve=function(){return function(t,n){function u(t){if(e.modules[t])return t;for(var n=0;n<e.extensions.length;n++){var r=e.extensions[n];if(e.modules[t+r])return t+r}}function a(t){t=t.replace(/\\\\/+$/,\\\"\\\");var n=t+\\\"/package.json\\\";if(e.modules[n]){var i=e.modules[n](),s=i.browserify;if(typeof s==\\\"object\\\"&&s.main){var o=u(r.resolve(t,s.main));if(o)return o}else if(typeof s==\\\"string\\\"){var o=u(r.resolve(t,s));if(o)return o}else if(i.main){var o=u(r.resolve(t,i.main));if(o)return o}}return u(t+\\\"/index\\\")}function f(e,t){var n=l(t);for(var r=0;r<n.length;r++){var i=n[r],s=u(i+\\\"/\\\"+e);if(s)return s;var o=a(i+\\\"/\\\"+e);if(o)return o}var s=u(e);if(s)return s}function l(e){var t;e===\\\"/\\\"?t=[\\\"\\\"]:t=r.normalize(e).split(\\\"/\\\");var n=[];for(var i=t.length-1;i>=0;i--){if(t[i]===\\\"node_modules\\\")continue;var s=t.slice(0,i+1).join(\\\"/\\\")+\\\"/node_modules\\\";n.push(s)}return n}n||(n=\\\"/\\\");if(e._core[t])return t;var r=e.modules.path();n=r.resolve(\\\"/\\\",n);var i=n||\\\"/\\\";if(t.match(/^(?:\\\\.\\\\.?\\\\/|\\\\/)/)){var s=u(r.resolve(i,t))||a(r.resolve(i,t));if(s)return s}var o=f(t,i);if(o)return o;throw new Error(\\\"Cannot find module '\\\"+t+\\\"'\\\")}}(),e.alias=function(t,n){var r=e.modules.path(),i=null;try{i=e.resolve(t+\\\"/package.json\\\",\\\"/\\\")}catch(s){i=e.resolve(t,\\\"/\\\")}var o=r.dirname(i),u=(Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t})(e.modules);for(var a=0;a<u.length;a++){var f=u[a];if(f.slice(0,o.length+1)===o+\\\"/\\\"){var l=f.slice(o.length);e.modules[n+l]=e.modules[o+l]}else f===o&&(e.modules[n]=e.modules[o])}},e.define=function(t,n){var r=e._core[t]?\\\"\\\":e.modules.path().dirname(t),i=function(t){return e(t,r)};i.resolve=function(t){return e.resolve(t,r)},i.modules=e.modules,i.define=e.define;var s={exports:{}};e.modules[t]=function(){return e.modules[t]._cached=s.exports,n.call(s.exports,i,s,s.exports,r,t),e.modules[t]._cached=s.exports,s.exports}},typeof process==\\\"undefined\\\"&&(process={}),process.nextTick||(process.nextTick=function(){var e=[],t=typeof window!=\\\"undefined\\\"&&window.postMessage&&window.addEventListener;return t&&window.addEventListener(\\\"message\\\",function(t){if(t.source===window&&t.data===\\\"browserify-tick\\\"){t.stopPropagation();if(e.length>0){var n=e.shift();n()}}},!0),function(n){t?(e.push(n),window.postMessage(\\\"browserify-tick\\\",\\\"*\\\")):setTimeout(n,0)}}()),process.title||(process.title=\\\"browser\\\"),process.binding||(process.binding=function(t){if(t===\\\"evals\\\")return e(\\\"vm\\\");throw new Error(\\\"No such module\\\")}),process.cwd||(process.cwd=function(){return\\\".\\\"}),process.env||(process.env={}),process.argv||(process.argv=[]),e.define(\\\"path\\\",function(e,t,n,r,i){function s(e,t){var n=[];for(var r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}function o(e,t){var n=0;for(var r=e.length;r>=0;r--){var i=e[r];i==\\\".\\\"?e.splice(r,1):i===\\\"..\\\"?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift(\\\"..\\\");return e}var u=/^(.+\\\\/(?!$)|\\\\/)?((?:.+?)?(\\\\.[^.]*)?)$/;n.resolve=function(){var e=\\\"\\\",t=!1;for(var n=arguments.length;n>=-1&&!t;n--){var r=n>=0?arguments[n]:process.cwd();if(typeof r!=\\\"string\\\"||!r)continue;e=r+\\\"/\\\"+e,t=r.charAt(0)===\\\"/\\\"}return e=o(s(e.split(\\\"/\\\"),function(e){return!!e}),!t).join(\\\"/\\\"),(t?\\\"/\\\":\\\"\\\")+e||\\\".\\\"},n.normalize=function(e){var t=e.charAt(0)===\\\"/\\\",n=e.slice(-1)===\\\"/\\\";return e=o(s(e.split(\\\"/\\\"),function(e){return!!e}),!t).join(\\\"/\\\"),!e&&!t&&(e=\\\".\\\"),e&&n&&(e+=\\\"/\\\"),(t?\\\"/\\\":\\\"\\\")+e},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(s(e,function(e,t){return e&&typeof e==\\\"string\\\"}).join(\\\"/\\\"))},n.dirname=function(e){var t=u.exec(e)[1]||\\\"\\\",n=!1;return t?t.length===1||n&&t.length<=3&&t.charAt(1)===\\\":\\\"?t:t.substring(0,t.length-1):\\\".\\\"},n.basename=function(e,t){var n=u.exec(e)[2]||\\\"\\\";return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return u.exec(e)[3]||\\\"\\\"}}),e.define(\\\"/core/Node.js\\\",function(e,t,n,r,i){function s(e,t,n){this.x=e,this.y=t,this.walkable=n===undefined?!0:n}t.exports=s}),e.define(\\\"/core/Grid.js\\\",function(e,t,n,r,i){function o(e,t,n){this.width=e,this.height=t,this.nodes=this._buildNodes(e,t,n)}var s=e(\\\"./Node\\\");o.prototype._buildNodes=function(e,t,n){var r,i,o=new Array(t),u;for(r=0;r<t;++r){o[r]=new Array(e);for(i=0;i<e;++i)o[r][i]=new s(i,r)}if(n===undefined)return o;if(n.length!==t||n[0].length!==e)throw new Error(\\\"Matrix size does not fit\\\");for(r=0;r<t;++r)for(i=0;i<e;++i)n[r][i]&&(o[r][i].walkable=!1);return o},o.prototype.getNodeAt=function(e,t){return this.nodes[t][e]},o.prototype.isWalkableAt=function(e,t){return this.isInside(e,t)&&this.nodes[t][e].walkable},o.prototype.isInside=function(e,t){return e>=0&&e<this.width&&t>=0&&t<this.height},o.prototype.setWalkableAt=function(e,t,n){this.nodes[t][e].walkable=n},o.prototype.getNeighbors=function(e,t,n){var r=e.x,i=e.y,s=[],o=!1,u=!1,a=!1,f=!1,l=!1,c=!1,h=!1,p=!1,d=this.nodes;return this.isWalkableAt(r,i-1)&&(s.push(d[i-1][r]),o=!0),this.isWalkableAt(r+1,i)&&(s.push(d[i][r+1]),a=!0),this.isWalkableAt(r,i+1)&&(s.push(d[i+1][r]),l=!0),this.isWalkableAt(r-1,i)&&(s.push(d[i][r-1]),h=!0),t?(n?(u=h&&o,f=o&&a,c=a&&l,p=l&&h):(u=h||o,f=o||a,c=a||l,p=l||h),u&&this.isWalkableAt(r-1,i-1)&&s.push(d[i-1][r-1]),f&&this.isWalkableAt(r+1,i-1)&&s.push(d[i-1][r+1]),c&&this.isWalkableAt(r+1,i+1)&&s.push(d[i+1][r+1]),p&&this.isWalkableAt(r-1,i+1)&&s.push(d[i+1][r-1]),s):s},o.prototype.clone=function(){var e,t,n=this.width,r=this.height,i=this.nodes,u=new o(n,r),a=new Array(r),f;for(e=0;e<r;++e){a[e]=new Array(n);for(t=0;t<n;++t)a[e][t]=new s(t,e,i[e][t].walkable)}return u.nodes=a,u},t.exports=o}),e.define(\\\"/core/Heap.js\\\",function(e,t,n,r,i){(function(){var e,n,r,i,s,o,u,a,f,l,c,h,p,d,v;r=Math.floor,l=Math.min,n=function(e,t){return e<t?-1:e>t?1:0},f=function(e,t,i,s,o){var u;i==null&&(i=0),o==null&&(o=n);if(i<0)throw new Error(\\\"lo must be non-negative\\\");s==null&&(s=e.length);while(o(i,s)<0)u=r((i+s)/2),o(t,e[u])<0?s=u:i=u+1;return[].splice.apply(e,[i,i-i].concat(t)),t},o=function(e,t,r){return r==null&&(r=n),e.push(t),d(e,0,e.length-1,r)},s=function(e,t){var r,i;return t==null&&(t=n),r=e.pop(),e.length?(i=e[0],e[0]=r,v(e,0,t)):i=r,i},a=function(e,t,r){var i;return r==null&&(r=n),i=e[0],e[0]=t,v(e,0,r),i},u=function(e,t,r){var i;return r==null&&(r=n),e.length&&r(e[0],t)<0&&(i=[e[0],t],t=i[0],e[0]=i[1],v(e,0,r)),t},i=function(e,t){var i,s,o,u,a,f,l,c;t==null&&(t=n),f=function(){c=[];for(var t=0,n=r(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)c.push(t);return c}.apply(this).reverse(),l=[];for(s=0,u=f.length;s<u;s++)i=f[s],l.push(v(e,i,t));return l},p=function(e,t,r){var i;return r==null&&(r=n),i=e.indexOf(t),d(e,0,i,r),v(e,i,r)},c=function(e,t,r){var s,o,a,f,l;r==null&&(r=n),o=e.slice(0,t);if(!o.length)return o;i(o,r),l=e.slice(t);for(a=0,f=l.length;a<f;a++)s=l[a],u(o,s,r);return o.sort(r).reverse()},h=function(e,t,r){var o,u,a,c,h,p,d,v,m,g;r==null&&(r=n);if(t*10<=e.length){c=e.slice(0,t).sort(r);if(!c.length)return c;a=c[c.length-1],v=e.slice(t);for(h=0,d=v.length;h<d;h++)o=v[h],r(o,a)<0&&(f(c,o,0,null,r),c.pop(),a=c[c.length-1]);return c}i(e,r),g=[];for(u=p=0,m=l(t,e.length);0<=m?p<m:p>m;u=0<=m?++p:--p)g.push(s(e,r));return g},d=function(e,t,r,i){var s,o,u;i==null&&(i=n),s=e[r];while(r>t){u=r-1>>1,o=e[u];if(i(s,o)<0){e[r]=o,r=u;continue}break}return e[r]=s},v=function(e,t,r){var i,s,o,u,a;r==null&&(r=n),s=e.length,a=t,o=e[t],i=2*t+1;while(i<s)u=i+1,u<s&&!(r(e[i],e[u])<0)&&(i=u),e[t]=e[i],t=i,i=2*t+1;return e[t]=o,d(e,a,t,r)},e=function(){function e(e){this.cmp=e!=null?e:n,this.nodes=[]}return e.name=\\\"Heap\\\",e.push=o,e.pop=s,e.replace=a,e.pushpop=u,e.heapify=i,e.nlargest=c,e.nsmallest=h,e.prototype.push=function(e){return o(this.nodes,e,this.cmp)},e.prototype.pop=function(){return s(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return this.nodes.indexOf(e)!==-1},e.prototype.replace=function(e){return a(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return u(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return i(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return p(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return this.nodes.length===0},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return t=new e,t.nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.remove=e.prototype.pop,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),(typeof t!=\\\"undefined\\\"&&t!==null?t.exports:void 0)?t.exports=e:window.Heap=e}).call(this)}),e.define(\\\"/core/Util.js\\\",function(e,t,n,r,i){function s(e){var t=[[e.x,e.y]];while(e.parent)e=e.parent,t.push([e.x,e.y]);return t.reverse()}function o(e,t){var n=s(e),r=s(t);return n.concat(r.reverse())}function u(e){var t,n=0,r,i,s,o;for(t=1;t<e.length;++t)r=e[t-1],i=e[t],s=r[0]-i[0],o=r[1]-i[1],n+=Math.sqrt(s*s+o*o);return n}function a(e,t,n,r){var i=Math.abs,s=[],o,u,a,f,l,c;a=i(n-e),f=i(r-t),o=e<n?1:-1,u=t<r?1:-1,l=a-f;for(;;){s.push([e,t]);if(e===n&&t===r)break;c=2*l,c>-f&&(l-=f,e+=o),c<a&&(l+=a,t+=u)}return s}function f(e,t){var n=t.length,r=t[0][0],i=t[0][1],s=t[n-1][0],o=t[n-1][1],u,f,l,c,h,p,d,v,m,g,y,b,w;u=r,f=i,h=t[1][0],p=t[1][1],d=[[u,f]];for(v=2;v<n;++v){g=t[v],l=g[0],c=g[1],y=a(u,f,l,c),w=!1;for(m=1;m<y.length;++m){b=y[m];if(!e.isWalkableAt(b[0],b[1])){w=!0,d.push([h,p]),u=h,f=p;break}}w||(h=l,p=c)}return d.push([s,o]),d}n.backtrace=s,n.biBacktrace=o,n.pathLength=u,n.getLine=a,n.smoothenPath=f}),e.define(\\\"/core/Heuristic.js\\\",function(e,t,n,r,i){t.exports={manhattan:function(e,t){return e+t},euclidean:function(e,t){return Math.sqrt(e*e+t*t)},chebyshev:function(e,t){return Math.max(e,t)}}}),e.define(\\\"/finders/AStarFinder.js\\\",function(e,t,n,r,i){function a(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.heuristic=e.heuristic||u.manhattan}var s=e(\\\"../core/Heap\\\"),o=e(\\\"../core/Util\\\"),u=e(\\\"../core/Heuristic\\\");a.prototype.findPath=function(e,t,n,r,i){var u=new s(function(e,t){return e.f-t.f}),a=i.getNodeAt(e,t),f=i.getNodeAt(n,r),l=this.heuristic,c=this.allowDiagonal,h=this.dontCrossCorners,p=Math.abs,d=Math.SQRT2,v,m,g,y,b,w,E,S;a.g=0,a.f=0,u.push(a),a.opened=!0;while(!u.empty()){v=u.pop(),v.closed=!0;if(v===f)return o.backtrace(f);m=i.getNeighbors(v,c,h);for(y=0,b=m.length;y<b;++y){g=m[y];if(g.closed)continue;w=g.x,E=g.y,S=v.g+(w-v.x===0||E-v.y===0?1:d);if(!g.opened||S<g.g)g.g=S,g.h=g.h||l(p(w-n),p(E-r)),g.f=g.g+g.h,g.parent=v,g.opened?u.updateItem(g):(u.push(g),g.opened=!0)}}return[]},t.exports=a}),e.define(\\\"/finders/BestFirstFinder.js\\\",function(e,t,n,r,i){function o(e){s.call(this,e);var t=this.heuristic;this.heuristic=function(e,n){return t(e,n)*1e6}}var s=e(\\\"./AStarFinder\\\");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define(\\\"/finders/BreadthFirstFinder.js\\\",function(e,t,n,r,i){function o(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners}var s=e(\\\"../core/Util\\\");o.prototype.findPath=function(e,t,n,r,i){var o=[],u=this.allowDiagonal,a=this.dontCrossCorners,f=i.getNodeAt(e,t),l=i.getNodeAt(n,r),c,h,p,d,v;o.push(f),f.opened=!0;while(o.length){p=o.shift(),p.closed=!0;if(p===l)return s.backtrace(l);c=i.getNeighbors(p,u,a);for(d=0,v=c.length;d<v;++d){h=c[d];if(h.closed||h.opened)continue;o.push(h),h.opened=!0,h.parent=p}}return[]},t.exports=o}),e.define(\\\"/finders/DijkstraFinder.js\\\",function(e,t,n,r,i){function o(e){s.call(this,e),this.heuristic=function(e,t){return 0}}var s=e(\\\"./AStarFinder\\\");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define(\\\"/finders/BiAStarFinder.js\\\",function(e,t,n,r,i){function a(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.heuristic=e.heuristic||u.manhattan}var s=e(\\\"../core/Heap\\\"),o=e(\\\"../core/Util\\\"),u=e(\\\"../core/Heuristic\\\");a.prototype.findPath=function(e,t,n,r,i){var u=function(e,t){return e.f-t.f},a=new s(u),f=new s(u),l=i.getNodeAt(e,t),c=i.getNodeAt(n,r),h=this.heuristic,p=this.allowDiagonal,d=this.dontCrossCorners,v=Math.abs,m=Math.SQRT2,g,y,b,w,E,S,x,T,N=1,C=2;l.g=0,l.f=0,a.push(l),l.opened=N,c.g=0,c.f=0,f.push(c),c.opened=C;while(!a.empty()&&!f.empty()){g=a.pop(),g.closed=!0,y=i.getNeighbors(g,p,d);for(w=0,E=y.length;w<E;++w){b=y[w];if(b.closed)continue;if(b.opened===C)return o.biBacktrace(g,b);S=b.x,x=b.y,T=g.g+(S-g.x===0||x-g.y===0?1:m);if(!b.opened||T<b.g)b.g=T,b.h=b.h||h(v(S-n),v(x-r)),b.f=b.g+b.h,b.parent=g,b.opened?a.updateItem(b):(a.push(b),b.opened=N)}g=f.pop(),g.closed=!0,y=i.getNeighbors(g,p,d);for(w=0,E=y.length;w<E;++w){b=y[w];if(b.closed)continue;if(b.opened===N)return o.biBacktrace(b,g);S=b.x,x=b.y,T=g.g+(S-g.x===0||x-g.y===0?1:m);if(!b.opened||T<b.g)b.g=T,b.h=b.h||h(v(S-e),v(x-t)),b.f=b.g+b.h,b.parent=g,b.opened?f.updateItem(b):(f.push(b),b.opened=C)}}return[]},t.exports=a}),e.define(\\\"/finders/BiBestFirstFinder.js\\\",function(e,t,n,r,i){function o(e){s.call(this,e);var t=this.heuristic;this.heuristic=function(e,n){return t(e,n)*1e6}}var s=e(\\\"./BiAStarFinder\\\");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define(\\\"/finders/BiBreadthFirstFinder.js\\\",function(e,t,n,r,i){function o(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners}var s=e(\\\"../core/Util\\\");o.prototype.findPath=function(e,t,n,r,i){var o=i.getNodeAt(e,t),u=i.getNodeAt(n,r),a=[],f=[],l,c,h,p=this.allowDiagonal,d=this.dontCrossCorners,v=0,m=1,g,y;a.push(o),o.opened=!0,o.by=v,f.push(u),u.opened=!0,u.by=m;while(a.length&&f.length){h=a.shift(),h.closed=!0,l=i.getNeighbors(h,p,d);for(g=0,y=l.length;g<y;++g){c=l[g];if(c.closed)continue;if(c.opened){if(c.by===m)return s.biBacktrace(h,c);continue}a.push(c),c.parent=h,c.opened=!0,c.by=v}h=f.shift(),h.closed=!0,l=i.getNeighbors(h,p,d);for(g=0,y=l.length;g<y;++g){c=l[g];if(c.closed)continue;if(c.opened){if(c.by===v)return s.biBacktrace(c,h);continue}f.push(c),c.parent=h,c.opened=!0,c.by=m}}return[]},t.exports=o}),e.define(\\\"/finders/BiDijkstraFinder.js\\\",function(e,t,n,r,i){function o(e){s.call(this,e),this.heuristic=function(e,t){return 0}}var s=e(\\\"./BiAStarFinder\\\");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define(\\\"/finders/JumpPointFinder.js\\\",function(e,t,n,r,i){function a(e){e=e||{},this.heuristic=e.heuristic||u.manhattan}var s=e(\\\"../core/Heap\\\"),o=e(\\\"../core/Util\\\"),u=e(\\\"../core/Heuristic\\\");a.prototype.findPath=function(e,t,n,r,i){var u=this.openList=new s(function(e,t){return e.f-t.f}),a=this.startNode=i.getNodeAt(e,t),f=this.endNode=i.getNodeAt(n,r),l;this.grid=i,a.g=0,a.f=0,u.push(a),a.opened=!0;while(!u.empty()){l=u.pop(),l.closed=!0;if(l===f)return o.backtrace(f);this._identifySuccessors(l)}return[]},a.prototype._identifySuccessors=function(e){var t=this.grid,n=this.heuristic,r=this.openList,i=this.endNode.x,s=this.endNode.y,o,a,f,l,c,h=e.x,p=e.y,d,v,m,g,y,b,w,E=Math.abs,S=Math.max;o=this._findNeighbors(e);for(l=0,c=o.length;l<c;++l){a=o[l],f=this._jump(a[0],a[1],h,p);if(f){d=f[0],v=f[1],w=t.getNodeAt(d,v);if(w.closed)continue;y=u.euclidean(E(d-h),E(v-p)),b=e.g+y;if(!w.opened||b<w.g)w.g=b,w.h=w.h||n(E(d-i),E(v-s)),w.f=w.g+w.h,w.parent=e,w.opened?r.updateItem(w):(r.push(w),w.opened=!0)}}},a.prototype._jump=function(e,t,n,r){var i=this.grid,s=e-n,o=t-r,u,a;if(!i.isWalkableAt(e,t))return null;if(i.getNodeAt(e,t)===this.endNode)return[e,t];if(s!==0&&o!==0){if(i.isWalkableAt(e-s,t+o)&&!i.isWalkableAt(e-s,t)||i.isWalkableAt(e+s,t-o)&&!i.isWalkableAt(e,t-o))return[e,t]}else if(s!==0){if(i.isWalkableAt(e+s,t+1)&&!i.isWalkableAt(e,t+1)||i.isWalkableAt(e+s,t-1)&&!i.isWalkableAt(e,t-1))return[e,t]}else if(i.isWalkableAt(e+1,t+o)&&!i.isWalkableAt(e+1,t)||i.isWalkableAt(e-1,t+o)&&!i.isWalkableAt(e-1,t))return[e,t];if(s!==0&&o!==0){u=this._jump(e+s,t,e,t),a=this._jump(e,t+o,e,t);if(u||a)return[e,t]}return i.isWalkableAt(e+s,t)||i.isWalkableAt(e,t+o)?this._jump(e+s,t+o,e,t):null},a.prototype._findNeighbors=function(e){var t=e.parent,n=e.x,r=e.y,i=this.grid,s,o,u,a,f,l,c=[],h,p,d,v;if(t)s=t.x,o=t.y,f=(n-s)/Math.max(Math.abs(n-s),1),l=(r-o)/Math.max(Math.abs(r-o),1),f!==0&&l!==0?(i.isWalkableAt(n,r+l)&&c.push([n,r+l]),i.isWalkableAt(n+f,r)&&c.push([n+f,r]),(i.isWalkableAt(n,r+l)||i.isWalkableAt(n+f,r))&&c.push([n+f,r+l]),!i.isWalkableAt(n-f,r)&&i.isWalkableAt(n,r+l)&&c.push([n-f,r+l]),!i.isWalkableAt(n,r-l)&&i.isWalkableAt(n+f,r)&&c.push([n+f,r-l])):f===0?i.isWalkableAt(n,r+l)&&(i.isWalkableAt(n,r+l)&&c.push([n,r+l]),i.isWalkableAt(n+1,r)||c.push([n+1,r+l]),i.isWalkableAt(n-1,r)||c.push([n-1,r+l])):i.isWalkableAt(n+f,r)&&(i.isWalkableAt(n+f,r)&&c.push([n+f,r]),i.isWalkableAt(n,r+1)||c.push([n+f,r+1]),i.isWalkableAt(n,r-1)||c.push([n+f,r-1]));else{h=i.getNeighbors(e,!0);for(d=0,v=h.length;d<v;++d)p=h[d],c.push([p.x,p.y])}return c},t.exports=a}),e.define(\\\"/PathFinding.js\\\",function(e,t,n,r,i){t.exports={Node:e(\\\"./core/Node\\\"),Grid:e(\\\"./core/Grid\\\"),Heap:e(\\\"./core/Heap\\\"),Util:e(\\\"./core/Util\\\"),Heuristic:e(\\\"./core/Heuristic\\\"),AStarFinder:e(\\\"./finders/AStarFinder\\\"),BestFirstFinder:e(\\\"./finders/BestFirstFinder\\\"),BreadthFirstFinder:e(\\\"./finders/BreadthFirstFinder\\\"),DijkstraFinder:e(\\\"./finders/DijkstraFinder\\\"),BiAStarFinder:e(\\\"./finders/BiAStarFinder\\\"),BiBestFirstFinder:e(\\\"./finders/BiBestFirstFinder\\\"),BiBreadthFirstFinder:e(\\\"./finders/BiBreadthFirstFinder\\\"),BiDijkstraFinder:e(\\\"./finders/BiDijkstraFinder\\\"),JumpPointFinder:e(\\\"./finders/JumpPointFinder\\\")}}),e(\\\"/PathFinding.js\\\"),e(\\\"/PathFinding\\\")}()\"","module.exports = \"\\r\\n\\r\\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\\\\\// │ Raphaël 2.1.0 - JavaScript Vector Library │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\\\\\\r\\n// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\\\\\\r\\n// └────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n// ┌──────────────────────────────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Eve 0.3.4 - JavaScript Events Library │ \\\\\\\\\\r\\n// ├──────────────────────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. │ \\\\\\\\\\r\\n// └──────────────────────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n// THIS FILES IS PATCHED BY FREEGROUP\\r\\n// you can't replace this file with a new version without migrate all changes\\r\\n// tagged with \\\"FREEGROUP\\\"\\r\\n//\\r\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\r\\n// you may not use this file except in compliance with the License.\\r\\n// You may obtain a copy of the License at\\r\\n//\\r\\n// http://www.apache.org/licenses/LICENSE-2.0\\r\\n//\\r\\n// Unless required by applicable law or agreed to in writing, software\\r\\n// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\r\\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\r\\n// See the License for the specific language governing permissions and\\r\\n// limitations under the License.\\r\\n// ┌────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Eve 0.4.2 - JavaScript Events Library │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Author Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\\\\\\\\\r\\n// └────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n(function (glob, factory) {\\r\\n if (typeof define === \\\"function\\\" && define.amd) {\\r\\n define(\\\"eve\\\", function() {\\r\\n return factory();\\r\\n });\\r\\n } else if (typeof exports === \\\"object\\\") {\\r\\n module.exports = factory();\\r\\n } else {\\r\\n glob.eve = factory();\\r\\n }\\r\\n}(this, function(){\\r\\n var version = \\\"0.4.2\\\",\\r\\n has = \\\"hasOwnProperty\\\",\\r\\n separator = /[\\\\.\\\\/]/,\\r\\n wildcard = \\\"*\\\",\\r\\n fun = function () {},\\r\\n numsort = function (a, b) {\\r\\n return a - b;\\r\\n },\\r\\n current_event,\\r\\n stop,\\r\\n events = {n: {}},\\r\\n /*\\\\\\r\\n * eve\\r\\n [ method ]\\r\\n\\r\\n * Fires event with given `name`, given scope and other parameters.\\r\\n\\r\\n > Arguments\\r\\n\\r\\n - name (string) name of the *event*, dot (`.`) or slash (`/`) separated\\r\\n - scope (object) context for the event handlers\\r\\n - varargs (...) the rest of arguments will be sent to event handlers\\r\\n\\r\\n = (object) array of returned values from the listeners\\r\\n \\\\*/\\r\\n eve = function (name, scope) {\\r\\n name = String(name);\\r\\n var e = events,\\r\\n oldstop = stop,\\r\\n args = Array.prototype.slice.call(arguments, 2),\\r\\n listeners = eve.listeners(name),\\r\\n z = 0,\\r\\n f = false,\\r\\n l,\\r\\n indexed = [],\\r\\n queue = {},\\r\\n out = [],\\r\\n ce = current_event,\\r\\n errors = [];\\r\\n current_event = name;\\r\\n stop = 0;\\r\\n for (var i = 0, ii = listeners.length; i < ii; i++) if (\\\"zIndex\\\" in listeners[i]) {\\r\\n indexed.push(listeners[i].zIndex);\\r\\n if (listeners[i].zIndex < 0) {\\r\\n queue[listeners[i].zIndex] = listeners[i];\\r\\n }\\r\\n }\\r\\n indexed.sort(numsort);\\r\\n while (indexed[z] < 0) {\\r\\n l = queue[indexed[z++]];\\r\\n out.push(l.apply(scope, args));\\r\\n if (stop) {\\r\\n stop = oldstop;\\r\\n return out;\\r\\n }\\r\\n }\\r\\n for (i = 0; i < ii; i++) {\\r\\n l = listeners[i];\\r\\n if (\\\"zIndex\\\" in l) {\\r\\n if (l.zIndex == indexed[z]) {\\r\\n out.push(l.apply(scope, args));\\r\\n if (stop) {\\r\\n break;\\r\\n }\\r\\n do {\\r\\n z++;\\r\\n l = queue[indexed[z]];\\r\\n l && out.push(l.apply(scope, args));\\r\\n if (stop) {\\r\\n break;\\r\\n }\\r\\n } while (l)\\r\\n } else {\\r\\n queue[l.zIndex] = l;\\r\\n }\\r\\n } else {\\r\\n out.push(l.apply(scope, args));\\r\\n if (stop) {\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n stop = oldstop;\\r\\n current_event = ce;\\r\\n return out.length ? out : null;\\r\\n };\\r\\n // Undocumented. Debug only.\\r\\n eve._events = events;\\r\\n /*\\\\\\r\\n * eve.listeners\\r\\n [ method ]\\r\\n\\r\\n * Internal method which gives you array of all event handlers that will be triggered by the given `name`.\\r\\n\\r\\n > Arguments\\r\\n\\r\\n - name (string) name of the event, dot (`.`) or slash (`/`) separated\\r\\n\\r\\n = (array) array of event handlers\\r\\n \\\\*/\\r\\n eve.listeners = function (name) {\\r\\n var names = name.split(separator),\\r\\n e = events,\\r\\n item,\\r\\n items,\\r\\n k,\\r\\n i,\\r\\n ii,\\r\\n j,\\r\\n jj,\\r\\n nes,\\r\\n es = [e],\\r\\n out = [];\\r\\n for (i = 0, ii = names.length; i < ii; i++) {\\r\\n nes = [];\\r\\n for (j = 0, jj = es.length; j < jj; j++) {\\r\\n e = es[j].n;\\r\\n items = [e[names[i]], e[wildcard]];\\r\\n k = 2;\\r\\n while (k--) {\\r\\n item = items[k];\\r\\n if (item) {\\r\\n nes.push(item);\\r\\n out = out.concat(item.f || []);\\r\\n }\\r\\n }\\r\\n }\\r\\n es = nes;\\r\\n }\\r\\n return out;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * eve.on\\r\\n [ method ]\\r\\n **\\r\\n * Binds given event handler with a given name. You can use wildcards “`*`” for the names:\\r\\n | eve.on(\\\"*.under.*\\\", f);\\r\\n | eve(\\\"mouse.under.floor\\\"); // triggers f\\r\\n * Use @eve to trigger the listener.\\r\\n **\\r\\n > Arguments\\r\\n **\\r\\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\\r\\n - f (function) event handler function\\r\\n **\\r\\n = (function) returned function accepts a single numeric parameter that represents z-index of the handler. It is an optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment.\\r\\n > Example:\\r\\n | eve.on(\\\"mouse\\\", eatIt)(2);\\r\\n | eve.on(\\\"mouse\\\", scream);\\r\\n | eve.on(\\\"mouse\\\", catchIt)(1);\\r\\n * This will ensure that `catchIt()` function will be called before `eatIt()`.\\r\\n *\\r\\n * If you want to put your handler before non-indexed handlers, specify a negative value.\\r\\n * Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”.\\r\\n \\\\*/\\r\\n eve.on = function (name, f) {\\r\\n name = String(name);\\r\\n if (typeof f != \\\"function\\\") {\\r\\n return function () {};\\r\\n }\\r\\n var names = name.split(separator),\\r\\n e = events;\\r\\n for (var i = 0, ii = names.length; i < ii; i++) {\\r\\n e = e.n;\\r\\n e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}});\\r\\n }\\r\\n e.f = e.f || [];\\r\\n for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) {\\r\\n return fun;\\r\\n }\\r\\n e.f.push(f);\\r\\n return function (zIndex) {\\r\\n if (+zIndex == +zIndex) {\\r\\n f.zIndex = +zIndex;\\r\\n }\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * eve.f\\r\\n [ method ]\\r\\n **\\r\\n * Returns function that will fire given event with optional arguments.\\r\\n * Arguments that will be passed to the result function will be also\\r\\n * concated to the list of final arguments.\\r\\n | el.onclick = eve.f(\\\"click\\\", 1, 2);\\r\\n | eve.on(\\\"click\\\", function (a, b, c) {\\r\\n | console.log(a, b, c); // 1, 2, [event object]\\r\\n | });\\r\\n > Arguments\\r\\n - event (string) event name\\r\\n - varargs (…) and any other arguments\\r\\n = (function) possible event handler function\\r\\n \\\\*/\\r\\n eve.f = function (event) {\\r\\n var attrs = [].slice.call(arguments, 1);\\r\\n return function () {\\r\\n eve.apply(null, [event, null].concat(attrs).concat([].slice.call(arguments, 0)));\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * eve.stop\\r\\n [ method ]\\r\\n **\\r\\n * Is used inside an event handler to stop the event, preventing any subsequent listeners from firing.\\r\\n \\\\*/\\r\\n eve.stop = function () {\\r\\n stop = 1;\\r\\n };\\r\\n /*\\\\\\r\\n * eve.nt\\r\\n [ method ]\\r\\n **\\r\\n * Could be used inside event handler to figure out actual name of the event.\\r\\n **\\r\\n > Arguments\\r\\n **\\r\\n - subname (string) #optional subname of the event\\r\\n **\\r\\n = (string) name of the event, if `subname` is not specified\\r\\n * or\\r\\n = (boolean) `true`, if current event’s name contains `subname`\\r\\n \\\\*/\\r\\n eve.nt = function (subname) {\\r\\n if (subname) {\\r\\n return new RegExp(\\\"(?:\\\\\\\\.|\\\\\\\\/|^)\\\" + subname + \\\"(?:\\\\\\\\.|\\\\\\\\/|$)\\\").test(current_event);\\r\\n }\\r\\n return current_event;\\r\\n };\\r\\n /*\\\\\\r\\n * eve.nts\\r\\n [ method ]\\r\\n **\\r\\n * Could be used inside event handler to figure out actual name of the event.\\r\\n **\\r\\n **\\r\\n = (array) names of the event\\r\\n \\\\*/\\r\\n eve.nts = function () {\\r\\n return current_event.split(separator);\\r\\n };\\r\\n /*\\\\\\r\\n * eve.off\\r\\n [ method ]\\r\\n **\\r\\n * Removes given function from the list of event listeners assigned to given name.\\r\\n * If no arguments specified all the events will be cleared.\\r\\n **\\r\\n > Arguments\\r\\n **\\r\\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\\r\\n - f (function) event handler function\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * eve.unbind\\r\\n [ method ]\\r\\n **\\r\\n * See @eve.off\\r\\n \\\\*/\\r\\n eve.off = eve.unbind = function (name, f) {\\r\\n if (!name) {\\r\\n eve._events = events = {n: {}};\\r\\n return;\\r\\n }\\r\\n var names = name.split(separator),\\r\\n e,\\r\\n key,\\r\\n splice,\\r\\n i, ii, j, jj,\\r\\n cur = [events];\\r\\n for (i = 0, ii = names.length; i < ii; i++) {\\r\\n for (j = 0; j < cur.length; j += splice.length - 2) {\\r\\n splice = [j, 1];\\r\\n e = cur[j].n;\\r\\n if (names[i] != wildcard) {\\r\\n if (e[names[i]]) {\\r\\n splice.push(e[names[i]]);\\r\\n }\\r\\n } else {\\r\\n for (key in e) if (e[has](key)) {\\r\\n splice.push(e[key]);\\r\\n }\\r\\n }\\r\\n cur.splice.apply(cur, splice);\\r\\n }\\r\\n }\\r\\n for (i = 0, ii = cur.length; i < ii; i++) {\\r\\n e = cur[i];\\r\\n while (e.n) {\\r\\n if (f) {\\r\\n if (e.f) {\\r\\n for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) {\\r\\n e.f.splice(j, 1);\\r\\n break;\\r\\n }\\r\\n !e.f.length && delete e.f;\\r\\n }\\r\\n for (key in e.n) if (e.n[has](key) && e.n[key].f) {\\r\\n var funcs = e.n[key].f;\\r\\n for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) {\\r\\n funcs.splice(j, 1);\\r\\n break;\\r\\n }\\r\\n !funcs.length && delete e.n[key].f;\\r\\n }\\r\\n } else {\\r\\n delete e.f;\\r\\n for (key in e.n) if (e.n[has](key) && e.n[key].f) {\\r\\n delete e.n[key].f;\\r\\n }\\r\\n }\\r\\n e = e.n;\\r\\n }\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * eve.once\\r\\n [ method ]\\r\\n **\\r\\n * Binds given event handler with a given name to only run once then unbind itself.\\r\\n | eve.once(\\\"login\\\", f);\\r\\n | eve(\\\"login\\\"); // triggers f\\r\\n | eve(\\\"login\\\"); // no listeners\\r\\n * Use @eve to trigger the listener.\\r\\n **\\r\\n > Arguments\\r\\n **\\r\\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\\r\\n - f (function) event handler function\\r\\n **\\r\\n = (function) same return function as @eve.on\\r\\n \\\\*/\\r\\n eve.once = function (name, f) {\\r\\n var f2 = function () {\\r\\n eve.unbind(name, f2);\\r\\n return f.apply(this, arguments);\\r\\n };\\r\\n return eve.on(name, f2);\\r\\n };\\r\\n /*\\\\\\r\\n * eve.version\\r\\n [ property (string) ]\\r\\n **\\r\\n * Current version of the library.\\r\\n \\\\*/\\r\\n eve.version = version;\\r\\n eve.toString = function () {\\r\\n return \\\"You are running Eve \\\" + version;\\r\\n };\\r\\n\\r\\n return eve;\\r\\n}));\\r\\n\\r\\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Core Module │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\\\\\\r\\n// └────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n(function (glob, factory) {\\r\\n if (typeof define === \\\"function\\\" && define.amd) {\\r\\n define(\\\"raphael.core\\\", [\\\"eve\\\"], function(eve) {\\r\\n return factory(eve);\\r\\n });\\r\\n } else if (typeof exports === \\\"object\\\") {\\r\\n module.exports = factory(require(\\\"eve\\\"));\\r\\n } else {\\r\\n glob.Raphael = factory(glob.eve);\\r\\n }\\r\\n}(this, function (eve) {\\r\\n /*\\\\\\r\\n * Raphael\\r\\n [ method ]\\r\\n **\\r\\n * Creates a canvas object on which to draw.\\r\\n * You must do this first, as all future calls to drawing methods\\r\\n * from this instance will be bound to this canvas.\\r\\n > Parameters\\r\\n **\\r\\n - container (HTMLElement|string) DOM element or its ID which is going to be a parent for drawing surface\\r\\n - width (number)\\r\\n - height (number)\\r\\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\\r\\n * or\\r\\n - x (number)\\r\\n - y (number)\\r\\n - width (number)\\r\\n - height (number)\\r\\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\\r\\n * or\\r\\n - all (array) (first 3 or 4 elements in the array are equal to [containerID, width, height] or [x, y, width, height]. The rest are element descriptions in format {type: type, <attributes>}). See @Paper.add.\\r\\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\\r\\n * or\\r\\n - onReadyCallback (function) function that is going to be called on DOM ready event. You can also subscribe to this event via Eve’s “DOMLoad” event. In this case method returns `undefined`.\\r\\n = (object) @Paper\\r\\n > Usage\\r\\n | // Each of the following examples create a canvas\\r\\n | // that is 320px wide by 200px high.\\r\\n | // Canvas is created at the viewport’s 10,50 coordinate.\\r\\n | var paper = Raphael(10, 50, 320, 200);\\r\\n | // Canvas is created at the top left corner of the #notepad element\\r\\n | // (or its top right corner in dir=\\\"rtl\\\" elements)\\r\\n | var paper = Raphael(document.getElementById(\\\"notepad\\\"), 320, 200);\\r\\n | // Same as above\\r\\n | var paper = Raphael(\\\"notepad\\\", 320, 200);\\r\\n | // Image dump\\r\\n | var set = Raphael([\\\"notepad\\\", 320, 200, {\\r\\n | type: \\\"rect\\\",\\r\\n | x: 10,\\r\\n | y: 10,\\r\\n | width: 25,\\r\\n | height: 25,\\r\\n | stroke: \\\"#f00\\\"\\r\\n | }, {\\r\\n | type: \\\"text\\\",\\r\\n | x: 30,\\r\\n | y: 40,\\r\\n | text: \\\"Dump\\\"\\r\\n | }]);\\r\\n \\\\*/\\r\\n function R(first) {\\r\\n if (R.is(first, \\\"function\\\")) {\\r\\n return loaded ? first() : eve.on(\\\"raphael.DOMload\\\", first);\\r\\n } else if (R.is(first, array)) {\\r\\n return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first);\\r\\n } else {\\r\\n var args = Array.prototype.slice.call(arguments, 0);\\r\\n if (R.is(args[args.length - 1], \\\"function\\\")) {\\r\\n var f = args.pop();\\r\\n return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on(\\\"raphael.DOMload\\\", function () {\\r\\n f.call(R._engine.create[apply](R, args));\\r\\n });\\r\\n } else {\\r\\n return R._engine.create[apply](R, arguments);\\r\\n }\\r\\n }\\r\\n }\\r\\n R.version = \\\"2.1.4\\\";\\r\\n R.eve = eve;\\r\\n var loaded,\\r\\n separator = /[, ]+/,\\r\\n elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1},\\r\\n formatrg = /\\\\{(\\\\d+)\\\\}/g,\\r\\n proto = \\\"prototype\\\",\\r\\n has = \\\"hasOwnProperty\\\",\\r\\n g = {\\r\\n doc: document,\\r\\n win: window\\r\\n },\\r\\n oldRaphael = {\\r\\n was: Object.prototype[has].call(g.win, \\\"Raphael\\\"),\\r\\n is: g.win.Raphael\\r\\n },\\r\\n Paper = function () {\\r\\n /*\\\\\\r\\n * Paper.ca\\r\\n [ property (object) ]\\r\\n **\\r\\n * Shortcut for @Paper.customAttributes\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Paper.customAttributes\\r\\n [ property (object) ]\\r\\n **\\r\\n * If you have a set of attributes that you would like to represent\\r\\n * as a function of some number you can do it easily with custom attributes:\\r\\n > Usage\\r\\n | paper.customAttributes.hue = function (num) {\\r\\n | num = num % 1;\\r\\n | return {fill: \\\"hsb(\\\" + num + \\\", 0.75, 1)\\\"};\\r\\n | };\\r\\n | // Custom attribute “hue” will change fill\\r\\n | // to be given hue with fixed saturation and brightness.\\r\\n | // Now you can use it like this:\\r\\n | var c = paper.circle(10, 10, 10).attr({hue: .45});\\r\\n | // or even like this:\\r\\n | c.animate({hue: 1}, 1e3);\\r\\n |\\r\\n | // You could also create custom attribute\\r\\n | // with multiple parameters:\\r\\n | paper.customAttributes.hsb = function (h, s, b) {\\r\\n | return {fill: \\\"hsb(\\\" + [h, s, b].join(\\\",\\\") + \\\")\\\"};\\r\\n | };\\r\\n | c.attr({hsb: \\\"0.5 .8 1\\\"});\\r\\n | c.animate({hsb: [1, 0, 0.5]}, 1e3);\\r\\n \\\\*/\\r\\n this.ca = this.customAttributes = {};\\r\\n },\\r\\n paperproto,\\r\\n appendChild = \\\"appendChild\\\",\\r\\n apply = \\\"apply\\\",\\r\\n concat = \\\"concat\\\",\\r\\n supportsTouch = ('ontouchstart' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test\\r\\n E = \\\"\\\",\\r\\n S = \\\" \\\",\\r\\n Str = String,\\r\\n split = \\\"split\\\",\\r\\n events = \\\"click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel\\\"[split](S),\\r\\n touchMap = {\\r\\n mousedown: \\\"touchstart\\\",\\r\\n mousemove: \\\"touchmove\\\",\\r\\n mouseup: \\\"touchend\\\"\\r\\n },\\r\\n lowerCase = Str.prototype.toLowerCase,\\r\\n math = Math,\\r\\n mmax = math.max,\\r\\n mmin = math.min,\\r\\n abs = math.abs,\\r\\n pow = math.pow,\\r\\n PI = math.PI,\\r\\n nu = \\\"number\\\",\\r\\n string = \\\"string\\\",\\r\\n array = \\\"array\\\",\\r\\n toString = \\\"toString\\\",\\r\\n fillString = \\\"fill\\\",\\r\\n objectToString = Object.prototype.toString,\\r\\n paper = {},\\r\\n push = \\\"push\\\",\\r\\n ISURL = R._ISURL = /^url\\\\(['\\\"]?(.+?)['\\\"]?\\\\)$/i,\\r\\n colourRegExp = /^\\\\s*((#[a-f\\\\d]{6})|(#[a-f\\\\d]{3})|rgba?\\\\(\\\\s*([\\\\d\\\\.]+%?\\\\s*,\\\\s*[\\\\d\\\\.]+%?\\\\s*,\\\\s*[\\\\d\\\\.]+%?(?:\\\\s*,\\\\s*[\\\\d\\\\.]+%?)?)\\\\s*\\\\)|hsba?\\\\(\\\\s*([\\\\d\\\\.]+(?:deg|\\\\xb0|%)?\\\\s*,\\\\s*[\\\\d\\\\.]+%?\\\\s*,\\\\s*[\\\\d\\\\.]+(?:%?\\\\s*,\\\\s*[\\\\d\\\\.]+)?)%?\\\\s*\\\\)|hsla?\\\\(\\\\s*([\\\\d\\\\.]+(?:deg|\\\\xb0|%)?\\\\s*,\\\\s*[\\\\d\\\\.]+%?\\\\s*,\\\\s*[\\\\d\\\\.]+(?:%?\\\\s*,\\\\s*[\\\\d\\\\.]+)?)%?\\\\s*\\\\))\\\\s*$/i,\\r\\n isnan = {\\\"NaN\\\": 1, \\\"Infinity\\\": 1, \\\"-Infinity\\\": 1},\\r\\n bezierrg = /^(?:cubic-)?bezier\\\\(([^,]+),([^,]+),([^,]+),([^\\\\)]+)\\\\)/,\\r\\n round = math.round,\\r\\n setAttribute = \\\"setAttribute\\\",\\r\\n toFloat = parseFloat,\\r\\n toInt = parseInt,\\r\\n upperCase = Str.prototype.toUpperCase,\\r\\n availableAttrs = R._availableAttrs = {\\r\\n \\\"arrow-end\\\": \\\"none\\\",\\r\\n \\\"arrow-start\\\": \\\"none\\\",\\r\\n blur: 0,\\r\\n \\\"clip-rect\\\": \\\"0 0 1e9 1e9\\\",\\r\\n cursor: \\\"default\\\",\\r\\n cx: 0,\\r\\n cy: 0,\\r\\n fill: \\\"#fff\\\",\\r\\n \\\"fill-opacity\\\": 1,\\r\\n font: '10px \\\"Arial\\\"',\\r\\n \\\"font-family\\\": '\\\"Arial\\\"',\\r\\n \\\"font-size\\\": \\\"10\\\",\\r\\n \\\"font-style\\\": \\\"normal\\\",\\r\\n \\\"font-weight\\\": 400,\\r\\n gradient: 0,\\r\\n height: 0,\\r\\n href: \\\"http://raphaeljs.com/\\\",\\r\\n \\\"letter-spacing\\\": 0,\\r\\n opacity: 1,\\r\\n path: \\\"M0,0\\\",\\r\\n r: 0,\\r\\n rx: 0,\\r\\n ry: 0,\\r\\n src: \\\"\\\",\\r\\n stroke: \\\"#000\\\",\\r\\n \\\"stroke-dasharray\\\": \\\"\\\",\\r\\n \\\"stroke-linecap\\\": \\\"butt\\\",\\r\\n \\\"stroke-linejoin\\\": \\\"butt\\\",\\r\\n \\\"stroke-miterlimit\\\": 0,\\r\\n \\\"stroke-opacity\\\": 1,\\r\\n \\\"stroke-width\\\": 1,\\r\\n \\\"stroke-scale\\\": false, // FreeGroup: draw2d enhancement\\r\\n target: \\\"_blank\\\",\\r\\n \\\"text-anchor\\\": \\\"middle\\\",\\r\\n title: \\\"Raphael\\\",\\r\\n transform: \\\"\\\",\\r\\n width: 0,\\r\\n x: 0,\\r\\n y: 0\\r\\n },\\r\\n availableAnimAttrs = R._availableAnimAttrs = {\\r\\n blur: nu,\\r\\n \\\"clip-rect\\\": \\\"csv\\\",\\r\\n cx: nu,\\r\\n cy: nu,\\r\\n fill: \\\"colour\\\",\\r\\n \\\"fill-opacity\\\": nu,\\r\\n \\\"font-size\\\": nu,\\r\\n height: nu,\\r\\n opacity: nu,\\r\\n path: \\\"path\\\",\\r\\n r: nu,\\r\\n rx: nu,\\r\\n ry: nu,\\r\\n stroke: \\\"colour\\\",\\r\\n \\\"stroke-opacity\\\": nu,\\r\\n \\\"stroke-width\\\": nu,\\r\\n transform: \\\"transform\\\",\\r\\n width: nu,\\r\\n x: nu,\\r\\n y: nu\\r\\n },\\r\\n whitespace = /[\\\\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]/g,\\r\\n commaSpaces = /[\\\\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]*,[\\\\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]*/,\\r\\n hsrg = {hs: 1, rg: 1},\\r\\n p2s = /,?([achlmqrstvxz]),?/gi,\\r\\n pathCommand = /([achlmrqstvz])[\\\\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,]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[\\\\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]*,?[\\\\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]*)+)/ig,\\r\\n tCommand = /([rstm])[\\\\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,]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[\\\\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]*,?[\\\\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]*)+)/ig,\\r\\n pathValues = /(-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?)[\\\\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]*,?[\\\\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]*/ig,\\r\\n radial_gradient = R._radial_gradient = /^r(?:\\\\(([^,]+?)[\\\\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]*,[\\\\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]*([^\\\\)]+?)\\\\))?/,\\r\\n eldata = {},\\r\\n sortByKey = function (a, b) {\\r\\n return a.key - b.key;\\r\\n },\\r\\n sortByNumber = function (a, b) {\\r\\n return toFloat(a) - toFloat(b);\\r\\n },\\r\\n fun = function () {},\\r\\n pipe = function (x) {\\r\\n return x;\\r\\n },\\r\\n rectPath = R._rectPath = function (x, y, w, h, r) {\\r\\n if (r) {\\r\\n return [[\\\"M\\\", x + r, y], [\\\"l\\\", w - r * 2, 0], [\\\"a\\\", r, r, 0, 0, 1, r, r], [\\\"l\\\", 0, h - r * 2], [\\\"a\\\", r, r, 0, 0, 1, -r, r], [\\\"l\\\", r * 2 - w, 0], [\\\"a\\\", r, r, 0, 0, 1, -r, -r], [\\\"l\\\", 0, r * 2 - h], [\\\"a\\\", r, r, 0, 0, 1, r, -r], [\\\"z\\\"]];\\r\\n }\\r\\n return [[\\\"M\\\", x, y], [\\\"l\\\", w, 0], [\\\"l\\\", 0, h], [\\\"l\\\", -w, 0], [\\\"z\\\"]];\\r\\n },\\r\\n ellipsePath = function (x, y, rx, ry) {\\r\\n if (ry == null) {\\r\\n ry = rx;\\r\\n }\\r\\n return [[\\\"M\\\", x, y], [\\\"m\\\", 0, -ry], [\\\"a\\\", rx, ry, 0, 1, 1, 0, 2 * ry], [\\\"a\\\", rx, ry, 0, 1, 1, 0, -2 * ry], [\\\"z\\\"]];\\r\\n },\\r\\n getPath = R._getPath = {\\r\\n path: function (el) {\\r\\n return el.attr(\\\"path\\\");\\r\\n },\\r\\n circle: function (el) {\\r\\n var a = el.attrs;\\r\\n return ellipsePath(a.cx, a.cy, a.r);\\r\\n },\\r\\n ellipse: function (el) {\\r\\n var a = el.attrs;\\r\\n return ellipsePath(a.cx, a.cy, a.rx, a.ry);\\r\\n },\\r\\n rect: function (el) {\\r\\n var a = el.attrs;\\r\\n return rectPath(a.x, a.y, a.width, a.height, a.r);\\r\\n },\\r\\n image: function (el) {\\r\\n var a = el.attrs;\\r\\n return rectPath(a.x, a.y, a.width, a.height);\\r\\n },\\r\\n text: function (el) {\\r\\n var bbox = el._getBBox();\\r\\n return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);\\r\\n },\\r\\n set : function(el) {\\r\\n var bbox = el._getBBox();\\r\\n return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);\\r\\n }\\r\\n },\\r\\n /*\\\\\\r\\n * Raphael.mapPath\\r\\n [ method ]\\r\\n **\\r\\n * Transform the path string with given matrix.\\r\\n > Parameters\\r\\n - path (string) path string\\r\\n - matrix (object) see @Matrix\\r\\n = (string) transformed path string\\r\\n \\\\*/\\r\\n mapPath = R.mapPath = function (path, matrix) {\\r\\n if (!matrix) {\\r\\n return path;\\r\\n }\\r\\n var x, y, i, j, ii, jj, pathi;\\r\\n path = path2curve(path);\\r\\n for (i = 0, ii = path.length; i < ii; i++) {\\r\\n pathi = path[i];\\r\\n for (j = 1, jj = pathi.length; j < jj; j += 2) {\\r\\n x = matrix.x(pathi[j], pathi[j + 1]);\\r\\n y = matrix.y(pathi[j], pathi[j + 1]);\\r\\n pathi[j] = x;\\r\\n pathi[j + 1] = y;\\r\\n }\\r\\n }\\r\\n return path;\\r\\n };\\r\\n\\r\\n R._g = g;\\r\\n /*\\\\\\r\\n * Raphael.type\\r\\n [ property (string) ]\\r\\n **\\r\\n * Can be “SVG”, “VML” or empty, depending on browser support.\\r\\n \\\\*/\\r\\n R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature(\\\"http://www.w3.org/TR/SVG11/feature#BasicStructure\\\", \\\"1.1\\\") ? \\\"SVG\\\" : \\\"VML\\\");\\r\\n if (R.type == \\\"VML\\\") {\\r\\n var d = g.doc.createElement(\\\"div\\\"),\\r\\n b;\\r\\n d.innerHTML = '<v:shape adj=\\\"1\\\"/>';\\r\\n b = d.firstChild;\\r\\n b.style.behavior = \\\"url(#default#VML)\\\";\\r\\n if (!(b && typeof b.adj == \\\"object\\\")) {\\r\\n return (R.type = E);\\r\\n }\\r\\n d = null;\\r\\n }\\r\\n /*\\\\\\r\\n * Raphael.svg\\r\\n [ property (boolean) ]\\r\\n **\\r\\n * `true` if browser supports SVG.\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Raphael.vml\\r\\n [ property (boolean) ]\\r\\n **\\r\\n * `true` if browser supports VML.\\r\\n \\\\*/\\r\\n R.svg = !(R.vml = R.type == \\\"VML\\\");\\r\\n R._Paper = Paper;\\r\\n /*\\\\\\r\\n * Raphael.fn\\r\\n [ property (object) ]\\r\\n **\\r\\n * You can add your own method to the canvas. For example if you want to draw a pie chart,\\r\\n * you can create your own pie chart function and ship it as a Raphaël plugin. To do this\\r\\n * you need to extend the `Raphael.fn` object. You should modify the `fn` object before a\\r\\n * Raphaël instance is created, otherwise it will take no effect. Please note that the\\r\\n * ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to\\r\\n * ensure any namespacing ensures proper context.\\r\\n > Usage\\r\\n | Raphael.fn.arrow = function (x1, y1, x2, y2, size) {\\r\\n | return this.path( ... );\\r\\n | };\\r\\n | // or create namespace\\r\\n | Raphael.fn.mystuff = {\\r\\n | arrow: function () {…},\\r\\n | star: function () {…},\\r\\n | // etc…\\r\\n | };\\r\\n | var paper = Raphael(10, 10, 630, 480);\\r\\n | // then use it\\r\\n | paper.arrow(10, 10, 30, 30, 5).attr({fill: \\\"#f00\\\"});\\r\\n | paper.mystuff.arrow();\\r\\n | paper.mystuff.star();\\r\\n \\\\*/\\r\\n R.fn = paperproto = Paper.prototype = R.prototype;\\r\\n R._id = 0;\\r\\n R._oid = 0;\\r\\n /*\\\\\\r\\n * Raphael.is\\r\\n [ method ]\\r\\n **\\r\\n * Handful of replacements for `typeof` operator.\\r\\n > Parameters\\r\\n - o (…) any object or primitive\\r\\n - type (string) name of the type, i.e. “string”, “function”, “number”, etc.\\r\\n = (boolean) is given value is of given type\\r\\n \\\\*/\\r\\n R.is = function (o, type) {\\r\\n type = lowerCase.call(type);\\r\\n if (type == \\\"finite\\\") {\\r\\n return !isnan[has](+o);\\r\\n }\\r\\n if (type == \\\"array\\\") {\\r\\n return o instanceof Array;\\r\\n }\\r\\n return (type == \\\"null\\\" && o === null) ||\\r\\n (type == typeof o && o !== null) ||\\r\\n (type == \\\"object\\\" && o === Object(o)) ||\\r\\n (type == \\\"array\\\" && Array.isArray && Array.isArray(o)) ||\\r\\n objectToString.call(o).slice(8, -1).toLowerCase() == type;\\r\\n };\\r\\n\\r\\n function clone(obj) {\\r\\n if (typeof obj == \\\"function\\\" || Object(obj) !== obj) {\\r\\n return obj;\\r\\n }\\r\\n var res = new obj.constructor;\\r\\n for (var key in obj) if (obj[has](key)) {\\r\\n res[key] = clone(obj[key]);\\r\\n }\\r\\n return res;\\r\\n }\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.angle\\r\\n [ method ]\\r\\n **\\r\\n * Returns angle between two or three points\\r\\n > Parameters\\r\\n - x1 (number) x coord of first point\\r\\n - y1 (number) y coord of first point\\r\\n - x2 (number) x coord of second point\\r\\n - y2 (number) y coord of second point\\r\\n - x3 (number) #optional x coord of third point\\r\\n - y3 (number) #optional y coord of third point\\r\\n = (number) angle in degrees.\\r\\n \\\\*/\\r\\n R.angle = function (x1, y1, x2, y2, x3, y3) {\\r\\n if (x3 == null) {\\r\\n var x = x1 - x2,\\r\\n y = y1 - y2;\\r\\n if (!x && !y) {\\r\\n return 0;\\r\\n }\\r\\n return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360;\\r\\n } else {\\r\\n return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3);\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.rad\\r\\n [ method ]\\r\\n **\\r\\n * Transform angle to radians\\r\\n > Parameters\\r\\n - deg (number) angle in degrees\\r\\n = (number) angle in radians.\\r\\n \\\\*/\\r\\n R.rad = function (deg) {\\r\\n return deg % 360 * PI / 180;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.deg\\r\\n [ method ]\\r\\n **\\r\\n * Transform angle to degrees\\r\\n > Parameters\\r\\n - rad (number) angle in radians\\r\\n = (number) angle in degrees.\\r\\n \\\\*/\\r\\n R.deg = function (rad) {\\r\\n return Math.round ((rad * 180 / PI% 360)* 1000) / 1000;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.snapTo\\r\\n [ method ]\\r\\n **\\r\\n * Snaps given value to given grid.\\r\\n > Parameters\\r\\n - values (array|number) given array of values or step of the grid\\r\\n - value (number) value to adjust\\r\\n - tolerance (number) #optional tolerance for snapping. Default is `10`.\\r\\n = (number) adjusted value.\\r\\n \\\\*/\\r\\n R.snapTo = function (values, value, tolerance) {\\r\\n tolerance = R.is(tolerance, \\\"finite\\\") ? tolerance : 10;\\r\\n if (R.is(values, array)) {\\r\\n var i = values.length;\\r\\n while (i--) if (abs(values[i] - value) <= tolerance) {\\r\\n return values[i];\\r\\n }\\r\\n } else {\\r\\n values = +values;\\r\\n var rem = value % values;\\r\\n if (rem < tolerance) {\\r\\n return value - rem;\\r\\n }\\r\\n if (rem > values - tolerance) {\\r\\n return value - rem + values;\\r\\n }\\r\\n }\\r\\n return value;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.createUUID\\r\\n [ method ]\\r\\n **\\r\\n * Returns RFC4122, version 4 ID\\r\\n \\\\*/\\r\\n var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) {\\r\\n return function () {\\r\\n return \\\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\\\".replace(uuidRegEx, uuidReplacer).toUpperCase();\\r\\n };\\r\\n })(/[xy]/g, function (c) {\\r\\n var r = math.random() * 16 | 0,\\r\\n v = c == \\\"x\\\" ? r : (r & 3 | 8);\\r\\n return v.toString(16);\\r\\n });\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.setWindow\\r\\n [ method ]\\r\\n **\\r\\n * Used when you need to draw in `<iframe>`. Switched window to the iframe one.\\r\\n > Parameters\\r\\n - newwin (window) new window object\\r\\n \\\\*/\\r\\n R.setWindow = function (newwin) {\\r\\n eve(\\\"raphael.setWindow\\\", R, g.win, newwin);\\r\\n g.win = newwin;\\r\\n g.doc = g.win.document;\\r\\n if (R._engine.initWin) {\\r\\n R._engine.initWin(g.win);\\r\\n }\\r\\n };\\r\\n var toHex = function (color) {\\r\\n if (R.vml) {\\r\\n // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/\\r\\n var trim = /^\\\\s+|\\\\s+$/g;\\r\\n var bod;\\r\\n try {\\r\\n var docum = new ActiveXObject(\\\"htmlfile\\\");\\r\\n docum.write(\\\"<body>\\\");\\r\\n docum.close();\\r\\n bod = docum.body;\\r\\n } catch(e) {\\r\\n bod = createPopup().document.body;\\r\\n }\\r\\n var range = bod.createTextRange();\\r\\n toHex = cacher(function (color) {\\r\\n try {\\r\\n bod.style.color = Str(color).replace(trim, E);\\r\\n var value = range.queryCommandValue(\\\"ForeColor\\\");\\r\\n value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16);\\r\\n return \\\"#\\\" + (\\\"000000\\\" + value.toString(16)).slice(-6);\\r\\n } catch(e) {\\r\\n return \\\"none\\\";\\r\\n }\\r\\n });\\r\\n } else {\\r\\n var i = g.doc.createElement(\\\"i\\\");\\r\\n i.title = \\\"Rapha\\\\xebl Colour Picker\\\";\\r\\n i.style.display = \\\"none\\\";\\r\\n g.doc.body.appendChild(i);\\r\\n toHex = cacher(function (color) {\\r\\n i.style.color = color;\\r\\n return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue(\\\"color\\\");\\r\\n });\\r\\n }\\r\\n return toHex(color);\\r\\n },\\r\\n hsbtoString = function () {\\r\\n return \\\"hsb(\\\" + [this.h, this.s, this.b] + \\\")\\\";\\r\\n },\\r\\n hsltoString = function () {\\r\\n return \\\"hsl(\\\" + [this.h, this.s, this.l] + \\\")\\\";\\r\\n },\\r\\n rgbtoString = function () {\\r\\n return this.hex;\\r\\n },\\r\\n prepareRGB = function (r, g, b) {\\r\\n if (g == null && R.is(r, \\\"object\\\") && \\\"r\\\" in r && \\\"g\\\" in r && \\\"b\\\" in r) {\\r\\n b = r.b;\\r\\n g = r.g;\\r\\n r = r.r;\\r\\n }\\r\\n if (g == null && R.is(r, string)) {\\r\\n var clr = R.getRGB(r);\\r\\n r = clr.r;\\r\\n g = clr.g;\\r\\n b = clr.b;\\r\\n }\\r\\n if (r > 1 || g > 1 || b > 1) {\\r\\n r /= 255;\\r\\n g /= 255;\\r\\n b /= 255;\\r\\n }\\r\\n\\r\\n return [r, g, b];\\r\\n },\\r\\n packageRGB = function (r, g, b, o) {\\r\\n r *= 255;\\r\\n g *= 255;\\r\\n b *= 255;\\r\\n var rgb = {\\r\\n r: r,\\r\\n g: g,\\r\\n b: b,\\r\\n hex: R.rgb(r, g, b),\\r\\n toString: rgbtoString\\r\\n };\\r\\n R.is(o, \\\"finite\\\") && (rgb.opacity = o);\\r\\n return rgb;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.color\\r\\n [ method ]\\r\\n **\\r\\n * Parses the color string and returns object with all values for the given color.\\r\\n > Parameters\\r\\n - clr (string) color string in one of the supported formats (see @Raphael.getRGB)\\r\\n = (object) Combined RGB & HSB object in format:\\r\\n o {\\r\\n o r (number) red,\\r\\n o g (number) green,\\r\\n o b (number) blue,\\r\\n o hex (string) color in HTML/CSS format: #••••••,\\r\\n o error (boolean) `true` if string can’t be parsed,\\r\\n o h (number) hue,\\r\\n o s (number) saturation,\\r\\n o v (number) value (brightness),\\r\\n o l (number) lightness\\r\\n o }\\r\\n \\\\*/\\r\\n R.color = function (clr) {\\r\\n var rgb;\\r\\n if (R.is(clr, \\\"object\\\") && \\\"h\\\" in clr && \\\"s\\\" in clr && \\\"b\\\" in clr) {\\r\\n rgb = R.hsb2rgb(clr);\\r\\n clr.r = rgb.r;\\r\\n clr.g = rgb.g;\\r\\n clr.b = rgb.b;\\r\\n clr.hex = rgb.hex;\\r\\n } else if (R.is(clr, \\\"object\\\") && \\\"h\\\" in clr && \\\"s\\\" in clr && \\\"l\\\" in clr) {\\r\\n rgb = R.hsl2rgb(clr);\\r\\n clr.r = rgb.r;\\r\\n clr.g = rgb.g;\\r\\n clr.b = rgb.b;\\r\\n clr.hex = rgb.hex;\\r\\n } else {\\r\\n if (R.is(clr, \\\"string\\\")) {\\r\\n clr = R.getRGB(clr);\\r\\n }\\r\\n if (R.is(clr, \\\"object\\\") && \\\"r\\\" in clr && \\\"g\\\" in clr && \\\"b\\\" in clr) {\\r\\n rgb = R.rgb2hsl(clr);\\r\\n clr.h = rgb.h;\\r\\n clr.s = rgb.s;\\r\\n clr.l = rgb.l;\\r\\n rgb = R.rgb2hsb(clr);\\r\\n clr.v = rgb.b;\\r\\n } else {\\r\\n clr = {hex: \\\"none\\\"};\\r\\n clr.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1;\\r\\n }\\r\\n }\\r\\n clr.toString = rgbtoString;\\r\\n return clr;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.hsb2rgb\\r\\n [ method ]\\r\\n **\\r\\n * Converts HSB values to RGB object.\\r\\n > Parameters\\r\\n - h (number) hue\\r\\n - s (number) saturation\\r\\n - v (number) value or brightness\\r\\n = (object) RGB object in format:\\r\\n o {\\r\\n o r (number) red,\\r\\n o g (number) green,\\r\\n o b (number) blue,\\r\\n o hex (string) color in HTML/CSS format: #••••••\\r\\n o }\\r\\n \\\\*/\\r\\n R.hsb2rgb = function (h, s, v, o) {\\r\\n if (this.is(h, \\\"object\\\") && \\\"h\\\" in h && \\\"s\\\" in h && \\\"b\\\" in h) {\\r\\n v = h.b;\\r\\n s = h.s;\\r\\n o = h.o;\\r\\n h = h.h;\\r\\n }\\r\\n h *= 360;\\r\\n var R, G, B, X, C;\\r\\n h = (h % 360) / 60;\\r\\n C = v * s;\\r\\n X = C * (1 - abs(h % 2 - 1));\\r\\n R = G = B = v - C;\\r\\n\\r\\n h = ~~h;\\r\\n R += [C, X, 0, 0, X, C][h];\\r\\n G += [X, C, C, X, 0, 0][h];\\r\\n B += [0, 0, X, C, C, X][h];\\r\\n return packageRGB(R, G, B, o);\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.hsl2rgb\\r\\n [ method ]\\r\\n **\\r\\n * Converts HSL values to RGB object.\\r\\n > Parameters\\r\\n - h (number) hue\\r\\n - s (number) saturation\\r\\n - l (number) luminosity\\r\\n = (object) RGB object in format:\\r\\n o {\\r\\n o r (number) red,\\r\\n o g (number) green,\\r\\n o b (number) blue,\\r\\n o hex (string) color in HTML/CSS format: #••••••\\r\\n o }\\r\\n \\\\*/\\r\\n R.hsl2rgb = function (h, s, l, o) {\\r\\n if (this.is(h, \\\"object\\\") && \\\"h\\\" in h && \\\"s\\\" in h && \\\"l\\\" in h) {\\r\\n l = h.l;\\r\\n s = h.s;\\r\\n h = h.h;\\r\\n }\\r\\n if (h > 1 || s > 1 || l > 1) {\\r\\n h /= 360;\\r\\n s /= 100;\\r\\n l /= 100;\\r\\n }\\r\\n h *= 360;\\r\\n var R, G, B, X, C;\\r\\n h = (h % 360) / 60;\\r\\n C = 2 * s * (l < .5 ? l : 1 - l);\\r\\n X = C * (1 - abs(h % 2 - 1));\\r\\n R = G = B = l - C / 2;\\r\\n\\r\\n h = ~~h;\\r\\n R += [C, X, 0, 0, X, C][h];\\r\\n G += [X, C, C, X, 0, 0][h];\\r\\n B += [0, 0, X, C, C, X][h];\\r\\n return packageRGB(R, G, B, o);\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.rgb2hsb\\r\\n [ method ]\\r\\n **\\r\\n * Converts RGB values to HSB object.\\r\\n > Parameters\\r\\n - r (number) red\\r\\n - g (number) green\\r\\n - b (number) blue\\r\\n = (object) HSB object in format:\\r\\n o {\\r\\n o h (number) hue\\r\\n o s (number) saturation\\r\\n o b (number) brightness\\r\\n o }\\r\\n \\\\*/\\r\\n R.rgb2hsb = function (r, g, b) {\\r\\n b = prepareRGB(r, g, b);\\r\\n r = b[0];\\r\\n g = b[1];\\r\\n b = b[2];\\r\\n\\r\\n var H, S, V, C;\\r\\n V = mmax(r, g, b);\\r\\n C = V - mmin(r, g, b);\\r\\n H = (C == 0 ? null :\\r\\n V == r ? (g - b) / C :\\r\\n V == g ? (b - r) / C + 2 :\\r\\n (r - g) / C + 4\\r\\n );\\r\\n H = ((H + 360) % 6) * 60 / 360;\\r\\n S = C == 0 ? 0 : C / V;\\r\\n return {h: H, s: S, b: V, toString: hsbtoString};\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.rgb2hsl\\r\\n [ method ]\\r\\n **\\r\\n * Converts RGB values to HSL object.\\r\\n > Parameters\\r\\n - r (number) red\\r\\n - g (number) green\\r\\n - b (number) blue\\r\\n = (object) HSL object in format:\\r\\n o {\\r\\n o h (number) hue\\r\\n o s (number) saturation\\r\\n o l (number) luminosity\\r\\n o }\\r\\n \\\\*/\\r\\n R.rgb2hsl = function (r, g, b) {\\r\\n b = prepareRGB(r, g, b);\\r\\n r = b[0];\\r\\n g = b[1];\\r\\n b = b[2];\\r\\n\\r\\n var H, S, L, M, m, C;\\r\\n M = mmax(r, g, b);\\r\\n m = mmin(r, g, b);\\r\\n C = M - m;\\r\\n H = (C == 0 ? null :\\r\\n M == r ? (g - b) / C :\\r\\n M == g ? (b - r) / C + 2 :\\r\\n (r - g) / C + 4);\\r\\n H = ((H + 360) % 6) * 60 / 360;\\r\\n L = (M + m) / 2;\\r\\n S = (C == 0 ? 0 :\\r\\n L < .5 ? C / (2 * L) :\\r\\n C / (2 - 2 * L));\\r\\n return {h: H, s: S, l: L, toString: hsltoString};\\r\\n };\\r\\n R._path2string = function () {\\r\\n return this.join(\\\",\\\").replace(p2s, \\\"$1\\\");\\r\\n };\\r\\n function repush(array, item) {\\r\\n for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) {\\r\\n return array.push(array.splice(i, 1)[0]);\\r\\n }\\r\\n }\\r\\n function cacher(f, scope, postprocessor) {\\r\\n function newf() {\\r\\n var arg = Array.prototype.slice.call(arguments, 0),\\r\\n args = arg.join(\\\"\\\\u2400\\\"),\\r\\n cache = newf.cache = newf.cache || {},\\r\\n count = newf.count = newf.count || [];\\r\\n if (cache[has](args)) {\\r\\n repush(count, args);\\r\\n return postprocessor ? postprocessor(cache[args]) : cache[args];\\r\\n }\\r\\n count.length >= 1e3 && delete cache[count.shift()];\\r\\n count.push(args);\\r\\n cache[args] = f[apply](scope, arg);\\r\\n return postprocessor ? postprocessor(cache[args]) : cache[args];\\r\\n }\\r\\n return newf;\\r\\n }\\r\\n\\r\\n var preload = R._preload = function (src, f) {\\r\\n var img = g.doc.createElement(\\\"img\\\");\\r\\n img.style.cssText = \\\"position:absolute;left:-9999em;top:-9999em\\\";\\r\\n img.onload = function () {\\r\\n f.call(this);\\r\\n this.onload = null;\\r\\n g.doc.body.removeChild(this);\\r\\n };\\r\\n img.onerror = function () {\\r\\n g.doc.body.removeChild(this);\\r\\n };\\r\\n g.doc.body.appendChild(img);\\r\\n img.src = src;\\r\\n };\\r\\n\\r\\n function clrToString() {\\r\\n return this.hex;\\r\\n }\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.getRGB\\r\\n [ method ]\\r\\n **\\r\\n * Parses colour string as RGB object\\r\\n > Parameters\\r\\n - colour (string) colour string in one of formats:\\r\\n # <ul>\\r\\n # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>\\r\\n # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>\\r\\n # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>\\r\\n # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li>\\r\\n # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li>\\r\\n # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li>\\r\\n # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>\\r\\n # <li>hsl(•••, •••, •••) — same as hsb</li>\\r\\n # <li>hsl(•••%, •••%, •••%) — same as hsb</li>\\r\\n # </ul>\\r\\n = (object) RGB object in format:\\r\\n o {\\r\\n o r (number) red,\\r\\n o g (number) green,\\r\\n o b (number) blue\\r\\n o hex (string) color in HTML/CSS format: #••••••,\\r\\n o error (boolean) true if string can’t be parsed\\r\\n o }\\r\\n \\\\*/\\r\\n R.getRGB = cacher(function (colour) {\\r\\n if (!colour || !!((colour = Str(colour)).indexOf(\\\"-\\\") + 1)) {\\r\\n return {r: -1, g: -1, b: -1, hex: \\\"none\\\", error: 1, toString: clrToString};\\r\\n }\\r\\n if (colour == \\\"none\\\") {\\r\\n return {r: -1, g: -1, b: -1, hex: \\\"none\\\", toString: clrToString};\\r\\n }\\r\\n !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == \\\"#\\\") && (colour = toHex(colour));\\r\\n var res,\\r\\n red,\\r\\n green,\\r\\n blue,\\r\\n opacity,\\r\\n t,\\r\\n values,\\r\\n rgb = colour.match(colourRegExp);\\r\\n if (rgb) {\\r\\n if (rgb[2]) {\\r\\n blue = toInt(rgb[2].substring(5), 16);\\r\\n green = toInt(rgb[2].substring(3, 5), 16);\\r\\n red = toInt(rgb[2].substring(1, 3), 16);\\r\\n }\\r\\n if (rgb[3]) {\\r\\n blue = toInt((t = rgb[3].charAt(3)) + t, 16);\\r\\n green = toInt((t = rgb[3].charAt(2)) + t, 16);\\r\\n red = toInt((t = rgb[3].charAt(1)) + t, 16);\\r\\n }\\r\\n if (rgb[4]) {\\r\\n values = rgb[4][split](commaSpaces);\\r\\n red = toFloat(values[0]);\\r\\n values[0].slice(-1) == \\\"%\\\" && (red *= 2.55);\\r\\n green = toFloat(values[1]);\\r\\n values[1].slice(-1) == \\\"%\\\" && (green *= 2.55);\\r\\n blue = toFloat(values[2]);\\r\\n values[2].slice(-1) == \\\"%\\\" && (blue *= 2.55);\\r\\n rgb[1].toLowerCase().slice(0, 4) == \\\"rgba\\\" && (opacity = toFloat(values[3]));\\r\\n values[3] && values[3].slice(-1) == \\\"%\\\" && (opacity /= 100);\\r\\n }\\r\\n if (rgb[5]) {\\r\\n values = rgb[5][split](commaSpaces);\\r\\n red = toFloat(values[0]);\\r\\n values[0].slice(-1) == \\\"%\\\" && (red *= 2.55);\\r\\n green = toFloat(values[1]);\\r\\n values[1].slice(-1) == \\\"%\\\" && (green *= 2.55);\\r\\n blue = toFloat(values[2]);\\r\\n values[2].slice(-1) == \\\"%\\\" && (blue *= 2.55);\\r\\n (values[0].slice(-3) == \\\"deg\\\" || values[0].slice(-1) == \\\"\\\\xb0\\\") && (red /= 360);\\r\\n rgb[1].toLowerCase().slice(0, 4) == \\\"hsba\\\" && (opacity = toFloat(values[3]));\\r\\n values[3] && values[3].slice(-1) == \\\"%\\\" && (opacity /= 100);\\r\\n return R.hsb2rgb(red, green, blue, opacity);\\r\\n }\\r\\n if (rgb[6]) {\\r\\n values = rgb[6][split](commaSpaces);\\r\\n red = toFloat(values[0]);\\r\\n values[0].slice(-1) == \\\"%\\\" && (red *= 2.55);\\r\\n green = toFloat(values[1]);\\r\\n values[1].slice(-1) == \\\"%\\\" && (green *= 2.55);\\r\\n blue = toFloat(values[2]);\\r\\n values[2].slice(-1) == \\\"%\\\" && (blue *= 2.55);\\r\\n (values[0].slice(-3) == \\\"deg\\\" || values[0].slice(-1) == \\\"\\\\xb0\\\") && (red /= 360);\\r\\n rgb[1].toLowerCase().slice(0, 4) == \\\"hsla\\\" && (opacity = toFloat(values[3]));\\r\\n values[3] && values[3].slice(-1) == \\\"%\\\" && (opacity /= 100);\\r\\n return R.hsl2rgb(red, green, blue, opacity);\\r\\n }\\r\\n rgb = {r: red, g: green, b: blue, toString: clrToString};\\r\\n rgb.hex = \\\"#\\\" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1);\\r\\n R.is(opacity, \\\"finite\\\") && (rgb.opacity = opacity);\\r\\n return rgb;\\r\\n }\\r\\n return {r: -1, g: -1, b: -1, hex: \\\"none\\\", error: 1, toString: clrToString};\\r\\n }, R);\\r\\n /*\\\\\\r\\n * Raphael.hsb\\r\\n [ method ]\\r\\n **\\r\\n * Converts HSB values to hex representation of the colour.\\r\\n > Parameters\\r\\n - h (number) hue\\r\\n - s (number) saturation\\r\\n - b (number) value or brightness\\r\\n = (string) hex representation of the colour.\\r\\n \\\\*/\\r\\n R.hsb = cacher(function (h, s, b) {\\r\\n return R.hsb2rgb(h, s, b).hex;\\r\\n });\\r\\n /*\\\\\\r\\n * Raphael.hsl\\r\\n [ method ]\\r\\n **\\r\\n * Converts HSL values to hex representation of the colour.\\r\\n > Parameters\\r\\n - h (number) hue\\r\\n - s (number) saturation\\r\\n - l (number) luminosity\\r\\n = (string) hex representation of the colour.\\r\\n \\\\*/\\r\\n R.hsl = cacher(function (h, s, l) {\\r\\n return R.hsl2rgb(h, s, l).hex;\\r\\n });\\r\\n /*\\\\\\r\\n * Raphael.rgb\\r\\n [ method ]\\r\\n **\\r\\n * Converts RGB values to hex representation of the colour.\\r\\n > Parameters\\r\\n - r (number) red\\r\\n - g (number) green\\r\\n - b (number) blue\\r\\n = (string) hex representation of the colour.\\r\\n \\\\*/\\r\\n R.rgb = cacher(function (r, g, b) {\\r\\n function round(x) { return (x + 0.5) | 0; }\\r\\n return \\\"#\\\" + (16777216 | round(b) | (round(g) << 8) | (round(r) << 16)).toString(16).slice(1);\\r\\n });\\r\\n /*\\\\\\r\\n * Raphael.getColor\\r\\n [ method ]\\r\\n **\\r\\n * On each call returns next colour in the spectrum. To reset it back to red call @Raphael.getColor.reset\\r\\n > Parameters\\r\\n - value (number) #optional brightness, default is `0.75`\\r\\n = (string) hex representation of the colour.\\r\\n \\\\*/\\r\\n R.getColor = function (value) {\\r\\n var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75},\\r\\n rgb = this.hsb2rgb(start.h, start.s, start.b);\\r\\n start.h += .075;\\r\\n if (start.h > 1) {\\r\\n start.h = 0;\\r\\n start.s -= .2;\\r\\n start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b});\\r\\n }\\r\\n return rgb.hex;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.getColor.reset\\r\\n [ method ]\\r\\n **\\r\\n * Resets spectrum position for @Raphael.getColor back to red.\\r\\n \\\\*/\\r\\n R.getColor.reset = function () {\\r\\n delete this.start;\\r\\n };\\r\\n\\r\\n // http://schepers.cc/getting-to-the-point\\r\\n function catmullRom2bezier(crp, z) {\\r\\n var d = [];\\r\\n for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {\\r\\n var p = [\\r\\n {x: +crp[i - 2], y: +crp[i - 1]},\\r\\n {x: +crp[i], y: +crp[i + 1]},\\r\\n {x: +crp[i + 2], y: +crp[i + 3]},\\r\\n {x: +crp[i + 4], y: +crp[i + 5]}\\r\\n ];\\r\\n if (z) {\\r\\n if (!i) {\\r\\n p[0] = {x: +crp[iLen - 2], y: +crp[iLen - 1]};\\r\\n } else if (iLen - 4 == i) {\\r\\n p[3] = {x: +crp[0], y: +crp[1]};\\r\\n } else if (iLen - 2 == i) {\\r\\n p[2] = {x: +crp[0], y: +crp[1]};\\r\\n p[3] = {x: +crp[2], y: +crp[3]};\\r\\n }\\r\\n } else {\\r\\n if (iLen - 4 == i) {\\r\\n p[3] = p[2];\\r\\n } else if (!i) {\\r\\n p[0] = {x: +crp[i], y: +crp[i + 1]};\\r\\n }\\r\\n }\\r\\n d.push([\\\"C\\\",\\r\\n (-p[0].x + 6 * p[1].x + p[2].x) / 6,\\r\\n (-p[0].y + 6 * p[1].y + p[2].y) / 6,\\r\\n (p[1].x + 6 * p[2].x - p[3].x) / 6,\\r\\n (p[1].y + 6*p[2].y - p[3].y) / 6,\\r\\n p[2].x,\\r\\n p[2].y\\r\\n ]);\\r\\n }\\r\\n\\r\\n return d;\\r\\n }\\r\\n /*\\\\\\r\\n * Raphael.parsePathString\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Parses given path string into an array of arrays of path segments.\\r\\n > Parameters\\r\\n - pathString (string|array) path string or array of segments (in the last case it will be returned straight away)\\r\\n = (array) array of segments.\\r\\n \\\\*/\\r\\n R.parsePathString = function (pathString) {\\r\\n if (!pathString) {\\r\\n return null;\\r\\n }\\r\\n var pth = paths(pathString);\\r\\n if (pth.arr) {\\r\\n return pathClone(pth.arr);\\r\\n }\\r\\n\\r\\n var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0},\\r\\n data = [];\\r\\n if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption\\r\\n data = pathClone(pathString);\\r\\n }\\r\\n if (!data.length) {\\r\\n Str(pathString).replace(pathCommand, function (a, b, c) {\\r\\n var params = [],\\r\\n name = b.toLowerCase();\\r\\n c.replace(pathValues, function (a, b) {\\r\\n b && params.push(+b);\\r\\n });\\r\\n if (name == \\\"m\\\" && params.length > 2) {\\r\\n data.push([b][concat](params.splice(0, 2)));\\r\\n name = \\\"l\\\";\\r\\n b = b == \\\"m\\\" ? \\\"l\\\" : \\\"L\\\";\\r\\n }\\r\\n if (name == \\\"r\\\") {\\r\\n data.push([b][concat](params));\\r\\n } else while (params.length >= paramCounts[name]) {\\r\\n data.push([b][concat](params.splice(0, paramCounts[name])));\\r\\n if (!paramCounts[name]) {\\r\\n break;\\r\\n }\\r\\n }\\r\\n });\\r\\n }\\r\\n data.toString = R._path2string;\\r\\n pth.arr = pathClone(data);\\r\\n return data;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.parseTransformString\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Parses given path string into an array of transformations.\\r\\n > Parameters\\r\\n - TString (string|array) transform string or array of transformations (in the last case it will be returned straight away)\\r\\n = (array) array of transformations.\\r\\n \\\\*/\\r\\n R.parseTransformString = cacher(function (TString) {\\r\\n if (!TString) {\\r\\n return null;\\r\\n }\\r\\n var paramCounts = {r: 3, s: 4, t: 2, m: 6},\\r\\n data = [];\\r\\n if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption\\r\\n data = pathClone(TString);\\r\\n }\\r\\n if (!data.length) {\\r\\n Str(TString).replace(tCommand, function (a, b, c) {\\r\\n var params = [],\\r\\n name = lowerCase.call(b);\\r\\n c.replace(pathValues, function (a, b) {\\r\\n b && params.push(+b);\\r\\n });\\r\\n data.push([b][concat](params));\\r\\n });\\r\\n }\\r\\n data.toString = R._path2string;\\r\\n return data;\\r\\n });\\r\\n // PATHS\\r\\n var paths = function (ps) {\\r\\n var p = paths.ps = paths.ps || {};\\r\\n if (p[ps]) {\\r\\n p[ps].sleep = 100;\\r\\n } else {\\r\\n p[ps] = {\\r\\n sleep: 100\\r\\n };\\r\\n }\\r\\n setTimeout(function () {\\r\\n for (var key in p) if (p[has](key) && key != ps) {\\r\\n p[key].sleep--;\\r\\n !p[key].sleep && delete p[key];\\r\\n }\\r\\n });\\r\\n return p[ps];\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.findDotsAtSegment\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Find dot coordinates on the given cubic bezier curve at the given t.\\r\\n > Parameters\\r\\n - p1x (number) x of the first point of the curve\\r\\n - p1y (number) y of the first point of the curve\\r\\n - c1x (number) x of the first anchor of the curve\\r\\n - c1y (number) y of the first anchor of the curve\\r\\n - c2x (number) x of the second anchor of the curve\\r\\n - c2y (number) y of the second anchor of the curve\\r\\n - p2x (number) x of the second point of the curve\\r\\n - p2y (number) y of the second point of the curve\\r\\n - t (number) position on the curve (0..1)\\r\\n = (object) point information in format:\\r\\n o {\\r\\n o x: (number) x coordinate of the point\\r\\n o y: (number) y coordinate of the point\\r\\n o m: {\\r\\n o x: (number) x coordinate of the left anchor\\r\\n o y: (number) y coordinate of the left anchor\\r\\n o }\\r\\n o n: {\\r\\n o x: (number) x coordinate of the right anchor\\r\\n o y: (number) y coordinate of the right anchor\\r\\n o }\\r\\n o start: {\\r\\n o x: (number) x coordinate of the start of the curve\\r\\n o y: (number) y coordinate of the start of the curve\\r\\n o }\\r\\n o end: {\\r\\n o x: (number) x coordinate of the end of the curve\\r\\n o y: (number) y coordinate of the end of the curve\\r\\n o }\\r\\n o alpha: (number) angle of the curve derivative at the point\\r\\n o }\\r\\n \\\\*/\\r\\n R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\\r\\n var t1 = 1 - t,\\r\\n t13 = pow(t1, 3),\\r\\n t12 = pow(t1, 2),\\r\\n t2 = t * t,\\r\\n t3 = t2 * t,\\r\\n x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x,\\r\\n y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y,\\r\\n mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x),\\r\\n my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y),\\r\\n nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x),\\r\\n ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y),\\r\\n ax = t1 * p1x + t * c1x,\\r\\n ay = t1 * p1y + t * c1y,\\r\\n cx = t1 * c2x + t * p2x,\\r\\n cy = t1 * c2y + t * p2y,\\r\\n alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI);\\r\\n (mx > nx || my < ny) && (alpha += 180);\\r\\n return {\\r\\n x: x,\\r\\n y: y,\\r\\n m: {x: mx, y: my},\\r\\n n: {x: nx, y: ny},\\r\\n start: {x: ax, y: ay},\\r\\n end: {x: cx, y: cy},\\r\\n alpha: alpha\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.bezierBBox\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Return bounding box of a given cubic bezier curve\\r\\n > Parameters\\r\\n - p1x (number) x of the first point of the curve\\r\\n - p1y (number) y of the first point of the curve\\r\\n - c1x (number) x of the first anchor of the curve\\r\\n - c1y (number) y of the first anchor of the curve\\r\\n - c2x (number) x of the second anchor of the curve\\r\\n - c2y (number) y of the second anchor of the curve\\r\\n - p2x (number) x of the second point of the curve\\r\\n - p2y (number) y of the second point of the curve\\r\\n * or\\r\\n - bez (array) array of six points for bezier curve\\r\\n = (object) point information in format:\\r\\n o {\\r\\n o min: {\\r\\n o x: (number) x coordinate of the left point\\r\\n o y: (number) y coordinate of the top point\\r\\n o }\\r\\n o max: {\\r\\n o x: (number) x coordinate of the right point\\r\\n o y: (number) y coordinate of the bottom point\\r\\n o }\\r\\n o }\\r\\n \\\\*/\\r\\n R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\\r\\n if (!R.is(p1x, \\\"array\\\")) {\\r\\n p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y];\\r\\n }\\r\\n var bbox = curveDim.apply(null, p1x);\\r\\n return {\\r\\n x: bbox.min.x,\\r\\n y: bbox.min.y,\\r\\n x2: bbox.max.x,\\r\\n y2: bbox.max.y,\\r\\n width: bbox.max.x - bbox.min.x,\\r\\n height: bbox.max.y - bbox.min.y\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.isPointInsideBBox\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns `true` if given point is inside bounding boxes.\\r\\n > Parameters\\r\\n - bbox (string) bounding box\\r\\n - x (string) x coordinate of the point\\r\\n - y (string) y coordinate of the point\\r\\n = (boolean) `true` if point inside\\r\\n \\\\*/\\r\\n R.isPointInsideBBox = function (bbox, x, y) {\\r\\n return x >= bbox.x && x <= bbox.x2 && y >= bbox.y && y <= bbox.y2;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.isBBoxIntersect\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns `true` if two bounding boxes intersect\\r\\n > Parameters\\r\\n - bbox1 (string) first bounding box\\r\\n - bbox2 (string) second bounding box\\r\\n = (boolean) `true` if they intersect\\r\\n \\\\*/\\r\\n R.isBBoxIntersect = function (bbox1, bbox2) {\\r\\n var i = R.isPointInsideBBox;\\r\\n return i(bbox2, bbox1.x, bbox1.y)\\r\\n || i(bbox2, bbox1.x2, bbox1.y)\\r\\n || i(bbox2, bbox1.x, bbox1.y2)\\r\\n || i(bbox2, bbox1.x2, bbox1.y2)\\r\\n || i(bbox1, bbox2.x, bbox2.y)\\r\\n || i(bbox1, bbox2.x2, bbox2.y)\\r\\n || i(bbox1, bbox2.x, bbox2.y2)\\r\\n || i(bbox1, bbox2.x2, bbox2.y2)\\r\\n || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x)\\r\\n && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y);\\r\\n };\\r\\n function base3(t, p1, p2, p3, p4) {\\r\\n var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4,\\r\\n t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;\\r\\n return t * t2 - 3 * p1 + 3 * p2;\\r\\n }\\r\\n function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {\\r\\n if (z == null) {\\r\\n z = 1;\\r\\n }\\r\\n z = z > 1 ? 1 : z < 0 ? 0 : z;\\r\\n var z2 = z / 2,\\r\\n n = 12,\\r\\n Tvalues = [-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816],\\r\\n Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],\\r\\n sum = 0;\\r\\n for (var i = 0; i < n; i++) {\\r\\n var ct = z2 * Tvalues[i] + z2,\\r\\n xbase = base3(ct, x1, x2, x3, x4),\\r\\n ybase = base3(ct, y1, y2, y3, y4),\\r\\n comb = xbase * xbase + ybase * ybase;\\r\\n sum += Cvalues[i] * math.sqrt(comb);\\r\\n }\\r\\n return z2 * sum;\\r\\n }\\r\\n function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {\\r\\n if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) {\\r\\n return;\\r\\n }\\r\\n var t = 1,\\r\\n step = t / 2,\\r\\n t2 = t - step,\\r\\n l,\\r\\n e = .01;\\r\\n l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);\\r\\n while (abs(l - ll) > e) {\\r\\n step /= 2;\\r\\n t2 += (l < ll ? 1 : -1) * step;\\r\\n l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);\\r\\n }\\r\\n return t2;\\r\\n }\\r\\n function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {\\r\\n if (\\r\\n mmax(x1, x2) < mmin(x3, x4) ||\\r\\n mmin(x1, x2) > mmax(x3, x4) ||\\r\\n mmax(y1, y2) < mmin(y3, y4) ||\\r\\n mmin(y1, y2) > mmax(y3, y4)\\r\\n ) {\\r\\n return;\\r\\n }\\r\\n var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\\r\\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\\r\\n denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\\r\\n\\r\\n if (!denominator) {\\r\\n return;\\r\\n }\\r\\n var px = nx / denominator,\\r\\n py = ny / denominator,\\r\\n px2 = +px.toFixed(2),\\r\\n py2 = +py.toFixed(2);\\r\\n if (\\r\\n px2 < +mmin(x1, x2).toFixed(2) ||\\r\\n px2 > +mmax(x1, x2).toFixed(2) ||\\r\\n px2 < +mmin(x3, x4).toFixed(2) ||\\r\\n px2 > +mmax(x3, x4).toFixed(2) ||\\r\\n py2 < +mmin(y1, y2).toFixed(2) ||\\r\\n py2 > +mmax(y1, y2).toFixed(2) ||\\r\\n py2 < +mmin(y3, y4).toFixed(2) ||\\r\\n py2 > +mmax(y3, y4).toFixed(2)\\r\\n ) {\\r\\n return;\\r\\n }\\r\\n return {x: px, y: py};\\r\\n }\\r\\n function inter(bez1, bez2) {\\r\\n return interHelper(bez1, bez2);\\r\\n }\\r\\n function interCount(bez1, bez2) {\\r\\n return interHelper(bez1, bez2, 1);\\r\\n }\\r\\n function interHelper(bez1, bez2, justCount) {\\r\\n var bbox1 = R.bezierBBox(bez1),\\r\\n bbox2 = R.bezierBBox(bez2);\\r\\n if (!R.isBBoxIntersect(bbox1, bbox2)) {\\r\\n return justCount ? 0 : [];\\r\\n }\\r\\n var l1 = bezlen.apply(0, bez1),\\r\\n l2 = bezlen.apply(0, bez2),\\r\\n n1 = mmax(~~(l1 / 5), 1),\\r\\n n2 = mmax(~~(l2 / 5), 1),\\r\\n dots1 = [],\\r\\n dots2 = [],\\r\\n xy = {},\\r\\n res = justCount ? 0 : [];\\r\\n for (var i = 0; i < n1 + 1; i++) {\\r\\n var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1));\\r\\n dots1.push({x: p.x, y: p.y, t: i / n1});\\r\\n }\\r\\n for (i = 0; i < n2 + 1; i++) {\\r\\n p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2));\\r\\n dots2.push({x: p.x, y: p.y, t: i / n2});\\r\\n }\\r\\n for (i = 0; i < n1; i++) {\\r\\n for (var j = 0; j < n2; j++) {\\r\\n var di = dots1[i],\\r\\n di1 = dots1[i + 1],\\r\\n dj = dots2[j],\\r\\n dj1 = dots2[j + 1],\\r\\n ci = abs(di1.x - di.x) < .001 ? \\\"y\\\" : \\\"x\\\",\\r\\n cj = abs(dj1.x - dj.x) < .001 ? \\\"y\\\" : \\\"x\\\",\\r\\n is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y);\\r\\n if (is) {\\r\\n if (xy[is.x.toFixed(4)] == is.y.toFixed(4)) {\\r\\n continue;\\r\\n }\\r\\n xy[is.x.toFixed(4)] = is.y.toFixed(4);\\r\\n var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t),\\r\\n t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);\\r\\n if (t1 >= 0 && t1 <= 1.001 && t2 >= 0 && t2 <= 1.001) {\\r\\n if (justCount) {\\r\\n res++;\\r\\n } else {\\r\\n res.push({\\r\\n x: is.x,\\r\\n y: is.y,\\r\\n t1: mmin(t1, 1),\\r\\n t2: mmin(t2, 1)\\r\\n });\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n return res;\\r\\n }\\r\\n /*\\\\\\r\\n * Raphael.pathIntersection\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Finds intersections of two paths\\r\\n > Parameters\\r\\n - path1 (string) path string\\r\\n - path2 (string) path string\\r\\n = (array) dots of intersection\\r\\n o [\\r\\n o {\\r\\n o x: (number) x coordinate of the point\\r\\n o y: (number) y coordinate of the point\\r\\n o t1: (number) t value for segment of path1\\r\\n o t2: (number) t value for segment of path2\\r\\n o segment1: (number) order number for segment of path1\\r\\n o segment2: (number) order number for segment of path2\\r\\n o bez1: (array) eight coordinates representing beziér curve for the segment of path1\\r\\n o bez2: (array) eight coordinates representing beziér curve for the segment of path2\\r\\n o }\\r\\n o ]\\r\\n \\\\*/\\r\\n R.pathIntersection = function (path1, path2) {\\r\\n return interPathHelper(path1, path2);\\r\\n };\\r\\n R.pathIntersectionNumber = function (path1, path2) {\\r\\n return interPathHelper(path1, path2, 1);\\r\\n };\\r\\n function interPathHelper(path1, path2, justCount) {\\r\\n path1 = R._path2curve(path1);\\r\\n path2 = R._path2curve(path2);\\r\\n var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2,\\r\\n res = justCount ? 0 : [];\\r\\n for (var i = 0, ii = path1.length; i < ii; i++) {\\r\\n var pi = path1[i];\\r\\n if (pi[0] == \\\"M\\\") {\\r\\n x1 = x1m = pi[1];\\r\\n y1 = y1m = pi[2];\\r\\n } else {\\r\\n if (pi[0] == \\\"C\\\") {\\r\\n bez1 = [x1, y1].concat(pi.slice(1));\\r\\n x1 = bez1[6];\\r\\n y1 = bez1[7];\\r\\n } else {\\r\\n bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m];\\r\\n x1 = x1m;\\r\\n y1 = y1m;\\r\\n }\\r\\n for (var j = 0, jj = path2.length; j < jj; j++) {\\r\\n var pj = path2[j];\\r\\n if (pj[0] == \\\"M\\\") {\\r\\n x2 = x2m = pj[1];\\r\\n y2 = y2m = pj[2];\\r\\n } else {\\r\\n if (pj[0] == \\\"C\\\") {\\r\\n bez2 = [x2, y2].concat(pj.slice(1));\\r\\n x2 = bez2[6];\\r\\n y2 = bez2[7];\\r\\n } else {\\r\\n bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m];\\r\\n x2 = x2m;\\r\\n y2 = y2m;\\r\\n }\\r\\n var intr = interHelper(bez1, bez2, justCount);\\r\\n if (justCount) {\\r\\n res += intr;\\r\\n } else {\\r\\n for (var k = 0, kk = intr.length; k < kk; k++) {\\r\\n intr[k].segment1 = i;\\r\\n intr[k].segment2 = j;\\r\\n intr[k].bez1 = bez1;\\r\\n intr[k].bez2 = bez2;\\r\\n }\\r\\n res = res.concat(intr);\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n return res;\\r\\n }\\r\\n /*\\\\\\r\\n * Raphael.isPointInsidePath\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns `true` if given point is inside a given closed path.\\r\\n > Parameters\\r\\n - path (string) path string\\r\\n - x (number) x of the point\\r\\n - y (number) y of the point\\r\\n = (boolean) true, if point is inside the path\\r\\n \\\\*/\\r\\n R.isPointInsidePath = function (path, x, y) {\\r\\n var bbox = R.pathBBox(path);\\r\\n return R.isPointInsideBBox(bbox, x, y) &&\\r\\n interPathHelper(path, [[\\\"M\\\", x, y], [\\\"H\\\", bbox.x2 + 10]], 1) % 2 == 1;\\r\\n };\\r\\n R._removedFactory = function (methodname) {\\r\\n return function () {\\r\\n eve(\\\"raphael.log\\\", null, \\\"Rapha\\\\xebl: you are calling to method \\\\u201c\\\" + methodname + \\\"\\\\u201d of removed object\\\", methodname);\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.pathBBox\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Return bounding box of a given path\\r\\n > Parameters\\r\\n - path (string) path string\\r\\n = (object) bounding box\\r\\n o {\\r\\n o x: (number) x coordinate of the left top point of the box\\r\\n o y: (number) y coordinate of the left top point of the box\\r\\n o x2: (number) x coordinate of the right bottom point of the box\\r\\n o y2: (number) y coordinate of the right bottom point of the box\\r\\n o width: (number) width of the box\\r\\n o height: (number) height of the box\\r\\n o cx: (number) x coordinate of the center of the box\\r\\n o cy: (number) y coordinate of the center of the box\\r\\n o }\\r\\n \\\\*/\\r\\n var pathDimensions = R.pathBBox = function (path) {\\r\\n var pth = paths(path);\\r\\n if (pth.bbox) {\\r\\n var b= pth.bbox;\\r\\n return {x: b.x, y: b.y, width: b.width, height: b.height, x2: b.x2, y2: b.y2} ; // FREEGROUP FIX!!!!!!\\r\\n // raphael reuse the returned bbox. You must clone it here if the caller need the bbxo for\\r\\n //further calculation\\r\\n }\\r\\n if (!path) {\\r\\n return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0};\\r\\n }\\r\\n path = path2curve(path);\\r\\n var x = 0,\\r\\n y = 0,\\r\\n X = [],\\r\\n Y = [],\\r\\n p;\\r\\n for (var i = 0, ii = path.length; i < ii; i++) {\\r\\n p = path[i];\\r\\n if (p[0] == \\\"M\\\") {\\r\\n x = p[1];\\r\\n y = p[2];\\r\\n X.push(x);\\r\\n Y.push(y);\\r\\n } else {\\r\\n var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);\\r\\n X = X[concat](dim.min.x, dim.max.x);\\r\\n Y = Y[concat](dim.min.y, dim.max.y);\\r\\n x = p[5];\\r\\n y = p[6];\\r\\n }\\r\\n }\\r\\n var xmin = mmin[apply](0, X),\\r\\n ymin = mmin[apply](0, Y),\\r\\n xmax = mmax[apply](0, X),\\r\\n ymax = mmax[apply](0, Y),\\r\\n width = xmax - xmin,\\r\\n height = ymax - ymin,\\r\\n bb = {\\r\\n x: xmin,\\r\\n y: ymin,\\r\\n x2: xmax,\\r\\n y2: ymax,\\r\\n width: width,\\r\\n height: height,\\r\\n cx: xmin + width / 2,\\r\\n cy: ymin + height / 2\\r\\n };\\r\\n pth.bbox = clone(bb);\\r\\n return bb;\\r\\n },\\r\\n pathClone = function (pathArray) {\\r\\n var res = clone(pathArray);\\r\\n res.toString = R._path2string;\\r\\n return res;\\r\\n },\\r\\n pathToRelative = R._pathToRelative = function (pathArray) {\\r\\n var pth = paths(pathArray);\\r\\n if (pth.rel) {\\r\\n return pathClone(pth.rel);\\r\\n }\\r\\n if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption\\r\\n pathArray = R.parsePathString(pathArray);\\r\\n }\\r\\n var res = [],\\r\\n x = 0,\\r\\n y = 0,\\r\\n mx = 0,\\r\\n my = 0,\\r\\n start = 0;\\r\\n if (pathArray[0][0] == \\\"M\\\") {\\r\\n x = pathArray[0][1];\\r\\n y = pathArray[0][2];\\r\\n mx = x;\\r\\n my = y;\\r\\n start++;\\r\\n res.push([\\\"M\\\", x, y]);\\r\\n }\\r\\n for (var i = start, ii = pathArray.length; i < ii; i++) {\\r\\n var r = res[i] = [],\\r\\n pa = pathArray[i];\\r\\n if (pa[0] != lowerCase.call(pa[0])) {\\r\\n r[0] = lowerCase.call(pa[0]);\\r\\n switch (r[0]) {\\r\\n case \\\"a\\\":\\r\\n r[1] = pa[1];\\r\\n r[2] = pa[2];\\r\\n r[3] = pa[3];\\r\\n r[4] = pa[4];\\r\\n r[5] = pa[5];\\r\\n r[6] = +(pa[6] - x).toFixed(3);\\r\\n r[7] = +(pa[7] - y).toFixed(3);\\r\\n break;\\r\\n case \\\"v\\\":\\r\\n r[1] = +(pa[1] - y).toFixed(3);\\r\\n break;\\r\\n case \\\"m\\\":\\r\\n mx = pa[1];\\r\\n my = pa[2];\\r\\n default:\\r\\n for (var j = 1, jj = pa.length; j < jj; j++) {\\r\\n r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3);\\r\\n }\\r\\n }\\r\\n } else {\\r\\n r = res[i] = [];\\r\\n if (pa[0] == \\\"m\\\") {\\r\\n mx = pa[1] + x;\\r\\n my = pa[2] + y;\\r\\n }\\r\\n for (var k = 0, kk = pa.length; k < kk; k++) {\\r\\n res[i][k] = pa[k];\\r\\n }\\r\\n }\\r\\n var len = res[i].length;\\r\\n switch (res[i][0]) {\\r\\n case \\\"z\\\":\\r\\n x = mx;\\r\\n y = my;\\r\\n break;\\r\\n case \\\"h\\\":\\r\\n x += +res[i][len - 1];\\r\\n break;\\r\\n case \\\"v\\\":\\r\\n y += +res[i][len - 1];\\r\\n break;\\r\\n default:\\r\\n x += +res[i][len - 2];\\r\\n y += +res[i][len - 1];\\r\\n }\\r\\n }\\r\\n res.toString = R._path2string;\\r\\n pth.rel = pathClone(res);\\r\\n return res;\\r\\n },\\r\\n pathToAbsolute = R._pathToAbsolute = function (pathArray) {\\r\\n var pth = paths(pathArray);\\r\\n if (pth.abs) {\\r\\n return pathClone(pth.abs);\\r\\n }\\r\\n if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption\\r\\n pathArray = R.parsePathString(pathArray);\\r\\n }\\r\\n if (!pathArray || !pathArray.length) {\\r\\n return [[\\\"M\\\", 0, 0]];\\r\\n }\\r\\n var res = [],\\r\\n x = 0,\\r\\n y = 0,\\r\\n mx = 0,\\r\\n my = 0,\\r\\n start = 0;\\r\\n if (pathArray[0][0] == \\\"M\\\") {\\r\\n x = +pathArray[0][1];\\r\\n y = +pathArray[0][2];\\r\\n mx = x;\\r\\n my = y;\\r\\n start++;\\r\\n res[0] = [\\\"M\\\", x, y];\\r\\n }\\r\\n var crz = pathArray.length == 3 && pathArray[0][0] == \\\"M\\\" && pathArray[1][0].toUpperCase() == \\\"R\\\" && pathArray[2][0].toUpperCase() == \\\"Z\\\";\\r\\n for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) {\\r\\n res.push(r = []);\\r\\n pa = pathArray[i];\\r\\n if (pa[0] != upperCase.call(pa[0])) {\\r\\n r[0] = upperCase.call(pa[0]);\\r\\n switch (r[0]) {\\r\\n case \\\"A\\\":\\r\\n r[1] = pa[1];\\r\\n r[2] = pa[2];\\r\\n r[3] = pa[3];\\r\\n r[4] = pa[4];\\r\\n r[5] = pa[5];\\r\\n r[6] = +(pa[6] + x);\\r\\n r[7] = +(pa[7] + y);\\r\\n break;\\r\\n case \\\"V\\\":\\r\\n r[1] = +pa[1] + y;\\r\\n break;\\r\\n case \\\"H\\\":\\r\\n r[1] = +pa[1] + x;\\r\\n break;\\r\\n case \\\"R\\\":\\r\\n var dots = [x, y][concat](pa.slice(1));\\r\\n for (var j = 2, jj = dots.length; j < jj; j++) {\\r\\n dots[j] = +dots[j] + x;\\r\\n dots[++j] = +dots[j] + y;\\r\\n }\\r\\n res.pop();\\r\\n res = res[concat](catmullRom2bezier(dots, crz));\\r\\n break;\\r\\n case \\\"M\\\":\\r\\n mx = +pa[1] + x;\\r\\n my = +pa[2] + y;\\r\\n default:\\r\\n for (j = 1, jj = pa.length; j < jj; j++) {\\r\\n r[j] = +pa[j] + ((j % 2) ? x : y);\\r\\n }\\r\\n }\\r\\n } else if (pa[0] == \\\"R\\\") {\\r\\n dots = [x, y][concat](pa.slice(1));\\r\\n res.pop();\\r\\n res = res[concat](catmullRom2bezier(dots, crz));\\r\\n r = [\\\"R\\\"][concat](pa.slice(-2));\\r\\n } else {\\r\\n for (var k = 0, kk = pa.length; k < kk; k++) {\\r\\n r[k] = pa[k];\\r\\n }\\r\\n }\\r\\n switch (r[0]) {\\r\\n case \\\"Z\\\":\\r\\n x = mx;\\r\\n y = my;\\r\\n break;\\r\\n case \\\"H\\\":\\r\\n x = r[1];\\r\\n break;\\r\\n case \\\"V\\\":\\r\\n y = r[1];\\r\\n break;\\r\\n case \\\"M\\\":\\r\\n mx = r[r.length - 2];\\r\\n my = r[r.length - 1];\\r\\n default:\\r\\n x = r[r.length - 2];\\r\\n y = r[r.length - 1];\\r\\n }\\r\\n }\\r\\n res.toString = R._path2string;\\r\\n pth.abs = pathClone(res);\\r\\n return res;\\r\\n },\\r\\n l2c = function (x1, y1, x2, y2) {\\r\\n return [x1, y1, x2, y2, x2, y2];\\r\\n },\\r\\n q2c = function (x1, y1, ax, ay, x2, y2) {\\r\\n var _13 = 1 / 3,\\r\\n _23 = 2 / 3;\\r\\n return [\\r\\n _13 * x1 + _23 * ax,\\r\\n _13 * y1 + _23 * ay,\\r\\n _13 * x2 + _23 * ax,\\r\\n _13 * y2 + _23 * ay,\\r\\n x2,\\r\\n y2\\r\\n ];\\r\\n },\\r\\n a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {\\r\\n // for more information of where this math came from visit:\\r\\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\\r\\n var _120 = PI * 120 / 180,\\r\\n rad = PI / 180 * (+angle || 0),\\r\\n res = [],\\r\\n xy,\\r\\n rotate = cacher(function (x, y, rad) {\\r\\n var X = x * math.cos(rad) - y * math.sin(rad),\\r\\n Y = x * math.sin(rad) + y * math.cos(rad);\\r\\n return {x: X, y: Y};\\r\\n });\\r\\n if (!recursive) {\\r\\n xy = rotate(x1, y1, -rad);\\r\\n x1 = xy.x;\\r\\n y1 = xy.y;\\r\\n xy = rotate(x2, y2, -rad);\\r\\n x2 = xy.x;\\r\\n y2 = xy.y;\\r\\n var cos = math.cos(PI / 180 * angle),\\r\\n sin = math.sin(PI / 180 * angle),\\r\\n x = (x1 - x2) / 2,\\r\\n y = (y1 - y2) / 2;\\r\\n var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);\\r\\n if (h > 1) {\\r\\n h = math.sqrt(h);\\r\\n rx = h * rx;\\r\\n ry = h * ry;\\r\\n }\\r\\n var rx2 = rx * rx,\\r\\n ry2 = ry * ry,\\r\\n k = (large_arc_flag == sweep_flag ? -1 : 1) *\\r\\n math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))),\\r\\n cx = k * rx * y / ry + (x1 + x2) / 2,\\r\\n cy = k * -ry * x / rx + (y1 + y2) / 2,\\r\\n f1 = math.asin(((y1 - cy) / ry).toFixed(9)),\\r\\n f2 = math.asin(((y2 - cy) / ry).toFixed(9));\\r\\n\\r\\n f1 = x1 < cx ? PI - f1 : f1;\\r\\n f2 = x2 < cx ? PI - f2 : f2;\\r\\n f1 < 0 && (f1 = PI * 2 + f1);\\r\\n f2 < 0 && (f2 = PI * 2 + f2);\\r\\n if (sweep_flag && f1 > f2) {\\r\\n f1 = f1 - PI * 2;\\r\\n }\\r\\n if (!sweep_flag && f2 > f1) {\\r\\n f2 = f2 - PI * 2;\\r\\n }\\r\\n } else {\\r\\n f1 = recursive[0];\\r\\n f2 = recursive[1];\\r\\n cx = recursive[2];\\r\\n cy = recursive[3];\\r\\n }\\r\\n var df = f2 - f1;\\r\\n if (abs(df) > _120) {\\r\\n var f2old = f2,\\r\\n x2old = x2,\\r\\n y2old = y2;\\r\\n f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);\\r\\n x2 = cx + rx * math.cos(f2);\\r\\n y2 = cy + ry * math.sin(f2);\\r\\n res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);\\r\\n }\\r\\n df = f2 - f1;\\r\\n var c1 = math.cos(f1),\\r\\n s1 = math.sin(f1),\\r\\n c2 = math.cos(f2),\\r\\n s2 = math.sin(f2),\\r\\n t = math.tan(df / 4),\\r\\n hx = 4 / 3 * rx * t,\\r\\n hy = 4 / 3 * ry * t,\\r\\n m1 = [x1, y1],\\r\\n m2 = [x1 + hx * s1, y1 - hy * c1],\\r\\n m3 = [x2 + hx * s2, y2 - hy * c2],\\r\\n m4 = [x2, y2];\\r\\n m2[0] = 2 * m1[0] - m2[0];\\r\\n m2[1] = 2 * m1[1] - m2[1];\\r\\n if (recursive) {\\r\\n return [m2, m3, m4][concat](res);\\r\\n } else {\\r\\n res = [m2, m3, m4][concat](res).join()[split](\\\",\\\");\\r\\n var newres = [];\\r\\n for (var i = 0, ii = res.length; i < ii; i++) {\\r\\n newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;\\r\\n }\\r\\n return newres;\\r\\n }\\r\\n },\\r\\n findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\\r\\n var t1 = 1 - t;\\r\\n return {\\r\\n x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x,\\r\\n y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y\\r\\n };\\r\\n },\\r\\n curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\\r\\n var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x),\\r\\n b = 2 * (c1x - p1x) - 2 * (c2x - c1x),\\r\\n c = p1x - c1x,\\r\\n t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a,\\r\\n t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a,\\r\\n y = [p1y, p2y],\\r\\n x = [p1x, p2x],\\r\\n dot;\\r\\n abs(t1) > \\\"1e12\\\" && (t1 = .5);\\r\\n abs(t2) > \\\"1e12\\\" && (t2 = .5);\\r\\n if (t1 > 0 && t1 < 1) {\\r\\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);\\r\\n x.push(dot.x);\\r\\n y.push(dot.y);\\r\\n }\\r\\n if (t2 > 0 && t2 < 1) {\\r\\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);\\r\\n x.push(dot.x);\\r\\n y.push(dot.y);\\r\\n }\\r\\n a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y);\\r\\n b = 2 * (c1y - p1y) - 2 * (c2y - c1y);\\r\\n c = p1y - c1y;\\r\\n t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a;\\r\\n t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a;\\r\\n abs(t1) > \\\"1e12\\\" && (t1 = .5);\\r\\n abs(t2) > \\\"1e12\\\" && (t2 = .5);\\r\\n if (t1 > 0 && t1 < 1) {\\r\\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);\\r\\n x.push(dot.x);\\r\\n y.push(dot.y);\\r\\n }\\r\\n if (t2 > 0 && t2 < 1) {\\r\\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);\\r\\n x.push(dot.x);\\r\\n y.push(dot.y);\\r\\n }\\r\\n return {\\r\\n min: {x: mmin[apply](0, x), y: mmin[apply](0, y)},\\r\\n max: {x: mmax[apply](0, x), y: mmax[apply](0, y)}\\r\\n };\\r\\n }),\\r\\n path2curve = R._path2curve = cacher(function (path, path2) {\\r\\n var pth = !path2 && paths(path);\\r\\n if (!path2 && pth.curve) {\\r\\n return pathClone(pth.curve);\\r\\n }\\r\\n var p = pathToAbsolute(path),\\r\\n p2 = path2 && pathToAbsolute(path2),\\r\\n attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},\\r\\n attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},\\r\\n processPath = function (path, d, pcom) {\\r\\n var nx, ny, tq = {T:1, Q:1};\\r\\n if (!path) {\\r\\n return [\\\"C\\\", d.x, d.y, d.x, d.y, d.x, d.y];\\r\\n }\\r\\n !(path[0] in tq) && (d.qx = d.qy = null);\\r\\n switch (path[0]) {\\r\\n case \\\"M\\\":\\r\\n d.X = path[1];\\r\\n d.Y = path[2];\\r\\n break;\\r\\n case \\\"A\\\":\\r\\n path = [\\\"C\\\"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1))));\\r\\n break;\\r\\n case \\\"S\\\":\\r\\n if (pcom == \\\"C\\\" || pcom == \\\"S\\\") { // In \\\"S\\\" case we have to take into account, if the previous command is C/S.\\r\\n nx = d.x * 2 - d.bx; // And reflect the previous\\r\\n ny = d.y * 2 - d.by; // command's control point relative to the current point.\\r\\n }\\r\\n else { // or some else or nothing\\r\\n nx = d.x;\\r\\n ny = d.y;\\r\\n }\\r\\n path = [\\\"C\\\", nx, ny][concat](path.slice(1));\\r\\n break;\\r\\n case \\\"T\\\":\\r\\n if (pcom == \\\"Q\\\" || pcom == \\\"T\\\") { // In \\\"T\\\" case we have to take into account, if the previous command is Q/T.\\r\\n d.qx = d.x * 2 - d.qx; // And make a reflection similar\\r\\n d.qy = d.y * 2 - d.qy; // to case \\\"S\\\".\\r\\n }\\r\\n else { // or something else or nothing\\r\\n d.qx = d.x;\\r\\n d.qy = d.y;\\r\\n }\\r\\n path = [\\\"C\\\"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));\\r\\n break;\\r\\n case \\\"Q\\\":\\r\\n d.qx = path[1];\\r\\n d.qy = path[2];\\r\\n path = [\\\"C\\\"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4]));\\r\\n break;\\r\\n case \\\"L\\\":\\r\\n path = [\\\"C\\\"][concat](l2c(d.x, d.y, path[1], path[2]));\\r\\n break;\\r\\n case \\\"H\\\":\\r\\n path = [\\\"C\\\"][concat](l2c(d.x, d.y, path[1], d.y));\\r\\n break;\\r\\n case \\\"V\\\":\\r\\n path = [\\\"C\\\"][concat](l2c(d.x, d.y, d.x, path[1]));\\r\\n break;\\r\\n case \\\"Z\\\":\\r\\n path = [\\\"C\\\"][concat](l2c(d.x, d.y, d.X, d.Y));\\r\\n break;\\r\\n }\\r\\n return path;\\r\\n },\\r\\n fixArc = function (pp, i) {\\r\\n if (pp[i].length > 7) {\\r\\n pp[i].shift();\\r\\n var pi = pp[i];\\r\\n while (pi.length) {\\r\\n pcoms1[i]=\\\"A\\\"; // if created multiple C:s, their original seg is saved\\r\\n p2 && (pcoms2[i]=\\\"A\\\"); // the same as above\\r\\n pp.splice(i++, 0, [\\\"C\\\"][concat](pi.splice(0, 6)));\\r\\n }\\r\\n pp.splice(i, 1);\\r\\n ii = mmax(p.length, p2 && p2.length || 0);\\r\\n }\\r\\n },\\r\\n fixM = function (path1, path2, a1, a2, i) {\\r\\n if (path1 && path2 && path1[i][0] == \\\"M\\\" && path2[i][0] != \\\"M\\\") {\\r\\n path2.splice(i, 0, [\\\"M\\\", a2.x, a2.y]);\\r\\n a1.bx = 0;\\r\\n a1.by = 0;\\r\\n a1.x = path1[i][1];\\r\\n a1.y = path1[i][2];\\r\\n ii = mmax(p.length, p2 && p2.length || 0);\\r\\n }\\r\\n },\\r\\n pcoms1 = [], // path commands of original path p\\r\\n pcoms2 = [], // path commands of original path p2\\r\\n pfirst = \\\"\\\", // temporary holder for original path command\\r\\n pcom = \\\"\\\"; // holder for previous path command of original path\\r\\n for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) {\\r\\n p[i] && (pfirst = p[i][0]); // save current path command\\r\\n\\r\\n if (pfirst != \\\"C\\\") // C is not saved yet, because it may be result of conversion\\r\\n {\\r\\n pcoms1[i] = pfirst; // Save current path command\\r\\n i && ( pcom = pcoms1[i-1]); // Get previous path command pcom\\r\\n }\\r\\n p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath\\r\\n\\r\\n if (pcoms1[i] != \\\"A\\\" && pfirst == \\\"C\\\") pcoms1[i] = \\\"C\\\"; // A is the only command\\r\\n // which may produce multiple C:s\\r\\n // so we have to make sure that C is also C in original path\\r\\n\\r\\n fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1\\r\\n\\r\\n if (p2) { // the same procedures is done to p2\\r\\n p2[i] && (pfirst = p2[i][0]);\\r\\n if (pfirst != \\\"C\\\")\\r\\n {\\r\\n pcoms2[i] = pfirst;\\r\\n i && (pcom = pcoms2[i-1]);\\r\\n }\\r\\n p2[i] = processPath(p2[i], attrs2, pcom);\\r\\n\\r\\n if (pcoms2[i]!=\\\"A\\\" && pfirst==\\\"C\\\") pcoms2[i]=\\\"C\\\";\\r\\n\\r\\n fixArc(p2, i);\\r\\n }\\r\\n fixM(p, p2, attrs, attrs2, i);\\r\\n fixM(p2, p, attrs2, attrs, i);\\r\\n var seg = p[i],\\r\\n seg2 = p2 && p2[i],\\r\\n seglen = seg.length,\\r\\n seg2len = p2 && seg2.length;\\r\\n attrs.x = seg[seglen - 2];\\r\\n attrs.y = seg[seglen - 1];\\r\\n attrs.bx = toFloat(seg[seglen - 4]) || attrs.x;\\r\\n attrs.by = toFloat(seg[seglen - 3]) || attrs.y;\\r\\n attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x);\\r\\n attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y);\\r\\n attrs2.x = p2 && seg2[seg2len - 2];\\r\\n attrs2.y = p2 && seg2[seg2len - 1];\\r\\n }\\r\\n if (!p2) {\\r\\n pth.curve = pathClone(p);\\r\\n }\\r\\n return p2 ? [p, p2] : p;\\r\\n }, null, pathClone),\\r\\n parseDots = R._parseDots = cacher(function (gradient) {\\r\\n var dots = [];\\r\\n for (var i = 0, ii = gradient.length; i < ii; i++) {\\r\\n var dot = {},\\r\\n par = gradient[i].match(/^([^:]*):?([\\\\d\\\\.]*)/);\\r\\n dot.color = R.getRGB(par[1]);\\r\\n if (dot.color.error) {\\r\\n return null;\\r\\n }\\r\\n dot.opacity = dot.color.opacity;\\r\\n dot.color = dot.color.hex;\\r\\n par[2] && (dot.offset = par[2] + \\\"%\\\");\\r\\n dots.push(dot);\\r\\n }\\r\\n for (i = 1, ii = dots.length - 1; i < ii; i++) {\\r\\n if (!dots[i].offset) {\\r\\n var start = toFloat(dots[i - 1].offset || 0),\\r\\n end = 0;\\r\\n for (var j = i + 1; j < ii; j++) {\\r\\n if (dots[j].offset) {\\r\\n end = dots[j].offset;\\r\\n break;\\r\\n }\\r\\n }\\r\\n if (!end) {\\r\\n end = 100;\\r\\n j = ii;\\r\\n }\\r\\n end = toFloat(end);\\r\\n var d = (end - start) / (j - i + 1);\\r\\n for (; i < j; i++) {\\r\\n start += d;\\r\\n dots[i].offset = start + \\\"%\\\";\\r\\n }\\r\\n }\\r\\n }\\r\\n return dots;\\r\\n }),\\r\\n tear = R._tear = function (el, paper) {\\r\\n el == paper.top && (paper.top = el.prev);\\r\\n el == paper.bottom && (paper.bottom = el.next);\\r\\n el.next && (el.next.prev = el.prev);\\r\\n el.prev && (el.prev.next = el.next);\\r\\n },\\r\\n tofront = R._tofront = function (el, paper) {\\r\\n if (paper.top === el) {\\r\\n return;\\r\\n }\\r\\n tear(el, paper);\\r\\n el.next = null;\\r\\n el.prev = paper.top;\\r\\n paper.top.next = el;\\r\\n paper.top = el;\\r\\n },\\r\\n toback = R._toback = function (el, paper) {\\r\\n if (paper.bottom === el) {\\r\\n return;\\r\\n }\\r\\n tear(el, paper);\\r\\n el.next = paper.bottom;\\r\\n el.prev = null;\\r\\n paper.bottom.prev = el;\\r\\n paper.bottom = el;\\r\\n },\\r\\n insertafter = R._insertafter = function (el, el2, paper) {\\r\\n tear(el, paper);\\r\\n el2 == paper.top && (paper.top = el);\\r\\n el2.next && (el2.next.prev = el);\\r\\n el.next = el2.next;\\r\\n el.prev = el2;\\r\\n el2.next = el;\\r\\n },\\r\\n insertbefore = R._insertbefore = function (el, el2, paper) {\\r\\n tear(el, paper);\\r\\n el2 == paper.bottom && (paper.bottom = el);\\r\\n el2.prev && (el2.prev.next = el);\\r\\n el.prev = el2.prev;\\r\\n el2.prev = el;\\r\\n el.next = el2;\\r\\n },\\r\\n /*\\\\\\r\\n * Raphael.toMatrix\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns matrix of transformations applied to a given path\\r\\n > Parameters\\r\\n - path (string) path string\\r\\n - transform (string|array) transformation string\\r\\n = (object) @Matrix\\r\\n \\\\*/\\r\\n toMatrix = R.toMatrix = function (path, transform) {\\r\\n var bb = pathDimensions(path),\\r\\n el = {\\r\\n _: {\\r\\n transform: E\\r\\n },\\r\\n getBBox: function () {\\r\\n return bb;\\r\\n }\\r\\n };\\r\\n extractTransform(el, transform);\\r\\n return el.matrix;\\r\\n },\\r\\n /*\\\\\\r\\n * Raphael.transformPath\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns path transformed by a given transformation\\r\\n > Parameters\\r\\n - path (string) path string\\r\\n - transform (string|array) transformation string\\r\\n = (string) path\\r\\n \\\\*/\\r\\n transformPath = R.transformPath = function (path, transform) {\\r\\n return mapPath(path, toMatrix(path, transform));\\r\\n },\\r\\n extractTransform = R._extractTransform = function (el, tstr) {\\r\\n if (tstr == null) {\\r\\n return el._.transform;\\r\\n }\\r\\n tstr = Str(tstr).replace(/\\\\.{3}|\\\\u2026/g, el._.transform || E);\\r\\n var tdata = R.parseTransformString(tstr),\\r\\n deg = 0,\\r\\n dx = 0,\\r\\n dy = 0,\\r\\n sx = 1,\\r\\n sy = 1,\\r\\n _ = el._,\\r\\n m = new Matrix;\\r\\n _.transform = tdata || [];\\r\\n if (tdata) {\\r\\n for (var i = 0, ii = tdata.length; i < ii; i++) {\\r\\n var t = tdata[i],\\r\\n tlen = t.length,\\r\\n command = Str(t[0]).toLowerCase(),\\r\\n absolute = t[0] != command,\\r\\n inver = absolute ? m.invert() : 0,\\r\\n x1,\\r\\n y1,\\r\\n x2,\\r\\n y2,\\r\\n bb;\\r\\n if (command == \\\"t\\\" && tlen == 3) {\\r\\n if (absolute) {\\r\\n x1 = inver.x(0, 0);\\r\\n y1 = inver.y(0, 0);\\r\\n x2 = inver.x(t[1], t[2]);\\r\\n y2 = inver.y(t[1], t[2]);\\r\\n m.translate(x2 - x1, y2 - y1);\\r\\n } else {\\r\\n m.translate(t[1], t[2]);\\r\\n }\\r\\n } else if (command == \\\"r\\\") {\\r\\n if (tlen == 2) {\\r\\n bb = bb || el.getBBox(1);\\r\\n m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2);\\r\\n deg += t[1];\\r\\n } else if (tlen == 4) {\\r\\n if (absolute) {\\r\\n x2 = inver.x(t[2], t[3]);\\r\\n y2 = inver.y(t[2], t[3]);\\r\\n m.rotate(t[1], x2, y2);\\r\\n } else {\\r\\n m.rotate(t[1], t[2], t[3]);\\r\\n }\\r\\n deg += t[1];\\r\\n }\\r\\n } else if (command == \\\"s\\\") {\\r\\n if (tlen == 2 || tlen == 3) {\\r\\n bb = bb || el.getBBox(1);\\r\\n m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2);\\r\\n sx *= t[1];\\r\\n sy *= t[tlen - 1];\\r\\n } else if (tlen == 5) {\\r\\n if (absolute) {\\r\\n x2 = inver.x(t[3], t[4]);\\r\\n y2 = inver.y(t[3], t[4]);\\r\\n m.scale(t[1], t[2], x2, y2);\\r\\n } else {\\r\\n m.scale(t[1], t[2], t[3], t[4]);\\r\\n }\\r\\n sx *= t[1];\\r\\n sy *= t[2];\\r\\n }\\r\\n } else if (command == \\\"m\\\" && tlen == 7) {\\r\\n m.add(t[1], t[2], t[3], t[4], t[5], t[6]);\\r\\n }\\r\\n _.dirtyT = 1;\\r\\n el.matrix = m;\\r\\n }\\r\\n }\\r\\n\\r\\n /*\\\\\\r\\n * Element.matrix\\r\\n [ property (object) ]\\r\\n **\\r\\n * Keeps @Matrix object, which represents element transformation\\r\\n \\\\*/\\r\\n el.matrix = m;\\r\\n\\r\\n _.sx = sx;\\r\\n _.sy = sy;\\r\\n _.deg = deg;\\r\\n _.dx = dx = m.e;\\r\\n _.dy = dy = m.f;\\r\\n\\r\\n if (sx == 1 && sy == 1 && !deg && _.bbox) {\\r\\n _.bbox.x += +dx;\\r\\n _.bbox.y += +dy;\\r\\n } else {\\r\\n _.dirtyT = 1;\\r\\n }\\r\\n },\\r\\n getEmpty = function (item) {\\r\\n var l = item[0];\\r\\n switch (l.toLowerCase()) {\\r\\n case \\\"t\\\": return [l, 0, 0];\\r\\n case \\\"m\\\": return [l, 1, 0, 0, 1, 0, 0];\\r\\n case \\\"r\\\": if (item.length == 4) {\\r\\n return [l, 0, item[2], item[3]];\\r\\n } else {\\r\\n return [l, 0];\\r\\n }\\r\\n case \\\"s\\\": if (item.length == 5) {\\r\\n return [l, 1, 1, item[3], item[4]];\\r\\n } else if (item.length == 3) {\\r\\n return [l, 1, 1];\\r\\n } else {\\r\\n return [l, 1];\\r\\n }\\r\\n }\\r\\n },\\r\\n equaliseTransform = R._equaliseTransform = function (t1, t2) {\\r\\n t2 = Str(t2).replace(/\\\\.{3}|\\\\u2026/g, t1);\\r\\n t1 = R.parseTransformString(t1) || [];\\r\\n t2 = R.parseTransformString(t2) || [];\\r\\n var maxlength = mmax(t1.length, t2.length),\\r\\n from = [],\\r\\n to = [],\\r\\n i = 0, j, jj,\\r\\n tt1, tt2;\\r\\n for (; i < maxlength; i++) {\\r\\n tt1 = t1[i] || getEmpty(t2[i]);\\r\\n tt2 = t2[i] || getEmpty(tt1);\\r\\n if ((tt1[0] != tt2[0]) ||\\r\\n (tt1[0].toLowerCase() == \\\"r\\\" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) ||\\r\\n (tt1[0].toLowerCase() == \\\"s\\\" && (tt1[3] != tt2[3] || tt1[4] != tt2[4]))\\r\\n ) {\\r\\n return;\\r\\n }\\r\\n from[i] = [];\\r\\n to[i] = [];\\r\\n for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) {\\r\\n j in tt1 && (from[i][j] = tt1[j]);\\r\\n j in tt2 && (to[i][j] = tt2[j]);\\r\\n }\\r\\n }\\r\\n return {\\r\\n from: from,\\r\\n to: to\\r\\n };\\r\\n };\\r\\n R._getContainer = function (x, y, w, h) {\\r\\n var container;\\r\\n container = h == null && !R.is(x, \\\"object\\\") ? g.doc.getElementById(x) : x;\\r\\n if (container == null) {\\r\\n return;\\r\\n }\\r\\n if (container.tagName) {\\r\\n if (y == null) {\\r\\n return {\\r\\n container: container,\\r\\n width: container.style.pixelWidth || container.offsetWidth,\\r\\n height: container.style.pixelHeight || container.offsetHeight\\r\\n };\\r\\n } else {\\r\\n return {\\r\\n container: container,\\r\\n width: y,\\r\\n height: w\\r\\n };\\r\\n }\\r\\n }\\r\\n return {\\r\\n container: 1,\\r\\n x: x,\\r\\n y: y,\\r\\n width: w,\\r\\n height: h\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.pathToRelative\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Converts path to relative form\\r\\n > Parameters\\r\\n - pathString (string|array) path string or array of segments\\r\\n = (array) array of segments.\\r\\n \\\\*/\\r\\n R.pathToRelative = pathToRelative;\\r\\n R._engine = {};\\r\\n /*\\\\\\r\\n * Raphael.path2curve\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Converts path to a new path where all segments are cubic bezier curves.\\r\\n > Parameters\\r\\n - pathString (string|array) path string or array of segments\\r\\n = (array) array of segments.\\r\\n \\\\*/\\r\\n R.path2curve = path2curve;\\r\\n /*\\\\\\r\\n * Raphael.matrix\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns matrix based on given parameters.\\r\\n > Parameters\\r\\n - a (number)\\r\\n - b (number)\\r\\n - c (number)\\r\\n - d (number)\\r\\n - e (number)\\r\\n - f (number)\\r\\n = (object) @Matrix\\r\\n \\\\*/\\r\\n R.matrix = function (a, b, c, d, e, f) {\\r\\n return new Matrix(a, b, c, d, e, f);\\r\\n };\\r\\n function Matrix(a, b, c, d, e, f) {\\r\\n if (a != null) {\\r\\n this.a = +a;\\r\\n this.b = +b;\\r\\n this.c = +c;\\r\\n this.d = +d;\\r\\n this.e = +e;\\r\\n this.f = +f;\\r\\n } else {\\r\\n this.a = 1;\\r\\n this.b = 0;\\r\\n this.c = 0;\\r\\n this.d = 1;\\r\\n this.e = 0;\\r\\n this.f = 0;\\r\\n }\\r\\n }\\r\\n (function (matrixproto) {\\r\\n /*\\\\\\r\\n * Matrix.add\\r\\n [ method ]\\r\\n **\\r\\n * Adds given matrix to existing one.\\r\\n > Parameters\\r\\n - a (number)\\r\\n - b (number)\\r\\n - c (number)\\r\\n - d (number)\\r\\n - e (number)\\r\\n - f (number)\\r\\n or\\r\\n - matrix (object) @Matrix\\r\\n \\\\*/\\r\\n matrixproto.add = function (a, b, c, d, e, f) {\\r\\n var out = [[], [], []],\\r\\n m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]],\\r\\n matrix = [[a, c, e], [b, d, f], [0, 0, 1]],\\r\\n x, y, z, res;\\r\\n\\r\\n if (a && a instanceof Matrix) {\\r\\n matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]];\\r\\n }\\r\\n\\r\\n for (x = 0; x < 3; x++) {\\r\\n for (y = 0; y < 3; y++) {\\r\\n res = 0;\\r\\n for (z = 0; z < 3; z++) {\\r\\n res += m[x][z] * matrix[z][y];\\r\\n }\\r\\n out[x][y] = res;\\r\\n }\\r\\n }\\r\\n this.a = out[0][0];\\r\\n this.b = out[1][0];\\r\\n this.c = out[0][1];\\r\\n this.d = out[1][1];\\r\\n this.e = out[0][2];\\r\\n this.f = out[1][2];\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.invert\\r\\n [ method ]\\r\\n **\\r\\n * Returns inverted version of the matrix\\r\\n = (object) @Matrix\\r\\n \\\\*/\\r\\n matrixproto.invert = function () {\\r\\n var me = this,\\r\\n x = me.a * me.d - me.b * me.c;\\r\\n return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x);\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.clone\\r\\n [ method ]\\r\\n **\\r\\n * Returns copy of the matrix\\r\\n = (object) @Matrix\\r\\n \\\\*/\\r\\n matrixproto.clone = function () {\\r\\n return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f);\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.translate\\r\\n [ method ]\\r\\n **\\r\\n * Translate the matrix\\r\\n > Parameters\\r\\n - x (number)\\r\\n - y (number)\\r\\n \\\\*/\\r\\n matrixproto.translate = function (x, y) {\\r\\n this.add(1, 0, 0, 1, x, y);\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.scale\\r\\n [ method ]\\r\\n **\\r\\n * Scales the matrix\\r\\n > Parameters\\r\\n - x (number)\\r\\n - y (number) #optional\\r\\n - cx (number) #optional\\r\\n - cy (number) #optional\\r\\n \\\\*/\\r\\n matrixproto.scale = function (x, y, cx, cy) {\\r\\n y == null && (y = x);\\r\\n (cx || cy) && this.add(1, 0, 0, 1, cx, cy);\\r\\n this.add(x, 0, 0, y, 0, 0);\\r\\n (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy);\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.rotate\\r\\n [ method ]\\r\\n **\\r\\n * Rotates the matrix\\r\\n > Parameters\\r\\n - a (number)\\r\\n - x (number)\\r\\n - y (number)\\r\\n \\\\*/\\r\\n matrixproto.rotate = function (a, x, y) {\\r\\n a = R.rad(a);\\r\\n x = x || 0;\\r\\n y = y || 0;\\r\\n var cos = +math.cos(a).toFixed(9),\\r\\n sin = +math.sin(a).toFixed(9);\\r\\n this.add(cos, sin, -sin, cos, x, y);\\r\\n this.add(1, 0, 0, 1, -x, -y);\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.x\\r\\n [ method ]\\r\\n **\\r\\n * Return x coordinate for given point after transformation described by the matrix. See also @Matrix.y\\r\\n > Parameters\\r\\n - x (number)\\r\\n - y (number)\\r\\n = (number) x\\r\\n \\\\*/\\r\\n matrixproto.x = function (x, y) {\\r\\n return x * this.a + y * this.c + this.e;\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.y\\r\\n [ method ]\\r\\n **\\r\\n * Return y coordinate for given point after transformation described by the matrix. See also @Matrix.x\\r\\n > Parameters\\r\\n - x (number)\\r\\n - y (number)\\r\\n = (number) y\\r\\n \\\\*/\\r\\n matrixproto.y = function (x, y) {\\r\\n return x * this.b + y * this.d + this.f;\\r\\n };\\r\\n matrixproto.get = function (i) {\\r\\n return +this[Str.fromCharCode(97 + i)].toFixed(4);\\r\\n };\\r\\n matrixproto.toString = function () {\\r\\n return R.svg ?\\r\\n \\\"matrix(\\\" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + \\\")\\\" :\\r\\n [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join();\\r\\n };\\r\\n matrixproto.toFilter = function () {\\r\\n return \\\"progid:DXImageTransform.Microsoft.Matrix(M11=\\\" + this.get(0) +\\r\\n \\\", M12=\\\" + this.get(2) + \\\", M21=\\\" + this.get(1) + \\\", M22=\\\" + this.get(3) +\\r\\n \\\", Dx=\\\" + this.get(4) + \\\", Dy=\\\" + this.get(5) + \\\", sizingmethod='auto expand')\\\";\\r\\n };\\r\\n matrixproto.offset = function () {\\r\\n return [this.e.toFixed(4), this.f.toFixed(4)];\\r\\n };\\r\\n function norm(a) {\\r\\n return a[0] * a[0] + a[1] * a[1];\\r\\n }\\r\\n function normalize(a) {\\r\\n var mag = math.sqrt(norm(a));\\r\\n a[0] && (a[0] /= mag);\\r\\n a[1] && (a[1] /= mag);\\r\\n }\\r\\n /*\\\\\\r\\n * Matrix.split\\r\\n [ method ]\\r\\n **\\r\\n * Splits matrix into primitive transformations\\r\\n = (object) in format:\\r\\n o dx (number) translation by x\\r\\n o dy (number) translation by y\\r\\n o scalex (number) scale by x\\r\\n o scaley (number) scale by y\\r\\n o shear (number) shear\\r\\n o rotate (number) rotation in deg\\r\\n o isSimple (boolean) could it be represented via simple transformations\\r\\n \\\\*/\\r\\n matrixproto.split = function () {\\r\\n var out = {};\\r\\n // translation\\r\\n out.dx = this.e;\\r\\n out.dy = this.f;\\r\\n\\r\\n // scale and shear\\r\\n var row = [[this.a, this.c], [this.b, this.d]];\\r\\n out.scalex = math.sqrt(norm(row[0]));\\r\\n normalize(row[0]);\\r\\n\\r\\n out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1];\\r\\n row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear];\\r\\n\\r\\n out.scaley = math.sqrt(norm(row[1]));\\r\\n normalize(row[1]);\\r\\n out.shear /= out.scaley;\\r\\n\\r\\n // rotation\\r\\n var sin = -row[0][1],\\r\\n cos = row[1][1];\\r\\n if (cos < 0) {\\r\\n out.rotate = R.deg(math.acos(cos));\\r\\n if (sin < 0) {\\r\\n out.rotate = 360 - out.rotate;\\r\\n }\\r\\n } else {\\r\\n out.rotate = R.deg(math.asin(sin));\\r\\n }\\r\\n\\r\\n out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate);\\r\\n out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate;\\r\\n out.noRotation = !+out.shear.toFixed(9) && !out.rotate;\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.toTransformString\\r\\n [ method ]\\r\\n **\\r\\n * Return transform string that represents given matrix\\r\\n = (string) transform string\\r\\n \\\\*/\\r\\n matrixproto.toTransformString = function (shorter) {\\r\\n var s = shorter || this[split]();\\r\\n if (s.isSimple) {\\r\\n s.scalex = +s.scalex.toFixed(4);\\r\\n s.scaley = +s.scaley.toFixed(4);\\r\\n s.rotate = +s.rotate.toFixed(4);\\r\\n return (s.dx || s.dy ? \\\"t\\\" + [s.dx, s.dy] : E) +\\r\\n (s.scalex != 1 || s.scaley != 1 ? \\\"s\\\" + [s.scalex, s.scaley, 0, 0] : E) +\\r\\n (s.rotate ? \\\"r\\\" + [s.rotate, 0, 0] : E);\\r\\n } else {\\r\\n return \\\"m\\\" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)];\\r\\n }\\r\\n };\\r\\n })(Matrix.prototype);\\r\\n\\r\\n var preventDefault = function () {\\r\\n this.returnValue = false;\\r\\n },\\r\\n preventTouch = function () {\\r\\n return this.originalEvent.preventDefault();\\r\\n },\\r\\n stopPropagation = function () {\\r\\n this.cancelBubble = true;\\r\\n },\\r\\n stopTouch = function () {\\r\\n return this.originalEvent.stopPropagation();\\r\\n },\\r\\n getEventPosition = function (e) {\\r\\n var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\\r\\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;\\r\\n\\r\\n return {\\r\\n x: e.clientX + scrollX,\\r\\n y: e.clientY + scrollY\\r\\n };\\r\\n },\\r\\n addEvent = (function () {\\r\\n if (g.doc.addEventListener) {\\r\\n return function (obj, type, fn, element) {\\r\\n var f = function (e) {\\r\\n var pos = getEventPosition(e);\\r\\n return fn.call(element, e, pos.x, pos.y);\\r\\n };\\r\\n obj.addEventListener(type, f, false);\\r\\n\\r\\n if (supportsTouch && touchMap[type]) {\\r\\n var _f = function (e) {\\r\\n var pos = getEventPosition(e),\\r\\n olde = e;\\r\\n\\r\\n for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) {\\r\\n if (e.targetTouches[i].target == obj) {\\r\\n e = e.targetTouches[i];\\r\\n e.originalEvent = olde;\\r\\n e.preventDefault = preventTouch;\\r\\n e.stopPropagation = stopTouch;\\r\\n break;\\r\\n }\\r\\n }\\r\\n\\r\\n return fn.call(element, e, pos.x, pos.y);\\r\\n };\\r\\n obj.addEventListener(touchMap[type], _f, false);\\r\\n }\\r\\n\\r\\n return function () {\\r\\n obj.removeEventListener(type, f, false);\\r\\n\\r\\n if (supportsTouch && touchMap[type])\\r\\n obj.removeEventListener(touchMap[type], _f, false);\\r\\n\\r\\n return true;\\r\\n };\\r\\n };\\r\\n } else if (g.doc.attachEvent) {\\r\\n return function (obj, type, fn, element) {\\r\\n var f = function (e) {\\r\\n e = e || g.win.event;\\r\\n var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\\r\\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,\\r\\n x = e.clientX + scrollX,\\r\\n y = e.clientY + scrollY;\\r\\n e.preventDefault = e.preventDefault || preventDefault;\\r\\n e.stopPropagation = e.stopPropagation || stopPropagation;\\r\\n return fn.call(element, e, x, y);\\r\\n };\\r\\n obj.attachEvent(\\\"on\\\" + type, f);\\r\\n var detacher = function () {\\r\\n obj.detachEvent(\\\"on\\\" + type, f);\\r\\n return true;\\r\\n };\\r\\n return detacher;\\r\\n };\\r\\n }\\r\\n })(),\\r\\n drag = [],\\r\\n dragMove = function (e) {\\r\\n var x = e.clientX,\\r\\n y = e.clientY,\\r\\n scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\\r\\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,\\r\\n dragi,\\r\\n j = drag.length;\\r\\n while (j--) {\\r\\n dragi = drag[j];\\r\\n if (supportsTouch && e.touches) {\\r\\n var i = e.touches.length,\\r\\n touch;\\r\\n while (i--) {\\r\\n touch = e.touches[i];\\r\\n if (touch.identifier == dragi.el._drag.id) {\\r\\n x = touch.clientX;\\r\\n y = touch.clientY;\\r\\n (e.originalEvent ? e.originalEvent : e).preventDefault();\\r\\n break;\\r\\n }\\r\\n }\\r\\n } else {\\r\\n e.preventDefault();\\r\\n }\\r\\n var node = dragi.el.node,\\r\\n o,\\r\\n next = node.nextSibling,\\r\\n parent = node.parentNode,\\r\\n display = node.style.display;\\r\\n g.win.opera && parent.removeChild(node);\\r\\n node.style.display = \\\"none\\\";\\r\\n o = dragi.el.paper.getElementByPoint(x, y);\\r\\n node.style.display = display;\\r\\n g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node));\\r\\n o && eve(\\\"raphael.drag.over.\\\" + dragi.el.id, dragi.el, o);\\r\\n x += scrollX;\\r\\n y += scrollY;\\r\\n eve(\\\"raphael.drag.move.\\\" + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e);\\r\\n }\\r\\n },\\r\\n dragUp = function (e) {\\r\\n R.unmousemove(dragMove).unmouseup(dragUp);\\r\\n var i = drag.length,\\r\\n dragi;\\r\\n while (i--) {\\r\\n dragi = drag[i];\\r\\n dragi.el._drag = {};\\r\\n eve(\\\"raphael.drag.end.\\\" + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e);\\r\\n }\\r\\n drag = [];\\r\\n },\\r\\n /*\\\\\\r\\n * Raphael.el\\r\\n [ property (object) ]\\r\\n **\\r\\n * You can add your own method to elements. This is usefull when you want to hack default functionality or\\r\\n * want to wrap some common transformation or attributes in one method. In difference to canvas methods,\\r\\n * you can redefine element method at any time. Expending element methods wouldn’t affect set.\\r\\n > Usage\\r\\n | Raphael.el.red = function () {\\r\\n | this.attr({fill: \\\"#f00\\\"});\\r\\n | };\\r\\n | // then use it\\r\\n | paper.circle(100, 100, 20).red();\\r\\n \\\\*/\\r\\n elproto = R.el = {};\\r\\n /*\\\\\\r\\n * Element.click\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for click for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unclick\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for click for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.dblclick\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for double click for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.undblclick\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for double click for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.mousedown\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for mousedown for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unmousedown\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for mousedown for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.mousemove\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for mousemove for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unmousemove\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for mousemove for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.mouseout\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for mouseout for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unmouseout\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for mouseout for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.mouseover\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for mouseover for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unmouseover\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for mouseover for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.mouseup\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for mouseup for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unmouseup\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for mouseup for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.touchstart\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for touchstart for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.untouchstart\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for touchstart for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.touchmove\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for touchmove for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.untouchmove\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for touchmove for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.touchend\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for touchend for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.untouchend\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for touchend for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.touchcancel\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for touchcancel for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.untouchcancel\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for touchcancel for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n for (var i = events.length; i--;) {\\r\\n (function (eventName) {\\r\\n R[eventName] = elproto[eventName] = function (fn, scope) {\\r\\n if (R.is(fn, \\\"function\\\")) {\\r\\n this.events = this.events || [];\\r\\n this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)});\\r\\n }\\r\\n return this;\\r\\n };\\r\\n R[\\\"un\\\" + eventName] = elproto[\\\"un\\\" + eventName] = function (fn) {\\r\\n var events = this.events || [],\\r\\n l = events.length;\\r\\n while (l--){\\r\\n if (events[l].name == eventName && (R.is(fn, \\\"undefined\\\") || events[l].f == fn)) {\\r\\n events[l].unbind();\\r\\n events.splice(l, 1);\\r\\n !events.length && delete this.events;\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n })(events[i]);\\r\\n }\\r\\n\\r\\n /*\\\\\\r\\n * Element.data\\r\\n [ method ]\\r\\n **\\r\\n * Adds or retrieves given value asociated with given key.\\r\\n **\\r\\n * See also @Element.removeData\\r\\n > Parameters\\r\\n - key (string) key to store data\\r\\n - value (any) #optional value to store\\r\\n = (object) @Element\\r\\n * or, if value is not specified:\\r\\n = (any) value\\r\\n * or, if key and value are not specified:\\r\\n = (object) Key/value pairs for all the data associated with the element.\\r\\n > Usage\\r\\n | for (var i = 0, i < 5, i++) {\\r\\n | paper.circle(10 + 15 * i, 10, 10)\\r\\n | .attr({fill: \\\"#000\\\"})\\r\\n | .data(\\\"i\\\", i)\\r\\n | .click(function () {\\r\\n | alert(this.data(\\\"i\\\"));\\r\\n | });\\r\\n | }\\r\\n \\\\*/\\r\\n elproto.data = function (key, value) {\\r\\n var data = eldata[this.id] = eldata[this.id] || {};\\r\\n if (arguments.length == 0) {\\r\\n return data;\\r\\n }\\r\\n if (arguments.length == 1) {\\r\\n if (R.is(key, \\\"object\\\")) {\\r\\n for (var i in key) if (key[has](i)) {\\r\\n this.data(i, key[i]);\\r\\n }\\r\\n return this;\\r\\n }\\r\\n eve(\\\"raphael.data.get.\\\" + this.id, this, data[key], key);\\r\\n return data[key];\\r\\n }\\r\\n data[key] = value;\\r\\n eve(\\\"raphael.data.set.\\\" + this.id, this, value, key);\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.removeData\\r\\n [ method ]\\r\\n **\\r\\n * Removes value associated with an element by given key.\\r\\n * If key is not provided, removes all the data of the element.\\r\\n > Parameters\\r\\n - key (string) #optional key\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.removeData = function (key) {\\r\\n if (key == null) {\\r\\n eldata[this.id] = {};\\r\\n } else {\\r\\n eldata[this.id] && delete eldata[this.id][key];\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getData\\r\\n [ method ]\\r\\n **\\r\\n * Retrieves the element data\\r\\n = (object) data\\r\\n \\\\*/\\r\\n elproto.getData = function () {\\r\\n return clone(eldata[this.id] || {});\\r\\n };\\r\\n /*\\\\\\r\\n * Element.hover\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handlers for hover for the element.\\r\\n > Parameters\\r\\n - f_in (function) handler for hover in\\r\\n - f_out (function) handler for hover out\\r\\n - icontext (object) #optional context for hover in handler\\r\\n - ocontext (object) #optional context for hover out handler\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.hover = function (f_in, f_out, scope_in, scope_out) {\\r\\n return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in);\\r\\n };\\r\\n /*\\\\\\r\\n * Element.unhover\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handlers for hover for the element.\\r\\n > Parameters\\r\\n - f_in (function) handler for hover in\\r\\n - f_out (function) handler for hover out\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.unhover = function (f_in, f_out) {\\r\\n return this.unmouseover(f_in).unmouseout(f_out);\\r\\n };\\r\\n var draggable = [];\\r\\n /*\\\\\\r\\n * Element.drag\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handlers for drag of the element.\\r\\n > Parameters\\r\\n - onmove (function) handler for moving\\r\\n - onstart (function) handler for drag start\\r\\n - onend (function) handler for drag end\\r\\n - mcontext (object) #optional context for moving handler\\r\\n - scontext (object) #optional context for drag start handler\\r\\n - econtext (object) #optional context for drag end handler\\r\\n * Additionaly following `drag` events will be triggered: `drag.start.<id>` on start,\\r\\n * `drag.end.<id>` on end and `drag.move.<id>` on every move. When element will be dragged over another element\\r\\n * `drag.over.<id>` will be fired as well.\\r\\n *\\r\\n * Start event and start handler will be called in specified context or in context of the element with following parameters:\\r\\n o x (number) x position of the mouse\\r\\n o y (number) y position of the mouse\\r\\n o event (object) DOM event object\\r\\n * Move event and move handler will be called in specified context or in context of the element with following parameters:\\r\\n o dx (number) shift by x from the start point\\r\\n o dy (number) shift by y from the start point\\r\\n o x (number) x position of the mouse\\r\\n o y (number) y position of the mouse\\r\\n o event (object) DOM event object\\r\\n * End event and end handler will be called in specified context or in context of the element with following parameters:\\r\\n o event (object) DOM event object\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) {\\r\\n function start(e) {\\r\\n (e.originalEvent || e).preventDefault();\\r\\n var x = e.clientX,\\r\\n y = e.clientY,\\r\\n scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\\r\\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;\\r\\n this._drag.id = e.identifier;\\r\\n if (supportsTouch && e.touches) {\\r\\n var i = e.touches.length, touch;\\r\\n while (i--) {\\r\\n touch = e.touches[i];\\r\\n this._drag.id = touch.identifier;\\r\\n if (touch.identifier == this._drag.id) {\\r\\n x = touch.clientX;\\r\\n y = touch.clientY;\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n this._drag.x = x + scrollX;\\r\\n this._drag.y = y + scrollY;\\r\\n !drag.length && R.mousemove(dragMove).mouseup(dragUp);\\r\\n drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope});\\r\\n onstart && eve.on(\\\"raphael.drag.start.\\\" + this.id, onstart);\\r\\n onmove && eve.on(\\\"raphael.drag.move.\\\" + this.id, onmove);\\r\\n onend && eve.on(\\\"raphael.drag.end.\\\" + this.id, onend);\\r\\n eve(\\\"raphael.drag.start.\\\" + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e);\\r\\n }\\r\\n this._drag = {};\\r\\n draggable.push({el: this, start: start});\\r\\n this.mousedown(start);\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.onDragOver\\r\\n [ method ]\\r\\n **\\r\\n * Shortcut for assigning event handler for `drag.over.<id>` event, where id is id of the element (see @Element.id).\\r\\n > Parameters\\r\\n - f (function) handler for event, first argument would be the element you are dragging over\\r\\n \\\\*/\\r\\n elproto.onDragOver = function (f) {\\r\\n f ? eve.on(\\\"raphael.drag.over.\\\" + this.id, f) : eve.unbind(\\\"raphael.drag.over.\\\" + this.id);\\r\\n };\\r\\n /*\\\\\\r\\n * Element.undrag\\r\\n [ method ]\\r\\n **\\r\\n * Removes all drag event handlers from given element.\\r\\n \\\\*/\\r\\n elproto.undrag = function () {\\r\\n var i = draggable.length;\\r\\n while (i--) if (draggable[i].el == this) {\\r\\n this.unmousedown(draggable[i].start);\\r\\n draggable.splice(i, 1);\\r\\n eve.unbind(\\\"raphael.drag.*.\\\" + this.id);\\r\\n }\\r\\n !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp);\\r\\n drag = [];\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.circle\\r\\n [ method ]\\r\\n **\\r\\n * Draws a circle.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the centre\\r\\n - y (number) y coordinate of the centre\\r\\n - r (number) radius\\r\\n = (object) Raphaël element object with type “circle”\\r\\n **\\r\\n > Usage\\r\\n | var c = paper.circle(50, 50, 40);\\r\\n \\\\*/\\r\\n paperproto.circle = function (x, y, r) {\\r\\n var out = R._engine.circle(this, x || 0, y || 0, r || 0);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.rect\\r\\n [ method ]\\r\\n *\\r\\n * Draws a rectangle.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the top left corner\\r\\n - y (number) y coordinate of the top left corner\\r\\n - width (number) width\\r\\n - height (number) height\\r\\n - r (number) #optional radius for rounded corners, default is 0\\r\\n = (object) Raphaël element object with type “rect”\\r\\n **\\r\\n > Usage\\r\\n | // regular rectangle\\r\\n | var c = paper.rect(10, 10, 50, 50);\\r\\n | // rectangle with rounded corners\\r\\n | var c = paper.rect(40, 40, 50, 50, 10);\\r\\n \\\\*/\\r\\n paperproto.rect = function (x, y, w, h, r) {\\r\\n var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.ellipse\\r\\n [ method ]\\r\\n **\\r\\n * Draws an ellipse.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the centre\\r\\n - y (number) y coordinate of the centre\\r\\n - rx (number) horizontal radius\\r\\n - ry (number) vertical radius\\r\\n = (object) Raphaël element object with type “ellipse”\\r\\n **\\r\\n > Usage\\r\\n | var c = paper.ellipse(50, 50, 40, 20);\\r\\n \\\\*/\\r\\n paperproto.ellipse = function (x, y, rx, ry) {\\r\\n var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.path\\r\\n [ method ]\\r\\n **\\r\\n * Creates a path element by given path data string.\\r\\n > Parameters\\r\\n - pathString (string) #optional path string in SVG format.\\r\\n * Path string consists of one-letter commands, followed by comma seprarated arguments in numercal form. Example:\\r\\n | \\\"M10,20L30,40\\\"\\r\\n * Here we can see two commands: “M”, with arguments `(10, 20)` and “L” with arguments `(30, 40)`. Upper case letter mean command is absolute, lower case—relative.\\r\\n *\\r\\n # <p>Here is short list of commands available, for more details see <a href=\\\"http://www.w3.org/TR/SVG/paths.html#PathData\\\" title=\\\"Details of a path's data attribute's format are described in the SVG specification.\\\">SVG path string format</a>.</p>\\r\\n # <table><thead><tr><th>Command</th><th>Name</th><th>Parameters</th></tr></thead><tbody>\\r\\n # <tr><td>M</td><td>moveto</td><td>(x y)+</td></tr>\\r\\n # <tr><td>Z</td><td>closepath</td><td>(none)</td></tr>\\r\\n # <tr><td>L</td><td>lineto</td><td>(x y)+</td></tr>\\r\\n # <tr><td>H</td><td>horizontal lineto</td><td>x+</td></tr>\\r\\n # <tr><td>V</td><td>vertical lineto</td><td>y+</td></tr>\\r\\n # <tr><td>C</td><td>curveto</td><td>(x1 y1 x2 y2 x y)+</td></tr>\\r\\n # <tr><td>S</td><td>smooth curveto</td><td>(x2 y2 x y)+</td></tr>\\r\\n # <tr><td>Q</td><td>quadratic Bézier curveto</td><td>(x1 y1 x y)+</td></tr>\\r\\n # <tr><td>T</td><td>smooth quadratic Bézier curveto</td><td>(x y)+</td></tr>\\r\\n # <tr><td>A</td><td>elliptical arc</td><td>(rx ry x-axis-rotation large-arc-flag sweep-flag x y)+</td></tr>\\r\\n # <tr><td>R</td><td><a href=\\\"http://en.wikipedia.org/wiki/Catmull–Rom_spline#Catmull.E2.80.93Rom_spline\\\">Catmull-Rom curveto</a>*</td><td>x1 y1 (x y)+</td></tr></tbody></table>\\r\\n * * “Catmull-Rom curveto” is a not standard SVG command and added in 2.0 to make life easier.\\r\\n * Note: there is a special case when path consist of just three commands: “M10,10R…z”. In this case path will smoothly connects to its beginning.\\r\\n > Usage\\r\\n | var c = paper.path(\\\"M10 10L90 90\\\");\\r\\n | // draw a diagonal line:\\r\\n | // move to 10,10, line to 90,90\\r\\n * For example of path strings, check out these icons: http://raphaeljs.com/icons/\\r\\n \\\\*/\\r\\n paperproto.path = function (pathString) {\\r\\n pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E);\\r\\n var out = R._engine.path(R.format[apply](R, arguments), this);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.image\\r\\n [ method ]\\r\\n **\\r\\n * Embeds an image into the surface.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - src (string) URI of the source image\\r\\n - x (number) x coordinate position\\r\\n - y (number) y coordinate position\\r\\n - width (number) width of the image\\r\\n - height (number) height of the image\\r\\n = (object) Raphaël element object with type “image”\\r\\n **\\r\\n > Usage\\r\\n | var c = paper.image(\\\"apple.png\\\", 10, 10, 80, 80);\\r\\n \\\\*/\\r\\n paperproto.image = function (src, x, y, w, h) {\\r\\n var out = R._engine.image(this, src || \\\"about:blank\\\", x || 0, y || 0, w || 0, h || 0);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.text\\r\\n [ method ]\\r\\n **\\r\\n * Draws a text string. If you need line breaks, put “\\\\n” in the string.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate position\\r\\n - y (number) y coordinate position\\r\\n - text (string) The text string to draw\\r\\n = (object) Raphaël element object with type “text”\\r\\n **\\r\\n > Usage\\r\\n | var t = paper.text(50, 50, \\\"Raphaël\\\\nkicks\\\\nbutt!\\\");\\r\\n \\\\*/\\r\\n paperproto.text = function (x, y, text, href) {\\r\\n var out = R._engine.text(this, x || 0, y || 0, Str(text), href);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.set\\r\\n [ method ]\\r\\n **\\r\\n * Creates array-like object to keep and operate several elements at once.\\r\\n * Warning: it doesn’t create any elements for itself in the page, it just groups existing elements.\\r\\n * Sets act as pseudo elements — all methods available to an element can be used on a set.\\r\\n = (object) array-like object that represents set of elements\\r\\n **\\r\\n > Usage\\r\\n | var st = paper.set();\\r\\n | st.push(\\r\\n | paper.circle(10, 10, 5),\\r\\n | paper.circle(30, 10, 5)\\r\\n | );\\r\\n | st.attr({fill: \\\"red\\\"}); // changes the fill of both circles\\r\\n \\\\*/\\r\\n paperproto.set = function (itemsArray) {\\r\\n !R.is(itemsArray, \\\"array\\\") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length));\\r\\n var out = new Set(itemsArray);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n out[\\\"paper\\\"] = this;\\r\\n out[\\\"type\\\"] = \\\"set\\\";\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.setStart\\r\\n [ method ]\\r\\n **\\r\\n * Creates @Paper.set. All elements that will be created after calling this method and before calling\\r\\n * @Paper.setFinish will be added to the set.\\r\\n **\\r\\n > Usage\\r\\n | paper.setStart();\\r\\n | paper.circle(10, 10, 5),\\r\\n | paper.circle(30, 10, 5)\\r\\n | var st = paper.setFinish();\\r\\n | st.attr({fill: \\\"red\\\"}); // changes the fill of both circles\\r\\n \\\\*/\\r\\n paperproto.setStart = function (set) {\\r\\n this.__set__ = set || this.set();\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.setFinish\\r\\n [ method ]\\r\\n **\\r\\n * See @Paper.setStart. This method finishes catching and returns resulting set.\\r\\n **\\r\\n = (object) set\\r\\n \\\\*/\\r\\n paperproto.setFinish = function (set) {\\r\\n var out = this.__set__;\\r\\n delete this.__set__;\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.getSize\\r\\n [ method ]\\r\\n **\\r\\n * Obtains current paper actual size.\\r\\n **\\r\\n = (object)\\r\\n \\\\*/\\r\\n paperproto.getSize = function () {\\r\\n var container = this.canvas.parentNode;\\r\\n return {\\r\\n width: container.offsetWidth,\\r\\n height: container.offsetHeight\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.setSize\\r\\n [ method ]\\r\\n **\\r\\n * If you need to change dimensions of the canvas call this method\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - width (number) new width of the canvas\\r\\n - height (number) new height of the canvas\\r\\n \\\\*/\\r\\n paperproto.setSize = function (width, height) {\\r\\n return R._engine.setSize.call(this, width, height);\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.setViewBox\\r\\n [ method ]\\r\\n **\\r\\n * Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by\\r\\n * specifying new boundaries.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) new x position, default is `0`\\r\\n - y (number) new y position, default is `0`\\r\\n - w (number) new width of the canvas\\r\\n - h (number) new height of the canvas\\r\\n - fit (boolean) `true` if you want graphics to fit into new boundary box\\r\\n \\\\*/\\r\\n paperproto.setViewBox = function (x, y, w, h, fit) {\\r\\n return R._engine.setViewBox.call(this, x, y, w, h, fit);\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.top\\r\\n [ property ]\\r\\n **\\r\\n * Points to the topmost element on the paper\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Paper.bottom\\r\\n [ property ]\\r\\n **\\r\\n * Points to the bottom element on the paper\\r\\n \\\\*/\\r\\n paperproto.top = paperproto.bottom = null;\\r\\n /*\\\\\\r\\n * Paper.raphael\\r\\n [ property ]\\r\\n **\\r\\n * Points to the @Raphael object/function\\r\\n \\\\*/\\r\\n paperproto.raphael = R;\\r\\n var getOffset = function (elem) {\\r\\n var box = elem.getBoundingClientRect(),\\r\\n doc = elem.ownerDocument,\\r\\n body = doc.body,\\r\\n docElem = doc.documentElement,\\r\\n clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,\\r\\n top = box.top + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop,\\r\\n left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft;\\r\\n return {\\r\\n y: top,\\r\\n x: left\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.getElementByPoint\\r\\n [ method ]\\r\\n **\\r\\n * Returns you topmost element under given point.\\r\\n **\\r\\n = (object) Raphaël element object\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate from the top left corner of the window\\r\\n - y (number) y coordinate from the top left corner of the window\\r\\n > Usage\\r\\n | paper.getElementByPoint(mouseX, mouseY).attr({stroke: \\\"#f00\\\"});\\r\\n \\\\*/\\r\\n paperproto.getElementByPoint = function (x, y) {\\r\\n var paper = this,\\r\\n svg = paper.canvas,\\r\\n target = g.doc.elementFromPoint(x, y);\\r\\n if (g.win.opera && target.tagName == \\\"svg\\\") {\\r\\n var so = getOffset(svg),\\r\\n sr = svg.createSVGRect();\\r\\n sr.x = x - so.x;\\r\\n sr.y = y - so.y;\\r\\n sr.width = sr.height = 1;\\r\\n var hits = svg.getIntersectionList(sr, null);\\r\\n if (hits.length) {\\r\\n target = hits[hits.length - 1];\\r\\n }\\r\\n }\\r\\n if (!target) {\\r\\n return null;\\r\\n }\\r\\n while (target.parentNode && target != svg.parentNode && !target.raphael) {\\r\\n target = target.parentNode;\\r\\n }\\r\\n target == paper.canvas.parentNode && (target = svg);\\r\\n target = target && target.raphael ? paper.getById(target.raphaelid) : null;\\r\\n return target;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Paper.getElementsByBBox\\r\\n [ method ]\\r\\n **\\r\\n * Returns set of elements that have an intersecting bounding box\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - bbox (object) bbox to check with\\r\\n = (object) @Set\\r\\n \\\\*/\\r\\n paperproto.getElementsByBBox = function (bbox) {\\r\\n var set = this.set();\\r\\n this.forEach(function (el) {\\r\\n if (R.isBBoxIntersect(el.getBBox(), bbox)) {\\r\\n set.push(el);\\r\\n }\\r\\n });\\r\\n return set;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Paper.getById\\r\\n [ method ]\\r\\n **\\r\\n * Returns you element by its internal ID.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - id (number) id\\r\\n = (object) Raphaël element object\\r\\n \\\\*/\\r\\n paperproto.getById = function (id) {\\r\\n var bot = this.bottom;\\r\\n while (bot) {\\r\\n if (bot.id == id) {\\r\\n return bot;\\r\\n }\\r\\n bot = bot.next;\\r\\n }\\r\\n return null;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.forEach\\r\\n [ method ]\\r\\n **\\r\\n * Executes given function for each element on the paper\\r\\n *\\r\\n * If callback function returns `false` it will stop loop running.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - callback (function) function to run\\r\\n - thisArg (object) context object for the callback\\r\\n = (object) Paper object\\r\\n > Usage\\r\\n | paper.forEach(function (el) {\\r\\n | el.attr({ stroke: \\\"blue\\\" });\\r\\n | });\\r\\n \\\\*/\\r\\n paperproto.forEach = function (callback, thisArg) {\\r\\n var bot = this.bottom;\\r\\n while (bot) {\\r\\n if (callback.call(thisArg, bot) === false) {\\r\\n return this;\\r\\n }\\r\\n bot = bot.next;\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.getElementsByPoint\\r\\n [ method ]\\r\\n **\\r\\n * Returns set of elements that have common point inside\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the point\\r\\n - y (number) y coordinate of the point\\r\\n = (object) @Set\\r\\n \\\\*/\\r\\n paperproto.getElementsByPoint = function (x, y) {\\r\\n var set = this.set();\\r\\n this.forEach(function (el) {\\r\\n if (el.isPointInside(x, y)) {\\r\\n set.push(el);\\r\\n }\\r\\n });\\r\\n return set;\\r\\n };\\r\\n function x_y() {\\r\\n return this.x + S + this.y;\\r\\n }\\r\\n function x_y_w_h() {\\r\\n return this.x + S + this.y + S + this.width + \\\" \\\\xd7 \\\" + this.height;\\r\\n }\\r\\n /*\\\\\\r\\n * Element.isPointInside\\r\\n [ method ]\\r\\n **\\r\\n * Determine if given point is inside this element’s shape\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the point\\r\\n - y (number) y coordinate of the point\\r\\n = (boolean) `true` if point inside the shape\\r\\n \\\\*/\\r\\n elproto.isPointInside = function (x, y) {\\r\\n var rp = this.realPath = getPath[this.type](this);\\r\\n if (this.attr('transform') && this.attr('transform').length) {\\r\\n rp = R.transformPath(rp, this.attr('transform'));\\r\\n }\\r\\n return R.isPointInsidePath(rp, x, y);\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getBBox\\r\\n [ method ]\\r\\n **\\r\\n * Return bounding box for a given element\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - isWithoutTransform (boolean) flag, `true` if you want to have bounding box before transformations. Default is `false`.\\r\\n = (object) Bounding box object:\\r\\n o {\\r\\n o x: (number) top left corner x\\r\\n o y: (number) top left corner y\\r\\n o x2: (number) bottom right corner x\\r\\n o y2: (number) bottom right corner y\\r\\n o width: (number) width\\r\\n o height: (number) height\\r\\n o }\\r\\n \\\\*/\\r\\n elproto.getBBox = function (isWithoutTransform) {\\r\\n if (this.removed) {\\r\\n return {};\\r\\n }\\r\\n var _ = this._;\\r\\n if (isWithoutTransform) {\\r\\n if (_.dirty || !_.bboxwt) {\\r\\n this.realPath = getPath[this.type](this);\\r\\n _.bboxwt = pathDimensions(this.realPath);\\r\\n _.bboxwt.toString = x_y_w_h;\\r\\n _.dirty = 0;\\r\\n }\\r\\n return _.bboxwt;\\r\\n }\\r\\n if (_.dirty || _.dirtyT || !_.bbox) {\\r\\n if (_.dirty || !this.realPath) {\\r\\n _.bboxwt = 0;\\r\\n this.realPath = getPath[this.type](this);\\r\\n }\\r\\n _.bbox = pathDimensions(mapPath(this.realPath, this.matrix));\\r\\n _.bbox.toString = x_y_w_h;\\r\\n _.dirty = _.dirtyT = 0;\\r\\n }\\r\\n return _.bbox;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.clone\\r\\n [ method ]\\r\\n **\\r\\n = (object) clone of a given element\\r\\n **\\r\\n \\\\*/\\r\\n elproto.clone = function () {\\r\\n if (this.removed) {\\r\\n return null;\\r\\n }\\r\\n var out = this.paper[this.type]().attr(this.attr());\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.glow\\r\\n [ method ]\\r\\n **\\r\\n * Return set of elements that create glow-like effect around given element. See @Paper.set.\\r\\n *\\r\\n * Note: Glow is not connected to the element. If you change element attributes it won’t adjust itself.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - glow (object) #optional parameters object with all properties optional:\\r\\n o {\\r\\n o width (number) size of the glow, default is `10`\\r\\n o fill (boolean) will it be filled, default is `false`\\r\\n o opacity (number) opacity, default is `0.5`\\r\\n o offsetx (number) horizontal offset, default is `0`\\r\\n o offsety (number) vertical offset, default is `0`\\r\\n o color (string) glow colour, default is `black`\\r\\n o }\\r\\n = (object) @Paper.set of elements that represents glow\\r\\n \\\\*/\\r\\n elproto.glow = function (glow) {\\r\\n if (this.type == \\\"text\\\") {\\r\\n return null;\\r\\n }\\r\\n glow = glow || {};\\r\\n var s = {\\r\\n width: (glow.width || 10) + (+this.attr(\\\"stroke-width\\\") || 1),\\r\\n fill: glow.fill || false,\\r\\n opacity: glow.opacity == null ? .5 : glow.opacity,\\r\\n offsetx: glow.offsetx || 0,\\r\\n offsety: glow.offsety || 0,\\r\\n color: glow.color || \\\"#000\\\"\\r\\n },\\r\\n c = s.width / 2,\\r\\n r = this.paper,\\r\\n out = r.set(),\\r\\n path = this.realPath || getPath[this.type](this);\\r\\n path = this.matrix ? mapPath(path, this.matrix) : path;\\r\\n for (var i = 1; i < c + 1; i++) {\\r\\n out.push(r.path(path).attr({\\r\\n stroke: s.color,\\r\\n fill: s.fill ? s.color : \\\"none\\\",\\r\\n \\\"stroke-linejoin\\\": \\\"round\\\",\\r\\n \\\"stroke-linecap\\\": \\\"round\\\",\\r\\n \\\"stroke-width\\\": +(s.width / c * i).toFixed(3),\\r\\n opacity: +(s.opacity / c).toFixed(3)\\r\\n }));\\r\\n }\\r\\n return out.insertBefore(this).translate(s.offsetx, s.offsety);\\r\\n };\\r\\n var curveslengths = {},\\r\\n getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) {\\r\\n if (length == null) {\\r\\n return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y);\\r\\n } else {\\r\\n return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length));\\r\\n }\\r\\n },\\r\\n getLengthFactory = function (istotal, subpath) {\\r\\n return function (path, length, onlystart) {\\r\\n path = path2curve(path);\\r\\n var x, y, p, l, sp = \\\"\\\", subpaths = {}, point,\\r\\n len = 0;\\r\\n for (var i = 0, ii = path.length; i < ii; i++) {\\r\\n p = path[i];\\r\\n if (p[0] == \\\"M\\\") {\\r\\n x = +p[1];\\r\\n y = +p[2];\\r\\n } else {\\r\\n l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);\\r\\n if (len + l > length) {\\r\\n if (subpath && !subpaths.start) {\\r\\n point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);\\r\\n sp += [\\\"C\\\" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y];\\r\\n if (onlystart) {return sp;}\\r\\n subpaths.start = sp;\\r\\n sp = [\\\"M\\\" + point.x, point.y + \\\"C\\\" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join();\\r\\n len += l;\\r\\n x = +p[5];\\r\\n y = +p[6];\\r\\n continue;\\r\\n }\\r\\n if (!istotal && !subpath) {\\r\\n point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);\\r\\n return {x: point.x, y: point.y, alpha: point.alpha};\\r\\n }\\r\\n }\\r\\n len += l;\\r\\n x = +p[5];\\r\\n y = +p[6];\\r\\n }\\r\\n sp += p.shift() + p;\\r\\n }\\r\\n subpaths.end = sp;\\r\\n point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1);\\r\\n point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha});\\r\\n return point;\\r\\n };\\r\\n };\\r\\n var getTotalLength = getLengthFactory(1),\\r\\n getPointAtLength = getLengthFactory(),\\r\\n getSubpathsAtLength = getLengthFactory(0, 1);\\r\\n /*\\\\\\r\\n * Raphael.getTotalLength\\r\\n [ method ]\\r\\n **\\r\\n * Returns length of the given path in pixels.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - path (string) SVG path string.\\r\\n **\\r\\n = (number) length.\\r\\n \\\\*/\\r\\n R.getTotalLength = getTotalLength;\\r\\n /*\\\\\\r\\n * Raphael.getPointAtLength\\r\\n [ method ]\\r\\n **\\r\\n * Return coordinates of the point located at the given length on the given path.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - path (string) SVG path string\\r\\n - length (number)\\r\\n **\\r\\n = (object) representation of the point:\\r\\n o {\\r\\n o x: (number) x coordinate\\r\\n o y: (number) y coordinate\\r\\n o alpha: (number) angle of derivative\\r\\n o }\\r\\n \\\\*/\\r\\n R.getPointAtLength = getPointAtLength;\\r\\n /*\\\\\\r\\n * Raphael.getSubpath\\r\\n [ method ]\\r\\n **\\r\\n * Return subpath of a given path from given length to given length.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - path (string) SVG path string\\r\\n - from (number) position of the start of the segment\\r\\n - to (number) position of the end of the segment\\r\\n **\\r\\n = (string) pathstring for the segment\\r\\n \\\\*/\\r\\n R.getSubpath = function (path, from, to) {\\r\\n if (this.getTotalLength(path) - to < 1e-6) {\\r\\n return getSubpathsAtLength(path, from).end;\\r\\n }\\r\\n var a = getSubpathsAtLength(path, to, 1);\\r\\n return from ? getSubpathsAtLength(a, from).end : a;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getTotalLength\\r\\n [ method ]\\r\\n **\\r\\n * Returns length of the path in pixels. Only works for element of “path” type.\\r\\n = (number) length.\\r\\n \\\\*/\\r\\n elproto.getTotalLength = function () {\\r\\n var path = this.getPath();\\r\\n if (!path) {\\r\\n return;\\r\\n }\\r\\n\\r\\n if (this.node.getTotalLength) {\\r\\n return this.node.getTotalLength();\\r\\n }\\r\\n\\r\\n return getTotalLength(path);\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getPointAtLength\\r\\n [ method ]\\r\\n **\\r\\n * Return coordinates of the point located at the given length on the given path. Only works for element of “path” type.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - length (number)\\r\\n **\\r\\n = (object) representation of the point:\\r\\n o {\\r\\n o x: (number) x coordinate\\r\\n o y: (number) y coordinate\\r\\n o alpha: (number) angle of derivative\\r\\n o }\\r\\n \\\\*/\\r\\n elproto.getPointAtLength = function (length) {\\r\\n var path = this.getPath();\\r\\n if (!path) {\\r\\n return;\\r\\n }\\r\\n\\r\\n return getPointAtLength(path, length);\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getPath\\r\\n [ method ]\\r\\n **\\r\\n * Returns path of the element. Only works for elements of “path” type and simple elements like circle.\\r\\n = (object) path\\r\\n **\\r\\n \\\\*/\\r\\n elproto.getPath = function () {\\r\\n var path,\\r\\n getPath = R._getPath[this.type];\\r\\n\\r\\n if (this.type == \\\"text\\\" || this.type == \\\"set\\\") {\\r\\n return;\\r\\n }\\r\\n\\r\\n if (getPath) {\\r\\n path = getPath(this);\\r\\n }\\r\\n\\r\\n return path;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getSubpath\\r\\n [ method ]\\r\\n **\\r\\n * Return subpath of a given element from given length to given length. Only works for element of “path” type.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - from (number) position of the start of the segment\\r\\n - to (number) position of the end of the segment\\r\\n **\\r\\n = (string) pathstring for the segment\\r\\n \\\\*/\\r\\n elproto.getSubpath = function (from, to) {\\r\\n var path = this.getPath();\\r\\n if (!path) {\\r\\n return;\\r\\n }\\r\\n\\r\\n return R.getSubpath(path, from, to);\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.easing_formulas\\r\\n [ property ]\\r\\n **\\r\\n * Object that contains easing formulas for animation. You could extend it with your own. By default it has following list of easing:\\r\\n # <ul>\\r\\n # <li>“linear”</li>\\r\\n # <li>“<” or “easeIn” or “ease-in”</li>\\r\\n # <li>“>” or “easeOut” or “ease-out”</li>\\r\\n # <li>“<>” or “easeInOut” or “ease-in-out”</li>\\r\\n # <li>“backIn” or “back-in”</li>\\r\\n # <li>“backOut” or “back-out”</li>\\r\\n # <li>“elastic”</li>\\r\\n # <li>“bounce”</li>\\r\\n # </ul>\\r\\n # <p>See also <a href=\\\"http://raphaeljs.com/easing.html\\\">Easing demo</a>.</p>\\r\\n \\\\*/\\r\\n var ef = R.easing_formulas = {\\r\\n linear: function (n) {\\r\\n return n;\\r\\n },\\r\\n \\\"<\\\": function (n) {\\r\\n return pow(n, 1.7);\\r\\n },\\r\\n \\\">\\\": function (n) {\\r\\n return pow(n, .48);\\r\\n },\\r\\n \\\"<>\\\": function (n) {\\r\\n var q = .48 - n / 1.04,\\r\\n Q = math.sqrt(.1734 + q * q),\\r\\n x = Q - q,\\r\\n X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1),\\r\\n y = -Q - q,\\r\\n Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1),\\r\\n t = X + Y + .5;\\r\\n return (1 - t) * 3 * t * t + t * t * t;\\r\\n },\\r\\n backIn: function (n) {\\r\\n var s = 1.70158;\\r\\n return n * n * ((s + 1) * n - s);\\r\\n },\\r\\n backOut: function (n) {\\r\\n n = n - 1;\\r\\n var s = 1.70158;\\r\\n return n * n * ((s + 1) * n + s) + 1;\\r\\n },\\r\\n elastic: function (n) {\\r\\n if (n == !!n) {\\r\\n return n;\\r\\n }\\r\\n return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1;\\r\\n },\\r\\n bounce: function (n) {\\r\\n var s = 7.5625,\\r\\n p = 2.75,\\r\\n l;\\r\\n if (n < (1 / p)) {\\r\\n l = s * n * n;\\r\\n } else {\\r\\n if (n < (2 / p)) {\\r\\n n -= (1.5 / p);\\r\\n l = s * n * n + .75;\\r\\n } else {\\r\\n if (n < (2.5 / p)) {\\r\\n n -= (2.25 / p);\\r\\n l = s * n * n + .9375;\\r\\n } else {\\r\\n n -= (2.625 / p);\\r\\n l = s * n * n + .984375;\\r\\n }\\r\\n }\\r\\n }\\r\\n return l;\\r\\n }\\r\\n };\\r\\n ef.easeIn = ef[\\\"ease-in\\\"] = ef[\\\"<\\\"];\\r\\n ef.easeOut = ef[\\\"ease-out\\\"] = ef[\\\">\\\"];\\r\\n ef.easeInOut = ef[\\\"ease-in-out\\\"] = ef[\\\"<>\\\"];\\r\\n ef[\\\"back-in\\\"] = ef.backIn;\\r\\n ef[\\\"back-out\\\"] = ef.backOut;\\r\\n\\r\\n var animationElements = [],\\r\\n requestAnimFrame = window.requestAnimationFrame ||\\r\\n window.webkitRequestAnimationFrame ||\\r\\n window.mozRequestAnimationFrame ||\\r\\n window.oRequestAnimationFrame ||\\r\\n window.msRequestAnimationFrame ||\\r\\n function (callback) {\\r\\n setTimeout(callback, 16);\\r\\n },\\r\\n animation = function () {\\r\\n var Now = +new Date,\\r\\n l = 0;\\r\\n for (; l < animationElements.length; l++) {\\r\\n var e = animationElements[l];\\r\\n if (e.el.removed || e.paused) {\\r\\n continue;\\r\\n }\\r\\n var time = Now - e.start,\\r\\n ms = e.ms,\\r\\n easing = e.easing,\\r\\n from = e.from,\\r\\n diff = e.diff,\\r\\n to = e.to,\\r\\n t = e.t,\\r\\n that = e.el,\\r\\n set = {},\\r\\n now,\\r\\n init = {},\\r\\n key;\\r\\n if (e.initstatus) {\\r\\n time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms;\\r\\n e.status = e.initstatus;\\r\\n delete e.initstatus;\\r\\n e.stop && animationElements.splice(l--, 1);\\r\\n } else {\\r\\n e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top;\\r\\n }\\r\\n if (time < 0) {\\r\\n continue;\\r\\n }\\r\\n if (time < ms) {\\r\\n var pos = easing(time / ms);\\r\\n for (var attr in from) if (from[has](attr)) {\\r\\n switch (availableAnimAttrs[attr]) {\\r\\n case nu:\\r\\n now = +from[attr] + pos * ms * diff[attr];\\r\\n break;\\r\\n case \\\"colour\\\":\\r\\n now = \\\"rgb(\\\" + [\\r\\n upto255(round(from[attr].r + pos * ms * diff[attr].r)),\\r\\n upto255(round(from[attr].g + pos * ms * diff[attr].g)),\\r\\n upto255(round(from[attr].b + pos * ms * diff[attr].b))\\r\\n ].join(\\\",\\\") + \\\")\\\";\\r\\n break;\\r\\n case \\\"path\\\":\\r\\n now = [];\\r\\n for (var i = 0, ii = from[attr].length; i < ii; i++) {\\r\\n now[i] = [from[attr][i][0]];\\r\\n for (var j = 1, jj = from[attr][i].length; j < jj; j++) {\\r\\n now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j];\\r\\n }\\r\\n now[i] = now[i].join(S);\\r\\n }\\r\\n now = now.join(S);\\r\\n break;\\r\\n case \\\"transform\\\":\\r\\n if (diff[attr].real) {\\r\\n now = [];\\r\\n for (i = 0, ii = from[attr].length; i < ii; i++) {\\r\\n now[i] = [from[attr][i][0]];\\r\\n for (j = 1, jj = from[attr][i].length; j < jj; j++) {\\r\\n now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j];\\r\\n }\\r\\n }\\r\\n } else {\\r\\n var get = function (i) {\\r\\n return +from[attr][i] + pos * ms * diff[attr][i];\\r\\n };\\r\\n // now = [[\\\"r\\\", get(2), 0, 0], [\\\"t\\\", get(3), get(4)], [\\\"s\\\", get(0), get(1), 0, 0]];\\r\\n now = [[\\\"m\\\", get(0), get(1), get(2), get(3), get(4), get(5)]];\\r\\n }\\r\\n break;\\r\\n case \\\"csv\\\":\\r\\n if (attr == \\\"clip-rect\\\") {\\r\\n now = [];\\r\\n i = 4;\\r\\n while (i--) {\\r\\n now[i] = +from[attr][i] + pos * ms * diff[attr][i];\\r\\n }\\r\\n }\\r\\n break;\\r\\n default:\\r\\n var from2 = [][concat](from[attr]);\\r\\n now = [];\\r\\n i = that.paper.customAttributes[attr].length;\\r\\n while (i--) {\\r\\n now[i] = +from2[i] + pos * ms * diff[attr][i];\\r\\n }\\r\\n break;\\r\\n }\\r\\n set[attr] = now;\\r\\n }\\r\\n that.attr(set);\\r\\n (function (id, that, anim) {\\r\\n setTimeout(function () {\\r\\n eve(\\\"raphael.anim.frame.\\\" + id, that, anim);\\r\\n });\\r\\n })(that.id, that, e.anim);\\r\\n } else {\\r\\n (function(f, el, a) {\\r\\n setTimeout(function() {\\r\\n eve(\\\"raphael.anim.frame.\\\" + el.id, el, a);\\r\\n eve(\\\"raphael.anim.finish.\\\" + el.id, el, a);\\r\\n R.is(f, \\\"function\\\") && f.call(el);\\r\\n });\\r\\n })(e.callback, that, e.anim);\\r\\n that.attr(to);\\r\\n animationElements.splice(l--, 1);\\r\\n if (e.repeat > 1 && !e.next) {\\r\\n for (key in to) if (to[has](key)) {\\r\\n init[key] = e.totalOrigin[key];\\r\\n }\\r\\n e.el.attr(init);\\r\\n runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1);\\r\\n }\\r\\n if (e.next && !e.stop) {\\r\\n runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat);\\r\\n }\\r\\n }\\r\\n }\\r\\n animationElements.length && requestAnimFrame(animation);\\r\\n },\\r\\n upto255 = function (color) {\\r\\n return color > 255 ? 255 : color < 0 ? 0 : color;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.animateWith\\r\\n [ method ]\\r\\n **\\r\\n * Acts similar to @Element.animate, but ensure that given animation runs in sync with another given element.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - el (object) element to sync with\\r\\n - anim (object) animation to sync with\\r\\n - params (object) #optional final attributes for the element, see also @Element.attr\\r\\n - ms (number) #optional number of milliseconds for animation to run\\r\\n - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\\r\\n - callback (function) #optional callback function. Will be called at the end of animation.\\r\\n * or\\r\\n - element (object) element to sync with\\r\\n - anim (object) animation to sync with\\r\\n - animation (object) #optional animation object, see @Raphael.animation\\r\\n **\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n elproto.animateWith = function (el, anim, params, ms, easing, callback) {\\r\\n var element = this;\\r\\n if (element.removed) {\\r\\n callback && callback.call(element);\\r\\n return element;\\r\\n }\\r\\n var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback),\\r\\n x, y;\\r\\n runAnimation(a, element, a.percents[0], null, element.attr());\\r\\n for (var i = 0, ii = animationElements.length; i < ii; i++) {\\r\\n if (animationElements[i].anim == anim && animationElements[i].el == el) {\\r\\n animationElements[ii - 1].start = animationElements[i].start;\\r\\n break;\\r\\n }\\r\\n }\\r\\n return element;\\r\\n //\\r\\n //\\r\\n // var a = params ? R.animation(params, ms, easing, callback) : anim,\\r\\n // status = element.status(anim);\\r\\n // return this.animate(a).status(a, status * anim.ms / a.ms);\\r\\n };\\r\\n function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) {\\r\\n var cx = 3 * p1x,\\r\\n bx = 3 * (p2x - p1x) - cx,\\r\\n ax = 1 - cx - bx,\\r\\n cy = 3 * p1y,\\r\\n by = 3 * (p2y - p1y) - cy,\\r\\n ay = 1 - cy - by;\\r\\n function sampleCurveX(t) {\\r\\n return ((ax * t + bx) * t + cx) * t;\\r\\n }\\r\\n function solve(x, epsilon) {\\r\\n var t = solveCurveX(x, epsilon);\\r\\n return ((ay * t + by) * t + cy) * t;\\r\\n }\\r\\n function solveCurveX(x, epsilon) {\\r\\n var t0, t1, t2, x2, d2, i;\\r\\n for(t2 = x, i = 0; i < 8; i++) {\\r\\n x2 = sampleCurveX(t2) - x;\\r\\n if (abs(x2) < epsilon) {\\r\\n return t2;\\r\\n }\\r\\n d2 = (3 * ax * t2 + 2 * bx) * t2 + cx;\\r\\n if (abs(d2) < 1e-6) {\\r\\n break;\\r\\n }\\r\\n t2 = t2 - x2 / d2;\\r\\n }\\r\\n t0 = 0;\\r\\n t1 = 1;\\r\\n t2 = x;\\r\\n if (t2 < t0) {\\r\\n return t0;\\r\\n }\\r\\n if (t2 > t1) {\\r\\n return t1;\\r\\n }\\r\\n while (t0 < t1) {\\r\\n x2 = sampleCurveX(t2);\\r\\n if (abs(x2 - x) < epsilon) {\\r\\n return t2;\\r\\n }\\r\\n if (x > x2) {\\r\\n t0 = t2;\\r\\n } else {\\r\\n t1 = t2;\\r\\n }\\r\\n t2 = (t1 - t0) / 2 + t0;\\r\\n }\\r\\n return t2;\\r\\n }\\r\\n return solve(t, 1 / (200 * duration));\\r\\n }\\r\\n elproto.onAnimation = function (f) {\\r\\n f ? eve.on(\\\"raphael.anim.frame.\\\" + this.id, f) : eve.unbind(\\\"raphael.anim.frame.\\\" + this.id);\\r\\n return this;\\r\\n };\\r\\n function Animation(anim, ms) {\\r\\n var percents = [],\\r\\n newAnim = {};\\r\\n this.ms = ms;\\r\\n this.times = 1;\\r\\n if (anim) {\\r\\n for (var attr in anim) if (anim[has](attr)) {\\r\\n newAnim[toFloat(attr)] = anim[attr];\\r\\n percents.push(toFloat(attr));\\r\\n }\\r\\n percents.sort(sortByNumber);\\r\\n }\\r\\n this.anim = newAnim;\\r\\n this.top = percents[percents.length - 1];\\r\\n this.percents = percents;\\r\\n }\\r\\n /*\\\\\\r\\n * Animation.delay\\r\\n [ method ]\\r\\n **\\r\\n * Creates a copy of existing animation object with given delay.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - delay (number) number of ms to pass between animation start and actual animation\\r\\n **\\r\\n = (object) new altered Animation object\\r\\n | var anim = Raphael.animation({cx: 10, cy: 20}, 2e3);\\r\\n | circle1.animate(anim); // run the given animation immediately\\r\\n | circle2.animate(anim.delay(500)); // run the given animation after 500 ms\\r\\n \\\\*/\\r\\n Animation.prototype.delay = function (delay) {\\r\\n var a = new Animation(this.anim, this.ms);\\r\\n a.times = this.times;\\r\\n a.del = +delay || 0;\\r\\n return a;\\r\\n };\\r\\n /*\\\\\\r\\n * Animation.repeat\\r\\n [ method ]\\r\\n **\\r\\n * Creates a copy of existing animation object with given repetition.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - repeat (number) number iterations of animation. For infinite animation pass `Infinity`\\r\\n **\\r\\n = (object) new altered Animation object\\r\\n \\\\*/\\r\\n Animation.prototype.repeat = function (times) {\\r\\n var a = new Animation(this.anim, this.ms);\\r\\n a.del = this.del;\\r\\n a.times = math.floor(mmax(times, 0)) || 1;\\r\\n return a;\\r\\n };\\r\\n function runAnimation(anim, element, percent, status, totalOrigin, times) {\\r\\n percent = toFloat(percent);\\r\\n var params,\\r\\n isInAnim,\\r\\n isInAnimSet,\\r\\n percents = [],\\r\\n next,\\r\\n prev,\\r\\n timestamp,\\r\\n ms = anim.ms,\\r\\n from = {},\\r\\n to = {},\\r\\n diff = {};\\r\\n if (status) {\\r\\n for (i = 0, ii = animationElements.length; i < ii; i++) {\\r\\n var e = animationElements[i];\\r\\n if (e.el.id == element.id && e.anim == anim) {\\r\\n if (e.percent != percent) {\\r\\n animationElements.splice(i, 1);\\r\\n isInAnimSet = 1;\\r\\n } else {\\r\\n isInAnim = e;\\r\\n }\\r\\n element.attr(e.totalOrigin);\\r\\n break;\\r\\n }\\r\\n }\\r\\n } else {\\r\\n status = +to; // NaN\\r\\n }\\r\\n for (var i = 0, ii = anim.percents.length; i < ii; i++) {\\r\\n if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) {\\r\\n percent = anim.percents[i];\\r\\n prev = anim.percents[i - 1] || 0;\\r\\n ms = ms / anim.top * (percent - prev);\\r\\n next = anim.percents[i + 1];\\r\\n params = anim.anim[percent];\\r\\n break;\\r\\n } else if (status) {\\r\\n element.attr(anim.anim[anim.percents[i]]);\\r\\n }\\r\\n }\\r\\n if (!params) {\\r\\n return;\\r\\n }\\r\\n if (!isInAnim) {\\r\\n for (var attr in params) if (params[has](attr)) {\\r\\n if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) {\\r\\n from[attr] = element.attr(attr);\\r\\n (from[attr] == null) && (from[attr] = availableAttrs[attr]);\\r\\n to[attr] = params[attr];\\r\\n switch (availableAnimAttrs[attr]) {\\r\\n case nu:\\r\\n diff[attr] = (to[attr] - from[attr]) / ms;\\r\\n break;\\r\\n case \\\"colour\\\":\\r\\n from[attr] = R.getRGB(from[attr]);\\r\\n var toColour = R.getRGB(to[attr]);\\r\\n diff[attr] = {\\r\\n r: (toColour.r - from[attr].r) / ms,\\r\\n g: (toColour.g - from[attr].g) / ms,\\r\\n b: (toColour.b - from[attr].b) / ms\\r\\n };\\r\\n break;\\r\\n case \\\"path\\\":\\r\\n var pathes = path2curve(from[attr], to[attr]),\\r\\n toPath = pathes[1];\\r\\n from[attr] = pathes[0];\\r\\n diff[attr] = [];\\r\\n for (i = 0, ii = from[attr].length; i < ii; i++) {\\r\\n diff[attr][i] = [0];\\r\\n for (var j = 1, jj = from[attr][i].length; j < jj; j++) {\\r\\n diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms;\\r\\n }\\r\\n }\\r\\n break;\\r\\n case \\\"transform\\\":\\r\\n var _ = element._,\\r\\n eq = equaliseTransform(_[attr], to[attr]);\\r\\n if (eq) {\\r\\n from[attr] = eq.from;\\r\\n to[attr] = eq.to;\\r\\n diff[attr] = [];\\r\\n diff[attr].real = true;\\r\\n for (i = 0, ii = from[attr].length; i < ii; i++) {\\r\\n diff[attr][i] = [from[attr][i][0]];\\r\\n for (j = 1, jj = from[attr][i].length; j < jj; j++) {\\r\\n diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms;\\r\\n }\\r\\n }\\r\\n } else {\\r\\n var m = (element.matrix || new Matrix),\\r\\n to2 = {\\r\\n _: {transform: _.transform},\\r\\n getBBox: function () {\\r\\n return element.getBBox(1);\\r\\n }\\r\\n };\\r\\n from[attr] = [\\r\\n m.a,\\r\\n m.b,\\r\\n m.c,\\r\\n m.d,\\r\\n m.e,\\r\\n m.f\\r\\n ];\\r\\n extractTransform(to2, to[attr]);\\r\\n to[attr] = to2._.transform;\\r\\n diff[attr] = [\\r\\n (to2.matrix.a - m.a) / ms,\\r\\n (to2.matrix.b - m.b) / ms,\\r\\n (to2.matrix.c - m.c) / ms,\\r\\n (to2.matrix.d - m.d) / ms,\\r\\n (to2.matrix.e - m.e) / ms,\\r\\n (to2.matrix.f - m.f) / ms\\r\\n ];\\r\\n // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy];\\r\\n // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }};\\r\\n // extractTransform(to2, to[attr]);\\r\\n // diff[attr] = [\\r\\n // (to2._.sx - _.sx) / ms,\\r\\n // (to2._.sy - _.sy) / ms,\\r\\n // (to2._.deg - _.deg) / ms,\\r\\n // (to2._.dx - _.dx) / ms,\\r\\n // (to2._.dy - _.dy) / ms\\r\\n // ];\\r\\n }\\r\\n break;\\r\\n case \\\"csv\\\":\\r\\n var values = Str(params[attr])[split](separator),\\r\\n from2 = Str(from[attr])[split](separator);\\r\\n if (attr == \\\"clip-rect\\\") {\\r\\n from[attr] = from2;\\r\\n diff[attr] = [];\\r\\n i = from2.length;\\r\\n while (i--) {\\r\\n diff[attr][i] = (values[i] - from[attr][i]) / ms;\\r\\n }\\r\\n }\\r\\n to[attr] = values;\\r\\n break;\\r\\n default:\\r\\n values = [][concat](params[attr]);\\r\\n from2 = [][concat](from[attr]);\\r\\n diff[attr] = [];\\r\\n i = element.paper.customAttributes[attr].length;\\r\\n while (i--) {\\r\\n diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms;\\r\\n }\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n var easing = params.easing,\\r\\n easyeasy = R.easing_formulas[easing];\\r\\n if (!easyeasy) {\\r\\n easyeasy = Str(easing).match(bezierrg);\\r\\n if (easyeasy && easyeasy.length == 5) {\\r\\n var curve = easyeasy;\\r\\n easyeasy = function (t) {\\r\\n return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms);\\r\\n };\\r\\n } else {\\r\\n easyeasy = pipe;\\r\\n }\\r\\n }\\r\\n timestamp = params.start || anim.start || +new Date;\\r\\n e = {\\r\\n anim: anim,\\r\\n percent: percent,\\r\\n timestamp: timestamp,\\r\\n start: timestamp + (anim.del || 0),\\r\\n status: 0,\\r\\n initstatus: status || 0,\\r\\n stop: false,\\r\\n ms: ms,\\r\\n easing: easyeasy,\\r\\n from: from,\\r\\n diff: diff,\\r\\n to: to,\\r\\n el: element,\\r\\n callback: params.callback,\\r\\n prev: prev,\\r\\n next: next,\\r\\n repeat: times || anim.times,\\r\\n origin: element.attr(),\\r\\n totalOrigin: totalOrigin\\r\\n };\\r\\n animationElements.push(e);\\r\\n if (status && !isInAnim && !isInAnimSet) {\\r\\n e.stop = true;\\r\\n e.start = new Date - ms * status;\\r\\n if (animationElements.length == 1) {\\r\\n return animation();\\r\\n }\\r\\n }\\r\\n if (isInAnimSet) {\\r\\n e.start = new Date - e.ms * status;\\r\\n }\\r\\n animationElements.length == 1 && requestAnimFrame(animation);\\r\\n } else {\\r\\n isInAnim.initstatus = status;\\r\\n isInAnim.start = new Date - isInAnim.ms * status;\\r\\n }\\r\\n eve(\\\"raphael.anim.start.\\\" + element.id, element, anim);\\r\\n }\\r\\n /*\\\\\\r\\n * Raphael.animation\\r\\n [ method ]\\r\\n **\\r\\n * Creates an animation object that can be passed to the @Element.animate or @Element.animateWith methods.\\r\\n * See also @Animation.delay and @Animation.repeat methods.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - params (object) final attributes for the element, see also @Element.attr\\r\\n - ms (number) number of milliseconds for animation to run\\r\\n - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\\r\\n - callback (function) #optional callback function. Will be called at the end of animation.\\r\\n **\\r\\n = (object) @Animation\\r\\n \\\\*/\\r\\n R.animation = function (params, ms, easing, callback) {\\r\\n if (params instanceof Animation) {\\r\\n return params;\\r\\n }\\r\\n if (R.is(easing, \\\"function\\\") || !easing) {\\r\\n callback = callback || easing || null;\\r\\n easing = null;\\r\\n }\\r\\n params = Object(params);\\r\\n ms = +ms || 0;\\r\\n var p = {},\\r\\n json,\\r\\n attr;\\r\\n for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + \\\"%\\\" != attr) {\\r\\n json = true;\\r\\n p[attr] = params[attr];\\r\\n }\\r\\n if (!json) {\\r\\n // if percent-like syntax is used and end-of-all animation callback used\\r\\n if(callback){\\r\\n // find the last one\\r\\n var lastKey = 0;\\r\\n for(var i in params){\\r\\n var percent = toInt(i);\\r\\n if(params[has](i) && percent > lastKey){\\r\\n lastKey = percent;\\r\\n }\\r\\n }\\r\\n lastKey += '%';\\r\\n // if already defined callback in the last keyframe, skip\\r\\n !params[lastKey].callback && (params[lastKey].callback = callback);\\r\\n }\\r\\n return new Animation(params, ms);\\r\\n } else {\\r\\n easing && (p.easing = easing);\\r\\n callback && (p.callback = callback);\\r\\n return new Animation({100: p}, ms);\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * Element.animate\\r\\n [ method ]\\r\\n **\\r\\n * Creates and starts animation for given element.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - params (object) final attributes for the element, see also @Element.attr\\r\\n - ms (number) number of milliseconds for animation to run\\r\\n - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\\r\\n - callback (function) #optional callback function. Will be called at the end of animation.\\r\\n * or\\r\\n - animation (object) animation object, see @Raphael.animation\\r\\n **\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n elproto.animate = function (params, ms, easing, callback) {\\r\\n var element = this;\\r\\n if (element.removed) {\\r\\n callback && callback.call(element);\\r\\n return element;\\r\\n }\\r\\n var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback);\\r\\n runAnimation(anim, element, anim.percents[0], null, element.attr());\\r\\n return element;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.setTime\\r\\n [ method ]\\r\\n **\\r\\n * Sets the status of animation of the element in milliseconds. Similar to @Element.status method.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - anim (object) animation object\\r\\n - value (number) number of milliseconds from the beginning of the animation\\r\\n **\\r\\n = (object) original element if `value` is specified\\r\\n * Note, that during animation following events are triggered:\\r\\n *\\r\\n * On each animation frame event `anim.frame.<id>`, on start `anim.start.<id>` and on end `anim.finish.<id>`.\\r\\n \\\\*/\\r\\n elproto.setTime = function (anim, value) {\\r\\n if (anim && value != null) {\\r\\n this.status(anim, mmin(value, anim.ms) / anim.ms);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.status\\r\\n [ method ]\\r\\n **\\r\\n * Gets or sets the status of animation of the element.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - anim (object) #optional animation object\\r\\n - value (number) #optional 0 – 1. If specified, method works like a setter and sets the status of a given animation to the value. This will cause animation to jump to the given position.\\r\\n **\\r\\n = (number) status\\r\\n * or\\r\\n = (array) status if `anim` is not specified. Array of objects in format:\\r\\n o {\\r\\n o anim: (object) animation object\\r\\n o status: (number) status\\r\\n o }\\r\\n * or\\r\\n = (object) original element if `value` is specified\\r\\n \\\\*/\\r\\n elproto.status = function (anim, value) {\\r\\n var out = [],\\r\\n i = 0,\\r\\n len,\\r\\n e;\\r\\n if (value != null) {\\r\\n runAnimation(anim, this, -1, mmin(value, 1));\\r\\n return this;\\r\\n } else {\\r\\n len = animationElements.length;\\r\\n for (; i < len; i++) {\\r\\n e = animationElements[i];\\r\\n if (e.el.id == this.id && (!anim || e.anim == anim)) {\\r\\n if (anim) {\\r\\n return e.status;\\r\\n }\\r\\n out.push({\\r\\n anim: e.anim,\\r\\n status: e.status\\r\\n });\\r\\n }\\r\\n }\\r\\n if (anim) {\\r\\n return 0;\\r\\n }\\r\\n return out;\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * Element.pause\\r\\n [ method ]\\r\\n **\\r\\n * Stops animation of the element with ability to resume it later on.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - anim (object) #optional animation object\\r\\n **\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n elproto.pause = function (anim) {\\r\\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\\r\\n if (eve(\\\"raphael.anim.pause.\\\" + this.id, this, animationElements[i].anim) !== false) {\\r\\n animationElements[i].paused = true;\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.resume\\r\\n [ method ]\\r\\n **\\r\\n * Resumes animation if it was paused with @Element.pause method.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - anim (object) #optional animation object\\r\\n **\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n elproto.resume = function (anim) {\\r\\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\\r\\n var e = animationElements[i];\\r\\n if (eve(\\\"raphael.anim.resume.\\\" + this.id, this, e.anim) !== false) {\\r\\n delete e.paused;\\r\\n this.status(e.anim, e.status);\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.stop\\r\\n [ method ]\\r\\n **\\r\\n * Stops animation of the element.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - anim (object) #optional animation object\\r\\n **\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n elproto.stop = function (anim) {\\r\\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\\r\\n if (eve(\\\"raphael.anim.stop.\\\" + this.id, this, animationElements[i].anim) !== false) {\\r\\n animationElements.splice(i--, 1);\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n function stopAnimation(paper) {\\r\\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) {\\r\\n animationElements.splice(i--, 1);\\r\\n }\\r\\n }\\r\\n eve.on(\\\"raphael.remove\\\", stopAnimation);\\r\\n eve.on(\\\"raphael.clear\\\", stopAnimation);\\r\\n elproto.toString = function () {\\r\\n return \\\"Rapha\\\\xebl\\\\u2019s object\\\";\\r\\n };\\r\\n\\r\\n // Set\\r\\n var Set = function (items) {\\r\\n this.items = [];\\r\\n this.length = 0;\\r\\n this.type = \\\"set\\\";\\r\\n if (items) {\\r\\n for (var i = 0, ii = items.length; i < ii; i++) {\\r\\n if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) {\\r\\n this[this.items.length] = this.items[this.items.length] = items[i];\\r\\n this.length++;\\r\\n }\\r\\n }\\r\\n }\\r\\n },\\r\\n setproto = Set.prototype;\\r\\n /*\\\\\\r\\n * Set.push\\r\\n [ method ]\\r\\n **\\r\\n * Adds each argument to the current set.\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n setproto.push = function () {\\r\\n var item,\\r\\n len;\\r\\n for (var i = 0, ii = arguments.length; i < ii; i++) {\\r\\n item = arguments[i];\\r\\n if (item && (item.constructor == elproto.constructor || item.constructor == Set)) {\\r\\n len = this.items.length;\\r\\n this[len] = this.items[len] = item;\\r\\n this.length++;\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Set.pop\\r\\n [ method ]\\r\\n **\\r\\n * Removes last element and returns it.\\r\\n = (object) element\\r\\n \\\\*/\\r\\n setproto.pop = function () {\\r\\n this.length && delete this[this.length--];\\r\\n return this.items.pop();\\r\\n };\\r\\n /*\\\\\\r\\n * Set.forEach\\r\\n [ method ]\\r\\n **\\r\\n * Executes given function for each element in the set.\\r\\n *\\r\\n * If function returns `false` it will stop loop running.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - callback (function) function to run\\r\\n - thisArg (object) context object for the callback\\r\\n = (object) Set object\\r\\n \\\\*/\\r\\n setproto.forEach = function (callback, thisArg) {\\r\\n for (var i = 0, ii = this.items.length; i < ii; i++) {\\r\\n if (callback.call(thisArg, this.items[i], i) === false) {\\r\\n return this;\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n for (var method in elproto) if (elproto[has](method)) {\\r\\n setproto[method] = (function (methodname) {\\r\\n return function () {\\r\\n var arg = arguments;\\r\\n return this.forEach(function (el) {\\r\\n el[methodname][apply](el, arg);\\r\\n });\\r\\n };\\r\\n })(method);\\r\\n }\\r\\n setproto.attr = function (name, value) {\\r\\n if (name && R.is(name, array) && R.is(name[0], \\\"object\\\")) {\\r\\n for (var j = 0, jj = name.length; j < jj; j++) {\\r\\n this.items[j].attr(name[j]);\\r\\n }\\r\\n } else {\\r\\n for (var i = 0, ii = this.items.length; i < ii; i++) {\\r\\n this.items[i].attr(name, value);\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Set.clear\\r\\n [ method ]\\r\\n **\\r\\n * Removes all elements from the set\\r\\n \\\\*/\\r\\n setproto.clear = function () {\\r\\n while (this.length) {\\r\\n this.pop();\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * Set.splice\\r\\n [ method ]\\r\\n **\\r\\n * Removes given element from the set\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - index (number) position of the deletion\\r\\n - count (number) number of element to remove\\r\\n - insertion… (object) #optional elements to insert\\r\\n = (object) set elements that were deleted\\r\\n \\\\*/\\r\\n setproto.splice = function (index, count, insertion) {\\r\\n index = index < 0 ? mmax(this.length + index, 0) : index;\\r\\n count = mmax(0, mmin(this.length - index, count));\\r\\n var tail = [],\\r\\n todel = [],\\r\\n args = [],\\r\\n i;\\r\\n for (i = 2; i < arguments.length; i++) {\\r\\n args.push(arguments[i]);\\r\\n }\\r\\n for (i = 0; i < count; i++) {\\r\\n todel.push(this[index + i]);\\r\\n }\\r\\n for (; i < this.length - index; i++) {\\r\\n tail.push(this[index + i]);\\r\\n }\\r\\n var arglen = args.length;\\r\\n for (i = 0; i < arglen + tail.length; i++) {\\r\\n this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen];\\r\\n }\\r\\n i = this.items.length = this.length -= count - arglen;\\r\\n while (this[i]) {\\r\\n delete this[i++];\\r\\n }\\r\\n return new Set(todel);\\r\\n };\\r\\n /*\\\\\\r\\n * Set.exclude\\r\\n [ method ]\\r\\n **\\r\\n * Removes given element from the set\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - element (object) element to remove\\r\\n = (boolean) `true` if object was found & removed from the set\\r\\n \\\\*/\\r\\n setproto.exclude = function (el) {\\r\\n for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) {\\r\\n this.splice(i, 1);\\r\\n return true;\\r\\n }\\r\\n };\\r\\n setproto.animate = function (params, ms, easing, callback) {\\r\\n (R.is(easing, \\\"function\\\") || !easing) && (callback = easing || null);\\r\\n var len = this.items.length,\\r\\n i = len,\\r\\n item,\\r\\n set = this,\\r\\n collector;\\r\\n if (!len) {\\r\\n return this;\\r\\n }\\r\\n callback && (collector = function () {\\r\\n !--len && callback.call(set);\\r\\n });\\r\\n easing = R.is(easing, string) ? easing : collector;\\r\\n var anim = R.animation(params, ms, easing, collector);\\r\\n item = this.items[--i].animate(anim);\\r\\n while (i--) {\\r\\n this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim, anim);\\r\\n (this.items[i] && !this.items[i].removed) || len--;\\r\\n }\\r\\n return this;\\r\\n };\\r\\n setproto.insertAfter = function (el) {\\r\\n var i = this.items.length;\\r\\n while (i--) {\\r\\n this.items[i].insertAfter(el);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n\\r\\n // FREEGROUP Fix: RaphaelJS changes the order of the elements of the 'set' by calling the toBack method.\\r\\n // \\\"toBack\\\" must be called reverse to care about the rendering order. In this case we override\\r\\n // the buggy default implementation here.\\r\\n //\\r\\n setproto.toBack = function () {\\r\\n var i = this.items.length;\\r\\n while (i--) {\\r\\n this.items[i].toBack();\\r\\n }\\r\\n return this;\\r\\n };\\r\\n\\r\\n // FREEGROUP Fix: Unfortunately raphael didn'T expose the \\\"set.prototype\\\". In this case\\r\\n // I must add all extension to the raphael implementation itself.\\r\\n // Provide support method for easy check if the elements are visible.\\r\\n setproto.isVisible = function () {\\r\\n var i = this.items.length;\\r\\n var visible = false;\\r\\n while (i--) {\\r\\n visible = visible ||this.items[i].isVisible();\\r\\n }\\r\\n return visible;\\r\\n };\\r\\n\\r\\n\\r\\n // FREEGROUP FIX: Adding \\\"isWithoutTransform\\\" to the function and redirect them to the elements\\r\\n setproto.getBBox = function (isWithoutTransform) {\\r\\n var x = [],\\r\\n y = [],\\r\\n x2 = [],\\r\\n y2 = [];\\r\\n for (var i = this.items.length; i--;) if (!this.items[i].removed) {\\r\\n var box = this.items[i].getBBox(isWithoutTransform);\\r\\n x.push(box.x);\\r\\n y.push(box.y);\\r\\n x2.push(box.x + box.width);\\r\\n y2.push(box.y + box.height);\\r\\n }\\r\\n x = mmin[apply](0, x);\\r\\n y = mmin[apply](0, y);\\r\\n x2 = mmax[apply](0, x2);\\r\\n y2 = mmax[apply](0, y2);\\r\\n return {\\r\\n x: x,\\r\\n y: y,\\r\\n x2: x2,\\r\\n y2: y2,\\r\\n width: x2 - x,\\r\\n height: y2 - y\\r\\n };\\r\\n };\\r\\n setproto.clone = function (s) {\\r\\n s = this.paper.set();\\r\\n for (var i = 0, ii = this.items.length; i < ii; i++) {\\r\\n s.push(this.items[i].clone());\\r\\n }\\r\\n return s;\\r\\n };\\r\\n setproto.toString = function () {\\r\\n return \\\"Rapha\\\\xebl\\\\u2018s set\\\";\\r\\n };\\r\\n\\r\\n setproto.glow = function(glowConfig) {\\r\\n var ret = this.paper.set();\\r\\n this.forEach(function(shape, index){\\r\\n var g = shape.glow(glowConfig);\\r\\n if(g != null){\\r\\n g.forEach(function(shape2, index2){\\r\\n ret.push(shape2);\\r\\n });\\r\\n }\\r\\n });\\r\\n return ret;\\r\\n };\\r\\n\\r\\n\\r\\n /*\\\\\\r\\n * Set.isPointInside\\r\\n [ method ]\\r\\n **\\r\\n * Determine if given point is inside this set’s elements\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the point\\r\\n - y (number) y coordinate of the point\\r\\n = (boolean) `true` if point is inside any of the set's elements\\r\\n \\\\*/\\r\\n setproto.isPointInside = function (x, y) {\\r\\n var isPointInside = false;\\r\\n this.forEach(function (el) {\\r\\n if (el.isPointInside(x, y)) {\\r\\n isPointInside = true;\\r\\n return false; // stop loop\\r\\n }\\r\\n });\\r\\n return isPointInside;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.registerFont\\r\\n [ method ]\\r\\n **\\r\\n * Adds given font to the registered set of fonts for Raphaël. Should be used as an internal call from within Cufón’s font file.\\r\\n * Returns original parameter, so it could be used with chaining.\\r\\n # <a href=\\\"http://wiki.github.com/sorccu/cufon/about\\\">More about Cufón and how to convert your font form TTF, OTF, etc to JavaScript file.</a>\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - font (object) the font to register\\r\\n = (object) the font you passed in\\r\\n > Usage\\r\\n | Cufon.registerFont(Raphael.registerFont({…}));\\r\\n \\\\*/\\r\\n R.registerFont = function (font) {\\r\\n if (!font.face) {\\r\\n return font;\\r\\n }\\r\\n this.fonts = this.fonts || {};\\r\\n var fontcopy = {\\r\\n w: font.w,\\r\\n face: {},\\r\\n glyphs: {}\\r\\n },\\r\\n family = font.face[\\\"font-family\\\"];\\r\\n for (var prop in font.face) if (font.face[has](prop)) {\\r\\n fontcopy.face[prop] = font.face[prop];\\r\\n }\\r\\n if (this.fonts[family]) {\\r\\n this.fonts[family].push(fontcopy);\\r\\n } else {\\r\\n this.fonts[family] = [fontcopy];\\r\\n }\\r\\n if (!font.svg) {\\r\\n fontcopy.face[\\\"units-per-em\\\"] = toInt(font.face[\\\"units-per-em\\\"], 10);\\r\\n for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) {\\r\\n var path = font.glyphs[glyph];\\r\\n fontcopy.glyphs[glyph] = {\\r\\n w: path.w,\\r\\n k: {},\\r\\n d: path.d && \\\"M\\\" + path.d.replace(/[mlcxtrv]/g, function (command) {\\r\\n return {l: \\\"L\\\", c: \\\"C\\\", x: \\\"z\\\", t: \\\"m\\\", r: \\\"l\\\", v: \\\"c\\\"}[command] || \\\"M\\\";\\r\\n }) + \\\"z\\\"\\r\\n };\\r\\n if (path.k) {\\r\\n for (var k in path.k) if (path[has](k)) {\\r\\n fontcopy.glyphs[glyph].k[k] = path.k[k];\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n return font;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.getFont\\r\\n [ method ]\\r\\n **\\r\\n * Finds font object in the registered fonts by given parameters. You could specify only one word from the font name, like “Myriad” for “Myriad Pro”.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - family (string) font family name or any word from it\\r\\n - weight (string) #optional font weight\\r\\n - style (string) #optional font style\\r\\n - stretch (string) #optional font stretch\\r\\n = (object) the font object\\r\\n > Usage\\r\\n | paper.print(100, 100, \\\"Test string\\\", paper.getFont(\\\"Times\\\", 800), 30);\\r\\n \\\\*/\\r\\n paperproto.getFont = function (family, weight, style, stretch) {\\r\\n stretch = stretch || \\\"normal\\\";\\r\\n style = style || \\\"normal\\\";\\r\\n weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400;\\r\\n if (!R.fonts) {\\r\\n return;\\r\\n }\\r\\n var font = R.fonts[family];\\r\\n if (!font) {\\r\\n var name = new RegExp(\\\"(^|\\\\\\\\s)\\\" + family.replace(/[^\\\\w\\\\d\\\\s+!~.:_-]/g, E) + \\\"(\\\\\\\\s|$)\\\", \\\"i\\\");\\r\\n for (var fontName in R.fonts) if (R.fonts[has](fontName)) {\\r\\n if (name.test(fontName)) {\\r\\n font = R.fonts[fontName];\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n var thefont;\\r\\n if (font) {\\r\\n for (var i = 0, ii = font.length; i < ii; i++) {\\r\\n thefont = font[i];\\r\\n if (thefont.face[\\\"font-weight\\\"] == weight && (thefont.face[\\\"font-style\\\"] == style || !thefont.face[\\\"font-style\\\"]) && thefont.face[\\\"font-stretch\\\"] == stretch) {\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n return thefont;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.print\\r\\n [ method ]\\r\\n **\\r\\n * Creates path that represent given text written using given font at given position with given size.\\r\\n * Result of the method is path element that contains whole text as a separate path.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x position of the text\\r\\n - y (number) y position of the text\\r\\n - string (string) text to print\\r\\n - font (object) font object, see @Paper.getFont\\r\\n - size (number) #optional size of the font, default is `16`\\r\\n - origin (string) #optional could be `\\\"baseline\\\"` or `\\\"middle\\\"`, default is `\\\"middle\\\"`\\r\\n - letter_spacing (number) #optional number in range `-1..1`, default is `0`\\r\\n - line_spacing (number) #optional number in range `1..3`, default is `1`\\r\\n = (object) resulting path element, which consist of all letters\\r\\n > Usage\\r\\n | var txt = r.print(10, 50, \\\"print\\\", r.getFont(\\\"Museo\\\"), 30).attr({fill: \\\"#fff\\\"});\\r\\n \\\\*/\\r\\n paperproto.print = function (x, y, string, font, size, origin, letter_spacing, line_spacing) {\\r\\n origin = origin || \\\"middle\\\"; // baseline|middle\\r\\n letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1);\\r\\n line_spacing = mmax(mmin(line_spacing || 1, 3), 1);\\r\\n var letters = Str(string)[split](E),\\r\\n shift = 0,\\r\\n notfirst = 0,\\r\\n path = E,\\r\\n scale;\\r\\n R.is(font, \\\"string\\\") && (font = this.getFont(font));\\r\\n if (font) {\\r\\n scale = (size || 16) / font.face[\\\"units-per-em\\\"];\\r\\n var bb = font.face.bbox[split](separator),\\r\\n top = +bb[0],\\r\\n lineHeight = bb[3] - bb[1],\\r\\n shifty = 0,\\r\\n height = +bb[1] + (origin == \\\"baseline\\\" ? lineHeight + (+font.face.descent) : lineHeight / 2);\\r\\n for (var i = 0, ii = letters.length; i < ii; i++) {\\r\\n if (letters[i] == \\\"\\\\n\\\") {\\r\\n shift = 0;\\r\\n curr = 0;\\r\\n notfirst = 0;\\r\\n shifty += lineHeight * line_spacing;\\r\\n } else {\\r\\n var prev = notfirst && font.glyphs[letters[i - 1]] || {},\\r\\n curr = font.glyphs[letters[i]];\\r\\n shift += notfirst ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0;\\r\\n notfirst = 1;\\r\\n }\\r\\n if (curr && curr.d) {\\r\\n path += R.transformPath(curr.d, [\\\"t\\\", shift * scale, shifty * scale, \\\"s\\\", scale, scale, top, height, \\\"t\\\", (x - top) / scale, (y - height) / scale]);\\r\\n }\\r\\n }\\r\\n }\\r\\n return this.path(path).attr({\\r\\n fill: \\\"#000\\\",\\r\\n stroke: \\\"none\\\"\\r\\n });\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Paper.add\\r\\n [ method ]\\r\\n **\\r\\n * Imports elements in JSON array in format `{type: type, <attributes>}`\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - json (array)\\r\\n = (object) resulting set of imported elements\\r\\n > Usage\\r\\n | paper.add([\\r\\n | {\\r\\n | type: \\\"circle\\\",\\r\\n | cx: 10,\\r\\n | cy: 10,\\r\\n | r: 5\\r\\n | },\\r\\n | {\\r\\n | type: \\\"rect\\\",\\r\\n | x: 10,\\r\\n | y: 10,\\r\\n | width: 10,\\r\\n | height: 10,\\r\\n | fill: \\\"#fc0\\\"\\r\\n | }\\r\\n | ]);\\r\\n \\\\*/\\r\\n paperproto.add = function (json) {\\r\\n if (R.is(json, \\\"array\\\")) {\\r\\n var res = this.set(),\\r\\n i = 0,\\r\\n ii = json.length,\\r\\n j;\\r\\n for (; i < ii; i++) {\\r\\n j = json[i] || {};\\r\\n elements[has](j.type) && res.push(this[j.type]().attr(j));\\r\\n }\\r\\n }\\r\\n return res;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.format\\r\\n [ method ]\\r\\n **\\r\\n * Simple format function. Replaces construction of type “`{<number>}`” to the corresponding argument.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - token (string) string to format\\r\\n - … (string) rest of arguments will be treated as parameters for replacement\\r\\n = (string) formated string\\r\\n > Usage\\r\\n | var x = 10,\\r\\n | y = 20,\\r\\n | width = 40,\\r\\n | height = 50;\\r\\n | // this will draw a rectangular shape equivalent to \\\"M10,20h40v50h-40z\\\"\\r\\n | paper.path(Raphael.format(\\\"M{0},{1}h{2}v{3}h{4}z\\\", x, y, width, height, -width));\\r\\n \\\\*/\\r\\n R.format = function (token, params) {\\r\\n var args = R.is(params, array) ? [0][concat](params) : arguments;\\r\\n token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) {\\r\\n return args[++i] == null ? E : args[i];\\r\\n }));\\r\\n return token || E;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.fullfill\\r\\n [ method ]\\r\\n **\\r\\n * A little bit more advanced format function than @Raphael.format. Replaces construction of type “`{<name>}`” to the corresponding argument.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - token (string) string to format\\r\\n - json (object) object which properties will be used as a replacement\\r\\n = (string) formated string\\r\\n > Usage\\r\\n | // this will draw a rectangular shape equivalent to \\\"M10,20h40v50h-40z\\\"\\r\\n | paper.path(Raphael.fullfill(\\\"M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']}z\\\", {\\r\\n | x: 10,\\r\\n | y: 20,\\r\\n | dim: {\\r\\n | width: 40,\\r\\n | height: 50,\\r\\n | \\\"negative width\\\": -40\\r\\n | }\\r\\n | }));\\r\\n \\\\*/\\r\\n R.fullfill = (function () {\\r\\n var tokenRegex = /\\\\{([^\\\\}]+)\\\\}/g,\\r\\n objNotationRegex = /(?:(?:^|\\\\.)(.+?)(?=\\\\[|\\\\.|$|\\\\()|\\\\[('|\\\")(.+?)\\\\2\\\\])(\\\\(\\\\))?/g, // matches .xxxxx or [\\\"xxxxx\\\"] to run over object properties\\r\\n replacer = function (all, key, obj) {\\r\\n var res = obj;\\r\\n key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) {\\r\\n name = name || quotedName;\\r\\n if (res) {\\r\\n if (name in res) {\\r\\n res = res[name];\\r\\n }\\r\\n typeof res == \\\"function\\\" && isFunc && (res = res());\\r\\n }\\r\\n });\\r\\n res = (res == null || res == obj ? all : res) + \\\"\\\";\\r\\n return res;\\r\\n };\\r\\n return function (str, obj) {\\r\\n return String(str).replace(tokenRegex, function (all, key) {\\r\\n return replacer(all, key, obj);\\r\\n });\\r\\n };\\r\\n })();\\r\\n /*\\\\\\r\\n * Raphael.ninja\\r\\n [ method ]\\r\\n **\\r\\n * If you want to leave no trace of Raphaël (Well, Raphaël creates only one global variable `Raphael`, but anyway.) You can use `ninja` method.\\r\\n * Beware, that in this case plugins could stop working, because they are depending on global variable existence.\\r\\n **\\r\\n = (object) Raphael object\\r\\n > Usage\\r\\n | (function (local_raphael) {\\r\\n | var paper = local_raphael(10, 10, 320, 200);\\r\\n | …\\r\\n | })(Raphael.ninja());\\r\\n \\\\*/\\r\\n R.ninja = function () {\\r\\n oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;\\r\\n return R;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.st\\r\\n [ property (object) ]\\r\\n **\\r\\n * You can add your own method to elements and sets. It is wise to add a set method for each element method\\r\\n * you added, so you will be able to call the same method on sets too.\\r\\n **\\r\\n * See also @Raphael.el.\\r\\n > Usage\\r\\n | Raphael.el.red = function () {\\r\\n | this.attr({fill: \\\"#f00\\\"});\\r\\n | };\\r\\n | Raphael.st.red = function () {\\r\\n | this.forEach(function (el) {\\r\\n | el.red();\\r\\n | });\\r\\n | };\\r\\n | // then use it\\r\\n | paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red();\\r\\n \\\\*/\\r\\n R.st = setproto;\\r\\n\\r\\n eve.on(\\\"raphael.DOMload\\\", function () {\\r\\n loaded = true;\\r\\n });\\r\\n\\r\\n // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html\\r\\n (function (doc, loaded, f) {\\r\\n if (doc.readyState == null && doc.addEventListener){\\r\\n doc.addEventListener(loaded, f = function () {\\r\\n doc.removeEventListener(loaded, f, false);\\r\\n doc.readyState = \\\"complete\\\";\\r\\n }, false);\\r\\n doc.readyState = \\\"loading\\\";\\r\\n }\\r\\n function isLoaded() {\\r\\n (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve(\\\"raphael.DOMload\\\");\\r\\n }\\r\\n isLoaded();\\r\\n })(document, \\\"DOMContentLoaded\\\");\\r\\n\\r\\n return R;\\r\\n}));\\r\\n\\r\\n// ┌─────────────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\\\\\\r\\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ SVG Module │ \\\\\\\\\\r\\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\\\\\\r\\n// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\\\\\\\\\r\\n// └─────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n(function (glob, factory) {\\r\\n if (typeof define === \\\"function\\\" && define.amd) {\\r\\n define(\\\"raphael.svg\\\", [\\\"raphael.core\\\"], function(raphael) {\\r\\n return factory(raphael);\\r\\n });\\r\\n } else if (typeof exports === \\\"object\\\") {\\r\\n factory(require(\\\"./raphael.core\\\"));\\r\\n } else {\\r\\n factory(glob.Raphael);\\r\\n }\\r\\n}(this, function(R) {\\r\\n if (R && !R.svg) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var has = \\\"hasOwnProperty\\\",\\r\\n Str = String,\\r\\n toFloat = parseFloat,\\r\\n toInt = parseInt,\\r\\n math = Math,\\r\\n mmax = math.max,\\r\\n abs = math.abs,\\r\\n pow = math.pow,\\r\\n separator = /[, ]+/,\\r\\n eve = R.eve,\\r\\n E = \\\"\\\",\\r\\n S = \\\" \\\";\\r\\n var xlink = \\\"http://www.w3.org/1999/xlink\\\",\\r\\n markers = {\\r\\n block: \\\"M5,0 0,2.5 5,5z\\\",\\r\\n classic: \\\"M5,0 0,2.5 5,5 3.5,3 3.5,2z\\\",\\r\\n diamond: \\\"M2.5,0 5,2.5 2.5,5 0,2.5z\\\",\\r\\n open: \\\"M6,1 1,3.5 6,6\\\",\\r\\n oval: \\\"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z\\\"\\r\\n },\\r\\n markerCounter = {};\\r\\n R.toString = function () {\\r\\n return \\\"Your browser supports SVG.\\\\nYou are running Rapha\\\\xebl \\\" + this.version;\\r\\n };\\r\\n var $ = function (el, attr) {\\r\\n if (attr) {\\r\\n if (typeof el == \\\"string\\\") {\\r\\n el = $(el);\\r\\n }\\r\\n for (var key in attr) if (attr[has](key)) {\\r\\n if (key.substring(0, 6) == \\\"xlink:\\\") {\\r\\n el.setAttributeNS(xlink, key.substring(6), Str(attr[key]));\\r\\n } else {\\r\\n try {\\r\\n el.setAttribute(key, Str(attr[key]));\\r\\n }\\r\\n catch(e){\\r\\n debugger\\r\\n }\\r\\n }\\r\\n }\\r\\n } else {\\r\\n el = R._g.doc.createElementNS(\\\"http://www.w3.org/2000/svg\\\", el);\\r\\n el.style && (el.style.webkitTapHighlightColor = \\\"rgba(0,0,0,0)\\\");\\r\\n }\\r\\n return el;\\r\\n },\\r\\n addGradientFill = function (element, gradient) {\\r\\n // even called if we reset the fill of an shape.\\r\\n if (gradient === null)\\r\\n return\\r\\n\\r\\n var type = \\\"linear\\\",\\r\\n id = gradient.replace(/[\\\\(\\\\)\\\\s,\\\\xb0#]/g, \\\"_\\\"),\\r\\n fx = .5, fy = .5,\\r\\n o = element.node,\\r\\n SVG = element.paper,\\r\\n s = o.style,\\r\\n el = R._g.doc.getElementById(id);\\r\\n if (!el) {\\r\\n gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) {\\r\\n type = \\\"radial\\\";\\r\\n if (_fx && _fy) {\\r\\n fx = toFloat(_fx);\\r\\n fy = toFloat(_fy);\\r\\n var dir = ((fy > .5) * 2 - 1);\\r\\n pow(fx - .5, 2) + pow(fy - .5, 2) > .25 &&\\r\\n (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) &&\\r\\n fy != .5 &&\\r\\n (fy = fy.toFixed(5) - 1e-5 * dir);\\r\\n }\\r\\n return E;\\r\\n });\\r\\n gradient = gradient.split(/\\\\s*\\\\-\\\\s*/);\\r\\n if (type == \\\"linear\\\") {\\r\\n var angle = gradient.shift();\\r\\n angle = -toFloat(angle);\\r\\n if (isNaN(angle)) {\\r\\n return null;\\r\\n }\\r\\n var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))],\\r\\n max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1);\\r\\n vector[2] *= max;\\r\\n vector[3] *= max;\\r\\n if (vector[2] < 0) {\\r\\n vector[0] = -vector[2];\\r\\n vector[2] = 0;\\r\\n }\\r\\n if (vector[3] < 0) {\\r\\n vector[1] = -vector[3];\\r\\n vector[3] = 0;\\r\\n }\\r\\n }\\r\\n var dots = R._parseDots(gradient);\\r\\n if (!dots) {\\r\\n return null;\\r\\n }\\r\\n id = id.replace(/[\\\\(\\\\)\\\\s,\\\\xb0#]/g, \\\"_\\\");\\r\\n\\r\\n if (element.gradient && id != element.gradient.id) {\\r\\n SVG.defs.removeChild(element.gradient);\\r\\n delete element.gradient;\\r\\n }\\r\\n\\r\\n if (!element.gradient) {\\r\\n el = $(type + \\\"Gradient\\\", {id: id});\\r\\n element.gradient = el;\\r\\n $(el, type == \\\"radial\\\" ? {\\r\\n fx: fx,\\r\\n fy: fy\\r\\n } : {\\r\\n x1: vector[0],\\r\\n y1: vector[1],\\r\\n x2: vector[2],\\r\\n y2: vector[3],\\r\\n gradientTransform: element.matrix.invert()\\r\\n });\\r\\n SVG.defs.appendChild(el);\\r\\n for (var i = 0, ii = dots.length; i < ii; i++) {\\r\\n el.appendChild($(\\\"stop\\\", {\\r\\n offset: dots[i].offset ? dots[i].offset : i ? \\\"100%\\\" : \\\"0%\\\",\\r\\n \\\"stop-color\\\": dots[i].color || \\\"#fff\\\",\\r\\n \\\"stop-opacity\\\": isFinite(dots[i].opacity) ? dots[i].opacity : 1\\r\\n }));\\r\\n }\\r\\n }\\r\\n }\\r\\n /* FREEGROUP: don't push URL parameter into the drawing. This will break Apps with \\\"?\\\" in the URL\\r\\n * see: https://github.com/DmitryBaranovskiy/raphael/issues/693\\r\\n **/\\r\\n var url =\\\"\\\";//document.location.protocol + \\\"//\\\" + document.location.host + document.location.pathname;\\r\\n $(o, {\\r\\n fill: \\\"url('\\\" + url + \\\"#\\\" + id + \\\"')\\\",\\r\\n opacity: 1,\\r\\n \\\"fill-opacity\\\": 1\\r\\n });\\r\\n\\r\\n s.fill = E;\\r\\n s.opacity = 1;\\r\\n s.fillOpacity = 1;\\r\\n return 1;\\r\\n },\\r\\n updatePosition = function (o) {\\r\\n var bbox = o.getBBox(1);\\r\\n $(o.pattern, {patternTransform: o.matrix.invert() + \\\" translate(\\\" + bbox.x + \\\",\\\" + bbox.y + \\\")\\\"});\\r\\n },\\r\\n addArrow = function (o, value, isEnd) {\\r\\n if (o.type == \\\"path\\\") {\\r\\n var values = Str(value).toLowerCase().split(\\\"-\\\"),\\r\\n p = o.paper,\\r\\n se = isEnd ? \\\"end\\\" : \\\"start\\\",\\r\\n node = o.node,\\r\\n attrs = o.attrs,\\r\\n stroke = attrs[\\\"stroke-width\\\"],\\r\\n i = values.length,\\r\\n type = \\\"classic\\\",\\r\\n from,\\r\\n to,\\r\\n dx,\\r\\n refX,\\r\\n attr,\\r\\n w = 3,\\r\\n h = 3,\\r\\n t = 5;\\r\\n while (i--) {\\r\\n switch (values[i]) {\\r\\n case \\\"block\\\":\\r\\n case \\\"classic\\\":\\r\\n case \\\"oval\\\":\\r\\n case \\\"diamond\\\":\\r\\n case \\\"open\\\":\\r\\n case \\\"none\\\":\\r\\n type = values[i];\\r\\n break;\\r\\n case \\\"wide\\\": h = 5; break;\\r\\n case \\\"narrow\\\": h = 2; break;\\r\\n case \\\"long\\\": w = 5; break;\\r\\n case \\\"short\\\": w = 2; break;\\r\\n }\\r\\n }\\r\\n if (type == \\\"open\\\") {\\r\\n w += 2;\\r\\n h += 2;\\r\\n t += 2;\\r\\n dx = 1;\\r\\n refX = isEnd ? 4 : 1;\\r\\n attr = {\\r\\n fill: \\\"none\\\",\\r\\n stroke: attrs.stroke\\r\\n };\\r\\n } else {\\r\\n refX = dx = w / 2;\\r\\n attr = {\\r\\n fill: attrs.stroke,\\r\\n stroke: \\\"none\\\"\\r\\n };\\r\\n }\\r\\n if (o._.arrows) {\\r\\n if (isEnd) {\\r\\n o._.arrows.endPath && markerCounter[o._.arrows.endPath]--;\\r\\n o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--;\\r\\n } else {\\r\\n o._.arrows.startPath && markerCounter[o._.arrows.startPath]--;\\r\\n o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--;\\r\\n }\\r\\n } else {\\r\\n o._.arrows = {};\\r\\n }\\r\\n if (type != \\\"none\\\") {\\r\\n var pathId = \\\"raphael-marker-\\\" + type,\\r\\n markerId = \\\"raphael-marker-\\\" + se + type + w + h + \\\"-obj\\\" + o.id;\\r\\n if (!R._g.doc.getElementById(pathId)) {\\r\\n p.defs.appendChild($($(\\\"path\\\"), {\\r\\n \\\"stroke-linecap\\\": \\\"round\\\",\\r\\n d: markers[type],\\r\\n id: pathId\\r\\n }));\\r\\n markerCounter[pathId] = 1;\\r\\n } else {\\r\\n markerCounter[pathId]++;\\r\\n }\\r\\n var marker = R._g.doc.getElementById(markerId),\\r\\n use;\\r\\n if (!marker) {\\r\\n marker = $($(\\\"marker\\\"), {\\r\\n id: markerId,\\r\\n markerHeight: h,\\r\\n markerWidth: w,\\r\\n orient: \\\"auto\\\",\\r\\n refX: refX,\\r\\n refY: h / 2\\r\\n });\\r\\n use = $($(\\\"use\\\"), {\\r\\n \\\"xlink:href\\\": \\\"#\\\" + pathId,\\r\\n transform: (isEnd ? \\\"rotate(180 \\\" + w / 2 + \\\" \\\" + h / 2 + \\\") \\\" : E) + \\\"scale(\\\" + w / t + \\\",\\\" + h / t + \\\")\\\",\\r\\n \\\"stroke-width\\\": (1 / ((w / t + h / t) / 2)).toFixed(4)\\r\\n });\\r\\n marker.appendChild(use);\\r\\n p.defs.appendChild(marker);\\r\\n markerCounter[markerId] = 1;\\r\\n } else {\\r\\n markerCounter[markerId]++;\\r\\n use = marker.getElementsByTagName(\\\"use\\\")[0];\\r\\n }\\r\\n $(use, attr);\\r\\n var delta = dx * (type != \\\"diamond\\\" && type != \\\"oval\\\");\\r\\n if (isEnd) {\\r\\n from = o._.arrows.startdx * stroke || 0;\\r\\n to = R.getTotalLength(attrs.path) - delta * stroke;\\r\\n } else {\\r\\n from = delta * stroke;\\r\\n to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);\\r\\n }\\r\\n attr = {};\\r\\n attr[\\\"marker-\\\" + se] = \\\"url(#\\\" + markerId + \\\")\\\";\\r\\n if (to || from) {\\r\\n attr.d = R.getSubpath(attrs.path, from, to);\\r\\n }\\r\\n $(node, attr);\\r\\n o._.arrows[se + \\\"Path\\\"] = pathId;\\r\\n o._.arrows[se + \\\"Marker\\\"] = markerId;\\r\\n o._.arrows[se + \\\"dx\\\"] = delta;\\r\\n o._.arrows[se + \\\"Type\\\"] = type;\\r\\n o._.arrows[se + \\\"String\\\"] = value;\\r\\n } else {\\r\\n if (isEnd) {\\r\\n from = o._.arrows.startdx * stroke || 0;\\r\\n to = R.getTotalLength(attrs.path) - from;\\r\\n } else {\\r\\n from = 0;\\r\\n to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);\\r\\n }\\r\\n o._.arrows[se + \\\"Path\\\"] && $(node, {d: R.getSubpath(attrs.path, from, to)});\\r\\n delete o._.arrows[se + \\\"Path\\\"];\\r\\n delete o._.arrows[se + \\\"Marker\\\"];\\r\\n delete o._.arrows[se + \\\"dx\\\"];\\r\\n delete o._.arrows[se + \\\"Type\\\"];\\r\\n delete o._.arrows[se + \\\"String\\\"];\\r\\n }\\r\\n for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) {\\r\\n var item = R._g.doc.getElementById(attr);\\r\\n item && item.parentNode.removeChild(item);\\r\\n }\\r\\n }\\r\\n },\\r\\n dasharray = {\\r\\n \\\"-\\\": [3, 1],\\r\\n \\\".\\\": [1, 1],\\r\\n \\\"-.\\\": [3, 1, 1, 1],\\r\\n \\\"-..\\\": [3, 1, 1, 1, 1, 1],\\r\\n \\\". \\\": [1, 3],\\r\\n \\\"- \\\": [4, 3],\\r\\n \\\"--\\\": [8, 3],\\r\\n \\\"- .\\\": [4, 3, 1, 3],\\r\\n \\\"--.\\\": [8, 3, 1, 3],\\r\\n \\\"--..\\\": [8, 3, 1, 3, 1, 3]\\r\\n },\\r\\n addDashes = function (o, value, params) {\\r\\n value = dasharray[Str(value).toLowerCase()];\\r\\n if (value) {\\r\\n var width = o.attrs[\\\"stroke-width\\\"] || \\\"1\\\",\\r\\n butt = {round: width, square: width, butt: 0}[o.attrs[\\\"stroke-linecap\\\"] || params[\\\"stroke-linecap\\\"]] || 0,\\r\\n dashes = [],\\r\\n i = value.length;\\r\\n while (i--) {\\r\\n dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt;\\r\\n }\\r\\n $(o.node, {\\\"stroke-dasharray\\\": dashes.join(\\\",\\\")});\\r\\n }\\r\\n else {\\r\\n $(o.node, {\\\"stroke-dasharray\\\": \\\"none\\\"});\\r\\n }\\r\\n },\\r\\n setFillAndStroke = function (o, params) {\\r\\n var node = o.node,\\r\\n attrs = o.attrs,\\r\\n vis = node.style.visibility;\\r\\n node.style.visibility = \\\"hidden\\\";\\r\\n for (var att in params) {\\r\\n if (params[has](att)) {\\r\\n if (!R._availableAttrs[has](att)) {\\r\\n continue;\\r\\n }\\r\\n var value = params[att];\\r\\n attrs[att] = value;\\r\\n switch (att) {\\r\\n case \\\"blur\\\":\\r\\n o.blur(value);\\r\\n break;\\r\\n case \\\"title\\\":\\r\\n var title = node.getElementsByTagName(\\\"title\\\");\\r\\n\\r\\n // Use the existing <title>.\\r\\n if (title.length && (title = title[0])) {\\r\\n title.firstChild.nodeValue = value;\\r\\n } else {\\r\\n title = $(\\\"title\\\");\\r\\n var val = R._g.doc.createTextNode(value);\\r\\n title.appendChild(val);\\r\\n node.appendChild(title);\\r\\n }\\r\\n break;\\r\\n case \\\"href\\\":\\r\\n case \\\"target\\\":\\r\\n var pn = node.parentNode;\\r\\n if (pn.tagName.toLowerCase() != \\\"a\\\") {\\r\\n var hl = $(\\\"a\\\");\\r\\n pn.insertBefore(hl, node);\\r\\n hl.appendChild(node);\\r\\n pn = hl;\\r\\n }\\r\\n if (att == \\\"target\\\") {\\r\\n pn.setAttributeNS(xlink, \\\"show\\\", value == \\\"blank\\\" ? \\\"new\\\" : value);\\r\\n } else {\\r\\n pn.setAttributeNS(xlink, att, value);\\r\\n }\\r\\n break;\\r\\n case \\\"cursor\\\":\\r\\n node.style.cursor = value;\\r\\n break;\\r\\n case \\\"transform\\\":\\r\\n o.transform(value);\\r\\n break;\\r\\n case \\\"arrow-start\\\":\\r\\n addArrow(o, value);\\r\\n break;\\r\\n case \\\"arrow-end\\\":\\r\\n addArrow(o, value, 1);\\r\\n break;\\r\\n case \\\"clip-rect\\\":\\r\\n var rect = Str(value).split(separator);\\r\\n if (rect.length == 4) {\\r\\n o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode);\\r\\n var el = $(\\\"clipPath\\\"),\\r\\n rc = $(\\\"rect\\\");\\r\\n el.id = R.createUUID();\\r\\n $(rc, {\\r\\n x: rect[0],\\r\\n y: rect[1],\\r\\n width: rect[2],\\r\\n height: rect[3]\\r\\n });\\r\\n el.appendChild(rc);\\r\\n o.paper.defs.appendChild(el);\\r\\n $(node, {\\\"clip-path\\\": \\\"url(#\\\" + el.id + \\\")\\\"});\\r\\n o.clip = rc;\\r\\n }\\r\\n if (!value) {\\r\\n var path = node.getAttribute(\\\"clip-path\\\");\\r\\n if (path) {\\r\\n var clip = R._g.doc.getElementById(path.replace(/(^url\\\\(#|\\\\)$)/g, E));\\r\\n clip && clip.parentNode.removeChild(clip);\\r\\n $(node, {\\\"clip-path\\\": E});\\r\\n delete o.clip;\\r\\n }\\r\\n }\\r\\n break;\\r\\n case \\\"path\\\":\\r\\n if (o.type == \\\"path\\\") {\\r\\n $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : \\\"M0,0\\\"});\\r\\n o._.dirty = 1;\\r\\n if (o._.arrows) {\\r\\n \\\"startString\\\" in o._.arrows && addArrow(o, o._.arrows.startString);\\r\\n \\\"endString\\\" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\\r\\n }\\r\\n }\\r\\n break;\\r\\n case \\\"width\\\":\\r\\n node.setAttribute(att, value);\\r\\n o._.dirty = 1;\\r\\n if (attrs.fx) {\\r\\n att = \\\"x\\\";\\r\\n value = attrs.x;\\r\\n } else {\\r\\n break;\\r\\n }\\r\\n case \\\"x\\\":\\r\\n if (attrs.fx) {\\r\\n value = -attrs.x - (attrs.width || 0);\\r\\n }\\r\\n case \\\"rx\\\":\\r\\n if (att == \\\"rx\\\" && o.type == \\\"rect\\\") {\\r\\n break;\\r\\n }\\r\\n case \\\"cx\\\":\\r\\n node.setAttribute(att, value);\\r\\n o.pattern && updatePosition(o);\\r\\n o._.dirty = 1;\\r\\n break;\\r\\n case \\\"height\\\":\\r\\n node.setAttribute(att, value);\\r\\n o._.dirty = 1;\\r\\n if (attrs.fy) {\\r\\n att = \\\"y\\\";\\r\\n value = attrs.y;\\r\\n } else {\\r\\n break;\\r\\n }\\r\\n case \\\"y\\\":\\r\\n if (attrs.fy) {\\r\\n value = -attrs.y - (attrs.height || 0);\\r\\n }\\r\\n case \\\"ry\\\":\\r\\n if (att == \\\"ry\\\" && o.type == \\\"rect\\\") {\\r\\n break;\\r\\n }\\r\\n case \\\"cy\\\":\\r\\n node.setAttribute(att, value);\\r\\n o.pattern && updatePosition(o);\\r\\n o._.dirty = 1;\\r\\n break;\\r\\n case \\\"r\\\":\\r\\n if (o.type == \\\"rect\\\") {\\r\\n $(node, {rx: value, ry: value});\\r\\n } else {\\r\\n node.setAttribute(att, value);\\r\\n }\\r\\n o._.dirty = 1;\\r\\n break;\\r\\n case \\\"src\\\":\\r\\n if (o.type == \\\"image\\\") {\\r\\n node.setAttributeNS(xlink, \\\"href\\\", value);\\r\\n }\\r\\n break;\\r\\n case \\\"stroke-width\\\":\\r\\n /* FREEGROUP fix\\r\\n * draw2d version 3.0.3\\r\\n *\\r\\n * don't scale the line width if the user resize an shape/element.\\r\\n * Obscure stroke-width in case of \\\"Draw2D touch\\\" usage\\r\\n */\\r\\n if(!attrs[\\\"stroke-scale\\\"]){\\r\\n if (o._.sx != 1 || o._.sy != 1) {\\r\\n value /= mmax(abs(o._.sx), abs(o._.sy)) || 1;\\r\\n }\\r\\n if (o.paper._vbSize) {\\r\\n // value *= o.paper._vbSize;\\r\\n }\\r\\n }\\r\\n\\r\\n\\r\\n node.setAttribute(att, value);\\r\\n if (attrs[\\\"stroke-dasharray\\\"]) {\\r\\n addDashes(o, attrs[\\\"stroke-dasharray\\\"], params);\\r\\n }\\r\\n if (o._.arrows) {\\r\\n \\\"startString\\\" in o._.arrows && addArrow(o, o._.arrows.startString);\\r\\n \\\"endString\\\" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\\r\\n }\\r\\n break;\\r\\n case \\\"stroke-dasharray\\\":\\r\\n addDashes(o, value, params);\\r\\n break;\\r\\n case \\\"fill\\\":\\r\\n var isURL = Str(value).match(R._ISURL);\\r\\n if (isURL) {\\r\\n el = $(\\\"pattern\\\");\\r\\n var ig = $(\\\"image\\\");\\r\\n el.id = R.createUUID();\\r\\n $(el, {x: 0, y: 0, patternUnits: \\\"userSpaceOnUse\\\", height: 1, width: 1});\\r\\n $(ig, {x: 0, y: 0, \\\"xlink:href\\\": isURL[1]});\\r\\n el.appendChild(ig);\\r\\n\\r\\n (function (el) {\\r\\n R._preload(isURL[1], function () {\\r\\n var w = this.offsetWidth,\\r\\n h = this.offsetHeight;\\r\\n $(el, {width: w, height: h});\\r\\n $(ig, {width: w, height: h});\\r\\n });\\r\\n })(el);\\r\\n o.paper.defs.appendChild(el);\\r\\n $(node, {fill: \\\"url(#\\\" + el.id + \\\")\\\"});\\r\\n o.pattern = el;\\r\\n o.pattern && updatePosition(o);\\r\\n break;\\r\\n }\\r\\n var clr = R.getRGB(value);\\r\\n if (!clr.error) {\\r\\n delete params.gradient;\\r\\n delete attrs.gradient;\\r\\n !R.is(attrs.opacity, \\\"undefined\\\") &&\\r\\n R.is(params.opacity, \\\"undefined\\\") &&\\r\\n $(node, {opacity: attrs.opacity});\\r\\n !R.is(attrs[\\\"fill-opacity\\\"], \\\"undefined\\\") &&\\r\\n R.is(params[\\\"fill-opacity\\\"], \\\"undefined\\\") &&\\r\\n $(node, {\\\"fill-opacity\\\": attrs[\\\"fill-opacity\\\"]});\\r\\n } else if ((o.type == \\\"circle\\\" || o.type == \\\"ellipse\\\" || Str(value).charAt() != \\\"r\\\") && addGradientFill(o, value)) {\\r\\n if (\\\"opacity\\\" in attrs || \\\"fill-opacity\\\" in attrs) {\\r\\n var gradient = R._g.doc.getElementById(node.getAttribute(\\\"fill\\\").replace(/^url\\\\(#|\\\\)$/g, E));\\r\\n if (gradient) {\\r\\n var stops = gradient.getElementsByTagName(\\\"stop\\\");\\r\\n $(stops[stops.length - 1], {\\\"stop-opacity\\\": (\\\"opacity\\\" in attrs ? attrs.opacity : 1) * (\\\"fill-opacity\\\" in attrs ? attrs[\\\"fill-opacity\\\"] : 1)});\\r\\n }\\r\\n }\\r\\n attrs.gradient = value;\\r\\n attrs.fill = \\\"none\\\";\\r\\n break;\\r\\n }\\r\\n clr[has](\\\"opacity\\\") && $(node, {\\\"fill-opacity\\\": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});\\r\\n case \\\"stroke\\\":\\r\\n clr = R.getRGB(value);\\r\\n node.setAttribute(att, clr.hex);\\r\\n att == \\\"stroke\\\" && clr[has](\\\"opacity\\\") && $(node, {\\\"stroke-opacity\\\": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});\\r\\n if (att == \\\"stroke\\\" && o._.arrows) {\\r\\n \\\"startString\\\" in o._.arrows && addArrow(o, o._.arrows.startString);\\r\\n \\\"endString\\\" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\\r\\n }\\r\\n break;\\r\\n case \\\"gradient\\\":\\r\\n (o.type == \\\"circle\\\" || o.type == \\\"ellipse\\\" || Str(value).charAt() != \\\"r\\\") && addGradientFill(o, value);\\r\\n break;\\r\\n case \\\"opacity\\\":\\r\\n if (attrs.gradient && !attrs[has](\\\"stroke-opacity\\\")) {\\r\\n $(node, {\\\"stroke-opacity\\\": value > 1 ? value / 100 : value});\\r\\n }\\r\\n // fall\\r\\n case \\\"fill-opacity\\\":\\r\\n\\r\\n if (attrs.gradient) {\\r\\n gradient = R._g.doc.getElementById(node.getAttribute(\\\"fill\\\").replace(/^url\\\\(#|\\\\)$/g, E));\\r\\n if (gradient) {\\r\\n stops = gradient.getElementsByTagName(\\\"stop\\\");\\r\\n // FREEGROUP FIX\\r\\n for (gri = 0, grii = stops.length; gri < grii; gri++) {\\r\\n $(stops[gri], {\\\"stop-opacity\\\": value});\\r\\n }\\r\\n // END FIX\\r\\n }\\r\\n break;\\r\\n }\\r\\n default:\\r\\n att == \\\"font-size\\\" && (value = toInt(value, 10) + \\\"px\\\");\\r\\n var cssrule = att.replace(/(\\\\-.)/g, function (w) {\\r\\n return w.substring(1).toUpperCase();\\r\\n });\\r\\n node.style[cssrule] = value;\\r\\n o._.dirty = 1;\\r\\n node.setAttribute(att, value);\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n tuneText(o, params);\\r\\n node.style.visibility = vis;\\r\\n },\\r\\n leading = 1.2,\\r\\n tuneText = function (el, params) {\\r\\n if (el.type != \\\"text\\\" || !(params[has](\\\"text\\\") || params[has](\\\"font\\\") || params[has](\\\"font-size\\\") || params[has](\\\"x\\\") || params[has](\\\"y\\\"))) {\\r\\n return;\\r\\n }\\r\\n var a = el.attrs,\\r\\n node = el.node,\\r\\n fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue(\\\"font-size\\\"), 10) : 10;\\r\\n\\r\\n if (params[has](\\\"text\\\")) {\\r\\n a.text = params.text;\\r\\n while (node.firstChild) {\\r\\n node.removeChild(node.firstChild);\\r\\n }\\r\\n var texts = Str(params.text).split(\\\"\\\\n\\\"),\\r\\n tspans = [],\\r\\n tspan;\\r\\n for (var i = 0, ii = texts.length; i < ii; i++) {\\r\\n tspan = $(\\\"tspan\\\");\\r\\n i && $(tspan, {dy: fontSize * leading, x: a.x});\\r\\n tspan.appendChild(R._g.doc.createTextNode(texts[i]));\\r\\n node.appendChild(tspan);\\r\\n tspans[i] = tspan;\\r\\n }\\r\\n } else {\\r\\n tspans = node.getElementsByTagName(\\\"tspan\\\");\\r\\n for (i = 0, ii = tspans.length; i < ii; i++) if (i) {\\r\\n $(tspans[i], {dy: fontSize * leading, x: a.x});\\r\\n } else {\\r\\n $(tspans[0], {dy: 0});\\r\\n }\\r\\n }\\r\\n $(node, {x: a.x, y: a.y});\\r\\n el._.dirty = 1;\\r\\n var bb = el._getBBox(),\\r\\n dif = a.y - (bb.y + bb.height / 2);\\r\\n dif && R.is(dif, \\\"finite\\\") && $(tspans[0], {dy: dif});\\r\\n },\\r\\n getRealNode = function (node) {\\r\\n if (node.parentNode && node.parentNode.tagName.toLowerCase() === \\\"a\\\") {\\r\\n return node.parentNode;\\r\\n } else {\\r\\n return node;\\r\\n }\\r\\n },\\r\\n Element = function (node, svg) {\\r\\n var X = 0,\\r\\n Y = 0;\\r\\n /*\\\\\\r\\n * Element.node\\r\\n [ property (object) ]\\r\\n **\\r\\n * Gives you a reference to the DOM object, so you can assign event handlers or just mess around.\\r\\n **\\r\\n * Note: Don’t mess with it.\\r\\n > Usage\\r\\n | // draw a circle at coordinate 10,10 with radius of 10\\r\\n | var c = paper.circle(10, 10, 10);\\r\\n | c.node.onclick = function () {\\r\\n | c.attr(\\\"fill\\\", \\\"red\\\");\\r\\n | };\\r\\n \\\\*/\\r\\n this[0] = this.node = node;\\r\\n /*\\\\\\r\\n * Element.raphael\\r\\n [ property (object) ]\\r\\n **\\r\\n * Internal reference to @Raphael object. In case it is not available.\\r\\n > Usage\\r\\n | Raphael.el.red = function () {\\r\\n | var hsb = this.paper.raphael.rgb2hsb(this.attr(\\\"fill\\\"));\\r\\n | hsb.h = 1;\\r\\n | this.attr({fill: this.paper.raphael.hsb2rgb(hsb).hex});\\r\\n | }\\r\\n \\\\*/\\r\\n node.raphael = true;\\r\\n /*\\\\\\r\\n * Element.id\\r\\n [ property (number) ]\\r\\n **\\r\\n * Unique id of the element. Especially useful when you want to listen to events of the element,\\r\\n * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method.\\r\\n \\\\*/\\r\\n this.id = R._oid++;\\r\\n node.raphaelid = this.id;\\r\\n this.matrix = R.matrix();\\r\\n this.realPath = null;\\r\\n /*\\\\\\r\\n * Element.paper\\r\\n [ property (object) ]\\r\\n **\\r\\n * Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions.\\r\\n > Usage\\r\\n | Raphael.el.cross = function () {\\r\\n | this.attr({fill: \\\"red\\\"});\\r\\n | this.paper.path(\\\"M10,10L50,50M50,10L10,50\\\")\\r\\n | .attr({stroke: \\\"red\\\"});\\r\\n | }\\r\\n \\\\*/\\r\\n this.paper = svg;\\r\\n this.attrs = this.attrs || {};\\r\\n this._ = {\\r\\n transform: [],\\r\\n sx: 1,\\r\\n sy: 1,\\r\\n deg: 0,\\r\\n dx: 0,\\r\\n dy: 0,\\r\\n dirty: 1\\r\\n };\\r\\n !svg.bottom && (svg.bottom = this);\\r\\n /*\\\\\\r\\n * Element.prev\\r\\n [ property (object) ]\\r\\n **\\r\\n * Reference to the previous element in the hierarchy.\\r\\n \\\\*/\\r\\n this.prev = svg.top;\\r\\n svg.top && (svg.top.next = this);\\r\\n svg.top = this;\\r\\n /*\\\\\\r\\n * Element.next\\r\\n [ property (object) ]\\r\\n **\\r\\n * Reference to the next element in the hierarchy.\\r\\n \\\\*/\\r\\n this.next = null;\\r\\n },\\r\\n elproto = R.el;\\r\\n\\r\\n Element.prototype = elproto;\\r\\n elproto.constructor = Element;\\r\\n\\r\\n R._engine.path = function (pathString, SVG) {\\r\\n var el = $(\\\"path\\\");\\r\\n SVG.canvas && SVG.canvas.appendChild(el);\\r\\n var p = new Element(el, SVG);\\r\\n p.type = \\\"path\\\";\\r\\n setFillAndStroke(p, {\\r\\n fill: \\\"none\\\",\\r\\n stroke: \\\"#000\\\",\\r\\n path: pathString\\r\\n });\\r\\n return p;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.rotate\\r\\n [ method ]\\r\\n **\\r\\n * Deprecated! Use @Element.transform instead.\\r\\n * Adds rotation by given angle around given point to the list of\\r\\n * transformations of the element.\\r\\n > Parameters\\r\\n - deg (number) angle in degrees\\r\\n - cx (number) #optional x coordinate of the centre of rotation\\r\\n - cy (number) #optional y coordinate of the centre of rotation\\r\\n * If cx & cy aren’t specified centre of the shape is used as a point of rotation.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.rotate = function (deg, cx, cy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n deg = Str(deg).split(separator);\\r\\n if (deg.length - 1) {\\r\\n cx = toFloat(deg[1]);\\r\\n cy = toFloat(deg[2]);\\r\\n }\\r\\n deg = toFloat(deg[0]);\\r\\n (cy == null) && (cx = cy);\\r\\n if (cx == null || cy == null) {\\r\\n var bbox = this.getBBox(1);\\r\\n cx = bbox.x + bbox.width / 2;\\r\\n cy = bbox.y + bbox.height / 2;\\r\\n }\\r\\n this.transform(this._.transform.concat([[\\\"r\\\", deg, cx, cy]]));\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.scale\\r\\n [ method ]\\r\\n **\\r\\n * Deprecated! Use @Element.transform instead.\\r\\n * Adds scale by given amount relative to given point to the list of\\r\\n * transformations of the element.\\r\\n > Parameters\\r\\n - sx (number) horisontal scale amount\\r\\n - sy (number) vertical scale amount\\r\\n - cx (number) #optional x coordinate of the centre of scale\\r\\n - cy (number) #optional y coordinate of the centre of scale\\r\\n * If cx & cy aren’t specified centre of the shape is used instead.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.scale = function (sx, sy, cx, cy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n sx = Str(sx).split(separator);\\r\\n if (sx.length - 1) {\\r\\n sy = toFloat(sx[1]);\\r\\n cx = toFloat(sx[2]);\\r\\n cy = toFloat(sx[3]);\\r\\n }\\r\\n sx = toFloat(sx[0]);\\r\\n (sy == null) && (sy = sx);\\r\\n (cy == null) && (cx = cy);\\r\\n if (cx == null || cy == null) {\\r\\n var bbox = this.getBBox(1);\\r\\n }\\r\\n cx = cx == null ? bbox.x + bbox.width / 2 : cx;\\r\\n cy = cy == null ? bbox.y + bbox.height / 2 : cy;\\r\\n this.transform(this._.transform.concat([[\\\"s\\\", sx, sy, cx, cy]]));\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.translate\\r\\n [ method ]\\r\\n **\\r\\n * Deprecated! Use @Element.transform instead.\\r\\n * Adds translation by given amount to the list of transformations of the element.\\r\\n > Parameters\\r\\n - dx (number) horisontal shift\\r\\n - dy (number) vertical shift\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.translate = function (dx, dy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n dx = Str(dx).split(separator);\\r\\n if (dx.length - 1) {\\r\\n dy = toFloat(dx[1]);\\r\\n }\\r\\n dx = toFloat(dx[0]) || 0;\\r\\n dy = +dy || 0;\\r\\n this.transform(this._.transform.concat([[\\\"t\\\", dx, dy]]));\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.transform\\r\\n [ method ]\\r\\n **\\r\\n * Adds transformation to the element which is separate to other attributes,\\r\\n * i.e. translation doesn’t change `x` or `y` of the rectange. The format\\r\\n * of transformation string is similar to the path string syntax:\\r\\n | \\\"t100,100r30,100,100s2,2,100,100r45s1.5\\\"\\r\\n * Each letter is a command. There are four commands: `t` is for translate, `r` is for rotate, `s` is for\\r\\n * scale and `m` is for matrix.\\r\\n *\\r\\n * There are also alternative “absolute” translation, rotation and scale: `T`, `R` and `S`. They will not take previous transformation into account. For example, `...T100,0` will always move element 100 px horisontally, while `...t100,0` could move it vertically if there is `r90` before. Just compare results of `r90t100,0` and `r90T100,0`.\\r\\n *\\r\\n * So, the example line above could be read like “translate by 100, 100; rotate 30° around 100, 100; scale twice around 100, 100;\\r\\n * rotate 45° around centre; scale 1.5 times relative to centre”. As you can see rotate and scale commands have origin\\r\\n * coordinates as optional parameters, the default is the centre point of the element.\\r\\n * Matrix accepts six parameters.\\r\\n > Usage\\r\\n | var el = paper.rect(10, 20, 300, 200);\\r\\n | // translate 100, 100, rotate 45°, translate -100, 0\\r\\n | el.transform(\\\"t100,100r45t-100,0\\\");\\r\\n | // if you want you can append or prepend transformations\\r\\n | el.transform(\\\"...t50,50\\\");\\r\\n | el.transform(\\\"s2...\\\");\\r\\n | // or even wrap\\r\\n | el.transform(\\\"t50,50...t-50-50\\\");\\r\\n | // to reset transformation call method with empty string\\r\\n | el.transform(\\\"\\\");\\r\\n | // to get current value call it without parameters\\r\\n | console.log(el.transform());\\r\\n > Parameters\\r\\n - tstr (string) #optional transformation string\\r\\n * If tstr isn’t specified\\r\\n = (string) current transformation string\\r\\n * else\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.transform = function (tstr) {\\r\\n var _ = this._;\\r\\n if (tstr == null) {\\r\\n return _.transform;\\r\\n }\\r\\n R._extractTransform(this, tstr);\\r\\n\\r\\n this.clip && $(this.clip, {transform: this.matrix.invert()});\\r\\n this.pattern && updatePosition(this);\\r\\n this.node && $(this.node, {transform: this.matrix});\\r\\n\\r\\n if (_.sx != 1 || _.sy != 1) {\\r\\n var sw = this.attrs[has](\\\"stroke-width\\\") ? this.attrs[\\\"stroke-width\\\"] : 1;\\r\\n this.attr({\\\"stroke-width\\\": sw});\\r\\n }\\r\\n\\r\\n //Reduce transform string\\r\\n _.transform = this.matrix.toTransformString();\\r\\n\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.hide\\r\\n [ method ]\\r\\n **\\r\\n * Makes element invisible. See @Element.show.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.hide = function () {\\r\\n if(!this.removed) this.node.style.display = \\\"none\\\";\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.show\\r\\n [ method ]\\r\\n **\\r\\n * Makes element visible. See @Element.hide.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.show = function () {\\r\\n if(!this.removed) this.node.style.display = \\\"\\\";\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.remove\\r\\n [ method ]\\r\\n **\\r\\n * Removes element from the paper.\\r\\n \\\\*/\\r\\n elproto.remove = function () {\\r\\n var node = getRealNode(this.node);\\r\\n if (this.removed || !node.parentNode) {\\r\\n return;\\r\\n }\\r\\n var paper = this.paper;\\r\\n paper.__set__ && paper.__set__.exclude(this);\\r\\n eve.unbind(\\\"raphael.*.*.\\\" + this.id);\\r\\n if (this.gradient) {\\r\\n paper.defs.removeChild(this.gradient);\\r\\n }\\r\\n R._tear(this, paper);\\r\\n\\r\\n node.parentNode.removeChild(node);\\r\\n\\r\\n // Remove custom data for element\\r\\n this.removeData();\\r\\n\\r\\n for (var i in this) {\\r\\n this[i] = typeof this[i] == \\\"function\\\" ? R._removedFactory(i) : null;\\r\\n }\\r\\n this.removed = true;\\r\\n };\\r\\n elproto._getBBox = function () {\\r\\n if (this.node.style.display == \\\"none\\\") {\\r\\n this.show();\\r\\n var hide = true;\\r\\n }\\r\\n var canvasHidden = false,\\r\\n containerStyle;\\r\\n if (this.paper.canvas.parentElement) {\\r\\n containerStyle = this.paper.canvas.parentElement.style;\\r\\n } //IE10+ can't find parentElement\\r\\n else if (this.paper.canvas.parentNode) {\\r\\n containerStyle = this.paper.canvas.parentNode.style;\\r\\n }\\r\\n\\r\\n if(containerStyle && containerStyle.display == \\\"none\\\") {\\r\\n canvasHidden = true;\\r\\n containerStyle.display = \\\"\\\";\\r\\n }\\r\\n var bbox = {};\\r\\n try {\\r\\n bbox = this.node.getBBox();\\r\\n } catch(e) {\\r\\n // Firefox 3.0.x, 25.0.1 (probably more versions affected) play badly here - possible fix\\r\\n bbox = {\\r\\n x: this.node.clientLeft,\\r\\n y: this.node.clientTop,\\r\\n width: this.node.clientWidth,\\r\\n height: this.node.clientHeight\\r\\n }\\r\\n } finally {\\r\\n bbox = bbox || {};\\r\\n if(canvasHidden){\\r\\n containerStyle.display = \\\"none\\\";\\r\\n }\\r\\n }\\r\\n hide && this.hide();\\r\\n return bbox;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.attr\\r\\n [ method ]\\r\\n **\\r\\n * Sets the attributes of the element.\\r\\n > Parameters\\r\\n - attrName (string) attribute’s name\\r\\n - value (string) value\\r\\n * or\\r\\n - params (object) object of name/value pairs\\r\\n * or\\r\\n - attrName (string) attribute’s name\\r\\n * or\\r\\n - attrNames (array) in this case method returns array of current values for given attribute names\\r\\n = (object) @Element if attrsName & value or params are passed in.\\r\\n = (...) value of the attribute if only attrsName is passed in.\\r\\n = (array) array of values of the attribute if attrsNames is passed in.\\r\\n = (object) object of attributes if nothing is passed in.\\r\\n > Possible parameters\\r\\n # <p>Please refer to the <a href=\\\"http://www.w3.org/TR/SVG/\\\" title=\\\"The W3C Recommendation for the SVG language describes these properties in detail.\\\">SVG specification</a> for an explanation of these parameters.</p>\\r\\n o arrow-end (string) arrowhead on the end of the path. The format for string is `<type>[-<width>[-<length>]]`. Possible types: `classic`, `block`, `open`, `oval`, `diamond`, `none`, width: `wide`, `narrow`, `medium`, length: `long`, `short`, `midium`.\\r\\n o clip-rect (string) comma or space separated values: x, y, width and height\\r\\n o cursor (string) CSS type of the cursor\\r\\n o cx (number) the x-axis coordinate of the center of the circle, or ellipse\\r\\n o cy (number) the y-axis coordinate of the center of the circle, or ellipse\\r\\n o fill (string) colour, gradient or image\\r\\n o fill-opacity (number)\\r\\n o font (string)\\r\\n o font-family (string)\\r\\n o font-size (number) font size in pixels\\r\\n o font-weight (string)\\r\\n o height (number)\\r\\n o href (string) URL, if specified element behaves as hyperlink\\r\\n o opacity (number)\\r\\n o path (string) SVG path string format\\r\\n o r (number) radius of the circle, ellipse or rounded corner on the rect\\r\\n o rx (number) horisontal radius of the ellipse\\r\\n o ry (number) vertical radius of the ellipse\\r\\n o src (string) image URL, only works for @Element.image element\\r\\n o stroke (string) stroke colour\\r\\n o stroke-dasharray (string) [“”, “none”, “`-`”, “`.`”, “`-.`”, “`-..`”, “`. `”, “`- `”, “`--`”, “`- .`”, “`--.`”, “`--..`”]\\r\\n o stroke-linecap (string) [“`butt`”, “`square`”, “`round`”]\\r\\n o stroke-linejoin (string) [“`bevel`”, “`round`”, “`miter`”]\\r\\n o stroke-miterlimit (number)\\r\\n o stroke-opacity (number)\\r\\n o stroke-width (number) stroke width in pixels, default is '1'\\r\\n o target (string) used with href\\r\\n o text (string) contents of the text element. Use `\\\\n` for multiline text\\r\\n o text-anchor (string) [“`start`”, “`middle`”, “`end`”], default is “`middle`”\\r\\n o title (string) will create tooltip with a given text\\r\\n o transform (string) see @Element.transform\\r\\n o width (number)\\r\\n o x (number)\\r\\n o y (number)\\r\\n > Gradients\\r\\n * Linear gradient format: “`‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`90-#fff-#000`” – 90°\\r\\n * gradient from white to black or “`0-#fff-#f00:20-#000`” – 0° gradient from white via red (at 20%) to black.\\r\\n *\\r\\n * radial gradient: “`r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`r#fff-#000`” –\\r\\n * gradient from white to black or “`r(0.25, 0.75)#fff-#000`” – gradient from white to black with focus point\\r\\n * at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses.\\r\\n > Path String\\r\\n # <p>Please refer to <a href=\\\"http://www.w3.org/TR/SVG/paths.html#PathData\\\" title=\\\"Details of a path’s data attribute’s format are described in the SVG specification.\\\">SVG documentation regarding path string</a>. Raphaël fully supports it.</p>\\r\\n > Colour Parsing\\r\\n # <ul>\\r\\n # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>\\r\\n # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>\\r\\n # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>\\r\\n # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li>\\r\\n # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li>\\r\\n # <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200, 100, 0, .5)</code>”)</li>\\r\\n # <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%, 175%, 0%, 50%)</code>”)</li>\\r\\n # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li>\\r\\n # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>\\r\\n # <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li>\\r\\n # <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href=\\\"http://en.wikipedia.org/wiki/HSL_and_HSV\\\" title=\\\"HSL and HSV - Wikipedia, the free encyclopedia\\\">Wikipedia page</a></li>\\r\\n # <li>hsl(•••%, •••%, •••%) — same as above, but in %</li>\\r\\n # <li>hsla(•••, •••, •••, •••) — same as above, but with opacity</li>\\r\\n # <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg, 1, .5)</code>” or, if you want to go fancy, “<code>hsl(240°, 1, .5)</code>”</li>\\r\\n # </ul>\\r\\n \\\\*/\\r\\n elproto.attr = function (name, value) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (name == null) {\\r\\n var res = {};\\r\\n for (var a in this.attrs) if (this.attrs[has](a)) {\\r\\n res[a] = this.attrs[a];\\r\\n }\\r\\n res.gradient && res.fill == \\\"none\\\" && (res.fill = res.gradient) && delete res.gradient;\\r\\n res.transform = this._.transform;\\r\\n return res;\\r\\n }\\r\\n if (value == null && R.is(name, \\\"string\\\")) {\\r\\n if (name == \\\"fill\\\" && this.attrs.fill == \\\"none\\\" && this.attrs.gradient) {\\r\\n return this.attrs.gradient;\\r\\n }\\r\\n if (name == \\\"transform\\\") {\\r\\n return this._.transform;\\r\\n }\\r\\n var names = name.split(separator),\\r\\n out = {};\\r\\n for (var i = 0, ii = names.length; i < ii; i++) {\\r\\n name = names[i];\\r\\n if (name in this.attrs) {\\r\\n out[name] = this.attrs[name];\\r\\n } else if (R.is(this.paper.customAttributes[name], \\\"function\\\")) {\\r\\n out[name] = this.paper.customAttributes[name].def;\\r\\n } else {\\r\\n out[name] = R._availableAttrs[name];\\r\\n }\\r\\n }\\r\\n return ii - 1 ? out : out[names[0]];\\r\\n }\\r\\n if (value == null && R.is(name, \\\"array\\\")) {\\r\\n out = {};\\r\\n for (i = 0, ii = name.length; i < ii; i++) {\\r\\n out[name[i]] = this.attr(name[i]);\\r\\n }\\r\\n return out;\\r\\n }\\r\\n if (value != null) {\\r\\n var params = {};\\r\\n params[name] = value;\\r\\n } else if (name != null && R.is(name, \\\"object\\\")) {\\r\\n params = name;\\r\\n }\\r\\n for (var key in params) {\\r\\n eve(\\\"raphael.attr.\\\" + key + \\\".\\\" + this.id, this, params[key]);\\r\\n }\\r\\n for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], \\\"function\\\")) {\\r\\n var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));\\r\\n this.attrs[key] = params[key];\\r\\n for (var subkey in par) if (par[has](subkey)) {\\r\\n params[subkey] = par[subkey];\\r\\n }\\r\\n }\\r\\n setFillAndStroke(this, params);\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.toFront\\r\\n [ method ]\\r\\n **\\r\\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.toFront = function () {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n var node = getRealNode(this.node);\\r\\n node.parentNode.appendChild(node);\\r\\n var svg = this.paper;\\r\\n svg.top != this && R._tofront(this, svg);\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.toBack\\r\\n [ method ]\\r\\n **\\r\\n * Moves the element so it is the furthest from the viewer’s eyes, behind other elements.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.toBack = function () {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n var node = getRealNode(this.node);\\r\\n var parentNode = node.parentNode;\\r\\n parentNode.insertBefore(node, parentNode.firstChild);\\r\\n R._toback(this, this.paper);\\r\\n var svg = this.paper;\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.insertAfter\\r\\n [ method ]\\r\\n **\\r\\n * Inserts current object after the given one.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.insertAfter = function (element) {\\r\\n if (this.removed || !element) {\\r\\n return this;\\r\\n }\\r\\n\\r\\n var node = getRealNode(this.node);\\r\\n var afterNode = getRealNode(element.node || element[element.length - 1].node);\\r\\n if (afterNode.nextSibling) {\\r\\n afterNode.parentNode.insertBefore(node, afterNode.nextSibling);\\r\\n } else {\\r\\n afterNode.parentNode.appendChild(node);\\r\\n }\\r\\n R._insertafter(this, element, this.paper);\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.insertBefore\\r\\n [ method ]\\r\\n **\\r\\n * Inserts current object before the given one.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.insertBefore = function (element) {\\r\\n if (this.removed || !element) {\\r\\n return this;\\r\\n }\\r\\n\\r\\n var node = getRealNode(this.node);\\r\\n var beforeNode = getRealNode(element.node || element[0].node);\\r\\n beforeNode.parentNode.insertBefore(node, beforeNode);\\r\\n R._insertbefore(this, element, this.paper);\\r\\n return this;\\r\\n };\\r\\n elproto.blur = function (size) {\\r\\n // Experimental. No Safari support. Use it on your own risk.\\r\\n var t = this;\\r\\n if (+size !== 0) {\\r\\n var fltr = $(\\\"filter\\\"),\\r\\n blur = $(\\\"feGaussianBlur\\\");\\r\\n t.attrs.blur = size;\\r\\n fltr.id = R.createUUID();\\r\\n $(blur, {stdDeviation: +size || 1.5});\\r\\n fltr.appendChild(blur);\\r\\n t.paper.defs.appendChild(fltr);\\r\\n t._blur = fltr;\\r\\n $(t.node, {filter: \\\"url(#\\\" + fltr.id + \\\")\\\"});\\r\\n } else {\\r\\n if (t._blur) {\\r\\n t._blur.parentNode.removeChild(t._blur);\\r\\n delete t._blur;\\r\\n delete t.attrs.blur;\\r\\n }\\r\\n t.node.removeAttribute(\\\"filter\\\");\\r\\n }\\r\\n return t;\\r\\n };\\r\\n R._engine.circle = function (svg, x, y, r) {\\r\\n var el = $(\\\"circle\\\");\\r\\n svg.canvas && svg.canvas.appendChild(el);\\r\\n var res = new Element(el, svg);\\r\\n res.attrs = {cx: x, cy: y, r: r, fill: \\\"none\\\", stroke: \\\"#000\\\"};\\r\\n res.type = \\\"circle\\\";\\r\\n $(el, res.attrs);\\r\\n return res;\\r\\n };\\r\\n R._engine.rect = function (svg, x, y, w, h, r) {\\r\\n var el = $(\\\"rect\\\");\\r\\n svg.canvas && svg.canvas.appendChild(el);\\r\\n var res = new Element(el, svg);\\r\\n res.attrs = {x: x, y: y, width: w, height: h, rx: r || 0, ry: r || 0, fill: \\\"none\\\", stroke: \\\"#000\\\"};\\r\\n res.type = \\\"rect\\\";\\r\\n $(el, res.attrs);\\r\\n return res;\\r\\n };\\r\\n R._engine.ellipse = function (svg, x, y, rx, ry) {\\r\\n var el = $(\\\"ellipse\\\");\\r\\n svg.canvas && svg.canvas.appendChild(el);\\r\\n var res = new Element(el, svg);\\r\\n res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: \\\"none\\\", stroke: \\\"#000\\\"};\\r\\n res.type = \\\"ellipse\\\";\\r\\n $(el, res.attrs);\\r\\n return res;\\r\\n };\\r\\n R._engine.image = function (svg, src, x, y, w, h) {\\r\\n var el = $(\\\"image\\\");\\r\\n $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: \\\"none\\\"});\\r\\n el.setAttributeNS(xlink, \\\"href\\\", src);\\r\\n svg.canvas && svg.canvas.appendChild(el);\\r\\n var res = new Element(el, svg);\\r\\n res.attrs = {x: x, y: y, width: w, height: h, src: src};\\r\\n res.type = \\\"image\\\";\\r\\n return res;\\r\\n };\\r\\n R._engine.text = function (svg, x, y, text, href) {\\r\\n var el = $(\\\"text\\\");\\r\\n svg.canvas && svg.canvas.appendChild(el);\\r\\n var res = new Element(el, svg);\\r\\n res.attrs = {\\r\\n x: x,\\r\\n y: y,\\r\\n \\\"text-anchor\\\": \\\"middle\\\",\\r\\n text: text,\\r\\n \\\"font-family\\\": R._availableAttrs[\\\"font-family\\\"],\\r\\n \\\"font-size\\\": R._availableAttrs[\\\"font-size\\\"],\\r\\n stroke: \\\"none\\\",\\r\\n fill: \\\"#000\\\",\\r\\n ...(href ? { href } : null),\\r\\n };\\r\\n res.type = \\\"text\\\";\\r\\n setFillAndStroke(res, res.attrs);\\r\\n return res;\\r\\n };\\r\\n R._engine.setSize = function (width, height) {\\r\\n this.width = width || this.width;\\r\\n this.height = height || this.height;\\r\\n this.canvas.setAttribute(\\\"width\\\", this.width);\\r\\n this.canvas.setAttribute(\\\"height\\\", this.height);\\r\\n if (this._viewBox) {\\r\\n this.setViewBox.apply(this, this._viewBox);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n R._engine.create = function () {\\r\\n var con = R._getContainer.apply(0, arguments),\\r\\n container = con && con.container,\\r\\n x = con.x,\\r\\n y = con.y,\\r\\n width = con.width,\\r\\n height = con.height;\\r\\n if (!container) {\\r\\n throw new Error(\\\"SVG container not found.\\\");\\r\\n }\\r\\n var cnvs = $(\\\"svg\\\"),\\r\\n css = \\\"overflow:hidden;\\\",\\r\\n isFloating;\\r\\n x = x || 0;\\r\\n y = y || 0;\\r\\n width = width || 512;\\r\\n height = height || 342;\\r\\n $(cnvs, {\\r\\n height: height,\\r\\n version: 1.1,\\r\\n width: width,\\r\\n xmlns: \\\"http://www.w3.org/2000/svg\\\",\\r\\n \\\"xmlns:xlink\\\": \\\"http://www.w3.org/1999/xlink\\\"\\r\\n });\\r\\n if (container == 1) {\\r\\n cnvs.style.cssText = css + \\\"position:absolute;left:\\\" + x + \\\"px;top:\\\" + y + \\\"px\\\";\\r\\n R._g.doc.body.appendChild(cnvs);\\r\\n isFloating = 1;\\r\\n } else {\\r\\n cnvs.style.cssText = css + \\\"position:relative\\\";\\r\\n if (container.firstChild) {\\r\\n container.insertBefore(cnvs, container.firstChild);\\r\\n } else {\\r\\n container.appendChild(cnvs);\\r\\n }\\r\\n }\\r\\n container = new R._Paper;\\r\\n container.width = width;\\r\\n container.height = height;\\r\\n container.canvas = cnvs;\\r\\n container.clear();\\r\\n container._left = container._top = 0;\\r\\n isFloating && (container.renderfix = function () {});\\r\\n container.renderfix();\\r\\n return container;\\r\\n };\\r\\n R._engine.setViewBox = function (x, y, w, h, fit) {\\r\\n eve(\\\"raphael.setViewBox\\\", this, this._viewBox, [x, y, w, h, fit]);\\r\\n var paperSize = this.getSize(),\\r\\n size = mmax(w / paperSize.width, h / paperSize.height),\\r\\n top = this.top,\\r\\n aspectRatio = fit ? \\\"xMidYMid meet\\\" : \\\"xMinYMin\\\",\\r\\n vb,\\r\\n sw;\\r\\n if (x == null) {\\r\\n if (this._vbSize) {\\r\\n size = 1;\\r\\n }\\r\\n delete this._vbSize;\\r\\n vb = \\\"0 0 \\\" + this.width + S + this.height;\\r\\n } else {\\r\\n this._vbSize = size;\\r\\n vb = x + S + y + S + w + S + h;\\r\\n }\\r\\n $(this.canvas, {\\r\\n viewBox: vb,\\r\\n preserveAspectRatio: aspectRatio\\r\\n });\\r\\n while (size && top) {\\r\\n sw = \\\"stroke-width\\\" in top.attrs ? top.attrs[\\\"stroke-width\\\"] : 1;\\r\\n top.attr({\\\"stroke-width\\\": sw});\\r\\n top._.dirty = 1;\\r\\n top._.dirtyT = 1;\\r\\n top = top.prev;\\r\\n }\\r\\n this._viewBox = [x, y, w, h, !!fit];\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.renderfix\\r\\n [ method ]\\r\\n **\\r\\n * Fixes the issue of Firefox and IE9 regarding subpixel rendering. If paper is dependant\\r\\n * on other elements after reflow it could shift half pixel which cause for lines to lost their crispness.\\r\\n * This method fixes the issue.\\r\\n **\\r\\n Special thanks to Mariusz Nowak (http://www.medikoo.com/) for this method.\\r\\n \\\\*/\\r\\n R.prototype.renderfix = function () {\\r\\n var cnvs = this.canvas,\\r\\n s = cnvs.style,\\r\\n pos;\\r\\n try {\\r\\n pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix();\\r\\n } catch (e) {\\r\\n pos = cnvs.createSVGMatrix();\\r\\n }\\r\\n var left = -pos.e % 1,\\r\\n top = -pos.f % 1;\\r\\n if (left || top) {\\r\\n if (left) {\\r\\n this._left = (this._left + left) % 1;\\r\\n s.left = this._left + \\\"px\\\";\\r\\n }\\r\\n if (top) {\\r\\n this._top = (this._top + top) % 1;\\r\\n s.top = this._top + \\\"px\\\";\\r\\n }\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.clear\\r\\n [ method ]\\r\\n **\\r\\n * Clears the paper, i.e. removes all the elements.\\r\\n \\\\*/\\r\\n R.prototype.clear = function () {\\r\\n R.eve(\\\"raphael.clear\\\", this);\\r\\n var c = this.canvas;\\r\\n while (c.firstChild) {\\r\\n c.removeChild(c.firstChild);\\r\\n }\\r\\n this.bottom = this.top = null;\\r\\n (this.desc = $(\\\"desc\\\")).appendChild(R._g.doc.createTextNode(\\\"Created with Rapha\\\\xebl \\\" + R.version));\\r\\n c.appendChild(this.desc);\\r\\n c.appendChild(this.defs = $(\\\"defs\\\"));\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.remove\\r\\n [ method ]\\r\\n **\\r\\n * Removes the paper from the DOM.\\r\\n \\\\*/\\r\\n R.prototype.remove = function () {\\r\\n eve(\\\"raphael.remove\\\", this);\\r\\n this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);\\r\\n for (var i in this) {\\r\\n this[i] = typeof this[i] == \\\"function\\\" ? R._removedFactory(i) : null;\\r\\n }\\r\\n };\\r\\n var setproto = R.st;\\r\\n for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {\\r\\n setproto[method] = (function (methodname) {\\r\\n return function () {\\r\\n var arg = arguments;\\r\\n return this.forEach(function (el) {\\r\\n el[methodname].apply(el, arg);\\r\\n });\\r\\n };\\r\\n })(method);\\r\\n }\\r\\n}));\\r\\n\\r\\n// ┌─────────────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\\\\\\r\\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ VML Module │ \\\\\\\\\\r\\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\\\\\\r\\n// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\\\\\\\\\r\\n// └─────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n(function (glob, factory) {\\r\\n if (typeof define === \\\"function\\\" && define.amd) {\\r\\n define(\\\"raphael.vml\\\", [\\\"raphael.core\\\"], function(raphael) {\\r\\n return factory(raphael);\\r\\n });\\r\\n } else if (typeof exports === \\\"object\\\") {\\r\\n factory(require(\\\"./raphael.core\\\"));\\r\\n } else {\\r\\n factory(glob.Raphael);\\r\\n }\\r\\n}(this, function(R) {\\r\\n if (R && !R.vml) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var has = \\\"hasOwnProperty\\\",\\r\\n Str = String,\\r\\n toFloat = parseFloat,\\r\\n math = Math,\\r\\n round = math.round,\\r\\n mmax = math.max,\\r\\n mmin = math.min,\\r\\n abs = math.abs,\\r\\n fillString = \\\"fill\\\",\\r\\n separator = /[, ]+/,\\r\\n eve = R.eve,\\r\\n ms = \\\" progid:DXImageTransform.Microsoft\\\",\\r\\n S = \\\" \\\",\\r\\n E = \\\"\\\",\\r\\n map = {M: \\\"m\\\", L: \\\"l\\\", C: \\\"c\\\", Z: \\\"x\\\", m: \\\"t\\\", l: \\\"r\\\", c: \\\"v\\\", z: \\\"x\\\"},\\r\\n bites = /([clmz]),?([^clmz]*)/gi,\\r\\n blurregexp = / progid:\\\\S+Blur\\\\([^\\\\)]+\\\\)/g,\\r\\n val = /-?[^,\\\\s-]+/g,\\r\\n cssDot = \\\"position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)\\\",\\r\\n zoom = 21600,\\r\\n pathTypes = {path: 1, rect: 1, image: 1},\\r\\n ovalTypes = {circle: 1, ellipse: 1},\\r\\n path2vml = function (path) {\\r\\n var total = /[ahqstv]/ig,\\r\\n command = R._pathToAbsolute;\\r\\n Str(path).match(total) && (command = R._path2curve);\\r\\n total = /[clmz]/g;\\r\\n if (command == R._pathToAbsolute && !Str(path).match(total)) {\\r\\n var res = Str(path).replace(bites, function (all, command, args) {\\r\\n var vals = [],\\r\\n isMove = command.toLowerCase() == \\\"m\\\",\\r\\n res = map[command];\\r\\n args.replace(val, function (value) {\\r\\n if (isMove && vals.length == 2) {\\r\\n res += vals + map[command == \\\"m\\\" ? \\\"l\\\" : \\\"L\\\"];\\r\\n vals = [];\\r\\n }\\r\\n vals.push(round(value * zoom));\\r\\n });\\r\\n return res + vals;\\r\\n });\\r\\n return res;\\r\\n }\\r\\n var pa = command(path), p, r;\\r\\n res = [];\\r\\n for (var i = 0, ii = pa.length; i < ii; i++) {\\r\\n p = pa[i];\\r\\n r = pa[i][0].toLowerCase();\\r\\n r == \\\"z\\\" && (r = \\\"x\\\");\\r\\n for (var j = 1, jj = p.length; j < jj; j++) {\\r\\n r += round(p[j] * zoom) + (j != jj - 1 ? \\\",\\\" : E);\\r\\n }\\r\\n res.push(r);\\r\\n }\\r\\n return res.join(S);\\r\\n },\\r\\n compensation = function (deg, dx, dy) {\\r\\n var m = R.matrix();\\r\\n m.rotate(-deg, .5, .5);\\r\\n return {\\r\\n dx: m.x(dx, dy),\\r\\n dy: m.y(dx, dy)\\r\\n };\\r\\n },\\r\\n setCoords = function (p, sx, sy, dx, dy, deg) {\\r\\n var _ = p._,\\r\\n m = p.matrix,\\r\\n fillpos = _.fillpos,\\r\\n o = p.node,\\r\\n s = o.style,\\r\\n y = 1,\\r\\n flip = \\\"\\\",\\r\\n dxdy,\\r\\n kx = zoom / sx,\\r\\n ky = zoom / sy;\\r\\n s.visibility = \\\"hidden\\\";\\r\\n if (!sx || !sy) {\\r\\n return;\\r\\n }\\r\\n o.coordsize = abs(kx) + S + abs(ky);\\r\\n s.rotation = deg * (sx * sy < 0 ? -1 : 1);\\r\\n if (deg) {\\r\\n var c = compensation(deg, dx, dy);\\r\\n dx = c.dx;\\r\\n dy = c.dy;\\r\\n }\\r\\n sx < 0 && (flip += \\\"x\\\");\\r\\n sy < 0 && (flip += \\\" y\\\") && (y = -1);\\r\\n s.flip = flip;\\r\\n o.coordorigin = (dx * -kx) + S + (dy * -ky);\\r\\n if (fillpos || _.fillsize) {\\r\\n var fill = o.getElementsByTagName(fillString);\\r\\n fill = fill && fill[0];\\r\\n o.removeChild(fill);\\r\\n if (fillpos) {\\r\\n c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1]));\\r\\n fill.position = c.dx * y + S + c.dy * y;\\r\\n }\\r\\n if (_.fillsize) {\\r\\n fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy);\\r\\n }\\r\\n o.appendChild(fill);\\r\\n }\\r\\n s.visibility = \\\"visible\\\";\\r\\n };\\r\\n R.toString = function () {\\r\\n return \\\"Your browser doesn\\\\u2019t support SVG. Falling down to VML.\\\\nYou are running Rapha\\\\xebl \\\" + this.version;\\r\\n };\\r\\n var addArrow = function (o, value, isEnd) {\\r\\n var values = Str(value).toLowerCase().split(\\\"-\\\"),\\r\\n se = isEnd ? \\\"end\\\" : \\\"start\\\",\\r\\n i = values.length,\\r\\n type = \\\"classic\\\",\\r\\n w = \\\"medium\\\",\\r\\n h = \\\"medium\\\";\\r\\n while (i--) {\\r\\n switch (values[i]) {\\r\\n case \\\"block\\\":\\r\\n case \\\"classic\\\":\\r\\n case \\\"oval\\\":\\r\\n case \\\"diamond\\\":\\r\\n case \\\"open\\\":\\r\\n case \\\"none\\\":\\r\\n type = values[i];\\r\\n break;\\r\\n case \\\"wide\\\":\\r\\n case \\\"narrow\\\": h = values[i]; break;\\r\\n case \\\"long\\\":\\r\\n case \\\"short\\\": w = values[i]; break;\\r\\n }\\r\\n }\\r\\n var stroke = o.node.getElementsByTagName(\\\"stroke\\\")[0];\\r\\n stroke[se + \\\"arrow\\\"] = type;\\r\\n stroke[se + \\\"arrowlength\\\"] = w;\\r\\n stroke[se + \\\"arrowwidth\\\"] = h;\\r\\n },\\r\\n setFillAndStroke = function (o, params) {\\r\\n // o.paper.canvas.style.display = \\\"none\\\";\\r\\n o.attrs = o.attrs || {};\\r\\n var node = o.node,\\r\\n a = o.attrs,\\r\\n s = node.style,\\r\\n xy,\\r\\n newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r),\\r\\n isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry),\\r\\n res = o;\\r\\n\\r\\n\\r\\n for (var par in params) if (params[has](par)) {\\r\\n a[par] = params[par];\\r\\n }\\r\\n if (newpath) {\\r\\n a.path = R._getPath[o.type](o);\\r\\n o._.dirty = 1;\\r\\n }\\r\\n params.href && (node.href = params.href);\\r\\n params.title && (node.title = params.title);\\r\\n params.target && (node.target = params.target);\\r\\n params.cursor && (s.cursor = params.cursor);\\r\\n \\\"blur\\\" in params && o.blur(params.blur);\\r\\n if (params.path && o.type == \\\"path\\\" || newpath) {\\r\\n node.path = path2vml(~Str(a.path).toLowerCase().indexOf(\\\"r\\\") ? R._pathToAbsolute(a.path) : a.path);\\r\\n o._.dirty = 1;\\r\\n if (o.type == \\\"image\\\") {\\r\\n o._.fillpos = [a.x, a.y];\\r\\n o._.fillsize = [a.width, a.height];\\r\\n setCoords(o, 1, 1, 0, 0, 0);\\r\\n }\\r\\n }\\r\\n \\\"transform\\\" in params && o.transform(params.transform);\\r\\n if (isOval) {\\r\\n var cx = +a.cx,\\r\\n cy = +a.cy,\\r\\n rx = +a.rx || +a.r || 0,\\r\\n ry = +a.ry || +a.r || 0;\\r\\n node.path = R.format(\\\"ar{0},{1},{2},{3},{4},{1},{4},{1}x\\\", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom));\\r\\n o._.dirty = 1;\\r\\n }\\r\\n if (\\\"clip-rect\\\" in params) {\\r\\n var rect = Str(params[\\\"clip-rect\\\"]).split(separator);\\r\\n if (rect.length == 4) {\\r\\n rect[2] = +rect[2] + (+rect[0]);\\r\\n rect[3] = +rect[3] + (+rect[1]);\\r\\n var div = node.clipRect || R._g.doc.createElement(\\\"div\\\"),\\r\\n dstyle = div.style;\\r\\n dstyle.clip = R.format(\\\"rect({1}px {2}px {3}px {0}px)\\\", rect);\\r\\n if (!node.clipRect) {\\r\\n dstyle.position = \\\"absolute\\\";\\r\\n dstyle.top = 0;\\r\\n dstyle.left = 0;\\r\\n dstyle.width = o.paper.width + \\\"px\\\";\\r\\n dstyle.height = o.paper.height + \\\"px\\\";\\r\\n node.parentNode.insertBefore(div, node);\\r\\n div.appendChild(node);\\r\\n node.clipRect = div;\\r\\n }\\r\\n }\\r\\n if (!params[\\\"clip-rect\\\"]) {\\r\\n node.clipRect && (node.clipRect.style.clip = \\\"auto\\\");\\r\\n }\\r\\n }\\r\\n if (o.textpath) {\\r\\n var textpathStyle = o.textpath.style;\\r\\n params.font && (textpathStyle.font = params.font);\\r\\n params[\\\"font-family\\\"] && (textpathStyle.fontFamily = '\\\"' + params[\\\"font-family\\\"].split(\\\",\\\")[0].replace(/^['\\\"]+|['\\\"]+$/g, E) + '\\\"');\\r\\n params[\\\"font-size\\\"] && (textpathStyle.fontSize = params[\\\"font-size\\\"]);\\r\\n params[\\\"font-weight\\\"] && (textpathStyle.fontWeight = params[\\\"font-weight\\\"]);\\r\\n params[\\\"font-style\\\"] && (textpathStyle.fontStyle = params[\\\"font-style\\\"]);\\r\\n }\\r\\n if (\\\"arrow-start\\\" in params) {\\r\\n addArrow(res, params[\\\"arrow-start\\\"]);\\r\\n }\\r\\n if (\\\"arrow-end\\\" in params) {\\r\\n addArrow(res, params[\\\"arrow-end\\\"], 1);\\r\\n }\\r\\n if (params.opacity != null ||\\r\\n params[\\\"stroke-width\\\"] != null ||\\r\\n params.fill != null ||\\r\\n params.src != null ||\\r\\n params.stroke != null ||\\r\\n params[\\\"stroke-width\\\"] != null ||\\r\\n params[\\\"stroke-opacity\\\"] != null ||\\r\\n params[\\\"fill-opacity\\\"] != null ||\\r\\n params[\\\"stroke-dasharray\\\"] != null ||\\r\\n params[\\\"stroke-miterlimit\\\"] != null ||\\r\\n params[\\\"stroke-linejoin\\\"] != null ||\\r\\n params[\\\"stroke-linecap\\\"] != null) {\\r\\n var fill = node.getElementsByTagName(fillString),\\r\\n newfill = false;\\r\\n fill = fill && fill[0];\\r\\n !fill && (newfill = fill = createNode(fillString));\\r\\n if (o.type == \\\"image\\\" && params.src) {\\r\\n fill.src = params.src;\\r\\n }\\r\\n params.fill && (fill.on = true);\\r\\n if (fill.on == null || params.fill == \\\"none\\\" || params.fill === null) {\\r\\n fill.on = false;\\r\\n }\\r\\n if (fill.on && params.fill) {\\r\\n var isURL = Str(params.fill).match(R._ISURL);\\r\\n if (isURL) {\\r\\n fill.parentNode == node && node.removeChild(fill);\\r\\n fill.rotate = true;\\r\\n fill.src = isURL[1];\\r\\n fill.type = \\\"tile\\\";\\r\\n var bbox = o.getBBox(1);\\r\\n fill.position = bbox.x + S + bbox.y;\\r\\n o._.fillpos = [bbox.x, bbox.y];\\r\\n\\r\\n R._preload(isURL[1], function () {\\r\\n o._.fillsize = [this.offsetWidth, this.offsetHeight];\\r\\n });\\r\\n } else {\\r\\n fill.color = R.getRGB(params.fill).hex;\\r\\n fill.src = E;\\r\\n fill.type = \\\"solid\\\";\\r\\n if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != \\\"r\\\") && addGradientFill(res, params.fill, fill)) {\\r\\n a.fill = \\\"none\\\";\\r\\n a.gradient = params.fill;\\r\\n fill.rotate = false;\\r\\n }\\r\\n }\\r\\n }\\r\\n if (\\\"fill-opacity\\\" in params || \\\"opacity\\\" in params) {\\r\\n var opacity = ((+a[\\\"fill-opacity\\\"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1);\\r\\n opacity = mmin(mmax(opacity, 0), 1);\\r\\n fill.opacity = opacity;\\r\\n if (fill.src) {\\r\\n fill.color = \\\"none\\\";\\r\\n }\\r\\n }\\r\\n node.appendChild(fill);\\r\\n var stroke = (node.getElementsByTagName(\\\"stroke\\\") && node.getElementsByTagName(\\\"stroke\\\")[0]),\\r\\n newstroke = false;\\r\\n !stroke && (newstroke = stroke = createNode(\\\"stroke\\\"));\\r\\n if ((params.stroke && params.stroke != \\\"none\\\") ||\\r\\n params[\\\"stroke-width\\\"] ||\\r\\n params[\\\"stroke-opacity\\\"] != null ||\\r\\n params[\\\"stroke-dasharray\\\"] ||\\r\\n params[\\\"stroke-miterlimit\\\"] ||\\r\\n params[\\\"stroke-linejoin\\\"] ||\\r\\n params[\\\"stroke-linecap\\\"]) {\\r\\n stroke.on = true;\\r\\n }\\r\\n (params.stroke == \\\"none\\\" || params.stroke === null || stroke.on == null || params.stroke == 0 || params[\\\"stroke-width\\\"] == 0) && (stroke.on = false);\\r\\n var strokeColor = R.getRGB(params.stroke);\\r\\n stroke.on && params.stroke && (stroke.color = strokeColor.hex);\\r\\n opacity = ((+a[\\\"stroke-opacity\\\"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1);\\r\\n var width = (toFloat(params[\\\"stroke-width\\\"]) || 1) * .75;\\r\\n opacity = mmin(mmax(opacity, 0), 1);\\r\\n params[\\\"stroke-width\\\"] == null && (width = a[\\\"stroke-width\\\"]);\\r\\n params[\\\"stroke-width\\\"] && (stroke.weight = width);\\r\\n width && width < 1 && (opacity *= width) && (stroke.weight = 1);\\r\\n stroke.opacity = opacity;\\r\\n\\r\\n params[\\\"stroke-linejoin\\\"] && (stroke.joinstyle = params[\\\"stroke-linejoin\\\"] || \\\"miter\\\");\\r\\n stroke.miterlimit = params[\\\"stroke-miterlimit\\\"] || 8;\\r\\n params[\\\"stroke-linecap\\\"] && (stroke.endcap = params[\\\"stroke-linecap\\\"] == \\\"butt\\\" ? \\\"flat\\\" : params[\\\"stroke-linecap\\\"] == \\\"square\\\" ? \\\"square\\\" : \\\"round\\\");\\r\\n if (\\\"stroke-dasharray\\\" in params) {\\r\\n var dasharray = {\\r\\n \\\"-\\\": \\\"shortdash\\\",\\r\\n \\\".\\\": \\\"shortdot\\\",\\r\\n \\\"-.\\\": \\\"shortdashdot\\\",\\r\\n \\\"-..\\\": \\\"shortdashdotdot\\\",\\r\\n \\\". \\\": \\\"dot\\\",\\r\\n \\\"- \\\": \\\"dash\\\",\\r\\n \\\"--\\\": \\\"longdash\\\",\\r\\n \\\"- .\\\": \\\"dashdot\\\",\\r\\n \\\"--.\\\": \\\"longdashdot\\\",\\r\\n \\\"--..\\\": \\\"longdashdotdot\\\"\\r\\n };\\r\\n stroke.dashstyle = dasharray[has](params[\\\"stroke-dasharray\\\"]) ? dasharray[params[\\\"stroke-dasharray\\\"]] : E;\\r\\n }\\r\\n newstroke && node.appendChild(stroke);\\r\\n }\\r\\n if (res.type == \\\"text\\\") {\\r\\n res.paper.canvas.style.display = E;\\r\\n var span = res.paper.span,\\r\\n m = 100,\\r\\n fontSize = a.font && a.font.match(/\\\\d+(?:\\\\.\\\\d*)?(?=px)/);\\r\\n s = span.style;\\r\\n a.font && (s.font = a.font);\\r\\n a[\\\"font-family\\\"] && (s.fontFamily = a[\\\"font-family\\\"]);\\r\\n a[\\\"font-weight\\\"] && (s.fontWeight = a[\\\"font-weight\\\"]);\\r\\n a[\\\"font-style\\\"] && (s.fontStyle = a[\\\"font-style\\\"]);\\r\\n fontSize = toFloat(a[\\\"font-size\\\"] || fontSize && fontSize[0]) || 10;\\r\\n s.fontSize = fontSize * m + \\\"px\\\";\\r\\n res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, \\\"<\\\").replace(/&/g, \\\"&\\\").replace(/\\\\n/g, \\\"<br>\\\"));\\r\\n var brect = span.getBoundingClientRect();\\r\\n res.W = a.w = (brect.right - brect.left) / m;\\r\\n res.H = a.h = (brect.bottom - brect.top) / m;\\r\\n // res.paper.canvas.style.display = \\\"none\\\";\\r\\n res.X = a.x;\\r\\n res.Y = a.y + res.H / 2;\\r\\n\\r\\n (\\\"x\\\" in params || \\\"y\\\" in params) && (res.path.v = R.format(\\\"m{0},{1}l{2},{1}\\\", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1));\\r\\n var dirtyattrs = [\\\"x\\\", \\\"y\\\", \\\"text\\\", \\\"font\\\", \\\"font-family\\\", \\\"font-weight\\\", \\\"font-style\\\", \\\"font-size\\\"];\\r\\n for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) {\\r\\n res._.dirty = 1;\\r\\n break;\\r\\n }\\r\\n\\r\\n // text-anchor emulation\\r\\n switch (a[\\\"text-anchor\\\"]) {\\r\\n case \\\"start\\\":\\r\\n res.textpath.style[\\\"v-text-align\\\"] = \\\"left\\\";\\r\\n res.bbx = res.W / 2;\\r\\n break;\\r\\n case \\\"end\\\":\\r\\n res.textpath.style[\\\"v-text-align\\\"] = \\\"right\\\";\\r\\n res.bbx = -res.W / 2;\\r\\n break;\\r\\n default:\\r\\n res.textpath.style[\\\"v-text-align\\\"] = \\\"center\\\";\\r\\n res.bbx = 0;\\r\\n break;\\r\\n }\\r\\n res.textpath.style[\\\"v-text-kern\\\"] = true;\\r\\n }\\r\\n // res.paper.canvas.style.display = E;\\r\\n },\\r\\n addGradientFill = function (o, gradient, fill) {\\r\\n o.attrs = o.attrs || {};\\r\\n var attrs = o.attrs,\\r\\n pow = Math.pow,\\r\\n opacity,\\r\\n oindex,\\r\\n type = \\\"linear\\\",\\r\\n fxfy = \\\".5 .5\\\";\\r\\n o.attrs.gradient = gradient;\\r\\n gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) {\\r\\n type = \\\"radial\\\";\\r\\n if (fx && fy) {\\r\\n fx = toFloat(fx);\\r\\n fy = toFloat(fy);\\r\\n pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5);\\r\\n fxfy = fx + S + fy;\\r\\n }\\r\\n return E;\\r\\n });\\r\\n gradient = gradient.split(/\\\\s*\\\\-\\\\s*/);\\r\\n if (type == \\\"linear\\\") {\\r\\n var angle = gradient.shift();\\r\\n angle = -toFloat(angle);\\r\\n if (isNaN(angle)) {\\r\\n return null;\\r\\n }\\r\\n }\\r\\n var dots = R._parseDots(gradient);\\r\\n if (!dots) {\\r\\n return null;\\r\\n }\\r\\n o = o.shape || o.node;\\r\\n if (dots.length) {\\r\\n o.removeChild(fill);\\r\\n fill.on = true;\\r\\n fill.method = \\\"none\\\";\\r\\n fill.color = dots[0].color;\\r\\n fill.color2 = dots[dots.length - 1].color;\\r\\n var clrs = [];\\r\\n for (var i = 0, ii = dots.length; i < ii; i++) {\\r\\n dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color);\\r\\n }\\r\\n fill.colors = clrs.length ? clrs.join() : \\\"0% \\\" + fill.color;\\r\\n if (type == \\\"radial\\\") {\\r\\n fill.type = \\\"gradientTitle\\\";\\r\\n fill.focus = \\\"100%\\\";\\r\\n fill.focussize = \\\"0 0\\\";\\r\\n fill.focusposition = fxfy;\\r\\n fill.angle = 0;\\r\\n } else {\\r\\n // fill.rotate= true;\\r\\n fill.type = \\\"gradient\\\";\\r\\n fill.angle = (270 - angle) % 360;\\r\\n }\\r\\n o.appendChild(fill);\\r\\n }\\r\\n return 1;\\r\\n },\\r\\n Element = function (node, vml) {\\r\\n this[0] = this.node = node;\\r\\n node.raphael = true;\\r\\n this.id = R._oid++;\\r\\n node.raphaelid = this.id;\\r\\n this.X = 0;\\r\\n this.Y = 0;\\r\\n this.attrs = {};\\r\\n this.paper = vml;\\r\\n this.matrix = R.matrix();\\r\\n this._ = {\\r\\n transform: [],\\r\\n sx: 1,\\r\\n sy: 1,\\r\\n dx: 0,\\r\\n dy: 0,\\r\\n deg: 0,\\r\\n dirty: 1,\\r\\n dirtyT: 1\\r\\n };\\r\\n !vml.bottom && (vml.bottom = this);\\r\\n this.prev = vml.top;\\r\\n vml.top && (vml.top.next = this);\\r\\n vml.top = this;\\r\\n this.next = null;\\r\\n };\\r\\n var elproto = R.el;\\r\\n\\r\\n Element.prototype = elproto;\\r\\n elproto.constructor = Element;\\r\\n elproto.transform = function (tstr) {\\r\\n if (tstr == null) {\\r\\n return this._.transform;\\r\\n }\\r\\n var vbs = this.paper._viewBoxShift,\\r\\n vbt = vbs ? \\\"s\\\" + [vbs.scale, vbs.scale] + \\\"-1-1t\\\" + [vbs.dx, vbs.dy] : E,\\r\\n oldt;\\r\\n if (vbs) {\\r\\n oldt = tstr = Str(tstr).replace(/\\\\.{3}|\\\\u2026/g, this._.transform || E);\\r\\n }\\r\\n R._extractTransform(this, vbt + tstr);\\r\\n var matrix = this.matrix.clone(),\\r\\n skew = this.skew,\\r\\n o = this.node,\\r\\n split,\\r\\n isGrad = ~Str(this.attrs.fill).indexOf(\\\"-\\\"),\\r\\n isPatt = !Str(this.attrs.fill).indexOf(\\\"url(\\\");\\r\\n matrix.translate(1, 1);\\r\\n if (isPatt || isGrad || this.type == \\\"image\\\") {\\r\\n skew.matrix = \\\"1 0 0 1\\\";\\r\\n skew.offset = \\\"0 0\\\";\\r\\n split = matrix.split();\\r\\n if ((isGrad && split.noRotation) || !split.isSimple) {\\r\\n o.style.filter = matrix.toFilter();\\r\\n var bb = this.getBBox(),\\r\\n bbt = this.getBBox(1),\\r\\n dx = bb.x - bbt.x,\\r\\n dy = bb.y - bbt.y;\\r\\n o.coordorigin = (dx * -zoom) + S + (dy * -zoom);\\r\\n setCoords(this, 1, 1, dx, dy, 0);\\r\\n } else {\\r\\n o.style.filter = E;\\r\\n setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate);\\r\\n }\\r\\n } else {\\r\\n o.style.filter = E;\\r\\n skew.matrix = Str(matrix);\\r\\n skew.offset = matrix.offset();\\r\\n }\\r\\n if (oldt !== null) { // empty string value is true as well\\r\\n this._.transform = oldt;\\r\\n R._extractTransform(this, oldt);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n elproto.rotate = function (deg, cx, cy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (deg == null) {\\r\\n return;\\r\\n }\\r\\n deg = Str(deg).split(separator);\\r\\n if (deg.length - 1) {\\r\\n cx = toFloat(deg[1]);\\r\\n cy = toFloat(deg[2]);\\r\\n }\\r\\n deg = toFloat(deg[0]);\\r\\n (cy == null) && (cx = cy);\\r\\n if (cx == null || cy == null) {\\r\\n var bbox = this.getBBox(1);\\r\\n cx = bbox.x + bbox.width / 2;\\r\\n cy = bbox.y + bbox.height / 2;\\r\\n }\\r\\n this._.dirtyT = 1;\\r\\n this.transform(this._.transform.concat([[\\\"r\\\", deg, cx, cy]]));\\r\\n return this;\\r\\n };\\r\\n elproto.translate = function (dx, dy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n dx = Str(dx).split(separator);\\r\\n if (dx.length - 1) {\\r\\n dy = toFloat(dx[1]);\\r\\n }\\r\\n dx = toFloat(dx[0]) || 0;\\r\\n dy = +dy || 0;\\r\\n if (this._.bbox) {\\r\\n this._.bbox.x += dx;\\r\\n this._.bbox.y += dy;\\r\\n }\\r\\n this.transform(this._.transform.concat([[\\\"t\\\", dx, dy]]));\\r\\n return this;\\r\\n };\\r\\n elproto.scale = function (sx, sy, cx, cy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n sx = Str(sx).split(separator);\\r\\n if (sx.length - 1) {\\r\\n sy = toFloat(sx[1]);\\r\\n cx = toFloat(sx[2]);\\r\\n cy = toFloat(sx[3]);\\r\\n isNaN(cx) && (cx = null);\\r\\n isNaN(cy) && (cy = null);\\r\\n }\\r\\n sx = toFloat(sx[0]);\\r\\n (sy == null) && (sy = sx);\\r\\n (cy == null) && (cx = cy);\\r\\n if (cx == null || cy == null) {\\r\\n var bbox = this.getBBox(1);\\r\\n }\\r\\n cx = cx == null ? bbox.x + bbox.width / 2 : cx;\\r\\n cy = cy == null ? bbox.y + bbox.height / 2 : cy;\\r\\n\\r\\n this.transform(this._.transform.concat([[\\\"s\\\", sx, sy, cx, cy]]));\\r\\n this._.dirtyT = 1;\\r\\n return this;\\r\\n };\\r\\n elproto.hide = function () {\\r\\n !this.removed && (this.node.style.display = \\\"none\\\");\\r\\n return this;\\r\\n };\\r\\n elproto.show = function () {\\r\\n !this.removed && (this.node.style.display = E);\\r\\n return this;\\r\\n };\\r\\n // Needed to fix the vml setViewBox issues\\r\\n elproto.auxGetBBox = R.el.getBBox;\\r\\n elproto.getBBox = function(){\\r\\n var b = this.auxGetBBox();\\r\\n if (this.paper && this.paper._viewBoxShift)\\r\\n {\\r\\n var c = {};\\r\\n var z = 1/this.paper._viewBoxShift.scale;\\r\\n c.x = b.x - this.paper._viewBoxShift.dx;\\r\\n c.x *= z;\\r\\n c.y = b.y - this.paper._viewBoxShift.dy;\\r\\n c.y *= z;\\r\\n c.width = b.width * z;\\r\\n c.height = b.height * z;\\r\\n c.x2 = c.x + c.width;\\r\\n c.y2 = c.y + c.height;\\r\\n return c;\\r\\n }\\r\\n return b;\\r\\n };\\r\\n elproto._getBBox = function () {\\r\\n if (this.removed) {\\r\\n return {};\\r\\n }\\r\\n return {\\r\\n x: this.X + (this.bbx || 0) - this.W / 2,\\r\\n y: this.Y - this.H,\\r\\n width: this.W,\\r\\n height: this.H\\r\\n };\\r\\n };\\r\\n elproto.remove = function () {\\r\\n if (this.removed || !this.node.parentNode) {\\r\\n return;\\r\\n }\\r\\n this.paper.__set__ && this.paper.__set__.exclude(this);\\r\\n R.eve.unbind(\\\"raphael.*.*.\\\" + this.id);\\r\\n R._tear(this, this.paper);\\r\\n this.node.parentNode.removeChild(this.node);\\r\\n this.shape && this.shape.parentNode.removeChild(this.shape);\\r\\n for (var i in this) {\\r\\n this[i] = typeof this[i] == \\\"function\\\" ? R._removedFactory(i) : null;\\r\\n }\\r\\n this.removed = true;\\r\\n };\\r\\n elproto.attr = function (name, value) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (name == null) {\\r\\n var res = {};\\r\\n for (var a in this.attrs) if (this.attrs[has](a)) {\\r\\n res[a] = this.attrs[a];\\r\\n }\\r\\n res.gradient && res.fill == \\\"none\\\" && (res.fill = res.gradient) && delete res.gradient;\\r\\n res.transform = this._.transform;\\r\\n return res;\\r\\n }\\r\\n if (value == null && R.is(name, \\\"string\\\")) {\\r\\n if (name == fillString && this.attrs.fill == \\\"none\\\" && this.attrs.gradient) {\\r\\n return this.attrs.gradient;\\r\\n }\\r\\n var names = name.split(separator),\\r\\n out = {};\\r\\n for (var i = 0, ii = names.length; i < ii; i++) {\\r\\n name = names[i];\\r\\n if (name in this.attrs) {\\r\\n out[name] = this.attrs[name];\\r\\n } else if (R.is(this.paper.customAttributes[name], \\\"function\\\")) {\\r\\n out[name] = this.paper.customAttributes[name].def;\\r\\n } else {\\r\\n out[name] = R._availableAttrs[name];\\r\\n }\\r\\n }\\r\\n return ii - 1 ? out : out[names[0]];\\r\\n }\\r\\n if (this.attrs && value == null && R.is(name, \\\"array\\\")) {\\r\\n out = {};\\r\\n for (i = 0, ii = name.length; i < ii; i++) {\\r\\n out[name[i]] = this.attr(name[i]);\\r\\n }\\r\\n return out;\\r\\n }\\r\\n var params;\\r\\n if (value != null) {\\r\\n params = {};\\r\\n params[name] = value;\\r\\n }\\r\\n value == null && R.is(name, \\\"object\\\") && (params = name);\\r\\n for (var key in params) {\\r\\n eve(\\\"raphael.attr.\\\" + key + \\\".\\\" + this.id, this, params[key]);\\r\\n }\\r\\n if (params) {\\r\\n for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], \\\"function\\\")) {\\r\\n var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));\\r\\n this.attrs[key] = params[key];\\r\\n for (var subkey in par) if (par[has](subkey)) {\\r\\n params[subkey] = par[subkey];\\r\\n }\\r\\n }\\r\\n // this.paper.canvas.style.display = \\\"none\\\";\\r\\n if (params.text && this.type == \\\"text\\\") {\\r\\n this.textpath.string = params.text;\\r\\n }\\r\\n setFillAndStroke(this, params);\\r\\n // this.paper.canvas.style.display = E;\\r\\n }\\r\\n return this;\\r\\n };\\r\\n elproto.toFront = function () {\\r\\n !this.removed && this.node.parentNode.appendChild(this.node);\\r\\n this.paper && this.paper.top != this && R._tofront(this, this.paper);\\r\\n return this;\\r\\n };\\r\\n elproto.toBack = function () {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (this.node.parentNode.firstChild != this.node) {\\r\\n this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild);\\r\\n R._toback(this, this.paper);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n elproto.insertAfter = function (element) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (element.constructor == R.st.constructor) {\\r\\n element = element[element.length - 1];\\r\\n }\\r\\n if (element.node.nextSibling) {\\r\\n element.node.parentNode.insertBefore(this.node, element.node.nextSibling);\\r\\n } else {\\r\\n element.node.parentNode.appendChild(this.node);\\r\\n }\\r\\n R._insertafter(this, element, this.paper);\\r\\n return this;\\r\\n };\\r\\n elproto.insertBefore = function (element) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (element.constructor == R.st.constructor) {\\r\\n element = element[0];\\r\\n }\\r\\n element.node.parentNode.insertBefore(this.node, element.node);\\r\\n R._insertbefore(this, element, this.paper);\\r\\n return this;\\r\\n };\\r\\n elproto.blur = function (size) {\\r\\n var s = this.node.runtimeStyle,\\r\\n f = s.filter;\\r\\n f = f.replace(blurregexp, E);\\r\\n if (+size !== 0) {\\r\\n this.attrs.blur = size;\\r\\n s.filter = f + S + ms + \\\".Blur(pixelradius=\\\" + (+size || 1.5) + \\\")\\\";\\r\\n s.margin = R.format(\\\"-{0}px 0 0 -{0}px\\\", round(+size || 1.5));\\r\\n } else {\\r\\n s.filter = f;\\r\\n s.margin = 0;\\r\\n delete this.attrs.blur;\\r\\n }\\r\\n return this;\\r\\n };\\r\\n\\r\\n R._engine.path = function (pathString, vml) {\\r\\n var el = createNode(\\\"shape\\\");\\r\\n el.style.cssText = cssDot;\\r\\n el.coordsize = zoom + S + zoom;\\r\\n el.coordorigin = vml.coordorigin;\\r\\n var p = new Element(el, vml),\\r\\n attr = {fill: \\\"none\\\", stroke: \\\"#000\\\"};\\r\\n pathString && (attr.path = pathString);\\r\\n p.type = \\\"path\\\";\\r\\n p.path = [];\\r\\n p.Path = E;\\r\\n setFillAndStroke(p, attr);\\r\\n vml.canvas.appendChild(el);\\r\\n var skew = createNode(\\\"skew\\\");\\r\\n skew.on = true;\\r\\n el.appendChild(skew);\\r\\n p.skew = skew;\\r\\n p.transform(E);\\r\\n return p;\\r\\n };\\r\\n R._engine.rect = function (vml, x, y, w, h, r) {\\r\\n var path = R._rectPath(x, y, w, h, r),\\r\\n res = vml.path(path),\\r\\n a = res.attrs;\\r\\n res.X = a.x = x;\\r\\n res.Y = a.y = y;\\r\\n res.W = a.width = w;\\r\\n res.H = a.height = h;\\r\\n a.r = r;\\r\\n a.path = path;\\r\\n res.type = \\\"rect\\\";\\r\\n return res;\\r\\n };\\r\\n R._engine.ellipse = function (vml, x, y, rx, ry) {\\r\\n var res = vml.path(),\\r\\n a = res.attrs;\\r\\n res.X = x - rx;\\r\\n res.Y = y - ry;\\r\\n res.W = rx * 2;\\r\\n res.H = ry * 2;\\r\\n res.type = \\\"ellipse\\\";\\r\\n setFillAndStroke(res, {\\r\\n cx: x,\\r\\n cy: y,\\r\\n rx: rx,\\r\\n ry: ry\\r\\n });\\r\\n return res;\\r\\n };\\r\\n R._engine.circle = function (vml, x, y, r) {\\r\\n var res = vml.path(),\\r\\n a = res.attrs;\\r\\n res.X = x - r;\\r\\n res.Y = y - r;\\r\\n res.W = res.H = r * 2;\\r\\n res.type = \\\"circle\\\";\\r\\n setFillAndStroke(res, {\\r\\n cx: x,\\r\\n cy: y,\\r\\n r: r\\r\\n });\\r\\n return res;\\r\\n };\\r\\n R._engine.image = function (vml, src, x, y, w, h) {\\r\\n var path = R._rectPath(x, y, w, h),\\r\\n res = vml.path(path).attr({stroke: \\\"none\\\"}),\\r\\n a = res.attrs,\\r\\n node = res.node,\\r\\n fill = node.getElementsByTagName(fillString)[0];\\r\\n a.src = src;\\r\\n res.X = a.x = x;\\r\\n res.Y = a.y = y;\\r\\n res.W = a.width = w;\\r\\n res.H = a.height = h;\\r\\n a.path = path;\\r\\n res.type = \\\"image\\\";\\r\\n fill.parentNode == node && node.removeChild(fill);\\r\\n fill.rotate = true;\\r\\n fill.src = src;\\r\\n fill.type = \\\"tile\\\";\\r\\n res._.fillpos = [x, y];\\r\\n res._.fillsize = [w, h];\\r\\n node.appendChild(fill);\\r\\n setCoords(res, 1, 1, 0, 0, 0);\\r\\n return res;\\r\\n };\\r\\n R._engine.text = function (vml, x, y, text) {\\r\\n var el = createNode(\\\"shape\\\"),\\r\\n path = createNode(\\\"path\\\"),\\r\\n o = createNode(\\\"textpath\\\");\\r\\n x = x || 0;\\r\\n y = y || 0;\\r\\n text = text || \\\"\\\";\\r\\n path.v = R.format(\\\"m{0},{1}l{2},{1}\\\", round(x * zoom), round(y * zoom), round(x * zoom) + 1);\\r\\n path.textpathok = true;\\r\\n o.string = Str(text);\\r\\n o.on = true;\\r\\n el.style.cssText = cssDot;\\r\\n el.coordsize = zoom + S + zoom;\\r\\n el.coordorigin = \\\"0 0\\\";\\r\\n var p = new Element(el, vml),\\r\\n attr = {\\r\\n fill: \\\"#000\\\",\\r\\n stroke: \\\"none\\\",\\r\\n font: R._availableAttrs.font,\\r\\n text: text\\r\\n };\\r\\n p.shape = el;\\r\\n p.path = path;\\r\\n p.textpath = o;\\r\\n p.type = \\\"text\\\";\\r\\n p.attrs.text = Str(text);\\r\\n p.attrs.x = x;\\r\\n p.attrs.y = y;\\r\\n p.attrs.w = 1;\\r\\n p.attrs.h = 1;\\r\\n setFillAndStroke(p, attr);\\r\\n el.appendChild(o);\\r\\n el.appendChild(path);\\r\\n vml.canvas.appendChild(el);\\r\\n var skew = createNode(\\\"skew\\\");\\r\\n skew.on = true;\\r\\n el.appendChild(skew);\\r\\n p.skew = skew;\\r\\n p.transform(E);\\r\\n return p;\\r\\n };\\r\\n R._engine.setSize = function (width, height) {\\r\\n var cs = this.canvas.style;\\r\\n this.width = width;\\r\\n this.height = height;\\r\\n width == +width && (width += \\\"px\\\");\\r\\n height == +height && (height += \\\"px\\\");\\r\\n cs.width = width;\\r\\n cs.height = height;\\r\\n cs.clip = \\\"rect(0 \\\" + width + \\\" \\\" + height + \\\" 0)\\\";\\r\\n if (this._viewBox) {\\r\\n R._engine.setViewBox.apply(this, this._viewBox);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n R._engine.setViewBox = function (x, y, w, h, fit) {\\r\\n R.eve(\\\"raphael.setViewBox\\\", this, this._viewBox, [x, y, w, h, fit]);\\r\\n var paperSize = this.getSize(),\\r\\n width = paperSize.width,\\r\\n height = paperSize.height,\\r\\n H, W;\\r\\n if (fit) {\\r\\n H = height / h;\\r\\n W = width / w;\\r\\n if (w * H < width) {\\r\\n x -= (width - w * H) / 2 / H;\\r\\n }\\r\\n if (h * W < height) {\\r\\n y -= (height - h * W) / 2 / W;\\r\\n }\\r\\n }\\r\\n this._viewBox = [x, y, w, h, !!fit];\\r\\n this._viewBoxShift = {\\r\\n dx: -x,\\r\\n dy: -y,\\r\\n scale: paperSize\\r\\n };\\r\\n this.forEach(function (el) {\\r\\n el.transform(\\\"...\\\");\\r\\n });\\r\\n return this;\\r\\n };\\r\\n var createNode;\\r\\n R._engine.initWin = function (win) {\\r\\n var doc = win.document;\\r\\n if (doc.styleSheets.length < 31) {\\r\\n doc.createStyleSheet().addRule(\\\".rvml\\\", \\\"behavior:url(#default#VML)\\\");\\r\\n } else {\\r\\n // no more room, add to the existing one\\r\\n // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx\\r\\n doc.styleSheets[0].addRule(\\\".rvml\\\", \\\"behavior:url(#default#VML)\\\");\\r\\n }\\r\\n try {\\r\\n !doc.namespaces.rvml && doc.namespaces.add(\\\"rvml\\\", \\\"urn:schemas-microsoft-com:vml\\\");\\r\\n createNode = function (tagName) {\\r\\n return doc.createElement('<rvml:' + tagName + ' class=\\\"rvml\\\">');\\r\\n };\\r\\n } catch (e) {\\r\\n createNode = function (tagName) {\\r\\n return doc.createElement('<' + tagName + ' xmlns=\\\"urn:schemas-microsoft.com:vml\\\" class=\\\"rvml\\\">');\\r\\n };\\r\\n }\\r\\n };\\r\\n R._engine.initWin(R._g.win);\\r\\n R._engine.create = function () {\\r\\n var con = R._getContainer.apply(0, arguments),\\r\\n container = con.container,\\r\\n height = con.height,\\r\\n s,\\r\\n width = con.width,\\r\\n x = con.x,\\r\\n y = con.y;\\r\\n if (!container) {\\r\\n throw new Error(\\\"VML container not found.\\\");\\r\\n }\\r\\n var res = new R._Paper,\\r\\n c = res.canvas = R._g.doc.createElement(\\\"div\\\"),\\r\\n cs = c.style;\\r\\n x = x || 0;\\r\\n y = y || 0;\\r\\n width = width || 512;\\r\\n height = height || 342;\\r\\n res.width = width;\\r\\n res.height = height;\\r\\n width == +width && (width += \\\"px\\\");\\r\\n height == +height && (height += \\\"px\\\");\\r\\n res.coordsize = zoom * 1e3 + S + zoom * 1e3;\\r\\n res.coordorigin = \\\"0 0\\\";\\r\\n res.span = R._g.doc.createElement(\\\"span\\\");\\r\\n res.span.style.cssText = \\\"position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;\\\";\\r\\n c.appendChild(res.span);\\r\\n cs.cssText = R.format(\\\"top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden\\\", width, height);\\r\\n if (container == 1) {\\r\\n R._g.doc.body.appendChild(c);\\r\\n cs.left = x + \\\"px\\\";\\r\\n cs.top = y + \\\"px\\\";\\r\\n cs.position = \\\"absolute\\\";\\r\\n } else {\\r\\n if (container.firstChild) {\\r\\n container.insertBefore(c, container.firstChild);\\r\\n } else {\\r\\n container.appendChild(c);\\r\\n }\\r\\n }\\r\\n res.renderfix = function () {};\\r\\n return res;\\r\\n };\\r\\n R.prototype.clear = function () {\\r\\n R.eve(\\\"raphael.clear\\\", this);\\r\\n this.canvas.innerHTML = E;\\r\\n this.span = R._g.doc.createElement(\\\"span\\\");\\r\\n this.span.style.cssText = \\\"position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;\\\";\\r\\n this.canvas.appendChild(this.span);\\r\\n this.bottom = this.top = null;\\r\\n };\\r\\n R.prototype.remove = function () {\\r\\n R.eve(\\\"raphael.remove\\\", this);\\r\\n this.canvas.parentNode.removeChild(this.canvas);\\r\\n for (var i in this) {\\r\\n this[i] = typeof this[i] == \\\"function\\\" ? R._removedFactory(i) : null;\\r\\n }\\r\\n return true;\\r\\n };\\r\\n\\r\\n var setproto = R.st;\\r\\n for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {\\r\\n setproto[method] = (function (methodname) {\\r\\n return function () {\\r\\n var arg = arguments;\\r\\n return this.forEach(function (el) {\\r\\n el[methodname].apply(el, arg);\\r\\n });\\r\\n };\\r\\n })(method);\\r\\n }\\r\\n}));\\r\\n\\r\\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Raphaël @VERSION - JavaScript Vector Library │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\\\\\\r\\n// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\\\\\\r\\n// └────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n(function (glob, factory) {\\r\\n if (typeof define === \\\"function\\\" && define.amd) {\\r\\n define(\\\"raphael\\\", [\\\"raphael.core\\\", \\\"raphael.svg\\\", \\\"raphael.vml\\\"], function(Raphael) {\\r\\n return (glob.Raphael = factory(Raphael));\\r\\n });\\r\\n } else if (typeof exports === \\\"object\\\") {\\r\\n var raphael = require(\\\"raphael.core\\\");\\r\\n\\r\\n require(\\\"raphael.svg\\\");\\r\\n require(\\\"raphael.vml\\\");\\r\\n\\r\\n module.exports = factory(raphael);\\r\\n } else {\\r\\n glob.Raphael = factory(glob.Raphael);\\r\\n }\\r\\n}(this, function (Raphael) {\\r\\n return Raphael.ninja();\\r\\n}));\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n/**\\r\\n * FRaphael\\r\\n * \\tAn extension for Raphael.js to make it easier to work with Filter Effects\\r\\n *\\r\\n * Copyright © 2013 Chris Scott <chris.scott@factmint.com>\\r\\n * Delivered with and licensed under the MIT licence\\r\\n *\\r\\n */\\r\\n\\r\\n// Create the global FRaphael object\\r\\n(function(scope) {\\r\\n var\\tversion = \\\"0.0.1\\\",\\r\\n license = \\\"MIT\\\";\\r\\n\\r\\n var\\tns = \\\"http://www.w3.org/2000/svg\\\",\\r\\n idCounter = 0;\\r\\n\\r\\n var FR = {\\r\\n // Object prototype for a filter\\r\\n Filter: function(id) {\\r\\n if (id == undefined) {\\r\\n id = \\\"filter-\\\" + idCounter++;\\r\\n while(FR.filters[id] != undefined) {\\r\\n id = \\\"filter-\\\" + idCounter++;\\r\\n }\\r\\n }\\r\\n\\r\\n if (FR.filters[id] != undefined) {\\r\\n throw \\\"A filter with id \\\" + id + \\\" already exists\\\";\\r\\n }\\r\\n\\r\\n this.element = document.createElementNS(ns, \\\"filter\\\");\\r\\n this.element.setAttribute(\\\"id\\\", id);\\r\\n this.element.setAttribute(\\\"x\\\", \\\"-25%\\\");\\r\\n this.element.setAttribute(\\\"y\\\", \\\"-25%\\\");\\r\\n this.element.setAttribute(\\\"width\\\", \\\"150%\\\");\\r\\n this.element.setAttribute(\\\"height\\\", \\\"150%\\\");\\r\\n\\r\\n this.lastFEResult = null;\\r\\n\\r\\n FR.filters[id] = this;\\r\\n this.id = id;\\r\\n },\\r\\n\\r\\n // Object prototype for an effect\\r\\n FilterEffect: function(type, attributes) {\\r\\n this.element = document.createElementNS(ns, type);\\r\\n for (var key in attributes) {\\r\\n this.element.setAttribute(key, attributes[key]);\\r\\n }\\r\\n },\\r\\n\\r\\n // Return the filter applied to an element or a new filter if none are currently applied\\r\\n getFilter: function(element) {\\r\\n var filterId = element.data(\\\"filterId\\\");\\r\\n var filter = null;\\r\\n\\r\\n if (filterId == undefined) {\\r\\n filterId = \\\"element-filter-\\\" + element.id;\\r\\n filter = element.paper.createFilter(filterId);\\r\\n element.filter(filterId);\\r\\n } else {\\r\\n filter = FR.filters[filterId];\\r\\n }\\r\\n\\r\\n return filter;\\r\\n },\\r\\n\\r\\n // maintain a list of filters by id\\r\\n filters: {}\\r\\n };\\r\\n\\r\\n FR.Filter.prototype = {\\r\\n addEffect: function(type, attributes, children) {\\r\\n var effect = new FR.FilterEffect(type, attributes);\\r\\n\\r\\n if (children) {\\r\\n if (children instanceof Array) {\\r\\n for (var x in children) {\\r\\n if (!children.hasOwnProperty(x)) continue;\\r\\n\\r\\n effect.element.appendChild(children[x].element);\\r\\n }\\r\\n } else {\\r\\n effect.element.appendChild(children.element);\\r\\n }\\r\\n }\\r\\n\\r\\n this.element.appendChild(effect.element);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n chainEffect: function(type, attributes, children) {\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n var inId;\\r\\n var outId;\\r\\n if (attributes.in == undefined) {\\r\\n inId = this.getLastResult();\\r\\n } else {\\r\\n inId = attributes.in;\\r\\n }\\r\\n if (attributes.result == undefined) {\\r\\n outId = idCounter++;\\r\\n } else {\\r\\n outId = attributes.result;\\r\\n }\\r\\n\\r\\n this.lastFEResult = outId;\\r\\n\\r\\n attributes.in = inId;\\r\\n attributes.result = outId;\\r\\n\\r\\n this.addEffect(type, attributes, children);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n getLastResult: function() {\\r\\n return (this.lastFEResult == undefined) ? \\\"SourceGraphic\\\" : this.lastFEResult;\\r\\n },\\r\\n\\r\\n merge: function(in1, in2, attributes) {\\r\\n var mergeNode1 = new FR.FilterEffect(\\\"feMergeNode\\\", {\\r\\n in: in1\\r\\n });\\r\\n var mergeNode2 = new FR.FilterEffect(\\\"feMergeNode\\\", {\\r\\n in: in2\\r\\n });\\r\\n\\r\\n this.chainEffect(\\\"feMerge\\\", attributes, [mergeNode1, mergeNode2]);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n compose: function(in1, in2, operator, attributes) {\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n if (operator == undefined) {\\r\\n operator = \\\"over\\\";\\r\\n }\\r\\n\\r\\n attributes.in = in1;\\r\\n attributes.in2 = in2;\\r\\n attributes.operator = operator;\\r\\n\\r\\n this.chainEffect(\\\"feComposite\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n arithmeticCompose: function(in1, in2, k1, k2, k3, k4) {\\r\\n if (k1 == undefined) {\\r\\n k1 = 0;\\r\\n }\\r\\n if (k2 == undefined) {\\r\\n k2 = 0;\\r\\n }\\r\\n if (k3 == undefined) {\\r\\n k3 = 0;\\r\\n }\\r\\n if (k4 == undefined) {\\r\\n k4 = 0;\\r\\n }\\r\\n\\r\\n this.compose(in1, in2, \\\"arithmetic\\\", {\\r\\n k1: k1,\\r\\n k2: k2,\\r\\n k3: k3,\\r\\n k4: k4\\r\\n });\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addBlur: function(stdDeviation, attributes) {\\r\\n if (!stdDeviation) {\\r\\n throw \\\"Standard deviation is required to perform a blur filter\\\";\\r\\n }\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n attributes.stdDeviation = stdDeviation;\\r\\n\\r\\n this.chainEffect(\\\"feGaussianBlur\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addOffset: function(dx, dy, attributes) {\\r\\n if (dx == undefined | dy == undefined) {\\r\\n throw \\\"dx and dy values are required to perform an offset FE\\\";\\r\\n }\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n attributes.dx = dx;\\r\\n attributes.dy = dy;\\r\\n\\r\\n this.chainEffect(\\\"feOffset\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addLighting: function(x, y, z, color, type, attributes) {\\r\\n if (x == undefined | y == undefined | z == undefined) {\\r\\n throw \\\"Three co-ordinates are required to create a light source\\\";\\r\\n }\\r\\n\\r\\n var previousResult = this.getLastResult();\\r\\n\\r\\n var id = idCounter++;\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n attributes.result = id;\\r\\n if (color != undefined) {\\r\\n attributes[\\\"lighting-color\\\"] = color;\\r\\n }\\r\\n\\r\\n if (type == undefined || type == \\\"diffuse\\\") {\\r\\n type = \\\"feDiffuseLighting\\\";\\r\\n } else if (type == \\\"specular\\\") {\\r\\n type = \\\"feSpecularLighting\\\";\\r\\n }\\r\\n\\r\\n var lightSource = new FR.FilterEffect(\\\"fePointLight\\\", {\\r\\n x: x,\\r\\n y: y,\\r\\n z: z\\r\\n });\\r\\n\\r\\n this.chainEffect(type, attributes, lightSource).arithmeticCompose(previousResult, id, 3, 0.2, 0, 0);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addShiftToColor: function(color, moveBy, attributes) {\\r\\n if (color == undefined) {\\r\\n throw \\\"A colour string is a required argument to create a colorMatrix\\\";\\r\\n }\\r\\n if (moveBy == undefined) {\\r\\n moveBy = 0.5;\\r\\n }\\r\\n\\r\\n var remainingColor = 1 - moveBy, x = remainingColor;\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n var colorObject = Raphael.color(color);\\r\\n var\\tr = colorObject.r * moveBy / 255,\\r\\n g = colorObject.g * moveBy / 255,\\r\\n b = colorObject.b * moveBy / 255;\\r\\n\\r\\n /**\\r\\n * r'\\tx 0 0 0 r\\t\\tr\\r\\n * g'\\t0 x 0 0 g\\t\\tg\\r\\n * b' =\\t0 0 x 0 b\\t.\\tb\\r\\n * a'\\t0 0 0 1 0\\t\\to\\r\\n * 1\\t\\t\\t\\t\\t1\\r\\n */\\r\\n attributes.values = x + \\\" 0 0 0 \\\" + r + \\\" 0 \\\" + x + \\\" 0 0 \\\" + g + \\\" 0 0 \\\" + x + \\\" 0 \\\" + b + \\\" 0 0 0 1 0 \\\";\\r\\n\\r\\n this.chainEffect(\\\"feColorMatrix\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addRecolor: function(color, opacity, attributes) {\\r\\n if (color == undefined) {\\r\\n throw \\\"A colour string is a required argument to create a colorMatrix\\\";\\r\\n }\\r\\n if (opacity == undefined) {\\r\\n opacity = 1;\\r\\n }\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n var colorObject = Raphael.color(color);\\r\\n var\\tr = colorObject.r / 255,\\r\\n g = colorObject.g / 255,\\r\\n b = colorObject.b / 255;\\r\\n\\r\\n /**\\r\\n * r'\\t0 0 0 0 r\\t\\tr\\r\\n * g'\\t0 0 0 0 g\\t\\tg\\r\\n * b' =\\t0 0 0 0 b\\t.\\tb\\r\\n * a'\\t0 0 0 a 0\\t\\ta\\r\\n * 1\\t\\t\\t\\t\\t1\\r\\n */\\r\\n attributes.values = \\\"0 0 0 0 \\\" + r + \\\" 0 0 0 0 \\\" + g + \\\" 0 0 0 0 \\\" + b + \\\" 0 0 0 \\\" + opacity + \\\" 0 \\\";\\r\\n\\r\\n this.chainEffect(\\\"feColorMatrix\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addDesaturate: function(saturation, attributes) {\\r\\n if (saturation == undefined) {\\r\\n saturnation = 0;\\r\\n }\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n attributes.values = saturation;\\r\\n attributes.type = \\\"saturate\\\";\\r\\n\\r\\n this.chainEffect(\\\"feColorMatrix\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addConvolveMatrix: function(matrix, attributes) {\\r\\n if (matrix == undefined) {\\r\\n throw \\\"A matrix (usually 9 numbers) must be provided to apply a convolve matrix transform\\\";\\r\\n }\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n attributes.kernelMatrix = matrix;\\r\\n\\r\\n this.chainEffect(\\\"feConvolveMatrix\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n createShadow: function(dx, dy, blur, opacity, color) {\\r\\n if (dx == undefined) {\\r\\n throw \\\"dx is required for the shadow effect\\\";\\r\\n }\\r\\n if (dy == undefined) {\\r\\n throw \\\"dy is required for the shadow effect\\\";\\r\\n }\\r\\n if (blur == undefined) {\\r\\n throw \\\"blur (stdDeviation) is required for the shadow effect\\\";\\r\\n }\\r\\n\\r\\n if (opacity == undefined) {\\r\\n opacity = 0.6;\\r\\n }\\r\\n\\r\\n var previousResult = this.getLastResult();\\r\\n\\r\\n if (color == undefined) {\\r\\n color = \\\"#000000\\\";\\r\\n }\\r\\n\\r\\n this.addOffset(dx, dy, {\\r\\n in: \\\"SourceAlpha\\\"\\r\\n });\\r\\n\\r\\n this.addRecolor(color, opacity);\\r\\n\\r\\n this.addBlur(blur);\\r\\n\\r\\n this.merge(this.getLastResult(), previousResult);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n createEmboss: function(height, x, y, z) {\\r\\n if (height == undefined) {\\r\\n height = 2;\\r\\n }\\r\\n if (x == undefined) {\\r\\n x = -1000;\\r\\n }\\r\\n if (y == undefined) {\\r\\n y = -5000;\\r\\n }\\r\\n if (z == undefined) {\\r\\n z = 300;\\r\\n }\\r\\n\\r\\n // Create the highlight\\r\\n\\r\\n this.addOffset(height * x / (x + y), height * y / (x + y), {\\r\\n in: \\\"SourceAlpha\\\"\\r\\n });\\r\\n\\r\\n this.addBlur(height * 0.5);\\r\\n\\r\\n var whiteLightSource = new FR.FilterEffect(\\\"fePointLight\\\", {\\r\\n x: x,\\r\\n y: y,\\r\\n z: z\\r\\n });\\r\\n\\r\\n this.chainEffect(\\\"feSpecularLighting\\\", {\\r\\n surfaceScale: height,\\r\\n specularConstant: 0.8,\\r\\n specularExponent: 15\\r\\n }, whiteLightSource);\\r\\n\\r\\n this.compose(this.getLastResult(), \\\"SourceAlpha\\\", \\\"in\\\");\\r\\n var whiteLight = this.getLastResult();\\r\\n\\r\\n // Create the lowlight\\r\\n\\r\\n this.addOffset(height * -1 * x / (x + y), height * -1 * y / (x + y), {\\r\\n in: \\\"SourceAlpha\\\"\\r\\n });\\r\\n\\r\\n this.addBlur(height * 0.5);\\r\\n\\r\\n var darkLightSource = new FR.FilterEffect(\\\"fePointLight\\\", {\\r\\n x: -1 * x,\\r\\n y: -1 * y,\\r\\n z: z\\r\\n });\\r\\n\\r\\n this.chainEffect(\\\"feSpecularLighting\\\", {\\r\\n surfaceScale: height,\\r\\n specularConstant: 1.8,\\r\\n specularExponent: 6\\r\\n }, darkLightSource);\\r\\n\\r\\n this.compose(this.getLastResult(), \\\"SourceAlpha\\\", \\\"in\\\");\\r\\n this.chainEffect(\\\"feColorMatrix\\\", {\\r\\n values: \\\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0\\\"\\r\\n });\\r\\n var darkLight = this.getLastResult();\\r\\n\\r\\n this.arithmeticCompose(whiteLight, darkLight, 0, 0.8, 0.5, 0);\\r\\n\\r\\n this.merge(\\\"SourceGraphic\\\", this.getLastResult());\\r\\n\\r\\n return this;\\r\\n }\\r\\n };\\r\\n\\r\\n scope.FRaphael = FR;\\r\\n})(this);\\r\\n\\r\\n/**\\r\\n * add a filter to the paper by id\\r\\n */\\r\\nRaphael.fn.createFilter = function(id) {\\r\\n var paper = this;\\r\\n var filter = new FRaphael.Filter(id);\\r\\n paper.defs.appendChild(filter.element);\\r\\n\\r\\n return filter;\\r\\n};\\r\\n\\r\\n/**\\r\\n * Apply a filter to an element by id\\r\\n */\\r\\nRaphael.el.filter = function(filter) {\\r\\n var id = (filter instanceof FRaphael.Filter) ? filter.id : filter;\\r\\n\\r\\n this.node.setAttribute(\\\"filter\\\", \\\"url(#\\\" + id + \\\")\\\");\\r\\n this.data(\\\"filterId\\\", id);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * Get the current filter for an element or a new one if not\\r\\n */\\r\\nRaphael.el.getFilter = function() {\\r\\n return FRaphael.getFilter(this);\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for applying blur\\r\\n */\\r\\nRaphael.el.blur = function(stdDeviation) {\\r\\n if (stdDeviation == undefined) {\\r\\n stdDeviation = 3;\\r\\n }\\r\\n\\r\\n this.getFilter().addBlur(stdDeviation);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for applying a drop shadow\\r\\n */\\r\\nRaphael.el.shadow = function(dx, dy, blur, opacity, color) {\\r\\n if (dx == undefined) {\\r\\n dx = 3;\\r\\n }\\r\\n if (dy == undefined) {\\r\\n dy = 3;\\r\\n }\\r\\n if (blur == undefined) {\\r\\n blur = 3;\\r\\n }\\r\\n\\r\\n this.getFilter().createShadow(dx, dy, blur, opacity, color);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for applying lighting\\r\\n */\\r\\nRaphael.el.light = function(x, y, z, color, type) {\\r\\n if (x == undefined) {\\r\\n x = this.paper.width;\\r\\n }\\r\\n if (y == undefined) {\\r\\n y = 0;\\r\\n }\\r\\n if (z == undefined) {\\r\\n z = 20;\\r\\n }\\r\\n\\r\\n this.getFilter().addLighting(x, y, z, color, type);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for applying a colour shift\\r\\n */\\r\\nRaphael.el.colorShift = function(color, shift) {\\r\\n if (color == undefined) {\\r\\n color = \\\"black\\\";\\r\\n }\\r\\n if (shift == undefined) {\\r\\n shift = 0.5;\\r\\n }\\r\\n\\r\\n this.getFilter().addShiftToColor(color, shift);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for embossing\\r\\n */\\r\\nRaphael.el.emboss = function(height) {\\r\\n this.getFilter().createEmboss(height);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for desaturating\\r\\n */\\r\\nRaphael.el.desaturate = function(saturation) {\\r\\n this.getFilter().addDesaturate(saturation);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for complete desaturation\\r\\n */\\r\\nRaphael.el.greyScale = function() {\\r\\n this.getFilter().addDesaturate(0);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\"","/*\n\tBased on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>\n\thttp://www.phpied.com/rgb-color-parser-in-javascript/\n*/\n\nmodule.exports = function(color_string) {\n this.ok = false;\n this.alpha = 1.0;\n\n // strip any leading #\n if (color_string.charAt(0) == '#') { // remove # if any\n color_string = color_string.substr(1,6);\n }\n\n color_string = color_string.replace(/ /g,'');\n color_string = color_string.toLowerCase();\n\n // before getting into regexps, try simple matches\n // and overwrite the input\n var simple_colors = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dodgerblue: '1e90ff',\n feldspar: 'd19275',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred : 'cd5c5c',\n indigo : '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgrey: 'd3d3d3',\n lightgreen: '90ee90',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslateblue: '8470ff',\n lightslategray: '778899',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '00ff00',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'ff00ff',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370d8',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'd87093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '663399',\n red: 'ff0000',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n violetred: 'd02090',\n wheat: 'f5deb3',\n white: 'ffffff',\n whitesmoke: 'f5f5f5',\n yellow: 'ffff00',\n yellowgreen: '9acd32'\n };\n color_string = simple_colors[color_string] || color_string;\n // emd of simple type-in colors\n\n // array of color definition objects\n var color_defs = [\n {\n re: /^rgba\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*((?:\\d?\\.)?\\d)\\)$/,\n example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3]),\n parseFloat(bits[4])\n ];\n }\n },\n {\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3])\n ];\n }\n },\n {\n re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n example: ['#00ff00', '336699'],\n process: function (bits){\n return [\n parseInt(bits[1], 16),\n parseInt(bits[2], 16),\n parseInt(bits[3], 16)\n ];\n }\n },\n {\n re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n example: ['#fb0', 'f0f'],\n process: function (bits){\n return [\n parseInt(bits[1] + bits[1], 16),\n parseInt(bits[2] + bits[2], 16),\n parseInt(bits[3] + bits[3], 16)\n ];\n }\n }\n ];\n\n // search through the definitions to find a match\n for (var i = 0; i < color_defs.length; i++) {\n var re = color_defs[i].re;\n var processor = color_defs[i].process;\n var bits = re.exec(color_string);\n if (bits) {\n var channels = processor(bits);\n this.r = channels[0];\n this.g = channels[1];\n this.b = channels[2];\n if (channels.length > 3) {\n this.alpha = channels[3];\n }\n this.ok = true;\n }\n\n }\n\n // validate/cleanup values\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\n this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);\n\n // some getters\n this.toRGB = function () {\n return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';\n }\n this.toRGBA = function () {\n return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';\n }\n this.toHex = function () {\n var r = this.r.toString(16);\n var g = this.g.toString(16);\n var b = this.b.toString(16);\n if (r.length == 1) r = '0' + r;\n if (g.length == 1) g = '0' + g;\n if (b.length == 1) b = '0' + b;\n return '#' + r + g + b;\n }\n\n // help\n this.getHelpXML = function () {\n\n var examples = new Array();\n // add regexps\n for (var i = 0; i < color_defs.length; i++) {\n var example = color_defs[i].example;\n for (var j = 0; j < example.length; j++) {\n examples[examples.length] = example[j];\n }\n }\n // add type-in colors\n for (var sc in simple_colors) {\n examples[examples.length] = sc;\n }\n\n var xml = document.createElement('ul');\n xml.setAttribute('id', 'rgbcolor-examples');\n for (var i = 0; i < examples.length; i++) {\n try {\n var list_item = document.createElement('li');\n var list_color = new RGBColor(examples[i]);\n var example_div = document.createElement('div');\n example_div.style.cssText =\n 'margin: 3px; '\n + 'border: 1px solid black; '\n + 'background:' + list_color.toHex() + '; '\n + 'color:' + list_color.toHex()\n ;\n example_div.appendChild(document.createTextNode('test'));\n var list_item_value = document.createTextNode(\n ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()\n );\n list_item.appendChild(example_div);\n list_item.appendChild(list_item_value);\n xml.appendChild(list_item);\n\n } catch(e){}\n }\n return xml;\n\n }\n\n}\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\n","/*! For license information please see shifty.js.LICENSE.txt */\n!function(t,n){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=n():\"function\"==typeof define&&define.amd?define(\"shifty\",[],n):\"object\"==typeof exports?exports.shifty=n():t.shifty=n()}(self,(function(){return function(){\"use strict\";var t={720:function(t,n,e){e.r(n),e.d(n,{Scene:function(){return sn},Tweenable:function(){return kt},interpolate:function(){return nn},processTweens:function(){return dt},setBezierFunction:function(){return $},shouldScheduleUpdate:function(){return bt},tween:function(){return Pt},unsetBezierFunction:function(){return L}});var r={};e.r(r),e.d(r,{bounce:function(){return D},bouncePast:function(){return q},easeFrom:function(){return B},easeFromTo:function(){return Q},easeInBack:function(){return A},easeInCirc:function(){return j},easeInCubic:function(){return c},easeInExpo:function(){return w},easeInOutBack:function(){return T},easeInOutCirc:function(){return P},easeInOutCubic:function(){return l},easeInOutExpo:function(){return S},easeInOutQuad:function(){return s},easeInOutQuart:function(){return v},easeInOutQuint:function(){return d},easeInOutSine:function(){return b},easeInQuad:function(){return u},easeInQuart:function(){return h},easeInQuint:function(){return y},easeInSine:function(){return m},easeOutBack:function(){return E},easeOutBounce:function(){return M},easeOutCirc:function(){return k},easeOutCubic:function(){return f},easeOutExpo:function(){return O},easeOutQuad:function(){return a},easeOutQuart:function(){return p},easeOutQuint:function(){return _},easeOutSine:function(){return g},easeTo:function(){return N},elastic:function(){return I},linear:function(){return o},swingFrom:function(){return x},swingFromTo:function(){return F},swingTo:function(){return C}});var i={};e.r(i),e.d(i,{afterTween:function(){return Jt},beforeTween:function(){return Ht},doesApply:function(){return Wt},tweenCreated:function(){return Gt}});var o=function(t){return t},u=function(t){return Math.pow(t,2)},a=function(t){return-(Math.pow(t-1,2)-1)},s=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},c=function(t){return Math.pow(t,3)},f=function(t){return Math.pow(t-1,3)+1},l=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},h=function(t){return Math.pow(t,4)},p=function(t){return-(Math.pow(t-1,4)-1)},v=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},y=function(t){return Math.pow(t,5)},_=function(t){return Math.pow(t-1,5)+1},d=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},m=function(t){return 1-Math.cos(t*(Math.PI/2))},g=function(t){return Math.sin(t*(Math.PI/2))},b=function(t){return-.5*(Math.cos(Math.PI*t)-1)},w=function(t){return 0===t?0:Math.pow(2,10*(t-1))},O=function(t){return 1===t?1:1-Math.pow(2,-10*t)},S=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},j=function(t){return-(Math.sqrt(1-t*t)-1)},k=function(t){return Math.sqrt(1-Math.pow(t-1,2))},P=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},M=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},A=function(t){var n=1.70158;return t*t*((n+1)*t-n)},E=function(t){var n=1.70158;return(t-=1)*t*((n+1)*t+n)+1},T=function(t){var n=1.70158;return(t/=.5)<1?t*t*((1+(n*=1.525))*t-n)*.5:.5*((t-=2)*t*((1+(n*=1.525))*t+n)+2)},I=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},F=function(t){var n=1.70158;return(t/=.5)<1?t*t*((1+(n*=1.525))*t-n)*.5:.5*((t-=2)*t*((1+(n*=1.525))*t+n)+2)},x=function(t){var n=1.70158;return t*t*((n+1)*t-n)},C=function(t){var n=1.70158;return(t-=1)*t*((n+1)*t+n)+1},D=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},q=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},Q=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},B=function(t){return Math.pow(t,4)},N=function(t){return Math.pow(t,.25)};function R(t,n,e,r,i,o){var u,a,s,c=0,f=0,l=0,h=function(t){return((c*t+f)*t+l)*t},p=function(t){return(3*c*t+2*f)*t+l},v=function(t){return t>=0?t:0-t};return c=1-(l=3*n)-(f=3*(r-n)-l),u=1-(s=3*e)-(a=3*(i-e)-s),function(t){return((u*t+a)*t+s)*t}(function(t,n){var e,r,i,o,u,a;for(i=t,a=0;a<8;a++){if(o=h(i)-t,v(o)<n)return i;if(u=p(i),v(u)<1e-6)break;i-=o/u}if((i=t)<(e=0))return e;if(i>(r=1))return r;for(;e<r;){if(o=h(i),v(o-t)<n)return i;t>o?e=i:r=i,i=.5*(r-e)+e}return i}(t,function(t){return 1/(200*t)}(o)))}var z,U=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.25,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.25,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.75,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.75;return function(i){return R(i,t,n,e,r,1)}},$=function(t,n,e,r,i){var o=U(n,e,r,i);return o.displayName=t,o.x1=n,o.y1=e,o.x2=r,o.y2=i,kt.formulas[t]=o},L=function(t){return delete kt.formulas[t]};function V(t,n){if(!(t instanceof n))throw new TypeError(\"Cannot call a class as a function\")}function W(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function G(t){return(G=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t})(t)}function H(t){return function(t){if(Array.isArray(t))return J(t)}(t)||function(t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if(\"string\"==typeof t)return J(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===e&&t.constructor&&(e=t.constructor.name),\"Map\"===e||\"Set\"===e?Array.from(t):\"Arguments\"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?J(t,n):void 0}}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}()}function J(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function K(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function X(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?K(Object(e),!0).forEach((function(n){Y(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):K(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function Y(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var Z,tt,nt,et=\"linear\",rt=\"undefined\"!=typeof window?window:e.g,it=\"afterTween\",ot=\"afterTweenEnd\",ut=\"beforeTween\",at=\"tweenCreated\",st=\"function\",ct=\"string\",ft=rt.requestAnimationFrame||rt.webkitRequestAnimationFrame||rt.oRequestAnimationFrame||rt.msRequestAnimationFrame||rt.mozCancelRequestAnimationFrame&&rt.mozRequestAnimationFrame||setTimeout,lt=function(){},ht=null,pt=null,vt=X({},r),yt=function(t,n,e,r,i,o,u){var a,s,c,f=t<o?0:(t-o)/i,l=!1;for(var h in u&&u.call&&(l=!0,a=u(f)),n)l||(a=((s=u[h]).call?s:vt[s])(f)),c=e[h],n[h]=c+(r[h]-c)*a;return n},_t=function(t,n){var e=t._timestamp,r=t._currentState,i=t._delay;if(!(n<e+i)){var o=t._duration,u=t._targetState,a=e+i+o,s=n>a?a:n;t._hasEnded=s>=a;var c=o-(a-s),f=t._filters.length>0;if(t._hasEnded)return t._render(u,t._data,c),t.stop(!0);f&&t._applyFilter(ut),s<e+i?e=o=s=1:e+=i,yt(s,r,t._originalState,u,o,e,t._easing),f&&t._applyFilter(it),t._render(r,t._data,c)}},dt=function(){for(var t,n=kt.now(),e=ht;e;)t=e._next,_t(e,n),e=t},mt=Date.now||function(){return+new Date},gt=!1,bt=function(t){t&>||(gt=t,t&&wt())},wt=function t(){Z=mt(),gt&&ft.call(rt,t,16.666666666666668),dt()},Ot=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:et,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Array.isArray(n)){var r=U.apply(void 0,H(n));return r}var i=G(n);if(vt[n])return vt[n];if(i===ct||i===st)for(var o in t)e[o]=n;else for(var u in t)e[u]=n[u]||et;return e},St=function(t){t===ht?(ht=t._next)?ht._previous=null:pt=null:t===pt?(pt=t._previous)?pt._next=null:ht=null:(tt=t._previous,nt=t._next,tt._next=nt,nt._previous=tt),t._previous=t._next=null},jt=\"function\"==typeof Promise?Promise:null;z=Symbol.toStringTag;var kt=function(){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;V(this,t),Y(this,z,\"Promise\"),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._currentState=n||{},this._originalState={},this._targetState={},this._start=lt,this._render=lt,this._promiseCtor=jt,e&&this.setConfig(e)}var n,e;return n=t,(e=[{key:\"_applyFilter\",value:function(t){for(var n=this._filters.length;n>0;n--){var e=this._filters[n-n][t];e&&e(this)}}},{key:\"tween\",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!n&&this._config||this.setConfig(n),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:\"setConfig\",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this._config;for(var r in n)e[r]=n[r];var i=e.promise,o=void 0===i?this._promiseCtor:i,u=e.start,a=void 0===u?lt:u,s=e.finish,c=e.render,f=void 0===c?this._config.step||lt:c,l=e.step,h=void 0===l?lt:l;this._data=e.data||e.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=n.delay||0,this._start=a,this._render=f||h,this._duration=e.duration||500,this._promiseCtor=o,s&&(this._resolve=s);var p=n.from,v=n.to,y=void 0===v?{}:v,_=this._currentState,d=this._originalState,m=this._targetState;for(var g in p)_[g]=p[g];var b=!1;for(var w in _){var O=_[w];b||G(O)!==ct||(b=!0),d[w]=O,m[w]=y.hasOwnProperty(w)?y[w]:O}if(this._easing=Ot(this._currentState,e.easing,this._easing),this._filters.length=0,b){for(var S in t.filters)t.filters[S].doesApply(this)&&this._filters.push(t.filters[S]);this._applyFilter(at)}return this}},{key:\"then\",value:function(t,n){var e=this;return this._promise=new this._promiseCtor((function(t,n){e._resolve=t,e._reject=n})),this._promise.then(t,n)}},{key:\"catch\",value:function(t){return this.then().catch(t)}},{key:\"finally\",value:function(t){return this.then().finally(t)}},{key:\"get\",value:function(){return X({},this._currentState)}},{key:\"set\",value:function(t){this._currentState=t}},{key:\"pause\",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,St(this),this}},{key:\"resume\",value:function(){return this._resume()}},{key:\"_resume\",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=n-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ht?(ht=this,pt=this):(this._previous=pt,pt._next=this,pt=this),this)}},{key:\"seek\",value:function(n){n=Math.max(n,0);var e=t.now();return this._timestamp+n===0||(this._timestamp=e-n,_t(this,e)),this}},{key:\"stop\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,St(this);var n=this._filters.length>0;return t&&(n&&this._applyFilter(ut),yt(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),n&&(this._applyFilter(it),this._applyFilter(ot))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:\"cancel\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this._currentState,e=this._data,r=this._isPlaying;return r?(this._reject&&this._reject({data:e,state:n,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:\"isPlaying\",value:function(){return this._isPlaying}},{key:\"hasEnded\",value:function(){return this._hasEnded}},{key:\"setScheduleFunction\",value:function(n){t.setScheduleFunction(n)}},{key:\"data\",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=X({},t)),this._data}},{key:\"dispose\",value:function(){for(var t in this)delete this[t]}}])&&W(n.prototype,e),t}();function Pt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=new kt;return n.tween(t),n.tweenable=n,n}Y(kt,\"now\",(function(){return Z})),Y(kt,\"setScheduleFunction\",(function(t){return ft=t})),Y(kt,\"filters\",{}),Y(kt,\"formulas\",vt),bt(!0);var Mt,At,Et=/(\\d|-|\\.)/,Tt=/([^\\-0-9.]+)/g,It=/[0-9.-]+/g,Ft=(Mt=It.source,At=/,\\s*/.source,new RegExp(\"rgba?\\\\(\".concat(Mt).concat(At).concat(Mt).concat(At).concat(Mt,\"(\").concat(At).concat(Mt,\")?\\\\)\"),\"g\")),xt=/^.*\\(/,Ct=/#([0-9]|[a-f]){3,6}/gi,Dt=\"VAL\",qt=function(t,n){return t.map((function(t,e){return\"_\".concat(n,\"_\").concat(e)}))};function Qt(t){return parseInt(t,16)}var Bt=function(t){return\"rgb(\".concat((n=t,3===(n=n.replace(/#/,\"\")).length&&(n=(n=n.split(\"\"))[0]+n[0]+n[1]+n[1]+n[2]+n[2]),[Qt(n.substr(0,2)),Qt(n.substr(2,2)),Qt(n.substr(4,2))]).join(\",\"),\")\");var n},Nt=function(t,n,e){var r=n.match(t),i=n.replace(t,Dt);return r&&r.forEach((function(t){return i=i.replace(Dt,e(t))})),i},Rt=function(t){for(var n in t){var e=t[n];\"string\"==typeof e&&e.match(Ct)&&(t[n]=Nt(Ct,e,Bt))}},zt=function(t){var n=t.match(It),e=n.slice(0,3).map(Math.floor),r=t.match(xt)[0];if(3===n.length)return\"\".concat(r).concat(e.join(\",\"),\")\");if(4===n.length)return\"\".concat(r).concat(e.join(\",\"),\",\").concat(n[3],\")\");throw new Error(\"Invalid rgbChunk: \".concat(t))},Ut=function(t){return t.match(It)},$t=function(t,n){var e={};return n.forEach((function(n){e[n]=t[n],delete t[n]})),e},Lt=function(t,n){return n.map((function(n){return t[n]}))},Vt=function(t,n){return n.forEach((function(n){return t=t.replace(Dt,+n.toFixed(4))})),t},Wt=function(t){for(var n in t._currentState)if(\"string\"==typeof t._currentState[n])return!0;return!1};function Gt(t){var n=t._currentState;[n,t._originalState,t._targetState].forEach(Rt),t._tokenData=function(t){var n,e,r={};for(var i in t){var o=t[i];\"string\"==typeof o&&(r[i]={formatString:(n=o,e=void 0,e=n.match(Tt),e?(1===e.length||n.charAt(0).match(Et))&&e.unshift(\"\"):e=[\"\",\"\"],e.join(Dt)),chunkNames:qt(Ut(o),i)})}return r}(n)}function Ht(t){var n=t._currentState,e=t._originalState,r=t._targetState,i=t._easing,o=t._tokenData;!function(t,n){var e=function(e){var r=n[e].chunkNames,i=t[e];if(\"string\"==typeof i){var o=i.split(\" \"),u=o[o.length-1];r.forEach((function(n,e){return t[n]=o[e]||u}))}else r.forEach((function(n){return t[n]=i}));delete t[e]};for(var r in n)e(r)}(i,o),[n,e,r].forEach((function(t){return function(t,n){var e=function(e){Ut(t[e]).forEach((function(r,i){return t[n[e].chunkNames[i]]=+r})),delete t[e]};for(var r in n)e(r)}(t,o)}))}function Jt(t){var n=t._currentState,e=t._originalState,r=t._targetState,i=t._easing,o=t._tokenData;[n,e,r].forEach((function(t){return function(t,n){for(var e in n){var r=n[e],i=r.chunkNames,o=r.formatString,u=Vt(o,Lt($t(t,i),i));t[e]=Nt(Ft,u,zt)}}(t,o)})),function(t,n){for(var e in n){var r=n[e].chunkNames,i=t[r[0]];t[e]=\"string\"==typeof i?r.map((function(n){var e=t[n];return delete t[n],e})).join(\" \"):i}}(i,o)}function Kt(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,r)}return e}function Xt(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?Kt(Object(e),!0).forEach((function(n){Yt(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Kt(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function Yt(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var Zt=new kt,tn=kt.filters,nn=function(t,n,e,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=Xt({},t),u=Ot(t,r);for(var a in Zt._filters.length=0,Zt.set({}),Zt._currentState=o,Zt._originalState=t,Zt._targetState=n,Zt._easing=u,tn)tn[a].doesApply(Zt)&&Zt._filters.push(tn[a]);Zt._applyFilter(\"tweenCreated\"),Zt._applyFilter(\"beforeTween\");var s=yt(e,o,t,n,1,i,u);return Zt._applyFilter(\"afterTween\"),s};function en(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e<n;e++)r[e]=t[e];return r}function rn(t,n){if(!(t instanceof n))throw new TypeError(\"Cannot call a class as a function\")}function on(t,n){for(var e=0;e<n.length;e++){var r=n[e];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function un(t,n){var e=n.get(t);if(!e)throw new TypeError(\"attempted to get private field on non-instance\");return e.get?e.get.call(t):e.value}var an=new WeakMap,sn=function(){function t(){rn(this,t),an.set(this,{writable:!0,value:[]});for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];e.forEach(this.add.bind(this))}var n,e;return n=t,(e=[{key:\"add\",value:function(t){return un(this,an).push(t),t}},{key:\"remove\",value:function(t){var n=un(this,an).indexOf(t);return~n&&un(this,an).splice(n,1),t}},{key:\"empty\",value:function(){return this.tweenables.map(this.remove.bind(this))}},{key:\"isPlaying\",value:function(){return un(this,an).some((function(t){return t.isPlaying()}))}},{key:\"play\",value:function(){return un(this,an).forEach((function(t){return t.tween()})),this}},{key:\"pause\",value:function(){return un(this,an).forEach((function(t){return t.pause()})),this}},{key:\"resume\",value:function(){return un(this,an).forEach((function(t){return t.resume()})),this}},{key:\"stop\",value:function(t){return un(this,an).forEach((function(n){return n.stop(t)})),this}},{key:\"tweenables\",get:function(){return function(t){if(Array.isArray(t))return en(t)}(t=un(this,an))||function(t){if(\"undefined\"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,n){if(t){if(\"string\"==typeof t)return en(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return\"Object\"===e&&t.constructor&&(e=t.constructor.name),\"Map\"===e||\"Set\"===e?Array.from(t):\"Arguments\"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?en(t,n):void 0}}(t)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}();var t}},{key:\"promises\",get:function(){return un(this,an).map((function(t){return t.then()}))}}])&&on(n.prototype,e),t}();kt.filters.token=i}},n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={exports:{}};return t[r](i,i.exports,e),i.exports}return e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(t){if(\"object\"==typeof window)return window}}(),e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.r=function(t){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(t,\"__esModule\",{value:!0})},e(720)}()}));\n//# sourceMappingURL=shifty.js.map","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\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 _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n/* eslint-disable no-bitwise -- used for calculations */\n\n/* eslint-disable unicorn/prefer-query-selector -- aiming at\n backward-compatibility */\n\n/**\n* StackBlur - a fast almost Gaussian Blur For Canvas\n*\n* In case you find this class useful - especially in commercial projects -\n* I am not totally unhappy for a small donation to my PayPal account\n* mario@quasimondo.de\n*\n* Or support me on flattr:\n* {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.\n*\n* @module StackBlur\n* @author Mario Klingemann\n* Contact: mario@quasimondo.com\n* Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}\n* Twitter: @quasimondo\n*\n* @copyright (c) 2010 Mario Klingemann\n*\n* Permission is hereby granted, free of charge, to any person\n* obtaining a copy of this software and associated documentation\n* files (the \"Software\"), to deal in the Software without\n* restriction, including without limitation the rights to use,\n* copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the\n* Software is furnished to do so, subject to the following\n* conditions:\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n* OTHER DEALINGS IN THE SOFTWARE.\n*/\nvar mulTable = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259];\nvar shgTable = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];\n/**\n * @param {string|HTMLImageElement} img\n * @param {string|HTMLCanvasElement} canvas\n * @param {Float} radius\n * @param {boolean} blurAlphaChannel\n * @param {boolean} useOffset\n * @param {boolean} skipStyles\n * @returns {undefined}\n */\n\nfunction processImage(img, canvas, radius, blurAlphaChannel, useOffset, skipStyles) {\n if (typeof img === 'string') {\n img = document.getElementById(img);\n }\n\n if (!img || Object.prototype.toString.call(img).slice(8, -1) === 'HTMLImageElement' && !('naturalWidth' in img)) {\n return;\n }\n\n var dimensionType = useOffset ? 'offset' : 'natural';\n var w = img[dimensionType + 'Width'];\n var h = img[dimensionType + 'Height']; // add ImageBitmap support,can blur texture source\n\n if (Object.prototype.toString.call(img).slice(8, -1) === 'ImageBitmap') {\n w = img.width;\n h = img.height;\n }\n\n if (typeof canvas === 'string') {\n canvas = document.getElementById(canvas);\n }\n\n if (!canvas || !('getContext' in canvas)) {\n return;\n }\n\n if (!skipStyles) {\n canvas.style.width = w + 'px';\n canvas.style.height = h + 'px';\n }\n\n canvas.width = w;\n canvas.height = h;\n var context = canvas.getContext('2d');\n context.clearRect(0, 0, w, h);\n context.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, w, h);\n\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n if (blurAlphaChannel) {\n processCanvasRGBA(canvas, 0, 0, w, h, radius);\n } else {\n processCanvasRGB(canvas, 0, 0, w, h, radius);\n }\n}\n/**\n * @param {string|HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @throws {Error|TypeError}\n * @returns {ImageData} See {@link https://html.spec.whatwg.org/multipage/canvas.html#imagedata}\n */\n\n\nfunction getImageDataFromCanvas(canvas, topX, topY, width, height) {\n if (typeof canvas === 'string') {\n canvas = document.getElementById(canvas);\n }\n\n if (!canvas || _typeof(canvas) !== 'object' || !('getContext' in canvas)) {\n throw new TypeError('Expecting canvas with `getContext` method ' + 'in processCanvasRGB(A) calls!');\n }\n\n var context = canvas.getContext('2d');\n\n try {\n return context.getImageData(topX, topY, width, height);\n } catch (e) {\n throw new Error('unable to access image data: ' + e);\n }\n}\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {undefined}\n */\n\n\nfunction processCanvasRGBA(canvas, topX, topY, width, height, radius) {\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n radius |= 0;\n var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);\n imageData = processImageDataRGBA(imageData, topX, topY, width, height, radius);\n canvas.getContext('2d').putImageData(imageData, topX, topY);\n}\n/**\n * @param {ImageData} imageData\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {ImageData}\n */\n\n\nfunction processImageDataRGBA(imageData, topX, topY, width, height, radius) {\n var pixels = imageData.data;\n var div = 2 * radius + 1; // const w4 = width << 2;\n\n var widthMinus1 = width - 1;\n var heightMinus1 = height - 1;\n var radiusPlus1 = radius + 1;\n var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\n var stackStart = new BlurStack();\n var stack = stackStart;\n var stackEnd;\n\n for (var i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n\n if (i === radiusPlus1) {\n stackEnd = stack;\n }\n }\n\n stack.next = stackStart;\n var stackIn = null,\n stackOut = null,\n yw = 0,\n yi = 0;\n var mulSum = mulTable[radius];\n var shgSum = shgTable[radius];\n\n for (var y = 0; y < height; y++) {\n stack = stackStart;\n var pr = pixels[yi],\n pg = pixels[yi + 1],\n pb = pixels[yi + 2],\n pa = pixels[yi + 3];\n\n for (var _i = 0; _i < radiusPlus1; _i++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack.a = pa;\n stack = stack.next;\n }\n\n var rInSum = 0,\n gInSum = 0,\n bInSum = 0,\n aInSum = 0,\n rOutSum = radiusPlus1 * pr,\n gOutSum = radiusPlus1 * pg,\n bOutSum = radiusPlus1 * pb,\n aOutSum = radiusPlus1 * pa,\n rSum = sumFactor * pr,\n gSum = sumFactor * pg,\n bSum = sumFactor * pb,\n aSum = sumFactor * pa;\n\n for (var _i2 = 1; _i2 < radiusPlus1; _i2++) {\n var p = yi + ((widthMinus1 < _i2 ? widthMinus1 : _i2) << 2);\n var r = pixels[p],\n g = pixels[p + 1],\n b = pixels[p + 2],\n a = pixels[p + 3];\n var rbs = radiusPlus1 - _i2;\n rSum += (stack.r = r) * rbs;\n gSum += (stack.g = g) * rbs;\n bSum += (stack.b = b) * rbs;\n aSum += (stack.a = a) * rbs;\n rInSum += r;\n gInSum += g;\n bInSum += b;\n aInSum += a;\n stack = stack.next;\n }\n\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var x = 0; x < width; x++) {\n var paInitial = aSum * mulSum >>> shgSum;\n pixels[yi + 3] = paInitial;\n\n if (paInitial !== 0) {\n var _a2 = 255 / paInitial;\n\n pixels[yi] = (rSum * mulSum >>> shgSum) * _a2;\n pixels[yi + 1] = (gSum * mulSum >>> shgSum) * _a2;\n pixels[yi + 2] = (bSum * mulSum >>> shgSum) * _a2;\n } else {\n pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;\n }\n\n rSum -= rOutSum;\n gSum -= gOutSum;\n bSum -= bOutSum;\n aSum -= aOutSum;\n rOutSum -= stackIn.r;\n gOutSum -= stackIn.g;\n bOutSum -= stackIn.b;\n aOutSum -= stackIn.a;\n\n var _p = x + radius + 1;\n\n _p = yw + (_p < widthMinus1 ? _p : widthMinus1) << 2;\n rInSum += stackIn.r = pixels[_p];\n gInSum += stackIn.g = pixels[_p + 1];\n bInSum += stackIn.b = pixels[_p + 2];\n aInSum += stackIn.a = pixels[_p + 3];\n rSum += rInSum;\n gSum += gInSum;\n bSum += bInSum;\n aSum += aInSum;\n stackIn = stackIn.next;\n var _stackOut = stackOut,\n _r = _stackOut.r,\n _g = _stackOut.g,\n _b = _stackOut.b,\n _a = _stackOut.a;\n rOutSum += _r;\n gOutSum += _g;\n bOutSum += _b;\n aOutSum += _a;\n rInSum -= _r;\n gInSum -= _g;\n bInSum -= _b;\n aInSum -= _a;\n stackOut = stackOut.next;\n yi += 4;\n }\n\n yw += width;\n }\n\n for (var _x = 0; _x < width; _x++) {\n yi = _x << 2;\n\n var _pr = pixels[yi],\n _pg = pixels[yi + 1],\n _pb = pixels[yi + 2],\n _pa = pixels[yi + 3],\n _rOutSum = radiusPlus1 * _pr,\n _gOutSum = radiusPlus1 * _pg,\n _bOutSum = radiusPlus1 * _pb,\n _aOutSum = radiusPlus1 * _pa,\n _rSum = sumFactor * _pr,\n _gSum = sumFactor * _pg,\n _bSum = sumFactor * _pb,\n _aSum = sumFactor * _pa;\n\n stack = stackStart;\n\n for (var _i3 = 0; _i3 < radiusPlus1; _i3++) {\n stack.r = _pr;\n stack.g = _pg;\n stack.b = _pb;\n stack.a = _pa;\n stack = stack.next;\n }\n\n var yp = width;\n var _gInSum = 0,\n _bInSum = 0,\n _aInSum = 0,\n _rInSum = 0;\n\n for (var _i4 = 1; _i4 <= radius; _i4++) {\n yi = yp + _x << 2;\n\n var _rbs = radiusPlus1 - _i4;\n\n _rSum += (stack.r = _pr = pixels[yi]) * _rbs;\n _gSum += (stack.g = _pg = pixels[yi + 1]) * _rbs;\n _bSum += (stack.b = _pb = pixels[yi + 2]) * _rbs;\n _aSum += (stack.a = _pa = pixels[yi + 3]) * _rbs;\n _rInSum += _pr;\n _gInSum += _pg;\n _bInSum += _pb;\n _aInSum += _pa;\n stack = stack.next;\n\n if (_i4 < heightMinus1) {\n yp += width;\n }\n }\n\n yi = _x;\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var _y = 0; _y < height; _y++) {\n var _p2 = yi << 2;\n\n pixels[_p2 + 3] = _pa = _aSum * mulSum >>> shgSum;\n\n if (_pa > 0) {\n _pa = 255 / _pa;\n pixels[_p2] = (_rSum * mulSum >>> shgSum) * _pa;\n pixels[_p2 + 1] = (_gSum * mulSum >>> shgSum) * _pa;\n pixels[_p2 + 2] = (_bSum * mulSum >>> shgSum) * _pa;\n } else {\n pixels[_p2] = pixels[_p2 + 1] = pixels[_p2 + 2] = 0;\n }\n\n _rSum -= _rOutSum;\n _gSum -= _gOutSum;\n _bSum -= _bOutSum;\n _aSum -= _aOutSum;\n _rOutSum -= stackIn.r;\n _gOutSum -= stackIn.g;\n _bOutSum -= stackIn.b;\n _aOutSum -= stackIn.a;\n _p2 = _x + ((_p2 = _y + radiusPlus1) < heightMinus1 ? _p2 : heightMinus1) * width << 2;\n _rSum += _rInSum += stackIn.r = pixels[_p2];\n _gSum += _gInSum += stackIn.g = pixels[_p2 + 1];\n _bSum += _bInSum += stackIn.b = pixels[_p2 + 2];\n _aSum += _aInSum += stackIn.a = pixels[_p2 + 3];\n stackIn = stackIn.next;\n _rOutSum += _pr = stackOut.r;\n _gOutSum += _pg = stackOut.g;\n _bOutSum += _pb = stackOut.b;\n _aOutSum += _pa = stackOut.a;\n _rInSum -= _pr;\n _gInSum -= _pg;\n _bInSum -= _pb;\n _aInSum -= _pa;\n stackOut = stackOut.next;\n yi += width;\n }\n }\n\n return imageData;\n}\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {undefined}\n */\n\n\nfunction processCanvasRGB(canvas, topX, topY, width, height, radius) {\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n radius |= 0;\n var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);\n imageData = processImageDataRGB(imageData, topX, topY, width, height, radius);\n canvas.getContext('2d').putImageData(imageData, topX, topY);\n}\n/**\n * @param {ImageData} imageData\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {ImageData}\n */\n\n\nfunction processImageDataRGB(imageData, topX, topY, width, height, radius) {\n var pixels = imageData.data;\n var div = 2 * radius + 1; // const w4 = width << 2;\n\n var widthMinus1 = width - 1;\n var heightMinus1 = height - 1;\n var radiusPlus1 = radius + 1;\n var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\n var stackStart = new BlurStack();\n var stack = stackStart;\n var stackEnd;\n\n for (var i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n\n if (i === radiusPlus1) {\n stackEnd = stack;\n }\n }\n\n stack.next = stackStart;\n var stackIn = null;\n var stackOut = null;\n var mulSum = mulTable[radius];\n var shgSum = shgTable[radius];\n var p, rbs;\n var yw = 0,\n yi = 0;\n\n for (var y = 0; y < height; y++) {\n var pr = pixels[yi],\n pg = pixels[yi + 1],\n pb = pixels[yi + 2],\n rOutSum = radiusPlus1 * pr,\n gOutSum = radiusPlus1 * pg,\n bOutSum = radiusPlus1 * pb,\n rSum = sumFactor * pr,\n gSum = sumFactor * pg,\n bSum = sumFactor * pb;\n stack = stackStart;\n\n for (var _i5 = 0; _i5 < radiusPlus1; _i5++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack = stack.next;\n }\n\n var rInSum = 0,\n gInSum = 0,\n bInSum = 0;\n\n for (var _i6 = 1; _i6 < radiusPlus1; _i6++) {\n p = yi + ((widthMinus1 < _i6 ? widthMinus1 : _i6) << 2);\n rSum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - _i6);\n gSum += (stack.g = pg = pixels[p + 1]) * rbs;\n bSum += (stack.b = pb = pixels[p + 2]) * rbs;\n rInSum += pr;\n gInSum += pg;\n bInSum += pb;\n stack = stack.next;\n }\n\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var x = 0; x < width; x++) {\n pixels[yi] = rSum * mulSum >>> shgSum;\n pixels[yi + 1] = gSum * mulSum >>> shgSum;\n pixels[yi + 2] = bSum * mulSum >>> shgSum;\n rSum -= rOutSum;\n gSum -= gOutSum;\n bSum -= bOutSum;\n rOutSum -= stackIn.r;\n gOutSum -= stackIn.g;\n bOutSum -= stackIn.b;\n p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;\n rInSum += stackIn.r = pixels[p];\n gInSum += stackIn.g = pixels[p + 1];\n bInSum += stackIn.b = pixels[p + 2];\n rSum += rInSum;\n gSum += gInSum;\n bSum += bInSum;\n stackIn = stackIn.next;\n rOutSum += pr = stackOut.r;\n gOutSum += pg = stackOut.g;\n bOutSum += pb = stackOut.b;\n rInSum -= pr;\n gInSum -= pg;\n bInSum -= pb;\n stackOut = stackOut.next;\n yi += 4;\n }\n\n yw += width;\n }\n\n for (var _x2 = 0; _x2 < width; _x2++) {\n yi = _x2 << 2;\n\n var _pr2 = pixels[yi],\n _pg2 = pixels[yi + 1],\n _pb2 = pixels[yi + 2],\n _rOutSum2 = radiusPlus1 * _pr2,\n _gOutSum2 = radiusPlus1 * _pg2,\n _bOutSum2 = radiusPlus1 * _pb2,\n _rSum2 = sumFactor * _pr2,\n _gSum2 = sumFactor * _pg2,\n _bSum2 = sumFactor * _pb2;\n\n stack = stackStart;\n\n for (var _i7 = 0; _i7 < radiusPlus1; _i7++) {\n stack.r = _pr2;\n stack.g = _pg2;\n stack.b = _pb2;\n stack = stack.next;\n }\n\n var _rInSum2 = 0,\n _gInSum2 = 0,\n _bInSum2 = 0;\n\n for (var _i8 = 1, yp = width; _i8 <= radius; _i8++) {\n yi = yp + _x2 << 2;\n _rSum2 += (stack.r = _pr2 = pixels[yi]) * (rbs = radiusPlus1 - _i8);\n _gSum2 += (stack.g = _pg2 = pixels[yi + 1]) * rbs;\n _bSum2 += (stack.b = _pb2 = pixels[yi + 2]) * rbs;\n _rInSum2 += _pr2;\n _gInSum2 += _pg2;\n _bInSum2 += _pb2;\n stack = stack.next;\n\n if (_i8 < heightMinus1) {\n yp += width;\n }\n }\n\n yi = _x2;\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var _y2 = 0; _y2 < height; _y2++) {\n p = yi << 2;\n pixels[p] = _rSum2 * mulSum >>> shgSum;\n pixels[p + 1] = _gSum2 * mulSum >>> shgSum;\n pixels[p + 2] = _bSum2 * mulSum >>> shgSum;\n _rSum2 -= _rOutSum2;\n _gSum2 -= _gOutSum2;\n _bSum2 -= _bOutSum2;\n _rOutSum2 -= stackIn.r;\n _gOutSum2 -= stackIn.g;\n _bOutSum2 -= stackIn.b;\n p = _x2 + ((p = _y2 + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;\n _rSum2 += _rInSum2 += stackIn.r = pixels[p];\n _gSum2 += _gInSum2 += stackIn.g = pixels[p + 1];\n _bSum2 += _bInSum2 += stackIn.b = pixels[p + 2];\n stackIn = stackIn.next;\n _rOutSum2 += _pr2 = stackOut.r;\n _gOutSum2 += _pg2 = stackOut.g;\n _bOutSum2 += _pb2 = stackOut.b;\n _rInSum2 -= _pr2;\n _gInSum2 -= _pg2;\n _bInSum2 -= _pb2;\n stackOut = stackOut.next;\n yi += width;\n }\n }\n\n return imageData;\n}\n/**\n *\n */\n\n\nvar BlurStack =\n/**\n * Set properties.\n */\nfunction BlurStack() {\n _classCallCheck(this, BlurStack);\n\n this.r = 0;\n this.g = 0;\n this.b = 0;\n this.a = 0;\n this.next = null;\n};\n\nexport { BlurStack, processCanvasRGB as canvasRGB, processCanvasRGBA as canvasRGBA, processImage as image, processImageDataRGB as imageDataRGB, processImageDataRGBA as imageDataRGBA };\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!./contextmenu.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!./contextmenu.css\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\nvar stylesInDOM = [];\n\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n\n return result;\n}\n\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n\n identifiers.push(identifier);\n }\n\n return identifiers;\n}\n\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n\n return updater;\n}\n\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n\n var newLastIdentifiers = modulesToDom(newList, options);\n\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n\n var _index = getIndexByIdentifier(_identifier);\n\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n\n stylesInDOM.splice(_index, 1);\n }\n }\n\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n/* istanbul ignore next */\n\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself\n\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n\n memo[target] = styleTarget;\n }\n\n return memo[target];\n}\n/* istanbul ignore next */\n\n\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n\n target.appendChild(style);\n}\n\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\n\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\n\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n\n var needLayer = typeof obj.layer !== \"undefined\";\n\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n\n css += obj.css;\n\n if (needLayer) {\n css += \"}\";\n }\n\n if (obj.media) {\n css += \"}\";\n }\n\n if (obj.supports) {\n css += \"}\";\n }\n\n var sourceMap = obj.sourceMap;\n\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n } // For old IE\n\n /* istanbul ignore if */\n\n\n options.styleTagTransform(css, styleElement, options.options);\n}\n\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n\n styleElement.parentNode.removeChild(styleElement);\n}\n/* istanbul ignore next */\n\n\nfunction domAPI(options) {\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\n\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n\n styleElement.appendChild(document.createTextNode(css));\n }\n}\n\nmodule.exports = styleTagTransform;","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar requestAnimationFrame = require('raf');\nvar RGBColor = require('rgbcolor');\nvar svgPathdata = require('svg-pathdata');\nvar stackblurCanvas = require('stackblur-canvas');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar requestAnimationFrame__default = /*#__PURE__*/_interopDefaultLegacy(requestAnimationFrame);\nvar RGBColor__default = /*#__PURE__*/_interopDefaultLegacy(RGBColor);\n\n/**\n * Options preset for `OffscreenCanvas`.\n * @param config - Preset requirements.\n * @param config.DOMParser - XML/HTML parser from string into DOM Document.\n * @returns Preset object.\n */ function offscreen() {\n let { DOMParser: DOMParserFallback } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n const preset = {\n window: null,\n ignoreAnimation: true,\n ignoreMouse: true,\n DOMParser: DOMParserFallback,\n createCanvas (width, height) {\n return new OffscreenCanvas(width, height);\n },\n async createImage (url) {\n const response = await fetch(url);\n const blob = await response.blob();\n const img = await createImageBitmap(blob);\n return img;\n }\n };\n if (typeof globalThis.DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {\n Reflect.deleteProperty(preset, 'DOMParser');\n }\n return preset;\n}\n\n/**\n * Options preset for `node-canvas`.\n * @param config - Preset requirements.\n * @param config.DOMParser - XML/HTML parser from string into DOM Document.\n * @param config.canvas - `node-canvas` exports.\n * @param config.fetch - WHATWG-compatible `fetch` function.\n * @returns Preset object.\n */ function node(param) {\n let { DOMParser , canvas , fetch } = param;\n return {\n window: null,\n ignoreAnimation: true,\n ignoreMouse: true,\n DOMParser,\n fetch,\n createCanvas: canvas.createCanvas,\n createImage: canvas.loadImage\n };\n}\n\nvar index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n offscreen: offscreen,\n node: node\n});\n\n/**\n * HTML-safe compress white-spaces.\n * @param str - String to compress.\n * @returns String.\n */ function compressSpaces(str) {\n return str.replace(/(?!\\u3000)\\s+/gm, ' ');\n}\n/**\n * HTML-safe left trim.\n * @param str - String to trim.\n * @returns String.\n */ function trimLeft(str) {\n return str.replace(/^[\\n \\t]+/, '');\n}\n/**\n * HTML-safe right trim.\n * @param str - String to trim.\n * @returns String.\n */ function trimRight(str) {\n return str.replace(/[\\n \\t]+$/, '');\n}\n/**\n * String to numbers array.\n * @param str - Numbers string.\n * @returns Numbers array.\n */ function toNumbers(str) {\n const matches = str.match(/-?(\\d+(?:\\.\\d*(?:[eE][+-]?\\d+)?)?|\\.\\d+)(?=\\D|$)/gm);\n return matches ? matches.map(parseFloat) : [];\n}\n/**\n * String to matrix value.\n * @param str - Numbers string.\n * @returns Matrix value.\n */ function toMatrixValue(str) {\n const numbers = toNumbers(str);\n const matrix = [\n numbers[0] || 0,\n numbers[1] || 0,\n numbers[2] || 0,\n numbers[3] || 0,\n numbers[4] || 0,\n numbers[5] || 0\n ];\n return matrix;\n}\n// Microsoft Edge fix\nconst allUppercase = /^[A-Z-]+$/;\n/**\n * Normalize attribute name.\n * @param name - Attribute name.\n * @returns Normalized attribute name.\n */ function normalizeAttributeName(name) {\n if (allUppercase.test(name)) {\n return name.toLowerCase();\n }\n return name;\n}\n/**\n * Parse external URL.\n * @param url - CSS url string.\n * @returns Parsed URL.\n */ function parseExternalUrl(url) {\n // single quotes [2]\n // v double quotes [3]\n // v v no quotes [4]\n // v v v\n const urlMatch = /url\\(('([^']+)'|\"([^\"]+)\"|([^'\")]+))\\)/.exec(url);\n if (!urlMatch) {\n return '';\n }\n return urlMatch[2] || urlMatch[3] || urlMatch[4] || '';\n}\n/**\n * Transform floats to integers in rgb colors.\n * @param color - Color to normalize.\n * @returns Normalized color.\n */ function normalizeColor(color) {\n if (!color.startsWith('rgb')) {\n return color;\n }\n let rgbParts = 3;\n const normalizedColor = color.replace(/\\d+(\\.\\d+)?/g, (num, isFloat)=>(rgbParts--) && isFloat ? String(Math.round(parseFloat(num))) : num\n );\n return normalizedColor;\n}\n\n// slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js\nconst attributeRegex = /(\\[[^\\]]+\\])/g;\nconst idRegex = /(#[^\\s+>~.[:]+)/g;\nconst classRegex = /(\\.[^\\s+>~.[:]+)/g;\nconst pseudoElementRegex = /(::[^\\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi;\nconst pseudoClassWithBracketsRegex = /(:[\\w-]+\\([^)]*\\))/gi;\nconst pseudoClassRegex = /(:[^\\s+>~.[:]+)/g;\nconst elementRegex = /([^\\s+>~.[:]+)/g;\nfunction findSelectorMatch(selector, regex) {\n const matches = regex.exec(selector);\n if (!matches) {\n return [\n selector,\n 0\n ];\n }\n return [\n selector.replace(regex, ' '),\n matches.length\n ];\n}\n/**\n * Measure selector specificity.\n * @param selector - Selector to measure.\n * @returns Specificity.\n */ function getSelectorSpecificity(selector) {\n const specificity = [\n 0,\n 0,\n 0\n ];\n let currentSelector = selector.replace(/:not\\(([^)]*)\\)/g, ' $1 ').replace(/{[\\s\\S]*/gm, ' ');\n let delta = 0;\n [currentSelector, delta] = findSelectorMatch(currentSelector, attributeRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, idRegex);\n specificity[0] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, classRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoElementRegex);\n specificity[2] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassRegex);\n specificity[1] += delta;\n currentSelector = currentSelector.replace(/[*\\s+>~]/g, ' ').replace(/[#.]/g, ' ');\n [currentSelector, delta] = findSelectorMatch(currentSelector, elementRegex) // lgtm [js/useless-assignment-to-local]\n ;\n specificity[2] += delta;\n return specificity.join('');\n}\n\nconst PSEUDO_ZERO = 0.00000001;\n/**\n * Vector magnitude.\n * @param v\n * @returns Number result.\n */ function vectorMagnitude(v) {\n return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));\n}\n/**\n * Ratio between two vectors.\n * @param u\n * @param v\n * @returns Number result.\n */ function vectorsRatio(u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));\n}\n/**\n * Angle between two vectors.\n * @param u\n * @param v\n * @returns Number result.\n */ function vectorsAngle(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));\n}\nfunction CB1(t) {\n return t * t * t;\n}\nfunction CB2(t) {\n return 3 * t * t * (1 - t);\n}\nfunction CB3(t) {\n return 3 * t * (1 - t) * (1 - t);\n}\nfunction CB4(t) {\n return (1 - t) * (1 - t) * (1 - t);\n}\nfunction QB1(t) {\n return t * t;\n}\nfunction QB2(t) {\n return 2 * t * (1 - t);\n}\nfunction QB3(t) {\n return (1 - t) * (1 - t);\n}\n\nclass Property {\n static empty(document) {\n return new Property(document, 'EMPTY', '');\n }\n split() {\n let separator = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ' ';\n const { document , name } = this;\n return compressSpaces(this.getString()).trim().split(separator).map((value)=>new Property(document, name, value)\n );\n }\n hasValue(zeroIsValue) {\n const value = this.value;\n return value !== null && value !== '' && (zeroIsValue || value !== 0) && typeof value !== 'undefined';\n }\n isString(regexp) {\n const { value } = this;\n const result = typeof value === 'string';\n if (!result || !regexp) {\n return result;\n }\n return regexp.test(value);\n }\n isUrlDefinition() {\n return this.isString(/^url\\(/);\n }\n isPixels() {\n if (!this.hasValue()) {\n return false;\n }\n const asString = this.getString();\n switch(true){\n case asString.endsWith('px'):\n case /^[0-9]+$/.test(asString):\n return true;\n default:\n return false;\n }\n }\n setValue(value) {\n this.value = value;\n return this;\n }\n getValue(def) {\n if (typeof def === 'undefined' || this.hasValue()) {\n return this.value;\n }\n return def;\n }\n getNumber(def) {\n if (!this.hasValue()) {\n if (typeof def === 'undefined') {\n return 0;\n }\n // @ts-expect-error Parse unknown value.\n return parseFloat(def);\n }\n const { value } = this;\n // @ts-expect-error Parse unknown value.\n let n = parseFloat(value);\n if (this.isString(/%$/)) {\n n /= 100;\n }\n return n;\n }\n getString(def) {\n if (typeof def === 'undefined' || this.hasValue()) {\n return typeof this.value === 'undefined' ? '' : String(this.value);\n }\n return String(def);\n }\n getColor(def) {\n let color = this.getString(def);\n if (this.isNormalizedColor) {\n return color;\n }\n this.isNormalizedColor = true;\n color = normalizeColor(color);\n this.value = color;\n return color;\n }\n getDpi() {\n return 96 // TODO: compute?\n ;\n }\n getRem() {\n return this.document.rootEmSize;\n }\n getEm() {\n return this.document.emSize;\n }\n getUnits() {\n return this.getString().replace(/[0-9.-]/g, '');\n }\n getPixels(axisOrIsFontSize) {\n let processPercent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n if (!this.hasValue()) {\n return 0;\n }\n const [axis, isFontSize] = typeof axisOrIsFontSize === 'boolean' ? [\n undefined,\n axisOrIsFontSize\n ] : [\n axisOrIsFontSize\n ];\n const { viewPort } = this.document.screen;\n switch(true){\n case this.isString(/vmin$/):\n return this.getNumber() / 100 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));\n case this.isString(/vmax$/):\n return this.getNumber() / 100 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));\n case this.isString(/vw$/):\n return this.getNumber() / 100 * viewPort.computeSize('x');\n case this.isString(/vh$/):\n return this.getNumber() / 100 * viewPort.computeSize('y');\n case this.isString(/rem$/):\n return this.getNumber() * this.getRem();\n case this.isString(/em$/):\n return this.getNumber() * this.getEm();\n case this.isString(/ex$/):\n return this.getNumber() * this.getEm() / 2;\n case this.isString(/px$/):\n return this.getNumber();\n case this.isString(/pt$/):\n return this.getNumber() * this.getDpi() * (1 / 72);\n case this.isString(/pc$/):\n return this.getNumber() * 15;\n case this.isString(/cm$/):\n return this.getNumber() * this.getDpi() / 2.54;\n case this.isString(/mm$/):\n return this.getNumber() * this.getDpi() / 25.4;\n case this.isString(/in$/):\n return this.getNumber() * this.getDpi();\n case this.isString(/%$/) && isFontSize:\n return this.getNumber() * this.getEm();\n case this.isString(/%$/):\n return this.getNumber() * viewPort.computeSize(axis);\n default:\n {\n const n = this.getNumber();\n if (processPercent && n < 1) {\n return n * viewPort.computeSize(axis);\n }\n return n;\n }\n }\n }\n getMilliseconds() {\n if (!this.hasValue()) {\n return 0;\n }\n if (this.isString(/ms$/)) {\n return this.getNumber();\n }\n return this.getNumber() * 1000;\n }\n getRadians() {\n if (!this.hasValue()) {\n return 0;\n }\n switch(true){\n case this.isString(/deg$/):\n return this.getNumber() * (Math.PI / 180);\n case this.isString(/grad$/):\n return this.getNumber() * (Math.PI / 200);\n case this.isString(/rad$/):\n return this.getNumber();\n default:\n return this.getNumber() * (Math.PI / 180);\n }\n }\n getDefinition() {\n const asString = this.getString();\n const match = /#([^)'\"]+)/.exec(asString);\n const name = (match === null || match === void 0 ? void 0 : match[1]) || asString;\n return this.document.definitions[name];\n }\n getFillStyleDefinition(element, opacity) {\n let def = this.getDefinition();\n if (!def) {\n return null;\n }\n // gradient\n if (typeof def.createGradient === 'function' && 'getBoundingBox' in element) {\n return def.createGradient(this.document.ctx, element, opacity);\n }\n // pattern\n if (typeof def.createPattern === 'function') {\n if (def.getHrefAttribute().hasValue()) {\n const patternTransform = def.getAttribute('patternTransform');\n def = def.getHrefAttribute().getDefinition();\n if (def && patternTransform.hasValue()) {\n def.getAttribute('patternTransform', true).setValue(patternTransform.value);\n }\n }\n if (def) {\n return def.createPattern(this.document.ctx, element, opacity);\n }\n }\n return null;\n }\n getTextBaseline() {\n if (!this.hasValue()) {\n return null;\n }\n const key = this.getString();\n return Property.textBaselineMapping[key] || null;\n }\n addOpacity(opacity) {\n let value = this.getColor();\n const len = value.length;\n let commas = 0;\n // Simulate old RGBColor version, which can't parse rgba.\n for(let i = 0; i < len; i++){\n if (value[i] === ',') {\n commas++;\n }\n if (commas === 3) {\n break;\n }\n }\n if (opacity.hasValue() && this.isString() && commas !== 3) {\n const color = new RGBColor__default[\"default\"](value);\n if (color.ok) {\n color.alpha = opacity.getNumber();\n value = color.toRGBA();\n }\n }\n return new Property(this.document, this.name, value);\n }\n constructor(document, name, value){\n this.document = document;\n this.name = name;\n this.value = value;\n this.isNormalizedColor = false;\n }\n}\nProperty.textBaselineMapping = {\n 'baseline': 'alphabetic',\n 'before-edge': 'top',\n 'text-before-edge': 'top',\n 'middle': 'middle',\n 'central': 'middle',\n 'after-edge': 'bottom',\n 'text-after-edge': 'bottom',\n 'ideographic': 'ideographic',\n 'alphabetic': 'alphabetic',\n 'hanging': 'hanging',\n 'mathematical': 'alphabetic'\n};\n\nclass ViewPort {\n clear() {\n this.viewPorts = [];\n }\n setCurrent(width, height) {\n this.viewPorts.push({\n width,\n height\n });\n }\n removeCurrent() {\n this.viewPorts.pop();\n }\n getRoot() {\n const [root] = this.viewPorts;\n if (!root) {\n return getDefault();\n }\n return root;\n }\n getCurrent() {\n const { viewPorts } = this;\n const current = viewPorts[viewPorts.length - 1];\n if (!current) {\n return getDefault();\n }\n return current;\n }\n get width() {\n return this.getCurrent().width;\n }\n get height() {\n return this.getCurrent().height;\n }\n computeSize(d) {\n if (typeof d === 'number') {\n return d;\n }\n if (d === 'x') {\n return this.width;\n }\n if (d === 'y') {\n return this.height;\n }\n return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);\n }\n constructor(){\n this.viewPorts = [];\n }\n}\nViewPort.DEFAULT_VIEWPORT_WIDTH = 800;\nViewPort.DEFAULT_VIEWPORT_HEIGHT = 600;\nfunction getDefault() {\n return {\n width: ViewPort.DEFAULT_VIEWPORT_WIDTH,\n height: ViewPort.DEFAULT_VIEWPORT_HEIGHT\n };\n}\n\nclass Point {\n static parse(point) {\n let defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n const [x = defaultValue, y = defaultValue] = toNumbers(point);\n return new Point(x, y);\n }\n static parseScale(scale) {\n let defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;\n const [x = defaultValue, y = x] = toNumbers(scale);\n return new Point(x, y);\n }\n static parsePath(path) {\n const points = toNumbers(path);\n const len = points.length;\n const pathPoints = [];\n for(let i = 0; i < len; i += 2){\n pathPoints.push(new Point(points[i], points[i + 1]));\n }\n return pathPoints;\n }\n angleTo(point) {\n return Math.atan2(point.y - this.y, point.x - this.x);\n }\n applyTransform(transform) {\n const { x , y } = this;\n const xp = x * transform[0] + y * transform[2] + transform[4];\n const yp = x * transform[1] + y * transform[3] + transform[5];\n this.x = xp;\n this.y = yp;\n }\n constructor(x, y){\n this.x = x;\n this.y = y;\n }\n}\n\nclass Mouse {\n isWorking() {\n return this.working;\n }\n start() {\n if (this.working) {\n return;\n }\n const { screen , onClick , onMouseMove } = this;\n const canvas = screen.ctx.canvas;\n canvas.onclick = onClick;\n canvas.onmousemove = onMouseMove;\n this.working = true;\n }\n stop() {\n if (!this.working) {\n return;\n }\n const canvas = this.screen.ctx.canvas;\n this.working = false;\n canvas.onclick = null;\n canvas.onmousemove = null;\n }\n hasEvents() {\n return this.working && this.events.length > 0;\n }\n runEvents() {\n if (!this.working) {\n return;\n }\n const { screen: document , events , eventElements } = this;\n const { style } = document.ctx.canvas;\n let element;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (style) {\n style.cursor = '';\n }\n events.forEach((param, i)=>{\n let { run } = param;\n element = eventElements[i];\n while(element){\n run(element);\n element = element.parent;\n }\n });\n // done running, clear\n this.events = [];\n this.eventElements = [];\n }\n checkPath(element, ctx) {\n if (!this.working || !ctx) {\n return;\n }\n const { events , eventElements } = this;\n events.forEach((param, i)=>{\n let { x , y } = param;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {\n eventElements[i] = element;\n }\n });\n }\n checkBoundingBox(element, boundingBox) {\n if (!this.working || !boundingBox) {\n return;\n }\n const { events , eventElements } = this;\n events.forEach((param, i)=>{\n let { x , y } = param;\n if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {\n eventElements[i] = element;\n }\n });\n }\n mapXY(x, y) {\n const { window , ctx } = this.screen;\n const point = new Point(x, y);\n let element = ctx.canvas;\n while(element){\n point.x -= element.offsetLeft;\n point.y -= element.offsetTop;\n element = element.offsetParent;\n }\n if (window === null || window === void 0 ? void 0 : window.scrollX) {\n point.x += window.scrollX;\n }\n if (window === null || window === void 0 ? void 0 : window.scrollY) {\n point.y += window.scrollY;\n }\n return point;\n }\n onClick(event) {\n const { x , y } = this.mapXY(event.clientX, event.clientY);\n this.events.push({\n type: 'onclick',\n x,\n y,\n run (eventTarget) {\n if (eventTarget.onClick) {\n eventTarget.onClick();\n }\n }\n });\n }\n onMouseMove(event) {\n const { x , y } = this.mapXY(event.clientX, event.clientY);\n this.events.push({\n type: 'onmousemove',\n x,\n y,\n run (eventTarget) {\n if (eventTarget.onMouseMove) {\n eventTarget.onMouseMove();\n }\n }\n });\n }\n constructor(screen){\n this.screen = screen;\n this.working = false;\n this.events = [];\n this.eventElements = [];\n this.onClick = this.onClick.bind(this);\n this.onMouseMove = this.onMouseMove.bind(this);\n }\n}\n\nconst defaultWindow = typeof window !== 'undefined' ? window : null;\nconst defaultFetch$1 = typeof fetch !== 'undefined' ? fetch.bind(undefined) // `fetch` depends on context: `someObject.fetch(...)` will throw error.\n : undefined;\nclass Screen {\n wait(checker) {\n this.waits.push(checker);\n }\n ready() {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (!this.readyPromise) {\n return Promise.resolve();\n }\n return this.readyPromise;\n }\n isReady() {\n if (this.isReadyLock) {\n return true;\n }\n const isReadyLock = this.waits.every((_)=>_()\n );\n if (isReadyLock) {\n this.waits = [];\n if (this.resolveReady) {\n this.resolveReady();\n }\n }\n this.isReadyLock = isReadyLock;\n return isReadyLock;\n }\n setDefaults(ctx) {\n // initial values and defaults\n ctx.strokeStyle = 'rgba(0,0,0,0)';\n ctx.lineCap = 'butt';\n ctx.lineJoin = 'miter';\n ctx.miterLimit = 4;\n }\n setViewBox(param) {\n let { document , ctx , aspectRatio , width , desiredWidth , height , desiredHeight , minX =0 , minY =0 , refX , refY , clip =false , clipX =0 , clipY =0 } = param;\n // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute\n const cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\\s/, '') // ignore defer\n ;\n const [aspectRatioAlign, aspectRatioMeetOrSlice] = cleanAspectRatio.split(' ');\n const align = aspectRatioAlign || 'xMidYMid';\n const meetOrSlice = aspectRatioMeetOrSlice || 'meet';\n // calculate scale\n const scaleX = width / desiredWidth;\n const scaleY = height / desiredHeight;\n const scaleMin = Math.min(scaleX, scaleY);\n const scaleMax = Math.max(scaleX, scaleY);\n let finalDesiredWidth = desiredWidth;\n let finalDesiredHeight = desiredHeight;\n if (meetOrSlice === 'meet') {\n finalDesiredWidth *= scaleMin;\n finalDesiredHeight *= scaleMin;\n }\n if (meetOrSlice === 'slice') {\n finalDesiredWidth *= scaleMax;\n finalDesiredHeight *= scaleMax;\n }\n const refXProp = new Property(document, 'refX', refX);\n const refYProp = new Property(document, 'refY', refY);\n const hasRefs = refXProp.hasValue() && refYProp.hasValue();\n if (hasRefs) {\n ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));\n }\n if (clip) {\n const scaledClipX = scaleMin * clipX;\n const scaledClipY = scaleMin * clipY;\n ctx.beginPath();\n ctx.moveTo(scaledClipX, scaledClipY);\n ctx.lineTo(width, scaledClipY);\n ctx.lineTo(width, height);\n ctx.lineTo(scaledClipX, height);\n ctx.closePath();\n ctx.clip();\n }\n if (!hasRefs) {\n const isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;\n const isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;\n const isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;\n const isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;\n if (align.startsWith('xMid') && (isMeetMinY || isSliceMaxY)) {\n ctx.translate(width / 2 - finalDesiredWidth / 2, 0);\n }\n if (align.endsWith('YMid') && (isMeetMinX || isSliceMaxX)) {\n ctx.translate(0, height / 2 - finalDesiredHeight / 2);\n }\n if (align.startsWith('xMax') && (isMeetMinY || isSliceMaxY)) {\n ctx.translate(width - finalDesiredWidth, 0);\n }\n if (align.endsWith('YMax') && (isMeetMinX || isSliceMaxX)) {\n ctx.translate(0, height - finalDesiredHeight);\n }\n }\n // scale\n switch(true){\n case align === 'none':\n ctx.scale(scaleX, scaleY);\n break;\n case meetOrSlice === 'meet':\n ctx.scale(scaleMin, scaleMin);\n break;\n case meetOrSlice === 'slice':\n ctx.scale(scaleMax, scaleMax);\n break;\n }\n // translate\n ctx.translate(-minX, -minY);\n }\n start(element) {\n let { enableRedraw =false , ignoreMouse =false , ignoreAnimation =false , ignoreDimensions =false , ignoreClear =false , forceRedraw , scaleWidth , scaleHeight , offsetX , offsetY } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n const { mouse } = this;\n const frameDuration = 1000 / Screen.FRAMERATE;\n this.isReadyLock = false;\n this.frameDuration = frameDuration;\n this.readyPromise = new Promise((resolve)=>{\n this.resolveReady = resolve;\n });\n if (this.isReady()) {\n this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);\n }\n if (!enableRedraw) {\n return;\n }\n let now = Date.now();\n let then = now;\n let delta = 0;\n const tick = ()=>{\n now = Date.now();\n delta = now - then;\n if (delta >= frameDuration) {\n then = now - delta % frameDuration;\n if (this.shouldUpdate(ignoreAnimation, forceRedraw)) {\n this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);\n mouse.runEvents();\n }\n }\n this.intervalId = requestAnimationFrame__default[\"default\"](tick);\n };\n if (!ignoreMouse) {\n mouse.start();\n }\n this.intervalId = requestAnimationFrame__default[\"default\"](tick);\n }\n stop() {\n if (this.intervalId) {\n requestAnimationFrame__default[\"default\"].cancel(this.intervalId);\n this.intervalId = null;\n }\n this.mouse.stop();\n }\n shouldUpdate(ignoreAnimation, forceRedraw) {\n // need update from animations?\n if (!ignoreAnimation) {\n const { frameDuration } = this;\n const shouldUpdate1 = this.animations.reduce((shouldUpdate, animation)=>animation.update(frameDuration) || shouldUpdate\n , false);\n if (shouldUpdate1) {\n return true;\n }\n }\n // need update from redraw?\n if (typeof forceRedraw === 'function' && forceRedraw()) {\n return true;\n }\n if (!this.isReadyLock && this.isReady()) {\n return true;\n }\n // need update from mouse events?\n if (this.mouse.hasEvents()) {\n return true;\n }\n return false;\n }\n render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {\n const { viewPort , ctx , isFirstRender } = this;\n const canvas = ctx.canvas;\n viewPort.clear();\n if (canvas.width && canvas.height) {\n viewPort.setCurrent(canvas.width, canvas.height);\n }\n const widthStyle = element.getStyle('width');\n const heightStyle = element.getStyle('height');\n if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {\n // set canvas size\n if (widthStyle.hasValue()) {\n canvas.width = widthStyle.getPixels('x');\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (canvas.style) {\n canvas.style.width = \"\".concat(canvas.width, \"px\");\n }\n }\n if (heightStyle.hasValue()) {\n canvas.height = heightStyle.getPixels('y');\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (canvas.style) {\n canvas.style.height = \"\".concat(canvas.height, \"px\");\n }\n }\n }\n let cWidth = canvas.clientWidth || canvas.width;\n let cHeight = canvas.clientHeight || canvas.height;\n if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {\n cWidth = widthStyle.getPixels('x');\n cHeight = heightStyle.getPixels('y');\n }\n viewPort.setCurrent(cWidth, cHeight);\n if (typeof offsetX === 'number') {\n element.getAttribute('x', true).setValue(offsetX);\n }\n if (typeof offsetY === 'number') {\n element.getAttribute('y', true).setValue(offsetY);\n }\n if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {\n const viewBox = toNumbers(element.getAttribute('viewBox').getString());\n let xRatio = 0;\n let yRatio = 0;\n if (typeof scaleWidth === 'number') {\n const widthStyle = element.getStyle('width');\n if (widthStyle.hasValue()) {\n xRatio = widthStyle.getPixels('x') / scaleWidth;\n } else if (viewBox[2] && !isNaN(viewBox[2])) {\n xRatio = viewBox[2] / scaleWidth;\n }\n }\n if (typeof scaleHeight === 'number') {\n const heightStyle = element.getStyle('height');\n if (heightStyle.hasValue()) {\n yRatio = heightStyle.getPixels('y') / scaleHeight;\n } else if (viewBox[3] && !isNaN(viewBox[3])) {\n yRatio = viewBox[3] / scaleHeight;\n }\n }\n if (!xRatio) {\n xRatio = yRatio;\n }\n if (!yRatio) {\n yRatio = xRatio;\n }\n element.getAttribute('width', true).setValue(scaleWidth);\n element.getAttribute('height', true).setValue(scaleHeight);\n const transformStyle = element.getStyle('transform', true, true);\n transformStyle.setValue(\"\".concat(transformStyle.getString(), \" scale(\").concat(1 / xRatio, \", \").concat(1 / yRatio, \")\"));\n }\n // clear and render\n if (!ignoreClear) {\n ctx.clearRect(0, 0, cWidth, cHeight);\n }\n element.render(ctx);\n if (isFirstRender) {\n this.isFirstRender = false;\n }\n }\n constructor(ctx, { fetch =defaultFetch$1 , window =defaultWindow } = {}){\n this.ctx = ctx;\n this.viewPort = new ViewPort();\n this.mouse = new Mouse(this);\n this.animations = [];\n this.waits = [];\n this.frameDuration = 0;\n this.isReadyLock = false;\n this.isFirstRender = true;\n this.intervalId = null;\n this.window = window;\n if (!fetch) {\n throw new Error(\"Can't find 'fetch' in 'globalThis', please provide it via options\");\n }\n this.fetch = fetch;\n }\n}\nScreen.defaultWindow = defaultWindow;\nScreen.defaultFetch = defaultFetch$1;\nScreen.FRAMERATE = 30;\nScreen.MAX_VIRTUAL_PIXELS = 30000;\n\nconst { defaultFetch } = Screen;\nconst DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : undefined;\nclass Parser {\n async parse(resource) {\n if (resource.startsWith('<')) {\n return this.parseFromString(resource);\n }\n return this.load(resource);\n }\n parseFromString(xml) {\n const parser = new this.DOMParser();\n try {\n return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));\n } catch (err) {\n return this.checkDocument(parser.parseFromString(xml, 'text/xml'));\n }\n }\n checkDocument(document) {\n const parserError = document.getElementsByTagName('parsererror')[0];\n if (parserError) {\n throw new Error(parserError.textContent || 'Unknown parse error');\n }\n return document;\n }\n async load(url) {\n const response = await this.fetch(url);\n const xml = await response.text();\n return this.parseFromString(xml);\n }\n constructor({ fetch =defaultFetch , DOMParser =DefaultDOMParser } = {}){\n if (!fetch) {\n throw new Error(\"Can't find 'fetch' in 'globalThis', please provide it via options\");\n }\n if (!DOMParser) {\n throw new Error(\"Can't find 'DOMParser' in 'globalThis', please provide it via options\");\n }\n this.fetch = fetch;\n this.DOMParser = DOMParser;\n }\n}\n\nclass Translate {\n apply(ctx) {\n const { x , y } = this.point;\n ctx.translate(x || 0, y || 0);\n }\n unapply(ctx) {\n const { x , y } = this.point;\n ctx.translate(-1 * x || 0, -1 * y || 0);\n }\n applyToPoint(point) {\n const { x , y } = this.point;\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n x || 0,\n y || 0\n ]);\n }\n constructor(_, point){\n this.type = 'translate';\n this.point = Point.parse(point);\n }\n}\n\nclass Rotate {\n apply(ctx) {\n const { cx , cy , originX , originY , angle } = this;\n const tx = cx + originX.getPixels('x');\n const ty = cy + originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.rotate(angle.getRadians());\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { cx , cy , originX , originY , angle } = this;\n const tx = cx + originX.getPixels('x');\n const ty = cy + originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.rotate(-1 * angle.getRadians());\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n const { cx , cy , angle } = this;\n const rad = angle.getRadians();\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n cx || 0,\n cy || 0 // this.p.y\n ]);\n point.applyTransform([\n Math.cos(rad),\n Math.sin(rad),\n -Math.sin(rad),\n Math.cos(rad),\n 0,\n 0\n ]);\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n -cx || 0,\n -cy || 0 // -this.p.y\n ]);\n }\n constructor(document, rotate, transformOrigin){\n this.type = 'rotate';\n const numbers = toNumbers(rotate);\n this.angle = new Property(document, 'angle', numbers[0]);\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n this.cx = numbers[1] || 0;\n this.cy = numbers[2] || 0;\n }\n}\n\nclass Scale {\n apply(ctx) {\n const { scale: { x , y } , originX , originY } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.scale(x, y || x);\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { scale: { x , y } , originX , originY } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.scale(1 / x, 1 / y || x);\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n const { x , y } = this.scale;\n point.applyTransform([\n x || 0,\n 0,\n 0,\n y || 0,\n 0,\n 0\n ]);\n }\n constructor(_, scale, transformOrigin){\n this.type = 'scale';\n const scaleSize = Point.parseScale(scale);\n // Workaround for node-canvas\n if (scaleSize.x === 0 || scaleSize.y === 0) {\n scaleSize.x = PSEUDO_ZERO;\n scaleSize.y = PSEUDO_ZERO;\n }\n this.scale = scaleSize;\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n }\n}\n\nclass Matrix {\n apply(ctx) {\n const { originX , originY , matrix } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { originX , originY , matrix } = this;\n const a = matrix[0];\n const b = matrix[2];\n const c = matrix[4];\n const d = matrix[1];\n const e = matrix[3];\n const f = matrix[5];\n const g = 0;\n const h = 0;\n const i = 1;\n const det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n point.applyTransform(this.matrix);\n }\n constructor(_, matrix, transformOrigin){\n this.type = 'matrix';\n this.matrix = toMatrixValue(matrix);\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n }\n}\n\nclass Skew extends Matrix {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skew';\n this.angle = new Property(document, 'angle', skew);\n }\n}\n\nclass SkewX extends Skew {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skewX';\n this.matrix = [\n 1,\n 0,\n Math.tan(this.angle.getRadians()),\n 1,\n 0,\n 0\n ];\n }\n}\n\nclass SkewY extends Skew {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skewY';\n this.matrix = [\n 1,\n Math.tan(this.angle.getRadians()),\n 0,\n 1,\n 0,\n 0\n ];\n }\n}\n\nfunction parseTransforms(transform) {\n return compressSpaces(transform).trim().replace(/\\)([a-zA-Z])/g, ') $1').replace(/\\)(\\s?,\\s?)/g, ') ').split(/\\s(?=[a-z])/);\n}\nfunction parseTransform(transform) {\n const [type = '', value = ''] = transform.split('(');\n return [\n type.trim(),\n value.trim().replace(')', '')\n ];\n}\nclass Transform {\n static fromElement(document, element) {\n const transformStyle = element.getStyle('transform', false, true);\n if (transformStyle.hasValue()) {\n const [transformOriginXProperty, transformOriginYProperty = transformOriginXProperty] = element.getStyle('transform-origin', false, true).split();\n if (transformOriginXProperty && transformOriginYProperty) {\n const transformOrigin = [\n transformOriginXProperty,\n transformOriginYProperty\n ];\n return new Transform(document, transformStyle.getString(), transformOrigin);\n }\n }\n return null;\n }\n apply(ctx) {\n this.transforms.forEach((transform)=>transform.apply(ctx)\n );\n }\n unapply(ctx) {\n this.transforms.forEach((transform)=>transform.unapply(ctx)\n );\n }\n // TODO: applyToPoint unused ... remove?\n applyToPoint(point) {\n this.transforms.forEach((transform)=>transform.applyToPoint(point)\n );\n }\n constructor(document, transform1, transformOrigin){\n this.document = document;\n this.transforms = [];\n const data = parseTransforms(transform1);\n data.forEach((transform)=>{\n if (transform === 'none') {\n return;\n }\n const [type, value] = parseTransform(transform);\n const TransformType = Transform.transformTypes[type];\n if (TransformType) {\n this.transforms.push(new TransformType(this.document, value, transformOrigin));\n }\n });\n }\n}\nTransform.transformTypes = {\n translate: Translate,\n rotate: Rotate,\n scale: Scale,\n matrix: Matrix,\n skewX: SkewX,\n skewY: SkewY\n};\n\nclass Element {\n getAttribute(name) {\n let createIfNotExists = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n const attr = this.attributes[name];\n if (!attr && createIfNotExists) {\n const attr = new Property(this.document, name, '');\n this.attributes[name] = attr;\n return attr;\n }\n return attr || Property.empty(this.document);\n }\n getHrefAttribute() {\n let href;\n for(const key in this.attributes){\n if (key === 'href' || key.endsWith(':href')) {\n href = this.attributes[key];\n break;\n }\n }\n return href || Property.empty(this.document);\n }\n getStyle(name) {\n let createIfNotExists = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, skipAncestors = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n const style = this.styles[name];\n if (style) {\n return style;\n }\n const attr = this.getAttribute(name);\n if (attr.hasValue()) {\n this.styles[name] = attr // move up to me to cache\n ;\n return attr;\n }\n if (!skipAncestors) {\n const { parent } = this;\n if (parent) {\n const parentStyle = parent.getStyle(name);\n if (parentStyle.hasValue()) {\n return parentStyle;\n }\n }\n }\n if (createIfNotExists) {\n const style = new Property(this.document, name, '');\n this.styles[name] = style;\n return style;\n }\n return Property.empty(this.document);\n }\n render(ctx) {\n // don't render display=none\n // don't render visibility=hidden\n if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {\n return;\n }\n ctx.save();\n if (this.getStyle('mask').hasValue()) {\n const mask = this.getStyle('mask').getDefinition();\n if (mask) {\n this.applyEffects(ctx);\n mask.apply(ctx, this);\n }\n } else if (this.getStyle('filter').getValue('none') !== 'none') {\n const filter = this.getStyle('filter').getDefinition();\n if (filter) {\n this.applyEffects(ctx);\n filter.apply(ctx, this);\n }\n } else {\n this.setContext(ctx);\n this.renderChildren(ctx);\n this.clearContext(ctx);\n }\n ctx.restore();\n }\n setContext(_) {\n // NO RENDER\n }\n applyEffects(ctx) {\n // transform\n const transform = Transform.fromElement(this.document, this);\n if (transform) {\n transform.apply(ctx);\n }\n // clip\n const clipPathStyleProp = this.getStyle('clip-path', false, true);\n if (clipPathStyleProp.hasValue()) {\n const clip = clipPathStyleProp.getDefinition();\n if (clip) {\n clip.apply(ctx);\n }\n }\n }\n clearContext(_) {\n // NO RENDER\n }\n renderChildren(ctx) {\n this.children.forEach((child)=>{\n child.render(ctx);\n });\n }\n addChild(childNode) {\n const child = childNode instanceof Element ? childNode : this.document.createElement(childNode);\n child.parent = this;\n if (!Element.ignoreChildTypes.includes(child.type)) {\n this.children.push(child);\n }\n }\n matchesSelector(selector) {\n var ref;\n const { node } = this;\n if (typeof node.matches === 'function') {\n return node.matches(selector);\n }\n const styleClasses = (ref = node.getAttribute) === null || ref === void 0 ? void 0 : ref.call(node, 'class');\n if (!styleClasses || styleClasses === '') {\n return false;\n }\n return styleClasses.split(' ').some((styleClass)=>\".\".concat(styleClass) === selector\n );\n }\n addStylesFromStyleDefinition() {\n const { styles , stylesSpecificity } = this.document;\n let styleProp;\n for(const selector in styles){\n if (!selector.startsWith('@') && this.matchesSelector(selector)) {\n const style = styles[selector];\n const specificity = stylesSpecificity[selector];\n if (style) {\n for(const name in style){\n let existingSpecificity = this.stylesSpecificity[name];\n if (typeof existingSpecificity === 'undefined') {\n existingSpecificity = '000';\n }\n if (specificity && specificity >= existingSpecificity) {\n styleProp = style[name];\n if (styleProp) {\n this.styles[name] = styleProp;\n }\n this.stylesSpecificity[name] = specificity;\n }\n }\n }\n }\n }\n }\n removeStyles(element, ignoreStyles) {\n const toRestore1 = ignoreStyles.reduce((toRestore, name)=>{\n const styleProp = element.getStyle(name);\n if (!styleProp.hasValue()) {\n return toRestore;\n }\n const value = styleProp.getString();\n styleProp.setValue('');\n return [\n ...toRestore,\n [\n name,\n value\n ]\n ];\n }, []);\n return toRestore1;\n }\n restoreStyles(element, styles) {\n styles.forEach((param)=>{\n let [name, value] = param;\n element.getStyle(name, true).setValue(value);\n });\n }\n isFirstChild() {\n var ref;\n return ((ref = this.parent) === null || ref === void 0 ? void 0 : ref.children.indexOf(this)) === 0;\n }\n constructor(document, node, captureTextNodes = false){\n this.document = document;\n this.node = node;\n this.captureTextNodes = captureTextNodes;\n this.type = '';\n this.attributes = {};\n this.styles = {};\n this.stylesSpecificity = {};\n this.animationFrozen = false;\n this.animationFrozenValue = '';\n this.parent = null;\n this.children = [];\n if (!node || node.nodeType !== 1) {\n return;\n }\n // add attributes\n Array.from(node.attributes).forEach((attribute)=>{\n const nodeName = normalizeAttributeName(attribute.nodeName);\n this.attributes[nodeName] = new Property(document, nodeName, attribute.value);\n });\n this.addStylesFromStyleDefinition();\n // add inline styles\n if (this.getAttribute('style').hasValue()) {\n const styles = this.getAttribute('style').getString().split(';').map((_)=>_.trim()\n );\n styles.forEach((style)=>{\n if (!style) {\n return;\n }\n const [name, value] = style.split(':').map((_)=>_.trim()\n );\n if (name) {\n this.styles[name] = new Property(document, name, value);\n }\n });\n }\n const { definitions } = document;\n const id = this.getAttribute('id');\n // add id\n if (id.hasValue()) {\n if (!definitions[id.getString()]) {\n definitions[id.getString()] = this;\n }\n }\n Array.from(node.childNodes).forEach((childNode)=>{\n if (childNode.nodeType === 1) {\n this.addChild(childNode) // ELEMENT_NODE\n ;\n } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {\n const textNode = document.createTextNode(childNode);\n if (textNode.getText().length > 0) {\n this.addChild(textNode) // TEXT_NODE\n ;\n }\n }\n });\n }\n}\nElement.ignoreChildTypes = [\n 'title'\n];\n\nclass UnknownElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n }\n}\n\nfunction wrapFontFamily(fontFamily) {\n const trimmed = fontFamily.trim();\n return /^('|\")/.test(trimmed) ? trimmed : \"\\\"\".concat(trimmed, \"\\\"\");\n}\nfunction prepareFontFamily(fontFamily) {\n return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');\n}\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style\n * @param fontStyle\n * @returns CSS font style.\n */ function prepareFontStyle(fontStyle) {\n if (!fontStyle) {\n return '';\n }\n const targetFontStyle = fontStyle.trim().toLowerCase();\n switch(targetFontStyle){\n case 'normal':\n case 'italic':\n case 'oblique':\n case 'inherit':\n case 'initial':\n case 'unset':\n return targetFontStyle;\n default:\n if (/^oblique\\s+(-|)\\d+deg$/.test(targetFontStyle)) {\n return targetFontStyle;\n }\n return '';\n }\n}\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\n * @param fontWeight\n * @returns CSS font weight.\n */ function prepareFontWeight(fontWeight) {\n if (!fontWeight) {\n return '';\n }\n const targetFontWeight = fontWeight.trim().toLowerCase();\n switch(targetFontWeight){\n case 'normal':\n case 'bold':\n case 'lighter':\n case 'bolder':\n case 'inherit':\n case 'initial':\n case 'unset':\n return targetFontWeight;\n default:\n if (/^[\\d.]+$/.test(targetFontWeight)) {\n return targetFontWeight;\n }\n return '';\n }\n}\nclass Font {\n static parse() {\n let font = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : '', inherit = arguments.length > 1 ? arguments[1] : void 0;\n let fontStyle = '';\n let fontVariant = '';\n let fontWeight = '';\n let fontSize = '';\n let fontFamily = '';\n const parts = compressSpaces(font).trim().split(' ');\n const set = {\n fontSize: false,\n fontStyle: false,\n fontWeight: false,\n fontVariant: false\n };\n parts.forEach((part)=>{\n switch(true){\n case !set.fontStyle && Font.styles.includes(part):\n if (part !== 'inherit') {\n fontStyle = part;\n }\n set.fontStyle = true;\n break;\n case !set.fontVariant && Font.variants.includes(part):\n if (part !== 'inherit') {\n fontVariant = part;\n }\n set.fontStyle = true;\n set.fontVariant = true;\n break;\n case !set.fontWeight && Font.weights.includes(part):\n if (part !== 'inherit') {\n fontWeight = part;\n }\n set.fontStyle = true;\n set.fontVariant = true;\n set.fontWeight = true;\n break;\n case !set.fontSize:\n if (part !== 'inherit') {\n fontSize = part.split('/')[0] || '';\n }\n set.fontStyle = true;\n set.fontVariant = true;\n set.fontWeight = true;\n set.fontSize = true;\n break;\n default:\n if (part !== 'inherit') {\n fontFamily += part;\n }\n }\n });\n return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);\n }\n toString() {\n return [\n prepareFontStyle(this.fontStyle),\n this.fontVariant,\n prepareFontWeight(this.fontWeight),\n this.fontSize,\n // Wrap fontFamily only on nodejs and only for canvas.ctx\n prepareFontFamily(this.fontFamily)\n ].join(' ').trim();\n }\n constructor(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit){\n const inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};\n this.fontFamily = fontFamily || inheritFont.fontFamily;\n this.fontSize = fontSize || inheritFont.fontSize;\n this.fontStyle = fontStyle || inheritFont.fontStyle;\n this.fontWeight = fontWeight || inheritFont.fontWeight;\n this.fontVariant = fontVariant || inheritFont.fontVariant;\n }\n}\nFont.styles = 'normal|italic|oblique|inherit';\nFont.variants = 'normal|small-caps|inherit';\nFont.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';\n\nclass BoundingBox {\n get x() {\n return this.x1;\n }\n get y() {\n return this.y1;\n }\n get width() {\n return this.x2 - this.x1;\n }\n get height() {\n return this.y2 - this.y1;\n }\n addPoint(x, y) {\n if (typeof x !== 'undefined') {\n if (isNaN(this.x1) || isNaN(this.x2)) {\n this.x1 = x;\n this.x2 = x;\n }\n if (x < this.x1) {\n this.x1 = x;\n }\n if (x > this.x2) {\n this.x2 = x;\n }\n }\n if (typeof y !== 'undefined') {\n if (isNaN(this.y1) || isNaN(this.y2)) {\n this.y1 = y;\n this.y2 = y;\n }\n if (y < this.y1) {\n this.y1 = y;\n }\n if (y > this.y2) {\n this.y2 = y;\n }\n }\n }\n addX(x) {\n this.addPoint(x, 0);\n }\n addY(y) {\n this.addPoint(0, y);\n }\n addBoundingBox(boundingBox) {\n if (!boundingBox) {\n return;\n }\n const { x1 , y1 , x2 , y2 } = boundingBox;\n this.addPoint(x1, y1);\n this.addPoint(x2, y2);\n }\n sumCubic(t, p0, p1, p2, p3) {\n return Math.pow(1 - t, 3) * p0 + 3 * Math.pow(1 - t, 2) * t * p1 + 3 * (1 - t) * Math.pow(t, 2) * p2 + Math.pow(t, 3) * p3;\n }\n bezierCurveAdd(forX, p0, p1, p2, p3) {\n const b = 6 * p0 - 12 * p1 + 6 * p2;\n const a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;\n const c = 3 * p1 - 3 * p0;\n if (a === 0) {\n if (b === 0) {\n return;\n }\n const t = -c / b;\n if (0 < t && t < 1) {\n if (forX) {\n this.addX(this.sumCubic(t, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t, p0, p1, p2, p3));\n }\n }\n return;\n }\n const b2ac = Math.pow(b, 2) - 4 * c * a;\n if (b2ac < 0) {\n return;\n }\n const t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n if (0 < t1 && t1 < 1) {\n if (forX) {\n this.addX(this.sumCubic(t1, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t1, p0, p1, p2, p3));\n }\n }\n const t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n if (0 < t2 && t2 < 1) {\n if (forX) {\n this.addX(this.sumCubic(t2, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t2, p0, p1, p2, p3));\n }\n }\n }\n // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html\n addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {\n this.addPoint(p0x, p0y);\n this.addPoint(p3x, p3y);\n this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);\n this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);\n }\n addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {\n const cp1x = p0x + 2 / 3 * (p1x - p0x) // CP1 = QP0 + 2/3 *(QP1-QP0)\n ;\n const cp1y = p0y + 2 / 3 * (p1y - p0y) // CP1 = QP0 + 2/3 *(QP1-QP0)\n ;\n const cp2x = cp1x + 1 / 3 * (p2x - p0x) // CP2 = CP1 + 1/3 *(QP2-QP0)\n ;\n const cp2y = cp1y + 1 / 3 * (p2y - p0y) // CP2 = CP1 + 1/3 *(QP2-QP0)\n ;\n this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);\n }\n isPointInBox(x, y) {\n const { x1 , y1 , x2 , y2 } = this;\n return x1 <= x && x <= x2 && y1 <= y && y <= y2;\n }\n constructor(x1 = Number.NaN, y1 = Number.NaN, x2 = Number.NaN, y2 = Number.NaN){\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n this.addPoint(x1, y1);\n this.addPoint(x2, y2);\n }\n}\n\nclass RenderedElement extends Element {\n calculateOpacity() {\n let opacity = 1;\n // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n let element = this;\n while(element){\n const opacityStyle = element.getStyle('opacity', false, true) // no ancestors on style call\n ;\n if (opacityStyle.hasValue(true)) {\n opacity *= opacityStyle.getNumber();\n }\n element = element.parent;\n }\n return opacity;\n }\n setContext(ctx) {\n let fromMeasure = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n if (!fromMeasure) {\n // fill\n const fillStyleProp = this.getStyle('fill');\n const fillOpacityStyleProp = this.getStyle('fill-opacity');\n const strokeStyleProp = this.getStyle('stroke');\n const strokeOpacityProp = this.getStyle('stroke-opacity');\n if (fillStyleProp.isUrlDefinition()) {\n const fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n }\n } else if (fillStyleProp.hasValue()) {\n if (fillStyleProp.getString() === 'currentColor') {\n fillStyleProp.setValue(this.getStyle('color').getColor());\n }\n const fillStyle = fillStyleProp.getColor();\n if (fillStyle !== 'inherit') {\n ctx.fillStyle = fillStyle === 'none' ? 'rgba(0,0,0,0)' : fillStyle;\n }\n }\n if (fillOpacityStyleProp.hasValue()) {\n const fillStyle = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();\n ctx.fillStyle = fillStyle;\n }\n // stroke\n if (strokeStyleProp.isUrlDefinition()) {\n const strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);\n if (strokeStyle) {\n ctx.strokeStyle = strokeStyle;\n }\n } else if (strokeStyleProp.hasValue()) {\n if (strokeStyleProp.getString() === 'currentColor') {\n strokeStyleProp.setValue(this.getStyle('color').getColor());\n }\n const strokeStyle = strokeStyleProp.getString();\n if (strokeStyle !== 'inherit') {\n ctx.strokeStyle = strokeStyle === 'none' ? 'rgba(0,0,0,0)' : strokeStyle;\n }\n }\n if (strokeOpacityProp.hasValue()) {\n const strokeStyle = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();\n ctx.strokeStyle = strokeStyle;\n }\n const strokeWidthStyleProp = this.getStyle('stroke-width');\n if (strokeWidthStyleProp.hasValue()) {\n const newLineWidth = strokeWidthStyleProp.getPixels();\n ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)\n : newLineWidth;\n }\n const strokeLinecapStyleProp = this.getStyle('stroke-linecap');\n const strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');\n const strokeMiterlimitProp = this.getStyle('stroke-miterlimit');\n // NEED TEST\n // const pointOrderStyleProp = this.getStyle('paint-order');\n const strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');\n const strokeDashoffsetProp = this.getStyle('stroke-dashoffset');\n if (strokeLinecapStyleProp.hasValue()) {\n ctx.lineCap = strokeLinecapStyleProp.getString();\n }\n if (strokeLinejoinStyleProp.hasValue()) {\n ctx.lineJoin = strokeLinejoinStyleProp.getString();\n }\n if (strokeMiterlimitProp.hasValue()) {\n ctx.miterLimit = strokeMiterlimitProp.getNumber();\n }\n // NEED TEST\n // if (pointOrderStyleProp.hasValue()) {\n // // ?\n // ctx.paintOrder = pointOrderStyleProp.getValue();\n // }\n if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {\n const gaps = toNumbers(strokeDasharrayStyleProp.getString());\n if (typeof ctx.setLineDash !== 'undefined') {\n ctx.setLineDash(gaps);\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.webkitLineDash !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.webkitLineDash = gaps;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {\n // @ts-expect-error Handle browser prefix.\n ctx.mozDash = gaps;\n }\n const offset = strokeDashoffsetProp.getPixels();\n if (typeof ctx.lineDashOffset !== 'undefined') {\n ctx.lineDashOffset = offset;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.webkitLineDashOffset !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.webkitLineDashOffset = offset;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.mozDashOffset !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.mozDashOffset = offset;\n }\n }\n }\n // font\n this.modifiedEmSizeStack = false;\n if (typeof ctx.font !== 'undefined') {\n const fontStyleProp = this.getStyle('font');\n const fontStyleStyleProp = this.getStyle('font-style');\n const fontVariantStyleProp = this.getStyle('font-variant');\n const fontWeightStyleProp = this.getStyle('font-weight');\n const fontSizeStyleProp = this.getStyle('font-size');\n const fontFamilyStyleProp = this.getStyle('font-family');\n const font = new Font(fontStyleStyleProp.getString(), fontVariantStyleProp.getString(), fontWeightStyleProp.getString(), fontSizeStyleProp.hasValue() ? \"\".concat(fontSizeStyleProp.getPixels(true), \"px\") : '', fontFamilyStyleProp.getString(), Font.parse(fontStyleProp.getString(), ctx.font));\n fontStyleStyleProp.setValue(font.fontStyle);\n fontVariantStyleProp.setValue(font.fontVariant);\n fontWeightStyleProp.setValue(font.fontWeight);\n fontSizeStyleProp.setValue(font.fontSize);\n fontFamilyStyleProp.setValue(font.fontFamily);\n ctx.font = font.toString();\n if (fontSizeStyleProp.isPixels()) {\n this.document.emSize = fontSizeStyleProp.getPixels();\n this.modifiedEmSizeStack = true;\n }\n }\n if (!fromMeasure) {\n // effects\n this.applyEffects(ctx);\n // opacity\n ctx.globalAlpha = this.calculateOpacity();\n }\n }\n clearContext(ctx) {\n super.clearContext(ctx);\n if (this.modifiedEmSizeStack) {\n this.document.popEmSize();\n }\n }\n constructor(...args){\n super(...args);\n this.modifiedEmSizeStack = false;\n }\n}\n\nclass TextElement extends RenderedElement {\n setContext(ctx) {\n let fromMeasure = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n super.setContext(ctx, fromMeasure);\n const textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();\n if (textBaseline) {\n ctx.textBaseline = textBaseline;\n }\n }\n initializeCoordinates() {\n this.x = 0;\n this.y = 0;\n this.leafTexts = [];\n this.textChunkStart = 0;\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n }\n getBoundingBox(ctx) {\n if (this.type !== 'text') {\n return this.getTElementBoundingBox(ctx);\n }\n // first, calculate child positions\n this.initializeCoordinates();\n this.adjustChildCoordinatesRecursive(ctx);\n let boundingBox = null;\n // then calculate bounding box\n this.children.forEach((_, i)=>{\n const childBoundingBox = this.getChildBoundingBox(ctx, this, this, i);\n if (!boundingBox) {\n boundingBox = childBoundingBox;\n } else {\n boundingBox.addBoundingBox(childBoundingBox);\n }\n });\n return boundingBox;\n }\n getFontSize() {\n const { document , parent } = this;\n const inheritFontSize = Font.parse(document.ctx.font).fontSize;\n const fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);\n return fontSize;\n }\n getTElementBoundingBox(ctx) {\n const fontSize = this.getFontSize();\n return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);\n }\n getGlyph(font, text, i) {\n const char = text[i];\n let glyph;\n if (font.isArabic) {\n var ref;\n const len = text.length;\n const prevChar = text[i - 1];\n const nextChar = text[i + 1];\n let arabicForm = 'isolated';\n if ((i === 0 || prevChar === ' ') && i < len - 1 && nextChar !== ' ') {\n arabicForm = 'terminal';\n }\n if (i > 0 && prevChar !== ' ' && i < len - 1 && nextChar !== ' ') {\n arabicForm = 'medial';\n }\n if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {\n arabicForm = 'initial';\n }\n glyph = ((ref = font.arabicGlyphs[char]) === null || ref === void 0 ? void 0 : ref[arabicForm]) || font.glyphs[char];\n } else {\n glyph = font.glyphs[char];\n }\n if (!glyph) {\n glyph = font.missingGlyph;\n }\n return glyph;\n }\n getText() {\n return '';\n }\n getTextFromNode(node) {\n const textNode = node || this.node;\n const childNodes = Array.from(textNode.parentNode.childNodes);\n const index = childNodes.indexOf(textNode);\n const lastIndex = childNodes.length - 1;\n let text = compressSpaces(// textNode.value\n // || textNode.text\n textNode.textContent || '');\n if (index === 0) {\n text = trimLeft(text);\n }\n if (index === lastIndex) {\n text = trimRight(text);\n }\n return text;\n }\n renderChildren(ctx) {\n if (this.type !== 'text') {\n this.renderTElementChildren(ctx);\n return;\n }\n // first, calculate child positions\n this.initializeCoordinates();\n this.adjustChildCoordinatesRecursive(ctx);\n // then render\n this.children.forEach((_, i)=>{\n this.renderChild(ctx, this, this, i);\n });\n const { mouse } = this.document.screen;\n // Do not calc bounding box if mouse is not working.\n if (mouse.isWorking()) {\n mouse.checkBoundingBox(this, this.getBoundingBox(ctx));\n }\n }\n renderTElementChildren(ctx) {\n const { document , parent } = this;\n const renderText = this.getText();\n const customFont = parent.getStyle('font-family').getDefinition();\n if (customFont) {\n const { unitsPerEm } = customFont.fontFace;\n const ctxFont = Font.parse(document.ctx.font);\n const fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);\n const fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);\n const scale = fontSize / unitsPerEm;\n const text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;\n const dx = toNumbers(parent.getAttribute('dx').getString());\n const len = text.length;\n for(let i = 0; i < len; i++){\n const glyph = this.getGlyph(customFont, text, i);\n ctx.translate(this.x, this.y);\n ctx.scale(scale, -scale);\n const lw = ctx.lineWidth;\n ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;\n if (fontStyle === 'italic') {\n ctx.transform(1, 0, 0.4, 1, 0, 0);\n }\n glyph.render(ctx);\n if (fontStyle === 'italic') {\n ctx.transform(1, 0, -0.4, 1, 0, 0);\n }\n ctx.lineWidth = lw;\n ctx.scale(1 / scale, -1 / scale);\n ctx.translate(-this.x, -this.y);\n this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;\n if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {\n this.x += dx[i];\n }\n }\n return;\n }\n const { x , y } = this;\n // NEED TEST\n // if (ctx.paintOrder === 'stroke') {\n // if (ctx.strokeStyle) {\n // ctx.strokeText(renderText, x, y);\n // }\n // if (ctx.fillStyle) {\n // ctx.fillText(renderText, x, y);\n // }\n // } else {\n if (ctx.fillStyle) {\n ctx.fillText(renderText, x, y);\n }\n if (ctx.strokeStyle) {\n ctx.strokeText(renderText, x, y);\n }\n // }\n }\n applyAnchoring() {\n if (this.textChunkStart >= this.leafTexts.length) {\n return;\n }\n // This is basically the \"Apply anchoring\" part of https://www.w3.org/TR/SVG2/text.html#TextLayoutAlgorithm.\n // The difference is that we apply the anchoring as soon as a chunk is finished. This saves some extra looping.\n // Vertical text is not supported.\n const firstElement = this.leafTexts[this.textChunkStart];\n const textAnchor = firstElement.getStyle('text-anchor').getString('start');\n const isRTL = false // we treat RTL like LTR\n ;\n let shift = 0;\n if (textAnchor === 'start' && !isRTL || textAnchor === 'end' && isRTL) {\n shift = firstElement.x - this.minX;\n } else if (textAnchor === 'end' && !isRTL || textAnchor === 'start' && isRTL) {\n shift = firstElement.x - this.maxX;\n } else {\n shift = firstElement.x - (this.minX + this.maxX) / 2;\n }\n for(let i = this.textChunkStart; i < this.leafTexts.length; i++){\n this.leafTexts[i].x += shift;\n }\n // start new chunk\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.textChunkStart = this.leafTexts.length;\n }\n adjustChildCoordinatesRecursive(ctx) {\n this.children.forEach((_, i)=>{\n this.adjustChildCoordinatesRecursiveCore(ctx, this, this, i);\n });\n this.applyAnchoring();\n }\n adjustChildCoordinatesRecursiveCore(ctx, textParent, parent, i1) {\n const child = parent.children[i1];\n if (child.children.length > 0) {\n child.children.forEach((_, i)=>{\n textParent.adjustChildCoordinatesRecursiveCore(ctx, textParent, child, i);\n });\n } else {\n // only leafs are relevant\n this.adjustChildCoordinates(ctx, textParent, parent, i1);\n }\n }\n adjustChildCoordinates(ctx, textParent, parent, i) {\n const child = parent.children[i];\n if (typeof child.measureText !== 'function') {\n return child;\n }\n ctx.save();\n child.setContext(ctx, true);\n const xAttr = child.getAttribute('x');\n const yAttr = child.getAttribute('y');\n const dxAttr = child.getAttribute('dx');\n const dyAttr = child.getAttribute('dy');\n const customFont = child.getStyle('font-family').getDefinition();\n const isRTL = Boolean(customFont === null || customFont === void 0 ? void 0 : customFont.isRTL);\n if (i === 0) {\n // First children inherit attributes from parent(s). Positional attributes\n // are only inherited from a parent to it's first child.\n if (!xAttr.hasValue()) {\n xAttr.setValue(child.getInheritedAttribute('x'));\n }\n if (!yAttr.hasValue()) {\n yAttr.setValue(child.getInheritedAttribute('y'));\n }\n if (!dxAttr.hasValue()) {\n dxAttr.setValue(child.getInheritedAttribute('dx'));\n }\n if (!dyAttr.hasValue()) {\n dyAttr.setValue(child.getInheritedAttribute('dy'));\n }\n }\n const width = child.measureText(ctx);\n if (isRTL) {\n textParent.x -= width;\n }\n if (xAttr.hasValue()) {\n // an \"x\" attribute marks the start of a new chunk\n textParent.applyAnchoring();\n child.x = xAttr.getPixels('x');\n if (dxAttr.hasValue()) {\n child.x += dxAttr.getPixels('x');\n }\n } else {\n if (dxAttr.hasValue()) {\n textParent.x += dxAttr.getPixels('x');\n }\n child.x = textParent.x;\n }\n textParent.x = child.x;\n if (!isRTL) {\n textParent.x += width;\n }\n if (yAttr.hasValue()) {\n child.y = yAttr.getPixels('y');\n if (dyAttr.hasValue()) {\n child.y += dyAttr.getPixels('y');\n }\n } else {\n if (dyAttr.hasValue()) {\n textParent.y += dyAttr.getPixels('y');\n }\n child.y = textParent.y;\n }\n textParent.y = child.y;\n // update the current chunk and it's bounds\n textParent.leafTexts.push(child);\n textParent.minX = Math.min(textParent.minX, child.x, child.x + width);\n textParent.maxX = Math.max(textParent.maxX, child.x, child.x + width);\n child.clearContext(ctx);\n ctx.restore();\n return child;\n }\n getChildBoundingBox(ctx, textParent, parent, i2) {\n const child = parent.children[i2];\n // not a text node?\n if (typeof child.getBoundingBox !== 'function') {\n return null;\n }\n const boundingBox = child.getBoundingBox(ctx);\n if (boundingBox) {\n child.children.forEach((_, i)=>{\n const childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);\n boundingBox.addBoundingBox(childBoundingBox);\n });\n }\n return boundingBox;\n }\n renderChild(ctx, textParent, parent, i3) {\n const child = parent.children[i3];\n child.render(ctx);\n child.children.forEach((_, i)=>{\n textParent.renderChild(ctx, textParent, child, i);\n });\n }\n measureText(ctx) {\n const { measureCache } = this;\n if (~measureCache) {\n return measureCache;\n }\n const renderText = this.getText();\n const measure = this.measureTargetText(ctx, renderText);\n this.measureCache = measure;\n return measure;\n }\n measureTargetText(ctx, targetText) {\n if (!targetText.length) {\n return 0;\n }\n const { parent } = this;\n const customFont = parent.getStyle('font-family').getDefinition();\n if (customFont) {\n const fontSize = this.getFontSize();\n const text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;\n const dx = toNumbers(parent.getAttribute('dx').getString());\n const len = text.length;\n let measure = 0;\n for(let i = 0; i < len; i++){\n const glyph = this.getGlyph(customFont, text, i);\n measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;\n if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {\n measure += dx[i];\n }\n }\n return measure;\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!ctx.measureText) {\n return targetText.length * 10;\n }\n ctx.save();\n this.setContext(ctx, true);\n const { width: measure } = ctx.measureText(targetText);\n this.clearContext(ctx);\n ctx.restore();\n return measure;\n }\n /**\n * Inherits positional attributes from {@link TextElement} parent(s). Attributes\n * are only inherited from a parent to its first child.\n * @param name - The attribute name.\n * @returns The attribute value or null.\n */ getInheritedAttribute(name) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias,consistent-this\n let current = this;\n while(current instanceof TextElement && current.isFirstChild() && current.parent){\n const parentAttr = current.parent.getAttribute(name);\n if (parentAttr.hasValue(true)) {\n return parentAttr.getString('0');\n }\n current = current.parent;\n }\n return null;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, new.target === TextElement ? true : captureTextNodes);\n this.type = 'text';\n this.x = 0;\n this.y = 0;\n this.leafTexts = [];\n this.textChunkStart = 0;\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.measureCache = -1;\n }\n}\n\nclass TSpanElement extends TextElement {\n getText() {\n return this.text;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, new.target === TSpanElement ? true : captureTextNodes);\n this.type = 'tspan';\n // if this node has children, then they own the text\n this.text = this.children.length > 0 ? '' : this.getTextFromNode();\n }\n}\n\nclass TextNode extends TSpanElement {\n constructor(...args){\n super(...args);\n this.type = 'textNode';\n }\n}\n\nclass PathParser extends svgPathdata.SVGPathData {\n reset() {\n this.i = -1;\n this.command = null;\n this.previousCommand = null;\n this.start = new Point(0, 0);\n this.control = new Point(0, 0);\n this.current = new Point(0, 0);\n this.points = [];\n this.angles = [];\n }\n isEnd() {\n const { i , commands } = this;\n return i >= commands.length - 1;\n }\n next() {\n const command = this.commands[++this.i];\n this.previousCommand = this.command;\n this.command = command;\n return command;\n }\n getPoint() {\n let xProp = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'x', yProp = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 'y';\n const point = new Point(this.command[xProp], this.command[yProp]);\n return this.makeAbsolute(point);\n }\n getAsControlPoint(xProp, yProp) {\n const point = this.getPoint(xProp, yProp);\n this.control = point;\n return point;\n }\n getAsCurrentPoint(xProp, yProp) {\n const point = this.getPoint(xProp, yProp);\n this.current = point;\n return point;\n }\n getReflectedControlPoint() {\n const previousCommand = this.previousCommand.type;\n if (previousCommand !== svgPathdata.SVGPathData.CURVE_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_CURVE_TO && previousCommand !== svgPathdata.SVGPathData.QUAD_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_QUAD_TO) {\n return this.current;\n }\n // reflect point\n const { current: { x: cx , y: cy } , control: { x: ox , y: oy } } = this;\n const point = new Point(2 * cx - ox, 2 * cy - oy);\n return point;\n }\n makeAbsolute(point) {\n if (this.command.relative) {\n const { x , y } = this.current;\n point.x += x;\n point.y += y;\n }\n return point;\n }\n addMarker(point, from, priorTo) {\n const { points , angles } = this;\n // if the last angle isn't filled in because we didn't have this point yet ...\n if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {\n angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);\n }\n this.addMarkerAngle(point, from ? from.angleTo(point) : null);\n }\n addMarkerAngle(point, angle) {\n this.points.push(point);\n this.angles.push(angle);\n }\n getMarkerPoints() {\n return this.points;\n }\n getMarkerAngles() {\n const { angles } = this;\n const len = angles.length;\n for(let i = 0; i < len; i++){\n if (!angles[i]) {\n for(let j = i + 1; j < len; j++){\n if (angles[j]) {\n angles[i] = angles[j];\n break;\n }\n }\n }\n }\n return angles;\n }\n constructor(path){\n super(path// Fix spaces after signs.\n .replace(/([+\\-.])\\s+/gm, '$1')// Remove invalid part.\n .replace(/[^MmZzLlHhVvCcSsQqTtAae\\d\\s.,+-].*/g, ''));\n this.control = new Point(0, 0);\n this.start = new Point(0, 0);\n this.current = new Point(0, 0);\n this.command = null;\n this.commands = this.commands;\n this.i = -1;\n this.previousCommand = null;\n this.points = [];\n this.angles = [];\n }\n}\n\nclass PathElement extends RenderedElement {\n path(ctx) {\n const { pathParser } = this;\n const boundingBox = new BoundingBox();\n pathParser.reset();\n if (ctx) {\n ctx.beginPath();\n }\n while(!pathParser.isEnd()){\n switch(pathParser.next().type){\n case PathParser.MOVE_TO:\n this.pathM(ctx, boundingBox);\n break;\n case PathParser.LINE_TO:\n this.pathL(ctx, boundingBox);\n break;\n case PathParser.HORIZ_LINE_TO:\n this.pathH(ctx, boundingBox);\n break;\n case PathParser.VERT_LINE_TO:\n this.pathV(ctx, boundingBox);\n break;\n case PathParser.CURVE_TO:\n this.pathC(ctx, boundingBox);\n break;\n case PathParser.SMOOTH_CURVE_TO:\n this.pathS(ctx, boundingBox);\n break;\n case PathParser.QUAD_TO:\n this.pathQ(ctx, boundingBox);\n break;\n case PathParser.SMOOTH_QUAD_TO:\n this.pathT(ctx, boundingBox);\n break;\n case PathParser.ARC:\n this.pathA(ctx, boundingBox);\n break;\n case PathParser.CLOSE_PATH:\n this.pathZ(ctx, boundingBox);\n break;\n }\n }\n return boundingBox;\n }\n getBoundingBox(_ctx) {\n return this.path();\n }\n getMarkers() {\n const { pathParser } = this;\n const points = pathParser.getMarkerPoints();\n const angles = pathParser.getMarkerAngles();\n const markers = points.map((point, i)=>[\n point,\n angles[i]\n ]\n );\n return markers;\n }\n renderChildren(ctx) {\n this.path(ctx);\n this.document.screen.mouse.checkPath(this, ctx);\n const fillRuleStyleProp = this.getStyle('fill-rule');\n if (ctx.fillStyle !== '') {\n if (fillRuleStyleProp.getString('inherit') !== 'inherit') {\n ctx.fill(fillRuleStyleProp.getString());\n } else {\n ctx.fill();\n }\n }\n if (ctx.strokeStyle !== '') {\n if (this.getAttribute('vector-effect').getString() === 'non-scaling-stroke') {\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.stroke();\n ctx.restore();\n } else {\n ctx.stroke();\n }\n }\n const markers = this.getMarkers();\n if (markers) {\n const markersLastIndex = markers.length - 1;\n const markerStartStyleProp = this.getStyle('marker-start');\n const markerMidStyleProp = this.getStyle('marker-mid');\n const markerEndStyleProp = this.getStyle('marker-end');\n if (markerStartStyleProp.isUrlDefinition()) {\n const marker = markerStartStyleProp.getDefinition();\n const [point, angle] = markers[0];\n marker.render(ctx, point, angle);\n }\n if (markerMidStyleProp.isUrlDefinition()) {\n const marker = markerMidStyleProp.getDefinition();\n for(let i = 1; i < markersLastIndex; i++){\n const [point, angle] = markers[i];\n marker.render(ctx, point, angle);\n }\n }\n if (markerEndStyleProp.isUrlDefinition()) {\n const marker = markerEndStyleProp.getDefinition();\n const [point, angle] = markers[markersLastIndex];\n marker.render(ctx, point, angle);\n }\n }\n }\n static pathM(pathParser) {\n const point = pathParser.getAsCurrentPoint();\n pathParser.start = pathParser.current;\n return {\n point\n };\n }\n pathM(ctx, boundingBox) {\n const { pathParser } = this;\n const { point } = PathElement.pathM(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.moveTo(x, y);\n }\n }\n static pathL(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getAsCurrentPoint();\n return {\n current,\n point\n };\n }\n pathL(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathL(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathH(pathParser) {\n const { current , command } = pathParser;\n const point = new Point((command.relative ? current.x : 0) + command.x, current.y);\n pathParser.current = point;\n return {\n current,\n point\n };\n }\n pathH(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathH(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathV(pathParser) {\n const { current , command } = pathParser;\n const point = new Point(current.x, (command.relative ? current.y : 0) + command.y);\n pathParser.current = point;\n return {\n current,\n point\n };\n }\n pathV(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathV(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathC(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getPoint('x1', 'y1');\n const controlPoint = pathParser.getAsControlPoint('x2', 'y2');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n point,\n controlPoint,\n currentPoint\n };\n }\n pathC(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point , controlPoint , currentPoint } = PathElement.pathC(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, point);\n boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathS(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getReflectedControlPoint();\n const controlPoint = pathParser.getAsControlPoint('x2', 'y2');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n point,\n controlPoint,\n currentPoint\n };\n }\n pathS(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point , controlPoint , currentPoint } = PathElement.pathS(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, point);\n boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathQ(pathParser) {\n const { current } = pathParser;\n const controlPoint = pathParser.getAsControlPoint('x1', 'y1');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n controlPoint,\n currentPoint\n };\n }\n pathQ(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , controlPoint , currentPoint } = PathElement.pathQ(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, controlPoint);\n boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathT(pathParser) {\n const { current } = pathParser;\n const controlPoint = pathParser.getReflectedControlPoint();\n pathParser.control = controlPoint;\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n controlPoint,\n currentPoint\n };\n }\n pathT(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , controlPoint , currentPoint } = PathElement.pathT(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, controlPoint);\n boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathA(pathParser) {\n const { current , command } = pathParser;\n let { rX , rY , xRot , lArcFlag , sweepFlag } = command;\n const xAxisRotation = xRot * (Math.PI / 180);\n const currentPoint = pathParser.getAsCurrentPoint();\n // Conversion from endpoint to center parameterization\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n // x1', y1'\n const currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2);\n // adjust radii\n const l = Math.pow(currp.x, 2) / Math.pow(rX, 2) + Math.pow(currp.y, 2) / Math.pow(rY, 2);\n if (l > 1) {\n rX *= Math.sqrt(l);\n rY *= Math.sqrt(l);\n }\n // cx', cy'\n let s = (lArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rX, 2) * Math.pow(rY, 2) - Math.pow(rX, 2) * Math.pow(currp.y, 2) - Math.pow(rY, 2) * Math.pow(currp.x, 2)) / (Math.pow(rX, 2) * Math.pow(currp.y, 2) + Math.pow(rY, 2) * Math.pow(currp.x, 2)));\n if (isNaN(s)) {\n s = 0;\n }\n const cpp = new Point(s * rX * currp.y / rY, s * -rY * currp.x / rX);\n // cx, cy\n const centp = new Point((current.x + currentPoint.x) / 2 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y);\n // initial angle\n const a1 = vectorsAngle([\n 1,\n 0\n ], [\n (currp.x - cpp.x) / rX,\n (currp.y - cpp.y) / rY\n ]) // θ1\n ;\n // angle delta\n const u = [\n (currp.x - cpp.x) / rX,\n (currp.y - cpp.y) / rY\n ];\n const v = [\n (-currp.x - cpp.x) / rX,\n (-currp.y - cpp.y) / rY\n ];\n let ad = vectorsAngle(u, v) // Δθ\n ;\n if (vectorsRatio(u, v) <= -1) {\n ad = Math.PI;\n }\n if (vectorsRatio(u, v) >= 1) {\n ad = 0;\n }\n return {\n currentPoint,\n rX,\n rY,\n sweepFlag,\n xAxisRotation,\n centp,\n a1,\n ad\n };\n }\n pathA(ctx, boundingBox) {\n const { pathParser } = this;\n const { currentPoint , rX , rY , sweepFlag , xAxisRotation , centp , a1 , ad } = PathElement.pathA(pathParser);\n // for markers\n const dir = 1 - sweepFlag ? 1 : -1;\n const ah = a1 + dir * (ad / 2);\n const halfWay = new Point(centp.x + rX * Math.cos(ah), centp.y + rY * Math.sin(ah));\n pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);\n pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);\n boundingBox.addPoint(currentPoint.x, currentPoint.y) // TODO: this is too naive, make it better\n ;\n if (ctx && !isNaN(a1) && !isNaN(ad)) {\n const r = rX > rY ? rX : rY;\n const sx = rX > rY ? 1 : rX / rY;\n const sy = rX > rY ? rY / rX : 1;\n ctx.translate(centp.x, centp.y);\n ctx.rotate(xAxisRotation);\n ctx.scale(sx, sy);\n ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));\n ctx.scale(1 / sx, 1 / sy);\n ctx.rotate(-xAxisRotation);\n ctx.translate(-centp.x, -centp.y);\n }\n }\n static pathZ(pathParser) {\n pathParser.current = pathParser.start;\n }\n pathZ(ctx, boundingBox) {\n PathElement.pathZ(this.pathParser);\n if (ctx) {\n // only close path if it is not a straight line\n if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {\n ctx.closePath();\n }\n }\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'path';\n this.pathParser = new PathParser(this.getAttribute('d').getString());\n }\n}\n\nclass SVGElement extends RenderedElement {\n setContext(ctx) {\n var ref;\n const { document } = this;\n const { screen , window } = document;\n const canvas = ctx.canvas;\n screen.setDefaults(ctx);\n if ('style' in canvas && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {\n ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');\n const fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);\n if (fontSizeProp.hasValue()) {\n document.rootEmSize = fontSizeProp.getPixels('y');\n document.emSize = document.rootEmSize;\n }\n }\n // create new view port\n if (!this.getAttribute('x').hasValue()) {\n this.getAttribute('x', true).setValue(0);\n }\n if (!this.getAttribute('y').hasValue()) {\n this.getAttribute('y', true).setValue(0);\n }\n let { width , height } = screen.viewPort;\n if (!this.getStyle('width').hasValue()) {\n this.getStyle('width', true).setValue('100%');\n }\n if (!this.getStyle('height').hasValue()) {\n this.getStyle('height', true).setValue('100%');\n }\n if (!this.getStyle('color').hasValue()) {\n this.getStyle('color', true).setValue('black');\n }\n const refXAttr = this.getAttribute('refX');\n const refYAttr = this.getAttribute('refY');\n const viewBoxAttr = this.getAttribute('viewBox');\n const viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;\n const clip = !this.root && this.getStyle('overflow').getValue('hidden') !== 'visible';\n let minX = 0;\n let minY = 0;\n let clipX = 0;\n let clipY = 0;\n if (viewBox) {\n minX = viewBox[0];\n minY = viewBox[1];\n }\n if (!this.root) {\n width = this.getStyle('width').getPixels('x');\n height = this.getStyle('height').getPixels('y');\n if (this.type === 'marker') {\n clipX = minX;\n clipY = minY;\n minX = 0;\n minY = 0;\n }\n }\n screen.viewPort.setCurrent(width, height);\n // Default value of transform-origin is center only for root SVG elements\n // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform-origin\n if (this.node // is not temporary SVGElement\n && (!this.parent || ((ref = this.node.parentNode) === null || ref === void 0 ? void 0 : ref.nodeName) === 'foreignObject') && this.getStyle('transform', false, true).hasValue() && !this.getStyle('transform-origin', false, true).hasValue()) {\n this.getStyle('transform-origin', true, true).setValue('50% 50%');\n }\n super.setContext(ctx);\n ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));\n if (viewBox) {\n width = viewBox[2];\n height = viewBox[3];\n }\n document.setViewBox({\n ctx,\n aspectRatio: this.getAttribute('preserveAspectRatio').getString(),\n width: screen.viewPort.width,\n desiredWidth: width,\n height: screen.viewPort.height,\n desiredHeight: height,\n minX,\n minY,\n refX: refXAttr.getValue(),\n refY: refYAttr.getValue(),\n clip,\n clipX,\n clipY\n });\n if (viewBox) {\n screen.viewPort.removeCurrent();\n screen.viewPort.setCurrent(width, height);\n }\n }\n clearContext(ctx) {\n super.clearContext(ctx);\n this.document.screen.viewPort.removeCurrent();\n }\n /**\n * Resize SVG to fit in given size.\n * @param width\n * @param height\n * @param preserveAspectRatio\n */ resize(width) {\n let height = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : width, preserveAspectRatio = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n const widthAttr = this.getAttribute('width', true);\n const heightAttr = this.getAttribute('height', true);\n const viewBoxAttr = this.getAttribute('viewBox');\n const styleAttr = this.getAttribute('style');\n const originWidth = widthAttr.getNumber(0);\n const originHeight = heightAttr.getNumber(0);\n if (preserveAspectRatio) {\n if (typeof preserveAspectRatio === 'string') {\n this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);\n } else {\n const preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');\n if (preserveAspectRatioAttr.hasValue()) {\n preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\\s*(\\S.*\\S)\\s*$/, '$1'));\n }\n }\n }\n widthAttr.setValue(width);\n heightAttr.setValue(height);\n if (!viewBoxAttr.hasValue()) {\n viewBoxAttr.setValue(\"0 0 \".concat(originWidth || width, \" \").concat(originHeight || height));\n }\n if (styleAttr.hasValue()) {\n const widthStyle = this.getStyle('width');\n const heightStyle = this.getStyle('height');\n if (widthStyle.hasValue()) {\n widthStyle.setValue(\"\".concat(width, \"px\"));\n }\n if (heightStyle.hasValue()) {\n heightStyle.setValue(\"\".concat(height, \"px\"));\n }\n }\n }\n constructor(...args){\n super(...args);\n this.type = 'svg';\n this.root = false;\n }\n}\n\nclass RectElement extends PathElement {\n path(ctx) {\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width', false, true).getPixels('x');\n const height = this.getStyle('height', false, true).getPixels('y');\n const rxAttr = this.getAttribute('rx');\n const ryAttr = this.getAttribute('ry');\n let rx = rxAttr.getPixels('x');\n let ry = ryAttr.getPixels('y');\n if (rxAttr.hasValue() && !ryAttr.hasValue()) {\n ry = rx;\n }\n if (ryAttr.hasValue() && !rxAttr.hasValue()) {\n rx = ry;\n }\n rx = Math.min(rx, width / 2);\n ry = Math.min(ry, height / 2);\n if (ctx) {\n const KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);\n ctx.beginPath() // always start the path so we don't fill prior paths\n ;\n if (height > 0 && width > 0) {\n ctx.moveTo(x + rx, y);\n ctx.lineTo(x + width - rx, y);\n ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);\n ctx.lineTo(x + width, y + height - ry);\n ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);\n ctx.lineTo(x + rx, y + height);\n ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);\n ctx.lineTo(x, y + ry);\n ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);\n ctx.closePath();\n }\n }\n return new BoundingBox(x, y, x + width, y + height);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'rect';\n }\n}\n\nclass CircleElement extends PathElement {\n path(ctx) {\n const cx = this.getAttribute('cx').getPixels('x');\n const cy = this.getAttribute('cy').getPixels('y');\n const r = this.getAttribute('r').getPixels();\n if (ctx && r > 0) {\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, Math.PI * 2, false);\n ctx.closePath();\n }\n return new BoundingBox(cx - r, cy - r, cx + r, cy + r);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'circle';\n }\n}\n\nclass EllipseElement extends PathElement {\n path(ctx) {\n const KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);\n const rx = this.getAttribute('rx').getPixels('x');\n const ry = this.getAttribute('ry').getPixels('y');\n const cx = this.getAttribute('cx').getPixels('x');\n const cy = this.getAttribute('cy').getPixels('y');\n if (ctx && rx > 0 && ry > 0) {\n ctx.beginPath();\n ctx.moveTo(cx + rx, cy);\n ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);\n ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);\n ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);\n ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);\n ctx.closePath();\n }\n return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'ellipse';\n }\n}\n\nclass LineElement extends PathElement {\n getPoints() {\n return [\n new Point(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')),\n new Point(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))\n ];\n }\n path(ctx) {\n const [{ x: x0 , y: y0 }, { x: x1 , y: y1 }] = this.getPoints();\n if (ctx) {\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n }\n return new BoundingBox(x0, y0, x1, y1);\n }\n getMarkers() {\n const [p0, p1] = this.getPoints();\n const a = p0.angleTo(p1);\n return [\n [\n p0,\n a\n ],\n [\n p1,\n a\n ]\n ];\n }\n constructor(...args){\n super(...args);\n this.type = 'line';\n }\n}\n\nclass PolylineElement extends PathElement {\n path(ctx) {\n const { points } = this;\n const [{ x: x0 , y: y0 }] = points;\n const boundingBox = new BoundingBox(x0, y0);\n if (ctx) {\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n }\n points.forEach((param)=>{\n let { x , y } = param;\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n });\n return boundingBox;\n }\n getMarkers() {\n const { points } = this;\n const lastIndex = points.length - 1;\n const markers = [];\n points.forEach((point, i)=>{\n if (i === lastIndex) {\n return;\n }\n markers.push([\n point,\n point.angleTo(points[i + 1])\n ]);\n });\n if (markers.length > 0) {\n markers.push([\n points[points.length - 1],\n markers[markers.length - 1][1]\n ]);\n }\n return markers;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'polyline';\n this.points = [];\n this.points = Point.parsePath(this.getAttribute('points').getString());\n }\n}\n\nclass PolygonElement extends PolylineElement {\n path(ctx) {\n const boundingBox = super.path(ctx);\n const [{ x , y }] = this.points;\n if (ctx) {\n ctx.lineTo(x, y);\n ctx.closePath();\n }\n return boundingBox;\n }\n constructor(...args){\n super(...args);\n this.type = 'polygon';\n }\n}\n\nclass PatternElement extends Element {\n createPattern(ctx, _, parentOpacityProp) {\n const width = this.getStyle('width').getPixels('x', true);\n const height = this.getStyle('height').getPixels('y', true);\n // render me using a temporary svg element\n const patternSvg = new SVGElement(this.document, null);\n patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());\n patternSvg.attributes.width = new Property(this.document, 'width', \"\".concat(width, \"px\"));\n patternSvg.attributes.height = new Property(this.document, 'height', \"\".concat(height, \"px\"));\n patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());\n patternSvg.children = this.children;\n const patternCanvas = this.document.createCanvas(width, height);\n const patternCtx = patternCanvas.getContext('2d');\n const xAttr = this.getAttribute('x');\n const yAttr = this.getAttribute('y');\n if (xAttr.hasValue() && yAttr.hasValue()) {\n patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));\n }\n if (parentOpacityProp.hasValue()) {\n this.styles['fill-opacity'] = parentOpacityProp;\n } else {\n Reflect.deleteProperty(this.styles, 'fill-opacity');\n }\n // render 3x3 grid so when we transform there's no white space on edges\n for(let x = -1; x <= 1; x++){\n for(let y = -1; y <= 1; y++){\n patternCtx.save();\n patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);\n patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);\n patternSvg.render(patternCtx);\n patternCtx.restore();\n }\n }\n const pattern = ctx.createPattern(patternCanvas, 'repeat');\n return pattern;\n }\n constructor(...args){\n super(...args);\n this.type = 'pattern';\n }\n}\n\nclass MarkerElement extends Element {\n render(ctx, point, angle) {\n if (!point) {\n return;\n }\n const { x , y } = point;\n const orient = this.getAttribute('orient').getString('auto');\n const markerUnits = this.getAttribute('markerUnits').getString('strokeWidth');\n ctx.translate(x, y);\n if (orient === 'auto') {\n ctx.rotate(angle);\n }\n if (markerUnits === 'strokeWidth') {\n ctx.scale(ctx.lineWidth, ctx.lineWidth);\n }\n ctx.save();\n // render me using a temporary svg element\n const markerSvg = new SVGElement(this.document);\n markerSvg.type = this.type;\n markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());\n markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());\n markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());\n markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());\n markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());\n markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());\n markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));\n markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));\n markerSvg.children = this.children;\n markerSvg.render(ctx);\n ctx.restore();\n if (markerUnits === 'strokeWidth') {\n ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);\n }\n if (orient === 'auto') {\n ctx.rotate(-angle);\n }\n ctx.translate(-x, -y);\n }\n constructor(...args){\n super(...args);\n this.type = 'marker';\n }\n}\n\nclass DefsElement extends Element {\n render() {\n // NOOP\n }\n constructor(...args){\n super(...args);\n this.type = 'defs';\n }\n}\n\nclass GElement extends RenderedElement {\n getBoundingBox(ctx) {\n const boundingBox = new BoundingBox();\n this.children.forEach((child)=>{\n boundingBox.addBoundingBox(child.getBoundingBox(ctx));\n });\n return boundingBox;\n }\n constructor(...args){\n super(...args);\n this.type = 'g';\n }\n}\n\nclass GradientElement extends Element {\n getGradientUnits() {\n return this.getAttribute('gradientUnits').getString('objectBoundingBox');\n }\n createGradient(ctx, element, parentOpacityProp) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n let stopsContainer = this;\n if (this.getHrefAttribute().hasValue()) {\n stopsContainer = this.getHrefAttribute().getDefinition();\n this.inheritStopContainer(stopsContainer);\n }\n const { stops } = stopsContainer;\n const gradient = this.getGradient(ctx, element);\n if (!gradient) {\n return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);\n }\n stops.forEach((stop)=>{\n gradient.addColorStop(stop.offset, this.addParentOpacity(parentOpacityProp, stop.color));\n });\n if (this.getAttribute('gradientTransform').hasValue()) {\n // render as transformed pattern on temporary canvas\n const { document } = this;\n const { MAX_VIRTUAL_PIXELS } = Screen;\n const { viewPort } = document.screen;\n const rootView = viewPort.getRoot();\n const rect = new RectElement(document);\n rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3);\n rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3);\n rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);\n rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);\n const group = new GElement(document);\n group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());\n group.children = [\n rect\n ];\n const patternSvg = new SVGElement(document);\n patternSvg.attributes.x = new Property(document, 'x', 0);\n patternSvg.attributes.y = new Property(document, 'y', 0);\n patternSvg.attributes.width = new Property(document, 'width', rootView.width);\n patternSvg.attributes.height = new Property(document, 'height', rootView.height);\n patternSvg.children = [\n group\n ];\n const patternCanvas = document.createCanvas(rootView.width, rootView.height);\n const patternCtx = patternCanvas.getContext('2d');\n patternCtx.fillStyle = gradient;\n patternSvg.render(patternCtx);\n return patternCtx.createPattern(patternCanvas, 'no-repeat');\n }\n return gradient;\n }\n inheritStopContainer(stopsContainer) {\n this.attributesToInherit.forEach((attributeToInherit)=>{\n if (!this.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {\n this.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());\n }\n });\n }\n addParentOpacity(parentOpacityProp, color) {\n if (parentOpacityProp.hasValue()) {\n const colorProp = new Property(this.document, 'color', color);\n return colorProp.addOpacity(parentOpacityProp).getColor();\n }\n return color;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.attributesToInherit = [\n 'gradientUnits'\n ];\n this.stops = [];\n const { stops , children } = this;\n children.forEach((child)=>{\n if (child.type === 'stop') {\n stops.push(child);\n }\n });\n }\n}\n\nclass LinearGradientElement extends GradientElement {\n getGradient(ctx, element) {\n const isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';\n const boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;\n if (isBoundingBoxUnits && !boundingBox) {\n return null;\n }\n if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {\n this.getAttribute('x1', true).setValue(0);\n this.getAttribute('y1', true).setValue(0);\n this.getAttribute('x2', true).setValue(1);\n this.getAttribute('y2', true).setValue(0);\n }\n const x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');\n const y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');\n const x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');\n const y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');\n if (x1 === x2 && y1 === y2) {\n return null;\n }\n return ctx.createLinearGradient(x1, y1, x2, y2);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'linearGradient';\n this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');\n }\n}\n\nclass RadialGradientElement extends GradientElement {\n getGradient(ctx, element) {\n const isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';\n const boundingBox = element.getBoundingBox(ctx);\n if (isBoundingBoxUnits && !boundingBox) {\n return null;\n }\n if (!this.getAttribute('cx').hasValue()) {\n this.getAttribute('cx', true).setValue('50%');\n }\n if (!this.getAttribute('cy').hasValue()) {\n this.getAttribute('cy', true).setValue('50%');\n }\n if (!this.getAttribute('r').hasValue()) {\n this.getAttribute('r', true).setValue('50%');\n }\n const cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');\n const cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');\n let fx = cx;\n let fy = cy;\n if (this.getAttribute('fx').hasValue()) {\n fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');\n }\n if (this.getAttribute('fy').hasValue()) {\n fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');\n }\n const r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();\n const fr = this.getAttribute('fr').getPixels();\n return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'radialGradient';\n this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');\n }\n}\n\nclass StopElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'stop';\n const offset = Math.max(0, Math.min(1, this.getAttribute('offset').getNumber()));\n const stopOpacity = this.getStyle('stop-opacity');\n let stopColor = this.getStyle('stop-color', true);\n if (stopColor.getString() === '') {\n stopColor.setValue('#000');\n }\n if (stopOpacity.hasValue()) {\n stopColor = stopColor.addOpacity(stopOpacity);\n }\n this.offset = offset;\n this.color = stopColor.getColor();\n }\n}\n\nclass AnimateElement extends Element {\n getProperty() {\n const attributeType = this.getAttribute('attributeType').getString();\n const attributeName = this.getAttribute('attributeName').getString();\n if (attributeType === 'CSS') {\n return this.parent.getStyle(attributeName, true);\n }\n return this.parent.getAttribute(attributeName, true);\n }\n calcValue() {\n const { initialUnits } = this;\n const { progress , from , to } = this.getProgress();\n // tween value linearly\n let newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;\n if (initialUnits === '%') {\n newValue *= 100 // numValue() returns 0-1 whereas properties are 0-100\n ;\n }\n return \"\".concat(newValue).concat(initialUnits);\n }\n update(delta) {\n const { parent } = this;\n const prop = this.getProperty();\n // set initial value\n if (!this.initialValue) {\n this.initialValue = prop.getString();\n this.initialUnits = prop.getUnits();\n }\n // if we're past the end time\n if (this.duration > this.maxDuration) {\n const fill = this.getAttribute('fill').getString('remove');\n // loop for indefinitely repeating animations\n if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {\n this.duration = 0;\n } else if (fill === 'freeze' && !this.frozen) {\n this.frozen = true;\n if (parent && prop) {\n parent.animationFrozen = true;\n parent.animationFrozenValue = prop.getString();\n }\n } else if (fill === 'remove' && !this.removed) {\n this.removed = true;\n if (parent && prop) {\n prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);\n }\n return true;\n }\n return false;\n }\n this.duration += delta;\n // if we're past the begin time\n let updated = false;\n if (this.begin < this.duration) {\n let newValue = this.calcValue() // tween\n ;\n const typeAttr = this.getAttribute('type');\n if (typeAttr.hasValue()) {\n // for transform, etc.\n const type = typeAttr.getString();\n newValue = \"\".concat(type, \"(\").concat(newValue, \")\");\n }\n prop.setValue(newValue);\n updated = true;\n }\n return updated;\n }\n getProgress() {\n const { document , values } = this;\n let progress = (this.duration - this.begin) / (this.maxDuration - this.begin);\n let from;\n let to;\n if (values.hasValue()) {\n const p = progress * (values.getValue().length - 1);\n const lb = Math.floor(p);\n const ub = Math.ceil(p);\n let value;\n value = values.getValue()[lb];\n from = new Property(document, 'from', value ? parseFloat(value) : 0);\n value = values.getValue()[ub];\n to = new Property(document, 'to', value ? parseFloat(value) : 0);\n progress = (p - lb) / (ub - lb);\n } else {\n from = this.from;\n to = this.to;\n }\n return {\n progress,\n from,\n to\n };\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'animate';\n this.duration = 0;\n this.initialUnits = '';\n this.removed = false;\n this.frozen = false;\n document.screen.animations.push(this);\n this.begin = this.getAttribute('begin').getMilliseconds();\n this.maxDuration = this.begin + this.getAttribute('dur').getMilliseconds();\n this.from = this.getAttribute('from');\n this.to = this.getAttribute('to');\n this.values = new Property(document, 'values', null);\n const valuesAttr = this.getAttribute('values');\n if (valuesAttr.hasValue()) {\n this.values.setValue(valuesAttr.getString().split(';'));\n }\n }\n}\n\nclass AnimateColorElement extends AnimateElement {\n calcValue() {\n const { progress , from , to } = this.getProgress();\n const colorFrom = new RGBColor__default[\"default\"](from.getColor());\n const colorTo = new RGBColor__default[\"default\"](to.getColor());\n if (colorFrom.ok && colorTo.ok) {\n // tween color linearly\n const r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;\n const g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;\n const b = colorFrom.b + (colorTo.b - colorFrom.b) * progress;\n // ? alpha\n return \"rgb(\".concat(Math.floor(r), \", \").concat(Math.floor(g), \", \").concat(Math.floor(b), \")\");\n }\n return this.getAttribute('from').getColor();\n }\n constructor(...args){\n super(...args);\n this.type = 'animateColor';\n }\n}\n\nclass AnimateTransformElement extends AnimateElement {\n calcValue() {\n const { progress , from: from1 , to: to1 } = this.getProgress();\n // tween value linearly\n const transformFrom = toNumbers(from1.getString());\n const transformTo = toNumbers(to1.getString());\n const newValue = transformFrom.map((from, i)=>{\n const to = transformTo[i];\n return from + (to - from) * progress;\n }).join(' ');\n return newValue;\n }\n constructor(...args){\n super(...args);\n this.type = 'animateTransform';\n }\n}\n\nclass FontFaceElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'font-face';\n this.ascent = this.getAttribute('ascent').getNumber();\n this.descent = this.getAttribute('descent').getNumber();\n this.unitsPerEm = this.getAttribute('units-per-em').getNumber();\n }\n}\n\nclass GlyphElement extends PathElement {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'glyph';\n this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();\n this.unicode = this.getAttribute('unicode').getString();\n this.arabicForm = this.getAttribute('arabic-form').getString();\n }\n}\n\nclass MissingGlyphElement extends GlyphElement {\n constructor(...args){\n super(...args);\n this.type = 'missing-glyph';\n this.horizAdvX = 0;\n }\n}\n\nclass FontElement extends Element {\n render() {\n // NO RENDER\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'font';\n this.isArabic = false;\n this.glyphs = {};\n this.arabicGlyphs = {};\n this.isRTL = false;\n this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();\n const { definitions } = document;\n const { children } = this;\n for (const child of children){\n if (child instanceof FontFaceElement) {\n this.fontFace = child;\n const fontFamilyStyle = child.getStyle('font-family');\n if (fontFamilyStyle.hasValue()) {\n definitions[fontFamilyStyle.getString()] = this;\n }\n } else if (child instanceof MissingGlyphElement) {\n this.missingGlyph = child;\n } else if (child instanceof GlyphElement) {\n if (child.arabicForm) {\n this.isRTL = true;\n this.isArabic = true;\n const arabicGlyph = this.arabicGlyphs[child.unicode];\n if (typeof arabicGlyph === 'undefined') {\n this.arabicGlyphs[child.unicode] = {\n [child.arabicForm]: child\n };\n } else {\n arabicGlyph[child.arabicForm] = child;\n }\n } else {\n this.glyphs[child.unicode] = child;\n }\n }\n }\n }\n}\n\nclass TRefElement extends TextElement {\n getText() {\n const element = this.getHrefAttribute().getDefinition();\n if (element) {\n const firstChild = element.children[0];\n if (firstChild) {\n return firstChild.getText();\n }\n }\n return '';\n }\n constructor(...args){\n super(...args);\n this.type = 'tref';\n }\n}\n\nclass AElement extends TextElement {\n getText() {\n return this.text;\n }\n renderChildren(ctx) {\n if (this.hasText) {\n // render as text element\n super.renderChildren(ctx);\n const { document , x , y } = this;\n const { mouse } = document.screen;\n const fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize);\n // Do not calc bounding box if mouse is not working.\n if (mouse.isWorking()) {\n mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));\n }\n } else if (this.children.length > 0) {\n // render as temporary group\n const g = new GElement(this.document);\n g.children = this.children;\n g.parent = this;\n g.render(ctx);\n }\n }\n onClick() {\n const { window } = this.document;\n if (window) {\n window.open(this.getHrefAttribute().getString());\n }\n }\n onMouseMove() {\n const ctx = this.document.ctx;\n ctx.canvas.style.cursor = 'pointer';\n }\n constructor(document, node1, captureTextNodes){\n super(document, node1, captureTextNodes);\n this.type = 'a';\n const { childNodes } = node1;\n const firstChild = childNodes[0];\n const hasText = childNodes.length > 0 && Array.from(childNodes).every((node)=>node.nodeType === 3\n );\n this.hasText = hasText;\n this.text = hasText ? this.getTextFromNode(firstChild) : '';\n }\n}\n\nclass TextPathElement extends TextElement {\n getText() {\n return this.text;\n }\n path(ctx) {\n const { dataArray } = this;\n if (ctx) {\n ctx.beginPath();\n }\n dataArray.forEach((param)=>{\n let { type , points } = param;\n switch(type){\n case PathParser.LINE_TO:\n if (ctx) {\n ctx.lineTo(points[0], points[1]);\n }\n break;\n case PathParser.MOVE_TO:\n if (ctx) {\n ctx.moveTo(points[0], points[1]);\n }\n break;\n case PathParser.CURVE_TO:\n if (ctx) {\n ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);\n }\n break;\n case PathParser.QUAD_TO:\n if (ctx) {\n ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);\n }\n break;\n case PathParser.ARC:\n {\n const [cx, cy, rx, ry, theta, dTheta, psi, fs] = points;\n const r = rx > ry ? rx : ry;\n const scaleX = rx > ry ? 1 : rx / ry;\n const scaleY = rx > ry ? ry / rx : 1;\n if (ctx) {\n ctx.translate(cx, cy);\n ctx.rotate(psi);\n ctx.scale(scaleX, scaleY);\n ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));\n ctx.scale(1 / scaleX, 1 / scaleY);\n ctx.rotate(-psi);\n ctx.translate(-cx, -cy);\n }\n break;\n }\n case PathParser.CLOSE_PATH:\n if (ctx) {\n ctx.closePath();\n }\n break;\n }\n });\n }\n renderChildren(ctx) {\n this.setTextData(ctx);\n ctx.save();\n const textDecoration = this.parent.getStyle('text-decoration').getString();\n const fontSize = this.getFontSize();\n const { glyphInfo } = this;\n const fill = ctx.fillStyle;\n if (textDecoration === 'underline') {\n ctx.beginPath();\n }\n glyphInfo.forEach((glyph, i)=>{\n const { p0 , p1 , rotation , text: partialText } = glyph;\n ctx.save();\n ctx.translate(p0.x, p0.y);\n ctx.rotate(rotation);\n if (ctx.fillStyle) {\n ctx.fillText(partialText, 0, 0);\n }\n if (ctx.strokeStyle) {\n ctx.strokeText(partialText, 0, 0);\n }\n ctx.restore();\n if (textDecoration === 'underline') {\n if (i === 0) {\n ctx.moveTo(p0.x, p0.y + fontSize / 8);\n }\n ctx.lineTo(p1.x, p1.y + fontSize / 5);\n }\n // // To assist with debugging visually, uncomment following\n //\n // ctx.beginPath();\n // if (i % 2)\n // ctx.strokeStyle = 'red';\n // else\n // ctx.strokeStyle = 'green';\n // ctx.moveTo(p0.x, p0.y);\n // ctx.lineTo(p1.x, p1.y);\n // ctx.stroke();\n // ctx.closePath();\n });\n if (textDecoration === 'underline') {\n ctx.lineWidth = fontSize / 20;\n ctx.strokeStyle = fill;\n ctx.stroke();\n ctx.closePath();\n }\n ctx.restore();\n }\n getLetterSpacingAt() {\n let idx = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;\n return this.letterSpacingCache[idx] || 0;\n }\n findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, dy, c, charI) {\n let offset = inputOffset;\n let glyphWidth = this.measureText(ctx, c);\n if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {\n glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;\n }\n if (charI > -1) {\n offset += this.getLetterSpacingAt(charI);\n }\n const splineStep = this.textHeight / 20;\n const p0 = this.getEquidistantPointOnPath(offset, splineStep, 0);\n const p1 = this.getEquidistantPointOnPath(offset + glyphWidth, splineStep, 0);\n const segment = {\n p0,\n p1\n };\n const rotation = p0 && p1 ? Math.atan2(p1.y - p0.y, p1.x - p0.x) : 0;\n if (dy) {\n const dyX = Math.cos(Math.PI / 2 + rotation) * dy;\n const dyY = Math.cos(-rotation) * dy;\n segment.p0 = {\n ...p0,\n x: p0.x + dyX,\n y: p0.y + dyY\n };\n segment.p1 = {\n ...p1,\n x: p1.x + dyX,\n y: p1.y + dyY\n };\n }\n offset += glyphWidth;\n return {\n offset,\n segment,\n rotation\n };\n }\n measureText(ctx, text) {\n const { measuresCache } = this;\n const targetText = text || this.getText();\n if (measuresCache.has(targetText)) {\n return measuresCache.get(targetText);\n }\n const measure = this.measureTargetText(ctx, targetText);\n measuresCache.set(targetText, measure);\n return measure;\n }\n // This method supposes what all custom fonts already loaded.\n // If some font will be loaded after this method call, <textPath> will not be rendered correctly.\n // You need to call this method manually to update glyphs cache.\n setTextData(ctx) {\n if (this.glyphInfo) {\n return;\n }\n const renderText = this.getText();\n const chars = renderText.split('');\n const spacesNumber = renderText.split(' ').length - 1;\n const dx = this.parent.getAttribute('dx').split().map((_)=>_.getPixels('x')\n );\n const dy = this.parent.getAttribute('dy').getPixels('y');\n const anchor = this.parent.getStyle('text-anchor').getString('start');\n const thisSpacing = this.getStyle('letter-spacing');\n const parentSpacing = this.parent.getStyle('letter-spacing');\n let letterSpacing = 0;\n if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {\n letterSpacing = parentSpacing.getPixels();\n } else if (thisSpacing.hasValue()) {\n if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {\n letterSpacing = thisSpacing.getPixels();\n }\n }\n // fill letter-spacing cache\n const letterSpacingCache = [];\n const textLen = renderText.length;\n this.letterSpacingCache = letterSpacingCache;\n for(let i1 = 0; i1 < textLen; i1++){\n letterSpacingCache.push(typeof dx[i1] !== 'undefined' ? dx[i1] : letterSpacing);\n }\n const dxSum = letterSpacingCache.reduce((acc, cur, i)=>i === 0 ? 0 : acc + cur || 0\n , 0);\n const textWidth = this.measureText(ctx);\n const textFullWidth = Math.max(textWidth + dxSum, 0);\n this.textWidth = textWidth;\n this.textHeight = this.getFontSize();\n this.glyphInfo = [];\n const fullPathWidth = this.getPathLength();\n const startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;\n let offset = 0;\n if (anchor === 'middle' || anchor === 'center') {\n offset = -textFullWidth / 2;\n }\n if (anchor === 'end' || anchor === 'right') {\n offset = -textFullWidth;\n }\n offset += startOffset;\n chars.forEach((char, i)=>{\n // Find such segment what distance between p0 and p1 is approx. width of glyph\n const { offset: nextOffset , segment , rotation } = this.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, dy, char, i);\n offset = nextOffset;\n if (!segment.p0 || !segment.p1) {\n return;\n }\n // const width = this.getLineLength(\n // segment.p0.x,\n // segment.p0.y,\n // segment.p1.x,\n // segment.p1.y\n // );\n // Note: Since glyphs are rendered one at a time, any kerning pair data built into the font will not be used.\n // Can foresee having a rough pair table built in that the developer can override as needed.\n // Or use \"dx\" attribute of the <text> node as a naive replacement\n // const kern = 0;\n // placeholder for future implementation\n // const midpoint = this.getPointOnLine(\n // kern + width / 2.0,\n // segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y\n // );\n this.glyphInfo.push({\n // transposeX: midpoint.x,\n // transposeY: midpoint.y,\n text: chars[i],\n p0: segment.p0,\n p1: segment.p1,\n rotation\n });\n });\n }\n parsePathData(path) {\n this.pathLength = -1 // reset path length\n ;\n if (!path) {\n return [];\n }\n const pathCommands = [];\n const { pathParser } = path;\n pathParser.reset();\n // convert l, H, h, V, and v to L\n while(!pathParser.isEnd()){\n const { current } = pathParser;\n const startX = current ? current.x : 0;\n const startY = current ? current.y : 0;\n const command = pathParser.next();\n let nextCommandType = command.type;\n let points = [];\n switch(command.type){\n case PathParser.MOVE_TO:\n this.pathM(pathParser, points);\n break;\n case PathParser.LINE_TO:\n nextCommandType = this.pathL(pathParser, points);\n break;\n case PathParser.HORIZ_LINE_TO:\n nextCommandType = this.pathH(pathParser, points);\n break;\n case PathParser.VERT_LINE_TO:\n nextCommandType = this.pathV(pathParser, points);\n break;\n case PathParser.CURVE_TO:\n this.pathC(pathParser, points);\n break;\n case PathParser.SMOOTH_CURVE_TO:\n nextCommandType = this.pathS(pathParser, points);\n break;\n case PathParser.QUAD_TO:\n this.pathQ(pathParser, points);\n break;\n case PathParser.SMOOTH_QUAD_TO:\n nextCommandType = this.pathT(pathParser, points);\n break;\n case PathParser.ARC:\n points = this.pathA(pathParser);\n break;\n case PathParser.CLOSE_PATH:\n PathElement.pathZ(pathParser);\n break;\n }\n if (command.type !== PathParser.CLOSE_PATH) {\n pathCommands.push({\n type: nextCommandType,\n points,\n start: {\n x: startX,\n y: startY\n },\n pathLength: this.calcLength(startX, startY, nextCommandType, points)\n });\n } else {\n pathCommands.push({\n type: PathParser.CLOSE_PATH,\n points: [],\n pathLength: 0\n });\n }\n }\n return pathCommands;\n }\n pathM(pathParser, points) {\n const { x , y } = PathElement.pathM(pathParser).point;\n points.push(x, y);\n }\n pathL(pathParser, points) {\n const { x , y } = PathElement.pathL(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathH(pathParser, points) {\n const { x , y } = PathElement.pathH(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathV(pathParser, points) {\n const { x , y } = PathElement.pathV(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathC(pathParser, points) {\n const { point , controlPoint , currentPoint } = PathElement.pathC(pathParser);\n points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n pathS(pathParser, points) {\n const { point , controlPoint , currentPoint } = PathElement.pathS(pathParser);\n points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n return PathParser.CURVE_TO;\n }\n pathQ(pathParser, points) {\n const { controlPoint , currentPoint } = PathElement.pathQ(pathParser);\n points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n pathT(pathParser, points) {\n const { controlPoint , currentPoint } = PathElement.pathT(pathParser);\n points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n return PathParser.QUAD_TO;\n }\n pathA(pathParser) {\n let { rX , rY , sweepFlag , xAxisRotation , centp , a1 , ad } = PathElement.pathA(pathParser);\n if (sweepFlag === 0 && ad > 0) {\n ad -= 2 * Math.PI;\n }\n if (sweepFlag === 1 && ad < 0) {\n ad += 2 * Math.PI;\n }\n return [\n centp.x,\n centp.y,\n rX,\n rY,\n a1,\n ad,\n xAxisRotation,\n sweepFlag\n ];\n }\n calcLength(x, y, commandType, points) {\n let len = 0;\n let p1 = null;\n let p2 = null;\n let t = 0;\n switch(commandType){\n case PathParser.LINE_TO:\n return this.getLineLength(x, y, points[0], points[1]);\n case PathParser.CURVE_TO:\n // Approximates by breaking curve into 100 line segments\n len = 0;\n p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n for(t = 0.01; t <= 1; t += 0.01){\n p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case PathParser.QUAD_TO:\n // Approximates by breaking curve into 100 line segments\n len = 0;\n p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);\n for(t = 0.01; t <= 1; t += 0.01){\n p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case PathParser.ARC:\n {\n // Approximates by breaking curve into line segments\n len = 0;\n const start = points[4];\n // 4 = theta\n const dTheta = points[5];\n // 5 = dTheta\n const end = points[4] + dTheta;\n let inc = Math.PI / 180;\n // 1 degree resolution\n if (Math.abs(start - end) < inc) {\n inc = Math.abs(start - end);\n }\n // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi\n p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);\n if (dTheta < 0) {\n for(t = start - inc; t > end; t -= inc){\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n } else {\n for(t = start + inc; t < end; t += inc){\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n }\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n return len;\n }\n }\n return 0;\n }\n getPointOnLine(dist, p1x, p1y, p2x, p2y) {\n let fromX = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : p1x, fromY = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : p1y;\n const m = (p2y - p1y) / (p2x - p1x + PSEUDO_ZERO);\n let run = Math.sqrt(dist * dist / (1 + m * m));\n if (p2x < p1x) {\n run *= -1;\n }\n let rise = m * run;\n let pt = null;\n if (p2x === p1x) {\n pt = {\n x: fromX,\n y: fromY + rise\n };\n } else if ((fromY - p1y) / (fromX - p1x + PSEUDO_ZERO) === m) {\n pt = {\n x: fromX + run,\n y: fromY + rise\n };\n } else {\n let ix = 0;\n let iy = 0;\n const len = this.getLineLength(p1x, p1y, p2x, p2y);\n if (len < PSEUDO_ZERO) {\n return null;\n }\n let u = (fromX - p1x) * (p2x - p1x) + (fromY - p1y) * (p2y - p1y);\n u /= len * len;\n ix = p1x + u * (p2x - p1x);\n iy = p1y + u * (p2y - p1y);\n const pRise = this.getLineLength(fromX, fromY, ix, iy);\n const pRun = Math.sqrt(dist * dist - pRise * pRise);\n run = Math.sqrt(pRun * pRun / (1 + m * m));\n if (p2x < p1x) {\n run *= -1;\n }\n rise = m * run;\n pt = {\n x: ix + run,\n y: iy + rise\n };\n }\n return pt;\n }\n getPointOnPath(distance) {\n const fullLen = this.getPathLength();\n let cumulativePathLength = 0;\n let p = null;\n if (distance < -0.00005 || distance - 0.00005 > fullLen) {\n return null;\n }\n const { dataArray } = this;\n for (const command of dataArray){\n if (command && (command.pathLength < 0.00005 || cumulativePathLength + command.pathLength + 0.00005 < distance)) {\n cumulativePathLength += command.pathLength;\n continue;\n }\n const delta = distance - cumulativePathLength;\n let currentT = 0;\n switch(command.type){\n case PathParser.LINE_TO:\n p = this.getPointOnLine(delta, command.start.x, command.start.y, command.points[0], command.points[1], command.start.x, command.start.y);\n break;\n case PathParser.ARC:\n {\n const start = command.points[4];\n // 4 = theta\n const dTheta = command.points[5];\n // 5 = dTheta\n const end = command.points[4] + dTheta;\n currentT = start + delta / command.pathLength * dTheta;\n if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {\n break;\n }\n p = this.getPointOnEllipticalArc(command.points[0], command.points[1], command.points[2], command.points[3], currentT, command.points[6]);\n break;\n }\n case PathParser.CURVE_TO:\n currentT = delta / command.pathLength;\n if (currentT > 1) {\n currentT = 1;\n }\n p = this.getPointOnCubicBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3], command.points[4], command.points[5]);\n break;\n case PathParser.QUAD_TO:\n currentT = delta / command.pathLength;\n if (currentT > 1) {\n currentT = 1;\n }\n p = this.getPointOnQuadraticBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3]);\n break;\n }\n if (p) {\n return p;\n }\n break;\n }\n return null;\n }\n getLineLength(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n getPathLength() {\n if (this.pathLength === -1) {\n this.pathLength = this.dataArray.reduce((length, command)=>command.pathLength > 0 ? length + command.pathLength : length\n , 0);\n }\n return this.pathLength;\n }\n getPointOnCubicBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y) {\n const x = p4x * CB1(pct) + p3x * CB2(pct) + p2x * CB3(pct) + p1x * CB4(pct);\n const y = p4y * CB1(pct) + p3y * CB2(pct) + p2y * CB3(pct) + p1y * CB4(pct);\n return {\n x,\n y\n };\n }\n getPointOnQuadraticBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y) {\n const x = p3x * QB1(pct) + p2x * QB2(pct) + p1x * QB3(pct);\n const y = p3y * QB1(pct) + p2y * QB2(pct) + p1y * QB3(pct);\n return {\n x,\n y\n };\n }\n getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {\n const cosPsi = Math.cos(psi);\n const sinPsi = Math.sin(psi);\n const pt = {\n x: rx * Math.cos(theta),\n y: ry * Math.sin(theta)\n };\n return {\n x: cx + (pt.x * cosPsi - pt.y * sinPsi),\n y: cy + (pt.x * sinPsi + pt.y * cosPsi)\n };\n }\n // TODO need some optimisations. possibly build cache only for curved segments?\n buildEquidistantCache(inputStep, inputPrecision) {\n const fullLen = this.getPathLength();\n const precision = inputPrecision || 0.25 // accuracy vs performance\n ;\n const step = inputStep || fullLen / 100;\n if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {\n // Prepare cache\n this.equidistantCache = {\n step,\n precision,\n points: []\n };\n // Calculate points\n let s = 0;\n for(let l = 0; l <= fullLen; l += precision){\n const p0 = this.getPointOnPath(l);\n const p1 = this.getPointOnPath(l + precision);\n if (!p0 || !p1) {\n continue;\n }\n s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);\n if (s >= step) {\n this.equidistantCache.points.push({\n x: p0.x,\n y: p0.y,\n distance: l\n });\n s -= step;\n }\n }\n }\n }\n getEquidistantPointOnPath(targetDistance, step, precision) {\n this.buildEquidistantCache(step, precision);\n if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {\n return null;\n }\n const idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));\n return this.equidistantCache.points[idx] || null;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'textPath';\n this.textWidth = 0;\n this.textHeight = 0;\n this.pathLength = -1;\n this.glyphInfo = null;\n this.letterSpacingCache = [];\n this.measuresCache = new Map([\n [\n '',\n 0\n ]\n ]);\n const pathElement = this.getHrefAttribute().getDefinition();\n this.text = this.getTextFromNode();\n this.dataArray = this.parsePathData(pathElement);\n }\n}\n\n// groups: 1: mime-type (+ charset), 2: mime-type (w/o charset), 3: charset, 4: base64?, 5: body\nconst dataUriRegex = /^\\s*data:(([^/,;]+\\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;\nclass ImageElement extends RenderedElement {\n async loadImage(href) {\n try {\n const image = await this.document.createImage(href);\n this.image = image;\n } catch (err) {\n console.error(\"Error while loading image \\\"\".concat(href, \"\\\":\"), err);\n }\n this.loaded = true;\n }\n async loadSvg(href) {\n const match = dataUriRegex.exec(href);\n if (match) {\n const data = match[5];\n if (data) {\n if (match[4] === 'base64') {\n this.image = atob(data);\n } else {\n this.image = decodeURIComponent(data);\n }\n }\n } else {\n try {\n const response = await this.document.fetch(href);\n const svg = await response.text();\n this.image = svg;\n } catch (err) {\n console.error(\"Error while loading image \\\"\".concat(href, \"\\\":\"), err);\n }\n }\n this.loaded = true;\n }\n renderChildren(ctx) {\n const { document , image , loaded } = this;\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width').getPixels('x');\n const height = this.getStyle('height').getPixels('y');\n if (!loaded || !image || !width || !height) {\n return;\n }\n ctx.save();\n ctx.translate(x, y);\n if (typeof image === 'string') {\n const subDocument = document.canvg.forkString(ctx, image, {\n ignoreMouse: true,\n ignoreAnimation: true,\n ignoreDimensions: true,\n ignoreClear: true,\n offsetX: 0,\n offsetY: 0,\n scaleWidth: width,\n scaleHeight: height\n });\n const { documentElement } = subDocument.document;\n if (documentElement) {\n documentElement.parent = this;\n }\n void subDocument.render();\n } else {\n document.setViewBox({\n ctx,\n aspectRatio: this.getAttribute('preserveAspectRatio').getString(),\n width,\n desiredWidth: image.width,\n height,\n desiredHeight: image.height\n });\n if (this.loaded) {\n if (!('complete' in image) || image.complete) {\n ctx.drawImage(image, 0, 0);\n }\n }\n }\n ctx.restore();\n }\n getBoundingBox() {\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width').getPixels('x');\n const height = this.getStyle('height').getPixels('y');\n return new BoundingBox(x, y, x + width, y + height);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'image';\n this.loaded = false;\n const href = this.getHrefAttribute().getString();\n if (!href) {\n return;\n }\n const isSvg = href.endsWith('.svg') || /^\\s*data:image\\/svg\\+xml/i.test(href);\n document.images.push(this);\n if (!isSvg) {\n void this.loadImage(href);\n } else {\n void this.loadSvg(href);\n }\n }\n}\n\nclass SymbolElement extends RenderedElement {\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'symbol';\n }\n}\n\nclass SVGFontLoader {\n async load(fontFamily, url) {\n try {\n const { document } = this;\n const svgDocument = await document.canvg.parser.load(url);\n const fonts = svgDocument.getElementsByTagName('font');\n Array.from(fonts).forEach((fontNode)=>{\n const font = document.createElement(fontNode);\n document.definitions[fontFamily] = font;\n });\n } catch (err) {\n console.error(\"Error while loading font \\\"\".concat(url, \"\\\":\"), err);\n }\n this.loaded = true;\n }\n constructor(document){\n this.document = document;\n this.loaded = false;\n document.fonts.push(this);\n }\n}\n\nclass StyleElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'style';\n const css = compressSpaces(Array.from(node.childNodes)// NEED TEST\n .map((_)=>_.textContent\n ).join('').replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm, '') // remove comments\n .replace(/@import.*;/g, '') // remove imports\n );\n const cssDefs = css.split('}');\n cssDefs.forEach((_1)=>{\n const def = _1.trim();\n if (!def) {\n return;\n }\n const cssParts = def.split('{');\n const cssClasses = cssParts[0].split(',');\n const cssProps = cssParts[1].split(';');\n cssClasses.forEach((_)=>{\n const cssClass = _.trim();\n if (!cssClass) {\n return;\n }\n const props = document.styles[cssClass] || {};\n cssProps.forEach((cssProp)=>{\n const prop = cssProp.indexOf(':');\n const name = cssProp.substr(0, prop).trim();\n const value = cssProp.substr(prop + 1, cssProp.length - prop).trim();\n if (name && value) {\n props[name] = new Property(document, name, value);\n }\n });\n document.styles[cssClass] = props;\n document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);\n if (cssClass === '@font-face') {\n const fontFamily = props['font-family'].getString().replace(/\"|'/g, '');\n const srcs = props.src.getString().split(',');\n srcs.forEach((src)=>{\n if (src.indexOf('format(\"svg\")') > 0) {\n const url = parseExternalUrl(src);\n if (url) {\n void new SVGFontLoader(document).load(fontFamily, url);\n }\n }\n });\n }\n });\n });\n }\n}\nStyleElement.parseExternalUrl = parseExternalUrl;\n\nclass UseElement extends RenderedElement {\n setContext(ctx) {\n super.setContext(ctx);\n const xAttr = this.getAttribute('x');\n const yAttr = this.getAttribute('y');\n if (xAttr.hasValue()) {\n ctx.translate(xAttr.getPixels('x'), 0);\n }\n if (yAttr.hasValue()) {\n ctx.translate(0, yAttr.getPixels('y'));\n }\n }\n path(ctx) {\n const { element } = this;\n if (element) {\n element.path(ctx);\n }\n }\n renderChildren(ctx) {\n const { document , element } = this;\n if (element) {\n let tempSvg = element;\n if (element.type === 'symbol') {\n // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)\n tempSvg = new SVGElement(document);\n tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());\n tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());\n tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());\n tempSvg.children = element.children;\n // element is still the parent of the children\n element.styles.opacity = new Property(document, 'opacity', this.calculateOpacity());\n }\n if (tempSvg.type === 'svg') {\n const widthStyle = this.getStyle('width', false, true);\n const heightStyle = this.getStyle('height', false, true);\n // if symbol or svg, inherit width/height from me\n if (widthStyle.hasValue()) {\n tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());\n }\n if (heightStyle.hasValue()) {\n tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());\n }\n }\n const oldParent = tempSvg.parent;\n tempSvg.parent = this;\n tempSvg.render(ctx);\n tempSvg.parent = oldParent;\n }\n }\n getBoundingBox(ctx) {\n const { element } = this;\n if (element) {\n return element.getBoundingBox(ctx);\n }\n return null;\n }\n elementTransform() {\n const { document , element } = this;\n if (!element) {\n return null;\n }\n return Transform.fromElement(document, element);\n }\n get element() {\n if (!this.cachedElement) {\n this.cachedElement = this.getHrefAttribute().getDefinition();\n }\n return this.cachedElement;\n }\n constructor(...args){\n super(...args);\n this.type = 'use';\n }\n}\n\nfunction imGet(img, x, y, width, _height, rgba) {\n return img[y * width * 4 + x * 4 + rgba];\n}\nfunction imSet(img, x, y, width, _height, rgba, val) {\n img[y * width * 4 + x * 4 + rgba] = val;\n}\nfunction m(matrix, i, v) {\n const mi = matrix[i];\n return mi * v;\n}\nfunction c(a, m1, m2, m3) {\n return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;\n}\nclass FeColorMatrixElement extends Element {\n apply(ctx, _x, _y, width, height) {\n // assuming x==0 && y==0 for now\n const { includeOpacity , matrix } = this;\n const srcData = ctx.getImageData(0, 0, width, height);\n for(let y = 0; y < height; y++){\n for(let x = 0; x < width; x++){\n const r = imGet(srcData.data, x, y, width, height, 0);\n const g = imGet(srcData.data, x, y, width, height, 1);\n const b = imGet(srcData.data, x, y, width, height, 2);\n const a = imGet(srcData.data, x, y, width, height, 3);\n let nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);\n let ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);\n let nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);\n let na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);\n if (includeOpacity) {\n nr = 0;\n ng = 0;\n nb = 0;\n na *= a / 255;\n }\n imSet(srcData.data, x, y, width, height, 0, nr);\n imSet(srcData.data, x, y, width, height, 1, ng);\n imSet(srcData.data, x, y, width, height, 2, nb);\n imSet(srcData.data, x, y, width, height, 3, na);\n }\n }\n ctx.clearRect(0, 0, width, height);\n ctx.putImageData(srcData, 0, 0);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feColorMatrix';\n let matrix = toNumbers(this.getAttribute('values').getString());\n switch(this.getAttribute('type').getString('matrix')){\n case 'saturate':\n {\n const s = matrix[0];\n /* eslint-disable array-element-newline */ matrix = [\n 0.213 + 0.787 * s,\n 0.715 - 0.715 * s,\n 0.072 - 0.072 * s,\n 0,\n 0,\n 0.213 - 0.213 * s,\n 0.715 + 0.285 * s,\n 0.072 - 0.072 * s,\n 0,\n 0,\n 0.213 - 0.213 * s,\n 0.715 - 0.715 * s,\n 0.072 + 0.928 * s,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n case 'hueRotate':\n {\n const a = matrix[0] * Math.PI / 180;\n /* eslint-disable array-element-newline */ matrix = [\n c(a, 0.213, 0.787, -0.213),\n c(a, 0.715, -0.715, -0.715),\n c(a, 0.072, -0.072, 0.928),\n 0,\n 0,\n c(a, 0.213, -0.213, 0.143),\n c(a, 0.715, 0.285, 0.14),\n c(a, 0.072, -0.072, -0.283),\n 0,\n 0,\n c(a, 0.213, -0.213, -0.787),\n c(a, 0.715, -0.715, 0.715),\n c(a, 0.072, 0.928, 0.072),\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n case 'luminanceToAlpha':\n /* eslint-disable array-element-newline */ matrix = [\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0.2125,\n 0.7154,\n 0.0721,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n this.matrix = matrix;\n this.includeOpacity = this.getAttribute('includeOpacity').hasValue();\n }\n}\n\nclass MaskElement extends Element {\n apply(ctx, element) {\n const { document } = this;\n // render as temp svg\n let x = this.getAttribute('x').getPixels('x');\n let y = this.getAttribute('y').getPixels('y');\n let width = this.getStyle('width').getPixels('x');\n let height = this.getStyle('height').getPixels('y');\n if (!width && !height) {\n const boundingBox = new BoundingBox();\n this.children.forEach((child)=>{\n boundingBox.addBoundingBox(child.getBoundingBox(ctx));\n });\n x = Math.floor(boundingBox.x1);\n y = Math.floor(boundingBox.y1);\n width = Math.floor(boundingBox.width);\n height = Math.floor(boundingBox.height);\n }\n const ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);\n const maskCanvas = document.createCanvas(x + width, y + height);\n const maskCtx = maskCanvas.getContext('2d');\n document.screen.setDefaults(maskCtx);\n this.renderChildren(maskCtx);\n // convert mask to alpha with a fake node\n // TODO: refactor out apply from feColorMatrix\n new FeColorMatrixElement(document, {\n nodeType: 1,\n childNodes: [],\n attributes: [\n {\n nodeName: 'type',\n value: 'luminanceToAlpha'\n },\n {\n nodeName: 'includeOpacity',\n value: 'true'\n }\n ]\n }).apply(maskCtx, 0, 0, x + width, y + height);\n const tmpCanvas = document.createCanvas(x + width, y + height);\n const tmpCtx = tmpCanvas.getContext('2d');\n document.screen.setDefaults(tmpCtx);\n element.render(tmpCtx);\n tmpCtx.globalCompositeOperation = 'destination-in';\n tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');\n tmpCtx.fillRect(0, 0, x + width, y + height);\n ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');\n ctx.fillRect(0, 0, x + width, y + height);\n // reassign mask\n this.restoreStyles(element, ignoredStyles);\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'mask';\n }\n}\nMaskElement.ignoreStyles = [\n 'mask',\n 'transform',\n 'clip-path'\n];\n\nconst noop = ()=>{\n// NOOP\n};\nclass ClipPathElement extends Element {\n apply(ctx) {\n const { document } = this;\n const contextProto = Reflect.getPrototypeOf(ctx);\n const { beginPath , closePath } = ctx;\n if (contextProto) {\n contextProto.beginPath = noop;\n contextProto.closePath = noop;\n }\n Reflect.apply(beginPath, ctx, []);\n this.children.forEach((child)=>{\n if (!('path' in child)) {\n return;\n }\n let transform = 'elementTransform' in child ? child.elementTransform() : null // handle <use />\n ;\n if (!transform) {\n transform = Transform.fromElement(document, child);\n }\n if (transform) {\n transform.apply(ctx);\n }\n child.path(ctx);\n if (contextProto) {\n contextProto.closePath = closePath;\n }\n if (transform) {\n transform.unapply(ctx);\n }\n });\n Reflect.apply(closePath, ctx, []);\n ctx.clip();\n if (contextProto) {\n contextProto.beginPath = beginPath;\n contextProto.closePath = closePath;\n }\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'clipPath';\n }\n}\n\nclass FilterElement extends Element {\n apply(ctx, element) {\n // render as temp svg\n const { document , children } = this;\n const boundingBox = 'getBoundingBox' in element ? element.getBoundingBox(ctx) : null;\n if (!boundingBox) {\n return;\n }\n let px = 0;\n let py = 0;\n children.forEach((child)=>{\n const efd = child.extraFilterDistance || 0;\n px = Math.max(px, efd);\n py = Math.max(py, efd);\n });\n const width = Math.floor(boundingBox.width);\n const height = Math.floor(boundingBox.height);\n const tmpCanvasWidth = width + 2 * px;\n const tmpCanvasHeight = height + 2 * py;\n if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {\n return;\n }\n const x = Math.floor(boundingBox.x);\n const y = Math.floor(boundingBox.y);\n const ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);\n const tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);\n const tmpCtx = tmpCanvas.getContext('2d');\n document.screen.setDefaults(tmpCtx);\n tmpCtx.translate(-x + px, -y + py);\n element.render(tmpCtx);\n // apply filters\n children.forEach((child)=>{\n if (typeof child.apply === 'function') {\n child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);\n }\n });\n // render on me\n ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);\n this.restoreStyles(element, ignoredStyles);\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'filter';\n }\n}\nFilterElement.ignoreStyles = [\n 'filter',\n 'transform',\n 'clip-path'\n];\n\nclass FeDropShadowElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feDropShadow';\n this.addStylesFromStyleDefinition();\n }\n}\n\nclass FeMorphologyElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(...args){\n super(...args);\n this.type = 'feMorphology';\n }\n}\n\nclass FeCompositeElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(...args){\n super(...args);\n this.type = 'feComposite';\n }\n}\n\nclass FeGaussianBlurElement extends Element {\n apply(ctx, x, y, width, height) {\n const { document , blurRadius } = this;\n const body = document.window ? document.window.document.body : null;\n const canvas = ctx.canvas;\n // StackBlur requires canvas be on document\n canvas.id = document.getUniqueId();\n if (body) {\n canvas.style.display = 'none';\n body.appendChild(canvas);\n }\n stackblurCanvas.canvasRGBA(canvas, x, y, width, height, blurRadius);\n if (body) {\n body.removeChild(canvas);\n }\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feGaussianBlur';\n this.blurRadius = Math.floor(this.getAttribute('stdDeviation').getNumber());\n this.extraFilterDistance = this.blurRadius;\n }\n}\n\nclass TitleElement extends Element {\n constructor(...args){\n super(...args);\n this.type = 'title';\n }\n}\n\nclass DescElement extends Element {\n constructor(...args){\n super(...args);\n this.type = 'desc';\n }\n}\n\nconst elements = {\n 'svg': SVGElement,\n 'rect': RectElement,\n 'circle': CircleElement,\n 'ellipse': EllipseElement,\n 'line': LineElement,\n 'polyline': PolylineElement,\n 'polygon': PolygonElement,\n 'path': PathElement,\n 'pattern': PatternElement,\n 'marker': MarkerElement,\n 'defs': DefsElement,\n 'linearGradient': LinearGradientElement,\n 'radialGradient': RadialGradientElement,\n 'stop': StopElement,\n 'animate': AnimateElement,\n 'animateColor': AnimateColorElement,\n 'animateTransform': AnimateTransformElement,\n 'font': FontElement,\n 'font-face': FontFaceElement,\n 'missing-glyph': MissingGlyphElement,\n 'glyph': GlyphElement,\n 'text': TextElement,\n 'tspan': TSpanElement,\n 'tref': TRefElement,\n 'a': AElement,\n 'textPath': TextPathElement,\n 'image': ImageElement,\n 'g': GElement,\n 'symbol': SymbolElement,\n 'style': StyleElement,\n 'use': UseElement,\n 'mask': MaskElement,\n 'clipPath': ClipPathElement,\n 'filter': FilterElement,\n 'feDropShadow': FeDropShadowElement,\n 'feMorphology': FeMorphologyElement,\n 'feComposite': FeCompositeElement,\n 'feColorMatrix': FeColorMatrixElement,\n 'feGaussianBlur': FeGaussianBlurElement,\n 'title': TitleElement,\n 'desc': DescElement\n};\n\nfunction createCanvas(width, height) {\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n}\nasync function createImage(src) {\n let anonymousCrossOrigin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n const image = document.createElement('img');\n if (anonymousCrossOrigin) {\n image.crossOrigin = 'Anonymous';\n }\n return new Promise((resolve, reject)=>{\n image.onload = ()=>{\n resolve(image);\n };\n image.onerror = (_event, _source, _lineno, _colno, error)=>{\n reject(error);\n };\n image.src = src;\n });\n}\nconst DEFAULT_EM_SIZE = 12;\nclass Document {\n bindCreateImage(createImage1, anonymousCrossOrigin) {\n if (typeof anonymousCrossOrigin === 'boolean') {\n return (source, forceAnonymousCrossOrigin)=>createImage1(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin)\n ;\n }\n return createImage1;\n }\n get window() {\n return this.screen.window;\n }\n get fetch() {\n return this.screen.fetch;\n }\n get ctx() {\n return this.screen.ctx;\n }\n get emSize() {\n const { emSizeStack } = this;\n return emSizeStack[emSizeStack.length - 1] || DEFAULT_EM_SIZE;\n }\n set emSize(value) {\n const { emSizeStack } = this;\n emSizeStack.push(value);\n }\n popEmSize() {\n const { emSizeStack } = this;\n emSizeStack.pop();\n }\n getUniqueId() {\n return \"canvg\".concat(++this.uniqueId);\n }\n isImagesLoaded() {\n return this.images.every((_)=>_.loaded\n );\n }\n isFontsLoaded() {\n return this.fonts.every((_)=>_.loaded\n );\n }\n createDocumentElement(document) {\n const documentElement = this.createElement(document.documentElement);\n documentElement.root = true;\n documentElement.addStylesFromStyleDefinition();\n this.documentElement = documentElement;\n return documentElement;\n }\n createElement(node) {\n const elementType = node.nodeName.replace(/^[^:]+:/, '');\n const ElementType = Document.elementTypes[elementType];\n if (ElementType) {\n return new ElementType(this, node);\n }\n return new UnknownElement(this, node);\n }\n createTextNode(node) {\n return new TextNode(this, node);\n }\n setViewBox(config) {\n this.screen.setViewBox({\n document: this,\n ...config\n });\n }\n constructor(canvg, { rootEmSize =DEFAULT_EM_SIZE , emSize =DEFAULT_EM_SIZE , createCanvas: createCanvas1 = Document.createCanvas , createImage: createImage2 = Document.createImage , anonymousCrossOrigin } = {}){\n this.canvg = canvg;\n this.definitions = {};\n this.styles = {};\n this.stylesSpecificity = {};\n this.images = [];\n this.fonts = [];\n this.emSizeStack = [];\n this.uniqueId = 0;\n this.screen = canvg.screen;\n this.rootEmSize = rootEmSize;\n this.emSize = emSize;\n this.createCanvas = createCanvas1;\n this.createImage = this.bindCreateImage(createImage2, anonymousCrossOrigin);\n this.screen.wait(()=>this.isImagesLoaded()\n );\n this.screen.wait(()=>this.isFontsLoaded()\n );\n }\n}\nDocument.createCanvas = createCanvas;\nDocument.createImage = createImage;\nDocument.elementTypes = elements;\n\n/**\n * SVG renderer on canvas.\n */ class Canvg {\n /**\n * Create Canvg instance from SVG source string or URL.\n * @param ctx - Rendering context.\n * @param svg - SVG source string or URL.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ static async from(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n const parser = new Parser(options);\n const svgDocument = await parser.parse(svg);\n return new Canvg(ctx, svgDocument, options);\n }\n /**\n * Create Canvg instance from SVG source string.\n * @param ctx - Rendering context.\n * @param svg - SVG source string.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ static fromString(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n const parser = new Parser(options);\n const svgDocument = parser.parseFromString(svg);\n return new Canvg(ctx, svgDocument, options);\n }\n /**\n * Create new Canvg instance with inherited options.\n * @param ctx - Rendering context.\n * @param svg - SVG source string or URL.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ fork(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n return Canvg.from(ctx, svg, {\n ...this.options,\n ...options\n });\n }\n /**\n * Create new Canvg instance with inherited options.\n * @param ctx - Rendering context.\n * @param svg - SVG source string.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ forkString(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n return Canvg.fromString(ctx, svg, {\n ...this.options,\n ...options\n });\n }\n /**\n * Document is ready promise.\n * @returns Ready promise.\n */ ready() {\n return this.screen.ready();\n }\n /**\n * Document is ready value.\n * @returns Is ready or not.\n */ isReady() {\n return this.screen.isReady();\n }\n /**\n * Render only first frame, ignoring animations and mouse.\n * @param options - Rendering options.\n */ async render() {\n let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n this.start({\n enableRedraw: true,\n ignoreAnimation: true,\n ignoreMouse: true,\n ...options\n });\n await this.ready();\n this.stop();\n }\n /**\n * Start rendering.\n * @param options - Render options.\n */ start() {\n let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n const { documentElement , screen , options: baseOptions } = this;\n screen.start(documentElement, {\n enableRedraw: true,\n ...baseOptions,\n ...options\n });\n }\n /**\n * Stop rendering.\n */ stop() {\n this.screen.stop();\n }\n /**\n * Resize SVG to fit in given size.\n * @param width\n * @param height\n * @param preserveAspectRatio\n */ resize(width) {\n let height = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : width, preserveAspectRatio = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n this.documentElement.resize(width, height, preserveAspectRatio);\n }\n /**\n * Main constructor.\n * @param ctx - Rendering context.\n * @param svg - SVG Document.\n * @param options - Rendering options.\n */ constructor(ctx, svg, options = {}){\n this.parser = new Parser(options);\n this.screen = new Screen(ctx, options);\n this.options = options;\n const document = new Document(this, options);\n const documentElement = document.createDocumentElement(svg);\n this.document = document;\n this.documentElement = documentElement;\n }\n}\n\nexports.AElement = AElement;\nexports.AnimateColorElement = AnimateColorElement;\nexports.AnimateElement = AnimateElement;\nexports.AnimateTransformElement = AnimateTransformElement;\nexports.BoundingBox = BoundingBox;\nexports.CB1 = CB1;\nexports.CB2 = CB2;\nexports.CB3 = CB3;\nexports.CB4 = CB4;\nexports.Canvg = Canvg;\nexports.CircleElement = CircleElement;\nexports.ClipPathElement = ClipPathElement;\nexports.DefsElement = DefsElement;\nexports.DescElement = DescElement;\nexports.Document = Document;\nexports.Element = Element;\nexports.EllipseElement = EllipseElement;\nexports.FeColorMatrixElement = FeColorMatrixElement;\nexports.FeCompositeElement = FeCompositeElement;\nexports.FeDropShadowElement = FeDropShadowElement;\nexports.FeGaussianBlurElement = FeGaussianBlurElement;\nexports.FeMorphologyElement = FeMorphologyElement;\nexports.FilterElement = FilterElement;\nexports.Font = Font;\nexports.FontElement = FontElement;\nexports.FontFaceElement = FontFaceElement;\nexports.GElement = GElement;\nexports.GlyphElement = GlyphElement;\nexports.GradientElement = GradientElement;\nexports.ImageElement = ImageElement;\nexports.LineElement = LineElement;\nexports.LinearGradientElement = LinearGradientElement;\nexports.MarkerElement = MarkerElement;\nexports.MaskElement = MaskElement;\nexports.Matrix = Matrix;\nexports.MissingGlyphElement = MissingGlyphElement;\nexports.Mouse = Mouse;\nexports.PSEUDO_ZERO = PSEUDO_ZERO;\nexports.Parser = Parser;\nexports.PathElement = PathElement;\nexports.PathParser = PathParser;\nexports.PatternElement = PatternElement;\nexports.Point = Point;\nexports.PolygonElement = PolygonElement;\nexports.PolylineElement = PolylineElement;\nexports.Property = Property;\nexports.QB1 = QB1;\nexports.QB2 = QB2;\nexports.QB3 = QB3;\nexports.RadialGradientElement = RadialGradientElement;\nexports.RectElement = RectElement;\nexports.RenderedElement = RenderedElement;\nexports.Rotate = Rotate;\nexports.SVGElement = SVGElement;\nexports.SVGFontLoader = SVGFontLoader;\nexports.Scale = Scale;\nexports.Screen = Screen;\nexports.Skew = Skew;\nexports.SkewX = SkewX;\nexports.SkewY = SkewY;\nexports.StopElement = StopElement;\nexports.StyleElement = StyleElement;\nexports.SymbolElement = SymbolElement;\nexports.TRefElement = TRefElement;\nexports.TSpanElement = TSpanElement;\nexports.TextElement = TextElement;\nexports.TextPathElement = TextPathElement;\nexports.TitleElement = TitleElement;\nexports.Transform = Transform;\nexports.Translate = Translate;\nexports.UnknownElement = UnknownElement;\nexports.UseElement = UseElement;\nexports.ViewPort = ViewPort;\nexports.compressSpaces = compressSpaces;\nexports.elements = elements;\nexports.getSelectorSpecificity = getSelectorSpecificity;\nexports.normalizeAttributeName = normalizeAttributeName;\nexports.normalizeColor = normalizeColor;\nexports.parseExternalUrl = parseExternalUrl;\nexports.presets = index;\nexports.toMatrixValue = toMatrixValue;\nexports.toNumbers = toNumbers;\nexports.trimLeft = trimLeft;\nexports.trimRight = trimRight;\nexports.vectorMagnitude = vectorMagnitude;\nexports.vectorsAngle = vectorsAngle;\nexports.vectorsRatio = vectorsRatio;\n//# sourceMappingURL=index.cjs.map\n","!function(t,r){\"object\"==typeof exports&&\"undefined\"!=typeof module?r(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],r):r((t=\"undefined\"!=typeof globalThis?globalThis:t||self).svgpathdata={})}(this,(function(t){\"use strict\";\n/*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])})(t,e)};function e(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function a(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}var a=\" \";function i(t){var r=\"\";Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];if(i.type===N.CLOSE_PATH)r+=\"z\";else if(i.type===N.HORIZ_LINE_TO)r+=(i.relative?\"h\":\"H\")+i.x;else if(i.type===N.VERT_LINE_TO)r+=(i.relative?\"v\":\"V\")+i.y;else if(i.type===N.MOVE_TO)r+=(i.relative?\"m\":\"M\")+i.x+a+i.y;else if(i.type===N.LINE_TO)r+=(i.relative?\"l\":\"L\")+i.x+a+i.y;else if(i.type===N.CURVE_TO)r+=(i.relative?\"c\":\"C\")+i.x1+a+i.y1+a+i.x2+a+i.y2+a+i.x+a+i.y;else if(i.type===N.SMOOTH_CURVE_TO)r+=(i.relative?\"s\":\"S\")+i.x2+a+i.y2+a+i.x+a+i.y;else if(i.type===N.QUAD_TO)r+=(i.relative?\"q\":\"Q\")+i.x1+a+i.y1+a+i.x+a+i.y;else if(i.type===N.SMOOTH_QUAD_TO)r+=(i.relative?\"t\":\"T\")+i.x+a+i.y;else{if(i.type!==N.ARC)throw new Error('Unexpected command type \"'+i.type+'\" at index '+e+\".\");r+=(i.relative?\"a\":\"A\")+i.rX+a+i.rY+a+i.xRot+a+ +i.lArcFlag+a+ +i.sweepFlag+a+i.x+a+i.y}}return r}function n(t,r){var e=t[0],a=t[1];return[e*Math.cos(r)-a*Math.sin(r),e*Math.sin(r)+a*Math.cos(r)]}function o(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=0;e<t.length;e++)if(\"number\"!=typeof t[e])throw new Error(\"assertNumbers arguments[\"+e+\"] is not a number. \"+typeof t[e]+\" == typeof \"+t[e]);return!0}var s=Math.PI;function u(t,r,e){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var a=t.rX,i=t.rY,o=t.x,u=t.y;a=Math.abs(t.rX),i=Math.abs(t.rY);var h=n([(r-o)/2,(e-u)/2],-t.xRot/180*s),c=h[0],m=h[1],y=Math.pow(c,2)/Math.pow(a,2)+Math.pow(m,2)/Math.pow(i,2);1<y&&(a*=Math.sqrt(y),i*=Math.sqrt(y)),t.rX=a,t.rY=i;var p=Math.pow(a,2)*Math.pow(m,2)+Math.pow(i,2)*Math.pow(c,2),f=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(a,2)*Math.pow(i,2)-p)/p)),T=a*m/i*f,O=-i*c/a*f,l=n([T,O],t.xRot/180*s);t.cX=l[0]+(r+o)/2,t.cY=l[1]+(e+u)/2,t.phi1=Math.atan2((m-O)/i,(c-T)/a),t.phi2=Math.atan2((-m-O)/i,(-c-T)/a),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*s),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*s),t.phi1*=180/s,t.phi2*=180/s}function h(t,r,e){o(t,r,e);var a=t*t+r*r-e*e;if(0>a)return[];if(0===a)return[[t*e/(t*t+r*r),r*e/(t*t+r*r)]];var i=Math.sqrt(a);return[[(t*e+r*i)/(t*t+r*r),(r*e-t*i)/(t*t+r*r)],[(t*e-r*i)/(t*t+r*r),(r*e+t*i)/(t*t+r*r)]]}var c=Math.PI/180;function m(t,r,e){return(1-e)*t+e*r}function y(t,r,e,a){return t+Math.cos(a/180*s)*r+Math.sin(a/180*s)*e}function p(t,r,e,a){var i=1e-6,n=r-t,o=e-r,s=3*n+3*(a-e)-6*o,u=6*(o-n),h=3*n;return Math.abs(s)<i?[-h/u]:function(t,r,e){void 0===e&&(e=1e-6);var a=t*t/4-r;if(a<-e)return[];if(a<=e)return[-t/2];var i=Math.sqrt(a);return[-t/2-i,-t/2+i]}(u/s,h/s,i)}function f(t,r,e,a,i){var n=1-i;return t*(n*n*n)+r*(3*n*n*i)+e*(3*n*i*i)+a*(i*i*i)}t.SVGPathDataTransformer=void 0,function(t){function r(){return i((function(t,r,e){return t.relative&&(void 0!==t.x1&&(t.x1+=r),void 0!==t.y1&&(t.y1+=e),void 0!==t.x2&&(t.x2+=r),void 0!==t.y2&&(t.y2+=e),void 0!==t.x&&(t.x+=r),void 0!==t.y&&(t.y+=e),t.relative=!1),t}))}function e(){var t=NaN,r=NaN,e=NaN,a=NaN;return i((function(i,n,o){return i.type&N.SMOOTH_CURVE_TO&&(i.type=N.CURVE_TO,t=isNaN(t)?n:t,r=isNaN(r)?o:r,i.x1=i.relative?n-t:2*n-t,i.y1=i.relative?o-r:2*o-r),i.type&N.CURVE_TO?(t=i.relative?n+i.x2:i.x2,r=i.relative?o+i.y2:i.y2):(t=NaN,r=NaN),i.type&N.SMOOTH_QUAD_TO&&(i.type=N.QUAD_TO,e=isNaN(e)?n:e,a=isNaN(a)?o:a,i.x1=i.relative?n-e:2*n-e,i.y1=i.relative?o-a:2*o-a),i.type&N.QUAD_TO?(e=i.relative?n+i.x1:i.x1,a=i.relative?o+i.y1:i.y1):(e=NaN,a=NaN),i}))}function a(){var t=NaN,r=NaN;return i((function(e,a,i){if(e.type&N.SMOOTH_QUAD_TO&&(e.type=N.QUAD_TO,t=isNaN(t)?a:t,r=isNaN(r)?i:r,e.x1=e.relative?a-t:2*a-t,e.y1=e.relative?i-r:2*i-r),e.type&N.QUAD_TO){t=e.relative?a+e.x1:e.x1,r=e.relative?i+e.y1:e.y1;var n=e.x1,o=e.y1;e.type=N.CURVE_TO,e.x1=((e.relative?0:a)+2*n)/3,e.y1=((e.relative?0:i)+2*o)/3,e.x2=(e.x+2*n)/3,e.y2=(e.y+2*o)/3}else t=NaN,r=NaN;return e}))}function i(t){var r=0,e=0,a=NaN,i=NaN;return function(n){if(isNaN(a)&&!(n.type&N.MOVE_TO))throw new Error(\"path must start with moveto\");var o=t(n,r,e,a,i);return n.type&N.CLOSE_PATH&&(r=a,e=i),void 0!==n.x&&(r=n.relative?r+n.x:n.x),void 0!==n.y&&(e=n.relative?e+n.y:n.y),n.type&N.MOVE_TO&&(a=r,i=e),o}}function s(t,r,e,a,n,s){return o(t,r,e,a,n,s),i((function(i,o,u,h){var c=i.x1,m=i.x2,y=i.relative&&!isNaN(h),p=void 0!==i.x?i.x:y?0:o,f=void 0!==i.y?i.y:y?0:u;function T(t){return t*t}i.type&N.HORIZ_LINE_TO&&0!==r&&(i.type=N.LINE_TO,i.y=i.relative?0:u),i.type&N.VERT_LINE_TO&&0!==e&&(i.type=N.LINE_TO,i.x=i.relative?0:o),void 0!==i.x&&(i.x=i.x*t+f*e+(y?0:n)),void 0!==i.y&&(i.y=p*r+i.y*a+(y?0:s)),void 0!==i.x1&&(i.x1=i.x1*t+i.y1*e+(y?0:n)),void 0!==i.y1&&(i.y1=c*r+i.y1*a+(y?0:s)),void 0!==i.x2&&(i.x2=i.x2*t+i.y2*e+(y?0:n)),void 0!==i.y2&&(i.y2=m*r+i.y2*a+(y?0:s));var O=t*a-r*e;if(void 0!==i.xRot&&(1!==t||0!==r||0!==e||1!==a))if(0===O)delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag,i.type=N.LINE_TO;else{var l=i.xRot*Math.PI/180,v=Math.sin(l),_=Math.cos(l),d=1/T(i.rX),x=1/T(i.rY),A=T(_)*d+T(v)*x,E=2*v*_*(d-x),C=T(v)*d+T(_)*x,M=A*a*a-E*r*a+C*r*r,R=E*(t*a+r*e)-2*(A*e*a+C*t*r),S=A*e*e-E*t*e+C*t*t,g=(Math.atan2(R,M-S)+Math.PI)%Math.PI/2,I=Math.sin(g),V=Math.cos(g);i.rX=Math.abs(O)/Math.sqrt(M*T(V)+R*I*V+S*T(I)),i.rY=Math.abs(O)/Math.sqrt(M*T(I)-R*I*V+S*T(V)),i.xRot=180*g/Math.PI}return void 0!==i.sweepFlag&&0>O&&(i.sweepFlag=+!i.sweepFlag),i}))}function T(){return function(t){var r={};for(var e in t)r[e]=t[e];return r}}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),o(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return i((function(t,r,e){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=e),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=e),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=e),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,r,e){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===e&&(e=!0),i((function(a,i,n,o,s){if(isNaN(o)&&!(a.type&N.MOVE_TO))throw new Error(\"path must start with moveto\");return r&&a.type&N.HORIZ_LINE_TO&&(a.type=N.LINE_TO,a.y=a.relative?0:n),e&&a.type&N.VERT_LINE_TO&&(a.type=N.LINE_TO,a.x=a.relative?0:i),t&&a.type&N.CLOSE_PATH&&(a.type=N.LINE_TO,a.x=a.relative?o-i:o,a.y=a.relative?s-n:s),a.type&N.ARC&&(0===a.rX||0===a.rY)&&(a.type=N.LINE_TO,delete a.rX,delete a.rY,delete a.xRot,delete a.lArcFlag,delete a.sweepFlag),a}))},t.NORMALIZE_ST=e,t.QT_TO_C=a,t.INFO=i,t.SANITIZE=function(t){void 0===t&&(t=0),o(t);var r=NaN,e=NaN,a=NaN,n=NaN;return i((function(i,o,s,u,h){var c=Math.abs,m=!1,y=0,p=0;if(i.type&N.SMOOTH_CURVE_TO&&(y=isNaN(r)?0:o-r,p=isNaN(e)?0:s-e),i.type&(N.CURVE_TO|N.SMOOTH_CURVE_TO)?(r=i.relative?o+i.x2:i.x2,e=i.relative?s+i.y2:i.y2):(r=NaN,e=NaN),i.type&N.SMOOTH_QUAD_TO?(a=isNaN(a)?o:2*o-a,n=isNaN(n)?s:2*s-n):i.type&N.QUAD_TO?(a=i.relative?o+i.x1:i.x1,n=i.relative?s+i.y1:i.y2):(a=NaN,n=NaN),i.type&N.LINE_COMMANDS||i.type&N.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&N.CURVE_TO||i.type&N.SMOOTH_CURVE_TO||i.type&N.QUAD_TO||i.type&N.SMOOTH_QUAD_TO){var f=void 0===i.x?0:i.relative?i.x:i.x-o,T=void 0===i.y?0:i.relative?i.y:i.y-s;y=isNaN(a)?void 0===i.x1?y:i.relative?i.x:i.x1-o:a-o,p=isNaN(n)?void 0===i.y1?p:i.relative?i.y:i.y1-s:n-s;var O=void 0===i.x2?0:i.relative?i.x:i.x2-o,l=void 0===i.y2?0:i.relative?i.y:i.y2-s;c(f)<=t&&c(T)<=t&&c(y)<=t&&c(p)<=t&&c(O)<=t&&c(l)<=t&&(m=!0)}return i.type&N.CLOSE_PATH&&c(o-u)<=t&&c(s-h)<=t&&(m=!0),m?[]:i}))},t.MATRIX=s,t.ROTATE=function(t,r,e){void 0===r&&(r=0),void 0===e&&(e=0),o(t,r,e);var a=Math.sin(t),i=Math.cos(t);return s(i,a,-a,i,r-r*i+e*a,e-r*a-e*i)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),o(t,r),s(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),o(t,r),s(t,0,0,r,0,0)},t.SKEW_X=function(t){return o(t),s(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return o(t),s(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),o(t),s(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),o(t),s(1,0,0,-1,0,t)},t.A_TO_C=function(){return i((function(t,r,e){return N.ARC===t.type?function(t,r,e){var a,i,o,s;t.cX||u(t,r,e);for(var h=Math.min(t.phi1,t.phi2),y=Math.max(t.phi1,t.phi2)-h,p=Math.ceil(y/90),f=new Array(p),T=r,O=e,l=0;l<p;l++){var v=m(t.phi1,t.phi2,l/p),_=m(t.phi1,t.phi2,(l+1)/p),d=_-v,x=4/3*Math.tan(d*c/4),A=[Math.cos(v*c)-x*Math.sin(v*c),Math.sin(v*c)+x*Math.cos(v*c)],E=A[0],C=A[1],M=[Math.cos(_*c),Math.sin(_*c)],R=M[0],S=M[1],g=[R+x*Math.sin(_*c),S-x*Math.cos(_*c)],I=g[0],V=g[1];f[l]={relative:t.relative,type:N.CURVE_TO};var D=function(r,e){var a=n([r*t.rX,e*t.rY],t.xRot),i=a[0],o=a[1];return[t.cX+i,t.cY+o]};a=D(E,C),f[l].x1=a[0],f[l].y1=a[1],i=D(I,V),f[l].x2=i[0],f[l].y2=i[1],o=D(R,S),f[l].x=o[0],f[l].y=o[1],t.relative&&(f[l].x1-=T,f[l].y1-=O,f[l].x2-=T,f[l].y2-=O,f[l].x-=T,f[l].y-=O),T=(s=[f[l].x,f[l].y])[0],O=s[1]}return f}(t,t.relative?0:r,t.relative?0:e):t}))},t.ANNOTATE_ARCS=function(){return i((function(t,r,e){return t.relative&&(r=0,e=0),N.ARC===t.type&&u(t,r,e),t}))},t.CLONE=T,t.CALCULATE_BOUNDS=function(){var t=function(t){var r={};for(var e in t)r[e]=t[e];return r},n=r(),o=a(),s=e(),c=i((function(r,e,a){var i=s(o(n(t(r))));function m(t){t>c.maxX&&(c.maxX=t),t<c.minX&&(c.minX=t)}function T(t){t>c.maxY&&(c.maxY=t),t<c.minY&&(c.minY=t)}if(i.type&N.DRAWING_COMMANDS&&(m(e),T(a)),i.type&N.HORIZ_LINE_TO&&m(i.x),i.type&N.VERT_LINE_TO&&T(i.y),i.type&N.LINE_TO&&(m(i.x),T(i.y)),i.type&N.CURVE_TO){m(i.x),T(i.y);for(var O=0,l=p(e,i.x1,i.x2,i.x);O<l.length;O++){0<(H=l[O])&&1>H&&m(f(e,i.x1,i.x2,i.x,H))}for(var v=0,_=p(a,i.y1,i.y2,i.y);v<_.length;v++){0<(H=_[v])&&1>H&&T(f(a,i.y1,i.y2,i.y,H))}}if(i.type&N.ARC){m(i.x),T(i.y),u(i,e,a);for(var d=i.xRot/180*Math.PI,x=Math.cos(d)*i.rX,A=Math.sin(d)*i.rX,E=-Math.sin(d)*i.rY,C=Math.cos(d)*i.rY,M=i.phi1<i.phi2?[i.phi1,i.phi2]:-180>i.phi2?[i.phi2+360,i.phi1+360]:[i.phi2,i.phi1],R=M[0],S=M[1],g=function(t){var r=t[0],e=t[1],a=180*Math.atan2(e,r)/Math.PI;return a<R?a+360:a},I=0,V=h(E,-x,0).map(g);I<V.length;I++){(H=V[I])>R&&H<S&&m(y(i.cX,x,E,H))}for(var D=0,L=h(C,-A,0).map(g);D<L.length;D++){var H;(H=L[D])>R&&H<S&&T(y(i.cY,A,C,H))}}return r}));return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}}(t.SVGPathDataTransformer||(t.SVGPathDataTransformer={}));var T,O=function(){function r(){}return r.prototype.round=function(r){return this.transform(t.SVGPathDataTransformer.ROUND(r))},r.prototype.toAbs=function(){return this.transform(t.SVGPathDataTransformer.TO_ABS())},r.prototype.toRel=function(){return this.transform(t.SVGPathDataTransformer.TO_REL())},r.prototype.normalizeHVZ=function(r,e,a){return this.transform(t.SVGPathDataTransformer.NORMALIZE_HVZ(r,e,a))},r.prototype.normalizeST=function(){return this.transform(t.SVGPathDataTransformer.NORMALIZE_ST())},r.prototype.qtToC=function(){return this.transform(t.SVGPathDataTransformer.QT_TO_C())},r.prototype.aToC=function(){return this.transform(t.SVGPathDataTransformer.A_TO_C())},r.prototype.sanitize=function(r){return this.transform(t.SVGPathDataTransformer.SANITIZE(r))},r.prototype.translate=function(r,e){return this.transform(t.SVGPathDataTransformer.TRANSLATE(r,e))},r.prototype.scale=function(r,e){return this.transform(t.SVGPathDataTransformer.SCALE(r,e))},r.prototype.rotate=function(r,e,a){return this.transform(t.SVGPathDataTransformer.ROTATE(r,e,a))},r.prototype.matrix=function(r,e,a,i,n,o){return this.transform(t.SVGPathDataTransformer.MATRIX(r,e,a,i,n,o))},r.prototype.skewX=function(r){return this.transform(t.SVGPathDataTransformer.SKEW_X(r))},r.prototype.skewY=function(r){return this.transform(t.SVGPathDataTransformer.SKEW_Y(r))},r.prototype.xSymmetry=function(r){return this.transform(t.SVGPathDataTransformer.X_AXIS_SYMMETRY(r))},r.prototype.ySymmetry=function(r){return this.transform(t.SVGPathDataTransformer.Y_AXIS_SYMMETRY(r))},r.prototype.annotateArcs=function(){return this.transform(t.SVGPathDataTransformer.ANNOTATE_ARCS())},r}(),l=function(t){return\" \"===t||\"\\t\"===t||\"\\r\"===t||\"\\n\"===t},v=function(t){return\"0\".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<=\"9\".charCodeAt(0)},_=function(t){function r(){var r=t.call(this)||this;return r.curNumber=\"\",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return e(r,t),r.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(\" \",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError(\"Unterminated command at the path end.\");return t},r.prototype.parse=function(t,r){var e=this;void 0===r&&(r=[]);for(var a=function(t){r.push(t),e.curArgs.length=0,e.canParseCommandOrComma=!0},i=0;i<t.length;i++){var n=t[i],o=!(this.curCommandType!==N.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||\"0\"!==this.curNumber&&\"1\"!==this.curNumber),s=v(n)&&(\"0\"===this.curNumber&&\"0\"===n||o);if(!v(n)||s)if(\"e\"!==n&&\"E\"!==n)if(\"-\"!==n&&\"+\"!==n||!this.curNumberHasExp||this.curNumberHasExpDigits)if(\".\"!==n||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&-1!==this.curCommandType){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError(\"Invalid number ending at \"+i);if(this.curCommandType===N.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>u)throw new SyntaxError('Expected positive number, got \"'+u+'\" at index \"'+i+'\"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&\"0\"!==this.curNumber&&\"1\"!==this.curNumber)throw new SyntaxError('Expected a flag, got \"'+this.curNumber+'\" at index \"'+i+'\"');this.curArgs.push(u),this.curArgs.length===d[this.curCommandType]&&(N.HORIZ_LINE_TO===this.curCommandType?a({type:N.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):N.VERT_LINE_TO===this.curCommandType?a({type:N.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===N.MOVE_TO||this.curCommandType===N.LINE_TO||this.curCommandType===N.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),N.MOVE_TO===this.curCommandType&&(this.curCommandType=N.LINE_TO)):this.curCommandType===N.CURVE_TO?a({type:N.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===N.SMOOTH_CURVE_TO?a({type:N.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===N.QUAD_TO?a({type:N.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===N.ARC&&a({type:N.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber=\"\",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!l(n))if(\",\"===n&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(\"+\"!==n&&\"-\"!==n&&\".\"!==n)if(s)this.curNumber=n,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError(\"Unterminated command at index \"+i+\".\");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character \"'+n+'\" at index '+i+\". Command cannot follow comma\");if(this.canParseCommandOrComma=!1,\"z\"!==n&&\"Z\"!==n)if(\"h\"===n||\"H\"===n)this.curCommandType=N.HORIZ_LINE_TO,this.curCommandRelative=\"h\"===n;else if(\"v\"===n||\"V\"===n)this.curCommandType=N.VERT_LINE_TO,this.curCommandRelative=\"v\"===n;else if(\"m\"===n||\"M\"===n)this.curCommandType=N.MOVE_TO,this.curCommandRelative=\"m\"===n;else if(\"l\"===n||\"L\"===n)this.curCommandType=N.LINE_TO,this.curCommandRelative=\"l\"===n;else if(\"c\"===n||\"C\"===n)this.curCommandType=N.CURVE_TO,this.curCommandRelative=\"c\"===n;else if(\"s\"===n||\"S\"===n)this.curCommandType=N.SMOOTH_CURVE_TO,this.curCommandRelative=\"s\"===n;else if(\"q\"===n||\"Q\"===n)this.curCommandType=N.QUAD_TO,this.curCommandRelative=\"q\"===n;else if(\"t\"===n||\"T\"===n)this.curCommandType=N.SMOOTH_QUAD_TO,this.curCommandRelative=\"t\"===n;else{if(\"a\"!==n&&\"A\"!==n)throw new SyntaxError('Unexpected character \"'+n+'\" at index '+i+\".\");this.curCommandType=N.ARC,this.curCommandRelative=\"a\"===n}else r.push({type:N.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=n,this.curNumberHasDecimal=\".\"===n}else this.curNumber+=n,this.curNumberHasDecimal=!0;else this.curNumber+=n;else this.curNumber+=n,this.curNumberHasExp=!0;else this.curNumber+=n,this.curNumberHasExpDigits=this.curNumberHasExp}return r},r.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,e){void 0===e&&(e=[]);for(var a=0,i=Object.getPrototypeOf(this).parse.call(this,r);a<i.length;a++){var n=i[a],o=t(n);Array.isArray(o)?e.push.apply(e,o):e.push(o)}return e}}})},r}(O),N=function(r){function a(t){var e=r.call(this)||this;return e.commands=\"string\"==typeof t?a.parse(t):t,e}return e(a,r),a.prototype.encode=function(){return a.encode(this.commands)},a.prototype.getBounds=function(){var r=t.SVGPathDataTransformer.CALCULATE_BOUNDS();return this.transform(r),r},a.prototype.transform=function(t){for(var r=[],e=0,a=this.commands;e<a.length;e++){var i=t(a[e]);Array.isArray(i)?r.push.apply(r,i):r.push(i)}return this.commands=r,this},a.encode=function(t){return i(t)},a.parse=function(t){var r=new _,e=[];return r.parse(t,e),r.finish(e),e},a.CLOSE_PATH=1,a.MOVE_TO=2,a.HORIZ_LINE_TO=4,a.VERT_LINE_TO=8,a.LINE_TO=16,a.CURVE_TO=32,a.SMOOTH_CURVE_TO=64,a.QUAD_TO=128,a.SMOOTH_QUAD_TO=256,a.ARC=512,a.LINE_COMMANDS=a.LINE_TO|a.HORIZ_LINE_TO|a.VERT_LINE_TO,a.DRAWING_COMMANDS=a.HORIZ_LINE_TO|a.VERT_LINE_TO|a.LINE_TO|a.CURVE_TO|a.SMOOTH_CURVE_TO|a.QUAD_TO|a.SMOOTH_QUAD_TO|a.ARC,a}(O),d=((T={})[N.MOVE_TO]=2,T[N.LINE_TO]=2,T[N.HORIZ_LINE_TO]=1,T[N.VERT_LINE_TO]=1,T[N.CLOSE_PATH]=0,T[N.QUAD_TO]=4,T[N.SMOOTH_QUAD_TO]=2,T[N.CURVE_TO]=6,T[N.SMOOTH_CURVE_TO]=4,T[N.ARC]=7,T);t.COMMAND_ARG_COUNTS=d,t.SVGPathData=N,t.SVGPathDataParser=_,t.encodeSVGPath=i,Object.defineProperty(t,\"__esModule\",{value:!0})}));\n//# sourceMappingURL=SVGPathData.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/index.js\");\n"],"names":["root","factory","exports","module","define","amd","self","require","obj","_packages","__esModule","default","draw2d","Canvas","Class","extend","NAME","init","canvasId","width","height","_this","this","setScrollArea","document","body","html","$","css","isNaN","parseFloat","initialWidth","getWidth","initialHeight","getHeight","parseInt","droppable","accept","over","event","ui","onDragEnter","draggable","out","onDragLeave","drop","_getEvent","helperPos","helper","position","pos","fromDocumentToCanvasCoordinate","clientX","clientY","onDrop","getX","left","getY","top","shiftKey","ctrlKey","appendTo","stack","zIndex","drag","onDrag","stop","e","start","addClass","paper","Raphael","canvas","style","zoomPolicy","zoomFactor","selection","Selection","currentDropTarget","currentHoverFigure","regionDragDropConstraint","policy","figure","RegionEditPolicy","eventSubscriptions","editPolicy","util","ArrayList","figures","lines","commonPorts","resizeHandles","commandStack","command","CommandStack","linesToRepaintAfterDragDrop","lineIntersections","installEditPolicy","WheelZoomPolicy","DefaultKeyboardPolicy","BoundingboxSelectionPolicy","DropInterceptorPolicy","connection","ComposedConnectionCreatePolicy","DragConnectionCreatePolicy","ClickConnectionCreatePolicy","addEventListener","isPostChangeEvent","calculateConnectionIntersection","each","i","line","svgPathString","repaint","mouseDown","mouseDownX","mouseDownY","mouseDragDiffX","mouseDragDiffY","bind","onMouseUp","x","y","hover","getBestFigure","onMouseLeave","fireEvent","onMouseEnter","exc","console","log","onMouseMove","hoverFigure","diffXAbs","diffYAbs","onMouseDrag","which","preventDefault","onMouseDown","stopPropagation","onRightMouseDown","on","onDoubleClick","onClick","originalEvent","delta","type","wheelDelta","detail","onMouseWheel","keyupCallback","target","is","KeyboardPolicy","onKeyUp","keyCode","keydownCallback","onKeyDown","destroy","clear","unbind","remove","clone","markSaveLocation","hideDecoration","showDecoration","getLines","getSize","l1","removeElementAt","ii","l2","partInter","intersection","add","other","SelectionPolicy","getSelection","getAll","unselect","grep","p","stay","onUninstall","ZoomPolicy","ConnectionCreatePolicy","uninstallEditPolicy","onInstall","removed","name","getDropInterceptorPolicies","setZoom","animated","getZoom","getDimension","geo","Rectangle","setDimension","dim","widths","getFigures","map","f","getAbsoluteX","heights","getAbsoluteY","Math","max","asArray","w","h","setSize","Point","getScrollLeft","getScrollTop","fromCanvasToDocumentCoordinate","getHtmlContainer","touches","length","changedTouches","elementSelector","scrollArea","getScrollArea","scrollLeft","scrollTop","setScrollLeft","setScrollTop","scrollTo","offset","getCanvas","shape","basic","Line","setPosition","setCanvas","getShapeElement","dx","dy","PolyLine","contains","Connection","disconnect","getLine","id","count","get","getId","getFigure","getIntersection","result","entry","j","justTouching","snapToHelper","orig","SnapToEditPolicy","snap","registerPort","port","unregisterPort","getAllPorts","getCommandStack","getPrimarySelection","getPrimary","setCurrentSelection","object","addSelection","select","blacklist","whitelist","Array","isArray","testFigure","isInList","list","len","considering","isInBlacklist","item","isInWhitelist","checkRecursive","children","c","isVisible","hitTest","figureResult","childResult","lineResult","getBestLine","array","node","index","filter","sort","a","b","lineToIgnore","Figure","inArray","draggedDomNode","droppedDomNode","relX","relY","onContextMenu","returnValue","args","subscribers","callback","events","split","push","off","eventOrFunction","Configuration","version","i18n","move","assignShape","groupShapes","ungroupShapes","deleteShape","moveShape","moveLine","addShape","moveVertex","moveVertices","deleteVertex","resizeShape","rotateShape","collection","addVertex","changeAttributes","connectPorts","menu","deleteSegment","addSegment","dialog","filenamePrompt","createResizeHandle","owner","ResizeHandle","createConnection","sourcePort","targetPort","dropTarget","createInputPort","relatedFigure","InputPort","createOutputPort","OutputPort","createHybridPort","HybridPort","attr","setter","getter","oldPoint","sourceDecorator","targetDecorator","sourceDecoratorNode","targetDecoratorNode","isMoving","moveListener","setStartPoint","setEndPoint","_super","color","stroke","radius","setSourceDecorator","setTargetDecorator","source","setSource","setTarget","getSourceDecorator","getTargetDecorator","getSource","getTarget","connections","onDisconnect","fireSourcePortRouteEvent","fireTargetPortRouteEvent","reconnect","onConnect","routingRequired","isResizeable","isDraggable","child","locator","layout","ConnectionLocator","decorator","setParent","calculatePath","routingHints","z1","getZOrder","z2","toBack","attributes","repaintBlocked","paint","getVertices","first","transform","getStartAngle","opacity","alpha","getColor","lineColor","hex","forEach","setAttribute","cssClass","end","last","getEndAngle","hash","postProcess","postProcessCache","router","dx2","dy2","updateVertices","DragDropEditPolicy","moved","toFront","insertAfter","getStartPoint","refPoint","getStartPosition","getConnectionAnchorLocation","getConnectionAnchorReferencePoint","getEndPoint","getEndPosition","getPeerPort","sharingPorts","notiCanvas","lineSegments","p1","p2","SplineConnectionRouter","sqrt","angle","PI","asin","abs","getConnections","conn","createCommand","request","getPolicy","CommandType","MOVE","CommandMoveVertices","MOVE_BASEPOINT","CommandReconnect","getPersistentAttributes","memento","parentNode","getParent","getName","decoration","setPersistentAttributes","Function","_interopRequireDefault","_JSONUtil","_UUID","_extend","MIN_TIMER_INTERVAL","setterWhitelist","setId","setX","setY","setWidth","setHeight","boundingBox","setBoundingBox","minWidth","setMinWidth","minHeight","setMinHeight","setCssClass","userData","setUserData","setDraggable","resizeable","setResizeable","selectable","setSelectable","setRotationAngle","setAlpha","glow","setGlow","visible","setVisible","keepAspectRatio","setKeepAspectRatio","getterWhitelist","getRotationAngle","getUserData","isSelectable","getAlpha","UUID","create","cachedZOrder","isResizeHandle","deleteable","canSnapToHelper","snapToGridAnchor","timerId","timerInterval","parent","composite","rotationAngle","replace","RegExp","getMinWidth","getMinHeight","isInDragDrop","ox","oy","lastAppliedAttributes","selectionHandles","panningDelegate","relocateChildrenEventCallback","relocate","defaultSelectionAdapter","selectionAdapter","RectangleSelectionFeedbackPolicy","value","isPlainObject","key","substring","jsonUtil","set","func","param","undefined","call","data","Object","assign","keys","k","pick","var_keys","arguments","prototype","slice","asPrimarySelection","onSelect","onUnselect","setSelectionAdapter","adapter","getSelectionAdapter","isSelected","newId","getCssClass","trim","removeAttribute","hasCssClass","className","test","addCssClass","removeCssClass","newClass","indexOf","toggleCssClass","stopTimer","startTimer","milliSeconds","window","setInterval","onTimer","clearInterval","StrongComposite","getTopLevelShapeElement","insertElementAt","handle","insertBefore","SelectionFeedbackPolicy","__proto__","removedPolicy","debug","warn","getChildren","resetChildren","createShapeElement","hide","visibleDuration","fadeOut","show","fadeIn","flatDiff","getOwnPropertyNames","applyTransformation","flag","getHandleBBox","onDragStart","bbox","translate","getAbsolutePosition","scale","getBestChild","canStartDrag","newPos","adjustPosition","getCanSnapToHelper","onPanning","onPanningEnd","onDragEnd","execute","delegateTarget","draggedFigure","delegate","onCatch","droppedFigure","percent","min","duration","getKeepAspectRatio","from","setCanSnapToHelper","getSnapToGridAnchor","setSnapToGridAnchor","point","getAbsoluteBounds","oldPos","getPosition","old","newDim","adjustDimension","rect","getBoundingBox","getOuterBoundingBox","parentBB","childBB","merge","iX","iY","corona","isMemberDraggable","isMemberSelectable","isStrechable","isDeleteable","setDeleteable","containedFigure","getRoot","setComposite","getComposite","_inEvent","context","___originalCallback","figureToIgnore","CommandMove","DELETE","CommandDelete","RESIZE","CommandResize","cloneMetaData","excludeChildren","initialId","HeadlessCanvas","Port","InputPortLocator","maxFanIn","Number","MAX_SAFE_INTEGER","setMaxFanIn","getMaxFanIn","CONNECT","CommandConnect","OutputPortLocator","Circle","DEFAULT_BORDER_COLOR","Color","lighterBgColor","coronaWidth","bgColor","diameter","setCoronaWidth","semanticGroup","setSemanticGroup","getCoronaWidth","getSemanticGroup","useGradient","preferredConnectionDirection","emitter","connectionAnchor","anchor","ConnectionAnchor","maxFanOut","IntrusivePortsFeedbackPolicy","portSelectionAdapter","setMaxFanOut","getMaxFanOut","group","setConnectionAnchor","setOwner","referencePoint","inquiringConnection","getLocation","getReferencePoint","getConnectionDirection","peerPort","getDirection","setConnectionDirection","direction","setLocator","getLocator","setBackgroundColor","lighter","setValue","onPortValueChanged","getValue","cx","cy","rx","ry","cursor","fill","rgba","join","_oldstroke","getStroke","setStroke","setName","iX2","iY2","Corona","setDiameter","d","CommandMovePort","ports","setColor","zoomCallback","origWidth","origHeight","origRadius","origStroke","blockEvent","setType","getOwner","getType","commandMove","commandResize","getSnapToDirection","SnapToHelper","NORTH_WEST","NORTH","NORTH_EAST","EAST","SOUTH_EAST","SOUTH","SOUTH_WEST","WEST","NSEW","updateCursor","oldX","oldY","diffX","diffY","objPosX","objPosY","objWidth","objHeight","newX","newY","corrPos","isTouchDevice","offset2","bgGradient","darker","supportsSnapToHelper","ctrl","SVGFigure","SetFigure","svg","setSVG","getSVG","createSet","importSVG","svgNodes","newSVGNodes","oldSVG","rawSVG","svgDOM","_dimensionReadFromJSON","findStyle","element","tagName","substr","nodeName","nodeValue","exec","$1","$2","r","circle","ellipse","path","x1","y1","x2","y2","points","polygon","image","childNodes","firstChild","nodeType","subShape","text","subAttr","getBBox","nextSibling","error","alert","primary","all","setPrimary","checkDescendant","figureToCheck","isEmpty","expand","addRecursive","addAll","getAssignedFigures","reverse","originalWidth","originalHeight","scaleX","scaleY","strokeScale","applyAlpha","s","before","rs","getPorts","bb","VectorFigure","Node","dasharray","strokeBeforeGlow","glowIsActive","setDashArray","setRadius","getDashArray","getRadius","getBackgroundColor","dashPattern","Command","label","getLabel","canExecute","cancel","undo","redo","CommandAdd","CommandAddVertex","newPoint","removeVertexAt","insertVertexAt","CommandAssignFigure","assignedConnections","isNode","oldBoundingBox","assignFigure","oldComposite","unassignFigure","stickFigures","CommandAttr","newAttributes","oldAttributes","CommandBoundingBox","newBoundingBox","equals","CommandCollection","commandLabel","commands","labels","unique","canExec","cmd","setConnection","getConnection","optionalCallback","removedParentEntry","indexOfChild","CommandDeleteGroup","batchDelete","CommandUngroup","CommandGroup","Group","setStartPosition","CommandMoveConnection","setTranslation","CommandMoveLine","CommandMoveVertex","setIndex","origPoint","updatePosition","setVertex","oldVertices","newVertices","setVertices","con","oldSourcePort","oldTargetPort","setNewPorts","newSourcePort","newTargetPort","CommandRemoveVertex","CommandReplaceVertices","originalVertices","oldWidth","oldHeight","newWidth","newHeight","CommandRotate","oldAngle","newAngle","rotate","portRelayoutRequired","undostack","redostack","maxundo","transactionCommand","eventListeners","setUndoLimit","notifyListeners","POST_EXECUTE","PRE_EXECUTE","startTransaction","isInTransaction","commitTransaction","pop","PRE_UNDO","POST_UNDO","PRE_REDO","POST_REDO","getRedoLabel","getUndoLabel","canRedo","canUndo","listener","CommandStackEventListener","stackChanged","removeEventListener","state","action","CommandStackEvent","size","POST_INIT","POST_MASK","PRE_MASK","details","getStack","getCommand","getDetails","isPreChangeEvent","MOVE_VERTEX","MOVE_VERTICES","MOVE_GHOST_VERTEX","RESET","ROTATE","ArrowDecorator","Decorator","st","backgroundColor","BarDecorator","CircleDecorator","_Color","DiamondDecorator","inverseLerp","X1","Y1","X2","Y2","px","py","nenner","zaehler","pointProjection","minx","maxx","miny","maxy","U","pow","distance","projlenSq","dotprod","lenSq","bx","by","bw","bh","setBoundary","adjustBoundary","PositionConstants","getDistance","translated","factor","scaled","getScaled","subtract","that","dot","cross","lerp","t","Ray","isHorizontal","similarity","otherRay","getAveraged","resize","dw","dh","setBounds","getLeft","getRight","getTop","getBottom","getTopLeft","getTopCenter","getTopRight","getCenterLeft","getCenterRight","getBottomLeft","getBottomCenter","getCenter","getBottomRight","moveInside","newRect","pointOrRectangle","cw","ch","ow","oh","oct","determineOctant","r2","HISTERESE","current","DIRECTION_UP","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_DOWN","o","isInside","intersects","x11","y11","x12","y12","x21","y21","x22","y22","intersectionWithLine","v","toJSON","Util","insetPoint","distanceFromStart","vx","vy","localDistance","_default","io","Reader","unmarshal","Writer","marshal","resultCallback","formatXml","xml","formatted","reg","pad","indent","match","padding","json","JSON","parse","createFigureFromElement","createFigureFromType","val","getPort","base64Content","Base64","encode","stringify","canvg","png","cropBoundingBox","canvasState","origPos","outerHTML","zoom","XMLSerializer","serializeToString","find","canvasDomNode","append","fullSizeCanvas","ignoreMouse","ignoreAnimation","renderCallback","sourceX","sourceY","sourceWidth","sourceHeight","croppedCanvas","createElement","getContext","drawImage","dataUrl","toDataURL","base64Image","img","CenterEdgeConnectionAnchor","ref","dir","center","getBox","ChopboxConnectionAnchor","reference","FanConnectionAnchor","separation","ray","xSeparation","ySeparation","intersections","reduce","previous","p0","ShortesPathConnectionAnchor","Oval","CircuitConnectionRouter","ManhattanConnectionRouter","setBridgeRadius","setVertexRadius","abortRoutingOnFirstVertexNode","LineSelectionFeedbackPolicy","vertexNodes","vertexRadius","setJunctionRadius","bridgeRadius","bridge_LR","bridge_RL","route","fromPt","fromDir","toPt","toDir","_route","intersectionsASC","intersectionsDESC","intersectionForCalc","ps","oldP","bridgeWidth","bridgeCode","lastVertexNode","interP","hit","otherZ","vertexNode","exclude","ConnectionRouter","_paint","inset","adjust","toFixed","lastP","canRemoveVertexAt","canRemoveSegmentAt","verticesSet","DirectRouter","invalidate","addPoint","FanConnectionRouter","routeCollision","midPoint","bendPoint","InteractiveManhattanConnectionRouter","OrthogonalSelectionFeedbackPolicy","_routingMetaData","routedByUserInteraction","halfRoute","MINDIST","vertexCount","vertex","startMoved","endMoved","segmentCount","tmpConn","vertices","draggedSegment","getVertex","getSegments","lp0","lp1","routingMetaData","ManhattanBridgedConnectionRouter","BRIDGE_HORIZONTAL_LR","BRIDGE_HORIZONTAL_RL","floor","TOL","TOLxTOL","TOGGLE_DIST","UP","RIGHT","DOWN","LEFT","xDiff","yDiff","ROUTER_RECTS","MazeConnectionRouter","useSpline","useSimplify","useSimplifyValue","useDebug","useShift","portOutletOffset","finder","PF","JumpPointFinder","allowDiagonal","dontCrossCorners","shift","oldToPt","oldFromPt","getAdjustedPoint","grid","generateNoGoGrid","findPath","isWalkableAt","svgPathBefore","adjustPath","pt","spline","CubicSpline","splinePoints","generate","simplify","oneShift2","canvasWidth","canvasHeight","Grid","box","r_orig","b_orig","setWalkableAt","adjustment","getSquareDistance","getSquareSegmentDistance","simplifyRadialDistance","sqTolerance","prevPoint","newPoints","simplifyDouglasPeucker","maxSqDist","sqDist","markers","Uint8Array","firstStack","lastStack","tolerance","highestQuality","MuteableManhattanConnectionRouter","rowsUsed","colsUsed","constraints","reservedInfo","startPoint","endPoint","average","startNormal","getStartDirection","endNormal","getEndDirection","positions","horizontal","isCycle","next","trial","findFirstFigureAtStraightLine","EMPTY_LIST","getExcludingFigures","processPositions","getColumnNear","n","proximity","reserveColumn","getRowNear","reserveRow","removeReservedLines","prev","rInfo","reservedRows","reservedCols","column","info","row","getConstraint","setConstraint","constraint","excluding","col","getMidpoint","RubberbandRouter","thickness","uv","uv2","strength","second","third","start90","start270","first90","first270","second90","second270","third90","third270","end90","end270","SketchConnectionRouter","VertexRouter","VertexSelectionFeedbackPolicy","startAnchor","endAnchor","BottomLocator","Locator","targetBoundingBox","CenterLocator","DraggableLocator","PortLocator","dividerFactor","thisNAME","portIndex","applyConsiderRotation","LeftLocator","margin","ManhattanMidpointLocator","segmentIndex","ParallelMidpointLocator","setDistance","nx","ny","radian","rotAnchor","rotCenterOfLabel","xm","ym","cos","sin","PolylineMidpointLocator","halfW","halfH","rotAngle","m","matrix","ratio","RightLocator","SmartDraggableLocator","boundedCorners","dist","xOffset","yOffset","calcBoundingCorner","i_parent","i_child","parentVertices","childVertices","TopLocator","XYAbsPortLocator","XYRelPortLocator","mesh","ExplodeLayouter","MeshLayouter","MIN_MARGIN","figureToAdd","changes","dis","currentOctChanges","ProposedMeshChange","r1","uid","Date","autoResize","defaults","onResize","onBeforeResize","onAfterResize","animate","complete","extraSpace","maxHeight","maxWidth","config","resizableFilterSelector","AutoResizer","el","toLowerCase","previousScrollTop","overflowY","apply","cloneCSSProperties","cloneCSSValues","overflow","fn","check","proxy","setTimeout","createClone","removeAttr","whiteSpace","immediate","injectClone","prevValue","cloneWidth","currentWidth","removeData","cloneContainer","jQuery","support","htmlMenuitem","htmlCommand","eventSelectstart","documentElement","widget","_cleanData","cleanData","elems","elem","triggerHandler","$currentTrigger","initialized","$win","counter","namespaces","menus","types","selector","trigger","autoHide","delay","reposition","determinePosition","$menu","my","at","of","collision","outerHeight","outerWidth","opt","bottom","right","positionSubmenu","animation","noop","items","hoveract","timer","pageX","pageY","abortevent","stopImmediatePropagation","contextmenu","$this","hasClass","build","built","isEmptyObject","Error","$trigger","op","click","Event","mousedown","button","mouseup","mouseenter","$related","relatedTarget","$document","closest","mousemove","mouseleave","clearTimeout","layerClick","$window","triggerAction","elementFromPoint","$layer","has","one","contextMenu","keyStop","isInput","$selected","blur","prop","$parent","itemdata","String","fromCharCode","toUpperCase","accesskeys","$node","prevItem","$s","$children","$prev","$round","itemMouseleave","itemMouseenter","$input","focus","nextItem","$next","focusInput","contextMenuRoot","blurInput","menuMouseenter","hovering","menuMouseleave","itemClick","contextMenuKey","isFunction","callbacks","hasOwnProperty","update","inputClick","hideMenu","force","focusItem","siblings","blurItem","removeClass","$t","zin","$tt","zindex","layer","$label","accesskey","ak","aks","splitAccesskey","_name","hasTypes","inputs","selected","prependTo","radio","options","icon","nested","display","ceil","andSelf","$item","disabled","fixedPosition","inputLabel","menuChildren","operation","$context","_hasContext","ns","$visibleMenu","fromMenu","setInputValues","getInputValues","dimetric","arrow","note","diagram","flowchart","analog","pert","navigator","platform","EditPolicy","host","SingleSelectionPolicy","isInsideMode","rect1","rect2","intersectsMode","decision","boundingBoxFigure1","boundingBoxFigure2","canDrawBoundingBox","oldSelection","setDecisionMode","useIntersectionMode","currentSelection","mouseMovedDuringMouseDown","canDragStart","delegated","mouseDraggingElement","mouseDownElement","draggingLineCommand","draggingLine","fakeDragX","fakeDragY","handleRect","dash","LineResizeHandle","selectionRect","CanvasPolicy","mouseX","mouseY","createMonochromGif","gif","red","green","blue","bit","byte_","writeBit","chunklen","CoronaDecorationPolicy","DecorationPolicy","startDragX","startDragY","diameterToBeFullVisible","diameterToBeVisible","sumDiameter","setDiameterToBeVisible","setDiameterToBeFullVisible","getDiameterToBeVisible","getDiameterToBeFullVisible","__origAlpha","updatePorts","connectInquirer","connectIntent","Hub","inputConnections","outputConnections","ExtendedKeyboardPolicy","FadeoutDecorationPolicy","DEFAULT_FADEOUT_DURATION","DEFAULT_ALPHA_DECREMENT","alphaDec","hidePortsCounter","portDragging","duringHide","GhostMoveSelectionPolicy","ghostRectangle1","ghostRectangle2","sel","resetPorts","_newPos","draggingElement","redrawConnection","inter","PanningSelectionPolicy","area","ReadOnlySelectionPolicy","ShowChessboardEditPolicy","GRID_COLOR","GRID_WIDTH","oldBg","setGrid","onZoomCallback","emitterFigure","zoomData","gridColor","background","backgroundSize","backgroundPosition","ShowDimetricGridEditPolicy","shapes","setGridColor","props","angle26","atan","angle153","cos30","sin30","cos150","sin150","setStart","setFinish","ShowDotEditPolicy","DOT_COLOR","DOT_RADIUS","DOT_DISTANCE","dotDistance","dotRadius","dotColor","ShowGridEditPolicy","DEFAULTS","gridWidth","gridStroke","SnapToCenterEditPolicy","SNAP_THRESHOLD","FADEOUT_DURATION","centers","horizontalGuideLines","verticalGuideLines","hideHorizontalGuides","hideVerticalGuides","modifiedPos","originalPos","allowXChanges","allowYChanges","inputCenter","snapHorizontal","snapped","showHorizontalGuides","diff","vertical","snapVertical","showVerticalGuides","populateCenters","candidates","snappedPoint","causedFigure","fast","SnapToDimetricGridEditPolicy","snapPoint","g","CENTER_H","CENTER_V","NORTH_SOUTH","EAST_WEST","setLineColor","getLineColor","SnapToGeometryEditPolicy","rows","cols","vline","hline","hideVerticalLine","hideHorizontalLine","snapDirections","edge","showVerticalLine","showHorizontalLine","inputBounds","snapRectangle","bounds","resultBounds","topLeft","bottomRight","snapOrientation","inputPoint","resultPoint","populateRowsAndCols","rightCorrection","getCorrectionFor","leftCorrection","bottomCorrection","topCorrection","location","entries","side","resultMag","magnitude","removeAll","causedBox","causedCenter","fromY","maxLength","yLength","snappedBox","fromX","xLength","SnapToGridEditPolicy","showGrid","renderer","SnapToInBetweenEditPolicy","populateBounds","intersectionPoint","leftIntersections","leftInputPoint","causedBBox","rightIntersections","rightInputPoint","snappedRect","leftSide","rightSide","topIntersections","topInputPoint","bottomIntersections","bottomInputPoint","topSide","bottomSide","snapTopLeft","snapTopRight","snapBottomRight","SnapToVerticesEditPolicy","VertexResizeHandle","correction","vertexResizeHandle","diffx","diffy","SNAP","snappedPos","_shifty","debouncedZoomedCallback","_debounce","__wheelZoom","newZoom","client","_zoom","scrollWidth","centerY","centerX","Tweenable","tween","to","easing","step","params","finish","setViewBox","coordsAfter","wait","timeout","callNow","later","z","viewBoxWidth","viewBoxHeight","port1","beeline","pulse","tempConnection","ripple","setEndPosition","setRouter","policies","_arg","anim","circle1","circle2","anim1","repeat","Infinity","anim2","currentTarget","de","ct","PortFeedbackPolicy","onHoverLeave","onHoverEnter","OrthogonalConnectionCreatePolicy","getRouter","beforeVertex","lastVertex","portPos","lastSegmentDir","orthogonal","xDist","AntSelectionFeedbackPolicy","isPrimarySelection","_updateBeeLine","projection","center1","center2","BigRectangleSelectionFeedbackPolicy","BusSelectionFeedbackPolicy","r4","r6","r8","xPos","yPos","FigureEditPolicy","moveCallback","originalAlpha","GlowSelectionFeedbackPolicy","HBusSelectionFeedbackPolicy","HorizontalEditPolicy","RaftSelectionFeedbackPolicy","RaftResizeHandle","dashArray","r3","r5","r7","constRect","diffW","diffH","ResizeSelectionFeedbackPolicy","RoundRectangleSelectionFeedbackPolicy","SlimSelectionFeedbackPolicy","VBusSelectionFeedbackPolicy","GhostVertexResizeHandle","VerticalEditPolicy","WidthSelectionFeedbackPolicy","LineStartResizeHandle","LineEndResizeHandle","p_m1","p3","resizeWidthHalf","resizeHeightHalf","removeSegment","splitSegment","newSegLength","np1","np2","np3","np4","segment","hitSegment","startHandle","endHandle","ElasticStrapFeedbackPolicy","connectionLine","hoverFiger","tweenable","growFactor","allPorts","__beforeInflate","dispose","OpAmp","MyInputPortLocator","calcY","inputLocator","createPort","ResistorBridge","MyOutputPortLocator","outputLocator","ResistorVertical","VoltageSupplyHorizontal","VoltageSupplyVertical","CalligrapherArrowDownLeft","CalligrapherArrowLeft","Arc","startAngle","endAngle","a1","a2","w2","h2","getDiameter","setCenter","Diamond","Polygon","resetVertices","precursorIndex","maxOpacity","Image","setPath","getPath","src","Label","FONT_FALLBACK","cachedWidth","cachedHeight","cachedMinWidth","cachedMinHeight","fontSize","fontColor","fontFamily","outlineStroke","outlineColor","textAlign","bold","editor","setText","installEditor","setOutlineStroke","setOutlineColor","setFontFamily","setFontSize","setFontColor","setPadding","setBold","getText","getOutlineStroke","getOutlineColor","getFontFamily","getFontSize","getFontColor","getPadding","isBold","lastAppliedLabelRotation","lastAppliedTextAttributes","clearCache","lattr","calculateTextAttr","attrDiff","ts","getTextAlign","setTextAlign","font","polySides","oddNodes","pi","pj","DEFAULT_COLOR","isGlowing","outlineVisible","dasharrayOffset","animateDirection","glowColor","glowStrokeSize","startX","setStartX","startY","setStartY","endX","setEndX","endY","setEndY","setCorona","setGlowStrokeSize","setAnmiate","setAnimateDirection","setDasharrayOffset","getCorona","getGlowStrokeSize","getAnmiate","getAnimateDirection","getDasharrayOffset","isFaked","setGlowColor","getGlowColor","getAnimate","setAnimate","_lineColor","_stroke","minX","minY","getStartX","getStartY","getEndX","getEndY","getLength","getAngle","percentage","segments1","segments2","s1","s2","b1","b2","ua_t","ub_t","u_b","ua","ub","getRelatedPort","getOppositePort","objPos","getIndex","origin","mDir","mDiff","t_a","t_b","removedPoint","lastDist","lastValidLength","maxX","maxY","begin","modStart","modEnd","updateBoundingBox","fracWidth","fracHeight","thisX","thisY","rot","pattern","Text","cachedWrappedAttr","wrappedTextAttr","longestWord","arg1","arg2","svgText","words","abc","letterWidth","l","LINE_COLOR","isDead","getEnclosingAngle","trans","acos","Composite","assignedFigures","Jailhouse","Raft","WeakComposite","aboardFigures","getAboardFigures","dontApplyToChildren","aboardedFigures","recalculate","raftBoundingBox","getNextComposite","figureToTest","nextComposite","dontMoveChildren","Diagram","cache","setData","getData","Pie","COLORS","TWO_PI","d2","sum","_sum","pie","offsetAngle","seg","drawSegment","polarPath","theta","rotation","resolution","Sparkline","pathString","prev_pt","idx","toCoords","Document","amplitude","calcPath","w4","Acw","Icon","Alarm","Anonymous","Apple","Apps","ArrowDown","ArrowLeft","ArrowLeft2","ArrowRight","ArrowRight2","ArrowUp","Aumade","BarChart","BioHazard","Book","Bookmark","Books","Bubble","Bug","Calendar","Cart","Ccw","Chat","Check","Chrome","Clip","Clock","Cloud","Cloud2","CloudDown","CloudUp","Cloudy","Code","CodeTalk","CommandLine","Connect","Contract","Crop","Cross","Cube","Customer","Db","Detour","Disconnect","DockBottom","DockLeft","DockRight","DockTop","Download","Dry","Employee","End","Ethernet","Exchange","Expand","Export","Fave","Feed","Ff","Firefox","Flag","Flickr","Folder","Font","Fork","ForkAlt","FullCube","Future","GRaphael","Gear","Gear2","GitHub","GitHubAlt","Glasses","Globe","GlobeAlt","GlobeAlt2","Hail","Hammer","HammerAndScrewDriver","HangUp","Help","History","Home","IMac","offsetY","offsetX","Icons","Ie","Ie9","Import","InkScape","Ipad","Iphone","JQuery","Jigsaw","Key","Lab","Lamp","Lamp_alt","Landing","Landscape1","Landscape2","LineChart","Link","LinkedIn","Linux","List","Location","Lock","Locked","Magic","Magnet","Mail","Man","Merge","Mic","MicMute","Minus","NewWindow","No","NoMagnet","NodeJs","Notebook","Noview","Opera","Package","Page","Page2","Pallete","Palm","Paper","Parent","Pc","Pen","Pensil","People","Phone","Photo","Picker","Picture","PieChart","Plane","Plugin","Plus","Power","Ppt","Printer","Quote","Rain","ReflectH","ReflectV","Refresh","Resize2","Rotate","Ruler","Run","Rw","Safari","ScrewDriver","Search","Sencha","Settings","SettingsAlt","Shuffle","Skull","Skype","SlideShare","Smile","Smile2","Snow","Split","Star","Star2","Star2Off","Star3","Star3Off","StarOff","Start","Sticker","Stop","StopWatch","Sun","Svg","TShirt","Tag","TakeOff","Talke","Talkq","Thunder","Trash","Twitter","TwitterBird","Umbrella","Undo","Unlock","Usb","User","Users","Video","View","Vim","Volume0","Volume1","Volume2","Volume3","Warning","WheelChair","Windows","Woman","Wrench","Wrench2","Wrench3","ZoomIn","ZoomOut","FlexGridLayout","Layout","cellLocator","gridDef","layoutRequired","_layout","cell","__cellConstraint","valign","align","debugLines","def_cols","def_rows","min_height","min_width","minGridWidth","minGridHeight","hResizeable","vResizeable","resizeListener","columns","cellWidthFromDef","cellConstraint","rowspan","colspan","paintDebugGrid","eHeight","cHeight","cellHeight","_getGridWidth","_getGridHeight","gridHeight","cellWidth","cellX","cellY","posX","posY","newLine","def","HorizontalLayout","gap","setGap","getGap","markup","StackLayout","visibleLayer","setVisibleLayer","getVisibleLayer","_recursiveWidth","_recursiveHeight","TableLayout","DUMMY_CELL","__cell","getCellLayout","widthOffset","layoutInfos","setCellPadding","calculateLayout","getCellPadding","removeRow","removedRow","splice","addRow","figuresToAdd","columnCount","missingColumns","setCellVerticalAlign","getCellVerticalAlign","setCellAlign","getCellAlign","layouts","rowCount","newLayoutInfos","layoutWidths","layoutHeights","VerticalLayout","Between","Fulcrum","_orig_hitTest","setConnectionDirStrategy","HorizontalBus","BACKGROUND_COLOR","setLabel","_port","CONNECTION_DIR_STRATEGY","getHybridPort","strategy","dirStrategy","inputPorts","outputPorts","hybridPorts","persistPorts","cachedPorts","setPersistPorts","getPersistPorts","__initialVisibilityState","recursive","getInputPorts","getOutputPorts","excludePorts","clonePort","addPort","portName","getInputPort","portNameOrIndex","getOutputPort","removePort","newPort","c_size","oldCanvas","layoutPorts","relatedPort","locatorAttr","VerticalBus","labelString","mustAdjustTheAngel","PostIt","Activity","mementoValues","darkerBgColor","earlyStartLabel","createLabel","durationLabel","LabelEditor","onCommit","setDuration","earlyEndLabel","activityLabel","LabelInplaceEditor","inputPort","getActivity","anyValue","outputPort","lateStartLabel","stackLabel","lateEndLabel","getEarlyStart","lateFinish","setLateFinish","getEarlyEnd","latestEarlyEnd","parentActivity","lateStart","txt","innerCircle","State","Slider","Widget","DEFAULT_COLOR_THUMB","DEFAULT_COLOR_BG","currentValue","slideBoundingBox","panning","thumbGrow","thumb","onValueChange","panningX","panningY","grow","sliderWidth","figurePos","sliderPos","thumbX","configuration","onCancel","onStart","newText","prompt","commitCallback","commit","objs","avoidDuplicates","concat","elements","includes","deep","newVector","overwriteElementAt","byteToCharMap_","charToByteMap_","byteToCharMapWebSafe_","charToByteMapWebSafe_","ENCODED_VALS_BASE","ENCODED_VALS","ENCODED_VALS_WEBSAFE","encodeByteArray","input","opt_webSafe","byteToCharMap","output","byte1","haveByte2","byte2","haveByte3","byte3","outByte1","outByte2","outByte3","outByte4","stringToByteArray","decode","charToByteMap","charAt","byte4","str","charCodeAt","hashString","hex2rgb","getHTMLStyle","getRed","getGreen","getBlue","getIdealTextColor","temp_elem","appendChild","getComputedStyle","removeChild","int2hex","round","fraction","fadeTo","pc","callback_func","callback_force","aps","log_level","log_methods","pass_methods","logs","method","level","log_arr","exec_callback","is_level","firebug","setLevel","setCallback","parentKey","pathList","grandParent","grandParentKey","addObj","constructor","paths","propertyIsEnumerable","obj1","obj2","v1","v2","ensureDefault","attribute","ontouchmove","pointString","poly","random","toString","extended","global","BezierSpline","Spline","controlPoints","parts","cp","blend","CatmullRomSpline","___CSS_LOADER_EXPORT___","cssWithMappingToString","content","needLayer","modules","media","dedupe","supports","alreadyImportedModules","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","sourceMapping","getNanoSeconds","hrtime","loadTime","moduleLoadTime","nodeLoadTime","upTime","performance","now","process","hr","uptime","getTime","vendors","suffix","raf","caf","queue","frameDuration","_now","cancelled","polyfill","requestAnimationFrame","cancelAnimationFrame","color_string","ok","simple_colors","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","feldspar","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslateblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","violetred","wheat","white","whitesmoke","yellow","yellowgreen","color_defs","re","example","bits","processor","channels","toRGB","toRGBA","toHex","getHelpXML","examples","sc","list_item","list_color","RGBColor","example_div","cssText","createTextNode","list_item_value","execScript","attachEvent","eval","Scene","sn","kt","interpolate","nn","processTweens","dt","setBezierFunction","shouldScheduleUpdate","bt","Pt","unsetBezierFunction","L","bounce","D","bouncePast","q","easeFrom","B","easeFromTo","Q","easeInBack","A","easeInCirc","easeInCubic","easeInExpo","easeInOutBack","T","easeInOutCirc","P","easeInOutCubic","easeInOutExpo","S","easeInOutQuad","easeInOutQuart","easeInOutQuint","easeInOutSine","easeInQuad","u","easeInQuart","easeInQuint","easeInSine","easeOutBack","E","easeOutBounce","M","easeOutCirc","easeOutCubic","easeOutExpo","O","easeOutQuad","easeOutQuart","easeOutQuint","_","easeOutSine","easeTo","N","elastic","I","linear","swingFrom","swingFromTo","F","swingTo","C","afterTween","Jt","beforeTween","Ht","doesApply","Wt","tweenCreated","Gt","R","displayName","formulas","V","TypeError","W","enumerable","configurable","writable","defineProperty","G","Symbol","iterator","H","J","K","getOwnPropertySymbols","getOwnPropertyDescriptor","X","Y","getOwnPropertyDescriptors","defineProperties","Z","tt","nt","et","rt","it","ot","ut","ft","webkitRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","mozCancelRequestAnimationFrame","mozRequestAnimationFrame","lt","ht","vt","yt","_t","_timestamp","_currentState","_delay","_duration","_targetState","_hasEnded","_filters","_render","_data","_applyFilter","_originalState","_easing","_next","mt","gt","wt","Ot","St","_previous","jt","Promise","toStringTag","_config","_resolve","_reject","_start","_promiseCtor","setConfig","_isPlaying","_pausedAtTime","_resume","promise","render","attachment","_scheduleId","filters","_promise","then","catch","finally","setScheduleFunction","Mt","At","Et","Tt","It","Ft","xt","Ct","Dt","qt","Qt","Bt","Nt","Rt","zt","Ut","Lt","Vt","_tokenData","formatString","unshift","chunkNames","Kt","Xt","Yt","Zt","tn","en","rn","un","an","WeakMap","tweenables","some","isPlaying","pause","resume","token","globalThis","_typeof","mulTable","shgTable","processImage","blurAlphaChannel","useOffset","skipStyles","getElementById","dimensionType","clearRect","naturalWidth","naturalHeight","processCanvasRGBA","processCanvasRGB","getImageDataFromCanvas","topX","topY","getImageData","imageData","processImageDataRGBA","putImageData","stackEnd","pixels","div","widthMinus1","heightMinus1","radiusPlus1","sumFactor","stackStart","BlurStack","stackIn","stackOut","yw","yi","mulSum","shgSum","pr","pg","pb","pa","_i","rInSum","gInSum","bInSum","aInSum","rOutSum","gOutSum","bOutSum","aOutSum","rSum","gSum","bSum","aSum","_i2","rbs","paInitial","_a2","_p","_stackOut","_r","_g","_b","_a","_x","_pr","_pg","_pb","_pa","_rOutSum","_gOutSum","_bOutSum","_aOutSum","_rSum","_gSum","_bSum","_aSum","_i3","yp","_gInSum","_bInSum","_aInSum","_rInSum","_i4","_rbs","_y","_p2","processImageDataRGB","_i5","_i6","_x2","_pr2","_pg2","_pb2","_rOutSum2","_gOutSum2","_bOutSum2","_rSum2","_gSum2","_bSum2","_i7","_rInSum2","_gInSum2","_bInSum2","_i8","_y2","instance","Constructor","_classCallCheck","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","base","indexByIdentifier","sourceMap","references","updater","addElementStyle","byIndex","api","newObj","lastIdentifiers","newList","newLastIdentifiers","_index","memo","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","styleElement","nonce","removeStyleElement","styleSheet","svgPathdata","stackblurCanvas","_interopDefaultLegacy","requestAnimationFrame__default","RGBColor__default","freeze","offscreen","DOMParser","DOMParserFallback","preset","createCanvas","OffscreenCanvas","createImage","url","response","fetch","blob","createImageBitmap","Reflect","deleteProperty","loadImage","compressSpaces","trimLeft","trimRight","toNumbers","matches","toMatrixValue","numbers","allUppercase","normalizeAttributeName","parseExternalUrl","urlMatch","normalizeColor","startsWith","rgbParts","num","isFloat","attributeRegex","idRegex","classRegex","pseudoElementRegex","pseudoClassWithBracketsRegex","pseudoClassRegex","elementRegex","findSelectorMatch","regex","getSelectorSpecificity","specificity","currentSelector","PSEUDO_ZERO","vectorMagnitude","vectorsRatio","vectorsAngle","CB1","CB2","CB3","CB4","QB1","QB2","QB3","Property","empty","separator","getString","hasValue","zeroIsValue","isString","regexp","isUrlDefinition","isPixels","asString","endsWith","getNumber","isNormalizedColor","getDpi","getRem","rootEmSize","getEm","emSize","getUnits","getPixels","axisOrIsFontSize","processPercent","axis","isFontSize","viewPort","screen","computeSize","getMilliseconds","getRadians","getDefinition","definitions","getFillStyleDefinition","createGradient","ctx","createPattern","getHrefAttribute","patternTransform","getAttribute","getTextBaseline","textBaselineMapping","addOpacity","commas","ViewPort","viewPorts","setCurrent","removeCurrent","getDefault","getCurrent","DEFAULT_VIEWPORT_WIDTH","DEFAULT_VIEWPORT_HEIGHT","defaultValue","parseScale","parsePath","pathPoints","angleTo","atan2","applyTransform","xp","Mouse","isWorking","working","onclick","onmousemove","hasEvents","runEvents","eventElements","run","checkPath","isPointInPath","checkBoundingBox","isPointInBox","mapXY","offsetLeft","offsetTop","offsetParent","scrollX","scrollY","eventTarget","defaultWindow","defaultFetch$1","Screen","checker","waits","ready","readyPromise","resolve","isReady","isReadyLock","every","resolveReady","setDefaults","strokeStyle","lineCap","lineJoin","miterLimit","aspectRatio","desiredWidth","desiredHeight","refX","refY","clip","clipX","clipY","cleanAspectRatio","aspectRatioAlign","aspectRatioMeetOrSlice","meetOrSlice","scaleMin","scaleMax","finalDesiredWidth","finalDesiredHeight","refXProp","refYProp","hasRefs","scaledClipX","scaledClipY","beginPath","moveTo","lineTo","closePath","isMeetMinY","isSliceMaxY","isMeetMinX","isSliceMaxX","enableRedraw","ignoreDimensions","ignoreClear","forceRedraw","scaleWidth","scaleHeight","mouse","FRAMERATE","tick","shouldUpdate","intervalId","animations","isFirstRender","widthStyle","getStyle","heightStyle","cWidth","clientWidth","clientHeight","viewBox","xRatio","yRatio","transformStyle","defaultFetch","MAX_VIRTUAL_PIXELS","DefaultDOMParser","Parser","resource","parseFromString","load","parser","checkDocument","err","parserError","getElementsByTagName","textContent","Translate","unapply","applyToPoint","originX","originY","tx","ty","rad","transformOrigin","Scale","scaleSize","Matrix","det","Skew","skew","super","SkewX","SkewY","Transform","fromElement","transformOriginXProperty","transformOriginYProperty","transforms","transform1","parseTransform","TransformType","transformTypes","skewX","skewY","Element","createIfNotExists","href","skipAncestors","styles","parentStyle","save","mask","applyEffects","setContext","renderChildren","clearContext","restore","clipPathStyleProp","addChild","childNode","ignoreChildTypes","matchesSelector","styleClasses","styleClass","addStylesFromStyleDefinition","stylesSpecificity","styleProp","existingSpecificity","removeStyles","ignoreStyles","toRestore","restoreStyles","isFirstChild","captureTextNodes","animationFrozen","animationFrozenValue","textNode","UnknownElement","wrapFontFamily","trimmed","prepareFontStyle","fontStyle","targetFontStyle","prepareFontWeight","fontWeight","targetFontWeight","inherit","fontVariant","part","variants","weights","inheritFont","BoundingBox","addX","addY","addBoundingBox","sumCubic","bezierCurveAdd","forX","b2ac","t1","t2","addBezierCurve","p0x","p0y","p1x","p1y","p2x","p2y","p3x","p3y","addQuadraticCurve","cp1x","cp1y","cp2x","cp2y","NaN","RenderedElement","calculateOpacity","opacityStyle","fromMeasure","fillStyleProp","fillOpacityStyleProp","strokeStyleProp","strokeOpacityProp","fillStyle","strokeWidthStyleProp","newLineWidth","lineWidth","strokeLinecapStyleProp","strokeLinejoinStyleProp","strokeMiterlimitProp","strokeDasharrayStyleProp","strokeDashoffsetProp","gaps","setLineDash","webkitLineDash","mozDash","lineDashOffset","webkitLineDashOffset","mozDashOffset","modifiedEmSizeStack","fontStyleProp","fontStyleStyleProp","fontVariantStyleProp","fontWeightStyleProp","fontSizeStyleProp","fontFamilyStyleProp","globalAlpha","popEmSize","TextElement","textBaseline","initializeCoordinates","leafTexts","textChunkStart","POSITIVE_INFINITY","NEGATIVE_INFINITY","getTElementBoundingBox","adjustChildCoordinatesRecursive","childBoundingBox","getChildBoundingBox","inheritFontSize","measureText","getGlyph","char","glyph","isArabic","prevChar","nextChar","arabicForm","arabicGlyphs","glyphs","missingGlyph","getTextFromNode","lastIndex","renderTElementChildren","renderChild","renderText","customFont","unitsPerEm","fontFace","ctxFont","isRTL","lw","horizAdvX","fillText","strokeText","applyAnchoring","firstElement","textAnchor","adjustChildCoordinatesRecursiveCore","textParent","i1","adjustChildCoordinates","xAttr","yAttr","dxAttr","dyAttr","Boolean","getInheritedAttribute","i2","i3","measureCache","measure","measureTargetText","targetText","parentAttr","TSpanElement","TextNode","PathParser","SVGPathData","reset","previousCommand","control","angles","isEnd","getPoint","xProp","yProp","makeAbsolute","getAsControlPoint","getAsCurrentPoint","getReflectedControlPoint","CURVE_TO","SMOOTH_CURVE_TO","QUAD_TO","SMOOTH_QUAD_TO","relative","addMarker","priorTo","addMarkerAngle","getMarkerPoints","getMarkerAngles","PathElement","pathParser","MOVE_TO","pathM","LINE_TO","pathL","HORIZ_LINE_TO","pathH","VERT_LINE_TO","pathV","pathC","pathS","pathQ","pathT","ARC","pathA","CLOSE_PATH","pathZ","_ctx","getMarkers","fillRuleStyleProp","setTransform","markersLastIndex","markerStartStyleProp","markerMidStyleProp","markerEndStyleProp","marker","controlPoint","currentPoint","bezierCurveTo","quadraticCurveTo","rX","rY","xRot","lArcFlag","sweepFlag","xAxisRotation","currp","cpp","centp","ad","ah","halfWay","sx","sy","arc","SVGElement","getPropertyValue","fontSizeProp","refXAttr","refYAttr","viewBoxAttr","preserveAspectRatio","widthAttr","heightAttr","styleAttr","originWidth","originHeight","preserveAspectRatioAttr","RectElement","rxAttr","ryAttr","KAPPA","CircleElement","EllipseElement","LineElement","getPoints","x0","y0","PolylineElement","PolygonElement","PatternElement","parentOpacityProp","patternSvg","patternCanvas","patternCtx","MarkerElement","orient","markerUnits","markerSvg","DefsElement","GElement","GradientElement","getGradientUnits","stopsContainer","inheritStopContainer","stops","gradient","getGradient","addParentOpacity","addColorStop","rootView","attributesToInherit","attributeToInherit","LinearGradientElement","isBoundingBoxUnits","createLinearGradient","RadialGradientElement","fx","fy","fr","createRadialGradient","StopElement","stopOpacity","stopColor","AnimateElement","getProperty","attributeType","attributeName","calcValue","initialUnits","progress","getProgress","newValue","initialValue","maxDuration","frozen","updated","typeAttr","values","lb","valuesAttr","AnimateColorElement","colorFrom","colorTo","AnimateTransformElement","from1","to1","transformFrom","transformTo","FontFaceElement","ascent","descent","GlyphElement","unicode","MissingGlyphElement","FontElement","fontFamilyStyle","arabicGlyph","TRefElement","AElement","hasText","open","node1","TextPathElement","dataArray","dTheta","psi","fs","setTextData","textDecoration","glyphInfo","partialText","getLetterSpacingAt","letterSpacingCache","findSegmentToFitChar","textFullWidth","fullPathWidth","spacesNumber","inputOffset","charI","glyphWidth","splineStep","textHeight","getEquidistantPointOnPath","dyX","dyY","measuresCache","chars","thisSpacing","parentSpacing","letterSpacing","textLen","dxSum","acc","cur","textWidth","getPathLength","startOffset","nextOffset","parsePathData","pathLength","pathCommands","nextCommandType","calcLength","commandType","getLineLength","getPointOnCubicBezier","getPointOnQuadraticBezier","inc","getPointOnEllipticalArc","getPointOnLine","rise","ix","iy","pRise","pRun","getPointOnPath","fullLen","cumulativePathLength","currentT","pct","p4x","p4y","cosPsi","sinPsi","buildEquidistantCache","inputStep","inputPrecision","precision","equidistantCache","targetDistance","Map","pathElement","dataUriRegex","ImageElement","loaded","loadSvg","atob","decodeURIComponent","subDocument","forkString","isSvg","images","SymbolElement","SVGFontLoader","fonts","fontNode","StyleElement","_1","cssParts","cssClasses","cssProps","cssProp","UseElement","tempSvg","oldParent","elementTransform","cachedElement","imGet","_height","imSet","m1","m2","m3","FeColorMatrixElement","includeOpacity","srcData","nr","ng","nb","na","MaskElement","ignoredStyles","maskCanvas","maskCtx","tmpCanvas","tmpCtx","globalCompositeOperation","fillRect","ClipPathElement","contextProto","getPrototypeOf","FilterElement","efd","extraFilterDistance","tmpCanvasWidth","tmpCanvasHeight","FeDropShadowElement","_width","FeMorphologyElement","FeCompositeElement","FeGaussianBlurElement","blurRadius","getUniqueId","canvasRGBA","TitleElement","DescElement","bindCreateImage","createImage1","anonymousCrossOrigin","forceAnonymousCrossOrigin","emSizeStack","uniqueId","isImagesLoaded","isFontsLoaded","createDocumentElement","elementType","ElementType","elementTypes","createCanvas1","createImage2","async","crossOrigin","reject","onload","onerror","_event","_source","_lineno","_colno","Canvg","svgDocument","fromString","fork","baseOptions","presets","setPrototypeOf","cX","cY","phi1","phi2","SVGPathDataTransformer","ROUND","TO_ABS","TO_REL","NORMALIZE_HVZ","NORMALIZE_ST","QT_TO_C","INFO","SANITIZE","LINE_COMMANDS","MATRIX","TRANSLATE","SCALE","SKEW_X","SKEW_Y","X_AXIS_SYMMETRY","Y_AXIS_SYMMETRY","A_TO_C","ANNOTATE_ARCS","CLONE","CALCULATE_BOUNDS","DRAWING_COMMANDS","toAbs","toRel","normalizeHVZ","normalizeST","qtToC","aToC","sanitize","xSymmetry","ySymmetry","annotateArcs","curNumber","curCommandType","curCommandRelative","canParseCommandOrComma","curNumberHasExp","curNumberHasExpDigits","curNumberHasDecimal","curArgs","SyntaxError","getBounds","COMMAND_ARG_COUNTS","SVGPathDataParser","encodeSVGPath","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","nc"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"draw2d.js","mappings":";CAAA,SAA2CA,EAAMC,GAC1B,iBAAZ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CACjD1kH,GAAI0kH,EAEJ1zH,QAAS,CAAC,GAOX,OAHA4zH,EAAoBF,GAAUnyG,KAAKthB,EAAOD,QAASC,EAAQA,EAAOD,QAASyzH,GAGpExzH,EAAOD,OACf,QCrBAyzH,EAAoB5iF,EAAK5wC,IACxB,IAAI8V,EAAS9V,GAAUA,EAAOO,WAC7B,IAAOP,EAAiB,QACxB,IAAM,EAEP,OADAwzH,EAAoBhmG,EAAE1X,EAAQ,CAAE5D,EAAG4D,IAC5BA,CAAM,ECLd09G,EAAoBhmG,EAAI,CAACztB,EAAS6zH,KACjC,IAAI,IAAI7yG,KAAO6yG,EACXJ,EAAoBjyF,EAAEqyF,EAAY7yG,KAASyyG,EAAoBjyF,EAAExhC,EAASghB,IAC5ES,OAAO0uE,eAAenwF,EAASghB,EAAK,CAAE6vE,YAAY,EAAM3hF,IAAK2kH,EAAW7yG,IAE1E,ECNDyyG,EAAoBxnE,EAAI,WACvB,GAA0B,iBAAfisC,WAAyB,OAAOA,WAC3C,IACC,OAAO92F,MAAQ,IAAIwb,SAAS,cAAb,EAChB,CAAE,MAAOtc,GACR,GAAsB,iBAAXmjB,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCAxBgwG,EAAoBjyF,EAAI,CAAC1f,EAAKo8B,IAAUz8B,OAAOQ,UAAU89B,eAAex+B,KAAKO,EAAKo8B,GCClFu1E,EAAoB9hG,EAAK3xB,IACH,oBAAX83F,QAA0BA,OAAOC,aAC1Ct2E,OAAO0uE,eAAenwF,EAAS83F,OAAOC,YAAa,CAAEj3E,MAAO,WAE7DW,OAAO0uE,eAAenwF,EAAS,aAAc,CAAE8gB,OAAO,GAAO,ECL9D2yG,EAAoBK,QAAKxyG,ECGCmyG,EAAoB","sources":["webpack://draw2d/webpack/universalModuleDefinition","webpack://draw2d/./src/lib/Class.exec.js","webpack://draw2d/./src/lib/pathfinding.exec.js","webpack://draw2d/./src/lib/raphael.exec.js","webpack://draw2d/./src/Canvas.js","webpack://draw2d/./src/Configuration.js","webpack://draw2d/./src/Connection.js","webpack://draw2d/./src/Figure.js","webpack://draw2d/./src/HeadlessCanvas.js","webpack://draw2d/./src/HybridPort.js","webpack://draw2d/./src/InputPort.js","webpack://draw2d/./src/OutputPort.js","webpack://draw2d/./src/Port.js","webpack://draw2d/./src/ResizeHandle.js","webpack://draw2d/./src/SVGFigure.js","webpack://draw2d/./src/Selection.js","webpack://draw2d/./src/SetFigure.js","webpack://draw2d/./src/VectorFigure.js","webpack://draw2d/./src/command/Command.js","webpack://draw2d/./src/command/CommandAdd.js","webpack://draw2d/./src/command/CommandAddVertex.js","webpack://draw2d/./src/command/CommandAssignFigure.js","webpack://draw2d/./src/command/CommandAttr.js","webpack://draw2d/./src/command/CommandBoundingBox.js","webpack://draw2d/./src/command/CommandCollection.js","webpack://draw2d/./src/command/CommandConnect.js","webpack://draw2d/./src/command/CommandDelete.js","webpack://draw2d/./src/command/CommandDeleteGroup.js","webpack://draw2d/./src/command/CommandGroup.js","webpack://draw2d/./src/command/CommandMove.js","webpack://draw2d/./src/command/CommandMoveConnection.js","webpack://draw2d/./src/command/CommandMoveLine.js","webpack://draw2d/./src/command/CommandMoveVertex.js","webpack://draw2d/./src/command/CommandMoveVertices.js","webpack://draw2d/./src/command/CommandReconnect.js","webpack://draw2d/./src/command/CommandRemoveVertex.js","webpack://draw2d/./src/command/CommandReplaceVertices.js","webpack://draw2d/./src/command/CommandResize.js","webpack://draw2d/./src/command/CommandRotate.js","webpack://draw2d/./src/command/CommandStack.js","webpack://draw2d/./src/command/CommandStackEvent.js","webpack://draw2d/./src/command/CommandStackEventListener.js","webpack://draw2d/./src/command/CommandType.js","webpack://draw2d/./src/command/CommandUngroup.js","webpack://draw2d/./src/decoration/connection/ArrowDecorator.js","webpack://draw2d/./src/decoration/connection/BarDecorator.js","webpack://draw2d/./src/decoration/connection/CircleDecorator.js","webpack://draw2d/./src/decoration/connection/Decorator.js","webpack://draw2d/./src/decoration/connection/DiamondDecorator.js","webpack://draw2d/./src/geo/Line.js","webpack://draw2d/./src/geo/Point.js","webpack://draw2d/./src/geo/PositionConstants.js","webpack://draw2d/./src/geo/Ray.js","webpack://draw2d/./src/geo/Rectangle.js","webpack://draw2d/./src/geo/Util.js","webpack://draw2d/./src/index.js","webpack://draw2d/./src/io/Reader.js","webpack://draw2d/./src/io/Writer.js","webpack://draw2d/./src/io/json/Reader.js","webpack://draw2d/./src/io/json/Writer.js","webpack://draw2d/./src/io/png/Writer.js","webpack://draw2d/./src/io/svg/Writer.js","webpack://draw2d/./src/layout/anchor/CenterEdgeConnectionAnchor.js","webpack://draw2d/./src/layout/anchor/ChopboxConnectionAnchor.js","webpack://draw2d/./src/layout/anchor/ConnectionAnchor.js","webpack://draw2d/./src/layout/anchor/FanConnectionAnchor.js","webpack://draw2d/./src/layout/anchor/ShortesPathConnectionAnchor.js","webpack://draw2d/./src/layout/connection/CircuitConnectionRouter.js","webpack://draw2d/./src/layout/connection/ConnectionRouter.js","webpack://draw2d/./src/layout/connection/DirectRouter.js","webpack://draw2d/./src/layout/connection/FanConnectionRouter.js","webpack://draw2d/./src/layout/connection/InteractiveManhattanConnectionRouter.js","webpack://draw2d/./src/layout/connection/ManhattanBridgedConnectionRouter.js","webpack://draw2d/./src/layout/connection/ManhattanConnectionRouter.js","webpack://draw2d/./src/layout/connection/MazeConnectionRouter.js","webpack://draw2d/./src/layout/connection/MuteableManhattanConnectionRouter.js","webpack://draw2d/./src/layout/connection/RubberbandRouter.js","webpack://draw2d/./src/layout/connection/SketchConnectionRouter.js","webpack://draw2d/./src/layout/connection/SplineConnectionRouter.js","webpack://draw2d/./src/layout/connection/VertexRouter.js","webpack://draw2d/./src/layout/locator/BottomLocator.js","webpack://draw2d/./src/layout/locator/CenterLocator.js","webpack://draw2d/./src/layout/locator/ConnectionLocator.js","webpack://draw2d/./src/layout/locator/DraggableLocator.js","webpack://draw2d/./src/layout/locator/InputPortLocator.js","webpack://draw2d/./src/layout/locator/LeftLocator.js","webpack://draw2d/./src/layout/locator/Locator.js","webpack://draw2d/./src/layout/locator/ManhattanMidpointLocator.js","webpack://draw2d/./src/layout/locator/OutputPortLocator.js","webpack://draw2d/./src/layout/locator/ParallelMidpointLocator.js","webpack://draw2d/./src/layout/locator/PolylineMidpointLocator.js","webpack://draw2d/./src/layout/locator/PortLocator.js","webpack://draw2d/./src/layout/locator/RightLocator.js","webpack://draw2d/./src/layout/locator/SmartDraggableLocator.js","webpack://draw2d/./src/layout/locator/TopLocator.js","webpack://draw2d/./src/layout/locator/XYAbsPortLocator.js","webpack://draw2d/./src/layout/locator/XYRelPortLocator.js","webpack://draw2d/./src/layout/mesh/ExplodeLayouter.js","webpack://draw2d/./src/layout/mesh/MeshLayouter.js","webpack://draw2d/./src/layout/mesh/ProposedMeshChange.js","webpack://draw2d/./src/lib/jquery.autoresize.js","webpack://draw2d/./src/lib/jquery.contextmenu.js","webpack://draw2d/./src/packages.js","webpack://draw2d/./src/policy/EditPolicy.js","webpack://draw2d/./src/policy/canvas/BoundingboxSelectionPolicy.js","webpack://draw2d/./src/policy/canvas/CanvasPolicy.js","webpack://draw2d/./src/policy/canvas/CoronaDecorationPolicy.js","webpack://draw2d/./src/policy/canvas/DecorationPolicy.js","webpack://draw2d/./src/policy/canvas/DefaultKeyboardPolicy.js","webpack://draw2d/./src/policy/canvas/DropInterceptorPolicy.js","webpack://draw2d/./src/policy/canvas/ExtendedKeyboardPolicy.js","webpack://draw2d/./src/policy/canvas/FadeoutDecorationPolicy.js","webpack://draw2d/./src/policy/canvas/GhostMoveSelectionPolicy.js","webpack://draw2d/./src/policy/canvas/KeyboardPolicy.js","webpack://draw2d/./src/policy/canvas/PanningSelectionPolicy.js","webpack://draw2d/./src/policy/canvas/ReadOnlySelectionPolicy.js","webpack://draw2d/./src/policy/canvas/SelectionPolicy.js","webpack://draw2d/./src/policy/canvas/ShowChessboardEditPolicy.js","webpack://draw2d/./src/policy/canvas/ShowDimetricGridEditPolicy.js","webpack://draw2d/./src/policy/canvas/ShowDotEditPolicy.js","webpack://draw2d/./src/policy/canvas/ShowGridEditPolicy.js","webpack://draw2d/./src/policy/canvas/SingleSelectionPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToCenterEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToDimetricGridEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToGeometryEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToGridEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToInBetweenEditPolicy.js","webpack://draw2d/./src/policy/canvas/SnapToVerticesEditPolicy.js","webpack://draw2d/./src/policy/canvas/WheelZoomPolicy.js","webpack://draw2d/./src/policy/canvas/ZoomPolicy.js","webpack://draw2d/./src/policy/connection/ClickConnectionCreatePolicy.js","webpack://draw2d/./src/policy/connection/ComposedConnectionCreatePolicy.js","webpack://draw2d/./src/policy/connection/ConnectionCreatePolicy.js","webpack://draw2d/./src/policy/connection/DragConnectionCreatePolicy.js","webpack://draw2d/./src/policy/connection/OrthogonalConnectionCreatePolicy.js","webpack://draw2d/./src/policy/figure/AntSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/BigRectangleSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/BusSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/DragDropEditPolicy.js","webpack://draw2d/./src/policy/figure/FigureEditPolicy.js","webpack://draw2d/./src/policy/figure/GlowSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/HBusSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/HorizontalEditPolicy.js","webpack://draw2d/./src/policy/figure/RaftSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/RectangleSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/RegionEditPolicy.js","webpack://draw2d/./src/policy/figure/ResizeSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/RoundRectangleSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/SelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/SelectionPolicy.js","webpack://draw2d/./src/policy/figure/SlimSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/VBusSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/VertexSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/figure/VerticalEditPolicy.js","webpack://draw2d/./src/policy/figure/WidthSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/line/LineSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/line/OrthogonalSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/line/VertexSelectionFeedbackPolicy.js","webpack://draw2d/./src/policy/port/ElasticStrapFeedbackPolicy.js","webpack://draw2d/./src/policy/port/IntrusivePortsFeedbackPolicy.js","webpack://draw2d/./src/policy/port/PortFeedbackPolicy.js","webpack://draw2d/./src/shape/analog/OpAmp.js","webpack://draw2d/./src/shape/analog/ResistorBridge.js","webpack://draw2d/./src/shape/analog/ResistorVertical.js","webpack://draw2d/./src/shape/analog/VoltageSupplyHorizontal.js","webpack://draw2d/./src/shape/analog/VoltageSupplyVertical.js","webpack://draw2d/./src/shape/arrow/CalligrapherArrowDownLeft.js","webpack://draw2d/./src/shape/arrow/CalligrapherArrowLeft.js","webpack://draw2d/./src/shape/basic/Arc.js","webpack://draw2d/./src/shape/basic/Circle.js","webpack://draw2d/./src/shape/basic/Diamond.js","webpack://draw2d/./src/shape/basic/GhostVertexResizeHandle.js","webpack://draw2d/./src/shape/basic/Image.js","webpack://draw2d/./src/shape/basic/Label.js","webpack://draw2d/./src/shape/basic/Line.js","webpack://draw2d/./src/shape/basic/LineEndResizeHandle.js","webpack://draw2d/./src/shape/basic/LineResizeHandle.js","webpack://draw2d/./src/shape/basic/LineStartResizeHandle.js","webpack://draw2d/./src/shape/basic/Oval.js","webpack://draw2d/./src/shape/basic/PolyLine.js","webpack://draw2d/./src/shape/basic/Polygon.js","webpack://draw2d/./src/shape/basic/Rectangle.js","webpack://draw2d/./src/shape/basic/Text.js","webpack://draw2d/./src/shape/basic/VertexResizeHandle.js","webpack://draw2d/./src/shape/composite/Composite.js","webpack://draw2d/./src/shape/composite/Group.js","webpack://draw2d/./src/shape/composite/Jailhouse.js","webpack://draw2d/./src/shape/composite/Raft.js","webpack://draw2d/./src/shape/composite/RaftResizeHandle.js","webpack://draw2d/./src/shape/composite/StrongComposite.js","webpack://draw2d/./src/shape/composite/WeakComposite.js","webpack://draw2d/./src/shape/diagram/Diagram.js","webpack://draw2d/./src/shape/diagram/Pie.js","webpack://draw2d/./src/shape/diagram/Sparkline.js","webpack://draw2d/./src/shape/dimetric/Rectangle.js","webpack://draw2d/./src/shape/flowchart/Document.js","webpack://draw2d/./src/shape/icon/Acw.js","webpack://draw2d/./src/shape/icon/Alarm.js","webpack://draw2d/./src/shape/icon/Anonymous.js","webpack://draw2d/./src/shape/icon/Apple.js","webpack://draw2d/./src/shape/icon/Apps.js","webpack://draw2d/./src/shape/icon/ArrowDown.js","webpack://draw2d/./src/shape/icon/ArrowLeft.js","webpack://draw2d/./src/shape/icon/ArrowLeft2.js","webpack://draw2d/./src/shape/icon/ArrowRight.js","webpack://draw2d/./src/shape/icon/ArrowRight2.js","webpack://draw2d/./src/shape/icon/ArrowUp.js","webpack://draw2d/./src/shape/icon/Aumade.js","webpack://draw2d/./src/shape/icon/BarChart.js","webpack://draw2d/./src/shape/icon/BioHazard.js","webpack://draw2d/./src/shape/icon/Book.js","webpack://draw2d/./src/shape/icon/Bookmark.js","webpack://draw2d/./src/shape/icon/Books.js","webpack://draw2d/./src/shape/icon/Bubble.js","webpack://draw2d/./src/shape/icon/Bug.js","webpack://draw2d/./src/shape/icon/Calendar.js","webpack://draw2d/./src/shape/icon/Cart.js","webpack://draw2d/./src/shape/icon/Ccw.js","webpack://draw2d/./src/shape/icon/Chat.js","webpack://draw2d/./src/shape/icon/Check.js","webpack://draw2d/./src/shape/icon/Chrome.js","webpack://draw2d/./src/shape/icon/Clip.js","webpack://draw2d/./src/shape/icon/Clock.js","webpack://draw2d/./src/shape/icon/Cloud.js","webpack://draw2d/./src/shape/icon/Cloud2.js","webpack://draw2d/./src/shape/icon/CloudDown.js","webpack://draw2d/./src/shape/icon/CloudUp.js","webpack://draw2d/./src/shape/icon/Cloudy.js","webpack://draw2d/./src/shape/icon/Code.js","webpack://draw2d/./src/shape/icon/CodeTalk.js","webpack://draw2d/./src/shape/icon/CommandLine.js","webpack://draw2d/./src/shape/icon/Connect.js","webpack://draw2d/./src/shape/icon/Contract.js","webpack://draw2d/./src/shape/icon/Crop.js","webpack://draw2d/./src/shape/icon/Cross.js","webpack://draw2d/./src/shape/icon/Cube.js","webpack://draw2d/./src/shape/icon/Customer.js","webpack://draw2d/./src/shape/icon/Db.js","webpack://draw2d/./src/shape/icon/Detour.js","webpack://draw2d/./src/shape/icon/Diagram.js","webpack://draw2d/./src/shape/icon/Disconnect.js","webpack://draw2d/./src/shape/icon/DockBottom.js","webpack://draw2d/./src/shape/icon/DockLeft.js","webpack://draw2d/./src/shape/icon/DockRight.js","webpack://draw2d/./src/shape/icon/DockTop.js","webpack://draw2d/./src/shape/icon/Download.js","webpack://draw2d/./src/shape/icon/Dry.js","webpack://draw2d/./src/shape/icon/Employee.js","webpack://draw2d/./src/shape/icon/End.js","webpack://draw2d/./src/shape/icon/Ethernet.js","webpack://draw2d/./src/shape/icon/Exchange.js","webpack://draw2d/./src/shape/icon/Expand.js","webpack://draw2d/./src/shape/icon/Export.js","webpack://draw2d/./src/shape/icon/Fave.js","webpack://draw2d/./src/shape/icon/Feed.js","webpack://draw2d/./src/shape/icon/Ff.js","webpack://draw2d/./src/shape/icon/Firefox.js","webpack://draw2d/./src/shape/icon/Flag.js","webpack://draw2d/./src/shape/icon/Flickr.js","webpack://draw2d/./src/shape/icon/Folder.js","webpack://draw2d/./src/shape/icon/Font.js","webpack://draw2d/./src/shape/icon/Fork.js","webpack://draw2d/./src/shape/icon/ForkAlt.js","webpack://draw2d/./src/shape/icon/FullCube.js","webpack://draw2d/./src/shape/icon/Future.js","webpack://draw2d/./src/shape/icon/GRaphael.js","webpack://draw2d/./src/shape/icon/Gear.js","webpack://draw2d/./src/shape/icon/Gear2.js","webpack://draw2d/./src/shape/icon/GitHub.js","webpack://draw2d/./src/shape/icon/GitHubAlt.js","webpack://draw2d/./src/shape/icon/Glasses.js","webpack://draw2d/./src/shape/icon/Globe.js","webpack://draw2d/./src/shape/icon/GlobeAlt.js","webpack://draw2d/./src/shape/icon/GlobeAlt2.js","webpack://draw2d/./src/shape/icon/Hail.js","webpack://draw2d/./src/shape/icon/Hammer.js","webpack://draw2d/./src/shape/icon/HammerAndScrewDriver.js","webpack://draw2d/./src/shape/icon/HangUp.js","webpack://draw2d/./src/shape/icon/Help.js","webpack://draw2d/./src/shape/icon/History.js","webpack://draw2d/./src/shape/icon/Home.js","webpack://draw2d/./src/shape/icon/IMac.js","webpack://draw2d/./src/shape/icon/Icon.js","webpack://draw2d/./src/shape/icon/Icons.js","webpack://draw2d/./src/shape/icon/Ie.js","webpack://draw2d/./src/shape/icon/Ie9.js","webpack://draw2d/./src/shape/icon/Import.js","webpack://draw2d/./src/shape/icon/InkScape.js","webpack://draw2d/./src/shape/icon/Ipad.js","webpack://draw2d/./src/shape/icon/Iphone.js","webpack://draw2d/./src/shape/icon/JQuery.js","webpack://draw2d/./src/shape/icon/Jigsaw.js","webpack://draw2d/./src/shape/icon/Key.js","webpack://draw2d/./src/shape/icon/Lab.js","webpack://draw2d/./src/shape/icon/Lamp.js","webpack://draw2d/./src/shape/icon/Lamp_alt.js","webpack://draw2d/./src/shape/icon/Landing.js","webpack://draw2d/./src/shape/icon/Landscape1.js","webpack://draw2d/./src/shape/icon/Landscape2.js","webpack://draw2d/./src/shape/icon/LineChart.js","webpack://draw2d/./src/shape/icon/Link.js","webpack://draw2d/./src/shape/icon/LinkedIn.js","webpack://draw2d/./src/shape/icon/Linux.js","webpack://draw2d/./src/shape/icon/List.js","webpack://draw2d/./src/shape/icon/Location.js","webpack://draw2d/./src/shape/icon/Lock.js","webpack://draw2d/./src/shape/icon/Locked.js","webpack://draw2d/./src/shape/icon/Magic.js","webpack://draw2d/./src/shape/icon/Magnet.js","webpack://draw2d/./src/shape/icon/Mail.js","webpack://draw2d/./src/shape/icon/Man.js","webpack://draw2d/./src/shape/icon/Merge.js","webpack://draw2d/./src/shape/icon/Mic.js","webpack://draw2d/./src/shape/icon/MicMute.js","webpack://draw2d/./src/shape/icon/Minus.js","webpack://draw2d/./src/shape/icon/NewWindow.js","webpack://draw2d/./src/shape/icon/No.js","webpack://draw2d/./src/shape/icon/NoMagnet.js","webpack://draw2d/./src/shape/icon/NodeJs.js","webpack://draw2d/./src/shape/icon/Notebook.js","webpack://draw2d/./src/shape/icon/Noview.js","webpack://draw2d/./src/shape/icon/Opera.js","webpack://draw2d/./src/shape/icon/Package.js","webpack://draw2d/./src/shape/icon/Page.js","webpack://draw2d/./src/shape/icon/Page2.js","webpack://draw2d/./src/shape/icon/Pallete.js","webpack://draw2d/./src/shape/icon/Palm.js","webpack://draw2d/./src/shape/icon/Paper.js","webpack://draw2d/./src/shape/icon/Parent.js","webpack://draw2d/./src/shape/icon/Pc.js","webpack://draw2d/./src/shape/icon/Pen.js","webpack://draw2d/./src/shape/icon/Pensil.js","webpack://draw2d/./src/shape/icon/People.js","webpack://draw2d/./src/shape/icon/Phone.js","webpack://draw2d/./src/shape/icon/Photo.js","webpack://draw2d/./src/shape/icon/Picker.js","webpack://draw2d/./src/shape/icon/Picture.js","webpack://draw2d/./src/shape/icon/PieChart.js","webpack://draw2d/./src/shape/icon/Plane.js","webpack://draw2d/./src/shape/icon/Plugin.js","webpack://draw2d/./src/shape/icon/Plus.js","webpack://draw2d/./src/shape/icon/Power.js","webpack://draw2d/./src/shape/icon/Ppt.js","webpack://draw2d/./src/shape/icon/Printer.js","webpack://draw2d/./src/shape/icon/Quote.js","webpack://draw2d/./src/shape/icon/Rain.js","webpack://draw2d/./src/shape/icon/Raphael.js","webpack://draw2d/./src/shape/icon/ReflectH.js","webpack://draw2d/./src/shape/icon/ReflectV.js","webpack://draw2d/./src/shape/icon/Refresh.js","webpack://draw2d/./src/shape/icon/Resize2.js","webpack://draw2d/./src/shape/icon/Rotate.js","webpack://draw2d/./src/shape/icon/Ruler.js","webpack://draw2d/./src/shape/icon/Run.js","webpack://draw2d/./src/shape/icon/Rw.js","webpack://draw2d/./src/shape/icon/Safari.js","webpack://draw2d/./src/shape/icon/ScrewDriver.js","webpack://draw2d/./src/shape/icon/Search.js","webpack://draw2d/./src/shape/icon/Sencha.js","webpack://draw2d/./src/shape/icon/Settings.js","webpack://draw2d/./src/shape/icon/SettingsAlt.js","webpack://draw2d/./src/shape/icon/Shuffle.js","webpack://draw2d/./src/shape/icon/Skull.js","webpack://draw2d/./src/shape/icon/Skype.js","webpack://draw2d/./src/shape/icon/SlideShare.js","webpack://draw2d/./src/shape/icon/Smile.js","webpack://draw2d/./src/shape/icon/Smile2.js","webpack://draw2d/./src/shape/icon/Snow.js","webpack://draw2d/./src/shape/icon/Split.js","webpack://draw2d/./src/shape/icon/Star.js","webpack://draw2d/./src/shape/icon/Star2.js","webpack://draw2d/./src/shape/icon/Star2Off.js","webpack://draw2d/./src/shape/icon/Star3.js","webpack://draw2d/./src/shape/icon/Star3Off.js","webpack://draw2d/./src/shape/icon/StarOff.js","webpack://draw2d/./src/shape/icon/Start.js","webpack://draw2d/./src/shape/icon/Sticker.js","webpack://draw2d/./src/shape/icon/Stop.js","webpack://draw2d/./src/shape/icon/StopWatch.js","webpack://draw2d/./src/shape/icon/Sun.js","webpack://draw2d/./src/shape/icon/Svg.js","webpack://draw2d/./src/shape/icon/TShirt.js","webpack://draw2d/./src/shape/icon/Tag.js","webpack://draw2d/./src/shape/icon/TakeOff.js","webpack://draw2d/./src/shape/icon/Talke.js","webpack://draw2d/./src/shape/icon/Talkq.js","webpack://draw2d/./src/shape/icon/Thunder.js","webpack://draw2d/./src/shape/icon/Trash.js","webpack://draw2d/./src/shape/icon/Twitter.js","webpack://draw2d/./src/shape/icon/TwitterBird.js","webpack://draw2d/./src/shape/icon/Umbrella.js","webpack://draw2d/./src/shape/icon/Undo.js","webpack://draw2d/./src/shape/icon/Unlock.js","webpack://draw2d/./src/shape/icon/Usb.js","webpack://draw2d/./src/shape/icon/User.js","webpack://draw2d/./src/shape/icon/Users.js","webpack://draw2d/./src/shape/icon/Video.js","webpack://draw2d/./src/shape/icon/View.js","webpack://draw2d/./src/shape/icon/Vim.js","webpack://draw2d/./src/shape/icon/Volume0.js","webpack://draw2d/./src/shape/icon/Volume1.js","webpack://draw2d/./src/shape/icon/Volume2.js","webpack://draw2d/./src/shape/icon/Volume3.js","webpack://draw2d/./src/shape/icon/Warning.js","webpack://draw2d/./src/shape/icon/WheelChair.js","webpack://draw2d/./src/shape/icon/Windows.js","webpack://draw2d/./src/shape/icon/Woman.js","webpack://draw2d/./src/shape/icon/Wrench.js","webpack://draw2d/./src/shape/icon/Wrench2.js","webpack://draw2d/./src/shape/icon/Wrench3.js","webpack://draw2d/./src/shape/icon/ZoomIn.js","webpack://draw2d/./src/shape/icon/ZoomOut.js","webpack://draw2d/./src/shape/layout/FlexGridLayout.js","webpack://draw2d/./src/shape/layout/HorizontalLayout.js","webpack://draw2d/./src/shape/layout/Layout.js","webpack://draw2d/./src/shape/layout/StackLayout.js","webpack://draw2d/./src/shape/layout/TableLayout.js","webpack://draw2d/./src/shape/layout/VerticalLayout.js","webpack://draw2d/./src/shape/node/Between.js","webpack://draw2d/./src/shape/node/End.js","webpack://draw2d/./src/shape/node/Fulcrum.js","webpack://draw2d/./src/shape/node/HorizontalBus.js","webpack://draw2d/./src/shape/node/Hub.js","webpack://draw2d/./src/shape/node/Node.js","webpack://draw2d/./src/shape/node/Start.js","webpack://draw2d/./src/shape/node/VerticalBus.js","webpack://draw2d/./src/shape/note/PostIt.js","webpack://draw2d/./src/shape/pert/Activity.js","webpack://draw2d/./src/shape/pert/Start.js","webpack://draw2d/./src/shape/state/Connection.js","webpack://draw2d/./src/shape/state/End.js","webpack://draw2d/./src/shape/state/Start.js","webpack://draw2d/./src/shape/state/State.js","webpack://draw2d/./src/shape/widget/Slider.js","webpack://draw2d/./src/shape/widget/Widget.js","webpack://draw2d/./src/ui/LabelEditor.js","webpack://draw2d/./src/ui/LabelInplaceEditor.js","webpack://draw2d/./src/util/ArrayList.js","webpack://draw2d/./src/util/Base64.js","webpack://draw2d/./src/util/Color.js","webpack://draw2d/./src/util/Debug.js","webpack://draw2d/./src/util/JSONUtil.js","webpack://draw2d/./src/util/Polyfill.js","webpack://draw2d/./src/util/SVGUtil.js","webpack://draw2d/./src/util/UUID.js","webpack://draw2d/./src/util/extend.js","webpack://draw2d/./src/util/raphael_ext.js","webpack://draw2d/./src/util/spline/BezierSpline.js","webpack://draw2d/./src/util/spline/CatmullRomSpline.js","webpack://draw2d/./src/util/spline/CubicSpline.js","webpack://draw2d/./src/util/spline/Spline.js","webpack://draw2d/./src/css/contextmenu.css","webpack://draw2d/./node_modules/css-loader/dist/runtime/api.js","webpack://draw2d/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://draw2d/./node_modules/performance-now/lib/performance-now.js","webpack://draw2d/./node_modules/raf/index.js","webpack://draw2d/./src/lib/Class.exec.js?f59a","webpack://draw2d/./src/lib/pathfinding.exec.js?a448","webpack://draw2d/./src/lib/raphael.exec.js?8a35","webpack://draw2d/./node_modules/rgbcolor/index.js","webpack://draw2d/./node_modules/script-loader/addScript.js","webpack://draw2d/./node_modules/shifty/dist/shifty.js","webpack://draw2d/./node_modules/stackblur-canvas/dist/stackblur-es.js","webpack://draw2d/./src/css/contextmenu.css?3c4d","webpack://draw2d/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://draw2d/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://draw2d/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://draw2d/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://draw2d/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://draw2d/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://draw2d/./node_modules/canvg/dist/index.cjs","webpack://draw2d/./node_modules/svg-pathdata/lib/SVGPathData.cjs","webpack://draw2d/webpack/bootstrap","webpack://draw2d/webpack/runtime/compat get default export","webpack://draw2d/webpack/runtime/define property getters","webpack://draw2d/webpack/runtime/global","webpack://draw2d/webpack/runtime/hasOwnProperty shorthand","webpack://draw2d/webpack/runtime/make namespace object","webpack://draw2d/webpack/runtime/nonce","webpack://draw2d/webpack/startup"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"draw2d\"] = factory();\n\telse\n\t\troot[\"draw2d\"] = factory();\n})(self, () => {\nreturn ","require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\script-loader\\\\addScript.js\")(require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\raw-loader\\\\index.js!C:\\\\repos\\\\draw2d\\\\src\\\\lib\\\\Class.exec.js\"))","require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\script-loader\\\\addScript.js\")(require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\raw-loader\\\\index.js!C:\\\\repos\\\\draw2d\\\\src\\\\lib\\\\pathfinding.exec.js\"))","require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\script-loader\\\\addScript.js\")(require(\"!!C:\\\\repos\\\\draw2d\\\\node_modules\\\\raw-loader\\\\index.js!C:\\\\repos\\\\draw2d\\\\src\\\\lib\\\\raphael.exec.js\"))","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A scrolling Canvas that contains Figures. Call `add(draw2d.Figure)` to add shapes to the Viewport.\r\n *\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.Canvas = Class.extend(\r\n /** @lends draw2d.Canvas.prototype */\r\n {\r\n\r\n NAME: \"draw2d.Canvas\",\r\n\r\n /**\r\n * Create a new canvas with the given HTML DOM references.\r\n *\r\n * @param {String} canvasId the id of the DOM element to use a parent container\r\n */\r\n init: function (canvasId, width, height) {\r\n let _this = this\r\n\r\n\r\n this.setScrollArea(document.body)\r\n this.canvasId = canvasId\r\n this.html = $(\"#\" + canvasId)\r\n this.html.css({\"cursor\": \"default\"})\r\n if (!isNaN(parseFloat(width)) && !isNaN(parseFloat(height))) {\r\n this.initialWidth = parseInt(width)\r\n this.initialHeight = parseInt(height)\r\n this.html\r\n .height(this.initialHeight)\r\n .width(this.initialWidth)\r\n } else {\r\n this.initialWidth = this.getWidth()\r\n this.initialHeight = this.getHeight()\r\n }\r\n\r\n // avoid the \"highlighting\" in iPad, iPhone if the user tab/touch on the canvas.\r\n // .... I didn't like this.\r\n this.html.css({\"-webkit-tap-highlight-color\": \"rgba(0,0,0,0)\"})\r\n\r\n // Drag&Drop handling from foreign DIV into the Canvas\r\n // Only available in combination with jQuery-UI\r\n //\r\n // Create the droppable area for the css class \"draw2d_droppable\"\r\n // This can be done by a palette of toolbar or something else.\r\n // For more information see : http://jqueryui.com/demos/droppable/\r\n //\r\n $(this.html).droppable({\r\n accept: '.draw2d_droppable',\r\n over: function (event, ui) {\r\n _this.onDragEnter(ui.draggable)\r\n },\r\n out: function (event, ui) {\r\n _this.onDragLeave(ui.draggable)\r\n },\r\n drop: function drop(event, ui) {\r\n event = _this._getEvent(event);\r\n let helperPos = $(ui.helper).position()\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY);\r\n _this.onDrop(ui.draggable,\r\n pos.getX()- (event.clientX-helperPos.left)+5,\r\n pos.getY()- (event.clientY-helperPos.top)+5, event.shiftKey, event.ctrlKey);\r\n }\r\n })\r\n\r\n\r\n // Create the jQuery-Draggable for the palette -> canvas drag&drop interaction\r\n //\r\n $(\".draw2d_droppable\").draggable({\r\n appendTo: \"body\",\r\n stack: \"body\",\r\n zIndex: 27000,\r\n helper: \"clone\",\r\n drag: function (event, ui) {\r\n event = _this._getEvent(event)\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.onDrag(ui.draggable, pos.getX(), pos.getY(), event.shiftKey, event.ctrlKey)\r\n },\r\n stop: function (e, ui) {\r\n },\r\n start: function (e, ui) {\r\n $(ui.helper).addClass(\"shadow\")\r\n }\r\n })\r\n\r\n\r\n // painting stuff\r\n //\r\n if (!isNaN(parseFloat(height))) {\r\n this.paper = Raphael(canvasId, width, height)\r\n } else {\r\n this.paper = Raphael(canvasId, this.getWidth(), this.getHeight())\r\n }\r\n this.paper.canvas.style.position = \"absolute\"\r\n\r\n // Status handling\r\n //\r\n this.zoomPolicy = null // default ZoomEditPolicy\r\n this.zoomFactor = 1.0 // range [0.001..10]\r\n this.selection = new draw2d.Selection()\r\n this.currentDropTarget = null\r\n this.currentHoverFigure = null\r\n\r\n // installed to all added figures to avoid that a figure can be placed outside the canvas area\r\n // during a drag&drop operation\r\n this.regionDragDropConstraint = new draw2d.policy.figure.RegionEditPolicy(0, 0, this.getWidth(), this.getHeight())\r\n\r\n // event handling since version 5.0.0\r\n this.eventSubscriptions = {}\r\n\r\n this.editPolicy = new draw2d.util.ArrayList()\r\n\r\n // internal document with all figures, ports, ....\r\n //\r\n this.figures = new draw2d.util.ArrayList()\r\n this.lines = new draw2d.util.ArrayList() // crap - why are connections not just figures. Design by accident\r\n this.commonPorts = new draw2d.util.ArrayList()\r\n\r\n // all visible resize handles which can be drag&drop around. Selection handles like AntRectangleSelectionFeedback\r\n // are not part of this collection. Required for hitTest only\r\n this.resizeHandles = new draw2d.util.ArrayList()\r\n\r\n // The CommandStack for undo/redo operations\r\n //\r\n this.commandStack = new draw2d.command.CommandStack()\r\n\r\n // INTERSECTION/CROSSING handling for connections and lines\r\n //\r\n this.linesToRepaintAfterDragDrop = new draw2d.util.ArrayList()\r\n this.lineIntersections = new draw2d.util.ArrayList()\r\n\r\n // alternative/legacy zoom implementation\r\n // this.installEditPolicy( new draw2d.policy.canvas.ZoomPolicy()); // Responsible for zooming\r\n this.installEditPolicy(new draw2d.policy.canvas.WheelZoomPolicy()) // Responsible for zooming with mouse wheel\r\n this.installEditPolicy(new draw2d.policy.canvas.DefaultKeyboardPolicy()) // Handles the keyboard interaction\r\n this.installEditPolicy(new draw2d.policy.canvas.BoundingboxSelectionPolicy()) // Responsible for selection handling\r\n this.installEditPolicy(new draw2d.policy.canvas.DropInterceptorPolicy()) // Responsible for drop operations\r\n this.installEditPolicy(new draw2d.policy.connection.ComposedConnectionCreatePolicy(// Responsible for connection creation....\r\n [\r\n new draw2d.policy.connection.DragConnectionCreatePolicy(), // ....via drag/´drop\r\n new draw2d.policy.connection.ClickConnectionCreatePolicy() // or clicking on the ports and canvas.\r\n ])\r\n )\r\n\r\n // Calculate all intersection between the different lines\r\n //\r\n this.commandStack.addEventListener(function (event) {\r\n if (event.isPostChangeEvent() === true) {\r\n _this.calculateConnectionIntersection()\r\n _this.linesToRepaintAfterDragDrop.each((i, line) => {\r\n line.svgPathString = null\r\n line.repaint()\r\n })\r\n _this.linesToRepaintAfterDragDrop = new draw2d.util.ArrayList()\r\n }\r\n })\r\n\r\n // DragDrop status handling\r\n //\r\n this.mouseDown = false\r\n this.mouseDownX = 0\r\n this.mouseDownY = 0\r\n this.mouseDragDiffX = 0\r\n this.mouseDragDiffY = 0\r\n\r\n this.html.bind(\"mouseup touchend\", function (event) {\r\n if (_this.mouseDown === false) {\r\n return\r\n }\r\n\r\n event = _this._getEvent(event)\r\n _this.calculateConnectionIntersection()\r\n\r\n _this.mouseDown = false\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.editPolicy.each(function (i, policy) {\r\n policy.onMouseUp(_this, pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n })\r\n\r\n _this.mouseDragDiffX = 0\r\n _this.mouseDragDiffY = 0\r\n })\r\n\r\n this.html.bind(\"mousemove touchmove\", function (event) {\r\n event = _this._getEvent(event)\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n if (_this.mouseDown === false) {\r\n // mouseEnter/mouseLeave events for Figures. Don't use the Raphael or DOM native functions.\r\n // Raphael didn't work for Rectangle with transparent fill (events only fired for the border line)\r\n // DOM didn't work well for lines. No eclipse area - you must hit the line exact to retrieve the event.\r\n // In this case I implement my own stuff...again and again.\r\n //\r\n // don't break the main event loop if one element fires an error during enter/leave event.\r\n try {\r\n let hover = _this.getBestFigure(pos.x, pos.y)\r\n if (hover !== _this.currentHoverFigure && _this.currentHoverFigure !== null) {\r\n _this.currentHoverFigure.onMouseLeave() // deprecated\r\n _this.currentHoverFigure.fireEvent(\"mouseleave\")\r\n _this.fireEvent(\"mouseleave\", {figure: _this.currentHoverFigure})\r\n }\r\n if (hover !== _this.currentHoverFigure && hover !== null) {\r\n hover.onMouseEnter()\r\n hover.fireEvent(\"mouseenter\")\r\n _this.fireEvent(\"mouseenter\", {figure: hover})\r\n }\r\n _this.currentHoverFigure = hover\r\n } catch (exc) {\r\n // just write it to the console\r\n console.log(exc)\r\n }\r\n\r\n _this.editPolicy.each(function (i, policy) {\r\n policy.onMouseMove(_this, pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n })\r\n _this.fireEvent(\"mousemove\", {\r\n x: pos.x,\r\n y: pos.y,\r\n shiftKey: event.shiftKey,\r\n ctrlKey: event.ctrlKey,\r\n hoverFigure: _this.currentHoverFigure\r\n })\r\n } else {\r\n let diffXAbs = (event.clientX - _this.mouseDownX) * _this.zoomFactor\r\n let diffYAbs = (event.clientY - _this.mouseDownY) * _this.zoomFactor\r\n _this.editPolicy.each(function (i, policy) {\r\n policy.onMouseDrag(_this, diffXAbs, diffYAbs, diffXAbs - _this.mouseDragDiffX, diffYAbs - _this.mouseDragDiffY, event.shiftKey, event.ctrlKey)\r\n })\r\n _this.mouseDragDiffX = diffXAbs\r\n _this.mouseDragDiffY = diffYAbs\r\n _this.fireEvent(\"mousemove\", {\r\n x: pos.x,\r\n y: pos.y,\r\n shiftKey: event.shiftKey,\r\n ctrlKey: event.ctrlKey,\r\n hoverFigure: _this.currentHoverFigure\r\n })\r\n }\r\n })\r\n\r\n this.html.bind(\"mousedown\", function (event) {\r\n try {\r\n let pos = null\r\n switch (event.which) {\r\n case 1: //touch pressed\r\n case 0: //Left mouse button pressed\r\n try {\r\n event.preventDefault()\r\n event = _this._getEvent(event)\r\n _this.mouseDownX = event.clientX\r\n _this.mouseDownY = event.clientY\r\n _this.mouseDragDiffX = 0\r\n _this.mouseDragDiffY = 0\r\n pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.mouseDown = true\r\n _this.editPolicy.each(function (i, policy) {\r\n policy.onMouseDown(_this, pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n })\r\n } catch (exc) {\r\n console.log(exc)\r\n }\r\n break\r\n case 3: //Right mouse button pressed\r\n event.preventDefault()\r\n if (typeof event.stopPropagation !== \"undefined\")\r\n event.stopPropagation()\r\n event = _this._getEvent(event)\r\n pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.onRightMouseDown(pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n return false\r\n case 2:\r\n //Middle mouse button pressed\r\n break\r\n default:\r\n //You have a strange mouse\r\n }\r\n } catch (exc) {\r\n console.log(exc)\r\n }\r\n })\r\n\r\n\r\n // Catch the dblclick and route them to the Canvas hook.\r\n //\r\n this.html.on(\"dblclick\", function (event) {\r\n event = _this._getEvent(event)\r\n\r\n _this.mouseDownX = event.clientX\r\n _this.mouseDownY = event.clientY\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.onDoubleClick(pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n })\r\n\r\n\r\n // Catch the click event and route them to the canvas hook\r\n //\r\n this.html.on(\"click\", function (event) {\r\n event = _this._getEvent(event)\r\n\r\n // fire only the click event if we didn't move the mouse (drag&drop)\r\n //\r\n if (_this.mouseDownX === event.clientX || _this.mouseDownY === event.clientY) {\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.clientX, event.clientY)\r\n _this.onClick(pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n }\r\n })\r\n\r\n // Important: MozMousePixelScroll is required to prevent 1px scrolling\r\n // in FF event if we call \"e.preventDefault()\"\r\n this.html.on('MozMousePixelScroll DOMMouseScroll mousewheel', function (e) {\r\n let event = _this._getEvent(e)\r\n let pos = _this.fromDocumentToCanvasCoordinate(event.originalEvent.clientX, event.originalEvent.clientY)\r\n\r\n let delta = 0\r\n if (e.type === 'mousewheel') {\r\n delta = (e.originalEvent.wheelDelta * -1)\r\n } else if (e.type === 'DOMMouseScroll') {\r\n delta = 40 * e.originalEvent.detail\r\n }\r\n\r\n let returnValue = _this.onMouseWheel(delta, pos.x, pos.y, event.shiftKey, event.ctrlKey)\r\n\r\n if (returnValue === false) {\r\n e.preventDefault()\r\n }\r\n })\r\n\r\n // Catch the keyUp and CTRL-key and route them to the Canvas hook.\r\n //\r\n this.keyupCallback = function (event) {\r\n // don't initiate the delete command if the event comes from an INPUT field. In this case the user want delete\r\n // a character in the input field and not the related shape\r\n let target = $(event.target)\r\n if (!target.is(\"input\") && !target.is(\"textarea\")) {\r\n _this.editPolicy.each(function (i, policy) {\r\n if (policy instanceof draw2d.policy.canvas.KeyboardPolicy) {\r\n policy.onKeyUp(_this, event.keyCode, event.shiftKey, event.ctrlKey)\r\n }\r\n })\r\n }\r\n }\r\n $(document).bind(\"keyup\", this.keyupCallback)\r\n\r\n // Catch the keyDown and CTRL-key and route them to the Canvas hook.\r\n //\r\n this.keydownCallback = function (event) {\r\n // don't initiate the delete command if the event comes from an INPUT field. In this case the user want delete\r\n // a character in the input field and not the related shape\r\n let target = $(event.target)\r\n if (!target.is(\"input\") && !target.is(\"textarea\")) {\r\n _this.editPolicy.each(function (i, policy) {\r\n if (policy instanceof draw2d.policy.canvas.KeyboardPolicy) {\r\n policy.onKeyDown(_this, event.keyCode, event.shiftKey, event.ctrlKey)\r\n }\r\n })\r\n }\r\n }\r\n $(document).bind(\"keydown\", this.keydownCallback)\r\n\r\n },\r\n\r\n /**\r\n *\r\n * Call this method if you didn't need the canvas anymore. The method unregister all even handlers\r\n * and frees all resources. The canvas is unusable after this call\r\n *\r\n * @since. 4.7.4\r\n */\r\n destroy: function () {\r\n this.clear()\r\n $(document).unbind(\"keydown\", this.keydownCallback)\r\n $(document).unbind(\"keyup\", this.keyupCallback)\r\n // reset the event handlers of the canvas without any notice\r\n //\r\n this.eventSubscriptions = {}\r\n\r\n try {\r\n this.paper.remove()\r\n } catch (exc) {\r\n // breaks in some ie7 version....don't care about this because ie7/8 isn't a state of the art browser ;-)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Reset the canvas and delete all model elements.<br>\r\n * You can now reload another model to the canvas with a {@link draw2d.io.Reader}\r\n *\r\n * @since 1.1.0\r\n * @returns {this}\r\n */\r\n clear: function () {\r\n // notice all listener that the canvas will be cleared\r\n this.fireEvent(\"clear\")\r\n\r\n let _this = this\r\n\r\n this.lines.clone().each(function (i, e) {\r\n _this.remove(e)\r\n })\r\n\r\n this.figures.clone().each(function (i, e) {\r\n _this.remove(e)\r\n })\r\n\r\n this.zoomFactor = 1.0\r\n this.selection.clear()\r\n this.currentDropTarget = null\r\n\r\n // internal document with all figures, ports, ....\r\n //\r\n this.figures = new draw2d.util.ArrayList()\r\n this.lines = new draw2d.util.ArrayList()\r\n this.commonPorts = new draw2d.util.ArrayList()\r\n\r\n this.commandStack.markSaveLocation()\r\n\r\n // INTERSECTION/CROSSING handling for connections and lines\r\n //\r\n this.linesToRepaintAfterDragDrop = new draw2d.util.ArrayList()\r\n this.lineIntersections = new draw2d.util.ArrayList()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Callback for any kind of image export tools to trigger the canvas to hide all unwanted\r\n * decorations. The method is called e.g. from the draw2d.io.png.Writer\r\n *\r\n * @since 4.0.0\r\n * @@interface\r\n */\r\n hideDecoration: function () {\r\n },\r\n\r\n /**\r\n *\r\n * callback method for any image export writer to reactivate the decoration\r\n * of the canvas. e.g. grids, rulers,...\r\n *\r\n *\r\n * @since 4.0.0\r\n * @template\r\n */\r\n showDecoration: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Calculate all connection intersection of the canvas.\r\n * Required for \"bridging\" or \"crossing decoration\"\r\n *\r\n * @private\r\n */\r\n calculateConnectionIntersection: function () {\r\n\r\n this.lineIntersections = new draw2d.util.ArrayList()\r\n let lines = this.getLines().clone()\r\n while (lines.getSize() > 0) {\r\n let l1 = lines.removeElementAt(0)\r\n lines.each((ii, l2) => {\r\n let partInter = l1.intersection(l2)\r\n if (partInter.getSize() > 0) {\r\n this.lineIntersections.add({line: l1, other: l2, intersection: partInter})\r\n this.lineIntersections.add({line: l2, other: l1, intersection: partInter})\r\n }\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * Install a new selection and edit policy into the canvas\r\n *\r\n * @since 2.2.0\r\n * @param {draw2d.policy.EditPolicy} policy\r\n */\r\n installEditPolicy: function (policy) {\r\n\r\n // a canvas can handle only one selection policy\r\n //\r\n if (policy instanceof draw2d.policy.canvas.SelectionPolicy) {\r\n // reset old selection before install new selection strategy\r\n this.getSelection().getAll().each((i, figure) => {\r\n figure.unselect()\r\n })\r\n\r\n // remove existing selection policy\r\n this.editPolicy.grep((p) => {\r\n let stay = !(p instanceof draw2d.policy.canvas.SelectionPolicy)\r\n if (stay === false) {\r\n p.onUninstall(this)\r\n }\r\n return stay\r\n })\r\n }\r\n // only one zoom policy at once\r\n //\r\n else if (policy instanceof draw2d.policy.canvas.ZoomPolicy) {\r\n // remove existing zoom policy\r\n this.editPolicy.grep((p) => {\r\n let stay = !(p instanceof draw2d.policy.canvas.ZoomPolicy)\r\n if (stay === false) {\r\n p.onUninstall(this)\r\n }\r\n return stay\r\n })\r\n // replace the short cut handle for faster access\r\n this.zoomPolicy = policy\r\n } else if (policy instanceof draw2d.policy.connection.ConnectionCreatePolicy) {\r\n this.editPolicy.grep((p) => {\r\n let stay = !(p instanceof draw2d.policy.connection.ConnectionCreatePolicy)\r\n if (stay === false) {\r\n p.onUninstall(this)\r\n }\r\n return stay\r\n })\r\n } else if (policy instanceof draw2d.policy.canvas.DropInterceptorPolicy) {\r\n // think about if I allow to install only one drop policy\r\n }\r\n\r\n // remove doublicate edit policies\r\n if(policy.NAME) {\r\n this.uninstallEditPolicy(policy.NAME)\r\n }\r\n\r\n policy.onInstall(this)\r\n this.editPolicy.add(policy)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * UnInstall the selection and edit policy from the canvas.\r\n *\r\n * @since 2.2.0\r\n * @param {draw2d.policy.EditPolicy|String} policy\r\n */\r\n uninstallEditPolicy: function (policy) {\r\n if (policy === null) {\r\n return //silently\r\n }\r\n\r\n // either remove exact the policy instance...\r\n //\r\n let removed = this.editPolicy.remove(policy)\r\n if (removed !== null) {\r\n removed.onUninstall(this)\r\n if (removed instanceof draw2d.policy.canvas.ZoomPolicy) {\r\n this.zoomPolicy = null\r\n }\r\n } else {\r\n // ..or all of the same class if the policy isn't installed before\r\n // With this kind of behaviour it is possible to deinstall all policies with\r\n // the same class at once\r\n //\r\n let _this = this\r\n let name = (typeof policy === \"string\") ? policy : policy.NAME\r\n this.editPolicy.grep(function (p) {\r\n if (p.NAME === name) {\r\n p.onUninstall(_this)\r\n // remove short cut handle to the zoom policy\r\n if (p instanceof draw2d.policy.canvas.ZoomPolicy) {\r\n _this.zoomPolicy = null\r\n }\r\n return false\r\n }\r\n return true\r\n })\r\n }\r\n return this\r\n },\r\n\r\n getDropInterceptorPolicies: function () {\r\n return this.editPolicy.clone().grep(function (p) {\r\n return (p instanceof draw2d.policy.canvas.DropInterceptorPolicy)\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * Set the new zoom factor for the canvas. The value must be between [0.01..10]\r\n *\r\n * // you can register an eventhandler if the zoom factor did change\r\n * canvas.on(\"zoom\", function(emitterFigure, zoomData){\r\n * alert(\"canvas zoomed to:\"+zoomData.value);\r\n * });\r\n *\r\n * @param {Number} zoomFactor new zoom factor. range [0.001..10]. 1.0 is no zoom.\r\n * @param {Boolean} [animated] set it to true for smooth zoom in/out\r\n */\r\n setZoom: function (zoomFactor, animated) {\r\n // redirect this legacy method to the new CanvasEditPolicy\r\n //\r\n if (this.zoomPolicy) {\r\n this.zoomPolicy.setZoom(zoomFactor, animated)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Return the current zoom factor of the canvas.\r\n *\r\n * @returns {Number}\r\n */\r\n getZoom: function () {\r\n return this.zoomFactor\r\n },\r\n\r\n /**\r\n *\r\n * Return the dimension of the drawing area\r\n *\r\n * @since 4.4.0\r\n * @returns {draw2d.geo.Rectangle}\r\n */\r\n getDimension: function () {\r\n return new draw2d.geo.Rectangle(0, 0, this.initialWidth, this.initialHeight)\r\n },\r\n\r\n /**\r\n *\r\n * Tells the canvas to resize. If you do not specific any parameters\r\n * the canvas will attempt to determine the height and width by the enclosing bounding box\r\n * of all elements and set the dimension accordingly. If you would like to set the dimension\r\n * explicitly pass in an draw2d.geo.Rectangle or an object with <b>height</b> and <b>width</b> properties.\r\n *\r\n * @since 4.4.0\r\n * @param {draw2d.geo.Rectangle} [dim] the dimension to set or null for autodetect\r\n * @param {Number} [height] the height of the canvas if the first argument is a number and not a Rectangle\r\n */\r\n setDimension: function (dim, height) {\r\n if (typeof dim === \"undefined\") {\r\n let widths = this.getFigures().clone().map(function (f) {\r\n return f.getAbsoluteX() + f.getWidth()\r\n })\r\n let heights = this.getFigures().clone().map(function (f) {\r\n return f.getAbsoluteY() + f.getHeight()\r\n })\r\n this.initialHeight = Math.max(...heights.asArray())\r\n this.initialWidth = Math.max(...widths.asArray())\r\n } else if (dim instanceof draw2d.geo.Rectangle) {\r\n this.initialWidth = dim.w\r\n this.initialHeight = dim.h\r\n } else if (typeof dim.width === \"number\" && typeof dim.height === \"number\") {\r\n this.initialWidth = dim.width\r\n this.initialHeight = dim.height\r\n } else if (typeof dim === \"number\" && typeof height === \"number\") {\r\n this.initialWidth = dim\r\n this.initialHeight = height\r\n }\r\n this.html.css({\"width\": this.initialWidth + \"px\", \"height\": this.initialHeight + \"px\"})\r\n this.paper.setSize(this.initialWidth, this.initialHeight)\r\n this.setZoom(this.zoomFactor, false)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Transforms a document coordinate to canvas coordinate.\r\n *\r\n * @param {Number} x the x coordinate relative to the window\r\n * @param {Number} y the y coordinate relative to the window\r\n *\r\n * @returns {draw2d.geo.Point} The coordinate in relation to the canvas [0,0] position\r\n */\r\n fromDocumentToCanvasCoordinate: function (x, y) {\r\n return new draw2d.geo.Point(\r\n (x - this.getAbsoluteX() + this.getScrollLeft()) * this.zoomFactor,\r\n (y - this.getAbsoluteY() + this.getScrollTop()) * this.zoomFactor)\r\n },\r\n\r\n /**\r\n *\r\n * Transforms a canvas coordinate to document coordinate.\r\n *\r\n * @param {Number} x the x coordinate in the canvas\r\n * @param {Number} y the y coordinate in the canvas\r\n *\r\n * @returns {draw2d.geo.Point} the coordinate in relation to the document [0,0] position\r\n */\r\n fromCanvasToDocumentCoordinate: function (x, y) {\r\n return new draw2d.geo.Point(\r\n ((x * (1 / this.zoomFactor)) + this.getAbsoluteX() - this.getScrollLeft()),\r\n ((y * (1 / this.zoomFactor)) + this.getAbsoluteY() - this.getScrollTop()))\r\n },\r\n\r\n /**\r\n *\r\n * The DOM host of the canvas\r\n *\r\n * @returns {HTMLElement}\r\n */\r\n getHtmlContainer: function () {\r\n return this.html\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return a common event object independed if we run on an iPad or desktop.\r\n *\r\n * @param event\r\n * @returns {DOMEventObject}\r\n * @private\r\n */\r\n _getEvent: function (event) {\r\n // check for iPad, Android touch events\r\n //\r\n if (typeof event.originalEvent !== \"undefined\") {\r\n if (event.originalEvent.touches && event.originalEvent.touches.length) {\r\n return event.originalEvent.touches[0]\r\n } else if (event.originalEvent.changedTouches && event.originalEvent.changedTouches.length) {\r\n return event.originalEvent.changedTouches[0]\r\n }\r\n }\r\n return event\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Set the area which are scrolling the canvas. This can be a jquery selector or\r\n * a jQuery node.\r\n *\r\n * @param {String/HTMLElement} elementSelector\r\n * @returns {this}\r\n **/\r\n setScrollArea: function (elementSelector) {\r\n this.scrollArea = $(elementSelector)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * return the scrolling area of the canvas. This is jQuery object\r\n *\r\n * @returns {JQueryElement}\r\n **/\r\n getScrollArea: function () {\r\n return this.scrollArea\r\n },\r\n\r\n /**\r\n *\r\n * The left scroll position.\r\n *\r\n * @returns {Number} the left scroll offset of the canvas\r\n **/\r\n getScrollLeft: function () {\r\n return this.getScrollArea().scrollLeft()\r\n },\r\n\r\n /**\r\n *\r\n * The top scroll position\r\n *\r\n * @returns {Number} the top scroll offset of the cnavas.\r\n **/\r\n getScrollTop: function () {\r\n return this.getScrollArea().scrollTop()\r\n },\r\n\r\n /**\r\n *\r\n * Set left scroll position.\r\n *\r\n * @param {Number} left the left scroll offset of the canvas\r\n **/\r\n setScrollLeft: function (left) {\r\n this.getScrollArea().scrollLeft(left)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * set top scroll position\r\n *\r\n * @param {Number} top the top scroll offset of the canvas.\r\n **/\r\n setScrollTop: function (top) {\r\n this.getScrollArea().scrollTop(top)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * set the new scroll position of the canvas\r\n *\r\n * @param {Number} top the top scroll offset of the canvas.\r\n * @param {Number} left the left scroll offset of the canvas\r\n * @since 5.8.0\r\n **/\r\n scrollTo: function (top, left) {\r\n this.getScrollArea().scrollTop(top).scrollLeft(left)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The absolute document x offset.\r\n *\r\n * @returns {Number}\r\n **/\r\n getAbsoluteX: function () {\r\n return this.html.offset().left\r\n },\r\n\r\n /**\r\n *\r\n * The absolute document y offset.\r\n *\r\n * @returns {Number}\r\n **/\r\n getAbsoluteY: function () {\r\n return this.html.offset().top\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the width of the canvas\r\n *\r\n * @returns {Number}\r\n **/\r\n getWidth: function () {\r\n return this.html.width()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the height of the canvas.\r\n *\r\n * @returns {Number}\r\n **/\r\n getHeight: function () {\r\n return this.html.height()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Add a figure at the given x/y coordinate. This method fires an event.\r\n *\r\n * Example:\r\n *\r\n * canvas.on(\"figure:add\", function(emitter, event){\r\n * alert(\"figure added:\");\r\n * });\r\n *\r\n * // or more general if you want catch all figure related events\r\n * //\r\n * canvas.on(\"figure\", function(emitter, event){\r\n * // use event.figure.getCanvas()===null to determine if the\r\n * // figure part of the canvas\r\n *\r\n * alert(\"figure added or removed:\");\r\n * });\r\n *\r\n * @param {draw2d.Figure} figure The figure to add.\r\n * @param {Number/draw2d.geo.Point} [x] The new x coordinate of the figure or the x/y coordinate if it is an draw2d.geo.Point\r\n * @param {Number} [y] The y position.\r\n **/\r\n add: function (figure, x, y) {\r\n if (figure.getCanvas() === this) {\r\n return\r\n }\r\n\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n this.linesToRepaintAfterDragDrop = this.lines\r\n this.lines.add(figure)\r\n } else {\r\n this.figures.add(figure)\r\n }\r\n \r\n if (typeof x !== \"undefined\") {\r\n figure.setPosition(x,y)\r\n }\r\n\r\n figure.setCanvas(this)\r\n\r\n // to avoid drag&drop outside of this canvas\r\n figure.installEditPolicy(this.regionDragDropConstraint)\r\n\r\n // important initial call\r\n figure.getShapeElement()\r\n\r\n // init a repaint of the figure. This enforce that all properties\r\n // ( color, dim, stroke,...) will be set and pushed to SVG node.\r\n figure.repaint()\r\n\r\n // fire the figure:add event before the \"move\" event and after the figure.repaint() call!\r\n // - the move event can only be fired if the figure part of the canvas.\r\n // and in this case the notification event should be fired to the listener before\r\n this.fireEvent(\"figure:add\", {figure: figure, canvas: this})\r\n\r\n // fire the event that the figure is part of the canvas\r\n figure.fireEvent(\"added\", {figure: figure, canvas: this})\r\n\r\n // ...now we can fire the initial move event\r\n figure.fireEvent(\"move\", {figure: figure, x: figure.getX(), y: figure.getY(), dx: 0, dy: 0})\r\n\r\n // this is only required if the used router requires the crossing information\r\n // of the connections\r\n if (figure instanceof draw2d.shape.basic.PolyLine) {\r\n this.calculateConnectionIntersection()\r\n this.linesToRepaintAfterDragDrop.each((i, line) => {\r\n line.svgPathString = null\r\n line.repaint()\r\n })\r\n this.linesToRepaintAfterDragDrop = new draw2d.util.ArrayList()\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Remove a figure or connection from the Canvas. This method fires an event\r\n * which can be catched.\r\n *\r\n * Example:\r\n *\r\n * canvas.on(\"figure:remove\", function(emitter, event){\r\n * alert(\"figure removed:\");\r\n * });\r\n *\r\n * // or more general if you want catch all figure related events\r\n * //\r\n * canvas.on(\"figure\", function(emitter, event){\r\n * // use event.figure.getCanvas()===null to determine if the\r\n * // figure part of the canvas\r\n *\r\n * alert(\"figure added or removed:\");\r\n * });\r\n *\r\n *\r\n * @param {draw2d.Figure} figure The figure to remove\r\n **/\r\n remove: function (figure) {\r\n // don't fire events of calll callbacks if the fire isn'T part of this canvas\r\n //\r\n if (figure.getCanvas() !== this) {\r\n return this\r\n }\r\n\r\n // remove the figure from a selection handler as well and cleanup the\r\n // selection feedback\r\n if (this.getSelection().contains(figure)) {\r\n this.editPolicy.each((i, policy) => {\r\n if (typeof policy.unselect === \"function\") {\r\n policy.unselect(this, figure)\r\n }\r\n })\r\n }\r\n\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n this.lines.remove(figure)\r\n } else {\r\n this.figures.remove(figure)\r\n }\r\n\r\n figure.setCanvas(null)\r\n\r\n if (figure instanceof draw2d.Connection) {\r\n figure.disconnect()\r\n }\r\n\r\n this.fireEvent(\"figure:remove\", {figure: figure})\r\n\r\n figure.fireEvent(\"removed\", {figure: figure, canvas: this})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns all lines/connections in this workflow/canvas.<br>\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getLines: function () {\r\n return this.lines\r\n },\r\n\r\n /**\r\n *\r\n * Returns the internal figures.<br>\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getFigures: function () {\r\n return this.figures\r\n },\r\n\r\n /**\r\n *\r\n * Returns the line or connection with the given id.\r\n *\r\n * @param {String} id The id of the line.\r\n *\r\n * @returns {draw2d.shape.basic.Line}\r\n **/\r\n getLine: function (id) {\r\n let count = this.lines.getSize()\r\n for (let i = 0; i < count; i++) {\r\n let line = this.lines.get(i)\r\n if (line.getId() === id) {\r\n return line\r\n }\r\n }\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Returns the figure with the given id.\r\n *\r\n * @param {String} id The id of the figure.\r\n * @returns {draw2d.Figure}\r\n **/\r\n getFigure: function (id) {\r\n let figure = null\r\n this.figures.each((i, e) => {\r\n if (e.id === id) {\r\n figure = e\r\n return false\r\n }\r\n })\r\n return figure\r\n },\r\n\r\n /**\r\n *\r\n * Return all intersections draw2d.geo.Point between the given line and all other\r\n * lines in the canvas.\r\n *\r\n * @param {draw2d.shape.basic.Line} line the line for the intersection test\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getIntersection: function (line) {\r\n let result = new draw2d.util.ArrayList()\r\n\r\n this.lineIntersections.each((i, entry) => {\r\n if (entry.line === line) {\r\n entry.intersection.each((j, p) => {\r\n result.add({x: p.x, y: p.y, justTouching: p.justTouching, other: entry.other})\r\n })\r\n }\r\n })\r\n\r\n return result\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Adjust the coordinate with the installed SnapToHelper.\r\n *\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {draw2d.geo.Point} pos The position to adjust\r\n *\r\n * @returns {draw2d.geo.Point} the adjusted position\r\n * @private\r\n **/\r\n snapToHelper: function (figure, pos) {\r\n // disable snapToPos if we have select more than one element\r\n // which are currently in Drag&Drop operation\r\n //\r\n if (this.getSelection().getSize() > 1) {\r\n return pos\r\n }\r\n\r\n let orig = pos.clone()\r\n this.editPolicy.each((i, policy) => {\r\n if (policy instanceof draw2d.policy.canvas.SnapToEditPolicy) {\r\n pos = policy.snap(this, figure, pos, orig)\r\n }\r\n })\r\n\r\n return pos\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Register a port to the canvas. This is required for other ports to find a valid drop target.\r\n *\r\n * @param {draw2d.Port} port The new port which has been added to the Canvas.\r\n **/\r\n registerPort: function (port) {\r\n // All elements have the same drop targets.\r\n //\r\n if (!this.commonPorts.contains(port)) {\r\n this.commonPorts.add(port)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Remove a port from the internal cnavas registration. Now other ports can't find the\r\n * port anymore as drop target. The port itself is still visible.\r\n *\r\n * @param {draw2d.Port} port The port to unregister as potential drop target\r\n * @private\r\n * @returns {this}\r\n **/\r\n unregisterPort: function (port) {\r\n this.commonPorts.remove(port)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return all ports in the canvas\r\n *\r\n * @returns {draw2d.util.ArrayList} all ports from all figures\r\n */\r\n getAllPorts: function () {\r\n return this.commonPorts\r\n },\r\n\r\n /**\r\n *\r\n * Returns the command stack for the Canvas. Required for undo/redo support.\r\n *\r\n * @returns {draw2d.command.CommandStack}\r\n **/\r\n getCommandStack: function () {\r\n return this.commandStack\r\n },\r\n\r\n /**\r\n *\r\n * Returns the current selected figure in the Canvas.\r\n *\r\n * @returns {draw2d.Figure}\r\n **/\r\n getPrimarySelection: function () {\r\n return this.selection.getPrimary()\r\n },\r\n\r\n /**\r\n *\r\n * Returns the current selection.\r\n *\r\n * @returns {draw2d.Selection}\r\n **/\r\n getSelection: function () {\r\n return this.selection\r\n },\r\n\r\n /**\r\n *\r\n * Set the current selected figure or figures in the canvas.<br>\r\n * <br>\r\n * You can hand over a draw2d.util.ArrayList since version 4.8.0 for multiple selection.\r\n *\r\n * @param {draw2d.Figure| draw2d.util.ArrayList} object The figure or list of figures to select.\r\n * @returns {this}\r\n **/\r\n setCurrentSelection: function (object) {\r\n // deselect the current selected figures\r\n //\r\n // clone the array (getAll) before iterate and modify the initial array\r\n this.selection.getAll().each((i, e) => {\r\n this.editPolicy.each((i, policy) => {\r\n if (typeof policy.unselect === \"function\") {\r\n policy.unselect(this, e)\r\n }\r\n })\r\n })\r\n this.addSelection(object)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Add the current figure to the selection. If a single selection policy is installed in the\r\n * canvas the selection before is reseted and the figure is the one and only selection.\r\n *\r\n * @param {draw2d.Figure | draw2d.util.ArrayList} object The figure(s) to add to the selection\r\n * @since 4.6.0\r\n * @returns {this}\r\n **/\r\n addSelection: function (object) {\r\n\r\n let add = (i, figure) =>{\r\n this.editPolicy.each( (i, policy) =>{\r\n if (typeof policy.select === \"function\") {\r\n policy.select(this, figure)\r\n }\r\n })\r\n }\r\n\r\n if (object instanceof draw2d.util.ArrayList || object instanceof draw2d.Selection) {\r\n object.each(add)\r\n } else {\r\n add(0, object)\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the best figure at the location [x,y]. It is a simple hit test. Keep in mind that only visible objects\r\n * are returned.\r\n *\r\n *\r\n * @param {Number} x The x position.\r\n * @param {Number} y The y position.\r\n * @param {draw2d.Figure|Array|Class} [blacklist] The figures or class which should be ignored.\r\n * @param {draw2d.Figure|Array|Class} [whitelist] The figures or class should be considered.\r\n *\r\n * @returns {draw2d.Figure}\r\n **/\r\n getBestFigure: function (x, y, blacklist, whitelist) {\r\n if (!Array.isArray(blacklist)) {\r\n if (blacklist)\r\n blacklist = [blacklist]\r\n else\r\n blacklist = []\r\n }\r\n\r\n if (!Array.isArray(whitelist)) {\r\n if (whitelist)\r\n whitelist = [whitelist]\r\n else\r\n whitelist = []\r\n }\r\n\r\n let result = null\r\n let testFigure = null\r\n\r\n\r\n let isInList = function (testFigure, list) {\r\n for (let i = 0, len = list.length; i < len; i++) {\r\n let considering = list[i]\r\n if (typeof considering === \"function\") {\r\n if (testFigure instanceof considering) {\r\n return true\r\n }\r\n } else if ((considering === testFigure) || (considering.contains(testFigure))) {\r\n return true\r\n }\r\n }\r\n return false\r\n }\r\n let isInBlacklist = function (item) {\r\n return isInList(item, blacklist)\r\n }\r\n // empty whitelist means that every kind of object is allowed\r\n let isInWhitelist = whitelist.length === 0 ? function () {\r\n return true\r\n } : function (item) {\r\n return isInList(item, whitelist)\r\n }\r\n\r\n\r\n // tool method to check recursive a figure for hitTest\r\n //\r\n let checkRecursive = function (children) {\r\n children.each(function (i, e) {\r\n let c = e.figure\r\n checkRecursive(c.children)\r\n if (result === null && c.isVisible() && c.hitTest(x, y) && !isInBlacklist(c) && isInWhitelist(c)) {\r\n result = c\r\n }\r\n return result === null // break the each-loop if we found an element\r\n })\r\n }\r\n\r\n\r\n // ResizeHandles\r\n //\r\n for (let i = 0, len = this.resizeHandles.getSize(); i < len; i++) {\r\n testFigure = this.resizeHandles.get(i)\r\n if (testFigure.isVisible() && testFigure.hitTest(x, y) && !isInBlacklist(testFigure) && isInWhitelist(testFigure)) {\r\n return testFigure\r\n }\r\n }\r\n\r\n // Checking ports\r\n //\r\n for (let i = 0, len = this.commonPorts.getSize(); i < len; i++) {\r\n let port = this.commonPorts.get(i)\r\n // check first a children of the figure\r\n //\r\n checkRecursive(port.children)\r\n\r\n if (result === null && port.isVisible() && port.hitTest(x, y) && !isInBlacklist(port) && isInWhitelist(port)) {\r\n result = port\r\n }\r\n\r\n if (result !== null) {\r\n return result\r\n }\r\n }\r\n\r\n\r\n // Check now the common objects.\r\n // run reverse to aware the z-oder of the figures\r\n for (let i = (this.figures.getSize() - 1); i >= 0; i--) {\r\n let figure = this.figures.get(i)\r\n // check first a children of the figure\r\n //\r\n checkRecursive(figure.children)\r\n\r\n // ...and the figure itself\r\n //\r\n if (result === null && figure.isVisible() && figure.hitTest(x, y) && !isInBlacklist(figure) && isInWhitelist(figure)) {\r\n result = figure\r\n break\r\n }\r\n }\r\n\r\n let figureResult = result\r\n let childResult = null\r\n let lineResult = this.getBestLine(x, y, blacklist, whitelist)\r\n result = null\r\n\r\n\r\n // Check the children of the lines as well\r\n // Not selectable/draggable. But should receive onClick/onDoubleClick events\r\n // as well.\r\n let count = this.lines.getSize()\r\n for (let i = 0; i < count; i++) {\r\n let line = this.lines.get(i)\r\n // check first a children of the figure\r\n //\r\n checkRecursive(line.children)\r\n\r\n if (result !== null) {\r\n childResult = result\r\n break\r\n }\r\n }\r\n\r\n let figureIndex = figureResult !== null ? $(figureResult.shape.node).index() : -1\r\n let childIndex = childResult !== null ? $(childResult.shape.node).index() : -1\r\n let lineIndex = lineResult !== null ? $(lineResult.shape.node).index() : -1\r\n let array = [\r\n {i: figureIndex, f: figureResult},\r\n {i: childIndex, f: childResult},\r\n {i: lineIndex, f: lineResult}\r\n ]\r\n array = array.filter((e) => e.i !== -1);\r\n array = array.sort((a, b) => b.i - a.i)\r\n\r\n\r\n if (array.length > 0) {\r\n result = array[0].f\r\n }\r\n\r\n return result\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the line which match the hands over coordinate\r\n *\r\n * @param {Number} x the x-coordinate for the hit test\r\n * @param {Number} y the x-coordinate for the hit test\r\n * @param {draw2d.shape.basic.Line} [lineToIgnore] a possible line which should be ignored for the hit test\r\n *\r\n * @private\r\n * @returns {draw2d.shape.basic.Line}\r\n **/\r\n getBestLine: function (x, y, lineToIgnore) {\r\n if (!Array.isArray(lineToIgnore)) {\r\n if (lineToIgnore instanceof draw2d.Figure) {\r\n lineToIgnore = [lineToIgnore]\r\n } else {\r\n lineToIgnore = []\r\n }\r\n }\r\n let count = this.lines.getSize()\r\n\r\n for (let i = 0; i < count; i++) {\r\n let line = this.lines.get(i)\r\n if (line.isVisible() === true && line.hitTest(x, y) === true && $.inArray(line, lineToIgnore) === -1) {\r\n return line\r\n }\r\n }\r\n return null\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework during drag&drop operations.<br>\r\n * Droppable can be setup with:\r\n * <pre>\r\n * $(\".draw2d_droppable\").draggable({\r\n * appendTo:\"#container\",\r\n * stack:\"#container\",\r\n * zIndex: 27000,\r\n * helper:\"clone\",\r\n * start: function(e, ui){$(ui.helper).addClass(\"shadow\");}\r\n * });\r\n * </pre>\r\n * Draw2D use the jQuery draggable/droppable lib. Please inspect\r\n * http://jqueryui.com/demos/droppable/ for further information.\r\n *\r\n * @param {HTMLElement} draggedDomNode The DOM element which is currently dragging\r\n *\r\n * @template\r\n **/\r\n onDragEnter: function (draggedDomNode) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the DragDrop object is moving around.<br>\r\n * <br>\r\n * Draw2D use the jQuery draggable/droppable lib. Please inspect\r\n * http://jqueryui.com/demos/droppable/ for further information.\r\n *\r\n * @param {HTMLElement} draggedDomNode The dragged DOM element.\r\n * @param {Number} x the x coordinate of the drag\r\n * @param {Number} y the y coordinate of the drag\r\n *\r\n * @template\r\n **/\r\n onDrag: function (draggedDomNode, x, y) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the DragDrop object leaving the current hover figure.<br>\r\n * <br>\r\n * Graphiti use the jQuery draggable/droppable lib. Please inspect\r\n * http://jqueryui.com/demos/droppable/ for further information.\r\n *\r\n * @param {HTMLElement} draggedDomNode The figure which is currently dragging\r\n *\r\n * @template\r\n **/\r\n onDragLeave: function (draggedDomNode) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the user drop the droppedDomNode onto the canvas.<br>\r\n * <br>\r\n * Draw2D use the jQuery draggable/droppable lib. Please inspect\r\n * http://jqueryui.com/demos/droppable/ for further information.\r\n *\r\n * @param {HTMLElement} droppedDomNode The dropped DOM element.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @template\r\n **/\r\n onDrop: function (droppedDomNode, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method for the double click event. The x/y coordinates are relative to the top left\r\n * corner of the canvas.\r\n *\r\n * @private\r\n **/\r\n onDoubleClick: function (x, y, shiftKey, ctrlKey) {\r\n // check if a line has been hit\r\n //\r\n let figure = this.getBestFigure(x, y)\r\n\r\n // or a line/connection. May we should test the line before a figure..?\r\n // (since 4.0.0)\r\n if (figure === null) {\r\n figure = this.getBestLine(x, y)\r\n }\r\n\r\n this.fireEvent(\"dblclick\", {figure: figure, x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n // forward the event to all install policies as well.\r\n // (since 4.0.0)\r\n this.editPolicy.each(function (i, policy) {\r\n policy.onDoubleClick(figure, x, y, shiftKey, ctrlKey)\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * @param {Number} x the x coordinate of the event\r\n * @param {Number} y the y coordinate of the event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onClick: function (x, y, shiftKey, ctrlKey) {\r\n // check if a figure has been hit\r\n //\r\n let figure = this.getBestFigure(x, y)\r\n\r\n this.fireEvent(\"click\", {\r\n figure: figure,\r\n x: x,\r\n y: y,\r\n relX: figure !== null ? x - figure.getAbsoluteX() : 0,\r\n relY: figure !== null ? y - figure.getAbsoluteY() : 0,\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n\r\n // forward the event to all install policies as well.\r\n // (since 3.0.0)\r\n this.editPolicy.each(function (i, policy) {\r\n policy.onClick(figure, x, y, shiftKey, ctrlKey)\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * The user has triggered a right click. Redirect them to a responsible figure.\r\n *\r\n * @param {Number} x The x-coordinate of the click\r\n * @param {Number} y The y-coordinate of the click\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @private\r\n * @since 1.1.0\r\n **/\r\n onRightMouseDown: function (x, y, shiftKey, ctrlKey) {\r\n let figure = this.getBestFigure(x, y)\r\n this.fireEvent(\"contextmenu\", {figure: figure, x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n if (figure !== null) {\r\n figure.fireEvent(\"contextmenu\", {figure: figure, x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n // @deprecated legacy call\r\n figure.onContextMenu(x, y)\r\n\r\n // forward the event to all installed policies of the figure\r\n // soft migration from onHookXYZ to Policies.\r\n // since 4.4.0\r\n figure.editPolicy.each(function (i, policy) {\r\n policy.onRightMouseDown(figure, x, y, shiftKey, ctrlKey)\r\n })\r\n }\r\n\r\n // forward the event to all install policies as well.\r\n // (since 4.4.0)\r\n this.editPolicy.each(function (i, policy) {\r\n policy.onRightMouseDown(figure, x, y, shiftKey, ctrlKey)\r\n })\r\n\r\n },\r\n\r\n /**\r\n *\r\n * @param {Number} wheelDelta the delata of the wheel rotation\r\n * @param {Number} x the x coordinate of the event\r\n * @param {Number} y the y coordinate of the event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onMouseWheel: function (wheelDelta, x, y, shiftKey, ctrlKey) {\r\n let returnValue = true\r\n this.fireEvent(\"wheel\", {wheelDelta: wheelDelta, x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n // forward the event to all install policies as well.\r\n // (since 3.0.0)\r\n this.editPolicy.each(function (i, policy) {\r\n returnValue = policy.onMouseWheel(wheelDelta, x, y, shiftKey, ctrlKey) && returnValue\r\n })\r\n\r\n return returnValue\r\n },\r\n\r\n\r\n // NEW EVENT HANDLING SINCE VERSION 5.0.0\r\n /**\r\n *\r\n * Execute all handlers and behaviors attached to the canvas for the given event type.\r\n *\r\n *\r\n * @param {String} event the event to trigger\r\n * @param {Object} [args] optional parameters for the triggered event callback\r\n * @private\r\n * @since 5.0.0\r\n */\r\n fireEvent: function (event, args) {\r\n if (typeof this.eventSubscriptions[event] === 'undefined') {\r\n return\r\n }\r\n\r\n let subscribers = this.eventSubscriptions[event]\r\n for (let i = 0; i < subscribers.length; i++) {\r\n try {\r\n subscribers[i](this, args)\r\n } catch (exc) {\r\n console.log(exc)\r\n console.log(subscribers[i])\r\n debugger\r\n }\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Attach an event handler function for one or more events to the canvas.\r\n * To remove events bound with .on(), see {@link #off}.\r\n *\r\n * possible events are:<br>\r\n * <ul>\r\n * <li>reset</li>\r\n * <li>select</li>\r\n * </ul>\r\n *\r\n * Example:\r\n *\r\n * canvas.on(\"clear\", function(emitter, event){\r\n * alert(\"canvas.clear() called.\");\r\n * });\r\n *\r\n * canvas.on(\"select\", function(emitter,event){\r\n * alert(\"figure selected\");\r\n * });\r\n *\r\n * canvas.on(\"unselect\", function(emitter,event){\r\n * alert(\"figure unselected\");\r\n * });\r\n * \r\n * @param {String} event One or more space-separated event types\r\n * @param {Function} callback A function to execute when the event is triggered.\r\n * @param {draw2d.Canvas} callback.emitter the emitter of the event\r\n * @param {Object} [callback.obj] optional event related data\r\n *\r\n * @since 5.0.0\r\n */\r\n on: function (event, callback) {\r\n let events = event.split(\" \")\r\n for (let i = 0; i < events.length; i++) {\r\n if (typeof this.eventSubscriptions[events[i]] === 'undefined') {\r\n this.eventSubscriptions[events[i]] = []\r\n }\r\n this.eventSubscriptions[events[i]].push(callback)\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The `off()` method removes event handlers that were attached with {@link #on}.<br>\r\n * Calling .off() with no arguments removes all handlers attached to the canvas.<br>\r\n * <br>\r\n * If a simple event name such as \"reset\" is provided, all events of that type are removed from the canvas.\r\n *\r\n *\r\n * @param {String|Function} eventOrFunction the event name of the registerd function\r\n * @since 5.0.0\r\n */\r\n off: function (eventOrFunction) {\r\n if (typeof eventOrFunction === \"undefined\") {\r\n this.eventSubscriptions = {}\r\n } else if (typeof eventOrFunction === 'string') {\r\n this.eventSubscriptions[eventOrFunction] = []\r\n } else {\r\n for (let event in this.eventSubscriptions) {\r\n this.eventSubscriptions[event] = this.eventSubscriptions[event].filter(function (callback) {\r\n return callback !== eventOrFunction\r\n })\r\n }\r\n }\r\n\r\n return this\r\n }\r\n })\r\n","import draw2d from 'packages'\r\n\r\ndraw2d.Configuration = {\r\n version : \"@VERSION@\",\r\n i18n : {\r\n command : {\r\n move : \"Move Shape\",\r\n assignShape : \"Add Shapes to Composite\",\r\n groupShapes : \"Group Shapes\",\r\n ungroupShapes : \"Ungroup Shapes\",\r\n deleteShape : \"Delete Shape\",\r\n moveShape : \"Move Shape\",\r\n moveLine : \"Move Line\",\r\n addShape : \"Add Shape\",\r\n moveVertex : \"Move Vertex\",\r\n moveVertices : \"Move Vertices\",\r\n deleteVertex : \"Delete Vertex\",\r\n resizeShape : \"Resize Shape\",\r\n rotateShape : \"Rotate Shape\",\r\n collection : \"Execute Commands\",\r\n addVertex : \"Add Vertex\",\r\n changeAttributes:\"Change Attributes\",\r\n connectPorts : \"Connect Ports\"\r\n },\r\n menu : {\r\n deleteSegment : \"Delete Segment\",\r\n addSegment : \"Add Segment\"\r\n },\r\n dialog : {\r\n filenamePrompt : \"Enter Filename:\"\r\n }\r\n },\r\n\r\n factory:{\r\n \t// all selection policies calles this method to create a ResizeHandle.\r\n \t// It is possible to replace this method with a custom implementation\r\n \t// @since 5.2.0\r\n \tcreateResizeHandle: function(owner, type, width, height){\r\n // create a custom SelectionPolicy instead\r\n console.log(\"deprecated call factory.createResizeHandle\");\r\n \t\treturn new draw2d.ResizeHandle({ owner, type, width, height });\r\n \t},\r\n \t// The commands an canvas calles this method to create a new connection.\r\n \t// all parameters are optional.\r\n \t// @since 5.3.0\r\n // @deprecated\r\n \tcreateConnection: function(sourcePort, targetPort, callback, dropTarget){\r\n console.log(\"deprecated call factory.createConnection\");\r\n debugger;\r\n \t return new draw2d.Connection();\r\n \t},\r\n // @since 5.3.0\r\n \tcreateInputPort: function(relatedFigure){\r\n \t return new draw2d.InputPort();\r\n \t},\r\n // @since 5.3.0\r\n createOutputPort: function(relatedFigure){\r\n return new draw2d.OutputPort();\r\n },\r\n // @since 5.3.0\r\n createHybridPort: function(relatedFigure){\r\n return new draw2d.HybridPort();\r\n }\r\n }\r\n};\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Connections figures are used to display a line between two points. The Connection interface extends\r\n * {@link draw2d.shape.basic.PolyLine PolyLine}.<br>\r\n * The source and target endpoints of a connection are each defined using a {@link draw2d.layout.anchor.ConnectionAnchor ConnectionAnchor}.\r\n * These endpoints, along with any other points on the connection, are set by the connection's {@link draw2d.layout.connection.ConnectionRouter ConnectionRouter}.\r\n * <br>\r\n * Usually every connection in a drawing has the same router instance. Connections with\r\n * common endpoints can share anchor instances as well.\r\n *\r\n * <h2>Connection Usage</h2>\r\n *\r\n * Connections are created and added just like any other figure. Unlike normal figures, you must not set the\r\n * bounds of a connection. Instead, you must provide the source and target port and let the connection router\r\n * calculate the connection's points. The connection then determines its own bounding box.<br>\r\n * <br>\r\n * A connection has a simple router by default - one that can connect the source and target anchors. But additional routers\r\n * are available and can be set on the connection. Some routers can handle constraints for the connection. Note that when\r\n * setting a routing constraint on a connection, you must first set the router which will use that constraint.<br>\r\n * <br>\r\n *\r\n * <b>TODO:<br></b>\r\n * <i>\r\n * A convenient way to share the router with all connections and to place connections above the drawing is to use a\r\n * ConnectionLayer. The layer has a connection router property which it shares with every child that's a connection.\r\n * You can update this property and easily change every connection's router at once.\r\n * </i>\r\n * <br>\r\n * <br>\r\n * <h2>Routing and Anchors</h2>\r\n * A connection always has a router and it must set at least two ports on the connection: the source and target\r\n * endpoints. By default, or when set to null, the connection's routing will be performed by an internal default router.\r\n * The ends are placed with the help of {@link draw2d.layout.anchor.ConnectionAnchor anchors}. An\r\n * {@link draw2d.layout.anchor.ConnectionAnchor anchors} is a fixed or calculated location, usually associated with some\r\n * figure. For example, the {@link draw2d.layout.anchor.ChopboxConnectionAnchor ChopboxAnchor} finds the point at which a\r\n * line going to the reference point intersects a box, such as the bounds of a figure. The reference point is either\r\n * the anchor at the opposite end, or a bendpoint or some other point nearest to the anchor.\r\n * <br>\r\n * {@img jsdoc_chopbox.gif ChopboxAnchor}\r\n * <br>\r\n * The router calculates the endpoints and any other points in the middle of the connection. It then sets the points on the\r\n * connection by calling {@link draw2d.shape.basic.PolyLine#addPoint Polyline.addPoint}. The connection's existing point list\r\n * can be reused to reduce garbage, but the points must be set on the connection anyway so that it knows about any changes made.\r\n * <br>\r\n * <h2>Adding Decorations and Children to Connections</h2>\r\n * Like most figures, Connection supports the addition of children. The children might be a label that\r\n * decorate the connection. The placement of each type of decoration can vary, so a {@link draw2d.layout.locator.ConnectionLocator ConnectionLocator}\r\n * is used to delegate to each child's constraint object, a Locator. <br>\r\n * <br>\r\n * {@link draw2d.decoration.connection.Decorator Decorator} can be used to create and render a rotatable shape at\r\n * the end or start of a connection like arrows or boxes. Examples are {@link draw2d.decoration.connection.ArrowDecorator ArrowDecorator}, {@link draw2d.decoration.connection.BarDecorator BarDecorator} or {@link draw2d.decoration.connection.CircleDecorator CircleDecorator}\r\n * <br>\r\n * <h2>Connection Layout</h2>\r\n * Connections extend the process of validation and layout to include routing. Since layout is the process of positioning children, routing must\r\n * come first. This allows a child's locator to operate on the connection's newly-routed points.<br>\r\n * Check out [Class System Guide](#!/guide/class_system) for additional reading.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.PolyLine\r\n */\r\n\r\ndraw2d.Connection = draw2d.shape.basic.PolyLine.extend(\r\n /** @lends draw2d.Connection.prototype */\r\n {\r\n\r\n NAME: \"draw2d.Connection\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.sourcePort = null\r\n this.targetPort = null\r\n\r\n this.oldPoint = null\r\n\r\n this.sourceDecorator = null\r\n /*:draw2d.ConnectionDecorator*/\r\n this.targetDecorator = null\r\n /*:draw2d.ConnectionDecorator*/\r\n\r\n // decoration of the polyline\r\n //\r\n this.sourceDecoratorNode = null\r\n this.targetDecoratorNode = null\r\n\r\n // helper let to restore the initial visual representation if the user drag&drop\r\n // the port outside of the browser window. In this case some events get lost and\r\n // I can restore the initial state of the connection if the mouse comes in the browser window\r\n // again.\r\n this.isMoving = false\r\n\r\n this.moveListener = (figure) => {\r\n if (figure === this.sourcePort) {\r\n this.setStartPoint(this.sourcePort.getAbsoluteX(), this.sourcePort.getAbsoluteY())\r\n } else {\r\n this.setEndPoint(this.targetPort.getAbsoluteX(), this.targetPort.getAbsoluteY())\r\n }\r\n }\r\n\r\n this._super(\r\n {\r\n color: \"#129CE4\",\r\n stroke: 2,\r\n // outlineStroke:1,\r\n // outlineColor:\"#ffffff\",\r\n radius: 3,\r\n ...attr},\r\n {\r\n sourceDecorator: this.setSourceDecorator,\r\n targetDecorator: this.setTargetDecorator,\r\n source: this.setSource,\r\n target: this.setTarget,\r\n ...setter\r\n },\r\n {\r\n sourceDecorator: this.getSourceDecorator,\r\n targetDecorator: this.getTargetDecorator,\r\n source: this.getSource,\r\n target: this.getTarget,\r\n ...getter\r\n })\r\n },\r\n\r\n\r\n /**\r\n * @private\r\n **/\r\n disconnect: function () {\r\n if (this.sourcePort !== null) {\r\n this.sourcePort.off(this.moveListener)\r\n this.sourcePort.connections.remove(this)\r\n\r\n // fire the events to all listener\r\n this.sourcePort.fireEvent(\"disconnect\", {port: this.sourcePort, connection: this})\r\n this.canvas?.fireEvent(\"disconnect\", {port: this.sourcePort, connection: this})\r\n this.sourcePort.onDisconnect(this)\r\n\r\n this.fireSourcePortRouteEvent()\r\n }\r\n\r\n if (this.targetPort !== null) {\r\n this.targetPort.off(this.moveListener)\r\n this.targetPort.connections.remove(this)\r\n\r\n // fire the events to all listener\r\n this.targetPort.fireEvent(\"disconnect\", {port: this.targetPort, connection: this})\r\n this.canvas?.fireEvent(\"disconnect\", {port: this.targetPort, connection: this})\r\n this.targetPort.onDisconnect(this)\r\n\r\n this.fireTargetPortRouteEvent()\r\n }\r\n },\r\n\r\n\r\n /**\r\n * @private\r\n **/\r\n reconnect: function () {\r\n if (this.sourcePort !== null) {\r\n this.sourcePort.on(\"move\", this.moveListener)\r\n this.sourcePort.connections.add(this)\r\n\r\n // fire the events to all listener\r\n this.sourcePort.fireEvent(\"connect\", {port: this.sourcePort, connection: this})\r\n this.canvas?.fireEvent(\"connect\", {port: this.sourcePort, connection: this})\r\n this.sourcePort.onConnect(this)\r\n\r\n this.fireSourcePortRouteEvent()\r\n }\r\n\r\n if (this.targetPort !== null) {\r\n this.targetPort.on(\"move\", this.moveListener)\r\n this.targetPort.connections.add(this)\r\n\r\n // fire the events to all listener\r\n this.targetPort.fireEvent(\"connect\", {port: this.targetPort, connection: this})\r\n this.canvas?.fireEvent(\"connect\", {port: this.targetPort, connection: this})\r\n this.targetPort.onConnect(this)\r\n\r\n this.fireTargetPortRouteEvent()\r\n }\r\n this.routingRequired = true\r\n this.repaint()\r\n },\r\n\r\n\r\n /**\r\n * You can't drag&drop the resize handles of a connector.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n isResizeable: function () {\r\n return this.isDraggable()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Add a child figure to the Connection. The hands over figure doesn't support drag&drop\r\n * operations. It's only a decorator for the connection.<br>\r\n * Mainly for labels or other fancy decorations :-)\r\n *\r\n * @param {draw2d.Figure} child the figure to add as decoration to the connection.\r\n * @param {draw2d.layout.locator.ConnectionLocator} locator the locator for the child.\r\n * @param {Number} [index] optional index where to insert the figure\r\n * @returns {this}\r\n **/\r\n add: function (child, locator, index) {\r\n // just to ensure the right interface for the locator.\r\n // The base class needs only 'draw2d.layout.locator.Locator'.\r\n if (!(locator instanceof draw2d.layout.locator.ConnectionLocator)) {\r\n throw \"Locator must implement the class draw2d.layout.locator.ConnectionLocator\"\r\n }\r\n\r\n this._super(child, locator, index)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the ConnectionDecorator for this object.\r\n *\r\n * @param {draw2d.decoration.connection.Decorator} decorator the new source decorator for the connection\r\n * @returns {this}\r\n **/\r\n setSourceDecorator: function (decorator) {\r\n\r\n this.sourceDecorator?.setParent(null)\r\n\r\n this.sourceDecorator = decorator\r\n this.routingRequired = true\r\n this.sourceDecorator.setParent(this)\r\n\r\n this.sourceDecoratorNode?.remove()\r\n this.sourceDecoratorNode = null\r\n\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the current source ConnectionDecorator for this object.\r\n *\r\n * @returns draw2d.decoration.connection.Decorator\r\n **/\r\n getSourceDecorator: function () {\r\n return this.sourceDecorator\r\n },\r\n\r\n /**\r\n *\r\n * Set the ConnectionDecorator for this object.\r\n *\r\n * @param {draw2d.decoration.connection.Decorator} decorator the new target decorator for the connection\r\n * @returns {this}\r\n **/\r\n setTargetDecorator: function (decorator) {\r\n this.targetDecorator?.setParent(null)\r\n\r\n this.targetDecorator = decorator\r\n this.routingRequired = true\r\n this.targetDecorator.setParent(this)\r\n\r\n this.targetDecoratorNode?.remove()\r\n this.targetDecoratorNode = null\r\n\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the current target ConnectionDecorator for this object.\r\n *\r\n * @returns draw2d.decoration.connection.Decorator\r\n **/\r\n getTargetDecorator: function () {\r\n return this.targetDecorator\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Calculate the path of the polyline.\r\n *\r\n * @param {Object} routingHints some helper attributes for the router\r\n * @param {Boolean} routingHints.startMoved is true if just the start location has moved\r\n * @param {Boolean} routingHints.destMoved is true if the destination location has changed\r\n * @private\r\n */\r\n calculatePath: function (routingHints) {\r\n\r\n if (this.sourcePort === null || this.targetPort === null) {\r\n return this\r\n }\r\n\r\n this._super(routingHints)\r\n\r\n if (this.shape !== null) {\r\n let z1 = this.sourcePort.getZOrder()\r\n let z2 = this.targetPort.getZOrder()\r\n this.toBack(z1 < z2 ? this.sourcePort:this.targetPort)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @private\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || \r\n this.shape === null || \r\n this.sourcePort === null || \r\n this.targetPort === null) {\r\n return\r\n }\r\n\r\n\r\n this._super(attributes)\r\n\r\n // paint the decorator if any exists\r\n //\r\n if (this.targetDecorator !== null && this.targetDecoratorNode === null) {\r\n this.targetDecoratorNode = this.targetDecorator.paint(this.getCanvas().paper)\r\n }\r\n\r\n if (this.sourceDecorator !== null && this.sourceDecoratorNode === null) {\r\n this.sourceDecoratorNode = this.sourceDecorator.paint(this.getCanvas().paper)\r\n }\r\n\r\n // translate/transform the decorations to the end/start of the connection\r\n // and rotate them as well\r\n //\r\n if (this.sourceDecoratorNode !== null) {\r\n let start = this.getVertices().first()\r\n this.sourceDecoratorNode.transform(\"r\" + this.getStartAngle() + \",\" + start.x + \",\" + start.y + \" t\" + start.x + \",\" + start.y)\r\n // propagate the color and the opacity to the decoration as well\r\n this.sourceDecoratorNode.attr({opacity: this.alpha})\r\n // apply the color of the connection if the decoration doesn't have any\r\n if (this.sourceDecorator.getColor() === null) {\r\n this.sourceDecoratorNode.attr({\"stroke\": \"#\" + this.lineColor.hex()})\r\n } else {\r\n this.sourceDecoratorNode.attr({\"stroke\": \"#\" + this.sourceDecorator.getColor().hex()})\r\n }\r\n this.sourceDecoratorNode.forEach(shape => {\r\n shape.node.setAttribute(\"class\", this.cssClass !== null ? this.cssClass : \"\")\r\n })\r\n }\r\n\r\n if (this.targetDecoratorNode !== null) {\r\n let end = this.getVertices().last()\r\n this.targetDecoratorNode.transform(\"r\" + this.getEndAngle() + \",\" + end.x + \",\" + end.y + \" t\" + end.x + \",\" + end.y)\r\n this.targetDecoratorNode.attr({opacity: this.alpha})\r\n // apply the color of the connection if the decoration doesn't have any\r\n if (this.targetDecorator.getColor() === null) {\r\n this.targetDecoratorNode.attr({stroke: this.lineColor.hash()})\r\n } else {\r\n this.targetDecoratorNode.attr({stroke: this.targetDecorator.getColor().hash()})\r\n }\r\n this.targetDecoratorNode.forEach(shape => {\r\n shape.node.setAttribute(\"class\", this.cssClass !== null ? this.cssClass : \"\")\r\n })\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * The x-offset related to the canvas.\r\n * Didn't provided by a connection. Return always '0'. This is required\r\n * for children position calculation. (e.g. Label decoration)\r\n *\r\n * @returns {Number} the x-offset to the parent figure\r\n **/\r\n getAbsoluteX: function () {\r\n return 0\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The y-offset related to the canvas.\r\n * Didn't provided by a connection. Return always '0'. This is required\r\n * for children position calculation. (e.g. Label decoration)\r\n *\r\n * @returns {Number} The y-offset to the parent figure.\r\n **/\r\n getAbsoluteY: function () {\r\n return 0\r\n },\r\n\r\n\r\n postProcess: function (postProcessCache) {\r\n this.router.postProcess(this, this.getCanvas(), postProcessCache)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Don't call them manually. This will be done by the framework.<br>\r\n * Will be called if the object are moved via drag and drop.\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call\r\n * the super implementation via <code>this._super(dx, dy, dx2, dy2);</code>\r\n * @private\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n if (this.command === null) {\r\n return\r\n }\r\n\r\n // Delegate the drag&drop operation to the router. The router has\r\n // all the meta information how to update start/end vertices\r\n //\r\n this.router.onDrag(this, dx, dy, dx2, dy2)\r\n\r\n this.command.updateVertices(this.getVertices().clone())\r\n\r\n // notify all installed policies\r\n //\r\n this.editPolicy.each( (i, e) =>{\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.onDrag(this.canvas, this)\r\n }\r\n })\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n // Update the resize handles if the user change the position of the\r\n // element via an API call.\r\n //\r\n this.editPolicy.each((i, e) =>{\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"move\", {figure: this, dx: dx, dy: dx})\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. Additional\r\n * the internal model changed as well.\r\n *\r\n * Optional: Inserts current object in front of the given one.\r\n *\r\n * @param {draw2d.Figure} [figure] move current object in front of the given one.\r\n * @since 3.0.0\r\n */\r\n toFront: function (figure) {\r\n this._super(figure)\r\n\r\n // ensure that the decoration is always in front of the connection\r\n //\r\n if (this.shape !== null) {\r\n this.targetDecoratorNode?.insertAfter(this.shape)\r\n this.sourceDecoratorNode?.insertAfter(this.shape)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Moves the element to the background. Additional\r\n * the internal model changed as well.\r\n *\r\n * @param {draw2d.Figure} [figure] move this object behind of the 'figure'.\r\n * @since 4.7.2\r\n */\r\n toBack: function (figure) {\r\n this._super(figure)\r\n\r\n if (this.shape !== null) {\r\n this.targetDecoratorNode?.insertAfter(this.shape)\r\n this.sourceDecoratorNode?.insertAfter(this.shape)\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the recalculated position of the start point with the usage of\r\n * the installed connection anchor locator.\r\n *\r\n * @returns {draw2d.geo.Point}\r\n * @deprecated\r\n **/\r\n getStartPoint: function (refPoint) {\r\n return this.getStartPosition(refPoint)\r\n },\r\n\r\n getStartPosition: function (refPoint) {\r\n if (this.isMoving === false) {\r\n if (refPoint) {\r\n return this.sourcePort.getConnectionAnchorLocation(refPoint, this)\r\n }\r\n return this.sourcePort.getConnectionAnchorLocation(this.targetPort.getConnectionAnchorReferencePoint(this), this)\r\n }\r\n\r\n return this._super()\r\n },\r\n\r\n /**\r\n *\r\n * Return the recalculated position of the start point with the usage of\r\n * the installed connection anchor locator.\r\n *\r\n * @returns {draw2d.geo.Point}\r\n * @deprecated\r\n **/\r\n getEndPoint: function (refPoint) {\r\n return this.getEndPosition(refPoint)\r\n },\r\n\r\n getEndPosition: function (refPoint) {\r\n if (this.isMoving === false) {\r\n if (refPoint) {\r\n return this.targetPort.getConnectionAnchorLocation(refPoint, this)\r\n }\r\n return this.targetPort.getConnectionAnchorLocation(this.sourcePort.getConnectionAnchorReferencePoint(this), this)\r\n }\r\n\r\n return this._super()\r\n },\r\n\r\n /**\r\n *\r\n * Set the new source port of this connection. This enforce a repaint of the connection.\r\n *\r\n * @param {draw2d.Port} port The new source port of this connection.\r\n *\r\n **/\r\n setSource: function (port) {\r\n if (this.sourcePort !== null) {\r\n this.sourcePort.off(this.moveListener)\r\n this.sourcePort.connections.remove(this)\r\n this.sourcePort.fireEvent(\"disconnect\", {port: this.sourcePort, connection: this})\r\n // it is possible that a connection has already a port but is not assigned to\r\n // a canvas. In this case we must check if the canvas set correct before we fire this event\r\n this.canvas?.fireEvent(\"disconnect\", {port: this.sourcePort, connection: this})\r\n\r\n this.sourcePort.onDisconnect(this)\r\n }\r\n\r\n this.sourcePort = port\r\n if (this.sourcePort === null) {\r\n return\r\n }\r\n\r\n this.routingRequired = true\r\n this.fireSourcePortRouteEvent()\r\n this.sourcePort.connections.add(this)\r\n this.sourcePort.on(\"move\", this.moveListener)\r\n\r\n this.canvas?.fireEvent(\"connect\", {port: this.sourcePort, connection: this})\r\n\r\n this.sourcePort.fireEvent(\"connect\", {port: this.sourcePort, connection: this})\r\n this.sourcePort.onConnect(this)\r\n\r\n this.setStartPoint(port.getAbsoluteX(), port.getAbsoluteY())\r\n this.fireEvent(\"connect\", {port: this.sourcePort, connection: this})\r\n },\r\n\r\n /**\r\n *\r\n * Returns the source port of this connection.\r\n *\r\n * @returns {draw2d.Port}\r\n **/\r\n getSource: function () {\r\n return this.sourcePort\r\n },\r\n\r\n /**\r\n *\r\n * Set the target port of this connection. This enforce a repaint of the connection.\r\n *\r\n * @param {draw2d.Port} port The new target port of this connection\r\n **/\r\n setTarget: function (port) {\r\n if (this.targetPort !== null) {\r\n this.targetPort.off(this.moveListener)\r\n this.targetPort.connections.remove(this)\r\n this.targetPort.fireEvent(\"disconnect\", {port: this.targetPort, connection: this})\r\n // it is possible that a connection has already a port but is not assigned to\r\n // a canvas. In this case we must check if the canvas set correct before we fire this event\r\n this.canvas?.fireEvent(\"disconnect\", {port: this.targetPort, connection: this})\r\n\r\n this.targetPort.onDisconnect(this)\r\n }\r\n\r\n this.targetPort = port\r\n if (this.targetPort === null) {\r\n return\r\n }\r\n\r\n this.routingRequired = true\r\n this.fireTargetPortRouteEvent()\r\n this.targetPort.connections.add(this)\r\n this.targetPort.on(\"move\", this.moveListener)\r\n this.canvas?.fireEvent(\"connect\", {port: this.targetPort, connection: this})\r\n this.targetPort.fireEvent(\"connect\", {port: this.targetPort, connection: this})\r\n this.targetPort.onConnect(this)\r\n\r\n this.setEndPoint(port.getAbsoluteX(), port.getAbsoluteY())\r\n this.fireEvent(\"connect\", {port: this.targetPort, connection: this})\r\n },\r\n\r\n /**\r\n *\r\n * Returns the target port of this connection.\r\n *\r\n * @returns {draw2d.Port}\r\n **/\r\n getTarget: function () {\r\n return this.targetPort\r\n },\r\n\r\n /**\r\n * Returns the peer port of the connection for a given port or nulll if `port` not part of this connection\r\n * @param {draw2d.Port} port \r\n * @returns {draw2d.Port}\r\n */\r\n getPeerPort: function(port) {\r\n if(port === this.sourcePort){\r\n return this.targetPort\r\n }\r\n if(port === this.targetPort){\r\n return this.sourcePort\r\n }\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Method returns true if the connection has at least one common draw2d.Port with the given connection.\r\n *\r\n * @param {draw2d.Connection} other\r\n *\r\n * @returns {Boolean}\r\n */\r\n sharingPorts: function (other) {\r\n return this.sourcePort == other.sourcePort ||\r\n this.sourcePort == other.targetPort ||\r\n this.targetPort == other.sourcePort ||\r\n this.targetPort == other.targetPort\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the canvas element of this figures.\r\n *\r\n * @param {draw2d.Canvas} canvas the new parent of the figure or null\r\n */\r\n setCanvas: function (canvas) {\r\n if (this.canvas === canvas) {\r\n return // nothing to do\r\n }\r\n\r\n let notiCanvas = this.canvas === null ? canvas : this.canvas\r\n\r\n this._super(canvas)\r\n\r\n this.sourceDecoratorNode?.remove()\r\n this.sourceDecoratorNode = null\r\n\r\n this.targetDecoratorNode?.remove()\r\n this.targetDecoratorNode = null\r\n\r\n if (this.canvas === null) {\r\n if (this.sourcePort !== null) {\r\n this.sourcePort.off(this.moveListener)\r\n notiCanvas.fireEvent(\"disconnect\", { port: this.sourcePort, connection: this})\r\n this.sourcePort.onDisconnect(this)\r\n }\r\n if (this.targetPort !== null) {\r\n this.targetPort.off(this.moveListener)\r\n notiCanvas.fireEvent(\"disconnect\", { port: this.targetPort, connection: this})\r\n this.targetPort.onDisconnect(this)\r\n }\r\n } else {\r\n\r\n if (this.sourcePort !== null) {\r\n this.sourcePort.on(\"move\", this.moveListener)\r\n this.canvas.fireEvent(\"connect\", { port: this.sourcePort, connection: this})\r\n this.sourcePort.onConnect(this)\r\n }\r\n if (this.targetPort !== null) {\r\n this.targetPort.on(\"move\", this.moveListener)\r\n this.canvas.fireEvent(\"connect\", { port: this.targetPort, connection: this})\r\n this.targetPort.onConnect(this)\r\n }\r\n }\r\n },\r\n\r\n\r\n /**\r\n * Returns the angle of the connection at the output port (source)\r\n *\r\n **/\r\n getStartAngle: function () {\r\n // return a good default value if the connection is not routed at the\r\n // moment\r\n if (this.lineSegments.getSize() === 0) {\r\n return 0\r\n }\r\n\r\n let p1 = this.lineSegments.get(0).start\r\n let p2 = this.lineSegments.get(0).end\r\n // Since the points are too close to each other in a spline routing, an \r\n // angle is obtained which does not correspond to the optical impression. \r\n // In this case, a point is taken which is a little further away \r\n // from the port....if ppossible\r\n if (this.router instanceof draw2d.layout.connection.SplineConnectionRouter) {\r\n p2 = this.lineSegments.get(5)?.end ?? p2\r\n }\r\n\r\n let length = Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y))\r\n let angle = -(180 / Math.PI) * Math.asin((p1.y - p2.y) / length)\r\n\r\n if (angle < 0) {\r\n if (p2.x < p1.x) {\r\n angle = Math.abs(angle) + 180\r\n } else {\r\n angle = 360 - Math.abs(angle)\r\n }\r\n } else {\r\n if (p2.x < p1.x) {\r\n angle = 180 - angle\r\n }\r\n }\r\n return angle\r\n },\r\n\r\n getEndAngle: function () {\r\n // return a good default value if the connection is not routed at the\r\n // moment\r\n if (this.lineSegments.getSize() === 0) {\r\n return 90\r\n }\r\n\r\n let p1 = this.lineSegments.get(this.lineSegments.getSize() - 1).end\r\n let p2 = this.lineSegments.get(this.lineSegments.getSize() - 1).start\r\n\r\n // Since the points are too close to each other in a spline routing, an \r\n // angle is obtained which does not correspond to the optical impression. \r\n // In this case, a point is taken which is a little further away \r\n // from the port....if ppossible\r\n if (this.router instanceof draw2d.layout.connection.SplineConnectionRouter) {\r\n p2 = this.lineSegments.get(this.lineSegments.getSize() - 5)?.end ?? p2\r\n }\r\n\r\n let length = Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y))\r\n let angle = -(180 / Math.PI) * Math.asin((p1.y - p2.y) / length)\r\n\r\n if (angle < 0) {\r\n if (p2.x < p1.x) {\r\n angle = Math.abs(angle) + 180\r\n } else {\r\n angle = 360 - Math.abs(angle)\r\n }\r\n } else {\r\n if (p2.x < p1.x) {\r\n angle = 180 - angle\r\n }\r\n }\r\n return angle\r\n },\r\n\r\n\r\n /**\r\n * @private\r\n **/\r\n fireSourcePortRouteEvent: function () {\r\n this.sourcePort.getConnections().each((i, conn) => {\r\n conn.routingRequired = true\r\n conn.repaint()\r\n })\r\n },\r\n\r\n /**\r\n * @private\r\n **/\r\n fireTargetPortRouteEvent: function () {\r\n // enforce a repaint of all connections which are related to this port\r\n // this is required for a \"FanConnectionRouter\" or \"ShortesPathConnectionRouter\"\r\n //\r\n this.targetPort.getConnections().each((i, conn) => {\r\n conn.routingRequired = true\r\n conn.repaint()\r\n })\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the Command to perform the specified Request or null.\r\n *\r\n * @param {draw2d.command.CommandType} request describes the Command being requested\r\n *\r\n * @returns {draw2d.command.Command} null or a Command\r\n **/\r\n createCommand: function (request) {\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE) {\r\n if (this.isDraggable()) {\r\n return new draw2d.command.CommandMoveVertices(this)\r\n }\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE_BASEPOINT) {\r\n // DragDrop of a connection doesn't create a undo command at this point. This will be done in\r\n // the onDrop method\r\n return new draw2d.command.CommandReconnect(this)\r\n }\r\n\r\n return this._super(request)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n let parentNode = this.getSource().getParent()\r\n while (parentNode.getParent() !== null) {\r\n parentNode = parentNode.getParent()\r\n }\r\n memento.source = {\r\n node: parentNode.getId(),\r\n port: this.getSource().getName()\r\n }\r\n\r\n parentNode = this.getTarget().getParent()\r\n while (parentNode.getParent() !== null) {\r\n parentNode = parentNode.getParent()\r\n }\r\n memento.target = {\r\n node: parentNode.getId(),\r\n port: this.getTarget().getName()\r\n }\r\n\r\n if (this.sourceDecorator !== null) {\r\n memento.source.decoration = this.sourceDecorator.NAME\r\n }\r\n\r\n if (this.targetDecorator !== null) {\r\n memento.target.decoration = this.targetDecorator.NAME\r\n }\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n // nothing to to for the connection creation. This will be done in the draw2d.io.Reader\r\n // implementation\r\n //\r\n // restore your custom attributes here\r\n if (typeof memento.target.decoration !== \"undefined\" && memento.target.decoration != null) {\r\n this.setTargetDecorator(Function(`return new ${memento.target.decoration}()`)())\r\n }\r\n\r\n if (typeof memento.source.decoration !== \"undefined\" && memento.source.decoration != null) {\r\n this.setSourceDecorator(Function(`return new ${memento.source.decoration}()`)())\r\n }\r\n\r\n return this\r\n\r\n }\r\n })\r\n","import draw2d from 'packages'\r\nimport jsonUtil from 'util/JSONUtil'\r\nimport UUID from 'util/UUID'\r\nimport extend from 'util/extend'\r\n\r\n/**\r\n * @class\r\n * Base class for all draw2d shapes-\r\n *\r\n */\r\ndraw2d.Figure = Class.extend(\r\n /** @lends draw2d.Figure.prototype */\r\n {\r\n NAME: \"draw2d.Figure\",\r\n MIN_TIMER_INTERVAL: 50, // minimum timer interval in milliseconds\r\n\r\n /**\r\n * Creates a new Figure object\r\n *\r\n * @param attr\r\n * @param setter\r\n * @param getter\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n // @private\r\n this.setterWhitelist = {\r\n // id the unique id of the figure\r\n id: this.setId,\r\n // x the x offset of the figure in relation to the parent figure or canvas\r\n x: this.setX,\r\n // y the y offset of the figure in relation to the parent figure or canvas\r\n y: this.setY,\r\n // width the new width of the figure. Considering the minWidth of the shape\r\n width: this.setWidth,\r\n // height the new height of the figure. Considering the minHeight of the shape\r\n height: this.setHeight,\r\n // boundingBox set the new bounding box of the shape\r\n boundingBox: this.setBoundingBox,\r\n // minWidth the new min width of the figure.\r\n minWidth: this.setMinWidth,\r\n // minHeight the new min height of the figure.\r\n minHeight: this.setMinHeight,\r\n // cssClass the css class of the shape. can be used to style the shape via CSS3 (SVG only)\r\n cssClass: this.setCssClass,\r\n // userData additional custom data which can be stored by the shape\r\n userData: this.setUserData,\r\n // draggable drives the dragging behaviour of the shape\r\n draggable: this.setDraggable,\r\n // resizeable drives the resizeable behaviour of the shape\r\n resizeable: this.setResizeable,\r\n // selectable drives the selectable behaviour of the shape\r\n selectable: this.setSelectable,\r\n // angle the rotation angle of the shape. At the moment only 90 degree increments are possible\r\n angle: this.setRotationAngle,\r\n // alpha the the alpha/opacity of the shape. value must be between [0..1]\r\n alpha: this.setAlpha,\r\n // opacity the the alpha/opacity of the shape. value must be between [0..1]\r\n opacity: this.setAlpha,\r\n // glow the glow flag for the shape. The representation of the \"glow\" depends on the shape\r\n glow: this.setGlow,\r\n // visible set the visibility flag of the shape\r\n visible: this.setVisible,\r\n // keepAspectRatio indicate if the shape should keep the aspect ratio during resize\r\n keepAspectRatio: this.setKeepAspectRatio,\r\n ...setter\r\n }\r\n\r\n this.getterWhitelist = {\r\n id: this.getId,\r\n visible: this.isVisible,\r\n angle: this.getRotationAngle,\r\n x: this.getX,\r\n y: this.getY,\r\n userData: this.getUserData,\r\n width: this.getWidth,\r\n height: this.getHeight,\r\n draggable: this.isDraggable,\r\n resizeable: this.isResizeable,\r\n selectable: this.isSelectable,\r\n alpha: this.getAlpha,\r\n opacity: this.getAlpha,\r\n ...getter\r\n }\r\n\r\n // all figures has an unique id. Required for figure get and persistence storage\r\n this.id = UUID.create()\r\n\r\n this.cachedZOrder = -1\r\n\r\n // required for the SelectionEditPolicy to indicate the type of figure\r\n // which the user clicks\r\n this.isResizeHandle = false\r\n\r\n // for undo/redo operation. It holds the command during a drag/drop operation\r\n // and execute it on the CommandStack if the user drop the figure.\r\n this.command = null\r\n\r\n // the assigned canvas\r\n this.canvas = null\r\n\r\n // the RaphaelJS element reference\r\n this.shape = null\r\n\r\n // possible decorations ( e.g. a Label) of the Connection\r\n // children are fixed bounded the figure. Most of the events of the child will bee\r\n // routed to the parent\r\n this.children = new draw2d.util.ArrayList()\r\n\r\n // behavior flags\r\n //\r\n this.selectable = true\r\n this.deleteable = true\r\n this.resizeable = true\r\n this.draggable = true\r\n this.visible = true\r\n // since 4.1.0.\r\n this.keepAspectRatio = false\r\n\r\n\r\n this.canSnapToHelper = true\r\n this.snapToGridAnchor = new draw2d.geo.Point(0, 0) // hot spot for snap to grid\r\n this.editPolicy = new draw2d.util.ArrayList()\r\n\r\n\r\n // timer for animation or automatic update\r\n //\r\n this.timerId = -1\r\n this.timerInterval = 0\r\n\r\n // possible parent of the figure.\r\n // @see: this.children\r\n this.parent = null\r\n\r\n // a figure can be part of a StrongComposite like a group, ...\r\n //\r\n this.composite = null\r\n\r\n // generic handle for the JSON read/write of user defined data\r\n this.userData = null\r\n\r\n // appearance, position and dim properties\r\n //\r\n this.x = 0\r\n this.y = 0\r\n this.minHeight = 5\r\n this.minWidth = 5\r\n this.rotationAngle = 0\r\n // add the name of the class to the css attribute\r\n this.cssClass = this.NAME.replace(new RegExp(\"[.]\", \"g\"), \"_\")\r\n\r\n this.width = this.getMinWidth()\r\n this.height = this.getMinHeight()\r\n\r\n this.alpha = 1.0\r\n\r\n // internal status flags for the Drag&Drop operation handling and other stuff\r\n //\r\n this.isInDragDrop = false\r\n\r\n this.ox = 0\r\n this.oy = 0\r\n this.repaintBlocked = false\r\n this.lastAppliedAttributes = {}\r\n this.selectionHandles = new draw2d.util.ArrayList()\r\n this.panningDelegate = null\r\n\r\n // even handling since version 5.0.0\r\n this.eventSubscriptions = {}\r\n\r\n this.relocateChildrenEventCallback = () => {\r\n this.children.each((i, e) => {\r\n e.locator.relocate(i, e.figure)\r\n })\r\n }\r\n\r\n // new approach to delegate selection requests.\r\n //\r\n this.defaultSelectionAdapter = this.selectionAdapter = () => this\r\n\r\n // install default selection handler. Can be overridden or replaced\r\n this.installEditPolicy(new draw2d.policy.figure.RectangleSelectionFeedbackPolicy())\r\n\r\n\r\n // the new style attr call with object attributes\r\n this.attr(attr)\r\n },\r\n\r\n /**\r\n *\r\n * Read or set shape attributes.<br>\r\n * When no value is given, reads specified attribute from the element.<br>\r\n * When value is given, sets the attribute to that value.\r\n * Multiple attributes can be set by passing an object with name-value pairs.\r\n *\r\n * let figure = new draw2d.shape.basic.Rectangle();\r\n * figure.attr('x'); //=> read value\r\n * figure.attr('x', 30); //=> set value\r\n *\r\n * // multiple attributes:\r\n * figure.attr({\r\n * x: 30,\r\n * y: 40,\r\n * width : 200,\r\n * height: 50,\r\n * cssClass: \"red_border_figure\"\r\n * });\r\n *\r\n * // it is possible to override any method of the figure as well\r\n * // Instead of inheritance you can just override the callback methods\r\n * // like\r\n * //\r\n * figure.attr({\r\n * onClick : function(){\r\n * alert(\"click\");\r\n * }\r\n * });\r\n *\r\n * // or you can pass the attr values in the constructor\r\n * //\r\n * let clickFigure = new draw2d.shape.basic.Rectangle({\r\n * onClick : function(){\r\n * alert(\"click\");\r\n * }\r\n * });\r\n *\r\n *\r\n * Additional you can set the user defined values (userData) with this method\r\n * using the dot-notation. User defined values are always part of the exported\r\n * JSON data.\r\n *\r\n * // setting multiple attributes:\r\n * figure.attr({\r\n * \"userData.my.property.x\": 30,\r\n * \"userData.my.property.y\": 40\r\n * });\r\n *\r\n * Also set using array notation is possible for the userData:\r\n *\r\n * // dot notation and array brackets:\r\n * figure.attr({\r\n * \"userData.my.names[0]\": \"John\",\r\n * \"userData.my.names[1]\": \"Doe\"\r\n * });\r\n *\r\n *\r\n * The Object returned should be the equivalent structured object:\r\n *\r\n * let obj = figure.getUserData();\r\n *\r\n * That is, where obj is equivalent to:\r\n *\r\n * let obj = {\r\n * my:{\r\n * property:{\r\n * x: 30,\r\n * y: 40\r\n * },\r\n * names: [\"John\", \"Doe\"]\r\n * }\r\n * };\r\n *\r\n *\r\n *\r\n * @param {String/Object} name\r\n * @param {Object} [value]\r\n * @since 5.0.1\r\n * @experimental\r\n * @returns {Object} either the requested attribute if this method used as getter or `this` if the method uses as setter\r\n **/\r\n attr: function (name, value) {\r\n let orig = this.repaintBlocked\r\n\r\n try {\r\n // call of attr as setter method with {name1:val1, name2:val2 } argument list\r\n //\r\n if ($.isPlainObject(name)) {\r\n for (let key in name) {\r\n // user can set the \"userData\" with path notation. In this case we\r\n // expand the path to a real JSON object and set the data.\r\n // index/brackets are allowed too.\r\n //\r\n if (key.substring(0, 9) === \"userData.\") {\r\n this.userData ??= {}\r\n\r\n jsonUtil.set({userData: this.userData}, key, name[key])\r\n this.fireEvent(\"change:\" + key, {value: name[key]})\r\n } else {\r\n let func = this.setterWhitelist[key]\r\n let param = name[key]\r\n if (func && param !== undefined) {\r\n func.call(this, param)\r\n }\r\n // maybe the user adds a function as property to the attr call\r\n // e.g.:\r\n // {\r\n // doIt: function(){}\r\n // }\r\n //\r\n // in this case we assign the method to this object and wrap it with \"this\" as context\r\n // a very, very simple method to replace default implemenations of the object\r\n else if (typeof name[key] === \"function\") {\r\n this[key] = param.bind(this)\r\n }\r\n }\r\n }\r\n } else if (typeof name === \"string\") {\r\n // call attr as getter\r\n //\r\n if (typeof value === \"undefined\") {\r\n let getter = this.getterWhitelist[name]\r\n if (typeof getter === \"function\") {\r\n return getter.call(this)\r\n }\r\n // or it is a userData path notation like \"userData.any.path.value\"\r\n else if (name.substring(0, 9) === \"userData.\") {\r\n let data = {userData: this.userData}\r\n return jsonUtil.get(data, name)\r\n }\r\n return // undefined\r\n }\r\n // call attr as simple setter with (key , value)\r\n //\r\n\r\n // the value can be a function. In this case we must call the value().\r\n if (typeof value === \"function\") {\r\n value = value()\r\n }\r\n if (name.substring(0, 9) === \"userData.\") {\r\n this.userData ??= {}\r\n jsonUtil.set({userData: this.userData}, name, value)\r\n this.fireEvent(\"change:\" + name, {value: value})\r\n } else {\r\n let setter = this.setterWhitelist[name]\r\n setter?.call(this, value)\r\n }\r\n }\r\n // may it is a array of attributes used for the getter\r\n //\r\n else if (Array.isArray(name)) {\r\n return Object.assign({}, ...Object.keys(name).map(k => ({[k]: this.attr(k)})))\r\n }\r\n // generic getter of all registered attributes\r\n else if (typeof name === \"undefined\") {\r\n let result = {}\r\n for (let key in this.getterWhitelist) {\r\n result[key] = this.getterWhitelist[key].call(this)\r\n }\r\n return result\r\n }\r\n } finally {\r\n this.repaintBlocked = orig\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n * Return a copy of the object, filtered to only have values for the whitelisted keys.\r\n * @deprecated\r\n */\r\n pick: function (obj, var_keys) {\r\n let keys = typeof arguments[1] !== 'string' ? arguments[1] : Array.prototype.slice.call(arguments, 1)\r\n let out = {}, key\r\n for (key in keys) {\r\n if (typeof obj[key] !== \"undefined\")\r\n out[key] = obj[key]\r\n }\r\n return out\r\n },\r\n\r\n /**\r\n *\r\n * Add the figure to the current selection and propagate this to all edit policies.\r\n *\r\n * @param {Boolean} [asPrimarySelection] true if the element should be the primary selection\r\n * @private\r\n */\r\n select: function (asPrimarySelection) {\r\n if (typeof asPrimarySelection === \"undefined\") {\r\n asPrimarySelection = true\r\n }\r\n\r\n // apply all EditPolicy for select Operations\r\n //\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.SelectionPolicy) {\r\n e.onSelect(this.canvas, this, asPrimarySelection)\r\n }\r\n })\r\n\r\n this.canvas?.getSelection().add(this)\r\n\r\n this.fireEvent(\"select\", {figure: this})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Unselect the figure and propagete this event to all edit policies.\r\n *\r\n * @private\r\n **/\r\n unselect: function () {\r\n // apply all EditPolicy for select Operations\r\n //\r\n this.editPolicy.each((i, e) =>{\r\n if (e instanceof draw2d.policy.figure.SelectionPolicy) {\r\n e.onUnselect(this.canvas, this)\r\n }\r\n })\r\n\r\n this.canvas?.getSelection().remove(this)\r\n\r\n this.fireEvent(\"unselect\", {figure: this})\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns a function which returns the the figure which must handle the selection handling.\r\n *\r\n * @param {Function} [adapter] function which returns the figure which handles the selection handling\r\n */\r\n setSelectionAdapter: function (adapter) {\r\n this.selectionAdapter = adapter ?? this.defaultSelectionAdapter\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @returns {Function}\r\n */\r\n getSelectionAdapter: function () {\r\n return this.selectionAdapter\r\n },\r\n\r\n /**\r\n *\r\n * Returns true if the figure part of the current canvas selection.\r\n *\r\n * @since 5.5.6\r\n *\r\n * @returns {Boolean}\r\n */\r\n isSelected: function () {\r\n return this.canvas?.getSelection().contains(this)\r\n },\r\n\r\n /**\r\n *\r\n * Allows a user to attach (or remove) data to an element, without needing to create a custom figure or shape.\r\n * The data must be a valid JSON object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * userData: object\r\n * });\r\n *\r\n * @since 2.7.2\r\n * @param {Object} object\r\n */\r\n setUserData: function (object) {\r\n this.userData = object\r\n this.fireEvent(\"change:userData\", {value: object})\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns any user data set previously on the given figure by setUserData.\r\n *\r\n * @since 2.7.2\r\n * @returns {Object}\r\n */\r\n getUserData: function () {\r\n return this.userData\r\n },\r\n\r\n /**\r\n *\r\n * Return the UUID of this element.\r\n *\r\n * @returns {String}\r\n */\r\n getId: function () {\r\n return this.id\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the id of this element.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * id: newId\r\n * });\r\n *\r\n * @param {String} newId the new id for this figure\r\n */\r\n setId: function (newId) {\r\n this.id = newId\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the css styling class name of the element.\r\n *\r\n *\r\n * @returns {String}\r\n */\r\n getCssClass: function () {\r\n return this.cssClass\r\n },\r\n\r\n /**\r\n *\r\n * Set the css class of the node.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * \"cssClass\": \"red_border_figure\"\r\n * });\r\n *\r\n * @param {String} cssClass the new css class name of the node\r\n * @since 2.9.0\r\n */\r\n setCssClass: function (cssClass) {\r\n this.cssClass = cssClass === null ? null : cssClass.trim()\r\n\r\n if (this.shape === null) {\r\n return this\r\n }\r\n\r\n if (this.cssClass === null) {\r\n this.shape.node.removeAttribute(\"class\")\r\n } else {\r\n this.shape.node.setAttribute(\"class\", this.cssClass)\r\n }\r\n this.fireEvent(\"change:cssClass\", {value: this.cssClass})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The method will return true if the class is assigned to the element, even if other classes also are.\r\n *\r\n * @param {String} className the class name to check\r\n * @since 2.9.0\r\n */\r\n hasCssClass: function (className) {\r\n if (this.cssClass === null) {\r\n return false\r\n }\r\n\r\n return new RegExp(' ' + className.trim() + ' ').test(' ' + this.cssClass + ' ')\r\n },\r\n\r\n /**\r\n *\r\n * Add a CSS class to the figure.<br>\r\n * It's important to note that this method does not replace a class. It simply adds the class,\r\n * appending it to any which may already be assigned to the elements.\r\n *\r\n * @param {String} className\r\n * @since 2.9.0\r\n */\r\n addCssClass: function (className) {\r\n className = className.trim()\r\n if (!this.hasCssClass(className)) {\r\n if (this.cssClass === null) {\r\n this.setCssClass(className)\r\n } else {\r\n this.setCssClass(this.cssClass + ' ' + className)\r\n }\r\n this.fireEvent(\"change:cssClass\", {value: this.cssClass})\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Remove the given css class name from the figure\r\n *\r\n * @param {String} className the css class name to add\r\n */\r\n removeCssClass: function (className) {\r\n className = className.trim()\r\n let newClass = ' ' + this.cssClass.replace(/[\\t\\r\\n]/g, ' ') + ' '\r\n if (this.hasCssClass(className)) {\r\n while (newClass.indexOf(' ' + className + ' ') >= 0) {\r\n newClass = newClass.replace(' ' + className + ' ', ' ')\r\n }\r\n this.setCssClass(newClass.replace(/^\\s+|\\s+$/g, ''))\r\n this.fireEvent(\"change:cssClass\", {value: this.cssClass})\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Add or remove the given css class name from the figure\r\n *\r\n * @param {String} className the class name to toggle\r\n */\r\n toggleCssClass: function (className) {\r\n className = className.trim()\r\n let newClass = ' ' + this.cssClass.replace(/[\\t\\r\\n]/g, ' ') + ' '\r\n if (this.hasCssClass(className)) {\r\n while (newClass.indexOf(' ' + className + ' ') >= 0) {\r\n newClass = newClass.replace(' ' + className + ' ', ' ')\r\n }\r\n this.setCssClass(newClass.replace(/^\\s+|\\s+$/g, ''))\r\n } else {\r\n this.setCssClass(this.cssClass + ' ' + className)\r\n }\r\n this.fireEvent(\"change:cssClass\", {value: this.cssClass})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set the canvas element of this figures. This can be used to determine whenever an element\r\n * is added or removed to the canvas.\r\n *\r\n * @param {draw2d.Canvas} canvas the new parent of the figure or null\r\n */\r\n setCanvas: function (canvas) {\r\n // remove the shape if we reset the canvas and the element\r\n // was already drawn\r\n if (canvas === null && this.shape !== null) {\r\n if (this.isSelected()) {\r\n this.unselect()\r\n }\r\n this.shape.remove()\r\n this.shape = null\r\n }\r\n\r\n this.canvas = canvas\r\n\r\n if (this.canvas !== null) {\r\n this.getShapeElement()\r\n }\r\n\r\n // reset the attribute cache. We must start by paint all attributes\r\n //\r\n this.lastAppliedAttributes = {}\r\n\r\n\r\n if (canvas === null) {\r\n this.stopTimer()\r\n } else {\r\n if (this.timerInterval >= this.MIN_TIMER_INTERVAL) {\r\n this.startTimer(this.timerInterval)\r\n }\r\n }\r\n\r\n this.children.each( (i, e) => { e.figure.setCanvas(canvas)})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the current assigned canvas container.\r\n *\r\n * @returns {draw2d.Canvas}\r\n */\r\n getCanvas: function () {\r\n return this.canvas\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Start a timer which calls the onTimer method in the given interval.\r\n *\r\n * @param {Number} milliSeconds\r\n */\r\n startTimer: function (milliSeconds) {\r\n this.stopTimer()\r\n this.timerInterval = Math.max(this.MIN_TIMER_INTERVAL, milliSeconds)\r\n\r\n if (this.canvas !== null) {\r\n this.timerId = window.setInterval(() => {\r\n this.onTimer()\r\n this.fireEvent(\"timer\")\r\n }, this.timerInterval)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Stop the internal timer.\r\n *\r\n */\r\n stopTimer: function () {\r\n if (this.timerId >= 0) {\r\n window.clearInterval(this.timerId)\r\n this.timerId = -1\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Callback method for the internal timer handling<br>\r\n * Inherit classes must override this method if they want use the timer feature.\r\n *\r\n * // Alternatively you can register for this event with\r\n * figure.on(\"timer\", function(emitter){\r\n * alert(\"timer fired\");\r\n * });\r\n *\r\n * @template\r\n */\r\n onTimer: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. Additional\r\n * the internal model changed as well.\r\n *\r\n * Optional: Inserts current object in front of the given one.\r\n *\r\n * @param {draw2d.Figure} [figure] move current object in front of the given one.\r\n * @since 3.0.0\r\n */\r\n toFront: function (figure) {\r\n // ensure that the z-oder is still correct if the figure is assigned\r\n // to a StrongComposite\r\n //\r\n if (this.composite instanceof draw2d.shape.composite.StrongComposite && (typeof figure !== \"undefined\")) {\r\n let indexFigure = figure.getZOrder()\r\n let indexComposite = this.composite.getZOrder()\r\n if (indexFigure < indexComposite) {\r\n figure = this.composite\r\n }\r\n }\r\n\r\n if (typeof figure === \"undefined\") {\r\n this.getShapeElement().toFront()\r\n\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n figures.add(this)\r\n } else if (lines.remove(this) !== null) {\r\n lines.add(this)\r\n }\r\n }\r\n } else {\r\n this.getShapeElement().insertAfter(figure.getTopLevelShapeElement())\r\n\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n let index = figures.indexOf(figure)\r\n figures.insertElementAt(this, index + 1)\r\n } else if (lines.remove(this) !== null) {\r\n lines.add(this)\r\n }\r\n }\r\n }\r\n\r\n // bring all children in front of the parent\r\n this.children.each( (i, child) =>child.figure.toFront(this))\r\n\r\n // and last but not least, the ResizeHandles if any present\r\n //\r\n this.selectionHandles.each( (i, handle) => handle.toFront())\r\n\r\n this.cachedZOrder = -1\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Moves the element to the background. Additional\r\n * the internal model changed as well.\r\n *\r\n * @since 4.7.2\r\n */\r\n toBack: function (figure) {\r\n // it is not allowed that a figure is behind an assigned composite\r\n //\r\n if (this.composite instanceof draw2d.shape.composite.StrongComposite) {\r\n this.toFront(this.composite)\r\n return\r\n }\r\n\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n figures.insertElementAt(this, 0)\r\n } else if (lines.remove(this) !== null) {\r\n lines.insertElementAt(this, 0)\r\n }\r\n if (typeof figure !== \"undefined\") {\r\n this.getShapeElement().insertBefore(figure.getShapeElement())\r\n } else {\r\n this.getShapeElement().toBack()\r\n }\r\n }\r\n\r\n // Bring all children in front of \"this\" figure\r\n //\r\n this.children.each((i, child) => {\r\n child.figure.toFront(this)\r\n }, true)\r\n\r\n this.cachedZOrder = -1\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Install a new edit policy to the figure. Each editpolicy is able to focus on a single editing\r\n * task or group of related tasks. This also allows editing behavior to be selectively reused across\r\n * different figure implementations. Also, behavior can change dynamically, such as when the layouts\r\n * or routing methods change.\r\n *\r\n * Example for limited DragDrop behavior can be a draw2d.layout.constraint.RegionConstriantPolicy.\r\n *\r\n * @param {draw2d.policy.EditPolicy} policy\r\n */\r\n installEditPolicy: function (policy) {\r\n // it is only possible to install one SelectionFeedbackPolicy at once\r\n //\r\n if (policy instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n this.editPolicy.grep((p) => {\r\n let stay = !(p instanceof draw2d.policy.figure.SelectionFeedbackPolicy)\r\n if (!stay) {\r\n p.onUninstall(this)\r\n }\r\n return stay\r\n })\r\n }\r\n\r\n // It is only allowed to install a policy of the same type once\r\n //\r\n this.editPolicy.grep((p) => {\r\n let stay = p.__proto__ !== policy.__proto__\r\n if (!stay) {\r\n p.onUninstall(this)\r\n }\r\n return stay\r\n })\r\n\r\n\r\n policy.onInstall(this)\r\n this.editPolicy.add(policy)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * UnInstall the edit policy from the figure. Either the instance itself if found\r\n * or all kind of the given edit policies.\r\n *\r\n *\r\n * @param {draw2d.policy.EditPolicy} policy\r\n * @since 4.81\r\n */\r\n uninstallEditPolicy: function (policy) {\r\n let removedPolicy = this.editPolicy.remove(policy)\r\n\r\n // we found the policy and we are happy\r\n //\r\n if (removedPolicy !== null) {\r\n removedPolicy.onUninstall(this)\r\n return\r\n }\r\n\r\n // The policy isn't part of the figure. In this case we \"think\" the user want\r\n // deinstall all instances of the policy\r\n //\r\n let name = (typeof policy === \"string\") ? policy : policy.NAME\r\n this.editPolicy.grep((p) =>{\r\n if (p.NAME === name) {\r\n p.onUninstall(this)\r\n return false\r\n }\r\n return true\r\n })\r\n },\r\n\r\n /**\r\n * Add a child figure to the figure. The hands over figure doesn't support drag&drop\r\n * operations. It's only a decorator for the connection.<br>\r\n * Mainly for labels or other decorations\r\n *\r\n *\r\n * let start = new draw2d.shape.node.Start({x:80, y:150});\r\n * start.add(new draw2d.shape.basic.Label({text:\"Test Label\"}), new draw2d.layout.locator.TopLocator());\r\n *\r\n * canvas.add( start);\r\n *\r\n *\r\n * @param {draw2d.Figure} child the figure to add as decoration to the connection.\r\n * @param {draw2d.layout.locator.Locator} locator the locator for the child.\r\n * @param {Number} [index] optional index where to insert the figure\r\n * @returns {this}\r\n **/\r\n add: function (child, locator, index) {\r\n if (typeof locator === \"undefined\" || locator === null) {\r\n throw \"Second parameter 'locator' is required for method 'Figure#add'\"\r\n }\r\n\r\n // the child is now a slave of the parent\r\n //\r\n child.setParent(this)\r\n\r\n // inform the locator that a new child is bounded to the parent\r\n // The call must happen after parent assignment. Reason: the locator\r\n // can override some behaviours which are propagated from the parent.\r\n //\r\n locator.bind(this, child)\r\n\r\n child.on(\"resize\", this.relocateChildrenEventCallback)\r\n\r\n if (!isNaN(parseInt(index))) {\r\n this.children.insertElementAt({figure: child, locator: locator}, index)\r\n } else {\r\n this.children.add({figure: child, locator: locator})\r\n }\r\n\r\n if (this.canvas !== null) {\r\n child.setCanvas(this.canvas)\r\n }\r\n\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Remove the child figure from this figure and the canvas\r\n *\r\n * @param {draw2d.Figure} child the figure to remove.\r\n *\r\n * @returns {Object} the removed tupple of figure/locator or null if the child isn't found\r\n * @returns {draw2d.Figure} return.figure The removed figure\r\n * @returns {draw2d.shape.layout.Layout} return.locator The used locator of the figure\r\n *\r\n * @since 5.0.0\r\n **/\r\n remove: function (child) {\r\n if (typeof child === \"undefined\" || child === null) {\r\n debug.warn(\"The parameter child is required for Figure.remove\")\r\n return null\r\n }\r\n\r\n let removed = null\r\n this.children.grep(function (e) {\r\n let stay = e.figure !== child\r\n if (!stay) {\r\n removed = e\r\n }\r\n return stay\r\n })\r\n\r\n if (removed !== null) {\r\n child.setParent(null)\r\n child.setCanvas(null)\r\n removed.locator.unbind(this, child)\r\n child.off(this.relocateChildrenEventCallback)\r\n\r\n this.repaint()\r\n return removed\r\n }\r\n\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Return all children/decorations of this shape which has been added with\r\n * draw2d.Figure.add\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getChildren: function () {\r\n return this.children.clone().map( e => e.figure)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Remove all children/decorations of this shape\r\n *\r\n */\r\n resetChildren: function () {\r\n this.children.each((i, e) => { e.figure.setCanvas(null)})\r\n this.children = new draw2d.util.ArrayList()\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * return the current SVG shape element or create it on demand.\r\n *\r\n * @protected\r\n */\r\n getShapeElement: function () {\r\n if (this.shape !== null) {\r\n return this.shape\r\n }\r\n\r\n this.shape = this.createShapeElement()\r\n if (!this.isVisible()) {\r\n this.shape.hide()\r\n }\r\n\r\n // add CSS class to enable styling of the element with CSS rules/files\r\n //\r\n if (this.cssClass !== null) {\r\n this.shape.node.setAttribute(\"class\", this.cssClass)\r\n }\r\n\r\n return this.shape\r\n },\r\n\r\n /**\r\n *\r\n * Get the top level shape element. May the figure has a set of SVG elements. In this case this\r\n * method must return the top level node.<br>\r\n * This method is used for the toFront/toBack method to order the nodes in the correct way.\r\n *\r\n * @since 5.0.0\r\n * @private\r\n */\r\n getTopLevelShapeElement: function () {\r\n return this.getShapeElement()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Inherited classes must override this method to implement it's own draw functionality.\r\n *\r\n * @template\r\n * @abstract\r\n */\r\n createShapeElement: function () {\r\n throw \"Inherited class [\" + this.NAME + \"] must override the abstract method createShapeElement\"\r\n },\r\n\r\n\r\n /**\r\n *\r\n * propagate all attributes like color, stroke,... to the shape element\r\n *\r\n * @param {Object} [attributes] the style attributes for the SVG shape\r\n * @private\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n attributes ??= {}\r\n\r\n if (this.visible === true) {\r\n if (this.shape.isVisible() === false) {\r\n if (!isNaN(parseFloat(attributes.visibleDuration))) {\r\n $(this.shape.node).fadeIn(attributes.visibleDuration, () => this.shape.show())\r\n } else {\r\n this.shape.show()\r\n }\r\n }\r\n } else {\r\n if (this.shape.isVisible() === true) {\r\n if (!isNaN(parseFloat(attributes.visibleDuration))) {\r\n $(this.shape.node).fadeOut(attributes.visibleDuration, () => this.shape.hide())\r\n } else {\r\n this.shape.hide()\r\n }\r\n }\r\n return this\r\n }\r\n\r\n // enrich with common properties\r\n attributes.opacity = this.alpha\r\n\r\n // performance improvement\r\n // Only apply attributes which has changed. This ends in a big performance improvement\r\n // because the raphael shape isn't redraw at all.\r\n //\r\n attributes = jsonUtil.flatDiff(attributes, this.lastAppliedAttributes)\r\n\r\n if (Object.getOwnPropertyNames(attributes).length > 0) {\r\n this.shape.attr(attributes)\r\n }\r\n this.lastAppliedAttributes = attributes\r\n\r\n\r\n this.applyTransformation()\r\n\r\n // Relocate all children of the figure if the dimension or location of the\r\n // shape has changed\r\n //\r\n if(\"x\" in attributes || \"width\" in attributes || \"cx\" in attributes || \"path\" in attributes) {\r\n this.children.each((i, e) => { e.locator.relocate(i, e.figure) })\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * apply a transformation to the shape like rotation, translate,..\r\n *\r\n * @private\r\n * @template\r\n */\r\n applyTransformation: function () {\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Highlight the element or remove the highlighting\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * glow: flag\r\n * });\r\n *\r\n * @param {Boolean} flag indicates glow/noGlow\r\n * @template\r\n */\r\n setGlow: function (flag) {\r\n // do nothing in the base class.\r\n // Subclasses must implement this method.\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Allow dragging only when the cursor is over a specific part of the figure.\r\n * <br>\r\n * Override this method to specify the bounding box of an element or a draw2d.util.ArrayList\r\n * of draw2d.geo.Rectangle of bounding boxes used to drag the figure. The returned coordinates\r\n * are absolute coordinates to the canvas.\r\n * <br>\r\n * <br>\r\n * Default implementation returns <b>null</b> to indicate to use the complete figures as\r\n * drag handle.\r\n *\r\n * @since 5.6.0\r\n * @returns {draw2d.geo.Rectangle|draw2d.util.ArrayList}\r\n */\r\n getHandleBBox: function () {\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Called if the drag and drop action begins. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true if the figure accepts dragging\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n this.isInDragDrop = false\r\n\r\n // Check whenever the figures has a drag-handle. Allow drag&drop\r\n // operation only if the x/y is inside this area.\r\n //\r\n // @since 5.6.0\r\n let bbox = this.getHandleBBox()\r\n if (bbox !== null && bbox.translate(this.getAbsolutePosition().scale(-1)).hitTest(x, y) === false) {\r\n // design failure: we must catch the figure below the mouse to forward\r\n // the panning event to this figure. Special handling to provide sliders\r\n // and other UI elements which requires the panning event. Hack.\r\n this.panningDelegate = this.getBestChild(this.getX() + x, this.getY() + y)\r\n if (this.panningDelegate !== null) {\r\n // transform x/y relative to the panning figure and request the dragStart event\r\n this.panningDelegate.onDragStart(x - this.panningDelegate.x, y - this.panningDelegate.y, shiftKey, ctrlKey)\r\n }\r\n return false\r\n }\r\n\r\n\r\n this.command = this.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE))\r\n\r\n if (this.command !== null) {\r\n this.ox = this.getX()\r\n this.oy = this.getY()\r\n this.isInDragDrop = true\r\n\r\n // notify all installed policies\r\n //\r\n let _this = this\r\n let canStartDrag = true\r\n\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n canStartDrag = canStartDrag && e.onDragStart(_this.canvas, _this, x, y, shiftKey, ctrlKey)\r\n }\r\n })\r\n\r\n if (canStartDrag) {\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragstart\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n }\r\n return canStartDrag\r\n }\r\n\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Don't call them manually. This will be done by the framework.<br>\r\n * Will be called if the object are moved via drag and drop.\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call\r\n * the super implementation via <code>this._super(dx, dy, dx2, dy2);</code>\r\n *\r\n * @private\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n // apply all EditPolicy for DragDrop Operations. This is something like\r\n // an policy that forces that an object can only move vertical, horizontal or in a given\r\n // rectangle.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n let newPos = e.adjustPosition(this, this.ox + dx, this.oy + dy)\r\n if (newPos) {\r\n dx = newPos.x - this.ox\r\n dy = newPos.y - this.oy\r\n }\r\n }\r\n })\r\n let newPos = new draw2d.geo.Point(this.ox + dx, this.oy + dy)\r\n\r\n // Adjust the new location if the object can snap to a helper\r\n // like grid, geometry, ruler,...\r\n //\r\n if (this.getCanSnapToHelper()) {\r\n newPos = this.getCanvas().snapToHelper(this, newPos)\r\n }\r\n\r\n\r\n this.setPosition(newPos)\r\n\r\n // notify all installed policies that the object has moved.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.onDrag(this.canvas, this)\r\n }\r\n })\r\n\r\n\r\n // notify all installed listener that th object has moved\r\n // @since 5.3.3\r\n this.fireEvent(\"drag\", {dx: dx, dy: dy, dx2: dx2, dy2: dy2, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the figure returns false for the drag operation. In this\r\n * case we send a \"panning\" event - mouseDown + mouseMove. This is very useful for\r\n * UI-Widget like slider, spinner,...\r\n *\r\n * // You can alternatively register an event handler with:\r\n * figure.on(\"panning\", function(emitter, eventData){\r\n * alert(\"panning of the figure called\");\r\n * });\r\n *\r\n * @param {Number} dx the x difference between the mouse down operation and now\r\n * @param {Number} dy the y difference between the mouse down operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onPanning: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the panning event of the figures ends. This happens\r\n * after the mous up event if the panning is active.\r\n *\r\n * // You can alternatively register an event handler with:\r\n * figure.on(\"panningEnd\", function(emitter){\r\n * alert(\"panning of the figure called\");\r\n * });\r\n *\r\n */\r\n onPanningEnd: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Will be called after a drag and drop action.<br>\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call\r\n * the super implementation via <code>this._super();</code>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n **/\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n // Element ist zwar schon an seine Position, das Command muss aber trotzdem\r\n // in dem CommandStack gelegt werden damit das Undo funktioniert.\r\n //\r\n if (this.command !== null) {\r\n this.command.setPosition(this.x, this.y)\r\n this.canvas.getCommandStack().execute(this.command)\r\n this.command = null\r\n }\r\n this.isInDragDrop = false\r\n this.panningDelegate = null\r\n\r\n // notify all installed policies\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.onDragEnd(this.canvas, this, x, y, shiftKey, ctrlKey)\r\n }\r\n })\r\n\r\n this.fireEvent(\"move\", { x: this.getX(), y: this.getY(), dx: 0, dy: 0})\r\n this.fireEvent(\"change:x\", { x: this.getX(), dx: 0})\r\n this.fireEvent(\"change:y\", { y: this.getY(), dy: 0})\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragend\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework during drag&drop operations if the user drag a figure over this figure\r\n *\r\n * @param {draw2d.Figure} draggedFigure The figure which is currently dragging\r\n *\r\n * @returns {draw2d.Figure} the figure which should receive the drop event or null if the element didn't want a drop event\r\n * @since 6.1.0\r\n * @private\r\n **/\r\n delegateTarget: function (draggedFigure) {\r\n\r\n let delegate = draggedFigure\r\n this.getCanvas().getDropInterceptorPolicies().each((i, policy) => {\r\n delegate = policy.delegateTarget(draggedFigure, this)\r\n if (delegate !== null) {\r\n return false // break the loop\r\n }\r\n })\r\n\r\n return delegate\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework during drag&drop operations if the user drag a figure over this figure\r\n *\r\n * @param {draw2d.Figure} draggedFigure The figure which is currently dragging\r\n *\r\n * @template\r\n **/\r\n onDragEnter: function (draggedFigure) {\r\n },\r\n\r\n /**\r\n *\r\n * Called if the DragDrop object leaving the current hover figure.\r\n *\r\n * @param {draw2d.Figure} draggedFigure The figure which is currently dragging\r\n * @template\r\n **/\r\n onDragLeave: function (draggedFigure) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the user drop this element onto the dropTarget. This event is ONLY fired if the\r\n * shape return \"this\" in the {@link draw2d.Figure#onDragEnter} method.\r\n *\r\n *\r\n * @param {draw2d.Figure} dropTarget The drop target.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n **/\r\n onDrop: function (dropTarget, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n * Called if the user dropped an figure onto this element. This event is ONLY fired if the\r\n * in the canvas installed {@link draw2d.policy.canvas.DropInterceptorPolicy} allow this.\r\n *\r\n *\r\n * @param {draw2d.Figure} droppedFigure The dropped figure.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n * @since 4.8.0\r\n **/\r\n onCatch: function (droppedFigure, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method for the mouse enter event. Usefull for mouse hover-effects.\r\n * Override this method for your own effects. Don't call them manually.\r\n *\r\n * @template\r\n **/\r\n onMouseEnter: function () {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method for the mouse leave event. Useful for mouse hover-effects.\r\n *\r\n * @template\r\n **/\r\n onMouseLeave: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Called when a user dbl clicks on the element\r\n *\r\n * // Alternatively you can register an event with:\r\n * //\r\n * figure.on(\"dblclick\", function(emitter, event){\r\n * alert(\"user dbl click on the figure\");\r\n * });\r\n *\r\n * @template\r\n */\r\n onDoubleClick: function () {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called when a user clicks on the element.\r\n *\r\n * // You can alternatively register an event handler with:\r\n * figure.on(\"click\", function(emitter, event){\r\n * alert(\"user click on the figure\");\r\n * });\r\n *\r\n * @template\r\n * @deprecated\r\n */\r\n onClick: function () {\r\n },\r\n\r\n /**\r\n *\r\n * called by the framework if the figure should show the context menu.<br>\r\n * The strategy to show the context menu depends on the platform. Either looong press or\r\n * right click with the mouse.\r\n *\r\n * // Alternatively you register for this event with:\r\n * figure.on(\"contextmenu\", function(emitter, event){\r\n * alert(\"user press the right mouse button for a context menu\");\r\n * });\r\n *\r\n * @param {Number} x the x-coordinate to show the menu\r\n * @param {Number} y the y-coordinate to show the menu\r\n * @since 1.1.0\r\n * @template\r\n */\r\n onContextMenu: function (x, y) {\r\n },\r\n\r\n /**\r\n *\r\n * Set the alpha blending of this figure.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * \"alpha\": percent\r\n * });\r\n *\r\n * // ...or:\r\n * figure.attr({\r\n * \"opacity\": percent\r\n * });\r\n *\r\n * @param {Number} percent value between [0..1].\r\n **/\r\n setAlpha: function (percent) {\r\n percent = Math.min(1, Math.max(0, parseFloat(percent)))\r\n if (percent === this.alpha) {\r\n return\r\n }\r\n\r\n this.alpha = percent\r\n this.repaint()\r\n this.fireEvent(\"change:opacity\", {value: this.alpha})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the alpha blending of the figure\r\n *\r\n * @returns {Number} the current alpha blending\r\n */\r\n getAlpha: function () {\r\n return this.alpha\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the rotation angle in degree [0..356]<br>\r\n * <b>Only steps of 90 degree is working well</b>\r\n * <br>\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * angle: angle\r\n * });\r\n *\r\n * @param {Number} angle the rotation angle in degree\r\n */\r\n setRotationAngle: function (angle) {\r\n this.rotationAngle = angle\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"change:angle\", {value: this.rotationAngle})\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * return the rotation angle of the figure in degree of [0..356].\r\n *\r\n * <br>\r\n * <b>NOTE: this method is pre alpha and not for production. Only steps of 90 degree is working well</b>\r\n * <br>\r\n * @returns {Number}\r\n */\r\n getRotationAngle: function () {\r\n return this.rotationAngle\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Show/hide the element. The element didn't receive any mouse events (click, dblclick) if you hide the\r\n * figure.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * visible: flag\r\n * });\r\n *\r\n * @param {Boolean} flag\r\n * @param {Number} [duration] the optional number for the fadeIn /fadeOut of the figure\r\n * @since 1.1.0\r\n */\r\n setVisible: function (flag, duration) {\r\n flag = !!flag\r\n if (flag === this.visible) {\r\n return\r\n }\r\n this.visible = flag\r\n\r\n this.repaint({visibleDuration: duration})\r\n\r\n this.fireEvent(this.visible?\"show\":\"hide\")\r\n this.fireEvent(\"change:visibility\", {value: this.visible})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return true if the figure visible.\r\n *\r\n * @returns {Boolean}\r\n * @since 1.1.0\r\n */\r\n isVisible: function () {\r\n return this.visible && this.shape !== null\r\n },\r\n\r\n /**\r\n *\r\n * Guarantee, that the figure width/height will not be distorted. Applicable before calling setDimension().\r\n * It is false by default.\r\n *\r\n * @since 4.1.0\r\n * @param {Boolean} flag boolean flag if the figure should respect the aspect ratio\r\n */\r\n setKeepAspectRatio: function (flag) {\r\n this.keepAspectRatio = flag\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the flag if the shape keep the aspect ratio.\r\n *\r\n * @since 4.1.0\r\n */\r\n getKeepAspectRatio: function () {\r\n return this.keepAspectRatio\r\n },\r\n\r\n /**\r\n *\r\n * Return the current z-index of the element. Currently this is an expensive method. The index will be calculated\r\n * all the time. Caching is not implemented at the moment.\r\n *\r\n * @returns {Number}\r\n */\r\n getZOrder: function () {\r\n let child = this.shape?.node\r\n if(!child || this.cachedZOrder>=0){\r\n return this.cachedZOrder\r\n }\r\n this.cachedZOrder = Array.from(child.parentNode.children).indexOf(child)\r\n \r\n return this.cachedZOrder\r\n },\r\n\r\n /**\r\n *\r\n * Set the flag if this object can snap to grid or geometry.\r\n * A window of dialog should set this flag to false.\r\n *\r\n * @param {Boolean} flag The snap to grid/geometry enable flag.\r\n *\r\n **/\r\n setCanSnapToHelper: function (flag) {\r\n this.canSnapToHelper = !!flag\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns true if the figure can snap to any helper like a grid, guide, geometrie\r\n * or something else.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n getCanSnapToHelper: function () {\r\n return this.canSnapToHelper\r\n },\r\n\r\n /**\r\n *\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n getSnapToGridAnchor: function () {\r\n return this.snapToGridAnchor\r\n },\r\n\r\n /**\r\n *\r\n * Set the hot spot for all snapTo### operations.\r\n *\r\n * @param {draw2d.geo.Point} point\r\n **/\r\n setSnapToGridAnchor: function (point) {\r\n this.snapToGridAnchor = point\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set the width of the figure and consider the minWidth attribute\r\n *\r\n * @param {Number} width the new width of the figure\r\n * @since 5.1.0\r\n */\r\n setWidth: function (width) {\r\n this.setDimension(parseFloat(width), this.getHeight())\r\n this.fireEvent(\"change:width\", {value: this.width})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The current width of the figure.\r\n *\r\n * @type {Number}\r\n **/\r\n getWidth: function () {\r\n return this.width\r\n },\r\n\r\n /**\r\n *\r\n * Set the heigth of the figure and consider the minWidth attribute\r\n *\r\n * @param {Number} height the new height of the figure\r\n * @since 5.1.0\r\n */\r\n setHeight: function (height) {\r\n this.setDimension(this.getWidth(), parseFloat(height))\r\n this.fireEvent(\"change:height\", {value: this.height})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The current height of the figure.\r\n *\r\n * @returns {Number}\r\n **/\r\n getHeight: function () {\r\n return this.height\r\n },\r\n\r\n\r\n /**\r\n *\r\n * This value is relevant for the interactive resize of the figure.\r\n *\r\n * @returns {Number} Returns the min. width of this object.\r\n */\r\n getMinWidth: function () {\r\n return this.minWidth\r\n },\r\n\r\n /**\r\n *\r\n * Set the minimum width of this figure\r\n *\r\n * @param {Number} w\r\n */\r\n setMinWidth: function (w) {\r\n this.minWidth = parseFloat(w)\r\n this.fireEvent(\"change:minWidth\", {value: this.minWidth})\r\n\r\n // fit the width with the new constraint\r\n this.setWidth(this.getWidth())\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * This value is relevant for the interactive resize of the figure.\r\n *\r\n * @returns {Number} Returns the min. height of this object.\r\n */\r\n getMinHeight: function () {\r\n return this.minHeight\r\n },\r\n\r\n /**\r\n *\r\n * Set the minimum height of the figure.\r\n *\r\n * @param {Number} h\r\n */\r\n setMinHeight: function (h) {\r\n this.minHeight = parseFloat(h)\r\n this.fireEvent(\"change:minHeight\", {value: this.minHeight})\r\n\r\n // fit the height with the new constraint\r\n this.setHeight(this.getHeight())\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * the the x-offset related to the parent figure or canvas\r\n *\r\n * @param {Number} x the new x offset of the figure\r\n * @since 5.0.8\r\n */\r\n setX: function (x) {\r\n this.setPosition(parseFloat(x), this.y)\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The x-offset related to the parent figure or canvas.\r\n *\r\n * @returns {Number} the x-offset to the parent figure\r\n **/\r\n getX: function () {\r\n return this.x\r\n },\r\n\r\n /**\r\n *\r\n * the the y-offset related to the parent figure or canvas\r\n *\r\n * @param {Number} y the new x offset of the figure\r\n * @since 5.0.8\r\n */\r\n setY: function (y) {\r\n this.setPosition(this.x, parseFloat(y))\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The y-offset related to the parent figure or canvas.\r\n *\r\n * @returns {Number} The y-offset to the parent figure.\r\n **/\r\n getY: function () {\r\n return this.y\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The x-offset related to the canvas.\r\n *\r\n * @returns {Number} the x-offset to the canvas\r\n **/\r\n getAbsoluteX: function () {\r\n if (!this.parent) {\r\n return this.getX()\r\n }\r\n\r\n return this.getX() + this.parent.getAbsoluteX()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The y-offset related to the canvas.\r\n *\r\n * @returns {Number} The y-offset to the canvas.\r\n **/\r\n getAbsoluteY: function () {\r\n if (!this.parent) {\r\n return this.getY()\r\n }\r\n return this.getY() + this.parent.getAbsoluteY()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the absolute y-position of the port.\r\n *\r\n * @type {draw2d.geo.Point}\r\n **/\r\n getAbsolutePosition: function () {\r\n return new draw2d.geo.Point(this.getAbsoluteX(), this.getAbsoluteY())\r\n },\r\n\r\n /**\r\n *\r\n * Returns the absolute y-position of the port.\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n **/\r\n getAbsoluteBounds: function () {\r\n return new draw2d.geo.Rectangle(this.getAbsoluteX(), this.getAbsoluteY(), this.getWidth(), this.getHeight())\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the position of the object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * x: x,\r\n * y: y\r\n * });\r\n *\r\n * @param {Number|draw2d.geo.Point} x The new x coordinate of the figure or the x/y coordinate if it is an draw2d.geo.Point\r\n * @param {Number} [y] The new y coordinate of the figure\r\n **/\r\n setPosition: function (x, y) {\r\n if (typeof x === \"undefined\") {\r\n debugger\r\n }\r\n\r\n let oldPos = {x: this.x, y: this.y}\r\n\r\n if (x instanceof draw2d.geo.Point) {\r\n this.x = x.x\r\n this.y = x.y\r\n } else {\r\n this.x = x\r\n this.y = y\r\n }\r\n\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n let newPos = e.adjustPosition(this, this.x, this.y)\r\n this.x = newPos.x\r\n this.y = newPos.y\r\n }\r\n })\r\n\r\n this.repaint()\r\n\r\n\r\n // Update the resize handles if the user change the position of the\r\n // element via an API call.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n\r\n let event = {\r\n x: this.x,\r\n y: this.y,\r\n dx: this.x - oldPos.x,\r\n dy: this.y - oldPos.y\r\n }\r\n this.fireEvent(\"move\", event)\r\n this.fireEvent(\"change:x\", event)\r\n this.fireEvent(\"change:y\", event)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Get the current position of the figure\r\n *\r\n * @returns {draw2d.geo.Point}\r\n * @since 2.0.0\r\n */\r\n getPosition: function () {\r\n return new draw2d.geo.Point(this.getX(), this.getY())\r\n },\r\n\r\n /**\r\n *\r\n * Translate the figure with the given x/y offset.\r\n *\r\n * @param {Number} dx The x offset to translate\r\n * @param {Number} dy The y offset to translate\r\n **/\r\n translate: function (dx, dy) {\r\n this.setPosition(this.getX() + dx, this.getY() + dy)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the new width and height of the figure.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * width: w,\r\n * height: h\r\n * });\r\n *\r\n * @param {Number} w The new width of the figure\r\n * @param {Number} h The new height of the figure\r\n **/\r\n setDimension: function (w, h) {\r\n let old = {width: this.width, height: this.height}\r\n\r\n w = Math.max(this.getMinWidth(), w)\r\n h = Math.max(this.getMinHeight(), h)\r\n\r\n if (this.width === w && this.height === h) {\r\n // required if an inherit figure changed the w/h to a given constraint.\r\n // In this case the Resize handles must be informed that the shape didn't resized.\r\n // because the minWidth/minHeight did have a higher prio.\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n return this\r\n }\r\n\r\n\r\n // apply all EditPolicy to adjust/modify the new dimension\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n let newDim = e.adjustDimension(this, w, h)\r\n w = newDim.w\r\n h = newDim.h\r\n }\r\n })\r\n\r\n // respect the aspect ratio if required\r\n //\r\n if (this.keepAspectRatio === true) {\r\n if (w >= this.getMinWidth()) {\r\n // scale the height to the given ratio\r\n h = this.getHeight() * (w / this.getWidth())\r\n // and apply the new dimension only if the values are in range of the given constraints\r\n if (h >= this.getMinHeight()) {\r\n this.width = w\r\n this.height = h\r\n }\r\n }\r\n } else {\r\n this.width = Math.max(this.getMinWidth(), w)\r\n this.height = Math.max(this.getMinHeight(), h)\r\n }\r\n\r\n\r\n this.repaint()\r\n\r\n this.fireEvent(\"resize\")\r\n this.fireEvent(\"change:dimension\", { height: this.height, width: this.width, old: old})\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the bounding box of the figure\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * width: w,\r\n * height: h,\r\n * x: x,\r\n * y: y\r\n * });\r\n *\r\n * // or\r\n * figure.attr({\r\n * boundingBox: {x:1, y:100, width:30, height:30}\r\n * });\r\n *\r\n * @param {draw2d.geo.Rectangle} rect\r\n * @since 4.8.0\r\n */\r\n setBoundingBox: function (rect) {\r\n rect = new draw2d.geo.Rectangle(rect)\r\n\r\n let orig = this.repaintBlocked\r\n this.repaintBlocked = true\r\n this.setPosition(rect.x, rect.y)\r\n this.repaintBlocked = orig\r\n this.setDimension(rect.w, rect.h)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns the bounding box of the figure in absolute position to the canvas.\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n **/\r\n getBoundingBox: function () {\r\n return new draw2d.geo.Rectangle(this.getAbsoluteX(), this.getAbsoluteY(), this.getWidth(), this.getHeight())\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the bounding box of the figure in absolute position to the canvas. All child shapes included.\r\n * The result BoundingBox spans the parent figured plus all children.\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n **/\r\n getOuterBoundingBox: function () {\r\n let parentBB = new draw2d.geo.Rectangle(this.getAbsoluteX(), this.getAbsoluteY(), this.getWidth(), this.getHeight())\r\n this.getChildren().each( (i, child)=>{\r\n let childBB = child.getOuterBoundingBox()\r\n parentBB.merge(childBB)\r\n })\r\n return parentBB\r\n },\r\n\r\n /**\r\n *\r\n * Detect whenever the hands over coordinate is inside the figure.\r\n * The default implementation is a simple bounding box test.\r\n *\r\n * @param {Number} iX\r\n * @param {Number} iY\r\n * @param {Number} [corona]\r\n *\r\n * @returns {Boolean}\r\n */\r\n hitTest: function (iX, iY, corona) {\r\n if (typeof corona === \"number\") {\r\n return this.getBoundingBox().scale(corona, corona).hitTest(iX, iY)\r\n }\r\n return this.getBoundingBox().hitTest(iX, iY)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Switch on/off the drag drop behaviour of this object\r\n *\r\n * @param {Boolean} flag The new drag drop indicator\r\n **/\r\n setDraggable: function (flag) {\r\n this.draggable = !!flag\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the Drag drop enable flag\r\n *\r\n * @returns {Boolean} The new drag drop indicator\r\n **/\r\n isDraggable: function () {\r\n // delegate to the composite if given\r\n if (this.composite !== null) {\r\n return this.composite.isMemberDraggable(this, this.draggable)\r\n }\r\n\r\n return this.draggable\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the true if the figure can be resized.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n isResizeable: function () {\r\n return this.resizeable\r\n },\r\n\r\n /**\r\n *\r\n * You can change the resizeable behaviour of this object. Hands over [false] and\r\n * the figure has no resizehandles if you select them with the mouse.<br>\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * resizeable: flag\r\n * });\r\n *\r\n * @param {Boolean} flag The resizeable flag.\r\n **/\r\n setResizeable: function (flag) {\r\n this.resizeable = !!flag\r\n this.fireEvent(\"change:resizeable\", {value: this.resizeable})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Indicates whenever the element is selectable by user interaction or API.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n isSelectable: function () {\r\n // delegate to the composite if given\r\n if (this.composite !== null) {\r\n return this.composite.isMemberSelectable(this, this.selectable)\r\n }\r\n\r\n return this.selectable\r\n },\r\n\r\n\r\n /**\r\n *\r\n * You can change the selectable behavior of this object. Hands over [false] and\r\n * the figure has no selection handles if you try to select them with the mouse.<br>\r\n *\r\n * @param {Boolean} flag The selectable flag.\r\n **/\r\n setSelectable: function (flag) {\r\n this.selectable = !!flag\r\n this.fireEvent(\"change:selectable\", {value: this.selectable})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return true if the object doesn't care about the aspect ratio.\r\n * You can change the height and width independent.<br>\r\n *\r\n * Replaced with \"getKeepAspectRatio\"\r\n * @returns {Boolean}\r\n * @deprecated\r\n */\r\n isStrechable: function () {\r\n return !this.getKeepAspectRatio()\r\n },\r\n\r\n /**\r\n *\r\n * Return false if you avoid that the user can delete your figure.\r\n * Sub class can override this method.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n isDeleteable: function () {\r\n return this.deleteable\r\n },\r\n\r\n /**\r\n *\r\n * Set the flag if the shape is deleteable.\r\n *\r\n * @param {Boolean} flag enable or disable flag for the delete operation\r\n **/\r\n setDeleteable: function (flag) {\r\n this.deleteable = !!flag\r\n this.fireEvent(\"change:deleteable\", {value: this.deleteable})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set the parent of this figure.\r\n * Don't call them manually.\r\n *\r\n * @param {draw2d.Figure} parent The new parent of this figure\r\n * @private\r\n **/\r\n setParent: function (parent) {\r\n this.parent = parent\r\n\r\n if (parent !== null) {\r\n // inherit the selection handling impl from the parent\r\n this.setSelectionAdapter(parent.getSelectionAdapter())\r\n } else {\r\n // use default\r\n this.setSelectionAdapter(null)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the parent of this figure.\r\n *\r\n * @returns {draw2d.Figure}\r\n **/\r\n getParent: function () {\r\n return this.parent\r\n },\r\n\r\n /**\r\n *\r\n * Check to see if a figure is a descendant of another figure.\r\n * <br>\r\n * The contains() method returns true if the figure provided by the argument is a descendant of this figure,\r\n * whether it is a direct child or nested more deeply. Otherwise, it returns false.\r\n *\r\n * @param {draw2d.Figure} containedFigure The figure that may be contained by (a descendant of) this figure.\r\n * @since 5.5.4\r\n */\r\n contains: function (containedFigure) {\r\n if (containedFigure.getParent() === this) {\r\n return true\r\n }\r\n\r\n for (let i = 0, len = this.children.getSize(); i < len; i++) {\r\n let child = this.children.get(i).figure\r\n if (child.contains(containedFigure)) {\r\n return true\r\n }\r\n }\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Get the top most parent of this figure. This can be an layout figure or parent container\r\n *\r\n * @returns {draw2d.Figure}\r\n * @since 5.0.6\r\n **/\r\n getRoot: function () {\r\n let root = this.parent\r\n while (root !== null && root.parent !== null) {\r\n root = root.parent\r\n }\r\n return root\r\n },\r\n\r\n /**\r\n *\r\n * Set the assigned composite of this figure.\r\n *\r\n * @param {draw2d.shape.composite.StrongComposite} composite The assigned composite of this figure\r\n * @since 4.8.0\r\n **/\r\n setComposite: function (composite) {\r\n if (composite !== null && !(composite instanceof draw2d.shape.composite.StrongComposite)) {\r\n throw \"'composite must inherit from 'draw2d.shape.composite.StrongComposite'\"\r\n }\r\n\r\n this.composite = composite\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the assigned composite of this figure.\r\n *\r\n * @returns {draw2d.shape.composite.StrongComposite}\r\n * @since 4.8.0\r\n **/\r\n getComposite: function () {\r\n return this.composite\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Execute all handlers and behaviors attached to the figure for the given event type.\r\n *\r\n *\r\n * @param {String} event the event to trigger\r\n * @param {Object} [args] optional parameters for the triggered event callback\r\n *\r\n * @since 5.0.0\r\n */\r\n fireEvent: function (event, args) {\r\n try {\r\n if (typeof this.eventSubscriptions[event] === 'undefined') {\r\n return\r\n }\r\n\r\n // avoid recursion\r\n if (this._inEvent === true) {\r\n return\r\n }\r\n this._inEvent = true\r\n let subscribers = this.eventSubscriptions[event]\r\n for (let i = 0; i < subscribers.length; i++) {\r\n subscribers[i](this, args)\r\n }\r\n } catch (exc) {\r\n console.log(exc)\r\n throw exc\r\n } finally {\r\n this._inEvent = false\r\n\r\n // fire a generic change event if an attribute has changed\r\n // required for some DataBinding frameworks or for the Backbone.Model compatibility\r\n // the event \"change\" with the corresponding attribute name as additional parameter\r\n if (event.substring(0, 7) === \"change:\") {\r\n this.fireEvent(\"change\", event.substring(7))\r\n }\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Attach an event handler function for one or more events to the figure.\r\n * To remove events bound with .on(), see {@link #off}.\r\n *\r\n * possible events are:<br>\r\n * <ul>\r\n * <li>click</li>\r\n * <li>dblclick</li>\r\n * <li>move</li>\r\n * <li>resize</li>\r\n * <li>timer</li>\r\n * <li>contextmenu</li>\r\n * <li>show</li>\r\n * <li>hide</li>\r\n * <li>added</li>\r\n * <li>removed</li>\r\n * <li>change:[attr]</li>\r\n * </ul>\r\n *\r\n * @param {String} event One or more space-separated event types\r\n * @param {Function} callback A function to execute when the event is triggered.\r\n * @param {draw2d.Figure} callback.emitter the emitter of the event\r\n * @param {Object} [callback.obj] optional event related data\r\n * @param {Object} [context] optional context of the function callback.\r\n * @since 5.0.0\r\n */\r\n on: function (event, callback, context) {\r\n let events = event.split(\" \")\r\n if (typeof callback === \"undefined\") {\r\n debugger\r\n }\r\n // the \"context\" param is add to be compatible with Backbone.Model.\r\n // The project \"backbone.ModelBinder\" requires this signature and we want to be nice.\r\n //\r\n if (context) {\r\n callback = callback.bind(context)\r\n callback.___originalCallback = callback\r\n }\r\n\r\n for (let i = 0; i < events.length; i++) {\r\n if (typeof this.eventSubscriptions[events[i]] === 'undefined') {\r\n this.eventSubscriptions[events[i]] = []\r\n }\r\n // avoid duplicate registration for the same event with the same callback method\r\n if (-1 !== $.inArray(callback, this.eventSubscriptions[events[i]])) {\r\n // debugger\r\n } else {\r\n this.eventSubscriptions[events[i]].push(callback)\r\n }\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The .off() method removes event handlers that were attached with {@link #on}.<br>\r\n * Calling .off() with no arguments removes all handlers attached to the elements.<br>\r\n * <br>\r\n * If a simple event name such as \"move\" is provided, all events of that type are removed from the figure.\r\n *\r\n *\r\n * @param {String|Function} eventOrFunction the event name of the registerd function or the function itself\r\n * @since 5.0.0\r\n */\r\n off: function (eventOrFunction) {\r\n if (typeof eventOrFunction === \"undefined\") {\r\n this.eventSubscriptions = {}\r\n } else if (typeof eventOrFunction === 'string') {\r\n this.eventSubscriptions[eventOrFunction] = []\r\n } else {\r\n for (let event in this.eventSubscriptions) {\r\n this.eventSubscriptions[event] = this.eventSubscriptions[event].filter(callback => {\r\n if (typeof callback.___originalCallback !== \"undefined\") {\r\n return callback.___originalCallback !== eventOrFunction\r\n }\r\n return callback !== eventOrFunction\r\n })\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the best figure at the location [x,y]. It is a simple hit test. Keep in mind that only visible objects\r\n * are returned.\r\n *\r\n * @param {Number} x The x position.\r\n * @param {Number} y The y position.\r\n * @param {draw2d.Figure|Array} [figureToIgnore] The figures which should be ignored.\r\n **/\r\n getBestChild: function (x, y, figureToIgnore) {\r\n if (!Array.isArray(figureToIgnore)) {\r\n if (figureToIgnore instanceof draw2d.Figure) {\r\n figureToIgnore = [figureToIgnore]\r\n } else {\r\n figureToIgnore = []\r\n }\r\n }\r\n\r\n let result = null\r\n\r\n // tool method to check recursive a figure for hitTest\r\n //\r\n let checkRecursive = function (children) {\r\n children.each(function (i, e) {\r\n let c = e.figure\r\n checkRecursive(c.children)\r\n if (result === null && c.isVisible() === true && c.hitTest(x, y) === true && $.inArray(c, figureToIgnore) === -1) {\r\n result = c\r\n }\r\n return result === null // break the each-loop if we found an element\r\n })\r\n }\r\n\r\n checkRecursive(this.children)\r\n\r\n return result\r\n },\r\n\r\n /**\r\n *\r\n * Returns the Command to perform the specified Request or null.\r\n *\r\n * @param {draw2d.command.CommandType} request describes the Command being requested\r\n * @returns {draw2d.command.Command} null or a Command\r\n * @private\r\n **/\r\n createCommand: function (request) {\r\n if (request === null) {\r\n return null\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE) {\r\n if (!this.isDraggable()) {\r\n return null\r\n }\r\n return new draw2d.command.CommandMove(this)\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.DELETE) {\r\n if (!this.isDeleteable()) {\r\n return null\r\n }\r\n return new draw2d.command.CommandDelete(this)\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.RESIZE) {\r\n if (!this.isResizeable()) {\r\n return null\r\n }\r\n return new draw2d.command.CommandResize(this)\r\n }\r\n\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Clone the figure. <br>\r\n * You must override and implement the methods <b>getPersistentAttributes</b> and <b>setPersistentAttributes</b> for your custom\r\n * figures if the have special attributes.\r\n *\r\n * The clone() method performs a deep copy of the object, meaning that it copies the children, ports and decorations\r\n * per default. You can control the clone procedure with the 'cloneMetaData'.\r\n *\r\n *\r\n * @param {Object} [cloneMetaData] controls the clone procedure\r\n * @param {Boolean} [cloneMetaData.excludeChildren] set it to true if you want exclude the children.\r\n *\r\n * @since 4.1.0\r\n * @experimental\r\n */\r\n clone: function (cloneMetaData) {\r\n cloneMetaData = {excludeChildren: false, ...cloneMetaData}\r\n\r\n let clone = Function(`return new ${this.NAME}()`)()\r\n let initialId = clone.id\r\n\r\n clone.setPersistentAttributes(this.getPersistentAttributes())\r\n\r\n clone.id = initialId\r\n\r\n // add all decorations to the memento\r\n //\r\n if (cloneMetaData.excludeChildren === false) {\r\n clone.resetChildren()\r\n this.children.each((i, entry) => {\r\n let child = entry.figure.clone()\r\n // we can ignore the locator if this didn't provide a \"correct\" name, this can happen in some\r\n // Layout shapes like VerticalLayout or Horziontal Layout. This figures injects it own kind\r\n // of layouter...so didn'T care about this.\r\n\r\n let locator = entry.locator.NAME ? Function(`return new ${entry.locator.NAME}()`)() : null\r\n clone.add(child, locator)\r\n })\r\n }\r\n\r\n return clone\r\n },\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @return {Object} all attributes of the figure required for the persistency\r\n */\r\n getPersistentAttributes: function () {\r\n // force deep copy of userData to avoid side effects in the clone method.\r\n //\r\n let memento = {\r\n type: this.NAME,\r\n id: this.id,\r\n x: this.getX(),\r\n y: this.getY(),\r\n width: this.width,\r\n height: this.height,\r\n alpha: this.alpha,\r\n selectable: this.selectable,\r\n draggable: this.draggable,\r\n angle: this.rotationAngle,\r\n userData: extend(true, {}, this.userData)\r\n }\r\n\r\n\r\n if (this.cssClass !== null) {\r\n memento.cssClass = this.cssClass\r\n }\r\n\r\n if (this.composite !== null) {\r\n memento.composite = this.composite.getId()\r\n }\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this.id = memento.id\r\n // in some cases, e.g. a Connection, the x/y attribute is not set.\r\n //\r\n if(memento.x && memento.y){\r\n this.setPosition(parseFloat(memento.x), parseFloat(memento.y))\r\n }\r\n\r\n // width and height are optional parameter for the JSON stuff.\r\n // We use the defaults if the attributes not present\r\n if (typeof memento.width !== \"undefined\") {\r\n this.width = parseFloat(memento.width)\r\n }\r\n\r\n if (typeof memento.height !== \"undefined\") {\r\n this.height = parseFloat(memento.height)\r\n }\r\n\r\n if (typeof memento.userData !== \"undefined\") {\r\n this.userData = memento.userData\r\n }\r\n\r\n if (typeof memento.selectable !== \"undefined\") {\r\n this.selectable = memento.selectable\r\n }\r\n\r\n if (typeof memento.draggable !== \"undefined\") {\r\n this.draggable = memento.draggable\r\n }\r\n\r\n if (typeof memento.cssClass !== \"undefined\") {\r\n this.setCssClass(memento.cssClass)\r\n }\r\n\r\n if (typeof memento.alpha !== \"undefined\") {\r\n this.setAlpha(parseFloat(memento.alpha))\r\n }\r\n\r\n if (typeof memento.angle !== \"undefined\") {\r\n this.rotationAngle = parseFloat(memento.angle)\r\n }\r\n\r\n return this\r\n }\r\n })\r\n\r\n\r\n","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Required for Node.js draw2d model read/write operations.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n */\r\n\r\ndraw2d.HeadlessCanvas = Class.extend(\r\n /** @lends draw2d.HeadlessCanvas.prototype */\r\n\r\n /** @lends draw2d.HeadlessCanvas.prototype */\r\n {\r\n\r\n NAME: \"draw2d.HeadlessCanvas\",\r\n\r\n /**\r\n * Create a new canvas with the given HTML DOM references.\r\n *\r\n * @param {String} canvasId the id of the DOM element to use a parent container\r\n */\r\n init: function()\r\n {\r\n // internal document with all figures, ports, ....\r\n //\r\n this.figures = new draw2d.util.ArrayList();\r\n this.lines = new draw2d.util.ArrayList(); // crap - why are connections not just figures. Design by accident\r\n this.commonPorts = new draw2d.util.ArrayList();\r\n\r\n this.eventSubscriptions = {};\r\n\r\n // The CommandStack for undo/redo operations\r\n //\r\n this.commandStack = new draw2d.command.CommandStack();\r\n },\r\n\r\n /**\r\n * \r\n * Reset the canvas and delete all model elements.<br>\r\n * You can now reload another model to the canvas with a {@link draw2d.io.Reader}\r\n *\r\n * @since 1.1.0\r\n */\r\n clear: function()\r\n {\r\n // internal document with all figures, ports, ....\r\n //\r\n this.figures = new draw2d.util.ArrayList();\r\n this.lines = new draw2d.util.ArrayList();\r\n this.commonPorts = new draw2d.util.ArrayList();\r\n\r\n this.commandStack.markSaveLocation();\r\n\r\n return this;\r\n },\r\n\r\n calculateConnectionIntersection:function()\r\n {\r\n },\r\n\r\n /**\r\n * \r\n * Callback for any kind of image export tools to trigger the canvas to hide all unwanted\r\n * decorations. The method is called e.g. from the draw2d.io.png.Writer\r\n *\r\n * @since 4.0.0\r\n * @template\r\n */\r\n hideDecoration: function()\r\n {\r\n },\r\n\r\n /**\r\n * \r\n * callback method for any image export writer to reactivate the decoration\r\n * of the canvas. e.g. grids, rulers,...\r\n *\r\n *\r\n * @since 4.0.0\r\n * @template\r\n */\r\n showDecoration: function()\r\n {\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Add a figure at the given x/y coordinate. This method fires an event.\r\n *\r\n * Example:\r\n *\r\n * canvas.on(\"figure:add\", function(emitter, event){\r\n * alert(\"figure added:\");\r\n * });\r\n *\r\n * // or more general if you want catch all figure related events\r\n * //\r\n * canvas.on(\"figure\", function(emitter, event){\r\n * // use event.figure.getCanvas()===null to determine if the\r\n * // figure part of the canvas\r\n *\r\n * alert(\"figure added or removed:\");\r\n * });\r\n *\r\n * @param {draw2d.Figure} figure The figure to add.\r\n * @param {Number/draw2d.geo.Point} [x] The new x coordinate of the figure or the x/y coordinate if it is an draw2d.geo.Point\r\n * @param {Number} [y] The y position.\r\n **/\r\n add: function( figure , x, y)\r\n {\r\n if(figure.getCanvas()===this){\r\n return;\r\n }\r\n\r\n if(figure instanceof draw2d.shape.basic.Line){\r\n this.lines.add(figure);\r\n }\r\n else{\r\n this.figures.add(figure);\r\n }\r\n figure.canvas=this;\r\n\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Returns all lines/connections in this workflow/canvas.<br>\r\n *\r\n * @protected\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getLines: function()\r\n {\r\n return this.lines;\r\n },\r\n\r\n /**\r\n * \r\n * Returns the internal figures.<br>\r\n *\r\n * @protected\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getFigures: function()\r\n {\r\n return this.figures;\r\n },\r\n\r\n /**\r\n * \r\n * Returns the line or connection with the given id.\r\n *\r\n * @param {String} id The id of the line.\r\n *\r\n * @returns {draw2d.shape.basic.Line}\r\n **/\r\n getLine: function( id)\r\n {\r\n var count = this.lines.getSize();\r\n for(var i=0; i<count;i++)\r\n {\r\n var line = this.lines.get(i);\r\n if(line.getId()===id){\r\n return line;\r\n }\r\n }\r\n return null;\r\n },\r\n\r\n /**\r\n * \r\n * Returns the figure with the given id.\r\n *\r\n * @param {String} id The id of the figure.\r\n * @returns {draw2d.Figure}\r\n **/\r\n getFigure: function( id)\r\n {\r\n var figure = null;\r\n this.figures.each(function(i,e){\r\n if(e.id===id){\r\n figure=e;\r\n return false;\r\n }\r\n });\r\n return figure;\r\n },\r\n\r\n /**\r\n * \r\n * Register a port to the canvas. This is required for other ports to find a valid drop target.\r\n *\r\n * @param {draw2d.Port} port The new port which has been added to the Canvas.\r\n **/\r\n registerPort: function(port )\r\n {\r\n // All elements have the same drop targets.\r\n //\r\n if(!this.commonPorts.contains(port)){\r\n this.commonPorts.add(port);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Return all ports in the canvas\r\n *\r\n */\r\n getAllPorts: function()\r\n {\r\n return this.commonPorts;\r\n },\r\n\r\n /**\r\n * \r\n * Returns the command stack for the Canvas. Required for undo/redo support.\r\n *\r\n * @returns {draw2d.command.CommandStack}\r\n **/\r\n getCommandStack: function()\r\n {\r\n return this.commandStack;\r\n },\r\n\r\n\r\n // NEW EVENT HANDLING SINCE VERSION 5.0.0\r\n /**\r\n * \r\n * Execute all handlers and behaviors attached to the canvas for the given event type.\r\n *\r\n *\r\n * @param {String} event the event to trigger\r\n * @param {Object} [args] optional parameters for the triggered event callback\r\n *\r\n * @since 5.0.0\r\n */\r\n fireEvent: function(event, args)\r\n {\r\n if (typeof this.eventSubscriptions[event] === 'undefined') {\r\n return;\r\n }\r\n\r\n var subscribers = this.eventSubscriptions[event];\r\n for (var i=0; i<subscribers.length; i++) {\r\n try{\r\n subscribers[i](this, args);\r\n }\r\n catch(exc){\r\n console.log(exc);\r\n console.log(subscribers[i]);\r\n debugger;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Attach an event handler function for one or more events to the canvas.\r\n * To remove events bound with .on(), see {@link #off}.\r\n *\r\n * possible events are:<br>\r\n * <ul>\r\n * <li>reset</li>\r\n * <li>select</li>\r\n * </ul>\r\n *\r\n * Example:\r\n *\r\n * canvas.on(\"clear\", function(emitter, event){\r\n * alert(\"canvas.clear() called.\");\r\n * });\r\n *\r\n * canvas.on(\"select\", function(emitter,event){\r\n * if(event.figure!==null){\r\n * alert(\"figure selected\");\r\n * }\r\n * else{\r\n * alert(\"selection cleared\");\r\n * }\r\n * });\r\n *\r\n * @param {String} event One or more space-separated event types\r\n * @param {Function} callback A function to execute when the event is triggered.\r\n * @param {draw2d.Canvas} callback.emitter the emitter of the event\r\n * @param {Object} [callback.obj] optional event related data\r\n *\r\n * @since 5.0.0\r\n */\r\n on: function(event, callback)\r\n {\r\n var events = event.split(\" \");\r\n for(var i=0; i<events.length; i++){\r\n if (typeof this.eventSubscriptions[events[i]] === 'undefined') {\r\n this.eventSubscriptions[events[i]] = [];\r\n }\r\n this.eventSubscriptions[events[i]].push(callback);\r\n }\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * The .off() method removes event handlers that were attached with {@link #on}.<br>\r\n * Calling .off() with no arguments removes all handlers attached to the canvas.<br>\r\n * <br>\r\n * If a simple event name such as \"reset\" is provided, all events of that type are removed from the canvas.\r\n *\r\n *\r\n * @param {String|Function} eventOrFunction the event name of the registerd function\r\n * @since 5.0.0\r\n */\r\n off: function( eventOrFunction)\r\n {\r\n if(typeof eventOrFunction ===\"undefined\"){\r\n this.eventSubscriptions = {};\r\n }\r\n else if( typeof eventOrFunction === 'string'){\r\n this.eventSubscriptions[eventOrFunction] = [];\r\n }\r\n else{\r\n for(var event in this.eventSubscriptions ){\r\n this.eventSubscriptions[event] =this.eventSubscriptions[event].filter( callback => { return callback !== eventOrFunction; });\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n});\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n * A HybridPort can work as Input and as Output port in the same way for a {@link draw2d.Connection}.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.Port\r\n */\r\ndraw2d.HybridPort = draw2d.Port.extend(\r\n /** @lends draw2d.HybridPort.prototype */\r\n {\r\n NAME: \"draw2d.HybridPort\",\r\n\r\n /**\r\n * Create a new HybridPort element\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super(attr, setter, getter);\r\n\r\n // responsive for the arrangement of the port\r\n // calculates the x/y coordinates in relation to the parent node\r\n this.locator=new draw2d.layout.locator.InputPortLocator();\r\n\r\n // a Hybrid port has fanIn and fanOut connections. All of them can be handeled \r\n // differently. \r\n this.maxFanIn = Number.MAX_SAFE_INTEGER\r\n },\r\n\r\n\r\n /**\r\n *\r\n * set the maximal possible count of incomming connections for this port.<br>\r\n * A \"incomming\" connection has always either a hybrid or output source port.\r\n * \r\n * This method didn't delete any connection if you reduce the number and a bunch of\r\n * connection are bounded already.\r\n *\r\n * @param {Number} count the maximal number of connection related to this port\r\n * @returns {this}\r\n */\r\n setMaxFanIn: function (count) {\r\n this.maxFanIn = Math.max(1, count)\r\n this.fireEvent(\"change:maxFanIn\", {value: this.maxFanIn})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * return the maximal possible connections (in+out) for this port.\r\n *\r\n * @returns {Number}\r\n */\r\n getMaxFanIn: function () \r\n {\r\n return this.maxFanIn\r\n },\r\n\r\n /**\r\n * @param {draw2d.command.CommandType} request The requested operation to perform on the object\r\n * @returns {draw2d.command.Command} The matching command to the requested operation.\r\n */\r\n createCommand: function(request)\r\n {\r\n // Connect request between two ports\r\n //\r\n if(request.getPolicy() === draw2d.command.CommandType.CONNECT) {\r\n\r\n if(request.source.getParent().getId() === request.target.getParent().getId()){\r\n return null;\r\n }\r\n\r\n if (request.source instanceof draw2d.InputPort) {\r\n // This is the difference to the InputPort implementation of createCommand.\r\n return new draw2d.command.CommandConnect(request.target, request.source, request.source);\r\n }\r\n else if (request.source instanceof draw2d.OutputPort) {\r\n // This is the different to the OutputPort implementation of createCommand\r\n return new draw2d.command.CommandConnect(request.source, request.target, request.source);\r\n }\r\n else if (request.source instanceof draw2d.HybridPort) {\r\n // This is the different to the OutputPort implementation of createCommand\r\n return new draw2d.command.CommandConnect(request.target,request.source, request.source);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n // ...else call the base class\r\n return this._super(request);\r\n }\r\n});\r\n","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A InputPort is the start anchor for a {@link draw2d.Connection}.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.Port\r\n */\r\ndraw2d.InputPort = draw2d.Port.extend(\r\n /** @lends draw2d.InputPort.prototype */\r\n {\r\n\r\n NAME: \"draw2d.InputPort\",\r\n\r\n /**\r\n * Create a new InputPort element\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n // responsive for the arrangement of the port\r\n // calculates the x/y coordinates in relation to the parent node\r\n this.locator = new draw2d.layout.locator.InputPortLocator()\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createCommand: function (request) {\r\n // Connect request between two ports\r\n //\r\n if (request.getPolicy() === draw2d.command.CommandType.CONNECT) {\r\n return new draw2d.command.CommandConnect(request.source, request.target, request.source)\r\n }\r\n\r\n // ...else call the base class\r\n return this._super(request)\r\n }\r\n})\r\n","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A OutputPort is the start anchor for a {@link draw2d.Connection}.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.Port\r\n */\r\ndraw2d.OutputPort = draw2d.Port.extend(\r\n /** @lends draw2d.OutputPort.prototype */\r\n {\r\n\r\n NAME: \"draw2d.OutputPort\",\r\n\r\n /**\r\n * Create a new OutputPort element\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super(attr, setter, getter);\r\n\r\n // responsive for the arrangement of the port\r\n // calculates the x/y coordinates in relation to the parent node\r\n this.locator=new draw2d.layout.locator.OutputPortLocator();\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createCommand: function(request)\r\n {\r\n // Connect request between two ports\r\n //\r\n if(request.getPolicy() === draw2d.command.CommandType.CONNECT){\r\n // source and target are changed.\r\n return new draw2d.command.CommandConnect(request.target, request.source, request.source);\r\n }\r\n\r\n // ...else call the base class\r\n return this._super(request);\r\n }\r\n});\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n * A port is an object that is used to establish a connection between a node and a {@link draw2d.Connection}. The port can\r\n * be placed anywhere within a node ( see {@link draw2d.layout.locator.PortLocator} for details)\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @param {Object} [attr] the configuration of the shape\r\n * @extends draw2d.shape.basic.Circle\r\n */\r\n\r\ndraw2d.Port = draw2d.shape.basic.Circle.extend(\r\n /** @lends draw2d.Port.prototype */\r\n {\r\n\r\n NAME: \"draw2d.Port\",\r\n\r\n DEFAULT_BORDER_COLOR: new draw2d.util.Color(\"#1B1B1B\"),\r\n\r\n init: function (attr, setter, getter) {\r\n this.locator = null\r\n this.lighterBgColor = null\r\n this.name = null\r\n this.coronaWidth = 5 // the corona width for the hitTest method. Useful during drag&drop of ports. Better SnapTo behavior.\r\n\r\n this._super({\r\n bgColor: \"#4f6870\",\r\n stroke: 1,\r\n diameter: 10,\r\n color: \"#1B1B1B\",\r\n selectable: false\r\n , ...attr},\r\n {\r\n coronaWidth: this.setCoronaWidth,\r\n semanticGroup: this.setSemanticGroup,\r\n ...setter},\r\n {\r\n coronaWidth: this.getCoronaWidth,\r\n semanticGroup: this.getSemanticGroup,\r\n ...getter})\r\n\r\n\r\n // status vars for user interaction\r\n //\r\n this.ox = this.x\r\n this.oy = this.y\r\n this.corona = null // draw2d.shape.basic.Circle\r\n this.useGradient = true\r\n\r\n this.preferredConnectionDirection = null\r\n\r\n // current attached connections\r\n this.connections = new draw2d.util.ArrayList()\r\n\r\n\r\n this.moveListener = (emitter, event) => {\r\n this.repaint()\r\n // Falls sich der parent bewegt hat, dann muss der Port dies seinen\r\n // Connections mitteilen\r\n this.fireEvent(\"move\", {figure: this, dx: 0, dy: 0})\r\n }\r\n\r\n this.connectionAnchor = new draw2d.layout.anchor.ConnectionAnchor(this)\r\n\r\n // for dynamic diagrams. A Port can have a value which is set by a connector\r\n //\r\n this.value = null\r\n this.maxFanOut = Number.MAX_SAFE_INTEGER\r\n\r\n // semantic group. Only ports in the same semantic group can be connected\r\n //\r\n this.semanticGroup = \"global\"\r\n\r\n this.setCanSnapToHelper(false)\r\n\r\n // uninstall all default selection policies. This is not required for Ports\r\n this.editPolicy.each((i, policy) => this.uninstallEditPolicy(policy))\r\n\r\n this.installEditPolicy(new draw2d.policy.port.IntrusivePortsFeedbackPolicy())\r\n // this.installEditPolicy(new draw2d.policy.port.ElasticStrapFeedbackPolicy());\r\n\r\n // a port handles the selection handling always by its own, regardless if\r\n // the port is part of an composite, node, group or whatever.\r\n this.portSelectionAdapter = () => this\r\n },\r\n\r\n getSelectionAdapter: function () {\r\n return this.portSelectionAdapter\r\n },\r\n\r\n /**\r\n *\r\n * set the maximal possible count of connections for this port.<br>\r\n * This method didn't delete any connection if you reduce the number and a bunch of\r\n * connection are bounded already.\r\n *\r\n * @param {Number} count the maximal number of connection related to this port\r\n * @returns {this}\r\n */\r\n setMaxFanOut: function (count) {\r\n this.maxFanOut = Math.max(1, count)\r\n this.fireEvent(\"change:maxFanOut\", {value: this.maxFanOut})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * return the maximal possible connections (in+out) for this port.\r\n *\r\n * @returns {Number}\r\n */\r\n getMaxFanOut: function () {\r\n return this.maxFanOut\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the semantic group of this port. Only ports in the same semantic group\r\n * can be connected.\r\n *\r\n * The default for all ports is \"global\"\r\n *\r\n * @param {String} group the semantic group of this port\r\n * @returns {this}\r\n */\r\n setSemanticGroup: function (group) {\r\n this.semanticGroup = group\r\n this.fireEvent(\"change:semanticGroup\", {value: this.semanticGroup})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the semantic group of this port. Only ports in the same semantic group\r\n * can be connected.\r\n *\r\n * The default for all ports is \"global\"\r\n *\r\n * @returns {String}\r\n */\r\n getSemanticGroup: function () {\r\n return this.semanticGroup\r\n },\r\n\r\n /**\r\n *\r\n * Set the Anchor for this object. An anchor is responsible for the endpoint calculation\r\n * of an connection. just visible representation.\r\n *\r\n * @param {draw2d.layout.anchor.ConnectionAnchor} [anchor] the new source anchor for the connection or \"null\" to use the default anchor.\r\n * @returns {this}\r\n **/\r\n setConnectionAnchor: function (anchor) {\r\n // set some good defaults.\r\n this.connectionAnchor = anchor ?? new draw2d.layout.anchor.ConnectionAnchor()\r\n this.connectionAnchor.setOwner(this)\r\n\r\n // the anchor has changed. In this case all connections needs an change event to recalculate\r\n // the anchor and the routing itself\r\n this.fireEvent(\"move\", {figure: this, dx: 0, dy: 0})\r\n\r\n return this\r\n },\r\n\r\n getConnectionAnchorLocation: function (referencePoint, inquiringConnection) {\r\n return this.connectionAnchor.getLocation(referencePoint, inquiringConnection)\r\n },\r\n\r\n getConnectionAnchorReferencePoint: function (inquiringConnection) {\r\n return this.connectionAnchor.getReferencePoint(inquiringConnection)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the **direction** for the connection in relation to the given port and it's parent.\r\n *\r\n * <p>\r\n * Possible values:\r\n * <ul>\r\n * <li>draw2d.geo.Rectangle.DIRECTION_UP</li>\r\n * <li>draw2d.geo.Rectangle.DIRECTION_RIGHT</li>\r\n * <li>draw2d.geo.Rectangle.DIRECTION_DOWN</li>\r\n * <li>draw2d.geo.Rectangle.DIRECTION_LEFT</li>\r\n * </ul>\r\n * <p>\r\n *\r\n * @param {draw2d.Port} peerPort the counterpart port\r\n *\r\n * @returns {Number} the direction.\r\n */\r\n getConnectionDirection: function (peerPort) {\r\n // return the calculated connection direction if the port didn't have set any\r\n //\r\n if (typeof this.preferredConnectionDirection === \"undefined\" || this.preferredConnectionDirection === null) {\r\n return this.getParent().getBoundingBox().getDirection(this.getAbsolutePosition())\r\n }\r\n\r\n return this.preferredConnectionDirection\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the **direction** for the connection in relation to the given port and it's parent.\r\n *\r\n * <p>\r\n * Possible values:\r\n * <ul>\r\n * <li>up -> 0</li>\r\n * <li>right -> 1</li>\r\n * <li>down -> 2</li>\r\n * <li>left -> 3</li>\r\n * <li>calculated -> null</li>\r\n * </ul>\r\n * <p>\r\n *\r\n * @since 5.2.1\r\n * @param {Number} direction the preferred connection direction.\r\n * @returns {this}\r\n */\r\n setConnectionDirection: function (direction) {\r\n this.preferredConnectionDirection = direction\r\n\r\n // needs an change event to recalculate the route\r\n this.fireEvent(\"move\", {figure: this, dx: 0, dy: 0})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set the locator/layouter of the port. A locator is responsive for the x/y arrangement of the\r\n * port in relation to the parent node.\r\n *\r\n * @param {draw2d.layout.locator.Locator} locator\r\n * @returns {this}\r\n */\r\n setLocator: function (locator) {\r\n this.locator = locator\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the locator/layouter of the port. A locator is responsive for the x/y arrangement of the\r\n * port in relation to the parent node.\r\n *\r\n * @since 4.2.0\r\n */\r\n getLocator: function () {\r\n return this.locator\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the new background color of the figure. It is possible to hands over\r\n * <code>null</code> to set the background transparent.\r\n *\r\n * @param {draw2d.util.Color|String} color The new background color of the figure\r\n * @returns {this}\r\n **/\r\n setBackgroundColor: function (color) {\r\n this.lighterBgColor = new draw2d.util.Color(color).lighter(0.3).hash()\r\n this._super(color)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set a value for the port. This is useful for interactive/dynamic diagrams like circuits, simulator,...\r\n *\r\n * @param {Object} value the new value for the port. Can be \"undefined\" or \"null\"\r\n * @returns {this}\r\n */\r\n setValue: function (value) {\r\n\r\n if (value === this.value) {\r\n return this\r\n }\r\n let old = this.value\r\n this.value = value\r\n\r\n this.getParent()?.onPortValueChanged(this)\r\n \r\n this.fireEvent(\"change:value\", {value: this.value, old: old})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the user defined value of the port.\r\n *\r\n * @returns {Object}\r\n */\r\n getValue: function () {\r\n return this.value\r\n },\r\n\r\n /**\r\n * @private\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n // a port did have the 0/0 coordinate in the center and not in the top/left corner\r\n //\r\n attributes.cx = this.getAbsoluteX()\r\n attributes.cy = this.getAbsoluteY()\r\n attributes.rx = this.width / 2\r\n attributes.ry = attributes.rx\r\n attributes.cursor = \"move\"\r\n\r\n if (this.getAlpha() < 0.9 || this.useGradient === false) {\r\n attributes.fill = this.bgColor.rgba()\r\n } else {\r\n attributes.fill = [\"90\", this.bgColor.hash(), this.lighterBgColor].join(\"-\")\r\n }\r\n\r\n this._super(attributes)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n **/\r\n onMouseEnter: function () {\r\n this._oldstroke = this.getStroke()\r\n this.setStroke(2)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n **/\r\n onMouseLeave: function () {\r\n this.setStroke(this._oldstroke)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns a {@link draw2d.util.ArrayList} of {@link draw2d.Connection}s of all related connections to this port.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getConnections: function () {\r\n return this.connections\r\n },\r\n\r\n\r\n /**\r\n * @private\r\n */\r\n setParent: function (parent) {\r\n this.parent?.off(this.moveListener)\r\n\r\n this._super(parent)\r\n\r\n this.parent?.on(\"move\", this.moveListener)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the corona width of the Port. The corona width will be used during the\r\n * drag&drop of a port.\r\n *\r\n * @returns {Number}\r\n **/\r\n getCoronaWidth: function () {\r\n return this.coronaWidth\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the corona width of the Port. The corona width will be used during the\r\n * drag&drop of a port. You can drop a port in the corona of this port to create\r\n * a connection. It is not necessary to drop exactly on the port.\r\n *\r\n * @param {Number} width The new corona width of the port\r\n * @returns {this}\r\n **/\r\n setCoronaWidth: function (width) {\r\n this.coronaWidth = width\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean}\r\n * @private\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n // just allow the DragOperation if the port didn't have reached the max fanOut\r\n // limit.\r\n if (this.getConnections().getSize() >= this.maxFanOut) {\r\n return false\r\n }\r\n\r\n// this.getShapeElement().insertAfter(this.parent.getShapeElement());\r\n // don't call the super method. This creates a command and this is not necessary for a port\r\n this.ox = this.x\r\n this.oy = this.y\r\n\r\n let canStartDrag = true\r\n\r\n // notify all installed policies\r\n //\r\n this.editPolicy.each( (i, e)=> {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n // DragStart operation can send a veto for the dragStart\r\n // @since 6.1.0\r\n canStartDrag = canStartDrag && e.onDragStart(this.canvas, this, x, y, shiftKey, ctrlKey)\r\n }\r\n })\r\n\r\n return canStartDrag\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n *\r\n * @private\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n // TODO: warum wurde diese methode überschrieben?!\r\n this._super(dx, dy)\r\n },\r\n\r\n\r\n /**\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @private\r\n **/\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n // Don't call the parent implementation. This will create an CommandMove object\r\n // and store them o the CommandStack for the undo operation. This makes no sense for a\r\n // port.\r\n // draw2d.shape.basic.Rectangle.prototype.onDragEnd.call(this); DON'T call the super implementation!!!\r\n\r\n this.setAlpha(1.0)\r\n\r\n // 1.) Restore the old Position of the node\r\n //\r\n this.setPosition(this.ox, this.oy)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the user drop this element onto the dropTarget\r\n *\r\n * @param {draw2d.Figure} dropTarget The drop target.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @@private\r\n **/\r\n onDrop: function (dropTarget, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method if a new connection has created with this port\r\n *\r\n * // Alternatively you register for this event with:\r\n * port.on(\"connect\", function(emitterPort, connection){\r\n * alert(\"port connected\");\r\n * });\r\n *\r\n * @param {draw2d.Connection} connection The connection which has been created\r\n * @since 2.5.1\r\n *\r\n * @template\r\n **/\r\n onConnect: function (connection) {\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if a new connection has created with this port\r\n *\r\n * // Alternatively you register for this event with:\r\n * port.on(\"connect\", function(emitterPort, connection){\r\n * alert(\"port disconnected\");\r\n * });\r\n *\r\n * @param {draw2d.Connection} connection The connection which has been deleted\r\n * @since 2.5.1\r\n *\r\n * @template\r\n **/\r\n onDisconnect: function (connection) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the name of this port.\r\n *\r\n * @returns {String}\r\n **/\r\n getName: function () {\r\n return this.name\r\n },\r\n\r\n /**\r\n *\r\n * Set the name of this port. The name of the port can be referenced by the lookup of\r\n * ports in the node.\r\n *\r\n *\r\n * @param {String} name The new name of this port.\r\n * @returns {this}\r\n **/\r\n setName: function (name) {\r\n this.name = name\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Hit test for ports. This method respect the corona diameter of the port for the hit test.\r\n * The corona width can be set with {@link draw2d.Port#setCoronaWidth}\r\n *\r\n * @param {Number} iX\r\n * @param {Number} iY\r\n * @param {Number} [corona]\r\n * @returns {Boolean}\r\n */\r\n hitTest: function (iX, iY, corona) {\r\n let x = this.getAbsoluteX() - this.coronaWidth - this.getWidth() / 2\r\n let y = this.getAbsoluteY() - this.coronaWidth - this.getHeight() / 2\r\n let iX2 = x + this.getWidth() + (this.coronaWidth * 2)\r\n let iY2 = y + this.getHeight() + (this.coronaWidth * 2)\r\n\r\n return (iX >= x && iX <= iX2 && iY >= y && iY <= iY2)\r\n },\r\n\r\n /**\r\n *\r\n * Highlight this port\r\n *\r\n * @param {Boolean} flag indicator if the figure should glow.\r\n * @returns {this}\r\n */\r\n setGlow: function (flag) {\r\n if (flag === true && this.corona === null) {\r\n this.corona = new draw2d.Corona()\r\n this.corona.setDimension(this.getWidth() + (this.getCoronaWidth() * 2), this.getWidth() + (this.getCoronaWidth() * 2))\r\n this.corona.setPosition(this.getAbsoluteX() - this.getCoronaWidth() - this.getWidth() / 2, this.getAbsoluteY() - this.getCoronaWidth() - this.getHeight() / 2)\r\n\r\n this.corona.setCanvas(this.getCanvas())\r\n\r\n // important inital\r\n this.corona.getShapeElement()\r\n this.corona.repaint()\r\n } else if (flag === false && this.corona !== null) {\r\n this.corona.setCanvas(null)\r\n this.corona = null\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the diameter of the port. The center of the circle will be retained.\r\n *\r\n * @param {Number} d The new diameter of the circle.\r\n * @since 4.0.0\r\n * @returns {this}\r\n **/\r\n setDiameter: function (d) {\r\n //let center = this.getCenter()\r\n this.setDimension(d, d)\r\n // the port has its center in the middle. In this case there is no need to shift the center of the circle\r\n // like it is done in the base implementation.\r\n //this.setCenter(center)\r\n this.fireEvent(\"change:diameter\", {value: d})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createCommand: function (request) {\r\n // the port has its own implementation of the CommandMove\r\n //\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE) {\r\n if (!this.isDraggable()) {\r\n return null\r\n }\r\n return new draw2d.command.CommandMovePort(this)\r\n }\r\n\r\n return null\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called from the figure itself when any position changes happens. All listener\r\n * will be informed.\r\n * <br>\r\n * DON'T fire this event if the Port is during a Drag&Drop operation. This can happen\r\n * if we try to connect two ports\r\n *\r\n * @private\r\n **/\r\n fireEvent: function (event, args) {\r\n if (this.isInDragDrop === true && event !== \"drag\") {\r\n return\r\n }\r\n\r\n this._super(event, args)\r\n },\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @return {Object} all attributes required for the persistency\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.maxFanOut = this.maxFanOut\r\n memento.name = this.name\r\n memento.semanticGroup = this.semanticGroup\r\n\r\n // defined by the locator. Don't persist\r\n //\r\n delete memento.x\r\n delete memento.y\r\n\r\n // ports didn't have children ports. In this case we\r\n // delete this attribute as well to avoid confusions.\r\n //\r\n delete memento.ports\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.maxFanOut !== \"undefined\") {\r\n // Big bug in the past.\r\n // I used Number.MAX_VALUE as maxFanOut which is 1.7976931348623157e+308\r\n // parseInt creates \"1\" during the reading of the JSON - which is crap.\r\n // BIG BIG BUG!!! my fault.\r\n // Now check if the memento.maxFanOut is a number and take this without crappy parsing.\r\n if (typeof memento.maxFanOut === \"number\") {\r\n this.maxFanOut = memento.maxFanOut\r\n } else {\r\n this.maxFanOut = Math.max(1, parseInt(memento.maxFanOut))\r\n }\r\n }\r\n\r\n if (typeof memento.name !== \"undefined\") {\r\n this.setName(memento.name)\r\n }\r\n\r\n if (typeof memento.semanticGroup !== \"undefined\") {\r\n this.setSemanticGroup(memento.semanticGroup)\r\n }\r\n\r\n return this\r\n }\r\n })\r\n\r\n\r\n/**\r\n * @class\r\n * Glow effect for ports. Just for internal use.\r\n *\r\n * @private\r\n * @extend draw2d.shape.basic.Circle\r\n */\r\ndraw2d.Corona = draw2d.shape.basic.Circle.extend(\r\n /** @lends draw2d.shape.basic.Circle.prototype */\r\n {\r\n\r\n init: function () {\r\n this._super()\r\n this.setAlpha(0.3)\r\n this.setBackgroundColor(new draw2d.util.Color(178, 225, 255))\r\n this.setColor(new draw2d.util.Color(102, 182, 252))\r\n },\r\n\r\n /**\r\n *\r\n * the the opacity of the element.\r\n *\r\n * @param {Number} percent\r\n */\r\n setAlpha: function (percent) {\r\n this._super(Math.min(0.3, percent))\r\n this.setDeleteable(false)\r\n this.setDraggable(false)\r\n this.setResizeable(false)\r\n this.setSelectable(false)\r\n\r\n return this\r\n }\r\n })\r\n","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n * The Resizehandles for Figures.\r\n\r\n * <pre>\r\n * Possible Type:\r\n *\r\n * 1 2 3\r\n * O-----------O-------------O\r\n * | |\r\n * | |\r\n * 8 O + 9 O 4\r\n * | |\r\n * | |\r\n * O-----------O-------------O\r\n * 7 6 5\r\n * </pre>\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.ResizeHandle = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.ResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.ResizeHandle\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {draw2d.Figure} the owner if the resize handle\r\n * @param {Number} type the type of the ResizeHandle.\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.zoomCallback = ()=> {\r\n this.attr({\r\n width: this.origWidth*this.getCanvas().getZoom(),\r\n height: this.origHeight*this.getCanvas().getZoom(),\r\n radius: this.origRadius*this.getCanvas().getZoom(),\r\n stroke: this.origStroke*this.getCanvas().getZoom()\r\n })\r\n\r\n // size of the ResizeHandle has changed. Force a reposition of handle\r\n //\r\n if(!this.blockEvent)\r\n this.owner.fireEvent(\"move\",{})\r\n }\r\n\r\n this._super(\r\n {\r\n // set some good defaults\r\n bgColor: \"#FDFDFD\",\r\n stroke: 0.5,\r\n width:10,\r\n height:10,\r\n minWidth:0.3,\r\n minHeight:0.3,\r\n color: \"#a0a0a0\",\r\n radius: 1,\r\n selectable:false\r\n // and allow to override them\r\n , ...attr},\r\n {\r\n owner : this.setOwner,\r\n type : this.setType,\r\n ...setter},\r\n {\r\n owner : this.getOwner,\r\n type : this.getType,\r\n ...getter})\r\n\r\n // required in the SelectionEditPolicy to indicate the type of figure\r\n // which the user clicks\r\n this.isResizeHandle = true\r\n\r\n this.command = null\r\n this.commandMove = null\r\n this.commandResize = null\r\n this.useGradient = true\r\n\r\n\r\n this.origRadius = this.radius\r\n this.origWidth = this.width\r\n this.origHeight = this.height\r\n this.origStroke = this.stroke\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The edge of the rectangle for the snapTo mechanism.\r\n *\r\n * @return {draw2d.SnapToHelper} enum of the direction (NORTH, NORTH_WEST, EAST,...)\r\n */\r\n getSnapToDirection: function () {\r\n switch (this.type) {\r\n case 1:\r\n return draw2d.SnapToHelper.NORTH_WEST\r\n case 2:\r\n return draw2d.SnapToHelper.NORTH\r\n case 3:\r\n return draw2d.SnapToHelper.NORTH_EAST\r\n case 4:\r\n return draw2d.SnapToHelper.EAST\r\n case 5:\r\n return draw2d.SnapToHelper.SOUTH_EAST\r\n case 6:\r\n return draw2d.SnapToHelper.SOUTH\r\n case 7:\r\n return draw2d.SnapToHelper.SOUTH_WEST\r\n case 8:\r\n return draw2d.SnapToHelper.WEST\r\n case 9:\r\n return draw2d.SnapToHelper.NSEW\r\n default:\r\n return draw2d.SnapToHelper.EAST\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n this.shape = this._super()\r\n\r\n this.shape.node.setAttribute(\"type\", this.type)\r\n this.updateCursor(this.shape)\r\n\r\n return this.shape\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the current used SVG as string\r\n *\r\n * @returns {String}\r\n */\r\n getOwner: function()\r\n {\r\n return this.owner;\r\n },\r\n\r\n setOwner: function( owner){\r\n this.owner = owner\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the current used SVG as string\r\n *\r\n * @returns {String}\r\n */\r\n getType: function()\r\n {\r\n return this.type;\r\n },\r\n\r\n setType: function( type){\r\n this.type = type\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * calculate and set the cursor of the reize handle\r\n * @private\r\n */\r\n updateCursor: function (shape) {\r\n if (shape === null) {\r\n return this\r\n }\r\n\r\n if (this.isDraggable() === false) {\r\n shape.attr({\"cursor\": \"default\"})\r\n return this\r\n }\r\n\r\n /*\r\n * 1 2 3\r\n * O-----------O-------------O\r\n * | |\r\n * | |\r\n * 8 O + 9 O 4\r\n * | |\r\n * | |\r\n * O-----------O-------------O\r\n * 7 6 5\r\n */\r\n switch (this.type) {\r\n case 1:\r\n shape.attr({\"cursor\": \"nw-resize\"})\r\n break\r\n case 2:\r\n shape.attr({\"cursor\": \"n-resize\"})\r\n break\r\n case 3:\r\n shape.attr({\"cursor\": \"ne-resize\"})\r\n break\r\n case 4:\r\n shape.attr({\"cursor\": \"e-resize\"})\r\n break\r\n case 5:\r\n shape.attr({\"cursor\": \"se-resize\"})\r\n break\r\n case 6:\r\n shape.attr({\"cursor\": \"s-resize\"})\r\n break\r\n case 7:\r\n shape.attr({\"cursor\": \"sw-resize\"})\r\n break\r\n case 8:\r\n shape.attr({\"cursor\": \"w-resize\"})\r\n break\r\n default:\r\n shape.attr({\"cursor\": \"move\"})\r\n break\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the draggable flag of the resize handle and update the cursor of the shape in relation\r\n * to the type of resize handle. north, south,west,..\r\n *\r\n * @param flag\r\n * @returns {this}\r\n */\r\n setDraggable: function (flag) {\r\n this._super(flag)\r\n this.updateCursor(this.shape)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Will be called if the drag and drop action beginns. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true whenever the drag drop operation is allowed.\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n // This happens if the selected figure has set the \"nonResizeable\" flag\r\n // In this case the ResizeHandle can't be dragged. => no resize\r\n //\r\n if (!this.isDraggable()) {\r\n return false\r\n }\r\n\r\n this.ox = this.getAbsoluteX()\r\n this.oy = this.getAbsoluteY()\r\n\r\n this.commandMove = this.owner.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE))\r\n this.commandResize = this.owner.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.RESIZE))\r\n\r\n return true\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework if the figure is moved by user interaction.\r\n *\r\n * @param {Number} dx the move x offset\r\n * @param {Number} dy the move y offset\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n */\r\n onDrag: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n if (this.isDraggable() === false) {\r\n return\r\n }\r\n\r\n let oldX = this.getAbsoluteX()\r\n let oldY = this.getAbsoluteY()\r\n\r\n // call the super.drag method with all snapTo### handler and adjustments\r\n this._super(dx, dy, dx2, dy2)\r\n\r\n let diffX = this.getAbsoluteX() - oldX\r\n let diffY = this.getAbsoluteY() - oldY\r\n\r\n let obj = this.owner\r\n let objPosX = obj.getAbsoluteX()\r\n let objPosY = obj.getAbsoluteY()\r\n let objWidth = obj.getWidth()\r\n let objHeight = obj.getHeight()\r\n\r\n let newX = null\r\n let newY = null\r\n let corrPos = null\r\n /*\r\n * 1 2 3\r\n * O-----------O-------------O\r\n * | |\r\n * | |\r\n * 8 O + 9 O 4\r\n * | |\r\n * | |\r\n * O-----------O-------------O\r\n * 7 6 5\r\n */\r\n switch (this.type) {\r\n case 1:\r\n obj.setDimension(objWidth - diffX, objHeight - diffY)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY)\r\n break\r\n case 2:\r\n obj.setDimension(objWidth, objHeight - diffY)\r\n newX = objPosX\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY)\r\n break\r\n case 3:\r\n obj.setDimension(objWidth + diffX, objHeight - diffY)\r\n newX = objPosX\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY)\r\n break\r\n case 4:\r\n obj.setDimension(objWidth + diffX, objHeight)\r\n break\r\n case 5:\r\n obj.setDimension(objWidth + diffX, objHeight + diffY)\r\n break\r\n case 6:\r\n obj.setDimension(objWidth, objHeight + diffY)\r\n break\r\n case 7:\r\n obj.setDimension(objWidth - diffX, objHeight + diffY)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY\r\n obj.setPosition(newX, newY)\r\n break\r\n case 8:\r\n obj.setDimension(objWidth - diffX, objHeight)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY\r\n obj.setPosition(newX, newY)\r\n break\r\n }\r\n\r\n if (newX !== null) {\r\n // may the setPosition has changed regarding any constraint or edit policies. In this case\r\n // we must adjust the dimension with the related correction\r\n //\r\n corrPos = obj.getPosition()\r\n if (corrPos.x !== newX || corrPos.y !== newY) {\r\n obj.setDimension(obj.getWidth() - (corrPos.x - newX), obj.getHeight() - (corrPos.y - newY))\r\n }\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Will be called after a drag and drop action.<br>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n if (!this.isDraggable()) {\r\n return\r\n }\r\n\r\n // An non draggable resizeHandle doesn't create a move/resize command.\r\n // This happens if the selected figure has set the \"nonResizeable\" flag.\r\n //\r\n if (this.commandMove !== null) {\r\n this.commandMove.setPosition(this.owner.getX(), this.owner.getY())\r\n this.canvas.getCommandStack().execute(this.commandMove)\r\n this.commandMove = null\r\n }\r\n\r\n if (this.commandResize !== null) {\r\n this.commandResize.setDimension(this.owner.getWidth(), this.owner.getHeight())\r\n this.canvas.getCommandStack().execute(this.commandResize)\r\n this.commandResize = null\r\n }\r\n },\r\n\r\n /**\r\n * Set the position of the object.<br>\r\n * The ResizeHandle overrides the Figure.setPosition method. The base\r\n * class updates the resize handles during the update of the Dimension/Position. This\r\n * is not neccessary for the ResizeHandles. Performance issue.\r\n *\r\n * @param {Number|draw2d.geo.Point} x The new x coordinate of the figure\r\n * @param {Number} y The new y coordinate of the figure\r\n **/\r\n setPosition: function (x, y) {\r\n // don't call base implementation. Base implementation will show\r\n // ResizeHandles...but I'm the ResizeHandle\r\n if (x instanceof draw2d.geo.Point) {\r\n this.x = x.x\r\n this.y = x.y\r\n }\r\n else {\r\n this.x = x\r\n this.y = y\r\n }\r\n\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n // performance improvement by setting the coordinates direct.\r\n this.shape.attr({x: this.x, y: this.y})\r\n\r\n this.applyTransformation()\r\n },\r\n\r\n /**\r\n *\r\n * Set the new dimension of the the ResizeHandle. If you didn't pass any width/height the best default for the\r\n * platform will be used.\r\n *\r\n * Additional the \"snapTo\" anchor is re-calculated in relation to the type of ResizeHandle\r\n *\r\n * @param {Number} [width] new width of the resize handle\r\n * @param {Number} [height] new width of the resize handle\r\n */\r\n setDimension: function (width, height) {\r\n\r\n if (typeof height !== \"undefined\") {\r\n this._super(width, height)\r\n }\r\n else {\r\n if (draw2d.isTouchDevice) {\r\n this._super(15, 15)\r\n }\r\n else {\r\n this._super(8, 8)\r\n }\r\n }\r\n\r\n\r\n let offset = this.getWidth()\r\n let offset2 = offset / 2\r\n\r\n switch (this.type) {\r\n case 1:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset, offset))\r\n break\r\n case 2:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset2, offset))\r\n break\r\n case 3:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(0, offset))\r\n break\r\n case 4:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(0, offset2))\r\n break\r\n case 5:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(0, 0))\r\n break\r\n case 6:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset2, 0))\r\n break\r\n case 7:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset, 0))\r\n break\r\n case 8:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset, offset2))\r\n break\r\n case 9:\r\n this.setSnapToGridAnchor(new draw2d.geo.Point(offset2, offset2))\r\n break\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Show the ResizeHandle and add it to the canvas.<br>\r\n * Additional bring it in to the front of other figures if we didn't use\r\n * an overlayCanvas.\r\n *\r\n * If the ResizeHandle is place inside an overlayCanvas it is automatically on top.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to use\r\n **/\r\n show: function (canvas) {\r\n // don't call the parent function. The parent functions delete this object\r\n // and a resize handle can't be deleted.\r\n this.setCanvas(canvas)\r\n\r\n this.canvas.resizeHandles.add(this)\r\n this.shape.insertAfter(this.owner.getShapeElement())\r\n\r\n try{\r\n this.blockEvent=true\r\n this.zoomCallback()\r\n }\r\n finally{\r\n this.blockEvent=false\r\n }\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Hide the resize handle and remove it from the canvas.\r\n *\r\n **/\r\n hide: function () {\r\n // don't call the parent function. The parent functions delete this object\r\n // and a resize handle shouldn't be deleted.\r\n if (this.shape === null) {\r\n return\r\n }\r\n\r\n this.canvas.resizeHandles.remove(this)\r\n this.setCanvas(null)\r\n\r\n return this\r\n },\r\n\r\n setCanvas: function (canvas) {\r\n\r\n if(this.canvas!==null){\r\n this.canvas.off(this.zoomCallback);\r\n }\r\n\r\n this._super(canvas)\r\n\r\n if(this.canvas!==null){\r\n this.canvas.on(\"zoom\", this.zoomCallback);\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Set the new background color of the figure. It is possible to hands over\r\n * <code>null</code> to set the background transparent.\r\n *\r\n * @param {draw2d.util.Color} color The new background color of the figure\r\n **/\r\n setBackgroundColor: function (color) {\r\n color = new draw2d.util.Color(color)\r\n\r\n this.bgGradient = \"90-\" + color.darker(0.2).hash() + \"-\" + color.hash()\r\n this._super(color)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n if (this.bgColor.hash() === \"none\") {\r\n attributes.fill = \"none\"\r\n }\r\n else if (this.getAlpha() < 0.9 || this.useGradient === false) {\r\n attributes.fill = this.bgColor.rgba()\r\n }\r\n else {\r\n attributes.fill = this.bgGradient\r\n }\r\n\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n *\r\n * return true if the element can be used in combination with the\r\n * SnapToHelper feature.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n supportsSnapToHelper: function () {\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Override this method and redirect them to the cavas. A ResizeHandle didn't support\r\n * Keyboard interaction at the moment.\r\n *\r\n * @param {Number} keyCode the id of the pressed key\r\n * @param {Boolean} ctrl true if the user has pressed the CTRL/STRG key as well.\r\n **/\r\n onKeyDown: function (keyCode, ctrl) {\r\n // don't call the parent function. The parent functions delete this object\r\n // and a resize handle can't be deleted.\r\n this.canvas.onKeyDown(keyCode, ctrl)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n fireEvent: function (event, args) {\r\n // A resizeHandle doesn't fire this event.\r\n // Normally this set the document dirty. This is not necessary for a ResizeHandle.\r\n }\r\n})\r\n\r\n","\r\nimport draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n * Abstract class which can handle plain SVG content.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.SetFigure\r\n */\r\ndraw2d.SVGFigure = draw2d.SetFigure.extend(\r\n /** @lends draw2d.SVGFigure.prototype */\r\n {\r\n \r\n NAME: \"draw2d.SVGFigure\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this.svg = null\r\n this._super(\r\n attr,\r\n {\r\n svg : this.setSVG,\r\n ...setter},\r\n {\r\n svg : this.getSVG,\r\n ...getter}\r\n )\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createSet: function()\r\n {\r\n // legacy behaviour. Legacy code of Draw2D didn't have the \"svg\" attribute.\r\n // in this case we must call the overridden method \"getSVG\" to retrieve the SVG from inherit\r\n // the inherit class.\r\n //\r\n this.svg ??= this.getSVG()\r\n\t\treturn this.importSVG(this.canvas, this.svg)\r\n\t},\r\n\r\n /**\r\n * \r\n * Returns the current used SVG as string\r\n * @returns {String}\r\n */\r\n getSVG: function()\r\n {\r\n return this.svg\r\n },\r\n\r\n /**\r\n * \r\n * Set the SVG of this shape\r\n *\r\n * @param {String} svg The new SVG to render as String\r\n * @param {Number} [duration] the optional duration for the change of the SVG of the figure\r\n *\r\n * @returns {draw2d.SVGFigure}\r\n */\r\n setSVG: function(svg, duration)\r\n {\r\n this.svg = svg\r\n\r\n // SVG has changed. Update the rendering\r\n //\r\n if(this.canvas !==null && this.svgNodes !==null){\r\n let newSVGNodes = this.createSet();\r\n if(!isNaN(parseFloat(duration))) {\r\n newSVGNodes.hide();\r\n newSVGNodes.insertAfter(this.svgNodes);\r\n let oldSVG = this.svgNodes;\r\n this.svgNodes = newSVGNodes;\r\n this.applyTransformation();\r\n oldSVG.forEach(function ( shape) {\r\n $(shape.node).fadeOut(duration, function () {\r\n shape.remove();\r\n });\r\n });\r\n newSVGNodes.forEach(function (shape) {\r\n $(shape.node).fadeIn(duration);\r\n });\r\n }\r\n else {\r\n newSVGNodes.insertAfter(this.svgNodes);\r\n this.svgNodes.remove();\r\n this.svgNodes = newSVGNodes;\r\n this.applyTransformation();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Helper method to transform the SVG string into a raphaelJS set.\r\n *\r\n * @private\r\n */\r\n importSVG : function (canvas, rawSVG)\r\n {\r\n let set = canvas.paper.set()\r\n\r\n try {\r\n if (typeof rawSVG === 'undefined'){\r\n throw 'No data was provided.';\r\n }\r\n\r\n // Override the dimension from the JSON if the SVG contains any\r\n //\r\n let svgDOM= $(rawSVG)\r\n\r\n // set the dimension of the element if the JSON import didn't provide\r\n // a dimension already\r\n //\r\n if(typeof this._dimensionReadFromJSON ===\"undefined\"){\r\n if(svgDOM.attr(\"width\") && svgDOM.attr(\"height\")){\r\n this.setDimension(parseFloat(svgDOM.attr(\"width\")), parseFloat(svgDOM.attr(\"height\")));\r\n }\r\n delete this._dimensionReadFromJSON\r\n }\r\n\r\n let findStyle = new RegExp('([a-z0-9\\-]+) ?: ?([^ ;]+)[ ;]?','gi');\r\n\r\n svgDOM.children().each(function(i,element){\r\n //element = $(element);\r\n let shape=null;\r\n let style=null;\r\n let attr = { };\r\n let node = element.tagName;\r\n\r\n // remove the namespace of the node if existing. This can happen in IE8\r\n //\r\n let index = node.indexOf(\":\");\r\n if(index != -1)\r\n node = node.substr(index+1);\r\n\r\n // map some element to Raphael specifix attributes or ignore some unknown attributes\r\n //\r\n $(element.attributes).each(function() {\r\n switch(this.nodeName) {\r\n case 'stroke-dasharray':\r\n attr[this.nodeName] = '- ';\r\n break;\r\n case 'style':\r\n style = this.nodeValue;\r\n break;\r\n case 'id':\r\n case 'xml:space':\r\n // just to ignore\r\n break;\r\n default:\r\n if(this.value){\r\n attr[this.nodeName] = this.value;\r\n }\r\n else{\r\n // @deprecated\r\n attr[this.nodeName] = this.nodeValue;\r\n }\r\n break;\r\n }\r\n });\r\n\r\n\r\n if ( style !== null){\r\n while(findStyle.exec(style)){\r\n attr[RegExp.$1] = RegExp.$2;\r\n }\r\n }\r\n\r\n // set some good defaults if the element didn't provide a stroke-width but has a \"stroke\" attribute\r\n //\r\n if (typeof attr['stroke-width'] === 'undefined'){\r\n attr['stroke-width'] = (typeof attr.stroke === 'undefined' ? 0 : 1.2);\r\n }\r\n\r\n switch(node) {\r\n case 'rect':\r\n shape = canvas.paper.rect();\r\n\r\n // transfer rx-SVG attribute to the \"r\" attribute of raphael\r\n if(typeof attr[\"rx\"]!==\"undefined\") {\r\n attr.r = parseInt(attr.rx);\r\n delete attr.rx;\r\n }\r\n break;\r\n case 'circle':\r\n shape = canvas.paper.circle();\r\n break;\r\n case 'ellipse':\r\n shape = canvas.paper.ellipse();\r\n break;\r\n case 'path':\r\n attr.fill =\"none\";\r\n shape = canvas.paper.path(attr.d);\r\n break;\r\n case 'line':\r\n attr.d= \"M \"+attr.x1+\" \"+attr.y1+\"L\"+attr.x2+\" \"+attr.y2;\r\n attr.fill =\"none\";\r\n shape = canvas.paper.path(attr.d);\r\n break;\r\n case 'polyline':\r\n let path = attr.points;\r\n attr.d = \"M \"+path.replace(\" \",\" L\");\r\n shape = canvas.paper.path(attr.d);\r\n break;\r\n case 'polygon':\r\n shape = canvas.paper.polygon(attr.points);\r\n break;\r\n case 'image':\r\n shape = canvas.paper.image();\r\n break;\r\n case 'tspan':\r\n case 'text':\r\n if(element.childNodes.length>0){\r\n let child = element.firstChild;\r\n do {\r\n switch(child.nodeType){\r\n case 2://ATTRIBUTE_NODE\r\n case 4://CDATA_SECTION_NODE\r\n case 5://ENTITY_REFERENCE_NODE\r\n case 6://ENTITY_NODE\r\n case 7://PROCESSING_INSTRUCTION_NODE\r\n case 8://COMMENT_NODE\r\n case 9://DOCUMENT_NODE\r\n case 10://DOCUMENT_TYPE_NODE\r\n case 11://DOCUMENT_FRAGMENT_NODE\r\n case 12://NOTATION_NODE\r\n return;\r\n case 3://TEXT_NODE\r\n \t // redirect to the parent node if we found a simple TEXT without any attributes\r\n \tchild = element;\r\n \tbreak;\r\n case 1://ELEMENT_NODE\r\n }\r\n let subShape = canvas.paper.text(0,0,$(child).text());\r\n let subAttr ={\"x\":parseFloat(child.attributes.x.value), \"y\":parseFloat(child.attributes.y.value)};\r\n subAttr[\"text-anchor\"] = \"start\";\r\n if(typeof child.attributes[\"text-anchor\"]!==\"undefined\"){\r\n subAttr[\"text-anchor\"] = child.attributes[\"text-anchor\"].value;\r\n }\r\n else if(typeof attr[\"text-anchor\"]!==\"undefined\"){\r\n subAttr[\"text-anchor\"] = attr[\"text-anchor\"];\r\n }\r\n\r\n if(typeof child.attributes[\"font-size\"]!==\"undefined\"){\r\n subAttr[\"font-size\"] = parseInt(child.attributes[\"font-size\"].value);\r\n }\r\n else if(typeof attr[\"font-size\"]!==\"undefined\"){\r\n // inherit the font size from the parent node\r\n subAttr[\"font-size\"] = parseInt(attr[\"font-size\"]);\r\n }\r\n\r\n if(typeof child.attributes[\"font-family\"]!==\"undefined\"){\r\n subAttr[\"font-family\"] = child.attributes[\"font-family\"].value;\r\n }\r\n else if(typeof attr[\"font-family\"]!==\"undefined\"){\r\n // inherit the font size from the parent node\r\n subAttr[\"font-family\"] = attr[\"font-family\"];\r\n }\r\n\r\n subAttr[\"fill\"] = \"#000000\";\r\n if(typeof child.attributes[\"fill\"]!==\"undefined\"){\r\n subAttr[\"fill\"] = child.attributes[\"fill\"].value;\r\n }\r\n else if(typeof attr[\"fill\"]!==\"undefined\"){\r\n // inherit the font size from the parent node\r\n subAttr[\"fill\"] = attr[\"fill\"];\r\n }\r\n\r\n subAttr.y= subAttr.y+subShape.getBBox().height/2;\r\n\r\n subShape.attr(subAttr);\r\n set.push(subShape);\r\n child = child.nextSibling;\r\n\r\n }while(child && child.nodeType === 3); // 3= TEXT_NODE\r\n }\r\n else{\r\n shape = canvas.paper.text(0,0,$(element).html());\r\n if(typeof attr[\"fill\"]===\"undefined\")\r\n attr[\"fill\"] = \"#000000\";\r\n if(typeof attr[\"text-anchor\"]===\"undefined\")\r\n attr[\"text-anchor\"] = \"start\";\r\n if(typeof attr[\"font-size\"]!==\"undefined\")\r\n attr[\"font-size\"] = parseInt(attr[\"font-size\"]);\r\n if(typeof attr[\"font-family\"]!==\"undefined\")\r\n attr[\"font-family\"] = parseInt(attr[\"font-family\"]);\r\n attr.y= parseFloat(attr.y)+shape.getBBox().height/2;\r\n }\r\n break;\r\n }\r\n if(shape!==null){\r\n shape.attr(attr);\r\n set.push(shape);\r\n }\r\n });\r\n } catch (error) {\r\n alert('The SVG data you entered was invalid! (' + error + ')');\r\n }\r\n\r\n\r\n return set;\r\n },\r\n\r\n /**\r\n * \r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n */\r\n setPersistentAttributes: function(memento)\r\n {\r\n this._super(memento);\r\n\r\n // keep a temp flag to indicate the we have read the dimension of the\r\n // element from the JSON struct. In this case we didn't care about the dimension\r\n // from the SVG data\r\n //\r\n if(typeof memento.width !== \"undefined\"){\r\n this._dimensionReadFromJSON=true;\r\n }\r\n else if(typeof memento.height !== \"undefined\"){\r\n this._dimensionReadFromJSON=true;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n\r\n});\r\n","import draw2d from 'packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Represents the current selection in the canvas. The selection element is a pure passive element which\r\n * manage/store the selection.\r\n *\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.Selection = Class.extend(\r\n /** @lends draw2d.Selection.prototype */\r\n {\r\n\r\n NAME: \"draw2d.Selection\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n */\r\n init: function () {\r\n this.primary = null;\r\n this.all = new draw2d.util.ArrayList();\r\n },\r\n\r\n /**\r\n * \r\n * Reset the current selection\r\n *\r\n */\r\n clear: function () {\r\n this.primary = null;\r\n this.all = new draw2d.util.ArrayList();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Return the primary selection. This can only one figure at once.\r\n *\r\n * @returns {draw2d.Figure} the primary selected figure\r\n */\r\n getPrimary: function () {\r\n return this.primary;\r\n },\r\n\r\n /**\r\n * \r\n * Set the primary selection.\r\n *\r\n * @param {draw2d.Figure} figure The new primary selection\r\n */\r\n setPrimary: function (figure) {\r\n this.primary = figure;\r\n this.add(figure);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Remove the given figure from the selection (primary,all)\r\n *\r\n * @param {draw2d.Figure} figure\r\n */\r\n remove: function (figure) {\r\n this.all.remove(figure);\r\n if (this.primary === figure) {\r\n this.primary = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Add a figure to the selection. No events are fired or update the selection handle. This method just\r\n * add the figure to the internal management data structure.\r\n *\r\n * @param figure\r\n * @private\r\n */\r\n add: function (figure) {\r\n if (figure !== null && !this.all.contains(figure)) {\r\n this.all.add(figure);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n\r\n /**\r\n * \r\n * return true if the given figure part of the selection.\r\n *\r\n * @param {draw2d.Figure} figure The figure to check\r\n * @param {Boolean} [checkDescendant] Check if the figure provided by the argument is a descendant of the selection whether it is a direct child or nested more deeply.\r\n *\r\n * @since 2.2.0\r\n * @returns {Boolean}\r\n */\r\n contains: function (figure, checkDescendant) {\r\n if (checkDescendant) {\r\n for (let i = 0; i < this.all.getSize(); i++) {\r\n let figureToCheck = this.all.get(i);\r\n if (figureToCheck === figure || figureToCheck.contains(figure)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n return this.all.contains(figure);\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return if the selection is empty\r\n *\r\n * @since 4.8.0\r\n */\r\n isEmpty: function () {\r\n return this.all.isEmpty();\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the size of the selection\r\n *\r\n * @since 4.8.0\r\n */\r\n getSize: function () {\r\n return this.all.getSize();\r\n },\r\n\r\n /**\r\n * \r\n * Return the complete selection - including the primary selection.\r\n *\r\n * @param {Boolean} [expand] expand all StrongComposite and WeakComposite to get all figures. Didn't expand any SetFigures or LayoutFigures\r\n * @returns {draw2d.util.ArrayList}\r\n *\r\n */\r\n getAll: function (expand) {\r\n if (expand === true) {\r\n let result = new draw2d.util.ArrayList();\r\n let addRecursive = (figures) => {\r\n result.addAll(figures, true);\r\n figures.each((index, figure) => {\r\n if (figure instanceof draw2d.shape.composite.StrongComposite) {\r\n addRecursive(figure.getAssignedFigures());\r\n }\r\n });\r\n };\r\n addRecursive(this.all);\r\n\r\n return result;\r\n }\r\n\r\n return this.all.clone();\r\n },\r\n\r\n /**\r\n * \r\n * Iterates over the current selection with <b>func</b> as callback handler.\r\n *\r\n * @param {Function} func the callback function to call for each element\r\n * @param {Number} func.i index of the element in iteration\r\n * @param {Object} func.value value of the element in iteration.\r\n * @param {Boolean} [reverse] optional parameter. Iterate the collection reverse if it set to <b>true</b>\r\n */\r\n each: function (func, reverse) {\r\n this.all.each(func, reverse);\r\n\r\n return this;\r\n }\r\n});\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * A SetFigure is a composition of different SVG elements.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.SetFigure = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.SetFigure.prototype */\r\n {\r\n\r\n NAME: \"draw2d.SetFigure\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // collection of SVG DOM nodes\r\n this.svgNodes = null\r\n\r\n this.originalWidth = null\r\n this.originalHeight = null\r\n\r\n this.scaleX = 1\r\n this.scaleY = 1\r\n\r\n this.strokeScale = true // scale the stroke width of the children nodes if the parent resize\r\n\r\n this._super({stroke: 0, bgColor: null, ...attr}, setter, getter)\r\n },\r\n\r\n /**\r\n * \r\n * Set/Reset the canvas for the element.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to use\r\n */\r\n setCanvas: function (canvas) {\r\n // remove the shape if we reset the canvas and the element\r\n // was already drawn\r\n if (canvas === null && this.svgNodes !== null) {\r\n this.svgNodes.remove()\r\n this.svgNodes = null\r\n }\r\n\r\n this._super(canvas)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the css class if the node.\r\n *\r\n * @param {String} cssClass the new css class name of the node\r\n * @since 2.9.0\r\n */\r\n setCssClass: function (cssClass) {\r\n this._super(cssClass)\r\n\r\n if (this.svgNodes === null) {\r\n return this\r\n }\r\n\r\n if (this.cssClass === null) {\r\n this.svgNodes.forEach( (e) => {\r\n e.node.removeAttribute(\"class\")\r\n })\r\n }\r\n else {\r\n this.svgNodes.forEach( (e) => {\r\n e.node.setAttribute(\"class\", cssClass)\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * propagate all attributes like color, stroke,... to the shape element and\r\n * repaint them.\r\n *\r\n * @protected\r\n **/\r\n repaint: function (attributes) {\r\n // repaint can be blocked during deserialization and if the shape\r\n // not part of any canvas.\r\n //\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n if (this.originalWidth !== null) {\r\n this.scaleX = this.width / this.originalWidth\r\n this.scaleY = this.height / this.originalHeight\r\n }\r\n\r\n attributes ??= {}\r\n\r\n this.applyAlpha()\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setVisible: function (flag, duration) {\r\n this._super(flag, duration)\r\n\r\n if (this.svgNodes !== null) {\r\n if (duration) {\r\n if (this.visible === true) {\r\n this.svgNodes.forEach( (shape) =>{\r\n $(shape.node).fadeIn(duration, ()=>shape.show())\r\n })\r\n }\r\n else {\r\n this.svgNodes.forEach( (shape) =>{\r\n $(shape.node).fadeOut(duration, () => shape.hide())\r\n })\r\n }\r\n }\r\n else {\r\n if (this.visible === true) {\r\n this.svgNodes.show()\r\n }\r\n else {\r\n this.svgNodes.hide()\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Apply the opacity to all child set elements. Override this if you want to avoid opacity changes.\r\n * @private\r\n *\r\n */\r\n applyAlpha: function () {\r\n this.svgNodes.attr({opacity: this.alpha})\r\n },\r\n\r\n /**\r\n * @private\r\n */\r\n applyTransformation: function () {\r\n let s =\r\n \"S\" + this.scaleX + \",\" + this.scaleY + \",0,0 \" +\r\n \"R\" + this.rotationAngle + \",\" + ((this.getWidth() / 2) | 0) + \",\" + ((this.getHeight() / 2) | 0) +\r\n \"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY() +\r\n \"\"\r\n this.svgNodes.transform(s)\r\n if (this.rotationAngle === 90 || this.rotationAngle === 270) {\r\n let before = this.svgNodes.getBBox(true)\r\n let ratio = before.height / before.width\r\n let reverseRatio = before.width / before.height\r\n let rs = \"...S\" + ratio + \",\" + reverseRatio + \",\" + (this.getAbsoluteX() + this.getWidth() / 2) + \",\" + (this.getAbsoluteY() + this.getHeight() / 2)\r\n this.svgNodes.transform(rs)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. Additional\r\n * the internal model changed as well.\r\n *\r\n * Optional: Inserts current object in front of the given one.\r\n *\r\n * @param {draw2d.Figure} [figure] move current object in front of the given one.\r\n * @since 3.0.0\r\n */\r\n toFront: function (figure) {\r\n ////////////////////////////////////////////////////////////////////\r\n // NOTE: the code has a complete different order of draw2d.Figure.\r\n // we must respect the svgNodes here\r\n ////////////////////////////////////////////////////////////////////\r\n\r\n // ensure that the z-oder is still correct if the figure is assigned\r\n // to a StrongComposite\r\n //\r\n if (this.composite instanceof draw2d.shape.composite.StrongComposite && (typeof figure !== \"undefined\")) {\r\n let indexFigure = figure.getZOrder()\r\n let indexComposite = this.composite.getZOrder()\r\n if (indexFigure < indexComposite) {\r\n figure = this.composite\r\n }\r\n }\r\n\r\n if (typeof figure === \"undefined\") {\r\n // bring the outer frame in front...\r\n this.getShapeElement().toFront()\r\n\r\n // and all inner children\r\n //\r\n this.svgNodes?.toFront()\r\n\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n figures.add(this)\r\n } else if (lines.remove(this) !== null) {\r\n lines.add(this)\r\n }\r\n }\r\n }\r\n else {\r\n // Bring the SVG shapes between the \"figure\" and the container of this shape\r\n //\r\n if (this.svgNodes !== null) {\r\n this.svgNodes.insertAfter(figure.getTopLevelShapeElement())\r\n }\r\n this.getShapeElement().insertAfter(figure.getTopLevelShapeElement())\r\n\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n let index = figures.indexOf(figure)\r\n figures.insertElementAt(this, index + 1)\r\n } else if (lines.remove(this) !== null) {\r\n lines.add(this)\r\n }\r\n }\r\n }\r\n\r\n\r\n // bring all children in front of the parent\r\n //\r\n this.children.each(function (i, child) {\r\n child.figure.toFront(figure)\r\n })\r\n\r\n // the ports are always on top\r\n //\r\n let _this = this\r\n this.getPorts().each(function (i, port) {\r\n port.getConnections().each(function (i, connection) {\r\n connection.toFront(figure)\r\n })\r\n // a port should always be in front of the shape doesn't matter what the\r\n // \"figure\" parameter says.\r\n //\r\n port.toFront(_this)\r\n })\r\n\r\n // and last but not lease the ResizeHandles if any present\r\n //\r\n this.selectionHandles.each(function (i, handle) {\r\n handle.toFront()\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Moves the element to the background. Additional\r\n * the internal model changed as well.\r\n *\r\n * Optional: Inserts current object in front of the given one.\r\n *\r\n * @param {draw2d.Figure} [figure] move current object in front of the given one.\r\n * @since 4.7.2\r\n */\r\n toBack: function (figure) {\r\n // it is not allowed that a figure is behind the assigned composite\r\n //\r\n if (this.composite instanceof draw2d.shape.composite.StrongComposite) {\r\n this.toFront(this.composite)\r\n return\r\n }\r\n\r\n // sort the JSON Doc\r\n //\r\n if (this.canvas !== null) {\r\n let figures = this.canvas.getFigures()\r\n let lines = this.canvas.getLines()\r\n if (figures.remove(this) !== null) {\r\n figures.insertElementAt(this, 0)\r\n }\r\n else if (lines.remove(this) !== null) {\r\n lines.insertElementAt(this, 0)\r\n }\r\n }\r\n\r\n // bring all children figures in front of the parent\r\n // run reverse to the collection to care about the z-order of the children)\r\n this.children.each( (i, child) => {\r\n child.figure.toBack(figure)\r\n }, true)\r\n\r\n if (this.svgNodes !== null) {\r\n if (typeof figure !== \"undefined\") {\r\n this.svgNodes.insertBefore(figure.getShapeElement())\r\n }\r\n else {\r\n this.svgNodes.toBack()\r\n }\r\n }\r\n\r\n\r\n if (this.canvas !== null) {\r\n if (typeof figure !== \"undefined\") {\r\n this.getShapeElement().insertBefore(figure.getShapeElement())\r\n }\r\n else {\r\n this.getShapeElement().toBack()\r\n }\r\n }\r\n\r\n // and last but not least - the ports are always on top\r\n //\r\n this.getPorts().each((i, port) => {\r\n port.getConnections().each((i, connection) => {\r\n connection.toFront(this)\r\n })\r\n // a port should always be in front of the shape doesn't matter what the\r\n // \"figure\" parameter says.\r\n //\r\n port.toFront(this)\r\n })\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getTopLevelShapeElement: function () {\r\n if (this.svgNodes.length === 0) {\r\n return this.shape\r\n }\r\n return this.svgNodes\r\n },\r\n\r\n /**\r\n * @private\r\n */\r\n createShapeElement: function () {\r\n // NOTE: don't change the order of the two calls. This defines the z-oder in the canvas.\r\n // The \"set\" must always be on top.\r\n let shape = this.canvas.paper.rect(this.getX(), this.getY(), this.getWidth(), this.getHeight())\r\n this.svgNodes = this.createSet()\r\n\r\n // check if the element is a \"set\" or a simple raphael shape. otherwise we wrap them into a set\r\n //\r\n if (typeof this.svgNodes.forEach === \"undefined\") {\r\n let set = this.canvas.paper.set()\r\n set.push(this.svgNodes)\r\n this.svgNodes = set\r\n }\r\n\r\n this.svgNodes.attr({\"stroke-scale\": this.strokeScale})\r\n\r\n // update the visibility of the children\r\n this.setVisible(this.visible)\r\n\r\n // propagate the CSS style to all set elements\r\n this.setCssClass(this.cssClass)\r\n\r\n let bb = this.svgNodes.getBBox()\r\n this.originalWidth = bb.width\r\n this.originalHeight = bb.height\r\n\r\n return shape\r\n },\r\n\r\n /**\r\n * \r\n * Override this method to add your own SVG elements. See {@link draw2d.shape.basic.Label} as example.\r\n *\r\n * @template\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.set() // return empty set as default;\r\n }\r\n\r\n})\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n * The base class for all vector based figures like {@link draw2d.shape.basic.Rectangle} or {@link draw2d.shape.basic.Oval}\r\n * inside a canvas.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.node.Node\r\n */\r\ndraw2d.VectorFigure = draw2d.shape.node.Node.extend(\r\n /** @lends draw2d.VectorFigure.prototype */\r\n {\r\n \r\n NAME: \"draw2d.VectorFigure\",\r\n \r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function( attr, setter, getter)\r\n {\r\n this.stroke = 1;\r\n this.radius = 0;\r\n this.bgColor= new draw2d.util.Color(\"#ffffff\");\r\n this.color = new draw2d.util.Color(\"#303030\");\r\n this.dasharray = null;\r\n\r\n // memento for the stroke if we reset the glow effect of this shape\r\n //\r\n this.strokeBeforeGlow = this.stroke;\r\n this.glowIsActive = false;\r\n\r\n this._super( attr,\r\n {\r\n // @attr {String} dasharray the line pattern see {@link draw2d.shape.basic.Line#setDashArray} for more information*/\r\n dasharray : this.setDashArray,\r\n // @attr {Number} radius the radius to render the line edges */\r\n radius : this.setRadius,\r\n // @attr {String|draw2d.util.Color} bgColor the background color of the shape */\r\n bgColor: this.setBackgroundColor,\r\n // @attr {String|draw2d.util.Color} color the main color of the shape */\r\n color : this.setColor,\r\n // @attr {Number} stroke the stroke width */\r\n stroke : this.setStroke,\r\n ...setter},\r\n {\r\n dasharray: this.getDashArray,\r\n radius : this.getRadius,\r\n bgColor: this.getBackgroundColor,\r\n color : this.getColor,\r\n stroke : this.getStroke,\r\n ...getter}\r\n )\r\n },\r\n\r\n /**\r\n * \r\n * Sets the corner radius or the edges.\r\n *\r\n * @param {Number} radius\r\n * @since 4.2.1\r\n */\r\n setRadius: function(radius)\r\n {\r\n this.radius = radius;\r\n this.repaint();\r\n this.fireEvent(\"change:radius\",{value:this.radius});\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Get the corner radius of the edges.\r\n *\r\n * @returns {Number}\r\n * @since 4.2.1\r\n */\r\n getRadius: function()\r\n {\r\n return this.radius;\r\n },\r\n\r\n\r\n\r\n /**\r\n * \r\n * Set the line style for this object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * dash: dashPattern\r\n * });\r\n *\r\n * @param {String} dash can be one of this [\"\", \"-\", \".\", \"-.\", \"-..\", \". \", \"- \", \"--\", \"- .\", \"--.\", \"--..\"]\r\n */\r\n setDashArray: function(dashPattern)\r\n {\r\n this.dasharray = dashPattern;\r\n this.repaint();\r\n\r\n this.fireEvent(\"change:dashArray\",{value:this.dasharray});\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Get the line style for this object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr(\"dash\");\r\n *\r\n * @since 5.1.0\r\n */\r\n getDashArray: function()\r\n {\r\n return this.dasharray;\r\n },\r\n\r\n /**\r\n * \r\n * Highlight the element or remove the highlighting\r\n *\r\n * @param {Boolean} flag indicates glow/noGlow\r\n */\r\n setGlow: function(flag)\r\n {\r\n\r\n if(flag === this.glowIsActive) {\r\n return this;\r\n }\r\n\r\n this.glowIsActive = flag;\r\n if(flag===true){\r\n this.strokeBeforeGlow = this.getStroke();\r\n this.setStroke(this.strokeBeforeGlow*1.5);\r\n }\r\n else {\r\n this.setStroke(this.strokeBeforeGlow);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function(attributes)\r\n {\r\n if (this.repaintBlocked===true || this.shape === null){\r\n return;\r\n }\r\n\r\n attributes??={};\r\n\r\n attributes.x = this.getAbsoluteX();\r\n attributes.y = this.getAbsoluteY();\r\n\r\n if(typeof attributes.stroke===\"undefined\"){\r\n if(this.color === null || this.stroke ===0){\r\n attributes.stroke = \"none\";\r\n }\r\n else {\r\n attributes.stroke = this.color.rgba();\r\n }\r\n }\r\n\r\n attributes[\"stroke-width\"] ??= this.stroke\r\n attributes[\"fill\"] ??=this.bgColor.rgba()\r\n attributes[\"dasharray\"] ??= this.dasharray\r\n attributes[\"stroke-dasharray\"] ??= this.dasharray\r\n\r\n this._super(attributes);\r\n\r\n return this;\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the new background color of the figure. It is possible to hands over\r\n * <code>null</code> to set the background transparent.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * \"bgColor\": \"#f0f0f0\"\r\n * });\r\n *\r\n * @param {String|draw2d.util.Color} color The new background color of the figure\r\n **/\r\n setBackgroundColor: function(color)\r\n {\r\n this.bgColor = new draw2d.util.Color(color);\r\n\r\n this.repaint();\r\n this.fireEvent(\"change:bgColor\",{value:this.bgColor});\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * The current used background color.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * var color =figure.attr(\"bgColor\");\r\n *\r\n * @returns {draw2d.util.Color}\r\n */\r\n getBackgroundColor: function()\r\n {\r\n return this.bgColor;\r\n },\r\n\r\n /**\r\n * \r\n * Set the stroke to use.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * \"stroke\": 2\r\n * });\r\n *\r\n * @param {Number} w The new line width of the figure\r\n **/\r\n setStroke: function( w )\r\n {\r\n this.stroke=w;\r\n this.repaint();\r\n this.fireEvent(\"change:stroke\",{value:this.stroke});\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * The used line width.\r\n *\r\n * @returns {Number}\r\n **/\r\n getStroke: function( )\r\n {\r\n return this.stroke;\r\n },\r\n\r\n /**\r\n * \r\n * Set the foreground color of the figure.\r\n * This method fires a <i>document dirty</i> event.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * \"color\": \"#f3f3f3\"\r\n * });\r\n *\r\n * @param {String|draw2d.util.Color} color The new color of the line.\r\n **/\r\n setColor: function( color)\r\n {\r\n this.color = new draw2d.util.Color(color);\r\n this.repaint();\r\n this.fireEvent(\"change:color\",{value:this.color});\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * \r\n * Get the current used foreground color\r\n *\r\n *\r\n * @returns {draw2d.util.Color}\r\n */\r\n getColor: function()\r\n {\r\n return this.color;\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function()\r\n {\r\n return {...this._super(), \r\n bgColor : this.bgColor.rgba(),\r\n color : this.color.rgba(),\r\n stroke : this.stroke,\r\n radius : this.radius,\r\n dasharray : this.dasharray\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function(memento)\r\n {\r\n this._super(memento);\r\n\r\n if(typeof memento.radius !==\"undefined\"){\r\n this.setRadius(memento.radius);\r\n }\r\n\r\n if(typeof memento.bgColor !== \"undefined\"){\r\n this.setBackgroundColor(memento.bgColor);\r\n }\r\n\r\n if(typeof memento.color !== \"undefined\"){\r\n this.setColor(memento.color);\r\n }\r\n\r\n if(typeof memento.stroke !== \"undefined\" ){\r\n this.setStroke(memento.stroke===null?0:parseFloat(memento.stroke));\r\n }\r\n\r\n if(typeof memento.dasharray ===\"string\"){\r\n this.dasharray = memento.dasharray;\r\n }\r\n\r\n\r\n return this;\r\n }\r\n\r\n\r\n});\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Commands are passed around throughout editing. They are used to encapsulate and combine\r\n * changes to the application's model. An application has a single command stack. Commands must\r\n * be executed using the command stack rather than directly calling execute.\r\n * <br>\r\n * This is required for a generic support for the undo/redo concept within draw2d.<br>\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n */\r\ndraw2d.command.Command = Class.extend(\r\n /** @lends draw2d.command.Command.prototype */\r\n {\r\n \r\n NAME: \"draw2d.command.Command\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {String} label\r\n */\r\n init: function (label) {\r\n this.label = label\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns a label of the Command. e.g. `move figure`.\r\n *\r\n * @returns {String} the label for this command\r\n **/\r\n getLabel: function () {\r\n return this.label\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time.\r\n * Sup-classes must implement this method.\r\n *\r\n * @template\r\n **/\r\n execute: function () {\r\n },\r\n\r\n /**\r\n * \r\n * Will be called if the user cancel the operation.\r\n *\r\n * @template\r\n **/\r\n cancel: function () {\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command.\r\n * Sup-classes must implement this method.\r\n *\r\n * @template\r\n **/\r\n undo: function () {\r\n },\r\n\r\n /**\r\n * \r\n * Redo the command after the user has undo this command.\r\n * Sup-classes must implement this method.\r\n *\r\n * @template\r\n **/\r\n redo: function () {\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command to add a figure with CommandStack support.\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandAdd = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandAdd.prototype */\r\n {\r\n \r\n NAME: \"draw2d.command.CommandAdd\",\r\n\r\n /**\r\n * Create a add command for the given figure.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to use\r\n * @param {draw2d.Figure} figure the figure to add\r\n * @param {Number|draw2d.geo.Point} x the x-coordinate or a complete point where to place the figure\r\n * @param {Number} [y] the y-coordinate if x is a number and not a complete point\r\n */\r\n init: function (canvas, figure, x, y) {\r\n this._super(draw2d.Configuration.i18n.command.addShape)\r\n this.figure = figure\r\n this.canvas = canvas\r\n this.pos = new draw2d.geo.Point(x, y)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n // we can only add the figure once to the canvas\r\n return this.figure.getCanvas() === null\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.canvas.add(this.figure, this.pos.x, this.pos.y)\r\n },\r\n\r\n /**\r\n * \r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.execute()\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.canvas.remove(this.figure)\r\n }\r\n\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Add a vertex to a polyline or polygon\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandAddVertex = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandAddVertex.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandAddVertex\",\r\n\r\n /**\r\n * Create a new Command objects which add a vertex to a PolyLine / Polygon.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} line the related line\r\n * @param {Number} index the index where to add\r\n * @param {Number} x the x coordinate for the new vertex\r\n * @param {Number} y the y coordinate for the new vertex\r\n */\r\n init: function (line, index, x, y) {\r\n this._super(draw2d.Configuration.i18n.command.addVertex)\r\n\r\n this.line = line\r\n this.index = index\r\n this.newPoint = new draw2d.geo.Point(x, y)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.line.removeVertexAt(this.index)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.line.insertVertexAt(this.index, this.newPoint.x, this.newPoint.y)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Assign a figure to a compiste\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n * @since 4.9.0\r\n */\r\ndraw2d.command.CommandAssignFigure = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandAssignFigure.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandAssignFigure\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Figure} figure the figure to assign\r\n * @param {draw2d.Figure} composite the composite where the figure should assign\r\n */\r\n init: function (figure, composite) {\r\n this._super(draw2d.Configuration.i18n.command.assignShape)\r\n\r\n this.figure = figure\r\n this.composite = composite\r\n this.assignedConnections = new draw2d.util.ArrayList()\r\n this.isNode = this.figure instanceof draw2d.shape.node.Node\r\n this.oldBoundingBox = composite.getBoundingBox()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.composite.assignFigure(this.figure)\r\n\r\n // get all connections of the shape and check if source/target node\r\n // part of the composite. In this case the connection will be part of\r\n // the composite as well\r\n if (this.isNode === true) {\r\n let connections = this.figure.getConnections()\r\n let _this = this\r\n connections.each(function (i, connection) {\r\n if (connection.getSource().getParent().getComposite() === _this.composite && connection.getTarget().getParent().getComposite() === _this.composite) {\r\n if (connection.getComposite() !== _this.composite) {\r\n _this.assignedConnections.add({oldComposite: connection.getComposite(), connection: connection})\r\n _this.composite.assignFigure(connection)\r\n }\r\n }\r\n })\r\n }\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.composite.unassignFigure(this.figure)\r\n this.assignedConnections.each( (i, entry) =>{\r\n if (entry.oldComposite !== null) {\r\n entry.oldComposite.assignFigure(entry.connection)\r\n }\r\n else {\r\n entry.connection.getComposite().unassignFigure(entry.connection)\r\n }\r\n })\r\n this.composite.stickFigures = true\r\n this.composite.setBoundingBox(this.oldBoundingBox)\r\n this.composite.stickFigures = false\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.composite.setBoundingBox(this.oldBoundingBox)\r\n this.composite.assignFigure(this.figure)\r\n this.assignedConnections.each( (i, entry) => this.composite.assignFigure(entry.connection))\r\n }\r\n})\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *Command to change attributes of a shape with undo/redo support\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandAttr = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandAttr.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandAttr\",\r\n\r\n /**\r\n * Create a new Command objects which provides undo/redo for attributes.\r\n *\r\n * @param {draw2d.Figure} figure the figure to handle\r\n * @param {Object} attributes new attributes to set\r\n */\r\n init: function (figure, newAttributes) {\r\n this._super(draw2d.Configuration.i18n.command.changeAttributes)\r\n\r\n this.figure = figure\r\n this.newAttributes = newAttributes\r\n this.oldAttributes = {}\r\n // Get the current attributes from the shape before we modify them.\r\n // Required for undo/redo\r\n Object.keys(newAttributes).forEach( (key) => {\r\n this.oldAttributes[key] = figure.attr(key)\r\n })\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.figure.attr(this.oldAttributes)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.figure.attr(this.newAttributes)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Set the bounding box of a figure with undo/redo support\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandBoundingBox = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandResize.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandResize\",\r\n\r\n /**\r\n * Create a new resize Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Figure} figure the figure to resize\r\n * @param {draw2d.geo.Rectangle} boundingBox the new bounding box of the figure\r\n */\r\n init: function (figure, boundingBox) {\r\n this._super(draw2d.Configuration.i18n.command.resizeShape)\r\n this.figure = figure\r\n this.oldBoundingBox = this.figure.getBoundingBox()\r\n this.newBoundingBox = boundingBox\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return !this.oldBoundingBox.equals(this.newBoundingBox)\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.figure.setBoundingBox(this.oldBoundingBox)\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.figure.setBoundingBox(this.newBoundingBox)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A CommandCollection works as a single command. You can add more than one\r\n * Command to this CommandCollection and execute/undo them onto the CommandStack as a\r\n * single Command.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandCollection = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandCollection.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandCollection\",\r\n\r\n /**\r\n * Create a new CommandConnect objects which can be execute via the CommandStack.\r\n *\r\n * @param {String} [commandLabel] the label to show on the command stack for the undo/redo operation\r\n */\r\n init: function (commandLabel) {\r\n this._super((typeof commandLabel === 'undefined') ? draw2d.Configuration.i18n.command.collection : commandLabel)\r\n\r\n this.commands = new draw2d.util.ArrayList()\r\n },\r\n\r\n /**\r\n *\r\n * Returns a label of the Command. e.g. \"move figure\".\r\n *\r\n * @returns {String} the label for this command\r\n **/\r\n getLabel: function () {\r\n //return the label of the one and only command\r\n //\r\n if (this.commands.getSize() === 1) {\r\n return this.commands.first().getLabel()\r\n }\r\n\r\n // return a common label if all commands have the same label.\r\n //\r\n if (this.commands.getSize() > 1) {\r\n let labels = this.commands.clone().map(function (e) {\r\n return e.getLabel()\r\n })\r\n labels.unique()\r\n if (labels.getSize() === 1) {\r\n return labels.first()\r\n }\r\n }\r\n\r\n // return the all purpose label.\r\n return this._super()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Add a command to the collection.\r\n *\r\n * @param {draw2d.command.Command} command\r\n */\r\n add: function (command) {\r\n this.commands.add(command)\r\n },\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // We ask all cmd's if they make any changes.\r\n // Keep in mind: the command will be execute if at least ONE command return [true]!!!!\r\n // doesn't matter if the other commands return [false].\r\n // The method should be renamed into: modifiesTheModel()....design flaw.\r\n let canExec = false\r\n this.commands.each(function (i, cmd) {\r\n canExec = canExec || cmd.canExecute()\r\n })\r\n return canExec\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.commands.each(function (i, cmd) {\r\n cmd.execute()\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command.\r\n *\r\n **/\r\n redo: function () {\r\n this.commands.each(function (i, cmd) {\r\n cmd.redo()\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command.\r\n *\r\n **/\r\n undo: function () {\r\n // execute the undo operation in reverse direction.\r\n\r\n this.commands.reverse()\r\n this.commands.each(function (i, cmd) {\r\n cmd.undo()\r\n })\r\n this.commands.reverse()\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Connects two ports with a connection.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandConnect = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandConnect.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandConnect\",\r\n\r\n /**\r\n * Create a new CommandConnect objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Port} source the source port for the connection to create\r\n * @param {draw2d.Port} target the target port for the connection to create\r\n * @param {draw2d.Port} [dropTarget] the port who has initiate the connection creation. mainly the drop target\r\n */\r\n init: function (source, target, dropTarget) {\r\n this._super(draw2d.Configuration.i18n.command.connectPorts)\r\n this.canvas = target.getCanvas()\r\n this.source = source\r\n this.target = target\r\n this.connection = null\r\n this.dropTarget = dropTarget // optional\r\n },\r\n\r\n /**\r\n *\r\n * set the connection to use. called by the ConnectionCreatePolicy\r\n */\r\n setConnection: function (connection) {\r\n this.connection = connection\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the fresh created connection if available. Used in the\r\n * ClickConnectionCreatePolicy to customize the router and vertices.\r\n *\r\n * @returns {null|draw2d.Connection}\r\n * @since 6.1.0\r\n */\r\n getConnection: function () {\r\n return this.connection\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n let optionalCallback = conn => {\r\n this.connection = conn\r\n this.connection.setSource(this.source)\r\n this.connection.setTarget(this.target)\r\n this.canvas.add(this.connection)\r\n }\r\n\r\n // the createConnection must return either a connection or \"undefined\". If the method return \"undefined\"\r\n // the asynch callback must be called. Usefull if the createConnection shows a selection dialog\r\n //\r\n if (this.connection === null) {\r\n // deprecated call!!!!\r\n //\r\n let result = draw2d.Configuration.factory.createConnection(this.source, this.target, optionalCallback, this.dropTarget)\r\n debugger\r\n // will be handled by the optional callback\r\n if (typeof result === \"undefined\") {\r\n return\r\n }\r\n\r\n this.connection = result\r\n }\r\n\r\n optionalCallback(this.connection)\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command.\r\n *\r\n **/\r\n redo: function () {\r\n this.canvas.add(this.connection)\r\n this.connection.reconnect()\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command.\r\n *\r\n **/\r\n undo: function () {\r\n this.canvas.remove(this.connection)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Command to remove a figure with CommandStack support.\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandDelete = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandDelete.prototype */\r\n {\r\n NAME: \"draw2d.command.CommandDelete\",\r\n\r\n /**\r\n * Create a delete command for the given figure.\r\n *\r\n * @param {draw2d.Figure} figure\r\n */\r\n init: function (figure) {\r\n this._super(draw2d.Configuration.i18n.command.deleteShape)\r\n\r\n this.parent = figure.getParent()\r\n this.figure = figure\r\n this.canvas = figure.getCanvas()\r\n this.connections = null\r\n this.removedParentEntry = null // can be null if the figure didn't have any parent shape assigned\r\n this.indexOfChild = -1\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n // we can only delete the figure if its part of the canvas.\r\n return this.figure.getCanvas() !== null\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n if (this.parent !== null) {\r\n this.parent.add(this.removedParentEntry.figure, this.removedParentEntry.locator, this.indexOfChild)\r\n this.canvas.setCurrentSelection(this.parent)\r\n }\r\n else {\r\n this.canvas.add(this.figure)\r\n this.canvas.setCurrentSelection(this.figure)\r\n }\r\n\r\n if (this.figure instanceof draw2d.Connection) {\r\n this.figure.reconnect()\r\n }\r\n\r\n\r\n for (let i = 0; i < this.connections.getSize(); ++i) {\r\n this.canvas.add(this.connections.get(i))\r\n this.connections.get(i).reconnect()\r\n }\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.canvas.setCurrentSelection(null)\r\n\r\n // Collect all connections that are bounded to the figure to delete. This connections\r\n // must be deleted too.\r\n //\r\n if (this.connections === null) {\r\n if (this.figure instanceof draw2d.shape.node.Node) {\r\n this.connections = this.figure.getConnections()\r\n }\r\n else {\r\n this.connections = new draw2d.util.ArrayList()\r\n }\r\n }\r\n\r\n // already done in the canvas.remove(..) method\r\n // if(this.figure instanceof draw2d.Connection){\r\n // this.figure.disconnect();\r\n // }\r\n\r\n\r\n // remove all connections\r\n //\r\n for (let i = 0; i < this.connections.getSize(); ++i) {\r\n this.canvas.remove(this.connections.get(i))\r\n }\r\n\r\n // remove this figure from the parent\r\n //\r\n if (this.parent !== null) {\r\n // determine the index of the child before remove\r\n this.indexOfChild = this.parent.getChildren().indexOf(this.figure)\r\n this.removedParentEntry = this.parent.remove(this.figure)\r\n }\r\n // or from the canvas\r\n else {\r\n this.canvas.remove(this.figure)\r\n }\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command to remove a group with all related children.\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandDeleteGroup = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandDeleteGroup.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandDeleteGroup\",\r\n\r\n /**\r\n * Create a delete command for the given figure.\r\n *\r\n * @param {draw2d.shape.composite.Group} group\r\n */\r\n init: function (group) {\r\n this._super(draw2d.Configuration.i18n.command.deleteShape)\r\n\r\n this.parent = group.getParent()\r\n this.group = group\r\n this.canvas = group.getCanvas()\r\n this.batchDelete = null\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n // we can only delete the shape if a children can be deleted\r\n //\r\n let children = this.group.getAssignedFigures()\r\n for (let i = 0; i < children.getSize(); i++) {\r\n if (children.get(i).isDeleteable() === false) {\r\n return false\r\n }\r\n }\r\n\r\n // we can only delete the figure if its part of the canvas.\r\n return this.group.getCanvas() !== null\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.batchDelete.undo()\r\n this.canvas.setCurrentSelection(this.group)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n if (this.batchDelete === null) {\r\n this.batchDelete = new draw2d.command.CommandCollection()\r\n\r\n // remove the assignment of the children to the group before we delete the group\r\n //\r\n this.batchDelete.add(new draw2d.command.CommandUngroup(this.canvas, this.group))\r\n\r\n // add the delete command of the children to the batch\r\n //\r\n let children = this.group.getAssignedFigures()\r\n for (let i = 0; i < children.getSize(); i++) {\r\n let child = children.get(i)\r\n // request a delete Command from the child instead of create one by my own. May the child\r\n // provides its own implementation\r\n let cmd = child.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.DELETE))\r\n this.batchDelete.add(cmd)\r\n }\r\n\r\n }\r\n\r\n\r\n this.batchDelete.execute()\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Command to group a given set of figures\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandGroup = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandGroup.prototype */\r\n {\r\n \r\n NAME: \"draw2d.command.CommandGroup\",\r\n\r\n /**\r\n * Create a group command for the given figure.\r\n *\r\n * @param {draw2d.util.ArrayList} figures the figures to group\r\n */\r\n init: function (canvas, figures) {\r\n this._super(draw2d.Configuration.i18n.command.groupShapes)\r\n if (figures instanceof draw2d.Selection) {\r\n this.figures = figures.getAll()\r\n }\r\n else {\r\n this.figures = figures\r\n }\r\n\r\n // figures which already part of an non \"Group\" composite will be removed from the set.\r\n // It is not possible to assign a figure to two different composites.\r\n //\r\n this.figures.grep(function (figure) {\r\n return figure.getComposite() === null\r\n })\r\n\r\n this.canvas = canvas\r\n this.group = new draw2d.shape.composite.Group()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n return !this.figures.isEmpty()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n let _this = this\r\n this.figures.each(function (i, figure) {\r\n _this.group.unassignFigure(figure)\r\n })\r\n\r\n this.canvas.remove(this.group)\r\n this.canvas.setCurrentSelection(this.figures)\r\n },\r\n\r\n /**\r\n * \r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n let _this = this\r\n this.figures.each(function (i, figure) {\r\n _this.group.assignFigure(figure)\r\n })\r\n\r\n this.canvas.add(this.group)\r\n this.canvas.setCurrentSelection(this.group)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command for the movement of figures.\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandMove = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandMove.prototype */\r\n {\r\n NAME: \"draw2d.command.CommandMove\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Figure} figure the figure to move\r\n * @param {Number} [x] the current x position\r\n * @param {Number} [y] the current y position\r\n */\r\n init: function (figure, x, y) {\r\n this._super(draw2d.Configuration.i18n.command.moveShape)\r\n this.figure = figure\r\n if (typeof x === \"undefined\") {\r\n this.oldX = figure.getX()\r\n this.oldY = figure.getY()\r\n }\r\n else {\r\n this.oldX = x\r\n this.oldY = y\r\n }\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the initial position of the element\r\n *\r\n * @param {Number} x the new initial x position\r\n * @param {Number} y the new initial y position\r\n **/\r\n setStartPosition: function (x, y) {\r\n this.oldX = x\r\n this.oldY = y\r\n },\r\n\r\n /**\r\n * \r\n * Set the target/final position of the figure move command.\r\n *\r\n * @param {Number} x the new x position\r\n * @param {Number} y the new y position\r\n **/\r\n setPosition: function (x, y) {\r\n this.newX = x\r\n this.newY = y\r\n },\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.newX !== this.oldX || this.newY !== this.oldY\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.figure.setPosition(this.oldX, this.oldY)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.figure.setPosition(this.newX, this.newY)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command for the movement of figures.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandMoveConnection = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandMoveConnection.prototype */\r\n {\r\n \r\n NAME: \"draw2d.command.CommandMoveConnection\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Connection} figure the connection to move\r\n */\r\n init: function (figure) {\r\n this._super(draw2d.Configuration.i18n.command.moveLine)\r\n this.line = figure\r\n this.dx = 0\r\n this.dy = 0\r\n },\r\n\r\n /**\r\n * \r\n * set the offset of the line translation\r\n *\r\n * @param {Number} dx\r\n * @param {Number} dy\r\n */\r\n setTranslation: function (dx, dy) {\r\n this.dx = dx\r\n this.dy = dy\r\n },\r\n\r\n /**\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.dx !== 0 && this.dy !== 0\r\n },\r\n\r\n /**\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n let _this = this\r\n this.line.getVertices().each(function (i, e) {\r\n e.translate(-_this.dx, -_this.dy)\r\n })\r\n this.line.svgPathString = null\r\n // required to update resize handles and the painting of the line\r\n this.line.setPosition(this.line.getStartPosition())\r\n },\r\n\r\n /**\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n let _this = this\r\n this.line.getVertices().each(function (i, e) {\r\n e.translate(_this.dx, _this.dy)\r\n })\r\n this.line.svgPathString = null\r\n\r\n // required to update resize handles and the painting of the line\r\n this.line.setPosition(this.line.getStartPosition())\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command for the movement of figures.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandMoveLine = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandMoveLine.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandMoveLine\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.shape.basic.Line} figure the line to move\r\n */\r\n init: function (figure) {\r\n this._super(draw2d.Configuration.i18n.command.moveLine)\r\n this.line = figure\r\n this.dx = 0\r\n this.dy = 0\r\n },\r\n\r\n /**\r\n *\r\n * set the offset of the line translation\r\n *\r\n * @param {Number} dx\r\n * @param {Number} dy\r\n */\r\n setTranslation: function (dx, dy) {\r\n this.dx = dx\r\n this.dy = dy\r\n },\r\n\r\n /**\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.dx !== 0 && this.dy !== 0\r\n },\r\n\r\n /**\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n let _this = this\r\n this.line.getVertices().each(function (i, e) {\r\n e.translate(-_this.dx, -_this.dy)\r\n })\r\n this.line.svgPathString = null\r\n // required to update resize handles and the painting of the line\r\n this.line.setPosition(this.line.getStartPosition())\r\n },\r\n\r\n /**\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n let _this = this\r\n this.line.getVertices().each(function (i, e) {\r\n e.translate(_this.dx, _this.dy)\r\n })\r\n this.line.svgPathString = null\r\n\r\n // required to update resize handles and the painting of the line\r\n this.line.setPosition(this.line.getStartPosition())\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command for the vertex movement of a polyline/polygon.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandMoveVertex = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandMoveVertex.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandMoveVertex\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} line the related line\r\n */\r\n init: function (line) {\r\n this._super(draw2d.Configuration.i18n.command.moveVertex)\r\n\r\n this.line = line\r\n this.index = -1\r\n this.newPoint = null\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the index of the vertex of the polyline/polygon to modify.\r\n *\r\n * @param {Number} index the related index of the vertex\r\n **/\r\n setIndex: function (index) {\r\n this.index = index\r\n this.origPoint = this.line.getVertices().get(this.index).clone()\r\n },\r\n\r\n updatePosition: function (x, y) {\r\n this.newPoint = new draw2d.geo.Point(x, y)\r\n },\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.index !== -1 && this.newPoint !== null\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.line.setVertex(this.index, this.origPoint.x, this.origPoint.y)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.line.setVertex(this.index, this.newPoint.x, this.newPoint.y)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Command for the vertices movement of a polyline/polygon.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandMoveVertices = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandMoveVertices.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandMoveVertices\",\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} line the related line\r\n */\r\n init: function (line) {\r\n this._super(draw2d.Configuration.i18n.command.moveVertices)\r\n\r\n this.line = line\r\n this.oldVertices = line.getVertices().clone(true)\r\n this.newVertices = null\r\n },\r\n\r\n\r\n updateVertices: function (newVertices) {\r\n this.newVertices = newVertices\r\n },\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.newVertices !== null\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.line.setVertices(this.oldVertices)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.line.setVertices(this.newVertices)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Reconnects two ports. This command is used during the DragDrop operation of a draw2d.Connection.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandReconnect = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandReconnect.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandReconnect\",\r\n\r\n\r\n /**\r\n * Create a new Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Connection} conn the related Connection which is currently in the drag&drop operation\r\n */\r\n init: function (conn) {\r\n this._super(draw2d.Configuration.i18n.command.connectPorts)\r\n this.con = conn\r\n this.oldSourcePort = conn.getSource()\r\n this.oldTargetPort = conn.getTarget()\r\n },\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * The new ports to use during the execute of this command.\r\n *\r\n * @param {draw2d.Port} source\r\n * @param {draw2d.Port} target\r\n */\r\n setNewPorts: function (source, target) {\r\n this.newSourcePort = source\r\n this.newTargetPort = target\r\n },\r\n\r\n\r\n setIndex: function (index) {\r\n // do nothing....but method is required for LineResizeHandle\r\n // With this common interface the ResizeHandle can handle Lines and Connections\r\n // with the same code\r\n },\r\n\r\n /**\r\n * compatibily method to the CommandMoveVertex to handle Line and Connections\r\n * transparent in the ResizeHandles\r\n *\r\n * @param x\r\n * @param y\r\n */\r\n updatePosition: function (x, y) {\r\n // do nothing....but method is required for LineResizeHandle\r\n // With this common interface the ResizeHandle can handle Lines and Connections\r\n // with the same code\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n cancel: function () {\r\n this.con.setSource(this.oldSourcePort)\r\n this.con.setTarget(this.oldTargetPort)\r\n\r\n // force a routing of the connection and DON'T set the old reouter again because this reset all manual added\r\n // vertices\r\n this.con.routingRequired = true\r\n this.con.repaint()\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.con.setSource(this.oldSourcePort)\r\n this.con.setTarget(this.oldTargetPort)\r\n // force a routing of the connection and DON'T set the old reouter again because this reset all manual added\r\n // vertices\r\n this.con.routingRequired = true\r\n this.con.repaint()\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.con.setSource(this.newSourcePort)\r\n this.con.setTarget(this.newTargetPort)\r\n // force a routing of the connection and DON'T set the old reouter again because this reset all manual added\r\n // vertices\r\n this.con.routingRequired = true\r\n this.con.repaint()\r\n }\r\n\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Remove a vertex from a polyline or polygon\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandRemoveVertex = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandRemoveVertex.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandRemoveVertex\",\r\n\r\n /**\r\n * Create a new Command objects which add a vertex to a PloyLine.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} line the related line\r\n * @param {Number} index the index where to add\r\n */\r\n init: function (line, index) {\r\n this._super(draw2d.Configuration.i18n.command.deleteVertex)\r\n\r\n this.line = line\r\n this.index = index\r\n this.oldPoint = line.getVertices().get(index).clone()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.line.insertVertexAt(this.index, this.oldPoint.x, this.oldPoint.y)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.line.removeVertexAt(this.index)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Replace the vertices of a polyline.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandReplaceVertices = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandReplaceVertices.prototype */\r\n {\r\n \r\n NAME: \"draw2d.command.CommandReplaceVertices\",\r\n\r\n /**\r\n * Create a new Command objects which add a segment to a PolyLine / Polygon.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} line the related line\r\n * @param {draw2d.util.ArrayList} originalVertices the original vertices of the polyline\r\n * @param {draw2d.util.ArrayList} newVertices the new vertices of the polyline\r\n */\r\n init: function (line, originalVertices, newVertices) {\r\n this._super(draw2d.Configuration.i18n.command.addSegment)\r\n\r\n this.line = line\r\n this.originalVertices = originalVertices\r\n this.newVertices = newVertices\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Undo the move command\r\n *\r\n **/\r\n undo: function () {\r\n this.line.setVertices(this.originalVertices)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Redo the move command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.line.setVertices(this.newVertices)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Resize command for figures. Can be execute/undo/redo via a CommandStack.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandResize = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandResize.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandResize\",\r\n\r\n /**\r\n * Create a new resize Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Figure} figure the figure to resize\r\n * @param {Number} [width] the current width\r\n * @param {Number} [height] the current height\r\n */\r\n init: function (figure, width, height) {\r\n this._super(draw2d.Configuration.i18n.command.resizeShape)\r\n this.figure = figure\r\n\r\n if (typeof width === \"undefined\") {\r\n this.oldWidth = figure.getWidth()\r\n this.oldHeight = figure.getHeight()\r\n }\r\n else {\r\n this.oldWidth = width\r\n this.oldHeight = height\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Set the new dimension of the element.\r\n *\r\n * @param {Number} width the new width.\r\n * @param {Number} height the new height of the element.\r\n **/\r\n setDimension: function (width, height) {\r\n this.newWidth = width | 0\r\n this.newHeight = height | 0\r\n },\r\n\r\n /**\r\n * \r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.newWidth !== this.oldWidth || this.newHeight !== this.oldHeight\r\n },\r\n\r\n /**\r\n * \r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n * \r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.figure.setDimension(this.oldWidth, this.oldHeight)\r\n },\r\n\r\n /**\r\n * \r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.figure.setDimension(this.newWidth, this.newHeight)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Set the rotation angle of the given figure\r\n *\r\n * @since 4.4.1\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.command.Command\r\n */\r\ndraw2d.command.CommandRotate = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandRotate.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandRotate\",\r\n\r\n /**\r\n * Create a new resize Command objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.Figure} figure the figure to resize\r\n * @param {Number} angle the angle to rotate\r\n */\r\n init: function (figure, angle) {\r\n this._super(draw2d.Configuration.i18n.command.rotateShape)\r\n this.figure = figure\r\n\r\n this.oldAngle = figure.getRotationAngle()\r\n this.newAngle = angle\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modify the model. A CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. <br>\r\n * the execution of the Command doesn't modify the model.\r\n *\r\n * @returns {Boolean}\r\n **/\r\n canExecute: function () {\r\n // return false if we doesn't modify the model => NOP Command\r\n return this.oldAngle !== this.newAngle\r\n },\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n this.rotate(this.oldAngle)\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n this.rotate(this.newAngle)\r\n },\r\n\r\n rotate: function (angle) {\r\n let w = this.figure.getWidth()\r\n let h = this.figure.getHeight()\r\n\r\n this.figure.setRotationAngle(angle)\r\n\r\n this.figure.setDimension(h, w)\r\n\r\n this.figure.portRelayoutRequired = true\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * An implementation of a command stack. A stack manages the executing, undoing, and redoing of Commands. Executed\r\n * commands are pushed onto a a stack for undoing later. Commands which are undone are pushed onto a redo stack.\r\n * Whenever a new command is executed, the redo stack is flushed.\r\n *\r\n * You can retrieve the current used CommandStack just by calling <code>canvas.getCommandStack()</code>\r\n *\r\n */\r\ndraw2d.command.CommandStack = Class.extend(\r\n /** @lends draw2d.command.CommandStack.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandStack\",\r\n\r\n\r\n /**\r\n * Create a new CommandStack objects which can be execute via the CommandStack.\r\n *\r\n */\r\n init: function () {\r\n this.undostack = []\r\n this.redostack = []\r\n this.maxundo = 50\r\n this.transactionCommand = null\r\n this.eventListeners = new draw2d.util.ArrayList()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the maximal undo stack size. Entries will be remove if the max. stack\r\n * size has been reached.\r\n *\r\n * @param {Number} count The maximal undo stack size.\r\n * @returns {this}\r\n **/\r\n setUndoLimit: function (count) {\r\n this.maxundo = count\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Remove the undo / redo history. This is useful if the user has been save the\r\n * document.\r\n *\r\n * @returns {this}\r\n **/\r\n markSaveLocation: function () {\r\n this.undostack = []\r\n this.redostack = []\r\n\r\n // fire an empty command to inform all listener that the stack has been changed\r\n this.notifyListeners(new draw2d.command.Command(), draw2d.command.CommandStack.POST_EXECUTE)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Executes the specified Command if possible. Prior to executing the command, a\r\n * draw2d.command.CommandStackEvent for {@link #PRE_EXECUTE} will be fired to event listeners.\r\n * Similarly, after attempting to execute the command, an event for {@link #POST_EXECUTE}\r\n * will be fired.\r\n *\r\n * @param {draw2d.command.Command} command The command to execute.\r\n * @returns {this}\r\n **/\r\n execute: function (command) {\r\n if (typeof command === \"undefined\")\r\n throw \"Missing parameter [command] for method call CommandStack.execute\"\r\n\r\n // nothing to do\r\n if (command === null)\r\n return this//silently\r\n\r\n // return if the command can't execute or it doesn't change the model\r\n // => Empty command\r\n if (command.canExecute() === false)\r\n return this\r\n\r\n // A command stack transaction is open.\r\n // The execution will be postpone until the transaction will commit\r\n //\r\n if (this.transactionCommand !== null) {\r\n this.transactionCommand.add(command)\r\n return this\r\n }\r\n\r\n this.notifyListeners(command, draw2d.command.CommandStack.PRE_EXECUTE, \"PRE_EXECUTE\")\r\n\r\n this.undostack.push(command)\r\n command.execute()\r\n\r\n // cleanup the redo stack if the user execute a new command.\r\n // I think this will create a \"clean\" behaviour of the unde/redo mechanism.\r\n //\r\n this.redostack = []\r\n\r\n // monitor only the max. undo stack size\r\n //\r\n if (this.undostack.length > this.maxundo) {\r\n this.undostack = this.undostack.slice(this.undostack.length - this.maxundo)\r\n }\r\n this.notifyListeners(command, draw2d.command.CommandStack.POST_EXECUTE, \"POST_EXECUTE\")\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Opens a transaction for further multiple commands. If you execute a command all\r\n * {@ #execute} calls will be ignored until you commit the current transaction.\r\n *\r\n * @param {String} [commandLabel] the label to show for the undo/redo operation\r\n * @returns {this}\r\n * @since 4.0.0\r\n */\r\n startTransaction: function (commandLabel) {\r\n if (this.transactionCommand !== null) {\r\n debugger\r\n throw \"CommandStack is already within transactional mode. Don't call 'startTransaction\"\r\n }\r\n\r\n this.transactionCommand = new draw2d.command.CommandCollection(commandLabel)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns true if the Command Stack has an open transaction.\r\n * You can start or stop a transaction with `startTransaction`and `commitTransaction`.\r\n *\r\n * A transaction is one undo/redo operation.\r\n *\r\n * @returns {Boolean}\r\n */\r\n isInTransaction: function () {\r\n return this.transactionCommand !== null\r\n },\r\n\r\n /**\r\n *\r\n * Commit the running transaction. All commands between the start/end of a transaction\r\n * can be undo/redo in a single step.\r\n *\r\n * @since 4.0.0\r\n * @returns {this}\r\n */\r\n commitTransaction: function () {\r\n if (this.transactionCommand === null) {\r\n return this//silently\r\n }\r\n\r\n let cmd = this.transactionCommand\r\n this.transactionCommand = null\r\n // we can drop the CommandCollection if the collection contains only one command.\r\n if (cmd.commands.getSize() === 1) {\r\n this.execute(cmd.commands.first())\r\n }\r\n else {\r\n this.execute(cmd)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Undo on command from the stack and store them on the redo command stack.\r\n * @returns {this}\r\n **/\r\n undo: function () {\r\n let command = this.undostack.pop()\r\n if (command) {\r\n this.notifyListeners(command, draw2d.command.CommandStack.PRE_UNDO)\r\n this.redostack.push(command)\r\n command.undo()\r\n this.notifyListeners(command, draw2d.command.CommandStack.POST_UNDO)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Redo a command after the user has undo a command\r\n *\r\n * @returns {this}\r\n **/\r\n redo: function () {\r\n let command = this.redostack.pop()\r\n\r\n if (command) {\r\n this.notifyListeners(command, draw2d.command.CommandStack.PRE_REDO)\r\n this.undostack.push(command)\r\n command.redo()\r\n this.notifyListeners(command, draw2d.command.CommandStack.POST_REDO)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the label of the next REDO command.\r\n *\r\n * @returns {String}\r\n **/\r\n getRedoLabel: function () {\r\n if (this.redostack.length === 0)\r\n return \"\"\r\n\r\n let command = this.redostack[this.redostack.length - 1]\r\n\r\n if (command) {\r\n return command.getLabel()\r\n }\r\n return \"\"\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the label of the next UNDO command.\r\n *\r\n * @returns {String}\r\n **/\r\n getUndoLabel: function () {\r\n if (this.undostack.length === 0)\r\n return \"\"\r\n\r\n let command = this.undostack[this.undostack.length - 1]\r\n\r\n if (command) {\r\n return command.getLabel()\r\n }\r\n return \"\"\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Indicates whenever a REDO is possible.\r\n *\r\n * @returns {Boolean} <code>true</code> if it is appropriate to call {@link #redo()}.\r\n */\r\n canRedo: function () {\r\n return this.redostack.length > 0\r\n },\r\n\r\n /**\r\n *\r\n * indicator whenever a undo is possible.\r\n *\r\n * @returns {Boolean} <code>true</code> if {@link #undo()} can be called\r\n **/\r\n canUndo: function () {\r\n return this.undostack.length > 0\r\n },\r\n\r\n /**\r\n *\r\n * Adds a listener to the command stack, which will be notified whenever a command has been processed on the stack.\r\n * @deprecated use on/off to register events\r\n * @param {draw2d.command.CommandStackEventListener|Function} listener the listener to add.\r\n * @returns {this}\r\n */\r\n addEventListener: function (listener) {\r\n return this.on(\"change\", listener)\r\n },\r\n /**\r\n * Adds a listener to the command stack, which will be notified whenever a command has been processed on the stack.\r\n *\r\n * @param event\r\n * @param func\r\n * @returns {this}\r\n */\r\n on: function (event, listener) {\r\n if (event !== \"change\")\r\n throw \"only event of kind 'change' is supported\"\r\n\r\n if (listener instanceof draw2d.command.CommandStackEventListener) {\r\n this.eventListeners.add(listener)\r\n }\r\n else if (typeof listener.stackChanged === \"function\") {\r\n this.eventListeners.add(listener)\r\n }\r\n else if (typeof listener === \"function\") {\r\n this.eventListeners.add({stackChanged: listener})\r\n }\r\n else {\r\n throw \"Object doesn't implement required callback interface [draw2d.command.CommandStackListener]\"\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Removes a listener from the command stack.\r\n *\r\n * @deprecated use on/off to register events\r\n * @param {draw2d.command.CommandStackEventListener} listener the listener to remove.\r\n * @returns {this}\r\n */\r\n removeEventListener: function (listener) {\r\n this.off(listener)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * @param listener\r\n * @returns {this}\r\n */\r\n off: function (listener) {\r\n this.eventListeners.grep(entry => (entry === listener || entry.stackChanged === listener))\r\n /*\r\n let size = this.eventListeners.getSize()\r\n for (let i = 0; i < size; i++) {\r\n let entry = this.eventListeners.get(i)\r\n if (entry === listener || entry.stackChanged === listener) {\r\n this.eventListeners.remove(entry)\r\n return\r\n }\r\n }\r\n */\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Notifies command stack event listeners that the command stack has changed to the\r\n * specified state.\r\n *\r\n * @param {draw2d.command.Command} command the command\r\n * @param {Number} state the current stack state\r\n * @private\r\n **/\r\n notifyListeners: function (command, state, action) {\r\n let event = new draw2d.command.CommandStackEvent(this, command, state, action)\r\n let size = this.eventListeners.getSize()\r\n\r\n for (let i = 0; i < size; i++) {\r\n this.eventListeners.get(i).stackChanged(event)\r\n }\r\n }\r\n})\r\n\r\n\r\n// Constant indicating notification prior to executing a command (value is 1).\r\ndraw2d.command.CommandStack.PRE_EXECUTE = 1\r\n// Constant indicating notification prior to redoing a command (value is 2).\r\ndraw2d.command.CommandStack.PRE_REDO = 2\r\n// Constant indicating notification prior to undoing a command (value is 4).\r\ndraw2d.command.CommandStack.PRE_UNDO = 4\r\n// Constant indicating notification after a command has been executed (value is 8).\r\ndraw2d.command.CommandStack.POST_EXECUTE = 8\r\n// Constant indicating notification after a command has been redone (value is 16).\r\ndraw2d.command.CommandStack.POST_REDO = 16\r\n// Constant indicating notification after a command has been undone (value is 32).\r\ndraw2d.command.CommandStack.POST_UNDO = 32\r\n// Constant indicating notification after the stack has been (re)init (value is 64).\r\ndraw2d.command.CommandStack.POST_INIT = 64\r\n\r\ndraw2d.command.CommandStack.POST_MASK = draw2d.command.CommandStack.POST_EXECUTE | draw2d.command.CommandStack.POST_UNDO | draw2d.command.CommandStack.POST_REDO\r\ndraw2d.command.CommandStack.PRE_MASK = draw2d.command.CommandStack.PRE_EXECUTE | draw2d.command.CommandStack.PRE_UNDO | draw2d.command.CommandStack.PRE_REDO\r\n\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Event class which will be fired for every CommandStack operation. Required for CommandStackListener.\r\n */\r\ndraw2d.command.CommandStackEvent = Class.extend(\r\n /** @lends draw2d.command.CommandStackEvent.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandStackEvent\",\r\n\r\n /**\r\n * Create a new CommandStack objects which can be execute via the CommandStack.\r\n *\r\n * @param {draw2d.command.Command} command the related command\r\n * @param {Number} details the current state of the command execution\r\n *\r\n */\r\n init: function (stack, command, details, action) {\r\n this.stack = stack\r\n this.command = command\r\n this.details = details // deprecated\r\n this.action = action\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the corresponding stack of the event.\r\n *\r\n * @returns {draw2d.command.CommandStack}\r\n **/\r\n getStack: function () {\r\n return this.stack\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns null or a Command if a command is relevant to the current event.\r\n *\r\n * @returns {draw2d.command.Command}\r\n **/\r\n getCommand: function () {\r\n return this.command\r\n },\r\n\r\n /**\r\n *\r\n * Returns an integer identifying the type of event which has occurred.\r\n * Defined by {@link draw2d.command.CommandStack}.\r\n *\r\n * @returns {Number}\r\n **/\r\n getDetails: function () {\r\n return this.details\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns true if this event is fired after the stack having changed.\r\n *\r\n * @returns {Boolean} true if post-change event\r\n **/\r\n isPostChangeEvent: function () {\r\n return 0 !== (this.getDetails() & draw2d.command.CommandStack.POST_MASK)\r\n },\r\n\r\n /**\r\n *\r\n * Returns true if this event is fired prior to the stack changing.\r\n *\r\n * @returns {Boolean} true if pre-change event\r\n **/\r\n isPreChangeEvent: function () {\r\n return 0 !== (this.getDetails() & draw2d.command.CommandStack.PRE_MASK)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Event class which will be fired for every CommandStack operation. Required for CommandStackListener.\r\n * @author Andreas Herz\r\n */\r\n\r\ndraw2d.command.CommandStackEventListener = Class.extend(\r\n /** @lends draw2d.command.CommandStackEventListener.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandStackEventListener\",\r\n\r\n /**\r\n * Creates a new Listener Object\r\n *\r\n */\r\n init: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Sent when an event occurs on the command stack. draw2d.command.CommandStackEvent.getDetail()\r\n * can be used to identify the type of event which has occurred.\r\n *\r\n * @template\r\n *\r\n * @param {draw2d.command.CommandStackEvent} event\r\n **/\r\n stackChanged: function (event) {\r\n }\r\n\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * EditPolicies should determine an Figures editing capabilities.\r\n * It is possible to implement an Figure such that it handles all editing\r\n * responsibility.<br>\r\n * However, it is much more flexible and object-oriented to use\r\n * EditPolicies. Using policies, you can pick and choose the editing behavior for\r\n * an Figure without being bound to its class hierarchy. Code reuse is increased,\r\n * and code management is easier.\r\n *\r\n * @author Andreas Herz\r\n */\r\n\r\ndraw2d.command.CommandType = Class.extend(\r\n /** @lends draw2d.command.CommandType.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandType\",\r\n\r\n /**\r\n * Create a new edit policy object\r\n *\r\n * @param {String} policy\r\n */\r\n init: function (policy) {\r\n this.policy = policy\r\n },\r\n\r\n /**\r\n * \r\n * Return the String representation of the policy\r\n *\r\n * @returns {String}\r\n **/\r\n getPolicy: function () {\r\n return this.policy\r\n }\r\n})\r\n\r\ndraw2d.command.CommandType.DELETE = \"DELETE\"\r\ndraw2d.command.CommandType.MOVE = \"MOVE\"\r\ndraw2d.command.CommandType.CONNECT = \"CONNECT\"\r\ndraw2d.command.CommandType.MOVE_BASEPOINT = \"MOVE_BASEPOINT\"\r\ndraw2d.command.CommandType.MOVE_VERTEX = \"MOVE_VERTEX\"\r\ndraw2d.command.CommandType.MOVE_VERTICES = \"MOVE_VERTICES\"\r\ndraw2d.command.CommandType.MOVE_GHOST_VERTEX = \"MOVE_GHOST_VERTEX\"\r\ndraw2d.command.CommandType.RESIZE = \"RESIZE\"\r\ndraw2d.command.CommandType.RESET = \"RESET\"\r\ndraw2d.command.CommandType.ROTATE = \"ROTATE\"\r\n\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Command to ungroup a given group figures\r\n *\r\n * @extends draw2d.command.Command\r\n */\r\n\r\ndraw2d.command.CommandUngroup = draw2d.command.Command.extend(\r\n /** @lends draw2d.command.CommandUngroup.prototype */\r\n {\r\n\r\n NAME: \"draw2d.command.CommandUngroup\",\r\n\r\n /**\r\n * Create a group command for the given figure.\r\n *\r\n * @param {draw2d.Canvas} canvas the responsible canvas\r\n * @param {draw2d.util.ArrayList|draw2d.Selection} group the figures to group\r\n */\r\n init: function (canvas, group) {\r\n this._super(draw2d.Configuration.i18n.command.ungroupShapes)\r\n if (group instanceof draw2d.Selection) {\r\n this.group = group.getAll().first()\r\n }\r\n else {\r\n this.group = group\r\n }\r\n\r\n this.canvas = canvas\r\n this.figures = this.group.getAssignedFigures().clone()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns [true] if the command can be execute and the execution of the\r\n * command modifies the model. e.g.: a CommandMove with [startX,startX] == [endX,endY] should\r\n * return false. The execution of this Command doesn't modify the model.\r\n *\r\n * @returns {Boolean} return try if the command modify the model or make any relevant changes\r\n **/\r\n canExecute: function () {\r\n return !this.figures.isEmpty()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Execute the command the first time\r\n *\r\n **/\r\n execute: function () {\r\n this.redo()\r\n },\r\n\r\n /**\r\n *\r\n * Undo the command\r\n *\r\n **/\r\n undo: function () {\r\n let _this = this\r\n this.figures.each(function (i, figure) {\r\n _this.group.assignFigure(figure)\r\n })\r\n this.canvas.add(this.group)\r\n this.canvas.setCurrentSelection(this.group)\r\n },\r\n\r\n /**\r\n *\r\n * Redo the command after the user has undo this command\r\n *\r\n **/\r\n redo: function () {\r\n let _this = this\r\n this.figures.each(function (i, figure) {\r\n _this.group.unassignFigure(figure)\r\n })\r\n\r\n this.canvas.setCurrentSelection(this.figures)\r\n this.canvas.remove(this.group)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start();\r\n * var end = new draw2d.shape.node.End();\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * var c = new draw2d.Connection();\r\n *\r\n * // toggle from ManhattenRouter to DirectRouter to show the rotation of decorations\r\n * c.setRouter(new draw2d.layout.connection.DirectRouter());\r\n *\r\n * // Set the endpoint decorations for the connection\r\n * //\r\n * c.setSourceDecorator(new draw2d.decoration.connection.ArrowDecorator());\r\n * c.setTargetDecorator(new draw2d.decoration.connection.ArrowDecorator());\r\n *\r\n * // Connect the endpoints with the start and end port\r\n * //\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @param {Number} [width] the width of the arrow\r\n * @param {Number} [height] the height of the arrow\r\n * @extend draw2d.decoration.connection.Decorator\r\n */\r\ndraw2d.decoration.connection.ArrowDecorator = draw2d.decoration.connection.Decorator.extend(\r\n /** @lends draw2d.decoration.connection.ArrowDecorator */\r\n {\r\n NAME: \"draw2d.decoration.connection.ArrowDecorator\",\r\n\r\n init: function (width, height) {\r\n this._super(width, height)\r\n },\r\n\r\n /**\r\n * Draws a filled arrow decoration.\r\n *\r\n *\r\n * ```\r\n * ---+ [length , width/2]\r\n * ------- |\r\n * [0,0] -------- |\r\n * +--- |==========================\r\n * -------- |\r\n * ------- |\r\n * ---+ [length ,-width/2]\r\n *\r\n * ```\r\n *\r\n * @param {RaphaelPaper} paper the raphael paper object for the paint operation\r\n * @returns {RaphaelPath}\r\n * @private\r\n **/\r\n paint: function (paper) {\r\n let st = paper.set()\r\n\r\n st.push(paper.path([\"M0 0\",\r\n \"L\", this.width, \" \", -this.height / 2,\r\n \"L\", this.width, \" \", this.height / 2,\r\n \"L0 0\"].join(\"\")))\r\n\r\n st.attr({fill: this.backgroundColor.rgba()})\r\n\r\n return st\r\n }\r\n })\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start();\r\n * var end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * var c = new draw2d.Connection();\r\n *\r\n * // toggle from ManhattenRouter to DirectRouter to show the rotation of decorations\r\n * c.setRouter(new draw2d.layout.connection.DirectRouter());\r\n *\r\n * // Set the endpoint decorations for the connection\r\n * //\r\n * c.setSourceDecorator(new draw2d.decoration.connection.BarDecorator());\r\n * c.setTargetDecorator(new draw2d.decoration.connection.BarDecorator());\r\n * // Connect the endpoints with the start and end port\r\n * //\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n * @author Andreas Herz\r\n * @param {Number} [width] the width of the bar\r\n * @param {Number} [height] the height of the bar\r\n * @extend draw2d.decoration.connection.Decorator\r\n */\r\ndraw2d.decoration.connection.BarDecorator = draw2d.decoration.connection.Decorator.extend(\r\n /** @lends draw2d.decoration.connection.BarDecorator */\r\n {\r\n\r\n NAME: \"draw2d.decoration.connection.BarDecorator\",\r\n\r\n init: function (width, height) {\r\n this._super(width, height)\r\n },\r\n\r\n /**\r\n * Draw a bar decoration.\r\n *\r\n * ```\r\n *\r\n * | [length , width/2]\r\n * |\r\n * [0,0] | (Connection)\r\n * +==========|==========================\r\n * |\r\n * |\r\n * | [length ,-width/2]\r\n *\r\n * ```\r\n *\r\n * @param {RaphaelPaper} paper the raphael paper object for the paint operation\r\n * @returns {RaphaelPath}\r\n * @private\r\n **/\r\n paint: function (paper) {\r\n let st = paper.set();\r\n let path = [\"M\", this.width / 2, \" \", -this.height / 2] // Go to the top center..\r\n path.push(\"L\", this.width / 2, \" \", this.height / 2) // ...bottom center...\r\n\r\n st.push(paper.path(path.join(\"\")))\r\n st.attr({fill: this.backgroundColor.rgba()})\r\n return st\r\n }\r\n })\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start();\r\n * var end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * var c = new draw2d.Connection();\r\n *\r\n * // toggle from ManhattenRouter to DirectRouter to show the rotation of decorations\r\n * c.setRouter(new draw2d.layout.connection.DirectRouter());\r\n *\r\n * // Set the endpoint decorations for the connection\r\n * //\r\n * c.setSourceDecorator(new draw2d.decoration.connection.CircleDecorator());\r\n * c.setTargetDecorator(new draw2d.decoration.connection.CircleDecorator());\r\n * // Connect the endpoints with the start and end port\r\n * //\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n * @author Andreas Herz\r\n * @param {Number} [width] the width of the arrow\r\n * @param {Number} [height] the height of the arrow\r\n * @extend draw2d.decoration.connection.Decorator\r\n */\r\ndraw2d.decoration.connection.CircleDecorator = draw2d.decoration.connection.Decorator.extend(\r\n /** @lends draw2d.decoration.connection.CircleDecorator */\r\n {\r\n\r\n NAME: \"draw2d.decoration.connection.CircleDecorator\",\r\n\r\n init: function (width, height) {\r\n this._super(width, height)\r\n },\r\n\r\n /**\r\n * Draw a filled circle decoration.\r\n *\r\n * @param {RaphaelPaper} paper the raphael paper object for the paint operation\r\n * @returns {RaphaelPath}\r\n * @private\r\n **/\r\n paint: function (paper) {\r\n let st = paper.set()\r\n\r\n st.push(paper.circle(0, 0, this.width / 2))\r\n st.attr({fill: this.backgroundColor.rgba()})\r\n\r\n return st\r\n }\r\n })\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\nimport Color from '../../util/Color'\r\n\r\n/**\r\n * @class\r\n * Base class for any kind of Connection end/start decorations like arrows, bullets, circles, bars,...\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.decoration.connection.Decorator = Class.extend(\r\n /** @lends draw2d.decoration.connection.Decorator */\r\n {\r\n\r\n NAME: \"draw2d.decoration.connection.Decorator\",\r\n\r\n init: function (width, height) {\r\n\r\n if (typeof width === \"undefined\" || width < 1) {\r\n this.width = 20\r\n } else {\r\n this.width = width\r\n }\r\n\r\n if (typeof height === \"undefined\" || height < 1) {\r\n this.height = 15\r\n } else {\r\n this.height = height\r\n }\r\n this.parent = null\r\n this.color = null // null => use the color of the connection\r\n this.backgroundColor = new Color(250, 250, 250)\r\n },\r\n\r\n /**\r\n *\r\n * Paint the decoration for a connector. The Connector starts always in\r\n * [0,0] and ends in [x,0].\r\n * It is not necessary to consider any rotation of the connection. This will be done by the\r\n * framework.\r\n *\r\n * <pre>\r\n * | -Y\r\n * |\r\n * |\r\n * --------------+-----------------------------> +X\r\n * |\r\n * |\r\n * |\r\n * V +Y\r\n *\r\n *\r\n * </pre>\r\n *\r\n * See in ArrowConnectionDecorator for example implementation.\r\n * @param {RaphaelPaper} paper\r\n * @private\r\n */\r\n paint: function (paper) {\r\n // do nothing per default\r\n },\r\n\r\n /**\r\n *\r\n * @param {draw2d.Connection} parent\r\n * @private\r\n */\r\n setParent: function(parent){\r\n this.parent = parent\r\n },\r\n\r\n /**\r\n *\r\n * Set the stroke color for the decoration\r\n *\r\n * @param {draw2d.util.Color|String} c\r\n * @returns {this}\r\n */\r\n setColor: function (c) {\r\n this.color = new Color(c);\r\n\r\n this.parent?.repaint()\r\n return this\r\n },\r\n\r\n /**\r\n * Get the line color of the decoration\r\n *\r\n * @returns {drawd.util.Color} the current line color of null if the Decoration should use the color of the host connection\r\n */\r\n getColor: function(){\r\n return this.color\r\n },\r\n\r\n /**\r\n *\r\n * Set the background color for the decoration\r\n *\r\n * @param {draw2d.util.Color|String} c\r\n * @returns {this}\r\n */\r\n setBackgroundColor: function (c) {\r\n this.backgroundColor = new Color(c)\r\n \r\n this.parent?.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * Returns the fill color\r\n *\r\n * @returns {draw2d.util.Color}\r\n */\r\n getBackgroundColor: function(){\r\n return this.backgroundColor\r\n },\r\n\r\n /**\r\n *\r\n * Change the dimension of the decoration shape\r\n *\r\n * @param {Number} width The new width of the decoration\r\n * @param {Number} height The new height of the decoration\r\n * @returns {this}\r\n **/\r\n setDimension: function (width, height) {\r\n this.width = width\r\n this.height = height\r\n\r\n return this\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start();\r\n * var end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * var c = new draw2d.Connection();\r\n *\r\n * // toggle from ManhattenRouter to DirectRouter to show the rotation of decorations\r\n * c.setRouter(new draw2d.layout.connection.DirectRouter());\r\n *\r\n * // Set the endpoint decorations for the connection\r\n * //\r\n * c.setSourceDecorator(new draw2d.decoration.connection.DiamondDecorator());\r\n * c.setTargetDecorator(new draw2d.decoration.connection.DiamondDecorator());\r\n * // Connect the endpoints with the start and end port\r\n * //\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @param {Number} [width] the width of the arrow\r\n * @param {Number} [height] the height of the arrow\r\n * @extend draw2d.decoration.connection.Decorator\r\n */\r\n\r\ndraw2d.decoration.connection.DiamondDecorator = draw2d.decoration.connection.Decorator.extend(\r\n /** @lends draw2d.decoration.connection.DiamondDecorator */\r\n {\r\n\r\n NAME: \"draw2d.decoration.connection.DiamondDecorator\",\r\n\r\n init: function (width, height) {\r\n this._super(width, height)\r\n },\r\n\r\n /**\r\n * Draw a filled diamond decoration.\r\n *\r\n * It's not your work to rotate the arrow. The draw2d do this job for you.\r\n *\r\n * @param {RaphaelPaper} paper the raphael paper object for the paint operation\r\n * @returns {RaphaelPath}\r\n * @private\r\n **/\r\n paint: function (paper) {\r\n let st = paper.set()\r\n\r\n st.push(\r\n paper.path([\"M\", this.width / 2, \" \", -this.height / 2, // Go to the top center..\r\n \"L\", this.width, \" \", 0, // ...draw line to the right middle\r\n \"L\", this.width / 2, \" \", this.height / 2, // ...bottom center...\r\n \"L\", 0, \" \", 0, // ...left middle...\r\n \"L\", this.width / 2, \" \", -this.height / 2, // and close the path\r\n \"Z\"].join(\"\"))\r\n )\r\n\r\n st.attr({fill: this.backgroundColor.rgba()})\r\n return st\r\n }\r\n });\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * Static util function to determine the minimal distance of point(px,py) on the line(x1,y1,x2,y2)\r\n *\r\n *\r\n * @returns {Number}\r\n * @static\r\n * @private\r\n * @param {Number} X1 x coordinate of the start point of the line\r\n * @param {Number} Y1 y coordinate of the start point of the line\r\n * @param {Number} X2 x coordinate of the end point of the line\r\n * @param {Number} Y2 y coordinate of the end point of the line\r\n * @param {Number} px x coordinate of the point to test\r\n * @param {Number} py y coordinate of the point to test\r\n **/\r\ndraw2d.geo.Line = {\r\n\r\n /**\r\n * Returns the relative position of the point on the line between [0..1]\r\n * The point \"p\" must be part of the line!!\r\n *\r\n * 0 => given point is on the start location\r\n * ..=> given point is in between\r\n * 1 => given point is at the end\r\n *\r\n * @returns {Number}\r\n */\r\n inverseLerp: function (X1, Y1, X2, Y2, px, py) {\r\n let nenner = Math.abs(X2 - X1)\r\n let zaehler = Math.abs(X2 - px)\r\n if (nenner === 0) {\r\n nenner = Math.abs(Y2 - Y1)\r\n zaehler = Math.abs(Y2 - py)\r\n if (nenner === 0) {\r\n return 1\r\n }\r\n }\r\n\r\n return zaehler / nenner\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the projection of the point onto the line.\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n pointProjection: function (X1, Y1, X2, Y2, px, py) {\r\n let r = new draw2d.geo.Point(0, 0)\r\n if (X1 === X2 && Y1 === Y2) X1 -= 0.00001\r\n\r\n let U = ((px - X1) * (X2 - X1)) + ((py - Y1) * (Y2 - Y1))\r\n\r\n let Udenom = Math.pow(X2 - X1, 2) + Math.pow(Y2 - Y1, 2)\r\n\r\n U /= Udenom\r\n\r\n r.x = X1 + (U * (X2 - X1))\r\n r.y = Y1 + (U * (Y2 - Y1))\r\n\r\n let minx, maxx, miny, maxy\r\n\r\n minx = Math.min(X1, X2)\r\n maxx = Math.max(X1, X2)\r\n\r\n miny = Math.min(Y1, Y2)\r\n maxy = Math.max(Y1, Y2)\r\n\r\n let isValid = (r.x >= minx && r.x <= maxx) && (r.y >= miny && r.y <= maxy)\r\n\r\n return isValid ? r : null\r\n },\r\n\r\n distance: function (X1, Y1, X2, Y2, px, py) {\r\n // Adjust vectors relative to X1,Y1\r\n // X2,Y2 becomes relative vector from X1,Y1 to end of segment\r\n X2 -= X1\r\n Y2 -= Y1\r\n // px,py becomes relative vector from X1,Y1 to test point\r\n px -= X1\r\n py -= Y1\r\n let dotprod = px * X2 + py * Y2\r\n let projlenSq\r\n if (dotprod <= 0.0) {\r\n // px,py is on the side of X1,Y1 away from X2,Y2\r\n // distance to segment is length of px,py vector\r\n // \"length of its (clipped) projection\" is now 0.0\r\n projlenSq = 0.0\r\n } else {\r\n // switch to backwards vectors relative to X2,Y2\r\n // X2,Y2 are already the negative of X1,Y1=>X2,Y2\r\n // to get px,py to be the negative of px,py=>X2,Y2\r\n // the dot product of two negated vectors is the same\r\n // as the dot product of the two normal vectors\r\n px = X2 - px\r\n py = Y2 - py\r\n dotprod = px * X2 + py * Y2\r\n if (dotprod <= 0.0) {\r\n // px,py is on the side of X2,Y2 away from X1,Y1\r\n // distance to segment is length of (backwards) px,py vector\r\n // \"length of its (clipped) projection\" is now 0.0\r\n projlenSq = 0.0\r\n } else {\r\n // px,py is between X1,Y1 and X2,Y2\r\n // dotprod is the length of the px,py vector\r\n // projected on the X2,Y2=>X1,Y1 vector times the\r\n // length of the X2,Y2=>X1,Y1 vector\r\n projlenSq = dotprod * dotprod / (X2 * X2 + Y2 * Y2)\r\n }\r\n }\r\n // Distance to line is now the length of the relative point\r\n // vector minus the length of its projection onto the line\r\n // (which is zero if the projection falls outside the range\r\n // of the line segment).\r\n let lenSq = px * px + py * py - projlenSq\r\n if (lenSq < 0) {\r\n lenSq = 0\r\n }\r\n return Math.sqrt(lenSq)\r\n }\r\n}\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * Represents a point (x, y) in 2-dimensional space.\r\n *\r\n * @class\r\n */\r\n\r\ndraw2d.geo.Point = Class.extend(\r\n /** @lends draw2d.geo.Point.prototype */\r\n {\r\n \r\n NAME: \"draw2d.geo.Point\",\r\n\r\n /**\r\n * Creates a new Point object with the hands over coordinates.\r\n *\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {Number} y\r\n */\r\n init: function (x, y) {\r\n if (x instanceof draw2d.geo.Point) {\r\n this.x = x.x\r\n this.y = x.y\r\n }\r\n else if (!isNaN(parseFloat(x.x)) && !isNaN(parseFloat(x.y))) {\r\n this.x = x.x\r\n this.y = x.y\r\n }\r\n else {\r\n this.x = x\r\n this.y = y\r\n }\r\n\r\n\r\n // limit for the maxi/minimum boundary of this rectangle\r\n // It is not possible that the rect leave the boundary if set.\r\n this.bx = null\r\n this.by = null\r\n this.bw = null\r\n this.bh = null\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Ensure the boundary of the rectangle. If set, the rectangle keeps always inside\r\n * the boundary. It is like a virtual fence.\r\n *\r\n * @returns {this}\r\n */\r\n setBoundary: function (bx, by, bw, bh) {\r\n if (bx instanceof draw2d.geo.Rectangle) {\r\n this.bx = bx.x\r\n this.by = bx.y\r\n this.bw = bx.w\r\n this.bh = bx.h\r\n } else {\r\n this.bx = bx\r\n this.by = by\r\n this.bw = bw\r\n this.bh = bh\r\n }\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * @private\r\n * @returns {this}\r\n */\r\n adjustBoundary: function () {\r\n if (this.bx === null) {\r\n return this\r\n }\r\n this.x = Math.min(Math.max(this.bx, this.x), this.bw)\r\n this.y = Math.min(Math.max(this.by, this.y), this.bh)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Moves this Rectangle horizontally by dx and vertically by dy, then returns\r\n * this Rectangle for convenience.<br>\r\n * <br>\r\n * The method return the object itself. This allows you to do command chaining, where\r\n * you can perform multiple methods on the same elements.\r\n *\r\n * @param {Number} dx Shift along X axis\r\n * @param {Number} dy Shift along Y axis\r\n * @returns {this}\r\n **/\r\n translate: function (dx, dy) {\r\n this.x += dx\r\n this.y += dy\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * The X value of the point\r\n *\r\n * @since 0.1\r\n * @returns {Number} The x coordinate of the top left corner\r\n */\r\n getX: function () {\r\n return this.x\r\n },\r\n\r\n /**\r\n * \r\n * The y value of the point\r\n *\r\n * @returns {Number} The y coordinate of the top left corner\r\n */\r\n getY: function () {\r\n return this.y\r\n },\r\n\r\n /**\r\n * \r\n * Set the new X value of the point\r\n *\r\n * @param {Number} x the new x coordinate of the rect\r\n * @returns {this}\r\n */\r\n setX: function (x) {\r\n this.x = x\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Set the new Y value of the point\r\n *\r\n * @param {Number} y the new y coordinate of the rect\r\n * @returns {this}\r\n */\r\n setY: function (y) {\r\n this.y = y\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Set the new x/y coordinates of this point\r\n *\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {Number} [y]\r\n * @returns {this}\r\n */\r\n setPosition: function (x, y) {\r\n if (x instanceof draw2d.geo.Point) {\r\n this.x = x.x\r\n this.y = x.y\r\n }\r\n else {\r\n this.x = x\r\n this.y = y\r\n }\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Calculates the relative position of the specified Point to this Point.\r\n *\r\n * @param {draw2d.geo.Point} p The reference Point\r\n * @returns {Number} NORTH, SOUTH, EAST, or WEST, as defined in {@link draw2d.geo.PositionConstants}\r\n */\r\n getPosition: function (p) {\r\n let dx = p.x - this.x\r\n let dy = p.y - this.y\r\n if (Math.abs(dx) > Math.abs(dy)) {\r\n if (dx < 0)\r\n return draw2d.geo.PositionConstants.WEST\r\n return draw2d.geo.PositionConstants.EAST\r\n }\r\n if (dy < 0) {\r\n return draw2d.geo.PositionConstants.NORTH\r\n }\r\n return draw2d.geo.PositionConstants.SOUTH\r\n },\r\n\r\n /**\r\n * \r\n * Compares two points and return [true] if x and y are equals.\r\n *\r\n * @param {draw2d.geo.Point} p the point to compare with\r\n *\r\n * @returns {Boolean} True if the given p[x,y] has an exact match with the point\r\n */\r\n equals: function (p) {\r\n return this.x === p.x && this.y === p.y\r\n },\r\n\r\n /**\r\n * \r\n * Return the distance between this point and the hands over.\r\n *\r\n * @param {draw2d.geo.Point} other the point to use\r\n * @returns {Number} The distance to the given point\r\n */\r\n distance: function (other) {\r\n return Math.sqrt((this.x - other.x) * (this.x - other.x) + (this.y - other.y) * (this.y - other.y))\r\n },\r\n /* @deprecated */\r\n getDistance: function (other) {\r\n return this.distance(other)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the length of the vector measured from [0,0]\r\n *\r\n * @returns {Number} The length of the vector [0,0][x,y]\r\n * @since 2.10.0\r\n */\r\n length: function () {\r\n return Math.sqrt(this.x * this.x + this.y * this.y)\r\n },\r\n\r\n /**\r\n * \r\n * Return a new Point translated with the x/y values of the hands over point.\r\n *\r\n * @param {draw2d.geo.Point|Number} x the x translation or the complete point to translate\r\n * @param {Number} [y] the y translation. Required if x is a simple number instead of a draw2d.geo.Point\r\n * @returns {draw2d.geo.Point} A instance of a translated point.\r\n */\r\n translated: function (x, y) {\r\n let other = new draw2d.geo.Point(x, y)\r\n return new draw2d.geo.Point(this.x + other.x, this.y + other.y)\r\n },\r\n\r\n /**\r\n * \r\n * Scales this point with the handover factor\r\n *\r\n * @param {Number} factor the factor to scaled the point.\r\n * @returns {this}\r\n */\r\n scale: function (factor) {\r\n this.x *= factor\r\n this.y *= factor\r\n this.adjustBoundary()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return a **new** Point scaled with the givben factor\r\n *\r\n * @param {Number} factor the factor to scaled the new point.\r\n * @returns {draw2d.geo.Point} The new translated point.\r\n */\r\n scaled: function (factor) {\r\n return new draw2d.geo.Point(this.x * factor, this.y * factor)\r\n },\r\n\r\n /* @deprecated */\r\n getScaled: function (factor) {\r\n return this.scaled(factor)\r\n },\r\n\r\n /**\r\n * \r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n return {\r\n x: this.x,\r\n y: this.y\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this.x = memento.x\r\n this.y = memento.y\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * substract the given point and return the **new** point.\r\n *\r\n * @param that\r\n * @returns {draw2d.geo.Point}\r\n */\r\n subtract: function (that) {\r\n return new draw2d.geo.Point(this.x - that.x, this.y - that.y)\r\n },\r\n\r\n\r\n dot: function (that) {\r\n return this.x * that.x + this.y * that.y\r\n },\r\n\r\n cross: function (that) {\r\n return this.x * that.y - this.y * that.x\r\n },\r\n\r\n\r\n lerp: function (that, t) {\r\n return new draw2d.geo.Point(this.x + (that.x - this.x) * t, this.y + (that.y - this.y) * t)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return a cloned point\r\n *\r\n * @returns {draw2d.geo.Point}\r\n */\r\n clone: function () {\r\n return new draw2d.geo.Point(this.x, this.y)\r\n }\r\n\r\n})\r\n","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n * Static values for point orientation.\r\n * \r\n */\r\ndraw2d.geo.PositionConstants = {\r\n /**\r\n *\r\n */\r\n NORTH: 1,\r\n SOUTH: 4,\r\n WEST: 8,\r\n EAST: 16\r\n}\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Represents a vector within 2-dimensional Euclidean space.\r\n * \r\n * @inheritable\r\n * @extends draw2d.geo.Point\r\n * @author Andreas Herz\r\n */\r\ndraw2d.geo.Ray = draw2d.geo.Point.extend(\r\n /** @lends draw2d.geo.Ray.prototype */\r\n {\r\n \r\n NAME: \"draw2d.geo.Ray\",\r\n \r\n /**\r\n * Creates a ray object.\r\n *\r\n * @param {Number} x\r\n * @param {Number} y\r\n */\r\n init: function( x, y)\r\n {\r\n this._super(x,y);\r\n },\r\n \r\n \r\n isHorizontal: function()\r\n {\r\n return this.x != 0;\r\n },\r\n \r\n similarity: function( otherRay)\r\n {\r\n return Math.abs(this.dot(otherRay));\r\n },\r\n \r\n getAveraged: function( otherRay)\r\n {\r\n return new draw2d.geo.Ray((this.x + otherRay.x) / 2, (this.y + otherRay.y) / 2);\r\n }\r\n\r\n});\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Represents a Rectangle(x, y, width, height).\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.geo.Point\r\n */\r\ndraw2d.geo.Rectangle = draw2d.geo.Point.extend(\r\n /** @lends draw2d.geo.Rectangle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.geo.Rectangle\",\r\n\r\n /**\r\n * Creates a new Point object with the hands over coordinates.\r\n * <br>\r\n * The constructor consumes almost any kind of rectangel definitions\r\n * like:\r\n * let rect0 = new draw2d.geo.Rectangle({x:0,y:0,width:20,height:20});\r\n * let rect1 = new draw2d.geo.Rectangle({x:0,y:0,w:20,h:20});\r\n * let rect2 = new draw2d.geo.Rectangle($(\"#divid\")[0].getBoundingClientRect());\r\n * let rect3 = new draw2d.geo.Rectangle(rect1);\r\n *\r\n * The rectangle class is usefull for any kind of intersection, hitTest, contains,...calculation\r\n * or to set the bounding box of any shape.\r\n *\r\n * @param {Number|draw2d.geo.Rectangle} x\r\n * @param {Number} y\r\n * @param {Number} w\r\n * @param {Number} h\r\n */\r\n init: function (x, y, w, h) {\r\n // try to consume any kind rectangle definitions\r\n //\r\n if (x instanceof draw2d.geo.Rectangle) {\r\n y = x.y;\r\n w = x.w;\r\n h = x.h;\r\n x = x.x;\r\n } else if (typeof x.x === \"number\" && typeof x.y === \"number\") {\r\n y = x.y;\r\n w = x.w | x.width;\r\n h = x.h | x.height;\r\n x = x.x;\r\n } else if (typeof x.top === \"number\" && typeof x.left === \"number\") {\r\n y = x.top;\r\n w = x.w | x.width;\r\n h = x.h | x.height;\r\n x = x.left;\r\n }\r\n this._super(x, y);\r\n this.w = w;\r\n this.h = h;\r\n },\r\n\r\n\r\n /**\r\n *\r\n * @private\r\n */\r\n adjustBoundary: function () {\r\n if (this.bx === null) {\r\n return;\r\n }\r\n this.x = Math.min(Math.max(this.bx, this.x), this.bw - this.w);\r\n this.y = Math.min(Math.max(this.by, this.y), this.bh - this.h);\r\n this.w = Math.min(this.w, this.bw);\r\n this.h = Math.min(this.h, this.bh);\r\n },\r\n\r\n /**\r\n *\r\n * Resizes this Rectangle by the values supplied as input and returns this for\r\n * convenience. This Rectangle's width will become this.width + dw. This\r\n * Rectangle's height will become this.height + dh.\r\n * <br>\r\n * The method return the object itself. This allows you to do command chaining, where\r\n * you can perform multiple methods on the same elements.\r\n *\r\n *\r\n * @param {Number} dw Amount by which width is to be resized\r\n * @param {Number} dh Amount by which height is to be resized\r\n * @returns {this}\r\n **/\r\n resize: function (dw, dh) {\r\n this.w += dw;\r\n this.h += dh;\r\n this.adjustBoundary();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the specified padding to the rectangle's bounds. This Rectangle's width\r\n * will become this.width + dw. The Rectangle's height will become this.height + dh.\r\n * The top left corner moves -dw/2, -dh/2\r\n *\r\n * @param {Number} dw Amount by which width is to be resized\r\n * @param {Number} dh Amount by which height is to be resized\r\n * @returns {this}\r\n **/\r\n scale: function (dw, dh) {\r\n this.w += (dw);\r\n this.h += (dh);\r\n this.x -= (dw / 2);\r\n this.y -= (dh / 2);\r\n this.adjustBoundary();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the rectangle with the given x/y coordiante.\r\n *\r\n * @param {draw2d.geo.Point|Number} x the x translation or the complete point to translate\r\n * @param {Number} [y] the y translation. Required if x is a simple number instead of a draw2d.geo.Point\r\n *\r\n *\r\n * @since 5.6.0\r\n * @returns {this}\r\n */\r\n translate: function (x, y) {\r\n let other = new draw2d.geo.Point(x, y);\r\n this.x += other.x;\r\n this.y += other.y;\r\n this.adjustBoundary();\r\n\r\n return this;\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns a copy of the translated rectangle\r\n *\r\n * @param {draw2d.geo.Point|Number} x the x translation or the complete point to translate\r\n * @param {Number} [y] the y translation. Required if x is a simple number instead of a draw2d.geo.Point\r\n *\r\n * @returns {draw2d.geo.Rectangle} The new translated rectangle.\r\n * @since 5.6.0\r\n */\r\n translated: function (x, y) {\r\n let other = new draw2d.geo.Point(x, y);\r\n return new draw2d.geo.Rectangle(this.x + other.x, this.y + other.y, this.w, this.h);\r\n },\r\n\r\n\r\n /**\r\n * Sets the parameters of this Rectangle from the Rectangle passed in and\r\n * returns this for convenience.<br>\r\n * <br>\r\n * The method return the object itself. This allows you to do command chaining, where\r\n * you can perform multiple methods on the same elements.\r\n *\r\n * @param {draw2d.geo.Rectangle} Rectangle providing the bounding values\r\n * @returns {this}\r\n */\r\n setBounds: function (rect) {\r\n this.setPosition(rect.x, rect.y);\r\n\r\n this.w = rect.w;\r\n this.h = rect.h;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n *\r\n * Returns <code>true</code> if this Rectangle's width or height is less than or\r\n * equal to 0.\r\n *\r\n * @returns {Boolean}\r\n */\r\n isEmpty: function () {\r\n return this.w <= 0 || this.h <= 0;\r\n },\r\n\r\n /**\r\n *\r\n * The width of the dimension element.\r\n *\r\n * @returns {Number}\r\n **/\r\n getWidth: function () {\r\n return this.w;\r\n },\r\n\r\n /**\r\n *\r\n * Set the new width of the rectangle.\r\n *\r\n * @param {Number} w the new width of the rectangle\r\n * @returns {this}\r\n */\r\n setWidth: function (w) {\r\n this.w = w;\r\n this.adjustBoundary();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n *\r\n * The height of the dimension element.\r\n *\r\n * @returns {Number}\r\n **/\r\n getHeight: function () {\r\n return this.h;\r\n },\r\n\r\n /**\r\n *\r\n * Set the new height of the rectangle.\r\n *\r\n * @param {Number} h the new height of the rectangle\r\n * @returns {this}\r\n */\r\n setHeight: function (h) {\r\n this.h = h;\r\n this.adjustBoundary();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n *\r\n * The x coordinate of the left corner.\r\n *\r\n * @returns {Number}\r\n **/\r\n getLeft: function () {\r\n return this.x;\r\n },\r\n\r\n /**\r\n *\r\n * The x coordinate of the right corner.\r\n *\r\n * @returns {Number}\r\n **/\r\n getRight: function () {\r\n return this.x + this.w;\r\n },\r\n\r\n /**\r\n *\r\n * The y coordinate of the top.\r\n *\r\n *@return {Number}\r\n **/\r\n getTop: function () {\r\n return this.y;\r\n },\r\n\r\n /**\r\n *\r\n * The y coordinate of the bottom.\r\n *\r\n *@return {Number}\r\n **/\r\n getBottom: function () {\r\n return this.y + this.h;\r\n },\r\n\r\n /**\r\n *\r\n * The top left corner of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getTopLeft: function () {\r\n return new draw2d.geo.Point(this.x, this.y);\r\n },\r\n\r\n /**\r\n *\r\n * The top center coordinate of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getTopCenter: function () {\r\n return new draw2d.geo.Point(this.x + (this.w / 2), this.y);\r\n },\r\n\r\n /**\r\n *\r\n * The top right corner of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getTopRight: function () {\r\n return new draw2d.geo.Point(this.x + this.w, this.y);\r\n },\r\n\r\n /**\r\n *\r\n * The center left of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getCenterLeft: function () {\r\n return new draw2d.geo.Point(this.x, this.y + (this.h / 2));\r\n },\r\n\r\n /**\r\n *\r\n * The center right of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getCenterRight: function () {\r\n return new draw2d.geo.Point(this.x+ this.w, this.y + (this.h / 2));\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The bottom left corner of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getBottomLeft: function () {\r\n return new draw2d.geo.Point(this.x, this.y + this.h);\r\n },\r\n\r\n /**\r\n *\r\n * The bottom center coordinate of the dimension object.\r\n *\r\n * @returns {draw2d.geo.Point} a new point objects which holds the coordinates\r\n **/\r\n getBottomCenter: function () {\r\n return new draw2d.geo.Point(this.x + (this.w / 2), this.y + this.h);\r\n },\r\n\r\n /**\r\n *\r\n * The center of the dimension object\r\n *\r\n * @returns {draw2d.geo.Point} a new point which holds the center of the object\r\n **/\r\n getCenter: function () {\r\n return new draw2d.geo.Point(this.x + this.w / 2, this.y + this.h / 2);\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Bottom right corner of the object\r\n *\r\n * @returns {draw2d.geo.Point} a new point which holds the bottom right corner\r\n **/\r\n getBottomRight: function () {\r\n return new draw2d.geo.Point(this.x + this.w, this.y + this.h);\r\n },\r\n\r\n /**\r\n *\r\n * Return all points of the rectangle as array. Starting at topLeft and the\r\n * clockwise.\r\n *\r\n * @returns {draw2d.util.ArrayList} the points starting at top/left and the clockwise\r\n */\r\n getVertices: function () {\r\n let result = new draw2d.util.ArrayList();\r\n // don't change the order. We expect always that the top left corner has index[0]\r\n // and goes clock wise\r\n //\r\n result.add(this.getTopLeft());\r\n result.add(this.getTopRight());\r\n result.add(this.getBottomRight());\r\n result.add(this.getBottomLeft());\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n *\r\n * Return a new rectangle which fits into this rectangle. <b>ONLY</b> the x/y coordinates\r\n * will be changed. Not the dimension of the given rectangle.\r\n *\r\n * @param {draw2d.geo.Rectangle} rect the rectangle to adjust\r\n * @returns the new shifted rectangle\r\n */\r\n moveInside: function (rect) {\r\n let newRect = new draw2d.geo.Rectangle(rect.x, rect.y, rect.w, rect.h);\r\n // shift the coordinate right/down if coordinate not inside the rect\r\n //\r\n newRect.x = Math.max(newRect.x, this.x);\r\n newRect.y = Math.max(newRect.y, this.y);\r\n\r\n // ensure that the right border is inside this rect (if possible). \r\n //\r\n if (newRect.w < this.w) {\r\n newRect.x = Math.min(newRect.x + newRect.w, this.x + this.w) - newRect.w;\r\n } else {\r\n newRect.x = this.x;\r\n }\r\n\r\n // ensure that the bottom is inside this rectangle\r\n //\r\n if (newRect.h < this.h) {\r\n newRect.y = Math.min(newRect.y + newRect.h, this.y + this.h) - newRect.h;\r\n } else {\r\n newRect.y = this.y;\r\n }\r\n\r\n return newRect;\r\n },\r\n\r\n /**\r\n *\r\n * Return the minimum distance of this rectangle to the given {@link draw2d.geo.Point} or\r\n * {link draw2d.geo.Rectangle}.\r\n *\r\n * @param {draw2d.geo.Point|draw2d.geo.Rectangle} pointOrRectangle the reference point/rectangle for the distance calculation\r\n */\r\n getDistance: function (pointOrRectangle) {\r\n let cx = this.x;\r\n let cy = this.y;\r\n let cw = this.w;\r\n let ch = this.h;\r\n\r\n let ox = pointOrRectangle.getX();\r\n let oy = pointOrRectangle.getY();\r\n let ow = 1;\r\n let oh = 1;\r\n\r\n if (pointOrRectangle instanceof draw2d.geo.Rectangle) {\r\n ow = pointOrRectangle.getWidth();\r\n oh = pointOrRectangle.getHeight();\r\n }\r\n let oct = 9;\r\n\r\n // Determin Octant\r\n //\r\n // 0 | 1 | 2\r\n // __|___|__\r\n // 7 | 9 | 3\r\n // __|___|__\r\n // 6 | 5 | 4\r\n\r\n if (cx + cw <= ox) {\r\n if ((cy + ch) <= oy) {\r\n oct = 0;\r\n } else if (cy >= (oy + oh)) {\r\n oct = 6;\r\n } else {\r\n oct = 7;\r\n }\r\n } else if (cx >= ox + ow) {\r\n if (cy + ch <= oy) {\r\n oct = 2;\r\n } else if (cy >= oy + oh) {\r\n oct = 4;\r\n } else {\r\n oct = 3;\r\n }\r\n } else if (cy + ch <= oy) {\r\n oct = 1;\r\n } else if (cy >= oy + oh) {\r\n oct = 5;\r\n } else {\r\n return 0;\r\n }\r\n\r\n\r\n // Determine Distance based on Quad\r\n //\r\n switch (oct) {\r\n case 0:\r\n cx = (cx + cw) - ox;\r\n cy = (cy + ch) - oy;\r\n return -(cx + cy);\r\n case 1:\r\n return -((cy + ch) - oy);\r\n case 2:\r\n cx = (ox + ow) - cx;\r\n cy = (cy + ch) - oy;\r\n return -(cx + cy);\r\n case 3:\r\n return -((ox + ow) - cx);\r\n case 4:\r\n cx = (ox + ow) - cx;\r\n cy = (oy + oh) - cy;\r\n return -(cx + cy);\r\n case 5:\r\n return -((oy + oh) - cy);\r\n case 6:\r\n cx = (cx + cw) - ox;\r\n cy = (oy + oh) - cy;\r\n return -(cx + cy);\r\n case 7:\r\n return -((cx + cw) - ox);\r\n }\r\n\r\n throw \"Unknown data type of parameter for distance calculation in draw2d.geo.Rectangle.getDistance(..)\";\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Determin the octant of r2 in relation to this rectangle.\r\n * <pre>\r\n *\r\n * 0 | 1 | 2\r\n * __|___|__\r\n * 7 | 8 | 3\r\n * __|___|__\r\n * 6 | 5 | 4\r\n * </pre>\r\n *\r\n * @param {draw2d.geo.Rectangle} r2\r\n *\r\n */\r\n determineOctant: function (r2) {\r\n let HISTERESE = 3; // Toleranz um diese vermieden wird, dass der Octant \"8\" zurückgegeben wird\r\n\r\n let ox = this.x + HISTERESE;\r\n let oy = this.y + HISTERESE;\r\n let ow = this.w - (HISTERESE * 2);\r\n let oh = this.h - (HISTERESE * 2);\r\n\r\n let cx = r2.x;\r\n let cy = r2.y;\r\n let cw = 2;\r\n let ch = 2;\r\n if (r2 instanceof draw2d.geo.Rectangle) {\r\n cw = r2.w;\r\n ch = r2.h;\r\n }\r\n\r\n let oct = 0;\r\n\r\n if (cx + cw <= ox) {\r\n if ((cy + ch) <= oy) {\r\n oct = 0;\r\n } else if (cy >= (oy + oh)) {\r\n oct = 6;\r\n } else {\r\n oct = 7;\r\n }\r\n } else if (cx >= ox + ow) {\r\n if (cy + ch <= oy) {\r\n oct = 2;\r\n } else if (cy >= oy + oh) {\r\n oct = 4;\r\n } else {\r\n oct = 3;\r\n }\r\n } else if (cy + ch <= oy) {\r\n oct = 1;\r\n } else if (cy >= oy + oh) {\r\n oct = 5;\r\n } else {\r\n oct = 8;\r\n }\r\n\r\n return oct;\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the direction the point <i>p</i> is in relation to the given rectangle.\r\n * Util method for inherit router implementations.\r\n *\r\n * <p>\r\n * Possible values:\r\n * <ul>\r\n * <li>up -> 0</li>\r\n * <li>right -> 1</li>\r\n * <li>down -> 2</li>\r\n * <li>left -> 3</li>\r\n * </ul>\r\n * <p>\r\n *\r\n * @param {draw2d.geo.Point} other the point in relation to the given rectangle\r\n *\r\n * @returns {Number} the direction from <i>r</i> to <i>p</i>\r\n */\r\n getDirection: function (other) {\r\n let current = this.getTopLeft();\r\n switch (this.determineOctant(other)) {\r\n case 0:\r\n if ((current.x - other.x) < (current.y - other.y))\r\n return draw2d.geo.Rectangle.DIRECTION_UP;\r\n return draw2d.geo.Rectangle.DIRECTION_LEFT;\r\n case 1:\r\n return draw2d.geo.Rectangle.DIRECTION_UP;\r\n case 2:\r\n current = this.getTopRight();\r\n if ((other.x - current.x) < (current.y - other.y))\r\n return draw2d.geo.Rectangle.DIRECTION_UP;\r\n return draw2d.geo.Rectangle.DIRECTION_RIGHT;\r\n case 3:\r\n return draw2d.geo.Rectangle.DIRECTION_RIGHT;\r\n case 4:\r\n current = this.getBottomRight();\r\n if ((other.x - current.x) < (other.y - current.y))\r\n return draw2d.geo.Rectangle.DIRECTION_DOWN;\r\n return draw2d.geo.Rectangle.DIRECTION_RIGHT;\r\n case 5:\r\n return draw2d.geo.Rectangle.DIRECTION_DOWN;\r\n case 6:\r\n current = this.getBottomLeft();\r\n if ((current.x - other.x) < (other.y - current.y))\r\n return draw2d.geo.Rectangle.DIRECTION_DOWN;\r\n return draw2d.geo.Rectangle.DIRECTION_LEFT;\r\n case 7:\r\n return draw2d.geo.Rectangle.DIRECTION_LEFT;\r\n case 8:\r\n if (other.y > this.y) {\r\n return draw2d.geo.Rectangle.DIRECTION_DOWN;\r\n }\r\n return draw2d.geo.Rectangle.DIRECTION_UP;\r\n\r\n }\r\n return draw2d.geo.Rectangle.DIRECTION_UP;\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Compares two rectangle objects\r\n *\r\n * @param {draw2d.geo.Rectangle} o\r\n *\r\n * @returns {Boolean}\r\n **/\r\n equals: function (o) {\r\n return this.x == o.x && this.y == o.y && this.w == o.w && this.h == o.h;\r\n },\r\n\r\n /**\r\n *\r\n * Detect whenever the hands over coordinate is inside the rectangle.\r\n *\r\n * @param {Number/draw2d.geo.Point} iX\r\n * @param {Number} iY\r\n * @returns {Boolean}\r\n */\r\n hitTest: function (iX, iY) {\r\n if (iX instanceof draw2d.geo.Point) {\r\n iY = iX.y;\r\n iX = iX.x;\r\n }\r\n let iX2 = this.x + this.getWidth();\r\n let iY2 = this.y + this.getHeight();\r\n return (iX >= this.x && iX <= iX2 && iY >= this.y && iY <= iY2);\r\n },\r\n\r\n /**\r\n *\r\n * return true if this rectangle inside the hand over rectangle\r\n *\r\n *\r\n * @param {draw2d.geo.Rectangle} rect\r\n * @returns {Boolean}\r\n */\r\n isInside: function (rect) {\r\n return rect.hitTest(this.getTopLeft())\r\n && rect.hitTest(this.getTopRight())\r\n && rect.hitTest(this.getBottomLeft())\r\n && rect.hitTest(this.getBottomRight());\r\n },\r\n\r\n /**\r\n *\r\n * return true if this rectangle contains the hand over rectangle.\r\n *\r\n *\r\n * @param {draw2d.geo.Rectangle} rect\r\n * @returns {Boolean}\r\n * @since 4.7.2\r\n */\r\n contains: function (rect) {\r\n return this.hitTest(rect.getTopLeft())\r\n && this.hitTest(rect.getTopRight())\r\n && this.hitTest(rect.getBottomLeft())\r\n && this.hitTest(rect.getBottomRight());\r\n },\r\n\r\n /**\r\n *\r\n * checks whenever the rectangles has an intersection.\r\n *\r\n * @param {draw2d.geo.Rectangle} rect\r\n * @returns {Boolean}\r\n */\r\n intersects: function (rect) {\r\n let x11 = rect.x,\r\n y11 = rect.y,\r\n x12 = rect.x + rect.w,\r\n y12 = rect.y + rect.h,\r\n x21 = this.x,\r\n y21 = this.y,\r\n x22 = this.x + this.w,\r\n y22 = this.y + this.h;\r\n\r\n let x_overlap = Math.max(0, Math.min(x12, x22) - Math.max(x11, x21));\r\n let y_overlap = Math.max(0, Math.min(y12, y22) - Math.max(y11, y21));\r\n\r\n return x_overlap * y_overlap !== 0;\r\n },\r\n\r\n /**\r\n * Merge this rectangle with the given one.\r\n *\r\n * @param {draw2d.geo.Rectangle} rect\r\n * @since 4.8.0\r\n * @returns {this}\r\n */\r\n merge: function (rect) {\r\n let r = Math.max(rect.getRight(), this.getRight());\r\n let b = Math.max(rect.getBottom(), this.getBottom());\r\n\r\n this.setPosition(Math.min(this.x, rect.x), Math.min(this.y, rect.y));\r\n\r\n this.w = r - this.x;\r\n this.h = b - this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n *\r\n * returns the intersection points with the given line if any exists\r\n *\r\n * @param {draw2d.geo.Point} start\r\n * @param {draw2d.geo.Point} end\r\n */\r\n intersectionWithLine: function (start, end) {\r\n let result = new draw2d.util.ArrayList();\r\n let v = this.getVertices();\r\n v.add(v.first());\r\n let p1 = v.first();\r\n let p2 = null;\r\n for (let i = 1; i < 5; i++) {\r\n p2 = v.get(i);\r\n p1 = draw2d.shape.basic.Line.intersection(start, end, p1, p2);\r\n if (p1 !== null) {\r\n result.add(p1);\r\n }\r\n p1 = p2;\r\n }\r\n return result;\r\n },\r\n\r\n /**\r\n *\r\n * Returns a copy of this rectangle\r\n *\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n * @since 5.6.0\r\n */\r\n clone: function () {\r\n return new draw2d.geo.Rectangle(this.x, this.y, this.w, this.h);\r\n },\r\n\r\n /**\r\n *\r\n * converts the rectangle to JSON representation. required for the draw2d.io.Writer\r\n *\r\n * @returns {Object}\r\n */\r\n toJSON: function () {\r\n return {\r\n width: this.w,\r\n height: this.h,\r\n x: this.x,\r\n y: this.y\r\n };\r\n }\r\n\r\n });\r\n\r\n/**\r\n * ENUM for Direction\r\n */\r\ndraw2d.geo.Rectangle.DIRECTION_UP = 0;\r\ndraw2d.geo.Rectangle.DIRECTION_RIGHT = 1;\r\ndraw2d.geo.Rectangle.DIRECTION_DOWN = 2;\r\ndraw2d.geo.Rectangle.DIRECTION_LEFT = 3;\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Geometric utils functions used in ray, point and some routers.\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.geo.Util = {\r\n\r\n /**\r\n *\r\n * @param start {draw2d.geo.Point} start point of a line\r\n * @param end {draw2d.geo.Point} end point of a line\r\n * @param distanceFromStart {Number} distance from the start point to extrapolate a new point\r\n * @returns {{x: *, y: *}|*} a new point with the distance *distanceFromStart* from the start point\r\n */\r\n insetPoint: function (start, end, distanceFromStart) {\r\n if (start.equals(end)) {\r\n return start\r\n }\r\n let vx = start.x - end.x\r\n let vy = start.y - end.y\r\n let length = Math.sqrt(vx * vx + vy * vy)\r\n let localDistance = Math.min(length / 2, distanceFromStart)\r\n return {\r\n x: end.x + vx / length * (length - localDistance),\r\n y: end.y + vy / length * (length - localDistance)\r\n }\r\n }\r\n}\r\n","import draw2d from 'packages'\r\nexport default draw2d;\r\n\r\n\r\nimport raph from 'lib/raphael.exec.js'\r\nimport cl from 'lib/Class.exec.js'\r\nimport path from 'lib/pathfinding.exec.js'\r\n\r\n\r\nrequire('./util/raphael_ext');\r\nrequire('./util/Polyfill');\r\nrequire('./util/Base64');\r\nrequire('./util/Debug');\r\n// require('./util/Color');\r\n\r\nrequire('./util/ArrayList');\r\nrequire('./util/SVGUtil');\r\n//require('./util/JSONUtil');\r\n//require('./util/UUID');\r\nrequire('./util/spline/Spline');\r\nrequire('./util/spline/CubicSpline');\r\nrequire('./util/spline/CatmullRomSpline');\r\nrequire('./util/spline/BezierSpline');\r\nrequire('./geo/PositionConstants');\r\nrequire('./geo/Point');\r\nrequire('./geo/Rectangle');\r\nrequire('./geo/Util');\r\nrequire('./geo/Ray');\r\nrequire('./geo/Line');\r\nrequire('./command/CommandType');\r\nrequire('./command/Command');\r\nrequire('./command/CommandCollection');\r\nrequire('./command/CommandStack');\r\nrequire('./command/CommandStackEvent');\r\nrequire('./command/CommandStackEventListener');\r\nrequire('./command/CommandMove');\r\nrequire('./command/CommandAttr');\r\nrequire('./command/CommandMoveLine');\r\nrequire('./command/CommandMoveConnection');\r\nrequire('./command/CommandMoveVertex');\r\nrequire('./command/CommandMoveVertices');\r\nrequire('./command/CommandResize');\r\nrequire('./command/CommandRotate');\r\nrequire('./command/CommandConnect');\r\nrequire('./command/CommandReconnect');\r\nrequire('./command/CommandDelete');\r\nrequire('./command/CommandDeleteGroup');\r\nrequire('./command/CommandAdd');\r\nrequire('./command/CommandGroup');\r\nrequire('./command/CommandUngroup');\r\nrequire('./command/CommandAddVertex');\r\nrequire('./command/CommandAssignFigure');\r\nrequire('./command/CommandBoundingBox');\r\nrequire('./command/CommandRemoveVertex');\r\nrequire('./command/CommandReplaceVertices');\r\nrequire('./layout/connection/ConnectionRouter');\r\nrequire('./layout/connection/DirectRouter');\r\nrequire('./layout/connection/RubberbandRouter');\r\nrequire('./layout/connection/VertexRouter');\r\nrequire('./layout/connection/ManhattanConnectionRouter');\r\nrequire('./layout/connection/ManhattanBridgedConnectionRouter');\r\nrequire('./layout/connection/InteractiveManhattanConnectionRouter');\r\nrequire('./layout/connection/CircuitConnectionRouter');\r\nrequire('./layout/connection/SplineConnectionRouter');\r\nrequire('./layout/connection/FanConnectionRouter');\r\nrequire('./layout/connection/MazeConnectionRouter');\r\nrequire('./layout/connection/MuteableManhattanConnectionRouter');\r\nrequire('./layout/connection/SketchConnectionRouter');\r\nrequire('./layout/mesh/MeshLayouter');\r\nrequire('./layout/mesh/ExplodeLayouter');\r\nrequire('./layout/mesh/ProposedMeshChange');\r\nrequire('./layout/locator/Locator');\r\nrequire('./layout/locator/PortLocator');\r\nrequire('./layout/locator/DraggableLocator');\r\nrequire('./layout/locator/SmartDraggableLocator');\r\nrequire('./layout/locator/XYAbsPortLocator');\r\nrequire('./layout/locator/XYRelPortLocator');\r\nrequire('./layout/locator/InputPortLocator');\r\nrequire('./layout/locator/OutputPortLocator');\r\nrequire('./layout/locator/ConnectionLocator');\r\nrequire('./layout/locator/ManhattanMidpointLocator');\r\nrequire('./layout/locator/PolylineMidpointLocator');\r\nrequire('./layout/locator/ParallelMidpointLocator');\r\nrequire('./layout/locator/TopLocator');\r\nrequire('./layout/locator/BottomLocator');\r\nrequire('./layout/locator/LeftLocator');\r\nrequire('./layout/locator/RightLocator');\r\nrequire('./layout/locator/CenterLocator');\r\nrequire('./policy/EditPolicy');\r\nrequire('./policy/canvas/CanvasPolicy');\r\nrequire('./policy/canvas/ZoomPolicy');\r\nrequire('./policy/canvas/WheelZoomPolicy');\r\nrequire('./policy/canvas/KeyboardPolicy');\r\nrequire('./policy/canvas/DefaultKeyboardPolicy');\r\nrequire('./policy/canvas/ExtendedKeyboardPolicy');\r\nrequire('./policy/canvas/SelectionPolicy');\r\nrequire('./policy/canvas/SingleSelectionPolicy');\r\nrequire('./policy/canvas/GhostMoveSelectionPolicy');\r\nrequire('./policy/canvas/PanningSelectionPolicy');\r\nrequire('./policy/canvas/BoundingboxSelectionPolicy');\r\nrequire('./policy/canvas/ReadOnlySelectionPolicy');\r\nrequire('./policy/canvas/DecorationPolicy');\r\nrequire('./policy/canvas/FadeoutDecorationPolicy');\r\nrequire('./policy/canvas/CoronaDecorationPolicy');\r\nrequire('./policy/canvas/SnapToEditPolicy');\r\nrequire('./policy/canvas/ShowDimetricGridEditPolicy');\r\nrequire('./policy/canvas/SnapToDimetricGridEditPolicy');\r\nrequire('./policy/canvas/ShowGridEditPolicy');\r\nrequire('./policy/canvas/SnapToGridEditPolicy');\r\nrequire('./policy/canvas/ShowDotEditPolicy');\r\nrequire('./policy/canvas/ShowChessboardEditPolicy');\r\nrequire('./policy/canvas/SnapToGeometryEditPolicy');\r\nrequire('./policy/canvas/SnapToVerticesEditPolicy');\r\nrequire('./policy/canvas/SnapToInBetweenEditPolicy');\r\nrequire('./policy/canvas/SnapToCenterEditPolicy');\r\nrequire('./policy/canvas/DropInterceptorPolicy');\r\nrequire('./policy/connection/ConnectionCreatePolicy');\r\nrequire('./policy/connection/ComposedConnectionCreatePolicy');\r\nrequire('./policy/connection/ClickConnectionCreatePolicy');\r\nrequire('./policy/connection/OrthogonalConnectionCreatePolicy');\r\nrequire('./policy/connection/DragConnectionCreatePolicy');\r\nrequire('./policy/figure/FigureEditPolicy');\r\nrequire('./policy/figure/DragDropEditPolicy');\r\nrequire('./policy/figure/RegionEditPolicy');\r\nrequire('./policy/figure/HorizontalEditPolicy');\r\nrequire('./policy/figure/VerticalEditPolicy');\r\nrequire('./policy/figure/SelectionPolicy');\r\nrequire('./policy/figure/SelectionFeedbackPolicy');\r\nrequire('./policy/figure/ResizeSelectionFeedbackPolicy');\r\nrequire('./policy/figure/RectangleSelectionFeedbackPolicy');\r\nrequire('./policy/figure/RaftSelectionFeedbackPolicy');\r\nrequire('./policy/figure/BigRectangleSelectionFeedbackPolicy');\r\nrequire('./policy/figure/RoundRectangleSelectionFeedbackPolicy');\r\nrequire('./policy/figure/BusSelectionFeedbackPolicy');\r\nrequire('./policy/figure/WidthSelectionFeedbackPolicy');\r\nrequire('./policy/figure/VBusSelectionFeedbackPolicy');\r\nrequire('./policy/figure/HBusSelectionFeedbackPolicy');\r\nrequire('./policy/figure/AntSelectionFeedbackPolicy');\r\nrequire('./policy/figure/GlowSelectionFeedbackPolicy');\r\nrequire('./policy/figure/SlimSelectionFeedbackPolicy');\r\nrequire('./policy/figure/VertexSelectionFeedbackPolicy');\r\nrequire('./policy/line/LineSelectionFeedbackPolicy');\r\nrequire('./policy/line/VertexSelectionFeedbackPolicy');\r\nrequire('./policy/line/OrthogonalSelectionFeedbackPolicy');\r\nrequire('./policy/port/PortFeedbackPolicy');\r\nrequire('./policy/port/ElasticStrapFeedbackPolicy');\r\nrequire('./policy/port/IntrusivePortsFeedbackPolicy');\r\nrequire('./Configuration');\r\nrequire('./HeadlessCanvas');\r\nrequire('./Canvas');\r\nrequire('./Selection');\r\nrequire('./Figure');\r\nrequire('./shape/node/Node');\r\nrequire('./VectorFigure');\r\nrequire('./shape/basic/Rectangle');\r\nrequire('./SetFigure');\r\nrequire('./SVGFigure');\r\nrequire('./shape/node/Hub');\r\nrequire('./shape/node/HorizontalBus');\r\nrequire('./shape/node/VerticalBus');\r\nrequire('./shape/node/Fulcrum');\r\nrequire('./shape/basic/Arc');\r\nrequire('./shape/basic/Oval');\r\nrequire('./shape/basic/Circle');\r\nrequire('./shape/basic/Label');\r\nrequire('./shape/basic/Text');\r\nrequire('./shape/basic/Line');\r\nrequire('./shape/basic/PolyLine');\r\nrequire('./shape/basic/Image');\r\nrequire('./shape/basic/Polygon');\r\nrequire('./shape/basic/Diamond');\r\nrequire('./shape/dimetric/Rectangle');\r\nrequire('./shape/composite/Composite');\r\nrequire('./shape/composite/StrongComposite');\r\nrequire('./shape/composite/Group');\r\nrequire('./shape/composite/Jailhouse');\r\nrequire('./shape/composite/WeakComposite');\r\nrequire('./shape/composite/Raft');\r\nrequire('./Connection');\r\nrequire('./VectorFigure');\r\nrequire('./ResizeHandle');\r\nrequire('./shape/composite/RaftResizeHandle');\r\nrequire('./shape/basic/LineResizeHandle');\r\nrequire('./shape/basic/LineStartResizeHandle');\r\nrequire('./shape/basic/LineEndResizeHandle');\r\nrequire('./shape/basic/VertexResizeHandle');\r\nrequire('./shape/basic/GhostVertexResizeHandle');\r\nrequire('./Port');\r\nrequire('./InputPort');\r\nrequire('./OutputPort');\r\nrequire('./HybridPort');\r\nrequire('./layout/anchor/ConnectionAnchor');\r\nrequire('./layout/anchor/ChopboxConnectionAnchor');\r\nrequire('./layout/anchor/FanConnectionAnchor');\r\nrequire('./layout/anchor/ShortesPathConnectionAnchor');\r\nrequire('./layout/anchor/CenterEdgeConnectionAnchor');\r\nrequire('./shape/arrow/CalligrapherArrowLeft');\r\nrequire('./shape/arrow/CalligrapherArrowDownLeft');\r\nrequire('./shape/node/Start');\r\nrequire('./shape/node/End');\r\nrequire('./shape/node/Between');\r\nrequire('./shape/note/PostIt');\r\nrequire('./shape/flowchart/Document');\r\nrequire('./shape/widget/Widget');\r\nrequire('./shape/widget/Slider');\r\nrequire('./shape/diagram/Diagram');\r\nrequire('./shape/diagram/Pie');\r\nrequire('./shape/diagram/Sparkline');\r\nrequire('./shape/analog/OpAmp');\r\nrequire('./shape/analog/ResistorBridge');\r\nrequire('./shape/analog/ResistorVertical');\r\nrequire('./shape/analog/VoltageSupplyHorizontal');\r\nrequire('./shape/analog/VoltageSupplyVertical');\r\nrequire('./shape/layout/Layout');\r\nrequire('./shape/layout/HorizontalLayout');\r\nrequire('./shape/layout/VerticalLayout');\r\nrequire('./shape/layout/TableLayout');\r\nrequire('./shape/layout/FlexGridLayout');\r\nrequire('./shape/layout/StackLayout');\r\nrequire('./shape/icon/Icon');\r\nrequire('./shape/icon/Thunder');\r\nrequire('./shape/icon/Snow');\r\nrequire('./shape/icon/Hail');\r\nrequire('./shape/icon/Rain');\r\nrequire('./shape/icon/Cloudy');\r\nrequire('./shape/icon/Sun');\r\nrequire('./shape/icon/Undo');\r\nrequire('./shape/icon/Detour');\r\nrequire('./shape/icon/Merge');\r\nrequire('./shape/icon/Split');\r\nrequire('./shape/icon/Fork');\r\nrequire('./shape/icon/ForkAlt');\r\nrequire('./shape/icon/Exchange');\r\nrequire('./shape/icon/Shuffle');\r\nrequire('./shape/icon/Refresh');\r\nrequire('./shape/icon/Ccw');\r\nrequire('./shape/icon/Acw');\r\nrequire('./shape/icon/Contract');\r\nrequire('./shape/icon/Expand');\r\nrequire('./shape/icon/Stop');\r\nrequire('./shape/icon/End');\r\nrequire('./shape/icon/Start');\r\nrequire('./shape/icon/Ff');\r\nrequire('./shape/icon/Rw');\r\nrequire('./shape/icon/ArrowRight');\r\nrequire('./shape/icon/ArrowLeft');\r\nrequire('./shape/icon/ArrowUp');\r\nrequire('./shape/icon/ArrowDown');\r\nrequire('./shape/icon/ArrowLeft2');\r\nrequire('./shape/icon/ArrowRight2');\r\nrequire('./shape/icon/Smile2');\r\nrequire('./shape/icon/Smile');\r\nrequire('./shape/icon/Alarm');\r\nrequire('./shape/icon/Clock');\r\nrequire('./shape/icon/StopWatch');\r\nrequire('./shape/icon/History');\r\nrequire('./shape/icon/Future');\r\nrequire('./shape/icon/GlobeAlt2');\r\nrequire('./shape/icon/GlobeAlt');\r\nrequire('./shape/icon/Globe');\r\nrequire('./shape/icon/Warning');\r\nrequire('./shape/icon/Code');\r\nrequire('./shape/icon/Pensil');\r\nrequire('./shape/icon/Pen');\r\nrequire('./shape/icon/Plus');\r\nrequire('./shape/icon/Minus');\r\nrequire('./shape/icon/TShirt');\r\nrequire('./shape/icon/Sticker');\r\nrequire('./shape/icon/Page2');\r\nrequire('./shape/icon/Page');\r\nrequire('./shape/icon/Landscape1');\r\nrequire('./shape/icon/Landscape2');\r\nrequire('./shape/icon/Plugin');\r\nrequire('./shape/icon/Bookmark');\r\nrequire('./shape/icon/Hammer');\r\nrequire('./shape/icon/Users');\r\nrequire('./shape/icon/User');\r\nrequire('./shape/icon/Customer');\r\nrequire('./shape/icon/Employee');\r\nrequire('./shape/icon/Anonymous');\r\nrequire('./shape/icon/Skull');\r\nrequire('./shape/icon/Mail');\r\nrequire('./shape/icon/Picture');\r\nrequire('./shape/icon/Bubble');\r\nrequire('./shape/icon/CodeTalk');\r\nrequire('./shape/icon/Talkq');\r\nrequire('./shape/icon/Talke');\r\nrequire('./shape/icon/Home');\r\nrequire('./shape/icon/Lock');\r\nrequire('./shape/icon/Clip');\r\nrequire('./shape/icon/Star');\r\nrequire('./shape/icon/StarOff');\r\nrequire('./shape/icon/Star2');\r\nrequire('./shape/icon/Star2Off');\r\nrequire('./shape/icon/Star3');\r\nrequire('./shape/icon/Star3Off');\r\nrequire('./shape/icon/Chat');\r\nrequire('./shape/icon/Quote');\r\nrequire('./shape/icon/Gear2');\r\nrequire('./shape/icon/Gear');\r\nrequire('./shape/icon/Wrench');\r\nrequire('./shape/icon/Wrench2');\r\nrequire('./shape/icon/Wrench3');\r\nrequire('./shape/icon/ScrewDriver');\r\nrequire('./shape/icon/HammerAndScrewDriver');\r\nrequire('./shape/icon/Magic');\r\nrequire('./shape/icon/Download');\r\nrequire('./shape/icon/View');\r\nrequire('./shape/icon/Noview');\r\nrequire('./shape/icon/Cloud');\r\nrequire('./shape/icon/Cloud2');\r\nrequire('./shape/icon/CloudDown');\r\nrequire('./shape/icon/CloudUp');\r\nrequire('./shape/icon/Location');\r\nrequire('./shape/icon/Volume0');\r\nrequire('./shape/icon/Volume1');\r\nrequire('./shape/icon/Volume2');\r\nrequire('./shape/icon/Volume3');\r\nrequire('./shape/icon/Key');\r\nrequire('./shape/icon/Ruler');\r\nrequire('./shape/icon/Power');\r\nrequire('./shape/icon/Unlock');\r\nrequire('./shape/icon/Flag');\r\nrequire('./shape/icon/Tag');\r\nrequire('./shape/icon/Search');\r\nrequire('./shape/icon/ZoomOut');\r\nrequire('./shape/icon/ZoomIn');\r\nrequire('./shape/icon/Cross');\r\nrequire('./shape/icon/Check');\r\nrequire('./shape/icon/Settings');\r\nrequire('./shape/icon/SettingsAlt');\r\nrequire('./shape/icon/Feed');\r\nrequire('./shape/icon/Bug');\r\nrequire('./shape/icon/Link');\r\nrequire('./shape/icon/Calendar');\r\nrequire('./shape/icon/Picker');\r\nrequire('./shape/icon/No');\r\nrequire('./shape/icon/CommandLine');\r\nrequire('./shape/icon/Photo');\r\nrequire('./shape/icon/Printer');\r\nrequire('./shape/icon/Export');\r\nrequire('./shape/icon/Import');\r\nrequire('./shape/icon/Run');\r\nrequire('./shape/icon/Magnet');\r\nrequire('./shape/icon/NoMagnet');\r\nrequire('./shape/icon/ReflectH');\r\nrequire('./shape/icon/ReflectV');\r\nrequire('./shape/icon/Resize2');\r\nrequire('./shape/icon/Rotate');\r\nrequire('./shape/icon/Connect');\r\nrequire('./shape/icon/Disconnect');\r\nrequire('./shape/icon/Folder');\r\nrequire('./shape/icon/Man');\r\nrequire('./shape/icon/Woman');\r\nrequire('./shape/icon/People');\r\nrequire('./shape/icon/Parent');\r\nrequire('./shape/icon/Notebook');\r\nrequire('./shape/icon/Diagram');\r\nrequire('./shape/icon/BarChart');\r\nrequire('./shape/icon/PieChart');\r\nrequire('./shape/icon/LineChart');\r\nrequire('./shape/icon/Apps');\r\nrequire('./shape/icon/Locked');\r\nrequire('./shape/icon/Ppt');\r\nrequire('./shape/icon/Lab');\r\nrequire('./shape/icon/Umbrella');\r\nrequire('./shape/icon/Dry');\r\nrequire('./shape/icon/Ipad');\r\nrequire('./shape/icon/Iphone');\r\nrequire('./shape/icon/Jigsaw');\r\nrequire('./shape/icon/Lamp');\r\nrequire('./shape/icon/Lamp_alt');\r\nrequire('./shape/icon/Video');\r\nrequire('./shape/icon/Palm');\r\nrequire('./shape/icon/Fave');\r\nrequire('./shape/icon/Help');\r\nrequire('./shape/icon/Crop');\r\nrequire('./shape/icon/BioHazard');\r\nrequire('./shape/icon/WheelChair');\r\nrequire('./shape/icon/Mic');\r\nrequire('./shape/icon/MicMute');\r\nrequire('./shape/icon/IMac');\r\nrequire('./shape/icon/Pc');\r\nrequire('./shape/icon/Cube');\r\nrequire('./shape/icon/FullCube');\r\nrequire('./shape/icon/Font');\r\nrequire('./shape/icon/Trash');\r\nrequire('./shape/icon/NewWindow');\r\nrequire('./shape/icon/DockRight');\r\nrequire('./shape/icon/DockLeft');\r\nrequire('./shape/icon/DockBottom');\r\nrequire('./shape/icon/DockTop');\r\nrequire('./shape/icon/Pallete');\r\nrequire('./shape/icon/Cart');\r\nrequire('./shape/icon/Glasses');\r\nrequire('./shape/icon/Package');\r\nrequire('./shape/icon/Book');\r\nrequire('./shape/icon/Books');\r\nrequire('./shape/icon/Icons');\r\nrequire('./shape/icon/List');\r\nrequire('./shape/icon/Db');\r\nrequire('./shape/icon/Paper');\r\nrequire('./shape/icon/TakeOff');\r\nrequire('./shape/icon/Landing');\r\nrequire('./shape/icon/Plane');\r\nrequire('./shape/icon/Phone');\r\nrequire('./shape/icon/HangUp');\r\nrequire('./shape/icon/SlideShare');\r\nrequire('./shape/icon/Twitter');\r\nrequire('./shape/icon/TwitterBird');\r\nrequire('./shape/icon/Skype');\r\nrequire('./shape/icon/Windows');\r\nrequire('./shape/icon/Apple');\r\nrequire('./shape/icon/Linux');\r\nrequire('./shape/icon/NodeJs');\r\nrequire('./shape/icon/JQuery');\r\nrequire('./shape/icon/Sencha');\r\nrequire('./shape/icon/Vim');\r\nrequire('./shape/icon/InkScape');\r\nrequire('./shape/icon/Aumade');\r\nrequire('./shape/icon/Firefox');\r\nrequire('./shape/icon/Ie');\r\nrequire('./shape/icon/Ie9');\r\nrequire('./shape/icon/Opera');\r\nrequire('./shape/icon/Chrome');\r\nrequire('./shape/icon/Safari');\r\nrequire('./shape/icon/LinkedIn');\r\nrequire('./shape/icon/Flickr');\r\nrequire('./shape/icon/GitHub');\r\nrequire('./shape/icon/GitHubAlt');\r\nrequire('./shape/icon/Raphael');\r\nrequire('./shape/icon/GRaphael');\r\nrequire('./shape/icon/Svg');\r\nrequire('./shape/icon/Usb');\r\nrequire('./shape/icon/Ethernet');\r\nrequire('./shape/pert/Activity');\r\nrequire('./shape/pert/Start');\r\nrequire('./shape/state/Start');\r\nrequire('./shape/state/End');\r\nrequire('./shape/state/State');\r\nrequire('./shape/state/Connection');\r\nrequire('./ui/LabelEditor');\r\nrequire('./ui/LabelInplaceEditor');\r\nrequire('./decoration/connection/Decorator');\r\nrequire('./decoration/connection/ArrowDecorator');\r\nrequire('./decoration/connection/DiamondDecorator');\r\nrequire('./decoration/connection/CircleDecorator');\r\nrequire('./decoration/connection/BarDecorator');\r\nrequire('./io/Reader');\r\nrequire('./io/Writer');\r\nrequire('./io/svg/Writer');\r\nrequire('./io/png/Writer');\r\nrequire('./io/json/Writer');\r\nrequire('./io/json/Reader');\r\n","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n * Template class for general import of a document into the canvas.\r\n *\r\n * @author andreas Herz\r\n */\r\ndraw2d.io.Reader = Class.extend(\r\n /** @lends draw2d.io.Reader */\r\n {\r\n\r\n init: function(){\r\n\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Restore the canvas from a given String.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to restore\r\n * @param {Object} document the document to read\r\n *\r\n * @returns {draw2d.util.ArrayList} the added elements\r\n * @template\r\n */\r\n unmarshal: function(canvas, document){\r\n // do nothing. Inherit classes must implement this method\r\n }\r\n\r\n});\r\n","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Serialize the canvas to an external format. This is only a template/interface class.\r\n * Inherit classes must implement the export format.\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.io.Writer = Class.extend(\r\n /** @lends draw2d.io.Writer */\r\n\r\n {\r\n init: function(){\r\n },\r\n\r\n /**\r\n * \r\n * Export the content to the implemented data format. Inherit class implements\r\n * content specific writer.\r\n * <br>\r\n * <br>\r\n *\r\n * Method signature has been changed from version 2.10.1 to version 3.0.0.<br>\r\n * The parameter <b>resultCallback</b> is required and new. The method calls\r\n * the callback instead of return the result.\r\n *\r\n * @template\r\n * @since 2.10.1\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Function} resultCallback the method to call on success. The first argument is the result object, the second the base64 content of a corresponding file\r\n * @returns {Object}\r\n *\r\n */\r\n marshal: function(canvas, resultCallback){\r\n // I change the API signature from version 2.10.1 to 3.0.0. Throw an exception\r\n // if any application not care about this changes.\r\n if(typeof resultCallback !== \"function\"){\r\n throw \"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.\";\r\n }\r\n\r\n\r\n resultCallback(\"\", \"\");\r\n },\r\n\r\n /**\r\n * \r\n * utility method to format a given XML string.\r\n *\r\n * @param xml\r\n * @returns {String}\r\n */\r\n formatXml: function(xml) {\r\n let formatted = '';\r\n let reg = new RegExp(\"(>)(<)(\\/*)\",\"g\");\r\n xml = xml.replace(reg, '$1\\r\\n$2$3');\r\n let pad = 0;\r\n xml.split('\\r\\n').forEach(function(node) {\r\n let indent = 0;\r\n if (node.match( new RegExp(\".+<\\/\\w[^>]*>$\") )) {\r\n indent = 0;\r\n } else if (node.match( new RegExp(\"^<\\/\\w\") )) {\r\n if (pad != 0) {\r\n pad -= 1;\r\n }\r\n } else if (node.match( new RegExp(\"^<\\w[^>]*[^\\/]>.*$\") )) {\r\n indent = 1;\r\n } else {\r\n indent = 0;\r\n }\r\n\r\n var padding = '';\r\n for (var i = 0; i < pad; i++) {\r\n padding += ' ';\r\n }\r\n\r\n formatted += padding + node + '\\r\\n';\r\n pad += indent;\r\n });\r\n\r\n return formatted;\r\n }\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Read a JSON data and import them into the canvas. The JSON must be generated with the\r\n * {@link draw2d.io.json.Writer}.\r\n *\r\n * @example\r\n *\r\n * // Load a standard draw2d JSON object into the canvas\r\n * //\r\n * let jsonDocument =\r\n * [\r\n * {\r\n * \"type\": \"draw2d.shape.basic.Oval\",\r\n * \"id\": \"5b4c74 b0-96d1-1aa3-7eca-bbeaed5fffd7\",\r\n * \"x\": 237,\r\n * \"y\": 236,\r\n * \"width\": 93,\r\n * \"height\": 38\r\n * },\r\n * {\r\n * \"type\": \"draw2d.shape.basic.Rectangle\",\r\n * \"id\": \"354fa3b9-a834-0221-2009-abc2d6bd852a\",\r\n * \"x\": 225,\r\n * \"y\": 97,\r\n * \"width\": 201,\r\n * \"height\": 82,\r\n * \"radius\": 2\r\n * }\r\n * ];\r\n * // unmarshal the JSON document into the canvas\r\n * // (load)\r\n * let reader = new draw2d.io.json.Reader();\r\n * reader.unmarshal(canvas, jsonDocument);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.io.Reader\r\n */\r\ndraw2d.io.json.Reader = draw2d.io.Reader.extend(\r\n /** @lends draw2d.io.json.Reader.prototype */\r\n {\r\n NAME: \"draw2d.io.json.Reader\",\r\n\r\n init: function () {\r\n this._super();\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Restore the canvas from a given JSON object.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to restore\r\n * @param {Object|String} json the json object to load.\r\n */\r\n unmarshal: function (canvas, json) {\r\n let result = new draw2d.util.ArrayList();\r\n\r\n if (typeof json === \"string\") {\r\n json = JSON.parse(json);\r\n }\r\n\r\n let node = null;\r\n json.forEach((element) => {\r\n try {\r\n let o = this.createFigureFromElement(element) || this.createFigureFromType(element.type);\r\n let source = null;\r\n let target = null;\r\n for (let i in element) {\r\n let val = element[i];\r\n if (i === \"source\") {\r\n node = canvas.getFigure(val.node);\r\n if (node === null) {\r\n throw \"Source figure with id '\" + val.node + \"' not found\";\r\n }\r\n source = node.getPort(val.port);\r\n if (source === null) {\r\n throw \"Unable to find source port '\" + val.port + \"' at figure '\" + val.node + \"' to unmarschal '\" + element.type + \"'\";\r\n }\r\n } else if (i === \"target\") {\r\n node = canvas.getFigure(val.node);\r\n if (node === null) {\r\n throw \"Target figure with id '\" + val.node + \"' not found\";\r\n }\r\n target = node.getPort(val.port);\r\n if (target === null) {\r\n throw \"Unable to find target port '\" + val.port + \"' at figure '\" + val.node + \"' to unmarschal '\" + element.type + \"'\";\r\n }\r\n }\r\n }\r\n if (source !== null && target !== null) {\r\n // don't change the order or the source/target set.\r\n // TARGET must always be the second one because some applications needs the \"source\"\r\n // port in the \"connect\" event of the target.\r\n o.setSource(source)\r\n o.setTarget(target)\r\n }\r\n o.setPersistentAttributes(element)\r\n canvas.add(o)\r\n result.add(o)\r\n } catch (exc) {\r\n debug.error(element, \"Unable to instantiate figure type '\" + element.type + \"' with id '\" + element.id + \"' during unmarshal by \" + this.NAME + \". Skipping figure..\");\r\n debug.error(exc)\r\n debug.warn(element)\r\n }\r\n });\r\n\r\n // restore group assignment\r\n //\r\n json.forEach(element => {\r\n if (typeof element.composite !== \"undefined\") {\r\n let figure = canvas.getFigure(element.id);\r\n if (figure === null) {\r\n figure = canvas.getLine(element.id);\r\n }\r\n let group = canvas.getFigure(element.composite);\r\n group.assignFigure(figure);\r\n }\r\n });\r\n\r\n // recalculate all crossings and repaint the connections with\r\n // possible crossing decoration\r\n canvas.calculateConnectionIntersection();\r\n canvas.getLines().each((i, line) => {\r\n line.svgPathString = null;\r\n line.repaint();\r\n });\r\n canvas.linesToRepaintAfterDragDrop = canvas.getLines().clone();\r\n\r\n canvas.showDecoration();\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n *\r\n * Factory method to create an instance of the given element type.\r\n *\r\n * @param {String} type\r\n * @returns {draw2d.Figure}\r\n */\r\n createFigureFromType: function (type) {\r\n return Function(`return new ${type}()`)()\r\n },\r\n\r\n /**\r\n *\r\n * Factory method to create an instance of the given element.\r\n *\r\n * @param {Object} element\r\n * @returns {draw2d.Figure}\r\n */\r\n createFigureFromElement: function createFigureFromElement(element) {\r\n return null;\r\n }\r\n });\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Serialize the canvas document into a JSON object which can be read from the corresponding\r\n * {@link draw2d.io.json.Reader}.\r\n *\r\n * // Create a JSON writer and convert it into a JSON-String representation.\r\n * //\r\n * var writer = new draw2d.io.json.Writer();\r\n * writer.marshal(canvas, function(json){\r\n * // convert the json object into string representation\r\n * var jsonTxt = JSON.stringify(json,null,2);\r\n * \r\n * // insert the json string into a DIV for preview or post\r\n * // it via ajax to the server....\r\n * $(\"#json\").text(jsonTxt);\r\n * \r\n * });\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.io.Writer\r\n */\r\n\r\ndraw2d.io.json.Writer = draw2d.io.Writer.extend(\r\n /** @lends draw2d.io.json.Writer */\r\n {\r\n\r\n init: function () {\r\n this._super();\r\n },\r\n\r\n /**\r\n *\r\n * Export the content to the implemented data format. Inherit class implements\r\n * content specific writer.\r\n * <br>\r\n * <br>\r\n *\r\n * Method signature has been changed from version 2.10.1 to version 3.0.0.<br>\r\n * The parameter <b>resultCallback</b> is required and new. The method calls\r\n * the callback instead of return the result.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Function} resultCallback the method to call on success. The first argument is the result object, the second the base64 representation of the file content\r\n * @param {Object} resultCallback.json the canvas document as JSON object\r\n * @param {String} resultCallback.base64 the canvas document as base encoded JSON\r\n */\r\n marshal: function (canvas, resultCallback) {\r\n // I change the API signature from version 2.10.1 to 3.0.0. Throw an exception\r\n // if any application not care about this changes.\r\n if (typeof resultCallback !== \"function\") {\r\n throw \"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.\";\r\n }\r\n\r\n var result = [];\r\n\r\n canvas.getFigures().each( (i, figure)=> {\r\n result.push(figure.getPersistentAttributes());\r\n });\r\n\r\n canvas.getLines().each( (i, element)=> {\r\n result.push(element.getPersistentAttributes());\r\n });\r\n\r\n var base64Content = draw2d.util.Base64.encode(JSON.stringify(result, null, 2));\r\n\r\n resultCallback(result, base64Content);\r\n }\r\n });\r\n","import draw2d from '../../packages'\r\nconst canvg = require('canvg')\r\n\r\n/**\r\n * @class\r\n *\r\n * Converts the canvas document into a PNG Image.\r\n *\r\n * @example\r\n * // example how to create a PNG image and set an\r\n * // image src attribute.\r\n * //\r\n * let writer = new draw2d.io.png.Writer();\r\n * writer.marshal(canvas, function(png){\r\n * $(\"#preview\").attr(\"src\",png);\r\n * });\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.io.Writer\r\n */\r\ndraw2d.io.png.Writer = draw2d.io.Writer.extend(\r\n /** @lends draw2d.io.png.Writer */\r\n {\r\n\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n /**\r\n *\r\n * Export the content to a PNG image. The result can be set as <b>src=\"....\"</b> because\r\n * the result is encoded as data source url <b>data:image/png;base64....</b>\r\n * <br>\r\n * <br>\r\n *\r\n * Method signature has been changed from version 2.10.1 to version 3.0.0.<br>\r\n * The parameter <b>resultCallback</b> is required and new. The method calls\r\n * the callback instead of return the result.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Function} resultCallback the method to call on success. The first argument is the dataUrl, the second is the base64 formated png image\r\n * @param {String} resultCallback.img The image as data source url <b>data:image/png;base64....</b>\r\n * @param {String} resultCallback.base64 the image encoded in base64\r\n * @param {draw2d.geo.Rectangle} cropBoundingBox optional cropping/clipping bounding box\r\n */\r\n marshal: function (canvas, resultCallback, cropBoundingBox) {\r\n // I change the API signature from version 2.10.1 to 3.0.0. Throw an exception\r\n // if any application not care about this changes.\r\n if (typeof resultCallback !== \"function\") {\r\n throw \"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.\";\r\n }\r\n\r\n let svg = \"\"\r\n let canvasState = false\r\n\r\n // the png.Writer can create Snapshots of a single figure too.\r\n // Didn't work in IE <10\r\n // @status beta\r\n // @since 5.5.0\r\n if (canvas instanceof draw2d.Figure) {\r\n let figure = canvas\r\n let origPos = figure.getPosition()\r\n figure.setPosition(1, 1)\r\n svg = \"<svg xmlns:xlink=\\\"http://www.w3.org/1999/xlink\\\" >\"\r\n + figure.shape.node.outerHTML\r\n + \"</svg>\";\r\n figure.setPosition(origPos);\r\n figure.initialWidth = figure.getWidth() + 2\r\n figure.initialHeight = figure.getHeight() + 2\r\n }\r\n // create a snapshot of a complete canvas\r\n //\r\n else {\r\n canvasState = {\r\n zoom: canvas.getZoom(),\r\n scrollLeft: canvas.getScrollLeft(),\r\n scrollTop: canvas.getScrollTop(),\r\n }\r\n canvas.setZoom(1.0)\r\n canvas.hideDecoration()\r\n svg = (new XMLSerializer()).serializeToString(canvas.getHtmlContainer().find(\"svg\")[0]);\r\n }\r\n\r\n let canvasDomNode = $('<canvas id=\"canvas_png_export_for_draw2d\"></canvas>')\r\n $('body').append(canvasDomNode)\r\n let fullSizeCanvas = $(\"#canvas_png_export_for_draw2d\")[0]\r\n fullSizeCanvas.width = canvas.initialWidth\r\n fullSizeCanvas.height = canvas.initialHeight\r\n\r\n canvg(\"canvas_png_export_for_draw2d\", svg, {\r\n ignoreMouse: true,\r\n ignoreAnimation: true,\r\n renderCallback: function () {\r\n try {\r\n if (canvas instanceof draw2d.Canvas) {\r\n if(canvasState) {\r\n canvas.setZoom(canvasState.zoom)\r\n canvas.setScrollLeft(canvasState.scrollLeft)\r\n canvas.setScrollTop(canvasState.scrollTop)\r\n }\r\n canvas.showDecoration();\r\n }\r\n\r\n if (typeof cropBoundingBox !== \"undefined\") {\r\n let sourceX = cropBoundingBox.x\r\n let sourceY = cropBoundingBox.y\r\n let sourceWidth = cropBoundingBox.w\r\n let sourceHeight = cropBoundingBox.h\r\n\r\n let croppedCanvas = document.createElement('canvas')\r\n croppedCanvas.width = sourceWidth\r\n croppedCanvas.height = sourceHeight\r\n\r\n croppedCanvas.getContext(\"2d\").drawImage(fullSizeCanvas, sourceX, sourceY, sourceWidth, sourceHeight, 0, 0, sourceWidth, sourceHeight);\r\n\r\n let dataUrl = croppedCanvas.toDataURL(\"image/png\")\r\n let base64Image = dataUrl.replace(\"data:image/png;base64,\", \"\")\r\n resultCallback(dataUrl, base64Image)\r\n } else {\r\n let img = fullSizeCanvas.toDataURL(\"image/png\")\r\n resultCallback(img, img.replace(\"data:image/png;base64,\", \"\"))\r\n }\r\n } finally {\r\n canvasDomNode.remove()\r\n }\r\n }\r\n })\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Serialize the canvas document into a SVG document.\r\n *\r\n * // Create a SVG writer and convert the canvas into a SVG document.\r\n * //\r\n * var writer = new draw2d.io.svg.Writer();\r\n * writer.marshal(canvas, function(svg){\r\n * // insert the svg string into a DIV for preview or post\r\n * // it via ajax to the server....\r\n * $(\"#svg\").text(svg);\r\n * });\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.io.Writer\r\n */\r\ndraw2d.io.svg.Writer = draw2d.io.Writer.extend(\r\n /** @lends draw2d.io.svg.Writer */\r\n {\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n /**\r\n *\r\n * Export the content of the canvas into SVG. The SVG document can be loaded with Inkscape or any other SVG Editor.\r\n * <br>\r\n * <br>\r\n *\r\n * Method signature has been changed from version 2.10.1 to version 3.0.0.<br>\r\n * The parameter <b>resultCallback</b> is required and new. The method calls\r\n * the callback instead of return the result.\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to marshal\r\n * @param {Function} callback the method to call on success. The first argument is the SVG document\r\n * @param {String} callback.svg the SVG document\r\n * @param {String} callback.base64 the SVG document encoded in base64\r\n */\r\n marshal: function (canvas, callback) {\r\n // I change the API signature from version 2.10.1 to 3.0.0. Throw an exception\r\n // if any application not care about this changes.\r\n if (typeof callback !== \"function\") {\r\n throw \"Writer.marshal method signature has been change from version 2.10.1 to version 3.0.0. Please consult the API documentation about this issue.\";\r\n }\r\n\r\n let s = canvas.getPrimarySelection()\r\n canvas.setCurrentSelection(null)\r\n let svg = canvas.getHtmlContainer().html()\r\n .replace(/>\\s+/g, \">\")\r\n .replace(/\\s+</g, \"<\")\r\n svg = this.formatXml(svg)\r\n svg = svg.replace(/<desc>.*<\\/desc>/g, \"<desc>Create with draw2d JS graph library and RaphaelJS</desc>\")\r\n\r\n canvas.setCurrentSelection(s)\r\n\r\n let base64Content = draw2d.util.Base64.encode(svg)\r\n callback(svg, base64Content)\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The CenterEdgeConnectionAnchor's location is found by calculating the intersection of a\r\n * line drawn from the center point of its owner's box (the parent of the\r\n * connection port) to a reference point on that box. A Connection using the\r\n * ChopBoxAnchor will be oriented such that they point to their port owner's\r\n * center.\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.anchor.ConnectionAnchor\r\n */\r\n\r\ndraw2d.layout.anchor.CenterEdgeConnectionAnchor = draw2d.layout.anchor.ConnectionAnchor.extend(\r\n /** @lends draw2d.layout.anchor.CenterEdgeConnectionAnchor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.anchor.CenterEdgeConnectionAnchor\",\r\n\r\n /**\r\n *\r\n * @param {draw2d.Figure} [owner] the figure to use for the anchor calculation\r\n */\r\n init: function (owner) {\r\n this._super(owner)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the location where the Connection should be anchored in\r\n * absolute coordinates. The anchor may use the given reference\r\n * Point to calculate this location.\r\n *\r\n * @param {draw2d.geo.Point} ref The reference Point in absolute coordinates\r\n * @param {draw2d.Connection} [inquiringConnection] the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The anchor's location\r\n */\r\n getLocation: function (ref, inquiringConnection) {\r\n let r = this.getOwner().getParent().getBoundingBox()\r\n\r\n let dir = r.getDirection(ref)\r\n let center = r.getCenter()\r\n\r\n switch (dir) {\r\n case 0:\r\n center.y = r.y\r\n break\r\n case 1:\r\n center.x = r.x + r.w\r\n break\r\n case 2:\r\n center.y = r.y + r.h\r\n break\r\n case 3:\r\n center.x = r.x\r\n }\r\n\r\n return center\r\n },\r\n\r\n /**\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @returns {draw2d.geo.Rectangle} The bounds of this Anchor's owner\r\n */\r\n getBox: function () {\r\n return this.getOwner().getParent().getBoundingBox()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @param {draw2d.Connection} [inquiringConnection] the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The bounds of this Anchor's owner\r\n */\r\n getReferencePoint: function (inquiringConnection) {\r\n return this.getBox().getCenter()\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The ChopboxAnchor's location is found by calculating the intersection of a\r\n * line drawn from the center point of its owner's box (the parent of the\r\n * connection port) to a reference point on that box. A Connection using the\r\n * ChopBoxAnchor will be oriented such that they point to their port owner's\r\n * center.\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.layout.anchor.ConnectionAnchor\r\n */\r\n\r\ndraw2d.layout.anchor.ChopboxConnectionAnchor = draw2d.layout.anchor.ConnectionAnchor.extend(\r\n /** @lends draw2d.layout.anchor.ChopboxConnectionAnchor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.anchor.ChopboxConnectionAnchor\",\r\n\r\n /**\r\n *\r\n * @param {draw2d.Figure} owner the figure to use for the anchor calculation\r\n */\r\n init: function (owner) {\r\n this._super(owner)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Returns the location where the Connection should be anchored in\r\n * absolute coordinates. The anchor may use the given reference\r\n * Point to calculate this location.\r\n *\r\n * @param {draw2d.geo.Point} reference The reference Point in absolute coordinates\r\n * @param {draw2d.Connection} [inquiringConnection] the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The anchor's location\r\n */\r\n getLocation: function (reference, inquiringConnection) {\r\n let r = new draw2d.geo.Rectangle(0, 0)\r\n r.setBounds(this.getBox())\r\n r.translate(-1, -1)\r\n r.resize(1, 1)\r\n\r\n let center = r.getCenter()\r\n\r\n if (r.isEmpty() || (reference.x === center.x && reference.y === center.y)) {\r\n return center // This avoids divide-by-zero\r\n }\r\n\r\n let dx = reference.x - center.x\r\n let dy = reference.y - center.y\r\n\r\n // r.width, r.height, dx, and dy are guaranteed to be non-zero.\r\n let scale = 0.5 / Math.max(Math.abs(dx) / r.w, Math.abs(dy) / r.h)\r\n\r\n dx *= scale\r\n dy *= scale\r\n center.translate(dx, dy)\r\n\r\n return center\r\n },\r\n\r\n /**\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @returns {draw2d.geo.Rectangle} The bounds of this Anchor's owner\r\n */\r\n getBox: function () {\r\n return this.getOwner().getParent().getBoundingBox()\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Returns the reference point for this anchor in absolute coordinates. This might be used\r\n * by another anchor to determine its own location.\r\n *\r\n * @param {draw2d.Connection} [inquiringConnection] the connection who ask for the location.\r\n * @returns {draw2d.geo.Point} The bounds of this Anchor's owner\r\n */\r\n getReferencePoint: function (inquiringConnection) {\r\n return this.getBox().getCenter()\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * An object to which a {@link draw2d.Connection} will be anchored.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n */\r\n\r\ndraw2d.layout.anchor.ConnectionAnchor = Class.extend(\r\n /** @lends draw2d.layout.anchor.ConnectionAnchor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.anchor.ConnectionAnchor\",\r\n\r\n /**\r\n *\r\n * @param {draw2d.Figure} owner the figure to use for the anchor calculation\r\n */\r\n init: function (owner) {\r\n this.owner = owner\r\n },\r\n\r\n /**\r\n * \r\n * Returns the location where the Connection should be anchored in absolute coordinates.\r\n * The anchor may use the given reference Point to calculate this location.\r\n *\r\n * @param {draw2d.geo.Point} reference the opposite reference point\r\n * @param {draw2d.Connection} inquiringConnection the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point}\r\n */\r\n getLocation: function (reference, inquiringConnection) {\r\n // return the center of the owner/port.\r\n return this.getReferencePoint(inquiringConnection)\r\n },\r\n\r\n /**\r\n * \r\n * Returns the Figure that contains this ConnectionAnchor.\r\n *\r\n * @returns {draw2d.Figure} The Figure that contains this ConnectionAnchor\r\n */\r\n getOwner: function () {\r\n return this.owner\r\n },\r\n\r\n /**\r\n * \r\n * Set the owner of the Anchor.\r\n *\r\n * @param {draw2d.Figure} owner the new owner of the anchor locator\r\n */\r\n setOwner: function (owner) {\r\n if (typeof owner === \"undefined\") {\r\n throw \"Missing parameter for 'owner' in ConnectionAnchor.setOwner\"\r\n }\r\n this.owner = owner\r\n },\r\n\r\n /**\r\n * \r\n * Returns the bounds of this Anchor's owner. Subclasses can override this method\r\n * to adjust the box. Maybe you return the box of the port parent (the parent figure)\r\n *\r\n * @returns {draw2d.geo.Rectangle} The bounds of this Anchor's owner\r\n */\r\n getBox: function () {\r\n return this.getOwner().getAbsoluteBounds()\r\n },\r\n\r\n /**\r\n * \r\n * Returns the reference point for this anchor in absolute coordinates. This might be used\r\n * by another anchor to determine its own location.\r\n *\r\n * @param {draw2d.Connection} [inquiringConnection] the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The reference Point\r\n */\r\n getReferencePoint: function (inquiringConnection) {\r\n return this.getOwner().getAbsolutePosition()\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The FanConnectionAnchor's location is found by calculating the intersection of a\r\n * line drawn from the center point of its owner's box (the parent of the\r\n * connection port) to a reference point on that box.\r\n * Additional the anchor resolves conflicts by spread the anchor if more than one\r\n * connection has the same reference point. <br>\r\n * In a case of a DirectRouter parallel connections are the result.\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @since 4.6.0\r\n * @extends draw2d.layout.anchor.ConnectionAnchor\r\n */\r\n\r\ndraw2d.layout.anchor.FanConnectionAnchor = draw2d.layout.anchor.ConnectionAnchor.extend(\r\n /** @lends draw2d.layout.anchor.FanConnectionAnchor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.anchor.FanConnectionAnchor\",\r\n\r\n /**\r\n *\r\n * @param {draw2d.Figure} owner the figure to use for the anchor calculation\r\n * @param {Number} [separation] the separation or fan distance between the concurrent/conflicting anchors\r\n */\r\n init: function (owner, separation) {\r\n this._super(owner)\r\n\r\n if (separation) {\r\n this.separation = parseInt(separation)\r\n }\r\n else {\r\n this.separation = 10\r\n }\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the location where the Connection should be anchored in\r\n * absolute coordinates. The anchor may use the given reference\r\n * Point to calculate this location.\r\n *\r\n * @param {draw2d.geo.Point} reference The reference Point in absolute coordinates\r\n * @param {draw2d.Connection} inquiringConnection the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The anchor's location\r\n */\r\n getLocation: function (reference, inquiringConnection) {\r\n\r\n let r = new draw2d.geo.Rectangle(0, 0)\r\n r.setBounds(this.getBox())\r\n r.translate(-1, -1)\r\n r.resize(1, 1)\r\n\r\n let center = r.getCenter()\r\n\r\n if (r.isEmpty() || (reference.x === center.x && reference.y === center.y)) {\r\n return center // This avoids divide-by-zero\r\n }\r\n\r\n // translate the center if required\r\n //\r\n let s = inquiringConnection.getSource()\r\n let t = inquiringConnection.getTarget()\r\n let lines = this.getOwner().getConnections().clone()\r\n lines.grep(function (other) {\r\n return (other.getTarget() === t && other.getSource() === s) || (other.getTarget() === s && other.getSource() === t)\r\n })\r\n let index = lines.indexOf(inquiringConnection) + 1\r\n let position = center.getPosition(reference)\r\n let ray\r\n if (position === draw2d.geo.PositionConstants.SOUTH || position === draw2d.geo.PositionConstants.EAST) {\r\n ray = new draw2d.geo.Point(reference.x - center.x, reference.y - center.y)\r\n }\r\n else {\r\n ray = new draw2d.geo.Point(center.x - reference.x, center.y - reference.y)\r\n }\r\n let length = Math.sqrt(ray.x * ray.x + ray.y * ray.y)\r\n if (index <= 2) {\r\n length *= 1.5\r\n }\r\n let xSeparation = this.separation * ray.x / length\r\n let ySeparation = this.separation * ray.y / length\r\n if (index % 2 === 0) {\r\n center = new draw2d.geo.Point(center.x + (index / 2) * (-1 * ySeparation), center.y + (index / 2) * xSeparation)\r\n }\r\n else {\r\n center = new draw2d.geo.Point(center.x + (index / 2) * ySeparation, center.y + (index / 2) * (-1 * xSeparation))\r\n }\r\n\r\n let intersections = this.getBox().intersectionWithLine(center, reference)\r\n // perfect - one intersection mean that the shifted center point is inside the bounding box and has only one intersection with it.\r\n //\r\n switch (intersections.getSize()) {\r\n case 0:\r\n // calculate the edge of the bounding box which is nearest to the reference point\r\n //\r\n let v = this.getBox().getVertices()\r\n let first = v.first()\r\n first.distance = reference.distance(first)\r\n return v.asArray().reduce(function (previous, current) {\r\n current.distance = reference.distance(current)\r\n return current.distance < previous.distance ? current : previous\r\n })\r\n case 1:\r\n return intersections.get(0)\r\n case 2:\r\n // get the nearest of these points\r\n let p0 = intersections.get(0)\r\n let p1 = intersections.get(1)\r\n let p0diff = reference.distance(p0)\r\n let p1diff = reference.distance(p1)\r\n if (p0diff < p1diff) {\r\n return p0\r\n }\r\n return p1\r\n }\r\n\r\n // we have 0 or 2 intersections with the bounding box. This means the shifted\r\n // calculate the intersection if the new \"center\" with the bounding box of the\r\n // shape (if any exists)\r\n\r\n },\r\n\r\n /**\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @returns {draw2d.geo.Rectangle} The bounds of this Anchor's owner\r\n */\r\n getBox: function () {\r\n return this.getOwner().getParent().getBoundingBox()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the reference point for this anchor in absolute coordinates. This might be used\r\n * by another anchor to determine its own location.\r\n *\r\n * @param {draw2d.Connection} inquiringConnection the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The bounds of this Anchor's owner\r\n */\r\n getReferencePoint: function (inquiringConnection) {\r\n return this.getBox().getCenter()\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The ChopboxAnchor's location is found by calculating the intersection of a\r\n * line drawn from the center point of its owner's box (the parent of the\r\n * connection port) to a reference point on that box. A Connection using the\r\n * ChopBoxAnchor will be oriented such that they point to their port owner's\r\n * center.\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.layout.anchor.ConnectionAnchor\r\n */\r\n\r\ndraw2d.layout.anchor.ShortesPathConnectionAnchor = draw2d.layout.anchor.ConnectionAnchor.extend(\r\n /** @lends draw2d.layout.anchor.ShortesPathConnectionAnchor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.anchor.ShortesPathConnectionAnchor\",\r\n\r\n /**\r\n *\r\n * @param {draw2d.Figure} [owner] the figure to use for the anchor calculation\r\n */\r\n init: function (owner) {\r\n this._super(owner)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the location where the Connection should be anchored in\r\n * absolute coordinates. The anchor may use the given reference\r\n * Point to calculate this location.\r\n *\r\n * @param {draw2d.geo.Point} ref The reference Point in absolute coordinates\r\n * @param {draw2d.Connection} inquiringConnection the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The anchor's location\r\n */\r\n getLocation: function (ref, inquiringConnection) {\r\n let r = this.getOwner().getParent().getBoundingBox()\r\n let center = r.getCenter()\r\n\r\n // check if we can calculate with a circle/line intersection\r\n //\r\n if (this.getOwner().getParent() instanceof draw2d.shape.basic.Oval) {\r\n let result = this.getOwner().getParent().intersectionWithLine(ref, center)\r\n if (result.getSize() === 1) {\r\n return result.get(0)\r\n }\r\n }\r\n\r\n /* 0 | 1 | 2\r\n * __|___|__\r\n * 7 | 8 | 3\r\n * __|___|__\r\n * 6 | 5 | 4\r\n */\r\n let octant = r.determineOctant(new draw2d.geo.Rectangle(ref.x, ref.y, 2, 2))\r\n\r\n switch (octant) {\r\n case 0:\r\n return r.getTopLeft()\r\n case 1:\r\n return new draw2d.geo.Point(ref.x, r.getTop())\r\n case 2:\r\n return r.getTopRight()\r\n case 3:\r\n return new draw2d.geo.Point(r.getRight(), ref.y)\r\n case 4:\r\n return r.getBottomRight()\r\n case 5:\r\n return new draw2d.geo.Point(ref.x, r.getBottom())\r\n case 6:\r\n return r.getBottomLeft()\r\n case 7:\r\n return new draw2d.geo.Point(r.getLeft(), ref.y)\r\n }\r\n\r\n return r.getTopLeft()\r\n },\r\n\r\n /**\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @returns {draw2d.geo.Rectangle} The bounds of this Anchor's owner\r\n */\r\n getBox: function () {\r\n return this.getOwner().getParent().getBoundingBox()\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * Returns the bounds of this Anchor's owner. Subclasses can\r\n * override this method to adjust the box. Maybe you return the box\r\n * of the port parent (the parent figure)\r\n *\r\n * @param {draw2d.Connection} inquiringConnection the connection who ask for the location.\r\n *\r\n * @returns {draw2d.geo.Point} The bounds of this Anchor's owner\r\n */\r\n getReferencePoint: function (inquiringConnection) {\r\n return this.getBox().getCenter()\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Provides a {@link draw2d.Connection} with an orthogonal route between the Connection's source\r\n * and target anchors.\r\n * <br>\r\n * Additional a <b>bridge</b> is added to each connection which didn't have a common source or target\r\n * port.<br>\r\n * A <b>dot</b> is added at the crossing if the two connections have a common spurce or target port.\r\n *\r\n * <br>\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.CircuitConnectionRouter());\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let f1 = new draw2d.shape.analog.OpAmp({x:10, y:10});\r\n * let f2 = new draw2d.shape.analog.ResistorVertical({angle:90, height:20, x:300, y:150});\r\n * let f3 = new draw2d.shape.analog.ResistorVertical({x:250, y:70});\r\n * let f4 = new draw2d.shape.analog.ResistorVertical({x:10, y:90});\r\n *\r\n * // ...add it to the canvas\r\n * //\r\n * canvas.add( f1);\r\n * canvas.add( f2);\r\n * canvas.add( f3);\r\n * canvas.add( f4);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(f1.getOutputPort(0));\r\n * c.setTarget(f2.getHybridPort(0));\r\n * canvas.add(c);\r\n *\r\n * // second Connection between the other resistors\r\n * //\r\n * c = createConnection();\r\n * c.setSource(f3.getHybridPort(1));\r\n * c.setTarget(f4.getHybridPort(0));\r\n * canvas.add(c);\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ManhattanConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.CircuitConnectionRouter = draw2d.layout.connection.ManhattanConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.CircuitConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.CircuitConnectionRouter\",\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n this.setBridgeRadius(4)\r\n this.setVertexRadius(2)\r\n\r\n // experimental\r\n this.abortRoutingOnFirstVertexNode = false\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * \r\n * Callback method if the router has been removed from the connection. In the case of the CircuitRouter\r\n * all vertex nodes will be removed from the canvas.\r\n *\r\n * @param {draw2d.Connection} connection The related connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onUninstall: function (connection) {\r\n if (typeof connection.vertexNodes !== \"undefined\" && connection.vertexNodes !== null) {\r\n connection.vertexNodes.remove()\r\n connection.vertexNodes = null\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Set the radius of the vertex circle.\r\n *\r\n * @param {Number} radius\r\n */\r\n setVertexRadius: function (radius) {\r\n this.vertexRadius = radius\r\n\r\n return this\r\n },\r\n /** deprecated\r\n * @private\r\n * **/\r\n setJunctionRadius: function (radius) {\r\n this.vertexRadius = radius\r\n },\r\n\r\n /**\r\n * \r\n * Set the radius or span of the bridge. A bridge will be drawn if two connections are crossing and didn't have any\r\n * common port.\r\n *\r\n * @param {Number} radius\r\n */\r\n setBridgeRadius: function (radius) {\r\n this.bridgeRadius = radius\r\n this.bridge_LR = [\" r\", 0.5, -0.5, radius - (radius / 2), -(radius - radius / 4), radius, -radius, radius + (radius / 2), -(radius - radius / 4), radius * 2, \"0 \"].join(\" \")\r\n this.bridge_RL = [\" r\", -0.5, -0.5, -(radius - (radius / 2)), -(radius - radius / 4), -radius, -radius, -(radius + (radius / 2)), -(radius - radius / 4), -radius * 2, \"0 \"].join(\" \")\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n let fromPt = conn.getStartPoint()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPoint()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // calculate the lines between the two points with the standard ManhattanRouter.\r\n //\r\n this._route(conn, toPt, toDir, fromPt, fromDir)\r\n\r\n // get the intersections to the other connections\r\n //\r\n let intersectionsASC = conn.getCanvas().getIntersection(conn).sort(\"x\")\r\n let intersectionsDESC = intersectionsASC.clone().reverse()\r\n\r\n let intersectionForCalc = intersectionsASC\r\n\r\n // add a ArrayList of all added vertex nodes to the connection\r\n //\r\n if (typeof conn.vertexNodes !== \"undefined\" && conn.vertexNodes !== null) {\r\n conn.vertexNodes.remove()\r\n }\r\n conn.vertexNodes = conn.canvas.paper.set()\r\n\r\n // ATTENTION: we cast all x/y coordinates to integer and add 0.5 to avoid subpixel rendering of\r\n // the connection. The 1px or 2px lines look much clearer than before.\r\n //\r\n let ps = conn.getVertices()\r\n let p = ps.get(0)\r\n let path = [\"M\", (p.x | 0) + 0.5, \" \", (p.y | 0) + 0.5]\r\n\r\n let oldP = p\r\n let bridgeWidth = null\r\n let bridgeCode = null\r\n\r\n let lastVertexNode = null\r\n\r\n for (let i = 1; i < ps.getSize(); i++) {\r\n p = ps.get(i)\r\n\r\n // line goes from right->left.\r\n if (oldP.x > p.x) {\r\n intersectionForCalc = intersectionsDESC\r\n bridgeCode = this.bridge_RL\r\n bridgeWidth = -this.bridgeRadius\r\n }\r\n // line goes from left->right\r\n else {\r\n intersectionForCalc = intersectionsASC\r\n bridgeCode = this.bridge_LR\r\n bridgeWidth = this.bridgeRadius\r\n }\r\n\r\n // add a bridge or a vertex node depending to the intersection connection\r\n //\r\n // bridge => the connections didn't have a common port\r\n // vertex => the connections did have a common source or target port\r\n //\r\n intersectionForCalc.each((ii, interP) => {\r\n if (draw2d.shape.basic.Line.hit(1, oldP.x, oldP.y, p.x, p.y, interP.x, interP.y) === true) {\r\n\r\n // It is a vertex node..\r\n //\r\n if (conn.sharingPorts(interP.other)) {\r\n let other = interP.other\r\n let otherZ = other.getZOrder()\r\n let connZ = conn.getZOrder()\r\n if (connZ < otherZ) {\r\n let vertexNode = conn.canvas.paper.ellipse(interP.x, interP.y, this.vertexRadius, this.vertexRadius).attr({fill: conn.lineColor.rgba()})\r\n conn.vertexNodes.push(vertexNode)\r\n // we found a vertex node. In this case an already existing connection did draw the connection.\r\n //\r\n if (this.abortRoutingOnFirstVertexNode === true) {\r\n if (conn.getSource() === other.getSource() || conn.getSource() === other.getTarget()) {\r\n path = [\"M\", (interP.x | 0) + 0.5, \" \", (interP.y | 0) + 0.5]\r\n if (lastVertexNode !== null) {\r\n lastVertexNode.remove()\r\n conn.vertexNodes.exclude(lastVertexNode)\r\n }\r\n }\r\n lastVertexNode = vertexNode\r\n }\r\n }\r\n }\r\n // ..or a bridge. We draw only horizontal bridges. Just a design decision\r\n //\r\n else if (p.y === interP.y) {\r\n path.push(\" L\", ((interP.x - bridgeWidth) | 0) + 0.5, \" \", (interP.y | 0) + 0.5)\r\n path.push(bridgeCode)\r\n }\r\n }\r\n })\r\n\r\n path.push(\" L\", (p.x | 0) + 0.5, \" \", (p.y | 0) + 0.5)\r\n oldP = p\r\n }\r\n conn.svgPathString = path.join(\"\")\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Routes a {@link draw2d.Connection}, possibly using a constraint.\r\n *\r\n * @author Andreas Herz\r\n */\r\n\r\ndraw2d.layout.connection.ConnectionRouter = Class.extend(\r\n /** @lends draw2d.layout.connection.ConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.ConnectionRouter\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function () {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Routes the Connection.\r\n *\r\n * @param {draw2d.Connection} connection The Connection to route\r\n * @param {Object} [routingHints] some helper attributes for the router\r\n * @param {Boolean} [routingHints.startMoved] is true if just the start location has moved\r\n * @param {Boolean} [routingHints.endMoved] is true if the destination location has changed\r\n * @param {draw2d.util.ArrayList} [routingHints.oldVertices] the vertices before the reroute has been triggered\r\n *\r\n * @template\r\n */\r\n route: function (connection, routingHints) {\r\n throw \"subclasses must implement the method [ConnectionRouter.route]\"\r\n },\r\n\r\n _paint: function (conn) {\r\n // calculate the path string for the SVG rendering\r\n // Important: to avoid subpixel error rendering we add 0.5 to each coordinate\r\n // With this offset the canvas can paint the line on a \"full pixel\" instead\r\n // of subpixel rendering.\r\n// let adjust = val => (val| 0) +0.5\r\n let adjust = val => val.toFixed(2)\r\n\r\n let ps = conn.getVertices()\r\n let p = ps.get(0)\r\n let radius = conn.getRadius()\r\n let path = [\"M\", adjust(p.x), \" \", adjust(p.y)]\r\n let i = 1\r\n let length, inset, p2\r\n if (radius > 0) {\r\n let lastP = p\r\n length = (ps.getSize() - 1)\r\n for (; i < length; i++) {\r\n p = ps.get(i)\r\n inset = draw2d.geo.Util.insetPoint(p, lastP, radius)\r\n path.push(\"L\", adjust(inset.x), \",\", adjust(inset.y))\r\n\r\n p2 = ps.get(i + 1)\r\n inset = draw2d.geo.Util.insetPoint(p, p2, radius)\r\n\r\n path.push(\"Q\", p.x, \",\", p.y, \" \", adjust(inset.x), \", \", adjust(inset.y))\r\n lastP = p\r\n }\r\n p = ps.get(i)\r\n path.push(\"L\", adjust(p.x), \",\", adjust(p.y))\r\n }\r\n else {\r\n length = ps.getSize()\r\n for (; i < length; i++) {\r\n p = ps.get(i)\r\n path.push(\"L\", adjust(p.x), \",\", adjust(p.y))\r\n }\r\n }\r\n conn.svgPathString = path.join(\"\")\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if the router has been removed from the connection.\r\n *\r\n * @param {draw2d.shape.basic.PolyLine} connection The related connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onUninstall: function (connection) {\r\n },\r\n\r\n /**\r\n *\r\n * Callback method for the PolyLine or Connection to check if it possible to remove a vertex from\r\n * the list. The router can send an veto for this.\r\n * Per default it is not possible to remove any vertex from the PolyLine exceptional if any interactive\r\n * router is installed.\r\n *\r\n * @param {Number} index\r\n * @since 4.2.3\r\n */\r\n canRemoveVertexAt: function (index) {\r\n return false\r\n },\r\n\r\n /**\r\n * Callback method for the PolyLine or Connection to verify that a segment is deletable.\r\n *\r\n * @param {Number} index\r\n * @returns {Boolean}\r\n * @since 4.2.3\r\n */\r\n canRemoveSegmentAt: function (index) {\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Tweak or enrich the polyline persistence data with routing information\r\n *\r\n * @since 2.10.0\r\n * @param {draw2d.shape.basic.PolyLine} line\r\n * @param {Object} memento The memento data of the polyline\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function (line, memento) {\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * set the attributes for the polyline with routing information\r\n *\r\n * @since 2.10.0\r\n * @param {draw2d.shape.basic.Line} line\r\n * @param {Object} memento the JSON data to read\r\n */\r\n setPersistentAttributes: function (line, memento) {\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * The draw2d.Connection delegates the drag operation to the router. The router can\r\n * handle the different constraints of the connection.\r\n *\r\n * @param {draw2d.shape.basic.Line} line\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n */\r\n onDrag: function (line, dx, dy, dx2, dy2) {\r\n },\r\n\r\n /**\r\n *\r\n * Called by the connection if the vertices set outside.\r\n * This enforce the router to avoid full autoroute. E.g. InteractiveManhattanRouter\r\n *\r\n * @protected\r\n * @param {draw2d.shape.basic.Line} line\r\n */\r\n verticesSet: function (line) {\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Router for direct connections between two ports. Beeline\r\n * <br>\r\n * <br>\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.DirectRouter());\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.DirectRouter = draw2d.layout.connection.ConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.DirectRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.DirectRouter\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Invalidates the given Connection\r\n */\r\n invalidate: function () {\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (connection, routingHints) {\r\n let start = connection.getStartPosition()\r\n let end = connection.getEndPosition()\r\n\r\n // required for hit tests\r\n //\r\n connection.addPoint(start)\r\n connection.addPoint(end)\r\n\r\n // calculate the path\r\n let path = [\"M\", start.x, \" \", start.y]\r\n path.push(\"L\", end.x, \" \", end.y)\r\n\r\n connection.svgPathString = path.join(\"\")\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Automatic router that spreads its {@link draw2d.Connection Connections} in a fan-like fashion upon collision.\r\n *\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * // return my special kind of connection\r\n * let con = new draw2d.Connection({\r\n * radius: 14,\r\n * router: new draw2d.layout.connection.FanConnectionRouter()\r\n * });\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * // second Connection\r\n * //\r\n * c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * // third Connection\r\n * //\r\n * c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.DirectRouter\r\n */\r\n\r\ndraw2d.layout.connection.FanConnectionRouter = draw2d.layout.connection.DirectRouter.extend(\r\n /** @lends draw2d.layout.connection.FanConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.FanConnectionRouter\",\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * \r\n * Layout the hands over connection in a manhattan like layout\r\n *\r\n * @param {draw2d.Connection} conn\r\n * @param {draw2d.util.ArrayList} oldVertices old/existing vertices of the Connection\r\n * @param {Object} routingHints some helper attributes for the router\r\n * @param {Boolean} routingHints.startMoved is true if just the start location has moved\r\n * @param {Boolean} routingHints.destMoved is true if the destination location has changed\r\n */\r\n route: function (conn, routingHints) {\r\n let lines = conn.getSource().getConnections().clone()\r\n lines.grep( other => other.getTarget() === conn.getTarget() || other.getSource() === conn.getTarget())\r\n\r\n if (lines.getSize() > 1) {\r\n this.routeCollision(conn, lines.indexOf(conn))\r\n }\r\n else {\r\n this._super(conn, routingHints)\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * route the connection if connections overlap. Two connections overlap if the combination\r\n * of source and target anchors are equal.\r\n *\r\n * @param {draw2d.Connection} conn\r\n * @param {Number} index\r\n */\r\n routeCollision: function (conn, index) {\r\n index = index + 1\r\n let start = conn.getStartPoint()\r\n let end = conn.getEndPoint()\r\n\r\n let separation = 15\r\n\r\n let midPoint = new draw2d.geo.Point((end.x + start.x) / 2, (end.y + start.y) / 2)\r\n let position = end.getPosition(start)\r\n let ray\r\n if (position === draw2d.geo.PositionConstants.SOUTH || position === draw2d.geo.PositionConstants.EAST) {\r\n ray = new draw2d.geo.Point(end.x - start.x, end.y - start.y)\r\n }\r\n else {\r\n ray = new draw2d.geo.Point(start.x - end.x, start.y - end.y)\r\n }\r\n\r\n let length = Math.sqrt(ray.x * ray.x + ray.y * ray.y)\r\n\r\n let xSeparation = separation * ray.x / length\r\n let ySeparation = separation * ray.y / length\r\n\r\n let bendPoint\r\n\r\n if (index % 2 === 0) {\r\n bendPoint = new draw2d.geo.Point(midPoint.x + (index / 2) * (-1 * ySeparation), midPoint.y + (index / 2) * xSeparation)\r\n }\r\n else {\r\n bendPoint = new draw2d.geo.Point(midPoint.x + (index / 2) * ySeparation, midPoint.y + (index / 2) * (-1 * xSeparation))\r\n }\r\n\r\n // required for hit tests\r\n conn.addPoint(start)\r\n conn.addPoint(bendPoint)\r\n conn.addPoint(end)\r\n\r\n // calculate the path string for the SVG rendering\r\n //\r\n this._paint(conn)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * Route the connection in an Manhattan style and add resize handles to all vertex for interactive alignment of the\r\n * routing.\r\n *\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * // return my special kind of connection\r\n * let con = new draw2d.Connection({\r\n * radius: 4,\r\n * router: new draw2d.layout.connection.InteractiveManhattanConnectionRouter()\r\n * });\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * // select the connection to show the selection handles\r\n * //\r\n * c.select();\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @since 4.0.2\r\n * @extends draw2d.layout.connection.ManhattanConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.InteractiveManhattanConnectionRouter = draw2d.layout.connection.ManhattanConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.InteractiveManhattanConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.InteractiveManhattanConnectionRouter\",\r\n\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n onInstall: function (conn) {\r\n conn.installEditPolicy(new draw2d.policy.line.OrthogonalSelectionFeedbackPolicy())\r\n conn._routingMetaData ??= { routedByUserInteraction: false,fromDir: -1,toDir: -1}\r\n },\r\n\r\n onUninstall: function (conn) {\r\n delete conn._routingMetaData\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n */\r\n route: function (conn, routingHints) {\r\n if (!routingHints.oldVertices) {\r\n debugger\r\n }\r\n if (routingHints.oldVertices.getSize() === 0 || conn._routingMetaData.routedByUserInteraction === false) {\r\n this._super(conn, routingHints)\r\n conn._routingMetaData.fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n conn._routingMetaData.toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n }\r\n else {\r\n this.halfRoute(conn, routingHints)\r\n this._paint(conn)\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * The routing algorithm if the user has changed at least on of the vertices manually.\r\n * This kind of routing just align the start and end vertices to the new source/target port\r\n * location.\r\n * The vertices between keep untouched. Modification of this vertices are done by the\r\n * draw2d.policy.line.OrthogonalSelectionFeedbackPolicy\r\n *\r\n * @param {draw2d.Connection} conn the connection to route\r\n * @param {Object} routingHints some helper attributes for the router\r\n * @param {Boolean} routingHints.startMoved is true if just the start location has moved\r\n * @param {Boolean} routingHints.endMoved is true if the destination location has changed\r\n */\r\n halfRoute: function (conn, routingHints) {\r\n let MINDIST = this.MINDIST\r\n let max = Math.max\r\n let min = Math.min\r\n\r\n routingHints ??= {oldVertices: new draw2d.util.ArrayList()}\r\n let oldVertices = routingHints.oldVertices\r\n let vertexCount = oldVertices.getSize()\r\n\r\n let fromPt = conn.getStartPosition()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPosition()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // the port orientation has been changed. This can happen if the node rotates. In this case\r\n // we must recalculate the routing.\r\n if (conn._routingMetaData.fromDir !== fromDir || conn._routingMetaData.toDir !== toDir) {\r\n conn._routingMetaData.routedByUserInteraction = false\r\n this.route(conn, routingHints)\r\n }\r\n\r\n // TODO: detection for switch back to autoroute isn't good enough.\r\n // Add more logic. e.g. if the fromDir!==1. This happens if\r\n // The ports are at bottom and top.\r\n // The code below covers only the classic workflow configuration left->right\r\n //\r\n // go back to the default if no routing is possible anymore\r\n //\r\n if ((fromDir === draw2d.geo.Rectangle.DIRECTION_RIGHT) && (toDir === draw2d.geo.Rectangle.DIRECTION_LEFT)\r\n && (fromPt.x > toPt.x) && (vertexCount <= 4)) {\r\n\r\n conn._routingMetaData.routedByUserInteraction = false\r\n this.route(conn, routingHints)\r\n }\r\n // it makes no sense to have just 2 vertices and manual routing for Manhattan-style routing\r\n else if(conn.getVertices().getSize() ===2 && conn._routingMetaData.routedByUserInteraction === true){\r\n conn._routingMetaData.routedByUserInteraction = false\r\n this.route(conn, routingHints)\r\n }\r\n\r\n // transfer the old vertices into the connection\r\n //\r\n oldVertices.each( (i, vertex) =>{\r\n conn.addPoint(vertex)\r\n })\r\n\r\n\r\n // all points are adjusted with the drag&drop operation. There is no need to move\r\n // start/end points twice\r\n if (conn.isInDragDrop) {\r\n return\r\n }\r\n\r\n // The SOURCE port (labeled with p0) has been moved/changed.\r\n //\r\n if (routingHints.startMoved || !fromPt.equals(oldVertices.get(0))) {\r\n let p1 = oldVertices.get(1)\r\n let p2 = oldVertices.get(2) // optional. Happens if the connection has just 2 points\r\n conn.setVertex(0, fromPt)\r\n switch (fromDir) {\r\n // .\r\n // p0 . p1\r\n // x------+\r\n // .\r\n // .\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n conn.setVertex(1, max(fromPt.x + MINDIST, p1.x), fromPt.y)// p1\r\n if(p2)\r\n conn.setVertex(2, max(fromPt.x + MINDIST, p1.x), p2.y) // p2\r\n break\r\n // .\r\n // . p1 p0\r\n // +------x\r\n // .\r\n // .\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n conn.setVertex(1, min(fromPt.x - MINDIST, p1.x), fromPt.y)// p1\r\n if(p2)\r\n conn.setVertex(2, min(fromPt.x - MINDIST, p1.x), p2.y) // p2\r\n break\r\n // ...+....\r\n // p1 |\r\n // |\r\n // |\r\n // p0 x\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n conn.setVertex(1, fromPt.x, min(fromPt.y - MINDIST, p1.y)) // p1\r\n if(p2)\r\n conn.setVertex(2, p2.x, min(fromPt.y - MINDIST, p1.y)) // p2\r\n break\r\n // x\r\n // p0 |\r\n // |\r\n // p1 |\r\n // ....+....\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n conn.setVertex(1, fromPt.x, max(fromPt.y + MINDIST, p1.y)) // p1\r\n if(p2)\r\n conn.setVertex(2, p2.x, max(fromPt.y + MINDIST, p1.y)) // p2\r\n break\r\n }\r\n }\r\n //////////////////////////////////////////////////////////////////\r\n // the TARGET port (labeled with p0) has moved\r\n //\r\n if (routingHints.endMoved || !toPt.equals(oldVertices.get(vertexCount - 1))) {\r\n let p1 = oldVertices.get(vertexCount - 2)\r\n let p2 = oldVertices.get(vertexCount - 3) // optional\r\n conn.setVertex(vertexCount - 1, toPt) // p0\r\n\r\n switch (toDir) {\r\n // .\r\n // p0 . p1\r\n // x----------+\r\n // .\r\n // .\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n conn.setVertex(vertexCount - 2, max(toPt.x + MINDIST, p1.x), toPt.y) // p1\r\n if(p2)\r\n conn.setVertex(vertexCount - 3, max(toPt.x + MINDIST, p1.x), p2.y) // p2\r\n break\r\n\r\n // .\r\n // .\r\n // . p1 p0\r\n // +----------x\r\n // .\r\n // .\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n conn.setVertex(vertexCount - 2, min(toPt.x - MINDIST, p1.x), toPt.y) // p1\r\n if(p2)\r\n conn.setVertex(vertexCount - 3, min(toPt.x - MINDIST, p1.x), p2.y) // p2\r\n break\r\n\r\n // ...+....\r\n // p1 |\r\n // |\r\n // |\r\n // p0 x\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n conn.setVertex(vertexCount - 2, toPt.x, min(toPt.y - MINDIST, p1.y)) // p1\r\n if(p2)\r\n conn.setVertex(vertexCount - 3, p2.x, min(toPt.y - MINDIST, p1.y)) // p2\r\n break\r\n\r\n // +\r\n // p0 |\r\n // |\r\n // p1 |\r\n // ...+...\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n conn.setVertex(vertexCount - 2, toPt.x, max(toPt.y + MINDIST, p1.y)) // p1\r\n if(p2)\r\n conn.setVertex(vertexCount - 3, p2.x, max(toPt.y + MINDIST, p1.y)) // p2\r\n break\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Callback method for the PolyLine or Connection to verify that a segment is deletable.\r\n * @param {draw2d.Connection} conn\r\n * @param {Number} index\r\n *\r\n * @returns {Boolean}\r\n * @since 4.2.3\r\n */\r\n canRemoveSegmentAt: function (conn, index) {\r\n\r\n let segmentCount = conn.getVertices().getSize() - 1 // segmentCount is one less than vertex count\r\n\r\n // The first and last segment isn't deletable\r\n //\r\n if ((index <= 0) || ((index + 1) >= segmentCount)) {\r\n return false\r\n }\r\n\r\n // a connection need at least three strokes\r\n //\r\n if (segmentCount < 4) {\r\n return false\r\n }\r\n\r\n let fromPt = conn.getStartPosition()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPosition()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n if (segmentCount <= 5) {\r\n // ___\r\n // | | From\r\n // | 1 |-----+\r\n // |___| |\r\n // |\r\n // +----------+\r\n // |\r\n // | ___\r\n // | | |\r\n // +---| 2 | To\r\n // |___|\r\n // the connection needs at least 5 segments if the routing is like this\r\n //\r\n if ((fromDir === draw2d.geo.Rectangle.DIRECTION_RIGHT) && (toDir === draw2d.geo.Rectangle.DIRECTION_LEFT) && (fromPt.x >= toPt.x)) {\r\n return false\r\n }\r\n\r\n\r\n // ___\r\n // | | To\r\n // | 2 |-----+\r\n // |___| |\r\n // |\r\n // +----------+\r\n // |\r\n // | ___\r\n // | | |\r\n // +---| 1 | From\r\n // |___|\r\n // the connection needs at least 5 segments if the routing is like this\r\n //\r\n if ((fromDir == draw2d.geo.Rectangle.DIRECTION_LEFT) & (toDir == draw2d.geo.Rectangle.DIRECTION_RIGHT) && (fromPt.x <= toPt.x)) {\r\n return false\r\n }\r\n\r\n // ___\r\n // +_______ | |\r\n // | from | | 2 |\r\n // _+_ | |___|\r\n // | | | To +\r\n // | 1 | |____________|\r\n // |___|\r\n // the connection needs at least 5 segments if the routing is like this\r\n //\r\n if ((fromDir == draw2d.geo.Rectangle.DIRECTION_UP) & (toDir == draw2d.geo.Rectangle.DIRECTION_DOWN) && (fromPt.y <= toPt.y)) {\r\n return false\r\n }\r\n\r\n // ___\r\n // +_______ | |\r\n // | to | | 1 |\r\n // _+_ | |___|\r\n // | | | from +\r\n // | 2 | |____________|\r\n // |___|\r\n // the connection needs at least 5 segments if the routing is like this\r\n //\r\n if ((fromDir == draw2d.geo.Rectangle.DIRECTION_DOWN) & (toDir == draw2d.geo.Rectangle.DIRECTION_UP) && (fromPt.y >= toPt.y)) {\r\n return false\r\n }\r\n\r\n // unable to make the decision on the easy way. calculate the route again with an\r\n // temporary connection and check if the segment count of the new routed connection\r\n // allows a removal\r\n //\r\n let tmpConn = new draw2d.Connection()\r\n tmpConn.lineSegments = new draw2d.util.ArrayList()\r\n tmpConn.vertices = new draw2d.util.ArrayList()\r\n tmpConn.sourcePort = conn.sourcePort\r\n tmpConn.targetPort = conn.targetPort\r\n tmpConn._routingMetaData = {routedByUserInteraction: false, fromDir: -1, toDir: -1}\r\n this.route(tmpConn, {oldVertices: new draw2d.util.ArrayList()})\r\n let curSegmentCount = conn.getVertices().getSize() - 1\r\n let minSegmentCount = tmpConn.getVertices().getSize() - 1\r\n if (curSegmentCount <= minSegmentCount) {\r\n return false\r\n }\r\n }\r\n\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * The draw2d.Connection delegates the drag operation to the router. The router can\r\n * handle the different constraints of the connection and just drag&drop a single segment\r\n * instead of the complete connection.\r\n *\r\n * @param {draw2d.shape.basic.Line} line the related line to handle\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n *\r\n * @since 6.1.0\r\n */\r\n onDrag: function (line, dx, dy, dx2, dy2) {\r\n let i = 0\r\n // Connection is dragged by source and origin port movement\r\n // or MultiSelection in this case we drag the complete\r\n // connection\r\n if (line.draggedSegment === null) {\r\n let count = line.getVertices().getSize() - 1\r\n for (i = 1; i < count; i++) {\r\n line.getVertex(i).translate(dx2, dy2)\r\n }\r\n return\r\n }\r\n\r\n // don't drag start/end segments. This segments are bounded to the related\r\n // ports.\r\n if (line.draggedSegment.index === 0 || line.draggedSegment.index === (line.getSegments().getSize() - 1)) {\r\n return\r\n }\r\n\r\n line._routingMetaData.routedByUserInteraction = true\r\n\r\n let p0 = line.draggedSegment.start\r\n let p1 = line.draggedSegment.end\r\n i = line.draggedSegment.index\r\n let lp0 = line.getVertices().first()\r\n let lp1 = line.getVertices().last()\r\n\r\n // horizontal segment movement\r\n // x Py\r\n // .\r\n // P0 .\r\n // +---------------------------+ P1\r\n // .\r\n // .\r\n // x Px\r\n //\r\n let distance = 0\r\n if (p0.y === p1.y) {\r\n // ensure that the segment is the min distance away from the source/target port\r\n // (Px is endpoints of the connection and bounded to a port)\r\n if (i === 1) distance = p0.y - lp0.y\r\n // (Py is endpoints of the connection and bounded to a port)\r\n if (i === line.getSegments().getSize() - 2) distance = p1.y - lp1.y\r\n\r\n\r\n if (distance < 0 && dy2 > 0) {\r\n dy2 = Math.min(dy2, (-distance) - this.MINDIST)\r\n }\r\n else if (distance > 0 && dy2 < 0) {\r\n dy2 = -Math.min(-dy2, (distance) - this.MINDIST)\r\n }\r\n\r\n line.getVertex(i).translate(0, dy2)\r\n line.getVertex(i + 1).translate(0, dy2)\r\n }\r\n // vertical segment movement\r\n //\r\n else if (p0.x === p1.x) {\r\n // ensure that the segment is the min distance away from the source/target port\r\n //\r\n if (i === 1) {\r\n distance = p0.x - lp0.x\r\n if (distance < 0 && dx2 > 0) {\r\n dx2 = Math.min(dx2, (-distance) - this.MINDIST)\r\n }\r\n else if (distance > 0 && dx2 < 0) {\r\n dx2 = -Math.min(-dx2, (distance) - this.MINDIST)\r\n }\r\n }\r\n\r\n // we need this additional test too. No \"else if\" because the special\r\n // case of \"index===1\". In this case the segment can be the last AND first\r\n // segment if the connection has only three segments at all.\r\n //\r\n if (i === line.getSegments().getSize() - 2) {\r\n distance = p1.x - lp1.x\r\n if (distance < 0 && dx2 > 0) {\r\n dx2 = Math.min(dx2, (-distance) - this.MINDIST)\r\n }\r\n else if (distance > 0 && dx2 < 0) {\r\n dx2 = -Math.min(-dx2, (distance) - this.MINDIST)\r\n }\r\n }\r\n\r\n line.getVertex(i).translate(dx2, 0)\r\n line.getVertex(i + 1).translate(dx2, 0)\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Called by the connection if the vertices set outside.\r\n * This enforce the router to avoid full autoroute. E.g. InteractiveManhattanRouter\r\n *\r\n * @protected\r\n */\r\n verticesSet: function (conn) {\r\n conn._routingMetaData.routedByUserInteraction = true\r\n if (conn.getSource() !== null && conn.getTarget() !== null) {\r\n conn._routingMetaData.fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n conn._routingMetaData.toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Tweak or enrich the polyline persistence data with routing information\r\n *\r\n * @since 2.10.0\r\n * @param {draw2d.shape.basic.PolyLine} line\r\n * @param {Object} memento The memento data of the polyline\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function (line, memento) {\r\n memento.vertex = []\r\n\r\n line.getVertices().each( (i, e) =>{\r\n memento.vertex.push({x: e.x, y: e.y})\r\n })\r\n memento.routingMetaData = { ...line._routingMetaData}\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n * \r\n * set the attributes for the polyline with routing information of the interactive manhattan router.\r\n *\r\n * @since 4..0.0\r\n * @param {Object} memento\r\n */\r\n setPersistentAttributes: function (line, memento) {\r\n // restore the points from the JSON data and add them to the polyline\r\n //\r\n if (Array.isArray(memento.vertex)) {\r\n\r\n line.oldPoint = null\r\n line.lineSegments = new draw2d.util.ArrayList()\r\n\r\n line.setVertices(memento.vertex)\r\n }\r\n\r\n if (typeof memento.routingMetaData !== \"undefined\") {\r\n line._routingMetaData = {...memento.routingMetaData}\r\n }\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Provides a {@link draw2d.Connection} with an orthogonal route between the Connection's source\r\n * and target anchors.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ManhattanConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.ManhattanBridgedConnectionRouter = draw2d.layout.connection.ManhattanConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.ManhattanBridgedConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.ManhattanBridgedConnectionRouter\",\r\n\r\n BRIDGE_HORIZONTAL_LR: \" r 0 0 3 -4 7 -4 10 0 13 0 \", // Left to right\r\n BRIDGE_HORIZONTAL_RL: \" r 0 0 -3 -4 -7 -4 -10 0 -13 0 \", // right to left\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n let fromPt = conn.getStartPoint()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPoint()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // calculate the lines between the two points.\r\n //\r\n this._route(conn, toPt, toDir, fromPt, fromDir)\r\n // if the start/end are too close, the router do not route anything at all - shortcut. But for the drawing routine\r\n // and the later processing, we need at least two points - \"start\" and \"end\". we fix this here\r\n if(conn.getVertices().getSize()<2){\r\n conn.addPoint(fromPt)\r\n }\r\n \r\n // calculate the path string for the SVG rendering\r\n //\r\n let intersectionsASC = conn.getCanvas().getIntersection(conn).sort(\"x\")\r\n let intersectionsDESC = intersectionsASC.clone().reverse()\r\n\r\n let intersectionForCalc = intersectionsASC\r\n\r\n\r\n // ATTENTION: we cast all x/y coordinates to int and add 0.5 to avoid subpixel rendering of\r\n // the connection. The 1px or 2px lines look much clearer than before.\r\n //\r\n let ps = conn.getVertices()\r\n let p = ps.get(0)\r\n let path = [\"M\", (p.x | 0) + 0.5, \" \", (p.y | 0) + 0.5]\r\n let oldP = p\r\n for (let i = 1; i < ps.getSize(); i++) {\r\n p = ps.get(i)\r\n\r\n // check for intersection and paint a bridge if required\r\n // line goes from left to right\r\n //\r\n let bridgeWidth = 5\r\n let bridgeCode = this.BRIDGE_HORIZONTAL_LR\r\n\r\n // line goes from right->left. Inverse the bridge and the bridgeWidth\r\n //\r\n if (oldP.x >= p.x) {\r\n intersectionForCalc = intersectionsDESC\r\n bridgeCode = this.BRIDGE_HORIZONTAL_RL\r\n bridgeWidth = -bridgeWidth\r\n }\r\n\r\n intersectionForCalc.each(function (ii, interP) {\r\n if (interP.justTouching === false && draw2d.shape.basic.Line.hit(1, oldP.x, oldP.y, p.x, p.y, interP.x, interP.y) === true) {\r\n // we draw only horizontal bridges. Just a design decision\r\n //\r\n if (Math.floor(p.y) === Math.floor(interP.y)) {\r\n path.push(\" L\", ((interP.x - bridgeWidth) | 0) + 0.5, \" \", (interP.y | 0) + 0.5)\r\n path.push(bridgeCode)\r\n }\r\n }\r\n\r\n })\r\n\r\n path.push(\" L\", (p.x | 0) + 0.5, \" \", (p.y | 0) + 0.5)\r\n oldP = p\r\n }\r\n conn.svgPathString = path.join(\"\")\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Provides a {@link draw2d.Connection} with an orthogonal route between the Connection's source\r\n * and target anchors.\r\n *\r\n *\r\n * @example\r\n *\r\n * // Override the default connection type. This is used during drag&drop operations of ports.\r\n * //\r\n * let createConnection=function(sourcePort, targetPort){\r\n * // return my special kind of connection\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.ManhattanConnectionRouter());\r\n * return con;\r\n * };\r\n *\r\n * // Install a special policy into the canvas to use my own implementation of connection\r\n * // if we drag&drop a port\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.ManhattanConnectionRouter = draw2d.layout.connection.ConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.ManhattanConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.ManhattanConnectionRouter\",\r\n\r\n MINDIST: 20,\r\n TOL: 0.1,\r\n TOLxTOL: 0.01,\r\n TOGGLE_DIST: 20,\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n let fromPt = conn.getStartPosition()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPosition()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // calculate the lines between the two points.\r\n //\r\n this._route(conn, toPt, toDir, fromPt, fromDir)\r\n // if the start/end are too close, the router do not route anything at all - shortcut. But for the drawing routine\r\n // and the later processing, we need at least two points - \"start\" and \"end\". we fix this here\r\n if(conn.getVertices().getSize()<2){\r\n conn.addPoint(fromPt)\r\n }\r\n \r\n this._paint(conn)\r\n },\r\n\r\n /**\r\n *\r\n * Internal routing algorithm.\r\n *\r\n * @private\r\n * @param {draw2d.Connection} conn\r\n * @param {draw2d.geo.Point} fromPt\r\n * @param {Number} fromDir\r\n * @param {draw2d.geo.Point} toPt\r\n * @param {Number} toDir\r\n */\r\n _route: function (conn, fromPt, fromDir, toPt, toDir) {\r\n // fromPt is an x,y to start from.\r\n // fromDir is an angle that the first link must\r\n //\r\n let UP = draw2d.geo.Rectangle.DIRECTION_UP\r\n let RIGHT = draw2d.geo.Rectangle.DIRECTION_RIGHT\r\n let DOWN = draw2d.geo.Rectangle.DIRECTION_DOWN\r\n let LEFT = draw2d.geo.Rectangle.DIRECTION_LEFT\r\n\r\n let xDiff = fromPt.x - toPt.x\r\n let yDiff = fromPt.y - toPt.y\r\n let point\r\n let dir\r\n let pos\r\n\r\n if (((xDiff * xDiff) < (this.TOLxTOL)) && ((yDiff * yDiff) < (this.TOLxTOL))) {\r\n conn.addPoint(new draw2d.geo.Point(toPt.x, toPt.y))\r\n return\r\n }\r\n\r\n if (fromDir === LEFT) {\r\n if ((xDiff > 0) && ((yDiff * yDiff) < this.TOL) && (toDir === RIGHT)) {\r\n point = toPt\r\n dir = toDir\r\n }\r\n else {\r\n if (xDiff < 0) {\r\n point = new draw2d.geo.Point(fromPt.x - this.MINDIST, fromPt.y)\r\n }\r\n else if (((yDiff > 0) && (toDir === DOWN)) || ((yDiff < 0) && (toDir === UP))) {\r\n point = new draw2d.geo.Point(toPt.x, fromPt.y)\r\n }\r\n else if (fromDir === toDir) {\r\n pos = Math.min(fromPt.x, toPt.x) - this.MINDIST\r\n point = new draw2d.geo.Point(pos, fromPt.y)\r\n }\r\n else {\r\n point = new draw2d.geo.Point(fromPt.x - (xDiff / 2), fromPt.y)\r\n }\r\n\r\n if (yDiff > 0) {\r\n dir = UP\r\n }\r\n else {\r\n dir = DOWN\r\n }\r\n }\r\n }\r\n else if (fromDir === RIGHT) {\r\n if ((xDiff < 0) && ((yDiff * yDiff) < this.TOL) && (toDir === LEFT)) {\r\n point = toPt\r\n dir = toDir\r\n }\r\n else {\r\n if (xDiff > 0) {\r\n point = new draw2d.geo.Point(fromPt.x + this.MINDIST, fromPt.y)\r\n }\r\n else if (((yDiff > 0) && (toDir === DOWN)) || ((yDiff < 0) && (toDir === UP))) {\r\n point = new draw2d.geo.Point(toPt.x, fromPt.y)\r\n }\r\n else if (fromDir === toDir) {\r\n pos = Math.max(fromPt.x, toPt.x) + this.MINDIST\r\n point = new draw2d.geo.Point(pos, fromPt.y)\r\n }\r\n else {\r\n point = new draw2d.geo.Point(fromPt.x - (xDiff / 2), fromPt.y)\r\n }\r\n\r\n if (yDiff > 0) {\r\n dir = UP\r\n }\r\n else {\r\n dir = DOWN\r\n }\r\n }\r\n }\r\n else if (fromDir === DOWN) {\r\n if (((xDiff * xDiff) < this.TOL) && (yDiff < 0) && (toDir === UP)) {\r\n point = toPt\r\n dir = toDir\r\n }\r\n else {\r\n if (yDiff > 0) {\r\n point = new draw2d.geo.Point(fromPt.x, fromPt.y + this.MINDIST)\r\n }\r\n else if (((xDiff > 0) && (toDir === RIGHT)) || ((xDiff < 0) && (toDir === LEFT))) {\r\n point = new draw2d.geo.Point(fromPt.x, toPt.y)\r\n }\r\n else if (fromDir === toDir) {\r\n pos = Math.max(fromPt.y, toPt.y) + this.MINDIST\r\n point = new draw2d.geo.Point(fromPt.x, pos)\r\n }\r\n else {\r\n point = new draw2d.geo.Point(fromPt.x, fromPt.y - (yDiff / 2))\r\n }\r\n\r\n if (xDiff > 0) {\r\n dir = LEFT\r\n }\r\n else {\r\n dir = RIGHT\r\n }\r\n }\r\n }\r\n else if (fromDir === UP) {\r\n if (((xDiff * xDiff) < this.TOL) && (yDiff > 0) && (toDir === DOWN)) {\r\n point = toPt\r\n dir = toDir\r\n }\r\n else {\r\n if (yDiff < 0) {\r\n point = new draw2d.geo.Point(fromPt.x, fromPt.y - this.MINDIST)\r\n }\r\n else if (((xDiff > 0) && (toDir === RIGHT)) || ((xDiff < 0) && (toDir === LEFT))) {\r\n point = new draw2d.geo.Point(fromPt.x, toPt.y)\r\n }\r\n else if (fromDir === toDir) {\r\n pos = Math.min(fromPt.y, toPt.y) - this.MINDIST\r\n point = new draw2d.geo.Point(fromPt.x, pos)\r\n }\r\n else {\r\n point = new draw2d.geo.Point(fromPt.x, fromPt.y - (yDiff / 2))\r\n }\r\n\r\n if (xDiff > 0) {\r\n dir = LEFT\r\n }\r\n else {\r\n dir = RIGHT\r\n }\r\n }\r\n }\r\n this._route(conn, point, dir, toPt, toDir)\r\n conn.addPoint(fromPt)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * <b>BETA VERSION. Not for production!!!<br></b>\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ConnectionRouter\r\n */\r\n\r\nlet ROUTER_RECTS = null\r\n\r\ndraw2d.layout.connection.MazeConnectionRouter = draw2d.layout.connection.ConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.MazeConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.MazeConnectionRouter\",\r\n\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n this.useSpline = false\r\n this.useSimplify = true\r\n this.useSimplifyValue = 2\r\n this.useDebug = false\r\n this.useShift = 4\r\n this.portOutletOffset = 15\r\n\r\n\r\n// \tthis.finder = new PF.AStarFinder();\r\n// this.finder = new PF.AStarFinder({ allowDiagonal: true, dontCrossCorners: true});\r\n// this.finder = new PF.AStarFinder({ allowDiagonal: false});\r\n// this.finder = new PF.BiBreadthFirstFinder({ allowDiagonal: false});\r\n// this.finder = new PF.BreadthFirstFinder({ allowDiagonal: false});\r\n this.finder = new PF.JumpPointFinder({allowDiagonal: false, dontCrossCorners: true})\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n let fromPt = conn.getStartPoint()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPoint()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // calculate the lines between the two points.\r\n //\r\n this._route(conn, toPt, toDir, fromPt, fromDir)\r\n this._paint(conn)\r\n },\r\n\r\n /**\r\n * \r\n * Internal routing algorithm.\r\n * * <p>\r\n * Possible values:\r\n * <ul>\r\n * <li>up -> 0</li>\r\n * <li>right -> 1</li>\r\n * <li>down -> 2</li>\r\n * <li>left -> 3</li>\r\n * </ul>\r\n * <p>\r\n\r\n * @private\r\n * @param {draw2d.Connection} conn\r\n * @param {draw2d.geo.Point} fromPt\r\n * @param {Number} fromDir\r\n * @param {draw2d.geo.Point} toPt\r\n * @param {Number} toDir\r\n */\r\n _route: function (conn, fromPt, fromDir, toPt, toDir) {\r\n let shift = this.useShift\r\n\r\n let oldToPt = toPt\r\n let oldFromPt = fromPt\r\n\r\n // move the points with an offset in the prefered routing direction of the ports\r\n // to avoid that the routed connection is sticking on one side of the figure.\r\n //\r\n fromPt = this.getAdjustedPoint(fromPt, fromDir, this.portOutletOffset)\r\n toPt = this.getAdjustedPoint(toPt, toDir, this.portOutletOffset)\r\n\r\n let grid = this.generateNoGoGrid(conn, fromPt, fromDir, toPt, toDir)\r\n\r\n // 4. Calculate the shortest path from source to target based on the grid\r\n //\r\n let path = this.finder.findPath(\r\n Math.max(fromPt.x) >> shift, Math.max(fromPt.y) >> shift,\r\n Math.max(toPt.x )>> shift, Math.max(0,toPt.y) >> shift,\r\n grid)\r\n\r\n // transfer the path from the grid based coordinates back to the real coordinates\r\n //\r\n path.forEach(e => {\r\n e.x = e[0] = e[0] << shift\r\n e.y = e[1] = e[1] << shift\r\n })\r\n\r\n // 5. paint the \"no go\" area in read if we are in debug mode\r\n //\r\n if (this.useDebug) {\r\n if (ROUTER_RECTS !== null) {\r\n ROUTER_RECTS.remove()\r\n }\r\n ROUTER_RECTS = conn.canvas.paper.set()\r\n\r\n for (let i = 0; i < grid.width; i++) {\r\n for (let j = 0; j < grid.height; j++) {\r\n if (!grid.isWalkableAt(i, j))\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(i << shift, j << shift, 1 << shift, 1 << shift).attr({\r\n \"fill\": \"red\",\r\n \"opacity\": \"0.1\"\r\n }))\r\n }\r\n }\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(fromPt.x - 3, fromPt.y - 3, 6, 6).attr({\r\n \"fill\": \"#ff0000\",\r\n \"opacity\": \"0.8\"\r\n }))\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(toPt.x - 3, toPt.y - 3, 6, 6).attr({\r\n \"fill\": \"#ff0000\",\r\n \"opacity\": \"0.8\"\r\n }))\r\n\r\n // paint the original calculated path without any simplification in BLUE\r\n path.forEach(e => {\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(e.x - 3, e.y - 3, 6, 6).attr({\"fill\": \"#0000ff\", \"opacity\": \"0.8\"}))\r\n })\r\n if(path.length>0){\r\n let p = path[0]\r\n let svgPathBefore = [\"M\", p.x.toFixed(2), \" \", p.y.toFixed(2)]\r\n for (let i = 1; i < path.length; i++) {\r\n p = path[i]\r\n svgPathBefore.push(\"L\", p.x.toFixed(2), \" \", p.y.toFixed(2))\r\n }\r\n svgPathBefore = svgPathBefore.join(\"\")\r\n ROUTER_RECTS.push(conn.canvas.paper.path(svgPathBefore).attr({\"stroke\": \"#0000ff\"}))\r\n }\r\n }\r\n\r\n\r\n this.adjustPath(fromPt, path, fromDir)\r\n path.reverse()\r\n this.adjustPath(toPt, path, toDir)\r\n path.reverse()\r\n\r\n path.forEach(e => {\r\n e.x = e[0]\r\n e.y = e[1]\r\n })\r\n\r\n\r\n if (this.useSpline) {\r\n let p = new draw2d.util.ArrayList()\r\n p.add(oldFromPt)\r\n path.forEach(e => {\r\n p.add(new draw2d.geo.Point(e[0], e[1]))\r\n })\r\n p.add(oldToPt)\r\n\r\n if (this.useDebug) {\r\n path.forEach(e => {\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(e.x - 3, e.y - 3, 6, 6).attr({\"fill\": \"#00ff00\", \"opacity\": \"0.8\"}))\r\n })\r\n let pt = path[0]\r\n let svgPathBefore = [\"M\", pt.x.toFixed(2), \" \", pt.y.toFixed(2)]\r\n for (let i = 1; i < path.length; i++) {\r\n pt = path[i]\r\n svgPathBefore.push(\"L\", pt.x.toFixed(2), \" \", pt.y.toFixed(2))\r\n }\r\n svgPathBefore = svgPathBefore.join(\"\")\r\n ROUTER_RECTS.push(conn.canvas.paper.path(svgPathBefore).attr({\"stroke\": \"#00ff00\"}))\r\n }\r\n\r\n this.spline = new draw2d.util.spline.CubicSpline()\r\n let splinePoints = this.spline.generate(p, 8)\r\n\r\n if (this.useSimplify) {\r\n path = []\r\n splinePoints.each(function (i, e) {\r\n path.push({x: e.x, y: e.y})\r\n })\r\n path = this.simplify(path, this.useSimplifyValue, true)\r\n\r\n path.forEach(e => {\r\n conn.addPoint(e.x, e.y)\r\n })\r\n }\r\n else {\r\n splinePoints.each(function (i, e) {\r\n conn.addPoint(e)\r\n })\r\n }\r\n }\r\n else {\r\n if (this.useSimplify) {\r\n path = this.simplify(path, this.useSimplifyValue, true)\r\n }\r\n\r\n if (this.useDebug) {\r\n path.forEach(e => {\r\n ROUTER_RECTS.push(conn.canvas.paper.rect(e.x - 3, e.y - 3, 6, 6).attr({\"fill\": \"#00ff00\", \"opacity\": \"0.8\"}))\r\n })\r\n if(path.length>0){\r\n let p = path[0]\r\n let svgPathBefore = [\"M\", p.x.toFixed(2), \" \", p.y.toFixed(2)]\r\n for (let i = 1; i < path.length; i++) {\r\n p = path[i]\r\n svgPathBefore.push(\"L\", p.x.toFixed(2), \" \", p.y.toFixed(2))\r\n }\r\n svgPathBefore = svgPathBefore.join(\"\")\r\n ROUTER_RECTS.push(conn.canvas.paper.path(svgPathBefore).attr({\"stroke\": \"#00ff00\"}))\r\n }\r\n }\r\n\r\n conn.addPoint(oldFromPt)\r\n path.forEach(e => {\r\n conn.addPoint(e[0], e[1])\r\n })\r\n conn.addPoint(oldToPt)\r\n\r\n }\r\n\r\n },\r\n\r\n /**\r\n * \r\n * Generate a grid base no go map required for the path finding algorithm\r\n *\r\n * @param conn\r\n * @returns {PF.Grid}\r\n * @private\r\n */\r\n generateNoGoGrid: function (conn, fromPt, fromDir, toPt, toDir) {\r\n let shift = this.useShift\r\n let oneShift2 = (1 << shift) / 2\r\n\r\n // 1. generate a map with all \"no go\" areas. The bounding box of the shapes defines\r\n // the no go areas.\r\n //\r\n let canvasWidth = conn.getCanvas().paper.width >> shift\r\n let canvasHeight = conn.getCanvas().paper.height >> shift\r\n let grid = new PF.Grid(canvasWidth, canvasHeight)\r\n let figures = conn.getCanvas().getFigures()\r\n figures.each(function (i, e) {\r\n let box = e.getBoundingBox()\r\n // remove shapes which are hit by the input or output ports. It is not possible to route\r\n // out from a not walkable area\r\n if (box.hitTest(fromPt.x, fromPt.y) === true || box.hitTest(toPt.x, toPt.y)) {\r\n return\r\n }\r\n\r\n let x = box.x >> shift\r\n let y = box.y >> shift\r\n if (x < 1 || y < 1) {\r\n return\r\n }\r\n let r_orig = (box.x + box.w + oneShift2) >> shift\r\n let b_orig = (box.y + box.h + oneShift2) >> shift\r\n for (let i = x; i <= r_orig; i++) {\r\n for (let j = y; j <= b_orig; j++) {\r\n grid.setWalkableAt(i, j, false)\r\n }\r\n }\r\n })\r\n\r\n\r\n // 3. make the are walkable on the edge of the port side. Otherwise we a\r\n // an enclosed area around the port if we are very close to another shape\r\n //\r\n let box = conn.getSource().getParent().getBoundingBox()\r\n if (toDir === 1 || toDir === 3) {\r\n let y = box.y >> shift\r\n if (y > 0) {\r\n let b_orig = box.y + box.h\r\n let i = (toPt.x >> shift)\r\n\r\n for (let j = y - 1; j << shift <= b_orig; j++) {\r\n grid.setWalkableAt(i, j, true)\r\n }\r\n }\r\n }\r\n else {\r\n let x = box.x >> shift\r\n if (x > 0) {\r\n let r_orig = box.x + box.w\r\n let j = (toPt.x >> shift)\r\n for (let i = x - 1; i << shift <= r_orig; i++) {\r\n grid.setWalkableAt(i, j, true)\r\n }\r\n }\r\n }\r\n\r\n box = conn.getTarget().getParent().getBoundingBox()\r\n if (fromDir === 1 || fromDir === 3) {\r\n let y = box.y >> shift\r\n if (y > 0) {\r\n let b_orig = box.y + box.h\r\n let i = (fromPt.x >> shift)\r\n for (let j = y - 1; j << shift <= b_orig; j++) {\r\n grid.setWalkableAt(i, j, true)\r\n }\r\n }\r\n }\r\n else {\r\n let x = box.x >> shift\r\n if (x > 0) {\r\n let r_orig = box.x + box.w\r\n let j = (fromPt.x >> shift)\r\n for (let i = x - 1; i << shift <= r_orig; i++) {\r\n grid.setWalkableAt(i, j, true)\r\n }\r\n }\r\n }\r\n\r\n return grid\r\n },\r\n\r\n /**\r\n * \r\n * move the point in the given direction with the given offset\r\n *\r\n * @param {draw2d.geo.Point} pt\r\n * @param {Number} direction\r\n * @param {Number} adjustment\r\n *\r\n * @returns {draw2d.geo.Point}\r\n */\r\n getAdjustedPoint: function (pt, direction, adjustment) {\r\n\r\n switch (direction) {\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n return new draw2d.geo.Point(pt.x, pt.y - adjustment)\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n return new draw2d.geo.Point(pt.x + adjustment, pt.y)\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n return new draw2d.geo.Point(pt.x, pt.y + adjustment)\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n return new draw2d.geo.Point(pt.x - adjustment, pt.y)\r\n }\r\n },\r\n\r\n adjustPath: function (pt, path, direction) {\r\n let shift = this.useShift\r\n let x = pt.x >> shift\r\n let y = pt.y >> shift\r\n path.forEach(e => {\r\n if (y === (e[1] >> shift)) {\r\n e[1] = pt.y\r\n }\r\n else {\r\n return false\r\n }\r\n })\r\n path.forEach(e => {\r\n if (x === (e[0] >> shift)) {\r\n e[0] = pt.x\r\n }\r\n else {\r\n return false\r\n }\r\n })\r\n },\r\n\r\n\r\n getSquareDistance: function (p1, p2) { // square distance between 2 points\r\n\r\n let dx = p1.x - p2.x,\r\n dy = p1.y - p2.y\r\n\r\n return dx * dx +\r\n dy * dy\r\n },\r\n\r\n getSquareSegmentDistance: function (p, p1, p2) { // square distance from a point to a segment\r\n\r\n let x = p1.x,\r\n y = p1.y,\r\n\r\n dx = p2.x - x,\r\n dy = p2.y - y,\r\n\r\n t\r\n\r\n if (dx !== 0 || dy !== 0) {\r\n\r\n t = ((p.x - x) * dx +\r\n (p.y - y) * dy) /\r\n (dx * dx +\r\n dy * dy)\r\n\r\n if (t > 1) {\r\n x = p2.x\r\n y = p2.y\r\n\r\n } else if (t > 0) {\r\n x += dx * t\r\n y += dy * t\r\n }\r\n }\r\n\r\n dx = p.x - x\r\n dy = p.y - y\r\n\r\n return dx * dx +\r\n dy * dy\r\n },\r\n\r\n simplifyRadialDistance: function (points, sqTolerance) { // distance-based simplification\r\n\r\n let i,\r\n len = points.length,\r\n point = null,\r\n prevPoint = points[0],\r\n newPoints = [prevPoint]\r\n\r\n for (i = 1; i < len; i++) {\r\n point = points[i]\r\n\r\n if (this.getSquareDistance(point, prevPoint) > sqTolerance) {\r\n newPoints.push(point)\r\n prevPoint = point\r\n }\r\n }\r\n\r\n if (prevPoint !== point) {\r\n newPoints.push(point)\r\n }\r\n\r\n return newPoints\r\n },\r\n\r\n\r\n // simplification using optimized Douglas-Peucker algorithm with recursion elimination\r\n\r\n simplifyDouglasPeucker: function (points, sqTolerance) {\r\n\r\n let len = points.length,\r\n\r\n MarkerArray = (typeof Uint8Array !== undefined + '')\r\n ? Uint8Array\r\n : Array,\r\n\r\n markers = new MarkerArray(len),\r\n\r\n first = 0,\r\n last = len - 1,\r\n\r\n i,\r\n maxSqDist,\r\n sqDist,\r\n index,\r\n\r\n firstStack = [],\r\n lastStack = [],\r\n\r\n newPoints = []\r\n\r\n markers[first] = markers[last] = 1\r\n\r\n while (last) {\r\n\r\n maxSqDist = 0\r\n\r\n for (i = first + 1; i < last; i++) {\r\n sqDist = this.getSquareSegmentDistance(points[i], points[first], points[last])\r\n\r\n if (sqDist > maxSqDist) {\r\n index = i\r\n maxSqDist = sqDist\r\n }\r\n }\r\n\r\n if (maxSqDist > sqTolerance) {\r\n markers[index] = 1\r\n\r\n firstStack.push(first)\r\n lastStack.push(index)\r\n\r\n firstStack.push(index)\r\n lastStack.push(last)\r\n }\r\n\r\n first = firstStack.pop()\r\n last = lastStack.pop()\r\n }\r\n\r\n for (i = 0; i < len; i++) {\r\n if (markers[i]) {\r\n newPoints.push(points[i])\r\n }\r\n }\r\n\r\n return newPoints\r\n },\r\n\r\n\r\n simplify: function (points, tolerance, highestQuality) {\r\n\r\n let sqTolerance = (tolerance !== undefined)\r\n ? tolerance * tolerance\r\n : 1\r\n\r\n if (!highestQuality) {\r\n points = this.simplifyRadialDistance(points, sqTolerance)\r\n }\r\n points = this.simplifyDouglasPeucker(points, sqTolerance)\r\n\r\n return points\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * JUST FOR RESEARCH AT THE MOMENT!!!!!!\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ManhattanConnectionRouter\r\n */\r\n\r\ndraw2d.layout.connection.MuteableManhattanConnectionRouter = draw2d.layout.connection.ManhattanConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.MuteableManhattanConnectionRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.MuteableManhattanConnectionRouter\",\r\n\r\n UP: new draw2d.geo.Ray(0, -1),\r\n DOWN: new draw2d.geo.Ray(0, 1),\r\n LEFT: new draw2d.geo.Ray(-1, 0),\r\n RIGHT: new draw2d.geo.Ray(1, 0),\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n this.rowsUsed = {}//new HashMap<Integer, Integer>();\r\n this.colsUsed = {}//new HashMap<Integer, Integer>();\r\n this.constraints = {}//new HashMap<Connection, Object>();\r\n this.reservedInfo = {}//new HashMap<Connection, ReservedInfo>();\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n this.rowsUsed = {}//new HashMap<Integer, Integer>();\r\n this.colsUsed = {}//new HashMap<Integer, Integer>();\r\n this.constraints = {}//new HashMap<Connection, Object>();\r\n this.reservedInfo = {}//new HashMap<Connection, ReservedInfo>();\r\n\r\n let canvas = conn.getCanvas()\r\n let i\r\n\r\n let startPoint = conn.getStartPoint()\r\n let endPoint = conn.getEndPoint()\r\n\r\n let start = new draw2d.geo.Ray(startPoint)\r\n let end = new draw2d.geo.Ray(endPoint)\r\n let average = new draw2d.geo.Ray((start.x + end.x) / 2, (start.y + end.y) / 2)\r\n\r\n let direction = new draw2d.geo.Ray(end.x - start.x, end.y - start.y)\r\n let startNormal = this.getStartDirection(conn)\r\n let endNormal = this.getEndDirection(conn)\r\n\r\n let positions = new draw2d.util.ArrayList()\r\n let horizontal = startNormal.isHorizontal()\r\n\r\n if (horizontal) {\r\n positions.add(start.y)\r\n }\r\n else {\r\n positions.add(start.x)\r\n }\r\n\r\n horizontal = !horizontal\r\n\r\n // dot product is zero if the vector orthogonal (90°)\r\n if (startNormal.dot(endNormal) === 0) {\r\n if ((startNormal.dot(direction) >= 0) && (endNormal.dot(direction) <= 0)) {\r\n // 0\r\n } else {\r\n\r\n // 2\r\n if (startNormal.dot(direction) < 0)\r\n i = startNormal.similarity(start.translated(startNormal.scaled(10)))\r\n else {\r\n if (horizontal)\r\n i = average.y\r\n else\r\n i = average.x\r\n }\r\n\r\n positions.add(i)\r\n horizontal = !horizontal\r\n\r\n if (endNormal.dot(direction) > 0) {\r\n i = endNormal.similarity(end.translated(endNormal.scaled(10)))\r\n }\r\n else {\r\n if (horizontal) {\r\n i = average.y\r\n }\r\n else {\r\n i = average.x\r\n }\r\n }\r\n positions.add(i)\r\n horizontal = !horizontal\r\n }\r\n } else {\r\n if (startNormal.dot(endNormal) > 0) {\r\n //1\r\n if (startNormal.dot(direction) >= 0)\r\n i = startNormal.similarity(start.translated(startNormal.scaled(10)))\r\n else\r\n i = endNormal.similarity(end.translated(endNormal.scaled(10)))\r\n positions.add(i)\r\n horizontal = !horizontal\r\n } else {\r\n //3 or 1\r\n if (startNormal.dot(direction) < 0) {\r\n i = startNormal.similarity(start.translated(startNormal.scaled(10)))\r\n positions.add(i)\r\n horizontal = !horizontal\r\n }\r\n\r\n // my tweak to route SCA wires starts\r\n if (this.isCycle(conn)) {\r\n if (horizontal)\r\n i = conn.getSource().getParent().getBoundingBox().getTop() - 10// * index;\r\n else\r\n i = conn.getSource().getParent().getBoundingBox().getRight() + 10// * index;\r\n } else {\r\n if (horizontal) {\r\n let j = average.y\r\n\r\n let next = endNormal.similarity(end.translated(endNormal.scaled(10)))\r\n\r\n let trial = new draw2d.geo.Ray((positions.get(positions.getSize() - 1)), j)\r\n let figure = this.findFirstFigureAtStraightLine(canvas, trial, this.LEFT, draw2d.util.ArrayList.EMPTY_LIST)\r\n\r\n while (figure != null && figure.getBoundingBox().x + figure.getBoundingBox().width > next) {\r\n j = figure.getBoundingBox().y + figure.getBoundingBox().height + 5\r\n trial.y = j\r\n figure = this.findFirstFigureAtStraightLine(canvas, trial, this.LEFT, draw2d.util.ArrayList.EMPTY_LIST)\r\n }\r\n\r\n i = j\r\n\r\n } else {\r\n let figure = this.findFirstFigureAtStraightLine(canvas, start, this.RIGHT, this.getExcludingFigures(conn))\r\n if (figure == null)\r\n i = average.x\r\n else {\r\n i = Math.min(average.x, start.translated(new draw2d.geo.Ray(3 * (figure.getBoundingBox().x - start.x) / 4, 0)).x)\r\n i = Math.max(start.x, i)\r\n }\r\n i = this.adjust(conn, i)\r\n }\r\n }\r\n // my tweak to route SCA wires ends\r\n positions.add(i)\r\n horizontal = !horizontal\r\n }\r\n }\r\n if (horizontal)\r\n positions.add(end.y)\r\n else\r\n positions.add(end.x)\r\n\r\n this.processPositions(start, end, positions, startNormal.isHorizontal(), conn)\r\n\r\n\r\n this._paint(conn)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Connection} connection\r\n * @param {Number} r\r\n * @param {Number} n\r\n * @param {Number} x\r\n *\r\n * @private\r\n */\r\n getColumnNear: function (connection, r, n, x) {\r\n let min = Math.min(n, x)\r\n let max = Math.max(n, x)\r\n\r\n if (min > r) {\r\n max = min\r\n min = r - (min - r)\r\n }\r\n if (max < r) {\r\n min = max\r\n max = r + (r - max)\r\n }\r\n\r\n let proximity = 0\r\n let direction = -1\r\n if (r % 6 !== 0) {\r\n r = r - (r % 6)\r\n }\r\n\r\n let i\r\n while (proximity < r) {\r\n i = parseInt(r + proximity * direction)\r\n if (!(i in this.colsUsed)) {\r\n this.colsUsed[i] = i\r\n this.reserveColumn(connection, i)\r\n return i\r\n }\r\n\r\n if (i <= min) {\r\n return i + 6\r\n }\r\n\r\n if (i >= max) {\r\n return i - 6\r\n }\r\n\r\n if (direction === 1) {\r\n direction = -1\r\n }\r\n else {\r\n direction = 1\r\n proximity += 6\r\n }\r\n }\r\n return r\r\n },\r\n\r\n getRowNear: function (connection, r, n, x) {\r\n let min = Math.min(n, x)\r\n let max = Math.max(n, x)\r\n\r\n if (min > r) {\r\n max = min\r\n min = r - (min - r)\r\n }\r\n if (max < r) {\r\n min = max\r\n max = r + (r - max)\r\n }\r\n\r\n let proximity = 0\r\n let direction = -1\r\n if (r % 6 !== 0) {\r\n r = r - (r % 6)\r\n }\r\n\r\n let i\r\n while (proximity < r) {\r\n i = parseInt(r + proximity * direction)\r\n if (!(i in this.rowsUsed)) {\r\n this.rowsUsed[i] = i\r\n this.reserveRow(connection, i)\r\n return i\r\n }\r\n if (i <= min)\r\n return i + 6\r\n if (i >= max)\r\n return i - 6\r\n if (direction === 1)\r\n direction = -1\r\n else {\r\n direction = 1\r\n proximity += 6\r\n }\r\n }\r\n return r\r\n },\r\n\r\n /**\r\n * <li>up -> 0</li>\r\n * <li>right -> 1</li>\r\n * <li>down -> 2</li>\r\n * <li>left -> 3</li>\r\n **/\r\n getEndDirection: function (conn) {\r\n let p = conn.getEndPoint()\r\n let rect = conn.getTarget().getParent().getBoundingBox()\r\n return this.getDirection(rect, p)\r\n },\r\n\r\n\r\n /**\r\n * <li>up -> 0</li>\r\n * <li>right -> 1</li>\r\n * <li>down -> 2</li>\r\n * <li>left -> 3</li>\r\n **/\r\n getStartDirection: function (conn) {\r\n let p = conn.getStartPoint()\r\n let rect = conn.getSource().getParent().getBoundingBox()\r\n return this.getDirection(rect, p)\r\n },\r\n\r\n /**\r\n * Returns the direction the point <i>p</i> is in relation to the given rectangle.\r\n * Possible values are LEFT (-1,0), RIGHT (1,0), UP (0,-1) and DOWN (0,1).\r\n *\r\n * @param r the rectangle\r\n * @param p the point\r\n * @returns the direction from <i>r</i> to <i>p</i>\r\n */\r\n getDirection: function (r, p) {\r\n let i = Math.abs(r.y - p.y)\r\n let distance = Math.abs(r.x - p.x)\r\n let direction = this.LEFT\r\n\r\n if (i <= distance) {\r\n distance = i\r\n direction = this.UP\r\n }\r\n\r\n i = Math.abs(r.getBottom() - p.y)\r\n if (i <= distance) {\r\n distance = i\r\n direction = this.DOWN\r\n }\r\n\r\n i = Math.abs(r.getRight() - p.x)\r\n if (i < distance) {\r\n direction = this.RIGHT\r\n }\r\n\r\n return direction\r\n },\r\n\r\n processPositions: function (/*Ray*/ start, /*Ray*/ end, /*List*/ positions, /*boolean*/ horizontal, /*Connection*/ conn) {\r\n this.removeReservedLines(conn)\r\n\r\n let pos = []\r\n if (horizontal)\r\n pos.push(start.x)\r\n else\r\n pos.push(start.y)\r\n let i\r\n for (i = 0; i < positions.getSize(); i++) {\r\n pos.push(positions.get(i))\r\n }\r\n\r\n if (horizontal === (positions.getSize() % 2 === 1)) {\r\n pos.push(end.x)\r\n }\r\n else {\r\n pos.push(end.y)\r\n }\r\n\r\n conn.addPoint(new draw2d.geo.Point(start.x, start.y))\r\n let p\r\n let current, prev, min, max\r\n let adjust\r\n for (i = 2; i < pos.length - 1; i++) {\r\n horizontal = !horizontal\r\n prev = pos[i - 1]\r\n current = pos[i]\r\n\r\n adjust = (i !== pos.length - 2)\r\n if (horizontal) {\r\n if (adjust) {\r\n min = pos[i - 2]\r\n max = pos[i + 2]\r\n pos[i] = current = this.getRowNear(conn, current, min, max)\r\n }\r\n p = new draw2d.geo.Point(prev, current)\r\n } else {\r\n if (adjust) {\r\n min = pos[i - 2]\r\n max = pos[i + 2]\r\n pos[i] = current = this.getColumnNear(conn, current, min, max)\r\n }\r\n p = new draw2d.geo.Point(current, prev)\r\n }\r\n conn.addPoint(p)\r\n }\r\n conn.addPoint(new draw2d.geo.Point(end.x, end.y))\r\n },\r\n\r\n\r\n removeReservedLines: function (connection) {\r\n let rInfo = this.reservedInfo[connection]\r\n if (typeof rInfo === \"undefined\" || rInfo === null)\r\n return\r\n\r\n for (let i = 0; i < rInfo.reservedRows.getSize(); i++) {\r\n delete this.rowsUsed[rInfo.reservedRows.get(i)]\r\n }\r\n for (let i = 0; i < rInfo.reservedCols.getSize(); i++) {\r\n delete this.colsUsed[rInfo.reservedCols.get(i)]\r\n }\r\n delete this.reservedInfo[connection]\r\n },\r\n\r\n reserveColumn: function (connection, column) {\r\n let info = this.reservedInfo[connection]\r\n if (typeof info === \"undefined\" || info === null) {\r\n info = {reservedCols: new draw2d.util.ArrayList(), reservedRows: new draw2d.util.ArrayList()}\r\n this.reservedInfo[connection] = info\r\n }\r\n info.reservedCols.add(column)\r\n },\r\n\r\n reserveRow: function (connection, row) {\r\n let info = this.reservedInfo[connection]\r\n if (typeof info === \"undefined\" || info === null) {\r\n info = {reservedCols: new draw2d.util.ArrayList(), reservedRows: new draw2d.util.ArrayList()}\r\n this.reservedInfo[connection] = info\r\n }\r\n info.reservedRows.add(row)\r\n },\r\n\r\n getConstraint: function (connection) {\r\n return this.constraints[connection]\r\n },\r\n\r\n setConstraint: function (connection, constraint) {\r\n this.constraints[connection] = constraint\r\n },\r\n\r\n isCycle: function (conn) {\r\n let source = conn.getSource().getParent()\r\n let target = conn.getTarget().getParent()\r\n\r\n return source.id === target.id\r\n },\r\n\r\n getExcludingFigures: function (conn) {\r\n let excluding = new draw2d.util.ArrayList()\r\n\r\n excluding.add(conn.getSource().getParent())\r\n excluding.add(conn.getTarget().getParent())\r\n\r\n return excluding\r\n },\r\n\r\n findFirstFigureAtStraightLine: function (canvas, /*Ray*/ start, /*Ray*/ direction, /*List*/ excluding) {\r\n let figure = null\r\n\r\n let figures = canvas.getFigures()\r\n let _this = this\r\n figures.each(function (i, child) {\r\n try {\r\n if (!excluding.contains(child)) {\r\n let rect = child.getBoundingBox()\r\n if (_this.LEFT.equals(direction)) {\r\n if (start.x > rect.x && start.y >= rect.y && start.y <= rect.y + rect.h) {\r\n if (figure === null || rect.x > figure.getBoundingBox().x)\r\n figure = child\r\n }\r\n } else if (_this.RIGHT.equals(direction)) {\r\n if (start.x < rect.x + rect.w && start.y >= rect.y && start.y <= rect.y + rect.h) {\r\n if (figure == null || rect.x < figure.getBoundingBox().x)\r\n figure = child\r\n }\r\n } else if (_this.UP.equals(direction)) {\r\n if (start.y > rect.y && start.x >= rect.x && start.x <= rect.x + rect.w) {\r\n if (figure === null || rect.y > figure.getBoundingBox().y)\r\n figure = child\r\n }\r\n } else if (_this.DOWN.equals(direction)) {\r\n if (start.y < rect.y + rect.h && start.x >= rect.x && start.x <= rect.x + rect.w) {\r\n if (figure === null || rect.y < figure.getBoundingBox().y)\r\n figure = child\r\n }\r\n }\r\n }\r\n }\r\n catch (exc) {\r\n console.log(exc)\r\n debugger\r\n }\r\n })\r\n return figure\r\n },\r\n\r\n adjust: function (connection, col) {\r\n let column = col\r\n\r\n let start = connection.getSource().getPosition()\r\n\r\n let connections = connection.getCanvas().getLines()\r\n connections.each(function (i, conn) {\r\n try {\r\n if (conn === connection)\r\n return\r\n\r\n let end = conn.getTarget().getPosition()\r\n if (start.x < end.x && start.y === end.y) {\r\n if (conn.getVertices().getMidpoint().x <= col)\r\n column = conn.getVertices().getMidpoint().x - 5\r\n }\r\n }\r\n catch (exc) {\r\n console.log(exc)\r\n debugger\r\n }\r\n })\r\n return column\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Router for direct connections between two ports with a rubber band effect\r\n *\r\n *\r\n * @example\r\n *\r\n * let RubberConnection= draw2d.Connection.extend({\r\n * NAME: \"RubberConnection\",\r\n *\r\n * init:function(attr, setter, getter)\r\n * {\r\n * this._super(extend({\r\n * color: \"#33691e\",\r\n * stroke:1,\r\n * outlineStroke:0,\r\n * outlineColor:null\r\n * },attr),\r\n * setter,\r\n * getter);\r\n *\r\n *\r\n * this.setRouter(new draw2d.layout.connection.RubberbandRouter());\r\n * },\r\n *\r\n * repaint:function(attributes)\r\n * {\r\n * if (this.repaintBlocked===true || this.shape === null){\r\n * return;\r\n * }\r\n * attributes= attributes || {};\r\n * // enrich the rendering with a \"fill\" attribute\r\n * if(typeof attributes.fill === \"undefined\"){\r\n * \t attributes.fill = \"#aed581\";\r\n * }\r\n * this._super(attributes);\r\n * }\r\n * });\r\n *\r\n * let createConnection=function(){\r\n * let con = new RubberConnection();\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ConnectionRouter\r\n */\r\ndraw2d.layout.connection.RubberbandRouter = draw2d.layout.connection.ConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.RubberbandRouter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.connection.RubberbandRouter\",\r\n\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n\r\n },\r\n\r\n /**\r\n * \r\n * Invalidates the given Connection\r\n */\r\n invalidate: function () {\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (connection, routingHints) {\r\n let thickness = 10\r\n\r\n let start = connection.getStartPoint()\r\n let end = connection.getEndPoint()\r\n\r\n // 1. Calculate the vector AB→ by subtracting the coordinates of A from the coordinates of B.\r\n // Let's say you get (u,v) as the vector components.\r\n //\r\n // 2. normalize the vector (u,v,) to a length of |1|\r\n //\r\n // 3. The vector (−v,u) is AB→ rotated by 90 degrees counterclockwise. (Why? Look up \"rotation matrix\").\r\n //\r\n // 4. Add (−v,u) to A to get C. Also add (−v,u) to B to get D.\r\n\r\n let uv = end.subtract(start)\r\n let uv2 = uv.clone()\r\n let length = uv.length()\r\n\r\n let strength = 1 - Math.min(0.75, (1 / 500 * length))\r\n let first = start.lerp(end, 0.25 * strength) // go closer to the start point if the strength grows\r\n let second = start.lerp(end, 0.5)\r\n let third = start.lerp(end, 1 - (0.25 * strength)) // go closer to the end point if the strengths grows\r\n\r\n thickness = Math.max(5, thickness * strength)\r\n\r\n uv.x = uv.x / length * thickness\r\n uv.y = uv.y / length * thickness\r\n\r\n uv2.x = uv2.x / length * (thickness * (strength))\r\n uv2.y = uv2.y / length * (thickness * (strength))\r\n\r\n // anchor points for the 180 arc at the start point of the connection\r\n //\r\n let start90 = new draw2d.geo.Point(-uv.y + start.x, uv.x + start.y)\r\n let start270 = new draw2d.geo.Point(uv.y + start.x, -uv.x + start.y)\r\n\r\n // anchor point in the first segment ( on the upside/downside) of the connection\r\n //\r\n let first90 = new draw2d.geo.Point(-uv2.y + first.x, uv2.x + first.y)\r\n let first270 = new draw2d.geo.Point(uv2.y + first.x, -uv2.x + first.y)\r\n\r\n // center upside/downside anchor point of the connection\r\n //\r\n let second90 = new draw2d.geo.Point(-uv2.y + second.x, uv2.x + second.y)\r\n let second270 = new draw2d.geo.Point(uv2.y + second.x, -uv2.x + second.y)\r\n\r\n // anchor point in the third segment of the connection\r\n //\r\n let third90 = new draw2d.geo.Point(-uv2.y + third.x, uv2.x + third.y)\r\n let third270 = new draw2d.geo.Point(uv2.y + third.x, -uv2.x + third.y)\r\n\r\n // anchor point for the 180 arc at the end\r\n //\r\n let end90 = new draw2d.geo.Point(-uv.y + end.x, uv.x + end.y)\r\n let end270 = new draw2d.geo.Point(uv.y + end.x, -uv.x + end.y)\r\n\r\n // required for hit tests\r\n //\r\n connection.addPoint(start)\r\n connection.addPoint(end)\r\n\r\n // calculate the path\r\n let path = [\"M\", start90.x, \",\", start90.y]\r\n path.push(\"A\", thickness, \",\", thickness, \"0 0 1 \", start270.x, \",\", start270.y)\r\n path.push(\"C\", start270.x, \",\", start270.y, first270.x, \",\", first270.y, second270.x, \",\", second270.y)\r\n path.push(\"C\", second270.x, \",\", second270.y, third270.x, \",\", third270.y, end270.x, \",\", end270.y)\r\n path.push(\"A\", thickness, \",\", thickness, \"0 0 1\", end90.x, \",\", end90.y)\r\n path.push(\"C\", end90.x, \",\", end90.y, third90.x, \",\", third90.y, second90.x, \",\", second90.y)\r\n path.push(\"C\", second90.x, \",\", second90.y, first90.x, \",\", first90.y, start90.x, \",\", start90.y)\r\n\r\n connection.svgPathString = path.join(\" \")\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Provide a router which routes the connection in a hand drawn manner.\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.SketchConnectionRouter());\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let f1 = new draw2d.shape.analog.OpAmp({x:10, y:10});\r\n * let f2 = new draw2d.shape.analog.ResistorVertical({angle:90, height:20, x:300, y:150});\r\n *\r\n * // ...add it to the canvas\r\n * //\r\n * canvas.add( f1);\r\n * canvas.add( f2);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(f1.getOutputPort(0));\r\n * c.setTarget(f2.getHybridPort(0));\r\n * canvas.add(c);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @since 2.7.2\r\n * @extends draw2d.layout.connection.MazeConnectionRouter\r\n */\r\ndraw2d.layout.connection.SketchConnectionRouter = draw2d.layout.connection.MazeConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.SketchConnectionRouter.prototype */\r\n {\r\n NAME: \"draw2d.layout.connection.SketchConnectionRouter\",\r\n\r\n /**\r\n * Creates a new Router object.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n this.useSpline = true\r\n this.useShift = 5\r\n this.useSimplifyValue = 0.2\r\n this.finder = new PF.JumpPointFinder({allowDiagonal: false, dontCrossCorners: true})\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A ManhattanConnectionRouter with an spline interpolation between the bend points.\r\n *\r\n * @example\r\n *\r\n * let createConnection=function(){\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.SplineConnectionRouter());\r\n * return con;\r\n * };\r\n *\r\n * // install a custom connection create policy\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let f1 = new draw2d.shape.analog.OpAmp({x:10, y:10});\r\n * let f2 = new draw2d.shape.analog.ResistorVertical({angle:90, height:20, x:300, y:150});\r\n *\r\n * // ...add it to the canvas\r\n * //\r\n * canvas.add( f1);\r\n * canvas.add( f2);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(f1.getOutputPort(0));\r\n * c.setTarget(f2.getHybridPort(0));\r\n * canvas.add(c);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.layout.connection.ManhattanConnectionRouter\r\n */\r\ndraw2d.layout.connection.SplineConnectionRouter = draw2d.layout.connection.ManhattanConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.SplineConnectionRouter.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.connection.SplineConnectionRouter\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n// this.spline = new draw2d.util.spline.CatmullRomSpline();\r\n this.spline = new draw2d.util.spline.CubicSpline()\r\n// this.spline = new draw2d.util.spline.BezierSpline();\r\n\r\n this.MINDIST = 50\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (conn, routingHints) {\r\n let i\r\n let fromPt = conn.getStartPoint()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPoint()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n // calculate the manhatten bend points between start/end.\r\n //\r\n this._route(conn, toPt, toDir, fromPt, fromDir)\r\n\r\n let ps = conn.getVertices()\r\n // if the start/end are too close, the router do not route anything at all - shortcut. But for the drawing routine\r\n // and the later processing, we need at least two points - \"start\" and \"end\". we fix this here\r\n if(ps.getSize()<2){\r\n conn.addPoint(fromPt)\r\n }\r\n\r\n conn.oldPoint = null\r\n conn.lineSegments = new draw2d.util.ArrayList()\r\n conn.vertices = new draw2d.util.ArrayList()\r\n\r\n let splinePoints = this.spline.generate(ps, 8)\r\n splinePoints.each( (i, e) => {\r\n conn.addPoint(e)\r\n })\r\n\r\n // calculate the path string for the SVG rendering\r\n //\r\n ps = conn.getVertices()\r\n let length = ps.getSize()\r\n let p = ps.get(0)\r\n let path = [\"M\", p.x.toFixed(2), \" \", p.y.toFixed(2)]\r\n for (i = 1; i < length; i++) {\r\n p = ps.get(i)\r\n path.push(\"L\", p.x.toFixed(2), \" \", p.y.toFixed(2))\r\n }\r\n conn.svgPathString = path.join(\"\")\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A Router with unlimited vertices.\r\n *\r\n *\r\n * @example\r\n *\r\n * // Override the default connection type. This is used during drag&drop operations of ports.\r\n * //\r\n * let createConnection=function(){\r\n * // return my special kind of connection\r\n * let con = new draw2d.Connection();\r\n * con.setRouter(new draw2d.layout.connection.VertexRouter());\r\n * return con;\r\n * };\r\n *\r\n * // Install a special policy into the canvas to use my own implementation of connection\r\n * // if we drag&drop a port\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy({\r\n * createConnection: createConnection\r\n * }));\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * let end = new draw2d.shape.node.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,80);\r\n *\r\n * // first Connection\r\n * //\r\n * let c = createConnection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.layout.connection.ConnectionRouter\r\n */\r\ndraw2d.layout.connection.VertexRouter = draw2d.layout.connection.ConnectionRouter.extend(\r\n /** @lends draw2d.layout.connection.VertexRouter.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.connection.VertexRouter\",\r\n\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback method if the router has been assigned to a connection.\r\n *\r\n * @param {draw2d.Connection} connection The assigned connection\r\n * @template\r\n * @since 2.7.2\r\n */\r\n onInstall: function (connection) {\r\n connection.installEditPolicy(new draw2d.policy.line.VertexSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n *\r\n * Invalidates the given Connection\r\n */\r\n invalidate: function () {\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n route: function (connection, routingHints) {\r\n // reuse all existing vertex points\r\n //\r\n let count = routingHints.oldVertices.getSize()\r\n for (let i = 0; i < count; i++) {\r\n connection.addPoint(routingHints.oldVertices.get(i))\r\n }\r\n\r\n let ps = connection.getVertices()\r\n\r\n // respect the calculated anchor position if the start/end port has set any Anchor impl.\r\n let startAnchor = connection.getStartPosition(ps.get(1))\r\n let endAnchor = connection.getEndPosition(ps.get(ps.getSize() - 2))\r\n ps.first().setPosition(startAnchor)\r\n ps.last().setPosition(endAnchor)\r\n\r\n this._paint(connection)\r\n },\r\n\r\n /**\r\n *\r\n * Callback method for the PolyLine or Connection to check if it possible to remove a vertex from\r\n * the list. The router can send an veto for this.\r\n * Per default it is not possible to remove any vertex from the PolyLine exceptional if any interactive\r\n * router is installed.\r\n *\r\n * @param {draw2d.Connection} conn\r\n * @param {Number} index\r\n *\r\n * @since 4.2.3\r\n */\r\n canRemoveVertexAt: function (conn, index) {\r\n return false\r\n },\r\n\r\n /**\r\n * Callback method for the PolyLine or Connection to verify that a segment is deletable.\r\n *\r\n * @param {draw2d.Connection} conn\r\n * @param {Number} index\r\n *\r\n * @returns {Boolean}\r\n * @since 4.2.3\r\n */\r\n canRemoveSegmentAt: function (conn, index) {\r\n\r\n let segmentCount = conn.getVertices().getSize() - 1 // segmentCount is one less than vertex count\r\n\r\n // The first and last segment isn't deletable\r\n //\r\n if ((index <= 0) || (index >= segmentCount)) {\r\n return false\r\n }\r\n\r\n // a connection need at least one strokes\r\n //\r\n return (segmentCount >= 2)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Tweak or enrich the polyline persistence data with routing information\r\n *\r\n * @since 2.10.0\r\n * @param {draw2d.shape.basic.PolyLine} line\r\n * @param {Object} memento The memento data of the polyline\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function (line, memento) {\r\n memento.vertex = []\r\n\r\n line.getVertices().each(function (i, e) {\r\n memento.vertex.push({x: e.x, y: e.y})\r\n })\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * set the attributes for the polyline with routing information\r\n *\r\n * @since 2.10.0\r\n * @param {Object} memento\r\n */\r\n setPersistentAttributes: function (line, memento) {\r\n // restore the points from the JSON data and add them to the polyline\r\n //\r\n if (Array.isArray(memento.vertex) && memento.vertex.length > 1) {\r\n\r\n line.oldPoint = null\r\n line.lineSegments = new draw2d.util.ArrayList()\r\n\r\n line.setVertices(memento.vertex)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * The draw2d.Connection delegates the drag operation to the router. The router can\r\n * handle the different constraints of the connection and just drag&drop a single segment\r\n * instead of the complete connection.\r\n *\r\n * @param {draw2d.shape.basic.Line} line the related line to handle\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n *\r\n * @since 6.1.0\r\n */\r\n onDrag: function (line, dx, dy, dx2, dy2) {\r\n let count = line.getVertices().getSize() - 1\r\n for (let i = 1; i < count; i++) {\r\n line.getVertex(i).translate(dx2, dy2)\r\n }\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A bottomLocator is used to place figures at the bottom of a parent shape.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // create a basic figure and add a Label/child via API call\r\n * //\r\n * let circle = new draw2d.shape.basic.Circle({\r\n * x:100,\r\n * y:50,\r\n * diameter:100,\r\n * stroke: 3,\r\n * color:\"#A63343\",\r\n * bgColor:\"#E65159\"\r\n * });\r\n *\r\n * circle.add(new draw2d.shape.basic.Label({text:\"Bottom Label\"}), new draw2d.layout.locator.BottomLocator());\r\n * canvas.add( circle);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.BottomLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.BottomLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.BottomLocator\",\r\n\r\n /**\r\n *\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let parent = target.getParent()\r\n let boundingBox = parent.getBoundingBox()\r\n // I made a wrong decision in the port handling: anchor point\r\n // is in the center and not topLeft. Now I must correct this flaw here, and there, and...\r\n // shit happens.\r\n let offset = (parent instanceof draw2d.Port) ? boundingBox.w / 2 : 0\r\n\r\n\r\n let targetBoundingBox = target.getBoundingBox()\r\n if (target instanceof draw2d.Port) {\r\n target.setPosition(boundingBox.w / 2 - offset, boundingBox.h)\r\n }\r\n else {\r\n target.setPosition(boundingBox.w / 2 - targetBoundingBox.w / 2 - offset, 2 + boundingBox.h)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A CenterLocator is used to place figures in the center of a parent shape.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n *\r\n * // create a basic figure and add a Label/child via API call\r\n * //\r\n * let circle = new draw2d.shape.basic.Circle({diameter:120});\r\n * circle.setStroke(3);\r\n * circle.setColor(\"#A63343\");\r\n * circle.setBackgroundColor(\"#E65159\");\r\n * circle.add(new draw2d.shape.basic.Label({text:\"Center Label\"}), new draw2d.layout.locator.CenterLocator());\r\n * canvas.add( circle, 100,50);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.CenterLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.CenterLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.CenterLocator\",\r\n\r\n /**\r\n * Constructs a locator with associated parent.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let parent = target.getParent()\r\n let boundingBox = parent.getBoundingBox()\r\n\r\n // TODO: instanceof is always a HACK. ugly. Redirect the call to the figure instead of \r\n // determine the position with a miracle.\r\n //\r\n if (target instanceof draw2d.Port) {\r\n target.setPosition(boundingBox.w / 2, boundingBox.h / 2)\r\n }\r\n else {\r\n let targetBoundingBox = target.getBoundingBox()\r\n target.setPosition(((boundingBox.w / 2 - targetBoundingBox.w / 2) | 0) + 0.5, ((boundingBox.h / 2 - (targetBoundingBox.h / 2)) | 0) + 0.5)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Repositions a Figure attached to a Connection when the\r\n * Connection is moved. Provides for alignment at the start\r\n * (source), middle, or end (target) of the Connection.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.ConnectionLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.ConnectionLocator.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.locator.ConnectionLocator\",\r\n\r\n /**\r\n * Default constructor for a Locator which can layout a figure in context of a\r\n * {@link draw2d.Connector}\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A DraggableLocator is used to place figures relative to the parent top left corner. It is\r\n * possible to move a child node via drag&drop.\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.DraggableLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.DraggableLocator.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.locator.DraggableLocator\",\r\n\r\n /**\r\n * Constructs a locator with associated parent.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n bind: function (parent, child) {\r\n // override the parent implementation to avoid\r\n // that the child is \"!selectable\" and \"!draggable\"\r\n\r\n // Don't redirect the selection handling to the parent\r\n // Using the DraggableLocator provides the ability to the children\r\n // that they are selectable and draggable. Remove the SelectionAdapter from the parent\r\n // assignment.\r\n child.setSelectionAdapter(() => child)\r\n },\r\n\r\n unbind: function (parent, child) {\r\n // use default\r\n child.setSelectionAdapter(null)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Repositions a Figure attached to a Connection when the\r\n * Connection is moved. Provides for alignment at the start\r\n * (source), middle, or end (target) of the Connection.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.PortLocator\r\n */\r\ndraw2d.layout.locator.InputPortLocator = draw2d.layout.locator.PortLocator.extend(\r\n /** @lends draw2d.layout.locator.InputPortLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.InputPortLocator\",\r\n\r\n /**\r\n * Default constructor for a Locator which can layout a port in context of a\r\n * {@link draw2d.shape.node.Node}\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Controls the location of an {@link draw2d.Figure}\r\n *\r\n * @param {Number} index port index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @template\r\n **/\r\n relocate: function (index, figure) {\r\n let node = figure.getParent()\r\n\r\n let dividerFactor = 1\r\n let thisNAME = this.NAME\r\n let portIndex = 1\r\n node.getPorts().each((i, p) => {\r\n portIndex = (p === figure) ? dividerFactor : portIndex\r\n dividerFactor += p.getLocator().NAME === thisNAME ? 1 : 0\r\n })\r\n this.applyConsiderRotation(figure, 0, (node.getHeight() / dividerFactor) * portIndex)\r\n }\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A LeftLocator is used to place figures to the left of a parent shape.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // create a basic figure and add a Label/child via API call\r\n * //\r\n * let start = new draw2d.shape.node.Start();\r\n * start.add(new draw2d.shape.basic.Label({text:\"Left Label\"}), new draw2d.layout.locator.LeftLocator({\r\n * margin:10 // distance to the parent shape\r\n * }));\r\n * canvas.add( start, 100,50);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.LeftLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.LeftLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.LeftLocator\",\r\n\r\n /**\r\n * Constructs a locator with associated parent.\r\n *\r\n * @param {Object} attr additional init attributes\r\n * @param {Object} setter key/value map of injected setter-methods\r\n * @param {Object} getter key/value map of injected getter-methods\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter,getter)\r\n\r\n this.margin = (attr && (\"margin\" in attr)) ? attr.margin : 5\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let parent = target.getParent()\r\n let boundingBox = parent.getBoundingBox()\r\n\r\n // I made a wrong decision in the port handling: anchor point\r\n // is in the center and not topLeft. Now I must correct this flaw here, and there, and...\r\n // shit happens.\r\n let offset = (parent instanceof draw2d.Port) ? boundingBox.h / 2 : 0\r\n\r\n\r\n if (target instanceof draw2d.Port) {\r\n target.setPosition(0, (boundingBox.h / 2) - offset)\r\n }\r\n else {\r\n let targetBoundingBox = target.getBoundingBox()\r\n target.setPosition(-targetBoundingBox.w - this.margin, (boundingBox.h / 2) - (targetBoundingBox.h / 2) - offset)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Controls the location of an IFigure.\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.layout.locator.Locator = Class.extend(\r\n /** @lends draw2d.layout.locator.Locator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.Locator\",\r\n\r\n /**\r\n * Initial Constructor\r\n *\r\n * @param {Object} attr additional init attributes\r\n * @param {Object} setter key/value map of injected setter-methods\r\n * @param {Object} getter key/value map of injected getter-methods\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.setterWhitelist = {...setter}\r\n this.getterWhitelist = {...getter}\r\n \r\n // propagate the attr to the new instance\r\n this.attr(attr)\r\n },\r\n\r\n /**\r\n *\r\n * Read or set locator attributes.<br>\r\n * When no value is given, reads specified attribute from the element.<br>\r\n * When value is given, sets the attribute to that value.\r\n * Multiple attributes can be set by passing an object with name-value pairs.\r\n *\r\n *\r\n * // multiple attributes:\r\n * locator.attr({\r\n * x: 30,\r\n * y: 40\r\n * });\r\n *\r\n * let data = locator.attr()\r\n *\r\n *\r\n * @param {String/Object} name\r\n * @param {Object} [value]\r\n * @since 5.0.1\r\n * @experimental\r\n * @returns {Object} either the requested attribute if this method used as getter or `this` if the method uses as setter\r\n **/\r\n attr: function (name, value) {\r\n let _this = this\r\n\r\n // call of attr as setter method with {name1:val1, name2:val2 } argument list\r\n //\r\n if ($.isPlainObject(name)) {\r\n for (let key in name) {\r\n let func = this.setterWhitelist[key]\r\n let param = name[key]\r\n if (func && param !== undefined) {\r\n func.call(this, param)\r\n }\r\n }\r\n } else if (typeof name === \"string\") {\r\n // call attr as getter\r\n //\r\n if (typeof value === \"undefined\") {\r\n let getter = this.getterWhitelist[name]\r\n if (typeof getter === \"function\") {\r\n return getter.call(this)\r\n }\r\n return // undefined\r\n }\r\n\r\n // the value can be a function. In this case we must call the value().\r\n if (typeof value === \"function\") {\r\n value = value()\r\n }\r\n let setter = this.setterWhitelist[name]\r\n if (setter) {\r\n setter.call(this, value)\r\n }\r\n }\r\n // may it is a array of attributes used for the getter\r\n //\r\n else if (Array.isArray(name)) {\r\n return Object.assign({}, ...Object.keys(name).map(k => ({[k]: _this.attr(k)})))\r\n }\r\n // generic getter of all registered attributes\r\n else if (typeof name === \"undefined\") {\r\n let result = {}\r\n for (let key in this.getterWhitelist) {\r\n result[key] = this.getterWhitelist[key].call(this)\r\n }\r\n return result\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if a child is bounded to a parent. This is\r\n * the perfect moment to prepare the child node with some basic\r\n * behaviour which are forced by the <code>Locator</code>\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {draw2d.Figure} child\r\n * @returns {this}\r\n */\r\n bind: function (figure, child) {\r\n // default behaviour of an Locator. The child isn't draggable and\r\n // the locator defines the position of the child.\r\n //\r\n child.setDraggable(false)\r\n child.setSelectable(false)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if a child is unbounded to the locator.\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {draw2d.Figure} child\r\n * @returns {this}\r\n */\r\n unbind: function (figure, child) {\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Controls the location of an I{@link draw2d.Figure}\r\n *\r\n * @param {Number} index child index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @private\r\n **/\r\n relocate: function (index, figure) {\r\n // just repaint the child to update the SVG related to the new location\r\n // of the parent.\r\n figure.repaint()\r\n },\r\n\r\n /**\r\n *\r\n * Return a clone of the locator object\r\n *\r\n * @returns {draw2d.layout.locator.Locator}\r\n */\r\n clone: function () {\r\n return Function(`return new ${this.NAME}()`)()\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A ManhattanMidpointLocator that is used to place figures at the midpoint of a Manhatten routed\r\n * connection. The midpoint is always in the center of an edge.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // create and add two Node which contains Ports (In and OUT)\r\n * let start = new draw2d.shape.node.Start({x:50,y:50});\r\n * let end = new draw2d.shape.node.End({x:230,y:100});\r\n *\r\n * canvas.add( start);\r\n * canvas.add( end);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * let c = new draw2d.Connection();\r\n * c.setSource(start.getOutputPort(0));\r\n * c.setTarget(end.getInputPort(0));\r\n * canvas.add(c);\r\n *\r\n * // create a label which should attach to the connection\r\n * //\r\n * let label = new draw2d.shape.basic.Label({text:\"I'm a Label\"});\r\n * label.setColor(\"#0d0d0d\");\r\n * label.setFontColor(\"#0d0d0d\");\r\n * label.setBackgroundColor(\"#f0f0f0\");\r\n *\r\n * // add the decoration to the connection with a ManhattanMidpointLocator.\r\n * //\r\n * c.add(label, new draw2d.layout.locator.ManhattanMidpointLocator());\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.layout.locator.ConnectionLocator\r\n */\r\ndraw2d.layout.locator.ManhattanMidpointLocator = draw2d.layout.locator.ConnectionLocator.extend(\r\n /** @lends draw2d.layout.locator.ManhattanMidpointLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.ManhattanMidpointLocator\",\r\n\r\n /**\r\n * Constructs a ManhattanMidpointLocator with associated Connection c.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Relocates the given Figure always in the center of an edge.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let conn = target.getParent()\r\n let points = conn.getVertices()\r\n\r\n let segmentIndex = Math.floor((points.getSize() - 2) / 2)\r\n if (points.getSize() <= segmentIndex + 1)\r\n return\r\n\r\n let p1 = points.get(segmentIndex)\r\n let p2 = points.get(segmentIndex + 1)\r\n\r\n target.setPosition(\r\n ((p2.x - p1.x) / 2 + p1.x - target.getWidth() / 2) | 0,\r\n ((p2.y - p1.y) / 2 + p1.y - target.getHeight() / 2) | 0)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Repositions a Figure attached to a Connection when the\r\n * Connection is moved. Provides for alignment at the start\r\n * (source), middle, or end (target) of the Connection.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.PortLocator\r\n */\r\ndraw2d.layout.locator.OutputPortLocator = draw2d.layout.locator.PortLocator.extend(\r\n /** @lends draw2d.layout.locator.OutputPortLocator.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.locator.OutputPortLocator\",\r\n\r\n /**\r\n * Default constructor for a Locator which can layout a port in context of a\r\n * {@link draw2d.shape.node.Node}\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Controls the location of an I{@link draw2d.Figure}\r\n *\r\n * @param {Number} index child index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @template\r\n **/\r\n relocate: function (index, figure) {\r\n let node = figure.getParent()\r\n let dividerFactor = 1\r\n let thisNAME = this.NAME\r\n let portIndex = 1\r\n node.getPorts().each((i, p) => {\r\n portIndex = (p === figure) ? dividerFactor : portIndex\r\n dividerFactor += p.getLocator().NAME === thisNAME ? 1 : 0\r\n })\r\n this.applyConsiderRotation(figure, node.getWidth(), (node.getHeight() / dividerFactor) * portIndex)\r\n }\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A ParallelMidpointLocator that is used to place label at the midpoint of a routed\r\n * connection. The midpoint is always in the center of an edge.\r\n * The label is aligned to the connection angle at the calculated conection segment.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.ConnectionLocator\r\n * @since 4.4.4\r\n */\r\ndraw2d.layout.locator.ParallelMidpointLocator = draw2d.layout.locator.ConnectionLocator.extend(\r\n /** @lends draw2d.layout.locator.ParallelMidpointLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.ParallelMidpointLocator\",\r\n\r\n /**\r\n * Constructs a ParallelMidpointLocator with optional padding to the connection.\r\n *\r\n * if the parameter <b>distance</b> is less than zero the label is\r\n * placed above of the connection. Else the label is below the connection.\r\n *\r\n * @param {Object} attr object with {distance: <NUMBER>>} distance of the label to the connection.\r\n */\r\n init: function (attr, setter, getter) {\r\n this.distance = 0\r\n\r\n this._super(\r\n {distance: -5, ...attr},\r\n {x: this.setDistance,...setter},\r\n {distance: this.getDistance,...getter}\r\n )\r\n },\r\n\r\n /**\r\n * Set the distance to the connection\r\n *\r\n * @param {Number} distance the distance to the connection\r\n * @returns {this}\r\n */\r\n setDistance: function (distance) {\r\n this.distance = distance\r\n return this\r\n },\r\n\r\n /**\r\n * Returns the distance to the connection\r\n *\r\n * @returns {Number}\r\n */\r\n getDistance: function () {\r\n return this.distance\r\n },\r\n\r\n /**\r\n *\r\n * Relocates the given Figure always in the center of an edge.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let conn = target.getParent()\r\n let points = conn.getVertices()\r\n\r\n let segmentIndex = Math.floor((points.getSize() - 2) / 2)\r\n if (points.getSize() <= segmentIndex + 1) {\r\n return\r\n }\r\n\r\n let p1 = points.get(segmentIndex)\r\n let p2 = points.get(segmentIndex + 1)\r\n\r\n // calculate the distance of the label (above or below the connection)\r\n let distance = this.distance <= 0 ? this.distance - target.getHeight() : this.distance\r\n\r\n // get the angle of the segment\r\n let nx = p1.x - p2.x\r\n let ny = p1.y - p2.y\r\n let length = Math.sqrt(nx * nx + ny * ny)\r\n let radian = -Math.asin(ny / length)\r\n let angle = (180 / Math.PI) * radian\r\n if (radian < 0) {\r\n if (p2.x < p1.x) {\r\n radian = Math.abs(radian) + Math.PI\r\n angle = 360 - angle\r\n distance = -distance - target.getHeight()\r\n } else {\r\n radian = Math.PI * 2 - Math.abs(radian)\r\n angle = 360 + angle\r\n }\r\n } else {\r\n if (p2.x < p1.x) {\r\n radian = Math.PI - radian\r\n angle = 360 - angle\r\n distance = -distance - target.getHeight()\r\n }\r\n }\r\n\r\n let rotAnchor = this.rotate(length / 2 - target.getWidth() / 2, distance, 0, 0, radian)\r\n\r\n // rotate the x/y coordinate with the calculated angle around \"p1\"\r\n //\r\n let rotCenterOfLabel = this.rotate(0, 0, target.getWidth() / 2, target.getHeight() / 2, radian)\r\n\r\n target.setRotationAngle(angle)\r\n target.setPosition(rotAnchor.x - rotCenterOfLabel.x + p1.x, rotAnchor.y - rotCenterOfLabel.y + p1.y)\r\n },\r\n\r\n rotate: function (x, y, xm, ym, radian) {\r\n let cos = Math.cos,\r\n sin = Math.sin\r\n\r\n // Subtract midpoints, so that midpoint is translated to origin\r\n // and add it in the end again\r\n return {\r\n x: (x - xm) * cos(radian) - (y - ym) * sin(radian) + xm,\r\n y: (x - xm) * sin(radian) + (y - ym) * cos(radian) + ym\r\n }\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A PolylineMidpointLocator is used to place figures at the midpoint of a routed\r\n * connection. <br>\r\n * If the connection did have an odd count of points the figure is located in the center vertex of the polyline.<br>\r\n * On an even count of junction point, the figure will be center on the middle segment of the ploy line.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.ManhattanMidpointLocator\r\n */\r\ndraw2d.layout.locator.PolylineMidpointLocator = draw2d.layout.locator.ManhattanMidpointLocator.extend(\r\n /** @lends draw2d.layout.locator.PolylineMidpointLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.PolylineMidpointLocator\",\r\n\r\n /**\r\n * Constructs a ManhattanMidpointLocator with associated Connection c.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n var conn = target.getParent()\r\n var points = conn.getVertices()\r\n\r\n // it has an event count of points -> use the manhattan algorithm...this is working\r\n // well in this case\r\n if (points.getSize() % 2 === 0) {\r\n this._super(index, target)\r\n }\r\n // odd count of points. take the center point as fulcrum\r\n else {\r\n var index = Math.floor(points.getSize() / 2)\r\n var p1 = points.get(index)\r\n target.setPosition(p1.x - (target.getWidth() / 2), p1.y - (target.getHeight() / 2))\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The port locator calculates the position of an port. All ports MUST have a locator\r\n * if you add them as child to a node.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.PortLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.PortLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.PortLocator\",\r\n\r\n /**\r\n * Default constructor for a Locator which can layout a port in context of a\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n applyConsiderRotation: function (port, x, y) {\r\n let parent = port.getParent()\r\n\r\n // determine the width/height before manipulate the \r\n // matrix of the shape\r\n let halfW = parent.getWidth() / 2\r\n let halfH = parent.getHeight() / 2\r\n\r\n let rotAngle = parent.getRotationAngle()\r\n let m = Raphael.matrix()\r\n m.rotate(rotAngle, halfW, halfH)\r\n if (rotAngle === 90 || rotAngle === 270) {\r\n let ratio = parent.getHeight() / parent.getWidth()\r\n m.scale(ratio, 1 / ratio, halfW, halfH)\r\n }\r\n\r\n port.setPosition(m.x(x, y), m.y(x, y))\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A RightLocator is used to place figures to the right of a parent shape.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n *\r\n * // create a basic figure and add a Label/child via API call\r\n * //\r\n * var end = new draw2d.shape.node.End();\r\n * end.add(new draw2d.shape.basic.Label({text:\"Right Label\"}), new draw2d.layout.locator.RightLocator({\r\n * margin: 10 // distance to the parent shape\r\n * }));\r\n * canvas.add( end, 50,50);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.RightLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.RightLocator.prototype */\r\n {\r\n \r\n NAME: \"draw2d.layout.locator.RightLocator\",\r\n\r\n /**\r\n * Constructs a locator with associated parent.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.margin = (attr && (\"margin\" in attr)) ? attr.margin : 5\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n var parent = target.getParent()\r\n var boundingBox = parent.getBoundingBox()\r\n\r\n // I made a wrong decision in the port handling: anchor point\r\n // is in the center and not topLeft. Now I must correct this flaw here, and there, and...\r\n // shit happens.\r\n var offset = (parent instanceof draw2d.Port) ? boundingBox.h / 2 : 0\r\n\r\n if (target instanceof draw2d.Port) {\r\n target.setPosition(boundingBox.w, (boundingBox.h / 2) - offset)\r\n }\r\n else {\r\n var targetBoundingBox = target.getBoundingBox()\r\n target.setPosition(boundingBox.w + this.margin, (boundingBox.h / 2) - (targetBoundingBox.h / 2) - offset)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A DraggableLocator is used to place figures relative to the parent nearest corner. It is\r\n * possible to move a child node via drag&drop.\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.SmartDraggableLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.SmartDraggableLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.SmartDraggableLocator\",\r\n\r\n /**\r\n * Constructs a locator with associated parent.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n // description see \"bind\" method\r\n this.boundedCorners = {\r\n init: false,\r\n parent: 0,\r\n child: 0,\r\n dist: Number.MAX_SAFE_INTEGER,\r\n xOffset: 0,\r\n yOffset: 0\r\n }\r\n\r\n },\r\n\r\n bind: function (parent, child) {\r\n let _this = this\r\n // determine the best corner of the parent/child node and stick to the calculated corner\r\n // In the example below it is R1.2 in combination with R2.0\r\n //\r\n // 0 1\r\n // +-----------+\r\n // | |\r\n // | R1 |\r\n // +-----------+\r\n // 3 2\r\n //\r\n // 0 1\r\n // +-----------+\r\n // | |\r\n // | R2 |\r\n // +-----------+\r\n // 3 2\r\n //\r\n let calcBoundingCorner = function () {\r\n _this.boundedCorners = {\r\n init: false,\r\n parent: 0,\r\n child: 0,\r\n dist: Number.MAX_SAFE_INTEGER,\r\n xOffset: 0,\r\n yOffset: 0\r\n }\r\n let parentVertices = child.getParent().getBoundingBox().getVertices()\r\n let childVertices = child.getBoundingBox().getVertices()\r\n let i_parent, i_child\r\n let p1, p2, distance\r\n for (i_parent = 0; i_parent < parentVertices.getSize(); i_parent++) {\r\n for (i_child = 0; i_child < childVertices.getSize(); i_child++) {\r\n p1 = parentVertices.get(i_parent)\r\n p2 = childVertices.get(i_child)\r\n distance = Math.abs(p1.distance(p2))\r\n if (distance < _this.boundedCorners.dist) {\r\n _this.boundedCorners = {\r\n parent: i_parent,\r\n child: i_child,\r\n dist: distance,\r\n xOffset: p1.x - p2.x,\r\n yOffset: p1.y - p2.y\r\n }\r\n }\r\n }\r\n }\r\n _this.boundedCorners.init = true\r\n }\r\n\r\n // override the parent implementation to avoid\r\n // that the child is \"!selectable\" and \"!draggable\"\r\n\r\n // Don't redirect the selection handling to the parent\r\n // Using the DraggableLocator provides the ability to the children\r\n // that they are selectable and draggable. Remove the SelectionAdapter from the parent\r\n // assignment.\r\n child.setSelectionAdapter( () => child)\r\n\r\n child.getParent().on(\"added\", calcBoundingCorner)\r\n child.on(\"dragend\", calcBoundingCorner)\r\n },\r\n\r\n unbind: function (parent, child) {\r\n // use default\r\n child.setSelectionAdapter(null)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Controls the location of an I{@link draw2d.Figure}\r\n *\r\n * @param {Number} index child index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @template\r\n **/\r\n relocate: function (index, figure) {\r\n this._super(index, figure)\r\n if (this.boundedCorners.init === true) {\r\n let parentVertices = figure.getParent().getBoundingBox().getVertices()\r\n let childVertices = figure.getBoundingBox().getVertices()\r\n let p1 = parentVertices.get(this.boundedCorners.parent)\r\n let p2 = childVertices.get(this.boundedCorners.child)\r\n\r\n let xOffset = p1.x - p2.x\r\n let yOffset = p1.y - p2.y\r\n // restore the initial distance from the corner by adding the new offset\r\n // to the position of the child\r\n figure.translate(xOffset - this.boundedCorners.xOffset, yOffset - this.boundedCorners.yOffset)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A TopLocator is used to place figures at the top/center of a parent shape.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // create a basic figure and add a Label/child via API call\r\n * //\r\n * let circle = new draw2d.shape.basic.Circle({\r\n * x:100,\r\n * y:70,\r\n * diameter:80,\r\n * stroke: 3,\r\n * color:\"#A63343\",\r\n * bgColor:\"#E65159\"\r\n * });\r\n *\r\n * circle.add(new draw2d.shape.basic.Label({text:\"Top Label\"}), new draw2d.layout.locator.TopLocator());\r\n * canvas.add( circle);\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.Locator\r\n */\r\ndraw2d.layout.locator.TopLocator = draw2d.layout.locator.Locator.extend(\r\n /** @lends draw2d.layout.locator.TopLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.TopLocator\",\r\n\r\n /**\r\n * Constructs a ManhattanMidpointLocator with associated Connection c.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Relocates the given Figure.\r\n *\r\n * @param {Number} index child index of the target\r\n * @param {draw2d.Figure} target The figure to relocate\r\n **/\r\n relocate: function (index, target) {\r\n let parent = target.getParent()\r\n let boundingBox = parent.getBoundingBox()\r\n\r\n // I made a wrong decision in the port handling: anchor point\r\n // is in the center and not topLeft. Now I must correct this flaw here, and there, and...\r\n // shit happens.\r\n let offset = (parent instanceof draw2d.Port) ? boundingBox.w / 2 : 0\r\n\r\n\r\n let targetBoundingBox = target.getBoundingBox()\r\n if (target instanceof draw2d.Port) {\r\n target.setPosition(boundingBox.w / 2 - offset, 0)\r\n }\r\n else {\r\n target.setPosition(boundingBox.w / 2 - (targetBoundingBox.w / 2) - offset, -(targetBoundingBox.h + 2))\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Create a locator for fixed x/y coordinate position. The port in the example below is\r\n * always 20px below of the top border.\r\n *\r\n *\r\n * @example\r\n *\r\n * var figure = new draw2d.shape.basic.Rectangle({x:130,y:30,width:100,height:60});\r\n * figure.createPort(\"input\", new draw2d.layout.locator.XYAbsPortLocator(0,20));\r\n *\r\n * canvas.add(figure);\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.PortLocator\r\n * @since 4.0.0\r\n */\r\ndraw2d.layout.locator.XYAbsPortLocator = draw2d.layout.locator.PortLocator.extend(\r\n /** @lends draw2d.layout.locator.XYAbsPortLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.XYAbsPortLocator\",\r\n\r\n /**\r\n *\r\n * {@link draw2d.shape.node.Node}\r\n *\r\n * @param {Number} x the x coordinate of the port relative to the left of the parent\r\n * @param {Number} y the y coordinate of the port relative to the top of the parent\r\n */\r\n init: function (attr, setter, getter) {\r\n this.x = 0\r\n this.y = 0\r\n\r\n this._super(attr,\r\n {\r\n x: this.setX,\r\n y: this.setY,\r\n ...setter},\r\n {\r\n x: this.getX,\r\n y: this.getY,\r\n ...getter})\r\n },\r\n\r\n /**\r\n * Set the X Offset for the Locator\r\n * @param {Number} x\r\n */\r\n setX: function (x) {\r\n this.x = x\r\n },\r\n\r\n /**\r\n * Set the y-offset of the locator\r\n *\r\n * @param {Number} y\r\n */\r\n setY: function (y) {\r\n this.y = y\r\n },\r\n\r\n /**\r\n * Get the X-Offset of the Locator\r\n *\r\n * @returns {Number}\r\n */\r\n getX: function(){\r\n return this.x\r\n },\r\n\r\n /**\r\n * Returns the Y-Offset of the Locator\r\n *\r\n * @returns {Number}\r\n */\r\n getY: function(){\r\n return this.y\r\n },\r\n\r\n /**\r\n *\r\n * Controls the location of an {@link draw2d.Figure}\r\n *\r\n * @param {Number} index child index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @template\r\n **/\r\n relocate: function (index, figure) {\r\n this.applyConsiderRotation(figure, this.x, this.y)\r\n }\r\n\r\n })\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Create a locator for a relative x/y coordinate position. The coordinates are named in percentage [0..100%]\r\n * relative to the top/left corner of the parent node.<br>\r\n * <br>\r\n * <br>\r\n * Resize the shape in the example to see what happens. The port top position is always 20% of the shape height.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.basic.Rectangle({x:130,y:30,width:100,height:60});\r\n * figure.createPort(\"input\", new draw2d.layout.locator.XYRelPortLocator(0,20));\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.locator.PortLocator\r\n * @since 4.0.0\r\n */\r\ndraw2d.layout.locator.XYRelPortLocator = draw2d.layout.locator.PortLocator.extend(\r\n /** @lends draw2d.layout.locator.XYRelPortLocator.prototype */\r\n {\r\n\r\n NAME: \"draw2d.layout.locator.XYRelPortLocator\",\r\n\r\n /**\r\n *\r\n *\r\n * @param {Number} xPercentage the x coordinate in percent of the port relative to the left of the parent\r\n * @param {Number} yPercentage the y coordinate in percent of the port relative to the top of the parent\r\n */\r\n init: function (attr, setter, getter) {\r\n // legacy code handling for calls like this:\r\n // new draw2d.layout.locator.XYRelPortLocator(10,30)\r\n if(typeof attr ===\"number\" && typeof setter === \"number\"){\r\n this.x = attr\r\n this.y = setter\r\n this._super()\r\n }\r\n // new constructor\r\n // new draw2d.layout.locator.XYRelPortLocator({x:10, y:30}})\r\n else {\r\n this.x = 0\r\n this.y = 0\r\n this._super(attr,\r\n {\r\n x: this.setX,\r\n y: this.setY,\r\n ...setter},\r\n {\r\n x: this.getX,\r\n y: this.getY,\r\n ...getter})\r\n }\r\n },\r\n\r\n\r\n /**\r\n * Set the X Offset for the Locator\r\n * @param {Number} x\r\n */\r\n setX: function (x) {\r\n this.x = x\r\n },\r\n\r\n /**\r\n * Set the y-offset of the locator\r\n *\r\n * @param {Number} y\r\n */\r\n setY: function (y) {\r\n this.y = y\r\n },\r\n\r\n /**\r\n * Get the X-Offset of the Locator\r\n *\r\n * @returns {Number}\r\n */\r\n getX: function () {\r\n return this.x\r\n },\r\n\r\n /**\r\n * Returns the Y-Offset of the Locator\r\n *\r\n * @returns {Number}\r\n */\r\n getY: function () {\r\n return this.y\r\n },\r\n\r\n /**\r\n *\r\n * Controls the location of an I{@link draw2d.Figure}\r\n *\r\n * @param {Number} index child index of the figure\r\n * @param {draw2d.Figure} figure the figure to control\r\n *\r\n * @template\r\n **/\r\n relocate: function (index, figure) {\r\n let parent = figure.getParent()\r\n\r\n this.applyConsiderRotation(\r\n figure,\r\n parent.getWidth() / 100 * this.x,\r\n parent.getHeight() / 100 * this.y\r\n )\r\n }\r\n\r\n })\r\n\r\n\r\n\r\n","\r\n/**\r\n * @class\r\n * Routes a {@link draw2d.Connection}, possibly using a constraint.\r\n *\r\n * @author Andreas Herz\r\n * @extend draw2d.layout.mesh.MeshLayouter\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.layout.mesh.ExplodeLayouter = draw2d.layout.mesh.MeshLayouter.extend(\r\n /** @lends draw2d.layout.mesh.ExplodeLayouter.prototype */\r\n {\r\n\r\n\tMIN_MARGIN : 40,\r\n\t\r\n\t/**\r\n\t * Creates a new layouter object.\r\n\t */\r\n init: function()\r\n\t{\r\n },\r\n \r\n /**\r\n *\r\n * Return a changes list for an existing mesh/canvas to ensure that the element to insert \r\n * did have enough space.\r\n * \r\n * @param {draw2d.Canvas} canvas the canvas to use for the analytic\r\n * @param {draw2d.Figure} figure The figure to add to the exising canvas\r\n * @param {Number} x requested x-position for the figure\r\n * @param {Number} y requested y-position for the figure\r\n * \r\n * \r\n * @returns {draw2d.util.ArrayList} a list of changes to apply if the user want to insert he figure.\r\n */\r\n add: function( canvas, figureToAdd)\r\n {\r\n \t// changes for the different octant areas\r\n \tvar changes = [];\r\n \tchanges[0]= {x:0, y:0};\r\n \tchanges[1]= {x:0, y:0};\r\n \tchanges[2]= {x:0, y:0};\r\n \tchanges[3]= {x:0, y:0};\r\n \tchanges[4]= {x:0, y:0};\r\n \tchanges[5]= {x:0, y:0};\r\n \tchanges[6]= {x:0, y:0};\r\n \tchanges[7]= {x:0, y:0};\r\n \tchanges[8]= {x:0, y:0};\r\n\r\n \tvar boundingBox = figureToAdd.getBoundingBox();\r\n\r\n \tvar figures = canvas.getFigures();\r\n \tvar figure = null;\r\n \t\r\n \tvar dis=0;\r\n \tvar oct =0;\r\n \tvar currentOctChanges =null;\r\n \tvar i=0;\r\n \tfor( i=0; i< figures.getSize();i++){\r\n \t\t\r\n \t\tfigure = figures.get(i);\r\n \t\t\r\n \t\t// calculate the distance of all corners in relation to the requested x/y coordinate\r\n \t\t//\r\n \t\tif(figure !== figureToAdd ){\r\n \t\t\tdis = figure.getBoundingBox().getDistance(boundingBox);\r\n \t\t\t// other figure is to close\r\n \t\t\t//\r\n \t\t\tif(dis<this.MIN_MARGIN){\r\n \t\t\t\t// determine the octant of the figure\r\n \t\t\t\toct = this.determineOctant(boundingBox, figure.getBoundingBox());\r\n \t\t\t\r\n \t\t\t\t// all other relevant segments must be arranged too!!\r\n \t\t\t\t//\r\n \t\t\tswitch(oct){\r\n \t\t\tcase 2:\r\n \t\t\t\tchanges[2].x = Math.max(changes[2].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[3].x = Math.max(changes[3].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[4].x = Math.max(changes[4].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tbreak;\r\n \t\t\tcase 3:\r\n \t\t\t\tchanges[2].x = Math.max(changes[2].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[3].x = Math.max(changes[3].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[4].x = Math.max(changes[4].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tbreak;\r\n \t\t\tcase 4:\r\n \t\t\t\tchanges[2].x = Math.max(changes[2].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[3].x = Math.max(changes[3].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[4].x = Math.max(changes[4].x,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[4].y = Math.max(changes[4].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[5].y = Math.max(changes[5].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[6].y = Math.max(changes[6].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tbreak;\r\n \t\t\tcase 5:\r\n \t\t\t\tchanges[4].y = Math.max(changes[4].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[5].y = Math.max(changes[5].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[6].y = Math.max(changes[6].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tbreak;\r\n \t\t\tcase 6:\r\n \t\t\t\tchanges[4].y = Math.max(changes[4].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[5].y = Math.max(changes[5].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tchanges[6].y = Math.max(changes[6].y,this.MIN_MARGIN-dis);\r\n \t\t\t\tbreak;\r\n \t\t\tcase 8:\r\n \t\t\t\t// overlapping\r\n \t\t\t\t// we must determine the new distance with the border of the figures\r\n \t\t\t\tdis = (boundingBox.getBottomRight().getDistance(figure.getBoundingBox().getTopLeft()))|0;\r\n \t\t\t\t\r\n \t\t\t\tchanges[2].x = Math.max(changes[2].x,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[3].x = Math.max(changes[3].x,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[4].x = Math.max(changes[4].x,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[4].y = Math.max(changes[4].y,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[5].y = Math.max(changes[5].y,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[6].y = Math.max(changes[6].y,this.MIN_MARGIN+dis);\r\n \t\t\t\tchanges[8].x = Math.max(changes[8].x,this.MIN_MARGIN+dis);\r\n// \t\t\t\tchanges[8].y = Math.max(changes[8].y,this.MIN_MARGIN+dis);\r\n \t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t// Falls die minimale Distance zu den Objecten kleiner 80 ist, muss ein layout erfolgen\r\n \t}\r\n\r\n \t// calculate the adjustment for each figure\r\n \t//\r\n \tvar result = new draw2d.util.ArrayList();\r\n \tfor( i=0; i< figures.getSize();i++){\r\n \t\tfigure = figures.get(i);\r\n \t\tif(figure !== figureToAdd ){\r\n\t\t\t\toct = this.determineOctant(boundingBox, figure.getBoundingBox());\r\n\t\t\t\tcurrentOctChanges = changes[oct];\r\n\t\t\t\tif(currentOctChanges.x!==0 || currentOctChanges.y!==0){\r\n\t\t\t\t\tresult.add(new draw2d.layout.mesh.ProposedMeshChange(figure, currentOctChanges.x,currentOctChanges.y));\r\n\t\t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \treturn result;\r\n },\r\n \r\n \r\n /**\r\n *\r\n * Determin Octant\r\n\t *\r\n\t * 0 | 1 | 2\r\n\t * __|___|__\r\n\t * 7 | 8 | 3\r\n * __|___|__\r\n\t * 6 | 5 | 4\r\n *\r\n\t * @returns {Number}\r\n */\r\n determineOctant: function(r1, r2){\r\n\t\tvar ox = r1.x;\r\n\t\tvar oy = r1.y;\r\n\t\tvar ow = r1.w;\r\n\t\tvar oh = r1.h;\r\n\t\t\r\n\t\tvar cx = r2.x;\r\n\t\tvar cy = r2.y;\r\n\t\tvar cw = r2.w;\r\n\t\tvar ch = r2.h;\r\n\t\tvar oct =0;\r\n\r\n\t\tif(cx + cw <= ox){\r\n\t\t\tif((cy + ch) <= oy){\r\n\t\t\t\toct = 0;\r\n\t\t\t}\r\n\t\t\telse if(cy >= (oy + oh)){\r\n\t\t\t\toct = 6;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\toct = 7;\r\n\t\t\t}\r\n\t }\r\n\t\telse if(cx >= ox + ow){\r\n\t\t\tif(cy + ch <= oy){\r\n\t\t\t\toct = 2;\r\n\t\t\t}\r\n\t\t\telse if(cy >= oy + oh){\r\n\t\t\t\toct = 4;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\toct = 3;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(cy + ch <= oy){\r\n\t\t\toct = 1;\r\n\t\t}\r\n\t\telse if(cy >= oy + oh){\r\n\t\t\toct = 5;\r\n\t\t}\r\n\t\telse{\r\n\t\t\toct= 8;\r\n\t\t}\r\n\t\t\r\n\t\treturn oct;\r\n }\r\n});\r\n","\r\n/**\r\n * @class\r\n * Layouter for a mesh or grid.\r\n *\r\n * @author Andreas Herz\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.layout.mesh.MeshLayouter = Class.extend(\r\n /** @lends draw2d.layout.mesh.MeshLayouter.prototype */\r\n\r\n {\r\n\r\n\t/**\r\n\t * Creates a new layouter object.\r\n\t */\r\n init: function(){\r\n },\r\n\r\n /**\r\n * \r\n * Return a changes list for an existing mesh/canvas to ensure that the element to insert\r\n * did have enough space.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to use for the analytic\r\n * @param {draw2d.Figure} figure The figure to add to the exising canvas\r\n *\r\n *\r\n * @returns {draw2d.util.ArrayList} a list of changes to apply if the user want to insert he figure.\r\n */\r\n add: function( canvas, figure)\r\n {\r\n \treturn new draw2d.util.ArrayList();\r\n }\r\n});\r\n","\r\n/**\r\n * @class\r\n * Change proposal for grid/mesh layout changes.\r\n *\r\n * @author Andreas Herz\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.layout.mesh.ProposedMeshChange = Class.extend(\r\n /** @lends draw2d.layout.mesh.ProposedMeshChange.prototype */\r\n\r\n {\r\n\r\n\t/**\r\n\t * Creates change object.\r\n\t */\r\n init: function(figure, x, y)\r\n {\r\n \tthis.figure = figure;\r\n \tthis.x = x;\r\n \tthis.y = y;\r\n },\r\n\r\n /**\r\n *\r\n * Return the related figure.\r\n *\r\n * @returns {draw2d.Figure} the figure to the related change proposal\r\n */\r\n getFigure: function( )\r\n {\r\n \treturn this.figure;\r\n },\r\n\r\n /**\r\n *\r\n * The proposed x-coordinate.\r\n *\r\n * @returns {Number}\r\n */\r\n getX: function()\r\n {\r\n \treturn this.x;\r\n },\r\n\r\n /**\r\n *\r\n * The proposed y-coordinate\r\n *\r\n * @returns {Number}\r\n */\r\n getY: function()\r\n {\r\n \treturn this.y;\r\n }\r\n\r\n});\r\n","\r\n\r\n/*\r\n * jQuery.fn.autoResize 1.14\r\n * --\r\n * https://github.com/padolsey/jQuery.fn.autoResize\r\n * --\r\n * This program is free software. It comes without any warranty, to\r\n * the extent permitted by applicable law. You can redistribute it\r\n * and/or modify it under the terms of the Do What The Fuck You Want\r\n * To Public License, Version 2, as published by Sam Hocevar. See\r\n * http://sam.zoy.org/wtfpl/COPYING for more details. */\r\n(function($){\r\n\r\n\tvar uid = 'ar' + +new Date,\r\n\r\n\t\tdefaults = autoResize.defaults = {\r\n\t\t\tonResize: function(){},\r\n\t\t\tonBeforeResize: function(){return 123},\r\n\t\t\tonAfterResize: function(){return 555},\r\n\t\t\tanimate: {\r\n\t\t\t\tduration: 200,\r\n\t\t\t\tcomplete: function(){}\r\n\t\t\t},\r\n\t\t\textraSpace: 50,\r\n\t\t\tminHeight: 'original',\r\n\t\t\tmaxHeight: 500,\r\n\t\t\tminWidth: 'original',\r\n\t\t\tmaxWidth: 500\r\n\t\t};\r\n\r\n\tautoResize.cloneCSSProperties = [\r\n\t\t'lineHeight', 'textDecoration', 'letterSpacing',\r\n\t\t'fontSize', 'fontFamily', 'fontStyle', 'fontWeight',\r\n\t\t'textTransform', 'textAlign', 'direction', 'wordSpacing', 'fontSizeAdjust',\r\n\t\t'paddingTop', 'paddingLeft', 'paddingBottom', 'paddingRight', 'width'\r\n\t];\r\n\r\n\tautoResize.cloneCSSValues = {\r\n\t\tposition: 'absolute',\r\n\t\ttop: -9999,\r\n\t\tleft: -9999,\r\n\t\topacity: 0,\r\n\t\toverflow: 'hidden'\r\n\t};\r\n\r\n\tautoResize.resizableFilterSelector = [\r\n\t\t'textarea:not(textarea.' + uid + ')',\r\n\t\t'input:not(input[type])',\r\n\t\t'input[type=text]',\r\n\t\t'input[type=password]',\r\n\t\t'input[type=email]',\r\n\t\t'input[type=url]'\r\n\t].join(',');\r\n\r\n\tautoResize.AutoResizer = AutoResizer;\r\n\r\n\t$.fn.autoResize = autoResize;\r\n\r\n\tfunction autoResize(config) {\r\n\t\tthis.filter(autoResize.resizableFilterSelector).each(function(){\r\n\t\t\tnew AutoResizer( $(this), config );\r\n\t\t});\r\n\t\treturn this;\r\n\t}\r\n\r\n\tfunction AutoResizer(el, config) {\r\n\r\n\t\tif (el.data('AutoResizer')) {\r\n\t\t\tel.data('AutoResizer').destroy();\r\n\t\t}\r\n\r\n\t\tconfig = this.config = $.extend({}, autoResize.defaults, config);\r\n\t\tthis.el = el;\r\n\r\n\t\tthis.nodeName = el[0].nodeName.toLowerCase();\r\n\r\n\t\tthis.originalHeight = el.height();\r\n\t\tthis.previousScrollTop = null;\r\n\r\n\t\tthis.value = el.val();\r\n\r\n\t\tif (config.maxWidth === 'original') config.maxWidth = el.width();\r\n\t\tif (config.minWidth === 'original') config.minWidth = el.width();\r\n\t\tif (config.maxHeight === 'original') config.maxHeight = el.height();\r\n\t\tif (config.minHeight === 'original') config.minHeight = el.height();\r\n\r\n\t\tif (this.nodeName === 'textarea') {\r\n\t\t\tel.css({\r\n\t\t\t\tresize: 'none',\r\n\t\t\t\toverflowY: 'hidden'\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\tel.data('AutoResizer', this);\r\n\r\n\t\t// Make sure onAfterResize is called upon animation completion\r\n\t\tconfig.animate.complete = (function(f){\r\n\t\t\treturn function() {\r\n\t\t\t\tconfig.onAfterResize.call(el);\r\n\t\t\t\treturn f.apply(this, arguments);\r\n\t\t\t};\r\n\t\t}(config.animate.complete));\r\n\r\n\t\tthis.bind();\r\n\t}\r\n\r\n\tAutoResizer.prototype = {\r\n\r\n\t\tbind: function() {\r\n\r\n\t\t\tvar check = $.proxy(function(){\r\n\t\t\t\tthis.check();\r\n\t\t\t\treturn true;\r\n\t\t\t}, this);\r\n\r\n\t\t\tthis.unbind();\r\n\r\n\t\t\tthis.el\r\n\t\t\t\t.bind('keyup.autoResize', check)\r\n\t\t\t\t//.bind('keydown.autoResize', check)\r\n\t\t\t\t.bind('change.autoResize', check)\r\n\t\t\t\t.bind('paste.autoResize', function() {\r\n\t\t\t\t\tsetTimeout(function() { check(); }, 0);\r\n\t\t\t\t});\r\n\r\n\t\t\tif (!this.el.is(':hidden')) {\r\n\t\t\t\tthis.check(null, true);\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tunbind: function() {\r\n\t\t\tthis.el.unbind('.autoResize');\r\n\t\t},\r\n\r\n\t\tcreateClone: function() {\r\n\r\n\t\t\tvar el = this.el,\r\n\t\t\t\tclone = this.nodeName === 'textarea' ? el.clone() : $('<span/>');\r\n\r\n\t\t\tthis.clone = clone;\r\n\r\n\t\t\t$.each(autoResize.cloneCSSProperties, function(i, p){\r\n\t\t\t\tclone[0].style[p] = el.css(p);\r\n\t\t\t});\r\n\r\n\t\t\tclone\r\n\t\t\t\t.removeAttr('name')\r\n\t\t\t\t.removeAttr('id')\r\n\t\t\t\t.addClass(uid)\r\n\t\t\t\t.attr('tabIndex', -1)\r\n\t\t\t\t.css(autoResize.cloneCSSValues);\r\n\r\n\t\t\tif (this.nodeName === 'textarea') {\r\n\t\t\t\tclone.height('auto');\r\n\t\t\t} else {\r\n\t\t\t\tclone.width('auto').css({\r\n\t\t\t\t\twhiteSpace: 'nowrap'\r\n\t\t\t\t});\r\n\t\t\t}\r\n\r\n\t\t},\r\n\r\n\t\tcheck: function(e, immediate) {\r\n\r\n\t\t\tif (!this.clone) {\r\n\t\tthis.createClone();\r\n\t\tthis.injectClone();\r\n\t\t\t}\r\n\r\n\t\t\tvar config = this.config,\r\n\t\t\t\tclone = this.clone,\r\n\t\t\t\tel = this.el,\r\n\t\t\t\tvalue = el.val();\r\n\r\n\t\t\t// Do nothing if value hasn't changed\r\n\t\t\tif (value === this.prevValue) { return true; }\r\n\t\t\tthis.prevValue = value;\r\n\r\n\t\t\tif (this.nodeName === 'input') {\r\n\r\n\t\t\t\tclone.text(value);\r\n\r\n\t\t\t\t// Calculate new width + whether to change\r\n\t\t\t\tvar cloneWidth = clone.width(),\r\n\t\t\t\t\tnewWidth = (cloneWidth + config.extraSpace) >= config.minWidth ?\r\n\t\t\t\t\t\tcloneWidth + config.extraSpace : config.minWidth,\r\n\t\t\t\t\tcurrentWidth = el.width();\r\n\r\n\t\t\t\tnewWidth = Math.min(newWidth, config.maxWidth);\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\t(newWidth < currentWidth && newWidth >= config.minWidth) ||\r\n\t\t\t\t\t(newWidth >= config.minWidth && newWidth <= config.maxWidth)\r\n\t\t\t\t) {\r\n\r\n\t\t\t\t\tconfig.onBeforeResize.call(el);\r\n\t\t\t\t\tconfig.onResize.call(el);\r\n\r\n\t\t\t\t\tel.scrollLeft(0);\r\n\r\n\t\t\t\t\tif (config.animate && !immediate) {\r\n\t\t\t\t\t\tel.stop(1,1).animate({\r\n\t\t\t\t\t\t\twidth: newWidth\r\n\t\t\t\t\t\t}, config.animate);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tel.width(newWidth);\r\n\t\t\t\t\t\tconfig.onAfterResize.call(el);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\treturn;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// TEXTAREA\r\n\r\n\t\t\tclone.width(el.width()).height(0).val(value).scrollTop(10000);\r\n\r\n\t\t\tvar scrollTop = clone[0].scrollTop;\r\n\r\n\t\t\tif(!value) {\r\n\t\t\t\t// empty textarea should be exactly minHeight\r\n\t\t\t\tscrollTop = config.minHeight;\r\n\t\t\t\tthis.previousScrollTop = null; // reset state\r\n\t\t\t} else {\r\n\t\t\t\t// Don't do anything if scrollTop hasen't changed:\r\n\t\t\t\tif (this.previousScrollTop === scrollTop) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tthis.previousScrollTop = scrollTop;\r\n\r\n\t\t\t\tif (scrollTop + config.extraSpace >= config.maxHeight) {\r\n\t\t\t\t\tel.css('overflowY', '');\r\n\t\t\t\t\tscrollTop = config.maxHeight;\r\n\t\t\t\t\timmediate = true;\r\n\t\t\t\t} else if (scrollTop + config.extraSpace <= config.minHeight) {\r\n\t\t\t\t\t\t// include extraSpace in calculations so the code works correctly\r\n\t\t\t\t\t\t// when there are few lines\r\n\t\t\t\t\tscrollTop = config.minHeight;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tel.css('overflowY', 'hidden');\r\n\t\t\t\t\tscrollTop += config.extraSpace;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tconfig.onBeforeResize.call(el);\r\n\t\t\tconfig.onResize.call(el);\r\n\r\n\t\t\t// Either animate or directly apply height:\r\n\t\t\tif (config.animate && !immediate) {\r\n\t\t\t\t\tel.stop(1,1).animate({\r\n\t\t\t\t\t\t\theight: scrollTop\r\n\t\t\t\t\t}, config.animate);\r\n\t\t\t} else {\r\n\t\t\t\t\tel.height(scrollTop);\r\n\t\t\t\t\tconfig.onAfterResize.call(el);\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t\tdestroy: function() {\r\n\t\t\tthis.unbind();\r\n\t\t\tthis.el.removeData('AutoResizer');\r\n\t\t\tthis.clone.remove();\r\n\t\t\tdelete this.el;\r\n\t\t\tdelete this.clone;\r\n\t\t},\r\n\r\n\t\tinjectClone: function() {\r\n\t\t\t(\r\n\t\t\t\tautoResize.cloneContainer ||\r\n\t\t\t\t(autoResize.cloneContainer = $('<arclones/>').appendTo('body'))\r\n\t\t\t).append(this.clone);\r\n\t\t}\r\n\r\n\t};\r\n\r\n})(jQuery);\r\n","\r\n\r\n/*!\r\n * jQuery contextMenu - Plugin for simple contextMenu handling\r\n *\r\n * Version: 1.6.5\r\n *\r\n * Authors: Rodney Rehm, Addy Osmani (patches for FF)\r\n * Web: http://medialize.github.com/jQuery-contextMenu/\r\n *\r\n * Licensed under\r\n * MIT License http://www.opensource.org/licenses/mit-license\r\n * GPL v3 http://opensource.org/licenses/GPL-3.0\r\n *\r\n */\r\n(function($, undefined){\r\n\r\n // TODO: -\r\n // ARIA stuff: menuitem, menuitemcheckbox und menuitemradio\r\n // create <menu> structure if $.support[htmlCommand || htmlMenuitem] and !opt.disableNative\r\n\r\n// determine html5 compatibility\r\n$.support.htmlMenuitem = ('HTMLMenuItemElement' in window);\r\n$.support.htmlCommand = ('HTMLCommandElement' in window);\r\n$.support.eventSelectstart = (\"onselectstart\" in document.documentElement);\r\n/* // should the need arise, test for css user-select\r\n$.support.cssUserSelect = (function(){\r\n var t = false,\r\n e = document.createElement('div');\r\n\r\n $.each('Moz|Webkit|Khtml|O|ms|Icab|'.split('|'), function(i, prefix) {\r\n var propCC = prefix + (prefix ? 'U' : 'u') + 'serSelect',\r\n prop = (prefix ? ('-' + prefix.toLowerCase() + '-') : '') + 'user-select';\r\n\r\n e.style.cssText = prop + ': text;';\r\n if (e.style[propCC] == 'text') {\r\n t = true;\r\n return false;\r\n }\r\n\r\n return true;\r\n });\r\n\r\n return t;\r\n})();\r\n*/\r\n\r\nif (!$.ui || !$.ui.widget) {\r\n // duck punch $.cleanData like jQueryUI does to get that remove event\r\n // https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.widget.js#L16-24\r\n var _cleanData = $.cleanData;\r\n $.cleanData = function( elems ) {\r\n for ( var i = 0, elem; (elem = elems[i]) != null; i++ ) {\r\n try {\r\n $( elem ).triggerHandler( \"remove\" );\r\n // http://bugs.jquery.com/ticket/8235\r\n } catch( e ) {}\r\n }\r\n _cleanData( elems );\r\n };\r\n}\r\n\r\nvar // currently active contextMenu trigger\r\n $currentTrigger = null,\r\n // is contextMenu initialized with at least one menu?\r\n initialized = false,\r\n // window handle\r\n $win = $(window),\r\n // number of registered menus\r\n counter = 0,\r\n // mapping selector to namespace\r\n namespaces = {},\r\n // mapping namespace to options\r\n menus = {},\r\n // custom command type handlers\r\n types = {},\r\n // default values\r\n defaults = {\r\n // selector of contextMenu trigger\r\n selector: null,\r\n // where to append the menu to\r\n appendTo: null,\r\n // method to trigger context menu [\"right\", \"left\", \"hover\"]\r\n trigger: \"right\",\r\n // hide menu when mouse leaves trigger / menu elements\r\n autoHide: false,\r\n // ms to wait before showing a hover-triggered context menu\r\n delay: 200,\r\n // flag denoting if a second trigger should simply move (true) or rebuild (false) an open menu\r\n // as long as the trigger happened on one of the trigger-element's child nodes\r\n reposition: false,\r\n // determine position to show menu at\r\n determinePosition: function($menu) {\r\n // position to the lower middle of the trigger element\r\n if ($.ui && $.ui.position) {\r\n // .position() is provided as a jQuery UI utility\r\n // (...and it won't work on hidden elements)\r\n $menu.css('display', 'block').position({\r\n my: \"center top\",\r\n at: \"center bottom\",\r\n of: this,\r\n offset: \"0 5\",\r\n collision: \"fit\"\r\n }).css('display', 'none');\r\n } else {\r\n // determine contextMenu position\r\n var offset = this.offset();\r\n offset.top += this.outerHeight();\r\n offset.left += this.outerWidth() / 2 - $menu.outerWidth() / 2;\r\n $menu.css(offset);\r\n }\r\n },\r\n // position menu\r\n position: function(opt, x, y) {\r\n var $this = this,\r\n offset;\r\n // determine contextMenu position\r\n if (!x && !y) {\r\n opt.determinePosition.call(this, opt.$menu);\r\n return;\r\n } else if (x === \"maintain\" && y === \"maintain\") {\r\n // x and y must not be changed (after re-show on command click)\r\n offset = opt.$menu.position();\r\n } else {\r\n // x and y are given (by mouse event)\r\n offset = {top: y, left: x};\r\n }\r\n\r\n // correct offset if viewport demands it\r\n var bottom = $win.scrollTop() + $win.height(),\r\n right = $win.scrollLeft() + $win.width(),\r\n height = opt.$menu.height(),\r\n width = opt.$menu.width();\r\n\r\n if (offset.top + height > bottom) {\r\n offset.top -= height;\r\n }\r\n\r\n if (offset.left + width > right) {\r\n offset.left -= width;\r\n }\r\n\r\n opt.$menu.css(offset);\r\n },\r\n // position the sub-menu\r\n positionSubmenu: function($menu) {\r\n if ($.ui && $.ui.position) {\r\n // .position() is provided as a jQuery UI utility\r\n // (...and it won't work on hidden elements)\r\n $menu.css('display', 'block').position({\r\n my: \"left top\",\r\n at: \"right top\",\r\n of: this,\r\n collision: \"flipfit fit\"\r\n }).css('display', '');\r\n } else {\r\n // determine contextMenu position\r\n var offset = {\r\n top: 0,\r\n left: this.outerWidth()\r\n };\r\n $menu.css(offset);\r\n }\r\n },\r\n // offset to add to zIndex\r\n zIndex: 1,\r\n // show hide animation settings\r\n animation: {\r\n duration: 50,\r\n show: 'slideDown',\r\n hide: 'slideUp'\r\n },\r\n // events\r\n events: {\r\n show: $.noop,\r\n hide: $.noop\r\n },\r\n // default callback\r\n callback: null,\r\n // list of contextMenu items\r\n items: {}\r\n },\r\n // mouse position for hover activation\r\n hoveract = {\r\n timer: null,\r\n pageX: null,\r\n pageY: null\r\n },\r\n // determine zIndex\r\n zindex = function($t) {\r\n var zin = 0,\r\n $tt = $t;\r\n\r\n while (true) {\r\n zin = Math.max(zin, parseInt($tt.css('z-index'), 10) || 0);\r\n $tt = $tt.parent();\r\n if (!$tt || !$tt.length || \"html body\".indexOf($tt.prop('nodeName').toLowerCase()) > -1 ) {\r\n break;\r\n }\r\n }\r\n\r\n return zin;\r\n },\r\n // event handlers\r\n handle = {\r\n // abort anything\r\n abortevent: function(e){\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n },\r\n\r\n // contextmenu show dispatcher\r\n contextmenu: function(e) {\r\n var $this = $(this);\r\n\r\n // disable actual context-menu\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n\r\n // abort native-triggered events unless we're triggering on right click\r\n if (e.data.trigger != 'right' && e.originalEvent) {\r\n return;\r\n }\r\n\r\n // abort event if menu is visible for this trigger\r\n if ($this.hasClass('context-menu-active')) {\r\n return;\r\n }\r\n\r\n if (!$this.hasClass('context-menu-disabled')) {\r\n // theoretically need to fire a show event at <menu>\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#context-menus\r\n // var evt = jQuery.Event(\"show\", { data: data, pageX: e.pageX, pageY: e.pageY, relatedTarget: this });\r\n // e.data.$menu.trigger(evt);\r\n\r\n $currentTrigger = $this;\r\n if (e.data.build) {\r\n var built = e.data.build($currentTrigger, e);\r\n // abort if build() returned false\r\n if (built === false) {\r\n return;\r\n }\r\n\r\n // dynamically build menu on invocation\r\n e.data = $.extend(true, {}, defaults, e.data, built || {});\r\n\r\n // abort if there are no items to display\r\n if (!e.data.items || $.isEmptyObject(e.data.items)) {\r\n // Note: jQuery captures and ignores errors from event handlers\r\n if (window.console) {\r\n (console.error || console.log)(\"No items specified to show in contextMenu\");\r\n }\r\n\r\n throw new Error('No Items sepcified');\r\n }\r\n\r\n // backreference for custom command type creation\r\n e.data.$trigger = $currentTrigger;\r\n\r\n op.create(e.data);\r\n }\r\n // show menu\r\n op.show.call($this, e.data, e.pageX, e.pageY);\r\n }\r\n },\r\n // contextMenu left-click trigger\r\n click: function(e) {\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n $(this).trigger($.Event(\"contextmenu\", { data: e.data, pageX: e.pageX, pageY: e.pageY }));\r\n },\r\n // contextMenu right-click trigger\r\n mousedown: function(e) {\r\n // register mouse down\r\n var $this = $(this);\r\n\r\n // hide any previous menus\r\n if ($currentTrigger && $currentTrigger.length && !$currentTrigger.is($this)) {\r\n $currentTrigger.data('contextMenu').$menu.trigger('contextmenu:hide');\r\n }\r\n\r\n // activate on right click\r\n if (e.button == 2) {\r\n $currentTrigger = $this.data('contextMenuActive', true);\r\n }\r\n },\r\n // contextMenu right-click trigger\r\n mouseup: function(e) {\r\n // show menu\r\n var $this = $(this);\r\n if ($this.data('contextMenuActive') && $currentTrigger && $currentTrigger.length && $currentTrigger.is($this) && !$this.hasClass('context-menu-disabled')) {\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n $currentTrigger = $this;\r\n $this.trigger($.Event(\"contextmenu\", { data: e.data, pageX: e.pageX, pageY: e.pageY }));\r\n }\r\n\r\n $this.removeData('contextMenuActive');\r\n },\r\n // contextMenu hover trigger\r\n mouseenter: function(e) {\r\n var $this = $(this),\r\n $related = $(e.relatedTarget),\r\n $document = $(document);\r\n\r\n // abort if we're coming from a menu\r\n if ($related.is('.context-menu-list') || $related.closest('.context-menu-list').length) {\r\n return;\r\n }\r\n\r\n // abort if a menu is shown\r\n if ($currentTrigger && $currentTrigger.length) {\r\n return;\r\n }\r\n\r\n hoveract.pageX = e.pageX;\r\n hoveract.pageY = e.pageY;\r\n hoveract.data = e.data;\r\n $document.on('mousemove.contextMenuShow', handle.mousemove);\r\n hoveract.timer = setTimeout(function() {\r\n hoveract.timer = null;\r\n $document.off('mousemove.contextMenuShow');\r\n $currentTrigger = $this;\r\n $this.trigger($.Event(\"contextmenu\", { data: hoveract.data, pageX: hoveract.pageX, pageY: hoveract.pageY }));\r\n }, e.data.delay );\r\n },\r\n // contextMenu hover trigger\r\n mousemove: function(e) {\r\n hoveract.pageX = e.pageX;\r\n hoveract.pageY = e.pageY;\r\n },\r\n // contextMenu hover trigger\r\n mouseleave: function(e) {\r\n // abort if we're leaving for a menu\r\n var $related = $(e.relatedTarget);\r\n if ($related.is('.context-menu-list') || $related.closest('.context-menu-list').length) {\r\n return;\r\n }\r\n\r\n try {\r\n clearTimeout(hoveract.timer);\r\n } catch(e) {}\r\n\r\n hoveract.timer = null;\r\n },\r\n\r\n // click on layer to hide contextMenu\r\n layerClick: function(e) {\r\n var $this = $(this),\r\n root = $this.data('contextMenuRoot'),\r\n mouseup = false,\r\n button = e.button,\r\n x = e.pageX,\r\n y = e.pageY,\r\n target,\r\n offset,\r\n selectors;\r\n\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n\r\n setTimeout(function() {\r\n var $window, hideshow, possibleTarget;\r\n var triggerAction = ((root.trigger == 'left' && button === 0) || (root.trigger == 'right' && button === 2));\r\n\r\n // find the element that would've been clicked, wasn't the layer in the way\r\n if (document.elementFromPoint) {\r\n root.$layer.hide();\r\n target = document.elementFromPoint(x - $win.scrollLeft(), y - $win.scrollTop());\r\n root.$layer.show();\r\n }\r\n\r\n if (root.reposition && triggerAction) {\r\n if (document.elementFromPoint) {\r\n if (root.$trigger.is(target) || root.$trigger.has(target).length) {\r\n root.position.call(root.$trigger, root, x, y);\r\n return;\r\n }\r\n } else {\r\n offset = root.$trigger.offset();\r\n $window = $(window);\r\n // while this looks kinda awful, it's the best way to avoid\r\n // unnecessarily calculating any positions\r\n offset.top += $window.scrollTop();\r\n if (offset.top <= e.pageY) {\r\n offset.left += $window.scrollLeft();\r\n if (offset.left <= e.pageX) {\r\n offset.bottom = offset.top + root.$trigger.outerHeight();\r\n if (offset.bottom >= e.pageY) {\r\n offset.right = offset.left + root.$trigger.outerWidth();\r\n if (offset.right >= e.pageX) {\r\n // reposition\r\n root.position.call(root.$trigger, root, x, y);\r\n return;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (target && triggerAction) {\r\n root.$trigger.one('contextmenu:hidden', function() {\r\n $(target).contextMenu({x: x, y: y});\r\n });\r\n }\r\n\r\n root.$menu.trigger('contextmenu:hide');\r\n }, 50);\r\n },\r\n // key handled :hover\r\n keyStop: function(e, opt) {\r\n if (!opt.isInput) {\r\n e.preventDefault();\r\n }\r\n\r\n e.stopPropagation();\r\n },\r\n key: function(e) {\r\n var opt = $currentTrigger.data('contextMenu') || {};\r\n\r\n switch (e.keyCode) {\r\n case 9:\r\n case 38: // up\r\n handle.keyStop(e, opt);\r\n // if keyCode is [38 (up)] or [9 (tab) with shift]\r\n if (opt.isInput) {\r\n if (e.keyCode == 9 && e.shiftKey) {\r\n e.preventDefault();\r\n opt.$selected && opt.$selected.find('input, textarea, select').blur();\r\n opt.$menu.trigger('prevcommand');\r\n return;\r\n } else if (e.keyCode == 38 && opt.$selected.find('input, textarea, select').prop('type') == 'checkbox') {\r\n // checkboxes don't capture this key\r\n e.preventDefault();\r\n return;\r\n }\r\n } else if (e.keyCode != 9 || e.shiftKey) {\r\n opt.$menu.trigger('prevcommand');\r\n return;\r\n }\r\n // omitting break;\r\n\r\n // case 9: // tab - reached through omitted break;\r\n case 40: // down\r\n handle.keyStop(e, opt);\r\n if (opt.isInput) {\r\n if (e.keyCode == 9) {\r\n e.preventDefault();\r\n opt.$selected && opt.$selected.find('input, textarea, select').blur();\r\n opt.$menu.trigger('nextcommand');\r\n return;\r\n } else if (e.keyCode == 40 && opt.$selected.find('input, textarea, select').prop('type') == 'checkbox') {\r\n // checkboxes don't capture this key\r\n e.preventDefault();\r\n return;\r\n }\r\n } else {\r\n opt.$menu.trigger('nextcommand');\r\n return;\r\n }\r\n break;\r\n\r\n case 37: // left\r\n handle.keyStop(e, opt);\r\n if (opt.isInput || !opt.$selected || !opt.$selected.length) {\r\n break;\r\n }\r\n\r\n if (!opt.$selected.parent().hasClass('context-menu-root')) {\r\n var $parent = opt.$selected.parent().parent();\r\n opt.$selected.trigger('contextmenu:blur');\r\n opt.$selected = $parent;\r\n return;\r\n }\r\n break;\r\n\r\n case 39: // right\r\n handle.keyStop(e, opt);\r\n if (opt.isInput || !opt.$selected || !opt.$selected.length) {\r\n break;\r\n }\r\n\r\n var itemdata = opt.$selected.data('contextMenu') || {};\r\n if (itemdata.$menu && opt.$selected.hasClass('context-menu-submenu')) {\r\n opt.$selected = null;\r\n itemdata.$selected = null;\r\n itemdata.$menu.trigger('nextcommand');\r\n return;\r\n }\r\n break;\r\n\r\n case 35: // end\r\n case 36: // home\r\n if (opt.$selected && opt.$selected.find('input, textarea, select').length) {\r\n return;\r\n } else {\r\n (opt.$selected && opt.$selected.parent() || opt.$menu)\r\n .children(':not(.disabled, .not-selectable)')[e.keyCode == 36 ? 'first' : 'last']()\r\n .trigger('contextmenu:focus');\r\n e.preventDefault();\r\n return;\r\n }\r\n break;\r\n\r\n case 13: // enter\r\n handle.keyStop(e, opt);\r\n if (opt.isInput) {\r\n if (opt.$selected && !opt.$selected.is('textarea, select')) {\r\n e.preventDefault();\r\n return;\r\n }\r\n break;\r\n }\r\n opt.$selected && opt.$selected.trigger('mouseup');\r\n return;\r\n\r\n case 32: // space\r\n case 33: // page up\r\n case 34: // page down\r\n // prevent browser from scrolling down while menu is visible\r\n handle.keyStop(e, opt);\r\n return;\r\n\r\n case 27: // esc\r\n handle.keyStop(e, opt);\r\n opt.$menu.trigger('contextmenu:hide');\r\n return;\r\n\r\n default: // 0-9, a-z\r\n var k = (String.fromCharCode(e.keyCode)).toUpperCase();\r\n if (opt.accesskeys[k]) {\r\n // according to the specs accesskeys must be invoked immediately\r\n opt.accesskeys[k].$node.trigger(opt.accesskeys[k].$menu\r\n ? 'contextmenu:focus'\r\n : 'mouseup'\r\n );\r\n return;\r\n }\r\n break;\r\n }\r\n // pass event to selected item,\r\n // stop propagation to avoid endless recursion\r\n e.stopPropagation();\r\n opt.$selected && opt.$selected.trigger(e);\r\n },\r\n\r\n // select previous possible command in menu\r\n prevItem: function(e) {\r\n e.stopPropagation();\r\n var opt = $(this).data('contextMenu') || {};\r\n\r\n // obtain currently selected menu\r\n if (opt.$selected) {\r\n var $s = opt.$selected;\r\n opt = opt.$selected.parent().data('contextMenu') || {};\r\n opt.$selected = $s;\r\n }\r\n\r\n var $children = opt.$menu.children(),\r\n $prev = !opt.$selected || !opt.$selected.prev().length ? $children.last() : opt.$selected.prev(),\r\n $round = $prev;\r\n\r\n // skip disabled\r\n while ($prev.hasClass('disabled') || $prev.hasClass('not-selectable')) {\r\n if ($prev.prev().length) {\r\n $prev = $prev.prev();\r\n } else {\r\n $prev = $children.last();\r\n }\r\n if ($prev.is($round)) {\r\n // break endless loop\r\n return;\r\n }\r\n }\r\n\r\n // leave current\r\n if (opt.$selected) {\r\n handle.itemMouseleave.call(opt.$selected.get(0), e);\r\n }\r\n\r\n // activate next\r\n handle.itemMouseenter.call($prev.get(0), e);\r\n\r\n // focus input\r\n var $input = $prev.find('input, textarea, select');\r\n if ($input.length) {\r\n $input.focus();\r\n }\r\n },\r\n // select next possible command in menu\r\n nextItem: function(e) {\r\n e.stopPropagation();\r\n var opt = $(this).data('contextMenu') || {};\r\n\r\n // obtain currently selected menu\r\n if (opt.$selected) {\r\n var $s = opt.$selected;\r\n opt = opt.$selected.parent().data('contextMenu') || {};\r\n opt.$selected = $s;\r\n }\r\n\r\n var $children = opt.$menu.children(),\r\n $next = !opt.$selected || !opt.$selected.next().length ? $children.first() : opt.$selected.next(),\r\n $round = $next;\r\n\r\n // skip disabled\r\n while ($next.hasClass('disabled') || $next.hasClass('not-selectable')) {\r\n if ($next.next().length) {\r\n $next = $next.next();\r\n } else {\r\n $next = $children.first();\r\n }\r\n if ($next.is($round)) {\r\n // break endless loop\r\n return;\r\n }\r\n }\r\n\r\n // leave current\r\n if (opt.$selected) {\r\n handle.itemMouseleave.call(opt.$selected.get(0), e);\r\n }\r\n\r\n // activate next\r\n handle.itemMouseenter.call($next.get(0), e);\r\n\r\n // focus input\r\n var $input = $next.find('input, textarea, select');\r\n if ($input.length) {\r\n $input.focus();\r\n }\r\n },\r\n\r\n // flag that we're inside an input so the key handler can act accordingly\r\n focusInput: function(e) {\r\n var $this = $(this).closest('.context-menu-item'),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot;\r\n\r\n root.$selected = opt.$selected = $this;\r\n root.isInput = opt.isInput = true;\r\n },\r\n // flag that we're inside an input so the key handler can act accordingly\r\n blurInput: function(e) {\r\n var $this = $(this).closest('.context-menu-item'),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot;\r\n\r\n root.isInput = opt.isInput = false;\r\n },\r\n\r\n // :hover on menu\r\n menuMouseenter: function(e) {\r\n var root = $(this).data().contextMenuRoot;\r\n if(root)root.hovering = true;\r\n },\r\n // :hover on menu\r\n menuMouseleave: function(e) {\r\n var root = $(this).data().contextMenuRoot;\r\n if (root && root.$layer && root.$layer.is(e.relatedTarget)) {\r\n root.hovering = false;\r\n }\r\n },\r\n\r\n // :hover done manually so key handling is possible\r\n itemMouseenter: function(e) {\r\n var $this = $(this),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot;\r\n\r\n if(!root)\r\n return\r\n\r\n root.hovering = true;\r\n\r\n // abort if we're re-entering\r\n if (e && root.$layer && root.$layer.is(e.relatedTarget)) {\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n }\r\n\r\n // make sure only one item is selected\r\n (opt.$menu ? opt : root).$menu\r\n .children('.hover').trigger('contextmenu:blur');\r\n\r\n if ($this.hasClass('disabled') || $this.hasClass('not-selectable')) {\r\n opt.$selected = null;\r\n return;\r\n }\r\n\r\n $this.trigger('contextmenu:focus');\r\n },\r\n // :hover done manually so key handling is possible\r\n itemMouseleave: function(e) {\r\n var $this = $(this),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot;\r\n\r\n if (root && root !== opt && root.$layer && root.$layer.is(e.relatedTarget)) {\r\n root.$selected && root.$selected.trigger('contextmenu:blur');\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n root.$selected = opt.$selected = opt.$node;\r\n return;\r\n }\r\n\r\n $this.trigger('contextmenu:blur');\r\n },\r\n // contextMenu item click\r\n itemClick: function(e) {\r\n var $this = $(this),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot,\r\n key = data.contextMenuKey,\r\n callback;\r\n\r\n // abort if the key is unknown or disabled or is a menu\r\n if (!opt.items[key] || $this.is('.disabled, .context-menu-submenu, .context-menu-separator, .not-selectable')) {\r\n return;\r\n }\r\n\r\n e.preventDefault();\r\n e.stopImmediatePropagation();\r\n\r\n if ($.isFunction(root.callbacks[key]) && Object.prototype.hasOwnProperty.call(root.callbacks, key)) {\r\n // item-specific callback\r\n callback = root.callbacks[key];\r\n } else if ($.isFunction(root.callback)) {\r\n // default callback\r\n callback = root.callback;\r\n } else {\r\n // no callback, no action\r\n return;\r\n }\r\n\r\n // hide menu if callback doesn't stop that\r\n if (callback.call(root.$trigger, key, root) !== false) {\r\n root.$menu.trigger('contextmenu:hide');\r\n } else if (root.$menu.parent().length) {\r\n op.update.call(root.$trigger, root);\r\n }\r\n },\r\n // ignore click events on input elements\r\n inputClick: function(e) {\r\n e.stopImmediatePropagation();\r\n },\r\n\r\n // hide <menu>\r\n hideMenu: function(e, data) {\r\n var root = $(this).data('contextMenuRoot');\r\n op.hide.call(root.$trigger, root, data && data.force);\r\n },\r\n // focus <command>\r\n focusItem: function(e) {\r\n e.stopPropagation();\r\n var $this = $(this),\r\n data = $this.data(),\r\n opt = data.contextMenu,\r\n root = data.contextMenuRoot;\r\n\r\n $this.addClass('hover')\r\n .siblings('.hover').trigger('contextmenu:blur');\r\n\r\n // remember selected\r\n opt.$selected = root.$selected = $this;\r\n\r\n // position sub-menu - do after show so dumb $.ui.position can keep up\r\n if (opt.$node) {\r\n root.positionSubmenu.call(opt.$node, opt.$menu);\r\n }\r\n },\r\n // blur <command>\r\n blurItem: function(e) {\r\n e.stopPropagation();\r\n var $this = $(this),\r\n data = $this.data(),\r\n opt = data.contextMenu;\r\n\r\n $this.removeClass('hover');\r\n if(opt)opt.$selected = null;\r\n }\r\n },\r\n // operations\r\n op = {\r\n show: function(opt, x, y) {\r\n var $trigger = $(this),\r\n offset,\r\n css = {};\r\n\r\n // hide any open menus\r\n $('#context-menu-layer').trigger('mousedown');\r\n\r\n // backreference for callbacks\r\n opt.$trigger = $trigger;\r\n\r\n // show event\r\n if (opt.events.show.call($trigger, opt) === false) {\r\n $currentTrigger = null;\r\n return;\r\n }\r\n\r\n // create or update context menu\r\n op.update.call($trigger, opt);\r\n\r\n // position menu\r\n opt.position.call($trigger, opt, x, y);\r\n\r\n // make sure we're in front\r\n if (opt.zIndex) {\r\n css.zIndex = zindex($trigger) + opt.zIndex;\r\n }\r\n\r\n // add layer\r\n op.layer.call(opt.$menu, opt, css.zIndex);\r\n\r\n // adjust sub-menu zIndexes\r\n opt.$menu.find('ul').css('zIndex', css.zIndex + 1);\r\n\r\n // position and show context menu\r\n opt.$menu.css( css )[opt.animation.show](opt.animation.duration, function() {\r\n $trigger.trigger('contextmenu:visible');\r\n });\r\n // make options available and set state\r\n $trigger\r\n .data('contextMenu', opt)\r\n .addClass(\"context-menu-active\");\r\n\r\n // register key handler\r\n $(document).off('keydown.contextMenu').on('keydown.contextMenu', handle.key);\r\n // register autoHide handler\r\n if (opt.autoHide) {\r\n // mouse position handler\r\n $(document).on('mousemove.contextMenuAutoHide', function(e) {\r\n // need to capture the offset on mousemove,\r\n // since the page might've been scrolled since activation\r\n var pos = $trigger.offset();\r\n pos.right = pos.left + $trigger.outerWidth();\r\n pos.bottom = pos.top + $trigger.outerHeight();\r\n\r\n if (opt.$layer && !opt.hovering && (!(e.pageX >= pos.left && e.pageX <= pos.right) || !(e.pageY >= pos.top && e.pageY <= pos.bottom))) {\r\n // if mouse in menu...\r\n opt.$menu.trigger('contextmenu:hide');\r\n }\r\n });\r\n }\r\n },\r\n hide: function(opt, force) {\r\n var $trigger = $(this);\r\n if (!opt) {\r\n opt = $trigger.data('contextMenu') || {};\r\n }\r\n\r\n // hide event\r\n if (!force && opt.events && opt.events.hide.call($trigger, opt) === false) {\r\n return;\r\n }\r\n\r\n // remove options and revert state\r\n $trigger\r\n .removeData('contextMenu')\r\n .removeClass(\"context-menu-active\");\r\n\r\n if (opt.$layer) {\r\n // keep layer for a bit so the contextmenu event can be aborted properly by opera\r\n setTimeout((function($layer) {\r\n return function(){\r\n $layer.remove();\r\n };\r\n })(opt.$layer), 10);\r\n\r\n try {\r\n delete opt.$layer;\r\n } catch(e) {\r\n opt.$layer = null;\r\n }\r\n }\r\n\r\n // remove handle\r\n $currentTrigger = null;\r\n // remove selected\r\n opt.$menu.find('.hover').trigger('contextmenu:blur');\r\n opt.$selected = null;\r\n // unregister key and mouse handlers\r\n //$(document).off('.contextMenuAutoHide keydown.contextMenu'); // http://bugs.jquery.com/ticket/10705\r\n $(document).off('.contextMenuAutoHide').off('keydown.contextMenu');\r\n // hide menu\r\n opt.$menu && opt.$menu[opt.animation.hide](opt.animation.duration, function (){\r\n // tear down dynamically built menu after animation is completed.\r\n if (opt.build) {\r\n opt.$menu.remove();\r\n $.each(opt, function(key, value) {\r\n switch (key) {\r\n case 'ns':\r\n case 'selector':\r\n case 'build':\r\n case 'trigger':\r\n return true;\r\n\r\n default:\r\n opt[key] = undefined;\r\n try {\r\n delete opt[key];\r\n } catch (e) {}\r\n return true;\r\n }\r\n });\r\n }\r\n\r\n setTimeout(function() {\r\n $trigger.trigger('contextmenu:hidden');\r\n }, 10);\r\n });\r\n },\r\n create: function(opt, root) {\r\n if (root === undefined) {\r\n root = opt;\r\n }\r\n // create contextMenu\r\n opt.$menu = $('<ul class=\"context-menu-list\"></ul>').addClass(opt.className || \"\").data({\r\n 'contextMenu': opt,\r\n 'contextMenuRoot': root\r\n });\r\n\r\n $.each(['callbacks', 'commands', 'inputs'], function(i,k){\r\n opt[k] = {};\r\n if (!root[k]) {\r\n root[k] = {};\r\n }\r\n });\r\n\r\n root.accesskeys || (root.accesskeys = {});\r\n\r\n // create contextMenu items\r\n $.each(opt.items, function(key, item) {\r\n var $t = $('<li class=\"context-menu-item\"></li>').addClass(item.className || \"\"),\r\n $label = null,\r\n $input = null;\r\n\r\n // iOS needs to see a click-event bound to an element to actually\r\n // have the TouchEvents infrastructure trigger the click event\r\n $t.on('click', $.noop);\r\n\r\n if (typeof item !== \"string\"){\r\n item.$node = $t.data({\r\n 'contextMenu': opt,\r\n 'contextMenuRoot': root,\r\n 'contextMenuKey': key\r\n });\r\n }\r\n\r\n // register accesskey\r\n // NOTE: the accesskey attribute should be applicable to any element, but Safari5 and Chrome13 still can't do that\r\n if (item.accesskey) {\r\n var aks = splitAccesskey(item.accesskey);\r\n for (var i=0, ak; ak = aks[i]; i++) {\r\n if (!root.accesskeys[ak]) {\r\n root.accesskeys[ak] = item;\r\n item._name = item.name.replace(new RegExp('(' + ak + ')', 'i'), '<span class=\"context-menu-accesskey\">$1</span>');\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (typeof item == \"string\") {\r\n $t.addClass('context-menu-separator not-selectable');\r\n } else if (item.type && types[item.type]) {\r\n // run custom type handler\r\n types[item.type].call($t, item, opt, root);\r\n // register commands\r\n $.each([opt, root], function(i,k){\r\n k.commands[key] = item;\r\n if ($.isFunction(item.callback)) {\r\n k.callbacks[key] = item.callback;\r\n }\r\n });\r\n } else {\r\n // add label for input\r\n if (item.type == 'html') {\r\n $t.addClass('context-menu-html not-selectable');\r\n } else if (item.type) {\r\n $label = $('<label></label>').appendTo($t);\r\n $('<span></span>').html(item._name || item.name).appendTo($label);\r\n $t.addClass('context-menu-input');\r\n opt.hasTypes = true;\r\n $.each([opt, root], function(i,k){\r\n k.commands[key] = item;\r\n k.inputs[key] = item;\r\n });\r\n } else if (item.items) {\r\n item.type = 'sub';\r\n }\r\n\r\n switch (item.type) {\r\n case 'text':\r\n $input = $('<input type=\"text\" value=\"1\" name=\"\" value=\"\">')\r\n .attr('name', 'context-menu-input-' + key)\r\n .val(item.value || \"\")\r\n .appendTo($label);\r\n break;\r\n\r\n case 'textarea':\r\n $input = $('<textarea name=\"\"></textarea>')\r\n .attr('name', 'context-menu-input-' + key)\r\n .val(item.value || \"\")\r\n .appendTo($label);\r\n\r\n if (item.height) {\r\n $input.height(item.height);\r\n }\r\n break;\r\n\r\n case 'checkbox':\r\n $input = $('<input type=\"checkbox\" value=\"1\" name=\"\" value=\"\">')\r\n .attr('name', 'context-menu-input-' + key)\r\n .val(item.value || \"\")\r\n .prop(\"checked\", !!item.selected)\r\n .prependTo($label);\r\n break;\r\n\r\n case 'radio':\r\n $input = $('<input type=\"radio\" value=\"1\" name=\"\" value=\"\">')\r\n .attr('name', 'context-menu-input-' + item.radio)\r\n .val(item.value || \"\")\r\n .prop(\"checked\", !!item.selected)\r\n .prependTo($label);\r\n break;\r\n\r\n case 'select':\r\n $input = $('<select name=\"\">')\r\n .attr('name', 'context-menu-input-' + key)\r\n .appendTo($label);\r\n if (item.options) {\r\n $.each(item.options, function(value, text) {\r\n $('<option></option>').val(value).text(text).appendTo($input);\r\n });\r\n $input.val(item.selected);\r\n }\r\n break;\r\n\r\n case 'sub':\r\n // FIXME: shouldn't this .html() be a .text()?\r\n $('<span></span>').html(item._name || item.name).appendTo($t);\r\n item.appendTo = item.$node;\r\n op.create(item, root);\r\n $t.data('contextMenu', item).addClass('context-menu-submenu');\r\n item.callback = null;\r\n break;\r\n\r\n case 'html':\r\n $(item.html).appendTo($t);\r\n break;\r\n\r\n default:\r\n $.each([opt, root], function(i,k){\r\n k.commands[key] = item;\r\n if ($.isFunction(item.callback)) {\r\n k.callbacks[key] = item.callback;\r\n }\r\n });\r\n // FIXME: shouldn't this .html() be a .text()?\r\n $('<span></span>').html(item._name || item.name || \"\").appendTo($t);\r\n break;\r\n }\r\n\r\n // disable key listener in <input>\r\n if (item.type && item.type != 'sub' && item.type != 'html') {\r\n $input\r\n .on('focus', handle.focusInput)\r\n .on('blur', handle.blurInput);\r\n\r\n if (item.events) {\r\n $input.on(item.events, opt);\r\n }\r\n }\r\n\r\n // add icons\r\n if (item.icon) {\r\n $t.addClass(\"icon icon-\" + item.icon);\r\n }\r\n }\r\n\r\n // cache contained elements\r\n if(typeof item !==\"string\") {\r\n item.$input = $input;\r\n item.$label = $label;\r\n }\r\n\r\n // attach item to menu\r\n $t.appendTo(opt.$menu);\r\n\r\n // Disable text selection\r\n if (!opt.hasTypes && $.support.eventSelectstart) {\r\n // browsers support user-select: none,\r\n // IE has a special event for text-selection\r\n // browsers supporting neither will not be preventing text-selection\r\n $t.on('selectstart.disableTextSelect', handle.abortevent);\r\n }\r\n });\r\n // attach contextMenu to <body> (to bypass any possible overflow:hidden issues on parents of the trigger element)\r\n if (!opt.$node) {\r\n opt.$menu.css('display', 'none').addClass('context-menu-root');\r\n }\r\n opt.$menu.appendTo(opt.appendTo || document.body);\r\n },\r\n resize: function($menu, nested) {\r\n // determine widths of submenus, as CSS won't grow them automatically\r\n // position:absolute within position:absolute; min-width:100; max-width:200; results in width: 100;\r\n // kinda sucks hard...\r\n\r\n // determine width of absolutely positioned element\r\n $menu.css({position: 'absolute', display: 'block'});\r\n // don't apply yet, because that would break nested elements' widths\r\n // add a pixel to circumvent word-break issue in IE9 - #80\r\n $menu.data('width', Math.ceil($menu.width()) + 1);\r\n // reset styles so they allow nested elements to grow/shrink naturally\r\n $menu.css({\r\n position: 'static',\r\n minWidth: '0px',\r\n maxWidth: '100000px'\r\n });\r\n // identify width of nested menus\r\n $menu.find('> li > ul').each(function() {\r\n op.resize($(this), true);\r\n });\r\n // reset and apply changes in the end because nested\r\n // elements' widths wouldn't be calculatable otherwise\r\n if (!nested) {\r\n $menu.find('ul').andSelf().css({\r\n position: '',\r\n display: '',\r\n minWidth: '',\r\n maxWidth: ''\r\n }).width(function() {\r\n return $(this).data('width');\r\n });\r\n }\r\n },\r\n update: function(opt, root) {\r\n var $trigger = this;\r\n if (root === undefined) {\r\n root = opt;\r\n op.resize(opt.$menu);\r\n }\r\n // re-check disabled for each item\r\n opt.$menu.children().each(function(){\r\n var $item = $(this),\r\n key = $item.data('contextMenuKey'),\r\n item = opt.items[key],\r\n disabled = (item === undefined)||(typeof item ===\"string\") || ($.isFunction(item.disabled) && item.disabled.call($trigger, key, root)) || item.disabled === true;\r\n\r\n // dis- / enable item\r\n $item[disabled ? 'addClass' : 'removeClass']('disabled');\r\n\r\n if (item && item.type) {\r\n // dis- / enable input elements\r\n $item.find('input, select, textarea').prop('disabled', disabled);\r\n\r\n // update input states\r\n switch (item.type) {\r\n case 'text':\r\n case 'textarea':\r\n item.$input.val(item.value || \"\");\r\n break;\r\n\r\n case 'checkbox':\r\n case 'radio':\r\n item.$input.val(item.value || \"\").prop('checked', !!item.selected);\r\n break;\r\n\r\n case 'select':\r\n item.$input.val(item.selected || \"\");\r\n break;\r\n }\r\n }\r\n\r\n if (item && item.$menu) {\r\n // update sub-menu\r\n op.update.call($trigger, item, root);\r\n }\r\n });\r\n },\r\n layer: function(opt, zIndex) {\r\n // add transparent layer for click area\r\n // filter and background for Internet Explorer, Issue #23\r\n var $layer = opt.$layer = $('<div id=\"context-menu-layer\" style=\"position:fixed; z-index:' + zIndex + '; top:0; left:0; opacity: 0; filter: alpha(opacity=0); background-color: #000;\"></div>')\r\n .css({height: $win.height(), width: $win.width(), display: 'block'})\r\n .data('contextMenuRoot', opt)\r\n .insertBefore(this)\r\n .on('contextmenu', handle.abortevent)\r\n .on('mousedown', handle.layerClick);\r\n\r\n // IE6 doesn't know position:fixed;\r\n if (!$.support.fixedPosition) {\r\n $layer.css({\r\n 'position' : 'absolute',\r\n 'height' : $(document).height()\r\n });\r\n }\r\n\r\n return $layer;\r\n }\r\n };\r\n\r\n// split accesskey according to http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#assigned-access-key\r\nfunction splitAccesskey(val) {\r\n var t = val.split(/\\s+/),\r\n keys = [];\r\n\r\n for (var i=0, k; k = t[i]; i++) {\r\n k = k[0].toUpperCase(); // first character only\r\n // theoretically non-accessible characters should be ignored, but different systems, different keyboard layouts, ... screw it.\r\n // a map to look up already used access keys would be nice\r\n keys.push(k);\r\n }\r\n\r\n return keys;\r\n}\r\n\r\n// handle contextMenu triggers\r\n$.fn.contextMenu = function(operation) {\r\n if (operation === undefined) {\r\n this.first().trigger('contextmenu');\r\n } else if (operation.x && operation.y) {\r\n this.first().trigger($.Event(\"contextmenu\", {pageX: operation.x, pageY: operation.y}));\r\n } else if (operation === \"hide\") {\r\n var $menu = this.data('contextMenu').$menu;\r\n $menu && $menu.trigger('contextmenu:hide');\r\n } else if (operation === \"destroy\") {\r\n $.contextMenu(\"destroy\", {context: this});\r\n } else if ($.isPlainObject(operation)) {\r\n operation.context = this;\r\n $.contextMenu(\"create\", operation);\r\n } else if (operation) {\r\n this.removeClass('context-menu-disabled');\r\n } else if (!operation) {\r\n this.addClass('context-menu-disabled');\r\n }\r\n\r\n return this;\r\n};\r\n\r\n// manage contextMenu instances\r\n$.contextMenu = function(operation, options) {\r\n if (typeof operation != 'string') {\r\n options = operation;\r\n operation = 'create';\r\n }\r\n\r\n if (typeof options == 'string') {\r\n options = {selector: options};\r\n } else if (options === undefined) {\r\n options = {};\r\n }\r\n\r\n // merge with default options\r\n var o = $.extend(true, {}, defaults, options || {});\r\n var $document = $(document);\r\n var $context = $document;\r\n var _hasContext = false;\r\n\r\n if (!o.context || !o.context.length) {\r\n o.context = document;\r\n } else {\r\n // you never know what they throw at you...\r\n $context = $(o.context).first();\r\n o.context = $context.get(0);\r\n _hasContext = o.context !== document;\r\n }\r\n\r\n switch (operation) {\r\n case 'create':\r\n // no selector no joy\r\n if (!o.selector) {\r\n throw new Error('No selector specified');\r\n }\r\n // make sure internal classes are not bound to\r\n if (o.selector.match(/.context-menu-(list|item|input)($|\\s)/)) {\r\n throw new Error('Cannot bind to selector \"' + o.selector + '\" as it contains a reserved className');\r\n }\r\n if (!o.build && (!o.items || $.isEmptyObject(o.items))) {\r\n throw new Error('No Items sepcified');\r\n }\r\n counter ++;\r\n o.ns = '.contextMenu' + counter;\r\n if (!_hasContext) {\r\n namespaces[o.selector] = o.ns;\r\n }\r\n menus[o.ns] = o;\r\n\r\n // default to right click\r\n if (!o.trigger) {\r\n o.trigger = 'right';\r\n }\r\n\r\n if (!initialized) {\r\n // make sure item click is registered first\r\n $document\r\n .on({\r\n 'contextmenu:hide.contextMenu': handle.hideMenu,\r\n 'prevcommand.contextMenu': handle.prevItem,\r\n 'nextcommand.contextMenu': handle.nextItem,\r\n 'contextmenu.contextMenu': handle.abortevent,\r\n 'mouseenter.contextMenu': handle.menuMouseenter,\r\n 'mouseleave.contextMenu': handle.menuMouseleave\r\n }, '.context-menu-list')\r\n .on('mouseup.contextMenu', '.context-menu-input', handle.inputClick)\r\n .on({\r\n 'mouseup.contextMenu': handle.itemClick,\r\n 'contextmenu:focus.contextMenu': handle.focusItem,\r\n 'contextmenu:blur.contextMenu': handle.blurItem,\r\n 'contextmenu.contextMenu': handle.abortevent,\r\n 'mouseenter.contextMenu': handle.itemMouseenter,\r\n 'mouseleave.contextMenu': handle.itemMouseleave\r\n }, '.context-menu-item');\r\n\r\n initialized = true;\r\n }\r\n\r\n // engage native contextmenu event\r\n $context\r\n .on('contextmenu' + o.ns, o.selector, o, handle.contextmenu);\r\n\r\n if (_hasContext) {\r\n // add remove hook, just in case\r\n $context.on('remove' + o.ns, function() {\r\n $(this).contextMenu(\"destroy\");\r\n });\r\n }\r\n\r\n switch (o.trigger) {\r\n case 'hover':\r\n $context\r\n .on('mouseenter' + o.ns, o.selector, o, handle.mouseenter)\r\n .on('mouseleave' + o.ns, o.selector, o, handle.mouseleave);\r\n break;\r\n\r\n case 'left':\r\n $context.on('click' + o.ns, o.selector, o, handle.click);\r\n break;\r\n /*\r\n default:\r\n // http://www.quirksmode.org/dom/events/contextmenu.html\r\n $document\r\n .on('mousedown' + o.ns, o.selector, o, handle.mousedown)\r\n .on('mouseup' + o.ns, o.selector, o, handle.mouseup);\r\n break;\r\n */\r\n }\r\n\r\n // create menu\r\n if (!o.build) {\r\n op.create(o);\r\n }\r\n break;\r\n\r\n case 'destroy':\r\n var $visibleMenu;\r\n if (_hasContext) {\r\n // get proper options\r\n var context = o.context;\r\n $.each(menus, function(ns, o) {\r\n if (o.context !== context) {\r\n return true;\r\n }\r\n\r\n $visibleMenu = $('.context-menu-list').filter(':visible');\r\n if ($visibleMenu.length && $visibleMenu.data().contextMenuRoot.$trigger.is($(o.context).find(o.selector))) {\r\n $visibleMenu.trigger('contextmenu:hide', {force: true});\r\n }\r\n\r\n try {\r\n if (menus[o.ns].$menu) {\r\n menus[o.ns].$menu.remove();\r\n }\r\n\r\n delete menus[o.ns];\r\n } catch(e) {\r\n menus[o.ns] = null;\r\n }\r\n\r\n $(o.context).off(o.ns);\r\n\r\n return true;\r\n });\r\n } else if (!o.selector) {\r\n $document.off('.contextMenu .contextMenuAutoHide');\r\n $.each(menus, function(ns, o) {\r\n $(o.context).off(o.ns);\r\n });\r\n\r\n namespaces = {};\r\n menus = {};\r\n counter = 0;\r\n initialized = false;\r\n\r\n $('#context-menu-layer, .context-menu-list').remove();\r\n } else if (namespaces[o.selector]) {\r\n $visibleMenu = $('.context-menu-list').filter(':visible');\r\n if ($visibleMenu.length && $visibleMenu.data().contextMenuRoot.$trigger.is(o.selector)) {\r\n $visibleMenu.trigger('contextmenu:hide', {force: true});\r\n }\r\n\r\n try {\r\n if (menus[namespaces[o.selector]].$menu) {\r\n menus[namespaces[o.selector]].$menu.remove();\r\n }\r\n\r\n delete menus[namespaces[o.selector]];\r\n } catch(e) {\r\n menus[namespaces[o.selector]] = null;\r\n }\r\n\r\n $document.off(namespaces[o.selector]);\r\n }\r\n break;\r\n\r\n case 'html5':\r\n // if <command> or <menuitem> are not handled by the browser,\r\n // or options was a bool true,\r\n // initialize $.contextMenu for them\r\n if ((!$.support.htmlCommand && !$.support.htmlMenuitem) || (typeof options == \"boolean\" && options)) {\r\n $('menu[type=\"context\"]').each(function() {\r\n if (this.id) {\r\n $.contextMenu({\r\n selector: '[contextmenu=' + this.id +']',\r\n items: $.contextMenu.fromMenu(this)\r\n });\r\n }\r\n }).css('display', 'none');\r\n }\r\n break;\r\n\r\n default:\r\n throw new Error('Unknown operation \"' + operation + '\"');\r\n }\r\n\r\n return this;\r\n};\r\n\r\n// import values into <input> commands\r\n$.contextMenu.setInputValues = function(opt, data) {\r\n if (data === undefined) {\r\n data = {};\r\n }\r\n\r\n $.each(opt.inputs, function(key, item) {\r\n switch (item.type) {\r\n case 'text':\r\n case 'textarea':\r\n item.value = data[key] || \"\";\r\n break;\r\n\r\n case 'checkbox':\r\n item.selected = data[key] ? true : false;\r\n break;\r\n\r\n case 'radio':\r\n item.selected = (data[item.radio] || \"\") == item.value ? true : false;\r\n break;\r\n\r\n case 'select':\r\n item.selected = data[key] || \"\";\r\n break;\r\n }\r\n });\r\n};\r\n\r\n// export values from <input> commands\r\n$.contextMenu.getInputValues = function(opt, data) {\r\n if (data === undefined) {\r\n data = {};\r\n }\r\n\r\n $.each(opt.inputs, function(key, item) {\r\n switch (item.type) {\r\n case 'text':\r\n case 'textarea':\r\n case 'select':\r\n data[key] = item.$input.val();\r\n break;\r\n\r\n case 'checkbox':\r\n data[key] = item.$input.prop('checked');\r\n break;\r\n\r\n case 'radio':\r\n if (item.$input.prop('checked')) {\r\n data[item.radio] = item.value;\r\n }\r\n break;\r\n }\r\n });\r\n\r\n return data;\r\n};\r\n\r\n// find <label for=\"xyz\">\r\nfunction inputLabel(node) {\r\n return (node.id && $('label[for=\"'+ node.id +'\"]').val()) || node.name;\r\n}\r\n\r\n// convert <menu> to items object\r\nfunction menuChildren(items, $children, counter) {\r\n if (!counter) {\r\n counter = 0;\r\n }\r\n\r\n $children.each(function() {\r\n var $node = $(this),\r\n node = this,\r\n nodeName = this.nodeName.toLowerCase(),\r\n label,\r\n item;\r\n\r\n // extract <label><input>\r\n if (nodeName == 'label' && $node.find('input, textarea, select').length) {\r\n label = $node.text();\r\n $node = $node.children().first();\r\n node = $node.get(0);\r\n nodeName = node.nodeName.toLowerCase();\r\n }\r\n\r\n /*\r\n * <menu> accepts flow-content as children. that means <embed>, <canvas> and such are valid menu items.\r\n * Not being the sadistic kind, $.contextMenu only accepts:\r\n * <command>, <menuitem>, <hr>, <span>, <p> <input [text, radio, checkbox]>, <textarea>, <select> and of course <menu>.\r\n * Everything else will be imported as an html node, which is not interfaced with contextMenu.\r\n */\r\n\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#concept-command\r\n switch (nodeName) {\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/interactive-elements.html#the-menu-element\r\n case 'menu':\r\n item = {name: $node.attr('label'), items: {}};\r\n counter = menuChildren(item.items, $node.children(), counter);\r\n break;\r\n\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#using-the-a-element-to-define-a-command\r\n case 'a':\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#using-the-button-element-to-define-a-command\r\n case 'button':\r\n item = {\r\n name: $node.text(),\r\n disabled: !!$node.attr('disabled'),\r\n callback: (function(){ return function(){ $node.click(); }; })()\r\n };\r\n break;\r\n\r\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/commands.html#using-the-command-element-to-define-a-command\r\n\r\n case 'menuitem':\r\n case 'command':\r\n switch ($node.attr('type')) {\r\n case undefined:\r\n case 'command':\r\n case 'menuitem':\r\n item = {\r\n name: $node.attr('label'),\r\n disabled: !!$node.attr('disabled'),\r\n callback: (function(){ return function(){ $node.click(); }; })()\r\n };\r\n break;\r\n\r\n case 'checkbox':\r\n item = {\r\n type: 'checkbox',\r\n disabled: !!$node.attr('disabled'),\r\n name: $node.attr('label'),\r\n selected: !!$node.attr('checked')\r\n };\r\n break;\r\n\r\n case 'radio':\r\n item = {\r\n type: 'radio',\r\n disabled: !!$node.attr('disabled'),\r\n name: $node.attr('label'),\r\n radio: $node.attr('radiogroup'),\r\n value: $node.attr('id'),\r\n selected: !!$node.attr('checked')\r\n };\r\n break;\r\n\r\n default:\r\n item = undefined;\r\n }\r\n break;\r\n\r\n case 'hr':\r\n item = '-------';\r\n break;\r\n\r\n case 'input':\r\n switch ($node.attr('type')) {\r\n case 'text':\r\n item = {\r\n type: 'text',\r\n name: label || inputLabel(node),\r\n disabled: !!$node.attr('disabled'),\r\n value: $node.val()\r\n };\r\n break;\r\n\r\n case 'checkbox':\r\n item = {\r\n type: 'checkbox',\r\n name: label || inputLabel(node),\r\n disabled: !!$node.attr('disabled'),\r\n selected: !!$node.attr('checked')\r\n };\r\n break;\r\n\r\n case 'radio':\r\n item = {\r\n type: 'radio',\r\n name: label || inputLabel(node),\r\n disabled: !!$node.attr('disabled'),\r\n radio: !!$node.attr('name'),\r\n value: $node.val(),\r\n selected: !!$node.attr('checked')\r\n };\r\n break;\r\n\r\n default:\r\n item = undefined;\r\n break;\r\n }\r\n break;\r\n\r\n case 'select':\r\n item = {\r\n type: 'select',\r\n name: label || inputLabel(node),\r\n disabled: !!$node.attr('disabled'),\r\n selected: $node.val(),\r\n options: {}\r\n };\r\n $node.children().each(function(){\r\n item.options[this.value] = $(this).text();\r\n });\r\n break;\r\n\r\n case 'textarea':\r\n item = {\r\n type: 'textarea',\r\n name: label || inputLabel(node),\r\n disabled: !!$node.attr('disabled'),\r\n value: $node.val()\r\n };\r\n break;\r\n\r\n case 'label':\r\n break;\r\n\r\n default:\r\n item = {type: 'html', html: $node.clone(true)};\r\n break;\r\n }\r\n\r\n if (item) {\r\n counter++;\r\n items['key' + counter] = item;\r\n }\r\n });\r\n\r\n return counter;\r\n}\r\n\r\n// convert html5 menu\r\n$.contextMenu.fromMenu = function(element) {\r\n var $this = $(element),\r\n items = {};\r\n\r\n menuChildren(items, $this.children());\r\n\r\n return items;\r\n};\r\n\r\n// make defaults accessible\r\n$.contextMenu.defaults = defaults;\r\n$.contextMenu.types = types;\r\n// export internal functions - undocumented, for hacking only!\r\n$.contextMenu.handle = handle;\r\n$.contextMenu.op = op;\r\n$.contextMenu.menus = menus;\r\n\r\n})(jQuery);\r\n","\r\n\r\n/**\r\n *\r\n * @private\r\n */\r\n/**\r\n * Primary package containing general interfaces and implementation classes.\r\n * @namespace draw2d */\r\nexport default {\r\n /**\r\n * Types representing or manipulating geometric values, such as Points, Rectangles, etc.\r\n * @namespace draw2d.geo\r\n * */\r\n geo: {},\r\n\r\n /** \r\n * Contains classes to load and save Draw2D files into, or from, a Canvas.\r\n * @namespace draw2d.io \r\n **/\r\n io: {\r\n /** @namespace draw2d.io.json\r\n * */\r\n json: {},\r\n /** @namespace draw2d.io.png */\r\n png: {},\r\n /** @namespace draw2d.io.svg */\r\n svg: {}\r\n },\r\n\r\n /** @namespace draw2d.util */\r\n util: {\r\n /** @namespace draw2d.util.spline */\r\n spline: {}\r\n },\r\n\r\n /**\r\n * This package contains EditPolicy implementations for all used elements. A *EditPolicy*\r\n * is a pluggable contribution implementing a portion of an element behavior. Editpolicies contribute to the\r\n * overall editing behavior of an EditPart.\r\n *\r\n * Editing behavior is defined as one or more of the following:\r\n * - Selection handling\r\n * - Routing\r\n * - Feedback management\r\n * - Delegation and Forwarding of commands\r\n * - Drag&Drop behaviour\r\n *\r\n * @namespace draw2d.policy\r\n * */\r\n policy: {\r\n /**\r\n * Editpolicies for selection handling, highlighting, background rendering, snapTo behaviour.\r\n *\r\n * @namespace draw2d.policy.canvas\r\n * */\r\n canvas: {},\r\n /** \r\n * Policies for Connection creation. Like 'ClickPolicy'...creates a connection if you click into the canvas. \r\n * @namespace draw2d.policy.connection \r\n **/\r\n connection: {},\r\n /** @namespace draw2d.policy.line */\r\n line: {},\r\n /** @namespace draw2d.policy.port */\r\n port: {},\r\n /** \r\n * Selection decorations for figures. Movement contrains. Width limitation,...\r\n * @namespace draw2d.policy.figure \r\n **/\r\n figure: {}\r\n },\r\n\r\n /** \r\n * Contains all predefined visual shapes of Draw2D\r\n * \r\n * @namespace draw2d.shape \r\n **/\r\n shape: {\r\n /** \r\n * @namespace draw2d.shape.basic \r\n **/\r\n basic: {},\r\n /** @namespace draw2d.shape.dimetric */\r\n dimetric: {},\r\n /** @namespace draw2d.shape.composite */\r\n composite: {},\r\n /** @namespace draw2d.shape.arrow */\r\n arrow: {},\r\n /** @namespace draw2d.shape.node */\r\n node: {},\r\n /** @namespace draw2d.shape.note */\r\n note: {},\r\n /** @namespace draw2d.shape.diagram */\r\n diagram: {},\r\n /** @namespace draw2d.shape.flowchart */\r\n flowchart: {},\r\n /** @namespace draw2d.shape.analog */\r\n analog: {},\r\n /** @namespace draw2d.shape.icon */\r\n icon: {},\r\n /** @namespace draw2d.shape.layout */\r\n layout: {},\r\n /** @namespace draw2d.shape.pert */\r\n pert: {},\r\n /** @namespace draw2d.shape.state */\r\n state: {},\r\n /** @namespace draw2d.shape.widget */\r\n widget: {}\r\n },\r\n\r\n /** \r\n * The command is what eventually changes the model. Figures are asked for a command for a given request. Commands also help \r\n * determine if the interaction is possible. If there is no command, or it is not executable, the UI will indicate that the \r\n * interaction is not allowed. \r\n * \r\n * All commands (move, drag&drop, insert, remove,....) are stored on top of a CommandStack and available for undo and redo.\r\n * An `draw2d.Canvas` has a single command stack. **Commands must be executed using the command stack rather than directly calling execute.**\r\n * \r\n * @namespace draw2d.command \r\n **/\r\n command: {},\r\n\r\n /** @namespace draw2d.decoration */\r\n decoration: {\r\n /** @namespace draw2d.decoration.connection */\r\n connection: {}\r\n },\r\n\r\n /** @namespace draw2d.layout */\r\n layout: {\r\n /** @namespace draw2d.layout.connection\r\n * @memberof draw2d.layout\r\n * */\r\n connection: {},\r\n /** @namespace draw2d.layout.anchor */\r\n anchor: {},\r\n /** @namespace draw2d.layout.mesh */\r\n mesh: {},\r\n /** @namespace draw2d.layout.locator */\r\n locator: {}\r\n },\r\n\r\n /** @namespace draw2d.ui */\r\n ui: {},\r\n\r\n isTouchDevice: (\r\n //Detect iPhone\r\n (navigator.platform.indexOf(\"iPhone\") != -1) ||\r\n //Detect iPod\r\n (navigator.platform.indexOf(\"iPod\") != -1) ||\r\n //Detect iPad\r\n (navigator.platform.indexOf(\"iPad\") != -1)\r\n )\r\n\r\n}\r\n\r\n\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A plugable contribution implementing a portion of an behavior.\r\n *\r\n *\r\n * EditPolicies should determine an Canvas or figure editing capabilities. It is possible to implement\r\n * an figure such that it handles all editing responsibility. However, it is much more flexible\r\n * and object-oriented to use EditPolicies. Using policies, you can pick and choose the editing\r\n * behavior for an figure/canvas without being bound to its class hierarchy. Code management is easier.\r\n *\r\n *\r\n * This interface is not intended to be implemented by clients. Clients should inherit from {@link draw2d.policy.figure.SelectionFeedbackPolicy}\r\n * or {@link draw2d.policy.canvas.SelectionPolicy}.\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.policy.EditPolicy = Class.extend(\r\n /** @lends draw2d.policy.EditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.EditPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this.setterWhitelist = { ...setter}\r\n this.getterWhitelist = { ...getter}\r\n\r\n this.attr(attr)\r\n },\r\n\r\n /**\r\n * \r\n * Read or set object attributes.<br>\r\n * When no value is given, reads specified attribute from the element.<br>\r\n * When value is given, sets the attribute to that value.\r\n * Multiple attributes can be set by passing an object with name-value pairs.\r\n *\r\n * @param {String/Object} name\r\n * @param {Object} [value]\r\n * @since 5.3.2\r\n * @returns {Object}\r\n **/\r\n attr: function (name, value) {\r\n // call of attr as setter method with {name1:val1, name2:val2 } argument list\r\n //\r\n if ($.isPlainObject(name)) {\r\n for (let key in name) {\r\n let func = this.setterWhitelist[key]\r\n // call the assigned method if given\r\n if (func) {\r\n func.call(this, name[key])\r\n }\r\n // maby the ussser adds a function as property to the attr call\r\n // e.g.:\r\n // {\r\n // doIt: function(){}\r\n // }\r\n //\r\n // in this case we assign the method to this object and wrap it with \"this\" as context\r\n // a very, very simple method to replace default implemenations of the object\r\n else if (typeof name[key] === \"function\") {\r\n this[key] = name[key].bind(this)\r\n }\r\n }\r\n }\r\n else if (typeof name === \"string\") {\r\n // call attr as getter\r\n //\r\n if (typeof value === \"undefined\") {\r\n let getter = this.getterWhitelist[name]\r\n if (typeof getter === \"function\") {\r\n return getter.call(this)\r\n }\r\n return // undefined\r\n }\r\n // call attr as simple setter with (key , value)\r\n //\r\n\r\n // the value can be a function. In this case we must call the value().\r\n if (typeof value === \"function\") {\r\n value = value()\r\n }\r\n let setter = this.setterWhitelist[name]\r\n if (setter) {\r\n setter.call(this, value)\r\n }\r\n }\r\n // generic getter of all registered attributes\r\n else if (typeof name === \"undefined\") {\r\n let result = {}\r\n for (key in this.getterWhitelist) {\r\n result[key] = this.getterWhitelist[key].call(this)\r\n }\r\n return result\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been installed.\r\n *\r\n * @param {draw2d.Canvas|draw2d.Figure} host\r\n */\r\n onInstall: function (host) {\r\n },\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been uninstalled.\r\n *\r\n * @param {draw2d.Canvas|draw2d.Figure} host\r\n */\r\n onUninstall: function (host) {\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.SelectionPolicy\r\n */\r\ndraw2d.policy.canvas.BoundingboxSelectionPolicy = draw2d.policy.canvas.SingleSelectionPolicy.extend(\r\n /** @lends draw2d.policy.canvas.BoundingboxSelectionPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.BoundingboxSelectionPolicy\",\r\n\r\n /**\r\n * Creates a new selection policy for a canvas.\r\n */\r\n init: function () {\r\n this.isInsideMode = (rect1, rect2) => rect1.isInside(rect2)\r\n this.intersectsMode = (rect1, rect2) => rect1.intersects(rect2)\r\n\r\n this.decision = this.isInsideMode\r\n\r\n this._super()\r\n\r\n this.boundingBoxFigure1 = null\r\n this.boundingBoxFigure2 = null\r\n this.x = 0\r\n this.y = 0\r\n\r\n // falls ein Port getroffen wird, dann darf keine BoundingBox gezeichnet werden.\r\n //\r\n this.canDrawBoundingBox = false\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n select: function (canvas, figure) {\r\n if (canvas.getSelection().contains(figure)) {\r\n return // nothing to to\r\n }\r\n\r\n let oldSelection = canvas.getSelection().getPrimary()\r\n\r\n if (figure !== null) {\r\n figure.select(true) // primary selection\r\n }\r\n\r\n if (oldSelection !== figure) {\r\n canvas.getSelection().setPrimary(figure)\r\n\r\n // inform all selection listeners about the new selection.\r\n //\r\n canvas.fireEvent(\"select\", {figure: figure, selection: canvas.getSelection()})\r\n }\r\n\r\n // adding connections to the selection of the source and target port part of the current selection\r\n //\r\n let selection = canvas.getSelection()\r\n canvas.getLines().each((i, line) => {\r\n if (line instanceof draw2d.Connection) {\r\n if (selection.contains(line.getSource().getRoot()) && selection.contains(line.getTarget().getRoot())) {\r\n this.select(canvas, line, false)\r\n }\r\n }\r\n })\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the selection handling mode to <b>intersection</b> or to <b>isInside</b>.\r\n * <ul>\r\n * <li>true = intersection, shapes must only touch the selection bounding box </li>\r\n * <li>false = isInside, shapes must complete inside the selection bounding box (default)</li>\r\n * </ul>\r\n *\r\n * @param {Boolean} useIntersectionMode set true if the selection handle should use the alternative selection approach\r\n * @since 4.9.0\r\n */\r\n setDecisionMode: function (useIntersectionMode) {\r\n if (useIntersectionMode === true) {\r\n this.decision = this.intersectsMode\r\n }\r\n else {\r\n this.decision = this.isInsideMode\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDown: function (canvas, x, y, shiftKey, ctrlKey) {\r\n\r\n try {\r\n this.x = x\r\n this.y = y\r\n\r\n let currentSelection = canvas.getSelection().getAll()\r\n\r\n // COPY_PARENT\r\n // this code part is copied from the parent implementation. The main problem is, that\r\n // the sequence of unselect/select of elements is broken if we call the base implementation\r\n // in this case wrong events are fired if we select a figure if already a figure is selected!\r\n // WRONG: selectNewFigure -> unselectOldFigure\r\n // RIGHT: unselectOldFigure -> selectNewFigure\r\n // To ensure this I must copy the parent code and postbound the event propagation\r\n //\r\n this.mouseMovedDuringMouseDown = false\r\n let canDragStart = true\r\n\r\n this.canDrawBoundingBox = false\r\n\r\n let figure = canvas.getBestFigure(x, y)\r\n\r\n // may the figure is assigned to a composite. In this case the composite can\r\n // override the event receiver\r\n while (figure !== null) {\r\n let delegated = figure.getSelectionAdapter()()\r\n if (delegated === figure) {\r\n break\r\n }\r\n figure = delegated\r\n }\r\n\r\n // ignore ports since version 6.1.0. This is handled by the ConnectionCreatePolicy\r\n //\r\n if (figure instanceof draw2d.Port) {\r\n return// silently\r\n }\r\n\r\n if( figure !==null && figure.isSelectable() === false && figure.isDraggable()===false){\r\n figure=null;\r\n }\r\n\r\n this.canDrawBoundingBox = true\r\n\r\n if (figure !== null && figure.isDraggable()) {\r\n canDragStart = figure.onDragStart(x - figure.getAbsoluteX(), y - figure.getAbsoluteY(), shiftKey, ctrlKey)\r\n // Element send a veto about the drag&drop operation\r\n this.mouseDraggingElement = canDragStart === false ? null : figure\r\n }\r\n\r\n this.mouseDownElement = figure\r\n\r\n this.mouseDownElement?.fireEvent(\"mousedown\",\r\n {\r\n x: x, \r\n y: y, \r\n relX: x - this.mouseDownElement.getAbsoluteX(),\r\n relY: y - this.mouseDownElement.getAbsoluteY(),\r\n shiftKey: \r\n shiftKey, \r\n ctrlKey: ctrlKey\r\n })\r\n\r\n // we click on an element which are not part of the current selection\r\n // => reset the \"old\" current selection if we didn't press the shift key\r\n if (shiftKey === false) {\r\n if (this.mouseDownElement !== null && this.mouseDownElement.isResizeHandle === false && !currentSelection.contains(this.mouseDownElement)) {\r\n currentSelection.each((i, figure) => {\r\n this.unselect(canvas, figure)\r\n })\r\n }\r\n }\r\n\r\n if (figure !== canvas.getSelection().getPrimary() && figure !== null && figure.isSelectable() === true) {\r\n this.select(canvas, figure)\r\n\r\n // its a line\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n // you can move a line with Drag&Drop...but not a connection.\r\n // A Connection is fixed linked with the corresponding ports.\r\n //\r\n if (!(figure instanceof draw2d.Connection)) {\r\n canvas.draggingLineCommand = figure.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE))\r\n if (canvas.draggingLineCommand !== null) {\r\n canvas.draggingLine = figure\r\n }\r\n }\r\n }\r\n else if (canDragStart === false) {\r\n figure.unselect()\r\n }\r\n }\r\n // END_COPY FROM PARENT\r\n\r\n\r\n // inform all figures that they have a new ox/oy position for the relative\r\n // drag/drop operation\r\n if (this.mouseDownElement !== null && this.mouseDownElement.isResizeHandle === false) {\r\n currentSelection = canvas.getSelection().getAll()\r\n currentSelection.each((i, figure) => {\r\n let fakeDragX = 1\r\n let fakeDragY = 1\r\n\r\n let handleRect = figure.getHandleBBox()\r\n if (handleRect !== null) {\r\n handleRect.translate(figure.getAbsolutePosition().scale(-1))\r\n fakeDragX = handleRect.x + 1\r\n fakeDragY = handleRect.y + 1\r\n }\r\n\r\n let canDragStart = figure.onDragStart(fakeDragX, fakeDragY, shiftKey, ctrlKey, true /*fakeFlag*/)\r\n // its a line\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n // no special handling\r\n }\r\n else if (canDragStart === false) {\r\n this.unselect(canvas, figure)\r\n }\r\n })\r\n }\r\n }\r\n catch (exc) {\r\n console.log(exc)\r\n throw exc\r\n }\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n // don't drag a selection box if we drag&drop a port\r\n //\r\n if (this.canDrawBoundingBox === false) {\r\n return\r\n }\r\n\r\n try {\r\n this._super(canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n\r\n if (this.mouseDraggingElement === null && this.mouseDownElement === null && this.boundingBoxFigure1 === null) {\r\n this.boundingBoxFigure1 = new draw2d.shape.basic.Rectangle({\r\n width: 1,\r\n height: 1,\r\n x: this.x,\r\n y: this.y,\r\n bgColor: \"#d4d1d4\",\r\n alpha: 0.1\r\n })\r\n this.boundingBoxFigure1.setCanvas(canvas)\r\n\r\n this.boundingBoxFigure2 = new draw2d.shape.basic.Rectangle({\r\n width: 1,\r\n height: 1,\r\n x: this.x,\r\n y: this.y,\r\n dash: \"--..\",\r\n stroke: 0.5,\r\n color: \"#37a8ff\",\r\n bgColor: null\r\n })\r\n this.boundingBoxFigure2.setCanvas(canvas)\r\n }\r\n let abs = Math.abs\r\n let min = Math.min\r\n if (this.boundingBoxFigure1 !== null) {\r\n this.boundingBoxFigure1.setDimension(abs(dx), abs(dy))\r\n this.boundingBoxFigure1.setPosition(this.x + min(0, dx), this.y + min(0, dy))\r\n this.boundingBoxFigure2.setDimension(abs(dx), abs(dy))\r\n this.boundingBoxFigure2.setPosition(this.x + min(0, dx), this.y + min(0, dy))\r\n }\r\n }\r\n catch (exc) {\r\n console.log(exc)\r\n }\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (canvas, x, y, shiftKey, ctrlKey) {\r\n try {\r\n // delete the current selection if you have clicked in the empty\r\n // canvas.\r\n if (this.mouseDownElement === null) {\r\n canvas.getSelection().getAll().each((i, figure) => {\r\n this.unselect(canvas, figure)\r\n })\r\n }\r\n else if (this.mouseDownElement instanceof draw2d.ResizeHandle || (this.mouseDownElement instanceof draw2d.shape.basic.LineResizeHandle)) {\r\n // Do nothing\r\n // A click on a resize handle didn't change the selection of the canvas\r\n //\r\n }\r\n // delete the current selection if you click on another figure than the current\r\n // selection and you didn't drag the complete selection.\r\n else if (this.mouseDownElement !== null && this.mouseMovedDuringMouseDown === false) {\r\n let sel = canvas.getSelection().getAll()\r\n if (!sel.contains(this.mouseDownElement)) {\r\n canvas.getSelection().getAll().each((i, figure) => {\r\n this.unselect(canvas, figure)\r\n })\r\n }\r\n }\r\n this._super(canvas, x, y, shiftKey, ctrlKey)\r\n\r\n if (this.boundingBoxFigure1 !== null) {\r\n // retrieve all figures which are inside the bounding box and select all of them\r\n //\r\n let selectionRect = this.boundingBoxFigure1.getBoundingBox()\r\n canvas.getFigures().each((i, figure) => {\r\n if (figure.isSelectable() === true && figure.isVisible()===true && this.decision(figure.getBoundingBox(), selectionRect)) {\r\n let fakeDragX = 1\r\n let fakeDragY = 1\r\n\r\n let handleRect = figure.getHandleBBox()\r\n if (handleRect !== null) {\r\n handleRect.translate(figure.getAbsolutePosition().scale(-1))\r\n fakeDragX = handleRect.x + 1\r\n fakeDragY = handleRect.y + 1\r\n }\r\n let canDragStart = figure.onDragStart(fakeDragX, fakeDragY, shiftKey, ctrlKey)\r\n if (canDragStart === true) {\r\n this.select(canvas, figure)\r\n }\r\n }\r\n })\r\n\r\n this.boundingBoxFigure1.setCanvas(null)\r\n this.boundingBoxFigure1 = null\r\n this.boundingBoxFigure2.setCanvas(null)\r\n this.boundingBoxFigure2 = null\r\n }\r\n }\r\n catch (exc) {\r\n console.log(exc)\r\n debugger\r\n }\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\nimport Color from '../../util/Color'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.EditPolicy\r\n */\r\ndraw2d.policy.canvas.CanvasPolicy = draw2d.policy.EditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.CanvasPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.CanvasPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this.canvas = null\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Called if the policy is installed into the canvas.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n */\r\n onInstall: function (canvas) {\r\n this.canvas = canvas\r\n },\r\n\r\n /**\r\n *\r\n * Called if the policy is deinstalled from the canvas\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n */\r\n onUninstall: function (canvas) {\r\n this.canvas = null\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseMove: function (canvas, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDown: function (canvas, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas the shape below the mouse or null\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (canvas, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if the user press the right mouse in the canvas.\r\n *\r\n * @param {draw2d.Figure|draw2d.shape.basic.Line} figure the figure below the mouse\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @since 4.4.0\r\n */\r\n onRightMouseDown: function (figure, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the canvas if the user click on a figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure under the click event. Can be null\r\n * @param {Number} mouseX the x coordinate of the mouse during the click event\r\n * @param {Number} mouseY the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 3.0.0\r\n *\r\n * @template\r\n */\r\n onClick: function (figure, mouseX, mouseY, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n * Called by the canvas if the user double click on a figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure under the double click event. Can be null\r\n * @param {Number} mouseX the x coordinate of the mouse during the click event\r\n * @param {Number} mouseY the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 4.1.0\r\n *\r\n * @template\r\n */\r\n onDoubleClick: function (figure, mouseX, mouseY, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n *\r\n * called if the user uses the mouse wheel.\r\n *\r\n *\r\n * @param {Number} wheelDelta\r\n * @param {Number} x the x coordinate of the event\r\n * @param {Number} y the y coordinate of the event\r\n * @param shiftKey\r\n * @param ctrlKey\r\n * @since 5.8.0\r\n * @template\r\n *\r\n * @returns {Boolean} return <b>false</b> to preven tthe default event operation (e.g. scrolling)\r\n */\r\n onMouseWheel: function (wheelDelta, x, y, shiftKey, ctrlKey) {\r\n // return \"false\" to prevent the default event operation\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Helper method to make an monochrome GIF image WxH pixels big, first create a properly sized array: let pixels = new Array(W*H);.\r\n * Then, for each pixel X,Y that should be opaque, store a 1 at the proper location: pixels[X+Y*W] = 1;.\r\n * Finally, create the image: let my_gif = createGif(W, H, pixels, color);\r\n * \"0\" pixels are transparent.\r\n * The <b>color</b> defines the foreground color.\r\n *\r\n * Now, you can specify this image as the SRC attribute of an IMG tag: document.write(\"<IMG SRC=\\\"\" + my_gif + \"\\\">\");\r\n * or for the canvas as background-image css attribute.\r\n *\r\n *\r\n * @param w\r\n * @param h\r\n * @param d\r\n * @param color\r\n * @returns {String}\r\n *\r\n * @private\r\n */\r\n createMonochromGif: function (w, h, d, color) {\r\n color = new Color(color)\r\n let r = String.fromCharCode(w % 256) + String.fromCharCode(w / 256) + String.fromCharCode(h % 256) + String.fromCharCode(h / 256)\r\n\r\n let gif = 'GIF89a' + r + '\\xf0\\0\\0\\xff\\xff\\xff' + String.fromCharCode(color.red) + String.fromCharCode(color.green) + String.fromCharCode(color.blue) + '\\x21\\xf9\\u{4}\\u{1}\\0\\0\\0,\\0\\0\\0\\0' + r + '\\0\\u{2}'\r\n\r\n // help method to generate uncompressed in memory GIF data structure without the usage of a canvas or any other\r\n // heavy weight stuff.\r\n let b = {\r\n bit: 1,\r\n byte_: 0,\r\n data: '',\r\n\r\n writeBit: function (b) {\r\n if (b) this.byte_ |= this.bit\r\n this.bit <<= 1\r\n if (this.bit === 256) {\r\n this.bit = 1\r\n this.data += String.fromCharCode(this.byte_)\r\n this.byte_ = 0\r\n }\r\n },\r\n\r\n get: function () {\r\n let result = \"\"\r\n let data = this.data\r\n if (this.bit !== 1) {\r\n data += String.fromCharCode(this.byte_)\r\n }\r\n for (let i = 0; i < data.length + 1; i += 255) {\r\n let chunklen = data.length - i\r\n if (chunklen < 0) chunklen = 0\r\n if (chunklen > 255) chunklen = 255\r\n result += String.fromCharCode(chunklen) + data.substring(i, i + 255)\r\n }\r\n return result + \"\\0\"\r\n }\r\n }\r\n\r\n for (let y = 0; y < h; y++) {\r\n for (let x = 0; x < w; x++) {\r\n b.writeBit(d[x + w * y])\r\n b.writeBit(0)\r\n b.writeBit(0)\r\n b.writeBit(0)\r\n b.writeBit(0)\r\n b.writeBit(1)\r\n }\r\n }\r\n gif += b.get() + ';'\r\n\r\n return 'data:image/gif;base64,' + draw2d.util.Base64.encode(gif)\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * This decorations hides draw2d.Ports which are to far from the current cursor position.\r\n * This makes the canvas more clean if you have a lot of nodes on it.<br>\r\n * You didn't see a bunch of ports.\r\n *\r\n *\r\n * @example\r\n *\r\n * // install the policy to the canvas\r\n *\r\n * // add some demo figure to the canvas\r\n * canvas.add(new draw2d.shape.node.Start({x: 10, y: 30}));\r\n * canvas.add(new draw2d.shape.node.End({x: 90, y: 90}));\r\n * canvas.add(new draw2d.shape.node.Between({ x: 310, y: 30}));\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"move the mouse and you see that ports are hidden if the mouse far from it\"}),5,5);\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.CoronaDecorationPolicy());\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n */\r\ndraw2d.policy.canvas.CoronaDecorationPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.CoronaDecorationPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.CoronaDecorationPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.startDragX = 0\r\n this.startDragY = 0\r\n this.diameterToBeFullVisible = 0\r\n this.diameterToBeVisible = 0\r\n this.sumDiameter = 0\r\n\r\n this._super(\r\n {\r\n diameterToBeVisible: 200, \r\n diameterToBeFullVisible: 20,\r\n ...attr\r\n },\r\n {\r\n diameterToBeVisible: this.setDiameterToBeVisible,\r\n diameterToBeFullVisible: this.setDiameterToBeFullVisible,\r\n ...setter},\r\n\r\n {\r\n diameterToBeVisible: this.getDiameterToBeVisible,\r\n diameterToBeFullVisible: this.getDiameterToBeFullVisible,\r\n ...getter}\r\n )\r\n },\r\n\r\n setDiameterToBeVisible: function (diameter) {\r\n this.diameterToBeVisible = diameter\r\n this.sumDiameter = this.diameterToBeFullVisible + this.diameterToBeVisible\r\n },\r\n\r\n getDiameterToBeVisible: function () {\r\n return this.diameterToBeVisible\r\n },\r\n\r\n setDiameterToBeFullVisible: function (diameter) {\r\n this.diameterToBeFullVisible = diameter\r\n this.sumDiameter = this.diameterToBeFullVisible + this.diameterToBeVisible\r\n },\r\n\r\n getDiameterToBeFullVisible: function () {\r\n return this.diameterToBeFullVisible\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n canvas.getFigures().each((i, figure) => {\r\n figure.getPorts().each((i, p) => p.setAlpha(0.0))\r\n })\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n\r\n canvas.getFigures().each(function (i, figure) {\r\n figure.getPorts().each(function (i, p) {\r\n if (p.__origAlpha) {\r\n p.setAlpha(p.__origAlpha)\r\n delete p.__origAlpha\r\n }\r\n })\r\n })\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onMouseDown: function (canvas, x, y, shiftKey, ctrlKey) {\r\n this.startDragX = x\r\n this.startDragY = y\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onMouseMove: function (canvas, x, y, shiftKey, ctrlKey) {\r\n this.updatePorts(canvas, x, y)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n this.updatePorts(canvas, this.startDragX + dx, this.startDragY + dy)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Update all ports with the new calculated opacity in relation to the distance to the current\r\n * mouse position\r\n *\r\n * @param canvas\r\n * @param x\r\n * @param y\r\n * @private\r\n */\r\n updatePorts: function (canvas, x, y) {\r\n canvas.getFigures().each((i, figure) => {\r\n if (figure instanceof draw2d.shape.node.Node) {\r\n if (figure.isVisible() === true && figure.hitTest(x, y, this.sumDiameter) === true) {\r\n figure.getPorts().each((i, p) => {\r\n if (p.isVisible() === false) {\r\n p.__origAlpha = figure.getAlpha()\r\n }\r\n let dist = figure.getBoundingBox().getDistance(new draw2d.geo.Point(x, y))\r\n let alpha = Math.max(0, (1 - (((100 / (this.diameterToBeVisible - this.diameterToBeFullVisible)) * dist) / 100.0)))\r\n p.setAlpha(alpha)\r\n })\r\n }\r\n else {\r\n figure.getPorts().each((i, p) => {\r\n p.setAlpha(0.0)\r\n })\r\n }\r\n }\r\n })\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * The base class for any canvas decoration like grid, chessboard, graph paper or\r\n * other.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n */\r\ndraw2d.policy.canvas.DecorationPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.DecorationPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.DecorationPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n }\r\n\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Standard keyboard policy. This is the standard installed keyboard policy.\r\n * <br>\r\n * <br>\r\n * Keyboard commands\r\n * <ul>\r\n * <li>DEL - delete selection</li>\r\n * </ul>\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.KeyboardPolicy\r\n */\r\ndraw2d.policy.canvas.DefaultKeyboardPolicy = draw2d.policy.canvas.KeyboardPolicy.extend(\r\n /** @lends draw2d.policy.canvas.DefaultKeyboardPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.DefaultKeyboardPolicy\",\r\n\r\n /**\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user press a key.<br>\r\n * This implementation checks only if the <b>DEL</b> has been pressed and creates an\r\n * CommandDelete if this happens.\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onKeyDown: function (canvas, keyCode, shiftKey, ctrlKey) {\r\n //\r\n if (keyCode === 46 && canvas.getPrimarySelection() !== null) {\r\n // create a single undo/redo transaction if the user delete more than one element. \r\n // This happens with command stack transactions.\r\n //\r\n canvas.getCommandStack().startTransaction(draw2d.Configuration.i18n.command.deleteShape)\r\n let selection = canvas.getSelection()\r\n selection.each(function (index, figure) {\r\n // don't delete a connection if the source or target figure is part of the selection.\r\n // In this case the connection is deleted by the DeleteCommand itself and it is not allowed to\r\n // delete a figure twice.\r\n //\r\n if (figure instanceof draw2d.Connection) {\r\n if (selection.contains(figure.getSource(), true)) {\r\n return\r\n }\r\n if (selection.contains(figure.getTarget(), true)) {\r\n return\r\n }\r\n }\r\n let cmd = figure.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.DELETE))\r\n if (cmd !== null) {\r\n canvas.getCommandStack().execute(cmd)\r\n }\r\n })\r\n // execute all single commands at once.\r\n canvas.getCommandStack().commitTransaction()\r\n }\r\n else {\r\n this._super(canvas, keyCode, shiftKey, ctrlKey)\r\n }\r\n\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Drop interceptors are basically event handlers from which you can return a value\r\n * that tells draw2d to abort what it is that it was doing.<br>\r\n * <br>\r\n * Interceptors can be registered via the registerEditPolicy method on the draw2d canvas just like any other\r\n * edit policies.<br>\r\n * <br>\r\n * The <b>delegateTarget</b> method is responsible for all drop event especially to all connection and port handling.\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n * @since 5.0.0\r\n */\r\ndraw2d.policy.canvas.DropInterceptorPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.DropInterceptorPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.canvas.DropInterceptorPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called if the user want connect a port with any kind draw2d.Figure.<br>\r\n * Return a non <b>null</b> value if the interceptor accept the connect event.<br>\r\n * <br>\r\n * It is possible to delegate the drop event to another figure if the policy\r\n * returns another figure. This is useful if a figure want to accept a port\r\n * drop event and delegates this drop event to another port.<br>\r\n *\r\n *\r\n * @param {draw2d.Figure} connectInquirer the figure who wants connect\r\n * @param {draw2d.Figure} connectIntent the potential connect target\r\n *\r\n * @returns {draw2d.Figure} the calculated connect intent or <b>null</b> if the interceptor uses the veto right\r\n */\r\n delegateTarget: function (connectInquirer, connectIntent) {\r\n\r\n // a composite accept any kind of figures exceptional ports\r\n //\r\n if (!(connectInquirer instanceof draw2d.Port) && connectIntent instanceof draw2d.shape.composite.StrongComposite) {\r\n return connectIntent\r\n }\r\n\r\n // Ports accepts only Ports from the same semanticGroup as DropTarget\r\n //\r\n if ((connectIntent instanceof draw2d.Port) && (connectInquirer instanceof draw2d.Port)) {\r\n if(connectIntent.getSemanticGroup() !== connectInquirer.getSemanticGroup()) {\r\n return null\r\n }\r\n }\r\n\r\n // Ports accepts only Ports as DropTarget\r\n //\r\n if (!(connectIntent instanceof draw2d.Port) || !(connectInquirer instanceof draw2d.Port)) {\r\n return null\r\n }\r\n\r\n // ////////////////////////////////////////////////////////////\r\n // at this stage we a sure, that we have two ports as argument\r\n // ////////////////////////////////////////////////////////////\r\n\r\n // It is not possible to create a loop back connection at the moment.\r\n // Reason: no connection router implemented for this case\r\n if (connectInquirer.getParent() === connectIntent.getParent()) {\r\n return null\r\n }\r\n\r\n // It is not allowed to connect two output ports\r\n if (connectInquirer instanceof draw2d.OutputPort && connectIntent instanceof draw2d.OutputPort) {\r\n return null\r\n }\r\n\r\n // It is not allowed to connect two input ports\r\n if (connectInquirer instanceof draw2d.InputPort && connectIntent instanceof draw2d.InputPort) {\r\n return null\r\n }\r\n\r\n\r\n // redirect the dragEnter handling to the hybrid port\r\n //\r\n if ((connectIntent.getParent() instanceof draw2d.shape.node.Hub)) {\r\n\r\n let inputConnections = connectIntent.getConnections().asArray().filter( con => (con.getPeerPort(connectIntent) instanceof draw2d.OutputPort))\r\n let outputConnections = connectIntent.getConnections().asArray().filter( con => (con.getPeerPort(connectIntent) instanceof draw2d.InputPort))\r\n\r\n if (connectInquirer instanceof draw2d.InputPort && outputConnections.length >= connectIntent.getMaxFanOut()) {\r\n return null\r\n }\r\n\r\n if (connectInquirer instanceof draw2d.OutputPort && inputConnections.length >= connectIntent.getMaxFanIn()) {\r\n return null\r\n }\r\n\r\n if (connectInquirer instanceof draw2d.HybridPort && inputConnections.length >= connectIntent.getMaxFanIn()) {\r\n return null\r\n }\r\n\r\n return connectIntent\r\n } \r\n\r\n return connectIntent\r\n\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Extended keyboard policy to <b>delete</b> and <b>group</b> figures in the canvas.\r\n * <br>\r\n * Keyboard commands\r\n * <ul>\r\n * <li>DEL - delete selection</li>\r\n * <li>Ctrl+G - group/ungroup selection</li>\r\n * <li>Ctrl+B - send current selection in the background (toBack)</li>\r\n * <li>Ctrl+F - send current selection in the foreground (toFront)</li>\r\n * </ul>\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.KeyboardPolicy\r\n */\r\ndraw2d.policy.canvas.ExtendedKeyboardPolicy = draw2d.policy.canvas.KeyboardPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ExtendedKeyboardPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.ExtendedKeyboardPolicy\",\r\n\r\n /**\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user press a key\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onKeyDown: function (canvas, keyCode, shiftKey, ctrlKey) {\r\n if (canvas.getPrimarySelection() !== null && ctrlKey === true) {\r\n switch (keyCode) {\r\n\r\n case 71: // G\r\n if (canvas.getPrimarySelection() instanceof draw2d.shape.composite.Group && canvas.getSelection().getSize() === 1) {\r\n canvas.getCommandStack().execute(new draw2d.command.CommandUngroup(canvas, canvas.getPrimarySelection()))\r\n }\r\n else {\r\n canvas.getCommandStack().execute(new draw2d.command.CommandGroup(canvas, canvas.getSelection()))\r\n }\r\n break\r\n case 66: // B\r\n canvas.getPrimarySelection().toBack()\r\n break\r\n case 70: // F\r\n canvas.getPrimarySelection().toFront()\r\n }\r\n }\r\n else {\r\n this._super(canvas, keyCode, shiftKey, ctrlKey)\r\n }\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Install this edit policy in a canvas if you want fadeout all decorations like ports, resize handles\r\n * if the user didn't move the mouse. This is good for a clean representation of your diagram.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n */\r\ndraw2d.policy.canvas.FadeoutDecorationPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.FadeoutDecorationPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.FadeoutDecorationPolicy\",\r\n\r\n DEFAULT_FADEOUT_DURATION: 60,\r\n DEFAULT_ALPHA_DECREMENT: 0.05,\r\n\r\n /**\r\n * Creates a new fade out policy. Don't forget to install them into the canvas.\r\n *\r\n */\r\n init: function () {\r\n this._super()\r\n this.alpha = 1.0\r\n this.alphaDec = this.DEFAULT_ALPHA_DECREMENT\r\n this.hidePortsCounter = this.DEFAULT_FADEOUT_DURATION\r\n this.portDragging = false\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n **/\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n this.timerId = window.setInterval(this.onTimer.bind(this), 50)\r\n\r\n // initial hide all decorations after install of this policy\r\n //\r\n this.hidePortsCounter = 1\r\n this.alpha = 0.1\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n **/\r\n onUninstall: function (canvas) {\r\n window.clearInterval(this.timerId)\r\n this.canvas.getAllPorts().each(function (i, port) {\r\n port.setAlpha(1.0)\r\n })\r\n\r\n this._super(canvas)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Timerfucntion to show/hide the related ports\r\n * @private\r\n **/\r\n onTimer: function () {\r\n this.hidePortsCounter--\r\n\r\n if (this.hidePortsCounter <= 0 && this.alpha > 0) {\r\n this.alpha = Math.max(0, this.alpha - this.alphaDec)\r\n\r\n this.canvas.getAllPorts().each((i, port) => {\r\n port.setAlpha(this.alpha)\r\n })\r\n\r\n this.canvas.getSelection().getAll().each((i, figure) => {\r\n figure.selectionHandles.each((i, handle) => {\r\n handle.setAlpha(this.alpha)\r\n })\r\n })\r\n } else if (this.hidePortsCounter > 0 && this.alpha !== 1.0) {\r\n this.alpha = 1// Math.min(1,this.alpha+0.1);\r\n this.alphaDec = this.DEFAULT_ALPHA_DECREMENT\r\n this.duringHide = false\r\n this.canvas.getAllPorts().each((i, port) => {\r\n port.setAlpha(this.alpha)\r\n })\r\n this.canvas.getSelection().getAll().each((i, figure) => {\r\n figure.selectionHandles.each((i, handle) => {\r\n handle.setAlpha(this.alpha)\r\n })\r\n })\r\n }\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDown: function (canvas, x, y, shiftKey, ctrlKey) {\r\n this.hidePortsCounter = this.DEFAULT_FADEOUT_DURATION\r\n this.portDragging = (canvas.getBestFigure(x, y) instanceof draw2d.Port)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseMove: function (canvas, x, y, shiftKey, ctrlKey) {\r\n this.hidePortsCounter = this.DEFAULT_FADEOUT_DURATION\r\n this.portDragging = false\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n if (this.portDragging === false) {\r\n this.hidePortsCounter = 0\r\n this.alphaDec = 0.1\r\n this.onTimer()\r\n }\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (figure, x, y, shiftKey, ctrlKey) {\r\n this.hidePortsCounter = this.DEFAULT_FADEOUT_DURATION\r\n this.portDragging = false\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A drag&Drop feedback handler for the canvas. The policy didn't move the\r\n * shapes in real time rather it shows a ghost rectangle as feedback. <br>\r\n * <br>\r\n * The shapes are updated after the drag&drop operation.\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // install the policy to the canvas\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.GhostMoveSelectionPolicy());\r\n *\r\n * // add some demo figure to the canvas\r\n * canvas.add(new draw2d.shape.basic.Circle({diameter: 50, x: 10, y: 30}));\r\n * canvas.add(new draw2d.shape.basic.Circle({diameter: 30, x: 90, y: 50}));\r\n * canvas.add(new draw2d.shape.basic.Circle({diameter: 60, x: 110, y: 30}));\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"move the circle to see the drag&drop feedback\"}),5,5);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.SingleSelectionPolicy\r\n */\r\ndraw2d.policy.canvas.GhostMoveSelectionPolicy = draw2d.policy.canvas.SingleSelectionPolicy.extend(\r\n /** @lends draw2d.policy.canvas.GhostMoveSelectionPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.GhostMoveSelectionPolicy\",\r\n\r\n /**\r\n */\r\n init: function () {\r\n this.clone = null\r\n this.ghostRectangle1 = null\r\n this.ghostRectangle2 = null\r\n\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n this.mouseMovedDuringMouseDown = true\r\n if (this.mouseDraggingElement !== null) {\r\n\r\n // if the figure not part of the selection it must be a ResizeHandle...\r\n let sel = canvas.getSelection().getAll()\r\n if (!sel.contains(this.mouseDraggingElement)) {\r\n this.mouseDraggingElement.onDrag(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n }\r\n // it is a normal draw2d.Figure\r\n else {\r\n // create the ghost handles for the figure to move and update the position\r\n //\r\n if (this.ghostRectangle1 === null) {\r\n this.ghostRectangle1 = new draw2d.shape.basic.Rectangle(/*{bgColor:\"#303030\", alpha:0.1}*/) // new API with version 5.0.0\r\n // old API\r\n this.ghostRectangle1.setBackgroundColor(\"#303030\")\r\n this.ghostRectangle1.setAlpha(0.1)\r\n\r\n this.ghostRectangle2 = new draw2d.shape.basic.Rectangle(/*{dash:\"- \", stroke:1, color:\"#5497DC\", bgColor:null}*/)\r\n this.ghostRectangle2.setDashArray(\"- \")\r\n this.ghostRectangle2.setStroke(1)\r\n this.ghostRectangle2.setColor(\"#5497DC\")\r\n this.ghostRectangle2.setBackgroundColor(null)\r\n\r\n this.ghostRectangle1.setBoundingBox(this.mouseDraggingElement.getBoundingBox())\r\n this.ghostRectangle2.setBoundingBox(this.mouseDraggingElement.getBoundingBox())\r\n\r\n this.ghostRectangle1.setCanvas(canvas)\r\n this.ghostRectangle1.toFront()\r\n\r\n this.ghostRectangle2.setCanvas(canvas)\r\n this.ghostRectangle2.toFront()\r\n\r\n this.clone = this.mouseDraggingElement.clone()\r\n if (this.clone instanceof draw2d.shape.node.Node) {\r\n this.clone.resetPorts()\r\n }\r\n this.clone.setCanvas(canvas)\r\n this.clone.getShapeElement()\r\n this.clone.setAlpha(0.4)\r\n this.clone.repaint()\r\n }\r\n else {\r\n this.ghostRectangle1.translate(dx2, dy2)\r\n this.ghostRectangle2.translate(dx2, dy2)\r\n this.clone.translate(dx2, dy2)\r\n }\r\n\r\n sel.each(function (i, figure) {\r\n // store the new location in a tmp var.\r\n figure._newPos = new draw2d.geo.Point(figure.ox + dx, figure.oy + dy)\r\n\r\n // don't move the figure. This will be done in the MouseUp event\r\n //figure.onDrag(dx, dy, dx2, dy2);\r\n })\r\n }\r\n\r\n let p = canvas.fromDocumentToCanvasCoordinate(canvas.mouseDownX + (dx / canvas.zoomFactor), canvas.mouseDownY + (dy / canvas.zoomFactor))\r\n let target = canvas.getBestFigure(p.x, p.y, this.mouseDraggingElement)\r\n\r\n if (target !== canvas.currentDropTarget) {\r\n if (canvas.currentDropTarget !== null) {\r\n canvas.currentDropTarget.onDragLeave(this.mouseDraggingElement)\r\n canvas.currentDropTarget.fireEvent(\"dragLeave\", {draggingElement: this.draggingElement})\r\n canvas.currentDropTarget = null\r\n }\r\n if (target !== null) {\r\n canvas.currentDropTarget = target.delegateTarget(this.mouseDraggingElement)\r\n // inform all listener that the element has accept a dropEnter event\r\n if (canvas.currentDropTarget !== null) {\r\n canvas.currentDropTarget.onDragEnter(this.mouseDraggingElement) // legacy\r\n canvas.currentDropTarget.fireEvent(\"dragEnter\", {draggingElement: this.draggingElement})\r\n }\r\n }\r\n }\r\n }\r\n // Connection didn't support panning at the moment. There is no special reason for that. Just an interaction\r\n // decision.\r\n //\r\n else if (this.mouseDownElement !== null && !(this.mouseDownElement instanceof draw2d.Connection)) {\r\n if (this.mouseDownElement.panningDelegate !== null) {\r\n this.mouseDownElement.panningDelegate.fireEvent(\"panning\", {\r\n dx: dx,\r\n dy: dy,\r\n dx2: dx2,\r\n dy2: dy2,\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n this.mouseDownElement.panningDelegate.onPanning(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n }\r\n else {\r\n this.mouseDownElement.fireEvent(\"panning\", {\r\n dx: dx,\r\n dy: dy,\r\n dx2: dx2,\r\n dy2: dy2,\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n this.mouseDownElement.onPanning(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onMouseUp: function (canvas, x, y, shiftKey, ctrlKey) {\r\n\r\n if (this.ghostRectangle1 !== null) {\r\n this.ghostRectangle1.setCanvas(null)\r\n this.ghostRectangle1 = null\r\n this.ghostRectangle2.setCanvas(null)\r\n this.ghostRectangle2 = null\r\n this.clone.setCanvas(null)\r\n this.clone = null\r\n }\r\n\r\n if (this.mouseDraggingElement !== null) {\r\n let redrawConnection = new draw2d.util.ArrayList()\r\n if (this.mouseDraggingElement instanceof draw2d.shape.node.Node) {\r\n canvas.lineIntersections.each(function (i, inter) {\r\n if (!redrawConnection.contains(inter.line)) redrawConnection.add(inter.line)\r\n if (!redrawConnection.contains(inter.other)) redrawConnection.add(inter.other)\r\n })\r\n }\r\n\r\n\r\n // start CommandStack transaction\r\n // Trigger an update of the connections if we have move a draw2d.shape.node.Node figure.\r\n // (only \"nodes\" can have ports and connections)\r\n //\r\n canvas.getCommandStack().startTransaction()\r\n\r\n\r\n let sel = canvas.getSelection().getAll()\r\n // We move a resize handle...\r\n //\r\n if (!sel.contains(this.mouseDraggingElement)) {\r\n this.mouseDraggingElement.onDragEnd(x, y, shiftKey, ctrlKey)\r\n }\r\n // ... or a real figure.\r\n //\r\n else {\r\n canvas.getSelection().getAll().each(function (i, figure) {\r\n // set position and cleanup tmp variable\r\n if (figure._newPos) {\r\n figure.setPosition(figure._newPos)\r\n delete figure._newPos\r\n }\r\n // done\r\n figure.onDragEnd(x, y, shiftKey, ctrlKey)\r\n })\r\n }\r\n\r\n // May we drop the figure onto another shape..handle this here\r\n //\r\n if (canvas.currentDropTarget !== null && !this.mouseDraggingElement.isResizeHandle) {\r\n this.mouseDraggingElement.onDrop(canvas.currentDropTarget, x, y, shiftKey, ctrlKey)\r\n canvas.currentDropTarget.onDragLeave(this.mouseDraggingElement)\r\n canvas.currentDropTarget.onCatch(this.mouseDraggingElement, x, y, shiftKey, ctrlKey)\r\n canvas.currentDropTarget = null\r\n }\r\n\r\n // end command stack trans\r\n canvas.getCommandStack().commitTransaction()\r\n\r\n if (this.mouseDraggingElement instanceof draw2d.shape.node.Node) {\r\n canvas.lineIntersections.each((i, inter) => {\r\n if (!redrawConnection.contains(inter.line)) redrawConnection.add(inter.line)\r\n if (!redrawConnection.contains(inter.other)) redrawConnection.add(inter.other)\r\n })\r\n redrawConnection.each((i, line) => {\r\n line.svgPathString = null\r\n line.repaint()\r\n })\r\n }\r\n\r\n this.mouseDraggingElement = null\r\n }\r\n\r\n // Reset the current selection if the user click in the blank canvas.\r\n // Don't reset the selection if the user is panning the canvas\r\n //\r\n if (this.mouseDownElement === null && this.mouseMovedDuringMouseDown === false) {\r\n this.select(canvas, null)\r\n }\r\n\r\n this.mouseDownElement = null\r\n this.mouseMovedDuringMouseDown = false\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Default interface for keyboard interaction with the canvas.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n */\r\ndraw2d.policy.canvas.KeyboardPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.KeyboardPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.KeyboardPolicy\",\r\n\r\n /**\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user release a key\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onKeyUp: function (canvas, keyCode, shiftKey, ctrlKey) {\r\n // do nothing per default\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user press a key down\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onKeyDown: function (canvas, keyCode, shiftKey, ctrlKey) {\r\n // do nothing per default\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.SingleSelectionPolicy\r\n */\r\ndraw2d.policy.canvas.PanningSelectionPolicy = draw2d.policy.canvas.SingleSelectionPolicy.extend(\r\n /** @lends draw2d.policy.canvas.PanningSelectionPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.PanningSelectionPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n this._super(canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n\r\n if (this.mouseDraggingElement === null && this.mouseDownElement === null) {\r\n\r\n // check if we are dragging a port. This isn't reported by the selection handler anymore\r\n //\r\n let p = canvas.fromDocumentToCanvasCoordinate(canvas.mouseDownX + (dx / canvas.zoomFactor), canvas.mouseDownY + (dy / canvas.zoomFactor))\r\n let figure = canvas.getBestFigure(p.x, p.y)\r\n\r\n if (figure === null) {\r\n let area = canvas.getScrollArea()\r\n area.scrollTop(area.scrollTop() - dy2)\r\n area.scrollLeft(area.scrollLeft() - dx2)\r\n }\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.SelectionPolicy\r\n */\r\ndraw2d.policy.canvas.ReadOnlySelectionPolicy = draw2d.policy.canvas.SelectionPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ReadOnlySelectionPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.canvas.ReadOnlySelectionPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been installed.\r\n *\r\n * @param {draw2d.Canvas/draw2d.Canvas} canvas\r\n */\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n canvas.getAllPorts().each(function (i, port) {\r\n port.setVisible(false)\r\n })\r\n },\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been uninstalled.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n */\r\n onUninstall: function (canvas) {\r\n canvas.getAllPorts().each(function (i, port) {\r\n port.setVisible(true)\r\n })\r\n\r\n this._super(canvas)\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n let area = canvas.getScrollArea()\r\n area.scrollTop(area.scrollTop() - dy2)\r\n area.scrollLeft(area.scrollLeft() - dx2)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n */\r\ndraw2d.policy.canvas.SelectionPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SelectionPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SelectionPolicy\",\r\n\r\n /**\r\n * Creates a new selection policy\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Selects the given figure within the canvas. The policy must unselect already selected\r\n * figures or show any decorations.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {draw2d.Figure} figure\r\n *\r\n */\r\n select: function (canvas, figure) {\r\n },\r\n\r\n /**\r\n *\r\n * Unselect the given figure in the canvas and remove all resize handles\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {draw2d.Figure} figure\r\n */\r\n unselect: function (canvas, figure) {\r\n canvas.getSelection().remove(figure)\r\n\r\n figure.unselect()\r\n\r\n // @since 6.1.42\r\n canvas.fireEvent(\"unselect\", {figure: figure})\r\n }\r\n})\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Just to paint a grid in the background of a canvas.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.ShowChessboardEditPolicy());\r\n * let shape = new draw2d.shape.basic.Text({text:\"This is a simple text in a canvas with chessboard background.\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n */\r\ndraw2d.policy.canvas.ShowChessboardEditPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ShowChessboardEditPolicy.prototype */\r\n {\r\n NAME: \"draw2d.policy.canvas.ShowChessboardEditPolicy\",\r\n\r\n GRID_COLOR: \"#e0e0e0\",\r\n GRID_WIDTH: 20,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n * @param {Number} grid the grid width of the canvas\r\n */\r\n init: function (grid) {\r\n this._super()\r\n if (grid) {\r\n this.grid = grid\r\n } else {\r\n this.grid = this.GRID_WIDTH\r\n }\r\n },\r\n\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n\r\n this.oldBg = this.canvas.html.css(\"background\")\r\n this.setGrid(1/canvas.getZoom())\r\n this.onZoomCallback =(emitterFigure, zoomData) => {\r\n this.setGrid(1/zoomData.value)\r\n }\r\n canvas.on(\"zoom\", this.onZoomCallback)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n $(canvas.paper.canvas).css({\"background\": this.oldBg})\r\n canvas.off(this.onZoomCallback)\r\n },\r\n\r\n /**\r\n * Activate the grid and set the CSS properties for the SVG canvas\r\n * @private\r\n */\r\n setGrid: function(zoom){\r\n\r\n let gridColor = this.GRID_COLOR\r\n\r\n let background =\r\n `linear-gradient(45deg, ${gridColor} 25%, transparent 25%, transparent 75%, ${gridColor} 75%, ${gridColor} 100%),\\n` +\r\n `linear-gradient(45deg, ${gridColor} 25%, transparent 25%, transparent 75%, ${gridColor} 75%, ${gridColor} 100%)`\r\n let backgroundSize = `${(this.grid*2*zoom)}px ${(this.grid*2*zoom)}px`\r\n let backgroundPosition = `0 0, ${(this.grid*zoom)}px ${(this.grid*zoom)}px`\r\n\r\n $(this.canvas.paper.canvas).css({\r\n \"background\": background,\r\n \"background-size\": backgroundSize,\r\n \"background-position\": backgroundPosition\r\n })\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A canvas decoration which paints a dimetric in the background.\r\n * <br>\r\n * <br>\r\n *\r\n * @example\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.ShowDimetricGridEditPolicy());\r\n * let shape = new draw2d.shape.basic.Text({text:\"This is a simple text in a canvas with grid background.\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n */\r\ndraw2d.policy.canvas.ShowDimetricGridEditPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ShowDimetricGridEditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.canvas.ShowDimetricGridEditPolicy\",\r\n\r\n GRID_COLOR: \"#f0f0f0\",\r\n GRID_WIDTH: 30,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n * @param {Number} [grid] the grid width of the canvas\r\n */\r\n init: function (grid) {\r\n this.color = new draw2d.util.Color(this.GRID_COLOR)\r\n this.zoom = 1\r\n this.shapes = null\r\n\r\n this._super()\r\n\r\n if (typeof grid === \"number\") {\r\n this.grid = grid\r\n }\r\n else {\r\n this.grid = this.GRID_WIDTH\r\n }\r\n },\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n this.zoom = canvas.getZoom()\r\n this.setGrid(this.grid)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n if (this.shapes !== null) {\r\n this.shapes.remove()\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Set the grid color\r\n *\r\n * @param {draw2d.util.Color|String} color a color object or the CSS string declaration for a color\r\n * @since 5.0.3\r\n */\r\n setGridColor: function (color) {\r\n this.color = new draw2d.util.Color(color)\r\n this.setGrid(this.grid)\r\n },\r\n\r\n /**\r\n * \r\n * Set a new grid width/height\r\n *\r\n * @param {Number} grid\r\n * @since 5.0.3\r\n */\r\n setGrid: function (grid) {\r\n this.grid = grid\r\n\r\n if (this.canvas != null) {\r\n if (this.shapes !== null) {\r\n this.shapes.remove()\r\n }\r\n\r\n let r = this.canvas.paper\r\n let d = this.grid, i\r\n let w = r.width\r\n let h = r.height\r\n let props = {stroke: this.color.rgba()}\r\n\r\n let max = Math.sqrt(w * w + h * h)\r\n let angle26 = Math.atan(.5)\r\n let angle153 = Math.PI - angle26\r\n let cos30 = Math.cos(angle26)\r\n let sin30 = Math.sin(angle26)\r\n let cos150 = Math.cos(angle153)\r\n let sin150 = Math.sin(angle153)\r\n\r\n r.setStart()\r\n // horizontal\r\n for (i = 0; i <= w; i += d * 2) {\r\n r.path([[\"M\", i, 0], [\"L\", i + cos30 * max, sin30 * max]]).attr(props)\r\n r.path([[\"M\", i, 0], [\"L\", i + cos150 * max, sin150 * max]]).attr(props)\r\n }\r\n for (i = d; i <= h; i += d) {\r\n r.path([[\"M\", 0, i], [\"L\", cos30 * max, i + sin30 * max]]).attr(props)\r\n r.path([[\"M\", w, i], [\"L\", w + cos150 * max, i + sin150 * max]]).attr(props)\r\n }\r\n // vertical\r\n this.shapes = r.setFinish()\r\n\r\n this.shapes.toBack()\r\n }\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Paint a dotted pattern in the background of the canvas.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.ShowDotEditPolicy());\r\n * let shape = new draw2d.shape.basic.Text({text:\"This is a simple text in a canvas with dotted background.\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n * @since 4.0.1\r\n */\r\n\r\ndraw2d.policy.canvas.ShowDotEditPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ShowDotEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.ShowDotEditPolicy\",\r\n\r\n DOT_COLOR: \"#999999\",\r\n DOT_RADIUS: 1,\r\n DOT_DISTANCE: 20,\r\n\r\n /**\r\n * show a dot grid in the canvas for decoration.\r\n *\r\n * @param {Number} [dotDistance] the distance or grid width between the dots.\r\n * @param {Number} [dotRadius] the radius of the dots.\r\n * @param {draw2d.util.Color|String} [dotColor] the color for the dots.\r\n */\r\n init: function (dotDistance, dotRadius, dotColor) {\r\n this._super()\r\n\r\n this.dotDistance = dotDistance ? dotDistance : this.DOT_DISTANCE\r\n this.dotRadius = dotRadius ? dotRadius : this.DOT_RADIUS\r\n this.dotColor = new draw2d.util.Color(dotColor ? dotColor : this.DOT_COLOR)\r\n this.onZoomCallback =(emitterFigure, zoomData) => {\r\n this.setGrid(1/zoomData.value)\r\n }\r\n },\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n\r\n this.oldBg = this.canvas.html.css(\"background\")\r\n this.setGrid(1/canvas.getZoom())\r\n canvas.on(\"zoom\", this.onZoomCallback)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n $(canvas.paper.canvas).css({\"background\": this.oldBg})\r\n canvas.off(this.onZoomCallback)\r\n },\r\n\r\n /**\r\n * @private\r\n * @param {Number} zoom \r\n */\r\n setGrid: function (zoom) {\r\n let bgColor = \"#FFFFFF\"\r\n let dotColor = this.dotColor.rgba()\r\n\r\n let background = `linear-gradient(90deg, ${bgColor} ${(this.dotDistance - this.dotRadius)*zoom}px, transparent 1%) center, \r\n linear-gradient(${bgColor} ${(this.dotDistance - this.dotRadius)*zoom}px, transparent 1%) center, ${dotColor}`\r\n let backgroundSize = `${this.dotDistance*zoom}px ${this.dotDistance*zoom}px`\r\n\r\n $(this.canvas.paper.canvas).css({\r\n \"background\": background,\r\n \"background-size\": backgroundSize\r\n })\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A cavas decoration which paints a grid in the background.\r\n * <br>\r\n * <br>\r\n *\r\n * @example\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.ShowGridEditPolicy());\r\n * let shape = new draw2d.shape.basic.Text({text:\"This is a simple text in a canvas with grid background.\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.DecorationPolicy\r\n */\r\ndraw2d.policy.canvas.ShowGridEditPolicy = draw2d.policy.canvas.DecorationPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ShowGridEditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.canvas.ShowGridEditPolicy\",\r\n\r\n DEFAULTS: {\r\n width: 20,\r\n stroke: 1,\r\n color: \"#f0f0f0\",\r\n bgColor: \"#FFFFFF\"\r\n },\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n * @param {Number} [grid] the grid width of the canvas\r\n */\r\n init: function (attr) {\r\n \r\n // Merge defaults with the provided attr object\r\n const config = { ...this.DEFAULTS, ...attr };\r\n\r\n this.gridWidth = config.width;\r\n this.gridStroke = config.stroke;\r\n this.gridColor = new draw2d.util.Color(config.color);\r\n this.bgColor = config.bgColor;\r\n\r\n this._super()\r\n this.onZoomCallback =(emitterFigure, zoomData) => {\r\n this.setGrid(1/zoomData.value)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Set the grid color\r\n *\r\n * @param {draw2d.util.Color|String} color a color object or the CSS string declaration for a color\r\n * @since 5.0.3\r\n */\r\n setGridColor: function (color) {\r\n this.gridColor = new draw2d.util.Color(color)\r\n this.setGrid(1/this.canvas.getZoom())\r\n },\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n\r\n this.oldBg = this.canvas.html.css(\"background\")\r\n this.setGrid(1/canvas.getZoom())\r\n canvas.on(\"zoom\", this.onZoomCallback)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n \r\n $(canvas.paper.canvas).css({\"background\": this.oldBg})\r\n canvas.off(this.onZoomCallback)\r\n },\r\n\r\n /**\r\n * @private\r\n * @param {Number} zoom \r\n */\r\n setGrid: function (zoom) {\r\n let color = this.gridColor.rgba()\r\n\r\n let background = \r\n ` linear-gradient(to right, ${color} ${this.gridStroke}px, transparent ${this.gridStroke}px),\r\n linear-gradient(to bottom, ${color} ${this.gridStroke}px, ${this.bgColor} ${this.gridStroke}px)`\r\n let backgroundSize = `${this.gridWidth*zoom}px ${this.gridWidth*zoom}px`\r\n\r\n $(this.canvas.paper.canvas).css({\r\n \"background\": background,\r\n \"background-size\": backgroundSize\r\n })\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.SelectionPolicy\r\n */\r\ndraw2d.policy.canvas.SingleSelectionPolicy = draw2d.policy.canvas.SelectionPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SingleSelectionPolicy.prototype */\r\n {\r\n NAME: \"draw2d.policy.canvas.SingleSelectionPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function () {\r\n this._super()\r\n this.mouseMovedDuringMouseDown = false\r\n this.mouseDraggingElement = null\r\n this.mouseDownElement = null\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n select: function (canvas, figure) {\r\n if (canvas.getSelection().contains(figure)) {\r\n return // nothing to to\r\n }\r\n\r\n let oldSelection = canvas.getSelection().getPrimary()\r\n if (oldSelection) {\r\n this.unselect(canvas, oldSelection)\r\n }\r\n\r\n figure?.select(true) // primary selection\r\n\r\n canvas.getSelection().setPrimary(figure)\r\n\r\n // inform all selection listeners about the new selection.\r\n //\r\n if (oldSelection !== figure) {\r\n canvas.fireEvent(\"select\", {figure: figure, selection: canvas.getSelection()})\r\n }\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDown: function (canvas, x, y, shiftKey, ctrlKey) {\r\n this.mouseMovedDuringMouseDown = false\r\n let canDragStart = true\r\n\r\n // ignore ports since version 6.1.0. This is handled by the ConnectionCreatePolicy\r\n //\r\n let figure = canvas.getBestFigure(x, y)\r\n\r\n // may the figure is assigned to a composite. In this case the composite can\r\n // override the event receiver\r\n while (figure !== null) {\r\n let delegate = figure.getSelectionAdapter()()\r\n if (delegate === figure) {\r\n break\r\n }\r\n figure = delegate\r\n }\r\n\r\n // ignore ports since version 6.1.0. This is handled by the ConnectionCreatePolicy\r\n //\r\n if (figure instanceof draw2d.Port) {\r\n return// silently\r\n }\r\n\r\n if (figure !== null && figure.isDraggable()) {\r\n canDragStart = figure.onDragStart(x - figure.getAbsoluteX(), y - figure.getAbsoluteY(), shiftKey, ctrlKey)\r\n // Element send a veto about the drag&drop operation\r\n this.mouseDraggingElement = canDragStart === false ? null : figure\r\n }\r\n\r\n this.mouseDownElement = figure\r\n if (this.mouseDownElement !== null) {\r\n this.mouseDownElement.fireEvent(\"mousedown\", {\r\n x: x, \r\n y: y, \r\n relX: x - this.mouseDownElement.getAbsoluteX(),\r\n relY: y - this.mouseDownElement.getAbsoluteY(),\r\n shiftKey: shiftKey, \r\n ctrlKey: ctrlKey\r\n })\r\n }\r\n\r\n if (figure !== canvas.getSelection().getPrimary() && figure !== null && figure.isSelectable() === true) {\r\n this.select(canvas, figure)\r\n\r\n // it's a line\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n // you can move a line with Drag&Drop...but not a connection.\r\n // A Connection is fixed linked with the corresponding ports.\r\n //\r\n if (!(figure instanceof draw2d.Connection)) {\r\n canvas.draggingLineCommand = figure.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE))\r\n if (canvas.draggingLineCommand !== null) {\r\n canvas.draggingLine = figure\r\n }\r\n }\r\n } else if (canDragStart === false) {\r\n figure.unselect()\r\n }\r\n }\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseDrag: function (canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n\r\n this.mouseMovedDuringMouseDown = true\r\n if (this.mouseDraggingElement !== null) {\r\n\r\n // mouseDraggingElement be a ResizeHandle...in this case it is not part of the selection\r\n //\r\n let sel = canvas.getSelection()\r\n if (sel.contains(this.mouseDraggingElement)) {\r\n sel.each((i, figure) => { figure.onDrag(dx, dy, dx2, dy2, shiftKey, ctrlKey) })\r\n } else {\r\n this.mouseDraggingElement.onDrag(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n }\r\n\r\n let p = canvas.fromDocumentToCanvasCoordinate(canvas.mouseDownX + (dx / canvas.zoomFactor), canvas.mouseDownY + (dy / canvas.zoomFactor))\r\n let target = canvas.getBestFigure(p.x, p.y, this.mouseDraggingElement)\r\n\r\n if (target !== canvas.currentDropTarget) {\r\n if (canvas.currentDropTarget !== null) {\r\n canvas.currentDropTarget.onDragLeave(this.mouseDraggingElement)\r\n canvas.currentDropTarget.fireEvent(\"dragLeave\", {draggingElement: this.mouseDraggingElement})\r\n canvas.currentDropTarget = null\r\n }\r\n if (target !== null) {\r\n canvas.currentDropTarget = target.delegateTarget(this.mouseDraggingElement)\r\n // inform all listener that the element has accept the dragEnter event\r\n //\r\n if (canvas.currentDropTarget !== null) {\r\n canvas.currentDropTarget.onDragEnter(this.mouseDraggingElement) // legacy\r\n canvas.currentDropTarget.fireEvent(\"dragEnter\", {draggingElement: this.mouseDraggingElement})\r\n }\r\n }\r\n }\r\n }\r\n // Connection didn't support panning at the moment. There is no special reason for that. Just an interaction\r\n // decision.\r\n //\r\n else if (this.mouseDownElement !== null && !(this.mouseDownElement instanceof draw2d.Connection)) {\r\n if (this.mouseDownElement.panningDelegate !== null) {\r\n this.mouseDownElement.panningDelegate.fireEvent(\"panning\", {\r\n dx: dx,\r\n dy: dy,\r\n dx2: dx2,\r\n dy2: dy2,\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n this.mouseDownElement.panningDelegate.onPanning(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n } else {\r\n this.mouseDownElement.fireEvent(\"panning\", {\r\n dx: dx,\r\n dy: dy,\r\n dx2: dx2,\r\n dy2: dy2,\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n this.mouseDownElement.onPanning(dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n }\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * @param {draw2d.Canvas} canvas the related Canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (canvas, x, y, shiftKey, ctrlKey) {\r\n if (this.mouseDraggingElement !== null) {\r\n let redrawConnection = new draw2d.util.ArrayList()\r\n if (this.mouseDraggingElement instanceof draw2d.shape.node.Node) {\r\n // TODO: don't add the connections with to check if a repaint is required\r\n // may a moved connection didn't have an intersection with the named lines.\r\n // in this case a redraw is useless\r\n canvas.lineIntersections.each(function (i, inter) {\r\n if (!redrawConnection.contains(inter.line)) redrawConnection.add(inter.line)\r\n if (!redrawConnection.contains(inter.other)) redrawConnection.add(inter.other)\r\n })\r\n }\r\n\r\n // start CommandStack transaction\r\n canvas.getCommandStack().startTransaction()\r\n\r\n let sel = canvas.getSelection().getAll()\r\n if (!sel.contains(this.mouseDraggingElement)) {\r\n this.mouseDraggingElement.onDragEnd(x, y, shiftKey, ctrlKey)\r\n } else {\r\n canvas.getSelection().getAll().each(function (i, figure) {\r\n figure.onDragEnd(x, y, shiftKey, ctrlKey)\r\n })\r\n }\r\n\r\n if (canvas.currentDropTarget !== null && !this.mouseDraggingElement.isResizeHandle) {\r\n this.mouseDraggingElement.onDrop(canvas.currentDropTarget, x, y, shiftKey, ctrlKey)\r\n canvas.currentDropTarget.onDragLeave(this.mouseDraggingElement)\r\n canvas.currentDropTarget.fireEvent(\"dragLeave\", {draggingElement: this.mouseDraggingElement})\r\n canvas.currentDropTarget.onCatch(this.mouseDraggingElement, x, y, shiftKey, ctrlKey)\r\n canvas.currentDropTarget = null\r\n }\r\n\r\n // end command stack trans\r\n canvas.getCommandStack().commitTransaction()\r\n\r\n if (this.mouseDraggingElement instanceof draw2d.shape.node.Node) {\r\n canvas.lineIntersections.each(function (i, inter) {\r\n if (!redrawConnection.contains(inter.line)) redrawConnection.add(inter.line)\r\n if (!redrawConnection.contains(inter.other)) redrawConnection.add(inter.other)\r\n })\r\n redrawConnection.each(function (i, line) {\r\n line.svgPathString = null\r\n line.repaint()\r\n })\r\n }\r\n\r\n this.mouseDraggingElement = null\r\n }\r\n // Connection didn't support panning at the moment. There is no special reason for that. Just an interaction\r\n // decision.\r\n //\r\n else if (this.mouseDownElement !== null && !(this.mouseDownElement instanceof draw2d.Connection)) {\r\n if (this.mouseDownElement.panningDelegate !== null) {\r\n this.mouseDownElement.panningDelegate.fireEvent(\"panningEnd\")\r\n this.mouseDownElement.panningDelegate.onPanningEnd()\r\n } else {\r\n this.mouseDownElement.fireEvent(\"panningEnd\")\r\n this.mouseDownElement.onPanningEnd()\r\n }\r\n }\r\n\r\n // Reset the current selection if the user click in the blank canvas.\r\n // Don't reset the selection if the user pan the canvas\r\n //\r\n if (this.mouseDownElement === null && this.mouseMovedDuringMouseDown === false) {\r\n this.select(canvas, null)\r\n }\r\n\r\n this.mouseDownElement?.fireEvent(\"mouseup\", {\r\n x: x, \r\n y: y, \r\n relX: x - this.mouseDownElement.getAbsoluteX(),\r\n relY: y - this.mouseDownElement.getAbsoluteY(),\r\n shiftKey: shiftKey, \r\n ctrlKey: ctrlKey\r\n })\r\n\r\n this.mouseDownElement = null\r\n this.mouseMovedDuringMouseDown = false\r\n },\r\n\r\n /**\r\n *\r\n * Called by the canvas if the user click on a figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure under the click event. Can be null\r\n * @param {Number} mouseX the x coordinate of the mouse during the click event\r\n * @param {Number} mouseY the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 3.0.0\r\n */\r\n onClick: function (figure, mouseX, mouseY, shiftKey, ctrlKey) {\r\n if (figure !== null) {\r\n figure.fireEvent(\"click\", {\r\n figure: figure,\r\n x: mouseX,\r\n y: mouseY,\r\n relX: mouseX - figure.getAbsoluteX(),\r\n relY: mouseY - figure.getAbsoluteY(),\r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n\r\n figure.onClick()\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Called by the canvas if the user double click on a figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure under the double click event. Can be null\r\n * @param {Number} mouseX the x coordinate of the mouse during the click event\r\n * @param {Number} mouseY the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 4.1.0\r\n */\r\n onDoubleClick: function (figure, mouseX, mouseY, shiftKey, ctrlKey) {\r\n if (figure !== null) {\r\n figure.fireEvent(\"dblclick\", \r\n {\r\n x: mouseX, \r\n y: mouseY, \r\n relX: mouseX - figure.getAbsoluteX(),\r\n relY: mouseX - figure.getAbsoluteY(), \r\n shiftKey: shiftKey,\r\n ctrlKey: ctrlKey\r\n })\r\n figure.onDoubleClick()\r\n }\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Snapping is based on the existing children of a container. When snapping a shape,\r\n * the center of the bounding box will snap to the center of other figures of the given canvas.\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.SnapToEditPolicy\r\n * @since 5.6.4\r\n */\r\ndraw2d.policy.canvas.SnapToCenterEditPolicy = draw2d.policy.canvas.SnapToEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToCenterEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToCenterEditPolicy\",\r\n\r\n SNAP_THRESHOLD: 5,\r\n FADEOUT_DURATION: 500,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to geometry\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.centers = null\r\n\r\n this.horizontalGuideLines = null\r\n this.verticalGuideLines = null\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Figure} figure the shape below the mouse or null\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (figure, x, y, shiftKey, ctrlKey) {\r\n this.centers = null\r\n this.hideHorizontalGuides(false)\r\n this.hideVerticalGuides(false)\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the coordinates to the canvas neighbours\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // do nothing for resize handles\r\n if (figure instanceof draw2d.ResizeHandle) {\r\n return modifiedPos\r\n }\r\n\r\n // do nothing for lines\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n return modifiedPos\r\n }\r\n\r\n\r\n let allowXChanges = modifiedPos.x === originalPos.x\r\n let allowYChanges = modifiedPos.y === originalPos.y\r\n\r\n let inputBounds = new draw2d.geo.Rectangle(modifiedPos.x, modifiedPos.y, figure.getWidth(), figure.getHeight())\r\n let inputCenter = inputBounds.getCenter()\r\n\r\n modifiedPos = modifiedPos.clone()\r\n\r\n if (allowXChanges === true) {\r\n let horizontal = this.snapHorizontal(inputCenter)\r\n\r\n // Show a horizontal line if the snapper has modified the inputPoint\r\n //\r\n if (horizontal.snapped) {\r\n // show the snap lines..\r\n this.showHorizontalGuides(figure, horizontal)\r\n\r\n // and snap the x coordinate\r\n modifiedPos.y += horizontal.diff\r\n }\r\n else {\r\n this.hideHorizontalGuides(true)\r\n }\r\n }\r\n else {\r\n this.hideHorizontalGuides(true)\r\n }\r\n\r\n if (allowYChanges === true) {\r\n let vertical = this.snapVertical(inputCenter)\r\n\r\n // Show a vertical guides if the snapper has modified the inputPoint\r\n //\r\n if (vertical.snapped) {\r\n // show the snap lines..\r\n this.showVerticalGuides(figure, vertical)\r\n\r\n // and snap the x coordinate\r\n modifiedPos.x += vertical.diff\r\n }\r\n else {\r\n this.hideVerticalGuides(true)\r\n }\r\n }\r\n else {\r\n this.hideVerticalGuides(true)\r\n }\r\n\r\n return modifiedPos\r\n },\r\n\r\n\r\n snapVertical: function (center) {\r\n let _this = this\r\n if (this.centers === null) {\r\n this.populateCenters()\r\n }\r\n\r\n let result = {\r\n point: center,\r\n snapped: false,\r\n diff: 0\r\n }\r\n\r\n\r\n let candidates = []\r\n this.centers.forEach( (point) =>{\r\n if (Math.abs(point.x - center.x) < _this.SNAP_THRESHOLD) {\r\n candidates.push(point)\r\n }\r\n })\r\n\r\n // we can abort if we didn't find an intersection on the right hand side\r\n if (candidates.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greatest X coordinate\r\n //\r\n candidates.sort( (a, b) => a.x - b.x )\r\n\r\n let diff = candidates[0].x - center.x\r\n let snappedPoint = center.clone()\r\n snappedPoint.x += diff\r\n return {snapped: true, diff: diff, point: candidates[0], snappedPoint: snappedPoint}\r\n },\r\n\r\n\r\n snapHorizontal: function (center) {\r\n let _this = this\r\n if (this.centers === null) {\r\n this.populateCenters()\r\n }\r\n\r\n let result = {\r\n point: center,\r\n snapped: false,\r\n diff: 0\r\n }\r\n\r\n\r\n let candidates = []\r\n this.centers.forEach( (point) => {\r\n if (Math.abs(point.y - center.y) < _this.SNAP_THRESHOLD) {\r\n candidates.push(point)\r\n }\r\n })\r\n\r\n // we can abort if we didn't find an intersection on the right hand side\r\n if (candidates.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greatest X coordinate\r\n //\r\n candidates.sort( (a, b) => a.y - b.y)\r\n\r\n let diff = candidates[0].y - center.y\r\n let snappedPoint = center.clone()\r\n snappedPoint.y += diff\r\n return {snapped: true, diff: diff, point: candidates[0], snappedPoint: snappedPoint}\r\n },\r\n\r\n populateCenters: function () {\r\n let selection = this.canvas.getSelection().getAll(true)\r\n let centers = this.centers = []\r\n\r\n let figures = this.canvas.getFigures()\r\n figures.each( (index, figure) =>{\r\n if (!selection.contains(figure)) {\r\n centers.push(figure.getBoundingBox().getCenter())\r\n }\r\n })\r\n },\r\n\r\n showHorizontalGuides: function (causedFigure, constraint) {\r\n if (this.horizontalGuideLines !== null) {\r\n this.horizontalGuideLines.stop()\r\n this.horizontalGuideLines.remove()\r\n }\r\n\r\n let start = constraint.point\r\n let end = constraint.snappedPoint\r\n\r\n this.canvas.paper.setStart()\r\n\r\n // horizontal lines\r\n //\r\n this.canvas.paper\r\n .path(\r\n \"M \" + (start.x) + \" \" + ((start.y | 0) + 0.5) + \" L \" + (end.x) + \" \" + ((end.y | 0) + 0.5))\r\n .attr({\r\n \"stroke\": this.lineColor.rgba(),\r\n \"stroke-width\": 1\r\n })\r\n\r\n this.horizontalGuideLines = this.canvas.paper.setFinish()\r\n this.horizontalGuideLines.toFront()\r\n },\r\n\r\n /**\r\n *\r\n * Hide the horizontal snapping guides\r\n *\r\n * @param {Boolean} fast\r\n */\r\n hideHorizontalGuides: function (fast) {\r\n if (this.horizontalGuideLines === null) {\r\n return\r\n }\r\n if (fast === true) {\r\n if (this.horizontalGuideLines !== null) {\r\n this.horizontalGuideLines.remove()\r\n this.horizontalGuideLines = null\r\n }\r\n }\r\n else {\r\n this.horizontalGuideLines.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.horizontalGuideLines !== null) {\r\n this.horizontalGuideLines.remove()\r\n this.horizontalGuideLines = null\r\n }\r\n }\r\n )\r\n }\r\n },\r\n\r\n\r\n showVerticalGuides: function (causedFigure, constraint) {\r\n if (this.verticalGuideLines !== null) {\r\n this.verticalGuideLines.stop()\r\n this.verticalGuideLines.remove()\r\n }\r\n\r\n let start = constraint.point\r\n let end = constraint.snappedPoint\r\n\r\n this.canvas.paper.setStart()\r\n\r\n // horizontal lines\r\n //\r\n this.canvas.paper\r\n .path(\r\n \"M \" + ((start.x | 0) + 0.5) + \" \" + (start.y) + \" L \" + ((end.x | 0) + 0.5) + \" \" + (end.y))\r\n .attr({\r\n \"stroke\": this.lineColor.rgba(),\r\n \"stroke-width\": 1\r\n })\r\n\r\n\r\n this.verticalGuideLines = this.canvas.paper.setFinish()\r\n this.verticalGuideLines.toFront()\r\n },\r\n\r\n /**\r\n *\r\n * Hide the horizontal snapüing guides\r\n *\r\n * @param soft\r\n */\r\n hideVerticalGuides: function (fast) {\r\n if (this.verticalGuideLines === null) {\r\n return\r\n }\r\n if (fast === true) {\r\n if (this.verticalGuideLines !== null) {\r\n this.verticalGuideLines.remove()\r\n this.verticalGuideLines = null\r\n }\r\n }\r\n else {\r\n this.verticalGuideLines.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.verticalGuideLines !== null) {\r\n this.verticalGuideLines.remove()\r\n this.verticalGuideLines = null\r\n }\r\n }\r\n )\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A helper used to perform snapping to a grid, which is specified on the canvas via the various\r\n * properties defined in this class.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.ShowDimetricGridEditPolicy\r\n */\r\ndraw2d.policy.canvas.SnapToDimetricGridEditPolicy = draw2d.policy.canvas.ShowDimetricGridEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToDimetricGridEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToDimetricGridEditPolicy\",\r\n\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n * @param {Number} grid the grid width of the canvas\r\n */\r\n init: function (grid) {\r\n this._super(grid)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Applies a snapping correction to the given result.\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n * @since 2.3.0\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // do nothing for lines\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n return modifiedPos\r\n }\r\n\r\n let snapPoint = figure.getSnapToGridAnchor()\r\n\r\n modifiedPos.x = modifiedPos.x + snapPoint.x\r\n modifiedPos.y = modifiedPos.y + snapPoint.y\r\n\r\n let g = this.grid / 5\r\n\r\n modifiedPos.x = g * Math.floor(((modifiedPos.x + g / 2.0) / g))\r\n modifiedPos.y = g * Math.floor(((modifiedPos.y + g / 2.0) / g))\r\n\r\n modifiedPos.x = modifiedPos.x - snapPoint.x\r\n modifiedPos.y = modifiedPos.y - snapPoint.y\r\n\r\n return modifiedPos\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\ndraw2d.SnapToHelper = {}\r\n\r\ndraw2d.SnapToHelper.NORTH = 1\r\ndraw2d.SnapToHelper.SOUTH = 4\r\ndraw2d.SnapToHelper.WEST = 8\r\ndraw2d.SnapToHelper.EAST = 16\r\ndraw2d.SnapToHelper.CENTER_H = 32\r\ndraw2d.SnapToHelper.CENTER_V = 642\r\n\r\ndraw2d.SnapToHelper.NORTH_EAST = draw2d.SnapToHelper.NORTH | draw2d.SnapToHelper.EAST\r\ndraw2d.SnapToHelper.NORTH_WEST = draw2d.SnapToHelper.NORTH | draw2d.SnapToHelper.WEST\r\ndraw2d.SnapToHelper.SOUTH_EAST = draw2d.SnapToHelper.SOUTH | draw2d.SnapToHelper.EAST\r\ndraw2d.SnapToHelper.SOUTH_WEST = draw2d.SnapToHelper.SOUTH | draw2d.SnapToHelper.WEST\r\ndraw2d.SnapToHelper.NORTH_SOUTH = draw2d.SnapToHelper.NORTH | draw2d.SnapToHelper.SOUTH\r\ndraw2d.SnapToHelper.EAST_WEST = draw2d.SnapToHelper.EAST | draw2d.SnapToHelper.WEST\r\ndraw2d.SnapToHelper.NSEW = draw2d.SnapToHelper.NORTH_SOUTH | draw2d.SnapToHelper.EAST_WEST\r\n\r\n/**\r\n * @class\r\n *\r\n * A helper used by Tools for snapping certain mouse interactions.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n */\r\ndraw2d.policy.canvas.SnapToEditPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToEditPolicy\",\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this.lineColor = null\r\n\r\n this._super(\r\n {\r\n lineColor: \"#51C1FC\",\r\n ...attr\r\n },\r\n {\r\n // @attr {draw2d.util.Color} color the line color of the snapTo lines */\r\n lineColor: this.setLineColor,\r\n ...setter},\r\n {\r\n lineColor: this.getLineColor,\r\n ...getter})\r\n },\r\n\r\n /**\r\n *\r\n * Set the color of the snap line.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * policy.attr({\r\n * lineColor: color\r\n * });\r\n *\r\n * @param {draw2d.util.Color|String} color The new color of the line.\r\n **/\r\n setLineColor: function (color) {\r\n this.lineColor = new draw2d.util.Color(color)\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the current paint color.\r\n *\r\n * @returns {draw2d.util.Color} The paint color of the line.\r\n * @since 5.6.1\r\n **/\r\n getLineColor: function () {\r\n return this.lineColor\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Adjust the coordinates to the given constraint of the policy.\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n return modifiedPos\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Snapping is based on the existing children of a container. When snapping a shape,\r\n * the edges of the bounding box will snap to edges of other rectangles generated\r\n * from the children of the given canvas.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.SnapToEditPolicy\r\n */\r\ndraw2d.policy.canvas.SnapToGeometryEditPolicy = draw2d.policy.canvas.SnapToEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToGeometryEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToGeometryEditPolicy\",\r\n\r\n SNAP_THRESHOLD: 3,\r\n FADEOUT_DURATION: 300,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to geometry\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.rows = null\r\n this.cols = null\r\n this.vline = null\r\n this.hline = null\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Figure} figure the shape below the mouse or null\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (figure, x, y, shiftKey, ctrlKey) {\r\n this.rows = null\r\n this.cols = null\r\n this.hideVerticalLine()\r\n this.hideHorizontalLine()\r\n },\r\n\r\n /**\r\n * \r\n * Adjust the coordinates to the canvas neighbours\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // do nothing for lines\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n return modifiedPos\r\n }\r\n\r\n let result\r\n let allowXChanges = modifiedPos.x === originalPos.x\r\n let allowYChanges = modifiedPos.y === originalPos.y\r\n\r\n // Coordinates already snapped to an x/y coordinate.\r\n // Don't change them and in this case no further calculation is requried.\r\n //\r\n if (!allowXChanges && !allowYChanges) {\r\n return modifiedPos\r\n }\r\n\r\n if (figure instanceof draw2d.ResizeHandle) {\r\n let snapPoint = figure.getSnapToGridAnchor()\r\n modifiedPos.x += snapPoint.x\r\n modifiedPos.y += snapPoint.y\r\n\r\n let snapDirections = figure.getSnapToDirection()\r\n result = this.snapPoint(snapDirections, modifiedPos)\r\n\r\n // Show a vertical line if the snapper has modified the inputPoint\r\n //\r\n if (allowXChanges && (snapDirections & draw2d.SnapToHelper.EAST_WEST) && !(result.edge & draw2d.SnapToHelper.EAST_WEST)) {\r\n this.showVerticalLine(figure, draw2d.SnapToHelper.WEST, result.point.x)\r\n }\r\n else {\r\n this.hideVerticalLine()\r\n }\r\n\r\n // Show a horizontal line if the snapper has modified the inputPoint\r\n //\r\n if (allowYChanges && (snapDirections & draw2d.SnapToHelper.NORTH_SOUTH) && !(result.edge & draw2d.SnapToHelper.NORTH_SOUTH)) {\r\n this.showHorizontalLine(figure, draw2d.SnapToHelper.NORTH, result.point.y)\r\n }\r\n else {\r\n this.hideHorizontalLine()\r\n }\r\n\r\n // restore the original pos coordinate if x or y coordinate already snapped to any axis\r\n // or subtract the added snapOffset\r\n //\r\n result.point.x = allowXChanges ? result.point.x - snapPoint.x : modifiedPos.x\r\n result.point.y = allowYChanges ? result.point.y - snapPoint.y : modifiedPos.y\r\n\r\n return result.point\r\n }\r\n\r\n // The user drag&drop a normal figure\r\n let inputBounds = new draw2d.geo.Rectangle(modifiedPos.x, modifiedPos.y, figure.getWidth(), figure.getHeight())\r\n\r\n result = this.snapRectangle(inputBounds)\r\n\r\n if (!allowXChanges) {\r\n result.bounds.x = modifiedPos.x\r\n }\r\n\r\n if (!allowYChanges) {\r\n result.bounds.y = modifiedPos.y\r\n }\r\n\r\n // Show a vertical line if the snapper has modified the inputPoint\r\n //\r\n if (allowXChanges && !(result.edge & draw2d.SnapToHelper.WEST)) {\r\n this.showVerticalLine(figure, draw2d.SnapToHelper.WEST, result.bounds.x)\r\n }\r\n else if (allowXChanges && !(result.edge & draw2d.SnapToHelper.EAST)) {\r\n this.showVerticalLine(figure, draw2d.SnapToHelper.EAST, result.bounds.x + result.bounds.getWidth())\r\n }\r\n else {\r\n this.hideVerticalLine()\r\n }\r\n\r\n\r\n // Show a horizontal line if the snapper has modified the inputPoint\r\n //\r\n if (allowYChanges && !(result.edge & draw2d.SnapToHelper.NORTH)) {\r\n this.showHorizontalLine(figure, draw2d.SnapToHelper.NORTH, result.bounds.y)\r\n }\r\n else if (allowYChanges && !(result.edge & draw2d.SnapToHelper.SOUTH)) {\r\n this.showHorizontalLine(figure, draw2d.SnapToHelper.SOUTH, result.bounds.y + result.bounds.getHeight())\r\n }\r\n else {\r\n this.hideHorizontalLine()\r\n }\r\n\r\n return result.bounds.getTopLeft()\r\n },\r\n\r\n /**\r\n * \r\n * calculates the snapped position of the rectangle.\r\n *\r\n * @param {draw2d.geo.Rectangle} inputBounds\r\n *\r\n * @returns {Object}\r\n */\r\n snapRectangle: function (inputBounds) {\r\n let resultBounds = inputBounds.clone()\r\n\r\n let topLeft = this.snapPoint(draw2d.SnapToHelper.NORTH_WEST, inputBounds.getTopLeft())\r\n resultBounds.x = topLeft.point.x\r\n resultBounds.y = topLeft.point.y\r\n\r\n let bottomRight = this.snapPoint(draw2d.SnapToHelper.SOUTH_EAST, inputBounds.getBottomRight())\r\n\r\n // The first test (topLeft) has not modified the point. so we can modify them with the bottomRight adjustment\r\n //\r\n if (topLeft.edge & draw2d.SnapToHelper.WEST) {\r\n resultBounds.x = bottomRight.point.x - inputBounds.getWidth()\r\n }\r\n\r\n // The first test (topLeft) has not modified the point. so we can modify them with the bottomRight adjustment\r\n //\r\n if (topLeft.edge & draw2d.SnapToHelper.NORTH) {\r\n resultBounds.y = bottomRight.point.y - inputBounds.getHeight()\r\n }\r\n\r\n return {edge: topLeft.edge | bottomRight.edge, bounds: resultBounds}\r\n },\r\n\r\n snapPoint: function (/*:int*/ snapOrientation, /*:draw2d.Point*/ inputPoint) {\r\n let resultPoint = inputPoint.clone()\r\n\r\n if (this.rows === null || this.cols === null)\r\n this.populateRowsAndCols()\r\n\r\n if ((snapOrientation & draw2d.SnapToHelper.EAST) !== 0) {\r\n let rightCorrection = this.getCorrectionFor(this.cols, inputPoint.x + 1, 1)\r\n if (rightCorrection !== this.SNAP_THRESHOLD) {\r\n snapOrientation &= ~draw2d.SnapToHelper.EAST\r\n resultPoint.x += rightCorrection\r\n }\r\n }\r\n\r\n if ((snapOrientation & draw2d.SnapToHelper.WEST) !== 0) {\r\n let leftCorrection = this.getCorrectionFor(this.cols, inputPoint.x, -1)\r\n if (leftCorrection !== this.SNAP_THRESHOLD) {\r\n snapOrientation &= ~draw2d.SnapToHelper.WEST\r\n resultPoint.x += leftCorrection\r\n }\r\n }\r\n\r\n if ((snapOrientation & draw2d.SnapToHelper.SOUTH) !== 0) {\r\n let bottomCorrection = this.getCorrectionFor(this.rows, inputPoint.y + 1, 1)\r\n if (bottomCorrection !== this.SNAP_THRESHOLD) {\r\n snapOrientation &= ~draw2d.SnapToHelper.SOUTH\r\n resultPoint.y += bottomCorrection\r\n }\r\n }\r\n\r\n if ((snapOrientation & draw2d.SnapToHelper.NORTH) !== 0) {\r\n let topCorrection = this.getCorrectionFor(this.rows, inputPoint.y, -1)\r\n if (topCorrection !== this.SNAP_THRESHOLD) {\r\n snapOrientation &= ~draw2d.SnapToHelper.NORTH\r\n resultPoint.y += topCorrection\r\n }\r\n }\r\n\r\n return {edge: snapOrientation, point: resultPoint}\r\n },\r\n\r\n populateRowsAndCols: function () {\r\n let selection = this.canvas.getSelection()\r\n this.rows = []\r\n this.cols = []\r\n\r\n let figures = this.canvas.getFigures()\r\n for (let i = 0; i < figures.getSize(); i++) {\r\n let figure = figures.get(i)\r\n if (!selection.contains(figure, true)) {\r\n let bounds = figure.getBoundingBox()\r\n this.cols.push({type: -1, location: bounds.x})\r\n this.cols.push({type: 0, location: bounds.x + (bounds.w - 1) / 2})\r\n this.cols.push({type: 1, location: bounds.getRight() + 1})\r\n this.rows.push({type: -1, location: bounds.y})\r\n this.rows.push({type: 0, location: bounds.y + (bounds.h - 1) / 2})\r\n this.rows.push({type: 1, location: bounds.getBottom() + 1})\r\n }\r\n }\r\n\r\n // TODO: remove duplicate entries in the rows/cols array\r\n\r\n },\r\n\r\n getCorrectionFor: function (/*:Array*/ entries, /*:double*/ value, /*:int*/ side) {\r\n let resultMag = this.SNAP_THRESHOLD\r\n let result = this.SNAP_THRESHOLD\r\n\r\n for (let i = 0; i < entries.length; i++) {\r\n let entry = entries[i]\r\n let magnitude\r\n\r\n if (entry.type === -1 && side !== 0) {\r\n magnitude = Math.abs(value - entry.location)\r\n if (magnitude < resultMag) {\r\n resultMag = magnitude\r\n result = entry.location - value\r\n }\r\n }\r\n else if (entry.type === 0 && side === 0) {\r\n magnitude = Math.abs(value - entry.location)\r\n if (magnitude < resultMag) {\r\n resultMag = magnitude\r\n result = entry.location - value\r\n }\r\n }\r\n else if (entry.type === 1 && side !== 0) {\r\n magnitude = Math.abs(value - entry.location)\r\n if (magnitude < resultMag) {\r\n resultMag = magnitude\r\n result = entry.location - value\r\n }\r\n }\r\n }\r\n return result\r\n },\r\n\r\n showVerticalLine: function (causedFigure, edge, x) {\r\n if (this.vline != null) {\r\n this.vline.stop()\r\n this.vline.remove()\r\n }\r\n\r\n let figures = this.canvas.getFigures().clone()\r\n figures.removeAll(this.canvas.getSelection().getAll(true))\r\n figures.map(function (figure) {\r\n return figure.getBoundingBox()\r\n })\r\n figures.grep(function (bbox) {\r\n return (Math.abs(bbox.x - x) <= 1) || (Math.abs(bbox.getRight() - x) <= 1)\r\n })\r\n\r\n // return silently if no figure bounding box is left\r\n //\r\n if (figures.getSize() === 0) {\r\n return\r\n }\r\n\r\n // figure to align is above the current shape\r\n //\r\n let causedBox = causedFigure.getBoundingBox()\r\n let causedCenter = causedBox.getCenter()\r\n figures.sort(function (a, b) {\r\n let d_a = a.getCenter().distance(causedCenter)\r\n let d_b = b.getCenter().distance(causedCenter)\r\n return d_a - d_b\r\n })\r\n let fromY = 0\r\n let maxLength = this.canvas.getHeight() * Math.max(1, this.canvas.getZoom())\r\n let yLength = maxLength\r\n let snappedBox = figures.get(0)\r\n if (causedBox.y < snappedBox.y) {\r\n fromY = causedBox.y\r\n yLength = snappedBox.getBottom() - causedBox.y\r\n }\r\n else {\r\n fromY = snappedBox.y\r\n yLength = causedBox.getBottom() - snappedBox.y\r\n }\r\n\r\n x = (x | 0) + 0.5 // force a .5 number to avoid subpixel rendering. Blurry lines...\r\n this.canvas.paper.setStart()\r\n this.canvas.paper.path(\"M \" + x + \" 0 l 0 \" + maxLength)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + x + \" \" + fromY + \" l 0 \" + yLength)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.vline = this.canvas.paper.setFinish()\r\n this.vline.toBack()\r\n },\r\n\r\n hideVerticalLine: function () {\r\n if (this.vline == null) {\r\n return\r\n }\r\n this.vline.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.vline !== null) {\r\n this.vline.remove()\r\n this.vline = null\r\n }\r\n }\r\n )\r\n },\r\n\r\n showHorizontalLine: function (causedFigure, edge, y) {\r\n if (this.hline != null) {\r\n this.hline.stop()\r\n this.hline.remove()\r\n }\r\n\r\n let figures = this.canvas.getFigures().clone()\r\n figures.removeAll(this.canvas.getSelection().getAll(true))\r\n figures.map(function (figure) {\r\n return figure.getBoundingBox()\r\n })\r\n figures.grep(function (bbox) {\r\n return (Math.abs(bbox.y - y) <= 1) || (Math.abs(bbox.getBottom() - y) <= 1)\r\n })\r\n\r\n // return silently if no figure bounding box is left\r\n //\r\n if (figures.getSize() === 0) {\r\n return\r\n }\r\n\r\n // figure to align is above the current shape\r\n //\r\n let causedBox = causedFigure.getBoundingBox()\r\n let causedCenter = causedBox.getCenter()\r\n figures.sort(function (a, b) {\r\n let d_a = a.getCenter().distance(causedCenter)\r\n let d_b = b.getCenter().distance(causedCenter)\r\n return d_a - d_b\r\n })\r\n let fromX = 0\r\n let maxLength\r\n let xLength = maxLength = this.canvas.getWidth() * Math.max(1, this.canvas.getZoom())\r\n let snappedBox = figures.get(0)\r\n if (causedBox.x < snappedBox.x) {\r\n fromX = causedBox.x\r\n xLength = snappedBox.getRight() - causedBox.x\r\n }\r\n else {\r\n fromX = snappedBox.x\r\n xLength = causedBox.getRight() - snappedBox.x\r\n }\r\n\r\n\r\n y = (y | 0) + 0.5 // force a .5 number to avoid subpixel rendering. Blurry lines...\r\n\r\n this.canvas.paper.setStart()\r\n this.canvas.paper.path(\"M 0 \" + y + \" l \" + maxLength + \" 0\")\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + fromX + \" \" + y + \" l \" + xLength + \" 0\")\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.hline = this.canvas.paper.setFinish()\r\n this.hline.toBack()\r\n\r\n },\r\n\r\n hideHorizontalLine: function () {\r\n if (this.hline === null) {\r\n return //silently\r\n }\r\n this.hline.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.hline !== null) {\r\n this.hline.remove()\r\n this.hline = null\r\n }\r\n }\r\n )\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A helper used to perform snapping to a grid, which is specified on the canvas via the various\r\n * properties defined in this class.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.ShowGridEditPolicy\r\n */\r\ndraw2d.policy.canvas.SnapToGridEditPolicy = draw2d.policy.canvas.SnapToEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToGridEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToGridEditPolicy\",\r\n\r\n\r\n /**\r\n * Creates a new constraint policy for snap to grid\r\n *\r\n * @param {Number} grid the grid width of the canvas\r\n */\r\n init: function (grid, showGrid) {\r\n this._super()\r\n this.grid = grid || 20\r\n\r\n // Default Value for \"showGrid=true\"\r\n if (typeof showGrid ===\"undefined\" || showGrid===true) {\r\n this.renderer = new draw2d.policy.canvas.ShowGridEditPolicy({width: this.grid})\r\n }\r\n },\r\n\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n if (this.renderer) this.renderer.onInstall(canvas)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n if (this.renderer) this.renderer.onUninstall(canvas)\r\n },\r\n\r\n /**\r\n *\r\n * Set a new grid width/height\r\n *\r\n * @param {Number} grid\r\n * @since 5.0.3\r\n */\r\n setGrid: function (grid) {\r\n this.grid = grid\r\n if (this.renderer) this.renderer.setGrid(grid)\r\n },\r\n\r\n /**\r\n *\r\n * Applies a snapping correction to the given result.\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n * @since 2.3.0\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // do nothing for lines\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n return modifiedPos\r\n }\r\n\r\n let snapPoint = figure.getSnapToGridAnchor()\r\n\r\n modifiedPos.x = modifiedPos.x + snapPoint.x\r\n modifiedPos.y = modifiedPos.y + snapPoint.y\r\n\r\n\r\n modifiedPos.x = this.grid * Math.floor(((modifiedPos.x + this.grid / 2.0) / this.grid))\r\n modifiedPos.y = this.grid * Math.floor(((modifiedPos.y + this.grid / 2.0) / this.grid))\r\n\r\n modifiedPos.x = modifiedPos.x - snapPoint.x\r\n modifiedPos.y = modifiedPos.y - snapPoint.y\r\n\r\n return modifiedPos\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Snapping is based on the existing children of a container. When snapping a shape,\r\n * the edges of the bounding box will snap to edges of other rectangles generated\r\n * from the children of the given canvas.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.SnapToEditPolicy\r\n * @since 5.6.4\r\n */\r\ndraw2d.policy.canvas.SnapToInBetweenEditPolicy = draw2d.policy.canvas.SnapToEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToInBetweenEditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.canvas.SnapToInBetweenEditPolicy\",\r\n\r\n SNAP_THRESHOLD: 5,\r\n FADEOUT_DURATION: 500,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to geometry\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this._super(attr, setter, getter)\r\n\r\n this.bounds = null\r\n\r\n this.horizontalGuideLines = null\r\n this.verticalGuideLines = null\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseUp: function (figure, x, y, shiftKey, ctrlKey) {\r\n this.bounds = null\r\n this.hideHorizontalGuides(false)\r\n this.hideVerticalGuides(false)\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the coordinates to the canvas neighbours\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // do nothing for resize handles\r\n if (figure instanceof draw2d.ResizeHandle) {\r\n return modifiedPos\r\n }\r\n // do nothing for lines\r\n if (figure instanceof draw2d.shape.basic.Line) {\r\n return modifiedPos\r\n }\r\n\r\n\r\n var allowXChanges = modifiedPos.x === originalPos.x\r\n var allowYChanges = modifiedPos.y === originalPos.y\r\n\r\n var inputBounds = new draw2d.geo.Rectangle(modifiedPos.x, modifiedPos.y, figure.getWidth(), figure.getHeight())\r\n\r\n modifiedPos = modifiedPos.clone()\r\n\r\n if (allowXChanges === true) {\r\n var horizontal = this.snapHorizontal(inputBounds)\r\n\r\n // Show a horizontal line if the snapper has modified the inputPoint\r\n //\r\n if (horizontal.snapped) {\r\n // show the snap lines..\r\n this.showHorizontalGuides(figure, horizontal)\r\n\r\n // and snap the x coordinate\r\n modifiedPos.x += horizontal.diff\r\n }\r\n else {\r\n this.hideHorizontalGuides(true)\r\n }\r\n }\r\n else {\r\n this.hideHorizontalGuides(true)\r\n }\r\n\r\n if (allowYChanges === true) {\r\n var vertical = this.snapVertical(inputBounds)\r\n\r\n // Show a vertical guides if the snapper has modified the inputPoint\r\n //\r\n if (vertical.snapped) {\r\n // show the snap lines..\r\n this.showVerticalGuides(figure, vertical)\r\n\r\n // and snap the x coordinate\r\n modifiedPos.y += vertical.diff\r\n }\r\n else {\r\n this.hideVerticalGuides(true)\r\n }\r\n }\r\n else {\r\n this.hideVerticalGuides(true)\r\n }\r\n\r\n return modifiedPos\r\n },\r\n\r\n\r\n snapHorizontal: function (boundingBox) {\r\n var center = boundingBox.getCenter()\r\n if (this.bounds === null)\r\n this.populateBounds()\r\n\r\n var result = {\r\n point: center,\r\n snapped: false,\r\n snappedBox: boundingBox.clone()\r\n }\r\n\r\n\r\n var intersectionPoint = null\r\n\r\n // Calculate the intersections points p(i) of all left side edges of the bounding boxes\r\n // and the ray from the center of the drag&drop object to the left edge of the canva\r\n //\r\n // BBox of Drag&Drop\r\n // any Figure Figure\r\n //\r\n // ....+ ........\r\n // | . .\r\n // . |p(i) . .\r\n // . X<------------->+ .\r\n // . | . .\r\n // ....+ . .\r\n // ........\r\n //\r\n //\r\n var leftIntersections = []\r\n var leftInputPoint = center.clone()\r\n leftInputPoint.x = 0\r\n this.bounds.forEach(function (bbox, index) {\r\n intersectionPoint = draw2d.shape.basic.Line.intersection(bbox.getTopRight(), bbox.getBottomRight(), center, leftInputPoint)\r\n if (intersectionPoint !== null) {\r\n intersectionPoint.causedBBox = bbox\r\n leftIntersections.push(intersectionPoint)\r\n }\r\n })\r\n // we can abort if we didn't find an intersection on the left hand side\r\n if (leftIntersections.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greates X coordinate\r\n //\r\n leftIntersections.sort(function (a, b) {\r\n return b.x - a.x\r\n })\r\n\r\n\r\n // Calculate the intersections points p(i) of all right hand side edges of the\r\n // bounding boxes and the ray from the center of the drag&drop object to the\r\n // left edge of the canvas\r\n //\r\n // Drag&Drop bbox of any\r\n // Figure figure\r\n //\r\n // ........\r\n // . .\r\n // . . ...........\r\n // . +<-------------->X |\r\n // . . p(i)| |\r\n // . . | |\r\n // ........ | |\r\n // ...........\r\n //\r\n var rightIntersections = []\r\n var rightInputPoint = center.clone()\r\n rightInputPoint.x = Number.MAX_SAFE_INTEGER\r\n this.bounds.forEach(function (bbox, index) {\r\n intersectionPoint = draw2d.shape.basic.Line.intersection(bbox.getTopLeft(), bbox.getBottomLeft(), center, rightInputPoint)\r\n if (intersectionPoint !== null) {\r\n intersectionPoint.causedBBox = bbox\r\n rightIntersections.push(intersectionPoint)\r\n }\r\n })\r\n // we can abort if we didn't find an intersection on the right hand side\r\n if (rightIntersections.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greates X coordinate\r\n //\r\n rightIntersections.sort(function (a, b) {\r\n return a.x - b.x\r\n })\r\n\r\n\r\n // Snap the point (S) between the two founded intersections\r\n // p(i1) and p(i2)\r\n //\r\n // BBox FigureA Drag&Drop BBox of FigureB\r\n // Figure\r\n //\r\n // ....+ ........\r\n // | . .\r\n // . |p(i1) . S . ...........\r\n // . X<------------->X<-------------->X |\r\n // . | . . p(i2)| |\r\n // ....+ . . | |\r\n // ........ | |\r\n // ...........\r\n //\r\n var snappedRect = boundingBox.clone()\r\n var diff = ((leftIntersections[0].x + rightIntersections[0].x) / 2) - center.x\r\n\r\n snappedRect.x += diff\r\n\r\n return {\r\n snapped: Math.abs(diff) < this.SNAP_THRESHOLD,\r\n snappedRect: snappedRect,\r\n diff: diff,\r\n leftSide: leftIntersections[0],\r\n rightSide: rightIntersections[0]\r\n }\r\n },\r\n\r\n\r\n snapVertical: function (boundingBox) {\r\n var center = boundingBox.getCenter()\r\n\r\n if (this.bounds === null) {\r\n this.populateBounds()\r\n }\r\n\r\n var result = {\r\n point: center,\r\n snapped: false,\r\n snappedBox: boundingBox.clone()\r\n }\r\n\r\n\r\n var intersectionPoint = null\r\n\r\n // Calculate the intersections points p(i) of all left side edges of the bounding boxes\r\n // and the ray from the center of the drag&drop object to the left edge of the canva\r\n //\r\n // BBox of Drag&Drop\r\n // any Figure Figure\r\n //\r\n // ....+ ........\r\n // | . .\r\n // . |p(i) . .\r\n // . X<------------->+ .\r\n // . | . .\r\n // ....+ . .\r\n // ........\r\n //\r\n //\r\n var topIntersections = []\r\n var topInputPoint = center.clone()\r\n topInputPoint.y = 0\r\n this.bounds.forEach(function (bbox) {\r\n intersectionPoint = draw2d.shape.basic.Line.intersection(bbox.getBottomLeft(), bbox.getBottomRight(), center, topInputPoint)\r\n if (intersectionPoint !== null) {\r\n intersectionPoint.causedBBox = bbox\r\n topIntersections.push(intersectionPoint)\r\n }\r\n })\r\n // we can abort if we didn't find an intersection on the left hand side\r\n if (topIntersections.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greates X coordinate\r\n //\r\n topIntersections.sort(function (a, b) {\r\n return b.y - a.y\r\n })\r\n\r\n\r\n // Calculate the intersections points p(i) of all right hand side edges of the\r\n // bounding boxes and the ray from the center of the drag&drop object to the\r\n // left edge of the canvas\r\n //\r\n // Drag&Drop bbox of any\r\n // Figure figure\r\n //\r\n // ........\r\n // . .\r\n // . . ...........\r\n // . +<-------------->X |\r\n // . . p(i)| |\r\n // . . | |\r\n // ........ | |\r\n // ...........\r\n //\r\n var bottomIntersections = []\r\n var bottomInputPoint = center.clone()\r\n bottomInputPoint.y = Number.MAX_SAFE_INTEGER\r\n this.bounds.forEach(function (bbox) {\r\n intersectionPoint = draw2d.shape.basic.Line.intersection(bbox.getTopLeft(), bbox.getTopRight(), center, bottomInputPoint)\r\n if (intersectionPoint !== null) {\r\n intersectionPoint.causedBBox = bbox\r\n bottomIntersections.push(intersectionPoint)\r\n }\r\n })\r\n // we can abort if we didn't find an intersection on the right hand side\r\n if (bottomIntersections.length === 0) {\r\n return result\r\n }\r\n\r\n // sort the intersection point and get the closest point to the tested inputPoint\r\n // In this case it is the point with the greates X coordinate\r\n //\r\n bottomIntersections.sort(function (a, b) {\r\n return a.y - b.y\r\n })\r\n\r\n\r\n // Snap the point (S) between the two founded intersections\r\n // p(i1) and p(i2)\r\n //\r\n // BBox FigureA Drag&Drop BBox of FigureB\r\n // Figure\r\n //\r\n // ....+ ........\r\n // | . .\r\n // . |p(i1) . S . ...........\r\n // . X<------------->X<-------------->X |\r\n // . | . . p(i2)| |\r\n // ....+ . . | |\r\n // ........ | |\r\n // ...........\r\n //\r\n var snappedRect = boundingBox.clone()\r\n var diff = ((topIntersections[0].y + bottomIntersections[0].y) / 2) - center.y\r\n\r\n snappedRect.y += diff\r\n\r\n return {\r\n snapped: Math.abs(diff) < this.SNAP_THRESHOLD,\r\n snappedRect: snappedRect,\r\n diff: diff,\r\n topSide: topIntersections[0],\r\n bottomSide: bottomIntersections[0]\r\n }\r\n },\r\n\r\n populateBounds: function () {\r\n var selection = this.canvas.getSelection().getAll(true)\r\n var bounds = this.bounds = []\r\n\r\n var figures = this.canvas.getFigures()\r\n figures.each(function (index, figure) {\r\n if (!selection.contains(figure)) {\r\n bounds.push(figure.getBoundingBox())\r\n }\r\n })\r\n },\r\n\r\n showHorizontalGuides: function (causedFigure, constraint) {\r\n if (this.horizontalGuideLines != null) {\r\n this.horizontalGuideLines.stop()\r\n this.horizontalGuideLines.remove()\r\n }\r\n\r\n var snapTopLeft = constraint.snappedRect.getTopLeft()\r\n var snapTopRight = constraint.snappedRect.getTopRight()\r\n var y = ((Math.min(constraint.leftSide.causedBBox.getTopRight().y, Math.min(constraint.rightSide.causedBBox.y, causedFigure.getY())) - 50) | 0) + 0.5\r\n\r\n this.canvas.paper.setStart()\r\n\r\n // Vertical lines from left to the right order\r\n //\r\n this.canvas.paper.path(\"M \" + ((constraint.leftSide.x | 0) + 0.5) + \" \" + y + \" L \" + ((constraint.leftSide.x | 0) + 0.5) + \" \" + constraint.leftSide.y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n\r\n this.canvas.paper.path(\"M \" + ((snapTopLeft.x | 0) + 0.5) + \" \" + y + \" L \" + ((snapTopLeft.x | 0) + 0.5) + \" \" + snapTopLeft.y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n\r\n this.canvas.paper.path(\"M \" + ((snapTopRight.x | 0) + 0.5) + \" \" + y + \" L \" + ((snapTopRight.x | 0) + 0.5) + \" \" + snapTopRight.y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n\r\n this.canvas.paper.path(\"M \" + ((constraint.rightSide.x | 0) + 0.5) + \" \" + y + \" L \" + ((constraint.rightSide.x | 0) + 0.5) + \" \" + constraint.rightSide.y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n\r\n\r\n // horizontal lines\r\n //\r\n this.canvas.paper.path(\"M \" + (constraint.leftSide.x) + \" \" + (y + 5) + \" L \" + (snapTopLeft.x) + \" \" + (y + 5)).attr({\r\n \"stroke\": this.lineColor.rgba(),\r\n \"stroke-width\": 1\r\n })\r\n this.canvas.paper.path(\"M \" + (constraint.rightSide.x) + \" \" + (y + 5) + \" L \" + (snapTopRight.x) + \" \" + (y + 5)).attr({\r\n \"stroke\": this.lineColor.rgba(),\r\n \"stroke-width\": 1\r\n })\r\n\r\n // 4 arrow heads starting on the left side and add one by one\r\n //\r\n this.canvas.paper.path(\r\n \" M \" + (constraint.leftSide.x + 5) + \" \" + (y)\r\n + \" L \" + (constraint.leftSide.x) + \" \" + (y + 5)\r\n + \" L \" + (constraint.leftSide.x + 5) + \" \" + (y + 10))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (snapTopLeft.x - 5) + \" \" + (y)\r\n + \" L \" + (snapTopLeft.x) + \" \" + (y + 5)\r\n + \" L \" + (snapTopLeft.x - 5) + \" \" + (y + 10))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (snapTopRight.x + 5) + \" \" + (y)\r\n + \" L \" + (snapTopRight.x) + \" \" + (y + 5)\r\n + \" L \" + (snapTopRight.x + 5) + \" \" + (y + 10))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (constraint.rightSide.x - 5) + \" \" + (y)\r\n + \" L \" + (constraint.rightSide.x) + \" \" + (y + 5)\r\n + \" L \" + (constraint.rightSide.x - 5) + \" \" + (y + 10))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n\r\n this.horizontalGuideLines = this.canvas.paper.setFinish()\r\n this.horizontalGuideLines.toFront()\r\n },\r\n\r\n /**\r\n *\r\n * Hide the horizontal snaping guides\r\n *\r\n * @param {Boolean} fast\r\n */\r\n hideHorizontalGuides: function (fast) {\r\n if (this.horizontalGuideLines == null) {\r\n return\r\n }\r\n\r\n if (fast === true) {\r\n if (this.horizontalGuideLines !== null) {\r\n this.horizontalGuideLines.remove()\r\n this.horizontalGuideLines = null\r\n }\r\n }\r\n else {\r\n this.horizontalGuideLines.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.horizontalGuideLines !== null) {\r\n this.horizontalGuideLines.remove()\r\n this.horizontalGuideLines = null\r\n }\r\n }\r\n )\r\n }\r\n },\r\n\r\n showVerticalGuides: function (causedFigure, constraint) {\r\n if (this.verticalGuideLines != null) {\r\n this.verticalGuideLines.stop()\r\n this.verticalGuideLines.remove()\r\n }\r\n\r\n var snapTopRight = constraint.snappedRect.getTopRight()\r\n var snapBottomRight = constraint.snappedRect.getBottomRight()\r\n var x = ((Math.max(constraint.topSide.causedBBox.getRight(), Math.max(constraint.bottomSide.causedBBox.getRight(), causedFigure.getX())) + 40) | 0) + 0.5\r\n\r\n this.canvas.paper.setStart()\r\n\r\n // Vertical lines from left to the right order\r\n //\r\n this.canvas.paper.path(\"M \" + x + \" \" + ((constraint.topSide.y | 0) + 0.5) + \" L \" + ((constraint.topSide.x | 0) + 0.5) + \" \" + ((constraint.topSide.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + x + \" \" + ((snapTopRight.y | 0) + 0.5) + \" L \" + ((snapTopRight.x | 0) + 0.5) + \" \" + ((snapTopRight.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + x + \" \" + ((snapBottomRight.y | 0) + 0.5) + \" L \" + ((snapBottomRight.x | 0) + 0.5) + \" \" + ((snapBottomRight.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + x + \" \" + ((constraint.bottomSide.y | 0) + 0.5) + \" L \" + ((constraint.bottomSide.x | 0) + 0.5) + \" \" + ((constraint.bottomSide.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n\r\n // horizontal lines\r\n //\r\n this.canvas.paper.path(\"M \" + (x - 5) + \" \" + (((constraint.topSide.y | 0) + 0.5)) + \" L \" + (x - 5) + \" \" + ((snapTopRight.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n this.canvas.paper.path(\"M \" + (x - 5) + \" \" + (((constraint.bottomSide.y | 0) + 0.5)) + \" L \" + (x - 5) + \" \" + ((snapBottomRight.y | 0) + 0.5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n\r\n // 4 arrow heads starting on the left side and add one by one\r\n //\r\n this.canvas.paper.path(\r\n \" M \" + (x - 10) + \" \" + (constraint.topSide.y + 5)\r\n + \" L \" + (x - 5) + \" \" + (constraint.topSide.y)\r\n + \" L \" + (x) + \" \" + (constraint.topSide.y + 5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (x - 10) + \" \" + (snapTopRight.y - 5)\r\n + \" L \" + (x - 5) + \" \" + (snapTopRight.y)\r\n + \" L \" + (x) + \" \" + (snapTopRight.y - 5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (x - 10) + \" \" + (snapBottomRight.y + 5)\r\n + \" L \" + (x - 5) + \" \" + (snapBottomRight.y)\r\n + \" L \" + (x) + \" \" + (snapBottomRight.y + 5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.canvas.paper.path(\r\n \" M \" + (x - 10) + \" \" + (constraint.bottomSide.y - 5)\r\n + \" L \" + (x - 5) + \" \" + (constraint.bottomSide.y)\r\n + \" L \" + (x) + \" \" + (constraint.bottomSide.y - 5))\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.verticalGuideLines = this.canvas.paper.setFinish()\r\n this.verticalGuideLines.toFront()\r\n },\r\n\r\n hideVerticalGuides: function () {\r\n if (this.verticalGuideLines == null) {\r\n return //silently\r\n }\r\n\r\n this.verticalGuideLines.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.verticalGuideLines !== null) {\r\n this.verticalGuideLines.remove()\r\n this.verticalGuideLines = null\r\n }\r\n }\r\n )\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Snapping is based on the existing children of a container. When snapping a shape,\r\n * the edges of the bounding box will snap to edges of other rectangles generated\r\n * from the children of the given canvas.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.SnapToEditPolicy\r\n */\r\ndraw2d.policy.canvas.SnapToVerticesEditPolicy = draw2d.policy.canvas.SnapToEditPolicy.extend(\r\n /** @lends draw2d.policy.canvas.SnapToVerticesEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.SnapToVerticesEditPolicy\",\r\n\r\n SNAP_THRESHOLD: 3,\r\n FADEOUT_DURATION: 300,\r\n\r\n /**\r\n * Creates a new constraint policy for snap to geometry\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.constraints = null\r\n this.vline = null\r\n this.hline = null\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Figure} figure the shape below the mouse or null\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function (figure, x, y, shiftKey, ctrlKey) {\r\n this.constraints = null\r\n this.hideVerticalLine()\r\n this.hideHorizontalLine()\r\n },\r\n\r\n /**\r\n * \r\n * Adjust the coordinates to the canvas neighbours\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the figure to snap\r\n * @param {draw2d.geo.Point} modifiedPos the already modified position of the figure (e.g. from an another Policy)\r\n * @param {draw2d.geo.Point} originalPos the original requested position of the figure\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n snap: function (canvas, figure, modifiedPos, originalPos) {\r\n // can only handle PolyLies at the moment\r\n //\r\n if (!(figure instanceof draw2d.shape.basic.VertexResizeHandle)) {\r\n return modifiedPos\r\n }\r\n\r\n var allowXChanges = modifiedPos.x === originalPos.x\r\n var allowYChanges = modifiedPos.y === originalPos.y\r\n\r\n // Coordinates already snapped to an x/y coordinate.\r\n // Don't change them and in this case no further calculation is required.\r\n //\r\n if (!allowXChanges && !allowYChanges) {\r\n return modifiedPos\r\n }\r\n\r\n var result = modifiedPos.clone()\r\n var correction = this.getCorrectionFor(figure, originalPos)\r\n\r\n if (allowXChanges && (correction.vertical.x !== Number.MAX_SAFE_INTEGER)) {\r\n result.x = correction.vertical.x\r\n this.showVerticalLine(originalPos, correction.vertical)\r\n }\r\n else {\r\n this.hideVerticalLine()\r\n }\r\n\r\n if (allowYChanges && (correction.horizontal.y !== Number.MAX_SAFE_INTEGER)) {\r\n result.y = correction.horizontal.y\r\n this.showHorizontalLine(originalPos, correction.horizontal)\r\n }\r\n else {\r\n this.hideHorizontalLine()\r\n }\r\n\r\n\r\n return result\r\n },\r\n\r\n\r\n getCorrectionFor: function (vertexResizeHandle, point) {\r\n var _this = this\r\n if (this.constraints === null) {\r\n this.constraints = []\r\n\r\n var lines = this.canvas.getLines()\r\n lines.each(function (i, line) {\r\n line.getVertices().each(function (ii, vertex) {\r\n if (vertexResizeHandle.index !== ii || vertexResizeHandle.owner !== line)\r\n _this.constraints.push(vertex)\r\n })\r\n })\r\n }\r\n\r\n var SNAP = this.SNAP_THRESHOLD\r\n var vertical = {x: Number.MAX_SAFE_INTEGER, y: Number.MAX_SAFE_INTEGER, diffy: Number.MAX_SAFE_INTEGER}\r\n var horizontal = {x: Number.MAX_SAFE_INTEGER, y: Number.MAX_SAFE_INTEGER, diffx: Number.MAX_SAFE_INTEGER}\r\n var diffx, diffy\r\n\r\n\r\n for (var i = 0; i < this.constraints.length; i++) {\r\n var entry = this.constraints[i]\r\n\r\n diffx = Math.abs(point.x - entry.x)\r\n diffy = Math.abs(point.y - entry.y)\r\n // we found a possible candidate for the vertical snap line\r\n //\r\n if (diffx < SNAP) {\r\n if (diffy < vertical.diffy) {\r\n vertical = {x: entry.x, y: entry.y, diffy: diffy}\r\n }\r\n }\r\n\r\n\r\n if (diffy < SNAP) {\r\n if (diffx < horizontal.diffx) {\r\n horizontal = {x: entry.x, y: entry.y, diffx: diffx}\r\n }\r\n }\r\n\r\n }\r\n return {vertical: vertical, horizontal: horizontal}\r\n },\r\n\r\n showVerticalLine: function (originalPos, snappedPos) {\r\n if (this.vline != null) {\r\n this.vline.stop()\r\n this.vline.remove()\r\n }\r\n\r\n\r\n var maxLength = this.canvas.getHeight()\r\n var x = (snappedPos.x | 0) + 0.5 // force a .5 number to avoid subpixel rendering. Blurry lines...\r\n this.canvas.paper.setStart()\r\n this.canvas.paper.path(\"M \" + x + \" 0 l 0 \" + maxLength)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + x + \" \" + originalPos.y + \" L \" + x + \" \" + snappedPos.y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.vline = this.canvas.paper.setFinish()\r\n this.vline.toBack()\r\n },\r\n\r\n hideVerticalLine: function () {\r\n if (this.vline == null) {\r\n return\r\n }\r\n this.vline.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.vline !== null) {\r\n this.vline.remove()\r\n this.vline = null\r\n }\r\n }\r\n )\r\n },\r\n\r\n showHorizontalLine: function (originalPos, snappedPos) {\r\n if (this.hline != null) {\r\n this.hline.stop()\r\n this.hline.remove()\r\n }\r\n\r\n var maxLength = this.canvas.getWidth()\r\n var y = (snappedPos.y | 0) + 0.5 // force a .5 number to avoid subpixel rendering. Blurry lines...\r\n\r\n this.canvas.paper.setStart()\r\n this.canvas.paper.path(\"M 0 \" + y + \" l \" + maxLength + \" 0\")\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1, \"stroke-dasharray\": \". \"})\r\n this.canvas.paper.path(\"M \" + originalPos.x + \" \" + y + \" L \" + snappedPos.x + \" \" + y)\r\n .attr({\"stroke\": this.lineColor.rgba(), \"stroke-width\": 1})\r\n\r\n this.hline = this.canvas.paper.setFinish()\r\n this.hline.toBack()\r\n\r\n },\r\n\r\n hideHorizontalLine: function () {\r\n if (this.hline === null) {\r\n return //silently\r\n }\r\n this.hline.animate(\r\n {opacity: 0.1},\r\n this.FADEOUT_DURATION,\r\n () => {\r\n if (this.hline !== null) {\r\n this.hline.remove()\r\n this.hline = null\r\n }\r\n }\r\n )\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\nimport {Tweenable} from \"shifty\"\r\n\r\n\r\n/**\r\n * @class\r\n * Zoom support for a canvas. Use the mouse wheel and the shift key to zoom in/out.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.installEditPolicy(new draw2d.policy.canvas.WheelZoomPolicy());\r\n * let shape = new draw2d.shape.basic.Text({text:\"Use the mouse wheel + SHIFT to zoom\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n * @since 5.8.0\r\n */\r\ndraw2d.policy.canvas.WheelZoomPolicy = draw2d.policy.canvas.ZoomPolicy.extend(\r\n /** @lends draw2d.policy.canvas.WheelZoomPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.WheelZoomPolicy\",\r\n\r\n /**\r\n */\r\n init: function () {\r\n this._super()\r\n\r\n this.center = null\r\n this.debouncedZoomedCallback = this._debounce(() => {\r\n let canvas = this.canvas\r\n if (canvas !== null) {\r\n canvas.fireEvent(\"zoomed\", {value: canvas.zoomFactor})\r\n }\r\n this.center = null\r\n }, 200)\r\n },\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n canvas.setZoom(1)\r\n canvas.__wheelZoom = 1\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n\r\n // cleanup the canvas object and remove custom properties\r\n //\r\n delete canvas.__wheelZoom\r\n },\r\n\r\n\r\n /**\r\n *\r\n * called if the user uses the mouse wheel.\r\n *\r\n *\r\n * @param wheelDelta\r\n * @param {Number} x the x coordinate of the event\r\n * @param {Number} y the y coordinate of the event\r\n * @param shiftKey\r\n * @param ctrlKey\r\n * @since 5.8.0\r\n * @template\r\n * @returns {Boolean} return <b>false</b> to preven tthe default event operation (e.g. scrolling)\r\n */\r\n onMouseWheel: function (wheelDelta, x, y, shiftKey, ctrlKey) {\r\n // mouse wheel is only supported if the user presses the shift key.\r\n // normally the canvas scrolls during mouseWheel usage.\r\n //\r\n if (shiftKey === false) {\r\n return true\r\n }\r\n\r\n wheelDelta = wheelDelta / 1024\r\n\r\n let newZoom = ((Math.min(5, Math.max(0.1, this.canvas.zoomFactor + wheelDelta)) * 10000 | 0) / 10000)\r\n if (this.center === null) {\r\n let client = this.canvas.fromCanvasToDocumentCoordinate(x, y)\r\n\r\n this.center = {\r\n x: x,\r\n y: y,\r\n clientX: client.x,\r\n clientY: client.y\r\n }\r\n }\r\n this._zoom(newZoom, this.center)\r\n this.debouncedZoomedCallback()\r\n\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Set the new zoom level of the canvas.\r\n *\r\n * @param zoomFactor\r\n * @param animated\r\n */\r\n setZoom: function (zoomFactor, animated) {\r\n\r\n // determine the center of the current canvas. We try to keep the\r\n // current center during zoom operation\r\n //\r\n let scrollTop = this.canvas.getScrollTop()\r\n let scrollLeft = this.canvas.getScrollLeft()\r\n let scrollWidth = this.canvas.getScrollArea().width()\r\n let scrollHeight = this.canvas.getScrollArea().height()\r\n let centerY = scrollTop + (scrollHeight / 2) * this.canvas.zoomFactor\r\n let centerX = scrollLeft + (scrollWidth / 2) * this.canvas.zoomFactor\r\n\r\n if (animated) {\r\n let myTweenable = new Tweenable()\r\n myTweenable.tween({\r\n from: {'x': this.canvas.zoomFactor},\r\n to: {'x': zoomFactor},\r\n duration: 300,\r\n easing: \"easeOutSine\",\r\n step: params => {\r\n this._zoom(params.x, centerX, centerY)\r\n },\r\n finish: state => {\r\n this.debouncedZoomedCallback()\r\n }\r\n })\r\n }\r\n else {\r\n this._zoom(zoomFactor, {x: centerX, y: centerY})\r\n this.debouncedZoomedCallback()\r\n }\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @param {Number} zoom\r\n * @param {draw2d.geo.Point} center\r\n * @private\r\n */\r\n _zoom: function (zoom, center) {\r\n let canvas = this.canvas\r\n\r\n if (zoom === canvas.zoomFactor) {\r\n return\r\n }\r\n\r\n canvas.zoomFactor = zoom\r\n\r\n canvas.paper.setViewBox(0, 0, canvas.initialWidth, canvas.initialHeight)\r\n // Change the width and the height attributes manually through DOM\r\n // unfortunately the raphaelJS 'setSize' method changes the viewBox as well and this is unwanted in this case\r\n //\r\n canvas.html\r\n .find(\"svg\")\r\n .attr({\r\n 'width': canvas.initialWidth / zoom,\r\n 'height': canvas.initialHeight / zoom\r\n })\r\n\r\n\r\n // try to keep the document position to the given client position\r\n //\r\n if (center.clientX) {\r\n let coordsAfter = canvas.fromCanvasToDocumentCoordinate(center.x, center.y)\r\n canvas.scrollTo(this.canvas.getScrollTop() - (center.clientY - coordsAfter.y), canvas.getScrollLeft() - (center.clientX - coordsAfter.x))\r\n }\r\n\r\n canvas.fireEvent(\"zoom\", {value: canvas.zoomFactor})\r\n },\r\n\r\n\r\n // Returns a function, that, as long as it continues to be invoked, will not\r\n // be triggered. The function will be called after it stops being called for\r\n // N milliseconds. If `immediate` is passed, trigger the function on the\r\n // leading edge, instead of the trailing.\r\n _debounce: function (func, wait, immediate) {\r\n let timeout\r\n return () => {\r\n let context = this, args = arguments\r\n let later = () => {\r\n timeout = null\r\n if (!immediate) func.apply(context, args)\r\n }\r\n let callNow = immediate && !timeout\r\n clearTimeout(timeout)\r\n timeout = setTimeout(later, wait)\r\n if (callNow) func.apply(context, args)\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\nimport {Tweenable} from \"shifty\"\r\n\r\n\r\n/**\r\n * @class\r\n * Generic zoom policy installable into a canvas object.\r\n * This is the legacy implementation of the very first zooming in\r\n * Draw2D. You can use this implementation if you want backward compatible.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.canvas.CanvasPolicy\r\n * @since 5.8.0\r\n */\r\ndraw2d.policy.canvas.ZoomPolicy = draw2d.policy.canvas.CanvasPolicy.extend(\r\n /** @lends draw2d.policy.canvas.ZoomPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.canvas.ZoomPolicy\",\r\n\r\n /**\r\n */\r\n init: function () {\r\n this._super()\r\n },\r\n\r\n onInstall: function (canvas) {\r\n this._super(canvas)\r\n canvas.setZoom(1)\r\n },\r\n\r\n onUninstall: function (canvas) {\r\n this._super(canvas)\r\n },\r\n\r\n /** \r\n * Set the new zoom factor for the canvas. The value must be between [0.01..10]\r\n *\r\n * // you can register an eventhandler to listen to the zoom factor of the canvas.\r\n * //\r\n * canvas.on(\"zoom\", function(emitterFigure, zoomData){\r\n * alert(\"canvas zoomed to:\"+zoomData.factor);\r\n * });\r\n *\r\n * @param {Number} zoomFactor new zoom factor.\r\n * @param {Boolean} [animated] set it to true for smooth zoom in/out\r\n **/\r\n setZoom: function (zoomFactor, animated) {\r\n let canvas = this.canvas\r\n\r\n let _zoom = function (z) {\r\n canvas.zoomFactor = Math.min(Math.max(0.01, z), 10)\r\n\r\n let viewBoxWidth = (canvas.initialWidth * (canvas.zoomFactor)) | 0\r\n let viewBoxHeight = (canvas.initialHeight * (canvas.zoomFactor)) | 0\r\n\r\n canvas.paper.setViewBox(0, 0, viewBoxWidth, viewBoxHeight)\r\n\r\n canvas.fireEvent(\"zoom\", {value: canvas.zoomFactor})\r\n }\r\n\r\n if (animated) {\r\n let myTweenable = new Tweenable()\r\n myTweenable.tween({\r\n from: {'x': canvas.zoomFactor},\r\n to: {'x': zoomFactor},\r\n duration: 300,\r\n easing: \"easeOutSine\",\r\n step: params => _zoom(params.x),\r\n finish: state => canvas.fireEvent(\"zoomed\", {value: canvas.zoomFactor})\r\n })\r\n }\r\n else {\r\n _zoom(zoomFactor)\r\n canvas.fireEvent(\"zoomed\", {value: canvas.zoomFactor})\r\n }\r\n }\r\n})\r\n","\r\n/**\r\n * @class\r\n *\r\n * The ClickConnectionCreatePolicy can be installed into the canvas to override the\r\n * default connection crate behaviour. Normally you can create connections by drag&drop a port.\r\n *\r\n * With this policy you can route the connection during creation.\r\n *\r\n * Creates a connection by clicking on a port.\r\n * <ul>\r\n * <li> click on the first port</li>\r\n * <li> click within the canvas to add additional vertices</li>\r\n * <li> click on the target port to draw the connection</li>\r\n * <li> press ESC to abort the operation (didn't work within this JSDoc)</li>\r\n * </ul>\r\n * <br>\r\n * <br>\r\n * <b>The generated connections didn't have any orthogonal constraints nor any other restrictions or guidance.</b>\r\n * <br>\r\n * <br>\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // Override the default connection creation.\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.ClickConnectionCreatePolicy());\r\n *\r\n * // create and add two Node which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start({x:50, y:50});\r\n * var endNode = new draw2d.shape.node.End({x:200, y:70});\r\n *\r\n * // add the two nodes to the canvas\r\n * //\r\n * canvas.add( start);\r\n * canvas.add( endNode);\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.connection.ConnectionCreatePolicy\r\n * @since 6.1.0\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.connection.ClickConnectionCreatePolicy = draw2d.policy.connection.ConnectionCreatePolicy.extend(\r\n /** @lends draw2d.policy.connection.ClickConnectionCreatePolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.connection.ClickConnectionCreatePolicy\",\r\n \r\n /**\r\n *\r\n * Creates a new connection create policy instance\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super( attr, setter, getter);\r\n\r\n this.port1 = null;\r\n this.beeline = null;\r\n this.pulse= null;\r\n this.tempConnection = null;\r\n\r\n this.vertices = [];\r\n },\r\n\r\n /**\r\n * \r\n * Called by the canvas if the user click on a figure.\r\n *\r\n * @param {draw2d.Figure} the figure under the click event. Can be null\r\n * @param {Number} x the x coordinate of the mouse during the click event\r\n * @param {Number} y the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 6.1.0\r\n */\r\n onClick: function(figure, x, y, shiftKey, ctrlKey)\r\n {\r\n var _this = this;\r\n var port = figure;\r\n\r\n if(port === null && this.port1 === null){\r\n return;\r\n }\r\n\r\n // nothing found at all\r\n //\r\n if(port===null){\r\n this.vertices.push(new draw2d.geo.Point(x,y));\r\n this.beeline.setStartPosition(x,y);\r\n this.tempConnection.setVertices(this.vertices);\r\n if(this.pulse!==null) {\r\n this.pulse.remove();\r\n this.pulse = null;\r\n }\r\n this.ripple(x,y,0);\r\n return;\r\n }\r\n\r\n //just consider ports\r\n //\r\n if(!(port instanceof draw2d.Port)){\r\n return;\r\n }\r\n\r\n // start connection create by selection the start port\r\n //\r\n if(this.port1===null){\r\n var canvas = port.getCanvas();\r\n this.port1 = port;\r\n this.vertices.push(port.getAbsolutePosition());\r\n this.beeline = new draw2d.shape.basic.Line({\r\n start: this.port1.getAbsolutePosition(),\r\n end: this.port1.getAbsolutePosition(),\r\n dasharray:\"- \",\r\n color:\"#2C70FF\"\r\n });\r\n\r\n this.beeline.hide= function(){\r\n _this.beeline.setCanvas(null);\r\n };\r\n\r\n this.beeline.show= function(canvas){\r\n _this.beeline.setCanvas(canvas);\r\n _this.beeline.shape.toFront();\r\n };\r\n this.beeline.show(canvas);\r\n\r\n this.tempConnection = new draw2d.shape.basic.PolyLine({\r\n start: this.port1.getAbsolutePosition(),\r\n end: this.port1.getAbsolutePosition(),\r\n stroke:2,\r\n color:\"#2C70FF\"\r\n });\r\n\r\n this.tempConnection.hide= function(){\r\n _this.tempConnection.setCanvas(null);\r\n };\r\n\r\n this.tempConnection.show= function(canvas){\r\n _this.tempConnection.setCanvas(canvas);\r\n _this.tempConnection.shape.toFront();\r\n };\r\n this.tempConnection.show(canvas);\r\n this.tempConnection.setVertices([this.port1.getAbsolutePosition(),this.port1.getAbsolutePosition()]);\r\n\r\n var a= function() {\r\n _this.tempConnection.shape.animate({\"stroke-width\" : 2}, 800, b);\r\n };\r\n var b=function() {\r\n _this.tempConnection.shape.animate({\"stroke-width\":1}, 800, a);\r\n };\r\n a();\r\n\r\n var pos = port.getAbsolutePosition();\r\n this.pulse =this.ripple(pos.x, pos.y, 1);\r\n return;\r\n }\r\n\r\n\r\n var possibleTarget = port.delegateTarget(this.port1);\r\n\r\n if(!(possibleTarget instanceof draw2d.Port)){\r\n return; // silently\r\n }\r\n\r\n var request = new draw2d.command.CommandType(draw2d.command.CommandType.CONNECT);\r\n request.source = this.port1;\r\n request.target = port;\r\n\r\n var command = null;\r\n if(this.port1 instanceof draw2d.InputPort) {\r\n command = this.port1.createCommand(request);\r\n }\r\n else{\r\n command = port.createCommand(request);\r\n }\r\n\r\n if(command!==null){\r\n this.vertices.push(port.getPosition());\r\n command.setConnection( this.createConnection());\r\n figure.getCanvas().getCommandStack().execute(command);\r\n this.beeline.hide();\r\n this.tempConnection.hide();\r\n if(this.pulse!==null) {\r\n this.pulse.remove();\r\n this.pulse = null;\r\n }\r\n this.beeline = null;\r\n this.port1=null;\r\n this.vertices = [];\r\n }\r\n\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseMove: function(canvas, x, y, shiftKey, ctrlKey)\r\n {\r\n if(this.beeline!==null){\r\n this.beeline.setEndPosition(x,y);\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user press a key down\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n **/\r\n onKeyDown: function(canvas, keyCode, shiftKey, ctrlKey)\r\n {\r\n var KEYCODE_ENTER = 13;\r\n var KEYCODE_ESC = 27;\r\n if (keyCode === KEYCODE_ESC && this.beeline!==null){\r\n this.beeline.hide();\r\n this.tempConnection.hide();\r\n this.beeline = null;\r\n this.port1=null;\r\n this.vertices = [];\r\n if(this.pulse!=null) {\r\n this.pulse.remove();\r\n this.pulse=null;\r\n }\r\n }\r\n },\r\n\r\n\r\n createConnection: function()\r\n {\r\n var connection = this._super();\r\n if(this.vertices.length===2){\r\n connection.setRouter(new draw2d.layout.connection.DirectRouter());\r\n }\r\n else {\r\n connection.setRouter(new draw2d.layout.connection.VertexRouter());\r\n connection.setVertices(this.vertices);\r\n }\r\n connection.setRadius(10);\r\n return connection;\r\n }\r\n\r\n\r\n\r\n});\r\n\r\n","\r\n/**\r\n * @class\r\n * A composed connection create policy. Use this to install more than one\r\n * ConnectionCreatePolicy into the canvas. Normally it is not allowed to install\r\n * more than one policy from the same type.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.connection.ConnectionCreatePolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.connection.ComposedConnectionCreatePolicy = draw2d.policy.connection.ConnectionCreatePolicy.extend(\r\n /** @lends draw2d.policy.connection.ComposedConnectionCreatePolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.connection.ComposedConnectionCreatePolicy\",\r\n\r\n /**\r\n *\r\n * Creates a new connection create policy instance\r\n *\r\n * @param {array} policies the policies to use\r\n */\r\n init: function( policies )\r\n {\r\n this.policies = policies;\r\n this._super();\r\n },\r\n\r\n onMouseDown: function()\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onMouseDown.apply(p,_arg);\r\n });\r\n },\r\n onMouseDrag: function()\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onMouseDrag.apply(p,_arg);\r\n });\r\n },\r\n\r\n onMouseUp: function()\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onMouseUp.apply(p,_arg);\r\n });\r\n },\r\n\r\n onClick: function()\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onClick.apply(p,_arg);\r\n });\r\n },\r\n onMouseMove: function()\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onMouseMove.apply(p,_arg);\r\n });\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n **/\r\n onKeyUp: function(canvas, keyCode, shiftKey, ctrlKey)\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onKeyUp.apply(p,_arg);\r\n });\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n **/\r\n onKeyDown: function(canvas, keyCode, shiftKey, ctrlKey)\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onKeyDown.apply(p,_arg);\r\n });\r\n },\r\n\r\n /**\r\n * \r\n * Called if the policy is installed into the canvas.\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n */\r\n onInstall: function(canvas)\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onInstall.apply(p,_arg);\r\n });\r\n },\r\n\r\n /**\r\n * \r\n * Called if the policy is deinstalled from the canvas\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n */\r\n onUninstall: function(canvas)\r\n {\r\n let _arg = arguments;\r\n this.policies.forEach((p)=>{\r\n p.onUninstall.apply(p,_arg);\r\n });\r\n }\r\n\r\n});\r\n\r\n","\r\n/**\r\n * @class\r\n * Base class for connection creation by user interaction.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.canvas.KeyboardPolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.connection.ConnectionCreatePolicy = draw2d.policy.canvas.KeyboardPolicy.extend(\r\n /** @lends draw2d.policy.connection.ConnectionCreatePolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.connection.ConnectionCreatePolicy\",\r\n\r\n /**\r\n *\r\n * Creates a new connection create policy instance\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super( attr,setter,getter);\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Factory method to create the connection to insert.\r\n *\r\n * @returns {draw2d.Connection}\r\n * @template\r\n */\r\n createConnection:function()\r\n {\r\n return new draw2d.Connection({\r\n router: new draw2d.layout.connection.DirectRouter()\r\n });\r\n },\r\n\r\n\r\n ripple: function(x,y, type)\r\n {\r\n switch(type){\r\n case 0:\r\n var circle = this.canvas.paper.circle(x, y, 3, 3).attr({fill: null, stroke:\"#d0d0ff\"});\r\n var anim = Raphael.animation(\r\n {transform: \"s6\", opacity:0.0, \"stroke-width\":3 },\r\n 500,\r\n \"linear\",\r\n function(){circle.remove()}\r\n );\r\n circle.animate(anim);\r\n // return an emmpty raphael.set. The circle removes itself after animation is done\r\n //\r\n return this.canvas.paper.set();\r\n break;\r\n case 1:\r\n var circle1 = this.canvas.paper.circle(x, y, 3, 3).attr({fill: null, stroke:\"#3f72bf\"});\r\n var circle2 = this.canvas.paper.circle(x, y, 3, 3).attr({fill: null, stroke:\"#ff0000\"});\r\n var anim1 = Raphael.animation(\r\n {transform: \"s6\", opacity:0.0, \"stroke-width\":1 },\r\n 1200,\r\n \"linear\"\r\n ).repeat(Infinity);\r\n circle1.animate(anim1);\r\n var anim2 = Raphael.animation(\r\n {transform: \"s12\", opacity:0.0, \"stroke-width\":4 },\r\n 500,\r\n \"linear\",\r\n function(){circle2.remove()}\r\n );\r\n circle2.animate(anim2);\r\n\r\n // return the \"circle1\". This shape must be remove by the caller\r\n // \"circle2\" is removed automaticly\r\n //\r\n return circle1;\r\n break;\r\n }\r\n }\r\n\r\n\r\n});\r\n\r\n","\r\n/**\r\n * @class\r\n *\r\n * The DragConnectionCreatePolicy is the default configuration for connection creation.\r\n * You must drag a port and drop them onto another port to create connection.\r\n *\r\n * Creates a connection by drag&drop on a port.\r\n * <ul>\r\n * <li> click on the first port</li>\r\n * <li> drag it to the target port</li>\r\n * <li> drop it onto the target</li>\r\n * </ul>\r\n * <br>\r\n * <br>\r\n *\r\n *\r\n *\r\n * @example\r\n *\r\n * // Override the default connection creation.\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.DragConnectionCreatePolicy());\r\n *\r\n * // create and add two Node which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start({x:50, y:50});\r\n * var endNode = new draw2d.shape.node.End({x:200, y:70});\r\n *\r\n * // add the two nodes to the canvas\r\n * //\r\n * canvas.add( start);\r\n * canvas.add( endNode);\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.connection.ConnectionCreatePolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.connection.DragConnectionCreatePolicy = draw2d.policy.connection.ConnectionCreatePolicy.extend(\r\n /** @lends draw2d.policy.connection.DragConnectionCreatePolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.connection.DragConnectionCreatePolicy\",\r\n \r\n /**\r\n *\r\n * Creates a new connection create policy instance\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super(attr, setter, getter);\r\n\r\n this.mouseDraggingElement =null;\r\n this.currentDropTarget = null;\r\n this.currentTarget = null;\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseDown: function(canvas, x, y, shiftKey, ctrlKey)\r\n {\r\n //just consider ports\r\n //\r\n var port = canvas.getBestFigure(x, y);\r\n\r\n\r\n // nothing found at all\r\n //\r\n if(port===null){\r\n return;\r\n }\r\n\r\n // may there is a resize handle below the port or another figure\r\n // in this case the ResizeHandle has prio. and handled by another\r\n // Policy\r\n if(!(port instanceof draw2d.Port)){\r\n return;\r\n }\r\n\r\n // this can happen if the user release the mouse button outside the window during a drag&drop\r\n // operation. In this case we must fire the \"onDragEnd\" event postpond.\r\n //\r\n if(port.isInDragDrop===true){\r\n port.onDragEnd( x, y, shiftKey, ctrlKey);\r\n port.isInDragDrop=false;\r\n }\r\n\r\n // introspect the port only if it is draggable at all\r\n //\r\n if (port.isDraggable()) {\r\n var canDragStart = port.onDragStart(x - port.getAbsoluteX(), y - port.getAbsoluteY(), shiftKey, ctrlKey);\r\n if(canDragStart) {\r\n port.fireEvent(\"dragstart\", {x: x - port.getAbsoluteX(), y: y - port.getAbsoluteY(), shiftKey: shiftKey, ctrlKey: ctrlKey});\r\n }\r\n\r\n // Element send a veto about the drag&drop operation\r\n this.mouseDraggingElement = canDragStart===false ? null : port;\r\n this.mouseDownElement = port;\r\n }\r\n },\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} dx The x diff between start of dragging and this event\r\n * @param {Number} dy The y diff between start of dragging and this event\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @template\r\n */\r\n onMouseDrag: function(canvas, dx, dy, dx2, dy2, shiftKey, ctrlKey)\r\n {\r\n try{\r\n if (this.mouseDraggingElement !== null) {\r\n var de = this.mouseDraggingElement;\r\n var ct = this.currentTarget;\r\n\r\n de.isInDragDrop = true;\r\n de.onDrag(dx, dy, dx2, dy2, shiftKey, ctrlKey);\r\n\r\n var target=canvas.getBestFigure(de.getAbsoluteX(),de.getAbsoluteY(), de);\r\n\r\n // the hovering element has been changed\r\n if(target!==ct){\r\n if(ct!==null){\r\n ct.onDragLeave(de);\r\n ct.fireEvent(\"dragLeave\",{draggingElement:de});\r\n de.editPolicy.each(function(i,e){\r\n if(e instanceof draw2d.policy.port.PortFeedbackPolicy){\r\n e.onHoverLeave(canvas, de, ct);\r\n }\r\n });\r\n }\r\n\r\n // possible hoverEnter event\r\n //\r\n if(target!==null){\r\n this.currentTarget= ct = target.delegateTarget(de);\r\n if(ct!==null){\r\n ct.onDragEnter(de); // legacy\r\n ct.fireEvent(\"dragEnter\",{draggingElement:de});\r\n de.editPolicy.each(function(i,e){\r\n if(e instanceof draw2d.policy.port.PortFeedbackPolicy){\r\n e.onHoverEnter(canvas, de, ct);\r\n }\r\n });\r\n }\r\n }\r\n else{\r\n this.currentTarget = null;\r\n }\r\n }\r\n\r\n\r\n var p = canvas.fromDocumentToCanvasCoordinate(canvas.mouseDownX + (dx/canvas.zoomFactor), canvas.mouseDownY + (dy/canvas.zoomFactor));\r\n var target = canvas.getBestFigure(p.x, p.y,this.mouseDraggingElement);\r\n\r\n if (target !== this.currentDropTarget) {\r\n if (this.currentDropTarget !== null) {\r\n this.currentDropTarget.onDragLeave(this.mouseDraggingElement);\r\n this.currentDropTarget.fireEvent(\"dragLeave\",{draggingElement:this.mouseDraggingElement});\r\n this.currentDropTarget = null;\r\n }\r\n if (target !== null) {\r\n this.currentDropTarget = target.delegateTarget(this.mouseDraggingElement);\r\n // inform all listener that the element has accept the dragEnter event\r\n //\r\n if( this.currentDropTarget !==null) {\r\n this.currentDropTarget.onDragEnter(this.mouseDraggingElement); // legacy\r\n this.currentDropTarget.fireEvent(\"dragEnter\", {draggingElement: this.mouseDraggingElement});\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch(exc){\r\n console.log(exc);\r\n debugger;\r\n }\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Figure} figure the shape below the mouse or null\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onMouseUp: function(canvas, x, y, shiftKey, ctrlKey)\r\n {\r\n if (this.mouseDraggingElement !== null) {\r\n\r\n var de = this.mouseDraggingElement;\r\n var ct = this.currentTarget;\r\n // start CommandStack transaction\r\n canvas.getCommandStack().startTransaction();\r\n\r\n de.onDragEnd(x, y, shiftKey, ctrlKey);\r\n // notify all installed policies\r\n //\r\n if(ct){\r\n de.editPolicy.each(function(i,e){\r\n if(e instanceof draw2d.policy.port.PortFeedbackPolicy){\r\n e.onHoverLeave(canvas, de, ct);\r\n }\r\n });\r\n }\r\n\r\n de.editPolicy.each(function(i,e){\r\n if(e instanceof draw2d.policy.figure.DragDropEditPolicy){\r\n e.onDragEnd(canvas, de, x, y, shiftKey, ctrlKey);\r\n }\r\n });\r\n\r\n // Reset the drag&drop flyover information\r\n //\r\n this.currentTarget = null;\r\n de.isInDragDrop =false;\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n de.fireEvent(\"dragend\",{x:x, y:y, shiftKey:shiftKey, ctrlKey:ctrlKey});\r\n\r\n\r\n // check if we drop the port onto a valid\r\n // drop target and create a connection if possible\r\n //\r\n if (this.currentDropTarget !== null) {\r\n this.mouseDraggingElement.onDrop(this.currentDropTarget, x, y, shiftKey, ctrlKey);\r\n\r\n this.currentDropTarget.onDragLeave(this.mouseDraggingElement);\r\n this.currentDropTarget.fireEvent(\"dragLeave\", {draggingElement: this.mouseDraggingElement});\r\n\r\n // Ports accepts only Ports as DropTarget\r\n //\r\n if(this.currentDropTarget instanceof draw2d.Port){\r\n var request = new draw2d.command.CommandType(draw2d.command.CommandType.CONNECT);\r\n request.source = this.currentDropTarget;\r\n request.target = this.mouseDraggingElement;\r\n var command = this.mouseDraggingElement.createCommand(request);\r\n\r\n if(command!==null){\r\n command.setConnection(this.createConnection());\r\n canvas.getCommandStack().execute(command);\r\n this.currentDropTarget.onCatch(this.mouseDraggingElement, x, y, shiftKey, ctrlKey);\r\n }\r\n }\r\n }\r\n\r\n // end command stack trans\r\n canvas.getCommandStack().commitTransaction();\r\n this.currentDropTarget = null;\r\n this.mouseDraggingElement = null;\r\n }\r\n },\r\n\r\n\r\n createConnection: function()\r\n {\r\n var connection = this._super();\r\n connection.setRouter(new draw2d.layout.connection.DirectRouter());\r\n\r\n return connection;\r\n }\r\n\r\n\r\n});\r\n\r\n","\r\n/**\r\n * @class\r\n *\r\n * The OrthogonalConnectionCreatePolicy can be installed into the canvas to override the\r\n * default connection crate behaviour. Normaly you can create connections by drag&drop a port.\r\n *\r\n * With this policy you can route the connection during creation.\r\n *\r\n * Creates a connection by clicking on a port.\r\n * <ul>\r\n * <li> click on the first port</li>\r\n * <li> click within the canvas to add additional vertices</li>\r\n * <li> click on the target port to draw the connection</li>\r\n * <li> press ESC to abort the operation (didn't work within this JSDoc)</li>\r\n * </ul>\r\n * <br>\r\n * <br>\r\n * <b>The generated connection has always perpendicular segments.</b>\r\n * <br>\r\n * <br>\r\n *\r\n *\r\n * @example\r\n *\r\n * // Override the default connection creation.\r\n * //\r\n * canvas.installEditPolicy( new draw2d.policy.connection.OrthogonalConnectionCreatePolicy());\r\n *\r\n * // create and add two Node which contains Ports (In and OUT)\r\n * //\r\n * var start = new draw2d.shape.node.Start({x:50, y:50});\r\n * var endNode = new draw2d.shape.node.End({x:200, y:70});\r\n *\r\n * // add the two nodes to the canvas\r\n * //\r\n * canvas.add( start);\r\n * canvas.add( endNode);\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.connection.ConnectionCreatePolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.connection.OrthogonalConnectionCreatePolicy = draw2d.policy.connection.ConnectionCreatePolicy.extend(\r\n /** @lends draw2d.policy.connection.ClickConnectionCreatePolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.connection.ClickConnectionCreatePolicy\",\r\n\r\n /**\r\n *\r\n * Creates a new connection create policy instance\r\n\r\n */\r\n init: function(attr, setter, getter)\r\n {\r\n this._super( attr, setter, getter);\r\n\r\n this.port1 = null;\r\n this.beeline = null;\r\n this.pulse= null;\r\n this.tempConnection = null;\r\n\r\n this.vertices = new draw2d.util.ArrayList();\r\n },\r\n\r\n /**\r\n * \r\n * Called by the canvas if the user click on a figure.\r\n *\r\n * @param {draw2d.Figure} the figure under the click event. Can be null\r\n * @param {Number} x the x coordinate of the mouse during the click event\r\n * @param {Number} y the y coordinate of the mouse during the click event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @since 6.1.0\r\n *\r\n * @template\r\n */\r\n onClick: function(figure, x, y, shiftKey, ctrlKey)\r\n {\r\n var UP = draw2d.geo.Rectangle.DIRECTION_UP;\r\n var RIGHT= draw2d.geo.Rectangle.DIRECTION_RIGHT;\r\n var DOWN = draw2d.geo.Rectangle.DIRECTION_DOWN;\r\n var LEFT = draw2d.geo.Rectangle.DIRECTION_LEFT;\r\n\r\n var _this = this;\r\n var port = figure;// .getCanvas().getBestFigure(x, y);\r\n\r\n // nothing to do\r\n if(port === null && this.port1 === null){\r\n return;\r\n }\r\n\r\n // nothing found at all\r\n //\r\n if(port===null){\r\n var canvas = this.port1.getCanvas();\r\n var newPos = this.beeline.getEndPosition();\r\n this.vertices.add(newPos);\r\n this.beeline.setStartPosition(this.beeline.getEndPosition());\r\n this.tempConnection.setVertices(this.vertices);\r\n if(this.pulse!==null) {\r\n this.pulse.remove();\r\n this.pulse = null;\r\n }\r\n this.ripple(newPos.x, newPos.y, 0);\r\n return;\r\n }\r\n\r\n // we just considering ports\r\n //\r\n if(!(port instanceof draw2d.Port)){\r\n return;\r\n }\r\n\r\n // start connection create by selection the start port\r\n //\r\n if(this.port1===null){\r\n var canvas = port.getCanvas();\r\n this.port1 = port;\r\n this.vertices.add(port.getAbsolutePosition());\r\n this.beeline = new draw2d.shape.basic.Line({\r\n start: this.port1.getAbsolutePosition(),\r\n end: this.port1.getAbsolutePosition(),\r\n dasharray:\"- \",\r\n color:\"#2C70FF\"\r\n });\r\n\r\n this.beeline.hide= function(){\r\n _this.beeline.setCanvas(null);\r\n };\r\n\r\n this.beeline.show= function(canvas){\r\n _this.beeline.setCanvas(canvas);\r\n _this.beeline.shape.toFront();\r\n };\r\n this.beeline.show(canvas);\r\n\r\n this.tempConnection = new draw2d.shape.basic.PolyLine({\r\n start: this.port1.getAbsolutePosition(),\r\n end: this.port1.getAbsolutePosition(),\r\n stroke:2,\r\n color:\"#2C70FF\"\r\n });\r\n\r\n this.tempConnection.hide= function(){\r\n _this.tempConnection.setCanvas(null);\r\n };\r\n\r\n this.tempConnection.show= function(canvas){\r\n _this.tempConnection.setCanvas(canvas);\r\n _this.tempConnection.shape.toFront();\r\n };\r\n this.tempConnection.show(canvas);\r\n this.tempConnection.setVertices([this.port1.getAbsolutePosition(),this.port1.getAbsolutePosition()]);\r\n\r\n var a= function() {\r\n _this.tempConnection.shape.animate({\"stroke-width\" : 2}, 800, b);\r\n };\r\n var b=function() {\r\n _this.tempConnection.shape.animate({\"stroke-width\":1}, 800, a);\r\n };\r\n a();\r\n\r\n canvas.paper.setStart();\r\n\r\n // delete the previews puls if the user press twice on the starting port\r\n //\r\n if(this.pulse!==null) {\r\n this.pulse.remove();\r\n this.pulse = null;\r\n }\r\n\r\n var pos = port.getAbsolutePosition();\r\n this.ripple(pos.x, pos.y, 1);\r\n this.pulse = canvas.paper.setFinish();\r\n }\r\n else {\r\n var possibleTarget = port.delegateTarget(this.port1);\r\n\r\n if (!(possibleTarget instanceof draw2d.Port)) {\r\n return; // silently\r\n }\r\n\r\n // check whenever the target port allows a connection\r\n //\r\n var request = new draw2d.command.CommandType(draw2d.command.CommandType.CONNECT);\r\n request.source = this.port1;\r\n request.target = port;\r\n var command = null;\r\n if (this.port1 instanceof draw2d.InputPort) {\r\n command = this.port1.createCommand(request);\r\n }\r\n else {\r\n command = port.createCommand(request);\r\n }\r\n\r\n if (command !== null) {\r\n var connection = this.createConnection();\r\n command.setConnection(connection);\r\n port.getCanvas().getCommandStack().execute(command);\r\n\r\n\r\n this.beeline.hide();\r\n this.tempConnection.hide();\r\n if (this.pulse !== null) {\r\n this.pulse.remove();\r\n this.pulse = null;\r\n }\r\n this.beeline = null;\r\n this.port1 = null;\r\n\r\n // use the default routing if the user didn't add some\r\n // vertices\r\n if(this.vertices.getSize()<=2){\r\n return;\r\n }\r\n\r\n var MINDIST = command.getConnection().getRouter().MINDIST;\r\n var beforeVertex = this.vertices.get(this.vertices.getSize()-2);\r\n var lastVertex = this.vertices.last();\r\n var portPos = port.getAbsolutePosition();\r\n var lastSegmentDir = UP;\r\n if(lastVertex.x === beforeVertex.x){\r\n lastSegmentDir = lastVertex.y< beforeVertex.y ? UP : DOWN;\r\n }\r\n else{\r\n lastSegmentDir = lastVertex.x< beforeVertex.x ? LEFT : RIGHT;\r\n }\r\n\r\n // CALCULATE THE LAST MILE OF THE CONNECTION\r\n //\r\n // ensure that we have a valid \"manhattan style\" connection.\r\n // We must add or adjust some points or segments.\r\n //\r\n // The code below creates and adjust the points in that way that the\r\n // DOTTED line is the calculated part to the user defined vertices.\r\n // ==================================\r\n //\r\n switch(port.getConnectionDirection(this.port1)){\r\n case UP:\r\n switch(lastSegmentDir){\r\n case UP:\r\n // o..................o lastVertex\r\n // | . |\r\n // | . |\r\n // | +----O----+ |\r\n // ------o | portPos | o------------\r\n // | | beforeVertex\r\n // +---------+\r\n //\r\n if(lastVertex.y<(portPos.y-MINDIST)) {\r\n this.vertices.add(new draw2d.geo.Point(portPos.x, lastVertex.y));\r\n this.vertices.add(portPos);\r\n }\r\n // ...................\r\n // . . .\r\n // . +----O----+ .\r\n // o | portPos | o lastVertex\r\n // | | | |\r\n // | +---------+ |\r\n // -------o o------------\r\n // beforeVertex\r\n //\r\n else{\r\n lastVertex.y = portPos.y-MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(portPos.x, lastVertex.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case RIGHT:\r\n // ..............................\r\n // . . .\r\n // . . .\r\n // o------->o +----O----+ o---------------->O\r\n // | | portPos | | beforeVertex lastVertex\r\n // | | | |\r\n // | +---------+\r\n if(lastVertex.y>(portPos.y-MINDIST)){\r\n beforeVertex.y = portPos.y-MINDIST;\r\n lastVertex.x = portPos.x;\r\n lastVertex.y = beforeVertex.y;\r\n this.vertices.add(portPos);\r\n }\r\n //\r\n // beforeVertex lastVertex\r\n // o---------->o..................o------------->O\r\n // | . |\r\n // | +----O----+ |\r\n // | | portPos | |\r\n // | | | |\r\n // +---------+\r\n else{\r\n lastVertex.x = portPos.x;\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case DOWN:\r\n // beforeVertex\r\n // ------o..................o------------\r\n // | . |\r\n // | . |\r\n // V +----O----+ V\r\n // o | portPos | o lastVertex\r\n // | |\r\n // +---------+\r\n //\r\n if(lastVertex.y<(portPos.y-MINDIST)) {\r\n beforeVertex.x = portPos.x;\r\n lastVertex.setPosition(portPos);\r\n }\r\n // ...................\r\n // . . .\r\n // . +----O----+ . beforeVertex\r\n // -------o | portPos | o------------\r\n // | | | |\r\n // V +---------+ V\r\n // o o\r\n // lastVertex\r\n //\r\n else{\r\n lastVertex.y = portPos.y-MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(portPos.x,lastVertex.y ));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case LEFT:\r\n // ..................................\r\n // . . .\r\n // . . .\r\n // o<--------o +----O----+ o<-------------O beforeVertex\r\n // | | portPos | lastVertex |\r\n // | | | |\r\n // +---------+\r\n if(lastVertex.y>(portPos.y-MINDIST)){\r\n beforeVertex.y = portPos.y-MINDIST;\r\n lastVertex.x = portPos.x;\r\n lastVertex.y = beforeVertex.y;\r\n this.vertices.add(portPos);\r\n }\r\n // | |\r\n // | |\r\n // o<--------o................o<-------------O\r\n // . lastVertex beforeVertex\r\n // +----O----+\r\n // | portPos |\r\n // | |\r\n // +---------+\r\n else{\r\n lastVertex.x = portPos.x;\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n }\r\n break;\r\n case RIGHT:\r\n switch(lastSegmentDir){\r\n case UP:\r\n // o lastVertex\r\n // |\r\n // |\r\n // ------------------o beforeVertex\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O.......\r\n // | | .\r\n // +----------+ .\r\n // o lastVertex\r\n // |\r\n // |\r\n // -----------------o beforeVertex\r\n //\r\n if(lastVertex.x > (portPos.x+MINDIST)){\r\n lastVertex.y = portPos.y;\r\n this.vertices.add(portPos);\r\n }\r\n // lastVertex\r\n // o...............\r\n // | .\r\n // | .\r\n // ----o beforeVertex .\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O........\r\n // | | .\r\n // +----------+ .\r\n // o...............\r\n // | lastVertex\r\n // |\r\n //------o\r\n // beforeVertex\r\n //\r\n //\r\n else{\r\n this.vertices.add(new draw2d.geo.Point(portPos.x+MINDIST, lastVertex.y));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x+MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case RIGHT:\r\n // beforeVertex lastVertex\r\n // o-------------->o\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O.......\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // o-------------->o\r\n // beforeVertex lastVertex\r\n //\r\n if(lastVertex.x > (portPos.x+MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // beforeVertex lastVertex\r\n // o------------>o.........\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O.......\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // o----------->o..........\r\n // beforeVertex lastVertex\r\n //\r\n else{\r\n lastVertex.x = portPos.x+MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case DOWN:\r\n // ----------------o beforeVertex\r\n // |\r\n // |\r\n // o lastVertex\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O.......\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // --------------o beforeVertex\r\n // |\r\n // |\r\n // o lastVertex\r\n //\r\n if(lastVertex.x > (portPos.x+MINDIST)){\r\n lastVertex.y = portPos.y;\r\n this.vertices.add(portPos);\r\n }\r\n // -----o beforeVertex\r\n // |\r\n // | lastVertex\r\n // o...........\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O.......\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // ----o beforeVertex .\r\n // | .\r\n // | lastVertex .\r\n // o...............\r\n //\r\n else{\r\n this.vertices.add(new draw2d.geo.Point(portPos.x+MINDIST, lastVertex.y));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x+MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case LEFT:\r\n // lastVertex beforeVertex\r\n // o<--------------o\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O..\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // o<--------------o\r\n // lastVertex beforeVertex\r\n //\r\n if(lastVertex.x > (portPos.x+MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // lastVertex beforeVertex\r\n // o<-----------------------o\r\n // .\r\n // +----------+ .\r\n // | | .\r\n // | portPos O....\r\n // | | .\r\n // +----------+ .\r\n // .\r\n // o<----------------------o\r\n // lastVertex beforeVertex\r\n //\r\n else{\r\n lastVertex.x = portPos.x+MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n }\r\n break;\r\n case DOWN:\r\n switch(lastSegmentDir){\r\n case UP:\r\n // o o lastVertex\r\n // | |\r\n // | |\r\n // | +---------+ |\r\n // ------o | | o------------\r\n // . | portPos | . beforeVertex\r\n // . +----O----+ .\r\n // . . .\r\n // ....................\r\n //\r\n if(lastVertex.y<(portPos.y+MINDIST)) {\r\n lastVertex.y = portPos.y+MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(portPos.x, lastVertex.y));\r\n this.vertices.add(portPos);\r\n }\r\n // +---------+\r\n // | |\r\n // | portPos |\r\n // +----O----+\r\n // .\r\n // o.................o lastVertex\r\n // | |\r\n // | |\r\n // -------o o------------\r\n // beforeVertex\r\n //\r\n else{\r\n lastVertex.x = portPos.x;\r\n lastVertex.y = portPos.y;\r\n beforeVertex.x = portPos.x;\r\n }\r\n break;\r\n case RIGHT:\r\n // +---------+\r\n // | |\r\n // | portPos |\r\n // o------->o +----O----+ o--------------->O\r\n // | . . | beforeVertex . lastVertex\r\n // | .....................|.................\r\n // |\r\n //\r\n //\r\n if(lastVertex.y<(portPos.y+MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y+MINDIST));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x, portPos.y+MINDIST));\r\n this.vertices.add(portPos);\r\n }\r\n // +---------+\r\n // | |\r\n // | portPos |\r\n // +----O----+\r\n // .\r\n // ...................................\r\n // . beforeVertex . lastVertex\r\n // o---------->o o------------->O\r\n // | |\r\n // | |\r\n //\r\n else{\r\n lastVertex.x = portPos.x;\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case DOWN:\r\n // beforeVertex\r\n // ------o o------------\r\n // | |\r\n // | |\r\n // V +---------+ V\r\n // o | | o lastVertex\r\n // . | portPos | .\r\n // . +----O----+ .\r\n // . . .\r\n // ....................\r\n //\r\n if(lastVertex.y<(portPos.y+MINDIST)) {\r\n lastVertex.y = portPos.y+MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(portPos.x,lastVertex.y ));\r\n this.vertices.add(portPos);\r\n }\r\n //\r\n // +---------+ beforeVertex\r\n // -------o | portPos | o------------\r\n // | | | |\r\n // V +----O----+ V\r\n // o . o\r\n // .................. lastVertex\r\n //\r\n else{\r\n this.vertices.add(new draw2d.geo.Point(portPos.x,lastVertex.y ));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case LEFT:\r\n //\r\n // o<--------o +---------+ o<-------------O beforeVertex\r\n // . | | | . lastVertex |\r\n // . | | portPos | . |\r\n // . +----O----+ .\r\n // . . .\r\n // ..............................\r\n //\r\n if(lastVertex.y<(portPos.y-MINDIST)){\r\n beforeVertex.y = portPos.y-MINDIST;\r\n lastVertex.x = portPos.x;\r\n lastVertex.y = beforeVertex.y;\r\n this.vertices.add(portPos);\r\n }\r\n //\r\n // +---------+\r\n // | | | |\r\n // | | portPos | |\r\n // | +----O----+ |\r\n // | . |\r\n // o<--------o...................o<---------o\r\n //\r\n else{\r\n lastVertex.x = portPos.x;\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n }\r\n break;\r\n case LEFT:\r\n switch(lastSegmentDir){\r\n case UP:\r\n // ................o lastVertex\r\n // . |\r\n // . |\r\n // --.---------------o beforeVertex\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ....o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // ................o lastVertex\r\n // |\r\n // |\r\n // -----------------o beforeVertex\r\n //\r\n if(lastVertex.x >= (portPos.x-MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, lastVertex.y));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n //\r\n // +----------+\r\n // | |\r\n // ......o portPos |\r\n // . | |\r\n // . +----------+\r\n // o\r\n // | lastVertex\r\n // |\r\n //------o\r\n // beforeVertex\r\n //\r\n //\r\n else if(lastVertex.y > portPos.y && lastVertex.x < (portPos.x-MINDIST)){\r\n lastVertex.y = portPos.y;\r\n this.vertices.add(portPos);\r\n }\r\n // lastVertex\r\n // o..\r\n // | .\r\n // | .\r\n // ----o . beforeVertex\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ....o portPos |\r\n // | |\r\n // +----------+\r\n //\r\n else{\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, lastVertex.y));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case RIGHT:\r\n // beforeVertex lastVertex\r\n // o-------------->o\r\n // .\r\n // ....................\r\n // .\r\n // . +----------+\r\n // . | |\r\n // .......o portPos |\r\n // | |\r\n // +----------+\r\n //\r\n if(lastVertex.y<portPos.y && lastVertex.x > (portPos.x-MINDIST)){\r\n var center = portPos.y-(portPos.y-lastVertex.y)/2;\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, center));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, center));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // +----------+\r\n // | |\r\n // .......o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // ....................\r\n // .\r\n // o-------------->o\r\n // beforeVertex lastVertex\r\n //\r\n else if(lastVertex.y>portPos.y && lastVertex.x > (portPos.x-MINDIST)){\r\n var center = portPos.y+(lastVertex.y-portPos.y)/2;\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, center));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, center));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // beforeVertex lastVertex\r\n // o------------>o\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ....o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // o----------->o\r\n // beforeVertex lastVertex\r\n //\r\n else{\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case DOWN:\r\n // -----------o beforeVertex\r\n // |\r\n // |\r\n // V\r\n // ................o lastVertex\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ........o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // . --------o beforeVertex\r\n // . |\r\n // . |\r\n // . V\r\n // .................o lastVertex\r\n //\r\n if(lastVertex.x >= (portPos.x-MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, lastVertex.y));\r\n this.vertices.add(new draw2d.geo.Point(portPos.x-MINDIST, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // -----o beforeVertex\r\n // |\r\n // |\r\n // o lastVertex\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ........o portPos |\r\n // . | |\r\n // . +----------+\r\n // beforeVertex.\r\n // ------------o\r\n // |\r\n // |\r\n // lastVertex o\r\n //\r\n else{\r\n lastVertex.y=portPos.y;\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n case LEFT:\r\n // lastVertex beforeVertex\r\n // o<--------------o\r\n // .\r\n // . +----------+\r\n // . | |\r\n // ....... o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // o<--------------o\r\n // lastVertex beforeVertex\r\n //\r\n if(lastVertex.x < (portPos.x-MINDIST)){\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n // lastVertex beforeVertex\r\n // .......o<-----------------------o\r\n // .\r\n // . +----------+\r\n // . | |\r\n // .....o portPos |\r\n // . | |\r\n // . +----------+\r\n // .\r\n // ........o<----------------------o\r\n // lastVertex beforeVertex\r\n //\r\n else{\r\n lastVertex.x = portPos.x-MINDIST;\r\n this.vertices.add(new draw2d.geo.Point(lastVertex.x, portPos.y));\r\n this.vertices.add(portPos);\r\n }\r\n break;\r\n }\r\n break;\r\n }\r\n\r\n if(this.vertices.getSize()>3) {\r\n connection._routingMetaData.routedByUserInteraction = true;\r\n connection.setVertices(this.vertices);\r\n }\r\n this.vertices.clear();\r\n }\r\n }\r\n\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onMouseMove: function(canvas, x, y, shiftKey, ctrlKey)\r\n {\r\n if(this.beeline!==null){\r\n this.beeline.setEndPosition(this.orthogonal(this.vertices.last(), {x:x,y:y}));\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the user press a key down\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {Number} keyCode the pressed key\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onKeyDown: function(canvas, keyCode, shiftKey, ctrlKey)\r\n {\r\n var KEYCODE_ENTER = 13;\r\n var KEYCODE_ESC = 27;\r\n if (keyCode === KEYCODE_ESC && this.beeline!==null){\r\n this.beeline.hide();\r\n this.tempConnection.hide();\r\n this.beeline = null;\r\n this.port1=null;\r\n this.vertices.clear();\r\n if(this.pulse!=null) {\r\n this.pulse.remove();\r\n this.pulse=null;\r\n }\r\n }\r\n },\r\n\r\n orthogonal: function(anchor, p)\r\n {\r\n // calculate vertical line distance\r\n //\r\n var xDiff = Math.abs(anchor.x- p.x)+10;\r\n var xDist = draw2d.geo.Line.distance(anchor.x-xDiff, anchor.y, anchor.x+xDiff, anchor.y, p.x, p.y);\r\n\r\n // calculate horizontal line distance\r\n //\r\n var yDiff = Math.abs(anchor.y- p.y)+10;\r\n var yDist = draw2d.geo.Line.distance(anchor.x, anchor.y-yDiff, anchor.x, anchor.y+yDiff, p.x, p.y);\r\n\r\n return yDist>xDist? {x: p.x, y:anchor.y}:{x: anchor.x, y: p.y};\r\n },\r\n\r\n createConnection: function()\r\n {\r\n var connection = this._super();\r\n connection.attr({radius:7, stroke:3});\r\n connection.setRouter(new draw2d.layout.connection.InteractiveManhattanConnectionRouter());\r\n return connection;\r\n }\r\n\r\n});\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Provide support for selecting and positioning a non-resizable figure.\r\n * Selection is indicated via rectangular handle that outlines the figure with a 1-pixel black\r\n * dotted line.\r\n *\r\n *\r\n * @example\r\n *\r\n * circle =new draw2d.shape.basic.Circle({diameter:50, x:90, y:50});\r\n * circle.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy());\r\n * canvas.add(circle);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.AntSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.AntSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.AntSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {draw2d.Canvas} canvas the responsible canvas\r\n * @param {draw2d.Figure} figure the figure to decorate with a selection feedback\r\n * @param {Boolean} [isPrimarySelection]\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n let box = new draw2d.shape.basic.Rectangle({bgColor: null, dasharray: \"- \", color: \"#2C70FF\"})\r\n box.hide = function () {\r\n // IMPORTANT\r\n // don't add/remove this rectangle to the canvas resizeHandles. This rect isn't responsible for any hitTest or\r\n // dragDrop operation\r\n //canvas.resizeHandles.remove(box);\r\n box.setCanvas(null)\r\n }\r\n box.show = function (canvas) {\r\n box.setCanvas(canvas)\r\n // IMPORTANT\r\n // don't add/remove this rectangle to the canvas resizeHandles. This rect isn't responsible for any hitTest or\r\n // dragDrop operation\r\n //canvas.resizeHandles.remove(box);\r\n //canvas.resizeHandles.add(box);\r\n box.shape.toFront()\r\n }\r\n box.show(canvas)\r\n figure.selectionHandles.add(box)\r\n\r\n // add a bee line to the parent if a parent is given and if the bounding box\r\n // of the parent and the figure didn't have intersections\r\n if (figure.getParent() !== null) {\r\n let line = new draw2d.shape.basic.Line({opacity: 0.5, bgColor: null, dasharray: \"- \", color: \"#2C70FF\"})\r\n //line.setStartPosition(figure.getBoundingBox().getCenter());\r\n //line.setEndPosition(figure.getParent().getBoundingBox().getCenter());\r\n line.show = (canvas) => line.setCanvas(canvas)\r\n line.hide = () => line.setCanvas(null)\r\n line.show(canvas)\r\n figure.selectionHandles.add(line)\r\n this._updateBeeLine(line, figure)\r\n }\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback if the figure has been moved\r\n *\r\n * @param figure\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n return // silently\r\n }\r\n\r\n let margin = 2\r\n let box = figure.selectionHandles.first()\r\n box.setPosition(figure.getAbsolutePosition().translate(-margin, -margin))\r\n box.setDimension(figure.getWidth() + margin*2, figure.getHeight() + margin*2)\r\n box.setRotationAngle(figure.getRotationAngle())\r\n\r\n if (figure.selectionHandles.getSize() > 1) {\r\n this._updateBeeLine(figure.selectionHandles.get(1), figure)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * @param {draw2d.shape.basic.Line} line\r\n * @param {draw2d.Figure} figure\r\n * @private\r\n */\r\n _updateBeeLine: function (line, figure) {\r\n let parent = figure.getParent()\r\n\r\n if (parent === null) {\r\n return\r\n }\r\n\r\n if (parent instanceof draw2d.shape.basic.Line) {\r\n let center = figure.getBoundingBox().getCenter()\r\n let projection = parent.pointProjection(center)\r\n if (projection === null) {\r\n let p1 = line.getStartPosition()\r\n let p2 = line.getEndPosition()\r\n let d1 = center.distance(p1)\r\n let d2 = center.distance(p1)\r\n projection = d1 < d2 ? p1 : p2\r\n }\r\n let intersection = figure.getBoundingBox().intersectionWithLine(center, projection)\r\n if (intersection.getSize() > 0) {\r\n line.setStartPosition(figure.getBoundingBox().intersectionWithLine(center, projection).get(0))\r\n .setEndPosition(projection)\r\n }\r\n else {\r\n line.setStartPosition(figure.getBoundingBox().getCenter())\r\n .setEndPosition(projection)\r\n }\r\n }\r\n else {\r\n let rect1 = figure.getBoundingBox(),\r\n rect2 = parent.getBoundingBox()\r\n\r\n let center1 = rect1.getCenter()\r\n let center2 = rect2.getCenter()\r\n // the rectangle overlaps -> return the center of booth\r\n if (rect1.intersects(rect2)) {\r\n line.setStartPosition(center1)\r\n .setEndPosition(center2)\r\n }\r\n // one rect is inside the other rect\r\n //\r\n else if (rect1.hitTest(center2) || rect2.hitTest(center1)) {\r\n line.setStartPosition(center1)\r\n .setEndPosition(center2)\r\n }\r\n else {\r\n rect1.scale(3, 3)\r\n rect2.scale(3, 3)\r\n\r\n line.setStartPosition(rect1.intersectionWithLine(center1, center2).get(0))\r\n .setEndPosition(rect2.intersectionWithLine(center1, center2).get(0))\r\n }\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * circle =new draw2d.shape.basic.Circle();\r\n * circle.installEditPolicy(new draw2d.policy.figure.BigRectangleSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.BigRectangleSelectionFeedbackPolicy = draw2d.policy.figure.RectangleSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.BigRectangleSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.BigRectangleSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n\r\n createResizeHandle: function (owner, type){\r\n return new draw2d.ResizeHandle({ owner:owner, type:type, width:15, height:15 });\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.BusSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.BusSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.BusSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n let r2 = this.createResizeHandle(figure, 2) // 2 = CENTER_TOP\r\n let r4 = this.createResizeHandle(figure, 4) // 4 = RIGHT_MIDDLE\r\n let r6 = this.createResizeHandle(figure, 6) // 6 = CENTER_BOTTOM\r\n let r8 = this.createResizeHandle(figure, 8) // 8 = LEFT_MIDDLE\r\n\r\n figure.selectionHandles.add(r2, r4, r6, r8)\r\n\r\n r2.setDraggable(figure.isResizeable())\r\n r4.setDraggable(figure.isResizeable())\r\n r6.setDraggable(figure.isResizeable())\r\n r8.setDraggable(figure.isResizeable())\r\n\r\n r2.show(canvas)\r\n r4.show(canvas)\r\n r6.show(canvas)\r\n r8.show(canvas)\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback if the figure has been moved\r\n *\r\n * @param figure\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n return // silently\r\n }\r\n let r2 = figure.selectionHandles.find(handle => handle.type === 2)\r\n let r4 = figure.selectionHandles.find(handle => handle.type === 4)\r\n let r6 = figure.selectionHandles.find(handle => handle.type === 6)\r\n let r8 = figure.selectionHandles.find(handle => handle.type === 8)\r\n\r\n let objHeight = figure.getHeight()\r\n let objWidth = figure.getWidth()\r\n let xPos = figure.getX()\r\n let yPos = figure.getY()\r\n\r\n r2?.setPosition(xPos + (objWidth / 2) - (r2.getWidth() / 2), yPos - r2.getHeight())\r\n r4?.setPosition(xPos + objWidth, yPos + (objHeight / 2) - (r4.getHeight() / 2))\r\n r6?.setPosition(xPos + (objWidth / 2) - (r6.getWidth() / 2), yPos + objHeight)\r\n r8?.setPosition(xPos - r8.getWidth(), yPos + (objHeight / 2) - (r8.getHeight() / 2))\r\n },\r\n\r\n createResizeHandle: function (owner, type){\r\n return new draw2d.ResizeHandle({ owner:owner, type:type, width:10, height:10 });\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Called by the framework if the user edit the position of a figure with a drag drop operation.\r\n * Sub class like SelectionEditPolicy or RegionEditPolicy can adjust the position of the figure or the selections handles.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.FigureEditPolicy\r\n */\r\ndraw2d.policy.figure.DragDropEditPolicy = draw2d.policy.figure.FigureEditPolicy.extend(\r\n /** @lends draw2d.policy.figure.DragDropEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.DragDropEditPolicy\",\r\n\r\n /**\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n this.moveCallback = (emitter, event) => {\r\n this.moved(emitter.getCanvas(), emitter)\r\n }\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the host if the policy has been installed.\r\n *\r\n * @param {draw2d.Canvas|draw2d.Figure} host\r\n */\r\n onInstall: function (host) {\r\n this._super(host)\r\n host.on(\"move\", this.moveCallback)\r\n },\r\n\r\n /**\r\n *\r\n * Called by the host if the policy has been uninstalled.\r\n *\r\n * @param {draw2d.Canvas|draw2d.Figure} host\r\n */\r\n onUninstall: function (host) {\r\n this._super(host)\r\n host.off(this.moveCallback)\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the related shape has init a drag&drop\r\n * operation\r\n *\r\n * The Policy can send a veto to prevent the DragDrop operation\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} return <b>false</b> to send a veto to the drag operation\r\n */\r\n onDragStart: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n figure.shape.attr({cursor: \"move\"})\r\n\r\n // this happens if you drag&drop the shape outside of the screen and\r\n // release the mouse button outside the window. We restore the alpha\r\n // with the next drag&drop operation\r\n if (figure.isMoving === true) {\r\n figure.setAlpha(figure.originalAlpha)\r\n }\r\n\r\n figure.originalAlpha = figure.getAlpha()\r\n figure.isMoving = false\r\n\r\n // return value since 6.1.0\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework during drag a figure.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @template\r\n */\r\n onDrag: function (canvas, figure) {\r\n // enable the alpha blending of the first real move of the object\r\n //\r\n if (figure.isMoving === false) {\r\n figure.isMoving = true\r\n figure.setAlpha(figure.originalAlpha * 0.4)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the drag drop operation ends.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n */\r\n onDragEnd: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n figure.shape.attr({cursor: \"default\"})\r\n figure.isMoving = false\r\n figure.setAlpha(figure.originalAlpha)\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the coordinates to the rectangle/region of this constraint.\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {Number} [y]\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n *\r\n * @template\r\n */\r\n adjustPosition: function (figure, x, y) {\r\n // do nothing per default implementation\r\n if (x instanceof draw2d.geo.Point) {\r\n return x\r\n }\r\n\r\n return new draw2d.geo.Point(x, y)\r\n },\r\n\r\n /**\r\n *\r\n * ensure that the dimension didn't goes outside the given restrictions\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {Number} w\r\n * @param {number} h\r\n * @returns {draw2d.geo.Rectangle} the constraint position of the figure\r\n */\r\n adjustDimension: function (figure, w, h) {\r\n return new draw2d.geo.Rectangle(0, 0, w, h)\r\n },\r\n\r\n /**\r\n *\r\n * Callback if the figure has moved\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Called by the framework if the user edit the position of a figure with a drag drop operation.\r\n * Sub class like SelectionEditPolicy or RegionEditPolicy can adjust the position of the figure\r\n * or the selections handles.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.EditPolicy\r\n * @since 4.4.0\r\n */\r\ndraw2d.policy.figure.FigureEditPolicy = draw2d.policy.EditPolicy.extend(\r\n /** @lends draw2d.policy.figure.FigureEditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.FigureEditPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n * \r\n * Called if the user press the right mouse on the figure.<br>\r\n * You can either override the \"onContextMenu\" method of the figure or install an editor policy and override this method.\r\n * Booth is valid and possible.\r\n *\r\n * @param {draw2d.Figure|draw2d.shape.basic.Line} figure the figure below the mouse\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n * @since 4.4.0\r\n */\r\n onRightMouseDown: function (figure, x, y, shiftKey, ctrlKey) {\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * circle =new draw2d.shape.basic.Circle();\r\n * circle.installEditPolicy(new draw2d.policy.figure.GlowSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label(\"Click on the circle to see the selection feedback\"),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.GlowSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.GlowSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.GlowSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n figure.setGlow(true)\r\n this.moved(canvas, figure)\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Figure} figure the unselected figure\r\n */\r\n onUnselect: function (canvas, figure) {\r\n this._super(canvas, figure)\r\n figure.setGlow(false)\r\n }\r\n\r\n})\r\n","\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.BusSelectionFeedbackPolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.figure.HBusSelectionFeedbackPolicy = draw2d.policy.figure.BusSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.HBusSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.HBusSelectionFeedbackPolicy\",\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function( attr, setter, getter)\r\n {\r\n this._super( attr, setter, getter);\r\n },\r\n\r\n /**\r\n * \r\n * Callback if the figure has been moved\r\n *\r\n * @param figure\r\n *\r\n * @template\r\n */\r\n moved: function(canvas, figure){\r\n if(figure.selectionHandles.isEmpty()){\r\n return; // silently\r\n }\r\n var r4= figure.selectionHandles.find(function(handle){return handle.type===4});\r\n var r8= figure.selectionHandles.find(function(handle){return handle.type===8});\r\n\r\n r4.setDimension(r4.getWidth(), figure.getHeight());\r\n r8.setDimension(r4.getWidth(), figure.getHeight());\r\n\r\n this._super(canvas,figure);\r\n }\r\n\r\n\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * An EditPolicy for use with Figures. With this edit policy you can move the shape only in a horizontal manner.\r\n *\r\n *\r\n * @example\r\n * // add some demo figure to the canvas\r\n * var circle =new draw2d.shape.basic.Circle({diameter:50, x:10, y:30});\r\n * canvas.add(circle);\r\n *\r\n * // add the edit policy to the shape. At this point you can move the shape only\r\n * // horizontal\r\n * circle.installEditPolicy(new draw2d.policy.figure.HorizontalEditPolicy());\r\n *\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.figure.HorizontalEditPolicy = draw2d.policy.figure.DragDropEditPolicy.extend(\r\n /** @lends draw2d.policy.figure.HorizontalEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.HorizontalEditPolicy\",\r\n\r\n /**\r\n * Creates a new constraint object\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * It is only possible to drag&drop the element in a horizontal line\r\n *\r\n * @param figure\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {number} [y]\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n adjustPosition: function (figure, x, y) {\r\n return new draw2d.geo.Point(x, figure.getY())\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A SelectionFeedbackPolicy with resize handles (rectangles) on each side and corner of the shape\r\n *\r\n *\r\n * @example\r\n *\r\n * circle =new draw2d.shape.basic.Circle({diameter:50});\r\n * circle.installEditPolicy(new draw2d.policy.RectangleSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.RaftSelectionFeedbackPolicy = draw2d.policy.figure.RectangleSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.RaftSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.RaftSelectionFeedbackPolicy\",\r\n\r\n\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n createResizeHandle: function (owner, type){\r\n return new draw2d.shape.composite.RaftResizeHandle({ owner:owner, type:type, width:10, height:10 });\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A SelectionFeedbackPolicy with resize handles (rectangles) on each side and corner of the shape\r\n *\r\n *\r\n * @example\r\n *\r\n * circle =new draw2d.shape.basic.Circle({diameter:50});\r\n * circle.installEditPolicy(new draw2d.policy.RectangleSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.RectangleSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.RectangleSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.RectangleSelectionFeedbackPolicy\",\r\n /**\r\n * Creates a selection feedback for a shape.\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n // Add a dotted line rectangle to the figure. Override the show/hide method of the standard\r\n // figure to avoid adding these element to the hit test of the canvas. In this case the element\r\n // is just visible but not part of the model or responsible for any drag/drop operation\r\n // #2C70FF #2096fc\r\n let box = new draw2d.shape.basic.Rectangle({bgColor: null, dashArray: \"- \", color: \"#2C70FF\", stroke: 0.5})\r\n box.hide = function () {\r\n // IMPORTANT\r\n // don't add/remove this rectangle to the canvas resizeHandles. This rect isn't responsible for any hitTest or\r\n // dragDrop operation\r\n //canvas.resizeHandles.remove(box);\r\n box.setCanvas(null)\r\n }\r\n box.show = function (canvas) {\r\n box.setCanvas(canvas)\r\n // IMPORTANT\r\n // don't add/remove this rectangle to the canvas resizeHandles. This rect isn't responsible for any hitTest or\r\n // dragDrop operation\r\n //canvas.resizeHandles.remove(box);\r\n //canvas.resizeHandles.add(box);\r\n box.toFront(figure)\r\n }\r\n\r\n // create standard Resize handles for the figure\r\n //\r\n let r1 = this.createResizeHandle(figure, 1) // 1 = LEFT TOP\r\n let r3 = this.createResizeHandle(figure, 3) // 3 = RIGHT_TOP\r\n let r5 = this.createResizeHandle(figure, 5) // 5 = RIGHT_BOTTOM\r\n let r7 = this.createResizeHandle(figure, 7) // 7 = LEFT_BOTTOM\r\n figure.selectionHandles.add(r1, r3, r5, r7)\r\n r1.show(canvas)\r\n r3.show(canvas)\r\n r5.show(canvas)\r\n r7.show(canvas)\r\n\r\n\r\n // change the look&feel of the corner resizehandles if the\r\n // figure isn't resizeable\r\n //\r\n if (figure.isResizeable() === false) {\r\n let attr = {bgColor: null, draggable:false}\r\n r1.attr(attr)\r\n r3.attr(attr)\r\n r5.attr(attr)\r\n r7.attr(attr)\r\n r1.setDraggable(false)\r\n r3.setDraggable(false)\r\n r5.setDraggable(false)\r\n r7.setDraggable(false)\r\n }\r\n\r\n // show only the additional resizehandles if the figure is resizeable and didn't care about\r\n // the aspect ration\r\n //\r\n if ((!figure.getKeepAspectRatio()) && figure.isResizeable()) {\r\n let r2 = this.createResizeHandle(figure, 2) // 2 = CENTER_TOP\r\n let r4 = this.createResizeHandle(figure, 4) // 4 = RIGHT_MIDDLE\r\n let r6 = this.createResizeHandle(figure, 6) // 6 = CENTER_BOTTOM\r\n let r8 = this.createResizeHandle(figure, 8) // 8 = LEFT_MIDDLE\r\n figure.selectionHandles.add(r2, r4, r6, r8)\r\n r2.show(canvas)\r\n r4.show(canvas)\r\n r6.show(canvas)\r\n r8.show(canvas)\r\n }\r\n\r\n // add the reference of the \"ant box\" to the figure as well. But wee add them\r\n // to the end of the array because inherit classes expect the resizehandles\r\n // on index 0-7.\r\n //\r\n figure.selectionHandles.add(box)\r\n\r\n // call the box.show() at last to ensure that the resize handles are above the\r\n // rectangle. The rectangle did a toFront(parentShape);\r\n box.show(canvas)\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Callback if the figure has been moved. In this case we must update the position of the\r\n * resize handles and the \"ant\" box.\r\n *\r\n * @param figure\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n\r\n if (figure.selectionHandles.isEmpty()) {\r\n return // silently\r\n }\r\n\r\n let margin = 3 * canvas.getZoom()\r\n let objHeight = figure.getHeight()\r\n let objWidth = figure.getWidth()\r\n let xPos = figure.getAbsoluteX()\r\n let yPos = figure.getAbsoluteY()\r\n\r\n let r1 = figure.selectionHandles.find(handle => handle.type === 1)\r\n let r3 = figure.selectionHandles.find(handle => handle.type === 3)\r\n let r5 = figure.selectionHandles.find(handle => handle.type === 5)\r\n let r7 = figure.selectionHandles.find(handle => handle.type === 7)\r\n\r\n r1.setPosition(xPos-r1.getWidth(),yPos-r1.getHeight());\r\n r3.setPosition(xPos+objWidth,yPos-r3.getHeight());\r\n r5.setPosition(xPos+objWidth,yPos+objHeight);\r\n r7.setPosition(xPos-r7.getWidth(),yPos+objHeight);\r\n\r\n if (!figure.getKeepAspectRatio() && figure.isResizeable()) {\r\n let r2 = figure.selectionHandles.find(handle => handle.type === 2)\r\n let r4 = figure.selectionHandles.find(handle => handle.type === 4)\r\n let r6 = figure.selectionHandles.find(handle => handle.type === 6)\r\n let r8 = figure.selectionHandles.find(handle => handle.type === 8)\r\n\r\n r2.setPosition(xPos+(objWidth/2)-(r2.getWidth()/2),yPos-r2.getHeight());\r\n r4.setPosition(xPos+objWidth,yPos+(objHeight/2)-(r4.getHeight()/2));\r\n r6.setPosition(xPos+(objWidth/2)-(r6.getWidth()/2),yPos+objHeight);\r\n r8.setPosition(xPos-r8.getWidth(),yPos+(objHeight/2)-(r8.getHeight()/2));\r\n }\r\n let box = figure.selectionHandles.last()\r\n box.attr({\r\n x:xPos-margin,\r\n y:yPos-margin,\r\n width:objWidth + margin*2,\r\n height: objHeight + margin*2,\r\n stroke:canvas.getZoom()\r\n })\r\n\r\n box.setRotationAngle(figure.getRotationAngle())\r\n },\r\n\r\n createResizeHandle: function (owner, type){\r\n return new draw2d.ResizeHandle({ owner:owner, type:type, width:10, height:10 });\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * An EditPolicy for use with Figures. The constraint for RegionEditPolicy is a Rectangle. It is\r\n * not possible to move the related figure outside this constrained area.\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.figure.RegionEditPolicy = draw2d.policy.figure.DragDropEditPolicy.extend(\r\n /** @lends draw2d.policy.figure.RegionEditPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.RegionEditPolicy\",\r\n\r\n /**\r\n * Creates a new constraint object\r\n *\r\n * @param {Number|draw2d.geo.Rectangle} x x coordinate or a rectangle as constraint for the assigned figure.\r\n * @param {Number} y\r\n * @param {Number} w\r\n * @param {Number} h\r\n */\r\n init: function (x, y, w, h) {\r\n this._super()\r\n if (x instanceof draw2d.geo.Rectangle) {\r\n this.constRect = x\r\n } else if (typeof h === \"number\") {\r\n this.constRect = new draw2d.geo.Rectangle(x, y, w, h)\r\n } else {\r\n throw \"Invalid parameter. RegionEditPolicy need a rectangle as parameter in the constructor\"\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Update the constraint bounding box for the policy.\r\n *\r\n * @param {draw2d.geo.Rectangle} boundingBox the constraint rectangle\r\n * @since 4.8.2\r\n * @returns {this}\r\n */\r\n setBoundingBox: function (boundingBox) {\r\n this.constRect = boundingBox\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns the constraint bounding box for the policy.\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n */\r\n getBoundingBox: function () {\r\n return this.constRect\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the coordinates to the rectangle/region of this constraint.\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {Number} [y]\r\n *\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n adjustPosition: function (figure, x, y) {\r\n let r = null\r\n if (x instanceof draw2d.geo.Point) {\r\n r = new draw2d.geo.Rectangle(x.x, x.y, figure.getWidth(), figure.getHeight())\r\n } else {\r\n r = new draw2d.geo.Rectangle(x, y, figure.getWidth(), figure.getHeight())\r\n }\r\n r = this.constRect.moveInside(r)\r\n return r.getTopLeft()\r\n },\r\n\r\n /**\r\n *\r\n * Adjust the dimension of the rectangle to fit into the region of the policy\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {Number} w\r\n * @param {Number} h\r\n * @returns {draw2d.geo.Rectangle} the constraint position of the figure\r\n */\r\n adjustDimension: function (figure, w, h) {\r\n let diffW = (figure.getAbsoluteX() + w) - this.constRect.getRight()\r\n let diffH = (figure.getAbsoluteY() + h) - this.constRect.getBottom()\r\n\r\n if (diffW > 0) {\r\n w = w - diffW\r\n }\r\n if (diffH > 0) {\r\n h = h - diffH\r\n }\r\n\r\n return new draw2d.geo.Rectangle(0, 0, w, h)\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Selection feedback policy without \"marching ant lines\" or any other rectangle highlight. Just\r\n * some resize handles at each corner of the shape.\r\n *\r\n *\r\n * @example\r\n * circle =new draw2d.shape.basic.Circle();\r\n * circle.installEditPolicy(new draw2d.policy.ResizeSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @since 4.0.0\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n *\r\n */\r\ndraw2d.policy.figure.ResizeSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.ResizeSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.ResizeSelectionFeedbackPolicy\",\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the selected figure\r\n * @param {Boolean} [isPrimarySelection]\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n\r\n if (figure.selectionHandles.isEmpty()) {\r\n // create standard Resize handles for the figure\r\n //\r\n var r1 = draw2d.Configuration.factory.createResizeHandle(figure, 1) // 1 = LEFT TOP\r\n var r3 = draw2d.Configuration.factory.createResizeHandle(figure, 3) // 3 = RIGHT_TOP\r\n var r5 = draw2d.Configuration.factory.createResizeHandle(figure, 5) // 5 = RIGHT_BOTTOM\r\n var r7 = draw2d.Configuration.factory.createResizeHandle(figure, 7) // 7 = LEFT_BOTTOM\r\n figure.selectionHandles.add(r1, r3, r5, r7)\r\n r1.show(canvas)\r\n r3.show(canvas)\r\n r5.show(canvas)\r\n r7.show(canvas)\r\n\r\n // The corner ResizeHandles are only draggable fi the figure is\r\n // resizeable. But the Resize handles are visible\r\n //\r\n\r\n // change the look&feel of the corner resizehandles if the\r\n // figure isn't resizeable\r\n //\r\n if (figure.isResizeable() === false) {\r\n r1.setBackgroundColor(null)\r\n r3.setBackgroundColor(null)\r\n r5.setBackgroundColor(null)\r\n r7.setBackgroundColor(null)\r\n r1.setDraggable(false)\r\n r3.setDraggable(false)\r\n r5.setDraggable(false)\r\n r7.setDraggable(false)\r\n }\r\n\r\n // show only the additional resizehandles if the figure is resizeable\r\n //\r\n if ((!figure.getKeepAspectRatio()) && figure.isResizeable()) {\r\n var r2 = draw2d.Configuration.factory.createResizeHandle(figure, 2) // 2 = CENTER_TOP\r\n var r4 = draw2d.Configuration.factory.createResizeHandle(figure, 4) // 4 = RIGHT_MIDDLE\r\n var r6 = draw2d.Configuration.factory.createResizeHandle(figure, 6) // 6 = CENTER_BOTTOM\r\n var r8 = draw2d.Configuration.factory.createResizeHandle(figure, 8) // 8 = LEFT_MIDDLE\r\n figure.selectionHandles.add(r2, r4, r6, r8)\r\n r2.show(canvas)\r\n r4.show(canvas)\r\n r6.show(canvas)\r\n r8.show(canvas)\r\n }\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n /**\r\n *\r\n * Callback if the figure has been moved. In this case we must update the position of the\r\n * resize handles.\r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Figure} figure the moved figure\r\n *\r\n */\r\n moved: function (canvas, figure) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n return // silently\r\n }\r\n\r\n var objHeight = figure.getHeight()\r\n var objWidth = figure.getWidth()\r\n var xPos = figure.getX()\r\n var yPos = figure.getY()\r\n\r\n var r1 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 1\r\n })\r\n var r3 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 3\r\n })\r\n var r5 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 5\r\n })\r\n var r7 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 7\r\n })\r\n r1.setPosition(xPos - r1.getWidth(), yPos - r1.getHeight())\r\n r3.setPosition(xPos + objWidth, yPos - r3.getHeight())\r\n r5.setPosition(xPos + objWidth, yPos + objHeight)\r\n r7.setPosition(xPos - r7.getWidth(), yPos + objHeight)\r\n\r\n if (!figure.getKeepAspectRatio()) {\r\n var r2 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 2\r\n })\r\n var r4 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 4\r\n })\r\n var r6 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 6\r\n })\r\n var r8 = figure.selectionHandles.find(function (handle) {\r\n return handle.type === 8\r\n })\r\n\r\n r2.setPosition(xPos + (objWidth / 2) - (r2.getWidth() / 2), yPos - r2.getHeight())\r\n r4.setPosition(xPos + objWidth, yPos + (objHeight / 2) - (r4.getHeight() / 2))\r\n r6.setPosition(xPos + (objWidth / 2) - (r6.getWidth() / 2), yPos + objHeight)\r\n r8.setPosition(xPos - r8.getWidth(), yPos + (objHeight / 2) - (r8.getHeight() / 2))\r\n }\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n * circle =new draw2d.shape.basic.Circle();\r\n * circle.installEditPolicy(new draw2d.policy.RoundRectangleSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.RectangleSelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.RoundRectangleSelectionFeedbackPolicy = draw2d.policy.figure.RectangleSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.RoundRectangleSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.RoundRectangleSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n createResizeHandle: function (owner, type) {\r\n return new draw2d.ResizeHandle({owner: owner, type: type, width: 12, height: 12, radius: 4})\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A {@link draw2d.policy.SelectionFeedbackPolicy} that is sensitive to the canvas selection. Subclasses will typically\r\n * decorate the {@link draw2d.Figure figure} with things like selection handles and/or focus feedback.\r\n * <br>\r\n * If you want to change the handle visibility for a figure, then you should use SelectionFeedbackPolicy to do that.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.figure.SelectionFeedbackPolicy = draw2d.policy.figure.SelectionPolicy.extend(\r\n /** @lends draw2d.policy.figure.SelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.SelectionFeedbackPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Figure} figure the unselected figure\r\n */\r\n onUnselect: function (canvas, figure) {\r\n this._super(canvas, figure)\r\n\r\n figure.selectionHandles.each( (i, e) => e.hide())\r\n figure.selectionHandles = new draw2d.util.ArrayList()\r\n },\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been installed.\r\n *\r\n * @param {draw2d.Figure} figure\r\n */\r\n onInstall: function (figure) {\r\n this._super(figure)\r\n\r\n let canvas = figure.getCanvas()\r\n if (canvas !== null) {\r\n if (canvas.getSelection().contains(figure)) {\r\n this.onSelect(canvas, figure, true)\r\n }\r\n }\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called by the host if the policy has been uninstalled.\r\n *\r\n * @param {draw2d.Figure} figure\r\n */\r\n onUninstall: function (figure) {\r\n this._super(figure)\r\n\r\n figure.selectionHandles.each( (i, e) => e.hide())\r\n figure.selectionHandles = new draw2d.util.ArrayList()\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A {@link draw2d.policy.SelectionFeedbackPolicy} that is sensitive to the canvas selection. Subclasses will typically\r\n * decorate the {@link draw2d.Figure figure} with things like selection handles and/or focus feedback.\r\n * <br>\r\n * If you want to change the handle visibility for a figure, then you should use SelectionFeedbackPolicy to do that.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.figure.SelectionPolicy = draw2d.policy.figure.DragDropEditPolicy.extend(\r\n /** @lends draw2d.policy.figure.SelectionPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.SelectionPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @template\r\n * @param figure\r\n * @param isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Figure} figure the unselected figure\r\n */\r\n onUnselect: function (canvas, figure) {\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Add only very small resize handles to the figure.\r\n *\r\n *\r\n *\r\n * @example\r\n * circle =new draw2d.shape.basic.Circle();\r\n * circle.installEditPolicy(new draw2d.policy.SlimSelectionFeedbackPolicy());\r\n * canvas.add(circle,90,50);\r\n *\r\n * canvas.add(new draw2d.shape.basic.Label({text:\"Click on the circle to see the selection feedback\"}),20,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.RectangleSelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.SlimSelectionFeedbackPolicy = draw2d.policy.figure.RectangleSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.SlimSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.SlimSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n createResizeHandle: function (owner, type) {\r\n return new draw2d.ResizeHandle({owner: owner, type: type, width: 6, height: 6, radius: 0})\r\n }\r\n})\r\n","\r\n/**\r\n * @class\r\n *\r\n * Selection feedback policy for vertical bus figures.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.BusSelectionFeedbackPolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.figure.VBusSelectionFeedbackPolicy = draw2d.policy.figure.BusSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.VBusSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.VBusSelectionFeedbackPolicy\",\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function( attr, setter, getter)\r\n {\r\n this._super( attr, setter, getter);\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n let r2 = this.createResizeHandle(figure, 2) // 2 = CENTER_TOP\r\n let r6 = this.createResizeHandle(figure, 6) // 6 = CENTER_BOTTOM\r\n\r\n figure.selectionHandles.add(r2, r6)\r\n\r\n r2.setDraggable(figure.isResizeable())\r\n r6.setDraggable(figure.isResizeable())\r\n\r\n r2.show(canvas)\r\n r6.show(canvas)\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n /**\r\n *\r\n * Callback if the figure has been moved\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n *\r\n **/\r\n moved: function(canvas,figure)\r\n {\r\n if(figure.selectionHandles.isEmpty()){\r\n return; // silently\r\n }\r\n\r\n var r2= figure.selectionHandles.find( handle => handle.type===2);\r\n var r6= figure.selectionHandles.find( handle => handle.type===6);\r\n\r\n var objWidth = figure.getWidth();\r\n // adjust the resize handles on the left/right to the new dimension of the shape\r\n //\r\n r2.setDimension(objWidth, r2.getHeight());\r\n r6.setDimension(objWidth, r6.getHeight());\r\n\r\n this._super(canvas,figure);\r\n }\r\n\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Called by the framework if the user edit the position of a figure with a drag drop operation.\r\n * Sub class like SelectionEditPolicy or RegionEditPolicy cam adjust th e position of the figure or the selections handles.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.VertexSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.VertexSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.VertexSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Connection} connection the selected figure\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, connection, isPrimarySelection) {\r\n// \tthis._super(canvas, connection, isPrimarySelection);\r\n\r\n let points = connection.getVertices()\r\n for (let i = 0; i < points.getSize(); i++) {\r\n let handle = new draw2d.shape.basic.VertexResizeHandle(connection, i)\r\n connection.selectionHandles.add(handle)\r\n handle.setDraggable(connection.isResizeable())\r\n handle.show(canvas)\r\n\r\n if (i !== 0) {\r\n let handle = new draw2d.shape.basic.GhostVertexResizeHandle(connection, i - 1)\r\n connection.selectionHandles.add(handle)\r\n handle.setDraggable(connection.isResizeable())\r\n handle.show(canvas)\r\n }\r\n }\r\n\r\n this.moved(canvas, connection)\r\n },\r\n\r\n /**\r\n *\r\n * Callback method if the figure has been moved.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n */\r\n moved: function (canvas, figure) {\r\n figure.selectionHandles.each( (i, e) => e.relocate())\r\n }\r\n\r\n\r\n})\r\n","\r\n/**\r\n * @class\r\n *\r\n * An EditPolicy for use with Figures. With this edit policy you can move the shape only in a vertical manner.\r\n *\r\n *\r\n * @example\r\n * // add some demo figure to the canvas\r\n * var circle =new draw2d.shape.basic.Circle({diameter:50, x:10, y:30});\r\n * canvas.add(circle);\r\n *\r\n * // add the edit policy to the shape. At this point you can move the shape only\r\n * // horizontal\r\n * circle.installEditPolicy(new draw2d.policy.figure.VerticalEditPolicy());\r\n *\r\n *\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.policy.figure.VerticalEditPolicy = draw2d.policy.figure.DragDropEditPolicy.extend(\r\n /** @lends draw2d.policy.figure.VerticalEditPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.figure.VerticalEditPolicy\",\r\n\r\n /**\r\n * Creates a new constraint object\r\n */\r\n init: function( attr, setter, getter)\r\n {\r\n this._super( attr, setter, getter);\r\n },\r\n\r\n\r\n /**\r\n *\r\n * It is only possible to drag&drop the element in a vertical line\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {number} [y]\r\n * @returns {draw2d.geo.Point} the constraint position of the figure\r\n */\r\n adjustPosition: function(figure, x, y)\r\n {\r\n return new draw2d.geo.Point(figure.getX(),y);\r\n }\r\n\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * This selection shows only selection handles for the width. It is only possible to change the width\r\n * of an shaped. The height stays always the same or is recalculated by the figure itself.\r\n *\r\n * @example\r\n * // add some demo figure to the canvas\r\n * //\r\n * let shape =new draw2d.shape.basic.Rectangle({width:50, height:100, x:10, y:30});\r\n * canvas.add(shape);\r\n *\r\n * // At this point you can only change the width of the shape\r\n * //\r\n * shape.installEditPolicy(new draw2d.policy.figure.WidthSelectionFeedbackPolicy());\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.figure.WidthSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.figure.BusSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.figure.BusSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {draw2d.Canvas} canvas the host of the diagram\r\n * @param {draw2d.Figure} figure the figure to select\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n let r4 = new draw2d.ResizeHandle({owner: figure, type: 4}) // 4 = RIGHT_MIDDLE\r\n let r8 = new draw2d.ResizeHandle({owner: figure, type: 8}) // 8 = LEFT_MIDDLE\r\n\r\n r4.installEditPolicy(new draw2d.policy.figure.HorizontalEditPolicy())\r\n r8.installEditPolicy(new draw2d.policy.figure.HorizontalEditPolicy())\r\n figure.selectionHandles.add(r4, r8)\r\n\r\n r4.setDraggable(figure.isResizeable())\r\n r8.setDraggable(figure.isResizeable())\r\n\r\n r4.show(canvas)\r\n r8.show(canvas)\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Callback if the figure has been moved\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n return // silently\r\n }\r\n let r4 = figure.selectionHandles.find(handle => handle.type === 4)\r\n let r8 = figure.selectionHandles.find(handle => handle.type === 8)\r\n\r\n let objWidth = figure.getWidth()\r\n\r\n let xPos = figure.getX()\r\n let yPos = figure.getY()\r\n r4.setDimension(r4.getWidth(), figure.getHeight())\r\n r8.setDimension(r8.getWidth(), figure.getHeight())\r\n r4.setPosition(xPos + objWidth, yPos)\r\n r8.setPosition(xPos - r8.getWidth(), yPos)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.SelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.line.LineSelectionFeedbackPolicy = draw2d.policy.figure.SelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.line.LineSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.line.LineSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new selection feedback policy for a line or connection\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called by the framework of the Policy should show a resize handle for the given shape\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Boolean} [isPrimarySelection]\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n if (figure.selectionHandles.isEmpty()) {\r\n figure.selectionHandles.add(new draw2d.shape.basic.LineStartResizeHandle(figure))\r\n figure.selectionHandles.add(new draw2d.shape.basic.LineEndResizeHandle(figure))\r\n\r\n figure.selectionHandles.each( (i, e) => {\r\n e.setDraggable(figure.isResizeable())\r\n e.show(canvas)\r\n })\r\n }\r\n this.moved(canvas, figure)\r\n },\r\n\r\n /**\r\n * \r\n * Callback method if the figure has been moved.\r\n *\r\n * @template\r\n */\r\n moved: function (canvas, figure) {\r\n figure.selectionHandles.each( (i, e) => e.relocate())\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Feedback and edit policy for the InteractiveManhattanRouter.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.line.LineSelectionFeedbackPolicy\r\n */\r\n// do not delete them\r\nimport plugin from \"lib/jquery.contextmenu\"\r\nimport css from 'css/contextmenu.css'\r\n\r\ndraw2d.policy.line.OrthogonalSelectionFeedbackPolicy = draw2d.policy.line.LineSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.line.OrthogonalSelectionFeedbackPolicy.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.line.OrthogonalSelectionFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n // The ResizeHandle for the Policy. This is inline to avoid that a user want to use them without\r\n // the right installed policy.\r\n //\r\n this.ResizeHandle = draw2d.ResizeHandle.extend(\r\n /** @lends draw2d.policy.line.OrthogonalSelectionFeedbackPolicy.ResizeHandle.prototype */\r\n {\r\n \r\n NAME: \"draw2d.policy.line.OrthogonalSelectionFeedbackPolicy.ResizeHandle\",\r\n\r\n init: function (owner, index) {\r\n this._super({owner})\r\n this.index = index\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called if a drag&drop operation starts.<br>\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @private\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n this._super(x, y, shiftKey, ctrlKey)\r\n this.command = this.getCanvas().getPrimarySelection().createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE_VERTICES))\r\n\r\n // Vertex is a reference and not a copy of the point\r\n this.vertex = this.owner.getVertex(this.index).clone()\r\n },\r\n\r\n /**\r\n * \r\n * Called from the framework during a drag&drop operation of the ResizeHandles\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n *\r\n * @returns {Boolean}\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n if (this.command == null) {\r\n return false\r\n }\r\n\r\n let MINDIST = this.owner.getRouter().MINDIST || 10\r\n\r\n let fromDir = this.owner.getSource().getConnectionDirection(this.owner.getTarget())\r\n let toDir = this.owner.getTarget().getConnectionDirection(this.owner.getSource())\r\n\r\n this.vertex.translate(dx2, dy2)\r\n\r\n let vertices = this.owner.getVertices()\r\n let count = vertices.getSize()\r\n //shortcut for math operations\r\n let max = Math.max\r\n let min = Math.min\r\n\r\n\r\n // Keep in mind: \"p1\" is always the dragged handle in the coding below\r\n // marked with an '*' in the diagram\r\n //\r\n\r\n // FIRST handle of the connection\r\n //\r\n if (this.index === 1) {\r\n let p0 = vertices.get(this.index - 1) // first vertex of the connection\r\n let p1 = vertices.get(this.index) // dragged vertex\r\n let p2 = vertices.get(this.index + 1) // additional neighbor\r\n\r\n // vertex alignment to handle:\r\n //\r\n // p0 +-----* p1 p1 *------+ p0\r\n // | |\r\n // | |\r\n // + p2 p2 +\r\n if ((p1.x === p2.x) && (p0.y === p1.y)) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n // p0 is on the left of p1\r\n //\r\n this.owner.setVertex(1, max(p0.x + MINDIST, this.vertex.x), p1.y) // p1\r\n this.owner.setVertex(2, max(p0.x + MINDIST, this.vertex.x), p2.y) // p2\r\n break\r\n // p0 is on the right of p2\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n this.owner.setVertex(1, min(p0.x - MINDIST, this.vertex.x), p1.y) // p1\r\n this.owner.setVertex(2, min(p0.x - MINDIST, this.vertex.x), p2.y) // p2\r\n break\r\n }\r\n }\r\n\r\n // vertices alignment to handle:\r\n //\r\n // p0 + p1 *--------+ p2\r\n // | |\r\n // | |\r\n // p1 *-----+ p2 p0 +\r\n else {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n // p0 is below of p1\r\n //\r\n this.owner.setVertex(1, p1.x, min(p0.y - MINDIST, this.vertex.y)) // p1\r\n this.owner.setVertex(2, p2.x, min(p0.y - MINDIST, this.vertex.y)) // p2\r\n break\r\n // p0 is above of p2\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n this.owner.setVertex(1, p1.x, max(p0.y + MINDIST, this.vertex.y)) // p1\r\n this.owner.setVertex(2, p2.x, max(p0.y + MINDIST, this.vertex.y)) // p2\r\n break\r\n }\r\n }\r\n }\r\n\r\n // LAST handle: Only the left hand side sibling can be changed\r\n //\r\n else if (this.index === (count - 2)) {\r\n let p2 = vertices.get(this.index - 1) // neighbor of the dragged vertex\r\n let p1 = vertices.get(this.index) // dragged vertex\r\n let p0 = vertices.get(this.index + 1) // last vertex of the connection\r\n\r\n // vertices with this alignment.\r\n //\r\n // p2 +-----* p1 + p0\r\n // | |\r\n // | |\r\n // + p0 p2 +--------* p1\r\n if ((p0.x === p1.x) && (p2.y === p1.y)) {\r\n switch (toDir) {\r\n // p0 is below of p1\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n this.owner.setVertex(count - 2, p1.x, min(p0.y - MINDIST, this.vertex.y)) // p1\r\n this.owner.setVertex(count - 3, p2.x, min(p0.y - MINDIST, this.vertex.y)) // p2\r\n break\r\n // p0 is above p2\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n this.owner.setVertex(count - 2, p1.x, max(p0.y + MINDIST, this.vertex.y)) // p1\r\n this.owner.setVertex(count - 3, p2.x, max(p0.y + MINDIST, this.vertex.y)) // p2\r\n break\r\n }\r\n }\r\n\r\n // vertices with this alignment.\r\n //\r\n // p2 + p0 +--------* p1\r\n // | |\r\n // | |\r\n // p1 *-----+ p0 p2 +\r\n else {\r\n switch (toDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n // p0 is on the left of p1\r\n //\r\n this.owner.setVertex(count - 2, max(p0.x + MINDIST, this.vertex.x), p1.y) // p1\r\n this.owner.setVertex(count - 3, max(p0.x + MINDIST, this.vertex.x), p2.y) // p2\r\n break\r\n // p0 is on the right of p2\r\n //\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n this.owner.setVertex(count - 2, min(p0.x - MINDIST, this.vertex.x), p1.y) // p1\r\n this.owner.setVertex(count - 3, min(p0.x - MINDIST, this.vertex.x), p2.y) // p2\r\n break\r\n }\r\n }\r\n }\r\n // The resize handle is in the middle of the connection.\r\n // -> In this case the connection MUST HAVE at least 5 vertices\r\n //\r\n else {\r\n let p_m1 = vertices.get(this.index - 2)\r\n let p0 = vertices.get(this.index - 1)\r\n let p1 = vertices.get(this.index) // selected DragHandle\r\n let p2 = vertices.get(this.index + 1)\r\n let p3 = vertices.get(this.index + 2)\r\n\r\n // vertices alignment to handle\r\n //\r\n // . .\r\n // . .\r\n // p1 *------->+ p0 p0 +<---------* p1\r\n // | . . |\r\n // | . . |\r\n // p2 | | p2\r\n // ...+... ......+.....\r\n //\r\n if ((p1.x === p2.x) && (p1.y === p0.y)) {\r\n // Exception handling if the dragged handle (p1) is near by the start of the connection\r\n // p_m1 is the start of the connection\r\n // p0 must be the immediate neighbor of p_m1\r\n //\r\n if (this.index - 2 === 0) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n this.owner.setVertex(this.index - 1, p0.x, max(this.vertex.y, p_m1.y - MINDIST)) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, max(this.vertex.y, p_m1.y - MINDIST)) // p1\r\n this.owner.setVertex(this.index + 1, this.vertex.x, p2.y) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n this.owner.setVertex(this.index - 1, p0.x, min(this.vertex.y, p_m1.y + MINDIST)) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, this.vertex.y) // p1\r\n this.owner.setVertex(this.index + 1, this.vertex.x, p2.y) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n this.owner.setVertex(this.index - 1, p0.x, min(this.vertex.y, p_m1.y - MINDIST)) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, min(this.vertex.y, p_m1.y - MINDIST)) // p1\r\n this.owner.setVertex(this.index + 1, this.vertex.x, p2.y) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n this.owner.setVertex(this.index - 1, p0.x, max(this.vertex.y, p_m1.y + MINDIST)) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, max(this.vertex.y, p_m1.y + MINDIST)) // p1\r\n this.owner.setVertex(this.index + 1, this.vertex.x, p2.y) // p2\r\n break\r\n }\r\n }\r\n // Exception handling if the dragged handle (p1L) near by the end of the connection\r\n // p3 is the end of the connection\r\n //\r\n else if ((this.index - count + 3) === 0) {\r\n switch (toDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n this.owner.setVertex(this.index - 1, p0.x, this.vertex.y) // p0\r\n this.owner.setVertex(this.index, max(this.vertex.x, p3.x + MINDIST), this.vertex.y) // p1\r\n this.owner.setVertex(this.index + 1, max(this.vertex.x, p3.x + MINDIST), p2.y) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n this.owner.setVertex(this.index - 1, p0.x, this.vertex.y) // p0\r\n this.owner.setVertex(this.index, min(this.vertex.x, p3.x - MINDIST), this.vertex.y) // p1\r\n this.owner.setVertex(this.index + 1, min(this.vertex.x, p3.x - MINDIST), p2.y) // p2\r\n break\r\n }\r\n }\r\n else {\r\n this.owner.setVertex(this.index - 1, p0.x, this.vertex.y) // p0\r\n this.owner.setVertex(this.index, this.vertex) // p1\r\n this.owner.setVertex(this.index + 1, this.vertex.x, p2.y) // p2\r\n }\r\n }\r\n // vertices alignment to handle\r\n //\r\n // ...+... ...+...\r\n // p0 | . | p0\r\n // | . . |\r\n // | . . |\r\n // p1 *----------+ p2 p2 +---------* p1\r\n // . .\r\n // . .\r\n else if ((p0.x === p1.x) && (p1.y === p2.y)) {\r\n // p_m1 is the start of the analyzed segment\r\n // p0 must be the immediate neighbor of p_m1\r\n //\r\n if (this.index - 2 === 0) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n this.owner.setVertex(this.index - 1, max(this.vertex.x, p_m1.x + MINDIST), p0.y) // p0\r\n this.owner.setVertex(this.index, max(this.vertex.x, p_m1.x + MINDIST), this.vertex.y) // p1\r\n this.owner.setVertex(this.index + 1, p2.x, this.vertex.y) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n this.owner.setVertex(this.index - 1, min(this.vertex.x, p_m1.x - MINDIST), p0.y) // p0\r\n this.owner.setVertex(this.index, min(this.vertex.x, p_m1.x - MINDIST), this.vertex.y) // p1\r\n this.owner.setVertex(this.index + 1, p2.x, this.vertex.y) // p2\r\n break\r\n }\r\n }\r\n // p3 is the end point\r\n //\r\n else if ((this.index - count + 3) === 0) {\r\n switch (toDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n this.owner.setVertex(this.index - 1, this.vertex.x, max(this.vertex.y, p0.y)) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, min(this.vertex.y, p3.y - MINDIST)) // p1\r\n this.owner.setVertex(this.index + 1, p2.x, min(this.vertex.y, p3.y - MINDIST)) // p2\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n this.owner.setVertex(this.index - 1, this.vertex.x, p0.y) // p0\r\n this.owner.setVertex(this.index, this.vertex.x, max(this.vertex.y, p3.y + MINDIST)) // p1\r\n this.owner.setVertex(this.index + 1, p2.x, max(this.vertex.y, p3.y + MINDIST)) // p2\r\n break\r\n }\r\n }\r\n // just any element in the middle of the connection\r\n //\r\n else {\r\n this.owner.setVertex(this.index - 1, this.vertex.x, p0.y) // p0\r\n this.owner.setVertex(this.index, this.vertex) // p1\r\n this.owner.setVertex(this.index + 1, p2.x, this.vertex.y) // p2\r\n }\r\n }\r\n }\r\n\r\n this.relocate()\r\n\r\n // update the command for the undo/redo stuff\r\n //\r\n if (this.command !== null) {\r\n this.command.updateVertices(this.owner.getVertices().clone())\r\n }\r\n\r\n // note that the user has changed the routing manually.\r\n // This skips the automatic routing.\r\n this.owner._routingMetaData.routedByUserInteraction = true\r\n return true\r\n },\r\n\r\n /**\r\n * Called after a drag and drop action.<br>\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call the super implementation via <code>this._super();</code>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean}\r\n */\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n let stack = this.getCanvas().getCommandStack()\r\n\r\n stack.execute(this.command)\r\n this.command = null\r\n return true\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Controls the location of the resize handle\r\n *\r\n * @template\r\n **/\r\n relocate: function () {\r\n\r\n let resizeWidthHalf = this.getWidth() / 2\r\n let resizeHeightHalf = this.getHeight() / 2\r\n\r\n let anchor = this.owner.getVertices().get(this.index)\r\n if (anchor)\r\n this.setPosition(anchor.x - resizeWidthHalf, anchor.y - resizeHeightHalf)\r\n }\r\n\r\n })\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @template\r\n * @param {draw2d.Connection} connection the selected figure\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, connection, isPrimarySelection) {\r\n this._super(canvas, connection, isPrimarySelection)\r\n\r\n let points = connection.getVertices()\r\n let i = 1\r\n for (; i < (points.getSize() - 1); i++) {\r\n let handle = new this.ResizeHandle(connection, i)\r\n connection.selectionHandles.add(handle)\r\n handle.setDraggable(connection.isResizeable())\r\n handle.show(canvas)\r\n }\r\n\r\n this.moved(canvas, connection)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * remove the segment with the given index.\r\n * You must check if it possible to remove the segment before. The method didn'T do any consistency checks.\r\n *\r\n * @param conn\r\n * @param segmentIndex\r\n */\r\n removeSegment: function (conn, segmentIndex) {\r\n let PADDING = 10\r\n\r\n let segmentCount = conn.getVertices().getSize() - 1\r\n\r\n let fromPt = conn.getStartPoint()\r\n let fromDir = conn.getSource().getConnectionDirection(conn.getTarget())\r\n\r\n let toPt = conn.getEndPoint()\r\n let toDir = conn.getTarget().getConnectionDirection(conn.getSource())\r\n\r\n let p0 = conn.getVertex(segmentIndex - 1)\r\n let p1 = conn.getVertex(segmentIndex)\r\n let p2 = conn.getVertex(segmentIndex + 1)\r\n let p3 = conn.getVertex(segmentIndex + 2)\r\n\r\n // p0 .\r\n // Es wird ein Horizontales Segment .\r\n // geloescht. Es muessen somit die Punkte .\r\n // p0 und p3 neu gesetzt werden. p1 +------*-----+ p2\r\n // Ihre neue X-Koordinate ist somit in der ^ .\r\n // Mitte des geloeschten Segmentes newX .\r\n // . p3\r\n //\r\n if (p1.y === p2.y) {\r\n let newX = (p1.x + p2.x) / 2\r\n // Die neue X-Koordinate muss auf jeden Falls zwischen p-1 und p4 liegen\r\n //\r\n if (segmentIndex === 1) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n newX = Math.max(newX, fromPt.x + PADDING)\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n newX = Math.min(newX, fromPt.x - PADDING)\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n newX = fromPt.x\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n newX = fromPt.x\r\n break\r\n }\r\n }\r\n\r\n if (segmentIndex === segmentCount - 2) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n newX = Math.max(newX, toPt.x + PADDING)\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n newX = Math.min(newX, toPt.x - PADDING)\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n newX = toPt.x\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n newX = toPt.x\r\n break\r\n }\r\n }\r\n\r\n conn.setVertex(segmentIndex - 1, new draw2d.geo.Point(newX, p0.y))\r\n conn.setVertex(segmentIndex + 2, new draw2d.geo.Point(newX, p3.y))\r\n\r\n conn.removeVertexAt(segmentIndex)\r\n conn.removeVertexAt(segmentIndex)\r\n conn._routingMetaData.routedByUserInteraction = true\r\n }\r\n\r\n // p2 p3\r\n // Es wird ein vertikales Segment +..........+\r\n // geloescht. Es muessen somit die Punkte |\r\n // p0 und p3 neu gesetzt werden. |\r\n // Ihre neue Y-Koordinate ist somit in der |\r\n // Mitte des geloeschten Segmentes p0 | p1\r\n // +........+\r\n //\r\n else if (p1.x === p2.x) {\r\n let newY = (p1.y + p2.y) / 2\r\n // Die neue Y-Koordinate muss auf jeden Falls zwischen p-1 und p4 liegen\r\n //\r\n if (segmentIndex === 1) {\r\n switch (fromDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n newY = fromPt.y\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n debugger // newX is newer read....why did I calculate them?!\r\n newX = fromPt.x\r\n break\r\n }\r\n }\r\n if (segmentIndex === segmentCount - 2) {\r\n switch (toDir) {\r\n case draw2d.geo.Rectangle.DIRECTION_RIGHT:\r\n case draw2d.geo.Rectangle.DIRECTION_LEFT:\r\n newY = toPt.y\r\n break\r\n case draw2d.geo.Rectangle.DIRECTION_UP:\r\n case draw2d.geo.Rectangle.DIRECTION_DOWN:\r\n debugger // newX is newer read....why did I calculate them?!\r\n newX = toPt.x\r\n break\r\n }\r\n }\r\n\r\n conn.setVertex(segmentIndex - 1, new draw2d.geo.Point(p0.x, newY))\r\n conn.setVertex(segmentIndex + 2, new draw2d.geo.Point(p3.x, newY))\r\n\r\n conn.removeVertexAt(segmentIndex)\r\n conn.removeVertexAt(segmentIndex)\r\n conn._routingMetaData.routedByUserInteraction = true\r\n }\r\n },\r\n\r\n\r\n /**\r\n * \r\n * split the segment with the given index and insert a new segment.\r\n *\r\n * @param conn\r\n * @param segmentIndex\r\n */\r\n splitSegment: function (conn, segmentIndex, x, y) {\r\n let segmentCount = conn.getVertices().getSize() - 1\r\n let p1 = conn.getVertex(segmentIndex)\r\n let p2 = conn.getVertex(segmentIndex + 1)\r\n let length = 40\r\n\r\n // the selected segment is vertical\r\n //\r\n if (p1.x === p2.x) {\r\n conn._routingMetaData.routedByUserInteraction = true\r\n // edge case of an ManhattanRouter: One segment. This happens if the source/target on the same x - coordinate\r\n //\r\n if (segmentCount === 1) {\r\n // + p1\r\n // |\r\n // np1 +-----+ np2\r\n // |\r\n // |\r\n // np3 +-----+ np3\r\n // |\r\n // |\r\n // + p2\r\n //\r\n let newSegLength = (p1.getDistance(p2) / 4) / 2\r\n let np1 = new draw2d.geo.Point(p1.x, y - newSegLength)\r\n let np2 = new draw2d.geo.Point(p2.x + length, y - newSegLength)\r\n let np3 = new draw2d.geo.Point(p2.x + length, y + newSegLength)\r\n let np4 = new draw2d.geo.Point(p2.x, y + newSegLength)\r\n\r\n conn.insertVertexAt(segmentIndex + 1, np1)\r\n conn.insertVertexAt(segmentIndex + 2, np2)\r\n conn.insertVertexAt(segmentIndex + 3, np3)\r\n conn.insertVertexAt(segmentIndex + 4, np4)\r\n }\r\n else {\r\n let np1 = new draw2d.geo.Point(0, 0)\r\n let np2 = new draw2d.geo.Point(0, 0)\r\n // p2 +\r\n // .\r\n // np1 +----+ np2\r\n // .\r\n // .\r\n // + p1\r\n // p1 ist der Startpunkt und darf somit nicht verschoben werden\r\n //\r\n if (segmentIndex === 0) {\r\n np1.y = y\r\n np1.x = p1.x\r\n np2.y = y\r\n np2.x = p2.x + length\r\n conn.setVertex(segmentIndex + 1, new draw2d.geo.Point(np2.x, p2.y))\r\n }\r\n // p2 ist der Schlusspunkt und darf somit nicht veaendert werden\r\n //\r\n else if (segmentIndex === segmentCount - 1) {\r\n np1.y = y\r\n np1.x = p1.x - length\r\n np2.y = y\r\n np2.x = p2.x\r\n conn.setVertex(segmentIndex, new draw2d.geo.Point(np1.x, p1.y))\r\n }\r\n else {\r\n np1.y = y\r\n np1.x = p1.x - (length / 2)\r\n np2.y = y\r\n np2.x = p2.x + (length / 2)\r\n conn.setVertex(segmentIndex, new draw2d.geo.Point(np1.x, p1.y))\r\n conn.setVertex(segmentIndex + 1, new draw2d.geo.Point(np2.x, p2.y))\r\n }\r\n\r\n conn.insertVertexAt(segmentIndex + 1, np1)\r\n conn.insertVertexAt(segmentIndex + 2, np2)\r\n }\r\n }\r\n // the selected segment is horizontal\r\n //\r\n else if (p1.y == p2.y) {\r\n conn._routingMetaData.routedByUserInteraction = true\r\n // edge case of an ManhattanRouter: One segment. This happens if the source/target on the same y - coordinate\r\n //\r\n if (segmentCount === 1) {\r\n // np2 +---------+ np3\r\n // | |\r\n // --------+np1 np4+--------\r\n //\r\n let newSegLength = (p1.getDistance(p2) / 4) / 2\r\n let np1 = new draw2d.geo.Point(x - newSegLength, p1.y)\r\n let np2 = new draw2d.geo.Point(x - newSegLength, p1.y - length)\r\n let np3 = new draw2d.geo.Point(x + newSegLength, p1.y - length)\r\n let np4 = new draw2d.geo.Point(x + newSegLength, p1.y)\r\n\r\n conn.insertVertexAt(segmentIndex + 1, np1)\r\n conn.insertVertexAt(segmentIndex + 2, np2)\r\n conn.insertVertexAt(segmentIndex + 3, np3)\r\n conn.insertVertexAt(segmentIndex + 4, np4)\r\n }\r\n else {\r\n // p1 np1\r\n // +.........+\r\n // |\r\n // |\r\n // | np2 p2\r\n // +.........+\r\n let np1 = new draw2d.geo.Point(0, 0)\r\n let np2 = new draw2d.geo.Point(0, 0)\r\n\r\n // p1 ist der Startpunkt und darf somit nicht verschoben werden\r\n //\r\n if (segmentIndex === 0) {\r\n np1.x = x\r\n np1.y = p1.y\r\n np2.x = x\r\n np2.y = p2.y + length\r\n conn.setVertex(segmentIndex + 1, new draw2d.geo.Point(p2.x, np2.y))\r\n }\r\n // p2 ist der Schlusspunkt und darf somit nicht veaendert werden\r\n //\r\n else if (segmentIndex === segmentCount - 1) {\r\n np1.x = x\r\n np1.y = p1.y - length\r\n np2.x = x\r\n np2.y = p2.y\r\n conn.setVertex(segmentIndex, new draw2d.geo.Point(p1.x, np1.y))\r\n }\r\n else {\r\n np1.x = x\r\n np1.y = p1.y - (length / 2)\r\n np2.x = x\r\n np2.y = p2.y + (length / 2)\r\n conn.setVertex(segmentIndex, new draw2d.geo.Point(p1.x, np1.y))\r\n conn.setVertex(segmentIndex + 1, new draw2d.geo.Point(p2.x, np2.y))\r\n }\r\n conn.insertVertexAt(segmentIndex + 1, np1)\r\n conn.insertVertexAt(segmentIndex + 2, np2)\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Called if the user press the right mouse on the figure.<br>\r\n * You can either override the \"onContextMenu\" method of the figure or install an editor policy and override this method.\r\n * Booth is valid and possible.\r\n *\r\n * @param {draw2d.shape.basic.Line} conn the polyline below the mouse\r\n * @param {Number} x the x-coordinate of the mouse down event\r\n * @param {Number} y the y-coordinate of the mouse down event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n * @since 4.4.0\r\n */\r\n onRightMouseDown: function (conn, x, y, shiftKey, ctrlKey) {\r\n let segment = conn.hitSegment(x, y)\r\n let items = {\"split\": {name: draw2d.Configuration.i18n.menu.addSegment}}\r\n\r\n if (segment === null) {\r\n return\r\n }\r\n\r\n if (conn.getRouter().canRemoveSegmentAt(conn, segment.index)) {\r\n items.remove = {name: draw2d.Configuration.i18n.menu.deleteSegment}\r\n }\r\n\r\n $.contextMenu({\r\n selector: 'body',\r\n events:\r\n {\r\n hide: function () {\r\n $.contextMenu('destroy')\r\n }\r\n },\r\n callback: (key, options) => {\r\n switch (key) {\r\n case \"remove\": {\r\n // deep copy of the vertices of the connection for the command stack to avoid side effects\r\n let originalVertices = conn.getVertices().clone(true)\r\n this.removeSegment(conn, segment.index)\r\n let newVertices = conn.getVertices().clone(true)\r\n conn.getCanvas().getCommandStack().execute(new draw2d.command.CommandReplaceVertices(conn, originalVertices, newVertices))\r\n }\r\n break\r\n case \"split\": {\r\n // deep copy of the vertices of the connection for the command stack to avoid side effects\r\n let originalVertices = conn.getVertices().clone(true)\r\n this.splitSegment(conn, segment.index, x, y)\r\n let newVertices = conn.getVertices().clone(true)\r\n conn.getCanvas().getCommandStack().execute(new draw2d.command.CommandReplaceVertices(conn, originalVertices, newVertices))\r\n }\r\n break\r\n default:\r\n break\r\n }\r\n\r\n },\r\n x: x,\r\n y: y,\r\n items: items\r\n })\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Feedback and edit policy for the VertexRouter.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.line.LineSelectionFeedbackPolicy\r\n */\r\ndraw2d.policy.line.VertexSelectionFeedbackPolicy = draw2d.policy.line.LineSelectionFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.line.VertexSelectionFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.line.VertexSelectionFeedbackPolicy\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n\r\n /**\r\n * \r\n *\r\n * @param {draw2d.Canvas} canvas the related canvas\r\n * @param {draw2d.Connection} figure the selected figure\r\n * @param {Boolean} isPrimarySelection\r\n */\r\n onSelect: function (canvas, figure, isPrimarySelection) {\r\n let startHandle = new draw2d.shape.basic.LineStartResizeHandle(figure)\r\n let endHandle = new draw2d.shape.basic.LineEndResizeHandle(figure)\r\n figure.selectionHandles.add(startHandle)\r\n figure.selectionHandles.add(endHandle)\r\n\r\n let points = figure.getVertices()\r\n let count = points.getSize() - 1\r\n let i = 1\r\n for (; i < count; i++) {\r\n figure.selectionHandles.add(new draw2d.shape.basic.VertexResizeHandle(figure, i))\r\n figure.selectionHandles.add(new draw2d.shape.basic.GhostVertexResizeHandle(figure, i - 1))\r\n }\r\n\r\n figure.selectionHandles.add(new draw2d.shape.basic.GhostVertexResizeHandle(figure, i - 1))\r\n\r\n figure.selectionHandles.each( (i, e) => {\r\n e.setDraggable(figure.isResizeable())\r\n e.show(canvas)\r\n })\r\n\r\n this.moved(canvas, figure)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A draw2d.policy.SelectionFeedbackPolicy that is sensitive to the canvas selection. Subclasses will typically\r\n * decorate the {@link draw2d.Figure figure} with things like selection handles and/or focus feedback.\r\n * <br>\r\n * If you want to change the handle visibility for a figure, then you should use SelectionFeedbackPolicy to do that.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.port.ElasticStrapFeedbackPolicy = draw2d.policy.port.PortFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.port.ElasticStrapFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.port.ElasticStrapFeedbackPolicy\",\r\n\r\n /**\r\n * Creates a new Router object\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n this.connectionLine = null\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the related shape has init a drag&drop\r\n * operation\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} return <b>false</b> to send a veto to the drag operation\r\n */\r\n onDragStart: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n this.connectionLine = new draw2d.shape.basic.Line()\r\n this.connectionLine.setCanvas(canvas)\r\n this.connectionLine.getShapeElement()\r\n\r\n this.onDrag(canvas, figure)\r\n\r\n return true\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework during drag a figure.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n */\r\n onDrag: function (canvas, figure) {\r\n let x1 = figure.ox + figure.getParent().getAbsoluteX()\r\n let y1 = figure.oy + figure.getParent().getAbsoluteY()\r\n\r\n this.connectionLine.setStartPosition(x1, y1)\r\n this.connectionLine.setEndPosition(figure.getAbsoluteX(), figure.getAbsoluteY())\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the drag drop operation ends.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onDragEnd: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n this.connectionLine.setCanvas(null)\r\n this.connectionLine = null\r\n },\r\n\r\n onHoverEnter: function (canvas, draggedFigure, hoverFiger) {\r\n this.connectionLine.setGlow(true)\r\n hoverFiger.setGlow(true)\r\n },\r\n\r\n onHoverLeave: function (canvas, draggedFigure, hoverFiger) {\r\n hoverFiger.setGlow(false)\r\n this.connectionLine.setGlow(false)\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\nimport {Tweenable} from \"shifty\"\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.port.IntrusivePortsFeedbackPolicy = draw2d.policy.port.PortFeedbackPolicy.extend(\r\n /** @lends draw2d.policy.port.IntrusivePortsFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.port.IntrusivePortsFeedbackPolicy\",\r\n\r\n /**\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n this.connectionLine = null\r\n this.tweenable = null\r\n this.growFactor = 2\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework if the related shape has init a drag&drop\r\n * operation\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onDragStart: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n let allPorts = canvas.getAllPorts().clone()\r\n\r\n // filter all candidates for the DropEvent\r\n //\r\n allPorts.grep(function (p) {\r\n return (p.NAME !== figure.NAME && p.parent !== figure.parent && p.getSemanticGroup() === figure.getSemanticGroup())\r\n || (p instanceof draw2d.HybridPort)\r\n || (figure instanceof draw2d.HybridPort)\r\n })\r\n\r\n let start = 0\r\n allPorts.each(function (i, element) {\r\n if (typeof element.__beforeInflate === \"undefined\") {\r\n element.__beforeInflate = element.getWidth()\r\n }\r\n start = element.__beforeInflate\r\n })\r\n\r\n // Animate the ports for a visual feedback\r\n //\r\n this.tweenable = new Tweenable()\r\n this.tweenable.tween({\r\n from: {'size': start},\r\n to: {'size': start* this.growFactor},\r\n duration: 200,\r\n easing: \"easeOutSine\",\r\n step: function (params) {\r\n allPorts.each(function (i, element) {\r\n // IMPORTANT shortcut to avoid rendering errors!!\r\n // performance shortcut to avoid a lot of events and recalculate/routing of all related connections\r\n // for each setDimension call. Additional the connection is following a port during Drag&Drop operation\r\n element.shape.attr({rx: params.size/2, ry: params.size/2})\r\n element.width = element.height = params.size\r\n element.fireEvent(\"resize\")\r\n })\r\n }\r\n })\r\n\r\n this.connectionLine = new draw2d.shape.basic.Line()\r\n this.connectionLine.setCanvas(canvas)\r\n this.connectionLine.getShapeElement()\r\n this.connectionLine.setDashArray(\"- \")\r\n this.connectionLine.setColor(\"#30c48a\")\r\n\r\n this.onDrag(canvas, figure)\r\n\r\n return true\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework during drag a figure.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @template\r\n */\r\n onDrag: function (canvas, figure) {\r\n let x1 = figure.ox + figure.getParent().getAbsoluteX()\r\n let y1 = figure.oy + figure.getParent().getAbsoluteY()\r\n\r\n this.connectionLine.setStartPosition(x1, y1)\r\n this.connectionLine.setEndPosition(figure.getAbsoluteX(), figure.getAbsoluteY())\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework if the drag drop operation ends.\r\n *\r\n * @param {draw2d.Canvas} canvas The host canvas\r\n * @param {draw2d.Figure} figure The related figure\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onDragEnd: function (canvas, figure, x, y, shiftKey, ctrlKey) {\r\n if (this.tweenable) {\r\n this.tweenable.stop(true)\r\n this.tweenable.dispose()\r\n this.tweenable = null\r\n }\r\n\r\n let allPorts = canvas.getAllPorts().clone()\r\n // filter all candidates for the DropEvent\r\n //\r\n allPorts.grep(function (p) {\r\n return p.__beforeInflate\r\n })\r\n\r\n allPorts.each(function (i, element) {\r\n // IMPORTANT shortcut to avoid rendering errors!!\r\n // performance shortcut to avoid a lot of events and recalculate/routing of all related connections\r\n // for each setDimension call. Additional the connection is following a port during Drag&Drop operation\r\n element.shape.attr({rx: element.__beforeInflate / 2, ry: element.__beforeInflate / 2})\r\n element.width = element.height = element.__beforeInflate\r\n delete element.__beforeInflate\r\n })\r\n this.connectionLine.setCanvas(null)\r\n this.connectionLine = null\r\n },\r\n\r\n onHoverEnter: function (canvas, draggedFigure, hoverFigure) {\r\n this.connectionLine.setGlow(true)\r\n hoverFigure.setGlow(true)\r\n },\r\n\r\n onHoverLeave: function (canvas, draggedFigure, hoverFigure) {\r\n hoverFigure.setGlow(false)\r\n if (this.connectionLine === null) {\r\n debugger\r\n }\r\n this.connectionLine.setGlow(false)\r\n }\r\n\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Base class for all port feedback policies. Used for grow, highlight or\r\n * other decorations during drag&drop and connecting of ports.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.policy.figure.DragDropEditPolicy\r\n */\r\ndraw2d.policy.port.PortFeedbackPolicy = draw2d.policy.figure.DragDropEditPolicy.extend(\r\n /** @lends draw2d.policy.port.PortFeedbackPolicy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.policy.port.PortFeedbackPolicy\",\r\n\r\n /**\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Called if the dragged port hove another port\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {draw2d.Port} draggedFigure\r\n * @param {draw2d.Figure} hoverFigure\r\n */\r\n onHoverEnter: function (canvas, draggedFigure, hoverFigure) {\r\n },\r\n\r\n /**\r\n *\r\n * Fired if the dragged figures leaves the hover figure\r\n *\r\n * @param {draw2d.Canvas} canvas\r\n * @param {draw2d.Port} draggedFigure\r\n * @param {draw2d.Figure} hoverFigure\r\n */\r\n onHoverLeave: function (canvas, draggedFigure, hoverFigure) {\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Hand drawn arrow which points down left\r\n *\r\n *\r\n * @example\r\n * let figure = new draw2d.shape.analog.OpAmp({x:10, y:10});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.analog.OpAmp = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.analog.OpAmp.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.analog.OpAmp\",\r\n\r\n // custom locator for the special design of the OpAmp Input area\r\n MyInputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, port) {\r\n let parent = port.getParent()\r\n let calcY = (8 + 18.5 * index) * parent.scaleY\r\n this.applyConsiderRotation(port, 1, calcY)\r\n }\r\n }),\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({stroke: 0, bgColor: \"#f0f0ff\"}, attr), setter, getter)\r\n\r\n this.inputLocator = new this.MyInputPortLocator()\r\n\r\n this.createPort(\"input\", this.inputLocator)\r\n this.createPort(\"input\", this.inputLocator)\r\n\r\n this.createPort(\"output\")\r\n\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getSVG: function () {\r\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"50\" height=\"50\">' +\r\n '<path d=\"m8.2627,0l0,35.36035l31.23926,-17.76025l-31.23926,-17.60011l0,0l0,0.00001zm2.27832,27.36719l4.08105,0m-2.10449,-2.20703l0,4.27979m2.26367,-21.35938l-4.15918,0\" stroke=\"#1B1B1B\" fill=\"none\"/>' +\r\n '<line x1=\"0.53516\" y1=\"8\" x2=\"8.21191\" y2=\"8\" stroke=\"#010101\"/>' +\r\n '<line x1=\"39.14941\" y1=\"18\" x2=\"45.81055\" y2=\"18\" stroke=\"#010101\" />' +\r\n '<line x1=\"0.53516\" y1=\"27\" x2=\"8.21191\" y2=\"27\" stroke=\"#010101\" />' +\r\n '</svg>'\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n // redirect the backgroundColor to an internal SVG node.\r\n // In this case only a small part of the shape are filled with the background color\r\n // and not the complete rectangle/bounding box\r\n //\r\n attributes[\"fill\"] = \"none\"\r\n if (this.bgColor != null) {\r\n this.svgNodes[0].attr({fill: this.bgColor.rgba()})\r\n }\r\n\r\n this._super(attributes)\r\n\r\n return this\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.analog.ResistorBridge({x:10, y:10});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.analog.ResistorBridge = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.analog.ResistorBridge.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.analog.ResistorBridge\",\r\n\r\n // custom locator for the special design of the ResistorBridge Input area\r\n MyInputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n let h = figure.getParent().getHeight()\r\n this.applyConsiderRotation(figure, w / 2 + 1, h * index)\r\n }\r\n }),\r\n\r\n // custom locator for the special design of the ResistorBridge Input area\r\n MyOutputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n let h = figure.getParent().getHeight()\r\n\r\n this.applyConsiderRotation(figure, w * (index - 2), h / 2)\r\n }\r\n }),\r\n\r\n\r\n /**\r\n * Create a new instance\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n\r\n this.inputLocator = new this.MyInputPortLocator()\r\n this.outputLocator = new this.MyOutputPortLocator()\r\n\r\n this.createPort(\"hybrid\", this.inputLocator)\r\n this.createPort(\"hybrid\", this.inputLocator)\r\n\r\n this.createPort(\"hybrid\", this.outputLocator)\r\n this.createPort(\"hybrid\", this.outputLocator)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getSVG: function () {\r\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">' +\r\n '<path fill=\"#010101\" stroke=\"#010101\" stroke-miterlimit=\"14.3\" id=\"path12322\" d=\"m47.62207,22.71094l0,0c0.73145,0.73242 0.71777,1.93359 -0.03027,2.68164c-0.74805,0.74951 -1.94922,0.76123 -2.68073,0.0293c-0.73138,-0.73242 -0.71967,-1.93211 0.03033,-2.68115c0.74707,-0.74803 1.94727,-0.76219 2.68066,-0.02979l0,0z\"/>' +\r\n '<path fill=\"#010101\" stroke=\"#010101\" stroke-miterlimit=\"14.3\" id=\"path12324\" d=\"m25.84082,0.93115l0,0c0.73145,0.73096 0.71875,1.93359 -0.02832,2.68066c-0.75,0.74951 -1.94922,0.76123 -2.68164,0.0293c-0.73242,-0.73241 -0.71973,-1.93164 0.0293,-2.68065c0.74805,-0.74756 1.94922,-0.76172 2.68066,-0.0293l0,0l0,-0.00002z\"/>' +\r\n '<path fill=\"#010101\" stroke=\"#010101\" stroke-miterlimit=\"14.3\" id=\"path12326\" d=\"m25.75098,44.58203l0,0c0.73145,0.73193 0.71875,1.93311 -0.02832,2.68115c-0.75,0.74902 -1.94922,0.76074 -2.68262,0.0293c-0.73145,-0.73193 -0.71973,-1.93262 0.03033,-2.68164c0.74707,-0.74756 1.94922,-0.76123 2.68066,-0.02879l0,0l-0.00006,-0.00002z\"/>' +\r\n '<path fill=\"#010101\" stroke=\"#010101\" stroke-miterlimit=\"14.3\" id=\"path12328\" d=\"m3.9707,22.80127l0,0c0.73242,0.73193 0.71777,1.93359 -0.0293,2.68115c-0.74902,0.74951 -1.94922,0.76172 -2.68164,0.0293c-0.73145,-0.73242 -0.71973,-1.93164 0.03027,-2.68115c0.74707,-0.74707 1.94922,-0.76074 2.68066,-0.0293l0,0z\"/>' +\r\n '<polyline fill=\"none\" stroke=\"#010101\" id=\"polyline12334\" points=\"24.908203125,45.49267578125 31.71875,38.68310546875 31.2119140625,36.98876953125 34.892578125,37.95703125 33.953125,34.22265625 37.6650390625,35.18359375 36.6767578125,31.52490234375 40.3759765625,32.47314453125 39.873046875,30.52783203125 45.884765625,24.51708984375 \" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"#010101\" id=\"polyline12338\" points=\"36.3408203125,23.98876953125 38.146484375,29.55810546875 33.630859375,29.55810546875 35.435546875,23.98779296875 \"/>' +\r\n '<line fill=\"none\" stroke=\"#010101\" id=\"line12340\" y2=\"28.90967\" x2=\"35.8877\" y1=\"41.13428\" x1=\"35.88867\" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"none\" stroke=\"#010101\" id=\"polyline12346\" points=\"3.2109375,23.79248046875 10.01953125,16.98388671875 9.513671875,15.2890625 13.193359375,16.25732421875 12.251953125,12.5234375 15.9658203125,13.48486328125 14.9775390625,9.82568359375 18.6767578125,10.7734375 18.173828125,8.82958984375 24.185546875,2.81787109375 \" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"#010101\" id=\"polyline12350\" points=\"13.126953125,23.80419921875 11.3212890625,18.236328125 15.8369140625,18.236328125 14.0322265625,23.806640625 \"/>' +\r\n '<line fill=\"none\" stroke=\"#010101\" id=\"line12352\" y2=\"18.8833\" x2=\"13.58008\" y1=\"6.65967\" x1=\"13.5791\" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"none\" stroke=\"#010101\" id=\"polyline12358\" points=\"46.65625,24.33642578125 39.84765625,17.52783203125 38.154296875,18.033203125 39.1220703125,14.353515625 35.3876953125,15.29345703125 36.34765625,11.58056640625 32.689453125,12.56884765625 33.6376953125,8.86865234375 31.6923828125,9.373046875 24.322265625,2.00341796875 \" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"#010101\" id=\"polyline12362\" points=\"36.578125,1.87109375 38.3828125,7.439453125 33.8681640625,7.439453125 35.6728515625,1.869140625 \"/>' +\r\n '<line fill=\"none\" stroke=\"#010101\" id=\"line12364\" y2=\"6.7915\" x2=\"36.125\" y1=\"19.01758\" x1=\"36.125\" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"none\" stroke=\"#010101\" id=\"polyline12370\" points=\"24.494140625,46.49951171875 17.685546875,39.69091796875 15.9921875,40.1953125 16.958984375,36.515625 13.2265625,37.45556640625 14.185546875,33.7421875 10.52734375,34.73193359375 11.474609375,31.03125 9.529296875,31.53515625 2.1611328125,24.166015625 \" stroke-miterlimit=\"14.3\"/>' +\r\n '<polyline fill=\"#010101\" id=\"polyline12374\" points=\"12.150390625,44.80029296875 10.34765625,39.23193359375 14.861328125,39.23095703125 13.0556640625,44.80224609375 \"/>' +\r\n '<line fill=\"none\" stroke=\"#010101\" id=\"line12376\" y2=\"39.87891\" x2=\"12.60352\" y1=\"27.6543\" x1=\"12.60352\" stroke-miterlimit=\"14.3\"/>' +\r\n '</svg>'\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.analog.ResistorVertical({x:10, y:10});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.analog.ResistorVertical = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.analog.ResistorVertical.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.analog.ResistorVertical\",\r\n\r\n // custom locator for the special design of the Input area\r\n MyInputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n let h = figure.getParent().getHeight()\r\n this.applyConsiderRotation(figure, w / 2, h)\r\n }\r\n }),\r\n\r\n // custom locator for the special design of the Output area\r\n MyOutputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n this.applyConsiderRotation(figure, w / 2, 0)\r\n }\r\n }),\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this._super(extend({width: 30, height: 50, bgColor: null}, attr), setter, getter)\r\n\r\n this.inputLocator = new this.MyInputPortLocator()\r\n this.outputLocator = new this.MyOutputPortLocator()\r\n\r\n this.createPort(\"hybrid\", this.inputLocator)\r\n this.createPort(\"hybrid\", this.outputLocator)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createSet: function () {\r\n let set = this._super()\r\n\r\n set.push(this.canvas.paper.path(\"M15,0 L15,5 L0,7.5 L30,10 L0,15 L30,20 L0,25 L30,30 L15,32.5 L15,40\"))\r\n\r\n return set\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.analog.VoltageSupplyHorizontal({x:10, y:10});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.analog.VoltageSupplyHorizontal = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.analog.VoltageSupplyHorizontal.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.analog.VoltageSupplyHorizontal\",\r\n\r\n // custom locator for the special design of the Input area\r\n MyInputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let h = figure.getParent().getHeight()\r\n this.applyConsiderRotation(figure, 0, h / 2)\r\n }\r\n }),\r\n\r\n // custom locator for the special design of the Output area\r\n MyOutputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n let h = figure.getParent().getHeight()\r\n this.applyConsiderRotation(figure, w, h / 2)\r\n }\r\n }),\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 30}, attr), setter, getter)\r\n\r\n this.createPort(\"hybrid\", new this.MyInputPortLocator()) // GND\r\n this.createPort(\"hybrid\", new this.MyOutputPortLocator()) // VCC\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getSVG: function () {\r\n return '<svg width=\"49\" height=\"28\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">' +\r\n '<path d=\"m24.99933,18.95592l0,-9.54576m-5.78374,-9.40907l0,28.35939m-5.78718,-9.40457l0,-9.54576m-5.78374,-9.40907l0,28.35939\" id=\"path10566\" stroke-miterlimit=\"14.3\" stroke=\"#010101\" fill=\"none\"/>' +\r\n '<path d=\"m26.79878,14.13039l6.90583,0m-33.22691,0l6.90583,0\" id=\"path10568\" stroke-miterlimit=\"14.3\" stroke-linecap=\"square\" stroke=\"#010101\" fill=\"none\"/>' +\r\n '</svg>'\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.analog.VoltageSupplyVertical({x:10, y:10});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.analog.VoltageSupplyVertical = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.analog.VoltageSupplyVertical.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.analog.VoltageSupplyVertical\",\r\n\r\n // custom locator for the special design of the Input area\r\n MyInputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n let h = figure.getParent().getHeight()\r\n this.applyConsiderRotation(figure, w / 2, h)\r\n }\r\n }),\r\n\r\n // custom locator for the special design of the Output area\r\n MyOutputPortLocator: draw2d.layout.locator.PortLocator.extend({\r\n init: function () {\r\n this._super()\r\n },\r\n relocate: function (index, figure) {\r\n let w = figure.getParent().getWidth()\r\n this.applyConsiderRotation(figure, w / 2, 0)\r\n }\r\n }),\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 30, height: 50}, attr), setter, getter)\r\n\r\n this.inputLocator = new this.MyInputPortLocator()\r\n this.outputLocator = new this.MyOutputPortLocator()\r\n\r\n this.createPort(\"hybrid\", this.inputLocator) // GND\r\n this.createPort(\"hybrid\", this.outputLocator)// VCC\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getSVG: function () {\r\n return '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">' +\r\n '<path d=\"m19.62398,12.37594l-9.87926,0m-9.74355,8.22145l29.36289,0m-9.74007,8.22469l-9.87927,0m-9.74355,8.22145l29.36289,0\" id=\"path10560\" stroke-miterlimit=\"14.3\" stroke=\"#010101\" fill=\"none\"/>' +\r\n '<path d=\"m14.63157,9.81646l0,-9.81646m0,47.2328l0,-9.81646\" id=\"path10562\" stroke-miterlimit=\"14.3\" stroke-linecap=\"square\" stroke=\"#010101\" fill=\"none\"/>' +\r\n '</svg>'\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Hand drawn arrow which points down left\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.arrow.CalligrapherArrowDownLeft({x:10,y:10, color:\"#3d3d3d\"});\r\n *\r\n * canvas.add(figure);\r\n *\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.arrow.CalligrapherArrowDownLeft = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.arrow.CalligrapherArrowDownLeft.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.arrow.CalligrapherArrowDownLeft\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr)\r\n },\r\n\r\n\r\n getSVG: function () {\r\n return '<svg width=\"180\" height=\"300\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3084\" d=\"m 159.63578,17.846597 c 0.43137,9.44641 -0.0636,18.88035 -0.8284,28.30165 c -1.73211,18.38336 -4.05381,36.71698 -6.08253,55.075313 c -1.61738,13.7075 -3.03402,27.43467 -3.97611,41.19113 c -1.09101,11.16584 -1.31019,22.36559 -1.28541,33.56466 c -0.1328,4.82188 0.3218,9.6468 0.14332,14.46812 c -0.0888,2.39977 -0.28315,3.73625 -0.55012,6.12095 c -0.85848,4.73147 -2.27416,9.40019 -4.7769,13.68272 c -1.47003,2.51544 -3.78493,5.6647 -5.47739,8.05048 c -5.02888,6.66256 -11.08555,12.65652 -18.10552,17.75963 c -4.23302,3.07716 -7.74942,5.12065 -12.22081,7.86298 c -13.253319,6.72606 -25.889792,15.11686 -40.84124,18.60576 c -3.016829,0.7039 -4.431417,0.8157 -7.450859,1.2076 c -6.983246,0.5774 -14.009174,0.3375 -21.010676,0.2509 c -3.278795,-0.033 -6.55749,0.01 -9.835897,0.045 c 0,0 20.838833,-13.2364 20.838833,-13.2364 l 0,0 c 3.147056,0.093 6.294483,0.1852 9.443646,0.2007 c 6.966697,0.011 13.971433,0.1301 20.897176,-0.6344 c 3.732439,-0.5577 7.321215,-1.2431 10.881203,-2.4145 c 1.517208,-0.4992 5.830867,-2.43339 4.487902,-1.6386 c -6.098183,3.6088 -25.104875,12.8748 -9.52514,5.223 c 4.40875,-2.5927 8.262057,-4.7459 12.425175,-7.65986 c 6.839117,-4.78709 12.633657,-10.50427 17.500607,-16.86761 c 2.53518,-3.56692 5.24684,-7.12748 7.07617,-11.03446 c 1.42357,-3.0404 2.21532,-6.28727 2.91146,-9.50152 c 0.91919,-6.88822 1.03991,-13.81392 1.25118,-20.74151 c 0.47683,-11.27871 0.96259,-22.55877 1.61689,-33.83062 c 1.21127,-14.03392 3.64191,-27.94339 5.46543,-41.92167 c 2.26899,-18.186603 4.6835,-36.384373 5.4487,-54.679643 c 0.0788,-2.46092 0.23808,-4.92087 0.23618,-7.38276 c -0.005,-6.45916 -0.62194,-13.00218 -2.13821,-19.32664 c 0,0 23.48134,-10.73998 23.48134,-10.73998 z\" inkscape:connector-curvature=\"0\" />' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3086\" d=\"m 41.271518,252.40239 c 2.465518,-0.7264 4.879503,-1.7726 7.145328,-2.9859 c 0.955597,-0.5117 3.736822,-2.1986 2.791991,-1.6673 c -5.218817,2.9348 -10.409826,5.9187 -15.61474,8.878 c 5.366557,-3.4898 10.227818,-7.6685 14.119927,-12.75576 c 3.507157,-5.09382 4.097613,-11.17122 4.301158,-17.17644 c 0.02635,-3.95844 -0.31227,-7.90612 -0.635377,-11.84752 c 0,0 19.920693,-10.3059 19.920693,-10.3059 l 0,0 c 0.171761,4.05015 0.409899,8.09777 0.50079,12.15101 c -0.185739,6.23619 -0.347804,12.66862 -3.492579,18.24747 c -0.503375,0.75197 -0.961922,1.53596 -1.510126,2.25591 c -3.478528,4.56826 -8.226837,8.04586 -12.757403,11.47443 c -7.345206,4.3297 -14.671333,8.692 -22.035619,12.9891 c -3.551305,2.0723 -7.368692,3.8726 -11.394645,4.7773 c 0,0 18.660602,-14.0344 18.660602,-14.0344 z\" inkscape:connector-curvature=\"0\" />' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3088\" d=\"m 37.815923,255.49919 c 3.41111,0.1581 6.814569,0.2213 10.182693,0.8184 c 6.92998,2.6928 13.533527,6.2357 20.043462,9.8162 c 3.912139,2.1362 7.91195,4.4644 10.690321,8.0298 c 1.039962,1.2802 1.510411,2.7604 1.893523,4.3313 c 0,0 -20.370847,10.9259 -20.370847,10.9259 l 0,0 c -0.225419,-1.2711 -0.55067,-2.4558 -1.329618,-3.5184 c -2.332229,-3.3633 -5.869056,-5.6279 -9.247191,-7.8233 c -6.335066,-3.7106 -12.98611,-7.1834 -20.232784,-8.6836 c -3.497247,-0.3814 -7.011372,-0.4307 -10.521829,-0.1703 c 0,0 18.89227,-13.726 18.89227,-13.726 z\" inkscape:connector-curvature=\"0\" />' +\r\n '</svg>'\r\n },\r\n\r\n /**\r\n *\r\n * propagate all attributes like color, stroke,... to the shape element\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n this.svgNodes?.attr({fill: this.color.rgba()})\r\n\r\n this._super(attributes)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Hand drawn arrow to the left.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.arrow.CalligrapherArrowLeft({x:10, y:10, color:\"#3d3d3d\"});\r\n *\r\n * canvas.add(figure);\r\n *\r\n * @extends draw2d.SVGFigure\r\n */\r\ndraw2d.shape.arrow.CalligrapherArrowLeft = draw2d.SVGFigure.extend(\r\n /** @lends draw2d.shape.arrow.CalligrapherArrowLeft.prototype */\r\n {\r\n NAME: \"draw2d.shape.arrow.CalligrapherArrowLeft\",\r\n\r\n /**\r\n * Creates a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr)\r\n },\r\n\r\n\r\n getSVG: function () {\r\n return '<svg width=\"230\" height=\"60\" xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\">' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3024\" d=\"m 218.87943,27.464763 c -1.21088,-0.0563 -2.42064,-0.14616 -3.63262,-0.16893 c -5.82495,-0.10948 -18.61676,-0.0226 -22.97385,0.0122 c -7.12848,0.057 -14.25673,0.14021 -21.38495,0.22333 c -9.03765,0.10539 -18.07511,0.22813 -27.11266,0.3422 c -10.2269,0.11878 -20.4538,0.23756 -30.6807,0.35634 c -35.488759,0.4089 -70.975849,0.82793 -106.4669238,0.95195 c 0,0 7.9718628,-5.70244 7.9718628,-5.70244 l 0,0 c 6.374241,0.28694 12.745594,0.64561 19.122722,0.86083 c 28.09499,0.94816 56.21338,0.92473 84.315959,0.32205 c 10.51273,-0.32805 21.0288,-0.56402 31.53819,-0.98412 c 27.47361,-1.09824 54.91405,-2.91665 82.28177,-5.53697 c 0,0 -12.9788,9.32351 -12.9788,9.32351 z\" inkscape:connector-curvature=\"0\" />' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3026\" d=\"m 100.75066,1.6309831 c -7.165239,3.9571 -14.284929,7.47866 -22.036659,10.2707299 c -5.00195,1.80163 -10.10374,3.31886 -15.2402,4.79424 c -8.25878,2.37815 -16.55626,4.65805 -24.9012,6.79479 c -2.89107,0.71593 -5.74687,1.56407 -8.66266,2.20424 c -3.211679,0.70512 -6.49468,1.17333 -9.752959,1.6747 c -5.447101,0.92112 -10.9044008,1.81762 -16.3983488,2.50082 c -1.608931,0.0814 -0.850754,0.10697 -2.275834,-0.0365 C 20.004071,21.041553 19.256899,21.517873 32.515691,19.216243 c 6.21537,-1.05913 12.34875,-2.37668 18.3945,-4.03234 c 8.12719,-2.02803 16.23765,-4.1157 24.26421,-6.4321199 c 5.23574,-1.55053 10.41682,-3.15473 15.46857,-5.12875 c 1.38953,-0.54295 2.7579,-1.12682 4.12253,-1.71603 c 0.98421,-0.42496 3.86537,-1.81801999 2.92296,-1.32600999 C 93.642191,2.6934931 89.529511,4.7073031 85.450031,6.7704531 l 15.300629,-5.1394 z\" inkscape:connector-curvature=\"0\" sodipodi:nodetypes=\"csccsccccccsssccc\" />' +\r\n ' <path style=\"fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none\" id=\"path3028\" d=\"m 80.764281,58.068863 c -2.45498,-3.50762 -6.58178,-6.10525 -10.40324,-8.66732 c -4.30614,-2.72676 -7.93958,-6.28283 -12.6021,-8.28702 c -7.39912,-4.50257 -11.70055,-7.85592 -20.85866,-9.23429 c -4.9257,-0.85706 -17.294247,-1.32043 -22.226462,-2.15427 c -3.445882,-0.42869 -6.2035918,0.70541 -9.6845138,0.57715 c -1.496337,-0.0586 -2.99355,-0.0965 -4.491229,-0.12472 l 13.9525278,-6.24562 l 3.25,-1.17153 c 1.441459,0.0813 -1.116338,0.15309 0.325505,0.23016 c 3.574557,0.17902 7.211864,0.0695 10.712655,0.73822 c 4.723107,1.08097 9.443947,2.1624 14.234177,3.05317 c 2.76739,0.64203 3.92627,0.87082 6.64127,1.66289 c 4.42146,1.28993 8.60075,3.01513 12.86503,4.58129 c 1.90199,0.73446 5.05193,1.93181 6.89302,2.7216 c 4.92005,2.11061 9.5916,4.57045 13.9716,7.31023 c 4.16708,2.62011 8.48023,5.20033 11.72012,8.56863 z\" inkscape:connector-curvature=\"0\" sodipodi:nodetypes=\"ccccccccccccscsccc\" />' +\r\n '</svg>'\r\n },\r\n\r\n /**\r\n *\r\n * propagate all attributes like color, stroke,... to the shape element\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n\r\n if (this.svgNodes !== null) {\r\n this.svgNodes.attr({fill: this.color.rgba()})\r\n }\r\n\r\n this._super(attributes)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * Oval figure.\r\n * @example\r\n *\r\n * let arc = new draw2d.shape.basic.Arc({diameter:150, x:50, y:10, startAngle:0, endAngle:45});\r\n *\r\n * canvas.add(arc);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.basic.Arc = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.basic.Arc.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Arc\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.startAngle = 180\r\n this.endAngle = 360\r\n\r\n this._super({width: 80, height: 50, bgColor: null, color: \"#1B1B1B\", ...attr}, setter, getter)\r\n this.strokeScale = false // scale the stroke width of the children nodes if the parent resize\r\n },\r\n\r\n\r\n /**\r\n * @template\r\n **/\r\n createSet: function () {\r\n this.canvas.paper.setStart()\r\n\r\n\r\n let flag = (this.endAngle - this.startAngle) > 180\r\n let a1 = (this.startAngle % 360) * Math.PI / 180\r\n let a2 = (this.endAngle % 360) * Math.PI / 180\r\n\r\n let w2 = this.getWidth() / 2\r\n let h2 = this.getHeight() / 2\r\n\r\n this.canvas.paper.path([\r\n [\"M\", w2, h2,\r\n \"l\", w2 * Math.cos(a1), h2 * Math.sin(a1),\r\n \"A\", w2, h2, 0, +flag, 1, w2 + w2 * Math.cos(a2), h2 + h2 * Math.sin(a2),\r\n \"z\"]\r\n ].join(\"\")).attr({\"fill\": \"#fff0f0\"})\r\n\r\n return this.canvas.paper.setFinish()\r\n\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * A circle figure with basic background and stroke API. <br>\r\n * A circle can not be streched. <strong>The aspect ration is always 1:1</strong>.\r\n *\r\n *\r\n * @example\r\n *\r\n * let shape = new draw2d.shape.basic.Circle({x:40,y:10, stroke:3, color:\"#3d3d3d\", bgColor:\"#3dff3d\"});\r\n *\r\n * canvas.add(shape);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Oval\r\n */\r\ndraw2d.shape.basic.Circle = draw2d.shape.basic.Oval.extend(\r\n /** @lends draw2d.shape.basic.Circle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Circle\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n * @param {Object} [setter] add or replace setter methods\r\n * @param {Object} [getter] add or replace getter methods\r\n **/\r\n init: function (attr, setter, getter) {\r\n this._super(\r\n attr,\r\n {\r\n // @attr {Number} diameter the diameter of the circle */\r\n diameter: this.setDiameter,\r\n // @attr {Number} radius the radius of the circle */\r\n radius: this.setRadius,\r\n ...setter},\r\n {\r\n diameter: this.getDiameter,\r\n radius: this.getRadius,\r\n ...getter\r\n }\r\n )\r\n\r\n this.setKeepAspectRatio(true)\r\n },\r\n\r\n /**\r\n *\r\n * Set the diameter of the circle. The center of the circle will be retained.\r\n *\r\n * @param {Number} d The new diameter of the circle.\r\n * @since 4.0.0\r\n * @returns {this}\r\n **/\r\n setDiameter: function (d) {\r\n let center = this.getCenter()\r\n this.setDimension(d, d)\r\n this.setCenter(center)\r\n this.fireEvent(\"change:diameter\", {value: d})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the diameter of the circle.\r\n *\r\n * @since 4.0.0\r\n * @returns {Number} the diameter of the circle\r\n **/\r\n getDiameter: function () {\r\n return this.getWidth()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the radius of the circle. The center of the circle will be retained.\r\n *\r\n * @param {Number} r The new radius of the circle.\r\n * @since 4.0.0\r\n * @returns {this}\r\n **/\r\n setRadius: function (r) {\r\n this.setDiameter(r * 2)\r\n this.fireEvent(\"change:radius\", {value: r})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * Get the radius of the circle\r\n *\r\n * @returns {Number} the radius of the circle\r\n */\r\n getRadius: function(){\r\n return this.getWidth()/2\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n // delete the radius attribute of the parent. Because the \"radius\" is the corner radius\r\n // of the shape and not the \"radius\" of the circle. Design flaw. :-/\r\n delete memento.radius\r\n\r\n return memento\r\n }\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A Diamond Figure.\r\n *\r\n *\r\n * @example\r\n *\r\n * let d1 = new draw2d.shape.basic.Diamond({x:10,y:10});\r\n * let d2 = new draw2d.shape.basic.Diamond({x:100,y:10, bgColor:\"#f0f000\", alpha:0.7, width:100, height:60});\r\n *\r\n * canvas.add(d1);\r\n * canvas.add(d2);\r\n *\r\n * canvas.setCurrentSelection(d2);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.basic.Diamond = draw2d.shape.basic.Polygon.extend(\r\n /** @lends draw2d.shape.basic.Diamond.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.basic.Diamond\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({bgColor: \"#00a3f6\", color: \"#1B1B1B\"}, attr), setter, getter)\r\n\r\n let pos = this.getPosition()\r\n\r\n this.resetVertices()\r\n\r\n let box = this.getBoundingBox()\r\n this.addVertex(box.w / 2, 0) // Go to the top center..\r\n this.addVertex(box.w, box.h / 2) // ...draw line to the right middle\r\n this.addVertex(box.w / 2, box.h) // ...bottom center...\r\n this.addVertex(0, box.h / 2) // ...left middle...\r\n\r\n // override the selection handler from the polygon. Because the vertices of\r\n // the diamond are not selectable and modifiable\r\n //\r\n this.installEditPolicy(new draw2d.policy.figure.RectangleSelectionFeedbackPolicy())\r\n\r\n this.setPosition(pos)\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * ResizeHandle for a vertex edit policy. Click of this kind of resize handles\r\n * adds a new vertex to the polyline or polygon.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.LineResizeHandle\r\n */\r\ndraw2d.shape.basic.GhostVertexResizeHandle = draw2d.shape.basic.LineResizeHandle.extend(\r\n /** @lends draw2d.shape.basic.GhostVertexResizeHandle.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.basic.GhostVertexResizeHandle\",\r\n\r\n /**\r\n *\r\n *\r\n */\r\n init: function (owner, precursorIndex) {\r\n this.maxOpacity = 0.35\r\n this.precursorIndex = precursorIndex\r\n\r\n this._super({owner: owner, opacity: this.maxOpacity})\r\n },\r\n\r\n createShapeElement: function () {\r\n let shape = this._super()\r\n\r\n shape.attr({\"cursor\": \"pointer\"})\r\n\r\n return shape\r\n },\r\n\r\n /**\r\n *\r\n * Set the alpha blending of this figure.\r\n *\r\n * @param {Number} percent Value between [0..1].\r\n * @template\r\n **/\r\n setAlpha: function (percent) {\r\n this._super(Math.min(this.maxOpacity, Math.max(0, parseFloat(percent))))\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Called when a user clicks on the element\r\n *\r\n * @template\r\n */\r\n onClick: function () {\r\n let cmd = new draw2d.command.CommandAddVertex(this.owner, this.precursorIndex + 1, this.getAbsoluteX() + this.getWidth() / 2, this.getAbsoluteY() + this.getHeight() / 2)\r\n this.getCanvas().getCommandStack().execute(cmd)\r\n },\r\n\r\n /**\r\n * Called if the drag and drop action begins. You can return [false] if you\r\n * want avoid the that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @type {Boolean}\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Called from the framework during a drag&drop operation\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @returns {Boolean}\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n return true\r\n },\r\n\r\n /**\r\n * Called after a drag and drop action.<br>\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call the super implementation via <code>this._super();</code>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean}\r\n */\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragend\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n return true\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Controls the location of the resize handle\r\n *\r\n * @template\r\n **/\r\n relocate: function () {\r\n let p1 = this.owner.getVertices().get(this.precursorIndex)\r\n let p2 = this.owner.getVertices().get(this.precursorIndex + 1)\r\n\r\n this.setPosition(\r\n ((p2.x - p1.x) / 2 + p1.x - this.getWidth() / 2),\r\n ((p2.y - p1.y) / 2 + p1.y - this.getHeight() / 2)\r\n )\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Simple Image shape.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.node.Node\r\n */\r\ndraw2d.shape.basic.Image = draw2d.shape.node.Node.extend(\r\n /** @lends draw2d.shape.basic.Image.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Image\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(\r\n attr,\r\n {\r\n // @attr {String} path the image path (absolute or relative) of the shape */\r\n path: this.setPath,\r\n ...setter\r\n },\r\n {\r\n path: this.getPath,\r\n ...getter\r\n })\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the image path attribute of the Image shape and repaint them.\r\n * The path can be relative or absolute\r\n *\r\n * @param path\r\n * @since 2.8.0\r\n */\r\n setPath: function (path) {\r\n this.path = path\r\n\r\n this.shape?.attr({src: this.path})\r\n this.fireEvent(\"change:path\", {value: this.path})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return the image path attribute of the shape.\r\n *\r\n * @returns {String}\r\n * @since 2.8.0\r\n */\r\n getPath: function () {\r\n return this.path\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n attributes ??= {}\r\n\r\n attributes.x = this.getAbsoluteX()\r\n attributes.y = this.getAbsoluteY()\r\n attributes.width = this.getWidth()\r\n attributes.height = this.getHeight()\r\n attributes.src = this.path\r\n\r\n // propagate the width/height and the display:inline-block as CSS attribute as well because Chrome\r\n // did some \"flickering\" in some versions and sometimes the image disappear complete\r\n $(this.shape.node).css({display: \"inline-block\", \"width\": attributes.width, \"height\": attributes.height})\r\n\r\n this._super(attributes)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n return this.canvas.paper.image(this.path, this.getX(), this.getY(), this.getWidth(), this.getHeight())\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n return {\r\n ...this._super(),\r\n path: this.path\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n if (typeof memento.path !== \"undefined\") {\r\n this.setPath(memento.path)\r\n }\r\n }\r\n\r\n})\r\n\r\n","import draw2d from '../../packages'\r\nimport jsonUtil from '../../util/JSONUtil'\r\n\r\n/**\r\n * @class\r\n * Implements a simple text label.\r\n *\r\n *\r\n * @example\r\n *\r\n * let shape = new draw2d.shape.basic.Label({text:\"This is a simple label\", x:40, y:10});\r\n *\r\n * canvas.add(shape);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.SetFigure\r\n */\r\ndraw2d.shape.basic.Label = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.basic.Label.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Label\",\r\n\r\n FONT_FALLBACK: {\r\n 'Georgia': 'Georgia, serif',\r\n 'Palatino Linotype': '\"Palatino Linotype\", \"Book Antiqua\", Palatino, serif',\r\n 'Times New Roman': '\"Times New Roman\", Times, serif',\r\n 'Arial': 'Arial, Helvetica, sans-serif',\r\n 'Arial Black': '\"Arial Black\", Gadget, sans-serif',\r\n 'Comic Sans MS': '\"Comic Sans MS\", cursive, sans-serif',\r\n 'Impact': 'Impact, Charcoal, sans-serif',\r\n 'Lucida Sans Unicode': '\"Lucida Sans Unicode\", \"Lucida Grande\", sans-serif',\r\n 'Tahoma, Geneva': 'Tahoma, Geneva, sans-seri',\r\n 'Trebuchet MS': '\"Trebuchet MS\", Helvetica, sans-serif',\r\n 'Verdana': 'Verdana, Geneva, sans-serif',\r\n 'Courier New': '\"Courier New\", Courier, monospace',\r\n 'Lucida Console': '\"Lucida Console\", Monaco, monospace'\r\n },\r\n\r\n\r\n /**\r\n * Creates a new text element.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.text = \"\"\r\n // for performance reasons\r\n //\r\n this.cachedWidth = null\r\n this.cachedHeight = null\r\n this.cachedMinWidth = null\r\n this.cachedMinHeight = null\r\n\r\n // appearance of the shape\r\n //\r\n this.fontSize = 12\r\n this.fontColor = new draw2d.util.Color(\"#080808\")\r\n this.fontFamily = null\r\n this.padding = {top: 4, right: 4, bottom: 4, left: 4}\r\n\r\n this.outlineStroke = 0\r\n this.outlineColor = new draw2d.util.Color(null)\r\n\r\n this.textAlign = \"start\";\r\n\r\n this.bold = false\r\n\r\n // behavior of the shape\r\n //\r\n this.editor = null\r\n\r\n this._super(\r\n {stroke: 1, width: 1, height: 1, resizeable: false, ...attr},\r\n {\r\n // @attr {String} text the text to show */\r\n text: this.setText,\r\n // @attr {String} set the editor to use see {@link draw2d.ui.LabelEditor} */\r\n editor: this.installEditor,\r\n // @attr {Number} outlineStroke the line width of the text to draw. Fill color and outline of the text can be different. */\r\n outlineStroke: this.setOutlineStroke,\r\n // @attr {String|draw2d.util.Color} outlineColor the outline color of the text */\r\n outlineColor: this.setOutlineColor,\r\n // @attr {String} fontFamily the font to use*/\r\n fontFamily: this.setFontFamily,\r\n // @attr {Number} fontSize the font size to use */\r\n fontSize: this.setFontSize,\r\n // @attr {String|draw2d.util.Color} fontColor the font color */\r\n fontColor: this.setFontColor,\r\n // @attr {Number} padding the padding in pixel around the text */\r\n padding: this.setPadding,\r\n // @attr {Boolean} bold indicator if bold text should be used*/\r\n bold: this.setBold,\r\n\r\n textAlign: this.textAlign,\r\n ...setter},\r\n {\r\n text: this.getText,\r\n outlineStroke: this.getOutlineStroke,\r\n outlineColor: this.getOutlineColor,\r\n fontFamily: this.getFontFamily,\r\n fontSize: this.getFontSize,\r\n fontColor: this.getFontColor,\r\n padding: this.getPadding,\r\n bold: this.isBold,\r\n textAlign: this.textAlign,\r\n ...getter\r\n }\r\n )\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy())\r\n // some performance improvements\r\n this.lastAppliedLabelRotation = \"\"\r\n this.lastAppliedTextAttributes = {}\r\n },\r\n\r\n /**\r\n *\r\n * Creates the shape object for a text node.\r\n *\r\n * @private\r\n **/\r\n createSet: function () {\r\n return this.canvas.paper.set([this.canvas.paper.text(0, 0, this.text)])\r\n },\r\n\r\n /**\r\n *\r\n * Set the canvas element of this figures.\r\n *\r\n * @param {draw2d.Canvas} canvas the new parent of the figure or null\r\n * @private\r\n */\r\n setCanvas: function (canvas) {\r\n this.clearCache()\r\n this._super(canvas)\r\n this.clearCache()\r\n },\r\n\r\n /**\r\n *\r\n * Trigger the repaint of the element and transport all style properties to the visual representation.<br>\r\n * Called by the framework.\r\n *\r\n * @private\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null || (this.parent && this.parent.repaintBlocked === true)) {\r\n return\r\n }\r\n\r\n // style the label\r\n let lattr = this.calculateTextAttr()\r\n lattr.text = this.text\r\n\r\n let attrDiff = jsonUtil.flatDiff(lattr, this.lastAppliedTextAttributes)\r\n this.lastAppliedTextAttributes = lattr\r\n\r\n // the two \"attr\" calls takes 2/3 of the complete method call (chrome performance check).\r\n // now we check if any changes happens and call this method only if necessary.\r\n if (Object.getOwnPropertyNames(attrDiff).length > 0) {\r\n this.svgNodes.attr(lattr)\r\n // set of the x/y must be done AFTER the font-size and bold has been set.\r\n // Reason: the getBBox method needs the font attributes for calculation\r\n this.svgNodes.attr({\r\n x: (this.padding.left + this.stroke),\r\n y: (this.svgNodes.getBBox(true).height / 2 + this.padding.top + this.getStroke())\r\n })\r\n }\r\n this._super(attributes)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * @private\r\n */\r\n calculateTextAttr: function () {\r\n let lattr = {\r\n \"text-anchor\": this.textAlign,\r\n \"font-size\": this.fontSize,\r\n \"font-weight\": (this.bold === true) ? \"bold\" : \"normal\",\r\n fill: this.fontColor.rgba(),\r\n stroke: this.outlineColor.rgba(),\r\n \"stroke-width\": this.outlineStroke,\r\n }\r\n if (this.fontFamily !== null) {\r\n lattr[\"font-family\"] = this.fontFamily\r\n }\r\n return lattr\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {this}\r\n */\r\n applyTransformation: function () {\r\n let ts = \"R\" + this.rotationAngle\r\n this.shape.transform(ts)\r\n this.lastAppliedLabelRotation = ts\r\n\r\n this.svgNodes.transform(\r\n \"R\" + this.rotationAngle +\r\n \"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the new font size in [pt].\r\n *\r\n * @returns {this}\r\n * @param {Number} size The new font size in <code>pt</code>\r\n **/\r\n setFontSize: function (size) {\r\n this.clearCache()\r\n this.fontSize = size\r\n\r\n this.repaint()\r\n\r\n this.fireEvent(\"change:fontSize\", {value: this.fontSize})\r\n this.fireEvent(\"resize\")\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each( (i, e) =>{\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the current used font size in px.\r\n *\r\n * @returns {Number}\r\n * @since 4.0.1\r\n */\r\n getTextAlign: function () {\r\n return this.textAlign\r\n },\r\n\r\n /**\r\n *\r\n * Set the new text align in [pt].\r\n *\r\n * @returns {this}\r\n * @param {String} textAlign The new textAlign in <code>pt</code>\r\n **/\r\n setTextAlign: function (textAlign) {\r\n this.clearCache()\r\n this.textAlign = textAlign\r\n\r\n this.repaint()\r\n\r\n this.fireEvent(\"change:textAlign\", {value: this.textAlign})\r\n this.fireEvent(\"resize\")\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each( (i, e) =>{\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the label to <b>bold</b> or <b>normal</b> font weight.\r\n *\r\n * @param {Boolean} bold The bold flag for the label\r\n * @since 2.4.1\r\n * @returns {this}\r\n **/\r\n setBold: function (bold) {\r\n this.clearCache()\r\n this.bold = bold\r\n this.repaint()\r\n\r\n this.fireEvent(\"change:bold\", {value: this.bold})\r\n this.fireEvent(\"resize\")\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each((i, e) =>{\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the \"bold\" attribute of the label\r\n *\r\n * @since 5.0.0\r\n * @returns {Boolean}\r\n */\r\n isBold: function () {\r\n return this.bold\r\n },\r\n\r\n /**\r\n *\r\n * Set the outline color of the font.\r\n *\r\n * @param {draw2d.util.Color/String} color The new color of the line.\r\n * @since 4.2.1\r\n * @returns {this}\r\n **/\r\n setOutlineColor: function (color) {\r\n this.outlineColor = new draw2d.util.Color(color)\r\n this.repaint()\r\n this.fireEvent(\"change:outlineColor\", {value: this.outlineColor})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The outline color of the text\r\n *\r\n * @returns {draw2d.util.Color}\r\n * @since 4.2.1\r\n */\r\n getOutlineColor: function () {\r\n return this.outlineColor\r\n },\r\n\r\n /**\r\n *\r\n * Set the stroke of the text to use.\r\n *\r\n * @param {Number} w The new line width of the figure\r\n * @since 4.2.1\r\n * @returns {this}\r\n **/\r\n setOutlineStroke: function (w) {\r\n this.outlineStroke = w\r\n this.repaint()\r\n this.fireEvent(\"change:outlineStroke\", {value: this.outlineStroke})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The used outline line width.\r\n *\r\n * @type {Number}\r\n * @since 4.2.1\r\n **/\r\n getOutlineStroke: function () {\r\n return this.outlineStroke\r\n },\r\n\r\n /**\r\n *\r\n * Set the color of the font.\r\n *\r\n * @param {draw2d.util.Color|String} color The new color of the line.\r\n * @returns {this}\r\n **/\r\n setFontColor: function (color) {\r\n this.fontColor = new draw2d.util.Color(color)\r\n this.repaint()\r\n this.fireEvent(\"change:fontColor\", {value: this.fontColor})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The current used font color\r\n *\r\n * @returns {draw2d.util.Color}\r\n */\r\n getFontColor: function () {\r\n return this.fontColor\r\n },\r\n\r\n /**\r\n *\r\n * Set the padding of the element\r\n *\r\n * // Alternatively you can use the attr method:\r\n * //\r\n * // set the padding for top,left,bottom,right in one call\r\n * figure.attr({\r\n * padding: 3\r\n * });\r\n *\r\n * // update the padding left and top\r\n * figure.attr({\r\n * padding: {left:3, top:30}\r\n * });\r\n *\r\n * @param {Number|Object} padding The new padding\r\n * @returns {this}\r\n **/\r\n setPadding: function (padding) {\r\n this.clearCache()\r\n if (typeof padding === \"number\") {\r\n this.padding = {top: padding, right: padding, bottom: padding, left: padding}\r\n } else {\r\n this.padding = {...this.padding, ...padding}\r\n }\r\n this.repaint()\r\n this.fireEvent(\"change:padding\", {value: this.padding})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Get the padding of the element.\r\n *\r\n * @since 4.0.1\r\n **/\r\n getPadding: function () {\r\n return this.padding\r\n },\r\n\r\n /**\r\n *\r\n * Set the font family to use. If you use the shown font names the typical fallback\r\n * font are installed as well.\r\n *\r\n * <b>Serif Fonts</b>\r\n * <ul>\r\n * <li><span style=\"font-family:'Georgia'\">Georgia</span></li>\r\n * <li><span style=\"font-family:'Palatino Linotype'\">Palatino Linotype</span></li>\r\n * <li><span style=\"font-family:'Times New Roman'\">Times New Roman</span></li>\r\n * </ul>\r\n *\r\n * <b>Sans-Serif Fonts</b>\r\n * <ul>\r\n * <li><span style=\"font-family:'Arial'\">Arial</span></li>\r\n * <li><span style=\"font-family:'Arial Black'\">Arial Black</span></li>\r\n * <li><span style=\"font-family:'Comic Sans MS'\">Comic Sans MS</span></li>\r\n * <li><span style=\"font-family:'Impact, Charcoal'\">Impact, Charcoal</span></li>\r\n * <li><span style=\"font-family:'Lucida Sans Unicode'\">Lucida Sans Unicode</span></li>\r\n * <li><span style=\"font-family:'Tahoma, Geneva'\">Tahoma, Geneva</span></li>\r\n * <li><span style=\"font-family:'Trebuchet MS'\">Trebuchet MS</span> </li>\r\n * <li><span style=\"font-family:'Verdana'\">Verdana</span></li>\r\n * </ul>\r\n *\r\n * <b>Monospace Fonts</b>\r\n * <ul>\r\n * <li><span style=\"font-family:'Courier New'\">Courier New</span></li>\r\n * <li><span style=\"font-family:'Lucida Console'\">Lucida Console</span></li>\r\n * </ul>\r\n *\r\n * @param {String} font The font to use\r\n * @returns {this}\r\n **/\r\n setFontFamily: function (font) {\r\n this.clearCache()\r\n\r\n // check for fallback\r\n //\r\n if ((typeof font !== \"undefined\") && font !== null && typeof this.FONT_FALLBACK[font] !== \"undefined\") {\r\n font = this.FONT_FALLBACK[font]\r\n }\r\n\r\n this.fontFamily = font\r\n this.repaint()\r\n this.fireEvent(\"change:fontFamily\", {value: this.fontFamily})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the used font family of the label.\r\n *\r\n * @returns {String}\r\n */\r\n getFontFamily: function () {\r\n return this.fontFamily\r\n },\r\n\r\n\r\n /**\r\n *\r\n * A Label did have \"autosize\". Do nothing at all.\r\n *\r\n * @returns {this}\r\n **/\r\n setDimension: function (w, h) {\r\n this.clearCache()\r\n\r\n this._super(w, h)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * clear the internal cache for width/height precalculation\r\n * @private\r\n */\r\n clearCache: function () {\r\n this.portRelayoutRequired = true\r\n this.cachedMinWidth = null\r\n this.cachedMinHeight = null\r\n this.cachedWidth = null\r\n this.cachedHeight = null\r\n this.lastAppliedTextAttributes = {}\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * This value is relevant for the interactive resize of the figure.\r\n *\r\n * @returns {Number} Returns the min. width of this object.\r\n */\r\n getMinWidth: function () {\r\n if (this.shape === null) {\r\n return 0\r\n }\r\n\r\n this.cachedMinWidth ??= (this.svgNodes.getBBox(true).width + this.padding.left+ this.padding.right + 2*this.getStroke())\r\n\r\n return this.cachedMinWidth\r\n },\r\n\r\n /**\r\n *\r\n * This value is relevant for the interactive resize of the figure.\r\n *\r\n * @returns {Number} Returns the min. width of this object.\r\n */\r\n getMinHeight: function () {\r\n if (this.shape === null) {\r\n return 0\r\n }\r\n this.cachedMinHeight ??= (this.svgNodes.getBBox(true).height+ this.padding.top+ this.padding.bottom+ 2*this.getStroke())\r\n\r\n return this.cachedMinHeight\r\n },\r\n\r\n /**\r\n *\r\n * Return the calculate width of the set. This calculates the bounding box of all elements.\r\n *\r\n * @returns {Number} the calculated width of the label\r\n **/\r\n getWidth: function () {\r\n if (this.shape === null) {\r\n return 0\r\n }\r\n\r\n if (this.cachedWidth === null) {\r\n if (this.resizeable === true) {\r\n this.cachedWidth = Math.max(this.width, this.getMinWidth())\r\n } else {\r\n this.cachedWidth = this.getMinWidth()\r\n }\r\n }\r\n\r\n\r\n return this.cachedWidth\r\n },\r\n\r\n /**\r\n *\r\n * Return the calculated height of the set. This calculates the bounding box of all elements.\r\n *\r\n * @returns {Number} the calculated height of the label\r\n */\r\n getHeight: function () {\r\n if (this.shape === null) {\r\n return 0\r\n }\r\n\r\n this.cachedHeight ??= Math.max(this.height, this.getMinHeight())\r\n\r\n return this.cachedHeight\r\n },\r\n\r\n /**\r\n *\r\n * Set an editor for the label. This can be a dialog or inplace editor for the\r\n * Text.<br>\r\n * The editor will be activated if you doubleClick on the label.\r\n *\r\n * @param {draw2d.ui.LabelEditor|String} editor\r\n */\r\n installEditor: function (editor) {\r\n if (typeof editor === \"string\") {\r\n editor = Function(`return new ${editor}()`)()\r\n }\r\n this.editor = editor\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Called when a user dbl clicks on the element\r\n *\r\n */\r\n onDoubleClick: function () {\r\n this.editor?.start(this)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the current text of the label.\r\n *\r\n * @returns the current display text of the label\r\n * @type {String}\r\n **/\r\n getText: function () {\r\n return this.text\r\n },\r\n\r\n /**\r\n *\r\n * Set the text for the label. Use \\n for multiline text.\r\n *\r\n * @param {String} text The new text for the label.\r\n * @returns {this}\r\n **/\r\n setText: function (text) {\r\n this.clearCache()\r\n this.text = text\r\n\r\n this.repaint()\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"resize\")\r\n this.fireEvent(\"change:text\", {value: this.text})\r\n\r\n this.parent?.repaint()\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Detect whenever the hands over coordinate is inside the figure.\r\n * The default implementation is a simple bounding box test.\r\n *\r\n * @param {Number} iX\r\n * @param {Number} iY\r\n * @param {Number} [corona]\r\n *\r\n * @returns {Boolean}\r\n */\r\n hitTest: function (x, y, corona) {\r\n\r\n // apply a simple bounding box test if the label isn'T rotated\r\n //\r\n if (this.rotationAngle === 0) {\r\n return this._super(x, y, corona)\r\n }\r\n\r\n let boundingBox = this.getBoundingBox()\r\n if (typeof corona === \"number\") {\r\n boundingBox.scale(corona, corona)\r\n }\r\n\r\n // rotate the box with the current matrix of the\r\n // shape\r\n let matrix = this.shape.matrix\r\n let points = boundingBox.getVertices()\r\n points.each( (i, point) => {\r\n point.x = matrix.x(point.x, point.y)\r\n point.y = matrix.y(point.x, point.y)\r\n })\r\n\r\n let polySides = 4\r\n\r\n let j = polySides - 1\r\n let oddNodes = false\r\n\r\n for (let i = 0; i < polySides; i++) {\r\n let pi = points.get(i)\r\n let pj = points.get(j)\r\n if ((pi.y < y && pj.y >= y\r\n || pj.y < y && pi.y >= y)\r\n && (pi.x <= x || pj.x <= x)) {\r\n if (pi.x + (y - pi.y) / (pj.y - pi.y) * (pj.x - pi.x) < x) {\r\n oddNodes = !oddNodes\r\n }\r\n }\r\n j = i\r\n }\r\n return oddNodes\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.text = this.text\r\n memento.outlineStroke = this.outlineStroke\r\n memento.outlineColor = this.outlineColor.rgba()\r\n memento.fontSize = this.fontSize\r\n memento.fontColor = this.fontColor.rgba()\r\n memento.fontFamily = this.fontFamily\r\n memento.bold = this.bold\r\n\r\n if (this.editor !== null) {\r\n memento.editor = this.editor.NAME\r\n }\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Apply all attributes from the serialized properties to the shape.\r\n * Used during JSON serialisation.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n if (typeof memento.text !== \"undefined\") {\r\n this.setText(memento.text)\r\n }\r\n if (typeof memento.outlineStroke !== \"undefined\") {\r\n this.setOutlineStroke(memento.outlineStroke)\r\n }\r\n if (typeof memento.outlineColor !== \"undefined\") {\r\n this.setOutlineColor(memento.outlineColor)\r\n }\r\n if (typeof memento.fontFamily !== \"undefined\") {\r\n this.setFontFamily(memento.fontFamily)\r\n }\r\n if (typeof memento.fontSize !== \"undefined\") {\r\n this.setFontSize(memento.fontSize)\r\n }\r\n if (typeof memento.fontColor !== \"undefined\") {\r\n this.setFontColor(memento.fontColor)\r\n }\r\n if (typeof memento.bold !== \"undefined\") {\r\n this.setBold(memento.bold)\r\n }\r\n\r\n if (typeof memento.editor === \"string\") {\r\n this.installEditor(Function(`return new ${memento.editor}()`)())\r\n }\r\n\r\n return this\r\n }\r\n\r\n })\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * The base class for all visible elements inside a canvas.\r\n *\r\n *\r\n * @example\r\n *\r\n * // Create the line and modify the start/end after inserting them into\r\n * // the canvas\r\n * let line1 = new draw2d.shape.basic.Line({startX:30, startY:30, endX:100, endY:80});\r\n *\r\n * canvas.add(line1);\r\n *\r\n * // Create the line with a given start/end coordinate in the constructor\r\n * //\r\n * let line2 = new draw2d.shape.basic.Line({\r\n * startX:20,\r\n * startY:80,\r\n * endX:200,\r\n * endY:150,\r\n * stroke:3,\r\n * color:\"#1d1dff\"\r\n * });\r\n * canvas.add(line2);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.Figure\r\n */\r\ndraw2d.shape.basic.Line = draw2d.Figure.extend(\r\n /** @lends draw2d.shape.basic.Line.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Line\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(0, 0, 0),\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas witht he given start and\r\n * end coordinate.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // click area for the line hit test\r\n this.corona = 10\r\n this.isGlowing = false\r\n this.lineColor = this.DEFAULT_COLOR\r\n this.stroke = 1\r\n this.outlineStroke = 0\r\n this.outlineColor = new draw2d.util.Color(null)\r\n this.outlineVisible = false\r\n\r\n this.draggedSegment = null\r\n\r\n this.dasharray = null\r\n this.dasharrayOffset = null;\r\n this.animate = false;\r\n this.animateDirection = false;\r\n\r\n this.start = new draw2d.geo.Point(30, 30)\r\n this.end = new draw2d.geo.Point(100, 100)\r\n\r\n this.glowColor = new draw2d.util.Color(\"#3f72bf\")\r\n this.glowStrokeSize = this.stroke * 2.5;\r\n\r\n this.vertices = new draw2d.util.ArrayList()\r\n this.vertices.add(this.start.clone())\r\n this.vertices.add(this.end.clone())\r\n\r\n this._super(\r\n {\r\n deleteable: false,\r\n selectable: true,\r\n ...attr},\r\n {\r\n // @attr {Number} start the coordinates of the start point */\r\n start: this.setStartPosition,\r\n // @attr {Number} startX the x coordinate of the start point */\r\n startX: this.setStartX,\r\n // @attr {Number} startY the y coordinate of the start point */\r\n startY: this.setStartY,\r\n // @attr {Number} end the coordinates of the end point */\r\n end: this.setEndPosition,\r\n // @attr {Number} endX the x coordinate of the end */\r\n endX: this.setEndX,\r\n // @attr {Number} endY the y coordinate of the end */\r\n endY: this.setEndY,\r\n // @attr {Number} vertices the x coordinate of the start point */\r\n vertices: this.setVertices,\r\n // @attr {String | draw2d.util.Color} outlineColor the outline color of the line */\r\n outlineColor: this.setOutlineColor,\r\n // @attr {Number} outlineStroke the line width of the outline */\r\n outlineStroke: this.setOutlineStroke,\r\n // @attr {String|draw2d.util.Color} color the color of the line */\r\n color: this.setColor,\r\n // @attr {Number} stroke the line width of the color */\r\n stroke: this.setStroke,\r\n corona: this.setCorona,\r\n // @attr {String} dasharray the line pattern see {@link draw2d.shape.basic.Line#setDashArray} for more information*/\r\n dasharray: this.setDashArray,\r\n // @attr {Boolean} glow the glow flag for the shape. The representation of the \"glow\" depends on the shape */\r\n glow: this.setGlow,\r\n glowStrokeSize: this.setGlowStrokeSize,\r\n animate: this.setAnmiate,\r\n animateDirection: this.setAnimateDirection,\r\n dasharrayOffset: this.setDasharrayOffset,\r\n\r\n ...setter},\r\n {\r\n start: this.getStartPosition,\r\n end: this.getEndPosition,\r\n outlineColor: this.getOutlineColor,\r\n outlineStroke: this.getOutlineStroke,\r\n stroke: this.getStroke,\r\n corona: this.getCorona,\r\n color: this.getColor,\r\n dasharray: this.getDashArray,\r\n vertices: this.getVertices,\r\n glowStrokeSize: this.getGlowStrokeSize,\r\n animate: this.getAnmiate,\r\n animateDirection: this.getAnimateDirection,\r\n dasharrayOffset: this.getDasharrayOffset,\r\n \r\n ...getter})\r\n\r\n // some router installs a edit policy. In this case we want delete them\r\n //\r\n if (this.editPolicy.getSize() === 0) {\r\n this.installEditPolicy(new draw2d.policy.line.LineSelectionFeedbackPolicy())\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Set the outline color of the line.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * outlineColor: color\r\n * });\r\n *\r\n * @param {draw2d.util.Color/String} color The new color of the line.\r\n * @since 4.2.1\r\n **/\r\n setOutlineColor: function (color) {\r\n this.outlineColor = new draw2d.util.Color(color)\r\n this.repaint()\r\n this.fireEvent(\"change:outlineColor\", {value: this.outlineColor})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The outline color of the text\r\n *\r\n * @returns {draw2d.util.Color}\r\n * @since 4.2.1\r\n */\r\n getOutlineColor: function () {\r\n return this.outlineColor\r\n },\r\n\r\n /**\r\n *\r\n * Set the outline stroke of the line to use.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * outlineStroke: w\r\n * });\r\n *\r\n * @param {Number} w The new outline width of the line\r\n * @since 4.2.1\r\n **/\r\n setOutlineStroke: function (w) {\r\n this.outlineStroke = w\r\n this.repaint()\r\n this.fireEvent(\"change:outlineStroke\", {value: this.outlineStroke})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The used outline line width.\r\n *\r\n * @returns {Number}\r\n * @since 4.2.1\r\n **/\r\n getOutlineStroke: function () {\r\n return this.outlineStroke\r\n },\r\n\r\n /**\r\n *\r\n * Called if the drag and drop action begins. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true if the figure accepts dragging\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey, isFaked) {\r\n let result = this._super(x, y, shiftKey, ctrlKey)\r\n\r\n if (result === true && isFaked !== true) {\r\n this.draggedSegment = {index: 0, start: this.start, end: this.end}\r\n }\r\n return result\r\n },\r\n\r\n /**\r\n *\r\n * Don't call them manually. This will be done by the framework.<br>\r\n * Will be called if the object are moved via drag and drop.\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call\r\n * the super implementation via <code>this._super(dx, dy, dx2, dy2);</code>\r\n * @private\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n if (this.command === null) {\r\n return\r\n }\r\n\r\n this.vertices.each(function (i, e) {\r\n e.translate(dx2, dy2)\r\n })\r\n this.command.updateVertices(this.vertices.clone())\r\n\r\n // start/end are separate draw2d.geo.Point objects. Required for routing and determining if a node is dragged away\r\n // from the connection. In this case we must modify the start/end by hand\r\n this.start.translate(dx2, dy2)\r\n this.end.translate(dx2, dy2)\r\n\r\n\r\n this.svgPathString = null\r\n this._super(dx, dy, dx2, dy2)\r\n },\r\n\r\n /**\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n // Element ist zwar schon an seine Position, das Command muss aber trotzdem\r\n // in dem CommandStack gelegt werden damit das Undo funktioniert.\r\n //\r\n this.isInDragDrop = false\r\n this.draggedSegment = null\r\n\r\n if (this.command === null) {\r\n return\r\n }\r\n\r\n this.canvas.getCommandStack().execute(this.command)\r\n this.command = null\r\n this.isMoving = false\r\n\r\n // notify all installed policies\r\n //\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.onDragEnd(this.canvas, this, x, y, shiftKey, ctrlKey)\r\n }\r\n })\r\n\r\n // inform all other listener\r\n this.fireEvent(\"move\", {figure: this, dx: 0, dy: 0})\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragend\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n },\r\n\r\n /**\r\n *\r\n * Set the position of the object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * x: x,\r\n * y: y\r\n * });\r\n *\r\n * @param {Number|draw2d.geo.Point} x The new x coordinate of the figure or the x/y coordinate if it is an draw2d.geo.Point\r\n * @param {Number} [y] The new y coordinate of the figure\r\n **/\r\n setPosition: function (x, y) {\r\n if (typeof x === \"undefined\") {\r\n debugger\r\n }\r\n\r\n // get the top left corner of the Line\r\n let topLeft = {x: this.getX(), y: this.getY()}\r\n let diff = {x:0 , y:0}\r\n\r\n if (x instanceof draw2d.geo.Point) {\r\n diff.x = x.x - topLeft.x\r\n diff.y = x.y - topLeft.y\r\n } else {\r\n diff.x = x - topLeft.x\r\n diff.y = y - topLeft.y\r\n }\r\n this.translate(diff.x, diff.y)\r\n },\r\n\r\n /**\r\n *\r\n * Called when a user clicks on the element.\r\n *\r\n * // Alternatively you can register for this event with\r\n * figure.on(\"click\", function(emitterFigure){\r\n * alert(\"clicked\");\r\n * });\r\n *\r\n * @template\r\n * @since 4.0.0\r\n */\r\n onClick: function () {\r\n },\r\n\r\n /**\r\n *\r\n * Set the line style for this object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * dasharray: dashPattern\r\n * });\r\n *\r\n * @param {String} dashPattern Can be one of this [\"\", \"-\", \".\", \"-.\", \"-..\", \". \", \"- \", \"--\", \"- .\", \"--.\", \"--..\"]\r\n */\r\n setDashArray: function (dashPattern) {\r\n this.dasharray = dashPattern\r\n this.repaint()\r\n\r\n this.fireEvent(\"change:dashArray\", {value: this.dasharray})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the line style for this object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr(\"dasharray\");\r\n *\r\n * @since 5.1.0\r\n */\r\n getDashArray: function () {\r\n return this.dasharray\r\n },\r\n\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework. Don't call them manually.\r\n *\r\n * @private\r\n **/\r\n createShapeElement: function () {\r\n let set = this.canvas.paper.set()\r\n\r\n // the drop shadow or border line\r\n set.push(this.canvas.paper.path(\"M\" + this.start.x + \" \" + this.start.y + \"L\" + this.end.x + \" \" + this.end.y))\r\n // the main path\r\n set.push(this.canvas.paper.path(\"M\" + this.start.x + \" \" + this.start.y + \"L\" + this.end.x + \" \" + this.end.y))\r\n set.node = set.items[1].node\r\n\r\n // indicate that the outline is visible at the moment\r\n // the repaint update the status correct and set the attributes for\r\n // the first time\r\n this.outlineVisible = true//this.outlineStroke>0;\r\n\r\n return set\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n // don't override existing values\r\n //\r\n if (typeof attributes === \"undefined\") {\r\n attributes = {\r\n \"stroke\": this.lineColor.rgba(),\r\n \"stroke-width\": this.stroke,\r\n \"path\": [\"M\", this.start.x, this.start.y, \"L\", this.end.x, this.end.y].join(\" \")\r\n }\r\n }\r\n else {\r\n // may a router has calculate another path. don't override them.\r\n if (typeof attributes.path === \"undefined\") {\r\n attributes.path = [\"M\", this.start.x, this.start.y, \"L\", this.end.x, this.end.y].join(\" \")\r\n }\r\n attributes.stroke??=this.lineColor.rgba()\r\n attributes[\"stroke-width\"]??=this.stroke\r\n }\r\n\r\n attributes[\"stroke-dasharray\"]??=this.dasharray\r\n \r\n this._super(attributes)\r\n\r\n \r\n if (this.outlineStroke > 0) {\r\n this.shape.items[0].attr({\r\n \"stroke-width\": (this.outlineStroke + this.stroke),\r\n \"stroke\": this.outlineColor.rgba()\r\n })\r\n if (this.outlineVisible === false)\r\n this.shape.items[0].show()\r\n this.outlineVisible = true\r\n }\r\n else if (this.outlineVisible === true) {\r\n // reset them once\r\n this.shape.items[0].attr({\"stroke-width\": 0, \"stroke\": \"none\"})\r\n this.shape.items[0].hide()\r\n this.outlineVisible = false\r\n }\r\n if(this.animate) {\r\n $(this.shape.items[1].node).css({\"stroke-dashoffset\": this.animateDirection ? \"200\" : \"-200\", \"animation\": \"lineAnimation 5s linear infinite\"});\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Moves the element to the background. Additional\r\n * the internal model changed as well.\r\n *\r\n * @since 4.7.2\r\n */\r\n toBack: function (figure) {\r\n this._super(figure)\r\n\r\n if (this.outlineVisible === true) {\r\n this.shape.items[0].insertBefore(this.shape.items[1])\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n setGlowColor: function (w) {\r\n this.glowColor = w\r\n this.repaint()\r\n this.fireEvent(\"change:glowColor\", {value: this.glowColor})\r\n\r\n return this\r\n },\r\n\r\n\r\n getGlowStrokeSize: function () {\r\n return this.glowStrokeSize\r\n },\r\n\r\n setGlowStrokeSize: function (w) {\r\n this.glowStrokeSize = w\r\n this.repaint()\r\n this.fireEvent(\"change:glowStrokeSize\", {value: this.glowStrokeSize})\r\n\r\n return this\r\n },\r\n\r\n\r\n getGlowColor: function () {\r\n return this.glowColor\r\n },\r\n\r\n getDasharrayOffset: function () {\r\n return this.dasharrayOffset\r\n },\r\n\r\n setDasharrayOffset: function (w) {\r\n this.dasharrayOffset = w\r\n this.repaint()\r\n this.fireEvent(\"change:dasharrayOffset\", {value: this.dasharrayOffset})\r\n\r\n return this\r\n },\r\n\r\n getAnimate: function () {\r\n return this.animate\r\n },\r\n\r\n setAnimate: function (w) {\r\n this.animate = w\r\n this.repaint()\r\n this.fireEvent(\"change:animate\", {value: this.animate})\r\n\r\n return this\r\n },\r\n\r\n getAnimateDirection: function () {\r\n return this.animateDirection\r\n },\r\n\r\n setAnimateDirection: function (w) {\r\n this.animateDirection = w\r\n this.repaint()\r\n this.fireEvent(\"change:animateDirection\", {value: this.animateDirection})\r\n\r\n return this\r\n },\r\n \r\n /**\r\n *\r\n * Highlight the element or remove the highlighting\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * glow: flag\r\n * });\r\n *\r\n * @param {Boolean} flag indicates glow/noGlow\r\n * @template\r\n */\r\n setGlow: function (flag) {\r\n if (this.isGlowing === flag) {\r\n return\r\n }\r\n\r\n if (flag === true) {\r\n // store old values for restore\r\n this._lineColor = this.lineColor\r\n this._stroke = this.stroke\r\n\r\n this.setColor(this.glowColor) \r\n this.setStroke(this.glowStrokeSize)\r\n }\r\n else {\r\n this.setColor(this._lineColor)\r\n this.setStroke(this._stroke)\r\n }\r\n\r\n this.isGlowing = flag\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * You can't drag&drop the resize handles if the line not resizeable.\r\n * @returns boolean\r\n **/\r\n isResizeable: function () {\r\n return true\r\n },\r\n\r\n\r\n /**\r\n * Set the line width. This enforce a repaint of the line.\r\n * This method fires a <i>document dirty</i> event.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * stroke: w\r\n * });\r\n *\r\n * @param {Number} w The new line width of the figure.\r\n **/\r\n setStroke: function (w) {\r\n this.stroke = parseFloat(w)\r\n\r\n this.repaint()\r\n this.fireEvent(\"change:stroke\", {value: this.stroke})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The used line width.\r\n *\r\n * @returns {Number}\r\n **/\r\n getStroke: function () {\r\n return this.stroke\r\n },\r\n\r\n\r\n\r\n /**\r\n * click area for the line hit test.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * corona: w\r\n * });\r\n *\r\n * @param {Number} w The new click hit offset\r\n **/\r\n setCorona: function (w) {\r\n this.corona = parseFloat(w)\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The used corona hitTest area.\r\n *\r\n * @returns {Number}\r\n **/\r\n getCorona: function () {\r\n return this.corona\r\n },\r\n\r\n /**\r\n *\r\n * Set the color of the line.\r\n * This method fires a <i>document dirty</i> event.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * color: color\r\n * });\r\n *\r\n * @param {draw2d.util.Color|String} color The new color of the line.\r\n **/\r\n setColor: function (color) {\r\n this.lineColor = new draw2d.util.Color(color)\r\n this.repaint()\r\n this.fireEvent(\"change:color\", {value: this.lineColor})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the current paint color.\r\n *\r\n * @returns {draw2d.util.Color} The paint color of the line.\r\n **/\r\n getColor: function () {\r\n return this.lineColor\r\n },\r\n\r\n /**\r\n *\r\n * Translate the line with the given x/y offset.\r\n *\r\n * @param {Number} dx The new x translate offset\r\n * @param {Number} dy The new y translate offset\r\n * @since 4.1.0\r\n **/\r\n translate: function (dx, dy) {\r\n this.vertices.each(function (i, e) {\r\n e.translate(dx, dy)\r\n })\r\n\r\n // update start/end if the first or last vertex has been changed\r\n //\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * return the bounding box of the line or polygon\r\n *\r\n * TODO: precalculate or cache this values\r\n *\r\n * @returns {draw2d.geo.Rectangle}\r\n * @since 4.8.2\r\n */\r\n getBoundingBox: function () {\r\n let minX = Math.min(...this.vertices.asArray().map(n => n.x))\r\n let minY = Math.min(...this.vertices.asArray().map(n => n.y))\r\n let maxX = Math.max(...this.vertices.asArray().map(n => n.x))\r\n let maxY = Math.max(...this.vertices.asArray().map(n => n.y))\r\n let width = maxX - minX\r\n let height = maxY - minY\r\n\r\n return new draw2d.geo.Rectangle(minX, minY, width, height)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the start point of the line.\r\n * This method fires a <i>document dirty</i> event.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * startX: x,\r\n * startY: y\r\n * });\r\n *\r\n * @param {Number|draw2d.geo.Point} x the x coordinate of the start point\r\n * @param {Number} [y] the y coordinate of the start point\r\n **/\r\n setStartPosition: function (x, y) {\r\n let pos = new draw2d.geo.Point(x, y)\r\n if (this.start.equals(pos)) {\r\n return this\r\n }\r\n\r\n this.start.setPosition(pos)\r\n this.vertices.first().setPosition(pos)\r\n this.repaint()\r\n\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n this.fireEvent(\"change:start\", {value: this.start})\r\n\r\n return this\r\n },\r\n /** @deprecated */\r\n setStartPoint: function (x, y) {\r\n return this.setStartPosition(x, y)\r\n },\r\n\r\n setStartX: function (x) {\r\n this.setStartPosition(x, this.start.y)\r\n },\r\n\r\n setStartY: function (y) {\r\n this.setStartPosition(this.start.x, y)\r\n },\r\n\r\n setEndX: function (x) {\r\n this.setEndPosition(x, this.end.y)\r\n },\r\n\r\n setEndY: function (y) {\r\n this.setEndPosition(this.end.x, y)\r\n },\r\n\r\n /**\r\n * Set the end point of the line.\r\n * This method fires a <i>document dirty</i> event.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * endX: 3,\r\n * endY: 10\r\n * });\r\n *\r\n * // or\r\n * figure.attr({\r\n * end: {x:3, y:10}\r\n * });\r\n * @param {Number|draw2d.geo.Point} x the x coordinate or a draw2d.geo.Point of the end point\r\n * @param {Number} [y] the y coordinate of the end point\r\n **/\r\n setEndPosition: function (x, y) {\r\n let pos = new draw2d.geo.Point(x, y)\r\n if (this.end.equals(pos)) {\r\n return this\r\n }\r\n\r\n this.end.setPosition(pos)\r\n this.vertices.last().setPosition(pos)\r\n this.repaint()\r\n\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"change:end\", {value: this.end})\r\n\r\n return this\r\n },\r\n /** @deprecated **/\r\n setEndPoint: function (x, y) {\r\n return this.setEndPosition(x, y)\r\n },\r\n\r\n /**\r\n *\r\n * Return the x coordinate of the start.\r\n * @returns {Number}\r\n **/\r\n getStartX: function () {\r\n return this.start.x\r\n },\r\n\r\n /**\r\n *\r\n * Return the y coordinate of the start.\r\n *\r\n * @returns {Number}\r\n **/\r\n getStartY: function () {\r\n return this.start.y\r\n },\r\n\r\n /**\r\n *\r\n * Return the start point.\r\n *\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n getStartPosition: function () {\r\n return this.start.clone()\r\n },\r\n /** @deprecated **/\r\n getStartPoint: function () {\r\n return this.getStartPosition()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the x coordinate of the end point\r\n *\r\n * @returns {Number}\r\n **/\r\n getEndX: function () {\r\n return this.end.x\r\n },\r\n\r\n /**\r\n *\r\n * Return the y coordinate of the end point.\r\n *\r\n * @returns {Number}\r\n **/\r\n getEndY: function () {\r\n return this.end.y\r\n },\r\n\r\n /**\r\n *\r\n * Return the end point.\r\n *\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n getEndPosition: function () {\r\n return this.end.clone()\r\n },\r\n /**\r\n * @deprecated use `getEndPosition`\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n getEndPoint: function () {\r\n return this.getEndPosition()\r\n },\r\n\r\n /**\r\n *\r\n * The x-offset related to the parent figure or canvas.\r\n *\r\n * @returns {Number} the x-offset to the parent figure\r\n **/\r\n getX: function () {\r\n return this.getBoundingBox().x\r\n },\r\n\r\n\r\n /**\r\n *\r\n * The x-offset related to the parent figure or canvas.\r\n *\r\n * @returns {Number} the x-offset to the parent figure\r\n **/\r\n getY: function () {\r\n return this.getBoundingBox().y\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the Vertex with the given index.\r\n *\r\n * @param {Number} index the index of the vertex to return\r\n */\r\n getVertex: function (index) {\r\n return this.vertices.get(index)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Update the vertex at the give position with the new coordinate\r\n *\r\n * @param {Number} index the index of the vertex to update\r\n * @param {Number|draw2d.geo.Point} x the x coordinate or the draw2d.geo.Point object\r\n * @param {Number} [y] the y coordinate or undefined of the second argument is a point\r\n *\r\n * @since 4.0.0\r\n */\r\n setVertex: function (index, x, y) {\r\n if (x instanceof draw2d.geo.Point) {\r\n y = x.y\r\n x = x.x\r\n }\r\n\r\n let vertex = this.vertices.get(index)\r\n\r\n // invalid point or nothing to do\r\n //\r\n if (vertex === null || (vertex.x === x && vertex.y === y)) {\r\n return\r\n }\r\n\r\n vertex.x = parseFloat(x)\r\n vertex.y = parseFloat(y)\r\n\r\n // update start/end if the first or last vertex has been changed\r\n //\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n\r\n this.svgPathString = null\r\n this.routingRequired = true\r\n this.repaint()\r\n\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns the vertices of the connection\r\n *\r\n * @returns {draw2d.util.ArrayList} an draw2d.util.ArrayList of type draw2d.Point\r\n **/\r\n getVertices: function () {\r\n return this.vertices\r\n },\r\n\r\n /**\r\n *\r\n * Update the vertices of the object. The given array is copied and assigned.\r\n *\r\n * @param {draw2d.util.ArrayList|Array} vertices the new vertices of the polyline.\r\n *\r\n * @since 4.0.1\r\n */\r\n setVertices: function (vertices) {\r\n\r\n // convert json document/array to draw2d ArrayList\r\n //\r\n if (Array.isArray(vertices)) {\r\n this.vertices = new draw2d.util.ArrayList()\r\n vertices.forEach(element => {\r\n this.vertices.add(new draw2d.geo.Point(element))\r\n })\r\n }\r\n // use the given ArrayList\r\n //\r\n else if (vertices instanceof draw2d.util.ArrayList) {\r\n this.vertices = vertices.clone(true)\r\n }\r\n else {\r\n throw \"invalid argument for Line.setVertices\"\r\n }\r\n\r\n // can happen if the given vertices array is empty\r\n //\r\n if (this.vertices.getSize() > 1) {\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n }\r\n\r\n // update the UI and the segment parts\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n // align the SelectionHandles to the new situation\r\n // This is a Hack....normally this should be done below and the Line shouldn't know\r\n // something about this issue....this is complete a \"EditPolicy\" domain to handle this.\r\n if (!this.selectionHandles.isEmpty()) {\r\n this.editPolicy.each((i, e) =>{\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(this.canvas, this)\r\n e.onSelect(this.canvas, this)\r\n }\r\n })\r\n }\r\n\r\n // notify the listener about the changes\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the segments of the line with {start:s, end: e} JSON array list\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getSegments: function () {\r\n let result = new draw2d.util.ArrayList()\r\n result.add({start: this.getStartPosition(), end: this.getEndPosition()})\r\n\r\n return result\r\n },\r\n\r\n /**\r\n *\r\n * Returns the length of the line.\r\n *\r\n * @returns {Number}\r\n **/\r\n getLength: function () {\r\n return Math.sqrt((this.start.x - this.end.x) * (this.start.x - this.end.x) + (this.start.y - this.end.y) * (this.start.y - this.end.y))\r\n },\r\n\r\n /**\r\n *\r\n * Returns the angle of the line in degree.\r\n *\r\n * <pre>\r\n * 270°\r\n * |\r\n * |\r\n * |\r\n * |\r\n * 180° -------------------------+------------------------> +X\r\n * | 0°\r\n * |\r\n * |\r\n * |\r\n * V +Y\r\n * 90°\r\n * </pre>\r\n * @returns {Number}\r\n **/\r\n getAngle: function () {\r\n let length = this.getLength()\r\n let angle = -(180 / Math.PI) * Math.asin((this.start.y - this.end.y) / length)\r\n\r\n if (angle < 0) {\r\n if (this.end.x < this.start.x) {\r\n angle = Math.abs(angle) + 180\r\n }\r\n else {\r\n angle = 360 - Math.abs(angle)\r\n }\r\n }\r\n else {\r\n if (this.end.x < this.start.x) {\r\n angle = 180 - angle\r\n }\r\n }\r\n return angle\r\n },\r\n\r\n /**\r\n *\r\n * Returns the Command to perform the specified Request or null if the shape want cancel the\r\n * operation or it can't operate the command.\r\n *\r\n * @param {draw2d.command.CommandType} request describes the Command being requested\r\n * @returns {draw2d.command.Command} null or a Command\r\n * @private\r\n **/\r\n createCommand: function (request) {\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE) {\r\n if (this.isDraggable()) {\r\n return new draw2d.command.CommandMoveVertices(this)\r\n }\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.DELETE) {\r\n if (this.isDeleteable()) {\r\n return new draw2d.command.CommandDelete(this)\r\n }\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE_BASEPOINT) {\r\n if (this.isDraggable()) {\r\n return new draw2d.command.CommandMoveVertex(this)\r\n }\r\n }\r\n\r\n return null\r\n },\r\n\r\n installEditPolicy: function (policy) {\r\n if (!(policy instanceof draw2d.policy.line.LineSelectionFeedbackPolicy) && policy instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n return// silently\r\n }\r\n\r\n this._super(policy)\r\n\r\n },\r\n\r\n /**\r\n *\r\n * Checks if the hands over coordinate close to the line. The 'corona' is considered\r\n * for this test. This means the point isn't direct on the line. Is it only close to the\r\n * line!\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {Boolean}\r\n **/\r\n hitTest: function (px, py) {\r\n return draw2d.shape.basic.Line.hit(this.corona + this.stroke, this.start.x, this.start.y, this.end.x, this.end.y, px, py)\r\n },\r\n\r\n /**\r\n *\r\n * Returns the projection of the point on the line.\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n pointProjection: function (px, py) {\r\n let pt = new draw2d.geo.Point(px, py)\r\n let p1 = this.getStartPosition()\r\n let p2 = this.getEndPosition()\r\n return draw2d.geo.Line.pointProjection(p1.x, p1.y, p2.x, p2.y, pt.x, pt.y)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Returns the point onto the line which has the 'percentage' position onto the line.\r\n *\r\n * @param {Number} percentage value between [0..1]\r\n * @returns {*}\r\n */\r\n lerp: function (percentage) {\r\n let p1 = this.getStartPosition()\r\n let p2 = this.getEndPosition()\r\n percentage = Math.min(1, Math.max(0, percentage))\r\n return new draw2d.geo.Point(p1.x + (p2.x - p1.x) * percentage, p1.y + (p2.y - p1.y) * percentage)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return all intersection points between the given Line.\r\n *\r\n * @param {draw2d.shape.basic.Line} other\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n intersection: function (other) {\r\n let result = new draw2d.util.ArrayList()\r\n\r\n // empty result. the lines are equal...infinit array\r\n if (other === this) {\r\n return result\r\n }\r\n\r\n let segments1 = this.getSegments()\r\n let segments2 = other.getSegments()\r\n\r\n segments1.each(function (i, s1) {\r\n segments2.each(function (j, s2) {\r\n let p = draw2d.shape.basic.Line.intersection(s1.start, s1.end, s2.start, s2.end)\r\n if (p !== null) {\r\n result.add(p)\r\n }\r\n })\r\n })\r\n return result\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n delete memento.x\r\n delete memento.y\r\n delete memento.width\r\n delete memento.height\r\n\r\n memento.stroke = this.stroke\r\n memento.color = this.getColor().rgba()\r\n memento.outlineStroke = this.outlineStroke\r\n memento.outlineColor = this.outlineColor.rgba()\r\n if (this.dasharray !== null) {\r\n memento.dasharray = this.dasharray\r\n }\r\n\r\n if (this.editPolicy.getSize() > 0) {\r\n memento.policy = this.editPolicy.first().NAME\r\n }\r\n\r\n // the attribute \"vertex\" will be overridden by a router if the element is a\r\n // \"PolyLine\" instance and has the correct router. Connections mainly ignore this\r\n // attribute because the start/end is defined by the ports and the vertices in between are\r\n // calculated by a router.\r\n memento.vertex = []\r\n this.getVertices().each( (i, e) => {\r\n memento.vertex.push({x: e.x, y: e.y})\r\n })\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.dasharray === \"string\") {\r\n this.dasharray = memento.dasharray\r\n }\r\n if (typeof memento.stroke !== \"undefined\") {\r\n this.setStroke(parseFloat(memento.stroke))\r\n }\r\n if (typeof memento.color !== \"undefined\") {\r\n this.setColor(memento.color)\r\n }\r\n if (typeof memento.outlineStroke !== \"undefined\") {\r\n this.setOutlineStroke(memento.outlineStroke)\r\n }\r\n if (typeof memento.outlineColor !== \"undefined\") {\r\n this.setOutlineColor(memento.outlineColor)\r\n }\r\n if (typeof memento.policy !== \"undefined\") {\r\n try {\r\n this.installEditPolicy(Function(`return new ${memento.policy}()`)())\r\n }\r\n catch (exc) {\r\n debug.warn(\"Unable to install edit policy '\" + memento.policy + \"' forced by \" + this.NAME + \".setPersistentAttributes. Using default.\")\r\n }\r\n }\r\n\r\n // restore the vertex of the connection/line if any are given\r\n //\r\n // it makes no sense to restore vertices with only zero or one vertex. This\r\n // isn't a \"line\" at all.\r\n if (Array.isArray(memento.vertex) && memento.vertex.length > 1) {\r\n this.setVertices(memento.vertex)\r\n }\r\n\r\n return this\r\n }\r\n})\r\n\r\n\r\n/**\r\n * see: http://en.wikipedia.org/wiki/Line-line_intersection\r\n *\r\n * @param {draw2d.geo.Point} a1\r\n * @param {draw2d.geo.Point} a2\r\n * @param {draw2d.geo.Point} b1\r\n * @param {draw2d.geo.Point} b2\r\n *\r\n * @static\r\n * @private\r\n * @returns {draw2d.geo.Point}\r\n */\r\ndraw2d.shape.basic.Line.intersection = function (a1, a2, b1, b2) {\r\n let result = null\r\n\r\n let ua_t = (b2.x - b1.x) * (a1.y - b1.y) - (b2.y - b1.y) * (a1.x - b1.x)\r\n let ub_t = (a2.x - a1.x) * (a1.y - b1.y) - (a2.y - a1.y) * (a1.x - b1.x)\r\n let u_b = (b2.y - b1.y) * (a2.x - a1.x) - (b2.x - b1.x) * (a2.y - a1.y)\r\n\r\n if (u_b !== 0) {\r\n let ua = ua_t / u_b\r\n let ub = ub_t / u_b\r\n\r\n if (0 <= ua && ua <= 1 && 0 <= ub && ub <= 1) {\r\n result = new draw2d.geo.Point((a1.x + ua * (a2.x - a1.x)) | 0, (a1.y + ua * (a2.y - a1.y)) | 0)\r\n\r\n // determine if the lines are crossing or just touching\r\n //\r\n result.justTouching = (0 === ua || ua === 1 || 0 === ub || ub === 1)\r\n }\r\n }\r\n\r\n return result\r\n}\r\n\r\n\r\n/**\r\n * Static util function to determine is a point(px,py) on the line(x1,y1,x2,y2)\r\n * A simple hit test.\r\n *\r\n * @returns {Boolean}\r\n * @static\r\n * @private\r\n * @param {Number} coronaWidth the accepted corona for the hit test\r\n * @param {Number} X1 x coordinate of the start point of the line\r\n * @param {Number} Y1 y coordinate of the start point of the line\r\n * @param {Number} X2 x coordinate of the end point of the line\r\n * @param {Number} Y2 y coordinate of the end point of the line\r\n * @param {Number} px x coordinate of the point to test\r\n * @param {Number} py y coordinate of the point to test\r\n **/\r\ndraw2d.shape.basic.Line.hit = function (coronaWidth, X1, Y1, X2, Y2, px, py) {\r\n return draw2d.geo.Line.distance(X1, Y1, X2, Y2, px, py) < coronaWidth\r\n}\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Selection handle for connections and normal lines.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.LineResizeHandle\r\n */\r\ndraw2d.shape.basic.LineEndResizeHandle = draw2d.shape.basic.LineResizeHandle.extend(\r\n /** @lends draw2d.shape.basic.LineEndResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.LineEndResizeHandle\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (figure) {\r\n this._super({owner: figure, index: figure.getVertices().getSize() - 1})\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the Port assigned to this ResizeHandle if the line is an instance of draw2d.Connection\r\n *\r\n * @returns {draw2d.Port}\r\n */\r\n getRelatedPort: function () {\r\n if (this.owner instanceof draw2d.Connection) {\r\n return this.owner.getTarget()\r\n }\r\n\r\n return null\r\n },\r\n\r\n /**\r\n *\r\n * Return the peer Port assigned to this ResizeHandle if the line is an instance of draw2d.Connection\r\n *\r\n * @returns {draw2d.Port}\r\n */\r\n getOppositePort: function () {\r\n if (this.owner instanceof draw2d.Connection) {\r\n return this.owner.getSource()\r\n }\r\n\r\n return null\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called from the framework during a drag&drop operation\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @returns {Boolean}\r\n * @private\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n this._super(dx, dy, dx2, dy2)\r\n\r\n let objPos = this.owner.getEndPoint().clone()\r\n objPos.translate(dx2, dy2)\r\n\r\n if (this.command !== null) {\r\n this.command.updatePosition(objPos)\r\n }\r\n\r\n this.owner.setEndPoint(objPos)\r\n\r\n this.owner.isMoving = true\r\n\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Resizehandle has been drop on a InputPort/OutputPort.\r\n *\r\n * @param {draw2d.Figure} dropTarget\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onDrop: function (dropTarget, x, y, shiftKey, ctrlKey) {\r\n this.owner.isMoving = false\r\n\r\n if (this.owner instanceof draw2d.Connection && this.command !== null) {\r\n this.command.setNewPorts(this.owner.getSource(), dropTarget)\r\n this.getCanvas().getCommandStack().execute(this.command)\r\n }\r\n this.command = null\r\n },\r\n\r\n /**\r\n *\r\n * Controls the location of the resize handle\r\n *\r\n **/\r\n relocate: function () {\r\n\r\n let resizeWidthHalf = this.getWidth() / 2\r\n let resizeHeightHalf = this.getHeight() / 2\r\n\r\n let anchor = this.owner.getEndPoint()\r\n\r\n this.setPosition(anchor.x - resizeWidthHalf, anchor.y - resizeHeightHalf)\r\n\r\n return this\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Base class for selection handle for connections and normal lines.\r\n *\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Circle\r\n */\r\ndraw2d.shape.basic.LineResizeHandle = draw2d.shape.basic.Circle.extend(\r\n /** @lends draw2d.shape.basic.LineResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.LineResizeHandle\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.zoomCallback = () => {\r\n this.attr({\r\n width: this.origWidth * this.getCanvas().getZoom(),\r\n height: this.origHeight * this.getCanvas().getZoom(),\r\n stroke: this.origStroke * this.getCanvas().getZoom()\r\n })\r\n // size of the ResizeHandle has changed. Force a reposition of handle\r\n //\r\n if (!this.blockEvent)\r\n this.owner.fireEvent(\"move\", {})\r\n }\r\n\r\n this._super(\r\n {\r\n bgColor: \"#5bcaff\",\r\n stroke: 1,\r\n width: 10,\r\n height: 10,\r\n minWidth: 0.3,\r\n minHeight: 0.3,\r\n selectable: false,\r\n ...attr},\r\n {\r\n owner: this.setOwner,\r\n index: this.setIndex,\r\n ...setter},\r\n {\r\n owner: this.getOwner,\r\n index: this.getIndex,\r\n ...getter})\r\n\r\n // required in the SelectionEditPolicy to indicate the type of figure\r\n // which the user clicks\r\n this.isResizeHandle = true\r\n this.currentTarget = null\r\n\r\n this.origWidth = this.width\r\n this.origHeight = this.height\r\n this.origStroke = this.stroke\r\n },\r\n\r\n /**\r\n * \r\n * Returns the current used SVG as string\r\n *\r\n * @returns {String}\r\n */\r\n getOwner: function () {\r\n return this.owner\r\n },\r\n\r\n setOwner: function (owner) {\r\n this.owner = owner\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns the index of the selection. In case of a PlyLine the count is dynamic.\r\n *\r\n * @returns {Number}\r\n */\r\n getIndex: function () {\r\n return this.index\r\n },\r\n\r\n setIndex: function (index) {\r\n this.index = index\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n let shape = this._super()\r\n\r\n shape.attr({\"cursor\": \"move\"})\r\n return shape\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n **/\r\n setBackgroundColor: function (color) {\r\n color = new draw2d.util.Color(color)\r\n\r\n this.bgGradient = \"r(.4,.3)\" + color.hash() + \"-\" + color.darker(0.1).hash() + \":60-\" + color.darker(0.2).hash()\r\n this._super(color)\r\n this.setColor(color.darker(0.3))\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the port below the ResizeHandle.\r\n *\r\n * @template\r\n * @returns {draw2d.Port}\r\n */\r\n getRelatedPort: function () {\r\n return null\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the port of the other side of the related connection.\r\n *\r\n * @template\r\n * @returns {draw2d.Port}\r\n */\r\n getOppositePort: function () {\r\n return null\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n\r\n if (this.bgColor.hash() === \"none\") {\r\n attributes.fill = this.bgColor.rgba()\r\n }\r\n else if (this.getAlpha() < 0.9) {\r\n attributes.fill = this.bgColor.rgba()\r\n }\r\n else {\r\n attributes.fill = this.bgGradient\r\n }\r\n\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n * Called if the drag and drop action begins. You can return [false] if you\r\n * want avoid the that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @type {Boolean}\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n this.command = this.owner.createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE_BASEPOINT))\r\n // no drag&drop allowed if we didn'T have a valid command.\r\n // This is one way to send a veto for Connection reconnect\r\n if (this.command !== null) {\r\n this.command.setIndex(this.index)\r\n }\r\n\r\n this.setAlpha(0.2)\r\n this.shape.attr({\"cursor\": \"crosshair\"})\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragstart\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n return true\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called from the framework during a drag&drop operation\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @returns {Boolean}\r\n * @private\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n this.setPosition(this.x + dx2, this.y + dy2)\r\n\r\n let port = this.getOppositePort()\r\n\r\n let target = port !== null ? port.getCanvas().getBestFigure(this.getX(), this.getY(), [this, this.owner]) : null\r\n\r\n // the hovering element has been changed\r\n if (target !== this.currentTarget) {\r\n\r\n if (this.currentTarget !== null) {\r\n this.currentTarget.onDragLeave(port)\r\n this.currentTarget.setGlow(false)\r\n this.currentTarget.fireEvent(\"dragLeave\", {draggingElement: port})\r\n }\r\n\r\n if (target !== null) {\r\n this.currentTarget = target.delegateTarget(port)\r\n if (this.currentTarget !== null) {\r\n this.currentTarget.setGlow(true)\r\n this.currentTarget.onDragEnter(port) // legacy\r\n this.currentTarget.fireEvent(\"dragEnter\", {draggingElement: port})\r\n }\r\n }\r\n }\r\n\r\n return true\r\n },\r\n\r\n /**\r\n * Called after a drag and drop action.<br>\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call the super implementation via <code>this._super();</code>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean}\r\n */\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n if (!this.isDraggable()) {\r\n return false\r\n }\r\n\r\n this.shape.attr({\"cursor\": \"move\"})\r\n\r\n let port = this.getOppositePort()\r\n if (port !== null) {\r\n if (this.currentTarget !== null) {\r\n\r\n this.onDrop(this.currentTarget, x, y, shiftKey, ctrlKey)\r\n this.currentTarget.onDragLeave(port)\r\n this.currentTarget.setGlow(false)\r\n this.currentTarget.fireEvent(\"dragLeave\", {draggingElement: port})\r\n this.currentTarget.onCatch(this, x, y, shiftKey, ctrlKey)\r\n this.currentTarget = null\r\n }\r\n }\r\n\r\n this.owner.isMoving = false\r\n // A Connection is stuck to the corresponding ports. So we must reset the position\r\n // to the origin port if we doesn't drop the ResizeHandle on a other port.\r\n //\r\n if (this.owner instanceof draw2d.Connection) {\r\n if (this.command !== null) {\r\n this.command.cancel()\r\n }\r\n }\r\n //\r\n else {\r\n // An non draggable resizeHandle doesn't create a move/resize command.\r\n // This happens if the selected figure has set \"isResizeable=false\".\r\n //\r\n if (this.command !== null) {\r\n this.getCanvas().getCommandStack().execute(this.command)\r\n }\r\n }\r\n this.command = null\r\n\r\n this.setAlpha(1)\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragend\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Controls the position of the ResizeHandle\r\n * Called by the framework.\r\n *\r\n **/\r\n relocate: function () {\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * The LineResizeHandle didn't support the SnapToHelper feature if the\r\n * corresponding object is an Connection. A Connection is always bounded to\r\n * Port. In this case it makes no sense to use a Grid or Geometry for snapping.\r\n *\r\n * @returns {Boolean} return false if the corresponding object didn't support snapTo\r\n **/\r\n supportsSnapToHelper: function () {\r\n if (this.owner instanceof draw2d.Connection) {\r\n return false\r\n }\r\n\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n * Show the ResizeHandle and add it to the canvas.<br>\r\n * Additional bring it in to the front of other figures.\r\n *\r\n * @param {draw2d.Canvas} canvas the canvas to use\r\n * @param {Number} x the x-position\r\n * @param {Number} y the y-position\r\n **/\r\n show: function (canvas, x, y) {\r\n if (x)\r\n debugger\r\n // don't call the parent function. The parent functions make this object selectable/deleteable\r\n // and a resize handle can't be deleted.\r\n this.setCanvas(canvas)\r\n try {\r\n this.blockEvent = true\r\n this.zoomCallback()\r\n }\r\n finally {\r\n this.blockEvent = false\r\n }\r\n\r\n // this.setPosition(x,y);\r\n this.shape.toFront()\r\n this.canvas.resizeHandles.add(this)\r\n },\r\n\r\n /**\r\n * \r\n * Hide the resize handle and remove it from the canvas.\r\n *\r\n **/\r\n hide: function () {\r\n // don't call the parent function. The parent functions delete this object\r\n // and a resize handle shouldn't be deleted.\r\n if (this.shape === null) {\r\n return\r\n }\r\n\r\n this.canvas.resizeHandles.remove(this)\r\n this.setCanvas(null)\r\n },\r\n\r\n\r\n setCanvas: function (canvas) {\r\n\r\n if (this.canvas !== null) {\r\n this.canvas.off(this.zoomCallback)\r\n }\r\n\r\n this._super(canvas)\r\n\r\n if (this.canvas !== null) {\r\n this.canvas.on(\"zoom\", this.zoomCallback)\r\n }\r\n },\r\n\r\n /**\r\n * \r\n * Override this method and redirect them to the canvas. A ResizeHandle didn't support\r\n * Keyboard interaction at the moment.\r\n *\r\n * @param {Number} keyCode the id of the pressed key\r\n * @param {Boolean} ctrl true if the user has pressed the CTRL/STRG key as well.\r\n **/\r\n onKeyDown: function (keyCode, ctrl) {\r\n // don't call the parent function. The parent functions delete this object\r\n // and a resize handle can't be deleted.\r\n this.canvas.onKeyDown(keyCode, ctrl)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Selection handle for connections and normal lines.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.LineResizeHandle\r\n */\r\ndraw2d.shape.basic.LineStartResizeHandle = draw2d.shape.basic.LineResizeHandle.extend(\r\n /** @lends draw2d.shape.basic.LineStartResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.LineStartResizeHandle\",\r\n\r\n /**\r\n *\r\n */\r\n init: function (figure) {\r\n this._super({owner: figure, index: 0})\r\n },\r\n\r\n /**\r\n * Returns the Port below the ResizeHandle\r\n *\r\n * @returns {draw2d.Port}\r\n */\r\n getRelatedPort: function () {\r\n if (this.owner instanceof draw2d.Connection)\r\n return this.owner.getSource()\r\n\r\n return null\r\n },\r\n\r\n /**\r\n * Returns the Port on the opposite side of the ResizeHandle\r\n *\r\n * @returns {draw2d.Port}\r\n */\r\n getOppositePort: function () {\r\n if (this.owner instanceof draw2d.Connection)\r\n return this.owner.getTarget()\r\n\r\n return null\r\n },\r\n\r\n /**\r\n * \r\n * Called from the framework during a drag&drop operation\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @returns {Boolean}\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n this._super(dx, dy, dx2, dy2)\r\n\r\n let objPos = this.owner.getStartPoint()\r\n objPos.translate(dx2, dy2)\r\n\r\n if (this.command !== null) {\r\n this.command.updatePosition(objPos)\r\n\r\n }\r\n this.owner.setStartPoint(objPos)\r\n\r\n this.owner.isMoving = true\r\n\r\n return true\r\n },\r\n\r\n /**\r\n * \r\n * Resize handle has been drop on a InputPort/OutputPort.\r\n *\r\n * @param {draw2d.Port} dropTarget\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n **/\r\n onDrop: function (dropTarget, x, y, shiftKey, ctrlKey) {\r\n this.owner.isMoving = false\r\n\r\n // The ResizeHandle of a Connection has been dropped on a Port\r\n // This will enforce a ReconnectCommand\r\n if (this.owner instanceof draw2d.Connection && this.command !== null) {\r\n this.command.setNewPorts(dropTarget, this.owner.getTarget())\r\n this.getCanvas().getCommandStack().execute(this.command)\r\n }\r\n this.command = null\r\n },\r\n\r\n /**\r\n * \r\n * Controls the location of the resize handle\r\n **/\r\n relocate: function () {\r\n let resizeWidthHalf = this.getWidth() / 2\r\n let resizeHeightHalf = this.getHeight() / 2\r\n\r\n let anchor = this.owner.getStartPoint()\r\n\r\n this.setPosition(anchor.x - resizeWidthHalf, anchor.y - resizeHeightHalf)\r\n\r\n return this\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * Oval figure.\r\n *\r\n * @example\r\n *\r\n * let oval = new draw2d.shape.basic.Oval({width:150, height:100, x:50, y:10});\r\n *\r\n * canvas.add(oval);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.basic.Oval = draw2d.VectorFigure.extend(\r\n /** @lends draw2d.shape.basic.Oval.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Oval\",\r\n\r\n /**\r\n *\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(\r\n {\r\n bgColor: \"#C02B1D\",\r\n color: \"#1B1B1B\",\r\n ...attr\r\n },\r\n {\r\n center: this.setCenter,\r\n ...setter\r\n },\r\n getter)\r\n },\r\n\r\n\r\n /**\r\n * @template\r\n **/\r\n createShapeElement: function () {\r\n let halfW = this.getWidth() / 2\r\n let halfH = this.getHeight() / 2\r\n\r\n return this.canvas.paper.ellipse(this.getAbsoluteX() + halfW, this.getAbsoluteY() + halfH, halfW, halfH)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n applyTransformation: function applyTransformation() {\r\n var ts = \"R\" + this.rotationAngle;\r\n\r\n this.shape.transform(ts);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n *\r\n * Get the center of the figure\r\n *\r\n */\r\n getCenter: function () {\r\n let w2 = this.getWidth() / 2\r\n let h2 = this.getHeight() / 2\r\n\r\n return this.getPosition().translated(w2, h2)\r\n },\r\n\r\n /**\r\n *\r\n * Set the center of the figure.\r\n *\r\n * @param {Number|draw2d.geo.Point} x the new x coordinate of the center or a draw2d.geo.Point object with the center\r\n * @param {Number} [y] the y coordinate of the new center of the first argument isn't a draw2d.geo.Point object\r\n */\r\n setCenter: function (x, y) {\r\n let pos = new draw2d.geo.Point(x, y)\r\n let w2 = this.getWidth() / 2\r\n let h2 = this.getHeight() / 2\r\n\r\n pos.translate(-w2, -h2)\r\n this.setPosition(pos)\r\n\r\n this.fireEvent(\"change:center\", {value: {x: x, y: y}})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n * @template\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n\r\n // don't override cx/cy if inherited class has set the center already.\r\n if (typeof attributes.rx === \"undefined\") {\r\n attributes.rx = this.width / 2\r\n attributes.ry = this.height / 2\r\n }\r\n\r\n // don't override cx/cy if inherited class has set the center already.\r\n if (typeof attributes.cx === \"undefined\") {\r\n attributes.cx = this.getAbsoluteX() + attributes.rx\r\n attributes.cy = this.getAbsoluteY() + attributes.ry\r\n }\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * NOTE: Rotation will need to be added to this function\r\n *\r\n **/\r\n intersectionWithLine: function (a1, a2) {\r\n let rx = this.getWidth() / 2\r\n let ry = this.getHeight() / 2\r\n\r\n let result = new draw2d.util.ArrayList()\r\n\r\n let origin = new draw2d.geo.Point(a1.x, a1.y)\r\n let dir = a2.subtract(a1)\r\n let center = new draw2d.geo.Point(this.getAbsoluteX() + rx, this.getAbsoluteY() + ry)\r\n let diff = origin.subtract(center)\r\n let mDir = new draw2d.geo.Point(dir.x / (rx * rx), dir.y / (ry * ry))\r\n let mDiff = new draw2d.geo.Point(diff.x / (rx * rx), diff.y / (ry * ry))\r\n\r\n let a = dir.dot(mDir)\r\n let b = dir.dot(mDiff)\r\n let c = diff.dot(mDiff) - 1.0\r\n let d = b * b - a * c\r\n\r\n if (d < 0) {\r\n // \"Outside\"\r\n } else if (d > 0) {\r\n let root = Math.sqrt(d)\r\n let t_a = (-b - root) / a\r\n let t_b = (-b + root) / a\r\n\r\n if ((t_a < 0 || 1 < t_a) && (t_b < 0 || 1 < t_b)) {\r\n if ((t_a < 0 && t_b < 0) || (t_a > 1 && t_b > 1)) {\r\n //\"Outside\";\r\n } else {\r\n //\"Inside\";\r\n }\r\n } else {\r\n if (0 <= t_a && t_a <= 1)\r\n result.add(a1.lerp(a2, t_a))\r\n if (0 <= t_b && t_b <= 1)\r\n result.add(a1.lerp(a2, t_b))\r\n }\r\n } else {\r\n let t = -b / a\r\n if (0 <= t && t <= 1) {\r\n result.add(a1.lerp(a2, t))\r\n } else {\r\n //\"Outside\";\r\n }\r\n }\r\n\r\n return result\r\n }\r\n\r\n })\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A PolyLine is a line with more than 2 points.\r\n *\r\n *\r\n * @example\r\n *\r\n * let line = new draw2d.shape.basic.PolyLine();\r\n * line.setVertices([{x:10,y:10},{x:80,y:70},{x:100,y:110}]);\r\n * canvas.add(line);\r\n *\r\n *\r\n * canvas.setCurrentSelection(line);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Line\r\n */\r\ndraw2d.shape.basic.PolyLine = draw2d.shape.basic.Line.extend(\r\n /** @lends draw2d.shape.basic.PolyLine.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.PolyLine\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // internal status handling for performance reasons\r\n //\r\n this.svgPathString = null\r\n this.oldPoint = null\r\n\r\n this.router = null\r\n this.routingRequired = true\r\n this.lineSegments = new draw2d.util.ArrayList()\r\n\r\n this.radius = \"\"\r\n\r\n this._super(\r\n {router: new draw2d.layout.connection.VertexRouter(), ...attr},\r\n {\r\n router: this.setRouter,\r\n radius: this.setRadius,\r\n ...setter,\r\n },\r\n {\r\n router: this.getRouter,\r\n radius: this.getRadius,\r\n ...getter\r\n }\r\n )\r\n },\r\n\r\n /**\r\n * \r\n * Sets the corner radius of the edges.\r\n *\r\n * @param {Number} radius the corner radius\r\n * @since 4.2.1\r\n */\r\n setRadius: function (radius) {\r\n this.radius = radius\r\n this.svgPathString = null\r\n this.repaint()\r\n this.fireEvent(\"change:radius\", {value: this.radius})\r\n\r\n return this\r\n },\r\n\r\n\r\n setOutlineStroke: function (w) {\r\n if (this.outlineStroke !== w) {\r\n this.svgPathString = null\r\n this.routingRequired = true\r\n }\r\n this._super(w)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Get the corner radius of the edges.\r\n *\r\n * @returns {Number}\r\n * @since 4.2.1\r\n */\r\n getRadius: function () {\r\n return this.radius\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the start point of the line.\r\n *\r\n * @param {Number} x the x coordinate of the start point\r\n * @param {Number} y the y coordinate of the start point\r\n **/\r\n setStartPoint: function (x, y) {\r\n if (this.vertices.getSize() > 0) {\r\n this.vertices.first().setPosition(x, y)\r\n }\r\n else {\r\n this.vertices.add(new draw2d.geo.Point(x, y))\r\n }\r\n this.start = this.vertices.first().clone()\r\n // if(this.isInDragDrop===false)\r\n this.calculatePath({startMoved: true, endMoved: false})\r\n\r\n this.repaint()\r\n\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"change:start\", {value: this.start})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Set the end point of the line.\r\n *\r\n * @param {Number} x the x coordinate of the end point\r\n * @param {Number} y the y coordinate of the end point\r\n */\r\n setEndPoint: function (x, y) {\r\n if (this.vertices.getSize() > 1) {\r\n this.vertices.last().setPosition(x, y)\r\n }\r\n else {\r\n this.vertices.add(new draw2d.geo.Point(x, y))\r\n }\r\n this.end = this.vertices.last().clone()\r\n\r\n if (this.isInDragDrop === false)\r\n this.calculatePath({startMoved: false, endMoved: true})\r\n\r\n this.repaint()\r\n\r\n\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n this.fireEvent(\"change:end\", {value: this.end})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Inserts the draw2d.geo.Point object into the vertex list of the polyline just after the object with the given index.\r\n *\r\n * @param {Number|draw2d.geo.Point} x the x coordinate or the draw2d.geo.Point object\r\n * @param {Number} [y] the y coordinate or undefined of the second argument is a point\r\n *\r\n * @since 4.0.0\r\n */\r\n addVertex: function (x, y) {\r\n this.vertices.add(new draw2d.geo.Point(x, y))\r\n\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n if (!this.selectionHandles.isEmpty()) {\r\n\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(this.canvas, this)\r\n e.onSelect(this.canvas, this)\r\n }\r\n })\r\n }\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Inserts the draw2d.geo.Point object into the vertex list of the polyline just after the object with the given index.\r\n *\r\n * @param {Number} index the insert index\r\n * @param {Number|draw2d.geo.Point} x the x coordinate or the draw2d.geo.Point object\r\n * @param {Number} [y] the y coordinate or undefined of the second argument is a point\r\n *\r\n * @since 4.0.0\r\n */\r\n insertVertexAt: function (index, x, y) {\r\n let vertex = new draw2d.geo.Point(x, y)\r\n\r\n this.vertices.insertElementAt(vertex, index)\r\n\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n if (!this.selectionHandles.isEmpty()) {\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(this.canvas, this)\r\n e.onSelect(this.canvas, this)\r\n }\r\n })\r\n }\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Remove a vertex from the polyline and return the removed point. The current installed connection router\r\n * can send an veto for this operation.\r\n *\r\n * @param index\r\n * @returns {draw2d.geo.Point} the removed point or null of the current router decline this operation\r\n * @since 4.0.0\r\n */\r\n removeVertexAt: function (index) {\r\n let removedPoint = this.vertices.removeElementAt(index)\r\n\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n if (!this.selectionHandles.isEmpty()) {\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(this.canvas, this)\r\n e.onSelect(this.canvas, this)\r\n }\r\n })\r\n }\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return removedPoint\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the router for this connection.\r\n *\r\n * @param {draw2d.layout.connection.ConnectionRouter} [router] the new router for this connection or null if the connection should use the default routing\r\n **/\r\n setRouter: function (router) {\r\n if (this.router !== null) {\r\n this.router.onUninstall(this)\r\n }\r\n\r\n this.router = router ?? new draw2d.layout.connection.DirectRouter()\r\n\r\n this.router.onInstall(this)\r\n\r\n this.routingRequired = true\r\n\r\n // repaint the connection with the new router\r\n this.repaint()\r\n\r\n this.fireEvent(\"change:router\", {value: this.router})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return the current active router of this connection.\r\n *\r\n * @returns draw2d.layout.connection.ConnectionRouter\r\n **/\r\n getRouter: function () {\r\n return this.router\r\n },\r\n\r\n /**\r\n * \r\n * Calculate the path of the polyline\r\n *\r\n * @param {Object} [routingHints] some helper attributes for the router\r\n * @param {Boolean} routingHints.startMoved is true if just the start location has moved\r\n * @param {Boolean} routingHints.endMoved is true if the destination location has changed\r\n * @param {Boolean} routingHints.oldVertices store old vertices for after processing\r\n *\r\n * @private\r\n */\r\n calculatePath: function (routingHints) {\r\n routingHints ??= {}\r\n\r\n if (this.shape === null) {\r\n return\r\n }\r\n\r\n this.svgPathString = null\r\n\r\n routingHints.oldVertices = this.vertices\r\n\r\n // cleanup the routing cache\r\n //\r\n this.oldPoint = null\r\n this.lineSegments = new draw2d.util.ArrayList()\r\n this.vertices = new draw2d.util.ArrayList()\r\n\r\n // Use the internal router\r\n //\r\n this.router.route(this, routingHints)\r\n this.routingRequired = false\r\n this.fireEvent(\"routed\")\r\n this.fireEvent(\"change:route\", {})\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n if (this.svgPathString === null || this.routingRequired === true) {\r\n this.calculatePath()\r\n }\r\n\r\n // It is important, that we keep the original \"attributes\" object and mutating them\r\n // Maybe the caller needs the modified 'attributes' object. The \"electra.academy designer\"\r\n // uses this pattern\r\n //\r\n // Won't work: attributes = {...attributes , path: this.svgPathString})\r\n //\r\n\r\n attributes??={}\r\n attributes.path = this.svgPathString\r\n // set some good defaults\r\n attributes[\"stroke-linecap\"] ??= \"round\"\r\n attributes[\"stroke-linejoin\"]??= \"round\"\r\n\r\n return this._super(attributes)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return all line segments of the polyline.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getSegments: function () {\r\n return this.lineSegments\r\n },\r\n\r\n\r\n /**\r\n * used for the router to add the calculated points\r\n *\r\n * @param p\r\n * @param y\r\n */\r\n addPoint: function ( p, y) {\r\n if (typeof y !== \"undefined\") {\r\n p = new draw2d.geo.Point(p, y)\r\n }\r\n this.vertices.add(p)\r\n\r\n if (this.oldPoint !== null) {\r\n // store the painted line segment for the \"mouse selection test\"\r\n // (required for user interaction)\r\n this.lineSegments.add({\r\n start: this.oldPoint,\r\n end: p\r\n })\r\n }\r\n this.svgPathString = null\r\n this.oldPoint = p\r\n },\r\n\r\n /**\r\n * \r\n * Called if the drag and drop action begins. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true if the figure accepts dragging\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey, isFaked) {\r\n let result = this._super(x, y, shiftKey, ctrlKey, isFaked)\r\n\r\n if (result === true && isFaked !== true) {\r\n this.draggedSegment = this.hitSegment(x, y)\r\n }\r\n return result\r\n },\r\n\r\n /**\r\n * \r\n * Returns the length of the polyline.\r\n *\r\n * @returns {Number}\r\n * @since 6.1.43\r\n **/\r\n getLength: function () {\r\n let result = 0\r\n this.lineSegments.each( segment => {\r\n let p1 = segment.start\r\n let p2 = segment.end\r\n result += Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y))\r\n })\r\n return result\r\n },\r\n\r\n setVertices: function (vertices) {\r\n // inform the router tha the vertices has set outside. This switch some\r\n // router from full autoroute to half autoroute\r\n this.router.verticesSet(this)\r\n\r\n this._super(vertices)\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Returns the projection of the point on the line.\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {draw2d.geo.Point}\r\n **/\r\n pointProjection: function (px, py) {\r\n let result = null,\r\n projection = null,\r\n p1 = null,\r\n p2 = null,\r\n segment = null\r\n let lastDist = Number.MAX_SAFE_INTEGER\r\n let pt = new draw2d.geo.Point(px, py)\r\n this.lineSegments.each( segment => {\r\n p1 = segment.start\r\n p2 = segment.end\r\n projection = draw2d.geo.Line.pointProjection(p1.x, p1.y, p2.x, p2.y, pt.x, pt.y)\r\n if (projection !== null) {\r\n let dist = projection.distance(pt)\r\n if (result == null || dist < lastDist) {\r\n result = projection\r\n result.index = i\r\n lastDist = dist\r\n }\r\n }\r\n })\r\n\r\n if (result !== null) {\r\n let length = 0\r\n this.lineSegments.each( segment => {\r\n length += segment.start.distance(segment.end)\r\n })\r\n let segment = this.lineSegments.get(result.index)\r\n p1 = segment.start\r\n p2 = segment.end\r\n length += p1.distance(p2) * draw2d.geo.Line.inverseLerp(p2.x, p2.y, p1.x, p1.y, result.x, result.y)\r\n result.percentage = (1.0 / this.getLength()) * length\r\n }\r\n return result\r\n },\r\n\r\n /**\r\n * \r\n * Returns the point onto the line which has the relative 'percentage' position onto the line.\r\n *\r\n * @param {Number} percentage the relative position between [0..1]\r\n * @returns {draw2d.geo.Point}\r\n */\r\n lerp: function (percentage) {\r\n let length = this.getLength() * percentage\r\n let lastValidLength = length\r\n let segment = null, p1 = null, p2 = null\r\n for (let i = 0; i < this.lineSegments.getSize(); i++) {\r\n segment = this.lineSegments.get(i)\r\n p1 = segment.start\r\n p2 = segment.end\r\n length = length - p1.distance(p2)\r\n if (length <= 0) {\r\n percentage = 1.0 / p1.distance(p2) * lastValidLength\r\n return new draw2d.geo.Point(p1.x + (p2.x - p1.x) * percentage, p1.y + (p2.y - p1.y) * percentage)\r\n }\r\n lastValidLength = length\r\n }\r\n return p2\r\n },\r\n\r\n /**\r\n * \r\n * get the best segment of the line which is below the given coordinate or null if\r\n * all segment are not below the coordinate. <br>\r\n * The 'corona' property of the polyline is considered for this test. This means\r\n * the point isn't direct on the line. Is it only close to the line!\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {Object}\r\n * @since 4.4.0\r\n **/\r\n hitSegment: function (px, py) {\r\n for (let i = 0; i < this.lineSegments.getSize(); i++) {\r\n let segment = this.lineSegments.get(i)\r\n if (draw2d.shape.basic.Line.hit(this.corona + this.stroke, segment.start.x, segment.start.y, segment.end.x, segment.end.y, px, py)) {\r\n return {index: i, start: segment.start, end: segment.end}\r\n }\r\n }\r\n return null\r\n },\r\n\r\n /**\r\n * \r\n * Checks if the hands over coordinate close to the line. The 'corona' property of the polyline\r\n * is considered for this test. This means the point isn't direct on the line. Is it only close to the\r\n * line!\r\n *\r\n * @param {Number} px the x coordinate of the test point\r\n * @param {Number} py the y coordinate of the test point\r\n * @returns {Boolean}\r\n **/\r\n hitTest: function (px, py) {\r\n return this.hitSegment(px, py) !== null\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createCommand: function (request) {\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.DELETE) {\r\n if (this.isDeleteable() === true) {\r\n return new draw2d.command.CommandDelete(this)\r\n }\r\n }\r\n else if (request.getPolicy() === draw2d.command.CommandType.MOVE_VERTEX) {\r\n if (this.isResizeable() === true) {\r\n return new draw2d.command.CommandMoveVertex(this)\r\n }\r\n }\r\n else if (request.getPolicy() === draw2d.command.CommandType.MOVE_VERTICES) {\r\n if (this.isResizeable() === true) {\r\n return new draw2d.command.CommandMoveVertices(this)\r\n }\r\n }\r\n\r\n return this._super(request)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n return this.router.getPersistentAttributes(this, {...this._super(), \r\n router: this.router.NAME,\r\n radius: this.radius\r\n })\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.router !== \"undefined\") {\r\n try {\r\n this.setRouter(Function(`return new ${memento.router}()`)())\r\n }\r\n catch (exc) {\r\n debug.warn(\"Unable to install router '\" + memento.router + \"' forced by \" + this.NAME + \".setPersistentAttributes. Using default\")\r\n }\r\n }\r\n\r\n if (typeof memento.radius !== \"undefined\") {\r\n this.setRadius(memento.radius)\r\n }\r\n\r\n this.router.setPersistentAttributes(this, memento)\r\n\r\n if (this.vertices.getSize() > 1) {\r\n this.start = this.vertices.first().clone()\r\n this.end = this.vertices.last().clone()\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\nimport jsonUtil from '../../util/JSONUtil'\r\n\r\n\r\n/**\r\n * @class\r\n * A Polygon figure.\r\n *\r\n *\r\n * @example\r\n *\r\n * let p1 = new draw2d.shape.basic.Polygon({width:100, height:100});\r\n * let p2 = new draw2d.shape.basic.Polygon({width:100, height:60});\r\n *\r\n * canvas.add(p1,10,10);\r\n * canvas.add(p2,100,10);\r\n *\r\n * p2.attr({color:\"#f0f000\", alpha:0.7});\r\n *\r\n * canvas.setCurrentSelection(p2);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.basic.Polygon = draw2d.VectorFigure.extend(\r\n /** @lends draw2d.shape.basic.Polygon.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Polygon\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.minX = 0\r\n this.minY = 0\r\n this.maxX = 0\r\n this.maxY = 0\r\n this.vertices = new draw2d.util.ArrayList()\r\n\r\n this._super(attr, setter, getter)\r\n\r\n // we must cache the initial width/height because the width/height of the shape\r\n // is recalculated in the addVertex method. After the first call this values are 0/0\r\n if (this.vertices.getSize() === 0) {\r\n let w = this.width\r\n let h = this.height\r\n let pos = this.getPosition()\r\n this.addVertex(new draw2d.geo.Point(0, 0))\r\n this.addVertex(new draw2d.geo.Point(w, 0))\r\n this.addVertex(new draw2d.geo.Point(w, h))\r\n\r\n this.setPosition(pos)\r\n }\r\n\r\n this.svgPathString = null\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.VertexSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setRadius: function (radius) {\r\n this.svgPathString = null\r\n\r\n this._super(radius)\r\n this.fireEvent(\"change:radius\", {value: radius})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n // return some good default...\r\n return this.canvas.paper.path(\"M0 10L100 100\")\r\n },\r\n\r\n /**\r\n * \r\n * calculate the path of the polygon\r\n *\r\n */\r\n calculatePath: function () {\r\n let radius = this.getRadius()\r\n let path = []\r\n // hard corners\r\n //\r\n if (radius === 0) {\r\n let length = this.vertices.getSize()\r\n let p = this.vertices.get(0)\r\n path.push(\"M\", p.x, \" \", p.y)\r\n for (let i = 1; i < length; i++) {\r\n p = this.vertices.get(i)\r\n path.push(\"L\", p.x, \" \", p.y)\r\n }\r\n path.push(\"Z\")\r\n }\r\n // soften/round corners\r\n //\r\n else {\r\n length = this.vertices.getSize()\r\n let start = this.vertices.first()\r\n let end = this.vertices.last()\r\n if (start.equals(end)) {\r\n length = length - 1\r\n end = this.vertices.get(length - 1)\r\n }\r\n let begin = draw2d.geo.Util.insetPoint(start, end, radius)\r\n path.push(\"M\", begin.x, \",\", begin.y)\r\n for (let i = 0; i < length; i++) {\r\n start = this.vertices.get(i)\r\n end = this.vertices.get((i + 1) % length)\r\n let modStart = draw2d.geo.Util.insetPoint(start, end, radius)\r\n let modEnd = draw2d.geo.Util.insetPoint(end, start, radius)\r\n path.push(\"Q\", start.x, \",\", start.y, \" \", modStart.x, \", \", modStart.y)\r\n path.push(\"L\", modEnd.x, \",\", modEnd.y)\r\n }\r\n }\r\n this.svgPathString = path.join(\"\")\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n if (this.svgPathString === null) {\r\n this.calculatePath()\r\n }\r\n //\r\n attributes??={}\r\n attributes.path ??= this.svgPathString\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n * \r\n * Translate the figure with the given x/y offset. This method modifies all\r\n * vertices and the bounding box.\r\n *\r\n * @param {Number} dx The new x translate offset\r\n * @param {Number} dy The new y translate offset\r\n **/\r\n translate: function (dx, dy) {\r\n let _this = this\r\n\r\n // TODO: This is not good. If the polygon part of an \"Composite\" I should call\r\n // the adjustPosition. IF we DragDrap the composition the figures inside should follow\r\n // without modify the dx/dy.\r\n //\r\n dx = this.x + dx\r\n dy = this.y + dy\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n let newPos = e.adjustPosition(_this, dx, dy)\r\n dx = newPos.x\r\n dy = newPos.y\r\n }\r\n })\r\n dx = dx - this.x\r\n dy = dy - this.y\r\n\r\n\r\n this.vertices.each(function (i, e) {\r\n e.translate(dx, dy)\r\n })\r\n this.svgPathString = null\r\n this.updateBoundingBox()\r\n\r\n this.repaint()\r\n\r\n\r\n // Update the resize handles if the user change the position of the\r\n // element via an API call.\r\n //\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n\r\n this.fireEvent(\"move\", {figure: this, dx: dx, dy: dy})\r\n this.fireEvent(\"change:x\", {value: this.x})\r\n this.fireEvent(\"change:y\", {value: this.y})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Change the position of the polygon. This method updates all vertices.\r\n *\r\n * @param {Number|draw2d.geo.Point} x\r\n * @param {Number} [y]\r\n */\r\n setPosition: function (x, y) {\r\n if (x instanceof draw2d.geo.Point) {\r\n y = x.y\r\n x = x.x\r\n }\r\n this.svgPathString = null\r\n\r\n let dx = x - this.minX\r\n let dy = y - this.minY\r\n\r\n this.translate(dx, dy)\r\n\r\n this.x = x\r\n this.y = y\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n let oldWidth = this.width\r\n let oldHeight = this.height\r\n\r\n this._super(w, h)\r\n\r\n let fracWidth = (1 / oldWidth) * this.width\r\n let fracHeight = (1 / oldHeight) * this.height\r\n\r\n let thisX = this.x\r\n let thisY = this.y\r\n this.vertices.each(function (i, e) {\r\n // calculate difference between point and figure origin\r\n let diffX = (e.getX() - thisX) * fracWidth\r\n let diffY = (e.getY() - thisY) * fracHeight\r\n e.setPosition(thisX + diffX, thisY + diffY)\r\n })\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n this.fireEvent(\"change:dimension\", {value: {width: this.width, height: this.height}})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return all vertices of the polygon.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getVertices: function () {\r\n return this.vertices\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the Vertex with the given index.\r\n *\r\n * @param {Number} index the index of the vertex to return\r\n * @since 5.0.2\r\n */\r\n getVertex: function (index) {\r\n return this.vertices.get(index)\r\n },\r\n\r\n\r\n resetVertices: function () {\r\n this.vertices = new draw2d.util.ArrayList()\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n this.updateBoundingBox()\r\n\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(this.canvas, this)\r\n }\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Update the vertex at the given index. The method call didn't have any effect\r\n * if the vertex didn't exists.\r\n *\r\n * @param {Number} index\r\n * @param {Number} x\r\n * @param {Number} y\r\n */\r\n setVertex: function (index, x, y) {\r\n let vertex = this.vertices.get(index)\r\n\r\n // invalid point or nothing to do\r\n //\r\n if (vertex === null || (vertex.x === x && vertex.y === y)) {\r\n return this\r\n }\r\n\r\n vertex.x = parseFloat(x)\r\n vertex.y = parseFloat(y)\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n this.updateBoundingBox()\r\n\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Append a new vertex to the polygon.\r\n *\r\n * @param {Number | draw2d.geo.Point} x\r\n * @param {Number} [y]\r\n */\r\n addVertex: function (x, y) {\r\n this.vertices.add(new draw2d.geo.Point(x, y))\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n this.updateBoundingBox()\r\n\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Insert a new vertex at the given index. All vertices will be shifted to\r\n * free the requested index.\r\n *\r\n * @param {Number} index\r\n * @param {Number} x\r\n * @param {Number} y\r\n */\r\n insertVertexAt: function (index, x, y) {\r\n this.vertices.insertElementAt(new draw2d.geo.Point(x, y), index)\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n this.updateBoundingBox()\r\n\r\n if (!this.selectionHandles.isEmpty()) {\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(_this.canvas, _this)\r\n e.onSelect(_this.canvas, _this)\r\n }\r\n })\r\n }\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Remove a vertex from the polygon and return the removed point.\r\n *\r\n * @param {Number} index\r\n *\r\n * @returns {draw2d.geo.Point} the removed vertex\r\n */\r\n removeVertexAt: function (index) {\r\n // a polygon need at least 3 vertices\r\n //\r\n if (this.vertices.getSize() <= 3) {\r\n return null\r\n }\r\n\r\n let vertex = this.vertices.removeElementAt(index)\r\n\r\n this.svgPathString = null\r\n this.repaint()\r\n\r\n this.updateBoundingBox()\r\n\r\n if (!this.selectionHandles.isEmpty()) {\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.SelectionFeedbackPolicy) {\r\n e.onUnselect(_this.canvas, _this)\r\n e.onSelect(_this.canvas, _this)\r\n }\r\n })\r\n }\r\n this.fireEvent(\"change:vertices\", {value: this.vertices})\r\n\r\n return vertex\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setRotationAngle: function (angle) {\r\n this.rotationAngle = 360 % angle\r\n\r\n // The different to the other figures is, the the vertices must rotated instead of\r\n // transform the shape with SVG matrix.\r\n //\r\n // Reason: the vertices are selectable and in this case the coordinates must transform\r\n // and not only the resulting SVG shape.\r\n //\r\n let radian = angle / (180 / Math.PI)\r\n let center = this.getBoundingBox().getCenter()\r\n let rotate = function (x, y, xm, ym, radian) {\r\n let cos = Math.cos,\r\n sin = Math.sin\r\n return {\r\n x: (x - xm) * cos(radian) - (y - ym) * sin(radian) + xm,\r\n y: (x - xm) * sin(radian) + (y - ym) * cos(radian) + ym\r\n }\r\n }\r\n\r\n this.vertices.each(function (i, e) {\r\n let rot = rotate(e.x, e.y, center.x, center.y, radian)\r\n e.setPosition(rot.x, rot.y)\r\n })\r\n\r\n this.updateBoundingBox()\r\n\r\n\r\n // Update the resize handles if the user change the position of the element via an API call.\r\n //\r\n let _this = this\r\n this.editPolicy.each(function (i, e) {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.moved(_this.canvas, _this)\r\n }\r\n })\r\n\r\n this.repaint()\r\n this.fireEvent(\"change:angle\", {value: this.rotationAngle})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Calculate the bounding box of the shape and store them in an internal\r\n * variable for fast access.\r\n *\r\n * @private\r\n */\r\n updateBoundingBox: function () {\r\n if (this.vertices.isEmpty()) {\r\n this.minX = this.x\r\n this.minY = this.y\r\n this.maxX = this.x + this.width\r\n this.maxY = this.y + this.height\r\n }\r\n else {\r\n this.minX = this.x = Math.min(...this.vertices.asArray().map(n => n.x))\r\n this.minY = this.y = Math.min(...this.vertices.asArray().map(n => n.y))\r\n this.maxX = Math.max(...this.vertices.asArray().map(n => n.x))\r\n this.maxY = Math.max(...this.vertices.asArray().map(n => n.y))\r\n this.width = this.maxX - this.minX\r\n this.height = this.maxY - this.minY\r\n }\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createCommand: function (request) {\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.MOVE_VERTEX) {\r\n if (this.isResizeable() === true) {\r\n return new draw2d.command.CommandMoveVertex(this)\r\n }\r\n }\r\n\r\n return this._super(request)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.vertices = []\r\n\r\n this.vertices.each(function (i, e) {\r\n memento.vertices.push({x: e.x, y: e.y})\r\n })\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n // restore the points from the JSON data and add them to the polyline\r\n //\r\n if (typeof memento.vertices !== \"undefined\") {\r\n this.vertices = new draw2d.util.ArrayList()\r\n memento.vertices.forEach(point => {\r\n this.addVertex(point)\r\n })\r\n }\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * A Rectangle Figure.\r\n *\r\n *\r\n * @example\r\n *\r\n * let rect1 = new draw2d.shape.basic.Rectangle({\r\n * \tx:10,\r\n * y:10\r\n * });\r\n *\r\n * let rect2 = new draw2d.shape.basic.Rectangle({\r\n * x: 100,\r\n * y: 10,\r\n * bgColor: \"#f0f000\",\r\n * alpha : 0.7,\r\n * width: 100,\r\n * height: 60,\r\n * radius: 10\r\n * });\r\n *\r\n * canvas.add(rect1);\r\n * canvas.add(rect2);\r\n *\r\n * canvas.setCurrentSelection(rect2);\r\n *\r\n * @author Andreas Herz\r\n * @param {Object} [attr] the configuration of the shape\r\n * @param {Object} [setter] add or replace setter methods\r\n * @param {Object} [getter] add or replace getter methods\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.basic.Rectangle = draw2d.VectorFigure.extend(\r\n /** @lends draw2d.shape.basic.Rectangle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Rectangle\",\r\n\r\n init: function (attr, setter, getter) {\r\n this.dasharray = null\r\n\r\n this._super(\r\n {\r\n bgColor: \"#a0a0a0\", color: \"#1B1B1B\",\r\n ...attr},\r\n {\r\n dash: this.setDashArray,\r\n dasharray: this.setDashArray,\r\n ...setter,\r\n },\r\n { \r\n dash: this.getDashArray,\r\n dasharray: this.getDashArray,\r\n ...getter\r\n }\r\n )\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??={}\r\n attributes.width ??= this.getWidth()\r\n attributes.height ??= this.getHeight()\r\n attributes.r ??= this.getRadius()\r\n if (this.dasharray !== null) {\r\n attributes[\"stroke-dasharray\"] = this.dasharray\r\n }\r\n\r\n this._super(attributes)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n applyTransformation: function () {\r\n let ts = \"R\" + this.rotationAngle\r\n\r\n if (this.getRotationAngle() === 90 || this.getRotationAngle() === 270) {\r\n let ratio = this.getHeight() / this.getWidth()\r\n ts = ts + \"S\" + ratio + \",\" + 1 / ratio + \",\" + (this.getAbsoluteX() + this.getWidth() / 2) + \",\" + (this.getAbsoluteY() + this.getHeight() / 2)\r\n }\r\n\r\n this.shape.transform(ts)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n return this.canvas.paper.rect(this.getAbsoluteX(), this.getAbsoluteY(), this.getWidth(), this.getHeight())\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the line style for dot/dash styling. Possible values are\r\n * [\"\", \"-\", \".\", \"-.\", \"-..\", \". \", \"- \", \"--\", \"- .\", \"--.\", \"--..\"]\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * dash: pattern\r\n * });\r\n *\r\n * @param {String} pattern the string with the dot/dash pattern. valid values: [\"\", \"-\", \".\", \"-.\", \"-..\", \". \", \"- \", \"--\", \"- .\", \"--.\", \"--..\"]\r\n */\r\n setDashArray: function (pattern) {\r\n this.dasharray = pattern\r\n this.repaint()\r\n this.fireEvent(\"change:dashArray\", {value: this.dasharray})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the line style for this object.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr(\"dash\");\r\n *\r\n * @since 5.1.0\r\n */\r\n getDashArray: function () {\r\n return this.dasharray\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n if (this.dasharray !== null) {\r\n memento.dasharray = this.dasharray\r\n }\r\n\r\n return memento\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.dasharray === \"string\") {\r\n this.dasharray = memento.dasharray\r\n }\r\n\r\n return this\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Implements a simple text with word wrapping.<br>The height of the element is automatic calculated. The width of\r\n * the element is changeable by the user and respect the minWidth constraint.\r\n * <br>\r\n *\r\n *\r\n * @example\r\n *\r\n * let shape = new draw2d.shape.basic.Text({text:\"This is a simple text with some loooooong word in.\"});\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n * @author Andreas Herz\r\n * @since 4.2.3\r\n * @extends draw2d.shape.basic.Label\r\n */\r\ndraw2d.shape.basic.Text = draw2d.shape.basic.Label.extend(\r\n /** @lends draw2d.shape.basic.Text.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.Text\",\r\n\r\n /**\r\n * Creates a new text element.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.cachedWrappedAttr = null\r\n\r\n this._super({ width: 100, height: 50, resizeable: true,...attr}, setter, getter)\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.WidthSelectionFeedbackPolicy())\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n // style the label\r\n this.svgNodes.attr({...this.calculateTextAttr(), ...this.wrappedTextAttr(this.text, this.getWidth() - this.padding.left - this.padding.right)})\r\n\r\n // set of the x/y must be done AFTER the font-size and bold has been set.\r\n // Reason: the getHeight method needs the font-size for calculation because\r\n // it redirects the calculation to the SVG element.\r\n this.svgNodes.attr({x: this.padding.left, y: this.getHeight() / 2})\r\n\r\n // this is an exception call. Don't call the super method (Label) to avoid\r\n // the calculation in this method.\r\n draw2d.SetFigure.prototype.repaint.call(this, attributes)\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this.clearCache()\r\n let attr = this.wrappedTextAttr(this.text, w)\r\n\r\n this.cachedMinWidth = Math.max(w, attr.width)\r\n this.cachedMinHeight = attr.height\r\n\r\n draw2d.shape.node.Node.prototype.setDimension.call(this, this.cachedMinWidth, this.cachedMinHeight)\r\n // this._super(Math.min(w,attr.width),attr.height);\r\n this.fireEvent(\"change:dimension\", {value: {width: this.cachedMinWidth, height: this.cachedMinHeight}})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * clear the internal cache for width/height precalculation\r\n * @private\r\n */\r\n clearCache: function () {\r\n this._super()\r\n this.cachedWrappedAttr = null\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n if (this.shape === null) {\r\n return 0\r\n }\r\n\r\n if (this.cachedMinWidth === null) {\r\n // get the longest word in the text\r\n //\r\n let longestWord = this.text.split(\" \").reduce( (arg1, arg2)=>arg1.length>arg2.length?arg1:arg2)\r\n let svgText = this.canvas.paper\r\n .text(0, 0, longestWord)\r\n .attr({...this.calculateTextAttr(), text: longestWord})\r\n this.cachedMinWidth = svgText.getBBox(true).width + this.padding.left + this.padding.right + 2 * this.getStroke()\r\n svgText.remove()\r\n }\r\n\r\n return this.cachedMinWidth\r\n },\r\n\r\n\r\n /**\r\n *\r\n * calculates the attributes (wrapped text and width, height) with the given parameter\r\n *\r\n * @private\r\n */\r\n wrappedTextAttr: function (text, width) {\r\n let words = text.split(\" \")\r\n if (this.canvas === null || words.length === 0) {\r\n return {text: text, width: width, height: 20}\r\n }\r\n\r\n if (this.cachedWrappedAttr === null) {\r\n let abc = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\"\r\n let svgText = this.canvas.paper.text(0, 0, \"\")\r\n \r\n svgText.attr({ ...this.calculateTextAttr(), text: abc})\r\n\r\n // get a good estimation of a letter width...not correct but this is working for the very first draft implementation\r\n let letterWidth = svgText.getBBox(true).width / abc.length\r\n\r\n let s = [words[0]], x = s[0].length * letterWidth\r\n let w = null\r\n for (let i = 1; i < words.length; i++) {\r\n w = words[i]\r\n let l = w.length * letterWidth\r\n if ((x + l) > width) {\r\n s.push(\"\\n\")\r\n x = l\r\n } else {\r\n s.push(\" \")\r\n x += l\r\n }\r\n s.push(w)\r\n }\r\n // set the wrapped text and get the resulted bounding box\r\n //\r\n svgText.attr({text: s.join(\"\")})\r\n let bbox = svgText.getBBox(true)\r\n svgText.remove()\r\n this.cachedWrappedAttr = {\r\n text: s.join(\"\"),\r\n width: (Math.max(width, bbox.width) + this.padding.left + this.padding.right),\r\n height: (bbox.height + this.padding.top + this.padding.bottom)\r\n }\r\n }\r\n return this.cachedWrappedAttr\r\n }\r\n })\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Selection handle for polyline vertices.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.ResizeHandle\r\n */\r\ndraw2d.shape.basic.VertexResizeHandle = draw2d.ResizeHandle.extend(\r\n /** @lends draw2d.shape.basic.VertexResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.basic.VertexResizeHandle\",\r\n\r\n SNAP_THRESHOLD: 3,\r\n LINE_COLOR: \"#1387E6\",\r\n FADEOUT_DURATION: 300,\r\n\r\n init: function (owner, index) {\r\n this._super({owner})\r\n this.index = index\r\n this.isDead = false\r\n },\r\n\r\n\r\n /**\r\n * Called when a user double clicks on the element\r\n *\r\n * @template\r\n */\r\n onDoubleClick: function () {\r\n let cmd = new draw2d.command.CommandRemoveVertex(this.owner, this.index)\r\n this.getCanvas().getCommandStack().execute(cmd)\r\n\r\n this.isDead = true\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called if a drag&drop operation starts.<br>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @private\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n if (this.isDead === true) {\r\n return\r\n }\r\n\r\n this._super()\r\n this.command = this.getCanvas().getPrimarySelection().createCommand(new draw2d.command.CommandType(draw2d.command.CommandType.MOVE_VERTEX))\r\n if (this.command != null) {\r\n this.command.setIndex(this.index)\r\n this.setAlpha(0.2)\r\n this.shape.attr({\"cursor\": \"crosshair\"})\r\n }\r\n\r\n // Vertex is a reference and not a copy of the point\r\n this.vertex = this.owner.getVertex(this.index).clone()\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragstart\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Called from the framework during a drag&drop operation\r\n *\r\n * @param {Number} dx the x difference between the start of the drag drop operation and now\r\n * @param {Number} dy the y difference between the start of the drag drop operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n **/\r\n onDrag: function (dx, dy, dx2, dy2) {\r\n if (this.isDead === true || this.command == null) {\r\n return\r\n }\r\n\r\n this.setPosition(this.x + dx2, this.y + dy2)\r\n\r\n // update the polyline for immediately drag&drop feedback\r\n //\r\n this.vertex.translate(dx2, dy2)\r\n let newPos = this.vertex.clone()\r\n // Adjust the new location if the object can snap to a helper\r\n // like grid, geometry, ruler,...\r\n //\r\n if (this.getCanSnapToHelper()) {\r\n newPos = this.getCanvas().snapToHelper(this, newPos)\r\n }\r\n\r\n this.owner.setVertex(this.index, newPos.x, newPos.y)\r\n\r\n // update the command for the undo/redo stuff\r\n //\r\n this.command.updatePosition(this.vertex.x, this.vertex.y)\r\n },\r\n\r\n /**\r\n * Called after a drag and drop action.<br>\r\n * Sub classes can override this method to implement additional stuff. Don't forget to call the super implementation via <code>this._super();</code>\r\n *\r\n * @param {Number} x the x-coordinate of the mouse event\r\n * @param {Number} y the y-coordinate of the mouse event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n */\r\n onDragEnd: function (x, y, shiftKey, ctrlKey) {\r\n if (this.isDead === true || this.command === null) {\r\n return\r\n }\r\n\r\n this.shape.attr({\"cursor\": \"move\"})\r\n\r\n let stack = this.getCanvas().getCommandStack()\r\n\r\n let transactionCommand = new draw2d.command.CommandCollection()\r\n\r\n try {\r\n transactionCommand.add(this.command)\r\n this.command = null\r\n if (this.getEnclosingAngle() > 178) {\r\n transactionCommand.add(new draw2d.command.CommandRemoveVertex(this.owner, this.index))\r\n }\r\n }\r\n finally {\r\n stack.execute(transactionCommand)\r\n }\r\n\r\n this.setAlpha(1)\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"dragend\", {x: x, y: y, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Controls the location of the resize handle\r\n *\r\n * @template\r\n **/\r\n relocate: function () {\r\n let resizeWidthHalf = this.getWidth() / 2\r\n let resizeHeightHalf = this.getHeight() / 2\r\n\r\n let anchor = this.owner.getVertex(this.index)\r\n\r\n this.setPosition(anchor.x - resizeWidthHalf, anchor.y - resizeHeightHalf)\r\n },\r\n\r\n /**\r\n *\r\n * Calculates the angle between the siblings\r\n *\r\n * @returns {Number}\r\n */\r\n getEnclosingAngle: function () {\r\n // calculate the angle between the siblings\r\n let points = this.owner.getVertices()\r\n let trans = this.vertex.getScaled(-1)\r\n let size = points.getSize()\r\n let left = points.get((this.index - 1 + size) % size).translated(trans) // % is just to ensure the [0, size] interval\r\n let right = points.get((this.index + 1) % size).translated(trans) // % is just to ensure the [0, size] interval\r\n\r\n let dot = left.dot(right)\r\n\r\n let acos = Math.acos(dot / (left.length() * right.length()))\r\n return acos * 180 / Math.PI\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Base interface for the composite shapes\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Rectangle\r\n * @since 4.7.2\r\n */\r\ndraw2d.shape.composite.Composite = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.composite.Composite.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.Composite\",\r\n\r\n /**\r\n * Creates a new composite element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super({stroke: 1, \"color\": \"#f0f0f0\",...attr}, setter, getter)\r\n },\r\n\r\n /**\r\n *\r\n * Called when a user dbl clicks on the element\r\n *\r\n * @template\r\n */\r\n onDoubleClick: function () {\r\n // do nothing per default. no rotation of the shape.\r\n },\r\n\r\n /**\r\n *\r\n * Delegate method to calculate if a figure is selectable. A composite has the right to override the\r\n * initial selectable flag of the figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure to test\r\n * @param {Boolean} selectable the initial selectable flag of the figure\r\n * @returns {Boolean} returns `selectable`. A figure in a composite is per default selectable if the figure itself allows it.\r\n *\r\n */\r\n isMemberSelectable: function (figure, selectable) {\r\n return selectable\r\n },\r\n\r\n /**\r\n *\r\n * Delegate method to calculate if a figure is draggable. A composite has the right to override the\r\n * initial draggable flag of the figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure to test\r\n * @param {Boolean} draggable the initial draggable flag of the figure\r\n * @returns {Boolean} returns `draggable`. A figure in a composite is per default draggable if the figure itself allows it.\r\n *\r\n */\r\n isMemberDraggable: function (figure, draggable) {\r\n return draggable\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the canvas element of this figures. This can be used to determine whenever an element\r\n * is added or removed to the canvas.\r\n *\r\n * @param {draw2d.Canvas} canvas the new parent of the figure or null\r\n * @returns {this}\r\n */\r\n setCanvas: function (canvas) {\r\n this._super(canvas)\r\n\r\n // an composite shape goes always in the background\r\n //\r\n if (canvas !== null) {\r\n this.toBack()\r\n }\r\n\r\n return this\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A group is a figure that acts as a transparent container for other figures. A group\r\n * is a StrongComposite node that controls a set of child figures. The bounding rectangle of\r\n * a group is the union of the bounds of its children. Child nodes cannot be selected or\r\n * manipulated individually.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.composite.StrongComposite\r\n * @since 4.8.0\r\n */\r\ndraw2d.shape.composite.Group = draw2d.shape.composite.StrongComposite.extend(\r\n /** @lends draw2d.shape.composite.Group.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.Group\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({bgColor: null, color: null, resizeable: false}, attr), setter, getter)\r\n\r\n // used during figure assignment/unassignment. The Group is resizing during figure assignment\r\n // and we want avoid that already assigned figures are moving during this resize.\r\n //\r\n this.stickFigures = false\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Delegate method to calculate if a figure is selectable. A composite has the right to override the\r\n * initial selectable flag of the figure.\r\n *\r\n * @param {draw2d.Figure} figure the figure to test\r\n * @param {Boolean} selectable the initial selectable flag of the figure\r\n * @returns {Boolean} returns false because it is not possible toselect single figures in the group\r\n */\r\n isMemberSelectable: function (figure, selectable) {\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Delegate method to calculate if a figure is draggable. A composite has the right to override the\r\n * initial draggable flag of the figure.\r\n * <br>\r\n * Returns false because only the complete group is draggable\r\n *\r\n * @param {draw2d.Figure} figure the figure to test\r\n * @param {Boolean} draggable the initial draggable flag of the figure\r\n * @returns {Boolean} returns always false because it is not possible to drag&drop single figures in a group\r\n *\r\n */\r\n isMemberDraggable: function (figure, draggable) {\r\n return false\r\n },\r\n\r\n /**\r\n *\r\n * Set the position of the object.\r\n *\r\n * @param {Number/draw2d.geo.Point} x The new x coordinate of the figure\r\n * @param {Number} [y] The new y coordinate of the figure\r\n * @returns {this}\r\n **/\r\n setPosition: function (x, y) {\r\n let oldX = this.x\r\n let oldY = this.y\r\n\r\n\r\n this._super(x, y)\r\n\r\n let dx = this.x - oldX\r\n let dy = this.y - oldY\r\n\r\n if (dx === 0 && dy === 0) {\r\n return this\r\n }\r\n\r\n if (this.stickFigures === false) {\r\n this.assignedFigures.each(function (i, figure) {\r\n figure.translate(dx, dy)\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Assign a figure to the given group.\r\n * The bounding box of the group is recalculated and the union of the current bounding box with the\r\n * figure bounding box.\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @returns {this}\r\n */\r\n assignFigure: function (figure) {\r\n if (!this.assignedFigures.contains(figure)) {\r\n let _this = this\r\n this.stickFigures = true\r\n if (this.assignedFigures.isEmpty() === true) {\r\n this.setBoundingBox(figure.getBoundingBox())\r\n } else {\r\n this.setBoundingBox(this.getBoundingBox().merge(figure.getBoundingBox()))\r\n }\r\n this.assignedFigures.add(figure)\r\n figure.setComposite(this)\r\n // the selection adapter defines which figure should be selected if the user clicks on\r\n // \"figure\". The \"group\" redirects to the group instead to allowing select the child.\r\n figure.setSelectionAdapter(function () {\r\n return _this\r\n })\r\n this.stickFigures = false\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Remove the given figure from the group assignment\r\n *\r\n * @param {draw2d.Figure} figure the figure to remove\r\n * @returns {this}\r\n */\r\n unassignFigure: function (figure) {\r\n if (this.assignedFigures.contains(figure)) {\r\n this.stickFigures = true\r\n figure.setComposite(null)\r\n figure.setSelectionAdapter(null)\r\n this.assignedFigures.remove(figure)\r\n if (!this.assignedFigures.isEmpty()) {\r\n let box = this.assignedFigures.first().getBoundingBox()\r\n this.assignedFigures.each(function (i, figure) {\r\n box.merge(figure.getBoundingBox())\r\n })\r\n this.setBoundingBox(box)\r\n }\r\n this.stickFigures = false\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritDoc\r\n */\r\n createCommand: function (request) {\r\n if (request === null) {\r\n return null\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.DELETE) {\r\n if (!this.isDeleteable()) {\r\n return null\r\n }\r\n return new draw2d.command.CommandDeleteGroup(this)\r\n }\r\n\r\n return this._super(request)\r\n }\r\n\r\n })\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A Jailhouse is a figure that acts as a container for other figures. A Jailhouse\r\n * is a StrongComposite node that controls a set of child figures. Child nodes can't\r\n * moved outside of the composite.<br>\r\n * Objects in a jailhouse have the same Z-order, which can be relatively controlled with\r\n * respect to other figures.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.composite.StrongComposite\r\n * @since 4.8.0\r\n */\r\ndraw2d.shape.composite.Jailhouse = draw2d.shape.composite.StrongComposite.extend(\r\n /** @lends draw2d.shape.composite.Jailhouse.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.Jailhouse\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.policy = new draw2d.policy.figure.RegionEditPolicy(0, 0, 10, 10)\r\n this._super(extend({bgColor: \"#f0f0f0\", color: \"#333333\"}, attr), setter, getter)\r\n\r\n this.stickFigures = false\r\n },\r\n\r\n /**\r\n *\r\n * Set the new width and height of the figure and update the constraint policy for the assigned\r\n * figures..\r\n *\r\n * @param {Number} w The new width of the figure\r\n * @param {Number} h The new height of the figure\r\n **/\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n this.policy.setBoundingBox(this.getAbsoluteBounds())\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the position of the object.\r\n *\r\n * @param {Number/draw2d.geo.Point} x The new x coordinate of the figure\r\n * @param {Number} [y] The new y coordinate of the figure\r\n **/\r\n setPosition: function (x, y) {\r\n let oldX = this.x\r\n let oldY = this.y\r\n\r\n\r\n this._super(x, y)\r\n\r\n let dx = this.x - oldX\r\n let dy = this.y - oldY\r\n\r\n if (dx === 0 && dy === 0) {\r\n return this\r\n }\r\n this.policy.getBoundingBox().setPosition(x,y)\r\n\r\n if (this.stickFigures === false) {\r\n this.assignedFigures.each(function (i, figure) {\r\n figure.translate(dx, dy)\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Assign a figure to the given group.\r\n * The bounding box of the group is recalculated and the union of the current bounding box with the\r\n * figure bounding box.\r\n *\r\n * @param {draw2d.Figure} figure\r\n */\r\n assignFigure: function (figure) {\r\n if (!this.assignedFigures.contains(figure) && figure !== this) {\r\n this.stickFigures = true\r\n this.setBoundingBox(this.getBoundingBox().merge(figure.getBoundingBox()))\r\n this.assignedFigures.add(figure)\r\n figure.setComposite(this)\r\n figure.installEditPolicy(this.policy)\r\n figure.toFront(this)\r\n this.stickFigures = false\r\n }\r\n return this\r\n },\r\n\r\n getAssignedFigures: function () {\r\n return this.assignedFigures\r\n },\r\n\r\n /**\r\n *\r\n * Remove the given figure from the group assignment\r\n *\r\n * @param {draw2d.Figure} figure the figure to remove\r\n *\r\n */\r\n unassignFigure: function (figure) {\r\n if (this.assignedFigures.contains(figure)) {\r\n this.stickFigures = true\r\n figure.setComposite(null)\r\n figure.uninstallEditPolicy(this.policy)\r\n this.assignedFigures.remove(figure)\r\n if (!this.assignedFigures.isEmpty()) {\r\n let box = this.assignedFigures.first().getBoundingBox()\r\n this.assignedFigures.each(function (i, figure) {\r\n box.merge(figure.getBoundingBox())\r\n })\r\n this.setBoundingBox(box)\r\n }\r\n this.stickFigures = false\r\n }\r\n\r\n return this\r\n },\r\n\r\n onCatch: function (droppedFigure, x, y, shiftKey, ctrlKey) {\r\n this.getCanvas().getCommandStack().execute(new draw2d.command.CommandAssignFigure(droppedFigure, this))\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the minWidth of the jailhouse. The minWidth is calculated by care the assigned figures.\r\n *\r\n * @returns {Number} the minimum width for the figure\r\n */\r\n getMinWidth: function () {\r\n let width = 0\r\n this.assignedFigures.each(function (i, figure) {\r\n width = Math.max(width, figure.getBoundingBox().getRight())\r\n })\r\n return width - this.getAbsoluteX()\r\n },\r\n\r\n /**\r\n *\r\n * @returns {Number} the minimum height of the figure\r\n */\r\n getMinHeight: function () {\r\n let height = 0\r\n this.assignedFigures.each(function (i, figure) {\r\n height = Math.max(height, figure.getBoundingBox().getBottom())\r\n })\r\n return height - this.getAbsoluteY()\r\n }\r\n })\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * Raft figures are shapes, which aggregate multiple figures. It works like a real raft. Aboard figures are\r\n * moved if the raft figures moves.\r\n *\r\n *\r\n * @example\r\n *\r\n * let rect1 = new draw2d.shape.composite.Raft({width:200, height:100});\r\n * let rect2 = new draw2d.shape.basic.Rectangle({width:50, height:50});\r\n *\r\n * canvas.add(rect1,10,10);\r\n * canvas.add(rect2,20,20);\r\n *\r\n * rect2.attr({bgColor:\"#f0f000\", width:50, height:50, radius:10});\r\n *\r\n * canvas.setCurrentSelection(rect1);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.composite.WeakComposite\r\n * @since 4.7.0\r\n */\r\ndraw2d.shape.composite.Raft = draw2d.shape.composite.WeakComposite.extend(\r\n /** @lends draw2d.shape.composite.Raft.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.Raft\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n\r\n this.aboardFigures = new draw2d.util.ArrayList()\r\n\r\n this._super({bgColor: \"#f0f0f0\", color: \"#1B1B1B\",...attr}, setter, getter)\r\n // install default selection handler. Can be overridden or replaced\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.RaftSelectionFeedbackPolicy())\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Will be called if the drag and drop action begins. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true if the figure accepts dragging\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n this._super(x, y, shiftKey, ctrlKey)\r\n\r\n this.aboardFigures = new draw2d.util.ArrayList()\r\n // force the recalculation of the aboard figures if the shape is in a drag&drop operation\r\n this.getAboardFigures(this.isInDragDrop)\r\n\r\n return true\r\n },\r\n\r\n /**\r\n *\r\n * Set the position of the object.\r\n *\r\n * @param {Number/draw2d.geo.Point} x The new x coordinate of the figure\r\n * @param {Number} [y] The new y coordinate of the figure\r\n * @param {boolean} [dontApplyToChildren] don't move the children if this flag is set.\r\n **/\r\n setPosition: function (x, y, dontApplyToChildren) {\r\n let oldX = this.x\r\n let oldY = this.y\r\n\r\n // we need the figures before the composite has moved. Otherwise some figures are fall out of the raft\r\n //\r\n let aboardedFigures = (dontApplyToChildren) ? draw2d.util.ArrayList.EMPTY_LIST : this.getAboardFigures(this.isInDragDrop === false)\r\n\r\n this._super(x, y)\r\n\r\n let dx = this.x - oldX\r\n let dy = this.y - oldY\r\n\r\n if (dx === 0 && dy === 0) {\r\n return this\r\n }\r\n\r\n // we must move circuits with \"user routed\" elements as well if the start/target is withing\r\n // the raft. Some segments stay still because some coordinates has a fixed position\r\n //\r\n if (this.canvas !== null) {\r\n aboardedFigures = aboardedFigures.clone()\r\n this.canvas.getLines().each( (i, line) => {\r\n if (line instanceof draw2d.Connection) {\r\n if (aboardedFigures.contains(line.getSource().getRoot()) && aboardedFigures.contains(line.getTarget().getRoot())) {\r\n aboardedFigures.add(line)\r\n }\r\n }\r\n })\r\n }\r\n\r\n aboardedFigures.each( (i, figure) => { figure.translate(dx, dy) })\r\n\r\n return this\r\n },\r\n\r\n\r\n onDrag: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n\r\n // apply all EditPolicy for DragDrop Operations\r\n //\r\n this.editPolicy.each( (i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n let newPos = e.adjustPosition(this, this.ox + dx, this.oy + dy)\r\n if (newPos) {\r\n dx = newPos.x - this.ox\r\n dy = newPos.y - this.oy\r\n }\r\n }\r\n })\r\n\r\n let newPos = new draw2d.geo.Point(this.ox + dx, this.oy + dy)\r\n\r\n // Adjust the new location if the object can snap to a helper\r\n // like grid, geometry, ruler,...\r\n //\r\n if (this.getCanSnapToHelper()) {\r\n newPos = this.getCanvas().snapToHelper(this, newPos)\r\n }\r\n\r\n // push the shiftKey to the setPosition method and avoid to move the children objects\r\n // if the user press the shift key\r\n this.setPosition(newPos.x, newPos.y, shiftKey)\r\n\r\n // notify all installed policies\r\n //\r\n this.editPolicy.each((i, e) => {\r\n if (e instanceof draw2d.policy.figure.DragDropEditPolicy) {\r\n e.onDrag(this.canvas, this)\r\n }\r\n })\r\n\r\n // fire an event\r\n // @since 5.3.3\r\n this.fireEvent(\"drag\", {dx: dx, dy: dy, dx2: dx2, dy2: dy2, shiftKey: shiftKey, ctrlKey: ctrlKey})\r\n },\r\n\r\n /**\r\n *\r\n * Return all figures which are aboard of this shape. These shapes are moved as well if the raft\r\n * is moving.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getAboardFigures: function (recalculate) {\r\n if (recalculate === true && this.canvas !== null) {\r\n let raftBoundingBox = this.getBoundingBox()\r\n let zIndex = this.getZOrder()\r\n this.aboardFigures = new draw2d.util.ArrayList()\r\n\r\n let _this = this\r\n this.getCanvas().getFigures().each(function (i, figure) {\r\n if (figure !== _this && figure.isSelectable() === true && figure.getBoundingBox().isInside(raftBoundingBox)) {\r\n // Don't add the figure if it is already catched by another composite with a higher z-index\r\n //\r\n if (_this.getNextComposite(figure) !== _this) {\r\n return\r\n }\r\n // only add the shape if it is in front of the raft\r\n if (figure.getZOrder() > zIndex) {\r\n _this.aboardFigures.add(figure)\r\n }\r\n }\r\n })\r\n }\r\n return this.aboardFigures\r\n },\r\n\r\n /**\r\n *\r\n * return the next potential composite parent figure\r\n *\r\n * @param {draw2d.Figure} figureToTest\r\n * @returns {draw2d.Figure}\r\n */\r\n getNextComposite: function (figureToTest) {\r\n let nextComposite = null\r\n this.getCanvas().getFigures().each( (i, figure) => {\r\n if (figureToTest === figure) {\r\n return\r\n }\r\n if (figure instanceof draw2d.shape.composite.Composite) {\r\n if (nextComposite !== null && nextComposite.getZOrder() > figure.getZOrder()) {\r\n return\r\n }\r\n\r\n if (figure.getBoundingBox().contains(figureToTest.getBoundingBox())) {\r\n nextComposite = figure\r\n }\r\n }\r\n })\r\n\r\n return nextComposite\r\n }\r\n})\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from 'packages'\r\n\r\n/**\r\n * @class\r\n * The Resizehandles for Figures.\r\n\r\n * <pre>\r\n * Possible Type:\r\n *\r\n * 1 2 3\r\n * O-----------O-------------O\r\n * | |\r\n * | |\r\n * 8 O + 9 O 4\r\n * | |\r\n * | |\r\n * O-----------O-------------O\r\n * 7 6 5\r\n * </pre>\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.ResizeHandle\r\n */\r\ndraw2d.shape.composite.RaftResizeHandle = draw2d.ResizeHandle.extend(\r\n /** @lends draw2d.shape.composite.RaftResizeHandle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.RaftResizeHandle\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {draw2d.Figure} the owner if the resize handle\r\n * @param {Number} type the type of the ResizeHandle.\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr,setter,getter)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Called by the framework if the figure is moved by user interaction.\r\n *\r\n * @param {Number} dx the move x offset\r\n * @param {Number} dy the move y offset\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n */\r\n onDrag: function (dx, dy, dx2, dy2, shiftKey, ctrlKey) {\r\n if (this.isDraggable() === false) {\r\n return\r\n }\r\n\r\n let oldX = this.getAbsoluteX()\r\n let oldY = this.getAbsoluteY()\r\n\r\n // call the super.drag method with all snapTo### handler and adjustments\r\n draw2d.shape.basic.Rectangle.prototype.onDrag.call(this,dx, dy, dx2, dy2); //DON'T call the super implementation!!!\r\n\r\n let diffX = this.getAbsoluteX() - oldX\r\n let diffY = this.getAbsoluteY() - oldY\r\n\r\n let obj = this.owner\r\n let objPosX = obj.getAbsoluteX()\r\n let objPosY = obj.getAbsoluteY()\r\n let objWidth = obj.getWidth()\r\n let objHeight = obj.getHeight()\r\n\r\n let newX = null\r\n let newY = null\r\n let corrPos = null\r\n // declare new var just to make the semantic behind the flag more clear\r\n let dontMoveChildren = shiftKey===true\r\n\r\n /*\r\n * 1 2 3\r\n * O-----------O-------------O\r\n * | |\r\n * | |\r\n * 8 O + 9 O 4\r\n * | |\r\n * | |\r\n * O-----------O-------------O\r\n * 7 6 5\r\n */\r\n switch (this.type) {\r\n case 1:\r\n obj.setDimension(objWidth - diffX, objHeight - diffY)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY,dontMoveChildren)\r\n break\r\n case 2:\r\n obj.setDimension(objWidth, objHeight - diffY)\r\n newX = objPosX\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY,dontMoveChildren)\r\n break\r\n case 3:\r\n obj.setDimension(objWidth + diffX, objHeight - diffY)\r\n newX = objPosX\r\n newY = objPosY + (objHeight - obj.getHeight())\r\n obj.setPosition(newX, newY,dontMoveChildren)\r\n break\r\n case 4:\r\n obj.setDimension(objWidth + diffX, objHeight)\r\n break\r\n case 5:\r\n obj.setDimension(objWidth + diffX, objHeight + diffY)\r\n break\r\n case 6:\r\n obj.setDimension(objWidth, objHeight + diffY)\r\n break\r\n case 7:\r\n obj.setDimension(objWidth - diffX, objHeight + diffY)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY\r\n obj.setPosition(newX, newY,dontMoveChildren)\r\n break\r\n case 8:\r\n obj.setDimension(objWidth - diffX, objHeight)\r\n newX = objPosX + (objWidth - obj.getWidth())\r\n newY = objPosY\r\n debugger\r\n obj.setPosition(newX, newY,dontMoveChildren)\r\n break\r\n }\r\n\r\n if (newX !== null) {\r\n // may the setPosition has changed regarding any constraint or edit policies. In this case\r\n // we must adjust the dimension with the related correction\r\n //\r\n corrPos = obj.getPosition()\r\n if (corrPos.x !== newX || corrPos.y !== newY) {\r\n obj.setDimension(obj.getWidth() - (corrPos.x - newX), obj.getHeight() - (corrPos.y - newY))\r\n }\r\n }\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A StrongComposite is a composite figure with strong assignment of the children and the composite.\r\n * The child knows everything about the assigned composite and receives events about assignment to a\r\n * composite.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.composite.Composite\r\n * @since 4.8.0\r\n */\r\ndraw2d.shape.composite.StrongComposite = draw2d.shape.composite.Composite.extend(\r\n /** @lends draw2d.shape.composite.StrongComposite.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.StrongComposite\",\r\n\r\n /**\r\n * Creates a new strong composite element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.assignedFigures = new draw2d.util.ArrayList()\r\n\r\n this._super(attr, setter, getter)\r\n },\r\n\r\n /**\r\n * \r\n * Check to see if a figure is a descendant of another figure.\r\n * <br>\r\n * The contains() method returns true if the figure provided by the argument is a descendant of this figure,\r\n * whether it is a direct child or nested more deeply. Otherwise, it returns false.\r\n *\r\n * @param {draw2d.Figure} containedFigure The figure that may be contained by (a descendant of) this figure.\r\n * @since 5.5.4\r\n */\r\n contains: function (containedFigure) {\r\n for (let i = 0, len = this.assignedFigures.getSize(); i < len; i++) {\r\n let child = this.assignedFigures.get(i)\r\n if (child === containedFigure || child.contains(containedFigure)) {\r\n return true\r\n }\r\n }\r\n return this._super(containedFigure)\r\n },\r\n\r\n /**\r\n * \r\n * Assign a figure to the composite.\r\n *\r\n * @param {draw2d.Figure} figure\r\n * @template\r\n */\r\n assignFigure: function (figure) {\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Remove the given figure from the group assignment\r\n *\r\n * @param {draw2d.Figure} figure the figure to remove\r\n * @template\r\n */\r\n unassignFigure: function (figure) {\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return all assigned figures of the composite\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getAssignedFigures: function () {\r\n return this.assignedFigures\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Called if the user drop this element onto the dropTarget. This event is ONLY fired if the\r\n * shape return \"this\" in the onDragEnter method.\r\n *\r\n *\r\n * @param {draw2d.Figure} dropTarget The drop target.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n * @since 4.7.4\r\n **/\r\n onDrop: function (dropTarget, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n * \r\n * Called if the user dropped an figure onto this element. This event is ONLY fired if the\r\n * shape return \"this\" in the onDragEnter method.\r\n *\r\n *\r\n * @param {draw2d.Figure} droppedFigure The dropped figure.\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n * @template\r\n * @since 4.7.4\r\n **/\r\n onCatch: function (droppedFigure, x, y, shiftKey, ctrlKey) {\r\n },\r\n\r\n /**\r\n * \r\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements. Additional\r\n * the internal model changed as well.\r\n *\r\n * Optional: Inserts current object in front of the given one.\r\n *\r\n * @param {draw2d.Figure} [figure] move current object in front of the given one.\r\n */\r\n toFront: function (figure) {\r\n this._super(figure)\r\n // ensure that all assigned figures are in front of the composite\r\n //\r\n let figures = this.getAssignedFigures().clone()\r\n figures.sort(function (a, b) {\r\n // return 1 if a before b\r\n // return -1 if b before a\r\n return a.getZOrder() > b.getZOrder() ? -1 : 1\r\n })\r\n let _this = this\r\n figures.each(function (i, f) {\r\n f.toFront(_this)\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Moves the element to the background. Additional\r\n * the internal model changed as well.\r\n *\r\n * @since 4.7.2\r\n */\r\n toBack: function (figure) {\r\n this._super(figure)\r\n // ensure that all assigned figures are in front of the composite\r\n //\r\n let figures = this.getAssignedFigures().clone()\r\n figures.sort(function (a, b) {\r\n // return 1 if a before b\r\n // return -1 if b before a\r\n return a.getZOrder() > b.getZOrder() ? -1 : 1\r\n })\r\n\r\n let _this = this\r\n figures.each(function (i, f) {\r\n f.toBack(_this)\r\n })\r\n\r\n return this\r\n }\r\n})\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A WeakComposite is a composite figure with loose coupling of the children and the composite.\r\n * The child didn't know anything about the assigned composite nor did they receive any events\r\n * about assignment to a composite.\r\n *\r\n * Assignment without obligation.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.composite.Composite\r\n * @since 4.8.0\r\n */\r\ndraw2d.shape.composite.WeakComposite = draw2d.shape.composite.Composite.extend(\r\n /** @lends draw2d.shape.composite.WeakComposite.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.composite.WeakComposite\",\r\n\r\n /**\r\n * Creates a new weak composite element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n }\r\n})\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Base class for all diagrams.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n * @extends draw2d.SetFigure\r\n */\r\ndraw2d.shape.diagram.Diagram = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.diagram.Diagram */\r\n {\r\n\r\n init: function (attr, setter, getter) {\r\n this.data = []\r\n this.cache = {}\r\n\r\n this._super(\r\n {\r\n data: [], \r\n bgColor: \"#8dabf2\", \r\n stroke: 1, \r\n color: \"#f0f0f0\", \r\n radius: 2, \r\n resizeable: true,\r\n ...attr},\r\n {\r\n // @attr {Array} data the data to display in the diagram */\r\n data: this.setData,\r\n ...setter\r\n },\r\n {\r\n data: this.getData,\r\n ...getter\r\n }\r\n )\r\n },\r\n\r\n /**\r\n * \r\n * Set the data for the chart/diagram element\r\n *\r\n * @param {Array} data\r\n *\r\n */\r\n setData: function (data) {\r\n this.data = data\r\n this.cache = {}\r\n\r\n\r\n if (this.svgNodes !== null) {\r\n this.svgNodes.remove()\r\n this.svgNodes = this.createSet()\r\n }\r\n\r\n this.repaint()\r\n this.fireEvent(\"change:data\", {value: data})\r\n\r\n },\r\n\r\n /**\r\n * \r\n * Return the data of the diagram\r\n *\r\n * @since 5.0.0\r\n */\r\n getData: function () {\r\n return this.data\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the dimension of the diagram and reset the cached calculation\r\n *\r\n * @since 5.0.0\r\n */\r\n setDimension: function (w, h) {\r\n this.cache = {}\r\n this._super(w, h)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the calculate width of the set. This calculates the bounding box of all elements.\r\n *\r\n * @returns {Number} the calculated width of the label\r\n **/\r\n getWidth: function () {\r\n return this.width\r\n },\r\n\r\n /**\r\n * \r\n * Return the calculated height of the set. This calculates the bounding box of all elements.\r\n *\r\n * @returns {Number} the calculated height of the label\r\n */\r\n getHeight: function () {\r\n return this.height\r\n },\r\n\r\n /**\r\n *\r\n * @param attributes\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape == null) {\r\n return this\r\n }\r\n\r\n attributes ??= {}\r\n\r\n attributes.fill ??= \"none\"\r\n\r\n return this._super(attributes)\r\n },\r\n\r\n applyTransformation: function () {\r\n if (this.isResizeable() === true) {\r\n this.svgNodes.transform(\"S\" + this.scaleX + \",\" + this.scaleY + \",\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY() + \"t\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n }\r\n else {\r\n this.svgNodes.transform(\"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n }\r\n\r\n return this\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Small data pie chart.\r\n *\r\n *\r\n * @example\r\n *\r\n * let pie = new draw2d.shape.diagram.Pie({\r\n * diameter:80,\r\n * data:[30,60,122,4],\r\n * x:100,\r\n * y:60\r\n * });\r\n *\r\n * canvas.add( pie);\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n * @extends draw2d.shape.diagram.Diagram\r\n */\r\ndraw2d.shape.diagram.Pie = draw2d.shape.diagram.Diagram.extend(\r\n /** @lends draw2d.shape.diagram.Pie */\r\n {\r\n\r\n NAME: \"draw2d.shape.diagram.Pie\",\r\n COLORS: ['#00A8F0', '#b9dd69', '#f3546a', '#4DA74D', '#9440ED'],\r\n TWO_PI: Math.PI * 2,\r\n\r\n init: function (attr, setter, getter) {\r\n\r\n\r\n this._super(\r\n {\r\n stroke: 0,\r\n ...attr\r\n },\r\n {\r\n // @attr {Number} diameter the diameter of the pie chart */\r\n diameter: this.setDiameter,\r\n // @attr {Number} radius the radius of the pie chart */\r\n radius: this.setRadius,\r\n ...setter\r\n },\r\n {\r\n diameter: this.getDiameter,\r\n radius: this.getRadius,\r\n ...getter\r\n })\r\n },\r\n\r\n /**\r\n *\r\n * Set the diameter of the circle. The center of the circle will be retained.\r\n *\r\n * @param {Number} d The new diameter of the circle.\r\n * @since 4.0.0\r\n **/\r\n setDiameter: function (d) {\r\n let center = this.getCenter()\r\n this.setDimension(d, d)\r\n this.setCenter(center)\r\n this.fireEvent(\"change:diameter\", {value: this.width})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Get the diameter of the circle.\r\n *\r\n * @since 4.0.0\r\n **/\r\n getDiameter: function () {\r\n return this.getWidth()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Set the radius of the circle. The center of the circle will be retained.\r\n *\r\n * @param {Number} r The new radius of the circle.\r\n * @since 4.0.0\r\n **/\r\n setRadius: function (r) {\r\n this.setDiameter(r * 2)\r\n this.fireEvent(\"change:radius\", {value: this.width / 2})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Get the center of the circle\r\n *\r\n */\r\n getCenter: function () {\r\n let d2 = this.getDiameter() / 2\r\n return this.getPosition().translate(d2, d2)\r\n },\r\n\r\n /**\r\n *\r\n * Set the center of the circle.\r\n *\r\n * @param {Number|draw2d.geo.Point} x the new x coordinate of the center or a draw2d.geo.Point object with the center\r\n * @param {Number} y the y coordinate of the new center of the first argument isn't a draw2d.geo.Point object\r\n */\r\n setCenter: function (x, y) {\r\n let pos = new draw2d.geo.Point(x, y)\r\n let d2 = this.getDiameter() / 2\r\n pos.translate(-d2, -d2)\r\n this.setPosition(pos)\r\n this.fireEvent(\"change:center\", {value: {x: x, y: y}})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setData: function (data) {\r\n\r\n // Normalize the Data.\r\n // The SUM must be == 1.\r\n this.sum = 0\r\n data.forEach(val => {\r\n this.sum += val\r\n })\r\n let _sum = 1 / this.sum\r\n data.forEach((val, i) => {\r\n data[i] = _sum * val\r\n })\r\n\r\n // pass the normalize data to the base implementation\r\n //\r\n this._super(data)\r\n this.fireEvent(\"change:data\", {value: data})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createSet: function () {\r\n let radius = this.getWidth() / 2\r\n let length = this.data.length\r\n\r\n let pie = this.canvas.paper.set()\r\n\r\n let offsetAngle = 0\r\n\r\n for (let i = 0; i < length; i++) {\r\n // angle is percent of TWO_PI\r\n let angle = this.TWO_PI * this.data[i]\r\n let color = this.COLORS[i % length]\r\n let seg = this.drawSegment(radius, angle, offsetAngle, 0.1)\r\n seg.attr({stroke: this.color.rgba(), fill: color})\r\n pie.push(seg)\r\n offsetAngle += angle\r\n }\r\n return pie\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n // keep the aspect ration\r\n //\r\n if (w > h) {\r\n this._super(w, w)\r\n }\r\n else {\r\n this._super(h, h)\r\n }\r\n\r\n // we must recreate the diagram if we change the size.\r\n // low performance. Better: transfor/scale the set. Can be done in the next release\r\n //\r\n if (this.svgNodes !== null) {\r\n this.svgNodes.remove()\r\n this.svgNodes = this.createSet()\r\n }\r\n\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n polarPath: function (radius, theta, rotation) {\r\n let x, y\r\n x = radius * Math.cos(theta + rotation) + radius\r\n y = radius * Math.sin(theta + rotation) + radius\r\n return \"L \" + x + \" \" + y + \" \"\r\n },\r\n\r\n drawSegment: function (radius, value, rotation, resolution) {\r\n let path = \"M \" + radius + \" \" + radius\r\n\r\n for (let i = 0; i < value; i += resolution) {\r\n path += this.polarPath(radius, i, rotation)\r\n }\r\n path += this.polarPath(radius, value, rotation)\r\n\r\n path += \"L \" + radius + \" \" + radius\r\n return this.getCanvas().paper.path(path)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n applyTransformation: function () {\r\n this.svgNodes.transform(\"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n\r\n return this\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * Small data line diagram.\r\n *\r\n *\r\n * @example\r\n *\r\n * let testData = [];\r\n * for(let i=0;i<100;i++) {\r\n * testData.push(Math.floor(Math.random() * 100));\r\n * }\r\n *\r\n * let sparkline = new draw2d.shape.diagram.Sparkline({\r\n * \tdata: testData,\r\n * width:150,\r\n * height:50,\r\n * x:100,\r\n * y:60\r\n * });\r\n *\r\n * canvas.add( sparkline);\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n * @extends draw2d.shape.diagram.Diagram\r\n */\r\ndraw2d.shape.diagram.Sparkline = draw2d.shape.diagram.Diagram.extend(\r\n /** @lends draw2d.shape.diagram.Sparkline */\r\n {\r\n\r\n NAME : \"draw2d.shape.diagram.Sparkline\",\r\n\r\n init: function (attr, setter, getter) {\r\n this.min = 0\r\n this.max = 10\r\n this.padding = 4\r\n\r\n this._super({width: 180, height: 50,...attr}, setter, getter)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setData: function (data) {\r\n if (data.length > 0) {\r\n // get the min/max from an array and not only from two elements..\r\n this.min = Math.min(...data)\r\n this.max = Math.max(...data)\r\n }\r\n else {\r\n this.min = 0\r\n this.max = 1\r\n }\r\n\r\n if (this.max === this.min) {\r\n this.max = this.min + 1\r\n }\r\n\r\n this._super(data)\r\n this.fireEvent(\"change:data\", {value: data})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M0 0 l0 0\")\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n attributes.fill = \"90-#000:5-#4d4d4d:95\"\r\n\r\n let padding = this.padding\r\n let width = this.getWidth() - 2 * padding\r\n let height = this.getHeight() - 2 * padding\r\n let length = this.data.length\r\n let min = this.min\r\n let max = this.max\r\n let toCoords = function (value, idx) {\r\n let step = 1\r\n // avoid divisionByZero\r\n if (length > 1) {\r\n step = (width / (length - 1))\r\n }\r\n\r\n return {\r\n y: -((value - min) / (max - min) * height) + height + padding,\r\n x: padding + idx * step\r\n }\r\n }\r\n\r\n if (this.svgNodes !== null && (typeof this.cache.pathString === \"undefined\")) {\r\n let prev_pt = null\r\n this.data.forEach((item, idx) => {\r\n let pt = toCoords(item, idx)\r\n if (prev_pt === null) {\r\n this.cache.pathString = [\"M\", pt.x, pt.y].join(\" \")\r\n }\r\n else {\r\n this.cache.pathString = [this.cache.pathString, \"L\", pt.x, pt.y].join(\" \")\r\n }\r\n prev_pt = pt\r\n })\r\n\r\n this.svgNodes.attr({path: this.cache.pathString, stroke: \"#f0f0f0\"})\r\n\r\n }\r\n this._super(attributes)\r\n\r\n return this\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A Rectangle Figure in a dimetric perspective.\r\n *\r\n *\r\n * @example\r\n *\r\n * let d1 = new draw2d.shape.dimetric.Rectangle({x:10,y:10});\r\n * let d2 = new draw2d.shape.dimetric.Rectangle({x:100,y:10, bgColor:\"#f0f000\", alpha:0.7, width:100, height:60});\r\n *\r\n * canvas.add(d1);\r\n * canvas.add(d2);\r\n *\r\n * canvas.setCurrentSelection(d2);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Polygon\r\n */\r\ndraw2d.shape.dimetric.Rectangle = draw2d.shape.basic.Polygon.extend(\r\n /** @lends draw2d.shape.dimetric.Rectangle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.dimetric.Rectangle\",\r\n\r\n /**\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({bgColor: \"#00a3f6\", color: \"#1B1B1B\"}, attr), setter, getter)\r\n\r\n let pos = this.getPosition()\r\n\r\n this.resetVertices()\r\n\r\n let angle26 = Math.atan(.5)\r\n let cos30 = Math.cos(angle26)\r\n let sin30 = Math.sin(angle26)\r\n\r\n let box = this.getBoundingBox()\r\n let w = box.w\r\n let h = box.h\r\n\r\n this.addVertex(0, 0) // topLeft\r\n this.addVertex(cos30 * w, sin30 * w) // topRight\r\n this.addVertex(cos30 * w - cos30 * h, sin30 * w + sin30 * h) // bottomRight\r\n this.addVertex(-cos30 * h, sin30 * h) // bottomLeft\r\n\r\n // override the selection handler from the polygon. Because the vertices of\r\n // the diamond are not selectable and modifiable\r\n //\r\n this.installEditPolicy(new draw2d.policy.figure.RectangleSelectionFeedbackPolicy())\r\n\r\n this.setPosition(pos)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Typical flowchart <b>Document</b> shape\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.flowchart.Document({\r\n * x:100,\r\n * y:60\r\n * });\r\n *\r\n * canvas.add( figure);\r\n *\r\n * @extends draw2d.VectorFigure\r\n */\r\ndraw2d.shape.flowchart.Document = draw2d.VectorFigure.extend(\r\n /** @lends draw2d.shape.flowchart.Document.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.flowchart.Document\",\r\n\r\n /**\r\n *\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.amplitude = 0.08 // percentage of height\r\n\r\n this._super(extend({\r\n width: 80,\r\n height: 50,\r\n bgColor: \"#2196f3\",\r\n color: \"#1B1B1B\",\r\n stroke: 1\r\n }, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n createShapeElement: function () {\r\n return this.canvas.paper.path(this.calcPath())\r\n },\r\n\r\n calcPath: function () {\r\n let w = this.getWidth()\r\n let h = this.getHeight()\r\n let w2 = w / 2\r\n let w4 = w / 4\r\n let h2 = (h * this.amplitude) | 0\r\n\r\n\r\n return [\r\n \"M\", this.getAbsoluteX(), \",\", this.getAbsoluteY(),\r\n \"l\", w, \",\", 0,\r\n \"l\", 0, \",\", h - h2,\r\n \"q\", -w4, \",\", -h2, -w2, \",\", 0,\r\n \"q\", -w4, \",\", h2, -w2, \",\", 0,\r\n \"z\"].join(\" \")\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes = extend({}, {\r\n path: this.calcPath()\r\n }, attributes)\r\n\r\n this._super(attributes)\r\n\r\n return this\r\n }\r\n /*\r\n function draw_curve(Ax, Ay, Bx, By, M) {\r\n\r\n // Find midpoint J\r\n let Jx = Ax + (Bx - Ax) / 2\r\n let Jy = Ay + (By - Ay) / 2\r\n\r\n // We need a and b to find theta, and we need to know the sign of each to make sure that the orientation is correct.\r\n let a = Bx - Ax\r\n let asign = (a < 0 ? -1 : 1)\r\n let b = By - Ay\r\n let bsign = (b < 0 ? -1 : 1)\r\n let theta = Math.atan(b / a)\r\n\r\n // Find the point that's perpendicular to J on side\r\n let costheta = asign * Math.cos(theta)\r\n let sintheta = asign * Math.sin(theta)\r\n\r\n // Find c and d\r\n let c = M * sintheta\r\n let d = M * costheta\r\n\r\n // Use c and d to find Kx and Ky\r\n let Kx = Jx - c\r\n let Ky = Jy + d\r\n\r\n return \"M\" + Ax + \",\" + Ay +\r\n \"Q\" + Kx + \",\" + Ky +\r\n \" \" + Bx + \",\" + By\r\n }*/\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Acw();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Acw = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Acw.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Acw\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M19.275,3.849l1.695,8.56l1.875-1.642c2.311,3.59,1.72,8.415-1.584,11.317c-2.24,1.96-5.186,2.57-7.875,1.908l-0.84,3.396c3.75,0.931,7.891,0.066,11.02-2.672c4.768-4.173,5.521-11.219,1.94-16.279l2.028-1.775L19.275,3.849zM8.154,20.232c-2.312-3.589-1.721-8.416,1.582-11.317c2.239-1.959,5.186-2.572,7.875-1.909l0.842-3.398c-3.752-0.93-7.893-0.067-11.022,2.672c-4.765,4.174-5.519,11.223-1.939,16.283l-2.026,1.772l8.26,2.812l-1.693-8.559L8.154,20.232z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Alarm();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Alarm = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Alarm.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Alarm\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M8.179,20.115c-0.478,0.277-0.642,0.889-0.365,1.366c0.275,0.479,0.889,0.642,1.365,0.366c0.479-0.275,0.643-0.888,0.367-1.367C9.27,20.004,8.658,19.84,8.179,20.115zM9.18,12.239c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,13.126,9.657,12.516,9.18,12.239zM8.625,17.043c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,18.043,8.624,17.596,8.625,17.043zM16.312,3.957V3.031h1c0.275,0,0.5-0.225,0.5-0.5v-0.5c0-0.275-0.225-0.5-0.5-0.5h-3.625c-0.275,0-0.5,0.225-0.5,0.5v0.5c0,0.275,0.225,0.5,0.5,0.5h1v0.926C7.819,4.381,2.376,10.068,2.374,17.042C2.376,24.291,8.251,30.166,15.5,30.169c7.249-0.003,13.124-5.878,13.125-13.127C28.624,10.067,23.181,4.38,16.312,3.957zM15.5,27.166C9.909,27.157,5.385,22.633,5.375,17.042C5.385,11.451,9.909,6.927,15.5,6.917c5.59,0.01,10.115,4.535,10.124,10.125C25.615,22.633,21.091,27.157,15.5,27.166zM12.062,22.998c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,23.887,12.54,23.275,12.062,22.998zM12.062,11.088c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,11.2,11.584,11.364,12.062,11.088zM22.822,13.971c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,14.083,22.344,14.247,22.822,13.971zM15.501,23.92c-0.552,0-1,0.447-1,1c0,0.552,0.448,1,1,1s1-0.448,1-1C16.501,24.367,16.053,23.92,15.501,23.92zM19.938,9.355c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,10.245,20.418,9.632,19.938,9.355zM23.378,16.042c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,16.492,23.929,16.042,23.378,16.042zM22.823,20.115c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.091,0.367,1.367c0.477,0.275,1.089,0.112,1.365-0.366C23.464,21.004,23.3,20.391,22.823,20.115zM15.501,8.167c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.366c0.275,0.479,0.889,0.642,1.365,0.366l3.305-1.676c0.055,0.006,0.109,0.017,0.166,0.017c0.828,0,1.5-0.672,1.5-1.5l-0.5-7.876C16.501,8.614,16.053,8.167,15.501,8.167zM18.939,22.998c-0.479,0.276-0.643,0.888-0.366,1.367c0.275,0.477,0.888,0.642,1.366,0.365c0.478-0.276,0.642-0.889,0.366-1.365C20.028,22.886,19.417,22.723,18.939,22.998zM11.197,3.593c-0.836-1.04-2.103-1.718-3.541-1.718c-2.52,0-4.562,2.042-4.562,4.562c0,0.957,0.297,1.843,0.8,2.576C5.649,6.484,8.206,4.553,11.197,3.593zM27.106,9.014c0.503-0.733,0.8-1.619,0.8-2.576c0-2.52-2.043-4.562-4.562-4.562c-1.438,0-2.704,0.678-3.541,1.717C22.794,4.553,25.351,6.484,27.106,9.014z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Anonymous();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Anonymous = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Anonymous.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Anonymous\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h26.954C28.977,26.709,29.039,24.332,28.523,23.813zM16.618,13.693c-0.398-0.251-0.783-1.211-0.783-1.64c0-0.133,0-0.236,0-0.236c-0.105-0.106-0.574-0.096-0.67,0c0,0,0,0.104,0,0.236c0,0.429-0.385,1.389-0.783,1.64c-0.399,0.251-1.611,0.237-2.084-0.236c-0.473-0.473-0.524-1.663-0.643-1.78c-0.118-0.119-0.185-0.185-0.185-0.185l0.029-0.414c0,0,0.842-0.207,1.699-0.207s1.803,0.502,1.803,0.502c0.231-0.074,0.784-0.083,0.996,0c0,0,0.945-0.502,1.803-0.502s1.699,0.207,1.699,0.207l0.029,0.414c0,0-0.066,0.066-0.185,0.185c-0.118,0.118-0.169,1.308-0.643,1.78C18.229,13.93,17.018,13.944,16.618,13.693z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Apple();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Apple = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Apple.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Apple\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.32,10.85c-1.743,1.233-2.615,2.719-2.615,4.455c0,2.079,1.078,3.673,3.232,4.786c-0.578,1.677-1.416,3.134-2.514,4.375c-1.097,1.241-2.098,1.862-3.004,1.862c-0.427,0-1.009-0.143-1.748-0.423l-0.354-0.138c-0.725-0.281-1.363-0.423-1.92-0.423c-0.525,0-1.1,0.11-1.725,0.331l-0.445,0.16l-0.56,0.229c-0.441,0.176-0.888,0.264-1.337,0.264c-1.059,0-2.228-0.872-3.507-2.616c-1.843-2.498-2.764-5.221-2.764-8.167c0-2.095,0.574-3.781,1.725-5.061c1.149-1.279,2.673-1.92,4.568-1.92c0.709,0,1.371,0.13,1.988,0.389l0.423,0.172l0.445,0.183c0.396,0.167,0.716,0.251,0.959,0.251c0.312,0,0.659-0.072,1.04-0.217l0.582-0.229l0.435-0.16c0.693-0.251,1.459-0.377,2.297-0.377C21.512,8.576,23.109,9.334,24.32,10.85zM19.615,3.287c0.021,0.267,0.033,0.473,0.033,0.617c0,1.317-0.479,2.473-1.438,3.467s-2.075,1.49-3.347,1.49c-0.038-0.297-0.058-0.51-0.058-0.639c0-1.12,0.445-2.171,1.337-3.153c0.891-0.982,1.922-1.558,3.096-1.725C19.32,3.329,19.447,3.311,19.615,3.287z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Apps();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Apps = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Apps.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Apps\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.359,18.424l-2.326,1.215c0.708,1.174,1.384,2.281,1.844,3.033l2.043-1.066C25.538,20.822,24.966,19.652,24.359,18.424zM19.143,14.688c0.445,0.84,1.342,2.367,2.274,3.926l2.414-1.261c-0.872-1.769-1.72-3.458-2.087-4.122c-0.896-1.621-1.982-3.108-3.454-5.417c-1.673-2.625-3.462-5.492-4.052-4.947c-1.194,0.384,1.237,4.094,1.876,5.715C16.73,10.147,17.991,12.512,19.143,14.688zM26.457,22.673l-1.961,1.022l1.982,4.598c0,0,0.811,0.684,1.92,0.213c1.104-0.469,0.81-1.706,0.81-1.706L26.457,22.673zM24.35,15.711c0.168,0.339,2.924,5.93,2.924,5.93h1.983v-5.93H24.35zM18.34,15.704h-4.726l-3.424,5.935h11.66C21.559,21.159,18.771,16.479,18.34,15.704zM3.231,21.613l3.437-5.902H2.083v5.93h1.133L3.231,21.613zM15.048,10.145c0-0.93-0.754-1.685-1.685-1.685c-0.661,0-1.231,0.381-1.507,0.936l2.976,1.572C14.97,10.725,15.048,10.444,15.048,10.145zM14.343,12.06l-3.188-1.684L9.62,13.012l3.197,1.689L14.343,12.06zM3.192,26.886l-0.384,1.108v0.299l0.298-0.128l0.725-0.896l2.997-2.354l-3.137-1.651L3.192,26.886zM9.02,14.044l-4.757,8.17l3.23,1.706l4.728-8.186L9.02,14.044z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowDown();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowDown = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowDown.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ArrowDown\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M5.318,6.684L15.5,24.316L25.682,6.684H5.318z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowLeft();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowLeft = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowLeft.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ArrowLeft\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.316,5.318L6.684,15.5l17.632,10.182V5.318L24.316,5.318z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowLeft2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowLeft2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowLeft2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ArrowLeft2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.871,9.814 15.684,16.001 21.871,22.188 18.335,25.725 8.612,16.001 18.335,6.276z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowRight();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowRight = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowRight.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ArrowRight\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowRight2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowRight2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowRight2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ArrowRight2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.129,22.186 16.316,15.999 10.129,9.812 13.665,6.276 23.389,15.999 13.665,25.725z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ArrowUp();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ArrowUp = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ArrowUp.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.ArrowUp\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.682,24.316L15.5,6.684L5.318,24.316H25.682z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Aumade();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Aumade = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Aumade.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Aumade\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.513,24.52c-0.131-0.217-0.14-0.481-0.022-0.711l1.987-3.844l0,0c0.186-0.357,0.625-0.497,0.981-0.312c0.357,0.188,0.498,0.625,0.312,0.982l-1.801,3.48l2.228,3.699h12.269l-14.8-25.631L6.433,18.178c0.434,0.242,0.909,0.479,1.391,0.654c0.571,0.211,1.148,0.342,1.658,0.342c0.276,0,0.579-0.078,0.916-0.238c0.337-0.158,0.7-0.396,1.073-0.688c0.749-0.582,1.527-1.354,2.334-2.021c0.539-0.442,1.091-0.844,1.706-1.099c0.352-0.145,0.729-0.239,1.128-0.239c0.622,0,1.174,0.214,1.622,0.5c0.449,0.287,0.813,0.646,1.11,0.995c0.59,0.697,0.902,1.359,0.924,1.394l0,0c0.18,0.361,0.021,0.801-0.341,0.977c-0.356,0.176-0.798,0.021-0.978-0.34c0-0.002-0.002-0.004-0.004-0.007c-0.002-0.011-0.008-0.021-0.018-0.034c-0.018-0.033-0.043-0.082-0.078-0.146c-0.07-0.125-0.179-0.305-0.312-0.496c-0.271-0.391-0.668-0.845-1.092-1.104c-0.281-0.178-0.561-0.272-0.844-0.272c-0.216,0-0.479,0.069-0.788,0.229c-0.309,0.153-0.653,0.396-1.016,0.688c-0.727,0.584-1.511,1.362-2.351,2.033c-0.562,0.445-1.15,0.853-1.809,1.103c-0.375,0.143-0.776,0.229-1.195,0.229c-0.749,0-1.48-0.181-2.164-0.433c-0.58-0.219-1.125-0.482-1.613-0.764L0.86,27.816h15.63L14.513,24.52zM18.214,22.242c0.222-0.557,0.537-1.217,0.963-1.848c0.427-0.627,0.957-1.232,1.646-1.646c0.379-0.229,0.812-0.391,1.282-0.438l-0.604-0.934l0,0c-0.22-0.339-0.123-0.789,0.215-1.009c0.341-0.219,0.789-0.123,1.013,0.216l1.545,2.391c0.184,0.274,0.147,0.646-0.075,0.893c-0.228,0.247-0.591,0.305-0.886,0.145c-0.354-0.191-0.646-0.258-0.901-0.258c-0.291,0-0.562,0.084-0.845,0.25c-0.277,0.164-0.562,0.414-0.813,0.719c-0.519,0.607-0.937,1.422-1.185,2.055c-0.111,0.285-0.387,0.466-0.678,0.466c-0.092,0-0.183-0.021-0.271-0.056C18.249,23.039,18.064,22.615,18.214,22.242z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.BarChart();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.BarChart = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.BarChart.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.BarChart\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.25,8.375V28h6.5V8.375H21.25zM12.25,28h6.5V4.125h-6.5V28zM3.25,28h6.5V12.625h-6.5V28z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.BioHazard();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.BioHazard = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.BioHazard.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.BioHazard\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.154,13.988c-0.96-0.554-1.982-0.892-3.019-1.032c0.396-0.966,0.616-2.023,0.616-3.131c0-4.399-3.438-8.001-7.772-8.264c3.245,0.258,5.803,2.979,5.803,6.292c0,3.373-2.653,6.123-5.983,6.294v1.292c0.908,0.144,1.605,0.934,1.605,1.883c0,0.232-0.043,0.454-0.118,0.66l1.181,0.683c1.826-2.758,5.509-3.658,8.41-1.981c2.896,1.672,3.965,5.299,2.506,8.254C31.386,21.038,29.992,16.204,26.154,13.988zM4.122,16.587c2.92-1.686,6.628-0.764,8.442,2.034l1.141-0.657c-0.072-0.2-0.109-0.417-0.109-0.642c0-0.909,0.638-1.67,1.489-1.859v-1.319c-3.3-0.202-5.92-2.94-5.92-6.292c0-3.297,2.532-6.007,5.757-6.286c-4.312,0.285-7.729,3.875-7.729,8.258c0,1.078,0.206,2.106,0.581,3.05c-1.004,0.147-1.999,0.481-2.931,1.02c-3.812,2.201-5.209,6.985-3.264,10.87C0.174,21.823,1.251,18.244,4.122,16.587zM11.15,11.452c0.114,0.139,0.235,0.271,0.362,0.398c0.126,0.126,0.259,0.247,0.397,0.361c0.102,0.084,0.211,0.16,0.318,0.236c0.93-0.611,2.045-0.969,3.244-0.969c1.201,0,2.312,0.357,3.242,0.969c0.107-0.077,0.217-0.152,0.318-0.236c0.139-0.114,0.271-0.235,0.397-0.361c0.127-0.127,0.248-0.259,0.362-0.398c0.113-0.138,0.222-0.283,0.323-0.431c-1.307-0.956-2.908-1.528-4.643-1.528c-0.042,0-0.083-0.001-0.124,0c-0.019,0-0.04-0.001-0.06,0c-1.666,0.038-3.201,0.605-4.462,1.528C10.929,11.17,11.037,11.314,11.15,11.452zM9.269,16.787c-0.168-0.062-0.338-0.117-0.512-0.164c-0.173-0.047-0.348-0.083-0.525-0.113c-0.177-0.03-0.355-0.053-0.535-0.065c-0.175,1.609,0.13,3.282,0.998,4.786c0.868,1.503,2.164,2.606,3.645,3.259c0.079-0.162,0.15-0.328,0.212-0.496c0.063-0.169,0.118-0.338,0.164-0.512c0.047-0.173,0.087-0.349,0.115-0.525c0.022-0.13,0.034-0.262,0.046-0.394c-0.993-0.5-1.86-1.286-2.461-2.325c-0.6-1.04-0.847-2.182-0.783-3.294C9.512,16.889,9.392,16.833,9.269,16.787zM18.122,22.657c0.014,0.132,0.024,0.263,0.046,0.394c0.03,0.177,0.067,0.352,0.113,0.524c0.047,0.174,0.102,0.346,0.165,0.514c0.062,0.169,0.132,0.333,0.212,0.495c1.48-0.653,2.777-1.755,3.644-3.257c0.868-1.504,1.176-3.179,1.001-4.788c-0.18,0.013-0.358,0.035-0.535,0.065c-0.177,0.029-0.353,0.067-0.525,0.113s-0.345,0.101-0.513,0.163c-0.124,0.047-0.241,0.105-0.362,0.16c0.063,1.11-0.183,2.253-0.784,3.292C19.984,21.373,19.116,22.157,18.122,22.657zM20.569,27.611c-2.92-1.687-3.977-5.358-2.46-8.329l-1.192-0.689c-0.349,0.389-0.854,0.634-1.417,0.634c-0.571,0-1.086-0.254-1.436-0.653l-1.146,0.666c1.475,2.96,0.414,6.598-2.488,8.272c-2.888,1.668-6.552,0.791-8.386-1.935c2.38,3.667,7.249,4.87,11.079,2.658c0.929-0.535,1.711-1.227,2.339-2.018c0.64,0.832,1.45,1.554,2.416,2.112c3.835,2.213,8.709,1.006,11.086-2.671C27.132,28.396,23.463,29.282,20.569,27.611z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Book();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Book = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Book.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Book\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.754,4.626c-0.233-0.161-0.536-0.198-0.802-0.097L12.16,9.409c-0.557,0.213-1.253,0.316-1.968,0.316c-0.997,0.002-2.029-0.202-2.747-0.48C7.188,9.148,6.972,9.04,6.821,8.943c0.056-0.024,0.12-0.05,0.193-0.075L18.648,4.43l1.733,0.654V3.172c0-0.284-0.14-0.554-0.374-0.714c-0.233-0.161-0.538-0.198-0.802-0.097L6.414,7.241c-0.395,0.142-0.732,0.312-1.02,0.564C5.111,8.049,4.868,8.45,4.872,8.896c0,0.012,0.004,0.031,0.004,0.031v17.186c0,0.008-0.003,0.015-0.003,0.021c0,0.006,0.003,0.01,0.003,0.016v0.017h0.002c0.028,0.601,0.371,0.983,0.699,1.255c1.034,0.803,2.769,1.252,4.614,1.274c0.874,0,1.761-0.116,2.583-0.427l12.796-4.881c0.337-0.128,0.558-0.448,0.558-0.809V5.341C26.128,5.057,25.988,4.787,25.754,4.626zM5.672,11.736c0.035,0.086,0.064,0.176,0.069,0.273l0.004,0.054c0.016,0.264,0.13,0.406,0.363,0.611c0.783,0.626,2.382,1.08,4.083,1.093c0.669,0,1.326-0.083,1.931-0.264v1.791c-0.647,0.143-1.301,0.206-1.942,0.206c-1.674-0.026-3.266-0.353-4.509-1.053V11.736zM10.181,24.588c-1.674-0.028-3.266-0.354-4.508-1.055v-2.712c0.035,0.086,0.065,0.176,0.07,0.275l0.002,0.053c0.018,0.267,0.13,0.408,0.364,0.613c0.783,0.625,2.381,1.079,4.083,1.091c0.67,0,1.327-0.082,1.932-0.262v1.789C11.476,24.525,10.821,24.588,10.181,24.588z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Bookmark();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Bookmark = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Bookmark.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Bookmark\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M17.396,1.841L6.076,25.986l7.341-4.566l1.186,8.564l11.32-24.146L17.396,1.841zM19.131,9.234c-0.562-0.264-0.805-0.933-0.541-1.495c0.265-0.562,0.934-0.805,1.496-0.541s0.805,0.934,0.541,1.496S19.694,9.498,19.131,9.234z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Books();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Books = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Books.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Books\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.679,7.858c-0.176-0.138-0.404-0.17-0.606-0.083l-9.66,4.183c-0.42,0.183-0.946,0.271-1.486,0.271c-0.753,0.002-1.532-0.173-2.075-0.412c-0.194-0.083-0.356-0.176-0.471-0.259c0.042-0.021,0.09-0.042,0.146-0.064l8.786-3.804l1.31,0.561V6.612c0-0.244-0.106-0.475-0.283-0.612c-0.176-0.138-0.406-0.17-0.605-0.083l-9.66,4.183c-0.298,0.121-0.554,0.268-0.771,0.483c-0.213,0.208-0.397,0.552-0.394,0.934c0,0.01,0.003,0.027,0.003,0.027v14.73c0,0.006-0.002,0.012-0.002,0.019c0,0.005,0.002,0.007,0.002,0.012v0.015h0.002c0.021,0.515,0.28,0.843,0.528,1.075c0.781,0.688,2.091,1.073,3.484,1.093c0.66,0,1.33-0.1,1.951-0.366l9.662-4.184c0.255-0.109,0.422-0.383,0.422-0.692V8.471C26.961,8.227,26.855,7.996,26.679,7.858zM20.553,5.058c-0.017-0.221-0.108-0.429-0.271-0.556c-0.176-0.138-0.404-0.17-0.606-0.083l-9.66,4.183C9.596,8.784,9.069,8.873,8.53,8.873C7.777,8.874,6.998,8.699,6.455,8.46C6.262,8.378,6.099,8.285,5.984,8.202C6.026,8.181,6.075,8.16,6.13,8.138l8.787-3.804l1.309,0.561V3.256c0-0.244-0.106-0.475-0.283-0.612c-0.176-0.138-0.407-0.17-0.606-0.083l-9.66,4.183C5.379,6.864,5.124,7.011,4.907,7.227C4.693,7.435,4.51,7.779,4.513,8.161c0,0.011,0.003,0.027,0.003,0.027v14.73c0,0.006-0.001,0.013-0.001,0.019c0,0.005,0.001,0.007,0.001,0.012v0.016h0.002c0.021,0.515,0.28,0.843,0.528,1.075c0.781,0.688,2.091,1.072,3.485,1.092c0.376,0,0.754-0.045,1.126-0.122V11.544c-0.01-0.7,0.27-1.372,0.762-1.856c0.319-0.315,0.708-0.564,1.19-0.756L20.553,5.058z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Bubble();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Bubble = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Bubble.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Bubble\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Bug();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Bug = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Bug.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Bug\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.589,10.903l-5.828,1.612c-0.534-1.419-1.338-2.649-2.311-3.628l3.082-5.44c0.271-0.48,0.104-1.092-0.38-1.365c-0.479-0.271-1.09-0.102-1.36,0.377l-2.924,5.162c-0.604-0.383-1.24-0.689-1.9-0.896c-0.416-1.437-1.652-2.411-3.058-2.562c-0.001-0.004-0.002-0.008-0.003-0.012c-0.061-0.242-0.093-0.46-0.098-0.65c-0.005-0.189,0.012-0.351,0.046-0.479c0.037-0.13,0.079-0.235,0.125-0.317c0.146-0.26,0.34-0.43,0.577-0.509c0.023,0.281,0.142,0.482,0.352,0.601c0.155,0.088,0.336,0.115,0.546,0.086c0.211-0.031,0.376-0.152,0.496-0.363c0.105-0.186,0.127-0.389,0.064-0.607c-0.064-0.219-0.203-0.388-0.414-0.507c-0.154-0.087-0.314-0.131-0.482-0.129c-0.167,0.001-0.327,0.034-0.481,0.097c-0.153,0.063-0.296,0.16-0.429,0.289c-0.132,0.129-0.241,0.271-0.33,0.426c-0.132,0.234-0.216,0.496-0.25,0.783c-0.033,0.286-0.037,0.565-0.009,0.84c0.017,0.16,0.061,0.301,0.094,0.449c-0.375-0.021-0.758,0.002-1.14,0.108c-0.482,0.133-0.913,0.36-1.28,0.653c-0.052-0.172-0.098-0.344-0.18-0.518c-0.116-0.249-0.263-0.486-0.438-0.716c-0.178-0.229-0.384-0.41-0.618-0.543C9.904,3.059,9.737,2.994,9.557,2.951c-0.18-0.043-0.352-0.052-0.516-0.027s-0.318,0.08-0.463,0.164C8.432,3.172,8.318,3.293,8.23,3.445C8.111,3.656,8.08,3.873,8.136,4.092c0.058,0.221,0.181,0.384,0.367,0.49c0.21,0.119,0.415,0.138,0.611,0.056C9.31,4.556,9.451,4.439,9.539,4.283c0.119-0.21,0.118-0.443-0.007-0.695c0.244-0.055,0.497-0.008,0.757,0.141c0.081,0.045,0.171,0.115,0.27,0.208c0.097,0.092,0.193,0.222,0.286,0.388c0.094,0.166,0.179,0.368,0.251,0.608c0.013,0.044,0.023,0.098,0.035,0.146c-0.911,0.828-1.357,2.088-1.098,3.357c-0.582,0.584-1.072,1.27-1.457,2.035l-5.16-2.926c-0.48-0.271-1.092-0.102-1.364,0.377C1.781,8.404,1.95,9.016,2.43,9.289l5.441,3.082c-0.331,1.34-0.387,2.807-0.117,4.297l-5.828,1.613c-0.534,0.147-0.846,0.699-0.698,1.231c0.147,0.53,0.697,0.843,1.231,0.694l5.879-1.627c0.503,1.057,1.363,2.28,2.371,3.443l-3.194,5.639c-0.272,0.481-0.104,1.092,0.378,1.363c0.239,0.137,0.512,0.162,0.758,0.094c0.248-0.068,0.469-0.229,0.604-0.471l2.895-5.109c2.7,2.594,5.684,4.123,5.778,1.053c1.598,2.56,3.451-0.338,4.502-3.976l5.203,2.947c0.24,0.138,0.514,0.162,0.762,0.094c0.246-0.067,0.467-0.229,0.603-0.471c0.272-0.479,0.104-1.091-0.377-1.362l-5.701-3.229c0.291-1.505,0.422-2.983,0.319-4.138l5.886-1.627c0.53-0.147,0.847-0.697,0.696-1.229C29.673,11.068,29.121,10.756,28.589,10.903z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Calendar();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Calendar = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Calendar.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Calendar\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M11.758,15.318c0.312-0.3,0.408-0.492,0.408-0.492h0.024c0,0-0.012,0.264-0.012,0.528v5.469h-1.871v1.031h4.87v-1.031H13.33v-7.436h-1.055l-2.027,1.967l0.719,0.744L11.758,15.318zM16.163,21.207c0,0.205,0.024,0.42,0.06,0.647h5.457v-1.031h-4.197c0.023-1.931,4.065-2.362,4.065-5.146c0-1.463-1.114-2.436-2.674-2.436c-1.907,0-2.675,1.607-2.675,1.607l0.875,0.587c0,0,0.6-1.08,1.716-1.08c0.887,0,1.522,0.563,1.522,1.403C20.312,17.754,16.163,18.186,16.163,21.207zM12,3.604h-2v3.335h2V3.604zM23,4.77v3.17h-4V4.77h-6v3.168H9.002V4.77H6.583v21.669h18.833V4.77H23zM24.417,25.438H7.584V10.522h16.833V25.438zM22,3.604h-2v3.335h2V3.604z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cart();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cart = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cart.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Cart\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.02,11.754L8.416,9.473L7.16,4.716C7.071,4.389,6.772,4.158,6.433,4.158H3.341C3.114,3.866,2.775,3.667,2.377,3.667c-0.686,0-1.242,0.556-1.242,1.242c0,0.686,0.556,1.242,1.242,1.242c0.399,0,0.738-0.201,0.965-0.493h2.512l5.23,19.8c-0.548,0.589-0.891,1.373-0.891,2.242c0,1.821,1.473,3.293,3.293,3.293c1.82,0,3.294-1.472,3.297-3.293c0-0.257-0.036-0.504-0.093-0.743h5.533c-0.056,0.239-0.092,0.486-0.092,0.743c0,1.821,1.475,3.293,3.295,3.293s3.295-1.472,3.295-3.293c0-1.82-1.473-3.295-3.295-3.297c-0.951,0.001-1.801,0.409-2.402,1.053h-7.136c-0.601-0.644-1.451-1.052-2.402-1.053c-0.379,0-0.738,0.078-1.077,0.196l-0.181-0.685H26.81c1.157-0.027,2.138-0.83,2.391-1.959l1.574-7.799c0.028-0.145,0.041-0.282,0.039-0.414C30.823,12.733,30.051,11.86,29.02,11.754zM25.428,27.994c-0.163,0-0.295-0.132-0.297-0.295c0.002-0.165,0.134-0.297,0.297-0.297s0.295,0.132,0.297,0.297C25.723,27.862,25.591,27.994,25.428,27.994zM27.208,20.499l0.948-0.948l-0.318,1.578L27.208,20.499zM12.755,11.463l1.036,1.036l-1.292,1.292l-1.292-1.292l1.087-1.087L12.755,11.463zM17.253,11.961l0.538,0.538l-1.292,1.292l-1.292-1.292l0.688-0.688L17.253,11.961zM9.631,14.075l0.868-0.868l1.292,1.292l-1.292,1.292l-0.564-0.564L9.631,14.075zM9.335,12.956l-0.328-1.24L9.792,12.5L9.335,12.956zM21.791,16.499l-1.292,1.292l-1.292-1.292l1.292-1.292L21.791,16.499zM21.207,14.5l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,14.5zM18.5,15.791l-1.293-1.292l1.292-1.292l1.292,1.292L18.5,15.791zM17.791,16.499L16.5,17.791l-1.292-1.292l1.292-1.292L17.791,16.499zM14.499,15.791l-1.292-1.292l1.292-1.292l1.292,1.292L14.499,15.791zM13.791,16.499l-1.292,1.291l-1.292-1.291l1.292-1.292L13.791,16.499zM10.499,17.207l1.292,1.292l-0.785,0.784l-0.54-2.044L10.499,17.207zM11.302,20.404l1.197-1.197l1.292,1.292L12.5,21.791l-1.131-1.13L11.302,20.404zM13.208,18.499l1.291-1.292l1.292,1.292L14.5,19.791L13.208,18.499zM16.5,19.207l1.292,1.292L16.5,21.79l-1.292-1.291L16.5,19.207zM17.208,18.499l1.292-1.292l1.291,1.292L18.5,19.79L17.208,18.499zM20.499,19.207l1.292,1.292L20.5,21.79l-1.292-1.292L20.499,19.207zM21.207,18.499l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,18.499zM23.207,16.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,16.499zM25.207,14.499l1.292-1.292L27.79,14.5l-1.291,1.292L25.207,14.499zM24.499,13.792l-1.156-1.156l2.082,0.23L24.499,13.792zM21.791,12.5l-1.292,1.292L19.207,12.5l0.29-0.29l2.253,0.25L21.791,12.5zM14.5,11.791l-0.152-0.152l0.273,0.03L14.5,11.791zM10.5,11.792l-0.65-0.65l1.171,0.129L10.5,11.792zM14.5,21.207l1.205,1.205h-2.409L14.5,21.207zM18.499,21.207l1.206,1.206h-2.412L18.499,21.207zM22.499,21.207l1.208,1.207l-2.414-0.001L22.499,21.207zM23.207,20.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,20.499zM25.207,18.499l1.292-1.291l1.291,1.291l-1.291,1.292L25.207,18.499zM28.499,17.791l-1.291-1.292l1.291-1.291l0.444,0.444l-0.429,2.124L28.499,17.791zM29.001,13.289l-0.502,0.502l-0.658-0.658l1.016,0.112C28.911,13.253,28.956,13.271,29.001,13.289zM13.487,27.994c-0.161,0-0.295-0.132-0.295-0.295c0-0.165,0.134-0.297,0.295-0.297c0.163,0,0.296,0.132,0.296,0.297C13.783,27.862,13.651,27.994,13.487,27.994zM26.81,22.414h-1.517l1.207-1.207l0.93,0.93C27.243,22.306,27.007,22.428,26.81,22.414z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ccw();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ccw = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ccw.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ccw\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Chat();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Chat = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Chat.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Chat\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.985,5.972c-7.563,0-13.695,4.077-13.695,9.106c0,2.877,2.013,5.44,5.147,7.108c-0.446,1.479-1.336,3.117-3.056,4.566c0,0,4.015-0.266,6.851-3.143c0.163,0.04,0.332,0.07,0.497,0.107c-0.155-0.462-0.246-0.943-0.246-1.443c0-3.393,3.776-6.05,8.599-6.05c3.464,0,6.379,1.376,7.751,3.406c1.168-1.34,1.847-2.892,1.847-4.552C29.68,10.049,23.548,5.972,15.985,5.972zM27.68,22.274c0-2.79-3.401-5.053-7.599-5.053c-4.196,0-7.599,2.263-7.599,5.053c0,2.791,3.403,5.053,7.599,5.053c0.929,0,1.814-0.116,2.637-0.319c1.573,1.597,3.801,1.744,3.801,1.744c-0.954-0.804-1.447-1.713-1.695-2.534C26.562,25.293,27.68,23.871,27.68,22.274z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Check();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Check = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Check.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Check\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M2.379,14.729 5.208,11.899 12.958,19.648 25.877,6.733 28.707,9.561 12.958,25.308z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Chrome();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Chrome = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Chrome.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Chrome\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.318,7.677c0.071-0.029,0.148-0.046,0.229-0.046h11.949c-2.533-3.915-6.938-6.506-11.949-6.506c-5.017,0-9.428,2.598-11.959,6.522l4.291,7.431C8.018,11.041,11.274,7.796,15.318,7.677zM28.196,8.84h-8.579c2.165,1.357,3.605,3.763,3.605,6.506c0,1.321-0.334,2.564-0.921,3.649c-0.012,0.071-0.035,0.142-0.073,0.209l-5.973,10.347c7.526-0.368,13.514-6.587,13.514-14.205C29.77,13.002,29.201,10.791,28.196,8.84zM15.547,23.022c-2.761,0-5.181-1.458-6.533-3.646c-0.058-0.046-0.109-0.103-0.149-0.171L2.89,8.855c-1,1.946-1.565,4.153-1.565,6.492c0,7.624,5.999,13.846,13.534,14.205l4.287-7.425C18.073,22.698,16.848,23.022,15.547,23.022zM9.08,15.347c0,1.788,0.723,3.401,1.894,4.573c1.172,1.172,2.785,1.895,4.573,1.895c1.788,0,3.401-0.723,4.573-1.895s1.895-2.785,1.895-4.573c0-1.788-0.723-3.4-1.895-4.573c-1.172-1.171-2.785-1.894-4.573-1.894c-1.788,0-3.401,0.723-4.573,1.894C9.803,11.946,9.081,13.559,9.08,15.347z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Clip();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Clip = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Clip.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Clip\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.898,6.135c-1.571-1.125-3.758-0.764-4.884,0.808l-8.832,12.331c-0.804,1.122-0.546,2.684,0.577,3.488c1.123,0.803,2.684,0.545,3.488-0.578l6.236-8.706l-0.813-0.583l-6.235,8.707h0c-0.483,0.672-1.42,0.828-2.092,0.347c-0.673-0.481-0.827-1.419-0.345-2.093h0l8.831-12.33l0.001-0.001l-0.002-0.001c0.803-1.119,2.369-1.378,3.489-0.576c1.12,0.803,1.379,2.369,0.577,3.489v-0.001l-9.68,13.516l0.001,0.001c-1.124,1.569-3.316,1.931-4.885,0.808c-1.569-1.125-1.93-3.315-0.807-4.885l7.035-9.822l-0.813-0.582l-7.035,9.822c-1.447,2.02-0.982,4.83,1.039,6.277c2.021,1.448,4.831,0.982,6.278-1.037l9.68-13.516C25.83,9.447,25.47,7.261,23.898,6.135z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Clock();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Clock = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Clock.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Clock\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cloud();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cloud = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cloud.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Cloud\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h15.875c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cloud2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cloud2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cloud2.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Cloud2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M7.562,24.812c-3.313,0-6-2.687-6-6l0,0c0.002-2.659,1.734-4.899,4.127-5.684l0,0c0.083-2.26,1.937-4.064,4.216-4.066l0,0c0.73,0,1.415,0.19,2.01,0.517l0,0c1.266-2.105,3.57-3.516,6.208-3.517l0,0c3.947,0.002,7.157,3.155,7.248,7.079l0,0c2.362,0.804,4.062,3.034,4.064,5.671l0,0c0,3.313-2.687,6-6,6l0,0H7.562L7.562,24.812zM24.163,14.887c-0.511-0.095-0.864-0.562-0.815-1.079l0,0c0.017-0.171,0.027-0.336,0.027-0.497l0,0c-0.007-2.899-2.352-5.245-5.251-5.249l0,0c-2.249-0.002-4.162,1.418-4.911,3.41l0,0c-0.122,0.323-0.406,0.564-0.748,0.63l0,0c-0.34,0.066-0.694-0.052-0.927-0.309l0,0c-0.416-0.453-0.986-0.731-1.633-0.731l0,0c-1.225,0.002-2.216,0.993-2.22,2.218l0,0c0,0.136,0.017,0.276,0.045,0.424l0,0c0.049,0.266-0.008,0.54-0.163,0.762l0,0c-0.155,0.223-0.392,0.371-0.657,0.414l0,0c-1.9,0.313-3.352,1.949-3.35,3.931l0,0c0.004,2.209,1.792,3.995,4.001,4.001l0,0h15.874c2.209-0.006,3.994-1.792,3.999-4.001l0,0C27.438,16.854,26.024,15.231,24.163,14.887L24.163,14.887\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.CloudDown();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.CloudDown = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.CloudDown.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.CloudDown\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h3.404l-0.707-0.707c-0.377-0.377-0.585-0.879-0.585-1.413c0-0.533,0.208-1.035,0.585-1.412l0.556-0.557c0.4-0.399,0.937-0.628,1.471-0.628c0.027,0,0.054,0,0.08,0.002v-0.472c0-1.104,0.898-2.002,2-2.002h3.266c1.103,0,2,0.898,2,2.002v0.472c0.027-0.002,0.054-0.002,0.081-0.002c0.533,0,1.07,0.229,1.47,0.63l0.557,0.552c0.78,0.781,0.78,2.05,0,2.828l-0.706,0.707h2.403c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z M21.033,20.986l-0.556-0.555c-0.39-0.389-0.964-0.45-1.276-0.137c-0.312,0.312-0.568,0.118-0.568-0.432v-1.238c0-0.55-0.451-1-1-1h-3.265c-0.55,0-1,0.45-1,1v1.238c0,0.55-0.256,0.744-0.569,0.432c-0.312-0.313-0.887-0.252-1.276,0.137l-0.556,0.555c-0.39,0.389-0.39,1.024-0.001,1.413l4.328,4.331c0.194,0.194,0.451,0.291,0.707,0.291s0.512-0.097,0.707-0.291l4.327-4.331C21.424,22.011,21.423,21.375,21.033,20.986z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.CloudUp();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.CloudUp = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.CloudUp.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.CloudUp\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h2.312c-0.126-0.266-0.2-0.556-0.2-0.859c0-0.535,0.208-1.04,0.587-1.415l4.325-4.329c0.375-0.377,0.877-0.585,1.413-0.585c0.54,0,1.042,0.21,1.417,0.587l4.323,4.329c0.377,0.373,0.585,0.878,0.585,1.413c0,0.304-0.073,0.594-0.2,0.859h1.312c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z M16.706,17.916c-0.193-0.195-0.45-0.291-0.706-0.291s-0.512,0.096-0.707,0.291l-4.327,4.33c-0.39,0.389-0.389,1.025,0.001,1.414l0.556,0.555c0.39,0.389,0.964,0.449,1.276,0.137s0.568-0.119,0.568,0.432v1.238c0,0.549,0.451,1,1,1h3.265c0.551,0,1-0.451,1-1v-1.238c0-0.551,0.256-0.744,0.569-0.432c0.312,0.312,0.887,0.252,1.276-0.137l0.556-0.555c0.39-0.389,0.39-1.025,0.001-1.414L16.706,17.916z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cloudy();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cloudy = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cloudy.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Cloudy\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.378,6.781c0.41,0.988,1.938,0.346,1.524-0.648C15.708,5.667,15.515,5.2,15.32,4.734c-0.289-0.695-0.875-3.233-2.042-2.747c-1.03,0.433-0.128,1.846,0.142,2.494C13.739,5.248,14.059,6.015,14.378,6.781M20.8,7.223c1.094,0.453,1.538-1.551,1.813-2.216c0.281-0.677,1.478-2.565,0.357-3.029c-1.092-0.453-1.537,1.548-1.813,2.216C20.876,4.872,19.68,6.757,20.8,7.223M18.137,6.692c1.183,0,0.829-2.019,0.829-2.742c0-0.732,0.383-2.935-0.829-2.935c-1.183,0-0.828,2.019-0.828,2.742C17.309,4.49,16.926,6.692,18.137,6.692M23.058,8.729c0.852,0.85,2.142-0.972,2.659-1.49c0.512-0.513,2.187-1.687,1.352-2.524c-0.834-0.836-2.013,0.843-2.522,1.353C24.028,6.585,22.198,7.874,23.058,8.729M24.565,10.986c0.448,1.091,2.183-0.01,2.849-0.286c0.676-0.28,2.858-0.771,2.394-1.89c-0.455-1.091-2.181,0.008-2.849,0.285C26.281,9.377,24.102,9.866,24.565,10.986M12.036,8.742c0.752,0.75,1.932-0.415,1.17-1.173c-0.253-0.347-0.646-0.645-0.949-0.946c-0.541-0.539-2.162-2.799-3.068-1.889c-0.79,0.791,0.586,1.755,1.083,2.25C10.859,7.57,11.447,8.156,12.036,8.742M29.365,17.397c-0.768-0.317-1.534-0.635-2.302-0.952c-0.646-0.268-2.07-1.169-2.495-0.135c-0.481,1.168,2.054,1.747,2.751,2.035c0.455,0.188,0.911,0.377,1.367,0.565C29.7,19.331,30.379,17.816,29.365,17.397M29.942,12.817c-0.83,0-1.66,0-2.49,0c-0.701,0-2.357-0.288-2.355,0.83c0,1.262,2.567,0.827,3.319,0.827c0.493,0,0.986,0,1.479-0.001C30.99,14.473,31.043,12.815,29.942,12.817M24.234,18.568c-0.673-0.673-1.773,0.189-1.281,1.007c-0.295-0.264-0.614-0.499-0.961-0.69c3.894-2.866,3.328-9.006-1.021-11.107c-2.024-0.978-4.481-0.828-6.368,0.394c-0.871,0.564-1.603,1.336-2.119,2.236c-0.262,0.456-0.468,0.943-0.612,1.449c-0.074,0.258-0.131,0.521-0.172,0.786c-0.083,0.534-0.109,0.553-0.553,0.871c-0.182-0.957-1.64-0.675-2.326-0.674c-0.815,0.001-1.963-0.217-2.752,0.046c-0.867,0.289-0.652,1.615,0.263,1.613c0.324,0.052,0.701-0.001,1.028-0.001c0.904-0.001,1.809-0.002,2.713-0.003c-0.308,0.352-0.496,0.969-0.94,0.77c-0.467-0.209-0.978-0.319-1.49-0.319c-0.951,0-1.877,0.375-2.561,1.036c-0.681,0.658-1.088,1.569-1.123,2.516c-0.944,0.31-1.791,0.891-2.421,1.658c-2.756,3.354-0.265,8.554,4.058,8.554v-0.002c3.597,0,7.194,0,10.792,0c1.341,0,2.843,0.167,4.168-0.113c3.652-0.772,5.361-5.21,3.133-8.229c0.548,0.547,1.096,1.094,1.644,1.641c0.183,0.183,0.364,0.424,0.575,0.574c0.552,0.552,1.524,0.066,1.403-0.713c-0.097-0.622-1.042-1.267-1.448-1.673C25.319,19.652,24.776,19.11,24.234,18.568M18.137,8.787c4.559,0.009,6.576,5.979,2.912,8.734c-0.637-3.505-4.161-5.824-7.629-5.03C13.943,10.367,15.852,8.792,18.137,8.787M22.895,24.08c-0.633,3.346-4.149,2.879-6.68,2.879c-3.017,0-6.033,0-9.049,0c-0.767,0-1.62,0.084-2.373-0.095c-2.274-0.538-3.416-3.242-2.172-5.235c0.678-1.087,1.568-1.19,2.626-1.67c0.604-0.273,0.456-0.807,0.456-1.331c0.002-0.597,0.284-1.169,0.756-1.533c0.787-0.608,1.943-0.497,2.611,0.234c1.098,1.205,1.96-1.346,2.507-1.893c2.025-2.025,5.475-1.708,7.068,0.684c0.344,0.516,0.581,1.102,0.693,1.712c0.097,0.529-0.115,1.341,0.188,1.796c0.291,0.47,0.943,0.463,1.397,0.68c0.508,0.23,0.963,0.591,1.304,1.034C22.834,22.125,23.064,23.107,22.895,24.08M6.906,9.917c0.881,0.364,1.763,0.727,2.644,1.091c0.353,0.146,0.707,0.292,1.06,0.437c0.997,0.412,1.637-1.119,0.642-1.526C10.47,9.441,9.456,9.177,8.609,8.828c-0.354-0.146-0.707-0.292-1.06-0.437C6.554,7.98,5.912,9.505,6.906,9.917\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Code();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Code = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Code.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Code\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M8.982,7.107L0.322,15.77l8.661,8.662l3.15-3.15L6.621,15.77l5.511-5.511L8.982,7.107zM21.657,7.107l-3.148,3.151l5.511,5.511l-5.511,5.511l3.148,3.15l8.662-8.662L21.657,7.107z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.CodeTalk();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.CodeTalk = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.CodeTalk.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.CodeTalk\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM13.704,19.47l-2.338,2.336l-6.43-6.431l6.429-6.432l2.339,2.341l-4.091,4.091L13.704,19.47zM20.775,21.803l-2.337-2.339l4.092-4.09l-4.092-4.092l2.337-2.339l6.43,6.426L20.775,21.803z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.CommandLine();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.CommandLine = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.CommandLine.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.CommandLine\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M2.021,9.748L2.021,9.748V9.746V9.748zM2.022,9.746l5.771,5.773l-5.772,5.771l2.122,2.123l7.894-7.895L4.143,7.623L2.022,9.746zM12.248,23.269h14.419V20.27H12.248V23.269zM16.583,17.019h10.084V14.02H16.583V17.019zM12.248,7.769v3.001h14.419V7.769H12.248z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Connect();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Connect = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Connect.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Connect\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.06,13.719c-0.944-5.172-5.461-9.094-10.903-9.094v4c3.917,0.006,7.085,3.176,7.094,7.094c-0.009,3.917-3.177,7.085-7.094,7.093v4.002c5.442-0.004,9.959-3.926,10.903-9.096h4.69v-3.999H25.06zM20.375,15.719c0-3.435-2.784-6.219-6.219-6.219c-2.733,0-5.05,1.766-5.884,4.218H1.438v4.001h6.834c0.833,2.452,3.15,4.219,5.884,4.219C17.591,21.938,20.375,19.153,20.375,15.719z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Contract();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Contract = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Contract.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Contract\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.083,18.895l-8.428-2.259l2.258,8.428l1.838-1.837l7.053,7.053l2.476-2.476l-7.053-7.053L25.083,18.895zM5.542,11.731l8.428,2.258l-2.258-8.428L9.874,7.398L3.196,0.72L0.72,3.196l6.678,6.678L5.542,11.731zM7.589,20.935l-6.87,6.869l2.476,2.476l6.869-6.869l1.858,1.857l2.258-8.428l-8.428,2.258L7.589,20.935zM23.412,10.064l6.867-6.87l-2.476-2.476l-6.868,6.869l-1.856-1.856l-2.258,8.428l8.428-2.259L23.412,10.064z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Crop();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Crop = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Crop.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Crop\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.303,21.707V8.275l4.48-4.421l-2.021-2.048l-4.126,4.07H8.761V2.083H5.882v3.793H1.8v2.877h4.083v15.832h15.542v4.609h2.878v-4.609H29.2v-2.878H24.303zM19.72,8.753L8.761,19.565V8.753H19.72zM10.688,21.706l10.735-10.591l0.001,10.592L10.688,21.706z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cross();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cross = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cross.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Cross\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Cube();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Cube = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Cube.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Cube\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,3.029l-10.8,6.235L4.7,21.735L15.5,27.971l10.8-6.235V9.265L15.5,3.029zM24.988,10.599L16,15.789v10.378c0,0.275-0.225,0.5-0.5,0.5s-0.5-0.225-0.5-0.5V15.786l-8.987-5.188c-0.239-0.138-0.321-0.444-0.183-0.683c0.138-0.238,0.444-0.321,0.683-0.183l8.988,5.189l8.988-5.189c0.238-0.138,0.545-0.055,0.684,0.184C25.309,10.155,25.227,10.461,24.988,10.599z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Customer();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Customer = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Customer.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Customer\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h12.036l0.878-3.459l-0.781-0.781l1.344-1.344l1.344,1.344l-0.781,0.781l0.879,3.459h12.035C28.977,26.709,29.039,24.332,28.523,23.813z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Db();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Db = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Db.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Db\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.499,23.438c-3.846,0-7.708-0.987-9.534-3.117c-0.054,0.236-0.09,0.48-0.09,0.737v3.877c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998v-3.877c0-0.258-0.036-0.501-0.09-0.737C23.209,22.451,19.347,23.438,15.499,23.438zM15.499,15.943c-3.846,0-7.708-0.987-9.533-3.117c-0.054,0.236-0.091,0.479-0.091,0.736v3.877c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998v-3.877c0-0.257-0.036-0.501-0.09-0.737C23.209,14.956,19.347,15.943,15.499,15.943zM15.5,1.066c-4.637,0-9.625,1.565-9.625,5.001v3.876c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998V6.067C25.125,2.632,20.137,1.066,15.5,1.066zM15.5,9.066c-4.211,0-7.625-1.343-7.625-3c0-1.656,3.414-3,7.625-3s7.625,1.344,7.625,3C23.125,7.724,19.711,9.066,15.5,9.066z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Detour();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Detour = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Detour.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Detour\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.342,15.5l-7.556-4.363v2.614H18.75c-1.441-0.004-2.423,1.002-2.875,1.784c-0.735,1.222-1.056,2.561-1.441,3.522c-0.135,0.361-0.278,0.655-0.376,0.817c-1.626,0-0.998,0-2.768,0c-0.213-0.398-0.571-1.557-0.923-2.692c-0.237-0.676-0.5-1.381-1.013-2.071C8.878,14.43,7.89,13.726,6.75,13.75H2.812v3.499c0,0,0.358,0,1.031,0h2.741c0.008,0.013,0.018,0.028,0.029,0.046c0.291,0.401,0.634,1.663,1.031,2.888c0.218,0.623,0.455,1.262,0.92,1.897c0.417,0.614,1.319,1.293,2.383,1.293H11c2.25,0,1.249,0,3.374,0c0.696,0.01,1.371-0.286,1.809-0.657c1.439-1.338,1.608-2.886,2.13-4.127c0.218-0.608,0.453-1.115,0.605-1.314c0.006-0.01,0.012-0.018,0.018-0.025h2.85v2.614L29.342,15.5zM10.173,14.539c0.568,0.76,0.874,1.559,1.137,2.311c0.04,0.128,0.082,0.264,0.125,0.399h2.58c0.246-0.697,0.553-1.479,1.005-2.228c0.252-0.438,0.621-0.887,1.08-1.272H9.43C9.735,14.003,9.99,14.277,10.173,14.539z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Diagram();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Diagram = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Diagram.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Diagram\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super({width: 50, height: 50, ...attr}, setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M6.812,17.202l7.396-3.665v-2.164h-0.834c-0.414,0-0.808-0.084-1.167-0.237v1.159l-7.396,3.667v2.912h2V17.202zM26.561,18.875v-2.913l-7.396-3.666v-1.158c-0.358,0.152-0.753,0.236-1.166,0.236h-0.832l-0.001,2.164l7.396,3.666v1.672H26.561zM16.688,18.875v-7.501h-2v7.501H16.688zM27.875,19.875H23.25c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2h4.625c1.104,0,2-0.896,2-2v-4.625C29.875,20.771,28.979,19.875,27.875,19.875zM8.125,19.875H3.5c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2h4.625c1.104,0,2-0.896,2-2v-4.625C10.125,20.771,9.229,19.875,8.125,19.875zM13.375,10.375H18c1.104,0,2-0.896,2-2V3.75c0-1.104-0.896-2-2-2h-4.625c-1.104,0-2,0.896-2,2v4.625C11.375,9.479,12.271,10.375,13.375,10.375zM18,19.875h-4.625c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2H18c1.104,0,2-0.896,2-2v-4.625C20,20.771,19.104,19.875,18,19.875z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Disconnect();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Disconnect = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Disconnect.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Disconnect\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M9.219,9.5c-2.733,0-5.05,1.766-5.884,4.218H1.438v4.001h1.897c0.833,2.452,3.15,4.219,5.884,4.219c3.435,0,6.219-2.784,6.219-6.219S12.653,9.5,9.219,9.5zM27.685,13.719c-0.944-5.172-5.461-9.094-10.903-9.094v4c3.917,0.006,7.085,3.176,7.094,7.094c-0.009,3.917-3.177,7.085-7.094,7.093v4.002c5.442-0.004,9.959-3.926,10.903-9.096h2.065v-3.999H27.685z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.DockBottom();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.DockBottom = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.DockBottom.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.DockBottom\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M3.083,7.333v16.334h24.833V7.333H3.083zM24.915,16.833H6.083v-6.501h18.833L24.915,16.833L24.915,16.833z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.DockLeft();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.DockLeft = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.DockLeft.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.DockLeft\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M3.084,7.333v16.334h24.832V7.333H3.084z M11.667,10.332h13.251v10.336H11.667V10.332z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.DockRight();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.DockRight = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.DockRight.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.DockRight\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M3.083,7.333v16.334h24.833V7.333H3.083z M19.333,20.668H6.083V10.332h13.25V20.668z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.DockTop();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.DockTop = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.DockTop.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.DockTop\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.916,23.667V7.333H3.083v16.334H27.916zM24.915,20.668H6.083v-6.501h18.833L24.915,20.668L24.915,20.668z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Download();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Download = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Download.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Download\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM16,28.792c-1.549,0-2.806-1.256-2.806-2.806s1.256-2.806,2.806-2.806c1.55,0,2.806,1.256,2.806,2.806S17.55,28.792,16,28.792zM16,21.087l-7.858-6.562h3.469V5.747h8.779v8.778h3.468L16,21.087z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Dry();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Dry = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Dry.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Dry\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.784,26.991c0,1.238-1.329,1.696-1.835,1.696c-0.504,0-1.536-0.413-1.65-1.812c0-0.354-0.288-0.642-0.644-0.642c-0.354,0-0.641,0.287-0.641,0.642c0.045,1.056,0.756,3.052,2.935,3.052c2.432,0,3.166-1.882,3.166-3.144v-8.176l-1.328-0.024C14.787,18.584,14.784,25.889,14.784,26.991zM15.584,9.804c-6.807,0-11.084,4.859-11.587,8.326c0.636-0.913,1.694-1.51,2.89-1.51c1.197,0,2.22,0.582,2.855,1.495c0.638-0.904,1.69-1.495,2.88-1.495c1.2,0,2.26,0.6,2.896,1.517c0.635-0.917,1.83-1.517,3.03-1.517c1.19,0,2.241,0.591,2.879,1.495c0.636-0.913,1.659-1.495,2.855-1.495c1.197,0,2.254,0.597,2.89,1.51C26.669,14.663,22.393,9.804,15.584,9.804zM14.733,7.125v2.081h1.323V7.125c0-0.365-0.296-0.661-0.661-0.661C15.029,6.464,14.733,6.76,14.733,7.125zM7.562,6.015c0.54,0.312,1.229,0.128,1.54-0.412c0.109-0.189,0.157-0.398,0.15-0.602L9.251,3.09L7.59,4.047c-0.178,0.095-0.333,0.24-0.441,0.428C6.837,5.015,7.022,5.703,7.562,6.015zM5.572,11.717c0.109-0.19,0.158-0.398,0.151-0.602L5.721,9.203l-1.66,0.957c-0.178,0.096-0.333,0.241-0.441,0.429c-0.311,0.539-0.127,1.229,0.413,1.539C4.571,12.44,5.26,12.256,5.572,11.717zM10.523,9.355c0.539,0.312,1.229,0.126,1.541-0.412c0.109-0.189,0.156-0.398,0.15-0.603L12.214,6.43l-1.662,0.956c-0.177,0.097-0.332,0.241-0.441,0.43C9.799,8.354,9.984,9.044,10.523,9.355zM15.251,3.998c0.539,0.312,1.229,0.126,1.54-0.412c0.11-0.19,0.157-0.398,0.15-0.603L16.94,1.072l-1.661,0.956c-0.178,0.097-0.332,0.242-0.441,0.43C14.526,2.998,14.711,3.687,15.251,3.998zM19.348,8.914c0.539,0.312,1.228,0.128,1.541-0.412c0.109-0.189,0.156-0.398,0.149-0.602h-0.001V5.988l-1.661,0.957c-0.178,0.096-0.332,0.241-0.441,0.429C18.623,7.914,18.809,8.603,19.348,8.914zM23.633,5.196c0.54,0.312,1.23,0.126,1.542-0.413c0.109-0.189,0.156-0.398,0.149-0.602h-0.001V2.27l-1.662,0.957c-0.177,0.096-0.331,0.24-0.44,0.43C22.909,4.195,23.094,4.885,23.633,5.196zM27.528,8.51l-1.659,0.956c-0.18,0.097-0.334,0.242-0.443,0.43c-0.312,0.539-0.127,1.229,0.413,1.54c0.539,0.312,1.229,0.127,1.541-0.412c0.109-0.19,0.158-0.398,0.151-0.603L27.528,8.51z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Employee();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Employee = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Employee.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Employee\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h26.954C28.977,26.709,29.039,24.332,28.523,23.813zM22.188,26.062h-4.562v-1.25h4.562V26.062z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.End();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.End = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.End.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.End\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.167,5.5,21.167,13.681,6.684,5.318,6.684,25.682,21.167,17.318,21.167,25.5,25.5,25.5,25.5,5.5z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ethernet();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ethernet = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ethernet.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ethernet\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.5,8.5v3.168l3.832,3.832L22.5,19.332V22.5l7-7L22.5,8.5zM8.5,22.5v-3.168L4.667,15.5L8.5,11.668V8.5l-7,7L8.5,22.5zM15.5,14.101c-0.928,0-1.68,0.751-1.68,1.68c0,0.927,0.752,1.681,1.68,1.681c0.927,0,1.68-0.754,1.68-1.681C17.18,14.852,16.427,14.101,15.5,14.101zM10.46,14.101c-0.928,0-1.68,0.751-1.68,1.68c0,0.927,0.752,1.681,1.68,1.681s1.68-0.754,1.68-1.681C12.14,14.852,11.388,14.101,10.46,14.101zM20.541,14.101c-0.928,0-1.682,0.751-1.682,1.68c0,0.927,0.754,1.681,1.682,1.681s1.68-0.754,1.68-1.681C22.221,14.852,21.469,14.101,20.541,14.101z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Exchange();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Exchange = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Exchange.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Exchange\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.786,12.876l7.556-4.363l-7.556-4.363v2.598H2.813v3.5h18.973V12.876zM10.368,18.124l-7.556,4.362l7.556,4.362V24.25h18.974v-3.501H10.368V18.124z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Expand();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Expand = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Expand.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Expand\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.545,23.328,17.918,15.623,25.534,8.007,27.391,9.864,29.649,1.436,21.222,3.694,23.058,5.53,15.455,13.134,7.942,5.543,9.809,3.696,1.393,1.394,3.608,9.833,5.456,8.005,12.98,15.608,5.465,23.123,3.609,21.268,1.351,29.695,9.779,27.438,7.941,25.6,15.443,18.098,23.057,25.791,21.19,27.638,29.606,29.939,27.393,21.5z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Export();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Export = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Export.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Export\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.086,20.904c-1.805,3.113-5.163,5.212-9.023,5.219c-5.766-0.01-10.427-4.672-10.438-10.435C4.636,9.922,9.297,5.261,15.063,5.25c3.859,0.007,7.216,2.105,9.022,5.218l3.962,2.284l0.143,0.082C26.879,6.784,21.504,2.25,15.063,2.248C7.64,2.25,1.625,8.265,1.624,15.688c0.002,7.42,6.017,13.435,13.439,13.437c6.442-0.002,11.819-4.538,13.127-10.589l-0.141,0.081L24.086,20.904zM28.4,15.688l-7.15-4.129v2.297H10.275v3.661H21.25v2.297L28.4,15.688z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Fave();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Fave = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Fave.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Fave\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Feed();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Feed = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Feed.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Feed\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.135,16.762c3.078,0,5.972,1.205,8.146,3.391c2.179,2.187,3.377,5.101,3.377,8.202h4.745c0-9.008-7.299-16.335-16.269-16.335V16.762zM4.141,8.354c10.973,0,19.898,8.975,19.898,20.006h4.743c0-13.646-11.054-24.749-24.642-24.749V8.354zM10.701,25.045c0,1.815-1.471,3.287-3.285,3.287s-3.285-1.472-3.285-3.287c0-1.813,1.471-3.285,3.285-3.285S10.701,23.231,10.701,25.045z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ff();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ff = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ff.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Ff\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.5,15.5,15.2,9.552,15.2,15.153,5.5,9.552,5.5,21.447,15.2,15.847,15.2,21.447z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Firefox();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Firefox = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Firefox.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Firefox\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.4,22.469c0.479-0.964,0.851-1.991,1.095-3.066c0.953-3.661,0.666-6.854,0.666-6.854l-0.327,2.104c0,0-0.469-3.896-1.044-5.353c-0.881-2.231-1.273-2.214-1.274-2.21c0.542,1.379,0.494,2.169,0.483,2.288c-0.01-0.016-0.019-0.032-0.027-0.047c-0.131-0.324-0.797-1.819-2.225-2.878c-2.502-2.481-5.943-4.014-9.745-4.015c-4.056,0-7.705,1.745-10.238,4.525C5.444,6.5,5.183,5.938,5.159,5.317c0,0-0.002,0.002-0.006,0.005c0-0.011-0.003-0.021-0.003-0.031c0,0-1.61,1.247-1.436,4.612c-0.299,0.574-0.56,1.172-0.777,1.791c-0.375,0.817-0.75,2.004-1.059,3.746c0,0,0.133-0.422,0.399-0.988c-0.064,0.482-0.103,0.971-0.116,1.467c-0.09,0.845-0.118,1.865-0.039,3.088c0,0,0.032-0.406,0.136-1.021c0.834,6.854,6.667,12.165,13.743,12.165l0,0c1.86,0,3.636-0.37,5.256-1.036C24.938,27.771,27.116,25.196,28.4,22.469zM16.002,3.356c2.446,0,4.73,0.68,6.68,1.86c-2.274-0.528-3.433-0.261-3.423-0.248c0.013,0.015,3.384,0.589,3.981,1.411c0,0-1.431,0-2.856,0.41c-0.065,0.019,5.242,0.663,6.327,5.966c0,0-0.582-1.213-1.301-1.42c0.473,1.439,0.351,4.17-0.1,5.528c-0.058,0.174-0.118-0.755-1.004-1.155c0.284,2.037-0.018,5.268-1.432,6.158c-0.109,0.07,0.887-3.189,0.201-1.93c-4.093,6.276-8.959,2.539-10.934,1.208c1.585,0.388,3.267,0.108,4.242-0.559c0.982-0.672,1.564-1.162,2.087-1.047c0.522,0.117,0.87-0.407,0.464-0.872c-0.405-0.466-1.392-1.105-2.725-0.757c-0.94,0.247-2.107,1.287-3.886,0.233c-1.518-0.899-1.507-1.63-1.507-2.095c0-0.366,0.257-0.88,0.734-1.028c0.58,0.062,1.044,0.214,1.537,0.466c0.005-0.135,0.006-0.315-0.001-0.519c0.039-0.077,0.015-0.311-0.047-0.596c-0.036-0.287-0.097-0.582-0.19-0.851c0.01-0.002,0.017-0.007,0.021-0.021c0.076-0.344,2.147-1.544,2.299-1.659c0.153-0.114,0.55-0.378,0.506-1.183c-0.015-0.265-0.058-0.294-2.232-0.286c-0.917,0.003-1.425-0.894-1.589-1.245c0.222-1.231,0.863-2.11,1.919-2.704c0.02-0.011,0.015-0.021-0.008-0.027c0.219-0.127-2.524-0.006-3.76,1.604C9.674,8.045,9.219,7.95,8.71,7.95c-0.638,0-1.139,0.07-1.603,0.187c-0.05,0.013-0.122,0.011-0.208-0.001C6.769,8.04,6.575,7.88,6.365,7.672c0.161-0.18,0.324-0.356,0.495-0.526C9.201,4.804,12.43,3.357,16.002,3.356z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Flag();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Flag = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Flag.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Flag\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.04,9.508c0.138-0.533,0.15-1.407,0.028-1.943l-0.404-1.771c-0.122-0.536-0.665-1.052-1.207-1.146l-3.723-0.643c-0.542-0.094-1.429-0.091-1.97,0.007l-4.033,0.726c-0.542,0.098-1.429,0.108-1.973,0.023L8.812,4.146C8.817,4.165,8.826,4.182,8.83,4.201l2.701,12.831l1.236,0.214c0.542,0.094,1.428,0.09,1.97-0.007l4.032-0.727c0.541-0.097,1.429-0.107,1.973-0.022l4.329,0.675c0.544,0.085,0.906-0.288,0.807-0.829l-0.485-2.625c-0.1-0.541-0.069-1.419,0.068-1.952L26.04,9.508zM6.667,3.636C6.126,3.75,5.78,4.279,5.894,4.819l5.763,27.378H13.7L7.852,4.409C7.736,3.867,7.207,3.521,6.667,3.636z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Flickr();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Flickr = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Flickr.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Flickr\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.77,8.895c-2.379,0-4.479,1.174-5.77,2.969c-1.289-1.795-3.39-2.969-5.77-2.969c-3.924,0-7.105,3.181-7.105,7.105c0,3.924,3.181,7.105,7.105,7.105c2.379,0,4.48-1.175,5.77-2.97c1.29,1.795,3.391,2.97,5.77,2.97c3.925,0,7.105-3.182,7.105-7.105C28.875,12.075,25.694,8.895,21.77,8.895zM21.769,21.822c-3.211,0-5.821-2.61-5.821-5.821c0-3.213,2.61-5.824,5.821-5.824c3.213,0,5.824,2.611,5.824,5.824C27.593,19.212,24.981,21.822,21.769,21.822z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Folder();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Folder = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Folder.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Folder\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.625,26.75h-26.5V8.375h1.124c1.751,0,0.748-3.125,3-3.125c3.215,0,1.912,0,5.126,0c2.251,0,1.251,3.125,3.001,3.125h14.25V26.75z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Font();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Font = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Font.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Font\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.255,19.327l-1.017,0.131c-0.609,0.081-1.067,0.208-1.375,0.382c-0.521,0.293-0.779,0.76-0.779,1.398c0,0.484,0.178,0.867,0.532,1.146c0.354,0.28,0.774,0.421,1.262,0.421c0.593,0,1.164-0.138,1.72-0.412c0.938-0.453,1.4-1.188,1.4-2.229v-1.354c-0.205,0.131-0.469,0.229-0.792,0.328C22.883,19.229,22.564,19.29,22.255,19.327zM8.036,18.273h4.309l-2.113-6.063L8.036,18.273zM28.167,7.75H3.168c-0.552,0-1,0.448-1,1v16.583c0,0.553,0.448,1,1,1h24.999c0.554,0,1-0.447,1-1V8.75C29.167,8.198,28.721,7.75,28.167,7.75zM14.305,23.896l-1.433-4.109H7.488L6,23.896H4.094L9.262,10.17h2.099l4.981,13.727H14.305L14.305,23.896zM26.792,23.943c-0.263,0.074-0.461,0.121-0.599,0.141c-0.137,0.02-0.323,0.027-0.562,0.027c-0.579,0-0.999-0.204-1.261-0.615c-0.138-0.219-0.231-0.525-0.29-0.926c-0.344,0.449-0.834,0.839-1.477,1.169c-0.646,0.329-1.354,0.493-2.121,0.493c-0.928,0-1.688-0.28-2.273-0.844c-0.589-0.562-0.884-1.271-0.884-2.113c0-0.928,0.29-1.646,0.868-2.155c0.578-0.511,1.34-0.824,2.279-0.942l2.682-0.336c0.388-0.05,0.646-0.211,0.775-0.484c0.063-0.146,0.104-0.354,0.104-0.646c0-0.575-0.203-0.993-0.604-1.252c-0.408-0.26-0.99-0.389-1.748-0.389c-0.877,0-1.5,0.238-1.865,0.713c-0.205,0.263-0.34,0.654-0.399,1.174H17.85c0.031-1.237,0.438-2.097,1.199-2.582c0.77-0.484,1.659-0.726,2.674-0.726c1.176,0,2.131,0.225,2.864,0.673c0.729,0.448,1.093,1.146,1.093,2.093v5.766c0,0.176,0.035,0.313,0.106,0.422c0.071,0.104,0.223,0.156,0.452,0.156c0.076,0,0.16-0.005,0.254-0.015c0.093-0.011,0.191-0.021,0.299-0.041L26.792,23.943L26.792,23.943z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Fork();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Fork = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Fork.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Fork\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M13.741,10.249h8.045v2.627l7.556-4.363l-7.556-4.363v2.598H9.826C11.369,7.612,12.616,8.922,13.741,10.249zM21.786,20.654c-0.618-0.195-1.407-0.703-2.291-1.587c-1.79-1.756-3.712-4.675-5.731-7.227c-2.049-2.486-4.159-4.972-7.451-5.091h-3.5v3.5h3.5c0.656-0.027,1.683,0.486,2.879,1.683c1.788,1.753,3.712,4.674,5.731,7.226c1.921,2.331,3.907,4.639,6.863,5.016v2.702l7.556-4.362l-7.556-4.362V20.654z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ForkAlt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ForkAlt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ForkAlt.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.ForkAlt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.786,12.873l7.556-4.361l-7.556-4.362v2.701c-2.929,0.374-4.905,2.64-6.809,4.952c0.545,0.703,1.08,1.418,1.604,2.127c0.192,0.26,0.383,0.514,0.573,0.77c0.802-1.043,1.584-1.999,2.341-2.74c0.884-0.885,1.673-1.393,2.291-1.588V12.873zM17.661,17.006c-1.893-2.371-3.815-5.354-6.009-7.537c-1.461-1.428-3.155-2.664-5.34-2.693h-3.5v3.5h3.5c0.971-0.119,2.845,1.333,4.712,3.771c1.895,2.371,3.815,5.354,6.011,7.537c1.326,1.297,2.847,2.426,4.751,2.645v2.646l7.556-4.363l-7.556-4.362v2.535C20.746,20.346,19.205,19.022,17.661,17.006z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.FullCube();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.FullCube = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.FullCube.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.FullCube\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,3.029l-10.8,6.235L4.7,21.735L15.5,27.971l10.8-6.235V9.265L15.5,3.029zM15.5,7.029l6.327,3.652L15.5,14.334l-6.326-3.652L15.5,7.029zM24.988,10.599L16,15.789v10.378c0,0.275-0.225,0.5-0.5,0.5s-0.5-0.225-0.5-0.5V15.786l-8.987-5.188c-0.239-0.138-0.321-0.444-0.183-0.683c0.138-0.238,0.444-0.321,0.683-0.183l8.988,5.189l8.988-5.189c0.238-0.138,0.545-0.055,0.684,0.184C25.309,10.155,25.227,10.461,24.988,10.599z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Future();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Future = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Future.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Future\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M17.001,15.5l-0.5-7.876c0-0.552-0.448-1-1-1c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.89-0.365,1.365c0.275,0.479,0.889,0.644,1.365,0.367l3.305-1.677C15.39,16.99,15.444,17,15.501,17C16.329,17,17.001,16.329,17.001,15.5zM18.939,21.455c-0.479,0.277-0.644,0.889-0.366,1.367c0.274,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.89,0.365-1.365C20.027,21.344,19.417,21.18,18.939,21.455zM19.938,7.813c-0.477-0.276-1.09-0.111-1.364,0.366c-0.275,0.48-0.111,1.091,0.366,1.367c0.477,0.276,1.088,0.112,1.365-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM21.823,20.305c0.477,0.274,1.089,0.112,1.364-0.365c0.276-0.479,0.112-1.092-0.364-1.367c-0.48-0.275-1.093-0.111-1.367,0.365C21.182,19.416,21.344,20.029,21.823,20.305zM22.822,12.428c0.478-0.275,0.643-0.888,0.365-1.366c-0.274-0.478-0.89-0.642-1.365-0.366c-0.479,0.278-0.643,0.89-0.366,1.367S22.344,12.705,22.822,12.428zM24.378,15.5c0-0.551-0.448-1-1-1c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1C23.93,16.5,24.378,16.053,24.378,15.5zM9.546,12.062c0.275-0.478,0.111-1.089-0.366-1.366c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366C8.658,12.704,9.269,12.541,9.546,12.062zM6.624,15.5c0,0.553,0.449,1,1,1c0.552,0,1-0.447,1.001-1c-0.001-0.552-0.448-0.999-1.001-1C7.071,14.5,6.624,14.948,6.624,15.5zM9.179,20.305c0.479-0.275,0.643-0.888,0.367-1.367c-0.276-0.477-0.888-0.641-1.367-0.365c-0.478,0.277-0.642,0.889-0.365,1.367C8.089,20.418,8.703,20.58,9.179,20.305zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM14.501,23.377c0,0.553,0.448,1,1,1c0.552,0,1-0.447,1-1s-0.448-1-1-1C14.949,22.377,14.501,22.824,14.501,23.377zM10.696,21.822c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.276,1.091,0.11,1.365-0.365c0.277-0.479,0.113-1.09-0.365-1.367C11.584,21.18,10.973,21.344,10.696,21.822zM28.674,14.087l-3.27-1.186c0.291,1.105,0.41,2.274,0.309,3.478c-0.492,5.639-5.449,9.809-11.091,9.333c-5.639-0.495-9.809-5.45-9.333-11.09c0.494-5.641,5.449-9.812,11.089-9.335c2.428,0.212,4.567,1.266,6.194,2.833l-1.637,1.377l7.031,2.548l-1.309-7.364l-1.771,1.492c-2.133-2.151-4.996-3.597-8.25-3.877C9.346,1.67,2.926,7.072,2.297,14.364c-0.625,7.291,4.777,13.71,12.066,14.339c7.293,0.625,13.713-4.776,14.342-12.066C28.779,15.771,28.762,14.919,28.674,14.087z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.GRaphael();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.GRaphael = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.GRaphael.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.GRaphael\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.833,15.709c0-1.477-0.574-2.862-1.617-3.904l-7.002-7.001l-0.003,0.002c-1.027-1.03-2.445-1.62-3.9-1.62c-1.455,0-2.871,0.59-3.9,1.621l-0.002-0.002l-7,7C4.376,12.836,3.79,14.25,3.79,15.709s0.586,2.873,1.619,3.902l6.312,6.312c0.253,0.285,0.519,0.556,0.8,0.8c1.049,0.989,2.463,1.534,3.908,1.51c1.417-0.021,2.783-0.604,3.785-1.604l6.812-6.812c0.021-0.021,0.035-0.029,0.062-0.062l0.143-0.146c0.271-0.271,0.484-0.562,0.725-0.86l-0.012-0.002C28.516,17.85,28.833,16.805,28.833,15.709zM18.77,25.17c-1.121,1.119-2.917,1.336-4.271,0.514l0.002-0.002c-0.213-0.145-0.414-0.303-0.61-0.471c-0.016-0.016-7.04-7.041-7.04-7.041c-1.34-1.34-1.342-3.584,0-4.92l7-6.998c1.121-1.121,2.908-1.338,4.259-0.512v0.002c0.213,0.141,0.414,0.299,0.604,0.467c0.021,0.016,7.053,7.043,7.053,7.043c0.396,0.388,0.655,0.852,0.818,1.348l-2.607,0.006c-0.537-3.754-3.769-6.641-7.667-6.641c-4.277,0-7.744,3.468-7.745,7.746c0.001,4.277,3.468,7.744,7.745,7.744c3.917,0,7.156-2.91,7.668-6.688l2.638-0.021c-0.16,0.521-0.441,1.02-0.849,1.412L18.77,25.17zM16.312,16.789c0.002,0,0.002,0,0.004,0l5.476-0.02c-0.5,2.562-2.76,4.518-5.48,4.521c-3.084-0.004-5.578-2.5-5.584-5.582c0.006-3.084,2.5-5.58,5.584-5.584c2.708,0.004,4.959,1.929,5.472,4.484l-5.476,0.018c-0.596,0.002-1.078,0.488-1.076,1.084C15.233,16.308,15.715,16.789,16.312,16.789z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Gear();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Gear = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Gear.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Gear\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.974,16.514l3.765-1.991c-0.074-0.738-0.217-1.454-0.396-2.157l-4.182-0.579c-0.362-0.872-0.84-1.681-1.402-2.423l1.594-3.921c-0.524-0.511-1.09-0.977-1.686-1.406l-3.551,2.229c-0.833-0.438-1.73-0.77-2.672-0.984l-1.283-3.976c-0.364-0.027-0.728-0.056-1.099-0.056s-0.734,0.028-1.099,0.056l-1.271,3.941c-0.967,0.207-1.884,0.543-2.738,0.986L7.458,4.037C6.863,4.466,6.297,4.932,5.773,5.443l1.55,3.812c-0.604,0.775-1.11,1.629-1.49,2.55l-4.05,0.56c-0.178,0.703-0.322,1.418-0.395,2.157l3.635,1.923c0.041,1.013,0.209,1.994,0.506,2.918l-2.742,3.032c0.319,0.661,0.674,1.303,1.085,1.905l4.037-0.867c0.662,0.72,1.416,1.351,2.248,1.873l-0.153,4.131c0.663,0.299,1.352,0.549,2.062,0.749l2.554-3.283C15.073,26.961,15.532,27,16,27c0.507,0,1.003-0.046,1.491-0.113l2.567,3.301c0.711-0.2,1.399-0.45,2.062-0.749l-0.156-4.205c0.793-0.513,1.512-1.127,2.146-1.821l4.142,0.889c0.411-0.602,0.766-1.243,1.085-1.905l-2.831-3.131C26.778,18.391,26.93,17.467,26.974,16.514zM20.717,21.297l-1.785,1.162l-1.098-1.687c-0.571,0.22-1.186,0.353-1.834,0.353c-2.831,0-5.125-2.295-5.125-5.125c0-2.831,2.294-5.125,5.125-5.125c2.83,0,5.125,2.294,5.125,5.125c0,1.414-0.573,2.693-1.499,3.621L20.717,21.297z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Gear2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Gear2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Gear2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Gear2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M17.047,27.945c-0.34,0.032-0.688,0.054-1.046,0.054l0,0c-0.32,0-0.631-0.017-0.934-0.043l0,0l-2.626,3.375l-0.646-0.183c-0.758-0.213-1.494-0.48-2.202-0.8l0,0L8.979,30.07l0.158-4.24c-0.558-0.39-1.079-0.825-1.561-1.302l0,0L3.424,25.42l-0.379-0.557c-0.445-0.654-0.824-1.339-1.16-2.032l0,0l-0.292-0.605l2.819-3.12c-0.176-0.661-0.293-1.343-0.353-2.038l0,0l-3.736-1.975l0.068-0.669c0.08-0.801,0.235-1.567,0.42-2.303l0,0l0.165-0.653l4.167-0.577c0.297-0.627,0.647-1.221,1.041-1.78l0,0l-1.59-3.914l0.48-0.47c0.564-0.55,1.168-1.048,1.798-1.503l0,0l0.546-0.394l3.597,2.259c0.606-0.279,1.24-0.509,1.897-0.685l0,0l1.304-4.046l0.672-0.051c0.362-0.027,0.751-0.058,1.174-0.058l0,0c0.422,0,0.81,0.031,1.172,0.058l0,0l0.672,0.051l1.318,4.088c0.632,0.176,1.244,0.401,1.831,0.674l0,0l3.647-2.291l0.548,0.394c0.63,0.455,1.235,0.954,1.798,1.501l0,0l0.482,0.47l-1.639,4.031c0.357,0.519,0.679,1.068,0.954,1.646l0,0l4.297,0.595l0.167,0.653c0.188,0.735,0.342,1.501,0.42,2.303l0,0l0.068,0.669l-3.866,2.044c-0.058,0.634-0.161,1.258-0.315,1.866l0,0l2.913,3.218l-0.293,0.608c-0.335,0.695-0.712,1.382-1.159,2.034l0,0l-0.379,0.555l-4.255-0.912c-0.451,0.451-0.939,0.866-1.461,1.241l0,0l0.162,4.323l-0.615,0.278c-0.709,0.319-1.444,0.587-2.202,0.8l0,0l-0.648,0.183L17.047,27.945L17.047,27.945zM20.424,29.028c0.227-0.076,0.45-0.157,0.671-0.244l0,0l-0.152-4.083l0.479-0.307c0.717-0.466,1.37-1.024,1.95-1.658l0,0l0.386-0.423l4.026,0.862c0.121-0.202,0.238-0.409,0.351-0.62l0,0l-2.754-3.045l0.171-0.544c0.243-0.783,0.381-1.623,0.422-2.5l0,0l0.025-0.571l3.658-1.933c-0.038-0.234-0.082-0.467-0.132-0.7l0,0l-4.07-0.563l-0.219-0.527c-0.327-0.787-0.76-1.524-1.277-2.204l0,0l-0.342-0.453l1.548-3.808c-0.179-0.157-0.363-0.31-0.552-0.458l0,0l-3.455,2.169L20.649,7.15c-0.754-0.397-1.569-0.698-2.429-0.894l0,0l-0.556-0.127l-1.248-3.87c-0.121-0.006-0.239-0.009-0.354-0.009l0,0c-0.117,0-0.235,0.003-0.357,0.009l0,0l-1.239,3.845l-0.564,0.12c-0.875,0.188-1.709,0.494-2.486,0.896l0,0l-0.508,0.264L7.509,5.249c-0.188,0.148-0.372,0.301-0.55,0.458l0,0l1.507,3.708L8.112,9.869c-0.552,0.709-1.011,1.485-1.355,2.319l0,0l-0.218,0.529l-3.939,0.545c-0.05,0.233-0.094,0.466-0.131,0.7l0,0l3.531,1.867l0.022,0.575c0.037,0.929,0.192,1.82,0.459,2.653l0,0l0.175,0.548l-2.667,2.95c0.112,0.212,0.229,0.419,0.351,0.621l0,0l3.916-0.843l0.39,0.423c0.601,0.657,1.287,1.229,2.043,1.703l0,0l0.488,0.305l-0.149,4.02c0.221,0.087,0.445,0.168,0.672,0.244l0,0l2.479-3.188l0.566,0.07c0.427,0.054,0.843,0.089,1.257,0.089l0,0c0.445,0,0.894-0.039,1.353-0.104l0,0l0.571-0.08L20.424,29.028L20.424,29.028zM21.554,20.75l0.546,0.839l-3.463,2.253l-1.229-1.891l0,0c-0.447,0.109-0.917,0.173-1.406,0.173l0,0c-3.384,0-6.126-2.743-6.126-6.123l0,0c0-3.384,2.742-6.126,6.126-6.126l0,0c3.38,0,6.123,2.742,6.123,6.126l0,0c0,1.389-0.467,2.676-1.25,3.704l0,0L21.554,20.75M19.224,21.073l0.108-0.069l-0.987-1.519l0.572-0.572c0.748-0.75,1.207-1.773,1.207-2.912l0,0c-0.004-2.278-1.848-4.122-4.123-4.126l0,0c-2.28,0.004-4.122,1.846-4.126,4.126l0,0c0.004,2.275,1.848,4.119,4.126,4.123l0,0c0.509,0,0.999-0.104,1.473-0.286l0,0l0.756-0.29L19.224,21.073L19.224,21.073z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.GitHub();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.GitHub = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.GitHub.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.GitHub\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.436,15.099c-1.201-0.202-2.451-0.335-3.466-0.371l-0.179-0.006c0.041-0.09,0.072-0.151,0.082-0.16c0.022-0.018,0.04-0.094,0.042-0.168c0-0.041,0.018-0.174,0.046-0.35c0.275,0.01,0.64,0.018,1.038,0.021c1.537,0.012,3.145,0.136,4.248,0.331c0.657,0.116,0.874,0.112,0.389-0.006c-0.491-0.119-1.947-0.294-3.107-0.37c-0.779-0.053-1.896-0.073-2.554-0.062c0.019-0.114,0.041-0.241,0.064-0.371c0.093-0.503,0.124-1.009,0.126-2.016c0.002-1.562-0.082-1.992-0.591-3.025c-0.207-0.422-0.441-0.78-0.724-1.104c0.247-0.729,0.241-1.858-0.015-2.848c-0.211-0.812-0.285-0.864-1.021-0.708C22.19,4.019,21.69,4.2,21.049,4.523c-0.303,0.153-0.721,0.391-1.024,0.578c-0.79-0.278-1.607-0.462-2.479-0.561c-0.884-0.1-3.051-0.044-3.82,0.098c-0.752,0.139-1.429,0.309-2.042,0.511c-0.306-0.189-0.75-0.444-1.067-0.604C9.973,4.221,9.473,4.041,8.847,3.908c-0.734-0.157-0.81-0.104-1.02,0.708c-0.26,1.003-0.262,2.151-0.005,2.878C7.852,7.577,7.87,7.636,7.877,7.682c-1.042,1.312-1.382,2.78-1.156,4.829c0.059,0.534,0.15,1.024,0.277,1.473c-0.665-0.004-1.611,0.02-2.294,0.064c-1.162,0.077-2.618,0.25-3.109,0.369c-0.484,0.118-0.269,0.122,0.389,0.007c1.103-0.194,2.712-0.32,4.248-0.331c0.29-0.001,0.561-0.007,0.794-0.013c0.07,0.237,0.15,0.463,0.241,0.678L7.26,14.759c-1.015,0.035-2.264,0.168-3.465,0.37c-0.901,0.151-2.231,0.453-2.386,0.54c-0.163,0.091-0.03,0.071,0.668-0.106c1.273-0.322,2.928-0.569,4.978-0.741l0.229-0.02c0.44,1.022,1.118,1.802,2.076,2.41c0.586,0.373,1.525,0.756,1.998,0.816c0.13,0.016,0.508,0.094,0.84,0.172c0.333,0.078,0.984,0.195,1.446,0.262h0.011c-0.009,0.006-0.017,0.01-0.025,0.016c-0.56,0.291-0.924,0.744-1.169,1.457c-0.11,0.033-0.247,0.078-0.395,0.129c-0.529,0.18-0.735,0.217-1.271,0.221c-0.556,0.004-0.688-0.02-1.02-0.176c-0.483-0.225-0.933-0.639-1.233-1.133c-0.501-0.826-1.367-1.41-2.089-1.41c-0.617,0-0.734,0.25-0.288,0.615c0.672,0.549,1.174,1.109,1.38,1.537c0.116,0.24,0.294,0.611,0.397,0.824c0.109,0.227,0.342,0.535,0.564,0.748c0.522,0.498,1.026,0.736,1.778,0.848c0.504,0.074,0.628,0.074,1.223-0.002c0.287-0.035,0.529-0.076,0.746-0.127c0,0.244,0,0.525,0,0.855c0,1.766-0.021,2.334-0.091,2.5c-0.132,0.316-0.428,0.641-0.716,0.787c-0.287,0.146-0.376,0.307-0.255,0.455c0.067,0.08,0.196,0.094,0.629,0.066c0.822-0.051,1.403-0.355,1.699-0.891c0.095-0.172,0.117-0.518,0.147-2.318c0.032-1.953,0.046-2.141,0.173-2.42c0.077-0.166,0.188-0.346,0.25-0.395c0.104-0.086,0.111,0.084,0.111,2.42c-0.001,2.578-0.027,2.889-0.285,3.385c-0.058,0.113-0.168,0.26-0.245,0.33c-0.135,0.123-0.192,0.438-0.098,0.533c0.155,0.154,0.932-0.088,1.356-0.422c0.722-0.572,0.808-1.045,0.814-4.461l0.003-2.004l0.219,0.021l0.219,0.02l0.036,2.621c0.041,2.951,0.047,2.994,0.549,3.564c0.285,0.322,0.572,0.5,1.039,0.639c0.625,0.188,0.813-0.102,0.393-0.605c-0.457-0.547-0.479-0.756-0.454-3.994c0.017-2.076,0.017-2.076,0.151-1.955c0.282,0.256,0.336,0.676,0.336,2.623c0,2.418,0.069,2.648,0.923,3.07c0.399,0.195,0.511,0.219,1.022,0.221c0.544,0.002,0.577-0.006,0.597-0.148c0.017-0.115-0.05-0.193-0.304-0.348c-0.333-0.205-0.564-0.467-0.709-0.797c-0.055-0.127-0.092-0.959-0.117-2.672c-0.036-2.393-0.044-2.502-0.193-2.877c-0.201-0.504-0.508-0.902-0.897-1.166c-0.101-0.066-0.202-0.121-0.333-0.162c0.161-0.016,0.317-0.033,0.468-0.055c1.572-0.209,2.403-0.383,3.07-0.641c1.411-0.543,2.365-1.445,2.882-2.724c0.046-0.114,0.092-0.222,0.131-0.309l0.398,0.033c2.051,0.173,3.706,0.42,4.979,0.743c0.698,0.177,0.831,0.198,0.668,0.105C30.666,15.551,29.336,15.25,28.436,15.099zM22.422,15.068c-0.233,0.512-0.883,1.17-1.408,1.428c-0.518,0.256-1.33,0.451-2.25,0.544c-0.629,0.064-4.137,0.083-4.716,0.026c-1.917-0.188-2.991-0.557-3.783-1.296c-0.75-0.702-1.1-1.655-1.039-2.828c0.039-0.734,0.216-1.195,0.679-1.755c0.421-0.51,0.864-0.825,1.386-0.985c0.437-0.134,1.778-0.146,3.581-0.03c0.797,0.051,1.456,0.051,2.252,0c1.886-0.119,3.145-0.106,3.61,0.038c0.731,0.226,1.397,0.834,1.797,1.644c0.18,0.362,0.215,0.516,0.241,1.075C22.808,13.699,22.675,14.517,22.422,15.068zM12.912,11.762c-1.073-0.188-1.686,1.649-0.863,2.587c0.391,0.445,0.738,0.518,1.172,0.248c0.402-0.251,0.62-0.72,0.62-1.328C13.841,12.458,13.472,11.862,12.912,11.762zM19.425,11.872c-1.073-0.188-1.687,1.647-0.864,2.586c0.392,0.445,0.738,0.519,1.173,0.247c0.401-0.25,0.62-0.72,0.62-1.328C20.354,12.569,19.985,11.971,19.425,11.872zM16.539,15.484c-0.023,0.074-0.135,0.184-0.248,0.243c-0.286,0.147-0.492,0.096-0.794-0.179c-0.187-0.169-0.272-0.258-0.329-0.081c-0.053,0.164,0.28,0.493,0.537,0.594c0.236,0.094,0.405,0.097,0.661-0.01c0.254-0.106,0.476-0.391,0.476-0.576C16.842,15.303,16.595,15.311,16.539,15.484zM16.222,14.909c0.163-0.144,0.2-0.44,0.044-0.597s-0.473-0.133-0.597,0.043c-0.144,0.206-0.067,0.363,0.036,0.53C15.865,15.009,16.08,15.034,16.222,14.909z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.GitHubAlt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.GitHubAlt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.GitHubAlt.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.GitHubAlt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.356,17.485c-0.004,0.007-0.007,0.013-0.01,0.021l0.162,0.005c0.107,0.004,0.218,0.01,0.33,0.016c-0.046-0.004-0.09-0.009-0.136-0.013L23.356,17.485zM15.5,1.249C7.629,1.25,1.25,7.629,1.249,15.5C1.25,23.371,7.629,29.75,15.5,29.751c7.871-0.001,14.25-6.38,14.251-14.251C29.75,7.629,23.371,1.25,15.5,1.249zM3.771,17.093c0.849-0.092,1.833-0.148,2.791-0.156c0.262,0,0.507-0.006,0.717-0.012c0.063,0.213,0.136,0.419,0.219,0.613H7.492c-0.918,0.031-2.047,0.152-3.134,0.335c-0.138,0.023-0.288,0.051-0.441,0.08C3.857,17.67,3.81,17.383,3.771,17.093zM12.196,22.224c-0.1,0.028-0.224,0.07-0.357,0.117c-0.479,0.169-0.665,0.206-1.15,0.206c-0.502,0.015-0.621-0.019-0.921-0.17C9.33,22.171,8.923,21.8,8.651,21.353c-0.453-0.746-1.236-1.275-1.889-1.275c-0.559,0-0.664,0.227-0.261,0.557c0.608,0.496,1.062,0.998,1.248,1.385c0.105,0.215,0.266,0.546,0.358,0.744c0.099,0.206,0.311,0.474,0.511,0.676c0.472,0.441,0.928,0.659,1.608,0.772c0.455,0.06,0.567,0.06,1.105-0.004c0.26-0.03,0.479-0.067,0.675-0.118v0.771c0,1.049-0.008,1.628-0.031,1.945c-1.852-0.576-3.507-1.595-4.848-2.934c-1.576-1.578-2.706-3.592-3.195-5.848c0.952-0.176,2.073-0.32,3.373-0.43l0.208-0.018c0.398,0.925,1.011,1.631,1.876,2.179c0.53,0.337,1.38,0.685,1.808,0.733c0.118,0.02,0.46,0.09,0.76,0.16c0.302,0.066,0.89,0.172,1.309,0.236h0.009c-0.007,0.018-0.014,0.02-0.022,0.02C12.747,21.169,12.418,21.579,12.196,22.224zM13.732,27.207c-0.168-0.025-0.335-0.056-0.5-0.087c0.024-0.286,0.038-0.785,0.054-1.723c0.028-1.767,0.041-1.94,0.156-2.189c0.069-0.15,0.17-0.32,0.226-0.357c0.095-0.078,0.101,0.076,0.101,2.188C13.769,26.143,13.763,26.786,13.732,27.207zM15.5,27.339c-0.148,0-0.296-0.006-0.443-0.012c0.086-0.562,0.104-1.428,0.106-2.871l0.003-1.82l0.197,0.019l0.199,0.02l0.032,2.365c0.017,1.21,0.027,1.878,0.075,2.296C15.613,27.335,15.558,27.339,15.5,27.339zM17.006,27.24c-0.039-0.485-0.037-1.243-0.027-2.553c0.019-1.866,0.019-1.866,0.131-1.769c0.246,0.246,0.305,0.623,0.305,2.373c0,0.928,0.011,1.497,0.082,1.876C17.334,27.196,17.17,27.22,17.006,27.24zM27.089,17.927c-0.155-0.029-0.307-0.057-0.446-0.08c-0.96-0.162-1.953-0.275-2.804-0.32c1.25,0.108,2.327,0.248,3.246,0.418c-0.479,2.289-1.618,4.33-3.214,5.928c-1.402,1.4-3.15,2.448-5.106,3.008c-0.034-0.335-0.058-1.048-0.066-2.212c-0.03-2.167-0.039-2.263-0.17-2.602c-0.181-0.458-0.47-0.811-0.811-1.055c-0.094-0.057-0.181-0.103-0.301-0.14c0.145-0.02,0.282-0.021,0.427-0.057c1.418-0.188,2.168-0.357,2.772-0.584c1.263-0.492,2.129-1.301,2.606-2.468c0.044-0.103,0.088-0.2,0.123-0.279l0.011,0.001c0.032-0.07,0.057-0.118,0.064-0.125c0.02-0.017,0.036-0.085,0.038-0.151c0-0.037,0.017-0.157,0.041-0.317c0.249,0.01,0.58,0.018,0.938,0.02c0.959,0.008,1.945,0.064,2.794,0.156C27.194,17.356,27.148,17.644,27.089,17.927zM25.823,16.87c-0.697-0.049-1.715-0.064-2.311-0.057c0.02-0.103,0.037-0.218,0.059-0.336c0.083-0.454,0.111-0.912,0.113-1.823c0.002-1.413-0.074-1.801-0.534-2.735c-0.188-0.381-0.399-0.705-0.655-0.998c0.225-0.659,0.207-1.68-0.02-2.575c-0.19-0.734-0.258-0.781-0.924-0.64c-0.563,0.12-1.016,0.283-1.598,0.576c-0.274,0.138-0.652,0.354-0.923,0.522c-0.715-0.251-1.451-0.419-2.242-0.508c-0.799-0.092-2.759-0.04-3.454,0.089c-0.681,0.126-1.293,0.28-1.848,0.462c-0.276-0.171-0.678-0.4-0.964-0.547C9.944,8.008,9.491,7.846,8.925,7.727c-0.664-0.144-0.732-0.095-0.922,0.64c-0.235,0.907-0.237,1.945-0.004,2.603c0.026,0.075,0.043,0.129,0.05,0.17c-0.942,1.187-1.25,2.515-1.046,4.367c0.053,0.482,0.136,0.926,0.251,1.333c-0.602-0.004-1.457,0.018-2.074,0.057c-0.454,0.031-0.957,0.076-1.418,0.129c-0.063-0.5-0.101-1.008-0.101-1.524c0-3.273,1.323-6.225,3.468-8.372c2.146-2.144,5.099-3.467,8.371-3.467c3.273,0,6.226,1.323,8.371,3.467c2.145,2.147,3.468,5.099,3.468,8.372c0,0.508-0.036,1.008-0.098,1.499C26.78,16.946,26.276,16.899,25.823,16.87z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Glasses();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Glasses = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Glasses.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Glasses\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.075,9.531c0,0-2.705-1.438-5.158-1.438c-2.453,0-4.862,0.593-4.862,0.593L3.971,9.869c0,0,0.19,0.19,0.528,0.53c0.338,0.336,0.486,3.741,1.838,5.094c1.353,1.354,4.82,1.396,5.963,0.676c1.14-0.718,2.241-3.466,2.241-4.693c0-0.38,0-0.676,0-0.676c0.274-0.275,1.615-0.303,1.917,0c0,0,0,0.296,0,0.676c0,1.227,1.101,3.975,2.241,4.693c1.144,0.72,4.611,0.678,5.963-0.676c1.355-1.353,1.501-4.757,1.839-5.094c0.338-0.34,0.528-0.53,0.528-0.53l-0.084-1.183c0,0-2.408-0.593-4.862-0.593c-2.453,0-5.158,1.438-5.158,1.438C16.319,9.292,14.737,9.32,14.075,9.531z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Globe();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Globe = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Globe.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Globe\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM19.158,23.269c-0.079,0.064-0.183,0.13-0.105,0.207c0.078,0.078-0.09,0.131-0.09,0.17s0.104,0.246,0.052,0.336c-0.052,0.092-0.091,0.223-0.13,0.301c-0.039,0.077-0.131,0.155-0.104,0.272c0.025,0.116-0.104,0.077-0.104,0.194c0,0.116,0.116,0.065,0.09,0.208c-0.025,0.144-0.09,0.183-0.09,0.285c0,0.104,0.064,0.247,0.064,0.286s-0.064,0.17-0.155,0.272c-0.092,0.104-0.155,0.17-0.144,0.233c0.014,0.065,0.104,0.144,0.091,0.184c-0.013,0.037-0.129,0.168-0.116,0.259c0.014,0.09,0.129,0.053,0.155,0.116c0.026,0.065-0.155,0.118-0.078,0.183c0.078,0.064,0.183,0.051,0.156,0.208c-0.019,0.112,0.064,0.163,0.126,0.198c-0.891,0.221-1.818,0.352-2.777,0.352C9.639,27.533,4.466,22.36,4.466,16c0-2.073,0.557-4.015,1.518-5.697c0.079-0.042,0.137-0.069,0.171-0.062c0.065,0.013,0.079,0.104,0.183,0.13c0.104,0.026,0.195-0.078,0.26-0.117c0.064-0.039,0.116-0.195,0.051-0.182c-0.065,0.013-0.234,0-0.234,0s0.183-0.104,0.183-0.169s0.025-0.169,0.129-0.208C6.83,9.655,6.83,9.681,6.765,9.837C6.7,9.993,6.896,9.928,6.973,9.863s0.13-0.013,0.272-0.104c0.143-0.091,0.143-0.143,0.221-0.143c0.078,0,0.221,0.143,0.299,0.091c0.077-0.052,0.299,0.065,0.429,0.065c0.129,0,0.545,0.169,0.624,0.169c0.078,0,0.312,0.09,0.325,0.259c0.013,0.169,0.09,0.156,0.168,0.156s0.26,0.065,0.26,0.13c0,0.065-0.052,0.325,0.078,0.39c0.129,0.064,0.247,0.169,0.299,0.143c0.052-0.026,0-0.233-0.064-0.26c-0.065-0.026-0.027-0.117-0.052-0.169c-0.026-0.051,0.078-0.051,0.117,0.039c0.039,0.091,0.143,0.26,0.208,0.26c0.064,0,0.208,0.156,0.168,0.247c-0.039,0.091,0.039,0.221,0.156,0.221c0.116,0,0.26,0.182,0.312,0.195c0.052,0.013,0.117,0.078,0.117,0.117c0,0.04,0.065,0.26,0.065,0.351c0,0.09-0.04,0.454-0.053,0.597s0.104,0.39,0.234,0.52c0.129,0.13,0.246,0.377,0.324,0.429c0.079,0.052,0.13,0.195,0.247,0.182c0.117-0.013,0.195,0.078,0.299,0.26c0.104,0.182,0.208,0.48,0.286,0.506c0.078,0.026,0.208,0.117,0.142,0.182c-0.064,0.064-0.168,0.208-0.051,0.208c0.117,0,0.156-0.065,0.247,0.053c0.09,0.116,0.208,0.181,0.194,0.26c-0.013,0.077,0.104,0.103,0.156,0.116c0.052,0.013,0.169,0.247,0.286,0.143c0.117-0.104-0.155-0.259-0.234-0.326c-0.078-0.064,0-0.207-0.182-0.35c-0.182-0.143-0.156-0.247-0.286-0.351c-0.13-0.104-0.233-0.195-0.104-0.286c0.13-0.091,0.143,0.091,0.195,0.208c0.052,0.116,0.324,0.351,0.441,0.454c0.117,0.104,0.326,0.468,0.39,0.468s0.247,0.208,0.247,0.208s0.103,0.168,0.064,0.22c-0.039,0.052,0.053,0.247,0.144,0.299c0.09,0.052,0.455,0.22,0.507,0.247c0.052,0.027,0.155,0.221,0.299,0.221c0.142,0,0.247,0.014,0.286,0.053c0.039,0.038,0.155,0.194,0.234,0.104c0.078-0.092,0.09-0.131,0.208-0.131c0.117,0,0.168,0.091,0.233,0.156c0.065,0.065,0.247,0.235,0.338,0.222c0.091-0.013,0.208,0.104,0.273,0.064s0.169,0.025,0.22,0.052c0.054,0.026,0.234,0.118,0.222,0.272c-0.013,0.157,0.103,0.195,0.182,0.234c0.078,0.039,0.182,0.13,0.248,0.195c0.064,0.063,0.206,0.077,0.246,0.116c0.039,0.039,0.065,0.117,0.182,0.052c0.116-0.064,0.092-0.181,0.092-0.181s0.129-0.026,0.194,0.026c0.064,0.05,0.104,0.22,0.144,0.246c0.038,0.026,0.115,0.221,0.063,0.362c-0.051,0.145-0.038,0.286-0.091,0.286c-0.052,0-0.116,0.17-0.195,0.209c-0.076,0.039-0.285,0.221-0.272,0.286c0.013,0.063,0.131,0.258,0.104,0.35c-0.025,0.091-0.194,0.195-0.154,0.338c0.038,0.144,0.312,0.183,0.323,0.312c0.014,0.131,0.209,0.417,0.235,0.546c0.025,0.13,0.246,0.272,0.246,0.453c0,0.184,0.312,0.3,0.377,0.312c0.063,0.013,0.182,0.131,0.272,0.17s0.169,0.116,0.233,0.221s0.053,0.261,0.053,0.299c0,0.039-0.039,0.44-0.078,0.674C19.145,23.021,19.235,23.203,19.158,23.269zM10.766,11.188c0.039,0.013,0.117,0.091,0.156,0.091c0.04,0,0.234,0.156,0.286,0.208c0.053,0.052,0.053,0.195-0.013,0.208s-0.104-0.143-0.117-0.208c-0.013-0.065-0.143-0.065-0.208-0.104C10.805,11.344,10.66,11.152,10.766,11.188zM27.51,16.41c-0.144,0.182-0.13,0.272-0.195,0.286c-0.064,0.013,0.065,0.065,0.09,0.194c0.022,0.112-0.065,0.224,0.063,0.327c-0.486,4.619-3.71,8.434-8.016,9.787c-0.007-0.011-0.019-0.025-0.021-0.034c-0.027-0.078-0.027-0.233,0.064-0.285c0.091-0.053,0.312-0.233,0.363-0.272c0.052-0.04,0.13-0.221,0.091-0.247c-0.038-0.026-0.232,0-0.26-0.039c-0.026-0.039-0.026-0.092,0.104-0.182c0.13-0.091,0.195-0.222,0.247-0.26c0.052-0.039,0.155-0.117,0.195-0.209c0.038-0.09-0.041-0.039-0.118-0.039s-0.117-0.142-0.117-0.207s0.195,0.026,0.339,0.052c0.143,0.024,0.077-0.065,0.064-0.142c-0.013-0.078,0.026-0.209,0.105-0.17c0.076,0.039,0.479-0.013,0.531-0.026c0.052-0.013,0.194-0.246,0.246-0.312c0.053-0.065,0.064-0.129,0-0.168c-0.065-0.04-0.143-0.184-0.168-0.221c-0.026-0.041-0.039-0.274-0.013-0.34c0.025-0.063,0,0.377,0.181,0.43c0.183,0.052,0.286,0.078,0.455-0.078c0.169-0.155,0.298-0.26,0.312-0.363c0.013-0.104,0.052-0.209,0.117-0.246c0.065-0.039,0.104,0.103,0.182-0.065c0.078-0.17,0.156-0.157,0.234-0.299c0.077-0.144-0.13-0.325,0.024-0.43c0.157-0.103,0.43-0.233,0.43-0.233s0.078-0.039,0.234-0.078c0.155-0.038,0.324-0.014,0.376-0.09c0.052-0.079,0.104-0.247,0.182-0.338c0.079-0.092,0.169-0.234,0.13-0.299c-0.039-0.065,0.104-0.352,0.091-0.429c-0.013-0.078-0.13-0.261,0.065-0.416s0.402-0.391,0.416-0.454c0.012-0.065,0.169-0.338,0.154-0.469c-0.012-0.129-0.154-0.285-0.245-0.325c-0.092-0.037-0.286-0.05-0.364-0.154s-0.299-0.208-0.377-0.182c-0.077,0.026-0.208,0.051-0.312-0.015c-0.104-0.063-0.272-0.143-0.337-0.194c-0.066-0.051-0.234-0.09-0.312-0.09s-0.065-0.053-0.182,0.103c-0.117,0.157,0,0.209-0.208,0.182c-0.209-0.024,0.025-0.038,0.144-0.194c0.115-0.155-0.014-0.247-0.144-0.207c-0.13,0.039-0.039,0.117-0.247,0.156c-0.207,0.038-0.207-0.092-0.077-0.117c0.13-0.026,0.363-0.143,0.363-0.194c0-0.053-0.026-0.196-0.13-0.196s-0.078-0.129-0.233-0.297c-0.156-0.17-0.351-0.274-0.508-0.249c-0.154,0.026-0.272,0.065-0.35-0.076c-0.078-0.144-0.169-0.17-0.222-0.247c-0.051-0.078-0.182,0-0.221-0.039s-0.039-0.039-0.039-0.039s-0.169,0.039-0.077-0.078c0.09-0.117,0.129-0.338,0.09-0.325c-0.038,0.013-0.104,0.196-0.168,0.183c-0.064-0.013-0.014-0.04-0.144-0.117c-0.13-0.078-0.337-0.013-0.337,0.052c0,0.065-0.065,0.117-0.065,0.117s-0.039-0.038-0.078-0.117c-0.039-0.078-0.221-0.091-0.312-0.013c-0.09,0.078-0.142-0.196-0.207-0.196s-0.194,0.065-0.26,0.184c-0.064,0.116-0.038,0.285-0.092,0.272c-0.05-0.013-0.063-0.233-0.05-0.312c0.012-0.079,0.155-0.208,0.05-0.234c-0.103-0.026-0.259,0.13-0.323,0.143c-0.065,0.013-0.195,0.104-0.273,0.209c-0.077,0.103-0.116,0.168-0.195,0.207c-0.077,0.039-0.193,0-0.167-0.039c0.025-0.039-0.222-0.181-0.261-0.13c-0.04,0.052-0.155,0.091-0.272,0.144c-0.117,0.052-0.222-0.065-0.247-0.117s-0.079-0.064-0.091-0.234c-0.013-0.168,0.027-0.351,0.065-0.454c0.038-0.104-0.195-0.312-0.286-0.3c-0.091,0.015-0.182,0.105-0.272,0.091c-0.092-0.012-0.052-0.038-0.195-0.038c-0.143,0-0.026-0.025,0-0.143c0.025-0.116-0.052-0.273,0.092-0.377c0.142-0.104,0.091-0.351,0-0.363c-0.092-0.014-0.261,0.039-0.377,0.026c-0.116-0.014-0.208,0.091-0.169,0.207c0.039,0.117-0.065,0.195-0.104,0.183c-0.039-0.013-0.09-0.078-0.234,0.026c-0.142,0.103-0.194,0.064-0.337-0.052c-0.143-0.118-0.299-0.234-0.325-0.416c-0.026-0.182-0.04-0.364,0.013-0.468c0.051-0.104,0.051-0.285-0.026-0.312c-0.078-0.025,0.09-0.155,0.181-0.181c0.092-0.026,0.234-0.143,0.26-0.195c0.026-0.052,0.156-0.04,0.298-0.04c0.143,0,0.169,0,0.312,0.078c0.143,0.078,0.169-0.039,0.169-0.078c0-0.039,0.052-0.117,0.208-0.104c0.156,0.013,0.376-0.052,0.416-0.013s0.116,0.195,0.194,0.143c0.079-0.051,0.104-0.143,0.131,0.014c0.025,0.155,0.09,0.39,0.208,0.429c0.116,0.039,0.052,0.194,0.168,0.207c0.115,0.013,0.17-0.246,0.131-0.337c-0.04-0.09-0.118-0.363-0.183-0.428c-0.064-0.065-0.064-0.234,0.064-0.286c0.13-0.052,0.442-0.312,0.532-0.389c0.092-0.079,0.338-0.144,0.261-0.248c-0.078-0.104-0.104-0.168-0.104-0.247s0.078-0.052,0.117,0s0.194-0.078,0.155-0.143c-0.038-0.064-0.026-0.155,0.065-0.143c0.091,0.013,0.116-0.065,0.078-0.117c-0.039-0.052,0.091-0.117,0.182-0.091c0.092,0.026,0.325-0.013,0.364-0.065c0.038-0.052-0.078-0.104-0.078-0.208c0-0.104,0.155-0.195,0.247-0.208c0.091-0.013,0.207,0,0.221-0.039c0.012-0.039,0.143-0.143,0.155-0.052c0.014,0.091,0,0.247,0.104,0.247c0.104,0,0.232-0.117,0.272-0.129c0.038-0.013,0.286-0.065,0.338-0.078c0.052-0.013,0.363-0.039,0.325-0.13c-0.039-0.09-0.078-0.181-0.118-0.22c-0.039-0.039-0.077,0.013-0.13,0.078c-0.051,0.065-0.143,0.065-0.168,0.013c-0.026-0.051,0.012-0.207-0.078-0.156c-0.092,0.052-0.104,0.104-0.157,0.078c-0.052-0.026-0.103-0.117-0.103-0.117s0.129-0.064,0.038-0.182c-0.09-0.117-0.221-0.091-0.35-0.025c-0.13,0.064-0.118,0.051-0.273,0.09s-0.234,0.078-0.234,0.078s0.209-0.129,0.299-0.208c0.091-0.078,0.209-0.117,0.286-0.195c0.078-0.078,0.285,0.039,0.285,0.039s0.105-0.104,0.105-0.039s-0.027,0.234,0.051,0.234c0.079,0,0.299-0.104,0.21-0.131c-0.093-0.026,0.129,0,0.219-0.065c0.092-0.065,0.194-0.065,0.247-0.09c0.052-0.026,0.092-0.143,0.182-0.143c0.092,0,0.13,0.117,0,0.195s-0.143,0.273-0.208,0.325c-0.064,0.052-0.026,0.117,0.078,0.104c0.104-0.013,0.194,0.013,0.286-0.013s0.143,0.026,0.168,0.065c0.026,0.039,0.104-0.039,0.104-0.039s0.169-0.039,0.221,0.026c0.053,0.064,0.092-0.039,0.053-0.104c-0.039-0.064-0.092-0.129-0.13-0.208c-0.039-0.078-0.091-0.104-0.194-0.078c-0.104,0.026-0.13-0.026-0.195-0.064c-0.065-0.04-0.118,0.052-0.065-0.04c0.053-0.09,0.078-0.117,0.117-0.195c0.039-0.078,0.209-0.221,0.039-0.259c-0.169-0.04-0.222-0.065-0.247-0.143c-0.026-0.078-0.221-0.221-0.272-0.221c-0.053,0-0.233,0-0.247-0.065c-0.013-0.065-0.143-0.208-0.208-0.273c-0.064-0.065-0.312-0.351-0.351-0.377c-0.039-0.026-0.091-0.013-0.208,0.143c-0.116,0.157-0.22,0.183-0.312,0.144c-0.091-0.039-0.104-0.026-0.193-0.13c-0.093-0.104,0.09-0.117,0.051-0.182c-0.04-0.064-0.247-0.091-0.377-0.104c-0.13-0.013-0.221-0.156-0.416-0.169c-0.194-0.013-0.428,0.026-0.493,0.026c-0.064,0-0.064,0.091-0.09,0.234c-0.027,0.143,0.09,0.182-0.027,0.208c-0.116,0.026-0.169,0.039-0.052,0.091c0.117,0.052,0.273,0.26,0.273,0.26s0,0.117-0.092,0.182c-0.09,0.065-0.182,0.13-0.233,0.053c-0.053-0.079-0.195-0.065-0.155,0.013c0.038,0.078,0.116,0.117,0.116,0.195c0,0.077,0.117,0.272,0.039,0.337c-0.078,0.065-0.168,0.014-0.233,0.026s-0.131-0.104-0.078-0.13c0.051-0.026-0.014-0.221-0.014-0.221s-0.155,0.221-0.143,0.104c0.014-0.117-0.064-0.13-0.064-0.221c0-0.091-0.079-0.13-0.194-0.104c-0.118,0.026-0.26-0.04-0.482-0.079c-0.22-0.039-0.311-0.064-0.493-0.156c-0.182-0.091-0.247-0.026-0.338-0.013c-0.091,0.013-0.052-0.182-0.169-0.207c-0.116-0.027-0.181,0.025-0.207-0.144c-0.026-0.168,0.039-0.208,0.324-0.39c0.286-0.182,0.247-0.26,0.468-0.286c0.22-0.026,0.325,0.026,0.325-0.039s0.052-0.325,0.052-0.195S16.95,9.109,16.832,9.2c-0.116,0.091-0.052,0.104,0.04,0.104c0.091,0,0.259-0.091,0.259-0.091s0.208-0.091,0.26-0.013c0.053,0.078,0.053,0.156,0.144,0.156s0.285-0.104,0.116-0.195c-0.168-0.091-0.272-0.078-0.376-0.182s-0.078-0.065-0.195-0.039c-0.116,0.026-0.116-0.039-0.156-0.039s-0.104,0.026-0.13-0.026c-0.025-0.052,0.014-0.065,0.145-0.065c0.129,0,0.285,0.039,0.285,0.039s0.155-0.052,0.194-0.065c0.039-0.013,0.247-0.039,0.208-0.155c-0.04-0.117-0.169-0.117-0.208-0.156s0.078-0.09,0.143-0.117c0.065-0.026,0.247,0,0.247,0s0.117,0.013,0.117-0.039S17.897,8.2,17.976,8.239s0,0.156,0.117,0.13c0.116-0.026,0.143,0,0.207,0.039c0.065,0.039-0.013,0.195-0.077,0.221c-0.065,0.025-0.169,0.077-0.026,0.09c0.144,0.014,0.246,0.014,0.246,0.014s0.092-0.091,0.131-0.169c0.038-0.078,0.104-0.026,0.155,0c0.052,0.025,0.247,0.065,0.065,0.117c-0.183,0.052-0.221,0.117-0.26,0.182c-0.038,0.065-0.053,0.104-0.221,0.065c-0.17-0.039-0.26-0.026-0.299,0.039c-0.039,0.064-0.013,0.273,0.053,0.247c0.063-0.026,0.129-0.026,0.207-0.052c0.078-0.026,0.39,0.026,0.467,0.013c0.078-0.013,0.209,0.13,0.248,0.104c0.039-0.026,0.117,0.052,0.194,0.104c0.078,0.052,0.052-0.117,0.194-0.013c0.144,0.104,0.065,0.104,0.144,0.104c0.076,0,0.246,0.013,0.246,0.013s0.014-0.129,0.144-0.104c0.13,0.026,0.245,0.169,0.232,0.064c-0.012-0.103,0.013-0.181-0.09-0.259c-0.104-0.078-0.272-0.13-0.299-0.169c-0.026-0.039-0.052-0.091-0.013-0.117c0.039-0.025,0.221,0.013,0.324,0.079c0.104,0.065,0.195,0.13,0.273,0.078c0.077-0.052,0.17-0.078,0.208-0.117c0.038-0.04,0.13-0.156,0.13-0.156s-0.391-0.051-0.441-0.117c-0.053-0.065-0.235-0.156-0.287-0.156s-0.194,0.091-0.246-0.039s-0.052-0.286-0.105-0.299c-0.05-0.013-0.597-0.091-0.674-0.13c-0.078-0.039-0.39-0.13-0.507-0.195s-0.286-0.156-0.389-0.156c-0.104,0-0.533,0.052-0.611,0.039c-0.078-0.013-0.312,0.026-0.403,0.039c-0.091,0.013,0.117,0.182-0.077,0.221c-0.195,0.039-0.169,0.065-0.13-0.13c0.038-0.195-0.131-0.247-0.299-0.169c-0.169,0.078-0.442,0.13-0.377,0.221c0.065,0.091-0.012,0.157,0.117,0.247c0.13,0.091,0.183,0.117,0.35,0.104c0.17-0.013,0.339,0.025,0.339,0.025s0,0.157-0.064,0.182c-0.065,0.026-0.169,0.026-0.196,0.104c-0.025,0.078-0.155,0.117-0.155,0.078s0.065-0.169-0.026-0.234c-0.09-0.065-0.117-0.078-0.221-0.013c-0.104,0.065-0.116,0.091-0.169-0.013C16.053,8.291,15.897,8.2,15.897,8.2s-0.104-0.129-0.182-0.194c-0.077-0.065-0.22-0.052-0.234,0.013c-0.013,0.064,0.026,0.129,0.078,0.247c0.052,0.117,0.104,0.337,0.013,0.351c-0.091,0.013-0.104,0.026-0.195,0.052c-0.091,0.026-0.13-0.039-0.13-0.143s-0.04-0.195-0.013-0.234c0.026-0.039-0.104,0.027-0.234,0c-0.13-0.025-0.233,0.052-0.104,0.092c0.13,0.039,0.157,0.194,0.039,0.233c-0.117,0.039-0.559,0-0.702,0s-0.35,0.039-0.39-0.039c-0.039-0.078,0.118-0.129,0.208-0.129c0.091,0,0.363,0.012,0.467-0.13c0.104-0.143-0.13-0.169-0.233-0.169c-0.104,0-0.183-0.039-0.299-0.155c-0.118-0.117,0.078-0.195,0.052-0.247c-0.026-0.052-0.156-0.014-0.272-0.014c-0.117,0-0.299-0.09-0.299,0.014c0,0.104,0.143,0.402,0.052,0.337c-0.091-0.064-0.078-0.156-0.143-0.234c-0.065-0.078-0.168-0.065-0.299-0.052c-0.129,0.013-0.35,0.052-0.415,0.039c-0.064-0.013-0.013-0.013-0.156-0.078c-0.142-0.065-0.208-0.052-0.312-0.117C12.091,7.576,12.182,7.551,12,7.538c-0.181-0.013-0.168,0.09-0.35,0.065c-0.182-0.026-0.234,0.013-0.416,0c-0.182-0.013-0.272-0.026-0.299,0.065c-0.025,0.091-0.078,0.247-0.156,0.247c-0.077,0-0.169,0.091,0.078,0.104c0.247,0.013,0.105,0.129,0.325,0.117c0.221-0.013,0.416-0.013,0.468-0.117c0.052-0.104,0.091-0.104,0.117-0.065c0.025,0.039,0.22,0.272,0.22,0.272s0.131,0.104,0.183,0.13c0.051,0.026-0.052,0.143-0.156,0.078c-0.104-0.065-0.299-0.051-0.377-0.116c-0.078-0.065-0.429-0.065-0.52-0.052c-0.09,0.013-0.247-0.039-0.299-0.039c-0.051,0-0.221,0.13-0.221,0.13S10.532,8.252,10.494,8.2c-0.039-0.052-0.104,0.052-0.156,0.065c-0.052,0.013-0.208-0.104-0.364-0.052C9.818,8.265,9.87,8.317,9.649,8.304s-0.272-0.052-0.35-0.039C9.22,8.278,9.22,8.278,9.22,8.278S9.233,8.33,9.143,8.382C9.052,8.434,8.986,8.499,8.921,8.421C8.857,8.343,8.818,8.343,8.779,8.33c-0.04-0.013-0.118-0.078-0.286-0.04C8.324,8.33,8.064,8.239,8.013,8.239c-0.04,0-0.313-0.015-0.491-0.033c2.109-2.292,5.124-3.74,8.478-3.74c2.128,0,4.117,0.589,5.83,1.598c-0.117,0.072-0.319,0.06-0.388,0.023c-0.078-0.043-0.158-0.078-0.475-0.061c-0.317,0.018-0.665,0.122-0.595,0.226c0.072,0.104-0.142,0.165-0.197,0.113c-0.055-0.052-0.309,0.06-0.293,0.165c0.016,0.104-0.039,0.225-0.175,0.199c-0.134-0.027-0.229,0.06-0.237,0.146c-0.007,0.087-0.309,0.147-0.332,0.147c-0.024,0-0.412-0.008-0.27,0.095c0.097,0.069,0.15,0.027,0.27,0.052c0.119,0.026,0.214,0.217,0.277,0.243c0.062,0.026,0.15,0,0.189-0.052c0.04-0.052,0.095-0.234,0.095-0.234s0,0.173,0.097,0.208c0.095,0.035,0.331-0.026,0.395-0.017c0.064,0.008,0.437,0.061,0.538,0.112c0.104,0.052,0.356,0.087,0.428,0.199c0.071,0.113,0.08,0.503,0.119,0.546c0.04,0.043,0.174-0.139,0.205-0.182c0.031-0.044,0.198-0.018,0.254,0.042c0.056,0.061,0.182,0.208,0.175,0.269C21.9,8.365,21.877,8.459,21.83,8.425c-0.048-0.034-0.127-0.025-0.096-0.095c0.032-0.069,0.048-0.217-0.015-0.217c-0.064,0-0.119,0-0.119,0s-0.12-0.035-0.199,0.095s-0.015,0.26,0.04,0.26s0.184,0,0.184,0.034c0,0.035-0.136,0.139-0.128,0.2c0.009,0.061,0.11,0.268,0.144,0.312c0.031,0.043,0.197,0.086,0.244,0.096c0.049,0.008-0.111,0.017-0.07,0.077c0.04,0.061,0.102,0.208,0.189,0.243c0.087,0.035,0.333,0.19,0.363,0.26c0.032,0.069,0.222-0.052,0.262-0.061c0.04-0.008,0.032,0.182,0.143,0.191c0.11,0.008,0.15-0.018,0.245-0.096s0.072-0.182,0.079-0.26c0.009-0.078,0-0.138,0.104-0.113c0.104,0.026,0.158-0.018,0.15-0.104c-0.008-0.087-0.095-0.191,0.07-0.217c0.167-0.026,0.254-0.138,0.357-0.138c0.103,0,0.389,0.043,0.419,0c0.032-0.043,0.167-0.243,0.254-0.251c0.067-0.007,0.224-0.021,0.385-0.042c1.582,1.885,2.561,4.284,2.673,6.905c-0.118,0.159-0.012,0.305,0.021,0.408c0.001,0.03,0.005,0.058,0.005,0.088c0,0.136-0.016,0.269-0.021,0.404C27.512,16.406,27.512,16.408,27.51,16.41zM17.794,12.084c-0.064,0.013-0.169-0.052-0.169-0.143s-0.091,0.169-0.04,0.247c0.053,0.078-0.104,0.169-0.155,0.169s-0.091-0.116-0.078-0.233c0.014-0.117-0.077-0.221-0.221-0.208c-0.143,0.014-0.208,0.13-0.259,0.169c-0.053,0.039-0.053,0.259-0.04,0.312s0.013,0.235-0.116,0.221c-0.118-0.013-0.092-0.233-0.079-0.312c0.014-0.078-0.039-0.273,0.014-0.376c0.053-0.104,0.207-0.143,0.312-0.156s0.324,0.065,0.363,0.052c0.04-0.014,0.222-0.014,0.312,0C17.729,11.837,17.858,12.071,17.794,12.084zM18.027,12.123c0.04,0.026,0.311-0.039,0.364,0.026c0.051,0.065-0.054,0.078-0.183,0.13c-0.129,0.052-0.169,0.039-0.221,0.104s-0.221,0.09-0.299,0.168c-0.078,0.079-0.217,0.125-0.246,0.065c-0.04-0.078,0.013-0.039,0.025-0.078c0.013-0.039,0.245-0.129,0.245-0.129S17.988,12.097,18.027,12.123zM16.988,11.668c-0.038,0.013-0.182-0.026-0.3-0.026c-0.116,0-0.091-0.078-0.143-0.064c-0.051,0.013-0.168,0.039-0.247,0.078c-0.078,0.039-0.208,0.03-0.208-0.04c0-0.104,0.052-0.078,0.221-0.143c0.169-0.065,0.352-0.247,0.429-0.169c0.078,0.078,0.221,0.169,0.312,0.182C17.144,11.5,17.026,11.655,16.988,11.668zM15.659,7.637c-0.079,0.026-0.347,0.139-0.321,0.199c0.01,0.023,0.078,0.069,0.19,0.052c0.113-0.018,0.276-0.035,0.355-0.043c0.078-0.009,0.095-0.139,0.009-0.147C15.805,7.689,15.736,7.611,15.659,7.637zM14.698,7.741c-0.061,0.026-0.243-0.043-0.338,0.018c-0.061,0.038-0.026,0.164,0.07,0.172c0.095,0.009,0.259-0.06,0.276-0.008c0.018,0.052,0.078,0.286,0.234,0.208c0.156-0.078,0.147-0.147,0.19-0.156c0.043-0.009-0.008-0.199-0.078-0.243C14.983,7.689,14.758,7.715,14.698,7.741zM14.385,7.005c0.017,0.044-0.008,0.078,0.113,0.095c0.121,0.018,0.173,0.035,0.243,0.035c0.069,0,0.042-0.113-0.018-0.19c-0.061-0.078-0.043-0.069-0.199-0.113c-0.156-0.043-0.312-0.043-0.416-0.035c-0.104,0.009-0.217-0.017-0.243,0.104c-0.013,0.062,0.07,0.112,0.174,0.112S14.368,6.962,14.385,7.005zM14.611,7.481c0.043,0.095,0.043,0.051,0.165,0.061C14.896,7.551,14.991,7.421,15,7.378c0.009-0.044-0.061-0.13-0.225-0.113c-0.165,0.017-0.667-0.026-0.736,0.034c-0.066,0.058,0,0.233-0.026,0.251c-0.026,0.017,0.009,0.095,0.077,0.078c0.069-0.017,0.104-0.182,0.157-0.182C14.299,7.447,14.568,7.386,14.611,7.481zM12.982,7.126c0.052,0.043,0.183,0.008,0.173-0.035c-0.008-0.043,0.053-0.217-0.051-0.225C13,6.858,12.854,6.962,12.697,7.014c-0.101,0.033-0.078,0.13-0.009,0.13S12.931,7.083,12.982,7.126zM13.72,7.282c-0.087,0.043-0.114,0.069-0.191,0.052c-0.078-0.017-0.078-0.156-0.217-0.13c-0.138,0.026-0.164,0.104-0.207,0.139s-0.139,0.061-0.173,0.043c-0.034-0.017-0.234-0.129-0.234-0.129s-0.416-0.018-0.433-0.07c-0.017-0.052-0.086-0.138-0.277-0.121s-0.52,0.13-0.572,0.13c-0.052,0,0.062,0.104-0.009,0.104c-0.069,0-0.155-0.008-0.181,0.069c-0.018,0.053,0.078,0.052,0.189,0.052c0.112,0,0.295,0,0.347-0.026c0.052-0.026,0.312-0.087,0.303-0.009c-0.009,0.079,0.104,0.199,0.164,0.182c0.061-0.017,0.183-0.13,0.243-0.086c0.061,0.043,0.07,0.146,0.13,0.173c0.061,0.025,0.226,0.025,0.304,0c0.077-0.027,0.294-0.027,0.389-0.009c0.095,0.018,0.373,0.069,0.399,0.018c0.026-0.053,0.104-0.061,0.112-0.113s0.051-0.216,0.051-0.216S13.806,7.239,13.72,7.282zM18.105,16.239c-0.119,0.021-0.091,0.252,0.052,0.21C18.3,16.407,18.223,16.217,18.105,16.239zM19.235,15.929c-0.104-0.026-0.221,0-0.299,0.013c-0.078,0.013-0.299,0.208-0.299,0.208s0.143,0.026,0.233,0.026c0.092,0,0.144,0.051,0.221,0.09c0.078,0.04,0.221-0.052,0.272-0.052c0.053,0,0.118,0.156,0.131-0.013C19.508,16.032,19.339,15.955,19.235,15.929zM15.616,7.507c-0.043-0.104-0.259-0.139-0.304-0.035C15.274,7.563,15.659,7.611,15.616,7.507zM18.093,15.292c0.143-0.026,0.064-0.144-0.053-0.13C17.922,15.175,17.949,15.318,18.093,15.292zM19.82,16.095c-0.119,0.022-0.092,0.253,0.051,0.211C20.015,16.264,19.937,16.074,19.82,16.095zM18.247,15.708c-0.09,0.013-0.285-0.09-0.389-0.182c-0.104-0.091-0.299-0.091-0.377-0.091c-0.077,0-0.39,0.091-0.39,0.091c-0.013,0.13,0.117,0.091,0.273,0.091s0.429-0.026,0.479,0.039c0.053,0.064,0.286,0.168,0.352,0.221c0.064,0.052,0.272,0.065,0.285,0.013S18.338,15.695,18.247,15.708zM16.698,7.412c-0.13-0.009-0.295-0.009-0.399,0c-0.104,0.008-0.182-0.069-0.26-0.113c-0.077-0.043-0.251-0.182-0.354-0.199c-0.104-0.017-0.086-0.017-0.303-0.069c-0.11-0.027-0.294-0.061-0.294-0.086c0-0.026-0.052,0.121,0.043,0.165c0.095,0.043,0.251,0.121,0.363,0.164c0.114,0.043,0.329,0.052,0.399,0.139c0.069,0.086,0.303,0.156,0.303,0.156l0.277,0.026c0,0,0.191-0.043,0.39-0.026c0.199,0.017,0.493,0.043,0.659,0.035c0.163-0.008,0.189-0.061,0.208-0.095c0.016-0.035-0.304-0.104-0.383-0.095C17.271,7.42,16.827,7.42,16.698,7.412zM17.182,9.404c-0.034,0.039,0.157,0.095,0.191,0.043C17.407,9.396,17.271,9.309,17.182,9.404zM17.764,9.585c0.086-0.035,0.043-0.139-0.079-0.104C17.547,9.521,17.676,9.62,17.764,9.585z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.GlobeAlt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.GlobeAlt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.GlobeAlt.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.GlobeAlt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM27.436,17.39c0.001,0.002,0.004,0.002,0.005,0.004c-0.022,0.187-0.054,0.37-0.085,0.554c-0.015-0.012-0.034-0.025-0.047-0.036c-0.103-0.09-0.254-0.128-0.318-0.115c-0.157,0.032,0.229,0.305,0.267,0.342c0.009,0.009,0.031,0.03,0.062,0.058c-1.029,5.312-5.709,9.338-11.319,9.338c-4.123,0-7.736-2.18-9.776-5.441c0.123-0.016,0.24-0.016,0.28-0.076c0.051-0.077,0.102-0.241,0.178-0.331c0.077-0.089,0.165-0.229,0.127-0.292c-0.039-0.064,0.101-0.344,0.088-0.419c-0.013-0.076-0.127-0.256,0.064-0.407s0.394-0.382,0.407-0.444c0.012-0.063,0.166-0.331,0.152-0.458c-0.012-0.127-0.152-0.28-0.24-0.318c-0.09-0.037-0.28-0.05-0.356-0.151c-0.077-0.103-0.292-0.203-0.368-0.178c-0.076,0.025-0.204,0.05-0.305-0.015c-0.102-0.062-0.267-0.139-0.33-0.189c-0.065-0.05-0.229-0.088-0.305-0.088c-0.077,0-0.065-0.052-0.178,0.101c-0.114,0.153,0,0.204-0.204,0.177c-0.204-0.023,0.025-0.036,0.141-0.189c0.113-0.152-0.013-0.242-0.141-0.203c-0.126,0.038-0.038,0.115-0.241,0.153c-0.203,0.036-0.203-0.09-0.076-0.115s0.355-0.139,0.355-0.19c0-0.051-0.025-0.191-0.127-0.191s-0.077-0.126-0.229-0.291c-0.092-0.101-0.196-0.164-0.299-0.204c-0.09-0.579-0.15-1.167-0.15-1.771c0-2.844,1.039-5.446,2.751-7.458c0.024-0.02,0.048-0.034,0.069-0.036c0.084-0.009,0.31-0.025,0.51-0.059c0.202-0.034,0.418-0.161,0.489-0.153c0.069,0.008,0.241,0.008,0.186-0.042C8.417,8.2,8.339,8.082,8.223,8.082S8.215,7.896,8.246,7.896c0.03,0,0.186,0.025,0.178,0.11C8.417,8.091,8.471,8.2,8.625,8.167c0.156-0.034,0.132-0.162,0.102-0.195C8.695,7.938,8.672,7.853,8.642,7.794c-0.031-0.06-0.023-0.136,0.14-0.153C8.944,7.625,9.168,7.708,9.16,7.573s0-0.28,0.046-0.356C9.253,7.142,9.354,7.09,9.299,7.065C9.246,7.04,9.176,7.099,9.121,6.972c-0.054-0.127,0.047-0.22,0.108-0.271c0.02-0.015,0.067-0.06,0.124-0.112C11.234,5.257,13.524,4.466,16,4.466c3.213,0,6.122,1.323,8.214,3.45c-0.008,0.022-0.01,0.052-0.031,0.056c-0.077,0.013-0.166,0.063-0.179-0.051c-0.013-0.114-0.013-0.331-0.102-0.203c-0.089,0.127-0.127,0.127-0.127,0.191c0,0.063,0.076,0.127,0.051,0.241C23.8,8.264,23.8,8.341,23.84,8.341c0.036,0,0.126-0.115,0.239-0.141c0.116-0.025,0.319-0.088,0.332,0.026c0.013,0.115,0.139,0.152,0.013,0.203c-0.128,0.051-0.267,0.026-0.293-0.051c-0.025-0.077-0.114-0.077-0.203-0.013c-0.088,0.063-0.279,0.292-0.279,0.292s-0.306,0.139-0.343,0.114c-0.04-0.025,0.101-0.165,0.203-0.228c0.102-0.064,0.178-0.204,0.14-0.242c-0.038-0.038-0.088-0.279-0.063-0.343c0.025-0.063,0.139-0.152,0.013-0.216c-0.127-0.063-0.217-0.14-0.318-0.178s-0.216,0.152-0.305,0.204c-0.089,0.051-0.076,0.114-0.191,0.127c-0.114,0.013-0.189,0.165,0,0.254c0.191,0.089,0.255,0.152,0.204,0.204c-0.051,0.051-0.267-0.025-0.267-0.025s-0.165-0.076-0.268-0.076c-0.101,0-0.229-0.063-0.33-0.076c-0.102-0.013-0.306-0.013-0.355,0.038c-0.051,0.051-0.179,0.203-0.28,0.152c-0.101-0.051-0.101-0.102-0.241-0.051c-0.14,0.051-0.279-0.038-0.355,0.038c-0.077,0.076-0.013,0.076-0.255,0c-0.241-0.076-0.189,0.051-0.419,0.089s-0.368-0.038-0.432,0.038c-0.064,0.077-0.153,0.217-0.19,0.127c-0.038-0.088,0.126-0.241,0.062-0.292c-0.062-0.051-0.33-0.025-0.367,0.013c-0.039,0.038-0.014,0.178,0.011,0.229c0.026,0.05,0.064,0.254-0.011,0.216c-0.077-0.038-0.064-0.166-0.141-0.152c-0.076,0.013-0.165,0.051-0.203,0.077c-0.038,0.025-0.191,0.025-0.229,0.076c-0.037,0.051,0.014,0.191-0.051,0.203c-0.063,0.013-0.114,0.064-0.254-0.025c-0.14-0.089-0.14-0.038-0.178-0.012c-0.038,0.025-0.216,0.127-0.229,0.012c-0.013-0.114,0.025-0.152-0.089-0.229c-0.115-0.076-0.026-0.076,0.127-0.025c0.152,0.05,0.343,0.075,0.622-0.013c0.28-0.089,0.395-0.127,0.28-0.178c-0.115-0.05-0.229-0.101-0.406-0.127c-0.179-0.025-0.42-0.025-0.7-0.127c-0.279-0.102-0.343-0.14-0.457-0.165c-0.115-0.026-0.813-0.14-1.132-0.089c-0.317,0.051-1.193,0.28-1.245,0.318s-0.128,0.19-0.292,0.318c-0.165,0.127-0.47,0.419-0.712,0.47c-0.241,0.051-0.521,0.254-0.521,0.305c0,0.051,0.101,0.242,0.076,0.28c-0.025,0.038,0.05,0.229,0.191,0.28c0.139,0.05,0.381,0.038,0.393-0.039c0.014-0.076,0.204-0.241,0.217-0.127c0.013,0.115,0.14,0.292,0.114,0.368c-0.025,0.077,0,0.153,0.09,0.14c0.088-0.012,0.559-0.114,0.559-0.114s0.153-0.064,0.127-0.166c-0.026-0.101,0.166-0.241,0.203-0.279c0.038-0.038,0.178-0.191,0.014-0.241c-0.167-0.051-0.293-0.064-0.115-0.216s0.292,0,0.521-0.229c0.229-0.229-0.051-0.292,0.191-0.305c0.241-0.013,0.496-0.025,0.444,0.051c-0.05,0.076-0.342,0.242-0.508,0.318c-0.166,0.077-0.14,0.216-0.076,0.292c0.063,0.076,0.09,0.254,0.204,0.229c0.113-0.025,0.254-0.114,0.38-0.101c0.128,0.012,0.383-0.013,0.42-0.013c0.039,0,0.216,0.178,0.114,0.203c-0.101,0.025-0.229,0.013-0.445,0.025c-0.215,0.013-0.456,0.013-0.456,0.051c0,0.039,0.292,0.127,0.19,0.191c-0.102,0.063-0.203-0.013-0.331-0.026c-0.127-0.012-0.203,0.166-0.241,0.267c-0.039,0.102,0.063,0.28-0.127,0.216c-0.191-0.063-0.331-0.063-0.381-0.038c-0.051,0.025-0.203,0.076-0.331,0.114c-0.126,0.038-0.076-0.063-0.242-0.063c-0.164,0-0.164,0-0.164,0l-0.103,0.013c0,0-0.101-0.063-0.114-0.165c-0.013-0.102,0.05-0.216-0.013-0.241c-0.064-0.026-0.292,0.012-0.33,0.088c-0.038,0.076-0.077,0.216-0.026,0.28c0.052,0.063,0.204,0.19,0.064,0.152c-0.14-0.038-0.317-0.051-0.419,0.026c-0.101,0.076-0.279,0.241-0.279,0.241s-0.318,0.025-0.318,0.102c0,0.077,0,0.178-0.114,0.191c-0.115,0.013-0.268,0.05-0.42,0.076c-0.153,0.025-0.139,0.088-0.317,0.102s-0.204,0.089-0.038,0.114c0.165,0.025,0.418,0.127,0.431,0.241c0.014,0.114-0.013,0.242-0.076,0.356c-0.043,0.079-0.305,0.026-0.458,0.026c-0.152,0-0.456-0.051-0.584,0c-0.127,0.051-0.102,0.305-0.064,0.419c0.039,0.114-0.012,0.178-0.063,0.216c-0.051,0.038-0.065,0.152,0,0.204c0.063,0.051,0.114,0.165,0.166,0.178c0.051,0.013,0.215-0.038,0.279,0.025c0.064,0.064,0.127,0.216,0.165,0.178c0.039-0.038,0.089-0.203,0.153-0.166c0.064,0.039,0.216-0.012,0.331-0.025s0.177-0.14,0.292-0.204c0.114-0.063,0.05-0.063,0.013-0.14c-0.038-0.076,0.114-0.165,0.204-0.254c0.088-0.089,0.253-0.013,0.292-0.115c0.038-0.102,0.051-0.279,0.151-0.267c0.103,0.013,0.243,0.076,0.331,0.076c0.089,0,0.279-0.14,0.332-0.165c0.05-0.025,0.241-0.013,0.267,0.102c0.025,0.114,0.241,0.254,0.292,0.279c0.051,0.025,0.381,0.127,0.433,0.165c0.05,0.038,0.126,0.153,0.152,0.254c0.025,0.102,0.114,0.102,0.128,0.013c0.012-0.089-0.065-0.254,0.025-0.242c0.088,0.013,0.191-0.026,0.191-0.026s-0.243-0.165-0.331-0.203c-0.088-0.038-0.255-0.114-0.331-0.241c-0.076-0.127-0.267-0.153-0.254-0.279c0.013-0.127,0.191-0.051,0.292,0.051c0.102,0.102,0.356,0.241,0.445,0.33c0.088,0.089,0.229,0.127,0.267,0.242c0.039,0.114,0.152,0.241,0.19,0.292c0.038,0.051,0.165,0.331,0.204,0.394c0.038,0.063,0.165-0.012,0.229-0.063c0.063-0.051,0.179-0.076,0.191-0.178c0.013-0.102-0.153-0.178-0.203-0.216c-0.051-0.038,0.127-0.076,0.191-0.127c0.063-0.05,0.177-0.14,0.228-0.063c0.051,0.077,0.026,0.381,0.051,0.432c0.025,0.051,0.279,0.127,0.331,0.191c0.05,0.063,0.267,0.089,0.304,0.051c0.039-0.038,0.242,0.026,0.294,0.038c0.049,0.013,0.202-0.025,0.304-0.05c0.103-0.025,0.204-0.102,0.191,0.063c-0.013,0.165-0.051,0.419-0.179,0.546c-0.127,0.127-0.076,0.191-0.202,0.191c-0.06,0-0.113,0-0.156,0.021c-0.041-0.065-0.098-0.117-0.175-0.097c-0.152,0.038-0.344,0.038-0.47,0.19c-0.128,0.153-0.178,0.165-0.204,0.114c-0.025-0.051,0.369-0.267,0.317-0.331c-0.05-0.063-0.355-0.038-0.521-0.038c-0.166,0-0.305-0.102-0.433-0.127c-0.126-0.025-0.292,0.127-0.418,0.254c-0.128,0.127-0.216,0.038-0.331,0.038c-0.115,0-0.331-0.165-0.331-0.165s-0.216-0.089-0.305-0.089c-0.088,0-0.267-0.165-0.318-0.165c-0.05,0-0.19-0.115-0.088-0.166c0.101-0.05,0.202,0.051,0.101-0.229c-0.101-0.279-0.33-0.216-0.419-0.178c-0.088,0.039-0.724,0.025-0.775,0.025c-0.051,0-0.419,0.127-0.533,0.178c-0.116,0.051-0.318,0.115-0.369,0.14c-0.051,0.025-0.318-0.051-0.433,0.013c-0.151,0.084-0.291,0.216-0.33,0.216c-0.038,0-0.153,0.089-0.229,0.28c-0.077,0.19,0.013,0.355-0.128,0.419c-0.139,0.063-0.394,0.204-0.495,0.305c-0.102,0.101-0.229,0.458-0.355,0.623c-0.127,0.165,0,0.317,0.025,0.419c0.025,0.101,0.114,0.292-0.025,0.471c-0.14,0.178-0.127,0.266-0.191,0.279c-0.063,0.013,0.063,0.063,0.088,0.19c0.025,0.128-0.114,0.255,0.128,0.369c0.241,0.113,0.355,0.217,0.418,0.367c0.064,0.153,0.382,0.407,0.382,0.407s0.229,0.205,0.344,0.293c0.114,0.089,0.152,0.038,0.177-0.05c0.025-0.09,0.178-0.104,0.355-0.104c0.178,0,0.305,0.04,0.483,0.014c0.178-0.025,0.356-0.141,0.42-0.166c0.063-0.025,0.279-0.164,0.443-0.063c0.166,0.103,0.141,0.241,0.23,0.332c0.088,0.088,0.24,0.037,0.355-0.051c0.114-0.09,0.064-0.052,0.203,0.025c0.14,0.075,0.204,0.151,0.077,0.267c-0.128,0.113-0.051,0.293-0.128,0.47c-0.076,0.178-0.063,0.203,0.077,0.278c0.14,0.076,0.394,0.548,0.47,0.638c0.077,0.088-0.025,0.342,0.064,0.495c0.089,0.151,0.178,0.254,0.077,0.331c-0.103,0.075-0.28,0.216-0.292,0.47s0.051,0.431,0.102,0.521s0.177,0.331,0.241,0.419c0.064,0.089,0.14,0.305,0.152,0.445c0.013,0.14-0.024,0.306,0.039,0.381c0.064,0.076,0.102,0.191,0.216,0.292c0.115,0.103,0.152,0.318,0.152,0.318s0.039,0.089,0.051,0.229c0.012,0.14,0.025,0.228,0.152,0.292c0.126,0.063,0.215,0.076,0.28,0.013c0.063-0.063,0.381-0.077,0.546-0.063c0.165,0.013,0.355-0.075,0.521-0.19s0.407-0.419,0.496-0.508c0.089-0.09,0.292-0.255,0.268-0.356c-0.025-0.101-0.077-0.203,0.024-0.254c0.102-0.052,0.344-0.152,0.356-0.229c0.013-0.077-0.09-0.395-0.115-0.457c-0.024-0.064,0.064-0.18,0.165-0.306c0.103-0.128,0.421-0.216,0.471-0.267c0.051-0.053,0.191-0.267,0.217-0.433c0.024-0.167-0.051-0.369,0-0.457c0.05-0.09,0.013-0.165-0.103-0.268c-0.114-0.102-0.089-0.407-0.127-0.457c-0.037-0.051-0.013-0.319,0.063-0.345c0.076-0.023,0.242-0.279,0.344-0.393c0.102-0.114,0.394-0.47,0.534-0.496c0.139-0.025,0.355-0.229,0.368-0.343c0.013-0.115,0.38-0.547,0.394-0.635c0.013-0.09,0.166-0.42,0.102-0.497c-0.062-0.076-0.559,0.115-0.622,0.141c-0.064,0.025-0.241,0.127-0.446,0.113c-0.202-0.013-0.114-0.177-0.127-0.254c-0.012-0.076-0.228-0.368-0.279-0.381c-0.051-0.012-0.203-0.166-0.267-0.317c-0.063-0.153-0.152-0.343-0.254-0.458c-0.102-0.114-0.165-0.38-0.268-0.559c-0.101-0.178-0.189-0.407-0.279-0.572c-0.021-0.041-0.045-0.079-0.067-0.117c0.118-0.029,0.289-0.082,0.31-0.009c0.024,0.088,0.165,0.279,0.19,0.419s0.165,0.089,0.178,0.216c0.014,0.128,0.14,0.433,0.19,0.47c0.052,0.038,0.28,0.242,0.318,0.318c0.038,0.076,0.089,0.178,0.127,0.369c0.038,0.19,0.076,0.444,0.179,0.482c0.102,0.038,0.444-0.064,0.508-0.102s0.482-0.242,0.635-0.255c0.153-0.012,0.179-0.115,0.368-0.152c0.191-0.038,0.331-0.177,0.458-0.28c0.127-0.101,0.28-0.355,0.33-0.444c0.052-0.088,0.179-0.152,0.115-0.253c-0.063-0.103-0.331-0.254-0.433-0.268c-0.102-0.012-0.089-0.178-0.152-0.178s-0.051,0.088-0.178,0.153c-0.127,0.063-0.255,0.19-0.344,0.165s0.026-0.089-0.113-0.203s-0.192-0.14-0.192-0.228c0-0.089-0.278-0.255-0.304-0.382c-0.026-0.127,0.19-0.305,0.254-0.19c0.063,0.114,0.115,0.292,0.279,0.368c0.165,0.076,0.318,0.204,0.395,0.229c0.076,0.025,0.267-0.14,0.33-0.114c0.063,0.024,0.191,0.253,0.306,0.292c0.113,0.038,0.495,0.051,0.559,0.051s0.33,0.013,0.381-0.063c0.051-0.076,0.089-0.076,0.153-0.076c0.062,0,0.177,0.229,0.267,0.254c0.089,0.025,0.254,0.013,0.241,0.179c-0.012,0.164,0.076,0.305,0.165,0.317c0.09,0.012,0.293-0.191,0.293-0.191s0,0.318-0.012,0.433c-0.014,0.113,0.139,0.534,0.139,0.534s0.19,0.393,0.241,0.482s0.267,0.355,0.267,0.47c0,0.115,0.025,0.293,0.103,0.293c0.076,0,0.152-0.203,0.24-0.331c0.091-0.126,0.116-0.305,0.153-0.432c0.038-0.127,0.038-0.356,0.038-0.444c0-0.09,0.075-0.166,0.255-0.242c0.178-0.076,0.304-0.292,0.456-0.407c0.153-0.115,0.141-0.305,0.446-0.305c0.305,0,0.278,0,0.355-0.077c0.076-0.076,0.151-0.127,0.19,0.013c0.038,0.14,0.254,0.343,0.292,0.394c0.038,0.052,0.114,0.191,0.103,0.344c-0.013,0.152,0.012,0.33,0.075,0.33s0.191-0.216,0.191-0.216s0.279-0.189,0.267,0.013c-0.014,0.203,0.025,0.419,0.025,0.545c0,0.053,0.042,0.135,0.088,0.21c-0.005,0.059-0.004,0.119-0.009,0.178C27.388,17.153,27.387,17.327,27.436,17.39zM20.382,12.064c0.076,0.05,0.102,0.127,0.152,0.203c0.052,0.076,0.14,0.05,0.203,0.114c0.063,0.064-0.178,0.14-0.075,0.216c0.101,0.077,0.151,0.381,0.165,0.458c0.013,0.076-0.279,0.114-0.369,0.102c-0.089-0.013-0.354-0.102-0.445-0.127c-0.089-0.026-0.139-0.343-0.025-0.331c0.116,0.013,0.141-0.025,0.267-0.139c0.128-0.115-0.189-0.166-0.278-0.191c-0.089-0.025-0.268-0.305-0.331-0.394c-0.062-0.089-0.014-0.228,0.141-0.331c0.076-0.051,0.279,0.063,0.381,0c0.101-0.063,0.203-0.14,0.241-0.165c0.039-0.025,0.293,0.038,0.33,0.114c0.039,0.076,0.191,0.191,0.141,0.229c-0.052,0.038-0.281,0.076-0.356,0c-0.075-0.077-0.255,0.012-0.268,0.152C20.242,12.115,20.307,12.013,20.382,12.064zM16.875,12.28c-0.077-0.025,0.025-0.178,0.102-0.229c0.075-0.051,0.164-0.178,0.241-0.305c0.076-0.127,0.178-0.14,0.241-0.127c0.063,0.013,0.203,0.241,0.241,0.318c0.038,0.076,0.165-0.026,0.217-0.051c0.05-0.025,0.127-0.102,0.14-0.165s0.127-0.102,0.254-0.102s0.013,0.102-0.076,0.127c-0.09,0.025-0.038,0.077,0.113,0.127c0.153,0.051,0.293,0.191,0.459,0.279c0.165,0.089,0.19,0.267,0.088,0.292c-0.101,0.025-0.406,0.051-0.521,0.038c-0.114-0.013-0.254-0.127-0.419-0.153c-0.165-0.025-0.369-0.013-0.433,0.077s-0.292,0.05-0.395,0.05c-0.102,0-0.228,0.127-0.253,0.077C16.875,12.534,16.951,12.306,16.875,12.28zM17.307,9.458c0.063-0.178,0.419,0.038,0.355,0.127C17.599,9.675,17.264,9.579,17.307,9.458zM17.802,18.584c0.063,0.102-0.14,0.431-0.254,0.407c-0.113-0.027-0.076-0.318-0.038-0.382C17.548,18.545,17.769,18.529,17.802,18.584zM13.189,12.674c0.025-0.051-0.039-0.153-0.127-0.013C13.032,12.71,13.164,12.725,13.189,12.674zM20.813,8.035c0.141,0.076,0.339,0.107,0.433,0.013c0.076-0.076,0.013-0.204-0.05-0.216c-0.064-0.013-0.104-0.115,0.062-0.203c0.165-0.089,0.343-0.204,0.534-0.229c0.19-0.025,0.622-0.038,0.774,0c0.152,0.039,0.382-0.166,0.445-0.254s-0.203-0.152-0.279-0.051c-0.077,0.102-0.444,0.076-0.521,0.051c-0.076-0.025-0.686,0.102-0.812,0.102c-0.128,0-0.179,0.152-0.356,0.229c-0.179,0.076-0.42,0.191-0.509,0.229c-0.088,0.038-0.177,0.19-0.101,0.216C20.509,7.947,20.674,7.959,20.813,8.035zM14.142,12.674c0.064-0.089-0.051-0.217-0.114-0.217c-0.12,0-0.178,0.191-0.103,0.254C14.002,12.776,14.078,12.763,14.142,12.674zM14.714,13.017c0.064,0.025,0.114,0.102,0.165,0.114c0.052,0.013,0.217,0,0.167-0.127s-0.167-0.127-0.204-0.127c-0.038,0-0.203-0.038-0.267,0C14.528,12.905,14.65,12.992,14.714,13.017zM11.308,10.958c0.101,0.013,0.217-0.063,0.305-0.101c0.088-0.038,0.216-0.114,0.216-0.229c0-0.114-0.025-0.216-0.077-0.267c-0.051-0.051-0.14-0.064-0.216-0.051c-0.115,0.02-0.127,0.14-0.203,0.14c-0.076,0-0.165,0.025-0.14,0.114s0.077,0.152,0,0.19C11.117,10.793,11.205,10.946,11.308,10.958zM11.931,10.412c0.127,0.051,0.394,0.102,0.292,0.153c-0.102,0.051-0.28,0.19-0.305,0.267s0.216,0.153,0.216,0.153s-0.077,0.089-0.013,0.114c0.063,0.025,0.102-0.089,0.203-0.089c0.101,0,0.304,0.063,0.406,0.063c0.103,0,0.267-0.14,0.254-0.229c-0.013-0.089-0.14-0.229-0.254-0.28c-0.113-0.051-0.241-0.28-0.317-0.331c-0.076-0.051,0.076-0.178-0.013-0.267c-0.09-0.089-0.153-0.076-0.255-0.14c-0.102-0.063-0.191,0.013-0.254,0.089c-0.063,0.076-0.14-0.013-0.217,0.012c-0.102,0.035-0.063,0.166-0.012,0.229C11.714,10.221,11.804,10.361,11.931,10.412zM24.729,17.198c-0.083,0.037-0.153,0.47,0,0.521c0.152,0.052,0.241-0.202,0.191-0.267C24.868,17.39,24.843,17.147,24.729,17.198zM20.114,20.464c-0.159-0.045-0.177,0.166-0.304,0.306c-0.128,0.141-0.267,0.254-0.317,0.241c-0.052-0.013-0.331,0.089-0.242,0.279c0.089,0.191,0.076,0.382-0.013,0.472c-0.089,0.088,0.076,0.342,0.052,0.482c-0.026,0.139,0.037,0.229,0.215,0.229s0.242-0.064,0.318-0.229c0.076-0.166,0.088-0.331,0.164-0.47c0.077-0.141,0.141-0.434,0.179-0.51c0.038-0.075,0.114-0.316,0.102-0.457C20.254,20.669,20.204,20.489,20.114,20.464zM10.391,8.802c-0.069-0.06-0.229-0.102-0.306-0.11c-0.076-0.008-0.152,0.06-0.321,0.06c-0.168,0-0.279,0.067-0.347,0C9.349,8.684,9.068,8.65,9.042,8.692C9.008,8.749,8.941,8.751,9.008,8.87c0.069,0.118,0.12,0.186,0.179,0.178s0.262-0.017,0.288,0.051C9.5,9.167,9.569,9.226,9.712,9.184c0.145-0.042,0.263-0.068,0.296-0.119c0.033-0.051,0.263-0.059,0.263-0.059S10.458,8.861,10.391,8.802z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.GlobeAlt2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.GlobeAlt2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.GlobeAlt2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.GlobeAlt2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM8.251,7.48c0.122,0.055,0.255,0.104,0.28,0.137C8.57,7.668,8.621,7.823,8.557,7.861C8.492,7.9,8.39,7.887,8.376,7.771c-0.013-0.115-0.026-0.128-0.18-0.18c-0.022-0.007-0.035-0.01-0.051-0.015C8.18,7.544,8.216,7.512,8.251,7.48zM7.733,7.974c0.031,0.087,0.113,0.125,0,0.17C7.673,8.168,7.611,8.172,7.559,8.165C7.617,8.102,7.672,8.035,7.733,7.974zM16,27.533C9.639,27.533,4.466,22.36,4.466,16c0-0.085,0.011-0.168,0.013-0.254c0.004-0.003,0.008-0.006,0.012-0.009c0.129-0.102,0.283-0.359,0.334-0.45c0.052-0.089,0.181-0.154,0.116-0.256c-0.059-0.096-0.292-0.23-0.407-0.261c0.01-0.099,0.032-0.195,0.045-0.294c0.063,0.077,0.137,0.17,0.208,0.194c0.115,0.038,0.501,0.052,0.566,0.052c0.063,0,0.334,0.014,0.386-0.064c0.051-0.077,0.09-0.077,0.154-0.077c0.064,0,0.18,0.231,0.271,0.257c0.089,0.026,0.257,0.013,0.244,0.181c-0.012,0.166,0.077,0.309,0.167,0.321c0.09,0.013,0.296-0.194,0.296-0.194s0,0.322-0.012,0.438C6.846,15.698,7,16.124,7,16.124s0.193,0.397,0.244,0.488c0.052,0.09,0.27,0.36,0.27,0.476c0,0.117,0.026,0.297,0.104,0.297s0.155-0.206,0.244-0.335c0.091-0.128,0.117-0.31,0.155-0.438c0.039-0.129,0.039-0.36,0.039-0.45c0-0.091,0.076-0.168,0.257-0.245c0.181-0.077,0.309-0.296,0.463-0.412c0.155-0.116,0.142-0.309,0.452-0.309c0.308,0,0.282,0,0.36-0.078c0.077-0.077,0.154-0.128,0.192,0.013c0.039,0.142,0.257,0.347,0.296,0.399c0.039,0.052,0.116,0.193,0.104,0.348c-0.013,0.153,0.012,0.334,0.077,0.334c0.064,0,0.193-0.219,0.193-0.219s0.283-0.192,0.27,0.014c-0.014,0.205,0.025,0.425,0.025,0.552c0,0.13,0.232,0.438,0.232,0.362c0-0.079,0.103-0.296,0.103-0.413c0-0.114,0.064-0.063,0.231,0.051c0.167,0.116,0.283,0.349,0.283,0.349s0.168,0.154,0.193,0.219c0.026,0.064,0.206-0.025,0.244-0.104c0.039-0.076,0.065-0.115,0.167-0.141c0.104-0.026,0.231-0.026,0.271-0.168c0.039-0.142,0.154-0.308,0-0.502c-0.154-0.193-0.232-0.321-0.347-0.412c-0.117-0.09-0.206-0.322-0.206-0.322s0.244-0.218,0.321-0.296c0.079-0.077,0.193-0.025,0.207,0.064c0.013,0.091-0.115,0.168-0.141,0.361c-0.026,0.192,0.154,0.257,0.206,0.192c0.051-0.065,0.18-0.219,0.18-0.257c0-0.039-0.089-0.026-0.102-0.167c-0.013-0.142,0.166-0.245,0.23-0.207c0.066,0.039,0.477-0.051,0.67-0.154s0.308-0.322,0.425-0.412c0.116-0.089,0.515-0.386,0.489-0.527c-0.026-0.142,0.012-0.334-0.09-0.515c-0.103-0.18-0.232-0.295-0.283-0.373c-0.051-0.077,0.219-0.09,0.347-0.206c0.129-0.116,0-0.219-0.064-0.206c-0.064,0.013-0.232,0.052-0.296,0.039c-0.064-0.013-0.103-0.077-0.206-0.155c-0.102-0.077,0.026-0.192,0.091-0.179c0.064,0.013,0.23-0.129,0.308-0.193c0.077-0.064,0.193-0.115,0.154-0.051c-0.038,0.064-0.128,0.296-0.026,0.309c0.104,0.013,0.348-0.193,0.388-0.18c0.038,0.013,0.102,0.18,0.064,0.257c-0.039,0.077-0.039,0.206,0.013,0.193c0.051-0.013,0.154-0.129,0.18-0.09c0.027,0.039,0.154,0.116,0.09,0.257c-0.063,0.142-0.193,0.193-0.039,0.284c0.154,0.089,0.206,0.012,0.322-0.052c0.115-0.064,0.193-0.347,0.128-0.438c-0.064-0.09-0.218-0.27-0.218-0.334c0-0.064,0.257-0.064,0.257-0.167s0.09-0.18,0.18-0.219c0.091-0.039,0.206-0.206,0.244-0.154c0.039,0.052,0.271,0.116,0.334,0.039c0.064-0.077,0.4-0.36,0.605-0.515c0.206-0.154,0.283-0.334,0.336-0.515c0.051-0.18,0.128-0.296,0.102-0.437v0c0.077,0.18,0.09,0.309,0.077,0.45c-0.013,0.142,0,0.438,0.026,0.476c0.025,0.039,0.129,0.128,0.192,0.103c0.064-0.025-0.025-0.283-0.025-0.334c0-0.052,0.09-0.129,0.142-0.142c0.052-0.013,0-0.231-0.065-0.322c-0.063-0.09-0.154-0.142-0.102-0.154c0.051-0.013,0.115-0.116,0.077-0.142c-0.039-0.025-0.014-0.116-0.103-0.09c-0.065,0.019-0.241-0.015-0.235,0.095c-0.037-0.11-0.116-0.183-0.216-0.172c-0.116,0.013-0.181,0.077-0.296,0.077s-0.025-0.18-0.077-0.18c-0.051,0-0.168,0.167-0.231,0.077c-0.064-0.09,0.18-0.206,0.373-0.27c0.192-0.064,0.514-0.438,0.644-0.451c0.128-0.013,0.45,0.026,0.733,0.013c0.283-0.013,0.373-0.129,0.463-0.064s0.283,0.142,0.399,0.129c0.116-0.014,0.064,0,0.244-0.129c0.18-0.129,0.348-0.193,0.438-0.296c0.09-0.103,0.335-0.18,0.348-0.077c0.014,0.103-0.026,0.206,0.077,0.206s0.258-0.103,0.386-0.154c0.129-0.051,0.231-0.116,0.231-0.116s-0.527,0.36-0.655,0.438c-0.129,0.077-0.438,0.129-0.567,0.283c-0.128,0.155-0.205,0.206-0.192,0.374c0.014,0.167,0.231,0.386,0.128,0.54c-0.103,0.154-0.141,0.373-0.141,0.373s0.154-0.219,0.373-0.36s0.348-0.334,0.425-0.412s0.309-0.091,0.309-0.181s0.064-0.206,0.104-0.309c0.038-0.103-0.077-0.078,0-0.206c0.076-0.129,0.064-0.232,0.45-0.232s0.257,0.026,0.566,0.013c0.309-0.013,0.424-0.167,0.72-0.245c0.296-0.077,0.527-0.128,0.618-0.089c0.09,0.038,0.232,0.012,0.141-0.078c-0.089-0.09-0.295-0.219-0.193-0.245c0.104-0.026,0.207-0.039,0.246-0.142c0.039-0.103-0.142-0.283-0.039-0.386c0.104-0.103-0.077-0.231-0.207-0.257c-0.128-0.025-0.63,0.026-0.731-0.025c-0.104-0.052-0.271-0.116-0.322-0.078c-0.052,0.039-0.168,0.245-0.168,0.245s-0.09,0.025-0.168-0.09c-0.076-0.116-0.5-0.103-0.629-0.103s-0.271,0.025-0.413,0.039c-0.141,0.013-0.219,0.052-0.322-0.039c-0.102-0.09-0.243-0.129-0.296-0.167c-0.051-0.039-0.334-0.039-0.553-0.012c-0.218,0.025-0.438,0.025-0.438,0.025s-0.104-0.039-0.257-0.129c-0.154-0.09-0.309-0.154-0.361-0.154c-0.051,0-0.449,0.064-0.539,0c-0.091-0.064-0.181-0.103-0.245-0.103s-0.115-0.103-0.038-0.103s0.437-0.103,0.437-0.103s-0.103-0.142-0.231-0.142c-0.128,0-0.359-0.064-0.424-0.064s-0.014,0.064-0.142,0.039c-0.13-0.026-0.258-0.078-0.335-0.026c-0.076,0.051-0.258,0.128-0.064,0.18c0.193,0.052,0.373,0,0.425,0.078c0.052,0.077,0,0.115,0,0.167s-0.103,0.193-0.167,0.219c-0.064,0.025-0.143-0.039-0.27,0.025c-0.129,0.064-0.451,0.013-0.49,0.052c-0.038,0.039-0.115-0.103-0.18-0.077c-0.064,0.025-0.232,0.193-0.322,0.18c-0.089-0.013-0.206-0.103-0.206-0.206s-0.038-0.232-0.077-0.258c-0.038-0.025-0.322-0.039-0.425-0.025c-0.103,0.013-0.424,0.038-0.477,0.09c-0.052,0.052-0.193,0.09-0.283,0.09s-0.167-0.09-0.36-0.116c-0.192-0.026-0.617-0.039-0.669-0.026s-0.218-0.025-0.155-0.077c0.065-0.051,0.257-0.219,0.143-0.295c-0.117-0.078-0.375-0.078-0.489-0.09c-0.117-0.013-0.232-0.039-0.413-0.013c-0.181,0.026-0.219,0.116-0.296,0.039c-0.077-0.077,0.193,0.039-0.077-0.077c-0.27-0.116-0.399-0.103-0.477-0.064c-0.077,0.039,0.013,0.025-0.192,0.103c-0.206,0.078-0.322,0.116-0.374,0.129c-0.051,0.012-0.372-0.065-0.411-0.091c-0.038-0.025-0.181,0.013-0.309,0.064S9.895,7.025,9.767,7C9.638,6.973,9.432,6.973,9.303,7.025C9.174,7.076,9.084,7.076,8.956,7.166c-0.13,0.09-0.373,0.142-0.373,0.142S8.522,7.305,8.448,7.301C10.474,5.541,13.111,4.466,16,4.466c6.361,0,11.534,5.173,11.534,11.534S22.36,27.533,16,27.533zM14.888,19.92c0,0,0.207-0.026,0.207-0.117c0-0.089-0.207-0.205-0.282-0.102c-0.078,0.102-0.219,0.205-0.207,0.296C14.625,20.138,14.888,19.92,14.888,19.92zM14.875,17.023c-0.181,0.233-0.167,0.182-0.296,0.128c-0.128-0.05-0.334,0.116-0.296,0.182c0.039,0.064,0.322-0.014,0.386,0.102c0.065,0.116,0.065,0.129,0.193,0.104c0.128-0.026,0.257-0.205,0.219-0.295C15.043,17.151,14.875,17.023,14.875,17.023zM14.837,18.245c-0.051,0-0.412,0.064-0.451,0.079c-0.039,0.013-0.27-0.025-0.27-0.025c-0.09,0.089-0.026,0.179,0.116,0.166s0.438-0.052,0.502-0.052C14.799,18.413,14.888,18.245,14.837,18.245zM14.284,14.668c-0.19,0.03-0.308,0.438-0.155,0.425C14.284,15.081,14.451,14.643,14.284,14.668zM14.734,16.959c-0.052-0.064-0.181-0.271-0.323-0.219c-0.042,0.017-0.153,0.245-0.012,0.245C14.541,16.985,14.786,17.023,14.734,16.959zM14.85,16.805c0.232-0.013,0.167-0.245-0.013-0.257C14.786,16.544,14.618,16.818,14.85,16.805zM17.591,18.928c-0.193-0.039-0.244-0.102-0.45-0.205c-0.207-0.103-0.67-0.103-0.682-0.039c-0.014,0.064,0,0-0.155-0.05c-0.153-0.054-0.271,0-0.309-0.091c-0.038-0.091-0.128-0.117-0.244-0.002c-0.097,0.097-0.142,0.104,0.078,0.143c0.218,0.039,0.283,0.039,0.192,0.141c-0.09,0.104-0.154,0.233-0.077,0.244c0.077,0.015,0.309-0.05,0.334,0c0.026,0.054-0.051,0.064,0.207,0.105c0.258,0.037,0.309,0.128,0.359,0.178c0.051,0.052,0.206,0.22,0.104,0.22c-0.104,0-0.219,0.128-0.142,0.143c0.077,0.013,0.309-0.039,0.321,0c0.014,0.037,0.143,0.283,0.271,0.271c0.129-0.013,0.206-0.244,0.27-0.31c0.065-0.064,0.322-0.104,0.349,0.012c0.026,0.116,0.104,0.233,0.257,0.311c0.154,0.076,0.335,0.154,0.348,0.089c0.013-0.064-0.077-0.309-0.181-0.346c-0.103-0.041-0.282-0.259-0.282-0.348c0-0.091-0.155-0.117-0.232-0.182C17.849,19.147,17.784,18.967,17.591,18.928zM8.042,17.023c-0.084,0.037-0.155,0.476,0,0.527c0.154,0.052,0.244-0.205,0.193-0.271C8.183,17.218,8.158,16.973,8.042,17.023zM15.429,18.117c-0.118-0.05-0.335,0.424-0.181,0.463C15.403,18.62,15.518,18.156,15.429,18.117zM15.687,13.703c0.077,0,0.18-0.051,0.18-0.193c0-0.142,0.18,0,0.27-0.013s0.141-0.103,0.18-0.206c0.005-0.013,0.008-0.021,0.009-0.027c-0.003,0.024-0.001,0.093,0.095,0.117c0.154,0.038,0.205-0.064,0.205-0.103s0.283-0.103,0.336-0.142c0.051-0.038,0.258-0.103,0.27-0.154c0.013-0.051,0-0.348,0.064-0.373c0.064-0.026,0.154-0.026,0.052-0.206c-0.104-0.181-0.104-0.348-0.232-0.271c-0.095,0.057-0.038,0.284-0.115,0.438s-0.142,0.296-0.193,0.296s-0.321,0.103-0.399,0.18c-0.076,0.077-0.45-0.064-0.501,0c-0.052,0.064-0.154,0.141-0.219,0.193c-0.065,0.051-0.245,0.013-0.207,0.167C15.518,13.562,15.609,13.703,15.687,13.703zM17.449,12.056c0.18-0.013,0.348-0.064,0.348-0.064s0.271,0.013,0.232-0.116c-0.04-0.128-0.322-0.141-0.375-0.128c-0.051,0.013-0.142-0.142-0.244-0.116c-0.096,0.023-0.128,0.155-0.128,0.193c0,0.039-0.36,0.115-0.245,0.219C17.153,12.146,17.27,12.069,17.449,12.056zM13.91,19.058c0.104,0.064,0.296-0.219,0.349-0.13c0.051,0.091-0.013,0.13,0.076,0.246c0.091,0.114,0.258,0.102,0.258,0.102s-0.013-0.309-0.155-0.387c-0.142-0.077-0.232-0.166-0.064-0.141c0.167,0.026,0.257-0.039,0.219-0.114c-0.039-0.078-0.283-0.039-0.361-0.026s-0.193-0.052-0.193-0.052c-0.077,0.024-0.063,0.089-0.09,0.219C13.923,18.902,13.807,18.992,13.91,19.058zM20.924,21.618c-0.231-0.052-0.077,0.039,0,0.154c0.077,0.116,0.232,0.176,0.258,0.05C21.193,21.759,21.155,21.67,20.924,21.618zM21.915,24.744c-0.077,0.064,0,0.091-0.219,0.22c-0.22,0.13-0.49,0.271-0.541,0.386c-0.052,0.116,0.051,0.181,0.258,0.192c0.206,0.013,0.154,0.053,0.296-0.103s0.271-0.244,0.438-0.373c0.168-0.128,0.168-0.322,0.168-0.322s-0.181-0.178-0.193-0.141C22.1,24.665,21.992,24.681,21.915,24.744zM18.504,21.618c0.014-0.116-0.219-0.116-0.334-0.207c-0.116-0.089-0.128-0.359-0.193-0.515c-0.064-0.153-0.192-0.257-0.322-0.397c-0.128-0.143-0.192-0.465-0.23-0.438c-0.039,0.025-0.154,0.399-0.064,0.515c0.09,0.116-0.039,0.348-0.103,0.503c-0.065,0.153-0.22-0.026-0.349-0.104c-0.129-0.078-0.308-0.128-0.398-0.219c-0.09-0.091,0.155-0.335,0.091-0.426c-0.065-0.09-0.412-0.013-0.45-0.013c-0.039,0-0.116-0.128-0.194-0.128c-0.077,0-0.064,0.258-0.064,0.258s-0.078-0.091-0.193-0.207c-0.117-0.115,0.012,0.077-0.103,0.193c-0.117,0.117-0.079,0.078-0.129,0.206c-0.051,0.129-0.167,0.077-0.283-0.052c-0.116-0.128-0.179-0.037-0.258,0c-0.077,0.039-0.141,0.259-0.18,0.309c-0.039,0.052-0.309,0.117-0.374,0.182c-0.064,0.062-0.09,0.27-0.09,0.322c0,0.05-0.271,0.023-0.361,0.089c-0.09,0.064-0.23,0.025-0.321,0.025c-0.09,0-0.399,0.244-0.502,0.308c-0.103,0.066-0.103,0.298-0.051,0.362c0.051,0.063,0.154,0.219,0.09,0.244c-0.064,0.026-0.104,0.206,0.051,0.359c0.154,0.155,0.103,0.194,0.115,0.271c0.014,0.077,0.078,0.104,0.181,0.232c0.102,0.128-0.181,0.231-0.219,0.31c-0.039,0.076,0.091,0.192,0.167,0.257c0.077,0.063,0.271,0.026,0.386-0.013c0.117-0.039,0.245-0.143,0.321-0.155c0.079-0.013,0.438-0.026,0.438-0.026s0.129-0.192,0.219-0.296c0.089-0.102,0.372-0.013,0.372-0.013s0.117-0.076,0.426-0.141c0.309-0.065,0.179,0.064,0.296,0.104c0.115,0.037,0.27,0.062,0.359,0.128c0.09,0.064,0,0.218-0.012,0.283c-0.014,0.064,0.219,0.038,0.23-0.026c0.014-0.064,0.077-0.128,0.207-0.205c0.128-0.078,0.025,0.114,0.076,0.231c0.052,0.116,0.129-0.157,0.129-0.026c0,0.039,0.039,0.078,0.051,0.116c0.014,0.039,0.181,0.052,0.181,0.18c0,0.13,0,0.207,0.039,0.231c0.038,0.026,0.244,0,0.335,0.155c0.089,0.154,0.154,0.013,0.205-0.052c0.052-0.064,0.231,0.026,0.283,0.078c0.052,0.05,0.193-0.104,0.387-0.155c0.192-0.051,0.167-0.039,0.219-0.115c0.051-0.078,0.09-0.283,0.205-0.438c0.115-0.153,0.271-0.424,0.271-0.631c0-0.206-0.014-0.682-0.155-0.899C18.761,21.953,18.492,21.733,18.504,21.618zM18.029,24.77c-0.065-0.013-0.207-0.062-0.207-0.062c-0.142,0.141,0.142,0.141,0.104,0.283c-0.039,0.141,0.193,0.089,0.257,0.064c0.063-0.027,0.22-0.323,0.193-0.399C18.351,24.577,18.093,24.783,18.029,24.77zM22.803,24.178c-0.052,0-0.077,0.064-0.192,0c-0.117-0.063-0.091-0.037-0.168-0.167c-0.077-0.127-0.091-0.296-0.219-0.23c-0.051,0.025,0,0.168,0.051,0.218c0.053,0.052,0.077,0.231,0.064,0.283c-0.012,0.052-0.231,0.116-0.129,0.18c0.104,0.064,0.297,0,0.271,0.078c-0.025,0.077-0.129,0.179-0.013,0.205c0.115,0.025,0.154-0.089,0.207-0.178c0.051-0.093,0.089-0.169,0.179-0.221C22.944,24.294,22.854,24.178,22.803,24.178zM22.815,21.18c0.168,0.064,0.464-0.231,0.347-0.27C23.047,20.871,22.815,21.18,22.815,21.18zM13.923,19.906c-0.029,0.115,0.193,0.167,0.206,0.039C14.141,19.816,13.949,19.803,13.923,19.906zM14.27,16.47c-0.064,0.065-0.257,0.193-0.283,0.31c-0.025,0.115,0.309-0.182,0.399-0.296c0.091-0.117,0.27-0.052,0.308-0.117c0.04-0.063,0.04-0.063,0.04-0.063s-0.142-0.025-0.257-0.063c-0.117-0.039-0.258,0.102-0.193-0.104c0.064-0.206,0.257-0.167,0.219-0.322c-0.039-0.154-0.168-0.193-0.207-0.193c-0.09,0,0.013,0.141-0.116,0.231c-0.128,0.09-0.271,0.128-0.193,0.283C14.064,16.29,14.334,16.405,14.27,16.47zM13.254,19.751c0.013-0.076-0.142-0.192-0.206-0.192c-0.065,0-0.386-0.077-0.386-0.077c-0.058,0.023-0.135,0.045-0.158,0.077c-0.007-0.011-0.022-0.024-0.049-0.039c-0.142-0.075-0.309,0-0.361-0.102c-0.05-0.104-0.127-0.104-0.179-0.039c-0.094,0.117,0.025,0.206,0.063,0.231c0.038,0.024,0.181,0.052,0.309,0.039c0.08-0.008,0.181-0.027,0.21-0.059c0.004,0.014,0.016,0.027,0.035,0.044c0.103,0.092,0.167,0.13,0.321,0.116C13.009,19.74,13.241,19.829,13.254,19.751zM12.881,18.992c0.065,0,0.193,0,0.283,0.026c0.09,0.025,0.386,0.05,0.373-0.064c-0.013-0.115-0.038-0.297,0.089-0.411c0.13-0.117,0.257-0.18,0.193-0.348c-0.063-0.167-0.193-0.271-0.103-0.349c0.09-0.076,0.192-0.102,0.192-0.166c0-0.065-0.217,0.18-0.244-0.246c-0.005-0.091-0.206,0.025-0.219,0.116c-0.012,0.091,0.142,0.167-0.103,0.167c-0.245,0-0.257,0.194-0.309,0.232c-0.052,0.039-0.103,0.051-0.207,0.076c-0.102,0.026-0.127,0.13-0.153,0.194c-0.025,0.063-0.206-0.116-0.257-0.064c-0.051,0.052-0.013,0.296,0.077,0.501C12.585,18.863,12.816,18.992,12.881,18.992zM11.979,18.928c0.065-0.077,0.038-0.192-0.063-0.18c-0.103,0.013-0.193-0.168-0.36-0.283c-0.168-0.114-0.296-0.194-0.451-0.36c-0.154-0.167-0.347-0.271-0.45-0.359c-0.104-0.091-0.257-0.13-0.322-0.116c-0.159,0.032,0.231,0.309,0.271,0.346c0.039,0.041,0.387,0.335,0.387,0.478s0.231,0.476,0.296,0.527c0.064,0.052,0.385,0.244,0.437,0.348c0.052,0.103,0.167,0.13,0.167-0.013C11.89,19.174,11.916,19.006,11.979,18.928zM11.002,17.474c0.064,0.232,0.193,0.464,0.244,0.555c0.052,0.089,0.271,0.217,0.348,0.281c0.077,0.064,0.192-0.024,0.143-0.102c-0.052-0.078-0.155-0.192-0.167-0.283c-0.013-0.091-0.078-0.233-0.181-0.387c-0.102-0.153-0.192-0.192-0.257-0.295c-0.064-0.104-0.296-0.297-0.296-0.297c-0.102,0.013-0.102,0.205-0.051,0.271C10.834,17.28,10.938,17.243,11.002,17.474z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Hail();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Hail = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Hail.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Hail\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM11.503,23.709c-0.784-0.002-1.418-0.636-1.418-1.416c0-0.785,0.634-1.416,1.418-1.418c0.78,0.002,1.413,0.633,1.416,1.418C12.917,23.073,12.284,23.707,11.503,23.709zM19.002,23.709c-0.783-0.002-1.418-0.636-1.418-1.416c0-0.785,0.635-1.416,1.418-1.418c0.779,0.002,1.414,0.633,1.414,1.418C20.417,23.073,19.784,23.707,19.002,23.709zM7.503,28.771c-0.783-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.415,0.635,1.415,1.416C8.917,28.135,8.284,28.77,7.503,28.771zM15.001,28.771c-0.782-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.413,0.635,1.415,1.416C16.415,28.135,15.784,28.77,15.001,28.771zM22.5,28.771c-0.782-0.002-1.416-0.634-1.416-1.416c0-0.785,0.634-1.418,1.416-1.42c0.781,0.002,1.414,0.635,1.418,1.42C23.915,28.138,23.282,28.77,22.5,28.771z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Hammer();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Hammer = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Hammer.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Hammer\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M7.831,29.354c0.685,0.353,1.62,1.178,2.344,0.876c0.475-0.195,0.753-1.301,1.048-1.883c2.221-4.376,4.635-9.353,6.392-13.611c0-0.19,0.101-0.337-0.049-0.595c0.983-1.6,1.65-3.358,2.724-5.138c0.34-0.566,0.686-1.351,1.163-1.577l0.881-0.368c1.12-0.288,1.938-0.278,2.719,0.473c0.396,0.383,0.578,1.015,0.961,1.395c0.259,0.26,1.246,0.899,1.613,0.8c0.285-0.077,0.52-0.364,0.72-0.728l0.696-1.286c0.195-0.366,0.306-0.718,0.215-0.999c-0.117-0.362-1.192-0.84-1.552-0.915c-0.528-0.113-1.154,0.081-1.692-0.041c-1.057-0.243-1.513-0.922-1.883-2.02c-2.608-1.533-6.119-2.53-10.207-1.244c-1.109,0.349-2.172,0.614-2.901,1.323c-0.146,0.412,0.143,0.494,0.446,0.489c-0.237,0.216-0.62,0.341-0.399,0.848c2.495-1.146,7.34-1.542,7.669,0.804c0.072,0.522-0.395,1.241-0.682,1.835c-0.905,1.874-2.011,3.394-2.813,5.091c-0.298,0.017-0.366,0.18-0.525,0.287c-2.604,3.8-5.451,8.541-7.9,12.794c-0.326,0.566-1.098,1.402-1.002,1.906C5.961,28.641,7.146,29,7.831,29.354z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.HammerAndScrewDriver();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.HammerAndScrewDriver = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.HammerAndScrewDriver.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.HammerAndScrewDriver\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.537,9.859c-0.473-0.259-1.127-0.252-1.609-0.523c-0.943-0.534-1.186-1.316-1.226-2.475c-2.059-2.215-5.138-4.176-9.424-4.114c-1.162,0.017-2.256-0.035-3.158,0.435c-0.258,0.354-0.004,0.516,0.288,0.599c-0.29,0.138-0.692,0.147-0.626,0.697c2.72-0.383,7.475,0.624,7.116,2.966c-0.08,0.521-0.735,1.076-1.179,1.563c-1.263,1.382-2.599,2.45-3.761,3.667l0.336,0.336c0.742-0.521,1.446-0.785,2.104-0.785c0.707,0,1.121,0.297,1.276,0.433c0.575-0.618,1.166-1.244,1.839-1.853c0.488-0.444,1.047-1.099,1.566-1.178l0.949-0.101c1.156,0.047,1.937,0.29,2.471,1.232c0.27,0.481,0.262,1.139,0.521,1.613c0.175,0.324,0.937,1.218,1.316,1.228c0.294,0.009,0.603-0.199,0.899-0.49l1.033-1.034c0.291-0.294,0.501-0.6,0.492-0.896C29.754,10.801,28.861,10.035,28.537,9.859zM13.021,15.353l-0.741-0.741c-3.139,2.643-6.52,5.738-9.531,8.589c-0.473,0.443-1.452,1.021-1.506,1.539c-0.083,0.781,0.95,1.465,1.506,2c0.556,0.533,1.212,1.602,1.994,1.51c0.509-0.043,1.095-1.029,1.544-1.502c2.255-2.374,4.664-4.976,6.883-7.509c-0.312-0.371-0.498-0.596-0.498-0.596C12.535,18.451,11.779,17.272,13.021,15.353zM20.64,15.643c-0.366-0.318-1.466,0.143-1.777-0.122c-0.311-0.266,0.171-1.259-0.061-1.455c-0.482-0.406-0.77-0.646-0.77-0.646s-0.862-0.829-2.812,0.928L7.44,6.569C7.045,6.173,7.203,4.746,7.203,4.746L3.517,2.646L2.623,3.541l2.1,3.686c0,0,1.428-0.158,1.824,0.237l7.792,7.793c-1.548,1.831-0.895,2.752-0.895,2.752s0.238,0.288,0.646,0.771c0.196,0.23,1.188-0.249,1.455,0.061c0.264,0.312-0.196,1.41,0.12,1.777c2.666,3.064,6.926,7.736,8.125,7.736c0.892,0,2.021-0.724,2.948-1.64c0.925-0.917,1.639-2.055,1.639-2.947C28.377,22.567,23.704,18.309,20.64,15.643z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.HangUp();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.HangUp = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.HangUp.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.HangUp\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.563,10.494c-7.35-7.349-19.265-7.348-26.612,0.001c-1.796,1.796-0.247,6.84-0.247,6.84c0.135,0.443,0.616,0.72,1.067,0.614l6.898-1.604c0.451-0.105,0.82-0.57,0.82-1.033l0.001-3.685c0-0.463,0.379-0.842,0.842-0.842h8.285c0.464,0,0.843,0.379,0.843,0.842l-0.001,3.471c0.001,0.462,0.375,0.907,0.83,0.986l7.635,1.316c0.456,0.08,0.873-0.232,0.926-0.692C29.851,16.708,30.359,12.29,28.563,10.494zM17.264,14.072h-3.501v4.39h-2.625l4.363,7.556l4.363-7.556h-2.6V14.072z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Help();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Help = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Help.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Help\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.834,4.834L4.833,4.833c-5.889,5.892-5.89,15.443,0.001,21.334s15.44,5.888,21.33-0.002c5.891-5.891,5.893-15.44,0.002-21.33C20.275-1.056,10.725-1.056,4.834,4.834zM25.459,5.542c0.833,0.836,1.523,1.757,2.104,2.726l-4.08,4.08c-0.418-1.062-1.053-2.06-1.912-2.918c-0.859-0.859-1.857-1.494-2.92-1.913l4.08-4.08C23.7,4.018,24.622,4.709,25.459,5.542zM10.139,20.862c-2.958-2.968-2.959-7.758-0.001-10.725c2.966-2.957,7.756-2.957,10.725,0c2.954,2.965,2.955,7.757-0.001,10.724C17.896,23.819,13.104,23.817,10.139,20.862zM5.542,25.459c-0.833-0.837-1.524-1.759-2.105-2.728l4.081-4.081c0.418,1.063,1.055,2.06,1.914,2.919c0.858,0.859,1.855,1.494,2.917,1.913l-4.081,4.081C7.299,26.982,6.379,26.292,5.542,25.459zM8.268,3.435l4.082,4.082C11.288,7.935,10.29,8.571,9.43,9.43c-0.858,0.859-1.494,1.855-1.912,2.918L3.436,8.267c0.58-0.969,1.271-1.89,2.105-2.727C6.377,4.707,7.299,4.016,8.268,3.435zM22.732,27.563l-4.082-4.082c1.062-0.418,2.061-1.053,2.919-1.912c0.859-0.859,1.495-1.857,1.913-2.92l4.082,4.082c-0.58,0.969-1.271,1.891-2.105,2.728C24.623,26.292,23.701,26.983,22.732,27.563z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.History();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.History = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.History.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.History\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.666,18.292c0.275,0.479,0.889,0.644,1.365,0.367l3.305-1.677C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876c0-0.552-0.448-1-1-1c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96C10.553,17.204,10.389,17.816,10.666,18.292zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.888,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM6.624,15.5c0,0.553,0.449,1,1,1c0.552,0,1-0.447,1.001-1c-0.001-0.552-0.448-0.999-1.001-1C7.071,14.5,6.624,14.948,6.624,15.5zM14.501,23.377c0,0.553,0.448,1,1,1c0.552,0,1-0.447,1-1s-0.448-1-1-1C14.949,22.377,14.501,22.824,14.501,23.377zM10.696,21.822c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.276,1.091,0.11,1.365-0.365c0.277-0.479,0.113-1.09-0.365-1.367C11.584,21.18,10.973,21.344,10.696,21.822zM21.822,10.696c-0.479,0.278-0.643,0.89-0.366,1.367s0.888,0.642,1.366,0.365c0.478-0.275,0.643-0.888,0.365-1.366C22.913,10.584,22.298,10.42,21.822,10.696zM21.456,18.938c-0.274,0.479-0.112,1.092,0.367,1.367c0.477,0.274,1.089,0.112,1.364-0.365c0.276-0.479,0.112-1.092-0.364-1.367C22.343,18.297,21.73,18.461,21.456,18.938zM24.378,15.5c0-0.551-0.448-1-1-1c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1C23.93,16.5,24.378,16.053,24.378,15.5zM18.573,22.822c0.274,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.89,0.365-1.365c-0.277-0.479-0.888-0.643-1.365-0.367C18.46,21.732,18.296,22.344,18.573,22.822zM18.939,9.546c0.477,0.276,1.088,0.112,1.365-0.366c0.276-0.478,0.113-1.091-0.367-1.367c-0.477-0.276-1.09-0.111-1.364,0.366C18.298,8.659,18.462,9.27,18.939,9.546zM28.703,14.364C28.074,7.072,21.654,1.67,14.364,2.295c-3.254,0.281-6.118,1.726-8.25,3.877L4.341,4.681l-1.309,7.364l7.031-2.548L8.427,8.12c1.627-1.567,3.767-2.621,6.194-2.833c5.64-0.477,10.595,3.694,11.089,9.335c0.477,5.64-3.693,10.595-9.333,11.09c-5.643,0.476-10.599-3.694-11.092-9.333c-0.102-1.204,0.019-2.373,0.31-3.478l-3.27,1.186c-0.089,0.832-0.106,1.684-0.031,2.55c0.629,7.29,7.048,12.691,14.341,12.066C23.926,28.074,29.328,21.655,28.703,14.364z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Home();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Home = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Home.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Home\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.812,16l-3.062-3.062V5.625h-2.625v4.688L16,4.188L4.188,16L7,15.933v11.942h17.875V16H27.812zM16,26.167h-5.833v-7H16V26.167zM21.667,23.167h-3.833v-4.042h3.833V23.167z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.IMac();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.IMac = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.IMac.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.IMac\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.936,2.099H2.046c-0.506,0-0.919,0.414-0.919,0.92v21.097c0,0.506,0.413,0.919,0.919,0.919h17.062v-0.003h9.828c0.506,0,0.92-0.413,0.92-0.921V3.019C29.854,2.513,29.439,2.099,28.936,2.099zM28.562,20.062c0,0.412-0.338,0.75-0.75,0.75H3.062c-0.413,0-0.75-0.338-0.75-0.75v-16c0-0.413,0.337-0.75,0.75-0.75h24.75c0.412,0,0.75,0.337,0.75,0.75V20.062zM20.518,28.4c-0.033-0.035-0.062-0.055-0.068-0.062l-0.01-0.004l-0.008-0.004c0,0-0.046-0.021-0.119-0.062c-0.108-0.056-0.283-0.144-0.445-0.237c-0.162-0.097-0.32-0.199-0.393-0.271c-0.008-0.014-0.035-0.079-0.058-0.17c-0.083-0.32-0.161-0.95-0.22-1.539h-7.5c-0.023,0.23-0.048,0.467-0.076,0.691c-0.035,0.272-0.073,0.524-0.113,0.716c-0.02,0.096-0.039,0.175-0.059,0.23c-0.009,0.025-0.018,0.05-0.024,0.062c-0.003,0.006-0.005,0.01-0.007,0.013c-0.094,0.096-0.34,0.246-0.553,0.36c-0.107,0.062-0.209,0.11-0.283,0.146c-0.074,0.037-0.119,0.062-0.119,0.062l-0.007,0.004l-0.008,0.004c-0.01,0.009-0.038,0.022-0.07,0.062c-0.031,0.037-0.067,0.103-0.067,0.185c0.002,0.002-0.004,0.037-0.006,0.088c0,0.043,0.007,0.118,0.068,0.185c0.061,0.062,0.143,0.08,0.217,0.08h9.716c0.073,0,0.153-0.021,0.215-0.08c0.062-0.063,0.068-0.142,0.068-0.185c-0.001-0.051-0.008-0.086-0.007-0.088C20.583,28.503,20.548,28.439,20.518,28.4z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.SetFigure\r\n */\r\ndraw2d.shape.icon.Icon = draw2d.SetFigure.extend(\r\n /** @lends draw2d.shape.icon.Icon.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Icon\",\r\n\r\n /**\r\n *\r\n * Creates a new figure element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({\r\n width: 50,\r\n height: 50,\r\n color:\"#333333\",\r\n bgColor:null\r\n }, attr), setter, getter)\r\n this.keepAspectRatio = false\r\n },\r\n\r\n /**\r\n * \r\n * propagate all attributes like color, stroke,... to the shape element\r\n **/\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n this.svgNodes?.attr({fill: this.color.rgba(), stroke: \"none\"})\r\n\r\n this._super(attributes)\r\n },\r\n\r\n applyTransformation: function () {\r\n let trans = []\r\n\r\n if (this.rotationAngle !== 0) {\r\n trans.push(\"R\" + this.rotationAngle)\r\n }\r\n\r\n if (this.getRotationAngle() === 90 || this.getRotationAngle() === 270) {\r\n let ratio = this.getHeight() / this.getWidth()\r\n trans.push(\"T\" + (-this.offsetY) + \",\" + (-this.offsetX))\r\n trans.push(\"S\" + ratio + \",\" + 1 / ratio + \",0,0\")\r\n }\r\n else {\r\n trans.push(\"T\" + (-this.offsetX) + \",\" + (-this.offsetY))\r\n\r\n }\r\n if (this.isResizeable() === true) {\r\n trans.push(\r\n \"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY() +\r\n \"S\" + this.scaleX + \",\" + this.scaleY + \",\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY()\r\n )\r\n }\r\n else {\r\n trans.push(\"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n }\r\n\r\n this.svgNodes.transform(trans.join(\" \"))\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @private\r\n */\r\n createShapeElement: function () {\r\n let shape = this._super()\r\n\r\n let bb = this.svgNodes.getBBox()\r\n\r\n this.offsetX = bb.x\r\n this.offsetY = bb.y\r\n\r\n return shape\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Icons();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Icons = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Icons.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Icons\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.083,14H14V4.083H4.083V14zM17,4.083V14h9.917V4.083H17zM17,26.917h9.917v-9.918H17V26.917zM4.083,26.917H14v-9.918H4.083V26.917z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ie();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ie = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ie.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Ie\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.998,2.266c-2.12-1.91-6.925,0.382-9.575,1.93c-0.76-0.12-1.557-0.185-2.388-0.185c-3.349,0-6.052,0.985-8.106,2.843c-2.336,2.139-3.631,4.94-3.631,8.177c0,0.028,0.001,0.056,0.001,0.084c3.287-5.15,8.342-7.79,9.682-8.487c0.212-0.099,0.338,0.155,0.141,0.253c-0.015,0.042-0.015,0,0,0c-2.254,1.35-6.434,5.259-9.146,10.886l-0.003-0.007c-1.717,3.547-3.167,8.529-0.267,10.358c2.197,1.382,6.13-0.248,9.295-2.318c0.764,0.108,1.567,0.165,2.415,0.165c5.84,0,9.937-3.223,11.399-7.924l-8.022-0.014c-0.337,1.661-1.464,2.548-3.223,2.548c-2.21,0-3.729-1.211-3.828-4.012l15.228-0.014c0.028-0.578-0.042-0.985-0.042-1.436c0-5.251-3.143-9.355-8.255-10.663c2.081-1.294,5.974-3.209,7.848-1.681c1.407,1.14,0.633,3.533,0.295,4.518c-0.056,0.254,0.24,0.296,0.296,0.057C28.814,5.573,29.026,3.194,27.998,2.266zM13.272,25.676c-2.469,1.475-5.873,2.539-7.539,1.289c-1.243-0.935-0.696-3.468,0.398-5.938c0.664,0.992,1.495,1.886,2.473,2.63C9.926,24.651,11.479,25.324,13.272,25.676zM12.714,13.046c0.042-2.435,1.787-3.49,3.617-3.49c1.928,0,3.49,1.112,3.49,3.49H12.714z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ie9();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ie9 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ie9.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ie9\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.751,17.887c0.054-0.434,0.081-0.876,0.081-1.324c0-1.744-0.413-3.393-1.146-4.854c1.133-2.885,1.155-5.369-0.201-6.777c-1.756-1.822-5.391-1.406-9.433,0.721c-0.069-0.001-0.138-0.003-0.206-0.003c-6.069,0-10.988,4.888-10.988,10.917c0,0.183,0.005,0.354,0.014,0.529c-2.688,4.071-3.491,7.967-1.688,9.838c1.557,1.613,4.691,1.344,8.2-0.392c1.363,0.604,2.873,0.938,4.462,0.938c4.793,0,8.867-3.049,10.369-7.299H21.26c-0.814,1.483-2.438,2.504-4.307,2.504c-2.688,0-4.867-2.104-4.867-4.688c0-0.036,0.002-0.071,0.003-0.106h15.662V17.887zM26.337,6.099c0.903,0.937,0.806,2.684-0.087,4.818c-1.27-2.083-3.221-3.71-5.546-4.576C23.244,5.217,25.324,5.047,26.337,6.099zM16.917,10.372c2.522,0,4.585,1.991,4.748,4.509h-9.496C12.333,12.363,14.396,10.372,16.917,10.372zM5.687,26.501c-1.103-1.146-0.712-3.502,0.799-6.298c0.907,2.546,2.736,4.658,5.09,5.938C8.92,27.368,6.733,27.587,5.687,26.501z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Import();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Import = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Import.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Import\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.067,2.25c-5.979,0-11.035,3.91-12.778,9.309h3.213c1.602-3.705,5.271-6.301,9.565-6.309c5.764,0.01,10.428,4.674,10.437,10.437c-0.009,5.764-4.673,10.428-10.437,10.438c-4.294-0.007-7.964-2.605-9.566-6.311H2.289c1.744,5.399,6.799,9.31,12.779,9.312c7.419-0.002,13.437-6.016,13.438-13.438C28.504,8.265,22.486,2.252,15.067,2.25zM10.918,19.813l7.15-4.126l-7.15-4.129v2.297H-0.057v3.661h10.975V19.813z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.InkScape();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.InkScape = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.InkScape.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.InkScape\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.402,17.626c0.84-0.772,2.468-0.381,5.979-1.853c1.716-0.72,1.572-1.265,1.566-1.928c-0.001-0.014,0-0.027,0-0.041h-0.005c-0.012-0.667-0.291-1.332-0.846-1.845L17.049,2.684c-0.566-0.522-1.304-0.782-2.042-0.782V1.898c-0.738,0-1.475,0.261-2.04,0.783l-10.05,9.276c-0.554,0.512-0.832,1.176-0.843,1.844H2.07c0,0,0.003,0.011,0.004,0.011c0,0.012-0.004,0.024-0.004,0.034h0.017c0.193,0.676,5.164,1.536,5.718,2.049c0.838,0.774-3.211,1.339-2.374,2.114c0.838,0.773,5.062,1.496,5.898,2.271c0.838,0.771-1.711,1.596-0.874,2.366c0.837,0.773,3.651-0.191,3.142,1.822c1.13,1.045,3.49,0.547,5.071-0.498c0.837-0.771-1.607-0.703-0.77-1.477c0.836-0.774,2.949-0.777,4.73-2.627C21.913,18.838,19.566,18.398,20.402,17.626zM10.973,16.868l-0.42-0.504c1.497,0.358,3.162,0.827,4.498,0.837l0.058,0.554C13.964,17.646,11.544,17.137,10.973,16.868zM18.161,8.58l-1.396-0.74L14.53,9.594l-1.067-3.192l-1.177,2.545L8.998,9.25l0.036-1.352c0-0.324,1.895-2.596,3.05-3.136l2.112-1.401c0.312-0.186,0.53-0.261,0.727-0.257c0.327,0.011,0.593,0.239,1.112,0.55l4.748,3.25c0.357,0.215,0.619,0.522,0.626,0.898l-2.813-1.254L18.161,8.58zM26.434,19.594c-0.313-0.07-1.688-0.691-2.035,0.165c0.968,0.981,2.645,2.181,3.316,1.482C28.391,20.543,27.102,19.745,26.434,19.594zM4.663,21.566c-0.315,0.074-1.842,0.115-1.719,1.021c1.351,0.451,3.438,0.792,3.684-0.113C6.873,21.566,5.33,21.414,4.663,21.566zM17.877,26.396c-0.232,0.209-1.53,0.953-0.929,1.681c1.413-0.236,3.403-0.914,3.12-1.812C19.786,25.369,18.37,25.953,17.877,26.396z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ipad();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ipad = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ipad.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ipad\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.221,1.417H6.11c-0.865,0-1.566,0.702-1.566,1.566v25.313c0,0.865,0.701,1.565,1.566,1.565h19.111c0.865,0,1.565-0.7,1.565-1.565V2.984C26.787,2.119,26.087,1.417,25.221,1.417zM15.666,29.299c-0.346,0-0.626-0.279-0.626-0.625s0.281-0.627,0.626-0.627c0.346,0,0.627,0.281,0.627,0.627S16.012,29.299,15.666,29.299zM24.376,26.855c0,0.174-0.142,0.312-0.313,0.312H7.27c-0.173,0-0.313-0.142-0.313-0.312V4.3c0-0.173,0.14-0.313,0.313-0.313h16.792c0.172,0,0.312,0.14,0.312,0.313L24.376,26.855L24.376,26.855z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Iphone();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Iphone = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Iphone.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Iphone\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.755,1H10.62C9.484,1,8.562,1.921,8.562,3.058v24.385c0,1.136,0.921,2.058,2.058,2.058h10.135c1.136,0,2.058-0.922,2.058-2.058V3.058C22.812,1.921,21.891,1,20.755,1zM14.659,3.264h2.057c0.101,0,0.183,0.081,0.183,0.18c0,0.1-0.082,0.18-0.183,0.18h-2.057c-0.1,0-0.181-0.081-0.181-0.18C14.478,3.344,14.559,3.264,14.659,3.264zM13.225,3.058c0.199,0,0.359,0.162,0.359,0.36c0,0.198-0.161,0.36-0.359,0.36c-0.2,0-0.36-0.161-0.36-0.36S13.025,3.058,13.225,3.058zM15.688,28.473c-0.796,0-1.44-0.646-1.44-1.438c0-0.799,0.645-1.439,1.44-1.439s1.44,0.646,1.44,1.439S16.483,28.473,15.688,28.473zM22.041,24.355c0,0.17-0.139,0.309-0.309,0.309H9.642c-0.17,0-0.308-0.139-0.308-0.309V6.042c0-0.17,0.138-0.309,0.308-0.309h12.09c0.17,0,0.309,0.138,0.309,0.309V24.355z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.JQuery();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.JQuery = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.JQuery.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.JQuery\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.322,23.041C4.579,18.723,2.777,11.07,5.494,4.583c-0.254,0.291-0.502,0.59-0.739,0.904c-5.177,6.887-4.008,16.505,2.613,21.482c6.62,4.979,16.184,3.432,21.362-3.455c0.237-0.314,0.454-0.635,0.663-0.959C23.915,26.963,16.064,27.357,10.322,23.041zM13.662,18.598c4.765,3.582,11.604,2.564,15.567-2.198c-3.609,2.641-9.09,2.475-13.361-0.736S9.916,7.231,11.451,3.03C7.976,8.161,8.897,15.015,13.662,18.598zM18.642,11.976c3.254,2.447,8.146,1.438,10.967-2.242c-2.604,1.921-6.341,1.955-9.157-0.164c-2.819-2.118-3.826-5.718-2.701-8.754C14.998,4.549,15.387,9.528,18.642,11.976z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Jigsaw();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Jigsaw = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Jigsaw.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Jigsaw\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M3.739,13.619c0,0,3.516-4.669,5.592-3.642c2.077,1.027-0.414,2.795,1.598,3.719c2.011,0.924,5.048-0.229,4.376-2.899c-0.672-2.67-1.866-0.776-2.798-2.208c-0.934-1.432,4.586-4.59,4.586-4.59s3.361,6.651,4.316,4.911c1.157-2.105,3.193-4.265,5.305-1.025c0,0,1.814,2.412,0.246,3.434s-2.917,0.443-3.506,1.553c-0.586,1.112,3.784,4.093,3.784,4.093s-2.987,4.81-4.926,3.548c-1.939-1.262,0.356-3.364-2.599-3.989c-1.288-0.23-3.438,0.538-3.818,2.34c-0.13,2.709,1.604,2.016,2.797,3.475c1.191,1.457-4.484,4.522-4.484,4.522s-1.584-3.923-3.811-4.657c-2.227-0.735-0.893,2.135-2.917,2.531c-2.024,0.396-4.816-2.399-3.46-4.789c1.358-2.391,3.275-0.044,3.441-1.951C7.629,16.087,3.739,13.619,3.739,13.619z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Key();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Key = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Key.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Key\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M18.386,16.009l0.009-0.006l-0.58-0.912c1.654-2.226,1.876-5.319,0.3-7.8c-2.043-3.213-6.303-4.161-9.516-2.118c-3.212,2.042-4.163,6.302-2.12,9.517c1.528,2.402,4.3,3.537,6.944,3.102l0.424,0.669l0.206,0.045l0.779-0.447l-0.305,1.377l2.483,0.552l-0.296,1.325l1.903,0.424l-0.68,3.06l1.406,0.313l-0.424,1.906l4.135,0.918l0.758-3.392L18.386,16.009z M10.996,8.944c-0.685,0.436-1.593,0.233-2.029-0.452C8.532,7.807,8.733,6.898,9.418,6.463s1.594-0.233,2.028,0.452C11.883,7.6,11.68,8.509,10.996,8.944z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Lab();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Lab = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Lab.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Lab\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.121,24.438l-3.362-7.847c-0.329-0.769-0.599-2.081-0.599-2.917s0.513-1.521,1.14-1.521s1.141-0.513,1.141-1.14s-0.685-1.14-1.521-1.14h-6.84c-0.836,0-1.52,0.513-1.52,1.14s0.513,1.14,1.14,1.14s1.14,0.685,1.14,1.521s-0.269,2.148-0.599,2.917l-3.362,7.847C8.55,25.206,8.28,26.177,8.28,26.595s0.342,1.103,0.76,1.521s1.444,0.76,2.28,0.76h8.359c0.836,0,1.862-0.342,2.28-0.76s0.76-1.103,0.76-1.521S22.45,25.206,22.121,24.438zM16.582,7.625c0,0.599,0.484,1.083,1.083,1.083s1.083-0.484,1.083-1.083s-0.484-1.084-1.083-1.084S16.582,7.026,16.582,7.625zM13.667,7.792c0.276,0,0.5-0.224,0.5-0.5s-0.224-0.5-0.5-0.5s-0.5,0.224-0.5,0.5S13.391,7.792,13.667,7.792zM15.584,5.292c0.874,0,1.583-0.709,1.583-1.583c0-0.875-0.709-1.584-1.583-1.584C14.709,2.125,14,2.834,14,3.709C14,4.583,14.709,5.292,15.584,5.292z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Lamp();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Lamp = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Lamp.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Lamp\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,2.833c-3.866,0-7,3.134-7,7c0,3.859,3.945,4.937,4.223,9.499h5.553c0.278-4.562,4.224-5.639,4.224-9.499C22.5,5.968,19.366,2.833,15.5,2.833zM15.5,28.166c1.894,0,2.483-1.027,2.667-1.666h-5.334C13.017,27.139,13.606,28.166,15.5,28.166zM12.75,25.498h5.5v-5.164h-5.5V25.498z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Lamp_alt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Lamp_alt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Lamp_alt.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Lamp_alt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M12.75,25.498h5.5v-5.164h-5.5V25.498zM15.5,28.166c1.894,0,2.483-1.027,2.667-1.666h-5.334C13.017,27.139,13.606,28.166,15.5,28.166zM15.5,2.833c-3.866,0-7,3.134-7,7c0,3.859,3.945,4.937,4.223,9.499h1.271c-0.009-0.025-0.024-0.049-0.029-0.078L11.965,8.256c-0.043-0.245,0.099-0.485,0.335-0.563c0.237-0.078,0.494,0.026,0.605,0.25l0.553,1.106l0.553-1.106c0.084-0.17,0.257-0.277,0.446-0.277c0.189,0,0.362,0.107,0.446,0.277l0.553,1.106l0.553-1.106c0.084-0.17,0.257-0.277,0.448-0.277c0.189,0,0.36,0.107,0.446,0.277l0.554,1.106l0.553-1.106c0.111-0.224,0.368-0.329,0.604-0.25s0.377,0.318,0.333,0.563l-1.999,10.998c-0.005,0.029-0.02,0.053-0.029,0.078h1.356c0.278-4.562,4.224-5.639,4.224-9.499C22.5,5.968,19.366,2.833,15.5,2.833zM17.458,10.666c-0.191,0-0.364-0.107-0.446-0.275l-0.554-1.106l-0.553,1.106c-0.086,0.168-0.257,0.275-0.446,0.275c-0.191,0-0.364-0.107-0.449-0.275l-0.553-1.106l-0.553,1.106c-0.084,0.168-0.257,0.275-0.446,0.275c-0.012,0-0.025,0-0.037-0.001l1.454,8.001h1.167l1.454-8.001C17.482,10.666,17.47,10.666,17.458,10.666z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Landing();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Landing = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Landing.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Landing\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.322,19.491c0,0,1.903,0.342,0.299-1.869c-1.353-1.866-5.261-3.104-5.261-3.104l-4.213-8.229l-2.47-0.394l0.973,5.449L9.241,10.11L8.772,7.273L7.008,6.302c0,0-0.496,2.742-0.149,5.271C6.859,11.573,13.965,17.999,23.322,19.491zM3.251,23.106v1.998h24.498v-1.998H3.251zM14,17.94c0,0.414,0.336,0.75,0.75,0.75s0.75-0.336,0.75-0.75s-0.336-0.75-0.75-0.75S14,17.526,14,17.94z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Landscape1();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Landscape1 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Landscape1.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Landscape1\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M19.883,5.71H2.746c-0.163,0-0.319,0.071-0.435,0.188c-0.118,0.117-0.18,0.272-0.18,0.435v18.364c0,0.164,0.063,0.318,0.18,0.436c0.123,0.117,0.287,0.18,0.435,0.18h25.75c0.164,0,0.324-0.066,0.438-0.18c0.118-0.114,0.182-0.273,0.182-0.436V14.551c-0.002-0.102-0.01-0.188-0.021-0.271c-0.186-1.543-1.543-3.424-3.236-5.168C24.039,7.31,21.869,5.753,19.883,5.71zM26.914,12.314c-0.008-0.005-0.019-0.007-0.029-0.01c-1.092-0.293-2.33-0.355-3.199-0.355c-0.162,0-0.312,0.002-0.445,0.004c-0.037-0.604-0.129-1.604-0.356-2.625c-0.11-0.461-0.246-0.94-0.433-1.42c0.857,0.541,1.748,1.264,2.535,2.068C25.74,10.718,26.41,11.551,26.914,12.314zM3.365,6.947h16.517c0.058,0,0.12,0,0.183,0.004c0.694,0.105,1.307,1.221,1.616,2.646c0.335,1.484,0.354,2.997,0.354,3l0.007,0.656l0.651-0.051c0,0,0.398-0.027,0.99-0.025c0.809,0,1.977,0.062,2.871,0.312c0.939,0.275,1.352,0.635,1.326,1.051h0.002v9.542H3.365V6.951V6.947z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Landscape2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Landscape2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Landscape2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Landscape2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M19.883,5.71H2.746c-0.163,0-0.319,0.071-0.435,0.188c-0.118,0.117-0.18,0.272-0.18,0.435v18.364c0,0.164,0.063,0.318,0.18,0.436c0.123,0.117,0.287,0.18,0.435,0.18h25.75c0.164,0,0.324-0.066,0.438-0.18c0.118-0.114,0.182-0.273,0.182-0.436V14.551c-0.002-0.102-0.01-0.188-0.021-0.271c-0.186-1.543-1.543-3.424-3.236-5.168C24.039,7.31,21.869,5.753,19.883,5.71zM3.365,6.947h16.517c0.058,0,0.12,0,0.183,0.004c0.694,0.105,1.307,1.221,1.616,2.646c0.335,1.484,0.354,2.997,0.354,3l0.007,0.656l0.651-0.051c0,0,0.398-0.027,0.99-0.025c0.809,0,1.977,0.062,2.871,0.312c0.939,0.275,1.352,0.635,1.326,1.051h0.002v9.542H3.365V6.951V6.947z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.LineChart();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.LineChart = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.LineChart.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.LineChart\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M3.625,25.062c-0.539-0.115-0.885-0.646-0.77-1.187l0,0L6.51,6.584l2.267,9.259l1.923-5.188l3.581,3.741l3.883-13.103l2.934,11.734l1.96-1.509l5.271,11.74c0.226,0.504,0,1.095-0.505,1.321l0,0c-0.505,0.227-1.096,0-1.322-0.504l0,0l-4.23-9.428l-2.374,1.826l-1.896-7.596l-2.783,9.393l-3.754-3.924L8.386,22.66l-1.731-7.083l-1.843,8.711c-0.101,0.472-0.515,0.794-0.979,0.794l0,0C3.765,25.083,3.695,25.076,3.625,25.062L3.625,25.062z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Link();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Link = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Link.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Link\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16.45,18.085l-2.47,2.471c0.054,1.023-0.297,2.062-1.078,2.846c-1.465,1.459-3.837,1.459-5.302-0.002c-1.461-1.465-1.46-3.836-0.001-5.301c0.783-0.781,1.824-1.131,2.847-1.078l2.469-2.469c-2.463-1.057-5.425-0.586-7.438,1.426c-2.634,2.637-2.636,6.907,0,9.545c2.638,2.637,6.909,2.635,9.545,0l0.001,0.002C17.033,23.511,17.506,20.548,16.45,18.085zM14.552,12.915l2.467-2.469c-0.053-1.023,0.297-2.062,1.078-2.848C19.564,6.139,21.934,6.137,23.4,7.6c1.462,1.465,1.462,3.837,0,5.301c-0.783,0.783-1.822,1.132-2.846,1.079l-2.469,2.468c2.463,1.057,5.424,0.584,7.438-1.424c2.634-2.639,2.633-6.91,0-9.546c-2.639-2.636-6.91-2.637-9.545-0.001C13.967,7.489,13.495,10.451,14.552,12.915zM18.152,10.727l-7.424,7.426c-0.585,0.584-0.587,1.535,0,2.121c0.585,0.584,1.536,0.584,2.121-0.002l7.425-7.424c0.584-0.586,0.584-1.535,0-2.121C19.687,10.141,18.736,10.142,18.152,10.727z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.LinkedIn();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.LinkedIn = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.LinkedIn.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.LinkedIn\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.25,3.125h-22c-1.104,0-2,0.896-2,2v22c0,1.104,0.896,2,2,2h22c1.104,0,2-0.896,2-2v-22C29.25,4.021,28.354,3.125,27.25,3.125zM11.219,26.781h-4v-14h4V26.781zM9.219,11.281c-1.383,0-2.5-1.119-2.5-2.5s1.117-2.5,2.5-2.5s2.5,1.119,2.5,2.5S10.602,11.281,9.219,11.281zM25.219,26.781h-4v-8.5c0-0.4-0.403-1.055-0.687-1.213c-0.375-0.211-1.261-0.229-1.665-0.034l-1.648,0.793v8.954h-4v-14h4v0.614c1.583-0.723,3.78-0.652,5.27,0.184c1.582,0.886,2.73,2.864,2.73,4.702V26.781z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Linux();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Linux = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Linux.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Linux\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M11.791,25.229c1.027-0.104,1.162-1.191,0.68-1.666c-0.398-0.392-2.598-2.022-3.171-2.664C9.033,20.6,8.673,20.454,8.52,20.12c-0.352-0.771-0.598-1.869-0.151-2.658c0.081-0.144,0.133-0.078,0.071,0.22c-0.351,1.684,0.746,3.059,0.986,2.354c0.167-0.487,0.013-1.358,0.102-2.051c0.158-1.226,1.273-3.577,1.763-3.712c-0.755-1.398,0.886-2.494,0.866-3.723c-0.014-0.798,0.701,0.982,1.419,1.359c0.802,0.422,1.684-0.794,2.936-1.41c0.354-0.176,0.809-0.376,0.776-0.524c-0.146-0.718-1.644,0.886-2.979,0.939c-0.61,0.024-0.837-0.12-1.072-0.347c-0.712-0.689,0.073-0.115,1.132-0.307c0.471-0.085,0.629-0.163,1.128-0.365c0.5-0.201,1.069-0.5,1.636-0.654c0.395-0.106,0.361-0.402,0.208-0.491c-0.088-0.051-0.219-0.046-0.321,0.133c-0.244,0.419-1.383,0.661-1.74,0.771c-0.457,0.14-0.962,0.271-1.634,0.243c-1.021-0.042-0.782-0.509-1.513-0.928c-0.213-0.122-0.156-0.444,0.129-0.729c0.148-0.148,0.557-0.232,0.76-0.572c0.028-0.047,0.289-0.32,0.494-0.461c0.07-0.049,0.076-1.295-0.562-1.32c-0.543-0.021-0.697,0.398-0.675,0.818c0.022,0.419,0.245,0.765,0.393,0.764c0.285-0.004,0.019,0.311-0.138,0.361c-0.237,0.078-0.562-0.934-0.525-1.418c0.039-0.506,0.303-1.4,0.942-1.383c0.576,0.016,0.993,0.737,0.973,1.983c-0.003,0.211,0.935-0.101,1.247,0.229c0.224,0.236-0.767-2.207,1.438-2.375c0.582,0.111,1.14,0.305,1.371,1.641c-0.086,0.139,0.146,1.07-0.215,1.182c-0.438,0.135-0.707-0.02-0.453-0.438c0.172-0.418,0.004-1.483-0.882-1.42c-0.887,0.064-0.769,1.637-0.526,1.668c0.243,0.031,0.854,0.465,1.282,0.549c1.401,0.271,0.371,1.075,0.555,2.048c0.205,1.099,0.929,0.809,1.578,3.717c0.137,0.177,0.676,0.345,1.199,2.579c0.473,2.011-0.195,3.473,0.938,3.353c0.256-0.026,0.629-0.1,0.792-0.668c0.425-1.489-0.213-3.263-0.855-4.46c-0.375-0.698-0.729-1.174-0.916-1.337c0.738,0.436,1.683,1.829,1.898,2.862c0.286,1.358,0.49,1.934,0.059,3.37c0.25,0.125,0.871,0.39,0.871,0.685c-0.647-0.53-2.629-0.625-2.68,0.646c-0.338,0.008-0.594,0.034-0.811,0.293c-0.797,0.944-0.059,2.842-0.139,3.859c-0.07,0.896-0.318,1.783-0.46,2.683c-0.474-0.019-0.428-0.364-0.274-0.852c0.135-0.431,0.351-0.968,0.365-1.484c0.012-0.467-0.039-0.759-0.156-0.831c-0.118-0.072-0.303,0.074-0.559,0.485c-0.543,0.875-1.722,1.261-2.821,1.397c-1.099,0.138-2.123,0.028-2.664-0.578c-0.186-0.207-0.492,0.058-0.529,0.111c-0.049,0.074,0.18,0.219,0.352,0.533c0.251,0.461,0.49,1.159-0.105,1.479C12.83,26.314,12.316,26.221,11.791,25.229L11.791,25.229zM11.398,25.188c0.395,0.621,1.783,3.232-0.652,3.571c-0.814,0.114-2.125-0.474-3.396-0.784c-1.142-0.279-2.301-0.444-2.949-0.627c-0.391-0.108-0.554-0.25-0.588-0.414c-0.091-0.434,0.474-1.041,0.503-1.555c0.028-0.514-0.188-0.779-0.364-1.199c-0.177-0.42-0.224-0.734-0.081-0.914c0.109-0.141,0.334-0.199,0.698-0.164c0.462,0.047,1.02-0.049,1.319-0.23c0.505-0.309,0.742-0.939,0.516-1.699c0,0.744-0.244,1.025-0.855,1.366c-0.577,0.319-1.467,0.062-1.875,0.416c-0.492,0.427,0.175,1.528,0.12,2.338c-0.042,0.622-0.69,1.322-0.401,1.946c0.291,0.627,1.648,0.695,3.064,0.99c2.012,0.422,3.184,1.153,4.113,1.188c1.356,0.05,1.564-1.342,3.693-1.36c0.621-0.033,1.229-0.052,1.835-0.06c0.688-0.009,1.375-0.003,2.079,0.014c1.417,0.034,0.931,0.773,1.851,1.246c0.774,0.397,2.17,0.241,2.504-0.077c0.451-0.431,1.662-1.467,2.592-1.935c1.156-0.583,3.876-1.588,1.902-2.812c-0.461-0.285-1.547-0.588-1.639-2.676c-0.412,0.366-0.365,2.312,0.784,2.697c1.283,0.431,2.085,1.152-0.301,1.969c-1.58,0.54-1.849,0.706-3.099,1.747c-1.267,1.054-3.145,0.636-2.815-1.582c0.171-1.155,0.269-2.11-0.019-3.114c-0.142-0.49-0.211-1.119-0.114-1.562c0.187-0.858,0.651-1.117,1.106-0.293c0.285,0.519,0.385,1.122,1.408,1.171c1.607,0.077,1.926-1.553,2.439-1.627c0.343-0.05,0.686-1.02,0.425-2.589c-0.28-1.681-1.269-4.332-2.536-5.677c-1.053-1.118-1.717-2.098-2.135-3.497c-0.352-1.175-0.547-2.318-0.475-3.412c0.094-1.417-0.691-3.389-1.943-4.316c-0.782-0.581-2.011-0.893-3.122-0.88c-0.623,0.007-1.21,0.099-1.661,0.343c-1.855,1.008-2.113,2.445-2.086,4.088c0.025,1.543,0.078,3.303,0.254,4.977c-0.208,0.77-1.288,2.227-1.979,3.114C8.59,14.233,8.121,16.01,7.52,17.561c-0.321,0.828-0.862,1.2-0.908,2.265C6.6,20.122,6.61,20.891,6.894,20.672C7.98,19.829,9.343,21.95,11.398,25.188L11.398,25.188zM17.044,2.953c-0.06,0.176-0.3,0.321-0.146,0.443c0.152,0.123,0.24-0.171,0.549-0.281c0.08-0.028,0.449,0.012,0.519-0.164c0.03-0.077-0.19-0.164-0.321-0.291c-0.133-0.125-0.262-0.236-0.386-0.229C16.938,2.451,17.096,2.798,17.044,2.953L17.044,2.953zM18.934,9.35c0.115-0.121,0.174,0.207,0.483,0.402c0.244,0.154,0.481,0.04,0.545,0.354c0.044,0.225-0.097,0.467-0.284,0.436C19.35,10.486,18.596,9.705,18.934,9.35L18.934,9.35zM13.832,7.375c-0.508-0.037-0.543,0.33-0.375,0.324C13.629,7.693,13.523,7.408,13.832,7.375L13.832,7.375zM12.96,6.436c0.06-0.013,0.146,0.09,0.119,0.233c-0.037,0.199-0.021,0.324,0.117,0.325c0.022,0,0.048-0.005,0.056-0.057c0.066-0.396-0.14-0.688-0.225-0.711C12.834,6.178,12.857,6.458,12.96,6.436L12.96,6.436zM16.663,6.268c0.129,0.039,0.253,0.262,0.28,0.504c0.002,0.021,0.168-0.035,0.17-0.088c0.011-0.389-0.321-0.571-0.408-0.562C16.506,6.139,16.562,6.238,16.663,6.268L16.663,6.268zM14.765,7.423c0.463-0.214,0.625,0.118,0.465,0.171C15.066,7.648,15.065,7.345,14.765,7.423L14.765,7.423zM9.178,15.304c-0.219-0.026,0.063-0.19,0.184-0.397c0.131-0.227,0.105-0.511,0.244-0.469s0.061,0.2-0.033,0.461C9.491,15.121,9.258,15.313,9.178,15.304L9.178,15.304z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.List();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.List = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.List.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.List\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.082,4.083v2.999h22.835V4.083H4.082zM4.082,20.306h22.835v-2.999H4.082V20.306zM4.082,13.694h22.835v-2.999H4.082V13.694zM4.082,26.917h22.835v-2.999H4.082V26.917z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Location();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Location = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Location.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Location\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,3.5c-4.142,0-7.5,3.358-7.5,7.5c0,4.143,7.5,18.121,7.5,18.121S23.5,15.143,23.5,11C23.5,6.858,20.143,3.5,16,3.5z M16,14.584c-1.979,0-3.584-1.604-3.584-3.584S14.021,7.416,16,7.416S19.584,9.021,19.584,11S17.979,14.584,16,14.584z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Lock();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Lock = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Lock.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Lock\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.335,12.833V9.999h-0.001C22.333,6.501,19.498,3.666,16,3.666S9.666,6.502,9.666,10h0v2.833H7.375V25h17.25V12.833H22.335zM11.667,10C11.667,10,11.667,10,11.667,10c0-2.39,1.944-4.334,4.333-4.334c2.391,0,4.335,1.944,4.335,4.333c0,0,0,0,0,0v2.834h-8.668V10z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Locked();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Locked = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Locked.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Locked\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.711,14.085L16.914,4.29c-0.778-0.778-2.051-0.778-2.829,0L4.29,14.086c-0.778,0.778-0.778,2.05,0,2.829l9.796,9.796c0.778,0.777,2.051,0.777,2.829,0l9.797-9.797C27.488,16.136,27.488,14.863,26.711,14.085zM8.218,16.424c-0.4-0.153-0.687-0.533-0.687-0.987s0.287-0.834,0.687-0.987V16.424zM8.969,16.424v-1.974c0.4,0.152,0.687,0.533,0.687,0.987S9.369,16.272,8.969,16.424zM13.5,19.188l1.203-3.609c-0.689-0.306-1.172-0.994-1.172-1.797c0-1.087,0.881-1.969,1.969-1.969c1.087,0,1.969,0.881,1.969,1.969c0,0.803-0.482,1.491-1.172,1.797l1.203,3.609H13.5zM22.03,16.549c-0.399-0.152-0.687-0.533-0.687-0.986s0.287-0.834,0.687-0.987V16.549zM22.781,16.549v-1.973c0.4,0.152,0.688,0.533,0.688,0.987S23.182,16.397,22.781,16.549z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Magic();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Magic = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Magic.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Magic\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.043,4.649l-0.404-2.312l-1.59,1.727l-2.323-0.33l1.151,2.045l-1.032,2.108l2.302-0.463l1.686,1.633l0.271-2.332l2.074-1.099L23.043,4.649zM26.217,18.198l-0.182-1.25l-0.882,0.905l-1.245-0.214l0.588,1.118l-0.588,1.118l1.245-0.214l0.882,0.905l0.182-1.25l1.133-0.56L26.217,18.198zM4.92,7.672L5.868,7.3l0.844,0.569L6.65,6.853l0.802-0.627L6.467,5.97L6.118,5.013L5.571,5.872L4.553,5.908l0.647,0.786L4.92,7.672zM10.439,10.505l1.021-1.096l1.481,0.219l-0.727-1.31l0.667-1.341l-1.47,0.287l-1.069-1.048L10.16,7.703L8.832,8.396l1.358,0.632L10.439,10.505zM17.234,12.721c-0.588-0.368-1.172-0.618-1.692-0.729c-0.492-0.089-1.039-0.149-1.425,0.374L2.562,30.788h6.68l9.669-15.416c0.303-0.576,0.012-1.041-0.283-1.447C18.303,13.508,17.822,13.09,17.234,12.721zM13.613,21.936c-0.254-0.396-0.74-0.857-1.373-1.254c-0.632-0.396-1.258-0.634-1.726-0.69l4.421-7.052c0.064-0.013,0.262-0.021,0.543,0.066c0.346,0.092,0.785,0.285,1.225,0.562c0.504,0.313,0.908,0.677,1.133,0.97c0.113,0.145,0.178,0.271,0.195,0.335c0.002,0.006,0.004,0.011,0.004,0.015L13.613,21.936z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Magnet();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Magnet = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Magnet.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Magnet\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.812,19.5h5.002v-6.867c-0.028-1.706-0.61-3.807-2.172-5.841c-1.539-2.014-4.315-3.72-7.939-3.687C12.076,3.073,9.3,4.779,7.762,6.792C6.2,8.826,5.617,10.928,5.588,12.634V19.5h5v-6.866c-0.027-0.377,0.303-1.789,1.099-2.748c0.819-0.979,1.848-1.747,4.014-1.778c2.165,0.032,3.195,0.799,4.013,1.778c0.798,0.959,1.126,2.372,1.099,2.748V19.5L20.812,19.5zM25.814,25.579c0,0,0-2.354,0-5.079h-5.002c0,2.727,0,5.08,0,5.08l5.004-0.001H25.814zM5.588,25.58h5c0,0,0-2.354,0-5.08h-5C5.588,23.227,5.588,25.58,5.588,25.58z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Mail();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Mail = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Mail.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Mail\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.516,7.167H3.482l12.517,7.108L28.516,7.167zM16.74,17.303C16.51,17.434,16.255,17.5,16,17.5s-0.51-0.066-0.741-0.197L2.5,10.06v14.773h27V10.06L16.74,17.303z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Man();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Man = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Man.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Man\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.021,16.349c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.103,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.55,0.307,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.932,1.139,5.307,2.543,5.307c0.846,0,1.265-0.865,1.466-2.189c0.201,1.324,0.62,2.189,1.463,2.189c1.406,0,2.545-2.375,2.545-5.307c0-0.66-0.061-1.291-0.168-1.873c0.598,0.574,1.174,0.803,1.725,0.496C22.602,21.541,22.443,18.912,21.021,16.349zM15.808,13.757c2.362,0,4.278-1.916,4.278-4.279s-1.916-4.279-4.278-4.279c-2.363,0-4.28,1.916-4.28,4.279S13.445,13.757,15.808,13.757z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Merge();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Merge = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Merge.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Merge\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.342,15.5l-7.556-4.363v2.613h-1.411c-0.788-0.01-1.331-0.241-2.019-0.743c-1.021-0.745-2.094-2.181-3.551-3.568C13.367,8.06,11.291,6.73,8.5,6.749H2.812v3.5H8.5c2.231,0.012,3.441,1.185,5.07,2.934c0.697,0.753,1.428,1.58,2.324,2.323c-1.396,1.165-2.412,2.516-3.484,3.501c-1.183,1.081-2.202,1.723-3.912,1.741H2.813v3.5h5.716c3.752,0.001,6.035-2.319,7.619-4.066c0.817-0.895,1.537-1.691,2.209-2.191c0.686-0.502,1.23-0.732,2.017-0.742h1.412v2.614L29.342,15.5z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Mic();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Mic = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Mic.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Mic\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,21.125c2.682,0,4.875-2.25,4.875-5V5.875c0-2.75-2.193-5-4.875-5s-4.875,2.25-4.875,5v10.25C10.625,18.875,12.818,21.125,15.5,21.125zM21.376,11v5.125c0,3.308-2.636,6-5.876,6s-5.875-2.691-5.875-6V11H6.626v5.125c0,4.443,3.194,8.132,7.372,8.861v2.139h-3.372v3h9.749v-3h-3.376v-2.139c4.181-0.727,7.375-4.418,7.375-8.861V11H21.376z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.MicMute();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.MicMute = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.MicMute.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.MicMute\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.121,18.529c-0.317-0.736-0.496-1.549-0.496-2.404V11H6.626v5.125c0,1.693,0.466,3.275,1.272,4.627L10.121,18.529zM20.375,8.276V5.875c0-2.75-2.193-5-4.875-5s-4.875,2.25-4.875,5v10.25c0,0.568,0.113,1.105,0.285,1.615L20.375,8.276zM21.376,12.931v3.195c0,3.308-2.636,6-5.876,6c-0.958,0-1.861-0.24-2.661-0.657l-2.179,2.179c0.995,0.659,2.123,1.128,3.338,1.34v2.139h-3.372v3h9.749v-3h-3.376v-2.139c4.181-0.727,7.375-4.418,7.375-8.861V11h-1.068L21.376,12.931zM20.375,16.125v-2.194l-6.788,6.788c0.588,0.26,1.234,0.405,1.913,0.405C18.182,21.125,20.375,18.875,20.375,16.125zM25.542,4.522L4.855,25.209l1.415,1.416L26.956,5.937L25.542,4.522z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Minus();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Minus = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Minus.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Minus\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.979,12.896,5.979,12.896,5.979,19.562,25.979,19.562z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.NewWindow();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.NewWindow = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.NewWindow.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.NewWindow\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M5.896,5.333V21.25h23.417V5.333H5.896zM26.312,18.25H8.896V8.334h17.417V18.25L26.312,18.25zM4.896,9.542H1.687v15.917h23.417V22.25H4.896V9.542z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.No();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.No = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.No.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.No\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,2.939C9.006,2.942,3.338,8.61,3.335,15.605C3.335,22.6,9.005,28.268,16,28.27c6.994-0.002,12.662-5.67,12.664-12.664C28.663,8.61,22.995,2.939,16,2.939zM25.663,15.605c-0.003,1.943-0.583,3.748-1.569,5.264L10.736,7.513c1.515-0.988,3.32-1.569,5.265-1.573C21.337,5.951,25.654,10.269,25.663,15.605zM6.335,15.605c0.004-1.943,0.584-3.75,1.573-5.266l13.355,13.357c-1.516,0.986-3.32,1.566-5.264,1.569C10.664,25.26,6.346,20.941,6.335,15.605z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.NoMagnet();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.NoMagnet = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.NoMagnet.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.NoMagnet\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.59,17.857v-5.225c-0.027-0.376,0.303-1.789,1.099-2.748c0.819-0.979,1.849-1.748,4.014-1.778c1.704,0.026,2.699,0.508,3.447,1.189l3.539-3.539c-1.616-1.526-4.01-2.679-6.986-2.652C12.077,3.073,9.3,4.779,7.762,6.793C6.2,8.826,5.617,10.928,5.59,12.634V19.5h3.357L10.59,17.857zM5.59,20.5v2.357L7.947,20.5H5.59zM20.812,13.29v6.21h5.002v-6.866c-0.021-1.064-0.252-2.283-0.803-3.542L20.812,13.29zM25.339,4.522L4.652,25.209l1.415,1.416L26.753,5.937L25.339,4.522zM20.812,25.58h5.002c0,0,0-2.354,0-5.08h-5.002C20.812,23.227,20.812,25.58,20.812,25.58zM10.59,25.58c0,0,0-0.827,0-2.064L8.525,25.58H10.59z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.NodeJs();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.NodeJs = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.NodeJs.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.NodeJs\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.783,4.458L2.59,3.196C2.553,3.174,2.511,3.163,2.469,3.161H2.447C2.405,3.163,2.363,3.174,2.326,3.196L0.133,4.458C0.051,4.505,0,4.593,0,4.688l0.005,3.398c0,0.047,0.024,0.092,0.066,0.114c0.041,0.024,0.091,0.024,0.132,0l1.303-0.746c0.083-0.049,0.132-0.136,0.132-0.229V5.637c0-0.095,0.05-0.183,0.132-0.229l0.555-0.32c0.041-0.023,0.086-0.035,0.132-0.035c0.045,0,0.092,0.012,0.132,0.035l0.555,0.32c0.082,0.047,0.133,0.135,0.133,0.229v1.588c0,0.094,0.051,0.182,0.132,0.229l1.303,0.746c0.041,0.024,0.092,0.024,0.132,0c0.041-0.022,0.066-0.067,0.066-0.114l0.004-3.398C4.915,4.593,4.865,4.505,4.783,4.458zM17.93,0.745l-1.305-0.729c-0.042-0.023-0.091-0.022-0.132,0.001c-0.041,0.024-0.065,0.067-0.065,0.114v3.365c0,0.033-0.018,0.064-0.046,0.081s-0.064,0.017-0.093,0l-0.549-0.316c-0.082-0.047-0.183-0.047-0.265,0l-2.193,1.266c-0.082,0.047-0.133,0.135-0.133,0.229V7.29c0,0.095,0.051,0.182,0.132,0.229l2.194,1.267c0.082,0.048,0.183,0.048,0.265,0l2.194-1.267c0.082-0.048,0.133-0.135,0.133-0.229V0.977C18.066,0.88,18.014,0.792,17.93,0.745zM16.421,6.458c0,0.023-0.013,0.045-0.033,0.057l-0.753,0.435c-0.021,0.012-0.045,0.012-0.066,0l-0.753-0.435c-0.021-0.012-0.033-0.034-0.033-0.057v-0.87c0-0.023,0.013-0.045,0.033-0.058l0.753-0.435c0.021-0.012,0.045-0.012,0.066,0l0.753,0.435c0.021,0.012,0.033,0.034,0.033,0.058V6.458zM24.473,4.493l-2.18-1.266c-0.082-0.047-0.183-0.048-0.265,0l-2.193,1.266c-0.082,0.047-0.132,0.135-0.132,0.229v2.532c0,0.096,0.051,0.184,0.133,0.23l2.18,1.242c0.08,0.045,0.179,0.046,0.26,0.001l1.318-0.732c0.042-0.023,0.067-0.067,0.068-0.115c0-0.048-0.025-0.092-0.066-0.116l-2.207-1.266c-0.041-0.023-0.066-0.067-0.066-0.115V5.59c0-0.047,0.025-0.091,0.065-0.115l0.688-0.396c0.041-0.024,0.091-0.024,0.132,0l0.688,0.396c0.041,0.023,0.066,0.067,0.066,0.115v0.625c0,0.047,0.025,0.091,0.066,0.114c0.041,0.024,0.092,0.024,0.132,0l1.314-0.764c0.081-0.047,0.132-0.135,0.132-0.229V4.722C24.605,4.628,24.555,4.541,24.473,4.493zM11.363,4.48L9.169,3.214c-0.082-0.047-0.183-0.047-0.265,0L6.711,4.48C6.629,4.527,6.579,4.615,6.579,4.709v2.534c0,0.095,0.051,0.182,0.133,0.229l2.193,1.267c0.082,0.048,0.183,0.048,0.265,0l2.193-1.267c0.082-0.048,0.132-0.135,0.132-0.229V4.709C11.495,4.615,11.445,4.527,11.363,4.48zM31.019,4.382L28.95,3.187c-0.13-0.074-0.304-0.074-0.435,0l-2.068,1.195c-0.135,0.077-0.218,0.222-0.218,0.377v2.386c0,0.156,0.083,0.301,0.218,0.378l0.542,0.312c0.263,0.13,0.356,0.13,0.477,0.13c0.389,0,0.612-0.236,0.612-0.646V4.962c0-0.033-0.027-0.06-0.06-0.06h-0.263c-0.033,0-0.061,0.026-0.061,0.06v2.356c0,0.182-0.188,0.363-0.495,0.209l-0.566-0.326c-0.021-0.012-0.033-0.033-0.033-0.057V4.759c0-0.023,0.013-0.045,0.033-0.057l2.067-1.193c0.019-0.011,0.044-0.011,0.063,0l2.067,1.193c0.02,0.012,0.032,0.034,0.032,0.057v2.386c0,0.023-0.013,0.046-0.032,0.057l-2.068,1.193c-0.018,0.012-0.045,0.012-0.063,0l-0.53-0.314c-0.017-0.01-0.036-0.013-0.052-0.004c-0.146,0.083-0.175,0.094-0.312,0.143c-0.034,0.012-0.084,0.031,0.019,0.09l0.691,0.408c0.065,0.038,0.141,0.059,0.217,0.059s0.151-0.021,0.218-0.059l2.068-1.194c0.134-0.078,0.217-0.222,0.217-0.378V4.759C31.235,4.604,31.152,4.459,31.019,4.382zM29.371,6.768c-0.548,0-0.668-0.138-0.708-0.41c-0.005-0.029-0.029-0.051-0.06-0.051h-0.268c-0.033,0-0.06,0.026-0.06,0.06c0,0.349,0.189,0.765,1.095,0.765c0.655,0,1.031-0.259,1.031-0.709c0-0.447-0.302-0.566-0.938-0.65c-0.643-0.085-0.708-0.128-0.708-0.279c0-0.125,0.056-0.29,0.531-0.29c0.425,0,0.581,0.091,0.646,0.378c0.006,0.027,0.03,0.047,0.059,0.047h0.269c0.017,0,0.032-0.007,0.044-0.019c0.011-0.013,0.017-0.029,0.016-0.046c-0.042-0.493-0.37-0.723-1.032-0.723c-0.59,0-0.941,0.249-0.941,0.666c0,0.453,0.35,0.578,0.916,0.634c0.677,0.066,0.729,0.166,0.729,0.298C29.992,6.669,29.807,6.768,29.371,6.768zM22.128,5.446l-0.42,0.243c-0.016,0.009-0.025,0.026-0.025,0.044v0.486c0,0.019,0.01,0.035,0.025,0.044l0.42,0.243c0.016,0.009,0.035,0.009,0.052,0l0.421-0.243c0.016-0.009,0.025-0.025,0.025-0.044V5.733c0-0.018-0.01-0.035-0.025-0.044L22.18,5.446C22.163,5.438,22.144,5.438,22.128,5.446z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Notebook();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Notebook = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Notebook.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Notebook\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.875,1.375H8c-1.033,0-1.874,0.787-1.979,1.792h1.604c1.102,0,2,0.898,2,2c0,1.102-0.898,2-2,2H6v0.999h1.625c1.104,0,2.002,0.898,2.002,2.002c0,1.104-0.898,2.001-2.002,2.001H6v0.997h1.625c1.102,0,2,0.898,2,2c0,1.104-0.898,2.004-2,2.004H6v0.994h1.625c1.102,0,2,0.898,2,2.002s-0.898,2.002-2,2.002H6v0.997h1.624c1.104,0,2.002,0.897,2.002,2.001c0,1.104-0.898,2.002-2.002,2.002H6.004C6.027,28.252,6.91,29.125,8,29.125h16.875c1.104,0,2-0.896,2-2V3.375C26.875,2.271,25.979,1.375,24.875,1.375zM25.25,8.375c0,0.552-0.447,1-1,1H14c-0.553,0-1-0.448-1-1V4c0-0.552,0.447-1,1-1h10.25c0.553,0,1,0.448,1,1V8.375zM8.625,25.166c0-0.554-0.449-1.001-1-1.001h-3.25c-0.552,0-1,0.447-1,1.001c0,0.552,0.449,1,1,1h3.25C8.176,26.166,8.625,25.718,8.625,25.166zM4.375,6.166h3.251c0.551,0,0.999-0.448,0.999-0.999c0-0.555-0.448-1-0.999-1H4.375c-0.553,0-1,0.445-1,1C3.374,5.718,3.822,6.166,4.375,6.166zM4.375,11.167h3.25c0.553,0,1-0.448,1-1s-0.448-1-1-1h-3.25c-0.553,0-1,0.448-1,1S3.822,11.167,4.375,11.167zM4.375,16.167h3.25c0.551,0,1-0.448,1-1.001s-0.448-0.999-1-0.999h-3.25c-0.553,0-1.001,0.446-1.001,0.999S3.822,16.167,4.375,16.167zM3.375,20.165c0,0.553,0.446,1.002,1,1.002h3.25c0.551,0,1-0.449,1-1.002c0-0.552-0.448-1-1-1h-3.25C3.821,19.165,3.375,19.613,3.375,20.165z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Noview();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Noview = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Noview.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Noview\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M11.478,17.568c-0.172-0.494-0.285-1.017-0.285-1.568c0-2.65,2.158-4.807,4.807-4.807c0.552,0,1.074,0.113,1.568,0.285l2.283-2.283C18.541,8.647,17.227,8.286,16,8.286C8.454,8.286,2.5,16,2.5,16s2.167,2.791,5.53,5.017L11.478,17.568zM23.518,11.185l-3.056,3.056c0.217,0.546,0.345,1.138,0.345,1.76c0,2.648-2.158,4.807-4.807,4.807c-0.622,0-1.213-0.128-1.76-0.345l-2.469,2.47c1.327,0.479,2.745,0.783,4.229,0.783c5.771,0,13.5-7.715,13.5-7.715S26.859,13.374,23.518,11.185zM25.542,4.917L4.855,25.604L6.27,27.02L26.956,6.332L25.542,4.917z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Opera();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Opera = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Opera.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Opera\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.954,2.046c-7.489,0-12.872,5.432-12.872,13.581c0,7.25,5.234,13.835,12.873,13.835c7.712,0,12.974-6.583,12.974-13.835C28.929,7.413,23.375,2.046,15.954,2.046zM15.952,26.548L15.952,26.548c-2.289,0-3.49-1.611-4.121-3.796c-0.284-1.037-0.458-2.185-0.563-3.341c-0.114-1.374-0.129-2.773-0.129-4.028c0-0.993,0.018-1.979,0.074-2.926c0.124-1.728,0.386-3.431,0.89-4.833c0.694-1.718,1.871-2.822,3.849-2.822c2.5,0,3.763,1.782,4.385,4.322c0.429,1.894,0.56,4.124,0.56,6.274c0,2.299-0.103,5.153-0.763,7.442C19.473,24.979,18.242,26.548,15.952,26.548z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Package();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Package = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Package.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Package\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M17.078,22.004l-1.758-4.129l-2.007,4.752l-7.519-3.289l0.174,3.905l9.437,4.374l10.909-5.365l-0.149-4.989L17.078,22.004zM29.454,6.619L18.521,3.383l-3.006,2.671l-3.091-2.359L1.546,8.199l3.795,3.048l-3.433,5.302l10.879,4.757l2.53-5.998l2.257,5.308l11.393-5.942l-3.105-4.709L29.454,6.619zM15.277,14.579l-9.059-3.83l9.275-4.101l9.608,3.255L15.277,14.579z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Page();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Page = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Page.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Page\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.024,5.673c-1.744-1.694-3.625-3.051-5.168-3.236c-0.084-0.012-0.171-0.019-0.263-0.021H7.438c-0.162,0-0.322,0.063-0.436,0.18C6.889,2.71,6.822,2.87,6.822,3.033v25.75c0,0.162,0.063,0.317,0.18,0.435c0.117,0.116,0.271,0.179,0.436,0.179h18.364c0.162,0,0.317-0.062,0.434-0.179c0.117-0.117,0.182-0.272,0.182-0.435V11.648C26.382,9.659,24.824,7.49,23.024,5.673zM25.184,28.164H8.052V3.646h9.542v0.002c0.416-0.025,0.775,0.386,1.05,1.326c0.25,0.895,0.313,2.062,0.312,2.871c0.002,0.593-0.027,0.991-0.027,0.991l-0.049,0.652l0.656,0.007c0.003,0,1.516,0.018,3,0.355c1.426,0.308,2.541,0.922,2.645,1.617c0.004,0.062,0.005,0.124,0.004,0.182V28.164z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Page2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Page2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Page2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Page2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.024,5.673c-1.744-1.694-3.625-3.051-5.168-3.236c-0.084-0.012-0.171-0.019-0.263-0.021H7.438c-0.162,0-0.322,0.063-0.436,0.18C6.889,2.71,6.822,2.87,6.822,3.033v25.75c0,0.162,0.063,0.317,0.18,0.435c0.117,0.116,0.271,0.179,0.436,0.179h18.364c0.162,0,0.317-0.062,0.434-0.179c0.117-0.117,0.182-0.272,0.182-0.435V11.648C26.382,9.659,24.824,7.49,23.024,5.673zM22.157,6.545c0.805,0.786,1.529,1.676,2.069,2.534c-0.468-0.185-0.959-0.322-1.42-0.431c-1.015-0.228-2.008-0.32-2.625-0.357c0.003-0.133,0.004-0.283,0.004-0.446c0-0.869-0.055-2.108-0.356-3.2c-0.003-0.01-0.005-0.02-0.009-0.03C20.584,5.119,21.416,5.788,22.157,6.545zM25.184,28.164H8.052V3.646h9.542v0.002c0.416-0.025,0.775,0.386,1.05,1.326c0.25,0.895,0.313,2.062,0.312,2.871c0.002,0.593-0.027,0.991-0.027,0.991l-0.049,0.652l0.656,0.007c0.003,0,1.516,0.018,3,0.355c1.426,0.308,2.541,0.922,2.645,1.617c0.004,0.062,0.005,0.124,0.004,0.182V28.164z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Pallete();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Pallete = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Pallete.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Pallete\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.653,7.25c-3.417,0-8.577,0.983-8.577,3.282c0,1.91,2.704,3.229,1.691,3.889c-1.02,0.666-2.684-1.848-4.048-1.848c-1.653,0-2.815,1.434-2.815,2.926c0,4.558,6.326,8.25,13.749,8.25c7.424,0,13.443-3.692,13.443-8.25C29.096,10.944,23.077,7.25,15.653,7.25zM10.308,13.521c0-0.645,0.887-1.166,1.98-1.166c1.093,0,1.979,0.521,1.979,1.166c0,0.644-0.886,1.166-1.979,1.166C11.195,14.687,10.308,14.164,10.308,13.521zM14.289,22.299c-1.058,0-1.914-0.68-1.914-1.518s0.856-1.518,1.914-1.518c1.057,0,1.914,0.68,1.914,1.518S15.346,22.299,14.289,22.299zM19.611,21.771c-1.057,0-1.913-0.681-1.913-1.519c0-0.84,0.856-1.521,1.913-1.521c1.059,0,1.914,0.681,1.914,1.521C21.525,21.092,20.67,21.771,19.611,21.771zM20.075,10.66c0-0.838,0.856-1.518,1.914-1.518s1.913,0.68,1.913,1.518c0,0.839-0.855,1.518-1.913,1.518C20.934,12.178,20.075,11.499,20.075,10.66zM24.275,19.482c-1.057,0-1.914-0.681-1.914-1.519s0.857-1.518,1.914-1.518c1.059,0,1.914,0.68,1.914,1.518S25.334,19.482,24.275,19.482zM25.286,15.475c-1.058,0-1.914-0.68-1.914-1.519c0-0.838,0.856-1.518,1.914-1.518c1.057,0,1.913,0.68,1.913,1.518C27.199,14.795,26.343,15.475,25.286,15.475z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Palm();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Palm = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Palm.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Palm\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.296,27.885v-2.013c0,0-0.402-1.408-1.073-2.013c-0.671-0.604-1.274-1.274-1.409-1.61c0,0-0.268,0.135-0.737-0.335s-1.812-2.616-1.812-2.616l-0.671-0.872c0,0-0.47-0.671-1.275-1.342c-0.805-0.672-0.938-0.067-1.476-0.738s0.604-1.275,1.006-1.409c0.403-0.134,1.946,0.134,2.684,0.872c0.738,0.738,0.738,0.738,0.738,0.738l1.073,1.141l0.537,0.201l0.671-1.073l-0.269-2.281c0,0-0.604-2.55-0.737-4.764c-0.135-2.214-0.47-5.703,1.006-5.837s1.007,2.55,1.073,3.489c0.067,0.938,0.806,5.232,1.208,5.568c0.402,0.335,0.671,0.066,0.671,0.066l0.402-7.514c0,0-0.479-2.438,1.073-2.549c0.939-0.067,0.872,1.543,0.872,2.147c0,0.604,0.269,7.514,0.269,7.514l0.537,0.135c0,0,0.402-2.214,0.604-3.153s0.604-2.416,0.537-3.087c-0.067-0.671-0.135-2.348,1.006-2.348s0.872,1.812,0.939,2.415s-0.134,3.153-0.134,3.757c0,0.604-0.738,3.623-0.537,3.824s2.08-2.817,2.349-3.958c0.268-1.141,0.201-3.02,1.408-2.885c1.208,0.134,0.47,2.817,0.402,3.086c-0.066,0.269-0.671,2.349-0.872,2.952s-0.805,1.476-1.006,2.013s0.402,2.349,0,4.629c-0.402,2.281-1.61,5.166-1.61,5.166l0.604,2.08c0,0-1.744,0.671-3.824,0.805C16.443,28.221,14.296,27.885,14.296,27.885z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Paper();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Paper = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Paper.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Paper\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.916,8.009L15.953,1.888c-0.251-0.119-0.548-0.115-0.798,0.008c-0.25,0.125-0.433,0.357-0.491,0.629c-0.002,0.01-1.04,4.83-2.578,9.636c-0.526,1.646-1.114,3.274-1.728,4.704l1.665,0.786c2-4.643,3.584-11.052,4.181-13.614l11.264,5.316c-0.346,1.513-1.233,5.223-2.42,8.927c-0.767,2.399-1.665,4.797-2.585,6.532c-0.889,1.79-1.958,2.669-2.197,2.552c-1.419,0.03-2.418-1.262-3.09-2.918c-0.32-0.803-0.53-1.63-0.657-2.246c-0.127-0.618-0.166-1.006-0.168-1.006c-0.034-0.317-0.232-0.597-0.52-0.731l-12.962-6.12c-0.301-0.142-0.654-0.11-0.925,0.081c-0.27,0.193-0.416,0.518-0.38,0.847c0.008,0.045,0.195,1.848,0.947,3.736c0.521,1.321,1.406,2.818,2.845,3.575l12.956,6.131l0.006-0.013c0.562,0.295,1.201,0.487,1.947,0.496c1.797-0.117,2.777-1.668,3.818-3.525c3-5.69,5.32-16.602,5.338-16.642C29.512,8.615,29.302,8.19,28.916,8.009z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Parent();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Parent = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Parent.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Parent\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.423,12.17c-0.875,0.641-1.941,1.031-3.102,1.031c-1.164,0-2.231-0.391-3.104-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.549,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.2,1.314,0.62,2.188,1.461,2.188c1.396,0,2.545-2.375,2.545-5.312c0-0.66-0.062-1.291-0.168-1.873c0.6,0.574,1.176,0.812,1.726,0.496c1.227-0.682,1.068-3.311-0.354-5.874C15.921,13.689,15.173,12.795,14.423,12.17zM11.32,12.201c2.361,0,4.277-1.916,4.277-4.279s-1.916-4.279-4.277-4.279c-2.363,0-4.28,1.916-4.28,4.279S8.957,12.201,11.32,12.201zM21.987,17.671c1.508,0,2.732-1.225,2.732-2.735c0-1.51-1.225-2.735-2.732-2.735c-1.511,0-2.736,1.225-2.736,2.735C19.251,16.446,20.477,17.671,21.987,17.671zM25.318,19.327c-0.391-0.705-0.869-1.277-1.349-1.677c-0.56,0.41-1.24,0.659-1.982,0.659c-0.744,0-1.426-0.25-1.983-0.659c-0.479,0.399-0.958,0.972-1.35,1.677c-0.909,1.638-1.009,3.318-0.224,3.754c0.351,0.2,0.721,0.05,1.101-0.317c-0.067,0.372-0.105,0.775-0.105,1.197c0,1.878,0.728,3.396,1.625,3.396c0.54,0,0.808-0.553,0.937-1.398c0.128,0.841,0.396,1.398,0.934,1.398c0.893,0,1.627-1.518,1.627-3.396c0-0.422-0.04-0.825-0.107-1.197c0.383,0.367,0.752,0.52,1.104,0.317C26.328,22.646,26.227,20.965,25.318,19.327z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Pc();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Pc = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Pc.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Pc\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.249,3.14h-9.188l-0.459,0.459v18.225l0.33,2.389H19.57v0.245h-0.307v-0.306h-0.611v0.244h-0.311v-0.367h-0.486v0.307h-1.104l-2.022-0.367v-0.92h0.858l0.302-1.47h2.728c0.188,0,0.339-0.152,0.339-0.339V7.828c0-0.187-0.149-0.338-0.339-0.338H1.591c-0.187,0-0.339,0.152-0.339,0.338V21.24c0,0.187,0.152,0.339,0.339,0.339h3.016l0.199,1.47h1.409l-3.4,3.4L2.11,27.951c0,0,2.941,1.102,6.678,1.102c3.737,0,9.679-0.857,10.476-0.857s4.84,0,4.84,0v-1.225l-0.137-1.068h1.744c-0.2,0.106-0.322,0.244-0.322,0.396v0.979c0,0.341,0.604,0.613,1.352,0.613c0.742,0,1.348-0.272,1.348-0.613v-0.979c0-0.339-0.604-0.611-1.348-0.611c-0.188,0-0.364,0.019-0.525,0.049v-0.17h-2.29l-0.055-0.432h5.382L29.249,3.14L29.249,3.14zM2.478,20.17V8.714h15.07V20.17H2.478z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Pen();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Pen = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Pen.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Pen\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M13.587,12.074c-0.049-0.074-0.11-0.147-0.188-0.202c-0.333-0.243-0.803-0.169-1.047,0.166c-0.244,0.336-0.167,0.805,0.167,1.048c0.303,0.22,0.708,0.167,0.966-0.091l-7.086,9.768l-2.203,7.997l6.917-4.577L26.865,4.468l-4.716-3.42l-1.52,2.096c-0.087-0.349-0.281-0.676-0.596-0.907c-0.73-0.529-1.751-0.369-2.28,0.363C14.721,6.782,16.402,7.896,13.587,12.074zM10.118,25.148L6.56,27.503l1.133-4.117L10.118,25.148zM14.309,11.861c2.183-3.225,1.975-4.099,3.843-6.962c0.309,0.212,0.664,0.287,1.012,0.269L14.309,11.861z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Pensil();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Pensil = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Pensil.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Pensil\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.31,2.872l-3.384-2.127c-0.854-0.536-1.979-0.278-2.517,0.576l-1.334,2.123l6.474,4.066l1.335-2.122C26.42,4.533,26.164,3.407,25.31,2.872zM6.555,21.786l6.474,4.066L23.581,9.054l-6.477-4.067L6.555,21.786zM5.566,26.952l-0.143,3.819l3.379-1.787l3.14-1.658l-6.246-3.925L5.566,26.952z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.People();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.People = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.People.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.People\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.066,20.667c1.227-0.682,1.068-3.311-0.354-5.874c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.102,1.031c-1.164,0-2.231-0.391-3.104-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.549,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.2,1.314,0.62,2.188,1.461,2.188c1.396,0,2.545-2.375,2.545-5.312c0-0.66-0.062-1.291-0.168-1.873C19.939,20.745,20.516,20.983,21.066,20.667zM15.5,12.201c2.361,0,4.277-1.916,4.277-4.279S17.861,3.644,15.5,3.644c-2.363,0-4.28,1.916-4.28,4.279S13.137,12.201,15.5,12.201zM24.094,14.914c1.938,0,3.512-1.573,3.512-3.513c0-1.939-1.573-3.513-3.512-3.513c-1.94,0-3.513,1.573-3.513,3.513C20.581,13.341,22.153,14.914,24.094,14.914zM28.374,17.043c-0.502-0.907-1.116-1.641-1.732-2.154c-0.718,0.526-1.594,0.846-2.546,0.846c-0.756,0-1.459-0.207-2.076-0.55c0.496,1.093,0.803,2.2,0.861,3.19c0.093,1.516-0.381,2.641-1.329,3.165c-0.204,0.117-0.426,0.183-0.653,0.224c-0.056,0.392-0.095,0.801-0.095,1.231c0,2.412,0.935,4.361,2.088,4.361c0.694,0,1.039-0.71,1.204-1.796c0.163,1.079,0.508,1.796,1.199,1.796c1.146,0,2.09-1.95,2.09-4.361c0-0.542-0.052-1.06-0.139-1.538c0.492,0.472,0.966,0.667,1.418,0.407C29.671,21.305,29.541,19.146,28.374,17.043zM6.906,14.914c1.939,0,3.512-1.573,3.512-3.513c0-1.939-1.573-3.513-3.512-3.513c-1.94,0-3.514,1.573-3.514,3.513C3.392,13.341,4.966,14.914,6.906,14.914zM9.441,21.536c-1.593-0.885-1.739-3.524-0.457-6.354c-0.619,0.346-1.322,0.553-2.078,0.553c-0.956,0-1.832-0.321-2.549-0.846c-0.616,0.513-1.229,1.247-1.733,2.154c-1.167,2.104-1.295,4.262-0.287,4.821c0.451,0.257,0.925,0.064,1.414-0.407c-0.086,0.479-0.136,0.996-0.136,1.538c0,2.412,0.935,4.361,2.088,4.361c0.694,0,1.039-0.71,1.204-1.796c0.165,1.079,0.509,1.796,1.201,1.796c1.146,0,2.089-1.95,2.089-4.361c0-0.432-0.04-0.841-0.097-1.233C9.874,21.721,9.651,21.656,9.441,21.536z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Phone();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Phone = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Phone.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Phone\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.065,18.53c-0.467-0.29-1.167-0.21-1.556,0.179l-3.093,3.092c-0.389,0.389-1.025,0.389-1.414,0L9.05,14.848c-0.389-0.389-0.389-1.025,0-1.414l2.913-2.912c0.389-0.389,0.447-1.075,0.131-1.524L6.792,1.485C6.476,1.036,5.863,0.948,5.433,1.29c0,0-4.134,3.281-4.134,6.295c0,12.335,10,22.334,22.334,22.334c3.015,0,5.948-5.533,5.948-5.533c0.258-0.486,0.087-1.122-0.38-1.412L22.065,18.53z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Photo();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Photo = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Photo.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Photo\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.25,10.25H20.5v-1.5h-9.375v1.5h-3.75c-1.104,0-2,0.896-2,2v10.375c0,1.104,0.896,2,2,2H24.25c1.104,0,2-0.896,2-2V12.25C26.25,11.146,25.354,10.25,24.25,10.25zM15.812,23.499c-3.342,0-6.06-2.719-6.06-6.061c0-3.342,2.718-6.062,6.06-6.062s6.062,2.72,6.062,6.062C21.874,20.78,19.153,23.499,15.812,23.499zM15.812,13.375c-2.244,0-4.062,1.819-4.062,4.062c0,2.244,1.819,4.062,4.062,4.062c2.244,0,4.062-1.818,4.062-4.062C19.875,15.194,18.057,13.375,15.812,13.375z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Picker();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Picker = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Picker.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Picker\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.221,10.853c-0.111-0.414-0.261-0.412,0.221-1.539l1.66-3.519c0.021-0.051,0.2-0.412,0.192-0.946c0.015-0.529-0.313-1.289-1.119-1.642c-1.172-0.555-1.17-0.557-2.344-1.107c-0.784-0.396-1.581-0.171-1.979,0.179c-0.42,0.333-0.584,0.7-0.609,0.75L16.58,6.545c-0.564,1.084-0.655,0.97-1.048,1.147c-0.469,0.129-1.244,0.558-1.785,1.815c-1.108,2.346-1.108,2.346-1.108,2.346l-0.276,0.586l1.17,0.553l-3.599,7.623c-0.38,0.828-0.166,1.436-0.166,2.032c0.01,0.627-0.077,1.509-0.876,3.21l-0.276,0.586l3.517,1.661l0.276-0.585c0.808-1.699,1.431-2.326,1.922-2.717c0.46-0.381,1.066-0.6,1.465-1.42l3.599-7.618l1.172,0.554l0.279-0.589c0,0,0,0,1.105-2.345C22.578,12.166,22.419,11.301,22.221,10.853zM14.623,22.83c-0.156,0.353-0.413,0.439-1.091,0.955c-0.577,0.448-1.264,1.172-2.009,2.6l-1.191-0.562c0.628-1.48,0.75-2.474,0.73-3.203c-0.031-0.851-0.128-1.104,0.045-1.449l3.599-7.621l3.517,1.662L14.623,22.83z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Picture();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Picture = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Picture.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Picture\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M2.5,4.833v22.334h27V4.833H2.5zM25.25,25.25H6.75V6.75h18.5V25.25zM11.25,14c1.426,0,2.583-1.157,2.583-2.583c0-1.427-1.157-2.583-2.583-2.583c-1.427,0-2.583,1.157-2.583,2.583C8.667,12.843,9.823,14,11.25,14zM24.251,16.25l-4.917-4.917l-6.917,6.917L10.5,16.333l-2.752,2.752v5.165h16.503V16.25z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.PieChart();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.PieChart = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.PieChart.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.PieChart\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.583,15.917l1.648-10.779C16.692,5.056,16.145,5,15.583,5C9.554,5,4.666,9.888,4.666,15.917c0,6.029,4.888,10.917,10.917,10.917S26.5,21.946,26.5,15.917c0-0.256-0.021-0.507-0.038-0.759L15.583,15.917zM19.437,3.127l-1.648,10.779l10.879-0.759C28.313,8.026,24.436,3.886,19.437,3.127z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Plane();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Plane = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Plane.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Plane\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M19.671,8.11l-2.777,2.777l-3.837-0.861c0.362-0.505,0.916-1.683,0.464-2.135c-0.518-0.517-1.979,0.278-2.305,0.604l-0.913,0.913L7.614,8.804l-2.021,2.021l2.232,1.061l-0.082,0.082l1.701,1.701l0.688-0.687l3.164,1.504L9.571,18.21H6.413l-1.137,1.138l3.6,0.948l1.83,1.83l0.947,3.598l1.137-1.137V21.43l3.725-3.725l1.504,3.164l-0.687,0.687l1.702,1.701l0.081-0.081l1.062,2.231l2.02-2.02l-0.604-2.689l0.912-0.912c0.326-0.326,1.121-1.789,0.604-2.306c-0.452-0.452-1.63,0.101-2.135,0.464l-0.861-3.838l2.777-2.777c0.947-0.947,3.599-4.862,2.62-5.839C24.533,4.512,20.618,7.163,19.671,8.11z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Plugin();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Plugin = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Plugin.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Plugin\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.33,15.836l-3.893-1.545l3.136-7.9c0.28-0.705-0.064-1.505-0.771-1.785c-0.707-0.28-1.506,0.065-1.785,0.771l-3.136,7.9l-4.88-1.937l3.135-7.9c0.281-0.706-0.064-1.506-0.77-1.786c-0.706-0.279-1.506,0.065-1.785,0.771l-3.136,7.9L8.554,8.781l-1.614,4.066l2.15,0.854l-2.537,6.391c-0.61,1.54,0.143,3.283,1.683,3.895l1.626,0.646L8.985,26.84c-0.407,1.025,0.095,2.188,1.122,2.596l0.93,0.369c1.026,0.408,2.188-0.095,2.596-1.121l0.877-2.207l1.858,0.737c1.54,0.611,3.284-0.142,3.896-1.682l2.535-6.391l1.918,0.761L26.33,15.836z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Plus();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Plus = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Plus.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Plus\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.979,12.896 19.312,12.896 19.312,6.229 12.647,6.229 12.647,12.896 5.979,12.896 5.979,19.562 12.647,19.562 12.647,26.229 19.312,26.229 19.312,19.562 25.979,19.562z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Power();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Power = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Power.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Power\",\r\n\r\n /**\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.542,8.354c-1.47-1.766-2.896-2.617-3.025-2.695c-0.954-0.565-2.181-0.241-2.739,0.724c-0.556,0.961-0.24,2.194,0.705,2.763c0,0,0.001,0,0.002,0.001c0.001,0,0.002,0.001,0.003,0.002c0.001,0,0.003,0.001,0.004,0.001c0.102,0.062,1.124,0.729,2.08,1.925c1.003,1.261,1.933,3.017,1.937,5.438c-0.001,2.519-1.005,4.783-2.64,6.438c-1.637,1.652-3.877,2.668-6.368,2.669c-2.491-0.001-4.731-1.017-6.369-2.669c-1.635-1.654-2.639-3.919-2.64-6.438c0.005-2.499,0.995-4.292,2.035-5.558c0.517-0.625,1.043-1.098,1.425-1.401c0.191-0.152,0.346-0.263,0.445-0.329c0.049-0.034,0.085-0.058,0.104-0.069c0.005-0.004,0.009-0.006,0.012-0.008s0.004-0.002,0.004-0.002l0,0c0.946-0.567,1.262-1.802,0.705-2.763c-0.559-0.965-1.785-1.288-2.739-0.724c-0.128,0.079-1.555,0.93-3.024,2.696c-1.462,1.751-2.974,4.511-2.97,8.157C2.49,23.775,8.315,29.664,15.5,29.667c7.186-0.003,13.01-5.892,13.012-13.155C28.516,12.864,27.005,10.105,25.542,8.354zM15.5,17.523c1.105,0,2.002-0.907,2.002-2.023h-0.001V3.357c0-1.118-0.896-2.024-2.001-2.024s-2.002,0.906-2.002,2.024V15.5C13.498,16.616,14.395,17.523,15.5,17.523z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ppt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ppt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ppt.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ppt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16.604,1.914c0-0.575-0.466-1.041-1.041-1.041s-1.041,0.466-1.041,1.041v1.04h2.082V1.914zM16.604,22.717h-2.082v3.207c0,0.574-4.225,4.031-4.225,4.031l2.468-0.003l2.807-2.673l3.013,2.693l2.272-0.039l-4.254-4.011V22.717L16.604,22.717zM28.566,7.113c0.86,0,1.56-0.698,1.56-1.56c0-0.861-0.698-1.56-1.56-1.56H2.561c-0.861,0-1.56,0.699-1.56,1.56c0,0.862,0.699,1.56,1.56,1.56h1.583v12.505l-0.932-0.022c-0.861,0-1.213,0.467-1.213,1.04c0,0.576,0.352,1.041,1.213,1.041h24.597c0.86,0,1.299-0.465,1.299-1.041c0-1.094-1.299-1.04-1.299-1.04l-0.804,0.109V7.113H28.566zM11.435,17.516c-3.771,0-4.194-4.191-4.194-4.191c0-4.096,4.162-4.161,4.162-4.161v4.161h4.193C15.596,17.516,11.435,17.516,11.435,17.516zM18.716,13.388h-1.071v-1.073h1.071V13.388zM18.716,10.267h-1.071V9.194h1.071V10.267zM23.314,13.388H20.26c-0.296,0-0.535-0.24-0.535-0.536c0-0.297,0.239-0.537,0.535-0.537h3.057c0.297,0,0.535,0.24,0.535,0.537C23.852,13.147,23.611,13.388,23.314,13.388zM23.314,10.267H20.26c-0.296,0-0.535-0.239-0.535-0.535c0-0.297,0.239-0.537,0.535-0.537h3.057c0.297,0,0.535,0.24,0.535,0.537C23.852,10.027,23.611,10.267,23.314,10.267z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Printer();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Printer = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Printer.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Printer\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.569,12.125h-2.12c-0.207-1.34-1.247-2.759-2.444-3.967c-1.277-1.24-2.654-2.234-3.784-2.37c-0.062-0.008-0.124-0.014-0.198-0.015H8.594c-0.119,0-0.235,0.047-0.319,0.132c-0.083,0.083-0.132,0.2-0.132,0.32v5.9H6.069c-1.104,0-2,0.896-2,2V23h4.074v2.079c0,0.118,0.046,0.23,0.132,0.318c0.086,0.085,0.199,0.131,0.319,0.131h13.445c0.118,0,0.232-0.046,0.318-0.131s0.138-0.199,0.138-0.318V23h4.074v-8.875C26.569,13.021,25.674,12.125,24.569,12.125zM21.589,24.626H9.043V21.5h12.546V24.626zM21.589,13.921c0-0.03,0-0.063-0.003-0.096c-0.015-0.068-0.062-0.135-0.124-0.2H9.043v-6.95h6.987v0.001c0.305-0.019,0.567,0.282,0.769,0.971c0.183,0.655,0.229,1.509,0.229,2.102c0.001,0.433-0.019,0.725-0.019,0.725l-0.037,0.478l0.48,0.005c0.002,0,1.109,0.014,2.196,0.26c1.044,0.226,1.86,0.675,1.938,1.184c0.003,0.045,0.003,0.091,0.003,0.133V13.921z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Quote();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Quote = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Quote.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Quote\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.505,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.128,0,2.07,0.411,2.826,1.229c0.756,0.82,1.134,1.832,1.134,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.259,0.443-4.327,1.332-6.203c0.888-1.875,2.243-3.57,4.067-5.085c1.824-1.514,2.988-2.272,3.492-2.272c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L14.505,5.873zM27.465,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.104,0,2.04,0.411,2.808,1.229c0.769,0.82,1.152,1.832,1.152,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.284,0.449-4.369,1.35-6.256c0.9-1.887,2.256-3.577,4.068-5.067c1.812-1.49,2.97-2.236,3.474-2.236c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L27.465,5.873z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Rain();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Rain = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Rain.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Rain\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.874c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979zM9.029,26.682c0-1.115,0.021-5.425,0.021-5.432c0.002-0.409-0.247-0.779-0.628-0.932c-0.38-0.152-0.815-0.059-1.099,0.24c-0.006,0.008-1.037,1.098-2.081,2.342c-0.523,0.627-1.048,1.287-1.463,1.896c-0.399,0.648-0.753,1.066-0.811,1.885C2.971,28.355,4.324,29.711,6,29.714C7.672,29.71,9.029,28.354,9.029,26.682zM4.971,26.727c0.091-0.349,1.081-1.719,1.993-2.764c0.025-0.029,0.051-0.061,0.076-0.089c-0.005,1.124-0.01,2.294-0.01,2.808c0,0.567-0.461,1.028-1.029,1.03C5.447,27.71,4.997,27.273,4.971,26.727zM16.425,26.682c0-1.115,0.021-5.424,0.021-5.43c0.002-0.41-0.247-0.779-0.628-0.934c-0.381-0.152-0.814-0.058-1.1,0.242c-0.006,0.008-1.035,1.094-2.08,2.342c-0.522,0.623-1.047,1.285-1.463,1.894c-0.399,0.649-0.753,1.068-0.809,1.888c0,1.672,1.354,3.028,3.029,3.028C15.068,29.711,16.425,28.354,16.425,26.682zM12.365,26.729c0.092-0.349,1.081-1.72,1.993-2.765c0.025-0.03,0.05-0.06,0.075-0.089c-0.005,1.123-0.011,2.294-0.011,2.807c-0.002,0.568-0.461,1.027-1.028,1.029C12.84,27.709,12.392,27.273,12.365,26.729zM23.271,20.317c-0.38-0.153-0.816-0.06-1.099,0.24c-0.009,0.008-1.037,1.097-2.08,2.342c-0.523,0.625-1.049,1.285-1.462,1.896c-0.402,0.649-0.754,1.067-0.812,1.886c0,1.672,1.354,3.029,3.03,3.029c1.673,0,3.027-1.357,3.027-3.029c0-1.115,0.022-5.425,0.022-5.431C23.9,20.84,23.651,20.47,23.271,20.317zM21.879,26.681c-0.004,0.568-0.463,1.027-1.031,1.029c-0.553-0.002-1.002-0.438-1.028-0.982c0.092-0.349,1.081-1.72,1.993-2.765c0.025-0.028,0.05-0.059,0.074-0.088C21.883,24.998,21.879,26.167,21.879,26.681z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Raphael();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Raphael = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Raphael.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Raphael\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.777,18.941c0.584-0.881,0.896-1.914,0.896-2.998c0-1.457-0.567-2.826-1.598-3.854l-6.91-6.911l-0.003,0.002c-0.985-0.988-2.35-1.6-3.851-1.6c-1.502,0-2.864,0.612-3.85,1.6H12.46l-6.911,6.911c-1.031,1.029-1.598,2.398-1.598,3.854c0,1.457,0.567,2.826,1.598,3.854l6.231,6.229c0.25,0.281,0.512,0.544,0.789,0.785c1.016,0.961,2.338,1.49,3.743,1.49c1.456,0,2.825-0.565,3.854-1.598l6.723-6.725c0.021-0.019,0.034-0.032,0.051-0.051l0.14-0.138c0.26-0.26,0.487-0.54,0.688-0.838c0.004-0.008,0.01-0.015,0.014-0.021L27.777,18.941zM26.658,15.946c0,0.678-0.197,1.326-0.561,1.879c-0.222,0.298-0.447,0.559-0.684,0.784L25.4,18.625c-1.105,1.052-2.354,1.35-3.414,1.35c-0.584,0-1.109-0.09-1.523-0.195c-2.422-0.608-5.056-2.692-6.261-5.732c0.649,0.274,1.362,0.426,2.11,0.426c2.811,0,5.129-2.141,5.415-4.877l3.924,3.925C26.301,14.167,26.658,15.029,26.658,15.946zM16.312,5.6c1.89,0,3.426,1.538,3.426,3.427c0,1.89-1.536,3.427-3.426,3.427c-1.889,0-3.426-1.537-3.426-3.427C12.886,7.138,14.423,5.6,16.312,5.6zM6.974,18.375c-0.649-0.648-1.007-1.512-1.007-2.429c0-0.917,0.357-1.78,1.007-2.428l2.655-2.656c-0.693,2.359-0.991,4.842-0.831,7.221c0.057,0.854,0.175,1.677,0.345,2.46L6.974,18.375zM11.514,11.592c0.583,4.562,4.195,9.066,8.455,10.143c0.693,0.179,1.375,0.265,2.033,0.265c0.01,0,0.02,0,0.027,0l-3.289,3.289c-0.648,0.646-1.512,1.006-2.428,1.006c-0.638,0-1.248-0.177-1.779-0.5l0.001-0.002c-0.209-0.142-0.408-0.295-0.603-0.461c-0.015-0.019-0.031-0.026-0.046-0.043l-0.665-0.664c-1.367-1.567-2.227-3.903-2.412-6.671C10.669,15.856,10.921,13.673,11.514,11.592\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ReflectH();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ReflectH = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ReflectH.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.ReflectH\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.57,20.273h0.854v-1.705H15.57V20.273zM15.57,23.686h0.854V21.98H15.57V23.686zM15.57,27.096h0.854v-1.705H15.57V27.096zM15.57,29.689h0.854V28.8H15.57V29.689zM15.57,16.865h0.854V15.16H15.57V16.865zM15.57,3.225h0.854V1.52H15.57V3.225zM15.57,6.635h0.854V4.93H15.57V6.635zM15.57,10.045h0.854V8.34H15.57V10.045zM15.57,13.455h0.854V11.75H15.57V13.455zM18.41,3.327V25.46h12.015L18.41,3.327zM19.264,6.68l9.729,17.93h-9.729V6.68zM13.535,25.46V3.327L1.521,25.46H13.535z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ReflectV();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ReflectV = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ReflectV.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.ReflectV\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.643,16.008v-0.854h-1.705v0.854H20.643zM24.053,16.008v-0.854h-1.705v0.854H24.053zM27.463,16.008v-0.854h-1.705v0.854H27.463zM30.059,16.008v-0.854h-0.891v0.854H30.059zM17.232,16.008v-0.854h-1.709v0.854H17.232zM3.593,16.008v-0.854H1.888v0.854H3.593zM7.003,16.008v-0.854H5.298v0.854H7.003zM10.414,16.008v-0.854H8.709v0.854H10.414zM13.824,16.008v-0.854h-1.705v0.854H13.824zM3.694,13.167h22.134V1.152L3.694,13.167zM7.048,12.314l17.929-9.729v9.729H7.048zM25.828,18.042H3.694l22.134,12.015V18.042z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Refresh();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Refresh = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Refresh.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Refresh\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.083,15.5c-0.009,4.739-3.844,8.574-8.583,8.583c-4.741-0.009-8.577-3.844-8.585-8.583c0.008-4.741,3.844-8.577,8.585-8.585c1.913,0,3.665,0.629,5.09,1.686l-1.782,1.783l8.429,2.256l-2.26-8.427l-1.89,1.89c-2.072-1.677-4.717-2.688-7.587-2.688C8.826,3.418,3.418,8.826,3.416,15.5C3.418,22.175,8.826,27.583,15.5,27.583S27.583,22.175,27.583,15.5H24.083z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Resize2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Resize2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Resize2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Resize2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M1.999,2.332v26.499H28.5V2.332H1.999zM26.499,26.832H4V12.5h8.167V4.332h14.332V26.832zM15.631,17.649l5.468,5.469l-1.208,1.206l5.482,1.469l-1.47-5.481l-1.195,1.195l-5.467-5.466l1.209-1.208l-5.482-1.469l1.468,5.48L15.631,17.649z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Rotate();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Rotate = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Rotate.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Rotate\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,5.27c1.914,0,3.666,0.629,5.089,1.686l-1.781,1.783l8.428,2.256l-2.26-8.427l-1.889,1.89C21.016,2.781,18.371,1.77,15.5,1.77C8.827,1.773,3.418,7.181,3.417,13.855c0.001,4.063,2.012,7.647,5.084,9.838v-4.887c-0.993-1.4-1.583-3.105-1.585-4.952C6.923,9.114,10.759,5.278,15.5,5.27zM9.5,29.23h12V12.355h-12V29.23z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Ruler();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Ruler = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Ruler.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Ruler\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M6.63,21.796l-5.122,5.121h25.743V1.175L6.63,21.796zM18.702,10.48c0.186-0.183,0.48-0.183,0.664,0l1.16,1.159c0.184,0.183,0.186,0.48,0.002,0.663c-0.092,0.091-0.213,0.137-0.332,0.137c-0.121,0-0.24-0.046-0.33-0.137l-1.164-1.159C18.519,10.96,18.519,10.664,18.702,10.48zM17.101,12.084c0.184-0.183,0.48-0.183,0.662,0l2.156,2.154c0.184,0.183,0.184,0.48,0.002,0.661c-0.092,0.092-0.213,0.139-0.334,0.139s-0.24-0.046-0.33-0.137l-2.156-2.154C16.917,12.564,16.917,12.267,17.101,12.084zM15.497,13.685c0.184-0.183,0.48-0.183,0.664,0l1.16,1.161c0.184,0.183,0.182,0.48-0.002,0.663c-0.092,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.24-0.046-0.332-0.138l-1.16-1.16C15.314,14.166,15.314,13.868,15.497,13.685zM13.896,15.288c0.184-0.183,0.48-0.181,0.664,0.002l1.158,1.159c0.183,0.184,0.183,0.48,0,0.663c-0.092,0.092-0.212,0.138-0.332,0.138c-0.119,0-0.24-0.046-0.332-0.138l-1.158-1.161C13.713,15.767,13.713,15.471,13.896,15.288zM12.293,16.892c0.183-0.184,0.479-0.184,0.663,0l2.154,2.153c0.184,0.184,0.184,0.481,0,0.665c-0.092,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.242-0.046-0.334-0.138l-2.153-2.155C12.11,17.371,12.11,17.075,12.293,16.892zM10.302,24.515c-0.091,0.093-0.212,0.139-0.332,0.139c-0.119,0-0.238-0.045-0.33-0.137l-2.154-2.153c-0.184-0.183-0.184-0.479,0-0.663s0.479-0.184,0.662,0l2.154,2.153C10.485,24.036,10.485,24.332,10.302,24.515zM10.912,21.918c-0.093,0.093-0.214,0.139-0.333,0.139c-0.12,0-0.24-0.045-0.33-0.137l-1.162-1.161c-0.184-0.183-0.184-0.479,0-0.66c0.184-0.185,0.48-0.187,0.664-0.003l1.161,1.162C11.095,21.438,11.095,21.735,10.912,21.918zM12.513,20.316c-0.092,0.092-0.211,0.138-0.332,0.138c-0.119,0-0.239-0.046-0.331-0.138l-1.159-1.16c-0.184-0.184-0.184-0.48,0-0.664s0.48-0.182,0.663,0.002l1.159,1.161C12.696,19.838,12.696,20.135,12.513,20.316zM22.25,21.917h-8.67l8.67-8.67V21.917zM22.13,10.7c-0.09,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.242-0.046-0.334-0.138l-1.16-1.159c-0.184-0.183-0.184-0.479,0-0.663c0.182-0.183,0.479-0.183,0.662,0l1.16,1.159C22.312,10.221,22.313,10.517,22.13,10.7zM24.726,10.092c-0.092,0.092-0.213,0.137-0.332,0.137s-0.24-0.045-0.33-0.137l-2.154-2.154c-0.184-0.183-0.184-0.481,0-0.664s0.482-0.181,0.664,0.002l2.154,2.154C24.911,9.613,24.909,9.91,24.726,10.092z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Run();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Run = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Run.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Run\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M17.41,20.395l-0.778-2.723c0.228-0.2,0.442-0.414,0.644-0.643l2.721,0.778c0.287-0.418,0.534-0.862,0.755-1.323l-2.025-1.96c0.097-0.288,0.181-0.581,0.241-0.883l2.729-0.684c0.02-0.252,0.039-0.505,0.039-0.763s-0.02-0.51-0.039-0.762l-2.729-0.684c-0.061-0.302-0.145-0.595-0.241-0.883l2.026-1.96c-0.222-0.46-0.469-0.905-0.756-1.323l-2.721,0.777c-0.201-0.228-0.416-0.442-0.644-0.643l0.778-2.722c-0.418-0.286-0.863-0.534-1.324-0.755l-1.96,2.026c-0.287-0.097-0.581-0.18-0.883-0.241l-0.683-2.73c-0.253-0.019-0.505-0.039-0.763-0.039s-0.51,0.02-0.762,0.039l-0.684,2.73c-0.302,0.061-0.595,0.144-0.883,0.241l-1.96-2.026C7.048,3.463,6.604,3.71,6.186,3.997l0.778,2.722C6.736,6.919,6.521,7.134,6.321,7.361L3.599,6.583C3.312,7.001,3.065,7.446,2.844,7.907l2.026,1.96c-0.096,0.288-0.18,0.581-0.241,0.883l-2.73,0.684c-0.019,0.252-0.039,0.505-0.039,0.762s0.02,0.51,0.039,0.763l2.73,0.684c0.061,0.302,0.145,0.595,0.241,0.883l-2.026,1.96c0.221,0.46,0.468,0.905,0.755,1.323l2.722-0.778c0.2,0.229,0.415,0.442,0.643,0.643l-0.778,2.723c0.418,0.286,0.863,0.533,1.323,0.755l1.96-2.026c0.288,0.097,0.581,0.181,0.883,0.241l0.684,2.729c0.252,0.02,0.505,0.039,0.763,0.039s0.51-0.02,0.763-0.039l0.683-2.729c0.302-0.061,0.596-0.145,0.883-0.241l1.96,2.026C16.547,20.928,16.992,20.681,17.41,20.395zM11.798,15.594c-1.877,0-3.399-1.522-3.399-3.399s1.522-3.398,3.399-3.398s3.398,1.521,3.398,3.398S13.675,15.594,11.798,15.594zM27.29,22.699c0.019-0.547-0.06-1.104-0.23-1.654l1.244-1.773c-0.188-0.35-0.4-0.682-0.641-0.984l-2.122,0.445c-0.428-0.364-0.915-0.648-1.436-0.851l-0.611-2.079c-0.386-0.068-0.777-0.105-1.173-0.106l-0.974,1.936c-0.279,0.054-0.558,0.128-0.832,0.233c-0.257,0.098-0.497,0.22-0.727,0.353L17.782,17.4c-0.297,0.262-0.568,0.545-0.813,0.852l0.907,1.968c-0.259,0.495-0.437,1.028-0.519,1.585l-1.891,1.06c0.019,0.388,0.076,0.776,0.164,1.165l2.104,0.519c0.231,0.524,0.541,0.993,0.916,1.393l-0.352,2.138c0.32,0.23,0.66,0.428,1.013,0.6l1.715-1.32c0.536,0.141,1.097,0.195,1.662,0.15l1.452,1.607c0.2-0.057,0.399-0.118,0.596-0.193c0.175-0.066,0.34-0.144,0.505-0.223l0.037-2.165c0.455-0.339,0.843-0.747,1.152-1.206l2.161-0.134c0.152-0.359,0.279-0.732,0.368-1.115L27.29,22.699zM23.127,24.706c-1.201,0.458-2.545-0.144-3.004-1.345s0.143-2.546,1.344-3.005c1.201-0.458,2.547,0.144,3.006,1.345C24.931,22.902,24.328,24.247,23.127,24.706z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Rw();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Rw = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Rw.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Rw\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M5.5,15.499,15.8,21.447,15.8,15.846,25.5,21.447,25.5,9.552,15.8,15.152,15.8,9.552z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Safari();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Safari = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Safari.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Safari\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16.154,5.135c-0.504,0-1,0.031-1.488,0.089l-0.036-0.18c-0.021-0.104-0.06-0.198-0.112-0.283c0.381-0.308,0.625-0.778,0.625-1.306c0-0.927-0.751-1.678-1.678-1.678s-1.678,0.751-1.678,1.678c0,0.745,0.485,1.376,1.157,1.595c-0.021,0.105-0.021,0.216,0,0.328l0.033,0.167C7.645,6.95,3.712,11.804,3.712,17.578c0,6.871,5.571,12.441,12.442,12.441c6.871,0,12.441-5.57,12.441-12.441C28.596,10.706,23.025,5.135,16.154,5.135zM16.369,8.1c4.455,0,8.183,3.116,9.123,7.287l-0.576,0.234c-0.148-0.681-0.755-1.191-1.48-1.191c-0.837,0-1.516,0.679-1.516,1.516c0,0.075,0.008,0.148,0.018,0.221l-2.771-0.028c-0.054-0.115-0.114-0.226-0.182-0.333l3.399-5.11l0.055-0.083l-4.766,4.059c-0.352-0.157-0.74-0.248-1.148-0.256l0.086-0.018l-1.177-2.585c0.64-0.177,1.111-0.763,1.111-1.459c0-0.837-0.678-1.515-1.516-1.515c-0.075,0-0.147,0.007-0.219,0.018l0.058-0.634C15.357,8.141,15.858,8.1,16.369,8.1zM12.146,3.455c0-0.727,0.591-1.318,1.318-1.318c0.727,0,1.318,0.591,1.318,1.318c0,0.425-0.203,0.802-0.516,1.043c-0.183-0.123-0.413-0.176-0.647-0.13c-0.226,0.045-0.413,0.174-0.535,0.349C12.542,4.553,12.146,4.049,12.146,3.455zM7.017,17.452c0-4.443,3.098-8.163,7.252-9.116l0.297,0.573c-0.61,0.196-1.051,0.768-1.051,1.442c0,0.837,0.678,1.516,1.515,1.516c0.068,0,0.135-0.006,0.2-0.015l-0.058,2.845l0.052-0.011c-0.442,0.204-0.824,0.513-1.116,0.895l0.093-0.147l-1.574-0.603l1.172,1.239l0.026-0.042c-0.19,0.371-0.306,0.788-0.324,1.229l-0.003-0.016l-2.623,1.209c-0.199-0.604-0.767-1.041-1.438-1.041c-0.837,0-1.516,0.678-1.516,1.516c0,0.064,0.005,0.128,0.013,0.191l-0.783-0.076C7.063,18.524,7.017,17.994,7.017,17.452zM16.369,26.805c-4.429,0-8.138-3.078-9.106-7.211l0.691-0.353c0.146,0.686,0.753,1.2,1.482,1.2c0.837,0,1.515-0.679,1.515-1.516c0-0.105-0.011-0.207-0.031-0.307l2.858,0.03c0.045,0.095,0.096,0.187,0.15,0.276l-3.45,5.277l0.227-0.195l4.529-3.92c0.336,0.153,0.705,0.248,1.094,0.266l-0.019,0.004l1.226,2.627c-0.655,0.166-1.142,0.76-1.142,1.468c0,0.837,0.678,1.515,1.516,1.515c0.076,0,0.151-0.007,0.225-0.018l0.004,0.688C17.566,26.746,16.975,26.805,16.369,26.805zM18.662,26.521l-0.389-0.6c0.661-0.164,1.152-0.759,1.152-1.47c0-0.837-0.68-1.516-1.516-1.516c-0.066,0-0.13,0.005-0.193,0.014v-2.86l-0.025,0.004c0.409-0.185,0.77-0.459,1.055-0.798l1.516,0.659l-1.104-1.304c0.158-0.335,0.256-0.704,0.278-1.095l2.552-1.164c0.19,0.618,0.766,1.068,1.447,1.068c0.838,0,1.516-0.679,1.516-1.516c0-0.069-0.006-0.137-0.016-0.204l0.65,0.12c0.089,0.517,0.136,1.049,0.136,1.591C25.722,21.826,22.719,25.499,18.662,26.521z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ScrewDriver();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ScrewDriver = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ScrewDriver.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ScrewDriver\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M19.387,14.373c2.119-2.619,5.322-6.77,5.149-7.75c-0.128-0.729-0.882-1.547-1.763-2.171c-0.883-0.625-1.916-1.044-2.645-0.915c-0.98,0.173-3.786,4.603-5.521,7.49c-0.208,0.344,0.328,1.177,0.156,1.468c-0.172,0.292-1.052,0.042-1.18,0.261c-0.263,0.451-0.417,0.722-0.417,0.722s-0.553,0.823,1.163,2.163l-5.233,7.473c-0.267,0.381-1.456,0.459-1.456,0.459l-1.184,3.312l0.859,0.602l2.708-2.246c0,0-0.334-1.143-0.068-1.523l5.242-7.489c1.719,1,2.377,0.336,2.377,0.336s0.201-0.238,0.536-0.639c0.161-0.194-0.374-0.936-0.159-1.197C18.169,14.467,19.133,14.685,19.387,14.373z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Search();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Search = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Search.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Search\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Sencha();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Sencha = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Sencha.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Sencha\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M18.265,22.734c1.365,0.662,2.309,2.062,2.309,3.682c0,1.566-0.881,2.928-2.176,3.615l1.922-0.98c3.16-1.58,5.332-4.846,5.332-8.617c0-3.719-2.109-6.945-5.195-8.547l-6.272-3.144c-1.366-0.662-2.308-2.062-2.308-3.682c0-1.567,0.881-2.928,2.175-3.614L12.13,2.428c-3.161,1.578-5.332,4.843-5.332,8.616c0,3.718,2.108,6.944,5.195,8.546L18.265,22.734z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Settings();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Settings = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Settings.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Settings\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16.015,12.03c-2.156,0-3.903,1.747-3.903,3.903c0,2.155,1.747,3.903,3.903,3.903c0.494,0,0.962-0.102,1.397-0.27l0.836,1.285l1.359-0.885l-0.831-1.276c0.705-0.706,1.142-1.681,1.142-2.757C19.918,13.777,18.171,12.03,16.015,12.03zM16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM26.174,20.809c-0.241,0.504-0.513,0.99-0.826,1.45L22.19,21.58c-0.481,0.526-1.029,0.994-1.634,1.385l0.119,3.202c-0.507,0.23-1.028,0.421-1.569,0.57l-1.955-2.514c-0.372,0.051-0.75,0.086-1.136,0.086c-0.356,0-0.706-0.029-1.051-0.074l-1.945,2.5c-0.541-0.151-1.065-0.342-1.57-0.569l0.117-3.146c-0.634-0.398-1.208-0.88-1.712-1.427L6.78,22.251c-0.313-0.456-0.583-0.944-0.826-1.448l2.088-2.309c-0.226-0.703-0.354-1.451-0.385-2.223l-2.768-1.464c0.055-0.563,0.165-1.107,0.301-1.643l3.084-0.427c0.29-0.702,0.675-1.352,1.135-1.942L8.227,7.894c0.399-0.389,0.83-0.744,1.283-1.07l2.663,1.672c0.65-0.337,1.349-0.593,2.085-0.75l0.968-3.001c0.278-0.021,0.555-0.042,0.837-0.042c0.282,0,0.56,0.022,0.837,0.042l0.976,3.028c0.72,0.163,1.401,0.416,2.036,0.75l2.704-1.697c0.455,0.326,0.887,0.681,1.285,1.07l-1.216,2.986c0.428,0.564,0.793,1.181,1.068,1.845l3.185,0.441c0.135,0.535,0.247,1.081,0.302,1.643l-2.867,1.516c-0.034,0.726-0.15,1.43-0.355,2.1L26.174,20.809z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.SettingsAlt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.SettingsAlt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.SettingsAlt.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.SettingsAlt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM24.386,14.968c-1.451,1.669-3.706,2.221-5.685,1.586l-7.188,8.266c-0.766,0.88-2.099,0.97-2.979,0.205s-0.973-2.099-0.208-2.979l7.198-8.275c-0.893-1.865-0.657-4.164,0.787-5.824c1.367-1.575,3.453-2.151,5.348-1.674l-2.754,3.212l0.901,2.621l2.722,0.529l2.761-3.22C26.037,11.229,25.762,13.387,24.386,14.968z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Shuffle();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Shuffle = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Shuffle.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Shuffle\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.786,20.654c-0.618-0.195-1.407-0.703-2.291-1.587c-0.757-0.742-1.539-1.698-2.34-2.741c-0.191,0.256-0.382,0.51-0.574,0.77c-0.524,0.709-1.059,1.424-1.604,2.127c1.904,2.31,3.88,4.578,6.809,4.952v2.701l7.556-4.362l-7.556-4.362V20.654zM9.192,11.933c0.756,0.741,1.538,1.697,2.339,2.739c0.195-0.262,0.39-0.521,0.587-0.788c0.52-0.703,1.051-1.412,1.592-2.11c-2.032-2.463-4.133-4.907-7.396-5.025h-3.5v3.5h3.5C6.969,10.223,7.996,10.735,9.192,11.933zM21.786,10.341v2.535l7.556-4.363l-7.556-4.363v2.647c-1.904,0.219-3.425,1.348-4.751,2.644c-2.196,2.183-4.116,5.167-6.011,7.538c-1.867,2.438-3.741,3.888-4.712,3.771h-3.5v3.5h3.5c2.185-0.029,3.879-1.266,5.34-2.693c2.194-2.184,4.116-5.167,6.009-7.538C19.205,12.003,20.746,10.679,21.786,10.341z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Skull();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Skull = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Skull.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Skull\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.947,11.14c0-5.174-3.979-9.406-10.613-9.406c-6.633,0-10.282,4.232-10.282,9.406c0,5.174,1.459,4.511,1.459,7.43c0,1.095-1.061,0.564-1.061,2.919c0,2.587,3.615,2.223,4.677,3.283c1.061,1.062,0.961,3.019,0.961,3.019s0.199,0.796,0.564,0.563c0,0,0.232,0.564,0.498,0.232c0,0,0.265,0.563,0.531,0.1c0,0,0.265,0.631,0.696,0.166c0,0,0.431,0.63,0.929,0.133c0,0,0.564,0.53,1.194,0.133c0.63,0.397,1.194-0.133,1.194-0.133c0.497,0.497,0.929-0.133,0.929-0.133c0.432,0.465,0.695-0.166,0.695-0.166c0.268,0.464,0.531-0.1,0.531-0.1c0.266,0.332,0.498-0.232,0.498-0.232c0.365,0.232,0.564-0.563,0.564-0.563s-0.1-1.957,0.961-3.019c1.062-1.061,4.676-0.696,4.676-3.283c0-2.354-1.061-1.824-1.061-2.919C24.488,15.651,25.947,16.314,25.947,11.14zM10.333,20.992c-1.783,0.285-2.59-0.215-2.785-1.492c-0.508-3.328,2.555-3.866,4.079-3.683c0.731,0.088,1.99,0.862,1.99,1.825C13.617,20.229,11.992,20.727,10.333,20.992zM16.461,25.303c-0.331,0-0.862-0.431-0.895-1.227c-0.033,0.796-0.63,1.227-0.961,1.227c-0.332,0-0.83-0.331-0.863-1.127c-0.033-0.796,1.028-4.013,1.792-4.013c0.762,0,1.824,3.217,1.791,4.013S16.794,25.303,16.461,25.303zM23.361,19.5c-0.195,1.277-1.004,1.777-2.787,1.492c-1.658-0.266-3.283-0.763-3.283-3.35c0-0.963,1.258-1.737,1.99-1.825C20.805,15.634,23.869,16.172,23.361,19.5z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Skype();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Skype = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Skype.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Skype\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.777,18.438c0.209-0.948,0.318-1.934,0.318-2.944c0-7.578-6.144-13.722-13.724-13.722c-0.799,0-1.584,0.069-2.346,0.2C11.801,1.199,10.35,0.75,8.793,0.75c-4.395,0-7.958,3.562-7.958,7.958c0,1.47,0.399,2.845,1.094,4.024c-0.183,0.893-0.277,1.814-0.277,2.76c0,7.58,6.144,13.723,13.722,13.723c0.859,0,1.699-0.078,2.515-0.23c1.119,0.604,2.399,0.945,3.762,0.945c4.395,0,7.957-3.562,7.957-7.959C29.605,20.701,29.309,19.502,28.777,18.438zM22.412,22.051c-0.635,0.898-1.573,1.609-2.789,2.115c-1.203,0.5-2.646,0.754-4.287,0.754c-1.971,0-3.624-0.346-4.914-1.031C9.5,23.391,8.74,22.717,8.163,21.885c-0.583-0.842-0.879-1.676-0.879-2.479c0-0.503,0.192-0.939,0.573-1.296c0.375-0.354,0.857-0.532,1.432-0.532c0.471,0,0.878,0.141,1.209,0.422c0.315,0.269,0.586,0.662,0.805,1.174c0.242,0.558,0.508,1.027,0.788,1.397c0.269,0.355,0.656,0.656,1.151,0.89c0.497,0.235,1.168,0.354,1.992,0.354c1.135,0,2.064-0.241,2.764-0.721c0.684-0.465,1.016-1.025,1.016-1.711c0-0.543-0.173-0.969-0.529-1.303c-0.373-0.348-0.865-0.621-1.465-0.807c-0.623-0.195-1.47-0.404-2.518-0.623c-1.424-0.306-2.634-0.668-3.596-1.076c-0.984-0.419-1.777-1-2.357-1.727c-0.59-0.736-0.889-1.662-0.889-2.75c0-1.036,0.314-1.971,0.933-2.776c0.613-0.8,1.51-1.423,2.663-1.849c1.139-0.422,2.494-0.635,4.027-0.635c1.225,0,2.303,0.141,3.201,0.421c0.904,0.282,1.668,0.662,2.267,1.13c0.604,0.472,1.054,0.977,1.335,1.5c0.284,0.529,0.43,1.057,0.43,1.565c0,0.49-0.189,0.937-0.563,1.324c-0.375,0.391-0.851,0.589-1.408,0.589c-0.509,0-0.905-0.124-1.183-0.369c-0.258-0.227-0.523-0.58-0.819-1.09c-0.342-0.65-0.756-1.162-1.229-1.523c-0.463-0.351-1.232-0.529-2.292-0.529c-0.984,0-1.784,0.197-2.379,0.588c-0.572,0.375-0.85,0.805-0.85,1.314c0,0.312,0.09,0.574,0.273,0.799c0.195,0.238,0.471,0.447,0.818,0.621c0.36,0.182,0.732,0.326,1.104,0.429c0.382,0.106,1.021,0.263,1.899,0.466c1.11,0.238,2.131,0.506,3.034,0.793c0.913,0.293,1.703,0.654,2.348,1.072c0.656,0.429,1.178,0.979,1.547,1.635c0.369,0.658,0.558,1.471,0.558,2.416C23.371,20.119,23.049,21.148,22.412,22.051z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.SlideShare();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.SlideShare = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.SlideShare.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.SlideShare\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.952,12.795c-0.956,1.062-5.073,2.409-5.604,2.409h-4.513c-0.749,0-1.877,0.147-2.408,0.484c0.061,0.054,0.122,0.108,0.181,0.163c0.408,0.379,1.362,0.913,2.206,0.913c0.397,0,0.723-0.115,1-0.354c1.178-1.007,1.79-1.125,2.145-1.125c0.421,0,0.783,0.193,0.996,0.531c0.4,0.626,0.106,1.445-0.194,2.087c-0.718,1.524-3.058,3.171-5.595,3.171c-0.002,0-0.002,0-0.004,0c-0.354,0-0.701-0.033-1.033-0.099v3.251c0,0.742,1.033,2.533,4.167,2.533s3.955-3.701,3.955-4.338v-4.512c2.23-1.169,4.512-1.805,5.604-3.895C30.882,12.05,29.907,11.733,28.952,12.795zM21.942,17.521c0.796-1.699-0.053-1.699-1.54-0.425s-3.665,0.105-4.408-0.585c-0.743-0.689-1.486-1.22-2.814-1.167c-1.328,0.053-4.46-0.161-6.267-0.585c-1.805-0.425-4.895-3-5.15-2.335c-0.266,0.69,0.211,1.168,1.168,2.335c0.955,1.169,5.075,2.778,5.075,2.778s0,3.453,0,4.886c0,1.435,2.973,3.61,4.512,3.61s2.708-1.062,2.708-1.806v-4.512C17.775,21.045,21.146,19.221,21.942,17.521zM20.342,13.73c1.744,0,3.159-1.414,3.159-3.158c0-1.745-1.415-3.159-3.159-3.159s-3.158,1.414-3.158,3.159C17.184,12.316,18.598,13.73,20.342,13.73zM12.019,13.73c1.744,0,3.158-1.414,3.158-3.158c0-1.745-1.414-3.159-3.158-3.159c-1.745,0-3.159,1.414-3.159,3.159C8.86,12.316,10.273,13.73,12.019,13.73z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Smile();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Smile = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Smile.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Smile\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM20.729,7.375c0.934,0,1.688,1.483,1.688,3.312S21.661,14,20.729,14c-0.932,0-1.688-1.483-1.688-3.312S19.798,7.375,20.729,7.375zM11.104,7.375c0.932,0,1.688,1.483,1.688,3.312S12.037,14,11.104,14s-1.688-1.483-1.688-3.312S10.172,7.375,11.104,7.375zM16.021,26c-2.873,0-5.563-1.757-7.879-4.811c2.397,1.564,5.021,2.436,7.774,2.436c2.923,0,5.701-0.98,8.215-2.734C21.766,24.132,18.99,26,16.021,26z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Smile2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Smile2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Smile2.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Smile2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM16,29.534C8.539,29.534,2.466,23.462,2.466,16C2.466,8.539,8.539,2.466,16,2.466c7.462,0,13.535,6.072,13.535,13.533C29.534,23.462,23.462,29.534,16,29.534zM11.104,14c0.932,0,1.688-1.483,1.688-3.312s-0.755-3.312-1.688-3.312s-1.688,1.483-1.688,3.312S10.172,14,11.104,14zM20.729,14c0.934,0,1.688-1.483,1.688-3.312s-0.756-3.312-1.688-3.312c-0.932,0-1.688,1.483-1.688,3.312S19.798,14,20.729,14zM8.143,21.189C10.458,24.243,13.148,26,16.021,26c2.969,0,5.745-1.868,8.11-5.109c-2.515,1.754-5.292,2.734-8.215,2.734C13.164,23.625,10.54,22.756,8.143,21.189z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Snow();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Snow = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Snow.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Snow\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM16.667,24.09l1.119-1.119c0.389-0.391,0.389-1.025,0-1.416c-0.392-0.391-1.025-0.391-1.415,0l-1.119,1.119l-1.119-1.119c-0.391-0.391-1.025-0.391-1.415,0c-0.391,0.391-0.391,1.025,0,1.416l1.118,1.117l-1.12,1.121c-0.389,0.393-0.389,1.021,0,1.414c0.195,0.188,0.451,0.293,0.707,0.293c0.256,0,0.512-0.104,0.708-0.293l1.12-1.119l1.12,1.119c0.195,0.188,0.451,0.293,0.708,0.293c0.256,0,0.512-0.104,0.707-0.293c0.391-0.396,0.391-1.021,0-1.414L16.667,24.09zM25.119,21.817c-0.393-0.392-1.025-0.392-1.415,0l-1.12,1.121l-1.12-1.121c-0.391-0.392-1.022-0.392-1.414,0c-0.39,0.392-0.39,1.022,0,1.416l1.119,1.119l-1.119,1.119c-0.39,0.391-0.39,1.022,0,1.413c0.195,0.195,0.451,0.294,0.707,0.294c0.257,0,0.513-0.099,0.707-0.294l1.12-1.118l1.12,1.118c0.194,0.195,0.45,0.294,0.707,0.294c0.256,0,0.513-0.099,0.708-0.294c0.389-0.391,0.389-1.022,0-1.413l-1.12-1.119l1.12-1.119C25.507,22.842,25.507,22.209,25.119,21.817zM9.334,23.953l1.119-1.119c0.389-0.394,0.389-1.021,0-1.414c-0.391-0.394-1.025-0.394-1.415,0l-1.119,1.119l-1.12-1.121c-0.391-0.39-1.023-0.39-1.415,0c-0.391,0.396-0.391,1.024,0,1.418l1.119,1.117l-1.12,1.118c-0.391,0.394-0.391,1.025,0,1.414c0.196,0.195,0.452,0.293,0.708,0.293c0.256,0,0.511-0.098,0.707-0.293l1.12-1.119l1.121,1.121c0.195,0.195,0.451,0.293,0.707,0.293s0.513-0.098,0.708-0.293c0.389-0.391,0.389-1.022,0-1.416L9.334,23.953z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Split();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Split = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Split.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Split\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.786,20.698c-1.792-0.237-2.912-1.331-4.358-2.886c-0.697-0.751-1.428-1.577-2.324-2.319c1.396-1.165,2.411-2.519,3.483-3.503c1.01-0.92,1.901-1.519,3.199-1.688v2.574l7.556-4.363L21.786,4.15v2.652c-3.34,0.266-5.45,2.378-6.934,4.013c-0.819,0.896-1.537,1.692-2.212,2.192c-0.685,0.501-1.227,0.731-2.013,0.742c-0.001,0-0.002,0-0.003,0H2.812v3.5h0.001v0.001c0,0,0.046-0.001,0.136-0.001h7.677c0.786,0.011,1.33,0.241,2.017,0.743c1.021,0.743,2.095,2.181,3.552,3.568c1.312,1.258,3.162,2.46,5.592,2.649v2.664l7.556-4.36l-7.556-4.361V20.698z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Star();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Star = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Star.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Star\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,22.375L7.116,28.83l3.396-10.438l-8.883-6.458l10.979,0.002L16.002,1.5l3.391,10.434h10.981l-8.886,6.457l3.396,10.439L16,22.375L16,22.375z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Star2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Star2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Star2.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Star2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.615,4.928c0.487-0.986,1.284-0.986,1.771,0l2.249,4.554c0.486,0.986,1.775,1.923,2.864,2.081l5.024,0.73c1.089,0.158,1.335,0.916,0.547,1.684l-3.636,3.544c-0.788,0.769-1.28,2.283-1.095,3.368l0.859,5.004c0.186,1.085-0.459,1.553-1.433,1.041l-4.495-2.363c-0.974-0.512-2.567-0.512-3.541,0l-4.495,2.363c-0.974,0.512-1.618,0.044-1.432-1.041l0.858-5.004c0.186-1.085-0.307-2.6-1.094-3.368L3.93,13.977c-0.788-0.768-0.542-1.525,0.547-1.684l5.026-0.73c1.088-0.158,2.377-1.095,2.864-2.081L14.615,4.928z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Star2Off();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Star2Off = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Star2Off.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Star2Off\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.522,12.293l-5.024-0.73c-1.089-0.158-2.378-1.095-2.864-2.081l-2.249-4.554c-0.487-0.986-1.284-0.986-1.771,0l-2.247,4.554c-0.487,0.986-1.776,1.923-2.864,2.081l-5.026,0.73c-1.088,0.158-1.334,0.916-0.547,1.684l3.637,3.544c0.788,0.769,1.28,2.283,1.094,3.368l-0.858,5.004c-0.186,1.085,0.458,1.553,1.432,1.041l4.495-2.363c0.974-0.512,2.566-0.512,3.541,0l4.495,2.363c0.974,0.512,1.618,0.044,1.433-1.041l-0.859-5.004c-0.186-1.085,0.307-2.6,1.095-3.368l3.636-3.544C27.857,13.209,27.611,12.452,26.522,12.293zM22.037,16.089c-1.266,1.232-1.966,3.394-1.67,5.137l0.514,2.984l-2.679-1.409c-0.757-0.396-1.715-0.612-2.702-0.612s-1.945,0.216-2.7,0.61l-2.679,1.409l0.511-2.982c0.297-1.743-0.404-3.905-1.671-5.137l-2.166-2.112l2.995-0.435c1.754-0.255,3.592-1.591,4.373-3.175L15.5,7.652l1.342,2.716c0.781,1.583,2.617,2.92,4.369,3.173l2.992,0.435L22.037,16.089z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Star3();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Star3 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Star3.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Star3\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.441,28.181c-0.419,0-0.835-0.132-1.189-0.392l-5.751-4.247L9.75,27.789c-0.354,0.26-0.771,0.392-1.189,0.392c-0.412,0-0.824-0.128-1.175-0.384c-0.707-0.511-1-1.422-0.723-2.25l2.26-6.783l-5.815-4.158c-0.71-0.509-1.009-1.416-0.74-2.246c0.268-0.826,1.037-1.382,1.904-1.382c0.004,0,0.01,0,0.014,0l7.15,0.056l2.157-6.816c0.262-0.831,1.035-1.397,1.906-1.397s1.645,0.566,1.906,1.397l2.155,6.816l7.15-0.056c0.004,0,0.01,0,0.015,0c0.867,0,1.636,0.556,1.903,1.382c0.271,0.831-0.028,1.737-0.739,2.246l-5.815,4.158l2.263,6.783c0.276,0.826-0.017,1.737-0.721,2.25C23.268,28.053,22.854,28.181,22.441,28.181L22.441,28.181z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Star3Off();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Star3Off = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Star3Off.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Star3Off\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M28.631,12.359c-0.268-0.826-1.036-1.382-1.903-1.382h-0.015l-7.15,0.056l-2.155-6.816c-0.262-0.831-1.035-1.397-1.906-1.397s-1.645,0.566-1.906,1.397l-2.157,6.816l-7.15-0.056H4.273c-0.868,0-1.636,0.556-1.904,1.382c-0.27,0.831,0.029,1.737,0.74,2.246l5.815,4.158l-2.26,6.783c-0.276,0.828,0.017,1.739,0.723,2.25c0.351,0.256,0.763,0.384,1.175,0.384c0.418,0,0.834-0.132,1.189-0.392l5.751-4.247l5.751,4.247c0.354,0.26,0.771,0.392,1.189,0.392c0.412,0,0.826-0.128,1.177-0.384c0.704-0.513,0.997-1.424,0.721-2.25l-2.263-6.783l5.815-4.158C28.603,14.097,28.901,13.19,28.631,12.359zM19.712,17.996l2.729,8.184l-6.94-5.125L8.56,26.18l2.729-8.184l-7.019-5.018l8.627,0.066L15.5,4.82l2.603,8.225l8.627-0.066L19.712,17.996z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.StarOff();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.StarOff = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.StarOff.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.StarOff\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,22.375L7.116,28.83l3.396-10.438l-8.883-6.458l10.979,0.002L16.002,1.5l3.391,10.434h10.981l-8.886,6.457l3.396,10.439L16,22.375L16,22.375zM22.979,26.209l-2.664-8.205l6.979-5.062h-8.627L16,4.729l-2.666,8.206H4.708l6.979,5.07l-2.666,8.203L16,21.146L22.979,26.209L22.979,26.209z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Start();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Start = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Start.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Start\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Sticker();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Sticker = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Sticker.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Sticker\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,1.999c-1.042,0-1.916,0.377-2.57,1.088L2.895,13.138C2.302,13.784,1.999,14.58,1.999,15.5C1.999,22.943,8.057,29,15.5,29S29,22.943,29,15.5S22.943,1.999,15.5,1.999zM15.5,28C8.596,28,3,22.404,3,15.5c0-3.452,5.239-2.737,7.501-4.999C12.762,8.239,12.048,3,15.5,3C22.404,3,28,8.597,28,15.5S22.404,28,15.5,28z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Stop();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Stop = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Stop.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Stop\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M5.5,5.5h20v20h-20z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.StopWatch();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.StopWatch = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.StopWatch.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.StopWatch\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.216,18.533c0-3.636-1.655-6.883-4.253-9.032l0.733-0.998l0.482,0.354c0.198,0.146,0.481,0.104,0.628-0.097l0.442-0.604c0.146-0.198,0.103-0.482-0.097-0.628l-2.052-1.506c-0.199-0.146-0.481-0.103-0.628,0.097L22.03,6.724c-0.146,0.199-0.104,0.482,0.096,0.628l0.483,0.354l-0.736,1.003c-1.28-0.834-2.734-1.419-4.296-1.699c0.847-0.635,1.402-1.638,1.403-2.778h-0.002c0-1.922-1.557-3.48-3.479-3.48c-1.925,0-3.48,1.559-3.48,3.48c0,1.141,0.556,2.144,1.401,2.778c-1.549,0.277-2.99,0.857-4.265,1.68L8.424,7.684l0.484-0.353c0.198-0.145,0.245-0.428,0.098-0.628l-0.44-0.604C8.42,5.899,8.136,5.855,7.937,6.001L5.881,7.5c-0.2,0.146-0.243,0.428-0.099,0.628l0.442,0.604c0.145,0.2,0.428,0.244,0.627,0.099l0.483-0.354l0.729,0.999c-2.615,2.149-4.282,5.407-4.282,9.057c0,6.471,5.245,11.716,11.718,11.716c6.47,0,11.716-5.243,11.718-11.716H27.216zM12.918,4.231c0.002-1.425,1.155-2.58,2.582-2.582c1.426,0.002,2.579,1.157,2.581,2.582c-0.002,1.192-0.812,2.184-1.908,2.482v-1.77h0.6c0.246,0,0.449-0.203,0.449-0.449V3.746c0-0.247-0.203-0.449-0.449-0.449h-2.545c-0.247,0-0.449,0.202-0.449,0.449v0.749c0,0.246,0.202,0.449,0.449,0.449h0.599v1.77C13.729,6.415,12.919,5.424,12.918,4.231zM15.5,27.554c-4.983-0.008-9.015-4.038-9.022-9.021c0.008-4.982,4.039-9.013,9.022-9.022c4.981,0.01,9.013,4.04,9.021,9.022C24.513,23.514,20.481,27.546,15.5,27.554zM15.5,12.138c0.476,0,0.861-0.385,0.861-0.86s-0.386-0.861-0.861-0.861s-0.861,0.386-0.861,0.861S15.024,12.138,15.5,12.138zM15.5,24.927c-0.476,0-0.861,0.386-0.861,0.861s0.386,0.861,0.861,0.861s0.861-0.386,0.861-0.861S15.976,24.927,15.5,24.927zM12.618,11.818c-0.237-0.412-0.764-0.553-1.176-0.315c-0.412,0.238-0.554,0.765-0.315,1.177l2.867,6.722c0.481,0.831,1.543,1.116,2.375,0.637c0.829-0.479,1.114-1.543,0.635-2.374L12.618,11.818zM18.698,24.07c-0.412,0.237-0.555,0.765-0.316,1.176c0.237,0.412,0.764,0.554,1.176,0.315c0.413-0.238,0.553-0.765,0.316-1.176C19.635,23.974,19.108,23.832,18.698,24.07zM8.787,15.65c0.412,0.238,0.938,0.097,1.176-0.315c0.237-0.413,0.097-0.938-0.314-1.176c-0.412-0.239-0.938-0.098-1.177,0.313C8.234,14.886,8.375,15.412,8.787,15.65zM22.215,21.413c-0.412-0.236-0.938-0.096-1.176,0.316c-0.238,0.412-0.099,0.938,0.314,1.176c0.41,0.238,0.937,0.098,1.176-0.314C22.768,22.178,22.625,21.652,22.215,21.413zM9.107,18.531c-0.002-0.476-0.387-0.86-0.861-0.86c-0.477,0-0.862,0.385-0.862,0.86c0.001,0.476,0.386,0.86,0.861,0.861C8.722,19.393,9.106,19.008,9.107,18.531zM21.896,18.531c0,0.477,0.384,0.862,0.859,0.86c0.476,0.002,0.862-0.382,0.862-0.859s-0.387-0.86-0.862-0.862C22.279,17.671,21.896,18.056,21.896,18.531zM8.787,21.413c-0.412,0.238-0.554,0.765-0.316,1.176c0.239,0.412,0.765,0.553,1.177,0.316c0.413-0.239,0.553-0.765,0.315-1.178C9.725,21.317,9.198,21.176,8.787,21.413zM21.352,14.157c-0.411,0.238-0.551,0.764-0.312,1.176c0.237,0.413,0.764,0.555,1.174,0.315c0.412-0.236,0.555-0.762,0.316-1.176C22.29,14.06,21.766,13.921,21.352,14.157zM12.304,24.067c-0.413-0.235-0.939-0.096-1.176,0.315c-0.238,0.413-0.098,0.939,0.312,1.178c0.413,0.236,0.939,0.096,1.178-0.315C12.857,24.832,12.715,24.308,12.304,24.067zM18.698,12.992c0.41,0.238,0.938,0.099,1.174-0.313c0.238-0.411,0.1-0.938-0.314-1.177c-0.414-0.238-0.937-0.097-1.177,0.315C18.144,12.229,18.286,12.755,18.698,12.992z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Sun();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Sun = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Sun.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Sun\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.502,7.504c-4.35,0-7.873,3.523-7.873,7.873c0,4.347,3.523,7.872,7.873,7.872c4.346,0,7.871-3.525,7.871-7.872C23.374,11.027,19.85,7.504,15.502,7.504zM15.502,21.25c-3.244-0.008-5.866-2.63-5.874-5.872c0.007-3.243,2.63-5.866,5.874-5.874c3.242,0.008,5.864,2.631,5.871,5.874C21.366,18.62,18.744,21.242,15.502,21.25zM15.502,6.977c0.553,0,1-0.448,1-1.001V1.125c-0.002-0.553-0.448-1-1-1c-0.553,0-1.001,0.449-1,1.002v4.85C14.502,6.528,14.949,6.977,15.502,6.977zM18.715,7.615c0.125,0.053,0.255,0.076,0.382,0.077c0.394,0,0.765-0.233,0.925-0.618l1.856-4.483c0.21-0.511-0.031-1.095-0.541-1.306c-0.511-0.211-1.096,0.031-1.308,0.541L18.174,6.31C17.963,6.82,18.205,7.405,18.715,7.615zM21.44,9.436c0.195,0.194,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293l3.43-3.433c0.391-0.39,0.39-1.023,0-1.415c-0.392-0.39-1.025-0.39-1.415,0.002L21.44,8.021C21.049,8.412,21.049,9.045,21.44,9.436zM23.263,12.16c0.158,0.385,0.531,0.617,0.923,0.617c0.127,0,0.257-0.025,0.383-0.078l4.48-1.857c0.511-0.211,0.753-0.797,0.541-1.307s-0.796-0.752-1.307-0.54l-4.481,1.857C23.292,11.064,23.051,11.65,23.263,12.16zM29.752,14.371l-4.851,0.001c-0.552,0-1,0.448-0.998,1.001c0,0.553,0.447,0.999,0.998,0.999l4.852-0.002c0.553,0,0.999-0.449,0.999-1C30.752,14.817,30.304,14.369,29.752,14.371zM29.054,19.899l-4.482-1.854c-0.512-0.212-1.097,0.03-1.307,0.541c-0.211,0.511,0.031,1.096,0.541,1.308l4.482,1.854c0.126,0.051,0.256,0.075,0.383,0.075c0.393,0,0.765-0.232,0.925-0.617C29.806,20.695,29.563,20.109,29.054,19.899zM22.86,21.312c-0.391-0.391-1.023-0.391-1.414,0.001c-0.391,0.39-0.39,1.022,0,1.413l3.434,3.429c0.195,0.195,0.45,0.293,0.706,0.293s0.513-0.098,0.708-0.293c0.391-0.392,0.389-1.025,0-1.415L22.86,21.312zM20.029,23.675c-0.211-0.511-0.796-0.752-1.307-0.541c-0.51,0.212-0.752,0.797-0.54,1.308l1.86,4.48c0.159,0.385,0.531,0.617,0.925,0.617c0.128,0,0.258-0.024,0.383-0.076c0.511-0.211,0.752-0.797,0.54-1.309L20.029,23.675zM15.512,23.778c-0.553,0-1,0.448-1,1l0.004,4.851c0,0.553,0.449,0.999,1,0.999c0.553,0,1-0.448,0.998-1l-0.003-4.852C16.511,24.226,16.062,23.777,15.512,23.778zM12.296,23.142c-0.51-0.21-1.094,0.031-1.306,0.543l-1.852,4.483c-0.21,0.511,0.033,1.096,0.543,1.307c0.125,0.052,0.254,0.076,0.382,0.076c0.392,0,0.765-0.234,0.924-0.619l1.853-4.485C13.051,23.937,12.807,23.353,12.296,23.142zM9.57,21.325c-0.392-0.391-1.025-0.389-1.415,0.002L4.729,24.76c-0.391,0.392-0.389,1.023,0.002,1.415c0.195,0.194,0.45,0.292,0.706,0.292c0.257,0,0.513-0.098,0.708-0.293l3.427-3.434C9.961,22.349,9.961,21.716,9.57,21.325zM7.746,18.604c-0.213-0.509-0.797-0.751-1.307-0.54L1.96,19.925c-0.511,0.212-0.752,0.798-0.54,1.308c0.16,0.385,0.531,0.616,0.924,0.616c0.127,0,0.258-0.024,0.383-0.076l4.479-1.861C7.715,19.698,7.957,19.113,7.746,18.604zM7.1,15.392c0-0.553-0.447-0.999-1-0.999l-4.851,0.006c-0.553,0-1.001,0.448-0.999,1.001c0.001,0.551,0.449,1,1,0.998l4.852-0.006C6.654,16.392,7.102,15.942,7.1,15.392zM1.944,10.869l4.485,1.85c0.125,0.053,0.254,0.076,0.381,0.076c0.393,0,0.766-0.232,0.925-0.618c0.212-0.511-0.032-1.097-0.544-1.306L2.708,9.021c-0.511-0.21-1.095,0.032-1.306,0.542C1.19,10.074,1.435,10.657,1.944,10.869zM8.137,9.451c0.195,0.193,0.449,0.291,0.705,0.291s0.513-0.098,0.709-0.295c0.391-0.389,0.389-1.023-0.004-1.414L6.113,4.609C5.723,4.219,5.088,4.221,4.699,4.612c-0.391,0.39-0.389,1.024,0.002,1.414L8.137,9.451zM10.964,7.084c0.16,0.384,0.532,0.615,0.923,0.615c0.128,0,0.258-0.025,0.384-0.077c0.51-0.212,0.753-0.798,0.54-1.307l-1.864-4.479c-0.212-0.51-0.798-0.751-1.308-0.539C9.129,1.51,8.888,2.096,9.1,2.605L10.964,7.084z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Svg();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Svg = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Svg.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Svg\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M31.274,15.989c0-2.473-2.005-4.478-4.478-4.478l0,0c0.81-0.811,1.312-1.93,1.312-3.167c0-2.474-2.005-4.479-4.479-4.479c-1.236,0-2.356,0.501-3.167,1.312c0-2.473-2.005-4.478-4.478-4.478c-2.474,0-4.479,2.005-4.479,4.478c-0.811-0.81-1.93-1.312-3.167-1.312c-2.474,0-4.479,2.005-4.479,4.479c0,1.236,0.501,2.356,1.312,3.166c-2.474,0-4.479,2.005-4.479,4.479c0,2.474,2.005,4.479,4.479,4.479c-0.811,0.81-1.312,1.93-1.312,3.167c0,2.473,2.005,4.478,4.479,4.478c1.236,0,2.356-0.501,3.167-1.312c0,2.473,2.005,4.479,4.479,4.479c2.473,0,4.478-2.006,4.478-4.479l0,0c0.811,0.811,1.931,1.312,3.167,1.312c2.474,0,4.478-2.005,4.478-4.478c0-1.237-0.501-2.357-1.312-3.168c0.001,0,0.001,0,0.001,0C29.27,20.467,31.274,18.463,31.274,15.989zM23.583,21.211c0.016,0,0.031-0.001,0.047-0.001c1.339,0,2.424,1.085,2.424,2.425c0,1.338-1.085,2.424-2.424,2.424s-2.424-1.086-2.424-2.424c0-0.017,0.001-0.031,0.001-0.047l-3.541-3.542v5.009c0.457,0.44,0.743,1.06,0.743,1.746c0,1.339-1.086,2.424-2.424,2.424c-1.339,0-2.425-1.085-2.425-2.424c0-0.687,0.286-1.306,0.743-1.746v-5.009l-3.541,3.542c0,0.016,0.001,0.031,0.001,0.047c0,1.338-1.085,2.424-2.424,2.424s-2.424-1.086-2.424-2.424c0-1.34,1.085-2.425,2.424-2.425c0.015,0,0.031,0.001,0.046,0.001l3.542-3.541H6.919c-0.44,0.458-1.06,0.743-1.746,0.743c-1.339,0-2.424-1.085-2.424-2.424s1.085-2.424,2.424-2.424c0.686,0,1.305,0.285,1.746,0.744h5.008l-3.542-3.542c-0.015,0-0.031,0.001-0.046,0.001c-1.339,0-2.424-1.085-2.424-2.424S7.001,5.92,8.34,5.92s2.424,1.085,2.424,2.424c0,0.015-0.001,0.031-0.001,0.046l3.541,3.542V6.924c-0.457-0.441-0.743-1.06-0.743-1.746c0-1.339,1.086-2.425,2.425-2.425c1.338,0,2.424,1.085,2.424,2.425c0,0.686-0.286,1.305-0.743,1.746v5.008l3.541-3.542c0-0.015-0.001-0.031-0.001-0.046c0-1.339,1.085-2.424,2.424-2.424s2.424,1.085,2.424,2.424c0,1.339-1.085,2.424-2.424,2.424c-0.016,0-0.031-0.001-0.047-0.001l-3.541,3.542h5.008c0.441-0.458,1.061-0.744,1.747-0.744c1.338,0,2.423,1.085,2.423,2.424s-1.085,2.424-2.423,2.424c-0.687,0-1.306-0.285-1.747-0.743h-5.008L23.583,21.211z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.TShirt();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.TShirt = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.TShirt.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.TShirt\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.1,4.039c-0.681,1.677-2.32,2.862-4.24,2.862c-1.921,0-3.56-1.185-4.24-2.862L1.238,8.442l2.921,6.884l3.208-1.361V28h17.099V14.015l3.093,1.312l2.922-6.884L20.1,4.039z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Tag();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Tag = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Tag.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Tag\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.263,2.826H7.904L2.702,8.028v6.359L18.405,30.09l11.561-11.562L14.263,2.826zM6.495,8.859c-0.619-0.619-0.619-1.622,0-2.24C7.114,6,8.117,6,8.736,6.619c0.62,0.62,0.619,1.621,0,2.241C8.117,9.479,7.114,9.479,6.495,8.859z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.TakeOff();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.TakeOff = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.TakeOff.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.TakeOff\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M10.27,19.267c0,0,9.375-1.981,16.074-8.681c0,0,1.395-1.339-1.338-1.339c-2.305,0-5.6,2.438-5.6,2.438l-9.137-1.42l-1.769,1.769l4.983,2.411l-3.001,2.035l-2.571-1.285L6.09,16.052C6.09,16.052,8.02,18.062,10.27,19.267zM3.251,23.106v1.998h24.498v-1.998H3.251z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Talke();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Talke = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Talke.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Talke\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.982,21.375h-1.969v-1.889h1.969V21.375zM16.982,17.469v0.625h-1.969v-0.769c0-2.321,2.641-2.689,2.641-4.337c0-0.752-0.672-1.329-1.553-1.329c-0.912,0-1.713,0.672-1.713,0.672l-1.12-1.393c0,0,1.104-1.153,3.009-1.153c1.81,0,3.49,1.121,3.49,3.009C19.768,15.437,16.982,15.741,16.982,17.469z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Talkq();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Talkq = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Talkq.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Talkq\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Thunder();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Thunder = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Thunder.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Thunder\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h5.271l-2.166,3.398l1.977-0.411L10,30.875l9.138-10.102L17,21l2.167-2.023h4.269c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Trash();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Trash = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Trash.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Trash\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.826,5.75l0.396,1.188c1.54,0.575,2.589,1.44,2.589,2.626c0,2.405-4.308,3.498-8.312,3.498c-4.003,0-8.311-1.093-8.311-3.498c0-1.272,1.21-2.174,2.938-2.746l0.388-1.165c-2.443,0.648-4.327,1.876-4.327,3.91v2.264c0,1.224,0.685,2.155,1.759,2.845l0.396,9.265c0,1.381,3.274,2.5,7.312,2.5c4.038,0,7.313-1.119,7.313-2.5l0.405-9.493c0.885-0.664,1.438-1.521,1.438-2.617V9.562C24.812,7.625,23.101,6.42,20.826,5.75zM11.093,24.127c-0.476-0.286-1.022-0.846-1.166-1.237c-1.007-2.76-0.73-4.921-0.529-7.509c0.747,0.28,1.58,0.491,2.45,0.642c-0.216,2.658-0.43,4.923,0.003,7.828C11.916,24.278,11.567,24.411,11.093,24.127zM17.219,24.329c-0.019,0.445-0.691,0.856-1.517,0.856c-0.828,0-1.498-0.413-1.517-0.858c-0.126-2.996-0.032-5.322,0.068-8.039c0.418,0.022,0.835,0.037,1.246,0.037c0.543,0,1.097-0.02,1.651-0.059C17.251,18.994,17.346,21.325,17.219,24.329zM21.476,22.892c-0.143,0.392-0.69,0.95-1.165,1.235c-0.474,0.284-0.817,0.151-0.754-0.276c0.437-2.93,0.214-5.209-0.005-7.897c0.881-0.174,1.708-0.417,2.44-0.731C22.194,17.883,22.503,20.076,21.476,22.892zM11.338,9.512c0.525,0.173,1.092-0.109,1.268-0.633h-0.002l0.771-2.316h4.56l0.771,2.316c0.14,0.419,0.53,0.685,0.949,0.685c0.104,0,0.211-0.017,0.316-0.052c0.524-0.175,0.808-0.742,0.633-1.265l-1.002-3.001c-0.136-0.407-0.518-0.683-0.945-0.683h-6.002c-0.428,0-0.812,0.275-0.948,0.683l-1,2.999C10.532,8.77,10.815,9.337,11.338,9.512z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Twitter();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Twitter = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Twitter.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Twitter\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M23.295,22.567h-7.213c-2.125,0-4.103-2.215-4.103-4.736v-1.829h11.232c1.817,0,3.291-1.469,3.291-3.281c0-1.813-1.474-3.282-3.291-3.282H11.979V6.198c0-1.835-1.375-3.323-3.192-3.323c-1.816,0-3.29,1.488-3.29,3.323v11.633c0,6.23,4.685,11.274,10.476,11.274h7.211c1.818,0,3.318-1.463,3.318-3.298S25.112,22.567,23.295,22.567z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.TwitterBird();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.TwitterBird = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.TwitterBird.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.TwitterBird\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.605,13.11c0.913-2.851,2.029-4.698,3.313-6.038c0.959-1,1.453-1.316,0.891-0.216c0.25-0.199,0.606-0.464,0.885-0.605c1.555-0.733,1.442-0.119,0.373,0.54c2.923-1.045,2.82,0.286-0.271,0.949c2.527,0.047,5.214,1.656,5.987,5.077c0.105,0.474-0.021,0.428,0.464,0.514c1.047,0.186,2.03,0.174,2.991-0.13c-0.104,0.708-1.039,1.167-2.497,1.471c-0.541,0.112-0.651,0.083-0.005,0.229c0.799,0.179,1.69,0.226,2.634,0.182c-0.734,0.846-1.905,1.278-3.354,1.296c-0.904,3.309-2.976,5.678-5.596,7.164c-6.152,3.492-15.108,2.984-19.599-3.359c2.947,2.312,7.312,2.821,10.555-0.401c-2.125,0-2.674-1.591-0.99-2.449c-1.595-0.017-2.608-0.521-3.203-1.434c-0.226-0.347-0.229-0.374,0.14-0.64c0.405-0.293,0.958-0.423,1.528-0.467c-1.651-0.473-2.66-1.335-3.009-2.491c-0.116-0.382-0.134-0.363,0.256-0.462c0.38-0.097,0.87-0.148,1.309-0.17C6.11,10.88,5.336,9.917,5.139,8.852c-0.186-1.006,0.005-0.748,0.758-0.46C9.263,9.68,12.619,11.062,14.605,13.11L14.605,13.11z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Umbrella();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Umbrella = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Umbrella.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Umbrella\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M14.784,26.991c0,1.238-1.329,1.696-1.835,1.696c-0.504,0-1.536-0.413-1.65-1.812c0-0.354-0.288-0.642-0.644-0.642c-0.354,0-0.641,0.287-0.641,0.642c0.045,1.056,0.756,3.052,2.935,3.052c2.432,0,3.166-1.882,3.166-3.144v-8.176l-1.328-0.024C14.787,18.584,14.784,25.889,14.784,26.991zM15.584,9.804c-6.807,0-11.084,4.859-11.587,8.326c0.636-0.913,1.694-1.51,2.89-1.51c1.197,0,2.22,0.582,2.855,1.495c0.638-0.904,1.69-1.495,2.88-1.495c1.2,0,2.26,0.6,2.896,1.517c0.635-0.917,1.83-1.517,3.03-1.517c1.19,0,2.241,0.591,2.879,1.495c0.636-0.913,1.659-1.495,2.855-1.495c1.197,0,2.254,0.597,2.89,1.51C26.669,14.663,22.393,9.804,15.584,9.804zM14.733,7.125v2.081h1.323V7.125c0-0.365-0.296-0.661-0.661-0.661C15.029,6.464,14.733,6.76,14.733,7.125z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Undo();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Undo = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Undo.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Undo\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M12.981,9.073V6.817l-12.106,6.99l12.106,6.99v-2.422c3.285-0.002,9.052,0.28,9.052,2.269c0,2.78-6.023,4.263-6.023,4.263v2.132c0,0,13.53,0.463,13.53-9.823C29.54,9.134,17.952,8.831,12.981,9.073z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Unlock();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Unlock = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Unlock.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Unlock\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.375,12.833h-2.209V10c0,0,0,0,0-0.001c0-2.389,1.945-4.333,4.334-4.333c2.391,0,4.335,1.944,4.335,4.333c0,0,0,0,0,0v2.834h2V9.999h-0.001c-0.001-3.498-2.836-6.333-6.334-6.333S16.166,6.502,16.166,10v2.833H3.125V25h17.25V12.833z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Usb();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Usb = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Usb.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Usb\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M15.5,1.667L13.745,4.74h1.252v15.709L11.8,17.391c-0.205-0.26-0.351-0.601-0.358-0.952c0-1.417-0.001-2.258-0.001-2.568c0.592-0.21,1.02-0.774,1.02-1.444c0-0.849-0.682-1.538-1.521-1.538c-0.84,0-1.521,0.689-1.521,1.538c0,0.67,0.427,1.234,1.019,1.444l-0.001,2.539c0,0.688,0.373,1.409,0.812,1.868c-0.013-0.013-0.027-0.025,0,0c0.011,0.01,3.392,3.245,3.392,3.245c0.205,0.26,0.35,0.6,0.357,0.951v1.776c-1.161,0.236-2.036,1.272-2.036,2.517c0,1.418,1.137,2.566,2.539,2.566c1.403,0,2.54-1.148,2.54-2.566c0-1.244-0.875-2.28-2.038-2.517v-1.746c0-0.005,0-0.009,0-0.014v-3.861c0.008-0.35,0.152-0.689,0.358-0.949c0,0,3.38-3.234,3.392-3.245c0.027-0.026,0.012-0.013,0,0c0.438-0.459,0.811-1.181,0.811-1.869V10.12h1.02V7.046h-3.041v3.075h1.018c0,0-0.002,0.644-0.002,2.476c-0.008,0.351-0.152,0.692-0.357,0.952l-3.198,3.06V4.74h1.254L15.5,1.667z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.User();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.User = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.User.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.User\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.771,12.364c0,0,0.849-3.51,0-4.699c-0.85-1.189-1.189-1.981-3.058-2.548s-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.792-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.321s0.283,3.058,0.566,3.624l-0.337,0.113c-0.283,3.283,1.132,3.68,1.132,3.68c0.509,3.058,1.019,1.756,1.019,2.548s-0.51,0.51-0.51,0.51s-0.452,1.245-1.584,1.698c-1.132,0.452-7.416,2.886-7.927,3.396c-0.511,0.511-0.453,2.888-0.453,2.888h26.947c0,0,0.059-2.377-0.452-2.888c-0.512-0.511-6.796-2.944-7.928-3.396c-1.132-0.453-1.584-1.698-1.584-1.698s-0.51,0.282-0.51-0.51s0.51,0.51,1.02-2.548c0,0,1.414-0.397,1.132-3.68H20.771z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Users();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Users = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Users.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Users\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.053,20.8c-1.132-0.453-1.584-1.698-1.584-1.698s-0.51,0.282-0.51-0.51s0.51,0.51,1.02-2.548c0,0,1.414-0.397,1.132-3.68h-0.34c0,0,0.849-3.51,0-4.699c-0.85-1.189-1.189-1.981-3.058-2.548s-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.792-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.321s0.283,3.058,0.566,3.624l-0.337,0.113c-0.283,3.283,1.132,3.68,1.132,3.68c0.509,3.058,1.019,1.756,1.019,2.548s-0.51,0.51-0.51,0.51s-0.452,1.245-1.584,1.698c-1.132,0.452-7.416,2.886-7.927,3.396c-0.511,0.511-0.453,2.888-0.453,2.888h26.947c0,0,0.059-2.377-0.452-2.888C28.469,23.686,22.185,21.252,21.053,20.8zM8.583,20.628c-0.099-0.18-0.148-0.31-0.148-0.31s-0.432,0.239-0.432-0.432s0.432,0.432,0.864-2.159c0,0,1.199-0.336,0.959-3.119H9.538c0,0,0.143-0.591,0.237-1.334c-0.004-0.308,0.006-0.636,0.037-0.996l0.038-0.426c-0.021-0.492-0.107-0.939-0.312-1.226C8.818,9.619,8.53,8.947,6.947,8.467c-1.583-0.48-1.008-0.385-2.159-0.336C3.636,8.179,2.676,8.802,2.676,9.139c0,0-0.72,0.048-1.008,0.336c-0.271,0.271-0.705,1.462-0.757,1.885v0.281c0.047,0.653,0.258,2.449,0.469,2.872l-0.286,0.096c-0.239,2.783,0.959,3.119,0.959,3.119c0.432,2.591,0.864,1.488,0.864,2.159s-0.432,0.432-0.432,0.432s-0.383,1.057-1.343,1.439c-0.061,0.024-0.139,0.056-0.232,0.092v5.234h0.575c-0.029-1.278,0.077-2.927,0.746-3.594C2.587,23.135,3.754,22.551,8.583,20.628zM30.913,11.572c-0.04-0.378-0.127-0.715-0.292-0.946c-0.719-1.008-1.008-1.679-2.59-2.159c-1.584-0.48-1.008-0.385-2.16-0.336C24.72,8.179,23.76,8.802,23.76,9.139c0,0-0.719,0.048-1.008,0.336c-0.271,0.272-0.709,1.472-0.758,1.891h0.033l0.08,0.913c0.02,0.231,0.022,0.436,0.027,0.645c0.09,0.666,0.21,1.35,0.33,1.589l-0.286,0.096c-0.239,2.783,0.96,3.119,0.96,3.119c0.432,2.591,0.863,1.488,0.863,2.159s-0.432,0.432-0.432,0.432s-0.053,0.142-0.163,0.338c4.77,1.9,5.927,2.48,6.279,2.834c0.67,0.667,0.775,2.315,0.746,3.594h0.48v-5.306c-0.016-0.006-0.038-0.015-0.052-0.021c-0.959-0.383-1.343-1.439-1.343-1.439s-0.433,0.239-0.433-0.432s0.433,0.432,0.864-2.159c0,0,0.804-0.229,0.963-1.841v-1.227c-0.001-0.018-0.001-0.033-0.003-0.051h-0.289c0,0,0.215-0.89,0.292-1.861V11.572z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Video();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Video = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Video.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Video\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.188,4.875v1.094h-4.5V4.875H8.062v1.094h-4.5V4.875h-1v21.25h1v-1.094h4.5v1.094h14.625v-1.094h4.5v1.094h1.25V4.875H27.188zM8.062,23.719h-4.5v-3.125h4.5V23.719zM8.062,19.281h-4.5v-3.125h4.5V19.281zM8.062,14.844h-4.5v-3.125h4.5V14.844zM8.062,10.406h-4.5V7.281h4.5V10.406zM11.247,20.59V9.754l9.382,5.418L11.247,20.59zM27.188,23.719h-4.5v-3.125h4.5V23.719zM27.188,19.281h-4.5v-3.125h4.5V19.281zM27.188,14.844h-4.5v-3.125h4.5V14.844zM27.188,10.406h-4.5V7.281h4.5V10.406z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.View();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.View = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.View.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.View\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M16,8.286C8.454,8.286,2.5,16,2.5,16s5.954,7.715,13.5,7.715c5.771,0,13.5-7.715,13.5-7.715S21.771,8.286,16,8.286zM16,20.807c-2.649,0-4.807-2.157-4.807-4.807s2.158-4.807,4.807-4.807s4.807,2.158,4.807,4.807S18.649,20.807,16,20.807zM16,13.194c-1.549,0-2.806,1.256-2.806,2.806c0,1.55,1.256,2.806,2.806,2.806c1.55,0,2.806-1.256,2.806-2.806C18.806,14.451,17.55,13.194,16,13.194z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Vim();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Vim = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Vim.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Vim\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M25.012,10.44l4.571-4.645c0.11-0.113,0.173-0.264,0.173-0.423V3.134c0-0.159-0.064-0.314-0.177-0.427l-0.604-0.602c-0.111-0.112-0.261-0.176-0.42-0.177l-9.646-0.086C18.71,1.84,18.523,1.935,18.41,2.099L17.807,2.96c-0.033,0.047-0.059,0.099-0.076,0.154l-2.144-2.156l0,0l-1.646,1.666l-0.447-0.497c-0.112-0.125-0.27-0.197-0.438-0.199L3.324,1.756c-0.163-0.003-0.322,0.06-0.437,0.176L2.284,2.535C2.171,2.647,2.107,2.803,2.107,2.962v2.325c0,0.164,0.066,0.32,0.183,0.434l0.657,0.635C3.056,6.461,3.2,6.521,3.352,6.525l0.285,0.007l0.007,6.512l-2.527,2.557l2.533,2.533l0.008,8.084c0,0.159,0.065,0.314,0.177,0.427l0.861,0.861c0.112,0.111,0.268,0.176,0.427,0.176h2.67c0.161,0,0.317-0.064,0.43-0.181l2.378-2.417l4.9,4.9l14.47-14.558L25.012,10.44zM9.747,24.232l-2.208,2.242H5.372l-0.509-0.509L4.856,19.34l-0.008-7.515L4.842,5.943c0-0.328-0.261-0.594-0.588-0.603L3.617,5.326L3.313,5.031v-1.82l0.245-0.245l9.215,0.163l0.319,0.354l0.126,0.141v1.419l-0.352,0.362H12.26c-0.331,0-0.6,0.266-0.603,0.597l-0.076,7.203c-0.002,0.244,0.141,0.463,0.365,0.56c0.224,0.096,0.482,0.049,0.657-0.12l7.495-7.235c0.174-0.171,0.23-0.432,0.139-0.66c-0.09-0.228-0.312-0.377-0.56-0.377h-0.479l-0.296-0.379V3.496l0.312-0.445l9.083,0.081l0.252,0.252v1.743l-4.388,4.458L9.747,24.232z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Volume0();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Volume0 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Volume0.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Volume0\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Volume1();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Volume1 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Volume1.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.Volume1\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Volume2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Volume2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Volume2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Volume2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z M21.101,8.925c-0.393-0.391-1.024-0.391-1.413,0c-0.392,0.391-0.392,1.025,0,1.414c1.45,1.451,2.344,3.447,2.344,5.661c0,2.212-0.894,4.207-2.342,5.659c-0.392,0.39-0.392,1.023,0,1.414c0.195,0.195,0.451,0.293,0.708,0.293c0.256,0,0.512-0.098,0.707-0.293c1.808-1.809,2.929-4.315,2.927-7.073C24.033,13.24,22.912,10.732,21.101,8.925z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Volume3();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Volume3 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Volume3.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Volume3\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z M21.101,8.925c-0.393-0.391-1.024-0.391-1.413,0c-0.392,0.391-0.392,1.025,0,1.414c1.45,1.451,2.344,3.447,2.344,5.661c0,2.212-0.894,4.207-2.342,5.659c-0.392,0.39-0.392,1.023,0,1.414c0.195,0.195,0.451,0.293,0.708,0.293c0.256,0,0.512-0.098,0.707-0.293c1.808-1.809,2.929-4.315,2.927-7.073C24.033,13.24,22.912,10.732,21.101,8.925z M23.28,6.746c-0.393-0.391-1.025-0.389-1.414,0.002c-0.391,0.389-0.391,1.023,0.002,1.413h-0.002c2.009,2.009,3.248,4.773,3.248,7.839c0,3.063-1.239,5.828-3.246,7.838c-0.391,0.39-0.391,1.023,0.002,1.415c0.194,0.194,0.45,0.291,0.706,0.291s0.513-0.098,0.708-0.293c2.363-2.366,3.831-5.643,3.829-9.251C27.115,12.389,25.647,9.111,23.28,6.746z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Warning();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Warning = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Warning.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Warning\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M29.225,23.567l-3.778-6.542c-1.139-1.972-3.002-5.2-4.141-7.172l-3.778-6.542c-1.14-1.973-3.003-1.973-4.142,0L9.609,9.853c-1.139,1.972-3.003,5.201-4.142,7.172L1.69,23.567c-1.139,1.974-0.207,3.587,2.071,3.587h23.391C29.432,27.154,30.363,25.541,29.225,23.567zM16.536,24.58h-2.241v-2.151h2.241V24.58zM16.428,20.844h-2.023l-0.201-9.204h2.407L16.428,20.844z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.WheelChair();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.WheelChair = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.WheelChair.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.WheelChair\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.373,19.85c0,4.079-3.318,7.397-7.398,7.397c-4.079,0-7.398-3.318-7.398-7.397c0-2.466,1.213-4.652,3.073-5.997l-0.251-2.21c-2.875,1.609-4.825,4.684-4.825,8.207c0,5.184,4.217,9.4,9.401,9.4c4.395,0,8.093-3.031,9.117-7.111L20.37,19.73C20.37,19.771,20.373,19.81,20.373,19.85zM11.768,6.534c1.321,0,2.392-1.071,2.392-2.392c0-1.321-1.071-2.392-2.392-2.392c-1.321,0-2.392,1.071-2.392,2.392C9.375,5.463,10.446,6.534,11.768,6.534zM27.188,22.677l-5.367-7.505c-0.28-0.393-0.749-0.579-1.226-0.538c-0.035-0.003-0.071-0.006-0.106-0.006h-6.132l-0.152-1.335h4.557c0.53,0,0.96-0.429,0.96-0.959c0-0.53-0.43-0.959-0.96-0.959h-4.776l-0.25-2.192c-0.146-1.282-1.303-2.203-2.585-2.057C9.869,7.271,8.948,8.428,9.094,9.71l0.705,6.19c0.136,1.197,1.154,2.078,2.332,2.071c0.004,0,0.007,0.001,0.012,0.001h8.023l4.603,6.436c0.439,0.615,1.338,0.727,2.007,0.248C27.442,24.178,27.628,23.292,27.188,22.677z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Windows();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Windows = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Windows.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Windows\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M20.023,17.484c-1.732-0.205-3.022-0.908-4.212-1.701l0,0l-0.559,0.279l-2.578,8.924l0,0c1.217,0.805,2.905,1.707,4.682,1.914c2.686,0.312,5.56-0.744,6.391-1.195l2.617-9.061l-0.559-0.279C25.805,16.365,23.193,17.857,20.023,17.484zM14.424,14.825c-1.267-0.87-2.578-1.652-4.375-1.816c-0.318-0.029-0.627-0.042-0.925-0.042c-3.011,0-4.948,1.347-4.948,1.347l-2.565,8.877l0,0l0.526,0.281c0.981-0.476,2.78-1.145,5.09-0.984c1.665,0.113,2.92,0.781,4.117,1.531l0.507-0.26l0,0L14.424,14.825zM10.201,12.094c1.664,0.114,2.921,0.78,4.117,1.533l0.509-0.26l0,0L17.4,4.431c-1.27-0.87-2.579-1.653-4.377-1.816c-0.318-0.029-0.626-0.042-0.924-0.042C9.088,2.573,7.15,3.92,7.15,3.92l-2.566,8.878L5.11,13.08C6.092,12.604,7.891,11.936,10.201,12.094zM28.779,5.971L28.779,5.971c0,0.001-2.609,1.492-5.779,1.119c-1.734-0.204-3.023-0.907-4.213-1.701L18.227,5.67l-2.576,8.923l0,0c1.215,0.803,2.906,1.709,4.68,1.915c2.687,0.312,5.558-0.745,6.392-1.197l2.615-9.059L28.779,5.971z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Woman();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Woman = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Woman.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Woman\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M21.022,16.349c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.104,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.579,5.192-0.351,5.874c0.55,0.307,1.127,0.078,1.723-0.496c-0.105,0.582-0.167,1.213-0.167,1.873c0,2.932,1.139,5.307,2.543,5.307c0.846,0,1.265-0.865,1.466-2.189c0.201,1.324,0.62,2.189,1.464,2.189c1.406,0,2.545-2.375,2.545-5.307c0-0.66-0.061-1.291-0.168-1.873c0.598,0.574,1.174,0.803,1.725,0.496C22.603,21.541,22.444,18.912,21.022,16.349zM15.808,13.757c2.363,0,4.279-1.916,4.279-4.279s-1.916-4.279-4.279-4.279c-2.363,0-4.28,1.916-4.28,4.279S13.445,13.757,15.808,13.757zM18.731,4.974c1.235,0.455,0.492-0.725,0.492-1.531s0.762-1.792-0.492-1.391c-1.316,0.422-2.383,0.654-2.383,1.461S17.415,4.489,18.731,4.974zM15.816,4.4c0.782,0,0.345-0.396,0.345-0.884c0-0.488,0.438-0.883-0.345-0.883s-0.374,0.396-0.374,0.883C15.442,4.005,15.034,4.4,15.816,4.4zM12.884,4.974c1.316-0.484,2.383-0.654,2.383-1.461S14.2,2.474,12.884,2.052c-1.254-0.402-0.492,0.584-0.492,1.391S11.648,5.428,12.884,4.974z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Wrench();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Wrench = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Wrench.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Wrench\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M26.834,14.693c1.816-2.088,2.181-4.938,1.193-7.334l-3.646,4.252l-3.594-0.699L19.596,7.45l3.637-4.242c-2.502-0.63-5.258,0.13-7.066,2.21c-1.907,2.193-2.219,5.229-1.039,7.693L5.624,24.04c-1.011,1.162-0.888,2.924,0.274,3.935c1.162,1.01,2.924,0.888,3.935-0.274l9.493-10.918C21.939,17.625,24.918,16.896,26.834,14.693z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Wrench2();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Wrench2 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Wrench2.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Wrench2\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M24.946,9.721l-2.872-0.768l-0.771-2.874l3.188-3.231c-1.992-0.653-4.268-0.192-5.848,1.391c-1.668,1.668-2.095,4.111-1.279,6.172l-3.476,3.478l-3.478,3.478c-2.062-0.816-4.504-0.391-6.173,1.277c-1.583,1.581-2.043,3.856-1.39,5.849l3.231-3.188l2.874,0.77l0.769,2.872l-3.239,3.197c1.998,0.665,4.288,0.207,5.876-1.384c1.678-1.678,2.1-4.133,1.271-6.202l3.463-3.464l3.464-3.463c2.069,0.828,4.523,0.406,6.202-1.272c1.592-1.589,2.049-3.878,1.384-5.876L24.946,9.721z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.Wrench3();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.Wrench3 = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.Wrench3.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.Wrench3\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n *\r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M27.839,6.775l-3.197,3.239L21.77,9.246l-0.771-2.874l3.188-3.231c-1.992-0.653-4.268-0.192-5.848,1.391c-1.668,1.668-2.095,4.111-1.279,6.172L7.42,20.344c-0.204-0.032-0.408-0.062-0.621-0.062c-2.173,0-3.933,1.759-3.933,3.933c0,2.173,1.76,3.933,3.933,3.933c2.171,0,3.931-1.76,3.933-3.933c0-0.24-0.03-0.473-0.071-0.7l9.592-9.59c2.069,0.828,4.523,0.406,6.202-1.272C28.047,11.062,28.504,8.772,27.839,6.775zM6.799,25.146c-0.517,0-0.933-0.418-0.935-0.933c0.002-0.515,0.418-0.933,0.935-0.933c0.514,0,0.932,0.418,0.932,0.933S7.313,25.146,6.799,25.146z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ZoomIn();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ZoomIn = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ZoomIn.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.icon.ZoomIn\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.646,19.307c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127l3.535-3.537L22.646,19.307zM13.688,20.369c-3.582-0.008-6.478-2.904-6.484-6.484c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486C20.165,17.465,17.267,20.361,13.688,20.369zM15.687,9.051h-4v2.833H8.854v4.001h2.833v2.833h4v-2.834h2.832v-3.999h-2.833V9.051z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n\r\n *\r\n * @example\r\n *\r\n * let icon = new draw2d.shape.icon.ZoomOut();\r\n *\r\n * canvas.add(icon,50,10);\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.icon.Icon\r\n */\r\ndraw2d.shape.icon.ZoomOut = draw2d.shape.icon.Icon.extend(\r\n /** @lends draw2d.shape.icon.ZoomOut.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.icon.ZoomOut\",\r\n\r\n /**\r\n *\r\n * Creates a new icon element which are not assigned to any canvas.\r\n * \r\n * @param {Object} attr the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 50, height: 50}, attr), setter, getter)\r\n },\r\n\r\n /**\r\n * @private\r\n * @returns {Object} the raphaelJS path object\r\n */\r\n createSet: function () {\r\n return this.canvas.paper.path(\"M22.646,19.307c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127l3.535-3.537L22.646,19.307zM13.688,20.369c-3.582-0.008-6.478-2.904-6.484-6.484c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486C20.165,17.465,17.267,20.361,13.688,20.369zM8.854,11.884v4.001l9.665-0.001v-3.999L8.854,11.884z\")\r\n }\r\n})\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * FlexGridLayout is a powerful, flexible and precise layout manager that aligns components vertically and\r\n * horizontally in a dynamic rectangular grid of cells, with each component occupying in one or more cell.\r\n * To define a form layout you specify the form's columns, rows. Everyhing that applies to columns applies\r\n * to rows too - just with a different orientation. FlexGridLayout uses the same API, algorithms and implementation\r\n * for column and rows.\r\n *\r\n * FlexGridLayout focuses on form-oriented panels much like the 'Segment' panel. Nevertheless, it is a general purpose\r\n * layout system that can be used for the vast majority of rectangular layouts.\r\n *\r\n * Define your layout with:\r\n * <ul>\r\n * <li>[number]px</li>\r\n * <li>grow</li>\r\n * <li>pref</li>\r\n * </ul>\r\n *\r\n * e.g. we want build a shape with a border on the left and right and a label in the\r\n * center. We allow the center to grow, the shape is resizeable.\r\n *\r\n * <pre>\r\n * 10px grow 10px\r\n *\r\n * -----+------------------+-----\r\n * | | [LABEL] | |\r\n * | | | |\r\n * | | | | grow\r\n * | | | |\r\n * | | | |\r\n * -----+------------------+-----\r\n * </pre>\r\n *\r\n * The number forces the exact width or height of the cell. <b>grow</b> respect the minimum width of the\r\n * element and allows to resize the shape. The row/col with the <b>grow</b> declaration will be resized.\r\n * The <b>pref</b> declaration forces the cell to the minimum width/height of the embedded figure.\r\n *\r\n * Example Implementation of a shape:\r\n *\r\n * @example\r\n * let PredefinedProcess = draw2d.shape.layout.FlexGridLayout.extend({\r\n *\r\n *\r\n * // 10px grow 10px\r\n * //\r\n * // -----+------------------+-----\r\n * // | | [LABEL] | |\r\n * // | | | |\r\n * // | | | | grow\r\n * // | | | |\r\n * // | | | |\r\n * // -----+------------------+-----\r\n * //\r\n * // @param attr\r\n * //\r\n * init: function(attr, setter, getter)\r\n * {\r\n * this._super(extend({\r\n * columns:\"10px, grow, 10px\",\r\n * rows: \"grow\",\r\n * bgColor:\"#FFFFFF\",\r\n * stroke:2\r\n * },attr),\r\n * setter,\r\n * getter);\r\n *\r\n *\r\n * this.label = new draw2d.shape.basic.Label({text:\"Process Name\", resizeable:true, stroke:2});\r\n * this.label.installEditor(new draw2d.ui.LabelInplaceEditor());\r\n * this.add(this.label, {row:0, col:1});\r\n *\r\n * this.setDimension(120,80);\r\n * }\r\n * });\r\n * let shape = new PredefinedProcess();\r\n * canvas.add(shape,10,10);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.layout.Layout\r\n * @since 2.5.1\r\n */\r\ndraw2d.shape.layout.FlexGridLayout = draw2d.shape.layout.Layout.extend(\r\n /** @lends draw2d.shape.layout.FlexGridLayout.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.layout.FlexGridLayout\",\r\n\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.cellLocator = {\r\n relocate: (index, figure) => {\r\n if (this.gridDef.layoutRequired === true) {\r\n this._layout()\r\n }\r\n let cell = figure.__cellConstraint\r\n let x = cell.x\r\n let y = cell.y\r\n\r\n // stretch the figure to fill the complete cell\r\n //\r\n if (figure.isResizeable()) {\r\n figure.setDimension(\r\n Math.max(figure.getMinWidth(), cell.width),\r\n Math.max(figure.getMinHeight(), cell.height))\r\n }\r\n // else apply the valign and align property\r\n //\r\n else {\r\n // apply vertical alignment\r\n //\r\n switch (cell.valign) {\r\n case \"middle\":\r\n y += (cell.height - figure.getHeight()) / 2\r\n break\r\n case \"bottom\":\r\n y += (cell.height - figure.getHeight())\r\n break\r\n }\r\n\r\n // apply horizontal alignment\r\n //\r\n switch (cell.align) {\r\n case \"center\":\r\n x += (cell.width - figure.getWidth()) / 2\r\n break\r\n case \"right\":\r\n x += (cell.width - figure.getWidth())\r\n break\r\n }\r\n }\r\n figure.setPosition(x, y)\r\n },\r\n bind: () => {},\r\n unbind: () => { },\r\n translate: (figure, diff) => {\r\n figure.setPosition(figure.x + diff.x, figure.y + diff.y)\r\n }\r\n }\r\n\r\n this.debug = false\r\n this.gridDef = {\r\n debugLines: [],\r\n def_cols: [],\r\n def_rows: [],\r\n min_height: [],\r\n min_width: [],\r\n minGridWidth: 10,\r\n minGridHeight: 10,\r\n hResizeable: false,\r\n vResizeable: false,\r\n layoutRequired: true\r\n }\r\n\r\n this._super(\r\n {stroke: 2, ...attr},\r\n setter,\r\n getter)\r\n\r\n this.resizeListener = (figure) => {\r\n this.gridDef.layoutRequired = true\r\n // propagate the event to the parent or other listener if existing\r\n //\r\n if (this.getParent() instanceof draw2d.shape.layout.Layout) {\r\n this.fireEvent(\"resize\")\r\n }\r\n // or we are the parent and must consume it self\r\n else {\r\n this.setDimension(\r\n this.gridDef.hResizeable === true ? this.getWidth() : 1,\r\n this.gridDef.vResizeable === true ? this.getHeight() : 1\r\n )\r\n }\r\n }\r\n\r\n let rows = attr.rows.split(\",\")\r\n let columns = attr.columns.split(\",\")\r\n for (let i = 0; i < columns.length; i++) {\r\n this.gridDef.def_cols[i] = this.cellWidthFromDef(columns[i])\r\n }\r\n\r\n for (let i = 0; i < rows.length; i++) {\r\n this.gridDef.def_rows[i] = this.cellWidthFromDef(rows[i])\r\n }\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.RectangleSelectionFeedbackPolicy())\r\n },\r\n\r\n add: function (figure, cellConstraint) {\r\n\r\n figure.__cellConstraint = {\r\n row: 0,\r\n col: 0,\r\n rowspan: 1,\r\n colspan: 1,\r\n align: \"left\",\r\n valign: \"top\",\r\n width: 1,\r\n height: 1,\r\n ...cellConstraint}\r\n this.gridDef.layoutRequired = true\r\n this._super(figure, this.cellLocator)\r\n this._layout()\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n return this.gridDef.minGridWidth\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinHeight: function () {\r\n return this.gridDef.minGridHeight\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setCanvas: function (canvas) {\r\n // layout must be recalculated if the shape will be assigned\r\n // to a canvas. \"Text\" elements can now calculate correct with the right font settings.\r\n //\r\n this.gridDef.layoutRequired = true\r\n this._super(canvas)\r\n\r\n return this\r\n },\r\n\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n this._super(attributes)\r\n if (this.debug) {\r\n this.paintDebugGrid()\r\n }\r\n\r\n return this\r\n },\r\n\r\n setDimension: function (w, h) {\r\n // we need the calculated layout to determine the min width/height of the figure\r\n //\r\n if (this.gridDef.layoutRequired === true) {\r\n this._layout()\r\n }\r\n // set the new dimension\r\n this._super(w, h)\r\n\r\n // after setting the new dimension a recalculation of the layout is required. May the shape\r\n // has grown up\r\n this.gridDef.layoutRequired = true\r\n this.repaint()\r\n\r\n return this\r\n },\r\n\r\n _layout: function () {\r\n this.gridDef.layoutRequired = false\r\n\r\n let figures = this.getChildren()\r\n\r\n // copy the initial requested width/heights\r\n //\r\n this.gridDef.min_height = this.gridDef.def_rows.slice(0)\r\n this.gridDef.min_width = this.gridDef.def_cols.slice(0)\r\n\r\n // Calculate the basic width/height of the elements without considering the \"span\" and \"grow\"\r\n //\r\n for (let i = 0; i < figures.getSize(); i++) {\r\n let figure = figures.get(i)\r\n let cell = figure.__cellConstraint\r\n // ermitteln der derzeitig zur verfügung stehenden weite\r\n this.gridDef.min_width[cell.col] = Math.max(this.gridDef.min_width[cell.col], figure.getMinWidth())\r\n\r\n // Falls das Elemente eine y_span hat, dann versuchen ob es auf die ganze\r\n // höhe rein passt. Wenn nicht wird der Teil der 'grow' angegeben hat verändert.\r\n // Wenn kein Element 'grow' angegeben hat, dann wird das letzte Element verändert\r\n if (cell.rowspan > 1) {\r\n let eHeight = figure.getMinHeight()\r\n let cHeight = this.cellHeight(cell.row, cell.row + cell.rowspan)\r\n if (cHeight < eHeight) {\r\n let diff = eHeight - cHeight\r\n this.gridDef.min_height[cell.row + cell.rowspan - 1] = this.gridDef.min_height[cell.row + cell.rowspan - 1] + diff\r\n }\r\n }\r\n else {\r\n this.gridDef.min_height[cell.row] = Math.max(this.gridDef.min_height[cell.row], figure.getMinHeight())\r\n }\r\n }\r\n this.gridDef.minGridWidth = this._getGridWidth()\r\n this.gridDef.minGridHeight = this._getGridHeight()\r\n\r\n // Resize the grid height if at least one row supports \"grow\"\r\n //\r\n let gridHeight = this._getGridHeight()\r\n for (let i = 0; i < this.gridDef.def_rows.length; i++) {\r\n // row found which can grow\r\n if (this.gridDef.def_rows[i] === -1) {\r\n this.gridDef.min_height[i] = this.gridDef.min_height[i] + Math.max(0, this.getHeight() - gridHeight)\r\n this.gridDef.vResizeable = true\r\n break\r\n }\r\n }\r\n\r\n // Resize the grid if at least one column supports \"grow\"\r\n //\r\n let gridWidth = this._getGridWidth()\r\n for (let i = 0; i < this.gridDef.def_cols.length; i++) {\r\n // column found which can grow\r\n if (this.gridDef.def_cols[i] === -1) {\r\n this.gridDef.min_width[i] = this.gridDef.min_width[i] + Math.max(0, this.getWidth() - gridWidth)\r\n this.gridDef.hResizeable = true\r\n break\r\n }\r\n }\r\n\r\n // apply the cell constraints to the elements\r\n //\r\n for (let i = 0; i < figures.getSize(); i++) {\r\n let cell = figures.get(i).__cellConstraint\r\n cell.width = this.cellWidth(cell.col, cell.col + cell.colspan)\r\n cell.height = this.cellHeight(cell.row, cell.row + cell.rowspan)\r\n cell.x = this.cellX(cell.col)\r\n cell.y = this.cellY(cell.row)\r\n }\r\n\r\n return this\r\n },\r\n\r\n cellX: function (col) {\r\n let r = 0\r\n for (let i = 0; i < col; i++) {\r\n r = r + this.gridDef.min_width[i]\r\n }\r\n\r\n return r\r\n },\r\n\r\n cellY: function (row) {\r\n let r = 0\r\n for (let i = 0; i < row; i++) {\r\n r = r + this.gridDef.min_height[i]\r\n }\r\n\r\n return r\r\n },\r\n\r\n cellWidth: function (from, to) {\r\n let r = 0\r\n for (let i = from; i < to; i++) {\r\n r = r + this.gridDef.min_width[i]\r\n }\r\n\r\n return r\r\n },\r\n\r\n cellHeight: function (from, to) {\r\n let r = 0\r\n for (let i = from; i < to; i++) {\r\n r = r + this.gridDef.min_height[i]\r\n }\r\n\r\n return r\r\n },\r\n\r\n paintDebugGrid: function () {\r\n // alte Linien erstmal entfernen bevor man neue zeichnet\r\n //\r\n for (let i = 0; i < this.gridDef.debugLines.length; i++)\r\n this.gridDef.debugLines[i].remove()\r\n this.gridDef.debugLines = []\r\n\r\n let gridHeight = this._getGridHeight()\r\n let gridWidth = this._getGridWidth()\r\n let posX = this.getAbsoluteX()\r\n let posY = this.getAbsoluteY()\r\n\r\n // draw the cols first\r\n let x = posX\r\n for (let i = 0; i <= this.gridDef.min_width.length; i++) {\r\n let newLine = this.canvas.paper.path(\"M \" + x + \" \" + posY + \" l 0 \" + gridHeight).attr({\r\n \"stroke\": \"#FF0000\",\r\n \"stroke-width\": 1\r\n })\r\n this.gridDef.debugLines.push(newLine)\r\n if (i < this.gridDef.min_width.length)\r\n x = x + this.gridDef.min_width[i]\r\n }\r\n\r\n let y = posY\r\n for (let i = 0; i <= this.gridDef.min_height.length; i++) {\r\n let newLine = this.canvas.paper.path(\"M \" + posX + \" \" + y + \" l \" + gridWidth + \" 0\").attr({\r\n \"stroke\": \"#FF0000\",\r\n \"stroke-width\": 1\r\n })\r\n this.gridDef.debugLines.push(newLine)\r\n if (i < this.gridDef.min_height.length)\r\n y = y + this.gridDef.min_height[i]\r\n }\r\n },\r\n\r\n _getGridWidth: function () {\r\n let gridWidth = 0\r\n for (let i = 0; i < this.gridDef.min_width.length; i++) {\r\n gridWidth = gridWidth + this.gridDef.min_width[i]\r\n }\r\n\r\n return gridWidth\r\n },\r\n\r\n _getGridHeight: function () {\r\n let gridHeight = 0\r\n for (let i = 0; i < this.gridDef.min_height.length; i++) {\r\n gridHeight = gridHeight + this.gridDef.min_height[i]\r\n }\r\n\r\n return gridHeight\r\n },\r\n\r\n\r\n cellWidthFromDef: function (def) {\r\n let pattern = new RegExp(\"(\\\\d+)(?:px)?\")\r\n let match = def.match(pattern)\r\n\r\n if (match != null) {\r\n return parseInt(match[1])\r\n }\r\n\r\n pattern = new RegExp(\"p(?:ref)?\")\r\n match = def.match(pattern)\r\n if (match != null) {\r\n return 0\r\n }\r\n\r\n pattern = new RegExp(\"g(?:row)?\")\r\n match = def.match(pattern)\r\n if (match != null) {\r\n this.autoResize = false\r\n return -1\r\n }\r\n\r\n return 0\r\n }\r\n\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * The HorizontalLayout class arranges the layout elements in a horizontal sequence,\r\n * left to right, with optional gaps between the elements.\r\n *\r\n * During the execution of the setDimension() method, the minimum width of the container is calculated\r\n * by accumulating the minimum sizes of the elements, including stroke, gaps and padding.\r\n *\r\n *\r\n * See the example below with and without gap and border settings\r\n *\r\n *\r\n * @example\r\n *\r\n * // first container without any gap and a border of the parent\r\n * // container\r\n * let label1 = new draw2d.shape.basic.Label({text:\"Label 1\"});\r\n * let label2 = new draw2d.shape.basic.Label({text:\"Label 2\"});\r\n * let label3 = new draw2d.shape.basic.Label({text:\"Label 3\"});\r\n *\r\n * let container1 = new draw2d.shape.layout.HorizontalLayout();\r\n *\r\n * container1.add(label1);\r\n * container1.add(label2);\r\n * container1.add(label3);\r\n * container1.setGap(10);\r\n * container1.setStroke(2);\r\n * canvas.add(container1,50,10);\r\n *\r\n * // second container without any gab or border\r\n * //\r\n * let label11 = new draw2d.shape.basic.Label({text:\"Label 1\"});\r\n * let label12 = new draw2d.shape.basic.Label({text:\"Label 2\"});\r\n * let label13 = new draw2d.shape.basic.Label({text:\"Label 3\"});\r\n *\r\n * let container2 = new draw2d.shape.layout.HorizontalLayout();\r\n *\r\n * container2.add(label11);\r\n * container2.add(label12);\r\n * container2.add(label13);\r\n *\r\n * canvas.add(container2,50,90);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.layout.Layout\r\n * @since 2.5.1\r\n */\r\ndraw2d.shape.layout.HorizontalLayout = draw2d.shape.layout.Layout.extend(\r\n /** @lends draw2d.shape.layout.HorizontalLayout.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.layout.HorizontalLayout\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.gap = 0\r\n let _this = this\r\n this.locator = {\r\n translate: function (figure, diff) {\r\n figure.setPosition(figure.x + diff.x, figure.y + diff.y)\r\n },\r\n bind: function () {\r\n },\r\n unbind: function () {\r\n },\r\n relocate: function (index, target) {\r\n let stroke = _this.getStroke()\r\n let yPos = stroke + _this.padding.top\r\n let xPos = stroke + _this.padding.left // respect the border and padding of the parent\r\n for (let i = 0; i < index; i++) {\r\n let child = _this.children.get(i).figure\r\n if (child.isVisible()) {\r\n xPos += child.getWidth() + _this.gap\r\n }\r\n }\r\n\r\n target.setPosition(xPos, yPos)\r\n }\r\n }\r\n\r\n this._super(\r\n {width: 1, height: 1, gap: 0, ...attr},\r\n {\r\n // @attr {Number} gap the gap between the children shapes */\r\n gap: this.setGap,\r\n ...setter},\r\n {\r\n gap: this.getGap,\r\n ...getter}\r\n )\r\n\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n add: function (child, locator, index) {\r\n this._super(child, this.locator, index)\r\n\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Set the gap width between child components within this layout.\r\n * This will only affect the space between components, not the space around all the components in the layout.\r\n *\r\n * @param {Number} gap The space, in pixels, between items.\r\n * @since 2.5.1\r\n */\r\n setGap: function (gap) {\r\n this.gap = gap\r\n // this forces a relayout of the element\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the gap between the children shapes\r\n *\r\n * @since 5.0.0\r\n *\r\n */\r\n getGap: function () {\r\n return this.gap\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n let _this = this\r\n let width = this.stroke * 2 + this.padding.left + this.padding.right\r\n let gap = 0\r\n\r\n this.children.each(function (i, e) {\r\n if (e.figure.isVisible()) {\r\n width += (e.figure.isResizeable() ? e.figure.getMinWidth() : e.figure.getWidth() + gap)\r\n gap = _this.gap\r\n }\r\n })\r\n\r\n return width\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinHeight: function () {\r\n let markup = (this.stroke * 2) + this.padding.top + this.padding.bottom\r\n let height = 0\r\n\r\n this.children.each(function (i, e) {\r\n height = Math.max(height, (e.figure.isResizeable() ? e.figure.getMinHeight() : e.figure.getHeight()))\r\n })\r\n\r\n return height + markup\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n\r\n let diff = this.width - this.getMinWidth()\r\n if (diff > 0) {\r\n diff = (diff / this.children.getSize()) | 0\r\n this.children.each(function (i, e) {\r\n if (e.figure.isResizeable() === true) {\r\n e.figure.setDimension(e.figure.getMinWidth() + diff, e.figure.getHeight())\r\n }\r\n })\r\n } else {\r\n let minHeight = this.getMinHeight()\r\n this.children.each(function (i, e) {\r\n // The layout respect the \"resizeable\" flag because a layout is a kind of layouter and\r\n // any kind of autolayouter must respect this flag\r\n if (e.figure.isResizeable() === true) {\r\n // reset the shape to the minimum width/height. see setMinWidth/setMinHeight\r\n e.figure.setDimension(1, minHeight)\r\n }\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.gap = this.gap\r\n\r\n return memento\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.gap === \"number\") {\r\n this.gap = memento.gap\r\n }\r\n\r\n return this\r\n }\r\n\r\n })\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * A base class for positioning child figures and determining the ideal size for\r\n * a figure with children.\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.layout.Layout = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.shape.layout.Layout.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.layout.Layout\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // @since 4.3.3\r\n this.padding = {top: 0, right: 0, bottom: 0, left: 0}\r\n\r\n this._super({bgColor: null, radius: 0, stroke: 0, ...attr},\r\n {\r\n // @attr {Number} padding the padding in pixel around the text */\r\n padding: this.setPadding,\r\n ...setter\r\n },\r\n {\r\n padding: this.getPadding,\r\n ...getter\r\n }\r\n )\r\n\r\n\r\n this.resizeListener = figure => {\r\n // propagate the event to the parent or other listener if existing\r\n //\r\n if (this.getParent() instanceof draw2d.shape.layout.Layout) {\r\n this.fireEvent(\"resize\")\r\n }\r\n // or we are the parent and must consume it self\r\n else {\r\n this.setDimension(1, 1)\r\n this.fireEvent(\"resize\")\r\n }\r\n }\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n add: function (child, locator, index) {\r\n this._super(child, locator, index)\r\n\r\n child.on(\"resize\", this.resizeListener)\r\n child.on(\"change:visibility\", this.resizeListener)\r\n\r\n // don't use the getter/setter. This considers the canvas assignment and\r\n // the child is always invisible. BIG BUG. The example shape_db will break if you change this.\r\n// child.setVisible(this.isVisible());\r\n // respect the \"visible\" flag of the child as well\r\n child.visible = child.visible && this.visible\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n remove: function (child) {\r\n let r = this._super(child)\r\n child.off(this.resizeListener)\r\n this.setDimension(1, 1)\r\n\r\n return r\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the padding of the element\r\n *\r\n * // Alternatively you can use the attr method:\r\n * //\r\n * // set the padding for top,left,bottom,right in one call\r\n * figure.attr({\r\n * padding: 3\r\n * });\r\n *\r\n * // update the padding left and top\r\n * figure.attr({\r\n * padding: {left:3, top:30}\r\n * });\r\n *\r\n * @param {Number|Object} padding The new padding\r\n * @since 4.3.3\r\n **/\r\n setPadding: function (padding) {\r\n if (typeof padding === \"number\") {\r\n this.padding = {top: padding, right: padding, bottom: padding, left: padding}\r\n }\r\n else {\r\n this.padding = {...this.padding, ...padding}\r\n }\r\n this.fireEvent(\"change:padding\", {value: this.padding})\r\n\r\n // force a relayout of the figure\r\n this.setDimension(1, 1)\r\n\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Get the padding of the element.\r\n *\r\n * @since 4.3.3\r\n * @returns {this}\r\n **/\r\n getPadding: function () {\r\n return this.padding\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n * @returns {this}\r\n */\r\n setVisible: function (flag) {\r\n // propagate the visibility to all children too.\r\n //\r\n this.children.each(function (i, e) {\r\n e.figure.setVisible(flag)\r\n })\r\n\r\n\r\n this._super(flag)\r\n\r\n // force a relayout of the shape because the dimension has been changed\r\n // by enable/disable of child shapes\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Returns the Command to perform the specified Request or null.\r\n *\r\n * @param {draw2d.command.CommandType} request describes the Command being requested\r\n * @returns {draw2d.command.Command} null or a Command\r\n * @private\r\n **/\r\n createCommand: function (request) {\r\n // it is not possible to rate a layout object\r\n // ..at the moment\r\n if (request.getPolicy() === draw2d.command.CommandType.ROTATE) {\r\n return null\r\n }\r\n\r\n\r\n return this._super(request)\r\n }\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n/**\r\n * @class\r\n * Using the StackLayout as their layout shape have their children placed on top of one another.\r\n * Order of placement is determined by the order in which the children were added, first child\r\n * added placed on the bottom. Only one child is visible at once.\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.layout.Layout\r\n */\r\ndraw2d.shape.layout.StackLayout = draw2d.shape.layout.Layout.extend(\r\n /** @lends draw2d.shape.layout.StackLayout.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.layout.StackLayout\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.visibleLayer = 0\r\n this.locator = new draw2d.layout.locator.XYAbsPortLocator(0, 0)\r\n\r\n this._super(\r\n {resizeable: true, width: 10, height: 10, ...attr},\r\n { ...setter},\r\n { ...getter})\r\n\r\n this.resizeListener = () => {}\r\n\r\n // install default selection handler. Can be overridden or replaced\r\n this.installEditPolicy(new draw2d.policy.figure.RectangleSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n *\r\n * Set the current visible layer of the stack layout\r\n *\r\n * @param {Number} visibleLayer the layer to show or -1 to hide all of them\r\n */\r\n setVisibleLayer: function (visibleLayer, duration) {\r\n if(this.visibleLayer>=0) {\r\n this.getChildren().get(this.visibleLayer).setVisible(false, duration)\r\n }\r\n this.visibleLayer = Math.min(this.getChildren().getSize() - 1, Math.max(-1, visibleLayer))\r\n\r\n if(this.visibleLayer>=0){\r\n this.getChildren().get(this.visibleLayer).setVisible(true, duration)\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns the current visible layer\r\n *\r\n * @returns {Number}\r\n */\r\n getVisibleLayer: function () {\r\n return this.visibleLayer\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n add: function (child, locator, index) {\r\n // the child didn't care about events...at the moment\r\n //\r\n child.hitTest = () => false\r\n\r\n // make all existing shapes invisible\r\n //\r\n this.getChildren().each( (i, c) => {\r\n c.setVisible(false)\r\n })\r\n this.visibleLayer = this.getChildren().getSize()\r\n\r\n // ignore the parameter \"locator\" and use the locator for the stack layout instead\r\n return this._super(child, this.locator, index)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setVisible: function (flag) {\r\n draw2d.shape.basic.Rectangle.prototype.setVisible.call(this, flag)\r\n\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n let markup = (this.stroke * 2) + this.padding.left + this.padding.right\r\n let width = 10\r\n this.children.each( (i, e)=> {\r\n width = Math.max(width, e.figure.isResizeable() ? e.figure.getMinWidth() : e.figure.getWidth())\r\n })\r\n return width + markup\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinHeight: function () {\r\n let markup = (this.stroke * 2) + this.padding.top + this.padding.bottom\r\n let height = 10\r\n this.children.each( (i, e) =>{\r\n height = Math.max(height, e.figure.isResizeable() ? e.figure.getMinHeight() : e.figure.getHeight())\r\n })\r\n return height + markup\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n\r\n let width = this.width - this.padding.left - this.padding.right\r\n let height = this.height - this.padding.top - this.padding.bottom\r\n if (width === this._recursiveWidth && height === this._recursiveHeight) {\r\n return this\r\n }\r\n this._recursiveHeight = height\r\n this._recursiveWidth = width\r\n\r\n this.children.each( (i, e) =>{\r\n if (e.figure.isResizeable()) {\r\n e.figure.setDimension(width, height)\r\n }\r\n })\r\n\r\n delete this._recursiveHeight\r\n delete this._recursiveWidth\r\n\r\n return this\r\n }\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The TableLayout class arranges the children in a row/column order. Each cell can be styled\r\n * with valign, align and padding.\r\n *\r\n *\r\n * See the example below with and without padding or alignment settings\r\n *\r\n *\r\n * @example\r\n *\r\n * let label1 = new draw2d.shape.basic.Label({text:\"[0,1] with long long long long label\", fontColor:\"#00AF00\"});\r\n * let label2 = new draw2d.shape.basic.Label({text:\"[1,1] padding:10\", fontColor:\"#00AF00\"});\r\n * let label3 = new draw2d.shape.basic.Label({text:\"[2,1] align:right\", fontColor:\"#00AF00\"});\r\n * let label4 = new draw2d.shape.basic.Label({text:\"[3,1] resize:true\",resizeable:true, fontColor:\"#00AF00\"});\r\n *\r\n * let container = new draw2d.shape.layout.TableLayout();\r\n *\r\n * container.addRow(\"[0,0]\", label1 ,\"[0,2] align:center\");\r\n * container.addRow(\"[1,0] valign:bottom\", label2,\"[1,2] long long long label\");\r\n * container.addRow(\"[2,0]\", label3,\"[2,2]\");\r\n * container.addRow(\"[3,0]\", label4,\"[3,2]\");\r\n *\r\n * container.setPadding(0);\r\n * container.setCellPadding(1,1, 10);\r\n *\r\n * container.setCellAlign(0,2, \"center\");\r\n * container.setCellAlign(2,1, \"right\");\r\n *\r\n * container.setCellVerticalAlign(1, 0, \"bottom\");\r\n * canvas.add(container,10,10);\r\n *\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.layout.Layout\r\n * @since 5.3.0\r\n */\r\ndraw2d.shape.layout.TableLayout = draw2d.shape.layout.Layout.extend(\r\n /** @lends draw2d.shape.layout.TableLayout.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.layout.TableLayout\",\r\n\r\n DUMMY_CELL: {\r\n getMinHeight: function () {\r\n return 1\r\n },\r\n getMinWidth: function () {\r\n return 1\r\n },\r\n off: function () {\r\n }\r\n },\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n let _this = this\r\n this.cellLocator = {\r\n relocate: function (index, figure) {\r\n if (_this.repaintBlocked === true) {\r\n return\r\n }\r\n let cell = figure.__cell\r\n let layout = _this.getCellLayout(cell.row, cell.column)\r\n let outerWidth = _this.getWidth()\r\n let minWidth = _this.getMinWidth()\r\n let widthOffset = 0\r\n if (outerWidth != minWidth) {\r\n widthOffset = ((outerWidth - minWidth) / _this.layoutInfos[0].length) * cell.column\r\n }\r\n\r\n let width = figure.getWidth()\r\n let height = figure.getHeight()\r\n let x = layout.x + _this.padding.left + layout.padding.left + widthOffset\r\n let y = layout.y + _this.padding.top + layout.padding.top\r\n\r\n // stretch the figure to fill the complete cell\r\n //\r\n if (figure.isResizeable()) {\r\n let w = Math.max(figure.getMinWidth(), layout.w - (layout.padding.left + layout.padding.right) + widthOffset)\r\n let h = Math.max(figure.getMinHeight(), layout.h - (layout.padding.top + layout.padding.bottom))\r\n figure.setDimension(w, h)\r\n }\r\n // else apply the valign and align property\r\n //\r\n else {\r\n // apply vertical alignment\r\n //\r\n switch (layout.valign) {\r\n case \"middle\":\r\n y = y + (layout.h - (height + layout.padding.top + layout.padding.bottom)) / 2\r\n break\r\n case \"bottom\":\r\n y = y + (layout.h - (height + layout.padding.top + layout.padding.bottom))\r\n break\r\n }\r\n\r\n // apply horizontal alignment\r\n //\r\n switch (layout.align) {\r\n case \"center\":\r\n x = x + (layout.w - (width + layout.padding.left + layout.padding.right)) / 2 + (widthOffset / 2)\r\n break\r\n case \"right\":\r\n x = x + (layout.w - (width + layout.padding.left + layout.padding.right)) + widthOffset\r\n break\r\n }\r\n }\r\n figure.setPosition(x, y)\r\n },\r\n bind: function () {\r\n },\r\n unbind: function () {\r\n },\r\n translate: function (figure, diff) {\r\n figure.setPosition(figure.x + diff.x, figure.y + diff.y)\r\n }\r\n }\r\n\r\n this.padding = {top: 4, right: 4, bottom: 4, left: 4}\r\n\r\n this.grid = []\r\n this.layoutInfos = []\r\n this.layoutInfos[0] = []\r\n this.layoutInfos[0][0] = {x: 0, y: 0, w: 1, h: 1, valign: \"top\", align: \"left\"}\r\n\r\n\r\n this._super(\r\n extend({stroke: 1, resizeable: false}, attr),\r\n extend({\r\n // @attr {Number} padding the padding in pixel around the text */\r\n padding: this.setPadding\r\n }, setter),\r\n extend({\r\n padding: this.getPadding\r\n }, getter))\r\n\r\n\r\n },\r\n\r\n /**\r\n * \r\n * Set the padding of the given cell.\r\n *\r\n *\r\n * @param {Number|Object} padding The new padding\r\n **/\r\n setCellPadding: function (row, column, padding) {\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null) {\r\n return this\r\n }\r\n\r\n if (typeof padding === \"number\") {\r\n layout.padding = {top: padding, right: padding, bottom: padding, left: padding}\r\n }\r\n else {\r\n extend(layout.padding, padding)\r\n }\r\n\r\n this.calculateLayout()\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Get the padding of the outer grid.\r\n *\r\n **/\r\n getCellPadding: function (row, column) {\r\n\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null || typeof layout.padding === \"undefined\") {\r\n return {top: 0, right: 0, bottom: 0, left: 0}\r\n }\r\n return layout.padding\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the padding of the outer grid.\r\n *\r\n * // Alternatively you can use the attr method:\r\n * //\r\n * // set the padding for top,left,bottom,right in one call\r\n * figure.attr({\r\n * padding: 3\r\n * });\r\n *\r\n * // update the padding left and top\r\n * figure.attr({\r\n * padding: {left:3, top:30}\r\n * });\r\n *\r\n * @param {Number|Object} padding The new padding\r\n **/\r\n setPadding: function (padding) {\r\n if (typeof padding === \"number\") {\r\n this.padding = {top: padding, right: padding, bottom: padding, left: padding}\r\n }\r\n else {\r\n this.padding = extend(this.padding, padding)\r\n }\r\n this.calculateLayout()\r\n this.setDimension(1, 1)\r\n this.fireEvent(\"change:padding\", {value: this.padding})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Get the padding of the outer grid.\r\n *\r\n **/\r\n getPadding: function () {\r\n return this.padding\r\n },\r\n\r\n setCanvas: function (canvas) {\r\n this._super(canvas)\r\n this.calculateLayout()\r\n this.setDimension(2, 2)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n add: function (child, locator, index) {\r\n this._super(child, locator, index)\r\n\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * \r\n * Removes the row from the TableLayout\r\n *\r\n * @returns the removed row\r\n */\r\n removeRow: function (index) {\r\n let _this = this\r\n let removedRow = this.grid.splice(index, 1)\r\n removedRow[0].forEach(function (figure) {\r\n _this.remove(figure)\r\n })\r\n\r\n this.calculateLayout()\r\n this.setDimension(2, 2)\r\n\r\n return removedRow\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Add a row to the table grid.\r\n * This method has a variable argument list. All arguments are added in one row.\r\n *\r\n * @param {Array} figures variable count of figures to add as one row\r\n */\r\n addRow: function () {\r\n let figuresToAdd = []\r\n let _this = this\r\n let args = Array.prototype.slice.call(arguments) // sometimes js is stupid...\r\n\r\n let rowCount = this.grid.length + 1\r\n let columnCount = this.grid.length > 0 ? Math.max(this.grid[0].length, args.length) : args.length\r\n\r\n let row = []\r\n\r\n args.forEach(function (figure, index) {\r\n if (typeof figure === \"string\") {\r\n figure = new draw2d.shape.basic.Label({text: figure})\r\n }\r\n row.push(figure)\r\n figuresToAdd.push(figure)\r\n })\r\n this.grid.push(row)\r\n\r\n // adjust the columns. All rows must have the same column count. Add empty cells\r\n // if required.\r\n //\r\n this.grid.forEach(function (row, index) {\r\n let missingColumns = columnCount - row.length\r\n for (let i = 0; i < missingColumns; i++) {\r\n row.push(_this.DUMMY_CELL)\r\n }\r\n })\r\n\r\n let orig = this.repaintBlocked\r\n this.repaintBlocked = true\r\n figuresToAdd.forEach(function (figure) {\r\n _this.add(figure, _this.cellLocator)\r\n })\r\n this.repaintBlocked = orig\r\n\r\n this.calculateLayout()\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n getMinWidth: function () {\r\n // return some good default if we are not part of the canvas.\r\n // A real width/height calculation isn'T possible if the canvas not set\r\n if (this.canvas === null || this.layoutInfos.length === 0) {\r\n return 10\r\n }\r\n\r\n let bottom = this.layoutInfos[this.layoutInfos.length - 1]\r\n let layout = bottom[bottom.length - 1]\r\n\r\n return layout.w + layout.x + this.padding.left + this.padding.right\r\n },\r\n\r\n getMinHeight: function () {\r\n // return some good default if we are not part of the canvas.\r\n // A real width/height calculation isn'T possible if the canvas not set\r\n if (this.canvas === null || this.layoutInfos.length === 0) {\r\n return 10\r\n }\r\n\r\n let bottom = this.layoutInfos[this.layoutInfos.length - 1]\r\n let layout = bottom[bottom.length - 1]\r\n\r\n return layout.h + layout.y + this.padding.top + this.padding.bottom\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the vertical alignment of a cell. Possible values are\r\n * <ul>\r\n * <li>top</li>\r\n * <li>middle</li>\r\n * <li>bottom</li>\r\n * </ul>\r\n *\r\n * @param {Number} row The row index of the cell. Starting by 0\r\n * @param {Number} column The column index of the cell. Starting by 0\r\n * @param {String} align The vertical alignment of the cell\r\n */\r\n setCellVerticalAlign: function (row, column, valign) {\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null) {\r\n return // silently\r\n }\r\n\r\n switch (valign) {\r\n case \"top\":\r\n case \"middle\":\r\n case \"bottom\":\r\n layout.valign = valign\r\n this.calculateLayout()\r\n this.setDimension(1, 1)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Get the vertical alignment of a cell. Possible values are\r\n * <ul>\r\n * <li>top</li>\r\n * <li>middle</li>\r\n * <li>bottom</li>\r\n * </ul>\r\n *\r\n * @param {Number} row The row index of the cell. Starting by 0\r\n * @param {Number} column The column index of the cell. Starting by 0\r\n * @returns {String} The vertical alignment of the cell\r\n */\r\n getCellVerticalAlign: function (row, column) {\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null) {\r\n return \"top\"\r\n }\r\n\r\n return layout.valign\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the alignment of a cell. Possible values are\r\n * <ul>\r\n * <li>left</li>\r\n * <li>center</li>\r\n * <li>right</li>\r\n * </ul>\r\n *\r\n *\r\n * @param {Number} row The row index of the cell. Starting by 0\r\n * @param {Number} column The column index of the cell. Starting by 0\r\n * @param {String} align The horizontal alignment of the cell\r\n */\r\n setCellAlign: function (row, column, align) {\r\n\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null) {\r\n return // silently\r\n }\r\n\r\n switch (align) {\r\n case \"left\":\r\n case \"center\":\r\n case \"right\":\r\n layout.align = align\r\n this.calculateLayout()\r\n this.setDimension(1, 1)\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Return the alignment of a cell. Possible values are\r\n * <ul>\r\n * <li>left</li>\r\n * <li>center</li>\r\n * <li>right</li>\r\n * </ul>\r\n *\r\n *\r\n * @param {Number} row The row index of the cell. Starting by 0\r\n * @param {Number} column The column index of the cell. Starting by 0\r\n * return {String} The horizontal alignment of the cell\r\n */\r\n getCellAlign: function (row, column) {\r\n\r\n let layout = this.getCellLayout(row, column)\r\n if (layout === null) {\r\n return \"left\"\r\n }\r\n return layout.align\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the layout information for the given row/column or <b>null</b>\r\n * if the row/column index is out of range.\r\n *\r\n * @private\r\n */\r\n getCellLayout: function (row, column) {\r\n if (row < 0 || column < 0) {\r\n return null // silently\r\n }\r\n\r\n if (row >= this.layoutInfos.length) {\r\n return null // silently\r\n }\r\n\r\n let layouts = this.layoutInfos[row]\r\n if (column >= layouts.length) {\r\n return null // silently\r\n }\r\n\r\n return layouts[column]\r\n },\r\n\r\n /**\r\n * \r\n * Recalculate the layout of the table\r\n *\r\n * @private\r\n */\r\n calculateLayout: function () {\r\n let _this = this\r\n let rowCount = this.grid.length\r\n let columnCount = this.grid.length > 0 ? this.grid[0].length : 0\r\n\r\n let newLayoutInfos = []\r\n for (let row = 0; row < rowCount; row++) {\r\n newLayoutInfos[row] = []\r\n for (let column = 0; column < columnCount; column++) {\r\n newLayoutInfos[row][column] = {\r\n width: 0,\r\n height: 0,\r\n x: 0,\r\n y: 0,\r\n valign: this.getCellVerticalAlign(row, column),\r\n align: this.getCellAlign(row, column),\r\n padding: this.getCellPadding(row, column)\r\n }\r\n }\r\n }\r\n\r\n // determine the heights/widths of the grid\r\n //\r\n let layoutWidths = new Array(columnCount + 1).join('0').split('').map(parseFloat)\r\n let layoutHeights = new Array(rowCount + 1).join('0').split('').map(parseFloat)\r\n this.grid.forEach(function (figures, row) {\r\n for (let column = 0; column < columnCount; column++) {\r\n let layout = newLayoutInfos[row][column]\r\n let figure = figures[column]\r\n figure.__cell = {row: row, column: column}\r\n layoutHeights[row] = Math.max(layoutHeights[row], figure.getMinHeight() + layout.padding.top + layout.padding.bottom)\r\n layoutWidths[column] = Math.max(layoutWidths[column], figure.getMinWidth() + layout.padding.left + layout.padding.right)\r\n }\r\n })\r\n\r\n let x = 0, y = 0\r\n for (let row = 0; row < rowCount; row++) {\r\n for (let column = 0; column < columnCount; column++) {\r\n let layout = newLayoutInfos[row][column]\r\n layout.w = layoutWidths[column]\r\n layout.h = layoutHeights[row]\r\n layout.x = x\r\n layout.y = y\r\n x = x + layout.w\r\n }\r\n y = y + layoutHeights[row]\r\n x = 0\r\n }\r\n\r\n this.layoutInfos = newLayoutInfos\r\n\r\n return this\r\n }\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * The VerticalLayout class arranges the layout elements in a vertical sequence,\r\n * left to right, with optional gaps between the elements.\r\n *\r\n * During the execution of the setDimension() method, the minimum height of the container is calculated\r\n * by accumulating the minimum sizes of the elements, including stroke, gaps and padding.\r\n *\r\n * See the example below with and without gap and border settings\r\n *\r\n *\r\n * @example\r\n *\r\n * // first container without any gap and a border of the parent\r\n * // container\r\n * let label1 = new draw2d.shape.basic.Label({text:\"Label 1\"});\r\n * let label2 = new draw2d.shape.basic.Label({text:\"Label 2\"});\r\n * let label3 = new draw2d.shape.basic.Label({text:\"Label 3\"});\r\n *\r\n * let container1 = new draw2d.shape.layout.VerticalLayout();\r\n *\r\n * container1.add(label1);\r\n * container1.add(label2);\r\n * container1.add(label3);\r\n * container1.setGap(10);\r\n * container1.setStroke(2);\r\n * canvas.add(container1,50,10);\r\n *\r\n * // second container without any gab or border\r\n * //\r\n * let label11 = new draw2d.shape.basic.Label({text:\"Label 1\"});\r\n * let label12 = new draw2d.shape.basic.Label({text:\"Label 2\"});\r\n * let label13 = new draw2d.shape.basic.Label({text:\"Label 3\"});\r\n *\r\n * let container2 = new draw2d.shape.layout.VerticalLayout();\r\n *\r\n * container2.add(label11);\r\n * container2.add(label12);\r\n * container2.add(label13);\r\n *\r\n * canvas.add(container2,150,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.layout.Layout\r\n */\r\ndraw2d.shape.layout.VerticalLayout = draw2d.shape.layout.Layout.extend(\r\n /** @lends draw2d.shape.layout.VerticalLayout.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.layout.VerticalLayout\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // some layout parameter\r\n //\r\n this.gap = 0\r\n\r\n // \"this\" shortcut to avoid $.proxy\r\n let _this = this\r\n\r\n this.locator = {\r\n translate: function (figure, diff) {\r\n figure.setPosition(figure.x + diff.x, figure.y + diff.y)\r\n },\r\n bind: function () {\r\n },\r\n unbind: function () {\r\n },\r\n relocate: function (index, target) {\r\n let stroke = _this.getStroke()\r\n let yPos = stroke + _this.padding.top // respect the border and padding of the shape\r\n let xPos = _this.padding.left\r\n\r\n for (let i = 0; i < index; i++) {\r\n let child = _this.children.get(i).figure\r\n if (child.isVisible()) {\r\n yPos += child.getHeight() + _this.gap\r\n }\r\n }\r\n\r\n target.setPosition(xPos, yPos)\r\n }\r\n }\r\n\r\n this._super(\r\n extend({width: 10, height: 10}, attr),\r\n extend({\r\n // @attr {Number} gap the gap between the children shapes */\r\n gap: this.setGap\r\n }, setter),\r\n extend({\r\n gap: this.getGap\r\n }, getter))\r\n\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n add: function (child, locator, index) {\r\n this._super(child, this.locator, index)\r\n\r\n this.setDimension(1, 1)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the gap width between child components within this layout.\r\n * This will only affect the space between components, not the space around all the components in the layout.\r\n *\r\n * @param {Number} gap The space, in pixels, between items.\r\n */\r\n setGap: function (gap) {\r\n this.gap = gap\r\n // this forces a relayout of the element\r\n this.setDimension(1, 1)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n let markup = (this.stroke * 2) + this.padding.left + this.padding.right\r\n let width = 10\r\n this.children.each(function (i, e) {\r\n if (e.figure.isVisible())\r\n width = Math.max(width, e.figure.isResizeable() ? e.figure.getMinWidth() : e.figure.getWidth())\r\n })\r\n return width + markup\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinHeight: function () {\r\n let _this = this\r\n let gap = 0\r\n let markup = (this.stroke * 2) + this.padding.top + this.padding.bottom\r\n let height = 0\r\n\r\n this.children.each(function (i, e) {\r\n if (e.figure.isVisible()) {\r\n height += ((e.figure.isResizeable() ? e.figure.getMinHeight() : e.figure.getHeight()) + gap)\r\n // first element is iterated. Now we must add the gap to all next elements\r\n gap = _this.gap\r\n }\r\n })\r\n\r\n return height + markup\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n\r\n let width = this.width - this.padding.left - this.padding.right\r\n if (width === this._recursiveWidth) {\r\n return this\r\n }\r\n this._recursiveWidth = width\r\n\r\n this.children.each(function (i, e) {\r\n if (e.figure.isResizeable() && e.figure.isVisible()) {\r\n e.figure.setDimension(width, e.figure.getMinHeight())\r\n }\r\n })\r\n\r\n delete this._recursiveWidth\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.gap = this.gap\r\n\r\n return memento\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.gap === \"number\") {\r\n this.gap = memento.gap\r\n }\r\n\r\n return this\r\n }\r\n\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A simple Node which has a InputPort and OutputPort. Mainly used for demo and examples.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.node.Between({color: \"#3d3d3d\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.node.Between = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.shape.node.Between.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.node.Between\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#4D90FE\"),\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({\r\n bgColor: this.DEFAULT_COLOR,\r\n color: this.DEFAULT_COLOR.darker(),\r\n width: 50,\r\n height: 50\r\n }, attr), setter, getter)\r\n\r\n this.createPort(\"output\")\r\n this.createPort(\"input\")\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * A simple Node which has a InputPort. Mainly used for demo and examples.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.node.End({color: \"#3d3d3d\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.node.End = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.shape.node.End.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.node.End\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#4D90FE\"),\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({\r\n bgColor: this.DEFAULT_COLOR,\r\n color: this.DEFAULT_COLOR.darker(),\r\n width: 50,\r\n height: 50\r\n }, attr), setter, getter)\r\n\r\n this.createPort(\"input\")\r\n\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\nimport jsonUtil from '../../util/JSONUtil'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A horizontal bus shape with a special kind of port handling. The hole figure is a hybrid port.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.add( new draw2d.shape.node.Fulcrum(),50,10);\r\n * canvas.add( new draw2d.shape.node.Fulcrum(),80,100);\r\n * canvas.add( new draw2d.shape.node.Fulcrum(),150,50);\r\n *\r\n * @extends draw2d.shape.node.Hub\r\n */\r\ndraw2d.shape.node.Fulcrum = draw2d.shape.node.Hub.extend(\r\n /** @lends draw2d.shape.node.Fulcrum.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.node.Fulcrum\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({width: 40, height: 40}, attr), setter, getter)\r\n\r\n\r\n this.port.setConnectionAnchor(new draw2d.layout.anchor.ConnectionAnchor(this.port))\r\n this.port.setVisible(true)\r\n this.port.hitTest = this.port._orig_hitTest\r\n\r\n this.setConnectionDirStrategy(0)\r\n this.setColor(null)\r\n this.setRadius(10)\r\n this.setBackgroundColor(null)\r\n this.setStroke(0)\r\n this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy())\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n attributes ??= {}\r\n\r\n // set some good defaults if the parent didn't\r\n attributes.fill ??=this.bgColor.rgba()\r\n\r\n return this._super(attributes)\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A horizontal bus shape with a special kind of port handling. The hole figure is a hybrid port.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.node.HorizontalBus({width:300, height:20, text:\"Horizontal Bus\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.node.Hub\r\n */\r\ndraw2d.shape.node.HorizontalBus = draw2d.shape.node.Hub.extend(\r\n /** @lends draw2d.shape.node.HorizontalBus.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.node.HorizontalBus\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.setConnectionDirStrategy(1)\r\n\r\n this.installEditPolicy(new draw2d.policy.figure.HBusSelectionFeedbackPolicy())\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\nimport Color from '../../util/Color'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A hub is a shape with a special kind of port handling. The hole figure is a hybrid port. You can drag&drop a Port directly on\r\n * the figure.\r\n *\r\n *\r\n * @example\r\n *\r\n *\r\n * canvas.add(new draw2d.shape.node.Start({x:50, y:50}));\r\n * canvas.add(new draw2d.shape.node.Hub({x:150, y:50}));\r\n *\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.node.Hub = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.shape.node.Hub.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.node.Hub\",\r\n\r\n DEFAULT_COLOR: new Color(\"#4DF0FE\"),\r\n BACKGROUND_COLOR: new Color(\"#29AA77\"),\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.label = null\r\n\r\n this._super(\r\n {\r\n color: this.DEFAULT_COLOR.darker(), \r\n bgColor: this.BACKGROUND_COLOR, \r\n ...attr\r\n },\r\n extend({\r\n // deprecated\r\n label: this.setLabel,\r\n // @attr {String} text the text to display in the center of the hub */\r\n text: this.setLabel\r\n }, setter),\r\n extend({\r\n label: this.getLabel,\r\n text: this.getLabel\r\n }, getter))\r\n\r\n let _port = this.port = this.createPort(\"hybrid\", new draw2d.layout.locator.CenterLocator())\r\n\r\n let r = draw2d.geo.Rectangle\r\n this.CONNECTION_DIR_STRATEGY = [\r\n function (peerPort) {\r\n return _port.getParent().getBoundingBox().getDirection(peerPort.getAbsolutePosition())\r\n },\r\n function (peerPort) {\r\n return _port.getAbsoluteY() > peerPort.getAbsoluteY() ? r.DIRECTION_UP : r.DIRECTION_DOWN\r\n },\r\n function (peerPort) {\r\n return _port.getAbsoluteX() > peerPort.getAbsoluteX() ? r.DIRECTION_LEFT : r.DIRECTION_RIGHT\r\n }]\r\n\r\n // redirect the glow effect and the hitTest for the port to the parent node\r\n //\r\n this.port.setGlow = this.setGlow.bind(this)\r\n this.port._orig_hitTest = this.port.hitTest\r\n this.port.hitTest = this.hitTest.bind(this)\r\n\r\n\r\n // provide a special connection anchor for this port. We use the bounding box of the\r\n // parent as connection border\r\n //\r\n this.port.setConnectionAnchor(new draw2d.layout.anchor.ShortesPathConnectionAnchor(this.port))\r\n this.port.setVisible(false)\r\n this.port.setVisible = function () {\r\n }\r\n\r\n this.setConnectionDirStrategy(0)\r\n },\r\n\r\n /**\r\n *\r\n * Called by the framework during drag&drop operations if the user drag a figure over this figure\r\n *\r\n * @param {draw2d.Figure} draggedFigure The figure which is currently dragging\r\n *\r\n * @returns {draw2d.Figure} the figure which should receive the drop event or null if the element didn't want a drop event\r\n **/\r\n delegateTarget: function (draggedFigure) {\r\n // redirect the dragEnter handling to the hybrid port\r\n //\r\n return this.getHybridPort(0).delegateTarget(draggedFigure)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * This value is relevant for the interactive resize of the figure.\r\n *\r\n * @returns {Number} Returns the min. width of this object.\r\n */\r\n getMinWidth: function () {\r\n if (this.label !== null) {\r\n return Math.max(this.label.getMinWidth(), this._super())\r\n }\r\n return this._super()\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n *\r\n * @private\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n // set some good defaults if the parent didn't\r\n if (typeof attributes.fill === \"undefined\") {\r\n if (this.bgColor !== null) {\r\n attributes.fill = \"90-\" + this.bgColor.hash() + \":5-\" + this.bgColor.lighter(0.3).hash() + \":95\"\r\n } else {\r\n attributes.fill = \"none\"\r\n }\r\n }\r\n\r\n this._super(attributes)\r\n },\r\n\r\n /**\r\n *\r\n * Set the label for the Hub\r\n *\r\n * // Alternatively you can use the attr method:\r\n * figure.attr({\r\n * text: label\r\n * });\r\n *\r\n *\r\n * @param {String} label\r\n * @since 3.0.4\r\n */\r\n setLabel: function (label) {\r\n // Create any Draw2D figure as decoration for the connection\r\n //\r\n if (this.label === null) {\r\n\r\n this.label = new draw2d.shape.basic.Label({text: label, color: \"#0d0d0d\", fontColor: \"#0d0d0d\", stroke: 0})\r\n // add the new decoration to the connection with a position locator.\r\n //\r\n this.add(this.label, new draw2d.layout.locator.CenterLocator())\r\n this.label.setSelectionAdapter( () => this )\r\n this.label.delegateTarget = () => this.port\r\n } else {\r\n this.label.setText(label)\r\n }\r\n },\r\n\r\n /**\r\n *\r\n * Set the strategy for the connection direction calculation.<br>\r\n * <br>\r\n *\r\n * <ul>\r\n * <li>0 - Use the best/shortest direction (UP/RIGHT/DOWN/LEFT) for the connection routing (default)</li>\r\n * <li>1 - Use UP/DOWN for the connection direction</li>\r\n * <li>2 - Use LEFT/RIGHT</li>\r\n * </ul>\r\n * @param {Number} strategy the connection routing strategy to use\r\n * @since 2.4.3\r\n */\r\n setConnectionDirStrategy: function (strategy) {\r\n switch (strategy) {\r\n case 0:\r\n case 1:\r\n case 2:\r\n this.port.getConnectionDirection = this.CONNECTION_DIR_STRATEGY[strategy]\r\n break\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n memento.dirStrategy = this.CONNECTION_DIR_STRATEGY.indexOf(this.port.getConnectionDirection)\r\n if (this.label !== null) {\r\n memento.label = this.label.getText()\r\n }\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.dirStrategy === \"number\") {\r\n this.setConnectionDirStrategy(memento.dirStrategy)\r\n }\r\n\r\n if (typeof memento.label !== \"undefined\") {\r\n this.setLabel(memento.label)\r\n }\r\n }\r\n\r\n })\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A Node is the base class for all figures which can have {@link draw2d.Port}s. A {@link draw2d.Port} is the\r\n * anchor for a {@link draw2d.Connection} line.<br><br>A {@link draw2d.Port} is a green dot which can\r\n * be dragged and dropped over another port.<br>\r\n * @inheritable\r\n * @author Andreas Herz\r\n * @extends draw2d.Figure\r\n */\r\ndraw2d.shape.node.Node = draw2d.Figure.extend(\r\n /** @lends draw2d.shape.node.Node.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.node.Node\",\r\n\r\n /**\r\n * Creates a new Node element which are not assigned to any canvas.\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this.inputPorts = new draw2d.util.ArrayList()\r\n this.outputPorts = new draw2d.util.ArrayList()\r\n this.hybridPorts = new draw2d.util.ArrayList()\r\n\r\n // flag which indicates if the figure should read/write ports to\r\n // JSON\r\n this.persistPorts = true\r\n\r\n // Flags just for performance reasons\r\n //\r\n this.portRelayoutRequired = true\r\n\r\n // just for performance reasons\r\n //\r\n this.cachedPorts = null\r\n\r\n this._super(\r\n {width: 50, height: 50, ...attr},\r\n {\r\n // @attr {Number} indicate whenever you want persists the ports too */\r\n persistPorts: this.setPersistPorts,\r\n ...setter\r\n },\r\n {\r\n persistPorts: this.getPersistPorts,\r\n ...getter\r\n })\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Indicates if the node should read/write the ports via the draw2d.Figure.getPersistenAttributes\r\n * to the JSON object\r\n *\r\n * @param {Boolean} flag\r\n * @since 5.0.4\r\n */\r\n setPersistPorts: function (flag) {\r\n this.persistPorts = flag\r\n this.fireEvent(\"change:persistPorts\", {value: this.persistPorts})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Indicates if the figure writes the ports to the JSON structore too.\r\n * Default is \"false\"\r\n *\r\n * @returns {Boolean}\r\n */\r\n getPersistPorts: function () {\r\n return this.persistPorts\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n toFront: function (figure) {\r\n this._super(figure)\r\n\r\n this.getPorts().each((i, port) => {\r\n port.getConnections().each((i, connection) => connection.toFront(figure))\r\n port.toFront(this)\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n toBack: function (figure) {\r\n\r\n this.getPorts().each((i, port) => {\r\n port.getConnections().each((i, connection) => connection.toBack(figure))\r\n port.toBack(figure)\r\n })\r\n\r\n this._super(figure)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setVisible: function (flag, duration) {\r\n // adjust the visibility of the ports to the parent state\r\n //\r\n if (!flag) {\r\n this.getPorts().each( (i, port) => {\r\n port.__initialVisibilityState = port.isVisible()\r\n port.setVisible(false, duration)\r\n })\r\n }\r\n else {\r\n this.getPorts().each( (i, port) => {\r\n if (typeof port.__initialVisibilityState !== \"undefined\") {\r\n port.setVisible(port.__initialVisibilityState, duration)\r\n }\r\n else {\r\n port.setVisible(true, duration)\r\n }\r\n delete port.__initialVisibilityState\r\n })\r\n }\r\n this._super(flag, duration)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return all ports of the node. The results contains\r\n * all ports of the children too per default. Set <b>recursive</b>\r\n * to false to retrieve direct assigned ports only.\r\n *\r\n * @param {Boolean} [recursive] indicates if the method should return children ports too. Default is <b>true</b>\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getPorts: function (recursive) {\r\n\r\n if (typeof recursive === \"boolean\" && recursive === false) {\r\n let ports = new draw2d.util.ArrayList()\r\n ports.addAll(this.inputPorts)\r\n ports.addAll(this.outputPorts)\r\n ports.addAll(this.hybridPorts)\r\n return ports\r\n }\r\n\r\n if (this.cachedPorts === null) {\r\n this.cachedPorts = new draw2d.util.ArrayList()\r\n this.cachedPorts.addAll(this.inputPorts)\r\n this.cachedPorts.addAll(this.outputPorts)\r\n this.cachedPorts.addAll(this.hybridPorts)\r\n\r\n this.children.each((i, e) => {\r\n this.cachedPorts.addAll(e.figure.getPorts())\r\n })\r\n }\r\n return this.cachedPorts\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return all input ports of the node.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getInputPorts: function () {\r\n return this.inputPorts\r\n .clone()\r\n .addAll(this.hybridPorts)\r\n },\r\n\r\n /**\r\n *\r\n * Return all output ports of the node.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n **/\r\n getOutputPorts: function () {\r\n return this.outputPorts\r\n .clone()\r\n .addAll(this.hybridPorts)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Clone the figure. <br>\r\n * You must override and implement the methods <b>getPersistentAttributes</b> and <b>setPersistentAttributes</b> for your custom\r\n * figures if the have special attributes.\r\n *\r\n * The clone() method performs a deep copy of the object, meaning that it copies the children, ports and decorations\r\n * per default. You can control the clone procedure with the 'cloneMetaData'.\r\n *\r\n *\r\n * @param {Object} [cloneMetaData] controls the clone procedure\r\n * @param {Boolean} [cloneMetaData.excludeChildren] set it to true if you want exclude the children.\r\n * @param {Boolean} [cloneMetaData.excludePorts] set it to true if you want exclude the ports of the node.\r\n *\r\n * @since 4.1.0\r\n * @experimental\r\n */\r\n clone: function (cloneMetaData) {\r\n cloneMetaData = {excludePorts: false, ...cloneMetaData}\r\n\r\n let clone = this._super(cloneMetaData)\r\n\r\n // remove all ports of the clone. the \"init\" method can have create some. but this must\r\n // removed because we want a clone of an existing figure\r\n //\r\n if (cloneMetaData.excludePorts === false) {\r\n clone.resetPorts()\r\n let ports = this.getPorts(false)\r\n\r\n ports.each(function (i, port) {\r\n let clonePort = port.clone()\r\n let locator = port.getLocator().clone()\r\n clone.addPort(clonePort, locator)\r\n })\r\n }\r\n\r\n return clone\r\n },\r\n\r\n /**\r\n *\r\n * Return the port with the corresponding name.\r\n *\r\n *\r\n * @param {String} portName The name of the port to return.\r\n * @returns {draw2d.Port} Returns the port with the hands over name or null.\r\n **/\r\n getPort: function (portName) {\r\n return this.getPorts().find(e => e.getName() === portName)\r\n },\r\n\r\n /**\r\n *\r\n * Return the input port with the corresponding name.\r\n *\r\n *\r\n * @param {String/Number} portNameOrIndex The name or numeric index of the port to return.\r\n * @returns {draw2d.InputPort} Returns the port with the hands over name or null.\r\n **/\r\n getInputPort: function (portNameOrIndex) {\r\n if (typeof portNameOrIndex === \"number\") {\r\n return this.inputPorts.get(portNameOrIndex)\r\n }\r\n\r\n return this.inputPorts.find( port => port.getName()===portNameOrIndex )\r\n },\r\n\r\n /**\r\n *\r\n * Return the output port with the corresponding name.\r\n *\r\n * @param {String/Number} portNameOrIndex The name or the numeric index of the port to return.\r\n * @returns {draw2d.OutputPort} Returns the port with the hands over name or null.\r\n **/\r\n getOutputPort: function (portNameOrIndex) {\r\n if (typeof portNameOrIndex === \"number\") {\r\n return this.outputPorts.get(portNameOrIndex)\r\n }\r\n\r\n return this.outputPorts.find( port => port.getName()===portNameOrIndex )\r\n },\r\n\r\n /**\r\n *\r\n * Return the input port with the corresponding name.\r\n *\r\n *\r\n * @param {String/Number} portNameOrIndex The name or numeric index of the port to return.\r\n * @returns {draw2d.InputPort} Returns the port with the hands over name or null.\r\n **/\r\n getHybridPort: function (portNameOrIndex) {\r\n if (typeof portNameOrIndex === \"number\") {\r\n return this.hybridPorts.get(portNameOrIndex)\r\n }\r\n\r\n return this.hybridPorts.find( port => port.getName()===portNameOrIndex )\r\n },\r\n\r\n /**\r\n *\r\n * Add a port to this node at the given position.<br>\r\n *\r\n * @param {draw2d.Port} port The new port to add.\r\n * @param {draw2d.layout.locator.Locator} locator The layout for the port.\r\n **/\r\n addPort: function (port, locator) {\r\n if (!(port instanceof draw2d.Port)) {\r\n throw \"Argument is not typeof 'draw2d.Port'. \\nFunction: draw2d.shape.node.Node#addPort\"\r\n }\r\n\r\n // add to the internal cache if already build\r\n if (this.cachedPorts !== null) {\r\n this.cachedPorts.add(port)\r\n }\r\n\r\n this.portRelayoutRequired = true\r\n\r\n if (port instanceof draw2d.InputPort) {\r\n this.inputPorts.add(port)\r\n }\r\n else if (port instanceof draw2d.OutputPort) {\r\n this.outputPorts.add(port)\r\n }\r\n else if (port instanceof draw2d.HybridPort) {\r\n this.hybridPorts.add(port)\r\n }\r\n\r\n if ((typeof locator !== \"undefined\") && (locator instanceof draw2d.layout.locator.Locator)) {\r\n port.setLocator(locator)\r\n }\r\n\r\n port.setParent(this)\r\n port.setCanvas(this.canvas)\r\n\r\n // You can't delete a port with the [DEL] key if a port is a child of a node\r\n port.setDeleteable(false)\r\n\r\n if (this.canvas !== null) {\r\n port.getShapeElement()\r\n this.canvas.registerPort(port)\r\n }\r\n\r\n return port\r\n },\r\n\r\n /**\r\n *\r\n * Remove all ports of this node\r\n *\r\n * @since 5.0.0\r\n * @returns {this}\r\n */\r\n resetPorts: function () {\r\n this.getPorts().each((i, port) => this.removePort(port))\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Removes a port and all related connections from this node.<br>\r\n *\r\n * @param {draw2d.Port} port The port to remove.\r\n * @returns {this}\r\n **/\r\n removePort: function (port) {\r\n this.portRelayoutRequired = true\r\n\r\n this.cachedPorts = null\r\n this.inputPorts.remove(port)\r\n this.outputPorts.remove(port)\r\n this.hybridPorts.remove(port)\r\n\r\n if (port.getCanvas() !== null) {\r\n let canvas = port.getCanvas()\r\n canvas.unregisterPort(port)\r\n // remove the related connections of the port too.\r\n let connections = port.getConnections().clone()\r\n connections.each( (i, connection) => {\r\n canvas.remove(connection)\r\n })\r\n }\r\n\r\n port.setCanvas(null)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Create a standard Port for this element. Inherited class can override this\r\n * method to create its own type of ports.\r\n *\r\n * @param {String} type the type of the requested port. possible [\"input\", \"output\"]\r\n * @param {draw2d.layout.locator.Locator} [locator] the layouter to use for this port\r\n * @template\r\n */\r\n createPort: function (type, locator) {\r\n let newPort = null\r\n let count = 0\r\n\r\n switch (type) {\r\n case \"input\":\r\n newPort = draw2d.Configuration.factory.createInputPort(this)\r\n count = this.inputPorts.getSize()\r\n break\r\n case \"output\":\r\n newPort = draw2d.Configuration.factory.createOutputPort(this)\r\n count = this.outputPorts.getSize()\r\n break\r\n case \"hybrid\":\r\n newPort = draw2d.Configuration.factory.createHybridPort(this)\r\n count = this.hybridPorts.getSize()\r\n break\r\n default:\r\n throw \"Unknown type [\" + type + \"] of port requested\"\r\n }\r\n\r\n newPort.setName(type + count)\r\n\r\n this.addPort(newPort, locator)\r\n // relayout the ports\r\n this.setDimension(this.width, this.height)\r\n\r\n return newPort\r\n },\r\n\r\n /**\r\n *\r\n * Return all connections related to this node.\r\n *\r\n * @returns {draw2d.util.ArrayList}\r\n */\r\n getConnections: function () {\r\n let connections = new draw2d.util.ArrayList()\r\n let ports = this.getPorts()\r\n for (let i = 0; i < ports.getSize(); i++) {\r\n let port = ports.get(i)\r\n // Do NOT add twice the same connection if it is linking ports from the same node\r\n for (let c = 0, c_size = port.getConnections().getSize(); c < c_size; c++) {\r\n if (!connections.contains(port.getConnections().get(c))) {\r\n connections.add(port.getConnections().get(c))\r\n }\r\n }\r\n }\r\n return connections\r\n },\r\n\r\n\r\n /**\r\n * @returns {this}\r\n */\r\n setCanvas: function (canvas) {\r\n let oldCanvas = this.canvas\r\n this._super(canvas)\r\n\r\n let ports = this.getPorts()\r\n if (oldCanvas !== null) {\r\n ports.each((i, port) => oldCanvas.unregisterPort(port))\r\n }\r\n\r\n if (canvas !== null) {\r\n ports.each((i, port) => {\r\n port.setCanvas(canvas)\r\n canvas.registerPort(port)\r\n })\r\n // relayout the ports\r\n this.setDimension(this.width, this.height)\r\n }\r\n else {\r\n ports.each((i, port) => port.setCanvas(null))\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n * @returns {this}\r\n */\r\n setRotationAngle: function (angle) {\r\n this.portRelayoutRequired = true\r\n this._super(angle)\r\n\r\n this.layoutPorts()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * @returns {this}\r\n */\r\n setDimension: function (w, h) {\r\n this.portRelayoutRequired = true\r\n this._super(w, h)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Called if the value of any port has been changed\r\n *\r\n * @param {draw2d.Port} relatedPort\r\n * @template\r\n */\r\n onPortValueChanged: function (relatedPort) {\r\n },\r\n\r\n /**\r\n * @private\r\n * @return {this}\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return this\r\n }\r\n\r\n this._super(attributes)\r\n this.layoutPorts()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * @private\r\n * @returns {this}\r\n */\r\n layoutPorts: function () {\r\n if (this.portRelayoutRequired === false) {\r\n return this//silently\r\n }\r\n this.portRelayoutRequired = false\r\n\r\n // layout the ports\r\n //\r\n this.outputPorts.each((i, port) => port.locator.relocate(i, port))\r\n this.inputPorts.each((i, port) => port.locator.relocate(i, port))\r\n this.hybridPorts.each((i, port) => port.locator.relocate(i, port))\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Returns the Command to perform the specified Request or null.\r\n *\r\n * @param {draw2d.command.CommandType} request describes the Command being requested\r\n * @returns {draw2d.command.Command} null or a Command\r\n * @private\r\n **/\r\n createCommand: function (request) {\r\n if (request === null) {\r\n return null\r\n }\r\n\r\n if (request.getPolicy() === draw2d.command.CommandType.ROTATE) {\r\n return new draw2d.command.CommandRotate(this, (this.getRotationAngle() + 90) % 360)\r\n }\r\n\r\n\r\n return this._super(request)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return an objects with all important attributes for XML or JSON serialization\r\n *\r\n * @returns {Object}\r\n */\r\n getPersistentAttributes: function () {\r\n let memento = this._super()\r\n\r\n // write all ports to the JSON\r\n //\r\n if (this.persistPorts === true) {\r\n memento.ports = []\r\n this.getPorts().each(function (i, port) {\r\n memento.ports.push(\r\n {...port.getPersistentAttributes(), \r\n name: port.getName(),\r\n port: port.NAME,\r\n locator: port.getLocator().NAME,\r\n locatorAttr: port.getLocator().attr()\r\n }\r\n )\r\n })\r\n }\r\n\r\n return memento\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.ports !== \"undefined\") {\r\n // we read the ports from the JSON and now we save it to the JSON too.\r\n this.persistPorts = true\r\n\r\n // remove all ports created in the init method\r\n //\r\n this.resetPorts()\r\n\r\n // and restore all ports of the JSON document instead.\r\n //\r\n memento.ports.forEach((e) => {\r\n let locator = Function(`return new ${e.locator}()`)()\r\n if(e.locatorAttr) {\r\n locator.attr(e.locatorAttr)\r\n }\r\n\r\n let port = Function(`return new ${e.port}()`)()\r\n port.setPersistentAttributes(e)\r\n this.addPort(port, locator)\r\n })\r\n }\r\n\r\n return this\r\n }\r\n\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A generic Node which has an OutputPort. Mainly used for demos and examples.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.node.Start({color: \"#3d3d3d\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.node.Start = draw2d.shape.basic.Rectangle.extend(\r\n /** @lends draw2d.shape.node.Start.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.node.Start\",\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#4D90FE\"),\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(extend({\r\n bgColor: this.DEFAULT_COLOR,\r\n color: this.DEFAULT_COLOR.darker(),\r\n width: 50,\r\n height: 50\r\n }, attr), setter, getter)\r\n this.createPort(\"output\")\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A horizontal bus shape with a special kind of port handling. The hole figure is a hybrid port.\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.node.VerticalBus({width:40, height:300, text:\"Vertical Bus\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.node.Hub\r\n */\r\ndraw2d.shape.node.VerticalBus = draw2d.shape.node.Hub.extend(\r\n /** @lends draw2d.shape.node.VerticalBus.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.node.VerticalBus\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.setConnectionDirStrategy(2)\r\n this.installEditPolicy(new draw2d.policy.figure.VBusSelectionFeedbackPolicy())\r\n },\r\n\r\n\r\n /**\r\n * \r\n * set the label for the Hub\r\n *\r\n * @param {String} labelString\r\n * @since 3.0.4\r\n */\r\n setLabel: function (labelString) {\r\n let mustAdjustTheAngel = this.label === null\r\n\r\n this._super(labelString)\r\n\r\n if (mustAdjustTheAngel === true && this.label !== null) {\r\n this.label.setRotationAngle(90)\r\n }\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinHeight: function () {\r\n if (this.shape === null && this.label === null) {\r\n return 0\r\n }\r\n\r\n if (this.label !== null) {\r\n return this.label.getMinWidth()\r\n }\r\n\r\n return this._super()\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getMinWidth: function () {\r\n if (this.shape === null && this.label === null) {\r\n return 0\r\n }\r\n\r\n if (this.label !== null) {\r\n return this.label.getMinHeight()\r\n }\r\n\r\n return this._super()\r\n }\r\n\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Simple Post-it like figure with text. Can be used for annotations or documentation.\r\n *\r\n *\r\n * @example\r\n *\r\n * let shape = new draw2d.shape.note.PostIt({\r\n * text:\"This is a simple sticky note\",\r\n * color:\"#000000\",\r\n * padding:20\r\n * });\r\n *\r\n * canvas.add(shape,40,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.shape.basic.Label\r\n */\r\ndraw2d.shape.note.PostIt = draw2d.shape.basic.Label.extend(\r\n /** @lends draw2d.shape.note.PostIt.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.note.PostIt\",\r\n\r\n /**\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.setStroke(1)\r\n this.setBackgroundColor(\"#5b5b5b\")\r\n this.setColor(\"#FFFFFF\")\r\n this.setFontColor(\"#ffffff\")\r\n this.setFontSize(14)\r\n this.setPadding(5)\r\n this.setRadius(5)\r\n }\r\n})\r\n\r\n\r\n\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * NOT FOR PRODUCTIVE\r\n *\r\n * Checkout [Wikipedia PERT][1] for more information.\r\n * [1] http://en.wikipedia.org/wiki/Program_Evaluation_and_Review_Technique\r\n *\r\n * Double click on the Task name or the top middle number to change the value.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.add( new draw2d.shape.pert.Start(),10,10);\r\n * canvas.add( new draw2d.shape.pert.Activity(),80,130);\r\n * canvas.add( new draw2d.shape.pert.Activity(),180,50);\r\n *\r\n *\r\n *\r\n *\r\n * @extends draw2d.shape.layout.VerticalLayout\r\n */\r\ndraw2d.shape.pert.Activity = draw2d.shape.layout.VerticalLayout.extend(\r\n /** @lends draw2d.shape.pert.Activity.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.pert.Activity\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // shortcut for some callback methods to avoid $.proxy wrapper\r\n let _this = this\r\n\r\n // persistence values for the activity\r\n // will be stored/read in the JSON\r\n this.mementoValues = {\r\n duration: null\r\n }\r\n\r\n // just some color attributes for the rendering/gradient\r\n this.bgColor = new draw2d.util.Color(\"#f3f3f3\")\r\n this.lighterBgColor = this.bgColor.lighter(0.2).rgba()\r\n this.darkerBgColor = this.bgColor.darker(0.2).rgba()\r\n\r\n\r\n this._super(extend({bgColor: this.bgColor, stroke: 2, radius: 2, color: this.darkerBgColor}, attr), setter, getter)\r\n\r\n // Compose the top row of the shape\r\n //\r\n let top = new draw2d.shape.layout.HorizontalLayout({stroke: 0})\r\n\r\n\r\n this.earlyStartLabel = this.createLabel(\"Early Start\").setStroke(0)\r\n\r\n this.durationLabel = new draw2d.shape.basic.Label({\r\n text: \"Duration\",\r\n stroke: 1,\r\n color: this.darkerBgColor,\r\n radius: 0,\r\n bgColor: null,\r\n padding: 5\r\n })\r\n // duration label has a inplaceEditor for the value\r\n this.durationLabel.installEditor(new draw2d.ui.LabelEditor({\r\n onCommit: function (value) {\r\n _this.setDuration(parseFloat(value))\r\n }\r\n }))\r\n\r\n this.earlyEndLabel = this.createLabel({text: \"Early End\", stroke: 0})\r\n\r\n top.add(this.earlyStartLabel)\r\n top.add(this.durationLabel)\r\n top.add(this.earlyEndLabel)\r\n\r\n\r\n // the middle part of the shape\r\n // This part contains the ports for the connection\r\n //\r\n this.activityLabel = new draw2d.shape.basic.Label({\r\n text: \"Activity Name\",\r\n radius: 0,\r\n padding: 10,\r\n color: this.darkerBgColor,\r\n bgColor: null\r\n })\r\n // direct editor for the label\r\n this.activityLabel.installEditor(new draw2d.ui.LabelInplaceEditor())\r\n\r\n this.inputPort = this.activityLabel.createPort(\"input\")\r\n this.inputPort.getActivity = function () {\r\n return _this\r\n }\r\n this.inputPort.onConnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n this.inputPort.onDisconnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n this.inputPort.setValue = function (anyValue) {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n\r\n this.outputPort = this.activityLabel.createPort(\"output\")\r\n this.outputPort.getActivity = function () {\r\n return _this\r\n }\r\n this.outputPort.onConnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n this.outputPort.onDisconnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n\r\n\r\n // the bottom of the activity shape\r\n //\r\n let bottom = new draw2d.shape.layout.HorizontalLayout({stroke: 0})\r\n\r\n\r\n this.lateStartLabel = this.createLabel(\"Late Start\").setStroke(0)\r\n this.stackLabel = this.createLabel(\"Stack\")\r\n this.lateEndLabel = this.createLabel(\"Late End\").setStroke(0)\r\n\r\n bottom.add(this.lateStartLabel)\r\n bottom.add(this.stackLabel)\r\n bottom.add(this.lateEndLabel)\r\n\r\n // finally compose the shape with top/middle/bottom in VerticalLayout\r\n //\r\n this.add(top)\r\n this.add(this.activityLabel)\r\n this.add(bottom)\r\n\r\n\r\n // set some good default value for the activity\r\n //\r\n this.setDuration(1)\r\n },\r\n\r\n /**\r\n * \r\n * Set the duration for the activity. This triggers a complete recalculation of the complete\r\n * diagram. No further calls are required\r\n *\r\n * @param {Number} duration the new Duration for the activity\r\n */\r\n setDuration: function (duration) {\r\n\r\n if (this.mementoValues.duration !== duration) {\r\n // store the new value\r\n this.mementoValues.duration = duration\r\n\r\n // update the labels for duration\r\n this.durationLabel.setText(this.mementoValues.duration)\r\n }\r\n\r\n // calculate the earlyStart and latestEnd and set the labels\r\n //\r\n let start = this.getEarlyStart()\r\n\r\n this.earlyStartLabel.setText(start)\r\n this.earlyEndLabel.setText(start + this.mementoValues.duration)\r\n\r\n // notify all children that a parent value has been changed\r\n // Just knock on the inputPort...\r\n //\r\n let connections = this.outputPort.getConnections()\r\n connections.each(function (i, conn) {\r\n let targetPort = conn.getTarget()\r\n targetPort.setValue()\r\n })\r\n\r\n // propagate the lateFinish up to all parent nodes if we are a leaf\r\n //\r\n if (connections.getSize() === 0) {\r\n let lateFinish = parseFloat(this.earlyEndLabel.getText())\r\n this.setLateFinish(lateFinish)\r\n }\r\n },\r\n\r\n getEarlyEnd: function () {\r\n return this.getEarlyStart() + this.mementoValues.duration\r\n },\r\n\r\n getEarlyStart: function () {\r\n let latestEarlyEnd = 0\r\n\r\n // retrieve the greatest \"earlyStart\" from all parent activities\r\n this.inputPort.getConnections().each(function (i, conn) {\r\n let parentActivity = conn.getSource().getActivity()\r\n latestEarlyEnd = Math.max(latestEarlyEnd, parentActivity.getEarlyEnd())\r\n })\r\n\r\n return latestEarlyEnd\r\n },\r\n\r\n setLateFinish: function (value) {\r\n let lateStart = value - this.mementoValues.duration\r\n\r\n this.lateEndLabel.setText(value)\r\n this.lateStartLabel.setText(lateStart)\r\n this.stackLabel.setText(lateStart - parseFloat(this.earlyStartLabel.getText()))\r\n\r\n let connections = this.inputPort.getConnections()\r\n connections.each(function (i, conn) {\r\n let sourcePort = conn.getSource()\r\n sourcePort.getActivity().setLateFinish(lateStart)\r\n })\r\n },\r\n\r\n /**\r\n * \r\n * help method to create some labels\r\n *\r\n * @param {String} txt the label to display\r\n * @returns {draw2d.shape.basic.Label}\r\n */\r\n createLabel: function (txt) {\r\n let label = new draw2d.shape.basic.Label({text: txt})\r\n label.setStroke(1)\r\n label.setColor(this.darkerBgColor)\r\n label.setRadius(0)\r\n label.setBackgroundColor(null)\r\n label.setPadding(5)\r\n label.setColor(this.bgColor.darker(0.2))\r\n label.onDoubleClick = function (angle) {/* ignore them for the layout elements*/\r\n }\r\n\r\n return label\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setBackgroundColor: function (color) {\r\n this._super(color)\r\n\r\n // calculate the new lighter and darker colors for the gradient\r\n //\r\n this.lighterBgColor = this.bgColor.lighter(0.2).rgba()\r\n this.darkerBgColor = this.bgColor.darker(0.2).rgba()\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n\r\n // repaint can be blocked during deserialization and if the shape\r\n // not part of any canvas.\r\n //\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n\r\n attributes ??= {}\r\n\r\n if (this.getAlpha() < 0.9) {\r\n attributes.fill = this.bgColor.rgba()\r\n }\r\n else {\r\n attributes.fill = [\"90\", this.bgColor.hash(), this.lighterBgColor].join(\"-\")\r\n }\r\n\r\n\r\n this._super(attributes)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * NOT FOR PRODUCTIVE\r\n *\r\n * Checkout [Wikipedia PERT][1] for more information.\r\n *\r\n * Double click on the Task name or the top middle number to change the value.\r\n *\r\n *\r\n * @example\r\n *\r\n * canvas.add( new draw2d.shape.pert.Start(),10,10);\r\n * canvas.add( new draw2d.shape.pert.Activity(),80,130);\r\n * canvas.add( new draw2d.shape.pert.Activity(),180,50);\r\n *\r\n * [1] http://en.wikipedia.org/wiki/Program_Evaluation_and_Review_Technique\r\n *\r\n * @extends draw2d.shape.layout.VerticalLayout\r\n */\r\ndraw2d.shape.pert.Start = draw2d.shape.layout.VerticalLayout.extend(\r\n /** @lends draw2d.shape.pert.Start.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.pert.Start\",\r\n\r\n /**\r\n * Create a new instance\r\n *\r\n * @param {Object} [attr] the configuration of the shape\r\n */\r\n init: function (attr, setter, getter) {\r\n // shortcut for some callback methods to avoid $.proxy wrapper\r\n let _this = this\r\n\r\n // persistence values for the activity\r\n // will be stored/read in the JSON\r\n this.mementoValues = {\r\n duration: null\r\n }\r\n\r\n // just some color attributes for the rendering/gradient\r\n this.bgColor = new draw2d.util.Color(\"#f3f3f3\")\r\n this.lighterBgColor = this.bgColor.lighter(0.2).rgba()\r\n this.darkerBgColor = this.bgColor.darker(0.2).rgba()\r\n\r\n\r\n this._super(extend({bgColor: this.bgColor, stroke: 2, radius: 2, color: this.darkerBgColor}, attr), setter, getter)\r\n\r\n // Compose the top row of the shape\r\n //\r\n let top = new draw2d.shape.layout.HorizontalLayout({stroke: 0})\r\n\r\n\r\n this.durationLabel = new draw2d.shape.basic.Label({\r\n text: \"Duration\",\r\n stroke: 1,\r\n color: this.darkerBgColor,\r\n radius: 0,\r\n bgColor: null,\r\n padding: 5\r\n })\r\n // duration label has a inplaceEditor for the value\r\n this.durationLabel.installEditor(new draw2d.ui.LabelEditor({\r\n text: \"Enter new duration\",\r\n onCommit: function (value) {\r\n _this.setDuration(parseFloat(value))\r\n }\r\n }))\r\n\r\n this.earlyEndLabel = this.createLabel({text: \"Early End\", stroke: 0})\r\n\r\n top.add(this.durationLabel)\r\n top.add(this.earlyEndLabel)\r\n\r\n\r\n // the middle part of the shape\r\n // This part contains the ports for the connection\r\n //\r\n this.activityLabel = new draw2d.shape.basic.Label({\r\n text: \"Start\",\r\n radius: 0,\r\n padding: 10,\r\n color: this.darkerBgColor,\r\n bgColor: null\r\n })\r\n // direct editor for the label\r\n this.activityLabel.installEditor(new draw2d.ui.LabelInplaceEditor())\r\n\r\n this.outputPort = this.activityLabel.createPort(\"output\")\r\n this.outputPort.getActivity = function () {\r\n return _this\r\n }\r\n this.outputPort.onConnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n this.outputPort.onDisconnect = function () {\r\n _this.setDuration(_this.mementoValues.duration)\r\n }\r\n\r\n\r\n // the bottom of the activity shape\r\n //\r\n let bottom = this.createLabel(\" \")\r\n bottom.setPadding(10)\r\n bottom.setStroke(0)\r\n this.lateEndLabel = bottom\r\n\r\n // finally compose the shape with top/middle/bottom in VerticalLayout\r\n //\r\n this.add(top)\r\n this.add(this.activityLabel)\r\n this.add(bottom)\r\n\r\n // set some good default value for the activity\r\n //\r\n this.setDuration(1)\r\n },\r\n\r\n /**\r\n * \r\n * Set the duration for the activity. This triggers a complete recalculation of the complete\r\n * diagram. No further calls are required\r\n *\r\n * @param {Number} duration the new Duration for the activity\r\n */\r\n setDuration: function (duration) {\r\n\r\n if (this.mementoValues.duration !== duration) {\r\n // store the new value\r\n this.mementoValues.duration = duration\r\n\r\n // update the labels for duration\r\n this.durationLabel.setText(this.mementoValues.duration)\r\n }\r\n\r\n this.earlyEndLabel.setText(this.mementoValues.duration)\r\n\r\n // notify all children that a parent value has been changed\r\n // Just knock on the inputPort...\r\n //\r\n let connections = this.outputPort.getConnections()\r\n connections.each(function (i, conn) {\r\n let targetPort = conn.getTarget()\r\n targetPort.setValue()\r\n })\r\n\r\n // propagate the lateFinish up to all parent nodes if we are a leaf\r\n //\r\n if (connections.getSize() === 0) {\r\n let lateFinish = parseFloat(this.earlyEndLabel.getText())\r\n this.setLateFinish(lateFinish)\r\n }\r\n },\r\n\r\n getEarlyEnd: function () {\r\n return this.mementoValues.duration\r\n },\r\n\r\n\r\n setLateFinish: function (value) {\r\n let lateStart = value - this.mementoValues.duration\r\n\r\n this.lateEndLabel.setText(value)\r\n\r\n },\r\n\r\n /**\r\n * \r\n * help method to create some labels\r\n *\r\n * @param {String} txt the label to display\r\n * @returns {draw2d.shape.basic.Label}\r\n */\r\n createLabel: function (txt) {\r\n let label = new draw2d.shape.basic.Label({text: txt})\r\n label.setStroke(1)\r\n label.setColor(this.darkerBgColor)\r\n label.setRadius(0)\r\n label.setBackgroundColor(null)\r\n label.setPadding(5)\r\n label.setColor(this.bgColor.darker(0.2))\r\n label.onDoubleClick = function (angle) {/* ignore them for the layout elements*/\r\n }\r\n\r\n return label\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setBackgroundColor: function (color) {\r\n this._super(color)\r\n\r\n // calculate the new lighter and darker colors for the gradient\r\n //\r\n this.lighterBgColor = this.bgColor.lighter(0.2).rgba()\r\n this.darkerBgColor = this.bgColor.darker(0.2).rgba()\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n repaint: function (attributes) {\r\n\r\n // repaint can be blocked during deserialization and if the shape\r\n // not part of any canvas.\r\n //\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n\r\n attributes ??= {}\r\n\r\n if (this.getAlpha() < 0.9) {\r\n attributes.fill = this.bgColor.rgba()\r\n }\r\n else {\r\n attributes.fill = [\"90\", this.bgColor.hash(), this.lighterBgColor].join(\"-\")\r\n }\r\n\r\n this._super(attributes)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Connection designed for a state diagram with arrow decoration at the\r\n * target of the connection and a label\r\n *\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.state.Start();\r\n * let end = new draw2d.shape.state.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( end, 230,180);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * let c = new draw2d.shape.state.Connection({\r\n * \t source : start.getOutputPort(0),\r\n * target : end.getInputPort(0)\r\n * });\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n *\r\n * @extends draw2d.Connection\r\n */\r\ndraw2d.shape.state.Connection = draw2d.Connection.extend(\r\n /** @lends draw2d.shape.state.Connection.prototype */\r\n {\r\n NAME: \"draw2d.shape.state.Connection\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#4D90FE\"),\r\n\r\n init: function (attr, setter, getter) {\r\n this._super(extend({router: null, stroke: 2}, attr), setter, getter)\r\n\r\n this.setTargetDecorator(new draw2d.decoration.connection.ArrowDecorator(17, 8))\r\n\r\n\r\n this.label = new draw2d.shape.basic.Label({text: \"label\"})\r\n this.label.setStroke(1)\r\n this.label.setPadding(2)\r\n this.label.setBackgroundColor(\"#f0f0f0\")\r\n this.add(this.label, new draw2d.layout.locator.ParallelMidpointLocator())\r\n\r\n },\r\n /**\r\n * \r\n * Set the text to show if the state shape\r\n *\r\n * @param {String} text\r\n */\r\n setLabel: function (text) {\r\n this.label.setText(text)\r\n\r\n // hide the label if no text available\r\n this.label.setVisible(!(text === null || text === \"\"))\r\n this.fireEvent(\"change:label\", {value: text})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Return the label of the shape\r\n *\r\n */\r\n getLabel: function () {\r\n return this.label.getText()\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n return extend(this._super(), {\r\n label: this.getLabel()\r\n })\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.label !== \"undefined\") {\r\n this.setLabel(memento.label)\r\n }\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The end node for a state diagram\r\n *\r\n *\r\n * @example\r\n * let end = new draw2d.shape.state.End();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( end, 230,80);\r\n *\r\n * @extends draw2d.shape.basic.Circle\r\n */\r\ndraw2d.shape.state.End = draw2d.shape.basic.Circle.extend(\r\n /** @lends draw2d.shape.state.End.prototype */\r\n {\r\n \r\n NAME: \"draw2d.shape.state.End\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#4D90FE\"),\r\n\r\n init: function (attr, setter, getter) {\r\n this.innerCircle = new draw2d.shape.basic.Circle(20)\r\n\r\n this._super(attr, setter, getter)\r\n\r\n this.port = this.createPort(\"input\", new draw2d.layout.locator.TopLocator())\r\n this.port.setConnectionAnchor(new draw2d.layout.anchor.ShortesPathConnectionAnchor(this.port))\r\n\r\n this.setDimension(50, 50)\r\n this.setBackgroundColor(this.DEFAULT_COLOR)\r\n this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy())\r\n\r\n this.innerCircle.setStroke(2)\r\n this.innerCircle.setBackgroundColor(null)\r\n this.add(this.innerCircle, new draw2d.layout.locator.CenterLocator())\r\n\r\n this.setStroke(0)\r\n //this.setColor(this.DEFAULT_COLOR.darker());\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n this.innerCircle.setDimension(this.getWidth() - 10, this.getHeight() - 10)\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * The start node for a state diagram\r\n *\r\n *\r\n * @example\r\n *\r\n * let figure = new draw2d.shape.state.Start({color:\"#3d3d3d\"});\r\n *\r\n * canvas.add(figure,50,10);\r\n *\r\n * @extends draw2d.shape.basic.Rectangle\r\n */\r\ndraw2d.shape.state.Start = draw2d.shape.basic.Circle.extend(\r\n /** @lends draw2d.shape.state.Start.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.state.Start\",\r\n\r\n DEFAULT_COLOR: new draw2d.util.Color(\"#3369E8\"),\r\n\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.port = this.createPort(\"output\", new draw2d.layout.locator.BottomLocator())\r\n this.port.setConnectionAnchor(new draw2d.layout.anchor.ShortesPathConnectionAnchor(this.port))\r\n\r\n this.setDimension(50, 50)\r\n this.setBackgroundColor(this.DEFAULT_COLOR)\r\n this.installEditPolicy(new draw2d.policy.figure.AntSelectionFeedbackPolicy())\r\n\r\n this.setStroke(0)\r\n //this.setColor(this.DEFAULT_COLOR.darker());\r\n\r\n let label = new draw2d.shape.basic.Label({text: \"START\"})\r\n label.setStroke(0)\r\n label.setFontColor(\"#ffffff\")\r\n label.setFontFamily('\"Open Sans\",sans-serif')\r\n this.add(label, new draw2d.layout.locator.CenterLocator())\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * a state shape for a state diagram\r\n *\r\n * @example\r\n *\r\n * // create and add two nodes which contains Ports (In and OUT)\r\n * //\r\n * let start = new draw2d.shape.state.Start();\r\n * let state = new draw2d.shape.state.State();\r\n\r\n * // ...add it to the canvas\r\n * canvas.add( start, 50,50);\r\n * canvas.add( state, 230,180);\r\n *\r\n * // Create a Connection and connect the Start and End node\r\n * //\r\n * let c = new draw2d.shape.state.Connection({\r\n * \t\tsource : start.getOutputPort(0),\r\n * target : state.getInputPort(0)\r\n * });\r\n *\r\n *\r\n * // and finally add the connection to the canvas\r\n * canvas.add(c);\r\n *\r\n * @extends draw2d.shape.layout.VerticalLayout\r\n */\r\ndraw2d.shape.state.State = draw2d.shape.layout.VerticalLayout.extend(\r\n /** @lends draw2d.shape.state.State.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.state.State\",\r\n\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n\r\n this.port = this.createPort(\"hybrid\", new draw2d.layout.locator.BottomLocator())\r\n this.port.setConnectionAnchor(new draw2d.layout.anchor.ChopboxConnectionAnchor(this.port))\r\n\r\n\r\n this.setBackgroundColor(\"#f3f3f3\")\r\n\r\n // UI representation\r\n this.setStroke(1)\r\n this.setColor(\"#e0e0e0\")\r\n this.setRadius(5)\r\n\r\n // Compose the top row of the shape\r\n //\r\n let top = this.createLabel(\"State\").setStroke(0)\r\n this.label = top\r\n\r\n // the middle part of the shape\r\n // This part contains the ports for the connection\r\n //\r\n let center = new draw2d.shape.basic.Rectangle()\r\n center.getHeight = function () {\r\n return 1\r\n }\r\n center.setMinWidth(90)\r\n center.setColor(\"#e0e0e0\")\r\n\r\n // the bottom of the activity shape\r\n //\r\n let bottom = new draw2d.shape.basic.Rectangle()\r\n bottom.setMinHeight(30)\r\n bottom.setStroke(0)\r\n bottom.setBackgroundColor(null)\r\n\r\n // finally compose the shape with top/middle/bottom in VerticalLayout\r\n //\r\n this.add(top)\r\n this.add(center)\r\n this.add(bottom)\r\n },\r\n\r\n /**\r\n *\r\n * Set the text to show if the state shape\r\n *\r\n * @param {String} text\r\n */\r\n setLabel: function (text) {\r\n this.label.setText(text)\r\n this.fireEvent(\"change:label\", {value: text})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Return the label of the shape\r\n *\r\n */\r\n getLabel: function () {\r\n return this.label.getText()\r\n },\r\n\r\n\r\n /**\r\n *\r\n * helper method to create some labels\r\n *\r\n * @param {String} txt the label to display\r\n * @returns {draw2d.shape.basic.Label}\r\n * @private\r\n */\r\n createLabel: function (txt) {\r\n let label = new draw2d.shape.basic.Label(txt)\r\n label.setStroke(1)\r\n label.setColor(this.darkerBgColor)\r\n label.setRadius(0)\r\n label.setBackgroundColor(null)\r\n label.setPadding(5)\r\n label.setColor(this.bgColor.darker(0.2))\r\n label.onDoubleClick = function (angle) {/* ignore them for the layout elements*/\r\n }\r\n\r\n return label\r\n },\r\n\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n getPersistentAttributes: function () {\r\n return extend(this._super(), {\r\n label: this.getLabel()\r\n })\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this._super(memento)\r\n\r\n if (typeof memento.label !== \"undefined\") {\r\n this.setLabel(memento.label)\r\n }\r\n\r\n }\r\n})\r\n","import draw2d from '../../packages'\r\nimport {Tweenable} from 'shifty'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * @example\r\n *\r\n * let slider = new draw2d.shape.widget.Slider({width:120, height:20});\r\n * canvas.add( slider,100,60);\r\n *\r\n * @extends draw2d.shape.widget.Widget\r\n */\r\ndraw2d.shape.widget.Slider = draw2d.shape.widget.Widget.extend(\r\n /** @lends draw2d.shape.widget.Slider.prototype */\r\n {\r\n\r\n NAME: \"draw2d.shape.widget.Slider\",\r\n\r\n DEFAULT_COLOR_THUMB: new draw2d.util.Color(\"#bddf69\"),\r\n DEFAULT_COLOR_BG: new draw2d.util.Color(\"#d3d3d3\"),\r\n\r\n\r\n init: function (attr, setter, getter) {\r\n this.currentValue = 0 // [0..100]\r\n this.slideBoundingBox = new draw2d.geo.Rectangle(0, 0, 10, 20)\r\n this.padding = {top: 4, right: 4, bottom: 4, left: 4}\r\n this.panning = false\r\n this.thumbGrow = 0\r\n\r\n this._super(\r\n {\r\n width: 150,\r\n height: 15,\r\n stroke: 1,\r\n radius: 4,\r\n resizeable: true,\r\n color: this.DEFAULT_COLOR_THUMB,\r\n bgColor: this.DEFAULT_COLOR_BG,\r\n value: 50,\r\n ...attr},\r\n extend({\r\n // @attr {Number} padding the padding in pixel around the text */\r\n padding: this.setPadding,\r\n // @attr {Number} value the new value of the slider. values must be in range of [0..100] */\r\n value: this.setValue\r\n }, setter),\r\n extend({\r\n padding: this.getPadding,\r\n value: this.getValue\r\n }, getter))\r\n\r\n this.setMinHeight(15)\r\n this.setMinWidth(80)\r\n },\r\n\r\n /**\r\n * \r\n * Create the additional elements for the figure\r\n *\r\n */\r\n createSet: function () {\r\n let result = this.canvas.paper.set()\r\n let thumb = this.canvas.paper.rect(0, 0, 10, 20)\r\n thumb.node.style.cursor = \"col-resize\"\r\n result.push(thumb)\r\n\r\n return result\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n setDimension: function (w, h) {\r\n this._super(w, h)\r\n this.slideBoundingBox.setBoundary(this.padding.left, 0, this.getWidth() - this.padding.right, this.getHeight())\r\n this.slideBoundingBox.setHeight(this.getHeight() + 1)\r\n\r\n // TODO: and repaint again.....two repaints for one \"setDimension\"....BAD\r\n //\r\n this.repaint()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Set the padding of the element\r\n *\r\n * // Alternatively you can use the attr method:\r\n * //\r\n * // set the padding for top,left,bottom,right in one call\r\n * figure.attr({\r\n * padding: 3\r\n * });\r\n *\r\n * // update the padding left and top\r\n * figure.attr({\r\n * padding: {left:3, top:30}\r\n * });\r\n *\r\n * @param {Number|Object} padding The new padding\r\n * @since 5.6.0\r\n **/\r\n setPadding: function (padding) {\r\n this.clearCache()\r\n if (typeof padding === \"number\") {\r\n this.padding = {top: padding, right: padding, bottom: padding, left: padding}\r\n }\r\n else {\r\n this.padding = extend(this.padding, padding)\r\n }\r\n this.repaint()\r\n this.fireEvent(\"change:padding\", {value: this.padding})\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Get the padding of the element.\r\n *\r\n * @since 5.6.0\r\n **/\r\n getPadding: function () {\r\n return this.padding\r\n },\r\n\r\n /**\r\n * \r\n * Called if the value of the slider has been changed.\r\n *\r\n * @param {Number} value The new value of the slider in percentage [0..100]\r\n * @template\r\n */\r\n onValueChange: function (value) {\r\n },\r\n\r\n /**\r\n * \r\n * Will be called if the drag and drop action begins. You can return [false] if you\r\n * want avoid that the figure can be move.\r\n *\r\n * @param {Number} x the x-coordinate of the mouse up event\r\n * @param {Number} y the y-coordinate of the mouse up event\r\n * @param {Boolean} shiftKey true if the shift key has been pressed during this event\r\n * @param {Boolean} ctrlKey true if the ctrl key has been pressed during the event\r\n *\r\n * @returns {Boolean} true if the figure accepts dragging\r\n **/\r\n onDragStart: function (x, y, shiftKey, ctrlKey) {\r\n // check if the use has been clicked on the thumb.\r\n // Return \"false\" to prevent drag&drop operation.\r\n //\r\n if (this.slideBoundingBox.hitTest(x, y)) {\r\n\r\n this.panningX = x\r\n this.panningY = y\r\n this.panning = true\r\n let tweenable = new Tweenable()\r\n tweenable.tween({\r\n from: {grow: this.thumbGrow},\r\n to: {grow: 10},\r\n duration: 500,\r\n easing: 'easeOutQuart',\r\n step: function (state) {\r\n this.thumbGrow = state.grow\r\n this.repaint()\r\n }.bind(this),\r\n finish: function () {\r\n tweenable.dispose()\r\n }\r\n })\r\n return false\r\n }\r\n\r\n return this._super(x, y, shiftKey, ctrlKey)\r\n },\r\n\r\n /**\r\n * \r\n * Called by the framework if the figure returns false for the drag operation. In this\r\n * case we send a \"panning\" event - mouseDown + mouseMove. This is very useful for\r\n * UI-Widget like slider, spinner,...\r\n *\r\n * @param {Number} dx the x difference between the mouse down operation and now\r\n * @param {Number} dy the y difference between the mouse down operation and now\r\n * @param {Number} dx2 The x diff since the last call of this dragging operation\r\n * @param {Number} dy2 The y diff since the last call of this dragging operation\r\n */\r\n\r\n\r\n onPanning: function (dx, dy, dx2, dy2) {\r\n // calculate the current position of the mouse pos\r\n //\r\n let width = this.getWidth()\r\n let sliderWidth = width - this.padding.left - this.padding.right\r\n\r\n let figurePos = Math.min(width, Math.max(0, this.panningX + dx))\r\n let sliderPos = Math.min(width - this.padding.left - this.padding.right, figurePos)\r\n\r\n this.setValue(100 / sliderWidth * sliderPos)\r\n },\r\n\r\n /**\r\n * @inheritdoc\r\n */\r\n onPanningEnd: function () {\r\n this.panning = false\r\n\r\n let tweenable = new Tweenable()\r\n tweenable.tween({\r\n from: {grow: this.thumbGrow},\r\n to: {grow: 0},\r\n duration: 300,\r\n easing: 'easeOutQuart',\r\n step: function (state) {\r\n this.thumbGrow = state.grow\r\n this.repaint()\r\n }.bind(this),\r\n finish: function () {\r\n tweenable.dispose()\r\n }\r\n })\r\n this.thumbGrow = 0\r\n this.repaint()\r\n },\r\n\r\n /**\r\n * \r\n * Set the current value of the slider. Valid values are [0..100]\r\n *\r\n * @param {Number} value values between [0..100]\r\n */\r\n setValue: function (value) {\r\n this.currentValue = Math.min(Math.max(0, (value | 0)), 100)\r\n this.repaint()\r\n this.onValueChange(this.currentValue)\r\n this.fireEvent(\"change:value\", {value: this.currentValue})\r\n\r\n return this\r\n },\r\n\r\n /**\r\n * \r\n * Returns the current value of the slider\r\n *\r\n * @since 5.6.0\r\n *\r\n * @returns {Number}\r\n */\r\n getValue: function () {\r\n return this.currentValue\r\n },\r\n\r\n /**\r\n *\r\n * @param attributes\r\n */\r\n repaint: function (attributes) {\r\n if (this.repaintBlocked === true || this.shape === null) {\r\n return\r\n }\r\n\r\n attributes ??= {}\r\n\r\n // adjust the slider to the current value and the new dimension of the widget\r\n //\r\n let thumbX = (((this.getWidth() - this.padding.left - this.padding.right) / 100 * this.currentValue) + this.padding.left) | 0\r\n this.slideBoundingBox.setX(thumbX)\r\n\r\n\r\n // update slider\r\n //\r\n if (this.svgNodes !== null) {\r\n let attr = this.slideBoundingBox.toJSON()\r\n attr.y -= (this.thumbGrow / 2)\r\n attr.height += this.thumbGrow\r\n attr.fill = this.getColor().rgba()\r\n attr.stroke = this.getColor().darker(0.2).rgba()\r\n attr.r = 4\r\n this.svgNodes.attr(attr)\r\n }\r\n\r\n\r\n attributes.fill = \"90-\" + this.bgColor.hash() + \":5-\" + this.bgColor.lighter(0.3).hash() + \":95\"\r\n attributes.stroke = this.bgColor.darker(0.1).rgba()\r\n\r\n this._super(attributes)\r\n },\r\n\r\n\r\n applyTransformation: function () {\r\n this.svgNodes.transform(\"T\" + this.getAbsoluteX() + \",\" + this.getAbsoluteY())\r\n\r\n return this\r\n }\r\n\r\n})\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n * Base class for all diagrams.\r\n *\r\n * @extends draw2d.SetFigure\r\n */\r\ndraw2d.shape.widget.Widget = draw2d.SetFigure.extend({\r\n\r\n init: function (attr, setter, getter) {\r\n this._super(attr, setter, getter)\r\n }\r\n})\r\n","import draw2d from '../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Base class for all draw2d.shape.basic.Label editors. The default implementation is to open\r\n * a simple javascript prompt dialog.<br>\r\n * Use LabelInplaceEditor or your own implementation if you need more comfort.\r\n *\r\n * @example\r\n *\r\n * let label = new draw2d.shape.basic.Label({text:\"Double Click on me\"});\r\n *\r\n * label.installEditor(new draw2d.ui.LabelEditor({\r\n * // called after the value has been set to the LabelFigure\r\n * onCommit: $.proxy(function(value){\r\n * alert(\"new value set to:\"+value);\r\n * },this),\r\n * // called if the user abort the operation\r\n * onCancel: function(){\r\n * }\r\n * }));\r\n *\r\n * canvas.add(label,50,10);\r\n *\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.ui.LabelEditor = Class.extend(\r\n /** @lends draw2d.ui.LabelEditor.prototype */\r\n {\r\n NAME: \"draw2d.ui.LabelEditor\",\r\n\r\n /**\r\n *\r\n * @param {Object} attr callback handler and configuration. **{ onCommit:function(){}}, onCancel: function(){}, onStart: function(){}, text:'My Dialog Title' }**\r\n */\r\n init: function (attr) {\r\n this.configuration = {\r\n onCommit: () =>{},\r\n onCancel: () =>{},\r\n onStart: () =>{},\r\n text: \"Value\"\r\n ,...attr}\r\n },\r\n\r\n /**\r\n *\r\n * Trigger the edit of the label text.\r\n *\r\n * @param {draw2d.shape.basic.Label} label the label to edit\r\n */\r\n start: function (label) {\r\n this.configuration.onStart()\r\n let newText = prompt(this.configuration.text, label.getText())\r\n if (newText) {\r\n let cmd = new draw2d.command.CommandAttr(label, {text: newText})\r\n label.getCanvas().getCommandStack().execute(cmd)\r\n\r\n this.configuration.onCommit(label.getText())\r\n } else {\r\n this.configuration.onCancel()\r\n }\r\n }\r\n })\r\n","import draw2d from '../packages'\r\nimport r from \"lib/jquery.autoresize\"\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * Inplace editor for draw2d.shape.base.Label\r\n *\r\n * @example\r\n *\r\n * var label = new draw2d.shape.basic.Label({text:\"Double Click on me\"});\r\n *\r\n * label.installEditor(new draw2d.ui.LabelInplaceEditor({\r\n * // called after the value has been set to the LabelFigure\r\n * onCommit: $.proxy(function(value){\r\n * alert(\"new value set to:\"+value);\r\n * },this),\r\n * // called if the user abort the operation\r\n * onCancel: function(){\r\n * }\r\n * }));\r\n *\r\n * canvas.add(label,50,10);\r\n *\r\n * @author Andreas Herz\r\n * @extends draw2d.ui.LabelEditor\r\n */\r\ndraw2d.ui.LabelInplaceEditor = draw2d.ui.LabelEditor.extend(\r\n /** @lends draw2d.ui.LabelInplaceEditor.prototype */\r\n {\r\n\r\n NAME: \"draw2d.ui.LabelInplaceEditor\",\r\n\r\n init: function (listener) {\r\n this._super();\r\n\r\n // register some default listener and override this with the handover one\r\n this.listener = extend({\r\n onCommit: function () {\r\n },\r\n onCancel: function () {\r\n },\r\n onStart: function () {\r\n }\r\n }, listener);\r\n },\r\n\r\n /**\r\n *\r\n * Trigger the edit of the label text.\r\n *\r\n * @param {draw2d.shape.basic.Label} label the label to edit\r\n */\r\n start: function (label) {\r\n this.label = label;\r\n\r\n this.commitCallback = this.commit.bind(this);\r\n\r\n // commit the editor if the user clicks anywhere in the document\r\n //\r\n $(\"body\").bind(\"click\", this.commitCallback);\r\n\r\n // append the input field to the document and register\r\n // the ENTER and ESC key to commit /cancel the operation\r\n //\r\n this.html = $('<input id=\"inplaceeditor\">');\r\n this.html.val(label.getText());\r\n this.html.hide();\r\n\r\n $(\"body\").append(this.html);\r\n\r\n this.html.autoResize();\r\n\r\n this.html.bind(\"keyup\", function (e) {\r\n switch (e.which) {\r\n case 13:\r\n this.commit();\r\n break;\r\n case 27:\r\n this.cancel();\r\n break;\r\n }\r\n }.bind(this));\r\n\r\n this.html.bind(\"blur\", this.commitCallback);\r\n\r\n // avoid commit of the operation if we click inside the editor\r\n //\r\n this.html.bind(\"click\", function (e) {\r\n e.stopPropagation();\r\n e.preventDefault();\r\n });\r\n\r\n // Position the INPUT and init the autoresize of the element\r\n //\r\n var canvas = this.label.getCanvas();\r\n var bb = this.label.getBoundingBox();\r\n\r\n bb.setPosition(canvas.fromCanvasToDocumentCoordinate(bb.x, bb.y));\r\n\r\n // remove the scroll from the body if we add the canvas directly into the body\r\n var scrollDiv = canvas.getScrollArea();\r\n if (scrollDiv.is($(\"body\"))) {\r\n bb.translate(canvas.getScrollLeft(), canvas.getScrollTop());\r\n }\r\n\r\n bb.translate(-1, -1);\r\n bb.resize(2, 2);\r\n\r\n this.html.css({\r\n position: \"absolute\",\r\n \"top\": bb.y,\r\n \"left\": bb.x,\r\n \"min-width\": bb.w * (1 / canvas.getZoom()),\r\n \"height\": Math.max(25, bb.h * (1 / canvas.getZoom()))\r\n });\r\n this.html.fadeIn(() => {\r\n this.html.focus();\r\n this.listener.onStart()\r\n });\r\n },\r\n\r\n /**\r\n *\r\n * Transfer the data from the editor into the label.<br>\r\n * Remove the editor.<br>\r\n *\r\n * @private\r\n */\r\n commit: function () {\r\n this.html.unbind(\"blur\", this.commitCallback);\r\n $(\"body\").unbind(\"click\", this.commitCallback);\r\n var label = this.html.val();\r\n var cmd = new draw2d.command.CommandAttr(this.label, {text: label});\r\n this.label.getCanvas().getCommandStack().execute(cmd);\r\n this.html.fadeOut(() => {\r\n this.html.remove();\r\n this.html = null;\r\n this.listener.onCommit(this.label.getText());\r\n });\r\n },\r\n\r\n /**\r\n *\r\n * Transfer the data from the editor into the label.<br>\r\n * Remove the editor.<br>\r\n * @private\r\n */\r\n cancel: function () {\r\n this.html.unbind(\"blur\", this.commitCallback);\r\n $(\"body\").unbind(\"click\", this.commitCallback);\r\n this.html.fadeOut(() => {\r\n this.html.remove();\r\n this.html = null;\r\n this.listener.onCancel();\r\n });\r\n\r\n }\r\n });\r\n\r\n","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n *\r\n * <Disclaimer> Writing my own class for arrays was one of my worst ideas...\r\n *\r\n * An ArrayList stores a variable number of objects. This is similar to making an array of\r\n * objects, but with an ArrayList, items can be easily added and removed from the ArrayList\r\n * and it is resized dynamically. This can be very convenient, but it's slower than making\r\n * an array of objects when using many elements.\r\n */\r\ndraw2d.util.ArrayList = Class.extend(\r\n /** @lends draw2d.util.ArrayList */\r\n {\r\n\r\n init: function (a) {\r\n if (Array.isArray(a)) {\r\n this.data = a\r\n } else {\r\n this.data = []\r\n }\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Clears the array\r\n *\r\n * @since 6.1.0\r\n * @returns {this}\r\n */\r\n clear: function () {\r\n this.data = []\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Reverses the order of the elements in the ArrayList. The array will be modified!\r\n *\r\n * @returns {this}\r\n */\r\n reverse: function () {\r\n this.data.reverse()\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * The size/count of the stored objects.\r\n *\r\n * @returns {Number}\r\n */\r\n getSize: function () {\r\n return this.data.length\r\n },\r\n\r\n\r\n /**\r\n *\r\n * checks to see if the Vector has any elements.\r\n *\r\n * @returns {Boolean} true if the list is empty\r\n **/\r\n isEmpty: function () {\r\n return this.getSize() === 0\r\n },\r\n\r\n /**\r\n *\r\n * return the last element.\r\n *\r\n * @returns {Object}\r\n */\r\n last: function () {\r\n return this.data[this.data.length - 1]\r\n },\r\n\r\n /**\r\n *\r\n * Return a reference to the internal javascript native array.\r\n *\r\n * @returns {Array}\r\n */\r\n asArray: function () {\r\n return this.data\r\n },\r\n\r\n /**\r\n *\r\n * returns the first element\r\n *\r\n * @returns {Object}\r\n */\r\n first: function () {\r\n if (this.data.length > 0) {\r\n return this.data[0]\r\n }\r\n return null\r\n },\r\n\r\n\r\n /**\r\n *\r\n * returns an element at a specified index\r\n *\r\n * @param {Number} i\r\n * @returns {Object}\r\n */\r\n get: function (i) {\r\n return this.data[i]\r\n },\r\n\r\n /**\r\n *\r\n * Adds a element at the end of the Vector.\r\n *\r\n * @param {Object} obj the object to add\r\n * @returns {this}\r\n */\r\n add: function (...objs) {\r\n this.data.push(...objs)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * The method modifies the array and removes items from an array as necessary so that all remaining items pass a\r\n * provided test. The test is a function that is passed an array item and the index of the\r\n * item within the array. Only if the test returns true will the item stay in the array.\r\n *\r\n * @param {Function} func the filter function(element,index)\r\n * @param {Object} func.value value of the element in iteration.\r\n * @since 2.0.0\r\n * @returns {this}\r\n */\r\n grep: function (func) {\r\n this.data = this.data.filter(func)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n *\r\n * Return ONE element which matches by the given function or <b>null</b>\r\n * if no element is found.\r\n *\r\n * var r1= figures.find(function(figure){\r\n * return figure.id===123456\r\n * });\r\n *\r\n * @param {Function} func the filter function\r\n * @param {Object} func.value value of the element in iteration.\r\n * @param {Object} func.index index of the element in collection.\r\n * @since 2.0.0\r\n */\r\n find: function (func) {\r\n return this.data.find(func)\r\n },\r\n\r\n /**\r\n *\r\n * Translate all items in the array into new items. The array list is modified after this call.\r\n * You must clone the array before if you want avoid this.\r\n *\r\n * var labels = this.commands.clone().map(function(e){\r\n * return e.getLabel();\r\n * });\r\n *\r\n * @param {Function} func The function to process each item against. The first argument to the function is the value; the second argument is the index or key of the array or object property.\r\n * @param {Object} func.value value of the element in iteration.\r\n * @param {Number} func.i index of the element in iteration\r\n *\r\n * @since 4.0.0\r\n * @returns {this}\r\n */\r\n map: function (func) {\r\n this.data = this.data.map(func)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Removes any duplicate elements from the array. The array is modified after this call. You\r\n * must clone the array before if you want avoid this\r\n *\r\n * @since 4.0.0\r\n * @returns {this}\r\n */\r\n unique: function () {\r\n this.data = this.data.filter((value, index, self) => self.indexOf(value) === index)\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Add all elements into this array.\r\n *\r\n * @param {draw2d.util.ArrayList} list\r\n * @param {Boolean} [avoidDuplicates] checks whenever the new elements exists before insert if the parameter is to [true]\r\n * @returns {this}\r\n */\r\n addAll: function (list, avoidDuplicates) {\r\n if (!(list instanceof draw2d.util.ArrayList)) {\r\n throw \"Unable to handle unknown object type in ArrayList.addAll\"\r\n }\r\n\r\n this.data = this.data.concat(list.data)\r\n if (avoidDuplicates) {\r\n this.unique()\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * You can use the Array list as Stack as well. this is the pop method to remove one element\r\n * at the end of the stack.\r\n *\r\n * @returns {Object} the remove object\r\n */\r\n pop: function () {\r\n return this.removeElementAt(this.data.length - 1)\r\n },\r\n\r\n /**\r\n * Push one element at the top of the stack/array\r\n *\r\n * @param {Object} value The object to add\r\n * @returns {this}\r\n */\r\n push: function (value) {\r\n this.add(value)\r\n },\r\n\r\n /**\r\n *\r\n * Remove the element from the list\r\n *\r\n * @param {Object} obj the object to remove\r\n *\r\n * @returns {Object} the removed object or null\r\n */\r\n remove: function (obj) {\r\n let index = this.indexOf(obj)\r\n if (index >= 0) {\r\n return this.removeElementAt(index)\r\n }\r\n\r\n return null\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Inserts an element at a given position. Existing elements will be shifted\r\n * to the right.\r\n *\r\n * @param {Object} obj the object to insert.\r\n * @param {Number} index the insert position.\r\n * @returns {this}\r\n */\r\n insertElementAt: function (obj, index) {\r\n this.data.splice(index, 0, obj)\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Removes an element at a specific index.\r\n *\r\n * @param {Number} index the index of the element to remove\r\n * @returns {Object} the removed object\r\n */\r\n removeElementAt: function (index) {\r\n let element = this.data[index]\r\n\r\n this.data.splice(index, 1)\r\n\r\n return element\r\n },\r\n\r\n /**\r\n *\r\n * removes all given elements in the ArrayList\r\n *\r\n * @param {draw2d.util.ArrayList} elements The elements to remove\r\n * @returns {this}\r\n */\r\n removeAll: function (elements) {\r\n if (elements instanceof draw2d.util.ArrayList) {\r\n elements = elements.data\r\n }\r\n\r\n if (Array.isArray(elements)) {\r\n elements.forEach((e) => {\r\n this.remove(e)\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Return the zero based index of the given element or -1 if the element\r\n * not in the list.\r\n *\r\n * @param {Object} obj the element to check\r\n *\r\n * @returns {Number} the index of the element or -1\r\n */\r\n indexOf: function (obj) {\r\n return this.data.indexOf(obj)\r\n },\r\n\r\n /**\r\n *\r\n * returns true if the element is in the Vector, otherwise false.\r\n *\r\n * @param {Object} obj the object to check\r\n *\r\n * @returns {Boolean}\r\n */\r\n contains: function (obj) {\r\n return this.data.includes(obj)\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Sorts the collection based on a field name or sort a function. See on http://www.w3schools.com/jsref/jsref_sort.asp\r\n * if you use a sort function.\r\n *\r\n * @param {String|Function} f the field name for the sorting or a sort function\r\n *\r\n * @returns {this}\r\n *\r\n */\r\n sort: function (f) {\r\n if (typeof f === \"function\") {\r\n this.data.sort(f)\r\n } else {\r\n this.data.sort(function (a, b) {\r\n if (a[f] < b[f])\r\n return -1\r\n if (a[f] > b[f])\r\n return 1\r\n return 0\r\n })\r\n }\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * Copies the contents of a Vector to another Vector returning the new Vector.\r\n *\r\n * @param {Boolean} [deep] call \"clone\" of each elements and add the clone to the new ArrayList\r\n *\r\n * @returns {draw2d.util.ArrayList} the new ArrayList\r\n */\r\n clone: function (deep) {\r\n let newVector = new draw2d.util.ArrayList()\r\n\r\n\r\n if (deep) {\r\n for (let i = 0; i < this.data.length; i++) {\r\n newVector.data.push(this.data[i].clone())\r\n }\r\n } else {\r\n newVector.data = this.data.slice(0)\r\n }\r\n\r\n return newVector\r\n },\r\n\r\n\r\n /**\r\n *\r\n * Iterates over the list of elements, yielding each in turn to an iterator\r\n * function.\r\n * Each invocation of iterator is called with two arguments: (index, element).\r\n *\r\n * @param {Function} func the callback function to call for each element\r\n * @param {Number} func.i index of the element in iteration\r\n * @param {Object} func.value value of the element in iteration.\r\n * @param {Boolean} [reverse] optional parameter. Iterate the collection reverse if it set to <b>true</b>\r\n * @returns {this}\r\n */\r\n each: function (func, reverse) {\r\n if (typeof reverse !== \"undefined\" && reverse === true) {\r\n for (let i = this.data.length - 1; i >= 0; i--) {\r\n if (func(i, this.data[i]) === false)\r\n break\r\n }\r\n } else {\r\n for (let i = 0; i < this.data.length; i++) {\r\n if (func(i, this.data[i]) === false)\r\n break\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n\r\n /**\r\n * overwrites the element with an object at the specific index.\r\n *\r\n * @param {Object} obj The object to add\r\n * @param {Number} index the index where the object should places.\r\n *\r\n * @returns {this}\r\n */\r\n overwriteElementAt: function (obj, index) {\r\n this.data[index] = obj\r\n\r\n return this\r\n },\r\n\r\n /**\r\n *\r\n * @returns {Object} the attributes which are required for persistence\r\n */\r\n getPersistentAttributes: function () {\r\n return {data: this.data}\r\n },\r\n\r\n /**\r\n *\r\n * Read all attributes from the serialized properties and transfer them into the shape.\r\n *\r\n * @param {Object} memento\r\n * @returns {this}\r\n */\r\n setPersistentAttributes: function (memento) {\r\n this.data = memento.data\r\n\r\n return this\r\n }\r\n })\r\n\r\ndraw2d.util.ArrayList.EMPTY_LIST = new draw2d.util.ArrayList()\r\n\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\ndraw2d.util.Base64 = {\r\n\r\n /**\r\n * Maps bytes to characters.\r\n * @type {Object}\r\n * @private\r\n */\r\n byteToCharMap_ :null,\r\n\r\n\r\n /**\r\n * Maps characters to bytes.\r\n * @type {Object}\r\n * @private\r\n */\r\n charToByteMap_: null,\r\n\r\n\r\n /**\r\n * Maps bytes to websafe characters.\r\n * @type {Object}\r\n * @private\r\n */\r\n byteToCharMapWebSafe_ : null,\r\n\r\n /**\r\n * Maps websafe characters to bytes.\r\n * @type {Object}\r\n * @private\r\n */\r\n charToByteMapWebSafe_ : null,\r\n\r\n\r\n /**\r\n * Our default alphabet, shared between\r\n * ENCODED_VALS and ENCODED_VALS_WEBSAFE\r\n * @type {string}\r\n */\r\n ENCODED_VALS_BASE : 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',\r\n\r\n /**\r\n * Our default alphabet. Value 64 (=) is special; it means \"nothing.\"\r\n * @type {string}\r\n */\r\n ENCODED_VALS : 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' + '+/=',\r\n\r\n\r\n /**\r\n * Our websafe alphabet.\r\n * @type {string}\r\n */\r\n ENCODED_VALS_WEBSAFE :'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789' + '-_.',\r\n\r\n\r\n encodeByteArray: function(input, opt_webSafe) {\r\n draw2d.util.Base64.init();\r\n\r\n var byteToCharMap = opt_webSafe ? draw2d.util.Base64.byteToCharMapWebSafe_ : draw2d.util.Base64.byteToCharMap_;\r\n\r\n var output = [];\r\n\r\n for (var i = 0; i < input.length; i += 3) {\r\n var byte1 = input[i];\r\n var haveByte2 = i + 1 < input.length;\r\n var byte2 = haveByte2 ? input[i + 1] : 0;\r\n var haveByte3 = i + 2 < input.length;\r\n var byte3 = haveByte3 ? input[i + 2] : 0;\r\n\r\n var outByte1 = byte1 >> 2;\r\n var outByte2 = ((byte1 & 0x03) << 4) | (byte2 >> 4);\r\n var outByte3 = ((byte2 & 0x0F) << 2) | (byte3 >> 6);\r\n var outByte4 = byte3 & 0x3F;\r\n\r\n if (!haveByte3) {\r\n outByte4 = 64;\r\n\r\n if (!haveByte2) {\r\n outByte3 = 64;\r\n }\r\n }\r\n\r\n output.push(byteToCharMap[outByte1],\r\n byteToCharMap[outByte2],\r\n byteToCharMap[outByte3],\r\n byteToCharMap[outByte4]);\r\n }\r\n\r\n return output.join('');\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Base64-encode a string.\r\n *\r\n * @param {string} input A string to encode.\r\n * @param {boolean=} opt_webSafe If true, we should use the alternative alphabet.\r\n * @returns {string} The base64 encoded string.\r\n */\r\n encode: function(input, opt_webSafe) {\r\n return draw2d.util.Base64.encodeByteArray( draw2d.util.Base64.stringToByteArray(input), opt_webSafe);\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Base64-decode a string.\r\n *\r\n * @param {String} input to decode (length not required to be a multiple of 4).\r\n * @param {boolean=} opt_webSafe True if we should use the\r\n * alternative alphabet.\r\n * @returns {Array} bytes representing the decoded value.\r\n */\r\n decode: function(input, opt_webSafe) {\r\n draw2d.util.Base64.init();\r\n\r\n var charToByteMap = opt_webSafe ?draw2d.util.Base64.charToByteMapWebSafe_ : draw2d.util.Base64.charToByteMap_;\r\n\r\n var output = [];\r\n\r\n for (var i = 0; i < input.length; ) {\r\n var byte1 = charToByteMap[input.charAt(i++)];\r\n\r\n var haveByte2 = i < input.length;\r\n var byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;\r\n ++i;\r\n\r\n var haveByte3 = i < input.length;\r\n var byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 0;\r\n ++i;\r\n\r\n var haveByte4 = i < input.length;\r\n var byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 0;\r\n ++i;\r\n\r\n if (byte1 == null || byte2 == null ||\r\n byte3 == null || byte4 == null) {\r\n throw Error();\r\n }\r\n\r\n var outByte1 = (byte1 << 2) | (byte2 >> 4);\r\n output.push(outByte1);\r\n\r\n if (byte3 != 64) {\r\n var outByte2 = ((byte2 << 4) & 0xF0) | (byte3 >> 2);\r\n output.push(outByte2);\r\n\r\n if (byte4 != 64) {\r\n var outByte3 = ((byte3 << 6) & 0xC0) | byte4;\r\n output.push(outByte3);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Turns a string into an array of bytes; a \"byte\" being a JS number in the\r\n * range 0-255.\r\n * @param {string} str String value to arrify.\r\n * @returns {!Array.<number>} Array of numbers corresponding to the\r\n * UCS character codes of each character in str.\r\n */\r\n stringToByteArray: function(str) {\r\n var output = [], p = 0;\r\n for (var i = 0; i < str.length; i++) {\r\n var c = str.charCodeAt(i);\r\n while (c > 0xff) {\r\n output[p++] = c & 0xff;\r\n c >>= 8;\r\n }\r\n output[p++] = c;\r\n }\r\n return output;\r\n },\r\n\r\n init: function() {\r\n if (!draw2d.util.Base64.byteToCharMap_) {\r\n draw2d.util.Base64.byteToCharMap_ = {};\r\n draw2d.util.Base64.charToByteMap_ = {};\r\n draw2d.util.Base64.byteToCharMapWebSafe_ = {};\r\n draw2d.util.Base64.charToByteMapWebSafe_ = {};\r\n\r\n // We want quick mappings back and forth, so we precompute two maps.\r\n for (var i = 0; i < draw2d.util.Base64.ENCODED_VALS.length; i++) {\r\n draw2d.util.Base64.byteToCharMap_[i] = draw2d.util.Base64.ENCODED_VALS.charAt(i);\r\n draw2d.util.Base64.charToByteMap_[draw2d.util.Base64.byteToCharMap_[i]] = i;\r\n draw2d.util.Base64.byteToCharMapWebSafe_[i] = draw2d.util.Base64.ENCODED_VALS_WEBSAFE.charAt(i);\r\n draw2d.util.Base64.charToByteMapWebSafe_[draw2d.util.Base64.byteToCharMapWebSafe_[i]] = i;\r\n }\r\n }\r\n }\r\n};\r\n","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n * Util class to handle colors in the draw2d enviroment.\r\n *\r\n * @example\r\n * // Create a new Color with RGB values\r\n * var color = new draw2d.util.Color(127,0,0);\r\n *\r\n * // of from a hex string\r\n * var color2 = new draw2d.util.Color(\"#f00000\");\r\n *\r\n * // Create a little bit darker color\r\n * var darkerColor = color.darker(0.2); // 20% darker\r\n *\r\n * // create a optimal text color if 'color' the background color\r\n * // (best in meaning of contrast and readability)\r\n * var fontColor = color.getIdealTextColor();\r\n *\r\n * @param {Number|String|draw2d.util.Color|Array} red\r\n * @param {Number} green\r\n * @param {Number} blue\r\n * @param {Number} [alpha]\r\n */\r\ndraw2d.util.Color = Class.extend(\r\n /** @lends draw2d.util.Color */\r\n {\r\n\r\n init: function(red, green, blue, alpha) {\r\n\r\n this.hashString = null;\r\n\r\n if(typeof red === \"undefined\" || red===null){\r\n this.hashString = \"none\";\r\n }\r\n else if(red instanceof draw2d.util.Color){\r\n if(red.hashString===\"none\"){\r\n this.hashString = \"none\";\r\n }\r\n else{\r\n this.red = red.red;\r\n this.green = red.green;\r\n this.blue = red.blue;\r\n this.alpha = red.alpha;\r\n }\r\n }\r\n else if(typeof red === \"string\")\r\n {\r\n if (red === \"none\") {\r\n this.hashString = \"none\";\r\n }\r\n else {\r\n let rgba = this.hex2rgb(red);\r\n this.red = rgba[0];\r\n this.green = rgba[1];\r\n this.blue = rgba[2];\r\n this.alpha = rgba[3];\r\n }\r\n }\r\n // JSON struct of {red:###, green:###, blue:### }\r\n else if(typeof red === \"object\" && typeof red.red===\"number\")\r\n {\r\n this.red= red.red;\r\n this.green = red.green;\r\n this.blue = red.blue;\r\n this.alpha = red.alpha;\r\n }\r\n // array detection 1\r\n else if(red instanceof Array && red.length===3)\r\n {\r\n this.red= red[0];\r\n this.green = red[1];\r\n this.blue = red[2];\r\n this.alpha = red[3];\r\n }\r\n // array detection 2\r\n else if(typeof red === \"object\" && typeof red.length ===\"number\" && red.length===3)\r\n {\r\n this.red= red[0]\r\n this.green = red[1]\r\n this.blue = red[2]\r\n this.alpha = red[3]\r\n }\r\n else\r\n {\r\n this.red= parseInt(red)\r\n this.green = parseInt(green)\r\n this.blue = parseInt(blue)\r\n this.alpha = (typeof alpha === 'undefined')? 1 : parseFloat(alpha)\r\n }\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Convert the color object into a HTML CSS representation\r\n * @returns {String} the color in rgb(##,##,##) representation\r\n **/\r\n getHTMLStyle: function()\r\n {\r\n if(typeof this.red ===\"undefined\")\r\n return \"rgba(0,0,0,0)\";\r\n\r\n return \"rgba(\"+this.red+\",\"+this.green+\",\"+this.blue+\",\"+this.alpha+\")\"\r\n },\r\n\r\n\r\n /**\r\n * \r\n * The red part of the color.\r\n *\r\n * @returns {Number} the [red] part of the color.\r\n **/\r\n getRed: function()\r\n {\r\n return this.red\r\n },\r\n\r\n\r\n /**\r\n * \r\n * The green part of the color.\r\n *\r\n * @returns {Number} the [green] part of the color.\r\n **/\r\n getGreen: function()\r\n {\r\n return this.green;\r\n },\r\n\r\n\r\n /**\r\n * \r\n * The blue part of the color\r\n *\r\n * @returns {Number} the [blue] part of the color.\r\n **/\r\n getBlue: function()\r\n {\r\n return this.blue;\r\n },\r\n\r\n\r\n /**\r\n * \r\n * The alpha part of the color\r\n *\r\n * @returns {Number} the [alpha] part of the color.\r\n **/\r\n getAlpha: function()\r\n {\r\n return this.alpha;\r\n },\r\n\r\n /**\r\n * \r\n * Returns the ideal Text Color. Useful for font color selection by a given background color.\r\n *\r\n * @returns {draw2d.util.Color} The <i>ideal</i> inverse color.\r\n **/\r\n getIdealTextColor: function()\r\n {\r\n let nThreshold = 105;\r\n let bgDelta = (this.red * 0.299) + (this.green * 0.587) + (this.blue * 0.114);\r\n return (255 - bgDelta < nThreshold) ? new draw2d.util.Color(0,0,0) : new draw2d.util.Color(255,255,255);\r\n },\r\n\r\n /**\r\n * return array of [r,g,b,a] from any valid color. if failed returns [0,0,0,1]\r\n *\r\n * @param hexcolor\r\n * @returns {*}\r\n */\r\n hex2rgb: function(color)\r\n {\r\n if (!color) {\r\n return [0, 0, 0, 1]\r\n }\r\n\r\n if (color.toLowerCase() === 'transparent') {\r\n return [0, 0, 0, 0]\r\n }\r\n\r\n if (color[0] === '#'){\r\n if (color.length < 7){\r\n // convert #RGB and #RGBA to #RRGGBB and #RRGGBBAA\r\n color = '#' + color[1] + color[1] + color[2] + color[2] + color[3] + color[3] + (color.length > 4 ? color[4] + color[4] : '');\r\n }\r\n return [parseInt(color.substr(1, 2), 16),\r\n parseInt(color.substr(3, 2), 16),\r\n parseInt(color.substr(5, 2), 16),\r\n color.length > 7 ? parseInt(color.substr(7, 2), 16)/255 : 1]\r\n }\r\n\r\n if (color.indexOf('rgb') === -1){\r\n // convert named colors\r\n let temp_elem = document.body.appendChild(document.createElement('fictum')); // intentionally use unknown tag to lower chances of css rule override with !important\r\n let flag = 'rgb(1, 2, 3)' // this flag tested on chrome 59, ff 53, ie9, ie10, ie11, edge 14\r\n temp_elem.style.color = flag\r\n if (temp_elem.style.color !== flag) {\r\n return [0, 0, 0, 1] // color set failed - some monstrous css rule is probably taking over the color of our object\r\n }\r\n temp_elem.style.color = color\r\n\r\n if (temp_elem.style.color === flag || temp_elem.style.color === '') {\r\n return [0, 0, 0, 1] // color parse failed\r\n }\r\n color = getComputedStyle(temp_elem).color\r\n document.body.removeChild(temp_elem)\r\n }\r\n\r\n if (color.indexOf('rgb') === 0) {\r\n if (color.indexOf('rgba') === -1) {\r\n color += ',1'; // convert 'rgb(R,G,B)' to 'rgb(R,G,B)A' which looks awful but will pass the regxep below\r\n }\r\n return color.match(/[\\.\\d]+/g).map( a => +a);\r\n }\r\n },\r\n\r\n /**\r\n *\r\n **/\r\n hex: function()\r\n {\r\n return(\r\n this.int2hex(this.red)+\r\n this.int2hex(this.green)+\r\n this.int2hex(this.blue)\r\n // breaks raphaelJS...so don'T use it right now\r\n //(this.alpha * 255).toString(16).substring(0,2).toUpperCase()\r\n );\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Convert the color object into a HTML CSS representation\r\n * @returns {String} the color in rgb(##,##,##) representation\r\n **/\r\n rgba: function()\r\n {\r\n return this.getHTMLStyle()\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Convert the color object into a HTML CSS representation\r\n * @returns {String} the color in #RRGGBB representation\r\n **/\r\n hash: function()\r\n {\r\n if(this.hashString===null){\r\n this.hashString= \"#\"+this.hex();\r\n }\r\n return this.hashString;\r\n },\r\n\r\n /**\r\n * @private\r\n */\r\n int2hex: function(v)\r\n {\r\n v=Math.round(Math.min(Math.max(0,v),255));\r\n return(\"0123456789ABCDEF\".charAt((v-v%16)/16)+\"0123456789ABCDEF\".charAt(v%16));\r\n },\r\n\r\n /**\r\n * \r\n * Returns a darker color of the given one. The original color is unchanged.\r\n *\r\n * @param {Number} fraction Darkness fraction between [0..1].\r\n * @return{draw2d.util.Color} Darker color.\r\n */\r\n darker: function(fraction)\r\n {\r\n // we can't \"darker\" a undefined color. In this case we return the undefnied color itself\r\n //\r\n if(this.hashString===\"none\")\r\n return this;\r\n\r\n fraction = (typeof fraction === 'undefined') ? 0.1 : fraction;\r\n\r\n let red = parseInt(Math.round (this.getRed() * (1.0 - fraction)));\r\n let green = parseInt(Math.round (this.getGreen() * (1.0 - fraction)));\r\n let blue = parseInt(Math.round (this.getBlue() * (1.0 - fraction)));\r\n\r\n if (red < 0) red = 0; else if (red > 255) red = 255;\r\n if (green < 0) green = 0; else if (green > 255) green = 255;\r\n if (blue < 0) blue = 0; else if (blue > 255) blue = 255;\r\n\r\n return new draw2d.util.Color(red, green, blue, this.alpha);\r\n },\r\n\r\n\r\n /**\r\n * \r\n * Make a color lighter. The original color is unchanged.\r\n *\r\n * @param {Number} fraction lighter fraction between [0..1].\r\n * @returns {draw2d.util.Color} Lighter color.\r\n */\r\n lighter: function( fraction)\r\n {\r\n // we can't \"lighter\" a undefined color. In this case we return the undefined color itself\r\n //\r\n if(this.hashString===\"none\")\r\n return this;\r\n\r\n fraction = (typeof fraction === 'undefined') ? 0.1 : fraction;\r\n\r\n let red = parseInt(Math.round (this.getRed() * (1.0 + fraction)));\r\n let green = parseInt(Math.round (this.getGreen() * (1.0 + fraction)));\r\n let blue = parseInt(Math.round (this.getBlue() * (1.0 + fraction)));\r\n\r\n if (red < 0) red = 0; else if (red > 255) red = 255;\r\n if (green < 0) green = 0; else if (green > 255) green = 255;\r\n if (blue < 0) blue = 0; else if (blue > 255) blue = 255;\r\n\r\n return new draw2d.util.Color(red, green, blue, this.alpha);\r\n },\r\n\r\n /**\r\n * \r\n * Return a new color wich is faded to the given color.\r\n * @param {draw2d.util.Color} color\r\n * @param {Number} pc the fade percentage in [0..1]\r\n * @returns {draw2d.util.Color}\r\n *\r\n * @since 2.1.0\r\n */\r\n fadeTo: function(color, pc){\r\n\r\n let r= Math.floor(this.red+(pc*(color.red-this.red)) + .5);\r\n let g= Math.floor(this.green+(pc*(color.green-this.green)) + .5);\r\n let b= Math.floor(this.blue+(pc*(color.blue-this.blue)) + .5);\r\n let a= Math.floor(this.alpha+(pc*(color.alpha-this.alpha)) + .5);\r\n\r\n return new draw2d.util.Color(r,g,b,a);\r\n },\r\n\r\n\t/**\r\n\t * \r\n\t * Compares two color objects\r\n\t *\r\n\t * @param {draw2d.util.Color} o\r\n\t * @returns {Boolean}\r\n\t **/\r\n\tequals: function( o)\r\n\t{\r\n\t\tif(!(o instanceof draw2d.util.Color)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn this.rgba()===o.rgba();\r\n\t}\r\n\r\n});\r\n\r\nexport default draw2d.util.Color;\r\n","\r\n\r\n/*!\r\n * JavaScript Debug - v0.4 - 6/22/2010\r\n * http://benalman.com/projects/javascript-debug-console-log/\r\n *\r\n * Copyright (c) 2010 \"Cowboy\" Ben Alman\r\n * Dual licensed under the MIT and GPL licenses.\r\n * http://benalman.com/about/license/\r\n *\r\n * With lots of help from Paul Irish!\r\n * http://paulirish.com/\r\n */\r\n// Script: JavaScript Debug: A simple wrapper for console.log\r\n//\r\n// *Version: 0.4, Last Updated: 6/22/2010*\r\n//\r\n// Tested with Internet Explorer 6-8, Firefox 3-3.6, Safari 3-4, Chrome 3-5, Opera 9.6-10.5\r\n//\r\n// Home - http://benalman.com/projects/javascript-debug-console-log/\r\n// GitHub - http://github.com/cowboy/javascript-debug/\r\n// Source - http://github.com/cowboy/javascript-debug/raw/master/ba-debug.js\r\n// (Minified) - http://github.com/cowboy/javascript-debug/raw/master/ba-debug.min.js (1.1kb)\r\n//\r\n// About: License\r\n//\r\n// Copyright (c) 2010 \"Cowboy\" Ben Alman,\r\n// Dual licensed under the MIT and GPL licenses.\r\n// http://benalman.com/about/license/\r\n//\r\n// About: Support and Testing\r\n//\r\n// Information about what browsers this code has been tested in.\r\n//\r\n// Browsers Tested - Internet Explorer 6-8, Firefox 3-3.6, Safari 3-4, Chrome\r\n// 3-5, Opera 9.6-10.5\r\n//\r\n// About: Examples\r\n//\r\n// These working examples, complete with fully commented code, illustrate a few\r\n// ways in which this plugin can be used.\r\n//\r\n// Examples - http://benalman.com/code/projects/javascript-debug/examples/debug/\r\n//\r\n// About: Revision History\r\n//\r\n// 0.4 - (6/22/2010) Added missing passthrough methods: exception,\r\n// groupCollapsed, table\r\n// 0.3 - (6/8/2009) Initial release\r\n//\r\n// Topic: Pass-through console methods\r\n//\r\n// assert, clear, count, dir, dirxml, exception, group, groupCollapsed,\r\n// groupEnd, profile, profileEnd, table, time, timeEnd, trace\r\n//\r\n// These console methods are passed through (but only if both the console and\r\n// the method exists), so use them without fear of reprisal. Note that these\r\n// methods will not be passed through if the logging level is set to 0 via\r\n// <debug.setLevel>.\r\n\r\nwindow.debug = (function(){\r\n var window = this,\r\n\r\n // Some convenient shortcuts.\r\n aps = Array.prototype.slice,\r\n con = console,\r\n\r\n // Public object to be returned.\r\n that = {},\r\n\r\n callback_func,\r\n callback_force,\r\n\r\n // Default logging level, show everything.\r\n log_level = 9,\r\n\r\n // Logging methods, in \"priority order\". Not all console implementations\r\n // will utilize these, but they will be used in the callback passed to\r\n // setCallback.\r\n log_methods = [ 'error', 'warn', 'info', 'debug', 'log' ],\r\n\r\n // Pass these methods through to the console if they exist, otherwise just\r\n // fail gracefully. These methods are provided for convenience.\r\n pass_methods = 'assert clear count dir dirxml exception group groupCollapsed groupEnd profile profileEnd table time timeEnd trace'.split(' '),\r\n idx = pass_methods.length,\r\n\r\n // Logs are stored here so that they can be recalled as necessary.\r\n logs = [];\r\n\r\n while ( --idx >= 0 ) {\r\n (function( method ){\r\n\r\n // Generate pass-through methods. These methods will be called, if they\r\n // exist, as long as the logging level is non-zero.\r\n that[ method ] = function() {\r\n log_level !== 0 && con && con[ method ]\r\n && con[ method ].apply( con, arguments );\r\n };\r\n\r\n })( pass_methods[idx] );\r\n }\r\n\r\n idx = log_methods.length;\r\n while ( --idx >= 0 ) {\r\n (function( idx, level ){\r\n\r\n // Method: debug.log\r\n //\r\n // Call the console.log method if available. Adds an entry into the logs\r\n // array for a callback specified via <debug.setCallback>.\r\n //\r\n // Usage:\r\n //\r\n // debug.log( object [, object, ...] ); - -\r\n //\r\n // Arguments:\r\n //\r\n // object - (Object) Any valid JavaScript object.\r\n\r\n // Method: debug.debug\r\n //\r\n // Call the console.debug method if available, otherwise call console.log.\r\n // Adds an entry into the logs array for a callback specified via\r\n // <debug.setCallback>.\r\n //\r\n // Usage:\r\n //\r\n // debug.debug( object [, object, ...] ); - -\r\n //\r\n // Arguments:\r\n //\r\n // object - (Object) Any valid JavaScript object.\r\n\r\n // Method: debug.info\r\n //\r\n // Call the console.info method if available, otherwise call console.log.\r\n // Adds an entry into the logs array for a callback specified via\r\n // <debug.setCallback>.\r\n //\r\n // Usage:\r\n //\r\n // debug.info( object [, object, ...] ); - -\r\n //\r\n // Arguments:\r\n //\r\n // object - (Object) Any valid JavaScript object.\r\n\r\n // Method: debug.warn\r\n //\r\n // Call the console.warn method if available, otherwise call console.log.\r\n // Adds an entry into the logs array for a callback specified via\r\n // <debug.setCallback>.\r\n //\r\n // Usage:\r\n //\r\n // debug.warn( object [, object, ...] ); - -\r\n //\r\n // Arguments:\r\n //\r\n // object - (Object) Any valid JavaScript object.\r\n\r\n // Method: debug.error\r\n //\r\n // Call the console.error method if available, otherwise call console.log.\r\n // Adds an entry into the logs array for a callback specified via\r\n // <debug.setCallback>.\r\n //\r\n // Usage:\r\n //\r\n // debug.error( object [, object, ...] ); - -\r\n //\r\n // Arguments:\r\n //\r\n // object - (Object) Any valid JavaScript object.\r\n\r\n that[ level ] = function() {\r\n var args = aps.call( arguments ),\r\n log_arr = [ level ].concat( args );\r\n\r\n logs.push( log_arr );\r\n exec_callback( log_arr );\r\n\r\n if ( !con || !is_level( idx ) ) { return; }\r\n\r\n con.firebug ? con[ level ].apply( window, args )\r\n : con[ level ] ? con[ level ]( args )\r\n : con.log( args );\r\n };\r\n\r\n })( idx, log_methods[idx] );\r\n }\r\n\r\n // Execute the callback function if set.\r\n function exec_callback( args ) {\r\n if ( callback_func && (callback_force || !con || !con.log) ) {\r\n callback_func.apply( window, args );\r\n }\r\n };\r\n\r\n // Method: debug.setLevel\r\n //\r\n // Set a minimum or maximum logging level for the console. Doesn't affect\r\n // the <debug.setCallback> callback function, but if set to 0 to disable\r\n // logging, <Pass-through console methods> will be disabled as well.\r\n //\r\n // Usage:\r\n //\r\n // debug.setLevel( [ level ] ) - -\r\n //\r\n // Arguments:\r\n //\r\n // level - (Number) If 0, disables logging. If negative, shows N lowest\r\n // priority levels of log messages. If positive, shows N highest priority\r\n // levels of log messages.\r\n //\r\n // Priority levels:\r\n //\r\n // log (1) < debug (2) < info (3) < warn (4) < error (5)\r\n\r\n that.setLevel = function( level ) {\r\n log_level = typeof level === 'number' ? level : 9;\r\n };\r\n\r\n // Determine if the level is visible given the current log_level.\r\n function is_level( level ) {\r\n return log_level > 0\r\n ? log_level > level\r\n : log_methods.length + log_level <= level;\r\n };\r\n\r\n // Method: debug.setCallback\r\n //\r\n // Set a callback to be used if logging isn't possible due to console.log\r\n // not existing. If unlogged logs exist when callback is set, they will all\r\n // be logged immediately unless a limit is specified.\r\n //\r\n // Usage:\r\n //\r\n // debug.setCallback( callback [, force ] [, limit ] )\r\n //\r\n // Arguments:\r\n //\r\n // callback - (Function) The aforementioned callback function. The first\r\n // argument is the logging level, and all subsequent arguments are those\r\n // passed to the initial debug logging method.\r\n // force - (Boolean) If false, log to console.log if available, otherwise\r\n // callback. If true, log to both console.log and callback.\r\n // limit - (Number) If specified, number of lines to limit initial scrollback\r\n // to.\r\n\r\n that.setCallback = function() {\r\n var args = aps.call( arguments ),\r\n max = logs.length,\r\n i = max;\r\n\r\n callback_func = args.shift() || null;\r\n callback_force = typeof args[0] === 'boolean' ? args.shift() : false;\r\n\r\n i -= typeof args[0] === 'number' ? args.shift() : max;\r\n\r\n while ( i < max ) {\r\n exec_callback( logs[i++] );\r\n }\r\n };\r\n\r\n return that;\r\n})();\r\n\r\n","import draw2d from '../packages'\r\n\r\n\r\ndraw2d.util.JSON = {\r\n\r\n /**\r\n * \r\n * Given a dot deliminated string set will create an object\r\n * based on the structure of the string with the desired value\r\n *\r\n * @param {Object} data the json object to modify\r\n * @param {String} path path indicating where value should be placed\r\n * @param {Object} value the value desired to be set at the location determined by path\r\n */\r\n set: function(data, path, value) {\r\n if(!path || path===''){\r\n return;\r\n }\r\n\r\n let re = /[\\w-]+|\\[\\]|([^\\[[\\w]\\]]|[\"'](.*?)['\"])/g;\r\n // parse path on dots, and brackets\r\n let pathList = path.match(re);\r\n let parent = data;\r\n let parentKey;\r\n let grandParent = null;\r\n let grandParentKey = null;\r\n\r\n let addObj = function(obj, key, data) {\r\n if(key === '[]') {\r\n obj.push(data);\r\n } else {\r\n obj[key] = data;\r\n }\r\n };\r\n\r\n while(pathList.length > 0) {\r\n parentKey = pathList.shift().replace(/[\"']/g, '');\r\n\r\n // Number, treat it as an array\r\n if (!isNaN(+parentKey) || parentKey === \"[]\") {\r\n if(parent.constructor !== Array ) {\r\n parent = [];\r\n addObj(grandParent, grandParentKey, parent);\r\n }\r\n // String, treat it as a key\r\n }\r\n else if (typeof parentKey===\"string\") {\r\n if(!$.isPlainObject(parent)) {\r\n parent = {};\r\n addObj(grandParent, grandParentKey, parent);\r\n }\r\n }\r\n // Next\r\n grandParent = parent;\r\n grandParentKey = parentKey;\r\n parent = parent[parentKey];\r\n }\r\n\r\n addObj(grandParent, grandParentKey, value);\r\n },\r\n\r\n /**\r\n * \r\n * Returns the value defined by the path passed in\r\n *\r\n * @param {Object} data the JSON data object\r\n * @param {String} path string leading to a desired value\r\n */\r\n get: function(data, path) {\r\n let regex = /[\\w-]+|\\[\\]|([^\\[[\\w]\\]]|[\"'](.*?)['\"])/g;\r\n //check if path is truthy\r\n if (!path){\r\n return undefined;\r\n }\r\n //parse path on dots and brackets\r\n let paths = path.match(regex);\r\n //step through data object until all keys in path have been processed\r\n while (data !== null && paths.length > 0) {\r\n if(data.propertyIsEnumerable(paths[0].replace(/\"/g, ''))){\r\n data = data[paths.shift().replace(/\"/g, '')];\r\n }\r\n else{\r\n return undefined;\r\n }\r\n }\r\n return data;\r\n },\r\n\r\n /**\r\n * \r\n * calculates the diff between the given json objects\r\n *\r\n */\r\n diff: function(obj1, obj2) {\r\n let result = {};\r\n for(let key in obj1) {\r\n let v1 = obj1[key];\r\n let v2 = obj2[key];\r\n if(v1 !== v2) {\r\n \tif(v1.equals ){\r\n \t\tif(!v1.equals(v2)){\r\n \t\t\tresult[key] = obj1[key];\r\n \t\t}\r\n \t}\r\n \telse{\r\n \t\t\tresult[key] = obj1[key];\r\n \t}\r\n }\r\n }\r\n return result;\r\n },\r\n\r\n flatDiff: function(obj1, obj2) {\r\n let result = {};\r\n for(let key in obj1) {\r\n if(obj1[key] !== obj2[key]) {\r\n result[key] = obj1[key];\r\n }\r\n }\r\n return result;\r\n },\r\n\r\n ensureDefault:function( json, attribute, value)\r\n {\r\n if (!json.hasOwnProperty(attribute)) {\r\n json[attribute] = value;\r\n }\r\n }\r\n};\r\n\r\nexport default draw2d.util.JSON;\r\n","// avoid iPad bounce effect during DragDrop//\r\ndocument.ontouchmove = function(e){e.preventDefault();};\r\n\r\n\r\n","\r\n// extending raphael with a polygon function\r\nRaphael.fn.polygon = function(pointString) {\r\n var poly = ['M'];\r\n var point = pointString.split(' ');\r\n \r\n for(var i=0; i < point.length; i++) {\r\n var c = point[i].split(',');\r\n for(var j=0; j < c.length; j++) {\r\n var d = parseFloat(c[j]);\r\n if (!isNaN(d))\r\n poly.push(d);\r\n };\r\n if (i == 0)\r\n poly.push('L');\r\n }\r\n poly.push('Z');\r\n \r\n return this.path(poly);\r\n};","import draw2d from '../packages'\r\n\r\n/**\r\n * @class\r\n * Generates a (pseudo) UUID's\r\n *\r\n * @example\r\n * // a UUID in the format\r\n * // xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12)\r\n * var id = draw2d.util.UUID.create();\r\n *\r\n * @author Andreas Herz\r\n */\r\ndraw2d.util.UUID = {\r\n /**\r\n *\r\n * Generates a unique id.<br>\r\n * But just for the correctness: <strong>this is no Global Unique Identifier</strong>, it is just a random generator\r\n * with the output that looks like a GUID. <br>\r\n * But may be also useful.\r\n *\r\n * @returns {String} the UUID in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12)\r\n **/\r\n create: function () {\r\n let segment = function () {\r\n return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1)\r\n }\r\n return (segment() + segment() + \"-\" + segment() + \"-\" + segment() + \"-\" + segment() + \"-\" + segment() + segment() + segment())\r\n }\r\n}\r\n\r\nexport default draw2d.util.UUID\r\n","\r\n\r\n// Pass in the objects to merge as arguments.// For a deep extend, set the first argument to `true`.\r\nlet fn = function () {\r\n\r\n // Variables\r\n let extended = {}\r\n let deep = false\r\n let i = 0\r\n let length = arguments.length\r\n\r\n // Check if a deep merge\r\n if ( Object.prototype.toString.call( arguments[0] ) === '[object Boolean]' ) {\r\n deep = arguments[0]\r\n i++\r\n }\r\n\r\n // Merge the object into the extended object\r\n /**\r\n *\r\n * @param obj\r\n */\r\n let merge = function (obj) {\r\n for ( let prop in obj ) {\r\n if ( Object.prototype.hasOwnProperty.call( obj, prop ) ) {\r\n // If deep merge and property is an object, merge properties\r\n if ( deep && Object.prototype.toString.call(obj[prop]) === '[object Object]' ) {\r\n extended[prop] = extend( true, extended[prop], obj[prop] )\r\n } else {\r\n extended[prop] = obj[prop]\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Loop through each object and conduct a merge\r\n for ( ; i < length; i++ ) {\r\n let obj = arguments[i]\r\n merge(obj)\r\n }\r\n\r\n return extended\r\n\r\n}\r\nmodule.exports = fn\r\nglobal.extend = fn\r\n","/**\r\n * adding support method to check if the node is already visible\r\n **/\r\n(function() {\r\n Raphael.el.isVisible = function() {\r\n return (this.node.style.display !== \"none\");\r\n }\r\n})();\r\n","\r\n\r\n/**\r\n * @class\r\n *\r\n * A bezier spline object.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.util.spline.Spline\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.util.spline.BezierSpline = draw2d.util.spline.Spline.extend(\r\n\r\n /** @lends draw2d.util.spline.BezierSpline.prototype */\r\n {\r\n \r\n NAME: \"draw2d.util.spline.BezierSpline\",\r\n\r\n /**\r\n */\r\n init: function()\r\n {\r\n this._super();\r\n },\r\n\r\n\r\n\r\n /**\r\n * Create a spline based on the given control points.\r\n * The generated curve starts in the first control point and ends\r\n * in the last control point.\r\n *\r\n * @param {Array} controlPoints Control points of spline (x0,y0,z0,x1,y1,z1,...).\r\n * @param {Number} parts Number of parts to divide each leg into.\r\n *\r\n * @returns {Array} the new generated array with new draw2d.geo.Point\r\n */\r\n generate: function(controlPoints, parts)\r\n {\r\n var n = controlPoints.getSize();\r\n // This implementation of an bezier Spline needs at least 4 control points. Return the \r\n // original point if they do not meet them\r\n if(n<4) {\r\n return controlPoints.clone(true)\r\n }\r\n\r\n var spline = new draw2d.util.ArrayList();\r\n\r\n spline.add(this.p(0, 0, controlPoints));\r\n\r\n for (var i = 0; i < n - 3; i += 3) {\r\n for (var j = 1; j <= parts; j++) {\r\n spline.add(this.p (i, j / parts, controlPoints));\r\n }\r\n }\r\n return spline;\r\n },\r\n\r\n p: function( i, t, cp)\r\n {\r\n var x = 0.0;\r\n var y = 0.0;\r\n\r\n var k = i;\r\n for (var j = 0; j <= 3; j++) {\r\n var b = this.blend (j, t);\r\n var p = cp.get(k++);\r\n x += b * p.x;\r\n y += b * p.y;\r\n }\r\n\r\n return new draw2d.geo.Point( x, y);\r\n },\r\n\r\n blend: function ( i, t)\r\n {\r\n if (i == 0) return (1 - t) * (1 - t) * (1 - t);\r\n else if (i == 1) return 3 * t * (1 - t) * (1 - t);\r\n else if (i == 2) return 3 * t * t * (1 - t);\r\n else return t * t * t;\r\n }\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A catmull-rom spline object.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.util.spline.CubicSpline\r\n */\r\ndraw2d.util.spline.CatmullRomSpline = draw2d.util.spline.CubicSpline.extend(\r\n\r\n /** @lends draw2d.util.spline.CatmullRomSpline.prototype */\r\n {\r\n \r\n NAME: \"draw2d.util.spline.CatmullRomSpline\",\r\n\r\n /**\r\n */\r\n init: function()\r\n {\r\n this._super();\r\n },\r\n\r\n\r\n blend: function(i, t) \r\n {\r\n if (i == -2)\r\n return ((-t + 2) * t - 1) * t / 2;\r\n else if (i == -1)\r\n return (((3 * t - 5) * t) * t + 2) / 2;\r\n else if (i == 0)\r\n return ((-3 * t + 4) * t + 1) * t / 2;\r\n else\r\n return ((t - 1) * t * t) / 2;\r\n }\r\n\r\n});\r\n","import draw2d from '../../packages'\r\n\r\n\r\n/**\r\n * @class\r\n *\r\n * A cubic spline object.\r\n *\r\n * @inheritable\r\n * @author Andreas Herz\r\n *\r\n * @extends draw2d.util.spline.Spline\r\n */\r\ndraw2d.util.spline.CubicSpline = draw2d.util.spline.Spline.extend(\r\n\r\n /** @lends draw2d.util.spline.CubicSpline.prototype */\r\n {\r\n \r\n NAME: \"draw2d.util.spline.CubicSpline\",\r\n\r\n /**\r\n */\r\n init: function()\r\n {\r\n this._super();\r\n },\r\n\r\n\r\n /**\r\n * Create a spline based on the given control points.\r\n * The generated curve starts in the first control point and ends\r\n * in the last control point.\r\n *\r\n * @param {Array} controlPoints Control points of spline (x0,y0,z0,x1,y1,z1,...).\r\n * @param {Number} parts Number of parts to divide each leg into.\r\n *\r\n * @returns {Array} the new generated array with new draw2d.geo.Point\r\n */\r\n generate: function(controlPoints, parts)\r\n {\r\n // This implementation of an cubic spline needs at least 3 control points. Return the \r\n // original point if they do not meet them\r\n if(n<3) {\r\n return controlPoints.clone(true)\r\n }\r\n\r\n // Endpoints are added twice to get them include in the\r\n // generated array\r\n var cp = new draw2d.util.ArrayList();\r\n cp.add(controlPoints.get(0));\r\n cp.addAll(controlPoints);\r\n cp.add(controlPoints.get(controlPoints.getSize()-1));\r\n\r\n var n = cp.getSize();\r\n var spline = new draw2d.util.ArrayList();\r\n spline.add(controlPoints.get(0));\r\n spline.add( this.p(1, 0, cp) );\r\n\r\n for (var i = 1; i < n - 2; i++) {\r\n for (var j = 1; j <= parts; j++) {\r\n spline.add( this.p(i, j / parts, cp));\r\n }\r\n }\r\n spline.add(controlPoints.get(controlPoints.getSize()-1));\r\n\r\n return spline;\r\n },\r\n\r\n\r\n p: function( i, t, cp)\r\n {\r\n var x = 0.0;\r\n var y = 0.0;\r\n\r\n var k = i-1;\r\n for (var j = -2; j <= 1; j++) {\r\n var b = this.blend (j, t);\r\n var p = cp.get(k++);\r\n if(!p){\r\n console.log(\"error\")\r\n }\r\n x += b * p.x;\r\n y += b * p.y;\r\n }\r\n\r\n return new draw2d.geo.Point(x, y);\r\n },\r\n\r\n blend: function(i, t)\r\n {\r\n if (i === -2)\r\n return (((-t + 3) * t - 3) * t + 1) / 6;\r\n else if (i === -1)\r\n return (((3 * t - 6) * t) * t + 4) / 6;\r\n else if (i === 0)\r\n return (((-3 * t + 3) * t + 3) * t + 1) / 6;\r\n\r\n return (t * t * t) / 6;\r\n }\r\n\r\n});\r\n","\r\n/**\r\n * @class\r\n *\r\n * An abstract class defining a general spline object.\r\n */\r\nimport draw2d from '../../packages'\r\n\r\ndraw2d.util.spline.Spline = Class.extend(\r\n /** @lends draw2d.util.spline.Spline.prototype */\r\n {\r\n \r\n NAME: \"draw2d.util.spline.Spline\",\r\n\r\n /**\r\n */\r\n init: function()\r\n {\r\n },\r\n\r\n /**\r\n * Create a spline based on the given control points.\r\n * The generated curve starts in the first control point and ends\r\n * in the last control point.\r\n *\r\n * @param {Array} controlPoints Control points of spline (x0,y0,z0,x1,y1,z1,...).\r\n * @param {Number} parts Number of parts to divide each leg into.\r\n **/\r\n generate: function(controlPoints, parts){\r\n throw \"inherit classes must implement the method 'draw2d.util.spline.Spline.generate()'\";\r\n }\r\n\r\n});\r\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `\r\n\r\n/*!\r\n * jQuery contextMenu - Plugin for simple contextMenu handling\r\n *\r\n * Version: 1.5.24\r\n *\r\n * Authors: Rodney Rehm, Addy Osmani (patches for FF)\r\n * Web: http://medialize.github.com/jQuery-contextMenu/\r\n *\r\n * Licensed under\r\n * MIT License http://www.opensource.org/licenses/mit-license\r\n * GPL v3 http://opensource.org/licenses/GPL-3.0\r\n *\r\n */\r\n.context-menu-list {\r\n margin:0;\r\n padding:0;\r\n\r\n min-width: 120px;\r\n max-width: 250px;\r\n display: inline-block;\r\n position: absolute;\r\n list-style-type: none;\r\n\r\n border: 1px solid #DDD;\r\n background: #EEE;\r\n\r\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\r\n\r\n font-family: Verdana, Arial, Helvetica, sans-serif;\r\n font-size: 11px;\r\n}\r\n\r\n.context-menu-item {\r\n padding: 2px 2px 2px 24px;\r\n background-color: #EEE;\r\n position: relative;\r\n -webkit-user-select: none;\r\n -moz-user-select: -moz-none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n}\r\n\r\n.context-menu-separator {\r\n padding-bottom:0;\r\n border-bottom: 1px solid #DDD;\r\n}\r\n\r\n.context-menu-item > label > input,\r\n.context-menu-item > label > textarea {\r\n -webkit-user-select: text;\r\n -moz-user-select: text;\r\n -ms-user-select: text;\r\n user-select: text;\r\n}\r\n\r\n.context-menu-item.hover {\r\n cursor: pointer;\r\n background-color: #39F;\r\n}\r\n\r\n.context-menu-item.disabled {\r\n color: #666;\r\n}\r\n\r\n.context-menu-input.hover,\r\n.context-menu-item.disabled.hover {\r\n cursor: default;\r\n background-color: #EEE;\r\n}\r\n\r\n.context-menu-submenu:after {\r\n content: \">\";\r\n color: #666;\r\n position: absolute;\r\n top: 0;\r\n right: 3px;\r\n z-index: 1;\r\n}\r\n\r\n/* icons\r\n #protip:\r\n In case you want to use sprites for icons (which I would suggest you do) have a look at\r\n http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement\r\n .context-menu-item.icon:before {}\r\n */\r\n.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }\r\n\r\n/* vertically align inside labels */\r\n.context-menu-input > label > * { vertical-align: top; }\r\n\r\n/* position checkboxes and radios as icons */\r\n.context-menu-input > label > input[type=\"checkbox\"],\r\n.context-menu-input > label > input[type=\"radio\"] {\r\n margin-left: -17px;\r\n}\r\n.context-menu-input > label > span {\r\n margin-left: 5px;\r\n}\r\n\r\n.context-menu-input > label,\r\n.context-menu-input > label > input[type=\"text\"],\r\n.context-menu-input > label > textarea,\r\n.context-menu-input > label > select {\r\n display: block;\r\n width: 100%;\r\n\r\n -webkit-box-sizing: border-box;\r\n -moz-box-sizing: border-box;\r\n -ms-box-sizing: border-box;\r\n -o-box-sizing: border-box;\r\n box-sizing: border-box;\r\n}\r\n\r\n.context-menu-input > label > textarea {\r\n height: 100px;\r\n}\r\n.context-menu-item > .context-menu-list {\r\n display: none;\r\n /* re-positioned by js */\r\n right: -5px;\r\n top: 5px;\r\n}\r\n\r\n.context-menu-item.hover > .context-menu-list {\r\n display: block;\r\n}\r\n\r\n.context-menu-accesskey {\r\n text-decoration: underline;\r\n}\r\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/css/contextmenu.css\"],\"names\":[],\"mappings\":\";;AAEA;;;;;;;;;;;;EAYE;AACF;IACI,QAAQ;IACR,SAAS;;IAET,gBAAgB;IAChB,gBAAgB;IAChB,qBAAqB;IACrB,kBAAkB;IAClB,qBAAqB;;IAErB,sBAAsB;IACtB,gBAAgB;;IAEhB,gDAAgD;OAC7C,6CAA6C;QAC5C,4CAA4C;SAC3C,2CAA2C;YACxC,wCAAwC;;IAEhD,kDAAkD;IAClD,eAAe;AACnB;;AAEA;IACI,yBAAyB;IACzB,sBAAsB;IACtB,kBAAkB;IAClB,yBAAyB;OACtB,2BAA2B;QAC1B,qBAAqB;YACjB,iBAAiB;AAC7B;;AAEA;IACI,gBAAgB;IAChB,6BAA6B;AACjC;;AAEA;;IAEI,yBAAyB;OACtB,sBAAsB;QACrB,qBAAqB;YACjB,iBAAiB;AAC7B;;AAEA;IACI,eAAe;IACf,sBAAsB;AAC1B;;AAEA;IACI,WAAW;AACf;;AAEA;;IAEI,eAAe;IACf,sBAAsB;AAC1B;;AAEA;IACI,YAAY;IACZ,WAAW;IACX,kBAAkB;IAClB,MAAM;IACN,UAAU;IACV,UAAU;AACd;;AAEA;;;;;EAKE;AACF,0BAA0B,gBAAgB,EAAE,4BAA4B,EAAE,4BAA4B,EAAE;;AAExG,mCAAmC;AACnC,kCAAkC,mBAAmB,EAAE;;AAEvD,4CAA4C;AAC5C;;IAEI,kBAAkB;AACtB;AACA;IACI,gBAAgB;AACpB;;AAEA;;;;IAII,cAAc;IACd,WAAW;;IAEX,8BAA8B;OAC3B,2BAA2B;QAC1B,0BAA0B;SACzB,yBAAyB;YACtB,sBAAsB;AAClC;;AAEA;IACI,aAAa;AACjB;AACA;IACI,aAAa;IACb,wBAAwB;IACxB,WAAW;IACX,QAAQ;AACZ;;AAEA;IACI,cAAc;AAClB;;AAEA;IACI,0BAA0B;AAC9B\",\"sourcesContent\":[\"\\r\\n\\r\\n/*!\\r\\n * jQuery contextMenu - Plugin for simple contextMenu handling\\r\\n *\\r\\n * Version: 1.5.24\\r\\n *\\r\\n * Authors: Rodney Rehm, Addy Osmani (patches for FF)\\r\\n * Web: http://medialize.github.com/jQuery-contextMenu/\\r\\n *\\r\\n * Licensed under\\r\\n * MIT License http://www.opensource.org/licenses/mit-license\\r\\n * GPL v3 http://opensource.org/licenses/GPL-3.0\\r\\n *\\r\\n */\\r\\n.context-menu-list {\\r\\n margin:0;\\r\\n padding:0;\\r\\n\\r\\n min-width: 120px;\\r\\n max-width: 250px;\\r\\n display: inline-block;\\r\\n position: absolute;\\r\\n list-style-type: none;\\r\\n\\r\\n border: 1px solid #DDD;\\r\\n background: #EEE;\\r\\n\\r\\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n -ms-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n -o-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);\\r\\n\\r\\n font-family: Verdana, Arial, Helvetica, sans-serif;\\r\\n font-size: 11px;\\r\\n}\\r\\n\\r\\n.context-menu-item {\\r\\n padding: 2px 2px 2px 24px;\\r\\n background-color: #EEE;\\r\\n position: relative;\\r\\n -webkit-user-select: none;\\r\\n -moz-user-select: -moz-none;\\r\\n -ms-user-select: none;\\r\\n user-select: none;\\r\\n}\\r\\n\\r\\n.context-menu-separator {\\r\\n padding-bottom:0;\\r\\n border-bottom: 1px solid #DDD;\\r\\n}\\r\\n\\r\\n.context-menu-item > label > input,\\r\\n.context-menu-item > label > textarea {\\r\\n -webkit-user-select: text;\\r\\n -moz-user-select: text;\\r\\n -ms-user-select: text;\\r\\n user-select: text;\\r\\n}\\r\\n\\r\\n.context-menu-item.hover {\\r\\n cursor: pointer;\\r\\n background-color: #39F;\\r\\n}\\r\\n\\r\\n.context-menu-item.disabled {\\r\\n color: #666;\\r\\n}\\r\\n\\r\\n.context-menu-input.hover,\\r\\n.context-menu-item.disabled.hover {\\r\\n cursor: default;\\r\\n background-color: #EEE;\\r\\n}\\r\\n\\r\\n.context-menu-submenu:after {\\r\\n content: \\\">\\\";\\r\\n color: #666;\\r\\n position: absolute;\\r\\n top: 0;\\r\\n right: 3px;\\r\\n z-index: 1;\\r\\n}\\r\\n\\r\\n/* icons\\r\\n #protip:\\r\\n In case you want to use sprites for icons (which I would suggest you do) have a look at\\r\\n http://css-tricks.com/13224-pseudo-spriting/ to get an idea of how to implement\\r\\n .context-menu-item.icon:before {}\\r\\n */\\r\\n.context-menu-item.icon { min-height: 18px; background-repeat: no-repeat; background-position: 4px 2px; }\\r\\n\\r\\n/* vertically align inside labels */\\r\\n.context-menu-input > label > * { vertical-align: top; }\\r\\n\\r\\n/* position checkboxes and radios as icons */\\r\\n.context-menu-input > label > input[type=\\\"checkbox\\\"],\\r\\n.context-menu-input > label > input[type=\\\"radio\\\"] {\\r\\n margin-left: -17px;\\r\\n}\\r\\n.context-menu-input > label > span {\\r\\n margin-left: 5px;\\r\\n}\\r\\n\\r\\n.context-menu-input > label,\\r\\n.context-menu-input > label > input[type=\\\"text\\\"],\\r\\n.context-menu-input > label > textarea,\\r\\n.context-menu-input > label > select {\\r\\n display: block;\\r\\n width: 100%;\\r\\n\\r\\n -webkit-box-sizing: border-box;\\r\\n -moz-box-sizing: border-box;\\r\\n -ms-box-sizing: border-box;\\r\\n -o-box-sizing: border-box;\\r\\n box-sizing: border-box;\\r\\n}\\r\\n\\r\\n.context-menu-input > label > textarea {\\r\\n height: 100px;\\r\\n}\\r\\n.context-menu-item > .context-menu-list {\\r\\n display: none;\\r\\n /* re-positioned by js */\\r\\n right: -5px;\\r\\n top: 5px;\\r\\n}\\r\\n\\r\\n.context-menu-item.hover > .context-menu-list {\\r\\n display: block;\\r\\n}\\r\\n\\r\\n.context-menu-accesskey {\\r\\n text-decoration: underline;\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","// Generated by CoffeeScript 1.12.2\n(function() {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if ((typeof performance !== \"undefined\" && performance !== null) && performance.now) {\n module.exports = function() {\n return performance.now();\n };\n } else if ((typeof process !== \"undefined\" && process !== null) && process.hrtime) {\n module.exports = function() {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n hrtime = process.hrtime;\n getNanoSeconds = function() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function() {\n return Date.now() - loadTime;\n };\n loadTime = Date.now();\n } else {\n module.exports = function() {\n return new Date().getTime() - loadTime;\n };\n loadTime = new Date().getTime();\n }\n\n}).call(this);\n\n//# sourceMappingURL=performance-now.js.map\n","var now = require('performance-now')\n , root = typeof window === 'undefined' ? global : window\n , vendors = ['moz', 'webkit']\n , suffix = 'AnimationFrame'\n , raf = root['request' + suffix]\n , caf = root['cancel' + suffix] || root['cancelRequest' + suffix]\n\nfor(var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix]\n caf = root[vendors[i] + 'Cancel' + suffix]\n || root[vendors[i] + 'CancelRequest' + suffix]\n}\n\n// Some versions of FF have rAF but not cAF\nif(!raf || !caf) {\n var last = 0\n , id = 0\n , queue = []\n , frameDuration = 1000 / 60\n\n raf = function(callback) {\n if(queue.length === 0) {\n var _now = now()\n , next = Math.max(0, frameDuration - (_now - last))\n last = next + _now\n setTimeout(function() {\n var cp = queue.slice(0)\n // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n queue.length = 0\n for(var i = 0; i < cp.length; i++) {\n if(!cp[i].cancelled) {\n try{\n cp[i].callback(last)\n } catch(e) {\n setTimeout(function() { throw e }, 0)\n }\n }\n }\n }, Math.round(next))\n }\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n })\n return id\n }\n\n caf = function(handle) {\n for(var i = 0; i < queue.length; i++) {\n if(queue[i].handle === handle) {\n queue[i].cancelled = true\n }\n }\n }\n}\n\nmodule.exports = function(fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn)\n}\nmodule.exports.cancel = function() {\n caf.apply(root, arguments)\n}\nmodule.exports.polyfill = function(object) {\n if (!object) {\n object = root;\n }\n object.requestAnimationFrame = raf\n object.cancelAnimationFrame = caf\n}\n","module.exports = \"/* \\r\\n * Simple JavaScript Inheritance \\r\\n * By John Resig http://ejohn.org/ \\r\\n * MIT Licensed. \\r\\n * \\r\\n ****************************************************** \\r\\n * Example Usage \\r\\n ****************************************************** \\r\\n var Person = Class.extend({ \\r\\n init: function(isDancing){ \\r\\n this.dancing = isDancing; \\r\\n }, \\r\\n dance: function(){ \\r\\n return this.dancing; \\r\\n } \\r\\n}); \\r\\n\\r\\nvar Ninja = Person.extend({ \\r\\n init: function(){ \\r\\n this._super( false ); \\r\\n }, \\r\\n dance: function(){ \\r\\n // Call the inherited version of dance() \\r\\n return this._super(); \\r\\n }, \\r\\n swingSword: function(){ \\r\\n return true; \\r\\n } \\r\\n}); \\r\\n\\r\\nvar p = new Person(true); \\r\\np.dance(); // => true \\r\\n\\r\\nvar n = new Ninja(); \\r\\nn.dance(); // => false \\r\\nn.swingSword(); // => true \\r\\n\\r\\n// Should all be true \\r\\np instanceof Person && p instanceof Class && \\r\\nn instanceof Ninja && n instanceof Person && n instanceof Class \\r\\n\\r\\n ****************************************************** \\r\\n */ \\r\\n \\r\\n// Inspired by base2 and Prototype \\r\\n(function(){ \\r\\n var fnTest = /xyz/.test(function(){xyz;}) ? /\\\\b_super\\\\b/ : /.*/; \\r\\n\\r\\n // The base Class implementation (does nothing) \\r\\n this.Class = function(){}; \\r\\n \\r\\n\\r\\n // Create a new Class that inherits from this class \\r\\n Class.extend = function(prop) { \\r\\n var _super = this.prototype; \\r\\n \\r\\n // Instantiate a base class (but only create the instance, \\r\\n // don't run the init constructor) \\r\\n initializing = true; \\r\\n var prototype = new this(); \\r\\n initializing = false; \\r\\n \\r\\n \\r\\n // Copy the properties over onto the new prototype \\r\\n for (var name in prop) { \\r\\n // Check if we're overwriting an existing function \\r\\n prototype[name] = typeof prop[name] == \\\"function\\\" && \\r\\n typeof _super[name] == \\\"function\\\" && fnTest.test(prop[name]) ? \\r\\n (function(name, fn){ \\r\\n return function() { \\r\\n var tmp = this._super; \\r\\n \\r\\n // Add a new ._super() method that is the same method \\r\\n // but on the super-class \\r\\n this._super = _super[name]; \\r\\n \\r\\n // The method only need to be bound temporarily, so we \\r\\n // remove it when we're done executing \\r\\n var ret = fn.apply(this, arguments); \\r\\n this._super = tmp; \\r\\n \\r\\n return ret; \\r\\n }; \\r\\n })(name, prop[name]) : \\r\\n prop[name]; \\r\\n } \\r\\n \\r\\n // The dummy class constructor \\r\\n function Class() { \\r\\n // All construction is actually done in the init method \\r\\n if ( !initializing && this.init ) \\r\\n this.init.apply(this, arguments); \\r\\n } \\r\\n \\r\\n // Populate our constructed prototype object \\r\\n Class.prototype = prototype; \\r\\n \\r\\n // Enforce the constructor to be what we expect \\r\\n Class.prototype.constructor = Class; \\r\\n\\r\\n // And make this class extendable \\r\\n Class.extend = arguments.callee; \\r\\n \\r\\n // EXTENSION BY Draw2D.org to inject methods into an existing class to provide plugins or \\r\\n // bugfixes for further releases \\r\\n // \\r\\n Class.inject = function (prop) { \\r\\n var proto = this.prototype; \\r\\n var parent = {}; \\r\\n for (var name in prop) { \\r\\n if (typeof (prop[name]) == \\\"function\\\" && typeof (proto[name]) == \\\"function\\\" && fnTest.test(prop[name])) { \\r\\n parent[name] = proto[name]; \\r\\n proto[name] = (function (name, fn) { \\r\\n return function () { \\r\\n var tmp = this.parent; \\r\\n this.parent = parent[name]; \\r\\n var ret = fn.apply(this, arguments); \\r\\n this.parent = tmp; \\r\\n return ret; \\r\\n }; \\r\\n })(name, prop[name]); \\r\\n } else { \\r\\n proto[name] = prop[name]; \\r\\n } \\r\\n } \\r\\n }; \\r\\n \\r\\n return Class; \\r\\n }; \\r\\n})();\\r\\n \\r\\n\"","module.exports = \"var PF=function(){var e=function(t,n){var r=e.resolve(t,n||\\\"/\\\"),i=e.modules[r];if(!i)throw new Error(\\\"Failed to resolve module \\\"+t+\\\", tried \\\"+r);var s=i._cached?i._cached:i();return s};return e.paths=[],e.modules={},e.extensions=[\\\".js\\\",\\\".coffee\\\"],e._core={assert:!0,events:!0,fs:!0,path:!0,vm:!0},e.resolve=function(){return function(t,n){function u(t){if(e.modules[t])return t;for(var n=0;n<e.extensions.length;n++){var r=e.extensions[n];if(e.modules[t+r])return t+r}}function a(t){t=t.replace(/\\\\/+$/,\\\"\\\");var n=t+\\\"/package.json\\\";if(e.modules[n]){var i=e.modules[n](),s=i.browserify;if(typeof s==\\\"object\\\"&&s.main){var o=u(r.resolve(t,s.main));if(o)return o}else if(typeof s==\\\"string\\\"){var o=u(r.resolve(t,s));if(o)return o}else if(i.main){var o=u(r.resolve(t,i.main));if(o)return o}}return u(t+\\\"/index\\\")}function f(e,t){var n=l(t);for(var r=0;r<n.length;r++){var i=n[r],s=u(i+\\\"/\\\"+e);if(s)return s;var o=a(i+\\\"/\\\"+e);if(o)return o}var s=u(e);if(s)return s}function l(e){var t;e===\\\"/\\\"?t=[\\\"\\\"]:t=r.normalize(e).split(\\\"/\\\");var n=[];for(var i=t.length-1;i>=0;i--){if(t[i]===\\\"node_modules\\\")continue;var s=t.slice(0,i+1).join(\\\"/\\\")+\\\"/node_modules\\\";n.push(s)}return n}n||(n=\\\"/\\\");if(e._core[t])return t;var r=e.modules.path();n=r.resolve(\\\"/\\\",n);var i=n||\\\"/\\\";if(t.match(/^(?:\\\\.\\\\.?\\\\/|\\\\/)/)){var s=u(r.resolve(i,t))||a(r.resolve(i,t));if(s)return s}var o=f(t,i);if(o)return o;throw new Error(\\\"Cannot find module '\\\"+t+\\\"'\\\")}}(),e.alias=function(t,n){var r=e.modules.path(),i=null;try{i=e.resolve(t+\\\"/package.json\\\",\\\"/\\\")}catch(s){i=e.resolve(t,\\\"/\\\")}var o=r.dirname(i),u=(Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t})(e.modules);for(var a=0;a<u.length;a++){var f=u[a];if(f.slice(0,o.length+1)===o+\\\"/\\\"){var l=f.slice(o.length);e.modules[n+l]=e.modules[o+l]}else f===o&&(e.modules[n]=e.modules[o])}},e.define=function(t,n){var r=e._core[t]?\\\"\\\":e.modules.path().dirname(t),i=function(t){return e(t,r)};i.resolve=function(t){return e.resolve(t,r)},i.modules=e.modules,i.define=e.define;var s={exports:{}};e.modules[t]=function(){return e.modules[t]._cached=s.exports,n.call(s.exports,i,s,s.exports,r,t),e.modules[t]._cached=s.exports,s.exports}},typeof process==\\\"undefined\\\"&&(process={}),process.nextTick||(process.nextTick=function(){var e=[],t=typeof window!=\\\"undefined\\\"&&window.postMessage&&window.addEventListener;return t&&window.addEventListener(\\\"message\\\",function(t){if(t.source===window&&t.data===\\\"browserify-tick\\\"){t.stopPropagation();if(e.length>0){var n=e.shift();n()}}},!0),function(n){t?(e.push(n),window.postMessage(\\\"browserify-tick\\\",\\\"*\\\")):setTimeout(n,0)}}()),process.title||(process.title=\\\"browser\\\"),process.binding||(process.binding=function(t){if(t===\\\"evals\\\")return e(\\\"vm\\\");throw new Error(\\\"No such module\\\")}),process.cwd||(process.cwd=function(){return\\\".\\\"}),process.env||(process.env={}),process.argv||(process.argv=[]),e.define(\\\"path\\\",function(e,t,n,r,i){function s(e,t){var n=[];for(var r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}function o(e,t){var n=0;for(var r=e.length;r>=0;r--){var i=e[r];i==\\\".\\\"?e.splice(r,1):i===\\\"..\\\"?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift(\\\"..\\\");return e}var u=/^(.+\\\\/(?!$)|\\\\/)?((?:.+?)?(\\\\.[^.]*)?)$/;n.resolve=function(){var e=\\\"\\\",t=!1;for(var n=arguments.length;n>=-1&&!t;n--){var r=n>=0?arguments[n]:process.cwd();if(typeof r!=\\\"string\\\"||!r)continue;e=r+\\\"/\\\"+e,t=r.charAt(0)===\\\"/\\\"}return e=o(s(e.split(\\\"/\\\"),function(e){return!!e}),!t).join(\\\"/\\\"),(t?\\\"/\\\":\\\"\\\")+e||\\\".\\\"},n.normalize=function(e){var t=e.charAt(0)===\\\"/\\\",n=e.slice(-1)===\\\"/\\\";return e=o(s(e.split(\\\"/\\\"),function(e){return!!e}),!t).join(\\\"/\\\"),!e&&!t&&(e=\\\".\\\"),e&&n&&(e+=\\\"/\\\"),(t?\\\"/\\\":\\\"\\\")+e},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(s(e,function(e,t){return e&&typeof e==\\\"string\\\"}).join(\\\"/\\\"))},n.dirname=function(e){var t=u.exec(e)[1]||\\\"\\\",n=!1;return t?t.length===1||n&&t.length<=3&&t.charAt(1)===\\\":\\\"?t:t.substring(0,t.length-1):\\\".\\\"},n.basename=function(e,t){var n=u.exec(e)[2]||\\\"\\\";return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},n.extname=function(e){return u.exec(e)[3]||\\\"\\\"}}),e.define(\\\"/core/Node.js\\\",function(e,t,n,r,i){function s(e,t,n){this.x=e,this.y=t,this.walkable=n===undefined?!0:n}t.exports=s}),e.define(\\\"/core/Grid.js\\\",function(e,t,n,r,i){function o(e,t,n){this.width=e,this.height=t,this.nodes=this._buildNodes(e,t,n)}var s=e(\\\"./Node\\\");o.prototype._buildNodes=function(e,t,n){var r,i,o=new Array(t),u;for(r=0;r<t;++r){o[r]=new Array(e);for(i=0;i<e;++i)o[r][i]=new s(i,r)}if(n===undefined)return o;if(n.length!==t||n[0].length!==e)throw new Error(\\\"Matrix size does not fit\\\");for(r=0;r<t;++r)for(i=0;i<e;++i)n[r][i]&&(o[r][i].walkable=!1);return o},o.prototype.getNodeAt=function(e,t){return this.nodes[t][e]},o.prototype.isWalkableAt=function(e,t){return this.isInside(e,t)&&this.nodes[t][e].walkable},o.prototype.isInside=function(e,t){return e>=0&&e<this.width&&t>=0&&t<this.height},o.prototype.setWalkableAt=function(e,t,n){this.nodes[t][e].walkable=n},o.prototype.getNeighbors=function(e,t,n){var r=e.x,i=e.y,s=[],o=!1,u=!1,a=!1,f=!1,l=!1,c=!1,h=!1,p=!1,d=this.nodes;return this.isWalkableAt(r,i-1)&&(s.push(d[i-1][r]),o=!0),this.isWalkableAt(r+1,i)&&(s.push(d[i][r+1]),a=!0),this.isWalkableAt(r,i+1)&&(s.push(d[i+1][r]),l=!0),this.isWalkableAt(r-1,i)&&(s.push(d[i][r-1]),h=!0),t?(n?(u=h&&o,f=o&&a,c=a&&l,p=l&&h):(u=h||o,f=o||a,c=a||l,p=l||h),u&&this.isWalkableAt(r-1,i-1)&&s.push(d[i-1][r-1]),f&&this.isWalkableAt(r+1,i-1)&&s.push(d[i-1][r+1]),c&&this.isWalkableAt(r+1,i+1)&&s.push(d[i+1][r+1]),p&&this.isWalkableAt(r-1,i+1)&&s.push(d[i+1][r-1]),s):s},o.prototype.clone=function(){var e,t,n=this.width,r=this.height,i=this.nodes,u=new o(n,r),a=new Array(r),f;for(e=0;e<r;++e){a[e]=new Array(n);for(t=0;t<n;++t)a[e][t]=new s(t,e,i[e][t].walkable)}return u.nodes=a,u},t.exports=o}),e.define(\\\"/core/Heap.js\\\",function(e,t,n,r,i){(function(){var e,n,r,i,s,o,u,a,f,l,c,h,p,d,v;r=Math.floor,l=Math.min,n=function(e,t){return e<t?-1:e>t?1:0},f=function(e,t,i,s,o){var u;i==null&&(i=0),o==null&&(o=n);if(i<0)throw new Error(\\\"lo must be non-negative\\\");s==null&&(s=e.length);while(o(i,s)<0)u=r((i+s)/2),o(t,e[u])<0?s=u:i=u+1;return[].splice.apply(e,[i,i-i].concat(t)),t},o=function(e,t,r){return r==null&&(r=n),e.push(t),d(e,0,e.length-1,r)},s=function(e,t){var r,i;return t==null&&(t=n),r=e.pop(),e.length?(i=e[0],e[0]=r,v(e,0,t)):i=r,i},a=function(e,t,r){var i;return r==null&&(r=n),i=e[0],e[0]=t,v(e,0,r),i},u=function(e,t,r){var i;return r==null&&(r=n),e.length&&r(e[0],t)<0&&(i=[e[0],t],t=i[0],e[0]=i[1],v(e,0,r)),t},i=function(e,t){var i,s,o,u,a,f,l,c;t==null&&(t=n),f=function(){c=[];for(var t=0,n=r(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)c.push(t);return c}.apply(this).reverse(),l=[];for(s=0,u=f.length;s<u;s++)i=f[s],l.push(v(e,i,t));return l},p=function(e,t,r){var i;return r==null&&(r=n),i=e.indexOf(t),d(e,0,i,r),v(e,i,r)},c=function(e,t,r){var s,o,a,f,l;r==null&&(r=n),o=e.slice(0,t);if(!o.length)return o;i(o,r),l=e.slice(t);for(a=0,f=l.length;a<f;a++)s=l[a],u(o,s,r);return o.sort(r).reverse()},h=function(e,t,r){var o,u,a,c,h,p,d,v,m,g;r==null&&(r=n);if(t*10<=e.length){c=e.slice(0,t).sort(r);if(!c.length)return c;a=c[c.length-1],v=e.slice(t);for(h=0,d=v.length;h<d;h++)o=v[h],r(o,a)<0&&(f(c,o,0,null,r),c.pop(),a=c[c.length-1]);return c}i(e,r),g=[];for(u=p=0,m=l(t,e.length);0<=m?p<m:p>m;u=0<=m?++p:--p)g.push(s(e,r));return g},d=function(e,t,r,i){var s,o,u;i==null&&(i=n),s=e[r];while(r>t){u=r-1>>1,o=e[u];if(i(s,o)<0){e[r]=o,r=u;continue}break}return e[r]=s},v=function(e,t,r){var i,s,o,u,a;r==null&&(r=n),s=e.length,a=t,o=e[t],i=2*t+1;while(i<s)u=i+1,u<s&&!(r(e[i],e[u])<0)&&(i=u),e[t]=e[i],t=i,i=2*t+1;return e[t]=o,d(e,a,t,r)},e=function(){function e(e){this.cmp=e!=null?e:n,this.nodes=[]}return e.name=\\\"Heap\\\",e.push=o,e.pop=s,e.replace=a,e.pushpop=u,e.heapify=i,e.nlargest=c,e.nsmallest=h,e.prototype.push=function(e){return o(this.nodes,e,this.cmp)},e.prototype.pop=function(){return s(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return this.nodes.indexOf(e)!==-1},e.prototype.replace=function(e){return a(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return u(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return i(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return p(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return this.nodes.length===0},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t;return t=new e,t.nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.remove=e.prototype.pop,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e}(),(typeof t!=\\\"undefined\\\"&&t!==null?t.exports:void 0)?t.exports=e:window.Heap=e}).call(this)}),e.define(\\\"/core/Util.js\\\",function(e,t,n,r,i){function s(e){var t=[[e.x,e.y]];while(e.parent)e=e.parent,t.push([e.x,e.y]);return t.reverse()}function o(e,t){var n=s(e),r=s(t);return n.concat(r.reverse())}function u(e){var t,n=0,r,i,s,o;for(t=1;t<e.length;++t)r=e[t-1],i=e[t],s=r[0]-i[0],o=r[1]-i[1],n+=Math.sqrt(s*s+o*o);return n}function a(e,t,n,r){var i=Math.abs,s=[],o,u,a,f,l,c;a=i(n-e),f=i(r-t),o=e<n?1:-1,u=t<r?1:-1,l=a-f;for(;;){s.push([e,t]);if(e===n&&t===r)break;c=2*l,c>-f&&(l-=f,e+=o),c<a&&(l+=a,t+=u)}return s}function f(e,t){var n=t.length,r=t[0][0],i=t[0][1],s=t[n-1][0],o=t[n-1][1],u,f,l,c,h,p,d,v,m,g,y,b,w;u=r,f=i,h=t[1][0],p=t[1][1],d=[[u,f]];for(v=2;v<n;++v){g=t[v],l=g[0],c=g[1],y=a(u,f,l,c),w=!1;for(m=1;m<y.length;++m){b=y[m];if(!e.isWalkableAt(b[0],b[1])){w=!0,d.push([h,p]),u=h,f=p;break}}w||(h=l,p=c)}return d.push([s,o]),d}n.backtrace=s,n.biBacktrace=o,n.pathLength=u,n.getLine=a,n.smoothenPath=f}),e.define(\\\"/core/Heuristic.js\\\",function(e,t,n,r,i){t.exports={manhattan:function(e,t){return e+t},euclidean:function(e,t){return Math.sqrt(e*e+t*t)},chebyshev:function(e,t){return Math.max(e,t)}}}),e.define(\\\"/finders/AStarFinder.js\\\",function(e,t,n,r,i){function a(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.heuristic=e.heuristic||u.manhattan}var s=e(\\\"../core/Heap\\\"),o=e(\\\"../core/Util\\\"),u=e(\\\"../core/Heuristic\\\");a.prototype.findPath=function(e,t,n,r,i){var u=new s(function(e,t){return e.f-t.f}),a=i.getNodeAt(e,t),f=i.getNodeAt(n,r),l=this.heuristic,c=this.allowDiagonal,h=this.dontCrossCorners,p=Math.abs,d=Math.SQRT2,v,m,g,y,b,w,E,S;a.g=0,a.f=0,u.push(a),a.opened=!0;while(!u.empty()){v=u.pop(),v.closed=!0;if(v===f)return o.backtrace(f);m=i.getNeighbors(v,c,h);for(y=0,b=m.length;y<b;++y){g=m[y];if(g.closed)continue;w=g.x,E=g.y,S=v.g+(w-v.x===0||E-v.y===0?1:d);if(!g.opened||S<g.g)g.g=S,g.h=g.h||l(p(w-n),p(E-r)),g.f=g.g+g.h,g.parent=v,g.opened?u.updateItem(g):(u.push(g),g.opened=!0)}}return[]},t.exports=a}),e.define(\\\"/finders/BestFirstFinder.js\\\",function(e,t,n,r,i){function o(e){s.call(this,e);var t=this.heuristic;this.heuristic=function(e,n){return t(e,n)*1e6}}var s=e(\\\"./AStarFinder\\\");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define(\\\"/finders/BreadthFirstFinder.js\\\",function(e,t,n,r,i){function o(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners}var s=e(\\\"../core/Util\\\");o.prototype.findPath=function(e,t,n,r,i){var o=[],u=this.allowDiagonal,a=this.dontCrossCorners,f=i.getNodeAt(e,t),l=i.getNodeAt(n,r),c,h,p,d,v;o.push(f),f.opened=!0;while(o.length){p=o.shift(),p.closed=!0;if(p===l)return s.backtrace(l);c=i.getNeighbors(p,u,a);for(d=0,v=c.length;d<v;++d){h=c[d];if(h.closed||h.opened)continue;o.push(h),h.opened=!0,h.parent=p}}return[]},t.exports=o}),e.define(\\\"/finders/DijkstraFinder.js\\\",function(e,t,n,r,i){function o(e){s.call(this,e),this.heuristic=function(e,t){return 0}}var s=e(\\\"./AStarFinder\\\");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define(\\\"/finders/BiAStarFinder.js\\\",function(e,t,n,r,i){function a(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.heuristic=e.heuristic||u.manhattan}var s=e(\\\"../core/Heap\\\"),o=e(\\\"../core/Util\\\"),u=e(\\\"../core/Heuristic\\\");a.prototype.findPath=function(e,t,n,r,i){var u=function(e,t){return e.f-t.f},a=new s(u),f=new s(u),l=i.getNodeAt(e,t),c=i.getNodeAt(n,r),h=this.heuristic,p=this.allowDiagonal,d=this.dontCrossCorners,v=Math.abs,m=Math.SQRT2,g,y,b,w,E,S,x,T,N=1,C=2;l.g=0,l.f=0,a.push(l),l.opened=N,c.g=0,c.f=0,f.push(c),c.opened=C;while(!a.empty()&&!f.empty()){g=a.pop(),g.closed=!0,y=i.getNeighbors(g,p,d);for(w=0,E=y.length;w<E;++w){b=y[w];if(b.closed)continue;if(b.opened===C)return o.biBacktrace(g,b);S=b.x,x=b.y,T=g.g+(S-g.x===0||x-g.y===0?1:m);if(!b.opened||T<b.g)b.g=T,b.h=b.h||h(v(S-n),v(x-r)),b.f=b.g+b.h,b.parent=g,b.opened?a.updateItem(b):(a.push(b),b.opened=N)}g=f.pop(),g.closed=!0,y=i.getNeighbors(g,p,d);for(w=0,E=y.length;w<E;++w){b=y[w];if(b.closed)continue;if(b.opened===N)return o.biBacktrace(b,g);S=b.x,x=b.y,T=g.g+(S-g.x===0||x-g.y===0?1:m);if(!b.opened||T<b.g)b.g=T,b.h=b.h||h(v(S-e),v(x-t)),b.f=b.g+b.h,b.parent=g,b.opened?f.updateItem(b):(f.push(b),b.opened=C)}}return[]},t.exports=a}),e.define(\\\"/finders/BiBestFirstFinder.js\\\",function(e,t,n,r,i){function o(e){s.call(this,e);var t=this.heuristic;this.heuristic=function(e,n){return t(e,n)*1e6}}var s=e(\\\"./BiAStarFinder\\\");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define(\\\"/finders/BiBreadthFirstFinder.js\\\",function(e,t,n,r,i){function o(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners}var s=e(\\\"../core/Util\\\");o.prototype.findPath=function(e,t,n,r,i){var o=i.getNodeAt(e,t),u=i.getNodeAt(n,r),a=[],f=[],l,c,h,p=this.allowDiagonal,d=this.dontCrossCorners,v=0,m=1,g,y;a.push(o),o.opened=!0,o.by=v,f.push(u),u.opened=!0,u.by=m;while(a.length&&f.length){h=a.shift(),h.closed=!0,l=i.getNeighbors(h,p,d);for(g=0,y=l.length;g<y;++g){c=l[g];if(c.closed)continue;if(c.opened){if(c.by===m)return s.biBacktrace(h,c);continue}a.push(c),c.parent=h,c.opened=!0,c.by=v}h=f.shift(),h.closed=!0,l=i.getNeighbors(h,p,d);for(g=0,y=l.length;g<y;++g){c=l[g];if(c.closed)continue;if(c.opened){if(c.by===v)return s.biBacktrace(c,h);continue}f.push(c),c.parent=h,c.opened=!0,c.by=m}}return[]},t.exports=o}),e.define(\\\"/finders/BiDijkstraFinder.js\\\",function(e,t,n,r,i){function o(e){s.call(this,e),this.heuristic=function(e,t){return 0}}var s=e(\\\"./BiAStarFinder\\\");o.prototype=new s,o.prototype.constructor=o,t.exports=o}),e.define(\\\"/finders/JumpPointFinder.js\\\",function(e,t,n,r,i){function a(e){e=e||{},this.heuristic=e.heuristic||u.manhattan}var s=e(\\\"../core/Heap\\\"),o=e(\\\"../core/Util\\\"),u=e(\\\"../core/Heuristic\\\");a.prototype.findPath=function(e,t,n,r,i){var u=this.openList=new s(function(e,t){return e.f-t.f}),a=this.startNode=i.getNodeAt(e,t),f=this.endNode=i.getNodeAt(n,r),l;this.grid=i,a.g=0,a.f=0,u.push(a),a.opened=!0;while(!u.empty()){l=u.pop(),l.closed=!0;if(l===f)return o.backtrace(f);this._identifySuccessors(l)}return[]},a.prototype._identifySuccessors=function(e){var t=this.grid,n=this.heuristic,r=this.openList,i=this.endNode.x,s=this.endNode.y,o,a,f,l,c,h=e.x,p=e.y,d,v,m,g,y,b,w,E=Math.abs,S=Math.max;o=this._findNeighbors(e);for(l=0,c=o.length;l<c;++l){a=o[l],f=this._jump(a[0],a[1],h,p);if(f){d=f[0],v=f[1],w=t.getNodeAt(d,v);if(w.closed)continue;y=u.euclidean(E(d-h),E(v-p)),b=e.g+y;if(!w.opened||b<w.g)w.g=b,w.h=w.h||n(E(d-i),E(v-s)),w.f=w.g+w.h,w.parent=e,w.opened?r.updateItem(w):(r.push(w),w.opened=!0)}}},a.prototype._jump=function(e,t,n,r){var i=this.grid,s=e-n,o=t-r,u,a;if(!i.isWalkableAt(e,t))return null;if(i.getNodeAt(e,t)===this.endNode)return[e,t];if(s!==0&&o!==0){if(i.isWalkableAt(e-s,t+o)&&!i.isWalkableAt(e-s,t)||i.isWalkableAt(e+s,t-o)&&!i.isWalkableAt(e,t-o))return[e,t]}else if(s!==0){if(i.isWalkableAt(e+s,t+1)&&!i.isWalkableAt(e,t+1)||i.isWalkableAt(e+s,t-1)&&!i.isWalkableAt(e,t-1))return[e,t]}else if(i.isWalkableAt(e+1,t+o)&&!i.isWalkableAt(e+1,t)||i.isWalkableAt(e-1,t+o)&&!i.isWalkableAt(e-1,t))return[e,t];if(s!==0&&o!==0){u=this._jump(e+s,t,e,t),a=this._jump(e,t+o,e,t);if(u||a)return[e,t]}return i.isWalkableAt(e+s,t)||i.isWalkableAt(e,t+o)?this._jump(e+s,t+o,e,t):null},a.prototype._findNeighbors=function(e){var t=e.parent,n=e.x,r=e.y,i=this.grid,s,o,u,a,f,l,c=[],h,p,d,v;if(t)s=t.x,o=t.y,f=(n-s)/Math.max(Math.abs(n-s),1),l=(r-o)/Math.max(Math.abs(r-o),1),f!==0&&l!==0?(i.isWalkableAt(n,r+l)&&c.push([n,r+l]),i.isWalkableAt(n+f,r)&&c.push([n+f,r]),(i.isWalkableAt(n,r+l)||i.isWalkableAt(n+f,r))&&c.push([n+f,r+l]),!i.isWalkableAt(n-f,r)&&i.isWalkableAt(n,r+l)&&c.push([n-f,r+l]),!i.isWalkableAt(n,r-l)&&i.isWalkableAt(n+f,r)&&c.push([n+f,r-l])):f===0?i.isWalkableAt(n,r+l)&&(i.isWalkableAt(n,r+l)&&c.push([n,r+l]),i.isWalkableAt(n+1,r)||c.push([n+1,r+l]),i.isWalkableAt(n-1,r)||c.push([n-1,r+l])):i.isWalkableAt(n+f,r)&&(i.isWalkableAt(n+f,r)&&c.push([n+f,r]),i.isWalkableAt(n,r+1)||c.push([n+f,r+1]),i.isWalkableAt(n,r-1)||c.push([n+f,r-1]));else{h=i.getNeighbors(e,!0);for(d=0,v=h.length;d<v;++d)p=h[d],c.push([p.x,p.y])}return c},t.exports=a}),e.define(\\\"/PathFinding.js\\\",function(e,t,n,r,i){t.exports={Node:e(\\\"./core/Node\\\"),Grid:e(\\\"./core/Grid\\\"),Heap:e(\\\"./core/Heap\\\"),Util:e(\\\"./core/Util\\\"),Heuristic:e(\\\"./core/Heuristic\\\"),AStarFinder:e(\\\"./finders/AStarFinder\\\"),BestFirstFinder:e(\\\"./finders/BestFirstFinder\\\"),BreadthFirstFinder:e(\\\"./finders/BreadthFirstFinder\\\"),DijkstraFinder:e(\\\"./finders/DijkstraFinder\\\"),BiAStarFinder:e(\\\"./finders/BiAStarFinder\\\"),BiBestFirstFinder:e(\\\"./finders/BiBestFirstFinder\\\"),BiBreadthFirstFinder:e(\\\"./finders/BiBreadthFirstFinder\\\"),BiDijkstraFinder:e(\\\"./finders/BiDijkstraFinder\\\"),JumpPointFinder:e(\\\"./finders/JumpPointFinder\\\")}}),e(\\\"/PathFinding.js\\\"),e(\\\"/PathFinding\\\")}()\"","module.exports = \"\\r\\n\\r\\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\\\\\// │ Raphaël 2.1.0 - JavaScript Vector Library │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\\\\\\r\\n// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\\\\\\r\\n// └────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n// ┌──────────────────────────────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Eve 0.3.4 - JavaScript Events Library │ \\\\\\\\\\r\\n// ├──────────────────────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. │ \\\\\\\\\\r\\n// └──────────────────────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n// THIS FILES IS PATCHED BY FREEGROUP\\r\\n// you can't replace this file with a new version without migrate all changes\\r\\n// tagged with \\\"FREEGROUP\\\"\\r\\n//\\r\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\r\\n// you may not use this file except in compliance with the License.\\r\\n// You may obtain a copy of the License at\\r\\n//\\r\\n// http://www.apache.org/licenses/LICENSE-2.0\\r\\n//\\r\\n// Unless required by applicable law or agreed to in writing, software\\r\\n// distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\r\\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\r\\n// See the License for the specific language governing permissions and\\r\\n// limitations under the License.\\r\\n// ┌────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Eve 0.4.2 - JavaScript Events Library │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Author Dmitry Baranovskiy (http://dmitry.baranovskiy.com/) │ \\\\\\\\\\r\\n// └────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n(function (glob, factory) {\\r\\n if (typeof define === \\\"function\\\" && define.amd) {\\r\\n define(\\\"eve\\\", function() {\\r\\n return factory();\\r\\n });\\r\\n } else if (typeof exports === \\\"object\\\") {\\r\\n module.exports = factory();\\r\\n } else {\\r\\n glob.eve = factory();\\r\\n }\\r\\n}(this, function(){\\r\\n var version = \\\"0.4.2\\\",\\r\\n has = \\\"hasOwnProperty\\\",\\r\\n separator = /[\\\\.\\\\/]/,\\r\\n wildcard = \\\"*\\\",\\r\\n fun = function () {},\\r\\n numsort = function (a, b) {\\r\\n return a - b;\\r\\n },\\r\\n current_event,\\r\\n stop,\\r\\n events = {n: {}},\\r\\n /*\\\\\\r\\n * eve\\r\\n [ method ]\\r\\n\\r\\n * Fires event with given `name`, given scope and other parameters.\\r\\n\\r\\n > Arguments\\r\\n\\r\\n - name (string) name of the *event*, dot (`.`) or slash (`/`) separated\\r\\n - scope (object) context for the event handlers\\r\\n - varargs (...) the rest of arguments will be sent to event handlers\\r\\n\\r\\n = (object) array of returned values from the listeners\\r\\n \\\\*/\\r\\n eve = function (name, scope) {\\r\\n name = String(name);\\r\\n var e = events,\\r\\n oldstop = stop,\\r\\n args = Array.prototype.slice.call(arguments, 2),\\r\\n listeners = eve.listeners(name),\\r\\n z = 0,\\r\\n f = false,\\r\\n l,\\r\\n indexed = [],\\r\\n queue = {},\\r\\n out = [],\\r\\n ce = current_event,\\r\\n errors = [];\\r\\n current_event = name;\\r\\n stop = 0;\\r\\n for (var i = 0, ii = listeners.length; i < ii; i++) if (\\\"zIndex\\\" in listeners[i]) {\\r\\n indexed.push(listeners[i].zIndex);\\r\\n if (listeners[i].zIndex < 0) {\\r\\n queue[listeners[i].zIndex] = listeners[i];\\r\\n }\\r\\n }\\r\\n indexed.sort(numsort);\\r\\n while (indexed[z] < 0) {\\r\\n l = queue[indexed[z++]];\\r\\n out.push(l.apply(scope, args));\\r\\n if (stop) {\\r\\n stop = oldstop;\\r\\n return out;\\r\\n }\\r\\n }\\r\\n for (i = 0; i < ii; i++) {\\r\\n l = listeners[i];\\r\\n if (\\\"zIndex\\\" in l) {\\r\\n if (l.zIndex == indexed[z]) {\\r\\n out.push(l.apply(scope, args));\\r\\n if (stop) {\\r\\n break;\\r\\n }\\r\\n do {\\r\\n z++;\\r\\n l = queue[indexed[z]];\\r\\n l && out.push(l.apply(scope, args));\\r\\n if (stop) {\\r\\n break;\\r\\n }\\r\\n } while (l)\\r\\n } else {\\r\\n queue[l.zIndex] = l;\\r\\n }\\r\\n } else {\\r\\n out.push(l.apply(scope, args));\\r\\n if (stop) {\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n stop = oldstop;\\r\\n current_event = ce;\\r\\n return out.length ? out : null;\\r\\n };\\r\\n // Undocumented. Debug only.\\r\\n eve._events = events;\\r\\n /*\\\\\\r\\n * eve.listeners\\r\\n [ method ]\\r\\n\\r\\n * Internal method which gives you array of all event handlers that will be triggered by the given `name`.\\r\\n\\r\\n > Arguments\\r\\n\\r\\n - name (string) name of the event, dot (`.`) or slash (`/`) separated\\r\\n\\r\\n = (array) array of event handlers\\r\\n \\\\*/\\r\\n eve.listeners = function (name) {\\r\\n var names = name.split(separator),\\r\\n e = events,\\r\\n item,\\r\\n items,\\r\\n k,\\r\\n i,\\r\\n ii,\\r\\n j,\\r\\n jj,\\r\\n nes,\\r\\n es = [e],\\r\\n out = [];\\r\\n for (i = 0, ii = names.length; i < ii; i++) {\\r\\n nes = [];\\r\\n for (j = 0, jj = es.length; j < jj; j++) {\\r\\n e = es[j].n;\\r\\n items = [e[names[i]], e[wildcard]];\\r\\n k = 2;\\r\\n while (k--) {\\r\\n item = items[k];\\r\\n if (item) {\\r\\n nes.push(item);\\r\\n out = out.concat(item.f || []);\\r\\n }\\r\\n }\\r\\n }\\r\\n es = nes;\\r\\n }\\r\\n return out;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * eve.on\\r\\n [ method ]\\r\\n **\\r\\n * Binds given event handler with a given name. You can use wildcards “`*`” for the names:\\r\\n | eve.on(\\\"*.under.*\\\", f);\\r\\n | eve(\\\"mouse.under.floor\\\"); // triggers f\\r\\n * Use @eve to trigger the listener.\\r\\n **\\r\\n > Arguments\\r\\n **\\r\\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\\r\\n - f (function) event handler function\\r\\n **\\r\\n = (function) returned function accepts a single numeric parameter that represents z-index of the handler. It is an optional feature and only used when you need to ensure that some subset of handlers will be invoked in a given order, despite of the order of assignment.\\r\\n > Example:\\r\\n | eve.on(\\\"mouse\\\", eatIt)(2);\\r\\n | eve.on(\\\"mouse\\\", scream);\\r\\n | eve.on(\\\"mouse\\\", catchIt)(1);\\r\\n * This will ensure that `catchIt()` function will be called before `eatIt()`.\\r\\n *\\r\\n * If you want to put your handler before non-indexed handlers, specify a negative value.\\r\\n * Note: I assume most of the time you don’t need to worry about z-index, but it’s nice to have this feature “just in case”.\\r\\n \\\\*/\\r\\n eve.on = function (name, f) {\\r\\n name = String(name);\\r\\n if (typeof f != \\\"function\\\") {\\r\\n return function () {};\\r\\n }\\r\\n var names = name.split(separator),\\r\\n e = events;\\r\\n for (var i = 0, ii = names.length; i < ii; i++) {\\r\\n e = e.n;\\r\\n e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}});\\r\\n }\\r\\n e.f = e.f || [];\\r\\n for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) {\\r\\n return fun;\\r\\n }\\r\\n e.f.push(f);\\r\\n return function (zIndex) {\\r\\n if (+zIndex == +zIndex) {\\r\\n f.zIndex = +zIndex;\\r\\n }\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * eve.f\\r\\n [ method ]\\r\\n **\\r\\n * Returns function that will fire given event with optional arguments.\\r\\n * Arguments that will be passed to the result function will be also\\r\\n * concated to the list of final arguments.\\r\\n | el.onclick = eve.f(\\\"click\\\", 1, 2);\\r\\n | eve.on(\\\"click\\\", function (a, b, c) {\\r\\n | console.log(a, b, c); // 1, 2, [event object]\\r\\n | });\\r\\n > Arguments\\r\\n - event (string) event name\\r\\n - varargs (…) and any other arguments\\r\\n = (function) possible event handler function\\r\\n \\\\*/\\r\\n eve.f = function (event) {\\r\\n var attrs = [].slice.call(arguments, 1);\\r\\n return function () {\\r\\n eve.apply(null, [event, null].concat(attrs).concat([].slice.call(arguments, 0)));\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * eve.stop\\r\\n [ method ]\\r\\n **\\r\\n * Is used inside an event handler to stop the event, preventing any subsequent listeners from firing.\\r\\n \\\\*/\\r\\n eve.stop = function () {\\r\\n stop = 1;\\r\\n };\\r\\n /*\\\\\\r\\n * eve.nt\\r\\n [ method ]\\r\\n **\\r\\n * Could be used inside event handler to figure out actual name of the event.\\r\\n **\\r\\n > Arguments\\r\\n **\\r\\n - subname (string) #optional subname of the event\\r\\n **\\r\\n = (string) name of the event, if `subname` is not specified\\r\\n * or\\r\\n = (boolean) `true`, if current event’s name contains `subname`\\r\\n \\\\*/\\r\\n eve.nt = function (subname) {\\r\\n if (subname) {\\r\\n return new RegExp(\\\"(?:\\\\\\\\.|\\\\\\\\/|^)\\\" + subname + \\\"(?:\\\\\\\\.|\\\\\\\\/|$)\\\").test(current_event);\\r\\n }\\r\\n return current_event;\\r\\n };\\r\\n /*\\\\\\r\\n * eve.nts\\r\\n [ method ]\\r\\n **\\r\\n * Could be used inside event handler to figure out actual name of the event.\\r\\n **\\r\\n **\\r\\n = (array) names of the event\\r\\n \\\\*/\\r\\n eve.nts = function () {\\r\\n return current_event.split(separator);\\r\\n };\\r\\n /*\\\\\\r\\n * eve.off\\r\\n [ method ]\\r\\n **\\r\\n * Removes given function from the list of event listeners assigned to given name.\\r\\n * If no arguments specified all the events will be cleared.\\r\\n **\\r\\n > Arguments\\r\\n **\\r\\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\\r\\n - f (function) event handler function\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * eve.unbind\\r\\n [ method ]\\r\\n **\\r\\n * See @eve.off\\r\\n \\\\*/\\r\\n eve.off = eve.unbind = function (name, f) {\\r\\n if (!name) {\\r\\n eve._events = events = {n: {}};\\r\\n return;\\r\\n }\\r\\n var names = name.split(separator),\\r\\n e,\\r\\n key,\\r\\n splice,\\r\\n i, ii, j, jj,\\r\\n cur = [events];\\r\\n for (i = 0, ii = names.length; i < ii; i++) {\\r\\n for (j = 0; j < cur.length; j += splice.length - 2) {\\r\\n splice = [j, 1];\\r\\n e = cur[j].n;\\r\\n if (names[i] != wildcard) {\\r\\n if (e[names[i]]) {\\r\\n splice.push(e[names[i]]);\\r\\n }\\r\\n } else {\\r\\n for (key in e) if (e[has](key)) {\\r\\n splice.push(e[key]);\\r\\n }\\r\\n }\\r\\n cur.splice.apply(cur, splice);\\r\\n }\\r\\n }\\r\\n for (i = 0, ii = cur.length; i < ii; i++) {\\r\\n e = cur[i];\\r\\n while (e.n) {\\r\\n if (f) {\\r\\n if (e.f) {\\r\\n for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) {\\r\\n e.f.splice(j, 1);\\r\\n break;\\r\\n }\\r\\n !e.f.length && delete e.f;\\r\\n }\\r\\n for (key in e.n) if (e.n[has](key) && e.n[key].f) {\\r\\n var funcs = e.n[key].f;\\r\\n for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) {\\r\\n funcs.splice(j, 1);\\r\\n break;\\r\\n }\\r\\n !funcs.length && delete e.n[key].f;\\r\\n }\\r\\n } else {\\r\\n delete e.f;\\r\\n for (key in e.n) if (e.n[has](key) && e.n[key].f) {\\r\\n delete e.n[key].f;\\r\\n }\\r\\n }\\r\\n e = e.n;\\r\\n }\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * eve.once\\r\\n [ method ]\\r\\n **\\r\\n * Binds given event handler with a given name to only run once then unbind itself.\\r\\n | eve.once(\\\"login\\\", f);\\r\\n | eve(\\\"login\\\"); // triggers f\\r\\n | eve(\\\"login\\\"); // no listeners\\r\\n * Use @eve to trigger the listener.\\r\\n **\\r\\n > Arguments\\r\\n **\\r\\n - name (string) name of the event, dot (`.`) or slash (`/`) separated, with optional wildcards\\r\\n - f (function) event handler function\\r\\n **\\r\\n = (function) same return function as @eve.on\\r\\n \\\\*/\\r\\n eve.once = function (name, f) {\\r\\n var f2 = function () {\\r\\n eve.unbind(name, f2);\\r\\n return f.apply(this, arguments);\\r\\n };\\r\\n return eve.on(name, f2);\\r\\n };\\r\\n /*\\\\\\r\\n * eve.version\\r\\n [ property (string) ]\\r\\n **\\r\\n * Current version of the library.\\r\\n \\\\*/\\r\\n eve.version = version;\\r\\n eve.toString = function () {\\r\\n return \\\"You are running Eve \\\" + version;\\r\\n };\\r\\n\\r\\n return eve;\\r\\n}));\\r\\n\\r\\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Core Module │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\\\\\\r\\n// └────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n(function (glob, factory) {\\r\\n if (typeof define === \\\"function\\\" && define.amd) {\\r\\n define(\\\"raphael.core\\\", [\\\"eve\\\"], function(eve) {\\r\\n return factory(eve);\\r\\n });\\r\\n } else if (typeof exports === \\\"object\\\") {\\r\\n module.exports = factory(require(\\\"eve\\\"));\\r\\n } else {\\r\\n glob.Raphael = factory(glob.eve);\\r\\n }\\r\\n}(this, function (eve) {\\r\\n /*\\\\\\r\\n * Raphael\\r\\n [ method ]\\r\\n **\\r\\n * Creates a canvas object on which to draw.\\r\\n * You must do this first, as all future calls to drawing methods\\r\\n * from this instance will be bound to this canvas.\\r\\n > Parameters\\r\\n **\\r\\n - container (HTMLElement|string) DOM element or its ID which is going to be a parent for drawing surface\\r\\n - width (number)\\r\\n - height (number)\\r\\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\\r\\n * or\\r\\n - x (number)\\r\\n - y (number)\\r\\n - width (number)\\r\\n - height (number)\\r\\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\\r\\n * or\\r\\n - all (array) (first 3 or 4 elements in the array are equal to [containerID, width, height] or [x, y, width, height]. The rest are element descriptions in format {type: type, <attributes>}). See @Paper.add.\\r\\n - callback (function) #optional callback function which is going to be executed in the context of newly created paper\\r\\n * or\\r\\n - onReadyCallback (function) function that is going to be called on DOM ready event. You can also subscribe to this event via Eve’s “DOMLoad” event. In this case method returns `undefined`.\\r\\n = (object) @Paper\\r\\n > Usage\\r\\n | // Each of the following examples create a canvas\\r\\n | // that is 320px wide by 200px high.\\r\\n | // Canvas is created at the viewport’s 10,50 coordinate.\\r\\n | var paper = Raphael(10, 50, 320, 200);\\r\\n | // Canvas is created at the top left corner of the #notepad element\\r\\n | // (or its top right corner in dir=\\\"rtl\\\" elements)\\r\\n | var paper = Raphael(document.getElementById(\\\"notepad\\\"), 320, 200);\\r\\n | // Same as above\\r\\n | var paper = Raphael(\\\"notepad\\\", 320, 200);\\r\\n | // Image dump\\r\\n | var set = Raphael([\\\"notepad\\\", 320, 200, {\\r\\n | type: \\\"rect\\\",\\r\\n | x: 10,\\r\\n | y: 10,\\r\\n | width: 25,\\r\\n | height: 25,\\r\\n | stroke: \\\"#f00\\\"\\r\\n | }, {\\r\\n | type: \\\"text\\\",\\r\\n | x: 30,\\r\\n | y: 40,\\r\\n | text: \\\"Dump\\\"\\r\\n | }]);\\r\\n \\\\*/\\r\\n function R(first) {\\r\\n if (R.is(first, \\\"function\\\")) {\\r\\n return loaded ? first() : eve.on(\\\"raphael.DOMload\\\", first);\\r\\n } else if (R.is(first, array)) {\\r\\n return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first);\\r\\n } else {\\r\\n var args = Array.prototype.slice.call(arguments, 0);\\r\\n if (R.is(args[args.length - 1], \\\"function\\\")) {\\r\\n var f = args.pop();\\r\\n return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on(\\\"raphael.DOMload\\\", function () {\\r\\n f.call(R._engine.create[apply](R, args));\\r\\n });\\r\\n } else {\\r\\n return R._engine.create[apply](R, arguments);\\r\\n }\\r\\n }\\r\\n }\\r\\n R.version = \\\"2.1.4\\\";\\r\\n R.eve = eve;\\r\\n var loaded,\\r\\n separator = /[, ]+/,\\r\\n elements = {circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1},\\r\\n formatrg = /\\\\{(\\\\d+)\\\\}/g,\\r\\n proto = \\\"prototype\\\",\\r\\n has = \\\"hasOwnProperty\\\",\\r\\n g = {\\r\\n doc: document,\\r\\n win: window\\r\\n },\\r\\n oldRaphael = {\\r\\n was: Object.prototype[has].call(g.win, \\\"Raphael\\\"),\\r\\n is: g.win.Raphael\\r\\n },\\r\\n Paper = function () {\\r\\n /*\\\\\\r\\n * Paper.ca\\r\\n [ property (object) ]\\r\\n **\\r\\n * Shortcut for @Paper.customAttributes\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Paper.customAttributes\\r\\n [ property (object) ]\\r\\n **\\r\\n * If you have a set of attributes that you would like to represent\\r\\n * as a function of some number you can do it easily with custom attributes:\\r\\n > Usage\\r\\n | paper.customAttributes.hue = function (num) {\\r\\n | num = num % 1;\\r\\n | return {fill: \\\"hsb(\\\" + num + \\\", 0.75, 1)\\\"};\\r\\n | };\\r\\n | // Custom attribute “hue” will change fill\\r\\n | // to be given hue with fixed saturation and brightness.\\r\\n | // Now you can use it like this:\\r\\n | var c = paper.circle(10, 10, 10).attr({hue: .45});\\r\\n | // or even like this:\\r\\n | c.animate({hue: 1}, 1e3);\\r\\n |\\r\\n | // You could also create custom attribute\\r\\n | // with multiple parameters:\\r\\n | paper.customAttributes.hsb = function (h, s, b) {\\r\\n | return {fill: \\\"hsb(\\\" + [h, s, b].join(\\\",\\\") + \\\")\\\"};\\r\\n | };\\r\\n | c.attr({hsb: \\\"0.5 .8 1\\\"});\\r\\n | c.animate({hsb: [1, 0, 0.5]}, 1e3);\\r\\n \\\\*/\\r\\n this.ca = this.customAttributes = {};\\r\\n },\\r\\n paperproto,\\r\\n appendChild = \\\"appendChild\\\",\\r\\n apply = \\\"apply\\\",\\r\\n concat = \\\"concat\\\",\\r\\n supportsTouch = ('ontouchstart' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test\\r\\n E = \\\"\\\",\\r\\n S = \\\" \\\",\\r\\n Str = String,\\r\\n split = \\\"split\\\",\\r\\n events = \\\"click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend touchcancel\\\"[split](S),\\r\\n touchMap = {\\r\\n mousedown: \\\"touchstart\\\",\\r\\n mousemove: \\\"touchmove\\\",\\r\\n mouseup: \\\"touchend\\\"\\r\\n },\\r\\n lowerCase = Str.prototype.toLowerCase,\\r\\n math = Math,\\r\\n mmax = math.max,\\r\\n mmin = math.min,\\r\\n abs = math.abs,\\r\\n pow = math.pow,\\r\\n PI = math.PI,\\r\\n nu = \\\"number\\\",\\r\\n string = \\\"string\\\",\\r\\n array = \\\"array\\\",\\r\\n toString = \\\"toString\\\",\\r\\n fillString = \\\"fill\\\",\\r\\n objectToString = Object.prototype.toString,\\r\\n paper = {},\\r\\n push = \\\"push\\\",\\r\\n ISURL = R._ISURL = /^url\\\\(['\\\"]?(.+?)['\\\"]?\\\\)$/i,\\r\\n colourRegExp = /^\\\\s*((#[a-f\\\\d]{6})|(#[a-f\\\\d]{3})|rgba?\\\\(\\\\s*([\\\\d\\\\.]+%?\\\\s*,\\\\s*[\\\\d\\\\.]+%?\\\\s*,\\\\s*[\\\\d\\\\.]+%?(?:\\\\s*,\\\\s*[\\\\d\\\\.]+%?)?)\\\\s*\\\\)|hsba?\\\\(\\\\s*([\\\\d\\\\.]+(?:deg|\\\\xb0|%)?\\\\s*,\\\\s*[\\\\d\\\\.]+%?\\\\s*,\\\\s*[\\\\d\\\\.]+(?:%?\\\\s*,\\\\s*[\\\\d\\\\.]+)?)%?\\\\s*\\\\)|hsla?\\\\(\\\\s*([\\\\d\\\\.]+(?:deg|\\\\xb0|%)?\\\\s*,\\\\s*[\\\\d\\\\.]+%?\\\\s*,\\\\s*[\\\\d\\\\.]+(?:%?\\\\s*,\\\\s*[\\\\d\\\\.]+)?)%?\\\\s*\\\\))\\\\s*$/i,\\r\\n isnan = {\\\"NaN\\\": 1, \\\"Infinity\\\": 1, \\\"-Infinity\\\": 1},\\r\\n bezierrg = /^(?:cubic-)?bezier\\\\(([^,]+),([^,]+),([^,]+),([^\\\\)]+)\\\\)/,\\r\\n round = math.round,\\r\\n setAttribute = \\\"setAttribute\\\",\\r\\n toFloat = parseFloat,\\r\\n toInt = parseInt,\\r\\n upperCase = Str.prototype.toUpperCase,\\r\\n availableAttrs = R._availableAttrs = {\\r\\n \\\"arrow-end\\\": \\\"none\\\",\\r\\n \\\"arrow-start\\\": \\\"none\\\",\\r\\n blur: 0,\\r\\n \\\"clip-rect\\\": \\\"0 0 1e9 1e9\\\",\\r\\n cursor: \\\"default\\\",\\r\\n cx: 0,\\r\\n cy: 0,\\r\\n fill: \\\"#fff\\\",\\r\\n \\\"fill-opacity\\\": 1,\\r\\n font: '10px \\\"Arial\\\"',\\r\\n \\\"font-family\\\": '\\\"Arial\\\"',\\r\\n \\\"font-size\\\": \\\"10\\\",\\r\\n \\\"font-style\\\": \\\"normal\\\",\\r\\n \\\"font-weight\\\": 400,\\r\\n gradient: 0,\\r\\n height: 0,\\r\\n href: \\\"http://raphaeljs.com/\\\",\\r\\n \\\"letter-spacing\\\": 0,\\r\\n opacity: 1,\\r\\n path: \\\"M0,0\\\",\\r\\n r: 0,\\r\\n rx: 0,\\r\\n ry: 0,\\r\\n src: \\\"\\\",\\r\\n stroke: \\\"#000\\\",\\r\\n \\\"stroke-dasharray\\\": \\\"\\\",\\r\\n \\\"stroke-linecap\\\": \\\"butt\\\",\\r\\n \\\"stroke-linejoin\\\": \\\"butt\\\",\\r\\n \\\"stroke-miterlimit\\\": 0,\\r\\n \\\"stroke-opacity\\\": 1,\\r\\n \\\"stroke-width\\\": 1,\\r\\n \\\"stroke-scale\\\": false, // FreeGroup: draw2d enhancement\\r\\n target: \\\"_blank\\\",\\r\\n \\\"text-anchor\\\": \\\"middle\\\",\\r\\n title: \\\"Raphael\\\",\\r\\n transform: \\\"\\\",\\r\\n width: 0,\\r\\n x: 0,\\r\\n y: 0\\r\\n },\\r\\n availableAnimAttrs = R._availableAnimAttrs = {\\r\\n blur: nu,\\r\\n \\\"clip-rect\\\": \\\"csv\\\",\\r\\n cx: nu,\\r\\n cy: nu,\\r\\n fill: \\\"colour\\\",\\r\\n \\\"fill-opacity\\\": nu,\\r\\n \\\"font-size\\\": nu,\\r\\n height: nu,\\r\\n opacity: nu,\\r\\n path: \\\"path\\\",\\r\\n r: nu,\\r\\n rx: nu,\\r\\n ry: nu,\\r\\n stroke: \\\"colour\\\",\\r\\n \\\"stroke-opacity\\\": nu,\\r\\n \\\"stroke-width\\\": nu,\\r\\n transform: \\\"transform\\\",\\r\\n width: nu,\\r\\n x: nu,\\r\\n y: nu\\r\\n },\\r\\n whitespace = /[\\\\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]/g,\\r\\n commaSpaces = /[\\\\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]*,[\\\\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]*/,\\r\\n hsrg = {hs: 1, rg: 1},\\r\\n p2s = /,?([achlmqrstvxz]),?/gi,\\r\\n pathCommand = /([achlmrqstvz])[\\\\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,]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[\\\\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]*,?[\\\\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]*)+)/ig,\\r\\n tCommand = /([rstm])[\\\\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,]*((-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?[\\\\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]*,?[\\\\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]*)+)/ig,\\r\\n pathValues = /(-?\\\\d*\\\\.?\\\\d*(?:e[\\\\-+]?\\\\d+)?)[\\\\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]*,?[\\\\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]*/ig,\\r\\n radial_gradient = R._radial_gradient = /^r(?:\\\\(([^,]+?)[\\\\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]*,[\\\\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]*([^\\\\)]+?)\\\\))?/,\\r\\n eldata = {},\\r\\n sortByKey = function (a, b) {\\r\\n return a.key - b.key;\\r\\n },\\r\\n sortByNumber = function (a, b) {\\r\\n return toFloat(a) - toFloat(b);\\r\\n },\\r\\n fun = function () {},\\r\\n pipe = function (x) {\\r\\n return x;\\r\\n },\\r\\n rectPath = R._rectPath = function (x, y, w, h, r) {\\r\\n if (r) {\\r\\n return [[\\\"M\\\", x + r, y], [\\\"l\\\", w - r * 2, 0], [\\\"a\\\", r, r, 0, 0, 1, r, r], [\\\"l\\\", 0, h - r * 2], [\\\"a\\\", r, r, 0, 0, 1, -r, r], [\\\"l\\\", r * 2 - w, 0], [\\\"a\\\", r, r, 0, 0, 1, -r, -r], [\\\"l\\\", 0, r * 2 - h], [\\\"a\\\", r, r, 0, 0, 1, r, -r], [\\\"z\\\"]];\\r\\n }\\r\\n return [[\\\"M\\\", x, y], [\\\"l\\\", w, 0], [\\\"l\\\", 0, h], [\\\"l\\\", -w, 0], [\\\"z\\\"]];\\r\\n },\\r\\n ellipsePath = function (x, y, rx, ry) {\\r\\n if (ry == null) {\\r\\n ry = rx;\\r\\n }\\r\\n return [[\\\"M\\\", x, y], [\\\"m\\\", 0, -ry], [\\\"a\\\", rx, ry, 0, 1, 1, 0, 2 * ry], [\\\"a\\\", rx, ry, 0, 1, 1, 0, -2 * ry], [\\\"z\\\"]];\\r\\n },\\r\\n getPath = R._getPath = {\\r\\n path: function (el) {\\r\\n return el.attr(\\\"path\\\");\\r\\n },\\r\\n circle: function (el) {\\r\\n var a = el.attrs;\\r\\n return ellipsePath(a.cx, a.cy, a.r);\\r\\n },\\r\\n ellipse: function (el) {\\r\\n var a = el.attrs;\\r\\n return ellipsePath(a.cx, a.cy, a.rx, a.ry);\\r\\n },\\r\\n rect: function (el) {\\r\\n var a = el.attrs;\\r\\n return rectPath(a.x, a.y, a.width, a.height, a.r);\\r\\n },\\r\\n image: function (el) {\\r\\n var a = el.attrs;\\r\\n return rectPath(a.x, a.y, a.width, a.height);\\r\\n },\\r\\n text: function (el) {\\r\\n var bbox = el._getBBox();\\r\\n return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);\\r\\n },\\r\\n set : function(el) {\\r\\n var bbox = el._getBBox();\\r\\n return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);\\r\\n }\\r\\n },\\r\\n /*\\\\\\r\\n * Raphael.mapPath\\r\\n [ method ]\\r\\n **\\r\\n * Transform the path string with given matrix.\\r\\n > Parameters\\r\\n - path (string) path string\\r\\n - matrix (object) see @Matrix\\r\\n = (string) transformed path string\\r\\n \\\\*/\\r\\n mapPath = R.mapPath = function (path, matrix) {\\r\\n if (!matrix) {\\r\\n return path;\\r\\n }\\r\\n var x, y, i, j, ii, jj, pathi;\\r\\n path = path2curve(path);\\r\\n for (i = 0, ii = path.length; i < ii; i++) {\\r\\n pathi = path[i];\\r\\n for (j = 1, jj = pathi.length; j < jj; j += 2) {\\r\\n x = matrix.x(pathi[j], pathi[j + 1]);\\r\\n y = matrix.y(pathi[j], pathi[j + 1]);\\r\\n pathi[j] = x;\\r\\n pathi[j + 1] = y;\\r\\n }\\r\\n }\\r\\n return path;\\r\\n };\\r\\n\\r\\n R._g = g;\\r\\n /*\\\\\\r\\n * Raphael.type\\r\\n [ property (string) ]\\r\\n **\\r\\n * Can be “SVG”, “VML” or empty, depending on browser support.\\r\\n \\\\*/\\r\\n R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature(\\\"http://www.w3.org/TR/SVG11/feature#BasicStructure\\\", \\\"1.1\\\") ? \\\"SVG\\\" : \\\"VML\\\");\\r\\n if (R.type == \\\"VML\\\") {\\r\\n var d = g.doc.createElement(\\\"div\\\"),\\r\\n b;\\r\\n d.innerHTML = '<v:shape adj=\\\"1\\\"/>';\\r\\n b = d.firstChild;\\r\\n b.style.behavior = \\\"url(#default#VML)\\\";\\r\\n if (!(b && typeof b.adj == \\\"object\\\")) {\\r\\n return (R.type = E);\\r\\n }\\r\\n d = null;\\r\\n }\\r\\n /*\\\\\\r\\n * Raphael.svg\\r\\n [ property (boolean) ]\\r\\n **\\r\\n * `true` if browser supports SVG.\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Raphael.vml\\r\\n [ property (boolean) ]\\r\\n **\\r\\n * `true` if browser supports VML.\\r\\n \\\\*/\\r\\n R.svg = !(R.vml = R.type == \\\"VML\\\");\\r\\n R._Paper = Paper;\\r\\n /*\\\\\\r\\n * Raphael.fn\\r\\n [ property (object) ]\\r\\n **\\r\\n * You can add your own method to the canvas. For example if you want to draw a pie chart,\\r\\n * you can create your own pie chart function and ship it as a Raphaël plugin. To do this\\r\\n * you need to extend the `Raphael.fn` object. You should modify the `fn` object before a\\r\\n * Raphaël instance is created, otherwise it will take no effect. Please note that the\\r\\n * ability for namespaced plugins was removed in Raphael 2.0. It is up to the plugin to\\r\\n * ensure any namespacing ensures proper context.\\r\\n > Usage\\r\\n | Raphael.fn.arrow = function (x1, y1, x2, y2, size) {\\r\\n | return this.path( ... );\\r\\n | };\\r\\n | // or create namespace\\r\\n | Raphael.fn.mystuff = {\\r\\n | arrow: function () {…},\\r\\n | star: function () {…},\\r\\n | // etc…\\r\\n | };\\r\\n | var paper = Raphael(10, 10, 630, 480);\\r\\n | // then use it\\r\\n | paper.arrow(10, 10, 30, 30, 5).attr({fill: \\\"#f00\\\"});\\r\\n | paper.mystuff.arrow();\\r\\n | paper.mystuff.star();\\r\\n \\\\*/\\r\\n R.fn = paperproto = Paper.prototype = R.prototype;\\r\\n R._id = 0;\\r\\n R._oid = 0;\\r\\n /*\\\\\\r\\n * Raphael.is\\r\\n [ method ]\\r\\n **\\r\\n * Handful of replacements for `typeof` operator.\\r\\n > Parameters\\r\\n - o (…) any object or primitive\\r\\n - type (string) name of the type, i.e. “string”, “function”, “number”, etc.\\r\\n = (boolean) is given value is of given type\\r\\n \\\\*/\\r\\n R.is = function (o, type) {\\r\\n type = lowerCase.call(type);\\r\\n if (type == \\\"finite\\\") {\\r\\n return !isnan[has](+o);\\r\\n }\\r\\n if (type == \\\"array\\\") {\\r\\n return o instanceof Array;\\r\\n }\\r\\n return (type == \\\"null\\\" && o === null) ||\\r\\n (type == typeof o && o !== null) ||\\r\\n (type == \\\"object\\\" && o === Object(o)) ||\\r\\n (type == \\\"array\\\" && Array.isArray && Array.isArray(o)) ||\\r\\n objectToString.call(o).slice(8, -1).toLowerCase() == type;\\r\\n };\\r\\n\\r\\n function clone(obj) {\\r\\n if (typeof obj == \\\"function\\\" || Object(obj) !== obj) {\\r\\n return obj;\\r\\n }\\r\\n var res = new obj.constructor;\\r\\n for (var key in obj) if (obj[has](key)) {\\r\\n res[key] = clone(obj[key]);\\r\\n }\\r\\n return res;\\r\\n }\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.angle\\r\\n [ method ]\\r\\n **\\r\\n * Returns angle between two or three points\\r\\n > Parameters\\r\\n - x1 (number) x coord of first point\\r\\n - y1 (number) y coord of first point\\r\\n - x2 (number) x coord of second point\\r\\n - y2 (number) y coord of second point\\r\\n - x3 (number) #optional x coord of third point\\r\\n - y3 (number) #optional y coord of third point\\r\\n = (number) angle in degrees.\\r\\n \\\\*/\\r\\n R.angle = function (x1, y1, x2, y2, x3, y3) {\\r\\n if (x3 == null) {\\r\\n var x = x1 - x2,\\r\\n y = y1 - y2;\\r\\n if (!x && !y) {\\r\\n return 0;\\r\\n }\\r\\n return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360;\\r\\n } else {\\r\\n return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3);\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.rad\\r\\n [ method ]\\r\\n **\\r\\n * Transform angle to radians\\r\\n > Parameters\\r\\n - deg (number) angle in degrees\\r\\n = (number) angle in radians.\\r\\n \\\\*/\\r\\n R.rad = function (deg) {\\r\\n return deg % 360 * PI / 180;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.deg\\r\\n [ method ]\\r\\n **\\r\\n * Transform angle to degrees\\r\\n > Parameters\\r\\n - rad (number) angle in radians\\r\\n = (number) angle in degrees.\\r\\n \\\\*/\\r\\n R.deg = function (rad) {\\r\\n return Math.round ((rad * 180 / PI% 360)* 1000) / 1000;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.snapTo\\r\\n [ method ]\\r\\n **\\r\\n * Snaps given value to given grid.\\r\\n > Parameters\\r\\n - values (array|number) given array of values or step of the grid\\r\\n - value (number) value to adjust\\r\\n - tolerance (number) #optional tolerance for snapping. Default is `10`.\\r\\n = (number) adjusted value.\\r\\n \\\\*/\\r\\n R.snapTo = function (values, value, tolerance) {\\r\\n tolerance = R.is(tolerance, \\\"finite\\\") ? tolerance : 10;\\r\\n if (R.is(values, array)) {\\r\\n var i = values.length;\\r\\n while (i--) if (abs(values[i] - value) <= tolerance) {\\r\\n return values[i];\\r\\n }\\r\\n } else {\\r\\n values = +values;\\r\\n var rem = value % values;\\r\\n if (rem < tolerance) {\\r\\n return value - rem;\\r\\n }\\r\\n if (rem > values - tolerance) {\\r\\n return value - rem + values;\\r\\n }\\r\\n }\\r\\n return value;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.createUUID\\r\\n [ method ]\\r\\n **\\r\\n * Returns RFC4122, version 4 ID\\r\\n \\\\*/\\r\\n var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) {\\r\\n return function () {\\r\\n return \\\"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\\\".replace(uuidRegEx, uuidReplacer).toUpperCase();\\r\\n };\\r\\n })(/[xy]/g, function (c) {\\r\\n var r = math.random() * 16 | 0,\\r\\n v = c == \\\"x\\\" ? r : (r & 3 | 8);\\r\\n return v.toString(16);\\r\\n });\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.setWindow\\r\\n [ method ]\\r\\n **\\r\\n * Used when you need to draw in `<iframe>`. Switched window to the iframe one.\\r\\n > Parameters\\r\\n - newwin (window) new window object\\r\\n \\\\*/\\r\\n R.setWindow = function (newwin) {\\r\\n eve(\\\"raphael.setWindow\\\", R, g.win, newwin);\\r\\n g.win = newwin;\\r\\n g.doc = g.win.document;\\r\\n if (R._engine.initWin) {\\r\\n R._engine.initWin(g.win);\\r\\n }\\r\\n };\\r\\n var toHex = function (color) {\\r\\n if (R.vml) {\\r\\n // http://dean.edwards.name/weblog/2009/10/convert-any-colour-value-to-hex-in-msie/\\r\\n var trim = /^\\\\s+|\\\\s+$/g;\\r\\n var bod;\\r\\n try {\\r\\n var docum = new ActiveXObject(\\\"htmlfile\\\");\\r\\n docum.write(\\\"<body>\\\");\\r\\n docum.close();\\r\\n bod = docum.body;\\r\\n } catch(e) {\\r\\n bod = createPopup().document.body;\\r\\n }\\r\\n var range = bod.createTextRange();\\r\\n toHex = cacher(function (color) {\\r\\n try {\\r\\n bod.style.color = Str(color).replace(trim, E);\\r\\n var value = range.queryCommandValue(\\\"ForeColor\\\");\\r\\n value = ((value & 255) << 16) | (value & 65280) | ((value & 16711680) >>> 16);\\r\\n return \\\"#\\\" + (\\\"000000\\\" + value.toString(16)).slice(-6);\\r\\n } catch(e) {\\r\\n return \\\"none\\\";\\r\\n }\\r\\n });\\r\\n } else {\\r\\n var i = g.doc.createElement(\\\"i\\\");\\r\\n i.title = \\\"Rapha\\\\xebl Colour Picker\\\";\\r\\n i.style.display = \\\"none\\\";\\r\\n g.doc.body.appendChild(i);\\r\\n toHex = cacher(function (color) {\\r\\n i.style.color = color;\\r\\n return g.doc.defaultView.getComputedStyle(i, E).getPropertyValue(\\\"color\\\");\\r\\n });\\r\\n }\\r\\n return toHex(color);\\r\\n },\\r\\n hsbtoString = function () {\\r\\n return \\\"hsb(\\\" + [this.h, this.s, this.b] + \\\")\\\";\\r\\n },\\r\\n hsltoString = function () {\\r\\n return \\\"hsl(\\\" + [this.h, this.s, this.l] + \\\")\\\";\\r\\n },\\r\\n rgbtoString = function () {\\r\\n return this.hex;\\r\\n },\\r\\n prepareRGB = function (r, g, b) {\\r\\n if (g == null && R.is(r, \\\"object\\\") && \\\"r\\\" in r && \\\"g\\\" in r && \\\"b\\\" in r) {\\r\\n b = r.b;\\r\\n g = r.g;\\r\\n r = r.r;\\r\\n }\\r\\n if (g == null && R.is(r, string)) {\\r\\n var clr = R.getRGB(r);\\r\\n r = clr.r;\\r\\n g = clr.g;\\r\\n b = clr.b;\\r\\n }\\r\\n if (r > 1 || g > 1 || b > 1) {\\r\\n r /= 255;\\r\\n g /= 255;\\r\\n b /= 255;\\r\\n }\\r\\n\\r\\n return [r, g, b];\\r\\n },\\r\\n packageRGB = function (r, g, b, o) {\\r\\n r *= 255;\\r\\n g *= 255;\\r\\n b *= 255;\\r\\n var rgb = {\\r\\n r: r,\\r\\n g: g,\\r\\n b: b,\\r\\n hex: R.rgb(r, g, b),\\r\\n toString: rgbtoString\\r\\n };\\r\\n R.is(o, \\\"finite\\\") && (rgb.opacity = o);\\r\\n return rgb;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.color\\r\\n [ method ]\\r\\n **\\r\\n * Parses the color string and returns object with all values for the given color.\\r\\n > Parameters\\r\\n - clr (string) color string in one of the supported formats (see @Raphael.getRGB)\\r\\n = (object) Combined RGB & HSB object in format:\\r\\n o {\\r\\n o r (number) red,\\r\\n o g (number) green,\\r\\n o b (number) blue,\\r\\n o hex (string) color in HTML/CSS format: #••••••,\\r\\n o error (boolean) `true` if string can’t be parsed,\\r\\n o h (number) hue,\\r\\n o s (number) saturation,\\r\\n o v (number) value (brightness),\\r\\n o l (number) lightness\\r\\n o }\\r\\n \\\\*/\\r\\n R.color = function (clr) {\\r\\n var rgb;\\r\\n if (R.is(clr, \\\"object\\\") && \\\"h\\\" in clr && \\\"s\\\" in clr && \\\"b\\\" in clr) {\\r\\n rgb = R.hsb2rgb(clr);\\r\\n clr.r = rgb.r;\\r\\n clr.g = rgb.g;\\r\\n clr.b = rgb.b;\\r\\n clr.hex = rgb.hex;\\r\\n } else if (R.is(clr, \\\"object\\\") && \\\"h\\\" in clr && \\\"s\\\" in clr && \\\"l\\\" in clr) {\\r\\n rgb = R.hsl2rgb(clr);\\r\\n clr.r = rgb.r;\\r\\n clr.g = rgb.g;\\r\\n clr.b = rgb.b;\\r\\n clr.hex = rgb.hex;\\r\\n } else {\\r\\n if (R.is(clr, \\\"string\\\")) {\\r\\n clr = R.getRGB(clr);\\r\\n }\\r\\n if (R.is(clr, \\\"object\\\") && \\\"r\\\" in clr && \\\"g\\\" in clr && \\\"b\\\" in clr) {\\r\\n rgb = R.rgb2hsl(clr);\\r\\n clr.h = rgb.h;\\r\\n clr.s = rgb.s;\\r\\n clr.l = rgb.l;\\r\\n rgb = R.rgb2hsb(clr);\\r\\n clr.v = rgb.b;\\r\\n } else {\\r\\n clr = {hex: \\\"none\\\"};\\r\\n clr.r = clr.g = clr.b = clr.h = clr.s = clr.v = clr.l = -1;\\r\\n }\\r\\n }\\r\\n clr.toString = rgbtoString;\\r\\n return clr;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.hsb2rgb\\r\\n [ method ]\\r\\n **\\r\\n * Converts HSB values to RGB object.\\r\\n > Parameters\\r\\n - h (number) hue\\r\\n - s (number) saturation\\r\\n - v (number) value or brightness\\r\\n = (object) RGB object in format:\\r\\n o {\\r\\n o r (number) red,\\r\\n o g (number) green,\\r\\n o b (number) blue,\\r\\n o hex (string) color in HTML/CSS format: #••••••\\r\\n o }\\r\\n \\\\*/\\r\\n R.hsb2rgb = function (h, s, v, o) {\\r\\n if (this.is(h, \\\"object\\\") && \\\"h\\\" in h && \\\"s\\\" in h && \\\"b\\\" in h) {\\r\\n v = h.b;\\r\\n s = h.s;\\r\\n o = h.o;\\r\\n h = h.h;\\r\\n }\\r\\n h *= 360;\\r\\n var R, G, B, X, C;\\r\\n h = (h % 360) / 60;\\r\\n C = v * s;\\r\\n X = C * (1 - abs(h % 2 - 1));\\r\\n R = G = B = v - C;\\r\\n\\r\\n h = ~~h;\\r\\n R += [C, X, 0, 0, X, C][h];\\r\\n G += [X, C, C, X, 0, 0][h];\\r\\n B += [0, 0, X, C, C, X][h];\\r\\n return packageRGB(R, G, B, o);\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.hsl2rgb\\r\\n [ method ]\\r\\n **\\r\\n * Converts HSL values to RGB object.\\r\\n > Parameters\\r\\n - h (number) hue\\r\\n - s (number) saturation\\r\\n - l (number) luminosity\\r\\n = (object) RGB object in format:\\r\\n o {\\r\\n o r (number) red,\\r\\n o g (number) green,\\r\\n o b (number) blue,\\r\\n o hex (string) color in HTML/CSS format: #••••••\\r\\n o }\\r\\n \\\\*/\\r\\n R.hsl2rgb = function (h, s, l, o) {\\r\\n if (this.is(h, \\\"object\\\") && \\\"h\\\" in h && \\\"s\\\" in h && \\\"l\\\" in h) {\\r\\n l = h.l;\\r\\n s = h.s;\\r\\n h = h.h;\\r\\n }\\r\\n if (h > 1 || s > 1 || l > 1) {\\r\\n h /= 360;\\r\\n s /= 100;\\r\\n l /= 100;\\r\\n }\\r\\n h *= 360;\\r\\n var R, G, B, X, C;\\r\\n h = (h % 360) / 60;\\r\\n C = 2 * s * (l < .5 ? l : 1 - l);\\r\\n X = C * (1 - abs(h % 2 - 1));\\r\\n R = G = B = l - C / 2;\\r\\n\\r\\n h = ~~h;\\r\\n R += [C, X, 0, 0, X, C][h];\\r\\n G += [X, C, C, X, 0, 0][h];\\r\\n B += [0, 0, X, C, C, X][h];\\r\\n return packageRGB(R, G, B, o);\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.rgb2hsb\\r\\n [ method ]\\r\\n **\\r\\n * Converts RGB values to HSB object.\\r\\n > Parameters\\r\\n - r (number) red\\r\\n - g (number) green\\r\\n - b (number) blue\\r\\n = (object) HSB object in format:\\r\\n o {\\r\\n o h (number) hue\\r\\n o s (number) saturation\\r\\n o b (number) brightness\\r\\n o }\\r\\n \\\\*/\\r\\n R.rgb2hsb = function (r, g, b) {\\r\\n b = prepareRGB(r, g, b);\\r\\n r = b[0];\\r\\n g = b[1];\\r\\n b = b[2];\\r\\n\\r\\n var H, S, V, C;\\r\\n V = mmax(r, g, b);\\r\\n C = V - mmin(r, g, b);\\r\\n H = (C == 0 ? null :\\r\\n V == r ? (g - b) / C :\\r\\n V == g ? (b - r) / C + 2 :\\r\\n (r - g) / C + 4\\r\\n );\\r\\n H = ((H + 360) % 6) * 60 / 360;\\r\\n S = C == 0 ? 0 : C / V;\\r\\n return {h: H, s: S, b: V, toString: hsbtoString};\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.rgb2hsl\\r\\n [ method ]\\r\\n **\\r\\n * Converts RGB values to HSL object.\\r\\n > Parameters\\r\\n - r (number) red\\r\\n - g (number) green\\r\\n - b (number) blue\\r\\n = (object) HSL object in format:\\r\\n o {\\r\\n o h (number) hue\\r\\n o s (number) saturation\\r\\n o l (number) luminosity\\r\\n o }\\r\\n \\\\*/\\r\\n R.rgb2hsl = function (r, g, b) {\\r\\n b = prepareRGB(r, g, b);\\r\\n r = b[0];\\r\\n g = b[1];\\r\\n b = b[2];\\r\\n\\r\\n var H, S, L, M, m, C;\\r\\n M = mmax(r, g, b);\\r\\n m = mmin(r, g, b);\\r\\n C = M - m;\\r\\n H = (C == 0 ? null :\\r\\n M == r ? (g - b) / C :\\r\\n M == g ? (b - r) / C + 2 :\\r\\n (r - g) / C + 4);\\r\\n H = ((H + 360) % 6) * 60 / 360;\\r\\n L = (M + m) / 2;\\r\\n S = (C == 0 ? 0 :\\r\\n L < .5 ? C / (2 * L) :\\r\\n C / (2 - 2 * L));\\r\\n return {h: H, s: S, l: L, toString: hsltoString};\\r\\n };\\r\\n R._path2string = function () {\\r\\n return this.join(\\\",\\\").replace(p2s, \\\"$1\\\");\\r\\n };\\r\\n function repush(array, item) {\\r\\n for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) {\\r\\n return array.push(array.splice(i, 1)[0]);\\r\\n }\\r\\n }\\r\\n function cacher(f, scope, postprocessor) {\\r\\n function newf() {\\r\\n var arg = Array.prototype.slice.call(arguments, 0),\\r\\n args = arg.join(\\\"\\\\u2400\\\"),\\r\\n cache = newf.cache = newf.cache || {},\\r\\n count = newf.count = newf.count || [];\\r\\n if (cache[has](args)) {\\r\\n repush(count, args);\\r\\n return postprocessor ? postprocessor(cache[args]) : cache[args];\\r\\n }\\r\\n count.length >= 1e3 && delete cache[count.shift()];\\r\\n count.push(args);\\r\\n cache[args] = f[apply](scope, arg);\\r\\n return postprocessor ? postprocessor(cache[args]) : cache[args];\\r\\n }\\r\\n return newf;\\r\\n }\\r\\n\\r\\n var preload = R._preload = function (src, f) {\\r\\n var img = g.doc.createElement(\\\"img\\\");\\r\\n img.style.cssText = \\\"position:absolute;left:-9999em;top:-9999em\\\";\\r\\n img.onload = function () {\\r\\n f.call(this);\\r\\n this.onload = null;\\r\\n g.doc.body.removeChild(this);\\r\\n };\\r\\n img.onerror = function () {\\r\\n g.doc.body.removeChild(this);\\r\\n };\\r\\n g.doc.body.appendChild(img);\\r\\n img.src = src;\\r\\n };\\r\\n\\r\\n function clrToString() {\\r\\n return this.hex;\\r\\n }\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.getRGB\\r\\n [ method ]\\r\\n **\\r\\n * Parses colour string as RGB object\\r\\n > Parameters\\r\\n - colour (string) colour string in one of formats:\\r\\n # <ul>\\r\\n # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>\\r\\n # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>\\r\\n # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>\\r\\n # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li>\\r\\n # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li>\\r\\n # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li>\\r\\n # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>\\r\\n # <li>hsl(•••, •••, •••) — same as hsb</li>\\r\\n # <li>hsl(•••%, •••%, •••%) — same as hsb</li>\\r\\n # </ul>\\r\\n = (object) RGB object in format:\\r\\n o {\\r\\n o r (number) red,\\r\\n o g (number) green,\\r\\n o b (number) blue\\r\\n o hex (string) color in HTML/CSS format: #••••••,\\r\\n o error (boolean) true if string can’t be parsed\\r\\n o }\\r\\n \\\\*/\\r\\n R.getRGB = cacher(function (colour) {\\r\\n if (!colour || !!((colour = Str(colour)).indexOf(\\\"-\\\") + 1)) {\\r\\n return {r: -1, g: -1, b: -1, hex: \\\"none\\\", error: 1, toString: clrToString};\\r\\n }\\r\\n if (colour == \\\"none\\\") {\\r\\n return {r: -1, g: -1, b: -1, hex: \\\"none\\\", toString: clrToString};\\r\\n }\\r\\n !(hsrg[has](colour.toLowerCase().substring(0, 2)) || colour.charAt() == \\\"#\\\") && (colour = toHex(colour));\\r\\n var res,\\r\\n red,\\r\\n green,\\r\\n blue,\\r\\n opacity,\\r\\n t,\\r\\n values,\\r\\n rgb = colour.match(colourRegExp);\\r\\n if (rgb) {\\r\\n if (rgb[2]) {\\r\\n blue = toInt(rgb[2].substring(5), 16);\\r\\n green = toInt(rgb[2].substring(3, 5), 16);\\r\\n red = toInt(rgb[2].substring(1, 3), 16);\\r\\n }\\r\\n if (rgb[3]) {\\r\\n blue = toInt((t = rgb[3].charAt(3)) + t, 16);\\r\\n green = toInt((t = rgb[3].charAt(2)) + t, 16);\\r\\n red = toInt((t = rgb[3].charAt(1)) + t, 16);\\r\\n }\\r\\n if (rgb[4]) {\\r\\n values = rgb[4][split](commaSpaces);\\r\\n red = toFloat(values[0]);\\r\\n values[0].slice(-1) == \\\"%\\\" && (red *= 2.55);\\r\\n green = toFloat(values[1]);\\r\\n values[1].slice(-1) == \\\"%\\\" && (green *= 2.55);\\r\\n blue = toFloat(values[2]);\\r\\n values[2].slice(-1) == \\\"%\\\" && (blue *= 2.55);\\r\\n rgb[1].toLowerCase().slice(0, 4) == \\\"rgba\\\" && (opacity = toFloat(values[3]));\\r\\n values[3] && values[3].slice(-1) == \\\"%\\\" && (opacity /= 100);\\r\\n }\\r\\n if (rgb[5]) {\\r\\n values = rgb[5][split](commaSpaces);\\r\\n red = toFloat(values[0]);\\r\\n values[0].slice(-1) == \\\"%\\\" && (red *= 2.55);\\r\\n green = toFloat(values[1]);\\r\\n values[1].slice(-1) == \\\"%\\\" && (green *= 2.55);\\r\\n blue = toFloat(values[2]);\\r\\n values[2].slice(-1) == \\\"%\\\" && (blue *= 2.55);\\r\\n (values[0].slice(-3) == \\\"deg\\\" || values[0].slice(-1) == \\\"\\\\xb0\\\") && (red /= 360);\\r\\n rgb[1].toLowerCase().slice(0, 4) == \\\"hsba\\\" && (opacity = toFloat(values[3]));\\r\\n values[3] && values[3].slice(-1) == \\\"%\\\" && (opacity /= 100);\\r\\n return R.hsb2rgb(red, green, blue, opacity);\\r\\n }\\r\\n if (rgb[6]) {\\r\\n values = rgb[6][split](commaSpaces);\\r\\n red = toFloat(values[0]);\\r\\n values[0].slice(-1) == \\\"%\\\" && (red *= 2.55);\\r\\n green = toFloat(values[1]);\\r\\n values[1].slice(-1) == \\\"%\\\" && (green *= 2.55);\\r\\n blue = toFloat(values[2]);\\r\\n values[2].slice(-1) == \\\"%\\\" && (blue *= 2.55);\\r\\n (values[0].slice(-3) == \\\"deg\\\" || values[0].slice(-1) == \\\"\\\\xb0\\\") && (red /= 360);\\r\\n rgb[1].toLowerCase().slice(0, 4) == \\\"hsla\\\" && (opacity = toFloat(values[3]));\\r\\n values[3] && values[3].slice(-1) == \\\"%\\\" && (opacity /= 100);\\r\\n return R.hsl2rgb(red, green, blue, opacity);\\r\\n }\\r\\n rgb = {r: red, g: green, b: blue, toString: clrToString};\\r\\n rgb.hex = \\\"#\\\" + (16777216 | blue | (green << 8) | (red << 16)).toString(16).slice(1);\\r\\n R.is(opacity, \\\"finite\\\") && (rgb.opacity = opacity);\\r\\n return rgb;\\r\\n }\\r\\n return {r: -1, g: -1, b: -1, hex: \\\"none\\\", error: 1, toString: clrToString};\\r\\n }, R);\\r\\n /*\\\\\\r\\n * Raphael.hsb\\r\\n [ method ]\\r\\n **\\r\\n * Converts HSB values to hex representation of the colour.\\r\\n > Parameters\\r\\n - h (number) hue\\r\\n - s (number) saturation\\r\\n - b (number) value or brightness\\r\\n = (string) hex representation of the colour.\\r\\n \\\\*/\\r\\n R.hsb = cacher(function (h, s, b) {\\r\\n return R.hsb2rgb(h, s, b).hex;\\r\\n });\\r\\n /*\\\\\\r\\n * Raphael.hsl\\r\\n [ method ]\\r\\n **\\r\\n * Converts HSL values to hex representation of the colour.\\r\\n > Parameters\\r\\n - h (number) hue\\r\\n - s (number) saturation\\r\\n - l (number) luminosity\\r\\n = (string) hex representation of the colour.\\r\\n \\\\*/\\r\\n R.hsl = cacher(function (h, s, l) {\\r\\n return R.hsl2rgb(h, s, l).hex;\\r\\n });\\r\\n /*\\\\\\r\\n * Raphael.rgb\\r\\n [ method ]\\r\\n **\\r\\n * Converts RGB values to hex representation of the colour.\\r\\n > Parameters\\r\\n - r (number) red\\r\\n - g (number) green\\r\\n - b (number) blue\\r\\n = (string) hex representation of the colour.\\r\\n \\\\*/\\r\\n R.rgb = cacher(function (r, g, b) {\\r\\n function round(x) { return (x + 0.5) | 0; }\\r\\n return \\\"#\\\" + (16777216 | round(b) | (round(g) << 8) | (round(r) << 16)).toString(16).slice(1);\\r\\n });\\r\\n /*\\\\\\r\\n * Raphael.getColor\\r\\n [ method ]\\r\\n **\\r\\n * On each call returns next colour in the spectrum. To reset it back to red call @Raphael.getColor.reset\\r\\n > Parameters\\r\\n - value (number) #optional brightness, default is `0.75`\\r\\n = (string) hex representation of the colour.\\r\\n \\\\*/\\r\\n R.getColor = function (value) {\\r\\n var start = this.getColor.start = this.getColor.start || {h: 0, s: 1, b: value || .75},\\r\\n rgb = this.hsb2rgb(start.h, start.s, start.b);\\r\\n start.h += .075;\\r\\n if (start.h > 1) {\\r\\n start.h = 0;\\r\\n start.s -= .2;\\r\\n start.s <= 0 && (this.getColor.start = {h: 0, s: 1, b: start.b});\\r\\n }\\r\\n return rgb.hex;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.getColor.reset\\r\\n [ method ]\\r\\n **\\r\\n * Resets spectrum position for @Raphael.getColor back to red.\\r\\n \\\\*/\\r\\n R.getColor.reset = function () {\\r\\n delete this.start;\\r\\n };\\r\\n\\r\\n // http://schepers.cc/getting-to-the-point\\r\\n function catmullRom2bezier(crp, z) {\\r\\n var d = [];\\r\\n for (var i = 0, iLen = crp.length; iLen - 2 * !z > i; i += 2) {\\r\\n var p = [\\r\\n {x: +crp[i - 2], y: +crp[i - 1]},\\r\\n {x: +crp[i], y: +crp[i + 1]},\\r\\n {x: +crp[i + 2], y: +crp[i + 3]},\\r\\n {x: +crp[i + 4], y: +crp[i + 5]}\\r\\n ];\\r\\n if (z) {\\r\\n if (!i) {\\r\\n p[0] = {x: +crp[iLen - 2], y: +crp[iLen - 1]};\\r\\n } else if (iLen - 4 == i) {\\r\\n p[3] = {x: +crp[0], y: +crp[1]};\\r\\n } else if (iLen - 2 == i) {\\r\\n p[2] = {x: +crp[0], y: +crp[1]};\\r\\n p[3] = {x: +crp[2], y: +crp[3]};\\r\\n }\\r\\n } else {\\r\\n if (iLen - 4 == i) {\\r\\n p[3] = p[2];\\r\\n } else if (!i) {\\r\\n p[0] = {x: +crp[i], y: +crp[i + 1]};\\r\\n }\\r\\n }\\r\\n d.push([\\\"C\\\",\\r\\n (-p[0].x + 6 * p[1].x + p[2].x) / 6,\\r\\n (-p[0].y + 6 * p[1].y + p[2].y) / 6,\\r\\n (p[1].x + 6 * p[2].x - p[3].x) / 6,\\r\\n (p[1].y + 6*p[2].y - p[3].y) / 6,\\r\\n p[2].x,\\r\\n p[2].y\\r\\n ]);\\r\\n }\\r\\n\\r\\n return d;\\r\\n }\\r\\n /*\\\\\\r\\n * Raphael.parsePathString\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Parses given path string into an array of arrays of path segments.\\r\\n > Parameters\\r\\n - pathString (string|array) path string or array of segments (in the last case it will be returned straight away)\\r\\n = (array) array of segments.\\r\\n \\\\*/\\r\\n R.parsePathString = function (pathString) {\\r\\n if (!pathString) {\\r\\n return null;\\r\\n }\\r\\n var pth = paths(pathString);\\r\\n if (pth.arr) {\\r\\n return pathClone(pth.arr);\\r\\n }\\r\\n\\r\\n var paramCounts = {a: 7, c: 6, h: 1, l: 2, m: 2, r: 4, q: 4, s: 4, t: 2, v: 1, z: 0},\\r\\n data = [];\\r\\n if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption\\r\\n data = pathClone(pathString);\\r\\n }\\r\\n if (!data.length) {\\r\\n Str(pathString).replace(pathCommand, function (a, b, c) {\\r\\n var params = [],\\r\\n name = b.toLowerCase();\\r\\n c.replace(pathValues, function (a, b) {\\r\\n b && params.push(+b);\\r\\n });\\r\\n if (name == \\\"m\\\" && params.length > 2) {\\r\\n data.push([b][concat](params.splice(0, 2)));\\r\\n name = \\\"l\\\";\\r\\n b = b == \\\"m\\\" ? \\\"l\\\" : \\\"L\\\";\\r\\n }\\r\\n if (name == \\\"r\\\") {\\r\\n data.push([b][concat](params));\\r\\n } else while (params.length >= paramCounts[name]) {\\r\\n data.push([b][concat](params.splice(0, paramCounts[name])));\\r\\n if (!paramCounts[name]) {\\r\\n break;\\r\\n }\\r\\n }\\r\\n });\\r\\n }\\r\\n data.toString = R._path2string;\\r\\n pth.arr = pathClone(data);\\r\\n return data;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.parseTransformString\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Parses given path string into an array of transformations.\\r\\n > Parameters\\r\\n - TString (string|array) transform string or array of transformations (in the last case it will be returned straight away)\\r\\n = (array) array of transformations.\\r\\n \\\\*/\\r\\n R.parseTransformString = cacher(function (TString) {\\r\\n if (!TString) {\\r\\n return null;\\r\\n }\\r\\n var paramCounts = {r: 3, s: 4, t: 2, m: 6},\\r\\n data = [];\\r\\n if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption\\r\\n data = pathClone(TString);\\r\\n }\\r\\n if (!data.length) {\\r\\n Str(TString).replace(tCommand, function (a, b, c) {\\r\\n var params = [],\\r\\n name = lowerCase.call(b);\\r\\n c.replace(pathValues, function (a, b) {\\r\\n b && params.push(+b);\\r\\n });\\r\\n data.push([b][concat](params));\\r\\n });\\r\\n }\\r\\n data.toString = R._path2string;\\r\\n return data;\\r\\n });\\r\\n // PATHS\\r\\n var paths = function (ps) {\\r\\n var p = paths.ps = paths.ps || {};\\r\\n if (p[ps]) {\\r\\n p[ps].sleep = 100;\\r\\n } else {\\r\\n p[ps] = {\\r\\n sleep: 100\\r\\n };\\r\\n }\\r\\n setTimeout(function () {\\r\\n for (var key in p) if (p[has](key) && key != ps) {\\r\\n p[key].sleep--;\\r\\n !p[key].sleep && delete p[key];\\r\\n }\\r\\n });\\r\\n return p[ps];\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.findDotsAtSegment\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Find dot coordinates on the given cubic bezier curve at the given t.\\r\\n > Parameters\\r\\n - p1x (number) x of the first point of the curve\\r\\n - p1y (number) y of the first point of the curve\\r\\n - c1x (number) x of the first anchor of the curve\\r\\n - c1y (number) y of the first anchor of the curve\\r\\n - c2x (number) x of the second anchor of the curve\\r\\n - c2y (number) y of the second anchor of the curve\\r\\n - p2x (number) x of the second point of the curve\\r\\n - p2y (number) y of the second point of the curve\\r\\n - t (number) position on the curve (0..1)\\r\\n = (object) point information in format:\\r\\n o {\\r\\n o x: (number) x coordinate of the point\\r\\n o y: (number) y coordinate of the point\\r\\n o m: {\\r\\n o x: (number) x coordinate of the left anchor\\r\\n o y: (number) y coordinate of the left anchor\\r\\n o }\\r\\n o n: {\\r\\n o x: (number) x coordinate of the right anchor\\r\\n o y: (number) y coordinate of the right anchor\\r\\n o }\\r\\n o start: {\\r\\n o x: (number) x coordinate of the start of the curve\\r\\n o y: (number) y coordinate of the start of the curve\\r\\n o }\\r\\n o end: {\\r\\n o x: (number) x coordinate of the end of the curve\\r\\n o y: (number) y coordinate of the end of the curve\\r\\n o }\\r\\n o alpha: (number) angle of the curve derivative at the point\\r\\n o }\\r\\n \\\\*/\\r\\n R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\\r\\n var t1 = 1 - t,\\r\\n t13 = pow(t1, 3),\\r\\n t12 = pow(t1, 2),\\r\\n t2 = t * t,\\r\\n t3 = t2 * t,\\r\\n x = t13 * p1x + t12 * 3 * t * c1x + t1 * 3 * t * t * c2x + t3 * p2x,\\r\\n y = t13 * p1y + t12 * 3 * t * c1y + t1 * 3 * t * t * c2y + t3 * p2y,\\r\\n mx = p1x + 2 * t * (c1x - p1x) + t2 * (c2x - 2 * c1x + p1x),\\r\\n my = p1y + 2 * t * (c1y - p1y) + t2 * (c2y - 2 * c1y + p1y),\\r\\n nx = c1x + 2 * t * (c2x - c1x) + t2 * (p2x - 2 * c2x + c1x),\\r\\n ny = c1y + 2 * t * (c2y - c1y) + t2 * (p2y - 2 * c2y + c1y),\\r\\n ax = t1 * p1x + t * c1x,\\r\\n ay = t1 * p1y + t * c1y,\\r\\n cx = t1 * c2x + t * p2x,\\r\\n cy = t1 * c2y + t * p2y,\\r\\n alpha = (90 - math.atan2(mx - nx, my - ny) * 180 / PI);\\r\\n (mx > nx || my < ny) && (alpha += 180);\\r\\n return {\\r\\n x: x,\\r\\n y: y,\\r\\n m: {x: mx, y: my},\\r\\n n: {x: nx, y: ny},\\r\\n start: {x: ax, y: ay},\\r\\n end: {x: cx, y: cy},\\r\\n alpha: alpha\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.bezierBBox\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Return bounding box of a given cubic bezier curve\\r\\n > Parameters\\r\\n - p1x (number) x of the first point of the curve\\r\\n - p1y (number) y of the first point of the curve\\r\\n - c1x (number) x of the first anchor of the curve\\r\\n - c1y (number) y of the first anchor of the curve\\r\\n - c2x (number) x of the second anchor of the curve\\r\\n - c2y (number) y of the second anchor of the curve\\r\\n - p2x (number) x of the second point of the curve\\r\\n - p2y (number) y of the second point of the curve\\r\\n * or\\r\\n - bez (array) array of six points for bezier curve\\r\\n = (object) point information in format:\\r\\n o {\\r\\n o min: {\\r\\n o x: (number) x coordinate of the left point\\r\\n o y: (number) y coordinate of the top point\\r\\n o }\\r\\n o max: {\\r\\n o x: (number) x coordinate of the right point\\r\\n o y: (number) y coordinate of the bottom point\\r\\n o }\\r\\n o }\\r\\n \\\\*/\\r\\n R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\\r\\n if (!R.is(p1x, \\\"array\\\")) {\\r\\n p1x = [p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y];\\r\\n }\\r\\n var bbox = curveDim.apply(null, p1x);\\r\\n return {\\r\\n x: bbox.min.x,\\r\\n y: bbox.min.y,\\r\\n x2: bbox.max.x,\\r\\n y2: bbox.max.y,\\r\\n width: bbox.max.x - bbox.min.x,\\r\\n height: bbox.max.y - bbox.min.y\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.isPointInsideBBox\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns `true` if given point is inside bounding boxes.\\r\\n > Parameters\\r\\n - bbox (string) bounding box\\r\\n - x (string) x coordinate of the point\\r\\n - y (string) y coordinate of the point\\r\\n = (boolean) `true` if point inside\\r\\n \\\\*/\\r\\n R.isPointInsideBBox = function (bbox, x, y) {\\r\\n return x >= bbox.x && x <= bbox.x2 && y >= bbox.y && y <= bbox.y2;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.isBBoxIntersect\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns `true` if two bounding boxes intersect\\r\\n > Parameters\\r\\n - bbox1 (string) first bounding box\\r\\n - bbox2 (string) second bounding box\\r\\n = (boolean) `true` if they intersect\\r\\n \\\\*/\\r\\n R.isBBoxIntersect = function (bbox1, bbox2) {\\r\\n var i = R.isPointInsideBBox;\\r\\n return i(bbox2, bbox1.x, bbox1.y)\\r\\n || i(bbox2, bbox1.x2, bbox1.y)\\r\\n || i(bbox2, bbox1.x, bbox1.y2)\\r\\n || i(bbox2, bbox1.x2, bbox1.y2)\\r\\n || i(bbox1, bbox2.x, bbox2.y)\\r\\n || i(bbox1, bbox2.x2, bbox2.y)\\r\\n || i(bbox1, bbox2.x, bbox2.y2)\\r\\n || i(bbox1, bbox2.x2, bbox2.y2)\\r\\n || (bbox1.x < bbox2.x2 && bbox1.x > bbox2.x || bbox2.x < bbox1.x2 && bbox2.x > bbox1.x)\\r\\n && (bbox1.y < bbox2.y2 && bbox1.y > bbox2.y || bbox2.y < bbox1.y2 && bbox2.y > bbox1.y);\\r\\n };\\r\\n function base3(t, p1, p2, p3, p4) {\\r\\n var t1 = -3 * p1 + 9 * p2 - 9 * p3 + 3 * p4,\\r\\n t2 = t * t1 + 6 * p1 - 12 * p2 + 6 * p3;\\r\\n return t * t2 - 3 * p1 + 3 * p2;\\r\\n }\\r\\n function bezlen(x1, y1, x2, y2, x3, y3, x4, y4, z) {\\r\\n if (z == null) {\\r\\n z = 1;\\r\\n }\\r\\n z = z > 1 ? 1 : z < 0 ? 0 : z;\\r\\n var z2 = z / 2,\\r\\n n = 12,\\r\\n Tvalues = [-0.1252,0.1252,-0.3678,0.3678,-0.5873,0.5873,-0.7699,0.7699,-0.9041,0.9041,-0.9816,0.9816],\\r\\n Cvalues = [0.2491,0.2491,0.2335,0.2335,0.2032,0.2032,0.1601,0.1601,0.1069,0.1069,0.0472,0.0472],\\r\\n sum = 0;\\r\\n for (var i = 0; i < n; i++) {\\r\\n var ct = z2 * Tvalues[i] + z2,\\r\\n xbase = base3(ct, x1, x2, x3, x4),\\r\\n ybase = base3(ct, y1, y2, y3, y4),\\r\\n comb = xbase * xbase + ybase * ybase;\\r\\n sum += Cvalues[i] * math.sqrt(comb);\\r\\n }\\r\\n return z2 * sum;\\r\\n }\\r\\n function getTatLen(x1, y1, x2, y2, x3, y3, x4, y4, ll) {\\r\\n if (ll < 0 || bezlen(x1, y1, x2, y2, x3, y3, x4, y4) < ll) {\\r\\n return;\\r\\n }\\r\\n var t = 1,\\r\\n step = t / 2,\\r\\n t2 = t - step,\\r\\n l,\\r\\n e = .01;\\r\\n l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);\\r\\n while (abs(l - ll) > e) {\\r\\n step /= 2;\\r\\n t2 += (l < ll ? 1 : -1) * step;\\r\\n l = bezlen(x1, y1, x2, y2, x3, y3, x4, y4, t2);\\r\\n }\\r\\n return t2;\\r\\n }\\r\\n function intersect(x1, y1, x2, y2, x3, y3, x4, y4) {\\r\\n if (\\r\\n mmax(x1, x2) < mmin(x3, x4) ||\\r\\n mmin(x1, x2) > mmax(x3, x4) ||\\r\\n mmax(y1, y2) < mmin(y3, y4) ||\\r\\n mmin(y1, y2) > mmax(y3, y4)\\r\\n ) {\\r\\n return;\\r\\n }\\r\\n var nx = (x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4),\\r\\n ny = (x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4),\\r\\n denominator = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4);\\r\\n\\r\\n if (!denominator) {\\r\\n return;\\r\\n }\\r\\n var px = nx / denominator,\\r\\n py = ny / denominator,\\r\\n px2 = +px.toFixed(2),\\r\\n py2 = +py.toFixed(2);\\r\\n if (\\r\\n px2 < +mmin(x1, x2).toFixed(2) ||\\r\\n px2 > +mmax(x1, x2).toFixed(2) ||\\r\\n px2 < +mmin(x3, x4).toFixed(2) ||\\r\\n px2 > +mmax(x3, x4).toFixed(2) ||\\r\\n py2 < +mmin(y1, y2).toFixed(2) ||\\r\\n py2 > +mmax(y1, y2).toFixed(2) ||\\r\\n py2 < +mmin(y3, y4).toFixed(2) ||\\r\\n py2 > +mmax(y3, y4).toFixed(2)\\r\\n ) {\\r\\n return;\\r\\n }\\r\\n return {x: px, y: py};\\r\\n }\\r\\n function inter(bez1, bez2) {\\r\\n return interHelper(bez1, bez2);\\r\\n }\\r\\n function interCount(bez1, bez2) {\\r\\n return interHelper(bez1, bez2, 1);\\r\\n }\\r\\n function interHelper(bez1, bez2, justCount) {\\r\\n var bbox1 = R.bezierBBox(bez1),\\r\\n bbox2 = R.bezierBBox(bez2);\\r\\n if (!R.isBBoxIntersect(bbox1, bbox2)) {\\r\\n return justCount ? 0 : [];\\r\\n }\\r\\n var l1 = bezlen.apply(0, bez1),\\r\\n l2 = bezlen.apply(0, bez2),\\r\\n n1 = mmax(~~(l1 / 5), 1),\\r\\n n2 = mmax(~~(l2 / 5), 1),\\r\\n dots1 = [],\\r\\n dots2 = [],\\r\\n xy = {},\\r\\n res = justCount ? 0 : [];\\r\\n for (var i = 0; i < n1 + 1; i++) {\\r\\n var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1));\\r\\n dots1.push({x: p.x, y: p.y, t: i / n1});\\r\\n }\\r\\n for (i = 0; i < n2 + 1; i++) {\\r\\n p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2));\\r\\n dots2.push({x: p.x, y: p.y, t: i / n2});\\r\\n }\\r\\n for (i = 0; i < n1; i++) {\\r\\n for (var j = 0; j < n2; j++) {\\r\\n var di = dots1[i],\\r\\n di1 = dots1[i + 1],\\r\\n dj = dots2[j],\\r\\n dj1 = dots2[j + 1],\\r\\n ci = abs(di1.x - di.x) < .001 ? \\\"y\\\" : \\\"x\\\",\\r\\n cj = abs(dj1.x - dj.x) < .001 ? \\\"y\\\" : \\\"x\\\",\\r\\n is = intersect(di.x, di.y, di1.x, di1.y, dj.x, dj.y, dj1.x, dj1.y);\\r\\n if (is) {\\r\\n if (xy[is.x.toFixed(4)] == is.y.toFixed(4)) {\\r\\n continue;\\r\\n }\\r\\n xy[is.x.toFixed(4)] = is.y.toFixed(4);\\r\\n var t1 = di.t + abs((is[ci] - di[ci]) / (di1[ci] - di[ci])) * (di1.t - di.t),\\r\\n t2 = dj.t + abs((is[cj] - dj[cj]) / (dj1[cj] - dj[cj])) * (dj1.t - dj.t);\\r\\n if (t1 >= 0 && t1 <= 1.001 && t2 >= 0 && t2 <= 1.001) {\\r\\n if (justCount) {\\r\\n res++;\\r\\n } else {\\r\\n res.push({\\r\\n x: is.x,\\r\\n y: is.y,\\r\\n t1: mmin(t1, 1),\\r\\n t2: mmin(t2, 1)\\r\\n });\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n return res;\\r\\n }\\r\\n /*\\\\\\r\\n * Raphael.pathIntersection\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Finds intersections of two paths\\r\\n > Parameters\\r\\n - path1 (string) path string\\r\\n - path2 (string) path string\\r\\n = (array) dots of intersection\\r\\n o [\\r\\n o {\\r\\n o x: (number) x coordinate of the point\\r\\n o y: (number) y coordinate of the point\\r\\n o t1: (number) t value for segment of path1\\r\\n o t2: (number) t value for segment of path2\\r\\n o segment1: (number) order number for segment of path1\\r\\n o segment2: (number) order number for segment of path2\\r\\n o bez1: (array) eight coordinates representing beziér curve for the segment of path1\\r\\n o bez2: (array) eight coordinates representing beziér curve for the segment of path2\\r\\n o }\\r\\n o ]\\r\\n \\\\*/\\r\\n R.pathIntersection = function (path1, path2) {\\r\\n return interPathHelper(path1, path2);\\r\\n };\\r\\n R.pathIntersectionNumber = function (path1, path2) {\\r\\n return interPathHelper(path1, path2, 1);\\r\\n };\\r\\n function interPathHelper(path1, path2, justCount) {\\r\\n path1 = R._path2curve(path1);\\r\\n path2 = R._path2curve(path2);\\r\\n var x1, y1, x2, y2, x1m, y1m, x2m, y2m, bez1, bez2,\\r\\n res = justCount ? 0 : [];\\r\\n for (var i = 0, ii = path1.length; i < ii; i++) {\\r\\n var pi = path1[i];\\r\\n if (pi[0] == \\\"M\\\") {\\r\\n x1 = x1m = pi[1];\\r\\n y1 = y1m = pi[2];\\r\\n } else {\\r\\n if (pi[0] == \\\"C\\\") {\\r\\n bez1 = [x1, y1].concat(pi.slice(1));\\r\\n x1 = bez1[6];\\r\\n y1 = bez1[7];\\r\\n } else {\\r\\n bez1 = [x1, y1, x1, y1, x1m, y1m, x1m, y1m];\\r\\n x1 = x1m;\\r\\n y1 = y1m;\\r\\n }\\r\\n for (var j = 0, jj = path2.length; j < jj; j++) {\\r\\n var pj = path2[j];\\r\\n if (pj[0] == \\\"M\\\") {\\r\\n x2 = x2m = pj[1];\\r\\n y2 = y2m = pj[2];\\r\\n } else {\\r\\n if (pj[0] == \\\"C\\\") {\\r\\n bez2 = [x2, y2].concat(pj.slice(1));\\r\\n x2 = bez2[6];\\r\\n y2 = bez2[7];\\r\\n } else {\\r\\n bez2 = [x2, y2, x2, y2, x2m, y2m, x2m, y2m];\\r\\n x2 = x2m;\\r\\n y2 = y2m;\\r\\n }\\r\\n var intr = interHelper(bez1, bez2, justCount);\\r\\n if (justCount) {\\r\\n res += intr;\\r\\n } else {\\r\\n for (var k = 0, kk = intr.length; k < kk; k++) {\\r\\n intr[k].segment1 = i;\\r\\n intr[k].segment2 = j;\\r\\n intr[k].bez1 = bez1;\\r\\n intr[k].bez2 = bez2;\\r\\n }\\r\\n res = res.concat(intr);\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n return res;\\r\\n }\\r\\n /*\\\\\\r\\n * Raphael.isPointInsidePath\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns `true` if given point is inside a given closed path.\\r\\n > Parameters\\r\\n - path (string) path string\\r\\n - x (number) x of the point\\r\\n - y (number) y of the point\\r\\n = (boolean) true, if point is inside the path\\r\\n \\\\*/\\r\\n R.isPointInsidePath = function (path, x, y) {\\r\\n var bbox = R.pathBBox(path);\\r\\n return R.isPointInsideBBox(bbox, x, y) &&\\r\\n interPathHelper(path, [[\\\"M\\\", x, y], [\\\"H\\\", bbox.x2 + 10]], 1) % 2 == 1;\\r\\n };\\r\\n R._removedFactory = function (methodname) {\\r\\n return function () {\\r\\n eve(\\\"raphael.log\\\", null, \\\"Rapha\\\\xebl: you are calling to method \\\\u201c\\\" + methodname + \\\"\\\\u201d of removed object\\\", methodname);\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.pathBBox\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Return bounding box of a given path\\r\\n > Parameters\\r\\n - path (string) path string\\r\\n = (object) bounding box\\r\\n o {\\r\\n o x: (number) x coordinate of the left top point of the box\\r\\n o y: (number) y coordinate of the left top point of the box\\r\\n o x2: (number) x coordinate of the right bottom point of the box\\r\\n o y2: (number) y coordinate of the right bottom point of the box\\r\\n o width: (number) width of the box\\r\\n o height: (number) height of the box\\r\\n o cx: (number) x coordinate of the center of the box\\r\\n o cy: (number) y coordinate of the center of the box\\r\\n o }\\r\\n \\\\*/\\r\\n var pathDimensions = R.pathBBox = function (path) {\\r\\n var pth = paths(path);\\r\\n if (pth.bbox) {\\r\\n var b= pth.bbox;\\r\\n return {x: b.x, y: b.y, width: b.width, height: b.height, x2: b.x2, y2: b.y2} ; // FREEGROUP FIX!!!!!!\\r\\n // raphael reuse the returned bbox. You must clone it here if the caller need the bbxo for\\r\\n //further calculation\\r\\n }\\r\\n if (!path) {\\r\\n return {x: 0, y: 0, width: 0, height: 0, x2: 0, y2: 0};\\r\\n }\\r\\n path = path2curve(path);\\r\\n var x = 0,\\r\\n y = 0,\\r\\n X = [],\\r\\n Y = [],\\r\\n p;\\r\\n for (var i = 0, ii = path.length; i < ii; i++) {\\r\\n p = path[i];\\r\\n if (p[0] == \\\"M\\\") {\\r\\n x = p[1];\\r\\n y = p[2];\\r\\n X.push(x);\\r\\n Y.push(y);\\r\\n } else {\\r\\n var dim = curveDim(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);\\r\\n X = X[concat](dim.min.x, dim.max.x);\\r\\n Y = Y[concat](dim.min.y, dim.max.y);\\r\\n x = p[5];\\r\\n y = p[6];\\r\\n }\\r\\n }\\r\\n var xmin = mmin[apply](0, X),\\r\\n ymin = mmin[apply](0, Y),\\r\\n xmax = mmax[apply](0, X),\\r\\n ymax = mmax[apply](0, Y),\\r\\n width = xmax - xmin,\\r\\n height = ymax - ymin,\\r\\n bb = {\\r\\n x: xmin,\\r\\n y: ymin,\\r\\n x2: xmax,\\r\\n y2: ymax,\\r\\n width: width,\\r\\n height: height,\\r\\n cx: xmin + width / 2,\\r\\n cy: ymin + height / 2\\r\\n };\\r\\n pth.bbox = clone(bb);\\r\\n return bb;\\r\\n },\\r\\n pathClone = function (pathArray) {\\r\\n var res = clone(pathArray);\\r\\n res.toString = R._path2string;\\r\\n return res;\\r\\n },\\r\\n pathToRelative = R._pathToRelative = function (pathArray) {\\r\\n var pth = paths(pathArray);\\r\\n if (pth.rel) {\\r\\n return pathClone(pth.rel);\\r\\n }\\r\\n if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption\\r\\n pathArray = R.parsePathString(pathArray);\\r\\n }\\r\\n var res = [],\\r\\n x = 0,\\r\\n y = 0,\\r\\n mx = 0,\\r\\n my = 0,\\r\\n start = 0;\\r\\n if (pathArray[0][0] == \\\"M\\\") {\\r\\n x = pathArray[0][1];\\r\\n y = pathArray[0][2];\\r\\n mx = x;\\r\\n my = y;\\r\\n start++;\\r\\n res.push([\\\"M\\\", x, y]);\\r\\n }\\r\\n for (var i = start, ii = pathArray.length; i < ii; i++) {\\r\\n var r = res[i] = [],\\r\\n pa = pathArray[i];\\r\\n if (pa[0] != lowerCase.call(pa[0])) {\\r\\n r[0] = lowerCase.call(pa[0]);\\r\\n switch (r[0]) {\\r\\n case \\\"a\\\":\\r\\n r[1] = pa[1];\\r\\n r[2] = pa[2];\\r\\n r[3] = pa[3];\\r\\n r[4] = pa[4];\\r\\n r[5] = pa[5];\\r\\n r[6] = +(pa[6] - x).toFixed(3);\\r\\n r[7] = +(pa[7] - y).toFixed(3);\\r\\n break;\\r\\n case \\\"v\\\":\\r\\n r[1] = +(pa[1] - y).toFixed(3);\\r\\n break;\\r\\n case \\\"m\\\":\\r\\n mx = pa[1];\\r\\n my = pa[2];\\r\\n default:\\r\\n for (var j = 1, jj = pa.length; j < jj; j++) {\\r\\n r[j] = +(pa[j] - ((j % 2) ? x : y)).toFixed(3);\\r\\n }\\r\\n }\\r\\n } else {\\r\\n r = res[i] = [];\\r\\n if (pa[0] == \\\"m\\\") {\\r\\n mx = pa[1] + x;\\r\\n my = pa[2] + y;\\r\\n }\\r\\n for (var k = 0, kk = pa.length; k < kk; k++) {\\r\\n res[i][k] = pa[k];\\r\\n }\\r\\n }\\r\\n var len = res[i].length;\\r\\n switch (res[i][0]) {\\r\\n case \\\"z\\\":\\r\\n x = mx;\\r\\n y = my;\\r\\n break;\\r\\n case \\\"h\\\":\\r\\n x += +res[i][len - 1];\\r\\n break;\\r\\n case \\\"v\\\":\\r\\n y += +res[i][len - 1];\\r\\n break;\\r\\n default:\\r\\n x += +res[i][len - 2];\\r\\n y += +res[i][len - 1];\\r\\n }\\r\\n }\\r\\n res.toString = R._path2string;\\r\\n pth.rel = pathClone(res);\\r\\n return res;\\r\\n },\\r\\n pathToAbsolute = R._pathToAbsolute = function (pathArray) {\\r\\n var pth = paths(pathArray);\\r\\n if (pth.abs) {\\r\\n return pathClone(pth.abs);\\r\\n }\\r\\n if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption\\r\\n pathArray = R.parsePathString(pathArray);\\r\\n }\\r\\n if (!pathArray || !pathArray.length) {\\r\\n return [[\\\"M\\\", 0, 0]];\\r\\n }\\r\\n var res = [],\\r\\n x = 0,\\r\\n y = 0,\\r\\n mx = 0,\\r\\n my = 0,\\r\\n start = 0;\\r\\n if (pathArray[0][0] == \\\"M\\\") {\\r\\n x = +pathArray[0][1];\\r\\n y = +pathArray[0][2];\\r\\n mx = x;\\r\\n my = y;\\r\\n start++;\\r\\n res[0] = [\\\"M\\\", x, y];\\r\\n }\\r\\n var crz = pathArray.length == 3 && pathArray[0][0] == \\\"M\\\" && pathArray[1][0].toUpperCase() == \\\"R\\\" && pathArray[2][0].toUpperCase() == \\\"Z\\\";\\r\\n for (var r, pa, i = start, ii = pathArray.length; i < ii; i++) {\\r\\n res.push(r = []);\\r\\n pa = pathArray[i];\\r\\n if (pa[0] != upperCase.call(pa[0])) {\\r\\n r[0] = upperCase.call(pa[0]);\\r\\n switch (r[0]) {\\r\\n case \\\"A\\\":\\r\\n r[1] = pa[1];\\r\\n r[2] = pa[2];\\r\\n r[3] = pa[3];\\r\\n r[4] = pa[4];\\r\\n r[5] = pa[5];\\r\\n r[6] = +(pa[6] + x);\\r\\n r[7] = +(pa[7] + y);\\r\\n break;\\r\\n case \\\"V\\\":\\r\\n r[1] = +pa[1] + y;\\r\\n break;\\r\\n case \\\"H\\\":\\r\\n r[1] = +pa[1] + x;\\r\\n break;\\r\\n case \\\"R\\\":\\r\\n var dots = [x, y][concat](pa.slice(1));\\r\\n for (var j = 2, jj = dots.length; j < jj; j++) {\\r\\n dots[j] = +dots[j] + x;\\r\\n dots[++j] = +dots[j] + y;\\r\\n }\\r\\n res.pop();\\r\\n res = res[concat](catmullRom2bezier(dots, crz));\\r\\n break;\\r\\n case \\\"M\\\":\\r\\n mx = +pa[1] + x;\\r\\n my = +pa[2] + y;\\r\\n default:\\r\\n for (j = 1, jj = pa.length; j < jj; j++) {\\r\\n r[j] = +pa[j] + ((j % 2) ? x : y);\\r\\n }\\r\\n }\\r\\n } else if (pa[0] == \\\"R\\\") {\\r\\n dots = [x, y][concat](pa.slice(1));\\r\\n res.pop();\\r\\n res = res[concat](catmullRom2bezier(dots, crz));\\r\\n r = [\\\"R\\\"][concat](pa.slice(-2));\\r\\n } else {\\r\\n for (var k = 0, kk = pa.length; k < kk; k++) {\\r\\n r[k] = pa[k];\\r\\n }\\r\\n }\\r\\n switch (r[0]) {\\r\\n case \\\"Z\\\":\\r\\n x = mx;\\r\\n y = my;\\r\\n break;\\r\\n case \\\"H\\\":\\r\\n x = r[1];\\r\\n break;\\r\\n case \\\"V\\\":\\r\\n y = r[1];\\r\\n break;\\r\\n case \\\"M\\\":\\r\\n mx = r[r.length - 2];\\r\\n my = r[r.length - 1];\\r\\n default:\\r\\n x = r[r.length - 2];\\r\\n y = r[r.length - 1];\\r\\n }\\r\\n }\\r\\n res.toString = R._path2string;\\r\\n pth.abs = pathClone(res);\\r\\n return res;\\r\\n },\\r\\n l2c = function (x1, y1, x2, y2) {\\r\\n return [x1, y1, x2, y2, x2, y2];\\r\\n },\\r\\n q2c = function (x1, y1, ax, ay, x2, y2) {\\r\\n var _13 = 1 / 3,\\r\\n _23 = 2 / 3;\\r\\n return [\\r\\n _13 * x1 + _23 * ax,\\r\\n _13 * y1 + _23 * ay,\\r\\n _13 * x2 + _23 * ax,\\r\\n _13 * y2 + _23 * ay,\\r\\n x2,\\r\\n y2\\r\\n ];\\r\\n },\\r\\n a2c = function (x1, y1, rx, ry, angle, large_arc_flag, sweep_flag, x2, y2, recursive) {\\r\\n // for more information of where this math came from visit:\\r\\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\\r\\n var _120 = PI * 120 / 180,\\r\\n rad = PI / 180 * (+angle || 0),\\r\\n res = [],\\r\\n xy,\\r\\n rotate = cacher(function (x, y, rad) {\\r\\n var X = x * math.cos(rad) - y * math.sin(rad),\\r\\n Y = x * math.sin(rad) + y * math.cos(rad);\\r\\n return {x: X, y: Y};\\r\\n });\\r\\n if (!recursive) {\\r\\n xy = rotate(x1, y1, -rad);\\r\\n x1 = xy.x;\\r\\n y1 = xy.y;\\r\\n xy = rotate(x2, y2, -rad);\\r\\n x2 = xy.x;\\r\\n y2 = xy.y;\\r\\n var cos = math.cos(PI / 180 * angle),\\r\\n sin = math.sin(PI / 180 * angle),\\r\\n x = (x1 - x2) / 2,\\r\\n y = (y1 - y2) / 2;\\r\\n var h = (x * x) / (rx * rx) + (y * y) / (ry * ry);\\r\\n if (h > 1) {\\r\\n h = math.sqrt(h);\\r\\n rx = h * rx;\\r\\n ry = h * ry;\\r\\n }\\r\\n var rx2 = rx * rx,\\r\\n ry2 = ry * ry,\\r\\n k = (large_arc_flag == sweep_flag ? -1 : 1) *\\r\\n math.sqrt(abs((rx2 * ry2 - rx2 * y * y - ry2 * x * x) / (rx2 * y * y + ry2 * x * x))),\\r\\n cx = k * rx * y / ry + (x1 + x2) / 2,\\r\\n cy = k * -ry * x / rx + (y1 + y2) / 2,\\r\\n f1 = math.asin(((y1 - cy) / ry).toFixed(9)),\\r\\n f2 = math.asin(((y2 - cy) / ry).toFixed(9));\\r\\n\\r\\n f1 = x1 < cx ? PI - f1 : f1;\\r\\n f2 = x2 < cx ? PI - f2 : f2;\\r\\n f1 < 0 && (f1 = PI * 2 + f1);\\r\\n f2 < 0 && (f2 = PI * 2 + f2);\\r\\n if (sweep_flag && f1 > f2) {\\r\\n f1 = f1 - PI * 2;\\r\\n }\\r\\n if (!sweep_flag && f2 > f1) {\\r\\n f2 = f2 - PI * 2;\\r\\n }\\r\\n } else {\\r\\n f1 = recursive[0];\\r\\n f2 = recursive[1];\\r\\n cx = recursive[2];\\r\\n cy = recursive[3];\\r\\n }\\r\\n var df = f2 - f1;\\r\\n if (abs(df) > _120) {\\r\\n var f2old = f2,\\r\\n x2old = x2,\\r\\n y2old = y2;\\r\\n f2 = f1 + _120 * (sweep_flag && f2 > f1 ? 1 : -1);\\r\\n x2 = cx + rx * math.cos(f2);\\r\\n y2 = cy + ry * math.sin(f2);\\r\\n res = a2c(x2, y2, rx, ry, angle, 0, sweep_flag, x2old, y2old, [f2, f2old, cx, cy]);\\r\\n }\\r\\n df = f2 - f1;\\r\\n var c1 = math.cos(f1),\\r\\n s1 = math.sin(f1),\\r\\n c2 = math.cos(f2),\\r\\n s2 = math.sin(f2),\\r\\n t = math.tan(df / 4),\\r\\n hx = 4 / 3 * rx * t,\\r\\n hy = 4 / 3 * ry * t,\\r\\n m1 = [x1, y1],\\r\\n m2 = [x1 + hx * s1, y1 - hy * c1],\\r\\n m3 = [x2 + hx * s2, y2 - hy * c2],\\r\\n m4 = [x2, y2];\\r\\n m2[0] = 2 * m1[0] - m2[0];\\r\\n m2[1] = 2 * m1[1] - m2[1];\\r\\n if (recursive) {\\r\\n return [m2, m3, m4][concat](res);\\r\\n } else {\\r\\n res = [m2, m3, m4][concat](res).join()[split](\\\",\\\");\\r\\n var newres = [];\\r\\n for (var i = 0, ii = res.length; i < ii; i++) {\\r\\n newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x;\\r\\n }\\r\\n return newres;\\r\\n }\\r\\n },\\r\\n findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {\\r\\n var t1 = 1 - t;\\r\\n return {\\r\\n x: pow(t1, 3) * p1x + pow(t1, 2) * 3 * t * c1x + t1 * 3 * t * t * c2x + pow(t, 3) * p2x,\\r\\n y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y\\r\\n };\\r\\n },\\r\\n curveDim = cacher(function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {\\r\\n var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x),\\r\\n b = 2 * (c1x - p1x) - 2 * (c2x - c1x),\\r\\n c = p1x - c1x,\\r\\n t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a,\\r\\n t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a,\\r\\n y = [p1y, p2y],\\r\\n x = [p1x, p2x],\\r\\n dot;\\r\\n abs(t1) > \\\"1e12\\\" && (t1 = .5);\\r\\n abs(t2) > \\\"1e12\\\" && (t2 = .5);\\r\\n if (t1 > 0 && t1 < 1) {\\r\\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);\\r\\n x.push(dot.x);\\r\\n y.push(dot.y);\\r\\n }\\r\\n if (t2 > 0 && t2 < 1) {\\r\\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);\\r\\n x.push(dot.x);\\r\\n y.push(dot.y);\\r\\n }\\r\\n a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y);\\r\\n b = 2 * (c1y - p1y) - 2 * (c2y - c1y);\\r\\n c = p1y - c1y;\\r\\n t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a;\\r\\n t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a;\\r\\n abs(t1) > \\\"1e12\\\" && (t1 = .5);\\r\\n abs(t2) > \\\"1e12\\\" && (t2 = .5);\\r\\n if (t1 > 0 && t1 < 1) {\\r\\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);\\r\\n x.push(dot.x);\\r\\n y.push(dot.y);\\r\\n }\\r\\n if (t2 > 0 && t2 < 1) {\\r\\n dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);\\r\\n x.push(dot.x);\\r\\n y.push(dot.y);\\r\\n }\\r\\n return {\\r\\n min: {x: mmin[apply](0, x), y: mmin[apply](0, y)},\\r\\n max: {x: mmax[apply](0, x), y: mmax[apply](0, y)}\\r\\n };\\r\\n }),\\r\\n path2curve = R._path2curve = cacher(function (path, path2) {\\r\\n var pth = !path2 && paths(path);\\r\\n if (!path2 && pth.curve) {\\r\\n return pathClone(pth.curve);\\r\\n }\\r\\n var p = pathToAbsolute(path),\\r\\n p2 = path2 && pathToAbsolute(path2),\\r\\n attrs = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},\\r\\n attrs2 = {x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null},\\r\\n processPath = function (path, d, pcom) {\\r\\n var nx, ny, tq = {T:1, Q:1};\\r\\n if (!path) {\\r\\n return [\\\"C\\\", d.x, d.y, d.x, d.y, d.x, d.y];\\r\\n }\\r\\n !(path[0] in tq) && (d.qx = d.qy = null);\\r\\n switch (path[0]) {\\r\\n case \\\"M\\\":\\r\\n d.X = path[1];\\r\\n d.Y = path[2];\\r\\n break;\\r\\n case \\\"A\\\":\\r\\n path = [\\\"C\\\"][concat](a2c[apply](0, [d.x, d.y][concat](path.slice(1))));\\r\\n break;\\r\\n case \\\"S\\\":\\r\\n if (pcom == \\\"C\\\" || pcom == \\\"S\\\") { // In \\\"S\\\" case we have to take into account, if the previous command is C/S.\\r\\n nx = d.x * 2 - d.bx; // And reflect the previous\\r\\n ny = d.y * 2 - d.by; // command's control point relative to the current point.\\r\\n }\\r\\n else { // or some else or nothing\\r\\n nx = d.x;\\r\\n ny = d.y;\\r\\n }\\r\\n path = [\\\"C\\\", nx, ny][concat](path.slice(1));\\r\\n break;\\r\\n case \\\"T\\\":\\r\\n if (pcom == \\\"Q\\\" || pcom == \\\"T\\\") { // In \\\"T\\\" case we have to take into account, if the previous command is Q/T.\\r\\n d.qx = d.x * 2 - d.qx; // And make a reflection similar\\r\\n d.qy = d.y * 2 - d.qy; // to case \\\"S\\\".\\r\\n }\\r\\n else { // or something else or nothing\\r\\n d.qx = d.x;\\r\\n d.qy = d.y;\\r\\n }\\r\\n path = [\\\"C\\\"][concat](q2c(d.x, d.y, d.qx, d.qy, path[1], path[2]));\\r\\n break;\\r\\n case \\\"Q\\\":\\r\\n d.qx = path[1];\\r\\n d.qy = path[2];\\r\\n path = [\\\"C\\\"][concat](q2c(d.x, d.y, path[1], path[2], path[3], path[4]));\\r\\n break;\\r\\n case \\\"L\\\":\\r\\n path = [\\\"C\\\"][concat](l2c(d.x, d.y, path[1], path[2]));\\r\\n break;\\r\\n case \\\"H\\\":\\r\\n path = [\\\"C\\\"][concat](l2c(d.x, d.y, path[1], d.y));\\r\\n break;\\r\\n case \\\"V\\\":\\r\\n path = [\\\"C\\\"][concat](l2c(d.x, d.y, d.x, path[1]));\\r\\n break;\\r\\n case \\\"Z\\\":\\r\\n path = [\\\"C\\\"][concat](l2c(d.x, d.y, d.X, d.Y));\\r\\n break;\\r\\n }\\r\\n return path;\\r\\n },\\r\\n fixArc = function (pp, i) {\\r\\n if (pp[i].length > 7) {\\r\\n pp[i].shift();\\r\\n var pi = pp[i];\\r\\n while (pi.length) {\\r\\n pcoms1[i]=\\\"A\\\"; // if created multiple C:s, their original seg is saved\\r\\n p2 && (pcoms2[i]=\\\"A\\\"); // the same as above\\r\\n pp.splice(i++, 0, [\\\"C\\\"][concat](pi.splice(0, 6)));\\r\\n }\\r\\n pp.splice(i, 1);\\r\\n ii = mmax(p.length, p2 && p2.length || 0);\\r\\n }\\r\\n },\\r\\n fixM = function (path1, path2, a1, a2, i) {\\r\\n if (path1 && path2 && path1[i][0] == \\\"M\\\" && path2[i][0] != \\\"M\\\") {\\r\\n path2.splice(i, 0, [\\\"M\\\", a2.x, a2.y]);\\r\\n a1.bx = 0;\\r\\n a1.by = 0;\\r\\n a1.x = path1[i][1];\\r\\n a1.y = path1[i][2];\\r\\n ii = mmax(p.length, p2 && p2.length || 0);\\r\\n }\\r\\n },\\r\\n pcoms1 = [], // path commands of original path p\\r\\n pcoms2 = [], // path commands of original path p2\\r\\n pfirst = \\\"\\\", // temporary holder for original path command\\r\\n pcom = \\\"\\\"; // holder for previous path command of original path\\r\\n for (var i = 0, ii = mmax(p.length, p2 && p2.length || 0); i < ii; i++) {\\r\\n p[i] && (pfirst = p[i][0]); // save current path command\\r\\n\\r\\n if (pfirst != \\\"C\\\") // C is not saved yet, because it may be result of conversion\\r\\n {\\r\\n pcoms1[i] = pfirst; // Save current path command\\r\\n i && ( pcom = pcoms1[i-1]); // Get previous path command pcom\\r\\n }\\r\\n p[i] = processPath(p[i], attrs, pcom); // Previous path command is inputted to processPath\\r\\n\\r\\n if (pcoms1[i] != \\\"A\\\" && pfirst == \\\"C\\\") pcoms1[i] = \\\"C\\\"; // A is the only command\\r\\n // which may produce multiple C:s\\r\\n // so we have to make sure that C is also C in original path\\r\\n\\r\\n fixArc(p, i); // fixArc adds also the right amount of A:s to pcoms1\\r\\n\\r\\n if (p2) { // the same procedures is done to p2\\r\\n p2[i] && (pfirst = p2[i][0]);\\r\\n if (pfirst != \\\"C\\\")\\r\\n {\\r\\n pcoms2[i] = pfirst;\\r\\n i && (pcom = pcoms2[i-1]);\\r\\n }\\r\\n p2[i] = processPath(p2[i], attrs2, pcom);\\r\\n\\r\\n if (pcoms2[i]!=\\\"A\\\" && pfirst==\\\"C\\\") pcoms2[i]=\\\"C\\\";\\r\\n\\r\\n fixArc(p2, i);\\r\\n }\\r\\n fixM(p, p2, attrs, attrs2, i);\\r\\n fixM(p2, p, attrs2, attrs, i);\\r\\n var seg = p[i],\\r\\n seg2 = p2 && p2[i],\\r\\n seglen = seg.length,\\r\\n seg2len = p2 && seg2.length;\\r\\n attrs.x = seg[seglen - 2];\\r\\n attrs.y = seg[seglen - 1];\\r\\n attrs.bx = toFloat(seg[seglen - 4]) || attrs.x;\\r\\n attrs.by = toFloat(seg[seglen - 3]) || attrs.y;\\r\\n attrs2.bx = p2 && (toFloat(seg2[seg2len - 4]) || attrs2.x);\\r\\n attrs2.by = p2 && (toFloat(seg2[seg2len - 3]) || attrs2.y);\\r\\n attrs2.x = p2 && seg2[seg2len - 2];\\r\\n attrs2.y = p2 && seg2[seg2len - 1];\\r\\n }\\r\\n if (!p2) {\\r\\n pth.curve = pathClone(p);\\r\\n }\\r\\n return p2 ? [p, p2] : p;\\r\\n }, null, pathClone),\\r\\n parseDots = R._parseDots = cacher(function (gradient) {\\r\\n var dots = [];\\r\\n for (var i = 0, ii = gradient.length; i < ii; i++) {\\r\\n var dot = {},\\r\\n par = gradient[i].match(/^([^:]*):?([\\\\d\\\\.]*)/);\\r\\n dot.color = R.getRGB(par[1]);\\r\\n if (dot.color.error) {\\r\\n return null;\\r\\n }\\r\\n dot.opacity = dot.color.opacity;\\r\\n dot.color = dot.color.hex;\\r\\n par[2] && (dot.offset = par[2] + \\\"%\\\");\\r\\n dots.push(dot);\\r\\n }\\r\\n for (i = 1, ii = dots.length - 1; i < ii; i++) {\\r\\n if (!dots[i].offset) {\\r\\n var start = toFloat(dots[i - 1].offset || 0),\\r\\n end = 0;\\r\\n for (var j = i + 1; j < ii; j++) {\\r\\n if (dots[j].offset) {\\r\\n end = dots[j].offset;\\r\\n break;\\r\\n }\\r\\n }\\r\\n if (!end) {\\r\\n end = 100;\\r\\n j = ii;\\r\\n }\\r\\n end = toFloat(end);\\r\\n var d = (end - start) / (j - i + 1);\\r\\n for (; i < j; i++) {\\r\\n start += d;\\r\\n dots[i].offset = start + \\\"%\\\";\\r\\n }\\r\\n }\\r\\n }\\r\\n return dots;\\r\\n }),\\r\\n tear = R._tear = function (el, paper) {\\r\\n el == paper.top && (paper.top = el.prev);\\r\\n el == paper.bottom && (paper.bottom = el.next);\\r\\n el.next && (el.next.prev = el.prev);\\r\\n el.prev && (el.prev.next = el.next);\\r\\n },\\r\\n tofront = R._tofront = function (el, paper) {\\r\\n if (paper.top === el) {\\r\\n return;\\r\\n }\\r\\n tear(el, paper);\\r\\n el.next = null;\\r\\n el.prev = paper.top;\\r\\n paper.top.next = el;\\r\\n paper.top = el;\\r\\n },\\r\\n toback = R._toback = function (el, paper) {\\r\\n if (paper.bottom === el) {\\r\\n return;\\r\\n }\\r\\n tear(el, paper);\\r\\n el.next = paper.bottom;\\r\\n el.prev = null;\\r\\n paper.bottom.prev = el;\\r\\n paper.bottom = el;\\r\\n },\\r\\n insertafter = R._insertafter = function (el, el2, paper) {\\r\\n tear(el, paper);\\r\\n el2 == paper.top && (paper.top = el);\\r\\n el2.next && (el2.next.prev = el);\\r\\n el.next = el2.next;\\r\\n el.prev = el2;\\r\\n el2.next = el;\\r\\n },\\r\\n insertbefore = R._insertbefore = function (el, el2, paper) {\\r\\n tear(el, paper);\\r\\n el2 == paper.bottom && (paper.bottom = el);\\r\\n el2.prev && (el2.prev.next = el);\\r\\n el.prev = el2.prev;\\r\\n el2.prev = el;\\r\\n el.next = el2;\\r\\n },\\r\\n /*\\\\\\r\\n * Raphael.toMatrix\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns matrix of transformations applied to a given path\\r\\n > Parameters\\r\\n - path (string) path string\\r\\n - transform (string|array) transformation string\\r\\n = (object) @Matrix\\r\\n \\\\*/\\r\\n toMatrix = R.toMatrix = function (path, transform) {\\r\\n var bb = pathDimensions(path),\\r\\n el = {\\r\\n _: {\\r\\n transform: E\\r\\n },\\r\\n getBBox: function () {\\r\\n return bb;\\r\\n }\\r\\n };\\r\\n extractTransform(el, transform);\\r\\n return el.matrix;\\r\\n },\\r\\n /*\\\\\\r\\n * Raphael.transformPath\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns path transformed by a given transformation\\r\\n > Parameters\\r\\n - path (string) path string\\r\\n - transform (string|array) transformation string\\r\\n = (string) path\\r\\n \\\\*/\\r\\n transformPath = R.transformPath = function (path, transform) {\\r\\n return mapPath(path, toMatrix(path, transform));\\r\\n },\\r\\n extractTransform = R._extractTransform = function (el, tstr) {\\r\\n if (tstr == null) {\\r\\n return el._.transform;\\r\\n }\\r\\n tstr = Str(tstr).replace(/\\\\.{3}|\\\\u2026/g, el._.transform || E);\\r\\n var tdata = R.parseTransformString(tstr),\\r\\n deg = 0,\\r\\n dx = 0,\\r\\n dy = 0,\\r\\n sx = 1,\\r\\n sy = 1,\\r\\n _ = el._,\\r\\n m = new Matrix;\\r\\n _.transform = tdata || [];\\r\\n if (tdata) {\\r\\n for (var i = 0, ii = tdata.length; i < ii; i++) {\\r\\n var t = tdata[i],\\r\\n tlen = t.length,\\r\\n command = Str(t[0]).toLowerCase(),\\r\\n absolute = t[0] != command,\\r\\n inver = absolute ? m.invert() : 0,\\r\\n x1,\\r\\n y1,\\r\\n x2,\\r\\n y2,\\r\\n bb;\\r\\n if (command == \\\"t\\\" && tlen == 3) {\\r\\n if (absolute) {\\r\\n x1 = inver.x(0, 0);\\r\\n y1 = inver.y(0, 0);\\r\\n x2 = inver.x(t[1], t[2]);\\r\\n y2 = inver.y(t[1], t[2]);\\r\\n m.translate(x2 - x1, y2 - y1);\\r\\n } else {\\r\\n m.translate(t[1], t[2]);\\r\\n }\\r\\n } else if (command == \\\"r\\\") {\\r\\n if (tlen == 2) {\\r\\n bb = bb || el.getBBox(1);\\r\\n m.rotate(t[1], bb.x + bb.width / 2, bb.y + bb.height / 2);\\r\\n deg += t[1];\\r\\n } else if (tlen == 4) {\\r\\n if (absolute) {\\r\\n x2 = inver.x(t[2], t[3]);\\r\\n y2 = inver.y(t[2], t[3]);\\r\\n m.rotate(t[1], x2, y2);\\r\\n } else {\\r\\n m.rotate(t[1], t[2], t[3]);\\r\\n }\\r\\n deg += t[1];\\r\\n }\\r\\n } else if (command == \\\"s\\\") {\\r\\n if (tlen == 2 || tlen == 3) {\\r\\n bb = bb || el.getBBox(1);\\r\\n m.scale(t[1], t[tlen - 1], bb.x + bb.width / 2, bb.y + bb.height / 2);\\r\\n sx *= t[1];\\r\\n sy *= t[tlen - 1];\\r\\n } else if (tlen == 5) {\\r\\n if (absolute) {\\r\\n x2 = inver.x(t[3], t[4]);\\r\\n y2 = inver.y(t[3], t[4]);\\r\\n m.scale(t[1], t[2], x2, y2);\\r\\n } else {\\r\\n m.scale(t[1], t[2], t[3], t[4]);\\r\\n }\\r\\n sx *= t[1];\\r\\n sy *= t[2];\\r\\n }\\r\\n } else if (command == \\\"m\\\" && tlen == 7) {\\r\\n m.add(t[1], t[2], t[3], t[4], t[5], t[6]);\\r\\n }\\r\\n _.dirtyT = 1;\\r\\n el.matrix = m;\\r\\n }\\r\\n }\\r\\n\\r\\n /*\\\\\\r\\n * Element.matrix\\r\\n [ property (object) ]\\r\\n **\\r\\n * Keeps @Matrix object, which represents element transformation\\r\\n \\\\*/\\r\\n el.matrix = m;\\r\\n\\r\\n _.sx = sx;\\r\\n _.sy = sy;\\r\\n _.deg = deg;\\r\\n _.dx = dx = m.e;\\r\\n _.dy = dy = m.f;\\r\\n\\r\\n if (sx == 1 && sy == 1 && !deg && _.bbox) {\\r\\n _.bbox.x += +dx;\\r\\n _.bbox.y += +dy;\\r\\n } else {\\r\\n _.dirtyT = 1;\\r\\n }\\r\\n },\\r\\n getEmpty = function (item) {\\r\\n var l = item[0];\\r\\n switch (l.toLowerCase()) {\\r\\n case \\\"t\\\": return [l, 0, 0];\\r\\n case \\\"m\\\": return [l, 1, 0, 0, 1, 0, 0];\\r\\n case \\\"r\\\": if (item.length == 4) {\\r\\n return [l, 0, item[2], item[3]];\\r\\n } else {\\r\\n return [l, 0];\\r\\n }\\r\\n case \\\"s\\\": if (item.length == 5) {\\r\\n return [l, 1, 1, item[3], item[4]];\\r\\n } else if (item.length == 3) {\\r\\n return [l, 1, 1];\\r\\n } else {\\r\\n return [l, 1];\\r\\n }\\r\\n }\\r\\n },\\r\\n equaliseTransform = R._equaliseTransform = function (t1, t2) {\\r\\n t2 = Str(t2).replace(/\\\\.{3}|\\\\u2026/g, t1);\\r\\n t1 = R.parseTransformString(t1) || [];\\r\\n t2 = R.parseTransformString(t2) || [];\\r\\n var maxlength = mmax(t1.length, t2.length),\\r\\n from = [],\\r\\n to = [],\\r\\n i = 0, j, jj,\\r\\n tt1, tt2;\\r\\n for (; i < maxlength; i++) {\\r\\n tt1 = t1[i] || getEmpty(t2[i]);\\r\\n tt2 = t2[i] || getEmpty(tt1);\\r\\n if ((tt1[0] != tt2[0]) ||\\r\\n (tt1[0].toLowerCase() == \\\"r\\\" && (tt1[2] != tt2[2] || tt1[3] != tt2[3])) ||\\r\\n (tt1[0].toLowerCase() == \\\"s\\\" && (tt1[3] != tt2[3] || tt1[4] != tt2[4]))\\r\\n ) {\\r\\n return;\\r\\n }\\r\\n from[i] = [];\\r\\n to[i] = [];\\r\\n for (j = 0, jj = mmax(tt1.length, tt2.length); j < jj; j++) {\\r\\n j in tt1 && (from[i][j] = tt1[j]);\\r\\n j in tt2 && (to[i][j] = tt2[j]);\\r\\n }\\r\\n }\\r\\n return {\\r\\n from: from,\\r\\n to: to\\r\\n };\\r\\n };\\r\\n R._getContainer = function (x, y, w, h) {\\r\\n var container;\\r\\n container = h == null && !R.is(x, \\\"object\\\") ? g.doc.getElementById(x) : x;\\r\\n if (container == null) {\\r\\n return;\\r\\n }\\r\\n if (container.tagName) {\\r\\n if (y == null) {\\r\\n return {\\r\\n container: container,\\r\\n width: container.style.pixelWidth || container.offsetWidth,\\r\\n height: container.style.pixelHeight || container.offsetHeight\\r\\n };\\r\\n } else {\\r\\n return {\\r\\n container: container,\\r\\n width: y,\\r\\n height: w\\r\\n };\\r\\n }\\r\\n }\\r\\n return {\\r\\n container: 1,\\r\\n x: x,\\r\\n y: y,\\r\\n width: w,\\r\\n height: h\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.pathToRelative\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Converts path to relative form\\r\\n > Parameters\\r\\n - pathString (string|array) path string or array of segments\\r\\n = (array) array of segments.\\r\\n \\\\*/\\r\\n R.pathToRelative = pathToRelative;\\r\\n R._engine = {};\\r\\n /*\\\\\\r\\n * Raphael.path2curve\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Converts path to a new path where all segments are cubic bezier curves.\\r\\n > Parameters\\r\\n - pathString (string|array) path string or array of segments\\r\\n = (array) array of segments.\\r\\n \\\\*/\\r\\n R.path2curve = path2curve;\\r\\n /*\\\\\\r\\n * Raphael.matrix\\r\\n [ method ]\\r\\n **\\r\\n * Utility method\\r\\n **\\r\\n * Returns matrix based on given parameters.\\r\\n > Parameters\\r\\n - a (number)\\r\\n - b (number)\\r\\n - c (number)\\r\\n - d (number)\\r\\n - e (number)\\r\\n - f (number)\\r\\n = (object) @Matrix\\r\\n \\\\*/\\r\\n R.matrix = function (a, b, c, d, e, f) {\\r\\n return new Matrix(a, b, c, d, e, f);\\r\\n };\\r\\n function Matrix(a, b, c, d, e, f) {\\r\\n if (a != null) {\\r\\n this.a = +a;\\r\\n this.b = +b;\\r\\n this.c = +c;\\r\\n this.d = +d;\\r\\n this.e = +e;\\r\\n this.f = +f;\\r\\n } else {\\r\\n this.a = 1;\\r\\n this.b = 0;\\r\\n this.c = 0;\\r\\n this.d = 1;\\r\\n this.e = 0;\\r\\n this.f = 0;\\r\\n }\\r\\n }\\r\\n (function (matrixproto) {\\r\\n /*\\\\\\r\\n * Matrix.add\\r\\n [ method ]\\r\\n **\\r\\n * Adds given matrix to existing one.\\r\\n > Parameters\\r\\n - a (number)\\r\\n - b (number)\\r\\n - c (number)\\r\\n - d (number)\\r\\n - e (number)\\r\\n - f (number)\\r\\n or\\r\\n - matrix (object) @Matrix\\r\\n \\\\*/\\r\\n matrixproto.add = function (a, b, c, d, e, f) {\\r\\n var out = [[], [], []],\\r\\n m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]],\\r\\n matrix = [[a, c, e], [b, d, f], [0, 0, 1]],\\r\\n x, y, z, res;\\r\\n\\r\\n if (a && a instanceof Matrix) {\\r\\n matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]];\\r\\n }\\r\\n\\r\\n for (x = 0; x < 3; x++) {\\r\\n for (y = 0; y < 3; y++) {\\r\\n res = 0;\\r\\n for (z = 0; z < 3; z++) {\\r\\n res += m[x][z] * matrix[z][y];\\r\\n }\\r\\n out[x][y] = res;\\r\\n }\\r\\n }\\r\\n this.a = out[0][0];\\r\\n this.b = out[1][0];\\r\\n this.c = out[0][1];\\r\\n this.d = out[1][1];\\r\\n this.e = out[0][2];\\r\\n this.f = out[1][2];\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.invert\\r\\n [ method ]\\r\\n **\\r\\n * Returns inverted version of the matrix\\r\\n = (object) @Matrix\\r\\n \\\\*/\\r\\n matrixproto.invert = function () {\\r\\n var me = this,\\r\\n x = me.a * me.d - me.b * me.c;\\r\\n return new Matrix(me.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me.f) / x);\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.clone\\r\\n [ method ]\\r\\n **\\r\\n * Returns copy of the matrix\\r\\n = (object) @Matrix\\r\\n \\\\*/\\r\\n matrixproto.clone = function () {\\r\\n return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f);\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.translate\\r\\n [ method ]\\r\\n **\\r\\n * Translate the matrix\\r\\n > Parameters\\r\\n - x (number)\\r\\n - y (number)\\r\\n \\\\*/\\r\\n matrixproto.translate = function (x, y) {\\r\\n this.add(1, 0, 0, 1, x, y);\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.scale\\r\\n [ method ]\\r\\n **\\r\\n * Scales the matrix\\r\\n > Parameters\\r\\n - x (number)\\r\\n - y (number) #optional\\r\\n - cx (number) #optional\\r\\n - cy (number) #optional\\r\\n \\\\*/\\r\\n matrixproto.scale = function (x, y, cx, cy) {\\r\\n y == null && (y = x);\\r\\n (cx || cy) && this.add(1, 0, 0, 1, cx, cy);\\r\\n this.add(x, 0, 0, y, 0, 0);\\r\\n (cx || cy) && this.add(1, 0, 0, 1, -cx, -cy);\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.rotate\\r\\n [ method ]\\r\\n **\\r\\n * Rotates the matrix\\r\\n > Parameters\\r\\n - a (number)\\r\\n - x (number)\\r\\n - y (number)\\r\\n \\\\*/\\r\\n matrixproto.rotate = function (a, x, y) {\\r\\n a = R.rad(a);\\r\\n x = x || 0;\\r\\n y = y || 0;\\r\\n var cos = +math.cos(a).toFixed(9),\\r\\n sin = +math.sin(a).toFixed(9);\\r\\n this.add(cos, sin, -sin, cos, x, y);\\r\\n this.add(1, 0, 0, 1, -x, -y);\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.x\\r\\n [ method ]\\r\\n **\\r\\n * Return x coordinate for given point after transformation described by the matrix. See also @Matrix.y\\r\\n > Parameters\\r\\n - x (number)\\r\\n - y (number)\\r\\n = (number) x\\r\\n \\\\*/\\r\\n matrixproto.x = function (x, y) {\\r\\n return x * this.a + y * this.c + this.e;\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.y\\r\\n [ method ]\\r\\n **\\r\\n * Return y coordinate for given point after transformation described by the matrix. See also @Matrix.x\\r\\n > Parameters\\r\\n - x (number)\\r\\n - y (number)\\r\\n = (number) y\\r\\n \\\\*/\\r\\n matrixproto.y = function (x, y) {\\r\\n return x * this.b + y * this.d + this.f;\\r\\n };\\r\\n matrixproto.get = function (i) {\\r\\n return +this[Str.fromCharCode(97 + i)].toFixed(4);\\r\\n };\\r\\n matrixproto.toString = function () {\\r\\n return R.svg ?\\r\\n \\\"matrix(\\\" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)].join() + \\\")\\\" :\\r\\n [this.get(0), this.get(2), this.get(1), this.get(3), 0, 0].join();\\r\\n };\\r\\n matrixproto.toFilter = function () {\\r\\n return \\\"progid:DXImageTransform.Microsoft.Matrix(M11=\\\" + this.get(0) +\\r\\n \\\", M12=\\\" + this.get(2) + \\\", M21=\\\" + this.get(1) + \\\", M22=\\\" + this.get(3) +\\r\\n \\\", Dx=\\\" + this.get(4) + \\\", Dy=\\\" + this.get(5) + \\\", sizingmethod='auto expand')\\\";\\r\\n };\\r\\n matrixproto.offset = function () {\\r\\n return [this.e.toFixed(4), this.f.toFixed(4)];\\r\\n };\\r\\n function norm(a) {\\r\\n return a[0] * a[0] + a[1] * a[1];\\r\\n }\\r\\n function normalize(a) {\\r\\n var mag = math.sqrt(norm(a));\\r\\n a[0] && (a[0] /= mag);\\r\\n a[1] && (a[1] /= mag);\\r\\n }\\r\\n /*\\\\\\r\\n * Matrix.split\\r\\n [ method ]\\r\\n **\\r\\n * Splits matrix into primitive transformations\\r\\n = (object) in format:\\r\\n o dx (number) translation by x\\r\\n o dy (number) translation by y\\r\\n o scalex (number) scale by x\\r\\n o scaley (number) scale by y\\r\\n o shear (number) shear\\r\\n o rotate (number) rotation in deg\\r\\n o isSimple (boolean) could it be represented via simple transformations\\r\\n \\\\*/\\r\\n matrixproto.split = function () {\\r\\n var out = {};\\r\\n // translation\\r\\n out.dx = this.e;\\r\\n out.dy = this.f;\\r\\n\\r\\n // scale and shear\\r\\n var row = [[this.a, this.c], [this.b, this.d]];\\r\\n out.scalex = math.sqrt(norm(row[0]));\\r\\n normalize(row[0]);\\r\\n\\r\\n out.shear = row[0][0] * row[1][0] + row[0][1] * row[1][1];\\r\\n row[1] = [row[1][0] - row[0][0] * out.shear, row[1][1] - row[0][1] * out.shear];\\r\\n\\r\\n out.scaley = math.sqrt(norm(row[1]));\\r\\n normalize(row[1]);\\r\\n out.shear /= out.scaley;\\r\\n\\r\\n // rotation\\r\\n var sin = -row[0][1],\\r\\n cos = row[1][1];\\r\\n if (cos < 0) {\\r\\n out.rotate = R.deg(math.acos(cos));\\r\\n if (sin < 0) {\\r\\n out.rotate = 360 - out.rotate;\\r\\n }\\r\\n } else {\\r\\n out.rotate = R.deg(math.asin(sin));\\r\\n }\\r\\n\\r\\n out.isSimple = !+out.shear.toFixed(9) && (out.scalex.toFixed(9) == out.scaley.toFixed(9) || !out.rotate);\\r\\n out.isSuperSimple = !+out.shear.toFixed(9) && out.scalex.toFixed(9) == out.scaley.toFixed(9) && !out.rotate;\\r\\n out.noRotation = !+out.shear.toFixed(9) && !out.rotate;\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Matrix.toTransformString\\r\\n [ method ]\\r\\n **\\r\\n * Return transform string that represents given matrix\\r\\n = (string) transform string\\r\\n \\\\*/\\r\\n matrixproto.toTransformString = function (shorter) {\\r\\n var s = shorter || this[split]();\\r\\n if (s.isSimple) {\\r\\n s.scalex = +s.scalex.toFixed(4);\\r\\n s.scaley = +s.scaley.toFixed(4);\\r\\n s.rotate = +s.rotate.toFixed(4);\\r\\n return (s.dx || s.dy ? \\\"t\\\" + [s.dx, s.dy] : E) +\\r\\n (s.scalex != 1 || s.scaley != 1 ? \\\"s\\\" + [s.scalex, s.scaley, 0, 0] : E) +\\r\\n (s.rotate ? \\\"r\\\" + [s.rotate, 0, 0] : E);\\r\\n } else {\\r\\n return \\\"m\\\" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)];\\r\\n }\\r\\n };\\r\\n })(Matrix.prototype);\\r\\n\\r\\n var preventDefault = function () {\\r\\n this.returnValue = false;\\r\\n },\\r\\n preventTouch = function () {\\r\\n return this.originalEvent.preventDefault();\\r\\n },\\r\\n stopPropagation = function () {\\r\\n this.cancelBubble = true;\\r\\n },\\r\\n stopTouch = function () {\\r\\n return this.originalEvent.stopPropagation();\\r\\n },\\r\\n getEventPosition = function (e) {\\r\\n var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\\r\\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;\\r\\n\\r\\n return {\\r\\n x: e.clientX + scrollX,\\r\\n y: e.clientY + scrollY\\r\\n };\\r\\n },\\r\\n addEvent = (function () {\\r\\n if (g.doc.addEventListener) {\\r\\n return function (obj, type, fn, element) {\\r\\n var f = function (e) {\\r\\n var pos = getEventPosition(e);\\r\\n return fn.call(element, e, pos.x, pos.y);\\r\\n };\\r\\n obj.addEventListener(type, f, false);\\r\\n\\r\\n if (supportsTouch && touchMap[type]) {\\r\\n var _f = function (e) {\\r\\n var pos = getEventPosition(e),\\r\\n olde = e;\\r\\n\\r\\n for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) {\\r\\n if (e.targetTouches[i].target == obj) {\\r\\n e = e.targetTouches[i];\\r\\n e.originalEvent = olde;\\r\\n e.preventDefault = preventTouch;\\r\\n e.stopPropagation = stopTouch;\\r\\n break;\\r\\n }\\r\\n }\\r\\n\\r\\n return fn.call(element, e, pos.x, pos.y);\\r\\n };\\r\\n obj.addEventListener(touchMap[type], _f, false);\\r\\n }\\r\\n\\r\\n return function () {\\r\\n obj.removeEventListener(type, f, false);\\r\\n\\r\\n if (supportsTouch && touchMap[type])\\r\\n obj.removeEventListener(touchMap[type], _f, false);\\r\\n\\r\\n return true;\\r\\n };\\r\\n };\\r\\n } else if (g.doc.attachEvent) {\\r\\n return function (obj, type, fn, element) {\\r\\n var f = function (e) {\\r\\n e = e || g.win.event;\\r\\n var scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\\r\\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,\\r\\n x = e.clientX + scrollX,\\r\\n y = e.clientY + scrollY;\\r\\n e.preventDefault = e.preventDefault || preventDefault;\\r\\n e.stopPropagation = e.stopPropagation || stopPropagation;\\r\\n return fn.call(element, e, x, y);\\r\\n };\\r\\n obj.attachEvent(\\\"on\\\" + type, f);\\r\\n var detacher = function () {\\r\\n obj.detachEvent(\\\"on\\\" + type, f);\\r\\n return true;\\r\\n };\\r\\n return detacher;\\r\\n };\\r\\n }\\r\\n })(),\\r\\n drag = [],\\r\\n dragMove = function (e) {\\r\\n var x = e.clientX,\\r\\n y = e.clientY,\\r\\n scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\\r\\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft,\\r\\n dragi,\\r\\n j = drag.length;\\r\\n while (j--) {\\r\\n dragi = drag[j];\\r\\n if (supportsTouch && e.touches) {\\r\\n var i = e.touches.length,\\r\\n touch;\\r\\n while (i--) {\\r\\n touch = e.touches[i];\\r\\n if (touch.identifier == dragi.el._drag.id) {\\r\\n x = touch.clientX;\\r\\n y = touch.clientY;\\r\\n (e.originalEvent ? e.originalEvent : e).preventDefault();\\r\\n break;\\r\\n }\\r\\n }\\r\\n } else {\\r\\n e.preventDefault();\\r\\n }\\r\\n var node = dragi.el.node,\\r\\n o,\\r\\n next = node.nextSibling,\\r\\n parent = node.parentNode,\\r\\n display = node.style.display;\\r\\n g.win.opera && parent.removeChild(node);\\r\\n node.style.display = \\\"none\\\";\\r\\n o = dragi.el.paper.getElementByPoint(x, y);\\r\\n node.style.display = display;\\r\\n g.win.opera && (next ? parent.insertBefore(node, next) : parent.appendChild(node));\\r\\n o && eve(\\\"raphael.drag.over.\\\" + dragi.el.id, dragi.el, o);\\r\\n x += scrollX;\\r\\n y += scrollY;\\r\\n eve(\\\"raphael.drag.move.\\\" + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e);\\r\\n }\\r\\n },\\r\\n dragUp = function (e) {\\r\\n R.unmousemove(dragMove).unmouseup(dragUp);\\r\\n var i = drag.length,\\r\\n dragi;\\r\\n while (i--) {\\r\\n dragi = drag[i];\\r\\n dragi.el._drag = {};\\r\\n eve(\\\"raphael.drag.end.\\\" + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e);\\r\\n }\\r\\n drag = [];\\r\\n },\\r\\n /*\\\\\\r\\n * Raphael.el\\r\\n [ property (object) ]\\r\\n **\\r\\n * You can add your own method to elements. This is usefull when you want to hack default functionality or\\r\\n * want to wrap some common transformation or attributes in one method. In difference to canvas methods,\\r\\n * you can redefine element method at any time. Expending element methods wouldn’t affect set.\\r\\n > Usage\\r\\n | Raphael.el.red = function () {\\r\\n | this.attr({fill: \\\"#f00\\\"});\\r\\n | };\\r\\n | // then use it\\r\\n | paper.circle(100, 100, 20).red();\\r\\n \\\\*/\\r\\n elproto = R.el = {};\\r\\n /*\\\\\\r\\n * Element.click\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for click for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unclick\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for click for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.dblclick\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for double click for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.undblclick\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for double click for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.mousedown\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for mousedown for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unmousedown\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for mousedown for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.mousemove\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for mousemove for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unmousemove\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for mousemove for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.mouseout\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for mouseout for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unmouseout\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for mouseout for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.mouseover\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for mouseover for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unmouseover\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for mouseover for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.mouseup\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for mouseup for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.unmouseup\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for mouseup for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.touchstart\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for touchstart for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.untouchstart\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for touchstart for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.touchmove\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for touchmove for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.untouchmove\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for touchmove for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.touchend\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for touchend for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.untouchend\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for touchend for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n\\r\\n /*\\\\\\r\\n * Element.touchcancel\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handler for touchcancel for the element.\\r\\n > Parameters\\r\\n - handler (function) handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Element.untouchcancel\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handler for touchcancel for the element.\\r\\n > Parameters\\r\\n - handler (function) #optional handler for the event\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n for (var i = events.length; i--;) {\\r\\n (function (eventName) {\\r\\n R[eventName] = elproto[eventName] = function (fn, scope) {\\r\\n if (R.is(fn, \\\"function\\\")) {\\r\\n this.events = this.events || [];\\r\\n this.events.push({name: eventName, f: fn, unbind: addEvent(this.shape || this.node || g.doc, eventName, fn, scope || this)});\\r\\n }\\r\\n return this;\\r\\n };\\r\\n R[\\\"un\\\" + eventName] = elproto[\\\"un\\\" + eventName] = function (fn) {\\r\\n var events = this.events || [],\\r\\n l = events.length;\\r\\n while (l--){\\r\\n if (events[l].name == eventName && (R.is(fn, \\\"undefined\\\") || events[l].f == fn)) {\\r\\n events[l].unbind();\\r\\n events.splice(l, 1);\\r\\n !events.length && delete this.events;\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n })(events[i]);\\r\\n }\\r\\n\\r\\n /*\\\\\\r\\n * Element.data\\r\\n [ method ]\\r\\n **\\r\\n * Adds or retrieves given value asociated with given key.\\r\\n **\\r\\n * See also @Element.removeData\\r\\n > Parameters\\r\\n - key (string) key to store data\\r\\n - value (any) #optional value to store\\r\\n = (object) @Element\\r\\n * or, if value is not specified:\\r\\n = (any) value\\r\\n * or, if key and value are not specified:\\r\\n = (object) Key/value pairs for all the data associated with the element.\\r\\n > Usage\\r\\n | for (var i = 0, i < 5, i++) {\\r\\n | paper.circle(10 + 15 * i, 10, 10)\\r\\n | .attr({fill: \\\"#000\\\"})\\r\\n | .data(\\\"i\\\", i)\\r\\n | .click(function () {\\r\\n | alert(this.data(\\\"i\\\"));\\r\\n | });\\r\\n | }\\r\\n \\\\*/\\r\\n elproto.data = function (key, value) {\\r\\n var data = eldata[this.id] = eldata[this.id] || {};\\r\\n if (arguments.length == 0) {\\r\\n return data;\\r\\n }\\r\\n if (arguments.length == 1) {\\r\\n if (R.is(key, \\\"object\\\")) {\\r\\n for (var i in key) if (key[has](i)) {\\r\\n this.data(i, key[i]);\\r\\n }\\r\\n return this;\\r\\n }\\r\\n eve(\\\"raphael.data.get.\\\" + this.id, this, data[key], key);\\r\\n return data[key];\\r\\n }\\r\\n data[key] = value;\\r\\n eve(\\\"raphael.data.set.\\\" + this.id, this, value, key);\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.removeData\\r\\n [ method ]\\r\\n **\\r\\n * Removes value associated with an element by given key.\\r\\n * If key is not provided, removes all the data of the element.\\r\\n > Parameters\\r\\n - key (string) #optional key\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.removeData = function (key) {\\r\\n if (key == null) {\\r\\n eldata[this.id] = {};\\r\\n } else {\\r\\n eldata[this.id] && delete eldata[this.id][key];\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getData\\r\\n [ method ]\\r\\n **\\r\\n * Retrieves the element data\\r\\n = (object) data\\r\\n \\\\*/\\r\\n elproto.getData = function () {\\r\\n return clone(eldata[this.id] || {});\\r\\n };\\r\\n /*\\\\\\r\\n * Element.hover\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handlers for hover for the element.\\r\\n > Parameters\\r\\n - f_in (function) handler for hover in\\r\\n - f_out (function) handler for hover out\\r\\n - icontext (object) #optional context for hover in handler\\r\\n - ocontext (object) #optional context for hover out handler\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.hover = function (f_in, f_out, scope_in, scope_out) {\\r\\n return this.mouseover(f_in, scope_in).mouseout(f_out, scope_out || scope_in);\\r\\n };\\r\\n /*\\\\\\r\\n * Element.unhover\\r\\n [ method ]\\r\\n **\\r\\n * Removes event handlers for hover for the element.\\r\\n > Parameters\\r\\n - f_in (function) handler for hover in\\r\\n - f_out (function) handler for hover out\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.unhover = function (f_in, f_out) {\\r\\n return this.unmouseover(f_in).unmouseout(f_out);\\r\\n };\\r\\n var draggable = [];\\r\\n /*\\\\\\r\\n * Element.drag\\r\\n [ method ]\\r\\n **\\r\\n * Adds event handlers for drag of the element.\\r\\n > Parameters\\r\\n - onmove (function) handler for moving\\r\\n - onstart (function) handler for drag start\\r\\n - onend (function) handler for drag end\\r\\n - mcontext (object) #optional context for moving handler\\r\\n - scontext (object) #optional context for drag start handler\\r\\n - econtext (object) #optional context for drag end handler\\r\\n * Additionaly following `drag` events will be triggered: `drag.start.<id>` on start,\\r\\n * `drag.end.<id>` on end and `drag.move.<id>` on every move. When element will be dragged over another element\\r\\n * `drag.over.<id>` will be fired as well.\\r\\n *\\r\\n * Start event and start handler will be called in specified context or in context of the element with following parameters:\\r\\n o x (number) x position of the mouse\\r\\n o y (number) y position of the mouse\\r\\n o event (object) DOM event object\\r\\n * Move event and move handler will be called in specified context or in context of the element with following parameters:\\r\\n o dx (number) shift by x from the start point\\r\\n o dy (number) shift by y from the start point\\r\\n o x (number) x position of the mouse\\r\\n o y (number) y position of the mouse\\r\\n o event (object) DOM event object\\r\\n * End event and end handler will be called in specified context or in context of the element with following parameters:\\r\\n o event (object) DOM event object\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.drag = function (onmove, onstart, onend, move_scope, start_scope, end_scope) {\\r\\n function start(e) {\\r\\n (e.originalEvent || e).preventDefault();\\r\\n var x = e.clientX,\\r\\n y = e.clientY,\\r\\n scrollY = g.doc.documentElement.scrollTop || g.doc.body.scrollTop,\\r\\n scrollX = g.doc.documentElement.scrollLeft || g.doc.body.scrollLeft;\\r\\n this._drag.id = e.identifier;\\r\\n if (supportsTouch && e.touches) {\\r\\n var i = e.touches.length, touch;\\r\\n while (i--) {\\r\\n touch = e.touches[i];\\r\\n this._drag.id = touch.identifier;\\r\\n if (touch.identifier == this._drag.id) {\\r\\n x = touch.clientX;\\r\\n y = touch.clientY;\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n this._drag.x = x + scrollX;\\r\\n this._drag.y = y + scrollY;\\r\\n !drag.length && R.mousemove(dragMove).mouseup(dragUp);\\r\\n drag.push({el: this, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope});\\r\\n onstart && eve.on(\\\"raphael.drag.start.\\\" + this.id, onstart);\\r\\n onmove && eve.on(\\\"raphael.drag.move.\\\" + this.id, onmove);\\r\\n onend && eve.on(\\\"raphael.drag.end.\\\" + this.id, onend);\\r\\n eve(\\\"raphael.drag.start.\\\" + this.id, start_scope || move_scope || this, e.clientX + scrollX, e.clientY + scrollY, e);\\r\\n }\\r\\n this._drag = {};\\r\\n draggable.push({el: this, start: start});\\r\\n this.mousedown(start);\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.onDragOver\\r\\n [ method ]\\r\\n **\\r\\n * Shortcut for assigning event handler for `drag.over.<id>` event, where id is id of the element (see @Element.id).\\r\\n > Parameters\\r\\n - f (function) handler for event, first argument would be the element you are dragging over\\r\\n \\\\*/\\r\\n elproto.onDragOver = function (f) {\\r\\n f ? eve.on(\\\"raphael.drag.over.\\\" + this.id, f) : eve.unbind(\\\"raphael.drag.over.\\\" + this.id);\\r\\n };\\r\\n /*\\\\\\r\\n * Element.undrag\\r\\n [ method ]\\r\\n **\\r\\n * Removes all drag event handlers from given element.\\r\\n \\\\*/\\r\\n elproto.undrag = function () {\\r\\n var i = draggable.length;\\r\\n while (i--) if (draggable[i].el == this) {\\r\\n this.unmousedown(draggable[i].start);\\r\\n draggable.splice(i, 1);\\r\\n eve.unbind(\\\"raphael.drag.*.\\\" + this.id);\\r\\n }\\r\\n !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp);\\r\\n drag = [];\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.circle\\r\\n [ method ]\\r\\n **\\r\\n * Draws a circle.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the centre\\r\\n - y (number) y coordinate of the centre\\r\\n - r (number) radius\\r\\n = (object) Raphaël element object with type “circle”\\r\\n **\\r\\n > Usage\\r\\n | var c = paper.circle(50, 50, 40);\\r\\n \\\\*/\\r\\n paperproto.circle = function (x, y, r) {\\r\\n var out = R._engine.circle(this, x || 0, y || 0, r || 0);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.rect\\r\\n [ method ]\\r\\n *\\r\\n * Draws a rectangle.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the top left corner\\r\\n - y (number) y coordinate of the top left corner\\r\\n - width (number) width\\r\\n - height (number) height\\r\\n - r (number) #optional radius for rounded corners, default is 0\\r\\n = (object) Raphaël element object with type “rect”\\r\\n **\\r\\n > Usage\\r\\n | // regular rectangle\\r\\n | var c = paper.rect(10, 10, 50, 50);\\r\\n | // rectangle with rounded corners\\r\\n | var c = paper.rect(40, 40, 50, 50, 10);\\r\\n \\\\*/\\r\\n paperproto.rect = function (x, y, w, h, r) {\\r\\n var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.ellipse\\r\\n [ method ]\\r\\n **\\r\\n * Draws an ellipse.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the centre\\r\\n - y (number) y coordinate of the centre\\r\\n - rx (number) horizontal radius\\r\\n - ry (number) vertical radius\\r\\n = (object) Raphaël element object with type “ellipse”\\r\\n **\\r\\n > Usage\\r\\n | var c = paper.ellipse(50, 50, 40, 20);\\r\\n \\\\*/\\r\\n paperproto.ellipse = function (x, y, rx, ry) {\\r\\n var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.path\\r\\n [ method ]\\r\\n **\\r\\n * Creates a path element by given path data string.\\r\\n > Parameters\\r\\n - pathString (string) #optional path string in SVG format.\\r\\n * Path string consists of one-letter commands, followed by comma seprarated arguments in numercal form. Example:\\r\\n | \\\"M10,20L30,40\\\"\\r\\n * Here we can see two commands: “M”, with arguments `(10, 20)` and “L” with arguments `(30, 40)`. Upper case letter mean command is absolute, lower case—relative.\\r\\n *\\r\\n # <p>Here is short list of commands available, for more details see <a href=\\\"http://www.w3.org/TR/SVG/paths.html#PathData\\\" title=\\\"Details of a path's data attribute's format are described in the SVG specification.\\\">SVG path string format</a>.</p>\\r\\n # <table><thead><tr><th>Command</th><th>Name</th><th>Parameters</th></tr></thead><tbody>\\r\\n # <tr><td>M</td><td>moveto</td><td>(x y)+</td></tr>\\r\\n # <tr><td>Z</td><td>closepath</td><td>(none)</td></tr>\\r\\n # <tr><td>L</td><td>lineto</td><td>(x y)+</td></tr>\\r\\n # <tr><td>H</td><td>horizontal lineto</td><td>x+</td></tr>\\r\\n # <tr><td>V</td><td>vertical lineto</td><td>y+</td></tr>\\r\\n # <tr><td>C</td><td>curveto</td><td>(x1 y1 x2 y2 x y)+</td></tr>\\r\\n # <tr><td>S</td><td>smooth curveto</td><td>(x2 y2 x y)+</td></tr>\\r\\n # <tr><td>Q</td><td>quadratic Bézier curveto</td><td>(x1 y1 x y)+</td></tr>\\r\\n # <tr><td>T</td><td>smooth quadratic Bézier curveto</td><td>(x y)+</td></tr>\\r\\n # <tr><td>A</td><td>elliptical arc</td><td>(rx ry x-axis-rotation large-arc-flag sweep-flag x y)+</td></tr>\\r\\n # <tr><td>R</td><td><a href=\\\"http://en.wikipedia.org/wiki/Catmull–Rom_spline#Catmull.E2.80.93Rom_spline\\\">Catmull-Rom curveto</a>*</td><td>x1 y1 (x y)+</td></tr></tbody></table>\\r\\n * * “Catmull-Rom curveto” is a not standard SVG command and added in 2.0 to make life easier.\\r\\n * Note: there is a special case when path consist of just three commands: “M10,10R…z”. In this case path will smoothly connects to its beginning.\\r\\n > Usage\\r\\n | var c = paper.path(\\\"M10 10L90 90\\\");\\r\\n | // draw a diagonal line:\\r\\n | // move to 10,10, line to 90,90\\r\\n * For example of path strings, check out these icons: http://raphaeljs.com/icons/\\r\\n \\\\*/\\r\\n paperproto.path = function (pathString) {\\r\\n pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E);\\r\\n var out = R._engine.path(R.format[apply](R, arguments), this);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.image\\r\\n [ method ]\\r\\n **\\r\\n * Embeds an image into the surface.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - src (string) URI of the source image\\r\\n - x (number) x coordinate position\\r\\n - y (number) y coordinate position\\r\\n - width (number) width of the image\\r\\n - height (number) height of the image\\r\\n = (object) Raphaël element object with type “image”\\r\\n **\\r\\n > Usage\\r\\n | var c = paper.image(\\\"apple.png\\\", 10, 10, 80, 80);\\r\\n \\\\*/\\r\\n paperproto.image = function (src, x, y, w, h) {\\r\\n var out = R._engine.image(this, src || \\\"about:blank\\\", x || 0, y || 0, w || 0, h || 0);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.text\\r\\n [ method ]\\r\\n **\\r\\n * Draws a text string. If you need line breaks, put “\\\\n” in the string.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate position\\r\\n - y (number) y coordinate position\\r\\n - text (string) The text string to draw\\r\\n = (object) Raphaël element object with type “text”\\r\\n **\\r\\n > Usage\\r\\n | var t = paper.text(50, 50, \\\"Raphaël\\\\nkicks\\\\nbutt!\\\");\\r\\n \\\\*/\\r\\n paperproto.text = function (x, y, text, href) {\\r\\n var out = R._engine.text(this, x || 0, y || 0, Str(text), href);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.set\\r\\n [ method ]\\r\\n **\\r\\n * Creates array-like object to keep and operate several elements at once.\\r\\n * Warning: it doesn’t create any elements for itself in the page, it just groups existing elements.\\r\\n * Sets act as pseudo elements — all methods available to an element can be used on a set.\\r\\n = (object) array-like object that represents set of elements\\r\\n **\\r\\n > Usage\\r\\n | var st = paper.set();\\r\\n | st.push(\\r\\n | paper.circle(10, 10, 5),\\r\\n | paper.circle(30, 10, 5)\\r\\n | );\\r\\n | st.attr({fill: \\\"red\\\"}); // changes the fill of both circles\\r\\n \\\\*/\\r\\n paperproto.set = function (itemsArray) {\\r\\n !R.is(itemsArray, \\\"array\\\") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.length));\\r\\n var out = new Set(itemsArray);\\r\\n this.__set__ && this.__set__.push(out);\\r\\n out[\\\"paper\\\"] = this;\\r\\n out[\\\"type\\\"] = \\\"set\\\";\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.setStart\\r\\n [ method ]\\r\\n **\\r\\n * Creates @Paper.set. All elements that will be created after calling this method and before calling\\r\\n * @Paper.setFinish will be added to the set.\\r\\n **\\r\\n > Usage\\r\\n | paper.setStart();\\r\\n | paper.circle(10, 10, 5),\\r\\n | paper.circle(30, 10, 5)\\r\\n | var st = paper.setFinish();\\r\\n | st.attr({fill: \\\"red\\\"}); // changes the fill of both circles\\r\\n \\\\*/\\r\\n paperproto.setStart = function (set) {\\r\\n this.__set__ = set || this.set();\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.setFinish\\r\\n [ method ]\\r\\n **\\r\\n * See @Paper.setStart. This method finishes catching and returns resulting set.\\r\\n **\\r\\n = (object) set\\r\\n \\\\*/\\r\\n paperproto.setFinish = function (set) {\\r\\n var out = this.__set__;\\r\\n delete this.__set__;\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.getSize\\r\\n [ method ]\\r\\n **\\r\\n * Obtains current paper actual size.\\r\\n **\\r\\n = (object)\\r\\n \\\\*/\\r\\n paperproto.getSize = function () {\\r\\n var container = this.canvas.parentNode;\\r\\n return {\\r\\n width: container.offsetWidth,\\r\\n height: container.offsetHeight\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.setSize\\r\\n [ method ]\\r\\n **\\r\\n * If you need to change dimensions of the canvas call this method\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - width (number) new width of the canvas\\r\\n - height (number) new height of the canvas\\r\\n \\\\*/\\r\\n paperproto.setSize = function (width, height) {\\r\\n return R._engine.setSize.call(this, width, height);\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.setViewBox\\r\\n [ method ]\\r\\n **\\r\\n * Sets the view box of the paper. Practically it gives you ability to zoom and pan whole paper surface by\\r\\n * specifying new boundaries.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) new x position, default is `0`\\r\\n - y (number) new y position, default is `0`\\r\\n - w (number) new width of the canvas\\r\\n - h (number) new height of the canvas\\r\\n - fit (boolean) `true` if you want graphics to fit into new boundary box\\r\\n \\\\*/\\r\\n paperproto.setViewBox = function (x, y, w, h, fit) {\\r\\n return R._engine.setViewBox.call(this, x, y, w, h, fit);\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.top\\r\\n [ property ]\\r\\n **\\r\\n * Points to the topmost element on the paper\\r\\n \\\\*/\\r\\n /*\\\\\\r\\n * Paper.bottom\\r\\n [ property ]\\r\\n **\\r\\n * Points to the bottom element on the paper\\r\\n \\\\*/\\r\\n paperproto.top = paperproto.bottom = null;\\r\\n /*\\\\\\r\\n * Paper.raphael\\r\\n [ property ]\\r\\n **\\r\\n * Points to the @Raphael object/function\\r\\n \\\\*/\\r\\n paperproto.raphael = R;\\r\\n var getOffset = function (elem) {\\r\\n var box = elem.getBoundingClientRect(),\\r\\n doc = elem.ownerDocument,\\r\\n body = doc.body,\\r\\n docElem = doc.documentElement,\\r\\n clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0,\\r\\n top = box.top + (g.win.pageYOffset || docElem.scrollTop || body.scrollTop ) - clientTop,\\r\\n left = box.left + (g.win.pageXOffset || docElem.scrollLeft || body.scrollLeft) - clientLeft;\\r\\n return {\\r\\n y: top,\\r\\n x: left\\r\\n };\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.getElementByPoint\\r\\n [ method ]\\r\\n **\\r\\n * Returns you topmost element under given point.\\r\\n **\\r\\n = (object) Raphaël element object\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate from the top left corner of the window\\r\\n - y (number) y coordinate from the top left corner of the window\\r\\n > Usage\\r\\n | paper.getElementByPoint(mouseX, mouseY).attr({stroke: \\\"#f00\\\"});\\r\\n \\\\*/\\r\\n paperproto.getElementByPoint = function (x, y) {\\r\\n var paper = this,\\r\\n svg = paper.canvas,\\r\\n target = g.doc.elementFromPoint(x, y);\\r\\n if (g.win.opera && target.tagName == \\\"svg\\\") {\\r\\n var so = getOffset(svg),\\r\\n sr = svg.createSVGRect();\\r\\n sr.x = x - so.x;\\r\\n sr.y = y - so.y;\\r\\n sr.width = sr.height = 1;\\r\\n var hits = svg.getIntersectionList(sr, null);\\r\\n if (hits.length) {\\r\\n target = hits[hits.length - 1];\\r\\n }\\r\\n }\\r\\n if (!target) {\\r\\n return null;\\r\\n }\\r\\n while (target.parentNode && target != svg.parentNode && !target.raphael) {\\r\\n target = target.parentNode;\\r\\n }\\r\\n target == paper.canvas.parentNode && (target = svg);\\r\\n target = target && target.raphael ? paper.getById(target.raphaelid) : null;\\r\\n return target;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Paper.getElementsByBBox\\r\\n [ method ]\\r\\n **\\r\\n * Returns set of elements that have an intersecting bounding box\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - bbox (object) bbox to check with\\r\\n = (object) @Set\\r\\n \\\\*/\\r\\n paperproto.getElementsByBBox = function (bbox) {\\r\\n var set = this.set();\\r\\n this.forEach(function (el) {\\r\\n if (R.isBBoxIntersect(el.getBBox(), bbox)) {\\r\\n set.push(el);\\r\\n }\\r\\n });\\r\\n return set;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Paper.getById\\r\\n [ method ]\\r\\n **\\r\\n * Returns you element by its internal ID.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - id (number) id\\r\\n = (object) Raphaël element object\\r\\n \\\\*/\\r\\n paperproto.getById = function (id) {\\r\\n var bot = this.bottom;\\r\\n while (bot) {\\r\\n if (bot.id == id) {\\r\\n return bot;\\r\\n }\\r\\n bot = bot.next;\\r\\n }\\r\\n return null;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.forEach\\r\\n [ method ]\\r\\n **\\r\\n * Executes given function for each element on the paper\\r\\n *\\r\\n * If callback function returns `false` it will stop loop running.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - callback (function) function to run\\r\\n - thisArg (object) context object for the callback\\r\\n = (object) Paper object\\r\\n > Usage\\r\\n | paper.forEach(function (el) {\\r\\n | el.attr({ stroke: \\\"blue\\\" });\\r\\n | });\\r\\n \\\\*/\\r\\n paperproto.forEach = function (callback, thisArg) {\\r\\n var bot = this.bottom;\\r\\n while (bot) {\\r\\n if (callback.call(thisArg, bot) === false) {\\r\\n return this;\\r\\n }\\r\\n bot = bot.next;\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.getElementsByPoint\\r\\n [ method ]\\r\\n **\\r\\n * Returns set of elements that have common point inside\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the point\\r\\n - y (number) y coordinate of the point\\r\\n = (object) @Set\\r\\n \\\\*/\\r\\n paperproto.getElementsByPoint = function (x, y) {\\r\\n var set = this.set();\\r\\n this.forEach(function (el) {\\r\\n if (el.isPointInside(x, y)) {\\r\\n set.push(el);\\r\\n }\\r\\n });\\r\\n return set;\\r\\n };\\r\\n function x_y() {\\r\\n return this.x + S + this.y;\\r\\n }\\r\\n function x_y_w_h() {\\r\\n return this.x + S + this.y + S + this.width + \\\" \\\\xd7 \\\" + this.height;\\r\\n }\\r\\n /*\\\\\\r\\n * Element.isPointInside\\r\\n [ method ]\\r\\n **\\r\\n * Determine if given point is inside this element’s shape\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the point\\r\\n - y (number) y coordinate of the point\\r\\n = (boolean) `true` if point inside the shape\\r\\n \\\\*/\\r\\n elproto.isPointInside = function (x, y) {\\r\\n var rp = this.realPath = getPath[this.type](this);\\r\\n if (this.attr('transform') && this.attr('transform').length) {\\r\\n rp = R.transformPath(rp, this.attr('transform'));\\r\\n }\\r\\n return R.isPointInsidePath(rp, x, y);\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getBBox\\r\\n [ method ]\\r\\n **\\r\\n * Return bounding box for a given element\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - isWithoutTransform (boolean) flag, `true` if you want to have bounding box before transformations. Default is `false`.\\r\\n = (object) Bounding box object:\\r\\n o {\\r\\n o x: (number) top left corner x\\r\\n o y: (number) top left corner y\\r\\n o x2: (number) bottom right corner x\\r\\n o y2: (number) bottom right corner y\\r\\n o width: (number) width\\r\\n o height: (number) height\\r\\n o }\\r\\n \\\\*/\\r\\n elproto.getBBox = function (isWithoutTransform) {\\r\\n if (this.removed) {\\r\\n return {};\\r\\n }\\r\\n var _ = this._;\\r\\n if (isWithoutTransform) {\\r\\n if (_.dirty || !_.bboxwt) {\\r\\n this.realPath = getPath[this.type](this);\\r\\n _.bboxwt = pathDimensions(this.realPath);\\r\\n _.bboxwt.toString = x_y_w_h;\\r\\n _.dirty = 0;\\r\\n }\\r\\n return _.bboxwt;\\r\\n }\\r\\n if (_.dirty || _.dirtyT || !_.bbox) {\\r\\n if (_.dirty || !this.realPath) {\\r\\n _.bboxwt = 0;\\r\\n this.realPath = getPath[this.type](this);\\r\\n }\\r\\n _.bbox = pathDimensions(mapPath(this.realPath, this.matrix));\\r\\n _.bbox.toString = x_y_w_h;\\r\\n _.dirty = _.dirtyT = 0;\\r\\n }\\r\\n return _.bbox;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.clone\\r\\n [ method ]\\r\\n **\\r\\n = (object) clone of a given element\\r\\n **\\r\\n \\\\*/\\r\\n elproto.clone = function () {\\r\\n if (this.removed) {\\r\\n return null;\\r\\n }\\r\\n var out = this.paper[this.type]().attr(this.attr());\\r\\n this.__set__ && this.__set__.push(out);\\r\\n return out;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.glow\\r\\n [ method ]\\r\\n **\\r\\n * Return set of elements that create glow-like effect around given element. See @Paper.set.\\r\\n *\\r\\n * Note: Glow is not connected to the element. If you change element attributes it won’t adjust itself.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - glow (object) #optional parameters object with all properties optional:\\r\\n o {\\r\\n o width (number) size of the glow, default is `10`\\r\\n o fill (boolean) will it be filled, default is `false`\\r\\n o opacity (number) opacity, default is `0.5`\\r\\n o offsetx (number) horizontal offset, default is `0`\\r\\n o offsety (number) vertical offset, default is `0`\\r\\n o color (string) glow colour, default is `black`\\r\\n o }\\r\\n = (object) @Paper.set of elements that represents glow\\r\\n \\\\*/\\r\\n elproto.glow = function (glow) {\\r\\n if (this.type == \\\"text\\\") {\\r\\n return null;\\r\\n }\\r\\n glow = glow || {};\\r\\n var s = {\\r\\n width: (glow.width || 10) + (+this.attr(\\\"stroke-width\\\") || 1),\\r\\n fill: glow.fill || false,\\r\\n opacity: glow.opacity == null ? .5 : glow.opacity,\\r\\n offsetx: glow.offsetx || 0,\\r\\n offsety: glow.offsety || 0,\\r\\n color: glow.color || \\\"#000\\\"\\r\\n },\\r\\n c = s.width / 2,\\r\\n r = this.paper,\\r\\n out = r.set(),\\r\\n path = this.realPath || getPath[this.type](this);\\r\\n path = this.matrix ? mapPath(path, this.matrix) : path;\\r\\n for (var i = 1; i < c + 1; i++) {\\r\\n out.push(r.path(path).attr({\\r\\n stroke: s.color,\\r\\n fill: s.fill ? s.color : \\\"none\\\",\\r\\n \\\"stroke-linejoin\\\": \\\"round\\\",\\r\\n \\\"stroke-linecap\\\": \\\"round\\\",\\r\\n \\\"stroke-width\\\": +(s.width / c * i).toFixed(3),\\r\\n opacity: +(s.opacity / c).toFixed(3)\\r\\n }));\\r\\n }\\r\\n return out.insertBefore(this).translate(s.offsetx, s.offsety);\\r\\n };\\r\\n var curveslengths = {},\\r\\n getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) {\\r\\n if (length == null) {\\r\\n return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y);\\r\\n } else {\\r\\n return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length));\\r\\n }\\r\\n },\\r\\n getLengthFactory = function (istotal, subpath) {\\r\\n return function (path, length, onlystart) {\\r\\n path = path2curve(path);\\r\\n var x, y, p, l, sp = \\\"\\\", subpaths = {}, point,\\r\\n len = 0;\\r\\n for (var i = 0, ii = path.length; i < ii; i++) {\\r\\n p = path[i];\\r\\n if (p[0] == \\\"M\\\") {\\r\\n x = +p[1];\\r\\n y = +p[2];\\r\\n } else {\\r\\n l = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6]);\\r\\n if (len + l > length) {\\r\\n if (subpath && !subpaths.start) {\\r\\n point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);\\r\\n sp += [\\\"C\\\" + point.start.x, point.start.y, point.m.x, point.m.y, point.x, point.y];\\r\\n if (onlystart) {return sp;}\\r\\n subpaths.start = sp;\\r\\n sp = [\\\"M\\\" + point.x, point.y + \\\"C\\\" + point.n.x, point.n.y, point.end.x, point.end.y, p[5], p[6]].join();\\r\\n len += l;\\r\\n x = +p[5];\\r\\n y = +p[6];\\r\\n continue;\\r\\n }\\r\\n if (!istotal && !subpath) {\\r\\n point = getPointAtSegmentLength(x, y, p[1], p[2], p[3], p[4], p[5], p[6], length - len);\\r\\n return {x: point.x, y: point.y, alpha: point.alpha};\\r\\n }\\r\\n }\\r\\n len += l;\\r\\n x = +p[5];\\r\\n y = +p[6];\\r\\n }\\r\\n sp += p.shift() + p;\\r\\n }\\r\\n subpaths.end = sp;\\r\\n point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4], p[5], 1);\\r\\n point.alpha && (point = {x: point.x, y: point.y, alpha: point.alpha});\\r\\n return point;\\r\\n };\\r\\n };\\r\\n var getTotalLength = getLengthFactory(1),\\r\\n getPointAtLength = getLengthFactory(),\\r\\n getSubpathsAtLength = getLengthFactory(0, 1);\\r\\n /*\\\\\\r\\n * Raphael.getTotalLength\\r\\n [ method ]\\r\\n **\\r\\n * Returns length of the given path in pixels.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - path (string) SVG path string.\\r\\n **\\r\\n = (number) length.\\r\\n \\\\*/\\r\\n R.getTotalLength = getTotalLength;\\r\\n /*\\\\\\r\\n * Raphael.getPointAtLength\\r\\n [ method ]\\r\\n **\\r\\n * Return coordinates of the point located at the given length on the given path.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - path (string) SVG path string\\r\\n - length (number)\\r\\n **\\r\\n = (object) representation of the point:\\r\\n o {\\r\\n o x: (number) x coordinate\\r\\n o y: (number) y coordinate\\r\\n o alpha: (number) angle of derivative\\r\\n o }\\r\\n \\\\*/\\r\\n R.getPointAtLength = getPointAtLength;\\r\\n /*\\\\\\r\\n * Raphael.getSubpath\\r\\n [ method ]\\r\\n **\\r\\n * Return subpath of a given path from given length to given length.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - path (string) SVG path string\\r\\n - from (number) position of the start of the segment\\r\\n - to (number) position of the end of the segment\\r\\n **\\r\\n = (string) pathstring for the segment\\r\\n \\\\*/\\r\\n R.getSubpath = function (path, from, to) {\\r\\n if (this.getTotalLength(path) - to < 1e-6) {\\r\\n return getSubpathsAtLength(path, from).end;\\r\\n }\\r\\n var a = getSubpathsAtLength(path, to, 1);\\r\\n return from ? getSubpathsAtLength(a, from).end : a;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getTotalLength\\r\\n [ method ]\\r\\n **\\r\\n * Returns length of the path in pixels. Only works for element of “path” type.\\r\\n = (number) length.\\r\\n \\\\*/\\r\\n elproto.getTotalLength = function () {\\r\\n var path = this.getPath();\\r\\n if (!path) {\\r\\n return;\\r\\n }\\r\\n\\r\\n if (this.node.getTotalLength) {\\r\\n return this.node.getTotalLength();\\r\\n }\\r\\n\\r\\n return getTotalLength(path);\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getPointAtLength\\r\\n [ method ]\\r\\n **\\r\\n * Return coordinates of the point located at the given length on the given path. Only works for element of “path” type.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - length (number)\\r\\n **\\r\\n = (object) representation of the point:\\r\\n o {\\r\\n o x: (number) x coordinate\\r\\n o y: (number) y coordinate\\r\\n o alpha: (number) angle of derivative\\r\\n o }\\r\\n \\\\*/\\r\\n elproto.getPointAtLength = function (length) {\\r\\n var path = this.getPath();\\r\\n if (!path) {\\r\\n return;\\r\\n }\\r\\n\\r\\n return getPointAtLength(path, length);\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getPath\\r\\n [ method ]\\r\\n **\\r\\n * Returns path of the element. Only works for elements of “path” type and simple elements like circle.\\r\\n = (object) path\\r\\n **\\r\\n \\\\*/\\r\\n elproto.getPath = function () {\\r\\n var path,\\r\\n getPath = R._getPath[this.type];\\r\\n\\r\\n if (this.type == \\\"text\\\" || this.type == \\\"set\\\") {\\r\\n return;\\r\\n }\\r\\n\\r\\n if (getPath) {\\r\\n path = getPath(this);\\r\\n }\\r\\n\\r\\n return path;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.getSubpath\\r\\n [ method ]\\r\\n **\\r\\n * Return subpath of a given element from given length to given length. Only works for element of “path” type.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - from (number) position of the start of the segment\\r\\n - to (number) position of the end of the segment\\r\\n **\\r\\n = (string) pathstring for the segment\\r\\n \\\\*/\\r\\n elproto.getSubpath = function (from, to) {\\r\\n var path = this.getPath();\\r\\n if (!path) {\\r\\n return;\\r\\n }\\r\\n\\r\\n return R.getSubpath(path, from, to);\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.easing_formulas\\r\\n [ property ]\\r\\n **\\r\\n * Object that contains easing formulas for animation. You could extend it with your own. By default it has following list of easing:\\r\\n # <ul>\\r\\n # <li>“linear”</li>\\r\\n # <li>“<” or “easeIn” or “ease-in”</li>\\r\\n # <li>“>” or “easeOut” or “ease-out”</li>\\r\\n # <li>“<>” or “easeInOut” or “ease-in-out”</li>\\r\\n # <li>“backIn” or “back-in”</li>\\r\\n # <li>“backOut” or “back-out”</li>\\r\\n # <li>“elastic”</li>\\r\\n # <li>“bounce”</li>\\r\\n # </ul>\\r\\n # <p>See also <a href=\\\"http://raphaeljs.com/easing.html\\\">Easing demo</a>.</p>\\r\\n \\\\*/\\r\\n var ef = R.easing_formulas = {\\r\\n linear: function (n) {\\r\\n return n;\\r\\n },\\r\\n \\\"<\\\": function (n) {\\r\\n return pow(n, 1.7);\\r\\n },\\r\\n \\\">\\\": function (n) {\\r\\n return pow(n, .48);\\r\\n },\\r\\n \\\"<>\\\": function (n) {\\r\\n var q = .48 - n / 1.04,\\r\\n Q = math.sqrt(.1734 + q * q),\\r\\n x = Q - q,\\r\\n X = pow(abs(x), 1 / 3) * (x < 0 ? -1 : 1),\\r\\n y = -Q - q,\\r\\n Y = pow(abs(y), 1 / 3) * (y < 0 ? -1 : 1),\\r\\n t = X + Y + .5;\\r\\n return (1 - t) * 3 * t * t + t * t * t;\\r\\n },\\r\\n backIn: function (n) {\\r\\n var s = 1.70158;\\r\\n return n * n * ((s + 1) * n - s);\\r\\n },\\r\\n backOut: function (n) {\\r\\n n = n - 1;\\r\\n var s = 1.70158;\\r\\n return n * n * ((s + 1) * n + s) + 1;\\r\\n },\\r\\n elastic: function (n) {\\r\\n if (n == !!n) {\\r\\n return n;\\r\\n }\\r\\n return pow(2, -10 * n) * math.sin((n - .075) * (2 * PI) / .3) + 1;\\r\\n },\\r\\n bounce: function (n) {\\r\\n var s = 7.5625,\\r\\n p = 2.75,\\r\\n l;\\r\\n if (n < (1 / p)) {\\r\\n l = s * n * n;\\r\\n } else {\\r\\n if (n < (2 / p)) {\\r\\n n -= (1.5 / p);\\r\\n l = s * n * n + .75;\\r\\n } else {\\r\\n if (n < (2.5 / p)) {\\r\\n n -= (2.25 / p);\\r\\n l = s * n * n + .9375;\\r\\n } else {\\r\\n n -= (2.625 / p);\\r\\n l = s * n * n + .984375;\\r\\n }\\r\\n }\\r\\n }\\r\\n return l;\\r\\n }\\r\\n };\\r\\n ef.easeIn = ef[\\\"ease-in\\\"] = ef[\\\"<\\\"];\\r\\n ef.easeOut = ef[\\\"ease-out\\\"] = ef[\\\">\\\"];\\r\\n ef.easeInOut = ef[\\\"ease-in-out\\\"] = ef[\\\"<>\\\"];\\r\\n ef[\\\"back-in\\\"] = ef.backIn;\\r\\n ef[\\\"back-out\\\"] = ef.backOut;\\r\\n\\r\\n var animationElements = [],\\r\\n requestAnimFrame = window.requestAnimationFrame ||\\r\\n window.webkitRequestAnimationFrame ||\\r\\n window.mozRequestAnimationFrame ||\\r\\n window.oRequestAnimationFrame ||\\r\\n window.msRequestAnimationFrame ||\\r\\n function (callback) {\\r\\n setTimeout(callback, 16);\\r\\n },\\r\\n animation = function () {\\r\\n var Now = +new Date,\\r\\n l = 0;\\r\\n for (; l < animationElements.length; l++) {\\r\\n var e = animationElements[l];\\r\\n if (e.el.removed || e.paused) {\\r\\n continue;\\r\\n }\\r\\n var time = Now - e.start,\\r\\n ms = e.ms,\\r\\n easing = e.easing,\\r\\n from = e.from,\\r\\n diff = e.diff,\\r\\n to = e.to,\\r\\n t = e.t,\\r\\n that = e.el,\\r\\n set = {},\\r\\n now,\\r\\n init = {},\\r\\n key;\\r\\n if (e.initstatus) {\\r\\n time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms;\\r\\n e.status = e.initstatus;\\r\\n delete e.initstatus;\\r\\n e.stop && animationElements.splice(l--, 1);\\r\\n } else {\\r\\n e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top;\\r\\n }\\r\\n if (time < 0) {\\r\\n continue;\\r\\n }\\r\\n if (time < ms) {\\r\\n var pos = easing(time / ms);\\r\\n for (var attr in from) if (from[has](attr)) {\\r\\n switch (availableAnimAttrs[attr]) {\\r\\n case nu:\\r\\n now = +from[attr] + pos * ms * diff[attr];\\r\\n break;\\r\\n case \\\"colour\\\":\\r\\n now = \\\"rgb(\\\" + [\\r\\n upto255(round(from[attr].r + pos * ms * diff[attr].r)),\\r\\n upto255(round(from[attr].g + pos * ms * diff[attr].g)),\\r\\n upto255(round(from[attr].b + pos * ms * diff[attr].b))\\r\\n ].join(\\\",\\\") + \\\")\\\";\\r\\n break;\\r\\n case \\\"path\\\":\\r\\n now = [];\\r\\n for (var i = 0, ii = from[attr].length; i < ii; i++) {\\r\\n now[i] = [from[attr][i][0]];\\r\\n for (var j = 1, jj = from[attr][i].length; j < jj; j++) {\\r\\n now[i][j] = +from[attr][i][j] + pos * ms * diff[attr][i][j];\\r\\n }\\r\\n now[i] = now[i].join(S);\\r\\n }\\r\\n now = now.join(S);\\r\\n break;\\r\\n case \\\"transform\\\":\\r\\n if (diff[attr].real) {\\r\\n now = [];\\r\\n for (i = 0, ii = from[attr].length; i < ii; i++) {\\r\\n now[i] = [from[attr][i][0]];\\r\\n for (j = 1, jj = from[attr][i].length; j < jj; j++) {\\r\\n now[i][j] = from[attr][i][j] + pos * ms * diff[attr][i][j];\\r\\n }\\r\\n }\\r\\n } else {\\r\\n var get = function (i) {\\r\\n return +from[attr][i] + pos * ms * diff[attr][i];\\r\\n };\\r\\n // now = [[\\\"r\\\", get(2), 0, 0], [\\\"t\\\", get(3), get(4)], [\\\"s\\\", get(0), get(1), 0, 0]];\\r\\n now = [[\\\"m\\\", get(0), get(1), get(2), get(3), get(4), get(5)]];\\r\\n }\\r\\n break;\\r\\n case \\\"csv\\\":\\r\\n if (attr == \\\"clip-rect\\\") {\\r\\n now = [];\\r\\n i = 4;\\r\\n while (i--) {\\r\\n now[i] = +from[attr][i] + pos * ms * diff[attr][i];\\r\\n }\\r\\n }\\r\\n break;\\r\\n default:\\r\\n var from2 = [][concat](from[attr]);\\r\\n now = [];\\r\\n i = that.paper.customAttributes[attr].length;\\r\\n while (i--) {\\r\\n now[i] = +from2[i] + pos * ms * diff[attr][i];\\r\\n }\\r\\n break;\\r\\n }\\r\\n set[attr] = now;\\r\\n }\\r\\n that.attr(set);\\r\\n (function (id, that, anim) {\\r\\n setTimeout(function () {\\r\\n eve(\\\"raphael.anim.frame.\\\" + id, that, anim);\\r\\n });\\r\\n })(that.id, that, e.anim);\\r\\n } else {\\r\\n (function(f, el, a) {\\r\\n setTimeout(function() {\\r\\n eve(\\\"raphael.anim.frame.\\\" + el.id, el, a);\\r\\n eve(\\\"raphael.anim.finish.\\\" + el.id, el, a);\\r\\n R.is(f, \\\"function\\\") && f.call(el);\\r\\n });\\r\\n })(e.callback, that, e.anim);\\r\\n that.attr(to);\\r\\n animationElements.splice(l--, 1);\\r\\n if (e.repeat > 1 && !e.next) {\\r\\n for (key in to) if (to[has](key)) {\\r\\n init[key] = e.totalOrigin[key];\\r\\n }\\r\\n e.el.attr(init);\\r\\n runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1);\\r\\n }\\r\\n if (e.next && !e.stop) {\\r\\n runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat);\\r\\n }\\r\\n }\\r\\n }\\r\\n animationElements.length && requestAnimFrame(animation);\\r\\n },\\r\\n upto255 = function (color) {\\r\\n return color > 255 ? 255 : color < 0 ? 0 : color;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.animateWith\\r\\n [ method ]\\r\\n **\\r\\n * Acts similar to @Element.animate, but ensure that given animation runs in sync with another given element.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - el (object) element to sync with\\r\\n - anim (object) animation to sync with\\r\\n - params (object) #optional final attributes for the element, see also @Element.attr\\r\\n - ms (number) #optional number of milliseconds for animation to run\\r\\n - easing (string) #optional easing type. Accept on of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\\r\\n - callback (function) #optional callback function. Will be called at the end of animation.\\r\\n * or\\r\\n - element (object) element to sync with\\r\\n - anim (object) animation to sync with\\r\\n - animation (object) #optional animation object, see @Raphael.animation\\r\\n **\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n elproto.animateWith = function (el, anim, params, ms, easing, callback) {\\r\\n var element = this;\\r\\n if (element.removed) {\\r\\n callback && callback.call(element);\\r\\n return element;\\r\\n }\\r\\n var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback),\\r\\n x, y;\\r\\n runAnimation(a, element, a.percents[0], null, element.attr());\\r\\n for (var i = 0, ii = animationElements.length; i < ii; i++) {\\r\\n if (animationElements[i].anim == anim && animationElements[i].el == el) {\\r\\n animationElements[ii - 1].start = animationElements[i].start;\\r\\n break;\\r\\n }\\r\\n }\\r\\n return element;\\r\\n //\\r\\n //\\r\\n // var a = params ? R.animation(params, ms, easing, callback) : anim,\\r\\n // status = element.status(anim);\\r\\n // return this.animate(a).status(a, status * anim.ms / a.ms);\\r\\n };\\r\\n function CubicBezierAtTime(t, p1x, p1y, p2x, p2y, duration) {\\r\\n var cx = 3 * p1x,\\r\\n bx = 3 * (p2x - p1x) - cx,\\r\\n ax = 1 - cx - bx,\\r\\n cy = 3 * p1y,\\r\\n by = 3 * (p2y - p1y) - cy,\\r\\n ay = 1 - cy - by;\\r\\n function sampleCurveX(t) {\\r\\n return ((ax * t + bx) * t + cx) * t;\\r\\n }\\r\\n function solve(x, epsilon) {\\r\\n var t = solveCurveX(x, epsilon);\\r\\n return ((ay * t + by) * t + cy) * t;\\r\\n }\\r\\n function solveCurveX(x, epsilon) {\\r\\n var t0, t1, t2, x2, d2, i;\\r\\n for(t2 = x, i = 0; i < 8; i++) {\\r\\n x2 = sampleCurveX(t2) - x;\\r\\n if (abs(x2) < epsilon) {\\r\\n return t2;\\r\\n }\\r\\n d2 = (3 * ax * t2 + 2 * bx) * t2 + cx;\\r\\n if (abs(d2) < 1e-6) {\\r\\n break;\\r\\n }\\r\\n t2 = t2 - x2 / d2;\\r\\n }\\r\\n t0 = 0;\\r\\n t1 = 1;\\r\\n t2 = x;\\r\\n if (t2 < t0) {\\r\\n return t0;\\r\\n }\\r\\n if (t2 > t1) {\\r\\n return t1;\\r\\n }\\r\\n while (t0 < t1) {\\r\\n x2 = sampleCurveX(t2);\\r\\n if (abs(x2 - x) < epsilon) {\\r\\n return t2;\\r\\n }\\r\\n if (x > x2) {\\r\\n t0 = t2;\\r\\n } else {\\r\\n t1 = t2;\\r\\n }\\r\\n t2 = (t1 - t0) / 2 + t0;\\r\\n }\\r\\n return t2;\\r\\n }\\r\\n return solve(t, 1 / (200 * duration));\\r\\n }\\r\\n elproto.onAnimation = function (f) {\\r\\n f ? eve.on(\\\"raphael.anim.frame.\\\" + this.id, f) : eve.unbind(\\\"raphael.anim.frame.\\\" + this.id);\\r\\n return this;\\r\\n };\\r\\n function Animation(anim, ms) {\\r\\n var percents = [],\\r\\n newAnim = {};\\r\\n this.ms = ms;\\r\\n this.times = 1;\\r\\n if (anim) {\\r\\n for (var attr in anim) if (anim[has](attr)) {\\r\\n newAnim[toFloat(attr)] = anim[attr];\\r\\n percents.push(toFloat(attr));\\r\\n }\\r\\n percents.sort(sortByNumber);\\r\\n }\\r\\n this.anim = newAnim;\\r\\n this.top = percents[percents.length - 1];\\r\\n this.percents = percents;\\r\\n }\\r\\n /*\\\\\\r\\n * Animation.delay\\r\\n [ method ]\\r\\n **\\r\\n * Creates a copy of existing animation object with given delay.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - delay (number) number of ms to pass between animation start and actual animation\\r\\n **\\r\\n = (object) new altered Animation object\\r\\n | var anim = Raphael.animation({cx: 10, cy: 20}, 2e3);\\r\\n | circle1.animate(anim); // run the given animation immediately\\r\\n | circle2.animate(anim.delay(500)); // run the given animation after 500 ms\\r\\n \\\\*/\\r\\n Animation.prototype.delay = function (delay) {\\r\\n var a = new Animation(this.anim, this.ms);\\r\\n a.times = this.times;\\r\\n a.del = +delay || 0;\\r\\n return a;\\r\\n };\\r\\n /*\\\\\\r\\n * Animation.repeat\\r\\n [ method ]\\r\\n **\\r\\n * Creates a copy of existing animation object with given repetition.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - repeat (number) number iterations of animation. For infinite animation pass `Infinity`\\r\\n **\\r\\n = (object) new altered Animation object\\r\\n \\\\*/\\r\\n Animation.prototype.repeat = function (times) {\\r\\n var a = new Animation(this.anim, this.ms);\\r\\n a.del = this.del;\\r\\n a.times = math.floor(mmax(times, 0)) || 1;\\r\\n return a;\\r\\n };\\r\\n function runAnimation(anim, element, percent, status, totalOrigin, times) {\\r\\n percent = toFloat(percent);\\r\\n var params,\\r\\n isInAnim,\\r\\n isInAnimSet,\\r\\n percents = [],\\r\\n next,\\r\\n prev,\\r\\n timestamp,\\r\\n ms = anim.ms,\\r\\n from = {},\\r\\n to = {},\\r\\n diff = {};\\r\\n if (status) {\\r\\n for (i = 0, ii = animationElements.length; i < ii; i++) {\\r\\n var e = animationElements[i];\\r\\n if (e.el.id == element.id && e.anim == anim) {\\r\\n if (e.percent != percent) {\\r\\n animationElements.splice(i, 1);\\r\\n isInAnimSet = 1;\\r\\n } else {\\r\\n isInAnim = e;\\r\\n }\\r\\n element.attr(e.totalOrigin);\\r\\n break;\\r\\n }\\r\\n }\\r\\n } else {\\r\\n status = +to; // NaN\\r\\n }\\r\\n for (var i = 0, ii = anim.percents.length; i < ii; i++) {\\r\\n if (anim.percents[i] == percent || anim.percents[i] > status * anim.top) {\\r\\n percent = anim.percents[i];\\r\\n prev = anim.percents[i - 1] || 0;\\r\\n ms = ms / anim.top * (percent - prev);\\r\\n next = anim.percents[i + 1];\\r\\n params = anim.anim[percent];\\r\\n break;\\r\\n } else if (status) {\\r\\n element.attr(anim.anim[anim.percents[i]]);\\r\\n }\\r\\n }\\r\\n if (!params) {\\r\\n return;\\r\\n }\\r\\n if (!isInAnim) {\\r\\n for (var attr in params) if (params[has](attr)) {\\r\\n if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) {\\r\\n from[attr] = element.attr(attr);\\r\\n (from[attr] == null) && (from[attr] = availableAttrs[attr]);\\r\\n to[attr] = params[attr];\\r\\n switch (availableAnimAttrs[attr]) {\\r\\n case nu:\\r\\n diff[attr] = (to[attr] - from[attr]) / ms;\\r\\n break;\\r\\n case \\\"colour\\\":\\r\\n from[attr] = R.getRGB(from[attr]);\\r\\n var toColour = R.getRGB(to[attr]);\\r\\n diff[attr] = {\\r\\n r: (toColour.r - from[attr].r) / ms,\\r\\n g: (toColour.g - from[attr].g) / ms,\\r\\n b: (toColour.b - from[attr].b) / ms\\r\\n };\\r\\n break;\\r\\n case \\\"path\\\":\\r\\n var pathes = path2curve(from[attr], to[attr]),\\r\\n toPath = pathes[1];\\r\\n from[attr] = pathes[0];\\r\\n diff[attr] = [];\\r\\n for (i = 0, ii = from[attr].length; i < ii; i++) {\\r\\n diff[attr][i] = [0];\\r\\n for (var j = 1, jj = from[attr][i].length; j < jj; j++) {\\r\\n diff[attr][i][j] = (toPath[i][j] - from[attr][i][j]) / ms;\\r\\n }\\r\\n }\\r\\n break;\\r\\n case \\\"transform\\\":\\r\\n var _ = element._,\\r\\n eq = equaliseTransform(_[attr], to[attr]);\\r\\n if (eq) {\\r\\n from[attr] = eq.from;\\r\\n to[attr] = eq.to;\\r\\n diff[attr] = [];\\r\\n diff[attr].real = true;\\r\\n for (i = 0, ii = from[attr].length; i < ii; i++) {\\r\\n diff[attr][i] = [from[attr][i][0]];\\r\\n for (j = 1, jj = from[attr][i].length; j < jj; j++) {\\r\\n diff[attr][i][j] = (to[attr][i][j] - from[attr][i][j]) / ms;\\r\\n }\\r\\n }\\r\\n } else {\\r\\n var m = (element.matrix || new Matrix),\\r\\n to2 = {\\r\\n _: {transform: _.transform},\\r\\n getBBox: function () {\\r\\n return element.getBBox(1);\\r\\n }\\r\\n };\\r\\n from[attr] = [\\r\\n m.a,\\r\\n m.b,\\r\\n m.c,\\r\\n m.d,\\r\\n m.e,\\r\\n m.f\\r\\n ];\\r\\n extractTransform(to2, to[attr]);\\r\\n to[attr] = to2._.transform;\\r\\n diff[attr] = [\\r\\n (to2.matrix.a - m.a) / ms,\\r\\n (to2.matrix.b - m.b) / ms,\\r\\n (to2.matrix.c - m.c) / ms,\\r\\n (to2.matrix.d - m.d) / ms,\\r\\n (to2.matrix.e - m.e) / ms,\\r\\n (to2.matrix.f - m.f) / ms\\r\\n ];\\r\\n // from[attr] = [_.sx, _.sy, _.deg, _.dx, _.dy];\\r\\n // var to2 = {_:{}, getBBox: function () { return element.getBBox(); }};\\r\\n // extractTransform(to2, to[attr]);\\r\\n // diff[attr] = [\\r\\n // (to2._.sx - _.sx) / ms,\\r\\n // (to2._.sy - _.sy) / ms,\\r\\n // (to2._.deg - _.deg) / ms,\\r\\n // (to2._.dx - _.dx) / ms,\\r\\n // (to2._.dy - _.dy) / ms\\r\\n // ];\\r\\n }\\r\\n break;\\r\\n case \\\"csv\\\":\\r\\n var values = Str(params[attr])[split](separator),\\r\\n from2 = Str(from[attr])[split](separator);\\r\\n if (attr == \\\"clip-rect\\\") {\\r\\n from[attr] = from2;\\r\\n diff[attr] = [];\\r\\n i = from2.length;\\r\\n while (i--) {\\r\\n diff[attr][i] = (values[i] - from[attr][i]) / ms;\\r\\n }\\r\\n }\\r\\n to[attr] = values;\\r\\n break;\\r\\n default:\\r\\n values = [][concat](params[attr]);\\r\\n from2 = [][concat](from[attr]);\\r\\n diff[attr] = [];\\r\\n i = element.paper.customAttributes[attr].length;\\r\\n while (i--) {\\r\\n diff[attr][i] = ((values[i] || 0) - (from2[i] || 0)) / ms;\\r\\n }\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n var easing = params.easing,\\r\\n easyeasy = R.easing_formulas[easing];\\r\\n if (!easyeasy) {\\r\\n easyeasy = Str(easing).match(bezierrg);\\r\\n if (easyeasy && easyeasy.length == 5) {\\r\\n var curve = easyeasy;\\r\\n easyeasy = function (t) {\\r\\n return CubicBezierAtTime(t, +curve[1], +curve[2], +curve[3], +curve[4], ms);\\r\\n };\\r\\n } else {\\r\\n easyeasy = pipe;\\r\\n }\\r\\n }\\r\\n timestamp = params.start || anim.start || +new Date;\\r\\n e = {\\r\\n anim: anim,\\r\\n percent: percent,\\r\\n timestamp: timestamp,\\r\\n start: timestamp + (anim.del || 0),\\r\\n status: 0,\\r\\n initstatus: status || 0,\\r\\n stop: false,\\r\\n ms: ms,\\r\\n easing: easyeasy,\\r\\n from: from,\\r\\n diff: diff,\\r\\n to: to,\\r\\n el: element,\\r\\n callback: params.callback,\\r\\n prev: prev,\\r\\n next: next,\\r\\n repeat: times || anim.times,\\r\\n origin: element.attr(),\\r\\n totalOrigin: totalOrigin\\r\\n };\\r\\n animationElements.push(e);\\r\\n if (status && !isInAnim && !isInAnimSet) {\\r\\n e.stop = true;\\r\\n e.start = new Date - ms * status;\\r\\n if (animationElements.length == 1) {\\r\\n return animation();\\r\\n }\\r\\n }\\r\\n if (isInAnimSet) {\\r\\n e.start = new Date - e.ms * status;\\r\\n }\\r\\n animationElements.length == 1 && requestAnimFrame(animation);\\r\\n } else {\\r\\n isInAnim.initstatus = status;\\r\\n isInAnim.start = new Date - isInAnim.ms * status;\\r\\n }\\r\\n eve(\\\"raphael.anim.start.\\\" + element.id, element, anim);\\r\\n }\\r\\n /*\\\\\\r\\n * Raphael.animation\\r\\n [ method ]\\r\\n **\\r\\n * Creates an animation object that can be passed to the @Element.animate or @Element.animateWith methods.\\r\\n * See also @Animation.delay and @Animation.repeat methods.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - params (object) final attributes for the element, see also @Element.attr\\r\\n - ms (number) number of milliseconds for animation to run\\r\\n - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\\r\\n - callback (function) #optional callback function. Will be called at the end of animation.\\r\\n **\\r\\n = (object) @Animation\\r\\n \\\\*/\\r\\n R.animation = function (params, ms, easing, callback) {\\r\\n if (params instanceof Animation) {\\r\\n return params;\\r\\n }\\r\\n if (R.is(easing, \\\"function\\\") || !easing) {\\r\\n callback = callback || easing || null;\\r\\n easing = null;\\r\\n }\\r\\n params = Object(params);\\r\\n ms = +ms || 0;\\r\\n var p = {},\\r\\n json,\\r\\n attr;\\r\\n for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + \\\"%\\\" != attr) {\\r\\n json = true;\\r\\n p[attr] = params[attr];\\r\\n }\\r\\n if (!json) {\\r\\n // if percent-like syntax is used and end-of-all animation callback used\\r\\n if(callback){\\r\\n // find the last one\\r\\n var lastKey = 0;\\r\\n for(var i in params){\\r\\n var percent = toInt(i);\\r\\n if(params[has](i) && percent > lastKey){\\r\\n lastKey = percent;\\r\\n }\\r\\n }\\r\\n lastKey += '%';\\r\\n // if already defined callback in the last keyframe, skip\\r\\n !params[lastKey].callback && (params[lastKey].callback = callback);\\r\\n }\\r\\n return new Animation(params, ms);\\r\\n } else {\\r\\n easing && (p.easing = easing);\\r\\n callback && (p.callback = callback);\\r\\n return new Animation({100: p}, ms);\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * Element.animate\\r\\n [ method ]\\r\\n **\\r\\n * Creates and starts animation for given element.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - params (object) final attributes for the element, see also @Element.attr\\r\\n - ms (number) number of milliseconds for animation to run\\r\\n - easing (string) #optional easing type. Accept one of @Raphael.easing_formulas or CSS format: `cubic‐bezier(XX, XX, XX, XX)`\\r\\n - callback (function) #optional callback function. Will be called at the end of animation.\\r\\n * or\\r\\n - animation (object) animation object, see @Raphael.animation\\r\\n **\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n elproto.animate = function (params, ms, easing, callback) {\\r\\n var element = this;\\r\\n if (element.removed) {\\r\\n callback && callback.call(element);\\r\\n return element;\\r\\n }\\r\\n var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback);\\r\\n runAnimation(anim, element, anim.percents[0], null, element.attr());\\r\\n return element;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.setTime\\r\\n [ method ]\\r\\n **\\r\\n * Sets the status of animation of the element in milliseconds. Similar to @Element.status method.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - anim (object) animation object\\r\\n - value (number) number of milliseconds from the beginning of the animation\\r\\n **\\r\\n = (object) original element if `value` is specified\\r\\n * Note, that during animation following events are triggered:\\r\\n *\\r\\n * On each animation frame event `anim.frame.<id>`, on start `anim.start.<id>` and on end `anim.finish.<id>`.\\r\\n \\\\*/\\r\\n elproto.setTime = function (anim, value) {\\r\\n if (anim && value != null) {\\r\\n this.status(anim, mmin(value, anim.ms) / anim.ms);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.status\\r\\n [ method ]\\r\\n **\\r\\n * Gets or sets the status of animation of the element.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - anim (object) #optional animation object\\r\\n - value (number) #optional 0 – 1. If specified, method works like a setter and sets the status of a given animation to the value. This will cause animation to jump to the given position.\\r\\n **\\r\\n = (number) status\\r\\n * or\\r\\n = (array) status if `anim` is not specified. Array of objects in format:\\r\\n o {\\r\\n o anim: (object) animation object\\r\\n o status: (number) status\\r\\n o }\\r\\n * or\\r\\n = (object) original element if `value` is specified\\r\\n \\\\*/\\r\\n elproto.status = function (anim, value) {\\r\\n var out = [],\\r\\n i = 0,\\r\\n len,\\r\\n e;\\r\\n if (value != null) {\\r\\n runAnimation(anim, this, -1, mmin(value, 1));\\r\\n return this;\\r\\n } else {\\r\\n len = animationElements.length;\\r\\n for (; i < len; i++) {\\r\\n e = animationElements[i];\\r\\n if (e.el.id == this.id && (!anim || e.anim == anim)) {\\r\\n if (anim) {\\r\\n return e.status;\\r\\n }\\r\\n out.push({\\r\\n anim: e.anim,\\r\\n status: e.status\\r\\n });\\r\\n }\\r\\n }\\r\\n if (anim) {\\r\\n return 0;\\r\\n }\\r\\n return out;\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * Element.pause\\r\\n [ method ]\\r\\n **\\r\\n * Stops animation of the element with ability to resume it later on.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - anim (object) #optional animation object\\r\\n **\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n elproto.pause = function (anim) {\\r\\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\\r\\n if (eve(\\\"raphael.anim.pause.\\\" + this.id, this, animationElements[i].anim) !== false) {\\r\\n animationElements[i].paused = true;\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.resume\\r\\n [ method ]\\r\\n **\\r\\n * Resumes animation if it was paused with @Element.pause method.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - anim (object) #optional animation object\\r\\n **\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n elproto.resume = function (anim) {\\r\\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\\r\\n var e = animationElements[i];\\r\\n if (eve(\\\"raphael.anim.resume.\\\" + this.id, this, e.anim) !== false) {\\r\\n delete e.paused;\\r\\n this.status(e.anim, e.status);\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.stop\\r\\n [ method ]\\r\\n **\\r\\n * Stops animation of the element.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - anim (object) #optional animation object\\r\\n **\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n elproto.stop = function (anim) {\\r\\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) {\\r\\n if (eve(\\\"raphael.anim.stop.\\\" + this.id, this, animationElements[i].anim) !== false) {\\r\\n animationElements.splice(i--, 1);\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n function stopAnimation(paper) {\\r\\n for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) {\\r\\n animationElements.splice(i--, 1);\\r\\n }\\r\\n }\\r\\n eve.on(\\\"raphael.remove\\\", stopAnimation);\\r\\n eve.on(\\\"raphael.clear\\\", stopAnimation);\\r\\n elproto.toString = function () {\\r\\n return \\\"Rapha\\\\xebl\\\\u2019s object\\\";\\r\\n };\\r\\n\\r\\n // Set\\r\\n var Set = function (items) {\\r\\n this.items = [];\\r\\n this.length = 0;\\r\\n this.type = \\\"set\\\";\\r\\n if (items) {\\r\\n for (var i = 0, ii = items.length; i < ii; i++) {\\r\\n if (items[i] && (items[i].constructor == elproto.constructor || items[i].constructor == Set)) {\\r\\n this[this.items.length] = this.items[this.items.length] = items[i];\\r\\n this.length++;\\r\\n }\\r\\n }\\r\\n }\\r\\n },\\r\\n setproto = Set.prototype;\\r\\n /*\\\\\\r\\n * Set.push\\r\\n [ method ]\\r\\n **\\r\\n * Adds each argument to the current set.\\r\\n = (object) original element\\r\\n \\\\*/\\r\\n setproto.push = function () {\\r\\n var item,\\r\\n len;\\r\\n for (var i = 0, ii = arguments.length; i < ii; i++) {\\r\\n item = arguments[i];\\r\\n if (item && (item.constructor == elproto.constructor || item.constructor == Set)) {\\r\\n len = this.items.length;\\r\\n this[len] = this.items[len] = item;\\r\\n this.length++;\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Set.pop\\r\\n [ method ]\\r\\n **\\r\\n * Removes last element and returns it.\\r\\n = (object) element\\r\\n \\\\*/\\r\\n setproto.pop = function () {\\r\\n this.length && delete this[this.length--];\\r\\n return this.items.pop();\\r\\n };\\r\\n /*\\\\\\r\\n * Set.forEach\\r\\n [ method ]\\r\\n **\\r\\n * Executes given function for each element in the set.\\r\\n *\\r\\n * If function returns `false` it will stop loop running.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - callback (function) function to run\\r\\n - thisArg (object) context object for the callback\\r\\n = (object) Set object\\r\\n \\\\*/\\r\\n setproto.forEach = function (callback, thisArg) {\\r\\n for (var i = 0, ii = this.items.length; i < ii; i++) {\\r\\n if (callback.call(thisArg, this.items[i], i) === false) {\\r\\n return this;\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n for (var method in elproto) if (elproto[has](method)) {\\r\\n setproto[method] = (function (methodname) {\\r\\n return function () {\\r\\n var arg = arguments;\\r\\n return this.forEach(function (el) {\\r\\n el[methodname][apply](el, arg);\\r\\n });\\r\\n };\\r\\n })(method);\\r\\n }\\r\\n setproto.attr = function (name, value) {\\r\\n if (name && R.is(name, array) && R.is(name[0], \\\"object\\\")) {\\r\\n for (var j = 0, jj = name.length; j < jj; j++) {\\r\\n this.items[j].attr(name[j]);\\r\\n }\\r\\n } else {\\r\\n for (var i = 0, ii = this.items.length; i < ii; i++) {\\r\\n this.items[i].attr(name, value);\\r\\n }\\r\\n }\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Set.clear\\r\\n [ method ]\\r\\n **\\r\\n * Removes all elements from the set\\r\\n \\\\*/\\r\\n setproto.clear = function () {\\r\\n while (this.length) {\\r\\n this.pop();\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * Set.splice\\r\\n [ method ]\\r\\n **\\r\\n * Removes given element from the set\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - index (number) position of the deletion\\r\\n - count (number) number of element to remove\\r\\n - insertion… (object) #optional elements to insert\\r\\n = (object) set elements that were deleted\\r\\n \\\\*/\\r\\n setproto.splice = function (index, count, insertion) {\\r\\n index = index < 0 ? mmax(this.length + index, 0) : index;\\r\\n count = mmax(0, mmin(this.length - index, count));\\r\\n var tail = [],\\r\\n todel = [],\\r\\n args = [],\\r\\n i;\\r\\n for (i = 2; i < arguments.length; i++) {\\r\\n args.push(arguments[i]);\\r\\n }\\r\\n for (i = 0; i < count; i++) {\\r\\n todel.push(this[index + i]);\\r\\n }\\r\\n for (; i < this.length - index; i++) {\\r\\n tail.push(this[index + i]);\\r\\n }\\r\\n var arglen = args.length;\\r\\n for (i = 0; i < arglen + tail.length; i++) {\\r\\n this.items[index + i] = this[index + i] = i < arglen ? args[i] : tail[i - arglen];\\r\\n }\\r\\n i = this.items.length = this.length -= count - arglen;\\r\\n while (this[i]) {\\r\\n delete this[i++];\\r\\n }\\r\\n return new Set(todel);\\r\\n };\\r\\n /*\\\\\\r\\n * Set.exclude\\r\\n [ method ]\\r\\n **\\r\\n * Removes given element from the set\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - element (object) element to remove\\r\\n = (boolean) `true` if object was found & removed from the set\\r\\n \\\\*/\\r\\n setproto.exclude = function (el) {\\r\\n for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) {\\r\\n this.splice(i, 1);\\r\\n return true;\\r\\n }\\r\\n };\\r\\n setproto.animate = function (params, ms, easing, callback) {\\r\\n (R.is(easing, \\\"function\\\") || !easing) && (callback = easing || null);\\r\\n var len = this.items.length,\\r\\n i = len,\\r\\n item,\\r\\n set = this,\\r\\n collector;\\r\\n if (!len) {\\r\\n return this;\\r\\n }\\r\\n callback && (collector = function () {\\r\\n !--len && callback.call(set);\\r\\n });\\r\\n easing = R.is(easing, string) ? easing : collector;\\r\\n var anim = R.animation(params, ms, easing, collector);\\r\\n item = this.items[--i].animate(anim);\\r\\n while (i--) {\\r\\n this.items[i] && !this.items[i].removed && this.items[i].animateWith(item, anim, anim);\\r\\n (this.items[i] && !this.items[i].removed) || len--;\\r\\n }\\r\\n return this;\\r\\n };\\r\\n setproto.insertAfter = function (el) {\\r\\n var i = this.items.length;\\r\\n while (i--) {\\r\\n this.items[i].insertAfter(el);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n\\r\\n // FREEGROUP Fix: RaphaelJS changes the order of the elements of the 'set' by calling the toBack method.\\r\\n // \\\"toBack\\\" must be called reverse to care about the rendering order. In this case we override\\r\\n // the buggy default implementation here.\\r\\n //\\r\\n setproto.toBack = function () {\\r\\n var i = this.items.length;\\r\\n while (i--) {\\r\\n this.items[i].toBack();\\r\\n }\\r\\n return this;\\r\\n };\\r\\n\\r\\n // FREEGROUP Fix: Unfortunately raphael didn'T expose the \\\"set.prototype\\\". In this case\\r\\n // I must add all extension to the raphael implementation itself.\\r\\n // Provide support method for easy check if the elements are visible.\\r\\n setproto.isVisible = function () {\\r\\n var i = this.items.length;\\r\\n var visible = false;\\r\\n while (i--) {\\r\\n visible = visible ||this.items[i].isVisible();\\r\\n }\\r\\n return visible;\\r\\n };\\r\\n\\r\\n\\r\\n // FREEGROUP FIX: Adding \\\"isWithoutTransform\\\" to the function and redirect them to the elements\\r\\n setproto.getBBox = function (isWithoutTransform) {\\r\\n var x = [],\\r\\n y = [],\\r\\n x2 = [],\\r\\n y2 = [];\\r\\n for (var i = this.items.length; i--;) if (!this.items[i].removed) {\\r\\n var box = this.items[i].getBBox(isWithoutTransform);\\r\\n x.push(box.x);\\r\\n y.push(box.y);\\r\\n x2.push(box.x + box.width);\\r\\n y2.push(box.y + box.height);\\r\\n }\\r\\n x = mmin[apply](0, x);\\r\\n y = mmin[apply](0, y);\\r\\n x2 = mmax[apply](0, x2);\\r\\n y2 = mmax[apply](0, y2);\\r\\n return {\\r\\n x: x,\\r\\n y: y,\\r\\n x2: x2,\\r\\n y2: y2,\\r\\n width: x2 - x,\\r\\n height: y2 - y\\r\\n };\\r\\n };\\r\\n setproto.clone = function (s) {\\r\\n s = this.paper.set();\\r\\n for (var i = 0, ii = this.items.length; i < ii; i++) {\\r\\n s.push(this.items[i].clone());\\r\\n }\\r\\n return s;\\r\\n };\\r\\n setproto.toString = function () {\\r\\n return \\\"Rapha\\\\xebl\\\\u2018s set\\\";\\r\\n };\\r\\n\\r\\n setproto.glow = function(glowConfig) {\\r\\n var ret = this.paper.set();\\r\\n this.forEach(function(shape, index){\\r\\n var g = shape.glow(glowConfig);\\r\\n if(g != null){\\r\\n g.forEach(function(shape2, index2){\\r\\n ret.push(shape2);\\r\\n });\\r\\n }\\r\\n });\\r\\n return ret;\\r\\n };\\r\\n\\r\\n\\r\\n /*\\\\\\r\\n * Set.isPointInside\\r\\n [ method ]\\r\\n **\\r\\n * Determine if given point is inside this set’s elements\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x coordinate of the point\\r\\n - y (number) y coordinate of the point\\r\\n = (boolean) `true` if point is inside any of the set's elements\\r\\n \\\\*/\\r\\n setproto.isPointInside = function (x, y) {\\r\\n var isPointInside = false;\\r\\n this.forEach(function (el) {\\r\\n if (el.isPointInside(x, y)) {\\r\\n isPointInside = true;\\r\\n return false; // stop loop\\r\\n }\\r\\n });\\r\\n return isPointInside;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.registerFont\\r\\n [ method ]\\r\\n **\\r\\n * Adds given font to the registered set of fonts for Raphaël. Should be used as an internal call from within Cufón’s font file.\\r\\n * Returns original parameter, so it could be used with chaining.\\r\\n # <a href=\\\"http://wiki.github.com/sorccu/cufon/about\\\">More about Cufón and how to convert your font form TTF, OTF, etc to JavaScript file.</a>\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - font (object) the font to register\\r\\n = (object) the font you passed in\\r\\n > Usage\\r\\n | Cufon.registerFont(Raphael.registerFont({…}));\\r\\n \\\\*/\\r\\n R.registerFont = function (font) {\\r\\n if (!font.face) {\\r\\n return font;\\r\\n }\\r\\n this.fonts = this.fonts || {};\\r\\n var fontcopy = {\\r\\n w: font.w,\\r\\n face: {},\\r\\n glyphs: {}\\r\\n },\\r\\n family = font.face[\\\"font-family\\\"];\\r\\n for (var prop in font.face) if (font.face[has](prop)) {\\r\\n fontcopy.face[prop] = font.face[prop];\\r\\n }\\r\\n if (this.fonts[family]) {\\r\\n this.fonts[family].push(fontcopy);\\r\\n } else {\\r\\n this.fonts[family] = [fontcopy];\\r\\n }\\r\\n if (!font.svg) {\\r\\n fontcopy.face[\\\"units-per-em\\\"] = toInt(font.face[\\\"units-per-em\\\"], 10);\\r\\n for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) {\\r\\n var path = font.glyphs[glyph];\\r\\n fontcopy.glyphs[glyph] = {\\r\\n w: path.w,\\r\\n k: {},\\r\\n d: path.d && \\\"M\\\" + path.d.replace(/[mlcxtrv]/g, function (command) {\\r\\n return {l: \\\"L\\\", c: \\\"C\\\", x: \\\"z\\\", t: \\\"m\\\", r: \\\"l\\\", v: \\\"c\\\"}[command] || \\\"M\\\";\\r\\n }) + \\\"z\\\"\\r\\n };\\r\\n if (path.k) {\\r\\n for (var k in path.k) if (path[has](k)) {\\r\\n fontcopy.glyphs[glyph].k[k] = path.k[k];\\r\\n }\\r\\n }\\r\\n }\\r\\n }\\r\\n return font;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.getFont\\r\\n [ method ]\\r\\n **\\r\\n * Finds font object in the registered fonts by given parameters. You could specify only one word from the font name, like “Myriad” for “Myriad Pro”.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - family (string) font family name or any word from it\\r\\n - weight (string) #optional font weight\\r\\n - style (string) #optional font style\\r\\n - stretch (string) #optional font stretch\\r\\n = (object) the font object\\r\\n > Usage\\r\\n | paper.print(100, 100, \\\"Test string\\\", paper.getFont(\\\"Times\\\", 800), 30);\\r\\n \\\\*/\\r\\n paperproto.getFont = function (family, weight, style, stretch) {\\r\\n stretch = stretch || \\\"normal\\\";\\r\\n style = style || \\\"normal\\\";\\r\\n weight = +weight || {normal: 400, bold: 700, lighter: 300, bolder: 800}[weight] || 400;\\r\\n if (!R.fonts) {\\r\\n return;\\r\\n }\\r\\n var font = R.fonts[family];\\r\\n if (!font) {\\r\\n var name = new RegExp(\\\"(^|\\\\\\\\s)\\\" + family.replace(/[^\\\\w\\\\d\\\\s+!~.:_-]/g, E) + \\\"(\\\\\\\\s|$)\\\", \\\"i\\\");\\r\\n for (var fontName in R.fonts) if (R.fonts[has](fontName)) {\\r\\n if (name.test(fontName)) {\\r\\n font = R.fonts[fontName];\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n var thefont;\\r\\n if (font) {\\r\\n for (var i = 0, ii = font.length; i < ii; i++) {\\r\\n thefont = font[i];\\r\\n if (thefont.face[\\\"font-weight\\\"] == weight && (thefont.face[\\\"font-style\\\"] == style || !thefont.face[\\\"font-style\\\"]) && thefont.face[\\\"font-stretch\\\"] == stretch) {\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n return thefont;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.print\\r\\n [ method ]\\r\\n **\\r\\n * Creates path that represent given text written using given font at given position with given size.\\r\\n * Result of the method is path element that contains whole text as a separate path.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - x (number) x position of the text\\r\\n - y (number) y position of the text\\r\\n - string (string) text to print\\r\\n - font (object) font object, see @Paper.getFont\\r\\n - size (number) #optional size of the font, default is `16`\\r\\n - origin (string) #optional could be `\\\"baseline\\\"` or `\\\"middle\\\"`, default is `\\\"middle\\\"`\\r\\n - letter_spacing (number) #optional number in range `-1..1`, default is `0`\\r\\n - line_spacing (number) #optional number in range `1..3`, default is `1`\\r\\n = (object) resulting path element, which consist of all letters\\r\\n > Usage\\r\\n | var txt = r.print(10, 50, \\\"print\\\", r.getFont(\\\"Museo\\\"), 30).attr({fill: \\\"#fff\\\"});\\r\\n \\\\*/\\r\\n paperproto.print = function (x, y, string, font, size, origin, letter_spacing, line_spacing) {\\r\\n origin = origin || \\\"middle\\\"; // baseline|middle\\r\\n letter_spacing = mmax(mmin(letter_spacing || 0, 1), -1);\\r\\n line_spacing = mmax(mmin(line_spacing || 1, 3), 1);\\r\\n var letters = Str(string)[split](E),\\r\\n shift = 0,\\r\\n notfirst = 0,\\r\\n path = E,\\r\\n scale;\\r\\n R.is(font, \\\"string\\\") && (font = this.getFont(font));\\r\\n if (font) {\\r\\n scale = (size || 16) / font.face[\\\"units-per-em\\\"];\\r\\n var bb = font.face.bbox[split](separator),\\r\\n top = +bb[0],\\r\\n lineHeight = bb[3] - bb[1],\\r\\n shifty = 0,\\r\\n height = +bb[1] + (origin == \\\"baseline\\\" ? lineHeight + (+font.face.descent) : lineHeight / 2);\\r\\n for (var i = 0, ii = letters.length; i < ii; i++) {\\r\\n if (letters[i] == \\\"\\\\n\\\") {\\r\\n shift = 0;\\r\\n curr = 0;\\r\\n notfirst = 0;\\r\\n shifty += lineHeight * line_spacing;\\r\\n } else {\\r\\n var prev = notfirst && font.glyphs[letters[i - 1]] || {},\\r\\n curr = font.glyphs[letters[i]];\\r\\n shift += notfirst ? (prev.w || font.w) + (prev.k && prev.k[letters[i]] || 0) + (font.w * letter_spacing) : 0;\\r\\n notfirst = 1;\\r\\n }\\r\\n if (curr && curr.d) {\\r\\n path += R.transformPath(curr.d, [\\\"t\\\", shift * scale, shifty * scale, \\\"s\\\", scale, scale, top, height, \\\"t\\\", (x - top) / scale, (y - height) / scale]);\\r\\n }\\r\\n }\\r\\n }\\r\\n return this.path(path).attr({\\r\\n fill: \\\"#000\\\",\\r\\n stroke: \\\"none\\\"\\r\\n });\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Paper.add\\r\\n [ method ]\\r\\n **\\r\\n * Imports elements in JSON array in format `{type: type, <attributes>}`\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - json (array)\\r\\n = (object) resulting set of imported elements\\r\\n > Usage\\r\\n | paper.add([\\r\\n | {\\r\\n | type: \\\"circle\\\",\\r\\n | cx: 10,\\r\\n | cy: 10,\\r\\n | r: 5\\r\\n | },\\r\\n | {\\r\\n | type: \\\"rect\\\",\\r\\n | x: 10,\\r\\n | y: 10,\\r\\n | width: 10,\\r\\n | height: 10,\\r\\n | fill: \\\"#fc0\\\"\\r\\n | }\\r\\n | ]);\\r\\n \\\\*/\\r\\n paperproto.add = function (json) {\\r\\n if (R.is(json, \\\"array\\\")) {\\r\\n var res = this.set(),\\r\\n i = 0,\\r\\n ii = json.length,\\r\\n j;\\r\\n for (; i < ii; i++) {\\r\\n j = json[i] || {};\\r\\n elements[has](j.type) && res.push(this[j.type]().attr(j));\\r\\n }\\r\\n }\\r\\n return res;\\r\\n };\\r\\n\\r\\n /*\\\\\\r\\n * Raphael.format\\r\\n [ method ]\\r\\n **\\r\\n * Simple format function. Replaces construction of type “`{<number>}`” to the corresponding argument.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - token (string) string to format\\r\\n - … (string) rest of arguments will be treated as parameters for replacement\\r\\n = (string) formated string\\r\\n > Usage\\r\\n | var x = 10,\\r\\n | y = 20,\\r\\n | width = 40,\\r\\n | height = 50;\\r\\n | // this will draw a rectangular shape equivalent to \\\"M10,20h40v50h-40z\\\"\\r\\n | paper.path(Raphael.format(\\\"M{0},{1}h{2}v{3}h{4}z\\\", x, y, width, height, -width));\\r\\n \\\\*/\\r\\n R.format = function (token, params) {\\r\\n var args = R.is(params, array) ? [0][concat](params) : arguments;\\r\\n token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str, i) {\\r\\n return args[++i] == null ? E : args[i];\\r\\n }));\\r\\n return token || E;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.fullfill\\r\\n [ method ]\\r\\n **\\r\\n * A little bit more advanced format function than @Raphael.format. Replaces construction of type “`{<name>}`” to the corresponding argument.\\r\\n **\\r\\n > Parameters\\r\\n **\\r\\n - token (string) string to format\\r\\n - json (object) object which properties will be used as a replacement\\r\\n = (string) formated string\\r\\n > Usage\\r\\n | // this will draw a rectangular shape equivalent to \\\"M10,20h40v50h-40z\\\"\\r\\n | paper.path(Raphael.fullfill(\\\"M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']}z\\\", {\\r\\n | x: 10,\\r\\n | y: 20,\\r\\n | dim: {\\r\\n | width: 40,\\r\\n | height: 50,\\r\\n | \\\"negative width\\\": -40\\r\\n | }\\r\\n | }));\\r\\n \\\\*/\\r\\n R.fullfill = (function () {\\r\\n var tokenRegex = /\\\\{([^\\\\}]+)\\\\}/g,\\r\\n objNotationRegex = /(?:(?:^|\\\\.)(.+?)(?=\\\\[|\\\\.|$|\\\\()|\\\\[('|\\\")(.+?)\\\\2\\\\])(\\\\(\\\\))?/g, // matches .xxxxx or [\\\"xxxxx\\\"] to run over object properties\\r\\n replacer = function (all, key, obj) {\\r\\n var res = obj;\\r\\n key.replace(objNotationRegex, function (all, name, quote, quotedName, isFunc) {\\r\\n name = name || quotedName;\\r\\n if (res) {\\r\\n if (name in res) {\\r\\n res = res[name];\\r\\n }\\r\\n typeof res == \\\"function\\\" && isFunc && (res = res());\\r\\n }\\r\\n });\\r\\n res = (res == null || res == obj ? all : res) + \\\"\\\";\\r\\n return res;\\r\\n };\\r\\n return function (str, obj) {\\r\\n return String(str).replace(tokenRegex, function (all, key) {\\r\\n return replacer(all, key, obj);\\r\\n });\\r\\n };\\r\\n })();\\r\\n /*\\\\\\r\\n * Raphael.ninja\\r\\n [ method ]\\r\\n **\\r\\n * If you want to leave no trace of Raphaël (Well, Raphaël creates only one global variable `Raphael`, but anyway.) You can use `ninja` method.\\r\\n * Beware, that in this case plugins could stop working, because they are depending on global variable existence.\\r\\n **\\r\\n = (object) Raphael object\\r\\n > Usage\\r\\n | (function (local_raphael) {\\r\\n | var paper = local_raphael(10, 10, 320, 200);\\r\\n | …\\r\\n | })(Raphael.ninja());\\r\\n \\\\*/\\r\\n R.ninja = function () {\\r\\n oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;\\r\\n return R;\\r\\n };\\r\\n /*\\\\\\r\\n * Raphael.st\\r\\n [ property (object) ]\\r\\n **\\r\\n * You can add your own method to elements and sets. It is wise to add a set method for each element method\\r\\n * you added, so you will be able to call the same method on sets too.\\r\\n **\\r\\n * See also @Raphael.el.\\r\\n > Usage\\r\\n | Raphael.el.red = function () {\\r\\n | this.attr({fill: \\\"#f00\\\"});\\r\\n | };\\r\\n | Raphael.st.red = function () {\\r\\n | this.forEach(function (el) {\\r\\n | el.red();\\r\\n | });\\r\\n | };\\r\\n | // then use it\\r\\n | paper.set(paper.circle(100, 100, 20), paper.circle(110, 100, 20)).red();\\r\\n \\\\*/\\r\\n R.st = setproto;\\r\\n\\r\\n eve.on(\\\"raphael.DOMload\\\", function () {\\r\\n loaded = true;\\r\\n });\\r\\n\\r\\n // Firefox <3.6 fix: http://webreflection.blogspot.com/2009/11/195-chars-to-help-lazy-loading.html\\r\\n (function (doc, loaded, f) {\\r\\n if (doc.readyState == null && doc.addEventListener){\\r\\n doc.addEventListener(loaded, f = function () {\\r\\n doc.removeEventListener(loaded, f, false);\\r\\n doc.readyState = \\\"complete\\\";\\r\\n }, false);\\r\\n doc.readyState = \\\"loading\\\";\\r\\n }\\r\\n function isLoaded() {\\r\\n (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve(\\\"raphael.DOMload\\\");\\r\\n }\\r\\n isLoaded();\\r\\n })(document, \\\"DOMContentLoaded\\\");\\r\\n\\r\\n return R;\\r\\n}));\\r\\n\\r\\n// ┌─────────────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\\\\\\r\\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ SVG Module │ \\\\\\\\\\r\\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\\\\\\r\\n// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\\\\\\\\\r\\n// └─────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n(function (glob, factory) {\\r\\n if (typeof define === \\\"function\\\" && define.amd) {\\r\\n define(\\\"raphael.svg\\\", [\\\"raphael.core\\\"], function(raphael) {\\r\\n return factory(raphael);\\r\\n });\\r\\n } else if (typeof exports === \\\"object\\\") {\\r\\n factory(require(\\\"./raphael.core\\\"));\\r\\n } else {\\r\\n factory(glob.Raphael);\\r\\n }\\r\\n}(this, function(R) {\\r\\n if (R && !R.svg) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var has = \\\"hasOwnProperty\\\",\\r\\n Str = String,\\r\\n toFloat = parseFloat,\\r\\n toInt = parseInt,\\r\\n math = Math,\\r\\n mmax = math.max,\\r\\n abs = math.abs,\\r\\n pow = math.pow,\\r\\n separator = /[, ]+/,\\r\\n eve = R.eve,\\r\\n E = \\\"\\\",\\r\\n S = \\\" \\\";\\r\\n var xlink = \\\"http://www.w3.org/1999/xlink\\\",\\r\\n markers = {\\r\\n block: \\\"M5,0 0,2.5 5,5z\\\",\\r\\n classic: \\\"M5,0 0,2.5 5,5 3.5,3 3.5,2z\\\",\\r\\n diamond: \\\"M2.5,0 5,2.5 2.5,5 0,2.5z\\\",\\r\\n open: \\\"M6,1 1,3.5 6,6\\\",\\r\\n oval: \\\"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z\\\"\\r\\n },\\r\\n markerCounter = {};\\r\\n R.toString = function () {\\r\\n return \\\"Your browser supports SVG.\\\\nYou are running Rapha\\\\xebl \\\" + this.version;\\r\\n };\\r\\n var $ = function (el, attr) {\\r\\n if (attr) {\\r\\n if (typeof el == \\\"string\\\") {\\r\\n el = $(el);\\r\\n }\\r\\n for (var key in attr) if (attr[has](key)) {\\r\\n if (key.substring(0, 6) == \\\"xlink:\\\") {\\r\\n el.setAttributeNS(xlink, key.substring(6), Str(attr[key]));\\r\\n } else {\\r\\n try {\\r\\n el.setAttribute(key, Str(attr[key]));\\r\\n }\\r\\n catch(e){\\r\\n debugger\\r\\n }\\r\\n }\\r\\n }\\r\\n } else {\\r\\n el = R._g.doc.createElementNS(\\\"http://www.w3.org/2000/svg\\\", el);\\r\\n el.style && (el.style.webkitTapHighlightColor = \\\"rgba(0,0,0,0)\\\");\\r\\n }\\r\\n return el;\\r\\n },\\r\\n addGradientFill = function (element, gradient) {\\r\\n // even called if we reset the fill of an shape.\\r\\n if (gradient === null)\\r\\n return\\r\\n\\r\\n var type = \\\"linear\\\",\\r\\n id = gradient.replace(/[\\\\(\\\\)\\\\s,\\\\xb0#]/g, \\\"_\\\"),\\r\\n fx = .5, fy = .5,\\r\\n o = element.node,\\r\\n SVG = element.paper,\\r\\n s = o.style,\\r\\n el = R._g.doc.getElementById(id);\\r\\n if (!el) {\\r\\n gradient = Str(gradient).replace(R._radial_gradient, function (all, _fx, _fy) {\\r\\n type = \\\"radial\\\";\\r\\n if (_fx && _fy) {\\r\\n fx = toFloat(_fx);\\r\\n fy = toFloat(_fy);\\r\\n var dir = ((fy > .5) * 2 - 1);\\r\\n pow(fx - .5, 2) + pow(fy - .5, 2) > .25 &&\\r\\n (fy = math.sqrt(.25 - pow(fx - .5, 2)) * dir + .5) &&\\r\\n fy != .5 &&\\r\\n (fy = fy.toFixed(5) - 1e-5 * dir);\\r\\n }\\r\\n return E;\\r\\n });\\r\\n gradient = gradient.split(/\\\\s*\\\\-\\\\s*/);\\r\\n if (type == \\\"linear\\\") {\\r\\n var angle = gradient.shift();\\r\\n angle = -toFloat(angle);\\r\\n if (isNaN(angle)) {\\r\\n return null;\\r\\n }\\r\\n var vector = [0, 0, math.cos(R.rad(angle)), math.sin(R.rad(angle))],\\r\\n max = 1 / (mmax(abs(vector[2]), abs(vector[3])) || 1);\\r\\n vector[2] *= max;\\r\\n vector[3] *= max;\\r\\n if (vector[2] < 0) {\\r\\n vector[0] = -vector[2];\\r\\n vector[2] = 0;\\r\\n }\\r\\n if (vector[3] < 0) {\\r\\n vector[1] = -vector[3];\\r\\n vector[3] = 0;\\r\\n }\\r\\n }\\r\\n var dots = R._parseDots(gradient);\\r\\n if (!dots) {\\r\\n return null;\\r\\n }\\r\\n id = id.replace(/[\\\\(\\\\)\\\\s,\\\\xb0#]/g, \\\"_\\\");\\r\\n\\r\\n if (element.gradient && id != element.gradient.id) {\\r\\n SVG.defs.removeChild(element.gradient);\\r\\n delete element.gradient;\\r\\n }\\r\\n\\r\\n if (!element.gradient) {\\r\\n el = $(type + \\\"Gradient\\\", {id: id});\\r\\n element.gradient = el;\\r\\n $(el, type == \\\"radial\\\" ? {\\r\\n fx: fx,\\r\\n fy: fy\\r\\n } : {\\r\\n x1: vector[0],\\r\\n y1: vector[1],\\r\\n x2: vector[2],\\r\\n y2: vector[3],\\r\\n gradientTransform: element.matrix.invert()\\r\\n });\\r\\n SVG.defs.appendChild(el);\\r\\n for (var i = 0, ii = dots.length; i < ii; i++) {\\r\\n el.appendChild($(\\\"stop\\\", {\\r\\n offset: dots[i].offset ? dots[i].offset : i ? \\\"100%\\\" : \\\"0%\\\",\\r\\n \\\"stop-color\\\": dots[i].color || \\\"#fff\\\",\\r\\n \\\"stop-opacity\\\": isFinite(dots[i].opacity) ? dots[i].opacity : 1\\r\\n }));\\r\\n }\\r\\n }\\r\\n }\\r\\n /* FREEGROUP: don't push URL parameter into the drawing. This will break Apps with \\\"?\\\" in the URL\\r\\n * see: https://github.com/DmitryBaranovskiy/raphael/issues/693\\r\\n **/\\r\\n var url =\\\"\\\";//document.location.protocol + \\\"//\\\" + document.location.host + document.location.pathname;\\r\\n $(o, {\\r\\n fill: \\\"url('\\\" + url + \\\"#\\\" + id + \\\"')\\\",\\r\\n opacity: 1,\\r\\n \\\"fill-opacity\\\": 1\\r\\n });\\r\\n\\r\\n s.fill = E;\\r\\n s.opacity = 1;\\r\\n s.fillOpacity = 1;\\r\\n return 1;\\r\\n },\\r\\n updatePosition = function (o) {\\r\\n var bbox = o.getBBox(1);\\r\\n $(o.pattern, {patternTransform: o.matrix.invert() + \\\" translate(\\\" + bbox.x + \\\",\\\" + bbox.y + \\\")\\\"});\\r\\n },\\r\\n addArrow = function (o, value, isEnd) {\\r\\n if (o.type == \\\"path\\\") {\\r\\n var values = Str(value).toLowerCase().split(\\\"-\\\"),\\r\\n p = o.paper,\\r\\n se = isEnd ? \\\"end\\\" : \\\"start\\\",\\r\\n node = o.node,\\r\\n attrs = o.attrs,\\r\\n stroke = attrs[\\\"stroke-width\\\"],\\r\\n i = values.length,\\r\\n type = \\\"classic\\\",\\r\\n from,\\r\\n to,\\r\\n dx,\\r\\n refX,\\r\\n attr,\\r\\n w = 3,\\r\\n h = 3,\\r\\n t = 5;\\r\\n while (i--) {\\r\\n switch (values[i]) {\\r\\n case \\\"block\\\":\\r\\n case \\\"classic\\\":\\r\\n case \\\"oval\\\":\\r\\n case \\\"diamond\\\":\\r\\n case \\\"open\\\":\\r\\n case \\\"none\\\":\\r\\n type = values[i];\\r\\n break;\\r\\n case \\\"wide\\\": h = 5; break;\\r\\n case \\\"narrow\\\": h = 2; break;\\r\\n case \\\"long\\\": w = 5; break;\\r\\n case \\\"short\\\": w = 2; break;\\r\\n }\\r\\n }\\r\\n if (type == \\\"open\\\") {\\r\\n w += 2;\\r\\n h += 2;\\r\\n t += 2;\\r\\n dx = 1;\\r\\n refX = isEnd ? 4 : 1;\\r\\n attr = {\\r\\n fill: \\\"none\\\",\\r\\n stroke: attrs.stroke\\r\\n };\\r\\n } else {\\r\\n refX = dx = w / 2;\\r\\n attr = {\\r\\n fill: attrs.stroke,\\r\\n stroke: \\\"none\\\"\\r\\n };\\r\\n }\\r\\n if (o._.arrows) {\\r\\n if (isEnd) {\\r\\n o._.arrows.endPath && markerCounter[o._.arrows.endPath]--;\\r\\n o._.arrows.endMarker && markerCounter[o._.arrows.endMarker]--;\\r\\n } else {\\r\\n o._.arrows.startPath && markerCounter[o._.arrows.startPath]--;\\r\\n o._.arrows.startMarker && markerCounter[o._.arrows.startMarker]--;\\r\\n }\\r\\n } else {\\r\\n o._.arrows = {};\\r\\n }\\r\\n if (type != \\\"none\\\") {\\r\\n var pathId = \\\"raphael-marker-\\\" + type,\\r\\n markerId = \\\"raphael-marker-\\\" + se + type + w + h + \\\"-obj\\\" + o.id;\\r\\n if (!R._g.doc.getElementById(pathId)) {\\r\\n p.defs.appendChild($($(\\\"path\\\"), {\\r\\n \\\"stroke-linecap\\\": \\\"round\\\",\\r\\n d: markers[type],\\r\\n id: pathId\\r\\n }));\\r\\n markerCounter[pathId] = 1;\\r\\n } else {\\r\\n markerCounter[pathId]++;\\r\\n }\\r\\n var marker = R._g.doc.getElementById(markerId),\\r\\n use;\\r\\n if (!marker) {\\r\\n marker = $($(\\\"marker\\\"), {\\r\\n id: markerId,\\r\\n markerHeight: h,\\r\\n markerWidth: w,\\r\\n orient: \\\"auto\\\",\\r\\n refX: refX,\\r\\n refY: h / 2\\r\\n });\\r\\n use = $($(\\\"use\\\"), {\\r\\n \\\"xlink:href\\\": \\\"#\\\" + pathId,\\r\\n transform: (isEnd ? \\\"rotate(180 \\\" + w / 2 + \\\" \\\" + h / 2 + \\\") \\\" : E) + \\\"scale(\\\" + w / t + \\\",\\\" + h / t + \\\")\\\",\\r\\n \\\"stroke-width\\\": (1 / ((w / t + h / t) / 2)).toFixed(4)\\r\\n });\\r\\n marker.appendChild(use);\\r\\n p.defs.appendChild(marker);\\r\\n markerCounter[markerId] = 1;\\r\\n } else {\\r\\n markerCounter[markerId]++;\\r\\n use = marker.getElementsByTagName(\\\"use\\\")[0];\\r\\n }\\r\\n $(use, attr);\\r\\n var delta = dx * (type != \\\"diamond\\\" && type != \\\"oval\\\");\\r\\n if (isEnd) {\\r\\n from = o._.arrows.startdx * stroke || 0;\\r\\n to = R.getTotalLength(attrs.path) - delta * stroke;\\r\\n } else {\\r\\n from = delta * stroke;\\r\\n to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);\\r\\n }\\r\\n attr = {};\\r\\n attr[\\\"marker-\\\" + se] = \\\"url(#\\\" + markerId + \\\")\\\";\\r\\n if (to || from) {\\r\\n attr.d = R.getSubpath(attrs.path, from, to);\\r\\n }\\r\\n $(node, attr);\\r\\n o._.arrows[se + \\\"Path\\\"] = pathId;\\r\\n o._.arrows[se + \\\"Marker\\\"] = markerId;\\r\\n o._.arrows[se + \\\"dx\\\"] = delta;\\r\\n o._.arrows[se + \\\"Type\\\"] = type;\\r\\n o._.arrows[se + \\\"String\\\"] = value;\\r\\n } else {\\r\\n if (isEnd) {\\r\\n from = o._.arrows.startdx * stroke || 0;\\r\\n to = R.getTotalLength(attrs.path) - from;\\r\\n } else {\\r\\n from = 0;\\r\\n to = R.getTotalLength(attrs.path) - (o._.arrows.enddx * stroke || 0);\\r\\n }\\r\\n o._.arrows[se + \\\"Path\\\"] && $(node, {d: R.getSubpath(attrs.path, from, to)});\\r\\n delete o._.arrows[se + \\\"Path\\\"];\\r\\n delete o._.arrows[se + \\\"Marker\\\"];\\r\\n delete o._.arrows[se + \\\"dx\\\"];\\r\\n delete o._.arrows[se + \\\"Type\\\"];\\r\\n delete o._.arrows[se + \\\"String\\\"];\\r\\n }\\r\\n for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) {\\r\\n var item = R._g.doc.getElementById(attr);\\r\\n item && item.parentNode.removeChild(item);\\r\\n }\\r\\n }\\r\\n },\\r\\n dasharray = {\\r\\n \\\"-\\\": [3, 1],\\r\\n \\\".\\\": [1, 1],\\r\\n \\\"-.\\\": [3, 1, 1, 1],\\r\\n \\\"-..\\\": [3, 1, 1, 1, 1, 1],\\r\\n \\\". \\\": [1, 3],\\r\\n \\\"- \\\": [4, 3],\\r\\n \\\"--\\\": [8, 3],\\r\\n \\\"- .\\\": [4, 3, 1, 3],\\r\\n \\\"--.\\\": [8, 3, 1, 3],\\r\\n \\\"--..\\\": [8, 3, 1, 3, 1, 3]\\r\\n },\\r\\n addDashes = function (o, value, params) {\\r\\n value = dasharray[Str(value).toLowerCase()];\\r\\n if (value) {\\r\\n var width = o.attrs[\\\"stroke-width\\\"] || \\\"1\\\",\\r\\n butt = {round: width, square: width, butt: 0}[o.attrs[\\\"stroke-linecap\\\"] || params[\\\"stroke-linecap\\\"]] || 0,\\r\\n dashes = [],\\r\\n i = value.length;\\r\\n while (i--) {\\r\\n dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt;\\r\\n }\\r\\n $(o.node, {\\\"stroke-dasharray\\\": dashes.join(\\\",\\\")});\\r\\n }\\r\\n else {\\r\\n $(o.node, {\\\"stroke-dasharray\\\": \\\"none\\\"});\\r\\n }\\r\\n },\\r\\n setFillAndStroke = function (o, params) {\\r\\n var node = o.node,\\r\\n attrs = o.attrs,\\r\\n vis = node.style.visibility;\\r\\n node.style.visibility = \\\"hidden\\\";\\r\\n for (var att in params) {\\r\\n if (params[has](att)) {\\r\\n if (!R._availableAttrs[has](att)) {\\r\\n continue;\\r\\n }\\r\\n var value = params[att];\\r\\n attrs[att] = value;\\r\\n switch (att) {\\r\\n case \\\"blur\\\":\\r\\n o.blur(value);\\r\\n break;\\r\\n case \\\"title\\\":\\r\\n var title = node.getElementsByTagName(\\\"title\\\");\\r\\n\\r\\n // Use the existing <title>.\\r\\n if (title.length && (title = title[0])) {\\r\\n title.firstChild.nodeValue = value;\\r\\n } else {\\r\\n title = $(\\\"title\\\");\\r\\n var val = R._g.doc.createTextNode(value);\\r\\n title.appendChild(val);\\r\\n node.appendChild(title);\\r\\n }\\r\\n break;\\r\\n case \\\"href\\\":\\r\\n case \\\"target\\\":\\r\\n var pn = node.parentNode;\\r\\n if (pn.tagName.toLowerCase() != \\\"a\\\") {\\r\\n var hl = $(\\\"a\\\");\\r\\n pn.insertBefore(hl, node);\\r\\n hl.appendChild(node);\\r\\n pn = hl;\\r\\n }\\r\\n if (att == \\\"target\\\") {\\r\\n pn.setAttributeNS(xlink, \\\"show\\\", value == \\\"blank\\\" ? \\\"new\\\" : value);\\r\\n } else {\\r\\n pn.setAttributeNS(xlink, att, value);\\r\\n }\\r\\n break;\\r\\n case \\\"cursor\\\":\\r\\n node.style.cursor = value;\\r\\n break;\\r\\n case \\\"transform\\\":\\r\\n o.transform(value);\\r\\n break;\\r\\n case \\\"arrow-start\\\":\\r\\n addArrow(o, value);\\r\\n break;\\r\\n case \\\"arrow-end\\\":\\r\\n addArrow(o, value, 1);\\r\\n break;\\r\\n case \\\"clip-rect\\\":\\r\\n var rect = Str(value).split(separator);\\r\\n if (rect.length == 4) {\\r\\n o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode);\\r\\n var el = $(\\\"clipPath\\\"),\\r\\n rc = $(\\\"rect\\\");\\r\\n el.id = R.createUUID();\\r\\n $(rc, {\\r\\n x: rect[0],\\r\\n y: rect[1],\\r\\n width: rect[2],\\r\\n height: rect[3]\\r\\n });\\r\\n el.appendChild(rc);\\r\\n o.paper.defs.appendChild(el);\\r\\n $(node, {\\\"clip-path\\\": \\\"url(#\\\" + el.id + \\\")\\\"});\\r\\n o.clip = rc;\\r\\n }\\r\\n if (!value) {\\r\\n var path = node.getAttribute(\\\"clip-path\\\");\\r\\n if (path) {\\r\\n var clip = R._g.doc.getElementById(path.replace(/(^url\\\\(#|\\\\)$)/g, E));\\r\\n clip && clip.parentNode.removeChild(clip);\\r\\n $(node, {\\\"clip-path\\\": E});\\r\\n delete o.clip;\\r\\n }\\r\\n }\\r\\n break;\\r\\n case \\\"path\\\":\\r\\n if (o.type == \\\"path\\\") {\\r\\n $(node, {d: value ? attrs.path = R._pathToAbsolute(value) : \\\"M0,0\\\"});\\r\\n o._.dirty = 1;\\r\\n if (o._.arrows) {\\r\\n \\\"startString\\\" in o._.arrows && addArrow(o, o._.arrows.startString);\\r\\n \\\"endString\\\" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\\r\\n }\\r\\n }\\r\\n break;\\r\\n case \\\"width\\\":\\r\\n node.setAttribute(att, value);\\r\\n o._.dirty = 1;\\r\\n if (attrs.fx) {\\r\\n att = \\\"x\\\";\\r\\n value = attrs.x;\\r\\n } else {\\r\\n break;\\r\\n }\\r\\n case \\\"x\\\":\\r\\n if (attrs.fx) {\\r\\n value = -attrs.x - (attrs.width || 0);\\r\\n }\\r\\n case \\\"rx\\\":\\r\\n if (att == \\\"rx\\\" && o.type == \\\"rect\\\") {\\r\\n break;\\r\\n }\\r\\n case \\\"cx\\\":\\r\\n node.setAttribute(att, value);\\r\\n o.pattern && updatePosition(o);\\r\\n o._.dirty = 1;\\r\\n break;\\r\\n case \\\"height\\\":\\r\\n node.setAttribute(att, value);\\r\\n o._.dirty = 1;\\r\\n if (attrs.fy) {\\r\\n att = \\\"y\\\";\\r\\n value = attrs.y;\\r\\n } else {\\r\\n break;\\r\\n }\\r\\n case \\\"y\\\":\\r\\n if (attrs.fy) {\\r\\n value = -attrs.y - (attrs.height || 0);\\r\\n }\\r\\n case \\\"ry\\\":\\r\\n if (att == \\\"ry\\\" && o.type == \\\"rect\\\") {\\r\\n break;\\r\\n }\\r\\n case \\\"cy\\\":\\r\\n node.setAttribute(att, value);\\r\\n o.pattern && updatePosition(o);\\r\\n o._.dirty = 1;\\r\\n break;\\r\\n case \\\"r\\\":\\r\\n if (o.type == \\\"rect\\\") {\\r\\n $(node, {rx: value, ry: value});\\r\\n } else {\\r\\n node.setAttribute(att, value);\\r\\n }\\r\\n o._.dirty = 1;\\r\\n break;\\r\\n case \\\"src\\\":\\r\\n if (o.type == \\\"image\\\") {\\r\\n node.setAttributeNS(xlink, \\\"href\\\", value);\\r\\n }\\r\\n break;\\r\\n case \\\"stroke-width\\\":\\r\\n /* FREEGROUP fix\\r\\n * draw2d version 3.0.3\\r\\n *\\r\\n * don't scale the line width if the user resize an shape/element.\\r\\n * Obscure stroke-width in case of \\\"Draw2D touch\\\" usage\\r\\n */\\r\\n if(!attrs[\\\"stroke-scale\\\"]){\\r\\n if (o._.sx != 1 || o._.sy != 1) {\\r\\n value /= mmax(abs(o._.sx), abs(o._.sy)) || 1;\\r\\n }\\r\\n if (o.paper._vbSize) {\\r\\n // value *= o.paper._vbSize;\\r\\n }\\r\\n }\\r\\n\\r\\n\\r\\n node.setAttribute(att, value);\\r\\n if (attrs[\\\"stroke-dasharray\\\"]) {\\r\\n addDashes(o, attrs[\\\"stroke-dasharray\\\"], params);\\r\\n }\\r\\n if (o._.arrows) {\\r\\n \\\"startString\\\" in o._.arrows && addArrow(o, o._.arrows.startString);\\r\\n \\\"endString\\\" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\\r\\n }\\r\\n break;\\r\\n case \\\"stroke-dasharray\\\":\\r\\n addDashes(o, value, params);\\r\\n break;\\r\\n case \\\"fill\\\":\\r\\n var isURL = Str(value).match(R._ISURL);\\r\\n if (isURL) {\\r\\n el = $(\\\"pattern\\\");\\r\\n var ig = $(\\\"image\\\");\\r\\n el.id = R.createUUID();\\r\\n $(el, {x: 0, y: 0, patternUnits: \\\"userSpaceOnUse\\\", height: 1, width: 1});\\r\\n $(ig, {x: 0, y: 0, \\\"xlink:href\\\": isURL[1]});\\r\\n el.appendChild(ig);\\r\\n\\r\\n (function (el) {\\r\\n R._preload(isURL[1], function () {\\r\\n var w = this.offsetWidth,\\r\\n h = this.offsetHeight;\\r\\n $(el, {width: w, height: h});\\r\\n $(ig, {width: w, height: h});\\r\\n });\\r\\n })(el);\\r\\n o.paper.defs.appendChild(el);\\r\\n $(node, {fill: \\\"url(#\\\" + el.id + \\\")\\\"});\\r\\n o.pattern = el;\\r\\n o.pattern && updatePosition(o);\\r\\n break;\\r\\n }\\r\\n var clr = R.getRGB(value);\\r\\n if (!clr.error) {\\r\\n delete params.gradient;\\r\\n delete attrs.gradient;\\r\\n !R.is(attrs.opacity, \\\"undefined\\\") &&\\r\\n R.is(params.opacity, \\\"undefined\\\") &&\\r\\n $(node, {opacity: attrs.opacity});\\r\\n !R.is(attrs[\\\"fill-opacity\\\"], \\\"undefined\\\") &&\\r\\n R.is(params[\\\"fill-opacity\\\"], \\\"undefined\\\") &&\\r\\n $(node, {\\\"fill-opacity\\\": attrs[\\\"fill-opacity\\\"]});\\r\\n } else if ((o.type == \\\"circle\\\" || o.type == \\\"ellipse\\\" || Str(value).charAt() != \\\"r\\\") && addGradientFill(o, value)) {\\r\\n if (\\\"opacity\\\" in attrs || \\\"fill-opacity\\\" in attrs) {\\r\\n var gradient = R._g.doc.getElementById(node.getAttribute(\\\"fill\\\").replace(/^url\\\\(#|\\\\)$/g, E));\\r\\n if (gradient) {\\r\\n var stops = gradient.getElementsByTagName(\\\"stop\\\");\\r\\n $(stops[stops.length - 1], {\\\"stop-opacity\\\": (\\\"opacity\\\" in attrs ? attrs.opacity : 1) * (\\\"fill-opacity\\\" in attrs ? attrs[\\\"fill-opacity\\\"] : 1)});\\r\\n }\\r\\n }\\r\\n attrs.gradient = value;\\r\\n attrs.fill = \\\"none\\\";\\r\\n break;\\r\\n }\\r\\n clr[has](\\\"opacity\\\") && $(node, {\\\"fill-opacity\\\": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});\\r\\n case \\\"stroke\\\":\\r\\n clr = R.getRGB(value);\\r\\n node.setAttribute(att, clr.hex);\\r\\n att == \\\"stroke\\\" && clr[has](\\\"opacity\\\") && $(node, {\\\"stroke-opacity\\\": clr.opacity > 1 ? clr.opacity / 100 : clr.opacity});\\r\\n if (att == \\\"stroke\\\" && o._.arrows) {\\r\\n \\\"startString\\\" in o._.arrows && addArrow(o, o._.arrows.startString);\\r\\n \\\"endString\\\" in o._.arrows && addArrow(o, o._.arrows.endString, 1);\\r\\n }\\r\\n break;\\r\\n case \\\"gradient\\\":\\r\\n (o.type == \\\"circle\\\" || o.type == \\\"ellipse\\\" || Str(value).charAt() != \\\"r\\\") && addGradientFill(o, value);\\r\\n break;\\r\\n case \\\"opacity\\\":\\r\\n if (attrs.gradient && !attrs[has](\\\"stroke-opacity\\\")) {\\r\\n $(node, {\\\"stroke-opacity\\\": value > 1 ? value / 100 : value});\\r\\n }\\r\\n // fall\\r\\n case \\\"fill-opacity\\\":\\r\\n\\r\\n if (attrs.gradient) {\\r\\n gradient = R._g.doc.getElementById(node.getAttribute(\\\"fill\\\").replace(/^url\\\\(#|\\\\)$/g, E));\\r\\n if (gradient) {\\r\\n stops = gradient.getElementsByTagName(\\\"stop\\\");\\r\\n // FREEGROUP FIX\\r\\n for (gri = 0, grii = stops.length; gri < grii; gri++) {\\r\\n $(stops[gri], {\\\"stop-opacity\\\": value});\\r\\n }\\r\\n // END FIX\\r\\n }\\r\\n break;\\r\\n }\\r\\n default:\\r\\n att == \\\"font-size\\\" && (value = toInt(value, 10) + \\\"px\\\");\\r\\n var cssrule = att.replace(/(\\\\-.)/g, function (w) {\\r\\n return w.substring(1).toUpperCase();\\r\\n });\\r\\n node.style[cssrule] = value;\\r\\n o._.dirty = 1;\\r\\n node.setAttribute(att, value);\\r\\n break;\\r\\n }\\r\\n }\\r\\n }\\r\\n\\r\\n tuneText(o, params);\\r\\n node.style.visibility = vis;\\r\\n },\\r\\n leading = 1.2,\\r\\n tuneText = function (el, params) {\\r\\n if (el.type != \\\"text\\\" || !(params[has](\\\"text\\\") || params[has](\\\"font\\\") || params[has](\\\"font-size\\\") || params[has](\\\"x\\\") || params[has](\\\"y\\\"))) {\\r\\n return;\\r\\n }\\r\\n var a = el.attrs,\\r\\n node = el.node,\\r\\n fontSize = node.firstChild ? toInt(R._g.doc.defaultView.getComputedStyle(node.firstChild, E).getPropertyValue(\\\"font-size\\\"), 10) : 10;\\r\\n\\r\\n if (params[has](\\\"text\\\")) {\\r\\n a.text = params.text;\\r\\n while (node.firstChild) {\\r\\n node.removeChild(node.firstChild);\\r\\n }\\r\\n var texts = Str(params.text).split(\\\"\\\\n\\\"),\\r\\n tspans = [],\\r\\n tspan;\\r\\n for (var i = 0, ii = texts.length; i < ii; i++) {\\r\\n tspan = $(\\\"tspan\\\");\\r\\n i && $(tspan, {dy: fontSize * leading, x: a.x});\\r\\n tspan.appendChild(R._g.doc.createTextNode(texts[i]));\\r\\n node.appendChild(tspan);\\r\\n tspans[i] = tspan;\\r\\n }\\r\\n } else {\\r\\n tspans = node.getElementsByTagName(\\\"tspan\\\");\\r\\n for (i = 0, ii = tspans.length; i < ii; i++) if (i) {\\r\\n $(tspans[i], {dy: fontSize * leading, x: a.x});\\r\\n } else {\\r\\n $(tspans[0], {dy: 0});\\r\\n }\\r\\n }\\r\\n $(node, {x: a.x, y: a.y});\\r\\n el._.dirty = 1;\\r\\n var bb = el._getBBox(),\\r\\n dif = a.y - (bb.y + bb.height / 2);\\r\\n dif && R.is(dif, \\\"finite\\\") && $(tspans[0], {dy: dif});\\r\\n },\\r\\n getRealNode = function (node) {\\r\\n if (node.parentNode && node.parentNode.tagName.toLowerCase() === \\\"a\\\") {\\r\\n return node.parentNode;\\r\\n } else {\\r\\n return node;\\r\\n }\\r\\n },\\r\\n Element = function (node, svg) {\\r\\n var X = 0,\\r\\n Y = 0;\\r\\n /*\\\\\\r\\n * Element.node\\r\\n [ property (object) ]\\r\\n **\\r\\n * Gives you a reference to the DOM object, so you can assign event handlers or just mess around.\\r\\n **\\r\\n * Note: Don’t mess with it.\\r\\n > Usage\\r\\n | // draw a circle at coordinate 10,10 with radius of 10\\r\\n | var c = paper.circle(10, 10, 10);\\r\\n | c.node.onclick = function () {\\r\\n | c.attr(\\\"fill\\\", \\\"red\\\");\\r\\n | };\\r\\n \\\\*/\\r\\n this[0] = this.node = node;\\r\\n /*\\\\\\r\\n * Element.raphael\\r\\n [ property (object) ]\\r\\n **\\r\\n * Internal reference to @Raphael object. In case it is not available.\\r\\n > Usage\\r\\n | Raphael.el.red = function () {\\r\\n | var hsb = this.paper.raphael.rgb2hsb(this.attr(\\\"fill\\\"));\\r\\n | hsb.h = 1;\\r\\n | this.attr({fill: this.paper.raphael.hsb2rgb(hsb).hex});\\r\\n | }\\r\\n \\\\*/\\r\\n node.raphael = true;\\r\\n /*\\\\\\r\\n * Element.id\\r\\n [ property (number) ]\\r\\n **\\r\\n * Unique id of the element. Especially useful when you want to listen to events of the element,\\r\\n * because all events are fired in format `<module>.<action>.<id>`. Also useful for @Paper.getById method.\\r\\n \\\\*/\\r\\n this.id = R._oid++;\\r\\n node.raphaelid = this.id;\\r\\n this.matrix = R.matrix();\\r\\n this.realPath = null;\\r\\n /*\\\\\\r\\n * Element.paper\\r\\n [ property (object) ]\\r\\n **\\r\\n * Internal reference to “paper” where object drawn. Mainly for use in plugins and element extensions.\\r\\n > Usage\\r\\n | Raphael.el.cross = function () {\\r\\n | this.attr({fill: \\\"red\\\"});\\r\\n | this.paper.path(\\\"M10,10L50,50M50,10L10,50\\\")\\r\\n | .attr({stroke: \\\"red\\\"});\\r\\n | }\\r\\n \\\\*/\\r\\n this.paper = svg;\\r\\n this.attrs = this.attrs || {};\\r\\n this._ = {\\r\\n transform: [],\\r\\n sx: 1,\\r\\n sy: 1,\\r\\n deg: 0,\\r\\n dx: 0,\\r\\n dy: 0,\\r\\n dirty: 1\\r\\n };\\r\\n !svg.bottom && (svg.bottom = this);\\r\\n /*\\\\\\r\\n * Element.prev\\r\\n [ property (object) ]\\r\\n **\\r\\n * Reference to the previous element in the hierarchy.\\r\\n \\\\*/\\r\\n this.prev = svg.top;\\r\\n svg.top && (svg.top.next = this);\\r\\n svg.top = this;\\r\\n /*\\\\\\r\\n * Element.next\\r\\n [ property (object) ]\\r\\n **\\r\\n * Reference to the next element in the hierarchy.\\r\\n \\\\*/\\r\\n this.next = null;\\r\\n },\\r\\n elproto = R.el;\\r\\n\\r\\n Element.prototype = elproto;\\r\\n elproto.constructor = Element;\\r\\n\\r\\n R._engine.path = function (pathString, SVG) {\\r\\n var el = $(\\\"path\\\");\\r\\n SVG.canvas && SVG.canvas.appendChild(el);\\r\\n var p = new Element(el, SVG);\\r\\n p.type = \\\"path\\\";\\r\\n setFillAndStroke(p, {\\r\\n fill: \\\"none\\\",\\r\\n stroke: \\\"#000\\\",\\r\\n path: pathString\\r\\n });\\r\\n return p;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.rotate\\r\\n [ method ]\\r\\n **\\r\\n * Deprecated! Use @Element.transform instead.\\r\\n * Adds rotation by given angle around given point to the list of\\r\\n * transformations of the element.\\r\\n > Parameters\\r\\n - deg (number) angle in degrees\\r\\n - cx (number) #optional x coordinate of the centre of rotation\\r\\n - cy (number) #optional y coordinate of the centre of rotation\\r\\n * If cx & cy aren’t specified centre of the shape is used as a point of rotation.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.rotate = function (deg, cx, cy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n deg = Str(deg).split(separator);\\r\\n if (deg.length - 1) {\\r\\n cx = toFloat(deg[1]);\\r\\n cy = toFloat(deg[2]);\\r\\n }\\r\\n deg = toFloat(deg[0]);\\r\\n (cy == null) && (cx = cy);\\r\\n if (cx == null || cy == null) {\\r\\n var bbox = this.getBBox(1);\\r\\n cx = bbox.x + bbox.width / 2;\\r\\n cy = bbox.y + bbox.height / 2;\\r\\n }\\r\\n this.transform(this._.transform.concat([[\\\"r\\\", deg, cx, cy]]));\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.scale\\r\\n [ method ]\\r\\n **\\r\\n * Deprecated! Use @Element.transform instead.\\r\\n * Adds scale by given amount relative to given point to the list of\\r\\n * transformations of the element.\\r\\n > Parameters\\r\\n - sx (number) horisontal scale amount\\r\\n - sy (number) vertical scale amount\\r\\n - cx (number) #optional x coordinate of the centre of scale\\r\\n - cy (number) #optional y coordinate of the centre of scale\\r\\n * If cx & cy aren’t specified centre of the shape is used instead.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.scale = function (sx, sy, cx, cy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n sx = Str(sx).split(separator);\\r\\n if (sx.length - 1) {\\r\\n sy = toFloat(sx[1]);\\r\\n cx = toFloat(sx[2]);\\r\\n cy = toFloat(sx[3]);\\r\\n }\\r\\n sx = toFloat(sx[0]);\\r\\n (sy == null) && (sy = sx);\\r\\n (cy == null) && (cx = cy);\\r\\n if (cx == null || cy == null) {\\r\\n var bbox = this.getBBox(1);\\r\\n }\\r\\n cx = cx == null ? bbox.x + bbox.width / 2 : cx;\\r\\n cy = cy == null ? bbox.y + bbox.height / 2 : cy;\\r\\n this.transform(this._.transform.concat([[\\\"s\\\", sx, sy, cx, cy]]));\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.translate\\r\\n [ method ]\\r\\n **\\r\\n * Deprecated! Use @Element.transform instead.\\r\\n * Adds translation by given amount to the list of transformations of the element.\\r\\n > Parameters\\r\\n - dx (number) horisontal shift\\r\\n - dy (number) vertical shift\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.translate = function (dx, dy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n dx = Str(dx).split(separator);\\r\\n if (dx.length - 1) {\\r\\n dy = toFloat(dx[1]);\\r\\n }\\r\\n dx = toFloat(dx[0]) || 0;\\r\\n dy = +dy || 0;\\r\\n this.transform(this._.transform.concat([[\\\"t\\\", dx, dy]]));\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.transform\\r\\n [ method ]\\r\\n **\\r\\n * Adds transformation to the element which is separate to other attributes,\\r\\n * i.e. translation doesn’t change `x` or `y` of the rectange. The format\\r\\n * of transformation string is similar to the path string syntax:\\r\\n | \\\"t100,100r30,100,100s2,2,100,100r45s1.5\\\"\\r\\n * Each letter is a command. There are four commands: `t` is for translate, `r` is for rotate, `s` is for\\r\\n * scale and `m` is for matrix.\\r\\n *\\r\\n * There are also alternative “absolute” translation, rotation and scale: `T`, `R` and `S`. They will not take previous transformation into account. For example, `...T100,0` will always move element 100 px horisontally, while `...t100,0` could move it vertically if there is `r90` before. Just compare results of `r90t100,0` and `r90T100,0`.\\r\\n *\\r\\n * So, the example line above could be read like “translate by 100, 100; rotate 30° around 100, 100; scale twice around 100, 100;\\r\\n * rotate 45° around centre; scale 1.5 times relative to centre”. As you can see rotate and scale commands have origin\\r\\n * coordinates as optional parameters, the default is the centre point of the element.\\r\\n * Matrix accepts six parameters.\\r\\n > Usage\\r\\n | var el = paper.rect(10, 20, 300, 200);\\r\\n | // translate 100, 100, rotate 45°, translate -100, 0\\r\\n | el.transform(\\\"t100,100r45t-100,0\\\");\\r\\n | // if you want you can append or prepend transformations\\r\\n | el.transform(\\\"...t50,50\\\");\\r\\n | el.transform(\\\"s2...\\\");\\r\\n | // or even wrap\\r\\n | el.transform(\\\"t50,50...t-50-50\\\");\\r\\n | // to reset transformation call method with empty string\\r\\n | el.transform(\\\"\\\");\\r\\n | // to get current value call it without parameters\\r\\n | console.log(el.transform());\\r\\n > Parameters\\r\\n - tstr (string) #optional transformation string\\r\\n * If tstr isn’t specified\\r\\n = (string) current transformation string\\r\\n * else\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.transform = function (tstr) {\\r\\n var _ = this._;\\r\\n if (tstr == null) {\\r\\n return _.transform;\\r\\n }\\r\\n R._extractTransform(this, tstr);\\r\\n\\r\\n this.clip && $(this.clip, {transform: this.matrix.invert()});\\r\\n this.pattern && updatePosition(this);\\r\\n this.node && $(this.node, {transform: this.matrix});\\r\\n\\r\\n if (_.sx != 1 || _.sy != 1) {\\r\\n var sw = this.attrs[has](\\\"stroke-width\\\") ? this.attrs[\\\"stroke-width\\\"] : 1;\\r\\n this.attr({\\\"stroke-width\\\": sw});\\r\\n }\\r\\n\\r\\n //Reduce transform string\\r\\n _.transform = this.matrix.toTransformString();\\r\\n\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.hide\\r\\n [ method ]\\r\\n **\\r\\n * Makes element invisible. See @Element.show.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.hide = function () {\\r\\n if(!this.removed) this.node.style.display = \\\"none\\\";\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.show\\r\\n [ method ]\\r\\n **\\r\\n * Makes element visible. See @Element.hide.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.show = function () {\\r\\n if(!this.removed) this.node.style.display = \\\"\\\";\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.remove\\r\\n [ method ]\\r\\n **\\r\\n * Removes element from the paper.\\r\\n \\\\*/\\r\\n elproto.remove = function () {\\r\\n var node = getRealNode(this.node);\\r\\n if (this.removed || !node.parentNode) {\\r\\n return;\\r\\n }\\r\\n var paper = this.paper;\\r\\n paper.__set__ && paper.__set__.exclude(this);\\r\\n eve.unbind(\\\"raphael.*.*.\\\" + this.id);\\r\\n if (this.gradient) {\\r\\n paper.defs.removeChild(this.gradient);\\r\\n }\\r\\n R._tear(this, paper);\\r\\n\\r\\n node.parentNode.removeChild(node);\\r\\n\\r\\n // Remove custom data for element\\r\\n this.removeData();\\r\\n\\r\\n for (var i in this) {\\r\\n this[i] = typeof this[i] == \\\"function\\\" ? R._removedFactory(i) : null;\\r\\n }\\r\\n this.removed = true;\\r\\n };\\r\\n elproto._getBBox = function () {\\r\\n if (this.node.style.display == \\\"none\\\") {\\r\\n this.show();\\r\\n var hide = true;\\r\\n }\\r\\n var canvasHidden = false,\\r\\n containerStyle;\\r\\n if (this.paper.canvas.parentElement) {\\r\\n containerStyle = this.paper.canvas.parentElement.style;\\r\\n } //IE10+ can't find parentElement\\r\\n else if (this.paper.canvas.parentNode) {\\r\\n containerStyle = this.paper.canvas.parentNode.style;\\r\\n }\\r\\n\\r\\n if(containerStyle && containerStyle.display == \\\"none\\\") {\\r\\n canvasHidden = true;\\r\\n containerStyle.display = \\\"\\\";\\r\\n }\\r\\n var bbox = {};\\r\\n try {\\r\\n bbox = this.node.getBBox();\\r\\n } catch(e) {\\r\\n // Firefox 3.0.x, 25.0.1 (probably more versions affected) play badly here - possible fix\\r\\n bbox = {\\r\\n x: this.node.clientLeft,\\r\\n y: this.node.clientTop,\\r\\n width: this.node.clientWidth,\\r\\n height: this.node.clientHeight\\r\\n }\\r\\n } finally {\\r\\n bbox = bbox || {};\\r\\n if(canvasHidden){\\r\\n containerStyle.display = \\\"none\\\";\\r\\n }\\r\\n }\\r\\n hide && this.hide();\\r\\n return bbox;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.attr\\r\\n [ method ]\\r\\n **\\r\\n * Sets the attributes of the element.\\r\\n > Parameters\\r\\n - attrName (string) attribute’s name\\r\\n - value (string) value\\r\\n * or\\r\\n - params (object) object of name/value pairs\\r\\n * or\\r\\n - attrName (string) attribute’s name\\r\\n * or\\r\\n - attrNames (array) in this case method returns array of current values for given attribute names\\r\\n = (object) @Element if attrsName & value or params are passed in.\\r\\n = (...) value of the attribute if only attrsName is passed in.\\r\\n = (array) array of values of the attribute if attrsNames is passed in.\\r\\n = (object) object of attributes if nothing is passed in.\\r\\n > Possible parameters\\r\\n # <p>Please refer to the <a href=\\\"http://www.w3.org/TR/SVG/\\\" title=\\\"The W3C Recommendation for the SVG language describes these properties in detail.\\\">SVG specification</a> for an explanation of these parameters.</p>\\r\\n o arrow-end (string) arrowhead on the end of the path. The format for string is `<type>[-<width>[-<length>]]`. Possible types: `classic`, `block`, `open`, `oval`, `diamond`, `none`, width: `wide`, `narrow`, `medium`, length: `long`, `short`, `midium`.\\r\\n o clip-rect (string) comma or space separated values: x, y, width and height\\r\\n o cursor (string) CSS type of the cursor\\r\\n o cx (number) the x-axis coordinate of the center of the circle, or ellipse\\r\\n o cy (number) the y-axis coordinate of the center of the circle, or ellipse\\r\\n o fill (string) colour, gradient or image\\r\\n o fill-opacity (number)\\r\\n o font (string)\\r\\n o font-family (string)\\r\\n o font-size (number) font size in pixels\\r\\n o font-weight (string)\\r\\n o height (number)\\r\\n o href (string) URL, if specified element behaves as hyperlink\\r\\n o opacity (number)\\r\\n o path (string) SVG path string format\\r\\n o r (number) radius of the circle, ellipse or rounded corner on the rect\\r\\n o rx (number) horisontal radius of the ellipse\\r\\n o ry (number) vertical radius of the ellipse\\r\\n o src (string) image URL, only works for @Element.image element\\r\\n o stroke (string) stroke colour\\r\\n o stroke-dasharray (string) [“”, “none”, “`-`”, “`.`”, “`-.`”, “`-..`”, “`. `”, “`- `”, “`--`”, “`- .`”, “`--.`”, “`--..`”]\\r\\n o stroke-linecap (string) [“`butt`”, “`square`”, “`round`”]\\r\\n o stroke-linejoin (string) [“`bevel`”, “`round`”, “`miter`”]\\r\\n o stroke-miterlimit (number)\\r\\n o stroke-opacity (number)\\r\\n o stroke-width (number) stroke width in pixels, default is '1'\\r\\n o target (string) used with href\\r\\n o text (string) contents of the text element. Use `\\\\n` for multiline text\\r\\n o text-anchor (string) [“`start`”, “`middle`”, “`end`”], default is “`middle`”\\r\\n o title (string) will create tooltip with a given text\\r\\n o transform (string) see @Element.transform\\r\\n o width (number)\\r\\n o x (number)\\r\\n o y (number)\\r\\n > Gradients\\r\\n * Linear gradient format: “`‹angle›-‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`90-#fff-#000`” – 90°\\r\\n * gradient from white to black or “`0-#fff-#f00:20-#000`” – 0° gradient from white via red (at 20%) to black.\\r\\n *\\r\\n * radial gradient: “`r[(‹fx›, ‹fy›)]‹colour›[-‹colour›[:‹offset›]]*-‹colour›`”, example: “`r#fff-#000`” –\\r\\n * gradient from white to black or “`r(0.25, 0.75)#fff-#000`” – gradient from white to black with focus point\\r\\n * at 0.25, 0.75. Focus point coordinates are in 0..1 range. Radial gradients can only be applied to circles and ellipses.\\r\\n > Path String\\r\\n # <p>Please refer to <a href=\\\"http://www.w3.org/TR/SVG/paths.html#PathData\\\" title=\\\"Details of a path’s data attribute’s format are described in the SVG specification.\\\">SVG documentation regarding path string</a>. Raphaël fully supports it.</p>\\r\\n > Colour Parsing\\r\\n # <ul>\\r\\n # <li>Colour name (“<code>red</code>”, “<code>green</code>”, “<code>cornflowerblue</code>”, etc)</li>\\r\\n # <li>#••• — shortened HTML colour: (“<code>#000</code>”, “<code>#fc0</code>”, etc)</li>\\r\\n # <li>#•••••• — full length HTML colour: (“<code>#000000</code>”, “<code>#bd2300</code>”)</li>\\r\\n # <li>rgb(•••, •••, •••) — red, green and blue channels’ values: (“<code>rgb(200, 100, 0)</code>”)</li>\\r\\n # <li>rgb(•••%, •••%, •••%) — same as above, but in %: (“<code>rgb(100%, 175%, 0%)</code>”)</li>\\r\\n # <li>rgba(•••, •••, •••, •••) — red, green and blue channels’ values: (“<code>rgba(200, 100, 0, .5)</code>”)</li>\\r\\n # <li>rgba(•••%, •••%, •••%, •••%) — same as above, but in %: (“<code>rgba(100%, 175%, 0%, 50%)</code>”)</li>\\r\\n # <li>hsb(•••, •••, •••) — hue, saturation and brightness values: (“<code>hsb(0.5, 0.25, 1)</code>”)</li>\\r\\n # <li>hsb(•••%, •••%, •••%) — same as above, but in %</li>\\r\\n # <li>hsba(•••, •••, •••, •••) — same as above, but with opacity</li>\\r\\n # <li>hsl(•••, •••, •••) — almost the same as hsb, see <a href=\\\"http://en.wikipedia.org/wiki/HSL_and_HSV\\\" title=\\\"HSL and HSV - Wikipedia, the free encyclopedia\\\">Wikipedia page</a></li>\\r\\n # <li>hsl(•••%, •••%, •••%) — same as above, but in %</li>\\r\\n # <li>hsla(•••, •••, •••, •••) — same as above, but with opacity</li>\\r\\n # <li>Optionally for hsb and hsl you could specify hue as a degree: “<code>hsl(240deg, 1, .5)</code>” or, if you want to go fancy, “<code>hsl(240°, 1, .5)</code>”</li>\\r\\n # </ul>\\r\\n \\\\*/\\r\\n elproto.attr = function (name, value) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (name == null) {\\r\\n var res = {};\\r\\n for (var a in this.attrs) if (this.attrs[has](a)) {\\r\\n res[a] = this.attrs[a];\\r\\n }\\r\\n res.gradient && res.fill == \\\"none\\\" && (res.fill = res.gradient) && delete res.gradient;\\r\\n res.transform = this._.transform;\\r\\n return res;\\r\\n }\\r\\n if (value == null && R.is(name, \\\"string\\\")) {\\r\\n if (name == \\\"fill\\\" && this.attrs.fill == \\\"none\\\" && this.attrs.gradient) {\\r\\n return this.attrs.gradient;\\r\\n }\\r\\n if (name == \\\"transform\\\") {\\r\\n return this._.transform;\\r\\n }\\r\\n var names = name.split(separator),\\r\\n out = {};\\r\\n for (var i = 0, ii = names.length; i < ii; i++) {\\r\\n name = names[i];\\r\\n if (name in this.attrs) {\\r\\n out[name] = this.attrs[name];\\r\\n } else if (R.is(this.paper.customAttributes[name], \\\"function\\\")) {\\r\\n out[name] = this.paper.customAttributes[name].def;\\r\\n } else {\\r\\n out[name] = R._availableAttrs[name];\\r\\n }\\r\\n }\\r\\n return ii - 1 ? out : out[names[0]];\\r\\n }\\r\\n if (value == null && R.is(name, \\\"array\\\")) {\\r\\n out = {};\\r\\n for (i = 0, ii = name.length; i < ii; i++) {\\r\\n out[name[i]] = this.attr(name[i]);\\r\\n }\\r\\n return out;\\r\\n }\\r\\n if (value != null) {\\r\\n var params = {};\\r\\n params[name] = value;\\r\\n } else if (name != null && R.is(name, \\\"object\\\")) {\\r\\n params = name;\\r\\n }\\r\\n for (var key in params) {\\r\\n eve(\\\"raphael.attr.\\\" + key + \\\".\\\" + this.id, this, params[key]);\\r\\n }\\r\\n for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], \\\"function\\\")) {\\r\\n var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));\\r\\n this.attrs[key] = params[key];\\r\\n for (var subkey in par) if (par[has](subkey)) {\\r\\n params[subkey] = par[subkey];\\r\\n }\\r\\n }\\r\\n setFillAndStroke(this, params);\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.toFront\\r\\n [ method ]\\r\\n **\\r\\n * Moves the element so it is the closest to the viewer’s eyes, on top of other elements.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.toFront = function () {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n var node = getRealNode(this.node);\\r\\n node.parentNode.appendChild(node);\\r\\n var svg = this.paper;\\r\\n svg.top != this && R._tofront(this, svg);\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.toBack\\r\\n [ method ]\\r\\n **\\r\\n * Moves the element so it is the furthest from the viewer’s eyes, behind other elements.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.toBack = function () {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n var node = getRealNode(this.node);\\r\\n var parentNode = node.parentNode;\\r\\n parentNode.insertBefore(node, parentNode.firstChild);\\r\\n R._toback(this, this.paper);\\r\\n var svg = this.paper;\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.insertAfter\\r\\n [ method ]\\r\\n **\\r\\n * Inserts current object after the given one.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.insertAfter = function (element) {\\r\\n if (this.removed || !element) {\\r\\n return this;\\r\\n }\\r\\n\\r\\n var node = getRealNode(this.node);\\r\\n var afterNode = getRealNode(element.node || element[element.length - 1].node);\\r\\n if (afterNode.nextSibling) {\\r\\n afterNode.parentNode.insertBefore(node, afterNode.nextSibling);\\r\\n } else {\\r\\n afterNode.parentNode.appendChild(node);\\r\\n }\\r\\n R._insertafter(this, element, this.paper);\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Element.insertBefore\\r\\n [ method ]\\r\\n **\\r\\n * Inserts current object before the given one.\\r\\n = (object) @Element\\r\\n \\\\*/\\r\\n elproto.insertBefore = function (element) {\\r\\n if (this.removed || !element) {\\r\\n return this;\\r\\n }\\r\\n\\r\\n var node = getRealNode(this.node);\\r\\n var beforeNode = getRealNode(element.node || element[0].node);\\r\\n beforeNode.parentNode.insertBefore(node, beforeNode);\\r\\n R._insertbefore(this, element, this.paper);\\r\\n return this;\\r\\n };\\r\\n elproto.blur = function (size) {\\r\\n // Experimental. No Safari support. Use it on your own risk.\\r\\n var t = this;\\r\\n if (+size !== 0) {\\r\\n var fltr = $(\\\"filter\\\"),\\r\\n blur = $(\\\"feGaussianBlur\\\");\\r\\n t.attrs.blur = size;\\r\\n fltr.id = R.createUUID();\\r\\n $(blur, {stdDeviation: +size || 1.5});\\r\\n fltr.appendChild(blur);\\r\\n t.paper.defs.appendChild(fltr);\\r\\n t._blur = fltr;\\r\\n $(t.node, {filter: \\\"url(#\\\" + fltr.id + \\\")\\\"});\\r\\n } else {\\r\\n if (t._blur) {\\r\\n t._blur.parentNode.removeChild(t._blur);\\r\\n delete t._blur;\\r\\n delete t.attrs.blur;\\r\\n }\\r\\n t.node.removeAttribute(\\\"filter\\\");\\r\\n }\\r\\n return t;\\r\\n };\\r\\n R._engine.circle = function (svg, x, y, r) {\\r\\n var el = $(\\\"circle\\\");\\r\\n svg.canvas && svg.canvas.appendChild(el);\\r\\n var res = new Element(el, svg);\\r\\n res.attrs = {cx: x, cy: y, r: r, fill: \\\"none\\\", stroke: \\\"#000\\\"};\\r\\n res.type = \\\"circle\\\";\\r\\n $(el, res.attrs);\\r\\n return res;\\r\\n };\\r\\n R._engine.rect = function (svg, x, y, w, h, r) {\\r\\n var el = $(\\\"rect\\\");\\r\\n svg.canvas && svg.canvas.appendChild(el);\\r\\n var res = new Element(el, svg);\\r\\n res.attrs = {x: x, y: y, width: w, height: h, rx: r || 0, ry: r || 0, fill: \\\"none\\\", stroke: \\\"#000\\\"};\\r\\n res.type = \\\"rect\\\";\\r\\n $(el, res.attrs);\\r\\n return res;\\r\\n };\\r\\n R._engine.ellipse = function (svg, x, y, rx, ry) {\\r\\n var el = $(\\\"ellipse\\\");\\r\\n svg.canvas && svg.canvas.appendChild(el);\\r\\n var res = new Element(el, svg);\\r\\n res.attrs = {cx: x, cy: y, rx: rx, ry: ry, fill: \\\"none\\\", stroke: \\\"#000\\\"};\\r\\n res.type = \\\"ellipse\\\";\\r\\n $(el, res.attrs);\\r\\n return res;\\r\\n };\\r\\n R._engine.image = function (svg, src, x, y, w, h) {\\r\\n var el = $(\\\"image\\\");\\r\\n $(el, {x: x, y: y, width: w, height: h, preserveAspectRatio: \\\"none\\\"});\\r\\n el.setAttributeNS(xlink, \\\"href\\\", src);\\r\\n svg.canvas && svg.canvas.appendChild(el);\\r\\n var res = new Element(el, svg);\\r\\n res.attrs = {x: x, y: y, width: w, height: h, src: src};\\r\\n res.type = \\\"image\\\";\\r\\n return res;\\r\\n };\\r\\n R._engine.text = function (svg, x, y, text, href) {\\r\\n var el = $(\\\"text\\\");\\r\\n svg.canvas && svg.canvas.appendChild(el);\\r\\n var res = new Element(el, svg);\\r\\n res.attrs = {\\r\\n x: x,\\r\\n y: y,\\r\\n \\\"text-anchor\\\": \\\"middle\\\",\\r\\n text: text,\\r\\n \\\"font-family\\\": R._availableAttrs[\\\"font-family\\\"],\\r\\n \\\"font-size\\\": R._availableAttrs[\\\"font-size\\\"],\\r\\n stroke: \\\"none\\\",\\r\\n fill: \\\"#000\\\",\\r\\n ...(href ? { href } : null),\\r\\n };\\r\\n res.type = \\\"text\\\";\\r\\n setFillAndStroke(res, res.attrs);\\r\\n return res;\\r\\n };\\r\\n R._engine.setSize = function (width, height) {\\r\\n this.width = width || this.width;\\r\\n this.height = height || this.height;\\r\\n this.canvas.setAttribute(\\\"width\\\", this.width);\\r\\n this.canvas.setAttribute(\\\"height\\\", this.height);\\r\\n if (this._viewBox) {\\r\\n this.setViewBox.apply(this, this._viewBox);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n R._engine.create = function () {\\r\\n var con = R._getContainer.apply(0, arguments),\\r\\n container = con && con.container,\\r\\n x = con.x,\\r\\n y = con.y,\\r\\n width = con.width,\\r\\n height = con.height;\\r\\n if (!container) {\\r\\n throw new Error(\\\"SVG container not found.\\\");\\r\\n }\\r\\n var cnvs = $(\\\"svg\\\"),\\r\\n css = \\\"overflow:hidden;\\\",\\r\\n isFloating;\\r\\n x = x || 0;\\r\\n y = y || 0;\\r\\n width = width || 512;\\r\\n height = height || 342;\\r\\n $(cnvs, {\\r\\n height: height,\\r\\n version: 1.1,\\r\\n width: width,\\r\\n xmlns: \\\"http://www.w3.org/2000/svg\\\",\\r\\n \\\"xmlns:xlink\\\": \\\"http://www.w3.org/1999/xlink\\\"\\r\\n });\\r\\n if (container == 1) {\\r\\n cnvs.style.cssText = css + \\\"position:absolute;left:\\\" + x + \\\"px;top:\\\" + y + \\\"px\\\";\\r\\n R._g.doc.body.appendChild(cnvs);\\r\\n isFloating = 1;\\r\\n } else {\\r\\n cnvs.style.cssText = css + \\\"position:relative\\\";\\r\\n if (container.firstChild) {\\r\\n container.insertBefore(cnvs, container.firstChild);\\r\\n } else {\\r\\n container.appendChild(cnvs);\\r\\n }\\r\\n }\\r\\n container = new R._Paper;\\r\\n container.width = width;\\r\\n container.height = height;\\r\\n container.canvas = cnvs;\\r\\n container.clear();\\r\\n container._left = container._top = 0;\\r\\n isFloating && (container.renderfix = function () {});\\r\\n container.renderfix();\\r\\n return container;\\r\\n };\\r\\n R._engine.setViewBox = function (x, y, w, h, fit) {\\r\\n eve(\\\"raphael.setViewBox\\\", this, this._viewBox, [x, y, w, h, fit]);\\r\\n var paperSize = this.getSize(),\\r\\n size = mmax(w / paperSize.width, h / paperSize.height),\\r\\n top = this.top,\\r\\n aspectRatio = fit ? \\\"xMidYMid meet\\\" : \\\"xMinYMin\\\",\\r\\n vb,\\r\\n sw;\\r\\n if (x == null) {\\r\\n if (this._vbSize) {\\r\\n size = 1;\\r\\n }\\r\\n delete this._vbSize;\\r\\n vb = \\\"0 0 \\\" + this.width + S + this.height;\\r\\n } else {\\r\\n this._vbSize = size;\\r\\n vb = x + S + y + S + w + S + h;\\r\\n }\\r\\n $(this.canvas, {\\r\\n viewBox: vb,\\r\\n preserveAspectRatio: aspectRatio\\r\\n });\\r\\n while (size && top) {\\r\\n sw = \\\"stroke-width\\\" in top.attrs ? top.attrs[\\\"stroke-width\\\"] : 1;\\r\\n top.attr({\\\"stroke-width\\\": sw});\\r\\n top._.dirty = 1;\\r\\n top._.dirtyT = 1;\\r\\n top = top.prev;\\r\\n }\\r\\n this._viewBox = [x, y, w, h, !!fit];\\r\\n return this;\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.renderfix\\r\\n [ method ]\\r\\n **\\r\\n * Fixes the issue of Firefox and IE9 regarding subpixel rendering. If paper is dependant\\r\\n * on other elements after reflow it could shift half pixel which cause for lines to lost their crispness.\\r\\n * This method fixes the issue.\\r\\n **\\r\\n Special thanks to Mariusz Nowak (http://www.medikoo.com/) for this method.\\r\\n \\\\*/\\r\\n R.prototype.renderfix = function () {\\r\\n var cnvs = this.canvas,\\r\\n s = cnvs.style,\\r\\n pos;\\r\\n try {\\r\\n pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix();\\r\\n } catch (e) {\\r\\n pos = cnvs.createSVGMatrix();\\r\\n }\\r\\n var left = -pos.e % 1,\\r\\n top = -pos.f % 1;\\r\\n if (left || top) {\\r\\n if (left) {\\r\\n this._left = (this._left + left) % 1;\\r\\n s.left = this._left + \\\"px\\\";\\r\\n }\\r\\n if (top) {\\r\\n this._top = (this._top + top) % 1;\\r\\n s.top = this._top + \\\"px\\\";\\r\\n }\\r\\n }\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.clear\\r\\n [ method ]\\r\\n **\\r\\n * Clears the paper, i.e. removes all the elements.\\r\\n \\\\*/\\r\\n R.prototype.clear = function () {\\r\\n R.eve(\\\"raphael.clear\\\", this);\\r\\n var c = this.canvas;\\r\\n while (c.firstChild) {\\r\\n c.removeChild(c.firstChild);\\r\\n }\\r\\n this.bottom = this.top = null;\\r\\n (this.desc = $(\\\"desc\\\")).appendChild(R._g.doc.createTextNode(\\\"Created with Rapha\\\\xebl \\\" + R.version));\\r\\n c.appendChild(this.desc);\\r\\n c.appendChild(this.defs = $(\\\"defs\\\"));\\r\\n };\\r\\n /*\\\\\\r\\n * Paper.remove\\r\\n [ method ]\\r\\n **\\r\\n * Removes the paper from the DOM.\\r\\n \\\\*/\\r\\n R.prototype.remove = function () {\\r\\n eve(\\\"raphael.remove\\\", this);\\r\\n this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas);\\r\\n for (var i in this) {\\r\\n this[i] = typeof this[i] == \\\"function\\\" ? R._removedFactory(i) : null;\\r\\n }\\r\\n };\\r\\n var setproto = R.st;\\r\\n for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {\\r\\n setproto[method] = (function (methodname) {\\r\\n return function () {\\r\\n var arg = arguments;\\r\\n return this.forEach(function (el) {\\r\\n el[methodname].apply(el, arg);\\r\\n });\\r\\n };\\r\\n })(method);\\r\\n }\\r\\n}));\\r\\n\\r\\n// ┌─────────────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\\\\\\\\\r\\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ VML Module │ \\\\\\\\\\r\\n// ├─────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Copyright (c) 2008-2011 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\\\\\\r\\n// │ Copyright (c) 2008-2011 Sencha Labs (http://sencha.com) │ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license. │ \\\\\\\\\\r\\n// └─────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n(function (glob, factory) {\\r\\n if (typeof define === \\\"function\\\" && define.amd) {\\r\\n define(\\\"raphael.vml\\\", [\\\"raphael.core\\\"], function(raphael) {\\r\\n return factory(raphael);\\r\\n });\\r\\n } else if (typeof exports === \\\"object\\\") {\\r\\n factory(require(\\\"./raphael.core\\\"));\\r\\n } else {\\r\\n factory(glob.Raphael);\\r\\n }\\r\\n}(this, function(R) {\\r\\n if (R && !R.vml) {\\r\\n return;\\r\\n }\\r\\n\\r\\n var has = \\\"hasOwnProperty\\\",\\r\\n Str = String,\\r\\n toFloat = parseFloat,\\r\\n math = Math,\\r\\n round = math.round,\\r\\n mmax = math.max,\\r\\n mmin = math.min,\\r\\n abs = math.abs,\\r\\n fillString = \\\"fill\\\",\\r\\n separator = /[, ]+/,\\r\\n eve = R.eve,\\r\\n ms = \\\" progid:DXImageTransform.Microsoft\\\",\\r\\n S = \\\" \\\",\\r\\n E = \\\"\\\",\\r\\n map = {M: \\\"m\\\", L: \\\"l\\\", C: \\\"c\\\", Z: \\\"x\\\", m: \\\"t\\\", l: \\\"r\\\", c: \\\"v\\\", z: \\\"x\\\"},\\r\\n bites = /([clmz]),?([^clmz]*)/gi,\\r\\n blurregexp = / progid:\\\\S+Blur\\\\([^\\\\)]+\\\\)/g,\\r\\n val = /-?[^,\\\\s-]+/g,\\r\\n cssDot = \\\"position:absolute;left:0;top:0;width:1px;height:1px;behavior:url(#default#VML)\\\",\\r\\n zoom = 21600,\\r\\n pathTypes = {path: 1, rect: 1, image: 1},\\r\\n ovalTypes = {circle: 1, ellipse: 1},\\r\\n path2vml = function (path) {\\r\\n var total = /[ahqstv]/ig,\\r\\n command = R._pathToAbsolute;\\r\\n Str(path).match(total) && (command = R._path2curve);\\r\\n total = /[clmz]/g;\\r\\n if (command == R._pathToAbsolute && !Str(path).match(total)) {\\r\\n var res = Str(path).replace(bites, function (all, command, args) {\\r\\n var vals = [],\\r\\n isMove = command.toLowerCase() == \\\"m\\\",\\r\\n res = map[command];\\r\\n args.replace(val, function (value) {\\r\\n if (isMove && vals.length == 2) {\\r\\n res += vals + map[command == \\\"m\\\" ? \\\"l\\\" : \\\"L\\\"];\\r\\n vals = [];\\r\\n }\\r\\n vals.push(round(value * zoom));\\r\\n });\\r\\n return res + vals;\\r\\n });\\r\\n return res;\\r\\n }\\r\\n var pa = command(path), p, r;\\r\\n res = [];\\r\\n for (var i = 0, ii = pa.length; i < ii; i++) {\\r\\n p = pa[i];\\r\\n r = pa[i][0].toLowerCase();\\r\\n r == \\\"z\\\" && (r = \\\"x\\\");\\r\\n for (var j = 1, jj = p.length; j < jj; j++) {\\r\\n r += round(p[j] * zoom) + (j != jj - 1 ? \\\",\\\" : E);\\r\\n }\\r\\n res.push(r);\\r\\n }\\r\\n return res.join(S);\\r\\n },\\r\\n compensation = function (deg, dx, dy) {\\r\\n var m = R.matrix();\\r\\n m.rotate(-deg, .5, .5);\\r\\n return {\\r\\n dx: m.x(dx, dy),\\r\\n dy: m.y(dx, dy)\\r\\n };\\r\\n },\\r\\n setCoords = function (p, sx, sy, dx, dy, deg) {\\r\\n var _ = p._,\\r\\n m = p.matrix,\\r\\n fillpos = _.fillpos,\\r\\n o = p.node,\\r\\n s = o.style,\\r\\n y = 1,\\r\\n flip = \\\"\\\",\\r\\n dxdy,\\r\\n kx = zoom / sx,\\r\\n ky = zoom / sy;\\r\\n s.visibility = \\\"hidden\\\";\\r\\n if (!sx || !sy) {\\r\\n return;\\r\\n }\\r\\n o.coordsize = abs(kx) + S + abs(ky);\\r\\n s.rotation = deg * (sx * sy < 0 ? -1 : 1);\\r\\n if (deg) {\\r\\n var c = compensation(deg, dx, dy);\\r\\n dx = c.dx;\\r\\n dy = c.dy;\\r\\n }\\r\\n sx < 0 && (flip += \\\"x\\\");\\r\\n sy < 0 && (flip += \\\" y\\\") && (y = -1);\\r\\n s.flip = flip;\\r\\n o.coordorigin = (dx * -kx) + S + (dy * -ky);\\r\\n if (fillpos || _.fillsize) {\\r\\n var fill = o.getElementsByTagName(fillString);\\r\\n fill = fill && fill[0];\\r\\n o.removeChild(fill);\\r\\n if (fillpos) {\\r\\n c = compensation(deg, m.x(fillpos[0], fillpos[1]), m.y(fillpos[0], fillpos[1]));\\r\\n fill.position = c.dx * y + S + c.dy * y;\\r\\n }\\r\\n if (_.fillsize) {\\r\\n fill.size = _.fillsize[0] * abs(sx) + S + _.fillsize[1] * abs(sy);\\r\\n }\\r\\n o.appendChild(fill);\\r\\n }\\r\\n s.visibility = \\\"visible\\\";\\r\\n };\\r\\n R.toString = function () {\\r\\n return \\\"Your browser doesn\\\\u2019t support SVG. Falling down to VML.\\\\nYou are running Rapha\\\\xebl \\\" + this.version;\\r\\n };\\r\\n var addArrow = function (o, value, isEnd) {\\r\\n var values = Str(value).toLowerCase().split(\\\"-\\\"),\\r\\n se = isEnd ? \\\"end\\\" : \\\"start\\\",\\r\\n i = values.length,\\r\\n type = \\\"classic\\\",\\r\\n w = \\\"medium\\\",\\r\\n h = \\\"medium\\\";\\r\\n while (i--) {\\r\\n switch (values[i]) {\\r\\n case \\\"block\\\":\\r\\n case \\\"classic\\\":\\r\\n case \\\"oval\\\":\\r\\n case \\\"diamond\\\":\\r\\n case \\\"open\\\":\\r\\n case \\\"none\\\":\\r\\n type = values[i];\\r\\n break;\\r\\n case \\\"wide\\\":\\r\\n case \\\"narrow\\\": h = values[i]; break;\\r\\n case \\\"long\\\":\\r\\n case \\\"short\\\": w = values[i]; break;\\r\\n }\\r\\n }\\r\\n var stroke = o.node.getElementsByTagName(\\\"stroke\\\")[0];\\r\\n stroke[se + \\\"arrow\\\"] = type;\\r\\n stroke[se + \\\"arrowlength\\\"] = w;\\r\\n stroke[se + \\\"arrowwidth\\\"] = h;\\r\\n },\\r\\n setFillAndStroke = function (o, params) {\\r\\n // o.paper.canvas.style.display = \\\"none\\\";\\r\\n o.attrs = o.attrs || {};\\r\\n var node = o.node,\\r\\n a = o.attrs,\\r\\n s = node.style,\\r\\n xy,\\r\\n newpath = pathTypes[o.type] && (params.x != a.x || params.y != a.y || params.width != a.width || params.height != a.height || params.cx != a.cx || params.cy != a.cy || params.rx != a.rx || params.ry != a.ry || params.r != a.r),\\r\\n isOval = ovalTypes[o.type] && (a.cx != params.cx || a.cy != params.cy || a.r != params.r || a.rx != params.rx || a.ry != params.ry),\\r\\n res = o;\\r\\n\\r\\n\\r\\n for (var par in params) if (params[has](par)) {\\r\\n a[par] = params[par];\\r\\n }\\r\\n if (newpath) {\\r\\n a.path = R._getPath[o.type](o);\\r\\n o._.dirty = 1;\\r\\n }\\r\\n params.href && (node.href = params.href);\\r\\n params.title && (node.title = params.title);\\r\\n params.target && (node.target = params.target);\\r\\n params.cursor && (s.cursor = params.cursor);\\r\\n \\\"blur\\\" in params && o.blur(params.blur);\\r\\n if (params.path && o.type == \\\"path\\\" || newpath) {\\r\\n node.path = path2vml(~Str(a.path).toLowerCase().indexOf(\\\"r\\\") ? R._pathToAbsolute(a.path) : a.path);\\r\\n o._.dirty = 1;\\r\\n if (o.type == \\\"image\\\") {\\r\\n o._.fillpos = [a.x, a.y];\\r\\n o._.fillsize = [a.width, a.height];\\r\\n setCoords(o, 1, 1, 0, 0, 0);\\r\\n }\\r\\n }\\r\\n \\\"transform\\\" in params && o.transform(params.transform);\\r\\n if (isOval) {\\r\\n var cx = +a.cx,\\r\\n cy = +a.cy,\\r\\n rx = +a.rx || +a.r || 0,\\r\\n ry = +a.ry || +a.r || 0;\\r\\n node.path = R.format(\\\"ar{0},{1},{2},{3},{4},{1},{4},{1}x\\\", round((cx - rx) * zoom), round((cy - ry) * zoom), round((cx + rx) * zoom), round((cy + ry) * zoom), round(cx * zoom));\\r\\n o._.dirty = 1;\\r\\n }\\r\\n if (\\\"clip-rect\\\" in params) {\\r\\n var rect = Str(params[\\\"clip-rect\\\"]).split(separator);\\r\\n if (rect.length == 4) {\\r\\n rect[2] = +rect[2] + (+rect[0]);\\r\\n rect[3] = +rect[3] + (+rect[1]);\\r\\n var div = node.clipRect || R._g.doc.createElement(\\\"div\\\"),\\r\\n dstyle = div.style;\\r\\n dstyle.clip = R.format(\\\"rect({1}px {2}px {3}px {0}px)\\\", rect);\\r\\n if (!node.clipRect) {\\r\\n dstyle.position = \\\"absolute\\\";\\r\\n dstyle.top = 0;\\r\\n dstyle.left = 0;\\r\\n dstyle.width = o.paper.width + \\\"px\\\";\\r\\n dstyle.height = o.paper.height + \\\"px\\\";\\r\\n node.parentNode.insertBefore(div, node);\\r\\n div.appendChild(node);\\r\\n node.clipRect = div;\\r\\n }\\r\\n }\\r\\n if (!params[\\\"clip-rect\\\"]) {\\r\\n node.clipRect && (node.clipRect.style.clip = \\\"auto\\\");\\r\\n }\\r\\n }\\r\\n if (o.textpath) {\\r\\n var textpathStyle = o.textpath.style;\\r\\n params.font && (textpathStyle.font = params.font);\\r\\n params[\\\"font-family\\\"] && (textpathStyle.fontFamily = '\\\"' + params[\\\"font-family\\\"].split(\\\",\\\")[0].replace(/^['\\\"]+|['\\\"]+$/g, E) + '\\\"');\\r\\n params[\\\"font-size\\\"] && (textpathStyle.fontSize = params[\\\"font-size\\\"]);\\r\\n params[\\\"font-weight\\\"] && (textpathStyle.fontWeight = params[\\\"font-weight\\\"]);\\r\\n params[\\\"font-style\\\"] && (textpathStyle.fontStyle = params[\\\"font-style\\\"]);\\r\\n }\\r\\n if (\\\"arrow-start\\\" in params) {\\r\\n addArrow(res, params[\\\"arrow-start\\\"]);\\r\\n }\\r\\n if (\\\"arrow-end\\\" in params) {\\r\\n addArrow(res, params[\\\"arrow-end\\\"], 1);\\r\\n }\\r\\n if (params.opacity != null ||\\r\\n params[\\\"stroke-width\\\"] != null ||\\r\\n params.fill != null ||\\r\\n params.src != null ||\\r\\n params.stroke != null ||\\r\\n params[\\\"stroke-width\\\"] != null ||\\r\\n params[\\\"stroke-opacity\\\"] != null ||\\r\\n params[\\\"fill-opacity\\\"] != null ||\\r\\n params[\\\"stroke-dasharray\\\"] != null ||\\r\\n params[\\\"stroke-miterlimit\\\"] != null ||\\r\\n params[\\\"stroke-linejoin\\\"] != null ||\\r\\n params[\\\"stroke-linecap\\\"] != null) {\\r\\n var fill = node.getElementsByTagName(fillString),\\r\\n newfill = false;\\r\\n fill = fill && fill[0];\\r\\n !fill && (newfill = fill = createNode(fillString));\\r\\n if (o.type == \\\"image\\\" && params.src) {\\r\\n fill.src = params.src;\\r\\n }\\r\\n params.fill && (fill.on = true);\\r\\n if (fill.on == null || params.fill == \\\"none\\\" || params.fill === null) {\\r\\n fill.on = false;\\r\\n }\\r\\n if (fill.on && params.fill) {\\r\\n var isURL = Str(params.fill).match(R._ISURL);\\r\\n if (isURL) {\\r\\n fill.parentNode == node && node.removeChild(fill);\\r\\n fill.rotate = true;\\r\\n fill.src = isURL[1];\\r\\n fill.type = \\\"tile\\\";\\r\\n var bbox = o.getBBox(1);\\r\\n fill.position = bbox.x + S + bbox.y;\\r\\n o._.fillpos = [bbox.x, bbox.y];\\r\\n\\r\\n R._preload(isURL[1], function () {\\r\\n o._.fillsize = [this.offsetWidth, this.offsetHeight];\\r\\n });\\r\\n } else {\\r\\n fill.color = R.getRGB(params.fill).hex;\\r\\n fill.src = E;\\r\\n fill.type = \\\"solid\\\";\\r\\n if (R.getRGB(params.fill).error && (res.type in {circle: 1, ellipse: 1} || Str(params.fill).charAt() != \\\"r\\\") && addGradientFill(res, params.fill, fill)) {\\r\\n a.fill = \\\"none\\\";\\r\\n a.gradient = params.fill;\\r\\n fill.rotate = false;\\r\\n }\\r\\n }\\r\\n }\\r\\n if (\\\"fill-opacity\\\" in params || \\\"opacity\\\" in params) {\\r\\n var opacity = ((+a[\\\"fill-opacity\\\"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+R.getRGB(params.fill).o + 1 || 2) - 1);\\r\\n opacity = mmin(mmax(opacity, 0), 1);\\r\\n fill.opacity = opacity;\\r\\n if (fill.src) {\\r\\n fill.color = \\\"none\\\";\\r\\n }\\r\\n }\\r\\n node.appendChild(fill);\\r\\n var stroke = (node.getElementsByTagName(\\\"stroke\\\") && node.getElementsByTagName(\\\"stroke\\\")[0]),\\r\\n newstroke = false;\\r\\n !stroke && (newstroke = stroke = createNode(\\\"stroke\\\"));\\r\\n if ((params.stroke && params.stroke != \\\"none\\\") ||\\r\\n params[\\\"stroke-width\\\"] ||\\r\\n params[\\\"stroke-opacity\\\"] != null ||\\r\\n params[\\\"stroke-dasharray\\\"] ||\\r\\n params[\\\"stroke-miterlimit\\\"] ||\\r\\n params[\\\"stroke-linejoin\\\"] ||\\r\\n params[\\\"stroke-linecap\\\"]) {\\r\\n stroke.on = true;\\r\\n }\\r\\n (params.stroke == \\\"none\\\" || params.stroke === null || stroke.on == null || params.stroke == 0 || params[\\\"stroke-width\\\"] == 0) && (stroke.on = false);\\r\\n var strokeColor = R.getRGB(params.stroke);\\r\\n stroke.on && params.stroke && (stroke.color = strokeColor.hex);\\r\\n opacity = ((+a[\\\"stroke-opacity\\\"] + 1 || 2) - 1) * ((+a.opacity + 1 || 2) - 1) * ((+strokeColor.o + 1 || 2) - 1);\\r\\n var width = (toFloat(params[\\\"stroke-width\\\"]) || 1) * .75;\\r\\n opacity = mmin(mmax(opacity, 0), 1);\\r\\n params[\\\"stroke-width\\\"] == null && (width = a[\\\"stroke-width\\\"]);\\r\\n params[\\\"stroke-width\\\"] && (stroke.weight = width);\\r\\n width && width < 1 && (opacity *= width) && (stroke.weight = 1);\\r\\n stroke.opacity = opacity;\\r\\n\\r\\n params[\\\"stroke-linejoin\\\"] && (stroke.joinstyle = params[\\\"stroke-linejoin\\\"] || \\\"miter\\\");\\r\\n stroke.miterlimit = params[\\\"stroke-miterlimit\\\"] || 8;\\r\\n params[\\\"stroke-linecap\\\"] && (stroke.endcap = params[\\\"stroke-linecap\\\"] == \\\"butt\\\" ? \\\"flat\\\" : params[\\\"stroke-linecap\\\"] == \\\"square\\\" ? \\\"square\\\" : \\\"round\\\");\\r\\n if (\\\"stroke-dasharray\\\" in params) {\\r\\n var dasharray = {\\r\\n \\\"-\\\": \\\"shortdash\\\",\\r\\n \\\".\\\": \\\"shortdot\\\",\\r\\n \\\"-.\\\": \\\"shortdashdot\\\",\\r\\n \\\"-..\\\": \\\"shortdashdotdot\\\",\\r\\n \\\". \\\": \\\"dot\\\",\\r\\n \\\"- \\\": \\\"dash\\\",\\r\\n \\\"--\\\": \\\"longdash\\\",\\r\\n \\\"- .\\\": \\\"dashdot\\\",\\r\\n \\\"--.\\\": \\\"longdashdot\\\",\\r\\n \\\"--..\\\": \\\"longdashdotdot\\\"\\r\\n };\\r\\n stroke.dashstyle = dasharray[has](params[\\\"stroke-dasharray\\\"]) ? dasharray[params[\\\"stroke-dasharray\\\"]] : E;\\r\\n }\\r\\n newstroke && node.appendChild(stroke);\\r\\n }\\r\\n if (res.type == \\\"text\\\") {\\r\\n res.paper.canvas.style.display = E;\\r\\n var span = res.paper.span,\\r\\n m = 100,\\r\\n fontSize = a.font && a.font.match(/\\\\d+(?:\\\\.\\\\d*)?(?=px)/);\\r\\n s = span.style;\\r\\n a.font && (s.font = a.font);\\r\\n a[\\\"font-family\\\"] && (s.fontFamily = a[\\\"font-family\\\"]);\\r\\n a[\\\"font-weight\\\"] && (s.fontWeight = a[\\\"font-weight\\\"]);\\r\\n a[\\\"font-style\\\"] && (s.fontStyle = a[\\\"font-style\\\"]);\\r\\n fontSize = toFloat(a[\\\"font-size\\\"] || fontSize && fontSize[0]) || 10;\\r\\n s.fontSize = fontSize * m + \\\"px\\\";\\r\\n res.textpath.string && (span.innerHTML = Str(res.textpath.string).replace(/</g, \\\"<\\\").replace(/&/g, \\\"&\\\").replace(/\\\\n/g, \\\"<br>\\\"));\\r\\n var brect = span.getBoundingClientRect();\\r\\n res.W = a.w = (brect.right - brect.left) / m;\\r\\n res.H = a.h = (brect.bottom - brect.top) / m;\\r\\n // res.paper.canvas.style.display = \\\"none\\\";\\r\\n res.X = a.x;\\r\\n res.Y = a.y + res.H / 2;\\r\\n\\r\\n (\\\"x\\\" in params || \\\"y\\\" in params) && (res.path.v = R.format(\\\"m{0},{1}l{2},{1}\\\", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1));\\r\\n var dirtyattrs = [\\\"x\\\", \\\"y\\\", \\\"text\\\", \\\"font\\\", \\\"font-family\\\", \\\"font-weight\\\", \\\"font-style\\\", \\\"font-size\\\"];\\r\\n for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) {\\r\\n res._.dirty = 1;\\r\\n break;\\r\\n }\\r\\n\\r\\n // text-anchor emulation\\r\\n switch (a[\\\"text-anchor\\\"]) {\\r\\n case \\\"start\\\":\\r\\n res.textpath.style[\\\"v-text-align\\\"] = \\\"left\\\";\\r\\n res.bbx = res.W / 2;\\r\\n break;\\r\\n case \\\"end\\\":\\r\\n res.textpath.style[\\\"v-text-align\\\"] = \\\"right\\\";\\r\\n res.bbx = -res.W / 2;\\r\\n break;\\r\\n default:\\r\\n res.textpath.style[\\\"v-text-align\\\"] = \\\"center\\\";\\r\\n res.bbx = 0;\\r\\n break;\\r\\n }\\r\\n res.textpath.style[\\\"v-text-kern\\\"] = true;\\r\\n }\\r\\n // res.paper.canvas.style.display = E;\\r\\n },\\r\\n addGradientFill = function (o, gradient, fill) {\\r\\n o.attrs = o.attrs || {};\\r\\n var attrs = o.attrs,\\r\\n pow = Math.pow,\\r\\n opacity,\\r\\n oindex,\\r\\n type = \\\"linear\\\",\\r\\n fxfy = \\\".5 .5\\\";\\r\\n o.attrs.gradient = gradient;\\r\\n gradient = Str(gradient).replace(R._radial_gradient, function (all, fx, fy) {\\r\\n type = \\\"radial\\\";\\r\\n if (fx && fy) {\\r\\n fx = toFloat(fx);\\r\\n fy = toFloat(fy);\\r\\n pow(fx - .5, 2) + pow(fy - .5, 2) > .25 && (fy = math.sqrt(.25 - pow(fx - .5, 2)) * ((fy > .5) * 2 - 1) + .5);\\r\\n fxfy = fx + S + fy;\\r\\n }\\r\\n return E;\\r\\n });\\r\\n gradient = gradient.split(/\\\\s*\\\\-\\\\s*/);\\r\\n if (type == \\\"linear\\\") {\\r\\n var angle = gradient.shift();\\r\\n angle = -toFloat(angle);\\r\\n if (isNaN(angle)) {\\r\\n return null;\\r\\n }\\r\\n }\\r\\n var dots = R._parseDots(gradient);\\r\\n if (!dots) {\\r\\n return null;\\r\\n }\\r\\n o = o.shape || o.node;\\r\\n if (dots.length) {\\r\\n o.removeChild(fill);\\r\\n fill.on = true;\\r\\n fill.method = \\\"none\\\";\\r\\n fill.color = dots[0].color;\\r\\n fill.color2 = dots[dots.length - 1].color;\\r\\n var clrs = [];\\r\\n for (var i = 0, ii = dots.length; i < ii; i++) {\\r\\n dots[i].offset && clrs.push(dots[i].offset + S + dots[i].color);\\r\\n }\\r\\n fill.colors = clrs.length ? clrs.join() : \\\"0% \\\" + fill.color;\\r\\n if (type == \\\"radial\\\") {\\r\\n fill.type = \\\"gradientTitle\\\";\\r\\n fill.focus = \\\"100%\\\";\\r\\n fill.focussize = \\\"0 0\\\";\\r\\n fill.focusposition = fxfy;\\r\\n fill.angle = 0;\\r\\n } else {\\r\\n // fill.rotate= true;\\r\\n fill.type = \\\"gradient\\\";\\r\\n fill.angle = (270 - angle) % 360;\\r\\n }\\r\\n o.appendChild(fill);\\r\\n }\\r\\n return 1;\\r\\n },\\r\\n Element = function (node, vml) {\\r\\n this[0] = this.node = node;\\r\\n node.raphael = true;\\r\\n this.id = R._oid++;\\r\\n node.raphaelid = this.id;\\r\\n this.X = 0;\\r\\n this.Y = 0;\\r\\n this.attrs = {};\\r\\n this.paper = vml;\\r\\n this.matrix = R.matrix();\\r\\n this._ = {\\r\\n transform: [],\\r\\n sx: 1,\\r\\n sy: 1,\\r\\n dx: 0,\\r\\n dy: 0,\\r\\n deg: 0,\\r\\n dirty: 1,\\r\\n dirtyT: 1\\r\\n };\\r\\n !vml.bottom && (vml.bottom = this);\\r\\n this.prev = vml.top;\\r\\n vml.top && (vml.top.next = this);\\r\\n vml.top = this;\\r\\n this.next = null;\\r\\n };\\r\\n var elproto = R.el;\\r\\n\\r\\n Element.prototype = elproto;\\r\\n elproto.constructor = Element;\\r\\n elproto.transform = function (tstr) {\\r\\n if (tstr == null) {\\r\\n return this._.transform;\\r\\n }\\r\\n var vbs = this.paper._viewBoxShift,\\r\\n vbt = vbs ? \\\"s\\\" + [vbs.scale, vbs.scale] + \\\"-1-1t\\\" + [vbs.dx, vbs.dy] : E,\\r\\n oldt;\\r\\n if (vbs) {\\r\\n oldt = tstr = Str(tstr).replace(/\\\\.{3}|\\\\u2026/g, this._.transform || E);\\r\\n }\\r\\n R._extractTransform(this, vbt + tstr);\\r\\n var matrix = this.matrix.clone(),\\r\\n skew = this.skew,\\r\\n o = this.node,\\r\\n split,\\r\\n isGrad = ~Str(this.attrs.fill).indexOf(\\\"-\\\"),\\r\\n isPatt = !Str(this.attrs.fill).indexOf(\\\"url(\\\");\\r\\n matrix.translate(1, 1);\\r\\n if (isPatt || isGrad || this.type == \\\"image\\\") {\\r\\n skew.matrix = \\\"1 0 0 1\\\";\\r\\n skew.offset = \\\"0 0\\\";\\r\\n split = matrix.split();\\r\\n if ((isGrad && split.noRotation) || !split.isSimple) {\\r\\n o.style.filter = matrix.toFilter();\\r\\n var bb = this.getBBox(),\\r\\n bbt = this.getBBox(1),\\r\\n dx = bb.x - bbt.x,\\r\\n dy = bb.y - bbt.y;\\r\\n o.coordorigin = (dx * -zoom) + S + (dy * -zoom);\\r\\n setCoords(this, 1, 1, dx, dy, 0);\\r\\n } else {\\r\\n o.style.filter = E;\\r\\n setCoords(this, split.scalex, split.scaley, split.dx, split.dy, split.rotate);\\r\\n }\\r\\n } else {\\r\\n o.style.filter = E;\\r\\n skew.matrix = Str(matrix);\\r\\n skew.offset = matrix.offset();\\r\\n }\\r\\n if (oldt !== null) { // empty string value is true as well\\r\\n this._.transform = oldt;\\r\\n R._extractTransform(this, oldt);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n elproto.rotate = function (deg, cx, cy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (deg == null) {\\r\\n return;\\r\\n }\\r\\n deg = Str(deg).split(separator);\\r\\n if (deg.length - 1) {\\r\\n cx = toFloat(deg[1]);\\r\\n cy = toFloat(deg[2]);\\r\\n }\\r\\n deg = toFloat(deg[0]);\\r\\n (cy == null) && (cx = cy);\\r\\n if (cx == null || cy == null) {\\r\\n var bbox = this.getBBox(1);\\r\\n cx = bbox.x + bbox.width / 2;\\r\\n cy = bbox.y + bbox.height / 2;\\r\\n }\\r\\n this._.dirtyT = 1;\\r\\n this.transform(this._.transform.concat([[\\\"r\\\", deg, cx, cy]]));\\r\\n return this;\\r\\n };\\r\\n elproto.translate = function (dx, dy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n dx = Str(dx).split(separator);\\r\\n if (dx.length - 1) {\\r\\n dy = toFloat(dx[1]);\\r\\n }\\r\\n dx = toFloat(dx[0]) || 0;\\r\\n dy = +dy || 0;\\r\\n if (this._.bbox) {\\r\\n this._.bbox.x += dx;\\r\\n this._.bbox.y += dy;\\r\\n }\\r\\n this.transform(this._.transform.concat([[\\\"t\\\", dx, dy]]));\\r\\n return this;\\r\\n };\\r\\n elproto.scale = function (sx, sy, cx, cy) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n sx = Str(sx).split(separator);\\r\\n if (sx.length - 1) {\\r\\n sy = toFloat(sx[1]);\\r\\n cx = toFloat(sx[2]);\\r\\n cy = toFloat(sx[3]);\\r\\n isNaN(cx) && (cx = null);\\r\\n isNaN(cy) && (cy = null);\\r\\n }\\r\\n sx = toFloat(sx[0]);\\r\\n (sy == null) && (sy = sx);\\r\\n (cy == null) && (cx = cy);\\r\\n if (cx == null || cy == null) {\\r\\n var bbox = this.getBBox(1);\\r\\n }\\r\\n cx = cx == null ? bbox.x + bbox.width / 2 : cx;\\r\\n cy = cy == null ? bbox.y + bbox.height / 2 : cy;\\r\\n\\r\\n this.transform(this._.transform.concat([[\\\"s\\\", sx, sy, cx, cy]]));\\r\\n this._.dirtyT = 1;\\r\\n return this;\\r\\n };\\r\\n elproto.hide = function () {\\r\\n !this.removed && (this.node.style.display = \\\"none\\\");\\r\\n return this;\\r\\n };\\r\\n elproto.show = function () {\\r\\n !this.removed && (this.node.style.display = E);\\r\\n return this;\\r\\n };\\r\\n // Needed to fix the vml setViewBox issues\\r\\n elproto.auxGetBBox = R.el.getBBox;\\r\\n elproto.getBBox = function(){\\r\\n var b = this.auxGetBBox();\\r\\n if (this.paper && this.paper._viewBoxShift)\\r\\n {\\r\\n var c = {};\\r\\n var z = 1/this.paper._viewBoxShift.scale;\\r\\n c.x = b.x - this.paper._viewBoxShift.dx;\\r\\n c.x *= z;\\r\\n c.y = b.y - this.paper._viewBoxShift.dy;\\r\\n c.y *= z;\\r\\n c.width = b.width * z;\\r\\n c.height = b.height * z;\\r\\n c.x2 = c.x + c.width;\\r\\n c.y2 = c.y + c.height;\\r\\n return c;\\r\\n }\\r\\n return b;\\r\\n };\\r\\n elproto._getBBox = function () {\\r\\n if (this.removed) {\\r\\n return {};\\r\\n }\\r\\n return {\\r\\n x: this.X + (this.bbx || 0) - this.W / 2,\\r\\n y: this.Y - this.H,\\r\\n width: this.W,\\r\\n height: this.H\\r\\n };\\r\\n };\\r\\n elproto.remove = function () {\\r\\n if (this.removed || !this.node.parentNode) {\\r\\n return;\\r\\n }\\r\\n this.paper.__set__ && this.paper.__set__.exclude(this);\\r\\n R.eve.unbind(\\\"raphael.*.*.\\\" + this.id);\\r\\n R._tear(this, this.paper);\\r\\n this.node.parentNode.removeChild(this.node);\\r\\n this.shape && this.shape.parentNode.removeChild(this.shape);\\r\\n for (var i in this) {\\r\\n this[i] = typeof this[i] == \\\"function\\\" ? R._removedFactory(i) : null;\\r\\n }\\r\\n this.removed = true;\\r\\n };\\r\\n elproto.attr = function (name, value) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (name == null) {\\r\\n var res = {};\\r\\n for (var a in this.attrs) if (this.attrs[has](a)) {\\r\\n res[a] = this.attrs[a];\\r\\n }\\r\\n res.gradient && res.fill == \\\"none\\\" && (res.fill = res.gradient) && delete res.gradient;\\r\\n res.transform = this._.transform;\\r\\n return res;\\r\\n }\\r\\n if (value == null && R.is(name, \\\"string\\\")) {\\r\\n if (name == fillString && this.attrs.fill == \\\"none\\\" && this.attrs.gradient) {\\r\\n return this.attrs.gradient;\\r\\n }\\r\\n var names = name.split(separator),\\r\\n out = {};\\r\\n for (var i = 0, ii = names.length; i < ii; i++) {\\r\\n name = names[i];\\r\\n if (name in this.attrs) {\\r\\n out[name] = this.attrs[name];\\r\\n } else if (R.is(this.paper.customAttributes[name], \\\"function\\\")) {\\r\\n out[name] = this.paper.customAttributes[name].def;\\r\\n } else {\\r\\n out[name] = R._availableAttrs[name];\\r\\n }\\r\\n }\\r\\n return ii - 1 ? out : out[names[0]];\\r\\n }\\r\\n if (this.attrs && value == null && R.is(name, \\\"array\\\")) {\\r\\n out = {};\\r\\n for (i = 0, ii = name.length; i < ii; i++) {\\r\\n out[name[i]] = this.attr(name[i]);\\r\\n }\\r\\n return out;\\r\\n }\\r\\n var params;\\r\\n if (value != null) {\\r\\n params = {};\\r\\n params[name] = value;\\r\\n }\\r\\n value == null && R.is(name, \\\"object\\\") && (params = name);\\r\\n for (var key in params) {\\r\\n eve(\\\"raphael.attr.\\\" + key + \\\".\\\" + this.id, this, params[key]);\\r\\n }\\r\\n if (params) {\\r\\n for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], \\\"function\\\")) {\\r\\n var par = this.paper.customAttributes[key].apply(this, [].concat(params[key]));\\r\\n this.attrs[key] = params[key];\\r\\n for (var subkey in par) if (par[has](subkey)) {\\r\\n params[subkey] = par[subkey];\\r\\n }\\r\\n }\\r\\n // this.paper.canvas.style.display = \\\"none\\\";\\r\\n if (params.text && this.type == \\\"text\\\") {\\r\\n this.textpath.string = params.text;\\r\\n }\\r\\n setFillAndStroke(this, params);\\r\\n // this.paper.canvas.style.display = E;\\r\\n }\\r\\n return this;\\r\\n };\\r\\n elproto.toFront = function () {\\r\\n !this.removed && this.node.parentNode.appendChild(this.node);\\r\\n this.paper && this.paper.top != this && R._tofront(this, this.paper);\\r\\n return this;\\r\\n };\\r\\n elproto.toBack = function () {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (this.node.parentNode.firstChild != this.node) {\\r\\n this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild);\\r\\n R._toback(this, this.paper);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n elproto.insertAfter = function (element) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (element.constructor == R.st.constructor) {\\r\\n element = element[element.length - 1];\\r\\n }\\r\\n if (element.node.nextSibling) {\\r\\n element.node.parentNode.insertBefore(this.node, element.node.nextSibling);\\r\\n } else {\\r\\n element.node.parentNode.appendChild(this.node);\\r\\n }\\r\\n R._insertafter(this, element, this.paper);\\r\\n return this;\\r\\n };\\r\\n elproto.insertBefore = function (element) {\\r\\n if (this.removed) {\\r\\n return this;\\r\\n }\\r\\n if (element.constructor == R.st.constructor) {\\r\\n element = element[0];\\r\\n }\\r\\n element.node.parentNode.insertBefore(this.node, element.node);\\r\\n R._insertbefore(this, element, this.paper);\\r\\n return this;\\r\\n };\\r\\n elproto.blur = function (size) {\\r\\n var s = this.node.runtimeStyle,\\r\\n f = s.filter;\\r\\n f = f.replace(blurregexp, E);\\r\\n if (+size !== 0) {\\r\\n this.attrs.blur = size;\\r\\n s.filter = f + S + ms + \\\".Blur(pixelradius=\\\" + (+size || 1.5) + \\\")\\\";\\r\\n s.margin = R.format(\\\"-{0}px 0 0 -{0}px\\\", round(+size || 1.5));\\r\\n } else {\\r\\n s.filter = f;\\r\\n s.margin = 0;\\r\\n delete this.attrs.blur;\\r\\n }\\r\\n return this;\\r\\n };\\r\\n\\r\\n R._engine.path = function (pathString, vml) {\\r\\n var el = createNode(\\\"shape\\\");\\r\\n el.style.cssText = cssDot;\\r\\n el.coordsize = zoom + S + zoom;\\r\\n el.coordorigin = vml.coordorigin;\\r\\n var p = new Element(el, vml),\\r\\n attr = {fill: \\\"none\\\", stroke: \\\"#000\\\"};\\r\\n pathString && (attr.path = pathString);\\r\\n p.type = \\\"path\\\";\\r\\n p.path = [];\\r\\n p.Path = E;\\r\\n setFillAndStroke(p, attr);\\r\\n vml.canvas.appendChild(el);\\r\\n var skew = createNode(\\\"skew\\\");\\r\\n skew.on = true;\\r\\n el.appendChild(skew);\\r\\n p.skew = skew;\\r\\n p.transform(E);\\r\\n return p;\\r\\n };\\r\\n R._engine.rect = function (vml, x, y, w, h, r) {\\r\\n var path = R._rectPath(x, y, w, h, r),\\r\\n res = vml.path(path),\\r\\n a = res.attrs;\\r\\n res.X = a.x = x;\\r\\n res.Y = a.y = y;\\r\\n res.W = a.width = w;\\r\\n res.H = a.height = h;\\r\\n a.r = r;\\r\\n a.path = path;\\r\\n res.type = \\\"rect\\\";\\r\\n return res;\\r\\n };\\r\\n R._engine.ellipse = function (vml, x, y, rx, ry) {\\r\\n var res = vml.path(),\\r\\n a = res.attrs;\\r\\n res.X = x - rx;\\r\\n res.Y = y - ry;\\r\\n res.W = rx * 2;\\r\\n res.H = ry * 2;\\r\\n res.type = \\\"ellipse\\\";\\r\\n setFillAndStroke(res, {\\r\\n cx: x,\\r\\n cy: y,\\r\\n rx: rx,\\r\\n ry: ry\\r\\n });\\r\\n return res;\\r\\n };\\r\\n R._engine.circle = function (vml, x, y, r) {\\r\\n var res = vml.path(),\\r\\n a = res.attrs;\\r\\n res.X = x - r;\\r\\n res.Y = y - r;\\r\\n res.W = res.H = r * 2;\\r\\n res.type = \\\"circle\\\";\\r\\n setFillAndStroke(res, {\\r\\n cx: x,\\r\\n cy: y,\\r\\n r: r\\r\\n });\\r\\n return res;\\r\\n };\\r\\n R._engine.image = function (vml, src, x, y, w, h) {\\r\\n var path = R._rectPath(x, y, w, h),\\r\\n res = vml.path(path).attr({stroke: \\\"none\\\"}),\\r\\n a = res.attrs,\\r\\n node = res.node,\\r\\n fill = node.getElementsByTagName(fillString)[0];\\r\\n a.src = src;\\r\\n res.X = a.x = x;\\r\\n res.Y = a.y = y;\\r\\n res.W = a.width = w;\\r\\n res.H = a.height = h;\\r\\n a.path = path;\\r\\n res.type = \\\"image\\\";\\r\\n fill.parentNode == node && node.removeChild(fill);\\r\\n fill.rotate = true;\\r\\n fill.src = src;\\r\\n fill.type = \\\"tile\\\";\\r\\n res._.fillpos = [x, y];\\r\\n res._.fillsize = [w, h];\\r\\n node.appendChild(fill);\\r\\n setCoords(res, 1, 1, 0, 0, 0);\\r\\n return res;\\r\\n };\\r\\n R._engine.text = function (vml, x, y, text) {\\r\\n var el = createNode(\\\"shape\\\"),\\r\\n path = createNode(\\\"path\\\"),\\r\\n o = createNode(\\\"textpath\\\");\\r\\n x = x || 0;\\r\\n y = y || 0;\\r\\n text = text || \\\"\\\";\\r\\n path.v = R.format(\\\"m{0},{1}l{2},{1}\\\", round(x * zoom), round(y * zoom), round(x * zoom) + 1);\\r\\n path.textpathok = true;\\r\\n o.string = Str(text);\\r\\n o.on = true;\\r\\n el.style.cssText = cssDot;\\r\\n el.coordsize = zoom + S + zoom;\\r\\n el.coordorigin = \\\"0 0\\\";\\r\\n var p = new Element(el, vml),\\r\\n attr = {\\r\\n fill: \\\"#000\\\",\\r\\n stroke: \\\"none\\\",\\r\\n font: R._availableAttrs.font,\\r\\n text: text\\r\\n };\\r\\n p.shape = el;\\r\\n p.path = path;\\r\\n p.textpath = o;\\r\\n p.type = \\\"text\\\";\\r\\n p.attrs.text = Str(text);\\r\\n p.attrs.x = x;\\r\\n p.attrs.y = y;\\r\\n p.attrs.w = 1;\\r\\n p.attrs.h = 1;\\r\\n setFillAndStroke(p, attr);\\r\\n el.appendChild(o);\\r\\n el.appendChild(path);\\r\\n vml.canvas.appendChild(el);\\r\\n var skew = createNode(\\\"skew\\\");\\r\\n skew.on = true;\\r\\n el.appendChild(skew);\\r\\n p.skew = skew;\\r\\n p.transform(E);\\r\\n return p;\\r\\n };\\r\\n R._engine.setSize = function (width, height) {\\r\\n var cs = this.canvas.style;\\r\\n this.width = width;\\r\\n this.height = height;\\r\\n width == +width && (width += \\\"px\\\");\\r\\n height == +height && (height += \\\"px\\\");\\r\\n cs.width = width;\\r\\n cs.height = height;\\r\\n cs.clip = \\\"rect(0 \\\" + width + \\\" \\\" + height + \\\" 0)\\\";\\r\\n if (this._viewBox) {\\r\\n R._engine.setViewBox.apply(this, this._viewBox);\\r\\n }\\r\\n return this;\\r\\n };\\r\\n R._engine.setViewBox = function (x, y, w, h, fit) {\\r\\n R.eve(\\\"raphael.setViewBox\\\", this, this._viewBox, [x, y, w, h, fit]);\\r\\n var paperSize = this.getSize(),\\r\\n width = paperSize.width,\\r\\n height = paperSize.height,\\r\\n H, W;\\r\\n if (fit) {\\r\\n H = height / h;\\r\\n W = width / w;\\r\\n if (w * H < width) {\\r\\n x -= (width - w * H) / 2 / H;\\r\\n }\\r\\n if (h * W < height) {\\r\\n y -= (height - h * W) / 2 / W;\\r\\n }\\r\\n }\\r\\n this._viewBox = [x, y, w, h, !!fit];\\r\\n this._viewBoxShift = {\\r\\n dx: -x,\\r\\n dy: -y,\\r\\n scale: paperSize\\r\\n };\\r\\n this.forEach(function (el) {\\r\\n el.transform(\\\"...\\\");\\r\\n });\\r\\n return this;\\r\\n };\\r\\n var createNode;\\r\\n R._engine.initWin = function (win) {\\r\\n var doc = win.document;\\r\\n if (doc.styleSheets.length < 31) {\\r\\n doc.createStyleSheet().addRule(\\\".rvml\\\", \\\"behavior:url(#default#VML)\\\");\\r\\n } else {\\r\\n // no more room, add to the existing one\\r\\n // http://msdn.microsoft.com/en-us/library/ms531194%28VS.85%29.aspx\\r\\n doc.styleSheets[0].addRule(\\\".rvml\\\", \\\"behavior:url(#default#VML)\\\");\\r\\n }\\r\\n try {\\r\\n !doc.namespaces.rvml && doc.namespaces.add(\\\"rvml\\\", \\\"urn:schemas-microsoft-com:vml\\\");\\r\\n createNode = function (tagName) {\\r\\n return doc.createElement('<rvml:' + tagName + ' class=\\\"rvml\\\">');\\r\\n };\\r\\n } catch (e) {\\r\\n createNode = function (tagName) {\\r\\n return doc.createElement('<' + tagName + ' xmlns=\\\"urn:schemas-microsoft.com:vml\\\" class=\\\"rvml\\\">');\\r\\n };\\r\\n }\\r\\n };\\r\\n R._engine.initWin(R._g.win);\\r\\n R._engine.create = function () {\\r\\n var con = R._getContainer.apply(0, arguments),\\r\\n container = con.container,\\r\\n height = con.height,\\r\\n s,\\r\\n width = con.width,\\r\\n x = con.x,\\r\\n y = con.y;\\r\\n if (!container) {\\r\\n throw new Error(\\\"VML container not found.\\\");\\r\\n }\\r\\n var res = new R._Paper,\\r\\n c = res.canvas = R._g.doc.createElement(\\\"div\\\"),\\r\\n cs = c.style;\\r\\n x = x || 0;\\r\\n y = y || 0;\\r\\n width = width || 512;\\r\\n height = height || 342;\\r\\n res.width = width;\\r\\n res.height = height;\\r\\n width == +width && (width += \\\"px\\\");\\r\\n height == +height && (height += \\\"px\\\");\\r\\n res.coordsize = zoom * 1e3 + S + zoom * 1e3;\\r\\n res.coordorigin = \\\"0 0\\\";\\r\\n res.span = R._g.doc.createElement(\\\"span\\\");\\r\\n res.span.style.cssText = \\\"position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;\\\";\\r\\n c.appendChild(res.span);\\r\\n cs.cssText = R.format(\\\"top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden\\\", width, height);\\r\\n if (container == 1) {\\r\\n R._g.doc.body.appendChild(c);\\r\\n cs.left = x + \\\"px\\\";\\r\\n cs.top = y + \\\"px\\\";\\r\\n cs.position = \\\"absolute\\\";\\r\\n } else {\\r\\n if (container.firstChild) {\\r\\n container.insertBefore(c, container.firstChild);\\r\\n } else {\\r\\n container.appendChild(c);\\r\\n }\\r\\n }\\r\\n res.renderfix = function () {};\\r\\n return res;\\r\\n };\\r\\n R.prototype.clear = function () {\\r\\n R.eve(\\\"raphael.clear\\\", this);\\r\\n this.canvas.innerHTML = E;\\r\\n this.span = R._g.doc.createElement(\\\"span\\\");\\r\\n this.span.style.cssText = \\\"position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;\\\";\\r\\n this.canvas.appendChild(this.span);\\r\\n this.bottom = this.top = null;\\r\\n };\\r\\n R.prototype.remove = function () {\\r\\n R.eve(\\\"raphael.remove\\\", this);\\r\\n this.canvas.parentNode.removeChild(this.canvas);\\r\\n for (var i in this) {\\r\\n this[i] = typeof this[i] == \\\"function\\\" ? R._removedFactory(i) : null;\\r\\n }\\r\\n return true;\\r\\n };\\r\\n\\r\\n var setproto = R.st;\\r\\n for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) {\\r\\n setproto[method] = (function (methodname) {\\r\\n return function () {\\r\\n var arg = arguments;\\r\\n return this.forEach(function (el) {\\r\\n el[methodname].apply(el, arg);\\r\\n });\\r\\n };\\r\\n })(method);\\r\\n }\\r\\n}));\\r\\n\\r\\n// ┌────────────────────────────────────────────────────────────────────┐ \\\\\\\\\\r\\n// │ Raphaël @VERSION - JavaScript Vector Library │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Copyright © 2008-2012 Dmitry Baranovskiy (http://raphaeljs.com) │ \\\\\\\\\\r\\n// │ Copyright © 2008-2012 Sencha Labs (http://sencha.com) │ \\\\\\\\\\r\\n// ├────────────────────────────────────────────────────────────────────┤ \\\\\\\\\\r\\n// │ Licensed under the MIT (http://raphaeljs.com/license.html) license.│ \\\\\\\\\\r\\n// └────────────────────────────────────────────────────────────────────┘ \\\\\\\\\\r\\n\\r\\n(function (glob, factory) {\\r\\n if (typeof define === \\\"function\\\" && define.amd) {\\r\\n define(\\\"raphael\\\", [\\\"raphael.core\\\", \\\"raphael.svg\\\", \\\"raphael.vml\\\"], function(Raphael) {\\r\\n return (glob.Raphael = factory(Raphael));\\r\\n });\\r\\n } else if (typeof exports === \\\"object\\\") {\\r\\n var raphael = require(\\\"raphael.core\\\");\\r\\n\\r\\n require(\\\"raphael.svg\\\");\\r\\n require(\\\"raphael.vml\\\");\\r\\n\\r\\n module.exports = factory(raphael);\\r\\n } else {\\r\\n glob.Raphael = factory(glob.Raphael);\\r\\n }\\r\\n}(this, function (Raphael) {\\r\\n return Raphael.ninja();\\r\\n}));\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n\\r\\n/**\\r\\n * FRaphael\\r\\n * \\tAn extension for Raphael.js to make it easier to work with Filter Effects\\r\\n *\\r\\n * Copyright © 2013 Chris Scott <chris.scott@factmint.com>\\r\\n * Delivered with and licensed under the MIT licence\\r\\n *\\r\\n */\\r\\n\\r\\n// Create the global FRaphael object\\r\\n(function(scope) {\\r\\n var\\tversion = \\\"0.0.1\\\",\\r\\n license = \\\"MIT\\\";\\r\\n\\r\\n var\\tns = \\\"http://www.w3.org/2000/svg\\\",\\r\\n idCounter = 0;\\r\\n\\r\\n var FR = {\\r\\n // Object prototype for a filter\\r\\n Filter: function(id) {\\r\\n if (id == undefined) {\\r\\n id = \\\"filter-\\\" + idCounter++;\\r\\n while(FR.filters[id] != undefined) {\\r\\n id = \\\"filter-\\\" + idCounter++;\\r\\n }\\r\\n }\\r\\n\\r\\n if (FR.filters[id] != undefined) {\\r\\n throw \\\"A filter with id \\\" + id + \\\" already exists\\\";\\r\\n }\\r\\n\\r\\n this.element = document.createElementNS(ns, \\\"filter\\\");\\r\\n this.element.setAttribute(\\\"id\\\", id);\\r\\n this.element.setAttribute(\\\"x\\\", \\\"-25%\\\");\\r\\n this.element.setAttribute(\\\"y\\\", \\\"-25%\\\");\\r\\n this.element.setAttribute(\\\"width\\\", \\\"150%\\\");\\r\\n this.element.setAttribute(\\\"height\\\", \\\"150%\\\");\\r\\n\\r\\n this.lastFEResult = null;\\r\\n\\r\\n FR.filters[id] = this;\\r\\n this.id = id;\\r\\n },\\r\\n\\r\\n // Object prototype for an effect\\r\\n FilterEffect: function(type, attributes) {\\r\\n this.element = document.createElementNS(ns, type);\\r\\n for (var key in attributes) {\\r\\n this.element.setAttribute(key, attributes[key]);\\r\\n }\\r\\n },\\r\\n\\r\\n // Return the filter applied to an element or a new filter if none are currently applied\\r\\n getFilter: function(element) {\\r\\n var filterId = element.data(\\\"filterId\\\");\\r\\n var filter = null;\\r\\n\\r\\n if (filterId == undefined) {\\r\\n filterId = \\\"element-filter-\\\" + element.id;\\r\\n filter = element.paper.createFilter(filterId);\\r\\n element.filter(filterId);\\r\\n } else {\\r\\n filter = FR.filters[filterId];\\r\\n }\\r\\n\\r\\n return filter;\\r\\n },\\r\\n\\r\\n // maintain a list of filters by id\\r\\n filters: {}\\r\\n };\\r\\n\\r\\n FR.Filter.prototype = {\\r\\n addEffect: function(type, attributes, children) {\\r\\n var effect = new FR.FilterEffect(type, attributes);\\r\\n\\r\\n if (children) {\\r\\n if (children instanceof Array) {\\r\\n for (var x in children) {\\r\\n if (!children.hasOwnProperty(x)) continue;\\r\\n\\r\\n effect.element.appendChild(children[x].element);\\r\\n }\\r\\n } else {\\r\\n effect.element.appendChild(children.element);\\r\\n }\\r\\n }\\r\\n\\r\\n this.element.appendChild(effect.element);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n chainEffect: function(type, attributes, children) {\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n var inId;\\r\\n var outId;\\r\\n if (attributes.in == undefined) {\\r\\n inId = this.getLastResult();\\r\\n } else {\\r\\n inId = attributes.in;\\r\\n }\\r\\n if (attributes.result == undefined) {\\r\\n outId = idCounter++;\\r\\n } else {\\r\\n outId = attributes.result;\\r\\n }\\r\\n\\r\\n this.lastFEResult = outId;\\r\\n\\r\\n attributes.in = inId;\\r\\n attributes.result = outId;\\r\\n\\r\\n this.addEffect(type, attributes, children);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n getLastResult: function() {\\r\\n return (this.lastFEResult == undefined) ? \\\"SourceGraphic\\\" : this.lastFEResult;\\r\\n },\\r\\n\\r\\n merge: function(in1, in2, attributes) {\\r\\n var mergeNode1 = new FR.FilterEffect(\\\"feMergeNode\\\", {\\r\\n in: in1\\r\\n });\\r\\n var mergeNode2 = new FR.FilterEffect(\\\"feMergeNode\\\", {\\r\\n in: in2\\r\\n });\\r\\n\\r\\n this.chainEffect(\\\"feMerge\\\", attributes, [mergeNode1, mergeNode2]);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n compose: function(in1, in2, operator, attributes) {\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n if (operator == undefined) {\\r\\n operator = \\\"over\\\";\\r\\n }\\r\\n\\r\\n attributes.in = in1;\\r\\n attributes.in2 = in2;\\r\\n attributes.operator = operator;\\r\\n\\r\\n this.chainEffect(\\\"feComposite\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n arithmeticCompose: function(in1, in2, k1, k2, k3, k4) {\\r\\n if (k1 == undefined) {\\r\\n k1 = 0;\\r\\n }\\r\\n if (k2 == undefined) {\\r\\n k2 = 0;\\r\\n }\\r\\n if (k3 == undefined) {\\r\\n k3 = 0;\\r\\n }\\r\\n if (k4 == undefined) {\\r\\n k4 = 0;\\r\\n }\\r\\n\\r\\n this.compose(in1, in2, \\\"arithmetic\\\", {\\r\\n k1: k1,\\r\\n k2: k2,\\r\\n k3: k3,\\r\\n k4: k4\\r\\n });\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addBlur: function(stdDeviation, attributes) {\\r\\n if (!stdDeviation) {\\r\\n throw \\\"Standard deviation is required to perform a blur filter\\\";\\r\\n }\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n attributes.stdDeviation = stdDeviation;\\r\\n\\r\\n this.chainEffect(\\\"feGaussianBlur\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addOffset: function(dx, dy, attributes) {\\r\\n if (dx == undefined | dy == undefined) {\\r\\n throw \\\"dx and dy values are required to perform an offset FE\\\";\\r\\n }\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n attributes.dx = dx;\\r\\n attributes.dy = dy;\\r\\n\\r\\n this.chainEffect(\\\"feOffset\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addLighting: function(x, y, z, color, type, attributes) {\\r\\n if (x == undefined | y == undefined | z == undefined) {\\r\\n throw \\\"Three co-ordinates are required to create a light source\\\";\\r\\n }\\r\\n\\r\\n var previousResult = this.getLastResult();\\r\\n\\r\\n var id = idCounter++;\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n attributes.result = id;\\r\\n if (color != undefined) {\\r\\n attributes[\\\"lighting-color\\\"] = color;\\r\\n }\\r\\n\\r\\n if (type == undefined || type == \\\"diffuse\\\") {\\r\\n type = \\\"feDiffuseLighting\\\";\\r\\n } else if (type == \\\"specular\\\") {\\r\\n type = \\\"feSpecularLighting\\\";\\r\\n }\\r\\n\\r\\n var lightSource = new FR.FilterEffect(\\\"fePointLight\\\", {\\r\\n x: x,\\r\\n y: y,\\r\\n z: z\\r\\n });\\r\\n\\r\\n this.chainEffect(type, attributes, lightSource).arithmeticCompose(previousResult, id, 3, 0.2, 0, 0);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addShiftToColor: function(color, moveBy, attributes) {\\r\\n if (color == undefined) {\\r\\n throw \\\"A colour string is a required argument to create a colorMatrix\\\";\\r\\n }\\r\\n if (moveBy == undefined) {\\r\\n moveBy = 0.5;\\r\\n }\\r\\n\\r\\n var remainingColor = 1 - moveBy, x = remainingColor;\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n var colorObject = Raphael.color(color);\\r\\n var\\tr = colorObject.r * moveBy / 255,\\r\\n g = colorObject.g * moveBy / 255,\\r\\n b = colorObject.b * moveBy / 255;\\r\\n\\r\\n /**\\r\\n * r'\\tx 0 0 0 r\\t\\tr\\r\\n * g'\\t0 x 0 0 g\\t\\tg\\r\\n * b' =\\t0 0 x 0 b\\t.\\tb\\r\\n * a'\\t0 0 0 1 0\\t\\to\\r\\n * 1\\t\\t\\t\\t\\t1\\r\\n */\\r\\n attributes.values = x + \\\" 0 0 0 \\\" + r + \\\" 0 \\\" + x + \\\" 0 0 \\\" + g + \\\" 0 0 \\\" + x + \\\" 0 \\\" + b + \\\" 0 0 0 1 0 \\\";\\r\\n\\r\\n this.chainEffect(\\\"feColorMatrix\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addRecolor: function(color, opacity, attributes) {\\r\\n if (color == undefined) {\\r\\n throw \\\"A colour string is a required argument to create a colorMatrix\\\";\\r\\n }\\r\\n if (opacity == undefined) {\\r\\n opacity = 1;\\r\\n }\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n var colorObject = Raphael.color(color);\\r\\n var\\tr = colorObject.r / 255,\\r\\n g = colorObject.g / 255,\\r\\n b = colorObject.b / 255;\\r\\n\\r\\n /**\\r\\n * r'\\t0 0 0 0 r\\t\\tr\\r\\n * g'\\t0 0 0 0 g\\t\\tg\\r\\n * b' =\\t0 0 0 0 b\\t.\\tb\\r\\n * a'\\t0 0 0 a 0\\t\\ta\\r\\n * 1\\t\\t\\t\\t\\t1\\r\\n */\\r\\n attributes.values = \\\"0 0 0 0 \\\" + r + \\\" 0 0 0 0 \\\" + g + \\\" 0 0 0 0 \\\" + b + \\\" 0 0 0 \\\" + opacity + \\\" 0 \\\";\\r\\n\\r\\n this.chainEffect(\\\"feColorMatrix\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addDesaturate: function(saturation, attributes) {\\r\\n if (saturation == undefined) {\\r\\n saturnation = 0;\\r\\n }\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n attributes.values = saturation;\\r\\n attributes.type = \\\"saturate\\\";\\r\\n\\r\\n this.chainEffect(\\\"feColorMatrix\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n addConvolveMatrix: function(matrix, attributes) {\\r\\n if (matrix == undefined) {\\r\\n throw \\\"A matrix (usually 9 numbers) must be provided to apply a convolve matrix transform\\\";\\r\\n }\\r\\n\\r\\n if (attributes == undefined) {\\r\\n attributes = {};\\r\\n }\\r\\n\\r\\n attributes.kernelMatrix = matrix;\\r\\n\\r\\n this.chainEffect(\\\"feConvolveMatrix\\\", attributes);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n createShadow: function(dx, dy, blur, opacity, color) {\\r\\n if (dx == undefined) {\\r\\n throw \\\"dx is required for the shadow effect\\\";\\r\\n }\\r\\n if (dy == undefined) {\\r\\n throw \\\"dy is required for the shadow effect\\\";\\r\\n }\\r\\n if (blur == undefined) {\\r\\n throw \\\"blur (stdDeviation) is required for the shadow effect\\\";\\r\\n }\\r\\n\\r\\n if (opacity == undefined) {\\r\\n opacity = 0.6;\\r\\n }\\r\\n\\r\\n var previousResult = this.getLastResult();\\r\\n\\r\\n if (color == undefined) {\\r\\n color = \\\"#000000\\\";\\r\\n }\\r\\n\\r\\n this.addOffset(dx, dy, {\\r\\n in: \\\"SourceAlpha\\\"\\r\\n });\\r\\n\\r\\n this.addRecolor(color, opacity);\\r\\n\\r\\n this.addBlur(blur);\\r\\n\\r\\n this.merge(this.getLastResult(), previousResult);\\r\\n\\r\\n return this;\\r\\n },\\r\\n\\r\\n createEmboss: function(height, x, y, z) {\\r\\n if (height == undefined) {\\r\\n height = 2;\\r\\n }\\r\\n if (x == undefined) {\\r\\n x = -1000;\\r\\n }\\r\\n if (y == undefined) {\\r\\n y = -5000;\\r\\n }\\r\\n if (z == undefined) {\\r\\n z = 300;\\r\\n }\\r\\n\\r\\n // Create the highlight\\r\\n\\r\\n this.addOffset(height * x / (x + y), height * y / (x + y), {\\r\\n in: \\\"SourceAlpha\\\"\\r\\n });\\r\\n\\r\\n this.addBlur(height * 0.5);\\r\\n\\r\\n var whiteLightSource = new FR.FilterEffect(\\\"fePointLight\\\", {\\r\\n x: x,\\r\\n y: y,\\r\\n z: z\\r\\n });\\r\\n\\r\\n this.chainEffect(\\\"feSpecularLighting\\\", {\\r\\n surfaceScale: height,\\r\\n specularConstant: 0.8,\\r\\n specularExponent: 15\\r\\n }, whiteLightSource);\\r\\n\\r\\n this.compose(this.getLastResult(), \\\"SourceAlpha\\\", \\\"in\\\");\\r\\n var whiteLight = this.getLastResult();\\r\\n\\r\\n // Create the lowlight\\r\\n\\r\\n this.addOffset(height * -1 * x / (x + y), height * -1 * y / (x + y), {\\r\\n in: \\\"SourceAlpha\\\"\\r\\n });\\r\\n\\r\\n this.addBlur(height * 0.5);\\r\\n\\r\\n var darkLightSource = new FR.FilterEffect(\\\"fePointLight\\\", {\\r\\n x: -1 * x,\\r\\n y: -1 * y,\\r\\n z: z\\r\\n });\\r\\n\\r\\n this.chainEffect(\\\"feSpecularLighting\\\", {\\r\\n surfaceScale: height,\\r\\n specularConstant: 1.8,\\r\\n specularExponent: 6\\r\\n }, darkLightSource);\\r\\n\\r\\n this.compose(this.getLastResult(), \\\"SourceAlpha\\\", \\\"in\\\");\\r\\n this.chainEffect(\\\"feColorMatrix\\\", {\\r\\n values: \\\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0\\\"\\r\\n });\\r\\n var darkLight = this.getLastResult();\\r\\n\\r\\n this.arithmeticCompose(whiteLight, darkLight, 0, 0.8, 0.5, 0);\\r\\n\\r\\n this.merge(\\\"SourceGraphic\\\", this.getLastResult());\\r\\n\\r\\n return this;\\r\\n }\\r\\n };\\r\\n\\r\\n scope.FRaphael = FR;\\r\\n})(this);\\r\\n\\r\\n/**\\r\\n * add a filter to the paper by id\\r\\n */\\r\\nRaphael.fn.createFilter = function(id) {\\r\\n var paper = this;\\r\\n var filter = new FRaphael.Filter(id);\\r\\n paper.defs.appendChild(filter.element);\\r\\n\\r\\n return filter;\\r\\n};\\r\\n\\r\\n/**\\r\\n * Apply a filter to an element by id\\r\\n */\\r\\nRaphael.el.filter = function(filter) {\\r\\n var id = (filter instanceof FRaphael.Filter) ? filter.id : filter;\\r\\n\\r\\n this.node.setAttribute(\\\"filter\\\", \\\"url(#\\\" + id + \\\")\\\");\\r\\n this.data(\\\"filterId\\\", id);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * Get the current filter for an element or a new one if not\\r\\n */\\r\\nRaphael.el.getFilter = function() {\\r\\n return FRaphael.getFilter(this);\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for applying blur\\r\\n */\\r\\nRaphael.el.blur = function(stdDeviation) {\\r\\n if (stdDeviation == undefined) {\\r\\n stdDeviation = 3;\\r\\n }\\r\\n\\r\\n this.getFilter().addBlur(stdDeviation);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for applying a drop shadow\\r\\n */\\r\\nRaphael.el.shadow = function(dx, dy, blur, opacity, color) {\\r\\n if (dx == undefined) {\\r\\n dx = 3;\\r\\n }\\r\\n if (dy == undefined) {\\r\\n dy = 3;\\r\\n }\\r\\n if (blur == undefined) {\\r\\n blur = 3;\\r\\n }\\r\\n\\r\\n this.getFilter().createShadow(dx, dy, blur, opacity, color);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for applying lighting\\r\\n */\\r\\nRaphael.el.light = function(x, y, z, color, type) {\\r\\n if (x == undefined) {\\r\\n x = this.paper.width;\\r\\n }\\r\\n if (y == undefined) {\\r\\n y = 0;\\r\\n }\\r\\n if (z == undefined) {\\r\\n z = 20;\\r\\n }\\r\\n\\r\\n this.getFilter().addLighting(x, y, z, color, type);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for applying a colour shift\\r\\n */\\r\\nRaphael.el.colorShift = function(color, shift) {\\r\\n if (color == undefined) {\\r\\n color = \\\"black\\\";\\r\\n }\\r\\n if (shift == undefined) {\\r\\n shift = 0.5;\\r\\n }\\r\\n\\r\\n this.getFilter().addShiftToColor(color, shift);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for embossing\\r\\n */\\r\\nRaphael.el.emboss = function(height) {\\r\\n this.getFilter().createEmboss(height);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for desaturating\\r\\n */\\r\\nRaphael.el.desaturate = function(saturation) {\\r\\n this.getFilter().addDesaturate(saturation);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\\r\\n/**\\r\\n * A shorthand method for complete desaturation\\r\\n */\\r\\nRaphael.el.greyScale = function() {\\r\\n this.getFilter().addDesaturate(0);\\r\\n\\r\\n return this;\\r\\n};\\r\\n\"","/*\n\tBased on rgbcolor.js by Stoyan Stefanov <sstoo@gmail.com>\n\thttp://www.phpied.com/rgb-color-parser-in-javascript/\n*/\n\nmodule.exports = function(color_string) {\n this.ok = false;\n this.alpha = 1.0;\n\n // strip any leading #\n if (color_string.charAt(0) == '#') { // remove # if any\n color_string = color_string.substr(1,6);\n }\n\n color_string = color_string.replace(/ /g,'');\n color_string = color_string.toLowerCase();\n\n // before getting into regexps, try simple matches\n // and overwrite the input\n var simple_colors = {\n aliceblue: 'f0f8ff',\n antiquewhite: 'faebd7',\n aqua: '00ffff',\n aquamarine: '7fffd4',\n azure: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '000000',\n blanchedalmond: 'ffebcd',\n blue: '0000ff',\n blueviolet: '8a2be2',\n brown: 'a52a2a',\n burlywood: 'deb887',\n cadetblue: '5f9ea0',\n chartreuse: '7fff00',\n chocolate: 'd2691e',\n coral: 'ff7f50',\n cornflowerblue: '6495ed',\n cornsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: '00ffff',\n darkblue: '00008b',\n darkcyan: '008b8b',\n darkgoldenrod: 'b8860b',\n darkgray: 'a9a9a9',\n darkgreen: '006400',\n darkkhaki: 'bdb76b',\n darkmagenta: '8b008b',\n darkolivegreen: '556b2f',\n darkorange: 'ff8c00',\n darkorchid: '9932cc',\n darkred: '8b0000',\n darksalmon: 'e9967a',\n darkseagreen: '8fbc8f',\n darkslateblue: '483d8b',\n darkslategray: '2f4f4f',\n darkturquoise: '00ced1',\n darkviolet: '9400d3',\n deeppink: 'ff1493',\n deepskyblue: '00bfff',\n dimgray: '696969',\n dodgerblue: '1e90ff',\n feldspar: 'd19275',\n firebrick: 'b22222',\n floralwhite: 'fffaf0',\n forestgreen: '228b22',\n fuchsia: 'ff00ff',\n gainsboro: 'dcdcdc',\n ghostwhite: 'f8f8ff',\n gold: 'ffd700',\n goldenrod: 'daa520',\n gray: '808080',\n green: '008000',\n greenyellow: 'adff2f',\n honeydew: 'f0fff0',\n hotpink: 'ff69b4',\n indianred : 'cd5c5c',\n indigo : '4b0082',\n ivory: 'fffff0',\n khaki: 'f0e68c',\n lavender: 'e6e6fa',\n lavenderblush: 'fff0f5',\n lawngreen: '7cfc00',\n lemonchiffon: 'fffacd',\n lightblue: 'add8e6',\n lightcoral: 'f08080',\n lightcyan: 'e0ffff',\n lightgoldenrodyellow: 'fafad2',\n lightgrey: 'd3d3d3',\n lightgreen: '90ee90',\n lightpink: 'ffb6c1',\n lightsalmon: 'ffa07a',\n lightseagreen: '20b2aa',\n lightskyblue: '87cefa',\n lightslateblue: '8470ff',\n lightslategray: '778899',\n lightsteelblue: 'b0c4de',\n lightyellow: 'ffffe0',\n lime: '00ff00',\n limegreen: '32cd32',\n linen: 'faf0e6',\n magenta: 'ff00ff',\n maroon: '800000',\n mediumaquamarine: '66cdaa',\n mediumblue: '0000cd',\n mediumorchid: 'ba55d3',\n mediumpurple: '9370d8',\n mediumseagreen: '3cb371',\n mediumslateblue: '7b68ee',\n mediumspringgreen: '00fa9a',\n mediumturquoise: '48d1cc',\n mediumvioletred: 'c71585',\n midnightblue: '191970',\n mintcream: 'f5fffa',\n mistyrose: 'ffe4e1',\n moccasin: 'ffe4b5',\n navajowhite: 'ffdead',\n navy: '000080',\n oldlace: 'fdf5e6',\n olive: '808000',\n olivedrab: '6b8e23',\n orange: 'ffa500',\n orangered: 'ff4500',\n orchid: 'da70d6',\n palegoldenrod: 'eee8aa',\n palegreen: '98fb98',\n paleturquoise: 'afeeee',\n palevioletred: 'd87093',\n papayawhip: 'ffefd5',\n peachpuff: 'ffdab9',\n peru: 'cd853f',\n pink: 'ffc0cb',\n plum: 'dda0dd',\n powderblue: 'b0e0e6',\n purple: '800080',\n rebeccapurple: '663399',\n red: 'ff0000',\n rosybrown: 'bc8f8f',\n royalblue: '4169e1',\n saddlebrown: '8b4513',\n salmon: 'fa8072',\n sandybrown: 'f4a460',\n seagreen: '2e8b57',\n seashell: 'fff5ee',\n sienna: 'a0522d',\n silver: 'c0c0c0',\n skyblue: '87ceeb',\n slateblue: '6a5acd',\n slategray: '708090',\n snow: 'fffafa',\n springgreen: '00ff7f',\n steelblue: '4682b4',\n tan: 'd2b48c',\n teal: '008080',\n thistle: 'd8bfd8',\n tomato: 'ff6347',\n turquoise: '40e0d0',\n violet: 'ee82ee',\n violetred: 'd02090',\n wheat: 'f5deb3',\n white: 'ffffff',\n whitesmoke: 'f5f5f5',\n yellow: 'ffff00',\n yellowgreen: '9acd32'\n };\n color_string = simple_colors[color_string] || color_string;\n // emd of simple type-in colors\n\n // array of color definition objects\n var color_defs = [\n {\n re: /^rgba\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3}),\\s*((?:\\d?\\.)?\\d)\\)$/,\n example: ['rgba(123, 234, 45, 0.8)', 'rgba(255,234,245,1.0)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3]),\n parseFloat(bits[4])\n ];\n }\n },\n {\n re: /^rgb\\((\\d{1,3}),\\s*(\\d{1,3}),\\s*(\\d{1,3})\\)$/,\n example: ['rgb(123, 234, 45)', 'rgb(255,234,245)'],\n process: function (bits){\n return [\n parseInt(bits[1]),\n parseInt(bits[2]),\n parseInt(bits[3])\n ];\n }\n },\n {\n re: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,\n example: ['#00ff00', '336699'],\n process: function (bits){\n return [\n parseInt(bits[1], 16),\n parseInt(bits[2], 16),\n parseInt(bits[3], 16)\n ];\n }\n },\n {\n re: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,\n example: ['#fb0', 'f0f'],\n process: function (bits){\n return [\n parseInt(bits[1] + bits[1], 16),\n parseInt(bits[2] + bits[2], 16),\n parseInt(bits[3] + bits[3], 16)\n ];\n }\n }\n ];\n\n // search through the definitions to find a match\n for (var i = 0; i < color_defs.length; i++) {\n var re = color_defs[i].re;\n var processor = color_defs[i].process;\n var bits = re.exec(color_string);\n if (bits) {\n var channels = processor(bits);\n this.r = channels[0];\n this.g = channels[1];\n this.b = channels[2];\n if (channels.length > 3) {\n this.alpha = channels[3];\n }\n this.ok = true;\n }\n\n }\n\n // validate/cleanup values\n this.r = (this.r < 0 || isNaN(this.r)) ? 0 : ((this.r > 255) ? 255 : this.r);\n this.g = (this.g < 0 || isNaN(this.g)) ? 0 : ((this.g > 255) ? 255 : this.g);\n this.b = (this.b < 0 || isNaN(this.b)) ? 0 : ((this.b > 255) ? 255 : this.b);\n this.alpha = (this.alpha < 0) ? 0 : ((this.alpha > 1.0 || isNaN(this.alpha)) ? 1.0 : this.alpha);\n\n // some getters\n this.toRGB = function () {\n return 'rgb(' + this.r + ', ' + this.g + ', ' + this.b + ')';\n }\n this.toRGBA = function () {\n return 'rgba(' + this.r + ', ' + this.g + ', ' + this.b + ', ' + this.alpha + ')';\n }\n this.toHex = function () {\n var r = this.r.toString(16);\n var g = this.g.toString(16);\n var b = this.b.toString(16);\n if (r.length == 1) r = '0' + r;\n if (g.length == 1) g = '0' + g;\n if (b.length == 1) b = '0' + b;\n return '#' + r + g + b;\n }\n\n // help\n this.getHelpXML = function () {\n\n var examples = new Array();\n // add regexps\n for (var i = 0; i < color_defs.length; i++) {\n var example = color_defs[i].example;\n for (var j = 0; j < example.length; j++) {\n examples[examples.length] = example[j];\n }\n }\n // add type-in colors\n for (var sc in simple_colors) {\n examples[examples.length] = sc;\n }\n\n var xml = document.createElement('ul');\n xml.setAttribute('id', 'rgbcolor-examples');\n for (var i = 0; i < examples.length; i++) {\n try {\n var list_item = document.createElement('li');\n var list_color = new RGBColor(examples[i]);\n var example_div = document.createElement('div');\n example_div.style.cssText =\n 'margin: 3px; '\n + 'border: 1px solid black; '\n + 'background:' + list_color.toHex() + '; '\n + 'color:' + list_color.toHex()\n ;\n example_div.appendChild(document.createTextNode('test'));\n var list_item_value = document.createTextNode(\n ' ' + examples[i] + ' -> ' + list_color.toRGB() + ' -> ' + list_color.toHex()\n );\n list_item.appendChild(example_div);\n list_item.appendChild(list_item_value);\n xml.appendChild(list_item);\n\n } catch(e){}\n }\n return xml;\n\n }\n\n}\n","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\nmodule.exports = function(src) {\n\tfunction log(error) {\n\t\t(typeof console !== \"undefined\")\n\t\t&& (console.error || console.log)(\"[Script Loader]\", error);\n\t}\n\n\t// Check for IE =< 8\n\tfunction isIE() {\n\t\treturn typeof attachEvent !== \"undefined\" && typeof addEventListener === \"undefined\";\n\t}\n\n\ttry {\n\t\tif (typeof execScript !== \"undefined\" && isIE()) {\n\t\t\texecScript(src);\n\t\t} else if (typeof eval !== \"undefined\") {\n\t\t\teval.call(null, src);\n\t\t} else {\n\t\t\tlog(\"EvalError: No eval function available\");\n\t\t}\n\t} catch (error) {\n\t\tlog(error);\n\t}\n}\n","/*! For license information please see shifty.js.LICENSE.txt */\n!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(\"shifty\",[],t):\"object\"==typeof exports?exports.shifty=t():e.shifty=t()}(self,(function(){return function(){\"use strict\";var e={55:function(e,t,n){Object.defineProperty(t,\"__esModule\",{value:!0}),t.setBezierFunction=t.getCubicBezierTransition=void 0;const i=n(188);t.getCubicBezierTransition=(e=.25,t=.25,n=.75,i=.75)=>s=>function(e,t,n,i,s,r){let a=0,o=0,u=0,l=0,c=0,h=0;const p=e=>((a*e+o)*e+u)*e,d=e=>(3*a*e+2*o)*e+u,_=e=>e>=0?e:0-e;return u=3*t,o=3*(i-t)-u,a=1-u-o,h=3*n,c=3*(s-n)-h,l=1-h-c,f=e,g=(e=>1/(200*e))(r),(e=>((l*e+c)*e+h)*e)(((e,t)=>{let n,i,s,r,a,o;for(s=e,o=0;o<8;o++){if(r=p(s)-e,_(r)<t)return s;if(a=d(s),_(a)<1e-6)break;s-=r/a}if(n=0,i=1,s=e,s<n)return n;if(s>i)return i;for(;n<i;){if(r=p(s),_(r-e)<t)return s;e>r?n=s:i=s,s=.5*(i-n)+n}return s})(f,g));var f,g}(s,e,t,n,i,1),t.setBezierFunction=(e,n,s,r,a)=>{const o=(0,t.getCubicBezierTransition)(n,s,r,a);return o.displayName=e,o.x1=n,o.y1=s,o.x2=r,o.y2=a,i.Tweenable.easing[e]=o}},607:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!(\"get\"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),s=this&&this.__exportStar||function(e,t){for(var n in e)\"default\"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,\"__esModule\",{value:!0}),t.VERSION=t.standardEasingFunctions=t.setBezierFunction=t.Scene=t.interpolate=t.tween=t.Tweenable=t.shouldScheduleUpdate=t.processTweens=void 0;const r=n(188);Object.defineProperty(t,\"processTweens\",{enumerable:!0,get:function(){return r.processTweens}}),Object.defineProperty(t,\"shouldScheduleUpdate\",{enumerable:!0,get:function(){return r.shouldScheduleUpdate}}),Object.defineProperty(t,\"Tweenable\",{enumerable:!0,get:function(){return r.Tweenable}}),Object.defineProperty(t,\"tween\",{enumerable:!0,get:function(){return r.tween}});var a=n(166);Object.defineProperty(t,\"interpolate\",{enumerable:!0,get:function(){return a.interpolate}});var o=n(147);Object.defineProperty(t,\"Scene\",{enumerable:!0,get:function(){return o.Scene}});var u=n(55);Object.defineProperty(t,\"setBezierFunction\",{enumerable:!0,get:function(){return u.setBezierFunction}});var l=n(64);Object.defineProperty(t,\"standardEasingFunctions\",{enumerable:!0,get:function(){return l.standardEasingFunctions}}),s(n(699),t),t.VERSION=String(\"3.0.3\")},166:function(e,t,n){Object.defineProperty(t,\"__esModule\",{value:!0}),t.interpolate=void 0;const i=n(188),s=new i.Tweenable,{filters:r}=i.Tweenable;t.interpolate=(e,t,n,a=i.Tweenable.easing.linear,o=0)=>{const u=Object.assign({},e),l=(0,i.composeEasingObject)(e,a);s._filters.length=0,s.setState({}),s._currentState=u,s._originalState=e,s._targetState=t,s._easing=l;for(const e in r)r[e].doesApply(s)&&s._filters.push(r[e]);s._applyFilter(\"tweenCreated\"),s._applyFilter(\"beforeTween\");const c=(0,i.tweenProps)(n,u,e,t,1,o,l);return s._applyFilter(\"afterTween\"),c}},147:function(e,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.Scene=void 0,t.Scene=class{constructor(...e){this._tweenables=[],e.forEach(this.add.bind(this))}get tweenables(){return[...this._tweenables]}get promises(){return this._tweenables.map((e=>e.then()))}add(e){return this._tweenables.push(e),e}remove(e){const t=this._tweenables.indexOf(e);return t>-1&&this._tweenables.splice(t,1),e}empty(){return this.tweenables.map(this.remove.bind(this))}get isPlaying(){return this._tweenables.some((({isPlaying:e})=>e))}tween(){return this._tweenables.forEach((e=>e.tween())),this}pause(){return this._tweenables.forEach((e=>e.pause())),this}resume(){return this._tweenables.filter((({hasEnded:e})=>!e)).forEach((e=>e.resume())),this}stop(e){return this._tweenables.forEach((t=>t.stop(e))),this}}},64:function(e,t){Object.defineProperty(t,\"__esModule\",{value:!0}),t.standardEasingFunctions=void 0,t.standardEasingFunctions=Object.freeze({linear:e=>e,easeInQuad:e=>Math.pow(e,2),easeOutQuad:e=>-(Math.pow(e-1,2)-1),easeInOutQuad:e=>(e/=.5)<1?.5*Math.pow(e,2):-.5*((e-=2)*e-2),easeInCubic:e=>Math.pow(e,3),easeOutCubic:e=>Math.pow(e-1,3)+1,easeInOutCubic:e=>(e/=.5)<1?.5*Math.pow(e,3):.5*(Math.pow(e-2,3)+2),easeInQuart:e=>Math.pow(e,4),easeOutQuart:e=>-(Math.pow(e-1,4)-1),easeInOutQuart:e=>(e/=.5)<1?.5*Math.pow(e,4):-.5*((e-=2)*Math.pow(e,3)-2),easeInQuint:e=>Math.pow(e,5),easeOutQuint:e=>Math.pow(e-1,5)+1,easeInOutQuint:e=>(e/=.5)<1?.5*Math.pow(e,5):.5*(Math.pow(e-2,5)+2),easeInSine:e=>1-Math.cos(e*(Math.PI/2)),easeOutSine:e=>Math.sin(e*(Math.PI/2)),easeInOutSine:e=>-.5*(Math.cos(Math.PI*e)-1),easeInExpo:e=>0===e?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e)),easeInCirc:e=>-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeOutBounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,easeInBack:e=>{const t=1.70158;return e*e*((t+1)*e-t)},easeOutBack:e=>{const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},easeInOutBack:e=>{let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},elastic:e=>-1*Math.pow(4,-8*e)*Math.sin((6*e-1)*(2*Math.PI)/2)+1,swingFromTo:e=>{let t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},swingFrom:e=>{const t=1.70158;return e*e*((t+1)*e-t)},swingTo:e=>{const t=1.70158;return(e-=1)*e*((t+1)*e+t)+1},bounce:e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,bouncePast:e=>e<1/2.75?7.5625*e*e:e<2/2.75?2-(7.5625*(e-=1.5/2.75)*e+.75):e<2.5/2.75?2-(7.5625*(e-=2.25/2.75)*e+.9375):2-(7.5625*(e-=2.625/2.75)*e+.984375),easeFromTo:e=>(e/=.5)<1?.5*Math.pow(e,4):-.5*((e-=2)*Math.pow(e,3)-2),easeFrom:e=>Math.pow(e,4),easeTo:e=>Math.pow(e,.25)})},432:function(e,t,n){Object.defineProperty(t,\"__esModule\",{value:!0}),t.afterTween=t.beforeTween=t.tweenCreated=t.doesApply=void 0;const i=n(699),s=/(\\d|-|\\.)/,r=/([^\\-0-9.]+)/g,a=/[0-9.-]+/g,o=(()=>{const e=a.source,t=/,\\s*/.source;return new RegExp(`rgba?\\\\(${e}${t}${e}${t}${e}(${t}${e})?\\\\)`,\"g\")})(),u=/^.*\\(/,l=/#([0-9]|[a-f]){3,6}/gi,c=\"VAL\",h=(e,t)=>e.map(((e,n)=>`_${t}_${n}`)),p=e=>{let t=e.match(r);return t?(1===t.length||e.charAt(0).match(s))&&t.unshift(\"\"):t=[\"\",\"\"],t.join(c)};function d(e){return parseInt(e,16)}const _=e=>`rgb(${(e=>{if(3===(e=e.replace(/#/,\"\")).length){const[t,n,i]=e.split(\"\");e=t+t+n+n+i+i}return[d(e.substring(0,2)),d(e.substring(2,4)),d(e.substring(4,6))]})(e).join(\",\")})`,f=(e,t,n)=>{const i=t.match(e);let s=t.replace(e,c);return i&&i.forEach((e=>s=s.replace(c,n(e)))),s},g=e=>{for(const t in e){const n=e[t];\"string\"==typeof n&&n.match(l)&&(e[t]=f(l,n,_))}},w=e=>{var t,n;const i=null!==(t=e.match(a))&&void 0!==t?t:[],s=i.slice(0,3).map((e=>Math.floor(Number(e)))),r=null===(n=e.match(u))||void 0===n?void 0:n[0];if(3===i.length)return`${r}${s.join(\",\")})`;if(4===i.length)return`${r}${s.join(\",\")},${i[3]})`;throw new Error(`Invalid rgbChunk: ${e}`)},m=e=>{var t;return null!==(t=e.match(a))&&void 0!==t?t:[]},b=(e,t)=>{const n={};return t.forEach((t=>{n[t]=e[t],delete e[t]})),n},y=(e,t)=>t.map((t=>Number(e[t]))),v=(e,t)=>(t.forEach((t=>e=e.replace(c,String(+t.toFixed(4))))),e);t.doesApply=e=>{for(const t in e._currentState)if(\"string\"==typeof e._currentState[t])return!0;return!1},t.tweenCreated=function(e){const{_currentState:t,_originalState:n,_targetState:i}=e;[t,n,i].forEach(g),e._tokenData=(e=>{var t;const n={};for(const i in e){const s=e[i];\"string\"==typeof s&&(n[i]={formatString:p(s),chunkNames:h(null===(t=m(s))||void 0===t?void 0:t.map(Number),i)})}return n})(t)},t.beforeTween=function(e){const{_currentState:t,_originalState:n,_targetState:s,_easing:r,_tokenData:a}=e;\"function\"!=typeof r&&a&&((e,t)=>{var n;for(const s in t){const{chunkNames:r}=t[s],a=e[s];if(\"string\"==typeof a){const t=a.split(\" \"),s=t[t.length-1];for(let a=0;a<r.length;a++){const o=r[a],u=null!==(n=t[a])&&void 0!==n?n:s;(0,i.isEasingKey)(u)&&(e[o]=u)}}else r.forEach((t=>e[t]=a));delete e[s]}})(r,a),[t,n,s].forEach((e=>((e,t)=>{for(const n in t)m(String(e[n])).forEach(((i,s)=>e[t[n].chunkNames[s]]=+i)),delete e[n]})(e,null!=a?a:{})))},t.afterTween=function(e){const{_currentState:t,_originalState:n,_targetState:i,_easing:s,_tokenData:r}=e;[t,n,i].forEach((e=>((e,t)=>{for(const n in t){const{chunkNames:i,formatString:s}=t[n],r=v(s,y(b(e,i),i));e[n]=f(o,r,w)}})(e,null!=r?r:{}))),\"function\"!=typeof s&&r&&((e,t)=>{for(const n in t){const{chunkNames:i}=t[n],s=e[i[0]];e[n]=\"string\"==typeof s?i.map((t=>{const n=e[t];return delete e[t],n})).join(\" \"):s}})(s,r)}},188:function(e,t,n){var i,s=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n);var s=Object.getOwnPropertyDescriptor(t,n);s&&!(\"get\"in s?!t.__esModule:s.writable||s.configurable)||(s={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,i,s)}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,\"default\",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)\"default\"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&s(t,e,n);return r(t,e),t};Object.defineProperty(t,\"__esModule\",{value:!0}),t.shouldScheduleUpdate=t.tween=t.Tweenable=t.composeEasingObject=t.scheduleUpdate=t.processTweens=t.tweenProps=t.getListTail=t.getListHead=t.resetList=void 0;const o=n(64),u=n(55),l=n(699),c=a(n(432)),h=\"linear\",p=\"undefined\"!=typeof window?window:n.g,d=\"afterTween\",_=\"beforeTween\",f=\"string\",g=\"function\";let w=p.requestAnimationFrame;w||(w=\"undefined\"==typeof window?setTimeout:window.webkitRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||window.mozCancelRequestAnimationFrame&&window.mozRequestAnimationFrame||setTimeout);const m=()=>{};let b=null,y=null;t.resetList=()=>{b=y=null},t.getListHead=()=>b,t.getListTail=()=>y,t.tweenProps=(e,t,n,i,s,r,a)=>{var u;let l,c=0;const h=e<r?0:(e-r)/s;let p;for(const e in t){if(typeof a===g)p=a;else{const t=a[e];p=typeof t===g?t:null!==(u=T.easing[t])&&void 0!==u?u:o.standardEasingFunctions.linear}c=p(h),l=n[e],t[e]=l+(i[e]-l)*c}return t};const v=(e,n)=>{var i;let s=null!==(i=e._timestamp)&&void 0!==i?i:0;const r=e._currentState,a=e._delay;if(n<s+a)return;let o=e._duration;const u=e._targetState,l=s+a+o;let c=n>l?l:n;e._hasEnded=c>=l;const h=o-(l-c);if(e._hasEnded)return e._render(u,h,e._data),e.stop(!0);e._applyFilter(_),c<s+a?s=o=c=1:s+=a,(0,t.tweenProps)(c,r,e._originalState,u,o,s,e._easing),e._applyFilter(d),e._render(r,h,e._data)};t.processTweens=()=>{let e;const t=T.now();let n=b;for(;n;)e=n._next,v(n,t),n=e};const{now:S}=Date;let O,j=!1;t.scheduleUpdate=()=>{O=S(),j&&w.call(p,t.scheduleUpdate,16.666666666666668),(0,t.processTweens)()},t.composeEasingObject=(e,t=h,n={})=>{if(typeof t===f&&(0,l.isEasingKey)(t))return T.easing[t];if(Array.isArray(t))return(0,u.getCubicBezierTransition)(...t);if(\"object\"==typeof n)if(typeof t===f||typeof t===g)for(const i in e)n[i]=t;else for(const i in e)n[i]=t[i]||h;return n};const M=(()=>{let e,t;return n=>{e=null,t=null,n===b?(b=n._next,b?b._previous=null:y=null):n===y?(y=n._previous,y?y._next=null:b=null):(e=n._previous,t=n._next,e&&(e._next=t),t&&(t._previous=e)),n._previous=n._next=null}})(),P=typeof Promise===g?Promise:null;class T{constructor(e={},t){this[i]=\"Promise\",this._next=null,this._previous=null,this._config={},this._data={},this._delay=0,this._duration=500,this._filters=[],this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._originalState={},this._targetState={},this._start=m,this._render=m,this._promiseCtor=P,this._promise=null,this._isPlaying=!1,this._pausedAtTime=null,this._easing={},this._currentState=e||{},t&&this.setConfig(t)}_applyFilter(e){var t;for(let n=this._filters.length;n>0;n--){const i=this._filters[n-n];null===(t=i[e])||void 0===t||t.call(i,this)}}tween(e){return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=T.now(),this._start(this.state,this._data),this._delay&&this._render(this._currentState,0,this._data),this._resume(this._timestamp)}setConfig(e={}){var n;const{_config:i}=this;let s;for(s in e)i[s]=e[s];const{promise:r=this._promiseCtor,start:a=m,finish:o,render:u=m}=i;this._data=i.data||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._delay=e.delay||0,this._start=a,this._render=u,this._duration=i.duration||500,this._promiseCtor=r,o&&(this._resolve=o);const{from:l,to:c={}}=e,{_currentState:h,_originalState:p,_targetState:d}=this;for(const e in l)h[e]=l[e];let _=!1;for(const e in h){const t=h[e];_||typeof t!==f||(_=!0),p[e]=t,d[e]=null!==(n=c[e])&&void 0!==n?n:t}if(this._easing=(0,t.composeEasingObject)(this._currentState,i.easing,this._easing),this._filters.length=0,_){for(const e in T.filters)T.filters[e].doesApply(this)&&this._filters.push(T.filters[e]);this._applyFilter(\"tweenCreated\")}return this}then(e,t){if(!this._promiseCtor)throw new Error(\"Promise implementation is unavailable\");return this._promise=new this._promiseCtor(((e,t)=>{this._resolve=e,this._reject=t})),this._promise.then(e,t)}catch(e){return this.then().catch(e)}finally(e){return this.then().finally(e)}get state(){return Object.assign({},this._currentState)}setState(e){this._currentState=e}pause(){return this._isPlaying?(this._pausedAtTime=T.now(),this._isPlaying=!1,M(this),this):this}resume(){return this._resume()}_resume(e=T.now()){return null===this._timestamp?this.tween():(this._isPlaying&&this._promise||(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===b?(b=this,y=this):(this._previous=y,y&&(y._next=this),y=this)),this)}seek(e){var t;e=Math.max(e,0);const n=T.now();return(null!==(t=this._timestamp)&&void 0!==t?t:0)+e===0||(this._timestamp=n-e,v(this,n)),this}stop(e=!1){var n;return this._isPlaying?(this._isPlaying=!1,M(this),e&&(this._applyFilter(_),(0,t.tweenProps)(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),this._applyFilter(d),this._applyFilter(\"afterTweenEnd\")),null===(n=this._resolve)||void 0===n||n.call(this,{data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this):this}cancel(e=!1){var t;const{_currentState:n,_data:i,_isPlaying:s}=this;return s?(null===(t=this._reject)||void 0===t||t.call(this,{data:i,state:n,tweenable:this}),this._resolve=null,this._reject=null,this.stop(e)):this}get isPlaying(){return this._isPlaying}get hasEnded(){return this._hasEnded}data(e=null){return e&&(this._data=Object.assign({},e)),this._data}dispose(){for(const e in this)delete this[e]}}t.Tweenable=T,i=Symbol.toStringTag,T.now=()=>O,T.setScheduleFunction=e=>w=e,T.filters={token:c},T.easing=Object.create(o.standardEasingFunctions),t.tween=function(e={}){return new T({},{}).tween(e)},t.shouldScheduleUpdate=e=>{e&&j||(j=e,e&&(0,t.scheduleUpdate)())},(0,t.shouldScheduleUpdate)(!0)},699:function(e,t,n){Object.defineProperty(t,\"__esModule\",{value:!0}),t.isEasingKey=void 0;const i=n(188);t.isEasingKey=e=>e in i.Tweenable.easing}},t={};function n(i){var s=t[i];if(void 0!==s)return s.exports;var r=t[i]={exports:{}};return e[i].call(r.exports,r,r.exports,n),r.exports}return n.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),n(607)}()}));\n//# sourceMappingURL=shifty.js.map","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\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 _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\n/* eslint-disable no-bitwise -- used for calculations */\n\n/* eslint-disable unicorn/prefer-query-selector -- aiming at\n backward-compatibility */\n\n/**\n* StackBlur - a fast almost Gaussian Blur For Canvas\n*\n* In case you find this class useful - especially in commercial projects -\n* I am not totally unhappy for a small donation to my PayPal account\n* mario@quasimondo.de\n*\n* Or support me on flattr:\n* {@link https://flattr.com/thing/72791/StackBlur-a-fast-almost-Gaussian-Blur-Effect-for-CanvasJavascript}.\n*\n* @module StackBlur\n* @author Mario Klingemann\n* Contact: mario@quasimondo.com\n* Website: {@link http://www.quasimondo.com/StackBlurForCanvas/StackBlurDemo.html}\n* Twitter: @quasimondo\n*\n* @copyright (c) 2010 Mario Klingemann\n*\n* Permission is hereby granted, free of charge, to any person\n* obtaining a copy of this software and associated documentation\n* files (the \"Software\"), to deal in the Software without\n* restriction, including without limitation the rights to use,\n* copy, modify, merge, publish, distribute, sublicense, and/or sell\n* copies of the Software, and to permit persons to whom the\n* Software is furnished to do so, subject to the following\n* conditions:\n*\n* The above copyright notice and this permission notice shall be\n* included in all copies or substantial portions of the Software.\n*\n* THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n* OTHER DEALINGS IN THE SOFTWARE.\n*/\nvar mulTable = [512, 512, 456, 512, 328, 456, 335, 512, 405, 328, 271, 456, 388, 335, 292, 512, 454, 405, 364, 328, 298, 271, 496, 456, 420, 388, 360, 335, 312, 292, 273, 512, 482, 454, 428, 405, 383, 364, 345, 328, 312, 298, 284, 271, 259, 496, 475, 456, 437, 420, 404, 388, 374, 360, 347, 335, 323, 312, 302, 292, 282, 273, 265, 512, 497, 482, 468, 454, 441, 428, 417, 405, 394, 383, 373, 364, 354, 345, 337, 328, 320, 312, 305, 298, 291, 284, 278, 271, 265, 259, 507, 496, 485, 475, 465, 456, 446, 437, 428, 420, 412, 404, 396, 388, 381, 374, 367, 360, 354, 347, 341, 335, 329, 323, 318, 312, 307, 302, 297, 292, 287, 282, 278, 273, 269, 265, 261, 512, 505, 497, 489, 482, 475, 468, 461, 454, 447, 441, 435, 428, 422, 417, 411, 405, 399, 394, 389, 383, 378, 373, 368, 364, 359, 354, 350, 345, 341, 337, 332, 328, 324, 320, 316, 312, 309, 305, 301, 298, 294, 291, 287, 284, 281, 278, 274, 271, 268, 265, 262, 259, 257, 507, 501, 496, 491, 485, 480, 475, 470, 465, 460, 456, 451, 446, 442, 437, 433, 428, 424, 420, 416, 412, 408, 404, 400, 396, 392, 388, 385, 381, 377, 374, 370, 367, 363, 360, 357, 354, 350, 347, 344, 341, 338, 335, 332, 329, 326, 323, 320, 318, 315, 312, 310, 307, 304, 302, 299, 297, 294, 292, 289, 287, 285, 282, 280, 278, 275, 273, 271, 269, 267, 265, 263, 261, 259];\nvar shgTable = [9, 11, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];\n/**\n * @param {string|HTMLImageElement} img\n * @param {string|HTMLCanvasElement} canvas\n * @param {Float} radius\n * @param {boolean} blurAlphaChannel\n * @param {boolean} useOffset\n * @param {boolean} skipStyles\n * @returns {undefined}\n */\n\nfunction processImage(img, canvas, radius, blurAlphaChannel, useOffset, skipStyles) {\n if (typeof img === 'string') {\n img = document.getElementById(img);\n }\n\n if (!img || Object.prototype.toString.call(img).slice(8, -1) === 'HTMLImageElement' && !('naturalWidth' in img)) {\n return;\n }\n\n var dimensionType = useOffset ? 'offset' : 'natural';\n var w = img[dimensionType + 'Width'];\n var h = img[dimensionType + 'Height']; // add ImageBitmap support,can blur texture source\n\n if (Object.prototype.toString.call(img).slice(8, -1) === 'ImageBitmap') {\n w = img.width;\n h = img.height;\n }\n\n if (typeof canvas === 'string') {\n canvas = document.getElementById(canvas);\n }\n\n if (!canvas || !('getContext' in canvas)) {\n return;\n }\n\n if (!skipStyles) {\n canvas.style.width = w + 'px';\n canvas.style.height = h + 'px';\n }\n\n canvas.width = w;\n canvas.height = h;\n var context = canvas.getContext('2d');\n context.clearRect(0, 0, w, h);\n context.drawImage(img, 0, 0, img.naturalWidth, img.naturalHeight, 0, 0, w, h);\n\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n if (blurAlphaChannel) {\n processCanvasRGBA(canvas, 0, 0, w, h, radius);\n } else {\n processCanvasRGB(canvas, 0, 0, w, h, radius);\n }\n}\n/**\n * @param {string|HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @throws {Error|TypeError}\n * @returns {ImageData} See {@link https://html.spec.whatwg.org/multipage/canvas.html#imagedata}\n */\n\n\nfunction getImageDataFromCanvas(canvas, topX, topY, width, height) {\n if (typeof canvas === 'string') {\n canvas = document.getElementById(canvas);\n }\n\n if (!canvas || _typeof(canvas) !== 'object' || !('getContext' in canvas)) {\n throw new TypeError('Expecting canvas with `getContext` method ' + 'in processCanvasRGB(A) calls!');\n }\n\n var context = canvas.getContext('2d');\n\n try {\n return context.getImageData(topX, topY, width, height);\n } catch (e) {\n throw new Error('unable to access image data: ' + e);\n }\n}\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {undefined}\n */\n\n\nfunction processCanvasRGBA(canvas, topX, topY, width, height, radius) {\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n radius |= 0;\n var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);\n imageData = processImageDataRGBA(imageData, topX, topY, width, height, radius);\n canvas.getContext('2d').putImageData(imageData, topX, topY);\n}\n/**\n * @param {ImageData} imageData\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {ImageData}\n */\n\n\nfunction processImageDataRGBA(imageData, topX, topY, width, height, radius) {\n var pixels = imageData.data;\n var div = 2 * radius + 1; // const w4 = width << 2;\n\n var widthMinus1 = width - 1;\n var heightMinus1 = height - 1;\n var radiusPlus1 = radius + 1;\n var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\n var stackStart = new BlurStack();\n var stack = stackStart;\n var stackEnd;\n\n for (var i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n\n if (i === radiusPlus1) {\n stackEnd = stack;\n }\n }\n\n stack.next = stackStart;\n var stackIn = null,\n stackOut = null,\n yw = 0,\n yi = 0;\n var mulSum = mulTable[radius];\n var shgSum = shgTable[radius];\n\n for (var y = 0; y < height; y++) {\n stack = stackStart;\n var pr = pixels[yi],\n pg = pixels[yi + 1],\n pb = pixels[yi + 2],\n pa = pixels[yi + 3];\n\n for (var _i = 0; _i < radiusPlus1; _i++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack.a = pa;\n stack = stack.next;\n }\n\n var rInSum = 0,\n gInSum = 0,\n bInSum = 0,\n aInSum = 0,\n rOutSum = radiusPlus1 * pr,\n gOutSum = radiusPlus1 * pg,\n bOutSum = radiusPlus1 * pb,\n aOutSum = radiusPlus1 * pa,\n rSum = sumFactor * pr,\n gSum = sumFactor * pg,\n bSum = sumFactor * pb,\n aSum = sumFactor * pa;\n\n for (var _i2 = 1; _i2 < radiusPlus1; _i2++) {\n var p = yi + ((widthMinus1 < _i2 ? widthMinus1 : _i2) << 2);\n var r = pixels[p],\n g = pixels[p + 1],\n b = pixels[p + 2],\n a = pixels[p + 3];\n var rbs = radiusPlus1 - _i2;\n rSum += (stack.r = r) * rbs;\n gSum += (stack.g = g) * rbs;\n bSum += (stack.b = b) * rbs;\n aSum += (stack.a = a) * rbs;\n rInSum += r;\n gInSum += g;\n bInSum += b;\n aInSum += a;\n stack = stack.next;\n }\n\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var x = 0; x < width; x++) {\n var paInitial = aSum * mulSum >>> shgSum;\n pixels[yi + 3] = paInitial;\n\n if (paInitial !== 0) {\n var _a2 = 255 / paInitial;\n\n pixels[yi] = (rSum * mulSum >>> shgSum) * _a2;\n pixels[yi + 1] = (gSum * mulSum >>> shgSum) * _a2;\n pixels[yi + 2] = (bSum * mulSum >>> shgSum) * _a2;\n } else {\n pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;\n }\n\n rSum -= rOutSum;\n gSum -= gOutSum;\n bSum -= bOutSum;\n aSum -= aOutSum;\n rOutSum -= stackIn.r;\n gOutSum -= stackIn.g;\n bOutSum -= stackIn.b;\n aOutSum -= stackIn.a;\n\n var _p = x + radius + 1;\n\n _p = yw + (_p < widthMinus1 ? _p : widthMinus1) << 2;\n rInSum += stackIn.r = pixels[_p];\n gInSum += stackIn.g = pixels[_p + 1];\n bInSum += stackIn.b = pixels[_p + 2];\n aInSum += stackIn.a = pixels[_p + 3];\n rSum += rInSum;\n gSum += gInSum;\n bSum += bInSum;\n aSum += aInSum;\n stackIn = stackIn.next;\n var _stackOut = stackOut,\n _r = _stackOut.r,\n _g = _stackOut.g,\n _b = _stackOut.b,\n _a = _stackOut.a;\n rOutSum += _r;\n gOutSum += _g;\n bOutSum += _b;\n aOutSum += _a;\n rInSum -= _r;\n gInSum -= _g;\n bInSum -= _b;\n aInSum -= _a;\n stackOut = stackOut.next;\n yi += 4;\n }\n\n yw += width;\n }\n\n for (var _x = 0; _x < width; _x++) {\n yi = _x << 2;\n\n var _pr = pixels[yi],\n _pg = pixels[yi + 1],\n _pb = pixels[yi + 2],\n _pa = pixels[yi + 3],\n _rOutSum = radiusPlus1 * _pr,\n _gOutSum = radiusPlus1 * _pg,\n _bOutSum = radiusPlus1 * _pb,\n _aOutSum = radiusPlus1 * _pa,\n _rSum = sumFactor * _pr,\n _gSum = sumFactor * _pg,\n _bSum = sumFactor * _pb,\n _aSum = sumFactor * _pa;\n\n stack = stackStart;\n\n for (var _i3 = 0; _i3 < radiusPlus1; _i3++) {\n stack.r = _pr;\n stack.g = _pg;\n stack.b = _pb;\n stack.a = _pa;\n stack = stack.next;\n }\n\n var yp = width;\n var _gInSum = 0,\n _bInSum = 0,\n _aInSum = 0,\n _rInSum = 0;\n\n for (var _i4 = 1; _i4 <= radius; _i4++) {\n yi = yp + _x << 2;\n\n var _rbs = radiusPlus1 - _i4;\n\n _rSum += (stack.r = _pr = pixels[yi]) * _rbs;\n _gSum += (stack.g = _pg = pixels[yi + 1]) * _rbs;\n _bSum += (stack.b = _pb = pixels[yi + 2]) * _rbs;\n _aSum += (stack.a = _pa = pixels[yi + 3]) * _rbs;\n _rInSum += _pr;\n _gInSum += _pg;\n _bInSum += _pb;\n _aInSum += _pa;\n stack = stack.next;\n\n if (_i4 < heightMinus1) {\n yp += width;\n }\n }\n\n yi = _x;\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var _y = 0; _y < height; _y++) {\n var _p2 = yi << 2;\n\n pixels[_p2 + 3] = _pa = _aSum * mulSum >>> shgSum;\n\n if (_pa > 0) {\n _pa = 255 / _pa;\n pixels[_p2] = (_rSum * mulSum >>> shgSum) * _pa;\n pixels[_p2 + 1] = (_gSum * mulSum >>> shgSum) * _pa;\n pixels[_p2 + 2] = (_bSum * mulSum >>> shgSum) * _pa;\n } else {\n pixels[_p2] = pixels[_p2 + 1] = pixels[_p2 + 2] = 0;\n }\n\n _rSum -= _rOutSum;\n _gSum -= _gOutSum;\n _bSum -= _bOutSum;\n _aSum -= _aOutSum;\n _rOutSum -= stackIn.r;\n _gOutSum -= stackIn.g;\n _bOutSum -= stackIn.b;\n _aOutSum -= stackIn.a;\n _p2 = _x + ((_p2 = _y + radiusPlus1) < heightMinus1 ? _p2 : heightMinus1) * width << 2;\n _rSum += _rInSum += stackIn.r = pixels[_p2];\n _gSum += _gInSum += stackIn.g = pixels[_p2 + 1];\n _bSum += _bInSum += stackIn.b = pixels[_p2 + 2];\n _aSum += _aInSum += stackIn.a = pixels[_p2 + 3];\n stackIn = stackIn.next;\n _rOutSum += _pr = stackOut.r;\n _gOutSum += _pg = stackOut.g;\n _bOutSum += _pb = stackOut.b;\n _aOutSum += _pa = stackOut.a;\n _rInSum -= _pr;\n _gInSum -= _pg;\n _bInSum -= _pb;\n _aInSum -= _pa;\n stackOut = stackOut.next;\n yi += width;\n }\n }\n\n return imageData;\n}\n/**\n * @param {HTMLCanvasElement} canvas\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {undefined}\n */\n\n\nfunction processCanvasRGB(canvas, topX, topY, width, height, radius) {\n if (isNaN(radius) || radius < 1) {\n return;\n }\n\n radius |= 0;\n var imageData = getImageDataFromCanvas(canvas, topX, topY, width, height);\n imageData = processImageDataRGB(imageData, topX, topY, width, height, radius);\n canvas.getContext('2d').putImageData(imageData, topX, topY);\n}\n/**\n * @param {ImageData} imageData\n * @param {Integer} topX\n * @param {Integer} topY\n * @param {Integer} width\n * @param {Integer} height\n * @param {Float} radius\n * @returns {ImageData}\n */\n\n\nfunction processImageDataRGB(imageData, topX, topY, width, height, radius) {\n var pixels = imageData.data;\n var div = 2 * radius + 1; // const w4 = width << 2;\n\n var widthMinus1 = width - 1;\n var heightMinus1 = height - 1;\n var radiusPlus1 = radius + 1;\n var sumFactor = radiusPlus1 * (radiusPlus1 + 1) / 2;\n var stackStart = new BlurStack();\n var stack = stackStart;\n var stackEnd;\n\n for (var i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n\n if (i === radiusPlus1) {\n stackEnd = stack;\n }\n }\n\n stack.next = stackStart;\n var stackIn = null;\n var stackOut = null;\n var mulSum = mulTable[radius];\n var shgSum = shgTable[radius];\n var p, rbs;\n var yw = 0,\n yi = 0;\n\n for (var y = 0; y < height; y++) {\n var pr = pixels[yi],\n pg = pixels[yi + 1],\n pb = pixels[yi + 2],\n rOutSum = radiusPlus1 * pr,\n gOutSum = radiusPlus1 * pg,\n bOutSum = radiusPlus1 * pb,\n rSum = sumFactor * pr,\n gSum = sumFactor * pg,\n bSum = sumFactor * pb;\n stack = stackStart;\n\n for (var _i5 = 0; _i5 < radiusPlus1; _i5++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack = stack.next;\n }\n\n var rInSum = 0,\n gInSum = 0,\n bInSum = 0;\n\n for (var _i6 = 1; _i6 < radiusPlus1; _i6++) {\n p = yi + ((widthMinus1 < _i6 ? widthMinus1 : _i6) << 2);\n rSum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - _i6);\n gSum += (stack.g = pg = pixels[p + 1]) * rbs;\n bSum += (stack.b = pb = pixels[p + 2]) * rbs;\n rInSum += pr;\n gInSum += pg;\n bInSum += pb;\n stack = stack.next;\n }\n\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var x = 0; x < width; x++) {\n pixels[yi] = rSum * mulSum >>> shgSum;\n pixels[yi + 1] = gSum * mulSum >>> shgSum;\n pixels[yi + 2] = bSum * mulSum >>> shgSum;\n rSum -= rOutSum;\n gSum -= gOutSum;\n bSum -= bOutSum;\n rOutSum -= stackIn.r;\n gOutSum -= stackIn.g;\n bOutSum -= stackIn.b;\n p = yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1) << 2;\n rInSum += stackIn.r = pixels[p];\n gInSum += stackIn.g = pixels[p + 1];\n bInSum += stackIn.b = pixels[p + 2];\n rSum += rInSum;\n gSum += gInSum;\n bSum += bInSum;\n stackIn = stackIn.next;\n rOutSum += pr = stackOut.r;\n gOutSum += pg = stackOut.g;\n bOutSum += pb = stackOut.b;\n rInSum -= pr;\n gInSum -= pg;\n bInSum -= pb;\n stackOut = stackOut.next;\n yi += 4;\n }\n\n yw += width;\n }\n\n for (var _x2 = 0; _x2 < width; _x2++) {\n yi = _x2 << 2;\n\n var _pr2 = pixels[yi],\n _pg2 = pixels[yi + 1],\n _pb2 = pixels[yi + 2],\n _rOutSum2 = radiusPlus1 * _pr2,\n _gOutSum2 = radiusPlus1 * _pg2,\n _bOutSum2 = radiusPlus1 * _pb2,\n _rSum2 = sumFactor * _pr2,\n _gSum2 = sumFactor * _pg2,\n _bSum2 = sumFactor * _pb2;\n\n stack = stackStart;\n\n for (var _i7 = 0; _i7 < radiusPlus1; _i7++) {\n stack.r = _pr2;\n stack.g = _pg2;\n stack.b = _pb2;\n stack = stack.next;\n }\n\n var _rInSum2 = 0,\n _gInSum2 = 0,\n _bInSum2 = 0;\n\n for (var _i8 = 1, yp = width; _i8 <= radius; _i8++) {\n yi = yp + _x2 << 2;\n _rSum2 += (stack.r = _pr2 = pixels[yi]) * (rbs = radiusPlus1 - _i8);\n _gSum2 += (stack.g = _pg2 = pixels[yi + 1]) * rbs;\n _bSum2 += (stack.b = _pb2 = pixels[yi + 2]) * rbs;\n _rInSum2 += _pr2;\n _gInSum2 += _pg2;\n _bInSum2 += _pb2;\n stack = stack.next;\n\n if (_i8 < heightMinus1) {\n yp += width;\n }\n }\n\n yi = _x2;\n stackIn = stackStart;\n stackOut = stackEnd;\n\n for (var _y2 = 0; _y2 < height; _y2++) {\n p = yi << 2;\n pixels[p] = _rSum2 * mulSum >>> shgSum;\n pixels[p + 1] = _gSum2 * mulSum >>> shgSum;\n pixels[p + 2] = _bSum2 * mulSum >>> shgSum;\n _rSum2 -= _rOutSum2;\n _gSum2 -= _gOutSum2;\n _bSum2 -= _bOutSum2;\n _rOutSum2 -= stackIn.r;\n _gOutSum2 -= stackIn.g;\n _bOutSum2 -= stackIn.b;\n p = _x2 + ((p = _y2 + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width << 2;\n _rSum2 += _rInSum2 += stackIn.r = pixels[p];\n _gSum2 += _gInSum2 += stackIn.g = pixels[p + 1];\n _bSum2 += _bInSum2 += stackIn.b = pixels[p + 2];\n stackIn = stackIn.next;\n _rOutSum2 += _pr2 = stackOut.r;\n _gOutSum2 += _pg2 = stackOut.g;\n _bOutSum2 += _pb2 = stackOut.b;\n _rInSum2 -= _pr2;\n _gInSum2 -= _pg2;\n _bInSum2 -= _pb2;\n stackOut = stackOut.next;\n yi += width;\n }\n }\n\n return imageData;\n}\n/**\n *\n */\n\n\nvar BlurStack =\n/**\n * Set properties.\n */\nfunction BlurStack() {\n _classCallCheck(this, BlurStack);\n\n this.r = 0;\n this.g = 0;\n this.b = 0;\n this.a = 0;\n this.next = null;\n};\n\nexport { BlurStack, processCanvasRGB as canvasRGB, processCanvasRGBA as canvasRGBA, processImage as image, processImageDataRGB as imageDataRGB, processImageDataRGBA as imageDataRGBA };\n","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!./contextmenu.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!./contextmenu.css\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nvar requestAnimationFrame = require('raf');\nvar RGBColor = require('rgbcolor');\nvar svgPathdata = require('svg-pathdata');\nvar stackblurCanvas = require('stackblur-canvas');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar requestAnimationFrame__default = /*#__PURE__*/_interopDefaultLegacy(requestAnimationFrame);\nvar RGBColor__default = /*#__PURE__*/_interopDefaultLegacy(RGBColor);\n\n/**\n * Options preset for `OffscreenCanvas`.\n * @param config - Preset requirements.\n * @param config.DOMParser - XML/HTML parser from string into DOM Document.\n * @returns Preset object.\n */ function offscreen() {\n let { DOMParser: DOMParserFallback } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n const preset = {\n window: null,\n ignoreAnimation: true,\n ignoreMouse: true,\n DOMParser: DOMParserFallback,\n createCanvas (width, height) {\n return new OffscreenCanvas(width, height);\n },\n async createImage (url) {\n const response = await fetch(url);\n const blob = await response.blob();\n const img = await createImageBitmap(blob);\n return img;\n }\n };\n if (typeof globalThis.DOMParser !== 'undefined' || typeof DOMParserFallback === 'undefined') {\n Reflect.deleteProperty(preset, 'DOMParser');\n }\n return preset;\n}\n\n/**\n * Options preset for `node-canvas`.\n * @param config - Preset requirements.\n * @param config.DOMParser - XML/HTML parser from string into DOM Document.\n * @param config.canvas - `node-canvas` exports.\n * @param config.fetch - WHATWG-compatible `fetch` function.\n * @returns Preset object.\n */ function node(param) {\n let { DOMParser , canvas , fetch } = param;\n return {\n window: null,\n ignoreAnimation: true,\n ignoreMouse: true,\n DOMParser,\n fetch,\n createCanvas: canvas.createCanvas,\n createImage: canvas.loadImage\n };\n}\n\nvar index = /*#__PURE__*/Object.freeze({\n __proto__: null,\n offscreen: offscreen,\n node: node\n});\n\n/**\n * HTML-safe compress white-spaces.\n * @param str - String to compress.\n * @returns String.\n */ function compressSpaces(str) {\n return str.replace(/(?!\\u3000)\\s+/gm, ' ');\n}\n/**\n * HTML-safe left trim.\n * @param str - String to trim.\n * @returns String.\n */ function trimLeft(str) {\n return str.replace(/^[\\n \\t]+/, '');\n}\n/**\n * HTML-safe right trim.\n * @param str - String to trim.\n * @returns String.\n */ function trimRight(str) {\n return str.replace(/[\\n \\t]+$/, '');\n}\n/**\n * String to numbers array.\n * @param str - Numbers string.\n * @returns Numbers array.\n */ function toNumbers(str) {\n const matches = str.match(/-?(\\d+(?:\\.\\d*(?:[eE][+-]?\\d+)?)?|\\.\\d+)(?=\\D|$)/gm);\n return matches ? matches.map(parseFloat) : [];\n}\n/**\n * String to matrix value.\n * @param str - Numbers string.\n * @returns Matrix value.\n */ function toMatrixValue(str) {\n const numbers = toNumbers(str);\n const matrix = [\n numbers[0] || 0,\n numbers[1] || 0,\n numbers[2] || 0,\n numbers[3] || 0,\n numbers[4] || 0,\n numbers[5] || 0\n ];\n return matrix;\n}\n// Microsoft Edge fix\nconst allUppercase = /^[A-Z-]+$/;\n/**\n * Normalize attribute name.\n * @param name - Attribute name.\n * @returns Normalized attribute name.\n */ function normalizeAttributeName(name) {\n if (allUppercase.test(name)) {\n return name.toLowerCase();\n }\n return name;\n}\n/**\n * Parse external URL.\n * @param url - CSS url string.\n * @returns Parsed URL.\n */ function parseExternalUrl(url) {\n // single quotes [2]\n // v double quotes [3]\n // v v no quotes [4]\n // v v v\n const urlMatch = /url\\(('([^']+)'|\"([^\"]+)\"|([^'\")]+))\\)/.exec(url);\n if (!urlMatch) {\n return '';\n }\n return urlMatch[2] || urlMatch[3] || urlMatch[4] || '';\n}\n/**\n * Transform floats to integers in rgb colors.\n * @param color - Color to normalize.\n * @returns Normalized color.\n */ function normalizeColor(color) {\n if (!color.startsWith('rgb')) {\n return color;\n }\n let rgbParts = 3;\n const normalizedColor = color.replace(/\\d+(\\.\\d+)?/g, (num, isFloat)=>(rgbParts--) && isFloat ? String(Math.round(parseFloat(num))) : num\n );\n return normalizedColor;\n}\n\n// slightly modified version of https://github.com/keeganstreet/specificity/blob/master/specificity.js\nconst attributeRegex = /(\\[[^\\]]+\\])/g;\nconst idRegex = /(#[^\\s+>~.[:]+)/g;\nconst classRegex = /(\\.[^\\s+>~.[:]+)/g;\nconst pseudoElementRegex = /(::[^\\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi;\nconst pseudoClassWithBracketsRegex = /(:[\\w-]+\\([^)]*\\))/gi;\nconst pseudoClassRegex = /(:[^\\s+>~.[:]+)/g;\nconst elementRegex = /([^\\s+>~.[:]+)/g;\nfunction findSelectorMatch(selector, regex) {\n const matches = regex.exec(selector);\n if (!matches) {\n return [\n selector,\n 0\n ];\n }\n return [\n selector.replace(regex, ' '),\n matches.length\n ];\n}\n/**\n * Measure selector specificity.\n * @param selector - Selector to measure.\n * @returns Specificity.\n */ function getSelectorSpecificity(selector) {\n const specificity = [\n 0,\n 0,\n 0\n ];\n let currentSelector = selector.replace(/:not\\(([^)]*)\\)/g, ' $1 ').replace(/{[\\s\\S]*/gm, ' ');\n let delta = 0;\n [currentSelector, delta] = findSelectorMatch(currentSelector, attributeRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, idRegex);\n specificity[0] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, classRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoElementRegex);\n specificity[2] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassWithBracketsRegex);\n specificity[1] += delta;\n [currentSelector, delta] = findSelectorMatch(currentSelector, pseudoClassRegex);\n specificity[1] += delta;\n currentSelector = currentSelector.replace(/[*\\s+>~]/g, ' ').replace(/[#.]/g, ' ');\n [currentSelector, delta] = findSelectorMatch(currentSelector, elementRegex) // lgtm [js/useless-assignment-to-local]\n ;\n specificity[2] += delta;\n return specificity.join('');\n}\n\nconst PSEUDO_ZERO = 0.00000001;\n/**\n * Vector magnitude.\n * @param v\n * @returns Number result.\n */ function vectorMagnitude(v) {\n return Math.sqrt(Math.pow(v[0], 2) + Math.pow(v[1], 2));\n}\n/**\n * Ratio between two vectors.\n * @param u\n * @param v\n * @returns Number result.\n */ function vectorsRatio(u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (vectorMagnitude(u) * vectorMagnitude(v));\n}\n/**\n * Angle between two vectors.\n * @param u\n * @param v\n * @returns Number result.\n */ function vectorsAngle(u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vectorsRatio(u, v));\n}\nfunction CB1(t) {\n return t * t * t;\n}\nfunction CB2(t) {\n return 3 * t * t * (1 - t);\n}\nfunction CB3(t) {\n return 3 * t * (1 - t) * (1 - t);\n}\nfunction CB4(t) {\n return (1 - t) * (1 - t) * (1 - t);\n}\nfunction QB1(t) {\n return t * t;\n}\nfunction QB2(t) {\n return 2 * t * (1 - t);\n}\nfunction QB3(t) {\n return (1 - t) * (1 - t);\n}\n\nclass Property {\n static empty(document) {\n return new Property(document, 'EMPTY', '');\n }\n split() {\n let separator = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : ' ';\n const { document , name } = this;\n return compressSpaces(this.getString()).trim().split(separator).map((value)=>new Property(document, name, value)\n );\n }\n hasValue(zeroIsValue) {\n const value = this.value;\n return value !== null && value !== '' && (zeroIsValue || value !== 0) && typeof value !== 'undefined';\n }\n isString(regexp) {\n const { value } = this;\n const result = typeof value === 'string';\n if (!result || !regexp) {\n return result;\n }\n return regexp.test(value);\n }\n isUrlDefinition() {\n return this.isString(/^url\\(/);\n }\n isPixels() {\n if (!this.hasValue()) {\n return false;\n }\n const asString = this.getString();\n switch(true){\n case asString.endsWith('px'):\n case /^[0-9]+$/.test(asString):\n return true;\n default:\n return false;\n }\n }\n setValue(value) {\n this.value = value;\n return this;\n }\n getValue(def) {\n if (typeof def === 'undefined' || this.hasValue()) {\n return this.value;\n }\n return def;\n }\n getNumber(def) {\n if (!this.hasValue()) {\n if (typeof def === 'undefined') {\n return 0;\n }\n // @ts-expect-error Parse unknown value.\n return parseFloat(def);\n }\n const { value } = this;\n // @ts-expect-error Parse unknown value.\n let n = parseFloat(value);\n if (this.isString(/%$/)) {\n n /= 100;\n }\n return n;\n }\n getString(def) {\n if (typeof def === 'undefined' || this.hasValue()) {\n return typeof this.value === 'undefined' ? '' : String(this.value);\n }\n return String(def);\n }\n getColor(def) {\n let color = this.getString(def);\n if (this.isNormalizedColor) {\n return color;\n }\n this.isNormalizedColor = true;\n color = normalizeColor(color);\n this.value = color;\n return color;\n }\n getDpi() {\n return 96 // TODO: compute?\n ;\n }\n getRem() {\n return this.document.rootEmSize;\n }\n getEm() {\n return this.document.emSize;\n }\n getUnits() {\n return this.getString().replace(/[0-9.-]/g, '');\n }\n getPixels(axisOrIsFontSize) {\n let processPercent = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n if (!this.hasValue()) {\n return 0;\n }\n const [axis, isFontSize] = typeof axisOrIsFontSize === 'boolean' ? [\n undefined,\n axisOrIsFontSize\n ] : [\n axisOrIsFontSize\n ];\n const { viewPort } = this.document.screen;\n switch(true){\n case this.isString(/vmin$/):\n return this.getNumber() / 100 * Math.min(viewPort.computeSize('x'), viewPort.computeSize('y'));\n case this.isString(/vmax$/):\n return this.getNumber() / 100 * Math.max(viewPort.computeSize('x'), viewPort.computeSize('y'));\n case this.isString(/vw$/):\n return this.getNumber() / 100 * viewPort.computeSize('x');\n case this.isString(/vh$/):\n return this.getNumber() / 100 * viewPort.computeSize('y');\n case this.isString(/rem$/):\n return this.getNumber() * this.getRem();\n case this.isString(/em$/):\n return this.getNumber() * this.getEm();\n case this.isString(/ex$/):\n return this.getNumber() * this.getEm() / 2;\n case this.isString(/px$/):\n return this.getNumber();\n case this.isString(/pt$/):\n return this.getNumber() * this.getDpi() * (1 / 72);\n case this.isString(/pc$/):\n return this.getNumber() * 15;\n case this.isString(/cm$/):\n return this.getNumber() * this.getDpi() / 2.54;\n case this.isString(/mm$/):\n return this.getNumber() * this.getDpi() / 25.4;\n case this.isString(/in$/):\n return this.getNumber() * this.getDpi();\n case this.isString(/%$/) && isFontSize:\n return this.getNumber() * this.getEm();\n case this.isString(/%$/):\n return this.getNumber() * viewPort.computeSize(axis);\n default:\n {\n const n = this.getNumber();\n if (processPercent && n < 1) {\n return n * viewPort.computeSize(axis);\n }\n return n;\n }\n }\n }\n getMilliseconds() {\n if (!this.hasValue()) {\n return 0;\n }\n if (this.isString(/ms$/)) {\n return this.getNumber();\n }\n return this.getNumber() * 1000;\n }\n getRadians() {\n if (!this.hasValue()) {\n return 0;\n }\n switch(true){\n case this.isString(/deg$/):\n return this.getNumber() * (Math.PI / 180);\n case this.isString(/grad$/):\n return this.getNumber() * (Math.PI / 200);\n case this.isString(/rad$/):\n return this.getNumber();\n default:\n return this.getNumber() * (Math.PI / 180);\n }\n }\n getDefinition() {\n const asString = this.getString();\n const match = /#([^)'\"]+)/.exec(asString);\n const name = (match === null || match === void 0 ? void 0 : match[1]) || asString;\n return this.document.definitions[name];\n }\n getFillStyleDefinition(element, opacity) {\n let def = this.getDefinition();\n if (!def) {\n return null;\n }\n // gradient\n if (typeof def.createGradient === 'function' && 'getBoundingBox' in element) {\n return def.createGradient(this.document.ctx, element, opacity);\n }\n // pattern\n if (typeof def.createPattern === 'function') {\n if (def.getHrefAttribute().hasValue()) {\n const patternTransform = def.getAttribute('patternTransform');\n def = def.getHrefAttribute().getDefinition();\n if (def && patternTransform.hasValue()) {\n def.getAttribute('patternTransform', true).setValue(patternTransform.value);\n }\n }\n if (def) {\n return def.createPattern(this.document.ctx, element, opacity);\n }\n }\n return null;\n }\n getTextBaseline() {\n if (!this.hasValue()) {\n return null;\n }\n const key = this.getString();\n return Property.textBaselineMapping[key] || null;\n }\n addOpacity(opacity) {\n let value = this.getColor();\n const len = value.length;\n let commas = 0;\n // Simulate old RGBColor version, which can't parse rgba.\n for(let i = 0; i < len; i++){\n if (value[i] === ',') {\n commas++;\n }\n if (commas === 3) {\n break;\n }\n }\n if (opacity.hasValue() && this.isString() && commas !== 3) {\n const color = new RGBColor__default[\"default\"](value);\n if (color.ok) {\n color.alpha = opacity.getNumber();\n value = color.toRGBA();\n }\n }\n return new Property(this.document, this.name, value);\n }\n constructor(document, name, value){\n this.document = document;\n this.name = name;\n this.value = value;\n this.isNormalizedColor = false;\n }\n}\nProperty.textBaselineMapping = {\n 'baseline': 'alphabetic',\n 'before-edge': 'top',\n 'text-before-edge': 'top',\n 'middle': 'middle',\n 'central': 'middle',\n 'after-edge': 'bottom',\n 'text-after-edge': 'bottom',\n 'ideographic': 'ideographic',\n 'alphabetic': 'alphabetic',\n 'hanging': 'hanging',\n 'mathematical': 'alphabetic'\n};\n\nclass ViewPort {\n clear() {\n this.viewPorts = [];\n }\n setCurrent(width, height) {\n this.viewPorts.push({\n width,\n height\n });\n }\n removeCurrent() {\n this.viewPorts.pop();\n }\n getRoot() {\n const [root] = this.viewPorts;\n if (!root) {\n return getDefault();\n }\n return root;\n }\n getCurrent() {\n const { viewPorts } = this;\n const current = viewPorts[viewPorts.length - 1];\n if (!current) {\n return getDefault();\n }\n return current;\n }\n get width() {\n return this.getCurrent().width;\n }\n get height() {\n return this.getCurrent().height;\n }\n computeSize(d) {\n if (typeof d === 'number') {\n return d;\n }\n if (d === 'x') {\n return this.width;\n }\n if (d === 'y') {\n return this.height;\n }\n return Math.sqrt(Math.pow(this.width, 2) + Math.pow(this.height, 2)) / Math.sqrt(2);\n }\n constructor(){\n this.viewPorts = [];\n }\n}\nViewPort.DEFAULT_VIEWPORT_WIDTH = 800;\nViewPort.DEFAULT_VIEWPORT_HEIGHT = 600;\nfunction getDefault() {\n return {\n width: ViewPort.DEFAULT_VIEWPORT_WIDTH,\n height: ViewPort.DEFAULT_VIEWPORT_HEIGHT\n };\n}\n\nclass Point {\n static parse(point) {\n let defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;\n const [x = defaultValue, y = defaultValue] = toNumbers(point);\n return new Point(x, y);\n }\n static parseScale(scale) {\n let defaultValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;\n const [x = defaultValue, y = x] = toNumbers(scale);\n return new Point(x, y);\n }\n static parsePath(path) {\n const points = toNumbers(path);\n const len = points.length;\n const pathPoints = [];\n for(let i = 0; i < len; i += 2){\n pathPoints.push(new Point(points[i], points[i + 1]));\n }\n return pathPoints;\n }\n angleTo(point) {\n return Math.atan2(point.y - this.y, point.x - this.x);\n }\n applyTransform(transform) {\n const { x , y } = this;\n const xp = x * transform[0] + y * transform[2] + transform[4];\n const yp = x * transform[1] + y * transform[3] + transform[5];\n this.x = xp;\n this.y = yp;\n }\n constructor(x, y){\n this.x = x;\n this.y = y;\n }\n}\n\nclass Mouse {\n isWorking() {\n return this.working;\n }\n start() {\n if (this.working) {\n return;\n }\n const { screen , onClick , onMouseMove } = this;\n const canvas = screen.ctx.canvas;\n canvas.onclick = onClick;\n canvas.onmousemove = onMouseMove;\n this.working = true;\n }\n stop() {\n if (!this.working) {\n return;\n }\n const canvas = this.screen.ctx.canvas;\n this.working = false;\n canvas.onclick = null;\n canvas.onmousemove = null;\n }\n hasEvents() {\n return this.working && this.events.length > 0;\n }\n runEvents() {\n if (!this.working) {\n return;\n }\n const { screen: document , events , eventElements } = this;\n const { style } = document.ctx.canvas;\n let element;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (style) {\n style.cursor = '';\n }\n events.forEach((param, i)=>{\n let { run } = param;\n element = eventElements[i];\n while(element){\n run(element);\n element = element.parent;\n }\n });\n // done running, clear\n this.events = [];\n this.eventElements = [];\n }\n checkPath(element, ctx) {\n if (!this.working || !ctx) {\n return;\n }\n const { events , eventElements } = this;\n events.forEach((param, i)=>{\n let { x , y } = param;\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!eventElements[i] && ctx.isPointInPath && ctx.isPointInPath(x, y)) {\n eventElements[i] = element;\n }\n });\n }\n checkBoundingBox(element, boundingBox) {\n if (!this.working || !boundingBox) {\n return;\n }\n const { events , eventElements } = this;\n events.forEach((param, i)=>{\n let { x , y } = param;\n if (!eventElements[i] && boundingBox.isPointInBox(x, y)) {\n eventElements[i] = element;\n }\n });\n }\n mapXY(x, y) {\n const { window , ctx } = this.screen;\n const point = new Point(x, y);\n let element = ctx.canvas;\n while(element){\n point.x -= element.offsetLeft;\n point.y -= element.offsetTop;\n element = element.offsetParent;\n }\n if (window === null || window === void 0 ? void 0 : window.scrollX) {\n point.x += window.scrollX;\n }\n if (window === null || window === void 0 ? void 0 : window.scrollY) {\n point.y += window.scrollY;\n }\n return point;\n }\n onClick(event) {\n const { x , y } = this.mapXY(event.clientX, event.clientY);\n this.events.push({\n type: 'onclick',\n x,\n y,\n run (eventTarget) {\n if (eventTarget.onClick) {\n eventTarget.onClick();\n }\n }\n });\n }\n onMouseMove(event) {\n const { x , y } = this.mapXY(event.clientX, event.clientY);\n this.events.push({\n type: 'onmousemove',\n x,\n y,\n run (eventTarget) {\n if (eventTarget.onMouseMove) {\n eventTarget.onMouseMove();\n }\n }\n });\n }\n constructor(screen){\n this.screen = screen;\n this.working = false;\n this.events = [];\n this.eventElements = [];\n this.onClick = this.onClick.bind(this);\n this.onMouseMove = this.onMouseMove.bind(this);\n }\n}\n\nconst defaultWindow = typeof window !== 'undefined' ? window : null;\nconst defaultFetch$1 = typeof fetch !== 'undefined' ? fetch.bind(undefined) // `fetch` depends on context: `someObject.fetch(...)` will throw error.\n : undefined;\nclass Screen {\n wait(checker) {\n this.waits.push(checker);\n }\n ready() {\n // eslint-disable-next-line @typescript-eslint/no-misused-promises\n if (!this.readyPromise) {\n return Promise.resolve();\n }\n return this.readyPromise;\n }\n isReady() {\n if (this.isReadyLock) {\n return true;\n }\n const isReadyLock = this.waits.every((_)=>_()\n );\n if (isReadyLock) {\n this.waits = [];\n if (this.resolveReady) {\n this.resolveReady();\n }\n }\n this.isReadyLock = isReadyLock;\n return isReadyLock;\n }\n setDefaults(ctx) {\n // initial values and defaults\n ctx.strokeStyle = 'rgba(0,0,0,0)';\n ctx.lineCap = 'butt';\n ctx.lineJoin = 'miter';\n ctx.miterLimit = 4;\n }\n setViewBox(param) {\n let { document , ctx , aspectRatio , width , desiredWidth , height , desiredHeight , minX =0 , minY =0 , refX , refY , clip =false , clipX =0 , clipY =0 } = param;\n // aspect ratio - http://www.w3.org/TR/SVG/coords.html#PreserveAspectRatioAttribute\n const cleanAspectRatio = compressSpaces(aspectRatio).replace(/^defer\\s/, '') // ignore defer\n ;\n const [aspectRatioAlign, aspectRatioMeetOrSlice] = cleanAspectRatio.split(' ');\n const align = aspectRatioAlign || 'xMidYMid';\n const meetOrSlice = aspectRatioMeetOrSlice || 'meet';\n // calculate scale\n const scaleX = width / desiredWidth;\n const scaleY = height / desiredHeight;\n const scaleMin = Math.min(scaleX, scaleY);\n const scaleMax = Math.max(scaleX, scaleY);\n let finalDesiredWidth = desiredWidth;\n let finalDesiredHeight = desiredHeight;\n if (meetOrSlice === 'meet') {\n finalDesiredWidth *= scaleMin;\n finalDesiredHeight *= scaleMin;\n }\n if (meetOrSlice === 'slice') {\n finalDesiredWidth *= scaleMax;\n finalDesiredHeight *= scaleMax;\n }\n const refXProp = new Property(document, 'refX', refX);\n const refYProp = new Property(document, 'refY', refY);\n const hasRefs = refXProp.hasValue() && refYProp.hasValue();\n if (hasRefs) {\n ctx.translate(-scaleMin * refXProp.getPixels('x'), -scaleMin * refYProp.getPixels('y'));\n }\n if (clip) {\n const scaledClipX = scaleMin * clipX;\n const scaledClipY = scaleMin * clipY;\n ctx.beginPath();\n ctx.moveTo(scaledClipX, scaledClipY);\n ctx.lineTo(width, scaledClipY);\n ctx.lineTo(width, height);\n ctx.lineTo(scaledClipX, height);\n ctx.closePath();\n ctx.clip();\n }\n if (!hasRefs) {\n const isMeetMinY = meetOrSlice === 'meet' && scaleMin === scaleY;\n const isSliceMaxY = meetOrSlice === 'slice' && scaleMax === scaleY;\n const isMeetMinX = meetOrSlice === 'meet' && scaleMin === scaleX;\n const isSliceMaxX = meetOrSlice === 'slice' && scaleMax === scaleX;\n if (align.startsWith('xMid') && (isMeetMinY || isSliceMaxY)) {\n ctx.translate(width / 2 - finalDesiredWidth / 2, 0);\n }\n if (align.endsWith('YMid') && (isMeetMinX || isSliceMaxX)) {\n ctx.translate(0, height / 2 - finalDesiredHeight / 2);\n }\n if (align.startsWith('xMax') && (isMeetMinY || isSliceMaxY)) {\n ctx.translate(width - finalDesiredWidth, 0);\n }\n if (align.endsWith('YMax') && (isMeetMinX || isSliceMaxX)) {\n ctx.translate(0, height - finalDesiredHeight);\n }\n }\n // scale\n switch(true){\n case align === 'none':\n ctx.scale(scaleX, scaleY);\n break;\n case meetOrSlice === 'meet':\n ctx.scale(scaleMin, scaleMin);\n break;\n case meetOrSlice === 'slice':\n ctx.scale(scaleMax, scaleMax);\n break;\n }\n // translate\n ctx.translate(-minX, -minY);\n }\n start(element) {\n let { enableRedraw =false , ignoreMouse =false , ignoreAnimation =false , ignoreDimensions =false , ignoreClear =false , forceRedraw , scaleWidth , scaleHeight , offsetX , offsetY } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n const { mouse } = this;\n const frameDuration = 1000 / Screen.FRAMERATE;\n this.isReadyLock = false;\n this.frameDuration = frameDuration;\n this.readyPromise = new Promise((resolve)=>{\n this.resolveReady = resolve;\n });\n if (this.isReady()) {\n this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);\n }\n if (!enableRedraw) {\n return;\n }\n let now = Date.now();\n let then = now;\n let delta = 0;\n const tick = ()=>{\n now = Date.now();\n delta = now - then;\n if (delta >= frameDuration) {\n then = now - delta % frameDuration;\n if (this.shouldUpdate(ignoreAnimation, forceRedraw)) {\n this.render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY);\n mouse.runEvents();\n }\n }\n this.intervalId = requestAnimationFrame__default[\"default\"](tick);\n };\n if (!ignoreMouse) {\n mouse.start();\n }\n this.intervalId = requestAnimationFrame__default[\"default\"](tick);\n }\n stop() {\n if (this.intervalId) {\n requestAnimationFrame__default[\"default\"].cancel(this.intervalId);\n this.intervalId = null;\n }\n this.mouse.stop();\n }\n shouldUpdate(ignoreAnimation, forceRedraw) {\n // need update from animations?\n if (!ignoreAnimation) {\n const { frameDuration } = this;\n const shouldUpdate1 = this.animations.reduce((shouldUpdate, animation)=>animation.update(frameDuration) || shouldUpdate\n , false);\n if (shouldUpdate1) {\n return true;\n }\n }\n // need update from redraw?\n if (typeof forceRedraw === 'function' && forceRedraw()) {\n return true;\n }\n if (!this.isReadyLock && this.isReady()) {\n return true;\n }\n // need update from mouse events?\n if (this.mouse.hasEvents()) {\n return true;\n }\n return false;\n }\n render(element, ignoreDimensions, ignoreClear, scaleWidth, scaleHeight, offsetX, offsetY) {\n const { viewPort , ctx , isFirstRender } = this;\n const canvas = ctx.canvas;\n viewPort.clear();\n if (canvas.width && canvas.height) {\n viewPort.setCurrent(canvas.width, canvas.height);\n }\n const widthStyle = element.getStyle('width');\n const heightStyle = element.getStyle('height');\n if (!ignoreDimensions && (isFirstRender || typeof scaleWidth !== 'number' && typeof scaleHeight !== 'number')) {\n // set canvas size\n if (widthStyle.hasValue()) {\n canvas.width = widthStyle.getPixels('x');\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (canvas.style) {\n canvas.style.width = \"\".concat(canvas.width, \"px\");\n }\n }\n if (heightStyle.hasValue()) {\n canvas.height = heightStyle.getPixels('y');\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (canvas.style) {\n canvas.style.height = \"\".concat(canvas.height, \"px\");\n }\n }\n }\n let cWidth = canvas.clientWidth || canvas.width;\n let cHeight = canvas.clientHeight || canvas.height;\n if (ignoreDimensions && widthStyle.hasValue() && heightStyle.hasValue()) {\n cWidth = widthStyle.getPixels('x');\n cHeight = heightStyle.getPixels('y');\n }\n viewPort.setCurrent(cWidth, cHeight);\n if (typeof offsetX === 'number') {\n element.getAttribute('x', true).setValue(offsetX);\n }\n if (typeof offsetY === 'number') {\n element.getAttribute('y', true).setValue(offsetY);\n }\n if (typeof scaleWidth === 'number' || typeof scaleHeight === 'number') {\n const viewBox = toNumbers(element.getAttribute('viewBox').getString());\n let xRatio = 0;\n let yRatio = 0;\n if (typeof scaleWidth === 'number') {\n const widthStyle = element.getStyle('width');\n if (widthStyle.hasValue()) {\n xRatio = widthStyle.getPixels('x') / scaleWidth;\n } else if (viewBox[2] && !isNaN(viewBox[2])) {\n xRatio = viewBox[2] / scaleWidth;\n }\n }\n if (typeof scaleHeight === 'number') {\n const heightStyle = element.getStyle('height');\n if (heightStyle.hasValue()) {\n yRatio = heightStyle.getPixels('y') / scaleHeight;\n } else if (viewBox[3] && !isNaN(viewBox[3])) {\n yRatio = viewBox[3] / scaleHeight;\n }\n }\n if (!xRatio) {\n xRatio = yRatio;\n }\n if (!yRatio) {\n yRatio = xRatio;\n }\n element.getAttribute('width', true).setValue(scaleWidth);\n element.getAttribute('height', true).setValue(scaleHeight);\n const transformStyle = element.getStyle('transform', true, true);\n transformStyle.setValue(\"\".concat(transformStyle.getString(), \" scale(\").concat(1 / xRatio, \", \").concat(1 / yRatio, \")\"));\n }\n // clear and render\n if (!ignoreClear) {\n ctx.clearRect(0, 0, cWidth, cHeight);\n }\n element.render(ctx);\n if (isFirstRender) {\n this.isFirstRender = false;\n }\n }\n constructor(ctx, { fetch =defaultFetch$1 , window =defaultWindow } = {}){\n this.ctx = ctx;\n this.viewPort = new ViewPort();\n this.mouse = new Mouse(this);\n this.animations = [];\n this.waits = [];\n this.frameDuration = 0;\n this.isReadyLock = false;\n this.isFirstRender = true;\n this.intervalId = null;\n this.window = window;\n if (!fetch) {\n throw new Error(\"Can't find 'fetch' in 'globalThis', please provide it via options\");\n }\n this.fetch = fetch;\n }\n}\nScreen.defaultWindow = defaultWindow;\nScreen.defaultFetch = defaultFetch$1;\nScreen.FRAMERATE = 30;\nScreen.MAX_VIRTUAL_PIXELS = 30000;\n\nconst { defaultFetch } = Screen;\nconst DefaultDOMParser = typeof DOMParser !== 'undefined' ? DOMParser : undefined;\nclass Parser {\n async parse(resource) {\n if (resource.startsWith('<')) {\n return this.parseFromString(resource);\n }\n return this.load(resource);\n }\n parseFromString(xml) {\n const parser = new this.DOMParser();\n try {\n return this.checkDocument(parser.parseFromString(xml, 'image/svg+xml'));\n } catch (err) {\n return this.checkDocument(parser.parseFromString(xml, 'text/xml'));\n }\n }\n checkDocument(document) {\n const parserError = document.getElementsByTagName('parsererror')[0];\n if (parserError) {\n throw new Error(parserError.textContent || 'Unknown parse error');\n }\n return document;\n }\n async load(url) {\n const response = await this.fetch(url);\n const xml = await response.text();\n return this.parseFromString(xml);\n }\n constructor({ fetch =defaultFetch , DOMParser =DefaultDOMParser } = {}){\n if (!fetch) {\n throw new Error(\"Can't find 'fetch' in 'globalThis', please provide it via options\");\n }\n if (!DOMParser) {\n throw new Error(\"Can't find 'DOMParser' in 'globalThis', please provide it via options\");\n }\n this.fetch = fetch;\n this.DOMParser = DOMParser;\n }\n}\n\nclass Translate {\n apply(ctx) {\n const { x , y } = this.point;\n ctx.translate(x || 0, y || 0);\n }\n unapply(ctx) {\n const { x , y } = this.point;\n ctx.translate(-1 * x || 0, -1 * y || 0);\n }\n applyToPoint(point) {\n const { x , y } = this.point;\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n x || 0,\n y || 0\n ]);\n }\n constructor(_, point){\n this.type = 'translate';\n this.point = Point.parse(point);\n }\n}\n\nclass Rotate {\n apply(ctx) {\n const { cx , cy , originX , originY , angle } = this;\n const tx = cx + originX.getPixels('x');\n const ty = cy + originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.rotate(angle.getRadians());\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { cx , cy , originX , originY , angle } = this;\n const tx = cx + originX.getPixels('x');\n const ty = cy + originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.rotate(-1 * angle.getRadians());\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n const { cx , cy , angle } = this;\n const rad = angle.getRadians();\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n cx || 0,\n cy || 0 // this.p.y\n ]);\n point.applyTransform([\n Math.cos(rad),\n Math.sin(rad),\n -Math.sin(rad),\n Math.cos(rad),\n 0,\n 0\n ]);\n point.applyTransform([\n 1,\n 0,\n 0,\n 1,\n -cx || 0,\n -cy || 0 // -this.p.y\n ]);\n }\n constructor(document, rotate, transformOrigin){\n this.type = 'rotate';\n const numbers = toNumbers(rotate);\n this.angle = new Property(document, 'angle', numbers[0]);\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n this.cx = numbers[1] || 0;\n this.cy = numbers[2] || 0;\n }\n}\n\nclass Scale {\n apply(ctx) {\n const { scale: { x , y } , originX , originY } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.scale(x, y || x);\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { scale: { x , y } , originX , originY } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.scale(1 / x, 1 / y || x);\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n const { x , y } = this.scale;\n point.applyTransform([\n x || 0,\n 0,\n 0,\n y || 0,\n 0,\n 0\n ]);\n }\n constructor(_, scale, transformOrigin){\n this.type = 'scale';\n const scaleSize = Point.parseScale(scale);\n // Workaround for node-canvas\n if (scaleSize.x === 0 || scaleSize.y === 0) {\n scaleSize.x = PSEUDO_ZERO;\n scaleSize.y = PSEUDO_ZERO;\n }\n this.scale = scaleSize;\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n }\n}\n\nclass Matrix {\n apply(ctx) {\n const { originX , originY , matrix } = this;\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\n ctx.translate(-tx, -ty);\n }\n unapply(ctx) {\n const { originX , originY , matrix } = this;\n const a = matrix[0];\n const b = matrix[2];\n const c = matrix[4];\n const d = matrix[1];\n const e = matrix[3];\n const f = matrix[5];\n const g = 0;\n const h = 0;\n const i = 1;\n const det = 1 / (a * (e * i - f * h) - b * (d * i - f * g) + c * (d * h - e * g));\n const tx = originX.getPixels('x');\n const ty = originY.getPixels('y');\n ctx.translate(tx, ty);\n ctx.transform(det * (e * i - f * h), det * (f * g - d * i), det * (c * h - b * i), det * (a * i - c * g), det * (b * f - c * e), det * (c * d - a * f));\n ctx.translate(-tx, -ty);\n }\n applyToPoint(point) {\n point.applyTransform(this.matrix);\n }\n constructor(_, matrix, transformOrigin){\n this.type = 'matrix';\n this.matrix = toMatrixValue(matrix);\n this.originX = transformOrigin[0];\n this.originY = transformOrigin[1];\n }\n}\n\nclass Skew extends Matrix {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skew';\n this.angle = new Property(document, 'angle', skew);\n }\n}\n\nclass SkewX extends Skew {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skewX';\n this.matrix = [\n 1,\n 0,\n Math.tan(this.angle.getRadians()),\n 1,\n 0,\n 0\n ];\n }\n}\n\nclass SkewY extends Skew {\n constructor(document, skew, transformOrigin){\n super(document, skew, transformOrigin);\n this.type = 'skewY';\n this.matrix = [\n 1,\n Math.tan(this.angle.getRadians()),\n 0,\n 1,\n 0,\n 0\n ];\n }\n}\n\nfunction parseTransforms(transform) {\n return compressSpaces(transform).trim().replace(/\\)([a-zA-Z])/g, ') $1').replace(/\\)(\\s?,\\s?)/g, ') ').split(/\\s(?=[a-z])/);\n}\nfunction parseTransform(transform) {\n const [type = '', value = ''] = transform.split('(');\n return [\n type.trim(),\n value.trim().replace(')', '')\n ];\n}\nclass Transform {\n static fromElement(document, element) {\n const transformStyle = element.getStyle('transform', false, true);\n if (transformStyle.hasValue()) {\n const [transformOriginXProperty, transformOriginYProperty = transformOriginXProperty] = element.getStyle('transform-origin', false, true).split();\n if (transformOriginXProperty && transformOriginYProperty) {\n const transformOrigin = [\n transformOriginXProperty,\n transformOriginYProperty\n ];\n return new Transform(document, transformStyle.getString(), transformOrigin);\n }\n }\n return null;\n }\n apply(ctx) {\n this.transforms.forEach((transform)=>transform.apply(ctx)\n );\n }\n unapply(ctx) {\n this.transforms.forEach((transform)=>transform.unapply(ctx)\n );\n }\n // TODO: applyToPoint unused ... remove?\n applyToPoint(point) {\n this.transforms.forEach((transform)=>transform.applyToPoint(point)\n );\n }\n constructor(document, transform1, transformOrigin){\n this.document = document;\n this.transforms = [];\n const data = parseTransforms(transform1);\n data.forEach((transform)=>{\n if (transform === 'none') {\n return;\n }\n const [type, value] = parseTransform(transform);\n const TransformType = Transform.transformTypes[type];\n if (TransformType) {\n this.transforms.push(new TransformType(this.document, value, transformOrigin));\n }\n });\n }\n}\nTransform.transformTypes = {\n translate: Translate,\n rotate: Rotate,\n scale: Scale,\n matrix: Matrix,\n skewX: SkewX,\n skewY: SkewY\n};\n\nclass Element {\n getAttribute(name) {\n let createIfNotExists = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n const attr = this.attributes[name];\n if (!attr && createIfNotExists) {\n const attr = new Property(this.document, name, '');\n this.attributes[name] = attr;\n return attr;\n }\n return attr || Property.empty(this.document);\n }\n getHrefAttribute() {\n let href;\n for(const key in this.attributes){\n if (key === 'href' || key.endsWith(':href')) {\n href = this.attributes[key];\n break;\n }\n }\n return href || Property.empty(this.document);\n }\n getStyle(name) {\n let createIfNotExists = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, skipAncestors = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n const style = this.styles[name];\n if (style) {\n return style;\n }\n const attr = this.getAttribute(name);\n if (attr.hasValue()) {\n this.styles[name] = attr // move up to me to cache\n ;\n return attr;\n }\n if (!skipAncestors) {\n const { parent } = this;\n if (parent) {\n const parentStyle = parent.getStyle(name);\n if (parentStyle.hasValue()) {\n return parentStyle;\n }\n }\n }\n if (createIfNotExists) {\n const style = new Property(this.document, name, '');\n this.styles[name] = style;\n return style;\n }\n return Property.empty(this.document);\n }\n render(ctx) {\n // don't render display=none\n // don't render visibility=hidden\n if (this.getStyle('display').getString() === 'none' || this.getStyle('visibility').getString() === 'hidden') {\n return;\n }\n ctx.save();\n if (this.getStyle('mask').hasValue()) {\n const mask = this.getStyle('mask').getDefinition();\n if (mask) {\n this.applyEffects(ctx);\n mask.apply(ctx, this);\n }\n } else if (this.getStyle('filter').getValue('none') !== 'none') {\n const filter = this.getStyle('filter').getDefinition();\n if (filter) {\n this.applyEffects(ctx);\n filter.apply(ctx, this);\n }\n } else {\n this.setContext(ctx);\n this.renderChildren(ctx);\n this.clearContext(ctx);\n }\n ctx.restore();\n }\n setContext(_) {\n // NO RENDER\n }\n applyEffects(ctx) {\n // transform\n const transform = Transform.fromElement(this.document, this);\n if (transform) {\n transform.apply(ctx);\n }\n // clip\n const clipPathStyleProp = this.getStyle('clip-path', false, true);\n if (clipPathStyleProp.hasValue()) {\n const clip = clipPathStyleProp.getDefinition();\n if (clip) {\n clip.apply(ctx);\n }\n }\n }\n clearContext(_) {\n // NO RENDER\n }\n renderChildren(ctx) {\n this.children.forEach((child)=>{\n child.render(ctx);\n });\n }\n addChild(childNode) {\n const child = childNode instanceof Element ? childNode : this.document.createElement(childNode);\n child.parent = this;\n if (!Element.ignoreChildTypes.includes(child.type)) {\n this.children.push(child);\n }\n }\n matchesSelector(selector) {\n var ref;\n const { node } = this;\n if (typeof node.matches === 'function') {\n return node.matches(selector);\n }\n const styleClasses = (ref = node.getAttribute) === null || ref === void 0 ? void 0 : ref.call(node, 'class');\n if (!styleClasses || styleClasses === '') {\n return false;\n }\n return styleClasses.split(' ').some((styleClass)=>\".\".concat(styleClass) === selector\n );\n }\n addStylesFromStyleDefinition() {\n const { styles , stylesSpecificity } = this.document;\n let styleProp;\n for(const selector in styles){\n if (!selector.startsWith('@') && this.matchesSelector(selector)) {\n const style = styles[selector];\n const specificity = stylesSpecificity[selector];\n if (style) {\n for(const name in style){\n let existingSpecificity = this.stylesSpecificity[name];\n if (typeof existingSpecificity === 'undefined') {\n existingSpecificity = '000';\n }\n if (specificity && specificity >= existingSpecificity) {\n styleProp = style[name];\n if (styleProp) {\n this.styles[name] = styleProp;\n }\n this.stylesSpecificity[name] = specificity;\n }\n }\n }\n }\n }\n }\n removeStyles(element, ignoreStyles) {\n const toRestore1 = ignoreStyles.reduce((toRestore, name)=>{\n const styleProp = element.getStyle(name);\n if (!styleProp.hasValue()) {\n return toRestore;\n }\n const value = styleProp.getString();\n styleProp.setValue('');\n return [\n ...toRestore,\n [\n name,\n value\n ]\n ];\n }, []);\n return toRestore1;\n }\n restoreStyles(element, styles) {\n styles.forEach((param)=>{\n let [name, value] = param;\n element.getStyle(name, true).setValue(value);\n });\n }\n isFirstChild() {\n var ref;\n return ((ref = this.parent) === null || ref === void 0 ? void 0 : ref.children.indexOf(this)) === 0;\n }\n constructor(document, node, captureTextNodes = false){\n this.document = document;\n this.node = node;\n this.captureTextNodes = captureTextNodes;\n this.type = '';\n this.attributes = {};\n this.styles = {};\n this.stylesSpecificity = {};\n this.animationFrozen = false;\n this.animationFrozenValue = '';\n this.parent = null;\n this.children = [];\n if (!node || node.nodeType !== 1) {\n return;\n }\n // add attributes\n Array.from(node.attributes).forEach((attribute)=>{\n const nodeName = normalizeAttributeName(attribute.nodeName);\n this.attributes[nodeName] = new Property(document, nodeName, attribute.value);\n });\n this.addStylesFromStyleDefinition();\n // add inline styles\n if (this.getAttribute('style').hasValue()) {\n const styles = this.getAttribute('style').getString().split(';').map((_)=>_.trim()\n );\n styles.forEach((style)=>{\n if (!style) {\n return;\n }\n const [name, value] = style.split(':').map((_)=>_.trim()\n );\n if (name) {\n this.styles[name] = new Property(document, name, value);\n }\n });\n }\n const { definitions } = document;\n const id = this.getAttribute('id');\n // add id\n if (id.hasValue()) {\n if (!definitions[id.getString()]) {\n definitions[id.getString()] = this;\n }\n }\n Array.from(node.childNodes).forEach((childNode)=>{\n if (childNode.nodeType === 1) {\n this.addChild(childNode) // ELEMENT_NODE\n ;\n } else if (captureTextNodes && (childNode.nodeType === 3 || childNode.nodeType === 4)) {\n const textNode = document.createTextNode(childNode);\n if (textNode.getText().length > 0) {\n this.addChild(textNode) // TEXT_NODE\n ;\n }\n }\n });\n }\n}\nElement.ignoreChildTypes = [\n 'title'\n];\n\nclass UnknownElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n }\n}\n\nfunction wrapFontFamily(fontFamily) {\n const trimmed = fontFamily.trim();\n return /^('|\")/.test(trimmed) ? trimmed : \"\\\"\".concat(trimmed, \"\\\"\");\n}\nfunction prepareFontFamily(fontFamily) {\n return typeof process === 'undefined' ? fontFamily : fontFamily.trim().split(',').map(wrapFontFamily).join(',');\n}\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-style\n * @param fontStyle\n * @returns CSS font style.\n */ function prepareFontStyle(fontStyle) {\n if (!fontStyle) {\n return '';\n }\n const targetFontStyle = fontStyle.trim().toLowerCase();\n switch(targetFontStyle){\n case 'normal':\n case 'italic':\n case 'oblique':\n case 'inherit':\n case 'initial':\n case 'unset':\n return targetFontStyle;\n default:\n if (/^oblique\\s+(-|)\\d+deg$/.test(targetFontStyle)) {\n return targetFontStyle;\n }\n return '';\n }\n}\n/**\n * https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight\n * @param fontWeight\n * @returns CSS font weight.\n */ function prepareFontWeight(fontWeight) {\n if (!fontWeight) {\n return '';\n }\n const targetFontWeight = fontWeight.trim().toLowerCase();\n switch(targetFontWeight){\n case 'normal':\n case 'bold':\n case 'lighter':\n case 'bolder':\n case 'inherit':\n case 'initial':\n case 'unset':\n return targetFontWeight;\n default:\n if (/^[\\d.]+$/.test(targetFontWeight)) {\n return targetFontWeight;\n }\n return '';\n }\n}\nclass Font {\n static parse() {\n let font = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : '', inherit = arguments.length > 1 ? arguments[1] : void 0;\n let fontStyle = '';\n let fontVariant = '';\n let fontWeight = '';\n let fontSize = '';\n let fontFamily = '';\n const parts = compressSpaces(font).trim().split(' ');\n const set = {\n fontSize: false,\n fontStyle: false,\n fontWeight: false,\n fontVariant: false\n };\n parts.forEach((part)=>{\n switch(true){\n case !set.fontStyle && Font.styles.includes(part):\n if (part !== 'inherit') {\n fontStyle = part;\n }\n set.fontStyle = true;\n break;\n case !set.fontVariant && Font.variants.includes(part):\n if (part !== 'inherit') {\n fontVariant = part;\n }\n set.fontStyle = true;\n set.fontVariant = true;\n break;\n case !set.fontWeight && Font.weights.includes(part):\n if (part !== 'inherit') {\n fontWeight = part;\n }\n set.fontStyle = true;\n set.fontVariant = true;\n set.fontWeight = true;\n break;\n case !set.fontSize:\n if (part !== 'inherit') {\n fontSize = part.split('/')[0] || '';\n }\n set.fontStyle = true;\n set.fontVariant = true;\n set.fontWeight = true;\n set.fontSize = true;\n break;\n default:\n if (part !== 'inherit') {\n fontFamily += part;\n }\n }\n });\n return new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit);\n }\n toString() {\n return [\n prepareFontStyle(this.fontStyle),\n this.fontVariant,\n prepareFontWeight(this.fontWeight),\n this.fontSize,\n // Wrap fontFamily only on nodejs and only for canvas.ctx\n prepareFontFamily(this.fontFamily)\n ].join(' ').trim();\n }\n constructor(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit){\n const inheritFont = inherit ? typeof inherit === 'string' ? Font.parse(inherit) : inherit : {};\n this.fontFamily = fontFamily || inheritFont.fontFamily;\n this.fontSize = fontSize || inheritFont.fontSize;\n this.fontStyle = fontStyle || inheritFont.fontStyle;\n this.fontWeight = fontWeight || inheritFont.fontWeight;\n this.fontVariant = fontVariant || inheritFont.fontVariant;\n }\n}\nFont.styles = 'normal|italic|oblique|inherit';\nFont.variants = 'normal|small-caps|inherit';\nFont.weights = 'normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit';\n\nclass BoundingBox {\n get x() {\n return this.x1;\n }\n get y() {\n return this.y1;\n }\n get width() {\n return this.x2 - this.x1;\n }\n get height() {\n return this.y2 - this.y1;\n }\n addPoint(x, y) {\n if (typeof x !== 'undefined') {\n if (isNaN(this.x1) || isNaN(this.x2)) {\n this.x1 = x;\n this.x2 = x;\n }\n if (x < this.x1) {\n this.x1 = x;\n }\n if (x > this.x2) {\n this.x2 = x;\n }\n }\n if (typeof y !== 'undefined') {\n if (isNaN(this.y1) || isNaN(this.y2)) {\n this.y1 = y;\n this.y2 = y;\n }\n if (y < this.y1) {\n this.y1 = y;\n }\n if (y > this.y2) {\n this.y2 = y;\n }\n }\n }\n addX(x) {\n this.addPoint(x, 0);\n }\n addY(y) {\n this.addPoint(0, y);\n }\n addBoundingBox(boundingBox) {\n if (!boundingBox) {\n return;\n }\n const { x1 , y1 , x2 , y2 } = boundingBox;\n this.addPoint(x1, y1);\n this.addPoint(x2, y2);\n }\n sumCubic(t, p0, p1, p2, p3) {\n return Math.pow(1 - t, 3) * p0 + 3 * Math.pow(1 - t, 2) * t * p1 + 3 * (1 - t) * Math.pow(t, 2) * p2 + Math.pow(t, 3) * p3;\n }\n bezierCurveAdd(forX, p0, p1, p2, p3) {\n const b = 6 * p0 - 12 * p1 + 6 * p2;\n const a = -3 * p0 + 9 * p1 - 9 * p2 + 3 * p3;\n const c = 3 * p1 - 3 * p0;\n if (a === 0) {\n if (b === 0) {\n return;\n }\n const t = -c / b;\n if (0 < t && t < 1) {\n if (forX) {\n this.addX(this.sumCubic(t, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t, p0, p1, p2, p3));\n }\n }\n return;\n }\n const b2ac = Math.pow(b, 2) - 4 * c * a;\n if (b2ac < 0) {\n return;\n }\n const t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n if (0 < t1 && t1 < 1) {\n if (forX) {\n this.addX(this.sumCubic(t1, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t1, p0, p1, p2, p3));\n }\n }\n const t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n if (0 < t2 && t2 < 1) {\n if (forX) {\n this.addX(this.sumCubic(t2, p0, p1, p2, p3));\n } else {\n this.addY(this.sumCubic(t2, p0, p1, p2, p3));\n }\n }\n }\n // from http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html\n addBezierCurve(p0x, p0y, p1x, p1y, p2x, p2y, p3x, p3y) {\n this.addPoint(p0x, p0y);\n this.addPoint(p3x, p3y);\n this.bezierCurveAdd(true, p0x, p1x, p2x, p3x);\n this.bezierCurveAdd(false, p0y, p1y, p2y, p3y);\n }\n addQuadraticCurve(p0x, p0y, p1x, p1y, p2x, p2y) {\n const cp1x = p0x + 2 / 3 * (p1x - p0x) // CP1 = QP0 + 2/3 *(QP1-QP0)\n ;\n const cp1y = p0y + 2 / 3 * (p1y - p0y) // CP1 = QP0 + 2/3 *(QP1-QP0)\n ;\n const cp2x = cp1x + 1 / 3 * (p2x - p0x) // CP2 = CP1 + 1/3 *(QP2-QP0)\n ;\n const cp2y = cp1y + 1 / 3 * (p2y - p0y) // CP2 = CP1 + 1/3 *(QP2-QP0)\n ;\n this.addBezierCurve(p0x, p0y, cp1x, cp2x, cp1y, cp2y, p2x, p2y);\n }\n isPointInBox(x, y) {\n const { x1 , y1 , x2 , y2 } = this;\n return x1 <= x && x <= x2 && y1 <= y && y <= y2;\n }\n constructor(x1 = Number.NaN, y1 = Number.NaN, x2 = Number.NaN, y2 = Number.NaN){\n this.x1 = x1;\n this.y1 = y1;\n this.x2 = x2;\n this.y2 = y2;\n this.addPoint(x1, y1);\n this.addPoint(x2, y2);\n }\n}\n\nclass RenderedElement extends Element {\n calculateOpacity() {\n let opacity = 1;\n // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n let element = this;\n while(element){\n const opacityStyle = element.getStyle('opacity', false, true) // no ancestors on style call\n ;\n if (opacityStyle.hasValue(true)) {\n opacity *= opacityStyle.getNumber();\n }\n element = element.parent;\n }\n return opacity;\n }\n setContext(ctx) {\n let fromMeasure = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n if (!fromMeasure) {\n // fill\n const fillStyleProp = this.getStyle('fill');\n const fillOpacityStyleProp = this.getStyle('fill-opacity');\n const strokeStyleProp = this.getStyle('stroke');\n const strokeOpacityProp = this.getStyle('stroke-opacity');\n if (fillStyleProp.isUrlDefinition()) {\n const fillStyle = fillStyleProp.getFillStyleDefinition(this, fillOpacityStyleProp);\n if (fillStyle) {\n ctx.fillStyle = fillStyle;\n }\n } else if (fillStyleProp.hasValue()) {\n if (fillStyleProp.getString() === 'currentColor') {\n fillStyleProp.setValue(this.getStyle('color').getColor());\n }\n const fillStyle = fillStyleProp.getColor();\n if (fillStyle !== 'inherit') {\n ctx.fillStyle = fillStyle === 'none' ? 'rgba(0,0,0,0)' : fillStyle;\n }\n }\n if (fillOpacityStyleProp.hasValue()) {\n const fillStyle = new Property(this.document, 'fill', ctx.fillStyle).addOpacity(fillOpacityStyleProp).getColor();\n ctx.fillStyle = fillStyle;\n }\n // stroke\n if (strokeStyleProp.isUrlDefinition()) {\n const strokeStyle = strokeStyleProp.getFillStyleDefinition(this, strokeOpacityProp);\n if (strokeStyle) {\n ctx.strokeStyle = strokeStyle;\n }\n } else if (strokeStyleProp.hasValue()) {\n if (strokeStyleProp.getString() === 'currentColor') {\n strokeStyleProp.setValue(this.getStyle('color').getColor());\n }\n const strokeStyle = strokeStyleProp.getString();\n if (strokeStyle !== 'inherit') {\n ctx.strokeStyle = strokeStyle === 'none' ? 'rgba(0,0,0,0)' : strokeStyle;\n }\n }\n if (strokeOpacityProp.hasValue()) {\n const strokeStyle = new Property(this.document, 'stroke', ctx.strokeStyle).addOpacity(strokeOpacityProp).getString();\n ctx.strokeStyle = strokeStyle;\n }\n const strokeWidthStyleProp = this.getStyle('stroke-width');\n if (strokeWidthStyleProp.hasValue()) {\n const newLineWidth = strokeWidthStyleProp.getPixels();\n ctx.lineWidth = !newLineWidth ? PSEUDO_ZERO // browsers don't respect 0 (or node-canvas? :-)\n : newLineWidth;\n }\n const strokeLinecapStyleProp = this.getStyle('stroke-linecap');\n const strokeLinejoinStyleProp = this.getStyle('stroke-linejoin');\n const strokeMiterlimitProp = this.getStyle('stroke-miterlimit');\n // NEED TEST\n // const pointOrderStyleProp = this.getStyle('paint-order');\n const strokeDasharrayStyleProp = this.getStyle('stroke-dasharray');\n const strokeDashoffsetProp = this.getStyle('stroke-dashoffset');\n if (strokeLinecapStyleProp.hasValue()) {\n ctx.lineCap = strokeLinecapStyleProp.getString();\n }\n if (strokeLinejoinStyleProp.hasValue()) {\n ctx.lineJoin = strokeLinejoinStyleProp.getString();\n }\n if (strokeMiterlimitProp.hasValue()) {\n ctx.miterLimit = strokeMiterlimitProp.getNumber();\n }\n // NEED TEST\n // if (pointOrderStyleProp.hasValue()) {\n // // ?\n // ctx.paintOrder = pointOrderStyleProp.getValue();\n // }\n if (strokeDasharrayStyleProp.hasValue() && strokeDasharrayStyleProp.getString() !== 'none') {\n const gaps = toNumbers(strokeDasharrayStyleProp.getString());\n if (typeof ctx.setLineDash !== 'undefined') {\n ctx.setLineDash(gaps);\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.webkitLineDash !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.webkitLineDash = gaps;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.mozDash !== 'undefined' && !(gaps.length === 1 && gaps[0] === 0)) {\n // @ts-expect-error Handle browser prefix.\n ctx.mozDash = gaps;\n }\n const offset = strokeDashoffsetProp.getPixels();\n if (typeof ctx.lineDashOffset !== 'undefined') {\n ctx.lineDashOffset = offset;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.webkitLineDashOffset !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.webkitLineDashOffset = offset;\n } else // @ts-expect-error Handle browser prefix.\n if (typeof ctx.mozDashOffset !== 'undefined') {\n // @ts-expect-error Handle browser prefix.\n ctx.mozDashOffset = offset;\n }\n }\n }\n // font\n this.modifiedEmSizeStack = false;\n if (typeof ctx.font !== 'undefined') {\n const fontStyleProp = this.getStyle('font');\n const fontStyleStyleProp = this.getStyle('font-style');\n const fontVariantStyleProp = this.getStyle('font-variant');\n const fontWeightStyleProp = this.getStyle('font-weight');\n const fontSizeStyleProp = this.getStyle('font-size');\n const fontFamilyStyleProp = this.getStyle('font-family');\n const font = new Font(fontStyleStyleProp.getString(), fontVariantStyleProp.getString(), fontWeightStyleProp.getString(), fontSizeStyleProp.hasValue() ? \"\".concat(fontSizeStyleProp.getPixels(true), \"px\") : '', fontFamilyStyleProp.getString(), Font.parse(fontStyleProp.getString(), ctx.font));\n fontStyleStyleProp.setValue(font.fontStyle);\n fontVariantStyleProp.setValue(font.fontVariant);\n fontWeightStyleProp.setValue(font.fontWeight);\n fontSizeStyleProp.setValue(font.fontSize);\n fontFamilyStyleProp.setValue(font.fontFamily);\n ctx.font = font.toString();\n if (fontSizeStyleProp.isPixels()) {\n this.document.emSize = fontSizeStyleProp.getPixels();\n this.modifiedEmSizeStack = true;\n }\n }\n if (!fromMeasure) {\n // effects\n this.applyEffects(ctx);\n // opacity\n ctx.globalAlpha = this.calculateOpacity();\n }\n }\n clearContext(ctx) {\n super.clearContext(ctx);\n if (this.modifiedEmSizeStack) {\n this.document.popEmSize();\n }\n }\n constructor(...args){\n super(...args);\n this.modifiedEmSizeStack = false;\n }\n}\n\nclass TextElement extends RenderedElement {\n setContext(ctx) {\n let fromMeasure = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n super.setContext(ctx, fromMeasure);\n const textBaseline = this.getStyle('dominant-baseline').getTextBaseline() || this.getStyle('alignment-baseline').getTextBaseline();\n if (textBaseline) {\n ctx.textBaseline = textBaseline;\n }\n }\n initializeCoordinates() {\n this.x = 0;\n this.y = 0;\n this.leafTexts = [];\n this.textChunkStart = 0;\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n }\n getBoundingBox(ctx) {\n if (this.type !== 'text') {\n return this.getTElementBoundingBox(ctx);\n }\n // first, calculate child positions\n this.initializeCoordinates();\n this.adjustChildCoordinatesRecursive(ctx);\n let boundingBox = null;\n // then calculate bounding box\n this.children.forEach((_, i)=>{\n const childBoundingBox = this.getChildBoundingBox(ctx, this, this, i);\n if (!boundingBox) {\n boundingBox = childBoundingBox;\n } else {\n boundingBox.addBoundingBox(childBoundingBox);\n }\n });\n return boundingBox;\n }\n getFontSize() {\n const { document , parent } = this;\n const inheritFontSize = Font.parse(document.ctx.font).fontSize;\n const fontSize = parent.getStyle('font-size').getNumber(inheritFontSize);\n return fontSize;\n }\n getTElementBoundingBox(ctx) {\n const fontSize = this.getFontSize();\n return new BoundingBox(this.x, this.y - fontSize, this.x + this.measureText(ctx), this.y);\n }\n getGlyph(font, text, i) {\n const char = text[i];\n let glyph;\n if (font.isArabic) {\n var ref;\n const len = text.length;\n const prevChar = text[i - 1];\n const nextChar = text[i + 1];\n let arabicForm = 'isolated';\n if ((i === 0 || prevChar === ' ') && i < len - 1 && nextChar !== ' ') {\n arabicForm = 'terminal';\n }\n if (i > 0 && prevChar !== ' ' && i < len - 1 && nextChar !== ' ') {\n arabicForm = 'medial';\n }\n if (i > 0 && prevChar !== ' ' && (i === len - 1 || nextChar === ' ')) {\n arabicForm = 'initial';\n }\n glyph = ((ref = font.arabicGlyphs[char]) === null || ref === void 0 ? void 0 : ref[arabicForm]) || font.glyphs[char];\n } else {\n glyph = font.glyphs[char];\n }\n if (!glyph) {\n glyph = font.missingGlyph;\n }\n return glyph;\n }\n getText() {\n return '';\n }\n getTextFromNode(node) {\n const textNode = node || this.node;\n const childNodes = Array.from(textNode.parentNode.childNodes);\n const index = childNodes.indexOf(textNode);\n const lastIndex = childNodes.length - 1;\n let text = compressSpaces(// textNode.value\n // || textNode.text\n textNode.textContent || '');\n if (index === 0) {\n text = trimLeft(text);\n }\n if (index === lastIndex) {\n text = trimRight(text);\n }\n return text;\n }\n renderChildren(ctx) {\n if (this.type !== 'text') {\n this.renderTElementChildren(ctx);\n return;\n }\n // first, calculate child positions\n this.initializeCoordinates();\n this.adjustChildCoordinatesRecursive(ctx);\n // then render\n this.children.forEach((_, i)=>{\n this.renderChild(ctx, this, this, i);\n });\n const { mouse } = this.document.screen;\n // Do not calc bounding box if mouse is not working.\n if (mouse.isWorking()) {\n mouse.checkBoundingBox(this, this.getBoundingBox(ctx));\n }\n }\n renderTElementChildren(ctx) {\n const { document , parent } = this;\n const renderText = this.getText();\n const customFont = parent.getStyle('font-family').getDefinition();\n if (customFont) {\n const { unitsPerEm } = customFont.fontFace;\n const ctxFont = Font.parse(document.ctx.font);\n const fontSize = parent.getStyle('font-size').getNumber(ctxFont.fontSize);\n const fontStyle = parent.getStyle('font-style').getString(ctxFont.fontStyle);\n const scale = fontSize / unitsPerEm;\n const text = customFont.isRTL ? renderText.split('').reverse().join('') : renderText;\n const dx = toNumbers(parent.getAttribute('dx').getString());\n const len = text.length;\n for(let i = 0; i < len; i++){\n const glyph = this.getGlyph(customFont, text, i);\n ctx.translate(this.x, this.y);\n ctx.scale(scale, -scale);\n const lw = ctx.lineWidth;\n ctx.lineWidth = ctx.lineWidth * unitsPerEm / fontSize;\n if (fontStyle === 'italic') {\n ctx.transform(1, 0, 0.4, 1, 0, 0);\n }\n glyph.render(ctx);\n if (fontStyle === 'italic') {\n ctx.transform(1, 0, -0.4, 1, 0, 0);\n }\n ctx.lineWidth = lw;\n ctx.scale(1 / scale, -1 / scale);\n ctx.translate(-this.x, -this.y);\n this.x += fontSize * (glyph.horizAdvX || customFont.horizAdvX) / unitsPerEm;\n if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {\n this.x += dx[i];\n }\n }\n return;\n }\n const { x , y } = this;\n // NEED TEST\n // if (ctx.paintOrder === 'stroke') {\n // if (ctx.strokeStyle) {\n // ctx.strokeText(renderText, x, y);\n // }\n // if (ctx.fillStyle) {\n // ctx.fillText(renderText, x, y);\n // }\n // } else {\n if (ctx.fillStyle) {\n ctx.fillText(renderText, x, y);\n }\n if (ctx.strokeStyle) {\n ctx.strokeText(renderText, x, y);\n }\n // }\n }\n applyAnchoring() {\n if (this.textChunkStart >= this.leafTexts.length) {\n return;\n }\n // This is basically the \"Apply anchoring\" part of https://www.w3.org/TR/SVG2/text.html#TextLayoutAlgorithm.\n // The difference is that we apply the anchoring as soon as a chunk is finished. This saves some extra looping.\n // Vertical text is not supported.\n const firstElement = this.leafTexts[this.textChunkStart];\n const textAnchor = firstElement.getStyle('text-anchor').getString('start');\n const isRTL = false // we treat RTL like LTR\n ;\n let shift = 0;\n if (textAnchor === 'start' && !isRTL || textAnchor === 'end' && isRTL) {\n shift = firstElement.x - this.minX;\n } else if (textAnchor === 'end' && !isRTL || textAnchor === 'start' && isRTL) {\n shift = firstElement.x - this.maxX;\n } else {\n shift = firstElement.x - (this.minX + this.maxX) / 2;\n }\n for(let i = this.textChunkStart; i < this.leafTexts.length; i++){\n this.leafTexts[i].x += shift;\n }\n // start new chunk\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.textChunkStart = this.leafTexts.length;\n }\n adjustChildCoordinatesRecursive(ctx) {\n this.children.forEach((_, i)=>{\n this.adjustChildCoordinatesRecursiveCore(ctx, this, this, i);\n });\n this.applyAnchoring();\n }\n adjustChildCoordinatesRecursiveCore(ctx, textParent, parent, i1) {\n const child = parent.children[i1];\n if (child.children.length > 0) {\n child.children.forEach((_, i)=>{\n textParent.adjustChildCoordinatesRecursiveCore(ctx, textParent, child, i);\n });\n } else {\n // only leafs are relevant\n this.adjustChildCoordinates(ctx, textParent, parent, i1);\n }\n }\n adjustChildCoordinates(ctx, textParent, parent, i) {\n const child = parent.children[i];\n if (typeof child.measureText !== 'function') {\n return child;\n }\n ctx.save();\n child.setContext(ctx, true);\n const xAttr = child.getAttribute('x');\n const yAttr = child.getAttribute('y');\n const dxAttr = child.getAttribute('dx');\n const dyAttr = child.getAttribute('dy');\n const customFont = child.getStyle('font-family').getDefinition();\n const isRTL = Boolean(customFont === null || customFont === void 0 ? void 0 : customFont.isRTL);\n if (i === 0) {\n // First children inherit attributes from parent(s). Positional attributes\n // are only inherited from a parent to it's first child.\n if (!xAttr.hasValue()) {\n xAttr.setValue(child.getInheritedAttribute('x'));\n }\n if (!yAttr.hasValue()) {\n yAttr.setValue(child.getInheritedAttribute('y'));\n }\n if (!dxAttr.hasValue()) {\n dxAttr.setValue(child.getInheritedAttribute('dx'));\n }\n if (!dyAttr.hasValue()) {\n dyAttr.setValue(child.getInheritedAttribute('dy'));\n }\n }\n const width = child.measureText(ctx);\n if (isRTL) {\n textParent.x -= width;\n }\n if (xAttr.hasValue()) {\n // an \"x\" attribute marks the start of a new chunk\n textParent.applyAnchoring();\n child.x = xAttr.getPixels('x');\n if (dxAttr.hasValue()) {\n child.x += dxAttr.getPixels('x');\n }\n } else {\n if (dxAttr.hasValue()) {\n textParent.x += dxAttr.getPixels('x');\n }\n child.x = textParent.x;\n }\n textParent.x = child.x;\n if (!isRTL) {\n textParent.x += width;\n }\n if (yAttr.hasValue()) {\n child.y = yAttr.getPixels('y');\n if (dyAttr.hasValue()) {\n child.y += dyAttr.getPixels('y');\n }\n } else {\n if (dyAttr.hasValue()) {\n textParent.y += dyAttr.getPixels('y');\n }\n child.y = textParent.y;\n }\n textParent.y = child.y;\n // update the current chunk and it's bounds\n textParent.leafTexts.push(child);\n textParent.minX = Math.min(textParent.minX, child.x, child.x + width);\n textParent.maxX = Math.max(textParent.maxX, child.x, child.x + width);\n child.clearContext(ctx);\n ctx.restore();\n return child;\n }\n getChildBoundingBox(ctx, textParent, parent, i2) {\n const child = parent.children[i2];\n // not a text node?\n if (typeof child.getBoundingBox !== 'function') {\n return null;\n }\n const boundingBox = child.getBoundingBox(ctx);\n if (boundingBox) {\n child.children.forEach((_, i)=>{\n const childBoundingBox = textParent.getChildBoundingBox(ctx, textParent, child, i);\n boundingBox.addBoundingBox(childBoundingBox);\n });\n }\n return boundingBox;\n }\n renderChild(ctx, textParent, parent, i3) {\n const child = parent.children[i3];\n child.render(ctx);\n child.children.forEach((_, i)=>{\n textParent.renderChild(ctx, textParent, child, i);\n });\n }\n measureText(ctx) {\n const { measureCache } = this;\n if (~measureCache) {\n return measureCache;\n }\n const renderText = this.getText();\n const measure = this.measureTargetText(ctx, renderText);\n this.measureCache = measure;\n return measure;\n }\n measureTargetText(ctx, targetText) {\n if (!targetText.length) {\n return 0;\n }\n const { parent } = this;\n const customFont = parent.getStyle('font-family').getDefinition();\n if (customFont) {\n const fontSize = this.getFontSize();\n const text = customFont.isRTL ? targetText.split('').reverse().join('') : targetText;\n const dx = toNumbers(parent.getAttribute('dx').getString());\n const len = text.length;\n let measure = 0;\n for(let i = 0; i < len; i++){\n const glyph = this.getGlyph(customFont, text, i);\n measure += (glyph.horizAdvX || customFont.horizAdvX) * fontSize / customFont.fontFace.unitsPerEm;\n if (typeof dx[i] !== 'undefined' && !isNaN(dx[i])) {\n measure += dx[i];\n }\n }\n return measure;\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!ctx.measureText) {\n return targetText.length * 10;\n }\n ctx.save();\n this.setContext(ctx, true);\n const { width: measure } = ctx.measureText(targetText);\n this.clearContext(ctx);\n ctx.restore();\n return measure;\n }\n /**\n * Inherits positional attributes from {@link TextElement} parent(s). Attributes\n * are only inherited from a parent to its first child.\n * @param name - The attribute name.\n * @returns The attribute value or null.\n */ getInheritedAttribute(name) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias,consistent-this\n let current = this;\n while(current instanceof TextElement && current.isFirstChild() && current.parent){\n const parentAttr = current.parent.getAttribute(name);\n if (parentAttr.hasValue(true)) {\n return parentAttr.getString('0');\n }\n current = current.parent;\n }\n return null;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, new.target === TextElement ? true : captureTextNodes);\n this.type = 'text';\n this.x = 0;\n this.y = 0;\n this.leafTexts = [];\n this.textChunkStart = 0;\n this.minX = Number.POSITIVE_INFINITY;\n this.maxX = Number.NEGATIVE_INFINITY;\n this.measureCache = -1;\n }\n}\n\nclass TSpanElement extends TextElement {\n getText() {\n return this.text;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, new.target === TSpanElement ? true : captureTextNodes);\n this.type = 'tspan';\n // if this node has children, then they own the text\n this.text = this.children.length > 0 ? '' : this.getTextFromNode();\n }\n}\n\nclass TextNode extends TSpanElement {\n constructor(...args){\n super(...args);\n this.type = 'textNode';\n }\n}\n\nclass PathParser extends svgPathdata.SVGPathData {\n reset() {\n this.i = -1;\n this.command = null;\n this.previousCommand = null;\n this.start = new Point(0, 0);\n this.control = new Point(0, 0);\n this.current = new Point(0, 0);\n this.points = [];\n this.angles = [];\n }\n isEnd() {\n const { i , commands } = this;\n return i >= commands.length - 1;\n }\n next() {\n const command = this.commands[++this.i];\n this.previousCommand = this.command;\n this.command = command;\n return command;\n }\n getPoint() {\n let xProp = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'x', yProp = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 'y';\n const point = new Point(this.command[xProp], this.command[yProp]);\n return this.makeAbsolute(point);\n }\n getAsControlPoint(xProp, yProp) {\n const point = this.getPoint(xProp, yProp);\n this.control = point;\n return point;\n }\n getAsCurrentPoint(xProp, yProp) {\n const point = this.getPoint(xProp, yProp);\n this.current = point;\n return point;\n }\n getReflectedControlPoint() {\n const previousCommand = this.previousCommand.type;\n if (previousCommand !== svgPathdata.SVGPathData.CURVE_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_CURVE_TO && previousCommand !== svgPathdata.SVGPathData.QUAD_TO && previousCommand !== svgPathdata.SVGPathData.SMOOTH_QUAD_TO) {\n return this.current;\n }\n // reflect point\n const { current: { x: cx , y: cy } , control: { x: ox , y: oy } } = this;\n const point = new Point(2 * cx - ox, 2 * cy - oy);\n return point;\n }\n makeAbsolute(point) {\n if (this.command.relative) {\n const { x , y } = this.current;\n point.x += x;\n point.y += y;\n }\n return point;\n }\n addMarker(point, from, priorTo) {\n const { points , angles } = this;\n // if the last angle isn't filled in because we didn't have this point yet ...\n if (priorTo && angles.length > 0 && !angles[angles.length - 1]) {\n angles[angles.length - 1] = points[points.length - 1].angleTo(priorTo);\n }\n this.addMarkerAngle(point, from ? from.angleTo(point) : null);\n }\n addMarkerAngle(point, angle) {\n this.points.push(point);\n this.angles.push(angle);\n }\n getMarkerPoints() {\n return this.points;\n }\n getMarkerAngles() {\n const { angles } = this;\n const len = angles.length;\n for(let i = 0; i < len; i++){\n if (!angles[i]) {\n for(let j = i + 1; j < len; j++){\n if (angles[j]) {\n angles[i] = angles[j];\n break;\n }\n }\n }\n }\n return angles;\n }\n constructor(path){\n super(path// Fix spaces after signs.\n .replace(/([+\\-.])\\s+/gm, '$1')// Remove invalid part.\n .replace(/[^MmZzLlHhVvCcSsQqTtAae\\d\\s.,+-].*/g, ''));\n this.control = new Point(0, 0);\n this.start = new Point(0, 0);\n this.current = new Point(0, 0);\n this.command = null;\n this.commands = this.commands;\n this.i = -1;\n this.previousCommand = null;\n this.points = [];\n this.angles = [];\n }\n}\n\nclass PathElement extends RenderedElement {\n path(ctx) {\n const { pathParser } = this;\n const boundingBox = new BoundingBox();\n pathParser.reset();\n if (ctx) {\n ctx.beginPath();\n }\n while(!pathParser.isEnd()){\n switch(pathParser.next().type){\n case PathParser.MOVE_TO:\n this.pathM(ctx, boundingBox);\n break;\n case PathParser.LINE_TO:\n this.pathL(ctx, boundingBox);\n break;\n case PathParser.HORIZ_LINE_TO:\n this.pathH(ctx, boundingBox);\n break;\n case PathParser.VERT_LINE_TO:\n this.pathV(ctx, boundingBox);\n break;\n case PathParser.CURVE_TO:\n this.pathC(ctx, boundingBox);\n break;\n case PathParser.SMOOTH_CURVE_TO:\n this.pathS(ctx, boundingBox);\n break;\n case PathParser.QUAD_TO:\n this.pathQ(ctx, boundingBox);\n break;\n case PathParser.SMOOTH_QUAD_TO:\n this.pathT(ctx, boundingBox);\n break;\n case PathParser.ARC:\n this.pathA(ctx, boundingBox);\n break;\n case PathParser.CLOSE_PATH:\n this.pathZ(ctx, boundingBox);\n break;\n }\n }\n return boundingBox;\n }\n getBoundingBox(_ctx) {\n return this.path();\n }\n getMarkers() {\n const { pathParser } = this;\n const points = pathParser.getMarkerPoints();\n const angles = pathParser.getMarkerAngles();\n const markers = points.map((point, i)=>[\n point,\n angles[i]\n ]\n );\n return markers;\n }\n renderChildren(ctx) {\n this.path(ctx);\n this.document.screen.mouse.checkPath(this, ctx);\n const fillRuleStyleProp = this.getStyle('fill-rule');\n if (ctx.fillStyle !== '') {\n if (fillRuleStyleProp.getString('inherit') !== 'inherit') {\n ctx.fill(fillRuleStyleProp.getString());\n } else {\n ctx.fill();\n }\n }\n if (ctx.strokeStyle !== '') {\n if (this.getAttribute('vector-effect').getString() === 'non-scaling-stroke') {\n ctx.save();\n ctx.setTransform(1, 0, 0, 1, 0, 0);\n ctx.stroke();\n ctx.restore();\n } else {\n ctx.stroke();\n }\n }\n const markers = this.getMarkers();\n if (markers) {\n const markersLastIndex = markers.length - 1;\n const markerStartStyleProp = this.getStyle('marker-start');\n const markerMidStyleProp = this.getStyle('marker-mid');\n const markerEndStyleProp = this.getStyle('marker-end');\n if (markerStartStyleProp.isUrlDefinition()) {\n const marker = markerStartStyleProp.getDefinition();\n const [point, angle] = markers[0];\n marker.render(ctx, point, angle);\n }\n if (markerMidStyleProp.isUrlDefinition()) {\n const marker = markerMidStyleProp.getDefinition();\n for(let i = 1; i < markersLastIndex; i++){\n const [point, angle] = markers[i];\n marker.render(ctx, point, angle);\n }\n }\n if (markerEndStyleProp.isUrlDefinition()) {\n const marker = markerEndStyleProp.getDefinition();\n const [point, angle] = markers[markersLastIndex];\n marker.render(ctx, point, angle);\n }\n }\n }\n static pathM(pathParser) {\n const point = pathParser.getAsCurrentPoint();\n pathParser.start = pathParser.current;\n return {\n point\n };\n }\n pathM(ctx, boundingBox) {\n const { pathParser } = this;\n const { point } = PathElement.pathM(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.moveTo(x, y);\n }\n }\n static pathL(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getAsCurrentPoint();\n return {\n current,\n point\n };\n }\n pathL(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathL(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathH(pathParser) {\n const { current , command } = pathParser;\n const point = new Point((command.relative ? current.x : 0) + command.x, current.y);\n pathParser.current = point;\n return {\n current,\n point\n };\n }\n pathH(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathH(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathV(pathParser) {\n const { current , command } = pathParser;\n const point = new Point(current.x, (command.relative ? current.y : 0) + command.y);\n pathParser.current = point;\n return {\n current,\n point\n };\n }\n pathV(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point } = PathElement.pathV(pathParser);\n const { x , y } = point;\n pathParser.addMarker(point, current);\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n }\n static pathC(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getPoint('x1', 'y1');\n const controlPoint = pathParser.getAsControlPoint('x2', 'y2');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n point,\n controlPoint,\n currentPoint\n };\n }\n pathC(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point , controlPoint , currentPoint } = PathElement.pathC(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, point);\n boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathS(pathParser) {\n const { current } = pathParser;\n const point = pathParser.getReflectedControlPoint();\n const controlPoint = pathParser.getAsControlPoint('x2', 'y2');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n point,\n controlPoint,\n currentPoint\n };\n }\n pathS(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , point , controlPoint , currentPoint } = PathElement.pathS(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, point);\n boundingBox.addBezierCurve(current.x, current.y, point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.bezierCurveTo(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathQ(pathParser) {\n const { current } = pathParser;\n const controlPoint = pathParser.getAsControlPoint('x1', 'y1');\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n controlPoint,\n currentPoint\n };\n }\n pathQ(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , controlPoint , currentPoint } = PathElement.pathQ(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, controlPoint);\n boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathT(pathParser) {\n const { current } = pathParser;\n const controlPoint = pathParser.getReflectedControlPoint();\n pathParser.control = controlPoint;\n const currentPoint = pathParser.getAsCurrentPoint();\n return {\n current,\n controlPoint,\n currentPoint\n };\n }\n pathT(ctx, boundingBox) {\n const { pathParser } = this;\n const { current , controlPoint , currentPoint } = PathElement.pathT(pathParser);\n pathParser.addMarker(currentPoint, controlPoint, controlPoint);\n boundingBox.addQuadraticCurve(current.x, current.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n if (ctx) {\n ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n }\n static pathA(pathParser) {\n const { current , command } = pathParser;\n let { rX , rY , xRot , lArcFlag , sweepFlag } = command;\n const xAxisRotation = xRot * (Math.PI / 180);\n const currentPoint = pathParser.getAsCurrentPoint();\n // Conversion from endpoint to center parameterization\n // http://www.w3.org/TR/SVG11/implnote.html#ArcImplementationNotes\n // x1', y1'\n const currp = new Point(Math.cos(xAxisRotation) * (current.x - currentPoint.x) / 2 + Math.sin(xAxisRotation) * (current.y - currentPoint.y) / 2, -Math.sin(xAxisRotation) * (current.x - currentPoint.x) / 2 + Math.cos(xAxisRotation) * (current.y - currentPoint.y) / 2);\n // adjust radii\n const l = Math.pow(currp.x, 2) / Math.pow(rX, 2) + Math.pow(currp.y, 2) / Math.pow(rY, 2);\n if (l > 1) {\n rX *= Math.sqrt(l);\n rY *= Math.sqrt(l);\n }\n // cx', cy'\n let s = (lArcFlag === sweepFlag ? -1 : 1) * Math.sqrt((Math.pow(rX, 2) * Math.pow(rY, 2) - Math.pow(rX, 2) * Math.pow(currp.y, 2) - Math.pow(rY, 2) * Math.pow(currp.x, 2)) / (Math.pow(rX, 2) * Math.pow(currp.y, 2) + Math.pow(rY, 2) * Math.pow(currp.x, 2)));\n if (isNaN(s)) {\n s = 0;\n }\n const cpp = new Point(s * rX * currp.y / rY, s * -rY * currp.x / rX);\n // cx, cy\n const centp = new Point((current.x + currentPoint.x) / 2 + Math.cos(xAxisRotation) * cpp.x - Math.sin(xAxisRotation) * cpp.y, (current.y + currentPoint.y) / 2 + Math.sin(xAxisRotation) * cpp.x + Math.cos(xAxisRotation) * cpp.y);\n // initial angle\n const a1 = vectorsAngle([\n 1,\n 0\n ], [\n (currp.x - cpp.x) / rX,\n (currp.y - cpp.y) / rY\n ]) // θ1\n ;\n // angle delta\n const u = [\n (currp.x - cpp.x) / rX,\n (currp.y - cpp.y) / rY\n ];\n const v = [\n (-currp.x - cpp.x) / rX,\n (-currp.y - cpp.y) / rY\n ];\n let ad = vectorsAngle(u, v) // Δθ\n ;\n if (vectorsRatio(u, v) <= -1) {\n ad = Math.PI;\n }\n if (vectorsRatio(u, v) >= 1) {\n ad = 0;\n }\n return {\n currentPoint,\n rX,\n rY,\n sweepFlag,\n xAxisRotation,\n centp,\n a1,\n ad\n };\n }\n pathA(ctx, boundingBox) {\n const { pathParser } = this;\n const { currentPoint , rX , rY , sweepFlag , xAxisRotation , centp , a1 , ad } = PathElement.pathA(pathParser);\n // for markers\n const dir = 1 - sweepFlag ? 1 : -1;\n const ah = a1 + dir * (ad / 2);\n const halfWay = new Point(centp.x + rX * Math.cos(ah), centp.y + rY * Math.sin(ah));\n pathParser.addMarkerAngle(halfWay, ah - dir * Math.PI / 2);\n pathParser.addMarkerAngle(currentPoint, ah - dir * Math.PI);\n boundingBox.addPoint(currentPoint.x, currentPoint.y) // TODO: this is too naive, make it better\n ;\n if (ctx && !isNaN(a1) && !isNaN(ad)) {\n const r = rX > rY ? rX : rY;\n const sx = rX > rY ? 1 : rX / rY;\n const sy = rX > rY ? rY / rX : 1;\n ctx.translate(centp.x, centp.y);\n ctx.rotate(xAxisRotation);\n ctx.scale(sx, sy);\n ctx.arc(0, 0, r, a1, a1 + ad, Boolean(1 - sweepFlag));\n ctx.scale(1 / sx, 1 / sy);\n ctx.rotate(-xAxisRotation);\n ctx.translate(-centp.x, -centp.y);\n }\n }\n static pathZ(pathParser) {\n pathParser.current = pathParser.start;\n }\n pathZ(ctx, boundingBox) {\n PathElement.pathZ(this.pathParser);\n if (ctx) {\n // only close path if it is not a straight line\n if (boundingBox.x1 !== boundingBox.x2 && boundingBox.y1 !== boundingBox.y2) {\n ctx.closePath();\n }\n }\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'path';\n this.pathParser = new PathParser(this.getAttribute('d').getString());\n }\n}\n\nclass SVGElement extends RenderedElement {\n setContext(ctx) {\n var ref;\n const { document } = this;\n const { screen , window } = document;\n const canvas = ctx.canvas;\n screen.setDefaults(ctx);\n if ('style' in canvas && typeof ctx.font !== 'undefined' && window && typeof window.getComputedStyle !== 'undefined') {\n ctx.font = window.getComputedStyle(canvas).getPropertyValue('font');\n const fontSizeProp = new Property(document, 'fontSize', Font.parse(ctx.font).fontSize);\n if (fontSizeProp.hasValue()) {\n document.rootEmSize = fontSizeProp.getPixels('y');\n document.emSize = document.rootEmSize;\n }\n }\n // create new view port\n if (!this.getAttribute('x').hasValue()) {\n this.getAttribute('x', true).setValue(0);\n }\n if (!this.getAttribute('y').hasValue()) {\n this.getAttribute('y', true).setValue(0);\n }\n let { width , height } = screen.viewPort;\n if (!this.getStyle('width').hasValue()) {\n this.getStyle('width', true).setValue('100%');\n }\n if (!this.getStyle('height').hasValue()) {\n this.getStyle('height', true).setValue('100%');\n }\n if (!this.getStyle('color').hasValue()) {\n this.getStyle('color', true).setValue('black');\n }\n const refXAttr = this.getAttribute('refX');\n const refYAttr = this.getAttribute('refY');\n const viewBoxAttr = this.getAttribute('viewBox');\n const viewBox = viewBoxAttr.hasValue() ? toNumbers(viewBoxAttr.getString()) : null;\n const clip = !this.root && this.getStyle('overflow').getValue('hidden') !== 'visible';\n let minX = 0;\n let minY = 0;\n let clipX = 0;\n let clipY = 0;\n if (viewBox) {\n minX = viewBox[0];\n minY = viewBox[1];\n }\n if (!this.root) {\n width = this.getStyle('width').getPixels('x');\n height = this.getStyle('height').getPixels('y');\n if (this.type === 'marker') {\n clipX = minX;\n clipY = minY;\n minX = 0;\n minY = 0;\n }\n }\n screen.viewPort.setCurrent(width, height);\n // Default value of transform-origin is center only for root SVG elements\n // https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/transform-origin\n if (this.node // is not temporary SVGElement\n && (!this.parent || ((ref = this.node.parentNode) === null || ref === void 0 ? void 0 : ref.nodeName) === 'foreignObject') && this.getStyle('transform', false, true).hasValue() && !this.getStyle('transform-origin', false, true).hasValue()) {\n this.getStyle('transform-origin', true, true).setValue('50% 50%');\n }\n super.setContext(ctx);\n ctx.translate(this.getAttribute('x').getPixels('x'), this.getAttribute('y').getPixels('y'));\n if (viewBox) {\n width = viewBox[2];\n height = viewBox[3];\n }\n document.setViewBox({\n ctx,\n aspectRatio: this.getAttribute('preserveAspectRatio').getString(),\n width: screen.viewPort.width,\n desiredWidth: width,\n height: screen.viewPort.height,\n desiredHeight: height,\n minX,\n minY,\n refX: refXAttr.getValue(),\n refY: refYAttr.getValue(),\n clip,\n clipX,\n clipY\n });\n if (viewBox) {\n screen.viewPort.removeCurrent();\n screen.viewPort.setCurrent(width, height);\n }\n }\n clearContext(ctx) {\n super.clearContext(ctx);\n this.document.screen.viewPort.removeCurrent();\n }\n /**\n * Resize SVG to fit in given size.\n * @param width\n * @param height\n * @param preserveAspectRatio\n */ resize(width) {\n let height = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : width, preserveAspectRatio = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n const widthAttr = this.getAttribute('width', true);\n const heightAttr = this.getAttribute('height', true);\n const viewBoxAttr = this.getAttribute('viewBox');\n const styleAttr = this.getAttribute('style');\n const originWidth = widthAttr.getNumber(0);\n const originHeight = heightAttr.getNumber(0);\n if (preserveAspectRatio) {\n if (typeof preserveAspectRatio === 'string') {\n this.getAttribute('preserveAspectRatio', true).setValue(preserveAspectRatio);\n } else {\n const preserveAspectRatioAttr = this.getAttribute('preserveAspectRatio');\n if (preserveAspectRatioAttr.hasValue()) {\n preserveAspectRatioAttr.setValue(preserveAspectRatioAttr.getString().replace(/^\\s*(\\S.*\\S)\\s*$/, '$1'));\n }\n }\n }\n widthAttr.setValue(width);\n heightAttr.setValue(height);\n if (!viewBoxAttr.hasValue()) {\n viewBoxAttr.setValue(\"0 0 \".concat(originWidth || width, \" \").concat(originHeight || height));\n }\n if (styleAttr.hasValue()) {\n const widthStyle = this.getStyle('width');\n const heightStyle = this.getStyle('height');\n if (widthStyle.hasValue()) {\n widthStyle.setValue(\"\".concat(width, \"px\"));\n }\n if (heightStyle.hasValue()) {\n heightStyle.setValue(\"\".concat(height, \"px\"));\n }\n }\n }\n constructor(...args){\n super(...args);\n this.type = 'svg';\n this.root = false;\n }\n}\n\nclass RectElement extends PathElement {\n path(ctx) {\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width', false, true).getPixels('x');\n const height = this.getStyle('height', false, true).getPixels('y');\n const rxAttr = this.getAttribute('rx');\n const ryAttr = this.getAttribute('ry');\n let rx = rxAttr.getPixels('x');\n let ry = ryAttr.getPixels('y');\n if (rxAttr.hasValue() && !ryAttr.hasValue()) {\n ry = rx;\n }\n if (ryAttr.hasValue() && !rxAttr.hasValue()) {\n rx = ry;\n }\n rx = Math.min(rx, width / 2);\n ry = Math.min(ry, height / 2);\n if (ctx) {\n const KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);\n ctx.beginPath() // always start the path so we don't fill prior paths\n ;\n if (height > 0 && width > 0) {\n ctx.moveTo(x + rx, y);\n ctx.lineTo(x + width - rx, y);\n ctx.bezierCurveTo(x + width - rx + KAPPA * rx, y, x + width, y + ry - KAPPA * ry, x + width, y + ry);\n ctx.lineTo(x + width, y + height - ry);\n ctx.bezierCurveTo(x + width, y + height - ry + KAPPA * ry, x + width - rx + KAPPA * rx, y + height, x + width - rx, y + height);\n ctx.lineTo(x + rx, y + height);\n ctx.bezierCurveTo(x + rx - KAPPA * rx, y + height, x, y + height - ry + KAPPA * ry, x, y + height - ry);\n ctx.lineTo(x, y + ry);\n ctx.bezierCurveTo(x, y + ry - KAPPA * ry, x + rx - KAPPA * rx, y, x + rx, y);\n ctx.closePath();\n }\n }\n return new BoundingBox(x, y, x + width, y + height);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'rect';\n }\n}\n\nclass CircleElement extends PathElement {\n path(ctx) {\n const cx = this.getAttribute('cx').getPixels('x');\n const cy = this.getAttribute('cy').getPixels('y');\n const r = this.getAttribute('r').getPixels();\n if (ctx && r > 0) {\n ctx.beginPath();\n ctx.arc(cx, cy, r, 0, Math.PI * 2, false);\n ctx.closePath();\n }\n return new BoundingBox(cx - r, cy - r, cx + r, cy + r);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'circle';\n }\n}\n\nclass EllipseElement extends PathElement {\n path(ctx) {\n const KAPPA = 4 * ((Math.sqrt(2) - 1) / 3);\n const rx = this.getAttribute('rx').getPixels('x');\n const ry = this.getAttribute('ry').getPixels('y');\n const cx = this.getAttribute('cx').getPixels('x');\n const cy = this.getAttribute('cy').getPixels('y');\n if (ctx && rx > 0 && ry > 0) {\n ctx.beginPath();\n ctx.moveTo(cx + rx, cy);\n ctx.bezierCurveTo(cx + rx, cy + KAPPA * ry, cx + KAPPA * rx, cy + ry, cx, cy + ry);\n ctx.bezierCurveTo(cx - KAPPA * rx, cy + ry, cx - rx, cy + KAPPA * ry, cx - rx, cy);\n ctx.bezierCurveTo(cx - rx, cy - KAPPA * ry, cx - KAPPA * rx, cy - ry, cx, cy - ry);\n ctx.bezierCurveTo(cx + KAPPA * rx, cy - ry, cx + rx, cy - KAPPA * ry, cx + rx, cy);\n ctx.closePath();\n }\n return new BoundingBox(cx - rx, cy - ry, cx + rx, cy + ry);\n }\n getMarkers() {\n return null;\n }\n constructor(...args){\n super(...args);\n this.type = 'ellipse';\n }\n}\n\nclass LineElement extends PathElement {\n getPoints() {\n return [\n new Point(this.getAttribute('x1').getPixels('x'), this.getAttribute('y1').getPixels('y')),\n new Point(this.getAttribute('x2').getPixels('x'), this.getAttribute('y2').getPixels('y'))\n ];\n }\n path(ctx) {\n const [{ x: x0 , y: y0 }, { x: x1 , y: y1 }] = this.getPoints();\n if (ctx) {\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n ctx.lineTo(x1, y1);\n }\n return new BoundingBox(x0, y0, x1, y1);\n }\n getMarkers() {\n const [p0, p1] = this.getPoints();\n const a = p0.angleTo(p1);\n return [\n [\n p0,\n a\n ],\n [\n p1,\n a\n ]\n ];\n }\n constructor(...args){\n super(...args);\n this.type = 'line';\n }\n}\n\nclass PolylineElement extends PathElement {\n path(ctx) {\n const { points } = this;\n const [{ x: x0 , y: y0 }] = points;\n const boundingBox = new BoundingBox(x0, y0);\n if (ctx) {\n ctx.beginPath();\n ctx.moveTo(x0, y0);\n }\n points.forEach((param)=>{\n let { x , y } = param;\n boundingBox.addPoint(x, y);\n if (ctx) {\n ctx.lineTo(x, y);\n }\n });\n return boundingBox;\n }\n getMarkers() {\n const { points } = this;\n const lastIndex = points.length - 1;\n const markers = [];\n points.forEach((point, i)=>{\n if (i === lastIndex) {\n return;\n }\n markers.push([\n point,\n point.angleTo(points[i + 1])\n ]);\n });\n if (markers.length > 0) {\n markers.push([\n points[points.length - 1],\n markers[markers.length - 1][1]\n ]);\n }\n return markers;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'polyline';\n this.points = [];\n this.points = Point.parsePath(this.getAttribute('points').getString());\n }\n}\n\nclass PolygonElement extends PolylineElement {\n path(ctx) {\n const boundingBox = super.path(ctx);\n const [{ x , y }] = this.points;\n if (ctx) {\n ctx.lineTo(x, y);\n ctx.closePath();\n }\n return boundingBox;\n }\n constructor(...args){\n super(...args);\n this.type = 'polygon';\n }\n}\n\nclass PatternElement extends Element {\n createPattern(ctx, _, parentOpacityProp) {\n const width = this.getStyle('width').getPixels('x', true);\n const height = this.getStyle('height').getPixels('y', true);\n // render me using a temporary svg element\n const patternSvg = new SVGElement(this.document, null);\n patternSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());\n patternSvg.attributes.width = new Property(this.document, 'width', \"\".concat(width, \"px\"));\n patternSvg.attributes.height = new Property(this.document, 'height', \"\".concat(height, \"px\"));\n patternSvg.attributes.transform = new Property(this.document, 'transform', this.getAttribute('patternTransform').getValue());\n patternSvg.children = this.children;\n const patternCanvas = this.document.createCanvas(width, height);\n const patternCtx = patternCanvas.getContext('2d');\n const xAttr = this.getAttribute('x');\n const yAttr = this.getAttribute('y');\n if (xAttr.hasValue() && yAttr.hasValue()) {\n patternCtx.translate(xAttr.getPixels('x', true), yAttr.getPixels('y', true));\n }\n if (parentOpacityProp.hasValue()) {\n this.styles['fill-opacity'] = parentOpacityProp;\n } else {\n Reflect.deleteProperty(this.styles, 'fill-opacity');\n }\n // render 3x3 grid so when we transform there's no white space on edges\n for(let x = -1; x <= 1; x++){\n for(let y = -1; y <= 1; y++){\n patternCtx.save();\n patternSvg.attributes.x = new Property(this.document, 'x', x * patternCanvas.width);\n patternSvg.attributes.y = new Property(this.document, 'y', y * patternCanvas.height);\n patternSvg.render(patternCtx);\n patternCtx.restore();\n }\n }\n const pattern = ctx.createPattern(patternCanvas, 'repeat');\n return pattern;\n }\n constructor(...args){\n super(...args);\n this.type = 'pattern';\n }\n}\n\nclass MarkerElement extends Element {\n render(ctx, point, angle) {\n if (!point) {\n return;\n }\n const { x , y } = point;\n const orient = this.getAttribute('orient').getString('auto');\n const markerUnits = this.getAttribute('markerUnits').getString('strokeWidth');\n ctx.translate(x, y);\n if (orient === 'auto') {\n ctx.rotate(angle);\n }\n if (markerUnits === 'strokeWidth') {\n ctx.scale(ctx.lineWidth, ctx.lineWidth);\n }\n ctx.save();\n // render me using a temporary svg element\n const markerSvg = new SVGElement(this.document);\n markerSvg.type = this.type;\n markerSvg.attributes.viewBox = new Property(this.document, 'viewBox', this.getAttribute('viewBox').getValue());\n markerSvg.attributes.refX = new Property(this.document, 'refX', this.getAttribute('refX').getValue());\n markerSvg.attributes.refY = new Property(this.document, 'refY', this.getAttribute('refY').getValue());\n markerSvg.attributes.width = new Property(this.document, 'width', this.getAttribute('markerWidth').getValue());\n markerSvg.attributes.height = new Property(this.document, 'height', this.getAttribute('markerHeight').getValue());\n markerSvg.attributes.overflow = new Property(this.document, 'overflow', this.getAttribute('overflow').getValue());\n markerSvg.attributes.fill = new Property(this.document, 'fill', this.getAttribute('fill').getColor('black'));\n markerSvg.attributes.stroke = new Property(this.document, 'stroke', this.getAttribute('stroke').getValue('none'));\n markerSvg.children = this.children;\n markerSvg.render(ctx);\n ctx.restore();\n if (markerUnits === 'strokeWidth') {\n ctx.scale(1 / ctx.lineWidth, 1 / ctx.lineWidth);\n }\n if (orient === 'auto') {\n ctx.rotate(-angle);\n }\n ctx.translate(-x, -y);\n }\n constructor(...args){\n super(...args);\n this.type = 'marker';\n }\n}\n\nclass DefsElement extends Element {\n render() {\n // NOOP\n }\n constructor(...args){\n super(...args);\n this.type = 'defs';\n }\n}\n\nclass GElement extends RenderedElement {\n getBoundingBox(ctx) {\n const boundingBox = new BoundingBox();\n this.children.forEach((child)=>{\n boundingBox.addBoundingBox(child.getBoundingBox(ctx));\n });\n return boundingBox;\n }\n constructor(...args){\n super(...args);\n this.type = 'g';\n }\n}\n\nclass GradientElement extends Element {\n getGradientUnits() {\n return this.getAttribute('gradientUnits').getString('objectBoundingBox');\n }\n createGradient(ctx, element, parentOpacityProp) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias, consistent-this\n let stopsContainer = this;\n if (this.getHrefAttribute().hasValue()) {\n stopsContainer = this.getHrefAttribute().getDefinition();\n this.inheritStopContainer(stopsContainer);\n }\n const { stops } = stopsContainer;\n const gradient = this.getGradient(ctx, element);\n if (!gradient) {\n return this.addParentOpacity(parentOpacityProp, stops[stops.length - 1].color);\n }\n stops.forEach((stop)=>{\n gradient.addColorStop(stop.offset, this.addParentOpacity(parentOpacityProp, stop.color));\n });\n if (this.getAttribute('gradientTransform').hasValue()) {\n // render as transformed pattern on temporary canvas\n const { document } = this;\n const { MAX_VIRTUAL_PIXELS } = Screen;\n const { viewPort } = document.screen;\n const rootView = viewPort.getRoot();\n const rect = new RectElement(document);\n rect.attributes.x = new Property(document, 'x', -MAX_VIRTUAL_PIXELS / 3);\n rect.attributes.y = new Property(document, 'y', -MAX_VIRTUAL_PIXELS / 3);\n rect.attributes.width = new Property(document, 'width', MAX_VIRTUAL_PIXELS);\n rect.attributes.height = new Property(document, 'height', MAX_VIRTUAL_PIXELS);\n const group = new GElement(document);\n group.attributes.transform = new Property(document, 'transform', this.getAttribute('gradientTransform').getValue());\n group.children = [\n rect\n ];\n const patternSvg = new SVGElement(document);\n patternSvg.attributes.x = new Property(document, 'x', 0);\n patternSvg.attributes.y = new Property(document, 'y', 0);\n patternSvg.attributes.width = new Property(document, 'width', rootView.width);\n patternSvg.attributes.height = new Property(document, 'height', rootView.height);\n patternSvg.children = [\n group\n ];\n const patternCanvas = document.createCanvas(rootView.width, rootView.height);\n const patternCtx = patternCanvas.getContext('2d');\n patternCtx.fillStyle = gradient;\n patternSvg.render(patternCtx);\n return patternCtx.createPattern(patternCanvas, 'no-repeat');\n }\n return gradient;\n }\n inheritStopContainer(stopsContainer) {\n this.attributesToInherit.forEach((attributeToInherit)=>{\n if (!this.getAttribute(attributeToInherit).hasValue() && stopsContainer.getAttribute(attributeToInherit).hasValue()) {\n this.getAttribute(attributeToInherit, true).setValue(stopsContainer.getAttribute(attributeToInherit).getValue());\n }\n });\n }\n addParentOpacity(parentOpacityProp, color) {\n if (parentOpacityProp.hasValue()) {\n const colorProp = new Property(this.document, 'color', color);\n return colorProp.addOpacity(parentOpacityProp).getColor();\n }\n return color;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.attributesToInherit = [\n 'gradientUnits'\n ];\n this.stops = [];\n const { stops , children } = this;\n children.forEach((child)=>{\n if (child.type === 'stop') {\n stops.push(child);\n }\n });\n }\n}\n\nclass LinearGradientElement extends GradientElement {\n getGradient(ctx, element) {\n const isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';\n const boundingBox = isBoundingBoxUnits ? element.getBoundingBox(ctx) : null;\n if (isBoundingBoxUnits && !boundingBox) {\n return null;\n }\n if (!this.getAttribute('x1').hasValue() && !this.getAttribute('y1').hasValue() && !this.getAttribute('x2').hasValue() && !this.getAttribute('y2').hasValue()) {\n this.getAttribute('x1', true).setValue(0);\n this.getAttribute('y1', true).setValue(0);\n this.getAttribute('x2', true).setValue(1);\n this.getAttribute('y2', true).setValue(0);\n }\n const x1 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x1').getNumber() : this.getAttribute('x1').getPixels('x');\n const y1 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y1').getNumber() : this.getAttribute('y1').getPixels('y');\n const x2 = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('x2').getNumber() : this.getAttribute('x2').getPixels('x');\n const y2 = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('y2').getNumber() : this.getAttribute('y2').getPixels('y');\n if (x1 === x2 && y1 === y2) {\n return null;\n }\n return ctx.createLinearGradient(x1, y1, x2, y2);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'linearGradient';\n this.attributesToInherit.push('x1', 'y1', 'x2', 'y2');\n }\n}\n\nclass RadialGradientElement extends GradientElement {\n getGradient(ctx, element) {\n const isBoundingBoxUnits = this.getGradientUnits() === 'objectBoundingBox';\n const boundingBox = element.getBoundingBox(ctx);\n if (isBoundingBoxUnits && !boundingBox) {\n return null;\n }\n if (!this.getAttribute('cx').hasValue()) {\n this.getAttribute('cx', true).setValue('50%');\n }\n if (!this.getAttribute('cy').hasValue()) {\n this.getAttribute('cy', true).setValue('50%');\n }\n if (!this.getAttribute('r').hasValue()) {\n this.getAttribute('r', true).setValue('50%');\n }\n const cx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('cx').getNumber() : this.getAttribute('cx').getPixels('x');\n const cy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('cy').getNumber() : this.getAttribute('cy').getPixels('y');\n let fx = cx;\n let fy = cy;\n if (this.getAttribute('fx').hasValue()) {\n fx = isBoundingBoxUnits ? boundingBox.x + boundingBox.width * this.getAttribute('fx').getNumber() : this.getAttribute('fx').getPixels('x');\n }\n if (this.getAttribute('fy').hasValue()) {\n fy = isBoundingBoxUnits ? boundingBox.y + boundingBox.height * this.getAttribute('fy').getNumber() : this.getAttribute('fy').getPixels('y');\n }\n const r = isBoundingBoxUnits ? (boundingBox.width + boundingBox.height) / 2 * this.getAttribute('r').getNumber() : this.getAttribute('r').getPixels();\n const fr = this.getAttribute('fr').getPixels();\n return ctx.createRadialGradient(fx, fy, fr, cx, cy, r);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'radialGradient';\n this.attributesToInherit.push('cx', 'cy', 'r', 'fx', 'fy', 'fr');\n }\n}\n\nclass StopElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'stop';\n const offset = Math.max(0, Math.min(1, this.getAttribute('offset').getNumber()));\n const stopOpacity = this.getStyle('stop-opacity');\n let stopColor = this.getStyle('stop-color', true);\n if (stopColor.getString() === '') {\n stopColor.setValue('#000');\n }\n if (stopOpacity.hasValue()) {\n stopColor = stopColor.addOpacity(stopOpacity);\n }\n this.offset = offset;\n this.color = stopColor.getColor();\n }\n}\n\nclass AnimateElement extends Element {\n getProperty() {\n const attributeType = this.getAttribute('attributeType').getString();\n const attributeName = this.getAttribute('attributeName').getString();\n if (attributeType === 'CSS') {\n return this.parent.getStyle(attributeName, true);\n }\n return this.parent.getAttribute(attributeName, true);\n }\n calcValue() {\n const { initialUnits } = this;\n const { progress , from , to } = this.getProgress();\n // tween value linearly\n let newValue = from.getNumber() + (to.getNumber() - from.getNumber()) * progress;\n if (initialUnits === '%') {\n newValue *= 100 // numValue() returns 0-1 whereas properties are 0-100\n ;\n }\n return \"\".concat(newValue).concat(initialUnits);\n }\n update(delta) {\n const { parent } = this;\n const prop = this.getProperty();\n // set initial value\n if (!this.initialValue) {\n this.initialValue = prop.getString();\n this.initialUnits = prop.getUnits();\n }\n // if we're past the end time\n if (this.duration > this.maxDuration) {\n const fill = this.getAttribute('fill').getString('remove');\n // loop for indefinitely repeating animations\n if (this.getAttribute('repeatCount').getString() === 'indefinite' || this.getAttribute('repeatDur').getString() === 'indefinite') {\n this.duration = 0;\n } else if (fill === 'freeze' && !this.frozen) {\n this.frozen = true;\n if (parent && prop) {\n parent.animationFrozen = true;\n parent.animationFrozenValue = prop.getString();\n }\n } else if (fill === 'remove' && !this.removed) {\n this.removed = true;\n if (parent && prop) {\n prop.setValue(parent.animationFrozen ? parent.animationFrozenValue : this.initialValue);\n }\n return true;\n }\n return false;\n }\n this.duration += delta;\n // if we're past the begin time\n let updated = false;\n if (this.begin < this.duration) {\n let newValue = this.calcValue() // tween\n ;\n const typeAttr = this.getAttribute('type');\n if (typeAttr.hasValue()) {\n // for transform, etc.\n const type = typeAttr.getString();\n newValue = \"\".concat(type, \"(\").concat(newValue, \")\");\n }\n prop.setValue(newValue);\n updated = true;\n }\n return updated;\n }\n getProgress() {\n const { document , values } = this;\n let progress = (this.duration - this.begin) / (this.maxDuration - this.begin);\n let from;\n let to;\n if (values.hasValue()) {\n const p = progress * (values.getValue().length - 1);\n const lb = Math.floor(p);\n const ub = Math.ceil(p);\n let value;\n value = values.getValue()[lb];\n from = new Property(document, 'from', value ? parseFloat(value) : 0);\n value = values.getValue()[ub];\n to = new Property(document, 'to', value ? parseFloat(value) : 0);\n progress = (p - lb) / (ub - lb);\n } else {\n from = this.from;\n to = this.to;\n }\n return {\n progress,\n from,\n to\n };\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'animate';\n this.duration = 0;\n this.initialUnits = '';\n this.removed = false;\n this.frozen = false;\n document.screen.animations.push(this);\n this.begin = this.getAttribute('begin').getMilliseconds();\n this.maxDuration = this.begin + this.getAttribute('dur').getMilliseconds();\n this.from = this.getAttribute('from');\n this.to = this.getAttribute('to');\n this.values = new Property(document, 'values', null);\n const valuesAttr = this.getAttribute('values');\n if (valuesAttr.hasValue()) {\n this.values.setValue(valuesAttr.getString().split(';'));\n }\n }\n}\n\nclass AnimateColorElement extends AnimateElement {\n calcValue() {\n const { progress , from , to } = this.getProgress();\n const colorFrom = new RGBColor__default[\"default\"](from.getColor());\n const colorTo = new RGBColor__default[\"default\"](to.getColor());\n if (colorFrom.ok && colorTo.ok) {\n // tween color linearly\n const r = colorFrom.r + (colorTo.r - colorFrom.r) * progress;\n const g = colorFrom.g + (colorTo.g - colorFrom.g) * progress;\n const b = colorFrom.b + (colorTo.b - colorFrom.b) * progress;\n // ? alpha\n return \"rgb(\".concat(Math.floor(r), \", \").concat(Math.floor(g), \", \").concat(Math.floor(b), \")\");\n }\n return this.getAttribute('from').getColor();\n }\n constructor(...args){\n super(...args);\n this.type = 'animateColor';\n }\n}\n\nclass AnimateTransformElement extends AnimateElement {\n calcValue() {\n const { progress , from: from1 , to: to1 } = this.getProgress();\n // tween value linearly\n const transformFrom = toNumbers(from1.getString());\n const transformTo = toNumbers(to1.getString());\n const newValue = transformFrom.map((from, i)=>{\n const to = transformTo[i];\n return from + (to - from) * progress;\n }).join(' ');\n return newValue;\n }\n constructor(...args){\n super(...args);\n this.type = 'animateTransform';\n }\n}\n\nclass FontFaceElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'font-face';\n this.ascent = this.getAttribute('ascent').getNumber();\n this.descent = this.getAttribute('descent').getNumber();\n this.unitsPerEm = this.getAttribute('units-per-em').getNumber();\n }\n}\n\nclass GlyphElement extends PathElement {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'glyph';\n this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();\n this.unicode = this.getAttribute('unicode').getString();\n this.arabicForm = this.getAttribute('arabic-form').getString();\n }\n}\n\nclass MissingGlyphElement extends GlyphElement {\n constructor(...args){\n super(...args);\n this.type = 'missing-glyph';\n this.horizAdvX = 0;\n }\n}\n\nclass FontElement extends Element {\n render() {\n // NO RENDER\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'font';\n this.isArabic = false;\n this.glyphs = {};\n this.arabicGlyphs = {};\n this.isRTL = false;\n this.horizAdvX = this.getAttribute('horiz-adv-x').getNumber();\n const { definitions } = document;\n const { children } = this;\n for (const child of children){\n if (child instanceof FontFaceElement) {\n this.fontFace = child;\n const fontFamilyStyle = child.getStyle('font-family');\n if (fontFamilyStyle.hasValue()) {\n definitions[fontFamilyStyle.getString()] = this;\n }\n } else if (child instanceof MissingGlyphElement) {\n this.missingGlyph = child;\n } else if (child instanceof GlyphElement) {\n if (child.arabicForm) {\n this.isRTL = true;\n this.isArabic = true;\n const arabicGlyph = this.arabicGlyphs[child.unicode];\n if (typeof arabicGlyph === 'undefined') {\n this.arabicGlyphs[child.unicode] = {\n [child.arabicForm]: child\n };\n } else {\n arabicGlyph[child.arabicForm] = child;\n }\n } else {\n this.glyphs[child.unicode] = child;\n }\n }\n }\n }\n}\n\nclass TRefElement extends TextElement {\n getText() {\n const element = this.getHrefAttribute().getDefinition();\n if (element) {\n const firstChild = element.children[0];\n if (firstChild) {\n return firstChild.getText();\n }\n }\n return '';\n }\n constructor(...args){\n super(...args);\n this.type = 'tref';\n }\n}\n\nclass AElement extends TextElement {\n getText() {\n return this.text;\n }\n renderChildren(ctx) {\n if (this.hasText) {\n // render as text element\n super.renderChildren(ctx);\n const { document , x , y } = this;\n const { mouse } = document.screen;\n const fontSize = new Property(document, 'fontSize', Font.parse(document.ctx.font).fontSize);\n // Do not calc bounding box if mouse is not working.\n if (mouse.isWorking()) {\n mouse.checkBoundingBox(this, new BoundingBox(x, y - fontSize.getPixels('y'), x + this.measureText(ctx), y));\n }\n } else if (this.children.length > 0) {\n // render as temporary group\n const g = new GElement(this.document);\n g.children = this.children;\n g.parent = this;\n g.render(ctx);\n }\n }\n onClick() {\n const { window } = this.document;\n if (window) {\n window.open(this.getHrefAttribute().getString());\n }\n }\n onMouseMove() {\n const ctx = this.document.ctx;\n ctx.canvas.style.cursor = 'pointer';\n }\n constructor(document, node1, captureTextNodes){\n super(document, node1, captureTextNodes);\n this.type = 'a';\n const { childNodes } = node1;\n const firstChild = childNodes[0];\n const hasText = childNodes.length > 0 && Array.from(childNodes).every((node)=>node.nodeType === 3\n );\n this.hasText = hasText;\n this.text = hasText ? this.getTextFromNode(firstChild) : '';\n }\n}\n\nclass TextPathElement extends TextElement {\n getText() {\n return this.text;\n }\n path(ctx) {\n const { dataArray } = this;\n if (ctx) {\n ctx.beginPath();\n }\n dataArray.forEach((param)=>{\n let { type , points } = param;\n switch(type){\n case PathParser.LINE_TO:\n if (ctx) {\n ctx.lineTo(points[0], points[1]);\n }\n break;\n case PathParser.MOVE_TO:\n if (ctx) {\n ctx.moveTo(points[0], points[1]);\n }\n break;\n case PathParser.CURVE_TO:\n if (ctx) {\n ctx.bezierCurveTo(points[0], points[1], points[2], points[3], points[4], points[5]);\n }\n break;\n case PathParser.QUAD_TO:\n if (ctx) {\n ctx.quadraticCurveTo(points[0], points[1], points[2], points[3]);\n }\n break;\n case PathParser.ARC:\n {\n const [cx, cy, rx, ry, theta, dTheta, psi, fs] = points;\n const r = rx > ry ? rx : ry;\n const scaleX = rx > ry ? 1 : rx / ry;\n const scaleY = rx > ry ? ry / rx : 1;\n if (ctx) {\n ctx.translate(cx, cy);\n ctx.rotate(psi);\n ctx.scale(scaleX, scaleY);\n ctx.arc(0, 0, r, theta, theta + dTheta, Boolean(1 - fs));\n ctx.scale(1 / scaleX, 1 / scaleY);\n ctx.rotate(-psi);\n ctx.translate(-cx, -cy);\n }\n break;\n }\n case PathParser.CLOSE_PATH:\n if (ctx) {\n ctx.closePath();\n }\n break;\n }\n });\n }\n renderChildren(ctx) {\n this.setTextData(ctx);\n ctx.save();\n const textDecoration = this.parent.getStyle('text-decoration').getString();\n const fontSize = this.getFontSize();\n const { glyphInfo } = this;\n const fill = ctx.fillStyle;\n if (textDecoration === 'underline') {\n ctx.beginPath();\n }\n glyphInfo.forEach((glyph, i)=>{\n const { p0 , p1 , rotation , text: partialText } = glyph;\n ctx.save();\n ctx.translate(p0.x, p0.y);\n ctx.rotate(rotation);\n if (ctx.fillStyle) {\n ctx.fillText(partialText, 0, 0);\n }\n if (ctx.strokeStyle) {\n ctx.strokeText(partialText, 0, 0);\n }\n ctx.restore();\n if (textDecoration === 'underline') {\n if (i === 0) {\n ctx.moveTo(p0.x, p0.y + fontSize / 8);\n }\n ctx.lineTo(p1.x, p1.y + fontSize / 5);\n }\n // // To assist with debugging visually, uncomment following\n //\n // ctx.beginPath();\n // if (i % 2)\n // ctx.strokeStyle = 'red';\n // else\n // ctx.strokeStyle = 'green';\n // ctx.moveTo(p0.x, p0.y);\n // ctx.lineTo(p1.x, p1.y);\n // ctx.stroke();\n // ctx.closePath();\n });\n if (textDecoration === 'underline') {\n ctx.lineWidth = fontSize / 20;\n ctx.strokeStyle = fill;\n ctx.stroke();\n ctx.closePath();\n }\n ctx.restore();\n }\n getLetterSpacingAt() {\n let idx = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;\n return this.letterSpacingCache[idx] || 0;\n }\n findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, inputOffset, dy, c, charI) {\n let offset = inputOffset;\n let glyphWidth = this.measureText(ctx, c);\n if (c === ' ' && anchor === 'justify' && textFullWidth < fullPathWidth) {\n glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;\n }\n if (charI > -1) {\n offset += this.getLetterSpacingAt(charI);\n }\n const splineStep = this.textHeight / 20;\n const p0 = this.getEquidistantPointOnPath(offset, splineStep, 0);\n const p1 = this.getEquidistantPointOnPath(offset + glyphWidth, splineStep, 0);\n const segment = {\n p0,\n p1\n };\n const rotation = p0 && p1 ? Math.atan2(p1.y - p0.y, p1.x - p0.x) : 0;\n if (dy) {\n const dyX = Math.cos(Math.PI / 2 + rotation) * dy;\n const dyY = Math.cos(-rotation) * dy;\n segment.p0 = {\n ...p0,\n x: p0.x + dyX,\n y: p0.y + dyY\n };\n segment.p1 = {\n ...p1,\n x: p1.x + dyX,\n y: p1.y + dyY\n };\n }\n offset += glyphWidth;\n return {\n offset,\n segment,\n rotation\n };\n }\n measureText(ctx, text) {\n const { measuresCache } = this;\n const targetText = text || this.getText();\n if (measuresCache.has(targetText)) {\n return measuresCache.get(targetText);\n }\n const measure = this.measureTargetText(ctx, targetText);\n measuresCache.set(targetText, measure);\n return measure;\n }\n // This method supposes what all custom fonts already loaded.\n // If some font will be loaded after this method call, <textPath> will not be rendered correctly.\n // You need to call this method manually to update glyphs cache.\n setTextData(ctx) {\n if (this.glyphInfo) {\n return;\n }\n const renderText = this.getText();\n const chars = renderText.split('');\n const spacesNumber = renderText.split(' ').length - 1;\n const dx = this.parent.getAttribute('dx').split().map((_)=>_.getPixels('x')\n );\n const dy = this.parent.getAttribute('dy').getPixels('y');\n const anchor = this.parent.getStyle('text-anchor').getString('start');\n const thisSpacing = this.getStyle('letter-spacing');\n const parentSpacing = this.parent.getStyle('letter-spacing');\n let letterSpacing = 0;\n if (!thisSpacing.hasValue() || thisSpacing.getValue() === 'inherit') {\n letterSpacing = parentSpacing.getPixels();\n } else if (thisSpacing.hasValue()) {\n if (thisSpacing.getValue() !== 'initial' && thisSpacing.getValue() !== 'unset') {\n letterSpacing = thisSpacing.getPixels();\n }\n }\n // fill letter-spacing cache\n const letterSpacingCache = [];\n const textLen = renderText.length;\n this.letterSpacingCache = letterSpacingCache;\n for(let i1 = 0; i1 < textLen; i1++){\n letterSpacingCache.push(typeof dx[i1] !== 'undefined' ? dx[i1] : letterSpacing);\n }\n const dxSum = letterSpacingCache.reduce((acc, cur, i)=>i === 0 ? 0 : acc + cur || 0\n , 0);\n const textWidth = this.measureText(ctx);\n const textFullWidth = Math.max(textWidth + dxSum, 0);\n this.textWidth = textWidth;\n this.textHeight = this.getFontSize();\n this.glyphInfo = [];\n const fullPathWidth = this.getPathLength();\n const startOffset = this.getStyle('startOffset').getNumber(0) * fullPathWidth;\n let offset = 0;\n if (anchor === 'middle' || anchor === 'center') {\n offset = -textFullWidth / 2;\n }\n if (anchor === 'end' || anchor === 'right') {\n offset = -textFullWidth;\n }\n offset += startOffset;\n chars.forEach((char, i)=>{\n // Find such segment what distance between p0 and p1 is approx. width of glyph\n const { offset: nextOffset , segment , rotation } = this.findSegmentToFitChar(ctx, anchor, textFullWidth, fullPathWidth, spacesNumber, offset, dy, char, i);\n offset = nextOffset;\n if (!segment.p0 || !segment.p1) {\n return;\n }\n // const width = this.getLineLength(\n // segment.p0.x,\n // segment.p0.y,\n // segment.p1.x,\n // segment.p1.y\n // );\n // Note: Since glyphs are rendered one at a time, any kerning pair data built into the font will not be used.\n // Can foresee having a rough pair table built in that the developer can override as needed.\n // Or use \"dx\" attribute of the <text> node as a naive replacement\n // const kern = 0;\n // placeholder for future implementation\n // const midpoint = this.getPointOnLine(\n // kern + width / 2.0,\n // segment.p0.x, segment.p0.y, segment.p1.x, segment.p1.y\n // );\n this.glyphInfo.push({\n // transposeX: midpoint.x,\n // transposeY: midpoint.y,\n text: chars[i],\n p0: segment.p0,\n p1: segment.p1,\n rotation\n });\n });\n }\n parsePathData(path) {\n this.pathLength = -1 // reset path length\n ;\n if (!path) {\n return [];\n }\n const pathCommands = [];\n const { pathParser } = path;\n pathParser.reset();\n // convert l, H, h, V, and v to L\n while(!pathParser.isEnd()){\n const { current } = pathParser;\n const startX = current ? current.x : 0;\n const startY = current ? current.y : 0;\n const command = pathParser.next();\n let nextCommandType = command.type;\n let points = [];\n switch(command.type){\n case PathParser.MOVE_TO:\n this.pathM(pathParser, points);\n break;\n case PathParser.LINE_TO:\n nextCommandType = this.pathL(pathParser, points);\n break;\n case PathParser.HORIZ_LINE_TO:\n nextCommandType = this.pathH(pathParser, points);\n break;\n case PathParser.VERT_LINE_TO:\n nextCommandType = this.pathV(pathParser, points);\n break;\n case PathParser.CURVE_TO:\n this.pathC(pathParser, points);\n break;\n case PathParser.SMOOTH_CURVE_TO:\n nextCommandType = this.pathS(pathParser, points);\n break;\n case PathParser.QUAD_TO:\n this.pathQ(pathParser, points);\n break;\n case PathParser.SMOOTH_QUAD_TO:\n nextCommandType = this.pathT(pathParser, points);\n break;\n case PathParser.ARC:\n points = this.pathA(pathParser);\n break;\n case PathParser.CLOSE_PATH:\n PathElement.pathZ(pathParser);\n break;\n }\n if (command.type !== PathParser.CLOSE_PATH) {\n pathCommands.push({\n type: nextCommandType,\n points,\n start: {\n x: startX,\n y: startY\n },\n pathLength: this.calcLength(startX, startY, nextCommandType, points)\n });\n } else {\n pathCommands.push({\n type: PathParser.CLOSE_PATH,\n points: [],\n pathLength: 0\n });\n }\n }\n return pathCommands;\n }\n pathM(pathParser, points) {\n const { x , y } = PathElement.pathM(pathParser).point;\n points.push(x, y);\n }\n pathL(pathParser, points) {\n const { x , y } = PathElement.pathL(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathH(pathParser, points) {\n const { x , y } = PathElement.pathH(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathV(pathParser, points) {\n const { x , y } = PathElement.pathV(pathParser).point;\n points.push(x, y);\n return PathParser.LINE_TO;\n }\n pathC(pathParser, points) {\n const { point , controlPoint , currentPoint } = PathElement.pathC(pathParser);\n points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n pathS(pathParser, points) {\n const { point , controlPoint , currentPoint } = PathElement.pathS(pathParser);\n points.push(point.x, point.y, controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n return PathParser.CURVE_TO;\n }\n pathQ(pathParser, points) {\n const { controlPoint , currentPoint } = PathElement.pathQ(pathParser);\n points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n }\n pathT(pathParser, points) {\n const { controlPoint , currentPoint } = PathElement.pathT(pathParser);\n points.push(controlPoint.x, controlPoint.y, currentPoint.x, currentPoint.y);\n return PathParser.QUAD_TO;\n }\n pathA(pathParser) {\n let { rX , rY , sweepFlag , xAxisRotation , centp , a1 , ad } = PathElement.pathA(pathParser);\n if (sweepFlag === 0 && ad > 0) {\n ad -= 2 * Math.PI;\n }\n if (sweepFlag === 1 && ad < 0) {\n ad += 2 * Math.PI;\n }\n return [\n centp.x,\n centp.y,\n rX,\n rY,\n a1,\n ad,\n xAxisRotation,\n sweepFlag\n ];\n }\n calcLength(x, y, commandType, points) {\n let len = 0;\n let p1 = null;\n let p2 = null;\n let t = 0;\n switch(commandType){\n case PathParser.LINE_TO:\n return this.getLineLength(x, y, points[0], points[1]);\n case PathParser.CURVE_TO:\n // Approximates by breaking curve into 100 line segments\n len = 0;\n p1 = this.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n for(t = 0.01; t <= 1; t += 0.01){\n p2 = this.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case PathParser.QUAD_TO:\n // Approximates by breaking curve into 100 line segments\n len = 0;\n p1 = this.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);\n for(t = 0.01; t <= 1; t += 0.01){\n p2 = this.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case PathParser.ARC:\n {\n // Approximates by breaking curve into line segments\n len = 0;\n const start = points[4];\n // 4 = theta\n const dTheta = points[5];\n // 5 = dTheta\n const end = points[4] + dTheta;\n let inc = Math.PI / 180;\n // 1 degree resolution\n if (Math.abs(start - end) < inc) {\n inc = Math.abs(start - end);\n }\n // Note: for purpose of calculating arc length, not going to worry about rotating X-axis by angle psi\n p1 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);\n if (dTheta < 0) {\n for(t = start - inc; t > end; t -= inc){\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n } else {\n for(t = start + inc; t < end; t += inc){\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n }\n p2 = this.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);\n len += this.getLineLength(p1.x, p1.y, p2.x, p2.y);\n return len;\n }\n }\n return 0;\n }\n getPointOnLine(dist, p1x, p1y, p2x, p2y) {\n let fromX = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : p1x, fromY = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : p1y;\n const m = (p2y - p1y) / (p2x - p1x + PSEUDO_ZERO);\n let run = Math.sqrt(dist * dist / (1 + m * m));\n if (p2x < p1x) {\n run *= -1;\n }\n let rise = m * run;\n let pt = null;\n if (p2x === p1x) {\n pt = {\n x: fromX,\n y: fromY + rise\n };\n } else if ((fromY - p1y) / (fromX - p1x + PSEUDO_ZERO) === m) {\n pt = {\n x: fromX + run,\n y: fromY + rise\n };\n } else {\n let ix = 0;\n let iy = 0;\n const len = this.getLineLength(p1x, p1y, p2x, p2y);\n if (len < PSEUDO_ZERO) {\n return null;\n }\n let u = (fromX - p1x) * (p2x - p1x) + (fromY - p1y) * (p2y - p1y);\n u /= len * len;\n ix = p1x + u * (p2x - p1x);\n iy = p1y + u * (p2y - p1y);\n const pRise = this.getLineLength(fromX, fromY, ix, iy);\n const pRun = Math.sqrt(dist * dist - pRise * pRise);\n run = Math.sqrt(pRun * pRun / (1 + m * m));\n if (p2x < p1x) {\n run *= -1;\n }\n rise = m * run;\n pt = {\n x: ix + run,\n y: iy + rise\n };\n }\n return pt;\n }\n getPointOnPath(distance) {\n const fullLen = this.getPathLength();\n let cumulativePathLength = 0;\n let p = null;\n if (distance < -0.00005 || distance - 0.00005 > fullLen) {\n return null;\n }\n const { dataArray } = this;\n for (const command of dataArray){\n if (command && (command.pathLength < 0.00005 || cumulativePathLength + command.pathLength + 0.00005 < distance)) {\n cumulativePathLength += command.pathLength;\n continue;\n }\n const delta = distance - cumulativePathLength;\n let currentT = 0;\n switch(command.type){\n case PathParser.LINE_TO:\n p = this.getPointOnLine(delta, command.start.x, command.start.y, command.points[0], command.points[1], command.start.x, command.start.y);\n break;\n case PathParser.ARC:\n {\n const start = command.points[4];\n // 4 = theta\n const dTheta = command.points[5];\n // 5 = dTheta\n const end = command.points[4] + dTheta;\n currentT = start + delta / command.pathLength * dTheta;\n if (dTheta < 0 && currentT < end || dTheta >= 0 && currentT > end) {\n break;\n }\n p = this.getPointOnEllipticalArc(command.points[0], command.points[1], command.points[2], command.points[3], currentT, command.points[6]);\n break;\n }\n case PathParser.CURVE_TO:\n currentT = delta / command.pathLength;\n if (currentT > 1) {\n currentT = 1;\n }\n p = this.getPointOnCubicBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3], command.points[4], command.points[5]);\n break;\n case PathParser.QUAD_TO:\n currentT = delta / command.pathLength;\n if (currentT > 1) {\n currentT = 1;\n }\n p = this.getPointOnQuadraticBezier(currentT, command.start.x, command.start.y, command.points[0], command.points[1], command.points[2], command.points[3]);\n break;\n }\n if (p) {\n return p;\n }\n break;\n }\n return null;\n }\n getLineLength(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n getPathLength() {\n if (this.pathLength === -1) {\n this.pathLength = this.dataArray.reduce((length, command)=>command.pathLength > 0 ? length + command.pathLength : length\n , 0);\n }\n return this.pathLength;\n }\n getPointOnCubicBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y, p4x, p4y) {\n const x = p4x * CB1(pct) + p3x * CB2(pct) + p2x * CB3(pct) + p1x * CB4(pct);\n const y = p4y * CB1(pct) + p3y * CB2(pct) + p2y * CB3(pct) + p1y * CB4(pct);\n return {\n x,\n y\n };\n }\n getPointOnQuadraticBezier(pct, p1x, p1y, p2x, p2y, p3x, p3y) {\n const x = p3x * QB1(pct) + p2x * QB2(pct) + p1x * QB3(pct);\n const y = p3y * QB1(pct) + p2y * QB2(pct) + p1y * QB3(pct);\n return {\n x,\n y\n };\n }\n getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {\n const cosPsi = Math.cos(psi);\n const sinPsi = Math.sin(psi);\n const pt = {\n x: rx * Math.cos(theta),\n y: ry * Math.sin(theta)\n };\n return {\n x: cx + (pt.x * cosPsi - pt.y * sinPsi),\n y: cy + (pt.x * sinPsi + pt.y * cosPsi)\n };\n }\n // TODO need some optimisations. possibly build cache only for curved segments?\n buildEquidistantCache(inputStep, inputPrecision) {\n const fullLen = this.getPathLength();\n const precision = inputPrecision || 0.25 // accuracy vs performance\n ;\n const step = inputStep || fullLen / 100;\n if (!this.equidistantCache || this.equidistantCache.step !== step || this.equidistantCache.precision !== precision) {\n // Prepare cache\n this.equidistantCache = {\n step,\n precision,\n points: []\n };\n // Calculate points\n let s = 0;\n for(let l = 0; l <= fullLen; l += precision){\n const p0 = this.getPointOnPath(l);\n const p1 = this.getPointOnPath(l + precision);\n if (!p0 || !p1) {\n continue;\n }\n s += this.getLineLength(p0.x, p0.y, p1.x, p1.y);\n if (s >= step) {\n this.equidistantCache.points.push({\n x: p0.x,\n y: p0.y,\n distance: l\n });\n s -= step;\n }\n }\n }\n }\n getEquidistantPointOnPath(targetDistance, step, precision) {\n this.buildEquidistantCache(step, precision);\n if (targetDistance < 0 || targetDistance - this.getPathLength() > 0.00005) {\n return null;\n }\n const idx = Math.round(targetDistance / this.getPathLength() * (this.equidistantCache.points.length - 1));\n return this.equidistantCache.points[idx] || null;\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'textPath';\n this.textWidth = 0;\n this.textHeight = 0;\n this.pathLength = -1;\n this.glyphInfo = null;\n this.letterSpacingCache = [];\n this.measuresCache = new Map([\n [\n '',\n 0\n ]\n ]);\n const pathElement = this.getHrefAttribute().getDefinition();\n this.text = this.getTextFromNode();\n this.dataArray = this.parsePathData(pathElement);\n }\n}\n\n// groups: 1: mime-type (+ charset), 2: mime-type (w/o charset), 3: charset, 4: base64?, 5: body\nconst dataUriRegex = /^\\s*data:(([^/,;]+\\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;\nclass ImageElement extends RenderedElement {\n async loadImage(href) {\n try {\n const image = await this.document.createImage(href);\n this.image = image;\n } catch (err) {\n console.error(\"Error while loading image \\\"\".concat(href, \"\\\":\"), err);\n }\n this.loaded = true;\n }\n async loadSvg(href) {\n const match = dataUriRegex.exec(href);\n if (match) {\n const data = match[5];\n if (data) {\n if (match[4] === 'base64') {\n this.image = atob(data);\n } else {\n this.image = decodeURIComponent(data);\n }\n }\n } else {\n try {\n const response = await this.document.fetch(href);\n const svg = await response.text();\n this.image = svg;\n } catch (err) {\n console.error(\"Error while loading image \\\"\".concat(href, \"\\\":\"), err);\n }\n }\n this.loaded = true;\n }\n renderChildren(ctx) {\n const { document , image , loaded } = this;\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width').getPixels('x');\n const height = this.getStyle('height').getPixels('y');\n if (!loaded || !image || !width || !height) {\n return;\n }\n ctx.save();\n ctx.translate(x, y);\n if (typeof image === 'string') {\n const subDocument = document.canvg.forkString(ctx, image, {\n ignoreMouse: true,\n ignoreAnimation: true,\n ignoreDimensions: true,\n ignoreClear: true,\n offsetX: 0,\n offsetY: 0,\n scaleWidth: width,\n scaleHeight: height\n });\n const { documentElement } = subDocument.document;\n if (documentElement) {\n documentElement.parent = this;\n }\n void subDocument.render();\n } else {\n document.setViewBox({\n ctx,\n aspectRatio: this.getAttribute('preserveAspectRatio').getString(),\n width,\n desiredWidth: image.width,\n height,\n desiredHeight: image.height\n });\n if (this.loaded) {\n if (!('complete' in image) || image.complete) {\n ctx.drawImage(image, 0, 0);\n }\n }\n }\n ctx.restore();\n }\n getBoundingBox() {\n const x = this.getAttribute('x').getPixels('x');\n const y = this.getAttribute('y').getPixels('y');\n const width = this.getStyle('width').getPixels('x');\n const height = this.getStyle('height').getPixels('y');\n return new BoundingBox(x, y, x + width, y + height);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'image';\n this.loaded = false;\n const href = this.getHrefAttribute().getString();\n if (!href) {\n return;\n }\n const isSvg = href.endsWith('.svg') || /^\\s*data:image\\/svg\\+xml/i.test(href);\n document.images.push(this);\n if (!isSvg) {\n void this.loadImage(href);\n } else {\n void this.loadSvg(href);\n }\n }\n}\n\nclass SymbolElement extends RenderedElement {\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'symbol';\n }\n}\n\nclass SVGFontLoader {\n async load(fontFamily, url) {\n try {\n const { document } = this;\n const svgDocument = await document.canvg.parser.load(url);\n const fonts = svgDocument.getElementsByTagName('font');\n Array.from(fonts).forEach((fontNode)=>{\n const font = document.createElement(fontNode);\n document.definitions[fontFamily] = font;\n });\n } catch (err) {\n console.error(\"Error while loading font \\\"\".concat(url, \"\\\":\"), err);\n }\n this.loaded = true;\n }\n constructor(document){\n this.document = document;\n this.loaded = false;\n document.fonts.push(this);\n }\n}\n\nclass StyleElement extends Element {\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'style';\n const css = compressSpaces(Array.from(node.childNodes)// NEED TEST\n .map((_)=>_.textContent\n ).join('').replace(/(\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*+\\/)|(^[\\s]*\\/\\/.*)/gm, '') // remove comments\n .replace(/@import.*;/g, '') // remove imports\n );\n const cssDefs = css.split('}');\n cssDefs.forEach((_1)=>{\n const def = _1.trim();\n if (!def) {\n return;\n }\n const cssParts = def.split('{');\n const cssClasses = cssParts[0].split(',');\n const cssProps = cssParts[1].split(';');\n cssClasses.forEach((_)=>{\n const cssClass = _.trim();\n if (!cssClass) {\n return;\n }\n const props = document.styles[cssClass] || {};\n cssProps.forEach((cssProp)=>{\n const prop = cssProp.indexOf(':');\n const name = cssProp.substr(0, prop).trim();\n const value = cssProp.substr(prop + 1, cssProp.length - prop).trim();\n if (name && value) {\n props[name] = new Property(document, name, value);\n }\n });\n document.styles[cssClass] = props;\n document.stylesSpecificity[cssClass] = getSelectorSpecificity(cssClass);\n if (cssClass === '@font-face') {\n const fontFamily = props['font-family'].getString().replace(/\"|'/g, '');\n const srcs = props.src.getString().split(',');\n srcs.forEach((src)=>{\n if (src.indexOf('format(\"svg\")') > 0) {\n const url = parseExternalUrl(src);\n if (url) {\n void new SVGFontLoader(document).load(fontFamily, url);\n }\n }\n });\n }\n });\n });\n }\n}\nStyleElement.parseExternalUrl = parseExternalUrl;\n\nclass UseElement extends RenderedElement {\n setContext(ctx) {\n super.setContext(ctx);\n const xAttr = this.getAttribute('x');\n const yAttr = this.getAttribute('y');\n if (xAttr.hasValue()) {\n ctx.translate(xAttr.getPixels('x'), 0);\n }\n if (yAttr.hasValue()) {\n ctx.translate(0, yAttr.getPixels('y'));\n }\n }\n path(ctx) {\n const { element } = this;\n if (element) {\n element.path(ctx);\n }\n }\n renderChildren(ctx) {\n const { document , element } = this;\n if (element) {\n let tempSvg = element;\n if (element.type === 'symbol') {\n // render me using a temporary svg element in symbol cases (http://www.w3.org/TR/SVG/struct.html#UseElement)\n tempSvg = new SVGElement(document);\n tempSvg.attributes.viewBox = new Property(document, 'viewBox', element.getAttribute('viewBox').getString());\n tempSvg.attributes.preserveAspectRatio = new Property(document, 'preserveAspectRatio', element.getAttribute('preserveAspectRatio').getString());\n tempSvg.attributes.overflow = new Property(document, 'overflow', element.getAttribute('overflow').getString());\n tempSvg.children = element.children;\n // element is still the parent of the children\n element.styles.opacity = new Property(document, 'opacity', this.calculateOpacity());\n }\n if (tempSvg.type === 'svg') {\n const widthStyle = this.getStyle('width', false, true);\n const heightStyle = this.getStyle('height', false, true);\n // if symbol or svg, inherit width/height from me\n if (widthStyle.hasValue()) {\n tempSvg.attributes.width = new Property(document, 'width', widthStyle.getString());\n }\n if (heightStyle.hasValue()) {\n tempSvg.attributes.height = new Property(document, 'height', heightStyle.getString());\n }\n }\n const oldParent = tempSvg.parent;\n tempSvg.parent = this;\n tempSvg.render(ctx);\n tempSvg.parent = oldParent;\n }\n }\n getBoundingBox(ctx) {\n const { element } = this;\n if (element) {\n return element.getBoundingBox(ctx);\n }\n return null;\n }\n elementTransform() {\n const { document , element } = this;\n if (!element) {\n return null;\n }\n return Transform.fromElement(document, element);\n }\n get element() {\n if (!this.cachedElement) {\n this.cachedElement = this.getHrefAttribute().getDefinition();\n }\n return this.cachedElement;\n }\n constructor(...args){\n super(...args);\n this.type = 'use';\n }\n}\n\nfunction imGet(img, x, y, width, _height, rgba) {\n return img[y * width * 4 + x * 4 + rgba];\n}\nfunction imSet(img, x, y, width, _height, rgba, val) {\n img[y * width * 4 + x * 4 + rgba] = val;\n}\nfunction m(matrix, i, v) {\n const mi = matrix[i];\n return mi * v;\n}\nfunction c(a, m1, m2, m3) {\n return m1 + Math.cos(a) * m2 + Math.sin(a) * m3;\n}\nclass FeColorMatrixElement extends Element {\n apply(ctx, _x, _y, width, height) {\n // assuming x==0 && y==0 for now\n const { includeOpacity , matrix } = this;\n const srcData = ctx.getImageData(0, 0, width, height);\n for(let y = 0; y < height; y++){\n for(let x = 0; x < width; x++){\n const r = imGet(srcData.data, x, y, width, height, 0);\n const g = imGet(srcData.data, x, y, width, height, 1);\n const b = imGet(srcData.data, x, y, width, height, 2);\n const a = imGet(srcData.data, x, y, width, height, 3);\n let nr = m(matrix, 0, r) + m(matrix, 1, g) + m(matrix, 2, b) + m(matrix, 3, a) + m(matrix, 4, 1);\n let ng = m(matrix, 5, r) + m(matrix, 6, g) + m(matrix, 7, b) + m(matrix, 8, a) + m(matrix, 9, 1);\n let nb = m(matrix, 10, r) + m(matrix, 11, g) + m(matrix, 12, b) + m(matrix, 13, a) + m(matrix, 14, 1);\n let na = m(matrix, 15, r) + m(matrix, 16, g) + m(matrix, 17, b) + m(matrix, 18, a) + m(matrix, 19, 1);\n if (includeOpacity) {\n nr = 0;\n ng = 0;\n nb = 0;\n na *= a / 255;\n }\n imSet(srcData.data, x, y, width, height, 0, nr);\n imSet(srcData.data, x, y, width, height, 1, ng);\n imSet(srcData.data, x, y, width, height, 2, nb);\n imSet(srcData.data, x, y, width, height, 3, na);\n }\n }\n ctx.clearRect(0, 0, width, height);\n ctx.putImageData(srcData, 0, 0);\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feColorMatrix';\n let matrix = toNumbers(this.getAttribute('values').getString());\n switch(this.getAttribute('type').getString('matrix')){\n case 'saturate':\n {\n const s = matrix[0];\n /* eslint-disable array-element-newline */ matrix = [\n 0.213 + 0.787 * s,\n 0.715 - 0.715 * s,\n 0.072 - 0.072 * s,\n 0,\n 0,\n 0.213 - 0.213 * s,\n 0.715 + 0.285 * s,\n 0.072 - 0.072 * s,\n 0,\n 0,\n 0.213 - 0.213 * s,\n 0.715 - 0.715 * s,\n 0.072 + 0.928 * s,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n case 'hueRotate':\n {\n const a = matrix[0] * Math.PI / 180;\n /* eslint-disable array-element-newline */ matrix = [\n c(a, 0.213, 0.787, -0.213),\n c(a, 0.715, -0.715, -0.715),\n c(a, 0.072, -0.072, 0.928),\n 0,\n 0,\n c(a, 0.213, -0.213, 0.143),\n c(a, 0.715, 0.285, 0.14),\n c(a, 0.072, -0.072, -0.283),\n 0,\n 0,\n c(a, 0.213, -0.213, -0.787),\n c(a, 0.715, -0.715, 0.715),\n c(a, 0.072, 0.928, 0.072),\n 0,\n 0,\n 0,\n 0,\n 0,\n 1,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n case 'luminanceToAlpha':\n /* eslint-disable array-element-newline */ matrix = [\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0.2125,\n 0.7154,\n 0.0721,\n 0,\n 0,\n 0,\n 0,\n 0,\n 0,\n 1\n ];\n break;\n }\n this.matrix = matrix;\n this.includeOpacity = this.getAttribute('includeOpacity').hasValue();\n }\n}\n\nclass MaskElement extends Element {\n apply(ctx, element) {\n const { document } = this;\n // render as temp svg\n let x = this.getAttribute('x').getPixels('x');\n let y = this.getAttribute('y').getPixels('y');\n let width = this.getStyle('width').getPixels('x');\n let height = this.getStyle('height').getPixels('y');\n if (!width && !height) {\n const boundingBox = new BoundingBox();\n this.children.forEach((child)=>{\n boundingBox.addBoundingBox(child.getBoundingBox(ctx));\n });\n x = Math.floor(boundingBox.x1);\n y = Math.floor(boundingBox.y1);\n width = Math.floor(boundingBox.width);\n height = Math.floor(boundingBox.height);\n }\n const ignoredStyles = this.removeStyles(element, MaskElement.ignoreStyles);\n const maskCanvas = document.createCanvas(x + width, y + height);\n const maskCtx = maskCanvas.getContext('2d');\n document.screen.setDefaults(maskCtx);\n this.renderChildren(maskCtx);\n // convert mask to alpha with a fake node\n // TODO: refactor out apply from feColorMatrix\n new FeColorMatrixElement(document, {\n nodeType: 1,\n childNodes: [],\n attributes: [\n {\n nodeName: 'type',\n value: 'luminanceToAlpha'\n },\n {\n nodeName: 'includeOpacity',\n value: 'true'\n }\n ]\n }).apply(maskCtx, 0, 0, x + width, y + height);\n const tmpCanvas = document.createCanvas(x + width, y + height);\n const tmpCtx = tmpCanvas.getContext('2d');\n document.screen.setDefaults(tmpCtx);\n element.render(tmpCtx);\n tmpCtx.globalCompositeOperation = 'destination-in';\n tmpCtx.fillStyle = maskCtx.createPattern(maskCanvas, 'no-repeat');\n tmpCtx.fillRect(0, 0, x + width, y + height);\n ctx.fillStyle = tmpCtx.createPattern(tmpCanvas, 'no-repeat');\n ctx.fillRect(0, 0, x + width, y + height);\n // reassign mask\n this.restoreStyles(element, ignoredStyles);\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'mask';\n }\n}\nMaskElement.ignoreStyles = [\n 'mask',\n 'transform',\n 'clip-path'\n];\n\nconst noop = ()=>{\n// NOOP\n};\nclass ClipPathElement extends Element {\n apply(ctx) {\n const { document } = this;\n const contextProto = Reflect.getPrototypeOf(ctx);\n const { beginPath , closePath } = ctx;\n if (contextProto) {\n contextProto.beginPath = noop;\n contextProto.closePath = noop;\n }\n Reflect.apply(beginPath, ctx, []);\n this.children.forEach((child)=>{\n if (!('path' in child)) {\n return;\n }\n let transform = 'elementTransform' in child ? child.elementTransform() : null // handle <use />\n ;\n if (!transform) {\n transform = Transform.fromElement(document, child);\n }\n if (transform) {\n transform.apply(ctx);\n }\n child.path(ctx);\n if (contextProto) {\n contextProto.closePath = closePath;\n }\n if (transform) {\n transform.unapply(ctx);\n }\n });\n Reflect.apply(closePath, ctx, []);\n ctx.clip();\n if (contextProto) {\n contextProto.beginPath = beginPath;\n contextProto.closePath = closePath;\n }\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'clipPath';\n }\n}\n\nclass FilterElement extends Element {\n apply(ctx, element) {\n // render as temp svg\n const { document , children } = this;\n const boundingBox = 'getBoundingBox' in element ? element.getBoundingBox(ctx) : null;\n if (!boundingBox) {\n return;\n }\n let px = 0;\n let py = 0;\n children.forEach((child)=>{\n const efd = child.extraFilterDistance || 0;\n px = Math.max(px, efd);\n py = Math.max(py, efd);\n });\n const width = Math.floor(boundingBox.width);\n const height = Math.floor(boundingBox.height);\n const tmpCanvasWidth = width + 2 * px;\n const tmpCanvasHeight = height + 2 * py;\n if (tmpCanvasWidth < 1 || tmpCanvasHeight < 1) {\n return;\n }\n const x = Math.floor(boundingBox.x);\n const y = Math.floor(boundingBox.y);\n const ignoredStyles = this.removeStyles(element, FilterElement.ignoreStyles);\n const tmpCanvas = document.createCanvas(tmpCanvasWidth, tmpCanvasHeight);\n const tmpCtx = tmpCanvas.getContext('2d');\n document.screen.setDefaults(tmpCtx);\n tmpCtx.translate(-x + px, -y + py);\n element.render(tmpCtx);\n // apply filters\n children.forEach((child)=>{\n if (typeof child.apply === 'function') {\n child.apply(tmpCtx, 0, 0, tmpCanvasWidth, tmpCanvasHeight);\n }\n });\n // render on me\n ctx.drawImage(tmpCanvas, 0, 0, tmpCanvasWidth, tmpCanvasHeight, x - px, y - py, tmpCanvasWidth, tmpCanvasHeight);\n this.restoreStyles(element, ignoredStyles);\n }\n render(_) {\n // NO RENDER\n }\n constructor(...args){\n super(...args);\n this.type = 'filter';\n }\n}\nFilterElement.ignoreStyles = [\n 'filter',\n 'transform',\n 'clip-path'\n];\n\nclass FeDropShadowElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feDropShadow';\n this.addStylesFromStyleDefinition();\n }\n}\n\nclass FeMorphologyElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(...args){\n super(...args);\n this.type = 'feMorphology';\n }\n}\n\nclass FeCompositeElement extends Element {\n apply(_, _x, _y, _width, _height) {\n // TODO: implement\n }\n constructor(...args){\n super(...args);\n this.type = 'feComposite';\n }\n}\n\nclass FeGaussianBlurElement extends Element {\n apply(ctx, x, y, width, height) {\n const { document , blurRadius } = this;\n const body = document.window ? document.window.document.body : null;\n const canvas = ctx.canvas;\n // StackBlur requires canvas be on document\n canvas.id = document.getUniqueId();\n if (body) {\n canvas.style.display = 'none';\n body.appendChild(canvas);\n }\n stackblurCanvas.canvasRGBA(canvas, x, y, width, height, blurRadius);\n if (body) {\n body.removeChild(canvas);\n }\n }\n constructor(document, node, captureTextNodes){\n super(document, node, captureTextNodes);\n this.type = 'feGaussianBlur';\n this.blurRadius = Math.floor(this.getAttribute('stdDeviation').getNumber());\n this.extraFilterDistance = this.blurRadius;\n }\n}\n\nclass TitleElement extends Element {\n constructor(...args){\n super(...args);\n this.type = 'title';\n }\n}\n\nclass DescElement extends Element {\n constructor(...args){\n super(...args);\n this.type = 'desc';\n }\n}\n\nconst elements = {\n 'svg': SVGElement,\n 'rect': RectElement,\n 'circle': CircleElement,\n 'ellipse': EllipseElement,\n 'line': LineElement,\n 'polyline': PolylineElement,\n 'polygon': PolygonElement,\n 'path': PathElement,\n 'pattern': PatternElement,\n 'marker': MarkerElement,\n 'defs': DefsElement,\n 'linearGradient': LinearGradientElement,\n 'radialGradient': RadialGradientElement,\n 'stop': StopElement,\n 'animate': AnimateElement,\n 'animateColor': AnimateColorElement,\n 'animateTransform': AnimateTransformElement,\n 'font': FontElement,\n 'font-face': FontFaceElement,\n 'missing-glyph': MissingGlyphElement,\n 'glyph': GlyphElement,\n 'text': TextElement,\n 'tspan': TSpanElement,\n 'tref': TRefElement,\n 'a': AElement,\n 'textPath': TextPathElement,\n 'image': ImageElement,\n 'g': GElement,\n 'symbol': SymbolElement,\n 'style': StyleElement,\n 'use': UseElement,\n 'mask': MaskElement,\n 'clipPath': ClipPathElement,\n 'filter': FilterElement,\n 'feDropShadow': FeDropShadowElement,\n 'feMorphology': FeMorphologyElement,\n 'feComposite': FeCompositeElement,\n 'feColorMatrix': FeColorMatrixElement,\n 'feGaussianBlur': FeGaussianBlurElement,\n 'title': TitleElement,\n 'desc': DescElement\n};\n\nfunction createCanvas(width, height) {\n const canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n return canvas;\n}\nasync function createImage(src) {\n let anonymousCrossOrigin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;\n const image = document.createElement('img');\n if (anonymousCrossOrigin) {\n image.crossOrigin = 'Anonymous';\n }\n return new Promise((resolve, reject)=>{\n image.onload = ()=>{\n resolve(image);\n };\n image.onerror = (_event, _source, _lineno, _colno, error)=>{\n reject(error);\n };\n image.src = src;\n });\n}\nconst DEFAULT_EM_SIZE = 12;\nclass Document {\n bindCreateImage(createImage1, anonymousCrossOrigin) {\n if (typeof anonymousCrossOrigin === 'boolean') {\n return (source, forceAnonymousCrossOrigin)=>createImage1(source, typeof forceAnonymousCrossOrigin === 'boolean' ? forceAnonymousCrossOrigin : anonymousCrossOrigin)\n ;\n }\n return createImage1;\n }\n get window() {\n return this.screen.window;\n }\n get fetch() {\n return this.screen.fetch;\n }\n get ctx() {\n return this.screen.ctx;\n }\n get emSize() {\n const { emSizeStack } = this;\n return emSizeStack[emSizeStack.length - 1] || DEFAULT_EM_SIZE;\n }\n set emSize(value) {\n const { emSizeStack } = this;\n emSizeStack.push(value);\n }\n popEmSize() {\n const { emSizeStack } = this;\n emSizeStack.pop();\n }\n getUniqueId() {\n return \"canvg\".concat(++this.uniqueId);\n }\n isImagesLoaded() {\n return this.images.every((_)=>_.loaded\n );\n }\n isFontsLoaded() {\n return this.fonts.every((_)=>_.loaded\n );\n }\n createDocumentElement(document) {\n const documentElement = this.createElement(document.documentElement);\n documentElement.root = true;\n documentElement.addStylesFromStyleDefinition();\n this.documentElement = documentElement;\n return documentElement;\n }\n createElement(node) {\n const elementType = node.nodeName.replace(/^[^:]+:/, '');\n const ElementType = Document.elementTypes[elementType];\n if (ElementType) {\n return new ElementType(this, node);\n }\n return new UnknownElement(this, node);\n }\n createTextNode(node) {\n return new TextNode(this, node);\n }\n setViewBox(config) {\n this.screen.setViewBox({\n document: this,\n ...config\n });\n }\n constructor(canvg, { rootEmSize =DEFAULT_EM_SIZE , emSize =DEFAULT_EM_SIZE , createCanvas: createCanvas1 = Document.createCanvas , createImage: createImage2 = Document.createImage , anonymousCrossOrigin } = {}){\n this.canvg = canvg;\n this.definitions = {};\n this.styles = {};\n this.stylesSpecificity = {};\n this.images = [];\n this.fonts = [];\n this.emSizeStack = [];\n this.uniqueId = 0;\n this.screen = canvg.screen;\n this.rootEmSize = rootEmSize;\n this.emSize = emSize;\n this.createCanvas = createCanvas1;\n this.createImage = this.bindCreateImage(createImage2, anonymousCrossOrigin);\n this.screen.wait(()=>this.isImagesLoaded()\n );\n this.screen.wait(()=>this.isFontsLoaded()\n );\n }\n}\nDocument.createCanvas = createCanvas;\nDocument.createImage = createImage;\nDocument.elementTypes = elements;\n\n/**\n * SVG renderer on canvas.\n */ class Canvg {\n /**\n * Create Canvg instance from SVG source string or URL.\n * @param ctx - Rendering context.\n * @param svg - SVG source string or URL.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ static async from(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n const parser = new Parser(options);\n const svgDocument = await parser.parse(svg);\n return new Canvg(ctx, svgDocument, options);\n }\n /**\n * Create Canvg instance from SVG source string.\n * @param ctx - Rendering context.\n * @param svg - SVG source string.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ static fromString(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n const parser = new Parser(options);\n const svgDocument = parser.parseFromString(svg);\n return new Canvg(ctx, svgDocument, options);\n }\n /**\n * Create new Canvg instance with inherited options.\n * @param ctx - Rendering context.\n * @param svg - SVG source string or URL.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ fork(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n return Canvg.from(ctx, svg, {\n ...this.options,\n ...options\n });\n }\n /**\n * Create new Canvg instance with inherited options.\n * @param ctx - Rendering context.\n * @param svg - SVG source string.\n * @param options - Rendering options.\n * @returns Canvg instance.\n */ forkString(ctx, svg) {\n let options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};\n return Canvg.fromString(ctx, svg, {\n ...this.options,\n ...options\n });\n }\n /**\n * Document is ready promise.\n * @returns Ready promise.\n */ ready() {\n return this.screen.ready();\n }\n /**\n * Document is ready value.\n * @returns Is ready or not.\n */ isReady() {\n return this.screen.isReady();\n }\n /**\n * Render only first frame, ignoring animations and mouse.\n * @param options - Rendering options.\n */ async render() {\n let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n this.start({\n enableRedraw: true,\n ignoreAnimation: true,\n ignoreMouse: true,\n ...options\n });\n await this.ready();\n this.stop();\n }\n /**\n * Start rendering.\n * @param options - Render options.\n */ start() {\n let options = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};\n const { documentElement , screen , options: baseOptions } = this;\n screen.start(documentElement, {\n enableRedraw: true,\n ...baseOptions,\n ...options\n });\n }\n /**\n * Stop rendering.\n */ stop() {\n this.screen.stop();\n }\n /**\n * Resize SVG to fit in given size.\n * @param width\n * @param height\n * @param preserveAspectRatio\n */ resize(width) {\n let height = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : width, preserveAspectRatio = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;\n this.documentElement.resize(width, height, preserveAspectRatio);\n }\n /**\n * Main constructor.\n * @param ctx - Rendering context.\n * @param svg - SVG Document.\n * @param options - Rendering options.\n */ constructor(ctx, svg, options = {}){\n this.parser = new Parser(options);\n this.screen = new Screen(ctx, options);\n this.options = options;\n const document = new Document(this, options);\n const documentElement = document.createDocumentElement(svg);\n this.document = document;\n this.documentElement = documentElement;\n }\n}\n\nexports.AElement = AElement;\nexports.AnimateColorElement = AnimateColorElement;\nexports.AnimateElement = AnimateElement;\nexports.AnimateTransformElement = AnimateTransformElement;\nexports.BoundingBox = BoundingBox;\nexports.CB1 = CB1;\nexports.CB2 = CB2;\nexports.CB3 = CB3;\nexports.CB4 = CB4;\nexports.Canvg = Canvg;\nexports.CircleElement = CircleElement;\nexports.ClipPathElement = ClipPathElement;\nexports.DefsElement = DefsElement;\nexports.DescElement = DescElement;\nexports.Document = Document;\nexports.Element = Element;\nexports.EllipseElement = EllipseElement;\nexports.FeColorMatrixElement = FeColorMatrixElement;\nexports.FeCompositeElement = FeCompositeElement;\nexports.FeDropShadowElement = FeDropShadowElement;\nexports.FeGaussianBlurElement = FeGaussianBlurElement;\nexports.FeMorphologyElement = FeMorphologyElement;\nexports.FilterElement = FilterElement;\nexports.Font = Font;\nexports.FontElement = FontElement;\nexports.FontFaceElement = FontFaceElement;\nexports.GElement = GElement;\nexports.GlyphElement = GlyphElement;\nexports.GradientElement = GradientElement;\nexports.ImageElement = ImageElement;\nexports.LineElement = LineElement;\nexports.LinearGradientElement = LinearGradientElement;\nexports.MarkerElement = MarkerElement;\nexports.MaskElement = MaskElement;\nexports.Matrix = Matrix;\nexports.MissingGlyphElement = MissingGlyphElement;\nexports.Mouse = Mouse;\nexports.PSEUDO_ZERO = PSEUDO_ZERO;\nexports.Parser = Parser;\nexports.PathElement = PathElement;\nexports.PathParser = PathParser;\nexports.PatternElement = PatternElement;\nexports.Point = Point;\nexports.PolygonElement = PolygonElement;\nexports.PolylineElement = PolylineElement;\nexports.Property = Property;\nexports.QB1 = QB1;\nexports.QB2 = QB2;\nexports.QB3 = QB3;\nexports.RadialGradientElement = RadialGradientElement;\nexports.RectElement = RectElement;\nexports.RenderedElement = RenderedElement;\nexports.Rotate = Rotate;\nexports.SVGElement = SVGElement;\nexports.SVGFontLoader = SVGFontLoader;\nexports.Scale = Scale;\nexports.Screen = Screen;\nexports.Skew = Skew;\nexports.SkewX = SkewX;\nexports.SkewY = SkewY;\nexports.StopElement = StopElement;\nexports.StyleElement = StyleElement;\nexports.SymbolElement = SymbolElement;\nexports.TRefElement = TRefElement;\nexports.TSpanElement = TSpanElement;\nexports.TextElement = TextElement;\nexports.TextPathElement = TextPathElement;\nexports.TitleElement = TitleElement;\nexports.Transform = Transform;\nexports.Translate = Translate;\nexports.UnknownElement = UnknownElement;\nexports.UseElement = UseElement;\nexports.ViewPort = ViewPort;\nexports.compressSpaces = compressSpaces;\nexports.elements = elements;\nexports.getSelectorSpecificity = getSelectorSpecificity;\nexports.normalizeAttributeName = normalizeAttributeName;\nexports.normalizeColor = normalizeColor;\nexports.parseExternalUrl = parseExternalUrl;\nexports.presets = index;\nexports.toMatrixValue = toMatrixValue;\nexports.toNumbers = toNumbers;\nexports.trimLeft = trimLeft;\nexports.trimRight = trimRight;\nexports.vectorMagnitude = vectorMagnitude;\nexports.vectorsAngle = vectorsAngle;\nexports.vectorsRatio = vectorsRatio;\n//# sourceMappingURL=index.cjs.map\n","!function(t,r){\"object\"==typeof exports&&\"undefined\"!=typeof module?r(exports):\"function\"==typeof define&&define.amd?define([\"exports\"],r):r((t=\"undefined\"!=typeof globalThis?globalThis:t||self).svgpathdata={})}(this,(function(t){\"use strict\";\n/*! *****************************************************************************\n Copyright (c) Microsoft Corporation.\n\n Permission to use, copy, modify, and/or distribute this software for any\n purpose with or without fee is hereby granted.\n\n THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\n REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\n INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\n OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n PERFORMANCE OF THIS SOFTWARE.\n ***************************************************************************** */var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])})(t,e)};function e(t,e){if(\"function\"!=typeof e&&null!==e)throw new TypeError(\"Class extends value \"+String(e)+\" is not a constructor or null\");function a(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}var a=\" \";function i(t){var r=\"\";Array.isArray(t)||(t=[t]);for(var e=0;e<t.length;e++){var i=t[e];if(i.type===N.CLOSE_PATH)r+=\"z\";else if(i.type===N.HORIZ_LINE_TO)r+=(i.relative?\"h\":\"H\")+i.x;else if(i.type===N.VERT_LINE_TO)r+=(i.relative?\"v\":\"V\")+i.y;else if(i.type===N.MOVE_TO)r+=(i.relative?\"m\":\"M\")+i.x+a+i.y;else if(i.type===N.LINE_TO)r+=(i.relative?\"l\":\"L\")+i.x+a+i.y;else if(i.type===N.CURVE_TO)r+=(i.relative?\"c\":\"C\")+i.x1+a+i.y1+a+i.x2+a+i.y2+a+i.x+a+i.y;else if(i.type===N.SMOOTH_CURVE_TO)r+=(i.relative?\"s\":\"S\")+i.x2+a+i.y2+a+i.x+a+i.y;else if(i.type===N.QUAD_TO)r+=(i.relative?\"q\":\"Q\")+i.x1+a+i.y1+a+i.x+a+i.y;else if(i.type===N.SMOOTH_QUAD_TO)r+=(i.relative?\"t\":\"T\")+i.x+a+i.y;else{if(i.type!==N.ARC)throw new Error('Unexpected command type \"'+i.type+'\" at index '+e+\".\");r+=(i.relative?\"a\":\"A\")+i.rX+a+i.rY+a+i.xRot+a+ +i.lArcFlag+a+ +i.sweepFlag+a+i.x+a+i.y}}return r}function n(t,r){var e=t[0],a=t[1];return[e*Math.cos(r)-a*Math.sin(r),e*Math.sin(r)+a*Math.cos(r)]}function o(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var e=0;e<t.length;e++)if(\"number\"!=typeof t[e])throw new Error(\"assertNumbers arguments[\"+e+\"] is not a number. \"+typeof t[e]+\" == typeof \"+t[e]);return!0}var s=Math.PI;function u(t,r,e){t.lArcFlag=0===t.lArcFlag?0:1,t.sweepFlag=0===t.sweepFlag?0:1;var a=t.rX,i=t.rY,o=t.x,u=t.y;a=Math.abs(t.rX),i=Math.abs(t.rY);var h=n([(r-o)/2,(e-u)/2],-t.xRot/180*s),c=h[0],m=h[1],y=Math.pow(c,2)/Math.pow(a,2)+Math.pow(m,2)/Math.pow(i,2);1<y&&(a*=Math.sqrt(y),i*=Math.sqrt(y)),t.rX=a,t.rY=i;var p=Math.pow(a,2)*Math.pow(m,2)+Math.pow(i,2)*Math.pow(c,2),f=(t.lArcFlag!==t.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(a,2)*Math.pow(i,2)-p)/p)),T=a*m/i*f,O=-i*c/a*f,l=n([T,O],t.xRot/180*s);t.cX=l[0]+(r+o)/2,t.cY=l[1]+(e+u)/2,t.phi1=Math.atan2((m-O)/i,(c-T)/a),t.phi2=Math.atan2((-m-O)/i,(-c-T)/a),0===t.sweepFlag&&t.phi2>t.phi1&&(t.phi2-=2*s),1===t.sweepFlag&&t.phi2<t.phi1&&(t.phi2+=2*s),t.phi1*=180/s,t.phi2*=180/s}function h(t,r,e){o(t,r,e);var a=t*t+r*r-e*e;if(0>a)return[];if(0===a)return[[t*e/(t*t+r*r),r*e/(t*t+r*r)]];var i=Math.sqrt(a);return[[(t*e+r*i)/(t*t+r*r),(r*e-t*i)/(t*t+r*r)],[(t*e-r*i)/(t*t+r*r),(r*e+t*i)/(t*t+r*r)]]}var c=Math.PI/180;function m(t,r,e){return(1-e)*t+e*r}function y(t,r,e,a){return t+Math.cos(a/180*s)*r+Math.sin(a/180*s)*e}function p(t,r,e,a){var i=1e-6,n=r-t,o=e-r,s=3*n+3*(a-e)-6*o,u=6*(o-n),h=3*n;return Math.abs(s)<i?[-h/u]:function(t,r,e){void 0===e&&(e=1e-6);var a=t*t/4-r;if(a<-e)return[];if(a<=e)return[-t/2];var i=Math.sqrt(a);return[-t/2-i,-t/2+i]}(u/s,h/s,i)}function f(t,r,e,a,i){var n=1-i;return t*(n*n*n)+r*(3*n*n*i)+e*(3*n*i*i)+a*(i*i*i)}t.SVGPathDataTransformer=void 0,function(t){function r(){return i((function(t,r,e){return t.relative&&(void 0!==t.x1&&(t.x1+=r),void 0!==t.y1&&(t.y1+=e),void 0!==t.x2&&(t.x2+=r),void 0!==t.y2&&(t.y2+=e),void 0!==t.x&&(t.x+=r),void 0!==t.y&&(t.y+=e),t.relative=!1),t}))}function e(){var t=NaN,r=NaN,e=NaN,a=NaN;return i((function(i,n,o){return i.type&N.SMOOTH_CURVE_TO&&(i.type=N.CURVE_TO,t=isNaN(t)?n:t,r=isNaN(r)?o:r,i.x1=i.relative?n-t:2*n-t,i.y1=i.relative?o-r:2*o-r),i.type&N.CURVE_TO?(t=i.relative?n+i.x2:i.x2,r=i.relative?o+i.y2:i.y2):(t=NaN,r=NaN),i.type&N.SMOOTH_QUAD_TO&&(i.type=N.QUAD_TO,e=isNaN(e)?n:e,a=isNaN(a)?o:a,i.x1=i.relative?n-e:2*n-e,i.y1=i.relative?o-a:2*o-a),i.type&N.QUAD_TO?(e=i.relative?n+i.x1:i.x1,a=i.relative?o+i.y1:i.y1):(e=NaN,a=NaN),i}))}function a(){var t=NaN,r=NaN;return i((function(e,a,i){if(e.type&N.SMOOTH_QUAD_TO&&(e.type=N.QUAD_TO,t=isNaN(t)?a:t,r=isNaN(r)?i:r,e.x1=e.relative?a-t:2*a-t,e.y1=e.relative?i-r:2*i-r),e.type&N.QUAD_TO){t=e.relative?a+e.x1:e.x1,r=e.relative?i+e.y1:e.y1;var n=e.x1,o=e.y1;e.type=N.CURVE_TO,e.x1=((e.relative?0:a)+2*n)/3,e.y1=((e.relative?0:i)+2*o)/3,e.x2=(e.x+2*n)/3,e.y2=(e.y+2*o)/3}else t=NaN,r=NaN;return e}))}function i(t){var r=0,e=0,a=NaN,i=NaN;return function(n){if(isNaN(a)&&!(n.type&N.MOVE_TO))throw new Error(\"path must start with moveto\");var o=t(n,r,e,a,i);return n.type&N.CLOSE_PATH&&(r=a,e=i),void 0!==n.x&&(r=n.relative?r+n.x:n.x),void 0!==n.y&&(e=n.relative?e+n.y:n.y),n.type&N.MOVE_TO&&(a=r,i=e),o}}function s(t,r,e,a,n,s){return o(t,r,e,a,n,s),i((function(i,o,u,h){var c=i.x1,m=i.x2,y=i.relative&&!isNaN(h),p=void 0!==i.x?i.x:y?0:o,f=void 0!==i.y?i.y:y?0:u;function T(t){return t*t}i.type&N.HORIZ_LINE_TO&&0!==r&&(i.type=N.LINE_TO,i.y=i.relative?0:u),i.type&N.VERT_LINE_TO&&0!==e&&(i.type=N.LINE_TO,i.x=i.relative?0:o),void 0!==i.x&&(i.x=i.x*t+f*e+(y?0:n)),void 0!==i.y&&(i.y=p*r+i.y*a+(y?0:s)),void 0!==i.x1&&(i.x1=i.x1*t+i.y1*e+(y?0:n)),void 0!==i.y1&&(i.y1=c*r+i.y1*a+(y?0:s)),void 0!==i.x2&&(i.x2=i.x2*t+i.y2*e+(y?0:n)),void 0!==i.y2&&(i.y2=m*r+i.y2*a+(y?0:s));var O=t*a-r*e;if(void 0!==i.xRot&&(1!==t||0!==r||0!==e||1!==a))if(0===O)delete i.rX,delete i.rY,delete i.xRot,delete i.lArcFlag,delete i.sweepFlag,i.type=N.LINE_TO;else{var l=i.xRot*Math.PI/180,v=Math.sin(l),_=Math.cos(l),d=1/T(i.rX),x=1/T(i.rY),A=T(_)*d+T(v)*x,E=2*v*_*(d-x),C=T(v)*d+T(_)*x,M=A*a*a-E*r*a+C*r*r,R=E*(t*a+r*e)-2*(A*e*a+C*t*r),S=A*e*e-E*t*e+C*t*t,g=(Math.atan2(R,M-S)+Math.PI)%Math.PI/2,I=Math.sin(g),V=Math.cos(g);i.rX=Math.abs(O)/Math.sqrt(M*T(V)+R*I*V+S*T(I)),i.rY=Math.abs(O)/Math.sqrt(M*T(I)-R*I*V+S*T(V)),i.xRot=180*g/Math.PI}return void 0!==i.sweepFlag&&0>O&&(i.sweepFlag=+!i.sweepFlag),i}))}function T(){return function(t){var r={};for(var e in t)r[e]=t[e];return r}}t.ROUND=function(t){function r(r){return Math.round(r*t)/t}return void 0===t&&(t=1e13),o(t),function(t){return void 0!==t.x1&&(t.x1=r(t.x1)),void 0!==t.y1&&(t.y1=r(t.y1)),void 0!==t.x2&&(t.x2=r(t.x2)),void 0!==t.y2&&(t.y2=r(t.y2)),void 0!==t.x&&(t.x=r(t.x)),void 0!==t.y&&(t.y=r(t.y)),void 0!==t.rX&&(t.rX=r(t.rX)),void 0!==t.rY&&(t.rY=r(t.rY)),t}},t.TO_ABS=r,t.TO_REL=function(){return i((function(t,r,e){return t.relative||(void 0!==t.x1&&(t.x1-=r),void 0!==t.y1&&(t.y1-=e),void 0!==t.x2&&(t.x2-=r),void 0!==t.y2&&(t.y2-=e),void 0!==t.x&&(t.x-=r),void 0!==t.y&&(t.y-=e),t.relative=!0),t}))},t.NORMALIZE_HVZ=function(t,r,e){return void 0===t&&(t=!0),void 0===r&&(r=!0),void 0===e&&(e=!0),i((function(a,i,n,o,s){if(isNaN(o)&&!(a.type&N.MOVE_TO))throw new Error(\"path must start with moveto\");return r&&a.type&N.HORIZ_LINE_TO&&(a.type=N.LINE_TO,a.y=a.relative?0:n),e&&a.type&N.VERT_LINE_TO&&(a.type=N.LINE_TO,a.x=a.relative?0:i),t&&a.type&N.CLOSE_PATH&&(a.type=N.LINE_TO,a.x=a.relative?o-i:o,a.y=a.relative?s-n:s),a.type&N.ARC&&(0===a.rX||0===a.rY)&&(a.type=N.LINE_TO,delete a.rX,delete a.rY,delete a.xRot,delete a.lArcFlag,delete a.sweepFlag),a}))},t.NORMALIZE_ST=e,t.QT_TO_C=a,t.INFO=i,t.SANITIZE=function(t){void 0===t&&(t=0),o(t);var r=NaN,e=NaN,a=NaN,n=NaN;return i((function(i,o,s,u,h){var c=Math.abs,m=!1,y=0,p=0;if(i.type&N.SMOOTH_CURVE_TO&&(y=isNaN(r)?0:o-r,p=isNaN(e)?0:s-e),i.type&(N.CURVE_TO|N.SMOOTH_CURVE_TO)?(r=i.relative?o+i.x2:i.x2,e=i.relative?s+i.y2:i.y2):(r=NaN,e=NaN),i.type&N.SMOOTH_QUAD_TO?(a=isNaN(a)?o:2*o-a,n=isNaN(n)?s:2*s-n):i.type&N.QUAD_TO?(a=i.relative?o+i.x1:i.x1,n=i.relative?s+i.y1:i.y2):(a=NaN,n=NaN),i.type&N.LINE_COMMANDS||i.type&N.ARC&&(0===i.rX||0===i.rY||!i.lArcFlag)||i.type&N.CURVE_TO||i.type&N.SMOOTH_CURVE_TO||i.type&N.QUAD_TO||i.type&N.SMOOTH_QUAD_TO){var f=void 0===i.x?0:i.relative?i.x:i.x-o,T=void 0===i.y?0:i.relative?i.y:i.y-s;y=isNaN(a)?void 0===i.x1?y:i.relative?i.x:i.x1-o:a-o,p=isNaN(n)?void 0===i.y1?p:i.relative?i.y:i.y1-s:n-s;var O=void 0===i.x2?0:i.relative?i.x:i.x2-o,l=void 0===i.y2?0:i.relative?i.y:i.y2-s;c(f)<=t&&c(T)<=t&&c(y)<=t&&c(p)<=t&&c(O)<=t&&c(l)<=t&&(m=!0)}return i.type&N.CLOSE_PATH&&c(o-u)<=t&&c(s-h)<=t&&(m=!0),m?[]:i}))},t.MATRIX=s,t.ROTATE=function(t,r,e){void 0===r&&(r=0),void 0===e&&(e=0),o(t,r,e);var a=Math.sin(t),i=Math.cos(t);return s(i,a,-a,i,r-r*i+e*a,e-r*a-e*i)},t.TRANSLATE=function(t,r){return void 0===r&&(r=0),o(t,r),s(1,0,0,1,t,r)},t.SCALE=function(t,r){return void 0===r&&(r=t),o(t,r),s(t,0,0,r,0,0)},t.SKEW_X=function(t){return o(t),s(1,0,Math.atan(t),1,0,0)},t.SKEW_Y=function(t){return o(t),s(1,Math.atan(t),0,1,0,0)},t.X_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),o(t),s(-1,0,0,1,t,0)},t.Y_AXIS_SYMMETRY=function(t){return void 0===t&&(t=0),o(t),s(1,0,0,-1,0,t)},t.A_TO_C=function(){return i((function(t,r,e){return N.ARC===t.type?function(t,r,e){var a,i,o,s;t.cX||u(t,r,e);for(var h=Math.min(t.phi1,t.phi2),y=Math.max(t.phi1,t.phi2)-h,p=Math.ceil(y/90),f=new Array(p),T=r,O=e,l=0;l<p;l++){var v=m(t.phi1,t.phi2,l/p),_=m(t.phi1,t.phi2,(l+1)/p),d=_-v,x=4/3*Math.tan(d*c/4),A=[Math.cos(v*c)-x*Math.sin(v*c),Math.sin(v*c)+x*Math.cos(v*c)],E=A[0],C=A[1],M=[Math.cos(_*c),Math.sin(_*c)],R=M[0],S=M[1],g=[R+x*Math.sin(_*c),S-x*Math.cos(_*c)],I=g[0],V=g[1];f[l]={relative:t.relative,type:N.CURVE_TO};var D=function(r,e){var a=n([r*t.rX,e*t.rY],t.xRot),i=a[0],o=a[1];return[t.cX+i,t.cY+o]};a=D(E,C),f[l].x1=a[0],f[l].y1=a[1],i=D(I,V),f[l].x2=i[0],f[l].y2=i[1],o=D(R,S),f[l].x=o[0],f[l].y=o[1],t.relative&&(f[l].x1-=T,f[l].y1-=O,f[l].x2-=T,f[l].y2-=O,f[l].x-=T,f[l].y-=O),T=(s=[f[l].x,f[l].y])[0],O=s[1]}return f}(t,t.relative?0:r,t.relative?0:e):t}))},t.ANNOTATE_ARCS=function(){return i((function(t,r,e){return t.relative&&(r=0,e=0),N.ARC===t.type&&u(t,r,e),t}))},t.CLONE=T,t.CALCULATE_BOUNDS=function(){var t=function(t){var r={};for(var e in t)r[e]=t[e];return r},n=r(),o=a(),s=e(),c=i((function(r,e,a){var i=s(o(n(t(r))));function m(t){t>c.maxX&&(c.maxX=t),t<c.minX&&(c.minX=t)}function T(t){t>c.maxY&&(c.maxY=t),t<c.minY&&(c.minY=t)}if(i.type&N.DRAWING_COMMANDS&&(m(e),T(a)),i.type&N.HORIZ_LINE_TO&&m(i.x),i.type&N.VERT_LINE_TO&&T(i.y),i.type&N.LINE_TO&&(m(i.x),T(i.y)),i.type&N.CURVE_TO){m(i.x),T(i.y);for(var O=0,l=p(e,i.x1,i.x2,i.x);O<l.length;O++){0<(H=l[O])&&1>H&&m(f(e,i.x1,i.x2,i.x,H))}for(var v=0,_=p(a,i.y1,i.y2,i.y);v<_.length;v++){0<(H=_[v])&&1>H&&T(f(a,i.y1,i.y2,i.y,H))}}if(i.type&N.ARC){m(i.x),T(i.y),u(i,e,a);for(var d=i.xRot/180*Math.PI,x=Math.cos(d)*i.rX,A=Math.sin(d)*i.rX,E=-Math.sin(d)*i.rY,C=Math.cos(d)*i.rY,M=i.phi1<i.phi2?[i.phi1,i.phi2]:-180>i.phi2?[i.phi2+360,i.phi1+360]:[i.phi2,i.phi1],R=M[0],S=M[1],g=function(t){var r=t[0],e=t[1],a=180*Math.atan2(e,r)/Math.PI;return a<R?a+360:a},I=0,V=h(E,-x,0).map(g);I<V.length;I++){(H=V[I])>R&&H<S&&m(y(i.cX,x,E,H))}for(var D=0,L=h(C,-A,0).map(g);D<L.length;D++){var H;(H=L[D])>R&&H<S&&T(y(i.cY,A,C,H))}}return r}));return c.minX=1/0,c.maxX=-1/0,c.minY=1/0,c.maxY=-1/0,c}}(t.SVGPathDataTransformer||(t.SVGPathDataTransformer={}));var T,O=function(){function r(){}return r.prototype.round=function(r){return this.transform(t.SVGPathDataTransformer.ROUND(r))},r.prototype.toAbs=function(){return this.transform(t.SVGPathDataTransformer.TO_ABS())},r.prototype.toRel=function(){return this.transform(t.SVGPathDataTransformer.TO_REL())},r.prototype.normalizeHVZ=function(r,e,a){return this.transform(t.SVGPathDataTransformer.NORMALIZE_HVZ(r,e,a))},r.prototype.normalizeST=function(){return this.transform(t.SVGPathDataTransformer.NORMALIZE_ST())},r.prototype.qtToC=function(){return this.transform(t.SVGPathDataTransformer.QT_TO_C())},r.prototype.aToC=function(){return this.transform(t.SVGPathDataTransformer.A_TO_C())},r.prototype.sanitize=function(r){return this.transform(t.SVGPathDataTransformer.SANITIZE(r))},r.prototype.translate=function(r,e){return this.transform(t.SVGPathDataTransformer.TRANSLATE(r,e))},r.prototype.scale=function(r,e){return this.transform(t.SVGPathDataTransformer.SCALE(r,e))},r.prototype.rotate=function(r,e,a){return this.transform(t.SVGPathDataTransformer.ROTATE(r,e,a))},r.prototype.matrix=function(r,e,a,i,n,o){return this.transform(t.SVGPathDataTransformer.MATRIX(r,e,a,i,n,o))},r.prototype.skewX=function(r){return this.transform(t.SVGPathDataTransformer.SKEW_X(r))},r.prototype.skewY=function(r){return this.transform(t.SVGPathDataTransformer.SKEW_Y(r))},r.prototype.xSymmetry=function(r){return this.transform(t.SVGPathDataTransformer.X_AXIS_SYMMETRY(r))},r.prototype.ySymmetry=function(r){return this.transform(t.SVGPathDataTransformer.Y_AXIS_SYMMETRY(r))},r.prototype.annotateArcs=function(){return this.transform(t.SVGPathDataTransformer.ANNOTATE_ARCS())},r}(),l=function(t){return\" \"===t||\"\\t\"===t||\"\\r\"===t||\"\\n\"===t},v=function(t){return\"0\".charCodeAt(0)<=t.charCodeAt(0)&&t.charCodeAt(0)<=\"9\".charCodeAt(0)},_=function(t){function r(){var r=t.call(this)||this;return r.curNumber=\"\",r.curCommandType=-1,r.curCommandRelative=!1,r.canParseCommandOrComma=!0,r.curNumberHasExp=!1,r.curNumberHasExpDigits=!1,r.curNumberHasDecimal=!1,r.curArgs=[],r}return e(r,t),r.prototype.finish=function(t){if(void 0===t&&(t=[]),this.parse(\" \",t),0!==this.curArgs.length||!this.canParseCommandOrComma)throw new SyntaxError(\"Unterminated command at the path end.\");return t},r.prototype.parse=function(t,r){var e=this;void 0===r&&(r=[]);for(var a=function(t){r.push(t),e.curArgs.length=0,e.canParseCommandOrComma=!0},i=0;i<t.length;i++){var n=t[i],o=!(this.curCommandType!==N.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||\"0\"!==this.curNumber&&\"1\"!==this.curNumber),s=v(n)&&(\"0\"===this.curNumber&&\"0\"===n||o);if(!v(n)||s)if(\"e\"!==n&&\"E\"!==n)if(\"-\"!==n&&\"+\"!==n||!this.curNumberHasExp||this.curNumberHasExpDigits)if(\".\"!==n||this.curNumberHasExp||this.curNumberHasDecimal||o){if(this.curNumber&&-1!==this.curCommandType){var u=Number(this.curNumber);if(isNaN(u))throw new SyntaxError(\"Invalid number ending at \"+i);if(this.curCommandType===N.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(0>u)throw new SyntaxError('Expected positive number, got \"'+u+'\" at index \"'+i+'\"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&\"0\"!==this.curNumber&&\"1\"!==this.curNumber)throw new SyntaxError('Expected a flag, got \"'+this.curNumber+'\" at index \"'+i+'\"');this.curArgs.push(u),this.curArgs.length===d[this.curCommandType]&&(N.HORIZ_LINE_TO===this.curCommandType?a({type:N.HORIZ_LINE_TO,relative:this.curCommandRelative,x:u}):N.VERT_LINE_TO===this.curCommandType?a({type:N.VERT_LINE_TO,relative:this.curCommandRelative,y:u}):this.curCommandType===N.MOVE_TO||this.curCommandType===N.LINE_TO||this.curCommandType===N.SMOOTH_QUAD_TO?(a({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),N.MOVE_TO===this.curCommandType&&(this.curCommandType=N.LINE_TO)):this.curCommandType===N.CURVE_TO?a({type:N.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===N.SMOOTH_CURVE_TO?a({type:N.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===N.QUAD_TO?a({type:N.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===N.ARC&&a({type:N.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber=\"\",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(!l(n))if(\",\"===n&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if(\"+\"!==n&&\"-\"!==n&&\".\"!==n)if(s)this.curNumber=n,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError(\"Unterminated command at index \"+i+\".\");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character \"'+n+'\" at index '+i+\". Command cannot follow comma\");if(this.canParseCommandOrComma=!1,\"z\"!==n&&\"Z\"!==n)if(\"h\"===n||\"H\"===n)this.curCommandType=N.HORIZ_LINE_TO,this.curCommandRelative=\"h\"===n;else if(\"v\"===n||\"V\"===n)this.curCommandType=N.VERT_LINE_TO,this.curCommandRelative=\"v\"===n;else if(\"m\"===n||\"M\"===n)this.curCommandType=N.MOVE_TO,this.curCommandRelative=\"m\"===n;else if(\"l\"===n||\"L\"===n)this.curCommandType=N.LINE_TO,this.curCommandRelative=\"l\"===n;else if(\"c\"===n||\"C\"===n)this.curCommandType=N.CURVE_TO,this.curCommandRelative=\"c\"===n;else if(\"s\"===n||\"S\"===n)this.curCommandType=N.SMOOTH_CURVE_TO,this.curCommandRelative=\"s\"===n;else if(\"q\"===n||\"Q\"===n)this.curCommandType=N.QUAD_TO,this.curCommandRelative=\"q\"===n;else if(\"t\"===n||\"T\"===n)this.curCommandType=N.SMOOTH_QUAD_TO,this.curCommandRelative=\"t\"===n;else{if(\"a\"!==n&&\"A\"!==n)throw new SyntaxError('Unexpected character \"'+n+'\" at index '+i+\".\");this.curCommandType=N.ARC,this.curCommandRelative=\"a\"===n}else r.push({type:N.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=n,this.curNumberHasDecimal=\".\"===n}else this.curNumber+=n,this.curNumberHasDecimal=!0;else this.curNumber+=n;else this.curNumber+=n,this.curNumberHasExp=!0;else this.curNumber+=n,this.curNumberHasExpDigits=this.curNumberHasExp}return r},r.prototype.transform=function(t){return Object.create(this,{parse:{value:function(r,e){void 0===e&&(e=[]);for(var a=0,i=Object.getPrototypeOf(this).parse.call(this,r);a<i.length;a++){var n=i[a],o=t(n);Array.isArray(o)?e.push.apply(e,o):e.push(o)}return e}}})},r}(O),N=function(r){function a(t){var e=r.call(this)||this;return e.commands=\"string\"==typeof t?a.parse(t):t,e}return e(a,r),a.prototype.encode=function(){return a.encode(this.commands)},a.prototype.getBounds=function(){var r=t.SVGPathDataTransformer.CALCULATE_BOUNDS();return this.transform(r),r},a.prototype.transform=function(t){for(var r=[],e=0,a=this.commands;e<a.length;e++){var i=t(a[e]);Array.isArray(i)?r.push.apply(r,i):r.push(i)}return this.commands=r,this},a.encode=function(t){return i(t)},a.parse=function(t){var r=new _,e=[];return r.parse(t,e),r.finish(e),e},a.CLOSE_PATH=1,a.MOVE_TO=2,a.HORIZ_LINE_TO=4,a.VERT_LINE_TO=8,a.LINE_TO=16,a.CURVE_TO=32,a.SMOOTH_CURVE_TO=64,a.QUAD_TO=128,a.SMOOTH_QUAD_TO=256,a.ARC=512,a.LINE_COMMANDS=a.LINE_TO|a.HORIZ_LINE_TO|a.VERT_LINE_TO,a.DRAWING_COMMANDS=a.HORIZ_LINE_TO|a.VERT_LINE_TO|a.LINE_TO|a.CURVE_TO|a.SMOOTH_CURVE_TO|a.QUAD_TO|a.SMOOTH_QUAD_TO|a.ARC,a}(O),d=((T={})[N.MOVE_TO]=2,T[N.LINE_TO]=2,T[N.HORIZ_LINE_TO]=1,T[N.VERT_LINE_TO]=1,T[N.CLOSE_PATH]=0,T[N.QUAD_TO]=4,T[N.SMOOTH_QUAD_TO]=2,T[N.CURVE_TO]=6,T[N.SMOOTH_CURVE_TO]=4,T[N.ARC]=7,T);t.COMMAND_ARG_COUNTS=d,t.SVGPathData=N,t.SVGPathDataParser=_,t.encodeSVGPath=i,Object.defineProperty(t,\"__esModule\",{value:!0})}));\n//# sourceMappingURL=SVGPathData.cjs.map\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(\"./src/index.js\");\n"],"names":["root","factory","exports","module","define","amd","self","require","e","_packages","__esModule","default","draw2d","Canvas","Class","extend","NAME","init","canvasId","width","height","_this","this","setScrollArea","document","body","html","$","css","isNaN","parseFloat","initialWidth","getWidth","initialHeight","getHeight","parseInt","droppable","accept","over","event","ui","onDragEnter","draggable","out","onDragLeave","drop","_getEvent","helperPos","helper","position","pos","fromDocumentToCanvasCoordinate","clientX","clientY","onDrop","getX","left","getY","top","shiftKey","ctrlKey","appendTo","stack","zIndex","drag","onDrag","stop","start","addClass","paper","Raphael","canvas","style","zoomPolicy","zoomFactor","selection","Selection","currentDropTarget","currentHoverFigure","regionDragDropConstraint","policy","figure","RegionEditPolicy","eventSubscriptions","editPolicy","util","ArrayList","figures","lines","commonPorts","resizeHandles","commandStack","command","CommandStack","linesToRepaintAfterDragDrop","lineIntersections","installEditPolicy","WheelZoomPolicy","DefaultKeyboardPolicy","BoundingboxSelectionPolicy","DropInterceptorPolicy","connection","ComposedConnectionCreatePolicy","DragConnectionCreatePolicy","ClickConnectionCreatePolicy","addEventListener","isPostChangeEvent","calculateConnectionIntersection","each","i","line","svgPathString","repaint","mouseDown","mouseDownX","mouseDownY","mouseDragDiffX","mouseDragDiffY","bind","onMouseUp","x","y","hover","getBestFigure","onMouseLeave","fireEvent","onMouseEnter","exc","console","log","onMouseMove","hoverFigure","diffXAbs","diffYAbs","onMouseDrag","which","preventDefault","onMouseDown","stopPropagation","onRightMouseDown","on","onDoubleClick","onClick","originalEvent","delta","type","wheelDelta","detail","onMouseWheel","keyupCallback","target","is","KeyboardPolicy","onKeyUp","keyCode","keydownCallback","onKeyDown","destroy","clear","unbind","remove","clone","markSaveLocation","hideDecoration","showDecoration","getLines","getSize","l1","removeElementAt","ii","l2","partInter","intersection","add","other","SelectionPolicy","getSelection","getAll","unselect","grep","p","stay","onUninstall","ZoomPolicy","ConnectionCreatePolicy","uninstallEditPolicy","onInstall","removed","name","getDropInterceptorPolicies","setZoom","animated","getZoom","getDimension","geo","Rectangle","setDimension","dim","widths","getFigures","map","f","getAbsoluteX","heights","getAbsoluteY","Math","max","asArray","w","h","setSize","Point","getScrollLeft","getScrollTop","fromCanvasToDocumentCoordinate","getHtmlContainer","touches","length","changedTouches","elementSelector","scrollArea","getScrollArea","scrollLeft","scrollTop","setScrollLeft","setScrollTop","scrollTo","offset","getCanvas","shape","basic","Line","setPosition","setCanvas","getShapeElement","dx","dy","PolyLine","contains","Connection","disconnect","getLine","id","count","get","getId","getFigure","getIntersection","result","entry","j","justTouching","snapToHelper","orig","SnapToEditPolicy","snap","registerPort","port","unregisterPort","getAllPorts","getCommandStack","getPrimarySelection","getPrimary","setCurrentSelection","object","addSelection","select","blacklist","whitelist","Array","isArray","testFigure","isInList","list","len","considering","isInBlacklist","item","isInWhitelist","checkRecursive","children","c","isVisible","hitTest","figureResult","childResult","lineResult","getBestLine","array","node","index","filter","sort","a","b","lineToIgnore","Figure","inArray","draggedDomNode","droppedDomNode","relX","relY","onContextMenu","returnValue","args","subscribers","callback","events","split","push","off","eventOrFunction","Configuration","version","i18n","move","assignShape","groupShapes","ungroupShapes","deleteShape","moveShape","moveLine","addShape","moveVertex","moveVertices","deleteVertex","resizeShape","rotateShape","collection","addVertex","changeAttributes","connectPorts","menu","deleteSegment","addSegment","dialog","filenamePrompt","createResizeHandle","owner","ResizeHandle","createConnection","sourcePort","targetPort","dropTarget","createInputPort","relatedFigure","InputPort","createOutputPort","OutputPort","createHybridPort","HybridPort","attr","setter","getter","oldPoint","sourceDecorator","targetDecorator","sourceDecoratorNode","targetDecoratorNode","isMoving","moveListener","setStartPoint","setEndPoint","_super","color","stroke","radius","setSourceDecorator","setTargetDecorator","source","setSource","setTarget","getSourceDecorator","getTargetDecorator","getSource","getTarget","connections","onDisconnect","fireSourcePortRouteEvent","fireTargetPortRouteEvent","reconnect","onConnect","routingRequired","isResizeable","isDraggable","child","locator","layout","ConnectionLocator","decorator","setParent","calculatePath","routingHints","z1","getZOrder","z2","toBack","attributes","repaintBlocked","paint","getVertices","first","transform","getStartAngle","opacity","alpha","getColor","lineColor","hex","forEach","setAttribute","cssClass","end","last","getEndAngle","hash","postProcess","postProcessCache","router","dx2","dy2","updateVertices","DragDropEditPolicy","moved","toFront","insertAfter","getStartPoint","refPoint","getStartPosition","getConnectionAnchorLocation","getConnectionAnchorReferencePoint","getEndPoint","getEndPosition","getPeerPort","sharingPorts","notiCanvas","lineSegments","p1","p2","SplineConnectionRouter","sqrt","angle","PI","asin","abs","getConnections","conn","createCommand","request","getPolicy","CommandType","MOVE","CommandMoveVertices","MOVE_BASEPOINT","CommandReconnect","getPersistentAttributes","memento","parentNode","getParent","getName","decoration","setPersistentAttributes","Function","_interopRequireDefault","_JSONUtil","_UUID","_extend","MIN_TIMER_INTERVAL","setterWhitelist","setId","setX","setY","setWidth","setHeight","boundingBox","setBoundingBox","minWidth","setMinWidth","minHeight","setMinHeight","setCssClass","userData","setUserData","setDraggable","resizeable","setResizeable","selectable","setSelectable","setRotationAngle","setAlpha","glow","setGlow","visible","setVisible","keepAspectRatio","setKeepAspectRatio","getterWhitelist","getRotationAngle","getUserData","isSelectable","getAlpha","UUID","create","cachedZOrder","isResizeHandle","deleteable","canSnapToHelper","snapToGridAnchor","timerId","timerInterval","parent","composite","rotationAngle","replace","RegExp","getMinWidth","getMinHeight","isInDragDrop","ox","oy","lastAppliedAttributes","selectionHandles","panningDelegate","relocateChildrenEventCallback","relocate","defaultSelectionAdapter","selectionAdapter","RectangleSelectionFeedbackPolicy","value","isPlainObject","key","substring","jsonUtil","set","func","param","undefined","call","data","Object","assign","keys","k","pick","obj","var_keys","arguments","prototype","slice","asPrimarySelection","onSelect","onUnselect","setSelectionAdapter","adapter","getSelectionAdapter","isSelected","newId","getCssClass","trim","removeAttribute","hasCssClass","className","test","addCssClass","removeCssClass","newClass","indexOf","toggleCssClass","stopTimer","startTimer","milliSeconds","window","setInterval","onTimer","clearInterval","StrongComposite","getTopLevelShapeElement","insertElementAt","handle","insertBefore","SelectionFeedbackPolicy","__proto__","removedPolicy","debug","warn","getChildren","resetChildren","createShapeElement","hide","visibleDuration","fadeOut","show","fadeIn","flatDiff","getOwnPropertyNames","applyTransformation","flag","getHandleBBox","onDragStart","bbox","translate","getAbsolutePosition","scale","getBestChild","canStartDrag","newPos","adjustPosition","getCanSnapToHelper","onPanning","onPanningEnd","onDragEnd","execute","delegateTarget","draggedFigure","delegate","onCatch","droppedFigure","percent","min","duration","getKeepAspectRatio","from","setCanSnapToHelper","getSnapToGridAnchor","setSnapToGridAnchor","point","getAbsoluteBounds","oldPos","getPosition","old","newDim","adjustDimension","rect","getBoundingBox","getOuterBoundingBox","parentBB","childBB","merge","iX","iY","corona","isMemberDraggable","isMemberSelectable","isStrechable","isDeleteable","setDeleteable","containedFigure","getRoot","setComposite","getComposite","_inEvent","context","___originalCallback","figureToIgnore","CommandMove","DELETE","CommandDelete","RESIZE","CommandResize","cloneMetaData","excludeChildren","initialId","HeadlessCanvas","Port","InputPortLocator","maxFanIn","Number","MAX_SAFE_INTEGER","setMaxFanIn","getMaxFanIn","CONNECT","CommandConnect","OutputPortLocator","Circle","DEFAULT_BORDER_COLOR","Color","lighterBgColor","coronaWidth","bgColor","diameter","setCoronaWidth","semanticGroup","setSemanticGroup","getCoronaWidth","getSemanticGroup","useGradient","preferredConnectionDirection","emitter","connectionAnchor","anchor","ConnectionAnchor","maxFanOut","IntrusivePortsFeedbackPolicy","portSelectionAdapter","setMaxFanOut","getMaxFanOut","group","setConnectionAnchor","setOwner","referencePoint","inquiringConnection","getLocation","getReferencePoint","getConnectionDirection","peerPort","getDirection","setConnectionDirection","direction","setLocator","getLocator","setBackgroundColor","lighter","setValue","onPortValueChanged","getValue","cx","cy","rx","ry","cursor","fill","rgba","join","_oldstroke","getStroke","setStroke","setName","iX2","iY2","Corona","setDiameter","d","CommandMovePort","ports","setColor","zoomCallback","origWidth","origHeight","origRadius","origStroke","blockEvent","setType","getOwner","getType","commandMove","commandResize","getSnapToDirection","SnapToHelper","NORTH_WEST","NORTH","NORTH_EAST","EAST","SOUTH_EAST","SOUTH","SOUTH_WEST","WEST","NSEW","updateCursor","oldX","oldY","diffX","diffY","objPosX","objPosY","objWidth","objHeight","newX","newY","corrPos","isTouchDevice","offset2","bgGradient","darker","supportsSnapToHelper","ctrl","SVGFigure","SetFigure","svg","setSVG","getSVG","createSet","importSVG","svgNodes","newSVGNodes","oldSVG","rawSVG","svgDOM","_dimensionReadFromJSON","findStyle","element","tagName","substr","nodeName","nodeValue","exec","$1","$2","r","circle","ellipse","path","x1","y1","x2","y2","points","polygon","image","childNodes","firstChild","nodeType","subShape","text","subAttr","getBBox","nextSibling","error","alert","primary","all","setPrimary","checkDescendant","figureToCheck","isEmpty","expand","addRecursive","addAll","getAssignedFigures","reverse","originalWidth","originalHeight","scaleX","scaleY","strokeScale","applyAlpha","s","before","rs","getPorts","bb","VectorFigure","Node","dasharray","strokeBeforeGlow","glowIsActive","setDashArray","setRadius","getDashArray","getRadius","getBackgroundColor","dashPattern","Command","label","getLabel","canExecute","cancel","undo","redo","CommandAdd","CommandAddVertex","newPoint","removeVertexAt","insertVertexAt","CommandAssignFigure","assignedConnections","isNode","oldBoundingBox","assignFigure","oldComposite","unassignFigure","stickFigures","CommandAttr","newAttributes","oldAttributes","CommandBoundingBox","newBoundingBox","equals","CommandCollection","commandLabel","commands","labels","unique","canExec","cmd","setConnection","getConnection","optionalCallback","removedParentEntry","indexOfChild","CommandDeleteGroup","batchDelete","CommandUngroup","CommandGroup","Group","setStartPosition","CommandMoveConnection","setTranslation","CommandMoveLine","CommandMoveVertex","setIndex","origPoint","updatePosition","setVertex","oldVertices","newVertices","setVertices","con","oldSourcePort","oldTargetPort","setNewPorts","newSourcePort","newTargetPort","CommandRemoveVertex","CommandReplaceVertices","originalVertices","oldWidth","oldHeight","newWidth","newHeight","CommandRotate","oldAngle","newAngle","rotate","portRelayoutRequired","undostack","redostack","maxundo","transactionCommand","eventListeners","setUndoLimit","notifyListeners","POST_EXECUTE","PRE_EXECUTE","startTransaction","isInTransaction","commitTransaction","pop","PRE_UNDO","POST_UNDO","PRE_REDO","POST_REDO","getRedoLabel","getUndoLabel","canRedo","canUndo","listener","CommandStackEventListener","stackChanged","removeEventListener","state","action","CommandStackEvent","size","POST_INIT","POST_MASK","PRE_MASK","details","getStack","getCommand","getDetails","isPreChangeEvent","MOVE_VERTEX","MOVE_VERTICES","MOVE_GHOST_VERTEX","RESET","ROTATE","ArrowDecorator","Decorator","st","backgroundColor","BarDecorator","CircleDecorator","_Color","DiamondDecorator","inverseLerp","X1","Y1","X2","Y2","px","py","nenner","zaehler","pointProjection","minx","maxx","miny","maxy","U","pow","distance","projlenSq","dotprod","lenSq","bx","by","bw","bh","setBoundary","adjustBoundary","PositionConstants","getDistance","translated","factor","scaled","getScaled","subtract","that","dot","cross","lerp","t","Ray","isHorizontal","similarity","otherRay","getAveraged","resize","dw","dh","setBounds","getLeft","getRight","getTop","getBottom","getTopLeft","getTopCenter","getTopRight","getCenterLeft","getCenterRight","getBottomLeft","getBottomCenter","getCenter","getBottomRight","moveInside","newRect","pointOrRectangle","cw","ch","ow","oh","oct","determineOctant","r2","HISTERESE","current","DIRECTION_UP","DIRECTION_LEFT","DIRECTION_RIGHT","DIRECTION_DOWN","o","isInside","intersects","x11","y11","x12","y12","x21","y21","x22","y22","intersectionWithLine","v","toJSON","Util","insetPoint","distanceFromStart","vx","vy","localDistance","io","Reader","unmarshal","Writer","marshal","resultCallback","formatXml","xml","formatted","reg","pad","indent","match","padding","json","JSON","parse","createFigureFromElement","createFigureFromType","val","getPort","base64Content","Base64","encode","stringify","canvg","png","cropBoundingBox","canvasState","origPos","outerHTML","zoom","XMLSerializer","serializeToString","find","canvasDomNode","append","fullSizeCanvas","ignoreMouse","ignoreAnimation","renderCallback","sourceX","sourceY","sourceWidth","sourceHeight","croppedCanvas","createElement","getContext","drawImage","dataUrl","toDataURL","base64Image","img","CenterEdgeConnectionAnchor","ref","dir","center","getBox","ChopboxConnectionAnchor","reference","FanConnectionAnchor","separation","ray","xSeparation","ySeparation","intersections","reduce","previous","p0","ShortesPathConnectionAnchor","Oval","CircuitConnectionRouter","ManhattanConnectionRouter","setBridgeRadius","setVertexRadius","abortRoutingOnFirstVertexNode","LineSelectionFeedbackPolicy","vertexNodes","vertexRadius","setJunctionRadius","bridgeRadius","bridge_LR","bridge_RL","route","fromPt","fromDir","toPt","toDir","_route","intersectionsASC","intersectionsDESC","intersectionForCalc","ps","oldP","bridgeWidth","bridgeCode","lastVertexNode","interP","hit","otherZ","vertexNode","exclude","ConnectionRouter","_paint","inset","adjust","toFixed","lastP","canRemoveVertexAt","canRemoveSegmentAt","verticesSet","DirectRouter","invalidate","addPoint","FanConnectionRouter","routeCollision","midPoint","bendPoint","InteractiveManhattanConnectionRouter","OrthogonalSelectionFeedbackPolicy","_routingMetaData","routedByUserInteraction","halfRoute","MINDIST","vertexCount","vertex","startMoved","endMoved","segmentCount","tmpConn","vertices","draggedSegment","getVertex","getSegments","lp0","lp1","routingMetaData","ManhattanBridgedConnectionRouter","BRIDGE_HORIZONTAL_LR","BRIDGE_HORIZONTAL_RL","floor","TOL","TOLxTOL","TOGGLE_DIST","UP","RIGHT","DOWN","LEFT","xDiff","yDiff","ROUTER_RECTS","MazeConnectionRouter","useSpline","useSimplify","useSimplifyValue","useDebug","useShift","portOutletOffset","finder","PF","JumpPointFinder","allowDiagonal","dontCrossCorners","shift","oldToPt","oldFromPt","getAdjustedPoint","grid","generateNoGoGrid","findPath","isWalkableAt","svgPathBefore","adjustPath","pt","spline","CubicSpline","splinePoints","generate","simplify","oneShift2","canvasWidth","canvasHeight","Grid","box","r_orig","b_orig","setWalkableAt","adjustment","getSquareDistance","getSquareSegmentDistance","simplifyRadialDistance","sqTolerance","prevPoint","newPoints","simplifyDouglasPeucker","maxSqDist","sqDist","markers","Uint8Array","firstStack","lastStack","tolerance","highestQuality","MuteableManhattanConnectionRouter","rowsUsed","colsUsed","constraints","reservedInfo","startPoint","endPoint","average","startNormal","getStartDirection","endNormal","getEndDirection","positions","horizontal","isCycle","next","trial","findFirstFigureAtStraightLine","EMPTY_LIST","getExcludingFigures","processPositions","getColumnNear","n","proximity","reserveColumn","getRowNear","reserveRow","removeReservedLines","prev","rInfo","reservedRows","reservedCols","column","info","row","getConstraint","setConstraint","constraint","excluding","col","getMidpoint","RubberbandRouter","thickness","uv","uv2","strength","second","third","start90","start270","first90","first270","second90","second270","third90","third270","end90","end270","SketchConnectionRouter","VertexRouter","VertexSelectionFeedbackPolicy","startAnchor","endAnchor","BottomLocator","Locator","targetBoundingBox","CenterLocator","DraggableLocator","PortLocator","dividerFactor","thisNAME","portIndex","applyConsiderRotation","LeftLocator","margin","ManhattanMidpointLocator","segmentIndex","ParallelMidpointLocator","setDistance","nx","ny","radian","rotAnchor","rotCenterOfLabel","xm","ym","cos","sin","PolylineMidpointLocator","halfW","halfH","rotAngle","m","matrix","ratio","RightLocator","SmartDraggableLocator","boundedCorners","dist","xOffset","yOffset","calcBoundingCorner","i_parent","i_child","parentVertices","childVertices","TopLocator","XYAbsPortLocator","XYRelPortLocator","mesh","ExplodeLayouter","MeshLayouter","MIN_MARGIN","figureToAdd","changes","dis","currentOctChanges","ProposedMeshChange","r1","uid","Date","autoResize","defaults","onResize","onBeforeResize","onAfterResize","animate","complete","extraSpace","maxHeight","maxWidth","config","resizableFilterSelector","AutoResizer","el","toLowerCase","previousScrollTop","overflowY","apply","cloneCSSProperties","cloneCSSValues","overflow","fn","check","proxy","setTimeout","createClone","removeAttr","whiteSpace","immediate","injectClone","prevValue","cloneWidth","currentWidth","removeData","cloneContainer","jQuery","support","htmlMenuitem","htmlCommand","eventSelectstart","documentElement","widget","_cleanData","cleanData","elems","elem","triggerHandler","$currentTrigger","initialized","$win","counter","namespaces","menus","types","selector","trigger","autoHide","delay","reposition","determinePosition","$menu","my","at","of","collision","outerHeight","outerWidth","opt","bottom","right","positionSubmenu","animation","noop","items","hoveract","timer","pageX","pageY","abortevent","stopImmediatePropagation","contextmenu","$this","hasClass","build","built","isEmptyObject","Error","$trigger","op","click","Event","mousedown","button","mouseup","mouseenter","$related","relatedTarget","$document","closest","mousemove","mouseleave","clearTimeout","layerClick","$window","triggerAction","elementFromPoint","$layer","has","one","contextMenu","keyStop","isInput","$selected","blur","prop","$parent","itemdata","String","fromCharCode","toUpperCase","accesskeys","$node","prevItem","$s","$children","$prev","$round","itemMouseleave","itemMouseenter","$input","focus","nextItem","$next","focusInput","contextMenuRoot","blurInput","menuMouseenter","hovering","menuMouseleave","itemClick","contextMenuKey","isFunction","callbacks","hasOwnProperty","update","inputClick","hideMenu","force","focusItem","siblings","blurItem","removeClass","$t","zin","$tt","zindex","layer","$label","accesskey","ak","aks","splitAccesskey","_name","hasTypes","inputs","selected","prependTo","radio","options","icon","nested","display","ceil","andSelf","$item","disabled","fixedPosition","inputLabel","menuChildren","operation","$context","_hasContext","ns","$visibleMenu","fromMenu","setInputValues","getInputValues","dimetric","arrow","note","diagram","flowchart","analog","pert","navigator","platform","EditPolicy","host","SingleSelectionPolicy","isInsideMode","rect1","rect2","intersectsMode","decision","boundingBoxFigure1","boundingBoxFigure2","canDrawBoundingBox","oldSelection","setDecisionMode","useIntersectionMode","currentSelection","mouseMovedDuringMouseDown","canDragStart","delegated","mouseDraggingElement","mouseDownElement","draggingLineCommand","draggingLine","fakeDragX","fakeDragY","handleRect","dash","LineResizeHandle","selectionRect","CanvasPolicy","mouseX","mouseY","createMonochromGif","gif","red","green","blue","bit","byte_","writeBit","chunklen","CoronaDecorationPolicy","DecorationPolicy","startDragX","startDragY","diameterToBeFullVisible","diameterToBeVisible","sumDiameter","setDiameterToBeVisible","setDiameterToBeFullVisible","getDiameterToBeVisible","getDiameterToBeFullVisible","__origAlpha","updatePorts","connectInquirer","connectIntent","Hub","inputConnections","outputConnections","ExtendedKeyboardPolicy","FadeoutDecorationPolicy","DEFAULT_FADEOUT_DURATION","DEFAULT_ALPHA_DECREMENT","alphaDec","hidePortsCounter","portDragging","duringHide","GhostMoveSelectionPolicy","ghostRectangle1","ghostRectangle2","sel","resetPorts","_newPos","draggingElement","redrawConnection","inter","PanningSelectionPolicy","area","ReadOnlySelectionPolicy","ShowChessboardEditPolicy","GRID_COLOR","GRID_WIDTH","oldBg","setGrid","onZoomCallback","emitterFigure","zoomData","gridColor","background","backgroundSize","backgroundPosition","ShowDimetricGridEditPolicy","shapes","setGridColor","props","angle26","atan","angle153","cos30","sin30","cos150","sin150","setStart","setFinish","ShowDotEditPolicy","DOT_COLOR","DOT_RADIUS","DOT_DISTANCE","dotDistance","dotRadius","dotColor","ShowGridEditPolicy","DEFAULTS","gridWidth","gridStroke","SnapToCenterEditPolicy","SNAP_THRESHOLD","FADEOUT_DURATION","centers","horizontalGuideLines","verticalGuideLines","hideHorizontalGuides","hideVerticalGuides","modifiedPos","originalPos","allowXChanges","allowYChanges","inputCenter","snapHorizontal","snapped","showHorizontalGuides","diff","vertical","snapVertical","showVerticalGuides","populateCenters","candidates","snappedPoint","causedFigure","fast","SnapToDimetricGridEditPolicy","snapPoint","g","CENTER_H","CENTER_V","NORTH_SOUTH","EAST_WEST","setLineColor","getLineColor","SnapToGeometryEditPolicy","rows","cols","vline","hline","hideVerticalLine","hideHorizontalLine","snapDirections","edge","showVerticalLine","showHorizontalLine","inputBounds","snapRectangle","bounds","resultBounds","topLeft","bottomRight","snapOrientation","inputPoint","resultPoint","populateRowsAndCols","rightCorrection","getCorrectionFor","leftCorrection","bottomCorrection","topCorrection","location","entries","side","resultMag","magnitude","removeAll","causedBox","causedCenter","fromY","maxLength","yLength","snappedBox","fromX","xLength","SnapToGridEditPolicy","showGrid","renderer","SnapToInBetweenEditPolicy","populateBounds","intersectionPoint","leftIntersections","leftInputPoint","causedBBox","rightIntersections","rightInputPoint","snappedRect","leftSide","rightSide","topIntersections","topInputPoint","bottomIntersections","bottomInputPoint","topSide","bottomSide","snapTopLeft","snapTopRight","snapBottomRight","SnapToVerticesEditPolicy","VertexResizeHandle","correction","vertexResizeHandle","diffx","diffy","SNAP","snappedPos","_shifty","debouncedZoomedCallback","_debounce","__wheelZoom","newZoom","client","_zoom","scrollWidth","centerY","centerX","Tweenable","tween","to","easing","step","params","finish","setViewBox","coordsAfter","wait","timeout","callNow","later","z","viewBoxWidth","viewBoxHeight","port1","beeline","pulse","tempConnection","ripple","setEndPosition","setRouter","policies","_arg","anim","circle1","circle2","anim1","repeat","Infinity","anim2","currentTarget","de","ct","PortFeedbackPolicy","onHoverLeave","onHoverEnter","OrthogonalConnectionCreatePolicy","getRouter","beforeVertex","lastVertex","portPos","lastSegmentDir","orthogonal","xDist","AntSelectionFeedbackPolicy","isPrimarySelection","_updateBeeLine","projection","center1","center2","BigRectangleSelectionFeedbackPolicy","BusSelectionFeedbackPolicy","r4","r6","r8","xPos","yPos","FigureEditPolicy","moveCallback","originalAlpha","GlowSelectionFeedbackPolicy","HBusSelectionFeedbackPolicy","HorizontalEditPolicy","RaftSelectionFeedbackPolicy","RaftResizeHandle","dashArray","r3","r5","r7","constRect","diffW","diffH","ResizeSelectionFeedbackPolicy","RoundRectangleSelectionFeedbackPolicy","SlimSelectionFeedbackPolicy","VBusSelectionFeedbackPolicy","GhostVertexResizeHandle","VerticalEditPolicy","WidthSelectionFeedbackPolicy","LineStartResizeHandle","LineEndResizeHandle","p_m1","p3","resizeWidthHalf","resizeHeightHalf","removeSegment","splitSegment","newSegLength","np1","np2","np3","np4","segment","hitSegment","startHandle","endHandle","ElasticStrapFeedbackPolicy","connectionLine","hoverFiger","tweenable","growFactor","allPorts","__beforeInflate","dispose","OpAmp","MyInputPortLocator","calcY","inputLocator","createPort","ResistorBridge","MyOutputPortLocator","outputLocator","ResistorVertical","VoltageSupplyHorizontal","VoltageSupplyVertical","CalligrapherArrowDownLeft","CalligrapherArrowLeft","Arc","startAngle","endAngle","a1","a2","w2","h2","getDiameter","setCenter","Diamond","Polygon","resetVertices","precursorIndex","maxOpacity","Image","setPath","getPath","src","Label","FONT_FALLBACK","cachedWidth","cachedHeight","cachedMinWidth","cachedMinHeight","fontSize","fontColor","fontFamily","outlineStroke","outlineColor","textAlign","bold","editor","setText","installEditor","setOutlineStroke","setOutlineColor","setFontFamily","setFontSize","setFontColor","setPadding","setBold","getText","getOutlineStroke","getOutlineColor","getFontFamily","getFontSize","getFontColor","getPadding","isBold","lastAppliedLabelRotation","lastAppliedTextAttributes","clearCache","lattr","calculateTextAttr","attrDiff","ts","getTextAlign","setTextAlign","font","polySides","oddNodes","pi","pj","DEFAULT_COLOR","isGlowing","outlineVisible","dasharrayOffset","animateDirection","glowColor","glowStrokeSize","startX","setStartX","startY","setStartY","endX","setEndX","endY","setEndY","setCorona","setGlowStrokeSize","setAnmiate","setAnimateDirection","setDasharrayOffset","getCorona","getGlowStrokeSize","getAnmiate","getAnimateDirection","getDasharrayOffset","isFaked","setGlowColor","getGlowColor","getAnimate","setAnimate","_lineColor","_stroke","minX","minY","getStartX","getStartY","getEndX","getEndY","getLength","getAngle","percentage","segments1","segments2","s1","s2","b1","b2","ua_t","ub_t","u_b","ua","ub","getRelatedPort","getOppositePort","objPos","getIndex","origin","mDir","mDiff","t_a","t_b","removedPoint","lastDist","lastValidLength","maxX","maxY","begin","modStart","modEnd","updateBoundingBox","fracWidth","fracHeight","thisX","thisY","rot","pattern","Text","cachedWrappedAttr","wrappedTextAttr","longestWord","arg1","arg2","svgText","words","abc","letterWidth","l","LINE_COLOR","isDead","getEnclosingAngle","trans","acos","Composite","assignedFigures","Jailhouse","Raft","WeakComposite","aboardFigures","getAboardFigures","dontApplyToChildren","aboardedFigures","recalculate","raftBoundingBox","getNextComposite","figureToTest","nextComposite","dontMoveChildren","Diagram","cache","setData","getData","Pie","COLORS","TWO_PI","d2","sum","_sum","pie","offsetAngle","seg","drawSegment","polarPath","theta","rotation","resolution","Sparkline","pathString","prev_pt","idx","toCoords","Document","amplitude","calcPath","w4","Acw","Icon","Alarm","Anonymous","Apple","Apps","ArrowDown","ArrowLeft","ArrowLeft2","ArrowRight","ArrowRight2","ArrowUp","Aumade","BarChart","BioHazard","Book","Bookmark","Books","Bubble","Bug","Calendar","Cart","Ccw","Chat","Check","Chrome","Clip","Clock","Cloud","Cloud2","CloudDown","CloudUp","Cloudy","Code","CodeTalk","CommandLine","Connect","Contract","Crop","Cross","Cube","Customer","Db","Detour","Disconnect","DockBottom","DockLeft","DockRight","DockTop","Download","Dry","Employee","End","Ethernet","Exchange","Expand","Export","Fave","Feed","Ff","Firefox","Flag","Flickr","Folder","Font","Fork","ForkAlt","FullCube","Future","GRaphael","Gear","Gear2","GitHub","GitHubAlt","Glasses","Globe","GlobeAlt","GlobeAlt2","Hail","Hammer","HammerAndScrewDriver","HangUp","Help","History","Home","IMac","offsetY","offsetX","Icons","Ie","Ie9","Import","InkScape","Ipad","Iphone","JQuery","Jigsaw","Key","Lab","Lamp","Lamp_alt","Landing","Landscape1","Landscape2","LineChart","Link","LinkedIn","Linux","List","Location","Lock","Locked","Magic","Magnet","Mail","Man","Merge","Mic","MicMute","Minus","NewWindow","No","NoMagnet","NodeJs","Notebook","Noview","Opera","Package","Page","Page2","Pallete","Palm","Paper","Parent","Pc","Pen","Pensil","People","Phone","Photo","Picker","Picture","PieChart","Plane","Plugin","Plus","Power","Ppt","Printer","Quote","Rain","ReflectH","ReflectV","Refresh","Resize2","Rotate","Ruler","Run","Rw","Safari","ScrewDriver","Search","Sencha","Settings","SettingsAlt","Shuffle","Skull","Skype","SlideShare","Smile","Smile2","Snow","Split","Star","Star2","Star2Off","Star3","Star3Off","StarOff","Start","Sticker","Stop","StopWatch","Sun","Svg","TShirt","Tag","TakeOff","Talke","Talkq","Thunder","Trash","Twitter","TwitterBird","Umbrella","Undo","Unlock","Usb","User","Users","Video","View","Vim","Volume0","Volume1","Volume2","Volume3","Warning","WheelChair","Windows","Woman","Wrench","Wrench2","Wrench3","ZoomIn","ZoomOut","FlexGridLayout","Layout","cellLocator","gridDef","layoutRequired","_layout","cell","__cellConstraint","valign","align","debugLines","def_cols","def_rows","min_height","min_width","minGridWidth","minGridHeight","hResizeable","vResizeable","resizeListener","columns","cellWidthFromDef","cellConstraint","rowspan","colspan","paintDebugGrid","eHeight","cHeight","cellHeight","_getGridWidth","_getGridHeight","gridHeight","cellWidth","cellX","cellY","posX","posY","newLine","def","HorizontalLayout","gap","setGap","getGap","markup","StackLayout","visibleLayer","setVisibleLayer","getVisibleLayer","_recursiveWidth","_recursiveHeight","TableLayout","DUMMY_CELL","__cell","getCellLayout","widthOffset","layoutInfos","setCellPadding","calculateLayout","getCellPadding","removeRow","removedRow","splice","addRow","figuresToAdd","columnCount","missingColumns","setCellVerticalAlign","getCellVerticalAlign","setCellAlign","getCellAlign","layouts","rowCount","newLayoutInfos","layoutWidths","layoutHeights","VerticalLayout","Between","Fulcrum","_orig_hitTest","setConnectionDirStrategy","HorizontalBus","BACKGROUND_COLOR","setLabel","_port","CONNECTION_DIR_STRATEGY","getHybridPort","strategy","dirStrategy","inputPorts","outputPorts","hybridPorts","persistPorts","cachedPorts","setPersistPorts","getPersistPorts","__initialVisibilityState","recursive","getInputPorts","getOutputPorts","excludePorts","clonePort","addPort","portName","getInputPort","portNameOrIndex","getOutputPort","removePort","newPort","c_size","oldCanvas","layoutPorts","relatedPort","locatorAttr","VerticalBus","labelString","mustAdjustTheAngel","PostIt","Activity","mementoValues","darkerBgColor","earlyStartLabel","createLabel","durationLabel","LabelEditor","onCommit","setDuration","earlyEndLabel","activityLabel","LabelInplaceEditor","inputPort","getActivity","anyValue","outputPort","lateStartLabel","stackLabel","lateEndLabel","getEarlyStart","lateFinish","setLateFinish","getEarlyEnd","latestEarlyEnd","parentActivity","lateStart","txt","innerCircle","State","Slider","Widget","DEFAULT_COLOR_THUMB","DEFAULT_COLOR_BG","currentValue","slideBoundingBox","panning","thumbGrow","thumb","onValueChange","panningX","panningY","grow","sliderWidth","figurePos","sliderPos","thumbX","configuration","onCancel","onStart","newText","prompt","commitCallback","commit","objs","avoidDuplicates","concat","elements","includes","deep","newVector","overwriteElementAt","byteToCharMap_","charToByteMap_","byteToCharMapWebSafe_","charToByteMapWebSafe_","ENCODED_VALS_BASE","ENCODED_VALS","ENCODED_VALS_WEBSAFE","encodeByteArray","input","opt_webSafe","byteToCharMap","output","byte1","haveByte2","byte2","haveByte3","byte3","outByte1","outByte2","outByte3","outByte4","stringToByteArray","decode","charToByteMap","charAt","byte4","str","charCodeAt","hashString","hex2rgb","getHTMLStyle","getRed","getGreen","getBlue","getIdealTextColor","temp_elem","appendChild","getComputedStyle","removeChild","int2hex","round","fraction","fadeTo","pc","callback_func","callback_force","aps","log_level","log_methods","pass_methods","logs","method","level","log_arr","exec_callback","is_level","firebug","setLevel","setCallback","parentKey","pathList","grandParent","grandParentKey","addObj","constructor","paths","propertyIsEnumerable","obj1","obj2","v1","v2","ensureDefault","attribute","ontouchmove","pointString","poly","random","toString","extended","global","BezierSpline","Spline","controlPoints","parts","cp","blend","CatmullRomSpline","___CSS_LOADER_EXPORT___","cssWithMappingToString","content","needLayer","modules","media","dedupe","supports","alreadyImportedModules","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","sourceMapping","getNanoSeconds","hrtime","loadTime","moduleLoadTime","nodeLoadTime","upTime","performance","now","process","hr","uptime","getTime","vendors","suffix","raf","caf","queue","frameDuration","_now","cancelled","polyfill","requestAnimationFrame","cancelAnimationFrame","color_string","ok","simple_colors","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","feldspar","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslateblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","violetred","wheat","white","whitesmoke","yellow","yellowgreen","color_defs","re","example","bits","processor","channels","toRGB","toRGBA","toHex","getHelpXML","examples","sc","list_item","list_color","RGBColor","example_div","cssText","createTextNode","list_item_value","execScript","attachEvent","eval","defineProperty","setBezierFunction","getCubicBezierTransition","u","_","displayName","__createBinding","getOwnPropertyDescriptor","writable","configurable","enumerable","__exportStar","VERSION","standardEasingFunctions","Scene","interpolate","shouldScheduleUpdate","processTweens","filters","linear","composeEasingObject","_filters","setState","_currentState","_originalState","_targetState","_easing","doesApply","_applyFilter","tweenProps","_tweenables","tweenables","promises","then","empty","isPlaying","some","pause","resume","hasEnded","freeze","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","easeInOutCubic","easeInQuart","easeOutQuart","easeInOutQuart","easeInQuint","easeOutQuint","easeInOutQuint","easeInSine","easeOutSine","easeInOutSine","easeInExpo","easeOutExpo","easeInOutExpo","easeInCirc","easeOutCirc","easeInOutCirc","easeOutBounce","easeInBack","easeOutBack","easeInOutBack","elastic","swingFromTo","swingFrom","swingTo","bounce","bouncePast","easeFromTo","easeFrom","easeTo","afterTween","beforeTween","tweenCreated","unshift","_tokenData","formatString","chunkNames","isEasingKey","__setModuleDefault","__importStar","scheduleUpdate","getListTail","getListHead","resetList","webkitRequestAnimationFrame","oRequestAnimationFrame","msRequestAnimationFrame","mozCancelRequestAnimationFrame","mozRequestAnimationFrame","T","_timestamp","_delay","_duration","_hasEnded","_render","_data","_next","S","O","M","_previous","P","Promise","_config","_resolve","_reject","_start","_promiseCtor","_promise","_isPlaying","_pausedAtTime","setConfig","_resume","promise","render","catch","finally","seek","Symbol","toStringTag","setScheduleFunction","token","globalThis","_typeof","iterator","mulTable","shgTable","processImage","blurAlphaChannel","useOffset","skipStyles","getElementById","dimensionType","clearRect","naturalWidth","naturalHeight","processCanvasRGBA","processCanvasRGB","getImageDataFromCanvas","topX","topY","TypeError","getImageData","imageData","processImageDataRGBA","putImageData","stackEnd","pixels","div","widthMinus1","heightMinus1","radiusPlus1","sumFactor","stackStart","BlurStack","stackIn","stackOut","yw","yi","mulSum","shgSum","pr","pg","pb","pa","_i","rInSum","gInSum","bInSum","aInSum","rOutSum","gOutSum","bOutSum","aOutSum","rSum","gSum","bSum","aSum","_i2","rbs","paInitial","_a2","_p","_stackOut","_r","_g","_b","_a","_x","_pr","_pg","_pb","_pa","_rOutSum","_gOutSum","_bOutSum","_aOutSum","_rSum","_gSum","_bSum","_aSum","_i3","yp","_gInSum","_bInSum","_aInSum","_rInSum","_i4","_rbs","_y","_p2","processImageDataRGB","_i5","_i6","_x2","_pr2","_pg2","_pb2","_rOutSum2","_gOutSum2","_bOutSum2","_rSum2","_gSum2","_bSum2","_i7","_rInSum2","_gInSum2","_bInSum2","_i8","_y2","instance","Constructor","_classCallCheck","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","locals","stylesInDOM","getIndexByIdentifier","identifier","modulesToDom","idCountMap","identifiers","base","indexByIdentifier","sourceMap","references","updater","addElementStyle","byIndex","api","newObj","lastIdentifiers","newList","newLastIdentifiers","_index","memo","styleTarget","querySelector","HTMLIFrameElement","contentDocument","head","styleElement","nonce","removeStyleElement","styleSheet","svgPathdata","stackblurCanvas","_interopDefaultLegacy","requestAnimationFrame__default","RGBColor__default","offscreen","DOMParser","DOMParserFallback","preset","createCanvas","OffscreenCanvas","createImage","url","response","fetch","blob","createImageBitmap","Reflect","deleteProperty","loadImage","compressSpaces","trimLeft","trimRight","toNumbers","matches","toMatrixValue","numbers","allUppercase","normalizeAttributeName","parseExternalUrl","urlMatch","normalizeColor","startsWith","rgbParts","num","isFloat","attributeRegex","idRegex","classRegex","pseudoElementRegex","pseudoClassWithBracketsRegex","pseudoClassRegex","elementRegex","findSelectorMatch","regex","getSelectorSpecificity","specificity","currentSelector","PSEUDO_ZERO","vectorMagnitude","vectorsRatio","vectorsAngle","CB1","CB2","CB3","CB4","QB1","QB2","QB3","Property","separator","getString","hasValue","zeroIsValue","isString","regexp","isUrlDefinition","isPixels","asString","endsWith","getNumber","isNormalizedColor","getDpi","getRem","rootEmSize","getEm","emSize","getUnits","getPixels","axisOrIsFontSize","processPercent","axis","isFontSize","viewPort","screen","computeSize","getMilliseconds","getRadians","getDefinition","definitions","getFillStyleDefinition","createGradient","ctx","createPattern","getHrefAttribute","patternTransform","getAttribute","getTextBaseline","textBaselineMapping","addOpacity","commas","ViewPort","viewPorts","setCurrent","removeCurrent","getDefault","getCurrent","DEFAULT_VIEWPORT_WIDTH","DEFAULT_VIEWPORT_HEIGHT","defaultValue","parseScale","parsePath","pathPoints","angleTo","atan2","applyTransform","xp","Mouse","isWorking","working","onclick","onmousemove","hasEvents","runEvents","eventElements","run","checkPath","isPointInPath","checkBoundingBox","isPointInBox","mapXY","offsetLeft","offsetTop","offsetParent","scrollX","scrollY","eventTarget","defaultWindow","defaultFetch$1","Screen","checker","waits","ready","readyPromise","resolve","isReady","isReadyLock","every","resolveReady","setDefaults","strokeStyle","lineCap","lineJoin","miterLimit","aspectRatio","desiredWidth","desiredHeight","refX","refY","clip","clipX","clipY","cleanAspectRatio","aspectRatioAlign","aspectRatioMeetOrSlice","meetOrSlice","scaleMin","scaleMax","finalDesiredWidth","finalDesiredHeight","refXProp","refYProp","hasRefs","scaledClipX","scaledClipY","beginPath","moveTo","lineTo","closePath","isMeetMinY","isSliceMaxY","isMeetMinX","isSliceMaxX","enableRedraw","ignoreDimensions","ignoreClear","forceRedraw","scaleWidth","scaleHeight","mouse","FRAMERATE","tick","shouldUpdate","intervalId","animations","isFirstRender","widthStyle","getStyle","heightStyle","cWidth","clientWidth","clientHeight","viewBox","xRatio","yRatio","transformStyle","defaultFetch","MAX_VIRTUAL_PIXELS","DefaultDOMParser","Parser","resource","parseFromString","load","parser","checkDocument","err","parserError","getElementsByTagName","textContent","Translate","unapply","applyToPoint","originX","originY","tx","ty","rad","transformOrigin","Scale","scaleSize","Matrix","det","Skew","skew","super","SkewX","SkewY","Transform","fromElement","transformOriginXProperty","transformOriginYProperty","transforms","transform1","parseTransform","TransformType","transformTypes","skewX","skewY","Element","createIfNotExists","href","skipAncestors","styles","parentStyle","save","mask","applyEffects","setContext","renderChildren","clearContext","restore","clipPathStyleProp","addChild","childNode","ignoreChildTypes","matchesSelector","styleClasses","styleClass","addStylesFromStyleDefinition","stylesSpecificity","styleProp","existingSpecificity","removeStyles","ignoreStyles","toRestore","restoreStyles","isFirstChild","captureTextNodes","animationFrozen","animationFrozenValue","textNode","UnknownElement","wrapFontFamily","trimmed","prepareFontStyle","fontStyle","targetFontStyle","prepareFontWeight","fontWeight","targetFontWeight","inherit","fontVariant","part","variants","weights","inheritFont","BoundingBox","addX","addY","addBoundingBox","sumCubic","bezierCurveAdd","forX","b2ac","t1","t2","addBezierCurve","p0x","p0y","p1x","p1y","p2x","p2y","p3x","p3y","addQuadraticCurve","cp1x","cp1y","cp2x","cp2y","NaN","RenderedElement","calculateOpacity","opacityStyle","fromMeasure","fillStyleProp","fillOpacityStyleProp","strokeStyleProp","strokeOpacityProp","fillStyle","strokeWidthStyleProp","newLineWidth","lineWidth","strokeLinecapStyleProp","strokeLinejoinStyleProp","strokeMiterlimitProp","strokeDasharrayStyleProp","strokeDashoffsetProp","gaps","setLineDash","webkitLineDash","mozDash","lineDashOffset","webkitLineDashOffset","mozDashOffset","modifiedEmSizeStack","fontStyleProp","fontStyleStyleProp","fontVariantStyleProp","fontWeightStyleProp","fontSizeStyleProp","fontFamilyStyleProp","globalAlpha","popEmSize","TextElement","textBaseline","initializeCoordinates","leafTexts","textChunkStart","POSITIVE_INFINITY","NEGATIVE_INFINITY","getTElementBoundingBox","adjustChildCoordinatesRecursive","childBoundingBox","getChildBoundingBox","inheritFontSize","measureText","getGlyph","char","glyph","isArabic","prevChar","nextChar","arabicForm","arabicGlyphs","glyphs","missingGlyph","getTextFromNode","lastIndex","renderTElementChildren","renderChild","renderText","customFont","unitsPerEm","fontFace","ctxFont","isRTL","lw","horizAdvX","fillText","strokeText","applyAnchoring","firstElement","textAnchor","adjustChildCoordinatesRecursiveCore","textParent","i1","adjustChildCoordinates","xAttr","yAttr","dxAttr","dyAttr","Boolean","getInheritedAttribute","i2","i3","measureCache","measure","measureTargetText","targetText","parentAttr","TSpanElement","TextNode","PathParser","SVGPathData","reset","previousCommand","control","angles","isEnd","getPoint","xProp","yProp","makeAbsolute","getAsControlPoint","getAsCurrentPoint","getReflectedControlPoint","CURVE_TO","SMOOTH_CURVE_TO","QUAD_TO","SMOOTH_QUAD_TO","relative","addMarker","priorTo","addMarkerAngle","getMarkerPoints","getMarkerAngles","PathElement","pathParser","MOVE_TO","pathM","LINE_TO","pathL","HORIZ_LINE_TO","pathH","VERT_LINE_TO","pathV","pathC","pathS","pathQ","pathT","ARC","pathA","CLOSE_PATH","pathZ","_ctx","getMarkers","fillRuleStyleProp","setTransform","markersLastIndex","markerStartStyleProp","markerMidStyleProp","markerEndStyleProp","marker","controlPoint","currentPoint","bezierCurveTo","quadraticCurveTo","rX","rY","xRot","lArcFlag","sweepFlag","xAxisRotation","currp","cpp","centp","ad","ah","halfWay","sx","sy","arc","SVGElement","getPropertyValue","fontSizeProp","refXAttr","refYAttr","viewBoxAttr","preserveAspectRatio","widthAttr","heightAttr","styleAttr","originWidth","originHeight","preserveAspectRatioAttr","RectElement","rxAttr","ryAttr","KAPPA","CircleElement","EllipseElement","LineElement","getPoints","x0","y0","PolylineElement","PolygonElement","PatternElement","parentOpacityProp","patternSvg","patternCanvas","patternCtx","MarkerElement","orient","markerUnits","markerSvg","DefsElement","GElement","GradientElement","getGradientUnits","stopsContainer","inheritStopContainer","stops","gradient","getGradient","addParentOpacity","addColorStop","rootView","attributesToInherit","attributeToInherit","LinearGradientElement","isBoundingBoxUnits","createLinearGradient","RadialGradientElement","fx","fy","fr","createRadialGradient","StopElement","stopOpacity","stopColor","AnimateElement","getProperty","attributeType","attributeName","calcValue","initialUnits","progress","getProgress","newValue","initialValue","maxDuration","frozen","updated","typeAttr","values","lb","valuesAttr","AnimateColorElement","colorFrom","colorTo","AnimateTransformElement","from1","to1","transformFrom","transformTo","FontFaceElement","ascent","descent","GlyphElement","unicode","MissingGlyphElement","FontElement","fontFamilyStyle","arabicGlyph","TRefElement","AElement","hasText","open","node1","TextPathElement","dataArray","dTheta","psi","fs","setTextData","textDecoration","glyphInfo","partialText","getLetterSpacingAt","letterSpacingCache","findSegmentToFitChar","textFullWidth","fullPathWidth","spacesNumber","inputOffset","charI","glyphWidth","splineStep","textHeight","getEquidistantPointOnPath","dyX","dyY","measuresCache","chars","thisSpacing","parentSpacing","letterSpacing","textLen","dxSum","acc","cur","textWidth","getPathLength","startOffset","nextOffset","parsePathData","pathLength","pathCommands","nextCommandType","calcLength","commandType","getLineLength","getPointOnCubicBezier","getPointOnQuadraticBezier","inc","getPointOnEllipticalArc","getPointOnLine","rise","ix","iy","pRise","pRun","getPointOnPath","fullLen","cumulativePathLength","currentT","pct","p4x","p4y","cosPsi","sinPsi","buildEquidistantCache","inputStep","inputPrecision","precision","equidistantCache","targetDistance","Map","pathElement","dataUriRegex","ImageElement","loaded","loadSvg","atob","decodeURIComponent","subDocument","forkString","isSvg","images","SymbolElement","SVGFontLoader","fonts","fontNode","StyleElement","_1","cssParts","cssClasses","cssProps","cssProp","UseElement","tempSvg","oldParent","elementTransform","cachedElement","imGet","_height","imSet","m1","m2","m3","FeColorMatrixElement","includeOpacity","srcData","nr","ng","nb","na","MaskElement","ignoredStyles","maskCanvas","maskCtx","tmpCanvas","tmpCtx","globalCompositeOperation","fillRect","ClipPathElement","contextProto","getPrototypeOf","FilterElement","efd","extraFilterDistance","tmpCanvasWidth","tmpCanvasHeight","FeDropShadowElement","_width","FeMorphologyElement","FeCompositeElement","FeGaussianBlurElement","blurRadius","getUniqueId","canvasRGBA","TitleElement","DescElement","bindCreateImage","createImage1","anonymousCrossOrigin","forceAnonymousCrossOrigin","emSizeStack","uniqueId","isImagesLoaded","isFontsLoaded","createDocumentElement","elementType","ElementType","elementTypes","createCanvas1","createImage2","async","crossOrigin","reject","onload","onerror","_event","_source","_lineno","_colno","Canvg","svgDocument","fromString","fork","baseOptions","presets","setPrototypeOf","N","cX","cY","phi1","phi2","SVGPathDataTransformer","A","E","C","R","I","V","ROUND","TO_ABS","TO_REL","NORMALIZE_HVZ","NORMALIZE_ST","QT_TO_C","INFO","SANITIZE","LINE_COMMANDS","MATRIX","TRANSLATE","SCALE","SKEW_X","SKEW_Y","X_AXIS_SYMMETRY","Y_AXIS_SYMMETRY","A_TO_C","D","ANNOTATE_ARCS","CLONE","CALCULATE_BOUNDS","DRAWING_COMMANDS","H","L","toAbs","toRel","normalizeHVZ","normalizeST","qtToC","aToC","sanitize","xSymmetry","ySymmetry","annotateArcs","curNumber","curCommandType","curCommandRelative","canParseCommandOrComma","curNumberHasExp","curNumberHasExpDigits","curNumberHasDecimal","curArgs","SyntaxError","getBounds","COMMAND_ARG_COUNTS","SVGPathDataParser","encodeSVGPath","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","definition","nc"],"sourceRoot":""} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0a804310..4b5cb39b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,22 +11,22 @@ "dependencies": { "canvg": "^4.0.1", "rgbcolor": "^1.0.1", - "shifty": "2.20.0" + "shifty": "^3.0.3" }, "devDependencies": { - "@babel/cli": "^7.20.7", - "@babel/core": "^7.20.12", - "@babel/eslint-parser": "^7.19.1", + "@babel/cli": "^7.26.4", + "@babel/core": "^7.26.0", + "@babel/eslint-parser": "^7.25.9", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/preset-env": "^7.20.2", - "babel-loader": "^9.1.2", + "@babel/preset-env": "^7.26.0", + "babel-loader": "^9.2.1", "babel-plugin-add-module-exports": "^1.0.4", "babel-preset-modern-browsers": "^15.0.2", - "css-loader": "^6.7.3", - "eslint-webpack-plugin": "^3.2.0", - "glob": "^8.0.3", + "css-loader": "^7.1.2", + "eslint-webpack-plugin": "^4.2.0", + "glob": "^11.0.0", "script-loader": "^0.7.2", - "style-loader": "^3.3.1", + "style-loader": "^4.0.0", "terser-webpack-plugin": "^5.3.6", "webpack": "^5.75.0", "webpack-cli": "^5.0.1", @@ -34,27 +34,29 @@ } }, "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, + "license": "Apache-2.0", "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" } }, "node_modules/@babel/cli": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.20.7.tgz", - "integrity": "sha512-WylgcELHB66WwQqItxNILsMlaTd8/SO6SgTTjMp4uCI7P4QyH1r3nqgFmO3BfM4AtfniHgFMH3EpYFj/zynBkQ==", + "version": "7.26.4", + "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.26.4.tgz", + "integrity": "sha512-+mORf3ezU3p3qr+82WvJSnQNE1GAYeoCfEv4fik6B5/2cvKZ75AX8oawWQdXtM9MmndooQj15Jr9kelRFWsuRw==", "dev": true, + "license": "MIT", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.8", - "commander": "^4.0.1", - "convert-source-map": "^1.1.0", + "@jridgewell/trace-mapping": "^0.3.25", + "commander": "^6.2.0", + "convert-source-map": "^2.0.0", "fs-readdir-recursive": "^1.1.0", "glob": "^7.2.0", "make-dir": "^2.1.0", @@ -69,7 +71,7 @@ }, "optionalDependencies": { "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", - "chokidar": "^3.4.0" + "chokidar": "^3.6.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" @@ -79,7 +81,9 @@ "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, + "license": "ISC", "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -96,48 +100,52 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.26.2", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz", + "integrity": "sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/highlight": "^7.22.13", - "chalk": "^2.4.2" + "@babel/helper-validator-identifier": "^7.25.9", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/compat-data": { - "version": "7.20.10", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz", - "integrity": "sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.3.tgz", + "integrity": "sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.20.12", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz", - "integrity": "sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg==", - "dev": true, - "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.20.7", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helpers": "^7.20.7", - "@babel/parser": "^7.20.7", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.12", - "@babel/types": "^7.20.7", - "convert-source-map": "^1.7.0", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz", + "integrity": "sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.26.0", + "@babel/generator": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helpers": "^7.26.0", + "@babel/parser": "^7.26.0", + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.26.0", + "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.0" + "json5": "^2.2.3", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -148,119 +156,85 @@ } }, "node_modules/@babel/eslint-parser": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.19.1.tgz", - "integrity": "sha512-AqNf2QWt1rtu2/1rLswy6CDP7H9Oh3mMhk177Y67Rg8d7RD9WfOLLv8CGn6tisFvS2htm86yIe1yLF6I1UDaGQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.25.9.tgz", + "integrity": "sha512-5UXfgpK0j0Xr/xIdgdLEhOFxaDZ0bRPWJJchRpqOSur/3rZoPbqqki5mm0p4NE2cs28krBEiSM2MB7//afRSQQ==", "dev": true, + "license": "MIT", "dependencies": { "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", "eslint-visitor-keys": "^2.1.0", - "semver": "^6.3.0" + "semver": "^6.3.1" }, "engines": { "node": "^10.13.0 || ^12.13.0 || >=14.0.0" }, "peerDependencies": { - "@babel/core": ">=7.11.0", - "eslint": "^7.5.0 || ^8.0.0" - } - }, - "node_modules/@babel/eslint-parser/node_modules/eslint-visitor-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", - "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", - "dev": true, - "engines": { - "node": ">=10" + "@babel/core": "^7.11.0", + "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.26.3.tgz", + "integrity": "sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.23.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" + "@babel/parser": "^7.26.3", + "@babel/types": "^7.26.3", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^3.0.2" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz", - "integrity": "sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz", - "integrity": "sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz", + "integrity": "sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.18.6", - "@babel/types": "^7.18.9" + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz", + "integrity": "sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", + "@babel/compat-data": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "browserslist": "^4.24.0", "lru-cache": "^5.1.1", - "semver": "^6.3.0" + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.20.12", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.12.tgz", - "integrity": "sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.9.tgz", + "integrity": "sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-member-expression-to-functions": "^7.20.7", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-replace-supers": "^7.20.7", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/helper-split-export-declaration": "^7.18.6" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/traverse": "^7.25.9", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -270,13 +244,15 @@ } }, "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz", - "integrity": "sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.26.3.tgz", + "integrity": "sha512-G7ZRb40uUgdKOQqPLjfD12ZmGA54PzqDFUv2BKImnC9QIfGhIHKvVML0oN8IUiDq4iRqpq74ABpvOaerfWdong==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "regexpu-core": "^5.2.1" + "@babel/helper-annotate-as-pure": "^7.25.9", + "regexpu-core": "^6.2.0", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -286,142 +262,101 @@ } }, "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz", - "integrity": "sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.3.tgz", + "integrity": "sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/helper-compilation-targets": "^7.22.6", + "@babel/helper-plugin-utils": "^7.22.5", "debug": "^4.1.1", "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" + "resolve": "^1.14.2" }, "peerDependencies": { - "@babel/core": "^7.4.0-0" - } - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", - "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz", - "integrity": "sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", - "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", - "dev": true, - "dependencies": { - "@babel/template": "^7.22.15", - "@babel/types": "^7.23.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", - "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.22.5" - }, - "engines": { - "node": ">=6.9.0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz", - "integrity": "sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.9.tgz", + "integrity": "sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.20.7" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz", + "integrity": "sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz", - "integrity": "sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz", + "integrity": "sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.10", - "@babel/types": "^7.20.7" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz", - "integrity": "sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.9.tgz", + "integrity": "sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.18.6" + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz", - "integrity": "sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz", + "integrity": "sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz", - "integrity": "sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.9.tgz", + "integrity": "sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-wrap-function": "^7.18.9", - "@babel/types": "^7.18.9" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-wrap-function": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -431,133 +366,105 @@ } }, "node_modules/@babel/helper-replace-supers": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz", - "integrity": "sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.9.tgz", + "integrity": "sha512-IiDqTOTBQy0sWyeXyGSC5TBJpGFXBkRynjBeXsvbhQFKj2viwJC76Epz35YLU1fpe/Am6Vppb7W7zM4fPQzLsQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-member-expression-to-functions": "^7.20.7", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/helper-member-expression-to-functions": "^7.25.9", + "@babel/helper-optimise-call-expression": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", - "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.2" }, - "engines": { - "node": ">=6.9.0" + "peerDependencies": { + "@babel/core": "^7.0.0" } }, "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz", - "integrity": "sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.20.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.22.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", - "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz", + "integrity": "sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/types": "^7.22.5" + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz", + "integrity": "sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", - "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz", + "integrity": "sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-option": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz", - "integrity": "sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz", + "integrity": "sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-wrap-function": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz", - "integrity": "sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.9.tgz", + "integrity": "sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-function-name": "^7.19.0", - "@babel/template": "^7.18.10", - "@babel/traverse": "^7.20.5", - "@babel/types": "^7.20.5" + "@babel/template": "^7.25.9", + "@babel/traverse": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.7.tgz", - "integrity": "sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz", + "integrity": "sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.20.7", - "@babel/types": "^7.20.7" + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.0" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "node_modules/@babel/parser": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz", + "integrity": "sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.20", - "chalk": "^2.4.2", - "js-tokens": "^4.0.0" + "@babel/types": "^7.26.3" }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", - "dev": true, "bin": { "parser": "bin/babel-parser.js" }, @@ -565,13 +472,15 @@ "node": ">=6.0.0" } }, - "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz", - "integrity": "sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ==", + "node_modules/@babel/plugin-bugfix-firefox-class-in-computed-class-key": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.9.tgz", + "integrity": "sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -580,83 +489,79 @@ "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz", - "integrity": "sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ==", + "node_modules/@babel/plugin-bugfix-safari-class-field-initializer-scope": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.9.tgz", + "integrity": "sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-proposal-optional-chaining": "^7.20.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.13.0" + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz", - "integrity": "sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA==", + "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.9.tgz", + "integrity": "sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9", - "@babel/plugin-syntax-async-generators": "^7.8.4" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz", - "integrity": "sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==", + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.9.tgz", + "integrity": "sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9", + "@babel/plugin-transform-optional-chaining": "^7.25.9" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.13.0" } }, - "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.20.7.tgz", - "integrity": "sha512-AveGOoi9DAjUYYuUAG//Ig69GlazLnoyzMw68VCDux+c1tsnnH/OkYcpz/5xzMkEFC6UxjR5Gw1c+iY2wOGVeQ==", + "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.9.tgz", + "integrity": "sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.20.7", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-class-static-block": "^7.14.5" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.12.0" + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz", - "integrity": "sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw==", + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.21.0-placeholder-for-preset-env.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", + "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, + "license": "MIT", "engines": { "node": ">=6.9.0" }, @@ -664,14 +569,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz", - "integrity": "sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA==", + "node_modules/@babel/plugin-syntax-import-assertions": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz", + "integrity": "sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -680,14 +585,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz", - "integrity": "sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ==", + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz", + "integrity": "sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-json-strings": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -696,65 +601,57 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz", - "integrity": "sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug==", + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.10.4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz", - "integrity": "sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA==", + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" + "@babel/helper-plugin-utils": "^7.10.4" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-numeric-separator": { + "node_modules/@babel/plugin-syntax-unicode-sets-regex": { "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz", - "integrity": "sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q==", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz", + "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" + "@babel/helper-create-regexp-features-plugin": "^7.18.6", + "@babel/helper-plugin-utils": "^7.18.6" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz", - "integrity": "sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg==", + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.9.tgz", + "integrity": "sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.20.7" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -763,14 +660,16 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz", - "integrity": "sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw==", + "node_modules/@babel/plugin-transform-async-generator-functions": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.9.tgz", + "integrity": "sha512-RXV6QAzTBbhDMO9fWwOmwwTuYaiPbggWQ9INdZqAYeSHyG7FzQ+nOZaUUjNwKv9pV3aE4WFqFm1Hnbci5tBCAw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-remap-async-to-generator": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -779,15 +678,16 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.20.7.tgz", - "integrity": "sha512-T+A7b1kfjtRM51ssoOfS1+wbyCVqorfyZhT99TvxxLMirPShD8CzKMRepMlCBGM5RpHMbn8s+5MMHnPstJH6mQ==", + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.9.tgz", + "integrity": "sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" + "@babel/helper-module-imports": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-remap-async-to-generator": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -796,14 +696,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz", - "integrity": "sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA==", + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.25.9.tgz", + "integrity": "sha512-toHc9fzab0ZfenFpsyYinOX0J/5dgJVA2fm64xPewu7CoYHWEivIWKxkK2rMi4r3yQqLnVmheMXRdG+k239CgA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -812,16 +712,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.20.5.tgz", - "integrity": "sha512-Vq7b9dUA12ByzB4EjQTPo25sFhY+08pQDBSZRtUAkj7lb7jahaHR5igera16QZ+3my1nYR4dKsNdYj5IjPHilQ==", + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.9.tgz", + "integrity": "sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-create-class-features-plugin": "^7.20.5", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -830,53 +728,70 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz", - "integrity": "sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w==", + "node_modules/@babel/plugin-transform-class-properties": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.9.tgz", + "integrity": "sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { - "node": ">=4" + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "node_modules/@babel/plugin-transform-class-static-block": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.26.0.tgz", + "integrity": "sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.12.0" } }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "node_modules/@babel/plugin-transform-classes": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.9.tgz", + "integrity": "sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9", + "@babel/traverse": "^7.25.9", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.9.tgz", + "integrity": "sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/template": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -885,37 +800,47 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.9.tgz", + "integrity": "sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.9.tgz", + "integrity": "sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-import-assertions": { - "version": "7.20.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz", - "integrity": "sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ==", + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.9.tgz", + "integrity": "sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.19.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -924,97 +849,114 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "node_modules/@babel/plugin-transform-duplicate-named-capturing-groups-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.9.tgz", + "integrity": "sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "node_modules/@babel/plugin-transform-dynamic-import": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.9.tgz", + "integrity": "sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.26.3.tgz", + "integrity": "sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "node_modules/@babel/plugin-transform-export-namespace-from": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.9.tgz", + "integrity": "sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.9.tgz", + "integrity": "sha512-LqHxduHoaGELJl2uhImHwRQudhCM50pT46rIBNvtT/Oql3nqiS3wOwP+5ten7NpYSXrrVLgtZU3DZmPtWZo16A==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.9.tgz", + "integrity": "sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/traverse": "^7.25.9" + }, + "engines": { + "node": ">=6.9.0" }, "peerDependencies": { "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "node_modules/@babel/plugin-transform-json-strings": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.9.tgz", + "integrity": "sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1023,13 +965,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "node_modules/@babel/plugin-transform-literals": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.9.tgz", + "integrity": "sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1038,13 +981,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz", - "integrity": "sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ==", + "node_modules/@babel/plugin-transform-logical-assignment-operators": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.9.tgz", + "integrity": "sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1053,15 +997,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz", - "integrity": "sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q==", + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.9.tgz", + "integrity": "sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-remap-async-to-generator": "^7.18.9" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1070,13 +1013,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz", - "integrity": "sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==", + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.9.tgz", + "integrity": "sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1085,36 +1030,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.11.tgz", - "integrity": "sha512-tA4N427a7fjf1P0/2I4ScsHGc5jcHPbb30xMbaTke2gxDuWpUfXDuX1FEymJwKk4tuGUvGcejAR6HdZVqmmPyw==", + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz", + "integrity": "sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.7.tgz", - "integrity": "sha512-LWYbsiXTPKl+oBlXUGlwNlJZetXD5Am+CyBdqhPsDVjM9Jc8jwBJFrKhHf900Kfk2eZG1y9MAG3UNajol7A4VQ==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.18.6", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.19.0", - "@babel/helper-optimise-call-expression": "^7.18.6", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-replace-supers": "^7.20.7", - "@babel/helper-split-export-declaration": "^7.18.6", - "globals": "^11.1.0" + "@babel/helper-module-transforms": "^7.26.0", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1123,14 +1047,17 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz", - "integrity": "sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ==", + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.9.tgz", + "integrity": "sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/template": "^7.20.7" + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9", + "@babel/traverse": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1139,13 +1066,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.7.tgz", - "integrity": "sha512-Xwg403sRrZb81IVB79ZPqNQME23yhugYVqgTxAhT99h485F4f+GMELFhhOsscDUB7HCswepKeCKLn/GZvUKoBA==", + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.9.tgz", + "integrity": "sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-module-transforms": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1154,29 +1083,31 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz", - "integrity": "sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg==", + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.9.tgz", + "integrity": "sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz", - "integrity": "sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw==", + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.9.tgz", + "integrity": "sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1185,14 +1116,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz", - "integrity": "sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw==", + "node_modules/@babel/plugin-transform-nullish-coalescing-operator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.9.tgz", + "integrity": "sha512-ENfftpLZw5EItALAD4WsY/KUWvhUlZndm5GC7G3evUsVeSJB6p0pBeLQUnRnBCBx7zV0RKQjR9kCuwrsIrjWog==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1201,13 +1132,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.18.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz", - "integrity": "sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==", + "node_modules/@babel/plugin-transform-numeric-separator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.9.tgz", + "integrity": "sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1216,15 +1148,16 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz", - "integrity": "sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==", + "node_modules/@babel/plugin-transform-object-rest-spread": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.9.tgz", + "integrity": "sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-compilation-targets": "^7.18.9", - "@babel/helper-function-name": "^7.18.9", - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/plugin-transform-parameters": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1233,13 +1166,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz", - "integrity": "sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==", + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.9.tgz", + "integrity": "sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-replace-supers": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1248,13 +1183,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz", - "integrity": "sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==", + "node_modules/@babel/plugin-transform-optional-catch-binding": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.9.tgz", + "integrity": "sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1263,14 +1199,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz", - "integrity": "sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g==", + "node_modules/@babel/plugin-transform-optional-chaining": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.9.tgz", + "integrity": "sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1279,15 +1216,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.20.11.tgz", - "integrity": "sha512-S8e1f7WQ7cimJQ51JkAaDrEtohVEitXjgCGAS2N8S31Y42E+kWwfSz83LYz57QdBm7q9diARVqanIaH2oVgQnw==", + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.9.tgz", + "integrity": "sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-simple-access": "^7.20.2" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1296,16 +1232,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.20.11", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz", - "integrity": "sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw==", + "node_modules/@babel/plugin-transform-private-methods": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.9.tgz", + "integrity": "sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-module-transforms": "^7.20.11", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-identifier": "^7.19.1" + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1314,14 +1249,16 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz", - "integrity": "sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ==", + "node_modules/@babel/plugin-transform-private-property-in-object": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.9.tgz", + "integrity": "sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-module-transforms": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-annotate-as-pure": "^7.25.9", + "@babel/helper-create-class-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1330,29 +1267,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz", - "integrity": "sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.20.5", - "@babel/helper-plugin-utils": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz", - "integrity": "sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw==", + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.9.tgz", + "integrity": "sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1361,14 +1283,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz", - "integrity": "sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==", + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.9.tgz", + "integrity": "sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6", - "@babel/helper-replace-supers": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9", + "regenerator-transform": "^0.15.2" }, "engines": { "node": ">=6.9.0" @@ -1377,28 +1300,31 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.7.tgz", - "integrity": "sha512-WiWBIkeHKVOSYPO0pWkxGPfKeWrCJyD3NJ53+Lrp/QMSZbsVPovrVl2aWZ19D/LTVnaDv5Ap7GJ/B2CTOZdrfA==", + "node_modules/@babel/plugin-transform-regexp-modifiers": { + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.26.0.tgz", + "integrity": "sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0" } }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz", - "integrity": "sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==", + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.9.tgz", + "integrity": "sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1407,14 +1333,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.20.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz", - "integrity": "sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ==", + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz", + "integrity": "sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "regenerator-transform": "^0.15.1" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1423,13 +1349,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz", - "integrity": "sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA==", + "node_modules/@babel/plugin-transform-spread": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.9.tgz", + "integrity": "sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-skip-transparent-expression-wrappers": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1438,13 +1366,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz", - "integrity": "sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==", + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.9.tgz", + "integrity": "sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1453,14 +1382,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz", - "integrity": "sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw==", + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.25.9.tgz", + "integrity": "sha512-o97AE4syN71M/lxrCtQByzphAdlYluKPDBzDVzMmfCobUjjhAryZV0AIpRPrxN0eAkxXO6ZLEScmt+PNhj2OTw==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-skip-transparent-expression-wrappers": "^7.20.0" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1469,13 +1398,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz", - "integrity": "sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q==", + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.25.9.tgz", + "integrity": "sha512-v61XqUMiueJROUv66BVIOi0Fv/CUuZuZMl5NkRoCVxLAnMexZ0A3kMe7vvZ0nulxMuMp0Mk6S5hNh48yki08ZA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1484,13 +1414,14 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz", - "integrity": "sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==", + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.9.tgz", + "integrity": "sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1499,13 +1430,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz", - "integrity": "sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw==", + "node_modules/@babel/plugin-transform-unicode-property-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.9.tgz", + "integrity": "sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1514,13 +1447,15 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.18.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz", - "integrity": "sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ==", + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.9.tgz", + "integrity": "sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.18.9" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1529,103 +1464,99 @@ "@babel/core": "^7.0.0-0" } }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz", - "integrity": "sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA==", + "node_modules/@babel/plugin-transform-unicode-sets-regex": { + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.9.tgz", + "integrity": "sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.18.6", - "@babel/helper-plugin-utils": "^7.18.6" + "@babel/helper-create-regexp-features-plugin": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9" }, "engines": { "node": ">=6.9.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0" } }, "node_modules/@babel/preset-env": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz", - "integrity": "sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.20.1", - "@babel/helper-compilation-targets": "^7.20.0", - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/helper-validator-option": "^7.18.6", - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.18.6", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-async-generator-functions": "^7.20.1", - "@babel/plugin-proposal-class-properties": "^7.18.6", - "@babel/plugin-proposal-class-static-block": "^7.18.6", - "@babel/plugin-proposal-dynamic-import": "^7.18.6", - "@babel/plugin-proposal-export-namespace-from": "^7.18.9", - "@babel/plugin-proposal-json-strings": "^7.18.6", - "@babel/plugin-proposal-logical-assignment-operators": "^7.18.9", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6", - "@babel/plugin-proposal-numeric-separator": "^7.18.6", - "@babel/plugin-proposal-object-rest-spread": "^7.20.2", - "@babel/plugin-proposal-optional-catch-binding": "^7.18.6", - "@babel/plugin-proposal-optional-chaining": "^7.18.9", - "@babel/plugin-proposal-private-methods": "^7.18.6", - "@babel/plugin-proposal-private-property-in-object": "^7.18.6", - "@babel/plugin-proposal-unicode-property-regex": "^7.18.6", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-import-assertions": "^7.20.0", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.18.6", - "@babel/plugin-transform-async-to-generator": "^7.18.6", - "@babel/plugin-transform-block-scoped-functions": "^7.18.6", - "@babel/plugin-transform-block-scoping": "^7.20.2", - "@babel/plugin-transform-classes": "^7.20.2", - "@babel/plugin-transform-computed-properties": "^7.18.9", - "@babel/plugin-transform-destructuring": "^7.20.2", - "@babel/plugin-transform-dotall-regex": "^7.18.6", - "@babel/plugin-transform-duplicate-keys": "^7.18.9", - "@babel/plugin-transform-exponentiation-operator": "^7.18.6", - "@babel/plugin-transform-for-of": "^7.18.8", - "@babel/plugin-transform-function-name": "^7.18.9", - "@babel/plugin-transform-literals": "^7.18.9", - "@babel/plugin-transform-member-expression-literals": "^7.18.6", - "@babel/plugin-transform-modules-amd": "^7.19.6", - "@babel/plugin-transform-modules-commonjs": "^7.19.6", - "@babel/plugin-transform-modules-systemjs": "^7.19.6", - "@babel/plugin-transform-modules-umd": "^7.18.6", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.19.1", - "@babel/plugin-transform-new-target": "^7.18.6", - "@babel/plugin-transform-object-super": "^7.18.6", - "@babel/plugin-transform-parameters": "^7.20.1", - "@babel/plugin-transform-property-literals": "^7.18.6", - "@babel/plugin-transform-regenerator": "^7.18.6", - "@babel/plugin-transform-reserved-words": "^7.18.6", - "@babel/plugin-transform-shorthand-properties": "^7.18.6", - "@babel/plugin-transform-spread": "^7.19.0", - "@babel/plugin-transform-sticky-regex": "^7.18.6", - "@babel/plugin-transform-template-literals": "^7.18.9", - "@babel/plugin-transform-typeof-symbol": "^7.18.9", - "@babel/plugin-transform-unicode-escapes": "^7.18.10", - "@babel/plugin-transform-unicode-regex": "^7.18.6", - "@babel/preset-modules": "^0.1.5", - "@babel/types": "^7.20.2", - "babel-plugin-polyfill-corejs2": "^0.3.3", - "babel-plugin-polyfill-corejs3": "^0.6.0", - "babel-plugin-polyfill-regenerator": "^0.4.1", - "core-js-compat": "^3.25.1", - "semver": "^6.3.0" + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.26.0.tgz", + "integrity": "sha512-H84Fxq0CQJNdPFT2DrfnylZ3cf5K43rGfWK4LJGPpjKHiZlk0/RzwEus3PDDZZg+/Er7lCA03MVacueUuXdzfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.26.0", + "@babel/helper-compilation-targets": "^7.25.9", + "@babel/helper-plugin-utils": "^7.25.9", + "@babel/helper-validator-option": "^7.25.9", + "@babel/plugin-bugfix-firefox-class-in-computed-class-key": "^7.25.9", + "@babel/plugin-bugfix-safari-class-field-initializer-scope": "^7.25.9", + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.25.9", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.25.9", + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.25.9", + "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2", + "@babel/plugin-syntax-import-assertions": "^7.26.0", + "@babel/plugin-syntax-import-attributes": "^7.26.0", + "@babel/plugin-syntax-unicode-sets-regex": "^7.18.6", + "@babel/plugin-transform-arrow-functions": "^7.25.9", + "@babel/plugin-transform-async-generator-functions": "^7.25.9", + "@babel/plugin-transform-async-to-generator": "^7.25.9", + "@babel/plugin-transform-block-scoped-functions": "^7.25.9", + "@babel/plugin-transform-block-scoping": "^7.25.9", + "@babel/plugin-transform-class-properties": "^7.25.9", + "@babel/plugin-transform-class-static-block": "^7.26.0", + "@babel/plugin-transform-classes": "^7.25.9", + "@babel/plugin-transform-computed-properties": "^7.25.9", + "@babel/plugin-transform-destructuring": "^7.25.9", + "@babel/plugin-transform-dotall-regex": "^7.25.9", + "@babel/plugin-transform-duplicate-keys": "^7.25.9", + "@babel/plugin-transform-duplicate-named-capturing-groups-regex": "^7.25.9", + "@babel/plugin-transform-dynamic-import": "^7.25.9", + "@babel/plugin-transform-exponentiation-operator": "^7.25.9", + "@babel/plugin-transform-export-namespace-from": "^7.25.9", + "@babel/plugin-transform-for-of": "^7.25.9", + "@babel/plugin-transform-function-name": "^7.25.9", + "@babel/plugin-transform-json-strings": "^7.25.9", + "@babel/plugin-transform-literals": "^7.25.9", + "@babel/plugin-transform-logical-assignment-operators": "^7.25.9", + "@babel/plugin-transform-member-expression-literals": "^7.25.9", + "@babel/plugin-transform-modules-amd": "^7.25.9", + "@babel/plugin-transform-modules-commonjs": "^7.25.9", + "@babel/plugin-transform-modules-systemjs": "^7.25.9", + "@babel/plugin-transform-modules-umd": "^7.25.9", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.25.9", + "@babel/plugin-transform-new-target": "^7.25.9", + "@babel/plugin-transform-nullish-coalescing-operator": "^7.25.9", + "@babel/plugin-transform-numeric-separator": "^7.25.9", + "@babel/plugin-transform-object-rest-spread": "^7.25.9", + "@babel/plugin-transform-object-super": "^7.25.9", + "@babel/plugin-transform-optional-catch-binding": "^7.25.9", + "@babel/plugin-transform-optional-chaining": "^7.25.9", + "@babel/plugin-transform-parameters": "^7.25.9", + "@babel/plugin-transform-private-methods": "^7.25.9", + "@babel/plugin-transform-private-property-in-object": "^7.25.9", + "@babel/plugin-transform-property-literals": "^7.25.9", + "@babel/plugin-transform-regenerator": "^7.25.9", + "@babel/plugin-transform-regexp-modifiers": "^7.26.0", + "@babel/plugin-transform-reserved-words": "^7.25.9", + "@babel/plugin-transform-shorthand-properties": "^7.25.9", + "@babel/plugin-transform-spread": "^7.25.9", + "@babel/plugin-transform-sticky-regex": "^7.25.9", + "@babel/plugin-transform-template-literals": "^7.25.9", + "@babel/plugin-transform-typeof-symbol": "^7.25.9", + "@babel/plugin-transform-unicode-escapes": "^7.25.9", + "@babel/plugin-transform-unicode-property-regex": "^7.25.9", + "@babel/plugin-transform-unicode-regex": "^7.25.9", + "@babel/plugin-transform-unicode-sets-regex": "^7.25.9", + "@babel/preset-modules": "0.1.6-no-external-plugins", + "babel-plugin-polyfill-corejs2": "^0.4.10", + "babel-plugin-polyfill-corejs3": "^0.10.6", + "babel-plugin-polyfill-regenerator": "^0.6.1", + "core-js-compat": "^3.38.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" @@ -1635,62 +1566,61 @@ } }, "node_modules/@babel/preset-modules": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz", - "integrity": "sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA==", + "version": "0.1.6-no-external-plugins", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz", + "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==", "dev": true, + "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", "@babel/types": "^7.4.4", "esutils": "^2.0.2" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0" } }, "node_modules/@babel/runtime": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz", - "integrity": "sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==", + "version": "7.26.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz", + "integrity": "sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw==", "dev": true, + "license": "MIT", "dependencies": { - "regenerator-runtime": "^0.13.11" + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/template": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", - "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "version": "7.25.9", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz", + "integrity": "sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/parser": "^7.22.15", - "@babel/types": "^7.22.15" + "@babel/code-frame": "^7.25.9", + "@babel/parser": "^7.25.9", + "@babel/types": "^7.25.9" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", - "@babel/helper-environment-visitor": "^7.22.20", - "@babel/helper-function-name": "^7.23.0", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", - "debug": "^4.1.0", + "version": "7.26.4", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.4.tgz", + "integrity": "sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.26.2", + "@babel/generator": "^7.26.3", + "@babel/parser": "^7.26.3", + "@babel/template": "^7.25.9", + "@babel/types": "^7.26.3", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -1698,14 +1628,14 @@ } }, "node_modules/@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "version": "7.26.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz", + "integrity": "sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.20", - "to-fast-properties": "^2.0.0" + "@babel/helper-string-parser": "^7.25.9", + "@babel/helper-validator-identifier": "^7.25.9" }, "engines": { "node": ">=6.9.0" @@ -1716,149 +1646,333 @@ "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.0.0" } }, - "node_modules/@eslint/eslintrc": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz", - "integrity": "sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA==", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz", + "integrity": "sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { - "ajv": "^6.12.4", - "debug": "^4.3.2", - "espree": "^9.4.0", - "globals": "^13.19.0", - "ignore": "^5.2.0", - "import-fresh": "^3.2.1", - "js-yaml": "^4.1.0", - "minimatch": "^3.1.2", - "strip-json-comments": "^3.1.1" + "eslint-visitor-keys": "^3.4.3" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { "url": "https://opencollective.com/eslint" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, - "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, + "license": "Apache-2.0", "peer": true, - "dependencies": { - "type-fest": "^0.20.2" - }, "engines": { - "node": ">=8" + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" + "url": "https://opencollective.com/eslint" } }, - "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "node_modules/@eslint-community/regexpp": { + "version": "4.12.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", + "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", "dev": true, + "license": "MIT", "peer": true, - "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", - "minimatch": "^3.0.5" - }, "engines": { - "node": ">=10.10.0" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@humanwhocodes/module-importer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", - "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "node_modules/@eslint/config-array": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.19.1.tgz", + "integrity": "sha512-fo6Mtm5mWyKjA/Chy1BYTdn5mGJoDNjC7C64ug20ADsRDGrA85bN3uK3MaKbeRkRuuIEAR5N33Jr1pbm411/PA==", "dev": true, + "license": "Apache-2.0", "peer": true, - "engines": { - "node": ">=12.22" + "dependencies": { + "@eslint/object-schema": "^2.1.5", + "debug": "^4.3.1", + "minimatch": "^3.1.2" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@humanwhocodes/object-schema": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", - "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==", + "node_modules/@eslint/core": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.9.1.tgz", + "integrity": "sha512-GuUdqkyyzQI5RMIWkHhvTWLCyLo1jNK3vzkSyaExH5kHPDHcuL2VOpHjmMY+y3+NC69qAKToBqldTBgYeLSr9Q==", "dev": true, - "peer": true + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + } }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", + "node_modules/@eslint/eslintrc": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.2.0.tgz", + "integrity": "sha512-grOjVNN8P3hjJn/eIETF1wwd12DdnwFDoyceUJLYYdkpbwq3nLi+4fqrTAONx7XDALqlL220wC/RHSC/QTI/0w==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^10.0.1", + "globals": "^14.0.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" }, "engines": { - "node": ">=6.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", + "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, + "license": "MIT", + "peer": true, "engines": { - "node": ">=6.0.0" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/@jridgewell/set-array": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", - "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "node_modules/@eslint/js": { + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.16.0.tgz", + "integrity": "sha512-tw2HxzQkrbeuvyj1tG2Yqq+0H9wGoI2IMk4EOsQeX+vmd75FtJAzf+gTA69WF+baUKRYQ3x2kbLE08js5OsTVg==", "dev": true, "license": "MIT", + "peer": true, "engines": { - "node": ">=6.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@jridgewell/source-map": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", - "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "node_modules/@eslint/object-schema": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.5.tgz", + "integrity": "sha512-o0bhxnL89h5Bae5T318nFoFzGy+YE5i/gGkoPAgkmTVdRKTiv3p8JHevPiPaMwoloKfEiiaHlawCqaZMqRm+XQ==", "dev": true, - "license": "MIT", - "dependencies": { - "@jridgewell/gen-mapping": "^0.3.5", - "@jridgewell/trace-mapping": "^0.3.25" + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@jridgewell/source-map/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", - "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "node_modules/@eslint/plugin-kit": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.4.tgz", + "integrity": "sha512-zSkKow6H5Kdm0ZUQUB2kV5JIXqoG0+uH5YADhaEHswm664N9Db8dXSi0nMJpacpMf+MyyglF1vnZohpEg5yUtg==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", + "peer": true, "dependencies": { - "@jridgewell/set-array": "^1.2.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.24" + "levn": "^0.4.1" }, "engines": { - "node": ">=6.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true + "node_modules/@humanfs/core": { + "version": "0.19.1", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", + "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", + "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "dependencies": { + "@humanfs/core": "^0.19.1", + "@humanwhocodes/retry": "^0.3.0" + }, + "engines": { + "node": ">=18.18.0" + } + }, + "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", + "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/retry": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.1.tgz", + "integrity": "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "engines": { + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@jest/schemas": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz", + "integrity": "sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.27.8" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jest/types": { + "version": "29.6.3", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz", + "integrity": "sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/schemas": "^29.6.3", + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^17.0.8", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/source-map": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz", + "integrity": "sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", + "dev": true, + "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -1876,6 +1990,7 @@ "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", "dev": true, + "license": "MIT", "optional": true }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { @@ -1883,53 +1998,24 @@ "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", "integrity": "sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==", "dev": true, + "license": "MIT", "dependencies": { "eslint-scope": "5.1.1" } }, - "node_modules/@nodelib/fs.scandir": { - "version": "2.1.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", - "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", - "dev": true, - "peer": true, - "dependencies": { - "@nodelib/fs.stat": "2.0.5", - "run-parallel": "^1.1.9" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.stat": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", - "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", - "dev": true, - "peer": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@sinclair/typebox": { + "version": "0.27.8", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", + "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true, - "peer": true, - "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" - } + "license": "MIT" }, "node_modules/@types/eslint": { - "version": "8.4.10", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.10.tgz", - "integrity": "sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw==", + "version": "8.56.12", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.12.tgz", + "integrity": "sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g==", "dev": true, + "license": "MIT", "dependencies": { "@types/estree": "*", "@types/json-schema": "*" @@ -1953,17 +2039,49 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", - "dev": true + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { - "version": "18.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz", - "integrity": "sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA==", - "dev": true + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~6.20.0" + } }, "node_modules/@types/raf": { "version": "3.4.3", @@ -1971,6 +2089,23 @@ "integrity": "sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw==", "license": "MIT" }, + "node_modules/@types/yargs": { + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@webassemblyjs/ast": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", @@ -2133,10 +2268,11 @@ } }, "node_modules/@webpack-cli/configtest": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz", - "integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", + "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.15.0" }, @@ -2146,10 +2282,11 @@ } }, "node_modules/@webpack-cli/info": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz", - "integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", + "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.15.0" }, @@ -2159,10 +2296,11 @@ } }, "node_modules/@webpack-cli/serve": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz", - "integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", + "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.15.0" }, @@ -2208,6 +2346,7 @@ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "license": "MIT", "peer": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" @@ -2218,6 +2357,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -2234,6 +2374,7 @@ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "^8.0.0" }, @@ -2247,15 +2388,16 @@ } }, "node_modules/ajv-formats/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -2266,36 +2408,46 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true, + "license": "MIT", "peerDependencies": { "ajv": "^6.9.1" } }, "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, + "license": "MIT", "engines": { - "node": ">=8" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=4" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, "node_modules/anymatch": { @@ -2303,6 +2455,7 @@ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", "dev": true, + "license": "ISC", "optional": true, "dependencies": { "normalize-path": "^3.0.0", @@ -2317,15 +2470,17 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, + "license": "Python-2.0", "peer": true }, "node_modules/babel-loader": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.2.tgz", - "integrity": "sha512-mN14niXW43tddohGl8HPu5yfQq70iUThvFL/4QzESA7GcZoC0eVOhvWdQ8+3UlSjaDE9MVtsW9mxDY07W7VpVA==", + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-9.2.1.tgz", + "integrity": "sha512-fqe8naHt46e0yIdkjUZYqddSXfej3AHajX+CSO5X7oy0EmPc6o5Xh+RClNoHjnieWz9AW4kZxW9yyFMhVB1QLA==", "dev": true, + "license": "MIT", "dependencies": { - "find-cache-dir": "^3.3.2", + "find-cache-dir": "^4.0.0", "schema-utils": "^4.0.0" }, "engines": { @@ -2340,52 +2495,58 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-1.0.4.tgz", "integrity": "sha512-g+8yxHUZ60RcyaUpfNzy56OtWW+x9cyEe9j+CranqLiqbju2yf/Cy6ZtYK40EZxtrdHllzlVZgLmcOUCTlJ7Jg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz", - "integrity": "sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q==", + "version": "0.4.12", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.12.tgz", + "integrity": "sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-define-polyfill-provider": "^0.3.3", - "semver": "^6.1.1" + "@babel/compat-data": "^7.22.6", + "@babel/helper-define-polyfill-provider": "^0.6.3", + "semver": "^6.3.1" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz", - "integrity": "sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA==", + "version": "0.10.6", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz", + "integrity": "sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3", - "core-js-compat": "^3.25.1" + "@babel/helper-define-polyfill-provider": "^0.6.2", + "core-js-compat": "^3.38.0" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz", - "integrity": "sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw==", + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.3.tgz", + "integrity": "sha512-LiWSbl4CRSIa5x/JAU6jZiG9eit9w6mz+yVMFwDE83LAWvt0AfGBoZ7HS/mkhrKuh2ZlzfVZYKoLjXdqw6Yt7Q==", "dev": true, + "license": "MIT", "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.3.3" + "@babel/helper-define-polyfill-provider": "^0.6.3" }, "peerDependencies": { - "@babel/core": "^7.0.0-0" + "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0" } }, "node_modules/babel-preset-modern-browsers": { "version": "15.0.2", "resolved": "https://registry.npmjs.org/babel-preset-modern-browsers/-/babel-preset-modern-browsers-15.0.2.tgz", "integrity": "sha512-grJeZfDN75ZYferYEMZqcukh1nmYlzbGYrC+kXcbfKKgmfabKP/HNTGw7gzlQ1DAY8pU0hzSq8XI9tf7f0MdEA==", + "deprecated": "Use @babel/preset-env instead with configured browserslists 'defaults and supports es6-module'", "dev": true, + "license": "ISC", "dependencies": { "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-transform-modules-commonjs": "^7.10.4" @@ -2398,19 +2559,24 @@ } }, "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=sha512-9Y0g0Q8rmSt+H33DfKv7FOc3v+iRI+o1lbzt8jGcIosYW37IIW/2XVYq5NPdmaD5NQ59Nk26Kl/vZbwW9Fr8vg== sha512-9Y0g0Q8rmSt+H33DfKv7FOc3v+iRI+o1lbzt8jGcIosYW37IIW/2XVYq5NPdmaD5NQ59Nk26Kl/vZbwW9Fr8vg==", - "dev": true + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "license": "MIT" }, "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", "dev": true, + "license": "MIT", "optional": true, "engines": { "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/brace-expansion": { @@ -2418,6 +2584,7 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -2481,6 +2648,7 @@ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=6" @@ -2524,30 +2692,28 @@ } }, "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "engines": { - "node": ">=4" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" } }, "node_modules/chokidar": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", - "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", "dev": true, - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], + "license": "MIT", "optional": true, "dependencies": { "anymatch": "~3.1.2", @@ -2561,24 +2727,45 @@ "engines": { "node": ">= 8.10.0" }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, "optionalDependencies": { "fsevents": "~2.3.2" } }, "node_modules/chrome-trace-event": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", - "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz", + "integrity": "sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.0" } }, + "node_modules/ci-info": { + "version": "3.9.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", + "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/cliui": { "version": "8.0.1", "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", "dev": true, + "license": "ISC", "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", @@ -2588,11 +2775,75 @@ "node": ">=12" } }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", "dev": true, + "license": "MIT", "dependencies": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", @@ -2603,63 +2854,71 @@ } }, "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { - "color-name": "1.1.3" + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" } }, "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" }, "node_modules/colorette": { - "version": "2.0.19", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz", - "integrity": "sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ==", - "dev": true + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true, + "license": "MIT" }, "node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", "dev": true, + "license": "MIT", "engines": { "node": ">= 6" } }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", - "dev": true + "node_modules/common-path-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz", + "integrity": "sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w==", + "dev": true, + "license": "ISC" }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" }, "node_modules/convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } + "license": "MIT" }, "node_modules/core-js-compat": { - "version": "3.27.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.27.1.tgz", - "integrity": "sha512-Dg91JFeCDA17FKnneN7oCMz4BkQ4TcffkgHP4OWwp9yx3pi7ubqMDXXSacfNak1PQqjc95skyt+YBLHQJnkJwA==", + "version": "3.39.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz", + "integrity": "sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw==", "dev": true, + "license": "MIT", "dependencies": { - "browserslist": "^4.21.4" + "browserslist": "^4.24.2" }, "funding": { "type": "opencollective", @@ -2682,51 +2941,47 @@ } }, "node_modules/css-loader": { - "version": "6.7.3", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.7.3.tgz", - "integrity": "sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz", + "integrity": "sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA==", "dev": true, + "license": "MIT", "dependencies": { "icss-utils": "^5.1.0", - "postcss": "^8.4.19", - "postcss-modules-extract-imports": "^3.0.0", - "postcss-modules-local-by-default": "^4.0.0", - "postcss-modules-scope": "^3.0.0", + "postcss": "^8.4.33", + "postcss-modules-extract-imports": "^3.1.0", + "postcss-modules-local-by-default": "^4.0.5", + "postcss-modules-scope": "^3.2.0", "postcss-modules-values": "^4.0.0", "postcss-value-parser": "^4.2.0", - "semver": "^7.3.8" + "semver": "^7.5.4" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "^5.0.0" - } - }, - "node_modules/css-loader/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" + "@rspack/core": "0.x || 1.x", + "webpack": "^5.27.0" }, - "engines": { - "node": ">=10" + "peerDependenciesMeta": { + "@rspack/core": { + "optional": true + }, + "webpack": { + "optional": true + } } }, "node_modules/css-loader/node_modules/semver": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", - "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2734,17 +2989,12 @@ "node": ">=10" } }, - "node_modules/css-loader/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", "dev": true, + "license": "MIT", "bin": { "cssesc": "bin/cssesc" }, @@ -2753,12 +3003,13 @@ } }, "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", + "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", "dev": true, + "license": "MIT", "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -2774,20 +3025,15 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", "dev": true, + "license": "MIT", "peer": true }, - "node_modules/doctrine": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", - "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true, - "peer": true, - "dependencies": { - "esutils": "^2.0.2" - }, - "engines": { - "node": ">=6.0.0" - } + "license": "MIT" }, "node_modules/electron-to-chromium": { "version": "1.5.72", @@ -2797,10 +3043,11 @@ "license": "ISC" }, "node_modules/emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true, + "license": "MIT" }, "node_modules/enhanced-resolve": { "version": "5.17.1", @@ -2817,10 +3064,11 @@ } }, "node_modules/envinfo": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", - "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", "dev": true, + "license": "MIT", "bin": { "envinfo": "dist/cli.js" }, @@ -2829,10 +3077,11 @@ } }, "node_modules/es-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz", - "integrity": "sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q==", - "dev": true + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz", + "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", + "dev": true, + "license": "MIT" }, "node_modules/escalade": { "version": "3.2.0", @@ -2845,69 +3094,78 @@ } }, "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", + "peer": true, "engines": { - "node": ">=0.8.0" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/eslint": { - "version": "8.33.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.33.0.tgz", - "integrity": "sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA==", + "version": "9.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.16.0.tgz", + "integrity": "sha512-whp8mSQI4C8VXd+fLgSM0lh3UlmcFtVwUQjyKCFfsp+2ItAIYhlq/hqGahGqHE6cv9unM41VlqKk2VtKYR2TaA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { - "@eslint/eslintrc": "^1.4.1", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.12.1", + "@eslint/config-array": "^0.19.0", + "@eslint/core": "^0.9.0", + "@eslint/eslintrc": "^3.2.0", + "@eslint/js": "9.16.0", + "@eslint/plugin-kit": "^0.2.3", + "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", - "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "@humanwhocodes/retry": "^0.4.1", + "@types/estree": "^1.0.6", + "@types/json-schema": "^7.0.15", + "ajv": "^6.12.4", "chalk": "^4.0.0", - "cross-spawn": "^7.0.2", + "cross-spawn": "^7.0.5", "debug": "^4.3.2", - "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.1.1", - "eslint-utils": "^3.0.0", - "eslint-visitor-keys": "^3.3.0", - "espree": "^9.4.0", - "esquery": "^1.4.0", + "eslint-scope": "^8.2.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "esquery": "^1.5.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", - "file-entry-cache": "^6.0.1", + "file-entry-cache": "^8.0.0", "find-up": "^5.0.0", "glob-parent": "^6.0.2", - "globals": "^13.19.0", - "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", - "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", - "is-path-inside": "^3.0.3", - "js-sdsl": "^4.1.4", - "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.4.1", "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", - "regexpp": "^3.2.0", - "strip-ansi": "^6.0.1", - "strip-json-comments": "^3.1.0", - "text-table": "^0.2.0" + "optionator": "^0.9.3" }, "bin": { "eslint": "bin/eslint.js" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://opencollective.com/eslint" + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } } }, "node_modules/eslint-scope": { @@ -2915,6 +3173,7 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^4.1.1" @@ -2923,147 +3182,71 @@ "node": ">=8.0.0" } }, - "node_modules/eslint-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", - "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", - "dev": true, - "peer": true, - "dependencies": { - "eslint-visitor-keys": "^2.0.0" - }, - "engines": { - "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - }, - "peerDependencies": { - "eslint": ">=5" - } - }, - "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "node_modules/eslint-visitor-keys": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true, - "peer": true, + "license": "Apache-2.0", "engines": { "node": ">=10" } }, - "node_modules/eslint-visitor-keys": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz", - "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==", - "dev": true, - "peer": true, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" - } - }, "node_modules/eslint-webpack-plugin": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-3.2.0.tgz", - "integrity": "sha512-avrKcGncpPbPSUHX6B3stNGzkKFto3eL+DKM4+VyMrVnhPc3vRczVlCq3uhuFOdRvDHTVXuzwk1ZKUrqDQHQ9w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-4.2.0.tgz", + "integrity": "sha512-rsfpFQ01AWQbqtjgPRr2usVRxhWDuG0YDYcG8DJOteD3EFnpeuYuOwk0PQiN7PRBTqS6ElNdtPZPggj8If9WnA==", "dev": true, + "license": "MIT", "dependencies": { - "@types/eslint": "^7.29.0 || ^8.4.1", - "jest-worker": "^28.0.2", + "@types/eslint": "^8.56.10", + "jest-worker": "^29.7.0", "micromatch": "^4.0.5", "normalize-path": "^3.0.0", - "schema-utils": "^4.0.0" + "schema-utils": "^4.2.0" }, "engines": { - "node": ">= 12.13.0" + "node": ">= 14.15.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0", + "eslint": "^8.0.0 || ^9.0.0", "webpack": "^5.0.0" } }, - "node_modules/eslint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "peer": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/eslint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "node_modules/eslint/node_modules/eslint-scope": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", + "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, + "license": "BSD-2-Clause", "peer": true, "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" }, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/eslint/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "peer": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" + "url": "https://opencollective.com/eslint" } }, - "node_modules/eslint/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true, - "peer": true - }, - "node_modules/eslint/node_modules/escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, + "license": "Apache-2.0", "peer": true, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/eslint-scope": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz", - "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==", - "dev": true, - "peer": true, - "dependencies": { - "esrecurse": "^4.3.0", - "estraverse": "^5.2.0" - }, - "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "url": "https://opencollective.com/eslint" } }, "node_modules/eslint/node_modules/estraverse": { @@ -3071,33 +3254,18 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "peer": true, "engines": { "node": ">=4.0" } }, - "node_modules/eslint/node_modules/find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "peer": true, - "dependencies": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/eslint/node_modules/glob-parent": { "version": "6.0.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "peer": true, "dependencies": { "is-glob": "^4.0.3" @@ -3106,116 +3274,45 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", - "dev": true, - "peer": true, - "dependencies": { - "type-fest": "^0.20.2" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/eslint/node_modules/locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "peer": true, - "dependencies": { - "p-locate": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "peer": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "node_modules/espree": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", + "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, + "license": "BSD-2-Clause", "peer": true, "dependencies": { - "p-limit": "^3.0.2" + "acorn": "^8.14.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^4.2.0" }, "engines": { - "node": ">=10" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/eslint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "peer": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" + "url": "https://opencollective.com/eslint" } }, - "node_modules/espree": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz", - "integrity": "sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg==", + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", + "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, + "license": "Apache-2.0", "peer": true, - "dependencies": { - "acorn": "^8.8.0", - "acorn-jsx": "^5.3.2", - "eslint-visitor-keys": "^3.3.0" - }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, "funding": { "url": "https://opencollective.com/eslint" } }, "node_modules/esquery": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", - "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "peer": true, "dependencies": { "estraverse": "^5.1.0" @@ -3229,6 +3326,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "peer": true, "engines": { "node": ">=4.0" @@ -3239,6 +3337,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "estraverse": "^5.2.0" }, @@ -3251,6 +3350,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -3260,6 +3360,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -3269,6 +3370,7 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -3278,6 +3380,7 @@ "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.x" } @@ -3286,51 +3389,53 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fast-levenshtein": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true, + "license": "MIT", "peer": true }, + "node_modules/fast-uri": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", + "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 4.9.1" } }, - "node_modules/fastq": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", - "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", - "dev": true, - "peer": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, "node_modules/file-entry-cache": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", - "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { - "flat-cache": "^3.0.4" + "flat-cache": "^4.0.0" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16.0.0" } }, "node_modules/fill-range": { @@ -3347,88 +3452,110 @@ } }, "node_modules/find-cache-dir": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", - "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz", + "integrity": "sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg==", "dev": true, + "license": "MIT", "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "common-path-prefix": "^3.0.0", + "pkg-dir": "^7.0.0" }, "engines": { - "node": ">=8" + "node": ">=14.16" }, "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/find-cache-dir/node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { - "semver": "^6.0.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "node_modules/flat": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", + "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" + "license": "BSD-3-Clause", + "bin": { + "flat": "cli.js" } }, "node_modules/flat-cache": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", - "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { - "flatted": "^3.1.0", - "rimraf": "^3.0.2" + "flatted": "^3.2.9", + "keyv": "^4.5.4" }, "engines": { - "node": "^10.12.0 || >=12.0.0" + "node": ">=16" } }, "node_modules/flatted": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz", - "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz", + "integrity": "sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA==", "dev": true, + "license": "ISC", "peer": true }, + "node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/fs-readdir-recursive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "hasInstallScript": true, + "license": "MIT", "optional": true, "os": [ "darwin" @@ -3438,16 +3565,21 @@ } }, "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.9.0" } @@ -3457,24 +3589,30 @@ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true, + "license": "ISC", "engines": { "node": "6.* || 8.* || >= 10.*" } }, "node_modules/glob": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz", - "integrity": "sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", "dev": true, + "license": "ISC", "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^5.0.1", - "once": "^1.3.0" + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" }, "engines": { - "node": ">=12" + "node": "20 || >=22" }, "funding": { "url": "https://github.com/sponsors/isaacs" @@ -3485,6 +3623,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, + "license": "ISC", "optional": true, "dependencies": { "is-glob": "^4.0.1" @@ -3505,20 +3644,25 @@ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, + "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" } }, "node_modules/glob/node_modules/minimatch": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz", - "integrity": "sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=10" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/globals": { @@ -3526,6 +3670,7 @@ "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -3537,32 +3682,27 @@ "dev": true, "license": "ISC" }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true, - "peer": true - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, + "license": "MIT", "engines": { - "node": ">= 0.4.0" + "node": ">=8" } }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, "engines": { - "node": ">=4" + "node": ">= 0.4" } }, "node_modules/icss-utils": { @@ -3570,6 +3710,7 @@ "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", "dev": true, + "license": "ISC", "engines": { "node": "^10 || ^12 || >= 14" }, @@ -3578,10 +3719,11 @@ } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">= 4" @@ -3592,6 +3734,7 @@ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "parent-module": "^1.0.0", @@ -3605,10 +3748,11 @@ } }, "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, + "license": "MIT", "dependencies": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" @@ -3623,11 +3767,81 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/import-local/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=0.8.19" @@ -3637,7 +3851,9 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, + "license": "ISC", "dependencies": { "once": "^1.3.0", "wrappy": "1" @@ -3647,13 +3863,15 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/interpret": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.13.0" } @@ -3663,6 +3881,7 @@ "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "binary-extensions": "^2.0.0" @@ -3672,12 +3891,16 @@ } }, "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, + "license": "MIT", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3688,6 +3911,7 @@ "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3697,6 +3921,7 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -3706,6 +3931,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -3723,21 +3949,12 @@ "node": ">=0.12.0" } }, - "node_modules/is-path-inside": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", - "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - } - }, "node_modules/is-plain-object": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", "dev": true, + "license": "MIT", "dependencies": { "isobject": "^3.0.1" }, @@ -3749,38 +3966,67 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, - "node_modules/jest-worker": { - "version": "28.1.3", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz", - "integrity": "sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==", + "node_modules/jackspeak": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz", + "integrity": "sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/jest-util": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz", + "integrity": "sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA==", "dev": true, + "license": "MIT", "dependencies": { + "@jest/types": "^29.6.3", "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" + "chalk": "^4.0.0", + "ci-info": "^3.2.0", + "graceful-fs": "^4.2.9", + "picomatch": "^2.2.3" }, "engines": { - "node": "^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "node_modules/jest-worker": { + "version": "29.7.0", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz", + "integrity": "sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==", "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-util": "^29.7.0", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, "engines": { - "node": ">=8" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-worker/node_modules/supports-color": { @@ -3788,6 +4034,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -3798,28 +4045,19 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/js-sdsl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz", - "integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==", - "dev": true, - "peer": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/js-sdsl" - } - }, "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "argparse": "^2.0.1" @@ -3829,34 +4067,46 @@ } }, "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", "dev": true, + "license": "MIT", "bin": { "jsesc": "bin/jsesc" }, "engines": { - "node": ">=4" + "node": ">=6" } }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "license": "MIT", + "peer": true + }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-stable-stringify-without-jsonify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/json5": { @@ -3864,6 +4114,7 @@ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, + "license": "MIT", "bin": { "json5": "lib/cli.js" }, @@ -3871,11 +4122,23 @@ "node": ">=6" } }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -3885,6 +4148,7 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "prelude-ls": "^1.2.1", @@ -3899,33 +4163,41 @@ "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz", "integrity": "sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6.11.5" } }, "node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { - "p-locate": "^4.1.0" + "p-locate": "^5.0.0" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/lru-cache": { @@ -3933,6 +4205,7 @@ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", "dev": true, + "license": "ISC", "dependencies": { "yallist": "^3.0.2" } @@ -3942,6 +4215,7 @@ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, + "license": "MIT", "dependencies": { "pify": "^4.0.1", "semver": "^5.6.0" @@ -3955,6 +4229,7 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver" } @@ -3963,7 +4238,8 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/micromatch": { "version": "4.0.8", @@ -3984,6 +4260,7 @@ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.6" } @@ -3993,6 +4270,7 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", "dev": true, + "license": "MIT", "dependencies": { "mime-db": "1.52.0" }, @@ -4005,6 +4283,7 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^1.1.7" }, @@ -4012,16 +4291,27 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" }, "node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.8", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz", + "integrity": "sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==", "dev": true, "funding": [ { @@ -4029,6 +4319,7 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -4041,13 +4332,15 @@ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true, + "license": "MIT", "peer": true }, "node_modules/neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/node-releases": { "version": "2.0.19", @@ -4061,6 +4354,7 @@ "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4070,15 +4364,17 @@ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", "dev": true, + "license": "ISC", "dependencies": { "wrappy": "1" } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "deep-is": "^0.1.3", @@ -4086,37 +4382,44 @@ "levn": "^0.4.1", "prelude-ls": "^1.2.1", "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "word-wrap": "^1.2.5" }, "engines": { "node": ">= 0.8.0" } }, "node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { - "p-try": "^2.0.0" + "yocto-queue": "^0.1.0" }, "engines": { - "node": ">=6" + "node": ">=10" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", + "peer": true, "dependencies": { - "p-limit": "^2.2.0" + "p-limit": "^3.0.2" }, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/p-try": { @@ -4124,15 +4427,24 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "callsites": "^3.0.0" @@ -4146,6 +4458,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -4153,8 +4466,9 @@ "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4164,6 +4478,7 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -4172,7 +4487,35 @@ "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz", + "integrity": "sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA==", + "dev": true, + "license": "ISC", + "engines": { + "node": "20 || >=22" + } }, "node_modules/performance-now": { "version": "2.1.0", @@ -4192,6 +4535,7 @@ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true, + "license": "MIT", "engines": { "node": ">=8.6" }, @@ -4204,26 +4548,119 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz", + "integrity": "sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA==", "dev": true, + "license": "MIT", "dependencies": { - "find-up": "^4.0.0" + "find-up": "^6.3.0" }, "engines": { - "node": ">=8" + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz", + "integrity": "sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^7.1.0", + "path-exists": "^5.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz", + "integrity": "sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^6.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz", + "integrity": "sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^1.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz", + "integrity": "sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/path-exists": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz", + "integrity": "sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, + "node_modules/pkg-dir/node_modules/yocto-queue": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz", + "integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/postcss": { - "version": "8.4.31", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", - "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "dev": true, "funding": [ { @@ -4239,20 +4676,22 @@ "url": "https://github.com/sponsors/ai" } ], + "license": "MIT", "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "nanoid": "^3.3.7", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" } }, "node_modules/postcss-modules-extract-imports": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz", + "integrity": "sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q==", "dev": true, + "license": "ISC", "engines": { "node": "^10 || ^12 || >= 14" }, @@ -4261,13 +4700,14 @@ } }, "node_modules/postcss-modules-local-by-default": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", - "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.1.0.tgz", + "integrity": "sha512-rm0bdSv4jC3BDma3s9H19ZddW0aHX6EoqwDYU2IfZhRN+53QrufTRo2IdkAbRqLx4R2IYbZnbjKKxg4VN5oU9Q==", "dev": true, + "license": "MIT", "dependencies": { "icss-utils": "^5.0.0", - "postcss-selector-parser": "^6.0.2", + "postcss-selector-parser": "^7.0.0", "postcss-value-parser": "^4.1.0" }, "engines": { @@ -4278,12 +4718,13 @@ } }, "node_modules/postcss-modules-scope": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", - "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz", + "integrity": "sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA==", "dev": true, + "license": "ISC", "dependencies": { - "postcss-selector-parser": "^6.0.4" + "postcss-selector-parser": "^7.0.0" }, "engines": { "node": "^10 || ^12 || >= 14" @@ -4297,6 +4738,7 @@ "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", "dev": true, + "license": "ISC", "dependencies": { "icss-utils": "^5.0.0" }, @@ -4308,10 +4750,11 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.0.11", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz", - "integrity": "sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz", + "integrity": "sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ==", "dev": true, + "license": "MIT", "dependencies": { "cssesc": "^3.0.0", "util-deprecate": "^1.0.2" @@ -4324,48 +4767,30 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz", "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">= 0.8.0" } }, "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "peer": true - }, "node_modules/raf": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", @@ -4380,6 +4805,7 @@ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, + "license": "MIT", "dependencies": { "safe-buffer": "^5.1.0" } @@ -4387,7 +4813,7 @@ "node_modules/raw-loader": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz", - "integrity": "sha1-DD0L6u2KAclm2Xh793goElKpeao=sha512-sf7oGoLuaYAScB4VGr0tzetsYlS8EJH6qnTCfQ/WVEa89hALQ4RQfCKt5xCyPQKPDUbVUAIP1QsxAwfAjlDp7Q== sha512-sf7oGoLuaYAScB4VGr0tzetsYlS8EJH6qnTCfQ/WVEa89hALQ4RQfCKt5xCyPQKPDUbVUAIP1QsxAwfAjlDp7Q==", + "integrity": "sha512-sf7oGoLuaYAScB4VGr0tzetsYlS8EJH6qnTCfQ/WVEa89hALQ4RQfCKt5xCyPQKPDUbVUAIP1QsxAwfAjlDp7Q==", "dev": true }, "node_modules/readdirp": { @@ -4395,6 +4821,7 @@ "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, + "license": "MIT", "optional": true, "dependencies": { "picomatch": "^2.2.1" @@ -4408,6 +4835,7 @@ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", "dev": true, + "license": "MIT", "dependencies": { "resolve": "^1.20.0" }, @@ -4419,13 +4847,15 @@ "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/regenerate-unicode-properties": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz", - "integrity": "sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz", + "integrity": "sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA==", "dev": true, + "license": "MIT", "dependencies": { "regenerate": "^1.4.2" }, @@ -4434,43 +4864,33 @@ } }, "node_modules/regenerator-runtime": { - "version": "0.13.11", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz", - "integrity": "sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==", - "dev": true + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true, + "license": "MIT" }, "node_modules/regenerator-transform": { - "version": "0.15.1", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz", - "integrity": "sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==", + "version": "0.15.2", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz", + "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==", "dev": true, + "license": "MIT", "dependencies": { "@babel/runtime": "^7.8.4" } }, - "node_modules/regexpp": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", - "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/mysticatea" - } - }, "node_modules/regexpu-core": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.2.2.tgz", - "integrity": "sha512-T0+1Zp2wjF/juXMrMxHxidqGYn8U4R+zleSJhX9tQ1PUsS8a9UtYfbsF9LdiVgNX3kiX8RNaKM42nfSgvFJjmw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz", + "integrity": "sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA==", "dev": true, + "license": "MIT", "dependencies": { "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^10.1.0", - "regjsgen": "^0.7.1", - "regjsparser": "^0.9.1", + "regenerate-unicode-properties": "^10.2.0", + "regjsgen": "^0.8.0", + "regjsparser": "^0.12.0", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.1.0" }, @@ -4479,37 +4899,31 @@ } }, "node_modules/regjsgen": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.7.1.tgz", - "integrity": "sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA==", - "dev": true + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz", + "integrity": "sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q==", + "dev": true, + "license": "MIT" }, "node_modules/regjsparser": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz", - "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz", + "integrity": "sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { - "jsesc": "~0.5.0" + "jsesc": "~3.0.2" }, "bin": { "regjsparser": "bin/parser" } }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -4519,17 +4933,19 @@ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", "dev": true, + "license": "MIT", "dependencies": { - "is-core-module": "^2.9.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -4545,6 +4961,7 @@ "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", "dev": true, + "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" }, @@ -4557,6 +4974,7 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -4566,22 +4984,12 @@ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=4" } }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "peer": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, "node_modules/rgbcolor": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/rgbcolor/-/rgbcolor-1.0.1.tgz", @@ -4591,47 +4999,10 @@ "node": ">= 0.8.15" } }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "peer": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rimraf/node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "peer": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/run-parallel": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", - "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", "dev": true, "funding": [ { @@ -4647,27 +5018,19 @@ "url": "https://feross.org/support" } ], - "peer": true, - "dependencies": { - "queue-microtask": "^1.2.2" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "license": "MIT" }, "node_modules/schema-utils": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz", - "integrity": "sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", + "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", "dev": true, + "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.9", - "ajv": "^8.8.0", + "ajv": "^8.9.0", "ajv-formats": "^2.1.1", - "ajv-keywords": "^5.0.0" + "ajv-keywords": "^5.1.0" }, "engines": { "node": ">= 12.13.0" @@ -4678,15 +5041,16 @@ } }, "node_modules/schema-utils/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dev": true, + "license": "MIT", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -4698,6 +5062,7 @@ "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", "dev": true, + "license": "MIT", "dependencies": { "fast-deep-equal": "^3.1.3" }, @@ -4709,13 +5074,15 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/script-loader": { "version": "0.7.2", "resolved": "https://registry.npmjs.org/script-loader/-/script-loader-0.7.2.tgz", "integrity": "sha512-UMNLEvgOAQuzK8ji8qIscM3GIrRCWN6MmMXGD4SD5l6cSycgGsCo0tX5xRnfQcoghqct0tjHjcykgI1PyBE2aA==", "dev": true, + "license": "MIT", "dependencies": { "raw-loader": "~0.5.1" } @@ -4725,15 +5092,17 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" } }, "node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "randombytes": "^2.1.0" } @@ -4743,6 +5112,7 @@ "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", "dev": true, + "license": "MIT", "dependencies": { "kind-of": "^6.0.2" }, @@ -4755,6 +5125,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -4767,23 +5138,39 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } }, "node_modules/shifty": { - "version": "2.20.0", - "resolved": "https://registry.npmjs.org/shifty/-/shifty-2.20.0.tgz", - "integrity": "sha512-1XEGiYWC1Z/lVYWHvTmWXR6/x3VkN4Ocucqulmm2/rHx3zVJpD8SIhab5h7nd3bwysH+OBgE+nCE4ljVudfxtw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/shifty/-/shifty-3.0.3.tgz", + "integrity": "sha512-hNDhs8OsvWUB7GUGJ76/3JyKB3kMCJfbH54nf10ySde9U+Pr/su26CyKryso1DKeQ+le/LTGHSZldPkL3ZrUWw==", + "license": "MIT", "optionalDependencies": { "fsevents": "^2.3.2" } }, + "node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -4799,10 +5186,11 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, + "license": "BSD-3-Clause", "engines": { "node": ">=0.10.0" } @@ -4828,10 +5216,30 @@ } }, "node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", "dev": true, + "license": "MIT", "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -4841,11 +5249,59 @@ "node": ">=8" } }, + "node_modules/string-width-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-width-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { "ansi-regex": "^5.0.1" }, @@ -4853,11 +5309,22 @@ "node": ">=8" } }, + "node_modules/strip-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=8" @@ -4867,31 +5334,33 @@ } }, "node_modules/style-loader": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz", - "integrity": "sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-4.0.0.tgz", + "integrity": "sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA==", "dev": true, + "license": "MIT", "engines": { - "node": ">= 12.13.0" + "node": ">= 18.12.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/webpack" }, "peerDependencies": { - "webpack": "^5.0.0" + "webpack": "^5.27.0" } }, "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" }, "engines": { - "node": ">=4" + "node": ">=8" } }, "node_modules/supports-preserve-symlinks-flag": { @@ -4899,6 +5368,7 @@ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -4979,20 +5449,12 @@ } } }, - "node_modules/terser-webpack-plugin/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "node_modules/terser-webpack-plugin/node_modules/jest-worker": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz", "integrity": "sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==", "dev": true, + "license": "MIT", "dependencies": { "@types/node": "*", "merge-stream": "^2.0.0", @@ -5003,10 +5465,11 @@ } }, "node_modules/terser-webpack-plugin/node_modules/schema-utils": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", - "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", + "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, + "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -5025,6 +5488,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -5042,22 +5506,6 @@ "dev": true, "license": "MIT" }, - "node_modules/text-table": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", - "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true, - "peer": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", - "dev": true, - "engines": { - "node": ">=4" - } - }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -5076,6 +5524,7 @@ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "peer": true, "dependencies": { "prelude-ls": "^1.2.1" @@ -5084,24 +5533,19 @@ "node": ">= 0.8.0" } }, - "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "node_modules/undici-types": { + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true, - "peer": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } + "license": "MIT" }, "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz", + "integrity": "sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -5111,6 +5555,7 @@ "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, + "license": "MIT", "dependencies": { "unicode-canonical-property-names-ecmascript": "^2.0.0", "unicode-property-aliases-ecmascript": "^2.0.0" @@ -5120,10 +5565,11 @@ } }, "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz", - "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz", + "integrity": "sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -5133,6 +5579,7 @@ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz", "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -5173,6 +5620,7 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "license": "BSD-2-Clause", "dependencies": { "punycode": "^2.1.0" } @@ -5180,8 +5628,9 @@ "node_modules/util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" }, "node_modules/watchpack": { "version": "2.4.2", @@ -5245,17 +5694,18 @@ } }, "node_modules/webpack-cli": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz", - "integrity": "sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", + "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", "dev": true, + "license": "MIT", "dependencies": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/configtest": "^2.0.1", - "@webpack-cli/info": "^2.0.1", - "@webpack-cli/serve": "^2.0.1", + "@webpack-cli/configtest": "^2.1.1", + "@webpack-cli/info": "^2.0.2", + "@webpack-cli/serve": "^2.0.5", "colorette": "^2.0.14", - "commander": "^9.4.1", + "commander": "^10.0.1", "cross-spawn": "^7.0.3", "envinfo": "^7.7.3", "fastest-levenshtein": "^1.0.12", @@ -5290,21 +5740,24 @@ } }, "node_modules/webpack-cli/node_modules/commander": { - "version": "9.4.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz", - "integrity": "sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", + "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, + "license": "MIT", "engines": { - "node": "^12.20.0 || >=14" + "node": ">=14" } }, "node_modules/webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz", + "integrity": "sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA==", "dev": true, + "license": "MIT", "dependencies": { "clone-deep": "^4.0.1", + "flat": "^5.0.2", "wildcard": "^2.0.0" }, "engines": { @@ -5316,6 +5769,7 @@ "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz", "integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.13.0" } @@ -5325,6 +5779,7 @@ "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz", "integrity": "sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg==", "dev": true, + "license": "MIT", "dependencies": { "@types/json-schema": "^7.0.8", "ajv": "^6.12.5", @@ -5343,6 +5798,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -5354,26 +5810,48 @@ } }, "node_modules/wildcard": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", + "integrity": "sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ==", + "dev": true, + "license": "MIT" }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=0.10.0" } }, "node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -5386,50 +5864,77 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "node_modules/wrap-ansi-cjs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", "dependencies": { - "color-convert": "^2.0.1" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" }, "engines": { "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/wrap-ansi/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "node_modules/wrap-ansi-cjs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", "dev": true, + "license": "MIT", "dependencies": { - "color-name": "~1.1.4" + "ansi-regex": "^5.0.1" }, "engines": { - "node": ">=7.0.0" + "node": ">=8" } }, - "node_modules/wrap-ansi/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } }, "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "dev": true, + "license": "ISC", "engines": { "node": ">=10" } @@ -5438,13 +5943,15 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/yargs": { - "version": "17.6.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz", - "integrity": "sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw==", + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", "dev": true, + "license": "MIT", "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", @@ -5463,15 +5970,62 @@ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", "dev": true, + "license": "ISC", "engines": { "node": ">=12" } }, + "node_modules/yargs/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "peer": true, "engines": { "node": ">=10" diff --git a/package.json b/package.json index be0fe926..2f54fd81 100644 --- a/package.json +++ b/package.json @@ -24,19 +24,19 @@ }, "homepage": "https://github.com/freegroup/draw2d", "devDependencies": { - "@babel/cli": "^7.20.7", - "@babel/core": "^7.20.12", - "@babel/eslint-parser": "^7.19.1", + "@babel/cli": "^7.26.4", + "@babel/core": "^7.26.0", + "@babel/eslint-parser": "^7.25.9", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/preset-env": "^7.20.2", - "babel-loader": "^9.1.2", + "@babel/preset-env": "^7.26.0", + "babel-loader": "^9.2.1", "babel-plugin-add-module-exports": "^1.0.4", "babel-preset-modern-browsers": "^15.0.2", - "css-loader": "^6.7.3", - "eslint-webpack-plugin": "^3.2.0", - "glob": "^8.0.3", + "css-loader": "^7.1.2", + "eslint-webpack-plugin": "^4.2.0", + "glob": "^11.0.0", "script-loader": "^0.7.2", - "style-loader": "^3.3.1", + "style-loader": "^4.0.0", "terser-webpack-plugin": "^5.3.6", "webpack": "^5.75.0", "webpack-cli": "^5.0.1", @@ -45,6 +45,6 @@ "dependencies": { "canvg": "^4.0.1", "rgbcolor": "^1.0.1", - "shifty": "2.20.0" + "shifty": "^3.0.3" } } diff --git a/yarn.lock b/yarn.lock index 695c0146..56e034ac 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,948 +2,851 @@ # yarn lockfile v1 -"@ampproject/remapping@^2.1.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== +"@ampproject/remapping@^2.2.0": + version "2.3.0" + resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz" + integrity sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw== dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.24" -"@babel/cli@^7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/cli/-/cli-7.20.7.tgz" - integrity sha512-WylgcELHB66WwQqItxNILsMlaTd8/SO6SgTTjMp4uCI7P4QyH1r3nqgFmO3BfM4AtfniHgFMH3EpYFj/zynBkQ== +"@babel/cli@^7.26.4": + version "7.26.4" + resolved "https://registry.npmjs.org/@babel/cli/-/cli-7.26.4.tgz" + integrity sha512-+mORf3ezU3p3qr+82WvJSnQNE1GAYeoCfEv4fik6B5/2cvKZ75AX8oawWQdXtM9MmndooQj15Jr9kelRFWsuRw== dependencies: - "@jridgewell/trace-mapping" "^0.3.8" - commander "^4.0.1" - convert-source-map "^1.1.0" + "@jridgewell/trace-mapping" "^0.3.25" + commander "^6.2.0" + convert-source-map "^2.0.0" fs-readdir-recursive "^1.1.0" glob "^7.2.0" make-dir "^2.1.0" slash "^2.0.0" optionalDependencies: "@nicolo-ribaudo/chokidar-2" "2.1.8-no-fsevents.3" - chokidar "^3.4.0" - -"@babel/code-frame@^7.18.6", "@babel/code-frame@^7.22.13": - version "7.22.13" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz" - integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== - dependencies: - "@babel/highlight" "^7.22.13" - chalk "^2.4.2" - -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.1", "@babel/compat-data@^7.20.5": - version "7.20.10" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.10.tgz" - integrity sha512-sEnuDPpOJR/fcafHMjpcpGN5M2jbUGUHwmuWKM/YdPzeEDJg8bgmbcWQFUfE32MQjti1koACvoPVsDe8Uq+idg== - -"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.10.5", "@babel/core@^7.12.0", "@babel/core@^7.13.0", "@babel/core@^7.20.12", "@babel/core@^7.4.0-0", "@babel/core@>=7.11.0": - version "7.20.12" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.20.12.tgz" - integrity sha512-XsMfHovsUYHFMdrIHkZphTN/2Hzzi78R08NuHfDBehym2VsPDL6Zn/JAD/JQdnRvbSsbQc4mVaU1m6JgtTEElg== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.7" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helpers" "^7.20.7" - "@babel/parser" "^7.20.7" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.12" - "@babel/types" "^7.20.7" - convert-source-map "^1.7.0" + chokidar "^3.6.0" + +"@babel/code-frame@^7.25.9", "@babel/code-frame@^7.26.0", "@babel/code-frame@^7.26.2": + version "7.26.2" + resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.26.2.tgz" + integrity sha512-RJlIHRueQgwWitWgF8OdFYGZX328Ax5BCemNGlqHfplnRT9ESi8JkFlvaVYbS+UubVY6dpv87Fs2u5M29iNFVQ== + dependencies: + "@babel/helper-validator-identifier" "^7.25.9" + js-tokens "^4.0.0" + picocolors "^1.0.0" + +"@babel/compat-data@^7.22.6", "@babel/compat-data@^7.25.9", "@babel/compat-data@^7.26.0": + version "7.26.3" + resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.26.3.tgz" + integrity sha512-nHIxvKPniQXpmQLb0vhY3VaFb3S0YrTAwpOWJZh1wn3oJPjJk9Asva204PsBdmAE8vpzfHudT8DB0scYvy9q0g== + +"@babel/core@^7.0.0", "@babel/core@^7.0.0-0", "@babel/core@^7.0.0-0 || ^8.0.0-0 <8.0.0", "@babel/core@^7.10.5", "@babel/core@^7.11.0", "@babel/core@^7.12.0", "@babel/core@^7.13.0", "@babel/core@^7.26.0", "@babel/core@^7.4.0 || ^8.0.0-0 <8.0.0": + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/core/-/core-7.26.0.tgz" + integrity sha512-i1SLeK+DzNnQ3LL/CswPCa/E5u4lh1k6IAEphON8F+cXt0t9euTshDru0q7/IqMa1PMPz5RnHuHscF8/ZJsStg== + dependencies: + "@ampproject/remapping" "^2.2.0" + "@babel/code-frame" "^7.26.0" + "@babel/generator" "^7.26.0" + "@babel/helper-compilation-targets" "^7.25.9" + "@babel/helper-module-transforms" "^7.26.0" + "@babel/helpers" "^7.26.0" + "@babel/parser" "^7.26.0" + "@babel/template" "^7.25.9" + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.26.0" + convert-source-map "^2.0.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.0" + json5 "^2.2.3" + semver "^6.3.1" -"@babel/eslint-parser@^7.19.1": - version "7.19.1" - resolved "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.19.1.tgz" - integrity sha512-AqNf2QWt1rtu2/1rLswy6CDP7H9Oh3mMhk177Y67Rg8d7RD9WfOLLv8CGn6tisFvS2htm86yIe1yLF6I1UDaGQ== +"@babel/eslint-parser@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.25.9.tgz" + integrity sha512-5UXfgpK0j0Xr/xIdgdLEhOFxaDZ0bRPWJJchRpqOSur/3rZoPbqqki5mm0p4NE2cs28krBEiSM2MB7//afRSQQ== dependencies: "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" eslint-visitor-keys "^2.1.0" - semver "^6.3.0" + semver "^6.3.1" -"@babel/generator@^7.20.7", "@babel/generator@^7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz" - integrity sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g== +"@babel/generator@^7.26.0", "@babel/generator@^7.26.3": + version "7.26.3" + resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.26.3.tgz" + integrity sha512-6FF/urZvD0sTeO7k6/B15pMLC4CHUv1426lzr3N01aHJTl046uCAh9LXW/fzeXXjPNCJ6iABW5XaWOsIZB93aQ== dependencies: - "@babel/types" "^7.23.0" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" + "@babel/parser" "^7.26.3" + "@babel/types" "^7.26.3" + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + jsesc "^3.0.2" -"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz" - integrity sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw== +"@babel/helper-annotate-as-pure@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.25.9.tgz" + integrity sha512-gv7320KBUFJz1RnylIg5WWYPRXKZ884AGkYpgpWW02TH66Dl+HaC1t1CKd0z3R4b6hdYEcmrNZHUmfCP+1u3/g== dependencies: - "@babel/helper-explode-assignable-expression" "^7.18.6" - "@babel/types" "^7.18.9" + "@babel/types" "^7.25.9" -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0", "@babel/helper-compilation-targets@^7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz" - integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== +"@babel/helper-compilation-targets@^7.22.6", "@babel/helper-compilation-targets@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.9.tgz" + integrity sha512-j9Db8Suy6yV/VHa4qzrj9yZfZxhLWQdVnRlXxmKLYlhWUVB1sB2G5sxuWYXk/whHD9iW76PmNzxZ4UCnTQTVEQ== dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" + "@babel/compat-data" "^7.25.9" + "@babel/helper-validator-option" "^7.25.9" + browserslist "^4.24.0" lru-cache "^5.1.1" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.18.6", "@babel/helper-create-class-features-plugin@^7.20.5", "@babel/helper-create-class-features-plugin@^7.20.7": - version "7.20.12" - resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.12.tgz" - integrity sha512-9OunRkbT0JQcednL0UFvbfXpAsUXiGjUk0a7sN8fUXX7Mue79cUSMjHGDRRi/Vz9vYlpIhLV5fMD5dKoMhhsNQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-member-expression-to-functions" "^7.20.7" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/helper-split-export-declaration" "^7.18.6" - -"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.20.5": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz" - integrity sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - regexpu-core "^5.2.1" - -"@babel/helper-define-polyfill-provider@^0.3.3": - version "0.3.3" - resolved "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz" - integrity sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww== - dependencies: - "@babel/helper-compilation-targets" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" + semver "^6.3.1" + +"@babel/helper-create-class-features-plugin@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.25.9.tgz" + integrity sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.25.9" + "@babel/helper-member-expression-to-functions" "^7.25.9" + "@babel/helper-optimise-call-expression" "^7.25.9" + "@babel/helper-replace-supers" "^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" + "@babel/traverse" "^7.25.9" + semver "^6.3.1" + +"@babel/helper-create-regexp-features-plugin@^7.18.6", "@babel/helper-create-regexp-features-plugin@^7.25.9": + version "7.26.3" + resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.26.3.tgz" + integrity sha512-G7ZRb40uUgdKOQqPLjfD12ZmGA54PzqDFUv2BKImnC9QIfGhIHKvVML0oN8IUiDq4iRqpq74ABpvOaerfWdong== + dependencies: + "@babel/helper-annotate-as-pure" "^7.25.9" + regexpu-core "^6.2.0" + semver "^6.3.1" + +"@babel/helper-define-polyfill-provider@^0.6.2", "@babel/helper-define-polyfill-provider@^0.6.3": + version "0.6.3" + resolved "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.6.3.tgz" + integrity sha512-HK7Bi+Hj6H+VTHA3ZvBis7V/6hu9QuTrnMXNybfUf2iiuU/N97I8VjB+KbhFF8Rld/Lx5MzoCwPCpPjfK+n8Cg== + dependencies: + "@babel/helper-compilation-targets" "^7.22.6" + "@babel/helper-plugin-utils" "^7.22.5" debug "^4.1.1" lodash.debounce "^4.0.8" resolve "^1.14.2" - semver "^6.1.2" -"@babel/helper-environment-visitor@^7.18.9", "@babel/helper-environment-visitor@^7.22.20": - version "7.22.20" - resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz" - integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== +"@babel/helper-member-expression-to-functions@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.25.9.tgz" + integrity sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ== + dependencies: + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.25.9" + +"@babel/helper-module-imports@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.25.9.tgz" + integrity sha512-tnUA4RsrmflIM6W6RFTLFSXITtl0wKjgpnLgXyowocVPrbYrLUXSBXDgTs8BlbmIzIdlBySRQjINYs2BAkiLtw== + dependencies: + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.25.9" + +"@babel/helper-module-transforms@^7.25.9", "@babel/helper-module-transforms@^7.26.0": + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.26.0.tgz" + integrity sha512-xO+xu6B5K2czEnQye6BHA7DolFFmS3LB7stHZFaOLb1pAwO1HWLS8fXA+eh0A2yIvltPVmx3eNNDBJA2SLHXFw== + dependencies: + "@babel/helper-module-imports" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@babel/traverse" "^7.25.9" -"@babel/helper-explode-assignable-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz" - integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== +"@babel/helper-optimise-call-expression@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.25.9.tgz" + integrity sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ== dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0", "@babel/helper-function-name@^7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz" - integrity sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw== + "@babel/types" "^7.25.9" + +"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.22.5", "@babel/helper-plugin-utils@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.25.9.tgz" + integrity sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw== + +"@babel/helper-remap-async-to-generator@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.25.9.tgz" + integrity sha512-IZtukuUeBbhgOcaW2s06OXTzVNJR0ybm4W5xC1opWFFJMZbwRj5LCk+ByYH7WdZPZTt8KnFwA8pvjN2yqcPlgw== dependencies: - "@babel/template" "^7.22.15" - "@babel/types" "^7.23.0" + "@babel/helper-annotate-as-pure" "^7.25.9" + "@babel/helper-wrap-function" "^7.25.9" + "@babel/traverse" "^7.25.9" -"@babel/helper-hoist-variables@^7.18.6", "@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== +"@babel/helper-replace-supers@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.25.9.tgz" + integrity sha512-IiDqTOTBQy0sWyeXyGSC5TBJpGFXBkRynjBeXsvbhQFKj2viwJC76Epz35YLU1fpe/Am6Vppb7W7zM4fPQzLsQ== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.25.9" + "@babel/helper-optimise-call-expression" "^7.25.9" + "@babel/traverse" "^7.25.9" + +"@babel/helper-skip-transparent-expression-wrappers@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.25.9.tgz" + integrity sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA== dependencies: - "@babel/types" "^7.22.5" + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.25.9" -"@babel/helper-member-expression-to-functions@^7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.20.7.tgz" - integrity sha512-9J0CxJLq315fEdi4s7xK5TQaNYjZw+nDVpVqr1axNGKzdrdwYBD5b4uKv3n75aABG0rCCTK8Im8Ww7eYfMrZgw== - dependencies: - "@babel/types" "^7.20.7" +"@babel/helper-string-parser@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.25.9.tgz" + integrity sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA== -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.11": - version "7.20.11" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.11.tgz" - integrity sha512-uRy78kN4psmji1s2QtbtcCSaj/LILFDp0f/ymhpQH5QY3nljUZCaNWz9X1dEj/8MBdBEFECs7yRhKn8i7NjZgg== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.10" - "@babel/types" "^7.20.7" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.20.2" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz" - integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== - -"@babel/helper-remap-async-to-generator@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz" - integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-wrap-function" "^7.18.9" - "@babel/types" "^7.18.9" - -"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.20.7.tgz" - integrity sha512-vujDMtB6LVfNW13jhlCrp48QNslK6JXi7lQG736HVbHz/mbf4Dc7tIRh1Xf5C0rF7BP8iiSxGMCmY6Ci1ven3A== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-member-expression-to-functions" "^7.20.7" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/helper-simple-access@^7.20.2": - version "7.20.2" - resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz" - integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== - dependencies: - "@babel/types" "^7.20.2" - -"@babel/helper-skip-transparent-expression-wrappers@^7.20.0": - version "7.20.0" - resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz" - integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== - dependencies: - "@babel/types" "^7.20.0" - -"@babel/helper-split-export-declaration@^7.18.6", "@babel/helper-split-export-declaration@^7.22.6": - version "7.22.6" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz" - integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-string-parser@^7.22.5": - version "7.22.5" - resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz" - integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== - -"@babel/helper-validator-identifier@^7.19.1", "@babel/helper-validator-identifier@^7.22.20": - version "7.22.20" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz" - integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== - -"@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== - -"@babel/helper-wrap-function@^7.18.9": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz" - integrity sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q== - dependencies: - "@babel/helper-function-name" "^7.19.0" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.5" - "@babel/types" "^7.20.5" - -"@babel/helpers@^7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.7.tgz" - integrity sha512-PBPjs5BppzsGaxHQCDKnZ6Gd9s6xl8bBCluz3vEInLGRJmnZan4F6BYCeqtyXqkk4W5IlPmjK4JlOuZkpJ3xZA== - dependencies: - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/highlight@^7.22.13": - version "7.22.20" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz" - integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg== - dependencies: - "@babel/helper-validator-identifier" "^7.22.20" - chalk "^2.4.2" - js-tokens "^4.0.0" +"@babel/helper-validator-identifier@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.9.tgz" + integrity sha512-Ed61U6XJc3CVRfkERJWDz4dJwKe7iLmmJsbOGu9wSloNSFttHV0I8g6UAgb7qnK5ly5bGLPd4oXZlxCdANBOWQ== -"@babel/parser@^7.20.7", "@babel/parser@^7.22.15", "@babel/parser@^7.23.0": - version "7.23.0" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz" - integrity sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw== +"@babel/helper-validator-option@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.25.9.tgz" + integrity sha512-e/zv1co8pp55dNdEcCynfj9X7nyUKUXoUEwfXqaZt0omVOmDe9oOTdKStH4GmAw6zxMFs50ZayuMfHDKlO7Tfw== -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz" - integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.18.9": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.20.7.tgz" - integrity sha512-sbr9+wNE5aXMBBFBICk01tt7sBf2Oc9ikRFEcem/ZORup9IMUdNhW7/wVLEbbtlWOsEubJet46mHAL2C8+2jKQ== +"@babel/helper-wrap-function@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.25.9.tgz" + integrity sha512-ETzz9UTjQSTmw39GboatdymDq4XIQbR8ySgVrylRhPOFpsd+JrKHIuF0de7GCWmem+T4uC5z7EZguod7Wj4A4g== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-proposal-optional-chaining" "^7.20.7" + "@babel/template" "^7.25.9" + "@babel/traverse" "^7.25.9" + "@babel/types" "^7.25.9" -"@babel/plugin-proposal-async-generator-functions@^7.20.1": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz" - integrity sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA== +"@babel/helpers@^7.26.0": + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.26.0.tgz" + integrity sha512-tbhNuIxNcVb21pInl3ZSjksLCvgdZy9KwJ8brv993QtIVKJBBkYXz4q4ZbAv31GdnC+R90np23L5FbEBlthAEw== dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - "@babel/plugin-syntax-async-generators" "^7.8.4" + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.0" -"@babel/plugin-proposal-class-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz" - integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-class-static-block@^7.18.6": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.20.7.tgz" - integrity sha512-AveGOoi9DAjUYYuUAG//Ig69GlazLnoyzMw68VCDux+c1tsnnH/OkYcpz/5xzMkEFC6UxjR5Gw1c+iY2wOGVeQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - -"@babel/plugin-proposal-dynamic-import@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz" - integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== +"@babel/parser@^7.25.9", "@babel/parser@^7.26.0", "@babel/parser@^7.26.3": + version "7.26.3" + resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.26.3.tgz" + integrity sha512-WJ/CvmY8Mea8iDXo6a7RK2wbmJITT5fN3BEkRuFlxVyNx8jOKIIhmC4fSkTcPcf8JyavbBwIe6OpiCOBXt/IcA== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" + "@babel/types" "^7.26.3" -"@babel/plugin-proposal-export-namespace-from@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz" - integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== +"@babel/plugin-bugfix-firefox-class-in-computed-class-key@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-firefox-class-in-computed-class-key/-/plugin-bugfix-firefox-class-in-computed-class-key-7.25.9.tgz" + integrity sha512-ZkRyVkThtxQ/J6nv3JFYv1RYY+JT5BvU0y3k5bWrmuG4woXypRa4PXmm9RhOwodRkYFWqC0C0cqcJ4OqR7kW+g== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/traverse" "^7.25.9" -"@babel/plugin-proposal-json-strings@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz" - integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== +"@babel/plugin-bugfix-safari-class-field-initializer-scope@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-class-field-initializer-scope/-/plugin-bugfix-safari-class-field-initializer-scope-7.25.9.tgz" + integrity sha512-MrGRLZxLD/Zjj0gdU15dfs+HH/OXvnw/U4jJD8vpcP2CJQapPEv1IWwjc/qMg7ItBlPwSv1hRBbb7LeuANdcnw== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-json-strings" "^7.8.3" - -"@babel/plugin-proposal-logical-assignment-operators@^7.18.9": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz" - integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.25.9.tgz" + integrity sha512-2qUwwfAFpJLZqxd02YW9btUCZHl+RFvdDkNfZwaIJrvB8Tesjsk8pEQkTvGwZXLqXUx/2oyY3ySRhm6HOXuCug== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz" - integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.25.9.tgz" + integrity sha512-6xWgLZTJXwilVjlnV7ospI3xi+sl8lN8rXXbBD6vYn3UYDlGsag8wrZkKcSI8G6KgqKP7vNFaDgeDnfAABq61g== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - -"@babel/plugin-proposal-numeric-separator@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz" - integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" + "@babel/plugin-transform-optional-chaining" "^7.25.9" + +"@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.25.9.tgz" + integrity sha512-aLnMXYPnzwwqhYSCyXfKkIkYgJ8zv9RK+roo9DkTXz38ynIhd9XCbN08s3MGvqL2MYGVUGdRQLL/JqBIeJhJBg== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/traverse" "^7.25.9" -"@babel/plugin-proposal-object-rest-spread@^7.20.2": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz" - integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.20.7" +"@babel/plugin-proposal-private-property-in-object@7.21.0-placeholder-for-preset-env.2": + version "7.21.0-placeholder-for-preset-env.2" + resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz" + integrity sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w== -"@babel/plugin-proposal-optional-catch-binding@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz" - integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== +"@babel/plugin-syntax-import-assertions@^7.26.0": + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.26.0.tgz" + integrity sha512-QCWT5Hh830hK5EQa7XzuqIkQU9tT/whqbDz7kuaZMHFl1inRRg7JnuAEOQ0Ur0QUl0NufCk1msK2BeY79Aj/eg== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-proposal-optional-chaining@^7.18.9", "@babel/plugin-proposal-optional-chaining@^7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.20.7.tgz" - integrity sha512-T+A7b1kfjtRM51ssoOfS1+wbyCVqorfyZhT99TvxxLMirPShD8CzKMRepMlCBGM5RpHMbn8s+5MMHnPstJH6mQ== +"@babel/plugin-syntax-import-attributes@^7.26.0": + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.26.0.tgz" + integrity sha512-e2dttdsJ1ZTpi3B9UYGLw41hifAubg19AtCu/2I/F1QNVclOBr1dYpTdmdyZ84Xiz43BS/tCUkMAZNLv12Pi+A== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-proposal-private-methods@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz" - integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== +"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": + version "7.10.4" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" + integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-proposal-private-property-in-object@^7.18.6": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.20.5.tgz" - integrity sha512-Vq7b9dUA12ByzB4EjQTPo25sFhY+08pQDBSZRtUAkj7lb7jahaHR5igera16QZ+3my1nYR4dKsNdYj5IjPHilQ== +"@babel/plugin-syntax-numeric-separator@^7.10.4": + version "7.10.4" + resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" + integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.20.5" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-proposal-unicode-property-regex@^7.18.6", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": +"@babel/plugin-syntax-unicode-sets-regex@^7.18.6": version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz" - integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== + resolved "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz" + integrity sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== +"@babel/plugin-transform-arrow-functions@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.25.9.tgz" + integrity sha512-6jmooXYIwn9ca5/RylZADJ+EnSxVUS5sjeJ9UPk6RWRzXCmOJCy6dqItPJFpw2cuCangPK4OYr5uhGKcmrm5Qg== dependencies: - "@babel/helper-plugin-utils" "^7.8.0" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-syntax-class-properties@^7.12.13": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== +"@babel/plugin-transform-async-generator-functions@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.25.9.tgz" + integrity sha512-RXV6QAzTBbhDMO9fWwOmwwTuYaiPbggWQ9INdZqAYeSHyG7FzQ+nOZaUUjNwKv9pV3aE4WFqFm1Hnbci5tBCAw== dependencies: - "@babel/helper-plugin-utils" "^7.12.13" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-remap-async-to-generator" "^7.25.9" + "@babel/traverse" "^7.25.9" -"@babel/plugin-syntax-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz" - integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== +"@babel/plugin-transform-async-to-generator@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.25.9.tgz" + integrity sha512-NT7Ejn7Z/LjUH0Gv5KsBCxh7BH3fbLTV0ptHvpeMvrt3cPThHfJfst9Wrb7S8EvJ7vRTFI7z+VAvFVEQn/m5zQ== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-module-imports" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-remap-async-to-generator" "^7.25.9" -"@babel/plugin-syntax-dynamic-import@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz" - integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== +"@babel/plugin-transform-block-scoped-functions@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.25.9.tgz" + integrity sha512-toHc9fzab0ZfenFpsyYinOX0J/5dgJVA2fm64xPewu7CoYHWEivIWKxkK2rMi4r3yQqLnVmheMXRdG+k239CgA== dependencies: - "@babel/helper-plugin-utils" "^7.8.0" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-syntax-export-namespace-from@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz" - integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== +"@babel/plugin-transform-block-scoping@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.25.9.tgz" + integrity sha512-1F05O7AYjymAtqbsFETboN1NvBdcnzMerO+zlMyJBEz6WkMdejvGWw9p05iTSjC85RLlBseHHQpYaM4gzJkBGg== dependencies: - "@babel/helper-plugin-utils" "^7.8.3" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-syntax-import-assertions@^7.20.0": - version "7.20.0" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz" - integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== +"@babel/plugin-transform-class-properties@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.25.9.tgz" + integrity sha512-bbMAII8GRSkcd0h0b4X+36GksxuheLFjP65ul9w6C3KgAamI3JqErNgSrosX6ZPj+Mpim5VvEbawXxJCyEUV3Q== dependencies: - "@babel/helper-plugin-utils" "^7.19.0" + "@babel/helper-create-class-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== +"@babel/plugin-transform-class-static-block@^7.26.0": + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.26.0.tgz" + integrity sha512-6J2APTs7BDDm+UMqP1useWqhcRAXo0WIoVj26N7kPFB6S73Lgvyka4KTZYIxtgYXiN5HTyRObA72N2iu628iTQ== dependencies: - "@babel/helper-plugin-utils" "^7.8.0" + "@babel/helper-create-class-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== +"@babel/plugin-transform-classes@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.25.9.tgz" + integrity sha512-mD8APIXmseE7oZvZgGABDyM34GUmK45Um2TXiBUt7PnuAxrgoSVf123qUzPxEr/+/BHrRn5NMZCdE2m/1F8DGg== dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.10.4": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" + "@babel/helper-annotate-as-pure" "^7.25.9" + "@babel/helper-compilation-targets" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-replace-supers" "^7.25.9" + "@babel/traverse" "^7.25.9" + globals "^11.1.0" -"@babel/plugin-syntax-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz" - integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== +"@babel/plugin-transform-computed-properties@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.25.9.tgz" + integrity sha512-HnBegGqXZR12xbcTHlJ9HGxw1OniltT26J5YpfruGqtUHlz/xKf/G2ak9e+t0rVqrjXa9WOhvYPz1ERfMj23AA== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/template" "^7.25.9" -"@babel/plugin-syntax-top-level-await@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== +"@babel/plugin-transform-destructuring@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.25.9.tgz" + integrity sha512-WkCGb/3ZxXepmMiX101nnGiU+1CAdut8oHyEOHxkKuS1qKpU2SMXE2uSvfz8PBuLd49V6LEsbtyPhWC7fnkgvQ== dependencies: - "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-arrow-functions@^7.18.6": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.20.7.tgz" - integrity sha512-3poA5E7dzDomxj9WXWwuD6A5F3kc7VXwIJO+E+J8qtDtS+pXPAhrgEyh+9GBwBgPq1Z+bB+/JD60lp5jsN7JPQ== +"@babel/plugin-transform-dotall-regex@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.25.9.tgz" + integrity sha512-t7ZQ7g5trIgSRYhI9pIJtRl64KHotutUJsh4Eze5l7olJv+mRSg4/MmbZ0tv1eeqRbdvo/+trvJD/Oc5DmW2cA== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-create-regexp-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-async-to-generator@^7.18.6": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz" - integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== +"@babel/plugin-transform-duplicate-keys@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.25.9.tgz" + integrity sha512-LZxhJ6dvBb/f3x8xwWIuyiAHy56nrRG3PeYTpBkkzkYRRQ6tJLu68lEF5VIqMUZiAV7a8+Tb78nEoMCMcqjXBw== dependencies: - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-block-scoped-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz" - integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== +"@babel/plugin-transform-duplicate-named-capturing-groups-regex@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-named-capturing-groups-regex/-/plugin-transform-duplicate-named-capturing-groups-regex-7.25.9.tgz" + integrity sha512-0UfuJS0EsXbRvKnwcLjFtJy/Sxc5J5jhLHnFhy7u4zih97Hz6tJkLU+O+FMMrNZrosUPxDi6sYxJ/EA8jDiAog== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-create-regexp-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-block-scoping@^7.20.2": - version "7.20.11" - resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.20.11.tgz" - integrity sha512-tA4N427a7fjf1P0/2I4ScsHGc5jcHPbb30xMbaTke2gxDuWpUfXDuX1FEymJwKk4tuGUvGcejAR6HdZVqmmPyw== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - -"@babel/plugin-transform-classes@^7.20.2": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.20.7.tgz" - integrity sha512-LWYbsiXTPKl+oBlXUGlwNlJZetXD5Am+CyBdqhPsDVjM9Jc8jwBJFrKhHf900Kfk2eZG1y9MAG3UNajol7A4VQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-replace-supers" "^7.20.7" - "@babel/helper-split-export-declaration" "^7.18.6" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.18.9": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.20.7.tgz" - integrity sha512-Lz7MvBK6DTjElHAmfu6bfANzKcxpyNPeYBGEafyA6E5HtRpjpZwU+u7Qrgz/2OR0z+5TvKYbPdphfSaAcZBrYQ== +"@babel/plugin-transform-dynamic-import@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.25.9.tgz" + integrity sha512-GCggjexbmSLaFhqsojeugBpeaRIgWNTcgKVq/0qIteFEqY2A+b9QidYadrWlnbWQUrW5fn+mCvf3tr7OeBFTyg== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/template" "^7.20.7" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-destructuring@^7.20.2": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.20.7.tgz" - integrity sha512-Xwg403sRrZb81IVB79ZPqNQME23yhugYVqgTxAhT99h485F4f+GMELFhhOsscDUB7HCswepKeCKLn/GZvUKoBA== +"@babel/plugin-transform-exponentiation-operator@^7.25.9": + version "7.26.3" + resolved "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.26.3.tgz" + integrity sha512-7CAHcQ58z2chuXPWblnn1K6rLDnDWieghSOEmqQsrBenH0P9InCUtOJYD89pvngljmZlJcz3fcmgYsXFNGa1ZQ== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-dotall-regex@^7.18.6", "@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz" - integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== +"@babel/plugin-transform-export-namespace-from@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.25.9.tgz" + integrity sha512-2NsEz+CxzJIVOPx2o9UsW1rXLqtChtLoVnwYHHiB04wS5sgn7mrV45fWMBX0Kk+ub9uXytVYfNP2HjbVbCB3Ww== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-duplicate-keys@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz" - integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-exponentiation-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz" - integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== +"@babel/plugin-transform-for-of@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.25.9.tgz" + integrity sha512-LqHxduHoaGELJl2uhImHwRQudhCM50pT46rIBNvtT/Oql3nqiS3wOwP+5ten7NpYSXrrVLgtZU3DZmPtWZo16A== dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" -"@babel/plugin-transform-for-of@^7.18.8": - version "7.18.8" - resolved "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.18.8.tgz" - integrity sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ== +"@babel/plugin-transform-function-name@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.25.9.tgz" + integrity sha512-8lP+Yxjv14Vc5MuWBpJsoUCd3hD6V9DgBon2FVYL4jJgbnVQ9fTgYmonchzZJOVNgzEgbxp4OwAf6xz6M/14XA== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-compilation-targets" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/traverse" "^7.25.9" -"@babel/plugin-transform-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz" - integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== +"@babel/plugin-transform-json-strings@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.25.9.tgz" + integrity sha512-xoTMk0WXceiiIvsaquQQUaLLXSW1KJ159KP87VilruQm0LNNGxWzahxSS6T6i4Zg3ezp4vA4zuwiNUR53qmQAw== dependencies: - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz" - integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== +"@babel/plugin-transform-literals@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.25.9.tgz" + integrity sha512-9N7+2lFziW8W9pBl2TzaNht3+pgMIRP74zizeCSrtnSKVdUl8mAjjOP2OOVQAfZ881P2cNjDj1uAMEdeD50nuQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-member-expression-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz" - integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== +"@babel/plugin-transform-logical-assignment-operators@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.25.9.tgz" + integrity sha512-wI4wRAzGko551Y8eVf6iOY9EouIDTtPb0ByZx+ktDGHwv6bHFimrgJM/2T021txPZ2s4c7bqvHbd+vXG6K948Q== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-modules-amd@^7.19.6": - version "7.20.11" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz" - integrity sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g== +"@babel/plugin-transform-member-expression-literals@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.25.9.tgz" + integrity sha512-PYazBVfofCQkkMzh2P6IdIUaCEWni3iYEerAsRWuVd8+jlM1S9S9cz1dF9hIzyoZ8IA3+OwVYIp9v9e+GbgZhA== dependencies: - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-modules-commonjs@^7.10.4", "@babel/plugin-transform-modules-commonjs@^7.19.6": - version "7.20.11" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.20.11.tgz" - integrity sha512-S8e1f7WQ7cimJQ51JkAaDrEtohVEitXjgCGAS2N8S31Y42E+kWwfSz83LYz57QdBm7q9diARVqanIaH2oVgQnw== +"@babel/plugin-transform-modules-amd@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.25.9.tgz" + integrity sha512-g5T11tnI36jVClQlMlt4qKDLlWnG5pP9CSM4GhdRciTNMRgkfpo5cR6b4rGIOYPgRRuFAvwjPQ/Yk+ql4dyhbw== dependencies: - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-simple-access" "^7.20.2" + "@babel/helper-module-transforms" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-modules-systemjs@^7.19.6": - version "7.20.11" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.20.11.tgz" - integrity sha512-vVu5g9BPQKSFEmvt2TA4Da5N+QVS66EX21d8uoOihC+OCpUoGvzVsXeqFdtAEfVa5BILAeFt+U7yVmLbQnAJmw== +"@babel/plugin-transform-modules-commonjs@^7.10.4", "@babel/plugin-transform-modules-commonjs@^7.25.9": + version "7.26.3" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.26.3.tgz" + integrity sha512-MgR55l4q9KddUDITEzEFYn5ZsGDXMSsU9E+kh7fjRXTIC3RHqfCo8RPRbyReYJh44HQ/yomFkqbOFohXvDCiIQ== dependencies: - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-module-transforms" "^7.20.11" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-identifier" "^7.19.1" + "@babel/helper-module-transforms" "^7.26.0" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-modules-umd@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz" - integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== +"@babel/plugin-transform-modules-systemjs@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.25.9.tgz" + integrity sha512-hyss7iIlH/zLHaehT+xwiymtPOpsiwIIRlCAOwBB04ta5Tt+lNItADdlXw3jAWZ96VJ2jlhl/c+PNIQPKNfvcA== dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-module-transforms" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" + "@babel/traverse" "^7.25.9" -"@babel/plugin-transform-named-capturing-groups-regex@^7.19.1": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.20.5.tgz" - integrity sha512-mOW4tTzi5iTLnw+78iEq3gr8Aoq4WNRGpmSlrogqaiCBoR1HFhpU4JkpQFOHfeYx3ReVIFWOQJS4aZBRvuZ6mA== +"@babel/plugin-transform-modules-umd@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.25.9.tgz" + integrity sha512-bS9MVObUgE7ww36HEfwe6g9WakQ0KF07mQF74uuXdkoziUPfKyu/nIm663kz//e5O1nPInPFx36z7WJmJ4yNEw== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.20.5" - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-module-transforms" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-new-target@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz" - integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== +"@babel/plugin-transform-named-capturing-groups-regex@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.25.9.tgz" + integrity sha512-oqB6WHdKTGl3q/ItQhpLSnWWOpjUJLsOCLVyeFgeTktkBSCiurvPOsyt93gibI9CmuKvTUEtWmG5VhZD+5T/KA== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-create-regexp-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-object-super@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz" - integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== +"@babel/plugin-transform-new-target@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.25.9.tgz" + integrity sha512-U/3p8X1yCSoKyUj2eOBIx3FOn6pElFOKvAAGf8HTtItuPyB+ZeOqfn+mvTtg9ZlOAjsPdK3ayQEjqHjU/yLeVQ== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-parameters@^7.20.1", "@babel/plugin-transform-parameters@^7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.20.7.tgz" - integrity sha512-WiWBIkeHKVOSYPO0pWkxGPfKeWrCJyD3NJ53+Lrp/QMSZbsVPovrVl2aWZ19D/LTVnaDv5Ap7GJ/B2CTOZdrfA== +"@babel/plugin-transform-nullish-coalescing-operator@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.25.9.tgz" + integrity sha512-ENfftpLZw5EItALAD4WsY/KUWvhUlZndm5GC7G3evUsVeSJB6p0pBeLQUnRnBCBx7zV0RKQjR9kCuwrsIrjWog== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-property-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz" - integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== +"@babel/plugin-transform-numeric-separator@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.25.9.tgz" + integrity sha512-TlprrJ1GBZ3r6s96Yq8gEQv82s8/5HnCVHtEJScUj90thHQbwe+E5MLhi2bbNHBEJuzrvltXSru+BUxHDoog7Q== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-regenerator@^7.18.6": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.20.5.tgz" - integrity sha512-kW/oO7HPBtntbsahzQ0qSE3tFvkFwnbozz3NWFhLGqH75vLEg+sCGngLlhVkePlCs3Jv0dBBHDzCHxNiFAQKCQ== +"@babel/plugin-transform-object-rest-spread@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.25.9.tgz" + integrity sha512-fSaXafEE9CVHPweLYw4J0emp1t8zYTXyzN3UuG+lylqkvYd7RMrsOQ8TYx5RF231be0vqtFC6jnx3UmpJmKBYg== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - regenerator-transform "^0.15.1" + "@babel/helper-compilation-targets" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/plugin-transform-parameters" "^7.25.9" -"@babel/plugin-transform-reserved-words@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz" - integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== +"@babel/plugin-transform-object-super@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.25.9.tgz" + integrity sha512-Kj/Gh+Rw2RNLbCK1VAWj2U48yxxqL2x0k10nPtSdRa0O2xnHXalD0s+o1A6a0W43gJ00ANo38jxkQreckOzv5A== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-replace-supers" "^7.25.9" -"@babel/plugin-transform-shorthand-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz" - integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== +"@babel/plugin-transform-optional-catch-binding@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.25.9.tgz" + integrity sha512-qM/6m6hQZzDcZF3onzIhZeDHDO43bkNNlOX0i8n3lR6zLbu0GN2d8qfM/IERJZYauhAHSLHy39NF0Ctdvcid7g== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-spread@^7.19.0": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz" - integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw== +"@babel/plugin-transform-optional-chaining@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.25.9.tgz" + integrity sha512-6AvV0FsLULbpnXeBjrY4dmWF8F7gf8QnvTEoO/wX/5xm/xE1Xo8oPuD3MPS+KS9f9XBEAWN7X1aWr4z9HdOr7A== dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" -"@babel/plugin-transform-sticky-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz" - integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== +"@babel/plugin-transform-parameters@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.25.9.tgz" + integrity sha512-wzz6MKwpnshBAiRmn4jR8LYz/g8Ksg0o80XmwZDlordjwEk9SxBzTWC7F5ef1jhbrbOW2DJ5J6ayRukrJmnr0g== dependencies: - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-template-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz" - integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== +"@babel/plugin-transform-private-methods@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.25.9.tgz" + integrity sha512-D/JUozNpQLAPUVusvqMxyvjzllRaF8/nSrP1s2YGQT/W4LHK4xxsMcHjhOGTS01mp9Hda8nswb+FblLdJornQw== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-create-class-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-typeof-symbol@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz" - integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== +"@babel/plugin-transform-private-property-in-object@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.25.9.tgz" + integrity sha512-Evf3kcMqzXA3xfYJmZ9Pg1OvKdtqsDMSWBDzZOPLvHiTt36E75jLDQo5w1gtRU95Q4E5PDttrTf25Fw8d/uWLw== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-annotate-as-pure" "^7.25.9" + "@babel/helper-create-class-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-unicode-escapes@^7.18.10": - version "7.18.10" - resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz" - integrity sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ== +"@babel/plugin-transform-property-literals@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.25.9.tgz" + integrity sha512-IvIUeV5KrS/VPavfSM/Iu+RE6llrHrYIKY1yfCzyO/lMXHQ+p7uGhonmGVisv6tSBSVgWzMBohTcvkC9vQcQFA== dependencies: - "@babel/helper-plugin-utils" "^7.18.9" + "@babel/helper-plugin-utils" "^7.25.9" -"@babel/plugin-transform-unicode-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz" - integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== +"@babel/plugin-transform-regenerator@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.25.9.tgz" + integrity sha512-vwDcDNsgMPDGP0nMqzahDWE5/MLcX8sv96+wfX7as7LoF/kr97Bo/7fI00lXY4wUXYfVmwIIyG80fGZ1uvt2qg== dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" + "@babel/helper-plugin-utils" "^7.25.9" + regenerator-transform "^0.15.2" -"@babel/preset-env@^7.20.2": - version "7.20.2" - resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.20.2.tgz" - integrity sha512-1G0efQEWR1EHkKvKHqbG+IN/QdgwfByUpM5V5QroDzGV2t3S/WXNQd693cHiHTlCFMpr9B6FkPFXDA2lQcKoDg== - dependencies: - "@babel/compat-data" "^7.20.1" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-option" "^7.18.6" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-async-generator-functions" "^7.20.1" - "@babel/plugin-proposal-class-properties" "^7.18.6" - "@babel/plugin-proposal-class-static-block" "^7.18.6" - "@babel/plugin-proposal-dynamic-import" "^7.18.6" - "@babel/plugin-proposal-export-namespace-from" "^7.18.9" - "@babel/plugin-proposal-json-strings" "^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators" "^7.18.9" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" - "@babel/plugin-proposal-numeric-separator" "^7.18.6" - "@babel/plugin-proposal-object-rest-spread" "^7.20.2" - "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.18.9" - "@babel/plugin-proposal-private-methods" "^7.18.6" - "@babel/plugin-proposal-private-property-in-object" "^7.18.6" - "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.20.0" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.18.6" - "@babel/plugin-transform-async-to-generator" "^7.18.6" - "@babel/plugin-transform-block-scoped-functions" "^7.18.6" - "@babel/plugin-transform-block-scoping" "^7.20.2" - "@babel/plugin-transform-classes" "^7.20.2" - "@babel/plugin-transform-computed-properties" "^7.18.9" - "@babel/plugin-transform-destructuring" "^7.20.2" - "@babel/plugin-transform-dotall-regex" "^7.18.6" - "@babel/plugin-transform-duplicate-keys" "^7.18.9" - "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.18.8" - "@babel/plugin-transform-function-name" "^7.18.9" - "@babel/plugin-transform-literals" "^7.18.9" - "@babel/plugin-transform-member-expression-literals" "^7.18.6" - "@babel/plugin-transform-modules-amd" "^7.19.6" - "@babel/plugin-transform-modules-commonjs" "^7.19.6" - "@babel/plugin-transform-modules-systemjs" "^7.19.6" - "@babel/plugin-transform-modules-umd" "^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.19.1" - "@babel/plugin-transform-new-target" "^7.18.6" - "@babel/plugin-transform-object-super" "^7.18.6" - "@babel/plugin-transform-parameters" "^7.20.1" - "@babel/plugin-transform-property-literals" "^7.18.6" - "@babel/plugin-transform-regenerator" "^7.18.6" - "@babel/plugin-transform-reserved-words" "^7.18.6" - "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.19.0" - "@babel/plugin-transform-sticky-regex" "^7.18.6" - "@babel/plugin-transform-template-literals" "^7.18.9" - "@babel/plugin-transform-typeof-symbol" "^7.18.9" - "@babel/plugin-transform-unicode-escapes" "^7.18.10" - "@babel/plugin-transform-unicode-regex" "^7.18.6" - "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.20.2" - babel-plugin-polyfill-corejs2 "^0.3.3" - babel-plugin-polyfill-corejs3 "^0.6.0" - babel-plugin-polyfill-regenerator "^0.4.1" - core-js-compat "^3.25.1" - semver "^6.3.0" - -"@babel/preset-modules@^0.1.5": - version "0.1.5" - resolved "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz" - integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== +"@babel/plugin-transform-regexp-modifiers@^7.26.0": + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/plugin-transform-regexp-modifiers/-/plugin-transform-regexp-modifiers-7.26.0.tgz" + integrity sha512-vN6saax7lrA2yA/Pak3sCxuD6F5InBjn9IcrIKQPjpsLvuHYLVroTxjdlVRHjjBWxKOqIwpTXDkOssYT4BFdRw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-transform-reserved-words@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.25.9.tgz" + integrity sha512-7DL7DKYjn5Su++4RXu8puKZm2XBPHyjWLUidaPEkCUBbE7IPcsrkRHggAOOKydH1dASWdcUBxrkOGNxUv5P3Jg== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-transform-shorthand-properties@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.25.9.tgz" + integrity sha512-MUv6t0FhO5qHnS/W8XCbHmiRWOphNufpE1IVxhK5kuN3Td9FT1x4rx4K42s3RYdMXCXpfWkGSbCSd0Z64xA7Ng== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-transform-spread@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.25.9.tgz" + integrity sha512-oNknIB0TbURU5pqJFVbOOFspVlrpVwo2H1+HUIsVDvp5VauGGDP1ZEvO8Nn5xyMEs3dakajOxlmkNW7kNgSm6A== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-skip-transparent-expression-wrappers" "^7.25.9" + +"@babel/plugin-transform-sticky-regex@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.25.9.tgz" + integrity sha512-WqBUSgeVwucYDP9U/xNRQam7xV8W5Zf+6Eo7T2SRVUFlhRiMNFdFz58u0KZmCVVqs2i7SHgpRnAhzRNmKfi2uA== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-transform-template-literals@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.25.9.tgz" + integrity sha512-o97AE4syN71M/lxrCtQByzphAdlYluKPDBzDVzMmfCobUjjhAryZV0AIpRPrxN0eAkxXO6ZLEScmt+PNhj2OTw== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-transform-typeof-symbol@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.25.9.tgz" + integrity sha512-v61XqUMiueJROUv66BVIOi0Fv/CUuZuZMl5NkRoCVxLAnMexZ0A3kMe7vvZ0nulxMuMp0Mk6S5hNh48yki08ZA== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-transform-unicode-escapes@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.25.9.tgz" + integrity sha512-s5EDrE6bW97LtxOcGj1Khcx5AaXwiMmi4toFWRDP9/y0Woo6pXC+iyPu/KuhKtfSrNFd7jJB+/fkOtZy6aIC6Q== + dependencies: + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-transform-unicode-property-regex@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.25.9.tgz" + integrity sha512-Jt2d8Ga+QwRluxRQ307Vlxa6dMrYEMZCgGxoPR8V52rxPyldHu3hdlHspxaqYmE7oID5+kB+UKUB/eWS+DkkWg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-transform-unicode-regex@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.25.9.tgz" + integrity sha512-yoxstj7Rg9dlNn9UQxzk4fcNivwv4nUYz7fYXBaKxvw/lnmPuOm/ikoELygbYq68Bls3D/D+NBPHiLwZdZZ4HA== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/plugin-transform-unicode-sets-regex@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.25.9.tgz" + integrity sha512-8BYqO3GeVNHtx69fdPshN3fnzUNLrWdHhk/icSwigksJGczKSizZ+Z6SBCxTs723Fr5VSNorTIK7a+R2tISvwQ== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + +"@babel/preset-env@^7.26.0": + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.26.0.tgz" + integrity sha512-H84Fxq0CQJNdPFT2DrfnylZ3cf5K43rGfWK4LJGPpjKHiZlk0/RzwEus3PDDZZg+/Er7lCA03MVacueUuXdzfw== + dependencies: + "@babel/compat-data" "^7.26.0" + "@babel/helper-compilation-targets" "^7.25.9" + "@babel/helper-plugin-utils" "^7.25.9" + "@babel/helper-validator-option" "^7.25.9" + "@babel/plugin-bugfix-firefox-class-in-computed-class-key" "^7.25.9" + "@babel/plugin-bugfix-safari-class-field-initializer-scope" "^7.25.9" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.25.9" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.25.9" + "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly" "^7.25.9" + "@babel/plugin-proposal-private-property-in-object" "7.21.0-placeholder-for-preset-env.2" + "@babel/plugin-syntax-import-assertions" "^7.26.0" + "@babel/plugin-syntax-import-attributes" "^7.26.0" + "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" + "@babel/plugin-transform-arrow-functions" "^7.25.9" + "@babel/plugin-transform-async-generator-functions" "^7.25.9" + "@babel/plugin-transform-async-to-generator" "^7.25.9" + "@babel/plugin-transform-block-scoped-functions" "^7.25.9" + "@babel/plugin-transform-block-scoping" "^7.25.9" + "@babel/plugin-transform-class-properties" "^7.25.9" + "@babel/plugin-transform-class-static-block" "^7.26.0" + "@babel/plugin-transform-classes" "^7.25.9" + "@babel/plugin-transform-computed-properties" "^7.25.9" + "@babel/plugin-transform-destructuring" "^7.25.9" + "@babel/plugin-transform-dotall-regex" "^7.25.9" + "@babel/plugin-transform-duplicate-keys" "^7.25.9" + "@babel/plugin-transform-duplicate-named-capturing-groups-regex" "^7.25.9" + "@babel/plugin-transform-dynamic-import" "^7.25.9" + "@babel/plugin-transform-exponentiation-operator" "^7.25.9" + "@babel/plugin-transform-export-namespace-from" "^7.25.9" + "@babel/plugin-transform-for-of" "^7.25.9" + "@babel/plugin-transform-function-name" "^7.25.9" + "@babel/plugin-transform-json-strings" "^7.25.9" + "@babel/plugin-transform-literals" "^7.25.9" + "@babel/plugin-transform-logical-assignment-operators" "^7.25.9" + "@babel/plugin-transform-member-expression-literals" "^7.25.9" + "@babel/plugin-transform-modules-amd" "^7.25.9" + "@babel/plugin-transform-modules-commonjs" "^7.25.9" + "@babel/plugin-transform-modules-systemjs" "^7.25.9" + "@babel/plugin-transform-modules-umd" "^7.25.9" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.25.9" + "@babel/plugin-transform-new-target" "^7.25.9" + "@babel/plugin-transform-nullish-coalescing-operator" "^7.25.9" + "@babel/plugin-transform-numeric-separator" "^7.25.9" + "@babel/plugin-transform-object-rest-spread" "^7.25.9" + "@babel/plugin-transform-object-super" "^7.25.9" + "@babel/plugin-transform-optional-catch-binding" "^7.25.9" + "@babel/plugin-transform-optional-chaining" "^7.25.9" + "@babel/plugin-transform-parameters" "^7.25.9" + "@babel/plugin-transform-private-methods" "^7.25.9" + "@babel/plugin-transform-private-property-in-object" "^7.25.9" + "@babel/plugin-transform-property-literals" "^7.25.9" + "@babel/plugin-transform-regenerator" "^7.25.9" + "@babel/plugin-transform-regexp-modifiers" "^7.26.0" + "@babel/plugin-transform-reserved-words" "^7.25.9" + "@babel/plugin-transform-shorthand-properties" "^7.25.9" + "@babel/plugin-transform-spread" "^7.25.9" + "@babel/plugin-transform-sticky-regex" "^7.25.9" + "@babel/plugin-transform-template-literals" "^7.25.9" + "@babel/plugin-transform-typeof-symbol" "^7.25.9" + "@babel/plugin-transform-unicode-escapes" "^7.25.9" + "@babel/plugin-transform-unicode-property-regex" "^7.25.9" + "@babel/plugin-transform-unicode-regex" "^7.25.9" + "@babel/plugin-transform-unicode-sets-regex" "^7.25.9" + "@babel/preset-modules" "0.1.6-no-external-plugins" + babel-plugin-polyfill-corejs2 "^0.4.10" + babel-plugin-polyfill-corejs3 "^0.10.6" + babel-plugin-polyfill-regenerator "^0.6.1" + core-js-compat "^3.38.1" + semver "^6.3.1" + +"@babel/preset-modules@0.1.6-no-external-plugins": + version "0.1.6-no-external-plugins" + resolved "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz" + integrity sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" "@babel/types" "^7.4.4" esutils "^2.0.2" "@babel/runtime@^7.8.4": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.7.tgz" - integrity sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ== - dependencies: - regenerator-runtime "^0.13.11" - -"@babel/template@^7.18.10", "@babel/template@^7.20.7", "@babel/template@^7.22.15": - version "7.22.15" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz" - integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== - dependencies: - "@babel/code-frame" "^7.22.13" - "@babel/parser" "^7.22.15" - "@babel/types" "^7.22.15" - -"@babel/traverse@^7.20.10", "@babel/traverse@^7.20.12", "@babel/traverse@^7.20.5", "@babel/traverse@^7.20.7": - version "7.23.2" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz" - integrity sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw== - dependencies: - "@babel/code-frame" "^7.22.13" - "@babel/generator" "^7.23.0" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.23.0" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.23.0" - "@babel/types" "^7.23.0" - debug "^4.1.0" + version "7.26.0" + resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.26.0.tgz" + integrity sha512-FDSOghenHTiToteC/QRlv2q3DhPZ/oOXTBoirfWNx1Cx3TMVcGWQtMMmQcSvb/JjpNeGzx8Pq/b4fKEJuWm1sw== + dependencies: + regenerator-runtime "^0.14.0" + +"@babel/template@^7.25.9": + version "7.25.9" + resolved "https://registry.npmjs.org/@babel/template/-/template-7.25.9.tgz" + integrity sha512-9DGttpmPvIxBb/2uwpVo3dqJ+O6RooAFOS+lB+xDqoE2PVCE8nfoHMdZLpfCQRLwvohzXISPZcgxt80xLfsuwg== + dependencies: + "@babel/code-frame" "^7.25.9" + "@babel/parser" "^7.25.9" + "@babel/types" "^7.25.9" + +"@babel/traverse@^7.25.9": + version "7.26.4" + resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.26.4.tgz" + integrity sha512-fH+b7Y4p3yqvApJALCPJcwb0/XaOSgtK4pzV6WVjPR5GLFQBRI7pfoX2V2iM48NXvX07NUxxm1Vw98YjqTcU5w== + dependencies: + "@babel/code-frame" "^7.26.2" + "@babel/generator" "^7.26.3" + "@babel/parser" "^7.26.3" + "@babel/template" "^7.25.9" + "@babel/types" "^7.26.3" + debug "^4.3.1" globals "^11.1.0" -"@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.20.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.20.7", "@babel/types@^7.22.15", "@babel/types@^7.22.5", "@babel/types@^7.23.0", "@babel/types@^7.4.4": - version "7.23.0" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz" - integrity sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg== +"@babel/types@^7.25.9", "@babel/types@^7.26.0", "@babel/types@^7.26.3", "@babel/types@^7.4.4": + version "7.26.3" + resolved "https://registry.npmjs.org/@babel/types/-/types-7.26.3.tgz" + integrity sha512-vN5p+1kl59GVKMvTHt55NzzmYVxprfJD+ql7U9NFIfKCBkYE55LYtS+WtPlaYOyzydrKI8Nezd+aZextrd+FMA== dependencies: - "@babel/helper-string-parser" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.20" - to-fast-properties "^2.0.0" + "@babel/helper-string-parser" "^7.25.9" + "@babel/helper-validator-identifier" "^7.25.9" "@discoveryjs/json-ext@^0.5.0": version "0.5.7" resolved "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@eslint/eslintrc@^1.4.1": - version "1.4.1" - resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.4.1.tgz" - integrity sha512-XXrH9Uarn0stsyldqDYq8r++mROmWRI1xKMXa640Bb//SY1+ECYX6VzT6Lcx5frD0V30XieqJ0oX9I2Xj5aoMA== +"@eslint-community/eslint-utils@^4.2.0": + version "4.4.1" + resolved "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.1.tgz" + integrity sha512-s3O3waFUrMV8P/XaF/+ZTp1X9XBZW1a4B97ZnjQF2KYWaFD2A8KyFBsrsfSjEmjn3RGWAIuvlneuZm3CUK3jbA== + dependencies: + eslint-visitor-keys "^3.4.3" + +"@eslint-community/regexpp@^4.6.1": + version "4.12.1" + resolved "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz" + integrity sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ== + +"@eslint/eslintrc@^2.1.4": + version "2.1.4" + resolved "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz" + integrity sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ== dependencies: ajv "^6.12.4" debug "^4.3.2" - espree "^9.4.0" + espree "^9.6.0" globals "^13.19.0" ignore "^5.2.0" import-fresh "^3.2.1" @@ -951,13 +854,18 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.11.8": - version "0.11.8" - resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz" - integrity sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g== +"@eslint/js@8.57.1": + version "8.57.1" + resolved "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz" + integrity sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q== + +"@humanwhocodes/config-array@^0.13.0": + version "0.13.0" + resolved "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz" + integrity sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw== dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" + "@humanwhocodes/object-schema" "^2.0.3" + debug "^4.3.1" minimatch "^3.0.5" "@humanwhocodes/module-importer@^1.0.1": @@ -965,27 +873,41 @@ resolved "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz" integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" +"@humanwhocodes/object-schema@^2.0.3": + version "2.0.3" + resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz" + integrity sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA== + +"@isaacs/cliui@^8.0.2": + version "8.0.2" + resolved "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz" + integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== + dependencies: + string-width "^5.1.2" + string-width-cjs "npm:string-width@^4.2.0" + strip-ansi "^7.0.1" + strip-ansi-cjs "npm:strip-ansi@^6.0.1" + wrap-ansi "^8.1.0" + wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" + +"@jest/schemas@^29.6.3": + version "29.6.3" + resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-29.6.3.tgz" + integrity sha512-mo5j5X+jIZmJQveBKeS/clAueipV7KgiX1vMgCxam1RNYiqE1w62n0/tJJnHtjW8ZHcQco5gY85jA3mi0L+nSA== + dependencies: + "@sinclair/typebox" "^0.27.8" + +"@jest/types@^29.6.3": + version "29.6.3" + resolved "https://registry.npmjs.org/@jest/types/-/types-29.6.3.tgz" + integrity sha512-u3UPsIilWKOM3F9CXtrG8LEJmNxwoCQC/XVj4IKYXvvpx7QIi/Kg1LI5uDmDpKlac62NUtX7eLjRh+jVZcLOzw== + dependencies: + "@jest/schemas" "^29.6.3" + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^17.0.8" + chalk "^4.0.0" "@jridgewell/gen-mapping@^0.3.5": version "0.3.5" @@ -997,11 +919,11 @@ "@jridgewell/trace-mapping" "^0.3.24" "@jridgewell/resolve-uri@^3.1.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + version "3.1.2" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1", "@jridgewell/set-array@^1.2.1": +"@jridgewell/set-array@^1.2.1": version "1.2.1" resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz" integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== @@ -1015,11 +937,11 @@ "@jridgewell/trace-mapping" "^0.3.25" "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.14" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + version "1.5.0" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz" + integrity sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ== -"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25", "@jridgewell/trace-mapping@^0.3.8", "@jridgewell/trace-mapping@^0.3.9": +"@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": version "0.3.25" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== @@ -1060,6 +982,11 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" +"@sinclair/typebox@^0.27.8": + version "0.27.8" + resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz" + integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== + "@types/eslint-scope@^3.7.7": version "3.7.7" resolved "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz" @@ -1068,10 +995,10 @@ "@types/eslint" "*" "@types/estree" "*" -"@types/eslint@*", "@types/eslint@^7.29.0 || ^8.4.1": - version "8.4.10" - resolved "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.10.tgz" - integrity sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw== +"@types/eslint@*", "@types/eslint@^8.56.10": + version "8.56.12" + resolved "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.12.tgz" + integrity sha512-03ruubjWyOHlmljCVoxSuNDdmfZDzsrrz0P2LeJsOXr+ZwFQ+0yQIwNCwt/GYhV7Z31fgtXJTAEs+FYlEL851g== dependencies: "@types/estree" "*" "@types/json-schema" "*" @@ -1081,21 +1008,59 @@ resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz" integrity sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw== +"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": + version "2.0.6" + resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz" + integrity sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w== + +"@types/istanbul-lib-report@*": + version "3.0.3" + resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz" + integrity sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA== + dependencies: + "@types/istanbul-lib-coverage" "*" + +"@types/istanbul-reports@^3.0.0": + version "3.0.4" + resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz" + integrity sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ== + dependencies: + "@types/istanbul-lib-report" "*" + "@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + version "7.0.15" + resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" + integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== "@types/node@*": - version "18.11.18" - resolved "https://registry.npmjs.org/@types/node/-/node-18.11.18.tgz" - integrity sha512-DHQpWGjyQKSHj3ebjFI/wRKcqQcdR+MoFBygntYOZytCqNfkd2ZC4ARDJ2DQqhjH5p85Nnd3jhUJIXrszFX/JA== + version "22.10.1" + resolved "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz" + integrity sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ== + dependencies: + undici-types "~6.20.0" "@types/raf@^3.4.0": version "3.4.3" resolved "https://registry.npmjs.org/@types/raf/-/raf-3.4.3.tgz" integrity sha512-c4YAvMedbPZ5tEyxzQdMoOhhJ4RD3rngZIdwC2/qDN3d7JpEhB6fiBRKVY1lg5B7Wk+uPBjn5f39j1/2MY1oOw== +"@types/yargs-parser@*": + version "21.0.3" + resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz" + integrity sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ== + +"@types/yargs@^17.0.8": + version "17.0.33" + resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz" + integrity sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA== + dependencies: + "@types/yargs-parser" "*" + +"@ungap/structured-clone@^1.2.0": + version "1.2.1" + resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.1.tgz" + integrity sha512-fEzPV3hSkSMltkw152tJKNARhOupqbH96MZWyRjNaYZOMIzbrTeQDG+MTc6Mr2pgzFQzFxAfmhGDNP5QK++2ZA== + "@webassemblyjs/ast@^1.14.1", "@webassemblyjs/ast@1.14.1": version "1.14.1" resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz" @@ -1217,20 +1182,20 @@ "@webassemblyjs/ast" "1.14.1" "@xtuc/long" "4.2.2" -"@webpack-cli/configtest@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz" - integrity sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A== +"@webpack-cli/configtest@^2.1.1": + version "2.1.1" + resolved "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz" + integrity sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw== -"@webpack-cli/info@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz" - integrity sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA== +"@webpack-cli/info@^2.0.2": + version "2.0.2" + resolved "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz" + integrity sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A== -"@webpack-cli/serve@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz" - integrity sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw== +"@webpack-cli/serve@^2.0.5": + version "2.0.5" + resolved "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz" + integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== "@xtuc/ieee754@^1.2.0": version "1.2.0" @@ -1247,7 +1212,7 @@ acorn-jsx@^5.3.2: resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.14.0, acorn@^8.8.0, acorn@^8.8.2: +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8.14.0, acorn@^8.8.2, acorn@^8.9.0: version "8.14.0" resolved "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz" integrity sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA== @@ -1264,14 +1229,14 @@ ajv-keywords@^3.5.2: resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv-keywords@^5.0.0: +ajv-keywords@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz" integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== dependencies: fast-deep-equal "^3.1.3" -ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: +ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1282,50 +1247,46 @@ ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.9.1: uri-js "^4.2.2" ajv@^8.0.0: - version "8.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== + version "8.17.1" + resolved "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== dependencies: - fast-deep-equal "^3.1.1" + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.2.2" -ajv@^8.8.0, ajv@^8.8.2: - version "8.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== +ajv@^8.8.2, ajv@^8.9.0: + version "8.17.1" + resolved "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz" + integrity sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g== dependencies: - fast-deep-equal "^3.1.1" + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" - uri-js "^4.2.2" ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" +ansi-regex@^6.0.1: + version "6.1.0" + resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz" + integrity sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA== -ansi-styles@^4.0.0: +ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" -ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" +ansi-styles@^6.1.0: + version "6.2.1" + resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz" + integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== anymatch@~3.1.2: version "3.1.3" @@ -1340,12 +1301,12 @@ argparse@^2.0.1: resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== -babel-loader@^9.1.2: - version "9.1.2" - resolved "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.2.tgz" - integrity sha512-mN14niXW43tddohGl8HPu5yfQq70iUThvFL/4QzESA7GcZoC0eVOhvWdQ8+3UlSjaDE9MVtsW9mxDY07W7VpVA== +babel-loader@^9.2.1: + version "9.2.1" + resolved "https://registry.npmjs.org/babel-loader/-/babel-loader-9.2.1.tgz" + integrity sha512-fqe8naHt46e0yIdkjUZYqddSXfej3AHajX+CSO5X7oy0EmPc6o5Xh+RClNoHjnieWz9AW4kZxW9yyFMhVB1QLA== dependencies: - find-cache-dir "^3.3.2" + find-cache-dir "^4.0.0" schema-utils "^4.0.0" babel-plugin-add-module-exports@^1.0.4: @@ -1353,29 +1314,29 @@ babel-plugin-add-module-exports@^1.0.4: resolved "https://registry.npmjs.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-1.0.4.tgz" integrity sha512-g+8yxHUZ60RcyaUpfNzy56OtWW+x9cyEe9j+CranqLiqbju2yf/Cy6ZtYK40EZxtrdHllzlVZgLmcOUCTlJ7Jg== -babel-plugin-polyfill-corejs2@^0.3.3: - version "0.3.3" - resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz" - integrity sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q== +babel-plugin-polyfill-corejs2@^0.4.10: + version "0.4.12" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.12.tgz" + integrity sha512-CPWT6BwvhrTO2d8QVorhTCQw9Y43zOu7G9HigcfxvepOU6b8o3tcWad6oVgZIsZCTt42FFv97aA7ZJsbM4+8og== dependencies: - "@babel/compat-data" "^7.17.7" - "@babel/helper-define-polyfill-provider" "^0.3.3" - semver "^6.1.1" + "@babel/compat-data" "^7.22.6" + "@babel/helper-define-polyfill-provider" "^0.6.3" + semver "^6.3.1" -babel-plugin-polyfill-corejs3@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz" - integrity sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA== +babel-plugin-polyfill-corejs3@^0.10.6: + version "0.10.6" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.10.6.tgz" + integrity sha512-b37+KR2i/khY5sKmWNVQAnitvquQbNdWy6lJdsr0kmquCKEEUgMKK4SboVM3HtfnZilfjr4MMQ7vY58FVWDtIA== dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - core-js-compat "^3.25.1" + "@babel/helper-define-polyfill-provider" "^0.6.2" + core-js-compat "^3.38.0" -babel-plugin-polyfill-regenerator@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz" - integrity sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw== +babel-plugin-polyfill-regenerator@^0.6.1: + version "0.6.3" + resolved "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.6.3.tgz" + integrity sha512-LiWSbl4CRSIa5x/JAU6jZiG9eit9w6mz+yVMFwDE83LAWvt0AfGBoZ7HS/mkhrKuh2ZlzfVZYKoLjXdqw6Yt7Q== dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" + "@babel/helper-define-polyfill-provider" "^0.6.3" babel-preset-modern-browsers@^15.0.2: version "15.0.2" @@ -1386,14 +1347,14 @@ babel-preset-modern-browsers@^15.0.2: "@babel/plugin-transform-modules-commonjs" "^7.10.4" balanced-match@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz" - integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c=sha512-9Y0g0Q8rmSt+H33DfKv7FOc3v+iRI+o1lbzt8jGcIosYW37IIW/2XVYq5NPdmaD5NQ59Nk26Kl/vZbwW9Fr8vg== sha512-9Y0g0Q8rmSt+H33DfKv7FOc3v+iRI+o1lbzt8jGcIosYW37IIW/2XVYq5NPdmaD5NQ59Nk26Kl/vZbwW9Fr8vg== + version "1.0.2" + resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + version "2.3.0" + resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz" + integrity sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw== brace-expansion@^1.1.7: version "1.1.11" @@ -1417,7 +1378,7 @@ braces@^3.0.3, braces@~3.0.2: dependencies: fill-range "^7.1.1" -browserslist@^4.21.3, browserslist@^4.21.4, browserslist@^4.24.0, "browserslist@>= 4.21.0": +browserslist@^4.24.0, browserslist@^4.24.2, "browserslist@>= 4.21.0": version "4.24.2" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.24.2.tgz" integrity sha512-ZIc+Q62revdMcqC6aChtW4jz3My3klmCO1fEmINZY/8J3EpBg5/A/D0AKmBveUh6pgoeycoMkVMko84tuYS+Gg== @@ -1453,15 +1414,6 @@ canvg@^4.0.1: stackblur-canvas "^2.0.0" svg-pathdata "^6.0.3" -chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - chalk@^4.0.0: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" @@ -1470,10 +1422,10 @@ chalk@^4.0.0: ansi-styles "^4.1.0" supports-color "^7.1.0" -chokidar@^3.4.0: - version "3.5.3" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== +chokidar@^3.6.0: + version "3.6.0" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz" + integrity sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw== dependencies: anymatch "~3.1.2" braces "~3.0.2" @@ -1486,9 +1438,14 @@ chokidar@^3.4.0: fsevents "~2.3.2" chrome-trace-event@^1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz" - integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== + version "1.0.4" + resolved "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.4.tgz" + integrity sha512-rNjApaLzuwaOTjCiT8lSDdGN1APCiqkChLMJxJPWLunPAt5fy8xgU9/jNOchV84wfIxrA0lRQB7oCT8jrn/wrQ== + +ci-info@^3.2.0: + version "3.9.0" + resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz" + integrity sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ== cliui@^8.0.1: version "8.0.1" @@ -1508,13 +1465,6 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - color-convert@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" @@ -1527,56 +1477,49 @@ color-name@~1.1.4: resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - colorette@^2.0.14: - version "2.0.19" - resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== + version "2.0.20" + resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz" + integrity sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w== + +commander@^10.0.1: + version "10.0.1" + resolved "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz" + integrity sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug== commander@^2.20.0: version "2.20.3" resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^4.0.1: - version "4.1.1" - resolved "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz" - integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== - -commander@^9.4.1: - version "9.4.1" - resolved "https://registry.npmjs.org/commander/-/commander-9.4.1.tgz" - integrity sha512-5EEkTNyHNGFPD2H+c/dXXfQZYa/scCKasxWcXJaWnNJ99pnQN9Vnmqow+p+PlFPE63Q6mThaZws1T+HxfpgtPw== +commander@^6.2.0: + version "6.2.1" + resolved "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz" + integrity sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA== -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== +common-path-prefix@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/common-path-prefix/-/common-path-prefix-3.0.0.tgz" + integrity sha512-QE33hToZseCH3jS0qN96O/bSh3kaw/h+Tq7ngyY9eWDUnTlTNUyqfqvCXioLe5Na5jFsL78ra/wuBU4iuEgd4w== concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== + integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== -convert-source-map@^1.1.0, convert-source-map@^1.7.0: - version "1.7.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" +convert-source-map@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz" + integrity sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg== -core-js-compat@^3.25.1: - version "3.27.1" - resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.27.1.tgz" - integrity sha512-Dg91JFeCDA17FKnneN7oCMz4BkQ4TcffkgHP4OWwp9yx3pi7ubqMDXXSacfNak1PQqjc95skyt+YBLHQJnkJwA== +core-js-compat@^3.38.0, core-js-compat@^3.38.1: + version "3.39.0" + resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.39.0.tgz" + integrity sha512-VgEUx3VwlExr5no0tXlBt+silBvhTryPwCXRI2Id1PN8WTKu7MreethvddqOubrYxkFdv/RnYrqlv1sFNAUelw== dependencies: - browserslist "^4.21.4" + browserslist "^4.24.2" -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.6" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz" integrity sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA== @@ -1585,31 +1528,31 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -css-loader@^6.7.3: - version "6.7.3" - resolved "https://registry.npmjs.org/css-loader/-/css-loader-6.7.3.tgz" - integrity sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ== +css-loader@^7.1.2: + version "7.1.2" + resolved "https://registry.npmjs.org/css-loader/-/css-loader-7.1.2.tgz" + integrity sha512-6WvYYn7l/XEGN8Xu2vWFt9nVzrCn39vKyTEFf/ExEyoksJjjSZV/0/35XPlMbpnr6VGhZIUg5yJrL8tGfes/FA== dependencies: icss-utils "^5.1.0" - postcss "^8.4.19" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.0" - postcss-modules-scope "^3.0.0" + postcss "^8.4.33" + postcss-modules-extract-imports "^3.1.0" + postcss-modules-local-by-default "^4.0.5" + postcss-modules-scope "^3.2.0" postcss-modules-values "^4.0.0" postcss-value-parser "^4.2.0" - semver "^7.3.8" + semver "^7.5.4" cssesc@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== -debug@^4.1.0, debug@^4.1.1, debug@^4.3.2: - version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== +debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: + version "4.4.0" + resolved "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz" + integrity sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA== dependencies: - ms "2.1.2" + ms "^2.1.3" deep-is@^0.1.3: version "0.1.4" @@ -1623,6 +1566,11 @@ doctrine@^3.0.0: dependencies: esutils "^2.0.2" +eastasianwidth@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz" + integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== + electron-to-chromium@^1.5.41: version "1.5.72" resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.72.tgz" @@ -1633,6 +1581,11 @@ emoji-regex@^8.0.0: resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== +emoji-regex@^9.2.2: + version "9.2.2" + resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz" + integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== + enhanced-resolve@^5.17.1: version "5.17.1" resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz" @@ -1642,34 +1595,29 @@ enhanced-resolve@^5.17.1: tapable "^2.2.0" envinfo@^7.7.3: - version "7.8.1" - resolved "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz" - integrity sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw== + version "7.14.0" + resolved "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz" + integrity sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg== es-module-lexer@^1.2.1: - version "1.3.1" - resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.3.1.tgz" - integrity sha512-JUFAyicQV9mXc3YRxPnDlrfBKpqt6hUYzz9/boprUJHs4e4KVr3XwOF70doO6gwXUor6EWZJAyWAfKki84t20Q== + version "1.5.4" + resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.4.tgz" + integrity sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw== escalade@^3.1.1, escalade@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz" integrity sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA== -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== -eslint-scope@^7.1.1: - version "7.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz" - integrity sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" estraverse "^5.2.0" @@ -1682,97 +1630,89 @@ eslint-scope@5.1.1: esrecurse "^4.3.0" estraverse "^4.1.1" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" - integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== - eslint-visitor-keys@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint-visitor-keys@^3.3.0: - version "3.3.0" - resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz" - integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== +eslint-visitor-keys@^3.4.1: + version "3.4.3" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint-webpack-plugin@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-3.2.0.tgz" - integrity sha512-avrKcGncpPbPSUHX6B3stNGzkKFto3eL+DKM4+VyMrVnhPc3vRczVlCq3uhuFOdRvDHTVXuzwk1ZKUrqDQHQ9w== +eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint-webpack-plugin@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/eslint-webpack-plugin/-/eslint-webpack-plugin-4.2.0.tgz" + integrity sha512-rsfpFQ01AWQbqtjgPRr2usVRxhWDuG0YDYcG8DJOteD3EFnpeuYuOwk0PQiN7PRBTqS6ElNdtPZPggj8If9WnA== dependencies: - "@types/eslint" "^7.29.0 || ^8.4.1" - jest-worker "^28.0.2" + "@types/eslint" "^8.56.10" + jest-worker "^29.7.0" micromatch "^4.0.5" normalize-path "^3.0.0" - schema-utils "^4.0.0" - -"eslint@^7.0.0 || ^8.0.0", "eslint@^7.5.0 || ^8.0.0", eslint@>=5: - version "8.33.0" - resolved "https://registry.npmjs.org/eslint/-/eslint-8.33.0.tgz" - integrity sha512-WjOpFQgKK8VrCnAtl8We0SUOy/oVZ5NHykyMiagV1M9r8IFpIJX7DduK6n1mpfhlG7T1NLWm2SuD8QB7KFySaA== - dependencies: - "@eslint/eslintrc" "^1.4.1" - "@humanwhocodes/config-array" "^0.11.8" + schema-utils "^4.2.0" + +"eslint@^6.0.0 || ^7.0.0 || >=8.0.0", "eslint@^7.5.0 || ^8.0.0 || ^9.0.0", "eslint@^8.0.0 || ^9.0.0": + version "8.57.1" + resolved "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz" + integrity sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.4" + "@eslint/js" "8.57.1" + "@humanwhocodes/config-array" "^0.13.0" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" + "@ungap/structured-clone" "^1.2.0" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" debug "^4.3.2" doctrine "^3.0.0" escape-string-regexp "^4.0.0" - eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" - esquery "^1.4.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" find-up "^5.0.0" glob-parent "^6.0.2" globals "^13.19.0" - grapheme-splitter "^1.0.4" + graphemer "^1.4.0" ignore "^5.2.0" - import-fresh "^3.0.0" imurmurhash "^0.1.4" is-glob "^4.0.0" is-path-inside "^3.0.3" - js-sdsl "^4.1.4" js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" - regexpp "^3.2.0" + optionator "^0.9.3" strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.4.0: - version "9.4.1" - resolved "https://registry.npmjs.org/espree/-/espree-9.4.1.tgz" - integrity sha512-XwctdmTO6SIvCzd9810yyNzIrOrqNYV9Koizx4C/mRhf9uq0o4yHoCEU/670pOxOL/MSraektvSAji79kX90Vg== +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: - acorn "^8.8.0" + acorn "^8.9.0" acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.3.0" + eslint-visitor-keys "^3.4.1" -esquery@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz" - integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== +esquery@^1.4.2: + version "1.6.0" + resolved "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz" + integrity sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg== dependencies: estraverse "^5.1.0" @@ -1823,15 +1763,20 @@ fast-levenshtein@^2.0.6: resolved "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz" integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== +fast-uri@^3.0.1: + version "3.0.3" + resolved "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz" + integrity sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw== + fastest-levenshtein@^1.0.12: version "1.0.16" resolved "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz" integrity sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg== fastq@^1.6.0: - version "1.15.0" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz" - integrity sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw== + version "1.17.1" + resolved "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz" + integrity sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w== dependencies: reusify "^1.0.4" @@ -1849,14 +1794,13 @@ fill-range@^7.1.1: dependencies: to-regex-range "^5.0.1" -find-cache-dir@^3.3.2: - version "3.3.2" - resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== +find-cache-dir@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-4.0.0.tgz" + integrity sha512-9ZonPT4ZAK4a+1pUPVPZJapbi7O5qbbJPdYw/NOQWZZbVLdDTYM3A4R9z/DpAM08IDaFGsvPgiGZ82WEwUDWjg== dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" + common-path-prefix "^3.0.0" + pkg-dir "^7.0.0" find-up@^4.0.0: version "4.1.0" @@ -1874,18 +1818,40 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +find-up@^6.3.0: + version "6.3.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-6.3.0.tgz" + integrity sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw== + dependencies: + locate-path "^7.1.0" + path-exists "^5.0.0" + flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + version "3.2.0" + resolved "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz" + integrity sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw== dependencies: - flatted "^3.1.0" + flatted "^3.2.9" + keyv "^4.5.3" rimraf "^3.0.2" -flatted@^3.1.0: - version "3.2.7" - resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.7.tgz" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^3.2.9: + version "3.3.2" + resolved "https://registry.npmjs.org/flatted/-/flatted-3.3.2.tgz" + integrity sha512-AiwGJM8YcNOaobumgtng+6NHuOqC3A7MixFeDafM3X9cIUM+xUXoS5Vfgf+OihAYe20fxqNM9yPBXJzRtZ/4eA== + +foreground-child@^3.1.0: + version "3.3.0" + resolved "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz" + integrity sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" fs-readdir-recursive@^1.1.0: version "1.1.0" @@ -1897,10 +1863,10 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function-bind@^1.1.2: + version "1.1.2" + resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" + integrity sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA== gensync@^1.0.0-beta.2: version "1.0.0-beta.2" @@ -1931,6 +1897,18 @@ glob-to-regexp@^0.4.1: resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== +glob@^11.0.0: + version "11.0.0" + resolved "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz" + integrity sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g== + dependencies: + foreground-child "^3.1.0" + jackspeak "^4.0.1" + minimatch "^10.0.0" + minipass "^7.1.2" + package-json-from-dist "^1.0.0" + path-scurry "^2.0.0" + glob@^7.1.3: version "7.2.3" resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" @@ -1955,55 +1933,39 @@ glob@^7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^8.0.3: - version "8.0.3" - resolved "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz" - integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - globals@^11.1.0: version "11.12.0" resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globals@^13.19.0: - version "13.20.0" - resolved "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== + version "13.24.0" + resolved "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz" + integrity sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ== dependencies: type-fest "^0.20.2" -graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4: +graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.11" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== has-flag@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== -has@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== +hasown@^2.0.2: + version "2.0.2" + resolved "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz" + integrity sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ== dependencies: - function-bind "^1.1.1" + function-bind "^1.1.2" icss-utils@^5.0.0, icss-utils@^5.1.0: version "5.1.0" @@ -2011,11 +1973,11 @@ icss-utils@^5.0.0, icss-utils@^5.1.0: integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== ignore@^5.2.0: - version "5.2.4" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== + version "5.3.2" + resolved "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz" + integrity sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g== -import-fresh@^3.0.0, import-fresh@^3.2.1: +import-fresh@^3.2.1: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== @@ -2024,9 +1986,9 @@ import-fresh@^3.0.0, import-fresh@^3.2.1: resolve-from "^4.0.0" import-local@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz" - integrity sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg== + version "3.2.0" + resolved "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz" + integrity sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA== dependencies: pkg-dir "^4.2.0" resolve-cwd "^3.0.0" @@ -2061,12 +2023,12 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== +is-core-module@^2.13.0: + version "2.15.1" + resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz" + integrity sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ== dependencies: - has "^1.0.3" + hasown "^2.0.2" is-extglob@^2.1.1: version "2.1.1" @@ -2112,6 +2074,25 @@ isobject@^3.0.1: resolved "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== +jackspeak@^4.0.1: + version "4.0.2" + resolved "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.2.tgz" + integrity sha512-bZsjR/iRjl1Nk1UkjGpAzLNfQtzuijhn2g+pbZb98HQ1Gk8vM9hfbxeMBP+M2/UUdwj0RqGG3mlvk2MsAqwvEw== + dependencies: + "@isaacs/cliui" "^8.0.2" + +jest-util@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-util/-/jest-util-29.7.0.tgz" + integrity sha512-z6EbKajIpqGKU56y5KBUgy1dt1ihhQJgWzUlZHArA/+X2ad7Cb5iF+AK1EWVL/Bo7Rz9uurpqw6SiBCefUbCGA== + dependencies: + "@jest/types" "^29.6.3" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + jest-worker@^27.4.5: version "27.5.1" resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz" @@ -2121,20 +2102,16 @@ jest-worker@^27.4.5: merge-stream "^2.0.0" supports-color "^8.0.0" -jest-worker@^28.0.2: - version "28.1.3" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-28.1.3.tgz" - integrity sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g== +jest-worker@^29.7.0: + version "29.7.0" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-29.7.0.tgz" + integrity sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw== dependencies: "@types/node" "*" + jest-util "^29.7.0" merge-stream "^2.0.0" supports-color "^8.0.0" -js-sdsl@^4.1.4: - version "4.3.0" - resolved "https://registry.npmjs.org/js-sdsl/-/js-sdsl-4.3.0.tgz" - integrity sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ== - js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" @@ -2147,15 +2124,15 @@ js-yaml@^4.1.0: dependencies: argparse "^2.0.1" -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +jsesc@^3.0.2, jsesc@~3.0.2: + version "3.0.2" + resolved "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz" + integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g== -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" - integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== +json-buffer@3.0.1: + version "3.0.1" + resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz" + integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ== json-parse-even-better-errors@^2.3.1: version "2.3.1" @@ -2177,11 +2154,18 @@ json-stable-stringify-without-jsonify@^1.0.1: resolved "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz" integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== -json5@^2.2.2: +json5@^2.2.3: version "2.2.3" resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +keyv@^4.5.3: + version "4.5.4" + resolved "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz" + integrity sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw== + dependencies: + json-buffer "3.0.1" + kind-of@^6.0.2: version "6.0.3" resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" @@ -2214,6 +2198,13 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" +locate-path@^7.1.0: + version "7.2.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-7.2.0.tgz" + integrity sha512-gvVijfZvn7R+2qyPX8mAuKcFGDf6Nc61GdvGafQsHL0sBIxfKzA+usWn4GFC/bk+QdwPUD4kWFJLhElipq+0VA== + dependencies: + p-locate "^6.0.0" + lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz" @@ -2224,6 +2215,11 @@ lodash.merge@^4.6.2: resolved "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lru-cache@^11.0.0: + version "11.0.2" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.2.tgz" + integrity sha512-123qHRfJBmo2jXDbo/a5YOQrJoHF/GNQTLzQ5+IdK5pWpceK17yRc6ozlWd25FxvGKQbIUs91fDFkXmDHTKcyA== + lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" @@ -2231,13 +2227,6 @@ lru-cache@^5.1.1: dependencies: yallist "^3.0.2" -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - make-dir@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz" @@ -2246,13 +2235,6 @@ make-dir@^2.1.0: pify "^4.0.1" semver "^5.6.0" -make-dir@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" @@ -2278,6 +2260,13 @@ mime-types@^2.1.27: dependencies: mime-db "1.52.0" +minimatch@^10.0.0: + version "10.0.1" + resolved "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz" + integrity sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ== + dependencies: + brace-expansion "^2.0.1" + minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" @@ -2285,22 +2274,20 @@ minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" -minimatch@^5.0.1: - version "5.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.2.tgz" - integrity sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg== - dependencies: - brace-expansion "^2.0.1" +minipass@^7.1.2: + version "7.1.2" + resolved "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz" + integrity sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw== -ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== +ms@^2.1.3: + version "2.1.3" + resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -nanoid@^3.3.6: - version "3.3.6" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== +nanoid@^3.3.7: + version "3.3.8" + resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.8.tgz" + integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w== natural-compare@^1.4.0: version "1.4.0" @@ -2329,17 +2316,17 @@ once@^1.3.0: dependencies: wrappy "1" -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== +optionator@^0.9.3: + version "0.9.4" + resolved "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz" + integrity sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g== dependencies: deep-is "^0.1.3" fast-levenshtein "^2.0.6" levn "^0.4.1" prelude-ls "^1.2.1" type-check "^0.4.0" - word-wrap "^1.2.3" + word-wrap "^1.2.5" p-limit@^2.2.0: version "2.3.0" @@ -2355,6 +2342,13 @@ p-limit@^3.0.2: dependencies: yocto-queue "^0.1.0" +p-limit@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/p-limit/-/p-limit-4.0.0.tgz" + integrity sha512-5b0R4txpzjPWVw/cXXUResoD4hb6U/x9BH08L7nw+GN1sezDzPdxeRvpc9c433fZhBan/wusjbCsqwqm4EIBIQ== + dependencies: + yocto-queue "^1.0.0" + p-locate@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" @@ -2369,11 +2363,23 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" +p-locate@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-6.0.0.tgz" + integrity sha512-wPrq66Llhl7/4AGC6I+cqxT07LhXvWL08LNXz1fENOw0Ap4sRZZ/gZpTTJ5jpurzzzfS2W/Ge9BY3LgLjCShcw== + dependencies: + p-limit "^4.0.0" + p-try@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== +package-json-from-dist@^1.0.0: + version "1.0.1" + resolved "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz" + integrity sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw== + parent-module@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" @@ -2386,10 +2392,15 @@ path-exists@^4.0.0: resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== +path-exists@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/path-exists/-/path-exists-5.0.0.tgz" + integrity sha512-RjhtfwJOxzcFmNOi6ltcbcu4Iu+FL3zEj83dk4kAS+fVpTxXLO1b38RvJgT/0QwvV/L3aY9TAnyv0EOqW4GoMQ== + path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18=sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== + integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== path-key@^3.1.0: version "3.1.1" @@ -2401,17 +2412,25 @@ path-parse@^1.0.7: resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +path-scurry@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz" + integrity sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg== + dependencies: + lru-cache "^11.0.0" + minipass "^7.1.2" + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz" integrity sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow== -picocolors@^1.0.0, picocolors@^1.1.0: +picocolors@^1.0.0, picocolors@^1.1.0, picocolors@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz" integrity sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA== -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3, picomatch@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== @@ -2421,33 +2440,40 @@ pify@^4.0.1: resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== -pkg-dir@^4.1.0, pkg-dir@^4.2.0: +pkg-dir@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: find-up "^4.0.0" -postcss-modules-extract-imports@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz" - integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== +pkg-dir@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-7.0.0.tgz" + integrity sha512-Ie9z/WINcxxLp27BKOCHGde4ITq9UklYKDzVo1nhk5sqGEXU3FpkwP5GM2voTGJkGd9B3Otl+Q4uwSOeSUtOBA== + dependencies: + find-up "^6.3.0" -postcss-modules-local-by-default@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz" - integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== +postcss-modules-extract-imports@^3.1.0: + version "3.1.0" + resolved "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.1.0.tgz" + integrity sha512-k3kNe0aNFQDAZGbin48pL2VNidTF0w4/eASDsxlyspobzU3wZQLOGj7L9gfRe0Jo9/4uud09DsjFNH7winGv8Q== + +postcss-modules-local-by-default@^4.0.5: + version "4.1.0" + resolved "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.1.0.tgz" + integrity sha512-rm0bdSv4jC3BDma3s9H19ZddW0aHX6EoqwDYU2IfZhRN+53QrufTRo2IdkAbRqLx4R2IYbZnbjKKxg4VN5oU9Q== dependencies: icss-utils "^5.0.0" - postcss-selector-parser "^6.0.2" + postcss-selector-parser "^7.0.0" postcss-value-parser "^4.1.0" -postcss-modules-scope@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz" - integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== +postcss-modules-scope@^3.2.0: + version "3.2.1" + resolved "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.2.1.tgz" + integrity sha512-m9jZstCVaqGjTAuny8MdgE88scJnCiQSlSrOWcTQgM2t32UBe+MUmFSO5t7VMSfAf/FJKImAxBav8ooCHJXCJA== dependencies: - postcss-selector-parser "^6.0.4" + postcss-selector-parser "^7.0.0" postcss-modules-values@^4.0.0: version "4.0.0" @@ -2456,10 +2482,10 @@ postcss-modules-values@^4.0.0: dependencies: icss-utils "^5.0.0" -postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: - version "6.0.11" - resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz" - integrity sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g== +postcss-selector-parser@^7.0.0: + version "7.0.0" + resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-7.0.0.tgz" + integrity sha512-9RbEr1Y7FFfptd/1eEdntyjMwLeghW1bHX9GWjXo19vx4ytPQhANltvVxDggzJl7mnWM+dX28kb6cyS/4iQjlQ== dependencies: cssesc "^3.0.0" util-deprecate "^1.0.2" @@ -2469,14 +2495,14 @@ postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== -postcss@^8.1.0, postcss@^8.4.19: - version "8.4.31" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz" - integrity sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ== +postcss@^8.1.0, postcss@^8.4.33: + version "8.4.49" + resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz" + integrity sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA== dependencies: - nanoid "^3.3.6" - picocolors "^1.0.0" - source-map-js "^1.0.2" + nanoid "^3.3.7" + picocolors "^1.1.1" + source-map-js "^1.2.1" prelude-ls@^1.2.1: version "1.2.1" @@ -2484,9 +2510,9 @@ prelude-ls@^1.2.1: integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + version "2.3.1" + resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz" + integrity sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg== queue-microtask@^1.2.2: version "1.2.3" @@ -2510,7 +2536,7 @@ randombytes@^2.1.0: raw-loader@~0.5.1: version "0.5.1" resolved "https://registry.npmjs.org/raw-loader/-/raw-loader-0.5.1.tgz" - integrity sha1-DD0L6u2KAclm2Xh793goElKpeao=sha512-sf7oGoLuaYAScB4VGr0tzetsYlS8EJH6qnTCfQ/WVEa89hALQ4RQfCKt5xCyPQKPDUbVUAIP1QsxAwfAjlDp7Q== sha512-sf7oGoLuaYAScB4VGr0tzetsYlS8EJH6qnTCfQ/WVEa89hALQ4RQfCKt5xCyPQKPDUbVUAIP1QsxAwfAjlDp7Q== + integrity sha512-sf7oGoLuaYAScB4VGr0tzetsYlS8EJH6qnTCfQ/WVEa89hALQ4RQfCKt5xCyPQKPDUbVUAIP1QsxAwfAjlDp7Q== readdirp@~3.6.0: version "3.6.0" @@ -2526,10 +2552,10 @@ rechoir@^0.8.0: dependencies: resolve "^1.20.0" -regenerate-unicode-properties@^10.1.0: - version "10.1.0" - resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz" - integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ== +regenerate-unicode-properties@^10.2.0: + version "10.2.0" + resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.2.0.tgz" + integrity sha512-DqHn3DwbmmPVzeKj9woBadqmXxLvQoQIwu7nopMc72ztvxVmVk2SBhSnx67zuye5TP+lJsb/TBQsjLKhnDf3MA== dependencies: regenerate "^1.4.2" @@ -2538,46 +2564,41 @@ regenerate@^1.4.2: resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== -regenerator-runtime@^0.13.11: - version "0.13.11" - resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== +regenerator-runtime@^0.14.0: + version "0.14.1" + resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz" + integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw== -regenerator-transform@^0.15.1: - version "0.15.1" - resolved "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz" - integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== +regenerator-transform@^0.15.2: + version "0.15.2" + resolved "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz" + integrity sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg== dependencies: "@babel/runtime" "^7.8.4" -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - -regexpu-core@^5.2.1: - version "5.2.2" - resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.2.2.tgz" - integrity sha512-T0+1Zp2wjF/juXMrMxHxidqGYn8U4R+zleSJhX9tQ1PUsS8a9UtYfbsF9LdiVgNX3kiX8RNaKM42nfSgvFJjmw== +regexpu-core@^6.2.0: + version "6.2.0" + resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-6.2.0.tgz" + integrity sha512-H66BPQMrv+V16t8xtmq+UC0CBpiTBA60V8ibS1QVReIp8T1z8hwFxqcGzm9K6lgsN7sB5edVH8a+ze6Fqm4weA== dependencies: regenerate "^1.4.2" - regenerate-unicode-properties "^10.1.0" - regjsgen "^0.7.1" - regjsparser "^0.9.1" + regenerate-unicode-properties "^10.2.0" + regjsgen "^0.8.0" + regjsparser "^0.12.0" unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.1.0" -regjsgen@^0.7.1: - version "0.7.1" - resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.7.1.tgz" - integrity sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA== +regjsgen@^0.8.0: + version "0.8.0" + resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.8.0.tgz" + integrity sha512-RvwtGe3d7LvWiDQXeQw8p5asZUmfU1G/l6WbUXeHta7Y2PEIvBTwH6E2EfmYUK8pxcxEdEmaomqyp0vZZ7C+3Q== -regjsparser@^0.9.1: - version "0.9.1" - resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz" - integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== +regjsparser@^0.12.0: + version "0.12.0" + resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.12.0.tgz" + integrity sha512-cnE+y8bz4NhMjISKbgeVJtqNbtf5QpjZP+Bslo+UqkIt9QPnX9q095eiRRASJG1/tz6dlNr6Z5NsBiWYokp6EQ== dependencies: - jsesc "~0.5.0" + jsesc "~3.0.2" require-directory@^2.1.1: version "2.1.1" @@ -2607,11 +2628,11 @@ resolve-from@^5.0.0: integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== resolve@^1.14.2, resolve@^1.20.0: - version "1.22.1" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + version "1.22.8" + resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz" + integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== dependencies: - is-core-module "^2.9.0" + is-core-module "^2.13.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" @@ -2639,15 +2660,15 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" -safe-buffer@^5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== +safe-buffer@^5.1.0: + version "5.2.1" + resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== schema-utils@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz" - integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== + version "3.3.0" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== dependencies: "@types/json-schema" "^7.0.8" ajv "^6.12.5" @@ -2662,15 +2683,15 @@ schema-utils@^3.2.0: ajv "^6.12.5" ajv-keywords "^3.5.2" -schema-utils@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz" - integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== +schema-utils@^4.0.0, schema-utils@^4.2.0: + version "4.2.0" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz" + integrity sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw== dependencies: "@types/json-schema" "^7.0.9" - ajv "^8.8.0" + ajv "^8.9.0" ajv-formats "^2.1.1" - ajv-keywords "^5.0.0" + ajv-keywords "^5.1.0" script-loader@^0.7.2: version "0.7.2" @@ -2684,22 +2705,20 @@ semver@^5.6.0: resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== -semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: +semver@^6.3.1: version "6.3.1" resolved "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.3.8: - version "7.5.4" - resolved "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz" - integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== - dependencies: - lru-cache "^6.0.0" +semver@^7.5.4: + version "7.6.3" + resolved "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz" + integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== serialize-javascript@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz" - integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== + version "6.0.2" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== dependencies: randombytes "^2.1.0" @@ -2722,22 +2741,27 @@ shebang-regex@^3.0.0: resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== -shifty@2.20.0: - version "2.20.0" - resolved "https://registry.npmjs.org/shifty/-/shifty-2.20.0.tgz" - integrity sha512-1XEGiYWC1Z/lVYWHvTmWXR6/x3VkN4Ocucqulmm2/rHx3zVJpD8SIhab5h7nd3bwysH+OBgE+nCE4ljVudfxtw== +shifty@^3.0.3: + version "3.0.3" + resolved "https://registry.npmjs.org/shifty/-/shifty-3.0.3.tgz" + integrity sha512-hNDhs8OsvWUB7GUGJ76/3JyKB3kMCJfbH54nf10ySde9U+Pr/su26CyKryso1DKeQ+le/LTGHSZldPkL3ZrUWw== optionalDependencies: fsevents "^2.3.2" +signal-exit@^4.0.1: + version "4.1.0" + resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz" + integrity sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw== + slash@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz" integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== -source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== +source-map-js@^1.2.1: + version "1.2.1" + resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz" + integrity sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA== source-map-support@~0.5.20: version "0.5.21" @@ -2757,6 +2781,15 @@ stackblur-canvas@^2.0.0: resolved "https://registry.npmjs.org/stackblur-canvas/-/stackblur-canvas-2.7.0.tgz" integrity sha512-yf7OENo23AGJhBriGx0QivY5JP6Y1HbrrDI6WLt6C5auYZXlQrheoY8hD4ibekFKz1HOfE48Ww8kMWMnJD/zcQ== +"string-width-cjs@npm:string-width@^4.2.0": + version "4.2.3" + resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" + integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.1" + string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" @@ -2766,6 +2799,22 @@ string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" +string-width@^5.0.1, string-width@^5.1.2: + version "5.1.2" + resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz" + integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== + dependencies: + eastasianwidth "^0.2.0" + emoji-regex "^9.2.2" + strip-ansi "^7.0.1" + +"strip-ansi-cjs@npm:strip-ansi@^6.0.1": + version "6.0.1" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" + integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== + dependencies: + ansi-regex "^5.0.1" + strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" @@ -2773,22 +2822,22 @@ strip-ansi@^6.0.0, strip-ansi@^6.0.1: dependencies: ansi-regex "^5.0.1" -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-ansi@^7.0.1: + version "7.1.0" + resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz" + integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== + dependencies: + ansi-regex "^6.0.1" + +strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -style-loader@^3.3.1: - version "3.3.1" - resolved "https://registry.npmjs.org/style-loader/-/style-loader-3.3.1.tgz" - integrity sha512-GPcQ+LDJbrcxHORTRes6Jy2sfvK2kS6hpSfI/fXhPt+spVzxF6LJ1dHLN9zIGmVaaP044YKaIatFaufENRiDoQ== - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" +style-loader@^4.0.0: + version "4.0.0" + resolved "https://registry.npmjs.org/style-loader/-/style-loader-4.0.0.tgz" + integrity sha512-1V4WqhhZZgjVAVJyt7TdDPZoPBPNHbekX4fWnCJL1yQukhCeZhJySUL+gL9y6sNdN95uEOS83Y55SqHcP7MzLA== supports-color@^7.1.0: version "7.2.0" @@ -2845,11 +2894,6 @@ text-table@^0.2.0: resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" @@ -2869,10 +2913,15 @@ type-fest@^0.20.2: resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== +undici-types@~6.20.0: + version "6.20.0" + resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz" + integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg== + unicode-canonical-property-names-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz" - integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== + version "2.0.1" + resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz" + integrity sha512-dA8WbNeb2a6oQzAQ55YlT5vQAWGV9WXOsi3SskE3bcCdM0P4SDd+24zS/OCacdRq5BkdsRj9q3Pg6YyQoxIGqg== unicode-match-property-ecmascript@^2.0.0: version "2.0.0" @@ -2883,9 +2932,9 @@ unicode-match-property-ecmascript@^2.0.0: unicode-property-aliases-ecmascript "^2.0.0" unicode-match-property-value-ecmascript@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz" - integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== + version "2.2.0" + resolved "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.2.0.tgz" + integrity sha512-4IehN3V/+kkr5YeSSDDQG8QLqO26XpL2XP3GQtqwlT/QYSECAwFztxVHjlbh0+gjJ3XmNLS0zDsbgs9jWKExLg== unicode-property-aliases-ecmascript@^2.0.0: version "2.1.0" @@ -2910,7 +2959,7 @@ uri-js@^4.2.2: util-deprecate@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== + integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== watchpack@^2.4.1: version "2.4.2" @@ -2921,16 +2970,16 @@ watchpack@^2.4.1: graceful-fs "^4.1.2" webpack-cli@^5.0.1, webpack-cli@5.x.x: - version "5.0.1" - resolved "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.0.1.tgz" - integrity sha512-S3KVAyfwUqr0Mo/ur3NzIp6jnerNpo7GUO6so51mxLi1spqsA17YcMXy0WOIJtBSnj748lthxC6XLbNKh/ZC+A== + version "5.1.4" + resolved "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz" + integrity sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg== dependencies: "@discoveryjs/json-ext" "^0.5.0" - "@webpack-cli/configtest" "^2.0.1" - "@webpack-cli/info" "^2.0.1" - "@webpack-cli/serve" "^2.0.1" + "@webpack-cli/configtest" "^2.1.1" + "@webpack-cli/info" "^2.0.2" + "@webpack-cli/serve" "^2.0.5" colorette "^2.0.14" - commander "^9.4.1" + commander "^10.0.1" cross-spawn "^7.0.3" envinfo "^7.7.3" fastest-levenshtein "^1.0.12" @@ -2940,11 +2989,12 @@ webpack-cli@^5.0.1, webpack-cli@5.x.x: webpack-merge "^5.7.3" webpack-merge@^5.7.3: - version "5.8.0" - resolved "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz" - integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== + version "5.10.0" + resolved "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.10.0.tgz" + integrity sha512-+4zXKdx7UnO+1jaN4l2lHVD+mFvnlZQP/6ljaJVb4SZiwIKeUnrT5l0gkT8z+n4hKpC+jpOv6O9R+gLtag7pSA== dependencies: clone-deep "^4.0.1" + flat "^5.0.2" wildcard "^2.0.0" webpack-sources@^3.2.3: @@ -2952,7 +3002,7 @@ webpack-sources@^3.2.3: resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.0.0, webpack@^5.1.0, webpack@^5.75.0, webpack@>=5, webpack@5.x.x: +webpack@^5.0.0, webpack@^5.1.0, webpack@^5.27.0, webpack@^5.75.0, webpack@>=5, webpack@5.x.x: version "5.97.1" resolved "https://registry.npmjs.org/webpack/-/webpack-5.97.1.tgz" integrity sha512-EksG6gFY3L1eFMROS/7Wzgrii5mBAFe4rIr3r2BTfo7bcc+DWwFZ4OJ/miOuHJO/A85HwyI4eQ0F6IKXesO7Fg== @@ -2989,15 +3039,24 @@ which@^2.0.1: isexe "^2.0.0" wildcard@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz" - integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== + version "2.0.1" + resolved "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz" + integrity sha512-CC1bOL87PIWSBhDcTrdeLo6eGT7mCFtrg0uIJtqJUFyK+eJnzl8A1niH56uu7KMa5XFrtiV+AQuHO3n7DsHnLQ== -word-wrap@^1.2.3: +word-wrap@^1.2.5: version "1.2.5" resolved "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz" integrity sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": + version "7.0.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" @@ -3007,6 +3066,15 @@ wrap-ansi@^7.0.0: string-width "^4.1.0" strip-ansi "^6.0.0" +wrap-ansi@^8.1.0: + version "8.1.0" + resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz" + integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== + dependencies: + ansi-styles "^6.1.0" + string-width "^5.0.1" + strip-ansi "^7.0.1" + wrappy@1: version "1.0.2" resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" @@ -3022,20 +3090,15 @@ yallist@^3.0.2: resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - yargs-parser@^21.1.1: version "21.1.1" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== yargs@^17.6.2: - version "17.6.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz" - integrity sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw== + version "17.7.2" + resolved "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz" + integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== dependencies: cliui "^8.0.1" escalade "^3.1.1" @@ -3049,3 +3112,8 @@ yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== + +yocto-queue@^1.0.0: + version "1.1.1" + resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz" + integrity sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==