13.5.5 release

This commit is contained in:
Gaudenz Alder 2020-07-29 10:30:58 +02:00
parent f1ee613245
commit 33ac40722b
24 changed files with 2579 additions and 2287 deletions

View file

@ -1,3 +1,9 @@
29-JUL-2020: 13.5.5
- Uses mxGraph 4.2.1 beta 10
- Enables links in tooltips
- Adds layout JSON action
28-JUL-2020: 13.5.4
- Adds handle for cube and cylinder shape

View file

@ -1 +1 @@
13.5.4
13.5.5

View file

@ -133,6 +133,7 @@
<file name="Sidebar-Kubernetes.js" />
<file name="Sidebar-LeanMapping.js" />
<file name="Sidebar-Mockup.js" />
<file name="Sidebar-MSCAE.js" />
<file name="Sidebar-Network.js" />
<file name="Sidebar-Office.js" />
<file name="Sidebar-PID.js" />

View file

@ -1088,8 +1088,8 @@ mxGraph.prototype.allowNegativeCoordinates=!0;mxGraph.prototype.constrainChildre
mxGraph.prototype.resetEdgesOnResize=!1;mxGraph.prototype.resetEdgesOnMove=!1;mxGraph.prototype.resetEdgesOnConnect=!0;mxGraph.prototype.allowLoops=!1;mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop;mxGraph.prototype.multigraph=!0;mxGraph.prototype.connectableEdges=!1;mxGraph.prototype.allowDanglingEdges=!0;mxGraph.prototype.cloneInvalidEdges=!1;mxGraph.prototype.disconnectOnMove=!0;mxGraph.prototype.labelsVisible=!0;mxGraph.prototype.htmlLabels=!1;mxGraph.prototype.swimlaneSelectionEnabled=!0;
mxGraph.prototype.swimlaneNesting=!0;mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(a){return this.isEditing()||!this.isMouseDown&&!mxEvent.isShiftDown(a)})));8==document.documentMode&&
a.insertAdjacentHTML("beforeend","<"+mxClient.VML_PREFIX+':group style="DISPLAY: none;"></'+mxClient.VML_PREFIX+":group>")};
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(a){null!=this.tooltipHandler&&null!=this.tooltipHandler.div&&this.tooltipHandler.div!=a.relatedTarget&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(a){return this.isEditing()||
!this.isMouseDown&&!mxEvent.isShiftDown(a)})));8==document.documentMode&&a.insertAdjacentHTML("beforeend","<"+mxClient.VML_PREFIX+':group style="DISPLAY: none;"></'+mxClient.VML_PREFIX+":group>")};
mxGraph.prototype.createHandlers=function(){this.tooltipHandler=this.createTooltipHandler();this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=this.createSelectionCellsHandler();this.connectionHandler=this.createConnectionHandler();this.connectionHandler.setEnabled(!1);this.graphHandler=this.createGraphHandler();this.panningHandler=this.createPanningHandler();this.panningHandler.panningEnabled=!1;this.popupMenuHandler=this.createPopupMenuHandler()};
mxGraph.prototype.createTooltipHandler=function(){return new mxTooltipHandler(this)};mxGraph.prototype.createSelectionCellsHandler=function(){return new mxSelectionCellsHandler(this)};mxGraph.prototype.createConnectionHandler=function(){return new mxConnectionHandler(this)};mxGraph.prototype.createGraphHandler=function(){return new mxGraphHandler(this)};mxGraph.prototype.createPanningHandler=function(){return new mxPanningHandler(this)};mxGraph.prototype.createPopupMenuHandler=function(){return new mxPopupMenuHandler(this)};
mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
@ -1633,7 +1633,7 @@ mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.preferHt
0>=mxGraphHandler.prototype.maxCells)this.bends=this.createBends(),this.isVirtualBendsEnabled()&&(this.virtualBends=this.createVirtualBends());this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape=this.createLabelHandleShape();this.initBend(this.labelShape);this.labelShape.setCursor(mxConstants.CURSOR_LABEL_HANDLE);this.customHandles=this.createCustomHandles();this.updateParentHighlight();this.redraw()};mxEdgeHandler.prototype.isParentHighlightVisible=function(){return!0};
mxEdgeHandler.prototype.updateParentHighlight=mxVertexHandler.prototype.updateParentHighlight;mxEdgeHandler.prototype.createCustomHandles=function(){return null};mxEdgeHandler.prototype.isVirtualBendsEnabled=function(a){return this.virtualBendsEnabled&&(null==this.state.style[mxConstants.STYLE_EDGE]||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.NONE||1==this.state.style[mxConstants.STYLE_NOEDGESTYLE])&&"arrow"!=mxUtils.getValue(this.state.style,mxConstants.STYLE_SHAPE,null)};
mxEdgeHandler.prototype.isCellEnabled=function(a){return!0};mxEdgeHandler.prototype.isAddPointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.isRemovePointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.getSelectionPoints=function(a){return a.absolutePoints};
mxEdgeHandler.prototype.createParentHighlightShape=function(a){a=new mxRectangleShape(a,null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new this.state.shape.constructor;a.outline=!0;a.apply(this.state);a.isDashed=this.isSelectionDashed();a.stroke=this.getSelectionColor();a.isShadow=!1;return a};mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};
mxEdgeHandler.prototype.createParentHighlightShape=function(a){a=new mxRectangleShape(mxRectangle.fromRectangle(a),null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new this.state.shape.constructor;a.outline=!0;a.apply(this.state);a.isDashed=this.isSelectionDashed();a.stroke=this.getSelectionColor();a.isShadow=!1;return a};mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};
mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH};mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED};mxEdgeHandler.prototype.isConnectableCell=function(a){return!0};mxEdgeHandler.prototype.getCellAt=function(a,b){return this.outlineConnect?null:this.graph.getCellAt(a,b)};
mxEdgeHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph),b=this;a.getCell=function(a){var c=mxCellMarker.prototype.getCell.apply(this,arguments);c!=b.state.cell&&null!=c||null==b.currentPoint||(c=b.graph.getCellAt(b.currentPoint.x,b.currentPoint.y));if(null!=c&&!this.graph.isCellConnectable(c)){var e=this.graph.getModel().getParent(c);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(c=e)}e=b.graph.getModel();if(this.graph.isSwimlane(c)&&null!=b.currentPoint&&
this.graph.hitsSwimlaneContent(c,b.currentPoint.x,b.currentPoint.y)||!b.isConnectableCell(c)||c==b.state.cell||null!=c&&!b.graph.connectableEdges&&e.isEdge(c)||e.isAncestor(b.state.cell,c))c=null;this.graph.isCellConnectable(c)||(c=null);return c};a.isValidState=function(a){var c=b.graph.getModel(),c=b.graph.view.getTerminalPort(a,b.graph.view.getState(c.getTerminal(b.state.cell,!b.isSource)),!b.isSource),c=null!=c?c.cell:null;b.error=b.validateConnection(b.isSource?a.cell:c,b.isSource?c:a.cell);
@ -1730,7 +1730,7 @@ mxKeyHandler.prototype.isGraphEvent=function(a){var b=mxEvent.getSource(a);retur
mxKeyHandler.prototype.isEnabledForEvent=function(a){return this.graph.isEnabled()&&!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};mxKeyHandler.prototype.isEventIgnored=function(a){return this.graph.isEditing()};mxKeyHandler.prototype.escape=function(a){this.graph.isEscapeEnabled()&&this.graph.escape(a)};
mxKeyHandler.prototype.destroy=function(){null!=this.target&&null!=this.keydownHandler&&(mxEvent.removeListener(this.target,"keydown",this.keydownHandler),this.keydownHandler=null);this.target=null};function mxTooltipHandler(a,b){null!=a&&(this.graph=a,this.delay=b||500,this.graph.addMouseListener(this))}mxTooltipHandler.prototype.zIndex=10005;mxTooltipHandler.prototype.graph=null;mxTooltipHandler.prototype.delay=null;mxTooltipHandler.prototype.ignoreTouchEvents=!0;
mxTooltipHandler.prototype.hideOnHover=!1;mxTooltipHandler.prototype.destroyed=!1;mxTooltipHandler.prototype.enabled=!0;mxTooltipHandler.prototype.isEnabled=function(){return this.enabled};mxTooltipHandler.prototype.setEnabled=function(a){this.enabled=a};mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover};mxTooltipHandler.prototype.setHideOnHover=function(a){this.hideOnHover=a};
mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.hideTooltip()})))};mxTooltipHandler.prototype.getStateForEvent=function(a){return a.getState()};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){"A"!=mxEvent.getSource(a).nodeName&&this.hideTooltip()})))};mxTooltipHandler.prototype.getStateForEvent=function(a){return a.getState()};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
mxTooltipHandler.prototype.mouseMove=function(a,b){if(b.getX()!=this.lastX||b.getY()!=this.lastY){this.reset(b,!0);var c=this.getStateForEvent(b);(this.isHideOnHover()||c!=this.state||b.getSource()!=this.node&&(!this.stateSource||null!=c&&this.stateSource==(b.isSource(c.shape)||!b.isSource(c.text))))&&this.hideTooltip()}this.lastX=b.getX();this.lastY=b.getY()};mxTooltipHandler.prototype.mouseUp=function(a,b){this.reset(b,!0);this.hideTooltip()};
mxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)};
mxTooltipHandler.prototype.reset=function(a,b,c){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),c=null!=c?c:this.getStateForEvent(a),b&&this.isEnabled()&&null!=c&&(null==this.div||"hidden"==this.div.style.visibility)){var d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()&&!this.graph.isMouseDown){var a=

File diff suppressed because it is too large Load diff

View file

@ -132,6 +132,7 @@ mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Ios7.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Kubernetes.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-LeanMapping.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Mockup.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-MSCAE.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Network.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-Office.js');
mxscript(drawDevUrl + 'js/diagramly/sidebar/Sidebar-PID.js');

View file

@ -1373,6 +1373,7 @@ DrawioFile.prototype.installListeners = function()
this.ui.addListener('mathEnabledChanged', this.changeListener);
this.ui.addListener('gridEnabledChanged', this.changeListener);
this.ui.addListener('guidesEnabledChanged', this.changeListener);
this.ui.addListener('tooltipsEnabledChanged', this.changeListener);
this.ui.addListener('pageViewChanged', this.changeListener);
this.ui.addListener('connectionPointsChanged', this.changeListener);
this.ui.addListener('connectionArrowsChanged', this.changeListener);

View file

@ -6848,7 +6848,7 @@
var ignorePages = !allPagesRadio.checked;
var pv = null;
if (editorUi.isDesktopApp())
if (EditorUi.isElectronApp)
{
PrintDialog.electronPrint(editorUi, allPagesRadio.checked, pagesFrom, pagesTo, fitRadio.checked,
sheetsAcrossInput.value, sheetsDownInput.value, parseInt(zoomInput.value) / 100,

View file

@ -581,14 +581,6 @@
return this.editor.graph.mathEnabled;
};
/**
* Returns true if offline app, which isn't a defined thing
*/
EditorUi.prototype.isDesktopApp = function()
{
return false;
};
/**
* Returns true if offline app, which isn't a defined thing
*/
@ -10848,6 +10840,12 @@
return;
}
else if (data.action == 'layout')
{
this.executeLayoutList(data.layouts)
return;
}
else if (data.action == 'prompt')
{
this.spinner.stop();

View file

@ -283,11 +283,6 @@ mxStencilRegistry.allowEval = false;
{
require('electron').shell.openExternal(url);
};
EditorUi.prototype.isDesktopApp = function()
{
return true;
};
// Initializes the user interface
var editorUiInit = EditorUi.prototype.init;

View file

@ -5502,11 +5502,14 @@ LucidImporter = {};
group.geometry.width = maxX - minX;
group.geometry.height = maxY - minY;
for (var i = 0; i < group.children.length; i++)
if (group.children != null)
{
var geo = group.children[i].geometry;
geo.x -= minX;
geo.y -= minY;
for (var i = 0; i < group.children.length; i++)
{
var geo = group.children[i].geometry;
geo.x -= minX;
geo.y -= minY;
}
}
if (obj.IsState)

View file

@ -1376,7 +1376,7 @@ GraphViewer.prototype.showLightbox = function(editable, closable, target)
closable = (closable != null) ? closable : true;
target = (target != null) ? target : 'blank';
var param = {'client': 1, 'lightbox': 1, 'target': target};
var param = {'client': 1, 'target': target};
if (editable)
{
@ -1427,17 +1427,14 @@ GraphViewer.prototype.showLightbox = function(editable, closable, target)
param.data = encodeURIComponent(this.xml);
}
var domain = 'app.diagrams.net';
if (urlParams['dev'] == '1')
{
param.dev = '1';
param.drawdev = '1';
domain = 'test.draw.io';
}
this.lightboxWindow = window.open('https://' + domain +
'/#P' + encodeURIComponent(JSON.stringify(param)));
this.lightboxWindow = window.open(((urlParams['dev'] != '1') ?
EditorUi.lightboxHost : 'https://test.draw.io') +
'/#P' + encodeURIComponent(JSON.stringify(param)));
}
}
else

View file

@ -415,6 +415,7 @@
// TODO: Add isometric containers
{title: mxResources.get('aws3d'), id: 'aws3d', image: IMAGE_PATH + '/sidebar-aws3d.png'},
{title: mxResources.get('azure'), id: 'azure', image: IMAGE_PATH + '/sidebar-azure.png'},
{title: 'Cloud & Enterprise', id: 'mscae', image: IMAGE_PATH + '/sidebar-mscae.png'},
{title: mxResources.get('cisco'), id: 'cisco', image: IMAGE_PATH + '/sidebar-cisco.png'},
{title: 'Cisco19', id: 'cisco19', image: IMAGE_PATH + '/sidebar-cisco19.png'},
{title: 'Cisco Safe', id: 'cisco_safe', image: IMAGE_PATH + '/sidebar-cisco_safe.png'},
@ -1037,6 +1038,7 @@
this.addAWS4Palette();
this.addAWS3DPalette();
this.addAzurePalette();
this.addMSCAEPalette();
this.addC4Palette();
for (var i = 0; i < cisco.length; i++)

View file

@ -31,8 +31,8 @@ Wa(v,a,b);v.zOrder=k.ZOrder;null!=v&&0<=v.style.indexOf(";grIcon=")&&(n=new mxCe
if(null!=d){for(k=0;null!=d["t"+k];){var c=d["t"+k],n=ja(c,n);k++}for(k=0;null!=d["m"+k]||1>k;)c=d["m"+k],null!=c&&(n=ja(c,n,a)),k++;null!=d.Text&&(n=ja(d.Text,n,a));d=null!=b?b.TextAreas:a.TextAreas;null!=d.Message&&(n=ja(d.Message,n,a))}return n}function ja(a,b,d){var k=2*(parseFloat(a.Location)-.5);isNaN(k)&&null!=a.Text&&null!=a.Text.Location&&(k=2*(parseFloat(a.Text.Location)-.5));d=mxCell;var c=g(a),k=new mxGeometry(isNaN(k)?0:k,0,0,0),f="11",w="";if(null!=a&&null!=a.Value&&null!=a.Value.m)for(var w=
n(a.Value.m),l=0;l<a.Value.m.length;l++)if("s"==a.Value.m[l].n)f=.6*parseFloat(a.Value.m[l].v);else if("c"==a.Value.m[l].n){var y=a.Value.m[l].v;null!=y&&("#"!=y.charAt(0)&&(y="#"+y),y=y.substring(0,7));w+="fontColor="+y+";"}a=new d(c,k,"text;html=1;resizable=0;labelBackgroundColor=#ffffff;align=center;verticalAlign=middle;"+(w+";fontSize="+f+";"));a.geometry.relative=!0;a.vertex=!0;b.insert(a);return b}function ob(a,b,d,k){null!=b&&null!=k&&(b=k(b));return null!=b&&b!=d?a+"="+b+";":""}function ya(a,
b,d,k,n){null!=b&&null!=b.LinkX&&null!=b.LinkY&&(a.style+=(k?"":(d?"exitX":"entryX")+"="+b.LinkX+";")+(n?"":(d?"exitY":"entryY")+"="+b.LinkY+";")+(d?"exitPerimeter":"entryPerimeter")+"=1;")}function rb(a,b,d){try{null!=a.Action&&null!=a.Action.Properties&&(a=a.Action.Properties);var k=new mxCell("",new mxGeometry,"group;dropTarget=0;");k.vertex=!0;var n=Infinity,c=Infinity,f=-Infinity,w=-Infinity,l=a.Members,y=[],z;for(z in l){var g=b[z];null!=g?y.push(g):d[z]=k}y.sort(function(a,b){var d=a.zOrder,
k=b.zOrder;return null!=d&&null!=k?d-k:0});for(b=0;b<y.length;b++)g=y[b],n=Math.min(n,g.geometry.x),c=Math.min(c,g.geometry.y),f=Math.max(f,g.geometry.x+g.geometry.width),w=Math.max(w,g.geometry.y+g.geometry.height),g.parent=k,k.insert(g,b);k.geometry.x=n;k.geometry.y=c;k.geometry.width=f-n;k.geometry.height=w-c;for(b=0;b<k.children.length;b++){var A=k.children[b].geometry;A.x-=n;A.y-=c}a.IsState?k.lucidLayerInfo={name:a.Name,visible:!a.Hidden,locked:a.Restrictions.b&&a.Restrictions.p&&a.Restrictions.c}:
a.Hidden&&(k.visible=!1);return k}catch(pa){console.log(pa)}}function zb(a,b,d,k,n,c){a.getModel().beginUpdate();try{var h=function(b,d){function k(a,b){null==a||a.generated||(a.x-=b.x,a.y-=b.y)}var n=null!=d.Endpoint1.Block?w[d.Endpoint1.Block]:null,c=null!=d.Endpoint2.Block?w[d.Endpoint2.Block]:null,h=Gc(b,a,n,c);null==n&&null!=d.Endpoint1&&h.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x),Math.round(.6*d.Endpoint1.y)),!0);null==c&&null!=d.Endpoint2&&h.geometry.setTerminalPoint(new mxPoint(Math.round(.6*
k=b.zOrder;return null!=d&&null!=k?d-k:0});for(b=0;b<y.length;b++)g=y[b],n=Math.min(n,g.geometry.x),c=Math.min(c,g.geometry.y),f=Math.max(f,g.geometry.x+g.geometry.width),w=Math.max(w,g.geometry.y+g.geometry.height),g.parent=k,k.insert(g,b);k.geometry.x=n;k.geometry.y=c;k.geometry.width=f-n;k.geometry.height=w-c;if(null!=k.children)for(b=0;b<k.children.length;b++){var A=k.children[b].geometry;A.x-=n;A.y-=c}a.IsState?k.lucidLayerInfo={name:a.Name,visible:!a.Hidden,locked:a.Restrictions.b&&a.Restrictions.p&&
a.Restrictions.c}:a.Hidden&&(k.visible=!1);return k}catch(pa){console.log(pa)}}function zb(a,b,d,k,n,c){a.getModel().beginUpdate();try{var h=function(b,d){function k(a,b){null==a||a.generated||(a.x-=b.x,a.y-=b.y)}var n=null!=d.Endpoint1.Block?w[d.Endpoint1.Block]:null,c=null!=d.Endpoint2.Block?w[d.Endpoint2.Block]:null,h=Gc(b,a,n,c);null==n&&null!=d.Endpoint1&&h.geometry.setTerminalPoint(new mxPoint(Math.round(.6*d.Endpoint1.x),Math.round(.6*d.Endpoint1.y)),!0);null==c&&null!=d.Endpoint2&&h.geometry.setTerminalPoint(new mxPoint(Math.round(.6*
d.Endpoint2.x),Math.round(.6*d.Endpoint2.y)),!1);var y=l[b.id];if(null!=y){var z=h.geometry,g=y.geometry;k(z.sourcePoint,g);k(z.targetPoint,g);k(z.offset,g);z=z.points;if(null!=z)for(var r=0;r<z.length;r++)k(z[r],g)}f.push(a.addCell(h,y,null,n,c))},f=[],w={},l={},y=[];if(null!=b.Blocks)for(var z in b.Blocks){var g=b.Blocks[z];g.id=z;var A=!1;null!=Hb[g.Class]&&"mxCompositeShape"==Hb[g.Class]&&(w[g.id]=Hc(g,f,a),y.push(g),A=!0);A||(w[g.id]=ma(g,a),y.push(g))}else{for(var e=0;e<b.Objects.length;e++)g=
b.Objects[e],null!=g.Action&&"mxCompositeShape"==Hb[g.Action.Class]?w[g.id]=Hc(g,f,a):g.IsBlock&&null!=g.Action&&null!=g.Action.Properties&&(w[g.id]=ma(g,a)),y.push(g);for(e=0;e<b.Objects.length;e++)if(g=b.Objects[e],g.IsGroup){var ea=rb(g,w,l);ea&&(w[g.id]=ea,y.push(g))}}if(null!=b.Groups)try{for(z in b.Groups)if(g=b.Groups[z],g.id=z,ea=rb(g,w,l))w[g.id]=ea,y.push(g)}catch(cc){console.log(cc)}if(null!=b.Lines)for(z in b.Lines)g=b.Lines[z],g.id=z,y.push(g);y.sort(function(a,b){a=p(a);b=p(b);var d=
null!=a.Properties?a.Properties.ZOrder:a.ZOrder,k=null!=b.Properties?b.Properties.ZOrder:b.ZOrder;return null!=d&&null!=k?d-k:0});for(e=0;e<y.length;e++){var g=y[e],B=w[g.id];if(null!=B){if(null==B.parent)if(B.lucidLayerInfo){var C=new mxCell;a.addCell(C,a.model.root);C.setVisible(B.lucidLayerInfo.visible);B.lucidLayerInfo.locked&&C.setStyle("locked=1;");C.setValue(B.lucidLayerInfo.name);delete B.lucidLayerInfo;a.addCell(B,C)}else f.push(a.addCell(B))}else g.IsLine&&null!=g.Action&&null!=g.Action.Properties?

View file

@ -819,6 +819,7 @@ Actions.prototype.init = function()
action = this.addAction('tooltips', function()
{
graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled());
ui.fireEvent(new mxEventObject('tooltipsEnabledChanged'));
});
action.setToggleAction(true);
action.setSelectedCallback(function() { return graph.tooltipHandler.isEnabled(); });

View file

@ -2056,13 +2056,13 @@ EditorUi.prototype.initCanvas = function()
if (fadeThread != null)
{
window.clearTimeout(fadeThread);
fadeThead = null;
fadeThread = null;
}
if (fadeThread2 != null)
{
window.clearTimeout(fadeThread2);
fadeThead2 = null;
fadeThread2 = null;
}
fadeThread = window.setTimeout(mxUtils.bind(this, function()
@ -2083,13 +2083,13 @@ EditorUi.prototype.initCanvas = function()
if (fadeThread != null)
{
window.clearTimeout(fadeThread);
fadeThead = null;
fadeThread = null;
}
if (fadeThread2 != null)
{
window.clearTimeout(fadeThread2);
fadeThead2 = null;
fadeThread2 = null;
}
this.chromelessToolbar.style.display = '';

View file

@ -931,6 +931,33 @@ Graph = function(container, model, renderHint, stylesheet, themes, standalone)
return me.sourceState;
};
// Opens links in tooltips in new windows
var tooltipHandlerShow = this.tooltipHandler.show;
this.tooltipHandler.show = function()
{
tooltipHandlerShow.apply(this, arguments);
if (this.div != null)
{
var links = this.div.getElementsByTagName('a');
for (var i = 0; i < links.length; i++)
{
if (links[i].getAttribute('href') != null &&
links[i].getAttribute('target') == null)
{
links[i].setAttribute('target', '_blank');
}
}
}
};
// Redirects tooltips for locked cells
this.tooltipHandler.getStateForEvent = function(me)
{
return me.sourceState;
};
// Redirects cursor for locked cells
var getCursorForMouseEvent = this.getCursorForMouseEvent;
this.getCursorForMouseEvent = function(me)

View file

@ -2174,8 +2174,8 @@ mxShapeElectricalMux.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(
a.moveTo(b-10,0);a.lineTo(10,.1*c);a.lineTo(10,.9*c-10);a.lineTo(b-10,c-10);a.close();a.fillAndStroke();break;default:a.begin(),a.moveTo(10,0),a.lineTo(b-10,.1*c),a.lineTo(b-10,.9*c-10),a.lineTo(10,c-10),a.close(),a.fillAndStroke()}var g=1,h=1;if("mux"==e)var g=Math.pow(2,d),k=(c-16)/g;else h=Math.pow(2,d),k=(c-16)/h;var l=3+.5*k;a.begin();if(1==g)a.moveTo(0,.5*(c-10)),a.lineTo(10,.5*(c-10));else for(var m=0;m<g;m++)a.moveTo(0,l),a.lineTo(10,l),a.text(14,l+1,0,0,""+m.toString(),mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,f),l+=k;if(1==h)a.moveTo(b-10,.5*(c-10)),a.lineTo(b,.5*(c-10));else for(m=0;m<h;m++)a.moveTo(b-10,l),a.lineTo(b,l),a.text(b-14,l+1,0,0,""+m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,f),l+=k;k=(b-20)/d;g=10+.5*k;for(m=0;m<d;m++)"mux"==e?a.moveTo(g,c-10-(g-10)/(b-20)*c*.1):a.moveTo(g,c-10-(b-g-10)/(b-20)*c*.1),a.lineTo(g,c),a.text(g+5,c-4,0,0,"S"+(d-m-1).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,f),g+=k;
a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalMux.prototype.cst.SHAPE_MUX,mxShapeElectricalMux);
mxShapeElectricalMux.prototype.getConstraints=function(a,d,e){a=[];var b=(e-16)/e,c=parseInt(mxUtils.getValue(this.style,"selectorPins","1")),f=mxUtils.getValue(this.style,"operation","mux");mxUtils.getValue(this.style,"direction","east");var g=1,h=1;"mux"==f?(g=Math.pow(2,c),b/=g):(h=Math.pow(2,c),b/=h);f=.5*b;if(1==g)a.push(new mxConnectionConstraint(new mxPoint(0,.5*(e-10)/e),!1,0,0));else for(e=0;e<g;e++)a.push(new mxConnectionConstraint(new mxPoint(0,f),!1,null,0,3)),f+=b;if(1==h)a.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1,null,0,-5));else for(e=0;e<h;e++)a.push(new mxConnectionConstraint(new mxPoint(1,f),!1,null,0,3)),f+=b;b=(d-20)/(d*c);d=.5*b;for(e=0;e<c;e++)a.push(new mxConnectionConstraint(new mxPoint(d,1),!1,null,10,0)),d+=b;return a};function mxShapeElectricalBatteryStack(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalBatteryStack,mxShape);mxShapeElectricalBatteryStack.prototype.cst={SHAPE_BATTERY_STACK:"mxgraph.electrical.miscellaneous.batteryStack"};
mxShapeElectricalMux.prototype.getConstraints=function(a,d,e){a=[];var b=(e-16)/e,c=parseInt(mxUtils.getValue(this.style,"selectorPins","1")),f=1,g=1;"mux"==mxUtils.getValue(this.style,"operation","mux")?(f=Math.pow(2,c),b/=f):(g=Math.pow(2,c),b/=g);var h=.5*b;if(1==f)a.push(new mxConnectionConstraint(new mxPoint(0,.5*(e-10)/e),!1,0,0));else for(e=0;e<f;e++)a.push(new mxConnectionConstraint(new mxPoint(0,h),!1,null,0,3)),h+=b;if(1==g)a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,0,-5));
else for(e=0;e<g;e++)a.push(new mxConnectionConstraint(new mxPoint(1,h),!1,null,0,3)),h+=b;b=(d-20)/(d*c);d=.5*b;for(e=0;e<c;e++)a.push(new mxConnectionConstraint(new mxPoint(d,1),!1,null,10,0)),d+=b;return a};function mxShapeElectricalBatteryStack(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalBatteryStack,mxShape);mxShapeElectricalBatteryStack.prototype.cst={SHAPE_BATTERY_STACK:"mxgraph.electrical.miscellaneous.batteryStack"};
mxShapeElectricalBatteryStack.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.3*c;var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");e=mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,"0");var g=Math.floor((b-20)/d),h=.5*(b-g*d);if(0<g)for(a.begin(),a.moveTo(0,.5*c),a.lineTo(h+.2*d,.5*c),a.moveTo(b-h-.2*d,.5*c),a.lineTo(b,.5*c),a.stroke(),b=h,a.setFillColor(f),f=0;f<g;f++)a.rect(b+.2*d,.25*c,.2*d,.5*c),a.fillAndStroke(),a.begin(),a.moveTo(b+.8*d,0),a.lineTo(b+
.8*d,c),a.stroke(),0<f&&(a.setDashed("1"),a.begin(),a.moveTo(b-.2*d,.5*c),a.lineTo(b+.2*d,.5*c),a.stroke(),a.setDashed(e)),b+=d};mxCellRenderer.registerShape(mxShapeElectricalBatteryStack.prototype.cst.SHAPE_BATTERY_STACK,mxShapeElectricalBatteryStack);mxShapeElectricalBatteryStack.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];
function mxFloorplanWall(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxFloorplanWall,mxShape);mxFloorplanWall.prototype.cst={WALL:"mxgraph.floorplan.wall",WALL_THICKNESS:"wallThickness"};mxFloorplanWall.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}];mxFloorplanWall.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};

View file

@ -1289,8 +1289,8 @@ mxGraph.prototype.allowNegativeCoordinates=!0;mxGraph.prototype.constrainChildre
mxGraph.prototype.resetEdgesOnResize=!1;mxGraph.prototype.resetEdgesOnMove=!1;mxGraph.prototype.resetEdgesOnConnect=!0;mxGraph.prototype.allowLoops=!1;mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop;mxGraph.prototype.multigraph=!0;mxGraph.prototype.connectableEdges=!1;mxGraph.prototype.allowDanglingEdges=!0;mxGraph.prototype.cloneInvalidEdges=!1;mxGraph.prototype.disconnectOnMove=!0;mxGraph.prototype.labelsVisible=!0;mxGraph.prototype.htmlLabels=!1;mxGraph.prototype.swimlaneSelectionEnabled=!0;
mxGraph.prototype.swimlaneNesting=!0;mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(a){return this.isEditing()||!this.isMouseDown&&!mxEvent.isShiftDown(a)})));8==document.documentMode&&
a.insertAdjacentHTML("beforeend","<"+mxClient.VML_PREFIX+':group style="DISPLAY: none;"></'+mxClient.VML_PREFIX+":group>")};
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(a){null!=this.tooltipHandler&&null!=this.tooltipHandler.div&&this.tooltipHandler.div!=a.relatedTarget&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(a){return this.isEditing()||
!this.isMouseDown&&!mxEvent.isShiftDown(a)})));8==document.documentMode&&a.insertAdjacentHTML("beforeend","<"+mxClient.VML_PREFIX+':group style="DISPLAY: none;"></'+mxClient.VML_PREFIX+":group>")};
mxGraph.prototype.createHandlers=function(){this.tooltipHandler=this.createTooltipHandler();this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=this.createSelectionCellsHandler();this.connectionHandler=this.createConnectionHandler();this.connectionHandler.setEnabled(!1);this.graphHandler=this.createGraphHandler();this.panningHandler=this.createPanningHandler();this.panningHandler.panningEnabled=!1;this.popupMenuHandler=this.createPopupMenuHandler()};
mxGraph.prototype.createTooltipHandler=function(){return new mxTooltipHandler(this)};mxGraph.prototype.createSelectionCellsHandler=function(){return new mxSelectionCellsHandler(this)};mxGraph.prototype.createConnectionHandler=function(){return new mxConnectionHandler(this)};mxGraph.prototype.createGraphHandler=function(){return new mxGraphHandler(this)};mxGraph.prototype.createPanningHandler=function(){return new mxPanningHandler(this)};mxGraph.prototype.createPopupMenuHandler=function(){return new mxPopupMenuHandler(this)};
mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
@ -1834,7 +1834,7 @@ mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.preferHt
0>=mxGraphHandler.prototype.maxCells)this.bends=this.createBends(),this.isVirtualBendsEnabled()&&(this.virtualBends=this.createVirtualBends());this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape=this.createLabelHandleShape();this.initBend(this.labelShape);this.labelShape.setCursor(mxConstants.CURSOR_LABEL_HANDLE);this.customHandles=this.createCustomHandles();this.updateParentHighlight();this.redraw()};mxEdgeHandler.prototype.isParentHighlightVisible=function(){return!0};
mxEdgeHandler.prototype.updateParentHighlight=mxVertexHandler.prototype.updateParentHighlight;mxEdgeHandler.prototype.createCustomHandles=function(){return null};mxEdgeHandler.prototype.isVirtualBendsEnabled=function(a){return this.virtualBendsEnabled&&(null==this.state.style[mxConstants.STYLE_EDGE]||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.NONE||1==this.state.style[mxConstants.STYLE_NOEDGESTYLE])&&"arrow"!=mxUtils.getValue(this.state.style,mxConstants.STYLE_SHAPE,null)};
mxEdgeHandler.prototype.isCellEnabled=function(a){return!0};mxEdgeHandler.prototype.isAddPointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.isRemovePointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.getSelectionPoints=function(a){return a.absolutePoints};
mxEdgeHandler.prototype.createParentHighlightShape=function(a){a=new mxRectangleShape(a,null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new this.state.shape.constructor;a.outline=!0;a.apply(this.state);a.isDashed=this.isSelectionDashed();a.stroke=this.getSelectionColor();a.isShadow=!1;return a};mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};
mxEdgeHandler.prototype.createParentHighlightShape=function(a){a=new mxRectangleShape(mxRectangle.fromRectangle(a),null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new this.state.shape.constructor;a.outline=!0;a.apply(this.state);a.isDashed=this.isSelectionDashed();a.stroke=this.getSelectionColor();a.isShadow=!1;return a};mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};
mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH};mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED};mxEdgeHandler.prototype.isConnectableCell=function(a){return!0};mxEdgeHandler.prototype.getCellAt=function(a,b){return this.outlineConnect?null:this.graph.getCellAt(a,b)};
mxEdgeHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph),b=this;a.getCell=function(a){var c=mxCellMarker.prototype.getCell.apply(this,arguments);c!=b.state.cell&&null!=c||null==b.currentPoint||(c=b.graph.getCellAt(b.currentPoint.x,b.currentPoint.y));if(null!=c&&!this.graph.isCellConnectable(c)){var e=this.graph.getModel().getParent(c);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(c=e)}e=b.graph.getModel();if(this.graph.isSwimlane(c)&&null!=b.currentPoint&&
this.graph.hitsSwimlaneContent(c,b.currentPoint.x,b.currentPoint.y)||!b.isConnectableCell(c)||c==b.state.cell||null!=c&&!b.graph.connectableEdges&&e.isEdge(c)||e.isAncestor(b.state.cell,c))c=null;this.graph.isCellConnectable(c)||(c=null);return c};a.isValidState=function(a){var c=b.graph.getModel(),c=b.graph.view.getTerminalPort(a,b.graph.view.getState(c.getTerminal(b.state.cell,!b.isSource)),!b.isSource),c=null!=c?c.cell:null;b.error=b.validateConnection(b.isSource?a.cell:c,b.isSource?c:a.cell);
@ -1931,7 +1931,7 @@ mxKeyHandler.prototype.isGraphEvent=function(a){var b=mxEvent.getSource(a);retur
mxKeyHandler.prototype.isEnabledForEvent=function(a){return this.graph.isEnabled()&&!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};mxKeyHandler.prototype.isEventIgnored=function(a){return this.graph.isEditing()};mxKeyHandler.prototype.escape=function(a){this.graph.isEscapeEnabled()&&this.graph.escape(a)};
mxKeyHandler.prototype.destroy=function(){null!=this.target&&null!=this.keydownHandler&&(mxEvent.removeListener(this.target,"keydown",this.keydownHandler),this.keydownHandler=null);this.target=null};function mxTooltipHandler(a,b){null!=a&&(this.graph=a,this.delay=b||500,this.graph.addMouseListener(this))}mxTooltipHandler.prototype.zIndex=10005;mxTooltipHandler.prototype.graph=null;mxTooltipHandler.prototype.delay=null;mxTooltipHandler.prototype.ignoreTouchEvents=!0;
mxTooltipHandler.prototype.hideOnHover=!1;mxTooltipHandler.prototype.destroyed=!1;mxTooltipHandler.prototype.enabled=!0;mxTooltipHandler.prototype.isEnabled=function(){return this.enabled};mxTooltipHandler.prototype.setEnabled=function(a){this.enabled=a};mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover};mxTooltipHandler.prototype.setHideOnHover=function(a){this.hideOnHover=a};
mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.hideTooltip()})))};mxTooltipHandler.prototype.getStateForEvent=function(a){return a.getState()};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){"A"!=mxEvent.getSource(a).nodeName&&this.hideTooltip()})))};mxTooltipHandler.prototype.getStateForEvent=function(a){return a.getState()};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
mxTooltipHandler.prototype.mouseMove=function(a,b){if(b.getX()!=this.lastX||b.getY()!=this.lastY){this.reset(b,!0);var c=this.getStateForEvent(b);(this.isHideOnHover()||c!=this.state||b.getSource()!=this.node&&(!this.stateSource||null!=c&&this.stateSource==(b.isSource(c.shape)||!b.isSource(c.text))))&&this.hideTooltip()}this.lastX=b.getX();this.lastY=b.getY()};mxTooltipHandler.prototype.mouseUp=function(a,b){this.reset(b,!0);this.hideTooltip()};
mxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)};
mxTooltipHandler.prototype.reset=function(a,b,c){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),c=null!=c?c:this.getStateForEvent(a),b&&this.isEnabled()&&null!=c&&(null==this.div||"hidden"==this.div.style.visibility)){var d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()&&!this.graph.isMouseDown){var a=
@ -2234,7 +2234,7 @@ function(){return keyHandler};var A="rounded shadow glass dashed dashPattern lab
d.view.getState(a);if(null!=c){var f=a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],g;for(g in c.style)b[g]!=c.style[g]&&(a.push(c.style[g]),f.push(g));for(var e=d.getModel().getStyle(c.cell),l=null!=e?e.split(";"):[],e=0;e<l.length;e++){var p=l[e],m=p.indexOf("=");if(0<=m){g=p.substring(0,m);var v=p.substring(m+1);null!=b[g]&&"none"==v&&(a.push(v),f.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
f,"values",a,"cells",[c.cell]))}}catch(W){this.handleError(W)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var G=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),I=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),
["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<I.length;a++)for(b=0;b<I[a].length;b++)A.push(I[a][b]);for(a=0;a<C.length;a++)0>mxUtils.indexOf(A,C[a])&&A.push(C[a]);var K=function(a,c,f){f=null!=f?f:d.getModel();f.beginUpdate();try{for(var b=0;b<a.length;b++){var g=a[b],e;if(c)e=["fontSize","fontFamily","fontColor"];else{var l=f.getStyle(g),p=null!=l?l.split(";"):[];e=A.slice();for(var m=0;m<p.length;m++){var v=p[m],B=v.indexOf("=");if(0<=B){var t=
v.substring(0,B),u=mxUtils.indexOf(e,t);0<=u&&e.splice(u,1);for(var J=0;J<I.length;J++){var n=I[J];if(0<=mxUtils.indexOf(n,t))for(var k=0;k<n.length;k++){var x=mxUtils.indexOf(e,n[k]);0<=x&&e.splice(x,1)}}}}}for(var y=f.isEdge(g),q=y?d.currentEdgeStyle:d.currentVertexStyle,D=f.getStyle(g),m=0;m<e.length;m++){var t=e[m],z=q[t];null==z||"shape"==t&&!y||y&&!(0>mxUtils.indexOf(C,t))||(D=mxUtils.setStyle(D,t,z))}f.setStyle(g,D)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){K(c.getProperty("cells"))});
v.substring(0,B),u=mxUtils.indexOf(e,t);0<=u&&e.splice(u,1);for(var n=0;n<I.length;n++){var k=I[n];if(0<=mxUtils.indexOf(k,t))for(var x=0;x<k.length;x++){var J=mxUtils.indexOf(e,k[x]);0<=J&&e.splice(J,1)}}}}}for(var y=f.isEdge(g),q=y?d.currentEdgeStyle:d.currentVertexStyle,D=f.getStyle(g),m=0;m<e.length;m++){var t=e[m],z=q[t];null==z||"shape"==t&&!y||y&&!(0>mxUtils.indexOf(C,t))||(D=mxUtils.setStyle(D,t,z))}f.setStyle(g,D)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){K(c.getProperty("cells"))});
d.addListener("textInserted",function(a,c){K(c.getProperty("cells"),!0)});this.insertHandler=K;d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var f=[c.getProperty("cell")];c.getProperty("terminalInserted")&&f.push(c.getProperty("terminal"));K(f)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,g=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(g=d.getModel().isEdge(f[e])||g)||!b);e++);else g=b=!0;for(var f=
c.getProperty("keys"),l=c.getProperty("values"),e=0;e<f.length;e++){var m=0<=mxUtils.indexOf(G,f[e]);if("strokeColor"!=f[e]||null!=l[e]&&"none"!=l[e])if(0<=mxUtils.indexOf(C,f[e]))g||0<=mxUtils.indexOf(F,f[e])?null==l[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=l[e]:b&&0<=mxUtils.indexOf(A,f[e])&&(null==l[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=l[e]);else if(0<=mxUtils.indexOf(A,f[e])){if(b||m)null==l[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=
l[e];if(g||m||0<=mxUtils.indexOf(F,f[e]))null==l[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=l[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
@ -2274,7 +2274,7 @@ null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):b=e.a
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,d,b){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;b=null!=b?b:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),l=a.view.translate,m=a.view.scale,p=mxRectangle.fromRectangle(g);
p.x=p.x/m-l.x;p.y=p.y/m-l.y;p.width/=m;p.height/=m;var l=a.container.scrollTop,v=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var B=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(f||1,B/p.width)):m;f=(B-c*p.width)/2/c;var u=0==this.lightboxVerticalDivider?0:(t-c*p.height)/this.lightboxVerticalDivider/c;e&&(f=Math.max(f,0),u=Math.max(u,0));if(e||g.width<B||g.height<t)a.view.scaleAndTranslate(c,
p.x=p.x/m-l.x;p.y=p.y/m-l.y;p.width/=m;p.height/=m;var l=a.container.scrollTop,v=a.container.scrollLeft,B=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)B+=3;var t=a.container.offsetWidth-B,B=a.container.offsetHeight-B;c=c?Math.max(.3,Math.min(f||1,t/p.width)):m;f=(t-c*p.width)/2/c;var u=0==this.lightboxVerticalDivider?0:(B-c*p.height)/this.lightboxVerticalDivider/c;e&&(f=Math.max(f,0),u=Math.max(u,0));if(e||g.width<t||g.height<B)a.view.scaleAndTranslate(c,
Math.floor(f-p.x),Math.floor(u-p.y)),a.container.scrollTop=l*c/m,a.container.scrollLeft=v*c/m;else if(0!=d||0!=b)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/m),Math.floor(g.y+b/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var n=mxUtils.bind(this,function(){var c=
@ -2283,27 +2283,27 @@ f);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("
f=document.createElement("div");f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontFamily="Helvetica,Arial";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color="#ffffff";this.chromelessToolbar.appendChild(f);var g=n(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,
mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});c.style.paddingLeft="0px";c.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",c.style.display="",f.style.display="inline-block"):(g.style.display="none",c.style.display="none",f.style.display="none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",
l)}n(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,
mxResources.get("fit"));var p=null,u=null,t=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),a||200)}),x=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=u&&(window.clearTimeout(u),
fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var y=n(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
null}));var f=y.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){y.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(c){null!=
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var z=this.lightboxToolbarActions[m];n(z.fn,z.icon,z.tooltip)}null!=k.refreshBtn&&n(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,
function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
x(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():x(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():x(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
x(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-a.container.scrollTop)<E&&Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<
E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?t():x(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var A=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}A.apply(this,arguments)};if(!a.isViewer()){var C=a.sizeDidChange;a.sizeDidChange=
function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),d=this.getPageSize(),b=Math.ceil(2*f.x+c.width*d.width),g=Math.ceil(2*f.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=b||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,b,g);b=f.x-c.x*d.width;f=f.y-c.y*d.height;this.autoTranslate||this.view.translate.x==b&&this.view.translate.y==f?C.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=
c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,K=null,v=null,J=null,B=function(c){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,
function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";G.style.transform=""},0)):(F.style.transform=
"",G.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),f=mxUtils.getOffset(a.container),d=a.view.scale,g=0,l=0;null!=K&&(g=a.container.offsetWidth/2-K.x+f.x,l=a.container.offsetHeight/2-K.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=d&&(null!=v&&(g+=c.x-v.x,l+=c.y-v.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=J&&F.setAttribute("filter",J);a.cumulativeZoomFactor=1;J=K=v=I=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(K=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==J&&""!=F.getAttribute("filter")&&(J=F.getAttribute("filter"),F.removeAttribute("filter"));v=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:K.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:K.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+b+"px";F.style.transform="scale("+
this.cumulativeZoomFactor+")";G.style.transformOrigin=c+"px "+b+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(f?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":K.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(f?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":K.y+
a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}B(d)};mxEvent.addGestureListeners(a.container,function(a){null!=I&&window.clearTimeout(I)},null,function(c){1!=a.cumulativeZoomFactor&&B(0)});mxEvent.addListener(a.container,"scroll",function(){I&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
B(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c)){d=a.view.getTranslate();var b=40/a.view.scale;mxEvent.isShiftDown(c)?a.view.setTranslate(d.x+(f?-b:b),d.y):a.view.setTranslate(d.x,d.y+(f?b:-b))}else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),K=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f),
mxEvent.consume(c),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
mxResources.get("fit"));var p=null,u=null,t=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=u&&(window.clearTimeout(u),u=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),a||200)}),x=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display=
"";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var y=n(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=y.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,
"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);
this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){y.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):
a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var z=this.lightboxToolbarActions[m];n(z.fn,z.icon,z.tooltip)}null!=k.refreshBtn&&n(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&
window.self!==window.top&&n(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||x(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():x(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():x(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||x(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=
f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-a.container.scrollTop)<E&&Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?t():x(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var A=
a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}A.apply(this,arguments)};if(!a.isViewer()){var C=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),d=this.getPageSize(),b=Math.ceil(2*
f.x+c.width*d.width),g=Math.ceil(2*f.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=b||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,b,g);b=f.x-c.x*d.width;f=f.y-c.y*d.height;this.autoTranslate||this.view.translate.x==b&&this.view.translate.y==f?C.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-
d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,K=null,v=null,J=null,B=function(c){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,
"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";G.style.transform=""},0)):(F.style.transform="",G.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
f=mxUtils.getOffset(a.container),d=a.view.scale,g=0,l=0;null!=K&&(g=a.container.offsetWidth/2-K.x+f.x,l=a.container.offsetHeight/2-K.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=d&&(null!=v&&(g+=c.x-v.x,l+=c.y-v.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=J&&F.setAttribute("filter",
J);a.cumulativeZoomFactor=1;J=K=v=I=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(K=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*
20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==J&&""!=F.getAttribute("filter")&&(J=F.getAttribute("filter"),F.removeAttribute("filter"));
v=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:K.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:K.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+b+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";G.style.transformOrigin=c+"px "+b+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&
(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(f?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":K.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(f?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":K.y+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity=
"0";null!=e.hoverIcons&&e.hoverIcons.reset()}B(d)};mxEvent.addGestureListeners(a.container,function(a){null!=I&&window.clearTimeout(I)},null,function(c){1!=a.cumulativeZoomFactor&&B(0)});mxEvent.addListener(a.container,"scroll",function(){I&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&B(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c)){d=a.view.getTranslate();var b=40/a.view.scale;mxEvent.isShiftDown(c)?
a.view.setTranslate(d.x+(f?-b:b),d.y):a.view.setTranslate(d.x,d.y+(f?b:-b))}else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),K=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f),mxEvent.consume(c),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};
EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
EditorUi.prototype.createTemporaryGraph=function(a){var b=new Graph(document.createElement("div"));b.stylesheet.styles=mxUtils.clone(a.styles);b.resetViewOnRootChange=!1;b.setConnectable(!1);b.gridEnabled=!1;b.autoScroll=!1;b.setTooltips(!1);b.setEnabled(!1);b.container.style.visibility="hidden";b.container.style.position="absolute";b.container.style.overflow="hidden";b.container.style.height="1px";b.container.style.width="1px";return b};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
@ -2388,15 +2388,15 @@ Graph=function(a,b,e,d,k,n){mxGraph.call(this,a,b,e,d);this.themes=k||this.defau
return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var q=null,c=null,f=null,g=null,l=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")&&this.isEnabled()){var b=d.getProperty("event"),e=b.getState();if(!mxEvent.isAltDown(b.getEvent())&&null!=e)if(this.model.isEdge(e.cell))if(q=new mxPoint(b.getGraphX(),b.getGraphY()),l=this.isCellSelected(e.cell),f=e,c=b,null!=e.text&&null!=e.text.boundingBox&&
mxUtils.contains(e.text.boundingBox,b.getGraphX(),b.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var m=this.selectionCellsHandler.getHandler(e.cell);null!=m&&null!=m.bends&&0<m.bends.length&&(g=m.getHandleForEvent(b))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&(m=this.selectionCellsHandler.getHandler(e.cell),null==m||null==m.getHandleForEvent(b))){var v=new mxRectangle(b.getGraphX()-1,b.getGraphY()-1);v.grow(mxEvent.isTouchEvent(b.getEvent())?mxShape.prototype.svgStrokeTolerance-
1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(e.cell)&&!this.isCellSelected(e.cell)){var p=this.model.getParent(e.cell),m=this.model.getParent(p);if(!this.isCellSelected(m)&&(mxUtils.intersects(v,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(m,0)!=p||mxUtils.intersects(v,new mxRectangle(e.x,e.y+e.height-2,e.width,3))||mxUtils.intersects(v,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(p,0)!=e.cell||mxUtils.intersects(v,new mxRectangle(e.x+e.width-
2,e.y,2,e.height)))&&(p=this.selectionCellsHandler.isHandled(m),this.selectCellForEvent(m,b.getEvent()),m=this.selectionCellsHandler.getHandler(m),null!=m)){var t=m.getHandleForEvent(b);null!=t&&(m.start(b.getGraphX(),b.getGraphY(),t),m.blockDelayedSelection=!p,b.consume())}}for(;!b.isConsumed()&&null!=e&&(this.isTableCell(e.cell)||this.isTableRow(e.cell)||this.isTable(e.cell));)this.isSwimlane(e.cell)&&(m=this.getActualStartSize(e.cell),p=this.view.scale,(0<m.x||0<m.width)&&mxUtils.intersects(v,
new mxRectangle(e.x+(m.x-m.width-1)*p+(0==m.x?e.width:0),e.y,1,e.height))||(0<m.y||0<m.height)&&mxUtils.intersects(v,new mxRectangle(e.x,e.y+(m.y-m.height-1)*p+(0==m.y?e.height:0),e.width,1)))&&(this.selectCellForEvent(e.cell,b.getEvent()),m=this.selectionCellsHandler.getHandler(e.cell),null!=m&&(t=mxEvent.CUSTOM_HANDLE-m.customHandles.length+1,m.start(b.getGraphX(),b.getGraphY(),t),b.consume())),e=this.view.getState(this.model.getParent(e.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
2,e.y,2,e.height)))&&(p=this.selectionCellsHandler.isHandled(m),this.selectCellForEvent(m,b.getEvent()),m=this.selectionCellsHandler.getHandler(m),null!=m)){var B=m.getHandleForEvent(b);null!=B&&(m.start(b.getGraphX(),b.getGraphY(),B),m.blockDelayedSelection=!p,b.consume())}}for(;!b.isConsumed()&&null!=e&&(this.isTableCell(e.cell)||this.isTableRow(e.cell)||this.isTable(e.cell));)this.isSwimlane(e.cell)&&(m=this.getActualStartSize(e.cell),p=this.view.scale,(0<m.x||0<m.width)&&mxUtils.intersects(v,
new mxRectangle(e.x+(m.x-m.width-1)*p+(0==m.x?e.width:0),e.y,1,e.height))||(0<m.y||0<m.height)&&mxUtils.intersects(v,new mxRectangle(e.x,e.y+(m.y-m.height-1)*p+(0==m.y?e.height:0),e.width,1)))&&(this.selectCellForEvent(e.cell,b.getEvent()),m=this.selectionCellsHandler.getHandler(e.cell),null!=m&&(B=mxEvent.CUSTOM_HANDLE-m.customHandles.length+1,m.start(b.getGraphX(),b.getGraphY(),B),b.consume())),e=this.view.getState(this.model.getParent(e.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
mouseMove:mxUtils.bind(this,function(a,d){var b=this.selectionCellsHandler.handlers.map,e;for(e in b)if(null!=b[e].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(e=this.tolerance,null!=q&&null!=f&&null!=c){if(b=f,Math.abs(q.x-d.getGraphX())>e||Math.abs(q.y-d.getGraphY())>e){var m=this.selectionCellsHandler.getHandler(b.cell);null==m&&this.model.isEdge(b.cell)&&(m=this.createHandler(b));if(null!=m&&null!=m.bends&&0<m.bends.length){e=m.getHandleForEvent(c);
var v=this.view.getEdgeStyle(b),p=v==mxEdgeStyle.EntityRelation;l||g!=mxEvent.LABEL_HANDLE||(e=g);if(p&&0!=e&&e!=m.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!p||null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=b.visibleSourceState||e==m.bends.length-1||null!=b.visibleTargetState)p||e==mxEvent.LABEL_HANDLE||(p=b.absolutePoints,null!=p&&(null==v&&null==e||v==mxEdgeStyle.OrthConnector)&&(e=g,null==e&&(e=new mxRectangle(q.x,
q.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,p[0].x,p[0].y)?e=0:mxUtils.contains(e,p[p.length-1].x,p[p.length-1].y)?e=m.bends.length-1:null!=v&&(2==p.length||3==p.length&&(0==Math.round(p[0].x-p[1].x)&&0==Math.round(p[1].x-p[2].x)||0==Math.round(p[0].y-p[1].y)&&0==Math.round(p[1].y-p[2].y)))?e=2:(e=mxUtils.findNearestSegment(b,q.x,q.y),e=null==v?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),m.start(d.getGraphX(),d.getGraphX(),e),d.consume(),this.graphHandler.reset()}null!=
m&&(this.selectionCellsHandler.isHandlerActive(m)?this.isCellSelected(b.cell)||(this.selectionCellsHandler.handlers.put(b.cell,m),this.selectCellForEvent(b.cell,d.getEvent())):this.isCellSelected(b.cell)||m.destroy());l=!1;q=c=f=g=null}}else if(b=d.getState(),null!=b){m=null;if(this.model.isEdge(b.cell)){if(e=new mxRectangle(d.getGraphX(),d.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),p=b.absolutePoints,null!=p)if(null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,
d.getGraphX(),d.getGraphY()))m="move";else if(mxUtils.contains(e,p[0].x,p[0].y)||mxUtils.contains(e,p[p.length-1].x,p[p.length-1].y))m="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)e=this.view.getEdgeStyle(b),m="crosshair",e!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&(e=mxUtils.findNearestSegment(b,d.getGraphX(),d.getGraphY()),e<p.length-1&&0<=e&&(m=0==Math.round(p[e].x-p[e+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){e=new mxRectangle(d.getGraphX()-
1,d.getGraphY()-1);e.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(b.cell)&&(p=this.model.getParent(b.cell),v=this.model.getParent(p),!this.isCellSelected(v)))if(mxUtils.intersects(e,new mxRectangle(b.x-2,b.y,2,b.height))&&this.model.getChildAt(p,0)!=b.cell||mxUtils.intersects(e,new mxRectangle(b.x+b.width-2,b.y,2,b.height)))m="col-resize";else if(mxUtils.intersects(e,new mxRectangle(b.x,b.y-2,b.width,3))&&this.model.getChildAt(v,0)!=p||mxUtils.intersects(e,new mxRectangle(b.x,
b.y+b.height-2,b.width,3)))m="row-resize";for(p=b;null==m&&null!=p&&(this.isTableCell(p.cell)||this.isTableRow(p.cell)||this.isTable(p.cell));){if(this.isSwimlane(p.cell)){var v=this.getActualStartSize(p.cell),t=this.view.scale;(0<v.x||0<v.width)&&mxUtils.intersects(e,new mxRectangle(p.x+(v.x-v.width-1)*t+(0==v.x?p.width*t:0),p.y,1,p.height))?m="col-resize":(0<v.y||0<v.height)&&mxUtils.intersects(e,new mxRectangle(p.x,p.y+(v.y-v.height-1)*t+(0==v.y?p.height:0),p.width,1))&&(m="row-resize")}p=this.view.getState(this.model.getParent(p.cell))}}null!=
b.y+b.height-2,b.width,3)))m="row-resize";for(p=b;null==m&&null!=p&&(this.isTableCell(p.cell)||this.isTableRow(p.cell)||this.isTable(p.cell));){if(this.isSwimlane(p.cell)){var v=this.getActualStartSize(p.cell),B=this.view.scale;(0<v.x||0<v.width)&&mxUtils.intersects(e,new mxRectangle(p.x+(v.x-v.width-1)*B+(0==v.x?p.width*B:0),p.y,1,p.height))?m="col-resize":(0<v.y||0<v.height)&&mxUtils.intersects(e,new mxRectangle(p.x,p.y+(v.y-v.height-1)*B+(0==v.y?p.height:0),p.width,1))&&(m="row-resize")}p=this.view.getState(this.model.getParent(p.cell))}}null!=
m&&b.setCursor(m)}}),mouseUp:mxUtils.bind(this,function(a,d){g=q=c=f=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=
this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],f=this.graph.pageFormat,
d=this.graph.pageScale,b=f.width*d,f=f.height*d,d=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),l=0;l<g.width;l++)c.push(new mxRectangle(((g.x+l)*b+d.x)*e,(g.y*f+d.y)*e,b*e,f*e));for(l=1;l<g.height;l++)c.push(new mxRectangle((g.x*b+d.x)*e,((g.y+l)*f+d.y)*e,b*e,f*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
@ -2406,13 +2406,13 @@ return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};v
this.currentState&&a.getState()==this.currentState&&2E3<y||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&z.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(a){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var A=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return A.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&
mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var C=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(C=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=C)}));this.popupMenuHandler.autoExpand=
!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return G.apply(this,arguments);var f=c?a.sourceState.cell:a.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=
function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var F=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getCells(a.x,
a.y,a.width,a.height,null,null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(f,c);return f};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,f){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};
var K=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var f=c.getProperty("event").getState();K=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var f=c.getProperty("event"),d=c.getProperty("cell");null==d?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),
t.start(f.x,f.y)):null!=K?this.addSelectionCells(K):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);K=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){var f=a.view.graph;return c&&(f.isCellSelected(a.cell)||f.isTableRow(a.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var v=this.updateMouseEvent;this.updateMouseEvent=function(a){a=v.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";
Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
function(a){return a.sourceState};var F=this.tooltipHandler.show;this.tooltipHandler.show=function(){F.apply(this,arguments);if(null!=this.div)for(var a=this.div.getElementsByTagName("a"),c=0;c<a.length;c++)null!=a[c].getAttribute("href")&&null==a[c].getAttribute("target")&&a[c].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);
return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var I=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return I.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getCells(a.x,a.y,a.width,a.height,null,null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(f,c);return f};var K=
this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,f){return this.graph.isCellSelected(a)?!1:K.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var v=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var f=c.getProperty("event").getState();
v=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var f=c.getProperty("event"),d=c.getProperty("cell");null==d?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),t.start(f.x,f.y)):null!=v?this.addSelectionCells(v):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);v=null;c.consume()}}));
this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){var f=a.view.graph;return c&&(f.isCellSelected(a.cell)||f.isTableRow(a.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=
null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var J=this.updateMouseEvent;this.updateMouseEvent=function(a){a=J.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.createSvgImage=function(a,b,e,d,k){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=d&&null!=k?'viewBox="0 0 '+d+" "+k+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};
Graph.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&65535!=d&&65534!=d&&b.push(a.charAt(e))}return b.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};Graph.compressNode=function(a,b){var e=mxUtils.getXml(a);return Graph.compress(b?e:Graph.zapGremlins(e))};
Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var e=b?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(e):Base64.encode(e,!0)};Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};
@ -2609,7 +2609,7 @@ g.y);this.getModel().beginUpdate();try{for(var m=(b-d)/(f.length-1),b=d,e=1;e<f.
Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,f,b,d,e,g,l,m,v){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;f=null!=f?f:0;d=null!=d?d:!0;e=null!=e?e:!0;g=null!=g?g:!0;var t=e||b?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));
var B=this.view.scale,u=mxUtils.createXmlDocument(),k=null!=u.createElementNS?u.createElementNS(mxConstants.NS_SVG,"svg"):u.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==u.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/B;var n=Math.max(1,Math.ceil(t.width*a)+2*f)+(v?5:
0),x=Math.max(1,Math.ceil(t.height*a)+2*f)+(v?5:0);k.setAttribute("version","1.1");k.setAttribute("width",n+"px");k.setAttribute("height",x+"px");k.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+n+" "+x);u.appendChild(k);var J=null!=u.createElementNS?u.createElementNS(mxConstants.NS_SVG,"g"):u.createElement("g");k.appendChild(J);var y=this.createSvgCanvas(J);y.foOffset=d?-.5:0;y.textOffset=d?-.5:0;y.imageOffset=d?-.5:0;y.translate(Math.floor((f/c-t.x)/B),Math.floor((f/c-t.y)/B));var P=document.createElement("div"),
H=y.getAlternateText;y.getAlternateText=function(a,c,f,b,d,e,g,l,m,v,p,t,aa){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(P.innerHTML=e,e=mxUtils.extractTextWithWhitespace(P.childNodes));for(var Na=Math.ceil(2*b/this.state.fontSize),u=[],La=0,B=0;(0==Na||La<Na)&&B<e.length;){var k=e.charCodeAt(B);if(10==k||13==k){if(0<La)break}else u.push(e.charAt(B)),255>k&&La++;B++}u.length<e.length&&1<e.length-u.length&&(e=mxUtils.trim(u.join(""))+"...");return e}catch(Ya){return H.apply(this,
H=y.getAlternateText;y.getAlternateText=function(a,c,f,b,d,e,g,l,m,v,p,t,aa){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(P.innerHTML=e,e=mxUtils.extractTextWithWhitespace(P.childNodes));for(var Na=Math.ceil(2*b/this.state.fontSize),B=[],La=0,u=0;(0==Na||La<Na)&&u<e.length;){var k=e.charCodeAt(u);if(10==k||13==k){if(0<La)break}else B.push(e.charAt(u)),255>k&&La++;u++}B.length<e.length&&1<e.length-B.length&&(e=mxUtils.trim(B.join(""))+"...");return e}catch(Ya){return H.apply(this,
arguments)}else return H.apply(this,arguments)};var Q=this.backgroundImage;if(null!=Q){c=B/c;var S=this.view.translate,A=new mxRectangle(S.x*c,S.y*c,Q.width*c,Q.height*c);mxUtils.intersects(t,A)&&y.image(S.x,S.y,Q.width,Q.height,Q.src,!0)}y.scale(a);y.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var q=l.drawCellState,N=l.getLinkForCellState;l.getLinkForCellState=function(a,c){var f=N.apply(this,arguments);return null==f||a.view.graph.isCustomLink(f)?null:f};l.drawCellState=function(a,c){for(var f=
a.view.graph,b=f.isCellSelected(a.cell),d=f.model.getParent(a.cell);!e&&!b&&null!=d;)b=f.isCellSelected(d),d=f.model.getParent(d);(e||b)&&q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),y);this.updateSvgLinks(k,m,!0);this.addForeignObjectWarning(y,k);return k}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,c){if(0<c.getElementsByTagName("foreignObject").length){var f=a.createElement("switch"),
b=a.createElement("g");b.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||c.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=
@ -2618,7 +2618,7 @@ c):f&&this.isCustomLink(d)&&a[b].setAttribute("href","javascript:void(0);"))}};G
a&&a.nodeName!=c;){if(a==f)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,f){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==f)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var f=document.createRange();f.selectNode(a);c.removeAllRanges();c.addRange(f)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),f=
c.createRange(),f.setEndPoint("StartToStart",a),f.select())};Graph.prototype.deleteCells=function(a,c){var f=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var b=0;b<a.length;b++){var d=this.model.getParent(a[b]);if(this.isTable(d)){var e=this.getCellGeometry(a[b]),g=this.getCellGeometry(d);null!=e&&null!=g&&(g=g.clone(),g.height-=e.height,this.model.setGeometry(d,g))}}var l=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,c)}finally{this.model.endUpdate()}if(null!=
l)for(f=[],b=0;b<l.length;b++)this.model.contains(l[b])&&(this.model.isVertex(l[b])||this.model.isEdge(l[b]))&&f.push(l[b])}return f};Graph.prototype.insertTableColumn=function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var e=f.getParent(a),b=f.getParent(e),d=mxUtils.indexOf(f.getChildCells(e,!0),a);else this.isTableRow(a)?b=f.getParent(a):a=f.getChildCells(b,!0)[0],c||(d=f.getChildCells(a,!0).length-1);for(var g=f.getChildCells(b,!0),l=Graph.minTableColumnWidth,
e=0;e<g.length;e++){var m=f.getChildCells(g[e],!0)[d],v=f.cloneCell(m,!1),p=this.getCellGeometry(v);v.value=null;if(null!=p){var l=p.width,t=this.getCellGeometry(g[e]);null!=t&&(p.height=t.height)}f.add(g[e],v,d+(c?0:1))}var u=this.getCellGeometry(b);null!=u&&(u=u.clone(),u.width+=l,f.setGeometry(b,u))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=a;if(this.isTableCell(a))d=f.getParent(a),b=f.getParent(d);else if(this.isTableRow(a))b=
e=0;e<g.length;e++){var m=f.getChildCells(g[e],!0)[d],v=f.cloneCell(m,!1),p=this.getCellGeometry(v);v.value=null;if(null!=p){var l=p.width,t=this.getCellGeometry(g[e]);null!=t&&(p.height=t.height)}f.add(g[e],v,d+(c?0:1))}var B=this.getCellGeometry(b);null!=B&&(B=B.clone(),B.width+=l,f.setGeometry(b,B))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=a;if(this.isTableCell(a))d=f.getParent(a),b=f.getParent(d);else if(this.isTableRow(a))b=
f.getParent(a);else var e=f.getChildCells(b,!0),d=e[c?0:e.length-1];var g=f.getChildCells(d,!0),l=b.getIndex(d),d=f.cloneCell(d,!1);d.value=null;var m=this.getCellGeometry(d);if(null!=m){for(e=0;e<g.length;e++){a=f.cloneCell(g[e],!1);d.insert(a);a.value=null;var v=this.getCellGeometry(a);null!=v&&(v.height=m.height)}f.add(b,d,l+(c?0:1));var p=this.getCellGeometry(b);null!=p&&(p=p.clone(),p.height+=m.height,f.setGeometry(b,p))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=
this.getModel();c.beginUpdate();try{var f=a,b=a;this.isTableCell(a)&&(b=c.getParent(a));this.isTableRow(b)&&(f=c.getParent(b));var d=c.getChildCells(f,!0);if(0==d.length)c.remove(f);else{this.isTableRow(b)||(b=d[0]);var e=c.getChildCells(b,!0);if(1>=e.length)c.remove(f);else{var g=e.length-1;this.isTableCell(a)&&(g=mxUtils.indexOf(e,a));for(b=a=0;b<d.length;b++){var l=c.getChildCells(d[b],!0)[g];c.remove(l);var m=this.getCellGeometry(l);null!=m&&(a=Math.max(a,m.width))}var v=this.getCellGeometry(f);
null!=v&&(v=v.clone(),v.width-=a,c.setGeometry(f,v))}}}finally{c.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var c=this.getModel();c.beginUpdate();try{var f=a,b=a;this.isTableCell(a)&&(a=b=c.getParent(a));this.isTableRow(a)&&(f=c.getParent(b));var d=c.getChildCells(f,!0);if(1>=d.length)c.remove(f);else{this.isTableRow(b)||(b=d[d.length-1]);c.remove(b);a=0;var e=this.getCellGeometry(b);null!=e&&(a=e.height);var g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.height-=a,c.setGeometry(f,
@ -2762,8 +2762,8 @@ G.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"f
!0)};mxCellRenderer.registerShape("hexagon",G);mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.paintForeground=function(a,c,f,b,d){var e=Math.min(b/5,d/5)+1;a.begin();a.moveTo(c+b/2,f+e);a.lineTo(c+b/2,f+d-e);a.moveTo(c+e,f+d/2);a.lineTo(c+b-e,f+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",F);var Oa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,f,b,d){Oa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&(a.setShadow(!1),Oa.apply(this,[a,c,f,b,d]))}};mxUtils.extend(I,
mxRectangleShape);I.prototype.isHtmlAllowed=function(){return!1};I.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};I.prototype.paintForeground=function(a,c,f,b,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],v=this.style["symbol"+e+"Width"],aa=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||p,u=this.style["symbol"+e+"ArcSpacing"];null!=u&&(u*=this.getArcSize(b+this.strokewidth,
d+this.strokewidth),p+=u,t+=u);var u=c,B=f,u=l==mxConstants.ALIGN_CENTER?u+(b-v)/2:l==mxConstants.ALIGN_RIGHT?u+(b-v-p):u+p,B=m==mxConstants.ALIGN_MIDDLE?B+(d-aa)/2:m==mxConstants.ALIGN_BOTTOM?B+(d-aa-t):B+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,u,B,v,aa);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",I);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(a,c,f,b,d,e){e?
0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],v=this.style["symbol"+e+"Width"],aa=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||p,B=this.style["symbol"+e+"ArcSpacing"];null!=B&&(B*=this.getArcSize(b+this.strokewidth,
d+this.strokewidth),p+=B,t+=B);var B=c,u=f,B=l==mxConstants.ALIGN_CENTER?B+(b-v)/2:l==mxConstants.ALIGN_RIGHT?B+(b-v-p):B+p,u=m==mxConstants.ALIGN_MIDDLE?u+(d-aa)/2:m==mxConstants.ALIGN_BOTTOM?u+(d-aa-t):u+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,B,u,v,aa);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",I);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(a,c,f,b,d,e){e?
(a.moveTo(0,0),a.lineTo(b/2,d/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",K);mxUtils.extend(v,mxShape);v.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();a.stroke()};
mxCellRenderer.registerShape("umlActor",v);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};J.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(b/6,d/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(a,c,
f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/8,f+d);a.lineTo(c+7*b/8,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",B);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(b,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(S,mxShape);S.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
@ -2815,9 +2815,9 @@ mxActor);sa.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);a.moveTo(
0);a.lineTo(e,c);a.lineTo(b,c);a.lineTo(b,f);a.lineTo(e,f);a.lineTo(e,d);a.lineTo(g,d);a.lineTo(g,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("cross",xa);mxUtils.extend(ta,mxActor);ta.prototype.size=.25;ta.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);f=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,d/2);a.lineTo(f,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(f,d);a.close();a.end()};mxCellRenderer.registerShape("display",
ta);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,c,f){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,b,f]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),oa.prototype.origPaintEdgeShape.apply(this,[a,c,f])))};
mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),f=a.apply(this,arguments);"umlFrame"==c.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1);return function(){a.begin();
a.moveTo(b.x-p/2-t/2,b.y-t/2+p/2);a.lineTo(b.x+t/2-3*p/2,b.y-3*t/2-p/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),u=b.x+p/2,B=b.y+t/2;b.x-=p;b.y-=t;return function(){a.begin();a.moveTo(u-p/2-t/2,B-t/2+p/2);a.lineTo(u-p/2+t/2,B-t/2-p/2);a.lineTo(u+t/2-3*p/2,B-3*t/2-p/2);a.lineTo(u-t/2-3*p/2,B-3*t/2+p/2);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1);return function(){a.begin();
a.moveTo(b.x-p/2-t/2,b.y-t/2+p/2);a.lineTo(b.x+t/2-3*p/2,b.y-3*t/2-p/2);a.moveTo(b.x-p/2+t/2,b.y-t/2-p/2);a.lineTo(b.x-t/2-3*p/2,b.y-3*t/2+p/2);a.stroke()}});mxMarker.addMarker("circle",ya);mxMarker.addMarker("circlePlus",function(a,c,f,b,d,e,g,l,m,v){var p=b.clone(),t=ya.apply(this,arguments),u=d*(g+2*m),B=e*(g+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(p.x-d*m,p.y-e*m);a.lineTo(p.x-2*u+d*m,p.y-2*B+e*m);a.moveTo(p.x-u-B+e*m,p.y-B+u-d*m);a.lineTo(p.x+B-u-e*m,p.y-B-u+d*m);a.stroke()}});
mxMarker.addMarker("halfCircle",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),u=b.clone();b.x-=p;b.y-=t;return function(){a.begin();a.moveTo(u.x-t,u.y+p);a.quadTo(b.x-t,b.y+p,b.x,b.y);a.quadTo(b.x+t,b.y-p,u.x+t,u.y-p);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d,e,g,l,m,v){c=d*m*1.118;f=e*m*1.118;d*=g+m;e*=g+m;var p=b.clone();p.x-=c;p.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-d-e/2,p.y-e+d/2):a.lineTo(p.x+e/2-d,p.y-e-d/2);
a.moveTo(b.x-p/2-t/2,b.y-t/2+p/2);a.lineTo(b.x+t/2-3*p/2,b.y-3*t/2-p/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),B=b.x+p/2,u=b.y+t/2;b.x-=p;b.y-=t;return function(){a.begin();a.moveTo(B-p/2-t/2,u-t/2+p/2);a.lineTo(B-p/2+t/2,u-t/2-p/2);a.lineTo(B+t/2-3*p/2,u-3*t/2-p/2);a.lineTo(B-t/2-3*p/2,u-3*t/2+p/2);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1);return function(){a.begin();
a.moveTo(b.x-p/2-t/2,b.y-t/2+p/2);a.lineTo(b.x+t/2-3*p/2,b.y-3*t/2-p/2);a.moveTo(b.x-p/2+t/2,b.y-t/2-p/2);a.lineTo(b.x-t/2-3*p/2,b.y-3*t/2+p/2);a.stroke()}});mxMarker.addMarker("circle",ya);mxMarker.addMarker("circlePlus",function(a,c,f,b,d,e,g,l,m,v){var p=b.clone(),t=ya.apply(this,arguments),B=d*(g+2*m),u=e*(g+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(p.x-d*m,p.y-e*m);a.lineTo(p.x-2*B+d*m,p.y-2*u+e*m);a.moveTo(p.x-B-u+e*m,p.y-u+B-d*m);a.lineTo(p.x+u-B-e*m,p.y-u-B+d*m);a.stroke()}});
mxMarker.addMarker("halfCircle",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),B=b.clone();b.x-=p;b.y-=t;return function(){a.begin();a.moveTo(B.x-t,B.y+p);a.quadTo(b.x-t,b.y+p,b.x,b.y);a.quadTo(b.x+t,b.y-p,B.x+t,B.y-p);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d,e,g,l,m,v){c=d*m*1.118;f=e*m*1.118;d*=g+m;e*=g+m;var p=b.clone();p.x-=c;p.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-d-e/2,p.y-e+d/2):a.lineTo(p.x+e/2-d,p.y-e-d/2);
a.lineTo(p.x-d,p.y-e);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,f,b,d,e,g,l,m,v,p){e*=l+v;g*=l+v;var t=d.clone();return function(){c.begin();c.moveTo(t.x,t.y);m?c.lineTo(t.x-e-g/a,t.y-g+e/a):c.lineTo(t.x+g/a-e,t.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Pa=function(a,c,f){return Fa(a,["width"],c,function(c,b,d,e,g){g=a.shape.getEdgeWidth()*a.view.scale+f;return new mxPoint(e.x+b*c/4+d*g/2,e.y+
d*c/4-b*g/2)},function(c,b,d,e,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-f})},Fa=function(a,c,f,b,d){return U(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=a.view.scale,l=f?d[0]:d[e],d=f?d[1]:d[e-1],e=d.x-l.x,m=d.y-l.y,v=Math.sqrt(e*e+m*m),l=b.call(this,v,e/v,m/v,l,d);return new mxPoint(l.x/g-c.x,l.y/g-c.y)},function(c,b,e){var g=a.absolutePoints,l=g.length-1;c=a.view.translate;var m=a.view.scale,v=f?g[0]:
g[l],g=f?g[1]:g[l-1],l=g.x-v.x,p=g.y-v.y,t=Math.sqrt(l*l+p*p);b.x=(b.x+c.x)*m;b.y=(b.y+c.y)*m;d.call(this,t,l/t,p/t,v,g,b,e)})},za=function(a){return function(c){return[U(c,["arrowWidth","arrowSize"],function(c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ja.prototype.arrowWidth))),b=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",ja.prototype.arrowSize)));return new mxPoint(c.x+(1-b)*c.width,c.y+(1-f)*c.height/2)},function(c,f){this.state.style.arrowWidth=
@ -2858,8 +2858,8 @@ Math.max(0,50*(c.y-a.y)/a.height)},!0)]},cylinder2:function(a){return[U(a,["size
function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},step:Ga(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ga(G.prototype.size,!0,.5,!0,G.prototype.fixedSize),curlyBracket:Ga(x.prototype.size,!1),display:Ga(ta.prototype.size,!1),cube:Ka(1,b.prototype.size,!1),card:Ka(.5,l.prototype.size,!0),loopLimit:Ka(.5,Q.prototype.size,!0),trapezoid:Ma(.5,t.prototype.size,t.prototype.fixedSize),parallelogram:Ma(1,u.prototype.size,u.prototype.fixedSize)};Graph.createHandle=
U;Graph.handleFactory=Ha;var Va=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Va.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)?c=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(c=mxConstants.SHAPE_SWIMLANE);c=Ha[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&&
(c=Ha[mxConstants.SHAPE_RECTANGLE]);null!=c&&(c=c(this.state),null!=c&&(a=null==a?c:a.concat(c)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ha[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),Ja=new mxPoint(1,0),za=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,
Math.cos(za),Math.sin(za)),za=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(za),Math.sin(za));mxEdgeStyle.IsometricConnector=function(a,c,f,b,d){var e=a.view;b=null!=b&&0<b.length?b[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=b&&(b=e.transformControlPoint(a,b));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),f.getCenterY()));var m=Ia.x,v=Ia.y,p=Ja.x,t=Ja.y,u="horizontal"==mxUtils.getValue(a.style,"elbow",
"horizontal");if(null!=g&&null!=l){a=function(a,c,f){a-=B.x;var b=c-B.y;c=(t*a-p*b)/(m*t-v*p);a=(v*a-m*b)/(v*p-m*t);u?(f&&(B=new mxPoint(B.x+m*c,B.y+v*c),d.push(B)),B=new mxPoint(B.x+p*a,B.y+t*a)):(f&&(B=new mxPoint(B.x+p*a,B.y+t*a),d.push(B)),B=new mxPoint(B.x+m*c,B.y+v*c));d.push(B)};var B=l;null==b&&(b=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(b.x,b.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Wa=Graph.prototype.createEdgeHandler;
Math.cos(za),Math.sin(za)),za=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(za),Math.sin(za));mxEdgeStyle.IsometricConnector=function(a,c,f,b,d){var e=a.view;b=null!=b&&0<b.length?b[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=b&&(b=e.transformControlPoint(a,b));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),f.getCenterY()));var m=Ia.x,v=Ia.y,p=Ja.x,t=Ja.y,B="horizontal"==mxUtils.getValue(a.style,"elbow",
"horizontal");if(null!=g&&null!=l){a=function(a,c,f){a-=u.x;var b=c-u.y;c=(t*a-p*b)/(m*t-v*p);a=(v*a-m*b)/(v*p-m*t);B?(f&&(u=new mxPoint(u.x+m*c,u.y+v*c),d.push(u)),u=new mxPoint(u.x+p*a,u.y+t*a)):(f&&(u=new mxPoint(u.x+p*a,u.y+t*a),d.push(u)),u=new mxPoint(u.x+m*c,u.y+v*c));d.push(u)};var u=l;null==b&&(b=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(b.x,b.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Wa=Graph.prototype.createEdgeHandler;
Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(a);f.snapToTerminals=!1;return f}return Wa.apply(this,arguments)};e.prototype.constraints=[];d.prototype.getConstraints=function(a,c,f){a=[];var b=Math.tan(mxUtils.toRadians(30)),d=(.5-b)/2,b=Math.min(c,f/(.5+b));c=(c-b)/2;f=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+b*d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c+b,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+b,f+.75*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+(1-d)*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.75*b));return a};q.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,b=Math.min(c*Math.tan(b),.5*f);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));
a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f-b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));return a};A.prototype.getConstraints=function(a,c,f){a=[];mxUtils.getValue(this.style,
@ -2936,14 +2936,14 @@ a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container
(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-
d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,
parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(b,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var n=null,n=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);
n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});
n=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));
n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},
null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});n.setToggleAction(!0);
n.setSelectedCallback(function(){return b.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){q=!1}),q=!0)}));n=mxUtils.bind(this,function(a,f,b,e){return this.addAction(a,function(){if(null!=
b&&d.cellEditor.isContentEditing())b();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,a);(f&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):
(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var c=0;c<a.length;c++)0==d.model.getChildCount(a[c])&&d.autoSizeCell(a[c],!1)}finally{d.getModel().endUpdate()}}},null,null,e)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},
Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});
n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled());b.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);
n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",
mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());
b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});
n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){q=!1}),q=!0)}));n=mxUtils.bind(this,function(a,f,b,e){return this.addAction(a,
function(){if(null!=b&&d.cellEditor.isContentEditing())b();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,a);(f&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==
a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var c=0;c<a.length;c++)0==d.model.getChildCount(a[c])&&d.autoSizeCell(a[c],!1)}finally{d.getModel().endUpdate()}}},null,null,e)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",
!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});
this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,
null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",
@ -2996,8 +2996,8 @@ DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC||"1"==urlParam
DrawioFile.prototype.getLatestVersion=function(a,b){a(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(a){this.setDescriptorRevisionId(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(a){this.setDescriptorEtag(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};
DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(a,b){this.setDescriptorEtag(a,b)};DrawioFile.prototype.getDescriptorRevisionId=function(a){return this.getDescriptorEtag(a)};DrawioFile.prototype.setDescriptorEtag=function(a,b){};DrawioFile.prototype.getDescriptorEtag=function(a){return null};DrawioFile.prototype.getDescriptorSecret=function(a){return null};
DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(a,b){var e=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("pageViewChanged",
this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(a=null!=a?a:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+a+'">'+a+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),0<a.length&&this.isRevisionHistorySupported()&&(a[0].style.cursor="pointer",a[0].style.textDecoration="underline",mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=Editor.guid());var a={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(a));EditorUi.debug("draft saved",this.draftId,a)}catch(b){console.error(b),this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(this.ui.removeDatabaseItem(".draft_"+this.draftId),EditorUi.debug("draft deleted",".draft_"+this.draftId))}catch(a){}};
@ -3210,8 +3210,8 @@ if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.g
"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return y.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=D.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);
return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,f,d,e,g,l,m,p,t,u){var k=null;u||null==this.themes||"darkTheme"!=this.defaultThemeName||(k=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
this.refresh());var n=z.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var x=n.ownerDocument,v=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");null!=x.setAttributeNS?v.setAttributeNS("type","text/css"):v.setAttribute("type","text/css");for(var y="",A="",B=0;B<this.extFonts.length;B++){var q=this.extFonts[B].name,D=this.extFonts[B].url;0==D.indexOf(Editor.GOOGLE_FONTS)?y+="@import url("+D+");\n":A+='@font-face {\nfont-family: "'+
q+'";\nsrc: url("'+D+'");\n}\n'}v.appendChild(x.createTextNode(y+A));n.getElementsByTagName("defs")[0].appendChild(v)}null!=k&&(this.stylesheet=k,this.refresh());return n};var E=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=E.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
this.refresh());var n=z.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var x=n.ownerDocument,v=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");null!=x.setAttributeNS?v.setAttributeNS("type","text/css"):v.setAttribute("type","text/css");for(var y="",B="",A=0;A<this.extFonts.length;A++){var q=this.extFonts[A].name,D=this.extFonts[A].url;0==D.indexOf(Editor.GOOGLE_FONTS)?y+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
q+'";\nsrc: url("'+D+'");\n}\n'}v.appendChild(x.createTextNode(y+B));n.getElementsByTagName("defs")[0].appendChild(v)}null!=k&&(this.stylesheet=k,this.refresh());return n};var E=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=E.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
mxConstants.DIALECT_STRICTHTML)){var f=a.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var d=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=f.innerHTML&&(d=a.text.value,a.text.value=f.innerHTML,c.apply(this,arguments),a.text.value=d)}}else c.apply(this,arguments)}}return a};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,
arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),
this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
@ -3245,7 +3245,7 @@ f);x.height=Math.ceil(x.height*f);y*=f;!q&&c.pageVisible?(u=c.getPageLayout(),k-
null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=c.extFonts)for(var f=0;f<c.extFonts.length;f++){var d=c.extFonts[f].name,e=c.extFonts[f].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var B=
b.renderPage;b.renderPage=function(c,b,f,d,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var m=B.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,e,!0);null!=k&&(d.stylesheet=k,d.refresh())}else{x=
c.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";b.backgroundColor=x;b.autoOrigin=q;b.appendGraph(c,y,k,n,e,!0);if(null!=c.extFonts&&null!=b.wnd)for(e=0;e<c.extFonts.length;e++)k=c.extFonts[e].name,n=c.extFonts[e].url,0==n.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+n+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+k+'";\n\tsrc: url("'+n+'");\n}'),
b.wnd.document.writeln("</style>"))}g&&(c.useCssTransforms=g,c.currentTranslate=l,c.currentScale=m,c.view.translate=p,c.view.scale=t);return b}var f=parseInt(ma.value)/100;isNaN(f)&&(f=1,ma.value="100 %");var f=.75*f,e=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(e=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=k.value,l=n.value,p=!t.checked,u=null;if(a.isDesktopApp())PrintDialog.electronPrint(a,t.checked,g,l,A.checked,J.value,Q.value,parseInt(v.value)/100,parseInt(ma.value)/
b.wnd.document.writeln("</style>"))}g&&(c.useCssTransforms=g,c.currentTranslate=l,c.currentScale=m,c.view.translate=p,c.view.scale=t);return b}var f=parseInt(ma.value)/100;isNaN(f)&&(f=1,ma.value="100 %");var f=.75*f,e=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(e=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=k.value,l=n.value,p=!t.checked,u=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,t.checked,g,l,A.checked,J.value,Q.value,parseInt(v.value)/100,parseInt(ma.value)/
100,ba.get());else{p&&(p=g==m&&l==m);if(!p&&null!=a.pages&&a.pages.length){var x=0,p=a.pages.length-1;t.checked||(x=parseInt(g)-1,p=parseInt(l)-1);for(var y=x;y<=p;y++){var q=a.pages[y],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,x=!1,z=null,D=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,x=q.viewState.mathEnabled,z=q.viewState.background,D=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);
g.background=z;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=l;g.mathEnabled=x;var B=g.getGlobalVariable;g.getGlobalVariable=function(c){return"page"==c?q.getName():"pagenumber"==c?y+1:"pagecount"==c?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}u=b(g,u,y!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else u=b(d);null==u?a.handleError({message:mxResources.get("errorUpdatingPreview")}):
(u.mathEnabled&&(p=u.wnd.document,c&&(u.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),u.closeDocument(),!u.mathEnabled&&c&&PrintDialog.printPreview(u));null!=e&&(d.stylesheet=e,d.refresh())}}var d=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var l=1,m=1,p=
@ -3273,22 +3273,22 @@ e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(m){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(p){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}try{b=
document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isDesktopApp=function(){return!1};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||
!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",
g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&
(e+="..."),g.innerHTML=e,d.appendChild(g),c.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&null!=c.status.parentNode&&
c.status.parentNode.removeChild(c.status);c.status=null};c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==
a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&
120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");
e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(c),p=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=p?mxUtils.getXml(p):""}catch(u){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));
a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?
this.pages:[];for(var e=d.length-1;0<=e;e--){var p=this.updatePageRoot(new DiagramPage(d[e]));null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,p,0==e?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,
this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,m,p,u,t,k,n,q){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;k=null!=k?k:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=
g.nodeName.toLowerCase()){if(q){var l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());l.appendChild(a)}else{l=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(l);if(Graph.decompress(g)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(l)}n?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),
g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),
g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!p&&!m&&(u||null!=d&&/(\.html)$/i.test(d.getTitle())))q=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(p||!m&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&
d.getMode()!=App.MODE_BROWSER||(e=null),q=this.getEmbeddedSvg(q,b,e,null,t,k,f);return q};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):
null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize=
"9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,d.appendChild(g),c.status=g,mxClient.IS_VML&&
(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&null!=c.status.parentNode&&c.status.parentNode.removeChild(c.status);c.status=null};
c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,
">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(c),p=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=p?mxUtils.getXml(p):""}catch(u){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var p=this.updatePageRoot(new DiagramPage(d[e]));
null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,p,0==e?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=
this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,m,p,u,t,k,n,q){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;k=null!=k?k:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(q){var l=a.ownerDocument.createElement("diagram");l.setAttribute("id",
Editor.guid());l.appendChild(a)}else{l=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(l);if(Graph.decompress(g)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(l)}n?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),
g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),
a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!p&&!m&&(u||null!=d&&/(\.html)$/i.test(d.getTitle())))q=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(p||!m&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),q=this.getEmbeddedSvg(q,b,
e,null,t,k,f);return q};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||d?a=a.cloneNode(!0):
(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d=a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):
/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(p){a[EditorUi.DIFF_INSERT][c].data=
p.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&
@ -3344,7 +3344,7 @@ F(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(l,function(){},mxUtils.b
"",l.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),l.style.backgroundColor="",l.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(l,"dragover",mxUtils.bind(this,
function(a){l.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";l.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(a){l.style.cursor="";l.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,m,p,t,k,n,u){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,t),c)],c[0].vertex=!0,F(c,new mxRectangle(0,0,p,t),a,mxEvent.isAltDown(a)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var x=!1,y=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var m=
JSON.parse(mxUtils.getTextContent(e.documentElement));g(m,l);b=b.concat(m);G(a);this.spinner.stop();x=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var t=this.stringToCells(Editor.getDiagramNodeXml(p[m])),k=this.editor.graph.getBoundingBoxFromGeometry(t);F(t,new mxRectangle(0,0,k.width,k.height),a)}x=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
JSON.parse(mxUtils.getTextContent(e.documentElement));g(m,l);b=b.concat(m);G(a);this.spinner.stop();x=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var k=this.stringToCells(Editor.getDiagramNodeXml(p[m])),t=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,t.width,t.height),a)}x=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=u&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?this.importVisio(u,function(a){y(a,"text/xml")},null,k):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,k)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?y(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):y(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"dragleave",function(a){l.style.cursor="";l.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));n.insertBefore(q,n.firstChild);mxEvent.addListener(q,"click",C);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==
l&&C(a)});e=q.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));n.insertBefore(e,n.firstChild);mxEvent.addListener(e,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
@ -3545,12 +3545,12 @@ window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("l
this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=
function(a){var c=this.editor.graph;return{event:a,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var c=null,b=!1,d=!1,e=null,k=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});
this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&
("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(fa){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(V){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
var k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?n.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==g.action){var m=l(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
m,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(k.container,
640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(V){n.postMessage(JSON.stringify({event:"draft",error:V.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(c,b){c=c||this.emptyDiagramXml;null!=g.callback?n.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,
name:b,message:g}),"*"):(a(c,f,c!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){n.postMessage(JSON.stringify({event:"template",docUrl:a,info:c,name:b}),"*")}),
null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==g.action){var u=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:u,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(fa){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(V){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("layout"==g.action){this.executeLayoutList(g.layouts);
return}if("prompt"==g.action){this.spinner.stop();var k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?n.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==g.action){var m=l(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",
[g.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),
"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(V){n.postMessage(JSON.stringify({event:"draft",error:V.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(c,b){c=c||this.emptyDiagramXml;null!=g.callback?n.postMessage(JSON.stringify({event:"template",
xml:c,blank:c==this.emptyDiagramXml,name:b,message:g}),"*"):(a(c,f,c!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){n.postMessage(JSON.stringify({event:"template",
docUrl:a,info:c,name:b}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==g.action){var u=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:u,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var K=null!=g.xml?
g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var v=this.editor.graph,J=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=g.format;c.message=g;c.data=a;c.xml=K;n.postMessage(JSON.stringify(c),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(K)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);
J(a)}),P=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=P){for(var S=v.getGlobalVariable,v=this.createTemporaryGraph(v.getStylesheet()),H,N=0;N<this.pages.length;N++)if(this.pages[N].getId()==P){H=this.updatePageRoot(this.pages[N]);break}v.getGlobalVariable=function(a){return"page"==a?H.getName():"pagenumber"==a?1:S.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(H.root)}if(null!=g.layerIds){for(var ea=
@ -3865,9 +3865,9 @@ c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=
m=null);b.style.border=E});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==m)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",g):g()};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isCustomLink(d)?mxEvent.consume(e):a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&
a.customLinkClicked(d)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);a="app.diagrams.net";"1"==urlParams.dev&&(e.dev="1",
e.drawdev="1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(e.dev="1");this.lightboxWindow=
window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?
this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var d=Graph.prototype.shadowId;Graph.prototype.shadowId=
@ -6063,8 +6063,8 @@ mxShapeElectricalMux.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(
a.moveTo(b-10,0);a.lineTo(10,.1*c);a.lineTo(10,.9*c-10);a.lineTo(b-10,c-10);a.close();a.fillAndStroke();break;default:a.begin(),a.moveTo(10,0),a.lineTo(b-10,.1*c),a.lineTo(b-10,.9*c-10),a.lineTo(10,c-10),a.close(),a.fillAndStroke()}var g=1,h=1;if("mux"==e)var g=Math.pow(2,d),k=(c-16)/g;else h=Math.pow(2,d),k=(c-16)/h;var l=3+.5*k;a.begin();if(1==g)a.moveTo(0,.5*(c-10)),a.lineTo(10,.5*(c-10));else for(var m=0;m<g;m++)a.moveTo(0,l),a.lineTo(10,l),a.text(14,l+1,0,0,""+m.toString(),mxConstants.ALIGN_CENTER,
mxConstants.ALIGN_MIDDLE,0,null,0,0,f),l+=k;if(1==h)a.moveTo(b-10,.5*(c-10)),a.lineTo(b,.5*(c-10));else for(m=0;m<h;m++)a.moveTo(b-10,l),a.lineTo(b,l),a.text(b-14,l+1,0,0,""+m.toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,f),l+=k;k=(b-20)/d;g=10+.5*k;for(m=0;m<d;m++)"mux"==e?a.moveTo(g,c-10-(g-10)/(b-20)*c*.1):a.moveTo(g,c-10-(b-g-10)/(b-20)*c*.1),a.lineTo(g,c),a.text(g+5,c-4,0,0,"S"+(d-m-1).toString(),mxConstants.ALIGN_CENTER,mxConstants.ALIGN_MIDDLE,0,null,0,0,f),g+=k;
a.stroke()};mxCellRenderer.registerShape(mxShapeElectricalMux.prototype.cst.SHAPE_MUX,mxShapeElectricalMux);
mxShapeElectricalMux.prototype.getConstraints=function(a,d,e){a=[];var b=(e-16)/e,c=parseInt(mxUtils.getValue(this.style,"selectorPins","1")),f=mxUtils.getValue(this.style,"operation","mux");mxUtils.getValue(this.style,"direction","east");var g=1,h=1;"mux"==f?(g=Math.pow(2,c),b/=g):(h=Math.pow(2,c),b/=h);f=.5*b;if(1==g)a.push(new mxConnectionConstraint(new mxPoint(0,.5*(e-10)/e),!1,0,0));else for(e=0;e<g;e++)a.push(new mxConnectionConstraint(new mxPoint(0,f),!1,null,0,3)),f+=b;if(1==h)a.push(new mxConnectionConstraint(new mxPoint(1,
.5),!1,null,0,-5));else for(e=0;e<h;e++)a.push(new mxConnectionConstraint(new mxPoint(1,f),!1,null,0,3)),f+=b;b=(d-20)/(d*c);d=.5*b;for(e=0;e<c;e++)a.push(new mxConnectionConstraint(new mxPoint(d,1),!1,null,10,0)),d+=b;return a};function mxShapeElectricalBatteryStack(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalBatteryStack,mxShape);mxShapeElectricalBatteryStack.prototype.cst={SHAPE_BATTERY_STACK:"mxgraph.electrical.miscellaneous.batteryStack"};
mxShapeElectricalMux.prototype.getConstraints=function(a,d,e){a=[];var b=(e-16)/e,c=parseInt(mxUtils.getValue(this.style,"selectorPins","1")),f=1,g=1;"mux"==mxUtils.getValue(this.style,"operation","mux")?(f=Math.pow(2,c),b/=f):(g=Math.pow(2,c),b/=g);var h=.5*b;if(1==f)a.push(new mxConnectionConstraint(new mxPoint(0,.5*(e-10)/e),!1,0,0));else for(e=0;e<f;e++)a.push(new mxConnectionConstraint(new mxPoint(0,h),!1,null,0,3)),h+=b;if(1==g)a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null,0,-5));
else for(e=0;e<g;e++)a.push(new mxConnectionConstraint(new mxPoint(1,h),!1,null,0,3)),h+=b;b=(d-20)/(d*c);d=.5*b;for(e=0;e<c;e++)a.push(new mxConnectionConstraint(new mxPoint(d,1),!1,null,10,0)),d+=b;return a};function mxShapeElectricalBatteryStack(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxShapeElectricalBatteryStack,mxShape);mxShapeElectricalBatteryStack.prototype.cst={SHAPE_BATTERY_STACK:"mxgraph.electrical.miscellaneous.batteryStack"};
mxShapeElectricalBatteryStack.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);d=.3*c;var f=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,"#000000");e=mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,"0");var g=Math.floor((b-20)/d),h=.5*(b-g*d);if(0<g)for(a.begin(),a.moveTo(0,.5*c),a.lineTo(h+.2*d,.5*c),a.moveTo(b-h-.2*d,.5*c),a.lineTo(b,.5*c),a.stroke(),b=h,a.setFillColor(f),f=0;f<g;f++)a.rect(b+.2*d,.25*c,.2*d,.5*c),a.fillAndStroke(),a.begin(),a.moveTo(b+.8*d,0),a.lineTo(b+
.8*d,c),a.stroke(),0<f&&(a.setDashed("1"),a.begin(),a.moveTo(b-.2*d,.5*c),a.lineTo(b+.2*d,.5*c),a.stroke(),a.setDashed(e)),b+=d};mxCellRenderer.registerShape(mxShapeElectricalBatteryStack.prototype.cst.SHAPE_BATTERY_STACK,mxShapeElectricalBatteryStack);mxShapeElectricalBatteryStack.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0)];
function mxFloorplanWall(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxFloorplanWall,mxShape);mxFloorplanWall.prototype.cst={WALL:"mxgraph.floorplan.wall",WALL_THICKNESS:"wallThickness"};mxFloorplanWall.prototype.customProperties=[{name:"wallThickness",dispName:"Thickness",type:"float",min:0,defVal:10}];mxFloorplanWall.prototype.paintVertexShape=function(a,d,e,b,c){a.translate(d,e);this.background(a,d,e,b,c)};

View file

@ -1289,8 +1289,8 @@ mxGraph.prototype.allowNegativeCoordinates=!0;mxGraph.prototype.constrainChildre
mxGraph.prototype.resetEdgesOnResize=!1;mxGraph.prototype.resetEdgesOnMove=!1;mxGraph.prototype.resetEdgesOnConnect=!0;mxGraph.prototype.allowLoops=!1;mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop;mxGraph.prototype.multigraph=!0;mxGraph.prototype.connectableEdges=!1;mxGraph.prototype.allowDanglingEdges=!0;mxGraph.prototype.cloneInvalidEdges=!1;mxGraph.prototype.disconnectOnMove=!0;mxGraph.prototype.labelsVisible=!0;mxGraph.prototype.htmlLabels=!1;mxGraph.prototype.swimlaneSelectionEnabled=!0;
mxGraph.prototype.swimlaneNesting=!0;mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(a){return this.isEditing()||!this.isMouseDown&&!mxEvent.isShiftDown(a)})));8==document.documentMode&&
a.insertAdjacentHTML("beforeend","<"+mxClient.VML_PREFIX+':group style="DISPLAY: none;"></'+mxClient.VML_PREFIX+":group>")};
mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(a){null!=this.tooltipHandler&&null!=this.tooltipHandler.div&&this.tooltipHandler.div!=a.relatedTarget&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(a){return this.isEditing()||
!this.isMouseDown&&!mxEvent.isShiftDown(a)})));8==document.documentMode&&a.insertAdjacentHTML("beforeend","<"+mxClient.VML_PREFIX+':group style="DISPLAY: none;"></'+mxClient.VML_PREFIX+":group>")};
mxGraph.prototype.createHandlers=function(){this.tooltipHandler=this.createTooltipHandler();this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=this.createSelectionCellsHandler();this.connectionHandler=this.createConnectionHandler();this.connectionHandler.setEnabled(!1);this.graphHandler=this.createGraphHandler();this.panningHandler=this.createPanningHandler();this.panningHandler.panningEnabled=!1;this.popupMenuHandler=this.createPopupMenuHandler()};
mxGraph.prototype.createTooltipHandler=function(){return new mxTooltipHandler(this)};mxGraph.prototype.createSelectionCellsHandler=function(){return new mxSelectionCellsHandler(this)};mxGraph.prototype.createConnectionHandler=function(){return new mxConnectionHandler(this)};mxGraph.prototype.createGraphHandler=function(){return new mxGraphHandler(this)};mxGraph.prototype.createPanningHandler=function(){return new mxPanningHandler(this)};mxGraph.prototype.createPopupMenuHandler=function(){return new mxPopupMenuHandler(this)};
mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
@ -1834,7 +1834,7 @@ mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.preferHt
0>=mxGraphHandler.prototype.maxCells)this.bends=this.createBends(),this.isVirtualBendsEnabled()&&(this.virtualBends=this.createVirtualBends());this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape=this.createLabelHandleShape();this.initBend(this.labelShape);this.labelShape.setCursor(mxConstants.CURSOR_LABEL_HANDLE);this.customHandles=this.createCustomHandles();this.updateParentHighlight();this.redraw()};mxEdgeHandler.prototype.isParentHighlightVisible=function(){return!0};
mxEdgeHandler.prototype.updateParentHighlight=mxVertexHandler.prototype.updateParentHighlight;mxEdgeHandler.prototype.createCustomHandles=function(){return null};mxEdgeHandler.prototype.isVirtualBendsEnabled=function(a){return this.virtualBendsEnabled&&(null==this.state.style[mxConstants.STYLE_EDGE]||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.NONE||1==this.state.style[mxConstants.STYLE_NOEDGESTYLE])&&"arrow"!=mxUtils.getValue(this.state.style,mxConstants.STYLE_SHAPE,null)};
mxEdgeHandler.prototype.isCellEnabled=function(a){return!0};mxEdgeHandler.prototype.isAddPointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.isRemovePointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.getSelectionPoints=function(a){return a.absolutePoints};
mxEdgeHandler.prototype.createParentHighlightShape=function(a){a=new mxRectangleShape(a,null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new this.state.shape.constructor;a.outline=!0;a.apply(this.state);a.isDashed=this.isSelectionDashed();a.stroke=this.getSelectionColor();a.isShadow=!1;return a};mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};
mxEdgeHandler.prototype.createParentHighlightShape=function(a){a=new mxRectangleShape(mxRectangle.fromRectangle(a),null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new this.state.shape.constructor;a.outline=!0;a.apply(this.state);a.isDashed=this.isSelectionDashed();a.stroke=this.getSelectionColor();a.isShadow=!1;return a};mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};
mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH};mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED};mxEdgeHandler.prototype.isConnectableCell=function(a){return!0};mxEdgeHandler.prototype.getCellAt=function(a,b){return this.outlineConnect?null:this.graph.getCellAt(a,b)};
mxEdgeHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph),b=this;a.getCell=function(a){var c=mxCellMarker.prototype.getCell.apply(this,arguments);c!=b.state.cell&&null!=c||null==b.currentPoint||(c=b.graph.getCellAt(b.currentPoint.x,b.currentPoint.y));if(null!=c&&!this.graph.isCellConnectable(c)){var e=this.graph.getModel().getParent(c);this.graph.getModel().isVertex(e)&&this.graph.isCellConnectable(e)&&(c=e)}e=b.graph.getModel();if(this.graph.isSwimlane(c)&&null!=b.currentPoint&&
this.graph.hitsSwimlaneContent(c,b.currentPoint.x,b.currentPoint.y)||!b.isConnectableCell(c)||c==b.state.cell||null!=c&&!b.graph.connectableEdges&&e.isEdge(c)||e.isAncestor(b.state.cell,c))c=null;this.graph.isCellConnectable(c)||(c=null);return c};a.isValidState=function(a){var c=b.graph.getModel(),c=b.graph.view.getTerminalPort(a,b.graph.view.getState(c.getTerminal(b.state.cell,!b.isSource)),!b.isSource),c=null!=c?c.cell:null;b.error=b.validateConnection(b.isSource?a.cell:c,b.isSource?c:a.cell);
@ -1931,7 +1931,7 @@ mxKeyHandler.prototype.isGraphEvent=function(a){var b=mxEvent.getSource(a);retur
mxKeyHandler.prototype.isEnabledForEvent=function(a){return this.graph.isEnabled()&&!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled()};mxKeyHandler.prototype.isEventIgnored=function(a){return this.graph.isEditing()};mxKeyHandler.prototype.escape=function(a){this.graph.isEscapeEnabled()&&this.graph.escape(a)};
mxKeyHandler.prototype.destroy=function(){null!=this.target&&null!=this.keydownHandler&&(mxEvent.removeListener(this.target,"keydown",this.keydownHandler),this.keydownHandler=null);this.target=null};function mxTooltipHandler(a,b){null!=a&&(this.graph=a,this.delay=b||500,this.graph.addMouseListener(this))}mxTooltipHandler.prototype.zIndex=10005;mxTooltipHandler.prototype.graph=null;mxTooltipHandler.prototype.delay=null;mxTooltipHandler.prototype.ignoreTouchEvents=!0;
mxTooltipHandler.prototype.hideOnHover=!1;mxTooltipHandler.prototype.destroyed=!1;mxTooltipHandler.prototype.enabled=!0;mxTooltipHandler.prototype.isEnabled=function(){return this.enabled};mxTooltipHandler.prototype.setEnabled=function(a){this.enabled=a};mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover};mxTooltipHandler.prototype.setHideOnHover=function(a){this.hideOnHover=a};
mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.hideTooltip()})))};mxTooltipHandler.prototype.getStateForEvent=function(a){return a.getState()};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){"A"!=mxEvent.getSource(a).nodeName&&this.hideTooltip()})))};mxTooltipHandler.prototype.getStateForEvent=function(a){return a.getState()};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
mxTooltipHandler.prototype.mouseMove=function(a,b){if(b.getX()!=this.lastX||b.getY()!=this.lastY){this.reset(b,!0);var c=this.getStateForEvent(b);(this.isHideOnHover()||c!=this.state||b.getSource()!=this.node&&(!this.stateSource||null!=c&&this.stateSource==(b.isSource(c.shape)||!b.isSource(c.text))))&&this.hideTooltip()}this.lastX=b.getX();this.lastY=b.getY()};mxTooltipHandler.prototype.mouseUp=function(a,b){this.reset(b,!0);this.hideTooltip()};
mxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)};
mxTooltipHandler.prototype.reset=function(a,b,c){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),c=null!=c?c:this.getStateForEvent(a),b&&this.isEnabled()&&null!=c&&(null==this.div||"hidden"==this.div.style.visibility)){var d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()&&!this.graph.isMouseDown){var a=
@ -2234,7 +2234,7 @@ function(){return keyHandler};var A="rounded shadow glass dashed dashPattern lab
d.view.getState(a);if(null!=c){var f=a.clone();f.style="";var b=d.getCellStyle(f);a=[];var f=[],g;for(g in c.style)b[g]!=c.style[g]&&(a.push(c.style[g]),f.push(g));for(var e=d.getModel().getStyle(c.cell),l=null!=e?e.split(";"):[],e=0;e<l.length;e++){var p=l[e],m=p.indexOf("=");if(0<=m){g=p.substring(0,m);var v=p.substring(m+1);null!=b[g]&&"none"==v&&(a.push(v),f.push(g))}}d.getModel().isEdge(c.cell)?d.currentEdgeStyle={}:d.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",
f,"values",a,"cells",[c.cell]))}}catch(W){this.handleError(W)}};this.clearDefaultStyle=function(){d.currentEdgeStyle=mxUtils.clone(d.defaultEdgeStyle);d.currentVertexStyle=mxUtils.clone(d.defaultVertexStyle);this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var G=["fontFamily","fontSize","fontColor"],F="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),I=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),
["strokeColor","strokeWidth"],["fillColor","gradientColor"],G,["opacity"],["align"],["html"]];for(a=0;a<I.length;a++)for(b=0;b<I[a].length;b++)A.push(I[a][b]);for(a=0;a<C.length;a++)0>mxUtils.indexOf(A,C[a])&&A.push(C[a]);var K=function(a,c,f){f=null!=f?f:d.getModel();f.beginUpdate();try{for(var b=0;b<a.length;b++){var g=a[b],e;if(c)e=["fontSize","fontFamily","fontColor"];else{var l=f.getStyle(g),p=null!=l?l.split(";"):[];e=A.slice();for(var m=0;m<p.length;m++){var v=p[m],B=v.indexOf("=");if(0<=B){var t=
v.substring(0,B),u=mxUtils.indexOf(e,t);0<=u&&e.splice(u,1);for(var J=0;J<I.length;J++){var n=I[J];if(0<=mxUtils.indexOf(n,t))for(var k=0;k<n.length;k++){var x=mxUtils.indexOf(e,n[k]);0<=x&&e.splice(x,1)}}}}}for(var y=f.isEdge(g),q=y?d.currentEdgeStyle:d.currentVertexStyle,D=f.getStyle(g),m=0;m<e.length;m++){var t=e[m],z=q[t];null==z||"shape"==t&&!y||y&&!(0>mxUtils.indexOf(C,t))||(D=mxUtils.setStyle(D,t,z))}f.setStyle(g,D)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){K(c.getProperty("cells"))});
v.substring(0,B),u=mxUtils.indexOf(e,t);0<=u&&e.splice(u,1);for(var n=0;n<I.length;n++){var k=I[n];if(0<=mxUtils.indexOf(k,t))for(var x=0;x<k.length;x++){var J=mxUtils.indexOf(e,k[x]);0<=J&&e.splice(J,1)}}}}}for(var y=f.isEdge(g),q=y?d.currentEdgeStyle:d.currentVertexStyle,D=f.getStyle(g),m=0;m<e.length;m++){var t=e[m],z=q[t];null==z||"shape"==t&&!y||y&&!(0>mxUtils.indexOf(C,t))||(D=mxUtils.setStyle(D,t,z))}f.setStyle(g,D)}}finally{f.endUpdate()}};d.addListener("cellsInserted",function(a,c){K(c.getProperty("cells"))});
d.addListener("textInserted",function(a,c){K(c.getProperty("cells"),!0)});this.insertHandler=K;d.connectionHandler.addListener(mxEvent.CONNECT,function(a,c){var f=[c.getProperty("cell")];c.getProperty("terminalInserted")&&f.push(c.getProperty("terminal"));K(f)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var f=c.getProperty("cells"),b=!1,g=!1;if(0<f.length)for(var e=0;e<f.length&&(b=d.getModel().isVertex(f[e])||b,!(g=d.getModel().isEdge(f[e])||g)||!b);e++);else g=b=!0;for(var f=
c.getProperty("keys"),l=c.getProperty("values"),e=0;e<f.length;e++){var m=0<=mxUtils.indexOf(G,f[e]);if("strokeColor"!=f[e]||null!=l[e]&&"none"!=l[e])if(0<=mxUtils.indexOf(C,f[e]))g||0<=mxUtils.indexOf(F,f[e])?null==l[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=l[e]:b&&0<=mxUtils.indexOf(A,f[e])&&(null==l[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=l[e]);else if(0<=mxUtils.indexOf(A,f[e])){if(b||m)null==l[e]?delete d.currentVertexStyle[f[e]]:d.currentVertexStyle[f[e]]=
l[e];if(g||m||0<=mxUtils.indexOf(F,f[e]))null==l[e]?delete d.currentEdgeStyle[f[e]]:d.currentEdgeStyle[f[e]]=l[e]}}null!=this.toolbar&&(this.toolbar.setFontName(d.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(d.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==d.currentEdgeStyle.edgeStyle&&"1"==d.currentEdgeStyle.curved?"geSprite geSprite-curved":
@ -2274,7 +2274,7 @@ null;d.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):b=e.a
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
EditorUi.prototype.initCanvas=function(){var a=this.editor.graph;a.timerAutoScroll=!0;a.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((a.container.offsetWidth-34)/a.view.scale)),Math.max(0,Math.round((a.container.offsetHeight-34)/a.view.scale)))};a.view.getBackgroundPageBounds=function(){var a=this.graph.getPageLayout(),c=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+a.x*c.width),this.scale*(this.translate.y+a.y*c.height),this.scale*a.width*c.width,
this.scale*a.height*c.height)};a.getPreferredPageSize=function(a,c,f){a=this.getPageLayout();c=this.getPageSize();return new mxRectangle(0,0,a.width*c.width,a.height*c.height)};var b=null,e=this;if(this.editor.isChromelessView()){this.chromelessResize=b=mxUtils.bind(this,function(c,f,d,b){if(null!=a.container&&!a.isViewer()){d=null!=d?d:0;b=null!=b?b:0;var g=a.pageVisible?a.view.getBackgroundPageBounds():a.getGraphBounds(),e=mxUtils.hasScrollbars(a.container),l=a.view.translate,m=a.view.scale,p=mxRectangle.fromRectangle(g);
p.x=p.x/m-l.x;p.y=p.y/m-l.y;p.width/=m;p.height/=m;var l=a.container.scrollTop,v=a.container.scrollLeft,t=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)t+=3;var B=a.container.offsetWidth-t,t=a.container.offsetHeight-t;c=c?Math.max(.3,Math.min(f||1,B/p.width)):m;f=(B-c*p.width)/2/c;var u=0==this.lightboxVerticalDivider?0:(t-c*p.height)/this.lightboxVerticalDivider/c;e&&(f=Math.max(f,0),u=Math.max(u,0));if(e||g.width<B||g.height<t)a.view.scaleAndTranslate(c,
p.x=p.x/m-l.x;p.y=p.y/m-l.y;p.width/=m;p.height/=m;var l=a.container.scrollTop,v=a.container.scrollLeft,B=mxClient.IS_QUIRKS||8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)B+=3;var t=a.container.offsetWidth-B,B=a.container.offsetHeight-B;c=c?Math.max(.3,Math.min(f||1,t/p.width)):m;f=(t-c*p.width)/2/c;var u=0==this.lightboxVerticalDivider?0:(B-c*p.height)/this.lightboxVerticalDivider/c;e&&(f=Math.max(f,0),u=Math.max(u,0));if(e||g.width<t||g.height<B)a.view.scaleAndTranslate(c,
Math.floor(f-p.x),Math.floor(u-p.y)),a.container.scrollTop=l*c/m,a.container.scrollLeft=v*c/m;else if(0!=d||0!=b)g=a.view.translate,a.view.setTranslate(Math.floor(g.x+d/m),Math.floor(g.y+b/m))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var d=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",d);this.destroyFunctions.push(function(){mxEvent.removeListener(window,"resize",d)});this.editor.addListener("resetGraphView",
mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(c){a.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(c){a.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var k=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position="fixed";this.chromelessToolbar.style.overflow="hidden";
this.chromelessToolbar.style.boxSizing="border-box";this.chromelessToolbar.style.whiteSpace="nowrap";this.chromelessToolbar.style.backgroundColor="#000000";this.chromelessToolbar.style.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=a.isViewer()?"0":"50%";mxClient.IS_VML||(mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"borderRadius","20px"),mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out"));var n=mxUtils.bind(this,function(){var c=
@ -2283,27 +2283,27 @@ f);a=document.createElement("img");a.setAttribute("border","0");a.setAttribute("
f=document.createElement("div");f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontFamily="Helvetica,Arial";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color="#ffffff";this.chromelessToolbar.appendChild(f);var g=n(mxUtils.bind(this,function(a){this.actions.get("nextPage").funct();mxEvent.consume(a)}),Editor.nextLargeImage,mxResources.get("nextPage")),l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerHTML="",mxUtils.write(f,
mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});c.style.paddingLeft="0px";c.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",c.style.display="",f.style.display="inline-block"):(g.style.display="none",c.style.display="none",f.style.display="none");l()});this.editor.addListener("resetGraphView",m);this.editor.addListener("pageSelected",
l)}n(mxUtils.bind(this,function(a){this.actions.get("zoomOut").funct();mxEvent.consume(a)}),Editor.zoomOutLargeImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(a){this.actions.get("zoomIn").funct();mxEvent.consume(a)}),Editor.zoomInLargeImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");n(mxUtils.bind(this,function(c){a.isLightboxView()?(1==a.view.scale?this.lightboxFit():a.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(c)}),Editor.actualSizeLargeImage,
mxResources.get("fit"));var p=null,u=null,t=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=u&&(window.clearTimeout(u),fadeThead2=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),a||200)}),x=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),fadeThead=null);null!=u&&(window.clearTimeout(u),
fadeThead2=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var y=n(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=
null}));var f=y.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+
this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){y.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(c){null!=
this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var z=this.lightboxToolbarActions[m];n(z.fn,z.icon,z.tooltip)}null!=k.refreshBtn&&n(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:
window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&window.self!==window.top&&n(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,
function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||
x(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():x(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():x(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||
x(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-a.container.scrollTop)<E&&Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<
E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?t():x(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var A=a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}A.apply(this,arguments)};if(!a.isViewer()){var C=a.sizeDidChange;a.sizeDidChange=
function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),d=this.getPageSize(),b=Math.ceil(2*f.x+c.width*d.width),g=Math.ceil(2*f.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=b||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,b,g);b=f.x-c.x*d.width;f=f.y-c.y*d.height;this.autoTranslate||this.view.translate.x==b&&this.view.translate.y==f?C.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=
c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,K=null,v=null,J=null,B=function(c){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,
function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";G.style.transform=""},0)):(F.style.transform=
"",G.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),f=mxUtils.getOffset(a.container),d=a.view.scale,g=0,l=0;null!=K&&(g=a.container.offsetWidth/2-K.x+f.x,l=a.container.offsetHeight/2-K.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=d&&(null!=v&&(g+=c.x-v.x,l+=c.y-v.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||
0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=J&&F.setAttribute("filter",J);a.cumulativeZoomFactor=1;J=K=v=I=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(K=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*
this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==J&&""!=F.getAttribute("filter")&&(J=F.getAttribute("filter"),F.removeAttribute("filter"));v=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:K.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:K.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+b+"px";F.style.transform="scale("+
this.cumulativeZoomFactor+")";G.style.transformOrigin=c+"px "+b+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(f?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":K.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(f?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":K.y+
a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity="0";null!=e.hoverIcons&&e.hoverIcons.reset()}B(d)};mxEvent.addGestureListeners(a.container,function(a){null!=I&&window.clearTimeout(I)},null,function(c){1!=a.cumulativeZoomFactor&&B(0)});mxEvent.addListener(a.container,"scroll",function(){I&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&
B(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c)){d=a.view.getTranslate();var b=40/a.view.scale;mxEvent.isShiftDown(c)?a.view.setTranslate(d.x+(f?-b:b),d.y):a.view.setTranslate(d.x,d.y+(f?b:-b))}else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),K=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f),
mxEvent.consume(c),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
mxResources.get("fit"));var p=null,u=null,t=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=u&&(window.clearTimeout(u),u=null);p=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,0);p=null;u=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";u=null}),600)}),a||200)}),x=mxUtils.bind(this,function(a){null!=p&&(window.clearTimeout(p),p=null);null!=u&&(window.clearTimeout(u),u=null);this.chromelessToolbar.style.display=
"";mxUtils.setOpacity(this.chromelessToolbar,a||30)});if("1"==urlParams.layers){this.layersDialog=null;var y=n(mxUtils.bind(this,function(c){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null;else{this.layersDialog=a.createLayersDialog();mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var f=y.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,
"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily="Helvetica,Arial";this.layersDialog.style.backgroundColor="#000000";this.layersDialog.style.width="160px";this.layersDialog.style.padding="4px 2px 4px 2px";this.layersDialog.style.color="#ffffff";mxUtils.setOpacity(this.layersDialog,70);this.layersDialog.style.left=f.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";f=mxUtils.getCurrentStyle(this.editor.graph.container);
this.layersDialog.style.zIndex=f.zIndex;document.body.appendChild(this.layersDialog)}mxEvent.consume(c)}),Editor.layersLargeImage,mxResources.get("layers")),D=a.getModel();D.addListener(mxEvent.CHANGE,function(){y.style.display=1<D.getChildCount(D.root)?"":"none"})}this.addChromelessToolbarItems(n);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||n(mxUtils.bind(this,function(c){null!=this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):
a.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(c)}),Editor.editLargeImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(m=0;m<this.lightboxToolbarActions.length;m++){var z=this.lightboxToolbarActions[m];n(z.fn,z.icon,z.tooltip)}null!=k.refreshBtn&&n(mxUtils.bind(this,function(a){k.refreshBtn.url?window.location.href=k.refreshBtn.url:window.location.reload();mxEvent.consume(a)}),Editor.refreshLargeImage,mxResources.get("refresh",null,"Refresh"));null!=k.fullscreenBtn&&
window.self!==window.top&&n(mxUtils.bind(this,function(c){k.fullscreenBtn.url?a.openLink(k.fullscreenBtn.url):a.openLink(window.location.href);mxEvent.consume(c)}),Editor.fullscreenLargeImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(k.closeBtn&&window.self===window.top||a.lightbox&&("1"==urlParams.close||this.container!=document.body))&&n(mxUtils.bind(this,function(a){"1"==urlParams.close||k.closeBtn?window.close():(this.destroy(),mxEvent.consume(a))}),Editor.closeLargeImage,
mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";a.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");a.container.appendChild(this.chromelessToolbar);mxEvent.addListener(a.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||(mxEvent.isShiftDown(a)||x(30),t())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(a){mxEvent.consume(a)});
mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():x(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(a){mxEvent.isShiftDown(a)?t():x(100);mxEvent.consume(a)}));mxEvent.addListener(this.chromelessToolbar,"mouseleave",mxUtils.bind(this,function(a){mxEvent.isTouchEvent(a)||x(30)}));var E=a.getTolerance();a.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(c,f){this.startX=
f.getGraphX();this.startY=f.getGraphY();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop},mouseMove:function(a,c){},mouseUp:function(c,f){mxEvent.isTouchEvent(f.getEvent())&&Math.abs(this.scrollLeft-a.container.scrollLeft)<E&&Math.abs(this.scrollTop-a.container.scrollTop)<E&&Math.abs(this.startX-f.getGraphX())<E&&Math.abs(this.startY-f.getGraphY())<E&&(0<parseFloat(e.chromelessToolbar.style.opacity||0)?t():x(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var A=
a.view.validate;a.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var a=this.graph.getPagePadding(),c=this.graph.getPageSize();this.translate.x=a.x-(this.x0||0)*c.width;this.translate.y=a.y-(this.y0||0)*c.height}A.apply(this,arguments)};if(!a.isViewer()){var C=a.sizeDidChange;a.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var c=this.getPageLayout(),f=this.getPagePadding(),d=this.getPageSize(),b=Math.ceil(2*
f.x+c.width*d.width),g=Math.ceil(2*f.y+c.height*d.height),e=a.minimumGraphSize;if(null==e||e.width!=b||e.height!=g)a.minimumGraphSize=new mxRectangle(0,0,b,g);b=f.x-c.x*d.width;f=f.y-c.y*d.height;this.autoTranslate||this.view.translate.x==b&&this.view.translate.y==f?C.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=c.x,this.view.y0=c.y,c=a.view.translate.x,d=a.view.translate.y,a.view.setTranslate(b,f),a.container.scrollLeft+=Math.round((b-c)*a.view.scale),a.container.scrollTop+=Math.round((f-
d)*a.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var G=a.view.getBackgroundPane(),F=a.view.getDrawPane();a.cumulativeZoomFactor=1;var I=null,K=null,v=null,J=null,B=function(c){null!=I&&window.clearTimeout(I);window.setTimeout(function(){a.isMouseDown||(I=window.setTimeout(mxUtils.bind(this,function(){a.isFastZoomEnabled()&&(null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,
"transform-origin",null),mxUtils.setPrefixedStyle(a.view.backgroundPageShape.node.style,"transform",null)),F.style.transformOrigin="",G.style.transformOrigin="",mxClient.IS_SF?(F.style.transform="scale(1)",G.style.transform="scale(1)",window.setTimeout(function(){F.style.transform="";G.style.transform=""},0)):(F.style.transform="",G.style.transform=""),a.view.getDecoratorPane().style.opacity="",a.view.getOverlayPane().style.opacity="");var c=new mxPoint(a.container.scrollLeft,a.container.scrollTop),
f=mxUtils.getOffset(a.container),d=a.view.scale,g=0,l=0;null!=K&&(g=a.container.offsetWidth/2-K.x+f.x,l=a.container.offsetHeight/2-K.y+f.y);a.zoom(a.cumulativeZoomFactor);a.view.scale!=d&&(null!=v&&(g+=c.x-v.x,l+=c.y-v.y),null!=b&&e.chromelessResize(!1,null,g*(a.cumulativeZoomFactor-1),l*(a.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==g&&0==l||(a.container.scrollLeft-=g*(a.cumulativeZoomFactor-1),a.container.scrollTop-=l*(a.cumulativeZoomFactor-1)));null!=J&&F.setAttribute("filter",
J);a.cumulativeZoomFactor=1;J=K=v=I=null}),null!=c?c:a.isFastZoomEnabled()?e.wheelZoomDelay:e.lazyZoomDelay))},0)};a.lazyZoom=function(c,f,d){(f=f||!a.scrollbars)&&(K=new mxPoint(a.container.offsetLeft+a.container.clientWidth/2,a.container.offsetTop+a.container.clientHeight/2));c?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*
20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;if(a.isFastZoomEnabled()){null==J&&""!=F.getAttribute("filter")&&(J=F.getAttribute("filter"),F.removeAttribute("filter"));
v=new mxPoint(a.container.scrollLeft,a.container.scrollTop);c=f?a.container.scrollLeft+a.container.clientWidth/2:K.x+a.container.scrollLeft-a.container.offsetLeft;var b=f?a.container.scrollTop+a.container.clientHeight/2:K.y+a.container.scrollTop-a.container.offsetTop;F.style.transformOrigin=c+"px "+b+"px";F.style.transform="scale("+this.cumulativeZoomFactor+")";G.style.transformOrigin=c+"px "+b+"px";G.style.transform="scale("+this.cumulativeZoomFactor+")";null!=a.view.backgroundPageShape&&null!=a.view.backgroundPageShape.node&&
(c=a.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(c.style,"transform-origin",(f?a.container.clientWidth/2+a.container.scrollLeft-c.offsetLeft+"px":K.x+a.container.scrollLeft-c.offsetLeft-a.container.offsetLeft+"px")+" "+(f?a.container.clientHeight/2+a.container.scrollTop-c.offsetTop+"px":K.y+a.container.scrollTop-c.offsetTop-a.container.offsetTop+"px")),mxUtils.setPrefixedStyle(c.style,"transform","scale("+this.cumulativeZoomFactor+")"));a.view.getDecoratorPane().style.opacity="0";a.view.getOverlayPane().style.opacity=
"0";null!=e.hoverIcons&&e.hoverIcons.reset()}B(d)};mxEvent.addGestureListeners(a.container,function(a){null!=I&&window.clearTimeout(I)},null,function(c){1!=a.cumulativeZoomFactor&&B(0)});mxEvent.addListener(a.container,"scroll",function(){I&&!a.isMouseDown&&1!=a.cumulativeZoomFactor&&B(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,f,d){if(null==this.dialogs||0==this.dialogs.length)if(!a.scrollbars&&a.isScrollWheelEvent(c)){d=a.view.getTranslate();var b=40/a.view.scale;mxEvent.isShiftDown(c)?
a.view.setTranslate(d.x+(f?-b:b),d.y):a.view.setTranslate(d.x,d.y+(f?b:-b))}else if(d||a.isZoomWheelEvent(c))for(d=mxEvent.getSource(c);null!=d;){if(d==a.container)return a.tooltipHandler.hideTooltip(),K=new mxPoint(mxEvent.getClientX(c),mxEvent.getClientY(c)),a.lazyZoom(f),mxEvent.consume(c),!1;d=d.parentNode}}),a.container);a.panningHandler.zoomGraph=function(c){a.cumulativeZoomFactor=c.scale;a.lazyZoom(0<c.scale,!0);mxEvent.consume(c)}};
EditorUi.prototype.addChromelessToolbarItems=function(a){a(mxUtils.bind(this,function(a){this.actions.get("print").funct();mxEvent.consume(a)}),Editor.printLargeImage,mxResources.get("print"))};EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};
EditorUi.prototype.createTemporaryGraph=function(a){var b=new Graph(document.createElement("div"));b.stylesheet.styles=mxUtils.clone(a.styles);b.resetViewOnRootChange=!1;b.setConnectable(!1);b.gridEnabled=!1;b.autoScroll=!1;b.setTooltips(!1);b.setEnabled(!1);b.container.style.visibility="hidden";b.container.style.position="absolute";b.container.style.overflow="hidden";b.container.style.height="1px";b.container.style.width="1px";return b};
EditorUi.prototype.addChromelessClickHandler=function(){var a=urlParams.highlight;null!=a&&0<a.length&&(a="#"+a);this.editor.graph.addClickHandler(a)};EditorUi.prototype.toggleFormatPanel=function(a){a=null!=a?a:0==this.formatWidth;null!=this.format&&(this.formatWidth=a?240:0,this.formatContainer.style.display=a?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(a){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var b=urlParams.border,e=60;null!=b&&(e=parseInt(b));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(e,null,null,null,null,null,a);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var a=this.editor.graph.getModel();return 1==a.getChildCount(a.root)&&0==a.getChildCount(a.getChildAt(a.root,0))};
@ -2388,15 +2388,15 @@ Graph=function(a,b,e,d,k,n){mxGraph.call(this,a,b,e,d);this.themes=k||this.defau
return null!=a?"1"==a.html||"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var q=null,c=null,f=null,g=null,l=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,d){if("mouseDown"==d.getProperty("eventName")&&this.isEnabled()){var b=d.getProperty("event"),e=b.getState();if(!mxEvent.isAltDown(b.getEvent())&&null!=e)if(this.model.isEdge(e.cell))if(q=new mxPoint(b.getGraphX(),b.getGraphY()),l=this.isCellSelected(e.cell),f=e,c=b,null!=e.text&&null!=e.text.boundingBox&&
mxUtils.contains(e.text.boundingBox,b.getGraphX(),b.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var m=this.selectionCellsHandler.getHandler(e.cell);null!=m&&null!=m.bends&&0<m.bends.length&&(g=m.getHandleForEvent(b))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(b.getEvent())&&(m=this.selectionCellsHandler.getHandler(e.cell),null==m||null==m.getHandleForEvent(b))){var v=new mxRectangle(b.getGraphX()-1,b.getGraphY()-1);v.grow(mxEvent.isTouchEvent(b.getEvent())?mxShape.prototype.svgStrokeTolerance-
1:(mxShape.prototype.svgStrokeTolerance+1)/2);if(this.isTableCell(e.cell)&&!this.isCellSelected(e.cell)){var p=this.model.getParent(e.cell),m=this.model.getParent(p);if(!this.isCellSelected(m)&&(mxUtils.intersects(v,new mxRectangle(e.x,e.y-2,e.width,3))&&this.model.getChildAt(m,0)!=p||mxUtils.intersects(v,new mxRectangle(e.x,e.y+e.height-2,e.width,3))||mxUtils.intersects(v,new mxRectangle(e.x-2,e.y,2,e.height))&&this.model.getChildAt(p,0)!=e.cell||mxUtils.intersects(v,new mxRectangle(e.x+e.width-
2,e.y,2,e.height)))&&(p=this.selectionCellsHandler.isHandled(m),this.selectCellForEvent(m,b.getEvent()),m=this.selectionCellsHandler.getHandler(m),null!=m)){var t=m.getHandleForEvent(b);null!=t&&(m.start(b.getGraphX(),b.getGraphY(),t),m.blockDelayedSelection=!p,b.consume())}}for(;!b.isConsumed()&&null!=e&&(this.isTableCell(e.cell)||this.isTableRow(e.cell)||this.isTable(e.cell));)this.isSwimlane(e.cell)&&(m=this.getActualStartSize(e.cell),p=this.view.scale,(0<m.x||0<m.width)&&mxUtils.intersects(v,
new mxRectangle(e.x+(m.x-m.width-1)*p+(0==m.x?e.width:0),e.y,1,e.height))||(0<m.y||0<m.height)&&mxUtils.intersects(v,new mxRectangle(e.x,e.y+(m.y-m.height-1)*p+(0==m.y?e.height:0),e.width,1)))&&(this.selectCellForEvent(e.cell,b.getEvent()),m=this.selectionCellsHandler.getHandler(e.cell),null!=m&&(t=mxEvent.CUSTOM_HANDLE-m.customHandles.length+1,m.start(b.getGraphX(),b.getGraphY(),t),b.consume())),e=this.view.getState(this.model.getParent(e.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
2,e.y,2,e.height)))&&(p=this.selectionCellsHandler.isHandled(m),this.selectCellForEvent(m,b.getEvent()),m=this.selectionCellsHandler.getHandler(m),null!=m)){var B=m.getHandleForEvent(b);null!=B&&(m.start(b.getGraphX(),b.getGraphY(),B),m.blockDelayedSelection=!p,b.consume())}}for(;!b.isConsumed()&&null!=e&&(this.isTableCell(e.cell)||this.isTableRow(e.cell)||this.isTable(e.cell));)this.isSwimlane(e.cell)&&(m=this.getActualStartSize(e.cell),p=this.view.scale,(0<m.x||0<m.width)&&mxUtils.intersects(v,
new mxRectangle(e.x+(m.x-m.width-1)*p+(0==m.x?e.width:0),e.y,1,e.height))||(0<m.y||0<m.height)&&mxUtils.intersects(v,new mxRectangle(e.x,e.y+(m.y-m.height-1)*p+(0==m.y?e.height:0),e.width,1)))&&(this.selectCellForEvent(e.cell,b.getEvent()),m=this.selectionCellsHandler.getHandler(e.cell),null!=m&&(B=mxEvent.CUSTOM_HANDLE-m.customHandles.length+1,m.start(b.getGraphX(),b.getGraphY(),B),b.consume())),e=this.view.getState(this.model.getParent(e.cell))}}}));this.addMouseListener({mouseDown:function(a,c){},
mouseMove:mxUtils.bind(this,function(a,d){var b=this.selectionCellsHandler.handlers.map,e;for(e in b)if(null!=b[e].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(d.getEvent()))if(e=this.tolerance,null!=q&&null!=f&&null!=c){if(b=f,Math.abs(q.x-d.getGraphX())>e||Math.abs(q.y-d.getGraphY())>e){var m=this.selectionCellsHandler.getHandler(b.cell);null==m&&this.model.isEdge(b.cell)&&(m=this.createHandler(b));if(null!=m&&null!=m.bends&&0<m.bends.length){e=m.getHandleForEvent(c);
var v=this.view.getEdgeStyle(b),p=v==mxEdgeStyle.EntityRelation;l||g!=mxEvent.LABEL_HANDLE||(e=g);if(p&&0!=e&&e!=m.bends.length-1&&e!=mxEvent.LABEL_HANDLE)!p||null==b.visibleSourceState&&null==b.visibleTargetState||(this.graphHandler.reset(),d.consume());else if(e==mxEvent.LABEL_HANDLE||0==e||null!=b.visibleSourceState||e==m.bends.length-1||null!=b.visibleTargetState)p||e==mxEvent.LABEL_HANDLE||(p=b.absolutePoints,null!=p&&(null==v&&null==e||v==mxEdgeStyle.OrthConnector)&&(e=g,null==e&&(e=new mxRectangle(q.x,
q.y),e.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(e,p[0].x,p[0].y)?e=0:mxUtils.contains(e,p[p.length-1].x,p[p.length-1].y)?e=m.bends.length-1:null!=v&&(2==p.length||3==p.length&&(0==Math.round(p[0].x-p[1].x)&&0==Math.round(p[1].x-p[2].x)||0==Math.round(p[0].y-p[1].y)&&0==Math.round(p[1].y-p[2].y)))?e=2:(e=mxUtils.findNearestSegment(b,q.x,q.y),e=null==v?mxEvent.VIRTUAL_HANDLE-e:e+1))),null==e&&(e=mxEvent.VIRTUAL_HANDLE)),m.start(d.getGraphX(),d.getGraphX(),e),d.consume(),this.graphHandler.reset()}null!=
m&&(this.selectionCellsHandler.isHandlerActive(m)?this.isCellSelected(b.cell)||(this.selectionCellsHandler.handlers.put(b.cell,m),this.selectCellForEvent(b.cell,d.getEvent())):this.isCellSelected(b.cell)||m.destroy());l=!1;q=c=f=g=null}}else if(b=d.getState(),null!=b){m=null;if(this.model.isEdge(b.cell)){if(e=new mxRectangle(d.getGraphX(),d.getGraphY()),e.grow(mxEdgeHandler.prototype.handleImage.width/2),p=b.absolutePoints,null!=p)if(null!=b.text&&null!=b.text.boundingBox&&mxUtils.contains(b.text.boundingBox,
d.getGraphX(),d.getGraphY()))m="move";else if(mxUtils.contains(e,p[0].x,p[0].y)||mxUtils.contains(e,p[p.length-1].x,p[p.length-1].y))m="pointer";else if(null!=b.visibleSourceState||null!=b.visibleTargetState)e=this.view.getEdgeStyle(b),m="crosshair",e!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(b)&&(e=mxUtils.findNearestSegment(b,d.getGraphX(),d.getGraphY()),e<p.length-1&&0<=e&&(m=0==Math.round(p[e].x-p[e+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(d.getEvent())){e=new mxRectangle(d.getGraphX()-
1,d.getGraphY()-1);e.grow(mxShape.prototype.svgStrokeTolerance/2);if(this.isTableCell(b.cell)&&(p=this.model.getParent(b.cell),v=this.model.getParent(p),!this.isCellSelected(v)))if(mxUtils.intersects(e,new mxRectangle(b.x-2,b.y,2,b.height))&&this.model.getChildAt(p,0)!=b.cell||mxUtils.intersects(e,new mxRectangle(b.x+b.width-2,b.y,2,b.height)))m="col-resize";else if(mxUtils.intersects(e,new mxRectangle(b.x,b.y-2,b.width,3))&&this.model.getChildAt(v,0)!=p||mxUtils.intersects(e,new mxRectangle(b.x,
b.y+b.height-2,b.width,3)))m="row-resize";for(p=b;null==m&&null!=p&&(this.isTableCell(p.cell)||this.isTableRow(p.cell)||this.isTable(p.cell));){if(this.isSwimlane(p.cell)){var v=this.getActualStartSize(p.cell),t=this.view.scale;(0<v.x||0<v.width)&&mxUtils.intersects(e,new mxRectangle(p.x+(v.x-v.width-1)*t+(0==v.x?p.width*t:0),p.y,1,p.height))?m="col-resize":(0<v.y||0<v.height)&&mxUtils.intersects(e,new mxRectangle(p.x,p.y+(v.y-v.height-1)*t+(0==v.y?p.height:0),p.width,1))&&(m="row-resize")}p=this.view.getState(this.model.getParent(p.cell))}}null!=
b.y+b.height-2,b.width,3)))m="row-resize";for(p=b;null==m&&null!=p&&(this.isTableCell(p.cell)||this.isTableRow(p.cell)||this.isTable(p.cell));){if(this.isSwimlane(p.cell)){var v=this.getActualStartSize(p.cell),B=this.view.scale;(0<v.x||0<v.width)&&mxUtils.intersects(e,new mxRectangle(p.x+(v.x-v.width-1)*B+(0==v.x?p.width*B:0),p.y,1,p.height))?m="col-resize":(0<v.y||0<v.height)&&mxUtils.intersects(e,new mxRectangle(p.x,p.y+(v.y-v.height-1)*B+(0==v.y?p.height:0),p.width,1))&&(m="row-resize")}p=this.view.getState(this.model.getParent(p.cell))}}null!=
m&&b.setCursor(m)}}),mouseUp:mxUtils.bind(this,function(a,d){g=q=c=f=null})})}this.cellRenderer.getLabelValue=function(a){var c=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);a.view.graph.isHtmlLabel(a.cell)&&(c=1!=a.style.html?mxUtils.htmlEntities(c,!1):a.view.graph.sanitizeHtml(c));return c};if("undefined"!==typeof mxVertexHandler){this.setConnectable(!0);this.setDropEnabled(!0);this.setPanning(!0);this.setTooltips(!0);this.setAllowLoops(!0);this.allowAutoPanning=!0;this.constrainChildren=
this.resetEdgesOnConnect=!1;this.constrainRelativeChildren=!0;this.graphHandler.scrollOnMove=!1;this.graphHandler.scaleGrid=!0;this.connectionHandler.setCreateTarget(!1);this.connectionHandler.insertBeforeSource=!0;this.connectionHandler.isValidSource=function(a,c){return!1};this.alternateEdgeStyle="vertical";null==d&&this.loadStylesheet();var m=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var a=m.apply(this,arguments);if(this.graph.pageVisible){for(var c=[],f=this.graph.pageFormat,
d=this.graph.pageScale,b=f.width*d,f=f.height*d,d=this.graph.view.translate,e=this.graph.view.scale,g=this.graph.getPageLayout(),l=0;l<g.width;l++)c.push(new mxRectangle(((g.x+l)*b+d.x)*e,(g.y*f+d.y)*e,b*e,f*e));for(l=1;l<g.height;l++)c.push(new mxRectangle((g.x*b+d.x)*e,((g.y+l)*f+d.y)*e,b*e,f*e));a=c.concat(a)}return a};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=
@ -2406,13 +2406,13 @@ return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};v
this.currentState&&a.getState()==this.currentState&&2E3<y||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&z.apply(this,arguments)};var E=this.isToggleEvent;this.isToggleEvent=function(a){return E.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(a)};var A=t.isForceRubberbandEvent;t.isForceRubberbandEvent=function(a){return A.apply(this,arguments)&&!mxEvent.isShiftDown(a.getEvent())&&!mxEvent.isControlDown(a.getEvent())||mxClient.IS_CHROMEOS&&
mxEvent.isShiftDown(a.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==a.getState()&&mxEvent.isTouchEvent(a.getEvent())};var C=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(C=this.container.style.cursor,this.container.style.cursor="move")}));this.panningHandler.addListener(mxEvent.PAN_END,mxUtils.bind(this,function(){this.isEnabled()&&(this.container.style.cursor=C)}));this.popupMenuHandler.autoExpand=
!0;this.popupMenuHandler.isSelectOnPopup=function(a){return mxEvent.isMouseEvent(a.getEvent())};var G=this.click;this.click=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);if(this.isEnabled()&&!c||a.isConsumed())return G.apply(this,arguments);var f=c?a.sourceState.cell:a.getCell();null!=f&&(f=this.getClickableLinkForCell(f),null!=f&&(this.isCustomLink(f)?this.customLinkClicked(f):this.openLink(f)));this.isEnabled()&&c&&this.clearSelection()};this.tooltipHandler.getStateForEvent=
function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var F=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return F.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getCells(a.x,
a.y,a.width,a.height,null,null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(f,c);return f};var I=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,f){return this.graph.isCellSelected(a)?!1:I.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};
var K=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var f=c.getProperty("event").getState();K=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var f=c.getProperty("event"),d=c.getProperty("cell");null==d?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),
t.start(f.x,f.y)):null!=K?this.addSelectionCells(K):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);K=null;c.consume()}}));this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){var f=a.view.graph;return c&&(f.isCellSelected(a.cell)||f.isTableRow(a.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,
function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var v=this.updateMouseEvent;this.updateMouseEvent=function(a){a=v.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};
Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";
Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
function(a){return a.sourceState};var F=this.tooltipHandler.show;this.tooltipHandler.show=function(){F.apply(this,arguments);if(null!=this.div)for(var a=this.div.getElementsByTagName("a"),c=0;c<a.length;c++)null!=a[c].getAttribute("href")&&null==a[c].getAttribute("target")&&a[c].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(a){return a.sourceState};this.getCursorForMouseEvent=function(a){var c=null==a.state&&null!=a.sourceState&&this.isCellLocked(a.sourceState.cell);
return this.getCursorForCell(c?a.sourceState.cell:a.getCell())};var I=this.getCursorForCell;this.getCursorForCell=function(a){if(!this.isEnabled()||this.isCellLocked(a)){if(null!=this.getClickableLinkForCell(a))return"pointer";if(this.isCellLocked(a))return"default"}return I.apply(this,arguments)};this.selectRegion=function(a,c){var f=this.getCells(a.x,a.y,a.width,a.height,null,null,null,function(a){return"1"==mxUtils.getValue(a.style,"locked","0")},!0);this.selectCellsForEvent(f,c);return f};var K=
this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,f){return this.graph.isCellSelected(a)?!1:K.apply(this,arguments)};this.isCellLocked=function(a){for(a=this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var v=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var f=c.getProperty("event").getState();
v=null==f||this.isSelectionEmpty()||this.isCellSelected(f.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var f=c.getProperty("event"),d=c.getProperty("cell");null==d?(f=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f)),t.start(f.x,f.y)):null!=v?this.addSelectionCells(v):1<this.getSelectionCount()&&this.isCellSelected(d)&&this.removeSelectionCell(d);v=null;c.consume()}}));
this.connectionHandler.selectCells=function(a,c){this.graph.setSelectionCell(c||a)};this.connectionHandler.constraintHandler.isStateIgnored=function(a,c){var f=a.view.graph;return c&&(f.isCellSelected(a.cell)||f.isTableRow(a.cell)&&f.selectionCellsHandler.isHandled(f.model.getParent(a.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var a=this.connectionHandler.constraintHandler;null!=a.currentFocus&&a.isStateIgnored(a.currentFocus,!0)&&(a.currentFocus=null,a.constraints=
null,a.destroyIcons());a.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var J=this.updateMouseEvent;this.updateMouseEvent=function(a){a=J.apply(this,arguments);null!=a.state&&this.isCellLocked(a.getCell())&&(a.state=null);return a}}this.currentTranslate=new mxPoint(0,0)};Graph.touchStyle=mxClient.IS_TOUCH||mxClient.IS_FF&&mxClient.IS_WIN||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints||null==window.urlParams||"1"==urlParams.touch;
Graph.fileSupport=null!=window.File&&null!=window.FileReader&&null!=window.FileList&&(null==window.urlParams||"0"!=urlParams.filesupport);Graph.lineJumpsEnabled=!0;Graph.defaultJumpSize=6;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Viewer does not support full SVG 1.1";Graph.foreignObjectWarningLink="https://desk.draw.io/support/solutions/articles/16000042487";Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSize fontColor fontStyle align verticalAlign strokeColor strokeWidth fillColor gradientColor swimlaneFillColor textOpacity gradientDirection glass labelBackgroundColor labelBorderColor opacity spacing spacingTop spacingLeft spacingBottom spacingRight endFill endArrow endSize targetPerimeterSpacing startFill startArrow startSize sourcePerimeterSpacing arcSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle".split(" ");
Graph.createSvgImage=function(a,b,e,d,k){e=unescape(encodeURIComponent('<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="'+a+'px" height="'+b+'px" '+(null!=d&&null!=k?'viewBox="0 0 '+d+" "+k+'" ':"")+'version="1.1">'+e+"</svg>"));return new mxImage("data:image/svg+xml;base64,"+(window.btoa?btoa(e):Base64.encode(e,!0)),a,b)};
Graph.zapGremlins=function(a){for(var b=[],e=0;e<a.length;e++){var d=a.charCodeAt(e);(32<=d||9==d||10==d||13==d)&&65535!=d&&65534!=d&&b.push(a.charAt(e))}return b.join("")};Graph.stringToBytes=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=a.charCodeAt(e);return b};Graph.bytesToString=function(a){for(var b=Array(a.length),e=0;e<a.length;e++)b[e]=String.fromCharCode(a[e]);return b.join("")};Graph.compressNode=function(a,b){var e=mxUtils.getXml(a);return Graph.compress(b?e:Graph.zapGremlins(e))};
Graph.compress=function(a,b){if(null==a||0==a.length||"undefined"===typeof pako)return a;var e=b?pako.deflate(encodeURIComponent(a),{to:"string"}):pako.deflateRaw(encodeURIComponent(a),{to:"string"});return window.btoa?btoa(e):Base64.encode(e,!0)};Graph.decompress=function(a,b,e){if(null==a||0==a.length||"undefined"===typeof pako)return a;a=window.atob?atob(a):Base64.decode(a,!0);b=decodeURIComponent(b?pako.inflate(a,{to:"string"}):pako.inflateRaw(a,{to:"string"}));return e?b:Graph.zapGremlins(b)};
@ -2609,7 +2609,7 @@ g.y);this.getModel().beginUpdate();try{for(var m=(b-d)/(f.length-1),b=d,e=1;e<f.
Graph.prototype.createSvgImageExport=function(){var a=new mxImageExport;a.getLinkForCellState=mxUtils.bind(this,function(a,c){return this.getLinkForCell(a.cell)});return a};Graph.prototype.getSvg=function(a,c,f,b,d,e,g,l,m,v){var p=this.useCssTransforms;p&&(this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange());try{c=null!=c?c:1;f=null!=f?f:0;d=null!=d?d:!0;e=null!=e?e:!0;g=null!=g?g:!0;var t=e||b?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells());if(null==t)throw Error(mxResources.get("drawingEmpty"));
var B=this.view.scale,u=mxUtils.createXmlDocument(),k=null!=u.createElementNS?u.createElementNS(mxConstants.NS_SVG,"svg"):u.createElement("svg");null!=a&&(null!=k.style?k.style.backgroundColor=a:k.setAttribute("style","background-color:"+a));null==u.createElementNS?(k.setAttribute("xmlns",mxConstants.NS_SVG),k.setAttribute("xmlns:xlink",mxConstants.NS_XLINK)):k.setAttributeNS("http://www.w3.org/2000/xmlns/","xmlns:xlink",mxConstants.NS_XLINK);a=c/B;var n=Math.max(1,Math.ceil(t.width*a)+2*f)+(v?5:
0),x=Math.max(1,Math.ceil(t.height*a)+2*f)+(v?5:0);k.setAttribute("version","1.1");k.setAttribute("width",n+"px");k.setAttribute("height",x+"px");k.setAttribute("viewBox",(d?"-0.5 -0.5":"0 0")+" "+n+" "+x);u.appendChild(k);var J=null!=u.createElementNS?u.createElementNS(mxConstants.NS_SVG,"g"):u.createElement("g");k.appendChild(J);var y=this.createSvgCanvas(J);y.foOffset=d?-.5:0;y.textOffset=d?-.5:0;y.imageOffset=d?-.5:0;y.translate(Math.floor((f/c-t.x)/B),Math.floor((f/c-t.y)/B));var P=document.createElement("div"),
H=y.getAlternateText;y.getAlternateText=function(a,c,f,b,d,e,g,l,m,v,p,t,aa){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(P.innerHTML=e,e=mxUtils.extractTextWithWhitespace(P.childNodes));for(var Na=Math.ceil(2*b/this.state.fontSize),u=[],La=0,B=0;(0==Na||La<Na)&&B<e.length;){var k=e.charCodeAt(B);if(10==k||13==k){if(0<La)break}else u.push(e.charAt(B)),255>k&&La++;B++}u.length<e.length&&1<e.length-u.length&&(e=mxUtils.trim(u.join(""))+"...");return e}catch(Ya){return H.apply(this,
H=y.getAlternateText;y.getAlternateText=function(a,c,f,b,d,e,g,l,m,v,p,t,aa){if(null!=e&&0<this.state.fontSize)try{mxUtils.isNode(e)?e=e.innerText:(P.innerHTML=e,e=mxUtils.extractTextWithWhitespace(P.childNodes));for(var Na=Math.ceil(2*b/this.state.fontSize),B=[],La=0,u=0;(0==Na||La<Na)&&u<e.length;){var k=e.charCodeAt(u);if(10==k||13==k){if(0<La)break}else B.push(e.charAt(u)),255>k&&La++;u++}B.length<e.length&&1<e.length-B.length&&(e=mxUtils.trim(B.join(""))+"...");return e}catch(Ya){return H.apply(this,
arguments)}else return H.apply(this,arguments)};var Q=this.backgroundImage;if(null!=Q){c=B/c;var S=this.view.translate,A=new mxRectangle(S.x*c,S.y*c,Q.width*c,Q.height*c);mxUtils.intersects(t,A)&&y.image(S.x,S.y,Q.width,Q.height,Q.src,!0)}y.scale(a);y.textEnabled=g;l=null!=l?l:this.createSvgImageExport();var q=l.drawCellState,N=l.getLinkForCellState;l.getLinkForCellState=function(a,c){var f=N.apply(this,arguments);return null==f||a.view.graph.isCustomLink(f)?null:f};l.drawCellState=function(a,c){for(var f=
a.view.graph,b=f.isCellSelected(a.cell),d=f.model.getParent(a.cell);!e&&!b&&null!=d;)b=f.isCellSelected(d),d=f.model.getParent(d);(e||b)&&q.apply(this,arguments)};l.drawState(this.getView().getState(this.model.root),y);this.updateSvgLinks(k,m,!0);this.addForeignObjectWarning(y,k);return k}finally{p&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(a,c){if(0<c.getElementsByTagName("foreignObject").length){var f=a.createElement("switch"),
b=a.createElement("g");b.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var d=a.createElement("a");d.setAttribute("transform","translate(0,-5)");null==d.setAttributeNS||c.ownerDocument!=document&&null==document.documentMode?(d.setAttribute("xlink:href",Graph.foreignObjectWarningLink),d.setAttribute("target","_blank")):(d.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),d.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));var e=
@ -2618,7 +2618,7 @@ c):f&&this.isCustomLink(d)&&a[b].setAttribute("href","javascript:void(0);"))}};G
a&&a.nodeName!=c;){if(a==f)return null;a=a.parentNode}return a};Graph.prototype.getParentByNames=function(a,c,f){for(;null!=a&&!(0<=mxUtils.indexOf(c,a.nodeName));){if(a==f)return null;a=a.parentNode}return a};Graph.prototype.selectNode=function(a){var c=null;if(window.getSelection){if(c=window.getSelection(),c.getRangeAt&&c.rangeCount){var f=document.createRange();f.selectNode(a);c.removeAllRanges();c.addRange(f)}}else(c=document.selection)&&"Control"!=c.type&&(a=c.createRange(),a.collapse(!0),f=
c.createRange(),f.setEndPoint("StartToStart",a),f.select())};Graph.prototype.deleteCells=function(a,c){var f=null;if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var b=0;b<a.length;b++){var d=this.model.getParent(a[b]);if(this.isTable(d)){var e=this.getCellGeometry(a[b]),g=this.getCellGeometry(d);null!=e&&null!=g&&(g=g.clone(),g.height-=e.height,this.model.setGeometry(d,g))}}var l=this.selectParentAfterDelete?this.model.getParents(a):null;this.removeCells(a,c)}finally{this.model.endUpdate()}if(null!=
l)for(f=[],b=0;b<l.length;b++)this.model.contains(l[b])&&(this.model.isVertex(l[b])||this.model.isEdge(l[b]))&&f.push(l[b])}return f};Graph.prototype.insertTableColumn=function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=0;if(this.isTableCell(a))var e=f.getParent(a),b=f.getParent(e),d=mxUtils.indexOf(f.getChildCells(e,!0),a);else this.isTableRow(a)?b=f.getParent(a):a=f.getChildCells(b,!0)[0],c||(d=f.getChildCells(a,!0).length-1);for(var g=f.getChildCells(b,!0),l=Graph.minTableColumnWidth,
e=0;e<g.length;e++){var m=f.getChildCells(g[e],!0)[d],v=f.cloneCell(m,!1),p=this.getCellGeometry(v);v.value=null;if(null!=p){var l=p.width,t=this.getCellGeometry(g[e]);null!=t&&(p.height=t.height)}f.add(g[e],v,d+(c?0:1))}var u=this.getCellGeometry(b);null!=u&&(u=u.clone(),u.width+=l,f.setGeometry(b,u))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=a;if(this.isTableCell(a))d=f.getParent(a),b=f.getParent(d);else if(this.isTableRow(a))b=
e=0;e<g.length;e++){var m=f.getChildCells(g[e],!0)[d],v=f.cloneCell(m,!1),p=this.getCellGeometry(v);v.value=null;if(null!=p){var l=p.width,t=this.getCellGeometry(g[e]);null!=t&&(p.height=t.height)}f.add(g[e],v,d+(c?0:1))}var B=this.getCellGeometry(b);null!=B&&(B=B.clone(),B.width+=l,f.setGeometry(b,B))}finally{f.endUpdate()}};Graph.prototype.insertTableRow=function(a,c){var f=this.getModel();f.beginUpdate();try{var b=a,d=a;if(this.isTableCell(a))d=f.getParent(a),b=f.getParent(d);else if(this.isTableRow(a))b=
f.getParent(a);else var e=f.getChildCells(b,!0),d=e[c?0:e.length-1];var g=f.getChildCells(d,!0),l=b.getIndex(d),d=f.cloneCell(d,!1);d.value=null;var m=this.getCellGeometry(d);if(null!=m){for(e=0;e<g.length;e++){a=f.cloneCell(g[e],!1);d.insert(a);a.value=null;var v=this.getCellGeometry(a);null!=v&&(v.height=m.height)}f.add(b,d,l+(c?0:1));var p=this.getCellGeometry(b);null!=p&&(p=p.clone(),p.height+=m.height,f.setGeometry(b,p))}}finally{f.endUpdate()}};Graph.prototype.deleteTableColumn=function(a){var c=
this.getModel();c.beginUpdate();try{var f=a,b=a;this.isTableCell(a)&&(b=c.getParent(a));this.isTableRow(b)&&(f=c.getParent(b));var d=c.getChildCells(f,!0);if(0==d.length)c.remove(f);else{this.isTableRow(b)||(b=d[0]);var e=c.getChildCells(b,!0);if(1>=e.length)c.remove(f);else{var g=e.length-1;this.isTableCell(a)&&(g=mxUtils.indexOf(e,a));for(b=a=0;b<d.length;b++){var l=c.getChildCells(d[b],!0)[g];c.remove(l);var m=this.getCellGeometry(l);null!=m&&(a=Math.max(a,m.width))}var v=this.getCellGeometry(f);
null!=v&&(v=v.clone(),v.width-=a,c.setGeometry(f,v))}}}finally{c.endUpdate()}};Graph.prototype.deleteTableRow=function(a){var c=this.getModel();c.beginUpdate();try{var f=a,b=a;this.isTableCell(a)&&(a=b=c.getParent(a));this.isTableRow(a)&&(f=c.getParent(b));var d=c.getChildCells(f,!0);if(1>=d.length)c.remove(f);else{this.isTableRow(b)||(b=d[d.length-1]);c.remove(b);a=0;var e=this.getCellGeometry(b);null!=e&&(a=e.height);var g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.height-=a,c.setGeometry(f,
@ -2762,8 +2762,8 @@ G.prototype.redrawPath=function(a,c,f,b,d){c="0"!=mxUtils.getValue(this.style,"f
!0)};mxCellRenderer.registerShape("hexagon",G);mxUtils.extend(F,mxRectangleShape);F.prototype.isHtmlAllowed=function(){return!1};F.prototype.paintForeground=function(a,c,f,b,d){var e=Math.min(b/5,d/5)+1;a.begin();a.moveTo(c+b/2,f+e);a.lineTo(c+b/2,f+d-e);a.moveTo(c+e,f+d/2);a.lineTo(c+b-e,f+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",F);var Oa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==
this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,f,b,d){Oa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&(a.setShadow(!1),Oa.apply(this,[a,c,f,b,d]))}};mxUtils.extend(I,
mxRectangleShape);I.prototype.isHtmlAllowed=function(){return!1};I.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+c,a.y+c,a.width-2*c,a.height-2*c)}return a};I.prototype.paintForeground=function(a,c,f,b,d){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var e=Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],v=this.style["symbol"+e+"Width"],aa=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||p,u=this.style["symbol"+e+"ArcSpacing"];null!=u&&(u*=this.getArcSize(b+this.strokewidth,
d+this.strokewidth),p+=u,t+=u);var u=c,B=f,u=l==mxConstants.ALIGN_CENTER?u+(b-v)/2:l==mxConstants.ALIGN_RIGHT?u+(b-v-p):u+p,B=m==mxConstants.ALIGN_MIDDLE?B+(d-aa)/2:m==mxConstants.ALIGN_BOTTOM?B+(d-aa-t):B+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,u,B,v,aa);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",I);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(a,c,f,b,d,e){e?
0);c+=e;f+=e;b-=2*e;d-=2*e;0<b&&0<d&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}a.setDashed(!1);var e=0,g;do{g=mxCellRenderer.defaultShapes[this.style["symbol"+e]];if(null!=g){var l=this.style["symbol"+e+"Align"],m=this.style["symbol"+e+"VerticalAlign"],v=this.style["symbol"+e+"Width"],aa=this.style["symbol"+e+"Height"],p=this.style["symbol"+e+"Spacing"]||0,t=this.style["symbol"+e+"VSpacing"]||p,B=this.style["symbol"+e+"ArcSpacing"];null!=B&&(B*=this.getArcSize(b+this.strokewidth,
d+this.strokewidth),p+=B,t+=B);var B=c,u=f,B=l==mxConstants.ALIGN_CENTER?B+(b-v)/2:l==mxConstants.ALIGN_RIGHT?B+(b-v-p):B+p,u=m==mxConstants.ALIGN_MIDDLE?u+(d-aa)/2:m==mxConstants.ALIGN_BOTTOM?u+(d-aa-t):u+t;a.save();l=new g;l.style=this.style;g.prototype.paintVertexShape.call(l,a,B,u,v,aa);a.restore()}e++}while(null!=g)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("ext",I);mxUtils.extend(K,mxCylinder);K.prototype.redrawPath=function(a,c,f,b,d,e){e?
(a.moveTo(0,0),a.lineTo(b/2,d/2),a.lineTo(b,0),a.end()):(a.moveTo(0,0),a.lineTo(b,0),a.lineTo(b,d),a.lineTo(0,d),a.close())};mxCellRenderer.registerShape("message",K);mxUtils.extend(v,mxShape);v.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.ellipse(b/4,0,b/2,d/4);a.fillAndStroke();a.begin();a.moveTo(b/2,d/4);a.lineTo(b/2,2*d/3);a.moveTo(b/2,d/3);a.lineTo(0,d/3);a.moveTo(b/2,d/3);a.lineTo(b,d/3);a.moveTo(b/2,2*d/3);a.lineTo(0,d);a.moveTo(b/2,2*d/3);a.lineTo(b,d);a.end();a.stroke()};
mxCellRenderer.registerShape("umlActor",v);mxUtils.extend(J,mxShape);J.prototype.getLabelMargins=function(a){return new mxRectangle(a.width/6,0,0,0)};J.prototype.paintBackground=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(0,d/4);a.lineTo(0,3*d/4);a.end();a.stroke();a.begin();a.moveTo(0,d/2);a.lineTo(b/6,d/2);a.end();a.stroke();a.ellipse(b/6,0,5*b/6,d);a.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",J);mxUtils.extend(B,mxEllipse);B.prototype.paintVertexShape=function(a,c,
f,b,d){mxEllipse.prototype.paintVertexShape.apply(this,arguments);a.begin();a.moveTo(c+b/8,f+d);a.lineTo(c+7*b/8,f+d);a.end();a.stroke()};mxCellRenderer.registerShape("umlEntity",B);mxUtils.extend(P,mxShape);P.prototype.paintVertexShape=function(a,c,f,b,d){a.translate(c,f);a.begin();a.moveTo(b,0);a.lineTo(0,d);a.moveTo(0,0);a.lineTo(b,d);a.end();a.stroke()};mxCellRenderer.registerShape("umlDestroy",P);mxUtils.extend(S,mxShape);S.prototype.getLabelBounds=function(a){return new mxRectangle(a.x,a.y+
@ -2815,9 +2815,9 @@ mxActor);sa.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);a.moveTo(
0);a.lineTo(e,c);a.lineTo(b,c);a.lineTo(b,f);a.lineTo(e,f);a.lineTo(e,d);a.lineTo(g,d);a.lineTo(g,f);a.lineTo(0,f);a.close();a.end()};mxCellRenderer.registerShape("cross",xa);mxUtils.extend(ta,mxActor);ta.prototype.size=.25;ta.prototype.redrawPath=function(a,c,f,b,d){c=Math.min(b,d/2);f=Math.min(b-c,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*b);a.moveTo(0,d/2);a.lineTo(f,0);a.lineTo(b-c,0);a.quadTo(b,0,b,d/2);a.quadTo(b,d,b-c,d);a.lineTo(f,d);a.close();a.end()};mxCellRenderer.registerShape("display",
ta);mxUtils.extend(oa,mxConnector);oa.prototype.origPaintEdgeShape=oa.prototype.paintEdgeShape;oa.prototype.paintEdgeShape=function(a,c,f){for(var b=[],d=0;d<c.length;d++)b.push(mxUtils.clone(c[d]));var d=a.state.dashed,e=a.state.fixDash;oa.prototype.origPaintEdgeShape.apply(this,[a,b,f]);3<=a.state.strokeWidth&&(b=mxUtils.getValue(this.style,"fillColor",null),null!=b&&(a.setStrokeColor(b),a.setStrokeWidth(a.state.strokeWidth-2),a.setDashed(d,e),oa.prototype.origPaintEdgeShape.apply(this,[a,c,f])))};
mxCellRenderer.registerShape("filledEdge",oa);"undefined"!==typeof StyleFormatPanel&&function(){var a=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var c=this.format.getSelectionState(),f=a.apply(this,arguments);"umlFrame"==c.style.shape&&f.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"#ffffff"});return f}}();mxMarker.addMarker("dash",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1);return function(){a.begin();
a.moveTo(b.x-p/2-t/2,b.y-t/2+p/2);a.lineTo(b.x+t/2-3*p/2,b.y-3*t/2-p/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),u=b.x+p/2,B=b.y+t/2;b.x-=p;b.y-=t;return function(){a.begin();a.moveTo(u-p/2-t/2,B-t/2+p/2);a.lineTo(u-p/2+t/2,B-t/2-p/2);a.lineTo(u+t/2-3*p/2,B-3*t/2-p/2);a.lineTo(u-t/2-3*p/2,B-3*t/2+p/2);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1);return function(){a.begin();
a.moveTo(b.x-p/2-t/2,b.y-t/2+p/2);a.lineTo(b.x+t/2-3*p/2,b.y-3*t/2-p/2);a.moveTo(b.x-p/2+t/2,b.y-t/2-p/2);a.lineTo(b.x-t/2-3*p/2,b.y-3*t/2+p/2);a.stroke()}});mxMarker.addMarker("circle",ya);mxMarker.addMarker("circlePlus",function(a,c,f,b,d,e,g,l,m,v){var p=b.clone(),t=ya.apply(this,arguments),u=d*(g+2*m),B=e*(g+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(p.x-d*m,p.y-e*m);a.lineTo(p.x-2*u+d*m,p.y-2*B+e*m);a.moveTo(p.x-u-B+e*m,p.y-B+u-d*m);a.lineTo(p.x+B-u-e*m,p.y-B-u+d*m);a.stroke()}});
mxMarker.addMarker("halfCircle",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),u=b.clone();b.x-=p;b.y-=t;return function(){a.begin();a.moveTo(u.x-t,u.y+p);a.quadTo(b.x-t,b.y+p,b.x,b.y);a.quadTo(b.x+t,b.y-p,u.x+t,u.y-p);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d,e,g,l,m,v){c=d*m*1.118;f=e*m*1.118;d*=g+m;e*=g+m;var p=b.clone();p.x-=c;p.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-d-e/2,p.y-e+d/2):a.lineTo(p.x+e/2-d,p.y-e-d/2);
a.moveTo(b.x-p/2-t/2,b.y-t/2+p/2);a.lineTo(b.x+t/2-3*p/2,b.y-3*t/2-p/2);a.stroke()}});mxMarker.addMarker("box",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),B=b.x+p/2,u=b.y+t/2;b.x-=p;b.y-=t;return function(){a.begin();a.moveTo(B-p/2-t/2,u-t/2+p/2);a.lineTo(B-p/2+t/2,u-t/2-p/2);a.lineTo(B+t/2-3*p/2,u-3*t/2-p/2);a.lineTo(B-t/2-3*p/2,u-3*t/2+p/2);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("cross",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1);return function(){a.begin();
a.moveTo(b.x-p/2-t/2,b.y-t/2+p/2);a.lineTo(b.x+t/2-3*p/2,b.y-3*t/2-p/2);a.moveTo(b.x-p/2+t/2,b.y-t/2-p/2);a.lineTo(b.x-t/2-3*p/2,b.y-3*t/2+p/2);a.stroke()}});mxMarker.addMarker("circle",ya);mxMarker.addMarker("circlePlus",function(a,c,f,b,d,e,g,l,m,v){var p=b.clone(),t=ya.apply(this,arguments),B=d*(g+2*m),u=e*(g+2*m);return function(){t.apply(this,arguments);a.begin();a.moveTo(p.x-d*m,p.y-e*m);a.lineTo(p.x-2*B+d*m,p.y-2*u+e*m);a.moveTo(p.x-B-u+e*m,p.y-u+B-d*m);a.lineTo(p.x+u-B-e*m,p.y-u-B+d*m);a.stroke()}});
mxMarker.addMarker("halfCircle",function(a,c,f,b,d,e,g,l,m,v){var p=d*(g+m+1),t=e*(g+m+1),B=b.clone();b.x-=p;b.y-=t;return function(){a.begin();a.moveTo(B.x-t,B.y+p);a.quadTo(b.x-t,b.y+p,b.x,b.y);a.quadTo(b.x+t,b.y-p,B.x+t,B.y-p);a.stroke()}});mxMarker.addMarker("async",function(a,c,f,b,d,e,g,l,m,v){c=d*m*1.118;f=e*m*1.118;d*=g+m;e*=g+m;var p=b.clone();p.x-=c;p.y-=f;b.x+=1*-d-c;b.y+=1*-e-f;return function(){a.begin();a.moveTo(p.x,p.y);l?a.lineTo(p.x-d-e/2,p.y-e+d/2):a.lineTo(p.x+e/2-d,p.y-e-d/2);
a.lineTo(p.x-d,p.y-e);a.close();v?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("openAsync",function(a){a=null!=a?a:2;return function(c,f,b,d,e,g,l,m,v,p){e*=l+v;g*=l+v;var t=d.clone();return function(){c.begin();c.moveTo(t.x,t.y);m?c.lineTo(t.x-e-g/a,t.y-g+e/a):c.lineTo(t.x+g/a-e,t.y-g-e/a);c.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var Pa=function(a,c,f){return Fa(a,["width"],c,function(c,b,d,e,g){g=a.shape.getEdgeWidth()*a.view.scale+f;return new mxPoint(e.x+b*c/4+d*g/2,e.y+
d*c/4-b*g/2)},function(c,b,d,e,g,l){c=Math.sqrt(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,l.x,l.y));a.style.width=Math.round(2*c)/a.view.scale-f})},Fa=function(a,c,f,b,d){return U(a,c,function(c){var d=a.absolutePoints,e=d.length-1;c=a.view.translate;var g=a.view.scale,l=f?d[0]:d[e],d=f?d[1]:d[e-1],e=d.x-l.x,m=d.y-l.y,v=Math.sqrt(e*e+m*m),l=b.call(this,v,e/v,m/v,l,d);return new mxPoint(l.x/g-c.x,l.y/g-c.y)},function(c,b,e){var g=a.absolutePoints,l=g.length-1;c=a.view.translate;var m=a.view.scale,v=f?g[0]:
g[l],g=f?g[1]:g[l-1],l=g.x-v.x,p=g.y-v.y,t=Math.sqrt(l*l+p*p);b.x=(b.x+c.x)*m;b.y=(b.y+c.y)*m;d.call(this,t,l/t,p/t,v,g,b,e)})},za=function(a){return function(c){return[U(c,["arrowWidth","arrowSize"],function(c){var f=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",ja.prototype.arrowWidth))),b=Math.max(0,Math.min(a,mxUtils.getValue(this.state.style,"arrowSize",ja.prototype.arrowSize)));return new mxPoint(c.x+(1-b)*c.width,c.y+(1-f)*c.height/2)},function(c,f){this.state.style.arrowWidth=
@ -2858,8 +2858,8 @@ Math.max(0,50*(c.y-a.y)/a.height)},!0)]},cylinder2:function(a){return[U(a,["size
function(a,c){this.state.style.size=Math.max(0,Math.min(1,(a.y+a.height-c.y)/a.height))},!1)]},step:Ga(C.prototype.size,!0,null,!0,C.prototype.fixedSize),hexagon:Ga(G.prototype.size,!0,.5,!0,G.prototype.fixedSize),curlyBracket:Ga(x.prototype.size,!1),display:Ga(ta.prototype.size,!1),cube:Ka(1,b.prototype.size,!1),card:Ka(.5,l.prototype.size,!0),loopLimit:Ka(.5,Q.prototype.size,!0),trapezoid:Ma(.5,t.prototype.size,t.prototype.fixedSize),parallelogram:Ma(1,u.prototype.size,u.prototype.fixedSize)};Graph.createHandle=
U;Graph.handleFactory=Ha;var Va=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var a=Va.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)?c=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(c=mxConstants.SHAPE_SWIMLANE);c=Ha[c];null==c&&null!=this.state.shape&&this.state.shape.isRoundable()&&
(c=Ha[mxConstants.SHAPE_RECTANGLE]);null!=c&&(c=c(this.state),null!=c&&(a=null==a?c:a.concat(c)))}return a};mxEdgeHandler.prototype.createCustomHandles=function(){var a=this.state.style.shape;null==mxCellRenderer.defaultShapes[a]&&null==mxStencilRegistry.getStencil(a)&&(a=mxConstants.SHAPE_CONNECTOR);a=Ha[a];return null!=a?a(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var Ia=new mxPoint(1,0),Ja=new mxPoint(1,0),za=mxUtils.toRadians(-30),Ia=mxUtils.getRotatedPoint(Ia,
Math.cos(za),Math.sin(za)),za=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(za),Math.sin(za));mxEdgeStyle.IsometricConnector=function(a,c,f,b,d){var e=a.view;b=null!=b&&0<b.length?b[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=b&&(b=e.transformControlPoint(a,b));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),f.getCenterY()));var m=Ia.x,v=Ia.y,p=Ja.x,t=Ja.y,u="horizontal"==mxUtils.getValue(a.style,"elbow",
"horizontal");if(null!=g&&null!=l){a=function(a,c,f){a-=B.x;var b=c-B.y;c=(t*a-p*b)/(m*t-v*p);a=(v*a-m*b)/(v*p-m*t);u?(f&&(B=new mxPoint(B.x+m*c,B.y+v*c),d.push(B)),B=new mxPoint(B.x+p*a,B.y+t*a)):(f&&(B=new mxPoint(B.x+p*a,B.y+t*a),d.push(B)),B=new mxPoint(B.x+m*c,B.y+v*c));d.push(B)};var B=l;null==b&&(b=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(b.x,b.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Wa=Graph.prototype.createEdgeHandler;
Math.cos(za),Math.sin(za)),za=mxUtils.toRadians(-150),Ja=mxUtils.getRotatedPoint(Ja,Math.cos(za),Math.sin(za));mxEdgeStyle.IsometricConnector=function(a,c,f,b,d){var e=a.view;b=null!=b&&0<b.length?b[0]:null;var g=a.absolutePoints,l=g[0],g=g[g.length-1];null!=b&&(b=e.transformControlPoint(a,b));null==l&&null!=c&&(l=new mxPoint(c.getCenterX(),c.getCenterY()));null==g&&null!=f&&(g=new mxPoint(f.getCenterX(),f.getCenterY()));var m=Ia.x,v=Ia.y,p=Ja.x,t=Ja.y,B="horizontal"==mxUtils.getValue(a.style,"elbow",
"horizontal");if(null!=g&&null!=l){a=function(a,c,f){a-=u.x;var b=c-u.y;c=(t*a-p*b)/(m*t-v*p);a=(v*a-m*b)/(v*p-m*t);B?(f&&(u=new mxPoint(u.x+m*c,u.y+v*c),d.push(u)),u=new mxPoint(u.x+p*a,u.y+t*a)):(f&&(u=new mxPoint(u.x+p*a,u.y+t*a),d.push(u)),u=new mxPoint(u.x+m*c,u.y+v*c));d.push(u)};var u=l;null==b&&(b=new mxPoint(l.x+(g.x-l.x)/2,l.y+(g.y-l.y)/2));a(b.x,b.y,!0);a(g.x,g.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var Wa=Graph.prototype.createEdgeHandler;
Graph.prototype.createEdgeHandler=function(a,c){if(c==mxEdgeStyle.IsometricConnector){var f=new mxElbowEdgeHandler(a);f.snapToTerminals=!1;return f}return Wa.apply(this,arguments)};e.prototype.constraints=[];d.prototype.getConstraints=function(a,c,f){a=[];var b=Math.tan(mxUtils.toRadians(30)),d=(.5-b)/2,b=Math.min(c,f/(.5+b));c=(c-b)/2;f=(f-b)/2;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+b*d));a.push(new mxConnectionConstraint(new mxPoint(0,
0),!1,null,c+b,f+.25*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+b,f+.75*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c+.5*b,f+(1-d)*b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f+.75*b));return a};q.prototype.getConstraints=function(a,c,f){a=[];var b=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200,b=Math.min(c*Math.tan(b),.5*f);a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));
a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,b));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f-b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f-b));a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));return a};A.prototype.getConstraints=function(a,c,f){a=[];mxUtils.getValue(this.style,
@ -2936,14 +2936,14 @@ a.y*d.view.scale-1,d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container
(d.container.scrollHeight-d.container.clientHeight)/2),d.container.scrollLeft=Math.min(a.x,(d.container.scrollWidth-d.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){d.pageVisible||this.get("pageView").funct();d.zoomTo(Math.floor(20*(d.container.clientWidth-10)/d.pageFormat.width/d.pageScale)/20);if(mxUtils.hasScrollbars(d.container)){var a=d.getPagePadding();d.container.scrollLeft=Math.min(a.x*d.view.scale,(d.container.scrollWidth-
d.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,parseInt(100*d.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&d.zoomTo(a/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var a=new FilenameDialog(this.editorUi,
parseInt(100*d.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(a){a=parseInt(a);!isNaN(a)&&0<a&&(a=new ChangePageSetup(b,null,null,null,a/100),a.ignoreColor=!0,a.ignoreImage=!0,d.model.execute(a))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(a.container,300,80,!0,!0);a.init()}));var n=null,n=this.addAction("grid",function(){d.setGridEnabled(!d.isGridEnabled());b.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");n.setToggleAction(!0);
n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});
n=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));
n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());b.fireEvent(new mxEventObject("connectionPointsChanged"))},
null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});n.setToggleAction(!0);
n.setSelectedCallback(function(){return b.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){q=!1}),q=!0)}));n=mxUtils.bind(this,function(a,f,b,e){return this.addAction(a,function(){if(null!=
b&&d.cellEditor.isContentEditing())b();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,a);(f&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==a.nodeName&&d.replaceElement(a)}):
(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var c=0;c<a.length;c++)0==d.model.getChildCount(a[c])&&d.autoSizeCell(a[c],!1)}finally{d.getModel().endUpdate()}}},null,null,e)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},
Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});
n.setSelectedCallback(function(){return d.isGridEnabled()});n.setEnabled(!1);n=this.addAction("guides",function(){d.graphHandler.guidesEnabled=!d.graphHandler.guidesEnabled;b.fireEvent(new mxEventObject("guidesEnabledChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.graphHandler.guidesEnabled});n.setEnabled(!1);n=this.addAction("tooltips",function(){d.tooltipHandler.setEnabled(!d.tooltipHandler.isEnabled());b.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});n.setToggleAction(!0);
n.setSelectedCallback(function(){return d.tooltipHandler.isEnabled()});n=this.addAction("collapseExpand",function(){var a=new ChangePageSetup(b);a.ignoreColor=!0;a.ignoreImage=!0;a.foldingEnabled=!d.foldingEnabled;d.model.execute(a)});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.foldingEnabled});n.isEnabled=k;n=this.addAction("scrollbars",function(){b.setScrollbars(!b.hasScrollbars())});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.scrollbars});n=this.addAction("pageView",
mxUtils.bind(this,function(){b.setPageVisible(!d.pageVisible)}));n.setToggleAction(!0);n.setSelectedCallback(function(){return d.pageVisible});n=this.addAction("connectionArrows",function(){d.connectionArrowsEnabled=!d.connectionArrowsEnabled;b.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,null,"Alt+Shift+A");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionArrowsEnabled});n=this.addAction("connectionPoints",function(){d.setConnectable(!d.connectionHandler.isEnabled());
b.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isEnabled()});n=this.addAction("copyConnect",function(){d.connectionHandler.setCreateTarget(!d.connectionHandler.isCreateTarget());b.fireEvent(new mxEventObject("copyConnectChanged"))});n.setToggleAction(!0);n.setSelectedCallback(function(){return d.connectionHandler.isCreateTarget()});n.isEnabled=k;n=this.addAction("autosave",function(){b.editor.setAutosave(!b.editor.autosave)});
n.setToggleAction(!0);n.setSelectedCallback(function(){return b.editor.autosave});n.isEnabled=k;n.visible=!1;this.addAction("help",function(){var a="";mxResources.isLanguageSupported(mxClient.language)&&(a="_"+mxClient.language);d.openLink(RESOURCES_PATH+"/help"+a+".html")});var q=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){q||(b.showDialog((new AboutDialog(b)).container,320,280,!0,!0,function(){q=!1}),q=!0)}));n=mxUtils.bind(this,function(a,f,b,e){return this.addAction(a,
function(){if(null!=b&&d.cellEditor.isContentEditing())b();else{d.stopEditing(!1);d.getModel().beginUpdate();try{var a=d.getSelectionCells();d.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,f,a);(f&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontWeight=null;"B"==a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?d.updateLabelElements(d.getSelectionCells(),function(a){a.style.fontStyle=null;"I"==
a.nodeName&&d.replaceElement(a)}):(f&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&d.updateLabelElements(d.getSelectionCells(),function(a){a.style.textDecoration=null;"U"==a.nodeName&&d.replaceElement(a)});for(var c=0;c<a.length;c++)0==d.model.getChildCount(a[c])&&d.autoSizeCell(a[c],!1)}finally{d.getModel().endUpdate()}}},null,null,e)});n("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");n("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",
!1,null)},Editor.ctrlKey+"+I");n("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){b.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",function(){b.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){b.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){b.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});
this.addAction("backgroundColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){b.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){b.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,!0)});this.addAction("shadow",function(){b.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,
null),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dashed",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,
mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("dotted",function(){d.getModel().beginUpdate();try{d.setCellStyles(mxConstants.STYLE_DASHED,"1"),d.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),b.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",d.getSelectionCells()))}finally{d.getModel().endUpdate()}});this.addAction("sharp",
@ -2996,8 +2996,8 @@ DrawioFile.prototype.startSync=function(){"auto"!=DrawioFile.SYNC||"1"==urlParam
DrawioFile.prototype.getLatestVersion=function(a,b){a(null)};DrawioFile.prototype.getLastModifiedDate=function(){return new Date};DrawioFile.prototype.setCurrentRevisionId=function(a){this.setDescriptorRevisionId(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentRevisionId=function(){return this.getDescriptorRevisionId(this.getDescriptor())};DrawioFile.prototype.setCurrentEtag=function(a){this.setDescriptorEtag(this.getDescriptor(),a)};DrawioFile.prototype.getCurrentEtag=function(){return this.getDescriptorEtag(this.getDescriptor())};
DrawioFile.prototype.getDescriptor=function(){return null};DrawioFile.prototype.setDescriptor=function(){};DrawioFile.prototype.setDescriptorRevisionId=function(a,b){this.setDescriptorEtag(a,b)};DrawioFile.prototype.getDescriptorRevisionId=function(a){return this.getDescriptorEtag(a)};DrawioFile.prototype.setDescriptorEtag=function(a,b){};DrawioFile.prototype.getDescriptorEtag=function(a){return null};DrawioFile.prototype.getDescriptorSecret=function(a){return null};
DrawioFile.prototype.installListeners=function(){null==this.changeListener&&(this.changeListener=mxUtils.bind(this,function(a,b){var e=null!=b?b.getProperty("edit"):null;!this.changeListenerEnabled||!this.isEditable()||null!=e&&e.ignoreEdit||this.fileChanged()}),this.ui.editor.graph.model.addListener(mxEvent.CHANGE,this.changeListener),this.ui.editor.graph.addListener("gridSizeChanged",this.changeListener),this.ui.editor.graph.addListener("shadowVisibleChanged",this.changeListener),this.ui.addListener("pageFormatChanged",
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("pageViewChanged",
this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
this.changeListener),this.ui.addListener("pageScaleChanged",this.changeListener),this.ui.addListener("backgroundColorChanged",this.changeListener),this.ui.addListener("backgroundImageChanged",this.changeListener),this.ui.addListener("foldingEnabledChanged",this.changeListener),this.ui.addListener("mathEnabledChanged",this.changeListener),this.ui.addListener("gridEnabledChanged",this.changeListener),this.ui.addListener("guidesEnabledChanged",this.changeListener),this.ui.addListener("tooltipsEnabledChanged",
this.changeListener),this.ui.addListener("pageViewChanged",this.changeListener),this.ui.addListener("connectionPointsChanged",this.changeListener),this.ui.addListener("connectionArrowsChanged",this.changeListener))};
DrawioFile.prototype.addAllSavedStatus=function(a){null!=this.ui.statusContainer&&this.ui.getCurrentFile()==this&&(a=null!=a?a:mxUtils.htmlEntities(mxResources.get(this.allChangesSavedKey)),this.ui.editor.setStatus('<div title="'+a+'">'+a+"</div>"),a=this.ui.statusContainer.getElementsByTagName("div"),0<a.length&&this.isRevisionHistorySupported()&&(a[0].style.cursor="pointer",a[0].style.textDecoration="underline",mxEvent.addListener(a[0],"click",mxUtils.bind(this,function(){this.ui.actions.get("revisionHistory").funct()}))))};
DrawioFile.prototype.saveDraft=function(){try{null==this.draftId&&(this.draftId=Editor.guid());var a={type:"draft",created:this.created,modified:(new Date).getTime(),data:this.ui.getFileData(),title:this.getTitle(),aliveCheck:this.ui.draftAliveCheck};this.ui.setDatabaseItem(".draft_"+this.draftId,JSON.stringify(a));EditorUi.debug("draft saved",this.draftId,a)}catch(b){console.error(b),this.removeDraft()}};
DrawioFile.prototype.removeDraft=function(){try{null!=this.draftId&&(this.ui.removeDatabaseItem(".draft_"+this.draftId),EditorUi.debug("draft deleted",".draft_"+this.draftId))}catch(a){}};
@ -3210,8 +3210,8 @@ if(null!=c){if("rack"==c.childLayout){var b=new mxStackLayout(this.graph,!1);b.g
"autoAddCol","0"),b.autoAddRow="1"==mxUtils.getValue(c,"autoAddRow",b.autoAddCol?"0":"1"),b.colWidths=c.colWidths||"100",b.rowHeights=c.rowHeights||"50",b}return f.apply(this,arguments)};this.updateGlobalUrlVariables()};var y=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return y.apply(this,arguments)&&(!this.shadowVisible||!mxClient.IS_SF)};Graph.prototype.updateGlobalUrlVariables=function(){this.globalVars=Editor.globalVars;if(null!=urlParams.vars)try{this.globalVars=
null!=this.globalVars?mxUtils.clone(this.globalVars):{};var a=JSON.parse(decodeURIComponent(urlParams.vars));if(null!=a)for(var c in a)this.globalVars[c]=a[c]}catch(B){null!=window.console&&console.log("Error in vars URL parameter: "+B)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var D=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(a){var c=D.apply(this,arguments);null==c&&null!=this.globalVars&&(c=this.globalVars[a]);
return c};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var a=this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(a.ownerDocument)).decode(a)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var z=Graph.prototype.getSvg;Graph.prototype.getSvg=function(a,c,b,f,d,e,g,l,m,p,t,u){var k=null;u||null==this.themes||"darkTheme"!=this.defaultThemeName||(k=this.stylesheet,this.stylesheet=this.getDefaultStylesheet(),
this.refresh());var n=z.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var x=n.ownerDocument,v=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");null!=x.setAttributeNS?v.setAttributeNS("type","text/css"):v.setAttribute("type","text/css");for(var y="",A="",B=0;B<this.extFonts.length;B++){var q=this.extFonts[B].name,D=this.extFonts[B].url;0==D.indexOf(Editor.GOOGLE_FONTS)?y+="@import url("+D+");\n":A+='@font-face {\nfont-family: "'+
q+'";\nsrc: url("'+D+'");\n}\n'}v.appendChild(x.createTextNode(y+A));n.getElementsByTagName("defs")[0].appendChild(v)}null!=k&&(this.stylesheet=k,this.refresh());return n};var E=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=E.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
this.refresh());var n=z.apply(this,arguments);if(t&&null!=this.extFonts&&0<this.extFonts.length){var x=n.ownerDocument,v=null!=x.createElementNS?x.createElementNS(mxConstants.NS_SVG,"style"):x.createElement("style");null!=x.setAttributeNS?v.setAttributeNS("type","text/css"):v.setAttribute("type","text/css");for(var y="",B="",A=0;A<this.extFonts.length;A++){var q=this.extFonts[A].name,D=this.extFonts[A].url;0==D.indexOf(Editor.GOOGLE_FONTS)?y+="@import url("+D+");\n":B+='@font-face {\nfont-family: "'+
q+'";\nsrc: url("'+D+'");\n}\n'}v.appendChild(x.createTextNode(y+B));n.getElementsByTagName("defs")[0].appendChild(v)}null!=k&&(this.stylesheet=k,this.refresh());return n};var E=Graph.prototype.createSvgImageExport;Graph.prototype.createSvgImageExport=function(){var a=E.apply(this,arguments);if(this.mathEnabled){this.container.getBoundingClientRect();var c=a.drawText;a.drawText=function(a,b){if(null!=a.text&&null!=a.text.value&&a.text.checkBounds()&&(mxUtils.isNode(a.text.value)||a.text.dialect==
mxConstants.DIALECT_STRICTHTML)){var f=a.text.getContentNode();if(null!=f){f=f.cloneNode(!0);if(f.getElementsByTagNameNS)for(var d=f.getElementsByTagNameNS("http://www.w3.org/1998/Math/MathML","math");0<d.length;)d[0].parentNode.removeChild(d[0]);null!=f.innerHTML&&(d=a.text.value,a.text.value=f.innerHTML,c.apply(this,arguments),a.text.value=d)}}else c.apply(this,arguments)}}return a};var A=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){A.apply(this,
arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var a=this.getDrawPane().parentNode;!this.graph.mathEnabled||mxClient.NO_FO||null!=this.webKitForceRepaintNode&&null!=this.webKitForceRepaintNode.parentNode||"svg"!=this.graph.container.firstChild.nodeName?null==this.webKitForceRepaintNode||this.graph.mathEnabled&&("svg"==this.graph.container.firstChild.nodeName||this.graph.container.firstChild==this.webKitForceRepaintNode)||(null!=this.webKitForceRepaintNode.parentNode&&this.webKitForceRepaintNode.parentNode.removeChild(this.webKitForceRepaintNode),
this.webKitForceRepaintNode=null):(this.webKitForceRepaintNode=document.createElement("div"),this.webKitForceRepaintNode.style.cssText="position:absolute;",a.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,a.ownerSVGElement))}};var C=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){C.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(a){if("data:action/json,"==a.substring(0,17)&&(a=JSON.parse(a.substring(17)),
@ -3245,7 +3245,7 @@ f);x.height=Math.ceil(x.height*f);y*=f;!q&&c.pageVisible?(u=c.getPageLayout(),k-
null!=a.editor.fontCss&&(b.writeln('<style type="text/css">'),b.writeln(a.editor.fontCss),b.writeln("</style>"));if(null!=c.extFonts)for(var f=0;f<c.extFonts.length;f++){var d=c.extFonts[f].name,e=c.extFonts[f].url;0==e.indexOf(Editor.GOOGLE_FONTS)?b.writeln('<link rel="stylesheet" href="'+e+'" charset="UTF-8" type="text/css">'):(b.writeln('<style type="text/css">'),b.writeln('@font-face {\n\tfont-family: "'+d+'";\n\tsrc: url("'+e+'");\n}'),b.writeln("</style>"))}};if("undefined"!==typeof MathJax){var B=
b.renderPage;b.renderPage=function(c,b,f,d,e,g){var l=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!a.editor.useForeignObjectForMath?!0:a.editor.originalNoForeignObject;var m=B.apply(this,arguments);mxClient.NO_FO=l;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:m.className="geDisableMathJax";return m}}k=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(k=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());b.open(null,null,e,!0);null!=k&&(d.stylesheet=k,d.refresh())}else{x=
c.background;if(null==x||""==x||x==mxConstants.NONE)x="#ffffff";b.backgroundColor=x;b.autoOrigin=q;b.appendGraph(c,y,k,n,e,!0);if(null!=c.extFonts&&null!=b.wnd)for(e=0;e<c.extFonts.length;e++)k=c.extFonts[e].name,n=c.extFonts[e].url,0==n.indexOf(Editor.GOOGLE_FONTS)?b.wnd.document.writeln('<link rel="stylesheet" href="'+n+'" charset="UTF-8" type="text/css">'):(b.wnd.document.writeln('<style type="text/css">'),b.wnd.document.writeln('@font-face {\n\tfont-family: "'+k+'";\n\tsrc: url("'+n+'");\n}'),
b.wnd.document.writeln("</style>"))}g&&(c.useCssTransforms=g,c.currentTranslate=l,c.currentScale=m,c.view.translate=p,c.view.scale=t);return b}var f=parseInt(ma.value)/100;isNaN(f)&&(f=1,ma.value="100 %");var f=.75*f,e=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(e=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=k.value,l=n.value,p=!t.checked,u=null;if(a.isDesktopApp())PrintDialog.electronPrint(a,t.checked,g,l,A.checked,J.value,Q.value,parseInt(v.value)/100,parseInt(ma.value)/
b.wnd.document.writeln("</style>"))}g&&(c.useCssTransforms=g,c.currentTranslate=l,c.currentScale=m,c.view.translate=p,c.view.scale=t);return b}var f=parseInt(ma.value)/100;isNaN(f)&&(f=1,ma.value="100 %");var f=.75*f,e=null;null!=d.themes&&"darkTheme"==d.defaultThemeName&&(e=d.stylesheet,d.stylesheet=d.getDefaultStylesheet(),d.refresh());var g=k.value,l=n.value,p=!t.checked,u=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(a,t.checked,g,l,A.checked,J.value,Q.value,parseInt(v.value)/100,parseInt(ma.value)/
100,ba.get());else{p&&(p=g==m&&l==m);if(!p&&null!=a.pages&&a.pages.length){var x=0,p=a.pages.length-1;t.checked||(x=parseInt(g)-1,p=parseInt(l)-1);for(var y=x;y<=p;y++){var q=a.pages[y],g=q==a.currentPage?d:null;if(null==g){var g=a.createTemporaryGraph(d.stylesheet),l=!0,x=!1,z=null,D=null;null==q.viewState&&null==q.root&&a.updatePageRoot(q);null!=q.viewState&&(l=q.viewState.pageVisible,x=q.viewState.mathEnabled,z=q.viewState.background,D=q.viewState.backgroundImage,g.extFonts=q.viewState.extFonts);
g.background=z;g.backgroundImage=null!=D?new mxImage(D.src,D.width,D.height):null;g.pageVisible=l;g.mathEnabled=x;var B=g.getGlobalVariable;g.getGlobalVariable=function(c){return"page"==c?q.getName():"pagenumber"==c?y+1:"pagecount"==c?null!=a.pages?a.pages.length:1:B.apply(this,arguments)};document.body.appendChild(g.container);a.updatePageRoot(q);g.model.setRoot(q.root)}u=b(g,u,y!=p);g!=d&&g.container.parentNode.removeChild(g.container)}}else u=b(d);null==u?a.handleError({message:mxResources.get("errorUpdatingPreview")}):
(u.mathEnabled&&(p=u.wnd.document,c&&(u.wnd.IMMEDIATE_PRINT=!0),p.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),u.closeDocument(),!u.mathEnabled&&c&&PrintDialog.printPreview(u));null!=e&&(d.stylesheet=e,d.refresh())}}var d=a.editor.graph,e=document.createElement("div"),g=document.createElement("h3");g.style.width="100%";g.style.textAlign="center";g.style.marginTop="0px";mxUtils.write(g,c||mxResources.get("print"));e.appendChild(g);var l=1,m=1,p=
@ -3273,22 +3273,22 @@ e;e+=c;return a.substring(b,e)}function f(a){a=c(a,4);return a.charCodeAt(3)+(a.
EditorUi.prototype.maxBackgroundSize=1600;EditorUi.prototype.maxImageSize=520;EditorUi.prototype.maxTextWidth=520;EditorUi.prototype.resampleThreshold=1E5;EditorUi.prototype.maxImageBytes=1E6;EditorUi.prototype.maxBackgroundBytes=25E5;EditorUi.prototype.maxTextBytes=5E5;EditorUi.prototype.currentFile=null;EditorUi.prototype.printPdfExport=!1;EditorUi.prototype.pdfPageExport=!0;EditorUi.prototype.formatEnabled="0"!=urlParams.format;EditorUi.prototype.insertTemplateEnabled=!0;EditorUi.prototype.closableScratchpad=
!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var a=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!a.getContext||!a.getContext("2d"))}catch(m){}try{var b=document.createElement("canvas"),d=new Image;d.onload=function(){try{b.getContext("2d").drawImage(d,0,0);var a=b.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=a&&6<a.length}catch(p){}};d.src="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1px" height="1px" version="1.1"><foreignObject pointer-events="all" width="1" height="1"><div xmlns="http://www.w3.org/1999/xhtml"></div></foreignObject></svg>')))}catch(m){}try{b=
document.createElement("canvas");b.width=b.height=1;var e=b.toDataURL("image/jpeg");EditorUi.prototype.jpgSupported=null!==e.match("image/jpeg")}catch(m){}})();EditorUi.prototype.openLink=function(a,b,d){return this.editor.graph.openLink(a,b,d)};EditorUi.prototype.showSplash=function(a){};EditorUi.prototype.getLocalData=function(a,b){b(localStorage.getItem(a))};EditorUi.prototype.setLocalData=function(a,b,d){localStorage.setItem(a,b);null!=d&&d()};EditorUi.prototype.removeLocalData=function(a,b){localStorage.removeItem(a);
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isDesktopApp=function(){return!1};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||
!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",
g.style.fontFamily="Helvetica, Arial",g.style.fontSize="9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&
(e+="..."),g.innerHTML=e,d.appendChild(g),c.status=g,mxClient.IS_VML&&(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&null!=c.status.parentNode&&
c.status.parentNode.removeChild(c.status);c.status=null};c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==
a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&
120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");
e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(c),p=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=p?mxUtils.getXml(p):""}catch(u){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));
a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?
this.pages:[];for(var e=d.length-1;0<=e;e--){var p=this.updatePageRoot(new DiagramPage(d[e]));null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,p,0==e?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,
this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,m,p,u,t,k,n,q){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;k=null!=k?k:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=
g.nodeName.toLowerCase()){if(q){var l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());l.appendChild(a)}else{l=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(l);if(Graph.decompress(g)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(l)}n?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),
g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),
g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!p&&!m&&(u||null!=d&&/(\.html)$/i.test(d.getTitle())))q=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(p||!m&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&
d.getMode()!=App.MODE_BROWSER||(e=null),q=this.getEmbeddedSvg(q,b,e,null,t,k,f);return q};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):
null==b||d?a=a.cloneNode(!0):(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
b()};EditorUi.prototype.setMathEnabled=function(a){this.editor.graph.mathEnabled=a;this.editor.updateGraphComponents();this.editor.graph.refresh();this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(a){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(a){return this.isOfflineApp()||!navigator.onLine||!a&&"1"==urlParams.stealth};EditorUi.prototype.createSpinner=
function(a,b,d){d=null!=d?d:24;var c=new Spinner({lines:12,length:d,width:Math.round(d/3),radius:Math.round(d/2),rotate:0,color:"dark"==uiTheme?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),f=c.spin;c.spin=function(d,e){var g=!1;this.active||(f.call(this,d),this.active=!0,null!=e&&(g=document.createElement("div"),g.style.position="absolute",g.style.whiteSpace="nowrap",g.style.background="#4B4243",g.style.color="white",g.style.fontFamily="Helvetica, Arial",g.style.fontSize=
"9pt",g.style.padding="6px",g.style.paddingLeft="10px",g.style.paddingRight="10px",g.style.zIndex=2E9,g.style.left=Math.max(0,a)+"px",g.style.top=Math.max(0,b+70)+"px",mxUtils.setPrefixedStyle(g.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(g.style,"transform","translate(-50%,-50%)"),"dark"!=uiTheme&&mxUtils.setPrefixedStyle(g.style,"boxShadow","2px 2px 3px 0px #ddd"),"..."!=e.substring(e.length-3,e.length)&&"!"!=e.charAt(e.length-1)&&(e+="..."),g.innerHTML=e,d.appendChild(g),c.status=g,mxClient.IS_VML&&
(null==document.documentMode||8>=document.documentMode)&&(g.style.left=Math.round(Math.max(0,a-g.offsetWidth/2))+"px",g.style.top=Math.round(Math.max(0,b+70-g.offsetHeight/2))+"px")),this.pause=mxUtils.bind(this,function(){var a=function(){};this.active&&(a=mxUtils.bind(this,function(){this.spin(d,e)}));this.stop();return a}),g=!0);return g};var e=c.stop;c.stop=function(){e.call(this);this.active=!1;null!=c.status&&null!=c.status.parentNode&&c.status.parentNode.removeChild(c.status);c.status=null};
c.pause=function(){return function(){}};return c};EditorUi.prototype.isCompatibleString=function(a){try{var c=mxUtils.parseXml(a),b=this.editor.extractGraphModel(c.documentElement,!0);return null!=b&&0==b.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||
80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&4==a.charCodeAt(3)||80==a.charCodeAt(0)&&75==a.charCodeAt(1)&&3==a.charCodeAt(2)&&6==a.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(a){return 8<a.length&&(208==a.charCodeAt(0)&&207==a.charCodeAt(1)&&17==a.charCodeAt(2)&&224==a.charCodeAt(3)&&161==a.charCodeAt(4)&&177==a.charCodeAt(5)&&26==a.charCodeAt(6)&&225==a.charCodeAt(7)||60==a.charCodeAt(0)&&63==a.charCodeAt(1)&&120==a.charCodeAt(2)&&109==a.charCodeAt(3)&&108==a.charCodeAt(3))};
EditorUi.prototype.isPngData=function(a){return 8<a.length&&137==a.charCodeAt(0)&&80==a.charCodeAt(1)&&78==a.charCodeAt(2)&&71==a.charCodeAt(3)&&13==a.charCodeAt(4)&&10==a.charCodeAt(5)&&26==a.charCodeAt(6)&&10==a.charCodeAt(7)};var a=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(c){var b=a.apply(this,arguments);if(null==b)try{var d=c.indexOf("&lt;mxfile ");if(0<=d){var e=c.lastIndexOf("&lt;/mxfile&gt;");e>d&&(b=c.substring(d,e+15).replace(/&gt;/g,
">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else var m=mxUtils.parseXml(c),p=this.editor.extractGraphModel(m.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility),b=null!=p?mxUtils.getXml(p):""}catch(u){}return b};EditorUi.prototype.validateFileData=function(a){if(null!=a&&0<a.length){var c=a.indexOf('<meta charset="utf-8">');0<=c&&(a=a.slice(0,c)+'<meta charset="utf-8"/>'+a.slice(c+23-1,a.length));a=Graph.zapGremlins(a)}return a};EditorUi.prototype.replaceFileData=
function(a){a=this.validateFileData(a);a=null!=a&&0<a.length?mxUtils.parseXml(a).documentElement:null;var c=null!=a?this.editor.extractGraphModel(a,!0):null;null!=c&&(a=c);if(null!=a){c=this.editor.graph;c.model.beginUpdate();try{var b=null!=this.pages?this.pages.slice():null,d=a.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name")){this.fileNode=a;this.pages=null!=this.pages?this.pages:[];for(var e=d.length-1;0<=e;e--){var p=this.updatePageRoot(new DiagramPage(d[e]));
null==p.getName()&&p.setName(mxResources.get("pageWithNumber",[e+1]));c.model.execute(new ChangePage(this,p,0==e?p:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=a.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(a.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),c.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(a),null!=this.currentPage&&(this.currentPage.root=
this.editor.graph.model.root);if(null!=b)for(e=0;e<b.length;e++)c.model.execute(new ChangePage(this,b[e],null))}finally{c.model.endUpdate()}}};EditorUi.prototype.createFileData=function(a,b,d,e,m,p,u,t,k,n,q){b=null!=b?b:this.editor.graph;m=null!=m?m:!1;k=null!=k?k:!0;var c,f=null;null==d||d.getMode()==App.MODE_DEVICE||d.getMode()==App.MODE_BROWSER?c="_blank":f=c=e;if(null==a)return"";var g=a;if("mxfile"!=g.nodeName.toLowerCase()){if(q){var l=a.ownerDocument.createElement("diagram");l.setAttribute("id",
Editor.guid());l.appendChild(a)}else{l=Graph.zapGremlins(mxUtils.getXml(a));g=Graph.compress(l);if(Graph.decompress(g)!=l)return l;l=a.ownerDocument.createElement("diagram");l.setAttribute("id",Editor.guid());mxUtils.setTextContent(l,g)}g=a.ownerDocument.createElement("mxfile");g.appendChild(l)}n?(g=g.cloneNode(!0),g.removeAttribute("modified"),g.removeAttribute("host"),g.removeAttribute("agent"),g.removeAttribute("etag"),g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),
g.removeAttribute("type")):(g.removeAttribute("userAgent"),g.removeAttribute("version"),g.removeAttribute("editor"),g.removeAttribute("pages"),g.removeAttribute("type"),mxClient.IS_CHROMEAPP?g.setAttribute("host","Chrome"):EditorUi.isElectronApp?g.setAttribute("host","Electron"):g.setAttribute("host",window.location.hostname),g.setAttribute("modified",(new Date).toISOString()),g.setAttribute("agent",navigator.appVersion),g.setAttribute("version",EditorUi.VERSION),g.setAttribute("etag",Editor.guid()),
a=null!=d?d.getMode():this.mode,null!=a&&g.setAttribute("type",a),1<g.getElementsByTagName("diagram").length&&null!=this.pages&&g.setAttribute("pages",this.pages.length));q=q?mxUtils.getPrettyXml(g):mxUtils.getXml(g);if(!p&&!m&&(u||null!=d&&/(\.html)$/i.test(d.getTitle())))q=this.getHtml2(mxUtils.getXml(g),b,null!=d?d.getTitle():null,c,f);else if(p||!m&&null!=d&&/(\.svg)$/i.test(d.getTitle()))null==d||d.getMode()!=App.MODE_DEVICE&&d.getMode()!=App.MODE_BROWSER||(e=null),q=this.getEmbeddedSvg(q,b,
e,null,t,k,f);return q};EditorUi.prototype.getXmlFileData=function(a,b,d){a=null!=a?a:!0;b=null!=b?b:!1;d=null!=d?d:!Editor.compressXml;var c=this.editor.getGraphXml(a);if(a&&null!=this.fileNode&&null!=this.currentPage)if(a=function(a){var b=a.getElementsByTagName("mxGraphModel"),b=0<b.length?b[0]:null;null==b&&d?(b=mxUtils.trim(mxUtils.getTextContent(a)),a=a.cloneNode(!1),0<b.length&&(b=Graph.decompress(b),null!=b&&0<b.length&&a.appendChild(mxUtils.parseXml(b).documentElement))):null==b||d?a=a.cloneNode(!0):
(a=a.cloneNode(!1),mxUtils.setTextContent(a,Graph.compressNode(b)));c.appendChild(a)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,Graph.compressNode(c)),c=this.fileNode.cloneNode(!1),b)a(this.currentPage.node);else for(b=0;b<this.pages.length;b++){if(this.currentPage!=this.pages[b]&&this.pages[b].needsUpdate){var f=(new mxCodec(mxUtils.createXmlDocument())).encode(new mxGraphModel(this.pages[b].root));this.editor.graph.saveViewState(this.pages[b].viewState,
f);EditorUi.removeChildNodes(this.pages[b].node);mxUtils.setTextContent(this.pages[b].node,Graph.compressNode(f));delete this.pages[b].needsUpdate}a(this.pages[b].node)}return c};EditorUi.prototype.anonymizeString=function(a,b){for(var c=[],f=0;f<a.length;f++){var d=a.charAt(f);0<=EditorUi.ignoredAnonymizedChars.indexOf(d)?c.push(d):isNaN(parseInt(d))?d.toLowerCase()!=d?c.push(String.fromCharCode(65+Math.round(25*Math.random()))):d.toUpperCase()!=d?c.push(String.fromCharCode(97+Math.round(25*Math.random()))):
/\s/.test(d)?c.push(" "):c.push("?"):c.push(b?"0":Math.round(9*Math.random()))}return c.join("")};EditorUi.prototype.anonymizePatch=function(a){if(null!=a[EditorUi.DIFF_INSERT])for(var c=0;c<a[EditorUi.DIFF_INSERT].length;c++)try{var b=mxUtils.parseXml(a[EditorUi.DIFF_INSERT][c].data).documentElement.cloneNode(!1);null!=b.getAttribute("name")&&b.setAttribute("name",this.anonymizeString(b.getAttribute("name")));a[EditorUi.DIFF_INSERT][c].data=mxUtils.getXml(b)}catch(p){a[EditorUi.DIFF_INSERT][c].data=
p.message}if(null!=a[EditorUi.DIFF_UPDATE]){for(var d in a[EditorUi.DIFF_UPDATE]){var e=a[EditorUi.DIFF_UPDATE][d];null!=e.name&&(e.name=this.anonymizeString(e.name));null!=e.cells&&(c=mxUtils.bind(this,function(a){var c=e.cells[a];if(null!=c){for(var b in c)null!=c[b].value&&(c[b].value="["+c[b].value.length+"]"),null!=c[b].xmlValue&&(c[b].xmlValue="["+c[b].xmlValue.length+"]"),null!=c[b].style&&(c[b].style="["+c[b].style.length+"]"),0==Object.keys(c[b]).length&&delete c[b];0==Object.keys(c).length&&
@ -3344,7 +3344,7 @@ F(c,b)}mxEvent.consume(a)});mxEvent.addGestureListeners(l,function(){},mxUtils.b
"",l.style.cursor="default",this.sidebar.showTooltips=!0,E.panningManager.stop(),E.graphHandler.reset(),E.isMouseDown=!1,E.autoScroll=!0,I(a),mxEvent.consume(a))}));mxEvent.addListener(l,"mouseleave",mxUtils.bind(this,function(a){E.isMouseDown&&null!=E.graphHandler.first&&(E.graphHandler.resume(),null!=E.graphHandler.hint&&(E.graphHandler.hint.style.visibility="visible"),l.style.backgroundColor="",l.style.cursor="",E.autoScroll=!0)}));Graph.fileSupport&&(mxEvent.addListener(l,"dragover",mxUtils.bind(this,
function(a){l.style.backgroundColor="#f1f3f4";a.dataTransfer.dropEffect="copy";l.style.cursor="copy";this.sidebar.hideTooltip();a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"drop",mxUtils.bind(this,function(a){l.style.cursor="";l.style.backgroundColor="";0<a.dataTransfer.files.length&&this.importFiles(a.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(c,d,e,m,p,t,k,n,u){if(null!=c&&"image/"==d.substring(0,6))c="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+
this.convertDataUri(c),c=[new mxCell("",new mxGeometry(0,0,p,t),c)],c[0].vertex=!0,F(c,new mxRectangle(0,0,p,t),a,mxEvent.isAltDown(a)?null:k.substring(0,k.lastIndexOf(".")).replace(/_/g," ")),null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null);else{var x=!1,y=mxUtils.bind(this,function(c,d){if(null!=c&&"application/pdf"==d){var e=Editor.extractGraphModelFromPdf(c);null!=e&&0<e.length&&(c=e)}if(null!=c)if(e=mxUtils.parseXml(c),"mxlibrary"==e.documentElement.nodeName)try{var m=
JSON.parse(mxUtils.getTextContent(e.documentElement));g(m,l);b=b.concat(m);G(a);this.spinner.stop();x=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var t=this.stringToCells(Editor.getDiagramNodeXml(p[m])),k=this.editor.graph.getBoundingBoxFromGeometry(t);F(t,new mxRectangle(0,0,k.width,k.height),a)}x=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
JSON.parse(mxUtils.getTextContent(e.documentElement));g(m,l);b=b.concat(m);G(a);this.spinner.stop();x=!0}catch(L){}else if("mxfile"==e.documentElement.nodeName)try{for(var p=e.documentElement.getElementsByTagName("diagram"),m=0;m<p.length;m++){var k=this.stringToCells(Editor.getDiagramNodeXml(p[m])),t=this.editor.graph.getBoundingBoxFromGeometry(k);F(k,new mxRectangle(0,0,t.width,t.height),a)}x=!0}catch(L){null!=window.console&&console.log("error in drop handler:",L)}x||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));
null!=f&&null!=f.parentNode&&0<b.length&&(f.parentNode.removeChild(f),f=null)});null!=u&&null!=k&&(/(\.v(dx|sdx?))($|\?)/i.test(k)||/(\.vs(x|sx?))($|\?)/i.test(k))?this.importVisio(u,function(a){y(a,"text/xml")},null,k):!this.isOffline()&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(c,k)&&null!=u?this.parseFile(u,mxUtils.bind(this,function(a){4==a.readyState&&(this.spinner.stop(),200<=a.status&&299>=a.status?y(a.responseText,"text/xml"):this.handleError({message:mxResources.get(413==a.status?
"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):y(c,d)}}));a.stopPropagation();a.preventDefault()})),mxEvent.addListener(l,"dragleave",function(a){l.style.cursor="";l.style.backgroundColor="";a.stopPropagation();a.preventDefault()}));q=q.cloneNode(!1);q.setAttribute("src",Editor.editImage);q.setAttribute("title",mxResources.get("edit"));n.insertBefore(q,n.firstChild);mxEvent.addListener(q,"click",C);mxEvent.addListener(l,"dblclick",function(a){mxEvent.getSource(a)==
l&&C(a)});e=q.cloneNode(!1);e.setAttribute("src",Editor.plusImage);e.setAttribute("title",mxResources.get("add"));n.insertBefore(e,n.firstChild);mxEvent.addListener(e,"click",I);this.isOffline()||".scratchpad"!=a.title||null==EditorUi.scratchpadHelpLink||(e=document.createElement("span"),e.setAttribute("title",mxResources.get("help")),e.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;",mxUtils.write(e,"?"),mxEvent.addGestureListeners(e,mxUtils.bind(this,function(a){this.openLink(EditorUi.scratchpadHelpLink);
@ -3545,12 +3545,12 @@ window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("l
this.editor.undoManager.clear();this.editor.modified=null!=d?d:!1;this.updateUi();window.self!==window.top&&window.focus();null!=this.format&&this.format.refresh()}))};EditorUi.prototype.showLayersDialog=function(){1<this.editor.graph.getModel().getChildCount(this.editor.graph.getModel().getRoot())&&(null==this.actions.layersWindow?this.actions.get("layers").funct():this.actions.layersWindow.window.setVisible(!0))};EditorUi.prototype.getPublicUrl=function(a,b){null!=a?a.getPublicUrl(b):b(null)};EditorUi.prototype.createLoadMessage=
function(a){var c=this.editor.graph;return{event:a,pageVisible:c.pageVisible,translate:c.view.translate,bounds:c.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:c.view.scale,page:c.view.getBackgroundPageBounds()}};EditorUi.prototype.installMessageHandler=function(a){var c=null,b=!1,d=!1,e=null,k=mxUtils.bind(this,function(a,c){this.editor.modified&&"0"!=urlParams.modified?null!=urlParams.modified&&this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(urlParams.modified))):this.editor.setStatus("")});
this.editor.graph.model.addListener(mxEvent.CHANGE,k);mxEvent.addListener(window,"message",mxUtils.bind(this,function(f){if(f.source==(window.opener||window.parent)){var g=f.data,l=mxUtils.bind(this,function(a){if(null!=a&&"function"===typeof a.charAt&&"<"!=a.charAt(0))try{"data:image/png;base64,"==a.substring(0,22)?a=this.extractGraphModelFromPng(a):"data:image/svg+xml;base64,"==a.substring(0,26)?a=atob(a.substring(26)):"data:image/svg+xml;utf8,"==a.substring(0,24)&&(a=a.substring(24)),null!=a&&
("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(fa){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(V){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("prompt"==g.action){this.spinner.stop();
var k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?n.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==g.action){var m=l(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",[g.name||this.defaultFilename]),
m,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),"*")}):null);this.showDialog(k.container,
640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(V){n.postMessage(JSON.stringify({event:"draft",error:V.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(c,b){c=c||this.emptyDiagramXml;null!=g.callback?n.postMessage(JSON.stringify({event:"template",xml:c,blank:c==this.emptyDiagramXml,
name:b,message:g}),"*"):(a(c,f,c!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){n.postMessage(JSON.stringify({event:"template",docUrl:a,info:c,name:b}),"*")}),
null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==g.action){var u=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:u,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
("%"==a.charAt(0)?a=decodeURIComponent(a):"<"!=a.charAt(0)&&(a=Graph.decompress(a)))}catch(fa){}return a});if("json"==urlParams.proto){try{g=JSON.parse(g)}catch(V){g=null}try{if(null==g)return;if("dialog"==g.action){this.showError(null!=g.titleKey?mxResources.get(g.titleKey):g.title,null!=g.messageKey?mxResources.get(g.messageKey):g.message,null!=g.buttonKey?mxResources.get(g.buttonKey):g.button);null!=g.modified&&(this.editor.modified=g.modified);return}if("layout"==g.action){this.executeLayoutList(g.layouts);
return}if("prompt"==g.action){this.spinner.stop();var k=new FilenameDialog(this,g.defaultValue||"",null!=g.okKey?mxResources.get(g.okKey):g.ok,function(a){null!=a?n.postMessage(JSON.stringify({event:"prompt",value:a,message:g}),"*"):n.postMessage(JSON.stringify({event:"prompt-cancel",message:g}),"*")},null!=g.titleKey?mxResources.get(g.titleKey):g.title);this.showDialog(k.container,300,80,!0,!1);k.init();return}if("draft"==g.action){var m=l(g.xml);this.spinner.stop();k=new DraftDialog(this,mxResources.get("draftFound",
[g.name||this.defaultFilename]),m,mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"edit",message:g}),"*")}),mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"discard",message:g}),"*")}),g.editKey?mxResources.get(g.editKey):null,g.discardKey?mxResources.get(g.discardKey):null,g.ignore?mxUtils.bind(this,function(){this.hideDialog();n.postMessage(JSON.stringify({event:"draft",result:"ignore",message:g}),
"*")}):null);this.showDialog(k.container,640,480,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));try{k.init()}catch(V){n.postMessage(JSON.stringify({event:"draft",error:V.toString(),message:g}),"*")}return}if("template"==g.action){this.spinner.stop();var p=1==g.enableRecent,q=1==g.enableSearch,t=1==g.enableCustomTemp,k=new NewDialog(this,!1,null!=g.callback,mxUtils.bind(this,function(c,b){c=c||this.emptyDiagramXml;null!=g.callback?n.postMessage(JSON.stringify({event:"template",
xml:c,blank:c==this.emptyDiagramXml,name:b,message:g}),"*"):(a(c,f,c!=this.emptyDiagramXml),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,p?mxUtils.bind(this,function(a){this.remoteInvoke("getRecentDiagrams",null,null,a,function(){a(null,"Network Error!")})}):null,q?mxUtils.bind(this,function(a,c){this.remoteInvoke("searchDiagrams",[a],null,c,function(){c(null,"Network Error!")})}):null,mxUtils.bind(this,function(a,c,b){n.postMessage(JSON.stringify({event:"template",
docUrl:a,info:c,name:b}),"*")}),null,null,t?mxUtils.bind(this,function(a){this.remoteInvoke("getCustomTemplates",null,null,a,function(){a({},0)})}):null);this.showDialog(k.container,620,440,!0,!1,mxUtils.bind(this,function(a){a&&this.actions.get("exit").funct()}));k.init();return}if("textContent"==g.action){var u=this.getDiagramTextContent();n.postMessage(JSON.stringify({event:"textContent",data:u,message:g}),"*");return}if("status"==g.action){null!=g.messageKey?this.editor.setStatus(mxUtils.htmlEntities(mxResources.get(g.messageKey))):
null!=g.message&&this.editor.setStatus(mxUtils.htmlEntities(g.message));null!=g.modified&&(this.editor.modified=g.modified);return}if("spinner"==g.action){var x=null!=g.messageKey?mxResources.get(g.messageKey):g.message;null==g.show||g.show?this.spinner.spin(document.body,x):this.spinner.stop();return}if("export"==g.action){if("png"==g.format||"xmlpng"==g.format){if(null==g.spin&&null==g.spinKey||this.spinner.spin(document.body,null!=g.spinKey?mxResources.get(g.spinKey):g.spin)){var K=null!=g.xml?
g.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var v=this.editor.graph,J=mxUtils.bind(this,function(a){this.editor.graph.setEnabled(!0);this.spinner.stop();var c=this.createLoadMessage("export");c.format=g.format;c.message=g;c.data=a;c.xml=K;n.postMessage(JSON.stringify(c),"*")}),B=mxUtils.bind(this,function(a){null==a&&(a=Editor.blankImage);"xmlpng"==g.format&&(a=Editor.writeGraphModelToPng(a,"tEXt","mxfile",encodeURIComponent(K)));v!=this.editor.graph&&v.container.parentNode.removeChild(v.container);
J(a)}),P=g.pageId||(null!=this.pages?this.pages[0].getId():null);if(this.isExportToCanvas()){if(null!=this.pages&&this.currentPage.getId()!=P){for(var S=v.getGlobalVariable,v=this.createTemporaryGraph(v.getStylesheet()),H,N=0;N<this.pages.length;N++)if(this.pages[N].getId()==P){H=this.updatePageRoot(this.pages[N]);break}v.getGlobalVariable=function(a){return"page"==a?H.getName():"pagenumber"==a?1:S.apply(this,arguments)};document.body.appendChild(v.container);v.model.setRoot(H.root)}if(null!=g.layerIds){for(var ea=
@ -3865,9 +3865,9 @@ c.left,top:a.top-c.top,bottom:a.bottom-c.top,right:a.right-c.left};e.style.left=
m=null);b.style.border=E});mxEvent.addListener(document,"mousemove",function(a){for(a=mxEvent.getSource(a);null!=a;){if(a==b||a==e||a==m)return;a=a.parentNode}d()});mxEvent.addListener(document,"mouseleave",function(a){d()})}else e.style.top=-this.toolbarHeight+"px",b.appendChild(e)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(b,"mouseenter",g):g()};
GraphViewer.prototype.addClickHandler=function(a,b){a.linkPolicy=this.graphConfig.target||a.linkPolicy;a.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(e,d){if(null==d){var k=mxEvent.getSource(e);"a"==k.nodeName.toLowerCase()&&(d=k.getAttribute("href"))}null!=b?null==d||a.isCustomLink(d)?mxEvent.consume(e):a.isExternalProtocol(d)||a.isBlankLink(d)||window.setTimeout(function(){b.destroy()},0):null!=d&&null==b&&a.isCustomLink(d)&&(mxEvent.isTouchEvent(e)||!mxEvent.isPopupTrigger(e))&&
a.customLinkClicked(d)&&(mxUtils.clearSelection(),mxEvent.consume(e))}),mxUtils.bind(this,function(a){null!=b||!this.lightboxClickEnabled||mxEvent.isTouchEvent(a)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,lightbox:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);a="app.diagrams.net";"1"==urlParams.dev&&(e.dev="1",
e.drawdev="1",a="test.draw.io");this.lightboxWindow=window.open("https://"+a+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLightbox=function(a,b,e){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){a=null!=a?a:null!=this.graphConfig.editable?this.graphConfig.editable:!0;e={client:1,target:null!=e?e:"blank"};a&&(e.edit=this.graphConfig.edit||"_blank");if(null!=b?b:1)e.close=1;this.layersEnabled&&(e.layers=1);null!=this.graphConfig&&0!=this.graphConfig.nav&&(e.nav=1);null!=this.graphConfig&&null!=this.graphConfig.highlight&&
(e.highlight=this.graphConfig.highlight.substring(1));null!=this.currentPage&&0<this.currentPage&&(e.page=this.currentPage);"undefined"!==typeof window.postMessage&&(null==document.documentMode||10<=document.documentMode)?null==this.lightboxWindow&&mxEvent.addListener(window,"message",mxUtils.bind(this,function(a){"ready"==a.data&&a.source==this.lightboxWindow&&this.lightboxWindow.postMessage(this.xml,"*")})):e.data=encodeURIComponent(this.xml);"1"==urlParams.dev&&(e.dev="1");this.lightboxWindow=
window.open(("1"!=urlParams.dev?EditorUi.lightboxHost:"https://test.draw.io")+"/#P"+encodeURIComponent(JSON.stringify(e)))}else this.lightboxWindow.focus();else this.showLocalLightbox()};
GraphViewer.prototype.showLocalLightbox=function(){var a=mxUtils.getDocumentScrollOrigin(document),b=document.createElement("div");mxClient.IS_QUIRKS?(b.style.position="absolute",b.style.left=a.x+"px",b.style.top=a.y+"px",b.style.width=document.body.offsetWidth+"px",b.style.height=document.body.offsetHeight+"px"):b.style.cssText="position:fixed;top:0;left:0;bottom:0;right:0;";b.style.zIndex=this.lightboxZIndex;b.style.backgroundColor="#000000";mxUtils.setOpacity(b,70);document.body.appendChild(b);
var e=document.createElement("img");e.setAttribute("border","0");e.setAttribute("src",Editor.closeImage);mxClient.IS_QUIRKS?(e.style.position="absolute",e.style.right="32px",e.style.top=a.y+32+"px"):e.style.cssText="position:fixed;top:32px;right:32px;";e.style.cursor="pointer";mxEvent.addListener(e,"click",function(){k.destroy()});urlParams.pages="1";urlParams.page=this.currentPage;urlParams["page-id"]=this.graphConfig.pageId;urlParams["layer-ids"]=null!=this.graphConfig.layerIds&&0<this.graphConfig.layerIds.length?
this.graphConfig.layerIds.join(" "):null;urlParams.nav=0!=this.graphConfig.nav?"1":"0";urlParams.layers=this.layersEnabled?"1":"0";if(null==document.documentMode||10<=document.documentMode)Editor.prototype.editButtonLink=this.graphConfig.edit,Editor.prototype.editButtonFunc=this.graphConfig.editFunc;EditorUi.prototype.updateActionStates=function(){};EditorUi.prototype.addBeforeUnloadListener=function(){};EditorUi.prototype.addChromelessClickHandler=function(){};var d=Graph.prototype.shadowId;Graph.prototype.shadowId=

View file

@ -571,7 +571,7 @@ plantUml=PlantUML
plugins=插件
pluginUrl=插件 URL 地址
pluginWarning=本页面已要求载入以下插件:\n \n {1}\n \n 是否现在载入这些插件?\n \n 备注:确保在完全理解与此相关的安全问题的情况下再允许这些插件运行。\n
plusTooltip=单击进行连接与复制ctrl+单击进行复制shift+单击进行连接)。拖拽进行连接(xtrl+拖拽进行复制)。
plusTooltip=单击进行连接与复制ctrl+单击进行复制shift+单击进行连接)。拖拽进行连接(ctrl+拖拽进行复制)。
portrait=竖向
position=位置
posterPrint=海报样式

View file

@ -6,11 +6,11 @@ if (workbox)
workbox.precaching.precacheAndRoute([
{
"url": "js/app.min.js",
"revision": "a2f43d4f3ac82b3a779766cef0f68598"
"revision": "df97bf6b9782ff1350e7801ca14bf16d"
},
{
"url": "js/extensions.min.js",
"revision": "cdd9b0d0ac21baaeb73cfb502d96bee3"
"revision": "94711a4e146fc217df65537e2b43a914"
},
{
"url": "js/stencils.min.js",
@ -18,7 +18,7 @@ if (workbox)
},
{
"url": "js/shapes.min.js",
"revision": "433c6c9d719496635315c34d5d8ab387"
"revision": "33a522bf405197aa947647cfbac4ae18"
},
{
"url": "js/math-print.js",
@ -270,7 +270,7 @@ if (workbox)
},
{
"url": "resources/dia_zh.txt",
"revision": "32632f015222f50ec3e8e3f5885f1267"
"revision": "890faaaf000fa706b251047917fc64f8"
},
{
"url": "resources/dia_bn.txt",

View file

@ -95,7 +95,6 @@ mxShapeElectricalStraightBus.prototype.paintVertexShape = function(c, x, y, w, h
{
c.translate(x, y);
var size = Math.min(w, h);
var x1 = w * 0.2;
var y1 = 0;
@ -561,6 +560,7 @@ mxShapeElectricalLogicGate.prototype.paintVertexShape = function(c, x, y, w, h)
c.moveTo(w * 0.1, 0);
c.arcTo(w * 0.6, h, 0, 0, 1, w * 0.1, h);
c.stroke();
//no break operation needed, XOR needs to draw an OR shape too
case 'or':
c.begin();
c.moveTo(w * 0.4, 0);
@ -1634,7 +1634,6 @@ mxShapeElectricalMux.prototype.getConstraints = function(style, w, h)
var pinRange = (h - 16) / h;
var selectorPins = parseInt(mxUtils.getValue(this.style, 'selectorPins', '1'));
var operation = mxUtils.getValue(this.style, 'operation', 'mux');
var dir = mxUtils.getValue(this.style, 'direction', 'east');
var numInputs = 1;
var numOutputs = 1;

View file

@ -1,4 +1,29 @@
<templates>
<clibs name="azure">
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/additional_or_support.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/ai_machine_learning.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/apps_and_system_logos.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/azure.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/azure_additional_or_support.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/buildings.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/databases.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/developer.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/devices.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/files.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/generic.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/infrastructure.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/integration.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/integration_patterns.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/iot_devices.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/office365.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/others.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/power_bi.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/powerapps_and_flows.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/sap.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/servers.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/users_and_roles.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/integration/deprecated.xml</add>
</clibs>
<clibs name="fortinet">
<add>Uhttps://jgraph.github.io/drawio-libs/libs/fortinet/Fortinet_Buildings.xml</add>
<add>Uhttps://jgraph.github.io/drawio-libs/libs/fortinet/Fortinet_Cloud.xml</add>
@ -59,6 +84,13 @@
<template url="cloud/aws_3d.xml" libs="general;aws3d"/>
<template url="cloud/azure_1.xml" libs="general;azure;mscae" clibs="azure"/>
<template url="cloud/azure_2.xml" libs="general;azure;mscae" clibs="azure"/>
<template url="cloud/azure_3.xml" libs="general;azure;mscae" clibs="azure"/>
<template url="cloud/azure_4.xml" libs="general;azure;mscae" clibs="azure"/>
<template url="cloud/azure_5.xml" libs="general;azure;mscae" clibs="azure"/>
<template url="cloud/azure_6.xml" libs="general;azure;mscae" clibs="azure"/>
<template url="cloud/azure_7.xml" libs="general;azure;mscae" clibs="azure"/>
<template url="cloud/azure_8.xml" libs="general;azure;mscae" clibs="azure"/>
<template url="cloud/azure_9.xml" libs="general;azure;mscae" clibs="azure"/>
<template url="cloud/gcp_backup_and_archive_api_hosting.xml" libs="gcp2"/>
<template url="cloud/gcp_big_data_complex_event_processing.xml" libs="gcp2"/>
<template url="cloud/gcp_dev_test_continuous_delivery_with_spinnaker.xml" libs="gcp2"/>