Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/jgraph/drawio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/webapp/js/viewer-static.min.js')
-rw-r--r--src/main/webapp/js/viewer-static.min.js2969
1 files changed, 1491 insertions, 1478 deletions
diff --git a/src/main/webapp/js/viewer-static.min.js b/src/main/webapp/js/viewer-static.min.js
index b5d296d1..5b2aa2cc 100644
--- a/src/main/webapp/js/viewer-static.min.js
+++ b/src/main/webapp/js/viewer-static.min.js
@@ -110,7 +110,7 @@ if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==url
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.0.4",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"20.1.1",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2<navigator.maxTouchPoints,IS_WEBVIEW:/((iPhone|iPod|iPad).*AppleWebKit(?!.*Version)|; wv)/i.test(navigator.userAgent),IS_GC:/Google Inc/.test(navigator.vendor),IS_CHROMEAPP:null!=window.chrome&&null!=chrome.app&&null!=chrome.app.runtime,IS_FF:"undefined"!==typeof InstallTrigger,IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&
0>navigator.userAgent.indexOf("Firefox/2.")||0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:"MICROSOFT INTERNET EXPLORER"!=navigator.appName.toUpperCase(),NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!==
@@ -209,12 +209,12 @@ NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:
CURSOR_LABEL_HANDLE:"default",CURSOR_TERMINAL_HANDLE:"pointer",CURSOR_BEND_HANDLE:"crosshair",CURSOR_VIRTUAL_BEND_HANDLE:"crosshair",CURSOR_CONNECT:"pointer",HIGHLIGHT_COLOR:"#00FF00",CONNECT_TARGET_COLOR:"#0000FF",INVALID_CONNECT_TARGET_COLOR:"#FF0000",DROP_TARGET_COLOR:"#0000FF",VALID_COLOR:"#00FF00",INVALID_COLOR:"#FF0000",EDGE_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,
GUIDE_COLOR:"#FF0000",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:"#0099FF",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:6,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:"#00FF00",HANDLE_STROKECOLOR:"black",LABEL_HANDLE_FILLCOLOR:"yellow",CONNECT_HANDLE_FILLCOLOR:"#0000FF",LOCKED_HANDLE_FILLCOLOR:"#FF0000",OUTLINE_HANDLE_FILLCOLOR:"#00FFFF",OUTLINE_HANDLE_STROKECOLOR:"#0033FF",DEFAULT_FONTFAMILY:"Arial,Helvetica",DEFAULT_FONTSIZE:11,DEFAULT_TEXT_DIRECTION:"",LINE_HEIGHT:1.2,WORD_WRAP:"normal",ABSOLUTE_LINE_HEIGHT:!1,
DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:.15,LINE_ARCSIZE:20,ARROW_SPACING:0,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,827,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,0,1169,827),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:"none",STYLE_PERIMETER:"perimeter",STYLE_SOURCE_PORT:"sourcePort",STYLE_TARGET_PORT:"targetPort",
-STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_PORT_CONSTRAINT_ROTATION:"portConstraintRotation",STYLE_SOURCE_PORT_CONSTRAINT:"sourcePortConstraint",STYLE_TARGET_PORT_CONSTRAINT:"targetPortConstraint",STYLE_OPACITY:"opacity",STYLE_FILL_OPACITY:"fillOpacity",STYLE_STROKE_OPACITY:"strokeOpacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_TEXT_DIRECTION:"textDirection",STYLE_OVERFLOW:"overflow",STYLE_BLOCK_SPACING:"blockSpacing",STYLE_ORTHOGONAL:"orthogonal",STYLE_EXIT_X:"exitX",STYLE_EXIT_Y:"exitY",STYLE_EXIT_DX:"exitDx",
-STYLE_EXIT_DY:"exitDy",STYLE_EXIT_PERIMETER:"exitPerimeter",STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_DX:"entryDx",STYLE_ENTRY_DY:"entryDy",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_POINTER_EVENTS:"pointerEvents",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_MARGIN:"margin",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",
-STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_WIDTH:"labelWidth",STYLE_LABEL_POSITION:"labelPosition",STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",STYLE_IMAGE_BORDER:"imageBorder",
-STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",STYLE_INDICATOR_WIDTH:"indicatorWidth",
-STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",STYLE_SWIMLANE_HEAD:"swimlaneHead",STYLE_SWIMLANE_BODY:"swimlaneBody",STYLE_ENDFILL:"endFill",STYLE_STARTFILL:"startFill",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_FIX_DASH:"fixDash",STYLE_ROUNDED:"rounded",
-STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_ABSOLUTE_ARCSIZE:"absoluteArcSize",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ANCHOR_POINT_DIRECTION:"anchorPointDirection",
+STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_PORT_CONSTRAINT_ROTATION:"portConstraintRotation",STYLE_SOURCE_PORT_CONSTRAINT:"sourcePortConstraint",STYLE_TARGET_PORT_CONSTRAINT:"targetPortConstraint",STYLE_OPACITY:"opacity",STYLE_FILL_OPACITY:"fillOpacity",STYLE_FILL_STYLE:"fillStyle",STYLE_STROKE_OPACITY:"strokeOpacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_TEXT_DIRECTION:"textDirection",STYLE_OVERFLOW:"overflow",STYLE_BLOCK_SPACING:"blockSpacing",STYLE_ORTHOGONAL:"orthogonal",STYLE_EXIT_X:"exitX",
+STYLE_EXIT_Y:"exitY",STYLE_EXIT_DX:"exitDx",STYLE_EXIT_DY:"exitDy",STYLE_EXIT_PERIMETER:"exitPerimeter",STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_DX:"entryDx",STYLE_ENTRY_DY:"entryDy",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_POINTER_EVENTS:"pointerEvents",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_MARGIN:"margin",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",
+STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_WIDTH:"labelWidth",STYLE_LABEL_POSITION:"labelPosition",STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",
+STYLE_IMAGE_BORDER:"imageBorder",STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",
+STYLE_INDICATOR_WIDTH:"indicatorWidth",STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",STYLE_SWIMLANE_HEAD:"swimlaneHead",STYLE_SWIMLANE_BODY:"swimlaneBody",STYLE_ENDFILL:"endFill",STYLE_STARTFILL:"startFill",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_FIX_DASH:"fixDash",
+STYLE_ROUNDED:"rounded",STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_ABSOLUTE_ARCSIZE:"absoluteArcSize",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ANCHOR_POINT_DIRECTION:"anchorPointDirection",
STYLE_ELBOW:"elbow",STYLE_FONTCOLOR:"fontColor",STYLE_FONTFAMILY:"fontFamily",STYLE_FONTSIZE:"fontSize",STYLE_FONTSTYLE:"fontStyle",STYLE_ASPECT:"aspect",STYLE_AUTOSIZE:"autosize",STYLE_FIXED_WIDTH:"fixedWidth",STYLE_FOLDABLE:"foldable",STYLE_EDITABLE:"editable",STYLE_BACKGROUND_OUTLINE:"backgroundOutline",STYLE_BENDABLE:"bendable",STYLE_MOVABLE:"movable",STYLE_RESIZABLE:"resizable",STYLE_RESIZE_WIDTH:"resizeWidth",STYLE_RESIZE_HEIGHT:"resizeHeight",STYLE_ROTATABLE:"rotatable",STYLE_CLONEABLE:"cloneable",
STYLE_DELETABLE:"deletable",STYLE_SHAPE:"shape",STYLE_EDGE:"edgeStyle",STYLE_JETTY_SIZE:"jettySize",STYLE_SOURCE_JETTY_SIZE:"sourceJettySize",STYLE_TARGET_JETTY_SIZE:"targetJettySize",STYLE_LOOP:"loopStyle",STYLE_ORTHOGONAL_LOOP:"orthogonalLoop",STYLE_ROUTING_CENTER_X:"routingCenterX",STYLE_ROUTING_CENTER_Y:"routingCenterY",STYLE_CLIP_PATH:"clipPath",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_STRIKETHROUGH:8,SHAPE_RECTANGLE:"rectangle",SHAPE_ELLIPSE:"ellipse",SHAPE_DOUBLE_ELLIPSE:"doubleEllipse",
SHAPE_RHOMBUS:"rhombus",SHAPE_LINE:"line",SHAPE_IMAGE:"image",SHAPE_ARROW:"arrow",SHAPE_ARROW_CONNECTOR:"arrowConnector",SHAPE_LABEL:"label",SHAPE_CYLINDER:"cylinder",SHAPE_SWIMLANE:"swimlane",SHAPE_CONNECTOR:"connector",SHAPE_ACTOR:"actor",SHAPE_CLOUD:"cloud",SHAPE_TRIANGLE:"triangle",SHAPE_HEXAGON:"hexagon",ARROW_CLASSIC:"classic",ARROW_CLASSIC_THIN:"classicThin",ARROW_BLOCK:"block",ARROW_BLOCK_THIN:"blockThin",ARROW_OPEN:"open",ARROW_OPEN_THIN:"openThin",ARROW_OVAL:"oval",ARROW_DIAMOND:"diamond",
@@ -372,13 +372,13 @@ shadowAlpha:mxConstants.SHADOW_OPACITY,shadowDx:mxConstants.SHADOW_OFFSET_X,shad
mxAbstractCanvas2D.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=this.state,b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.format((this.lastX+a.dx)*a.scale)),this.path.push(this.format((this.lastY+a.dy)*a.scale))};mxAbstractCanvas2D.prototype.rotatePoint=function(a,b,c,d,e){c*=Math.PI/180;return mxUtils.getRotatedPoint(new mxPoint(a,b),Math.cos(c),Math.sin(c),new mxPoint(d,e))};
mxAbstractCanvas2D.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state)};mxAbstractCanvas2D.prototype.restore=function(){0<this.states.length&&(this.state=this.states.pop())};mxAbstractCanvas2D.prototype.setLink=function(a,b){};mxAbstractCanvas2D.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a};mxAbstractCanvas2D.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b};
mxAbstractCanvas2D.prototype.rotate=function(a,b,c,d,e){};mxAbstractCanvas2D.prototype.setAlpha=function(a){this.state.alpha=a};mxAbstractCanvas2D.prototype.setFillAlpha=function(a){this.state.fillAlpha=a};mxAbstractCanvas2D.prototype.setStrokeAlpha=function(a){this.state.strokeAlpha=a};mxAbstractCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null};
-mxAbstractCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,k,l){c=this.state;c.fillColor=a;c.gradientFillAlpha=null!=k?k:1;c.gradientColor=b;c.gradientAlpha=null!=l?l:1;c.gradientDirection=g};mxAbstractCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);this.state.strokeColor=a};mxAbstractCanvas2D.prototype.setStrokeWidth=function(a){this.state.strokeWidth=a};mxAbstractCanvas2D.prototype.setDashed=function(a,b){this.state.dashed=a;this.state.fixDash=b};
-mxAbstractCanvas2D.prototype.setDashPattern=function(a){this.state.dashPattern=a};mxAbstractCanvas2D.prototype.setLineCap=function(a){this.state.lineCap=a};mxAbstractCanvas2D.prototype.setLineJoin=function(a){this.state.lineJoin=a};mxAbstractCanvas2D.prototype.setMiterLimit=function(a){this.state.miterLimit=a};mxAbstractCanvas2D.prototype.setFontColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontColor=a};
-mxAbstractCanvas2D.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAbstractCanvas2D.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAbstractCanvas2D.prototype.setFontSize=function(a){this.state.fontSize=parseFloat(a)};mxAbstractCanvas2D.prototype.setFontFamily=function(a){this.state.fontFamily=a};
-mxAbstractCanvas2D.prototype.setFontStyle=function(a){null==a&&(a=0);this.state.fontStyle=a};mxAbstractCanvas2D.prototype.setShadow=function(a){this.state.shadow=a};mxAbstractCanvas2D.prototype.setShadowColor=function(a){a==mxConstants.NONE&&(a=null);this.state.shadowColor=a};mxAbstractCanvas2D.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a};mxAbstractCanvas2D.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b};
-mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0;this.path=[]};mxAbstractCanvas2D.prototype.moveTo=function(a,b){this.addOp(this.moveOp,a,b)};mxAbstractCanvas2D.prototype.lineTo=function(a,b){this.addOp(this.lineOp,a,b)};mxAbstractCanvas2D.prototype.quadTo=function(a,b,c,d){this.addOp(this.quadOp,a,b,c,d)};mxAbstractCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){this.addOp(this.curveOp,a,b,c,d,e,f)};
-mxAbstractCanvas2D.prototype.arcTo=function(a,b,c,d,e,f,g){a=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,c,d,e,f,g);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxAbstractCanvas2D.prototype.close=function(a,b,c,d,e,f){this.addOp(this.closeOp)};mxAbstractCanvas2D.prototype.end=function(){};function mxXmlCanvas2D(a){mxAbstractCanvas2D.call(this);this.root=a;this.writeDefaults()}mxUtils.extend(mxXmlCanvas2D,mxAbstractCanvas2D);
-mxXmlCanvas2D.prototype.textEnabled=!0;mxXmlCanvas2D.prototype.compressed=!0;
+mxAbstractCanvas2D.prototype.setFillStyle=function(a){a==mxConstants.NONE&&(a=null);this.state.fillStyle=a};mxAbstractCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,k,l){c=this.state;c.fillColor=a;c.gradientFillAlpha=null!=k?k:1;c.gradientColor=b;c.gradientAlpha=null!=l?l:1;c.gradientDirection=g};mxAbstractCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);this.state.strokeColor=a};mxAbstractCanvas2D.prototype.setStrokeWidth=function(a){this.state.strokeWidth=a};
+mxAbstractCanvas2D.prototype.setDashed=function(a,b){this.state.dashed=a;this.state.fixDash=b};mxAbstractCanvas2D.prototype.setDashPattern=function(a){this.state.dashPattern=a};mxAbstractCanvas2D.prototype.setLineCap=function(a){this.state.lineCap=a};mxAbstractCanvas2D.prototype.setLineJoin=function(a){this.state.lineJoin=a};mxAbstractCanvas2D.prototype.setMiterLimit=function(a){this.state.miterLimit=a};
+mxAbstractCanvas2D.prototype.setFontColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontColor=a};mxAbstractCanvas2D.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAbstractCanvas2D.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAbstractCanvas2D.prototype.setFontSize=function(a){this.state.fontSize=parseFloat(a)};
+mxAbstractCanvas2D.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAbstractCanvas2D.prototype.setFontStyle=function(a){null==a&&(a=0);this.state.fontStyle=a};mxAbstractCanvas2D.prototype.setShadow=function(a){this.state.shadow=a};mxAbstractCanvas2D.prototype.setShadowColor=function(a){a==mxConstants.NONE&&(a=null);this.state.shadowColor=a};mxAbstractCanvas2D.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a};
+mxAbstractCanvas2D.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b};mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0;this.path=[]};mxAbstractCanvas2D.prototype.moveTo=function(a,b){this.addOp(this.moveOp,a,b)};mxAbstractCanvas2D.prototype.lineTo=function(a,b){this.addOp(this.lineOp,a,b)};mxAbstractCanvas2D.prototype.quadTo=function(a,b,c,d){this.addOp(this.quadOp,a,b,c,d)};
+mxAbstractCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){this.addOp(this.curveOp,a,b,c,d,e,f)};mxAbstractCanvas2D.prototype.arcTo=function(a,b,c,d,e,f,g){a=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,c,d,e,f,g);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxAbstractCanvas2D.prototype.close=function(a,b,c,d,e,f){this.addOp(this.closeOp)};mxAbstractCanvas2D.prototype.end=function(){};
+function mxXmlCanvas2D(a){mxAbstractCanvas2D.call(this);this.root=a;this.writeDefaults()}mxUtils.extend(mxXmlCanvas2D,mxAbstractCanvas2D);mxXmlCanvas2D.prototype.textEnabled=!0;mxXmlCanvas2D.prototype.compressed=!0;
mxXmlCanvas2D.prototype.writeDefaults=function(){var a=this.createElement("fontfamily");a.setAttribute("family",mxConstants.DEFAULT_FONTFAMILY);this.root.appendChild(a);a=this.createElement("fontsize");a.setAttribute("size",mxConstants.DEFAULT_FONTSIZE);this.root.appendChild(a);a=this.createElement("shadowcolor");a.setAttribute("color",mxConstants.SHADOWCOLOR);this.root.appendChild(a);a=this.createElement("shadowalpha");a.setAttribute("alpha",mxConstants.SHADOW_OPACITY);this.root.appendChild(a);a=
this.createElement("shadowoffset");a.setAttribute("dx",mxConstants.SHADOW_OFFSET_X);a.setAttribute("dy",mxConstants.SHADOW_OFFSET_Y);this.root.appendChild(a)};mxXmlCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxXmlCanvas2D.prototype.createElement=function(a){return this.root.ownerDocument.createElement(a)};mxXmlCanvas2D.prototype.save=function(){this.compressed&&mxAbstractCanvas2D.prototype.save.apply(this,arguments);this.root.appendChild(this.createElement("save"))};
mxXmlCanvas2D.prototype.restore=function(){this.compressed&&mxAbstractCanvas2D.prototype.restore.apply(this,arguments);this.root.appendChild(this.createElement("restore"))};mxXmlCanvas2D.prototype.scale=function(a){var b=this.createElement("scale");b.setAttribute("scale",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.translate=function(a,b){var c=this.createElement("translate");c.setAttribute("dx",this.format(a));c.setAttribute("dy",this.format(b));this.root.appendChild(c)};
@@ -411,12 +411,12 @@ mxXmlCanvas2D.prototype.lineTo=function(a,b){var c=this.createElement("line");c.
mxXmlCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){var g=this.createElement("curve");g.setAttribute("x1",this.format(a));g.setAttribute("y1",this.format(b));g.setAttribute("x2",this.format(c));g.setAttribute("y2",this.format(d));g.setAttribute("x3",this.format(e));g.setAttribute("y3",this.format(f));this.root.appendChild(g);this.lastX=e;this.lastY=f};mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))};
mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,k,l,m,n,p,r){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var q=this.createElement("text");q.setAttribute("x",this.format(a));q.setAttribute("y",this.format(b));q.setAttribute("w",this.format(c));q.setAttribute("h",this.format(d));q.setAttribute("str",e);null!=f&&q.setAttribute("align",f);null!=g&&q.setAttribute("valign",g);q.setAttribute("wrap",k?"1":"0");null==l&&(l="");q.setAttribute("format",l);null!=m&&q.setAttribute("overflow",
m);null!=n&&q.setAttribute("clip",n?"1":"0");null!=p&&q.setAttribute("rotation",p);null!=r&&q.setAttribute("dir",r);this.root.appendChild(q)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
-function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=b?b:!1;b=null;if(a.ownerDocument!=document){for(;null!=a&&"svg"!=a.nodeName;)a=a.parentNode;b=a}null!=b&&(0<b.getElementsByTagName("defs").length&&(this.defs=b.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=b.firstChild?b.insertBefore(this.defs,b.firstChild):b.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
+function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.fillPatterns=[];this.defs=null;this.styleEnabled=null!=b?b:!1;b=null;if(a.ownerDocument!=document){for(;null!=a&&"svg"!=a.nodeName;)a=a.parentNode;b=a}null!=b&&(0<b.getElementsByTagName("defs").length&&(this.defs=b.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=b.firstChild?b.insertBefore(this.defs,b.firstChild):b.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);
(function(){mxSvgCanvas2D.prototype.useDomParser=!mxClient.IS_IE&&"function"===typeof DOMParser&&"function"===typeof XMLSerializer;if(mxSvgCanvas2D.prototype.useDomParser)try{var a=(new DOMParser).parseFromString("test text","text/html");mxSvgCanvas2D.prototype.useDomParser=null!=a}catch(b){mxSvgCanvas2D.prototype.useDomParser=!1}mxSvgCanvas2D.prototype.useAbsoluteIds=!mxClient.IS_CHROMEAPP&&!mxClient.IS_IE&&!mxClient.IS_IE11&&!mxClient.IS_EDGE&&0<document.getElementsByTagName("base").length})();
mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.foOffset=0;mxSvgCanvas2D.prototype.textOffset=0;mxSvgCanvas2D.prototype.imageOffset=0;mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.minStrokeWidth=1;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.lineHeightCorrection=1;
mxSvgCanvas2D.prototype.pointerEventsValue="all";mxSvgCanvas2D.prototype.fontMetricsPadding=10;mxSvgCanvas2D.prototype.foreignObjectPadding=2;mxSvgCanvas2D.prototype.cacheOffsetSize=!0;mxSvgCanvas2D.prototype.setCssText=function(a,b){mxClient.IS_IE||mxClient.IS_IE11?a.setAttribute("style",b):mxUtils.setCssText(a.style,b)};mxSvgCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};
-mxSvgCanvas2D.prototype.getBaseUrl=function(){var a=window.location.href,b=a.lastIndexOf("#");0<b&&(a=a.substring(0,b));return a};mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[]};
+mxSvgCanvas2D.prototype.getBaseUrl=function(){var a=window.location.href,b=a.lastIndexOf("#");0<b&&(a=a.substring(0,b));return a};mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[];this.fillPatterns=[]};
mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
mxSvgCanvas2D.prototype.createElement=function(a,b){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(b||mxConstants.NS_SVG,a);a=this.root.ownerDocument.createElement(a);null!=b&&a.setAttribute("xmlns",b);return a};mxSvgCanvas2D.prototype.getAlternateText=function(a,b,c,d,e,f,g,k,l,m,n,p,r){return null!=f?this.foAltText:null};
mxSvgCanvas2D.prototype.createAlternateContent=function(a,b,c,d,e,f,g,k,l,m,n,p,r){a=this.getAlternateText(a,b,c,d,e,f,g,k,l,m,n,p,r);d=this.state;return null!=a&&0<d.fontSize?(k=k==mxConstants.ALIGN_TOP?1:k==mxConstants.ALIGN_BOTTOM?0:.3,e=g==mxConstants.ALIGN_RIGHT?"end":g==mxConstants.ALIGN_LEFT?"start":"middle",g=this.createElement("text"),g.setAttribute("x",Math.round(b+d.dx)),g.setAttribute("y",Math.round(c+d.dy+k*d.fontSize)),g.setAttribute("fill",d.fontColor||"black"),g.setAttribute("font-family",
@@ -425,12 +425,24 @@ d.fontFamily),g.setAttribute("font-size",Math.round(d.fontSize)+"px"),"start"!=e
mxSvgCanvas2D.prototype.createGradientId=function(a,b,c,d,e){a=mxUtils.rgba2hex(a);"#"==a.charAt(0)&&(a=a.substring(1));b=mxUtils.rgba2hex(b);"#"==b.charAt(0)&&(b=b.substring(1));a=a.toLowerCase()+"-"+c;b=b.toLowerCase()+"-"+d;c=null;null==e||e==mxConstants.DIRECTION_SOUTH?c="s":e==mxConstants.DIRECTION_EAST?c="e":e==mxConstants.DIRECTION_RADIAL?c="r":(d=a,a=b,b=d,e==mxConstants.DIRECTION_NORTH?c="s":e==mxConstants.DIRECTION_WEST&&(c="e"));return"mx-gradient-"+a+"-"+b+"-"+c};
mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGradientId(a,b,c,d,e),g=this.gradients[f];if(null==g){var k=this.root.ownerSVGElement,l=0,m=f+"-"+l;if(null!=k)for(g=k.ownerDocument.getElementById(m);null!=g&&g.ownerSVGElement!=k;)m=f+"-"+l++,g=k.ownerDocument.getElementById(m);else m="id"+ ++this.refCount;null==g&&(g=this.createSvgGradient(a,b,c,d,e),g.setAttribute("id",m),null!=this.defs?this.defs.appendChild(g):k.appendChild(g));this.gradients[f]=g}return g.getAttribute("id")};
mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement(e==mxConstants.DIRECTION_RADIAL?"radialGradient":"linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");
-e=this.createElement("stop");e.setAttribute("offset","0%");e.style.stopColor=a;e.style.stopOpacity=c;f.appendChild(e);e=this.createElement("stop");e.setAttribute("offset","100%");e.style.stopColor=b;e.style.stopOpacity=d;f.appendChild(e);return f};
+e=this.createElement("stop");e.setAttribute("offset","0%");e.style.stopColor=a;e.style.stopOpacity=c;f.appendChild(e);e=this.createElement("stop");e.setAttribute("offset","100%");e.style.stopColor=b;e.style.stopOpacity=d;f.appendChild(e);return f};mxSvgCanvas2D.prototype.createFillPatternId=function(a,b,c){c=mxUtils.rgba2hex(c);"#"==c.charAt(0)&&(c=c.substring(1));return("mx-pattern-"+a+"-"+b+"-"+c).toLowerCase()};
+mxSvgCanvas2D.prototype.getFillPattern=function(a,b,c,d){var e=this.createFillPatternId(a,b,c),f=this.fillPatterns[e];if(null==f){var g=this.root.ownerSVGElement,k=0,l=e+"-"+k;if(null!=g)for(f=g.ownerDocument.getElementById(l);null!=f&&f.ownerSVGElement!=g;)l=e+"-"+k++,f=g.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;if(null==f){switch(a){case "hatch":f=this.createHatchPattern(b,c,d);break;case "dots":f=this.createDotsPattern(b,c,d);break;case "cross-hatch":f=this.createCrossHatchPattern(b,
+c,d);break;case "dashed":f=this.createDashedPattern(b,c,d);break;case "zigzag":case "zigzag-line":f=this.createZigZagLinePattern(b,c,d);break;default:return"ERROR"}f.setAttribute("id",l);null!=this.defs?this.defs.appendChild(f):g.appendChild(f)}this.fillPatterns[e]=f}return f.getAttribute("id")};
+mxSvgCanvas2D.prototype.createHatchPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1","0");e.setAttribute("x2","0");e.setAttribute("y2",c);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
+a);d.appendChild(e);return d};
+mxSvgCanvas2D.prototype.createDashedPattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("line");e.setAttribute("x1","0");e.setAttribute("y1",c/4);e.setAttribute("x2","0");e.setAttribute("y2",3*c/4);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
+a);d.appendChild(e);return d};
+mxSvgCanvas2D.prototype.createZigZagLinePattern=function(a,b,c){a=1.5*a*c;c=this.format((10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("path"),f=c/4,g=3*c/4;e.setAttribute("d","M "+f+" 0 L "+g+" 0 L "+f+" "+c+" L "+g+" "+c);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
+a);e.setAttribute("fill","none");d.appendChild(e);return d};
+mxSvgCanvas2D.prototype.createCrossHatchPattern=function(a,b,c){a=.5*a*c;c=this.format(1.5*(10+a)*c);var d=this.createElement("pattern");d.setAttribute("patternUnits","userSpaceOnUse");d.setAttribute("width",c);d.setAttribute("height",c);d.setAttribute("x","0");d.setAttribute("y","0");d.setAttribute("patternTransform","rotate(45)");var e=this.createElement("rect");e.setAttribute("x",0);e.setAttribute("y",0);e.setAttribute("width",c);e.setAttribute("height",c);e.setAttribute("stroke",b);e.setAttribute("stroke-width",
+a);e.setAttribute("fill","none");d.appendChild(e);return d};
+mxSvgCanvas2D.prototype.createDotsPattern=function(a,b,c){a=this.format((10+a)*c);c=this.createElement("pattern");c.setAttribute("patternUnits","userSpaceOnUse");c.setAttribute("width",a);c.setAttribute("height",a);c.setAttribute("x","0");c.setAttribute("y","0");var d=this.createElement("circle");d.setAttribute("cx",a/2);d.setAttribute("cy",a/2);d.setAttribute("r",a/4);d.setAttribute("stroke","none");d.setAttribute("fill",b);c.appendChild(d);return c};
mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("path"==c.nodeName)if(null!=this.path&&0<this.path.length)c.setAttribute("d",this.path.join(" "));else return;a&&null!=d.fillColor?this.updateFill():this.styleEnabled||("ellipse"==c.nodeName&&mxClient.IS_FF?c.setAttribute("fill","transparent"):c.setAttribute("fill","none"),a=!1);b&&null!=d.strokeColor?this.updateStroke():this.styleEnabled||c.setAttribute("stroke","none");null!=d.transform&&0<d.transform.length&&
c.setAttribute("transform",d.transform);this.pointerEvents?c.setAttribute("pointer-events",this.pointerEventsValue):this.pointerEvents||null!=this.originalRoot||c.setAttribute("pointer-events","none");d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&(!a||null==d.fillColor)&&this.addTolerance(c);("rect"!=c.nodeName&&"path"!=c.nodeName&&"ellipse"!=c.nodeName||"none"!=c.getAttribute("fill")&&"transparent"!=c.getAttribute("fill")||"none"!=c.getAttribute("stroke")||"none"!=
c.getAttribute("pointer-events"))&&this.root.appendChild(c);this.node=null}};mxSvgCanvas2D.prototype.addTolerance=function(a){this.root.appendChild(this.createTolerance(a))};
-mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);if(null!=a.fillColor)if(null!=a.gradientColor&&a.gradientColor!=mxConstants.NONE)if(a=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection),this.root.ownerDocument==document&&this.useAbsoluteIds){var b=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");this.node.setAttribute("fill","url("+
-b+"#"+a+")")}else this.node.setAttribute("fill","url(#"+a+")");else this.node.setAttribute("fill",String(a.fillColor).toLowerCase())};mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};
+mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;(1>a.alpha||1>a.fillAlpha)&&this.node.setAttribute("fill-opacity",a.alpha*a.fillAlpha);var b=!1;if(null!=a.fillColor)if(null!=a.gradientColor&&a.gradientColor!=mxConstants.NONE){b=!0;var c=this.getSvgGradient(String(a.fillColor),String(a.gradientColor),a.gradientFillAlpha,a.gradientAlpha,a.gradientDirection);if(this.root.ownerDocument==document&&this.useAbsoluteIds){var d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1");d="url("+d+"#"+c+
+")"}else d="url(#"+c+")"}else d=String(a.fillColor).toLowerCase();b||null==a.fillStyle||"auto"==a.fillStyle||"solid"==a.fillStyle?this.node.setAttribute("fill",d):(a=this.getFillPattern(a.fillStyle,this.getCurrentStrokeWidth(),d,a.scale),this.root.ownerDocument==document&&this.useAbsoluteIds?(d=this.getBaseUrl().replace(/([\(\)])/g,"\\$1"),this.node.setAttribute("fill","url("+d+"#"+a+")")):this.node.setAttribute("fill","url(#"+a+")"))};
+mxSvgCanvas2D.prototype.getCurrentStrokeWidth=function(){return Math.max(this.minStrokeWidth,Math.max(.01,this.format(this.state.strokeWidth*this.state.scale)))};
mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",String(a.strokeColor).toLowerCase());(1>a.alpha||1>a.strokeAlpha)&&this.node.setAttribute("stroke-opacity",a.alpha*a.strokeAlpha);var b=this.getCurrentStrokeWidth();1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern((a.fixDash?1:a.strokeWidth)*a.scale))};
mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null==a.miterLimit||this.styleEnabled&&10==a.miterLimit||this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
mxSvgCanvas2D.prototype.createDashPattern=function(a){var b=[];if("string"===typeof this.state.dashPattern){var c=this.state.dashPattern.split(" ");if(0<c.length)for(var d=0;d<c.length;d++)b[d]=Number(c[d])*a}return b.join(" ")};
@@ -507,12 +519,12 @@ west:2,north:3},g=null!=this.direction?f[this.direction]:0;null!=this.gradientDi
mxShape.prototype.updateHtmlColors=function(a){var b=this.stroke;null!=b&&b!=mxConstants.NONE?(a.style.borderColor=b,this.isDashed?a.style.borderStyle="dashed":0<this.strokewidth&&(a.style.borderStyle="solid"),a.style.borderWidth=Math.max(1,Math.ceil(this.strokewidth*this.scale))+"px"):a.style.borderWidth="0px";b=this.outline?null:this.fill;null!=b&&b!=mxConstants.NONE?(a.style.backgroundColor=b,a.style.backgroundImage="none"):this.pointerEvents?a.style.backgroundColor="transparent":8==document.documentMode?
mxUtils.addTransparentBackgroundFilter(a):this.setTransparentBackgroundImage(a)};
mxShape.prototype.updateHtmlBounds=function(a){var b=9<=document.documentMode?0:Math.ceil(this.strokewidth*this.scale);a.style.borderWidth=Math.max(1,b)+"px";a.style.overflow="hidden";a.style.left=Math.round(this.bounds.x-b/2)+"px";a.style.top=Math.round(this.bounds.y-b/2)+"px";"CSS1Compat"==document.compatMode&&(b=-b);a.style.width=Math.round(Math.max(0,this.bounds.width+b))+"px";a.style.height=Math.round(Math.max(0,this.bounds.height+b))+"px"};
-mxShape.prototype.destroyCanvas=function(a){if(a instanceof mxSvgCanvas2D){for(var b in a.gradients){var c=a.gradients[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)+1)}this.releaseSvgGradients(this.oldGradients);this.oldGradients=a.gradients}};mxShape.prototype.beforePaint=function(a){};mxShape.prototype.afterPaint=function(a){};
+mxShape.prototype.destroyCanvas=function(a){if(a instanceof mxSvgCanvas2D){for(var b in a.gradients){var c=a.gradients[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)+1)}for(b in a.fillPatterns)c=a.fillPatterns[b],null!=c&&(c.mxRefCount=(c.mxRefCount||0)+1);this.releaseSvgGradients(this.oldGradients);this.releaseSvgFillPatterns(this.oldFillPatterns);this.oldGradients=a.gradients;this.oldFillPatterns=a.fillPatterns}};mxShape.prototype.beforePaint=function(a){};mxShape.prototype.afterPaint=function(a){};
mxShape.prototype.paint=function(a){var b=!1;if(null!=a&&this.outline){var c=a.stroke;a.stroke=function(){b=!0;c.apply(this,arguments)};var d=a.fillAndStroke;a.fillAndStroke=function(){b=!0;d.apply(this,arguments)}}var e=this.scale,f=this.bounds.x/e,g=this.bounds.y/e,k=this.bounds.width/e,l=this.bounds.height/e;if(this.isPaintBoundsInverted()){var m=(k-l)/2;f+=m;g-=m;m=k;k=l;l=m}this.updateTransform(a,f,g,k,l);this.configureCanvas(a,f,g,k,l);m=null;if(null==this.stencil&&null==this.points&&this.shapePointerEvents||
null!=this.stencil&&this.stencilPointerEvents){var n=this.createBoundingBox();this.dialect==mxConstants.DIALECT_SVG?(m=this.createTransparentSvgRectangle(n.x,n.y,n.width,n.height),this.node.appendChild(m)):(e=a.createRect("rect",n.x/e,n.y/e,n.width/e,n.height/e),e.appendChild(a.createTransparentFill()),e.stroked="false",a.root.appendChild(e))}null!=this.stencil?this.stencil.drawShape(a,this,f,g,k,l):(a.setStrokeWidth(this.strokewidth),e=this.getWaypoints(),null!=e?1<e.length&&this.paintEdgeShape(a,
e):this.paintVertexShape(a,f,g,k,l));null!=m&&null!=a.state&&null!=a.state.transform&&m.setAttribute("transform",a.state.transform);null!=a&&this.outline&&!b&&(a.rect(f,g,k,l),a.stroke())};mxShape.prototype.getWaypoints=function(){var a=this.points,b=null;if(null!=a&&(b=[],0<a.length)){var c=this.scale,d=Math.max(c,1),e=a[0];b.push(new mxPoint(e.x/c,e.y/c));for(var f=1;f<a.length;f++){var g=a[f];(Math.abs(e.x-g.x)>=d||Math.abs(e.y-g.y)>=d)&&b.push(new mxPoint(g.x/c,g.y/c));e=g}}return b};
mxShape.prototype.configureCanvas=function(a,b,c,d,e){var f=null;null!=this.style&&(f=this.style.dashPattern);a.setAlpha(this.opacity/100);a.setFillAlpha(this.fillOpacity/100);a.setStrokeAlpha(this.strokeOpacity/100);null!=this.isShadow&&a.setShadow(this.isShadow);null!=this.isDashed&&a.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);null!=f&&a.setDashPattern(f);null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?
-(b=this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b.x,b.y,b.width,b.height,this.gradientDirection)):a.setFillColor(this.fill);a.setStrokeColor(this.stroke);this.configurePointerEvents(a)};mxShape.prototype.configurePointerEvents=function(a){null==this.style||null!=this.fill&&this.fill!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(a.pointerEvents=!1)};
+(b=this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b.x,b.y,b.width,b.height,this.gradientDirection)):(a.setFillColor(this.fill),a.setFillStyle(this.fillStyle));a.setStrokeColor(this.stroke);this.configurePointerEvents(a)};mxShape.prototype.configurePointerEvents=function(a){null==this.style||null!=this.fill&&this.fill!=mxConstants.NONE&&0!=this.opacity&&0!=this.fillOpacity||"0"!=mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||(a.pointerEvents=!1)};
mxShape.prototype.getGradientBounds=function(a,b,c,d,e){return new mxRectangle(b,c,d,e)};mxShape.prototype.updateTransform=function(a,b,c,d,e){a.scale(this.scale);a.rotate(this.getShapeRotation(),this.flipH,this.flipV,b+d/2,c+e/2)};mxShape.prototype.paintVertexShape=function(a,b,c,d,e){this.paintBackground(a,b,c,d,e);this.outline&&null!=this.style&&0!=mxUtils.getValue(this.style,mxConstants.STYLE_BACKGROUND_OUTLINE,0)||(a.setShadow(!1),this.paintForeground(a,b,c,d,e))};
mxShape.prototype.paintBackground=function(a,b,c,d,e){};mxShape.prototype.paintForeground=function(a,b,c,d,e){};mxShape.prototype.paintEdgeShape=function(a,b){};
mxShape.prototype.getArcSize=function(a,b){if("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0))a=Math.min(a/2,Math.min(b/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2));else{var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;a=Math.min(a*c,b*c)}return a};
@@ -521,18 +533,20 @@ mxShape.prototype.addPoints=function(a,b,c,d,e,f,g){if(null!=b&&0<b.length){g=nu
1,b.length)];l<b.length-2&&0==Math.round(m.x-g.x)&&0==Math.round(m.y-g.y);)m=b[mxUtils.mod(l+2,b.length)],l++;n=m.x-g.x;m=m.y-g.y;p=Math.max(1,Math.sqrt(n*n+m*m));n=g.x+n*Math.min(d,p/2)/p;m=g.y+m*Math.min(d,p/2)/p;a.quadTo(g.x,g.y,n,m);g=new mxPoint(n,m)}else a.lineTo(g.x,g.y);m=g;l++}e?a.close():a.lineTo(k.x,k.y)}};
mxShape.prototype.resetStyles=function(){this.initStyles();this.spacing=0;delete this.fill;delete this.gradient;delete this.gradientDirection;delete this.stroke;delete this.startSize;delete this.endSize;delete this.startArrow;delete this.endArrow;delete this.direction;delete this.isShadow;delete this.isDashed;delete this.isRounded;delete this.glass};
mxShape.prototype.apply=function(a){this.state=a;this.style=a.style;if(null!=this.style){this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,this.fill);this.gradient=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENTCOLOR,this.gradient);this.gradientDirection=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENT_DIRECTION,this.gradientDirection);this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_OPACITY,this.opacity);this.fillOpacity=mxUtils.getValue(this.style,mxConstants.STYLE_FILL_OPACITY,
-this.fillOpacity);this.strokeOpacity=mxUtils.getValue(this.style,mxConstants.STYLE_STROKE_OPACITY,this.strokeOpacity);this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,this.stroke);this.strokewidth=mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth);this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing);this.startSize=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,this.startSize);this.endSize=mxUtils.getNumber(this.style,
-mxConstants.STYLE_ENDSIZE,this.endSize);this.startArrow=mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,this.startArrow);this.endArrow=mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,this.endArrow);this.rotation=mxUtils.getValue(this.style,mxConstants.STYLE_ROTATION,this.rotation);this.direction=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,this.direction);this.flipH=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0);this.flipV=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,
-0);null!=this.stencil&&(this.flipH=1==mxUtils.getValue(this.style,"stencilFlipH",0)||this.flipH,this.flipV=1==mxUtils.getValue(this.style,"stencilFlipV",0)||this.flipV);if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)a=this.flipH,this.flipH=this.flipV,this.flipV=a;this.isShadow=1==mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW,this.isShadow);this.isDashed=1==mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,this.isDashed);this.isRounded=1==mxUtils.getValue(this.style,
-mxConstants.STYLE_ROUNDED,this.isRounded);this.glass=1==mxUtils.getValue(this.style,mxConstants.STYLE_GLASS,this.glass);this.fill==mxConstants.NONE&&(this.fill=null);this.gradient==mxConstants.NONE&&(this.gradient=null);this.stroke==mxConstants.NONE&&(this.stroke=null)}};mxShape.prototype.setCursor=function(a){null==a&&(a="");this.cursor=a;null!=this.node&&(this.node.style.cursor=a)};mxShape.prototype.getCursor=function(){return this.cursor};mxShape.prototype.isRoundable=function(){return!1};
+this.fillOpacity);this.fillStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FILL_STYLE,this.fillStyle);this.strokeOpacity=mxUtils.getValue(this.style,mxConstants.STYLE_STROKE_OPACITY,this.strokeOpacity);this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,this.stroke);this.strokewidth=mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth);this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing);this.startSize=mxUtils.getNumber(this.style,
+mxConstants.STYLE_STARTSIZE,this.startSize);this.endSize=mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,this.endSize);this.startArrow=mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,this.startArrow);this.endArrow=mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,this.endArrow);this.rotation=mxUtils.getValue(this.style,mxConstants.STYLE_ROTATION,this.rotation);this.direction=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,this.direction);this.flipH=1==mxUtils.getValue(this.style,
+mxConstants.STYLE_FLIPH,0);this.flipV=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0);null!=this.stencil&&(this.flipH=1==mxUtils.getValue(this.style,"stencilFlipH",0)||this.flipH,this.flipV=1==mxUtils.getValue(this.style,"stencilFlipV",0)||this.flipV);if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)a=this.flipH,this.flipH=this.flipV,this.flipV=a;this.isShadow=1==mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW,this.isShadow);this.isDashed=
+1==mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,this.isDashed);this.isRounded=1==mxUtils.getValue(this.style,mxConstants.STYLE_ROUNDED,this.isRounded);this.glass=1==mxUtils.getValue(this.style,mxConstants.STYLE_GLASS,this.glass);this.fill==mxConstants.NONE&&(this.fill=null);this.gradient==mxConstants.NONE&&(this.gradient=null);this.stroke==mxConstants.NONE&&(this.stroke=null)}};mxShape.prototype.setCursor=function(a){null==a&&(a="");this.cursor=a;null!=this.node&&(this.node.style.cursor=a)};
+mxShape.prototype.getCursor=function(){return this.cursor};mxShape.prototype.isRoundable=function(){return!1};
mxShape.prototype.updateBoundingBox=function(){if(this.useSvgBoundingBox&&null!=this.node&&null!=this.node.ownerSVGElement)try{var a=this.node.getBBox();if(0<a.width&&0<a.height){this.boundingBox=new mxRectangle(a.x,a.y,a.width,a.height);this.boundingBox.grow(this.strokewidth*this.scale/2);return}}catch(c){}if(null!=this.bounds){a=this.createBoundingBox();if(null!=a){this.augmentBoundingBox(a);var b=this.getShapeRotation();0!=b&&(a=mxUtils.getBoundingBox(a,b))}this.boundingBox=a}};
mxShape.prototype.createBoundingBox=function(){var a=this.bounds.clone();(null!=this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)||this.isPaintBoundsInverted())&&a.rotate90();return a};mxShape.prototype.augmentBoundingBox=function(a){this.isShadow&&(a.width+=Math.ceil(mxConstants.SHADOW_OFFSET_X*this.scale),a.height+=Math.ceil(mxConstants.SHADOW_OFFSET_Y*this.scale));a.grow(this.strokewidth*this.scale/2)};
mxShape.prototype.isPaintBoundsInverted=function(){return null==this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)};mxShape.prototype.getRotation=function(){return null!=this.rotation?this.rotation:0};mxShape.prototype.getTextRotation=function(){var a=this.getRotation();1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(a+=mxText.prototype.verticalTextRotation);return a};
mxShape.prototype.getShapeRotation=function(){var a=this.getRotation();null!=this.direction&&(this.direction==mxConstants.DIRECTION_NORTH?a+=270:this.direction==mxConstants.DIRECTION_WEST?a+=180:this.direction==mxConstants.DIRECTION_SOUTH&&(a+=90));return a};
mxShape.prototype.createTransparentSvgRectangle=function(a,b,c,d){var e=document.createElementNS(mxConstants.NS_SVG,"rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);e.setAttribute("fill","none");e.setAttribute("stroke","none");e.setAttribute("pointer-events","all");return e};mxShape.prototype.setTransparentBackgroundImage=function(a){a.style.backgroundImage="url('"+mxClient.imageBasePath+"/transparent.gif')"};
mxShape.prototype.intersectsRectangle=function(a){return null!=a&&null!=this.node&&"hidden"!=this.node.style.visibility&&"none"!=this.node.style.display&&mxUtils.intersects(this.bounds,a)};mxShape.prototype.releaseSvgGradients=function(a){if(null!=a)for(var b in a){var c=a[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)-1,0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c))}};
-mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null);this.releaseSvgGradients(this.oldGradients);this.oldGradients=null};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxUtils.extend(mxStencil,mxShape);mxStencil.defaultLocalized=!1;mxStencil.allowEval=!1;mxStencil.prototype.desc=null;mxStencil.prototype.constraints=null;
-mxStencil.prototype.aspect=null;mxStencil.prototype.w0=null;mxStencil.prototype.h0=null;mxStencil.prototype.bgNode=null;mxStencil.prototype.fgNode=null;mxStencil.prototype.strokewidth=null;
+mxShape.prototype.releaseSvgFillPatterns=function(a){if(null!=a)for(var b in a){var c=a[b];null!=c&&(c.mxRefCount=(c.mxRefCount||0)-1,0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c))}};
+mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null);this.releaseSvgGradients(this.oldGradients);this.releaseSvgFillPatterns(this.oldFillPatterns);this.oldFillPatterns=this.oldGradients=null};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxUtils.extend(mxStencil,mxShape);mxStencil.defaultLocalized=!1;mxStencil.allowEval=!1;
+mxStencil.prototype.desc=null;mxStencil.prototype.constraints=null;mxStencil.prototype.aspect=null;mxStencil.prototype.w0=null;mxStencil.prototype.h0=null;mxStencil.prototype.bgNode=null;mxStencil.prototype.fgNode=null;mxStencil.prototype.strokewidth=null;
mxStencil.prototype.parseDescription=function(){this.fgNode=this.desc.getElementsByTagName("foreground")[0];this.bgNode=this.desc.getElementsByTagName("background")[0];this.w0=Number(this.desc.getAttribute("w")||100);this.h0=Number(this.desc.getAttribute("h")||100);var a=this.desc.getAttribute("aspect");this.aspect=null!=a?a:"variable";a=this.desc.getAttribute("strokewidth");this.strokewidth=null!=a?a:"1"};
mxStencil.prototype.parseConstraints=function(){var a=this.desc.getElementsByTagName("connections")[0];if(null!=a&&(a=mxUtils.getChildNodes(a),null!=a&&0<a.length)){this.constraints=[];for(var b=0;b<a.length;b++)this.constraints.push(this.parseConstraint(a[b]))}};mxStencil.prototype.parseConstraint=function(a){var b=Number(a.getAttribute("x")),c=Number(a.getAttribute("y")),d="1"==a.getAttribute("perimeter");a=a.getAttribute("name");return new mxConnectionConstraint(new mxPoint(b,c),d,a)};
mxStencil.prototype.evaluateTextAttribute=function(a,b,c){b=this.evaluateAttribute(a,b,c);a=a.getAttribute("localized");if(mxStencil.defaultLocalized&&null==a||"1"==a)b=mxResources.get(b);return b};mxStencil.prototype.evaluateAttribute=function(a,b,c){b=a.getAttribute(b);null==b&&(a=mxUtils.getTextContent(a),null!=a&&mxStencil.allowEval&&(a=mxUtils.eval(a),"function"==typeof a&&(b=a(c))));return b};
@@ -1937,7 +1951,7 @@ H);this.exportColor(G)};this.fromRGB=function(y,F,H,G){0>y&&(y=0);1<y&&(y=1);0>F
function(y,F){return(y=y.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i))?(6===y[1].length?this.fromRGB(parseInt(y[1].substr(0,2),16)/255,parseInt(y[1].substr(2,2),16)/255,parseInt(y[1].substr(4,2),16)/255,F):this.fromRGB(parseInt(y[1].charAt(0)+y[1].charAt(0),16)/255,parseInt(y[1].charAt(1)+y[1].charAt(1),16)/255,parseInt(y[1].charAt(2)+y[1].charAt(2),16)/255,F),!0):!1};this.toString=function(){return(256|Math.round(255*this.rgb[0])).toString(16).substr(1)+(256|Math.round(255*this.rgb[1])).toString(16).substr(1)+
(256|Math.round(255*this.rgb[2])).toString(16).substr(1)};var q=this,t="hvs"===this.pickerMode.toLowerCase()?1:0,u=mxJSColor.fetchElement(this.valueElement),x=mxJSColor.fetchElement(this.styleElement),A=!1,E=!1,C=1,D=2,B=4,v=8;u&&(b=function(){q.fromString(u.value,C);p()},mxJSColor.addEvent(u,"keyup",b),mxJSColor.addEvent(u,"input",b),mxJSColor.addEvent(u,"blur",l),u.setAttribute("autocomplete","off"));x&&(x.jscStyle={backgroundImage:x.style.backgroundImage,backgroundColor:x.style.backgroundColor,
color:x.style.color});switch(t){case 0:mxJSColor.requireImage("hs.png");break;case 1:mxJSColor.requireImage("hv.png")}this.importColor()}};mxJSColor.install();
-var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};
+var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.createTemplateTagFirstArg=function(b){return b.raw=b};$jscomp.createTemplateTagFirstArgWithRaw=function(b,e){b.raw=e;return b};$jscomp.arrayIteratorImpl=function(b){var e=0;return function(){return e<b.length?{done:!1,value:b[e++]}:{done:!0}}};$jscomp.arrayIterator=function(b){return{next:$jscomp.arrayIteratorImpl(b)}};$jscomp.makeIterator=function(b){var e="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];return e?e.call(b):$jscomp.arrayIterator(b)};
Editor=function(b,e,k,n,D){mxEventSource.call(this);this.chromeless=null!=b?b:this.chromeless;this.initStencilRegistry();this.graph=n||this.createGraph(e,k);this.editable=null!=D?D:!b;this.undoManager=this.createUndoManager();this.status="";this.getOrCreateFilename=function(){return this.filename||mxResources.get("drawing",[Editor.pageCounter])+".xml"};this.getFilename=function(){return this.filename};this.setStatus=function(t){this.status=t;this.fireEvent(new mxEventObject("statusChanged"))};this.getStatus=
function(){return this.status};this.graphChangeListener=function(t,E){t=null!=E?E.getProperty("edit"):null;null!=t&&t.ignoreEdit||this.setModified(!0)};this.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){this.graphChangeListener.apply(this,arguments)}));this.graph.resetViewOnRootChange=!1;this.init()};Editor.pageCounter=0;
(function(){try{for(var b=window;null!=b.opener&&"undefined"!==typeof b.opener.Editor&&!isNaN(b.opener.Editor.pageCounter)&&b.opener!=b;)b=b.opener;null!=b&&(b.Editor.pageCounter++,Editor.pageCounter=b.Editor.pageCounter)}catch(e){}})();Editor.defaultHtmlFont='-apple-system, BlinkMacSystemFont, "Segoe UI Variable", "Segoe UI", system-ui, ui-sans-serif, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"';Editor.useLocalStorage="undefined"!=typeof Storage&&mxClient.IS_IOS;
@@ -1970,8 +1984,9 @@ Editor.lightImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5
Editor.undoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIuNSA4Yy0yLjY1IDAtNS4wNS45OS02LjkgMi42TDIgN3Y5aDlsLTMuNjItMy42MmMxLjM5LTEuMTYgMy4xNi0xLjg4IDUuMTItMS44OCAzLjU0IDAgNi41NSAyLjMxIDcuNiA1LjVsMi4zNy0uNzhDMjEuMDggMTEuMDMgMTcuMTUgOCAxMi41IDh6Ii8+PC9zdmc+";Editor.redoImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTguNCAxMC42QzE2LjU1IDguOTkgMTQuMTUgOCAxMS41IDhjLTQuNjUgMC04LjU4IDMuMDMtOS45NiA3LjIyTDMuOSAxNmMxLjA1LTMuMTkgNC4wNS01LjUgNy42LTUuNSAxLjk1IDAgMy43My43MiA1LjEyIDEuODhMMTMgMTZoOVY3bC0zLjYgMy42eiIvPjwvc3ZnPg==";
Editor.outlineImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgweiIgZmlsbD0ibm9uZSIvPjxwYXRoIGQ9Ik0yMC41IDNsLS4xNi4wM0wxNSA1LjEgOSAzIDMuMzYgNC45Yy0uMjEuMDctLjM2LjI1LS4zNi40OFYyMC41YzAgLjI4LjIyLjUuNS41bC4xNi0uMDNMOSAxOC45bDYgMi4xIDUuNjQtMS45Yy4yMS0uMDcuMzYtLjI1LjM2LS40OFYzLjVjMC0uMjgtLjIyLS41LS41LS41ek0xNSAxOWwtNi0yLjExVjVsNiAyLjExVjE5eiIvPjwvc3ZnPg==";
Editor.saveImage="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMThweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMThweCIgZmlsbD0iIzAwMDAwMCI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDEydjdINXYtN0gzdjdjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMnYtN2gtMnptLTYgLjY3bDIuNTktMi41OEwxNyAxMS41bC01IDUtNS01IDEuNDEtMS40MUwxMSAxMi42N1YzaDJ2OS42N3oiLz48L3N2Zz4=";
-Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;
-Editor.simpleLabels=!1;Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};
+Editor.roughFillStyles=[{val:"auto",dispName:"Auto"},{val:"hachure",dispName:"Hachure"},{val:"solid",dispName:"Solid"},{val:"zigzag",dispName:"ZigZag"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];
+Editor.fillStyles=[{val:"auto",dispName:"Auto"},{val:"hatch",dispName:"Hatch"},{val:"solid",dispName:"Solid"},{val:"dots",dispName:"Dots"},{val:"cross-hatch",dispName:"Cross Hatch"},{val:"dashed",dispName:"Dashed"},{val:"zigzag-line",dispName:"ZigZag Line"}];Editor.themes=null;Editor.ctrlKey=mxClient.IS_MAC?"Cmd":"Ctrl";Editor.hintOffset=20;Editor.shapePickerHoverDelay=300;Editor.fitWindowBorders=null;Editor.popupsAllowed=null!=window.urlParams?"1"!=urlParams.noDevice:!0;Editor.simpleLabels=!1;
+Editor.enableNativeCipboard=window==window.top&&!mxClient.IS_FF&&null!=navigator.clipboard;Editor.sketchMode=!1;Editor.darkMode=!1;Editor.darkColor="#2a2a2a";Editor.lightColor="#f0f0f0";Editor.isPngDataUrl=function(b){return null!=b&&"data:image/png;"==b.substring(0,15)};Editor.isPngData=function(b){return 8<b.length&&137==b.charCodeAt(0)&&80==b.charCodeAt(1)&&78==b.charCodeAt(2)&&71==b.charCodeAt(3)&&13==b.charCodeAt(4)&&10==b.charCodeAt(5)&&26==b.charCodeAt(6)&&10==b.charCodeAt(7)};
Editor.extractGraphModelFromPng=function(b){var e=null;try{var k=b.substring(b.indexOf(",")+1),n=window.atob&&!mxClient.IS_SF?atob(k):Base64.decode(k,!0);EditorUi.parsePng(n,mxUtils.bind(this,function(D,t,E){D=n.substring(D+8,D+8+E);"zTXt"==t?(E=D.indexOf(String.fromCharCode(0)),"mxGraphModel"==D.substring(0,E)&&(D=pako.inflateRaw(Graph.stringToArrayBuffer(D.substring(E+2)),{to:"string"}).replace(/\+/g," "),null!=D&&0<D.length&&(e=D))):"tEXt"==t&&(D=D.split(String.fromCharCode(0)),1<D.length&&("mxGraphModel"==
D[0]||"mxfile"==D[0])&&(e=D[1]));if(null!=e||"IDAT"==t)return!0}))}catch(D){}null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));null!=e&&"%"==e.charAt(0)&&(e=decodeURIComponent(e));return e};Editor.isDarkMode=function(b){return Editor.darkMode||"dark"==uiTheme};Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;mxUtils.extend(Editor,mxEventSource);
Editor.prototype.originalNoForeignObject=mxClient.NO_FO;Editor.prototype.transparentImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhMAAwAIAAAP///wAAACH5BAEAAAAALAAAAAAwADAAAAIxhI+py+0Po5y02ouz3rz7D4biSJbmiabqyrbuC8fyTNf2jef6zvf+DwwKh8Si8egpAAA7":IMAGE_PATH+"/transparent.gif";Editor.prototype.extendCanvas=!0;Editor.prototype.chromeless=!1;Editor.prototype.cancelFirst=!0;Editor.prototype.enabled=!0;Editor.prototype.filename=null;Editor.prototype.modified=!1;Editor.prototype.autosave=!0;
@@ -1992,53 +2007,53 @@ Editor.prototype.setFilename=function(b){this.filename=b};
Editor.prototype.createUndoManager=function(){var b=this.graph,e=new mxUndoManager;this.undoListener=function(n,D){e.undoableEditHappened(D.getProperty("edit"))};var k=mxUtils.bind(this,function(n,D){this.undoListener.apply(this,arguments)});b.getModel().addListener(mxEvent.UNDO,k);b.getView().addListener(mxEvent.UNDO,k);k=function(n,D){n=b.getSelectionCellsForChanges(D.getProperty("edit").changes,function(E){return!(E instanceof mxChildChange)});if(0<n.length){b.getModel();D=[];for(var t=0;t<n.length;t++)null!=
b.view.getState(n[t])&&D.push(n[t]);b.setSelectionCells(D)}};e.addListener(mxEvent.UNDO,k);e.addListener(mxEvent.REDO,k);return e};Editor.prototype.initStencilRegistry=function(){};Editor.prototype.destroy=function(){null!=this.graph&&(this.graph.destroy(),this.graph=null)};OpenFile=function(b){this.consumer=this.producer=null;this.done=b;this.args=null};OpenFile.prototype.setConsumer=function(b){this.consumer=b;this.execute()};OpenFile.prototype.setData=function(){this.args=arguments;this.execute()};
OpenFile.prototype.error=function(b){this.cancel(!0);mxUtils.alert(b)};OpenFile.prototype.execute=function(){null!=this.consumer&&null!=this.args&&(this.cancel(!1),this.consumer.apply(this,this.args))};OpenFile.prototype.cancel=function(b){null!=this.done&&this.done(null!=b?b:!0)};
-function Dialog(b,e,k,n,D,t,E,d,f,g,m){var q=f?57:0,z=k,F=n,C=f?0:64,I=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var G=I.height,Z=Math.max(1,Math.round((I.width-k-C)/2)),fa=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);0<b.dialogs.length&&(this.zIndex+=
-2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";Z+=I.x;fa+=I.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
-fa+=b.embedViewport.y,Z+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var ba=b.createDiv(f?"geTransDialog":"geDialog");D=this.getPosition(Z,fa,k,n);Z=D.x;fa=D.y;ba.style.width=k+"px";ba.style.height=n+"px";ba.style.left=Z+"px";ba.style.top=fa+"px";ba.style.zIndex=this.zIndex;ba.appendChild(e);document.body.appendChild(ba);!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(t&&(t=document.createElement("img"),t.setAttribute("src",Dialog.prototype.closeImage),
-t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=fa+14+"px",t.style.left=Z+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!m)){var Y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(pa){Y=!0}),null,mxUtils.bind(this,function(pa){Y&&(b.hideDialog(!0),Y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var pa=
-g();null!=pa&&(z=k=pa.w,F=n=pa.h)}pa=mxUtils.getDocumentSize();G=pa.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");Z=Math.max(1,Math.round((pa.width-k-C)/2));fa=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(z,document.body.scrollWidth-C):z;n=Math.min(F,G-C);pa=this.getPosition(Z,fa,k,n);Z=pa.x;fa=pa.y;ba.style.left=Z+"px";ba.style.top=fa+"px";ba.style.width=k+"px";ba.style.height=
-n+"px";!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=fa+14+"px",this.dialogImg.style.left=Z+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=ba;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
+function Dialog(b,e,k,n,D,t,E,d,f,g,l){var q=f?57:0,z=k,F=n,C=f?0:64,I=Editor.inlineFullscreen||null==b.embedViewport?mxUtils.getDocumentSize():mxUtils.clone(b.embedViewport);null==b.embedViewport&&null!=window.innerHeight&&(I.height=window.innerHeight);var G=I.height,Z=Math.max(1,Math.round((I.width-k-C)/2)),ca=Math.max(1,Math.round((G-n-b.footerHeight)/3));e.style.maxHeight="100%";k=null!=document.body?Math.min(k,document.body.scrollWidth-C):k;n=Math.min(n,G-C);0<b.dialogs.length&&(this.zIndex+=
+2*b.dialogs.length);null==this.bg&&(this.bg=b.createDiv("background"),this.bg.style.position="absolute",this.bg.style.background=Dialog.backdropColor,this.bg.style.height=G+"px",this.bg.style.right="0px",this.bg.style.zIndex=this.zIndex-2,mxUtils.setOpacity(this.bg,this.bgOpacity));I=mxUtils.getDocumentScrollOrigin(document);this.bg.style.left=I.x+"px";this.bg.style.top=I.y+"px";Z+=I.x;ca+=I.y;Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px",
+ca+=b.embedViewport.y,Z+=b.embedViewport.x);D&&document.body.appendChild(this.bg);var ba=b.createDiv(f?"geTransDialog":"geDialog");D=this.getPosition(Z,ca,k,n);Z=D.x;ca=D.y;ba.style.width=k+"px";ba.style.height=n+"px";ba.style.left=Z+"px";ba.style.top=ca+"px";ba.style.zIndex=this.zIndex;ba.appendChild(e);document.body.appendChild(ba);!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");e.style.overflowX="hidden";if(t&&(t=document.createElement("img"),t.setAttribute("src",Dialog.prototype.closeImage),
+t.setAttribute("title",mxResources.get("close")),t.className="geDialogClose",t.style.top=ca+14+"px",t.style.left=Z+k+38-q+"px",t.style.zIndex=this.zIndex,mxEvent.addListener(t,"click",mxUtils.bind(this,function(){b.hideDialog(!0)})),document.body.appendChild(t),this.dialogImg=t,!l)){var Y=!1;mxEvent.addGestureListeners(this.bg,mxUtils.bind(this,function(O){Y=!0}),null,mxUtils.bind(this,function(O){Y&&(b.hideDialog(!0),Y=!1)}))}this.resizeListener=mxUtils.bind(this,function(){if(null!=g){var O=g();
+null!=O&&(z=k=O.w,F=n=O.h)}O=mxUtils.getDocumentSize();G=O.height;this.bg.style.height=G+"px";Editor.inlineFullscreen||null==b.embedViewport||(this.bg.style.height=mxUtils.getDocumentSize().height+"px");Z=Math.max(1,Math.round((O.width-k-C)/2));ca=Math.max(1,Math.round((G-n-b.footerHeight)/3));k=null!=document.body?Math.min(z,document.body.scrollWidth-C):z;n=Math.min(F,G-C);O=this.getPosition(Z,ca,k,n);Z=O.x;ca=O.y;ba.style.left=Z+"px";ba.style.top=ca+"px";ba.style.width=k+"px";ba.style.height=n+
+"px";!d&&e.clientHeight>ba.clientHeight-C&&(e.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=ca+14+"px",this.dialogImg.style.left=Z+k+38-q+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=E;this.container=ba;b.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-2;
Dialog.prototype.noColorImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkEzRDlBMUUwODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkEzRDlBMUUxODYxMTExRTFCMzA4RDdDMjJBMEMxRDM3Ij4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6QTNEOUExREU4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6QTNEOUExREY4NjExMTFFMUIzMDhEN0MyMkEwQzFEMzciLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz5xh3fmAAAABlBMVEX////MzMw46qqDAAAAGElEQVR42mJggAJGKGAYIIGBth8KAAIMAEUQAIElnLuQAAAAAElFTkSuQmCC":IMAGE_PATH+
"/nocolor.png";Dialog.prototype.closeImage=mxClient.IS_SVG?"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJAQMAAADaX5RTAAAABlBMVEV7mr3///+wksspAAAAAnRSTlP/AOW3MEoAAAAdSURBVAgdY9jXwCDDwNDRwHCwgeExmASygSL7GgB12QiqNHZZIwAAAABJRU5ErkJggg==":IMAGE_PATH+"/close.png";
Dialog.prototype.clearImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhDQAKAIABAMDAwP///yH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS4wLWMwNjAgNjEuMTM0Nzc3LCAyMDEwLzAyLzEyLTE3OjMyOjAwICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IFdpbmRvd3MiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6OUIzOEM1NzI4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OUIzOEM1NzM4NjEyMTFFMUEzMkNDMUE3NjZERDE2QjIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo5QjM4QzU3MDg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo5QjM4QzU3MTg2MTIxMUUxQTMyQ0MxQTc2NkREMTZCMiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PgH//v38+/r5+Pf29fTz8vHw7+7t7Ovq6ejn5uXk4+Lh4N/e3dzb2tnY19bV1NPS0dDPzs3My8rJyMfGxcTDwsHAv769vLu6ubi3trW0s7KxsK+urayrqqmop6alpKOioaCfnp2cm5qZmJeWlZSTkpGQj46NjIuKiYiHhoWEg4KBgH9+fXx7enl4d3Z1dHNycXBvbm1sa2ppaGdmZWRjYmFgX15dXFtaWVhXVlVUU1JRUE9OTUxLSklIR0ZFRENCQUA/Pj08Ozo5ODc2NTQzMjEwLy4tLCsqKSgnJiUkIyIhIB8eHRwbGhkYFxYVFBMSERAPDg0MCwoJCAcGBQQDAgEAACH5BAEAAAEALAAAAAANAAoAAAIXTGCJebD9jEOTqRlttXdrB32PJ2ncyRQAOw==":IMAGE_PATH+
"/clear.gif";Dialog.prototype.bgOpacity=80;Dialog.prototype.getPosition=function(b,e){return new mxPoint(b,e)};Dialog.prototype.close=function(b,e){if(null!=this.onDialogClose){if(0==this.onDialogClose(b,e))return!1;this.onDialogClose=null}null!=this.dialogImg&&(this.dialogImg.parentNode.removeChild(this.dialogImg),this.dialogImg=null);null!=this.bg&&null!=this.bg.parentNode&&this.bg.parentNode.removeChild(this.bg);mxEvent.removeListener(window,"resize",this.resizeListener);this.container.parentNode.removeChild(this.container)};
-var ErrorDialog=function(b,e,k,n,D,t,E,d,f,g,m){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=e){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,e);z.setAttribute("title",e);q.appendChild(z)}e=
-document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();t()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=m&&m()}),g.className="geBtn",k.appendChild(g));var F=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
+var ErrorDialog=function(b,e,k,n,D,t,E,d,f,g,l){f=null!=f?f:!0;var q=document.createElement("div");q.style.textAlign="center";if(null!=e){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,e);z.setAttribute("title",e);q.appendChild(z)}e=
+document.createElement("div");e.style.lineHeight="1.2em";e.style.padding="6px";e.innerHTML=k;q.appendChild(e);k=document.createElement("div");k.style.marginTop="12px";k.style.textAlign="center";null!=t&&(e=mxUtils.button(mxResources.get("tryAgain"),function(){b.hideDialog();t()}),e.className="geBtn",k.appendChild(e),k.style.textAlign="center");null!=g&&(g=mxUtils.button(g,function(){null!=l&&l()}),g.className="geBtn",k.appendChild(g));var F=mxUtils.button(n,function(){f&&b.hideDialog();null!=D&&D()});
F.className="geBtn";k.appendChild(F);null!=E&&(n=mxUtils.button(E,function(){f&&b.hideDialog();null!=d&&d()}),n.className="geBtn gePrimaryBtn",k.appendChild(n));this.init=function(){F.focus()};q.appendChild(k);this.container=q},PrintDialog=function(b,e){this.create(b,e)};
-PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,I=parseInt(q.value)/100;isNaN(I)&&(I=1,q.value="100%");I*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,Z=1/k.pageScale;if(C){var fa=E.checked?1:parseInt(m.value);isNaN(fa)||(Z=mxUtils.getScaleForPageCount(fa,k,G))}k.getGraphBounds();var ba=fa=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*I);G.height=Math.ceil(G.height*I);Z*=I;!C&&k.pageVisible?(I=k.getPageLayout(),fa-=I.x*G.width,ba-=I.y*
-G.height):C=!0;C=PrintDialog.createPrintPreview(k,Z,G,0,fa,ba,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f,
+PrintDialog.prototype.create=function(b){function e(F){var C=E.checked||g.checked,I=parseInt(q.value)/100;isNaN(I)&&(I=1,q.value="100%");I*=.75;var G=k.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,Z=1/k.pageScale;if(C){var ca=E.checked?1:parseInt(l.value);isNaN(ca)||(Z=mxUtils.getScaleForPageCount(ca,k,G))}k.getGraphBounds();var ba=ca=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*I);G.height=Math.ceil(G.height*I);Z*=I;!C&&k.pageVisible?(I=k.getPageLayout(),ca-=I.x*G.width,ba-=I.y*
+G.height):C=!0;C=PrintDialog.createPrintPreview(k,Z,G,0,ca,ba,C);C.open();F&&PrintDialog.printPreview(C)}var k=b.editor.graph,n=document.createElement("table");n.style.width="100%";n.style.height="100%";var D=document.createElement("tbody");var t=document.createElement("tr");var E=document.createElement("input");E.setAttribute("type","checkbox");var d=document.createElement("td");d.setAttribute("colspan","2");d.style.fontSize="10pt";d.appendChild(E);var f=document.createElement("span");mxUtils.write(f,
" "+mxResources.get("fitPage"));d.appendChild(f);mxEvent.addListener(f,"click",function(F){E.checked=!E.checked;g.checked=!E.checked;mxEvent.consume(F)});mxEvent.addListener(E,"change",function(){g.checked=!E.checked});t.appendChild(d);D.appendChild(t);t=t.cloneNode(!1);var g=document.createElement("input");g.setAttribute("type","checkbox");d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(g);f=document.createElement("span");mxUtils.write(f," "+mxResources.get("posterPrint")+":");
-d.appendChild(f);mxEvent.addListener(f,"click",function(F){g.checked=!g.checked;E.checked=!g.checked;mxEvent.consume(F)});t.appendChild(d);var m=document.createElement("input");m.setAttribute("value","1");m.setAttribute("type","number");m.setAttribute("min","1");m.setAttribute("size","4");m.setAttribute("disabled","disabled");m.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(m);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);
-mxEvent.addListener(g,"change",function(){g.checked?m.removeAttribute("disabled"):m.setAttribute("disabled","disabled");E.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");
+d.appendChild(f);mxEvent.addListener(f,"click",function(F){g.checked=!g.checked;E.checked=!g.checked;mxEvent.consume(F)});t.appendChild(d);var l=document.createElement("input");l.setAttribute("value","1");l.setAttribute("type","number");l.setAttribute("min","1");l.setAttribute("size","4");l.setAttribute("disabled","disabled");l.style.width="50px";d=document.createElement("td");d.style.fontSize="10pt";d.appendChild(l);mxUtils.write(d," "+mxResources.get("pages")+" (max)");t.appendChild(d);D.appendChild(t);
+mxEvent.addListener(g,"change",function(){g.checked?l.removeAttribute("disabled"):l.setAttribute("disabled","disabled");E.checked=!g.checked});t=t.cloneNode(!1);d=document.createElement("td");mxUtils.write(d,mxResources.get("pageScale")+":");t.appendChild(d);d=document.createElement("td");var q=document.createElement("input");q.setAttribute("value","100 %");q.setAttribute("size","5");q.style.width="50px";d.appendChild(q);t.appendChild(d);D.appendChild(t);t=document.createElement("tr");d=document.createElement("td");
d.colSpan=2;d.style.paddingTop="20px";d.setAttribute("align","right");f=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});f.className="geBtn";b.editor.cancelFirst&&d.appendChild(f);if(PrintDialog.previewEnabled){var z=mxUtils.button(mxResources.get("preview"),function(){b.hideDialog();e(!1)});z.className="geBtn";d.appendChild(z)}z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){b.hideDialog();e(!0)});z.className="geBtn gePrimaryBtn";d.appendChild(z);
b.editor.cancelFirst||d.appendChild(f);t.appendChild(d);D.appendChild(t);n.appendChild(D);this.container=n};PrintDialog.printPreview=function(b){try{if(null!=b.wnd){var e=function(){b.wnd.focus();b.wnd.print();b.wnd.close()};mxClient.IS_GC?window.setTimeout(e,500):e()}}catch(k){}};
PrintDialog.createPrintPreview=function(b,e,k,n,D,t,E){e=new mxPrintPreview(b,e,k,n,D,t);e.title=mxResources.get("preview");e.printBackgroundImage=!0;e.autoOrigin=E;b=b.background;if(null==b||""==b||b==mxConstants.NONE)b="#ffffff";e.backgroundColor=b;var d=e.writeHead;e.writeHead=function(f){d.apply(this,arguments);f.writeln('<style type="text/css">');f.writeln("@media screen {");f.writeln(" body > div { padding:30px;box-sizing:content-box; }");f.writeln("}");f.writeln("</style>")};return e};
PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(b){function e(){null==m||m==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=m,g.style.backgroundImage="")}function k(){var G=C;null!=G&&Graph.isPageLink(G.src)&&(G=b.createImageForPageLink(G.src,null));null!=G&&null!=G.src?(F.setAttribute("src",G.src),F.style.display=""):(F.removeAttribute("src"),F.style.display="none")}var n=b.editor.graph,D=document.createElement("table");D.style.width=
+var PageSetupDialog=function(b){function e(){null==l||l==mxConstants.NONE?(g.style.backgroundColor="",g.style.backgroundImage="url('"+Dialog.prototype.noColorImage+"')"):(g.style.backgroundColor=l,g.style.backgroundImage="")}function k(){var G=C;null!=G&&Graph.isPageLink(G.src)&&(G=b.createImageForPageLink(G.src,null));null!=G&&null!=G.src?(F.setAttribute("src",G.src),F.style.display=""):(F.removeAttribute("src"),F.style.display="none")}var n=b.editor.graph,D=document.createElement("table");D.style.width=
"100%";D.style.height="100%";var t=document.createElement("tbody");var E=document.createElement("tr");var d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";mxUtils.write(d,mxResources.get("paperSize")+":");E.appendChild(d);d=document.createElement("td");d.style.verticalAlign="top";d.style.fontSize="10pt";var f=PageSetupDialog.addPageFormatPanel(d,"pagesetupdialog",n.pageFormat);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");
-mxUtils.write(d,mxResources.get("background")+":");E.appendChild(d);d=document.createElement("td");d.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var m=n.background;e();mxEvent.addListener(g,
-"click",function(G){b.pickColor(m||"none",function(Z){m=Z;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
+mxUtils.write(d,mxResources.get("background")+":");E.appendChild(d);d=document.createElement("td");d.style.whiteSpace="nowrap";document.createElement("input").setAttribute("type","text");var g=document.createElement("button");g.style.width="22px";g.style.height="22px";g.style.cursor="pointer";g.style.marginRight="20px";g.style.backgroundPosition="center center";g.style.backgroundRepeat="no-repeat";mxClient.IS_FF&&(g.style.position="relative",g.style.top="-6px");var l=n.background;e();mxEvent.addListener(g,
+"click",function(G){b.pickColor(l||"none",function(Z){l=Z;e()});mxEvent.consume(G)});d.appendChild(g);mxUtils.write(d,mxResources.get("gridSize")+":");var q=document.createElement("input");q.setAttribute("type","number");q.setAttribute("min","0");q.style.width="40px";q.style.marginLeft="6px";q.value=n.getGridSize();d.appendChild(q);mxEvent.addListener(q,"change",function(){var G=parseInt(q.value);q.value=Math.max(1,isNaN(G)?n.getGridSize():G)});E.appendChild(d);t.appendChild(E);E=document.createElement("tr");
d=document.createElement("td");mxUtils.write(d,mxResources.get("image")+":");E.appendChild(d);d=document.createElement("td");var z=document.createElement("button");z.className="geBtn";z.style.margin="0px";mxUtils.write(z,mxResources.get("change")+"...");var F=document.createElement("img");F.setAttribute("valign","middle");F.style.verticalAlign="middle";F.style.border="1px solid lightGray";F.style.borderRadius="4px";F.style.marginRight="14px";F.style.maxWidth="100px";F.style.cursor="pointer";F.style.height=
-"60px";F.style.padding="4px";var C=n.backgroundImage,I=function(G){b.showBackgroundImageDialog(function(Z,fa){fa||(C=Z,k())},C);mxEvent.consume(G)};mxEvent.addListener(z,"click",I);mxEvent.addListener(F,"click",I);k();d.appendChild(F);d.appendChild(z);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});z.className=
-"geBtn";b.editor.cancelFirst&&d.appendChild(z);I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var G=parseInt(q.value);isNaN(G)||n.gridSize===G||n.setGridSize(G);G=new ChangePageSetup(b,m,C,f.get());G.ignoreColor=n.background==m;G.ignoreImage=(null!=n.backgroundImage?n.backgroundImage.src:null)===(null!=C?C.src:null);n.pageFormat.width==G.previousFormat.width&&n.pageFormat.height==G.previousFormat.height&&G.ignoreColor&&G.ignoreImage||n.model.execute(G)});I.className="geBtn gePrimaryBtn";
+"60px";F.style.padding="4px";var C=n.backgroundImage,I=function(G){b.showBackgroundImageDialog(function(Z,ca){ca||(C=Z,k())},C);mxEvent.consume(G)};mxEvent.addListener(z,"click",I);mxEvent.addListener(F,"click",I);k();d.appendChild(F);d.appendChild(z);E.appendChild(d);t.appendChild(E);E=document.createElement("tr");d=document.createElement("td");d.colSpan=2;d.style.paddingTop="16px";d.setAttribute("align","right");z=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog()});z.className=
+"geBtn";b.editor.cancelFirst&&d.appendChild(z);I=mxUtils.button(mxResources.get("apply"),function(){b.hideDialog();var G=parseInt(q.value);isNaN(G)||n.gridSize===G||n.setGridSize(G);G=new ChangePageSetup(b,l,C,f.get());G.ignoreColor=n.background==l;G.ignoreImage=(null!=n.backgroundImage?n.backgroundImage.src:null)===(null!=C?C.src:null);n.pageFormat.width==G.previousFormat.width&&n.pageFormat.height==G.previousFormat.height&&G.ignoreColor&&G.ignoreImage||n.model.execute(G)});I.className="geBtn gePrimaryBtn";
d.appendChild(I);b.editor.cancelFirst||d.appendChild(z);E.appendChild(d);t.appendChild(E);D.appendChild(t);this.container=D};
-PageSetupDialog.addPageFormatPanel=function(b,e,k,n){function D(pa,O,W){if(W||q!=document.activeElement&&z!=document.activeElement){pa=!1;for(O=0;O<C.length;O++)W=C[O],fa?"custom"==W.key&&(d.value=W.key,fa=!1):null!=W.format&&("a4"==W.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==W.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),k.width==
-W.format.width&&k.height==W.format.height?(d.value=W.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,pa=!0):k.width==W.format.height&&k.height==W.format.width&&(d.value=W.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,pa=E.checked=!0));pa?(f.style.display="",m.style.display="none"):(q.value=k.width/100,z.value=k.height/100,t.setAttribute("checked",
-"checked"),d.value="custom",f.style.display="none",m.style.display="")}}e="format-"+e;var t=document.createElement("input");t.setAttribute("name",e);t.setAttribute("type","radio");t.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";
-var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";t.style.marginRight="6px";f.appendChild(t);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));f.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";f.appendChild(E);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var m=document.createElement("div");m.style.marginLeft=
-"4px";m.style.width="210px";m.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";m.appendChild(q);mxUtils.write(m," in x ");var z=document.createElement("input");z.setAttribute("size","7");z.style.textAlign="right";m.appendChild(z);mxUtils.write(m," in");f.style.display="none";m.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),I=0;I<C.length;I++){var G=C[I];F[G.key]=G;var Z=document.createElement("option");Z.setAttribute("value",
-G.key);mxUtils.write(Z,G.title);d.appendChild(Z)}var fa=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(m);var ba=k,Y=function(pa,O){pa=F[d.value];null!=pa.format?(q.value=pa.format.width/100,z.value=pa.format.height/100,m.style.display="none",f.style.display=""):(f.style.display="none",m.style.display="");pa=parseFloat(q.value);if(isNaN(pa)||0>=pa)q.value=k.width/100;pa=parseFloat(z.value);if(isNaN(pa)||0>=pa)z.value=k.height/100;pa=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
-Math.floor(100*parseFloat(z.value)));"custom"!=d.value&&E.checked&&(pa=new mxRectangle(0,0,pa.height,pa.width));O&&fa||pa.width==ba.width&&pa.height==ba.height||(ba=pa,null!=n&&n(ba))};mxEvent.addListener(e,"click",function(pa){t.checked=!0;Y(pa);mxEvent.consume(pa)});mxEvent.addListener(g,"click",function(pa){E.checked=!0;Y(pa);mxEvent.consume(pa)});mxEvent.addListener(q,"blur",Y);mxEvent.addListener(q,"click",Y);mxEvent.addListener(z,"blur",Y);mxEvent.addListener(z,"click",Y);mxEvent.addListener(E,
-"change",Y);mxEvent.addListener(t,"change",Y);mxEvent.addListener(d,"change",function(pa){fa="custom"==d.value;Y(pa,!0)});Y();return{set:function(pa){k=pa;D(null,null,!0)},get:function(){return ba},widthInput:q,heightInput:z}};
+PageSetupDialog.addPageFormatPanel=function(b,e,k,n){function D(O,la,aa){if(aa||q!=document.activeElement&&z!=document.activeElement){O=!1;for(la=0;la<C.length;la++)aa=C[la],ca?"custom"==aa.key&&(d.value=aa.key,ca=!1):null!=aa.format&&("a4"==aa.key?826==k.width?(k=mxRectangle.fromRectangle(k),k.width=827):826==k.height&&(k=mxRectangle.fromRectangle(k),k.height=827):"a5"==aa.key&&(584==k.width?(k=mxRectangle.fromRectangle(k),k.width=583):584==k.height&&(k=mxRectangle.fromRectangle(k),k.height=583)),
+k.width==aa.format.width&&k.height==aa.format.height?(d.value=aa.key,t.setAttribute("checked","checked"),t.defaultChecked=!0,t.checked=!0,E.removeAttribute("checked"),E.defaultChecked=!1,E.checked=!1,O=!0):k.width==aa.format.height&&k.height==aa.format.width&&(d.value=aa.key,t.removeAttribute("checked"),t.defaultChecked=!1,t.checked=!1,E.setAttribute("checked","checked"),E.defaultChecked=!0,O=E.checked=!0));O?(f.style.display="",l.style.display="none"):(q.value=k.width/100,z.value=k.height/100,t.setAttribute("checked",
+"checked"),d.value="custom",f.style.display="none",l.style.display="")}}e="format-"+e;var t=document.createElement("input");t.setAttribute("name",e);t.setAttribute("type","radio");t.setAttribute("value","portrait");var E=document.createElement("input");E.setAttribute("name",e);E.setAttribute("type","radio");E.setAttribute("value","landscape");var d=document.createElement("select");d.style.marginBottom="8px";d.style.borderRadius="4px";d.style.border="1px solid rgb(160, 160, 160)";d.style.width="206px";
+var f=document.createElement("div");f.style.marginLeft="4px";f.style.width="210px";f.style.height="24px";t.style.marginRight="6px";f.appendChild(t);e=document.createElement("span");e.style.maxWidth="100px";mxUtils.write(e,mxResources.get("portrait"));f.appendChild(e);E.style.marginLeft="10px";E.style.marginRight="6px";f.appendChild(E);var g=document.createElement("span");g.style.width="100px";mxUtils.write(g,mxResources.get("landscape"));f.appendChild(g);var l=document.createElement("div");l.style.marginLeft=
+"4px";l.style.width="210px";l.style.height="24px";var q=document.createElement("input");q.setAttribute("size","7");q.style.textAlign="right";l.appendChild(q);mxUtils.write(l," in x ");var z=document.createElement("input");z.setAttribute("size","7");z.style.textAlign="right";l.appendChild(z);mxUtils.write(l," in");f.style.display="none";l.style.display="none";for(var F={},C=PageSetupDialog.getFormats(),I=0;I<C.length;I++){var G=C[I];F[G.key]=G;var Z=document.createElement("option");Z.setAttribute("value",
+G.key);mxUtils.write(Z,G.title);d.appendChild(Z)}var ca=!1;D();b.appendChild(d);mxUtils.br(b);b.appendChild(f);b.appendChild(l);var ba=k,Y=function(O,la){O=F[d.value];null!=O.format?(q.value=O.format.width/100,z.value=O.format.height/100,l.style.display="none",f.style.display=""):(f.style.display="none",l.style.display="");O=parseFloat(q.value);if(isNaN(O)||0>=O)q.value=k.width/100;O=parseFloat(z.value);if(isNaN(O)||0>=O)z.value=k.height/100;O=new mxRectangle(0,0,Math.floor(100*parseFloat(q.value)),
+Math.floor(100*parseFloat(z.value)));"custom"!=d.value&&E.checked&&(O=new mxRectangle(0,0,O.height,O.width));la&&ca||O.width==ba.width&&O.height==ba.height||(ba=O,null!=n&&n(ba))};mxEvent.addListener(e,"click",function(O){t.checked=!0;Y(O);mxEvent.consume(O)});mxEvent.addListener(g,"click",function(O){E.checked=!0;Y(O);mxEvent.consume(O)});mxEvent.addListener(q,"blur",Y);mxEvent.addListener(q,"click",Y);mxEvent.addListener(z,"blur",Y);mxEvent.addListener(z,"click",Y);mxEvent.addListener(E,"change",
+Y);mxEvent.addListener(t,"change",Y);mxEvent.addListener(d,"change",function(O){ca="custom"==d.value;Y(O,!0)});Y();return{set:function(O){k=O;D(null,null,!0)},get:function(){return ba},widthInput:q,heightInput:z}};
PageSetupDialog.getFormats=function(){return[{key:"letter",title:'US-Letter (8,5" x 11")',format:mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},{key:"legal",title:'US-Legal (8,5" x 14")',format:new mxRectangle(0,0,850,1400)},{key:"tabloid",title:'US-Tabloid (11" x 17")',format:new mxRectangle(0,0,1100,1700)},{key:"executive",title:'US-Executive (7" x 10")',format:new mxRectangle(0,0,700,1E3)},{key:"a0",title:"A0 (841 mm x 1189 mm)",format:new mxRectangle(0,0,3300,4681)},{key:"a1",title:"A1 (594 mm x 841 mm)",
format:new mxRectangle(0,0,2339,3300)},{key:"a2",title:"A2 (420 mm x 594 mm)",format:new mxRectangle(0,0,1654,2336)},{key:"a3",title:"A3 (297 mm x 420 mm)",format:new mxRectangle(0,0,1169,1654)},{key:"a4",title:"A4 (210 mm x 297 mm)",format:mxConstants.PAGE_FORMAT_A4_PORTRAIT},{key:"a5",title:"A5 (148 mm x 210 mm)",format:new mxRectangle(0,0,583,827)},{key:"a6",title:"A6 (105 mm x 148 mm)",format:new mxRectangle(0,0,413,583)},{key:"a7",title:"A7 (74 mm x 105 mm)",format:new mxRectangle(0,0,291,413)},
{key:"b4",title:"B4 (250 mm x 353 mm)",format:new mxRectangle(0,0,980,1390)},{key:"b5",title:"B5 (176 mm x 250 mm)",format:new mxRectangle(0,0,690,980)},{key:"16-9",title:"16:9 (1600 x 900)",format:new mxRectangle(0,0,900,1600)},{key:"16-10",title:"16:10 (1920 x 1200)",format:new mxRectangle(0,0,1200,1920)},{key:"4-3",title:"4:3 (1600 x 1200)",format:new mxRectangle(0,0,1200,1600)},{key:"custom",title:mxResources.get("custom"),format:null}]};
-var FilenameDialog=function(b,e,k,n,D,t,E,d,f,g,m,q,z){f=null!=f?f:!0;var F=document.createElement("table"),C=document.createElement("tbody");F.style.position="absolute";F.style.top="30px";F.style.left="20px";var I=document.createElement("tr");var G=document.createElement("td");G.style.textOverflow="ellipsis";G.style.textAlign="right";G.style.maxWidth=(z?z+15:100)+"px";G.style.fontSize="10pt";G.style.width=(z?z:84)+"px";mxUtils.write(G,(D||mxResources.get("filename"))+":");I.appendChild(G);var Z=
-document.createElement("input");Z.setAttribute("value",e||"");Z.style.marginLeft="4px";Z.style.width=null!=q?q+"px":"180px";var fa=mxUtils.button(k,function(){if(null==t||t(Z.value))f&&b.hideDialog(),n(Z.value)});fa.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var ba=F.parentNode;if(null!=ba){var Y=null;mxEvent.addListener(ba,"dragleave",
-function(pa){null!=Y&&(Y.style.backgroundColor="",Y=null);pa.stopPropagation();pa.preventDefault()});mxEvent.addListener(ba,"dragover",mxUtils.bind(this,function(pa){null==Y&&(!mxClient.IS_IE||10<document.documentMode)&&(Y=Z,Y.style.backgroundColor="#ebf2f9");pa.stopPropagation();pa.preventDefault()}));mxEvent.addListener(ba,"drop",mxUtils.bind(this,function(pa){null!=Y&&(Y.style.backgroundColor="",Y=null);0<=mxUtils.indexOf(pa.dataTransfer.types,"text/uri-list")&&(Z.value=decodeURIComponent(pa.dataTransfer.getData("text/uri-list")),
-fa.click());pa.stopPropagation();pa.preventDefault()}))}}};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(Z);I.appendChild(G);if(null!=D||null==E)C.appendChild(I),null!=m&&(G.appendChild(FilenameDialog.createTypeHint(b,Z,m)),null!=b.editor.diagramFileTypes&&(I=document.createElement("tr"),G=document.createElement("td"),G.style.textOverflow="ellipsis",G.style.textAlign="right",G.style.maxWidth="100px",G.style.fontSize="10pt",G.style.width="84px",mxUtils.write(G,mxResources.get("type")+
+var FilenameDialog=function(b,e,k,n,D,t,E,d,f,g,l,q,z){f=null!=f?f:!0;var F=document.createElement("table"),C=document.createElement("tbody");F.style.position="absolute";F.style.top="30px";F.style.left="20px";var I=document.createElement("tr");var G=document.createElement("td");G.style.textOverflow="ellipsis";G.style.textAlign="right";G.style.maxWidth=(z?z+15:100)+"px";G.style.fontSize="10pt";G.style.width=(z?z:84)+"px";mxUtils.write(G,(D||mxResources.get("filename"))+":");I.appendChild(G);var Z=
+document.createElement("input");Z.setAttribute("value",e||"");Z.style.marginLeft="4px";Z.style.width=null!=q?q+"px":"180px";var ca=mxUtils.button(k,function(){if(null==t||t(Z.value))f&&b.hideDialog(),n(Z.value)});ca.className="geBtn gePrimaryBtn";this.init=function(){if(null!=D||null==E)if(Z.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Z.select():document.execCommand("selectAll",!1,null),Graph.fileSupport){var ba=F.parentNode;if(null!=ba){var Y=null;mxEvent.addListener(ba,"dragleave",
+function(O){null!=Y&&(Y.style.backgroundColor="",Y=null);O.stopPropagation();O.preventDefault()});mxEvent.addListener(ba,"dragover",mxUtils.bind(this,function(O){null==Y&&(!mxClient.IS_IE||10<document.documentMode)&&(Y=Z,Y.style.backgroundColor="#ebf2f9");O.stopPropagation();O.preventDefault()}));mxEvent.addListener(ba,"drop",mxUtils.bind(this,function(O){null!=Y&&(Y.style.backgroundColor="",Y=null);0<=mxUtils.indexOf(O.dataTransfer.types,"text/uri-list")&&(Z.value=decodeURIComponent(O.dataTransfer.getData("text/uri-list")),
+ca.click());O.stopPropagation();O.preventDefault()}))}}};G=document.createElement("td");G.style.whiteSpace="nowrap";G.appendChild(Z);I.appendChild(G);if(null!=D||null==E)C.appendChild(I),null!=l&&(G.appendChild(FilenameDialog.createTypeHint(b,Z,l)),null!=b.editor.diagramFileTypes&&(I=document.createElement("tr"),G=document.createElement("td"),G.style.textOverflow="ellipsis",G.style.textAlign="right",G.style.maxWidth="100px",G.style.fontSize="10pt",G.style.width="84px",mxUtils.write(G,mxResources.get("type")+
":"),I.appendChild(G),G=document.createElement("td"),G.style.whiteSpace="nowrap",I.appendChild(G),e=FilenameDialog.createFileTypes(b,Z,b.editor.diagramFileTypes),e.style.marginLeft="4px",e.style.width="198px",G.appendChild(e),Z.style.width=null!=q?q-40+"px":"190px",I.appendChild(G),C.appendChild(I)));null!=E&&(I=document.createElement("tr"),G=document.createElement("td"),G.colSpan=2,G.appendChild(E),I.appendChild(G),C.appendChild(I));I=document.createElement("tr");G=document.createElement("td");G.colSpan=
-2;G.style.paddingTop=null!=m?"12px":"20px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");m=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});m.className="geBtn";b.editor.cancelFirst&&G.appendChild(m);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",G.appendChild(q));mxEvent.addListener(Z,"keypress",function(ba){13==ba.keyCode&&fa.click()});G.appendChild(fa);b.editor.cancelFirst||G.appendChild(m);
+2;G.style.paddingTop=null!=l?"12px":"20px";G.style.whiteSpace="nowrap";G.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){b.hideDialog();null!=g&&g()});l.className="geBtn";b.editor.cancelFirst&&G.appendChild(l);null!=d&&(q=mxUtils.button(mxResources.get("help"),function(){b.editor.graph.openLink(d)}),q.className="geBtn",G.appendChild(q));mxEvent.addListener(Z,"keypress",function(ba){13==ba.keyCode&&ca.click()});G.appendChild(ca);b.editor.cancelFirst||G.appendChild(l);
I.appendChild(G);C.appendChild(I);F.appendChild(C);this.container=F};FilenameDialog.filenameHelpLink=null;
FilenameDialog.createTypeHint=function(b,e,k){var n=document.createElement("img");n.style.backgroundPosition="center bottom";n.style.backgroundRepeat="no-repeat";n.style.margin="2px 0 0 4px";n.style.verticalAlign="top";n.style.cursor="pointer";n.style.height="16px";n.style.width="16px";mxUtils.setOpacity(n,70);var D=function(){n.setAttribute("src",Editor.helpImage);n.setAttribute("title",mxResources.get("help"));for(var t=0;t<k.length;t++)if(0<k[t].ext.length&&e.value.toLowerCase().substring(e.value.length-
k[t].ext.length-1)=="."+k[t].ext){n.setAttribute("title",mxResources.get(k[t].title));break}};mxEvent.addListener(e,"keyup",D);mxEvent.addListener(e,"change",D);mxEvent.addListener(n,"click",function(t){var E=n.getAttribute("title");n.getAttribute("src")==Editor.helpImage?b.editor.graph.openLink(FilenameDialog.filenameHelpLink):""!=E&&b.showError(null,E,mxResources.get("help"),function(){b.editor.graph.openLink(FilenameDialog.filenameHelpLink)},null,mxResources.get("ok"),null,null,null,340,90);mxEvent.consume(t)});
@@ -2048,44 +2063,44 @@ document?(t=document.createEvent("HTMLEvents"),t.initEvent("change",!1,!0),e.dis
(function(){mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph;if(null!=E.container&&!E.transparentBackground){if(E.pageVisible){var d=this.getBackgroundPageBounds();if(null==this.backgroundPageShape){for(var f=E.container.firstChild;null!=f&&f.nodeType!=mxConstants.NODETYPE_ELEMENT;)f=f.nextSibling;null!=f&&(this.backgroundPageShape=this.createBackgroundPageShape(d),this.backgroundPageShape.scale=1,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=mxConstants.DIALECT_STRICTHTML,
this.backgroundPageShape.init(E.container),f.style.position="absolute",E.container.insertBefore(this.backgroundPageShape.node,f),this.backgroundPageShape.redraw(),this.backgroundPageShape.node.className="geBackgroundPage",mxEvent.addListener(this.backgroundPageShape.node,"dblclick",mxUtils.bind(this,function(g){E.dblClick(g)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(g){E.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){null!=
E.tooltipHandler&&E.tooltipHandler.isHideOnHover()&&E.tooltipHandler.hide();E.isMouseDown&&!mxEvent.isConsumed(g)&&E.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(g))}),mxUtils.bind(this,function(g){E.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(g))})))}else this.backgroundPageShape.scale=1,this.backgroundPageShape.bounds=d,this.backgroundPageShape.redraw()}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null);this.validateBackgroundStyles()}};
-mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,d=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,f=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",g="none",m="";if(E.isGridEnabled()||E.gridVisible){m=10;mxClient.IS_SVG?(g=unescape(encodeURIComponent(this.createSvgGrid(f))),g=window.btoa?btoa(g):Base64.encode(g,!0),g="url(data:image/svg+xml;base64,"+g+")",m=E.gridSize*this.scale*this.gridSteps):g="url("+this.gridImage+
-")";var q=f=0;null!=E.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);m=-Math.round(m-mxUtils.mod(this.translate.x*this.scale-f,m))+"px "+-Math.round(m-mxUtils.mod(this.translate.y*this.scale-q,m))+"px"}f=E.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=m,E.view.backgroundPageShape.node.style.backgroundImage=g,E.view.backgroundPageShape.node.style.backgroundColor=d,E.view.backgroundPageShape.node.style.borderColor=
-E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(E.container.className="geDiagramContainer",f.style.backgroundPosition=m,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(E){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],m=1;m<this.gridSteps;m++){var q=m*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
+mxGraphView.prototype.validateBackgroundStyles=function(){var E=this.graph,d=null==E.background||E.background==mxConstants.NONE?E.defaultPageBackgroundColor:E.background,f=null!=d&&this.gridColor!=d.toLowerCase()?this.gridColor:"#ffffff",g="none",l="";if(E.isGridEnabled()||E.gridVisible){l=10;mxClient.IS_SVG?(g=unescape(encodeURIComponent(this.createSvgGrid(f))),g=window.btoa?btoa(g):Base64.encode(g,!0),g="url(data:image/svg+xml;base64,"+g+")",l=E.gridSize*this.scale*this.gridSteps):g="url("+this.gridImage+
+")";var q=f=0;null!=E.view.backgroundPageShape&&(q=this.getBackgroundPageBounds(),f=1+q.x,q=1+q.y);l=-Math.round(l-mxUtils.mod(this.translate.x*this.scale-f,l))+"px "+-Math.round(l-mxUtils.mod(this.translate.y*this.scale-q,l))+"px"}f=E.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);null!=E.view.backgroundPageShape?(E.view.backgroundPageShape.node.style.backgroundPosition=l,E.view.backgroundPageShape.node.style.backgroundImage=g,E.view.backgroundPageShape.node.style.backgroundColor=d,E.view.backgroundPageShape.node.style.borderColor=
+E.defaultPageBorderColor,E.container.className="geDiagramContainer geDiagramBackdrop",f.style.backgroundImage="none",f.style.backgroundColor=""):(E.container.className="geDiagramContainer",f.style.backgroundPosition=l,f.style.backgroundColor=d,f.style.backgroundImage=g)};mxGraphView.prototype.createSvgGrid=function(E){for(var d=this.graph.gridSize*this.scale;d<this.minGridSize;)d*=2;for(var f=this.gridSteps*d,g=[],l=1;l<this.gridSteps;l++){var q=l*d;g.push("M 0 "+q+" L "+f+" "+q+" M "+q+" 0 L "+q+
" "+f)}return'<svg width="'+f+'" height="'+f+'" xmlns="'+mxConstants.NS_SVG+'"><defs><pattern id="grid" width="'+f+'" height="'+f+'" patternUnits="userSpaceOnUse"><path d="'+g.join(" ")+'" fill="none" stroke="'+E+'" opacity="0.2" stroke-width="1"/><path d="M '+f+" 0 L 0 0 0 "+f+'" fill="none" stroke="'+E+'" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(#grid)"/></svg>'};var b=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){b.apply(this,arguments);
-if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps;g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+E,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";f.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.view.scale,m=this.view.translate,q=this.pageFormat,z=g*this.pageScale,F=this.view.getBackgroundPageBounds();
-d=F.width;f=F.height;var C=new mxRectangle(g*m.x,g*m.y,q.width*z,q.height*z),I=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,Z=F.x+d,fa=F.y+f;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(ba){if(null!=ba){for(var Y=ba==this.horizontalPageBreaks?I:G,pa=0;pa<=Y;pa++){var O=ba==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
-Math.round(F.y+(pa+1)*C.height)),new mxPoint(Math.round(Z),Math.round(F.y+(pa+1)*C.height))]:[new mxPoint(Math.round(F.x+(pa+1)*C.width),Math.round(F.y)),new mxPoint(Math.round(F.x+(pa+1)*C.width),Math.round(fa))];null!=ba[pa]?(ba[pa].points=O,ba[pa].redraw()):(O=new mxPolyline(O,this.pageBreakColor),O.dialect=this.dialect,O.isDashed=this.pageBreakDashed,O.pointerEvents=!1,O.init(this.view.backgroundPane),O.redraw(),ba[pa]=O)}for(pa=Y;pa<ba.length;pa++)ba[pa].destroy();ba.splice(Y,ba.length-Y)}});
-E(this.horizontalPageBreaks);E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var m=this.graph.getCellGeometry(d[g]);if(null!=m&&m.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=
-function(){var E=k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),d=0<E.width?E.x/this.scale-this.translate.x:0,f=0<E.height?E.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
-m=this.graph.pageScale,q=g.width*m;g=g.height*m;m=Math.floor(Math.min(0,d)/q);var z=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+m*q),this.scale*(this.translate.y+z*g),this.scale*(Math.ceil(Math.max(1,d+E.width/this.scale)/q)-m)*q,this.scale*(Math.ceil(Math.max(1,f+E.height/this.scale)/g)-z)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
-this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,d,f,g,m,q){var z=D.apply(this,arguments);null==q||q||mxEvent.addListener(z,"mousedown",function(F){mxEvent.consume(F)});return z};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
-function(E,d,f){var g=this.graph.model.getParent(E);if(d){var m=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);m=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=m&&m.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(m=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))m=g,this.graph.isTable(m)||(m=this.graph.model.getParent(m)),m=!this.graph.selectionCellsHandler.isHandled(m)||this.graph.isCellSelected(m)&&this.graph.isToggleEvent(f.getEvent())||
-this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return m};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),m=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);m=m||q;if(q||!m&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var N=D.apply(this,arguments),P=this.backgroundImage;if(null!=P&&null!=P.width&&null!=P.height){var aa=this.view.translate,la=this.view.scale;N=mxRectangle.fromRectangle(N);N.add(new mxRectangle((aa.x+P.x)*la,(aa.y+P.y)*la,P.width*la,P.height*la))}return N};n.useCssTransforms&&(this.lazyZoomDelay=
-0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(N,P){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
-n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(N){return!mxEvent.isPopupTrigger(N.getEvent())});this.actions=new Actions(this);this.menus=
+if(null!=this.shiftPreview1){var f=this.view.canvas;null!=f.ownerSVGElement&&(f=f.ownerSVGElement);var g=this.gridSize*this.view.scale*this.view.gridSteps;g=-Math.round(g-mxUtils.mod(this.view.translate.x*this.view.scale+E,g))+"px "+-Math.round(g-mxUtils.mod(this.view.translate.y*this.view.scale+d,g))+"px";f.style.backgroundPosition=g}};mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.view.scale,l=this.view.translate,q=this.pageFormat,z=g*this.pageScale,F=this.view.getBackgroundPageBounds();
+d=F.width;f=F.height;var C=new mxRectangle(g*l.x,g*l.y,q.width*z,q.height*z),I=(E=E&&Math.min(C.width,C.height)>this.minPageBreakDist)?Math.ceil(f/C.height)-1:0,G=E?Math.ceil(d/C.width)-1:0,Z=F.x+d,ca=F.y+f;null==this.horizontalPageBreaks&&0<I&&(this.horizontalPageBreaks=[]);null==this.verticalPageBreaks&&0<G&&(this.verticalPageBreaks=[]);E=mxUtils.bind(this,function(ba){if(null!=ba){for(var Y=ba==this.horizontalPageBreaks?I:G,O=0;O<=Y;O++){var la=ba==this.horizontalPageBreaks?[new mxPoint(Math.round(F.x),
+Math.round(F.y+(O+1)*C.height)),new mxPoint(Math.round(Z),Math.round(F.y+(O+1)*C.height))]:[new mxPoint(Math.round(F.x+(O+1)*C.width),Math.round(F.y)),new mxPoint(Math.round(F.x+(O+1)*C.width),Math.round(ca))];null!=ba[O]?(ba[O].points=la,ba[O].redraw()):(la=new mxPolyline(la,this.pageBreakColor),la.dialect=this.dialect,la.isDashed=this.pageBreakDashed,la.pointerEvents=!1,la.init(this.view.backgroundPane),la.redraw(),ba[O]=la)}for(O=Y;O<ba.length;O++)ba[O].destroy();ba.splice(Y,ba.length-Y)}});E(this.horizontalPageBreaks);
+E(this.verticalPageBreaks)};var e=mxGraphHandler.prototype.shouldRemoveCellsFromParent;mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(E,d,f){for(var g=0;g<d.length;g++){if(this.graph.isTableCell(d[g])||this.graph.isTableRow(d[g]))return!1;if(this.graph.getModel().isVertex(d[g])){var l=this.graph.getCellGeometry(d[g]);if(null!=l&&l.relative)return!1}}return e.apply(this,arguments)};var k=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var E=
+k.apply(this,arguments);E.intersects=mxUtils.bind(this,function(d,f){return this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(E,arguments)});return E};mxGraphView.prototype.createBackgroundPageShape=function(E){return new mxRectangleShape(E,"#ffffff",this.graph.defaultPageBorderColor)};mxGraphView.prototype.getBackgroundPageBounds=function(){var E=this.getGraphBounds(),d=0<E.width?E.x/this.scale-this.translate.x:0,f=0<E.height?E.y/this.scale-this.translate.y:0,g=this.graph.pageFormat,
+l=this.graph.pageScale,q=g.width*l;g=g.height*l;l=Math.floor(Math.min(0,d)/q);var z=Math.floor(Math.min(0,f)/g);return new mxRectangle(this.scale*(this.translate.x+l*q),this.scale*(this.translate.y+z*g),this.scale*(Math.ceil(Math.max(1,d+E.width/this.scale)/q)-l)*q,this.scale*(Math.ceil(Math.max(1,f+E.height/this.scale)/g)-z)*g)};var n=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(E,d){n.apply(this,arguments);this.dialect==mxConstants.DIALECT_SVG||null==this.view.backgroundPageShape||
+this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container)||(this.view.backgroundPageShape.node.style.marginLeft=E+"px",this.view.backgroundPageShape.node.style.marginTop=d+"px")};var D=mxPopupMenu.prototype.addItem;mxPopupMenu.prototype.addItem=function(E,d,f,g,l,q){var z=D.apply(this,arguments);null==q||q||mxEvent.addListener(z,"mousedown",function(F){mxEvent.consume(F)});return z};var t=mxGraphHandler.prototype.isPropagateSelectionCell;mxGraphHandler.prototype.isPropagateSelectionCell=
+function(E,d,f){var g=this.graph.model.getParent(E);if(d){var l=this.graph.model.isEdge(E)?null:this.graph.getCellGeometry(E);l=!this.graph.model.isEdge(g)&&!this.graph.isSiblingSelected(E)&&(null!=l&&l.relative||!this.graph.isContainer(g)||this.graph.isPart(E))}else if(l=t.apply(this,arguments),this.graph.isTableCell(E)||this.graph.isTableRow(E))l=g,this.graph.isTable(l)||(l=this.graph.model.getParent(l)),l=!this.graph.selectionCellsHandler.isHandled(l)||this.graph.isCellSelected(l)&&this.graph.isToggleEvent(f.getEvent())||
+this.graph.isCellSelected(E)&&!this.graph.isToggleEvent(f.getEvent())||this.graph.isTableCell(E)&&this.graph.isCellSelected(g);return l};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(E){E=E.getCell();for(var d=this.graph.getModel(),f=d.getParent(E),g=this.graph.view.getState(f),l=this.graph.isCellSelected(E);null!=g&&(d.isVertex(f)||d.isEdge(f));){var q=this.graph.isCellSelected(f);l=l||q;if(q||!l&&(this.graph.isTableCell(E)||this.graph.isTableRow(E)))E=f;f=d.getParent(f)}return E}})();EditorUi=function(b,e,k){mxEventSource.call(this);this.destroyFunctions=[];this.editor=b||new Editor;this.container=e||document.body;var n=this.editor.graph;n.lightbox=k;var D=n.getGraphBounds;n.getGraphBounds=function(){var L=D.apply(this,arguments),S=this.backgroundImage;if(null!=S&&null!=S.width&&null!=S.height){var ja=this.view.translate,ma=this.view.scale;L=mxRectangle.fromRectangle(L);L.add(new mxRectangle((ja.x+S.x)*ma,(ja.y+S.y)*ma,S.width*ma,S.height*ma))}return L};n.useCssTransforms&&(this.lazyZoomDelay=
+0);mxClient.IS_SVG?mxPopupMenu.prototype.submenuImage="data:image/gif;base64,R0lGODlhCQAJAIAAAP///zMzMyH5BAEAAAAALAAAAAAJAAkAAAIPhI8WebHsHopSOVgb26AAADs=":(new Image).src=mxPopupMenu.prototype.submenuImage;mxClient.IS_SVG||null==mxConnectionHandler.prototype.connectImage||((new Image).src=mxConnectionHandler.prototype.connectImage.src);this.selectionStateListener=mxUtils.bind(this,function(L,S){this.clearSelectionState()});n.getSelectionModel().addListener(mxEvent.CHANGE,this.selectionStateListener);
+n.getModel().addListener(mxEvent.CHANGE,this.selectionStateListener);n.addListener(mxEvent.EDITING_STARTED,this.selectionStateListener);n.addListener(mxEvent.EDITING_STOPPED,this.selectionStateListener);n.getView().addListener("unitChanged",this.selectionStateListener);this.editor.chromeless&&!this.editor.editable&&(this.footerHeight=0,n.isEnabled=function(){return!1},n.panningHandler.isForcePanningEvent=function(L){return!mxEvent.isPopupTrigger(L.getEvent())});this.actions=new Actions(this);this.menus=
this.createMenus();if(!n.standalone){var t="rounded shadow glass dashed dashPattern labelBackgroundColor labelBorderColor comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle pointerEvents".split(" "),E="shape edgeStyle curved rounded elbow jumpStyle jumpSize comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification sketchStyle".split(" "),
-d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),f=!1,g=!1;this.setDefaultStyle=function(N){try{var P=n.getCellStyle(N,!1),aa=[],la=[],u;for(u in P)aa.push(P[u]),la.push(u);n.getModel().isEdge(N)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",la,"values",aa,"cells",[N]));n.getModel().isEdge(N)?g=!0:f=!0}catch(H){this.handleError(H)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=
-mxUtils.clone(n.defaultEdgeStyle);n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);f=g=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var m=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<m.length;e++)0>mxUtils.indexOf(t,m[e])&&t.push(m[e]);var q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),z=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],
-["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<z.length;e++)for(k=0;k<z[e].length;k++)t.push(z[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var F=function(N,P,aa,la,u,H,Q){la=null!=la?la:n.currentVertexStyle;u=null!=u?u:n.currentEdgeStyle;H=null!=H?H:!0;aa=null!=aa?aa:n.getModel();if(Q){Q=[];for(var X=0;X<N.length;X++)Q=Q.concat(aa.getDescendants(N[X]));N=Q}aa.beginUpdate();try{for(X=0;X<N.length;X++){var R=
-N[X];if(P)var ca=["fontSize","fontFamily","fontColor"];else{var ea=aa.getStyle(R),da=null!=ea?ea.split(";"):[];ca=t.slice();for(var qa=0;qa<da.length;qa++){var va=da[qa],ua=va.indexOf("=");if(0<=ua){var Aa=va.substring(0,ua),za=mxUtils.indexOf(ca,Aa);0<=za&&ca.splice(za,1);for(Q=0;Q<z.length;Q++){var Ca=z[Q];if(0<=mxUtils.indexOf(Ca,Aa))for(var sa=0;sa<Ca.length;sa++){var Va=mxUtils.indexOf(ca,Ca[sa]);0<=Va&&ca.splice(Va,1)}}}}}var Ua=aa.isEdge(R);Q=Ua?u:la;var Ra=aa.getStyle(R);for(qa=0;qa<ca.length;qa++){Aa=
-ca[qa];var Za=Q[Aa];null!=Za&&"edgeStyle"!=Aa&&("shape"!=Aa||Ua)&&(!Ua||H||0>mxUtils.indexOf(d,Aa))&&(Ra=mxUtils.setStyle(Ra,Aa,Za))}Editor.simpleLabels&&(Ra=mxUtils.setStyle(mxUtils.setStyle(Ra,"html",null),"whiteSpace",null));aa.setStyle(R,Ra)}}finally{aa.endUpdate()}return N};n.addListener("cellsInserted",function(N,P){F(P.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(N,P){F(P.getProperty("cells"),!0)});this.insertHandler=F;this.createDivs();this.createUi();
-this.refresh();var C=mxUtils.bind(this,function(N){null==N&&(N=window.event);return n.isEditing()||null!=N&&this.isSelectionAllowed(N)});this.container==document.body&&(this.menubarContainer.onselectstart=C,this.menubarContainer.onmousedown=C,this.toolbarContainer.onselectstart=C,this.toolbarContainer.onmousedown=C,this.diagramContainer.onselectstart=C,this.diagramContainer.onmousedown=C,this.sidebarContainer.onselectstart=C,this.sidebarContainer.onmousedown=C,this.formatContainer.onselectstart=C,
-this.formatContainer.onmousedown=C,this.footerContainer.onselectstart=C,this.footerContainer.onmousedown=C,null!=this.tabContainer&&(this.tabContainer.onselectstart=C));!this.editor.chromeless||this.editor.editable?(e=function(N){if(null!=N){var P=mxEvent.getSource(N);if("A"==P.nodeName)for(;null!=P;){if("geHint"==P.className)return!0;P=P.parentNode}}return C(N)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
-e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var I=n.graphHandler.start;n.graphHandler.start=function(){null!=ma.hoverIcons&&ma.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(N){var P=
-mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(N)-P.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(N)-P.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var G=!1,Z=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(N,P){return G||Z.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(N){32!=N.which||n.isEditing()?mxEvent.isConsumed(N)||
-27!=N.keyCode||this.hideDialog(null,!0):(G=!0,this.hoverIcons.reset(),n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(N)!=n.container||mxEvent.consume(N))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(N){n.container.style.cursor="";G=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var fa=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(N){return fa.apply(this,arguments)||G||
-mxEvent.isMouseEvent(N.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(N.getEvent()))&&(!mxEvent.isControlDown(N.getEvent())&&mxEvent.isRightMouseButton(N.getEvent())||mxEvent.isMiddleMouseButton(N.getEvent()))};var ba=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(N){return ba.apply(this,arguments)||13==N.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(N)||mxClient.IS_MAC&&mxEvent.isMetaDown(N)||mxClient.IS_SF&&mxEvent.isShiftDown(N))};var Y=n.isZoomWheelEvent;
-n.isZoomWheelEvent=function(){return G||Y.apply(this,arguments)};var pa=!1,O=null,W=null,ha=null,U=mxUtils.bind(this,function(){if(null!=this.toolbar&&pa!=n.cellEditor.isContentEditing()){for(var N=this.toolbar.container.firstChild,P=[];null!=N;){var aa=N.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,N)&&(N.parentNode.removeChild(N),P.push(N));N=aa}N=this.toolbar.fontMenu;aa=this.toolbar.sizeMenu;if(null==ha)this.toolbar.createTextToolbar();else{for(var la=0;la<ha.length;la++)this.toolbar.container.appendChild(ha[la]);
-this.toolbar.fontMenu=O;this.toolbar.sizeMenu=W}pa=n.cellEditor.isContentEditing();O=N;W=aa;ha=P}}),ma=this,T=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){T.apply(this,arguments);U();if(n.cellEditor.isContentEditing()){var N=!1,P=function(){N||(N=!0,window.setTimeout(function(){var aa=n.getSelectedEditingElement();null!=aa&&(aa=mxUtils.getCurrentStyle(aa),null!=aa&&null!=ma.toolbar&&(ma.toolbar.setFontName(Graph.stripQuotes(aa.fontFamily)),ma.toolbar.setFontSize(parseInt(aa.fontSize))));
-N=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",P);mxEvent.addListener(n.cellEditor.textarea,"touchend",P);mxEvent.addListener(n.cellEditor.textarea,"mouseup",P);mxEvent.addListener(n.cellEditor.textarea,"keyup",P);P()}};var M=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(N,P){try{M.apply(this,arguments),U()}catch(aa){ma.handleError(aa)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(N){}var ia=
-n.fireMouseEvent;n.fireMouseEvent=function(N,P,aa){N==mxEvent.MOUSE_DOWN&&this.container.focus();ia.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(N,P,aa){this.menus.createPopupMenu(N,P,aa)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(N){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,
-function(N,P){var aa=[P.getProperty("cell")];P.getProperty("terminalInserted")&&(aa.push(P.getProperty("terminal")),window.setTimeout(function(){null!=ma.hoverIcons&&ma.hoverIcons.update(n.view.getState(aa[aa.length-1]))},0));F(aa)});this.addListener("styleChanged",mxUtils.bind(this,function(N,P){var aa=P.getProperty("cells"),la=N=!1;if(0<aa.length)for(var u=0;u<aa.length&&(N=n.getModel().isVertex(aa[u])||N,!(la=n.getModel().isEdge(aa[u])||la)||!N);u++);else la=N=!0;N=N&&!f;la=la&&!g;aa=P.getProperty("keys");
-P=P.getProperty("values");for(u=0;u<aa.length;u++){var H=0<=mxUtils.indexOf(m,aa[u]);if("strokeColor"!=aa[u]||null!=P[u]&&"none"!=P[u])if(0<=mxUtils.indexOf(E,aa[u]))la||0<=mxUtils.indexOf(q,aa[u])?null==P[u]?delete n.currentEdgeStyle[aa[u]]:n.currentEdgeStyle[aa[u]]=P[u]:N&&0<=mxUtils.indexOf(t,aa[u])&&(null==P[u]?delete n.currentVertexStyle[aa[u]]:n.currentVertexStyle[aa[u]]=P[u]);else if(0<=mxUtils.indexOf(t,aa[u])){if(N||H)null==P[u]?delete n.currentVertexStyle[aa[u]]:n.currentVertexStyle[aa[u]]=
-P[u];if(la||H||0<=mxUtils.indexOf(q,aa[u]))null==P[u]?delete n.currentEdgeStyle[aa[u]]:n.currentEdgeStyle[aa[u]]=P[u]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?
+d="curved sourcePerimeterSpacing targetPerimeterSpacing startArrow startFill startSize endArrow endFill endSize".split(" "),f=!1,g=!1;this.setDefaultStyle=function(L){try{var S=n.getCellStyle(L,!1),ja=[],ma=[],u;for(u in S)ja.push(S[u]),ma.push(u);n.getModel().isEdge(L)?n.currentEdgeStyle={}:n.currentVertexStyle={};this.fireEvent(new mxEventObject("styleChanged","keys",ma,"values",ja,"cells",[L]));n.getModel().isEdge(L)?g=!0:f=!0}catch(H){this.handleError(H)}};this.clearDefaultStyle=function(){n.currentEdgeStyle=
+mxUtils.clone(n.defaultEdgeStyle);n.currentVertexStyle=mxUtils.clone(n.defaultVertexStyle);f=g=!1;this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]))};var l=["fontFamily","fontSource","fontSize","fontColor"];for(e=0;e<l.length;e++)0>mxUtils.indexOf(t,l[e])&&t.push(l[e]);var q="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),z=[["startArrow","startFill","endArrow","endFill"],["startSize","endSize"],["sourcePerimeterSpacing","targetPerimeterSpacing"],
+["strokeColor","strokeWidth"],["fillColor","gradientColor","gradientDirection"],["opacity"],["html"]];for(e=0;e<z.length;e++)for(k=0;k<z[e].length;k++)t.push(z[e][k]);for(e=0;e<E.length;e++)0>mxUtils.indexOf(t,E[e])&&t.push(E[e]);var F=function(L,S,ja,ma,u,H,P){ma=null!=ma?ma:n.currentVertexStyle;u=null!=u?u:n.currentEdgeStyle;H=null!=H?H:!0;ja=null!=ja?ja:n.getModel();if(P){P=[];for(var V=0;V<L.length;V++)P=P.concat(ja.getDescendants(L[V]));L=P}ja.beginUpdate();try{for(V=0;V<L.length;V++){var Q=
+L[V];if(S)var da=["fontSize","fontFamily","fontColor"];else{var ea=ja.getStyle(Q),fa=null!=ea?ea.split(";"):[];da=t.slice();for(var pa=0;pa<fa.length;pa++){var ua=fa[pa],qa=ua.indexOf("=");if(0<=qa){var Da=ua.substring(0,qa),Aa=mxUtils.indexOf(da,Da);0<=Aa&&da.splice(Aa,1);for(P=0;P<z.length;P++){var Fa=z[P];if(0<=mxUtils.indexOf(Fa,Da))for(var ta=0;ta<Fa.length;ta++){var Sa=mxUtils.indexOf(da,Fa[ta]);0<=Sa&&da.splice(Sa,1)}}}}}var Ra=ja.isEdge(Q);P=Ra?u:ma;var Oa=ja.getStyle(Q);for(pa=0;pa<da.length;pa++){Da=
+da[pa];var Va=P[Da];null!=Va&&"edgeStyle"!=Da&&("shape"!=Da||Ra)&&(!Ra||H||0>mxUtils.indexOf(d,Da))&&(Oa=mxUtils.setStyle(Oa,Da,Va))}Editor.simpleLabels&&(Oa=mxUtils.setStyle(mxUtils.setStyle(Oa,"html",null),"whiteSpace",null));ja.setStyle(Q,Oa)}}finally{ja.endUpdate()}return L};n.addListener("cellsInserted",function(L,S){F(S.getProperty("cells"),null,null,null,null,!0,!0)});n.addListener("textInserted",function(L,S){F(S.getProperty("cells"),!0)});this.insertHandler=F;this.createDivs();this.createUi();
+this.refresh();var C=mxUtils.bind(this,function(L){null==L&&(L=window.event);return n.isEditing()||null!=L&&this.isSelectionAllowed(L)});this.container==document.body&&(this.menubarContainer.onselectstart=C,this.menubarContainer.onmousedown=C,this.toolbarContainer.onselectstart=C,this.toolbarContainer.onmousedown=C,this.diagramContainer.onselectstart=C,this.diagramContainer.onmousedown=C,this.sidebarContainer.onselectstart=C,this.sidebarContainer.onmousedown=C,this.formatContainer.onselectstart=C,
+this.formatContainer.onmousedown=C,this.footerContainer.onselectstart=C,this.footerContainer.onmousedown=C,null!=this.tabContainer&&(this.tabContainer.onselectstart=C));!this.editor.chromeless||this.editor.editable?(e=function(L){if(null!=L){var S=mxEvent.getSource(L);if("A"==S.nodeName)for(;null!=S;){if("geHint"==S.className)return!0;S=S.parentNode}}return C(L)},mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?mxEvent.addListener(this.diagramContainer,"contextmenu",
+e):this.diagramContainer.oncontextmenu=e):n.panningHandler.usePopupTrigger=!1;n.init(this.diagramContainer);mxClient.IS_SVG&&null!=n.view.getDrawPane()&&(e=n.view.getDrawPane().ownerSVGElement,null!=e&&(e.style.position="absolute"));this.hoverIcons=this.createHoverIcons();if(null!=n.graphHandler){var I=n.graphHandler.start;n.graphHandler.start=function(){null!=R.hoverIcons&&R.hoverIcons.reset();I.apply(this,arguments)}}mxEvent.addListener(this.diagramContainer,"mousemove",mxUtils.bind(this,function(L){var S=
+mxUtils.getOffset(this.diagramContainer);0<mxEvent.getClientX(L)-S.x-this.diagramContainer.clientWidth||0<mxEvent.getClientY(L)-S.y-this.diagramContainer.clientHeight?this.diagramContainer.setAttribute("title",mxResources.get("panTooltip")):this.diagramContainer.removeAttribute("title")}));var G=!1,Z=this.hoverIcons.isResetEvent;this.hoverIcons.isResetEvent=function(L,S){return G||Z.apply(this,arguments)};this.keydownHandler=mxUtils.bind(this,function(L){32!=L.which||n.isEditing()?mxEvent.isConsumed(L)||
+27!=L.keyCode||this.hideDialog(null,!0):(G=!0,this.hoverIcons.reset(),n.container.style.cursor="move",n.isEditing()||mxEvent.getSource(L)!=n.container||mxEvent.consume(L))});mxEvent.addListener(document,"keydown",this.keydownHandler);this.keyupHandler=mxUtils.bind(this,function(L){n.container.style.cursor="";G=!1});mxEvent.addListener(document,"keyup",this.keyupHandler);var ca=n.panningHandler.isForcePanningEvent;n.panningHandler.isForcePanningEvent=function(L){return ca.apply(this,arguments)||G||
+mxEvent.isMouseEvent(L.getEvent())&&(this.usePopupTrigger||!mxEvent.isPopupTrigger(L.getEvent()))&&(!mxEvent.isControlDown(L.getEvent())&&mxEvent.isRightMouseButton(L.getEvent())||mxEvent.isMiddleMouseButton(L.getEvent()))};var ba=n.cellEditor.isStopEditingEvent;n.cellEditor.isStopEditingEvent=function(L){return ba.apply(this,arguments)||13==L.keyCode&&(!mxClient.IS_SF&&mxEvent.isControlDown(L)||mxClient.IS_MAC&&mxEvent.isMetaDown(L)||mxClient.IS_SF&&mxEvent.isShiftDown(L))};var Y=n.isZoomWheelEvent;
+n.isZoomWheelEvent=function(){return G||Y.apply(this,arguments)};var O=!1,la=null,aa=null,ia=null,X=mxUtils.bind(this,function(){if(null!=this.toolbar&&O!=n.cellEditor.isContentEditing()){for(var L=this.toolbar.container.firstChild,S=[];null!=L;){var ja=L.nextSibling;0>mxUtils.indexOf(this.toolbar.staticElements,L)&&(L.parentNode.removeChild(L),S.push(L));L=ja}L=this.toolbar.fontMenu;ja=this.toolbar.sizeMenu;if(null==ia)this.toolbar.createTextToolbar();else{for(var ma=0;ma<ia.length;ma++)this.toolbar.container.appendChild(ia[ma]);
+this.toolbar.fontMenu=la;this.toolbar.sizeMenu=aa}O=n.cellEditor.isContentEditing();la=L;aa=ja;ia=S}}),R=this,sa=n.cellEditor.startEditing;n.cellEditor.startEditing=function(){sa.apply(this,arguments);X();if(n.cellEditor.isContentEditing()){var L=!1,S=function(){L||(L=!0,window.setTimeout(function(){var ja=n.getSelectedEditingElement();null!=ja&&(ja=mxUtils.getCurrentStyle(ja),null!=ja&&null!=R.toolbar&&(R.toolbar.setFontName(Graph.stripQuotes(ja.fontFamily)),R.toolbar.setFontSize(parseInt(ja.fontSize))));
+L=!1},0))};mxEvent.addListener(n.cellEditor.textarea,"input",S);mxEvent.addListener(n.cellEditor.textarea,"touchend",S);mxEvent.addListener(n.cellEditor.textarea,"mouseup",S);mxEvent.addListener(n.cellEditor.textarea,"keyup",S);S()}};var M=n.cellEditor.stopEditing;n.cellEditor.stopEditing=function(L,S){try{M.apply(this,arguments),X()}catch(ja){R.handleError(ja)}};n.container.setAttribute("tabindex","0");n.container.style.cursor="default";if(window.self===window.top&&null!=n.container.parentNode)try{n.container.focus()}catch(L){}var ka=
+n.fireMouseEvent;n.fireMouseEvent=function(L,S,ja){L==mxEvent.MOUSE_DOWN&&this.container.focus();ka.apply(this,arguments)};n.popupMenuHandler.autoExpand=!0;null!=this.menus&&(n.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(L,S,ja){this.menus.createPopupMenu(L,S,ja)}));mxEvent.addGestureListeners(document,mxUtils.bind(this,function(L){n.popupMenuHandler.hideMenu()}));this.keyHandler=this.createKeyHandler(b);this.getKeyHandler=function(){return keyHandler};n.connectionHandler.addListener(mxEvent.CONNECT,
+function(L,S){var ja=[S.getProperty("cell")];S.getProperty("terminalInserted")&&(ja.push(S.getProperty("terminal")),window.setTimeout(function(){null!=R.hoverIcons&&R.hoverIcons.update(n.view.getState(ja[ja.length-1]))},0));F(ja)});this.addListener("styleChanged",mxUtils.bind(this,function(L,S){var ja=S.getProperty("cells"),ma=L=!1;if(0<ja.length)for(var u=0;u<ja.length&&(L=n.getModel().isVertex(ja[u])||L,!(ma=n.getModel().isEdge(ja[u])||ma)||!L);u++);else ma=L=!0;L=L&&!f;ma=ma&&!g;ja=S.getProperty("keys");
+S=S.getProperty("values");for(u=0;u<ja.length;u++){var H=0<=mxUtils.indexOf(l,ja[u]);if("strokeColor"!=ja[u]||null!=S[u]&&"none"!=S[u])if(0<=mxUtils.indexOf(E,ja[u]))ma||0<=mxUtils.indexOf(q,ja[u])?null==S[u]?delete n.currentEdgeStyle[ja[u]]:n.currentEdgeStyle[ja[u]]=S[u]:L&&0<=mxUtils.indexOf(t,ja[u])&&(null==S[u]?delete n.currentVertexStyle[ja[u]]:n.currentVertexStyle[ja[u]]=S[u]);else if(0<=mxUtils.indexOf(t,ja[u])){if(L||H)null==S[u]?delete n.currentVertexStyle[ja[u]]:n.currentVertexStyle[ja[u]]=
+S[u];if(ma||H||0<=mxUtils.indexOf(q,ja[u]))null==S[u]?delete n.currentEdgeStyle[ja[u]]:n.currentEdgeStyle[ja[u]]=S[u]}}null!=this.toolbar&&(this.toolbar.setFontName(n.currentVertexStyle.fontFamily||Menus.prototype.defaultFont),this.toolbar.setFontSize(n.currentVertexStyle.fontSize||Menus.prototype.defaultFontSize),null!=this.toolbar.edgeStyleMenu&&(this.toolbar.edgeStyleMenu.getElementsByTagName("div")[0].className="orthogonalEdgeStyle"==n.currentEdgeStyle.edgeStyle&&"1"==n.currentEdgeStyle.curved?
"geSprite geSprite-curved":"straight"==n.currentEdgeStyle.edgeStyle||"none"==n.currentEdgeStyle.edgeStyle||null==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-straight":"entityRelationEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-entity":"elbowEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?"verticalelbow":"horizontalelbow"):"isometricEdgeStyle"==n.currentEdgeStyle.edgeStyle?"geSprite geSprite-"+("vertical"==n.currentEdgeStyle.elbow?
-"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var N=n.currentVertexStyle.fontFamily||"Helvetica",
-P=String(n.currentVertexStyle.fontSize||"12"),aa=n.getView().getState(n.getSelectionCell());null!=aa&&(N=aa.style[mxConstants.STYLE_FONTFAMILY]||N,P=aa.style[mxConstants.STYLE_FONTSIZE]||P,10<N.length&&(N=N.substring(0,8)+"..."));this.toolbar.setFontName(N);this.toolbar.setFontSize(P)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(N,P){N=P.getProperty("cells");P=P.getProperty("parent");null!=P&&n.getModel().isLayer(P)&&
-!n.isCellVisible(P)&&null!=N&&0<N.length&&n.getModel().setVisible(P,!0)});this.gestureHandler=mxUtils.bind(this,function(N){null!=this.currentMenu&&mxEvent.getSource(N)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
+"verticalisometric":"horizontalisometric"):"geSprite geSprite-orthogonal"),null!=this.toolbar.edgeShapeMenu&&(this.toolbar.edgeShapeMenu.getElementsByTagName("div")[0].className="link"==n.currentEdgeStyle.shape?"geSprite geSprite-linkedge":"flexArrow"==n.currentEdgeStyle.shape?"geSprite geSprite-arrow":"arrow"==n.currentEdgeStyle.shape?"geSprite geSprite-simplearrow":"geSprite geSprite-connection"))}));null!=this.toolbar&&(b=mxUtils.bind(this,function(){var L=n.currentVertexStyle.fontFamily||"Helvetica",
+S=String(n.currentVertexStyle.fontSize||"12"),ja=n.getView().getState(n.getSelectionCell());null!=ja&&(L=ja.style[mxConstants.STYLE_FONTFAMILY]||L,S=ja.style[mxConstants.STYLE_FONTSIZE]||S,10<L.length&&(L=L.substring(0,8)+"..."));this.toolbar.setFontName(L);this.toolbar.setFontSize(S)}),n.getSelectionModel().addListener(mxEvent.CHANGE,b),n.getModel().addListener(mxEvent.CHANGE,b));n.addListener(mxEvent.CELLS_ADDED,function(L,S){L=S.getProperty("cells");S=S.getProperty("parent");null!=S&&n.getModel().isLayer(S)&&
+!n.isCellVisible(S)&&null!=L&&0<L.length&&n.getModel().setVisible(S,!0)});this.gestureHandler=mxUtils.bind(this,function(L){null!=this.currentMenu&&mxEvent.getSource(L)!=this.currentMenu.div&&this.hideCurrentMenu()});mxEvent.addGestureListeners(document,this.gestureHandler);this.resizeHandler=mxUtils.bind(this,function(){window.setTimeout(mxUtils.bind(this,function(){null!=this.editor.graph&&this.refresh()}),0)});mxEvent.addListener(window,"resize",this.resizeHandler);this.orientationChangeHandler=
mxUtils.bind(this,function(){this.refresh()});mxEvent.addListener(window,"orientationchange",this.orientationChangeHandler);mxClient.IS_IOS&&!window.navigator.standalone&&"undefined"!==typeof Menus&&(this.scrollHandler=mxUtils.bind(this,function(){window.scrollTo(0,0)}),mxEvent.addListener(window,"scroll",this.scrollHandler));this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.resetScrollbars()}));this.addListener("gridEnabledChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));
this.addListener("backgroundColorChanged",mxUtils.bind(this,function(){n.view.validateBackground()}));n.addListener("gridSizeChanged",mxUtils.bind(this,function(){n.isGridEnabled()&&n.view.validateBackground()}));this.editor.resetGraph()}this.init();n.standalone||this.open()};EditorUi.compactUi=!0;
EditorUi.parsePng=function(b,e,k){function n(d,f){var g=t;t+=f;return d.substring(g,t)}function D(d){d=n(d,4);return d.charCodeAt(3)+(d.charCodeAt(2)<<8)+(d.charCodeAt(1)<<16)+(d.charCodeAt(0)<<24)}var t=0;if(n(b,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=k&&k();else if(n(b,4),"IHDR"!=n(b,4))null!=k&&k();else{n(b,17);do{k=D(b);var E=n(b,4);if(null!=e&&e(t-8,E,k))break;value=n(b,k);n(b,4);if("IEND"==E)break}while(k)}};mxUtils.extend(EditorUi,mxEventSource);
@@ -2096,23 +2111,23 @@ EditorUi.prototype.init=function(){var b=this.editor.graph;if(!b.standalone){"0"
arguments);k.updateActionStates()};b.editLink=k.actions.get("editLink").funct;this.updateActionStates();this.initClipboard();this.initCanvas();null!=this.format&&this.format.init()}};EditorUi.prototype.clearSelectionState=function(){this.selectionState=null};EditorUi.prototype.getSelectionState=function(){null==this.selectionState&&(this.selectionState=this.createSelectionState());return this.selectionState};
EditorUi.prototype.createSelectionState=function(){for(var b=this.editor.graph,e=b.getSelectionCells(),k=this.initSelectionState(),n=!0,D=0;D<e.length;D++){var t=b.getCurrentCellStyle(e[D]);"0"!=mxUtils.getValue(t,mxConstants.STYLE_EDITABLE,"1")&&(this.updateSelectionStateForCell(k,e[D],e,n),n=!1)}this.updateSelectionStateForTableCells(k);return k};
EditorUi.prototype.initSelectionState=function(){return{vertices:[],edges:[],cells:[],x:null,y:null,width:null,height:null,style:{},containsImage:!1,containsLabel:!1,fill:!0,glass:!0,rounded:!0,autoSize:!1,image:!0,shadow:!0,lineJumps:!0,resizable:!0,table:!1,cell:!1,row:!1,movable:!0,rotatable:!0,stroke:!0,swimlane:!1,unlocked:this.editor.graph.isEnabled(),connections:!1}};
-EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,n=k.getParent(e[0]),D=k.getParent(n),t=n.getIndex(e[0]),E=D.getIndex(n),d=null,f=1,g=1,m=0,q=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+1),t):null;m<e.length-1;){var z=e[++m];null==q||q!=z||null!=d&&f!=d||(d=f,f=0,g++,n=k.getParent(q),q=E+g<D.getChildCount()?k.getChildAt(k.getChildAt(D,E+g),t):null);var F=this.editor.graph.view.getState(z);
-if(z==k.getChildAt(n,t+f)&&null!=F&&1==mxUtils.getValue(F.style,"colspan",1)&&1==mxUtils.getValue(F.style,"rowspan",1))f++;else break}m==g*f-1&&(b.mergeCell=e[0],b.colspan=f,b.rowspan=g)}};
+EditorUi.prototype.updateSelectionStateForTableCells=function(b){if(1<b.cells.length&&b.cell){for(var e=mxUtils.sortCells(b.cells),k=this.editor.graph.model,n=k.getParent(e[0]),D=k.getParent(n),t=n.getIndex(e[0]),E=D.getIndex(n),d=null,f=1,g=1,l=0,q=E<D.getChildCount()-1?k.getChildAt(k.getChildAt(D,E+1),t):null;l<e.length-1;){var z=e[++l];null==q||q!=z||null!=d&&f!=d||(d=f,f=0,g++,n=k.getParent(q),q=E+g<D.getChildCount()?k.getChildAt(k.getChildAt(D,E+g),t):null);var F=this.editor.graph.view.getState(z);
+if(z==k.getChildAt(n,t+f)&&null!=F&&1==mxUtils.getValue(F.style,"colspan",1)&&1==mxUtils.getValue(F.style,"rowspan",1))f++;else break}l==g*f-1&&(b.mergeCell=e[0],b.colspan=f,b.rowspan=g)}};
EditorUi.prototype.updateSelectionStateForCell=function(b,e,k,n){k=this.editor.graph;b.cells.push(e);if(k.getModel().isVertex(e)){b.connections=0<k.model.getEdgeCount(e);b.unlocked=b.unlocked&&!k.isCellLocked(e);b.resizable=b.resizable&&k.isCellResizable(e);b.rotatable=b.rotatable&&k.isCellRotatable(e);b.movable=b.movable&&k.isCellMovable(e)&&!k.isTableRow(e)&&!k.isTableCell(e);b.swimlane=b.swimlane||k.isSwimlane(e);b.table=b.table||k.isTable(e);b.cell=b.cell||k.isTableCell(e);b.row=b.row||k.isTableRow(e);
b.vertices.push(e);var D=k.getCellGeometry(e);if(null!=D&&(0<D.width?null==b.width?b.width=D.width:b.width!=D.width&&(b.width=""):b.containsLabel=!0,0<D.height?null==b.height?b.height=D.height:b.height!=D.height&&(b.height=""):b.containsLabel=!0,!D.relative||null!=D.offset)){var t=D.relative?D.offset.x:D.x;D=D.relative?D.offset.y:D.y;null==b.x?b.x=t:b.x!=t&&(b.x="");null==b.y?b.y=D:b.y!=D&&(b.y="")}}else k.getModel().isEdge(e)&&(b.edges.push(e),b.connections=!0,b.resizable=!1,b.rotatable=!1,b.movable=
!1);e=k.view.getState(e);null!=e&&(b.autoSize=b.autoSize||k.isAutoSizeState(e),b.glass=b.glass&&k.isGlassState(e),b.rounded=b.rounded&&k.isRoundedState(e),b.lineJumps=b.lineJumps&&k.isLineJumpState(e),b.image=b.image&&k.isImageState(e),b.shadow=b.shadow&&k.isShadowState(e),b.fill=b.fill&&k.isFillState(e),b.stroke=b.stroke&&k.isStrokeState(e),t=mxUtils.getValue(e.style,mxConstants.STYLE_SHAPE,null),b.containsImage=b.containsImage||"image"==t,k.mergeStyle(e.style,b.style,n))};
EditorUi.prototype.installShapePicker=function(){var b=this.editor.graph,e=this;b.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(f,g){"mouseDown"==g.getProperty("eventName")&&e.hideShapePicker()}));var k=mxUtils.bind(this,function(){e.hideShapePicker(!0)});b.addListener("wheel",k);b.addListener(mxEvent.ESCAPE,k);b.view.addListener(mxEvent.SCALE,k);b.view.addListener(mxEvent.SCALE_AND_TRANSLATE,k);b.getSelectionModel().addListener(mxEvent.CHANGE,k);var n=b.popupMenuHandler.isMenuShowing;
-b.popupMenuHandler.isMenuShowing=function(){return n.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(f,g){if(this.isEnabled())if(null!=g||null==e.sidebar||mxEvent.isShiftDown(f)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var m=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f));mxEvent.consume(f);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.x,m.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
-k);var t=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();t.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,m){var q=m.getEvent();this.graph.isCloneEvent(q)||mxEvent.isShiftDown(q)?E.apply(this,arguments):this.graph.connectVertex(f.cell,g,this.graph.defaultEdgeLength,q,null,null,mxUtils.bind(this,function(z,F,C){var I=b.getCompositeParent(f.cell);z=b.getCellGeometry(I);for(m.consume();null!=I&&b.model.isVertex(I)&&null!=z&&z.relative;)cell=
-I,I=b.model.getParent(cell),z=b.getCellGeometry(I);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(m.getGraphX(),m.getGraphY(),I,mxUtils.bind(this,function(G){C(G);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(G))}),g)}),30)}),mxUtils.bind(this,function(z){this.graph.selectCellsForConnectVertex(z,q,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d);d=window.setTimeout(mxUtils.bind(this,function(){var m=
-g.getProperty("arrow"),q=g.getProperty("direction"),z=g.getProperty("event");m=m.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+m.x-F.x;F=b.container.scrollTop+m.y-F.y;var I=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,I,mxUtils.bind(this,function(Z){null!=Z&&b.connectVertex(I,q,b.defaultEdgeLength,z,!0,!0,function(fa,ba,Y){Y(Z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(Z))},
-function(fa){b.selectCellsForConnectVertex(fa)},z,this.hoverIcons)}),q,!0);this.centerShapePicker(G,m,C,F,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
+b.popupMenuHandler.isMenuShowing=function(){return n.apply(this,arguments)||null!=e.shapePicker};var D=b.dblClick;b.dblClick=function(f,g){if(this.isEnabled())if(null!=g||null==e.sidebar||mxEvent.isShiftDown(f)||b.isCellLocked(b.getDefaultParent()))D.apply(this,arguments);else{var l=mxUtils.convertPoint(this.container,mxEvent.getClientX(f),mxEvent.getClientY(f));mxEvent.consume(f);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(l.x,l.y)}),30)}};if(null!=this.hoverIcons){this.hoverIcons.addListener("reset",
+k);var t=this.hoverIcons.drag;this.hoverIcons.drag=function(){e.hideShapePicker();t.apply(this,arguments)};var E=this.hoverIcons.execute;this.hoverIcons.execute=function(f,g,l){var q=l.getEvent();this.graph.isCloneEvent(q)||mxEvent.isShiftDown(q)?E.apply(this,arguments):this.graph.connectVertex(f.cell,g,this.graph.defaultEdgeLength,q,null,null,mxUtils.bind(this,function(z,F,C){var I=b.getCompositeParent(f.cell);z=b.getCellGeometry(I);for(l.consume();null!=I&&b.model.isVertex(I)&&null!=z&&z.relative;)cell=
+I,I=b.model.getParent(cell),z=b.getCellGeometry(I);window.setTimeout(mxUtils.bind(this,function(){e.showShapePicker(l.getGraphX(),l.getGraphY(),I,mxUtils.bind(this,function(G){C(G);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(G))}),g)}),30)}),mxUtils.bind(this,function(z){this.graph.selectCellsForConnectVertex(z,q,this)}))};var d=null;this.hoverIcons.addListener("focus",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d);d=window.setTimeout(mxUtils.bind(this,function(){var l=
+g.getProperty("arrow"),q=g.getProperty("direction"),z=g.getProperty("event");l=l.getBoundingClientRect();var F=mxUtils.getOffset(b.container),C=b.container.scrollLeft+l.x-F.x;F=b.container.scrollTop+l.y-F.y;var I=b.getCompositeParent(null!=this.hoverIcons.currentState?this.hoverIcons.currentState.cell:null),G=e.showShapePicker(C,F,I,mxUtils.bind(this,function(Z){null!=Z&&b.connectVertex(I,q,b.defaultEdgeLength,z,!0,!0,function(ca,ba,Y){Y(Z);null!=e.hoverIcons&&e.hoverIcons.update(b.view.getState(Z))},
+function(ca){b.selectCellsForConnectVertex(ca)},z,this.hoverIcons)}),q,!0);this.centerShapePicker(G,l,C,F,q);mxUtils.setOpacity(G,30);mxEvent.addListener(G,"mouseenter",function(){mxUtils.setOpacity(G,100)});mxEvent.addListener(G,"mouseleave",function(){e.hideShapePicker()})}),Editor.shapePickerHoverDelay)}));this.hoverIcons.addListener("blur",mxUtils.bind(this,function(f,g){null!=d&&window.clearTimeout(d)}))}};
EditorUi.prototype.centerShapePicker=function(b,e,k,n,D){if(D==mxConstants.DIRECTION_EAST||D==mxConstants.DIRECTION_WEST)b.style.width="40px";var t=b.getBoundingClientRect();D==mxConstants.DIRECTION_NORTH?(k-=t.width/2-10,n-=t.height+6):D==mxConstants.DIRECTION_SOUTH?(k-=t.width/2-10,n+=e.height+6):D==mxConstants.DIRECTION_WEST?(k-=t.width+6,n-=t.height/2-10):D==mxConstants.DIRECTION_EAST&&(k+=e.width+6,n-=t.height/2-10);b.style.left=k+"px";b.style.top=n+"px"};
EditorUi.prototype.showShapePicker=function(b,e,k,n,D,t){b=this.createShapePicker(b,e,k,n,D,mxUtils.bind(this,function(){this.hideShapePicker()}),this.getCellsForShapePicker(k,t),t);null!=b&&(null==this.hoverIcons||t||this.hoverIcons.reset(),t=this.editor.graph,t.popupMenuHandler.hideMenu(),t.tooltipHandler.hideTooltip(),this.hideCurrentMenu(),this.hideShapePicker(),this.shapePickerCallback=n,this.shapePicker=b);return b};
-EditorUi.prototype.createShapePicker=function(b,e,k,n,D,t,E,d){var f=null;if(null!=E&&0<E.length){var g=this,m=this.editor.graph;f=document.createElement("div");D=m.view.getState(k);var q=null==k||null!=D&&m.isTransparentState(D)?null:m.copyStyle(k);k=6>E.length?35*E.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
-mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=m.background&&m.background!=mxConstants.NONE&&(f.style.backgroundColor=m.background);m.container.appendChild(f);k=mxUtils.bind(this,function(z){var F=document.createElement("a");F.className="geItem";F.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(F);null!=q&&"1"!=urlParams.sketch?
-this.sidebar.graph.pasteStyle(q,[z]):g.insertHandler([z],""!=z.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([z],25,25,F,null,!0,!1,z.geometry.width,z.geometry.height);mxEvent.addListener(F,"click",function(){var C=m.cloneCell(z);if(null!=n)n(C);else{C.geometry.x=m.snap(Math.round(b/m.view.scale)-m.view.translate.x-z.geometry.width/2);C.geometry.y=m.snap(Math.round(e/m.view.scale)-m.view.translate.y-z.geometry.height/2);m.model.beginUpdate();try{m.addCell(C)}finally{m.model.endUpdate()}m.setSelectionCell(C);
-m.scrollCellToVisible(C);m.startEditingAtCell(C);null!=g.hoverIcons&&g.hoverIcons.update(m.view.getState(C))}null!=t&&t()})});for(D=0;D<(d?Math.min(E.length,4):E.length);D++)k(E[D]);E=f.offsetTop+f.clientHeight-(m.container.scrollTop+m.container.offsetHeight);0<E&&(f.style.top=Math.max(m.container.scrollTop+22,e-E)+"px");E=f.offsetLeft+f.clientWidth-(m.container.scrollLeft+m.container.offsetWidth);0<E&&(f.style.left=Math.max(m.container.scrollLeft+22,b-E)+"px")}return f};
+EditorUi.prototype.createShapePicker=function(b,e,k,n,D,t,E,d){var f=null;if(null!=E&&0<E.length){var g=this,l=this.editor.graph;f=document.createElement("div");D=l.view.getState(k);var q=null==k||null!=D&&l.isTransparentState(D)?null:l.copyStyle(k);k=6>E.length?35*E.length:140;f.className="geToolbarContainer geSidebarContainer";f.style.cssText="position:absolute;left:"+b+"px;top:"+e+"px;width:"+k+"px;border-radius:10px;padding:4px;text-align:center;box-shadow:0px 0px 3px 1px #d1d1d1;padding: 6px 0 8px 0;z-index: "+
+mxPopupMenu.prototype.zIndex+1+";";d||mxUtils.setPrefixedStyle(f.style,"transform","translate(-22px,-22px)");null!=l.background&&l.background!=mxConstants.NONE&&(f.style.backgroundColor=l.background);l.container.appendChild(f);k=mxUtils.bind(this,function(z){var F=document.createElement("a");F.className="geItem";F.style.cssText="position:relative;display:inline-block;position:relative;width:30px;height:30px;cursor:pointer;overflow:hidden;padding:3px 0 0 3px;";f.appendChild(F);null!=q&&"1"!=urlParams.sketch?
+this.sidebar.graph.pasteStyle(q,[z]):g.insertHandler([z],""!=z.value&&"1"!=urlParams.sketch,this.sidebar.graph.model);this.sidebar.createThumb([z],25,25,F,null,!0,!1,z.geometry.width,z.geometry.height);mxEvent.addListener(F,"click",function(){var C=l.cloneCell(z);if(null!=n)n(C);else{C.geometry.x=l.snap(Math.round(b/l.view.scale)-l.view.translate.x-z.geometry.width/2);C.geometry.y=l.snap(Math.round(e/l.view.scale)-l.view.translate.y-z.geometry.height/2);l.model.beginUpdate();try{l.addCell(C)}finally{l.model.endUpdate()}l.setSelectionCell(C);
+l.scrollCellToVisible(C);l.startEditingAtCell(C);null!=g.hoverIcons&&g.hoverIcons.update(l.view.getState(C))}null!=t&&t()})});for(D=0;D<(d?Math.min(E.length,4):E.length);D++)k(E[D]);E=f.offsetTop+f.clientHeight-(l.container.scrollTop+l.container.offsetHeight);0<E&&(f.style.top=Math.max(l.container.scrollTop+22,e-E)+"px");E=f.offsetLeft+f.clientWidth-(l.container.scrollLeft+l.container.offsetWidth);0<E&&(f.style.left=Math.max(l.container.scrollLeft+22,b-E)+"px")}return f};
EditorUi.prototype.getCellsForShapePicker=function(b,e){e=mxUtils.bind(this,function(k,n,D,t){return this.editor.graph.createVertex(null,null,t||"",0,0,n||120,D||60,k,!1)});return[null!=b?this.editor.graph.cloneCell(b):e("text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;",40,20,"Text"),e("whiteSpace=wrap;html=1;"),e("ellipse;whiteSpace=wrap;html=1;"),e("rhombus;whiteSpace=wrap;html=1;",80,80),e("rounded=1;whiteSpace=wrap;html=1;"),e("shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;"),
e("shape=trapezoid;perimeter=trapezoidPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,60),e("shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=step;perimeter=stepPerimeter;whiteSpace=wrap;html=1;fixedSize=1;",120,80),e("shape=process;whiteSpace=wrap;html=1;backgroundOutline=1;"),e("triangle;whiteSpace=wrap;html=1;",60,80),e("shape=document;whiteSpace=wrap;html=1;boundedLbl=1;",120,80),e("shape=tape;whiteSpace=wrap;html=1;",120,100),e("ellipse;shape=cloud;whiteSpace=wrap;html=1;",
120,80),e("shape=singleArrow;whiteSpace=wrap;html=1;arrowWidth=0.4;arrowSize=0.4;",80,60),e("shape=waypoint;sketch=0;size=6;pointerEvents=1;points=[];fillColor=none;resizable=0;rotatable=0;perimeter=centerPerimeter;snapToPoint=1;",40,40)]};EditorUi.prototype.hideShapePicker=function(b){null!=this.shapePicker&&(this.shapePicker.parentNode.removeChild(this.shapePicker),this.shapePicker=null,b||null==this.shapePickerCallback||this.shapePickerCallback(),this.shapePickerCallback=null)};
@@ -2127,44 +2142,44 @@ b==mxConstants.ARROW_BLOCK_THIN?k="1"!=e?Format.blockThinMarkerImage.src:Format.
"box"==b?k=Format.boxMarkerImage.src:"halfCircle"==b?k=Format.halfCircleMarkerImage.src:"openAsync"==b?k=Format.openAsyncFilledMarkerImage.src:"async"==b?k="1"!=e?Format.asyncMarkerImage.src:Format.asyncFilledMarkerImage.src:"dash"==b?k=Format.dashMarkerImage.src:"baseDash"==b?k=Format.baseDashMarkerImage.src:"cross"==b?k=Format.crossMarkerImage.src:"circle"==b?k=Format.circleMarkerImage.src:"circlePlus"==b?k=Format.circlePlusMarkerImage.src:"ERone"==b?k=Format.EROneMarkerImage.src:"ERmandOne"==b?
k=Format.ERmandOneMarkerImage.src:"ERmany"==b?k=Format.ERmanyMarkerImage.src:"ERoneToMany"==b?k=Format.ERoneToManyMarkerImage.src:"ERzeroToOne"==b?k=Format.ERzeroToOneMarkerImage.src:"ERzeroToMany"==b&&(k=Format.ERzeroToManyMarkerImage.src);return k};EditorUi.prototype.createMenus=function(){return null};
EditorUi.prototype.updatePasteActionStates=function(){var b=this.editor.graph,e=this.actions.get("paste"),k=this.actions.get("pasteHere");e.setEnabled(this.editor.graph.cellEditor.isContentEditing()||(!mxClient.IS_FF&&null!=navigator.clipboard||!mxClipboard.isEmpty())&&b.isEnabled()&&!b.isCellLocked(b.getDefaultParent()));k.setEnabled(e.isEnabled())};
-EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(t){t.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(t){var E=null;if(t.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||t.getSelectionCells();E=t.getExportableCells(t.model.getTopmostCells(E));for(var d={},f=t.createCellLookup(E),g=t.cloneCells(E,null,d),m=new mxGraphModel,q=m.getChildAt(m.getRoot(),
-0),z=0;z<g.length;z++){m.add(q,g[z]);var F=t.view.getState(E[z]);if(null!=F){var C=t.getCellGeometry(g[z]);null!=C&&C.relative&&!m.isEdge(E[z])&&null==f[mxObjectIdentity.get(m.getParent(E[z]))]&&(C.offset=null,C.relative=!1,C.x=F.x/F.view.scale-F.view.translate.x,C.y=F.y/F.view.scale-F.view.translate.y)}}t.updateCustomLinks(t.createCellMapping(d,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(t){var E=
+EditorUi.prototype.initClipboard=function(){var b=this,e=mxClipboard.cut;mxClipboard.cut=function(t){t.cellEditor.isContentEditing()?document.execCommand("cut",!1,null):e.apply(this,arguments);b.updatePasteActionStates()};mxClipboard.copy=function(t){var E=null;if(t.cellEditor.isContentEditing())document.execCommand("copy",!1,null);else{E=E||t.getSelectionCells();E=t.getExportableCells(t.model.getTopmostCells(E));for(var d={},f=t.createCellLookup(E),g=t.cloneCells(E,null,d),l=new mxGraphModel,q=l.getChildAt(l.getRoot(),
+0),z=0;z<g.length;z++){l.add(q,g[z]);var F=t.view.getState(E[z]);if(null!=F){var C=t.getCellGeometry(g[z]);null!=C&&C.relative&&!l.isEdge(E[z])&&null==f[mxObjectIdentity.get(l.getParent(E[z]))]&&(C.offset=null,C.relative=!1,C.x=F.x/F.view.scale-F.view.translate.x,C.y=F.y/F.view.scale-F.view.translate.y)}}t.updateCustomLinks(t.createCellMapping(d,f),g);mxClipboard.insertCount=1;mxClipboard.setCells(g)}b.updatePasteActionStates();return E};var k=mxClipboard.paste;mxClipboard.paste=function(t){var E=
null;t.cellEditor.isContentEditing()?document.execCommand("paste",!1,null):E=k.apply(this,arguments);b.updatePasteActionStates();return E};var n=this.editor.graph.cellEditor.startEditing;this.editor.graph.cellEditor.startEditing=function(){n.apply(this,arguments);b.updatePasteActionStates()};var D=this.editor.graph.cellEditor.stopEditing;this.editor.graph.cellEditor.stopEditing=function(t,E){D.apply(this,arguments);b.updatePasteActionStates()};this.updatePasteActionStates()};
EditorUi.prototype.lazyZoomDelay=20;EditorUi.prototype.wheelZoomDelay=400;EditorUi.prototype.buttonZoomDelay=600;
-EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var N=this.graph.getPageLayout(),P=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+N.x*P.width),this.scale*(this.translate.y+N.y*P.height),this.scale*N.width*P.width,
-this.scale*N.height*P.height)};b.getPreferredPageSize=function(N,P,aa){N=this.getPageLayout();P=this.getPageSize();return new mxRectangle(0,0,N.width*P.width,N.height*P.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(N,P,aa,la){if(null!=b.container&&!b.isViewer()){aa=null!=aa?aa:0;la=null!=la?la:0;var u=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),H=mxUtils.hasScrollbars(b.container),Q=b.view.translate,X=b.view.scale,
-R=mxRectangle.fromRectangle(u);R.x=R.x/X-Q.x;R.y=R.y/X-Q.y;R.width/=X;R.height/=X;Q=b.container.scrollTop;var ca=b.container.scrollLeft,ea=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ea+=3;var da=b.container.offsetWidth-ea;ea=b.container.offsetHeight-ea;N=N?Math.max(.3,Math.min(P||1,da/R.width)):X;P=(da-N*R.width)/2/N;var qa=0==this.lightboxVerticalDivider?0:(ea-N*R.height)/this.lightboxVerticalDivider/N;H&&(P=Math.max(P,0),qa=Math.max(qa,0));if(H||u.width<
-da||u.height<ea)b.view.scaleAndTranslate(N,Math.floor(P-R.x),Math.floor(qa-R.y)),b.container.scrollTop=Q*N/X,b.container.scrollLeft=ca*N/X;else if(0!=aa||0!=la)u=b.view.translate,b.view.setTranslate(Math.floor(u.x+aa/X),Math.floor(u.y+la/X))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
-"resize",n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(N){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(N){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=JSON.parse(decodeURIComponent(urlParams["toolbar-config"]||"{}"));this.chromelessToolbar=document.createElement("div");this.chromelessToolbar.style.position=
+EditorUi.prototype.initCanvas=function(){var b=this.editor.graph;b.timerAutoScroll=!0;b.getPagePadding=function(){return new mxPoint(Math.max(0,Math.round((b.container.offsetWidth-34)/b.view.scale)),Math.max(0,Math.round((b.container.offsetHeight-34)/b.view.scale)))};b.view.getBackgroundPageBounds=function(){var L=this.graph.getPageLayout(),S=this.graph.getPageSize();return new mxRectangle(this.scale*(this.translate.x+L.x*S.width),this.scale*(this.translate.y+L.y*S.height),this.scale*L.width*S.width,
+this.scale*L.height*S.height)};b.getPreferredPageSize=function(L,S,ja){L=this.getPageLayout();S=this.getPageSize();return new mxRectangle(0,0,L.width*S.width,L.height*S.height)};var e=null,k=this;if(this.editor.isChromelessView()){this.chromelessResize=e=mxUtils.bind(this,function(L,S,ja,ma){if(null!=b.container&&!b.isViewer()){ja=null!=ja?ja:0;ma=null!=ma?ma:0;var u=b.pageVisible?b.view.getBackgroundPageBounds():b.getGraphBounds(),H=mxUtils.hasScrollbars(b.container),P=b.view.translate,V=b.view.scale,
+Q=mxRectangle.fromRectangle(u);Q.x=Q.x/V-P.x;Q.y=Q.y/V-P.y;Q.width/=V;Q.height/=V;P=b.container.scrollTop;var da=b.container.scrollLeft,ea=8<=document.documentMode?20:14;if(8==document.documentMode||9==document.documentMode)ea+=3;var fa=b.container.offsetWidth-ea;ea=b.container.offsetHeight-ea;L=L?Math.max(.3,Math.min(S||1,fa/Q.width)):V;S=(fa-L*Q.width)/2/L;var pa=0==this.lightboxVerticalDivider?0:(ea-L*Q.height)/this.lightboxVerticalDivider/L;H&&(S=Math.max(S,0),pa=Math.max(pa,0));if(H||u.width<
+fa||u.height<ea)b.view.scaleAndTranslate(L,Math.floor(S-Q.x),Math.floor(pa-Q.y)),b.container.scrollTop=P*L/V,b.container.scrollLeft=da*L/V;else if(0!=ja||0!=ma)u=b.view.translate,b.view.setTranslate(Math.floor(u.x+ja/V),Math.floor(u.y+ma/V))}});this.chromelessWindowResize=mxUtils.bind(this,function(){this.chromelessResize(!1)});var n=mxUtils.bind(this,function(){this.chromelessWindowResize(!1)});mxEvent.addListener(window,"resize",n);this.destroyFunctions.push(function(){mxEvent.removeListener(window,
+"resize",n)});this.editor.addListener("resetGraphView",mxUtils.bind(this,function(){this.chromelessResize(!0)}));this.actions.get("zoomIn").funct=mxUtils.bind(this,function(L){b.zoomIn();this.chromelessResize(!1)});this.actions.get("zoomOut").funct=mxUtils.bind(this,function(L){b.zoomOut();this.chromelessResize(!1)});if("0"!=urlParams.toolbar){var D=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.padding="10px 10px 8px 10px";this.chromelessToolbar.style.left=b.isViewer()?"0":"50%";mxClient.IS_IE||mxClient.IS_IE11?(this.chromelessToolbar.style.backgroundColor="#ffffff",this.chromelessToolbar.style.border="3px solid black"):this.chromelessToolbar.style.backgroundColor="#000000";mxUtils.setPrefixedStyle(this.chromelessToolbar.style,
-"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var N=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=N?parseInt(N["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(N,P,aa){E++;
-var la=document.createElement("span");la.style.paddingLeft="8px";la.style.paddingRight="8px";la.style.cursor="pointer";mxEvent.addListener(la,"click",N);null!=aa&&la.setAttribute("title",aa);N=document.createElement("img");N.setAttribute("border","0");N.setAttribute("src",P);N.style.width="36px";N.style.filter="invert(100%)";la.appendChild(N);this.chromelessToolbar.appendChild(la);return la});null!=D.backBtn&&t(mxUtils.bind(this,function(N){window.location.href=D.backBtn.url;mxEvent.consume(N)}),
-Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(N){this.actions.get("previousPage").funct();mxEvent.consume(N)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
-this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(N){this.actions.get("nextPage").funct();mxEvent.consume(N)}),Editor.nextImage,mxResources.get("nextPage")),m=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerText="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
-function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");m()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",m)}t(mxUtils.bind(this,function(N){this.actions.get("zoomOut").funct();mxEvent.consume(N)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(N){this.actions.get("zoomIn").funct();
-mxEvent.consume(N)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(N){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(N)}),Editor.zoomFitImage,mxResources.get("fit"));var z=null,F=null,C=mxUtils.bind(this,function(N){null!=z&&(window.clearTimeout(z),z=null);null!=F&&(window.clearTimeout(F),F=null);z=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
-0);z=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),N||200)}),I=mxUtils.bind(this,function(N){null!=z&&(window.clearTimeout(z),z=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,N||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(N){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
-this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var P=G.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
-"4px 2px 4px 2px";this.layersDialog.style.left=P.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));P=mxUtils.getCurrentStyle(this.editor.graph.container);
-this.layersDialog.style.zIndex=P.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(N)}),Editor.layersImage,mxResources.get("layers")),Z=b.getModel();Z.addListener(mxEvent.CHANGE,function(){G.style.display=1<Z.getChildCount(Z.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(t);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||t(mxUtils.bind(this,function(N){null!=
-this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(N)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var fa=this.lightboxToolbarActions[q];fa.elem=t(fa.fn,fa.icon,fa.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(N){D.refreshBtn.url?window.location.href=
-D.refreshBtn.url:window.location.reload();mxEvent.consume(N)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(N){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(N)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&
-t(mxUtils.bind(this,function(N){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(N))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(N){mxEvent.isTouchEvent(N)||(mxEvent.isShiftDown(N)||
-I(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(N){mxEvent.consume(N)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(N){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(N)?C():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(N){mxEvent.isShiftDown(N)?C():I(100);mxEvent.consume(N)}));mxEvent.addListener(this.chromelessToolbar,
-"mouseleave",mxUtils.bind(this,function(N){mxEvent.isTouchEvent(N)||I(30)}));var ba=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(N,P){this.startX=P.getGraphX();this.startY=P.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(N,P){},mouseUp:function(N,P){mxEvent.isTouchEvent(P.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ba&&Math.abs(this.scrollTop-b.container.scrollTop)<
-ba&&Math.abs(this.startX-P.getGraphX())<ba&&Math.abs(this.startY-P.getGraphY())<ba&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Y=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var N=this.graph.getPagePadding(),P=this.graph.getPageSize();this.translate.x=N.x-(this.x0||0)*P.width;this.translate.y=N.y-(this.y0||0)*
-P.height}Y.apply(this,arguments)};if(!b.isViewer()){var pa=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var N=this.getPageLayout(),P=this.getPagePadding(),aa=this.getPageSize(),la=Math.ceil(2*P.x+N.width*aa.width),u=Math.ceil(2*P.y+N.height*aa.height),H=b.minimumGraphSize;if(null==H||H.width!=la||H.height!=u)b.minimumGraphSize=new mxRectangle(0,0,la,u);la=P.x-N.x*aa.width;P=P.y-N.y*aa.height;this.autoTranslate||this.view.translate.x==la&&
-this.view.translate.y==P?pa.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=N.x,this.view.y0=N.y,N=b.view.translate.x,aa=b.view.translate.y,b.view.setTranslate(la,P),b.container.scrollLeft+=Math.round((la-N)*b.view.scale),b.container.scrollTop+=Math.round((P-aa)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var O=b.view.getBackgroundPane(),W=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ha=null,U=null,ma=null,
-T=null,M=null,ia=function(N){null!=ha&&window.clearTimeout(ha);0<=N&&window.setTimeout(function(){if(!b.isMouseDown||T)ha=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),W.style.transformOrigin="",O.style.transformOrigin="",mxClient.IS_SF?
-(W.style.transform="scale(1)",O.style.transform="scale(1)",window.setTimeout(function(){W.style.transform="";O.style.transform=""},0)):(W.style.transform="",O.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var P=new mxPoint(b.container.scrollLeft,b.container.scrollTop),aa=mxUtils.getOffset(b.container),la=b.view.scale,u=0,H=0;null!=U&&(u=b.container.offsetWidth/2-U.x+aa.x,H=b.container.offsetHeight/2-U.y+aa.y);b.zoom(b.cumulativeZoomFactor,
-null,b.isFastZoomEnabled()?20:null);b.view.scale!=la&&(null!=ma&&(u+=P.x-ma.x,H+=P.y-ma.y),null!=e&&k.chromelessResize(!1,null,u*(b.cumulativeZoomFactor-1),H*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==u&&0==H||(b.container.scrollLeft-=u*(b.cumulativeZoomFactor-1),b.container.scrollTop-=H*(b.cumulativeZoomFactor-1)));null!=M&&W.setAttribute("filter",M);b.cumulativeZoomFactor=1;M=T=U=ma=ha=null}),null!=N?N:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
-function(N,P,aa,la){la=null!=la?la:this.zoomFactor;(P=P||!b.scrollbars)&&(U=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));N?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
-(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=la,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==M&&""!=W.getAttribute("filter")&&(M=W.getAttribute("filter"),W.removeAttribute("filter")),ma=new mxPoint(b.container.scrollLeft,b.container.scrollTop),N=P||null==U?b.container.scrollLeft+
-b.container.clientWidth/2:U.x+b.container.scrollLeft-b.container.offsetLeft,la=P||null==U?b.container.scrollTop+b.container.clientHeight/2:U.y+b.container.scrollTop-b.container.offsetTop,W.style.transformOrigin=N+"px "+la+"px",W.style.transform="scale("+this.cumulativeZoomFactor+")",O.style.transformOrigin=N+"px "+la+"px",O.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(N=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(N.style,
-"transform-origin",(P||null==U?b.container.clientWidth/2+b.container.scrollLeft-N.offsetLeft+"px":U.x+b.container.scrollLeft-N.offsetLeft-b.container.offsetLeft+"px")+" "+(P||null==U?b.container.clientHeight/2+b.container.scrollTop-N.offsetTop+"px":U.y+b.container.scrollTop-N.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(N.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
-k.hoverIcons.reset());ia(b.isFastZoomEnabled()?aa:0)};mxEvent.addGestureListeners(b.container,function(N){null!=ha&&window.clearTimeout(ha)},null,function(N){1!=b.cumulativeZoomFactor&&ia(0)});mxEvent.addListener(b.container,"scroll",function(N){null==ha||b.isMouseDown||1==b.cumulativeZoomFactor||ia(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(N,P,aa,la,u){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!aa&&b.isScrollWheelEvent(N))aa=
-b.view.getTranslate(),la=40/b.view.scale,mxEvent.isShiftDown(N)?b.view.setTranslate(aa.x+(P?-la:la),aa.y):b.view.setTranslate(aa.x,aa.y+(P?la:-la));else if(aa||b.isZoomWheelEvent(N))for(var H=mxEvent.getSource(N);null!=H;){if(H==b.container)return b.tooltipHandler.hideTooltip(),U=null!=la&&null!=u?new mxPoint(la,u):new mxPoint(mxEvent.getClientX(N),mxEvent.getClientY(N)),T=aa,aa=b.zoomFactor,la=null,N.ctrlKey&&null!=N.deltaY&&40>Math.abs(N.deltaY)&&Math.round(N.deltaY)!=N.deltaY?aa=1+Math.abs(N.deltaY)/
-20*(aa-1):null!=N.movementY&&"pointermove"==N.type&&(aa=1+Math.max(1,Math.abs(N.movementY))/20*(aa-1),la=-1),b.lazyZoom(P,null,la,aa),mxEvent.consume(N),!1;H=H.parentNode}}),b.container);b.panningHandler.zoomGraph=function(N){b.cumulativeZoomFactor=N.scale;b.lazyZoom(0<N.scale,!0);mxEvent.consume(N)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
+"borderRadius","16px");mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transition","opacity 600ms ease-in-out");var t=mxUtils.bind(this,function(){var L=mxUtils.getCurrentStyle(b.container);b.isViewer()?this.chromelessToolbar.style.top="0":this.chromelessToolbar.style.bottom=(null!=L?parseInt(L["margin-bottom"]||0):0)+(null!=this.tabContainer?20+parseInt(this.tabContainer.style.height):20)+"px"});this.editor.addListener("resetGraphView",t);t();var E=0;t=mxUtils.bind(this,function(L,S,ja){E++;
+var ma=document.createElement("span");ma.style.paddingLeft="8px";ma.style.paddingRight="8px";ma.style.cursor="pointer";mxEvent.addListener(ma,"click",L);null!=ja&&ma.setAttribute("title",ja);L=document.createElement("img");L.setAttribute("border","0");L.setAttribute("src",S);L.style.width="36px";L.style.filter="invert(100%)";ma.appendChild(L);this.chromelessToolbar.appendChild(ma);return ma});null!=D.backBtn&&t(mxUtils.bind(this,function(L){window.location.href=D.backBtn.url;mxEvent.consume(L)}),
+Editor.backImage,mxResources.get("back",null,"Back"));if(this.isPagesEnabled()){var d=t(mxUtils.bind(this,function(L){this.actions.get("previousPage").funct();mxEvent.consume(L)}),Editor.previousImage,mxResources.get("previousPage")),f=document.createElement("div");f.style.fontFamily=Editor.defaultHtmlFont;f.style.display="inline-block";f.style.verticalAlign="top";f.style.fontWeight="bold";f.style.marginTop="8px";f.style.fontSize="14px";f.style.color=mxClient.IS_IE||mxClient.IS_IE11?"#000000":"#ffffff";
+this.chromelessToolbar.appendChild(f);var g=t(mxUtils.bind(this,function(L){this.actions.get("nextPage").funct();mxEvent.consume(L)}),Editor.nextImage,mxResources.get("nextPage")),l=mxUtils.bind(this,function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&(f.innerText="",mxUtils.write(f,mxUtils.indexOf(this.pages,this.currentPage)+1+" / "+this.pages.length))});d.style.paddingLeft="0px";d.style.paddingRight="4px";g.style.paddingLeft="4px";g.style.paddingRight="0px";var q=mxUtils.bind(this,
+function(){null!=this.pages&&1<this.pages.length&&null!=this.currentPage?(g.style.display="",d.style.display="",f.style.display="inline-block"):(g.style.display="none",d.style.display="none",f.style.display="none");l()});this.editor.addListener("resetGraphView",q);this.editor.addListener("pageSelected",l)}t(mxUtils.bind(this,function(L){this.actions.get("zoomOut").funct();mxEvent.consume(L)}),Editor.zoomOutImage,mxResources.get("zoomOut")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(L){this.actions.get("zoomIn").funct();
+mxEvent.consume(L)}),Editor.zoomInImage,mxResources.get("zoomIn")+" (Alt+Mousewheel)");t(mxUtils.bind(this,function(L){b.isLightboxView()?(1==b.view.scale?this.lightboxFit():b.zoomTo(1),this.chromelessResize(!1)):this.chromelessResize(!0);mxEvent.consume(L)}),Editor.zoomFitImage,mxResources.get("fit"));var z=null,F=null,C=mxUtils.bind(this,function(L){null!=z&&(window.clearTimeout(z),z=null);null!=F&&(window.clearTimeout(F),F=null);z=window.setTimeout(mxUtils.bind(this,function(){mxUtils.setOpacity(this.chromelessToolbar,
+0);z=null;F=window.setTimeout(mxUtils.bind(this,function(){this.chromelessToolbar.style.display="none";F=null}),600)}),L||200)}),I=mxUtils.bind(this,function(L){null!=z&&(window.clearTimeout(z),z=null);null!=F&&(window.clearTimeout(F),F=null);this.chromelessToolbar.style.display="";mxUtils.setOpacity(this.chromelessToolbar,L||30)});if("1"==urlParams.layers){this.layersDialog=null;var G=t(mxUtils.bind(this,function(L){if(null!=this.layersDialog)this.layersDialog.parentNode.removeChild(this.layersDialog),
+this.layersDialog=null;else{this.layersDialog=b.createLayersDialog(null,!0);mxEvent.addListener(this.layersDialog,"mouseleave",mxUtils.bind(this,function(){this.layersDialog.parentNode.removeChild(this.layersDialog);this.layersDialog=null}));var S=G.getBoundingClientRect();mxUtils.setPrefixedStyle(this.layersDialog.style,"borderRadius","5px");this.layersDialog.style.position="fixed";this.layersDialog.style.fontFamily=Editor.defaultHtmlFont;this.layersDialog.style.width="160px";this.layersDialog.style.padding=
+"4px 2px 4px 2px";this.layersDialog.style.left=S.left+"px";this.layersDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";mxClient.IS_IE||mxClient.IS_IE11?(this.layersDialog.style.backgroundColor="#ffffff",this.layersDialog.style.border="2px solid black",this.layersDialog.style.color="#000000"):(this.layersDialog.style.backgroundColor="#000000",this.layersDialog.style.color="#ffffff",mxUtils.setOpacity(this.layersDialog,80));S=mxUtils.getCurrentStyle(this.editor.graph.container);
+this.layersDialog.style.zIndex=S.zIndex;document.body.appendChild(this.layersDialog);this.editor.fireEvent(new mxEventObject("layersDialogShown"))}mxEvent.consume(L)}),Editor.layersImage,mxResources.get("layers")),Z=b.getModel();Z.addListener(mxEvent.CHANGE,function(){G.style.display=1<Z.getChildCount(Z.root)?"":"none"})}("1"!=urlParams.openInSameWin||navigator.standalone)&&this.addChromelessToolbarItems(t);null==this.editor.editButtonLink&&null==this.editor.editButtonFunc||t(mxUtils.bind(this,function(L){null!=
+this.editor.editButtonFunc?this.editor.editButtonFunc():"_blank"==this.editor.editButtonLink?this.editor.editAsNew(this.getEditBlankXml()):b.openLink(this.editor.editButtonLink,"editWindow");mxEvent.consume(L)}),Editor.editImage,mxResources.get("edit"));if(null!=this.lightboxToolbarActions)for(q=0;q<this.lightboxToolbarActions.length;q++){var ca=this.lightboxToolbarActions[q];ca.elem=t(ca.fn,ca.icon,ca.tooltip)}null!=D.refreshBtn&&t(mxUtils.bind(this,function(L){D.refreshBtn.url?window.location.href=
+D.refreshBtn.url:window.location.reload();mxEvent.consume(L)}),Editor.refreshImage,mxResources.get("refresh",null,"Refresh"));null!=D.fullscreenBtn&&window.self!==window.top&&t(mxUtils.bind(this,function(L){D.fullscreenBtn.url?b.openLink(D.fullscreenBtn.url):b.openLink(window.location.href);mxEvent.consume(L)}),Editor.fullscreenImage,mxResources.get("openInNewWindow",null,"Open in New Window"));(D.closeBtn&&window.self===window.top||b.lightbox&&("1"==urlParams.close||this.container!=document.body))&&
+t(mxUtils.bind(this,function(L){"1"==urlParams.close||D.closeBtn?window.close():(this.destroy(),mxEvent.consume(L))}),Editor.closeImage,mxResources.get("close")+" (Escape)");this.chromelessToolbar.style.display="none";b.isViewer()||mxUtils.setPrefixedStyle(this.chromelessToolbar.style,"transform","translate(-50%,0)");b.container.appendChild(this.chromelessToolbar);mxEvent.addListener(b.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(L){mxEvent.isTouchEvent(L)||(mxEvent.isShiftDown(L)||
+I(30),C())}));mxEvent.addListener(this.chromelessToolbar,mxClient.IS_POINTER?"pointermove":"mousemove",function(L){mxEvent.consume(L)});mxEvent.addListener(this.chromelessToolbar,"mouseenter",mxUtils.bind(this,function(L){b.tooltipHandler.resetTimer();b.tooltipHandler.hideTooltip();mxEvent.isShiftDown(L)?C():I(100)}));mxEvent.addListener(this.chromelessToolbar,"mousemove",mxUtils.bind(this,function(L){mxEvent.isShiftDown(L)?C():I(100);mxEvent.consume(L)}));mxEvent.addListener(this.chromelessToolbar,
+"mouseleave",mxUtils.bind(this,function(L){mxEvent.isTouchEvent(L)||I(30)}));var ba=b.getTolerance();b.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(L,S){this.startX=S.getGraphX();this.startY=S.getGraphY();this.scrollLeft=b.container.scrollLeft;this.scrollTop=b.container.scrollTop},mouseMove:function(L,S){},mouseUp:function(L,S){mxEvent.isTouchEvent(S.getEvent())&&Math.abs(this.scrollLeft-b.container.scrollLeft)<ba&&Math.abs(this.scrollTop-b.container.scrollTop)<
+ba&&Math.abs(this.startX-S.getGraphX())<ba&&Math.abs(this.startY-S.getGraphY())<ba&&(0<parseFloat(k.chromelessToolbar.style.opacity||0)?C():I(30))}})}this.editor.editable||this.addChromelessClickHandler()}else if(this.editor.extendCanvas){var Y=b.view.validate;b.view.validate=function(){if(null!=this.graph.container&&mxUtils.hasScrollbars(this.graph.container)){var L=this.graph.getPagePadding(),S=this.graph.getPageSize();this.translate.x=L.x-(this.x0||0)*S.width;this.translate.y=L.y-(this.y0||0)*
+S.height}Y.apply(this,arguments)};if(!b.isViewer()){var O=b.sizeDidChange;b.sizeDidChange=function(){if(null!=this.container&&mxUtils.hasScrollbars(this.container)){var L=this.getPageLayout(),S=this.getPagePadding(),ja=this.getPageSize(),ma=Math.ceil(2*S.x+L.width*ja.width),u=Math.ceil(2*S.y+L.height*ja.height),H=b.minimumGraphSize;if(null==H||H.width!=ma||H.height!=u)b.minimumGraphSize=new mxRectangle(0,0,ma,u);ma=S.x-L.x*ja.width;S=S.y-L.y*ja.height;this.autoTranslate||this.view.translate.x==ma&&
+this.view.translate.y==S?O.apply(this,arguments):(this.autoTranslate=!0,this.view.x0=L.x,this.view.y0=L.y,L=b.view.translate.x,ja=b.view.translate.y,b.view.setTranslate(ma,S),b.container.scrollLeft+=Math.round((ma-L)*b.view.scale),b.container.scrollTop+=Math.round((S-ja)*b.view.scale),this.autoTranslate=!1)}else this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",this.getGraphBounds()))}}}var la=b.view.getBackgroundPane(),aa=b.view.getDrawPane();b.cumulativeZoomFactor=1;var ia=null,X=null,R=null,
+sa=null,M=null,ka=function(L){null!=ia&&window.clearTimeout(ia);0<=L&&window.setTimeout(function(){if(!b.isMouseDown||sa)ia=window.setTimeout(mxUtils.bind(this,function(){b.isFastZoomEnabled()&&(null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform-origin",null),mxUtils.setPrefixedStyle(b.view.backgroundPageShape.node.style,"transform",null)),aa.style.transformOrigin="",la.style.transformOrigin="",mxClient.IS_SF?
+(aa.style.transform="scale(1)",la.style.transform="scale(1)",window.setTimeout(function(){aa.style.transform="";la.style.transform=""},0)):(aa.style.transform="",la.style.transform=""),b.view.getDecoratorPane().style.opacity="",b.view.getOverlayPane().style.opacity="");var S=new mxPoint(b.container.scrollLeft,b.container.scrollTop),ja=mxUtils.getOffset(b.container),ma=b.view.scale,u=0,H=0;null!=X&&(u=b.container.offsetWidth/2-X.x+ja.x,H=b.container.offsetHeight/2-X.y+ja.y);b.zoom(b.cumulativeZoomFactor,
+null,b.isFastZoomEnabled()?20:null);b.view.scale!=ma&&(null!=R&&(u+=S.x-R.x,H+=S.y-R.y),null!=e&&k.chromelessResize(!1,null,u*(b.cumulativeZoomFactor-1),H*(b.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(b.container)||0==u&&0==H||(b.container.scrollLeft-=u*(b.cumulativeZoomFactor-1),b.container.scrollTop-=H*(b.cumulativeZoomFactor-1)));null!=M&&aa.setAttribute("filter",M);b.cumulativeZoomFactor=1;M=sa=X=R=ia=null}),null!=L?L:b.isFastZoomEnabled()?k.wheelZoomDelay:k.lazyZoomDelay)},0)};b.lazyZoom=
+function(L,S,ja,ma){ma=null!=ma?ma:this.zoomFactor;(S=S||!b.scrollbars)&&(X=new mxPoint(b.container.offsetLeft+b.container.clientWidth/2,b.container.offsetTop+b.container.clientHeight/2));L?.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=(this.view.scale+.05)/this.view.scale:(this.cumulativeZoomFactor*=ma,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor*=
+(this.view.scale-.05)/this.view.scale:(this.cumulativeZoomFactor/=ma,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*100)/100/this.view.scale);this.cumulativeZoomFactor=Math.max(.05,Math.min(this.view.scale*this.cumulativeZoomFactor,160))/this.view.scale;b.isFastZoomEnabled()&&(null==M&&""!=aa.getAttribute("filter")&&(M=aa.getAttribute("filter"),aa.removeAttribute("filter")),R=new mxPoint(b.container.scrollLeft,b.container.scrollTop),L=S||null==X?b.container.scrollLeft+
+b.container.clientWidth/2:X.x+b.container.scrollLeft-b.container.offsetLeft,ma=S||null==X?b.container.scrollTop+b.container.clientHeight/2:X.y+b.container.scrollTop-b.container.offsetTop,aa.style.transformOrigin=L+"px "+ma+"px",aa.style.transform="scale("+this.cumulativeZoomFactor+")",la.style.transformOrigin=L+"px "+ma+"px",la.style.transform="scale("+this.cumulativeZoomFactor+")",null!=b.view.backgroundPageShape&&null!=b.view.backgroundPageShape.node&&(L=b.view.backgroundPageShape.node,mxUtils.setPrefixedStyle(L.style,
+"transform-origin",(S||null==X?b.container.clientWidth/2+b.container.scrollLeft-L.offsetLeft+"px":X.x+b.container.scrollLeft-L.offsetLeft-b.container.offsetLeft+"px")+" "+(S||null==X?b.container.clientHeight/2+b.container.scrollTop-L.offsetTop+"px":X.y+b.container.scrollTop-L.offsetTop-b.container.offsetTop+"px")),mxUtils.setPrefixedStyle(L.style,"transform","scale("+this.cumulativeZoomFactor+")")),b.view.getDecoratorPane().style.opacity="0",b.view.getOverlayPane().style.opacity="0",null!=k.hoverIcons&&
+k.hoverIcons.reset());ka(b.isFastZoomEnabled()?ja:0)};mxEvent.addGestureListeners(b.container,function(L){null!=ia&&window.clearTimeout(ia)},null,function(L){1!=b.cumulativeZoomFactor&&ka(0)});mxEvent.addListener(b.container,"scroll",function(L){null==ia||b.isMouseDown||1==b.cumulativeZoomFactor||ka(0)});mxEvent.addMouseWheelListener(mxUtils.bind(this,function(L,S,ja,ma,u){b.fireEvent(new mxEventObject("wheel"));if(null==this.dialogs||0==this.dialogs.length)if(!b.scrollbars&&!ja&&b.isScrollWheelEvent(L))ja=
+b.view.getTranslate(),ma=40/b.view.scale,mxEvent.isShiftDown(L)?b.view.setTranslate(ja.x+(S?-ma:ma),ja.y):b.view.setTranslate(ja.x,ja.y+(S?ma:-ma));else if(ja||b.isZoomWheelEvent(L))for(var H=mxEvent.getSource(L);null!=H;){if(H==b.container)return b.tooltipHandler.hideTooltip(),X=null!=ma&&null!=u?new mxPoint(ma,u):new mxPoint(mxEvent.getClientX(L),mxEvent.getClientY(L)),sa=ja,ja=b.zoomFactor,ma=null,L.ctrlKey&&null!=L.deltaY&&40>Math.abs(L.deltaY)&&Math.round(L.deltaY)!=L.deltaY?ja=1+Math.abs(L.deltaY)/
+20*(ja-1):null!=L.movementY&&"pointermove"==L.type&&(ja=1+Math.max(1,Math.abs(L.movementY))/20*(ja-1),ma=-1),b.lazyZoom(S,null,ma,ja),mxEvent.consume(L),!1;H=H.parentNode}}),b.container);b.panningHandler.zoomGraph=function(L){b.cumulativeZoomFactor=L.scale;b.lazyZoom(0<L.scale,!0);mxEvent.consume(L)}};EditorUi.prototype.addChromelessToolbarItems=function(b){b(mxUtils.bind(this,function(e){this.actions.get("print").funct();mxEvent.consume(e)}),Editor.printImage,mxResources.get("print"))};
EditorUi.prototype.isPagesEnabled=function(){return this.editor.editable||"1"!=urlParams["hide-pages"]};EditorUi.prototype.createTemporaryGraph=function(b){return Graph.createOffscreenGraph(b)};EditorUi.prototype.addChromelessClickHandler=function(){var b=urlParams.highlight;null!=b&&0<b.length&&(b="#"+b);this.editor.graph.addClickHandler(b)};
EditorUi.prototype.toggleFormatPanel=function(b){b=null!=b?b:0==this.formatWidth;null!=this.format&&(this.formatWidth=b?240:0,this.formatContainer.style.display=b?"":"none",this.refresh(),this.format.refresh(),this.fireEvent(new mxEventObject("formatWidthChanged")))};
EditorUi.prototype.lightboxFit=function(b){if(this.isDiagramEmpty())this.editor.graph.view.setScale(1);else{var e=urlParams.border,k=60;null!=e&&(k=parseInt(e));this.editor.graph.maxFitScale=this.lightboxMaxFitScale;this.editor.graph.fit(k,null,null,null,null,null,b);this.editor.graph.maxFitScale=null}};EditorUi.prototype.isDiagramEmpty=function(){var b=this.editor.graph.getModel();return 1==b.getChildCount(b.root)&&0==b.getChildCount(b.getChildAt(b.root,0))};
@@ -2213,11 +2228,11 @@ this.container.appendChild(this.sidebarFooterContainer);this.container.appendChi
!0,0,mxUtils.bind(this,function(e){this.hsplitPosition=e;this.refresh()})))};EditorUi.prototype.createStatusContainer=function(){var b=document.createElement("a");b.className="geItem geStatus";return b};EditorUi.prototype.setStatusText=function(b){this.statusContainer.innerHTML=b;0==this.statusContainer.getElementsByTagName("div").length&&(this.statusContainer.innerText="",b=this.createStatusDiv(b),this.statusContainer.appendChild(b))};
EditorUi.prototype.createStatusDiv=function(b){var e=document.createElement("div");e.setAttribute("title",b);e.innerHTML=b;return e};EditorUi.prototype.createToolbar=function(b){return new Toolbar(this,b)};EditorUi.prototype.createSidebar=function(b){return new Sidebar(this,b)};EditorUi.prototype.createFormat=function(b){return new Format(this,b)};EditorUi.prototype.createFooter=function(){return this.createDiv("geFooter")};
EditorUi.prototype.createDiv=function(b){var e=document.createElement("div");e.className=b;return e};
-EditorUi.prototype.addSplitHandler=function(b,e,k,n){function D(q){if(null!=E){var z=new mxPoint(mxEvent.getClientX(q),mxEvent.getClientY(q));n(Math.max(0,d+(e?z.x-E.x:E.y-z.y)-k));mxEvent.consume(q);d!=m()&&(f=!0,g=null)}}function t(q){D(q);E=d=null}var E=null,d=null,f=!0,g=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var m=mxUtils.bind(this,function(){var q=parseInt(e?b.style.left:b.style.bottom);e||(q=q+k-this.footerHeight);return q});mxEvent.addGestureListeners(b,function(q){E=new mxPoint(mxEvent.getClientX(q),
-mxEvent.getClientY(q));d=m();f=!1;mxEvent.consume(q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(q){if(!f&&this.hsplitClickEnabled){var z=null!=g?g-k:0;g=m();n(z);mxEvent.consume(q)}}));mxEvent.addGestureListeners(document,null,D,t);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,t)})};
+EditorUi.prototype.addSplitHandler=function(b,e,k,n){function D(q){if(null!=E){var z=new mxPoint(mxEvent.getClientX(q),mxEvent.getClientY(q));n(Math.max(0,d+(e?z.x-E.x:E.y-z.y)-k));mxEvent.consume(q);d!=l()&&(f=!0,g=null)}}function t(q){D(q);E=d=null}var E=null,d=null,f=!0,g=null;mxClient.IS_POINTER&&(b.style.touchAction="none");var l=mxUtils.bind(this,function(){var q=parseInt(e?b.style.left:b.style.bottom);e||(q=q+k-this.footerHeight);return q});mxEvent.addGestureListeners(b,function(q){E=new mxPoint(mxEvent.getClientX(q),
+mxEvent.getClientY(q));d=l();f=!1;mxEvent.consume(q)});mxEvent.addListener(b,"click",mxUtils.bind(this,function(q){if(!f&&this.hsplitClickEnabled){var z=null!=g?g-k:0;g=l();n(z);mxEvent.consume(q)}}));mxEvent.addGestureListeners(document,null,D,t);this.destroyFunctions.push(function(){mxEvent.removeGestureListeners(document,null,D,t)})};
EditorUi.prototype.prompt=function(b,e,k){b=new FilenameDialog(this,e,mxResources.get("apply"),function(n){k(parseFloat(n))},b);this.showDialog(b.container,300,80,!0,!0);b.init()};
EditorUi.prototype.handleError=function(b,e,k,n,D){b=null!=b&&null!=b.error?b.error:b;if(null!=b||null!=e){D=mxUtils.htmlEntities(mxResources.get("unknownError"));var t=mxResources.get("ok");e=null!=e?e:mxResources.get("error");null!=b&&null!=b.message&&(D=mxUtils.htmlEntities(b.message));this.showError(e,D,t,k,null,null,null,null,null,null,null,null,n?k:null)}else null!=k&&k()};
-EditorUi.prototype.showError=function(b,e,k,n,D,t,E,d,f,g,m,q,z){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),n,D,t,E,q,d,f);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,g||340,m||100+20*e,!0,!1,z);b.init()};EditorUi.prototype.showDialog=function(b,e,k,n,D,t,E,d,f,g){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,n,D,t,E,d,f,g);this.dialogs.push(this.dialog)};
+EditorUi.prototype.showError=function(b,e,k,n,D,t,E,d,f,g,l,q,z){b=new ErrorDialog(this,b,e,k||mxResources.get("ok"),n,D,t,E,q,d,f);e=Math.ceil(null!=e?e.length/50:1);this.showDialog(b.container,g||340,l||100+20*e,!0,!1,z);b.init()};EditorUi.prototype.showDialog=function(b,e,k,n,D,t,E,d,f,g){this.editor.graph.tooltipHandler.resetTimer();this.editor.graph.tooltipHandler.hideTooltip();null==this.dialogs&&(this.dialogs=[]);this.dialog=new Dialog(this,b,e,k,n,D,t,E,d,f,g);this.dialogs.push(this.dialog)};
EditorUi.prototype.hideDialog=function(b,e,k){null!=this.dialogs&&0<this.dialogs.length&&(null==k||k==this.dialog.container.firstChild)&&(k=this.dialogs.pop(),0==k.close(b,e)?this.dialogs.push(k):(this.dialog=0<this.dialogs.length?this.dialogs[this.dialogs.length-1]:null,this.editor.fireEvent(new mxEventObject("hideDialog")),null==this.dialog&&"hidden"!=this.editor.graph.container.style.visibility&&window.setTimeout(mxUtils.bind(this,function(){this.editor.graph.isEditing()&&null!=this.editor.graph.cellEditor.textarea?
this.editor.graph.cellEditor.textarea.focus():(mxUtils.clearSelection(),this.editor.graph.container.focus())}),0)))};EditorUi.prototype.ctrlEnter=function(){var b=this.editor.graph;if(b.isEnabled())try{for(var e=b.getSelectionCells(),k=new mxDictionary,n=[],D=0;D<e.length;D++){var t=b.isTableCell(e[D])?b.model.getParent(e[D]):e[D];null==t||k.get(t)||(k.put(t,!0),n.push(t))}b.setSelectionCells(b.duplicateCells(n,!1))}catch(E){this.handleError(E)}};
EditorUi.prototype.pickColor=function(b,e){var k=this.editor.graph,n=k.cellEditor.saveSelection(),D=230+17*(Math.ceil(ColorDialog.prototype.presetColors.length/12)+Math.ceil(ColorDialog.prototype.defaultColors.length/12));b=new ColorDialog(this,mxUtils.rgba2hex(b)||"none",function(t){k.cellEditor.restoreSelection(n);e(t)},function(){k.cellEditor.restoreSelection(n)});this.showDialog(b.container,230,D,!0,!1);b.init()};
@@ -2225,7 +2240,7 @@ EditorUi.prototype.openFile=function(){window.openFile=new OpenFile(mxUtils.bind
EditorUi.prototype.extractGraphModelFromHtml=function(b){var e=null;try{var k=b.indexOf("&lt;mxGraphModel ");if(0<=k){var n=b.lastIndexOf("&lt;/mxGraphModel&gt;");n>k&&(e=b.substring(k,n+21).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}}catch(D){}return e};
EditorUi.prototype.readGraphModelFromClipboard=function(b){this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(e){null!=e?b(e):this.readGraphModelFromClipboardWithType(mxUtils.bind(this,function(k){if(null!=k){var n=decodeURIComponent(k);this.isCompatibleString(n)&&(k=n)}b(k)}),"text")}),"html")};
EditorUi.prototype.readGraphModelFromClipboardWithType=function(b,e){navigator.clipboard.read().then(mxUtils.bind(this,function(k){if(null!=k&&0<k.length&&"html"==e&&0<=mxUtils.indexOf(k[0].types,"text/html"))k[0].getType("text/html").then(mxUtils.bind(this,function(n){n.text().then(mxUtils.bind(this,function(D){try{var t=this.parseHtmlData(D),E="text/plain"!=t.getAttribute("data-type")?t.innerHTML:mxUtils.trim(null==t.innerText?mxUtils.getTextContent(t):t.innerText);try{var d=E.lastIndexOf("%3E");
-0<=d&&d<E.length-3&&(E=E.substring(0,d+3))}catch(m){}try{var f=t.getElementsByTagName("span"),g=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(E);this.isCompatibleString(g)&&(E=g)}catch(m){}}catch(m){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(n){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(n){n.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
+0<=d&&d<E.length-3&&(E=E.substring(0,d+3))}catch(l){}try{var f=t.getElementsByTagName("span"),g=null!=f&&0<f.length?mxUtils.trim(decodeURIComponent(f[0].textContent)):decodeURIComponent(E);this.isCompatibleString(g)&&(E=g)}catch(l){}}catch(l){}b(this.isCompatibleString(E)?E:null)}))["catch"](function(D){b(null)})}))["catch"](function(n){b(null)});else if(null!=k&&0<k.length&&"text"==e&&0<=mxUtils.indexOf(k[0].types,"text/plain"))k[0].getType("text/plain").then(function(n){n.text().then(function(D){b(D)})["catch"](function(){b(null)})})["catch"](function(){b(null)});
else b(null)}))["catch"](function(k){b(null)})};
EditorUi.prototype.parseHtmlData=function(b){var e=null;if(null!=b&&0<b.length){var k="<meta "==b.substring(0,6);e=document.createElement("div");e.innerHTML=(k?'<meta charset="utf-8">':"")+this.editor.graph.sanitizeHtml(b);asHtml=!0;b=e.getElementsByTagName("style");if(null!=b)for(;0<b.length;)b[0].parentNode.removeChild(b[0]);null!=e.firstChild&&e.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&null!=e.firstChild.nextSibling&&e.firstChild.nextSibling.nodeType==mxConstants.NODETYPE_ELEMENT&&"META"==
e.firstChild.nodeName&&"A"==e.firstChild.nextSibling.nodeName&&null==e.firstChild.nextSibling.nextSibling&&(b=null==e.firstChild.nextSibling.innerText?mxUtils.getTextContent(e.firstChild.nextSibling):e.firstChild.nextSibling.innerText,b==e.firstChild.nextSibling.getAttribute("href")&&(mxUtils.setTextContent(e,b),asHtml=!1));k=k&&null!=e.firstChild?e.firstChild.nextSibling:e.firstChild;null!=k&&null==k.nextSibling&&k.nodeType==mxConstants.NODETYPE_ELEMENT&&"IMG"==k.nodeName?(b=k.getAttribute("src"),
@@ -2242,12 +2257,12 @@ EditorUi.prototype.showBackgroundImageDialog=function(b,e){b=null!=b?b:mxUtils.b
EditorUi.prototype.setBackgroundImage=function(b){this.editor.graph.setBackgroundImage(b);this.editor.graph.view.validateBackgroundImage();this.fireEvent(new mxEventObject("backgroundImageChanged"))};EditorUi.prototype.confirm=function(b,e,k){mxUtils.confirm(b)?null!=e&&e():null!=k&&k()};EditorUi.prototype.createOutline=function(b){var e=new mxOutline(this.editor.graph);mxEvent.addListener(window,"resize",function(){e.update(!1)});return e};
EditorUi.prototype.altShiftActions={67:"clearWaypoints",65:"connectionArrows",76:"editLink",80:"connectionPoints",84:"editTooltip",86:"pasteSize",88:"copySize",66:"copyData",69:"pasteData"};
EditorUi.prototype.createKeyHandler=function(b){function e(q,z,F){if(!n.isSelectionEmpty()&&n.isEnabled()){z=null!=z?z:1;var C=n.getCompositeParents(n.getSelectionCells()),I=0<C.length?C[0]:null;if(null!=I)if(F){n.getModel().beginUpdate();try{for(I=0;I<C.length;I++)if(n.getModel().isVertex(C[I])&&n.isCellResizable(C[I])){var G=n.getCellGeometry(C[I]);null!=G&&(G=G.clone(),37==q?G.width=Math.max(0,G.width-z):38==q?G.height=Math.max(0,G.height-z):39==q?G.width+=z:40==q&&(G.height+=z),n.getModel().setGeometry(C[I],
-G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(I);var Z=n.getView().scale;F=null;1==n.getSelectionCount()&&n.model.isVertex(I)&&null!=n.layoutManager&&!n.isCellLocked(I)&&(F=n.layoutManager.getLayout(G));if(null!=F&&F.constructor==mxStackLayout)z=G.getIndex(I),37==q||38==q?n.model.add(G,I,Math.max(0,z-1)):(39==q||40==q)&&n.model.add(G,I,Math.min(n.model.getChildCount(G),z+1));else{var fa=n.graphHandler;null!=fa&&(null==fa.first&&fa.start(I,0,0,C),null!=fa.first&&(I=C=0,37==q?C=-z:
-38==q?I=-z:39==q?C=z:40==q&&(I=z),fa.currentDx+=C*Z,fa.currentDy+=I*Z,fa.checkPreview(),fa.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=fa.first){var ba=fa.roundLength(fa.currentDx/Z),Y=fa.roundLength(fa.currentDy/Z);fa.moveCells(fa.cells,ba,Y);fa.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
+G))}}finally{n.getModel().endUpdate()}}else{G=n.model.getParent(I);var Z=n.getView().scale;F=null;1==n.getSelectionCount()&&n.model.isVertex(I)&&null!=n.layoutManager&&!n.isCellLocked(I)&&(F=n.layoutManager.getLayout(G));if(null!=F&&F.constructor==mxStackLayout)z=G.getIndex(I),37==q||38==q?n.model.add(G,I,Math.max(0,z-1)):(39==q||40==q)&&n.model.add(G,I,Math.min(n.model.getChildCount(G),z+1));else{var ca=n.graphHandler;null!=ca&&(null==ca.first&&ca.start(I,0,0,C),null!=ca.first&&(I=C=0,37==q?C=-z:
+38==q?I=-z:39==q?C=z:40==q&&(I=z),ca.currentDx+=C*Z,ca.currentDy+=I*Z,ca.checkPreview(),ca.updatePreview()),null!=E&&window.clearTimeout(E),E=window.setTimeout(function(){if(null!=ca.first){var ba=ca.roundLength(ca.currentDx/Z),Y=ca.roundLength(ca.currentDy/Z);ca.moveCells(ca.cells,ba,Y);ca.reset()}},400))}}}}var k=this,n=this.editor.graph,D=new mxKeyHandler(n),t=D.isEventIgnored;D.isEventIgnored=function(q){return!(mxEvent.isShiftDown(q)&&9==q.keyCode)&&(!this.isControlDown(q)||mxEvent.isShiftDown(q)||
90!=q.keyCode&&89!=q.keyCode&&188!=q.keyCode&&190!=q.keyCode&&85!=q.keyCode)&&(66!=q.keyCode&&73!=q.keyCode||!this.isControlDown(q)||this.graph.cellEditor.isContentEditing()&&!mxClient.IS_FF&&!mxClient.IS_SF)&&t.apply(this,arguments)};D.isEnabledForEvent=function(q){return!mxEvent.isConsumed(q)&&this.isGraphEvent(q)&&this.isEnabled()&&(null==k.dialogs||0==k.dialogs.length)};D.isControlDown=function(q){return mxEvent.isControlDown(q)||mxClient.IS_MAC&&q.metaKey};var E=null,d={37:mxConstants.DIRECTION_WEST,
38:mxConstants.DIRECTION_NORTH,39:mxConstants.DIRECTION_EAST,40:mxConstants.DIRECTION_SOUTH},f=D.getFunction;mxKeyHandler.prototype.getFunction=function(q){if(n.isEnabled()){if(mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){var z=k.actions.get(k.altShiftActions[q.keyCode]);if(null!=z)return z.funct}if(null!=d[q.keyCode]&&!n.isSelectionEmpty())if(!this.isControlDown(q)&&mxEvent.isShiftDown(q)&&mxEvent.isAltDown(q)){if(n.model.isVertex(n.getSelectionCell()))return function(){var F=n.connectVertex(n.getSelectionCell(),
d[q.keyCode],n.defaultEdgeLength,q,!0);null!=F&&0<F.length&&(1==F.length&&n.model.isEdge(F[0])?n.setSelectionCell(n.model.getTerminal(F[0],!1)):n.setSelectionCell(F[F.length-1]),n.scrollCellToVisible(n.getSelectionCell()),null!=k.hoverIcons&&k.hoverIcons.update(n.view.getState(n.getSelectionCell())))}}else return this.isControlDown(q)?function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null,!0)}:function(){e(q.keyCode,mxEvent.isShiftDown(q)?n.gridSize:null)}}return f.apply(this,arguments)};D.bindAction=
-mxUtils.bind(this,function(q,z,F,C){var I=this.actions.get(F);null!=I&&(F=function(){I.isEnabled()&&I.funct()},z?C?D.bindControlShiftKey(q,F):D.bindControlKey(q,F):C?D.bindShiftKey(q,F):D.bindKey(q,F))});var g=this,m=D.escape;D.escape=function(q){m.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){n.exitGroup()});D.bindControlShiftKey(35,function(){n.enterGroup()});D.bindShiftKey(36,function(){n.home()});D.bindKey(35,function(){n.refresh()});D.bindAction(107,!0,"zoomIn");
+mxUtils.bind(this,function(q,z,F,C){var I=this.actions.get(F);null!=I&&(F=function(){I.isEnabled()&&I.funct()},z?C?D.bindControlShiftKey(q,F):D.bindControlKey(q,F):C?D.bindShiftKey(q,F):D.bindKey(q,F))});var g=this,l=D.escape;D.escape=function(q){l.apply(this,arguments)};D.enter=function(){};D.bindControlShiftKey(36,function(){n.exitGroup()});D.bindControlShiftKey(35,function(){n.enterGroup()});D.bindShiftKey(36,function(){n.home()});D.bindKey(35,function(){n.refresh()});D.bindAction(107,!0,"zoomIn");
D.bindAction(109,!0,"zoomOut");D.bindAction(80,!0,"print");D.bindAction(79,!0,"outline",!0);if(!this.editor.chromeless||this.editor.editable)D.bindControlKey(36,function(){n.isEnabled()&&n.foldCells(!0)}),D.bindControlKey(35,function(){n.isEnabled()&&n.foldCells(!1)}),D.bindControlKey(13,function(){g.ctrlEnter()}),D.bindAction(8,!1,"delete"),D.bindAction(8,!0,"deleteAll"),D.bindAction(8,!1,"deleteLabels",!0),D.bindAction(46,!1,"delete"),D.bindAction(46,!0,"deleteAll"),D.bindAction(46,!1,"deleteLabels",
!0),D.bindAction(36,!1,"resetView"),D.bindAction(72,!0,"fitWindow",!0),D.bindAction(74,!0,"fitPage"),D.bindAction(74,!0,"fitTwoPages",!0),D.bindAction(48,!0,"customZoom"),D.bindAction(82,!0,"turn"),D.bindAction(82,!0,"clearDefaultStyle",!0),D.bindAction(83,!0,"save"),D.bindAction(83,!0,"saveAs",!0),D.bindAction(65,!0,"selectAll"),D.bindAction(65,!0,"selectNone",!0),D.bindAction(73,!0,"selectVertices",!0),D.bindAction(69,!0,"selectEdges",!0),D.bindAction(69,!0,"editStyle"),D.bindAction(66,!0,"bold"),
D.bindAction(66,!0,"toBack",!0),D.bindAction(70,!0,"toFront",!0),D.bindAction(68,!0,"duplicate"),D.bindAction(68,!0,"setAsDefaultStyle",!0),D.bindAction(90,!0,"undo"),D.bindAction(89,!0,"autosize",!0),D.bindAction(88,!0,"cut"),D.bindAction(67,!0,"copy"),D.bindAction(86,!0,"paste"),D.bindAction(71,!0,"group"),D.bindAction(77,!0,"editData"),D.bindAction(71,!0,"grid",!0),D.bindAction(73,!0,"italic"),D.bindAction(76,!0,"lockUnlock"),D.bindAction(76,!0,"layers",!0),D.bindAction(80,!0,"formatPanel",!0),
@@ -2258,41 +2273,41 @@ this.keyupHandler),this.keyupHandler=null);null!=this.resizeHandler&&(mxEvent.re
this.scrollHandler=null);if(null!=this.destroyFunctions){for(b=0;b<this.destroyFunctions.length;b++)this.destroyFunctions[b]();this.destroyFunctions=null}var e=[this.menubarContainer,this.toolbarContainer,this.sidebarContainer,this.formatContainer,this.diagramContainer,this.footerContainer,this.chromelessToolbar,this.hsplit,this.sidebarFooterContainer,this.layersDialog];for(b=0;b<e.length;b++)null!=e[b]&&null!=e[b].parentNode&&e[b].parentNode.removeChild(e[b])};(function(){var b=[["nbsp","160"],["shy","173"]],e=mxUtils.parseXml;mxUtils.parseXml=function(k){for(var n=0;n<b.length;n++)k=k.replace(new RegExp("&"+b[n][0]+";","g"),"&#"+b[n][1]+";");return e(k)}})();
Date.prototype.toISOString||function(){function b(e){e=String(e);1===e.length&&(e="0"+e);return e}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+b(this.getUTCMonth()+1)+"-"+b(this.getUTCDate())+"T"+b(this.getUTCHours())+":"+b(this.getUTCMinutes())+":"+b(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"}}();Date.now||(Date.now=function(){return(new Date).getTime()});
Uint8Array.from||(Uint8Array.from=function(){var b=Object.prototype.toString,e=function(n){return"function"===typeof n||"[object Function]"===b.call(n)},k=Math.pow(2,53)-1;return function(n){var D=Object(n);if(null==n)throw new TypeError("Array.from requires an array-like object - not null or undefined");var t=1<arguments.length?arguments[1]:void 0,E;if("undefined"!==typeof t){if(!e(t))throw new TypeError("Array.from: when provided, the second argument must be a function");2<arguments.length&&(E=
-arguments[2])}var d=Number(D.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),k);for(var f=e(this)?Object(new this(d)):Array(d),g=0,m;g<d;)m=D[g],f[g]=t?"undefined"===typeof E?t(m,g):t.call(E,m,g):m,g+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
+arguments[2])}var d=Number(D.length);d=isNaN(d)?0:0!==d&&isFinite(d)?(0<d?1:-1)*Math.floor(Math.abs(d)):d;d=Math.min(Math.max(d,0),k);for(var f=e(this)?Object(new this(d)):Array(d),g=0,l;g<d;)l=D[g],f[g]=t?"undefined"===typeof E?t(l,g):t.call(E,l,g):l,g+=1;f.length=d;return f}}());mxConstants.POINTS=1;mxConstants.MILLIMETERS=2;mxConstants.INCHES=3;mxConstants.METERS=4;mxConstants.PIXELS_PER_MM=3.937;mxConstants.PIXELS_PER_INCH=100;mxConstants.SHADOW_OPACITY=.25;mxConstants.SHADOWCOLOR="#000000";
mxConstants.VML_SHADOWCOLOR="#d0d0d0";mxCodec.allowlist="mxStylesheet Array mxGraphModel mxCell mxGeometry mxRectangle mxPoint mxChildChange mxRootChange mxTerminalChange mxValueChange mxStyleChange mxGeometryChange mxCollapseChange mxVisibleChange mxCellAttributeChange".split(" ");mxGraph.prototype.pageBreakColor="#c0c0c0";mxGraph.prototype.pageScale=1;
(function(){try{if(null!=navigator&&null!=navigator.language){var b=navigator.language.toLowerCase();mxGraph.prototype.pageFormat="en-us"===b||"en-ca"===b||"es-mx"===b?mxConstants.PAGE_FORMAT_LETTER_PORTRAIT:mxConstants.PAGE_FORMAT_A4_PORTRAIT}}catch(e){}})();mxText.prototype.baseSpacingTop=5;mxText.prototype.baseSpacingBottom=1;mxGraphModel.prototype.ignoreRelativeEdgeParent=!1;
mxGraphView.prototype.gridImage=mxClient.IS_SVG?"data:image/gif;base64,R0lGODlhCgAKAJEAAAAAAP///8zMzP///yH5BAEAAAMALAAAAAAKAAoAAAIJ1I6py+0Po2wFADs=":IMAGE_PATH+"/grid.gif";mxGraphView.prototype.gridSteps=4;mxGraphView.prototype.minGridSize=4;mxGraphView.prototype.defaultGridColor="#d0d0d0";mxGraphView.prototype.defaultDarkGridColor="#6e6e6e";mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultGridColor;mxGraphView.prototype.unit=mxConstants.POINTS;
mxGraphView.prototype.setUnit=function(b){this.unit!=b&&(this.unit=b,this.fireEvent(new mxEventObject("unitChanged","unit",b)))};mxSvgCanvas2D.prototype.foAltText="[Not supported by viewer]";mxShape.prototype.getConstraints=function(b,e,k){return null};
mxImageShape.prototype.getImageDataUri=function(){var b=this.image;if("data:image/svg+xml;base64,"==b.substring(0,26)&&null!=this.style&&"1"==mxUtils.getValue(this.style,"clipSvg","0")){if(null==this.clippedSvg||this.clippedImage!=b)this.clippedSvg=Graph.clipSvgDataUri(b,!0),this.clippedImage=b;b=this.clippedSvg}return b};
Graph=function(b,e,k,n,D,t){mxGraph.call(this,b,e,k,n);this.themes=D||this.defaultThemes;this.currentEdgeStyle=mxUtils.clone(this.defaultEdgeStyle);this.currentVertexStyle=mxUtils.clone(this.defaultVertexStyle);this.standalone=null!=t?t:!1;b=this.baseUrl;e=b.indexOf("//");this.domainPathUrl=this.domainUrl="";0<e&&(e=b.indexOf("/",e+2),0<e&&(this.domainUrl=b.substring(0,e)),e=b.lastIndexOf("/"),0<e&&(this.domainPathUrl=b.substring(0,e+1)));this.isHtmlLabel=function(M){M=this.getCurrentCellStyle(M);
-return null!=M?"1"==M.html||"wrap"==M[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,m=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,ia){if("mouseDown"==ia.getProperty("eventName")&&this.isEnabled()){M=ia.getProperty("event");var N=M.getState();ia=this.view.scale;if(!mxEvent.isAltDown(M.getEvent())&&null!=N)if(this.model.isEdge(N.cell))if(E=new mxPoint(M.getGraphX(),M.getGraphY()),m=this.isCellSelected(N.cell),f=N,d=M,null!=N.text&&
-null!=N.text.boundingBox&&mxUtils.contains(N.text.boundingBox,M.getGraphX(),M.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var P=this.selectionCellsHandler.getHandler(N.cell);null!=P&&null!=P.bends&&0<P.bends.length&&(g=P.getHandleForEvent(M))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(M.getEvent())&&(P=this.selectionCellsHandler.getHandler(N.cell),null==P||null==P.getHandleForEvent(M))){var aa=new mxRectangle(M.getGraphX()-1,M.getGraphY()-1),la=mxEvent.isTouchEvent(M.getEvent())?
-mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;P=la+2;aa.grow(la);if(this.isTableCell(N.cell)&&!this.isCellSelected(N.cell)&&!(mxUtils.contains(N,M.getGraphX()-P,M.getGraphY()-P)&&mxUtils.contains(N,M.getGraphX()-P,M.getGraphY()+P)&&mxUtils.contains(N,M.getGraphX()+P,M.getGraphY()+P)&&mxUtils.contains(N,M.getGraphX()+P,M.getGraphY()-P))){var u=this.model.getParent(N.cell);P=this.model.getParent(u);if(!this.isCellSelected(P)){la*=ia;var H=2*la;if(this.model.getChildAt(P,
-0)!=u&&mxUtils.intersects(aa,new mxRectangle(N.x,N.y-la,N.width,H))||this.model.getChildAt(u,0)!=N.cell&&mxUtils.intersects(aa,new mxRectangle(N.x-la,N.y,H,N.height))||mxUtils.intersects(aa,new mxRectangle(N.x,N.y+N.height-la,N.width,H))||mxUtils.intersects(aa,new mxRectangle(N.x+N.width-la,N.y,H,N.height)))u=this.selectionCellsHandler.isHandled(P),this.selectCellForEvent(P,M.getEvent()),P=this.selectionCellsHandler.getHandler(P),null!=P&&(la=P.getHandleForEvent(M),null!=la&&(P.start(M.getGraphX(),
-M.getGraphY(),la),P.blockDelayedSelection=!u,M.consume()))}}for(;!M.isConsumed()&&null!=N&&(this.isTableCell(N.cell)||this.isTableRow(N.cell)||this.isTable(N.cell));)this.isSwimlane(N.cell)&&(P=this.getActualStartSize(N.cell),(0<P.x||0<P.width)&&mxUtils.intersects(aa,new mxRectangle(N.x+(P.x-P.width-1)*ia+(0==P.x?N.width:0),N.y,1,N.height))||(0<P.y||0<P.height)&&mxUtils.intersects(aa,new mxRectangle(N.x,N.y+(P.y-P.height-1)*ia+(0==P.y?N.height:0),N.width,1)))&&(this.selectCellForEvent(N.cell,M.getEvent()),
-P=this.selectionCellsHandler.getHandler(N.cell),null!=P&&(la=mxEvent.CUSTOM_HANDLE-P.customHandles.length+1,P.start(M.getGraphX(),M.getGraphY(),la),M.consume())),N=this.view.getState(this.model.getParent(N.cell))}}}));this.addMouseListener({mouseDown:function(M,ia){},mouseMove:mxUtils.bind(this,function(M,ia){M=this.selectionCellsHandler.handlers.map;for(var N in M)if(null!=M[N].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(ia.getEvent())){var P=this.tolerance;
-if(null!=E&&null!=f&&null!=d){if(N=f,Math.abs(E.x-ia.getGraphX())>P||Math.abs(E.y-ia.getGraphY())>P){var aa=this.selectionCellsHandler.getHandler(N.cell);null==aa&&this.model.isEdge(N.cell)&&(aa=this.createHandler(N));if(null!=aa&&null!=aa.bends&&0<aa.bends.length){M=aa.getHandleForEvent(d);var la=this.view.getEdgeStyle(N);P=la==mxEdgeStyle.EntityRelation;m||g!=mxEvent.LABEL_HANDLE||(M=g);if(P&&0!=M&&M!=aa.bends.length-1&&M!=mxEvent.LABEL_HANDLE)!P||null==N.visibleSourceState&&null==N.visibleTargetState||
-(this.graphHandler.reset(),ia.consume());else if(M==mxEvent.LABEL_HANDLE||0==M||null!=N.visibleSourceState||M==aa.bends.length-1||null!=N.visibleTargetState)P||M==mxEvent.LABEL_HANDLE||(P=N.absolutePoints,null!=P&&(null==la&&null==M||la==mxEdgeStyle.OrthConnector)&&(M=g,null==M&&(M=new mxRectangle(E.x,E.y),M.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(M,P[0].x,P[0].y)?M=0:mxUtils.contains(M,P[P.length-1].x,P[P.length-1].y)?M=aa.bends.length-1:null!=la&&(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)))?M=2:(M=mxUtils.findNearestSegment(N,E.x,E.y),M=null==la?mxEvent.VIRTUAL_HANDLE-M:M+1))),null==M&&(M=mxEvent.VIRTUAL_HANDLE)),aa.start(ia.getGraphX(),ia.getGraphX(),M),ia.consume(),this.graphHandler.reset()}null!=aa&&(this.selectionCellsHandler.isHandlerActive(aa)?this.isCellSelected(N.cell)||(this.selectionCellsHandler.handlers.put(N.cell,aa),this.selectCellForEvent(N.cell,ia.getEvent())):
-this.isCellSelected(N.cell)||aa.destroy());m=!1;E=d=f=g=null}}else if(N=ia.getState(),null!=N&&this.isCellEditable(N.cell)){aa=null;if(this.model.isEdge(N.cell)){if(M=new mxRectangle(ia.getGraphX(),ia.getGraphY()),M.grow(mxEdgeHandler.prototype.handleImage.width/2),P=N.absolutePoints,null!=P)if(null!=N.text&&null!=N.text.boundingBox&&mxUtils.contains(N.text.boundingBox,ia.getGraphX(),ia.getGraphY()))aa="move";else if(mxUtils.contains(M,P[0].x,P[0].y)||mxUtils.contains(M,P[P.length-1].x,P[P.length-
-1].y))aa="pointer";else if(null!=N.visibleSourceState||null!=N.visibleTargetState)M=this.view.getEdgeStyle(N),aa="crosshair",M!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(N)&&(ia=mxUtils.findNearestSegment(N,ia.getGraphX(),ia.getGraphY()),ia<P.length-1&&0<=ia&&(aa=0==Math.round(P[ia].x-P[ia+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(ia.getEvent())){P=mxShape.prototype.svgStrokeTolerance/2;M=new mxRectangle(ia.getGraphX(),ia.getGraphY());M.grow(P);if(this.isTableCell(N.cell)&&
-(ia=this.model.getParent(N.cell),P=this.model.getParent(ia),!this.isCellSelected(P)))if(mxUtils.intersects(M,new mxRectangle(N.x,N.y-2,N.width,4))&&this.model.getChildAt(P,0)!=ia||mxUtils.intersects(M,new mxRectangle(N.x,N.y+N.height-2,N.width,4)))aa="row-resize";else if(mxUtils.intersects(M,new mxRectangle(N.x-2,N.y,4,N.height))&&this.model.getChildAt(ia,0)!=N.cell||mxUtils.intersects(M,new mxRectangle(N.x+N.width-2,N.y,4,N.height)))aa="col-resize";for(ia=N;null==aa&&null!=ia&&(this.isTableCell(ia.cell)||
-this.isTableRow(ia.cell)||this.isTable(ia.cell));)this.isSwimlane(ia.cell)&&(P=this.getActualStartSize(ia.cell),la=this.view.scale,(0<P.x||0<P.width)&&mxUtils.intersects(M,new mxRectangle(ia.x+(P.x-P.width-1)*la+(0==P.x?ia.width*la:0),ia.y,1,ia.height))?aa="col-resize":(0<P.y||0<P.height)&&mxUtils.intersects(M,new mxRectangle(ia.x,ia.y+(P.y-P.height-1)*la+(0==P.y?ia.height:0),ia.width,1))&&(aa="row-resize")),ia=this.view.getState(this.model.getParent(ia.cell))}null!=aa&&N.setCursor(aa)}}}),mouseUp:mxUtils.bind(this,
-function(M,ia){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(M){var ia=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);M.view.graph.isHtmlLabel(M.cell)&&(ia=1!=M.style.html?mxUtils.htmlEntities(ia,!1):M.view.graph.sanitizeHtml(ia));return ia};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(M,ia){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var M=q.apply(this,arguments);if(this.graph.pageVisible){var ia=[],N=this.graph.pageFormat,
-P=this.graph.pageScale,aa=N.width*P;N=N.height*P;P=this.graph.view.translate;for(var la=this.graph.view.scale,u=this.graph.getPageLayout(),H=0;H<u.width;H++)ia.push(new mxRectangle(((u.x+H)*aa+P.x)*la,(u.y*N+P.y)*la,aa*la,N*la));for(H=1;H<u.height;H++)ia.push(new mxRectangle((u.x*aa+P.x)*la,((u.y+H)*N+P.y)*la,aa*la,N*la));M=ia.concat(M)}return M};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(M,ia){return null==M.cell?"#ffa500":mxConstants.GUIDE_COLOR};
-this.graphHandler.createPreviewShape=function(M){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var z=this.graphHandler.getCells;this.graphHandler.getCells=function(M){for(var ia=z.apply(this,arguments),N=new mxDictionary,P=[],aa=0;aa<ia.length;aa++){var la=this.graph.isTableCell(M)&&this.graph.isTableCell(ia[aa])&&this.graph.isCellSelected(ia[aa])?this.graph.model.getParent(ia[aa]):
-this.graph.isTableRow(M)&&this.graph.isTableRow(ia[aa])&&this.graph.isCellSelected(ia[aa])?ia[aa]:this.graph.getCompositeParent(ia[aa]);null==la||N.get(la)||(N.put(la,!0),P.push(la))}return P};var F=this.graphHandler.start;this.graphHandler.start=function(M,ia,N,P){var aa=!1;this.graph.isTableCell(M)&&(this.graph.isCellSelected(M)?aa=!0:M=this.graph.model.getParent(M));aa||this.graph.isTableRow(M)&&this.graph.isCellSelected(M)||(M=this.graph.getCompositeParent(M));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=
-function(M,ia){ia=this.graph.getCompositeParent(ia);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var I=(new Date).getTime(),G=0,Z=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var M=this.currentState;Z.apply(this,arguments);M!=this.currentState?(I=(new Date).getTime(),G=0):G=(new Date).getTime()-I};var fa=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
-function(M){return mxEvent.isShiftDown(M.getEvent())&&mxEvent.isAltDown(M.getEvent())?!1:null!=this.currentState&&M.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&fa.apply(this,arguments)};var ba=this.isToggleEvent;this.isToggleEvent=function(M){return ba.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M)};var Y=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(M){return Y.apply(this,
-arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==M.getState()&&mxEvent.isTouchEvent(M.getEvent())};var pa=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(pa=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=
-pa)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(M){return mxEvent.isMouseEvent(M.getEvent())};var O=this.click;this.click=function(M){var ia=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);if(this.isEnabled()&&!ia||M.isConsumed())return O.apply(this,arguments);var N=ia?M.sourceState.cell:M.getCell();null!=N&&(N=this.getClickableLinkForCell(N),null!=N&&(this.isCustomLink(N)?this.customLinkClicked(N):this.openLink(N)));this.isEnabled()&&
-ia&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};var W=this.tooltipHandler.show;this.tooltipHandler.show=function(){W.apply(this,arguments);if(null!=this.div)for(var M=this.div.getElementsByTagName("a"),ia=0;ia<M.length;ia++)null!=M[ia].getAttribute("href")&&null==M[ia].getAttribute("target")&&M[ia].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};this.getCursorForMouseEvent=function(M){var ia=
-null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);return this.getCursorForCell(ia?M.sourceState.cell:M.getCell())};var ha=this.getCursorForCell;this.getCursorForCell=function(M){if(!this.isEnabled()||this.isCellLocked(M)){if(null!=this.getClickableLinkForCell(M))return"pointer";if(this.isCellLocked(M))return"default"}return ha.apply(this,arguments)};this.selectRegion=function(M,ia){var N=mxEvent.isAltDown(ia)?M:null;M=this.getCells(M.x,M.y,M.width,M.height,null,null,N,function(P){return"1"==
-mxUtils.getValue(P.style,"locked","0")},!0);if(this.isToggleEvent(ia))for(N=0;N<M.length;N++)this.selectCellForEvent(M[N],ia);else this.selectCellsForEvent(M,ia);return M};var U=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(M,ia,N){return this.graph.isCellSelected(M)?!1:U.apply(this,arguments)};this.isCellLocked=function(M){for(;null!=M;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(M),"locked","0"))return!0;M=this.model.getParent(M)}return!1};
-var ma=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,ia){"mouseDown"==ia.getProperty("eventName")&&(M=ia.getProperty("event").getState(),ma=null==M||this.isSelectionEmpty()||this.isCellSelected(M.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(M,ia){if(!mxEvent.isMultiTouchEvent(ia)){M=ia.getProperty("event");var N=ia.getProperty("cell");null==N?(M=mxUtils.convertPoint(this.container,mxEvent.getClientX(M),mxEvent.getClientY(M)),
-C.start(M.x,M.y)):null!=ma?this.addSelectionCells(ma):1<this.getSelectionCount()&&this.isCellSelected(N)&&this.removeSelectionCell(N);ma=null;ia.consume()}}));this.connectionHandler.selectCells=function(M,ia){this.graph.setSelectionCell(ia||M)};this.connectionHandler.constraintHandler.isStateIgnored=function(M,ia){var N=M.view.graph;return ia&&(N.isCellSelected(M.cell)||N.isTableRow(M.cell)&&N.selectionCellsHandler.isHandled(N.model.getParent(M.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
-mxUtils.bind(this,function(){var M=this.connectionHandler.constraintHandler;null!=M.currentFocus&&M.isStateIgnored(M.currentFocus,!0)&&(M.currentFocus=null,M.constraints=null,M.destroyIcons());M.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var T=this.updateMouseEvent;this.updateMouseEvent=function(M){M=T.apply(this,arguments);null!=M.state&&this.isCellLocked(M.getCell())&&(M.state=null);return M}}this.currentTranslate=new mxPoint(0,0)};
+return null!=M?"1"==M.html||"wrap"==M[mxConstants.STYLE_WHITE_SPACE]:!1};if(this.edgeMode){var E=null,d=null,f=null,g=null,l=!1;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,ka){if("mouseDown"==ka.getProperty("eventName")&&this.isEnabled()){M=ka.getProperty("event");var L=M.getState();ka=this.view.scale;if(!mxEvent.isAltDown(M.getEvent())&&null!=L)if(this.model.isEdge(L.cell))if(E=new mxPoint(M.getGraphX(),M.getGraphY()),l=this.isCellSelected(L.cell),f=L,d=M,null!=L.text&&
+null!=L.text.boundingBox&&mxUtils.contains(L.text.boundingBox,M.getGraphX(),M.getGraphY()))g=mxEvent.LABEL_HANDLE;else{var S=this.selectionCellsHandler.getHandler(L.cell);null!=S&&null!=S.bends&&0<S.bends.length&&(g=S.getHandleForEvent(M))}else if(!this.panningHandler.isActive()&&!mxEvent.isControlDown(M.getEvent())&&(S=this.selectionCellsHandler.getHandler(L.cell),null==S||null==S.getHandleForEvent(M))){var ja=new mxRectangle(M.getGraphX()-1,M.getGraphY()-1),ma=mxEvent.isTouchEvent(M.getEvent())?
+mxShape.prototype.svgStrokeTolerance-1:(mxShape.prototype.svgStrokeTolerance+2)/2;S=ma+2;ja.grow(ma);if(this.isTableCell(L.cell)&&!this.isCellSelected(L.cell)&&!(mxUtils.contains(L,M.getGraphX()-S,M.getGraphY()-S)&&mxUtils.contains(L,M.getGraphX()-S,M.getGraphY()+S)&&mxUtils.contains(L,M.getGraphX()+S,M.getGraphY()+S)&&mxUtils.contains(L,M.getGraphX()+S,M.getGraphY()-S))){var u=this.model.getParent(L.cell);S=this.model.getParent(u);if(!this.isCellSelected(S)){ma*=ka;var H=2*ma;if(this.model.getChildAt(S,
+0)!=u&&mxUtils.intersects(ja,new mxRectangle(L.x,L.y-ma,L.width,H))||this.model.getChildAt(u,0)!=L.cell&&mxUtils.intersects(ja,new mxRectangle(L.x-ma,L.y,H,L.height))||mxUtils.intersects(ja,new mxRectangle(L.x,L.y+L.height-ma,L.width,H))||mxUtils.intersects(ja,new mxRectangle(L.x+L.width-ma,L.y,H,L.height)))u=this.selectionCellsHandler.isHandled(S),this.selectCellForEvent(S,M.getEvent()),S=this.selectionCellsHandler.getHandler(S),null!=S&&(ma=S.getHandleForEvent(M),null!=ma&&(S.start(M.getGraphX(),
+M.getGraphY(),ma),S.blockDelayedSelection=!u,M.consume()))}}for(;!M.isConsumed()&&null!=L&&(this.isTableCell(L.cell)||this.isTableRow(L.cell)||this.isTable(L.cell));)this.isSwimlane(L.cell)&&(S=this.getActualStartSize(L.cell),(0<S.x||0<S.width)&&mxUtils.intersects(ja,new mxRectangle(L.x+(S.x-S.width-1)*ka+(0==S.x?L.width:0),L.y,1,L.height))||(0<S.y||0<S.height)&&mxUtils.intersects(ja,new mxRectangle(L.x,L.y+(S.y-S.height-1)*ka+(0==S.y?L.height:0),L.width,1)))&&(this.selectCellForEvent(L.cell,M.getEvent()),
+S=this.selectionCellsHandler.getHandler(L.cell),null!=S&&(ma=mxEvent.CUSTOM_HANDLE-S.customHandles.length+1,S.start(M.getGraphX(),M.getGraphY(),ma),M.consume())),L=this.view.getState(this.model.getParent(L.cell))}}}));this.addMouseListener({mouseDown:function(M,ka){},mouseMove:mxUtils.bind(this,function(M,ka){M=this.selectionCellsHandler.handlers.map;for(var L in M)if(null!=M[L].index)return;if(this.isEnabled()&&!this.panningHandler.isActive()&&!mxEvent.isAltDown(ka.getEvent())){var S=this.tolerance;
+if(null!=E&&null!=f&&null!=d){if(L=f,Math.abs(E.x-ka.getGraphX())>S||Math.abs(E.y-ka.getGraphY())>S){var ja=this.selectionCellsHandler.getHandler(L.cell);null==ja&&this.model.isEdge(L.cell)&&(ja=this.createHandler(L));if(null!=ja&&null!=ja.bends&&0<ja.bends.length){M=ja.getHandleForEvent(d);var ma=this.view.getEdgeStyle(L);S=ma==mxEdgeStyle.EntityRelation;l||g!=mxEvent.LABEL_HANDLE||(M=g);if(S&&0!=M&&M!=ja.bends.length-1&&M!=mxEvent.LABEL_HANDLE)!S||null==L.visibleSourceState&&null==L.visibleTargetState||
+(this.graphHandler.reset(),ka.consume());else if(M==mxEvent.LABEL_HANDLE||0==M||null!=L.visibleSourceState||M==ja.bends.length-1||null!=L.visibleTargetState)S||M==mxEvent.LABEL_HANDLE||(S=L.absolutePoints,null!=S&&(null==ma&&null==M||ma==mxEdgeStyle.OrthConnector)&&(M=g,null==M&&(M=new mxRectangle(E.x,E.y),M.grow(mxEdgeHandler.prototype.handleImage.width/2),mxUtils.contains(M,S[0].x,S[0].y)?M=0:mxUtils.contains(M,S[S.length-1].x,S[S.length-1].y)?M=ja.bends.length-1:null!=ma&&(2==S.length||3==S.length&&
+(0==Math.round(S[0].x-S[1].x)&&0==Math.round(S[1].x-S[2].x)||0==Math.round(S[0].y-S[1].y)&&0==Math.round(S[1].y-S[2].y)))?M=2:(M=mxUtils.findNearestSegment(L,E.x,E.y),M=null==ma?mxEvent.VIRTUAL_HANDLE-M:M+1))),null==M&&(M=mxEvent.VIRTUAL_HANDLE)),ja.start(ka.getGraphX(),ka.getGraphX(),M),ka.consume(),this.graphHandler.reset()}null!=ja&&(this.selectionCellsHandler.isHandlerActive(ja)?this.isCellSelected(L.cell)||(this.selectionCellsHandler.handlers.put(L.cell,ja),this.selectCellForEvent(L.cell,ka.getEvent())):
+this.isCellSelected(L.cell)||ja.destroy());l=!1;E=d=f=g=null}}else if(L=ka.getState(),null!=L&&this.isCellEditable(L.cell)){ja=null;if(this.model.isEdge(L.cell)){if(M=new mxRectangle(ka.getGraphX(),ka.getGraphY()),M.grow(mxEdgeHandler.prototype.handleImage.width/2),S=L.absolutePoints,null!=S)if(null!=L.text&&null!=L.text.boundingBox&&mxUtils.contains(L.text.boundingBox,ka.getGraphX(),ka.getGraphY()))ja="move";else if(mxUtils.contains(M,S[0].x,S[0].y)||mxUtils.contains(M,S[S.length-1].x,S[S.length-
+1].y))ja="pointer";else if(null!=L.visibleSourceState||null!=L.visibleTargetState)M=this.view.getEdgeStyle(L),ja="crosshair",M!=mxEdgeStyle.EntityRelation&&this.isOrthogonal(L)&&(ka=mxUtils.findNearestSegment(L,ka.getGraphX(),ka.getGraphY()),ka<S.length-1&&0<=ka&&(ja=0==Math.round(S[ka].x-S[ka+1].x)?"col-resize":"row-resize"))}else if(!mxEvent.isControlDown(ka.getEvent())){S=mxShape.prototype.svgStrokeTolerance/2;M=new mxRectangle(ka.getGraphX(),ka.getGraphY());M.grow(S);if(this.isTableCell(L.cell)&&
+(ka=this.model.getParent(L.cell),S=this.model.getParent(ka),!this.isCellSelected(S)))if(mxUtils.intersects(M,new mxRectangle(L.x,L.y-2,L.width,4))&&this.model.getChildAt(S,0)!=ka||mxUtils.intersects(M,new mxRectangle(L.x,L.y+L.height-2,L.width,4)))ja="row-resize";else if(mxUtils.intersects(M,new mxRectangle(L.x-2,L.y,4,L.height))&&this.model.getChildAt(ka,0)!=L.cell||mxUtils.intersects(M,new mxRectangle(L.x+L.width-2,L.y,4,L.height)))ja="col-resize";for(ka=L;null==ja&&null!=ka&&(this.isTableCell(ka.cell)||
+this.isTableRow(ka.cell)||this.isTable(ka.cell));)this.isSwimlane(ka.cell)&&(S=this.getActualStartSize(ka.cell),ma=this.view.scale,(0<S.x||0<S.width)&&mxUtils.intersects(M,new mxRectangle(ka.x+(S.x-S.width-1)*ma+(0==S.x?ka.width*ma:0),ka.y,1,ka.height))?ja="col-resize":(0<S.y||0<S.height)&&mxUtils.intersects(M,new mxRectangle(ka.x,ka.y+(S.y-S.height-1)*ma+(0==S.y?ka.height:0),ka.width,1))&&(ja="row-resize")),ka=this.view.getState(this.model.getParent(ka.cell))}null!=ja&&L.setCursor(ja)}}}),mouseUp:mxUtils.bind(this,
+function(M,ka){g=E=d=f=null})})}this.cellRenderer.minSvgStrokeWidth=.1;this.cellRenderer.getLabelValue=function(M){var ka=mxCellRenderer.prototype.getLabelValue.apply(this,arguments);M.view.graph.isHtmlLabel(M.cell)&&(ka=1!=M.style.html?mxUtils.htmlEntities(ka,!1):M.view.graph.sanitizeHtml(ka));return ka};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(M,ka){return!1};this.alternateEdgeStyle="vertical";null==n&&this.loadStylesheet();var q=this.graphHandler.getGuideStates;this.graphHandler.getGuideStates=function(){var M=q.apply(this,arguments);if(this.graph.pageVisible){var ka=[],L=this.graph.pageFormat,
+S=this.graph.pageScale,ja=L.width*S;L=L.height*S;S=this.graph.view.translate;for(var ma=this.graph.view.scale,u=this.graph.getPageLayout(),H=0;H<u.width;H++)ka.push(new mxRectangle(((u.x+H)*ja+S.x)*ma,(u.y*L+S.y)*ma,ja*ma,L*ma));for(H=1;H<u.height;H++)ka.push(new mxRectangle((u.x*ja+S.x)*ma,((u.y+H)*L+S.y)*ma,ja*ma,L*ma));M=ka.concat(M)}return M};mxDragSource.prototype.dragElementZIndex=mxPopupMenu.prototype.zIndex;mxGuide.prototype.getGuideColor=function(M,ka){return null==M.cell?"#ffa500":mxConstants.GUIDE_COLOR};
+this.graphHandler.createPreviewShape=function(M){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};var z=this.graphHandler.getCells;this.graphHandler.getCells=function(M){for(var ka=z.apply(this,arguments),L=new mxDictionary,S=[],ja=0;ja<ka.length;ja++){var ma=this.graph.isTableCell(M)&&this.graph.isTableCell(ka[ja])&&this.graph.isCellSelected(ka[ja])?this.graph.model.getParent(ka[ja]):
+this.graph.isTableRow(M)&&this.graph.isTableRow(ka[ja])&&this.graph.isCellSelected(ka[ja])?ka[ja]:this.graph.getCompositeParent(ka[ja]);null==ma||L.get(ma)||(L.put(ma,!0),S.push(ma))}return S};var F=this.graphHandler.start;this.graphHandler.start=function(M,ka,L,S){var ja=!1;this.graph.isTableCell(M)&&(this.graph.isCellSelected(M)?ja=!0:M=this.graph.model.getParent(M));ja||this.graph.isTableRow(M)&&this.graph.isCellSelected(M)||(M=this.graph.getCompositeParent(M));F.apply(this,arguments)};this.connectionHandler.createTargetVertex=
+function(M,ka){ka=this.graph.getCompositeParent(ka);return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var C=new mxRubberband(this);this.getRubberband=function(){return C};var I=(new Date).getTime(),G=0,Z=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var M=this.currentState;Z.apply(this,arguments);M!=this.currentState?(I=(new Date).getTime(),G=0):G=(new Date).getTime()-I};var ca=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=
+function(M){return mxEvent.isShiftDown(M.getEvent())&&mxEvent.isAltDown(M.getEvent())?!1:null!=this.currentState&&M.getState()==this.currentState&&2E3<G||(null==this.currentState||"0"!=mxUtils.getValue(this.currentState.style,"outlineConnect","1"))&&ca.apply(this,arguments)};var ba=this.isToggleEvent;this.isToggleEvent=function(M){return ba.apply(this,arguments)||!mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M)};var Y=C.isForceRubberbandEvent;C.isForceRubberbandEvent=function(M){return Y.apply(this,
+arguments)||mxClient.IS_CHROMEOS&&mxEvent.isShiftDown(M.getEvent())||mxUtils.hasScrollbars(this.graph.container)&&mxClient.IS_FF&&mxClient.IS_WIN&&null==M.getState()&&mxEvent.isTouchEvent(M.getEvent())};var O=null;this.panningHandler.addListener(mxEvent.PAN_START,mxUtils.bind(this,function(){this.isEnabled()&&(O=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=
+O)}));this.popupMenuHandler.autoExpand=!0;this.popupMenuHandler.isSelectOnPopup=function(M){return mxEvent.isMouseEvent(M.getEvent())};var la=this.click;this.click=function(M){var ka=null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);if(this.isEnabled()&&!ka||M.isConsumed())return la.apply(this,arguments);var L=ka?M.sourceState.cell:M.getCell();null!=L&&(L=this.getClickableLinkForCell(L),null!=L&&(this.isCustomLink(L)?this.customLinkClicked(L):this.openLink(L)));this.isEnabled()&&
+ka&&this.clearSelection()};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};var aa=this.tooltipHandler.show;this.tooltipHandler.show=function(){aa.apply(this,arguments);if(null!=this.div)for(var M=this.div.getElementsByTagName("a"),ka=0;ka<M.length;ka++)null!=M[ka].getAttribute("href")&&null==M[ka].getAttribute("target")&&M[ka].setAttribute("target","_blank")};this.tooltipHandler.getStateForEvent=function(M){return M.sourceState};this.getCursorForMouseEvent=function(M){var ka=
+null==M.state&&null!=M.sourceState&&this.isCellLocked(M.sourceState.cell);return this.getCursorForCell(ka?M.sourceState.cell:M.getCell())};var ia=this.getCursorForCell;this.getCursorForCell=function(M){if(!this.isEnabled()||this.isCellLocked(M)){if(null!=this.getClickableLinkForCell(M))return"pointer";if(this.isCellLocked(M))return"default"}return ia.apply(this,arguments)};this.selectRegion=function(M,ka){var L=mxEvent.isAltDown(ka)?M:null;M=this.getCells(M.x,M.y,M.width,M.height,null,null,L,function(S){return"1"==
+mxUtils.getValue(S.style,"locked","0")},!0);if(this.isToggleEvent(ka))for(L=0;L<M.length;L++)this.selectCellForEvent(M[L],ka);else this.selectCellsForEvent(M,ka);return M};var X=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(M,ka,L){return this.graph.isCellSelected(M)?!1:X.apply(this,arguments)};this.isCellLocked=function(M){for(;null!=M;){if("1"==mxUtils.getValue(this.getCurrentCellStyle(M),"locked","0"))return!0;M=this.model.getParent(M)}return!1};
+var R=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(M,ka){"mouseDown"==ka.getProperty("eventName")&&(M=ka.getProperty("event").getState(),R=null==M||this.isSelectionEmpty()||this.isCellSelected(M.cell)?null:this.getSelectionCells())}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(M,ka){if(!mxEvent.isMultiTouchEvent(ka)){M=ka.getProperty("event");var L=ka.getProperty("cell");null==L?(M=mxUtils.convertPoint(this.container,mxEvent.getClientX(M),mxEvent.getClientY(M)),
+C.start(M.x,M.y)):null!=R?this.addSelectionCells(R):1<this.getSelectionCount()&&this.isCellSelected(L)&&this.removeSelectionCell(L);R=null;ka.consume()}}));this.connectionHandler.selectCells=function(M,ka){this.graph.setSelectionCell(ka||M)};this.connectionHandler.constraintHandler.isStateIgnored=function(M,ka){var L=M.view.graph;return ka&&(L.isCellSelected(M.cell)||L.isTableRow(M.cell)&&L.selectionCellsHandler.isHandled(L.model.getParent(M.cell)))};this.selectionModel.addListener(mxEvent.CHANGE,
+mxUtils.bind(this,function(){var M=this.connectionHandler.constraintHandler;null!=M.currentFocus&&M.isStateIgnored(M.currentFocus,!0)&&(M.currentFocus=null,M.constraints=null,M.destroyIcons());M.destroyFocusHighlight()}));Graph.touchStyle&&this.initTouch();var sa=this.updateMouseEvent;this.updateMouseEvent=function(M){M=sa.apply(this,arguments);null!=M.state&&this.isCellLocked(M.getCell())&&(M.state=null);return M}}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.translateDiagram="1"==urlParams["translate-diagram"];Graph.diagramLanguage=null!=urlParams["diagram-language"]?urlParams["diagram-language"]:mxClient.language;Graph.lineJumpsEnabled=!0;
Graph.defaultJumpSize=6;Graph.zoomWheel=!1;Graph.minTableColumnWidth=20;Graph.minTableRowHeight=20;Graph.foreignObjectWarningText="Text is not SVG - cannot display";Graph.foreignObjectWarningLink="https://www.diagrams.net/doc/faq/svg-export-text-problems";Graph.xmlDeclaration='<?xml version="1.0" encoding="UTF-8"?>';Graph.svgDoctype='<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">';Graph.svgFileComment="\x3c!-- Do not edit this file with editors other than diagrams.net --\x3e";
Graph.pasteStyles="rounded shadow dashed dashPattern fontFamily fontSource 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(" ");
@@ -2311,33 +2326,33 @@ Graph.setTransitionForNodes=function(b,e){for(var k=0;k<b.length;k++)mxUtils.set
Graph.sanitizeHtml=function(b,e){return Graph.domPurify(b,!1)};Graph.sanitizeLink=function(b){var e=document.createElement("a");e.setAttribute("href",b);Graph.sanitizeNode(e);return e.getAttribute("href")};Graph.sanitizeNode=function(b){return Graph.domPurify(b,!0)};DOMPurify.addHook("afterSanitizeAttributes",function(b){"use"==b.nodeName&&b.hasAttribute("xlink:href")&&!b.getAttribute("xlink:href").match(/^#/)&&b.remove()});
Graph.domPurify=function(b,e){window.DOM_PURIFY_CONFIG.IN_PLACE=e;return DOMPurify.sanitize(b,window.DOM_PURIFY_CONFIG)};
Graph.clipSvgDataUri=function(b,e){if(!mxClient.IS_IE&&!mxClient.IS_IE11&&null!=b&&"data:image/svg+xml;base64,"==b.substring(0,26))try{var k=document.createElement("div");k.style.position="absolute";k.style.visibility="hidden";var n=decodeURIComponent(escape(atob(b.substring(26)))),D=n.indexOf("<svg");if(0<=D){k.innerHTML=Graph.sanitizeHtml(n.substring(D));var t=k.getElementsByTagName("svg");if(0<t.length){if(e||null!=t[0].getAttribute("preserveAspectRatio")){document.body.appendChild(k);try{n=e=
-1;var E=t[0].getAttribute("width"),d=t[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;d=null!=d&&"%"!=d.charAt(d.length-1)?parseFloat(d):NaN;var f=t[0].getAttribute("viewBox");if(null!=f&&!isNaN(E)&&!isNaN(d)){var g=f.split(" ");4<=f.length&&(e=parseFloat(g[2])/E,n=parseFloat(g[3])/d)}var m=t[0].getBBox();0<m.width&&0<m.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",m.x+" "+m.y+" "+m.width+" "+m.height),k.getElementsByTagName("svg")[0].setAttribute("width",
-m.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",m.height/n))}catch(q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(t[0]))}}}catch(q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
+1;var E=t[0].getAttribute("width"),d=t[0].getAttribute("height");E=null!=E&&"%"!=E.charAt(E.length-1)?parseFloat(E):NaN;d=null!=d&&"%"!=d.charAt(d.length-1)?parseFloat(d):NaN;var f=t[0].getAttribute("viewBox");if(null!=f&&!isNaN(E)&&!isNaN(d)){var g=f.split(" ");4<=f.length&&(e=parseFloat(g[2])/E,n=parseFloat(g[3])/d)}var l=t[0].getBBox();0<l.width&&0<l.height&&(k.getElementsByTagName("svg")[0].setAttribute("viewBox",l.x+" "+l.y+" "+l.width+" "+l.height),k.getElementsByTagName("svg")[0].setAttribute("width",
+l.width/e),k.getElementsByTagName("svg")[0].setAttribute("height",l.height/n))}catch(q){}finally{document.body.removeChild(k)}}b=Editor.createSvgDataUri(mxUtils.getXml(t[0]))}}}catch(q){}return b};Graph.stripQuotes=function(b){null!=b&&("'"==b.charAt(0)&&(b=b.substring(1)),"'"==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)),'"'==b.charAt(0)&&(b=b.substring(1)),'"'==b.charAt(b.length-1)&&(b=b.substring(0,b.length-1)));return b};
Graph.createRemoveIcon=function(b,e){var k=document.createElement("img");k.setAttribute("src",Dialog.prototype.clearImage);k.setAttribute("title",b);k.setAttribute("width","13");k.setAttribute("height","10");k.style.marginLeft="4px";k.style.marginBottom="-1px";k.style.cursor="pointer";mxEvent.addListener(k,"click",e);return k};Graph.isPageLink=function(b){return null!=b&&"data:page/id,"==b.substring(0,13)};Graph.isLink=function(b){return null!=b&&Graph.linkPattern.test(b)};
Graph.linkPattern=RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i");mxUtils.extend(Graph,mxGraph);Graph.prototype.minFitScale=null;Graph.prototype.maxFitScale=null;Graph.prototype.linkPolicy="frame"==urlParams.target?"blank":urlParams.target||"auto";Graph.prototype.linkTarget="frame"==urlParams.target?"_self":"_blank";Graph.prototype.linkRelation="nofollow noopener noreferrer";
Graph.prototype.defaultScrollbars=!0;Graph.prototype.defaultPageVisible=!0;Graph.prototype.defaultGridEnabled="0"!=urlParams.grid;Graph.prototype.lightbox=!1;Graph.prototype.defaultPageBackgroundColor="#ffffff";Graph.prototype.defaultPageBorderColor="#ffffff";Graph.prototype.shapeForegroundColor="#000000";Graph.prototype.shapeBackgroundColor="#ffffff";Graph.prototype.scrollTileSize=new mxRectangle(0,0,400,400);Graph.prototype.transparentBackground=!0;Graph.prototype.selectParentAfterDelete=!1;
Graph.prototype.defaultEdgeLength=80;Graph.prototype.edgeMode=!1;Graph.prototype.connectionArrowsEnabled=!0;Graph.prototype.placeholderPattern=RegExp("%(date{.*}|[^%^{^}^ ^\"^ '^=^;]+)%","g");Graph.prototype.absoluteUrlPattern=RegExp("^(?:[a-z]+:)?//","i");Graph.prototype.defaultThemeName="default";Graph.prototype.defaultThemes={};Graph.prototype.baseUrl=null!=urlParams.base?decodeURIComponent(urlParams.base):(window!=window.top?document.referrer:document.location.toString()).split("#")[0];
Graph.prototype.editAfterInsert=!1;Graph.prototype.builtInProperties=["label","tooltip","placeholders","placeholder"];Graph.prototype.standalone=!1;Graph.prototype.enableFlowAnimation=!1;Graph.prototype.roundableShapes="label rectangle internalStorage corner parallelogram swimlane triangle trapezoid ext step tee process link rhombus offPageConnector loopLimit hexagon manualInput card curlyBracket singleArrow callout doubleArrow flexArrow umlLifeline".split(" ");
-Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,t=!0,E=null,d=mxUtils.bind(this,function(m){t=!0;E=new mxPoint(mxEvent.getClientX(m),mxEvent.getClientY(m))}),f=mxUtils.bind(this,function(m){t=t&&null!=E&&Math.abs(E.x-mxEvent.getClientX(m))<D&&Math.abs(E.y-mxEvent.getClientY(m))<D}),g=mxUtils.bind(this,function(m){if(t)for(var q=mxEvent.getSource(m);null!=
-q&&q!=n.node;){if("a"==q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,q,m);break}q=q.parentNode}});mxEvent.addGestureListeners(n.node,d,f,g);mxEvent.addListener(n.node,"click",function(m){mxEvent.consume(m)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var n=mxEvent.getSource(k);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
+Graph.prototype.init=function(b){mxGraph.prototype.init.apply(this,arguments);this.cellRenderer.initializeLabel=function(k,n){mxCellRenderer.prototype.initializeLabel.apply(this,arguments);var D=k.view.graph.tolerance,t=!0,E=null,d=mxUtils.bind(this,function(l){t=!0;E=new mxPoint(mxEvent.getClientX(l),mxEvent.getClientY(l))}),f=mxUtils.bind(this,function(l){t=t&&null!=E&&Math.abs(E.x-mxEvent.getClientX(l))<D&&Math.abs(E.y-mxEvent.getClientY(l))<D}),g=mxUtils.bind(this,function(l){if(t)for(var q=mxEvent.getSource(l);null!=
+q&&q!=n.node;){if("a"==q.nodeName.toLowerCase()){k.view.graph.labelLinkClicked(k,q,l);break}q=q.parentNode}});mxEvent.addGestureListeners(n.node,d,f,g);mxEvent.addListener(n.node,"click",function(l){mxEvent.consume(l)})};if(null!=this.tooltipHandler){var e=this.tooltipHandler.init;this.tooltipHandler.init=function(){e.apply(this,arguments);null!=this.div&&mxEvent.addListener(this.div,"click",mxUtils.bind(this,function(k){var n=mxEvent.getSource(k);"A"==n.nodeName&&(n=n.getAttribute("href"),null!=
n&&this.graph.isCustomLink(n)&&(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&this.graph.customLinkClicked(n)&&mxEvent.consume(k))}))}}this.addListener(mxEvent.SIZE,mxUtils.bind(this,function(k,n){null!=this.container&&this.flowAnimationStyle&&(k=this.flowAnimationStyle.getAttribute("id"),this.flowAnimationStyle.innerHTML=this.getFlowAnimationStyleCss(k))}));this.initLayoutManager()};
(function(){Graph.prototype.useCssTransforms=!1;Graph.prototype.currentScale=1;Graph.prototype.currentTranslate=new mxPoint(0,0);Graph.prototype.isFillState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_FILLCOLOR])&&"1"!=mxUtils.getValue(E.style,"lineShape",null)&&(this.model.isVertex(E.cell)||"arrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"filledEdge"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)||"flexArrow"==mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,
null))};Graph.prototype.isStrokeState=function(E){return!this.isSpecialColor(E.style[mxConstants.STYLE_STROKECOLOR])};Graph.prototype.isSpecialColor=function(E){return 0<=mxUtils.indexOf([mxConstants.STYLE_STROKECOLOR,mxConstants.STYLE_FILLCOLOR,"inherit","swimlane","indicated"],E)};Graph.prototype.isGlassState=function(E){E=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"rectangle"==E||"internalStorage"==E||"ext"==E||"umlLifeline"==E||"swimlane"==E||"process"==E};Graph.prototype.isRoundedState=
function(E){return null!=E.shape?E.shape.isRoundable():0<=mxUtils.indexOf(this.roundableShapes,mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null))};Graph.prototype.isLineJumpState=function(E){var d=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return!mxUtils.getValue(E.style,mxConstants.STYLE_CURVED,!1)&&("connector"==d||"filledEdge"==d)};Graph.prototype.isAutoSizeState=function(E){return"1"==mxUtils.getValue(E.style,mxConstants.STYLE_AUTOSIZE,null)};Graph.prototype.isImageState=function(E){E=
mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null);return"label"==E||"image"==E};Graph.prototype.isShadowState=function(E){return"image"!=mxUtils.getValue(E.style,mxConstants.STYLE_SHAPE,null)};Graph.prototype.getVerticesAndEdges=function(E,d){E=null!=E?E:!0;d=null!=d?d:!0;var f=this.model;return f.filterDescendants(function(g){return E&&f.isVertex(g)||d&&f.isEdge(g)},f.getRoot())};Graph.prototype.getCommonStyle=function(E){for(var d={},f=0;f<E.length;f++){var g=this.view.getState(E[f]);this.mergeStyle(g.style,
-d,0==f)}return d};Graph.prototype.mergeStyle=function(E,d,f){if(null!=E){var g={},m;for(m in E){var q=E[m];null!=q&&(g[m]=!0,null==d[m]&&f?d[m]=q:d[m]!=q&&delete d[m])}for(m in d)g[m]||delete d[m]}};Graph.prototype.getStartEditingCell=function(E,d){d=this.getCellStyle(E);d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==d)&&""==this.getLabel(E)&&0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),d=this.getCellStyle(E),d=parseInt(mxUtils.getValue(d,
+d,0==f)}return d};Graph.prototype.mergeStyle=function(E,d,f){if(null!=E){var g={},l;for(l in E){var q=E[l];null!=q&&(g[l]=!0,null==d[l]&&f?d[l]=q:d[l]!=q&&delete d[l])}for(l in d)g[l]||delete d[l]}};Graph.prototype.getStartEditingCell=function(E,d){d=this.getCellStyle(E);d=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,0));this.isTable(E)&&(!this.isSwimlane(E)||0==d)&&""==this.getLabel(E)&&0<this.model.getChildCount(E)&&(E=this.model.getChildAt(E,0),d=this.getCellStyle(E),d=parseInt(mxUtils.getValue(d,
mxConstants.STYLE_STARTSIZE,0)));if(this.isTableRow(E)&&(!this.isSwimlane(E)||0==d)&&""==this.getLabel(E)&&0<this.model.getChildCount(E))for(d=0;d<this.model.getChildCount(E);d++){var f=this.model.getChildAt(E,d);if(this.isCellEditable(f)){E=f;break}}return E};Graph.prototype.copyStyle=function(E){return this.getCellStyle(E,!1)};Graph.prototype.pasteStyle=function(E,d,f){f=null!=f?f:Graph.pasteStyles;Graph.removeKeys(E,function(g){return 0>mxUtils.indexOf(f,g)});this.updateCellStyles(E,d)};Graph.prototype.updateCellStyles=
-function(E,d){this.model.beginUpdate();try{for(var f=0;f<d.length;f++)if(this.model.isVertex(d[f])||this.model.isEdge(d[f])){var g=this.getCellStyle(d[f],!1),m;for(m in E){var q=E[m];g[m]!=q&&this.setCellStyles(m,q,[d[f]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==
-mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,d,f,g,m,q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,d=d/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,d,f,g,m,q){g=null!=g?g:!0;m=null!=m?m:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var z=this.model.getChildCount(f)-1;0<=
-z;z--){var F=this.model.getChildAt(f,z),C=this.getScaledCellAt(E,d,F,g,m,q);if(null!=C)return C;if(this.isCellVisible(F)&&(m&&this.model.isEdge(F)||g&&this.model.isVertex(F))&&(C=this.view.getState(F),null!=C&&(null==q||!q(C,E,d))&&this.intersects(C,E,d)))return F}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,
-"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var d=this.getCellGeometry(E);null!=d&&d.relative;)E=this.getModel().getParent(E),d=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var d=new mxDictionary,f=[],g=0;g<E.length;g++){var m=this.getCompositeParent(E[g]);this.isTableCell(m)&&(m=this.graph.model.getParent(m));
-this.isTableRow(m)&&(m=this.graph.model.getParent(m));null==m||d.get(m)||(d.put(m,!0),f.push(m))}return f};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var d=this.model.getParent(E);if(!this.model.isVertex(d))break;E=d}return E};Graph.prototype.filterSelectionCells=function(E){var d=this.getSelectionCells();if(null!=E){for(var f=[],g=0;g<d.length;g++)E(d[g])||f.push(d[g]);d=f}return d};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var d=
+function(E,d){this.model.beginUpdate();try{for(var f=0;f<d.length;f++)if(this.model.isVertex(d[f])||this.model.isEdge(d[f])){var g=this.getCellStyle(d[f],!1),l;for(l in E){var q=E[l];g[l]!=q&&this.setCellStyles(l,q,[d[f]])}}}finally{this.model.endUpdate()}};Graph.prototype.isFastZoomEnabled=function(){return"nocss"!=urlParams.zoom&&!mxClient.NO_FO&&!mxClient.IS_EDGE&&!this.useCssTransforms&&(this.isCssTransformsSupported()||mxClient.IS_IOS)};Graph.prototype.isCssTransformsSupported=function(){return this.dialect==
+mxConstants.DIALECT_SVG&&!mxClient.NO_FO&&(!this.lightbox||!mxClient.IS_SF)};Graph.prototype.getCellAt=function(E,d,f,g,l,q){this.useCssTransforms&&(E=E/this.currentScale-this.currentTranslate.x,d=d/this.currentScale-this.currentTranslate.y);return this.getScaledCellAt.apply(this,arguments)};Graph.prototype.getScaledCellAt=function(E,d,f,g,l,q){g=null!=g?g:!0;l=null!=l?l:!0;null==f&&(f=this.getCurrentRoot(),null==f&&(f=this.getModel().getRoot()));if(null!=f)for(var z=this.model.getChildCount(f)-1;0<=
+z;z--){var F=this.model.getChildAt(f,z),C=this.getScaledCellAt(E,d,F,g,l,q);if(null!=C)return C;if(this.isCellVisible(F)&&(l&&this.model.isEdge(F)||g&&this.model.isVertex(F))&&(C=this.view.getState(F),null!=C&&(null==q||!q(C,E,d))&&this.intersects(C,E,d)))return F}return null};Graph.prototype.isRecursiveVertexResize=function(E){return!this.isSwimlane(E.cell)&&0<this.model.getChildCount(E.cell)&&!this.isCellCollapsed(E.cell)&&"1"==mxUtils.getValue(E.style,"recursiveResize","1")&&null==mxUtils.getValue(E.style,
+"childLayout",null)};Graph.prototype.getAbsoluteParent=function(E){for(var d=this.getCellGeometry(E);null!=d&&d.relative;)E=this.getModel().getParent(E),d=this.getCellGeometry(E);return E};Graph.prototype.isPart=function(E){return"1"==mxUtils.getValue(this.getCurrentCellStyle(E),"part","0")||this.isTableCell(E)||this.isTableRow(E)};Graph.prototype.getCompositeParents=function(E){for(var d=new mxDictionary,f=[],g=0;g<E.length;g++){var l=this.getCompositeParent(E[g]);this.isTableCell(l)&&(l=this.graph.model.getParent(l));
+this.isTableRow(l)&&(l=this.graph.model.getParent(l));null==l||d.get(l)||(d.put(l,!0),f.push(l))}return f};Graph.prototype.getCompositeParent=function(E){for(;this.isPart(E);){var d=this.model.getParent(E);if(!this.model.isVertex(d))break;E=d}return E};Graph.prototype.filterSelectionCells=function(E){var d=this.getSelectionCells();if(null!=E){for(var f=[],g=0;g<d.length;g++)E(d[g])||f.push(d[g]);d=f}return d};var b=mxGraph.prototype.scrollRectToVisible;Graph.prototype.scrollRectToVisible=function(E){if(this.useCssTransforms){var d=
this.currentScale,f=this.currentTranslate;E=new mxRectangle((E.x+2*f.x)*d-f.x,(E.y+2*f.y)*d-f.y,E.width*d,E.height*d)}b.apply(this,arguments)};mxCellHighlight.prototype.getStrokeWidth=function(E){E=this.strokeWidth;this.graph.useCssTransforms&&(E/=this.graph.currentScale);return E};mxGraphView.prototype.getGraphBounds=function(){var E=this.graphBounds;if(this.graph.useCssTransforms){var d=this.graph.currentTranslate,f=this.graph.currentScale;E=new mxRectangle((E.x+d.x)*f,(E.y+d.y)*f,E.width*f,E.height*
f)}return E};mxGraphView.prototype.viewStateChanged=function(){this.graph.useCssTransforms?this.validate():this.revalidate();this.graph.sizeDidChange()};var e=mxGraphView.prototype.validate;mxGraphView.prototype.validate=function(E){this.graph.useCssTransforms&&(this.graph.currentScale=this.scale,this.graph.currentTranslate.x=this.translate.x,this.graph.currentTranslate.y=this.translate.y,this.scale=1,this.translate.x=0,this.translate.y=0);e.apply(this,arguments);this.graph.useCssTransforms&&(this.graph.updateCssTransform(),
this.scale=this.graph.currentScale,this.translate.x=this.graph.currentTranslate.x,this.translate.y=this.graph.currentTranslate.y)};var k=mxGraph.prototype.getCellsForGroup;Graph.prototype.getCellsForGroup=function(E){E=k.apply(this,arguments);for(var d=[],f=0;f<E.length;f++)this.isTableRow(E[f])||this.isTableCell(E[f])||d.push(E[f]);return d};var n=mxGraph.prototype.getCellsForUngroup;Graph.prototype.getCellsForUngroup=function(E){E=n.apply(this,arguments);for(var d=[],f=0;f<E.length;f++)this.isTable(E[f])||
this.isTableRow(E[f])||this.isTableCell(E[f])||d.push(E[f]);return d};Graph.prototype.updateCssTransform=function(){var E=this.view.getDrawPane();if(null!=E)if(E=E.parentNode,this.useCssTransforms){var d=E.getAttribute("transform");E.setAttribute("transformOrigin","0 0");var f=Math.round(100*this.currentScale)/100;E.setAttribute("transform","scale("+f+","+f+")translate("+Math.round(100*this.currentTranslate.x)/100+","+Math.round(100*this.currentTranslate.y)/100+")");d!=E.getAttribute("transform")&&
this.fireEvent(new mxEventObject("cssTransformChanged"),"transform",E.getAttribute("transform"))}else E.removeAttribute("transformOrigin"),E.removeAttribute("transform")};var D=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){var E=this.graph.useCssTransforms,d=this.scale,f=this.translate;E&&(this.scale=this.graph.currentScale,this.translate=this.graph.currentTranslate);D.apply(this,arguments);E&&(this.scale=d,this.translate=f)};var t=mxGraph.prototype.updatePageBreaks;
-mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.useCssTransforms,m=this.view.scale,q=this.view.translate;g&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);t.apply(this,arguments);g&&(this.view.scale=m,this.view.translate=q,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
+mxGraph.prototype.updatePageBreaks=function(E,d,f){var g=this.useCssTransforms,l=this.view.scale,q=this.view.translate;g&&(this.view.scale=1,this.view.translate=new mxPoint(0,0),this.useCssTransforms=!1);t.apply(this,arguments);g&&(this.view.scale=l,this.view.translate=q,this.useCssTransforms=!0)}})();Graph.prototype.isLightboxView=function(){return this.lightbox};Graph.prototype.isViewer=function(){return!1};
Graph.prototype.labelLinkClicked=function(b,e,k){e=e.getAttribute("href");if(null!=e&&!this.isCustomLink(e)&&(mxEvent.isLeftMouseButton(k)&&!mxEvent.isPopupTrigger(k)||mxEvent.isTouchEvent(k))){if(!this.isEnabled()||this.isCellLocked(b.cell))b=this.isBlankLink(e)?this.linkTarget:"_top",this.openLink(this.getAbsoluteUrl(e),b);mxEvent.consume(k)}};
Graph.prototype.openLink=function(b,e,k){var n=window;try{if(b=Graph.sanitizeLink(b),null!=b)if("_self"==e&&window!=window.top)window.location.href=b;else if(b.substring(0,this.baseUrl.length)==this.baseUrl&&"#"==b.charAt(this.baseUrl.length)&&"_top"==e&&window==window.top){var D=b.split("#")[1];window.location.hash=="#"+D&&(window.location.hash="");window.location.hash=D}else n=window.open(b,null!=e?e:"_blank"),null==n||k||(n.opener=null)}catch(t){}return n};
Graph.prototype.getLinkTitle=function(b){return b.substring(b.lastIndexOf("/")+1)};Graph.prototype.isCustomLink=function(b){return"data:"==b.substring(0,5)};Graph.prototype.customLinkClicked=function(b){return!1};Graph.prototype.isExternalProtocol=function(b){return"mailto:"===b.substring(0,7)};Graph.prototype.isBlankLink=function(b){return!this.isExternalProtocol(b)&&("blank"===this.linkPolicy||"self"!==this.linkPolicy&&!this.isRelativeUrl(b)&&b.substring(0,this.domainUrl.length)!==this.domainUrl)};
@@ -2351,7 +2366,7 @@ Graph.prototype.createLayouts=function(b){for(var e=[],k=0;k<b.length;k++)if(0<=
Graph.prototype.getDataForCells=function(b){for(var e=[],k=0;k<b.length;k++){var n=null!=b[k].value?b[k].value.attributes:null,D={};D.id=b[k].id;if(null!=n)for(var t=0;t<n.length;t++)D[n[t].nodeName]=n[t].nodeValue;else D.label=this.convertValueToString(b[k]);e.push(D)}return e};
Graph.prototype.getNodesForCells=function(b){for(var e=[],k=0;k<b.length;k++){var n=this.view.getState(b[k]);if(null!=n){for(var D=this.cellRenderer.getShapesForState(n),t=0;t<D.length;t++)null!=D[t]&&null!=D[t].node&&e.push(D[t].node);null!=n.control&&null!=n.control.node&&e.push(n.control.node)}}return e};
Graph.prototype.createWipeAnimations=function(b,e){for(var k=[],n=0;n<b.length;n++){var D=this.view.getState(b[n]);null!=D&&null!=D.shape&&(this.model.isEdge(D.cell)&&null!=D.absolutePoints&&1<D.absolutePoints.length?k.push(this.createEdgeWipeAnimation(D,e)):this.model.isVertex(D.cell)&&null!=D.shape.bounds&&k.push(this.createVertexWipeAnimation(D,e)))}return k};
-Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),n=b.segments,D=b.length,t=k.length;return{execute:mxUtils.bind(this,function(E,d){if(null!=b.shape){var f=[k[0]];d=E/d;e||(d=1-d);for(var g=D*d,m=1;m<t;m++)if(g<=n[m-1]){f.push(new mxPoint(k[m-1].x+(k[m].x-k[m-1].x)*g/n[m-1],k[m-1].y+(k[m].y-k[m-1].y)*g/n[m-1]));break}else g-=n[m-1],f.push(k[m]);b.shape.points=f;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
+Graph.prototype.createEdgeWipeAnimation=function(b,e){var k=b.absolutePoints.slice(),n=b.segments,D=b.length,t=k.length;return{execute:mxUtils.bind(this,function(E,d){if(null!=b.shape){var f=[k[0]];d=E/d;e||(d=1-d);for(var g=D*d,l=1;l<t;l++)if(g<=n[l-1]){f.push(new mxPoint(k[l-1].x+(k[l].x-k[l-1].x)*g/n[l-1],k[l-1].y+(k[l].y-k[l-1].y)*g/n[l-1]));break}else g-=n[l-1],f.push(k[l]);b.shape.points=f;b.shape.redraw();0==E&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1);null!=b.text&&null!=
b.text.node&&(b.text.node.style.opacity=d)}}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.points=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};
Graph.prototype.createVertexWipeAnimation=function(b,e){var k=new mxRectangle.fromRectangle(b.shape.bounds);return{execute:mxUtils.bind(this,function(n,D){null!=b.shape&&(D=n/D,e||(D=1-D),b.shape.bounds=new mxRectangle(k.x,k.y,k.width*D,k.height),b.shape.redraw(),0==n&&Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),1),null!=b.text&&null!=b.text.node&&(b.text.node.style.opacity=D))}),stop:mxUtils.bind(this,function(){null!=b.shape&&(b.shape.bounds=k,b.shape.redraw(),null!=b.text&&null!=b.text.node&&
(b.text.node.style.opacity=""),Graph.setOpacityForNodes(this.getNodesForCells([b.cell]),e?1:0))})}};Graph.prototype.executeAnimations=function(b,e,k,n){k=null!=k?k:30;n=null!=n?n:30;var D=null,t=0,E=mxUtils.bind(this,function(){if(t==k||this.stoppingCustomActions){window.clearInterval(D);for(var d=0;d<b.length;d++)b[d].stop();null!=e&&e()}else for(d=0;d<b.length;d++)b[d].execute(t,k);t++});D=window.setInterval(E,n);E()};
@@ -2364,12 +2379,12 @@ Graph.prototype.getLabel=function(b){var e=mxGraph.prototype.getLabel.apply(this
Graph.prototype.setGridSize=function(b){this.gridSize=b;this.fireEvent(new mxEventObject("gridSizeChanged"))};Graph.prototype.setDefaultParent=function(b){this.defaultParent=b;this.fireEvent(new mxEventObject("defaultParentChanged"))};Graph.prototype.getClickableLinkForCell=function(b){do{var e=this.getLinkForCell(b);if(null!=e)return e;b=this.model.getParent(b)}while(null!=b);return null};
Graph.prototype.getGlobalVariable=function(b){var e=null;"date"==b?e=(new Date).toLocaleDateString():"time"==b?e=(new Date).toLocaleTimeString():"timestamp"==b?e=(new Date).toLocaleString():"date{"==b.substring(0,5)&&(b=b.substring(5,b.length-1),e=this.formatDate(new Date,b));return e};
Graph.prototype.formatDate=function(b,e,k){null==this.dateFormatCache&&(this.dateFormatCache={i18n:{dayNames:"Sun Mon Tue Wed Thu Fri Sat Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),monthNames:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec January February March April May June July August September October November December".split(" ")},masks:{"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",
-shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,E=function(Z,fa){Z=String(Z);for(fa=fa||2;Z.length<fa;)Z="0"+Z;return Z};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
-/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var d=k?"getUTC":"get",f=b[d+"Date"](),g=b[d+"Day"](),m=b[d+"Month"](),q=b[d+"FullYear"](),z=b[d+"Hours"](),F=b[d+"Minutes"](),C=b[d+"Seconds"]();d=b[d+"Milliseconds"]();var I=k?0:b.getTimezoneOffset(),G={d:f,dd:E(f),ddd:n.i18n.dayNames[g],dddd:n.i18n.dayNames[g+7],m:m+1,mm:E(m+1),mmm:n.i18n.monthNames[m],mmmm:n.i18n.monthNames[m+
+shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:ss",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'"}});var n=this.dateFormatCache,D=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,t=/[^-+\dA-Z]/g,E=function(Z,ca){Z=String(Z);for(ca=ca||2;Z.length<ca;)Z="0"+Z;return Z};1!=arguments.length||"[object String]"!=Object.prototype.toString.call(b)||
+/\d/.test(b)||(e=b,b=void 0);b=b?new Date(b):new Date;if(isNaN(b))throw SyntaxError("invalid date");e=String(n.masks[e]||e||n.masks["default"]);"UTC:"==e.slice(0,4)&&(e=e.slice(4),k=!0);var d=k?"getUTC":"get",f=b[d+"Date"](),g=b[d+"Day"](),l=b[d+"Month"](),q=b[d+"FullYear"](),z=b[d+"Hours"](),F=b[d+"Minutes"](),C=b[d+"Seconds"]();d=b[d+"Milliseconds"]();var I=k?0:b.getTimezoneOffset(),G={d:f,dd:E(f),ddd:n.i18n.dayNames[g],dddd:n.i18n.dayNames[g+7],m:l+1,mm:E(l+1),mmm:n.i18n.monthNames[l],mmmm:n.i18n.monthNames[l+
12],yy:String(q).slice(2),yyyy:q,h:z%12||12,hh:E(z%12||12),H:z,HH:E(z),M:F,MM:E(F),s:C,ss:E(C),l:E(d,3),L:E(99<d?Math.round(d/10):d),t:12>z?"a":"p",tt:12>z?"am":"pm",T:12>z?"A":"P",TT:12>z?"AM":"PM",Z:k?"UTC":(String(b).match(D)||[""]).pop().replace(t,""),o:(0<I?"-":"+")+E(100*Math.floor(Math.abs(I)/60)+Math.abs(I)%60,4),S:["th","st","nd","rd"][3<f%10?0:(10!=f%100-f%10)*f%10]};return e.replace(/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZ]|"[^"]*"|'[^']*'/g,function(Z){return Z in G?G[Z]:Z.slice(1,
Z.length-1)})};Graph.prototype.getLayerForCells=function(b){var e=null;if(0<b.length){for(e=b[0];!this.model.isLayer(e);)e=this.model.getParent(e);for(var k=1;k<b.length;k++)if(!this.model.isAncestor(e,b[k])){e=null;break}}return e};
-Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var n=this.getModel(),D=n.getChildCount(n.root),t=0;t<D;t++)mxUtils.bind(this,function(E){function d(){n.isVisible(E)?(m.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(m.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(g,25))}var f=this.convertValueToString(E)||mxResources.get("background")||"Background",g=document.createElement("div");g.style.overflow=
-"hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";g.style.cursor="pointer";g.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[f]));var m=document.createElement("img");m.setAttribute("draggable","false");m.setAttribute("align","absmiddle");m.setAttribute("border","0");m.style.position="relative";m.style.width="16px";m.style.padding="0px 6px 0 4px";e&&(m.style.filter="invert(100%)",m.style.top="-2px");g.appendChild(m);mxUtils.write(g,f);k.appendChild(g);
+Graph.prototype.createLayersDialog=function(b,e){var k=document.createElement("div");k.style.position="absolute";for(var n=this.getModel(),D=n.getChildCount(n.root),t=0;t<D;t++)mxUtils.bind(this,function(E){function d(){n.isVisible(E)?(l.setAttribute("src",Editor.visibleImage),mxUtils.setOpacity(g,75)):(l.setAttribute("src",Editor.hiddenImage),mxUtils.setOpacity(g,25))}var f=this.convertValueToString(E)||mxResources.get("background")||"Background",g=document.createElement("div");g.style.overflow=
+"hidden";g.style.textOverflow="ellipsis";g.style.padding="2px";g.style.whiteSpace="nowrap";g.style.cursor="pointer";g.setAttribute("title",mxResources.get(n.isVisible(E)?"hideIt":"show",[f]));var l=document.createElement("img");l.setAttribute("draggable","false");l.setAttribute("align","absmiddle");l.setAttribute("border","0");l.style.position="relative";l.style.width="16px";l.style.padding="0px 6px 0 4px";e&&(l.style.filter="invert(100%)",l.style.top="-2px");g.appendChild(l);mxUtils.write(g,f);k.appendChild(g);
mxEvent.addListener(g,"click",function(){n.setVisible(E,!n.isVisible(E));d();null!=b&&b(E)});d()})(n.getChildAt(n.root,t));return k};
Graph.prototype.replacePlaceholders=function(b,e,k,n){n=[];if(null!=e){for(var D=0;match=this.placeholderPattern.exec(e);){var t=match[0];if(2<t.length&&"%label%"!=t&&"%tooltip%"!=t){var E=null;if(match.index>D&&"%"==e.charAt(match.index-1))E=t.substring(1);else{var d=t.substring(1,t.length-1);if("id"==d)E=b.id;else if(0>d.indexOf("{"))for(var f=b;null==E&&null!=f;)null!=f.value&&"object"==typeof f.value&&(Graph.translateDiagram&&null!=Graph.diagramLanguage&&(E=f.getAttribute(d+"_"+Graph.diagramLanguage)),
null==E&&(E=f.hasAttribute(d)?null!=f.getAttribute(d)?f.getAttribute(d):"":null)),f=this.model.getParent(f);null==E&&(E=this.getGlobalVariable(d));null==E&&null!=k&&(E=k[d])}n.push(e.substring(D,match.index)+(null!=E?E:t));D=match.index+t.length}}n.push(e.substring(D))}return n.join("")};Graph.prototype.restoreSelection=function(b){if(null!=b&&0<b.length){for(var e=[],k=0;k<b.length;k++){var n=this.model.getCell(b[k].id);null!=n&&e.push(n)}this.setSelectionCells(e)}else this.clearSelection()};
@@ -2379,13 +2394,13 @@ Graph.prototype.selectTableRange=function(b,e){var k=!1;if(this.isTableCell(b)&&
Graph.prototype.snapCellsToGrid=function(b,e){this.getModel().beginUpdate();try{for(var k=0;k<b.length;k++){var n=b[k],D=this.getCellGeometry(n);if(null!=D){D=D.clone();if(this.getModel().isVertex(n))D.x=Math.round(D.x/e)*e,D.y=Math.round(D.y/e)*e,D.width=Math.round(D.width/e)*e,D.height=Math.round(D.height/e)*e;else if(this.getModel().isEdge(n)&&null!=D.points)for(var t=0;t<D.points.length;t++)D.points[t].x=Math.round(D.points[t].x/e)*e,D.points[t].y=Math.round(D.points[t].y/e)*e;this.getModel().setGeometry(n,
D)}}}finally{this.getModel().endUpdate()}};Graph.prototype.selectCellsForConnectVertex=function(b,e,k){2==b.length&&this.model.isVertex(b[1])?(this.setSelectionCell(b[1]),this.scrollCellToVisible(b[1]),null!=k&&(mxEvent.isTouchEvent(e)?k.update(k.getState(this.view.getState(b[1]))):k.reset())):this.setSelectionCells(b)};
Graph.prototype.isCloneConnectSource=function(b){var e=null;null!=this.layoutManager&&(e=this.layoutManager.getLayout(this.model.getParent(b)));return this.isTableRow(b)||this.isTableCell(b)||null!=e&&e.constructor==mxStackLayout};
-Graph.prototype.connectVertex=function(b,e,k,n,D,t,E,d){t=t?t:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),g=f?b:this.getCompositeParent(b),m=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(g.geometry.x,g.geometry.y);e==mxConstants.DIRECTION_NORTH?(m.x+=g.geometry.width/2,m.y-=k):e==
-mxConstants.DIRECTION_SOUTH?(m.x+=g.geometry.width/2,m.y+=g.geometry.height+k):(m.x=e==mxConstants.DIRECTION_WEST?m.x-k:m.x+(g.geometry.width+k),m.y+=g.geometry.height/2);var q=this.view.getState(this.model.getParent(b));k=this.view.scale;var z=this.view.translate;g=z.x*k;z=z.y*k;null!=q&&this.model.isVertex(q.cell)&&(g=q.x,z=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(m.x+=b.parent.geometry.x,m.y+=b.parent.geometry.y);t=t?null:(new mxRectangle(g+m.x*k,z+m.y*k)).grow(40*k);t=null!=t?
+Graph.prototype.connectVertex=function(b,e,k,n,D,t,E,d){t=t?t:!1;if(b.geometry.relative&&this.model.isEdge(b.parent))return[];for(;b.geometry.relative&&this.model.isVertex(b.parent);)b=b.parent;var f=this.isCloneConnectSource(b),g=f?b:this.getCompositeParent(b),l=b.geometry.relative&&null!=b.parent.geometry?new mxPoint(b.parent.geometry.width*b.geometry.x,b.parent.geometry.height*b.geometry.y):new mxPoint(g.geometry.x,g.geometry.y);e==mxConstants.DIRECTION_NORTH?(l.x+=g.geometry.width/2,l.y-=k):e==
+mxConstants.DIRECTION_SOUTH?(l.x+=g.geometry.width/2,l.y+=g.geometry.height+k):(l.x=e==mxConstants.DIRECTION_WEST?l.x-k:l.x+(g.geometry.width+k),l.y+=g.geometry.height/2);var q=this.view.getState(this.model.getParent(b));k=this.view.scale;var z=this.view.translate;g=z.x*k;z=z.y*k;null!=q&&this.model.isVertex(q.cell)&&(g=q.x,z=q.y);this.model.isVertex(b.parent)&&b.geometry.relative&&(l.x+=b.parent.geometry.x,l.y+=b.parent.geometry.y);t=t?null:(new mxRectangle(g+l.x*k,z+l.y*k)).grow(40*k);t=null!=t?
this.getCells(0,0,0,0,null,null,t,null,!0):null;q=this.view.getState(b);var F=null,C=null;if(null!=t){t=t.reverse();for(var I=0;I<t.length;I++)if(!this.isCellLocked(t[I])&&!this.model.isEdge(t[I])&&t[I]!=b)if(!this.model.isAncestor(b,t[I])&&this.isContainer(t[I])&&(null==F||t[I]==this.model.getParent(b)))F=t[I];else if(null==C&&this.isCellConnectable(t[I])&&!this.model.isAncestor(t[I],b)&&!this.isSwimlane(t[I])){var G=this.view.getState(t[I]);null==q||null==G||mxUtils.intersects(q,G)||(C=t[I])}}var Z=
-!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;Z&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?m.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=b.geometry.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-b.geometry.width/2:m.x+b.geometry.width/2);var fa=[],ba=C;C=F;D=mxUtils.bind(this,function(Y){if(null==E||null!=Y||null==C&&f){this.model.beginUpdate();try{if(null==ba&&Z){var pa=this.getAbsoluteParent(null!=Y?Y:b);pa=f?b:this.getCompositeParent(pa);ba=null!=Y?Y:this.duplicateCells([pa],
-!1)[0];null!=Y&&this.addCells([ba],this.model.getParent(b),null,null,null,!0);var O=this.getCellGeometry(ba);null!=O&&(null!=Y&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?m.y-=O.height/2:e==mxConstants.DIRECTION_SOUTH?m.y+=O.height/2:m.x=e==mxConstants.DIRECTION_WEST?m.x-O.width/2:m.x+O.width/2),O.x=m.x-O.width/2,O.y=m.y-O.height/2);null!=F?(this.addCells([ba],F,null,null,null,!0),C=null):Z&&!f&&this.addCells([ba],this.getDefaultParent(),null,null,null,!0)}var W=mxEvent.isControlDown(n)&&
-mxEvent.isShiftDown(n)&&Z||null==C&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,ba,this.createCurrentEdgeStyle());if(null!=W&&this.connectionHandler.insertBeforeSource){var ha=null;for(Y=b;null!=Y.parent&&null!=Y.geometry&&Y.geometry.relative&&Y.parent!=W.parent;)Y=this.model.getParent(Y);null!=Y&&null!=Y.parent&&Y.parent==W.parent&&(ha=Y.parent.getIndex(Y),this.model.add(Y.parent,W,ha))}null==C&&null!=ba&&null!=b.parent&&f&&e==mxConstants.DIRECTION_WEST&&(ha=b.parent.getIndex(b),this.model.add(b.parent,
-ba,ha));null!=W&&fa.push(W);null==C&&null!=ba&&fa.push(ba);null==ba&&null!=W&&W.geometry.setTerminalPoint(m,!1);null!=W&&this.fireEvent(new mxEventObject("cellsInserted","cells",[W]))}finally{this.model.endUpdate()}}if(null!=d)d(fa);else return fa});if(null==E||null!=ba||!Z||null==C&&f)return D(ba);E(g+m.x*k,z+m.y*k,D)};
+!mxEvent.isShiftDown(n)||mxEvent.isControlDown(n)||D;Z&&("1"!=urlParams.sketch||D)&&(e==mxConstants.DIRECTION_NORTH?l.y-=b.geometry.height/2:e==mxConstants.DIRECTION_SOUTH?l.y+=b.geometry.height/2:l.x=e==mxConstants.DIRECTION_WEST?l.x-b.geometry.width/2:l.x+b.geometry.width/2);var ca=[],ba=C;C=F;D=mxUtils.bind(this,function(Y){if(null==E||null!=Y||null==C&&f){this.model.beginUpdate();try{if(null==ba&&Z){var O=this.getAbsoluteParent(null!=Y?Y:b);O=f?b:this.getCompositeParent(O);ba=null!=Y?Y:this.duplicateCells([O],
+!1)[0];null!=Y&&this.addCells([ba],this.model.getParent(b),null,null,null,!0);var la=this.getCellGeometry(ba);null!=la&&(null!=Y&&"1"==urlParams.sketch&&(e==mxConstants.DIRECTION_NORTH?l.y-=la.height/2:e==mxConstants.DIRECTION_SOUTH?l.y+=la.height/2:l.x=e==mxConstants.DIRECTION_WEST?l.x-la.width/2:l.x+la.width/2),la.x=l.x-la.width/2,la.y=l.y-la.height/2);null!=F?(this.addCells([ba],F,null,null,null,!0),C=null):Z&&!f&&this.addCells([ba],this.getDefaultParent(),null,null,null,!0)}var aa=mxEvent.isControlDown(n)&&
+mxEvent.isShiftDown(n)&&Z||null==C&&f?null:this.insertEdge(this.model.getParent(b),null,"",b,ba,this.createCurrentEdgeStyle());if(null!=aa&&this.connectionHandler.insertBeforeSource){var ia=null;for(Y=b;null!=Y.parent&&null!=Y.geometry&&Y.geometry.relative&&Y.parent!=aa.parent;)Y=this.model.getParent(Y);null!=Y&&null!=Y.parent&&Y.parent==aa.parent&&(ia=Y.parent.getIndex(Y),this.model.add(Y.parent,aa,ia))}null==C&&null!=ba&&null!=b.parent&&f&&e==mxConstants.DIRECTION_WEST&&(ia=b.parent.getIndex(b),
+this.model.add(b.parent,ba,ia));null!=aa&&ca.push(aa);null==C&&null!=ba&&ca.push(ba);null==ba&&null!=aa&&aa.geometry.setTerminalPoint(l,!1);null!=aa&&this.fireEvent(new mxEventObject("cellsInserted","cells",[aa]))}finally{this.model.endUpdate()}}if(null!=d)d(ca);else return ca});if(null==E||null!=ba||!Z||null==C&&f)return D(ba);E(g+l.x*k,z+l.y*k,D)};
Graph.prototype.getIndexableText=function(b){b=null!=b?b:this.model.getDescendants(this.model.root);for(var e=document.createElement("div"),k=[],n,D=0;D<b.length;D++)if(n=b[D],this.model.isVertex(n)||this.model.isEdge(n))this.isHtmlLabel(n)?(e.innerHTML=this.sanitizeHtml(this.getLabel(n)),n=mxUtils.extractTextWithWhitespace([e])):n=this.getLabel(n),n=mxUtils.trim(n.replace(/[\x00-\x1F\x7F-\x9F]|\s+/g," ")),0<n.length&&k.push(n);return k.join(" ")};
Graph.prototype.convertValueToString=function(b){var e=this.model.getValue(b);if(null!=e&&"object"==typeof e){var k=null;if(this.isReplacePlaceholders(b)&&null!=b.getAttribute("placeholder")){e=b.getAttribute("placeholder");for(var n=b;null==k&&null!=n;)null!=n.value&&"object"==typeof n.value&&(k=n.hasAttribute(e)?null!=n.getAttribute(e)?n.getAttribute(e):"":null),n=this.model.getParent(n)}else k=null,Graph.translateDiagram&&null!=Graph.diagramLanguage&&(k=e.getAttribute("label_"+Graph.diagramLanguage)),
null==k&&(k=e.getAttribute("label")||"");return k||""}return mxGraph.prototype.convertValueToString.apply(this,arguments)};Graph.prototype.getLinksForState=function(b){return null!=b&&null!=b.text&&null!=b.text.node?b.text.node.getElementsByTagName("a"):null};Graph.prototype.getLinkForCell=function(b){return null!=b.value&&"object"==typeof b.value?(b=b.value.getAttribute("link"),null!=b&&"javascript:"===b.toLowerCase().substring(0,11)&&(b=b.substring(11)),b):null};
@@ -2394,8 +2409,8 @@ Graph.prototype.updateHorizontalStyle=function(b,e){if(null!=b&&null!=e&&null!=t
Graph.prototype.replaceDefaultColors=function(b,e){if(null!=e){b=mxUtils.hex2rgb(this.shapeBackgroundColor);var k=mxUtils.hex2rgb(this.shapeForegroundColor);this.replaceDefaultColor(e,mxConstants.STYLE_FONTCOLOR,k);this.replaceDefaultColor(e,mxConstants.STYLE_FILLCOLOR,b);this.replaceDefaultColor(e,mxConstants.STYLE_STROKECOLOR,k);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BORDER,k);this.replaceDefaultColor(e,mxConstants.STYLE_IMAGE_BACKGROUND,b);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BORDERCOLOR,
k);this.replaceDefaultColor(e,mxConstants.STYLE_SWIMLANE_FILLCOLOR,b);this.replaceDefaultColor(e,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,b)}return e};Graph.prototype.replaceDefaultColor=function(b,e,k){null!=b&&"default"==b[e]&&null!=k&&(b[e]=k)};
Graph.prototype.updateAlternateBounds=function(b,e,k){if(null!=b&&null!=e&&null!=this.layoutManager&&null!=e.alternateBounds){var n=this.layoutManager.getLayout(this.model.getParent(b));null!=n&&n.constructor==mxStackLayout&&(n.horizontal?e.alternateBounds.height=0:e.alternateBounds.width=0)}mxGraph.prototype.updateAlternateBounds.apply(this,arguments)};Graph.prototype.isMoveCellsEvent=function(b,e){return mxEvent.isShiftDown(b)||"1"==mxUtils.getValue(e.style,"moveCells","0")};
-Graph.prototype.foldCells=function(b,e,k,n,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var t=0;t<k.length;t++){var E=this.view.getState(k[t]),d=this.getCellGeometry(k[t]);if(null!=E&&null!=d){var f=Math.round(d.width-E.width/this.view.scale),g=Math.round(d.height-E.height/this.view.scale);if(0!=g||0!=f){var m=this.model.getParent(k[t]),q=this.layoutManager.getLayout(m);
-null==q?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,m,f,g):null!=D&&mxEvent.isAltDown(D)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(m,q,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
+Graph.prototype.foldCells=function(b,e,k,n,D){e=null!=e?e:!1;null==k&&(k=this.getFoldableCells(this.getSelectionCells(),b));if(null!=k){this.model.beginUpdate();try{if(mxGraph.prototype.foldCells.apply(this,arguments),null!=this.layoutManager)for(var t=0;t<k.length;t++){var E=this.view.getState(k[t]),d=this.getCellGeometry(k[t]);if(null!=E&&null!=d){var f=Math.round(d.width-E.width/this.view.scale),g=Math.round(d.height-E.height/this.view.scale);if(0!=g||0!=f){var l=this.model.getParent(k[t]),q=this.layoutManager.getLayout(l);
+null==q?null!=D&&this.isMoveCellsEvent(D,E)&&this.moveSiblings(E,l,f,g):null!=D&&mxEvent.isAltDown(D)||q.constructor!=mxStackLayout||q.resizeLast||this.resizeParentStacks(l,q,f,g)}}}}finally{this.model.endUpdate()}this.isEnabled()&&this.setSelectionCells(k)}};
Graph.prototype.moveSiblings=function(b,e,k,n){this.model.beginUpdate();try{var D=this.getCellsBeyond(b.x,b.y,e,!0,!0);for(e=0;e<D.length;e++)if(D[e]!=b.cell){var t=this.view.getState(D[e]),E=this.getCellGeometry(D[e]);null!=t&&null!=E&&(E=E.clone(),E.translate(Math.round(k*Math.max(0,Math.min(1,(t.x-b.x)/b.width))),Math.round(n*Math.max(0,Math.min(1,(t.y-b.y)/b.height)))),this.model.setGeometry(D[e],E))}}finally{this.model.endUpdate()}};
Graph.prototype.resizeParentStacks=function(b,e,k,n){if(null!=this.layoutManager&&null!=e&&e.constructor==mxStackLayout&&!e.resizeLast){this.model.beginUpdate();try{for(var D=e.horizontal;null!=b&&null!=e&&e.constructor==mxStackLayout&&e.horizontal==D&&!e.resizeLast;){var t=this.getCellGeometry(b),E=this.view.getState(b);null!=E&&null!=t&&(t=t.clone(),e.horizontal?t.width+=k+Math.min(0,E.width/this.view.scale-t.width):t.height+=n+Math.min(0,E.height/this.view.scale-t.height),this.model.setGeometry(b,
t));b=this.model.getParent(b);e=this.layoutManager.getLayout(b)}}finally{this.model.endUpdate()}}};Graph.prototype.isContainer=function(b){var e=this.getCurrentCellStyle(b);return this.isSwimlane(b)?"0"!=e.container:"1"==e.container};Graph.prototype.isCellConnectable=function(b){var e=this.getCurrentCellStyle(b);return null!=e.connectable?"0"!=e.connectable:mxGraph.prototype.isCellConnectable.apply(this,arguments)};
@@ -2432,7 +2447,7 @@ HoverIcons.prototype.click=function(b,e,k){var n=k.getEvent(),D=k.getGraphX(),t=
HoverIcons.prototype.execute=function(b,e,k){k=k.getEvent();this.graph.selectCellsForConnectVertex(this.graph.connectVertex(b.cell,e,this.graph.defaultEdgeLength,k,this.graph.isCloneEvent(k),this.graph.isCloneEvent(k)),k,this)};HoverIcons.prototype.reset=function(b){null!=b&&!b||null==this.updateThread||window.clearTimeout(this.updateThread);this.activeArrow=this.currentState=this.mouseDownPoint=null;this.removeNodes();this.bbox=null;this.fireEvent(new mxEventObject("reset"))};
HoverIcons.prototype.repaint=function(){this.bbox=null;if(null!=this.currentState){this.currentState=this.getState(this.currentState);if(null!=this.currentState&&this.graph.model.isVertex(this.currentState.cell)&&this.graph.isCellConnectable(this.currentState.cell)){var b=mxRectangle.fromRectangle(this.currentState);null!=this.currentState.shape&&null!=this.currentState.shape.boundingBox&&(b=mxRectangle.fromRectangle(this.currentState.shape.boundingBox));b.grow(this.graph.tolerance);b.grow(this.arrowSpacing);
var e=this.graph.selectionCellsHandler.getHandler(this.currentState.cell);this.graph.isTableRow(this.currentState.cell)&&(e=this.graph.selectionCellsHandler.getHandler(this.graph.model.getParent(this.currentState.cell)));var k=null;null!=e&&(b.x-=e.horizontalOffset/2,b.y-=e.verticalOffset/2,b.width+=e.horizontalOffset,b.height+=e.verticalOffset,null!=e.rotationShape&&null!=e.rotationShape.node&&"hidden"!=e.rotationShape.node.style.visibility&&"none"!=e.rotationShape.node.style.display&&null!=e.rotationShape.boundingBox&&
-(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(d,f,g){if(null!=k){var m=new mxRectangle(f,g,d.clientWidth,d.clientHeight);mxUtils.intersects(m,k)&&(d==this.arrowUp?g-=m.y+m.height-k.y:d==this.arrowRight?f+=k.x+k.width-m.x:d==this.arrowDown?g+=k.y+k.height-m.y:d==this.arrowLeft&&(f-=m.x+m.width-k.x))}d.style.left=f+"px";d.style.top=g+"px";mxUtils.setOpacity(d,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
+(k=e.rotationShape.boundingBox));e=mxUtils.bind(this,function(d,f,g){if(null!=k){var l=new mxRectangle(f,g,d.clientWidth,d.clientHeight);mxUtils.intersects(l,k)&&(d==this.arrowUp?g-=l.y+l.height-k.y:d==this.arrowRight?f+=k.x+k.width-l.x:d==this.arrowDown?g+=k.y+k.height-l.y:d==this.arrowLeft&&(f-=l.x+l.width-k.x))}d.style.left=f+"px";d.style.top=g+"px";mxUtils.setOpacity(d,this.inactiveOpacity)});e(this.arrowUp,Math.round(this.currentState.getCenterX()-this.triangleUp.width/2-this.tolerance),Math.round(b.y-
this.triangleUp.height-this.tolerance));e(this.arrowRight,Math.round(b.x+b.width-this.tolerance),Math.round(this.currentState.getCenterY()-this.triangleRight.height/2-this.tolerance));e(this.arrowDown,parseInt(this.arrowUp.style.left),Math.round(b.y+b.height-this.tolerance));e(this.arrowLeft,Math.round(b.x-this.triangleLeft.width-this.tolerance),parseInt(this.arrowRight.style.top));if(this.checkCollisions){e=this.graph.getCellAt(b.x+b.width+this.triangleRight.width/2,this.currentState.getCenterY());
var n=this.graph.getCellAt(b.x-this.triangleLeft.width/2,this.currentState.getCenterY()),D=this.graph.getCellAt(this.currentState.getCenterX(),b.y-this.triangleUp.height/2);b=this.graph.getCellAt(this.currentState.getCenterX(),b.y+b.height+this.triangleDown.height/2);null!=e&&e==n&&n==D&&D==b&&(b=D=n=e=null);var t=this.graph.getCellGeometry(this.currentState.cell),E=mxUtils.bind(this,function(d,f){var g=this.graph.model.isVertex(d)&&this.graph.getCellGeometry(d);null==d||this.graph.model.isAncestor(d,
this.currentState.cell)||this.graph.isSwimlane(d)||!(null==g||null==t||g.height<3*t.height&&g.width<3*t.width)?f.style.visibility="visible":f.style.visibility="hidden"});E(e,this.arrowRight);E(n,this.arrowLeft);E(D,this.arrowUp);E(b,this.arrowDown)}else this.arrowLeft.style.visibility="visible",this.arrowRight.style.visibility="visible",this.arrowUp.style.visibility="visible",this.arrowDown.style.visibility="visible";this.graph.tooltipHandler.isEnabled()?(this.arrowLeft.setAttribute("title",mxResources.get("plusTooltip")),
@@ -2449,36 +2464,36 @@ Graph.prototype.setTableValues=function(b,e,k){for(var n=this.model.getChildCell
Graph.prototype.createCrossFunctionalSwimlane=function(b,e,k,n,D,t,E,d,f){k=null!=k?k:120;n=null!=n?n:120;E=null!=E?E:"shape=tableRow;horizontal=0;swimlaneHead=0;swimlaneBody=0;top=0;left=0;bottom=0;right=0;dropTarget=0;fontStyle=0;fillColor=none;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;startSize=40;collapsible=0;recursiveResize=0;expand=0;";d=null!=d?d:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=40;collapsible=0;recursiveResize=0;expand=0;";
f=null!=f?f:"swimlane;swimlaneHead=0;swimlaneBody=0;fontStyle=0;connectable=0;fillColor=none;startSize=0;collapsible=0;recursiveResize=0;expand=0;";D=this.createVertex(null,null,null!=D?D:"",0,0,e*k,b*n,null!=t?t:"shape=table;childLayout=tableLayout;"+(null==D?"startSize=0;fillColor=none;":"startSize=40;")+"collapsible=0;recursiveResize=0;expand=0;");t=mxUtils.getValue(this.getCellStyle(D),mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);D.geometry.width+=t;D.geometry.height+=t;E=this.createVertex(null,
null,"",0,t,e*k+t,n,E);D.insert(this.createParent(E,this.createVertex(null,null,"",t,0,k,n,d),e,k,0));return 1<b?(E.geometry.y=n+t,this.createParent(D,this.createParent(E,this.createVertex(null,null,"",t,0,k,n,f),e,k,0),b-1,0,n)):D};
-Graph.prototype.visitTableCells=function(b,e){var k=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<n.length;D++){for(var t=this.getActualStartSize(n[D],!0),E=this.model.getChildCells(n[D],!0),d=this.getCellStyle(n[D],!0),f=null,g=[],m=0;m<E.length;m++){var q=this.getCellGeometry(E[m]),z={cell:E[m],rospan:1,colspan:1,row:D,col:m,geo:q};q=null!=q.alternateBounds?q.alternateBounds:q;z.point=new mxPoint(q.width+(null!=f?f.point.x:b.x+t.x),q.height+(null!=k&&null!=
-k[0]?k[0].point.y:b.y+t.y));z.actual=z;null!=k&&null!=k[m]&&1<k[m].rowspan?(z.rowspan=k[m].rowspan-1,z.colspan=k[m].colspan,z.actual=k[m].actual):null!=f&&1<f.colspan?(z.rowspan=f.rowspan,z.colspan=f.colspan-1,z.actual=f.actual):(f=this.getCurrentCellStyle(E[m],!0),null!=f&&(z.rowspan=parseInt(f.rowspan||1),z.colspan=parseInt(f.colspan||1)));f=1==mxUtils.getValue(d,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(d,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(z,E.length,
+Graph.prototype.visitTableCells=function(b,e){var k=null,n=this.model.getChildCells(b,!0);b=this.getActualStartSize(b,!0);for(var D=0;D<n.length;D++){for(var t=this.getActualStartSize(n[D],!0),E=this.model.getChildCells(n[D],!0),d=this.getCellStyle(n[D],!0),f=null,g=[],l=0;l<E.length;l++){var q=this.getCellGeometry(E[l]),z={cell:E[l],rospan:1,colspan:1,row:D,col:l,geo:q};q=null!=q.alternateBounds?q.alternateBounds:q;z.point=new mxPoint(q.width+(null!=f?f.point.x:b.x+t.x),q.height+(null!=k&&null!=
+k[0]?k[0].point.y:b.y+t.y));z.actual=z;null!=k&&null!=k[l]&&1<k[l].rowspan?(z.rowspan=k[l].rowspan-1,z.colspan=k[l].colspan,z.actual=k[l].actual):null!=f&&1<f.colspan?(z.rowspan=f.rowspan,z.colspan=f.colspan-1,z.actual=f.actual):(f=this.getCurrentCellStyle(E[l],!0),null!=f&&(z.rowspan=parseInt(f.rowspan||1),z.colspan=parseInt(f.colspan||1)));f=1==mxUtils.getValue(d,mxConstants.STYLE_SWIMLANE_HEAD,1)&&mxUtils.getValue(d,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE)!=mxConstants.NONE;e(z,E.length,
n.length,b.x+(f?t.x:0),b.y+(f?t.y:0));g.push(z);f=z}k=g}};Graph.prototype.getTableLines=function(b,e,k){var n=[],D=[];(e||k)&&this.visitTableCells(b,mxUtils.bind(this,function(t,E,d,f,g){e&&t.row<d-1&&(null==n[t.row]&&(n[t.row]=[new mxPoint(f,t.point.y)]),1<t.rowspan&&n[t.row].push(null),n[t.row].push(t.point));k&&t.col<E-1&&(null==D[t.col]&&(D[t.col]=[new mxPoint(t.point.x,g)]),1<t.colspan&&D[t.col].push(null),D[t.col].push(t.point))}));return n.concat(D)};
Graph.prototype.isTableCell=function(b){return this.model.isVertex(b)&&this.isTableRow(this.model.getParent(b))};Graph.prototype.isTableRow=function(b){return this.model.isVertex(b)&&this.isTable(this.model.getParent(b))};Graph.prototype.isTable=function(b){b=this.getCellStyle(b);return null!=b&&"tableLayout"==b.childLayout};Graph.prototype.isStack=function(b){b=this.getCellStyle(b);return null!=b&&"stackLayout"==b.childLayout};
Graph.prototype.isStackChild=function(b){return this.model.isVertex(b)&&this.isStack(this.model.getParent(b))};
-Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var n=this.getModel();n.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;n.setGeometry(b,D);var t=n.getParent(b),E=n.getChildCells(t,!0);if(!k){var d=mxUtils.indexOf(E,b);if(d<E.length-1){var f=E[d+1],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.y+=e,g.height-=e,n.setGeometry(f,g))}}var m=this.getCellGeometry(t);null!=m&&(k||(k=b==E[E.length-1]),k&&(m=m.clone(),m.height+=e,n.setGeometry(t,m)))}}finally{n.endUpdate()}};
-Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var n=this.getModel(),D=n.getParent(b),t=n.getParent(D),E=n.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var d=b==E.length-1;n.beginUpdate();try{for(var f=n.getChildCells(t,!0),g=0;g<f.length;g++){D=f[g];E=n.getChildCells(D,!0);var m=E[b],q=this.getCellGeometry(m);null!=q&&(q=q.clone(),q.width+=e,null!=q.alternateBounds&&(q.alternateBounds.width+=e),n.setGeometry(m,q));b<E.length-1&&(m=E[b+1],q=this.getCellGeometry(m),null!=q&&(q=q.clone(),
-q.x+=e,k||(q.width-=e,null!=q.alternateBounds&&(q.alternateBounds.width-=e)),n.setGeometry(m,q)))}if(d||k){var z=this.getCellGeometry(t);null!=z&&(z=z.clone(),z.width+=e,n.setGeometry(t,z))}null!=this.layoutManager&&this.layoutManager.executeLayout(t)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
+Graph.prototype.setTableRowHeight=function(b,e,k){k=null!=k?k:!0;var n=this.getModel();n.beginUpdate();try{var D=this.getCellGeometry(b);if(null!=D){D=D.clone();D.height+=e;n.setGeometry(b,D);var t=n.getParent(b),E=n.getChildCells(t,!0);if(!k){var d=mxUtils.indexOf(E,b);if(d<E.length-1){var f=E[d+1],g=this.getCellGeometry(f);null!=g&&(g=g.clone(),g.y+=e,g.height-=e,n.setGeometry(f,g))}}var l=this.getCellGeometry(t);null!=l&&(k||(k=b==E[E.length-1]),k&&(l=l.clone(),l.height+=e,n.setGeometry(t,l)))}}finally{n.endUpdate()}};
+Graph.prototype.setTableColumnWidth=function(b,e,k){k=null!=k?k:!1;var n=this.getModel(),D=n.getParent(b),t=n.getParent(D),E=n.getChildCells(D,!0);b=mxUtils.indexOf(E,b);var d=b==E.length-1;n.beginUpdate();try{for(var f=n.getChildCells(t,!0),g=0;g<f.length;g++){D=f[g];E=n.getChildCells(D,!0);var l=E[b],q=this.getCellGeometry(l);null!=q&&(q=q.clone(),q.width+=e,null!=q.alternateBounds&&(q.alternateBounds.width+=e),n.setGeometry(l,q));b<E.length-1&&(l=E[b+1],q=this.getCellGeometry(l),null!=q&&(q=q.clone(),
+q.x+=e,k||(q.width-=e,null!=q.alternateBounds&&(q.alternateBounds.width-=e)),n.setGeometry(l,q)))}if(d||k){var z=this.getCellGeometry(t);null!=z&&(z=z.clone(),z.width+=e,n.setGeometry(t,z))}null!=this.layoutManager&&this.layoutManager.executeLayout(t)}finally{n.endUpdate()}};function TableLayout(b){mxGraphLayout.call(this,b)}TableLayout.prototype=new mxStackLayout;TableLayout.prototype.constructor=TableLayout;TableLayout.prototype.isHorizontal=function(){return!1};
TableLayout.prototype.isVertexIgnored=function(b){return!this.graph.getModel().isVertex(b)||!this.graph.isCellVisible(b)};TableLayout.prototype.getSize=function(b,e){for(var k=0,n=0;n<b.length;n++)if(!this.isVertexIgnored(b[n])){var D=this.graph.getCellGeometry(b[n]);null!=D&&(k+=e?D.width:D.height)}return k};
TableLayout.prototype.getRowLayout=function(b,e){var k=this.graph.model.getChildCells(b,!0),n=this.graph.getActualStartSize(b,!0);b=this.getSize(k,!0);e=e-n.x-n.width;var D=[];n=n.x;for(var t=0;t<k.length;t++){var E=this.graph.getCellGeometry(k[t]);null!=E&&(n+=(null!=E.alternateBounds?E.alternateBounds.width:E.width)*e/b,D.push(Math.round(n)))}return D};
TableLayout.prototype.layoutRow=function(b,e,k,n){var D=this.graph.getModel(),t=D.getChildCells(b,!0);b=this.graph.getActualStartSize(b,!0);var E=b.x,d=0;null!=e&&(e=e.slice(),e.splice(0,0,b.x));for(var f=0;f<t.length;f++){var g=this.graph.getCellGeometry(t[f]);null!=g&&(g=g.clone(),g.y=b.y,g.height=k-b.y-b.height,null!=e?(g.x=e[f],g.width=e[f+1]-g.x,f==t.length-1&&f<e.length-2&&(g.width=n-g.x-b.x-b.width)):(g.x=E,E+=g.width,f==t.length-1?g.width=n-b.x-b.width-d:d+=g.width),g.alternateBounds=new mxRectangle(0,
0,g.width,g.height),D.setGeometry(t[f],g))}return d};
-TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(n,"resizeLastRow","0"),t="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),d=0;E.beginUpdate();try{for(var f=k.height-e.y-e.height,g=k.width-e.x-e.width,m=E.getChildCells(b,!0),q=0;q<m.length;q++)E.setVisible(m[q],!0);var z=this.getSize(m,!1);if(0<f&&0<g&&0<
-m.length&&0<z){if(D){var F=this.graph.getCellGeometry(m[m.length-1]);null!=F&&(F=F.clone(),F.height=f-z+F.height,E.setGeometry(m[m.length-1],F))}var C=t?null:this.getRowLayout(m[0],g),I=[],G=e.y;for(q=0;q<m.length;q++)F=this.graph.getCellGeometry(m[q]),null!=F&&(F=F.clone(),F.x=e.x,F.width=g,F.y=Math.round(G),G=D||n?G+F.height:G+F.height/z*f,F.height=Math.round(G)-F.y,E.setGeometry(m[q],F)),d=Math.max(d,this.layoutRow(m[q],C,F.height,g,I));n&&f<z&&(k=k.clone(),k.height=G+e.height,E.setGeometry(b,
-k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(Z){E.setVisible(Z.cell,Z.actual.cell==Z.cell);if(Z.actual.cell!=Z.cell){if(Z.actual.row==Z.row){var fa=null!=Z.geo.alternateBounds?Z.geo.alternateBounds:Z.geo;Z.actual.geo.width+=fa.width}Z.actual.col==Z.col&&(fa=null!=Z.geo.alternateBounds?Z.geo.alternateBounds:Z.geo,Z.actual.geo.height+=fa.height)}}))}else for(q=0;q<m.length;q++)E.setVisible(m[q],
+TableLayout.prototype.execute=function(b){if(null!=b){var e=this.graph.getActualStartSize(b,!0),k=this.graph.getCellGeometry(b),n=this.graph.getCellStyle(b),D="1"==mxUtils.getValue(n,"resizeLastRow","0"),t="1"==mxUtils.getValue(n,"resizeLast","0");n="1"==mxUtils.getValue(n,"fixedRows","0");var E=this.graph.getModel(),d=0;E.beginUpdate();try{for(var f=k.height-e.y-e.height,g=k.width-e.x-e.width,l=E.getChildCells(b,!0),q=0;q<l.length;q++)E.setVisible(l[q],!0);var z=this.getSize(l,!1);if(0<f&&0<g&&0<
+l.length&&0<z){if(D){var F=this.graph.getCellGeometry(l[l.length-1]);null!=F&&(F=F.clone(),F.height=f-z+F.height,E.setGeometry(l[l.length-1],F))}var C=t?null:this.getRowLayout(l[0],g),I=[],G=e.y;for(q=0;q<l.length;q++)F=this.graph.getCellGeometry(l[q]),null!=F&&(F=F.clone(),F.x=e.x,F.width=g,F.y=Math.round(G),G=D||n?G+F.height:G+F.height/z*f,F.height=Math.round(G)-F.y,E.setGeometry(l[q],F)),d=Math.max(d,this.layoutRow(l[q],C,F.height,g,I));n&&f<z&&(k=k.clone(),k.height=G+e.height,E.setGeometry(b,
+k));t&&g<d+Graph.minTableColumnWidth&&(k=k.clone(),k.width=d+e.width+e.x+Graph.minTableColumnWidth,E.setGeometry(b,k));this.graph.visitTableCells(b,mxUtils.bind(this,function(Z){E.setVisible(Z.cell,Z.actual.cell==Z.cell);if(Z.actual.cell!=Z.cell){if(Z.actual.row==Z.row){var ca=null!=Z.geo.alternateBounds?Z.geo.alternateBounds:Z.geo;Z.actual.geo.width+=ca.width}Z.actual.col==Z.col&&(ca=null!=Z.geo.alternateBounds?Z.geo.alternateBounds:Z.geo,Z.actual.geo.height+=ca.height)}}))}else for(q=0;q<l.length;q++)E.setVisible(l[q],
!1)}finally{E.endUpdate()}}};
-(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(m,q){q=null!=q?q:!0;var z=this.getState(m);null!=z&&q&&this.graph.model.isEdge(z.cell)&&null!=z.style&&1!=z.style[mxConstants.STYLE_CURVED]&&!z.invalid&&this.updateLineJumps(z)&&this.graph.cellRenderer.redraw(z,!1,this.isRendering());z=e.apply(this,
-arguments);null!=z&&q&&this.graph.model.isEdge(z.cell)&&null!=z.style&&1!=z.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(z);return z};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var m=this.node.getElementsByTagName("path");if(1<m.length){"1"!=mxUtils.getValue(this.state.style,
-mxConstants.STYLE_DASHED,"0")&&m[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&m[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(m,q){return n.apply(this,arguments)||null!=m.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,m.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
-function(m){D.apply(this,arguments);this.graph.model.isEdge(m.cell)&&1!=m.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(m)};mxGraphView.prototype.updateLineJumps=function(m){var q=m.absolutePoints;if(Graph.lineJumpsEnabled){var z=null!=m.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(m.style,"jumpStyle","none")){var C=function(ma,T,M){var ia=new mxPoint(T,M);ia.type=ma;F.push(ia);ia=null!=m.routedPoints?m.routedPoints[F.length-1]:null;return null==ia||ia.type!=
-ma||ia.x!=T||ia.y!=M},I=.5*this.scale;z=!1;F=[];for(var G=0;G<q.length-1;G++){for(var Z=q[G+1],fa=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(fa.x,fa.y,Y.x,Y.y,Z.x,Z.y)<1*this.scale*this.scale;)Z=Y,G++,Y=q[G+2];z=C(0,fa.x,fa.y)||z;for(var pa=0;pa<this.validEdges.length;pa++){var O=this.validEdges[pa],W=O.absolutePoints;if(null!=W&&mxUtils.intersects(m,O)&&"1"!=O.style.noJump)for(O=0;O<W.length-1;O++){var ha=W[O+1],U=W[O];for(Y=W[O+2];O<W.length-2&&mxUtils.ptSegDistSq(U.x,U.y,Y.x,Y.y,ha.x,
-ha.y)<1*this.scale*this.scale;)ha=Y,O++,Y=W[O+2];Y=mxUtils.intersection(fa.x,fa.y,Z.x,Z.y,U.x,U.y,ha.x,ha.y);if(null!=Y&&(Math.abs(Y.x-fa.x)>I||Math.abs(Y.y-fa.y)>I)&&(Math.abs(Y.x-Z.x)>I||Math.abs(Y.y-Z.y)>I)&&(Math.abs(Y.x-U.x)>I||Math.abs(Y.y-U.y)>I)&&(Math.abs(Y.x-ha.x)>I||Math.abs(Y.y-ha.y)>I)){ha=Y.x-fa.x;U=Y.y-fa.y;Y={distSq:ha*ha+U*U,x:Y.x,y:Y.y};for(ha=0;ha<ba.length;ha++)if(ba[ha].distSq>Y.distSq){ba.splice(ha,0,Y);Y=null;break}null==Y||0!=ba.length&&ba[ba.length-1].x===Y.x&&ba[ba.length-
-1].y===Y.y||ba.push(Y)}}}for(O=0;O<ba.length;O++)z=C(1,ba[O].x,ba[O].y)||z}Y=q[q.length-1];z=C(0,Y.x,Y.y)||z}m.routedPoints=F;return z}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(m,q,z){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
-mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,Z=null,fa=null,ba=[],Y=null;m.begin();for(var pa=0;pa<this.state.routedPoints.length;pa++){var O=this.state.routedPoints[pa],W=new mxPoint(O.x/this.scale,O.y/this.scale);0==pa?W=q[0]:pa==this.state.routedPoints.length-1&&(W=q[q.length-1]);var ha=!1;if(null!=Z&&1==O.type){var U=this.state.routedPoints[pa+1];O=U.x/this.scale-
-W.x;U=U.y/this.scale-W.y;O=O*O+U*U;null==Y&&(Y=new mxPoint(W.x-Z.x,W.y-Z.y),fa=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<fa?(Y.x=Y.x*C/fa,Y.y=Y.y*C/fa):Y=null);O>C*C&&0<fa&&(O=Z.x-W.x,U=Z.y-W.y,O=O*O+U*U,O>C*C&&(ha=new mxPoint(W.x-Y.x,W.y-Y.y),O=new mxPoint(W.x+Y.x,W.y+Y.y),ba.push(ha),this.addPoints(m,ba,z,F,!1,null,G),ba=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,G=!1,"sharp"==I?(m.lineTo(ha.x-Y.y*ba,ha.y+Y.x*ba),m.lineTo(O.x-Y.y*ba,O.y+Y.x*ba),m.lineTo(O.x,O.y)):"line"==I?(m.moveTo(ha.x+
-Y.y*ba,ha.y-Y.x*ba),m.lineTo(ha.x-Y.y*ba,ha.y+Y.x*ba),m.moveTo(O.x-Y.y*ba,O.y+Y.x*ba),m.lineTo(O.x+Y.y*ba,O.y-Y.x*ba),m.moveTo(O.x,O.y)):"arc"==I?(ba*=1.3,m.curveTo(ha.x-Y.y*ba,ha.y+Y.x*ba,O.x-Y.y*ba,O.y+Y.x*ba,O.x,O.y)):(m.moveTo(O.x,O.y),G=!0),ba=[O],ha=!0))}else Y=null;ha||(ba.push(W),Z=W)}this.addPoints(m,ba,z,F,!1,null,G);m.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(m,q,z,F){return null!=q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?
-new mxPoint(q.getCenterX(),q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(m,q,z,F){if(null==q||null==m||"1"!=q.style.snapToPoint&&"1"!=m.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(m,q,F);var C=this.getNextPoint(m,z,F),I=this.graph.isOrthogonal(m),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||"0")),Z=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=
-G){var fa=Math.cos(-G),ba=Math.sin(-G);C=mxUtils.getRotatedPoint(C,fa,ba,Z)}fa=parseFloat(m.style[mxConstants.STYLE_PERIMETER_SPACING]||0);fa+=parseFloat(m.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&I,fa);0!=G&&(fa=Math.cos(G),ba=Math.sin(G),C=mxUtils.getRotatedPoint(C,fa,ba,Z));m.setAbsoluteTerminalPoint(this.snapToAnchorPoint(m,q,z,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=function(m,q,z,F,C){if(null!=
-q&&null!=m){m=this.graph.getAllConnectionConstraints(q);F=z=null;if(null!=m)for(var I=0;I<m.length;I++){var G=this.graph.getConnectionPoint(q,m[I]);if(null!=G){var Z=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||Z<F)z=G,F=Z}}null!=z&&(C=z)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(m,q,z){var F=f.apply(this,arguments);"1"==m.getAttribute("placeholders")&&null!=z.state&&(F=z.state.view.graph.replacePlaceholders(z.state.cell,F));
-return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(m){if(null!=m.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(m.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var z=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(z));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
+(function(){var b=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){b.apply(this,arguments);this.validEdges=[]};var e=mxGraphView.prototype.validateCellState;mxGraphView.prototype.validateCellState=function(l,q){q=null!=q?q:!0;var z=this.getState(l);null!=z&&q&&this.graph.model.isEdge(z.cell)&&null!=z.style&&1!=z.style[mxConstants.STYLE_CURVED]&&!z.invalid&&this.updateLineJumps(z)&&this.graph.cellRenderer.redraw(z,!1,this.isRendering());z=e.apply(this,
+arguments);null!=z&&q&&this.graph.model.isEdge(z.cell)&&null!=z.style&&1!=z.style[mxConstants.STYLE_CURVED]&&this.validEdges.push(z);return z};var k=mxShape.prototype.paint;mxShape.prototype.paint=function(){k.apply(this,arguments);if(null!=this.state&&null!=this.node&&this.state.view.graph.enableFlowAnimation&&this.state.view.graph.model.isEdge(this.state.cell)&&"1"==mxUtils.getValue(this.state.style,"flowAnimation","0")){var l=this.node.getElementsByTagName("path");if(1<l.length){"1"!=mxUtils.getValue(this.state.style,
+mxConstants.STYLE_DASHED,"0")&&l[1].setAttribute("stroke-dasharray",8*this.state.view.scale);var q=this.state.view.graph.getFlowAnimationStyle();null!=q&&l[1].setAttribute("class",q.getAttribute("id"))}}};var n=mxCellRenderer.prototype.isShapeInvalid;mxCellRenderer.prototype.isShapeInvalid=function(l,q){return n.apply(this,arguments)||null!=l.routedPoints&&null!=q.routedPoints&&!mxUtils.equalPoints(q.routedPoints,l.routedPoints)};var D=mxGraphView.prototype.updateCellState;mxGraphView.prototype.updateCellState=
+function(l){D.apply(this,arguments);this.graph.model.isEdge(l.cell)&&1!=l.style[mxConstants.STYLE_CURVED]&&this.updateLineJumps(l)};mxGraphView.prototype.updateLineJumps=function(l){var q=l.absolutePoints;if(Graph.lineJumpsEnabled){var z=null!=l.routedPoints,F=null;if(null!=q&&null!=this.validEdges&&"none"!==mxUtils.getValue(l.style,"jumpStyle","none")){var C=function(R,sa,M){var ka=new mxPoint(sa,M);ka.type=R;F.push(ka);ka=null!=l.routedPoints?l.routedPoints[F.length-1]:null;return null==ka||ka.type!=
+R||ka.x!=sa||ka.y!=M},I=.5*this.scale;z=!1;F=[];for(var G=0;G<q.length-1;G++){for(var Z=q[G+1],ca=q[G],ba=[],Y=q[G+2];G<q.length-2&&mxUtils.ptSegDistSq(ca.x,ca.y,Y.x,Y.y,Z.x,Z.y)<1*this.scale*this.scale;)Z=Y,G++,Y=q[G+2];z=C(0,ca.x,ca.y)||z;for(var O=0;O<this.validEdges.length;O++){var la=this.validEdges[O],aa=la.absolutePoints;if(null!=aa&&mxUtils.intersects(l,la)&&"1"!=la.style.noJump)for(la=0;la<aa.length-1;la++){var ia=aa[la+1],X=aa[la];for(Y=aa[la+2];la<aa.length-2&&mxUtils.ptSegDistSq(X.x,X.y,
+Y.x,Y.y,ia.x,ia.y)<1*this.scale*this.scale;)ia=Y,la++,Y=aa[la+2];Y=mxUtils.intersection(ca.x,ca.y,Z.x,Z.y,X.x,X.y,ia.x,ia.y);if(null!=Y&&(Math.abs(Y.x-ca.x)>I||Math.abs(Y.y-ca.y)>I)&&(Math.abs(Y.x-Z.x)>I||Math.abs(Y.y-Z.y)>I)&&(Math.abs(Y.x-X.x)>I||Math.abs(Y.y-X.y)>I)&&(Math.abs(Y.x-ia.x)>I||Math.abs(Y.y-ia.y)>I)){ia=Y.x-ca.x;X=Y.y-ca.y;Y={distSq:ia*ia+X*X,x:Y.x,y:Y.y};for(ia=0;ia<ba.length;ia++)if(ba[ia].distSq>Y.distSq){ba.splice(ia,0,Y);Y=null;break}null==Y||0!=ba.length&&ba[ba.length-1].x===
+Y.x&&ba[ba.length-1].y===Y.y||ba.push(Y)}}}for(la=0;la<ba.length;la++)z=C(1,ba[la].x,ba[la].y)||z}Y=q[q.length-1];z=C(0,Y.x,Y.y)||z}l.routedPoints=F;return z}return!1};var t=mxConnector.prototype.paintLine;mxConnector.prototype.paintLine=function(l,q,z){this.routedPoints=null!=this.state?this.state.routedPoints:null;if(this.outline||null==this.state||null==this.style||null==this.state.routedPoints||0==this.state.routedPoints.length)t.apply(this,arguments);else{var F=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,
+mxConstants.LINE_ARCSIZE)/2,C=(parseInt(mxUtils.getValue(this.style,"jumpSize",Graph.defaultJumpSize))-2)/2+this.strokewidth,I=mxUtils.getValue(this.style,"jumpStyle","none"),G=!0,Z=null,ca=null,ba=[],Y=null;l.begin();for(var O=0;O<this.state.routedPoints.length;O++){var la=this.state.routedPoints[O],aa=new mxPoint(la.x/this.scale,la.y/this.scale);0==O?aa=q[0]:O==this.state.routedPoints.length-1&&(aa=q[q.length-1]);var ia=!1;if(null!=Z&&1==la.type){var X=this.state.routedPoints[O+1];la=X.x/this.scale-
+aa.x;X=X.y/this.scale-aa.y;la=la*la+X*X;null==Y&&(Y=new mxPoint(aa.x-Z.x,aa.y-Z.y),ca=Math.sqrt(Y.x*Y.x+Y.y*Y.y),0<ca?(Y.x=Y.x*C/ca,Y.y=Y.y*C/ca):Y=null);la>C*C&&0<ca&&(la=Z.x-aa.x,X=Z.y-aa.y,la=la*la+X*X,la>C*C&&(ia=new mxPoint(aa.x-Y.x,aa.y-Y.y),la=new mxPoint(aa.x+Y.x,aa.y+Y.y),ba.push(ia),this.addPoints(l,ba,z,F,!1,null,G),ba=0>Math.round(Y.x)||0==Math.round(Y.x)&&0>=Math.round(Y.y)?1:-1,G=!1,"sharp"==I?(l.lineTo(ia.x-Y.y*ba,ia.y+Y.x*ba),l.lineTo(la.x-Y.y*ba,la.y+Y.x*ba),l.lineTo(la.x,la.y)):
+"line"==I?(l.moveTo(ia.x+Y.y*ba,ia.y-Y.x*ba),l.lineTo(ia.x-Y.y*ba,ia.y+Y.x*ba),l.moveTo(la.x-Y.y*ba,la.y+Y.x*ba),l.lineTo(la.x+Y.y*ba,la.y-Y.x*ba),l.moveTo(la.x,la.y)):"arc"==I?(ba*=1.3,l.curveTo(ia.x-Y.y*ba,ia.y+Y.x*ba,la.x-Y.y*ba,la.y+Y.x*ba,la.x,la.y)):(l.moveTo(la.x,la.y),G=!0),ba=[la],ia=!0))}else Y=null;ia||(ba.push(aa),Z=aa)}this.addPoints(l,ba,z,F,!1,null,G);l.stroke()}};var E=mxGraphView.prototype.getFixedTerminalPoint;mxGraphView.prototype.getFixedTerminalPoint=function(l,q,z,F){return null!=
+q&&"centerPerimeter"==q.style[mxConstants.STYLE_PERIMETER]?new mxPoint(q.getCenterX(),q.getCenterY()):E.apply(this,arguments)};var d=mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(l,q,z,F){if(null==q||null==l||"1"!=q.style.snapToPoint&&"1"!=l.style.snapToPoint)d.apply(this,arguments);else{q=this.getTerminalPort(l,q,F);var C=this.getNextPoint(l,z,F),I=this.graph.isOrthogonal(l),G=mxUtils.toRadians(Number(q.style[mxConstants.STYLE_ROTATION]||
+"0")),Z=new mxPoint(q.getCenterX(),q.getCenterY());if(0!=G){var ca=Math.cos(-G),ba=Math.sin(-G);C=mxUtils.getRotatedPoint(C,ca,ba,Z)}ca=parseFloat(l.style[mxConstants.STYLE_PERIMETER_SPACING]||0);ca+=parseFloat(l.style[F?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);C=this.getPerimeterPoint(q,C,0==G&&I,ca);0!=G&&(ca=Math.cos(G),ba=Math.sin(G),C=mxUtils.getRotatedPoint(C,ca,ba,Z));l.setAbsoluteTerminalPoint(this.snapToAnchorPoint(l,q,z,F,C),F)}};mxGraphView.prototype.snapToAnchorPoint=
+function(l,q,z,F,C){if(null!=q&&null!=l){l=this.graph.getAllConnectionConstraints(q);F=z=null;if(null!=l)for(var I=0;I<l.length;I++){var G=this.graph.getConnectionPoint(q,l[I]);if(null!=G){var Z=(G.x-C.x)*(G.x-C.x)+(G.y-C.y)*(G.y-C.y);if(null==F||Z<F)z=G,F=Z}}null!=z&&(C=z)}return C};var f=mxStencil.prototype.evaluateTextAttribute;mxStencil.prototype.evaluateTextAttribute=function(l,q,z){var F=f.apply(this,arguments);"1"==l.getAttribute("placeholders")&&null!=z.state&&(F=z.state.view.graph.replacePlaceholders(z.state.cell,
+F));return F};var g=mxCellRenderer.prototype.createShape;mxCellRenderer.prototype.createShape=function(l){if(null!=l.style&&"undefined"!==typeof pako){var q=mxUtils.getValue(l.style,mxConstants.STYLE_SHAPE,null);if(null!=q&&"string"===typeof q&&"stencil("==q.substring(0,8))try{var z=q.substring(8,q.length-1),F=mxUtils.parseXml(Graph.decompress(z));return new mxShape(new mxStencil(F.documentElement))}catch(C){null!=window.console&&console.log("Error in shape: "+C)}}return g.apply(this,arguments)}})();
mxStencilRegistry.libraries={};mxStencilRegistry.dynamicLoading=!0;mxStencilRegistry.allowEval=!0;mxStencilRegistry.packages=[];mxStencilRegistry.filesLoaded={};
mxStencilRegistry.getStencil=function(b){var e=mxStencilRegistry.stencils[b];if(null==e&&null==mxCellRenderer.defaultShapes[b]&&mxStencilRegistry.dynamicLoading){var k=mxStencilRegistry.getBasenameForStencil(b);if(null!=k){e=mxStencilRegistry.libraries[k];if(null!=e){if(null==mxStencilRegistry.packages[k]){for(var n=0;n<e.length;n++){var D=e[n];if(!mxStencilRegistry.filesLoaded[D])if(mxStencilRegistry.filesLoaded[D]=!0,".xml"==D.toLowerCase().substring(D.length-4,D.length))mxStencilRegistry.loadStencilSet(D,
null);else if(".js"==D.toLowerCase().substring(D.length-3,D.length))try{if(mxStencilRegistry.allowEval){var t=mxUtils.load(D);null!=t&&200<=t.getStatus()&&299>=t.getStatus()&&eval.call(window,t.getText())}}catch(E){null!=window.console&&console.log("error in getStencil:",b,k,e,D,E)}}mxStencilRegistry.packages[k]=1}}else k=k.replace("_-_","_"),mxStencilRegistry.loadStencilSet(STENCIL_PATH+"/"+k+".xml",null);e=mxStencilRegistry.stencils[b]}}return e};
@@ -2492,145 +2507,144 @@ mxConstants.HANDLE_STROKECOLOR="#0088cf";mxConstants.VERTEX_SELECTION_COLOR="#00
!0;mxGraphHandler.prototype.guidesEnabled=!0;mxGraphHandler.prototype.removeEmptyParents=!0;mxRubberband.prototype.fadeOut=!0;mxGuide.prototype.isEnabledForEvent=function(y){return!mxEvent.isAltDown(y)};var k=mxGraphLayout.prototype.isVertexIgnored;mxGraphLayout.prototype.isVertexIgnored=function(y){return k.apply(this,arguments)||this.graph.isTableRow(y)||this.graph.isTableCell(y)};var n=mxGraphLayout.prototype.isEdgeIgnored;mxGraphLayout.prototype.isEdgeIgnored=function(y){return n.apply(this,arguments)||
this.graph.isEdgeIgnored(y)};var D=mxConnectionHandler.prototype.isCreateTarget;mxConnectionHandler.prototype.isCreateTarget=function(y){return this.graph.isCloneEvent(y)!=D.apply(this,arguments)};mxConstraintHandler.prototype.createHighlightShape=function(){var y=new mxEllipse(null,this.highlightColor,this.highlightColor,0);y.opacity=mxConstants.HIGHLIGHT_OPACITY;return y};mxConnectionHandler.prototype.livePreview=!0;mxConnectionHandler.prototype.cursor="crosshair";mxConnectionHandler.prototype.createEdgeState=
function(y){y=this.graph.createCurrentEdgeStyle();y=this.graph.createEdge(null,null,null,null,null,y);y=new mxCellState(this.graph.view,y,this.graph.getCellStyle(y));for(var K in this.graph.currentEdgeStyle)y.style[K]=this.graph.currentEdgeStyle[K];y.style=this.graph.postProcessCellStyle(y.cell,y.style);return y};var t=mxConnectionHandler.prototype.createShape;mxConnectionHandler.prototype.createShape=function(){var y=t.apply(this,arguments);y.isDashed="1"==this.graph.currentEdgeStyle[mxConstants.STYLE_DASHED];
-return y};mxConnectionHandler.prototype.updatePreview=function(y){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=E.apply(this,arguments),K=y.getCell;y.getCell=mxUtils.bind(this,function(L){var S=K.apply(this,arguments);this.error=null;return S});return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
-function(){for(var y="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",K="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),L=0;L<K.length;L++)null!=this.currentEdgeStyle[K[L]]&&(y+=K[L]+"="+this.currentEdgeStyle[K[L]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
+return y};mxConnectionHandler.prototype.updatePreview=function(y){};var E=mxConnectionHandler.prototype.createMarker;mxConnectionHandler.prototype.createMarker=function(){var y=E.apply(this,arguments),K=y.getCell;y.getCell=mxUtils.bind(this,function(N){var T=K.apply(this,arguments);this.error=null;return T});return y};Graph.prototype.defaultVertexStyle={};Graph.prototype.defaultEdgeStyle={edgeStyle:"orthogonalEdgeStyle",rounded:"0",jettySize:"auto",orthogonalLoop:"1"};Graph.prototype.createCurrentEdgeStyle=
+function(){for(var y="edgeStyle="+(this.currentEdgeStyle.edgeStyle||"none")+";",K="shape curved rounded comic sketch fillWeight hachureGap hachureAngle jiggle disableMultiStroke disableMultiStrokeFill fillStyle curveFitting simplification comicStyle jumpStyle jumpSize".split(" "),N=0;N<K.length;N++)null!=this.currentEdgeStyle[K[N]]&&(y+=K[N]+"="+this.currentEdgeStyle[K[N]]+";");null!=this.currentEdgeStyle.orthogonalLoop?y+="orthogonalLoop="+this.currentEdgeStyle.orthogonalLoop+";":null!=Graph.prototype.defaultEdgeStyle.orthogonalLoop&&
(y+="orthogonalLoop="+Graph.prototype.defaultEdgeStyle.orthogonalLoop+";");null!=this.currentEdgeStyle.jettySize?y+="jettySize="+this.currentEdgeStyle.jettySize+";":null!=Graph.prototype.defaultEdgeStyle.jettySize&&(y+="jettySize="+Graph.prototype.defaultEdgeStyle.jettySize+";");"elbowEdgeStyle"==this.currentEdgeStyle.edgeStyle&&null!=this.currentEdgeStyle.elbow&&(y+="elbow="+this.currentEdgeStyle.elbow+";");return y=null!=this.currentEdgeStyle.html?y+("html="+this.currentEdgeStyle.html+";"):y+"html=1;"};
-Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var y=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,K){K=null!=K?K:{};for(var L=0;L<y.length;L++){var S=y[L];K[mxObjectIdentity.get(S)]=S.getId();for(var V=this.model.getChildCount(S),
-ja=0;ja<V;ja++)this.createCellLookup([this.model.getChildAt(S,ja)],K)}return K};Graph.prototype.createCellMapping=function(y,K,L){L=null!=L?L:{};for(var S in y){var V=K[S];null==L[V]&&(L[V]=y[S].getId()||"")}return L};Graph.prototype.importGraphModel=function(y,K,L,S){K=null!=K?K:0;L=null!=L?L:0;var V=new mxCodec(y.ownerDocument),ja=new mxGraphModel;V.decode(y,ja);y=[];V={};var na={},ya=ja.getChildren(this.cloneCell(ja.root,this.isCloneInvalidEdges(),V));if(null!=ya){var ra=this.createCellLookup([ja.root]);
-ya=ya.slice();this.model.beginUpdate();try{if(1!=ya.length||this.isCellLocked(this.getDefaultParent()))for(ja=0;ja<ya.length;ja++)ta=this.model.getChildren(this.moveCells([ya[ja]],K,L,!1,this.model.getRoot())[0]),null!=ta&&(y=y.concat(ta));else{var ta=ja.getChildren(ya[0]);null!=ta&&(y=this.moveCells(ta,K,L,!1,this.getDefaultParent()),na[ja.getChildAt(ja.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(V,ra,na),this.updateCustomLinks(na,y),S)){this.isGridEnabled()&&
-(K=this.snap(K),L=this.snap(L));var Da=this.getBoundingBoxFromGeometry(y,!0);null!=Da&&this.moveCells(y,K-Da.x,L-Da.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var K={},L=this.cloneCells(y,null,K),S=new mxDictionary,V=0;V<y.length;V++)S.put(y[V],!0);var ja=new mxCodec,na=new mxGraphModel,ya=na.getChildAt(na.getRoot(),0);for(V=0;V<L.length;V++){na.add(ya,L[V]);var ra=this.view.getState(y[V]);if(null!=ra){var ta=this.getCellGeometry(L[V]);null!=ta&&ta.relative&&
-!this.model.isEdge(y[V])&&null==S.get(this.model.getParent(y[V]))&&(ta.offset=null,ta.relative=!1,ta.x=ra.x/ra.view.scale-ra.view.translate.x,ta.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(K,this.createCellLookup(y)),L);return ja.encode(na)};Graph.prototype.isSwimlane=function(y,K){var L=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(L=this.getCurrentCellStyle(y,K)[mxConstants.STYLE_SHAPE]);return L==mxConstants.SHAPE_SWIMLANE||
-"table"==L||"tableRow"==L};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var K=this.model.getParent(y);if(null!=K){var L=this.getCurrentCellStyle(K);if(null!=L.expand)return"0"!=L.expand}return d.apply(this,arguments)&&(null==K||!this.isTable(K))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(y,K,L,S,V,ja,na,ya){null==ya&&(ya=this.model.getParent(y),this.isTable(ya)||this.isTableRow(ya))&&(ya=this.getCellAt(ja,na,null,!0,!1));L=null;this.model.beginUpdate();
-try{L=f.apply(this,[y,K,L,S,V,ja,na,ya]);this.model.setValue(L,"");var ra=this.getChildCells(L,!0);for(K=0;K<ra.length;K++){var ta=this.getCellGeometry(ra[K]);null!=ta&&ta.relative&&0<ta.x&&this.model.remove(ra[K])}var Da=this.getChildCells(y,!0);for(K=0;K<Da.length;K++)ta=this.getCellGeometry(Da[K]),null!=ta&&ta.relative&&0>=ta.x&&this.model.remove(Da[K]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[L]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[L]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-null,[y]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[y]);var Oa=this.model.getTerminal(L,!1);if(null!=Oa){var Ma=this.getCurrentCellStyle(Oa);null!=Ma&&"1"==Ma.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[L]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[L]))}}finally{this.model.endUpdate()}return L};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=
-function(y,K,L){if(K||L)g.apply(this,arguments);else{var S=this.getSelectionCell(),V=null,ja=[],na=mxUtils.bind(this,function(ya){if(null!=this.view.getState(ya)&&(this.model.isVertex(ya)||this.model.isEdge(ya)))if(ja.push(ya),ya==S)V=ja.length-1;else if(y&&null==S&&0<ja.length||null!=V&&y&&ja.length>V||!y&&0<V)return;for(var ra=0;ra<this.model.getChildCount(ya);ra++)na(this.model.getChildAt(ya,ra))});na(this.model.root);0<ja.length&&(V=null!=V?mxUtils.mod(V+(y?1:-1),ja.length):0,this.setSelectionCell(ja[V]))}};
-Graph.prototype.swapShapes=function(y,K,L,S,V,ja,na){K=!1;if(!S&&null!=V&&1==y.length&&(S=this.view.getState(V),L=this.view.getState(y[0]),null!=S&&null!=L&&(null!=ja&&mxEvent.isShiftDown(ja)||"umlLifeline"==S.style.shape&&"umlLifeline"==L.style.shape)&&(S=this.getCellGeometry(V),ja=this.getCellGeometry(y[0]),null!=S&&null!=ja))){K=S.clone();S=ja.clone();S.x=K.x;S.y=K.y;K.x=ja.x;K.y=ja.y;this.model.beginUpdate();try{this.model.setGeometry(V,K),this.model.setGeometry(y[0],S)}finally{this.model.endUpdate()}K=
-!0}return K};var m=Graph.prototype.moveCells;Graph.prototype.moveCells=function(y,K,L,S,V,ja,na){if(this.swapShapes(y,K,L,S,V,ja,na))return y;na=null!=na?na:{};if(this.isTable(V)){for(var ya=[],ra=0;ra<y.length;ra++)this.isTable(y[ra])?ya=ya.concat(this.model.getChildCells(y[ra],!0).reverse()):ya.push(y[ra]);y=ya}this.model.beginUpdate();try{ya=[];for(ra=0;ra<y.length;ra++)if(null!=V&&this.isTableRow(y[ra])){var ta=this.model.getParent(y[ra]),Da=this.getCellGeometry(y[ra]);this.isTable(ta)&&ya.push(ta);
-if(null!=ta&&null!=Da&&this.isTable(ta)&&this.isTable(V)&&(S||ta!=V)){if(!S){var Oa=this.getCellGeometry(ta);null!=Oa&&(Oa=Oa.clone(),Oa.height-=Da.height,this.model.setGeometry(ta,Oa))}Oa=this.getCellGeometry(V);null!=Oa&&(Oa=Oa.clone(),Oa.height+=Da.height,this.model.setGeometry(V,Oa));var Ma=this.model.getChildCells(V,!0);if(0<Ma.length){y[ra]=S?this.cloneCell(y[ra]):y[ra];var Wa=this.model.getChildCells(y[ra],!0),Sa=this.model.getChildCells(Ma[0],!0),Fa=Sa.length-Wa.length;if(0<Fa)for(var Ja=
-0;Ja<Fa;Ja++){var xa=this.cloneCell(Wa[Wa.length-1]);null!=xa&&(xa.value="",this.model.add(y[ra],xa))}else if(0>Fa)for(Ja=0;Ja>Fa;Ja--)this.model.remove(Wa[Wa.length+Ja-1]);Wa=this.model.getChildCells(y[ra],!0);for(Ja=0;Ja<Sa.length;Ja++){var Ba=this.getCellGeometry(Sa[Ja]),Pa=this.getCellGeometry(Wa[Ja]);null!=Ba&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Ba.width,this.model.setGeometry(Wa[Ja],Pa))}}}}var Ka=m.apply(this,arguments);for(ra=0;ra<ya.length;ra++)!S&&this.model.contains(ya[ra])&&0==this.model.getChildCount(ya[ra])&&
-this.model.remove(ya[ra]);S&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(y)),Ka)}finally{this.model.endUpdate()}return Ka};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,K){var L=[];this.model.beginUpdate();try{for(var S=0;S<y.length;S++)if(this.isTableCell(y[S])){var V=this.model.getParent(y[S]),ja=this.model.getParent(V);1==this.model.getChildCount(V)&&1==this.model.getChildCount(ja)?0>mxUtils.indexOf(y,ja)&&0>mxUtils.indexOf(L,ja)&&L.push(ja):
-this.labelChanged(y[S],"")}else{if(this.isTableRow(y[S])&&(ja=this.model.getParent(y[S]),0>mxUtils.indexOf(y,ja)&&0>mxUtils.indexOf(L,ja))){for(var na=this.model.getChildCells(ja,!0),ya=0,ra=0;ra<na.length;ra++)0<=mxUtils.indexOf(y,na[ra])&&ya++;ya==na.length&&L.push(ja)}L.push(y[S])}L=q.apply(this,[L,K])}finally{this.model.endUpdate()}return L};Graph.prototype.updateCustomLinks=function(y,K,L){L=null!=L?L:new Graph;for(var S=0;S<K.length;S++)null!=K[S]&&L.updateCustomLinksForCell(y,K[S],L)};Graph.prototype.updateCustomLinksForCell=
-function(y,K){this.doUpdateCustomLinksForCell(y,K);for(var L=this.model.getChildCount(K),S=0;S<L;S++)this.updateCustomLinksForCell(y,this.model.getChildAt(K,S))};Graph.prototype.doUpdateCustomLinksForCell=function(y,K){};Graph.prototype.getAllConnectionConstraints=function(y,K){if(null!=y){K=mxUtils.getValue(y.style,"points",null);if(null!=K){y=[];try{var L=JSON.parse(K);for(K=0;K<L.length;K++){var S=L[K];y.push(new mxConnectionConstraint(new mxPoint(S[0],S[1]),2<S.length?"0"!=S[2]:!0,null,3<S.length?
-S[3]:0,4<S.length?S[4]:0))}}catch(ja){}return y}if(null!=y.shape&&null!=y.shape.bounds){S=y.shape.direction;K=y.shape.bounds;var V=y.shape.scale;L=K.width/V;K=K.height/V;if(S==mxConstants.DIRECTION_NORTH||S==mxConstants.DIRECTION_SOUTH)S=L,L=K,K=S;K=y.shape.getConstraints(y.style,L,K);if(null!=K)return K;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};Graph.prototype.flipEdge=function(y){if(null!=
-y){var K=this.getCurrentCellStyle(y);K=mxUtils.getValue(K,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,K,[y])}};Graph.prototype.isValidRoot=function(y){for(var K=this.model.getChildCount(y),L=0,S=0;S<K;S++){var V=this.model.getChildAt(y,S);this.model.isVertex(V)&&(V=this.getCellGeometry(V),null==V||V.relative||L++)}return 0<L||this.isContainer(y)};Graph.prototype.isValidDropTarget=
-function(y,K,L){for(var S=this.getCurrentCellStyle(y),V=!0,ja=!0,na=0;na<K.length&&ja;na++)V=V&&this.isTable(K[na]),ja=ja&&this.isTableRow(K[na]);return(1==K.length&&null!=L&&mxEvent.isShiftDown(L)&&!mxEvent.isControlDown(L)&&!mxEvent.isAltDown(L)||("1"!=mxUtils.getValue(S,"part","0")||this.isContainer(y))&&"0"!=mxUtils.getValue(S,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&!this.isTableRow(y)&&(!this.isTable(y)||ja||V))&&!this.isCellLocked(y)};
-Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var K=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(K&&null!=y&&null!=this.layoutManager){var L=this.model.getParent(y);null!=L&&(L=this.layoutManager.getLayout(L),null!=L&&L.constructor==mxStackLayout&&(K=!1))}return K};Graph.prototype.getPreferredSizeForCell=function(y){var K=mxGraph.prototype.getPreferredSizeForCell.apply(this,
-arguments);null!=K&&(K.width+=10,K.height+=4,this.gridEnabled&&(K.width=this.snap(K.width),K.height=this.snap(K.height)));return K};Graph.prototype.turnShapes=function(y,K){var L=this.getModel(),S=[];L.beginUpdate();try{for(var V=0;V<y.length;V++){var ja=y[V];if(L.isEdge(ja)){var na=L.getTerminal(ja,!0),ya=L.getTerminal(ja,!1);L.setTerminal(ja,ya,!0);L.setTerminal(ja,na,!1);var ra=L.getGeometry(ja);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var ta=ra.getTerminalPoint(!0),Da=ra.getTerminalPoint(!1);
-ra.setTerminalPoint(ta,!1);ra.setTerminalPoint(Da,!0);L.setGeometry(ja,ra);var Oa=this.view.getState(ja),Ma=this.view.getState(na),Wa=this.view.getState(ya);if(null!=Oa){var Sa=null!=Ma?this.getConnectionConstraint(Oa,Ma,!0):null,Fa=null!=Wa?this.getConnectionConstraint(Oa,Wa,!1):null;this.setConnectionConstraint(ja,na,!0,Fa);this.setConnectionConstraint(ja,ya,!1,Sa);var Ja=mxUtils.getValue(Oa.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
-mxUtils.getValue(Oa.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[ja]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,Ja,[ja])}S.push(ja)}}else if(L.isVertex(ja)&&(ra=this.getCellGeometry(ja),null!=ra)){if(!(this.isTable(ja)||this.isTableRow(ja)||this.isTableCell(ja)||this.isSwimlane(ja))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var xa=ra.width;ra.width=ra.height;ra.height=xa;L.setGeometry(ja,ra)}var Ba=this.view.getState(ja);if(null!=Ba){var Pa=
-[mxConstants.DIRECTION_EAST,mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],Ka=mxUtils.getValue(Ba.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,Ka)+(K?-1:1),Pa.length)],[ja])}S.push(ja)}}}finally{L.endUpdate()}return S};Graph.prototype.stencilHasPlaceholders=function(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0;
-y=y.nextSibling}return!1};var z=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var K=y.cell;this.isTableCell(K)&&(K=this.model.getParent(K));this.isTableRow(K)&&(K=this.model.getParent(K));var L=this.view.getState(K);null!=L&&null!=L.shape&&(this.view.invalidate(K),L.shape.bounds=null)}z.apply(this,arguments);
-y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var K=0;K<y.length;K++){var L=this.view.getState(y[K]);null!=L&&null!=L.shape&&null!=L.shape.stencil&&this.stencilHasPlaceholders(L.shape.stencil)?this.removeStateForCell(y[K]):this.isReplacePlaceholders(y[K])&&this.view.invalidate(y[K],!1,!1)}};
-Graph.prototype.replaceElement=function(y,K){K=y.ownerDocument.createElement(null!=K?K:"span");for(var L=Array.prototype.slice.call(y.attributes);attr=L.pop();)K.setAttribute(attr.nodeName,attr.nodeValue);K.innerHTML=y.innerHTML;y.parentNode.replaceChild(K,y)};Graph.prototype.processElements=function(y,K){if(null!=y){y=y.getElementsByTagName("*");for(var L=0;L<y.length;L++)K(y[L])}};Graph.prototype.updateLabelElements=function(y,K,L){y=null!=y?y:this.getSelectionCells();for(var S=document.createElement("div"),
-V=0;V<y.length;V++)if(this.isHtmlLabel(y[V])){var ja=this.convertValueToString(y[V]);if(null!=ja&&0<ja.length){S.innerHTML=ja;for(var na=S.getElementsByTagName(null!=L?L:"*"),ya=0;ya<na.length;ya++)K(na[ya]);S.innerHTML!=ja&&this.cellLabelChanged(y[V],S.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,K,L){K=Graph.zapGremlins(K);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&null!=y.getAttribute("placeholder"))for(var S=y.getAttribute("placeholder"),
-V=y;null!=V;){if(V==this.model.getRoot()||null!=V.value&&"object"==typeof V.value&&V.hasAttribute(S)){this.setAttributeForCell(V,S,K);break}V=this.model.getParent(V)}var ja=y.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&ja.hasAttribute("label_"+Graph.diagramLanguage)?ja.setAttribute("label_"+Graph.diagramLanguage,K):ja.setAttribute("label",K);K=ja}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(y){if(null!=
-y){for(var K=new mxDictionary,L=0;L<y.length;L++)K.put(y[L],!0);var S=[];for(L=0;L<y.length;L++){var V=this.model.getParent(y[L]);null==V||K.get(V)||(K.put(V,!0),S.push(V))}for(L=0;L<S.length;L++)if(V=this.view.getState(S[L]),null!=V&&(this.model.isEdge(V.cell)||this.model.isVertex(V.cell))&&this.isCellDeletable(V.cell)&&this.isTransparentState(V)){for(var ja=!0,na=0;na<this.model.getChildCount(V.cell)&&ja;na++)K.get(this.model.getChildAt(V.cell,na))||(ja=!1);ja&&y.push(V.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
-arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var K=[],L=0;L<y.length;L++)this.isCellDeletable(y[L])&&this.isTransparentState(this.view.getState(y[L]))&&K.push(y[L]);y=K;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,K){this.setAttributeForCell(y,"link",K)};Graph.prototype.setTooltipForCell=function(y,K){var L="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+
-Graph.diagramLanguage)&&(L="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,L,K)};Graph.prototype.getAttributeForCell=function(y,K,L){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(K):null;return null!=y?y:L};Graph.prototype.setAttributeForCell=function(y,K,L){if(null!=y.value&&"object"==typeof y.value)var S=y.value.cloneNode(!0);else S=mxUtils.createXmlDocument().createElement("UserObject"),S.setAttribute("label",y.value||"");null!=L?S.setAttribute(K,L):S.removeAttribute(K);
-this.model.setValue(y,S)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,K,L,S){this.getModel();if(mxEvent.isAltDown(K))return null;for(var V=0;V<y.length;V++){var ja=this.model.getParent(y[V]);if(this.model.isEdge(ja)&&0>mxUtils.indexOf(y,ja))return null}ja=F.apply(this,arguments);var na=!0;for(V=0;V<y.length&&na;V++)na=na&&this.isTableRow(y[V]);na&&(this.isTableCell(ja)&&(ja=this.model.getParent(ja)),this.isTableRow(ja)&&(ja=this.model.getParent(ja)),this.isTable(ja)||
-(ja=null));return ja};Graph.prototype.click=function(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};Graph.prototype.dblClick=function(y,K){this.isEnabled()&&(K=this.insertTextForEvent(y,K),mxGraph.prototype.dblClick.call(this,y,K))};Graph.prototype.insertTextForEvent=function(y,K){var L=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=y&&!this.model.isVertex(K)){var S=this.model.isEdge(K)?this.view.getState(K):
-null,V=mxEvent.getSource(y);this.firstClickState!=S||this.firstClickSource!=V||null!=S&&null!=S.text&&null!=S.text.node&&null!=S.text.boundingBox&&(mxUtils.contains(S.text.boundingBox,L.x,L.y)||mxUtils.isAncestorNode(S.text.node,mxEvent.getSource(y)))||(null!=S||this.isCellLocked(this.getDefaultParent()))&&(null==S||this.isCellLocked(S.cell))||!(null!=S||mxClient.IS_SVG&&V==this.view.getCanvas().ownerSVGElement)||(null==S&&(S=this.view.getState(this.getCellAt(L.x,L.y))),K=this.addText(L.x,L.y,S))}return K};
-Graph.prototype.getInsertPoint=function(){var y=this.getGridSize(),K=this.container.scrollLeft/this.view.scale-this.view.translate.x,L=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var S=this.getPageLayout(),V=this.getPageSize();K=Math.max(K,S.x*V.width);L=Math.max(L,S.y*V.height)}return new mxPoint(this.snap(K+y),this.snap(L+y))};Graph.prototype.getFreeInsertPoint=function(){var y=this.view,K=this.getGraphBounds(),L=this.getInsertPoint(),S=this.snap(Math.round(Math.max(L.x,
-K.x/y.scale-y.translate.x+(0==K.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(L.y,(K.y+K.height)/y.scale-y.translate.y+2*this.gridSize)));return new mxPoint(S,y)};Graph.prototype.getCenterInsertPoint=function(y){y=null!=y?y:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
-2)/this.view.scale-this.view.translate.y-y.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(y,K,L){var S=new mxCell;S.value="Text";S.geometry=new mxGeometry(0,0,0,0);S.vertex=!0;if(null!=L&&this.model.isEdge(L.cell)){S.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
-S.geometry.relative=!0;S.connectable=!1;var V=this.view.getRelativePoint(L,y,K);S.geometry.x=Math.round(1E4*V.x)/1E4;S.geometry.y=Math.round(V.y);S.geometry.offset=new mxPoint(0,0);V=this.view.getPoint(L,S.geometry);var ja=this.view.scale;S.geometry.offset=new mxPoint(Math.round((y-V.x)/ja),Math.round((K-V.y)/ja))}else V=this.view.translate,S.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",S.geometry.width=40,S.geometry.height=20,S.geometry.x=Math.round(y/this.view.scale)-
-V.x-(null!=L?L.origin.x:0),S.geometry.y=Math.round(K/this.view.scale)-V.y-(null!=L?L.origin.y:0),S.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([S],null!=L?L.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[S])),this.autoSizeCell(S)}finally{this.getModel().endUpdate()}return S};Graph.prototype.addClickHandler=function(y,K,L){var S=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");if(null!=ra)for(var ta=0;ta<ra.length;ta++){var Da=
-this.getAbsoluteUrl(ra[ta].getAttribute("href"));null!=Da&&(ra[ta].setAttribute("rel",this.linkRelation),ra[ta].setAttribute("href",Da),null!=K&&mxEvent.addGestureListeners(ra[ta],null,null,K))}});this.model.addListener(mxEvent.CHANGE,S);S();var V=this.container.style.cursor,ja=this.getTolerance(),na=this,ya={currentState:null,currentLink:null,currentTarget:null,highlight:null!=y&&""!=y&&y!=mxConstants.NONE?new mxCellHighlight(na,y,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var ta=
-ra.sourceState;if(null==ta||null==na.getLinkForCell(ta.cell))ra=na.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Da,Oa,Ma){return null==na.getLinkForCell(Da.cell)}),ta=null==ta||na.model.isAncestor(ra,ta.cell)?na.view.getState(ra):null;ta!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=ta,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ra,ta){this.startX=ta.getGraphX();this.startY=ta.getGraphY();this.scrollLeft=na.container.scrollLeft;
-this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(ta)},mouseMove:function(ra,ta){if(na.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-ta.getGraphX()),ta=Math.abs(this.startY-ta.getGraphY()),(ra>ja||ta>ja)&&this.clear());else{for(ra=ta.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;null!=ra?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=
-this.currentState&&na.tooltipHandler.reset(ta,!0,this.currentState),(null==this.currentState||ta.getState()!=this.currentState&&null!=ta.sourceState||!na.intersects(this.currentState,ta.getGraphX(),ta.getGraphY()))&&this.updateCurrentState(ta))}},mouseUp:function(ra,ta){var Da=ta.getSource();for(ra=ta.getEvent();null!=Da&&"a"!=Da.nodeName.toLowerCase();)Da=Da.parentNode;null==Da&&Math.abs(this.scrollLeft-na.container.scrollLeft)<ja&&Math.abs(this.scrollTop-na.container.scrollTop)<ja&&(null==ta.sourceState||
-!ta.isSource(ta.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Da=na.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Da||null==K||K(ra,this.currentLink),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ra)?"_blank":Da?na.linkTarget:"_top",na.openLink(this.currentLink,ra),ta.consume())):null!=L&&!ta.isConsumed()&&
-Math.abs(this.scrollLeft-na.container.scrollLeft)<ja&&Math.abs(this.scrollTop-na.container.scrollTop)<ja&&Math.abs(this.startX-ta.getGraphX())<ja&&Math.abs(this.startY-ta.getGraphY())<ja&&L(ta.getEvent()));this.clear()},activate:function(ra){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(ra.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=na.container&&
-(na.container.style.cursor=V);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(ra){};na.addMouseListener(ya);mxEvent.addListener(document,"mouseleave",function(ra){ya.clear()})};Graph.prototype.duplicateCells=function(y,K){y=null!=y?y:this.getSelectionCells();K=null!=K?K:!0;for(var L=0;L<y.length;L++)this.isTableCell(y[L])&&(y[L]=this.model.getParent(y[L]));y=this.model.getTopmostCells(y);
-var S=this.getModel(),V=this.gridSize,ja=[];S.beginUpdate();try{var na={},ya=this.createCellLookup(y),ra=this.cloneCells(y,!1,na,!0);for(L=0;L<y.length;L++){var ta=S.getParent(y[L]);if(null!=ta){var Da=this.moveCells([ra[L]],V,V,!1)[0];ja.push(Da);if(K)S.add(ta,ra[L]);else{var Oa=ta.getIndex(y[L]);S.add(ta,ra[L],Oa+1)}if(this.isTable(ta)){var Ma=this.getCellGeometry(ra[L]),Wa=this.getCellGeometry(ta);null!=Ma&&null!=Wa&&(Wa=Wa.clone(),Wa.height+=Ma.height,S.setGeometry(ta,Wa))}}else ja.push(ra[L])}this.updateCustomLinks(this.createCellMapping(na,
-ya),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{S.endUpdate()}return ja};Graph.prototype.insertImage=function(y,K,L){if(null!=y&&null!=this.cellEditor.textarea){for(var S=this.cellEditor.textarea.getElementsByTagName("img"),V=[],ja=0;ja<S.length;ja++)V.push(S[ja]);document.execCommand("insertimage",!1,y);y=this.cellEditor.textarea.getElementsByTagName("img");if(y.length==V.length+1)for(ja=y.length-1;0<=ja;ja--)if(0==ja||y[ja]!=V[ja-1]){y[ja].setAttribute("width",
-K);y[ja].setAttribute("height",L);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var K=this.cellEditor.textarea.getElementsByTagName("a"),L=[],S=0;S<K.length;S++)L.push(K[S]);document.execCommand("createlink",!1,mxUtils.trim(y));K=this.cellEditor.textarea.getElementsByTagName("a");if(K.length==L.length+1)for(S=K.length-1;0<=S;S--)if(K[S]!=L[S-1]){for(K=K[S].getElementsByTagName("a");0<K.length;){for(L=
-K[0].parentNode;null!=K[0].firstChild;)L.insertBefore(K[0].firstChild,K[0]);L.removeChild(K[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(y))};Graph.prototype.isCellResizable=function(y){var K=mxGraph.prototype.isCellResizable.apply(this,arguments),L=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(K||"0"!=mxUtils.getValue(L,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==L[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,K){null==
-K&&(K=this.getSelectionCells());if(null!=K&&1<K.length){for(var L=[],S=null,V=null,ja=0;ja<K.length;ja++)if(this.getModel().isVertex(K[ja])){var na=this.view.getState(K[ja]);if(null!=na){var ya=y?na.getCenterX():na.getCenterY();S=null!=S?Math.max(S,ya):ya;V=null!=V?Math.min(V,ya):ya;L.push(na)}}if(2<L.length){L.sort(function(Oa,Ma){return y?Oa.x-Ma.x:Oa.y-Ma.y});na=this.view.translate;ya=this.view.scale;V=V/ya-(y?na.x:na.y);S=S/ya-(y?na.x:na.y);this.getModel().beginUpdate();try{var ra=(S-V)/(L.length-
-1);S=V;for(ja=1;ja<L.length-1;ja++){var ta=this.view.getState(this.model.getParent(L[ja].cell)),Da=this.getCellGeometry(L[ja].cell);S+=ra;null!=Da&&null!=ta&&(Da=Da.clone(),y?Da.x=Math.round(S-Da.width/2)-ta.origin.x:Da.y=Math.round(S-Da.height/2)-ta.origin.y,this.getModel().setGeometry(L[ja].cell,Da))}}finally{this.getModel().endUpdate()}}}return K};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport=
-function(){var y=new mxImageExport;y.getLinkForCellState=mxUtils.bind(this,function(K,L){return this.getLinkForCell(K.cell)});return y};Graph.prototype.parseBackgroundImage=function(y){var K=null;null!=y&&0<y.length&&(y=JSON.parse(y),K=new mxImage(y.src,y.width,y.height));return K};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,K,L,S,V,ja,na,ya,ra,ta,Da,Oa,Ma,Wa){var Sa=null;if(null!=Wa)for(Sa=new mxDictionary,Da=0;Da<Wa.length;Da++)Sa.put(Wa[Da],
-!0);if(Wa=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),this.sizeDidChange();try{K=null!=K?K:1;L=null!=L?L:0;V=null!=V?V:!0;ja=null!=ja?ja:!0;na=null!=na?na:!0;ta=null!=ta?ta:!1;var Fa="page"==Ma?this.view.getBackgroundPageBounds():ja&&null==Sa||S||"diagram"==Ma?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),Ja=this.view.scale;"diagram"==Ma&&null!=this.backgroundImage&&(Fa=mxRectangle.fromRectangle(Fa),Fa.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*
-Ja,(this.view.translate.y+this.backgroundImage.y)*Ja,this.backgroundImage.width*Ja,this.backgroundImage.height*Ja)));if(null==Fa)throw Error(mxResources.get("drawingEmpty"));S=K/Ja;Ma=V?-.5:0;var xa=Graph.createSvgNode(Ma,Ma,Math.max(1,Math.ceil(Fa.width*S)+2*L)+(ta&&0==L?5:0),Math.max(1,Math.ceil(Fa.height*S)+2*L)+(ta&&0==L?5:0),y),Ba=xa.ownerDocument,Pa=null!=Ba.createElementNS?Ba.createElementNS(mxConstants.NS_SVG,"g"):Ba.createElement("g");xa.appendChild(Pa);var Ka=this.createSvgCanvas(Pa);Ka.foOffset=
-V?-.5:0;Ka.textOffset=V?-.5:0;Ka.imageOffset=V?-.5:0;Ka.translate(Math.floor(L/K-Fa.x/Ja),Math.floor(L/K-Fa.y/Ja));var Na=document.createElement("div"),hb=Ka.getAlternateText;Ka.getAlternateText=function(eb,kb,ib,pb,vb,ob,Bb,yb,nb,qb,fb,rb,tb){if(null!=ob&&0<this.state.fontSize)try{mxUtils.isNode(ob)?ob=ob.innerText:(Na.innerHTML=ob,ob=mxUtils.extractTextWithWhitespace(Na.childNodes));for(var zb=Math.ceil(2*pb/this.state.fontSize),wb=[],Ab=0,lb=0;(0==zb||Ab<zb)&&lb<ob.length;){var xb=ob.charCodeAt(lb);
-if(10==xb||13==xb){if(0<Ab)break}else wb.push(ob.charAt(lb)),255>xb&&Ab++;lb++}wb.length<ob.length&&1<ob.length-wb.length&&(ob=mxUtils.trim(wb.join(""))+"...");return ob}catch(c){return hb.apply(this,arguments)}else return hb.apply(this,arguments)};var Qa=this.backgroundImage;if(null!=Qa){y=Ja/K;var mb=this.view.translate;Ma=new mxRectangle((Qa.x+mb.x)*y,(Qa.y+mb.y)*y,Qa.width*y,Qa.height*y);mxUtils.intersects(Fa,Ma)&&Ka.image(Qa.x+mb.x,Qa.y+mb.y,Qa.width,Qa.height,Qa.src,!0)}Ka.scale(S);Ka.textEnabled=
-na;ya=null!=ya?ya:this.createSvgImageExport();var ub=ya.drawCellState,bb=ya.getLinkForCellState;ya.getLinkForCellState=function(eb,kb){var ib=bb.apply(this,arguments);return null==ib||eb.view.graph.isCustomLink(ib)?null:ib};ya.getLinkTargetForCellState=function(eb,kb){return eb.view.graph.getLinkTargetForCell(eb.cell)};ya.drawCellState=function(eb,kb){for(var ib=eb.view.graph,pb=null!=Sa?Sa.get(eb.cell):ib.isCellSelected(eb.cell),vb=ib.model.getParent(eb.cell);!(ja&&null==Sa||pb)&&null!=vb;)pb=null!=
-Sa?Sa.get(vb):ib.isCellSelected(vb),vb=ib.model.getParent(vb);(ja&&null==Sa||pb)&&ub.apply(this,arguments)};ya.drawState(this.getView().getState(this.model.root),Ka);this.updateSvgLinks(xa,ra,!0);this.addForeignObjectWarning(Ka,xa);return xa}finally{Wa&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(y,K){if("0"!=urlParams["svg-warning"]&&0<K.getElementsByTagName("foreignObject").length){var L=y.createElement("switch"),S=y.createElement("g");
-S.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");var V=y.createElement("a");V.setAttribute("transform","translate(0,-5)");null==V.setAttributeNS||K.ownerDocument!=document&&null==document.documentMode?(V.setAttribute("xlink:href",Graph.foreignObjectWarningLink),V.setAttribute("target","_blank")):(V.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),V.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));y=y.createElement("text");
-y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x","50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);L.appendChild(S);V.appendChild(y);L.appendChild(V);K.appendChild(L)}};Graph.prototype.updateSvgLinks=function(y,K,L){y=y.getElementsByTagName("a");for(var S=0;S<y.length;S++)if(null==y[S].getAttribute("target")){var V=y[S].getAttribute("href");null==V&&(V=y[S].getAttribute("xlink:href"));null!=V&&(null!=K&&/^https?:\/\//.test(V)?
-y[S].setAttribute("target",K):L&&this.isCustomLink(V)&&y[S].setAttribute("href","javascript:void(0);"))}};Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;y.pointerEvents=!0;return y};Graph.prototype.getSelectedElement=function(){var y=null;if(window.getSelection){var K=window.getSelection();K.getRangeAt&&K.rangeCount&&(y=K.getRangeAt(0).commonAncestorContainer)}else document.selection&&(y=document.selection.createRange().parentElement());
-return y};Graph.prototype.getSelectedEditingElement=function(){for(var y=this.getSelectedElement();null!=y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=y.parentNode;null!=y&&y==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(y=this.cellEditor.textarea.firstChild);return y};Graph.prototype.getParentByName=function(y,K,L){for(;null!=y&&y.nodeName!=K;){if(y==L)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=
-function(y,K,L){for(;null!=y&&!(0<=mxUtils.indexOf(K,y.nodeName));){if(y==L)return null;y=y.parentNode}return y};Graph.prototype.selectNode=function(y){var K=null;if(window.getSelection){if(K=window.getSelection(),K.getRangeAt&&K.rangeCount){var L=document.createRange();L.selectNode(y);K.removeAllRanges();K.addRange(L)}}else(K=document.selection)&&"Control"!=K.type&&(y=K.createRange(),y.collapse(!0),L=K.createRange(),L.setEndPoint("StartToStart",y),L.select())};Graph.prototype.flipEdgePoints=function(y,
-K,L){var S=this.getCellGeometry(y);if(null!=S){S=S.clone();if(null!=S.points)for(var V=0;V<S.points.length;V++)K?S.points[V].x=L+(L-S.points[V].x):S.points[V].y=L+(L-S.points[V].y);V=function(ja){null!=ja&&(K?ja.x=L+(L-ja.x):ja.y=L+(L-ja.y))};V(S.getTerminalPoint(!0));V(S.getTerminalPoint(!1));this.model.setGeometry(y,S)}};Graph.prototype.flipChildren=function(y,K,L){this.model.beginUpdate();try{for(var S=this.model.getChildCount(y),V=0;V<S;V++){var ja=this.model.getChildAt(y,V);if(this.model.isEdge(ja))this.flipEdgePoints(ja,
-K,L);else{var na=this.getCellGeometry(ja);null!=na&&(na=na.clone(),K?na.x=L+(L-na.x-na.width):na.y=L+(L-na.y-na.height),this.model.setGeometry(ja,na))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(y,K){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);for(var L=[],S=0;S<y.length;S++)if(this.model.isEdge(y[S])){var V=this.view.getState(y[S]);null!=V&&this.flipEdgePoints(y[S],K,(K?V.getCenterX():V.getCenterY())/this.view.scale-(K?V.origin.x:V.origin.y)-(K?this.view.translate.x:
-this.view.translate.y))}else{var ja=this.getCellGeometry(y[S]);null!=ja&&this.flipChildren(y[S],K,K?ja.getCenterX()-ja.x:ja.getCenterY()-ja.y);L.push(y[S])}this.toggleCellStyles(K?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,L)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(y,K){var L=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var S=0;S<y.length;S++){var V=this.model.getParent(y[S]);if(this.isTable(V)){var ja=this.getCellGeometry(y[S]),na=this.getCellGeometry(V);
-null!=ja&&null!=na&&(na=na.clone(),na.height-=ja.height,this.model.setGeometry(V,na))}}var ya=this.selectParentAfterDelete?this.model.getParents(y):null;this.removeCells(y,K)}finally{this.model.endUpdate()}if(null!=ya)for(L=[],S=0;S<ya.length;S++)this.model.contains(ya[S])&&(this.model.isVertex(ya[S])||this.model.isEdge(ya[S]))&&L.push(ya[S])}return L};Graph.prototype.insertTableColumn=function(y,K){var L=this.getModel();L.beginUpdate();try{var S=y,V=0;if(this.isTableCell(y)){var ja=L.getParent(y);
-S=L.getParent(ja);V=mxUtils.indexOf(L.getChildCells(ja,!0),y)}else this.isTableRow(y)?S=L.getParent(y):y=L.getChildCells(S,!0)[0],K||(V=L.getChildCells(y,!0).length-1);var na=L.getChildCells(S,!0),ya=Graph.minTableColumnWidth;for(y=0;y<na.length;y++){var ra=L.getChildCells(na[y],!0)[V],ta=L.cloneCell(ra,!1),Da=this.getCellGeometry(ta);ta.value=null;ta.style=mxUtils.setStyle(mxUtils.setStyle(ta.style,"rowspan",null),"colspan",null);if(null!=Da){null!=Da.alternateBounds&&(Da.width=Da.alternateBounds.width,
-Da.height=Da.alternateBounds.height,Da.alternateBounds=null);ya=Da.width;var Oa=this.getCellGeometry(na[y]);null!=Oa&&(Da.height=Oa.height)}L.add(na[y],ta,V+(K?0:1))}var Ma=this.getCellGeometry(S);null!=Ma&&(Ma=Ma.clone(),Ma.width+=ya,L.setGeometry(S,Ma))}finally{L.endUpdate()}};Graph.prototype.deleteLane=function(y){var K=this.getModel();K.beginUpdate();try{var L=null;L="stackLayout"==this.getCurrentCellStyle(y).childLayout?y:K.getParent(y);var S=K.getChildCells(L,!0);0==S.length?K.remove(L):(L==
-y&&(y=S[S.length-1]),K.remove(y))}finally{K.endUpdate()}};Graph.prototype.insertLane=function(y,K){var L=this.getModel();L.beginUpdate();try{var S=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){S=y;var V=L.getChildCells(S,!0);y=V[K?0:V.length-1]}else S=L.getParent(y);var ja=S.getIndex(y);y=L.cloneCell(y,!1);y.value=null;L.add(S,y,ja+(K?0:1))}finally{L.endUpdate()}};Graph.prototype.insertTableRow=function(y,K){var L=this.getModel();L.beginUpdate();try{var S=y,V=y;if(this.isTableCell(y))V=
-L.getParent(y),S=L.getParent(V);else if(this.isTableRow(y))S=L.getParent(y);else{var ja=L.getChildCells(S,!0);V=ja[K?0:ja.length-1]}var na=L.getChildCells(V,!0),ya=S.getIndex(V);V=L.cloneCell(V,!1);V.value=null;var ra=this.getCellGeometry(V);if(null!=ra){for(ja=0;ja<na.length;ja++){y=L.cloneCell(na[ja],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var ta=this.getCellGeometry(y);null!=ta&&(null!=ta.alternateBounds&&(ta.width=ta.alternateBounds.width,
-ta.height=ta.alternateBounds.height,ta.alternateBounds=null),ta.height=ra.height);V.insert(y)}L.add(S,V,ya+(K?0:1));var Da=this.getCellGeometry(S);null!=Da&&(Da=Da.clone(),Da.height+=ra.height,L.setGeometry(S,Da))}}finally{L.endUpdate()}};Graph.prototype.deleteTableColumn=function(y){var K=this.getModel();K.beginUpdate();try{var L=y,S=y;this.isTableCell(y)&&(S=K.getParent(y));this.isTableRow(S)&&(L=K.getParent(S));var V=K.getChildCells(L,!0);if(0==V.length)K.remove(L);else{this.isTableRow(S)||(S=
-V[0]);var ja=K.getChildCells(S,!0);if(1>=ja.length)K.remove(L);else{var na=ja.length-1;this.isTableCell(y)&&(na=mxUtils.indexOf(ja,y));for(S=y=0;S<V.length;S++){var ya=K.getChildCells(V[S],!0)[na];K.remove(ya);var ra=this.getCellGeometry(ya);null!=ra&&(y=Math.max(y,ra.width))}var ta=this.getCellGeometry(L);null!=ta&&(ta=ta.clone(),ta.width-=y,K.setGeometry(L,ta))}}}finally{K.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var K=this.getModel();K.beginUpdate();try{var L=y,S=y;this.isTableCell(y)&&
-(y=S=K.getParent(y));this.isTableRow(y)&&(L=K.getParent(S));var V=K.getChildCells(L,!0);if(1>=V.length)K.remove(L);else{this.isTableRow(S)||(S=V[V.length-1]);K.remove(S);y=0;var ja=this.getCellGeometry(S);null!=ja&&(y=ja.height);var na=this.getCellGeometry(L);null!=na&&(na=na.clone(),na.height-=y,K.setGeometry(L,na))}}finally{K.endUpdate()}};Graph.prototype.insertRow=function(y,K){for(var L=y.tBodies[0],S=L.rows[0].cells,V=y=0;V<S.length;V++){var ja=S[V].getAttribute("colspan");y+=null!=ja?parseInt(ja):
-1}K=L.insertRow(K);for(V=0;V<y;V++)mxUtils.br(K.insertCell(-1));return K.cells[0]};Graph.prototype.deleteRow=function(y,K){y.tBodies[0].deleteRow(K)};Graph.prototype.insertColumn=function(y,K){var L=y.tHead;if(null!=L)for(var S=0;S<L.rows.length;S++){var V=document.createElement("th");L.rows[S].appendChild(V);mxUtils.br(V)}y=y.tBodies[0];for(L=0;L<y.rows.length;L++)S=y.rows[L].insertCell(K),mxUtils.br(S);return y.rows[0].cells[0<=K?K:y.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(y,
-K){if(0<=K){y=y.tBodies[0].rows;for(var L=0;L<y.length;L++)y[L].cells.length>K&&y[L].deleteCell(K)}};Graph.prototype.pasteHtmlAtCaret=function(y){if(window.getSelection){var K=window.getSelection();if(K.getRangeAt&&K.rangeCount){K=K.getRangeAt(0);K.deleteContents();var L=document.createElement("div");L.innerHTML=y;y=document.createDocumentFragment();for(var S;S=L.firstChild;)lastNode=y.appendChild(S);K.insertNode(y)}}else(K=document.selection)&&"Control"!=K.type&&K.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=
-function(y,K){function L(V,ja){V.length>ja&&(V=V.substring(0,Math.round(ja/2))+"..."+V.substring(V.length-Math.round(ja/4)));return V}y=null!=y?y:"javascript:void(0);";if(null==K||0==K.length)K=this.isCustomLink(y)?this.getLinkTitle(y):y;var S=document.createElement("a");S.setAttribute("rel",this.linkRelation);S.setAttribute("href",this.getAbsoluteUrl(y));S.setAttribute("title",L(this.isCustomLink(y)?this.getLinkTitle(y):y,80));null!=this.linkTarget&&S.setAttribute("target",this.linkTarget);mxUtils.write(S,
-L(K,40));this.isCustomLink(y)&&mxEvent.addListener(S,"click",mxUtils.bind(this,function(V){this.customLinkClicked(y);mxEvent.consume(V)}));return S};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(ja,na){this.popupMenuHandler.hideMenu()});var y=this.updateMouseEvent;this.updateMouseEvent=function(ja){ja=y.apply(this,arguments);if(mxEvent.isTouchEvent(ja.getEvent())&&
-null==ja.getState()){var na=this.getCellAt(ja.graphX,ja.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,ja.graphX,ja.graphY)||(ja.state=this.view.getState(na),null!=ja.state&&null!=ja.state.shape&&(this.container.style.cursor=ja.state.shape.node.style.cursor))}null==ja.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return ja};var K=!1,L=!1,S=!1,V=this.fireMouseEvent;this.fireMouseEvent=function(ja,na,ya){ja==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),
-K=this.isCellSelected(na.getCell()),L=this.isSelectionEmpty(),S=this.popupMenuHandler.isMenuShowing());V.apply(this,arguments)};this.popupMenuHandler.mouseUp=mxUtils.bind(this,function(ja,na){var ya=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!S&&!ya&&(L&&null==na.getCell()&&this.isSelectionEmpty()||K&&this.isCellSelected(na.getCell())));
-ya=!K||ya?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var ta=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+ta.x+1,na.getY()+ta.y+1,ra,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[ja,na,ya])})};mxCellEditor.prototype.isContentEditing=function(){var y=this.graph.view.getState(this.editingCell);return null!=y&&1==y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=
-this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y="";window.getSelection?y=window.getSelection():document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var K=this.textarea.ownerDocument.defaultView.getSelection(),L=K.getRangeAt(0),S="\t";if(null!=y)for(S="";0<y;)S+=" ",y--;y=document.createElement("span");
-y.style.whiteSpace="pre";y.appendChild(document.createTextNode(S));L.insertNode(y);L.setStartAfter(y);L.setEndAfter(y);K.removeAllRanges();K.addRange(L)};mxCellEditor.prototype.alignText=function(y,K){var L=null!=K&&mxEvent.isShiftDown(K);if(L||null!=window.getSelection&&null!=window.getSelection().containsNode){var S=!0;this.graph.processElements(this.textarea,function(V){L||window.getSelection().containsNode(V,!0)?(V.removeAttribute("align"),V.style.textAlign=null):S=!1});S&&this.graph.cellEditor.setAlign(y)}document.execCommand("justify"+
-y.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=window.getSelection();if(y.getRangeAt&&y.rangeCount){for(var K=[],L=0,S=y.rangeCount;L<S;++L)K.push(y.getRangeAt(L));return K}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var K=0,L=y.length;K<
-L;++K)sel.addRange(y[K])}else document.selection&&y.select&&y.select()}catch(S){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));C.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,K){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=
-function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;mxCellEditor.prototype.startEditing=function(y,K){y=this.graph.getStartEditingCell(y,K);G.apply(this,arguments);var L=this.graph.view.getState(y);this.textarea.className=null!=L&&1==L.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y);
-L=this.graph.getModel().getParent(y);var S=this.graph.getCellGeometry(y);if(this.graph.getModel().isEdge(L)&&null!=S&&S.relative||this.graph.getModel().isEdge(y))this.textarea.style.outline=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var Z=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(y){function K(V,ja){ja.originalNode=V;V=V.firstChild;for(var na=ja.firstChild;null!=V&&null!=na;)K(V,na),V=V.nextSibling,na=na.nextSibling;
-return ja}function L(V,ja){if(null!=V)if(ja.originalNode!=V)S(V);else for(V=V.firstChild,ja=ja.firstChild;null!=V;){var na=V.nextSibling;null==ja?S(V):(L(V,ja),ja=ja.nextSibling);V=na}}function S(V){for(var ja=V.firstChild;null!=ja;){var na=ja.nextSibling;S(ja);ja=na}1==V.nodeType&&("BR"===V.nodeName||null!=V.firstChild)||3==V.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(V)).length?(3==V.nodeType&&mxUtils.setTextContent(V,mxUtils.getTextContent(V).replace(/\n|\r/g,"")),1==V.nodeType&&(V.removeAttribute("style"),
-V.removeAttribute("class"),V.removeAttribute("width"),V.removeAttribute("cellpadding"),V.removeAttribute("cellspacing"),V.removeAttribute("border"))):V.parentNode.removeChild(V)}Z.apply(this,arguments);7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(V){var ja=K(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||
-0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?L(this.textarea,ja):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);if(null!=y){var K=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),L=this.saveSelection();if(this.codeViewMode){ya=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<ya.length&&"\n"==ya.charAt(ya.length-1)&&(ya=ya.substring(0,ya.length-1));ya=this.graph.sanitizeHtml(K?
-ya.replace(/\n/g,"<br/>"):ya,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);K=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY);var S=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),V=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,ja=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,
-0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&na.push("underline");(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=
-Math.round(ra)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=V?"bold":"normal";this.textarea.style.fontStyle=ja?"italic":"";this.textarea.style.fontFamily=K;this.textarea.style.textAlign=S;this.textarea.style.padding="0px";this.textarea.innerHTML!=ya&&(this.textarea.innerHTML=ya,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&
-this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var ya=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(ya=mxUtils.replaceTrailingNewlines(ya,"<div><br></div>"));ya=this.graph.sanitizeHtml(K?ya.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):ya,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*
-mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ya&&(this.textarea.innerHTML=ya);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&
-this.restoreSelection(this.switchSelectionState);this.switchSelectionState=L;this.resize()}};var fa=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,K){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=y){var L=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*L;this.bounds.height=60*L;var S=null!=y.text?y.text.margin:null;null==S&&(S=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,
-mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=S.x*this.bounds.width;this.bounds.y+=S.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/L)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/L)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/L)+(this.textarea.offsetHeight-
-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*L);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/L)+(this.textarea.offsetWidth-this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*L);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+L+","+
-L+")")}else this.textarea.style.height="",this.textarea.style.overflow="",fa.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,K){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var L=this.graph.getEditingValue(y.cell,K);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(L=L.replace(/\n/g,"<br/>"));return L=this.graph.sanitizeHtml(L,!0)};mxCellEditorGetCurrentValue=
-mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var K=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);return K="1"==mxUtils.getValue(y.style,"nl2Br","1")?K.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):K.replace(/\r\n/g,"").replace(/\n/g,"")};var ba=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&
-this.toggleViewMode();ba.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};var Y=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,K){this.graph.getModel().beginUpdate();try{Y.apply(this,arguments),""==K&&this.graph.isCellDeletable(y.cell)&&0==this.graph.model.getChildCount(y.cell)&&this.graph.isTransparentState(y)&&this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};
-mxCellEditor.prototype.getBackgroundColor=function(y){var K=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(y.style,mxConstants.STYLE_FILLCOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getBorderColor=function(y){var K=mxUtils.getValue(y.style,
-mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(y.style,mxConstants.STYLE_STROKECOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getMinimumSize=function(y){var K=this.graph.getView().scale;return new mxRectangle(0,0,null==y.text?30:y.text.size*K+20,30)};mxGraphHandlerIsValidDropTarget=
-mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(y,K){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(K.getEvent)};mxGraphView.prototype.formatUnitText=function(y){return y?e(y,this.unit):y};mxGraphHandler.prototype.updateHint=function(y){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var K=this.graph.view.translate,L=this.graph.view.scale;
-y=this.roundLength((this.bounds.x+this.currentDx)/L-K.x);K=this.roundLength((this.bounds.y+this.currentDy)/L-K.y);L=this.graph.view.unit;this.hint.innerHTML=e(y,L)+", "+e(K,L);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=
-null)};var pa=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,K){pa.apply(this,arguments);var L=this.graph.getCellStyle(y);if(null==L.childLayout){var S=this.graph.model.getParent(y),V=null!=S?this.graph.getCellGeometry(S):null;if(null!=V&&(L=this.graph.getCellStyle(S),"stackLayout"==L.childLayout)){var ja=parseFloat(mxUtils.getValue(L,"stackBorder",mxStackLayout.prototype.border));L="1"==mxUtils.getValue(L,"horizontalStack","1");var na=this.graph.getActualStartSize(S);
-V=V.clone();L?V.height=K.height+na.y+na.height+2*ja:V.width=K.width+na.x+na.width+2*ja;this.graph.model.setGeometry(S,V)}}};var O=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(ya){L.get(ya)||(L.put(ya,!0),V.push(ya))}for(var K=O.apply(this,arguments),L=new mxDictionary,S=this.graph.model,V=[],ja=0;ja<K.length;ja++){var na=K[ja];this.graph.isTableCell(na)?y(S.getParent(S.getParent(na))):this.graph.isTableRow(na)&&
-y(S.getParent(na));y(na)}return V};var W=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var K=W.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};var ha=mxEdgeHandler.prototype.createParentHighlightShape;mxEdgeHandler.prototype.createParentHighlightShape=function(y){var K=ha.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=
-function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,K){return this.graph.isRecursiveVertexResize(y)&&!mxEvent.isAltDown(K.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(y,K){return mxEvent.isControlDown(K.getEvent())||mxEvent.isMetaDown(K.getEvent())};var U=mxVertexHandler.prototype.isRotationHandleVisible;
-mxVertexHandler.prototype.isRotationHandleVisible=function(){return U.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var ma=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=
-function(){return ma.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var T=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||T.apply(this,arguments)&&(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&
-(y=2);return y};var M=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var ia=null,N=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){null==ia&&(ia=mxCellRenderer.defaultShapes.tableLine);var y=N.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var K=function(Sa,Fa,Ja){for(var xa=[],Ba=0;Ba<Sa.length;Ba++){var Pa=
-Sa[Ba];xa.push(null==Pa?null:new mxPoint((ra+Pa.x+Fa)*ja,(ta+Pa.y+Ja)*ja))}return xa},L=this,S=this.graph,V=S.model,ja=S.view.scale,na=this.state,ya=this.selectionBorder,ra=this.state.origin.x+S.view.translate.x,ta=this.state.origin.y+S.view.translate.y;null==y&&(y=[]);var Da=S.view.getCellStates(V.getChildCells(this.state.cell,!0));if(0<Da.length){var Oa=V.getChildCells(Da[0].cell,!0),Ma=S.getTableLines(this.state.cell,!1,!0),Wa=S.getTableLines(this.state.cell,!0,!1);for(V=0;V<Da.length;V++)mxUtils.bind(this,
-function(Sa){var Fa=Da[Sa],Ja=Sa<Da.length-1?Da[Sa+1]:null;Ja=null!=Ja?S.getCellGeometry(Ja.cell):null;var xa=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Wa[Sa]?new ia(Wa[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!1);Ja.isDashed=ya.isDashed;Ja.svgStrokeTolerance++;Fa=new mxHandle(Fa,"row-resize",null,Ja);Fa.tableHandle=!0;var Ba=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=
-this.shape){this.shape.stroke=0==Ba?mxConstants.NONE:ya.stroke;if(this.shape.constructor==ia)this.shape.line=K(Wa[Sa],0,Ba),this.shape.updateBoundsFromLine();else{var Ka=S.getActualStartSize(na.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=this.state.y+this.state.height+Ba*ja;this.shape.bounds.x=na.x+(Sa==Da.length-1?0:Ka.x*ja);this.shape.bounds.width=na.width-(Sa==Da.length-1?0:Ka.width+Ka.x+ja)}this.shape.redraw()}};var Pa=!1;Fa.setPosition=function(Ka,Na,hb){Ba=Math.max(Graph.minTableRowHeight-
-Ka.height,Na.y-Ka.y-Ka.height);Pa=mxEvent.isShiftDown(hb.getEvent());null!=xa&&Pa&&(Ba=Math.min(Ba,xa.height-Graph.minTableRowHeight))};Fa.execute=function(Ka){if(0!=Ba)S.setTableRowHeight(this.state.cell,Ba,!Pa);else if(!L.blockDelayedSelection){var Na=S.getCellAt(Ka.getGraphX(),Ka.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(Na,Ka)}Ba=0};Fa.reset=function(){Ba=0};y.push(Fa)})(V);for(V=0;V<Oa.length;V++)mxUtils.bind(this,function(Sa){var Fa=S.view.getState(Oa[Sa]),Ja=S.getCellGeometry(Oa[Sa]),
-xa=null!=Ja.alternateBounds?Ja.alternateBounds:Ja;null==Fa&&(Fa=new mxCellState(S.view,Oa[Sa],S.getCellStyle(Oa[Sa])),Fa.x=na.x+Ja.x*ja,Fa.y=na.y+Ja.y*ja,Fa.width=xa.width*ja,Fa.height=xa.height*ja,Fa.updateCachedBounds());Ja=Sa<Oa.length-1?Oa[Sa+1]:null;Ja=null!=Ja?S.getCellGeometry(Ja):null;var Ba=null!=Ja&&null!=Ja.alternateBounds?Ja.alternateBounds:Ja;Ja=null!=Ma[Sa]?new ia(Ma[Sa],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);Ja.isDashed=ya.isDashed;Ja.svgStrokeTolerance++;
-Fa=new mxHandle(Fa,"col-resize",null,Ja);Fa.tableHandle=!0;var Pa=0;Fa.shape.node.parentNode.insertBefore(Fa.shape.node,Fa.shape.node.parentNode.firstChild);Fa.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:ya.stroke;if(this.shape.constructor==ia)this.shape.line=K(Ma[Sa],Pa,0),this.shape.updateBoundsFromLine();else{var Na=S.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(xa.width+Pa)*ja;this.shape.bounds.y=na.y+(Sa==Oa.length-
-1?0:Na.y*ja);this.shape.bounds.height=na.height-(Sa==Oa.length-1?0:(Na.height+Na.y)*ja)}this.shape.redraw()}};var Ka=!1;Fa.setPosition=function(Na,hb,Qa){Pa=Math.max(Graph.minTableColumnWidth-xa.width,hb.x-Na.x-xa.width);Ka=mxEvent.isShiftDown(Qa.getEvent());null==Ba||Ka||(Pa=Math.min(Pa,Ba.width-Graph.minTableColumnWidth))};Fa.execute=function(Na){if(0!=Pa)S.setTableColumnWidth(this.state.cell,Pa,Ka);else if(!L.blockDelayedSelection){var hb=S.getCellAt(Na.getGraphX(),Na.getGraphY())||na.cell;S.graphHandler.selectCellForEvent(hb,
-Na)}Pa=0};Fa.positionChanged=function(){};Fa.reset=function(){Pa=0};y.push(Fa)})(V)}}return null!=y?y.reverse():null};var P=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(y){P.apply(this,arguments);if(null!=this.moveHandles)for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].style.visibility=y?"":"hidden";if(null!=this.cornerHandles)for(K=0;K<this.cornerHandles.length;K++)this.cornerHandles[K].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=
-function(){var y=this.graph.model;if(null!=this.moveHandles){for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].parentNode.removeChild(this.moveHandles[K]);this.moveHandles=null}this.moveHandles=[];for(K=0;K<y.getChildCount(this.state.cell);K++)mxUtils.bind(this,function(L){if(null!=L&&y.isVertex(L.cell)){var S=mxUtils.createImage(Editor.rowMoveImage);S.style.position="absolute";S.style.cursor="pointer";S.style.width="7px";S.style.height="4px";S.style.padding="4px 2px 4px 2px";S.rowState=
-L;mxEvent.addGestureListeners(S,mxUtils.bind(this,function(V){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(V)&&this.graph.isCellSelected(L.cell)||this.graph.selectCellForEvent(L.cell,V);mxEvent.isPopupTrigger(V)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(V),mxEvent.getClientY(V),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(V),this.graph.isMouseDown=!0);
-mxEvent.consume(V)}),null,mxUtils.bind(this,function(V){mxEvent.isPopupTrigger(V)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(V),mxEvent.getClientY(V),L.cell,V),mxEvent.consume(V))}));this.moveHandles.push(S);this.graph.container.appendChild(S)}})(this.graph.view.getState(y.getChildAt(this.state.cell,K)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var y=0;y<this.customHandles.length;y++)this.customHandles[y].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&
-this.refreshMoveHandles()};var aa=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,0),K=this.tolerance,L=this.state.style.shape;null==mxCellRenderer.defaultShapes[L]&&mxStencilRegistry.getStencil(L);L=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!L&&null!=this.customHandles)for(var S=0;S<this.customHandles.length;S++)if(null!=this.customHandles[S].shape&&null!=this.customHandles[S].shape.bounds){var V=
-this.customHandles[S].shape.bounds,ja=V.getCenterX(),na=V.getCenterY();if(Math.abs(this.state.x-ja)<V.width/2||Math.abs(this.state.y-na)<V.height/2||Math.abs(this.state.x+this.state.width-ja)<V.width/2||Math.abs(this.state.y+this.state.height-na)<V.height/2){L=!0;break}}L&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(K/=2,this.graph.isTable(this.state.cell)&&(K+=7),y.x=this.sizers[0].bounds.width+K,y.y=this.sizers[0].bounds.height+K):y=aa.apply(this,arguments);return y};mxVertexHandler.prototype.updateHint=
-function(y){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";else{y=this.state.view.scale;var K=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/y),K)+" x "+e(this.roundLength(this.bounds.height/y),K)}y=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||
-"0");null==y&&(y=this.bounds);this.hint.style.left=y.x+Math.round((y.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=y.y+y.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var la=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,K){la.apply(this,arguments);null!=
-this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var u=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=function(y,K){u.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(y,K){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var L=
-this.graph.view.translate,S=this.graph.view.scale,V=this.roundLength(K.x/S-L.x);L=this.roundLength(K.y/S-L.y);S=this.graph.view.unit;this.hint.innerHTML=e(V,S)+", "+e(L,S);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(V=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*V.x)+"%, "+Math.round(100*V.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility=
-"hidden");this.hint.style.left=Math.round(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.getGraphY(),K.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');
-Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=
-Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');
-HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+
-HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.rotationHandle=Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
+Graph.prototype.getPagePadding=function(){return new mxPoint(0,0)};Graph.prototype.loadStylesheet=function(){var y=null!=this.themes?this.themes[this.defaultThemeName]:mxStyleRegistry.dynamicLoading?mxUtils.load(STYLE_PATH+"/default.xml").getDocumentElement():null;null!=y&&(new mxCodec(y.ownerDocument)).decode(y,this.getStylesheet())};Graph.prototype.createCellLookup=function(y,K){K=null!=K?K:{};for(var N=0;N<y.length;N++){var T=y[N];K[mxObjectIdentity.get(T)]=T.getId();for(var U=this.model.getChildCount(T),
+W=0;W<U;W++)this.createCellLookup([this.model.getChildAt(T,W)],K)}return K};Graph.prototype.createCellMapping=function(y,K,N){N=null!=N?N:{};for(var T in y){var U=K[T];null==N[U]&&(N[U]=y[T].getId()||"")}return N};Graph.prototype.importGraphModel=function(y,K,N,T){K=null!=K?K:0;N=null!=N?N:0;var U=new mxCodec(y.ownerDocument),W=new mxGraphModel;U.decode(y,W);y=[];U={};var na={},wa=W.getChildren(this.cloneCell(W.root,this.isCloneInvalidEdges(),U));if(null!=wa){var ra=this.createCellLookup([W.root]);
+wa=wa.slice();this.model.beginUpdate();try{if(1!=wa.length||this.isCellLocked(this.getDefaultParent()))for(W=0;W<wa.length;W++)xa=this.model.getChildren(this.moveCells([wa[W]],K,N,!1,this.model.getRoot())[0]),null!=xa&&(y=y.concat(xa));else{var xa=W.getChildren(wa[0]);null!=xa&&(y=this.moveCells(xa,K,N,!1,this.getDefaultParent()),na[W.getChildAt(W.root,0).getId()]=this.getDefaultParent().getId())}if(null!=y&&(this.createCellMapping(U,ra,na),this.updateCustomLinks(na,y),T)){this.isGridEnabled()&&(K=
+this.snap(K),N=this.snap(N));var Ea=this.getBoundingBoxFromGeometry(y,!0);null!=Ea&&this.moveCells(y,K-Ea.x,N-Ea.y)}}finally{this.model.endUpdate()}}return y};Graph.prototype.encodeCells=function(y){for(var K={},N=this.cloneCells(y,null,K),T=new mxDictionary,U=0;U<y.length;U++)T.put(y[U],!0);var W=new mxCodec,na=new mxGraphModel,wa=na.getChildAt(na.getRoot(),0);for(U=0;U<N.length;U++){na.add(wa,N[U]);var ra=this.view.getState(y[U]);if(null!=ra){var xa=this.getCellGeometry(N[U]);null!=xa&&xa.relative&&
+!this.model.isEdge(y[U])&&null==T.get(this.model.getParent(y[U]))&&(xa.offset=null,xa.relative=!1,xa.x=ra.x/ra.view.scale-ra.view.translate.x,xa.y=ra.y/ra.view.scale-ra.view.translate.y)}}this.updateCustomLinks(this.createCellMapping(K,this.createCellLookup(y)),N);return W.encode(na)};Graph.prototype.isSwimlane=function(y,K){var N=null;null==y||this.model.isEdge(y)||this.model.getParent(y)==this.model.getRoot()||(N=this.getCurrentCellStyle(y,K)[mxConstants.STYLE_SHAPE]);return N==mxConstants.SHAPE_SWIMLANE||
+"table"==N||"tableRow"==N};var d=Graph.prototype.isExtendParent;Graph.prototype.isExtendParent=function(y){var K=this.model.getParent(y);if(null!=K){var N=this.getCurrentCellStyle(K);if(null!=N.expand)return"0"!=N.expand}return d.apply(this,arguments)&&(null==K||!this.isTable(K))};var f=Graph.prototype.splitEdge;Graph.prototype.splitEdge=function(y,K,N,T,U,W,na,wa){null==wa&&(wa=this.model.getParent(y),this.isTable(wa)||this.isTableRow(wa))&&(wa=this.getCellAt(W,na,null,!0,!1));N=null;this.model.beginUpdate();
+try{N=f.apply(this,[y,K,N,T,U,W,na,wa]);this.model.setValue(N,"");var ra=this.getChildCells(N,!0);for(K=0;K<ra.length;K++){var xa=this.getCellGeometry(ra[K]);null!=xa&&xa.relative&&0<xa.x&&this.model.remove(ra[K])}var Ea=this.getChildCells(y,!0);for(K=0;K<Ea.length;K++)xa=this.getCellGeometry(Ea[K]),null!=xa&&xa.relative&&0>=xa.x&&this.model.remove(Ea[K]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,null,[N]);this.setCellStyles(mxConstants.STYLE_ENDARROW,mxConstants.NONE,[N]);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+null,[y]);this.setCellStyles(mxConstants.STYLE_STARTARROW,mxConstants.NONE,[y]);var Na=this.model.getTerminal(N,!1);if(null!=Na){var Ma=this.getCurrentCellStyle(Na);null!=Ma&&"1"==Ma.snapToPoint&&(this.setCellStyles(mxConstants.STYLE_EXIT_X,null,[y]),this.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[y]),this.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[N]),this.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[N]))}}finally{this.model.endUpdate()}return N};var g=Graph.prototype.selectCell;Graph.prototype.selectCell=
+function(y,K,N){if(K||N)g.apply(this,arguments);else{var T=this.getSelectionCell(),U=null,W=[],na=mxUtils.bind(this,function(wa){if(null!=this.view.getState(wa)&&(this.model.isVertex(wa)||this.model.isEdge(wa)))if(W.push(wa),wa==T)U=W.length-1;else if(y&&null==T&&0<W.length||null!=U&&y&&W.length>U||!y&&0<U)return;for(var ra=0;ra<this.model.getChildCount(wa);ra++)na(this.model.getChildAt(wa,ra))});na(this.model.root);0<W.length&&(U=null!=U?mxUtils.mod(U+(y?1:-1),W.length):0,this.setSelectionCell(W[U]))}};
+Graph.prototype.swapShapes=function(y,K,N,T,U,W,na){K=!1;if(!T&&null!=U&&1==y.length&&(T=this.view.getState(U),N=this.view.getState(y[0]),null!=T&&null!=N&&(null!=W&&mxEvent.isShiftDown(W)||"umlLifeline"==T.style.shape&&"umlLifeline"==N.style.shape)&&(T=this.getCellGeometry(U),W=this.getCellGeometry(y[0]),null!=T&&null!=W))){K=T.clone();T=W.clone();T.x=K.x;T.y=K.y;K.x=W.x;K.y=W.y;this.model.beginUpdate();try{this.model.setGeometry(U,K),this.model.setGeometry(y[0],T)}finally{this.model.endUpdate()}K=
+!0}return K};var l=Graph.prototype.moveCells;Graph.prototype.moveCells=function(y,K,N,T,U,W,na){if(this.swapShapes(y,K,N,T,U,W,na))return y;na=null!=na?na:{};if(this.isTable(U)){for(var wa=[],ra=0;ra<y.length;ra++)this.isTable(y[ra])?wa=wa.concat(this.model.getChildCells(y[ra],!0).reverse()):wa.push(y[ra]);y=wa}this.model.beginUpdate();try{wa=[];for(ra=0;ra<y.length;ra++)if(null!=U&&this.isTableRow(y[ra])){var xa=this.model.getParent(y[ra]),Ea=this.getCellGeometry(y[ra]);this.isTable(xa)&&wa.push(xa);
+if(null!=xa&&null!=Ea&&this.isTable(xa)&&this.isTable(U)&&(T||xa!=U)){if(!T){var Na=this.getCellGeometry(xa);null!=Na&&(Na=Na.clone(),Na.height-=Ea.height,this.model.setGeometry(xa,Na))}Na=this.getCellGeometry(U);null!=Na&&(Na=Na.clone(),Na.height+=Ea.height,this.model.setGeometry(U,Na));var Ma=this.model.getChildCells(U,!0);if(0<Ma.length){y[ra]=T?this.cloneCell(y[ra]):y[ra];var za=this.model.getChildCells(y[ra],!0),Ba=this.model.getChildCells(Ma[0],!0),Ca=Ba.length-za.length;if(0<Ca)for(var ya=
+0;ya<Ca;ya++){var Ga=this.cloneCell(za[za.length-1]);null!=Ga&&(Ga.value="",this.model.add(y[ra],Ga))}else if(0>Ca)for(ya=0;ya>Ca;ya--)this.model.remove(za[za.length+ya-1]);za=this.model.getChildCells(y[ra],!0);for(ya=0;ya<Ba.length;ya++){var Za=this.getCellGeometry(Ba[ya]),Pa=this.getCellGeometry(za[ya]);null!=Za&&null!=Pa&&(Pa=Pa.clone(),Pa.width=Za.width,this.model.setGeometry(za[ya],Pa))}}}}var fb=l.apply(this,arguments);for(ra=0;ra<wa.length;ra++)!T&&this.model.contains(wa[ra])&&0==this.model.getChildCount(wa[ra])&&
+this.model.remove(wa[ra]);T&&this.updateCustomLinks(this.createCellMapping(na,this.createCellLookup(y)),fb)}finally{this.model.endUpdate()}return fb};var q=Graph.prototype.removeCells;Graph.prototype.removeCells=function(y,K){var N=[];this.model.beginUpdate();try{for(var T=0;T<y.length;T++)if(this.isTableCell(y[T])){var U=this.model.getParent(y[T]),W=this.model.getParent(U);1==this.model.getChildCount(U)&&1==this.model.getChildCount(W)?0>mxUtils.indexOf(y,W)&&0>mxUtils.indexOf(N,W)&&N.push(W):this.labelChanged(y[T],
+"")}else{if(this.isTableRow(y[T])&&(W=this.model.getParent(y[T]),0>mxUtils.indexOf(y,W)&&0>mxUtils.indexOf(N,W))){for(var na=this.model.getChildCells(W,!0),wa=0,ra=0;ra<na.length;ra++)0<=mxUtils.indexOf(y,na[ra])&&wa++;wa==na.length&&N.push(W)}N.push(y[T])}N=q.apply(this,[N,K])}finally{this.model.endUpdate()}return N};Graph.prototype.updateCustomLinks=function(y,K,N){N=null!=N?N:new Graph;for(var T=0;T<K.length;T++)null!=K[T]&&N.updateCustomLinksForCell(y,K[T],N)};Graph.prototype.updateCustomLinksForCell=
+function(y,K){this.doUpdateCustomLinksForCell(y,K);for(var N=this.model.getChildCount(K),T=0;T<N;T++)this.updateCustomLinksForCell(y,this.model.getChildAt(K,T))};Graph.prototype.doUpdateCustomLinksForCell=function(y,K){};Graph.prototype.getAllConnectionConstraints=function(y,K){if(null!=y){K=mxUtils.getValue(y.style,"points",null);if(null!=K){y=[];try{var N=JSON.parse(K);for(K=0;K<N.length;K++){var T=N[K];y.push(new mxConnectionConstraint(new mxPoint(T[0],T[1]),2<T.length?"0"!=T[2]:!0,null,3<T.length?
+T[3]:0,4<T.length?T[4]:0))}}catch(W){}return y}if(null!=y.shape&&null!=y.shape.bounds){T=y.shape.direction;K=y.shape.bounds;var U=y.shape.scale;N=K.width/U;K=K.height/U;if(T==mxConstants.DIRECTION_NORTH||T==mxConstants.DIRECTION_SOUTH)T=N,N=K,K=T;K=y.shape.getConstraints(y.style,N,K);if(null!=K)return K;if(null!=y.shape.stencil&&null!=y.shape.stencil.constraints)return y.shape.stencil.constraints;if(null!=y.shape.constraints)return y.shape.constraints}}return null};Graph.prototype.flipEdge=function(y){if(null!=
+y){var K=this.getCurrentCellStyle(y);K=mxUtils.getValue(K,mxConstants.STYLE_ELBOW,mxConstants.ELBOW_HORIZONTAL)==mxConstants.ELBOW_HORIZONTAL?mxConstants.ELBOW_VERTICAL:mxConstants.ELBOW_HORIZONTAL;this.setCellStyles(mxConstants.STYLE_ELBOW,K,[y])}};Graph.prototype.isValidRoot=function(y){for(var K=this.model.getChildCount(y),N=0,T=0;T<K;T++){var U=this.model.getChildAt(y,T);this.model.isVertex(U)&&(U=this.getCellGeometry(U),null==U||U.relative||N++)}return 0<N||this.isContainer(y)};Graph.prototype.isValidDropTarget=
+function(y,K,N){for(var T=this.getCurrentCellStyle(y),U=!0,W=!0,na=0;na<K.length&&W;na++)U=U&&this.isTable(K[na]),W=W&&this.isTableRow(K[na]);return(1==K.length&&null!=N&&mxEvent.isShiftDown(N)&&!mxEvent.isControlDown(N)&&!mxEvent.isAltDown(N)||("1"!=mxUtils.getValue(T,"part","0")||this.isContainer(y))&&"0"!=mxUtils.getValue(T,"dropTarget","1")&&(mxGraph.prototype.isValidDropTarget.apply(this,arguments)||this.isContainer(y))&&!this.isTableRow(y)&&(!this.isTable(y)||W||U))&&!this.isCellLocked(y)};
+Graph.prototype.createGroupCell=function(){var y=mxGraph.prototype.createGroupCell.apply(this,arguments);y.setStyle("group");return y};Graph.prototype.isExtendParentsOnAdd=function(y){var K=mxGraph.prototype.isExtendParentsOnAdd.apply(this,arguments);if(K&&null!=y&&null!=this.layoutManager){var N=this.model.getParent(y);null!=N&&(N=this.layoutManager.getLayout(N),null!=N&&N.constructor==mxStackLayout&&(K=!1))}return K};Graph.prototype.getPreferredSizeForCell=function(y){var K=mxGraph.prototype.getPreferredSizeForCell.apply(this,
+arguments);null!=K&&(K.width+=10,K.height+=4,this.gridEnabled&&(K.width=this.snap(K.width),K.height=this.snap(K.height)));return K};Graph.prototype.turnShapes=function(y,K){var N=this.getModel(),T=[];N.beginUpdate();try{for(var U=0;U<y.length;U++){var W=y[U];if(N.isEdge(W)){var na=N.getTerminal(W,!0),wa=N.getTerminal(W,!1);N.setTerminal(W,wa,!0);N.setTerminal(W,na,!1);var ra=N.getGeometry(W);if(null!=ra){ra=ra.clone();null!=ra.points&&ra.points.reverse();var xa=ra.getTerminalPoint(!0),Ea=ra.getTerminalPoint(!1);
+ra.setTerminalPoint(xa,!1);ra.setTerminalPoint(Ea,!0);N.setGeometry(W,ra);var Na=this.view.getState(W),Ma=this.view.getState(na),za=this.view.getState(wa);if(null!=Na){var Ba=null!=Ma?this.getConnectionConstraint(Na,Ma,!0):null,Ca=null!=za?this.getConnectionConstraint(Na,za,!1):null;this.setConnectionConstraint(W,na,!0,Ca);this.setConnectionConstraint(W,wa,!1,Ba);var ya=mxUtils.getValue(Na.style,mxConstants.STYLE_SOURCE_PERIMETER_SPACING);this.setCellStyles(mxConstants.STYLE_SOURCE_PERIMETER_SPACING,
+mxUtils.getValue(Na.style,mxConstants.STYLE_TARGET_PERIMETER_SPACING),[W]);this.setCellStyles(mxConstants.STYLE_TARGET_PERIMETER_SPACING,ya,[W])}T.push(W)}}else if(N.isVertex(W)&&(ra=this.getCellGeometry(W),null!=ra)){if(!(this.isTable(W)||this.isTableRow(W)||this.isTableCell(W)||this.isSwimlane(W))){ra=ra.clone();ra.x+=ra.width/2-ra.height/2;ra.y+=ra.height/2-ra.width/2;var Ga=ra.width;ra.width=ra.height;ra.height=Ga;N.setGeometry(W,ra)}var Za=this.view.getState(W);if(null!=Za){var Pa=[mxConstants.DIRECTION_EAST,
+mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST,mxConstants.DIRECTION_NORTH],fb=mxUtils.getValue(Za.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);this.setCellStyles(mxConstants.STYLE_DIRECTION,Pa[mxUtils.mod(mxUtils.indexOf(Pa,fb)+(K?-1:1),Pa.length)],[W])}T.push(W)}}}finally{N.endUpdate()}return T};Graph.prototype.stencilHasPlaceholders=function(y){if(null!=y&&null!=y.fgNode)for(y=y.fgNode.firstChild;null!=y;){if("text"==y.nodeName&&"1"==y.getAttribute("placeholders"))return!0;
+y=y.nextSibling}return!1};var z=Graph.prototype.processChange;Graph.prototype.processChange=function(y){if(y instanceof mxGeometryChange&&(this.isTableCell(y.cell)||this.isTableRow(y.cell))&&(null==y.previous&&null!=y.geometry||null!=y.previous&&!y.previous.equals(y.geometry))){var K=y.cell;this.isTableCell(K)&&(K=this.model.getParent(K));this.isTableRow(K)&&(K=this.model.getParent(K));var N=this.view.getState(K);null!=N&&null!=N.shape&&(this.view.invalidate(K),N.shape.bounds=null)}z.apply(this,arguments);
+y instanceof mxValueChange&&null!=y.cell&&null!=y.cell.value&&"object"==typeof y.cell.value&&this.invalidateDescendantsWithPlaceholders(y.cell)};Graph.prototype.invalidateDescendantsWithPlaceholders=function(y){y=this.model.getDescendants(y);if(0<y.length)for(var K=0;K<y.length;K++){var N=this.view.getState(y[K]);null!=N&&null!=N.shape&&null!=N.shape.stencil&&this.stencilHasPlaceholders(N.shape.stencil)?this.removeStateForCell(y[K]):this.isReplacePlaceholders(y[K])&&this.view.invalidate(y[K],!1,!1)}};
+Graph.prototype.replaceElement=function(y,K){K=y.ownerDocument.createElement(null!=K?K:"span");for(var N=Array.prototype.slice.call(y.attributes);attr=N.pop();)K.setAttribute(attr.nodeName,attr.nodeValue);K.innerHTML=y.innerHTML;y.parentNode.replaceChild(K,y)};Graph.prototype.processElements=function(y,K){if(null!=y){y=y.getElementsByTagName("*");for(var N=0;N<y.length;N++)K(y[N])}};Graph.prototype.updateLabelElements=function(y,K,N){y=null!=y?y:this.getSelectionCells();for(var T=document.createElement("div"),
+U=0;U<y.length;U++)if(this.isHtmlLabel(y[U])){var W=this.convertValueToString(y[U]);if(null!=W&&0<W.length){T.innerHTML=W;for(var na=T.getElementsByTagName(null!=N?N:"*"),wa=0;wa<na.length;wa++)K(na[wa]);T.innerHTML!=W&&this.cellLabelChanged(y[U],T.innerHTML)}}};Graph.prototype.cellLabelChanged=function(y,K,N){K=Graph.zapGremlins(K);this.model.beginUpdate();try{if(null!=y.value&&"object"==typeof y.value){if(this.isReplacePlaceholders(y)&&null!=y.getAttribute("placeholder"))for(var T=y.getAttribute("placeholder"),
+U=y;null!=U;){if(U==this.model.getRoot()||null!=U.value&&"object"==typeof U.value&&U.hasAttribute(T)){this.setAttributeForCell(U,T,K);break}U=this.model.getParent(U)}var W=y.value.cloneNode(!0);Graph.translateDiagram&&null!=Graph.diagramLanguage&&W.hasAttribute("label_"+Graph.diagramLanguage)?W.setAttribute("label_"+Graph.diagramLanguage,K):W.setAttribute("label",K);K=W}mxGraph.prototype.cellLabelChanged.apply(this,arguments)}finally{this.model.endUpdate()}};Graph.prototype.cellsRemoved=function(y){if(null!=
+y){for(var K=new mxDictionary,N=0;N<y.length;N++)K.put(y[N],!0);var T=[];for(N=0;N<y.length;N++){var U=this.model.getParent(y[N]);null==U||K.get(U)||(K.put(U,!0),T.push(U))}for(N=0;N<T.length;N++)if(U=this.view.getState(T[N]),null!=U&&(this.model.isEdge(U.cell)||this.model.isVertex(U.cell))&&this.isCellDeletable(U.cell)&&this.isTransparentState(U)){for(var W=!0,na=0;na<this.model.getChildCount(U.cell)&&W;na++)K.get(this.model.getChildAt(U.cell,na))||(W=!1);W&&y.push(U.cell)}}mxGraph.prototype.cellsRemoved.apply(this,
+arguments)};Graph.prototype.removeCellsAfterUngroup=function(y){for(var K=[],N=0;N<y.length;N++)this.isCellDeletable(y[N])&&this.isTransparentState(this.view.getState(y[N]))&&K.push(y[N]);y=K;mxGraph.prototype.removeCellsAfterUngroup.apply(this,arguments)};Graph.prototype.setLinkForCell=function(y,K){this.setAttributeForCell(y,"link",K)};Graph.prototype.setTooltipForCell=function(y,K){var N="tooltip";Graph.translateDiagram&&null!=Graph.diagramLanguage&&mxUtils.isNode(y.value)&&y.value.hasAttribute("tooltip_"+
+Graph.diagramLanguage)&&(N="tooltip_"+Graph.diagramLanguage);this.setAttributeForCell(y,N,K)};Graph.prototype.getAttributeForCell=function(y,K,N){y=null!=y.value&&"object"===typeof y.value?y.value.getAttribute(K):null;return null!=y?y:N};Graph.prototype.setAttributeForCell=function(y,K,N){if(null!=y.value&&"object"==typeof y.value)var T=y.value.cloneNode(!0);else T=mxUtils.createXmlDocument().createElement("UserObject"),T.setAttribute("label",y.value||"");null!=N?T.setAttribute(K,N):T.removeAttribute(K);
+this.model.setValue(y,T)};var F=Graph.prototype.getDropTarget;Graph.prototype.getDropTarget=function(y,K,N,T){this.getModel();if(mxEvent.isAltDown(K))return null;for(var U=0;U<y.length;U++){var W=this.model.getParent(y[U]);if(this.model.isEdge(W)&&0>mxUtils.indexOf(y,W))return null}W=F.apply(this,arguments);var na=!0;for(U=0;U<y.length&&na;U++)na=na&&this.isTableRow(y[U]);na&&(this.isTableCell(W)&&(W=this.model.getParent(W)),this.isTableRow(W)&&(W=this.model.getParent(W)),this.isTable(W)||(W=null));
+return W};Graph.prototype.click=function(y){mxGraph.prototype.click.call(this,y);this.firstClickState=y.getState();this.firstClickSource=y.getSource()};Graph.prototype.dblClick=function(y,K){this.isEnabled()&&(K=this.insertTextForEvent(y,K),mxGraph.prototype.dblClick.call(this,y,K))};Graph.prototype.insertTextForEvent=function(y,K){var N=mxUtils.convertPoint(this.container,mxEvent.getClientX(y),mxEvent.getClientY(y));if(null!=y&&!this.model.isVertex(K)){var T=this.model.isEdge(K)?this.view.getState(K):
+null,U=mxEvent.getSource(y);this.firstClickState!=T||this.firstClickSource!=U||null!=T&&null!=T.text&&null!=T.text.node&&null!=T.text.boundingBox&&(mxUtils.contains(T.text.boundingBox,N.x,N.y)||mxUtils.isAncestorNode(T.text.node,mxEvent.getSource(y)))||(null!=T||this.isCellLocked(this.getDefaultParent()))&&(null==T||this.isCellLocked(T.cell))||!(null!=T||mxClient.IS_SVG&&U==this.view.getCanvas().ownerSVGElement)||(null==T&&(T=this.view.getState(this.getCellAt(N.x,N.y))),K=this.addText(N.x,N.y,T))}return K};
+Graph.prototype.getInsertPoint=function(){var y=this.getGridSize(),K=this.container.scrollLeft/this.view.scale-this.view.translate.x,N=this.container.scrollTop/this.view.scale-this.view.translate.y;if(this.pageVisible){var T=this.getPageLayout(),U=this.getPageSize();K=Math.max(K,T.x*U.width);N=Math.max(N,T.y*U.height)}return new mxPoint(this.snap(K+y),this.snap(N+y))};Graph.prototype.getFreeInsertPoint=function(){var y=this.view,K=this.getGraphBounds(),N=this.getInsertPoint(),T=this.snap(Math.round(Math.max(N.x,
+K.x/y.scale-y.translate.x+(0==K.width?2*this.gridSize:0))));y=this.snap(Math.round(Math.max(N.y,(K.y+K.height)/y.scale-y.translate.y+2*this.gridSize)));return new mxPoint(T,y)};Graph.prototype.getCenterInsertPoint=function(y){y=null!=y?y:new mxRectangle;return mxUtils.hasScrollbars(this.container)?new mxPoint(this.snap(Math.round((this.container.scrollLeft+this.container.clientWidth/2)/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round((this.container.scrollTop+this.container.clientHeight/
+2)/this.view.scale-this.view.translate.y-y.height/2))):new mxPoint(this.snap(Math.round(this.container.clientWidth/2/this.view.scale-this.view.translate.x-y.width/2)),this.snap(Math.round(this.container.clientHeight/2/this.view.scale-this.view.translate.y-y.height/2)))};Graph.prototype.isMouseInsertPoint=function(){return!1};Graph.prototype.addText=function(y,K,N){var T=new mxCell;T.value="Text";T.geometry=new mxGeometry(0,0,0,0);T.vertex=!0;if(null!=N&&this.model.isEdge(N.cell)){T.style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];";
+T.geometry.relative=!0;T.connectable=!1;var U=this.view.getRelativePoint(N,y,K);T.geometry.x=Math.round(1E4*U.x)/1E4;T.geometry.y=Math.round(U.y);T.geometry.offset=new mxPoint(0,0);U=this.view.getPoint(N,T.geometry);var W=this.view.scale;T.geometry.offset=new mxPoint(Math.round((y-U.x)/W),Math.round((K-U.y)/W))}else U=this.view.translate,T.style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];",T.geometry.width=40,T.geometry.height=20,T.geometry.x=Math.round(y/this.view.scale)-
+U.x-(null!=N?N.origin.x:0),T.geometry.y=Math.round(K/this.view.scale)-U.y-(null!=N?N.origin.y:0),T.style+="autosize=1;";this.getModel().beginUpdate();try{this.addCells([T],null!=N?N.cell:null),this.fireEvent(new mxEventObject("textInserted","cells",[T])),this.autoSizeCell(T)}finally{this.getModel().endUpdate()}return T};Graph.prototype.addClickHandler=function(y,K,N){var T=mxUtils.bind(this,function(){var ra=this.container.getElementsByTagName("a");if(null!=ra)for(var xa=0;xa<ra.length;xa++){var Ea=
+this.getAbsoluteUrl(ra[xa].getAttribute("href"));null!=Ea&&(ra[xa].setAttribute("rel",this.linkRelation),ra[xa].setAttribute("href",Ea),null!=K&&mxEvent.addGestureListeners(ra[xa],null,null,K))}});this.model.addListener(mxEvent.CHANGE,T);T();var U=this.container.style.cursor,W=this.getTolerance(),na=this,wa={currentState:null,currentLink:null,currentTarget:null,highlight:null!=y&&""!=y&&y!=mxConstants.NONE?new mxCellHighlight(na,y,4):null,startX:0,startY:0,scrollLeft:0,scrollTop:0,updateCurrentState:function(ra){var xa=
+ra.sourceState;if(null==xa||null==na.getLinkForCell(xa.cell))ra=na.getCellAt(ra.getGraphX(),ra.getGraphY(),null,null,null,function(Ea,Na,Ma){return null==na.getLinkForCell(Ea.cell)}),xa=null==xa||na.model.isAncestor(ra,xa.cell)?na.view.getState(ra):null;xa!=this.currentState&&(null!=this.currentState&&this.clear(),this.currentState=xa,null!=this.currentState&&this.activate(this.currentState))},mouseDown:function(ra,xa){this.startX=xa.getGraphX();this.startY=xa.getGraphY();this.scrollLeft=na.container.scrollLeft;
+this.scrollTop=na.container.scrollTop;null==this.currentLink&&"auto"==na.container.style.overflow&&(na.container.style.cursor="move");this.updateCurrentState(xa)},mouseMove:function(ra,xa){if(na.isMouseDown)null!=this.currentLink&&(ra=Math.abs(this.startX-xa.getGraphX()),xa=Math.abs(this.startY-xa.getGraphY()),(ra>W||xa>W)&&this.clear());else{for(ra=xa.getSource();null!=ra&&"a"!=ra.nodeName.toLowerCase();)ra=ra.parentNode;null!=ra?this.clear():(null!=na.tooltipHandler&&null!=this.currentLink&&null!=
+this.currentState&&na.tooltipHandler.reset(xa,!0,this.currentState),(null==this.currentState||xa.getState()!=this.currentState&&null!=xa.sourceState||!na.intersects(this.currentState,xa.getGraphX(),xa.getGraphY()))&&this.updateCurrentState(xa))}},mouseUp:function(ra,xa){var Ea=xa.getSource();for(ra=xa.getEvent();null!=Ea&&"a"!=Ea.nodeName.toLowerCase();)Ea=Ea.parentNode;null==Ea&&Math.abs(this.scrollLeft-na.container.scrollLeft)<W&&Math.abs(this.scrollTop-na.container.scrollTop)<W&&(null==xa.sourceState||
+!xa.isSource(xa.sourceState.control))&&((mxEvent.isLeftMouseButton(ra)||mxEvent.isMiddleMouseButton(ra))&&!mxEvent.isPopupTrigger(ra)||mxEvent.isTouchEvent(ra))&&(null!=this.currentLink?(Ea=na.isBlankLink(this.currentLink),"data:"!==this.currentLink.substring(0,5)&&Ea||null==K||K(ra,this.currentLink),mxEvent.isConsumed(ra)||(ra=null!=this.currentTarget?this.currentTarget:mxEvent.isMiddleMouseButton(ra)?"_blank":Ea?na.linkTarget:"_top",na.openLink(this.currentLink,ra),xa.consume())):null!=N&&!xa.isConsumed()&&
+Math.abs(this.scrollLeft-na.container.scrollLeft)<W&&Math.abs(this.scrollTop-na.container.scrollTop)<W&&Math.abs(this.startX-xa.getGraphX())<W&&Math.abs(this.startY-xa.getGraphY())<W&&N(xa.getEvent()));this.clear()},activate:function(ra){this.currentLink=na.getAbsoluteUrl(na.getLinkForCell(ra.cell));null!=this.currentLink&&(this.currentTarget=na.getLinkTargetForCell(ra.cell),na.container.style.cursor="pointer",null!=this.highlight&&this.highlight.highlight(ra))},clear:function(){null!=na.container&&
+(na.container.style.cursor=U);this.currentLink=this.currentState=this.currentTarget=null;null!=this.highlight&&this.highlight.hide();null!=na.tooltipHandler&&na.tooltipHandler.hide()}};na.click=function(ra){};na.addMouseListener(wa);mxEvent.addListener(document,"mouseleave",function(ra){wa.clear()})};Graph.prototype.duplicateCells=function(y,K){y=null!=y?y:this.getSelectionCells();K=null!=K?K:!0;for(var N=0;N<y.length;N++)this.isTableCell(y[N])&&(y[N]=this.model.getParent(y[N]));y=this.model.getTopmostCells(y);
+var T=this.getModel(),U=this.gridSize,W=[];T.beginUpdate();try{var na={},wa=this.createCellLookup(y),ra=this.cloneCells(y,!1,na,!0);for(N=0;N<y.length;N++){var xa=T.getParent(y[N]);if(null!=xa){var Ea=this.moveCells([ra[N]],U,U,!1)[0];W.push(Ea);if(K)T.add(xa,ra[N]);else{var Na=xa.getIndex(y[N]);T.add(xa,ra[N],Na+1)}if(this.isTable(xa)){var Ma=this.getCellGeometry(ra[N]),za=this.getCellGeometry(xa);null!=Ma&&null!=za&&(za=za.clone(),za.height+=Ma.height,T.setGeometry(xa,za))}}else W.push(ra[N])}this.updateCustomLinks(this.createCellMapping(na,
+wa),ra,this);this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",ra))}finally{T.endUpdate()}return W};Graph.prototype.insertImage=function(y,K,N){if(null!=y&&null!=this.cellEditor.textarea){for(var T=this.cellEditor.textarea.getElementsByTagName("img"),U=[],W=0;W<T.length;W++)U.push(T[W]);document.execCommand("insertimage",!1,y);y=this.cellEditor.textarea.getElementsByTagName("img");if(y.length==U.length+1)for(W=y.length-1;0<=W;W--)if(0==W||y[W]!=U[W-1]){y[W].setAttribute("width",K);y[W].setAttribute("height",
+N);break}}};Graph.prototype.insertLink=function(y){if(null!=this.cellEditor.textarea)if(0==y.length)document.execCommand("unlink",!1);else if(mxClient.IS_FF){for(var K=this.cellEditor.textarea.getElementsByTagName("a"),N=[],T=0;T<K.length;T++)N.push(K[T]);document.execCommand("createlink",!1,mxUtils.trim(y));K=this.cellEditor.textarea.getElementsByTagName("a");if(K.length==N.length+1)for(T=K.length-1;0<=T;T--)if(K[T]!=N[T-1]){for(K=K[T].getElementsByTagName("a");0<K.length;){for(N=K[0].parentNode;null!=
+K[0].firstChild;)N.insertBefore(K[0].firstChild,K[0]);N.removeChild(K[0])}break}}else document.execCommand("createlink",!1,mxUtils.trim(y))};Graph.prototype.isCellResizable=function(y){var K=mxGraph.prototype.isCellResizable.apply(this,arguments),N=this.getCurrentCellStyle(y);return!this.isTableCell(y)&&!this.isTableRow(y)&&(K||"0"!=mxUtils.getValue(N,mxConstants.STYLE_RESIZABLE,"1")&&"wrap"==N[mxConstants.STYLE_WHITE_SPACE])};Graph.prototype.distributeCells=function(y,K){null==K&&(K=this.getSelectionCells());
+if(null!=K&&1<K.length){for(var N=[],T=null,U=null,W=0;W<K.length;W++)if(this.getModel().isVertex(K[W])){var na=this.view.getState(K[W]);if(null!=na){var wa=y?na.getCenterX():na.getCenterY();T=null!=T?Math.max(T,wa):wa;U=null!=U?Math.min(U,wa):wa;N.push(na)}}if(2<N.length){N.sort(function(Na,Ma){return y?Na.x-Ma.x:Na.y-Ma.y});na=this.view.translate;wa=this.view.scale;U=U/wa-(y?na.x:na.y);T=T/wa-(y?na.x:na.y);this.getModel().beginUpdate();try{var ra=(T-U)/(N.length-1);T=U;for(W=1;W<N.length-1;W++){var xa=
+this.view.getState(this.model.getParent(N[W].cell)),Ea=this.getCellGeometry(N[W].cell);T+=ra;null!=Ea&&null!=xa&&(Ea=Ea.clone(),y?Ea.x=Math.round(T-Ea.width/2)-xa.origin.x:Ea.y=Math.round(T-Ea.height/2)-xa.origin.y,this.getModel().setGeometry(N[W].cell,Ea))}}finally{this.getModel().endUpdate()}}}return K};Graph.prototype.isCloneEvent=function(y){return mxClient.IS_MAC&&mxEvent.isMetaDown(y)||mxEvent.isControlDown(y)};Graph.prototype.createSvgImageExport=function(){var y=new mxImageExport;y.getLinkForCellState=
+mxUtils.bind(this,function(K,N){return this.getLinkForCell(K.cell)});return y};Graph.prototype.parseBackgroundImage=function(y){var K=null;null!=y&&0<y.length&&(y=JSON.parse(y),K=new mxImage(y.src,y.width,y.height));return K};Graph.prototype.getBackgroundImageObject=function(y){return y};Graph.prototype.getSvg=function(y,K,N,T,U,W,na,wa,ra,xa,Ea,Na,Ma,za){var Ba=null;if(null!=za)for(Ba=new mxDictionary,Ea=0;Ea<za.length;Ea++)Ba.put(za[Ea],!0);if(za=this.useCssTransforms)this.useCssTransforms=!1,this.view.revalidate(),
+this.sizeDidChange();try{K=null!=K?K:1;N=null!=N?N:0;U=null!=U?U:!0;W=null!=W?W:!0;na=null!=na?na:!0;xa=null!=xa?xa:!1;var Ca="page"==Ma?this.view.getBackgroundPageBounds():W&&null==Ba||T||"diagram"==Ma?this.getGraphBounds():this.getBoundingBox(this.getSelectionCells()),ya=this.view.scale;"diagram"==Ma&&null!=this.backgroundImage&&(Ca=mxRectangle.fromRectangle(Ca),Ca.add(new mxRectangle((this.view.translate.x+this.backgroundImage.x)*ya,(this.view.translate.y+this.backgroundImage.y)*ya,this.backgroundImage.width*
+ya,this.backgroundImage.height*ya)));if(null==Ca)throw Error(mxResources.get("drawingEmpty"));T=K/ya;Ma=U?-.5:0;var Ga=Graph.createSvgNode(Ma,Ma,Math.max(1,Math.ceil(Ca.width*T)+2*N)+(xa&&0==N?5:0),Math.max(1,Math.ceil(Ca.height*T)+2*N)+(xa&&0==N?5:0),y),Za=Ga.ownerDocument,Pa=null!=Za.createElementNS?Za.createElementNS(mxConstants.NS_SVG,"g"):Za.createElement("g");Ga.appendChild(Pa);var fb=this.createSvgCanvas(Pa);fb.foOffset=U?-.5:0;fb.textOffset=U?-.5:0;fb.imageOffset=U?-.5:0;fb.translate(Math.floor(N/
+K-Ca.x/ya),Math.floor(N/K-Ca.y/ya));var bb=document.createElement("div"),jb=fb.getAlternateText;fb.getAlternateText=function(ab,kb,hb,ob,vb,nb,Bb,yb,mb,pb,db,rb,tb){if(null!=nb&&0<this.state.fontSize)try{mxUtils.isNode(nb)?nb=nb.innerText:(bb.innerHTML=nb,nb=mxUtils.extractTextWithWhitespace(bb.childNodes));for(var zb=Math.ceil(2*ob/this.state.fontSize),wb=[],Ab=0,lb=0;(0==zb||Ab<zb)&&lb<nb.length;){var xb=nb.charCodeAt(lb);if(10==xb||13==xb){if(0<Ab)break}else wb.push(nb.charAt(lb)),255>xb&&Ab++;
+lb++}wb.length<nb.length&&1<nb.length-wb.length&&(nb=mxUtils.trim(wb.join(""))+"...");return nb}catch(c){return jb.apply(this,arguments)}else return jb.apply(this,arguments)};var eb=this.backgroundImage;if(null!=eb){y=ya/K;var qb=this.view.translate;Ma=new mxRectangle((eb.x+qb.x)*y,(eb.y+qb.y)*y,eb.width*y,eb.height*y);mxUtils.intersects(Ca,Ma)&&fb.image(eb.x+qb.x,eb.y+qb.y,eb.width,eb.height,eb.src,!0)}fb.scale(T);fb.textEnabled=na;wa=null!=wa?wa:this.createSvgImageExport();var ub=wa.drawCellState,
+Ya=wa.getLinkForCellState;wa.getLinkForCellState=function(ab,kb){var hb=Ya.apply(this,arguments);return null==hb||ab.view.graph.isCustomLink(hb)?null:hb};wa.getLinkTargetForCellState=function(ab,kb){return ab.view.graph.getLinkTargetForCell(ab.cell)};wa.drawCellState=function(ab,kb){for(var hb=ab.view.graph,ob=null!=Ba?Ba.get(ab.cell):hb.isCellSelected(ab.cell),vb=hb.model.getParent(ab.cell);!(W&&null==Ba||ob)&&null!=vb;)ob=null!=Ba?Ba.get(vb):hb.isCellSelected(vb),vb=hb.model.getParent(vb);(W&&null==
+Ba||ob)&&ub.apply(this,arguments)};wa.drawState(this.getView().getState(this.model.root),fb);this.updateSvgLinks(Ga,ra,!0);this.addForeignObjectWarning(fb,Ga);return Ga}finally{za&&(this.useCssTransforms=!0,this.view.revalidate(),this.sizeDidChange())}};Graph.prototype.addForeignObjectWarning=function(y,K){if("0"!=urlParams["svg-warning"]&&0<K.getElementsByTagName("foreignObject").length){var N=y.createElement("switch"),T=y.createElement("g");T.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility");
+var U=y.createElement("a");U.setAttribute("transform","translate(0,-5)");null==U.setAttributeNS||K.ownerDocument!=document&&null==document.documentMode?(U.setAttribute("xlink:href",Graph.foreignObjectWarningLink),U.setAttribute("target","_blank")):(U.setAttributeNS(mxConstants.NS_XLINK,"xlink:href",Graph.foreignObjectWarningLink),U.setAttributeNS(mxConstants.NS_XLINK,"target","_blank"));y=y.createElement("text");y.setAttribute("text-anchor","middle");y.setAttribute("font-size","10px");y.setAttribute("x",
+"50%");y.setAttribute("y","100%");mxUtils.write(y,Graph.foreignObjectWarningText);N.appendChild(T);U.appendChild(y);N.appendChild(U);K.appendChild(N)}};Graph.prototype.updateSvgLinks=function(y,K,N){y=y.getElementsByTagName("a");for(var T=0;T<y.length;T++)if(null==y[T].getAttribute("target")){var U=y[T].getAttribute("href");null==U&&(U=y[T].getAttribute("xlink:href"));null!=U&&(null!=K&&/^https?:\/\//.test(U)?y[T].setAttribute("target",K):N&&this.isCustomLink(U)&&y[T].setAttribute("href","javascript:void(0);"))}};
+Graph.prototype.createSvgCanvas=function(y){y=new mxSvgCanvas2D(y);y.minStrokeWidth=this.cellRenderer.minSvgStrokeWidth;y.pointerEvents=!0;return y};Graph.prototype.getSelectedElement=function(){var y=null;if(window.getSelection){var K=window.getSelection();K.getRangeAt&&K.rangeCount&&(y=K.getRangeAt(0).commonAncestorContainer)}else document.selection&&(y=document.selection.createRange().parentElement());return y};Graph.prototype.getSelectedEditingElement=function(){for(var y=this.getSelectedElement();null!=
+y&&y.nodeType!=mxConstants.NODETYPE_ELEMENT;)y=y.parentNode;null!=y&&y==this.cellEditor.textarea&&1==this.cellEditor.textarea.children.length&&this.cellEditor.textarea.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT&&(y=this.cellEditor.textarea.firstChild);return y};Graph.prototype.getParentByName=function(y,K,N){for(;null!=y&&y.nodeName!=K;){if(y==N)return null;y=y.parentNode}return y};Graph.prototype.getParentByNames=function(y,K,N){for(;null!=y&&!(0<=mxUtils.indexOf(K,y.nodeName));){if(y==N)return null;
+y=y.parentNode}return y};Graph.prototype.selectNode=function(y){var K=null;if(window.getSelection){if(K=window.getSelection(),K.getRangeAt&&K.rangeCount){var N=document.createRange();N.selectNode(y);K.removeAllRanges();K.addRange(N)}}else(K=document.selection)&&"Control"!=K.type&&(y=K.createRange(),y.collapse(!0),N=K.createRange(),N.setEndPoint("StartToStart",y),N.select())};Graph.prototype.flipEdgePoints=function(y,K,N){var T=this.getCellGeometry(y);if(null!=T){T=T.clone();if(null!=T.points)for(var U=
+0;U<T.points.length;U++)K?T.points[U].x=N+(N-T.points[U].x):T.points[U].y=N+(N-T.points[U].y);U=function(W){null!=W&&(K?W.x=N+(N-W.x):W.y=N+(N-W.y))};U(T.getTerminalPoint(!0));U(T.getTerminalPoint(!1));this.model.setGeometry(y,T)}};Graph.prototype.flipChildren=function(y,K,N){this.model.beginUpdate();try{for(var T=this.model.getChildCount(y),U=0;U<T;U++){var W=this.model.getChildAt(y,U);if(this.model.isEdge(W))this.flipEdgePoints(W,K,N);else{var na=this.getCellGeometry(W);null!=na&&(na=na.clone(),
+K?na.x=N+(N-na.x-na.width):na.y=N+(N-na.y-na.height),this.model.setGeometry(W,na))}}}finally{this.model.endUpdate()}};Graph.prototype.flipCells=function(y,K){this.model.beginUpdate();try{y=this.model.getTopmostCells(y);for(var N=[],T=0;T<y.length;T++)if(this.model.isEdge(y[T])){var U=this.view.getState(y[T]);null!=U&&this.flipEdgePoints(y[T],K,(K?U.getCenterX():U.getCenterY())/this.view.scale-(K?U.origin.x:U.origin.y)-(K?this.view.translate.x:this.view.translate.y))}else{var W=this.getCellGeometry(y[T]);
+null!=W&&this.flipChildren(y[T],K,K?W.getCenterX()-W.x:W.getCenterY()-W.y);N.push(y[T])}this.toggleCellStyles(K?mxConstants.STYLE_FLIPH:mxConstants.STYLE_FLIPV,!1,N)}finally{this.model.endUpdate()}};Graph.prototype.deleteCells=function(y,K){var N=null;if(null!=y&&0<y.length){this.model.beginUpdate();try{for(var T=0;T<y.length;T++){var U=this.model.getParent(y[T]);if(this.isTable(U)){var W=this.getCellGeometry(y[T]),na=this.getCellGeometry(U);null!=W&&null!=na&&(na=na.clone(),na.height-=W.height,this.model.setGeometry(U,
+na))}}var wa=this.selectParentAfterDelete?this.model.getParents(y):null;this.removeCells(y,K)}finally{this.model.endUpdate()}if(null!=wa)for(N=[],T=0;T<wa.length;T++)this.model.contains(wa[T])&&(this.model.isVertex(wa[T])||this.model.isEdge(wa[T]))&&N.push(wa[T])}return N};Graph.prototype.insertTableColumn=function(y,K){var N=this.getModel();N.beginUpdate();try{var T=y,U=0;if(this.isTableCell(y)){var W=N.getParent(y);T=N.getParent(W);U=mxUtils.indexOf(N.getChildCells(W,!0),y)}else this.isTableRow(y)?
+T=N.getParent(y):y=N.getChildCells(T,!0)[0],K||(U=N.getChildCells(y,!0).length-1);var na=N.getChildCells(T,!0),wa=Graph.minTableColumnWidth;for(y=0;y<na.length;y++){var ra=N.getChildCells(na[y],!0)[U],xa=N.cloneCell(ra,!1),Ea=this.getCellGeometry(xa);xa.value=null;xa.style=mxUtils.setStyle(mxUtils.setStyle(xa.style,"rowspan",null),"colspan",null);if(null!=Ea){null!=Ea.alternateBounds&&(Ea.width=Ea.alternateBounds.width,Ea.height=Ea.alternateBounds.height,Ea.alternateBounds=null);wa=Ea.width;var Na=
+this.getCellGeometry(na[y]);null!=Na&&(Ea.height=Na.height)}N.add(na[y],xa,U+(K?0:1))}var Ma=this.getCellGeometry(T);null!=Ma&&(Ma=Ma.clone(),Ma.width+=wa,N.setGeometry(T,Ma))}finally{N.endUpdate()}};Graph.prototype.deleteLane=function(y){var K=this.getModel();K.beginUpdate();try{var N=null;N="stackLayout"==this.getCurrentCellStyle(y).childLayout?y:K.getParent(y);var T=K.getChildCells(N,!0);0==T.length?K.remove(N):(N==y&&(y=T[T.length-1]),K.remove(y))}finally{K.endUpdate()}};Graph.prototype.insertLane=
+function(y,K){var N=this.getModel();N.beginUpdate();try{var T=null;if("stackLayout"==this.getCurrentCellStyle(y).childLayout){T=y;var U=N.getChildCells(T,!0);y=U[K?0:U.length-1]}else T=N.getParent(y);var W=T.getIndex(y);y=N.cloneCell(y,!1);y.value=null;N.add(T,y,W+(K?0:1))}finally{N.endUpdate()}};Graph.prototype.insertTableRow=function(y,K){var N=this.getModel();N.beginUpdate();try{var T=y,U=y;if(this.isTableCell(y))U=N.getParent(y),T=N.getParent(U);else if(this.isTableRow(y))T=N.getParent(y);else{var W=
+N.getChildCells(T,!0);U=W[K?0:W.length-1]}var na=N.getChildCells(U,!0),wa=T.getIndex(U);U=N.cloneCell(U,!1);U.value=null;var ra=this.getCellGeometry(U);if(null!=ra){for(W=0;W<na.length;W++){y=N.cloneCell(na[W],!1);y.value=null;y.style=mxUtils.setStyle(mxUtils.setStyle(y.style,"rowspan",null),"colspan",null);var xa=this.getCellGeometry(y);null!=xa&&(null!=xa.alternateBounds&&(xa.width=xa.alternateBounds.width,xa.height=xa.alternateBounds.height,xa.alternateBounds=null),xa.height=ra.height);U.insert(y)}N.add(T,
+U,wa+(K?0:1));var Ea=this.getCellGeometry(T);null!=Ea&&(Ea=Ea.clone(),Ea.height+=ra.height,N.setGeometry(T,Ea))}}finally{N.endUpdate()}};Graph.prototype.deleteTableColumn=function(y){var K=this.getModel();K.beginUpdate();try{var N=y,T=y;this.isTableCell(y)&&(T=K.getParent(y));this.isTableRow(T)&&(N=K.getParent(T));var U=K.getChildCells(N,!0);if(0==U.length)K.remove(N);else{this.isTableRow(T)||(T=U[0]);var W=K.getChildCells(T,!0);if(1>=W.length)K.remove(N);else{var na=W.length-1;this.isTableCell(y)&&
+(na=mxUtils.indexOf(W,y));for(T=y=0;T<U.length;T++){var wa=K.getChildCells(U[T],!0)[na];K.remove(wa);var ra=this.getCellGeometry(wa);null!=ra&&(y=Math.max(y,ra.width))}var xa=this.getCellGeometry(N);null!=xa&&(xa=xa.clone(),xa.width-=y,K.setGeometry(N,xa))}}}finally{K.endUpdate()}};Graph.prototype.deleteTableRow=function(y){var K=this.getModel();K.beginUpdate();try{var N=y,T=y;this.isTableCell(y)&&(y=T=K.getParent(y));this.isTableRow(y)&&(N=K.getParent(T));var U=K.getChildCells(N,!0);if(1>=U.length)K.remove(N);
+else{this.isTableRow(T)||(T=U[U.length-1]);K.remove(T);y=0;var W=this.getCellGeometry(T);null!=W&&(y=W.height);var na=this.getCellGeometry(N);null!=na&&(na=na.clone(),na.height-=y,K.setGeometry(N,na))}}finally{K.endUpdate()}};Graph.prototype.insertRow=function(y,K){for(var N=y.tBodies[0],T=N.rows[0].cells,U=y=0;U<T.length;U++){var W=T[U].getAttribute("colspan");y+=null!=W?parseInt(W):1}K=N.insertRow(K);for(U=0;U<y;U++)mxUtils.br(K.insertCell(-1));return K.cells[0]};Graph.prototype.deleteRow=function(y,
+K){y.tBodies[0].deleteRow(K)};Graph.prototype.insertColumn=function(y,K){var N=y.tHead;if(null!=N)for(var T=0;T<N.rows.length;T++){var U=document.createElement("th");N.rows[T].appendChild(U);mxUtils.br(U)}y=y.tBodies[0];for(N=0;N<y.rows.length;N++)T=y.rows[N].insertCell(K),mxUtils.br(T);return y.rows[0].cells[0<=K?K:y.rows[0].cells.length-1]};Graph.prototype.deleteColumn=function(y,K){if(0<=K){y=y.tBodies[0].rows;for(var N=0;N<y.length;N++)y[N].cells.length>K&&y[N].deleteCell(K)}};Graph.prototype.pasteHtmlAtCaret=
+function(y){if(window.getSelection){var K=window.getSelection();if(K.getRangeAt&&K.rangeCount){K=K.getRangeAt(0);K.deleteContents();var N=document.createElement("div");N.innerHTML=y;y=document.createDocumentFragment();for(var T;T=N.firstChild;)lastNode=y.appendChild(T);K.insertNode(y)}}else(K=document.selection)&&"Control"!=K.type&&K.createRange().pasteHTML(y)};Graph.prototype.createLinkForHint=function(y,K){function N(U,W){U.length>W&&(U=U.substring(0,Math.round(W/2))+"..."+U.substring(U.length-
+Math.round(W/4)));return U}y=null!=y?y:"javascript:void(0);";if(null==K||0==K.length)K=this.isCustomLink(y)?this.getLinkTitle(y):y;var T=document.createElement("a");T.setAttribute("rel",this.linkRelation);T.setAttribute("href",this.getAbsoluteUrl(y));T.setAttribute("title",N(this.isCustomLink(y)?this.getLinkTitle(y):y,80));null!=this.linkTarget&&T.setAttribute("target",this.linkTarget);mxUtils.write(T,N(K,40));this.isCustomLink(y)&&mxEvent.addListener(T,"click",mxUtils.bind(this,function(U){this.customLinkClicked(y);
+mxEvent.consume(U)}));return T};Graph.prototype.initTouch=function(){this.connectionHandler.marker.isEnabled=function(){return null!=this.graph.connectionHandler.first};this.addListener(mxEvent.START_EDITING,function(W,na){this.popupMenuHandler.hideMenu()});var y=this.updateMouseEvent;this.updateMouseEvent=function(W){W=y.apply(this,arguments);if(mxEvent.isTouchEvent(W.getEvent())&&null==W.getState()){var na=this.getCellAt(W.graphX,W.graphY);null!=na&&this.isSwimlane(na)&&this.hitsSwimlaneContent(na,
+W.graphX,W.graphY)||(W.state=this.view.getState(na),null!=W.state&&null!=W.state.shape&&(this.container.style.cursor=W.state.shape.node.style.cursor))}null==W.getState()&&this.isEnabled()&&(this.container.style.cursor="default");return W};var K=!1,N=!1,T=!1,U=this.fireMouseEvent;this.fireMouseEvent=function(W,na,wa){W==mxEvent.MOUSE_DOWN&&(na=this.updateMouseEvent(na),K=this.isCellSelected(na.getCell()),N=this.isSelectionEmpty(),T=this.popupMenuHandler.isMenuShowing());U.apply(this,arguments)};this.popupMenuHandler.mouseUp=
+mxUtils.bind(this,function(W,na){var wa=mxEvent.isMouseEvent(na.getEvent());this.popupMenuHandler.popupTrigger=!this.isEditing()&&this.isEnabled()&&(null==na.getState()||!na.isSource(na.getState().control))&&(this.popupMenuHandler.popupTrigger||!T&&!wa&&(N&&null==na.getCell()&&this.isSelectionEmpty()||K&&this.isCellSelected(na.getCell())));wa=!K||wa?null:mxUtils.bind(this,function(ra){window.setTimeout(mxUtils.bind(this,function(){if(!this.isEditing()){var xa=mxUtils.getScrollOrigin();this.popupMenuHandler.popup(na.getX()+
+xa.x+1,na.getY()+xa.y+1,ra,na.getEvent())}}),500)});mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler,[W,na,wa])})};mxCellEditor.prototype.isContentEditing=function(){var y=this.graph.view.getState(this.editingCell);return null!=y&&1==y.style.html};mxCellEditor.prototype.isTableSelected=function(){return null!=this.graph.getParentByName(this.graph.getSelectedElement(),"TABLE",this.textarea)};mxCellEditor.prototype.isTextSelected=function(){var y="";window.getSelection?y=window.getSelection():
+document.getSelection?y=document.getSelection():document.selection&&(y=document.selection.createRange().text);return""!=y};mxCellEditor.prototype.insertTab=function(y){var K=this.textarea.ownerDocument.defaultView.getSelection(),N=K.getRangeAt(0),T="\t";if(null!=y)for(T="";0<y;)T+=" ",y--;y=document.createElement("span");y.style.whiteSpace="pre";y.appendChild(document.createTextNode(T));N.insertNode(y);N.setStartAfter(y);N.setEndAfter(y);K.removeAllRanges();K.addRange(N)};mxCellEditor.prototype.alignText=
+function(y,K){var N=null!=K&&mxEvent.isShiftDown(K);if(N||null!=window.getSelection&&null!=window.getSelection().containsNode){var T=!0;this.graph.processElements(this.textarea,function(U){N||window.getSelection().containsNode(U,!0)?(U.removeAttribute("align"),U.style.textAlign=null):T=!1});T&&this.graph.cellEditor.setAlign(y)}document.execCommand("justify"+y.toLowerCase(),!1,null)};mxCellEditor.prototype.saveSelection=function(){if(window.getSelection){var y=window.getSelection();if(y.getRangeAt&&
+y.rangeCount){for(var K=[],N=0,T=y.rangeCount;N<T;++N)K.push(y.getRangeAt(N));return K}}else if(document.selection&&document.selection.createRange)return document.selection.createRange();return null};mxCellEditor.prototype.restoreSelection=function(y){try{if(y)if(window.getSelection){sel=window.getSelection();sel.removeAllRanges();for(var K=0,N=y.length;K<N;++K)sel.addRange(y[K])}else document.selection&&y.select&&y.select()}catch(T){}};var C=mxCellRenderer.prototype.initializeLabel;mxCellRenderer.prototype.initializeLabel=
+function(y){null!=y.text&&(y.text.replaceLinefeeds="0"!=mxUtils.getValue(y.style,"nl2Br","1"));C.apply(this,arguments)};var I=mxConstraintHandler.prototype.update;mxConstraintHandler.prototype.update=function(y,K){this.isKeepFocusEvent(y)||!mxEvent.isAltDown(y.getEvent())?I.apply(this,arguments):this.reset()};mxGuide.prototype.createGuideShape=function(y){return new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH)};mxCellEditor.prototype.escapeCancelsEditing=!1;var G=mxCellEditor.prototype.startEditing;
+mxCellEditor.prototype.startEditing=function(y,K){y=this.graph.getStartEditingCell(y,K);G.apply(this,arguments);var N=this.graph.view.getState(y);this.textarea.className=null!=N&&1==N.style.html?"mxCellEditor geContentEditable":"mxCellEditor mxPlainTextEditor";this.codeViewMode=!1;this.switchSelectionState=null;this.graph.setSelectionCell(y);N=this.graph.getModel().getParent(y);var T=this.graph.getCellGeometry(y);if(this.graph.getModel().isEdge(N)&&null!=T&&T.relative||this.graph.getModel().isEdge(y))this.textarea.style.outline=
+mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_FF&&mxClient.IS_WIN?"gray dotted 1px":""};var Z=mxCellEditor.prototype.installListeners;mxCellEditor.prototype.installListeners=function(y){function K(U,W){W.originalNode=U;U=U.firstChild;for(var na=W.firstChild;null!=U&&null!=na;)K(U,na),U=U.nextSibling,na=na.nextSibling;return W}function N(U,W){if(null!=U)if(W.originalNode!=U)T(U);else for(U=U.firstChild,W=W.firstChild;null!=U;){var na=U.nextSibling;null==W?T(U):(N(U,W),W=W.nextSibling);U=na}}function T(U){for(var W=
+U.firstChild;null!=W;){var na=W.nextSibling;T(W);W=na}1==U.nodeType&&("BR"===U.nodeName||null!=U.firstChild)||3==U.nodeType&&0!=mxUtils.trim(mxUtils.getTextContent(U)).length?(3==U.nodeType&&mxUtils.setTextContent(U,mxUtils.getTextContent(U).replace(/\n|\r/g,"")),1==U.nodeType&&(U.removeAttribute("style"),U.removeAttribute("class"),U.removeAttribute("width"),U.removeAttribute("cellpadding"),U.removeAttribute("cellspacing"),U.removeAttribute("border"))):U.parentNode.removeChild(U)}Z.apply(this,arguments);
+7!==document.documentMode&&8!==document.documentMode&&mxEvent.addListener(this.textarea,"paste",mxUtils.bind(this,function(U){var W=K(this.textarea,this.textarea.cloneNode(!0));window.setTimeout(mxUtils.bind(this,function(){null!=this.textarea&&(0<=this.textarea.innerHTML.indexOf("<o:OfficeDocumentSettings>")||0<=this.textarea.innerHTML.indexOf("\x3c!--[if !mso]>")?N(this.textarea,W):Graph.removePasteFormatting(this.textarea))}),0)}))};mxCellEditor.prototype.toggleViewMode=function(){var y=this.graph.view.getState(this.editingCell);
+if(null!=y){var K=null!=y&&"0"!=mxUtils.getValue(y.style,"nl2Br","1"),N=this.saveSelection();if(this.codeViewMode){wa=mxUtils.extractTextWithWhitespace(this.textarea.childNodes);0<wa.length&&"\n"==wa.charAt(wa.length-1)&&(wa=wa.substring(0,wa.length-1));wa=this.graph.sanitizeHtml(K?wa.replace(/\n/g,"<br/>"):wa,!0);this.textarea.className="mxCellEditor geContentEditable";ra=mxUtils.getValue(y.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE);K=mxUtils.getValue(y.style,mxConstants.STYLE_FONTFAMILY,
+mxConstants.DEFAULT_FONTFAMILY);var T=mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),U=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,W=(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,na=[];(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&na.push("underline");(mxUtils.getValue(y.style,mxConstants.STYLE_FONTSTYLE,
+0)&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&na.push("line-through");this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration=na.join(" ");this.textarea.style.fontWeight=U?"bold":"normal";this.textarea.style.fontStyle=W?"italic":"";this.textarea.style.fontFamily=K;this.textarea.style.textAlign=T;this.textarea.style.padding=
+"0px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=wa,0==this.textarea.innerHTML.length&&(this.textarea.innerHTML=this.getEmptyLabelText(),this.clearOnChange=0<this.textarea.innerHTML.length));this.codeViewMode=!1}else{this.clearOnChange&&this.textarea.innerHTML==this.getEmptyLabelText()&&(this.clearOnChange=!1,this.textarea.innerText="");var wa=mxUtils.htmlEntities(this.textarea.innerHTML);8!=document.documentMode&&(wa=mxUtils.replaceTrailingNewlines(wa,"<div><br></div>"));wa=this.graph.sanitizeHtml(K?
+wa.replace(/\n/g,"").replace(/&lt;br\s*.?&gt;/g,"<br>"):wa,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ra=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ra*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ra)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;
+this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=wa&&(this.textarea.innerHTML=wa);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=N;this.resize()}};var ca=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(y,K){if(null!=this.textarea)if(y=this.graph.getView().getState(this.editingCell),this.codeViewMode&&
+null!=y){var N=y.view.scale;this.bounds=mxRectangle.fromRectangle(y);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*N;this.bounds.height=60*N;var T=null!=y.text?y.text.margin:null;null==T&&(T=mxUtils.getAlignmentAsPoint(mxUtils.getValue(y.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(y.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=T.x*this.bounds.width;this.bounds.y+=T.y*this.bounds.height}this.textarea.style.width=
+Math.round((this.bounds.width-4)/N)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/N)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight<this.textarea.offsetHeight&&(this.textarea.style.height=Math.round(this.bounds.height/N)+(this.textarea.offsetHeight-this.textarea.clientHeight)+"px",this.bounds.height=parseInt(this.textarea.style.height)*N);this.textarea.clientWidth<this.textarea.offsetWidth&&(this.textarea.style.width=Math.round(this.bounds.width/N)+(this.textarea.offsetWidth-
+this.textarea.clientWidth)+"px",this.bounds.width=parseInt(this.textarea.style.width)*N);this.textarea.style.left=Math.round(this.bounds.x)+"px";this.textarea.style.top=Math.round(this.bounds.y)+"px";mxUtils.setPrefixedStyle(this.textarea.style,"transform","scale("+N+","+N+")")}else this.textarea.style.height="",this.textarea.style.overflow="",ca.apply(this,arguments)};mxCellEditorGetInitialValue=mxCellEditor.prototype.getInitialValue;mxCellEditor.prototype.getInitialValue=function(y,K){if("0"==mxUtils.getValue(y.style,
+"html","0"))return mxCellEditorGetInitialValue.apply(this,arguments);var N=this.graph.getEditingValue(y.cell,K);"1"==mxUtils.getValue(y.style,"nl2Br","1")&&(N=N.replace(/\n/g,"<br/>"));return N=this.graph.sanitizeHtml(N,!0)};mxCellEditorGetCurrentValue=mxCellEditor.prototype.getCurrentValue;mxCellEditor.prototype.getCurrentValue=function(y){if("0"==mxUtils.getValue(y.style,"html","0"))return mxCellEditorGetCurrentValue.apply(this,arguments);var K=this.graph.sanitizeHtml(this.textarea.innerHTML,!0);
+return K="1"==mxUtils.getValue(y.style,"nl2Br","1")?K.replace(/\r\n/g,"<br/>").replace(/\n/g,"<br/>"):K.replace(/\r\n/g,"").replace(/\n/g,"")};var ba=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(y){this.codeViewMode&&this.toggleViewMode();ba.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(y){}};var Y=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(y,K){this.graph.getModel().beginUpdate();
+try{Y.apply(this,arguments),""==K&&this.graph.isCellDeletable(y.cell)&&0==this.graph.model.getChildCount(y.cell)&&this.graph.isTransparentState(y)&&this.graph.removeCells([y.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(y){var K=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=
+mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(y.style,mxConstants.STYLE_FILLCOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getBorderColor=function(y){var K=mxUtils.getValue(y.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);null!=K&&K!=mxConstants.NONE||!(null!=y.cell.geometry&&0<y.cell.geometry.width)||0==mxUtils.getValue(y.style,mxConstants.STYLE_ROTATION,0)&&0!=mxUtils.getValue(y.style,mxConstants.STYLE_HORIZONTAL,1)||(K=mxUtils.getValue(y.style,
+mxConstants.STYLE_STROKECOLOR,null));K==mxConstants.NONE&&(K=null);return K};mxCellEditor.prototype.getMinimumSize=function(y){var K=this.graph.getView().scale;return new mxRectangle(0,0,null==y.text?30:y.text.size*K+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(y,K){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(K.getEvent)};mxGraphView.prototype.formatUnitText=function(y){return y?
+e(y,this.unit):y};mxGraphHandler.prototype.updateHint=function(y){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=b(),this.graph.container.appendChild(this.hint));var K=this.graph.view.translate,N=this.graph.view.scale;y=this.roundLength((this.bounds.x+this.currentDx)/N-K.x);K=this.roundLength((this.bounds.y+this.currentDy)/N-K.y);N=this.graph.view.unit;this.hint.innerHTML=e(y,N)+", "+e(K,N);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-
+this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(this.hint.parentNode.removeChild(this.hint),this.hint=null)};var O=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(y,K){O.apply(this,arguments);var N=this.graph.getCellStyle(y);if(null==N.childLayout){var T=this.graph.model.getParent(y),U=null!=T?this.graph.getCellGeometry(T):null;
+if(null!=U&&(N=this.graph.getCellStyle(T),"stackLayout"==N.childLayout)){var W=parseFloat(mxUtils.getValue(N,"stackBorder",mxStackLayout.prototype.border));N="1"==mxUtils.getValue(N,"horizontalStack","1");var na=this.graph.getActualStartSize(T);U=U.clone();N?U.height=K.height+na.y+na.height+2*W:U.width=K.width+na.x+na.width+2*W;this.graph.model.setGeometry(T,U)}}};var la=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function y(wa){N.get(wa)||
+(N.put(wa,!0),U.push(wa))}for(var K=la.apply(this,arguments),N=new mxDictionary,T=this.graph.model,U=[],W=0;W<K.length;W++){var na=K[W];this.graph.isTableCell(na)?y(T.getParent(T.getParent(na))):this.graph.isTableRow(na)&&y(T.getParent(na));y(na)}return U};var aa=mxVertexHandler.prototype.createParentHighlightShape;mxVertexHandler.prototype.createParentHighlightShape=function(y){var K=aa.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};var ia=mxEdgeHandler.prototype.createParentHighlightShape;
+mxEdgeHandler.prototype.createParentHighlightShape=function(y){var K=ia.apply(this,arguments);K.stroke="#C0C0C0";K.strokewidth=1;return K};mxVertexHandler.prototype.rotationHandleVSpacing=-12;mxVertexHandler.prototype.getRotationHandlePosition=function(){var y=this.getHandlePadding();return new mxPoint(this.bounds.x+this.bounds.width-this.rotationHandleVSpacing+y.x/2,this.bounds.y+this.rotationHandleVSpacing-y.y/2)};mxVertexHandler.prototype.isRecursiveResize=function(y,K){return this.graph.isRecursiveVertexResize(y)&&
+!mxEvent.isAltDown(K.getEvent())};mxVertexHandler.prototype.isCenteredEvent=function(y,K){return mxEvent.isControlDown(K.getEvent())||mxEvent.isMetaDown(K.getEvent())};var X=mxVertexHandler.prototype.isRotationHandleVisible;mxVertexHandler.prototype.isRotationHandleVisible=function(){return X.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)&&!this.graph.isTable(this.state.cell)};mxVertexHandler.prototype.getSizerBounds=function(){return this.graph.isTableCell(this.state.cell)?
+this.graph.view.getState(this.graph.model.getParent(this.graph.model.getParent(this.state.cell))):this.bounds};var R=mxVertexHandler.prototype.isParentHighlightVisible;mxVertexHandler.prototype.isParentHighlightVisible=function(){return R.apply(this,arguments)&&!this.graph.isTableCell(this.state.cell)&&!this.graph.isTableRow(this.state.cell)};var sa=mxVertexHandler.prototype.isCustomHandleVisible;mxVertexHandler.prototype.isCustomHandleVisible=function(y){return y.tableHandle||sa.apply(this,arguments)&&
+(!this.graph.isTable(this.state.cell)||this.graph.isCellSelected(this.state.cell))};mxVertexHandler.prototype.getSelectionBorderInset=function(){var y=0;this.graph.isTableRow(this.state.cell)?y=1:this.graph.isTableCell(this.state.cell)&&(y=2);return y};var M=mxVertexHandler.prototype.getSelectionBorderBounds;mxVertexHandler.prototype.getSelectionBorderBounds=function(){return M.apply(this,arguments).grow(-this.getSelectionBorderInset())};var ka=null,L=mxVertexHandler.prototype.createCustomHandles;
+mxVertexHandler.prototype.createCustomHandles=function(){null==ka&&(ka=mxCellRenderer.defaultShapes.tableLine);var y=L.apply(this,arguments);if(this.graph.isTable(this.state.cell)){var K=function(Ba,Ca,ya){for(var Ga=[],Za=0;Za<Ba.length;Za++){var Pa=Ba[Za];Ga.push(null==Pa?null:new mxPoint((ra+Pa.x+Ca)*W,(xa+Pa.y+ya)*W))}return Ga},N=this,T=this.graph,U=T.model,W=T.view.scale,na=this.state,wa=this.selectionBorder,ra=this.state.origin.x+T.view.translate.x,xa=this.state.origin.y+T.view.translate.y;
+null==y&&(y=[]);var Ea=T.view.getCellStates(U.getChildCells(this.state.cell,!0));if(0<Ea.length){var Na=U.getChildCells(Ea[0].cell,!0),Ma=T.getTableLines(this.state.cell,!1,!0),za=T.getTableLines(this.state.cell,!0,!1);for(U=0;U<Ea.length;U++)mxUtils.bind(this,function(Ba){var Ca=Ea[Ba],ya=Ba<Ea.length-1?Ea[Ba+1]:null;ya=null!=ya?T.getCellGeometry(ya.cell):null;var Ga=null!=ya&&null!=ya.alternateBounds?ya.alternateBounds:ya;ya=null!=za[Ba]?new ka(za[Ba],mxConstants.NONE,1):new mxLine(new mxRectangle,
+mxConstants.NONE,1,!1);ya.isDashed=wa.isDashed;ya.svgStrokeTolerance++;Ca=new mxHandle(Ca,"row-resize",null,ya);Ca.tableHandle=!0;var Za=0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Za?mxConstants.NONE:wa.stroke;if(this.shape.constructor==ka)this.shape.line=K(za[Ba],0,Za),this.shape.updateBoundsFromLine();else{var fb=T.getActualStartSize(na.cell,!0);this.shape.bounds.height=1;this.shape.bounds.y=
+this.state.y+this.state.height+Za*W;this.shape.bounds.x=na.x+(Ba==Ea.length-1?0:fb.x*W);this.shape.bounds.width=na.width-(Ba==Ea.length-1?0:fb.width+fb.x+W)}this.shape.redraw()}};var Pa=!1;Ca.setPosition=function(fb,bb,jb){Za=Math.max(Graph.minTableRowHeight-fb.height,bb.y-fb.y-fb.height);Pa=mxEvent.isShiftDown(jb.getEvent());null!=Ga&&Pa&&(Za=Math.min(Za,Ga.height-Graph.minTableRowHeight))};Ca.execute=function(fb){if(0!=Za)T.setTableRowHeight(this.state.cell,Za,!Pa);else if(!N.blockDelayedSelection){var bb=
+T.getCellAt(fb.getGraphX(),fb.getGraphY())||na.cell;T.graphHandler.selectCellForEvent(bb,fb)}Za=0};Ca.reset=function(){Za=0};y.push(Ca)})(U);for(U=0;U<Na.length;U++)mxUtils.bind(this,function(Ba){var Ca=T.view.getState(Na[Ba]),ya=T.getCellGeometry(Na[Ba]),Ga=null!=ya.alternateBounds?ya.alternateBounds:ya;null==Ca&&(Ca=new mxCellState(T.view,Na[Ba],T.getCellStyle(Na[Ba])),Ca.x=na.x+ya.x*W,Ca.y=na.y+ya.y*W,Ca.width=Ga.width*W,Ca.height=Ga.height*W,Ca.updateCachedBounds());ya=Ba<Na.length-1?Na[Ba+1]:
+null;ya=null!=ya?T.getCellGeometry(ya):null;var Za=null!=ya&&null!=ya.alternateBounds?ya.alternateBounds:ya;ya=null!=Ma[Ba]?new ka(Ma[Ba],mxConstants.NONE,1):new mxLine(new mxRectangle,mxConstants.NONE,1,!0);ya.isDashed=wa.isDashed;ya.svgStrokeTolerance++;Ca=new mxHandle(Ca,"col-resize",null,ya);Ca.tableHandle=!0;var Pa=0;Ca.shape.node.parentNode.insertBefore(Ca.shape.node,Ca.shape.node.parentNode.firstChild);Ca.redraw=function(){if(null!=this.shape){this.shape.stroke=0==Pa?mxConstants.NONE:wa.stroke;
+if(this.shape.constructor==ka)this.shape.line=K(Ma[Ba],Pa,0),this.shape.updateBoundsFromLine();else{var bb=T.getActualStartSize(na.cell,!0);this.shape.bounds.width=1;this.shape.bounds.x=this.state.x+(Ga.width+Pa)*W;this.shape.bounds.y=na.y+(Ba==Na.length-1?0:bb.y*W);this.shape.bounds.height=na.height-(Ba==Na.length-1?0:(bb.height+bb.y)*W)}this.shape.redraw()}};var fb=!1;Ca.setPosition=function(bb,jb,eb){Pa=Math.max(Graph.minTableColumnWidth-Ga.width,jb.x-bb.x-Ga.width);fb=mxEvent.isShiftDown(eb.getEvent());
+null==Za||fb||(Pa=Math.min(Pa,Za.width-Graph.minTableColumnWidth))};Ca.execute=function(bb){if(0!=Pa)T.setTableColumnWidth(this.state.cell,Pa,fb);else if(!N.blockDelayedSelection){var jb=T.getCellAt(bb.getGraphX(),bb.getGraphY())||na.cell;T.graphHandler.selectCellForEvent(jb,bb)}Pa=0};Ca.positionChanged=function(){};Ca.reset=function(){Pa=0};y.push(Ca)})(U)}}return null!=y?y.reverse():null};var S=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(y){S.apply(this,
+arguments);if(null!=this.moveHandles)for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].style.visibility=y?"":"hidden";if(null!=this.cornerHandles)for(K=0;K<this.cornerHandles.length;K++)this.cornerHandles[K].node.style.visibility=y?"":"hidden"};mxVertexHandler.prototype.refreshMoveHandles=function(){var y=this.graph.model;if(null!=this.moveHandles){for(var K=0;K<this.moveHandles.length;K++)this.moveHandles[K].parentNode.removeChild(this.moveHandles[K]);this.moveHandles=null}this.moveHandles=
+[];for(K=0;K<y.getChildCount(this.state.cell);K++)mxUtils.bind(this,function(N){if(null!=N&&y.isVertex(N.cell)){var T=mxUtils.createImage(Editor.rowMoveImage);T.style.position="absolute";T.style.cursor="pointer";T.style.width="7px";T.style.height="4px";T.style.padding="4px 2px 4px 2px";T.rowState=N;mxEvent.addGestureListeners(T,mxUtils.bind(this,function(U){this.graph.popupMenuHandler.hideMenu();this.graph.stopEditing(!1);!this.graph.isToggleEvent(U)&&this.graph.isCellSelected(N.cell)||this.graph.selectCellForEvent(N.cell,
+U);mxEvent.isPopupTrigger(U)||(this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(U),mxEvent.getClientY(U),this.graph.getSelectionCells()),this.graph.graphHandler.cellWasClicked=!0,this.graph.isMouseTrigger=mxEvent.isMouseEvent(U),this.graph.isMouseDown=!0);mxEvent.consume(U)}),null,mxUtils.bind(this,function(U){mxEvent.isPopupTrigger(U)&&(this.graph.popupMenuHandler.popup(mxEvent.getClientX(U),mxEvent.getClientY(U),N.cell,U),mxEvent.consume(U))}));this.moveHandles.push(T);this.graph.container.appendChild(T)}})(this.graph.view.getState(y.getChildAt(this.state.cell,
+K)))};mxVertexHandler.prototype.refresh=function(){if(null!=this.customHandles){for(var y=0;y<this.customHandles.length;y++)this.customHandles[y].destroy();this.customHandles=this.createCustomHandles()}this.graph.isTable(this.state.cell)&&this.refreshMoveHandles()};var ja=mxVertexHandler.prototype.getHandlePadding;mxVertexHandler.prototype.getHandlePadding=function(){var y=new mxPoint(0,0),K=this.tolerance,N=this.state.style.shape;null==mxCellRenderer.defaultShapes[N]&&mxStencilRegistry.getStencil(N);
+N=this.graph.isTable(this.state.cell)||this.graph.cellEditor.getEditingCell()==this.state.cell;if(!N&&null!=this.customHandles)for(var T=0;T<this.customHandles.length;T++)if(null!=this.customHandles[T].shape&&null!=this.customHandles[T].shape.bounds){var U=this.customHandles[T].shape.bounds,W=U.getCenterX(),na=U.getCenterY();if(Math.abs(this.state.x-W)<U.width/2||Math.abs(this.state.y-na)<U.height/2||Math.abs(this.state.x+this.state.width-W)<U.width/2||Math.abs(this.state.y+this.state.height-na)<
+U.height/2){N=!0;break}}N&&null!=this.sizers&&0<this.sizers.length&&null!=this.sizers[0]?(K/=2,this.graph.isTable(this.state.cell)&&(K+=7),y.x=this.sizers[0].bounds.width+K,y.y=this.sizers[0].bounds.height+K):y=ja.apply(this,arguments);return y};mxVertexHandler.prototype.updateHint=function(y){if(this.index!=mxEvent.LABEL_HANDLE){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));if(this.index==mxEvent.ROTATION_HANDLE)this.hint.innerHTML=this.currentAlpha+"&deg;";
+else{y=this.state.view.scale;var K=this.state.view.unit;this.hint.innerHTML=e(this.roundLength(this.bounds.width/y),K)+" x "+e(this.roundLength(this.bounds.height/y),K)}y=mxUtils.getBoundingBox(this.bounds,null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0");null==y&&(y=this.bounds);this.hint.style.left=y.x+Math.round((y.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=y.y+y.height+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display=
+"none")}};mxVertexHandler.prototype.removeHint=function(){mxGraphHandler.prototype.removeHint.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.display="")};var ma=mxEdgeHandler.prototype.mouseMove;mxEdgeHandler.prototype.mouseMove=function(y,K){ma.apply(this,arguments);null!=this.linkHint&&"none"!=this.linkHint.style.display&&null!=this.graph.graphHandler&&null!=this.graph.graphHandler.first&&(this.linkHint.style.display="none")};var u=mxEdgeHandler.prototype.mouseUp;mxEdgeHandler.prototype.mouseUp=
+function(y,K){u.apply(this,arguments);null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="")};mxEdgeHandler.prototype.updateHint=function(y,K){null==this.hint&&(this.hint=b(),this.state.view.graph.container.appendChild(this.hint));var N=this.graph.view.translate,T=this.graph.view.scale,U=this.roundLength(K.x/T-N.x);N=this.roundLength(K.y/T-N.y);T=this.graph.view.unit;this.hint.innerHTML=e(U,T)+", "+e(N,T);this.hint.style.visibility="visible";if(this.isSource||this.isTarget)null!=
+this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?(U=this.constraintHandler.currentConstraint.point,this.hint.innerHTML="["+Math.round(100*U.x)+"%, "+Math.round(100*U.y)+"%]"):this.marker.hasValidState()&&(this.hint.style.visibility="hidden");this.hint.style.left=Math.round(y.getGraphX()-this.hint.clientWidth/2)+"px";this.hint.style.top=Math.max(y.getGraphY(),K.y)+Editor.hintOffset+"px";null!=this.linkHint&&(this.linkHint.style.display="none")};Graph.prototype.expandedImage=
+Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="50%" y1="0%" x2="50%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 2 4.5 L 7 4.5 z" stroke="#000"/>');Graph.prototype.collapsedImage=Graph.createSvgImage(9,9,'<defs><linearGradient id="grad1" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="30%" style="stop-color:#f0f0f0;" /><stop offset="100%" style="stop-color:#AFB0B6;" /></linearGradient></defs><rect x="0" y="0" width="9" height="9" stroke="#8A94A5" fill="url(#grad1)" stroke-width="2"/><path d="M 4.5 2 L 4.5 7 M 2 4.5 L 7 4.5 z" stroke="#000"/>');
+mxEdgeHandler.prototype.removeHint=mxVertexHandler.prototype.removeHint;HoverIcons.prototype.mainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="5" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.endMainHandle=Graph.createSvgImage(18,18,'<circle cx="9" cy="9" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/>');HoverIcons.prototype.secondaryHandle=Graph.createSvgImage(16,16,'<path d="m 8 3 L 13 8 L 8 13 L 3 8 z" stroke="#fff" fill="#fca000"/>');
+HoverIcons.prototype.fixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.endFixedHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="#01bd22"/><path d="m 8 8 L 14 14M 8 14 L 14 8" stroke="#fff"/>');HoverIcons.prototype.terminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="6" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+
+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.endTerminalHandle=Graph.createSvgImage(22,22,'<circle cx="11" cy="11" r="7" stroke="#fff" fill="'+HoverIcons.prototype.arrowFill+'"/><circle cx="11" cy="11" r="3" stroke="#fff" fill="transparent"/>');HoverIcons.prototype.rotationHandle=Graph.createSvgImage(16,16,'<path stroke="'+HoverIcons.prototype.arrowFill+'" fill="'+HoverIcons.prototype.arrowFill+'" d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"/>',
24,24);mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="'+HoverIcons.prototype.arrowFill+'"/>');mxVertexHandler.TABLE_HANDLE_COLOR="#fca000";mxVertexHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;mxVertexHandler.prototype.secondaryHandleImage=HoverIcons.prototype.secondaryHandle;mxEdgeHandler.prototype.handleImage=HoverIcons.prototype.mainHandle;
mxEdgeHandler.prototype.endHandleImage=HoverIcons.prototype.endMainHandle;mxEdgeHandler.prototype.terminalHandleImage=HoverIcons.prototype.terminalHandle;mxEdgeHandler.prototype.endTerminalHandleImage=HoverIcons.prototype.endTerminalHandle;mxEdgeHandler.prototype.fixedHandleImage=HoverIcons.prototype.fixedHandle;mxEdgeHandler.prototype.endFixedHandleImage=HoverIcons.prototype.endFixedHandle;mxEdgeHandler.prototype.labelHandleImage=HoverIcons.prototype.secondaryHandle;mxOutline.prototype.sizerImage=
HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangleUp=HoverIcons.prototype.triangleUp,Sidebar.prototype.triangleRight=HoverIcons.prototype.triangleRight,Sidebar.prototype.triangleDown=HoverIcons.prototype.triangleDown,Sidebar.prototype.triangleLeft=HoverIcons.prototype.triangleLeft,Sidebar.prototype.refreshTarget=HoverIcons.prototype.refreshTarget,Sidebar.prototype.roundDrop=HoverIcons.prototype.roundDrop);mxVertexHandler.prototype.rotationEnabled=!0;mxVertexHandler.prototype.manageSizers=
@@ -2638,368 +2652,368 @@ HoverIcons.prototype.mainHandle;null!=window.Sidebar&&(Sidebar.prototype.triangl
!0;mxEdgeHandler.prototype.manageLabelHandle=!0;mxEdgeHandler.prototype.outlineConnect=!0;mxEdgeHandler.prototype.isAddVirtualBendEvent=function(y){return!mxEvent.isShiftDown(y.getEvent())};mxEdgeHandler.prototype.isCustomHandleEvent=function(y){return!mxEvent.isShiftDown(y.getEvent())};if(Graph.touchStyle){if(mxClient.IS_TOUCH||0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)mxShape.prototype.svgStrokeTolerance=18,mxVertexHandler.prototype.tolerance=12,mxEdgeHandler.prototype.tolerance=
12,Graph.prototype.tolerance=12,mxVertexHandler.prototype.rotationHandleVSpacing=-16,mxConstraintHandler.prototype.getTolerance=function(y){return mxEvent.isMouseEvent(y.getEvent())?4:this.graph.getTolerance()};mxPanningHandler.prototype.isPanningTrigger=function(y){var K=y.getEvent();return null==y.getState()&&!mxEvent.isMouseEvent(K)||mxEvent.isPopupTrigger(K)&&(null==y.getState()||mxEvent.isControlDown(K)||mxEvent.isShiftDown(K))};var H=mxGraphHandler.prototype.mouseDown;mxGraphHandler.prototype.mouseDown=
function(y,K){H.apply(this,arguments);mxEvent.isTouchEvent(K.getEvent())&&this.graph.isCellSelected(K.getCell())&&1<this.graph.getSelectionCount()&&(this.delayedSelection=!1)}}else mxPanningHandler.prototype.isPanningTrigger=function(y){var K=y.getEvent();return mxEvent.isLeftMouseButton(K)&&(this.useLeftButtonForPanning&&null==y.getState()||mxEvent.isControlDown(K)&&!mxEvent.isShiftDown(K))||this.usePopupTrigger&&mxEvent.isPopupTrigger(K)};mxRubberband.prototype.isSpaceEvent=function(y){return this.graph.isEnabled()&&
-!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,K){if(this.cancelled)this.cancelled=!1,K.consume();else{var L=null!=this.div&&"none"!=this.div.style.display,S=null,V=null,ja=y=null;
-null!=this.first&&null!=this.currentX&&null!=this.currentY&&(S=this.first.x,V=this.first.y,y=(this.currentX-S)/this.graph.view.scale,ja=(this.currentY-V)/this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(y=this.graph.snap(y),ja=this.graph.snap(ja),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=0),Math.abs(ja)<this.graph.tolerance&&(ja=0))));this.reset();if(L){if(this.isSpaceEvent(K)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(S,V,this.graph.getDefaultParent(),
-!0,!0);for(L=0;L<na.length;L++)if(this.graph.isCellMovable(na[L])){var ya=this.graph.view.getState(na[L]),ra=this.graph.getCellGeometry(na[L]);null!=ya&&null!=ra&&(ra=ra.clone(),ra.translate(y,ja),this.graph.model.setGeometry(na[L],ra))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,K.getEvent());K.consume()}}};mxRubberband.prototype.mouseMove=function(y,K){if(!K.isConsumed()&&null!=this.first){var L=mxUtils.getScrollOrigin(this.graph.container);
-y=mxUtils.getOffset(this.graph.container);L.x-=y.x;L.y-=y.y;y=K.getX()+L.x;L=K.getY()+L.y;var S=this.first.x-y,V=this.first.y-L,ja=this.graph.tolerance;if(null!=this.div||Math.abs(S)>ja||Math.abs(V)>ja)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(y,L),this.isSpaceEvent(K)?(y=this.x+this.width,L=this.y+this.height,S=this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(this.width=this.graph.snap(this.width/S)*S,this.height=this.graph.snap(this.height/S)*S,this.graph.isGridEnabled()||
-(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=y-this.width),this.y<this.first.y&&(this.y=L-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
+!this.graph.isCellLocked(this.graph.getDefaultParent())&&(mxEvent.isControlDown(y.getEvent())||mxEvent.isMetaDown(y.getEvent()))&&mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())};mxRubberband.prototype.cancelled=!1;mxRubberband.prototype.cancel=function(){this.isActive()&&(this.cancelled=!0,this.reset())};mxRubberband.prototype.mouseUp=function(y,K){if(this.cancelled)this.cancelled=!1,K.consume();else{var N=null!=this.div&&"none"!=this.div.style.display,T=null,U=null,W=y=null;null!=
+this.first&&null!=this.currentX&&null!=this.currentY&&(T=this.first.x,U=this.first.y,y=(this.currentX-T)/this.graph.view.scale,W=(this.currentY-U)/this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(y=this.graph.snap(y),W=this.graph.snap(W),this.graph.isGridEnabled()||(Math.abs(y)<this.graph.tolerance&&(y=0),Math.abs(W)<this.graph.tolerance&&(W=0))));this.reset();if(N){if(this.isSpaceEvent(K)){this.graph.model.beginUpdate();try{var na=this.graph.getCellsBeyond(T,U,this.graph.getDefaultParent(),
+!0,!0);for(N=0;N<na.length;N++)if(this.graph.isCellMovable(na[N])){var wa=this.graph.view.getState(na[N]),ra=this.graph.getCellGeometry(na[N]);null!=wa&&null!=ra&&(ra=ra.clone(),ra.translate(y,W),this.graph.model.setGeometry(na[N],ra))}}finally{this.graph.model.endUpdate()}}else na=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(na,K.getEvent());K.consume()}}};mxRubberband.prototype.mouseMove=function(y,K){if(!K.isConsumed()&&null!=this.first){var N=mxUtils.getScrollOrigin(this.graph.container);
+y=mxUtils.getOffset(this.graph.container);N.x-=y.x;N.y-=y.y;y=K.getX()+N.x;N=K.getY()+N.y;var T=this.first.x-y,U=this.first.y-N,W=this.graph.tolerance;if(null!=this.div||Math.abs(T)>W||Math.abs(U)>W)null==this.div&&(this.div=this.createShape()),mxUtils.clearSelection(),this.update(y,N),this.isSpaceEvent(K)?(y=this.x+this.width,N=this.y+this.height,T=this.graph.view.scale,mxEvent.isAltDown(K.getEvent())||(this.width=this.graph.snap(this.width/T)*T,this.height=this.graph.snap(this.height/T)*T,this.graph.isGridEnabled()||
+(this.width<this.graph.tolerance&&(this.width=0),this.height<this.graph.tolerance&&(this.height=0)),this.x<this.first.x&&(this.x=y-this.width),this.y<this.first.y&&(this.y=N-this.height)),this.div.style.borderStyle="dashed",this.div.style.backgroundColor="white",this.div.style.left=this.x+"px",this.div.style.top=this.y+"px",this.div.style.width=Math.max(0,this.width)+"px",this.div.style.height=this.graph.container.clientHeight+"px",this.div.style.borderWidth=0>=this.width?"0px 1px 0px 0px":"0px 1px 0px 1px",
null==this.secondDiv&&(this.secondDiv=this.div.cloneNode(!0),this.div.parentNode.appendChild(this.secondDiv)),this.secondDiv.style.left=this.x+"px",this.secondDiv.style.top=this.y+"px",this.secondDiv.style.width=this.graph.container.clientWidth+"px",this.secondDiv.style.height=Math.max(0,this.height)+"px",this.secondDiv.style.borderWidth=0>=this.height?"1px 0px 0px 0px":"1px 0px 1px 0px"):(this.div.style.backgroundColor="",this.div.style.borderWidth="",this.div.style.borderStyle="",null!=this.secondDiv&&
-(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),K.consume()}};var Q=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);Q.apply(this,arguments)};var X=(new Date).getTime(),R=0,ca=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(y,K,L,S){ca.apply(this,arguments);L!=this.currentTerminalState?(X=(new Date).getTime(),
-R=0):R=(new Date).getTime()-X;this.currentTerminalState=L};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<R||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
-function(y,K,L){K=null!=y&&0==y;var S=this.state.getVisibleTerminalState(K);y=null!=y&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,S,K):null;L=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(K),y):null)?L?this.endFixedHandleImage:this.fixedHandleImage:null!=y&&null!=S?L?this.endTerminalHandleImage:this.terminalHandleImage:L?this.endHandleImage:this.handleImage;if(null!=L)return L=
-new mxImageShape(new mxRectangle(0,0,L.width,L.height),L.src),L.preserveImageAspect=!1,L;L=mxConstants.HANDLE_SIZE;this.preferHtml&&--L;return new mxRectangleShape(new mxRectangle(0,0,L,L),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var da=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(y,K,L){this.handleImage=K==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:K==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
-return da.apply(this,arguments)};var qa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(y){if(null!=y&&1==y.length){var K=this.graph.getModel(),L=K.getParent(y[0]),S=this.graph.getCellGeometry(y[0]);if(K.isEdge(L)&&null!=S&&S.relative&&(K=this.graph.view.getState(y[0]),null!=K&&2>K.width&&2>K.height&&null!=K.text&&null!=K.text.boundingBox))return mxRectangle.fromRectangle(K.text.boundingBox)}return qa.apply(this,arguments)};var va=mxGraphHandler.prototype.getGuideStates;
-mxGraphHandler.prototype.getGuideStates=function(){for(var y=va.apply(this,arguments),K=[],L=0;L<y.length;L++)"1"!=mxUtils.getValue(y[L].style,"part","0")&&K.push(y[L]);return K};var ua=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var K=this.graph.getModel(),L=K.getParent(y.cell),S=this.graph.getCellGeometry(y.cell);return K.isEdge(L)&&null!=S&&S.relative&&2>y.width&&2>y.height&&null!=y.text&&null!=y.text.boundingBox?(K=y.text.unrotatedBoundingBox||
-y.text.boundingBox,new mxRectangle(Math.round(K.x),Math.round(K.y),Math.round(K.width),Math.round(K.height))):ua.apply(this,arguments)};var Aa=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(y,K){var L=this.graph.getModel(),S=L.getParent(this.state.cell),V=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(K)==mxEvent.ROTATION_HANDLE||!L.isEdge(S)||null==V||!V.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Aa.apply(this,arguments)};
+(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null)),K.consume()}};var P=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv),this.secondDiv=null);P.apply(this,arguments)};var V=(new Date).getTime(),Q=0,da=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(y,K,N,T){da.apply(this,arguments);N!=this.currentTerminalState?(V=(new Date).getTime(),
+Q=0):Q=(new Date).getTime()-V;this.currentTerminalState=N};var ea=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(y){return mxEvent.isShiftDown(y.getEvent())&&mxEvent.isAltDown(y.getEvent())?!1:null!=this.currentTerminalState&&y.getState()==this.currentTerminalState&&2E3<Q||(null==this.currentTerminalState||"0"!=mxUtils.getValue(this.currentTerminalState.style,"outlineConnect","1"))&&ea.apply(this,arguments)};mxEdgeHandler.prototype.createHandleShape=
+function(y,K,N){K=null!=y&&0==y;var T=this.state.getVisibleTerminalState(K);y=null!=y&&(0==y||y>=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==y)?this.graph.getConnectionConstraint(this.state,T,K):null;N=null!=(null!=y?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(K),y):null)?N?this.endFixedHandleImage:this.fixedHandleImage:null!=y&&null!=T?N?this.endTerminalHandleImage:this.terminalHandleImage:N?this.endHandleImage:this.handleImage;if(null!=N)return N=
+new mxImageShape(new mxRectangle(0,0,N.width,N.height),N.src),N.preserveImageAspect=!1,N;N=mxConstants.HANDLE_SIZE;this.preferHtml&&--N;return new mxRectangleShape(new mxRectangle(0,0,N,N),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var fa=mxVertexHandler.prototype.createSizerShape;mxVertexHandler.prototype.createSizerShape=function(y,K,N){this.handleImage=K==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:K==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;
+return fa.apply(this,arguments)};var pa=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(y){if(null!=y&&1==y.length){var K=this.graph.getModel(),N=K.getParent(y[0]),T=this.graph.getCellGeometry(y[0]);if(K.isEdge(N)&&null!=T&&T.relative&&(K=this.graph.view.getState(y[0]),null!=K&&2>K.width&&2>K.height&&null!=K.text&&null!=K.text.boundingBox))return mxRectangle.fromRectangle(K.text.boundingBox)}return pa.apply(this,arguments)};var ua=mxGraphHandler.prototype.getGuideStates;
+mxGraphHandler.prototype.getGuideStates=function(){for(var y=ua.apply(this,arguments),K=[],N=0;N<y.length;N++)"1"!=mxUtils.getValue(y[N].style,"part","0")&&K.push(y[N]);return K};var qa=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(y){var K=this.graph.getModel(),N=K.getParent(y.cell),T=this.graph.getCellGeometry(y.cell);return K.isEdge(N)&&null!=T&&T.relative&&2>y.width&&2>y.height&&null!=y.text&&null!=y.text.boundingBox?(K=y.text.unrotatedBoundingBox||
+y.text.boundingBox,new mxRectangle(Math.round(K.x),Math.round(K.y),Math.round(K.width),Math.round(K.height))):qa.apply(this,arguments)};var Da=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(y,K){var N=this.graph.getModel(),T=N.getParent(this.state.cell),U=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(K)==mxEvent.ROTATION_HANDLE||!N.isEdge(T)||null==U||!U.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&Da.apply(this,arguments)};
mxVertexHandler.prototype.rotateClick=function(){var y=mxUtils.getValue(this.state.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),K=mxUtils.getValue(this.state.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE);this.state.view.graph.model.isVertex(this.state.cell)&&y==mxConstants.NONE&&K==mxConstants.NONE?(y=mxUtils.mod(mxUtils.getValue(this.state.style,mxConstants.STYLE_ROTATION,0)+90,360),this.state.view.graph.setCellStyles(mxConstants.STYLE_ROTATION,y,[this.state.cell])):this.state.view.graph.turnShapes([this.state.cell])};
-var za=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,K){za.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Ca=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(y,K){Ca.apply(this,arguments);null!=this.rotationShape&&null!=
-this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var sa=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){sa.apply(this,arguments);var y=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
-else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var K=0;4>K;K++){var L=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);L.dialect=mxConstants.DIALECT_SVG;L.init(this.graph.view.getOverlayPane());this.cornerHandles.push(L)}}var S=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
-this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(V,ja){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));S()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(V,ja){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
-K=this.graph.getLinkForCell(this.state.cell);L=this.graph.getLinksForState(this.state);this.updateLinkHint(K,L);if(null!=K||null!=L&&0<L.length)y=!0;y&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(y,K){try{if(null==y&&(null==K||0==K.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=y||null!=K&&0<K.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
-"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=y&&(this.linkHint.appendChild(this.graph.createLinkForHint(y)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var L=document.createElement("img");L.setAttribute("src",Editor.editImage);L.setAttribute("title",
-mxResources.get("editLink"));L.setAttribute("width","11");L.setAttribute("height","11");L.style.marginLeft="10px";L.style.marginBottom="-1px";L.style.cursor="pointer";Editor.isDarkMode()&&(L.style.filter="invert(100%)");this.linkHint.appendChild(L);mxEvent.addListener(L,"click",mxUtils.bind(this,function(ja){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(ja)}));var S=L.cloneNode(!0);S.setAttribute("src",Editor.trashImage);S.setAttribute("title",mxResources.get("removeIt",
-[mxResources.get("link")]));S.style.marginLeft="4px";this.linkHint.appendChild(S);mxEvent.addListener(S,"click",mxUtils.bind(this,function(ja){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(ja)}))}if(null!=K)for(L=0;L<K.length;L++){var V=document.createElement("div");V.style.marginTop=null!=y||0<L?"6px":"0px";V.appendChild(this.graph.createLinkForHint(K[L].getAttribute("href"),mxUtils.getTextContent(K[L])));this.linkHint.appendChild(V)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(ja){}};
-mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Va=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Va.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var y=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
-this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(S,V){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));y();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var K=this.graph.getLinkForCell(this.state.cell),L=this.graph.getLinksForState(this.state);if(null!=
-K||null!=L&&0<L.length)this.updateLinkHint(K,L),this.redrawHandles()};var Ua=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ua.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Ra=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var y=0;y<this.moveHandles.length;y++)this.moveHandles[y].style.left=this.moveHandles[y].rowState.x+
-this.moveHandles[y].rowState.width-5+"px",this.moveHandles[y].style.top=this.moveHandles[y].rowState.y+this.moveHandles[y].rowState.height/2-6+"px";if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var K=this.cornerHandles,L=K[0].bounds.height/2;K[0].bounds.x=this.state.x-K[0].bounds.width/2+y;K[0].bounds.y=this.state.y-L+y;K[0].redraw();K[1].bounds.x=K[0].bounds.x+this.state.width-2*y;K[1].bounds.y=K[0].bounds.y;K[1].redraw();K[2].bounds.x=K[0].bounds.x;K[2].bounds.y=this.state.y+this.state.height-
-2*y;K[2].redraw();K[3].bounds.x=K[1].bounds.x;K[3].bounds.y=K[2].bounds.y;K[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Ra.apply(this);null!=this.state&&null!=this.linkHint&&(y=new mxPoint(this.state.getCenterX(),
-this.state.getCenterY()),K=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),L=mxUtils.getBoundingBox(K,this.state.style[mxConstants.STYLE_ROTATION]||"0",y),y=null!=L?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,K=null!=this.state.text?this.state.text.boundingBox:null,null==L&&(L=this.state),L=L.y+L.height,null!=K&&(L=Math.max(L,K.y+K.height)),this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/
-2))+"px",this.linkHint.style.top=Math.round(L+this.verticalOffset/2+Editor.hintOffset)+"px")};var Za=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Za.apply(this,arguments);if(null!=this.moveHandles){for(var y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&null!=this.moveHandles[y].parentNode&&this.moveHandles[y].parentNode.removeChild(this.moveHandles[y]);this.moveHandles=null}if(null!=this.cornerHandles){for(y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&&
+var Aa=mxVertexHandler.prototype.mouseMove;mxVertexHandler.prototype.mouseMove=function(y,K){Aa.apply(this,arguments);null!=this.graph.graphHandler.first&&(null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display="none"),null!=this.linkHint&&"none"!=this.linkHint.style.display&&(this.linkHint.style.display="none"))};var Fa=mxVertexHandler.prototype.mouseUp;mxVertexHandler.prototype.mouseUp=function(y,K){Fa.apply(this,arguments);null!=this.rotationShape&&null!=
+this.rotationShape.node&&(this.rotationShape.node.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.linkHint&&"none"==this.linkHint.style.display&&(this.linkHint.style.display="");this.blockDelayedSelection=null};var ta=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ta.apply(this,arguments);var y=!1;null!=this.rotationShape&&this.rotationShape.node.setAttribute("title",mxResources.get("rotateTooltip"));if(this.graph.isTable(this.state.cell))this.refreshMoveHandles();
+else if(1==this.graph.getSelectionCount()&&(this.graph.isTableCell(this.state.cell)||this.graph.isTableRow(this.state.cell))){this.cornerHandles=[];for(var K=0;4>K;K++){var N=new mxRectangleShape(new mxRectangle(0,0,6,6),"#ffffff",mxConstants.HANDLE_STROKECOLOR);N.dialect=mxConstants.DIALECT_SVG;N.init(this.graph.view.getOverlayPane());this.cornerHandles.push(N)}}var T=mxUtils.bind(this,function(){null!=this.specialHandle&&(this.specialHandle.node.style.display=this.graph.isEnabled()&&this.graph.getSelectionCount()<
+this.graph.graphHandler.maxCells?"":"none");this.redrawHandles()});this.changeHandler=mxUtils.bind(this,function(U,W){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));T()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.editingHandler=mxUtils.bind(this,function(U,W){this.redrawHandles()});this.graph.addListener(mxEvent.EDITING_STOPPED,this.editingHandler);
+K=this.graph.getLinkForCell(this.state.cell);N=this.graph.getLinksForState(this.state);this.updateLinkHint(K,N);if(null!=K||null!=N&&0<N.length)y=!0;y&&this.redrawHandles()};mxVertexHandler.prototype.updateLinkHint=function(y,K){try{if(null==y&&(null==K||0==K.length)||1<this.graph.getSelectionCount())null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);else if(null!=y||null!=K&&0<K.length){null==this.linkHint&&(this.linkHint=b(),this.linkHint.style.padding=
+"6px 8px 6px 8px",this.linkHint.style.opacity="1",this.linkHint.style.filter="",this.graph.container.appendChild(this.linkHint),mxEvent.addListener(this.linkHint,"mouseenter",mxUtils.bind(this,function(){this.graph.tooltipHandler.hide()})));this.linkHint.innerText="";if(null!=y&&(this.linkHint.appendChild(this.graph.createLinkForHint(y)),this.graph.isEnabled()&&"function"===typeof this.graph.editLink)){var N=document.createElement("img");N.setAttribute("src",Editor.editImage);N.setAttribute("title",
+mxResources.get("editLink"));N.setAttribute("width","11");N.setAttribute("height","11");N.style.marginLeft="10px";N.style.marginBottom="-1px";N.style.cursor="pointer";Editor.isDarkMode()&&(N.style.filter="invert(100%)");this.linkHint.appendChild(N);mxEvent.addListener(N,"click",mxUtils.bind(this,function(W){this.graph.setSelectionCell(this.state.cell);this.graph.editLink();mxEvent.consume(W)}));var T=N.cloneNode(!0);T.setAttribute("src",Editor.trashImage);T.setAttribute("title",mxResources.get("removeIt",
+[mxResources.get("link")]));T.style.marginLeft="4px";this.linkHint.appendChild(T);mxEvent.addListener(T,"click",mxUtils.bind(this,function(W){this.graph.setLinkForCell(this.state.cell,null);mxEvent.consume(W)}))}if(null!=K)for(N=0;N<K.length;N++){var U=document.createElement("div");U.style.marginTop=null!=y||0<N?"6px":"0px";U.appendChild(this.graph.createLinkForHint(K[N].getAttribute("href"),mxUtils.getTextContent(K[N])));this.linkHint.appendChild(U)}}null!=this.linkHint&&Graph.sanitizeNode(this.linkHint)}catch(W){}};
+mxEdgeHandler.prototype.updateLinkHint=mxVertexHandler.prototype.updateLinkHint;var Sa=mxEdgeHandler.prototype.init;mxEdgeHandler.prototype.init=function(){Sa.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.state.view.graph.connectionHandler.isEnabled()});var y=mxUtils.bind(this,function(){null!=this.linkHint&&(this.linkHint.style.display=1==this.graph.getSelectionCount()?"":"none");null!=this.labelShape&&(this.labelShape.node.style.display=this.graph.isEnabled()&&
+this.graph.getSelectionCount()<this.graph.graphHandler.maxCells?"":"none")});this.changeHandler=mxUtils.bind(this,function(T,U){this.updateLinkHint(this.graph.getLinkForCell(this.state.cell),this.graph.getLinksForState(this.state));y();this.redrawHandles()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);var K=this.graph.getLinkForCell(this.state.cell),N=this.graph.getLinksForState(this.state);if(null!=
+K||null!=N&&0<N.length)this.updateLinkHint(K,N),this.redrawHandles()};var Ra=mxConnectionHandler.prototype.init;mxConnectionHandler.prototype.init=function(){Ra.apply(this,arguments);this.constraintHandler.isEnabled=mxUtils.bind(this,function(){return this.graph.connectionHandler.isEnabled()})};var Oa=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=function(){if(null!=this.moveHandles)for(var y=0;y<this.moveHandles.length;y++)this.moveHandles[y].style.left=this.moveHandles[y].rowState.x+
+this.moveHandles[y].rowState.width-5+"px",this.moveHandles[y].style.top=this.moveHandles[y].rowState.y+this.moveHandles[y].rowState.height/2-6+"px";if(null!=this.cornerHandles){y=this.getSelectionBorderInset();var K=this.cornerHandles,N=K[0].bounds.height/2;K[0].bounds.x=this.state.x-K[0].bounds.width/2+y;K[0].bounds.y=this.state.y-N+y;K[0].redraw();K[1].bounds.x=K[0].bounds.x+this.state.width-2*y;K[1].bounds.y=K[0].bounds.y;K[1].redraw();K[2].bounds.x=K[0].bounds.x;K[2].bounds.y=this.state.y+this.state.height-
+2*y;K[2].redraw();K[3].bounds.x=K[1].bounds.x;K[3].bounds.y=K[2].bounds.y;K[3].redraw();for(y=0;y<this.cornerHandles.length;y++)this.cornerHandles[y].node.style.display=1==this.graph.getSelectionCount()?"":"none"}null!=this.rotationShape&&null!=this.rotationShape.node&&(this.rotationShape.node.style.display=null!=this.moveHandles||1!=this.graph.getSelectionCount()||null!=this.index&&this.index!=mxEvent.ROTATION_HANDLE?"none":"");Oa.apply(this);null!=this.state&&null!=this.linkHint&&(y=new mxPoint(this.state.getCenterX(),
+this.state.getCenterY()),K=new mxRectangle(this.state.x,this.state.y-22,this.state.width+24,this.state.height+22),N=mxUtils.getBoundingBox(K,this.state.style[mxConstants.STYLE_ROTATION]||"0",y),y=null!=N?mxUtils.getBoundingBox(this.state,this.state.style[mxConstants.STYLE_ROTATION]||"0"):this.state,K=null!=this.state.text?this.state.text.boundingBox:null,null==N&&(N=this.state),N=N.y+N.height,null!=K&&(N=Math.max(N,K.y+K.height)),this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/
+2))+"px",this.linkHint.style.top=Math.round(N+this.verticalOffset/2+Editor.hintOffset)+"px")};var Va=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=function(){Va.apply(this,arguments);if(null!=this.moveHandles){for(var y=0;y<this.moveHandles.length;y++)null!=this.moveHandles[y]&&null!=this.moveHandles[y].parentNode&&this.moveHandles[y].parentNode.removeChild(this.moveHandles[y]);this.moveHandles=null}if(null!=this.cornerHandles){for(y=0;y<this.cornerHandles.length;y++)null!=this.cornerHandles[y]&&
null!=this.cornerHandles[y].node&&null!=this.cornerHandles[y].node.parentNode&&this.cornerHandles[y].node.parentNode.removeChild(this.cornerHandles[y].node);this.cornerHandles=null}null!=this.linkHint&&(null!=this.linkHint.parentNode&&this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getSelectionModel().removeListener(this.changeHandler),this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null);null!=this.editingHandler&&
-(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ha=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ha.apply(this),null!=this.state&&null!=this.linkHint)){var y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
-Math.round(y.y+y.height+Editor.hintOffset)+"px"}};var db=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){db.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var cb=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){cb.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
-this.changeHandler=null)}}();(function(){function b(c,l,x){mxShape.call(this);this.line=c;this.stroke=l;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function E(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function m(){mxShape.call(this)}function q(){mxShape.call(this)}
-function z(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function G(){mxActor.call(this)}function Z(){mxActor.call(this)}function fa(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function pa(){mxActor.call(this)}function O(){mxActor.call(this)}function W(c,l){this.canvas=c;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");
-this.defaultVariation=l;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,W.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,W.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,W.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,W.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=mxUtils.bind(this,W.prototype.curveTo);
-this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,W.prototype.arcTo)}function ha(){mxRectangleShape.call(this)}function U(){mxRectangleShape.call(this)}function ma(){mxActor.call(this)}function T(){mxActor.call(this)}function M(){mxActor.call(this)}function ia(){mxRectangleShape.call(this)}function N(){mxRectangleShape.call(this)}function P(){mxCylinder.call(this)}function aa(){mxShape.call(this)}function la(){mxShape.call(this)}function u(){mxEllipse.call(this)}function H(){mxShape.call(this)}
-function Q(){mxShape.call(this)}function X(){mxRectangleShape.call(this)}function R(){mxShape.call(this)}function ca(){mxShape.call(this)}function ea(){mxShape.call(this)}function da(){mxShape.call(this)}function qa(){mxShape.call(this)}function va(){mxCylinder.call(this)}function ua(){mxCylinder.call(this)}function Aa(){mxRectangleShape.call(this)}function za(){mxDoubleEllipse.call(this)}function Ca(){mxDoubleEllipse.call(this)}function sa(){mxArrowConnector.call(this);this.spacing=0}function Va(){mxArrowConnector.call(this);
-this.spacing=0}function Ua(){mxActor.call(this)}function Ra(){mxRectangleShape.call(this)}function Za(){mxActor.call(this)}function Ha(){mxActor.call(this)}function db(){mxActor.call(this)}function cb(){mxActor.call(this)}function y(){mxActor.call(this)}function K(){mxActor.call(this)}function L(){mxActor.call(this)}function S(){mxActor.call(this)}function V(){mxActor.call(this)}function ja(){mxActor.call(this)}function na(){mxEllipse.call(this)}function ya(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}
-function ta(){mxRhombus.call(this)}function Da(){mxEllipse.call(this)}function Oa(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function Wa(){mxEllipse.call(this)}function Sa(){mxActor.call(this)}function Fa(){mxActor.call(this)}function Ja(){mxActor.call(this)}function xa(c,l,x,p){mxShape.call(this);this.bounds=c;this.fill=l;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=!0;this.indent=2;this.rectOutline="single"}function Ba(){mxConnector.call(this)}
-function Pa(c,l,x,p,v,A,B,ka,J,wa){B+=J;var oa=p.clone();p.x-=v*(2*B+J);p.y-=A*(2*B+J);v*=B+J;A*=B+J;return function(){c.ellipse(oa.x-v-B,oa.y-A-B,2*B,2*B);wa?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var l=0;l<this.line.length;l++){var x=this.line[l];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=
-function(c,l,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,l,x,p){if(null!=l){var v=null;c.begin();for(var A=0;A<l.length;A++){var B=l[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var l=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,p=0;p<this.line.length&&!l;p++){var v=this.line[p];null!=v&&null!=x&&(l=mxUtils.rectangleIntersectsSegment(c,
-x,v));x=v}return l};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,l,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):!1,B=this.isHorizontal(),ka=this.getTitleSize();0==ka||this.outline?Ma.prototype.paintVertexShape.apply(this,
-arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-l,-x));A||this.outline||!(B&&ka<v||!B&&ka<p)||this.paintForeground(c,l,x,p,v)};e.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ka=A;A=B;B=ka}c.rotate(-this.getShapeRotation(),A,B,l+p/2,x+v/2);s=this.scale;l=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/
-s;this.paintTableForeground(c,l,x,p,v)}};e.prototype.paintTableForeground=function(c,l,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],l,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",
-e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ka=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"darkOpacity2",this.darkOpacity2))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),c.lineTo(A,A),c.close(),c.fill()),0!=ka&&(c.setFillAlpha(Math.abs(ka)),c.setFillColor(0>ka?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,
-A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",n);var Ka=Math.tan(mxUtils.toRadians(30)),Na=(.5-Ka)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,
-mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,l,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(l+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=20;t.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/Ka);c.translate((p-l)/2,(v-l)/2+l/4);c.moveTo(0,
-.25*l);c.lineTo(.5*l,l*Na);c.lineTo(l,.25*l);c.lineTo(.5*l,(.5-Na)*l);c.lineTo(0,.25*l);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(p,v/(.5+Ka));A?(c.moveTo(0,.25*l),c.lineTo(.5*l,(.5-Na)*l),c.lineTo(l,.25*l),c.moveTo(.5*l,(.5-Na)*l),c.lineTo(.5*l,(1-Na)*l)):(c.translate((p-l)/2,(v-l)/2),c.moveTo(0,.25*l),c.lineTo(.5*l,l*Na),c.lineTo(l,.25*l),c.lineTo(l,.75*l),c.lineTo(.5*
-l,(1-Na)*l),c.lineTo(0,.75*l),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,l,x,p,v,A){l=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,l/2),c.moveTo(0,l),c.curveTo(0,2*l,p,2*l,p,l),A||(c.stroke(),c.begin()),c.translate(0,
--l);A||(c.moveTo(0,l),c.curveTo(0,-l/3,p,-l/3,p,l),c.lineTo(p,v-l),c.curveTo(p,v+l/3,0,v+l/3,0,v-l),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",
-this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(l,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),
-c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,0)}return null};mxUtils.extend(m,mxShape);m.prototype.isoAngle=15;m.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,
-"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(p*Math.tan(A),.5*v);c.translate(l,x);c.begin();c.moveTo(.5*p,0);c.lineTo(p,A);c.lineTo(p,v-A);c.lineTo(.5*p,v);c.lineTo(0,v-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*p,2*A);c.lineTo(p,A);c.moveTo(.5*p,2*A);c.lineTo(.5*p,v);c.stroke()};mxCellRenderer.registerShape("isoCube2",m);mxUtils.extend(q,mxShape);q.prototype.size=15;q.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*
-v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(z,mxCylinder);z.prototype.size=
-15;z.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(l,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),
-B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",z);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;
-C.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ka=mxUtils.getValue(this.style,"absoluteArcSize",!1),J=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));ka||(J*=Math.min(p,v));
-J=Math.min(J,.5*p,.5*(v-x));l=Math.max(l,J);l=Math.min(p-J,l);B||(J=0);c.begin();"left"==A?(c.moveTo(Math.max(J,0),x),c.lineTo(Math.max(J,0),0),c.lineTo(l,0),c.lineTo(l,x)):(c.moveTo(p-l,x),c.lineTo(p-l,0),c.lineTo(p-Math.max(J,0),0),c.lineTo(p-Math.max(J,0),x));B?(c.moveTo(0,J+x),c.arcTo(J,J,0,0,1,J,x),c.lineTo(p-J,x),c.arcTo(J,J,0,0,1,p,J+x),c.lineTo(p,v-J),c.arcTo(J,J,0,0,1,p-J,v),c.lineTo(J,v),c.arcTo(J,J,0,0,1,0,v-J)):(c.moveTo(0,x),c.lineTo(p,x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();
-c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-
-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};mxUtils.extend(I,mxCylinder);I.prototype.arcSize=.1;I.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);l=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(l*=Math.min(p,v));l=Math.min(l,.5*p,.5*v);A||(l=0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,
-l);c.arcTo(l,l,0,0,1,A+l,0);c.lineTo(p-l,0);c.arcTo(l,l,0,0,1,p,l);c.lineTo(p,v-l);c.arcTo(l,l,0,0,1,p-l,v);c.lineTo(A+l,v);c.arcTo(l,l,0,0,1,A,v-l);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke()):"connPointRefExit"==
-x&&(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*v-5),c.lineTo(15,.5*v+5),c.moveTo(15,.5*v-5),c.lineTo(5,.5*v+5),c.stroke())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.isRoundable=function(){return!0};G.prototype.redrawPath=
-function(c,l,x,p,v){l=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(Z,mxActor);Z.prototype.size=.4;Z.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));c.moveTo(0,l/2);c.quadTo(p/4,1.4*l,p/2,l/2);c.quadTo(3*p/4,l*(1-1.4),p,l/2);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};Z.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return l*=
-p,new mxRectangle(c.x,c.y+l,x,p-2*l);l*=x;return new mxRectangle(c.x+l,c.y,x-2*l,p)}return c};mxCellRenderer.registerShape("tape",Z);mxUtils.extend(fa,mxActor);fa.prototype.size=.3;fa.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};fa.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,
-0);c.lineTo(p,0);c.lineTo(p,v-l/2);c.quadTo(3*p/4,v-1.4*l,p/2,v-l/2);c.quadTo(p/4,v-l*(1-1.4),0,v-l/2);c.lineTo(0,l/2);c.close();c.end()};mxCellRenderer.registerShape("document",fa);var hb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,l,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):hb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=2*mxUtils.getValue(this.style,
-"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*l),0,0)}return null};z.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(l/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*l*this.scale),0,Math.max(0,.3*l*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var l=mxUtils.getValue(this.style,
-"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;l=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-l));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",
-this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-l)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-l))}return new mxRectangle(0,Math.min(c.height,l),0,0)}return null};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
-"boundedLbl",!1)){var l=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,l*this.scale),0,Math.max(0,l*this.scale))}return null};mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.prototype.fixedSize=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
-"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p,0),new mxPoint(p-l,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",ba);mxUtils.extend(Y,mxActor);Y.prototype.size=.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*
-p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(pa,mxActor);pa.prototype.size=.5;pa.prototype.redrawPath=function(c,l,x,p,v){c.setFillColor(null);
-l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(l,0),new mxPoint(l,v/2),new mxPoint(0,v/2),new mxPoint(l,v/2),new mxPoint(l,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",pa);mxUtils.extend(O,mxActor);O.prototype.redrawPath=function(c,l,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);
-l=p/5;c.rect(0,0,l,v);c.fillAndStroke();c.rect(2*l,0,l,v);c.fillAndStroke();c.rect(4*l,0,l,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",O);W.prototype.moveTo=function(c,l){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;this.firstX=c;this.firstY=l};W.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,arguments));this.originalClose.apply(this.canvas,arguments)};
-W.prototype.quadTo=function(c,l,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};W.prototype.curveTo=function(c,l,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};W.prototype.arcTo=function(c,l,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};W.prototype.lineTo=function(c,l){if(null!=this.lastX&&null!=this.lastY){var x=function(oa){return"number"===typeof oa?oa?0>oa?-1:1:oa===oa?0:NaN:NaN},p=
-Math.abs(c-this.lastX),v=Math.abs(l-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=l;return}var B=Math.round(A/10),ka=this.defaultVariation;5>B&&(B=5,ka/=3);var J=x(c-this.lastX)*p/B;x=x(l-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var wa=(Math.random()-.5)*ka;this.originalLineTo.call(this.canvas,J*A+this.lastX-wa*v,x*A+this.lastY-wa*p)}this.originalLineTo.call(this.canvas,c,l)}else this.originalLineTo.apply(this.canvas,arguments);
-this.lastX=c;this.lastY=l};W.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var Qa=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){Qa.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};var mb=mxShape.prototype.afterPaint;
-mxShape.prototype.afterPaint=function(c){mb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new W(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
-mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var bb=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,l,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=W)bb.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
+(this.graph.removeListener(this.editingHandler),this.editingHandler=null)};var Ja=mxEdgeHandler.prototype.redrawHandles;mxEdgeHandler.prototype.redrawHandles=function(){if(null!=this.marker&&(Ja.apply(this),null!=this.state&&null!=this.linkHint)){var y=this.state;null!=this.state.text&&null!=this.state.text.bounds&&(y=new mxRectangle(y.x,y.y,y.width,y.height),y.add(this.state.text.bounds));this.linkHint.style.left=Math.max(0,Math.round(y.x+(y.width-this.linkHint.clientWidth)/2))+"px";this.linkHint.style.top=
+Math.round(y.y+y.height+Editor.hintOffset)+"px"}};var cb=mxEdgeHandler.prototype.reset;mxEdgeHandler.prototype.reset=function(){cb.apply(this,arguments);null!=this.linkHint&&(this.linkHint.style.visibility="")};var $a=mxEdgeHandler.prototype.destroy;mxEdgeHandler.prototype.destroy=function(){$a.apply(this,arguments);null!=this.linkHint&&(this.linkHint.parentNode.removeChild(this.linkHint),this.linkHint=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getSelectionModel().removeListener(this.changeHandler),
+this.changeHandler=null)}}();(function(){function b(c,m,x){mxShape.call(this);this.line=c;this.stroke=m;this.strokewidth=null!=x?x:1;this.updateBoundsFromLine()}function e(){mxSwimlane.call(this)}function k(){mxSwimlane.call(this)}function n(){mxCylinder.call(this)}function D(){mxCylinder.call(this)}function t(){mxActor.call(this)}function E(){mxCylinder.call(this)}function d(){mxCylinder.call(this)}function f(){mxCylinder.call(this)}function g(){mxCylinder.call(this)}function l(){mxShape.call(this)}function q(){mxShape.call(this)}
+function z(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1}function F(){mxActor.call(this)}function C(){mxCylinder.call(this)}function I(){mxCylinder.call(this)}function G(){mxActor.call(this)}function Z(){mxActor.call(this)}function ca(){mxActor.call(this)}function ba(){mxActor.call(this)}function Y(){mxActor.call(this)}function O(){mxActor.call(this)}function la(){mxActor.call(this)}function aa(c,m){this.canvas=c;this.canvas.setLineJoin("round");
+this.canvas.setLineCap("round");this.defaultVariation=m;this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,aa.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,aa.prototype.moveTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,aa.prototype.close);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,aa.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;this.canvas.curveTo=
+mxUtils.bind(this,aa.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,aa.prototype.arcTo)}function ia(){mxRectangleShape.call(this)}function X(){mxRectangleShape.call(this)}function R(){mxActor.call(this)}function sa(){mxActor.call(this)}function M(){mxActor.call(this)}function ka(){mxRectangleShape.call(this)}function L(){mxRectangleShape.call(this)}function S(){mxCylinder.call(this)}function ja(){mxShape.call(this)}function ma(){mxShape.call(this)}function u(){mxEllipse.call(this)}
+function H(){mxShape.call(this)}function P(){mxShape.call(this)}function V(){mxRectangleShape.call(this)}function Q(){mxShape.call(this)}function da(){mxShape.call(this)}function ea(){mxShape.call(this)}function fa(){mxShape.call(this)}function pa(){mxShape.call(this)}function ua(){mxCylinder.call(this)}function qa(){mxCylinder.call(this)}function Da(){mxRectangleShape.call(this)}function Aa(){mxDoubleEllipse.call(this)}function Fa(){mxDoubleEllipse.call(this)}function ta(){mxArrowConnector.call(this);
+this.spacing=0}function Sa(){mxArrowConnector.call(this);this.spacing=0}function Ra(){mxActor.call(this)}function Oa(){mxRectangleShape.call(this)}function Va(){mxActor.call(this)}function Ja(){mxActor.call(this)}function cb(){mxActor.call(this)}function $a(){mxActor.call(this)}function y(){mxActor.call(this)}function K(){mxActor.call(this)}function N(){mxActor.call(this)}function T(){mxActor.call(this)}function U(){mxActor.call(this)}function W(){mxActor.call(this)}function na(){mxEllipse.call(this)}
+function wa(){mxEllipse.call(this)}function ra(){mxEllipse.call(this)}function xa(){mxRhombus.call(this)}function Ea(){mxEllipse.call(this)}function Na(){mxEllipse.call(this)}function Ma(){mxEllipse.call(this)}function za(){mxEllipse.call(this)}function Ba(){mxActor.call(this)}function Ca(){mxActor.call(this)}function ya(){mxActor.call(this)}function Ga(c,m,x,p){mxShape.call(this);this.bounds=c;this.fill=m;this.stroke=x;this.strokewidth=null!=p?p:1;this.rectStyle="square";this.size=10;this.absoluteCornerSize=
+!0;this.indent=2;this.rectOutline="single"}function Za(){mxConnector.call(this)}function Pa(c,m,x,p,v,A,B,ha,J,va){B+=J;var oa=p.clone();p.x-=v*(2*B+J);p.y-=A*(2*B+J);v*=B+J;A*=B+J;return function(){c.ellipse(oa.x-v-B,oa.y-A-B,2*B,2*B);va?c.fillAndStroke():c.stroke()}}mxUtils.extend(b,mxShape);b.prototype.updateBoundsFromLine=function(){var c=null;if(null!=this.line)for(var m=0;m<this.line.length;m++){var x=this.line[m];null!=x&&(x=new mxRectangle(x.x,x.y,this.strokewidth,this.strokewidth),null==
+c?c=x:c.add(x))}this.bounds=null!=c?c:new mxRectangle};b.prototype.paintVertexShape=function(c,m,x,p,v){this.paintTableLine(c,this.line,0,0)};b.prototype.paintTableLine=function(c,m,x,p){if(null!=m){var v=null;c.begin();for(var A=0;A<m.length;A++){var B=m[A];null!=B&&(null==v?c.moveTo(B.x+x,B.y+p):null!=v&&c.lineTo(B.x+x,B.y+p));v=B}c.end();c.stroke()}};b.prototype.intersectsRectangle=function(c){var m=!1;if(mxShape.prototype.intersectsRectangle.apply(this,arguments)&&null!=this.line)for(var x=null,
+p=0;p<this.line.length&&!m;p++){var v=this.line[p];null!=v&&null!=x&&(m=mxUtils.rectangleIntersectsSegment(c,x,v));x=v}return m};mxCellRenderer.registerShape("tableLine",b);mxUtils.extend(e,mxSwimlane);e.prototype.getLabelBounds=function(c){return 0==this.getTitleSize()?mxShape.prototype.getLabelBounds.apply(this,arguments):mxSwimlane.prototype.getLabelBounds.apply(this,arguments)};e.prototype.paintVertexShape=function(c,m,x,p,v){var A=null!=this.state?this.state.view.graph.isCellCollapsed(this.state.cell):
+!1,B=this.isHorizontal(),ha=this.getTitleSize();0==ha||this.outline?Ma.prototype.paintVertexShape.apply(this,arguments):(mxSwimlane.prototype.paintVertexShape.apply(this,arguments),c.translate(-m,-x));A||this.outline||!(B&&ha<v||!B&&ha<p)||this.paintForeground(c,m,x,p,v)};e.prototype.paintForeground=function(c,m,x,p,v){if(null!=this.state){var A=this.flipH,B=this.flipV;if(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH){var ha=A;A=B;B=ha}c.rotate(-this.getShapeRotation(),
+A,B,m+p/2,x+v/2);s=this.scale;m=this.bounds.x/s;x=this.bounds.y/s;p=this.bounds.width/s;v=this.bounds.height/s;this.paintTableForeground(c,m,x,p,v)}};e.prototype.paintTableForeground=function(c,m,x,p,v){p=this.state.view.graph.getTableLines(this.state.cell,"0"!=mxUtils.getValue(this.state.style,"rowLines","1"),"0"!=mxUtils.getValue(this.state.style,"columnLines","1"));for(v=0;v<p.length;v++)b.prototype.paintTableLine(c,p[v],m,x)};e.prototype.configurePointerEvents=function(c){0==this.getTitleSize()?
+c.pointerEvents=!1:mxSwimlane.prototype.configurePointerEvents.apply(this,arguments)};mxCellRenderer.registerShape("table",e);mxUtils.extend(k,e);k.prototype.paintForeground=function(){};mxCellRenderer.registerShape("tableRow",k);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.darkOpacity=0;n.prototype.darkOpacity2=0;n.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,
+parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity)))),ha=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity2",this.darkOpacity2))));c.translate(m,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(A,v);c.lineTo(0,v-A);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(p-A,0),c.lineTo(p,A),
+c.lineTo(A,A),c.close(),c.fill()),0!=ha&&(c.setFillAlpha(Math.abs(ha)),c.setFillColor(0>ha?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(A,A),c.lineTo(A,v),c.lineTo(0,v-A),c.close(),c.fill()),c.begin(),c.moveTo(A,v),c.lineTo(A,A),c.lineTo(0,0),c.moveTo(A,A),c.lineTo(p,A),c.end(),c.stroke())};n.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube",
+n);var fb=Math.tan(mxUtils.toRadians(30)),bb=(.5-fb)/2;mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(D,mxCylinder);D.prototype.size=6;D.prototype.paintVertexShape=function(c,m,x,p,v){c.setFillColor(this.stroke);var A=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(m+.5*(p-A),x+.5*(v-A),A,A);c.fill();c.setFillColor(mxConstants.NONE);c.rect(m,x,p,v);c.fill()};mxCellRenderer.registerShape("waypoint",D);mxUtils.extend(t,mxActor);t.prototype.size=
+20;t.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p,v/fb);c.translate((p-m)/2,(v-m)/2+m/4);c.moveTo(0,.25*m);c.lineTo(.5*m,m*bb);c.lineTo(m,.25*m);c.lineTo(.5*m,(.5-bb)*m);c.lineTo(0,.25*m);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",t);mxUtils.extend(E,mxCylinder);E.prototype.size=20;E.prototype.redrawPath=function(c,m,x,p,v,A){m=Math.min(p,v/(.5+fb));A?(c.moveTo(0,.25*m),c.lineTo(.5*m,(.5-bb)*m),c.lineTo(m,.25*m),c.moveTo(.5*m,(.5-bb)*m),c.lineTo(.5*m,(1-bb)*m)):(c.translate((p-
+m)/2,(v-m)/2),c.moveTo(0,.25*m),c.lineTo(.5*m,m*bb),c.lineTo(m,.25*m),c.lineTo(m,.75*m),c.lineTo(.5*m,(1-bb)*m),c.lineTo(0,.75*m),c.close());c.end()};mxCellRenderer.registerShape("isoCube",E);mxUtils.extend(d,mxCylinder);d.prototype.redrawPath=function(c,m,x,p,v,A){m=Math.min(v/2,Math.round(v/8)+this.strokewidth-1);if(A&&null!=this.fill||!A&&null==this.fill)c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),
+c.begin()),c.translate(0,m/2),c.moveTo(0,m),c.curveTo(0,2*m,p,2*m,p,m),A||(c.stroke(),c.begin()),c.translate(0,-m);A||(c.moveTo(0,m),c.curveTo(0,-m/3,p,-m/3,p,m),c.lineTo(p,v-m),c.curveTo(p,v+m/3,0,v+m/3,0,v-m),c.close())};d.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",d);mxUtils.extend(f,mxCylinder);f.prototype.size=30;f.prototype.darkOpacity=0;f.prototype.paintVertexShape=
+function(c,m,x,p,v){var A=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),B=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(m,x);c.begin();c.moveTo(0,0);c.lineTo(p-A,0);c.lineTo(p,A);c.lineTo(p,v);c.lineTo(0,v);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=B&&(c.setFillAlpha(Math.abs(B)),c.setFillColor(0>B?"#FFFFFF":"#000000"),c.begin(),c.moveTo(p-A,0),c.lineTo(p-
+A,A),c.lineTo(p,A),c.close(),c.fill()),c.begin(),c.moveTo(p-A,0),c.lineTo(p-A,A),c.lineTo(p,A),c.end(),c.stroke())};mxCellRenderer.registerShape("note",f);mxUtils.extend(g,f);mxCellRenderer.registerShape("note2",g);g.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,0)}return null};mxUtils.extend(l,mxShape);l.prototype.isoAngle=15;l.prototype.paintVertexShape=
+function(c,m,x,p,v){var A=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;A=Math.min(p*Math.tan(A),.5*v);c.translate(m,x);c.begin();c.moveTo(.5*p,0);c.lineTo(p,A);c.lineTo(p,v-A);c.lineTo(.5*p,v);c.lineTo(0,v-A);c.lineTo(0,A);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,A);c.lineTo(.5*p,2*A);c.lineTo(p,A);c.moveTo(.5*p,2*A);c.lineTo(.5*p,v);c.stroke()};mxCellRenderer.registerShape("isoCube2",l);mxUtils.extend(q,mxShape);
+q.prototype.size=15;q.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(m,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A),c.lineTo(p,v-A),c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke())};
+mxCellRenderer.registerShape("cylinder2",q);mxUtils.extend(z,mxCylinder);z.prototype.size=15;z.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.max(0,Math.min(.5*v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"lid",!0);c.translate(m,x);0==A?(c.rect(0,0,p,v),c.fillAndStroke()):(c.begin(),B?(c.moveTo(0,A),c.arcTo(.5*p,A,0,0,1,.5*p,0),c.arcTo(.5*p,A,0,0,1,p,A)):(c.moveTo(0,0),c.arcTo(.5*p,A,0,0,0,.5*p,A),c.arcTo(.5*p,A,0,0,0,p,0)),c.lineTo(p,v-A),
+c.arcTo(.5*p,A,0,0,1,.5*p,v),c.arcTo(.5*p,A,0,0,1,0,v-A),c.close(),c.fillAndStroke(),c.setShadow(!1),B&&(c.begin(),c.moveTo(p,A),c.arcTo(.5*p,A,0,0,1,.5*p,2*A),c.arcTo(.5*p,A,0,0,1,0,A),c.stroke()))};mxCellRenderer.registerShape("cylinder3",z);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.quadTo(p/2,.5*v,p,0);c.quadTo(.5*p,v/2,p,v);c.quadTo(p/2,.5*v,0,v);c.quadTo(.5*p,v/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(C,mxCylinder);C.prototype.tabWidth=
+60;C.prototype.tabHeight=20;C.prototype.tabPosition="right";C.prototype.arcSize=.1;C.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var A=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),B=mxUtils.getValue(this.style,"rounded",!1),ha=mxUtils.getValue(this.style,"absoluteArcSize",!1),J=parseFloat(mxUtils.getValue(this.style,
+"arcSize",this.arcSize));ha||(J*=Math.min(p,v));J=Math.min(J,.5*p,.5*(v-x));m=Math.max(m,J);m=Math.min(p-J,m);B||(J=0);c.begin();"left"==A?(c.moveTo(Math.max(J,0),x),c.lineTo(Math.max(J,0),0),c.lineTo(m,0),c.lineTo(m,x)):(c.moveTo(p-m,x),c.lineTo(p-m,0),c.lineTo(p-Math.max(J,0),0),c.lineTo(p-Math.max(J,0),x));B?(c.moveTo(0,J+x),c.arcTo(J,J,0,0,1,J,x),c.lineTo(p-J,x),c.arcTo(J,J,0,0,1,p,J+x),c.lineTo(p,v-J),c.arcTo(J,J,0,0,1,p-J,v),c.lineTo(J,v),c.arcTo(J,J,0,0,1,0,v-J)):(c.moveTo(0,x),c.lineTo(p,
+x),c.lineTo(p,v),c.lineTo(0,v));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(p-30,x+20),c.lineTo(p-20,x+10),c.lineTo(p-10,x+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",C);C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,
+"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));p||(A=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,
+c.width-x),0,A,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};mxUtils.extend(I,mxCylinder);I.prototype.arcSize=.1;I.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);var A=mxUtils.getValue(this.style,"rounded",!1),B=mxUtils.getValue(this.style,"absoluteArcSize",!1);m=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));x=mxUtils.getValue(this.style,"umlStateConnection",null);B||(m*=Math.min(p,v));m=Math.min(m,.5*p,.5*v);A||(m=
+0);A=0;null!=x&&(A=10);c.begin();c.moveTo(A,m);c.arcTo(m,m,0,0,1,A+m,0);c.lineTo(p-m,0);c.arcTo(m,m,0,0,1,p,m);c.lineTo(p,v-m);c.arcTo(m,m,0,0,1,p-m,v);c.lineTo(A+m,v);c.arcTo(m,m,0,0,1,A,v-m);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(p-40,v-20,10,10,3,3),c.stroke(),c.roundrect(p-20,v-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(p-30,v-15),c.lineTo(p-20,v-15),c.stroke());"connPointRefEntry"==x?(c.ellipse(0,.5*v-10,
+20,20),c.fillAndStroke()):"connPointRefExit"==x&&(c.ellipse(0,.5*v-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*v-5),c.lineTo(15,.5*v+5),c.moveTo(15,.5*v-5),c.lineTo(5,.5*v+5),c.stroke())};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",I);mxUtils.extend(G,mxActor);G.prototype.size=30;G.prototype.isRoundable=
+function(){return!0};G.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("card",G);mxUtils.extend(Z,mxActor);Z.prototype.size=.4;Z.prototype.redrawPath=function(c,m,x,
+p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,m/2);c.quadTo(p/4,1.4*m,p/2,m/2);c.quadTo(3*p/4,m*(1-1.4),p,m/2);c.lineTo(p,v-m/2);c.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);c.quadTo(p/4,v-m*(1-1.4),0,v-m/2);c.lineTo(0,m/2);c.close();c.end()};Z.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",this.size),x=c.width,p=c.height;if(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||
+this.direction==mxConstants.DIRECTION_WEST)return m*=p,new mxRectangle(c.x,c.y+m,x,p-2*m);m*=x;return new mxRectangle(c.x+m,c.y,x-2*m,p)}return c};mxCellRenderer.registerShape("tape",Z);mxUtils.extend(ca,mxActor);ca.prototype.size=.3;ca.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};ca.prototype.redrawPath=function(c,m,x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,
+"size",this.size))));c.moveTo(0,0);c.lineTo(p,0);c.lineTo(p,v-m/2);c.quadTo(3*p/4,v-1.4*m,p/2,v-m/2);c.quadTo(p/4,v-m*(1-1.4),0,v-m/2);c.lineTo(0,m/2);c.close();c.end()};mxCellRenderer.registerShape("document",ca);var jb=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,m,x,p){var v=mxUtils.getValue(this.style,"size");return null!=v?p*Math.max(0,Math.min(1,v)):jb.apply(this,arguments)};mxCylinder.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var m=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*m),0,0)}return null};z.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(m/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*m*this.scale),0,Math.max(0,.3*m*this.scale))}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,
+"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var x=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;m=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var p=mxUtils.getValue(this.style,"rounded",!1),v=mxUtils.getValue(this.style,"absoluteArcSize",!1),A=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));v||(A*=Math.min(c.width,c.height));A=Math.min(A,.5*c.width,.5*(c.height-m));p||(A=0);return"left"==
+mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(A,0,Math.min(c.width,c.width-x),Math.min(c.height,c.height-m)):new mxRectangle(Math.min(c.width,c.width-x),0,A,Math.min(c.height,c.height-m))}return new mxRectangle(0,Math.min(c.height,m),0,0)}return null};I.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};g.prototype.getLabelMargins=
+function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var m=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,m*this.scale),0,Math.max(0,m*this.scale))}return null};mxUtils.extend(ba,mxActor);ba.prototype.size=.2;ba.prototype.fixedSize=20;ba.prototype.isRoundable=function(){return!0};ba.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):
+p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p,0),new mxPoint(p-m,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("parallelogram",ba);mxUtils.extend(Y,mxActor);Y.prototype.size=.2;Y.prototype.fixedSize=20;Y.prototype.isRoundable=function(){return!0};Y.prototype.redrawPath=function(c,m,x,p,v){m="0"!=
+mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(m,0),new mxPoint(p-m,0),new mxPoint(p,v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("trapezoid",Y);mxUtils.extend(O,mxActor);O.prototype.size=
+.5;O.prototype.redrawPath=function(c,m,x,p,v){c.setFillColor(null);m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(p,0),new mxPoint(m,0),new mxPoint(m,v/2),new mxPoint(0,v/2),new mxPoint(m,v/2),new mxPoint(m,v),new mxPoint(p,v)],this.isRounded,x,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",O);mxUtils.extend(la,mxActor);la.prototype.redrawPath=
+function(c,m,x,p,v){c.setStrokeWidth(1);c.setFillColor(this.stroke);m=p/5;c.rect(0,0,m,v);c.fillAndStroke();c.rect(2*m,0,m,v);c.fillAndStroke();c.rect(4*m,0,m,v);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",la);aa.prototype.moveTo=function(c,m){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;this.firstX=c;this.firstY=m};aa.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas,
+arguments));this.originalClose.apply(this.canvas,arguments)};aa.prototype.quadTo=function(c,m,x,p){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=x;this.lastY=p};aa.prototype.curveTo=function(c,m,x,p,v,A){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=A};aa.prototype.arcTo=function(c,m,x,p,v,A,B){this.originalArcTo.apply(this.canvas,arguments);this.lastX=A;this.lastY=B};aa.prototype.lineTo=function(c,m){if(null!=this.lastX&&null!=this.lastY){var x=function(oa){return"number"===
+typeof oa?oa?0>oa?-1:1:oa===oa?0:NaN:NaN},p=Math.abs(c-this.lastX),v=Math.abs(m-this.lastY),A=Math.sqrt(p*p+v*v);if(2>A){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=m;return}var B=Math.round(A/10),ha=this.defaultVariation;5>B&&(B=5,ha/=3);var J=x(c-this.lastX)*p/B;x=x(m-this.lastY)*v/B;p/=A;v/=A;for(A=0;A<B;A++){var va=(Math.random()-.5)*ha;this.originalLineTo.call(this.canvas,J*A+this.lastX-va*v,x*A+this.lastY-va*p)}this.originalLineTo.call(this.canvas,c,m)}else this.originalLineTo.apply(this.canvas,
+arguments);this.lastX=c;this.lastY=m};aa.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=this.originalArcTo};mxShape.prototype.defaultJiggle=1.5;var eb=mxShape.prototype.beforePaint;mxShape.prototype.beforePaint=function(c){eb.apply(this,arguments);null==c.handJiggle&&(c.handJiggle=this.createHandJiggle(c))};
+var qb=mxShape.prototype.afterPaint;mxShape.prototype.afterPaint=function(c){qb.apply(this,arguments);null!=c.handJiggle&&(c.handJiggle.destroy(),delete c.handJiggle)};mxShape.prototype.createComicCanvas=function(c){return new aa(c,mxUtils.getValue(this.style,"jiggle",this.defaultJiggle))};mxShape.prototype.createHandJiggle=function(c){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")?null:this.createComicCanvas(c)};mxRhombus.prototype.defaultJiggle=2;var ub=mxRectangleShape.prototype.isHtmlAllowed;
+mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.outline&&(null==this.style||"0"==mxUtils.getValue(this.style,"comic","0")&&"0"==mxUtils.getValue(this.style,"sketch","1"==urlParams.rough?"1":"0"))&&ub.apply(this,arguments)};var Ya=mxRectangleShape.prototype.paintBackground;mxRectangleShape.prototype.paintBackground=function(c,m,x,p,v){if(null==c.handJiggle||c.handJiggle.constructor!=aa)Ya.apply(this,arguments);else{var A=!0;null!=this.style&&(A="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,
"1"));if(A||null!=this.fill&&this.fill!=mxConstants.NONE||null!=this.stroke&&this.stroke!=mxConstants.NONE)A||null!=this.fill&&this.fill!=mxConstants.NONE||(c.pointerEvents=!1),c.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?A=Math.min(p/2,Math.min(v/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,A=Math.min(p*
-A,v*A)),c.moveTo(l+A,x),c.lineTo(l+p-A,x),c.quadTo(l+p,x,l+p,x+A),c.lineTo(l+p,x+v-A),c.quadTo(l+p,x+v,l+p-A,x+v),c.lineTo(l+A,x+v),c.quadTo(l,x+v,l,x+v-A),c.lineTo(l,x+A),c.quadTo(l,x,l+A,x)):(c.moveTo(l,x),c.lineTo(l+p,x),c.lineTo(l+p,x+v),c.lineTo(l,x+v),c.lineTo(l,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ha,mxRectangleShape);ha.prototype.size=.1;ha.prototype.fixedSize=!1;ha.prototype.isHtmlAllowed=function(){return!1};ha.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
-mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var l=c.width,x=c.height;c=new mxRectangle(c.x,c.y,l,x);var p=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(l*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
-ha.prototype.paintForeground=function(c,l,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.moveTo(l+p-B,x);c.lineTo(l+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("process",ha);mxCellRenderer.registerShape("process2",ha);mxUtils.extend(U,mxRectangleShape);U.prototype.paintBackground=function(c,l,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(l,x,p,v);c.fill()};U.prototype.paintForeground=function(c,l,x,p,v){};mxCellRenderer.registerShape("transparent",U);mxUtils.extend(ma,mxHexagon);ma.prototype.size=30;ma.prototype.position=.5;ma.prototype.position2=.5;ma.prototype.base=20;ma.prototype.getLabelMargins=function(){return new mxRectangle(0,
-0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};ma.prototype.isRoundable=function(){return!0};ma.prototype.redrawPath=function(c,l,x,p,v){l=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
-this.position2)))),ka=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ka),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,l,!0,[4])};mxCellRenderer.registerShape("callout",ma);mxUtils.extend(T,mxActor);T.prototype.size=.2;T.prototype.fixedSize=20;T.prototype.isRoundable=function(){return!0};T.prototype.redrawPath=function(c,l,x,p,
-v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(0,v),new mxPoint(l,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
-T);mxUtils.extend(M,mxHexagon);M.prototype.size=.25;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,
-0),new mxPoint(p-l,0),new mxPoint(p,.5*v),new mxPoint(p-l,v),new mxPoint(l,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",M);mxUtils.extend(ia,mxRectangleShape);ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.paintForeground=function(c,l,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(l+p/2,x+A);c.lineTo(l+p/2,x+v-A);c.moveTo(l+A,x+v/2);c.lineTo(l+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("plus",ia);var eb=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};mxRhombus.prototype.paintVertexShape=function(c,l,x,p,v){eb.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
-0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),eb.apply(this,[c,l,x,p,v]))}};mxUtils.extend(N,mxRectangleShape);N.prototype.isHtmlAllowed=function(){return!1};N.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var l=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+l,c.y+l,c.width-2*l,c.height-2*l)}return c};N.prototype.paintForeground=function(c,l,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
-Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);l+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ka=this.style["symbol"+A+"Align"],J=this.style["symbol"+A+"VerticalAlign"],wa=this.style["symbol"+A+"Width"],oa=this.style["symbol"+A+"Height"],ab=this.style["symbol"+A+"Spacing"]||0,jb=this.style["symbol"+A+"VSpacing"]||
-ab,gb=this.style["symbol"+A+"ArcSpacing"];null!=gb&&(gb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),ab+=gb,jb+=gb);gb=l;var Ea=x;gb=ka==mxConstants.ALIGN_CENTER?gb+(p-wa)/2:ka==mxConstants.ALIGN_RIGHT?gb+(p-wa-ab):gb+ab;Ea=J==mxConstants.ALIGN_MIDDLE?Ea+(v-oa)/2:J==mxConstants.ALIGN_BOTTOM?Ea+(v-oa-jb):Ea+jb;c.save();ka=new B;ka.style=this.style;B.prototype.paintVertexShape.call(ka,c,gb,Ea,wa,oa);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
-mxCellRenderer.registerShape("ext",N);mxUtils.extend(P,mxCylinder);P.prototype.redrawPath=function(c,l,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",P);mxUtils.extend(aa,mxShape);aa.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
-2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",aa);mxUtils.extend(la,mxShape);la.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};la.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
-la);mxUtils.extend(u,mxEllipse);u.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/8,x+v);c.lineTo(l+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",u);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(Q,mxShape);
-Q.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};Q.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};Q.prototype.paintForeground=function(c,l,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",Q);mxUtils.extend(X,mxRectangleShape);X.prototype.size=
-40;X.prototype.isHtmlAllowed=function(){return!1};X.prototype.getLabelBounds=function(c){var l=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,l)};X.prototype.paintBackground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,l,
-x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=X&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,l,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(l+p/2,x+A),c.lineTo(l+p/2,x+v),c.end(),c.stroke())};X.prototype.paintForeground=function(c,l,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,l,x,p,Math.min(v,
-A))};mxCellRenderer.registerShape("umlLifeline",X);mxUtils.extend(R,mxShape);R.prototype.width=60;R.prototype.height=30;R.prototype.corner=10;R.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};R.prototype.paintBackground=function(c,l,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
-"width",this.width)))),ka=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),J=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);J!=mxConstants.NONE&&(c.setFillColor(J),c.rect(l,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,l,x,p,v),c.setGradient(this.fill,this.gradient,l,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
-c.moveTo(l,x);c.lineTo(l+B,x);c.lineTo(l+B,x+Math.max(0,ka-1.5*A));c.lineTo(l+Math.max(0,B-A),x+ka);c.lineTo(l,x+ka);c.close();c.fillAndStroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+p,x);c.lineTo(l+p,x+v);c.lineTo(l,x+v);c.lineTo(l,x+ka);c.stroke()};mxCellRenderer.registerShape("umlFrame",R);mxPerimeter.CenterPerimeter=function(c,l,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
-l,x,p){p=X.prototype.size;null!=l&&(p=mxUtils.getValue(l.style,"size",p)*l.view.scale);l=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;x.x<c.getCenterX()&&(l=-1*(l+1));return new mxPoint(c.getCenterX()+l,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,l,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
-mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,l,x,p){p=parseFloat(l.style[mxConstants.STYLE_STROKEWIDTH]||1)*l.view.scale/2-1;null!=l.style.backboneSize&&(p+=parseFloat(l.style.backboneSize)*l.view.scale/2-1);if("south"==l.style[mxConstants.STYLE_DIRECTION]||"north"==l.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
-c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,l,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(l.style,"size",ma.prototype.size))*l.view.scale))),l.style),l,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
-l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ka=c.y,J=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J,ka+v),new mxPoint(B+
-J,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka)]):(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,ka+wa),new mxPoint(B,ka+wa),new mxPoint(B+v,ka)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ka,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,l,x,p){var v="0"!=
-mxUtils.getValue(l.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,ka=c.y,J=c.width,wa=c.height;l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,ka+wa),new mxPoint(B,ka+wa),new mxPoint(B+
-v,ka)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,ka+wa),new mxPoint(B+v,ka+wa),new mxPoint(B,ka)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka+v),new mxPoint(B+J,ka),new mxPoint(B+J,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+
-J,ka+v),new mxPoint(B+J,ka+wa-v),new mxPoint(B,ka+wa),new mxPoint(B,ka)]);wa=c.getCenterX();c=c.getCenterY();c=new mxPoint(wa,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ka,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?T.prototype.fixedSize:T.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=c.x,
-ka=c.y,J=c.width,wa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,c),new mxPoint(B+J-v,ka+wa),new mxPoint(B,ka+wa),new mxPoint(B+v,c),new mxPoint(B,ka)]):l==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,
-A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J,ka),new mxPoint(B+J-v,c),new mxPoint(B+J,ka+wa),new mxPoint(B+v,ka+wa),new mxPoint(B,c),new mxPoint(B+v,ka)]):l==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka+v),new mxPoint(oa,ka),new mxPoint(B+J,ka+v),new mxPoint(B+J,ka+wa),new mxPoint(oa,ka+wa-v),new mxPoint(B,ka+wa),new mxPoint(B,ka+v)]):(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(B,ka),new mxPoint(oa,ka+
-v),new mxPoint(B+J,ka),new mxPoint(B+J,ka+wa-v),new mxPoint(oa,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ka,oa,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,l,x,p){var v="0"!=mxUtils.getValue(l.style,"fixedSize","0"),A=v?M.prototype.fixedSize:M.prototype.size;null!=l&&(A=mxUtils.getValue(l.style,"size",A));v&&(A*=l.view.scale);var B=
-c.x,ka=c.y,J=c.width,wa=c.height,oa=c.getCenterX();c=c.getCenterY();l=null!=l?mxUtils.getValue(l.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;l==mxConstants.DIRECTION_NORTH||l==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(wa,A)):wa*Math.max(0,Math.min(1,A)),ka=[new mxPoint(oa,ka),new mxPoint(B+J,ka+v),new mxPoint(B+J,ka+wa-v),new mxPoint(oa,ka+wa),new mxPoint(B,ka+wa-v),new mxPoint(B,ka+v),new mxPoint(oa,ka)]):(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,
-Math.min(1,A)),ka=[new mxPoint(B+v,ka),new mxPoint(B+J-v,ka),new mxPoint(B+J,c),new mxPoint(B+J-v,ka+wa),new mxPoint(B+v,ka+wa),new mxPoint(B,c),new mxPoint(B+v,ka)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ka,oa,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(ca,mxShape);ca.prototype.size=10;ca.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
-c.translate(l,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",ca);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(l,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
-c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(da,mxShape);da.prototype.paintBackground=function(c,l,x,p,v){c.translate(l,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",da);mxUtils.extend(qa,mxShape);qa.prototype.inset=2;qa.prototype.paintBackground=function(c,l,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
-"inset",this.inset))+this.strokewidth;c.translate(l,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",qa);mxUtils.extend(va,mxCylinder);va.prototype.jettyWidth=20;va.prototype.jettyHeight=10;va.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
-this.jettyHeight));x=B/2;B=x+B/2;var ka=Math.min(l,v-l),J=Math.min(ka+2*l,v-l);A?(c.moveTo(x,ka),c.lineTo(B,ka),c.lineTo(B,ka+l),c.lineTo(x,ka+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,J),c.lineTo(x,ka+l),c.lineTo(0,ka+l),c.lineTo(0,ka),c.lineTo(x,ka),c.close());c.end()};mxCellRenderer.registerShape("module",va);mxUtils.extend(ua,mxCylinder);ua.prototype.jettyWidth=
-32;ua.prototype.jettyHeight=12;ua.prototype.redrawPath=function(c,l,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));l=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ka=.3*v-l/2,J=.7*v-l/2;A?(c.moveTo(x,ka),c.lineTo(B,ka),c.lineTo(B,ka+l),c.lineTo(x,ka+l),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+l),c.lineTo(x,J+l)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+l),c.lineTo(0,J+l),c.lineTo(0,J),c.lineTo(x,
-J),c.lineTo(x,ka+l),c.lineTo(0,ka+l),c.lineTo(0,ka),c.lineTo(x,ka),c.close());c.end()};mxCellRenderer.registerShape("component",ua);mxUtils.extend(Aa,mxRectangleShape);Aa.prototype.paintForeground=function(c,l,x,p,v){var A=p/2,B=v/2,ka=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(l+A,x),new mxPoint(l+p,x+B),new mxPoint(l+A,x+v),new mxPoint(l,x+B)],this.isRounded,ka,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
-arguments)};mxCellRenderer.registerShape("associativeEntity",Aa);mxUtils.extend(za,mxDoubleEllipse);za.prototype.outerStroke=!0;za.prototype.paintVertexShape=function(c,l,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(l+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(l,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",za);mxUtils.extend(Ca,za);Ca.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Ca);mxUtils.extend(sa,mxArrowConnector);
-sa.prototype.defaultWidth=4;sa.prototype.isOpenEnded=function(){return!0};sa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};sa.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",sa);mxUtils.extend(Va,mxArrowConnector);Va.prototype.defaultWidth=10;Va.prototype.defaultArrowWidth=20;Va.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
-"startWidth",this.defaultArrowWidth)};Va.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Va.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Va);mxUtils.extend(Ua,mxActor);Ua.prototype.size=30;Ua.prototype.isRoundable=function(){return!0};Ua.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,l),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ua);mxUtils.extend(Ra,mxRectangleShape);Ra.prototype.dx=20;Ra.prototype.dy=20;Ra.prototype.isHtmlAllowed=function(){return!1};Ra.prototype.paintForeground=function(c,l,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
-var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(l,x+A);c.lineTo(l+p,x+A);c.end();c.stroke();c.begin();c.moveTo(l+B,x);c.lineTo(l+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Ra);
-mxUtils.extend(Za,mxActor);Za.prototype.dx=20;Za.prototype.dy=20;Za.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(l,x),
-new mxPoint(l,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Za);mxUtils.extend(Ha,mxActor);Ha.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",Ha);mxUtils.extend(db,mxActor);db.prototype.dx=20;db.prototype.dy=20;db.prototype.redrawPath=function(c,l,x,p,v){l=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+l)/2,x),new mxPoint((p+l)/2,v),new mxPoint((p-l)/2,v),new mxPoint((p-l)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",db);mxUtils.extend(cb,
-mxActor);cb.prototype.arrowWidth=.3;cb.prototype.arrowSize=.2;cb.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-
-l,v),new mxPoint(p-l,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",cb);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,l,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",cb.prototype.arrowWidth))));l=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",cb.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
-2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(l,0),new mxPoint(l,x),new mxPoint(p-l,x),new mxPoint(p-l,0),new mxPoint(p,v/2),new mxPoint(p-l,v),new mxPoint(p-l,A),new mxPoint(l,A),new mxPoint(l,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",y);mxUtils.extend(K,mxActor);K.prototype.size=.1;K.prototype.fixedSize=20;K.prototype.redrawPath=function(c,l,x,p,v){l="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
-"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(l,0);c.lineTo(p,0);c.quadTo(p-2*l,v/2,p,v);c.lineTo(l,v);c.quadTo(l-2*l,v/2,l,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",K);mxUtils.extend(L,mxActor);L.prototype.redrawPath=function(c,l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",L);mxUtils.extend(S,mxActor);S.prototype.redrawPath=function(c,
-l,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",S);mxUtils.extend(V,mxActor);V.prototype.size=20;V.prototype.isRoundable=function(){return!0};V.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(l,0),new mxPoint(p-l,0),new mxPoint(p,
-.8*l),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",V);mxUtils.extend(ja,mxActor);ja.prototype.size=.375;ja.prototype.isRoundable=function(){return!0};ja.prototype.redrawPath=function(c,l,x,p,v){l=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,
-v-l),new mxPoint(p/2,v),new mxPoint(0,v-l)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",ja);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(l+p/2,x+v);c.lineTo(l+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",na);mxUtils.extend(ya,mxEllipse);ya.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
-arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(l+p/2,x);c.lineTo(l+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",ya);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l+.145*p,x+.145*v);c.lineTo(l+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(l+.855*p,x+.145*v);c.lineTo(l+.145*p,
-x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ra);mxUtils.extend(ta,mxRhombus);ta.prototype.paintVertexShape=function(c,l,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(l,x+v/2);c.lineTo(l+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",ta);mxUtils.extend(Da,mxEllipse);Da.prototype.paintVertexShape=function(c,l,x,p,v){c.begin();c.moveTo(l,x);c.lineTo(l+p,x);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke();
-c.begin();c.moveTo(l,x+v);c.lineTo(l+p,x+v);c.lineTo(l+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Da);mxUtils.extend(Oa,mxEllipse);Oa.prototype.paintVertexShape=function(c,l,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ka=x+v-B/2;c.begin();c.moveTo(l,x);c.lineTo(l,x+v);c.moveTo(l+A,ka);c.lineTo(l+A+B,ka-B/2);c.moveTo(l+A,ka);c.lineTo(l+A+B,ka+B/2);c.moveTo(l+A,ka);c.lineTo(l+p-A,ka);c.moveTo(l+p,x);c.lineTo(l+p,x+v);c.moveTo(l+p-A,ka);c.lineTo(l+p-B-A,ka-B/2);c.moveTo(l+
-p-A,ka);c.lineTo(l+p-B-A,ka+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Oa);mxUtils.extend(Ma,mxEllipse);Ma.prototype.drawHidden=!0;Ma.prototype.paintVertexShape=function(c,l,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ka="1"==mxUtils.getValue(this.style,"top","1"),J="1"==mxUtils.getValue(this.style,
-"left","1"),wa="1"==mxUtils.getValue(this.style,"right","1"),oa="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ka||wa||oa||J?(c.rect(l,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(l,x),this.outline||ka?c.lineTo(l+p,x):c.moveTo(l+p,x),this.outline||wa?c.lineTo(l+p,x+v):c.moveTo(l+p,x+v),this.outline||oa?c.lineTo(l,x+v):c.moveTo(l,x+v),(this.outline||J)&&c.lineTo(l,x),c.end(),c.stroke(),c.setLineCap("flat")):
-c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ma);mxUtils.extend(Wa,mxEllipse);Wa.prototype.paintVertexShape=function(c,l,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(l+p/2,x),c.lineTo(l+p/2,x+v)):(c.moveTo(l,x+v/2),c.lineTo(l+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",Wa);mxUtils.extend(Sa,mxActor);Sa.prototype.redrawPath=function(c,
-l,x,p,v){l=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Sa);mxUtils.extend(Fa,mxActor);Fa.prototype.size=.2;Fa.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(v,p);var A=Math.max(0,Math.min(l,l*parseFloat(mxUtils.getValue(this.style,"size",this.size))));l=(v-A)/2;x=l+A;var B=(p-A)/2;A=B+A;c.moveTo(0,l);c.lineTo(B,l);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,l);c.lineTo(p,l);c.lineTo(p,x);
-c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",Fa);mxUtils.extend(Ja,mxActor);Ja.prototype.size=.25;Ja.prototype.redrawPath=function(c,l,x,p,v){l=Math.min(p,v/2);x=Math.min(p-l,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-l,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-l,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",Ja);mxUtils.extend(xa,
-mxActor);xa.prototype.cst={RECT2:"mxgraph.basic.rect"};xa.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
+A,v*A)),c.moveTo(m+A,x),c.lineTo(m+p-A,x),c.quadTo(m+p,x,m+p,x+A),c.lineTo(m+p,x+v-A),c.quadTo(m+p,x+v,m+p-A,x+v),c.lineTo(m+A,x+v),c.quadTo(m,x+v,m,x+v-A),c.lineTo(m,x+A),c.quadTo(m,x,m+A,x)):(c.moveTo(m,x),c.lineTo(m+p,x),c.lineTo(m+p,x+v),c.lineTo(m,x+v),c.lineTo(m,x)),c.close(),c.end(),c.fillAndStroke()}};mxUtils.extend(ia,mxRectangleShape);ia.prototype.size=.1;ia.prototype.fixedSize=!1;ia.prototype.isHtmlAllowed=function(){return!1};ia.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.state.style,
+mxConstants.STYLE_HORIZONTAL,!0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var m=c.width,x=c.height;c=new mxRectangle(c.x,c.y,m,x);var p=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded){var v=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;p=Math.max(p,Math.min(m*v,x*v))}c.x+=Math.round(p);c.width-=Math.round(2*p);return c}return c};
+ia.prototype.paintForeground=function(c,m,x,p,v){var A=mxUtils.getValue(this.style,"fixedSize",this.fixedSize),B=parseFloat(mxUtils.getValue(this.style,"size",this.size));B=A?Math.max(0,Math.min(p,B)):p*Math.max(0,Math.min(1,B));this.isRounded&&(A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,B=Math.max(B,Math.min(p*A,v*A)));B=Math.round(B);c.begin();c.moveTo(m+B,x);c.lineTo(m+B,x+v);c.moveTo(m+p-B,x);c.lineTo(m+p-B,x+v);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("process",ia);mxCellRenderer.registerShape("process2",ia);mxUtils.extend(X,mxRectangleShape);X.prototype.paintBackground=function(c,m,x,p,v){c.setFillColor(mxConstants.NONE);c.rect(m,x,p,v);c.fill()};X.prototype.paintForeground=function(c,m,x,p,v){};mxCellRenderer.registerShape("transparent",X);mxUtils.extend(R,mxHexagon);R.prototype.size=30;R.prototype.position=.5;R.prototype.position2=.5;R.prototype.base=20;R.prototype.getLabelMargins=function(){return new mxRectangle(0,
+0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};R.prototype.isRoundable=function(){return!0};R.prototype.redrawPath=function(c,m,x,p,v){m=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var A=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),B=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",
+this.position2)))),ha=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"base",this.base))));this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,v-x),new mxPoint(Math.min(p,A+ha),v-x),new mxPoint(B,v),new mxPoint(Math.max(0,A),v-x),new mxPoint(0,v-x)],this.isRounded,m,!0,[4])};mxCellRenderer.registerShape("callout",R);mxUtils.extend(sa,mxActor);sa.prototype.size=.2;sa.prototype.fixedSize=20;sa.prototype.isRoundable=function(){return!0};sa.prototype.redrawPath=function(c,m,
+x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-m,v),new mxPoint(0,v),new mxPoint(m,v/2)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("step",
+sa);mxUtils.extend(M,mxHexagon);M.prototype.size=.25;M.prototype.fixedSize=20;M.prototype.isRoundable=function(){return!0};M.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*p,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,
+0),new mxPoint(p-m,0),new mxPoint(p,.5*v),new mxPoint(p-m,v),new mxPoint(m,v),new mxPoint(0,.5*v)],this.isRounded,x,!0)};mxCellRenderer.registerShape("hexagon",M);mxUtils.extend(ka,mxRectangleShape);ka.prototype.isHtmlAllowed=function(){return!1};ka.prototype.paintForeground=function(c,m,x,p,v){var A=Math.min(p/5,v/5)+1;c.begin();c.moveTo(m+p/2,x+A);c.lineTo(m+p/2,x+v-A);c.moveTo(m+A,x+v/2);c.lineTo(m+p-A,x+v/2);c.end();c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("plus",ka);var ab=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};mxRhombus.prototype.paintVertexShape=function(c,m,x,p,v){ab.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var A=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||
+0);m+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&(c.setShadow(!1),ab.apply(this,[c,m,x,p,v]))}};mxUtils.extend(L,mxRectangleShape);L.prototype.isHtmlAllowed=function(){return!1};L.prototype.getLabelBounds=function(c){if(1==this.style["double"]){var m=(Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(c.x+m,c.y+m,c.width-2*m,c.height-2*m)}return c};L.prototype.paintForeground=function(c,m,x,p,v){if(null!=this.style){if(!this.outline&&1==this.style["double"]){var A=
+Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);m+=A;x+=A;p-=2*A;v-=2*A;0<p&&0<v&&mxRectangleShape.prototype.paintBackground.apply(this,arguments)}c.setDashed(!1);A=0;do{var B=mxCellRenderer.defaultShapes[this.style["symbol"+A]];if(null!=B){var ha=this.style["symbol"+A+"Align"],J=this.style["symbol"+A+"VerticalAlign"],va=this.style["symbol"+A+"Width"],oa=this.style["symbol"+A+"Height"],Xa=this.style["symbol"+A+"Spacing"]||0,ib=this.style["symbol"+A+"VSpacing"]||
+Xa,gb=this.style["symbol"+A+"ArcSpacing"];null!=gb&&(gb*=this.getArcSize(p+this.strokewidth,v+this.strokewidth),Xa+=gb,ib+=gb);gb=m;var Ha=x;gb=ha==mxConstants.ALIGN_CENTER?gb+(p-va)/2:ha==mxConstants.ALIGN_RIGHT?gb+(p-va-Xa):gb+Xa;Ha=J==mxConstants.ALIGN_MIDDLE?Ha+(v-oa)/2:J==mxConstants.ALIGN_BOTTOM?Ha+(v-oa-ib):Ha+ib;c.save();ha=new B;ha.style=this.style;B.prototype.paintVertexShape.call(ha,c,gb,Ha,va,oa);c.restore()}A++}while(null!=B)}mxRectangleShape.prototype.paintForeground.apply(this,arguments)};
+mxCellRenderer.registerShape("ext",L);mxUtils.extend(S,mxCylinder);S.prototype.redrawPath=function(c,m,x,p,v,A){A?(c.moveTo(0,0),c.lineTo(p/2,v/2),c.lineTo(p,0),c.end()):(c.moveTo(0,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(0,v),c.close())};mxCellRenderer.registerShape("message",S);mxUtils.extend(ja,mxShape);ja.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.ellipse(p/4,0,p/2,v/4);c.fillAndStroke();c.begin();c.moveTo(p/2,v/4);c.lineTo(p/2,2*v/3);c.moveTo(p/2,v/3);c.lineTo(0,v/3);c.moveTo(p/
+2,v/3);c.lineTo(p,v/3);c.moveTo(p/2,2*v/3);c.lineTo(0,v);c.moveTo(p/2,2*v/3);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlActor",ja);mxUtils.extend(ma,mxShape);ma.prototype.getLabelMargins=function(c){return new mxRectangle(c.width/6,0,0,0)};ma.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(0,v/4);c.lineTo(0,3*v/4);c.end();c.stroke();c.begin();c.moveTo(0,v/2);c.lineTo(p/6,v/2);c.end();c.stroke();c.ellipse(p/6,0,5*p/6,v);c.fillAndStroke()};mxCellRenderer.registerShape("umlBoundary",
+ma);mxUtils.extend(u,mxEllipse);u.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+p/8,x+v);c.lineTo(m+7*p/8,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("umlEntity",u);mxUtils.extend(H,mxShape);H.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(p,0);c.lineTo(0,v);c.moveTo(0,0);c.lineTo(p,v);c.end();c.stroke()};mxCellRenderer.registerShape("umlDestroy",H);mxUtils.extend(P,mxShape);
+P.prototype.getLabelBounds=function(c){return new mxRectangle(c.x,c.y+c.height/8,c.width,7*c.height/8)};P.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,0);c.end();c.stroke();c.ellipse(0,v/8,p,7*v/8);c.fillAndStroke()};P.prototype.paintForeground=function(c,m,x,p,v){c.begin();c.moveTo(3*p/8,v/8*1.1);c.lineTo(5*p/8,v/4);c.end();c.stroke()};mxCellRenderer.registerShape("umlControl",P);mxUtils.extend(V,mxRectangleShape);V.prototype.size=
+40;V.prototype.isHtmlAllowed=function(){return!1};V.prototype.getLabelBounds=function(c){var m=Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale));return new mxRectangle(c.x,c.y,c.width,m)};V.prototype.paintBackground=function(c,m,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),B=mxUtils.getValue(this.style,"participant");null==B||null==this.state?mxRectangleShape.prototype.paintBackground.call(this,c,m,
+x,p,A):(B=this.state.view.graph.cellRenderer.getShape(B),null!=B&&B!=V&&(B=new B,B.apply(this.state),c.save(),B.paintVertexShape(c,m,x,p,A),c.restore()));A<v&&(c.setDashed("1"==mxUtils.getValue(this.style,"lifelineDashed","1")),c.begin(),c.moveTo(m+p/2,x+A),c.lineTo(m+p/2,x+v),c.end(),c.stroke())};V.prototype.paintForeground=function(c,m,x,p,v){var A=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));mxRectangleShape.prototype.paintForeground.call(this,c,m,x,p,Math.min(v,
+A))};mxCellRenderer.registerShape("umlLifeline",V);mxUtils.extend(Q,mxShape);Q.prototype.width=60;Q.prototype.height=30;Q.prototype.corner=10;Q.prototype.getLabelMargins=function(c){return new mxRectangle(0,0,c.width-parseFloat(mxUtils.getValue(this.style,"width",this.width)*this.scale),c.height-parseFloat(mxUtils.getValue(this.style,"height",this.height)*this.scale))};Q.prototype.paintBackground=function(c,m,x,p,v){var A=this.corner,B=Math.min(p,Math.max(A,parseFloat(mxUtils.getValue(this.style,
+"width",this.width)))),ha=Math.min(v,Math.max(1.5*A,parseFloat(mxUtils.getValue(this.style,"height",this.height)))),J=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE);J!=mxConstants.NONE&&(c.setFillColor(J),c.rect(m,x,p,v),c.fill());null!=this.fill&&this.fill!=mxConstants.NONE&&this.gradient&&this.gradient!=mxConstants.NONE?(this.getGradientBounds(c,m,x,p,v),c.setGradient(this.fill,this.gradient,m,x,p,v,this.gradientDirection)):c.setFillColor(this.fill);c.begin();
+c.moveTo(m,x);c.lineTo(m+B,x);c.lineTo(m+B,x+Math.max(0,ha-1.5*A));c.lineTo(m+Math.max(0,B-A),x+ha);c.lineTo(m,x+ha);c.close();c.fillAndStroke();c.begin();c.moveTo(m+B,x);c.lineTo(m+p,x);c.lineTo(m+p,x+v);c.lineTo(m,x+v);c.lineTo(m,x+ha);c.stroke()};mxCellRenderer.registerShape("umlFrame",Q);mxPerimeter.CenterPerimeter=function(c,m,x,p){return new mxPoint(c.getCenterX(),c.getCenterY())};mxStyleRegistry.putValue("centerPerimeter",mxPerimeter.CenterPerimeter);mxPerimeter.LifelinePerimeter=function(c,
+m,x,p){p=V.prototype.size;null!=m&&(p=mxUtils.getValue(m.style,"size",p)*m.view.scale);m=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;x.x<c.getCenterX()&&(m=-1*(m+1));return new mxPoint(c.getCenterX()+m,Math.min(c.y+c.height,Math.max(c.y+p,x.y)))};mxStyleRegistry.putValue("lifelinePerimeter",mxPerimeter.LifelinePerimeter);mxPerimeter.OrthogonalPerimeter=function(c,m,x,p){p=!0;return mxPerimeter.RectanglePerimeter.apply(this,arguments)};mxStyleRegistry.putValue("orthogonalPerimeter",
+mxPerimeter.OrthogonalPerimeter);mxPerimeter.BackbonePerimeter=function(c,m,x,p){p=parseFloat(m.style[mxConstants.STYLE_STROKEWIDTH]||1)*m.view.scale/2-1;null!=m.style.backboneSize&&(p+=parseFloat(m.style.backboneSize)*m.view.scale/2-1);if("south"==m.style[mxConstants.STYLE_DIRECTION]||"north"==m.style[mxConstants.STYLE_DIRECTION])return x.x<c.getCenterX()&&(p=-1*(p+1)),new mxPoint(c.getCenterX()+p,Math.min(c.y+c.height,Math.max(c.y,x.y)));x.y<c.getCenterY()&&(p=-1*(p+1));return new mxPoint(Math.min(c.x+
+c.width,Math.max(c.x,x.x)),c.getCenterY()+p)};mxStyleRegistry.putValue("backbonePerimeter",mxPerimeter.BackbonePerimeter);mxPerimeter.CalloutPerimeter=function(c,m,x,p){return mxPerimeter.RectanglePerimeter(mxUtils.getDirectedBounds(c,new mxRectangle(0,0,0,Math.max(0,Math.min(c.height,parseFloat(mxUtils.getValue(m.style,"size",R.prototype.size))*m.view.scale))),m.style),m,x,p)};mxStyleRegistry.putValue("calloutPerimeter",mxPerimeter.CalloutPerimeter);mxPerimeter.ParallelogramPerimeter=function(c,
+m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?ba.prototype.fixedSize:ba.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=c.x,ha=c.y,J=c.width,va=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+J,ha+v),new mxPoint(B+
+J,ha+va),new mxPoint(B,ha+va-v),new mxPoint(B,ha)]):(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+J,ha),new mxPoint(B+J-v,ha+va),new mxPoint(B,ha+va),new mxPoint(B+v,ha)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,m,x,p){var v="0"!=
+mxUtils.getValue(m.style,"fixedSize","0"),A=v?Y.prototype.fixedSize:Y.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=c.x,ha=c.y,J=c.width,va=c.height;m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(.5*J,A)):J*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+J-v,ha),new mxPoint(B+J,ha+va),new mxPoint(B,ha+va),new mxPoint(B+
+v,ha)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+J,ha),new mxPoint(B+J-v,ha+va),new mxPoint(B+v,ha+va),new mxPoint(B,ha)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(B+J,ha),new mxPoint(B+J,ha+va),new mxPoint(B,ha+va-v),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+
+J,ha+v),new mxPoint(B+J,ha+va-v),new mxPoint(B,ha+va),new mxPoint(B,ha)]);va=c.getCenterX();c=c.getCenterY();c=new mxPoint(va,c);p&&(x.x<B||x.x>B+J?c.y=x.y:c.x=x.x);return mxUtils.getPerimeterPoint(ha,c,x)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?sa.prototype.fixedSize:sa.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=
+c.x,ha=c.y,J=c.width,va=c.height,oa=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_EAST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(B+J-v,ha),new mxPoint(B+J,c),new mxPoint(B+J-v,ha+va),new mxPoint(B,ha+va),new mxPoint(B+v,c),new mxPoint(B,ha)]):m==mxConstants.DIRECTION_WEST?(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,Math.min(1,
+A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+J,ha),new mxPoint(B+J-v,c),new mxPoint(B+J,ha+va),new mxPoint(B+v,ha+va),new mxPoint(B,c),new mxPoint(B+v,ha)]):m==mxConstants.DIRECTION_NORTH?(v=v?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha+v),new mxPoint(oa,ha),new mxPoint(B+J,ha+v),new mxPoint(B+J,ha+va),new mxPoint(oa,ha+va-v),new mxPoint(B,ha+va),new mxPoint(B,ha+v)]):(v=v?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ha=[new mxPoint(B,ha),new mxPoint(oa,ha+
+v),new mxPoint(B+J,ha),new mxPoint(B+J,ha+va-v),new mxPoint(oa,ha+va),new mxPoint(B,ha+va-v),new mxPoint(B,ha)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ha,oa,x)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,m,x,p){var v="0"!=mxUtils.getValue(m.style,"fixedSize","0"),A=v?M.prototype.fixedSize:M.prototype.size;null!=m&&(A=mxUtils.getValue(m.style,"size",A));v&&(A*=m.view.scale);var B=
+c.x,ha=c.y,J=c.width,va=c.height,oa=c.getCenterX();c=c.getCenterY();m=null!=m?mxUtils.getValue(m.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;m==mxConstants.DIRECTION_NORTH||m==mxConstants.DIRECTION_SOUTH?(v=v?Math.max(0,Math.min(va,A)):va*Math.max(0,Math.min(1,A)),ha=[new mxPoint(oa,ha),new mxPoint(B+J,ha+v),new mxPoint(B+J,ha+va-v),new mxPoint(oa,ha+va),new mxPoint(B,ha+va-v),new mxPoint(B,ha+v),new mxPoint(oa,ha)]):(v=v?Math.max(0,Math.min(J,A)):J*Math.max(0,
+Math.min(1,A)),ha=[new mxPoint(B+v,ha),new mxPoint(B+J-v,ha),new mxPoint(B+J,c),new mxPoint(B+J-v,ha+va),new mxPoint(B+v,ha+va),new mxPoint(B,c),new mxPoint(B+v,ha)]);oa=new mxPoint(oa,c);p&&(x.x<B||x.x>B+J?oa.y=x.y:oa.x=x.x);return mxUtils.getPerimeterPoint(ha,oa,x)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(da,mxShape);da.prototype.size=10;da.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size));
+c.translate(m,x);c.ellipse((p-A)/2,0,A,A);c.fillAndStroke();c.begin();c.moveTo(p/2,A);c.lineTo(p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",da);mxUtils.extend(ea,mxShape);ea.prototype.size=10;ea.prototype.inset=2;ea.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,"size",this.size)),B=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(m,x);c.begin();c.moveTo(p/2,A+B);c.lineTo(p/2,v);c.end();c.stroke();
+c.begin();c.moveTo((p-A)/2-B,A/2);c.quadTo((p-A)/2-B,A+B,p/2,A+B);c.quadTo((p+A)/2+B,A+B,(p+A)/2+B,A/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",ea);mxUtils.extend(fa,mxShape);fa.prototype.paintBackground=function(c,m,x,p,v){c.translate(m,x);c.begin();c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",fa);mxUtils.extend(pa,mxShape);pa.prototype.inset=2;pa.prototype.paintBackground=function(c,m,x,p,v){var A=parseFloat(mxUtils.getValue(this.style,
+"inset",this.inset))+this.strokewidth;c.translate(m,x);c.ellipse(0,A,p-2*A,v-2*A);c.fillAndStroke();c.begin();c.moveTo(p/2,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p/2,v);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",pa);mxUtils.extend(ua,mxCylinder);ua.prototype.jettyWidth=20;ua.prototype.jettyHeight=10;ua.prototype.redrawPath=function(c,m,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",
+this.jettyHeight));x=B/2;B=x+B/2;var ha=Math.min(m,v-m),J=Math.min(ha+2*m,v-m);A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+m),c.lineTo(x,ha+m),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+m),c.lineTo(x,J+m)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+m),c.lineTo(0,J+m),c.lineTo(0,J),c.lineTo(x,J),c.lineTo(x,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("module",ua);mxUtils.extend(qa,mxCylinder);qa.prototype.jettyWidth=
+32;qa.prototype.jettyHeight=12;qa.prototype.redrawPath=function(c,m,x,p,v,A){var B=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));m=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));x=B/2;B=x+B/2;var ha=.3*v-m/2,J=.7*v-m/2;A?(c.moveTo(x,ha),c.lineTo(B,ha),c.lineTo(B,ha+m),c.lineTo(x,ha+m),c.moveTo(x,J),c.lineTo(B,J),c.lineTo(B,J+m),c.lineTo(x,J+m)):(c.moveTo(x,0),c.lineTo(p,0),c.lineTo(p,v),c.lineTo(x,v),c.lineTo(x,J+m),c.lineTo(0,J+m),c.lineTo(0,J),c.lineTo(x,
+J),c.lineTo(x,ha+m),c.lineTo(0,ha+m),c.lineTo(0,ha),c.lineTo(x,ha),c.close());c.end()};mxCellRenderer.registerShape("component",qa);mxUtils.extend(Da,mxRectangleShape);Da.prototype.paintForeground=function(c,m,x,p,v){var A=p/2,B=v/2,ha=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;c.begin();this.addPoints(c,[new mxPoint(m+A,x),new mxPoint(m+p,x+B),new mxPoint(m+A,x+v),new mxPoint(m,x+B)],this.isRounded,ha,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,
+arguments)};mxCellRenderer.registerShape("associativeEntity",Da);mxUtils.extend(Aa,mxDoubleEllipse);Aa.prototype.outerStroke=!0;Aa.prototype.paintVertexShape=function(c,m,x,p,v){var A=Math.min(4,Math.min(p/5,v/5));0<p&&0<v&&(c.ellipse(m+A,x+A,p-2*A,v-2*A),c.fillAndStroke());c.setShadow(!1);this.outerStroke&&(c.ellipse(m,x,p,v),c.stroke())};mxCellRenderer.registerShape("endState",Aa);mxUtils.extend(Fa,Aa);Fa.prototype.outerStroke=!1;mxCellRenderer.registerShape("startState",Fa);mxUtils.extend(ta,mxArrowConnector);
+ta.prototype.defaultWidth=4;ta.prototype.isOpenEnded=function(){return!0};ta.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};ta.prototype.isArrowRounded=function(){return this.isRounded};mxCellRenderer.registerShape("link",ta);mxUtils.extend(Sa,mxArrowConnector);Sa.prototype.defaultWidth=10;Sa.prototype.defaultArrowWidth=20;Sa.prototype.getStartArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,
+"startWidth",this.defaultArrowWidth)};Sa.prototype.getEndArrowWidth=function(){return this.getEdgeWidth()+mxUtils.getNumber(this.style,"endWidth",this.defaultArrowWidth)};Sa.prototype.getEdgeWidth=function(){return mxUtils.getNumber(this.style,"width",this.defaultWidth)+Math.max(0,this.strokewidth-1)};mxCellRenderer.registerShape("flexArrow",Sa);mxUtils.extend(Ra,mxActor);Ra.prototype.size=30;Ra.prototype.isRoundable=function(){return!0};Ra.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(v,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,v),new mxPoint(0,m),new mxPoint(p,0),new mxPoint(p,v)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("manualInput",Ra);mxUtils.extend(Oa,mxRectangleShape);Oa.prototype.dx=20;Oa.prototype.dy=20;Oa.prototype.isHtmlAllowed=function(){return!1};Oa.prototype.paintForeground=function(c,m,x,p,v){mxRectangleShape.prototype.paintForeground.apply(this,arguments);
+var A=0;if(this.isRounded){var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;A=Math.max(A,Math.min(p*B,v*B))}B=Math.max(A,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));A=Math.max(A,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.begin();c.moveTo(m,x+A);c.lineTo(m+p,x+A);c.end();c.stroke();c.begin();c.moveTo(m+B,x);c.lineTo(m+B,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("internalStorage",Oa);
+mxUtils.extend(Va,mxActor);Va.prototype.dx=20;Va.prototype.dy=20;Va.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint(m,x),
+new mxPoint(m,v),new mxPoint(0,v)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("corner",Va);mxUtils.extend(Ja,mxActor);Ja.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.lineTo(0,v);c.end();c.moveTo(p,0);c.lineTo(p,v);c.end();c.moveTo(0,v/2);c.lineTo(p,v/2);c.end()};mxCellRenderer.registerShape("crossbar",Ja);mxUtils.extend(cb,mxActor);cb.prototype.dx=20;cb.prototype.dy=20;cb.prototype.redrawPath=function(c,m,x,p,v){m=Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"dx",this.dx))));x=Math.max(0,Math.min(v,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));parseFloat(mxUtils.getValue(this.style,"size",this.size));var A=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,x),new mxPoint((p+m)/2,x),new mxPoint((p+m)/2,v),new mxPoint((p-m)/2,v),new mxPoint((p-m)/2,x),new mxPoint(0,x)],this.isRounded,A,!0);c.end()};mxCellRenderer.registerShape("tee",cb);mxUtils.extend($a,
+mxActor);$a.prototype.arrowWidth=.3;$a.prototype.arrowSize=.2;$a.prototype.redrawPath=function(c,m,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth))));m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,x),new mxPoint(p-m,x),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-
+m,v),new mxPoint(p-m,A),new mxPoint(0,A)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("singleArrow",$a);mxUtils.extend(y,mxActor);y.prototype.redrawPath=function(c,m,x,p,v){var A=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth))));m=p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));x=(v-A)/2;A=x+A;var B=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/
+2;this.addPoints(c,[new mxPoint(0,v/2),new mxPoint(m,0),new mxPoint(m,x),new mxPoint(p-m,x),new mxPoint(p-m,0),new mxPoint(p,v/2),new mxPoint(p-m,v),new mxPoint(p-m,A),new mxPoint(m,A),new mxPoint(m,v)],this.isRounded,B,!0);c.end()};mxCellRenderer.registerShape("doubleArrow",y);mxUtils.extend(K,mxActor);K.prototype.size=.1;K.prototype.fixedSize=20;K.prototype.redrawPath=function(c,m,x,p,v){m="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,
+"size",this.fixedSize)))):p*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(m,0);c.lineTo(p,0);c.quadTo(p-2*m,v/2,p,v);c.lineTo(m,v);c.quadTo(m-2*m,v/2,m,0);c.close();c.end()};mxCellRenderer.registerShape("dataStorage",K);mxUtils.extend(N,mxActor);N.prototype.redrawPath=function(c,m,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.close();c.end()};mxCellRenderer.registerShape("or",N);mxUtils.extend(T,mxActor);T.prototype.redrawPath=function(c,
+m,x,p,v){c.moveTo(0,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,0,v);c.quadTo(p/2,v/2,0,0);c.close();c.end()};mxCellRenderer.registerShape("xor",T);mxUtils.extend(U,mxActor);U.prototype.size=20;U.prototype.isRoundable=function(){return!0};U.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p/2,Math.min(v,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(p-m,0),new mxPoint(p,
+.8*m),new mxPoint(p,v),new mxPoint(0,v),new mxPoint(0,.8*m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("loopLimit",U);mxUtils.extend(W,mxActor);W.prototype.size=.375;W.prototype.isRoundable=function(){return!0};W.prototype.redrawPath=function(c,m,x,p,v){m=v*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));x=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,0),new mxPoint(p,0),new mxPoint(p,
+v-m),new mxPoint(p/2,v),new mxPoint(0,v-m)],this.isRounded,x,!0);c.end()};mxCellRenderer.registerShape("offPageConnector",W);mxUtils.extend(na,mxEllipse);na.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.begin();c.moveTo(m+p/2,x+v);c.lineTo(m+p,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("tapeData",na);mxUtils.extend(wa,mxEllipse);wa.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,
+arguments);c.setShadow(!1);c.begin();c.moveTo(m,x+v/2);c.lineTo(m+p,x+v/2);c.end();c.stroke();c.begin();c.moveTo(m+p/2,x);c.lineTo(m+p/2,x+v);c.end();c.stroke()};mxCellRenderer.registerShape("orEllipse",wa);mxUtils.extend(ra,mxEllipse);ra.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m+.145*p,x+.145*v);c.lineTo(m+.855*p,x+.855*v);c.end();c.stroke();c.begin();c.moveTo(m+.855*p,x+.145*v);c.lineTo(m+.145*p,
+x+.855*v);c.end();c.stroke()};mxCellRenderer.registerShape("sumEllipse",ra);mxUtils.extend(xa,mxRhombus);xa.prototype.paintVertexShape=function(c,m,x,p,v){mxRhombus.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();c.moveTo(m,x+v/2);c.lineTo(m+p,x+v/2);c.end();c.stroke()};mxCellRenderer.registerShape("sortShape",xa);mxUtils.extend(Ea,mxEllipse);Ea.prototype.paintVertexShape=function(c,m,x,p,v){c.begin();c.moveTo(m,x);c.lineTo(m+p,x);c.lineTo(m+p/2,x+v/2);c.close();c.fillAndStroke();
+c.begin();c.moveTo(m,x+v);c.lineTo(m+p,x+v);c.lineTo(m+p/2,x+v/2);c.close();c.fillAndStroke()};mxCellRenderer.registerShape("collate",Ea);mxUtils.extend(Na,mxEllipse);Na.prototype.paintVertexShape=function(c,m,x,p,v){var A=c.state.strokeWidth/2,B=10+2*A,ha=x+v-B/2;c.begin();c.moveTo(m,x);c.lineTo(m,x+v);c.moveTo(m+A,ha);c.lineTo(m+A+B,ha-B/2);c.moveTo(m+A,ha);c.lineTo(m+A+B,ha+B/2);c.moveTo(m+A,ha);c.lineTo(m+p-A,ha);c.moveTo(m+p,x);c.lineTo(m+p,x+v);c.moveTo(m+p-A,ha);c.lineTo(m+p-B-A,ha-B/2);c.moveTo(m+
+p-A,ha);c.lineTo(m+p-B-A,ha+B/2);c.end();c.stroke()};mxCellRenderer.registerShape("dimension",Na);mxUtils.extend(Ma,mxEllipse);Ma.prototype.drawHidden=!0;Ma.prototype.paintVertexShape=function(c,m,x,p,v){this.outline||c.setStrokeColor(null);if(null!=this.style){var A=c.pointerEvents,B=null!=this.fill&&this.fill!=mxConstants.NONE;"1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1")||B||(c.pointerEvents=!1);var ha="1"==mxUtils.getValue(this.style,"top","1"),J="1"==mxUtils.getValue(this.style,
+"left","1"),va="1"==mxUtils.getValue(this.style,"right","1"),oa="1"==mxUtils.getValue(this.style,"bottom","1");this.drawHidden||B||this.outline||ha||va||oa||J?(c.rect(m,x,p,v),c.fill(),c.pointerEvents=A,c.setStrokeColor(this.stroke),c.setLineCap("square"),c.begin(),c.moveTo(m,x),this.outline||ha?c.lineTo(m+p,x):c.moveTo(m+p,x),this.outline||va?c.lineTo(m+p,x+v):c.moveTo(m+p,x+v),this.outline||oa?c.lineTo(m,x+v):c.moveTo(m,x+v),(this.outline||J)&&c.lineTo(m,x),c.end(),c.stroke(),c.setLineCap("flat")):
+c.setStrokeColor(this.stroke)}};mxCellRenderer.registerShape("partialRectangle",Ma);mxUtils.extend(za,mxEllipse);za.prototype.paintVertexShape=function(c,m,x,p,v){mxEllipse.prototype.paintVertexShape.apply(this,arguments);c.setShadow(!1);c.begin();"vertical"==mxUtils.getValue(this.style,"line")?(c.moveTo(m+p/2,x),c.lineTo(m+p/2,x+v)):(c.moveTo(m,x+v/2),c.lineTo(m+p,x+v/2));c.end();c.stroke()};mxCellRenderer.registerShape("lineEllipse",za);mxUtils.extend(Ba,mxActor);Ba.prototype.redrawPath=function(c,
+m,x,p,v){m=Math.min(p,v/2);c.moveTo(0,0);c.lineTo(p-m,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-m,v);c.lineTo(0,v);c.close();c.end()};mxCellRenderer.registerShape("delay",Ba);mxUtils.extend(Ca,mxActor);Ca.prototype.size=.2;Ca.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(v,p);var A=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(v-A)/2;x=m+A;var B=(p-A)/2;A=B+A;c.moveTo(0,m);c.lineTo(B,m);c.lineTo(B,0);c.lineTo(A,0);c.lineTo(A,m);c.lineTo(p,m);c.lineTo(p,x);
+c.lineTo(A,x);c.lineTo(A,v);c.lineTo(B,v);c.lineTo(B,x);c.lineTo(0,x);c.close();c.end()};mxCellRenderer.registerShape("cross",Ca);mxUtils.extend(ya,mxActor);ya.prototype.size=.25;ya.prototype.redrawPath=function(c,m,x,p,v){m=Math.min(p,v/2);x=Math.min(p-m,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*p);c.moveTo(0,v/2);c.lineTo(x,0);c.lineTo(p-m,0);c.quadTo(p,0,p,v/2);c.quadTo(p,v,p-m,v);c.lineTo(x,v);c.close();c.end()};mxCellRenderer.registerShape("display",ya);mxUtils.extend(Ga,
+mxActor);Ga.prototype.cst={RECT2:"mxgraph.basic.rect"};Ga.prototype.customProperties=[{name:"rectStyle",dispName:"Style",type:"enum",defVal:"square",enumList:[{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"size",dispName:"Corner Size",type:"float",defVal:10},{name:"absoluteCornerSize",dispName:"Abs. Corner Size",type:"bool",defVal:!0},{name:"indent",dispName:"Indent",type:"float",
defVal:2},{name:"rectOutline",dispName:"Outline",type:"enum",defVal:"single",enumList:[{val:"single",dispName:"Single"},{val:"double",dispName:"Double"},{val:"frame",dispName:"Frame"}]},{name:"fillColor2",dispName:"Inside Fill Color",type:"color",defVal:"none"},{name:"gradientColor2",dispName:"Inside Gradient Color",type:"color",defVal:"none"},{name:"gradientDirection2",dispName:"Inside Gradient Direction",type:"enum",defVal:"south",enumList:[{val:"south",dispName:"South"},{val:"west",dispName:"West"},
{val:"north",dispName:"North"},{val:"east",dispName:"East"}]},{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"right",dispName:"Right",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left ",type:"bool",defVal:!0},{name:"topLeftStyle",dispName:"Top Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},
{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"topRightStyle",dispName:"Top Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomRightStyle",dispName:"Bottom Right Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",
-dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];xa.prototype.paintVertexShape=function(c,l,x,p,v){c.translate(l,
-x);this.strictDrawShape(c,0,0,p,v)};xa.prototype.strictDrawShape=function(c,l,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ka=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),J=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),wa=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),oa=A&&A.indent?
-A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),ab=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),jb=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),gb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,oa)),Ea=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),La=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ia=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ga=A&&A.left?A.left:
-mxUtils.getValue(this.style,"left",!0),Ta=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Xa=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ya=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),$a=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
+dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]},{name:"bottomLeftStyle",dispName:"Bottom Left Style",type:"enum",defVal:"default",enumList:[{val:"default",dispName:"Default"},{val:"square",dispName:"Square"},{val:"rounded",dispName:"Round"},{val:"snip",dispName:"Snip"},{val:"invRound",dispName:"Inv. Round"},{val:"fold",dispName:"Fold"}]}];Ga.prototype.paintVertexShape=function(c,m,x,p,v){c.translate(m,
+x);this.strictDrawShape(c,0,0,p,v)};Ga.prototype.strictDrawShape=function(c,m,x,p,v,A){var B=A&&A.rectStyle?A.rectStyle:mxUtils.getValue(this.style,"rectStyle",this.rectStyle),ha=A&&A.absoluteCornerSize?A.absoluteCornerSize:mxUtils.getValue(this.style,"absoluteCornerSize",this.absoluteCornerSize),J=A&&A.size?A.size:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),va=A&&A.rectOutline?A.rectOutline:mxUtils.getValue(this.style,"rectOutline",this.rectOutline),oa=A&&A.indent?
+A.indent:Math.max(0,Math.min(p,parseFloat(mxUtils.getValue(this.style,"indent",this.indent)))),Xa=A&&A.dashed?A.dashed:mxUtils.getValue(this.style,"dashed",!1),ib=A&&A.dashPattern?A.dashPattern:mxUtils.getValue(this.style,"dashPattern",null),gb=A&&A.relIndent?A.relIndent:Math.max(0,Math.min(50,oa)),Ha=A&&A.top?A.top:mxUtils.getValue(this.style,"top",!0),La=A&&A.right?A.right:mxUtils.getValue(this.style,"right",!0),Ka=A&&A.bottom?A.bottom:mxUtils.getValue(this.style,"bottom",!0),Ia=A&&A.left?A.left:
+mxUtils.getValue(this.style,"left",!0),Qa=A&&A.topLeftStyle?A.topLeftStyle:mxUtils.getValue(this.style,"topLeftStyle","default"),Ta=A&&A.topRightStyle?A.topRightStyle:mxUtils.getValue(this.style,"topRightStyle","default"),Ua=A&&A.bottomRightStyle?A.bottomRightStyle:mxUtils.getValue(this.style,"bottomRightStyle","default"),Wa=A&&A.bottomLeftStyle?A.bottomLeftStyle:mxUtils.getValue(this.style,"bottomLeftStyle","default"),Eb=A&&A.fillColor?A.fillColor:mxUtils.getValue(this.style,"fillColor","#ffffff");
A&&A.strokeColor||mxUtils.getValue(this.style,"strokeColor","#000000");var Fb=A&&A.strokeWidth?A.strokeWidth:mxUtils.getValue(this.style,"strokeWidth","1"),Cb=A&&A.fillColor2?A.fillColor2:mxUtils.getValue(this.style,"fillColor2","none"),Db=A&&A.gradientColor2?A.gradientColor2:mxUtils.getValue(this.style,"gradientColor2","none"),Gb=A&&A.gradientDirection2?A.gradientDirection2:mxUtils.getValue(this.style,"gradientDirection2","south"),Hb=A&&A.opacity?A.opacity:mxUtils.getValue(this.style,"opacity","100"),
-Ib=Math.max(0,Math.min(50,J));A=xa.prototype;c.setDashed(ab);jb&&""!=jb&&c.setDashPattern(jb);c.setStrokeWidth(Fb);J=Math.min(.5*v,.5*p,J);ka||(J=Ib*Math.min(p,v)/100);J=Math.min(J,.5*Math.min(p,v));ka||(oa=Math.min(gb*Math.min(p,v)/100));oa=Math.min(oa,.5*Math.min(p,v)-J);(Ea||La||Ia||Ga)&&"frame"!=wa&&(c.begin(),Ea?A.moveNW(c,l,x,p,v,B,Ta,J,Ga):c.moveTo(0,0),Ea&&A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),La&&A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),Ia&&
-A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),Ga&&A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),ab=ka=Hb,"none"==Cb&&(ka=0),"none"==Db&&(ab=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ka,ab),c.begin(),Ea?A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga):c.moveTo(oa,0),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),Ga&&Ia&&A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),Ia&&La&&A.paintSEInner(c,
-l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),La&&Ea&&A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),Ea&&Ga&&A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,l,x,p,v,B,Ta,Xa,Ya,$a,J,Ea,La,Ia,Ga),c.stroke()));Ea||La||Ia||!Ga?Ea||La||!Ia||Ga?!Ea&&!La&&Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==
-wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),
-c.fillAndStroke()):Ea||!La||Ia||Ga?!Ea&&La&&!Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,
-J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):!Ea&&La&&Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,
-l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):!Ea&&
-La&&Ia&&Ga?"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):!Ea||La||Ia||Ga?
-Ea&&!La&&!Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,
-l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke()):Ea&&!La&&Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,
-J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),c.fillAndStroke()):Ea&&!La&&Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,
-J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,
-x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),c.fillAndStroke()):Ea&&La&&!Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,
-l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,
-l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke()):Ea&&La&&!Ia&&Ga?"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,
-l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,
-v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke()):Ea&&La&&Ia&&!Ga?"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,
-l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke()):
-Ea&&La&&Ia&&Ga&&("frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),c.close(),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,
-B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close()),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.paintNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.paintSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.paintSW(c,l,x,p,v,B,$a,J,Ia),
-A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),c.close(),A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintSWInner(c,l,x,p,v,B,$a,J,oa,Ia),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),A.paintSEInner(c,l,x,p,v,B,Ya,J,oa),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),A.paintNEInner(c,l,x,p,v,B,Xa,J,oa),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),A.paintNWInner(c,l,x,p,v,B,Ta,J,oa),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke())):"frame"!=wa?(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,
-l,x,p,v,B,Xa,J,La),"double"==wa&&(A.moveNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea)),c.stroke()):(c.begin(),A.moveNW(c,l,x,p,v,B,Ta,J,Ga),A.paintTop(c,l,x,p,v,B,Xa,J,La),A.lineNEInner(c,l,x,p,v,B,Xa,J,oa,La),A.paintTopInner(c,l,x,p,v,B,Ta,J,oa,Ga,Ea),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),"double"==wa&&(A.moveSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La)),c.stroke()):
-(c.begin(),A.moveNE(c,l,x,p,v,B,Xa,J,Ea),A.paintRight(c,l,x,p,v,B,Ya,J,Ia),A.lineSEInner(c,l,x,p,v,B,Ya,J,oa,Ia),A.paintRightInner(c,l,x,p,v,B,Xa,J,oa,Ea,La),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),"double"==wa&&(A.moveSWInner(c,l,x,p,v,B,$a,J,oa,Ga),A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia)),c.stroke()):(c.begin(),A.moveSE(c,l,x,p,v,B,Ya,J,La),A.paintBottom(c,l,x,p,v,B,$a,J,Ga),A.lineSWInner(c,l,x,p,v,B,$a,J,oa,Ga),
-A.paintBottomInner(c,l,x,p,v,B,Ya,J,oa,La,Ia),c.close(),c.fillAndStroke()):"frame"!=wa?(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),"double"==wa&&(A.moveNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga)),c.stroke()):(c.begin(),A.moveSW(c,l,x,p,v,B,Ta,J,Ia),A.paintLeft(c,l,x,p,v,B,Ta,J,Ea),A.lineNWInner(c,l,x,p,v,B,Ta,J,oa,Ea,Ga),A.paintLeftInner(c,l,x,p,v,B,$a,J,oa,Ia,Ga),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,l,x,p,v,B,Ta,Xa,
-Ya,$a,J,Ea,La,Ia,Ga);c.stroke()};xa.prototype.moveNW=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,0):c.moveTo(0,ka)};xa.prototype.moveNE=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,0):c.moveTo(p-ka,0)};xa.prototype.moveSE=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,v):c.moveTo(p,v-ka)};xa.prototype.moveSW=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,
-v):c.moveTo(ka,v)};xa.prototype.paintNW=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,ka,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ka,0);else c.lineTo(0,0)};xa.prototype.paintTop=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,0):c.lineTo(p-ka,0)};xa.prototype.paintNE=
-function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,p,ka)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ka);else c.lineTo(p,0)};xa.prototype.paintRight=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,v):c.lineTo(p,v-ka)};xa.prototype.paintLeft=function(c,l,x,p,v,A,B,ka,J){"square"==
-B||"default"==B&&"square"==A||!J?c.lineTo(0,0):c.lineTo(0,ka)};xa.prototype.paintSE=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,p-ka,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ka,v);else c.lineTo(p,v)};xa.prototype.paintBottom=function(c,l,x,p,v,A,B,ka,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(0,
-v):c.lineTo(ka,v)};xa.prototype.paintSW=function(c,l,x,p,v,A,B,ka,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){l=0;if("rounded"==B||"default"==B&&"rounded"==A)l=1;c.arcTo(ka,ka,0,0,l,0,v-ka)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ka);else c.lineTo(0,v)};xa.prototype.paintNWInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,J,.5*J+ka);else if("invRound"==
-B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,J,J+ka);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(J,.5*J+ka);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ka,J+ka),c.lineTo(J,J+ka)};xa.prototype.paintTopInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(0,J):wa&&!oa?c.lineTo(J,0):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ka+.5*J,J):c.lineTo(ka+J,J):c.lineTo(0,
-J):c.lineTo(0,0)};xa.prototype.paintNEInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,p-ka-.5*J,J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,p-ka-J,J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ka-.5*J,J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ka-J,ka+J),c.lineTo(p-ka-J,J)};xa.prototype.paintRightInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(p-J,0):wa&&!oa?c.lineTo(p,
-J):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ka+.5*J):c.lineTo(p-J,ka+J):c.lineTo(p-J,0):c.lineTo(p,0)};xa.prototype.paintLeftInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(J,v):wa&&!oa?c.lineTo(0,v-J):wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ka-.5*J):c.lineTo(J,v-ka-J):
-c.lineTo(J,v):c.lineTo(0,v)};xa.prototype.paintSEInner=function(c,l,x,p,v,A,B,ka,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,p-J,v-ka-.5*J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ka+J,ka+J,0,0,1,p-J,v-ka-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-J,v-ka-.5*J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ka-J,v-ka-J),c.lineTo(p-J,v-ka-J)};xa.prototype.paintBottomInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(p,
-v-J):wa&&!oa?c.lineTo(p-J,v):"square"==B||"default"==B&&"square"==A||!wa?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ka-.5*J,v-J):c.lineTo(p-ka-J,v-J):c.lineTo(p,v)};xa.prototype.paintSWInner=function(c,l,x,p,v,A,B,ka,J,wa){if(!wa)c.lineTo(J,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(J,v-J);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ka-.5*J,ka-.5*J,0,0,0,ka+.5*J,v-J);else if("invRound"==B||"default"==B&&"invRound"==
-A)c.arcTo(ka+J,ka+J,0,0,1,ka+J,v-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ka+.5*J,v-J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ka,v-ka-J),c.lineTo(J+ka,v-J)};xa.prototype.moveSWInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(J,v-ka-J):
-c.moveTo(0,v-J)};xa.prototype.lineSWInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,v-ka-J):c.lineTo(0,v-J)};xa.prototype.moveSEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.moveTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,v-ka-J):c.moveTo(p-J,v)};xa.prototype.lineSEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,v-ka-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,v-ka-J):
-c.lineTo(p-J,v)};xa.prototype.moveNEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.moveTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,ka+J):c.moveTo(p,J)};xa.prototype.lineNEInner=function(c,l,x,p,v,A,B,ka,J,wa){wa?"square"==B||"default"==B&&"square"==A||wa?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==
-A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,ka+J):c.lineTo(p,J)};xa.prototype.moveNWInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.moveTo(J,0):wa&&!oa?c.moveTo(0,J):"square"==B||"default"==B&&"square"==A?c.moveTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
-B&&"fold"==A)&&c.moveTo(J,ka+J):c.moveTo(0,0)};xa.prototype.lineNWInner=function(c,l,x,p,v,A,B,ka,J,wa,oa){wa||oa?!wa&&oa?c.lineTo(J,0):wa&&!oa?c.lineTo(0,J):"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,ka+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,ka+J):c.lineTo(0,0)};xa.prototype.paintFolds=function(c,l,x,p,v,A,B,ka,J,wa,oa,ab,jb,gb,Ea){if("fold"==
-A||"fold"==B||"fold"==ka||"fold"==J||"fold"==wa)("fold"==B||"default"==B&&"fold"==A)&&ab&&Ea&&(c.moveTo(0,oa),c.lineTo(oa,oa),c.lineTo(oa,0)),("fold"==ka||"default"==ka&&"fold"==A)&&ab&&jb&&(c.moveTo(p-oa,0),c.lineTo(p-oa,oa),c.lineTo(p,oa)),("fold"==J||"default"==J&&"fold"==A)&&gb&&jb&&(c.moveTo(p-oa,v),c.lineTo(p-oa,v-oa),c.lineTo(p,v-oa)),("fold"==wa||"default"==wa&&"fold"==A)&&gb&&Ea&&(c.moveTo(0,v-oa),c.lineTo(oa,v-oa),c.lineTo(oa,v))};mxCellRenderer.registerShape(xa.prototype.cst.RECT2,xa);
-xa.prototype.constraints=null;mxUtils.extend(Ba,mxConnector);Ba.prototype.origPaintEdgeShape=Ba.prototype.paintEdgeShape;Ba.prototype.paintEdgeShape=function(c,l,x){for(var p=[],v=0;v<l.length;v++)p.push(mxUtils.clone(l[v]));v=c.state.dashed;var A=c.state.fixDash;Ba.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Ba.prototype.origPaintEdgeShape.apply(this,
-[c,l,x])))};mxCellRenderer.registerShape("filledEdge",Ba);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var l=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==l.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,l,x,p,v,A,B,ka,J,wa){var oa=v*(B+J+1),ab=A*(B+J+1);return function(){c.begin();
-c.moveTo(p.x-oa/2-ab/2,p.y-ab/2+oa/2);c.lineTo(p.x+ab/2-3*oa/2,p.y-3*ab/2-oa/2);c.stroke()}});mxMarker.addMarker("box",function(c,l,x,p,v,A,B,ka,J,wa){var oa=v*(B+J+1),ab=A*(B+J+1),jb=p.x+oa/2,gb=p.y+ab/2;p.x-=oa;p.y-=ab;return function(){c.begin();c.moveTo(jb-oa/2-ab/2,gb-ab/2+oa/2);c.lineTo(jb-oa/2+ab/2,gb-ab/2-oa/2);c.lineTo(jb+ab/2-3*oa/2,gb-3*ab/2-oa/2);c.lineTo(jb-ab/2-3*oa/2,gb-3*ab/2+oa/2);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,l,x,p,v,A,B,ka,J,
-wa){var oa=v*(B+J+1),ab=A*(B+J+1);return function(){c.begin();c.moveTo(p.x-oa/2-ab/2,p.y-ab/2+oa/2);c.lineTo(p.x+ab/2-3*oa/2,p.y-3*ab/2-oa/2);c.moveTo(p.x-oa/2+ab/2,p.y-ab/2-oa/2);c.lineTo(p.x-ab/2-3*oa/2,p.y-3*ab/2+oa/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,l,x,p,v,A,B,ka,J,wa){var oa=p.clone(),ab=Pa.apply(this,arguments),jb=v*(B+2*J),gb=A*(B+2*J);return function(){ab.apply(this,arguments);c.begin();c.moveTo(oa.x-v*J,oa.y-A*J);c.lineTo(oa.x-2*jb+
-v*J,oa.y-2*gb+A*J);c.moveTo(oa.x-jb-gb+A*J,oa.y-gb+jb-v*J);c.lineTo(oa.x+gb-jb-A*J,oa.y-gb-jb+v*J);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,l,x,p,v,A,B,ka,J,wa){var oa=v*(B+J+1),ab=A*(B+J+1),jb=p.clone();p.x-=oa;p.y-=ab;return function(){c.begin();c.moveTo(jb.x-ab,jb.y+oa);c.quadTo(p.x-ab,p.y+oa,p.x,p.y);c.quadTo(p.x+ab,p.y-oa,jb.x+ab,jb.y-oa);c.stroke()}});mxMarker.addMarker("async",function(c,l,x,p,v,A,B,ka,J,wa){l=v*J*1.118;x=A*J*1.118;v*=B+J;A*=B+J;var oa=p.clone();oa.x-=l;oa.y-=
-x;p.x+=-v-l;p.y+=-A-x;return function(){c.begin();c.moveTo(oa.x,oa.y);ka?c.lineTo(oa.x-v-A/2,oa.y-A+v/2):c.lineTo(oa.x+A/2-v,oa.y-A-v/2);c.lineTo(oa.x-v,oa.y-A);c.close();wa?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(l,x,p,v,A,B,ka,J,wa,oa){A*=ka+wa;B*=ka+wa;var ab=v.clone();return function(){l.begin();l.moveTo(ab.x,ab.y);J?l.lineTo(ab.x-A-B/c,ab.y-B+A/c):l.lineTo(ab.x+B/c-A,ab.y-B-A/c);l.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var kb=
-function(c,l,x){return ib(c,["width"],l,function(p,v,A,B,ka){ka=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ka/2,B.y+A*p/4-v*ka/2)},function(p,v,A,B,ka,J){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));c.style.width=Math.round(2*p)/c.view.scale-x})},ib=function(c,l,x,p,v){return fb(c,l,function(A){var B=c.absolutePoints,ka=B.length-1;A=c.view.translate;var J=c.view.scale,wa=x?B[0]:B[ka];B=x?B[1]:B[ka-1];ka=B.x-wa.x;var oa=B.y-wa.y,ab=Math.sqrt(ka*ka+oa*oa);wa=
-p.call(this,ab,ka/ab,oa/ab,wa,B);return new mxPoint(wa.x/J-A.x,wa.y/J-A.y)},function(A,B,ka){var J=c.absolutePoints,wa=J.length-1;A=c.view.translate;var oa=c.view.scale,ab=x?J[0]:J[wa];J=x?J[1]:J[wa-1];wa=J.x-ab.x;var jb=J.y-ab.y,gb=Math.sqrt(wa*wa+jb*jb);B.x=(B.x+A.x)*oa;B.y=(B.y+A.y)*oa;v.call(this,gb,wa/gb,jb/gb,ab,J,B,ka)})},pb=function(c){return function(l){return[fb(l,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",cb.prototype.arrowWidth))),
-v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",cb.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(l){return[fb(l,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
-c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},ob=function(c,l,x){return function(p){var v=[fb(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",l)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
-!1)&&v.push(qb(p));return v}},Bb=function(c,l,x,p,v){x=null!=x?x:.5;return function(A){var B=[fb(A,["size"],function(ka){var J=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,wa=parseFloat(mxUtils.getValue(this.state.style,"size",J?v:c));return new mxPoint(ka.x+Math.max(0,Math.min(.5*ka.width,wa*(J?1:ka.width))),ka.getCenterY())},function(ka,J,wa){ka=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?J.x-ka.x:Math.max(0,Math.min(x,(J.x-ka.x)/ka.width));this.state.style.size=
-ka},!1,p)];l&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(qb(A));return B}},yb=function(c,l,x){c=null!=c?c:.5;return function(p){var v=[fb(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ka=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:l)));return new mxPoint(A.x+Math.min(.75*A.width*c,ka*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
-A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(qb(p));return v}},nb=function(){return function(c){var l=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l}},qb=function(c,l){return fb(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=l?l:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
+Ib=Math.max(0,Math.min(50,J));A=Ga.prototype;c.setDashed(Xa);ib&&""!=ib&&c.setDashPattern(ib);c.setStrokeWidth(Fb);J=Math.min(.5*v,.5*p,J);ha||(J=Ib*Math.min(p,v)/100);J=Math.min(J,.5*Math.min(p,v));ha||(oa=Math.min(gb*Math.min(p,v)/100));oa=Math.min(oa,.5*Math.min(p,v)-J);(Ha||La||Ka||Ia)&&"frame"!=va&&(c.begin(),Ha?A.moveNW(c,m,x,p,v,B,Qa,J,Ia):c.moveTo(0,0),Ha&&A.paintNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),La&&A.paintNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),Ka&&
+A.paintSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),Ia&&A.paintSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),c.close(),c.fill(),c.setShadow(!1),c.setFillColor(Cb),Xa=ha=Hb,"none"==Cb&&(ha=0),"none"==Db&&(Xa=0),c.setGradient(Cb,Db,0,0,p,v,Gb,ha,Xa),c.begin(),Ha?A.moveNWInner(c,m,x,p,v,B,Qa,J,oa,Ha,Ia):c.moveTo(oa,0),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),Ia&&Ka&&A.paintSWInner(c,m,x,p,v,B,Wa,J,oa,Ka),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),Ka&&La&&A.paintSEInner(c,
+m,x,p,v,B,Ua,J,oa),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),La&&Ha&&A.paintNEInner(c,m,x,p,v,B,Ta,J,oa),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),Ha&&Ia&&A.paintNWInner(c,m,x,p,v,B,Qa,J,oa),c.fill(),"none"==Eb&&(c.begin(),A.paintFolds(c,m,x,p,v,B,Qa,Ta,Ua,Wa,J,Ha,La,Ka,Ia),c.stroke()));Ha||La||Ka||!Ia?Ha||La||!Ka||Ia?!Ha&&!La&&Ka&&Ia?"frame"!=va?(c.begin(),A.moveSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),A.paintSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),"double"==
+va&&(A.moveNWInner(c,m,x,p,v,B,Qa,J,oa,Ha,Ia),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSWInner(c,m,x,p,v,B,Wa,J,oa,Ka),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),A.paintSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),A.lineNWInner(c,m,x,p,v,B,Qa,J,oa,Ha,Ia),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSWInner(c,m,x,p,v,B,Wa,J,oa,Ka),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),c.close(),
+c.fillAndStroke()):Ha||!La||Ka||Ia?!Ha&&La&&!Ka&&Ia?"frame"!=va?(c.begin(),A.moveSW(c,m,x,p,v,B,Qa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),"double"==va&&(A.moveNWInner(c,m,x,p,v,B,Qa,J,oa,Ha,Ia),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),"double"==va&&(A.moveSEInner(c,m,x,p,v,B,Ua,J,oa,Ka),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Qa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,
+J,Ha),A.lineNWInner(c,m,x,p,v,B,Qa,J,oa,Ha,Ia),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke(),c.begin(),A.moveNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.lineSEInner(c,m,x,p,v,B,Ua,J,oa,Ka),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),c.close(),c.fillAndStroke()):!Ha&&La&&Ka&&!Ia?"frame"!=va?(c.begin(),A.moveNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.paintSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),"double"==va&&(A.moveSWInner(c,
+m,x,p,v,B,Wa,J,oa,Ia),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),A.paintSEInner(c,m,x,p,v,B,Ua,J,oa),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La)),c.stroke()):(c.begin(),A.moveNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.paintSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),A.lineSWInner(c,m,x,p,v,B,Wa,J,oa,Ia),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),A.paintSEInner(c,m,x,p,v,B,Ua,J,oa),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),c.close(),c.fillAndStroke()):!Ha&&
+La&&Ka&&Ia?"frame"!=va?(c.begin(),A.moveNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.paintSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),A.paintSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),"double"==va&&(A.moveNWInner(c,m,x,p,v,B,Qa,J,oa,Ha,Ia),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSWInner(c,m,x,p,v,B,Wa,J,oa,Ka),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),A.paintSEInner(c,m,x,p,v,B,Ua,J,oa),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La)),c.stroke()):
+(c.begin(),A.moveNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.paintSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),A.paintSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),A.lineNWInner(c,m,x,p,v,B,Qa,J,oa,Ha,Ia),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSWInner(c,m,x,p,v,B,Wa,J,oa,Ka),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),A.paintSEInner(c,m,x,p,v,B,Ua,J,oa),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),c.close(),c.fillAndStroke()):!Ha||La||Ka||Ia?
+Ha&&!La&&!Ka&&Ia?"frame"!=va?(c.begin(),A.moveSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),A.paintNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),"double"==va&&(A.moveNEInner(c,m,x,p,v,B,Ta,J,oa,La),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),A.paintNWInner(c,m,x,p,v,B,Qa,J,oa),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),A.paintNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),A.lineNEInner(c,
+m,x,p,v,B,Ta,J,oa,La),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),A.paintNWInner(c,m,x,p,v,B,Qa,J,oa),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke()):Ha&&!La&&Ka&&!Ia?"frame"!=va?(c.begin(),A.moveNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),"double"==va&&(A.moveNEInner(c,m,x,p,v,B,Ta,J,oa,La),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha)),c.stroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),"double"==va&&(A.moveSWInner(c,m,x,p,v,B,Wa,
+J,oa,Ia),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),A.lineNEInner(c,m,x,p,v,B,Ta,J,oa,La),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),c.close(),c.fillAndStroke(),c.begin(),A.moveSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),A.lineSWInner(c,m,x,p,v,B,Wa,J,oa,Ia),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),c.close(),c.fillAndStroke()):Ha&&!La&&Ka&&Ia?"frame"!=va?(c.begin(),A.moveSE(c,m,x,p,v,B,Ua,
+J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),A.paintSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),A.paintNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),"double"==va&&(A.moveNEInner(c,m,x,p,v,B,Ta,J,oa,La),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),A.paintNWInner(c,m,x,p,v,B,Qa,J,oa),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSWInner(c,m,x,p,v,B,Wa,J,oa,Ka),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,
+x,p,v,B,Wa,J,Ia),A.paintSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),A.paintNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),A.lineNEInner(c,m,x,p,v,B,Ta,J,oa,La),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),A.paintNWInner(c,m,x,p,v,B,Qa,J,oa),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),A.paintSWInner(c,m,x,p,v,B,Wa,J,oa,Ka),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),c.close(),c.fillAndStroke()):Ha&&La&&!Ka&&!Ia?"frame"!=va?(c.begin(),A.moveNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,
+m,x,p,v,B,Ta,J,La),A.paintNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),"double"==va&&(A.moveSEInner(c,m,x,p,v,B,Ua,J,oa,Ka),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),A.paintNEInner(c,m,x,p,v,B,Ta,J,oa),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),A.paintNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.lineSEInner(c,m,x,p,v,B,Ua,J,oa,Ka),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),A.paintNEInner(c,
+m,x,p,v,B,Ta,J,oa),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),c.close(),c.fillAndStroke()):Ha&&La&&!Ka&&Ia?"frame"!=va?(c.begin(),A.moveSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),A.paintNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),A.paintNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),"double"==va&&(A.moveSEInner(c,m,x,p,v,B,Ua,J,oa,Ka),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),A.paintNEInner(c,m,x,p,v,B,Ta,J,oa),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),A.paintNWInner(c,
+m,x,p,v,B,Qa,J,oa),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),A.paintNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),A.paintNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.lineSEInner(c,m,x,p,v,B,Ua,J,oa,Ka),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),A.paintNEInner(c,m,x,p,v,B,Ta,J,oa),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),A.paintNWInner(c,m,x,p,v,B,Qa,J,oa),A.paintLeftInner(c,m,x,p,
+v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke()):Ha&&La&&Ka&&!Ia?"frame"!=va?(c.begin(),A.moveNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),A.paintNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.paintSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),"double"==va&&(A.moveSWInner(c,m,x,p,v,B,Wa,J,oa,Ia),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),A.paintSEInner(c,m,x,p,v,B,Ua,J,oa),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),A.paintNEInner(c,m,x,p,v,B,Ta,J,oa),A.paintTopInner(c,
+m,x,p,v,B,Qa,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),A.paintNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.paintSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),A.lineSWInner(c,m,x,p,v,B,Wa,J,oa,Ia),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),A.paintSEInner(c,m,x,p,v,B,Ua,J,oa),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),A.paintNEInner(c,m,x,p,v,B,Ta,J,oa),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),c.close(),c.fillAndStroke()):
+Ha&&La&&Ka&&Ia&&("frame"!=va?(c.begin(),A.moveNW(c,m,x,p,v,B,Qa,J,Ia),A.paintNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),A.paintNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.paintSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),A.paintSW(c,m,x,p,v,B,Wa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),c.close(),"double"==va&&(A.moveSWInner(c,m,x,p,v,B,Wa,J,oa,Ia),A.paintSWInner(c,m,x,p,v,B,Wa,J,oa,Ka),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),A.paintSEInner(c,m,x,p,v,
+B,Ua,J,oa),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),A.paintNEInner(c,m,x,p,v,B,Ta,J,oa),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),A.paintNWInner(c,m,x,p,v,B,Qa,J,oa),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),c.close()),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Qa,J,Ia),A.paintNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),A.paintNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.paintSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),A.paintSW(c,m,x,p,v,B,Wa,J,Ka),
+A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),c.close(),A.moveSWInner(c,m,x,p,v,B,Wa,J,oa,Ia),A.paintSWInner(c,m,x,p,v,B,Wa,J,oa,Ka),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),A.paintSEInner(c,m,x,p,v,B,Ua,J,oa),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),A.paintNEInner(c,m,x,p,v,B,Ta,J,oa),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),A.paintNWInner(c,m,x,p,v,B,Qa,J,oa),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke())):"frame"!=va?(c.begin(),A.moveNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,
+m,x,p,v,B,Ta,J,La),"double"==va&&(A.moveNEInner(c,m,x,p,v,B,Ta,J,oa,La),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha)),c.stroke()):(c.begin(),A.moveNW(c,m,x,p,v,B,Qa,J,Ia),A.paintTop(c,m,x,p,v,B,Ta,J,La),A.lineNEInner(c,m,x,p,v,B,Ta,J,oa,La),A.paintTopInner(c,m,x,p,v,B,Qa,J,oa,Ia,Ha),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),"double"==va&&(A.moveSEInner(c,m,x,p,v,B,Ua,J,oa,Ka),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La)),c.stroke()):
+(c.begin(),A.moveNE(c,m,x,p,v,B,Ta,J,Ha),A.paintRight(c,m,x,p,v,B,Ua,J,Ka),A.lineSEInner(c,m,x,p,v,B,Ua,J,oa,Ka),A.paintRightInner(c,m,x,p,v,B,Ta,J,oa,Ha,La),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),"double"==va&&(A.moveSWInner(c,m,x,p,v,B,Wa,J,oa,Ia),A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka)),c.stroke()):(c.begin(),A.moveSE(c,m,x,p,v,B,Ua,J,La),A.paintBottom(c,m,x,p,v,B,Wa,J,Ia),A.lineSWInner(c,m,x,p,v,B,Wa,J,oa,Ia),
+A.paintBottomInner(c,m,x,p,v,B,Ua,J,oa,La,Ka),c.close(),c.fillAndStroke()):"frame"!=va?(c.begin(),A.moveSW(c,m,x,p,v,B,Qa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),"double"==va&&(A.moveNWInner(c,m,x,p,v,B,Qa,J,oa,Ha,Ia),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia)),c.stroke()):(c.begin(),A.moveSW(c,m,x,p,v,B,Qa,J,Ka),A.paintLeft(c,m,x,p,v,B,Qa,J,Ha),A.lineNWInner(c,m,x,p,v,B,Qa,J,oa,Ha,Ia),A.paintLeftInner(c,m,x,p,v,B,Wa,J,oa,Ka,Ia),c.close(),c.fillAndStroke());c.begin();A.paintFolds(c,m,x,p,v,B,Qa,Ta,
+Ua,Wa,J,Ha,La,Ka,Ia);c.stroke()};Ga.prototype.moveNW=function(c,m,x,p,v,A,B,ha,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,0):c.moveTo(0,ha)};Ga.prototype.moveNE=function(c,m,x,p,v,A,B,ha,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,0):c.moveTo(p-ha,0)};Ga.prototype.moveSE=function(c,m,x,p,v,A,B,ha,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(p,v):c.moveTo(p,v-ha)};Ga.prototype.moveSW=function(c,m,x,p,v,A,B,ha,J){"square"==B||"default"==B&&"square"==A||!J?c.moveTo(0,
+v):c.moveTo(ha,v)};Ga.prototype.paintNW=function(c,m,x,p,v,A,B,ha,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,ha,0)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(ha,0);else c.lineTo(0,0)};Ga.prototype.paintTop=function(c,m,x,p,v,A,B,ha,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,0):c.lineTo(p-ha,0)};Ga.prototype.paintNE=
+function(c,m,x,p,v,A,B,ha,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,p,ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p,ha);else c.lineTo(p,0)};Ga.prototype.paintRight=function(c,m,x,p,v,A,B,ha,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(p,v):c.lineTo(p,v-ha)};Ga.prototype.paintLeft=function(c,m,x,p,v,A,B,ha,J){"square"==
+B||"default"==B&&"square"==A||!J?c.lineTo(0,0):c.lineTo(0,ha)};Ga.prototype.paintSE=function(c,m,x,p,v,A,B,ha,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,p-ha,v)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-ha,v);else c.lineTo(p,v)};Ga.prototype.paintBottom=function(c,m,x,p,v,A,B,ha,J){"square"==B||"default"==B&&"square"==A||!J?c.lineTo(0,
+v):c.lineTo(ha,v)};Ga.prototype.paintSW=function(c,m,x,p,v,A,B,ha,J){if(J)if("rounded"==B||"default"==B&&"rounded"==A||"invRound"==B||"default"==B&&"invRound"==A){m=0;if("rounded"==B||"default"==B&&"rounded"==A)m=1;c.arcTo(ha,ha,0,0,m,0,v-ha)}else("snip"==B||"default"==B&&"snip"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(0,v-ha);else c.lineTo(0,v)};Ga.prototype.paintNWInner=function(c,m,x,p,v,A,B,ha,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*J,ha-.5*J,0,0,0,J,.5*J+ha);else if("invRound"==
+B||"default"==B&&"invRound"==A)c.arcTo(ha+J,ha+J,0,0,1,J,J+ha);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(J,.5*J+ha);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ha,J+ha),c.lineTo(J,J+ha)};Ga.prototype.paintTopInner=function(c,m,x,p,v,A,B,ha,J,va,oa){va||oa?!va&&oa?c.lineTo(0,J):va&&!oa?c.lineTo(J,0):va?"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(ha+.5*J,J):c.lineTo(ha+J,J):c.lineTo(0,
+J):c.lineTo(0,0)};Ga.prototype.paintNEInner=function(c,m,x,p,v,A,B,ha,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*J,ha-.5*J,0,0,0,p-ha-.5*J,J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+J,ha+J,0,0,1,p-ha-J,J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-ha-.5*J,J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-J,ha+J),c.lineTo(p-ha-J,J)};Ga.prototype.paintRightInner=function(c,m,x,p,v,A,B,ha,J,va,oa){va||oa?!va&&oa?c.lineTo(p-J,0):va&&!oa?c.lineTo(p,
+J):va?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ha+.5*J):c.lineTo(p-J,ha+J):c.lineTo(p-J,0):c.lineTo(p,0)};Ga.prototype.paintLeftInner=function(c,m,x,p,v,A,B,ha,J,va,oa){va||oa?!va&&oa?c.lineTo(J,v):va&&!oa?c.lineTo(0,v-J):va?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ha-.5*J):c.lineTo(J,v-ha-J):
+c.lineTo(J,v):c.lineTo(0,v)};Ga.prototype.paintSEInner=function(c,m,x,p,v,A,B,ha,J){if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*J,ha-.5*J,0,0,0,p-J,v-ha-.5*J);else if("invRound"==B||"default"==B&&"invRound"==A)c.arcTo(ha+J,ha+J,0,0,1,p-J,v-ha-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(p-J,v-ha-.5*J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(p-ha-J,v-ha-J),c.lineTo(p-J,v-ha-J)};Ga.prototype.paintBottomInner=function(c,m,x,p,v,A,B,ha,J,va,oa){va||oa?!va&&oa?c.lineTo(p,
+v-J):va&&!oa?c.lineTo(p-J,v):"square"==B||"default"==B&&"square"==A||!va?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-ha-.5*J,v-J):c.lineTo(p-ha-J,v-J):c.lineTo(p,v)};Ga.prototype.paintSWInner=function(c,m,x,p,v,A,B,ha,J,va){if(!va)c.lineTo(J,v);else if("square"==B||"default"==B&&"square"==A)c.lineTo(J,v-J);else if("rounded"==B||"default"==B&&"rounded"==A)c.arcTo(ha-.5*J,ha-.5*J,0,0,0,ha+.5*J,v-J);else if("invRound"==B||"default"==B&&"invRound"==
+A)c.arcTo(ha+J,ha+J,0,0,1,ha+J,v-J);else if("snip"==B||"default"==B&&"snip"==A)c.lineTo(ha+.5*J,v-J);else if("fold"==B||"default"==B&&"fold"==A)c.lineTo(J+ha,v-ha-J),c.lineTo(J+ha,v-J)};Ga.prototype.moveSWInner=function(c,m,x,p,v,A,B,ha,J,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,v-ha-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(J,v-ha-J):
+c.moveTo(0,v-J)};Ga.prototype.lineSWInner=function(c,m,x,p,v,A,B,ha,J,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,v-ha-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,v-ha-J):c.lineTo(0,v-J)};Ga.prototype.moveSEInner=function(c,m,x,p,v,A,B,ha,J,va){va?"square"==B||"default"==B&&"square"==A?c.moveTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,v-ha-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,v-ha-J):c.moveTo(p-J,v)};Ga.prototype.lineSEInner=function(c,m,x,p,v,A,B,ha,J,va){va?"square"==B||"default"==B&&"square"==A?c.lineTo(p-J,v-J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,v-ha-.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,v-ha-J):
+c.lineTo(p-J,v)};Ga.prototype.moveNEInner=function(c,m,x,p,v,A,B,ha,J,va){va?"square"==B||"default"==B&&"square"==A||va?c.moveTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(p-J,ha+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.moveTo(p-J,ha+J):c.moveTo(p,J)};Ga.prototype.lineNEInner=function(c,m,x,p,v,A,B,ha,J,va){va?"square"==B||"default"==B&&"square"==A||va?c.lineTo(p-J,J):"rounded"==B||"default"==B&&"rounded"==
+A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(p-J,ha+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(p-J,ha+J):c.lineTo(p,J)};Ga.prototype.moveNWInner=function(c,m,x,p,v,A,B,ha,J,va,oa){va||oa?!va&&oa?c.moveTo(J,0):va&&!oa?c.moveTo(0,J):"square"==B||"default"==B&&"square"==A?c.moveTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.moveTo(J,ha+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==
+B&&"fold"==A)&&c.moveTo(J,ha+J):c.moveTo(0,0)};Ga.prototype.lineNWInner=function(c,m,x,p,v,A,B,ha,J,va,oa){va||oa?!va&&oa?c.lineTo(J,0):va&&!oa?c.lineTo(0,J):"square"==B||"default"==B&&"square"==A?c.lineTo(J,J):"rounded"==B||"default"==B&&"rounded"==A||"snip"==B||"default"==B&&"snip"==A?c.lineTo(J,ha+.5*J):("invRound"==B||"default"==B&&"invRound"==A||"fold"==B||"default"==B&&"fold"==A)&&c.lineTo(J,ha+J):c.lineTo(0,0)};Ga.prototype.paintFolds=function(c,m,x,p,v,A,B,ha,J,va,oa,Xa,ib,gb,Ha){if("fold"==
+A||"fold"==B||"fold"==ha||"fold"==J||"fold"==va)("fold"==B||"default"==B&&"fold"==A)&&Xa&&Ha&&(c.moveTo(0,oa),c.lineTo(oa,oa),c.lineTo(oa,0)),("fold"==ha||"default"==ha&&"fold"==A)&&Xa&&ib&&(c.moveTo(p-oa,0),c.lineTo(p-oa,oa),c.lineTo(p,oa)),("fold"==J||"default"==J&&"fold"==A)&&gb&&ib&&(c.moveTo(p-oa,v),c.lineTo(p-oa,v-oa),c.lineTo(p,v-oa)),("fold"==va||"default"==va&&"fold"==A)&&gb&&Ha&&(c.moveTo(0,v-oa),c.lineTo(oa,v-oa),c.lineTo(oa,v))};mxCellRenderer.registerShape(Ga.prototype.cst.RECT2,Ga);
+Ga.prototype.constraints=null;mxUtils.extend(Za,mxConnector);Za.prototype.origPaintEdgeShape=Za.prototype.paintEdgeShape;Za.prototype.paintEdgeShape=function(c,m,x){for(var p=[],v=0;v<m.length;v++)p.push(mxUtils.clone(m[v]));v=c.state.dashed;var A=c.state.fixDash;Za.prototype.origPaintEdgeShape.apply(this,[c,p,x]);3<=c.state.strokeWidth&&(p=mxUtils.getValue(this.style,"fillColor",null),null!=p&&(c.setStrokeColor(p),c.setStrokeWidth(c.state.strokeWidth-2),c.setDashed(v,A),Za.prototype.origPaintEdgeShape.apply(this,
+[c,m,x])))};mxCellRenderer.registerShape("filledEdge",Za);"undefined"!==typeof StyleFormatPanel&&function(){var c=StyleFormatPanel.prototype.getCustomColors;StyleFormatPanel.prototype.getCustomColors=function(){var m=this.editorUi.getSelectionState(),x=c.apply(this,arguments);"umlFrame"==m.style.shape&&x.push({title:mxResources.get("laneColor"),key:"swimlaneFillColor",defaultValue:"default"});return x}}();mxMarker.addMarker("dash",function(c,m,x,p,v,A,B,ha,J,va){var oa=v*(B+J+1),Xa=A*(B+J+1);return function(){c.begin();
+c.moveTo(p.x-oa/2-Xa/2,p.y-Xa/2+oa/2);c.lineTo(p.x+Xa/2-3*oa/2,p.y-3*Xa/2-oa/2);c.stroke()}});mxMarker.addMarker("box",function(c,m,x,p,v,A,B,ha,J,va){var oa=v*(B+J+1),Xa=A*(B+J+1),ib=p.x+oa/2,gb=p.y+Xa/2;p.x-=oa;p.y-=Xa;return function(){c.begin();c.moveTo(ib-oa/2-Xa/2,gb-Xa/2+oa/2);c.lineTo(ib-oa/2+Xa/2,gb-Xa/2-oa/2);c.lineTo(ib+Xa/2-3*oa/2,gb-3*Xa/2-oa/2);c.lineTo(ib-Xa/2-3*oa/2,gb-3*Xa/2+oa/2);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("cross",function(c,m,x,p,v,A,B,ha,J,
+va){var oa=v*(B+J+1),Xa=A*(B+J+1);return function(){c.begin();c.moveTo(p.x-oa/2-Xa/2,p.y-Xa/2+oa/2);c.lineTo(p.x+Xa/2-3*oa/2,p.y-3*Xa/2-oa/2);c.moveTo(p.x-oa/2+Xa/2,p.y-Xa/2-oa/2);c.lineTo(p.x-Xa/2-3*oa/2,p.y-3*Xa/2+oa/2);c.stroke()}});mxMarker.addMarker("circle",Pa);mxMarker.addMarker("circlePlus",function(c,m,x,p,v,A,B,ha,J,va){var oa=p.clone(),Xa=Pa.apply(this,arguments),ib=v*(B+2*J),gb=A*(B+2*J);return function(){Xa.apply(this,arguments);c.begin();c.moveTo(oa.x-v*J,oa.y-A*J);c.lineTo(oa.x-2*ib+
+v*J,oa.y-2*gb+A*J);c.moveTo(oa.x-ib-gb+A*J,oa.y-gb+ib-v*J);c.lineTo(oa.x+gb-ib-A*J,oa.y-gb-ib+v*J);c.stroke()}});mxMarker.addMarker("halfCircle",function(c,m,x,p,v,A,B,ha,J,va){var oa=v*(B+J+1),Xa=A*(B+J+1),ib=p.clone();p.x-=oa;p.y-=Xa;return function(){c.begin();c.moveTo(ib.x-Xa,ib.y+oa);c.quadTo(p.x-Xa,p.y+oa,p.x,p.y);c.quadTo(p.x+Xa,p.y-oa,ib.x+Xa,ib.y-oa);c.stroke()}});mxMarker.addMarker("async",function(c,m,x,p,v,A,B,ha,J,va){m=v*J*1.118;x=A*J*1.118;v*=B+J;A*=B+J;var oa=p.clone();oa.x-=m;oa.y-=
+x;p.x+=-v-m;p.y+=-A-x;return function(){c.begin();c.moveTo(oa.x,oa.y);ha?c.lineTo(oa.x-v-A/2,oa.y-A+v/2):c.lineTo(oa.x+A/2-v,oa.y-A-v/2);c.lineTo(oa.x-v,oa.y-A);c.close();va?c.fillAndStroke():c.stroke()}});mxMarker.addMarker("openAsync",function(c){c=null!=c?c:2;return function(m,x,p,v,A,B,ha,J,va,oa){A*=ha+va;B*=ha+va;var Xa=v.clone();return function(){m.begin();m.moveTo(Xa.x,Xa.y);J?m.lineTo(Xa.x-A-B/c,Xa.y-B+A/c):m.lineTo(Xa.x+B/c-A,Xa.y-B-A/c);m.stroke()}}}(2));if("undefined"!==typeof mxVertexHandler){var kb=
+function(c,m,x){return hb(c,["width"],m,function(p,v,A,B,ha){ha=c.shape.getEdgeWidth()*c.view.scale+x;return new mxPoint(B.x+v*p/4+A*ha/2,B.y+A*p/4-v*ha/2)},function(p,v,A,B,ha,J){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,J.x,J.y));c.style.width=Math.round(2*p)/c.view.scale-x})},hb=function(c,m,x,p,v){return db(c,m,function(A){var B=c.absolutePoints,ha=B.length-1;A=c.view.translate;var J=c.view.scale,va=x?B[0]:B[ha];B=x?B[1]:B[ha-1];ha=B.x-va.x;var oa=B.y-va.y,Xa=Math.sqrt(ha*ha+oa*oa);va=
+p.call(this,Xa,ha/Xa,oa/Xa,va,B);return new mxPoint(va.x/J-A.x,va.y/J-A.y)},function(A,B,ha){var J=c.absolutePoints,va=J.length-1;A=c.view.translate;var oa=c.view.scale,Xa=x?J[0]:J[va];J=x?J[1]:J[va-1];va=J.x-Xa.x;var ib=J.y-Xa.y,gb=Math.sqrt(va*va+ib*ib);B.x=(B.x+A.x)*oa;B.y=(B.y+A.y)*oa;v.call(this,gb,va/gb,ib/gb,Xa,J,B,ha)})},ob=function(c){return function(m){return[db(m,["arrowWidth","arrowSize"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"arrowWidth",$a.prototype.arrowWidth))),
+v=Math.max(0,Math.min(c,mxUtils.getValue(this.state.style,"arrowSize",$a.prototype.arrowSize)));return new mxPoint(x.x+(1-v)*x.width,x.y+(1-p)*x.height/2)},function(x,p){this.state.style.arrowWidth=Math.max(0,Math.min(1,Math.abs(x.y+x.height/2-p.y)/x.height*2));this.state.style.arrowSize=Math.max(0,Math.min(c,(x.x+x.width-p.x)/x.width))})]}},vb=function(c){return function(m){return[db(m,["size"],function(x){var p=Math.max(0,Math.min(.5*x.height,parseFloat(mxUtils.getValue(this.state.style,"size",
+c))));return new mxPoint(x.x,x.y+p)},function(x,p){this.state.style.size=Math.max(0,p.y-x.y)},!0)]}},nb=function(c,m,x){return function(p){var v=[db(p,["size"],function(A){var B=Math.max(0,Math.min(A.width,Math.min(A.height,parseFloat(mxUtils.getValue(this.state.style,"size",m)))))*c;return new mxPoint(A.x+B,A.y+B)},function(A,B){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(A.width,B.x-A.x),Math.min(A.height,B.y-A.y)))/c)},!1)];x&&mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,
+!1)&&v.push(pb(p));return v}},Bb=function(c,m,x,p,v){x=null!=x?x:.5;return function(A){var B=[db(A,["size"],function(ha){var J=null!=v?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,va=parseFloat(mxUtils.getValue(this.state.style,"size",J?v:c));return new mxPoint(ha.x+Math.max(0,Math.min(.5*ha.width,va*(J?1:ha.width))),ha.getCenterY())},function(ha,J,va){ha=null!=v&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?J.x-ha.x:Math.max(0,Math.min(x,(J.x-ha.x)/ha.width));this.state.style.size=
+ha},!1,p)];m&&mxUtils.getValue(A.style,mxConstants.STYLE_ROUNDED,!1)&&B.push(pb(A));return B}},yb=function(c,m,x){c=null!=c?c:.5;return function(p){var v=[db(p,["size"],function(A){var B=null!=x?"0"!=mxUtils.getValue(this.state.style,"fixedSize","0"):null,ha=Math.max(0,parseFloat(mxUtils.getValue(this.state.style,"size",B?x:m)));return new mxPoint(A.x+Math.min(.75*A.width*c,ha*(B?.75:.75*A.width)),A.y+A.height/4)},function(A,B){A=null!=x&&"0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?B.x-
+A.x:Math.max(0,Math.min(c,(B.x-A.x)/A.width*.75));this.state.style.size=A},!1,!0)];mxUtils.getValue(p.style,mxConstants.STYLE_ROUNDED,!1)&&v.push(pb(p));return v}},mb=function(){return function(c){var m=[];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(pb(c));return m}},pb=function(c,m){return db(c,[mxConstants.STYLE_ARCSIZE],function(x){var p=null!=m?m:x.height/8;if("1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)){var v=mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,
mxConstants.LINE_ARCSIZE)/2;return new mxPoint(x.x+x.width-Math.min(x.width/2,v),x.y+p)}v=Math.max(0,parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)))/100;return new mxPoint(x.x+x.width-Math.min(Math.max(x.width/2,x.height/2),Math.min(x.width,x.height)*v),x.y+p)},function(x,p,v){"1"==mxUtils.getValue(c.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.max(0,Math.min(x.width,2*(x.x+x.width-
-p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},fb=function(c,l,x,p,v,A,B){var ka=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ka.execute=function(wa){for(var oa=0;oa<l.length;oa++)this.copyStyle(l[oa]);B&&B(wa)};ka.getPosition=x;ka.setPosition=p;ka.ignoreGrid=null!=v?v:!0;if(A){var J=ka.positionChanged;ka.positionChanged=function(){J.apply(this,arguments);c.view.invalidate(this.state.cell);
-c.view.validate()}}return ka},rb={link:function(c){return[kb(c,!0,10),kb(c,!1,10)]},flexArrow:function(c){var l=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(ib(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ka){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
-return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ka){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
-5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
-c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<l/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<l&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(ib(c,
-["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ka){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);
-c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(wa.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
-x.push(ib(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ka){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ka=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ka+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ka+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ka,J,wa){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ka.x,ka.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,
-B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(wa.getEvent())||mxEvent.isControlDown(wa.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(wa.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
-l/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<l&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var l=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));l.push(qb(c,x/2))}l.push(fb(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
+p.x)))):this.state.style[mxConstants.STYLE_ARCSIZE]=Math.round(Math.min(50,Math.max(0,100*(x.width-p.x+x.x)/Math.min(x.width,x.height))))})},db=function(c,m,x,p,v,A,B){var ha=new mxHandle(c,null,mxVertexHandler.prototype.secondaryHandleImage);ha.execute=function(va){for(var oa=0;oa<m.length;oa++)this.copyStyle(m[oa]);B&&B(va)};ha.getPosition=x;ha.setPosition=p;ha.ignoreGrid=null!=v?v:!0;if(A){var J=ha.positionChanged;ha.positionChanged=function(){J.apply(this,arguments);c.view.invalidate(this.state.cell);
+c.view.validate()}}return ha},rb={link:function(c){return[kb(c,!0,10),kb(c,!1,10)]},flexArrow:function(c){var m=c.view.graph.gridSize/c.view.scale,x=[];mxUtils.getValue(c.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(hb(c,["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;
+return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,J,va){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE])})),x.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!0,function(p,v,A,B,ha){p=(c.shape.getStartArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.ARROW_SIZE/
+5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)+A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)-v*p/2)},function(p,v,A,B,ha,J,va){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_STARTSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.startWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_ENDSIZE]=
+c.style[mxConstants.STYLE_STARTSIZE],c.style.endWidth=c.style.startWidth;mxEvent.isAltDown(va.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_STARTSIZE])-parseFloat(c.style[mxConstants.STYLE_ENDSIZE]))<m/6&&(c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE]),Math.abs(parseFloat(c.style.startWidth)-parseFloat(c.style.endWidth))<m&&(c.style.startWidth=c.style.endWidth))})));mxUtils.getValue(c.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(x.push(hb(c,
+["width",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEdgeWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,J,va){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,B.y,B.x+A,B.y-v,J.x,J.y);
+c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.width=Math.round(2*p)/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE];mxEvent.isAltDown(va.getEvent())||Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE])})),
+x.push(hb(c,["startWidth","endWidth",mxConstants.STYLE_STARTSIZE,mxConstants.STYLE_ENDSIZE],!1,function(p,v,A,B,ha){p=(c.shape.getEndArrowWidth()-c.shape.strokewidth)*c.view.scale;ha=3*mxUtils.getNumber(c.style,mxConstants.STYLE_ENDSIZE,mxConstants.ARROW_SIZE/5)*c.view.scale;return new mxPoint(B.x+v*(ha+c.shape.strokewidth*c.view.scale)-A*p/2,B.y+A*(ha+c.shape.strokewidth*c.view.scale)+v*p/2)},function(p,v,A,B,ha,J,va){p=Math.sqrt(mxUtils.ptSegDistSq(B.x,B.y,ha.x,ha.y,J.x,J.y));v=mxUtils.ptLineDist(B.x,
+B.y,B.x+A,B.y-v,J.x,J.y);c.style[mxConstants.STYLE_ENDSIZE]=Math.round(100*(v-c.shape.strokewidth)/3)/100/c.view.scale;c.style.endWidth=Math.max(0,Math.round(2*p)-c.shape.getEdgeWidth())/c.view.scale;if(mxEvent.isShiftDown(va.getEvent())||mxEvent.isControlDown(va.getEvent()))c.style[mxConstants.STYLE_STARTSIZE]=c.style[mxConstants.STYLE_ENDSIZE],c.style.startWidth=c.style.endWidth;mxEvent.isAltDown(va.getEvent())||(Math.abs(parseFloat(c.style[mxConstants.STYLE_ENDSIZE])-parseFloat(c.style[mxConstants.STYLE_STARTSIZE]))<
+m/6&&(c.style[mxConstants.STYLE_ENDSIZE]=c.style[mxConstants.STYLE_STARTSIZE]),Math.abs(parseFloat(c.style.endWidth)-parseFloat(c.style.startWidth))<m&&(c.style.endWidth=c.style.startWidth))})));return x},swimlane:function(c){var m=[];if(mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED)){var x=parseFloat(mxUtils.getValue(c.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));m.push(pb(c,x/2))}m.push(db(c,[mxConstants.STYLE_STARTSIZE],function(p){var v=parseFloat(mxUtils.getValue(c.style,
mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));return 1==mxUtils.getValue(c.style,mxConstants.STYLE_HORIZONTAL,1)?new mxPoint(p.getCenterX(),p.y+Math.max(0,Math.min(p.height,v))):new mxPoint(p.x+Math.max(0,Math.min(p.width,v)),p.getCenterY())},function(p,v){c.style[mxConstants.STYLE_STARTSIZE]=1==mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL,1)?Math.round(Math.max(0,Math.min(p.height,v.y-p.y))):Math.round(Math.max(0,Math.min(p.width,v.x-p.x)))},!1,null,function(p){var v=
-c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ka=0;ka<A.length;ka++)A[ka]!=c.cell&&v.isSwimlane(A[ka])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ka]))==p&&B.push(A[ka]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return l},label:nb(),ext:nb(),rectangle:nb(),
-triangle:nb(),rhombus:nb(),umlLifeline:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",X.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},umlFrame:function(c){return[fb(c,["width","height"],function(l){var x=Math.max(R.prototype.corner,Math.min(l.width,mxUtils.getValue(this.state.style,"width",R.prototype.width))),
-p=Math.max(1.5*R.prototype.corner,Math.min(l.height,mxUtils.getValue(this.state.style,"height",R.prototype.height)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.width=Math.round(Math.max(R.prototype.corner,Math.min(l.width,x.x-l.x)));this.state.style.height=Math.round(Math.max(1.5*R.prototype.corner,Math.min(l.height,x.y-l.y)))},!1)]},process:function(c){var l=[fb(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
-"size",ha.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},cross:function(c){return[fb(c,["size"],function(l){var x=Math.min(l.width,l.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"size",Fa.prototype.size)))*x/2;return new mxPoint(l.getCenterX()-x,l.getCenterY()-x)},function(l,x){var p=Math.min(l.width,l.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,l.getCenterY()-x.y)/p*2,Math.max(0,l.getCenterX()-x.x)/p*2)))})]},note:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=
-Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},note2:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(l.width,Math.min(l.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(l.x+l.width-x,l.y+x)},function(l,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(l.width,l.x+l.width-x.x),Math.min(l.height,x.y-l.y))))})]},manualInput:function(c){var l=[fb(c,["size"],function(x){var p=
-Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Ua.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},dataStorage:function(c){return[fb(c,["size"],function(l){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?K.prototype.fixedSize:
-K.prototype.size));return new mxPoint(l.x+l.width-p*(x?1:l.width),l.getCenterY())},function(l,x){l="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(l.width,l.x+l.width-x.x)):Math.max(0,Math.min(1,(l.x+l.width-x.x)/l.width));this.state.style.size=l},!1)]},callout:function(c){var l=[fb(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ma.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
-"position",ma.prototype.position)));mxUtils.getValue(this.state.style,"base",ma.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",ma.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),fb(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",ma.prototype.position2)));
-return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),fb(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",ma.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",ma.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
-v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",ma.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},internalStorage:function(c){var l=[fb(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Ra.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
-"dy",Ra.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&l.push(qb(c));return l},module:function(c){return[fb(c,["jettyWidth","jettyHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"jettyWidth",va.prototype.jettyWidth))),p=Math.max(0,Math.min(l.height,
-mxUtils.getValue(this.state.style,"jettyHeight",va.prototype.jettyHeight)));return new mxPoint(l.x+x/2,l.y+2*p)},function(l,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y))/2)})]},corner:function(c){return[fb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",Za.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,
-"dy",Za.prototype.dy)));return new mxPoint(l.x+x,l.y+p)},function(l,x){this.state.style.dx=Math.round(Math.max(0,Math.min(l.width,x.x-l.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},tee:function(c){return[fb(c,["dx","dy"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"dx",db.prototype.dx))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"dy",db.prototype.dy)));return new mxPoint(l.x+(l.width+x)/2,l.y+p)},function(l,
-x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(l.width/2,x.x-l.x-l.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},singleArrow:pb(1),doubleArrow:pb(.5),folder:function(c){return[fb(c,["tabWidth","tabHeight"],function(l){var x=Math.max(0,Math.min(l.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(l.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
-"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=l.width-x);return new mxPoint(l.x+x,l.y+p)},function(l,x){var p=Math.max(0,Math.min(l.width,x.x-l.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=l.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(l.height,x.y-l.y)))},!1)]},document:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
-"size",fa.prototype.size))));return new mxPoint(l.x+3*l.width/4,l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},tape:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(l.getCenterX(),l.y+x*l.height/2)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-l.y)/l.height*2))},!1)]},isoCube2:function(c){return[fb(c,
-["isoAngle"],function(l){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",m.isoAngle))))*Math.PI/200;return new mxPoint(l.x,l.y+Math.min(l.width*Math.tan(x),.5*l.height))},function(l,x){this.state.style.isoAngle=Math.max(0,50*(x.y-l.y)/l.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(z.prototype.size),offPageConnector:function(c){return[fb(c,["size"],function(l){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",ja.prototype.size))));
-return new mxPoint(l.getCenterX(),l.y+(1-x)*l.height)},function(l,x){this.state.style.size=Math.max(0,Math.min(1,(l.y+l.height-x.y)/l.height))},!1)]},"mxgraph.basic.rect":function(c){var l=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
-["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});l.push(c);return l},step:Bb(T.prototype.size,!0,null,!0,T.prototype.fixedSize),hexagon:Bb(M.prototype.size,!0,.5,!0,M.prototype.fixedSize),curlyBracket:Bb(pa.prototype.size,!1),display:Bb(Ja.prototype.size,!1),cube:ob(1,
-n.prototype.size,!1),card:ob(.5,G.prototype.size,!0),loopLimit:ob(.5,V.prototype.size,!0),trapezoid:yb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:yb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=fb;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var l=this.state.style.shape;null==mxCellRenderer.defaultShapes[l]&&
-null==mxStencilRegistry.getStencil(l)?l=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(l=mxConstants.SHAPE_SWIMLANE);l=rb[l];null==l&&null!=this.state.shape&&this.state.shape.isRoundable()&&(l=rb[mxConstants.SHAPE_RECTANGLE]);null!=l&&(l=l(this.state),null!=l&&(c=null==c?l:c.concat(l)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
-c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var zb=new mxPoint(1,0),wb=new mxPoint(1,0),Ab=mxUtils.toRadians(-30);zb=mxUtils.getRotatedPoint(zb,Math.cos(Ab),Math.sin(Ab));var lb=mxUtils.toRadians(-150);wb=mxUtils.getRotatedPoint(wb,Math.cos(lb),Math.sin(lb));mxEdgeStyle.IsometricConnector=function(c,l,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ka=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
-null==ka&&null!=l&&(ka=new mxPoint(l.getCenterX(),l.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var J=zb.x,wa=zb.y,oa=wb.x,ab=wb.y,jb="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ka){c=function(Ea,La,Ia){Ea-=gb.x;var Ga=La-gb.y;La=(ab*Ea-oa*Ga)/(J*ab-wa*oa);Ea=(wa*Ea-J*Ga)/(wa*oa-J*ab);jb?(Ia&&(gb=new mxPoint(gb.x+J*La,gb.y+wa*La),v.push(gb)),gb=new mxPoint(gb.x+oa*Ea,gb.y+ab*Ea)):(Ia&&(gb=new mxPoint(gb.x+oa*Ea,gb.y+ab*Ea),v.push(gb)),
-gb=new mxPoint(gb.x+J*La,gb.y+wa*La));v.push(gb)};var gb=ka;null==p&&(p=new mxPoint(ka.x+(B.x-ka.x)/2,ka.y+(B.y-ka.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,l){if(l==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return xb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
-function(c,l,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(l,x/(.5+p));l=(l-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,x+.75*p));return c};m.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(l*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
-1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};ma.prototype.getConstraints=function(c,l,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=l*Math.max(0,
-Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-p)));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+c.view.graph;if(!mxEvent.isShiftDown(p.getEvent())&&!mxEvent.isControlDown(p.getEvent())&&(v.isTableRow(c.cell)||v.isTableCell(c.cell))){p=v.getSwimlaneDirection(c.style);var A=v.model.getParent(c.cell);A=v.model.getChildCells(A,!0);for(var B=[],ha=0;ha<A.length;ha++)A[ha]!=c.cell&&v.isSwimlane(A[ha])&&v.getSwimlaneDirection(v.getCurrentCellStyle(A[ha]))==p&&B.push(A[ha]);v.setCellStyles(mxConstants.STYLE_STARTSIZE,c.style[mxConstants.STYLE_STARTSIZE],B)}}));return m},label:mb(),ext:mb(),rectangle:mb(),
+triangle:mb(),rhombus:mb(),umlLifeline:function(c){return[db(c,["size"],function(m){var x=Math.max(0,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",V.prototype.size))));return new mxPoint(m.getCenterX(),m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},umlFrame:function(c){return[db(c,["width","height"],function(m){var x=Math.max(Q.prototype.corner,Math.min(m.width,mxUtils.getValue(this.state.style,"width",Q.prototype.width))),
+p=Math.max(1.5*Q.prototype.corner,Math.min(m.height,mxUtils.getValue(this.state.style,"height",Q.prototype.height)));return new mxPoint(m.x+x,m.y+p)},function(m,x){this.state.style.width=Math.round(Math.max(Q.prototype.corner,Math.min(m.width,x.x-m.x)));this.state.style.height=Math.round(Math.max(1.5*Q.prototype.corner,Math.min(m.height,x.y-m.y)))},!1)]},process:function(c){var m=[db(c,["size"],function(x){var p="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),v=parseFloat(mxUtils.getValue(this.state.style,
+"size",ia.prototype.size));return p?new mxPoint(x.x+v,x.y+x.height/4):new mxPoint(x.x+x.width*v,x.y+x.height/4)},function(x,p){x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(.5*x.width,p.x-x.x)):Math.max(0,Math.min(.5,(p.x-x.x)/x.width));this.state.style.size=x},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(pb(c));return m},cross:function(c){return[db(c,["size"],function(m){var x=Math.min(m.width,m.height);x=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,
+"size",Ca.prototype.size)))*x/2;return new mxPoint(m.getCenterX()-x,m.getCenterY()-x)},function(m,x){var p=Math.min(m.width,m.height);this.state.style.size=Math.max(0,Math.min(1,Math.min(Math.max(0,m.getCenterY()-x.y)/p*2,Math.max(0,m.getCenterX()-x.x)/p*2)))})]},note:function(c){return[db(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",f.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=
+Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},note2:function(c){return[db(c,["size"],function(m){var x=Math.max(0,Math.min(m.width,Math.min(m.height,parseFloat(mxUtils.getValue(this.state.style,"size",g.prototype.size)))));return new mxPoint(m.x+m.width-x,m.y+x)},function(m,x){this.state.style.size=Math.round(Math.max(0,Math.min(Math.min(m.width,m.x+m.width-x.x),Math.min(m.height,x.y-m.y))))})]},manualInput:function(c){var m=[db(c,["size"],function(x){var p=
+Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",Ra.prototype.size)));return new mxPoint(x.x+x.width/4,x.y+3*p/4)},function(x,p){this.state.style.size=Math.round(Math.max(0,Math.min(x.height,4*(p.y-x.y)/3)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(pb(c));return m},dataStorage:function(c){return[db(c,["size"],function(m){var x="0"!=mxUtils.getValue(this.state.style,"fixedSize","0"),p=parseFloat(mxUtils.getValue(this.state.style,"size",x?K.prototype.fixedSize:
+K.prototype.size));return new mxPoint(m.x+m.width-p*(x?1:m.width),m.getCenterY())},function(m,x){m="0"!=mxUtils.getValue(this.state.style,"fixedSize","0")?Math.max(0,Math.min(m.width,m.x+m.width-x.x)):Math.max(0,Math.min(1,(m.x+m.width-x.x)/m.width));this.state.style.size=m},!1)]},callout:function(c){var m=[db(c,["size","position"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",R.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",
+R.prototype.position)));mxUtils.getValue(this.state.style,"base",R.prototype.base);return new mxPoint(x.x+v*x.width,x.y+x.height-p)},function(x,p){mxUtils.getValue(this.state.style,"base",R.prototype.base);this.state.style.size=Math.round(Math.max(0,Math.min(x.height,x.y+x.height-p.y)));this.state.style.position=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),db(c,["position2"],function(x){var p=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position2",R.prototype.position2)));
+return new mxPoint(x.x+p*x.width,x.y+x.height)},function(x,p){this.state.style.position2=Math.round(100*Math.max(0,Math.min(1,(p.x-x.x)/x.width)))/100},!1),db(c,["base"],function(x){var p=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,"size",R.prototype.size))),v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",R.prototype.position))),A=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"base",R.prototype.base)));return new mxPoint(x.x+Math.min(x.width,
+v*x.width+A),x.y+x.height-p)},function(x,p){var v=Math.max(0,Math.min(1,mxUtils.getValue(this.state.style,"position",R.prototype.position)));this.state.style.base=Math.round(Math.max(0,Math.min(x.width,p.x-x.x-v*x.width)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(pb(c));return m},internalStorage:function(c){var m=[db(c,["dx","dy"],function(x){var p=Math.max(0,Math.min(x.width,mxUtils.getValue(this.state.style,"dx",Oa.prototype.dx))),v=Math.max(0,Math.min(x.height,mxUtils.getValue(this.state.style,
+"dy",Oa.prototype.dy)));return new mxPoint(x.x+p,x.y+v)},function(x,p){this.state.style.dx=Math.round(Math.max(0,Math.min(x.width,p.x-x.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(x.height,p.y-x.y)))},!1)];mxUtils.getValue(c.style,mxConstants.STYLE_ROUNDED,!1)&&m.push(pb(c));return m},module:function(c){return[db(c,["jettyWidth","jettyHeight"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"jettyWidth",ua.prototype.jettyWidth))),p=Math.max(0,Math.min(m.height,
+mxUtils.getValue(this.state.style,"jettyHeight",ua.prototype.jettyHeight)));return new mxPoint(m.x+x/2,m.y+2*p)},function(m,x){this.state.style.jettyWidth=Math.round(2*Math.max(0,Math.min(m.width,x.x-m.x)));this.state.style.jettyHeight=Math.round(Math.max(0,Math.min(m.height,x.y-m.y))/2)})]},corner:function(c){return[db(c,["dx","dy"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",Va.prototype.dx))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,
+"dy",Va.prototype.dy)));return new mxPoint(m.x+x,m.y+p)},function(m,x){this.state.style.dx=Math.round(Math.max(0,Math.min(m.width,x.x-m.x)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},tee:function(c){return[db(c,["dx","dy"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"dx",cb.prototype.dx))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"dy",cb.prototype.dy)));return new mxPoint(m.x+(m.width+x)/2,m.y+p)},function(m,
+x){this.state.style.dx=Math.round(Math.max(0,2*Math.min(m.width/2,x.x-m.x-m.width/2)));this.state.style.dy=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},singleArrow:ob(1),doubleArrow:ob(.5),folder:function(c){return[db(c,["tabWidth","tabHeight"],function(m){var x=Math.max(0,Math.min(m.width,mxUtils.getValue(this.state.style,"tabWidth",C.prototype.tabWidth))),p=Math.max(0,Math.min(m.height,mxUtils.getValue(this.state.style,"tabHeight",C.prototype.tabHeight)));mxUtils.getValue(this.state.style,
+"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(x=m.width-x);return new mxPoint(m.x+x,m.y+p)},function(m,x){var p=Math.max(0,Math.min(m.width,x.x-m.x));mxUtils.getValue(this.state.style,"tabPosition",C.prototype.tabPosition)==mxConstants.ALIGN_RIGHT&&(p=m.width-p);this.state.style.tabWidth=Math.round(p);this.state.style.tabHeight=Math.round(Math.max(0,Math.min(m.height,x.y-m.y)))},!1)]},document:function(c){return[db(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,
+"size",ca.prototype.size))));return new mxPoint(m.x+3*m.width/4,m.y+(1-x)*m.height)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-x.y)/m.height))},!1)]},tape:function(c){return[db(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",Z.prototype.size))));return new mxPoint(m.getCenterX(),m.y+x*m.height/2)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(x.y-m.y)/m.height*2))},!1)]},isoCube2:function(c){return[db(c,
+["isoAngle"],function(m){var x=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.state.style,"isoAngle",l.isoAngle))))*Math.PI/200;return new mxPoint(m.x,m.y+Math.min(m.width*Math.tan(x),.5*m.height))},function(m,x){this.state.style.isoAngle=Math.max(0,50*(x.y-m.y)/m.height)},!0)]},cylinder2:vb(q.prototype.size),cylinder3:vb(z.prototype.size),offPageConnector:function(c){return[db(c,["size"],function(m){var x=Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.state.style,"size",W.prototype.size))));
+return new mxPoint(m.getCenterX(),m.y+(1-x)*m.height)},function(m,x){this.state.style.size=Math.max(0,Math.min(1,(m.y+m.height-x.y)/m.height))},!1)]},"mxgraph.basic.rect":function(c){var m=[Graph.createHandle(c,["size"],function(x){var p=Math.max(0,Math.min(x.width/2,x.height/2,parseFloat(mxUtils.getValue(this.state.style,"size",this.size))));return new mxPoint(x.x+p,x.y+p)},function(x,p){this.state.style.size=Math.round(100*Math.max(0,Math.min(x.height/2,x.width/2,p.x-x.x)))/100})];c=Graph.createHandle(c,
+["indent"],function(x){var p=Math.max(0,Math.min(100,parseFloat(mxUtils.getValue(this.state.style,"indent",this.dx2))));return new mxPoint(x.x+.75*x.width,x.y+p*x.height/200)},function(x,p){this.state.style.indent=Math.round(100*Math.max(0,Math.min(100,200*(p.y-x.y)/x.height)))/100});m.push(c);return m},step:Bb(sa.prototype.size,!0,null,!0,sa.prototype.fixedSize),hexagon:Bb(M.prototype.size,!0,.5,!0,M.prototype.fixedSize),curlyBracket:Bb(O.prototype.size,!1),display:Bb(ya.prototype.size,!1),cube:nb(1,
+n.prototype.size,!1),card:nb(.5,G.prototype.size,!0),loopLimit:nb(.5,U.prototype.size,!0),trapezoid:yb(.5,Y.prototype.size,Y.prototype.fixedSize),parallelogram:yb(1,ba.prototype.size,ba.prototype.fixedSize)};Graph.createHandle=db;Graph.handleFactory=rb;var tb=mxVertexHandler.prototype.createCustomHandles;mxVertexHandler.prototype.createCustomHandles=function(){var c=tb.apply(this,arguments);if(this.graph.isCellRotatable(this.state.cell)){var m=this.state.style.shape;null==mxCellRenderer.defaultShapes[m]&&
+null==mxStencilRegistry.getStencil(m)?m=mxConstants.SHAPE_RECTANGLE:this.state.view.graph.isSwimlane(this.state.cell)&&(m=mxConstants.SHAPE_SWIMLANE);m=rb[m];null==m&&null!=this.state.shape&&this.state.shape.isRoundable()&&(m=rb[mxConstants.SHAPE_RECTANGLE]);null!=m&&(m=m(this.state),null!=m&&(c=null==c?m:c.concat(m)))}return c};mxEdgeHandler.prototype.createCustomHandles=function(){var c=this.state.style.shape;null==mxCellRenderer.defaultShapes[c]&&null==mxStencilRegistry.getStencil(c)&&(c=mxConstants.SHAPE_CONNECTOR);
+c=rb[c];return null!=c?c(this.state):null}}else Graph.createHandle=function(){},Graph.handleFactory={};var zb=new mxPoint(1,0),wb=new mxPoint(1,0),Ab=mxUtils.toRadians(-30);zb=mxUtils.getRotatedPoint(zb,Math.cos(Ab),Math.sin(Ab));var lb=mxUtils.toRadians(-150);wb=mxUtils.getRotatedPoint(wb,Math.cos(lb),Math.sin(lb));mxEdgeStyle.IsometricConnector=function(c,m,x,p,v){var A=c.view;p=null!=p&&0<p.length?p[0]:null;var B=c.absolutePoints,ha=B[0];B=B[B.length-1];null!=p&&(p=A.transformControlPoint(c,p));
+null==ha&&null!=m&&(ha=new mxPoint(m.getCenterX(),m.getCenterY()));null==B&&null!=x&&(B=new mxPoint(x.getCenterX(),x.getCenterY()));var J=zb.x,va=zb.y,oa=wb.x,Xa=wb.y,ib="horizontal"==mxUtils.getValue(c.style,"elbow","horizontal");if(null!=B&&null!=ha){c=function(Ha,La,Ka){Ha-=gb.x;var Ia=La-gb.y;La=(Xa*Ha-oa*Ia)/(J*Xa-va*oa);Ha=(va*Ha-J*Ia)/(va*oa-J*Xa);ib?(Ka&&(gb=new mxPoint(gb.x+J*La,gb.y+va*La),v.push(gb)),gb=new mxPoint(gb.x+oa*Ha,gb.y+Xa*Ha)):(Ka&&(gb=new mxPoint(gb.x+oa*Ha,gb.y+Xa*Ha),v.push(gb)),
+gb=new mxPoint(gb.x+J*La,gb.y+va*La));v.push(gb)};var gb=ha;null==p&&(p=new mxPoint(ha.x+(B.x-ha.x)/2,ha.y+(B.y-ha.y)/2));c(p.x,p.y,!0);c(B.x,B.y,!1)}};mxStyleRegistry.putValue("isometricEdgeStyle",mxEdgeStyle.IsometricConnector);var xb=Graph.prototype.createEdgeHandler;Graph.prototype.createEdgeHandler=function(c,m){if(m==mxEdgeStyle.IsometricConnector){var x=new mxElbowEdgeHandler(c);x.snapToTerminals=!1;return x}return xb.apply(this,arguments)};t.prototype.constraints=[];E.prototype.getConstraints=
+function(c,m,x){c=[];var p=Math.tan(mxUtils.toRadians(30)),v=(.5-p)/2;p=Math.min(m,x/(.5+p));m=(m-p)/2;x=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*p,x+p*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+p,x+.25*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+p,x+.75*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m+.5*p,x+(1-v)*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,x+.75*p));return c};l.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;p=Math.min(m*Math.tan(p),.5*x);c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x-p));c.push(new mxConnectionConstraint(new mxPoint(.5,
+1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));return c};R.prototype.getConstraints=function(c,m,x){c=[];mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE);var p=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));parseFloat(mxUtils.getValue(this.style,"position",this.position));var v=m*Math.max(0,
+Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2))));parseFloat(mxUtils.getValue(this.style,"base",this.base));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.25,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x-p)));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};mxRectangleShape.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,
1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0)];mxEllipse.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(0,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(1,.5))];Ma.prototype.constraints=mxRectangleShape.prototype.constraints;
-mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;ia.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};G.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));l>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));return c};z.prototype.getConstraints=function(c,l,x){c=[];l=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,l));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-l));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,l+.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(1,
-0),!1,null,0,l+.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,x-l-.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-l-.5*(.5*x-l)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*l));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-l));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-l));return c};C.prototype.getConstraints=
-function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Ra.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;ya.prototype.constraints=mxEllipse.prototype.constraints;
-ra.prototype.constraints=mxEllipse.prototype.constraints;Wa.prototype.constraints=mxEllipse.prototype.constraints;Ua.prototype.constraints=mxRectangleShape.prototype.constraints;Sa.prototype.constraints=mxRectangleShape.prototype.constraints;Ja.prototype.getConstraints=function(c,l,x){c=[];var p=Math.min(l,x/2),v=Math.min(l-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*l);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};va.prototype.getConstraints=function(c,l,x){l=parseFloat(mxUtils.getValue(c,
-"jettyWidth",va.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",va.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
-.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,l),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,l));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1,null,l));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,l));return p};V.prototype.constraints=mxRectangleShape.prototype.constraints;ja.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];aa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
-.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];ua.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+mxImageShape.prototype.constraints=mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.constraints=mxRectangleShape.prototype.constraints;mxLabel.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};G.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));m>=2*p&&c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return c};n.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+"size",this.size)))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x+p)));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-p)));return c};z.prototype.getConstraints=function(c,m,x){c=[];m=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(1,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,1),!1,null,0,-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m+.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(1,
+0),!1,null,0,m+.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1,null,0,x-m-.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-m-.5*(.5*x-m)));c.push(new mxConnectionConstraint(new mxPoint(.145,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,0),!1,null,0,.29*m));c.push(new mxConnectionConstraint(new mxPoint(.855,1),!1,null,0,.29*-m));c.push(new mxConnectionConstraint(new mxPoint(.145,1),!1,null,0,.29*-m));return c};C.prototype.getConstraints=
+function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?(c.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v))):(c.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-.5*p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,v)),c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,.75*(x-v)+v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x));c.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(.75,1),!1));return c};Oa.prototype.constraints=mxRectangleShape.prototype.constraints;K.prototype.constraints=mxRectangleShape.prototype.constraints;na.prototype.constraints=mxEllipse.prototype.constraints;wa.prototype.constraints=mxEllipse.prototype.constraints;
+ra.prototype.constraints=mxEllipse.prototype.constraints;za.prototype.constraints=mxEllipse.prototype.constraints;Ra.prototype.constraints=mxRectangleShape.prototype.constraints;Ba.prototype.constraints=mxRectangleShape.prototype.constraints;ya.prototype.getConstraints=function(c,m,x){c=[];var p=Math.min(m,x/2),v=Math.min(m-p,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*m);c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(v+m-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};ua.prototype.getConstraints=function(c,m,x){m=parseFloat(mxUtils.getValue(c,
+"jettyWidth",ua.prototype.jettyWidth))/2;c=parseFloat(mxUtils.getValue(c,"jettyHeight",ua.prototype.jettyHeight));var p=[new mxConnectionConstraint(new mxPoint(0,0),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(1,0),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,
+.75),!0),new mxConnectionConstraint(new mxPoint(0,1),!1,null,m),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(1,1),!0),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,1.5*c)),new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,Math.min(x-.5*c,3.5*c))];x>5*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,m));x>8*c&&p.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1,null,m));x>15*c&&p.push(new mxConnectionConstraint(new mxPoint(0,.25),!1,null,m));return p};U.prototype.constraints=mxRectangleShape.prototype.constraints;W.prototype.constraints=mxRectangleShape.prototype.constraints;mxCylinder.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.15,.05),!1),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.85,.05),!1),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.7),!0),new mxConnectionConstraint(new mxPoint(1,.3),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.7),!0),new mxConnectionConstraint(new mxPoint(.15,.95),!1),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.85,.95),!1)];ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.1),!1),new mxConnectionConstraint(new mxPoint(.5,0),!1),new mxConnectionConstraint(new mxPoint(.75,
+.1),!1),new mxConnectionConstraint(new mxPoint(0,1/3),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(1,1/3),!1),new mxConnectionConstraint(new mxPoint(1,1),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(0,.3),!0),new mxConnectionConstraint(new mxPoint(0,
.7),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];mxActor.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.25,.2),!1),new mxConnectionConstraint(new mxPoint(.1,.5),!1),new mxConnectionConstraint(new mxPoint(0,
.75),!0),new mxConnectionConstraint(new mxPoint(.75,.25),!1),new mxConnectionConstraint(new mxPoint(.9,.5),!1),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)];F.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(.5,.25),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(.25,
.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.5,.75),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];Z.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.35),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.65),!1),new mxConnectionConstraint(new mxPoint(1,.35),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,
-.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
-.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
+.65),!1),new mxConnectionConstraint(new mxPoint(.25,1),!1),new mxConnectionConstraint(new mxPoint(.75,0),!1)];sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,0),!0),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,
+.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxLine.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.5,
0),!1),new mxConnectionConstraint(new mxPoint(.5,1),!1)];mxDoubleEllipse.prototype.constraints=mxEllipse.prototype.constraints;mxRhombus.prototype.constraints=mxEllipse.prototype.constraints;mxTriangle.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(1,
.5),!0)];mxHexagon.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.375,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.625,0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0),new mxConnectionConstraint(new mxPoint(.375,
1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.625,1),!0)];mxCloud.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,.25),!1),new mxConnectionConstraint(new mxPoint(.4,.1),!1),new mxConnectionConstraint(new mxPoint(.16,.55),!1),new mxConnectionConstraint(new mxPoint(.07,.4),!1),new mxConnectionConstraint(new mxPoint(.31,.8),!1),new mxConnectionConstraint(new mxPoint(.13,.77),!1),new mxConnectionConstraint(new mxPoint(.8,.8),!1),new mxConnectionConstraint(new mxPoint(.55,
-.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];ba.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
-0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;db.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
-"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*l+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,.5*(l+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*l-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Za.prototype.getConstraints=function(c,l,x){c=[];var p=Math.max(0,Math.min(l,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-1),!1));return c};Ha.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];cb.prototype.getConstraints=
-function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};y.prototype.getConstraints=function(c,l,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",cb.prototype.arrowWidth)))),v=l*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",cb.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
-.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*l,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};Fa.prototype.getConstraints=
-function(c,l,x){c=[];var p=Math.min(x,l),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(l-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,l,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,l,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(l+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
-0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,p));return c};X.prototype.constraints=null;L.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
-.9),!1)];S.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];da.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
+.95),!1),new mxConnectionConstraint(new mxPoint(.875,.5),!1),new mxConnectionConstraint(new mxPoint(.96,.7),!1),new mxConnectionConstraint(new mxPoint(.625,.2),!1),new mxConnectionConstraint(new mxPoint(.88,.25),!1)];ba.prototype.constraints=mxRectangleShape.prototype.constraints;Y.prototype.constraints=mxRectangleShape.prototype.constraints;ca.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.25,0),!0),new mxConnectionConstraint(new mxPoint(.5,0),!0),new mxConnectionConstraint(new mxPoint(.75,
+0),!0),new mxConnectionConstraint(new mxPoint(0,.25),!0),new mxConnectionConstraint(new mxPoint(0,.5),!0),new mxConnectionConstraint(new mxPoint(0,.75),!0),new mxConnectionConstraint(new mxPoint(1,.25),!0),new mxConnectionConstraint(new mxPoint(1,.5),!0),new mxConnectionConstraint(new mxPoint(1,.75),!0)];mxArrow.prototype.constraints=null;cb.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,
+"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*m+.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,.5*(m+p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.25*m-.25*p,v));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*v));return c};Va.prototype.getConstraints=function(c,m,x){c=[];var p=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),v=Math.max(0,Math.min(x,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(1,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,.5*v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+p),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,.5*(x+v)));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,p,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*p,x));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+1),!1));return c};Ja.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,0),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,1),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.5,.5),!1),new mxConnectionConstraint(new mxPoint(.75,.5),!1),new mxConnectionConstraint(new mxPoint(1,0),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(1,1),!1)];$a.prototype.getConstraints=
+function(c,m,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m-v),x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,x-p));return c};y.prototype.getConstraints=function(c,m,x){c=[];var p=x*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",$a.prototype.arrowWidth)))),v=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",$a.prototype.arrowSize))));p=(x-p)/2;c.push(new mxConnectionConstraint(new mxPoint(0,
+.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m-v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*m,x-p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));return c};Ca.prototype.getConstraints=
+function(c,m,x){c=[];var p=Math.min(x,m),v=Math.max(0,Math.min(p,p*parseFloat(mxUtils.getValue(this.style,"size",this.size))));p=(x-v)/2;var A=p+v,B=(m-v)/2;v=B+v;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,v,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,x));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,x-.5*p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,v,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+v),p));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,m,p));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,m,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(m+v),A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,p));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,p));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,
+0),!1,null,0,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*B,A));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,B,p));return c};V.prototype.constraints=null;N.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,
+.9),!1)];T.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];fa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];pa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,
.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(b){this.editorUi=b;this.actions={};this.init()}
-Actions.prototype.init=function(){function b(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),m=0;m<g.length;m++)t.cellLabelChanged(g[m],"")}finally{t.getModel().endUpdate()}}}function k(g,m,q,z,F){F.getModel().beginUpdate();try{var C=F.getCellGeometry(g);null!=C&&q&&z&&(q/=z,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,F.getModel().setGeometry(g,
-C));F.setCellStyles(mxConstants.STYLE_CLIP_PATH,m,[g]);F.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{F.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
-m=t.view.translate.x,q=t.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(g-t.view.scale)&&m==t.view.translate.x&&q==t.view.translate.y&&n.actions.get(t.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){t.isEnabled()&&(t.isSelectionEmpty()?n.actions.get("smartFit").funct():t.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));
-window.openFile.setConsumer(mxUtils.bind(this,function(g,m){try{var q=mxUtils.parseXml(g);D.graph.setSelectionCells(D.graph.importGraphModel(q.documentElement))}catch(z){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+z.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){n.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){n.saveFile(!0)},null,
+Actions.prototype.init=function(){function b(g){t.escape();g=t.deleteCells(t.getDeletableCells(t.getSelectionCells()),g);null!=g&&t.setSelectionCells(g)}function e(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{for(var g=t.getSelectionCells(),l=0;l<g.length;l++)t.cellLabelChanged(g[l],"")}finally{t.getModel().endUpdate()}}}function k(g,l,q,z,F){F.getModel().beginUpdate();try{var C=F.getCellGeometry(g);null!=C&&q&&z&&(q/=z,C=C.clone(),1<q?C.height=C.width/q:C.width=C.height*q,F.getModel().setGeometry(g,
+C));F.setCellStyles(mxConstants.STYLE_CLIP_PATH,l,[g]);F.setCellStyles(mxConstants.STYLE_ASPECT,"fixed",[g])}finally{F.getModel().endUpdate()}}var n=this.editorUi,D=n.editor,t=D.graph,E=function(){return Action.prototype.isEnabled.apply(this,arguments)&&t.isEnabled()};this.addAction("new...",function(){t.openLink(n.getUrl())});this.addAction("open...",function(){window.openNew=!0;window.openKey="open";n.openFile()});this.addAction("smartFit",function(){t.popupMenuHandler.hideMenu();var g=t.view.scale,
+l=t.view.translate.x,q=t.view.translate.y;n.actions.get("resetView").funct();1E-5>Math.abs(g-t.view.scale)&&l==t.view.translate.x&&q==t.view.translate.y&&n.actions.get(t.pageVisible?"fitPage":"fitWindow").funct()});this.addAction("keyPressEnter",function(){t.isEnabled()&&(t.isSelectionEmpty()?n.actions.get("smartFit").funct():t.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){n.hideDialog()}));
+window.openFile.setConsumer(mxUtils.bind(this,function(g,l){try{var q=mxUtils.parseXml(g);D.graph.setSelectionCells(D.graph.importGraphModel(q.documentElement))}catch(z){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+z.message)}}));n.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile=null})}).isEnabled=E;this.addAction("save",function(){n.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=E;this.addAction("saveAs...",function(){n.saveFile(!0)},null,
null,Editor.ctrlKey+"+Shift+S").isEnabled=E;this.addAction("export...",function(){n.showDialog((new ExportDialog(n)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var g=new EditDiagramDialog(n);n.showDialog(g.container,620,420,!0,!1);g.init()});this.addAction("pageSetup...",function(){n.showDialog((new PageSetupDialog(n)).container,320,240,!0,!0)}).isEnabled=E;this.addAction("print...",function(){n.showDialog((new PrintDialog(n)).container,300,180,!0,!0)},null,"sprite-print",
-Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(t,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var g=null;try{g=n.copyXml(),null!=g&&t.removeCells(g,!1)}catch(m){}null==g&&mxClipboard.cut(t)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(g){}try{mxClipboard.copy(t)}catch(g){n.handleError(g)}},
-null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(m){if(null!=m){t.getModel().beginUpdate();try{n.pasteXml(m,!0)}finally{t.getModel().endUpdate()}}else mxClipboard.paste(t)}),g=!0)}catch(m){}g||mxClipboard.paste(t)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(g){function m(z){if(null!=z){for(var F=!0,C=0;C<
-z.length&&F;C++)F=F&&t.model.isEdge(z[C]);var I=t.view.translate;C=t.view.scale;var G=I.x,Z=I.y;I=null;if(1==z.length&&F){var fa=t.getCellGeometry(z[0]);null!=fa&&(I=fa.getTerminalPoint(!0))}I=null!=I?I:t.getBoundingBoxFromGeometry(z,F);null!=I&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-Z)),t.cellsMoved(z,F-I.x,C-I.y))}}function q(){t.getModel().beginUpdate();try{m(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
-!t.isCellLocked(t.getDefaultParent())){g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(z){if(null!=z){t.getModel().beginUpdate();try{m(n.pasteXml(z,!0))}finally{t.getModel().endUpdate()}}else q()}),g=!0)}catch(z){}g||q()}});this.addAction("copySize",function(){var g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.getModel().isVertex(g)&&(g=t.getCellGeometry(g),null!=g&&(n.copiedSize=new mxRectangle(g.x,g.y,g.width,g.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
-function(){if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedSize){t.getModel().beginUpdate();try{for(var g=t.getResizableCells(t.getSelectionCells()),m=0;m<g.length;m++)if(t.getModel().isVertex(g[m])){var q=t.getCellGeometry(g[m]);null!=q&&(q=q.clone(),q.width=n.copiedSize.width,q.height=n.copiedSize.height,t.getModel().setGeometry(g[m],q))}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var g=t.getSelectionCell()||t.getModel().getRoot();t.isEnabled()&&
-null!=g&&(g=g.cloneValue(),null==g||isNaN(g.nodeType)||(n.copiedValue=g))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(g,m){function q(C,I){var G=z.getValue(C);I=C.cloneValue(I);I.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||I.setAttribute("placeholders",G.getAttribute("placeholders"));null!=g&&mxEvent.isShiftDown(g)||I.setAttribute("label",t.convertValueToString(C));z.setValue(C,I)}g=null!=m?m:g;var z=t.getModel();if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedValue){z.beginUpdate();
-try{var F=t.getEditableCells(t.getSelectionCells());if(0==F.length)q(z.getRoot(),n.copiedValue);else for(m=0;m<F.length;m++)q(F[m],n.copiedValue)}finally{z.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(g,m){g=null!=m?m:g;null!=g&&mxEvent.isShiftDown(g)?e():b(null!=g&&(mxEvent.isControlDown(g)||mxEvent.isMetaDown(g)||mxEvent.isAltDown(g)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
+Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(t,null,10,10)});this.addAction("undo",function(){n.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){n.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var g=null;try{g=n.copyXml(),null!=g&&t.removeCells(g,!1)}catch(l){}null==g&&mxClipboard.cut(t)},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{n.copyXml()}catch(g){}try{mxClipboard.copy(t)}catch(g){n.handleError(g)}},
+null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(l){if(null!=l){t.getModel().beginUpdate();try{n.pasteXml(l,!0)}finally{t.getModel().endUpdate()}}else mxClipboard.paste(t)}),g=!0)}catch(l){}g||mxClipboard.paste(t)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(g){function l(z){if(null!=z){for(var F=!0,C=0;C<
+z.length&&F;C++)F=F&&t.model.isEdge(z[C]);var I=t.view.translate;C=t.view.scale;var G=I.x,Z=I.y;I=null;if(1==z.length&&F){var ca=t.getCellGeometry(z[0]);null!=ca&&(I=ca.getTerminalPoint(!0))}I=null!=I?I:t.getBoundingBoxFromGeometry(z,F);null!=I&&(F=Math.round(t.snap(t.popupMenuHandler.triggerX/C-G)),C=Math.round(t.snap(t.popupMenuHandler.triggerY/C-Z)),t.cellsMoved(z,F-I.x,C-I.y))}}function q(){t.getModel().beginUpdate();try{l(mxClipboard.paste(t))}finally{t.getModel().endUpdate()}}if(t.isEnabled()&&
+!t.isCellLocked(t.getDefaultParent())){g=!1;try{Editor.enableNativeCipboard&&(n.readGraphModelFromClipboard(function(z){if(null!=z){t.getModel().beginUpdate();try{l(n.pasteXml(z,!0))}finally{t.getModel().endUpdate()}}else q()}),g=!0)}catch(z){}g||q()}});this.addAction("copySize",function(){var g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.getModel().isVertex(g)&&(g=t.getCellGeometry(g),null!=g&&(n.copiedSize=new mxRectangle(g.x,g.y,g.width,g.height)))},null,null,"Alt+Shift+X");this.addAction("pasteSize",
+function(){if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedSize){t.getModel().beginUpdate();try{for(var g=t.getResizableCells(t.getSelectionCells()),l=0;l<g.length;l++)if(t.getModel().isVertex(g[l])){var q=t.getCellGeometry(g[l]);null!=q&&(q=q.clone(),q.width=n.copiedSize.width,q.height=n.copiedSize.height,t.getModel().setGeometry(g[l],q))}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+V");this.addAction("copyData",function(){var g=t.getSelectionCell()||t.getModel().getRoot();t.isEnabled()&&
+null!=g&&(g=g.cloneValue(),null==g||isNaN(g.nodeType)||(n.copiedValue=g))},null,null,"Alt+Shift+B");this.addAction("pasteData",function(g,l){function q(C,I){var G=z.getValue(C);I=C.cloneValue(I);I.removeAttribute("placeholders");null==G||isNaN(G.nodeType)||I.setAttribute("placeholders",G.getAttribute("placeholders"));null!=g&&mxEvent.isShiftDown(g)||I.setAttribute("label",t.convertValueToString(C));z.setValue(C,I)}g=null!=l?l:g;var z=t.getModel();if(t.isEnabled()&&!t.isSelectionEmpty()&&null!=n.copiedValue){z.beginUpdate();
+try{var F=t.getEditableCells(t.getSelectionCells());if(0==F.length)q(z.getRoot(),n.copiedValue);else for(l=0;l<F.length;l++)q(F[l],n.copiedValue)}finally{z.endUpdate()}}},null,null,"Alt+Shift+E");this.addAction("delete",function(g,l){g=null!=l?l:g;null!=g&&mxEvent.isShiftDown(g)?e():b(null!=g&&(mxEvent.isControlDown(g)||mxEvent.isMetaDown(g)||mxEvent.isAltDown(g)))},null,null,"Delete");this.addAction("deleteAll",function(){b(!0)});this.addAction("deleteLabels",function(){e()},null,null,Editor.ctrlKey+
"+Delete");this.addAction("duplicate",function(){try{t.setSelectionCells(t.duplicateCells()),t.scrollCellToVisible(t.getSelectionCell())}catch(g){n.handleError(g)}},null,null,Editor.ctrlKey+"+D");this.put("mergeCells",new Action(mxResources.get("merge"),function(){var g=n.getSelectionState();if(null!=g.mergeCell){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",g.rowspan,[g.mergeCell]),t.setCellStyles("colspan",g.colspan,[g.mergeCell])}finally{t.getModel().endUpdate()}}}));this.put("unmergeCells",
-new Action(mxResources.get("unmerge"),function(){var g=n.getSelectionState();if(0<g.cells.length){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",null,g.cells),t.setCellStyles("colspan",null,g.cells)}finally{t.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(g,m){g=null!=m?m:g;t.turnShapes(t.getResizableCells(t.getSelectionCells()),null!=g?mxEvent.isShiftDown(g):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
+new Action(mxResources.get("unmerge"),function(){var g=n.getSelectionState();if(0<g.cells.length){t.getModel().beginUpdate();try{t.setCellStyles("rowspan",null,g.cells),t.setCellStyles("colspan",null,g.cells)}finally{t.getModel().endUpdate()}}}));this.put("turn",new Action(mxResources.get("turn")+" / "+mxResources.get("reverse"),function(g,l){g=null!=l?l:g;t.turnShapes(t.getResizableCells(t.getSelectionCells()),null!=g?mxEvent.isShiftDown(g):!1)},null,null,mxClient.IS_SF?null:Editor.ctrlKey+"+R"));
this.put("selectConnections",new Action(mxResources.get("selectEdges"),function(g){g=t.getSelectionCell();t.isEnabled()&&null!=g&&t.addSelectionCells(t.getEdges(g))}));this.addAction("selectVertices",function(){t.selectVertices(null,!0)},null,null,Editor.ctrlKey+"+Shift+I");this.addAction("selectEdges",function(){t.selectEdges()},null,null,Editor.ctrlKey+"+Shift+E");this.addAction("selectAll",function(){t.selectAll(null,!0)},null,null,Editor.ctrlKey+"+A");this.addAction("selectNone",function(){t.clearSelection()},
-null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),m=t.getCurrentCellStyle(t.getSelectionCell()),q=1==mxUtils.getValue(m,mxConstants.STYLE_EDITABLE,1)?0:1;t.setCellStyles(mxConstants.STYLE_MOVABLE,q,g);t.setCellStyles(mxConstants.STYLE_RESIZABLE,q,g);t.setCellStyles(mxConstants.STYLE_ROTATABLE,q,g);t.setCellStyles(mxConstants.STYLE_DELETABLE,q,g);t.setCellStyles(mxConstants.STYLE_EDITABLE,
+null,null,Editor.ctrlKey+"+Shift+A");this.addAction("lockUnlock",function(){if(!t.isSelectionEmpty()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),l=t.getCurrentCellStyle(t.getSelectionCell()),q=1==mxUtils.getValue(l,mxConstants.STYLE_EDITABLE,1)?0:1;t.setCellStyles(mxConstants.STYLE_MOVABLE,q,g);t.setCellStyles(mxConstants.STYLE_RESIZABLE,q,g);t.setCellStyles(mxConstants.STYLE_ROTATABLE,q,g);t.setCellStyles(mxConstants.STYLE_DELETABLE,q,g);t.setCellStyles(mxConstants.STYLE_EDITABLE,
q,g);t.setCellStyles("connectable",q,g)}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+L");this.addAction("home",function(){t.home()},null,null,"Shift+Home");this.addAction("exitGroup",function(){t.exitGroup()},null,null,Editor.ctrlKey+"+Shift+Home");this.addAction("enterGroup",function(){t.enterGroup()},null,null,Editor.ctrlKey+"+Shift+End");this.addAction("collapse",function(){t.foldCells(!0)},null,null,Editor.ctrlKey+"+Home");this.addAction("expand",function(){t.foldCells(!1)},
null,null,Editor.ctrlKey+"+End");this.addAction("toFront",function(){t.orderCells(!1)},null,null,Editor.ctrlKey+"+Shift+F");this.addAction("toBack",function(){t.orderCells(!0)},null,null,Editor.ctrlKey+"+Shift+B");this.addAction("bringForward",function(g){t.orderCells(!1,null,!0)});this.addAction("sendBackward",function(g){t.orderCells(!0,null,!0)});this.addAction("group",function(){if(t.isEnabled()){var g=mxUtils.sortCells(t.getSelectionCells(),!0);1!=g.length||t.isTable(g[0])||t.isTableRow(g[0])?
-(g=t.getCellsForGroup(g),1<g.length&&t.setSelectionCell(t.groupCells(null,0,g))):t.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(t.isEnabled()){var g=t.getEditableCells(t.getSelectionCells());t.model.beginUpdate();try{var m=t.ungroupCells();if(null!=g)for(var q=0;q<g.length;q++)t.model.contains(g[q])&&(0==t.model.getChildCount(g[q])&&t.model.isVertex(g[q])&&t.setCellStyles("container","0",[g[q]]),m.push(g[q]))}finally{t.model.endUpdate()}0<
-m.length&&t.setSelectionCells(m)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(t.isEnabled()){var g=t.getSelectionCells();if(null!=g){for(var m=[],q=0;q<g.length;q++)t.isTableRow(g[q])||t.isTableCell(g[q])||m.push(g[q]);t.removeCellsFromParent(m)}}});this.addAction("edit",function(){t.isEnabled()&&t.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var g=t.getSelectionCell()||t.getModel().getRoot();n.showDataDialog(g)},null,
-null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var m="";if(mxUtils.isNode(g.value)){var q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(q=g.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==q&&(q=g.value.getAttribute("tooltip"));null!=q&&(m=q)}m=new TextareaDialog(n,mxResources.get("editTooltip")+":",m,function(z){t.setTooltipForCell(g,
-z)});n.showDialog(m.container,320,200,!0,!0);m.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var g=t.getLinkForCell(t.getSelectionCell());null!=g&&t.openLink(g)});this.addAction("editLink...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var m=t.getLinkForCell(g)||"";n.showLinkDialog(m,mxResources.get("apply"),function(q,z,F){q=mxUtils.trim(q);t.setLinkForCell(g,0<q.length?q:null);t.setAttributeForCell(g,"linkTarget",F)},!0,t.getLinkTargetForCell(g))}},
-null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&(t.clearSelection(),n.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&n.showLinkDialog("",mxResources.get("insert"),function(g,m,q){g=mxUtils.trim(g);if(0<g.length){var z=null,F=t.getLinkTitle(g);null!=m&&0<m.length&&(z=m[0].iconUrl,
-F=m[0].name||m[0].type,F=F.charAt(0).toUpperCase()+F.substring(1),30<F.length&&(F=F.substring(0,30)+"..."));m=new mxCell(F,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=z?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+z:"spacing=10;"));m.vertex=!0;z=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([m],!0));m.geometry.x=z.x;m.geometry.y=z.y;t.setAttributeForCell(m,"linkTarget",q);t.setLinkForCell(m,g);t.cellSizeUpdated(m,
-!0);t.getModel().beginUpdate();try{m=t.addCell(m),t.fireEvent(new mxEventObject("cellsInserted","cells",[m]))}finally{t.getModel().endUpdate()}t.setSelectionCell(m);t.scrollCellToVisible(t.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(t.isEnabled())if(t.cellEditor.isContentEditing()){var g=t.getSelectedElement(),m=t.getParentByName(g,"A",t.cellEditor.textarea),q="";if(null==m&&null!=g&&null!=g.getElementsByTagName)for(var z=g.getElementsByTagName("a"),
-F=0;F<z.length&&null==m;F++)z[F].textContent==g.textContent&&(m=z[F]);null!=m&&"A"==m.nodeName&&(q=m.getAttribute("href")||"",t.selectNode(m));var C=t.cellEditor.saveSelection();n.showLinkDialog(q,mxResources.get("apply"),mxUtils.bind(this,function(I){t.cellEditor.restoreSelection(C);null!=I&&t.insertLink(I)}))}else t.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var g=t.getSelectionCells();if(null!=g){t.getModel().beginUpdate();
-try{for(var m=0;m<g.length;m++){var q=g[m];0<t.getModel().getChildCount(q)?t.updateGroupBounds([q],0,!0):t.updateCellSize(q)}}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){t.snapCellsToGrid(t.getSelectionCells(),t.gridSize)});this.addAction("formattedText",function(){t.stopEditing();var g=t.getCommonStyle(t.getSelectionCells());g="1"==mxUtils.getValue(g,"html","0")?null:"1";t.getModel().beginUpdate();try{for(var m=t.getEditableCells(t.getSelectionCells()),
-q=0;q<m.length;q++)if(state=t.getView().getState(m[q]),null!=state){var z=mxUtils.getValue(state.style,"html","0");if("1"==z&&null==g){var F=t.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var C=document.createElement("div");C.innerHTML=t.sanitizeHtml(F);F=mxUtils.extractTextWithWhitespace(C.childNodes);t.cellLabelChanged(state.cell,F);t.setCellStyles("html",g,[m[q]])}else"0"==z&&"1"==g&&(F=mxUtils.htmlEntities(t.convertValueToString(state.cell),
-!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"<br/>")),t.cellLabelChanged(state.cell,t.sanitizeHtml(F)),t.setCellStyles("html",g,[m[q]]))}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=g?g:"0"],"cells",m))}finally{t.getModel().endUpdate()}});this.addAction("wordWrap",function(){var g=t.getView().getState(t.getSelectionCell()),m="wrap";t.stopEditing();null!=g&&"wrap"==g.style[mxConstants.STYLE_WHITE_SPACE]&&(m=null);t.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
-m)});this.addAction("rotation",function(){var g="0",m=t.getView().getState(t.getSelectionCell());null!=m&&(g=m.style[mxConstants.STYLE_ROTATION]||g);g=new FilenameDialog(n,g,mxResources.get("apply"),function(q){null!=q&&0<q.length&&t.setCellStyles(mxConstants.STYLE_ROTATION,q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(g.container,375,80,!0,!0);g.init()});this.addAction("resetView",function(){t.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
-function(g){t.isFastZoomEnabled()?t.lazyZoom(!0,!0,n.buttonZoomDelay):t.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(g){t.isFastZoomEnabled()?t.lazyZoom(!1,!0,n.buttonZoomDelay):t.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var g=t.isSelectionEmpty()?t.getGraphBounds():t.getBoundingBox(t.getSelectionCells()),m=t.view.translate,q=t.view.scale;g.x=g.x/q-m.x;g.y=g.y/q-m.y;g.width/=q;
-g.height/=q;null!=t.backgroundImage&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle(0,0,t.backgroundImage.width,t.backgroundImage.height)));0==g.width||0==g.height?(t.zoomTo(1),n.resetScrollbars()):(m=Editor.fitWindowBorders,null!=m&&(g.x-=m.x,g.y-=m.y,g.width+=m.width+m.x,g.height+=m.height+m.y),t.fitWindow(g))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,m=t.pageScale;t.zoomTo(Math.floor(20*
-Math.min((t.container.clientWidth-10)/g.width/m,(t.container.clientHeight-10)/g.height/m))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=g.y*t.view.scale-1,t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,m=t.pageScale;t.zoomTo(Math.floor(20*Math.min((t.container.clientWidth-
-10)/(2*g.width)/m,(t.container.clientHeight-10)/g.height/m))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=Math.min(g.y,(t.container.scrollHeight-t.container.clientHeight)/2),t.container.scrollLeft=Math.min(g.x,(t.container.scrollWidth-t.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();t.zoomTo(Math.floor(20*(t.container.clientWidth-10)/t.pageFormat.width/
-t.pageScale)/20);if(mxUtils.hasScrollbars(t.container)){var g=t.getPagePadding();t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(m){m=parseInt(m);!isNaN(m)&&0<m&&t.zoomTo(m/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(g.container,
-300,80,!0,!0);g.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(m){m=parseInt(m);!isNaN(m)&&0<m&&(m=new ChangePageSetup(n,null,null,null,m/100),m.ignoreColor=!0,m.ignoreImage=!0,t.model.execute(m))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(g.container,300,80,!0,!0);g.init()}));var d=null;d=this.addAction("grid",
+(g=t.getCellsForGroup(g),1<g.length&&t.setSelectionCell(t.groupCells(null,0,g))):t.setCellStyles("container","1")}},null,null,Editor.ctrlKey+"+G");this.addAction("ungroup",function(){if(t.isEnabled()){var g=t.getEditableCells(t.getSelectionCells());t.model.beginUpdate();try{var l=t.ungroupCells();if(null!=g)for(var q=0;q<g.length;q++)t.model.contains(g[q])&&(0==t.model.getChildCount(g[q])&&t.model.isVertex(g[q])&&t.setCellStyles("container","0",[g[q]]),l.push(g[q]))}finally{t.model.endUpdate()}0<
+l.length&&t.setSelectionCells(l)}},null,null,Editor.ctrlKey+"+Shift+U");this.addAction("removeFromGroup",function(){if(t.isEnabled()){var g=t.getSelectionCells();if(null!=g){for(var l=[],q=0;q<g.length;q++)t.isTableRow(g[q])||t.isTableCell(g[q])||l.push(g[q]);t.removeCellsFromParent(l)}}});this.addAction("edit",function(){t.isEnabled()&&t.startEditingAtCell()},null,null,"F2/Enter");this.addAction("editData...",function(){var g=t.getSelectionCell()||t.getModel().getRoot();n.showDataDialog(g)},null,
+null,Editor.ctrlKey+"+M");this.addAction("editTooltip...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var l="";if(mxUtils.isNode(g.value)){var q=null;Graph.translateDiagram&&null!=Graph.diagramLanguage&&g.value.hasAttribute("tooltip_"+Graph.diagramLanguage)&&(q=g.value.getAttribute("tooltip_"+Graph.diagramLanguage));null==q&&(q=g.value.getAttribute("tooltip"));null!=q&&(l=q)}l=new TextareaDialog(n,mxResources.get("editTooltip")+":",l,function(z){t.setTooltipForCell(g,
+z)});n.showDialog(l.container,320,200,!0,!0);l.init()}},null,null,"Alt+Shift+T");this.addAction("openLink",function(){var g=t.getLinkForCell(t.getSelectionCell());null!=g&&t.openLink(g)});this.addAction("editLink...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&null!=g&&t.isCellEditable(g)){var l=t.getLinkForCell(g)||"";n.showLinkDialog(l,mxResources.get("apply"),function(q,z,F){q=mxUtils.trim(q);t.setLinkForCell(g,0<q.length?q:null);t.setAttributeForCell(g,"linkTarget",F)},!0,t.getLinkTargetForCell(g))}},
+null,null,"Alt+Shift+L");this.put("insertImage",new Action(mxResources.get("image")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&(t.clearSelection(),n.actions.get("image").funct())})).isEnabled=E;this.put("insertLink",new Action(mxResources.get("link")+"...",function(){t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&n.showLinkDialog("",mxResources.get("insert"),function(g,l,q){g=mxUtils.trim(g);if(0<g.length){var z=null,F=t.getLinkTitle(g);null!=l&&0<l.length&&(z=l[0].iconUrl,
+F=l[0].name||l[0].type,F=F.charAt(0).toUpperCase()+F.substring(1),30<F.length&&(F=F.substring(0,30)+"..."));l=new mxCell(F,new mxGeometry(0,0,100,40),"fontColor=#0000EE;fontStyle=4;rounded=1;overflow=hidden;"+(null!=z?"shape=label;imageWidth=16;imageHeight=16;spacingLeft=26;align=left;image="+z:"spacing=10;"));l.vertex=!0;z=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry([l],!0));l.geometry.x=z.x;l.geometry.y=z.y;t.setAttributeForCell(l,"linkTarget",q);t.setLinkForCell(l,g);t.cellSizeUpdated(l,
+!0);t.getModel().beginUpdate();try{l=t.addCell(l),t.fireEvent(new mxEventObject("cellsInserted","cells",[l]))}finally{t.getModel().endUpdate()}t.setSelectionCell(l);t.scrollCellToVisible(t.getSelectionCell())}},!0)})).isEnabled=E;this.addAction("link...",mxUtils.bind(this,function(){if(t.isEnabled())if(t.cellEditor.isContentEditing()){var g=t.getSelectedElement(),l=t.getParentByName(g,"A",t.cellEditor.textarea),q="";if(null==l&&null!=g&&null!=g.getElementsByTagName)for(var z=g.getElementsByTagName("a"),
+F=0;F<z.length&&null==l;F++)z[F].textContent==g.textContent&&(l=z[F]);null!=l&&"A"==l.nodeName&&(q=l.getAttribute("href")||"",t.selectNode(l));var C=t.cellEditor.saveSelection();n.showLinkDialog(q,mxResources.get("apply"),mxUtils.bind(this,function(I){t.cellEditor.restoreSelection(C);null!=I&&t.insertLink(I)}))}else t.isSelectionEmpty()?this.get("insertLink").funct():this.get("editLink").funct()})).isEnabled=E;this.addAction("autosize",function(){var g=t.getSelectionCells();if(null!=g){t.getModel().beginUpdate();
+try{for(var l=0;l<g.length;l++){var q=g[l];0<t.getModel().getChildCount(q)?t.updateGroupBounds([q],0,!0):t.updateCellSize(q)}}finally{t.getModel().endUpdate()}}},null,null,Editor.ctrlKey+"+Shift+Y");this.addAction("snapToGrid",function(){t.snapCellsToGrid(t.getSelectionCells(),t.gridSize)});this.addAction("formattedText",function(){t.stopEditing();var g=t.getCommonStyle(t.getSelectionCells());g="1"==mxUtils.getValue(g,"html","0")?null:"1";t.getModel().beginUpdate();try{for(var l=t.getEditableCells(t.getSelectionCells()),
+q=0;q<l.length;q++)if(state=t.getView().getState(l[q]),null!=state){var z=mxUtils.getValue(state.style,"html","0");if("1"==z&&null==g){var F=t.convertValueToString(state.cell);"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"").replace(/<br\s*.?>/g,"\n"));var C=document.createElement("div");C.innerHTML=t.sanitizeHtml(F);F=mxUtils.extractTextWithWhitespace(C.childNodes);t.cellLabelChanged(state.cell,F);t.setCellStyles("html",g,[l[q]])}else"0"==z&&"1"==g&&(F=mxUtils.htmlEntities(t.convertValueToString(state.cell),
+!1),"0"!=mxUtils.getValue(state.style,"nl2Br","1")&&(F=F.replace(/\n/g,"<br/>")),t.cellLabelChanged(state.cell,t.sanitizeHtml(F)),t.setCellStyles("html",g,[l[q]]))}n.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=g?g:"0"],"cells",l))}finally{t.getModel().endUpdate()}});this.addAction("wordWrap",function(){var g=t.getView().getState(t.getSelectionCell()),l="wrap";t.stopEditing();null!=g&&"wrap"==g.style[mxConstants.STYLE_WHITE_SPACE]&&(l=null);t.setCellStyles(mxConstants.STYLE_WHITE_SPACE,
+l)});this.addAction("rotation",function(){var g="0",l=t.getView().getState(t.getSelectionCell());null!=l&&(g=l.style[mxConstants.STYLE_ROTATION]||g);g=new FilenameDialog(n,g,mxResources.get("apply"),function(q){null!=q&&0<q.length&&t.setCellStyles(mxConstants.STYLE_ROTATION,q)},mxResources.get("enterValue")+" ("+mxResources.get("rotation")+" 0-360)");n.showDialog(g.container,375,80,!0,!0);g.init()});this.addAction("resetView",function(){t.zoomTo(1);n.resetScrollbars()},null,null,"Enter/Home");this.addAction("zoomIn",
+function(g){t.isFastZoomEnabled()?t.lazyZoom(!0,!0,n.buttonZoomDelay):t.zoomIn()},null,null,Editor.ctrlKey+" + (Numpad) / Alt+Mousewheel");this.addAction("zoomOut",function(g){t.isFastZoomEnabled()?t.lazyZoom(!1,!0,n.buttonZoomDelay):t.zoomOut()},null,null,Editor.ctrlKey+" - (Numpad) / Alt+Mousewheel");this.addAction("fitWindow",function(){var g=t.isSelectionEmpty()?t.getGraphBounds():t.getBoundingBox(t.getSelectionCells()),l=t.view.translate,q=t.view.scale;g.x=g.x/q-l.x;g.y=g.y/q-l.y;g.width/=q;
+g.height/=q;null!=t.backgroundImage&&(g=mxRectangle.fromRectangle(g),g.add(new mxRectangle(0,0,t.backgroundImage.width,t.backgroundImage.height)));0==g.width||0==g.height?(t.zoomTo(1),n.resetScrollbars()):(l=Editor.fitWindowBorders,null!=l&&(g.x-=l.x,g.y-=l.y,g.width+=l.width+l.x,g.height+=l.height+l.y),t.fitWindow(g))},null,null,Editor.ctrlKey+"+Shift+H");this.addAction("fitPage",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,l=t.pageScale;t.zoomTo(Math.floor(20*
+Math.min((t.container.clientWidth-10)/g.width/l,(t.container.clientHeight-10)/g.height/l))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=g.y*t.view.scale-1,t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)-1)}),null,null,Editor.ctrlKey+"+J");this.addAction("fitTwoPages",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();var g=t.pageFormat,l=t.pageScale;t.zoomTo(Math.floor(20*Math.min((t.container.clientWidth-
+10)/(2*g.width)/l,(t.container.clientHeight-10)/g.height/l))/20);mxUtils.hasScrollbars(t.container)&&(g=t.getPagePadding(),t.container.scrollTop=Math.min(g.y,(t.container.scrollHeight-t.container.clientHeight)/2),t.container.scrollLeft=Math.min(g.x,(t.container.scrollWidth-t.container.clientWidth)/2))}),null,null,Editor.ctrlKey+"+Shift+J");this.addAction("fitPageWidth",mxUtils.bind(this,function(){t.pageVisible||this.get("pageView").funct();t.zoomTo(Math.floor(20*(t.container.clientWidth-10)/t.pageFormat.width/
+t.pageScale)/20);if(mxUtils.hasScrollbars(t.container)){var g=t.getPagePadding();t.container.scrollLeft=Math.min(g.x*t.view.scale,(t.container.scrollWidth-t.container.clientWidth)/2)}}));this.put("customZoom",new Action(mxResources.get("custom")+"...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.getView().getScale()),mxResources.get("apply"),mxUtils.bind(this,function(l){l=parseInt(l);!isNaN(l)&&0<l&&t.zoomTo(l/100)}),mxResources.get("zoom")+" (%)");this.editorUi.showDialog(g.container,
+300,80,!0,!0);g.init()}),null,null,Editor.ctrlKey+"+0"));this.addAction("pageScale...",mxUtils.bind(this,function(){var g=new FilenameDialog(this.editorUi,parseInt(100*t.pageScale),mxResources.get("apply"),mxUtils.bind(this,function(l){l=parseInt(l);!isNaN(l)&&0<l&&(l=new ChangePageSetup(n,null,null,null,l/100),l.ignoreColor=!0,l.ignoreImage=!0,t.model.execute(l))}),mxResources.get("pageScale")+" (%)");this.editorUi.showDialog(g.container,300,80,!0,!0);g.init()}));var d=null;d=this.addAction("grid",
function(){t.setGridEnabled(!t.isGridEnabled());t.defaultGridEnabled=t.isGridEnabled();n.fireEvent(new mxEventObject("gridEnabledChanged"))},null,null,Editor.ctrlKey+"+Shift+G");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.isGridEnabled()});d.setEnabled(!1);d=this.addAction("guides",function(){t.graphHandler.guidesEnabled=!t.graphHandler.guidesEnabled;n.fireEvent(new mxEventObject("guidesEnabledChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.graphHandler.guidesEnabled});
d.setEnabled(!1);d=this.addAction("tooltips",function(){t.tooltipHandler.setEnabled(!t.tooltipHandler.isEnabled());n.fireEvent(new mxEventObject("tooltipsEnabledChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.tooltipHandler.isEnabled()});d=this.addAction("collapseExpand",function(){var g=new ChangePageSetup(n);g.ignoreColor=!0;g.ignoreImage=!0;g.foldingEnabled=!t.foldingEnabled;t.model.execute(g)});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.foldingEnabled});
d.isEnabled=E;d=this.addAction("scrollbars",function(){n.setScrollbars(!n.hasScrollbars())});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.scrollbars});d=this.addAction("pageView",mxUtils.bind(this,function(){n.setPageVisible(!t.pageVisible)}));d.setToggleAction(!0);d.setSelectedCallback(function(){return t.pageVisible});d=this.addAction("connectionArrows",function(){t.connectionArrowsEnabled=!t.connectionArrowsEnabled;n.fireEvent(new mxEventObject("connectionArrowsChanged"))},null,
null,"Alt+Shift+A");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionArrowsEnabled});d=this.addAction("connectionPoints",function(){t.setConnectable(!t.connectionHandler.isEnabled());n.fireEvent(new mxEventObject("connectionPointsChanged"))},null,null,"Alt+Shift+P");d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionHandler.isEnabled()});d=this.addAction("copyConnect",function(){t.connectionHandler.setCreateTarget(!t.connectionHandler.isCreateTarget());
n.fireEvent(new mxEventObject("copyConnectChanged"))});d.setToggleAction(!0);d.setSelectedCallback(function(){return t.connectionHandler.isCreateTarget()});d.isEnabled=E;d=this.addAction("autosave",function(){n.editor.setAutosave(!n.editor.autosave)});d.setToggleAction(!0);d.setSelectedCallback(function(){return n.editor.autosave});d.isEnabled=E;d.visible=!1;this.addAction("help",function(){var g="";mxResources.isLanguageSupported(mxClient.language)&&(g="_"+mxClient.language);t.openLink(RESOURCES_PATH+
-"/help"+g+".html")});var f=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){f||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){f=!1}),f=!0)}));d=mxUtils.bind(this,function(g,m,q,z){return this.addAction(g,function(){if(null!=q&&t.cellEditor.isContentEditing())q();else{t.stopEditing(!1);t.getModel().beginUpdate();try{var F=t.getEditableCells(t.getSelectionCells());t.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,m,F);(m&mxConstants.FONT_BOLD)==
-mxConstants.FONT_BOLD?t.updateLabelElements(F,function(I){I.style.fontWeight=null;"B"==I.nodeName&&t.replaceElement(I)}):(m&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?t.updateLabelElements(F,function(I){I.style.fontStyle=null;"I"==I.nodeName&&t.replaceElement(I)}):(m&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.updateLabelElements(F,function(I){I.style.textDecoration=null;"U"==I.nodeName&&t.replaceElement(I)});for(var C=0;C<F.length;C++)0==t.model.getChildCount(F[C])&&t.autoSizeCell(F[C],
+"/help"+g+".html")});var f=!1;this.put("about",new Action(mxResources.get("about")+" Graph Editor...",function(){f||(n.showDialog((new AboutDialog(n)).container,320,280,!0,!0,function(){f=!1}),f=!0)}));d=mxUtils.bind(this,function(g,l,q,z){return this.addAction(g,function(){if(null!=q&&t.cellEditor.isContentEditing())q();else{t.stopEditing(!1);t.getModel().beginUpdate();try{var F=t.getEditableCells(t.getSelectionCells());t.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,l,F);(l&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD?t.updateLabelElements(F,function(I){I.style.fontWeight=null;"B"==I.nodeName&&t.replaceElement(I)}):(l&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?t.updateLabelElements(F,function(I){I.style.fontStyle=null;"I"==I.nodeName&&t.replaceElement(I)}):(l&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&t.updateLabelElements(F,function(I){I.style.textDecoration=null;"U"==I.nodeName&&t.replaceElement(I)});for(var C=0;C<F.length;C++)0==t.model.getChildCount(F[C])&&t.autoSizeCell(F[C],
!1)}finally{t.getModel().endUpdate()}}},null,null,z)});d("bold",mxConstants.FONT_BOLD,function(){document.execCommand("bold",!1,null)},Editor.ctrlKey+"+B");d("italic",mxConstants.FONT_ITALIC,function(){document.execCommand("italic",!1,null)},Editor.ctrlKey+"+I");d("underline",mxConstants.FONT_UNDERLINE,function(){document.execCommand("underline",!1,null)},Editor.ctrlKey+"+U");this.addAction("fontColor...",function(){n.menus.pickColor(mxConstants.STYLE_FONTCOLOR,"forecolor","000000")});this.addAction("strokeColor...",
function(){n.menus.pickColor(mxConstants.STYLE_STROKECOLOR)});this.addAction("fillColor...",function(){n.menus.pickColor(mxConstants.STYLE_FILLCOLOR)});this.addAction("gradientColor...",function(){n.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR)});this.addAction("backgroundColor...",function(){n.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,"backcolor")});this.addAction("borderColor...",function(){n.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR)});this.addAction("vertical",function(){n.menus.toggleStyle(mxConstants.STYLE_HORIZONTAL,
!0)});this.addAction("shadow",function(){n.menus.toggleStyle(mxConstants.STYLE_SHADOW)});this.addAction("solid",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_DASHED,null),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",[null,null],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("dashed",function(){t.getModel().beginUpdate();
try{t.setCellStyles(mxConstants.STYLE_DASHED,"1"),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,null),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1",null],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("dotted",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_DASHED,"1"),t.setCellStyles(mxConstants.STYLE_DASH_PATTERN,"1 4"),n.fireEvent(new mxEventObject("styleChanged",
"keys",[mxConstants.STYLE_DASHED,mxConstants.STYLE_DASH_PATTERN],"values",["1","1 4"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("sharp",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});
-this.addAction("rounded",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!t.isSelectionEmpty()&&t.isEnabled()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),m=t.getCurrentCellStyle(g[0]),
-q="1"==mxUtils.getValue(m,mxConstants.STYLE_ROUNDED,"0")?"0":"1";t.setCellStyles(mxConstants.STYLE_ROUNDED,q);t.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[q,"0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}});this.addAction("curved",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,
-"1"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("collapsible",function(){var g=t.view.getState(t.getSelectionCell()),m="1";null!=g&&null!=t.getFoldingImage(g)&&(m="0");t.setCellStyles("collapsible",m);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[m],"cells",t.getSelectionCells()))});this.addAction("editStyle...",
-mxUtils.bind(this,function(){var g=t.getEditableCells(t.getSelectionCells());if(null!=g&&0<g.length){var m=t.getModel();m=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",m.getStyle(g[0])||"",function(q){null!=q&&t.setCellStyle(mxUtils.trim(q),g)},null,null,400,220);this.editorUi.showDialog(m.container,420,300,!0,!0);m.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&n.setDefaultStyle(t.getSelectionCell())},
-null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){t.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var g=t.getSelectionCell();if(null!=g&&t.getModel().isEdge(g)){var m=D.graph.selectionCellsHandler.getHandler(g);if(m instanceof mxEdgeHandler){var q=t.view.translate,z=t.view.scale,F=q.x;q=q.y;g=t.getModel().getParent(g);for(var C=t.getCellGeometry(g);t.getModel().isVertex(g)&&null!=C;)F+=C.x,q+=C.y,g=
-t.getModel().getParent(g),C=t.getCellGeometry(g);F=Math.round(t.snap(t.popupMenuHandler.triggerX/z-F));z=Math.round(t.snap(t.popupMenuHandler.triggerY/z-q));m.addPointAt(m.state,F,z)}}});this.addAction("removeWaypoint",function(){var g=n.actions.get("removeWaypoint");null!=g.handler&&g.handler.removePoint(g.handler.state,g.index)});this.addAction("clearWaypoints",function(g,m){g=null!=m?m:g;var q=t.getSelectionCells();if(null!=q){q=t.getEditableCells(t.addAllEdges(q));t.getModel().beginUpdate();try{for(var z=
-0;z<q.length;z++){var F=q[z];if(t.getModel().isEdge(F)){var C=t.getCellGeometry(F);null!=m&&mxEvent.isShiftDown(g)?(t.setCellStyles(mxConstants.STYLE_EXIT_X,null,[F]),t.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[F])):null!=C&&(C=C.clone(),C.points=null,C.x=0,C.y=0,C.offset=null,t.getModel().setGeometry(F,C))}}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+C");d=this.addAction("subscript",
-mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");d=this.addAction("superscript",mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=mxResources.get("image")+" ("+mxResources.get("url")+"):",m=t.getView().getState(t.getSelectionCell()),
-q="",z=null;null!=m&&(q=m.style[mxConstants.STYLE_IMAGE]||q,z=m.style[mxConstants.STYLE_CLIP_PATH]||z);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,I,G,Z,fa,ba){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,I,G);else{var Y=t.getSelectionCells();if(null!=C&&(0<C.length||0<Y.length)){var pa=null;t.getModel().beginUpdate();try{if(0==Y.length){Y=[t.insertVertex(t.getDefaultParent(),null,"",0,0,I,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
-var O=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry(Y,!0));Y[0].geometry.x=O.x;Y[0].geometry.y=O.y;null!=Z&&k(Y[0],Z,fa,ba,t);pa=Y;t.fireEvent(new mxEventObject("cellsInserted","cells",pa))}t.setCellStyles(mxConstants.STYLE_IMAGE,0<C.length?C:null,Y);var W=t.getCurrentCellStyle(Y[0]);"image"!=W[mxConstants.STYLE_SHAPE]&&"label"!=W[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_SHAPE,"image",Y):0==C.length&&t.setCellStyles(mxConstants.STYLE_SHAPE,null,Y);if(1==t.getSelectionCount()&&
-null!=I&&null!=G){var ha=Y[0],U=t.getModel().getGeometry(ha);null!=U&&(U=U.clone(),U.width=I,U.height=G,t.getModel().setGeometry(ha,U));null!=Z?k(ha,Z,fa,ba,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,Y)}}finally{t.getModel().endUpdate()}null!=pa&&(t.setSelectionCells(pa),t.scrollCellToVisible(pa[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,z)}}).isEnabled=E;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
-null!=g){var m=t.getCurrentCellStyle(g),q=m[mxConstants.STYLE_IMAGE],z=m[mxConstants.STYLE_SHAPE];q&&"image"==z&&(m=new CropImageDialog(n,q,m[mxConstants.STYLE_CLIP_PATH],function(F,C,I){k(g,F,C,I,t)}),n.showDialog(m.container,300,390,!0,!0))}}).isEnabled=E;d=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
+this.addAction("rounded",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"1"),t.setCellStyles(mxConstants.STYLE_CURVED,"0"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["1","0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("toggleRounded",function(){if(!t.isSelectionEmpty()&&t.isEnabled()){t.getModel().beginUpdate();try{var g=t.getSelectionCells(),l=t.getCurrentCellStyle(g[0]),
+q="1"==mxUtils.getValue(l,mxConstants.STYLE_ROUNDED,"0")?"0":"1";t.setCellStyles(mxConstants.STYLE_ROUNDED,q);t.setCellStyles(mxConstants.STYLE_CURVED,null);n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",[q,"0"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}}});this.addAction("curved",function(){t.getModel().beginUpdate();try{t.setCellStyles(mxConstants.STYLE_ROUNDED,"0"),t.setCellStyles(mxConstants.STYLE_CURVED,
+"1"),n.fireEvent(new mxEventObject("styleChanged","keys",[mxConstants.STYLE_ROUNDED,mxConstants.STYLE_CURVED],"values",["0","1"],"cells",t.getSelectionCells()))}finally{t.getModel().endUpdate()}});this.addAction("collapsible",function(){var g=t.view.getState(t.getSelectionCell()),l="1";null!=g&&null!=t.getFoldingImage(g)&&(l="0");t.setCellStyles("collapsible",l);n.fireEvent(new mxEventObject("styleChanged","keys",["collapsible"],"values",[l],"cells",t.getSelectionCells()))});this.addAction("editStyle...",
+mxUtils.bind(this,function(){var g=t.getEditableCells(t.getSelectionCells());if(null!=g&&0<g.length){var l=t.getModel();l=new TextareaDialog(this.editorUi,mxResources.get("editStyle")+":",l.getStyle(g[0])||"",function(q){null!=q&&t.setCellStyle(mxUtils.trim(q),g)},null,null,400,220);this.editorUi.showDialog(l.container,420,300,!0,!0);l.init()}}),null,null,Editor.ctrlKey+"+E");this.addAction("setAsDefaultStyle",function(){t.isEnabled()&&!t.isSelectionEmpty()&&n.setDefaultStyle(t.getSelectionCell())},
+null,null,Editor.ctrlKey+"+Shift+D");this.addAction("clearDefaultStyle",function(){t.isEnabled()&&n.clearDefaultStyle()},null,null,Editor.ctrlKey+"+Shift+R");this.addAction("addWaypoint",function(){var g=t.getSelectionCell();if(null!=g&&t.getModel().isEdge(g)){var l=D.graph.selectionCellsHandler.getHandler(g);if(l instanceof mxEdgeHandler){var q=t.view.translate,z=t.view.scale,F=q.x;q=q.y;g=t.getModel().getParent(g);for(var C=t.getCellGeometry(g);t.getModel().isVertex(g)&&null!=C;)F+=C.x,q+=C.y,g=
+t.getModel().getParent(g),C=t.getCellGeometry(g);F=Math.round(t.snap(t.popupMenuHandler.triggerX/z-F));z=Math.round(t.snap(t.popupMenuHandler.triggerY/z-q));l.addPointAt(l.state,F,z)}}});this.addAction("removeWaypoint",function(){var g=n.actions.get("removeWaypoint");null!=g.handler&&g.handler.removePoint(g.handler.state,g.index)});this.addAction("clearWaypoints",function(g,l){g=null!=l?l:g;var q=t.getSelectionCells();if(null!=q){q=t.getEditableCells(t.addAllEdges(q));t.getModel().beginUpdate();try{for(var z=
+0;z<q.length;z++){var F=q[z];if(t.getModel().isEdge(F)){var C=t.getCellGeometry(F);null!=l&&mxEvent.isShiftDown(g)?(t.setCellStyles(mxConstants.STYLE_EXIT_X,null,[F]),t.setCellStyles(mxConstants.STYLE_EXIT_Y,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_X,null,[F]),t.setCellStyles(mxConstants.STYLE_ENTRY_Y,null,[F])):null!=C&&(C=C.clone(),C.points=null,C.x=0,C.y=0,C.offset=null,t.getModel().setGeometry(F,C))}}}finally{t.getModel().endUpdate()}}},null,null,"Alt+Shift+C");d=this.addAction("subscript",
+mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("subscript",!1,null)}),null,null,Editor.ctrlKey+"+,");d=this.addAction("superscript",mxUtils.bind(this,function(){t.cellEditor.isContentEditing()&&document.execCommand("superscript",!1,null)}),null,null,Editor.ctrlKey+"+.");this.addAction("image...",function(){if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())){var g=mxResources.get("image")+" ("+mxResources.get("url")+"):",l=t.getView().getState(t.getSelectionCell()),
+q="",z=null;null!=l&&(q=l.style[mxConstants.STYLE_IMAGE]||q,z=l.style[mxConstants.STYLE_CLIP_PATH]||z);var F=t.cellEditor.saveSelection();n.showImageDialog(g,q,function(C,I,G,Z,ca,ba){if(t.cellEditor.isContentEditing())t.cellEditor.restoreSelection(F),t.insertImage(C,I,G);else{var Y=t.getSelectionCells();if(null!=C&&(0<C.length||0<Y.length)){var O=null;t.getModel().beginUpdate();try{if(0==Y.length){Y=[t.insertVertex(t.getDefaultParent(),null,"",0,0,I,G,"shape=image;imageAspect=0;aspect=fixed;verticalLabelPosition=bottom;verticalAlign=top;")];
+var la=t.getCenterInsertPoint(t.getBoundingBoxFromGeometry(Y,!0));Y[0].geometry.x=la.x;Y[0].geometry.y=la.y;null!=Z&&k(Y[0],Z,ca,ba,t);O=Y;t.fireEvent(new mxEventObject("cellsInserted","cells",O))}t.setCellStyles(mxConstants.STYLE_IMAGE,0<C.length?C:null,Y);var aa=t.getCurrentCellStyle(Y[0]);"image"!=aa[mxConstants.STYLE_SHAPE]&&"label"!=aa[mxConstants.STYLE_SHAPE]?t.setCellStyles(mxConstants.STYLE_SHAPE,"image",Y):0==C.length&&t.setCellStyles(mxConstants.STYLE_SHAPE,null,Y);if(1==t.getSelectionCount()&&
+null!=I&&null!=G){var ia=Y[0],X=t.getModel().getGeometry(ia);null!=X&&(X=X.clone(),X.width=I,X.height=G,t.getModel().setGeometry(ia,X));null!=Z?k(ia,Z,ca,ba,t):t.setCellStyles(mxConstants.STYLE_CLIP_PATH,null,Y)}}finally{t.getModel().endUpdate()}null!=O&&(t.setSelectionCells(O),t.scrollCellToVisible(O[0]))}}},t.cellEditor.isContentEditing(),!t.cellEditor.isContentEditing(),!0,z)}}).isEnabled=E;this.addAction("crop...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&
+null!=g){var l=t.getCurrentCellStyle(g),q=l[mxConstants.STYLE_IMAGE],z=l[mxConstants.STYLE_SHAPE];q&&"image"==z&&(l=new CropImageDialog(n,q,l[mxConstants.STYLE_CLIP_PATH],function(F,C,I){k(g,F,C,I,t)}),n.showDialog(l.container,300,390,!0,!0))}}).isEnabled=E;d=this.addAction("layers",mxUtils.bind(this,function(){null==this.layersWindow?(this.layersWindow=new LayersWindow(n,document.body.offsetWidth-280,120,212,200),this.layersWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("layers"))})),
this.layersWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("layers"))}),this.layersWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("layers")),this.layersWindow.init()):this.layersWindow.window.setVisible(!this.layersWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+L");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.layersWindow&&this.layersWindow.window.isVisible()}));d=this.addAction("formatPanel",mxUtils.bind(this,
function(){n.toggleFormatPanel()}),null,null,Editor.ctrlKey+"+Shift+P");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return 0<n.formatWidth}));d=this.addAction("outline",mxUtils.bind(this,function(){null==this.outlineWindow?(this.outlineWindow=new OutlineWindow(n,document.body.offsetWidth-260,100,180,180),this.outlineWindow.window.addListener("show",mxUtils.bind(this,function(){n.fireEvent(new mxEventObject("outline"))})),this.outlineWindow.window.addListener("hide",function(){n.fireEvent(new mxEventObject("outline"))}),
-this.outlineWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&null!=g){var m=new ConnectionPointsDialog(n,
-g);n.showDialog(m.container,350,450,!0,!1,function(){m.destroy()});m.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,n,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var t=mxResources.get(b)+"..."}else t=mxResources.get(b);return this.put(b,new Action(t,e,k,n,D))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
+this.outlineWindow.window.setVisible(!0),n.fireEvent(new mxEventObject("outline"))):this.outlineWindow.window.setVisible(!this.outlineWindow.window.isVisible())}),null,null,Editor.ctrlKey+"+Shift+O");d.setToggleAction(!0);d.setSelectedCallback(mxUtils.bind(this,function(){return null!=this.outlineWindow&&this.outlineWindow.window.isVisible()}));this.addAction("editConnectionPoints...",function(){var g=t.getSelectionCell();if(t.isEnabled()&&!t.isCellLocked(t.getDefaultParent())&&null!=g){var l=new ConnectionPointsDialog(n,
+g);n.showDialog(l.container,350,450,!0,!1,function(){l.destroy()});l.init()}}).isEnabled=E};Actions.prototype.addAction=function(b,e,k,n,D){if("..."==b.substring(b.length-3)){b=b.substring(0,b.length-3);var t=mxResources.get(b)+"..."}else t=mxResources.get(b);return this.put(b,new Action(t,e,k,n,D))};Actions.prototype.put=function(b,e){return this.actions[b]=e};Actions.prototype.get=function(b){return this.actions[b]};
function Action(b,e,k,n,D){mxEventSource.call(this);this.label=b;this.funct=this.createFunction(e);this.enabled=null!=k?k:!0;this.iconCls=n;this.shortcut=D;this.visible=!0}mxUtils.extend(Action,mxEventSource);Action.prototype.createFunction=function(b){return b};Action.prototype.setEnabled=function(b){this.enabled!=b&&(this.enabled=b,this.fireEvent(new mxEventObject("stateChanged")))};Action.prototype.isEnabled=function(){return this.enabled};
Action.prototype.setToggleAction=function(b){this.toggleAction=b};Action.prototype.setSelectedCallback=function(b){this.selectedCallback=b};Action.prototype.isSelected=function(){return this.selectedCallback()};DrawioFile=function(b,e){mxEventSource.call(this);this.ui=b;this.setData(e||"");this.initialData=this.getData();this.created=(new Date).getTime();this.stats={opened:0,merged:0,fileMerged:0,fileReloaded:0,conflicts:0,timeouts:0,saved:0,closed:0,destroyed:0,joined:0,checksumErrors:0,bytesSent:0,bytesReceived:0,msgSent:0,msgReceived:0,cacheHits:0,cacheMiss:0,cacheFail:0}};DrawioFile.SYNC=urlParams.sync||"auto";DrawioFile.LAST_WRITE_WINS=!0;mxUtils.extend(DrawioFile,mxEventSource);
DrawioFile.prototype.allChangesSavedKey="allChangesSaved";DrawioFile.prototype.savingSpinnerKey="saving";DrawioFile.prototype.savingStatusKey="saving";DrawioFile.prototype.autosaveDelay=1500;DrawioFile.prototype.maxAutosaveDelay=3E4;DrawioFile.prototype.optimisticSyncDelay=300;DrawioFile.prototype.autosaveThread=null;DrawioFile.prototype.lastAutosave=null;DrawioFile.prototype.lastSaved=null;DrawioFile.prototype.lastChanged=null;DrawioFile.prototype.opened=null;DrawioFile.prototype.modified=!1;
@@ -3007,24 +3021,25 @@ DrawioFile.prototype.shadowModified=!1;DrawioFile.prototype.data=null;DrawioFile
DrawioFile.prototype.getShadowPages=function(){null==this.shadowPages&&(this.shadowPages=this.ui.getPagesForXml(this.initialData));return this.shadowPages};DrawioFile.prototype.setShadowPages=function(b){this.shadowPages=b};DrawioFile.prototype.synchronizeFile=function(b,e){this.savingFile?null!=e&&e({message:mxResources.get("busy")}):null!=this.sync?this.sync.fileChanged(mxUtils.bind(this,function(k){this.sync.cleanup(b,e,k)}),e):this.updateFile(b,e)};
DrawioFile.prototype.updateFile=function(b,e,k,n){null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():this.getLatestVersion(mxUtils.bind(this,function(D){try{null!=k&&k()||(EditorUi.debug("DrawioFile.updateFile",[this],"invalidChecksum",this.invalidChecksum,"latestFile",[D]),this.ui.getCurrentFile()!=this||this.invalidChecksum?null!=e&&e():null!=D?this.mergeFile(D,b,e,n):this.reloadFile(b,
e))}catch(t){null!=e&&e(t)}}),e))};
-DrawioFile.prototype.mergeFile=function(b,e,k,n){var D=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var d=[this.ui.diffPages(null!=n?n:t,E)],f=this.ignorePatches(d);this.setShadowPages(E);if(f)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",f);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;n={};f={};var g=this.ui.patchPages(t,d[0]),m=this.ui.getHashValueForPages(g,
-n),q=this.ui.getHashValueForPages(E,f);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",m,"current",q,"valid",m==q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=m&&m!=q){var z=this.compressReportData(this.getAnonymizedXmlForPages(E)),F=this.compressReportData(this.getAnonymizedXmlForPages(g)),C=this.ui.hashValue(b.getCurrentEtag()),I=this.ui.hashValue(this.getCurrentEtag());
-this.checksumError(k,d,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+m+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+C+"\nTo: "+I+"\n\nFile Data:\n"+z+"\nPatched Shadow:\n"+F,null,"mergeFile");return}if(null!=this.sync){var G=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==G||mxUtils.isEmptyObject(G)||d.push(G)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
-this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(ba){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(ba);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,ba);else{var Z=this.getCurrentUser(),fa=null!=Z?Z.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),fa,ba)}}catch(Y){}}};
+DrawioFile.prototype.mergeFile=function(b,e,k,n){var D=!0;try{this.stats.fileMerged++;var t=this.getShadowPages(),E=b.getShadowPages();if(null!=E&&0<E.length){var d=[this.ui.diffPages(null!=n?n:t,E)],f=this.ignorePatches(d);this.setShadowPages(E);if(f)EditorUi.debug("File.mergeFile",[this],"file",[b],"ignored",f);else{null!=this.sync&&this.sync.sendLocalChanges();this.backupPatch=this.isModified()?this.ui.diffPages(t,this.ui.pages):null;n={};f={};var g=this.ui.patchPages(t,d[0]),l=this.ui.getHashValueForPages(g,
+n),q=this.ui.getHashValueForPages(E,f);EditorUi.debug("File.mergeFile",[this],"file",[b],"shadow",t,"pages",this.ui.pages,"patches",d,"backup",this.backupPatch,"checksum",l,"current",q,"valid",l==q,"from",this.getCurrentRevisionId(),"to",b.getCurrentRevisionId(),"modified",this.isModified());if(null!=l&&l!=q){var z=this.compressReportData(this.getAnonymizedXmlForPages(E)),F=this.compressReportData(this.getAnonymizedXmlForPages(g)),C=this.ui.hashValue(b.getCurrentEtag()),I=this.ui.hashValue(this.getCurrentEtag());
+this.checksumError(k,d,"Shadow Details: "+JSON.stringify(n)+"\nChecksum: "+l+"\nCurrent: "+q+"\nCurrent Details: "+JSON.stringify(f)+"\nFrom: "+C+"\nTo: "+I+"\n\nFile Data:\n"+z+"\nPatched Shadow:\n"+F,null,"mergeFile");return}if(null!=this.sync){var G=this.sync.patchRealtime(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null);null==G||mxUtils.isEmptyObject(G)||d.push(G)}this.patch(d,DrawioFile.LAST_WRITE_WINS?this.backupPatch:null)}}else throw D=!1,Error(mxResources.get("notADiagramFile"));this.inConflictState=
+this.invalidChecksum=!1;this.setDescriptor(b.getDescriptor());this.descriptorChanged();this.backupPatch=null;null!=e&&e()}catch(ba){this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=k&&k(ba);try{if(D)if(this.errorReportsEnabled)this.sendErrorReport("Error in mergeFile",null,ba);else{var Z=this.getCurrentUser(),ca=null!=Z?Z.id:"unknown";EditorUi.logError("Error in mergeFile",null,this.getMode()+"."+this.getId(),ca,ba)}}catch(Y){}}};
DrawioFile.prototype.getAnonymizedXmlForPages=function(b){var e=new mxCodec(mxUtils.createXmlDocument()),k=e.document.createElement("mxfile");if(null!=b)for(var n=0;n<b.length;n++){var D=e.encode(new mxGraphModel(b[n].root));"1"!=urlParams.dev&&(D=this.ui.anonymizeNode(D,!0));D.setAttribute("id",b[n].getId());b[n].viewState&&this.ui.editor.graph.saveViewState(b[n].viewState,D,!0);k.appendChild(D)}return mxUtils.getPrettyXml(k)};
DrawioFile.prototype.compressReportData=function(b,e,k){e=null!=e?e:1E4;null!=k&&null!=b&&b.length>k?b=b.substring(0,k)+"[...]":null!=b&&b.length>e&&(b=Graph.compress(b)+"\n");return b};
-DrawioFile.prototype.checksumError=function(b,e,k,n,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(b=0;b<e.length;b++)this.ui.anonymizePatch(e[b]);var t=mxUtils.bind(this,function(g){var m=this.compressReportData(JSON.stringify(e,null,2));g=null==g?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(g.data)),
-25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+m+(null!=g?"\n\nRemote:\n"+g:""),null,7E4)});null==n?t(null):this.getLatestVersion(mxUtils.bind(this,function(g){null!=g&&g.getCurrentEtag()==n?t(g):t(null)}),function(){})}else{var E=this.getCurrentUser(),d=null!=E?E.id:"unknown",f=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")";EditorUi.logError("Checksum Error in "+D+" "+f,null,this.getMode()+"."+this.getId(),"user_"+d+
-(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+JSON.stringify(e).length+"-patches_"+e.length+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+f,action:D,label:"user_"+d+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+JSON.stringify(e).length+"-patches_"+e.length+"-size_"+this.getSize()})}catch(g){}}}catch(g){}};
-DrawioFile.prototype.sendErrorReport=function(b,e,k,n){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),t=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),d=null!=E?this.ui.hashValue(E.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),m=g.lastIndexOf(".");E="xml";0<m&&(E=g.substring(m));var q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
+DrawioFile.prototype.checksumError=function(b,e,k,n,D){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=b&&b();try{if(this.errorReportsEnabled){if(null!=e)for(var t=0;t<e.length;t++)this.ui.anonymizePatch(e[t]);var E=mxUtils.bind(this,function(q){var z=this.compressReportData(JSON.stringify(e,null,2));q=null==q?"n/a":this.compressReportData(this.getAnonymizedXmlForPages(this.ui.getPagesForXml(q.data)),
+25E3);this.sendErrorReport("Checksum Error in "+D+" "+this.getHash(),(null!=k?k:"")+"\n\nPatches:\n"+z+(null!=q?"\n\nRemote:\n"+q:""),null,7E4)});null==n?E(null):this.getLatestVersion(mxUtils.bind(this,function(q){null!=q&&q.getCurrentEtag()==n?E(q):E(null)}),function(){})}else{var d=this.getCurrentUser(),f=null!=d?d.id:"unknown",g=""!=this.getId()?this.getId():"("+this.ui.hashValue(this.getTitle())+")",l=JSON.stringify(e).length;b=null;if(null!=e&&this.constructor==DriveFile&&400>l){for(t=0;t<e.length;t++)this.ui.anonymizePatch(e[t]);
+b=JSON.stringify(e);b=null!=b&&250>b.length?Graph.compress(b):null}EditorUi.logError("Checksum "+(null!=b?"Report":"Error")+" in "+D+" "+g,null,this.getMode()+"."+this.getId(),"user_"+f+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+l+"-patches_"+e.length+(null!=b?"-json_"+b:"")+"-size_"+this.getSize());try{EditorUi.logEvent({category:"CHECKSUM-ERROR-SYNC-FILE-"+g,action:D,label:"user_"+f+(null!=this.sync?"-client_"+this.sync.clientId:"-nosync")+"-bytes_"+l+"-patches_"+e.length+
+"-size_"+this.getSize()})}catch(q){}}}catch(q){}};
+DrawioFile.prototype.sendErrorReport=function(b,e,k,n){try{var D=this.compressReportData(this.getAnonymizedXmlForPages(this.getShadowPages()),25E3),t=this.compressReportData(this.getAnonymizedXmlForPages(this.ui.pages),25E3),E=this.getCurrentUser(),d=null!=E?this.ui.hashValue(E.id):"unknown",f=null!=this.sync?"-client_"+this.sync.clientId:"-nosync",g=this.getTitle(),l=g.lastIndexOf(".");E="xml";0<l&&(E=g.substring(l));var q=null!=k?k.stack:Error().stack;EditorUi.sendReport(b+" "+(new Date).toISOString()+
":\n\nAppVersion="+navigator.appVersion+"\nFile="+this.ui.hashValue(this.getId())+" ("+this.getMode()+")"+(this.isModified()?" modified":"")+"\nSize/Type="+this.getSize()+" ("+E+")\nUser="+d+f+"\nPrefix="+this.ui.editor.graph.model.prefix+"\nSync="+DrawioFile.SYNC+(null!=this.sync?(this.sync.enabled?" enabled":"")+(this.sync.isConnected()?" connected":""):"")+"\nPlugins="+(null!=mxSettings.settings?mxSettings.getPlugins():"null")+"\n\nStats:\n"+JSON.stringify(this.stats,null,2)+(null!=e?"\n\n"+e:
"")+(null!=k?"\n\nError: "+k.message:"")+"\n\nStack:\n"+q+"\n\nShadow:\n"+D+"\n\nData:\n"+t,n)}catch(z){}};
DrawioFile.prototype.reloadFile=function(b,e){try{this.ui.spinner.stop();var k=mxUtils.bind(this,function(){EditorUi.debug("DrawioFile.reloadFile",[this],"hash",this.getHash(),"modified",this.isModified(),"backupPatch",this.backupPatch);this.stats.fileReloaded++;if(""==this.getHash())this.mergeLatestVersion(null!=this.backupPatch?[this.backupPatch]:null,mxUtils.bind(this,function(){this.backupPatch=null;null!=b&&b()}),e);else{var n=this.ui.editor.graph,D=n.getSelectionCells(),t=n.getViewState(),E=
this.ui.currentPage;this.ui.loadFile(this.getHash(),!0,null,mxUtils.bind(this,function(){if(null==this.ui.fileLoadedError){this.ui.restoreViewState(E,t,D);null!=this.backupPatch&&this.patch([this.backupPatch]);var d=this.ui.getCurrentFile();null!=d&&(d.stats=this.stats);null!=b&&b()}}),!0)}});this.isModified()&&null==this.backupPatch?this.ui.confirm(mxResources.get("allChangesLost"),mxUtils.bind(this,function(){this.handleFileSuccess("manual"==DrawioFile.SYNC)}),k,mxResources.get("cancel"),mxResources.get("discardChanges")):
k()}catch(n){null!=e&&e(n)}};DrawioFile.prototype.mergeLatestVersion=function(b,e,k){this.getLatestVersion(mxUtils.bind(this,function(n){this.ui.editor.graph.model.beginUpdate();try{this.ui.replaceFileData(n.getData()),null!=b&&this.patch(b)}finally{this.ui.editor.graph.model.endUpdate()}this.inConflictState=this.invalidChecksum=!1;this.setDescriptor(n.getDescriptor());this.descriptorChanged();null!=e&&e()}),k)};
DrawioFile.prototype.copyFile=function(b,e){this.ui.editor.editAsNew(this.ui.getFileData(!0),this.ui.getCopyFilename(this))};DrawioFile.prototype.ignorePatches=function(b){var e=!0;if(null!=b)for(var k=0;k<b.length&&e;k++)e=e&&mxUtils.isEmptyObject(b[k]);return e};
-DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var n=this.ui.editor.undoManager,D=n.history.slice(),t=n.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=k;var f=E.foldingEnabled,g=E.mathEnabled,m=E.cellRenderer.redraw;E.cellRenderer.redraw=function(q){q.view.graph.isEditing(q.cell)&&(q.view.graph.scrollCellToVisible(q.cell),q.view.graph.cellEditor.resize());m.apply(this,arguments)};E.model.beginUpdate();
-try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=m;this.changeListenerEnabled=d;k||(n.history=D,n.indexOfNextAdd=t,n.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=E.mathEnabled?
+DrawioFile.prototype.patch=function(b,e,k){if(null!=b){var n=this.ui.editor.undoManager,D=n.history.slice(),t=n.indexOfNextAdd,E=this.ui.editor.graph;E.container.style.visibility="hidden";var d=this.changeListenerEnabled;this.changeListenerEnabled=k;var f=E.foldingEnabled,g=E.mathEnabled,l=E.cellRenderer.redraw;E.cellRenderer.redraw=function(q){q.view.graph.isEditing(q.cell)&&(q.view.graph.scrollCellToVisible(q.cell),q.view.graph.cellEditor.resize());l.apply(this,arguments)};E.model.beginUpdate();
+try{this.ui.pages=this.ui.applyPatches(this.ui.pages,b,!0,e,this.isModified()),0==this.ui.pages.length&&this.ui.pages.push(this.ui.createPage()),0>mxUtils.indexOf(this.ui.pages,this.ui.currentPage)&&this.ui.selectPage(this.ui.pages[0],!0)}finally{E.container.style.visibility="";E.model.endUpdate();E.cellRenderer.redraw=l;this.changeListenerEnabled=d;k||(n.history=D,n.indexOfNextAdd=t,n.fireEvent(new mxEventObject(mxEvent.CLEAR)));if(null==this.ui.currentPage||this.ui.currentPage.needsUpdate)g!=E.mathEnabled?
(this.ui.editor.updateGraphComponents(),E.refresh()):(f!=E.foldingEnabled?E.view.revalidate():E.view.validate(),E.sizeDidChange());null!=this.sync&&this.isRealtime()&&(this.sync.snapshot=this.ui.clonePages(this.ui.pages));this.ui.updateTabContainer();this.ui.editor.fireEvent(new mxEventObject("pagesPatched","patches",b))}EditorUi.debug("DrawioFile.patch",[this],"patches",b,"resolver",e,"undoable",k)}return b};
DrawioFile.prototype.save=function(b,e,k,n,D,t){try{if(EditorUi.debug("DrawioFile.save",[this],"revision",b,"unloading",n,"overwrite",D,"manual",t,"saving",this.savingFile,"editable",this.isEditable(),"invalidChecksum",this.invalidChecksum),this.isEditable())if(!D&&this.invalidChecksum)if(null!=k)k({message:mxResources.get("checksum")});else throw Error(mxResources.get("checksum"));else this.updateFileData(),this.clearAutosave(),null!=e&&e();else if(null!=k)k({message:mxResources.get("readOnly")});
else throw Error(mxResources.get("readOnly"));}catch(E){if(null!=k)k(E);else throw E;}};DrawioFile.prototype.createData=function(){var b=this.ui.pages;if(this.isRealtime()&&(this.ui.pages=this.ownPages,null!=this.ui.currentPage)){var e=this.ui.getPageById(this.ui.currentPage.getId(),this.ownPages);null!=e&&(e.viewState=this.ui.editor.graph.getViewState(),e.needsUpdate=!0)}e=this.ui.getFileData(null,null,null,null,null,null,null,null,this,!this.isCompressed());this.ui.pages=b;return e};
@@ -3080,9 +3095,9 @@ DrawioFile.prototype.removeListeners=function(){null!=this.changeListener&&(this
DrawioFile.prototype.commentsRefreshNeeded=function(){return!0};DrawioFile.prototype.commentsSaveNeeded=function(){return!1};DrawioFile.prototype.getComments=function(b,e){b([])};DrawioFile.prototype.addComment=function(b,e,k){e(Date.now())};DrawioFile.prototype.canReplyToReplies=function(){return!0};DrawioFile.prototype.canComment=function(){return!0};DrawioFile.prototype.newComment=function(b,e){return new DrawioComment(this,null,b,Date.now(),Date.now(),!1,e)};LocalFile=function(b,e,k,n,D,t){DrawioFile.call(this,b,e);this.title=k;this.mode=n?null:App.MODE_DEVICE;this.fileHandle=D;this.desc=t};mxUtils.extend(LocalFile,DrawioFile);LocalFile.prototype.isAutosave=function(){return null!=this.fileHandle&&!this.invalidFileHandle&&DrawioFile.prototype.isAutosave.apply(this,arguments)};LocalFile.prototype.isAutosaveOptional=function(){return null!=this.fileHandle};LocalFile.prototype.getMode=function(){return this.mode};LocalFile.prototype.getTitle=function(){return this.title};
LocalFile.prototype.isRenamable=function(){return!0};LocalFile.prototype.save=function(b,e,k){this.saveAs(this.title,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.saveAs=function(b,e,k){this.saveFile(b,!1,e,k)};LocalFile.prototype.getDescriptor=function(){return this.desc};LocalFile.prototype.setDescriptor=function(b){this.desc=b};
LocalFile.prototype.getLatestVersion=function(b,e){null==this.fileHandle?b(null):this.ui.loadFileSystemEntry(this.fileHandle,b,e)};
-LocalFile.prototype.saveFile=function(b,e,k,n,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var t=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),f=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var m=mxUtils.bind(this,
+LocalFile.prototype.saveFile=function(b,e,k,n,D){b!=this.title&&(this.desc=this.fileHandle=null);this.title=b;D||this.updateFileData();var t=this.ui.useCanvasForExport&&/(\.png)$/i.test(this.getTitle());this.setShadowModified(!1);var E=this.getData(),d=mxUtils.bind(this,function(){this.setModified(this.getShadowModified());this.contentChanged();null!=k&&k()}),f=mxUtils.bind(this,function(g){if(null!=this.fileHandle){if(!this.savingFile){this.savingFileTime=new Date;this.savingFile=!0;var l=mxUtils.bind(this,
function(z){this.savingFile=!1;null!=n&&n({error:z})});this.saveDraft();this.fileHandle.createWritable().then(mxUtils.bind(this,function(z){this.fileHandle.getFile().then(mxUtils.bind(this,function(F){this.invalidFileHandle=null;EditorUi.debug("LocalFile.saveFile",[this],"desc",[this.desc],"newDesc",[F],"conflict",this.desc.lastModified!=F.lastModified);this.desc.lastModified==F.lastModified?z.write(t?this.ui.base64ToBlob(g,"image/png"):g).then(mxUtils.bind(this,function(){z.close().then(mxUtils.bind(this,
-function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(C){try{var I=this.desc;this.savingFile=!1;this.desc=C;this.fileSaved(E,I,d,m);this.removeDraft()}catch(G){m(G)}}),m)}),m)}),m):(this.inConflictState=!0,m())}),mxUtils.bind(this,function(F){this.invalidFileHandle=!0;m(F)}))}),m)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,t?"image/png":"text/xml",t);else if(g.length<MAX_REQUEST_SIZE){var q=b.lastIndexOf(".");q=0<q?b.substring(q+1):"xml";
+function(){this.fileHandle.getFile().then(mxUtils.bind(this,function(C){try{var I=this.desc;this.savingFile=!1;this.desc=C;this.fileSaved(E,I,d,l);this.removeDraft()}catch(G){l(G)}}),l)}),l)}),l):(this.inConflictState=!0,l())}),mxUtils.bind(this,function(F){this.invalidFileHandle=!0;l(F)}))}),l)}}else{if(this.ui.isOfflineApp()||this.ui.isLocalFileSave())this.ui.doSaveLocalFile(g,b,t?"image/png":"text/xml",t);else if(g.length<MAX_REQUEST_SIZE){var q=b.lastIndexOf(".");q=0<q?b.substring(q+1):"xml";
(new mxXmlRequest(SAVE_URL,"format="+q+"&xml="+encodeURIComponent(g)+"&filename="+encodeURIComponent(b)+(t?"&binary=1":""))).simulate(document,"_blank")}else this.ui.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(g)}));d()}});t?(e=this.ui.getPngFileProperties(this.ui.fileNode),this.ui.getEmbeddedPng(mxUtils.bind(this,function(g){f(g)}),n,this.ui.getCurrentFile()!=this?E:null,e.scale,e.border)):f(E)};
LocalFile.prototype.rename=function(b,e,k){this.title=b;this.descriptorChanged();null!=e&&e()};LocalFile.prototype.open=function(){this.ui.setFileData(this.getData());this.installListeners()};(function(){"undefined"!==typeof html4&&(html4.ATTRIBS["span::data-lucid-content"]=0,html4.ATTRIBS["span::data-lucid-type"]=0,html4.ATTRIBS["font::data-font-src"]=0);Editor.prototype.appName="diagrams.net";Editor.prototype.diagramFileTypes=[{description:"diagramXmlDesc",extension:"drawio",mimeType:"text/xml"},{description:"diagramPngDesc",extension:"png",mimeType:"image/png"},{description:"diagramSvgDesc",extension:"svg",mimeType:"image/svg"},{description:"diagramHtmlDesc",extension:"html",mimeType:"text/html"},
{description:"diagramXmlDesc",extension:"xml",mimeType:"text/xml"}];Editor.prototype.libraryFileTypes=[{description:"Library (.drawiolib, .xml)",extensions:["drawiolib","xml"]}];Editor.prototype.fileExtensions=[{ext:"html",title:"filetypeHtml"},{ext:"png",title:"filetypePng"},{ext:"svg",title:"filetypeSvg"}];Editor.styles=[{},{commonStyle:{fontColor:"#5C5C5C",strokeColor:"#006658",fillColor:"#21C0A5"}},{commonStyle:{fontColor:"#095C86",strokeColor:"#AF45ED",fillColor:"#F694C1"},edgeStyle:{strokeColor:"#60E696"}},
@@ -3127,202 +3142,202 @@ H){u=H.editorUi.editor.graph.getCellStyle(1==u.vertices.length&&0==u.edges.lengt
{val:"east",dispName:"East"},{val:"south",dispName:"South"},{val:"west",dispName:"West"}]},{name:"portConstraintRotation",dispName:"Rotate Constraint",type:"bool",defVal:!1},{name:"connectable",dispName:"Connectable",type:"bool",getDefaultValue:function(u,H){return H.editorUi.editor.graph.isCellConnectable(0<u.vertices.length&&0==u.edges.length?u.vertices[0]:null)},isVisible:function(u,H){return 0<u.vertices.length&&0==u.edges.length}},{name:"allowArrows",dispName:"Allow Arrows",type:"bool",defVal:!0},
{name:"snapToPoint",dispName:"Snap to Point",type:"bool",defVal:!1},{name:"perimeter",dispName:"Perimeter",defVal:"none",type:"enum",enumList:[{val:"none",dispName:"None"},{val:"rectanglePerimeter",dispName:"Rectangle"},{val:"ellipsePerimeter",dispName:"Ellipse"},{val:"rhombusPerimeter",dispName:"Rhombus"},{val:"trianglePerimeter",dispName:"Triangle"},{val:"hexagonPerimeter2",dispName:"Hexagon"},{val:"lifelinePerimeter",dispName:"Lifeline"},{val:"orthogonalPerimeter",dispName:"Orthogonal"},{val:"backbonePerimeter",
dispName:"Backbone"},{val:"calloutPerimeter",dispName:"Callout"},{val:"parallelogramPerimeter",dispName:"Parallelogram"},{val:"trapezoidPerimeter",dispName:"Trapezoid"},{val:"stepPerimeter",dispName:"Step"},{val:"centerPerimeter",dispName:"Center"}]},{name:"fixDash",dispName:"Fixed Dash",type:"bool",defVal:!1},{name:"container",dispName:"Container",type:"bool",defVal:!1,isVisible:function(u,H){return 1==u.vertices.length&&0==u.edges.length}},{name:"dropTarget",dispName:"Drop Target",type:"bool",getDefaultValue:function(u,
-H){u=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;H=H.editorUi.editor.graph;return null!=u&&(H.isSwimlane(u)||0<H.model.getChildCount(u))},isVisible:function(u,H){return 1==u.vertices.length&&0==u.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(u,H){var Q=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;H=H.editorUi.editor.graph;return null!=Q&&(H.isContainer(Q)&&"0"!=u.style.collapsible||!H.isContainer(Q)&&"1"==u.style.collapsible)},
+H){u=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;H=H.editorUi.editor.graph;return null!=u&&(H.isSwimlane(u)||0<H.model.getChildCount(u))},isVisible:function(u,H){return 1==u.vertices.length&&0==u.edges.length}},{name:"collapsible",dispName:"Collapsible",type:"bool",getDefaultValue:function(u,H){var P=1==u.vertices.length&&0==u.edges.length?u.vertices[0]:null;H=H.editorUi.editor.graph;return null!=P&&(H.isContainer(P)&&"0"!=u.style.collapsible||!H.isContainer(P)&&"1"==u.style.collapsible)},
isVisible:function(u,H){return 1==u.vertices.length&&0==u.edges.length}},{name:"recursiveResize",dispName:"Resize Children",type:"bool",defVal:!0,isVisible:function(u,H){return 1==u.vertices.length&&0==u.edges.length&&!H.editorUi.editor.graph.isSwimlane(u.vertices[0])&&null==mxUtils.getValue(u.style,"childLayout",null)}},{name:"expand",dispName:"Expand",type:"bool",defVal:!0},{name:"part",dispName:"Part",type:"bool",defVal:!1,isVisible:function(u,H){H=H.editorUi.editor.graph.model;return 0<u.vertices.length?
H.isVertex(H.getParent(u.vertices[0])):!1}},{name:"editable",dispName:"Editable",type:"bool",defVal:!0},{name:"metaEdit",dispName:"Edit Dialog",type:"bool",defVal:!1},{name:"backgroundOutline",dispName:"Background Outline",type:"bool",defVal:!1},{name:"movable",dispName:"Movable",type:"bool",defVal:!0},{name:"movableLabel",dispName:"Movable Label",type:"bool",defVal:!1,isVisible:function(u,H){u=0<u.vertices.length?H.editorUi.editor.graph.getCellGeometry(u.vertices[0]):null;return null!=u&&!u.relative}},
{name:"autosize",dispName:"Autosize",type:"bool",defVal:!1},{name:"fixedWidth",dispName:"Fixed Width",type:"bool",defVal:!1},{name:"resizable",dispName:"Resizable",type:"bool",defVal:!0},{name:"resizeWidth",dispName:"Resize Width",type:"bool",defVal:!1},{name:"resizeHeight",dispName:"Resize Height",type:"bool",defVal:!1},{name:"rotatable",dispName:"Rotatable",type:"bool",defVal:!0},{name:"cloneable",dispName:"Cloneable",type:"bool",defVal:!0},{name:"deletable",dispName:"Deletable",type:"bool",defVal:!0},
-{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,H){var Q=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return H.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==Q||Q==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||
+{name:"treeFolding",dispName:"Tree Folding",type:"bool",defVal:!1},{name:"treeMoving",dispName:"Tree Moving",type:"bool",defVal:!1},{name:"pointerEvents",dispName:"Pointer Events",type:"bool",defVal:!0,isVisible:function(u,H){var P=mxUtils.getValue(u.style,mxConstants.STYLE_FILLCOLOR,null);return H.editorUi.editor.graph.isSwimlane(u.vertices[0])||null==P||P==mxConstants.NONE||0==mxUtils.getValue(u.style,mxConstants.STYLE_FILL_OPACITY,100)||0==mxUtils.getValue(u.style,mxConstants.STYLE_OPACITY,100)||
null!=u.style.pointerEvents}},{name:"moveCells",dispName:"Move Cells on Fold",type:"bool",defVal:!1,isVisible:function(u,H){return 0<u.vertices.length&&H.editorUi.editor.graph.isContainer(u.vertices[0])}}].concat(Editor.commonProperties);Editor.defaultCsvValue='##\n## Example CSV import. Use ## for comments and # for configuration. Paste CSV below.\n## The following names are reserved and should not be used (or ignored):\n## id, tooltip, placeholder(s), link and label (see below)\n##\n#\n## Node label with placeholders and HTML.\n## Default is \'%name_of_first_column%\'.\n#\n# label: %name%<br><i style="color:gray;">%position%</i><br><a href="mailto:%email%">Email</a>\n#\n## Node style (placeholders are replaced once).\n## Default is the current style for nodes.\n#\n# style: label;image=%image%;whiteSpace=wrap;html=1;rounded=1;fillColor=%fill%;strokeColor=%stroke%;\n#\n## Parent style for nodes with child nodes (placeholders are replaced once).\n#\n# parentstyle: swimlane;whiteSpace=wrap;html=1;childLayout=stackLayout;horizontal=1;horizontalStack=0;resizeParent=1;resizeLast=0;collapsible=1;\n#\n## Style to be used for objects not in the CSV. If this is - then such objects are ignored,\n## else they are created using this as their style, eg. whiteSpace=wrap;html=1;\n#\n# unknownStyle: -\n#\n## Optional column name that contains a reference to a named style in styles.\n## Default is the current style for nodes.\n#\n# stylename: -\n#\n## JSON for named styles of the form {"name": "style", "name": "style"} where style is a cell style with\n## placeholders that are replaced once.\n#\n# styles: -\n#\n## JSON for variables in styles of the form {"name": "value", "name": "value"} where name is a string\n## that will replace a placeholder in a style.\n#\n# vars: -\n#\n## Optional column name that contains a reference to a named label in labels.\n## Default is the current label.\n#\n# labelname: -\n#\n## JSON for named labels of the form {"name": "label", "name": "label"} where label is a cell label with\n## placeholders.\n#\n# labels: -\n#\n## Uses the given column name as the identity for cells (updates existing cells).\n## Default is no identity (empty value or -).\n#\n# identity: -\n#\n## Uses the given column name as the parent reference for cells. Default is no parent (empty or -).\n## The identity above is used for resolving the reference so it must be specified.\n#\n# parent: -\n#\n## Adds a prefix to the identity of cells to make sure they do not collide with existing cells (whose\n## IDs are numbers from 0..n, sometimes with a GUID prefix in the context of realtime collaboration).\n## Default is csvimport-.\n#\n# namespace: csvimport-\n#\n## Connections between rows ("from": source colum, "to": target column).\n## Label, style and invert are optional. Defaults are \'\', current style and false.\n## If placeholders are used in the style, they are replaced with data from the source.\n## An optional placeholders can be set to target to use data from the target instead.\n## In addition to label, an optional fromlabel and tolabel can be used to name the column\n## that contains the text for the label in the edges source or target (invert ignored).\n## In addition to those, an optional source and targetlabel can be used to specify a label\n## that contains placeholders referencing the respective columns in the source or target row.\n## The label is created in the form fromlabel + sourcelabel + label + tolabel + targetlabel.\n## Additional labels can be added by using an optional labels array with entries of the\n## form {"label": string, "x": number, "y": number, "dx": number, "dy": number} where\n## x is from -1 to 1 along the edge, y is orthogonal, and dx/dy are offsets in pixels.\n## An optional placeholders with the string value "source" or "target" can be specified\n## to replace placeholders in the additional label with data from the source or target.\n## The target column may contain a comma-separated list of values.\n## Multiple connect entries are allowed.\n#\n# connect: {"from": "manager", "to": "name", "invert": true, "label": "manages", \\\n# "style": "curved=1;endArrow=blockThin;endFill=1;fontSize=11;"}\n# connect: {"from": "refs", "to": "id", "style": "curved=1;fontSize=11;"}\n#\n## Node x-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# left: \n#\n## Node y-coordinate. Possible value is a column name. Default is empty. Layouts will\n## override this value.\n#\n# top: \n#\n## Node width. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the width. Default is auto.\n#\n# width: auto\n#\n## Node height. Possible value is a number (in px), auto or an @ sign followed by a column\n## name that contains the value for the height. Default is auto.\n#\n# height: auto\n#\n## Collapsed state for vertices. Possible values are true or false. Default is false.\n#\n# collapsed: false\n#\n## Padding for autosize. Default is 0.\n#\n# padding: -12\n#\n## Comma-separated list of ignored columns for metadata. (These can be\n## used for connections and styles but will not be added as metadata.)\n#\n# ignore: id,image,fill,stroke,refs,manager\n#\n## Column to be renamed to link attribute (used as link).\n#\n# link: url\n#\n## Spacing between nodes. Default is 40.\n#\n# nodespacing: 40\n#\n## Spacing between levels of hierarchical layouts. Default is 100.\n#\n# levelspacing: 100\n#\n## Spacing between parallel edges. Default is 40. Use 0 to disable.\n#\n# edgespacing: 40\n#\n## Name or JSON of layout. Possible values are auto, none, verticaltree, horizontaltree,\n## verticalflow, horizontalflow, organic, circle, orgchart or a JSON string as used in\n## Layout, Apply. Default is auto.\n#\n# layout: auto\n#\n## ---- CSV below this line. First line are column names. ----\nname,position,id,location,manager,email,fill,stroke,refs,url,image\nTessa Miller,CFO,emi,Office 1,,me@example.com,#dae8fc,#6c8ebf,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-3-128.png\nEdward Morrison,Brand Manager,emo,Office 2,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-10-3-128.png\nAlison Donovan,System Admin,rdo,Office 3,Tessa Miller,me@example.com,#d5e8d4,#82b366,"emo,tva",https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-2-128.png\nEvan Valet,HR Director,tva,Office 4,Tessa Miller,me@example.com,#d5e8d4,#82b366,,https://www.draw.io,https://cdn3.iconfinder.com/data/icons/user-avatars-1/512/users-9-2-128.png\n';
-Editor.createRoughCanvas=function(u){var H=rough.canvas({getContext:function(){return u}});H.draw=function(Q){var X=Q.sets||[];Q=Q.options||this.getDefaultOptions();for(var R=0;R<X.length;R++){var ca=X[R];switch(ca.type){case "path":null!=Q.stroke&&this._drawToContext(u,ca,Q);break;case "fillPath":this._drawToContext(u,ca,Q);break;case "fillSketch":this.fillSketch(u,ca,Q)}}};H.fillSketch=function(Q,X,R){var ca=u.state.strokeColor,ea=u.state.strokeWidth,da=u.state.strokeAlpha,qa=u.state.dashed,va=
-R.fillWeight;0>va&&(va=R.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(R.fill||"");u.setStrokeWidth(va);u.setDashed(!1);this._drawToContext(Q,X,R);u.setDashed(qa);u.setStrokeWidth(ea);u.setStrokeColor(ca);u.setStrokeAlpha(da)};H._drawToContext=function(Q,X,R){Q.begin();for(var ca=0;ca<X.ops.length;ca++){var ea=X.ops[ca],da=ea.data;switch(ea.op){case "move":Q.moveTo(da[0],da[1]);break;case "bcurveTo":Q.curveTo(da[0],da[1],da[2],da[3],da[4],da[5]);break;case "lineTo":Q.lineTo(da[0],
-da[1])}}Q.end();"fillPath"===X.type&&R.filled?Q.fill():Q.stroke()};return H};(function(){function u(ca,ea,da){this.canvas=ca;this.rc=ea;this.shape=da;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=
+Editor.createRoughCanvas=function(u){var H=rough.canvas({getContext:function(){return u}});H.draw=function(P){var V=P.sets||[];P=P.options||this.getDefaultOptions();for(var Q=0;Q<V.length;Q++){var da=V[Q];switch(da.type){case "path":null!=P.stroke&&this._drawToContext(u,da,P);break;case "fillPath":this._drawToContext(u,da,P);break;case "fillSketch":this.fillSketch(u,da,P)}}};H.fillSketch=function(P,V,Q){var da=u.state.strokeColor,ea=u.state.strokeWidth,fa=u.state.strokeAlpha,pa=u.state.dashed,ua=
+Q.fillWeight;0>ua&&(ua=Q.strokeWidth/2);u.setStrokeAlpha(u.state.fillAlpha);u.setStrokeColor(Q.fill||"");u.setStrokeWidth(ua);u.setDashed(!1);this._drawToContext(P,V,Q);u.setDashed(pa);u.setStrokeWidth(ea);u.setStrokeColor(da);u.setStrokeAlpha(fa)};H._drawToContext=function(P,V,Q){P.begin();for(var da=0;da<V.ops.length;da++){var ea=V.ops[da],fa=ea.data;switch(ea.op){case "move":P.moveTo(fa[0],fa[1]);break;case "bcurveTo":P.curveTo(fa[0],fa[1],fa[2],fa[3],fa[4],fa[5]);break;case "lineTo":P.lineTo(fa[0],
+fa[1])}}P.end();"fillPath"===V.type&&Q.filled?P.fill():P.stroke()};return H};(function(){function u(da,ea,fa){this.canvas=da;this.rc=ea;this.shape=fa;this.canvas.setLineJoin("round");this.canvas.setLineCap("round");this.originalBegin=this.canvas.begin;this.canvas.begin=mxUtils.bind(this,u.prototype.begin);this.originalEnd=this.canvas.end;this.canvas.end=mxUtils.bind(this,u.prototype.end);this.originalRect=this.canvas.rect;this.canvas.rect=mxUtils.bind(this,u.prototype.rect);this.originalRoundrect=
this.canvas.roundrect;this.canvas.roundrect=mxUtils.bind(this,u.prototype.roundrect);this.originalEllipse=this.canvas.ellipse;this.canvas.ellipse=mxUtils.bind(this,u.prototype.ellipse);this.originalLineTo=this.canvas.lineTo;this.canvas.lineTo=mxUtils.bind(this,u.prototype.lineTo);this.originalMoveTo=this.canvas.moveTo;this.canvas.moveTo=mxUtils.bind(this,u.prototype.moveTo);this.originalQuadTo=this.canvas.quadTo;this.canvas.quadTo=mxUtils.bind(this,u.prototype.quadTo);this.originalCurveTo=this.canvas.curveTo;
this.canvas.curveTo=mxUtils.bind(this,u.prototype.curveTo);this.originalArcTo=this.canvas.arcTo;this.canvas.arcTo=mxUtils.bind(this,u.prototype.arcTo);this.originalClose=this.canvas.close;this.canvas.close=mxUtils.bind(this,u.prototype.close);this.originalFill=this.canvas.fill;this.canvas.fill=mxUtils.bind(this,u.prototype.fill);this.originalStroke=this.canvas.stroke;this.canvas.stroke=mxUtils.bind(this,u.prototype.stroke);this.originalFillAndStroke=this.canvas.fillAndStroke;this.canvas.fillAndStroke=
-mxUtils.bind(this,u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(ca,ea){var da=1;if(null!=this.shape.state){var qa=this.shape.state.cell.id;if(null!=qa)for(var va=0;va<qa.length;va++)da=(da<<5)-da+qa.charCodeAt(va)<<0}da={strokeWidth:this.canvas.state.strokeWidth,seed:da,preserveVertices:!0};qa=this.rc.getDefaultOptions();da.stroke=ca?this.canvas.state.strokeColor===
-mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;ca=null;(da.filled=ea)?(da.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,ca=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):da.fill="";da.bowing=mxUtils.getValue(this.shape.style,"bowing",qa.bowing);da.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",qa.hachureAngle);da.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
-qa.curveFitting);da.roughness=mxUtils.getValue(this.shape.style,"jiggle",qa.roughness);da.simplification=mxUtils.getValue(this.shape.style,"simplification",qa.simplification);da.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",qa.disableMultiStroke);da.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",qa.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);da.hachureGap="auto"==ea?-1:ea;da.dashGap=mxUtils.getValue(this.shape.style,
-"dashGap",ea);da.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);da.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);da.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=da.fill&&(null!=ca||null!=ea&&da.fill==ea)?"solid":
-qa.fillStyle);da.fillStyle=ea;return da};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var ca=2;ca<arguments.length;ca+=2)this.lastX=arguments[ca-1],this.lastY=arguments[ca],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
-u.prototype.lineTo=function(ca,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,ca,ea),this.lastX=ca,this.lastY=ea)};u.prototype.moveTo=function(ca,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,ca,ea),this.lastX=ca,this.lastY=ea,this.firstX=ca,this.firstY=ea)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(ca,
-ea,da,qa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,ca,ea,da,qa),this.lastX=da,this.lastY=qa)};u.prototype.curveTo=function(ca,ea,da,qa,va,ua){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,ca,ea,da,qa,va,ua),this.lastX=va,this.lastY=ua)};u.prototype.arcTo=function(ca,ea,da,qa,va,ua,Aa){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var za=mxUtils.arcToCurves(this.lastX,this.lastY,
-ca,ea,da,qa,va,ua,Aa);if(null!=za)for(var Ca=0;Ca<za.length;Ca+=6)this.curveTo(za[Ca],za[Ca+1],za[Ca+2],za[Ca+3],za[Ca+4],za[Ca+5]);this.lastX=ua;this.lastY=Aa}};u.prototype.rect=function(ca,ea,da,qa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(ca,ea,da,qa,this.getStyle(!0,!0)))};u.prototype.ellipse=function(ca,ea,da,qa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(ca+
-da/2,ea+qa/2,da,qa,this.getStyle(!0,!0)))};u.prototype.roundrect=function(ca,ea,da,qa,va,ua){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(ca+va,ea),this.lineTo(ca+da-va,ea),this.quadTo(ca+da,ea,ca+da,ea+ua),this.lineTo(ca+da,ea+qa-ua),this.quadTo(ca+da,ea+qa,ca+da-va,ea+qa),this.lineTo(ca+va,ea+qa),this.quadTo(ca,ea+qa,ca,ea+qa-ua),this.lineTo(ca,ea+ua),this.quadTo(ca,ea,ca+va,ea))};u.prototype.drawPath=function(ca){if(0<this.path.length){this.passThrough=
-!0;try{this.rc.path(this.path.join(" "),ca)}catch(da){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in ca)this.nextShape.options[ea]=ca[ea];ca.stroke!=mxConstants.NONE&&null!=ca.stroke||delete this.nextShape.options.stroke;ca.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=
+mxUtils.bind(this,u.prototype.fillAndStroke);this.path=[];this.passThrough=!1}u.prototype.moveOp="M";u.prototype.lineOp="L";u.prototype.quadOp="Q";u.prototype.curveOp="C";u.prototype.closeOp="Z";u.prototype.getStyle=function(da,ea){var fa=1;if(null!=this.shape.state){var pa=this.shape.state.cell.id;if(null!=pa)for(var ua=0;ua<pa.length;ua++)fa=(fa<<5)-fa+pa.charCodeAt(ua)<<0}fa={strokeWidth:this.canvas.state.strokeWidth,seed:fa,preserveVertices:!0};pa=this.rc.getDefaultOptions();fa.stroke=da?this.canvas.state.strokeColor===
+mxConstants.NONE?"transparent":this.canvas.state.strokeColor:mxConstants.NONE;da=null;(fa.filled=ea)?(fa.fill=this.canvas.state.fillColor===mxConstants.NONE?"":this.canvas.state.fillColor,da=this.canvas.state.gradientColor===mxConstants.NONE?null:this.canvas.state.gradientColor):fa.fill="";fa.bowing=mxUtils.getValue(this.shape.style,"bowing",pa.bowing);fa.hachureAngle=mxUtils.getValue(this.shape.style,"hachureAngle",pa.hachureAngle);fa.curveFitting=mxUtils.getValue(this.shape.style,"curveFitting",
+pa.curveFitting);fa.roughness=mxUtils.getValue(this.shape.style,"jiggle",pa.roughness);fa.simplification=mxUtils.getValue(this.shape.style,"simplification",pa.simplification);fa.disableMultiStroke=mxUtils.getValue(this.shape.style,"disableMultiStroke",pa.disableMultiStroke);fa.disableMultiStrokeFill=mxUtils.getValue(this.shape.style,"disableMultiStrokeFill",pa.disableMultiStrokeFill);ea=mxUtils.getValue(this.shape.style,"hachureGap",-1);fa.hachureGap="auto"==ea?-1:ea;fa.dashGap=mxUtils.getValue(this.shape.style,
+"dashGap",ea);fa.dashOffset=mxUtils.getValue(this.shape.style,"dashOffset",ea);fa.zigzagOffset=mxUtils.getValue(this.shape.style,"zigzagOffset",ea);ea=mxUtils.getValue(this.shape.style,"fillWeight",-1);fa.fillWeight="auto"==ea?-1:ea;ea=mxUtils.getValue(this.shape.style,"fillStyle","auto");"auto"==ea&&(ea=mxUtils.hex2rgb(null!=this.shape.state?this.shape.state.view.graph.shapeBackgroundColor:Editor.isDarkMode()?Editor.darkColor:"#ffffff"),ea=null!=fa.fill&&(null!=da||null!=ea&&fa.fill==ea)?"solid":
+pa.fillStyle);fa.fillStyle=ea;return fa};u.prototype.begin=function(){this.passThrough?this.originalBegin.apply(this.canvas,arguments):this.path=[]};u.prototype.end=function(){this.passThrough&&this.originalEnd.apply(this.canvas,arguments)};u.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var da=2;da<arguments.length;da+=2)this.lastX=arguments[da-1],this.lastY=arguments[da],this.path.push(this.canvas.format(this.lastX)),this.path.push(this.canvas.format(this.lastY))};
+u.prototype.lineTo=function(da,ea){this.passThrough?this.originalLineTo.apply(this.canvas,arguments):(this.addOp(this.lineOp,da,ea),this.lastX=da,this.lastY=ea)};u.prototype.moveTo=function(da,ea){this.passThrough?this.originalMoveTo.apply(this.canvas,arguments):(this.addOp(this.moveOp,da,ea),this.lastX=da,this.lastY=ea,this.firstX=da,this.firstY=ea)};u.prototype.close=function(){this.passThrough?this.originalClose.apply(this.canvas,arguments):this.addOp(this.closeOp)};u.prototype.quadTo=function(da,
+ea,fa,pa){this.passThrough?this.originalQuadTo.apply(this.canvas,arguments):(this.addOp(this.quadOp,da,ea,fa,pa),this.lastX=fa,this.lastY=pa)};u.prototype.curveTo=function(da,ea,fa,pa,ua,qa){this.passThrough?this.originalCurveTo.apply(this.canvas,arguments):(this.addOp(this.curveOp,da,ea,fa,pa,ua,qa),this.lastX=ua,this.lastY=qa)};u.prototype.arcTo=function(da,ea,fa,pa,ua,qa,Da){if(this.passThrough)this.originalArcTo.apply(this.canvas,arguments);else{var Aa=mxUtils.arcToCurves(this.lastX,this.lastY,
+da,ea,fa,pa,ua,qa,Da);if(null!=Aa)for(var Fa=0;Fa<Aa.length;Fa+=6)this.curveTo(Aa[Fa],Aa[Fa+1],Aa[Fa+2],Aa[Fa+3],Aa[Fa+4],Aa[Fa+5]);this.lastX=qa;this.lastY=Da}};u.prototype.rect=function(da,ea,fa,pa){this.passThrough?this.originalRect.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.rectangle(da,ea,fa,pa,this.getStyle(!0,!0)))};u.prototype.ellipse=function(da,ea,fa,pa){this.passThrough?this.originalEllipse.apply(this.canvas,arguments):(this.path=[],this.nextShape=this.rc.generator.ellipse(da+
+fa/2,ea+pa/2,fa,pa,this.getStyle(!0,!0)))};u.prototype.roundrect=function(da,ea,fa,pa,ua,qa){this.passThrough?this.originalRoundrect.apply(this.canvas,arguments):(this.begin(),this.moveTo(da+ua,ea),this.lineTo(da+fa-ua,ea),this.quadTo(da+fa,ea,da+fa,ea+qa),this.lineTo(da+fa,ea+pa-qa),this.quadTo(da+fa,ea+pa,da+fa-ua,ea+pa),this.lineTo(da+ua,ea+pa),this.quadTo(da,ea+pa,da,ea+pa-qa),this.lineTo(da,ea+qa),this.quadTo(da,ea,da+ua,ea))};u.prototype.drawPath=function(da){if(0<this.path.length){this.passThrough=
+!0;try{this.rc.path(this.path.join(" "),da)}catch(fa){}this.passThrough=!1}else if(null!=this.nextShape){for(var ea in da)this.nextShape.options[ea]=da[ea];da.stroke!=mxConstants.NONE&&null!=da.stroke||delete this.nextShape.options.stroke;da.filled||delete this.nextShape.options.fill;this.passThrough=!0;this.rc.draw(this.nextShape);this.passThrough=!1}};u.prototype.stroke=function(){this.passThrough?this.originalStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!1))};u.prototype.fill=
function(){this.passThrough?this.originalFill.apply(this.canvas,arguments):this.drawPath(this.getStyle(!1,!0))};u.prototype.fillAndStroke=function(){this.passThrough?this.originalFillAndStroke.apply(this.canvas,arguments):this.drawPath(this.getStyle(!0,!0))};u.prototype.destroy=function(){this.canvas.lineTo=this.originalLineTo;this.canvas.moveTo=this.originalMoveTo;this.canvas.close=this.originalClose;this.canvas.quadTo=this.originalQuadTo;this.canvas.curveTo=this.originalCurveTo;this.canvas.arcTo=
-this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(ca){return new u(ca,Editor.createRoughCanvas(ca),this)};var H=mxShape.prototype.createHandJiggle;
-mxShape.prototype.createHandJiggle=function(ca){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?H.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(ca):this.createRoughCanvas(ca)};var Q=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(ca,ea,da,qa,va){null!=ca.handJiggle&&ca.handJiggle.passThrough||Q.apply(this,arguments)};var X=mxShape.prototype.paint;mxShape.prototype.paint=
-function(ca){var ea=ca.addTolerance,da=!0;null!=this.style&&(da="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=ca.handJiggle&&ca.handJiggle.constructor==u&&!this.outline){ca.save();var qa=this.fill,va=this.stroke;this.stroke=this.fill=null;var ua=this.configurePointerEvents,Aa=ca.setStrokeColor;ca.setStrokeColor=function(){};var za=ca.setFillColor;ca.setFillColor=function(){};da||null==qa||(this.configurePointerEvents=function(){});ca.handJiggle.passThrough=!0;X.apply(this,
-arguments);ca.handJiggle.passThrough=!1;ca.setFillColor=za;ca.setStrokeColor=Aa;this.configurePointerEvents=ua;this.stroke=va;this.fill=qa;ca.restore();da&&null!=qa&&(ca.addTolerance=function(){})}X.apply(this,arguments);ca.addTolerance=ea};var R=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(ca,ea,da,qa,va,ua){null!=ca.handJiggle&&ca.handJiggle.constructor==u?(ca.handJiggle.passThrough=!0,R.apply(this,arguments),ca.handJiggle.passThrough=!1):R.apply(this,arguments)}})();
-Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,H,Q){if(null!=u&&"undefined"!==typeof pako){var X=u.ownerDocument.getElementsByTagName("div"),R=[];if(null!=X&&0<X.length)for(var ca=0;ca<X.length;ca++)if("mxgraph"==X[ca].getAttribute("class")){R.push(X[ca]);
-break}0<R.length&&(X=R[0].getAttribute("data-mxgraph"),null!=X?(R=JSON.parse(X),null!=R&&null!=R.xml&&(u=mxUtils.parseXml(R.xml),u=u.documentElement)):(R=R[0].getElementsByTagName("div"),0<R.length&&(X=mxUtils.getTextContent(R[0]),X=Graph.decompress(X,null,Q),0<X.length&&(u=mxUtils.parseXml(X),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(X=u.getAttribute("content"),null!=X&&"<"!=X.charAt(0)&&"%"!=X.charAt(0)&&(X=unescape(window.atob?atob(X):Base64.decode(cont,X))),null!=X&&"%"==X.charAt(0)&&
-(X=decodeURIComponent(X)),null!=X&&0<X.length)u=mxUtils.parseXml(X).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||H||(R=null,"diagram"==u.nodeName?R=u:"mxfile"==u.nodeName&&(X=u.getElementsByTagName("diagram"),0<X.length&&(R=X[Math.max(0,Math.min(X.length-1,urlParams.page||0))])),null!=R&&(u=Editor.parseDiagramNode(R,Q)));null==u||"mxGraphModel"==u.nodeName||H&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,H){var Q=mxUtils.trim(mxUtils.getTextContent(u)),
-X=null;0<Q.length?(u=Graph.decompress(Q,null,H),null!=u&&0<u.length&&(X=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(X=mxUtils.createXmlDocument(),X.appendChild(X.importNode(u[0],!0)),X=X.documentElement));return X};Editor.getDiagramNodeXml=function(u){var H=mxUtils.getTextContent(u),Q=null;0<H.length?Q=Graph.decompress(H):null!=u.firstChild&&(Q=mxUtils.getXml(u.firstChild));return Q};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&
-!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var H=u.indexOf("EmbeddedFile");if(-1<H){var Q=u.indexOf("stream",H)+9;if(0<u.substring(H,Q).indexOf("application#2Fvnd.jgraph.mxfile"))return H=u.indexOf("endstream",Q-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(Q,H)),{to:"string"})}return null}Q=null;H="";for(var X=0,R=0,ca=[],ea=null;R<u.length;){var da=u.charCodeAt(R);R+=1;10!=da&&(H+=String.fromCharCode(da));da=="/Subject (%3Cmxfile".charCodeAt(X)?X++:X=
-0;if(19==X){var qa=u.indexOf("%3C%2Fmxfile%3E)",R)+15;R-=9;if(qa>R){Q=u.substring(R,qa);break}}10==da&&("endobj"==H?ea=null:"obj"==H.substring(H.length-3,H.length)||"xref"==H||"trailer"==H?(ea=[],ca[H.split(" ")[0]]=ea):null!=ea&&ea.push(H),H="")}null==Q&&(Q=Editor.extractGraphModelFromXref(ca));null!=Q&&(Q=decodeURIComponent(Q.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return Q};Editor.extractGraphModelFromXref=function(u){var H=u.trailer,Q=null;null!=H&&(H=/.* \/Info (\d+) (\d+) R/g.exec(H.join("\n")),
-null!=H&&0<H.length&&(H=u[H[1]],null!=H&&(H=/.* \/Subject (\d+) (\d+) R/g.exec(H.join("\n")),null!=H&&0<H.length&&(u=u[H[1]],null!=u&&(u=u.join("\n"),Q=u.substring(1,u.length-1))))));return Q};Editor.extractParserError=function(u,H){var Q=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(Q=H||mxResources.get("invalidChars"),H=u[0].getElementsByTagName("div"),0<H.length&&(Q=mxUtils.getTextContent(H[0])));return null!=Q?mxUtils.trim(Q):Q};Editor.addRetryToError=function(u,
+this.originalArcTo;this.canvas.close=this.originalClose;this.canvas.fill=this.originalFill;this.canvas.stroke=this.originalStroke;this.canvas.fillAndStroke=this.originalFillAndStroke;this.canvas.begin=this.originalBegin;this.canvas.end=this.originalEnd;this.canvas.rect=this.originalRect;this.canvas.ellipse=this.originalEllipse;this.canvas.roundrect=this.originalRoundrect};mxShape.prototype.createRoughCanvas=function(da){return new u(da,Editor.createRoughCanvas(da),this)};var H=mxShape.prototype.createHandJiggle;
+mxShape.prototype.createHandJiggle=function(da){return this.outline||null==this.style||"0"==mxUtils.getValue(this.style,"sketch","0")?H.apply(this,arguments):"comic"==mxUtils.getValue(this.style,"sketchStyle","rough")?this.createComicCanvas(da):this.createRoughCanvas(da)};var P=mxImageShape.prototype.paintVertexShape;mxImageShape.prototype.paintVertexShape=function(da,ea,fa,pa,ua){null!=da.handJiggle&&da.handJiggle.passThrough||P.apply(this,arguments)};var V=mxShape.prototype.paint;mxShape.prototype.paint=
+function(da){var ea=da.addTolerance,fa=!0;null!=this.style&&(fa="1"==mxUtils.getValue(this.style,mxConstants.STYLE_POINTER_EVENTS,"1"));if(null!=da.handJiggle&&da.handJiggle.constructor==u&&!this.outline){da.save();var pa=this.fill,ua=this.stroke;this.stroke=this.fill=null;var qa=this.configurePointerEvents,Da=da.setStrokeColor;da.setStrokeColor=function(){};var Aa=da.setFillColor;da.setFillColor=function(){};fa||null==pa||(this.configurePointerEvents=function(){});da.handJiggle.passThrough=!0;V.apply(this,
+arguments);da.handJiggle.passThrough=!1;da.setFillColor=Aa;da.setStrokeColor=Da;this.configurePointerEvents=qa;this.stroke=ua;this.fill=pa;da.restore();fa&&null!=pa&&(da.addTolerance=function(){})}V.apply(this,arguments);da.addTolerance=ea};var Q=mxShape.prototype.paintGlassEffect;mxShape.prototype.paintGlassEffect=function(da,ea,fa,pa,ua,qa){null!=da.handJiggle&&da.handJiggle.constructor==u?(da.handJiggle.passThrough=!0,Q.apply(this,arguments),da.handJiggle.passThrough=!1):Q.apply(this,arguments)}})();
+Editor.fastCompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:Graph.arrayBufferToString(pako.deflateRaw(u))};Editor.fastDecompress=function(u){return null==u||0==u.length||"undefined"===typeof pako?u:pako.inflateRaw(Graph.stringToArrayBuffer(atob(u)),{to:"string"})};Editor.extractGraphModel=function(u,H,P){if(null!=u&&"undefined"!==typeof pako){var V=u.ownerDocument.getElementsByTagName("div"),Q=[];if(null!=V&&0<V.length)for(var da=0;da<V.length;da++)if("mxgraph"==V[da].getAttribute("class")){Q.push(V[da]);
+break}0<Q.length&&(V=Q[0].getAttribute("data-mxgraph"),null!=V?(Q=JSON.parse(V),null!=Q&&null!=Q.xml&&(u=mxUtils.parseXml(Q.xml),u=u.documentElement)):(Q=Q[0].getElementsByTagName("div"),0<Q.length&&(V=mxUtils.getTextContent(Q[0]),V=Graph.decompress(V,null,P),0<V.length&&(u=mxUtils.parseXml(V),u=u.documentElement))))}if(null!=u&&"svg"==u.nodeName)if(V=u.getAttribute("content"),null!=V&&"<"!=V.charAt(0)&&"%"!=V.charAt(0)&&(V=unescape(window.atob?atob(V):Base64.decode(cont,V))),null!=V&&"%"==V.charAt(0)&&
+(V=decodeURIComponent(V)),null!=V&&0<V.length)u=mxUtils.parseXml(V).documentElement;else throw{message:mxResources.get("notADiagramFile")};null==u||H||(Q=null,"diagram"==u.nodeName?Q=u:"mxfile"==u.nodeName&&(V=u.getElementsByTagName("diagram"),0<V.length&&(Q=V[Math.max(0,Math.min(V.length-1,urlParams.page||0))])),null!=Q&&(u=Editor.parseDiagramNode(Q,P)));null==u||"mxGraphModel"==u.nodeName||H&&"mxfile"==u.nodeName||(u=null);return u};Editor.parseDiagramNode=function(u,H){var P=mxUtils.trim(mxUtils.getTextContent(u)),
+V=null;0<P.length?(u=Graph.decompress(P,null,H),null!=u&&0<u.length&&(V=mxUtils.parseXml(u).documentElement)):(u=mxUtils.getChildNodes(u),0<u.length&&(V=mxUtils.createXmlDocument(),V.appendChild(V.importNode(u[0],!0)),V=V.documentElement));return V};Editor.getDiagramNodeXml=function(u){var H=mxUtils.getTextContent(u),P=null;0<H.length?P=Graph.decompress(H):null!=u.firstChild&&(P=mxUtils.getXml(u.firstChild));return P};Editor.extractGraphModelFromPdf=function(u){u=u.substring(u.indexOf(",")+1);u=window.atob&&
+!mxClient.IS_SF?atob(u):Base64.decode(u,!0);if("%PDF-1.7"==u.substring(0,8)){var H=u.indexOf("EmbeddedFile");if(-1<H){var P=u.indexOf("stream",H)+9;if(0<u.substring(H,P).indexOf("application#2Fvnd.jgraph.mxfile"))return H=u.indexOf("endstream",P-1),pako.inflateRaw(Graph.stringToArrayBuffer(u.substring(P,H)),{to:"string"})}return null}P=null;H="";for(var V=0,Q=0,da=[],ea=null;Q<u.length;){var fa=u.charCodeAt(Q);Q+=1;10!=fa&&(H+=String.fromCharCode(fa));fa=="/Subject (%3Cmxfile".charCodeAt(V)?V++:V=
+0;if(19==V){var pa=u.indexOf("%3C%2Fmxfile%3E)",Q)+15;Q-=9;if(pa>Q){P=u.substring(Q,pa);break}}10==fa&&("endobj"==H?ea=null:"obj"==H.substring(H.length-3,H.length)||"xref"==H||"trailer"==H?(ea=[],da[H.split(" ")[0]]=ea):null!=ea&&ea.push(H),H="")}null==P&&(P=Editor.extractGraphModelFromXref(da));null!=P&&(P=decodeURIComponent(P.replace(/\\\(/g,"(").replace(/\\\)/g,")")));return P};Editor.extractGraphModelFromXref=function(u){var H=u.trailer,P=null;null!=H&&(H=/.* \/Info (\d+) (\d+) R/g.exec(H.join("\n")),
+null!=H&&0<H.length&&(H=u[H[1]],null!=H&&(H=/.* \/Subject (\d+) (\d+) R/g.exec(H.join("\n")),null!=H&&0<H.length&&(u=u[H[1]],null!=u&&(u=u.join("\n"),P=u.substring(1,u.length-1))))));return P};Editor.extractParserError=function(u,H){var P=null;u=null!=u?u.getElementsByTagName("parsererror"):null;null!=u&&0<u.length&&(P=H||mxResources.get("invalidChars"),H=u[0].getElementsByTagName("div"),0<H.length&&(P=mxUtils.getTextContent(H[0])));return null!=P?mxUtils.trim(P):P};Editor.addRetryToError=function(u,
H){null!=u&&(u=null!=u.error?u.error:u,null==u.retry&&(u.retry=H))};Editor.configure=function(u,H){if(null!=u){Editor.config=u;Editor.configVersion=u.version;Menus.prototype.defaultFonts=u.defaultFonts||Menus.prototype.defaultFonts;ColorDialog.prototype.presetColors=u.presetColors||ColorDialog.prototype.presetColors;ColorDialog.prototype.defaultColors=u.defaultColors||ColorDialog.prototype.defaultColors;ColorDialog.prototype.colorNames=u.colorNames||ColorDialog.prototype.colorNames;StyleFormatPanel.prototype.defaultColorSchemes=
u.defaultColorSchemes||StyleFormatPanel.prototype.defaultColorSchemes;Graph.prototype.defaultEdgeLength=u.defaultEdgeLength||Graph.prototype.defaultEdgeLength;DrawioFile.prototype.autosaveDelay=u.autosaveDelay||DrawioFile.prototype.autosaveDelay;u.debug&&(urlParams.test="1");null!=u.templateFile&&(EditorUi.templateFile=u.templateFile);null!=u.styles&&(Array.isArray(u.styles)?Editor.styles=u.styles:EditorUi.debug("Configuration Error: Array expected for styles"));null!=u.globalVars&&(Editor.globalVars=
u.globalVars);null!=u.compressXml&&(Editor.compressXml=u.compressXml);null!=u.includeDiagram&&(Editor.defaultIncludeDiagram=u.includeDiagram);null!=u.simpleLabels&&(Editor.simpleLabels=u.simpleLabels);null!=u.oneDriveInlinePicker&&(Editor.oneDriveInlinePicker=u.oneDriveInlinePicker);null!=u.darkColor&&(Editor.darkColor=u.darkColor);null!=u.lightColor&&(Editor.lightColor=u.lightColor);null!=u.settingsName&&(Editor.configurationKey="."+u.settingsName+"-configuration",Editor.settingsKey="."+u.settingsName+
-"-config",mxSettings.key=Editor.settingsKey);u.customFonts&&(Menus.prototype.defaultFonts=u.customFonts.concat(Menus.prototype.defaultFonts));u.customPresetColors&&(ColorDialog.prototype.presetColors=u.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=u.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=u.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=u.css){var Q=document.createElement("style");Q.setAttribute("type","text/css");
-Q.appendChild(document.createTextNode(u.css));var X=document.getElementsByTagName("script")[0];X.parentNode.insertBefore(Q,X)}null!=u.libraries&&(Sidebar.prototype.customEntries=u.libraries);null!=u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabledLibraries=u.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=u.defaultLibraries&&(Sidebar.prototype.defaultEntries=u.defaultLibraries);null!=u.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
+"-config",mxSettings.key=Editor.settingsKey);u.customFonts&&(Menus.prototype.defaultFonts=u.customFonts.concat(Menus.prototype.defaultFonts));u.customPresetColors&&(ColorDialog.prototype.presetColors=u.customPresetColors.concat(ColorDialog.prototype.presetColors));null!=u.customColorSchemes&&(StyleFormatPanel.prototype.defaultColorSchemes=u.customColorSchemes.concat(StyleFormatPanel.prototype.defaultColorSchemes));if(null!=u.css){var P=document.createElement("style");P.setAttribute("type","text/css");
+P.appendChild(document.createTextNode(u.css));var V=document.getElementsByTagName("script")[0];V.parentNode.insertBefore(P,V)}null!=u.libraries&&(Sidebar.prototype.customEntries=u.libraries);null!=u.enabledLibraries&&(Array.isArray(u.enabledLibraries)?Sidebar.prototype.enabledLibraries=u.enabledLibraries:EditorUi.debug("Configuration Error: Array expected for enabledLibraries"));null!=u.defaultLibraries&&(Sidebar.prototype.defaultEntries=u.defaultLibraries);null!=u.defaultCustomLibraries&&(Editor.defaultCustomLibraries=
u.defaultCustomLibraries);null!=u.enableCustomLibraries&&(Editor.enableCustomLibraries=u.enableCustomLibraries);null!=u.defaultVertexStyle&&(Graph.prototype.defaultVertexStyle=u.defaultVertexStyle);null!=u.defaultEdgeStyle&&(Graph.prototype.defaultEdgeStyle=u.defaultEdgeStyle);null!=u.defaultPageVisible&&(Graph.prototype.defaultPageVisible=u.defaultPageVisible);null!=u.defaultGridEnabled&&(Graph.prototype.defaultGridEnabled=u.defaultGridEnabled);null!=u.zoomWheel&&(Graph.zoomWheel=u.zoomWheel);null!=
-u.zoomFactor&&(Q=parseFloat(u.zoomFactor),!isNaN(Q)&&1<Q?Graph.prototype.zoomFactor=Q:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&(Q=parseInt(u.gridSteps),!isNaN(Q)&&0<Q?mxGraphView.prototype.gridSteps=Q:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=u.pageFormat&&(Q=parseInt(u.pageFormat.width),X=parseInt(u.pageFormat.height),!isNaN(Q)&&0<Q&&!isNaN(X)&&0<X?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,Q,X),
+u.zoomFactor&&(P=parseFloat(u.zoomFactor),!isNaN(P)&&1<P?Graph.prototype.zoomFactor=P:EditorUi.debug("Configuration Error: Float > 1 expected for zoomFactor"));null!=u.gridSteps&&(P=parseInt(u.gridSteps),!isNaN(P)&&0<P?mxGraphView.prototype.gridSteps=P:EditorUi.debug("Configuration Error: Int > 0 expected for gridSteps"));null!=u.pageFormat&&(P=parseInt(u.pageFormat.width),V=parseInt(u.pageFormat.height),!isNaN(P)&&0<P&&!isNaN(V)&&0<V?(mxGraph.prototype.defaultPageFormat=new mxRectangle(0,0,P,V),
mxGraph.prototype.pageFormat=mxGraph.prototype.defaultPageFormat):EditorUi.debug("Configuration Error: {width: int, height: int} expected for pageFormat"));u.thumbWidth&&(Sidebar.prototype.thumbWidth=u.thumbWidth);u.thumbHeight&&(Sidebar.prototype.thumbHeight=u.thumbHeight);u.emptyLibraryXml&&(EditorUi.prototype.emptyLibraryXml=u.emptyLibraryXml);u.emptyDiagramXml&&(EditorUi.prototype.emptyDiagramXml=u.emptyDiagramXml);u.sidebarWidth&&(EditorUi.prototype.hsplitPosition=u.sidebarWidth);u.sidebarTitles&&
-(Sidebar.prototype.sidebarTitles=u.sidebarTitles);u.sidebarTitleSize&&(Q=parseInt(u.sidebarTitleSize),!isNaN(Q)&&0<Q?Sidebar.prototype.sidebarTitleSize=Q:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=u.autosaveDelay&&(Q=parseInt(u.autosaveDelay),!isNaN(Q)&&0<Q?DrawioFile.prototype.autosaveDelay=Q:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
+(Sidebar.prototype.sidebarTitles=u.sidebarTitles);u.sidebarTitleSize&&(P=parseInt(u.sidebarTitleSize),!isNaN(P)&&0<P?Sidebar.prototype.sidebarTitleSize=P:EditorUi.debug("Configuration Error: Int > 0 expected for sidebarTitleSize"));u.fontCss&&("string"===typeof u.fontCss?Editor.configureFontCss(u.fontCss):EditorUi.debug("Configuration Error: String expected for fontCss"));null!=u.autosaveDelay&&(P=parseInt(u.autosaveDelay),!isNaN(P)&&0<P?DrawioFile.prototype.autosaveDelay=P:EditorUi.debug("Configuration Error: Int > 0 expected for autosaveDelay"));
if(null!=u.plugins&&!H)for(App.initPluginCallback(),H=0;H<u.plugins.length;H++)mxscript(u.plugins[H]);null!=u.maxImageBytes&&(EditorUi.prototype.maxImageBytes=u.maxImageBytes);null!=u.maxImageSize&&(EditorUi.prototype.maxImageSize=u.maxImageSize);null!=u.shareCursorPosition&&(EditorUi.prototype.shareCursorPosition=u.shareCursorPosition);null!=u.showRemoteCursors&&(EditorUi.prototype.showRemoteCursors=u.showRemoteCursors)}};Editor.configureFontCss=function(u){if(null!=u){Editor.prototype.fontCss=u;
-var H=document.getElementsByTagName("script")[0];if(null!=H&&null!=H.parentNode){var Q=document.createElement("style");Q.setAttribute("type","text/css");Q.appendChild(document.createTextNode(u));H.parentNode.insertBefore(Q,H);u=u.split("url(");for(Q=1;Q<u.length;Q++){var X=u[Q].indexOf(")");X=Editor.trimCssUrl(u[Q].substring(0,X));var R=document.createElement("link");R.setAttribute("rel","preload");R.setAttribute("href",X);R.setAttribute("as","font");R.setAttribute("crossorigin","");H.parentNode.insertBefore(R,
-H)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=u?u:Editor.GUID_LENGTH;for(var H=[],Q=0;Q<u;Q++)H.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return H.join("")};Editor.prototype.timeout=
+var H=document.getElementsByTagName("script")[0];if(null!=H&&null!=H.parentNode){var P=document.createElement("style");P.setAttribute("type","text/css");P.appendChild(document.createTextNode(u));H.parentNode.insertBefore(P,H);u=u.split("url(");for(P=1;P<u.length;P++){var V=u[P].indexOf(")");V=Editor.trimCssUrl(u[P].substring(0,V));var Q=document.createElement("link");Q.setAttribute("rel","preload");Q.setAttribute("href",V);Q.setAttribute("as","font");Q.setAttribute("crossorigin","");H.parentNode.insertBefore(Q,
+H)}}}};Editor.trimCssUrl=function(u){return u.replace(RegExp("^[\\s\"']+","g"),"").replace(RegExp("[\\s\"']+$","g"),"")};Editor.GOOGLE_FONTS="https://fonts.googleapis.com/css?family=";Editor.GUID_ALPHABET="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_";Editor.GUID_LENGTH=20;Editor.guid=function(u){u=null!=u?u:Editor.GUID_LENGTH;for(var H=[],P=0;P<u;P++)H.push(Editor.GUID_ALPHABET.charAt(Math.floor(Math.random()*Editor.GUID_ALPHABET.length)));return H.join("")};Editor.prototype.timeout=
25E3;Editor.prototype.editButtonLink=null!=urlParams.edit?decodeURIComponent(urlParams.edit):null;Editor.prototype.crossOriginImages=!mxClient.IS_IE;var b=Editor.prototype.setGraphXml;Editor.prototype.setGraphXml=function(u){u=null!=u&&"mxlibrary"!=u.nodeName?this.extractGraphModel(u):null;if(null!=u){var H=Editor.extractParserError(u,mxResources.get("invalidOrMissingFile"));if(H)throw EditorUi.debug("Editor.setGraphXml ParserError",[this],"node",[u],"cause",[H]),Error(mxResources.get("notADiagramFile")+
-" ("+H+")");if("mxGraphModel"==u.nodeName){H=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=H&&""!=H)H!=this.graph.currentStyle&&(Q=null!=this.graph.themes?this.graph.themes[H]:mxUtils.load(STYLE_PATH+"/"+H+".xml").getDocumentElement(),null!=Q&&(X=new mxCodec(Q.ownerDocument),X.decode(Q,this.graph.getStylesheet())));else{var Q=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=Q){var X=new mxCodec(Q.ownerDocument);
-X.decode(Q,this.graph.getStylesheet())}}this.graph.currentStyle=H;this.graph.mathEnabled="1"==urlParams.math||"1"==u.getAttribute("math");H=u.getAttribute("backgroundImage");null!=H?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(H)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(H=u.getAttribute("extFonts"))try{for(H=
-H.split("|").map(function(R){R=R.split("^");return{name:R[0],url:R[1]}}),Q=0;Q<H.length;Q++)this.graph.addExtFont(H[Q].name,H[Q].url)}catch(R){console.log("ExtFonts format error: "+R.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,H){u=null!=
-u?u:!0;var Q=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&Q.setAttribute("style",this.graph.currentStyle);var X=this.graph.getBackgroundImageObject(this.graph.backgroundImage,H);null!=X&&Q.setAttribute("backgroundImage",JSON.stringify(X));Q.setAttribute("math",this.graph.mathEnabled?"1":"0");Q.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(X=this.graph.extFonts.map(function(R){return R.name+
-"^"+R.url}),Q.setAttribute("extFonts",X.join("|")));return Q};Editor.prototype.isDataSvg=function(u){try{var H=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=H&&(null!=H&&"<"!=H.charAt(0)&&"%"!=H.charAt(0)&&(H=unescape(window.atob?atob(H):Base64.decode(cont,H))),null!=H&&"%"==H.charAt(0)&&(H=decodeURIComponent(H)),null!=H&&0<H.length)){var Q=mxUtils.parseXml(H).documentElement;return"mxfile"==Q.nodeName||"mxGraphModel"==Q.nodeName}}catch(X){}return!1};Editor.prototype.extractGraphModel=
-function(u,H,Q){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var n=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){n.apply(this,
-arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(u,H){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){u=null!=u?u:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(R){try{MathJax.typesetClear([R]),MathJax.typeset([R]),Editor.onMathJaxDone()}catch(ca){MathJax.typesetClear([R]),null!=ca.retry?ca.retry.then(function(){MathJax.typesetPromise([R]).then(Editor.onMathJaxDone)}):
-null!=window.console&&console.log("Error in MathJax: "+ca.toString())}};window.MathJax=null!=H?H:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var R=0;R<Editor.mathJaxQueue.length;R++)Editor.doMathJaxRender(Editor.mathJaxQueue[R])}}};Editor.MathJaxRender=function(R){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(R):Editor.mathJaxQueue.push(R)};
-Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var Q=Editor.prototype.init;Editor.prototype.init=function(){Q.apply(this,arguments);var R=mxUtils.bind(this,function(ca,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,R);this.graph.addListener(mxEvent.REFRESH,R)};H=document.getElementsByTagName("script");if(null!=H&&0<H.length){var X=
-document.createElement("script");X.setAttribute("type","text/javascript");X.setAttribute("src",u);H[0].parentNode.appendChild(X)}}};Editor.prototype.csvToArray=function(u){if(!/^\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*(?:,\s*(?:'[^'\\]*(?:\\[\S\s][^'\\]*)*'|"[^"\\]*(?:\\[\S\s][^"\\]*)*"|[^,'"\s\\]*(?:\s+[^,'"\s\\]+)*)\s*)*$/.test(u))return null;var H=[];u.replace(/(?!\s*$)\s*(?:'([^'\\]*(?:\\[\S\s][^'\\]*)*)'|"([^"\\]*(?:\\[\S\s][^"\\]*)*)"|([^,'"\s\\]*(?:\s+[^,'"\s\\]+)*))\s*(?:,|$)/g,
-function(Q,X,R,ca){void 0!==X?H.push(X.replace(/\\'/g,"'")):void 0!==R?H.push(R.replace(/\\"/g,'"')):void 0!==ca&&H.push(ca);return""});/,\s*$/.test(u)&&H.push("");return H};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||
-"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var H=u.convert,Q=this;u.convert=function(X){if(null!=X){var R="http://"==X.substring(0,7)||"https://"==X.substring(0,8);R&&!navigator.onLine?X=Editor.svgBrokenImage.src:!R||X.substring(0,u.baseUrl.length)==u.baseUrl||Q.crossOriginImages&&Q.isCorsEnabledForUrl(X)?
-"chrome-extension://"==X.substring(0,19)||mxClient.IS_CHROMEAPP||(X=H.apply(this,arguments)):X=PROXY_URL+"?url="+encodeURIComponent(X)}return X};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=function(u,H){try{var Q=!0,X=window.setTimeout(mxUtils.bind(this,function(){Q=!1;H(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(ca){window.clearTimeout(X);
-Q&&H(Editor.createSvgDataUri(ca.getText()))}),function(){window.clearTimeout(X);Q&&H(Editor.svgBrokenImage.src)});else{var R=new Image;this.crossOriginImages&&(R.crossOrigin="anonymous");R.onload=function(){window.clearTimeout(X);if(Q)try{var ca=document.createElement("canvas"),ea=ca.getContext("2d");ca.height=R.height;ca.width=R.width;ea.drawImage(R,0,0);H(ca.toDataURL())}catch(da){H(Editor.svgBrokenImage.src)}};R.onerror=function(){window.clearTimeout(X);Q&&H(Editor.svgBrokenImage.src)};R.src=u}}catch(ca){H(Editor.svgBrokenImage.src)}};
-Editor.prototype.convertImages=function(u,H,Q,X){null==X&&(X=this.createImageUrlConverter());var R=0,ca=Q||{};Q=mxUtils.bind(this,function(ea,da){ea=u.getElementsByTagName(ea);for(var qa=0;qa<ea.length;qa++)mxUtils.bind(this,function(va){try{if(null!=va){var ua=X.convert(va.getAttribute(da));if(null!=ua&&"data:"!=ua.substring(0,5)){var Aa=ca[ua];null==Aa?(R++,this.convertImageToDataUri(ua,function(za){null!=za&&(ca[ua]=za,va.setAttribute(da,za));R--;0==R&&H(u)})):va.setAttribute(da,Aa)}else null!=
-ua&&va.setAttribute(da,ua)}}catch(za){}})(ea[qa])});Q("image","xlink:href");Q("img","src");0==R&&H(u)};Editor.base64Encode=function(u){for(var H="",Q=0,X=u.length,R,ca,ea;Q<X;){R=u.charCodeAt(Q++)&255;if(Q==X){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4);H+="==";break}ca=u.charCodeAt(Q++);if(Q==X){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>
-2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ca&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2);H+="=";break}ea=u.charCodeAt(Q++);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(R>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((R&3)<<4|(ca&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((ca&15)<<2|(ea&192)>>
-6);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return H};Editor.prototype.loadUrl=function(u,H,Q,X,R,ca,ea,da){try{var qa=!ea&&(X||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));R=null!=R?R:!0;var va=mxUtils.bind(this,function(){mxUtils.get(u,mxUtils.bind(this,function(ua){if(200<=ua.getStatus()&&299>=ua.getStatus()){if(null!=H){var Aa=ua.getText();if(qa){if((9==document.documentMode||10==document.documentMode)&&
-"undefined"!==typeof window.mxUtilsBinaryToArray){ua=mxUtilsBinaryToArray(ua.request.responseBody).toArray();Aa=Array(ua.length);for(var za=0;za<ua.length;za++)Aa[za]=String.fromCharCode(ua[za]);Aa=Aa.join("")}ca=null!=ca?ca:"data:image/png;base64,";Aa=ca+Editor.base64Encode(Aa)}H(Aa)}}else null!=Q&&(0==ua.getStatus()?Q({message:mxResources.get("accessDenied")},ua):404==ua.getStatus()?Q({code:ua.getStatus()},ua):Q({message:mxResources.get("error")+" "+ua.getStatus()},ua))}),function(ua){null!=Q&&
-Q({message:mxResources.get("error")+" "+ua.getStatus()})},qa,this.timeout,function(){R&&null!=Q&&Q({code:App.ERROR_TIMEOUT,retry:va})},da)});va()}catch(ua){null!=Q&&Q(ua)}};Editor.prototype.absoluteCssFonts=function(u){var H=null;if(null!=u){var Q=u.split("url(");if(0<Q.length){H=[Q[0]];u=window.location.pathname;var X=null!=u?u.lastIndexOf("/"):-1;0<=X&&(u=u.substring(0,X+1));X=document.getElementsByTagName("base");var R=null;null!=X&&0<X.length&&(R=X[0].getAttribute("href"));for(var ca=1;ca<Q.length;ca++)if(X=
-Q[ca].indexOf(")"),0<X){var ea=Editor.trimCssUrl(Q[ca].substring(0,X));this.graph.isRelativeUrl(ea)&&(ea=null!=R?R+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":u)+ea);H.push('url("'+ea+'"'+Q[ca].substring(X))}else H.push(Q[ca])}else H=[u]}return null!=H?H.join(""):null};Editor.prototype.mapFontUrl=function(u,H,Q){/^https?:\/\//.test(H)&&!this.isCorsEnabledForUrl(H)&&(H=PROXY_URL+"?url="+encodeURIComponent(H));Q(u,H)};Editor.prototype.embedCssFonts=function(u,H){var Q=
-u.split("url("),X=0;null==this.cachedFonts&&(this.cachedFonts={});var R=mxUtils.bind(this,function(){if(0==X){for(var qa=[Q[0]],va=1;va<Q.length;va++){var ua=Q[va].indexOf(")");qa.push('url("');qa.push(this.cachedFonts[Editor.trimCssUrl(Q[va].substring(0,ua))]);qa.push('"'+Q[va].substring(ua))}H(qa.join(""))}});if(0<Q.length){for(u=1;u<Q.length;u++){var ca=Q[u].indexOf(")"),ea=null,da=Q[u].indexOf("format(",ca);0<da&&(ea=Editor.trimCssUrl(Q[u].substring(da+7,Q[u].indexOf(")",da))));mxUtils.bind(this,
-function(qa){if(null==this.cachedFonts[qa]){this.cachedFonts[qa]=qa;X++;var va="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(qa))va="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(qa))va="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(qa))va="application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(qa))va="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(qa))va="application/vnd.ms-fontobject";else if("sfnt"==
-ea||/(\.sfnt)($|\?)/i.test(qa))va="application/font-sfnt";this.mapFontUrl(va,qa,mxUtils.bind(this,function(ua,Aa){this.loadUrl(Aa,mxUtils.bind(this,function(za){this.cachedFonts[qa]=za;X--;R()}),mxUtils.bind(this,function(za){X--;R()}),!0,null,"data:"+ua+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(Q[u].substring(0,ca)),ea)}R()}else H(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(H){this.resolvedFontCss=
-H;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},H;for(H in Graph.fontMapping)Graph.isCssFontUrl(H)&&(u[H]=Graph.fontMapping[H]);return u};Editor.prototype.embedExtFonts=function(u){var H=this.graph.getCustomFonts();if(0<H.length){var Q=[],X=0;null==this.cachedGoogleFonts&&(this.cachedGoogleFonts=this.createGoogleFontCache());for(var R=mxUtils.bind(this,function(){0==X&&this.embedCssFonts(Q.join(""),u)}),ca=0;ca<H.length;ca++)mxUtils.bind(this,function(ea,
-da){Graph.isCssFontUrl(da)?null==this.cachedGoogleFonts[da]?(X++,this.loadUrl(da,mxUtils.bind(this,function(qa){this.cachedGoogleFonts[da]=qa;Q.push(qa+"\n");X--;R()}),mxUtils.bind(this,function(qa){X--;Q.push("@import url("+da+");\n");R()}))):Q.push(this.cachedGoogleFonts[da]+"\n"):Q.push('@font-face {font-family: "'+ea+'";src: url("'+da+'")}\n')})(H[ca].name,H[ca].url);R()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var H=document.getElementsByTagName("style"),
-Q=0;Q<H.length;Q++){var X=mxUtils.getTextContent(H[Q]);0>X.indexOf("mxPageSelector")&&0<X.indexOf("MathJax")&&u[0].appendChild(H[Q].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,H){H=null!=H?H:this.absoluteCssFonts(this.fontCss);if(null!=H){var Q=u.getElementsByTagName("defs"),X=u.ownerDocument;0==Q.length?(Q=null!=X.createElementNS?X.createElementNS(mxConstants.NS_SVG,"defs"):X.createElement("defs"),null!=u.firstChild?u.insertBefore(Q,u.firstChild):u.appendChild(Q)):Q=Q[0];u=null!=X.createElementNS?
-X.createElementNS(mxConstants.NS_SVG,"style"):X.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,H);Q.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(u,H,Q){var X=mxClient.IS_FF?8192:16384;return Math.min(Q,Math.min(X/u,X/H))};Editor.prototype.exportToCanvas=function(u,H,Q,X,R,ca,ea,da,qa,va,ua,Aa,za,Ca,sa,Va,Ua,Ra){try{ca=null!=ca?ca:!0;ea=null!=ea?ea:
-!0;Aa=null!=Aa?Aa:this.graph;za=null!=za?za:0;var Za=qa?null:Aa.background;Za==mxConstants.NONE&&(Za=null);null==Za&&(Za=X);null==Za&&0==qa&&(Za=Va?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Aa.getSvg(null,null,za,Ca,null,ea,null,null,null,va,null,Va,Ua,Ra),mxUtils.bind(this,function(Ha){try{var db=new Image;db.onload=mxUtils.bind(this,function(){try{var y=function(){mxClient.IS_SF?window.setTimeout(function(){V.drawImage(db,0,0);u(K,Ha)},0):(V.drawImage(db,0,0),u(K,Ha))},
-K=document.createElement("canvas"),L=parseInt(Ha.getAttribute("width")),S=parseInt(Ha.getAttribute("height"));da=null!=da?da:1;null!=H&&(da=ca?Math.min(1,Math.min(3*H/(4*S),H/L)):H/L);da=this.getMaxCanvasScale(L,S,da);L=Math.ceil(da*L);S=Math.ceil(da*S);K.setAttribute("width",L);K.setAttribute("height",S);var V=K.getContext("2d");null!=Za&&(V.beginPath(),V.rect(0,0,L,S),V.fillStyle=Za,V.fill());1!=da&&V.scale(da,da);if(sa){var ja=Aa.view,na=ja.scale;ja.scale=1;var ya=btoa(unescape(encodeURIComponent(ja.createSvgGrid(ja.gridColor))));
-ja.scale=na;ya="data:image/svg+xml;base64,"+ya;var ra=Aa.gridSize*ja.gridSteps*da,ta=Aa.getGraphBounds(),Da=ja.translate.x*na,Oa=ja.translate.y*na,Ma=Da+(ta.x-Da)/na-za,Wa=Oa+(ta.y-Oa)/na-za,Sa=new Image;Sa.onload=function(){try{for(var Fa=-Math.round(ra-mxUtils.mod((Da-Ma)*da,ra)),Ja=-Math.round(ra-mxUtils.mod((Oa-Wa)*da,ra));Fa<L;Fa+=ra)for(var xa=Ja;xa<S;xa+=ra)V.drawImage(Sa,Fa/da,xa/da);y()}catch(Ba){null!=R&&R(Ba)}};Sa.onerror=function(Fa){null!=R&&R(Fa)};Sa.src=ya}else y()}catch(Fa){null!=
-R&&R(Fa)}});db.onerror=function(y){null!=R&&R(y)};va&&this.graph.addSvgShadow(Ha);this.graph.mathEnabled&&this.addMathCss(Ha);var cb=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ha,this.resolvedFontCss),db.src=Editor.createSvgDataUri(mxUtils.getXml(Ha))}catch(y){null!=R&&R(y)}});this.embedExtFonts(mxUtils.bind(this,function(y){try{null!=y&&this.addFontCss(Ha,y),this.loadFonts(cb)}catch(K){null!=R&&R(K)}}))}catch(y){null!=R&&R(y)}}),Q,ua)}catch(Ha){null!=R&&R(Ha)}};
-Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,H,Q,X){for(var R=0;R<X;R++)u=Editor.crcTable[(u^H.charCodeAt(Q+R))&255]^u>>>8;return u};Editor.crc32=function(u){for(var H=-1,Q=0;Q<u.length;Q++)H=H>>>8^Editor.crcTable[(H^u.charCodeAt(Q))&255];return(H^-1)>>>0};Editor.writeGraphModelToPng=function(u,H,Q,X,R){function ca(ua,Aa){var za=qa;qa+=Aa;return ua.substring(za,qa)}function ea(ua){ua=ca(ua,4);return ua.charCodeAt(3)+
-(ua.charCodeAt(2)<<8)+(ua.charCodeAt(1)<<16)+(ua.charCodeAt(0)<<24)}function da(ua){return String.fromCharCode(ua>>24&255,ua>>16&255,ua>>8&255,ua&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var qa=0;if(ca(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=R&&R();else if(ca(u,4),"IHDR"!=ca(u,4))null!=R&&R();else{ca(u,17);R=u.substring(0,qa);do{var va=ea(u);if("IDAT"==ca(u,4)){R=u.substring(0,qa-8);"pHYs"==H&&"dpi"==Q?(Q=Math.round(X/.0254),
-Q=da(Q)+da(Q)+String.fromCharCode(1)):Q=Q+String.fromCharCode(0)+("zTXt"==H?String.fromCharCode(0):"")+X;X=4294967295;X=Editor.updateCRC(X,H,0,4);X=Editor.updateCRC(X,Q,0,Q.length);R+=da(Q.length)+H+Q+da(X^4294967295);R+=u.substring(qa-8,u.length);break}R+=u.substring(qa-8,qa-4+va);ca(u,va);ca(u,4)}while(va);return"data:image/png;base64,"+(window.btoa?btoa(R):Base64.encode(R,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;
-ColorDialog.addRecentColor=function(u,H){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,H){var Q=null;null!=u.editor.graph.getModel().getParent(H)?Q=H.getId():null!=u.currentPage&&(Q=u.currentPage.getId());return Q});
-if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var m=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||"1"==urlParams.embed||this.editorUi.editor.chromeless?m.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=this.editorUi.getCurrentFile();return"1"==urlParams.embed||
-null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var H=this.editorUi,Q=H.editor.graph,X=this.createOption(mxResources.get("shadow"),function(){return Q.shadowVisible},function(R){var ca=new ChangePageSetup(H);ca.ignoreColor=!0;ca.ignoreImage=!0;ca.shadowVisible=
-R;Q.model.execute(ca)},{install:function(R){this.listener=function(){R(Q.shadowVisible)};H.addListener("shadowVisibleChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});Editor.enableShadowOption||(X.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),mxUtils.setOpacity(X,60));u.appendChild(X)}return u};var z=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=z.apply(this,arguments);var H=this.editorUi,Q=H.editor.graph;
-if(Q.isEnabled()){var X=H.getCurrentFile();if(null!=X&&X.isAutosaveOptional()){var R=this.createOption(mxResources.get("autosave"),function(){return H.editor.autosave},function(ea){H.editor.setAutosave(ea);H.editor.autosave&&X.isModified()&&X.fileChanged()},{install:function(ea){this.listener=function(){ea(H.editor.autosave)};H.editor.addListener("autosaveChanged",this.listener)},destroy:function(){H.editor.removeListener(this.listener)}});u.appendChild(R)}}if(this.isMathOptionVisible()&&Q.isEnabled()&&
-"undefined"!==typeof MathJax){R=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return Q.mathEnabled},function(ea){H.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(Q.mathEnabled)};H.addListener("mathEnabledChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});R.style.paddingTop="5px";u.appendChild(R);var ca=H.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");ca.style.position=
-"relative";ca.style.marginLeft="6px";ca.style.top="2px";R.appendChild(ca)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=
-[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",
-dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",
-type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",
-type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},
-{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",
-min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},
-{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",
-type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
-mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},
-{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},
-{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=
-[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=
-[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=
-[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,
-min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",
-stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",
-font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",
-stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},
-{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=function(u,H,Q){if(null!=H){var X=function(ca){if(null!=ca)if(Q)for(var ea=0;ea<ca.length;ea++)H[ca[ea].name]=ca[ea];else for(var da in H){var qa=!1;for(ea=0;ea<ca.length;ea++)if(ca[ea].name==da&&ca[ea].type==H[da].type){qa=!0;break}qa||
-delete H[da]}},R=this.editorUi.editor.graph.view.getState(u);null!=R&&null!=R.shape&&(R.shape.commonCustomPropAdded||(R.shape.commonCustomPropAdded=!0,R.shape.customProperties=R.shape.customProperties||[],R.cell.vertex?Array.prototype.push.apply(R.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(R.shape.customProperties,Editor.commonEdgeProperties)),X(R.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{X(JSON.parse(u))}catch(ca){}}};var F=
-StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var H={},Q=u.vertices,X=u.edges,R=0;R<Q.length;R++)this.findCommonProperties(Q[R],H,0==R);for(R=0;R<X.length;R++)this.findCommonProperties(X[R],H,0==Q.length&&0==R);null!=Object.getOwnPropertyNames&&0<
-Object.getOwnPropertyNames(H).length&&this.container.appendChild(this.addProperties(this.createPanel(),H,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=!0;StyleFormatPanel.prototype.addProperties=function(u,H,Q){function X(V,ja,na,ya){Aa.getModel().beginUpdate();try{var ra=[],ta=[];if(null!=na.index){for(var Da=[],Oa=na.parentRow.nextSibling;Oa&&
-Oa.getAttribute("data-pName")==V;)Da.push(Oa.getAttribute("data-pValue")),Oa=Oa.nextSibling;na.index<Da.length?null!=ya?Da.splice(ya,1):Da[na.index]=ja:Da.push(ja);null!=na.size&&Da.length>na.size&&(Da=Da.slice(0,na.size));ja=Da.join(",");null!=na.countProperty&&(Aa.setCellStyles(na.countProperty,Da.length,Aa.getSelectionCells()),ra.push(na.countProperty),ta.push(Da.length))}Aa.setCellStyles(V,ja,Aa.getSelectionCells());ra.push(V);ta.push(ja);if(null!=na.dependentProps)for(V=0;V<na.dependentProps.length;V++){var Ma=
-na.dependentPropsDefVal[V],Wa=na.dependentPropsVals[V];if(Wa.length>ja)Wa=Wa.slice(0,ja);else for(var Sa=Wa.length;Sa<ja;Sa++)Wa.push(Ma);Wa=Wa.join(",");Aa.setCellStyles(na.dependentProps[V],Wa,Aa.getSelectionCells());ra.push(na.dependentProps[V]);ta.push(Wa)}if("function"==typeof na.onChange)na.onChange(Aa,ja);ua.editorUi.fireEvent(new mxEventObject("styleChanged","keys",ra,"values",ta,"cells",Aa.getSelectionCells()))}finally{Aa.getModel().endUpdate()}}function R(V,ja,na){var ya=mxUtils.getOffset(u,
-!0),ra=mxUtils.getOffset(V,!0);ja.style.position="absolute";ja.style.left=ra.x-ya.x+"px";ja.style.top=ra.y-ya.y+"px";ja.style.width=V.offsetWidth+"px";ja.style.height=V.offsetHeight-(na?4:0)+"px";ja.style.zIndex=5}function ca(V,ja,na){var ya=document.createElement("div");ya.style.width="32px";ya.style.height="4px";ya.style.margin="2px";ya.style.border="1px solid black";ya.style.background=ja&&"none"!=ja?ja:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(ua,function(ra){this.editorUi.pickColor(ja,
-function(ta){ya.style.background="none"==ta?"url('"+Dialog.prototype.noColorImage+"')":ta;X(V,ta,na)});mxEvent.consume(ra)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(ya);return btn}function ea(V,ja,na,ya,ra,ta,Da){null!=ja&&(ja=ja.split(","),za.push({name:V,values:ja,type:na,defVal:ya,countProperty:ra,parentRow:ta,isDeletable:!0,flipBkg:Da}));btn=mxUtils.button("+",mxUtils.bind(ua,function(Oa){for(var Ma=ta,Wa=0;null!=Ma.nextSibling;)if(Ma.nextSibling.getAttribute("data-pName")==
-V)Ma=Ma.nextSibling,Wa++;else break;var Sa={type:na,parentRow:ta,index:Wa,isDeletable:!0,defVal:ya,countProperty:ra};Wa=va(V,"",Sa,0==Wa%2,Da);X(V,ya,Sa);Ma.parentNode.insertBefore(Wa,Ma.nextSibling);mxEvent.consume(Oa)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function da(V,ja,na,ya,ra,ta,Da){if(0<ra){var Oa=Array(ra);ja=null!=ja?ja.split(","):[];for(var Ma=0;Ma<ra;Ma++)Oa[Ma]=null!=ja[Ma]?ja[Ma]:null!=ya?ya:"";za.push({name:V,values:Oa,type:na,defVal:ya,
-parentRow:ta,flipBkg:Da,size:ra})}return document.createElement("div")}function qa(V,ja,na){var ya=document.createElement("input");ya.type="checkbox";ya.checked="1"==ja;mxEvent.addListener(ya,"change",function(){X(V,ya.checked?"1":"0",na)});return ya}function va(V,ja,na,ya,ra){var ta=na.dispName,Da=na.type,Oa=document.createElement("tr");Oa.className="gePropRow"+(ra?"Dark":"")+(ya?"Alt":"")+" gePropNonHeaderRow";Oa.setAttribute("data-pName",V);Oa.setAttribute("data-pValue",ja);ya=!1;null!=na.index&&
-(Oa.setAttribute("data-index",na.index),ta=(null!=ta?ta:"")+"["+na.index+"]",ya=!0);var Ma=document.createElement("td");Ma.className="gePropRowCell";ta=mxResources.get(ta,null,ta);mxUtils.write(Ma,ta);Ma.setAttribute("title",ta);ya&&(Ma.style.textAlign="right");Oa.appendChild(Ma);Ma=document.createElement("td");Ma.className="gePropRowCell";if("color"==Da)Ma.appendChild(ca(V,ja,na));else if("bool"==Da||"boolean"==Da)Ma.appendChild(qa(V,ja,na));else if("enum"==Da){var Wa=na.enumList;for(ra=0;ra<Wa.length;ra++)if(ta=
-Wa[ra],ta.val==ja){mxUtils.write(Ma,mxResources.get(ta.dispName,null,ta.dispName));break}mxEvent.addListener(Ma,"click",mxUtils.bind(ua,function(){var Sa=document.createElement("select");R(Ma,Sa);for(var Fa=0;Fa<Wa.length;Fa++){var Ja=Wa[Fa],xa=document.createElement("option");xa.value=mxUtils.htmlEntities(Ja.val);mxUtils.write(xa,mxResources.get(Ja.dispName,null,Ja.dispName));Sa.appendChild(xa)}Sa.value=ja;u.appendChild(Sa);mxEvent.addListener(Sa,"change",function(){var Ba=mxUtils.htmlEntities(Sa.value);
-X(V,Ba,na)});Sa.focus();mxEvent.addListener(Sa,"blur",function(){u.removeChild(Sa)})}))}else"dynamicArr"==Da?Ma.appendChild(ea(V,ja,na.subType,na.subDefVal,na.countProperty,Oa,ra)):"staticArr"==Da?Ma.appendChild(da(V,ja,na.subType,na.subDefVal,na.size,Oa,ra)):"readOnly"==Da?(ra=document.createElement("input"),ra.setAttribute("readonly",""),ra.value=ja,ra.style.width="96px",ra.style.borderWidth="0px",Ma.appendChild(ra)):(Ma.innerHTML=mxUtils.htmlEntities(decodeURIComponent(ja)),mxEvent.addListener(Ma,
-"click",mxUtils.bind(ua,function(){function Sa(){var Ja=Fa.value;Ja=0==Ja.length&&"string"!=Da?0:Ja;na.allowAuto&&(null!=Ja.trim&&"auto"==Ja.trim().toLowerCase()?(Ja="auto",Da="string"):(Ja=parseFloat(Ja),Ja=isNaN(Ja)?0:Ja));null!=na.min&&Ja<na.min?Ja=na.min:null!=na.max&&Ja>na.max&&(Ja=na.max);Ja=encodeURIComponent(("int"==Da?parseInt(Ja):Ja)+"");X(V,Ja,na)}var Fa=document.createElement("input");R(Ma,Fa,!0);Fa.value=decodeURIComponent(ja);Fa.className="gePropEditor";"int"!=Da&&"float"!=Da||na.allowAuto||
-(Fa.type="number",Fa.step="int"==Da?"1":"any",null!=na.min&&(Fa.min=parseFloat(na.min)),null!=na.max&&(Fa.max=parseFloat(na.max)));u.appendChild(Fa);mxEvent.addListener(Fa,"keypress",function(Ja){13==Ja.keyCode&&Sa()});Fa.focus();mxEvent.addListener(Fa,"blur",function(){Sa()})})));na.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(ua,function(Sa){X(V,"",na,na.index);mxEvent.consume(Sa)})),ra.style.height="16px",ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",Ma.appendChild(ra));
-Oa.appendChild(Ma);return Oa}var ua=this,Aa=this.editorUi.editor.graph,za=[];u.style.position="relative";u.style.padding="0";var Ca=document.createElement("table");Ca.className="geProperties";Ca.style.whiteSpace="nowrap";Ca.style.width="100%";var sa=document.createElement("tr");sa.className="gePropHeader";var Va=document.createElement("th");Va.className="gePropHeaderCell";var Ua=document.createElement("img");Ua.src=Sidebar.prototype.expandedImage;Ua.style.verticalAlign="middle";Va.appendChild(Ua);
-mxUtils.write(Va,mxResources.get("property"));sa.style.cursor="pointer";var Ra=function(){var V=Ca.querySelectorAll(".gePropNonHeaderRow");if(ua.editorUi.propertiesCollapsed){Ua.src=Sidebar.prototype.collapsedImage;var ja="none";for(var na=u.childNodes.length-1;0<=na;na--)try{var ya=u.childNodes[na],ra=ya.nodeName.toUpperCase();"INPUT"!=ra&&"SELECT"!=ra||u.removeChild(ya)}catch(ta){}}else Ua.src=Sidebar.prototype.expandedImage,ja="";for(na=0;na<V.length;na++)V[na].style.display=ja};mxEvent.addListener(sa,
-"click",function(){ua.editorUi.propertiesCollapsed=!ua.editorUi.propertiesCollapsed;Ra()});sa.appendChild(Va);Va=document.createElement("th");Va.className="gePropHeaderCell";Va.innerHTML=mxResources.get("value");sa.appendChild(Va);Ca.appendChild(sa);var Za=!1,Ha=!1;sa=null;1==Q.vertices.length&&0==Q.edges.length?sa=Q.vertices[0].id:0==Q.vertices.length&&1==Q.edges.length&&(sa=Q.edges[0].id);null!=sa&&Ca.appendChild(va("id",mxUtils.htmlEntities(sa),{dispName:"ID",type:"readOnly"},!0,!1));for(var db in H)if(sa=
-H[db],"function"!=typeof sa.isVisible||sa.isVisible(Q,this)){var cb=null!=Q.style[db]?mxUtils.htmlEntities(Q.style[db]+""):null!=sa.getDefaultValue?sa.getDefaultValue(Q,this):sa.defVal;if("separator"==sa.type)Ha=!Ha;else{if("staticArr"==sa.type)sa.size=parseInt(Q.style[sa.sizeProperty]||H[sa.sizeProperty].defVal)||0;else if(null!=sa.dependentProps){var y=sa.dependentProps,K=[],L=[];for(Va=0;Va<y.length;Va++){var S=Q.style[y[Va]];L.push(H[y[Va]].subDefVal);K.push(null!=S?S.split(","):[])}sa.dependentPropsDefVal=
-L;sa.dependentPropsVals=K}Ca.appendChild(va(db,cb,sa,Za,Ha));Za=!Za}}for(Va=0;Va<za.length;Va++)for(sa=za[Va],H=sa.parentRow,Q=0;Q<sa.values.length;Q++)db=va(sa.name,sa.values[Q],{type:sa.type,parentRow:sa.parentRow,isDeletable:sa.isDeletable,index:Q,defVal:sa.defVal,countProperty:sa.countProperty,size:sa.size},0==Q%2,sa.flipBkg),H.parentNode.insertBefore(db,H.nextSibling),H=db;u.appendChild(Ca);Ra();return u};StyleFormatPanel.prototype.addStyles=function(u){function H(sa){mxEvent.addListener(sa,
-"mouseenter",function(){sa.style.opacity="1"});mxEvent.addListener(sa,"mouseleave",function(){sa.style.opacity="0.5"})}var Q=this.editorUi,X=Q.editor.graph,R=document.createElement("div");R.style.whiteSpace="nowrap";R.style.paddingLeft="24px";R.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom="6px";u.style.position="relative";u.appendChild(R);var ca="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),
-ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var da=[],qa=0;qa<this.defaultColorSchemes.length;qa++){var va=document.createElement("div");va.style.display="inline-block";va.style.width="6px";va.style.height="6px";va.style.marginLeft="4px";va.style.marginRight="3px";va.style.borderRadius="3px";va.style.cursor="pointer";va.style.background="transparent";va.style.border="1px solid #b5b6b7";mxUtils.bind(this,
-function(sa){mxEvent.addListener(va,"click",mxUtils.bind(this,function(){ua(sa)}))})(qa);da.push(va);ea.appendChild(va)}var ua=mxUtils.bind(this,function(sa){null!=da[sa]&&(null!=this.format.currentScheme&&null!=da[this.format.currentScheme]&&(da[this.format.currentScheme].style.background="transparent"),this.format.currentScheme=sa,Aa(this.defaultColorSchemes[this.format.currentScheme]),da[this.format.currentScheme].style.background="#84d7ff")}),Aa=mxUtils.bind(this,function(sa){var Va=mxUtils.bind(this,
-function(Ra){var Za=mxUtils.button("",mxUtils.bind(this,function(cb){X.getModel().beginUpdate();try{for(var y=Q.getSelectionState().cells,K=0;K<y.length;K++){for(var L=X.getModel().getStyle(y[K]),S=0;S<ca.length;S++)L=mxUtils.removeStylename(L,ca[S]);var V=X.getModel().isVertex(y[K])?X.defaultVertexStyle:X.defaultEdgeStyle;null!=Ra?(mxEvent.isShiftDown(cb)||(L=""==Ra.fill?mxUtils.setStyle(L,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(L,mxConstants.STYLE_FILLCOLOR,Ra.fill||mxUtils.getValue(V,
-mxConstants.STYLE_FILLCOLOR,null)),L=mxUtils.setStyle(L,mxConstants.STYLE_GRADIENTCOLOR,Ra.gradient||mxUtils.getValue(V,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown(cb)||mxClient.IS_MAC&&mxEvent.isMetaDown(cb)||!X.getModel().isVertex(y[K])||(L=mxUtils.setStyle(L,mxConstants.STYLE_FONTCOLOR,Ra.font||mxUtils.getValue(V,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown(cb)||(L=""==Ra.stroke?mxUtils.setStyle(L,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(L,mxConstants.STYLE_STROKECOLOR,
-Ra.stroke||mxUtils.getValue(V,mxConstants.STYLE_STROKECOLOR,null)))):(L=mxUtils.setStyle(L,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(V,mxConstants.STYLE_FILLCOLOR,"#ffffff")),L=mxUtils.setStyle(L,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(V,mxConstants.STYLE_STROKECOLOR,"#000000")),L=mxUtils.setStyle(L,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(V,mxConstants.STYLE_GRADIENTCOLOR,null)),X.getModel().isVertex(y[K])&&(L=mxUtils.setStyle(L,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(V,mxConstants.STYLE_FONTCOLOR,
-null))));X.getModel().setStyle(y[K],L)}}finally{X.getModel().endUpdate()}}));Za.className="geStyleButton";Za.style.width="36px";Za.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Za.style.margin="0px 6px 6px 0px";if(null!=Ra){var Ha="1"==urlParams.sketch?"2px solid":"1px solid";null!=Ra.gradient?mxClient.IS_IE&&10>document.documentMode?Za.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Ra.fill+"', EndColorStr='"+Ra.gradient+"', GradientType=0)":Za.style.backgroundImage=
-"linear-gradient("+Ra.fill+" 0px,"+Ra.gradient+" 100%)":Ra.fill==mxConstants.NONE?Za.style.background="url('"+Dialog.prototype.noColorImage+"')":Za.style.backgroundColor=""==Ra.fill?mxUtils.getValue(X.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):Ra.fill||mxUtils.getValue(X.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Za.style.border=Ra.stroke==mxConstants.NONE?Ha+" transparent":""==Ra.stroke?Ha+" "+
-mxUtils.getValue(X.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ha+" "+(Ra.stroke||mxUtils.getValue(X.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Ra.title&&Za.setAttribute("title",Ra.title)}else{Ha=mxUtils.getValue(X.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var db=mxUtils.getValue(X.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Za.style.backgroundColor=Ha;
-Za.style.border="1px solid "+db}Za.style.borderRadius="0";R.appendChild(Za)});R.innerText="";for(var Ua=0;Ua<sa.length;Ua++)0<Ua&&0==mxUtils.mod(Ua,4)&&mxUtils.br(R),Va(sa[Ua])});null==this.format.currentScheme?ua(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):ua(this.format.currentScheme);qa=10>=this.defaultColorSchemes.length?28:8;var za=document.createElement("div");za.style.cssText="position:absolute;left:10px;top:8px;bottom:"+qa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
-mxEvent.addListener(za,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Ca=document.createElement("div");Ca.style.cssText="position:absolute;left:202px;top:8px;bottom:"+qa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
-1<this.defaultColorSchemes.length&&(u.appendChild(za),u.appendChild(Ca));mxEvent.addListener(Ca,"click",mxUtils.bind(this,function(){ua(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));H(za);H(Ca);Aa(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(ea);return u};StyleFormatPanel.prototype.addEditOps=function(u){var H=this.editorUi.getSelectionState(),Q=this.editorUi.editor.graph,X=null;1==H.cells.length&&(X=mxUtils.button(mxResources.get("editStyle"),
-mxUtils.bind(this,function(R){this.editorUi.actions.get("editStyle").funct()})),X.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),X.style.width="210px",X.style.marginBottom="2px",u.appendChild(X));Q=1==H.cells.length?Q.view.getState(H.cells[0]):null;null!=Q&&null!=Q.shape&&null!=Q.shape.stencil?(H=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(R){this.editorUi.actions.get("editShape").funct()})),H.setAttribute("title",
-mxResources.get("editShape")),H.style.marginBottom="2px",null==X?H.style.width="210px":(X.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),u.appendChild(H)):H.image&&0<H.cells.length&&(H=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(R){this.editorUi.actions.get("image").funct()})),H.setAttribute("title",mxResources.get("editImage")),H.style.marginBottom="2px",null==X?H.style.width="210px":(X.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),
+" ("+H+")");if("mxGraphModel"==u.nodeName){H=u.getAttribute("style")||"default-style2";if("1"==urlParams.embed||null!=H&&""!=H)H!=this.graph.currentStyle&&(P=null!=this.graph.themes?this.graph.themes[H]:mxUtils.load(STYLE_PATH+"/"+H+".xml").getDocumentElement(),null!=P&&(V=new mxCodec(P.ownerDocument),V.decode(P,this.graph.getStylesheet())));else{var P=null!=this.graph.themes?this.graph.themes["default-old"]:mxUtils.load(STYLE_PATH+"/default-old.xml").getDocumentElement();if(null!=P){var V=new mxCodec(P.ownerDocument);
+V.decode(P,this.graph.getStylesheet())}}this.graph.currentStyle=H;this.graph.mathEnabled="1"==urlParams.math||"1"==u.getAttribute("math");H=u.getAttribute("backgroundImage");null!=H?this.graph.setBackgroundImage(this.graph.parseBackgroundImage(H)):this.graph.setBackgroundImage(null);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();this.graph.setShadowVisible("1"==u.getAttribute("shadow"),!1);if(H=u.getAttribute("extFonts"))try{for(H=
+H.split("|").map(function(Q){Q=Q.split("^");return{name:Q[0],url:Q[1]}}),P=0;P<H.length;P++)this.graph.addExtFont(H[P].name,H[P].url)}catch(Q){console.log("ExtFonts format error: "+Q.message)}else null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(this.graph.extFonts=[])}b.apply(this,arguments)}else throw{message:mxResources.get("notADiagramFile")||"Invalid data",toString:function(){return this.message}};};var e=Editor.prototype.getGraphXml;Editor.prototype.getGraphXml=function(u,H){u=null!=
+u?u:!0;var P=e.apply(this,arguments);null!=this.graph.currentStyle&&"default-style2"!=this.graph.currentStyle&&P.setAttribute("style",this.graph.currentStyle);var V=this.graph.getBackgroundImageObject(this.graph.backgroundImage,H);null!=V&&P.setAttribute("backgroundImage",JSON.stringify(V));P.setAttribute("math",this.graph.mathEnabled?"1":"0");P.setAttribute("shadow",this.graph.shadowVisible?"1":"0");null!=this.graph.extFonts&&0<this.graph.extFonts.length&&(V=this.graph.extFonts.map(function(Q){return Q.name+
+"^"+Q.url}),P.setAttribute("extFonts",V.join("|")));return P};Editor.prototype.isDataSvg=function(u){try{var H=mxUtils.parseXml(u).documentElement.getAttribute("content");if(null!=H&&(null!=H&&"<"!=H.charAt(0)&&"%"!=H.charAt(0)&&(H=unescape(window.atob?atob(H):Base64.decode(cont,H))),null!=H&&"%"==H.charAt(0)&&(H=decodeURIComponent(H)),null!=H&&0<H.length)){var P=mxUtils.parseXml(H).documentElement;return"mxfile"==P.nodeName||"mxGraphModel"==P.nodeName}}catch(V){}return!1};Editor.prototype.extractGraphModel=
+function(u,H,P){return Editor.extractGraphModel.apply(this,arguments)};var k=Editor.prototype.resetGraph;Editor.prototype.resetGraph=function(){this.graph.mathEnabled="1"==urlParams.math;this.graph.view.x0=null;this.graph.view.y0=null;this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform();k.apply(this,arguments)};var n=Editor.prototype.updateGraphComponents;Editor.prototype.updateGraphComponents=function(){n.apply(this,
+arguments);this.graph.useCssTransforms=!mxClient.NO_FO&&this.isChromelessView()&&this.graph.isCssTransformsSupported();this.graph.updateCssTransform()};Editor.initMath=function(u,H){if("undefined"===typeof window.MathJax&&!mxClient.IS_IE&&!mxClient.IS_IE11){u=null!=u?u:DRAW_MATH_URL+"/startup.js";Editor.mathJaxQueue=[];Editor.doMathJaxRender=function(Q){try{MathJax.typesetClear([Q]),MathJax.typeset([Q]),Editor.onMathJaxDone()}catch(da){MathJax.typesetClear([Q]),null!=da.retry?da.retry.then(function(){MathJax.typesetPromise([Q]).then(Editor.onMathJaxDone)}):
+null!=window.console&&console.log("Error in MathJax: "+da.toString())}};window.MathJax=null!=H?H:{options:{skipHtmlTags:{"[+]":["text"]}},loader:{load:["html"==urlParams["math-output"]?"output/chtml":"output/svg","input/tex","input/asciimath"]},startup:{pageReady:function(){for(var Q=0;Q<Editor.mathJaxQueue.length;Q++)Editor.doMathJaxRender(Editor.mathJaxQueue[Q])}}};Editor.MathJaxRender=function(Q){"undefined"!==typeof MathJax&&"function"===typeof MathJax.typeset?Editor.doMathJaxRender(Q):Editor.mathJaxQueue.push(Q)};
+Editor.MathJaxClear=function(){Editor.mathJaxQueue=[]};Editor.onMathJaxDone=function(){};var P=Editor.prototype.init;Editor.prototype.init=function(){P.apply(this,arguments);var Q=mxUtils.bind(this,function(da,ea){null!=this.graph.container&&this.graph.mathEnabled&&!this.graph.blockMathRender&&Editor.MathJaxRender(this.graph.container)});this.graph.model.addListener(mxEvent.CHANGE,Q);this.graph.addListener(mxEvent.REFRESH,Q)};H=document.getElementsByTagName("script");if(null!=H&&0<H.length){var V=
+document.createElement("script");V.setAttribute("type","text/javascript");V.setAttribute("src",u);H[0].parentNode.appendChild(V)}}};Editor.prototype.csvToArray=function(u){if(0<u.length){var H="",P=[""],V=0,Q=!0,da;u=$jscomp.makeIterator(u);for(da=u.next();!da.done;da=u.next())da=da.value,'"'===da?(Q&&da===H&&(P[V]+=da),Q=!Q):","===da&&Q?da=P[++V]="":P[V]+=da,H=da;return P}return[]};Editor.prototype.isCorsEnabledForUrl=function(u){if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||u.substring(0,window.location.origin.length)==
+window.location.origin)return!0;null!=urlParams.cors&&null==this.corsRegExp&&(this.corsRegExp=new RegExp(decodeURIComponent(urlParams.cors)));return null!=this.corsRegExp&&this.corsRegExp.test(u)||"https://raw.githubusercontent.com/"===u.substring(0,34)||"https://fonts.googleapis.com/"===u.substring(0,29)||"https://fonts.gstatic.com/"===u.substring(0,26)};Editor.prototype.createImageUrlConverter=function(){var u=new mxUrlConverter;u.updateBaseUrl();var H=u.convert,P=this;u.convert=function(V){if(null!=
+V){var Q="http://"==V.substring(0,7)||"https://"==V.substring(0,8);Q&&!navigator.onLine?V=Editor.svgBrokenImage.src:!Q||V.substring(0,u.baseUrl.length)==u.baseUrl||P.crossOriginImages&&P.isCorsEnabledForUrl(V)?"chrome-extension://"==V.substring(0,19)||mxClient.IS_CHROMEAPP||(V=H.apply(this,arguments)):V=PROXY_URL+"?url="+encodeURIComponent(V)}return V};return u};Editor.createSvgDataUri=function(u){return"data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(u)))};Editor.prototype.convertImageToDataUri=
+function(u,H){try{var P=!0,V=window.setTimeout(mxUtils.bind(this,function(){P=!1;H(Editor.svgBrokenImage.src)}),this.timeout);if(/(\.svg)$/i.test(u))mxUtils.get(u,mxUtils.bind(this,function(da){window.clearTimeout(V);P&&H(Editor.createSvgDataUri(da.getText()))}),function(){window.clearTimeout(V);P&&H(Editor.svgBrokenImage.src)});else{var Q=new Image;this.crossOriginImages&&(Q.crossOrigin="anonymous");Q.onload=function(){window.clearTimeout(V);if(P)try{var da=document.createElement("canvas"),ea=da.getContext("2d");
+da.height=Q.height;da.width=Q.width;ea.drawImage(Q,0,0);H(da.toDataURL())}catch(fa){H(Editor.svgBrokenImage.src)}};Q.onerror=function(){window.clearTimeout(V);P&&H(Editor.svgBrokenImage.src)};Q.src=u}}catch(da){H(Editor.svgBrokenImage.src)}};Editor.prototype.convertImages=function(u,H,P,V){null==V&&(V=this.createImageUrlConverter());var Q=0,da=P||{};P=mxUtils.bind(this,function(ea,fa){ea=u.getElementsByTagName(ea);for(var pa=0;pa<ea.length;pa++)mxUtils.bind(this,function(ua){try{if(null!=ua){var qa=
+V.convert(ua.getAttribute(fa));if(null!=qa&&"data:"!=qa.substring(0,5)){var Da=da[qa];null==Da?(Q++,this.convertImageToDataUri(qa,function(Aa){null!=Aa&&(da[qa]=Aa,ua.setAttribute(fa,Aa));Q--;0==Q&&H(u)})):ua.setAttribute(fa,Da)}else null!=qa&&ua.setAttribute(fa,qa)}}catch(Aa){}})(ea[pa])});P("image","xlink:href");P("img","src");0==Q&&H(u)};Editor.base64Encode=function(u){for(var H="",P=0,V=u.length,Q,da,ea;P<V;){Q=u.charCodeAt(P++)&255;if(P==V){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>
+2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&3)<<4);H+="==";break}da=u.charCodeAt(P++);if(P==V){H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&3)<<4|(da&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2);H+="=";break}ea=u.charCodeAt(P++);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(Q>>
+2);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((Q&3)<<4|(da&240)>>4);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((da&15)<<2|(ea&192)>>6);H+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(ea&63)}return H};Editor.prototype.loadUrl=function(u,H,P,V,Q,da,ea,fa){try{var pa=!ea&&(V||/(\.png)($|\?)/i.test(u)||/(\.jpe?g)($|\?)/i.test(u)||/(\.gif)($|\?)/i.test(u)||/(\.pdf)($|\?)/i.test(u));Q=null!=Q?Q:!0;var ua=mxUtils.bind(this,
+function(){mxUtils.get(u,mxUtils.bind(this,function(qa){if(200<=qa.getStatus()&&299>=qa.getStatus()){if(null!=H){var Da=qa.getText();if(pa){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){qa=mxUtilsBinaryToArray(qa.request.responseBody).toArray();Da=Array(qa.length);for(var Aa=0;Aa<qa.length;Aa++)Da[Aa]=String.fromCharCode(qa[Aa]);Da=Da.join("")}da=null!=da?da:"data:image/png;base64,";Da=da+Editor.base64Encode(Da)}H(Da)}}else null!=P&&(0==
+qa.getStatus()?P({message:mxResources.get("accessDenied")},qa):404==qa.getStatus()?P({code:qa.getStatus()},qa):P({message:mxResources.get("error")+" "+qa.getStatus()},qa))}),function(qa){null!=P&&P({message:mxResources.get("error")+" "+qa.getStatus()})},pa,this.timeout,function(){Q&&null!=P&&P({code:App.ERROR_TIMEOUT,retry:ua})},fa)});ua()}catch(qa){null!=P&&P(qa)}};Editor.prototype.absoluteCssFonts=function(u){var H=null;if(null!=u){var P=u.split("url(");if(0<P.length){H=[P[0]];u=window.location.pathname;
+var V=null!=u?u.lastIndexOf("/"):-1;0<=V&&(u=u.substring(0,V+1));V=document.getElementsByTagName("base");var Q=null;null!=V&&0<V.length&&(Q=V[0].getAttribute("href"));for(var da=1;da<P.length;da++)if(V=P[da].indexOf(")"),0<V){var ea=Editor.trimCssUrl(P[da].substring(0,V));this.graph.isRelativeUrl(ea)&&(ea=null!=Q?Q+ea:window.location.protocol+"//"+window.location.hostname+("/"==ea.charAt(0)?"":u)+ea);H.push('url("'+ea+'"'+P[da].substring(V))}else H.push(P[da])}else H=[u]}return null!=H?H.join(""):
+null};Editor.prototype.mapFontUrl=function(u,H,P){/^https?:\/\//.test(H)&&!this.isCorsEnabledForUrl(H)&&(H=PROXY_URL+"?url="+encodeURIComponent(H));P(u,H)};Editor.prototype.embedCssFonts=function(u,H){var P=u.split("url("),V=0;null==this.cachedFonts&&(this.cachedFonts={});var Q=mxUtils.bind(this,function(){if(0==V){for(var pa=[P[0]],ua=1;ua<P.length;ua++){var qa=P[ua].indexOf(")");pa.push('url("');pa.push(this.cachedFonts[Editor.trimCssUrl(P[ua].substring(0,qa))]);pa.push('"'+P[ua].substring(qa))}H(pa.join(""))}});
+if(0<P.length){for(u=1;u<P.length;u++){var da=P[u].indexOf(")"),ea=null,fa=P[u].indexOf("format(",da);0<fa&&(ea=Editor.trimCssUrl(P[u].substring(fa+7,P[u].indexOf(")",fa))));mxUtils.bind(this,function(pa){if(null==this.cachedFonts[pa]){this.cachedFonts[pa]=pa;V++;var ua="application/x-font-ttf";if("svg"==ea||/(\.svg)($|\?)/i.test(pa))ua="image/svg+xml";else if("otf"==ea||"embedded-opentype"==ea||/(\.otf)($|\?)/i.test(pa))ua="application/x-font-opentype";else if("woff"==ea||/(\.woff)($|\?)/i.test(pa))ua=
+"application/font-woff";else if("woff2"==ea||/(\.woff2)($|\?)/i.test(pa))ua="application/font-woff2";else if("eot"==ea||/(\.eot)($|\?)/i.test(pa))ua="application/vnd.ms-fontobject";else if("sfnt"==ea||/(\.sfnt)($|\?)/i.test(pa))ua="application/font-sfnt";this.mapFontUrl(ua,pa,mxUtils.bind(this,function(qa,Da){this.loadUrl(Da,mxUtils.bind(this,function(Aa){this.cachedFonts[pa]=Aa;V--;Q()}),mxUtils.bind(this,function(Aa){V--;Q()}),!0,null,"data:"+qa+";charset=utf-8;base64,")}))}})(Editor.trimCssUrl(P[u].substring(0,
+da)),ea)}Q()}else H(u)};Editor.prototype.loadFonts=function(u){null!=this.fontCss&&null==this.resolvedFontCss?this.embedCssFonts(this.fontCss,mxUtils.bind(this,function(H){this.resolvedFontCss=H;null!=u&&u()})):null!=u&&u()};Editor.prototype.createGoogleFontCache=function(){var u={},H;for(H in Graph.fontMapping)Graph.isCssFontUrl(H)&&(u[H]=Graph.fontMapping[H]);return u};Editor.prototype.embedExtFonts=function(u){var H=this.graph.getCustomFonts();if(0<H.length){var P=[],V=0;null==this.cachedGoogleFonts&&
+(this.cachedGoogleFonts=this.createGoogleFontCache());for(var Q=mxUtils.bind(this,function(){0==V&&this.embedCssFonts(P.join(""),u)}),da=0;da<H.length;da++)mxUtils.bind(this,function(ea,fa){Graph.isCssFontUrl(fa)?null==this.cachedGoogleFonts[fa]?(V++,this.loadUrl(fa,mxUtils.bind(this,function(pa){this.cachedGoogleFonts[fa]=pa;P.push(pa+"\n");V--;Q()}),mxUtils.bind(this,function(pa){V--;P.push("@import url("+fa+");\n");Q()}))):P.push(this.cachedGoogleFonts[fa]+"\n"):P.push('@font-face {font-family: "'+
+ea+'";src: url("'+fa+'")}\n')})(H[da].name,H[da].url);Q()}else u()};Editor.prototype.addMathCss=function(u){u=u.getElementsByTagName("defs");if(null!=u&&0<u.length)for(var H=document.getElementsByTagName("style"),P=0;P<H.length;P++){var V=mxUtils.getTextContent(H[P]);0>V.indexOf("mxPageSelector")&&0<V.indexOf("MathJax")&&u[0].appendChild(H[P].cloneNode(!0))}};Editor.prototype.addFontCss=function(u,H){H=null!=H?H:this.absoluteCssFonts(this.fontCss);if(null!=H){var P=u.getElementsByTagName("defs"),
+V=u.ownerDocument;0==P.length?(P=null!=V.createElementNS?V.createElementNS(mxConstants.NS_SVG,"defs"):V.createElement("defs"),null!=u.firstChild?u.insertBefore(P,u.firstChild):u.appendChild(P)):P=P[0];u=null!=V.createElementNS?V.createElementNS(mxConstants.NS_SVG,"style"):V.createElement("style");u.setAttribute("type","text/css");mxUtils.setTextContent(u,H);P.appendChild(u)}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=
+function(u,H,P){var V=mxClient.IS_FF?8192:16384;return Math.min(P,Math.min(V/u,V/H))};Editor.prototype.exportToCanvas=function(u,H,P,V,Q,da,ea,fa,pa,ua,qa,Da,Aa,Fa,ta,Sa,Ra,Oa){try{da=null!=da?da:!0;ea=null!=ea?ea:!0;Da=null!=Da?Da:this.graph;Aa=null!=Aa?Aa:0;var Va=pa?null:Da.background;Va==mxConstants.NONE&&(Va=null);null==Va&&(Va=V);null==Va&&0==pa&&(Va=Sa?this.graph.defaultPageBackgroundColor:"#ffffff");this.convertImages(Da.getSvg(null,null,Aa,Fa,null,ea,null,null,null,ua,null,Sa,Ra,Oa),mxUtils.bind(this,
+function(Ja){try{var cb=new Image;cb.onload=mxUtils.bind(this,function(){try{var y=function(){mxClient.IS_SF?window.setTimeout(function(){U.drawImage(cb,0,0);u(K,Ja)},0):(U.drawImage(cb,0,0),u(K,Ja))},K=document.createElement("canvas"),N=parseInt(Ja.getAttribute("width")),T=parseInt(Ja.getAttribute("height"));fa=null!=fa?fa:1;null!=H&&(fa=da?Math.min(1,Math.min(3*H/(4*T),H/N)):H/N);fa=this.getMaxCanvasScale(N,T,fa);N=Math.ceil(fa*N);T=Math.ceil(fa*T);K.setAttribute("width",N);K.setAttribute("height",
+T);var U=K.getContext("2d");null!=Va&&(U.beginPath(),U.rect(0,0,N,T),U.fillStyle=Va,U.fill());1!=fa&&U.scale(fa,fa);if(ta){var W=Da.view,na=W.scale;W.scale=1;var wa=btoa(unescape(encodeURIComponent(W.createSvgGrid(W.gridColor))));W.scale=na;wa="data:image/svg+xml;base64,"+wa;var ra=Da.gridSize*W.gridSteps*fa,xa=Da.getGraphBounds(),Ea=W.translate.x*na,Na=W.translate.y*na,Ma=Ea+(xa.x-Ea)/na-Aa,za=Na+(xa.y-Na)/na-Aa,Ba=new Image;Ba.onload=function(){try{for(var Ca=-Math.round(ra-mxUtils.mod((Ea-Ma)*
+fa,ra)),ya=-Math.round(ra-mxUtils.mod((Na-za)*fa,ra));Ca<N;Ca+=ra)for(var Ga=ya;Ga<T;Ga+=ra)U.drawImage(Ba,Ca/fa,Ga/fa);y()}catch(Za){null!=Q&&Q(Za)}};Ba.onerror=function(Ca){null!=Q&&Q(Ca)};Ba.src=wa}else y()}catch(Ca){null!=Q&&Q(Ca)}});cb.onerror=function(y){null!=Q&&Q(y)};ua&&this.graph.addSvgShadow(Ja);this.graph.mathEnabled&&this.addMathCss(Ja);var $a=mxUtils.bind(this,function(){try{null!=this.resolvedFontCss&&this.addFontCss(Ja,this.resolvedFontCss),cb.src=Editor.createSvgDataUri(mxUtils.getXml(Ja))}catch(y){null!=
+Q&&Q(y)}});this.embedExtFonts(mxUtils.bind(this,function(y){try{null!=y&&this.addFontCss(Ja,y),this.loadFonts($a)}catch(K){null!=Q&&Q(K)}}))}catch(y){null!=Q&&Q(y)}}),P,qa)}catch(Ja){null!=Q&&Q(Ja)}};Editor.crcTable=[];for(var D=0;256>D;D++)for(var t=D,E=0;8>E;E++)t=1==(t&1)?3988292384^t>>>1:t>>>1,Editor.crcTable[D]=t;Editor.updateCRC=function(u,H,P,V){for(var Q=0;Q<V;Q++)u=Editor.crcTable[(u^H.charCodeAt(P+Q))&255]^u>>>8;return u};Editor.crc32=function(u){for(var H=-1,P=0;P<u.length;P++)H=H>>>8^
+Editor.crcTable[(H^u.charCodeAt(P))&255];return(H^-1)>>>0};Editor.writeGraphModelToPng=function(u,H,P,V,Q){function da(qa,Da){var Aa=pa;pa+=Da;return qa.substring(Aa,pa)}function ea(qa){qa=da(qa,4);return qa.charCodeAt(3)+(qa.charCodeAt(2)<<8)+(qa.charCodeAt(1)<<16)+(qa.charCodeAt(0)<<24)}function fa(qa){return String.fromCharCode(qa>>24&255,qa>>16&255,qa>>8&255,qa&255)}u=u.substring(u.indexOf(",")+1);u=window.atob?atob(u):Base64.decode(u,!0);var pa=0;if(da(u,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,
+10,26,10))null!=Q&&Q();else if(da(u,4),"IHDR"!=da(u,4))null!=Q&&Q();else{da(u,17);Q=u.substring(0,pa);do{var ua=ea(u);if("IDAT"==da(u,4)){Q=u.substring(0,pa-8);"pHYs"==H&&"dpi"==P?(P=Math.round(V/.0254),P=fa(P)+fa(P)+String.fromCharCode(1)):P=P+String.fromCharCode(0)+("zTXt"==H?String.fromCharCode(0):"")+V;V=4294967295;V=Editor.updateCRC(V,H,0,4);V=Editor.updateCRC(V,P,0,P.length);Q+=fa(P.length)+H+P+fa(V^4294967295);Q+=u.substring(pa-8,u.length);break}Q+=u.substring(pa-8,pa-4+ua);da(u,ua);da(u,4)}while(ua);
+return"data:image/png;base64,"+(window.btoa?btoa(Q):Base64.encode(Q,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.diagrams.net/doc/faq/save-file-formats";var d=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(u,H){d.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()};var f=ColorDialog.resetRecentColors;ColorDialog.resetRecentColors=function(){f.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);
+mxSettings.save()}}window.EditDataDialog&&(EditDataDialog.getDisplayIdForCell=function(u,H){var P=null;null!=u.editor.graph.getModel().getParent(H)?P=H.getId():null!=u.currentPage&&(P=u.currentPage.getId());return P});if(null!=window.StyleFormatPanel){var g=Format.prototype.init;Format.prototype.init=function(){g.apply(this,arguments);this.editorUi.editor.addListener("fileLoaded",this.update)};var l=Format.prototype.refresh;Format.prototype.refresh=function(){null!=this.editorUi.getCurrentFile()||
+"1"==urlParams.embed||this.editorUi.editor.chromeless?l.apply(this,arguments):this.clear()};DiagramFormatPanel.prototype.isShadowOptionVisible=function(){var u=this.editorUi.getCurrentFile();return"1"==urlParams.embed||null!=u&&u.isEditable()};DiagramFormatPanel.prototype.isMathOptionVisible=function(u){return!1};var q=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(u){u=q.apply(this,arguments);this.editorUi.getCurrentFile();if(mxClient.IS_SVG&&this.isShadowOptionVisible()){var H=
+this.editorUi,P=H.editor.graph,V=this.createOption(mxResources.get("shadow"),function(){return P.shadowVisible},function(Q){var da=new ChangePageSetup(H);da.ignoreColor=!0;da.ignoreImage=!0;da.shadowVisible=Q;P.model.execute(da)},{install:function(Q){this.listener=function(){Q(P.shadowVisible)};H.addListener("shadowVisibleChanged",this.listener)},destroy:function(){H.removeListener(this.listener)}});Editor.enableShadowOption||(V.getElementsByTagName("input")[0].setAttribute("disabled","disabled"),
+mxUtils.setOpacity(V,60));u.appendChild(V)}return u};var z=DiagramFormatPanel.prototype.addOptions;DiagramFormatPanel.prototype.addOptions=function(u){u=z.apply(this,arguments);var H=this.editorUi,P=H.editor.graph;if(P.isEnabled()){var V=H.getCurrentFile();if(null!=V&&V.isAutosaveOptional()){var Q=this.createOption(mxResources.get("autosave"),function(){return H.editor.autosave},function(ea){H.editor.setAutosave(ea);H.editor.autosave&&V.isModified()&&V.fileChanged()},{install:function(ea){this.listener=
+function(){ea(H.editor.autosave)};H.editor.addListener("autosaveChanged",this.listener)},destroy:function(){H.editor.removeListener(this.listener)}});u.appendChild(Q)}}if(this.isMathOptionVisible()&&P.isEnabled()&&"undefined"!==typeof MathJax){Q=this.createOption(mxResources.get("mathematicalTypesetting"),function(){return P.mathEnabled},function(ea){H.actions.get("mathematicalTypesetting").funct()},{install:function(ea){this.listener=function(){ea(P.mathEnabled)};H.addListener("mathEnabledChanged",
+this.listener)},destroy:function(){H.removeListener(this.listener)}});Q.style.paddingTop="5px";u.appendChild(Q);var da=H.menus.createHelpLink("https://www.diagrams.net/doc/faq/math-typesetting");da.style.position="relative";da.style.marginLeft="6px";da.style.top="2px";Q.appendChild(da)}return u};mxCellRenderer.prototype.defaultVertexShape.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"absoluteArcSize",dispName:"Abs. Arc Size",
+type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.link.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.flexArrow.prototype.customProperties=[{name:"width",dispName:"Width",type:"float",min:0,defVal:10},{name:"startWidth",dispName:"Start Width",type:"float",min:0,defVal:20},{name:"endWidth",dispName:"End Width",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.process.prototype.customProperties=[{name:"size",dispName:"Indent",
+type:"float",min:0,max:.5,defVal:.1}];mxCellRenderer.defaultShapes.rhombus.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,max:50,defVal:mxConstants.LINE_ARCSIZE},{name:"double",dispName:"Double",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties=[{name:"top",dispName:"Top Line",type:"bool",defVal:!0},{name:"bottom",dispName:"Bottom Line",type:"bool",defVal:!0},{name:"left",dispName:"Left Line",type:"bool",defVal:!0},
+{name:"right",dispName:"Right Line",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.parallelogram.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.hexagon.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,
+defVal:.25}];mxCellRenderer.defaultShapes.triangle.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE}];mxCellRenderer.defaultShapes.document.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",defVal:.3,min:0,max:1}];mxCellRenderer.defaultShapes.internalStorage.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"dx",dispName:"Left Line",type:"float",
+min:0,defVal:20},{name:"dy",dispName:"Top Line",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.cube.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0},{name:"darkOpacity2",dispName:"Dark Opacity 2",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.step.prototype.customProperties=[{name:"size",dispName:"Notch Size",type:"float",min:0,defVal:20},{name:"fixedSize",
+dispName:"Fixed Size",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.trapezoid.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Slope Angle",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.tape.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.4}];mxCellRenderer.defaultShapes.note.prototype.customProperties=[{name:"size",dispName:"Fold Size",type:"float",
+min:0,defVal:30},{name:"darkOpacity",dispName:"Dark Opacity",type:"float",min:-1,max:1,defVal:0}];mxCellRenderer.defaultShapes.card.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"size",dispName:"Cutoff Size",type:"float",min:0,defVal:30}];mxCellRenderer.defaultShapes.callout.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:mxConstants.LINE_ARCSIZE},{name:"base",dispName:"Callout Width",
+type:"float",min:0,defVal:20},{name:"size",dispName:"Callout Length",type:"float",min:0,defVal:30},{name:"position",dispName:"Callout Position",type:"float",min:0,max:1,defVal:.5},{name:"position2",dispName:"Callout Tip Position",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.folder.prototype.customProperties=[{name:"tabWidth",dispName:"Tab Width",type:"float"},{name:"tabHeight",dispName:"Tab Height",type:"float"},{name:"tabPosition",dispName:"Tap Position",type:"enum",enumList:[{val:"left",
+dispName:"Left"},{val:"right",dispName:"Right"}]}];mxCellRenderer.defaultShapes.swimlane.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"startSize",dispName:"Header Size",type:"float"},{name:"swimlaneHead",dispName:"Head Border",type:"bool",defVal:!0},{name:"swimlaneBody",dispName:"Body Border",type:"bool",defVal:!0},{name:"horizontal",dispName:"Horizontal",type:"bool",defVal:!0},{name:"separatorColor",dispName:"Separator Color",type:"color",defVal:null}];
+mxCellRenderer.defaultShapes.table.prototype.customProperties=[{name:"rowLines",dispName:"Row Lines",type:"bool",defVal:!0},{name:"columnLines",dispName:"Column Lines",type:"bool",defVal:!0},{name:"fixedRows",dispName:"Fixed Rows",type:"bool",defVal:!1},{name:"resizeLast",dispName:"Resize Last Column",type:"bool",defVal:!1},{name:"resizeLastRow",dispName:"Resize Last Row",type:"bool",defVal:!1}].concat(mxCellRenderer.defaultShapes.swimlane.prototype.customProperties).concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);
+mxCellRenderer.defaultShapes.tableRow.prototype.customProperties=mxCellRenderer.defaultShapes.swimlane.prototype.customProperties.concat(mxCellRenderer.defaultShapes.partialRectangle.prototype.customProperties);mxCellRenderer.defaultShapes.doubleEllipse.prototype.customProperties=[{name:"margin",dispName:"Indent",type:"float",min:0,defVal:4}];mxCellRenderer.defaultShapes.ext.prototype.customProperties=[{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:15},{name:"double",dispName:"Double",
+type:"bool",defVal:!1},{name:"margin",dispName:"Indent",type:"float",min:0,defVal:0}];mxCellRenderer.defaultShapes.curlyBracket.prototype.customProperties=[{name:"rounded",dispName:"Rounded",type:"bool",defVal:!0},{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.5}];mxCellRenderer.defaultShapes.image.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",type:"bool",defVal:!0}];mxCellRenderer.defaultShapes.label.prototype.customProperties=[{name:"imageAspect",dispName:"Fixed Image Aspect",
+type:"bool",defVal:!0},{name:"imageAlign",dispName:"Image Align",type:"enum",enumList:[{val:"left",dispName:"Left"},{val:"center",dispName:"Center"},{val:"right",dispName:"Right"}],defVal:"left"},{name:"imageVerticalAlign",dispName:"Image Vertical Align",type:"enum",enumList:[{val:"top",dispName:"Top"},{val:"middle",dispName:"Middle"},{val:"bottom",dispName:"Bottom"}],defVal:"middle"},{name:"imageWidth",dispName:"Image Width",type:"float",min:0,defVal:24},{name:"imageHeight",dispName:"Image Height",
+type:"float",min:0,defVal:24},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:12},{name:"absoluteArcSize",dispName:"Abs. Arc Size",type:"bool",defVal:!1}];mxCellRenderer.defaultShapes.dataStorage.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.1}];mxCellRenderer.defaultShapes.manualInput.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:30},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.loopLimit.prototype.customProperties=
+[{name:"size",dispName:"Size",type:"float",min:0,defVal:20},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.offPageConnector.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,defVal:38},{name:"arcSize",dispName:"Arc Size",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.display.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,max:1,defVal:.25}];mxCellRenderer.defaultShapes.singleArrow.prototype.customProperties=
+[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.doubleArrow.prototype.customProperties=[{name:"arrowWidth",dispName:"Arrow Width",type:"float",min:0,max:1,defVal:.3},{name:"arrowSize",dispName:"Arrowhead Length",type:"float",min:0,max:1,defVal:.2}];mxCellRenderer.defaultShapes.cross.prototype.customProperties=[{name:"size",dispName:"Size",type:"float",min:0,
+max:1,defVal:.2}];mxCellRenderer.defaultShapes.corner.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.tee.prototype.customProperties=[{name:"dx",dispName:"Width1",type:"float",min:0,defVal:20},{name:"dy",dispName:"Width2",type:"float",min:0,defVal:20}];mxCellRenderer.defaultShapes.umlLifeline.prototype.customProperties=[{name:"participant",dispName:"Participant",type:"enum",
+defVal:"none",enumList:[{val:"none",dispName:"Default"},{val:"umlActor",dispName:"Actor"},{val:"umlBoundary",dispName:"Boundary"},{val:"umlEntity",dispName:"Entity"},{val:"umlControl",dispName:"Control"}]},{name:"size",dispName:"Height",type:"float",defVal:40,min:0}];mxCellRenderer.defaultShapes.umlFrame.prototype.customProperties=[{name:"width",dispName:"Title Width",type:"float",defVal:60,min:0},{name:"height",dispName:"Title Height",type:"float",defVal:30,min:0}];StyleFormatPanel.prototype.defaultColorSchemes=
+[[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",font:"#333333"},{fill:"#dae8fc",stroke:"#6c8ebf"},{fill:"#d5e8d4",stroke:"#82b366"},{fill:"#ffe6cc",stroke:"#d79b00"},{fill:"#fff2cc",stroke:"#d6b656"},{fill:"#f8cecc",stroke:"#b85450"},{fill:"#e1d5e7",stroke:"#9673a6"}],[{fill:"",stroke:""},{fill:"#60a917",stroke:"#2D7600",font:"#ffffff"},{fill:"#008a00",stroke:"#005700",font:"#ffffff"},{fill:"#1ba1e2",stroke:"#006EAF",font:"#ffffff"},{fill:"#0050ef",stroke:"#001DBC",font:"#ffffff"},{fill:"#6a00ff",
+stroke:"#3700CC",font:"#ffffff"},{fill:"#d80073",stroke:"#A50040",font:"#ffffff"},{fill:"#a20025",stroke:"#6F0000",font:"#ffffff"}],[{fill:"#e51400",stroke:"#B20000",font:"#ffffff"},{fill:"#fa6800",stroke:"#C73500",font:"#000000"},{fill:"#f0a30a",stroke:"#BD7000",font:"#000000"},{fill:"#e3c800",stroke:"#B09500",font:"#000000"},{fill:"#6d8764",stroke:"#3A5431",font:"#ffffff"},{fill:"#647687",stroke:"#314354",font:"#ffffff"},{fill:"#76608a",stroke:"#432D57",font:"#ffffff"},{fill:"#a0522d",stroke:"#6D1F00",
+font:"#ffffff"}],[{fill:"",stroke:""},{fill:mxConstants.NONE,stroke:""},{fill:"#fad7ac",stroke:"#b46504"},{fill:"#fad9d5",stroke:"#ae4132"},{fill:"#b0e3e6",stroke:"#0e8088"},{fill:"#b1ddf0",stroke:"#10739e"},{fill:"#d0cee2",stroke:"#56517e"},{fill:"#bac8d3",stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradient:"#b3b3b3"},{fill:"#dae8fc",stroke:"#6c8ebf",gradient:"#7ea6e0"},{fill:"#d5e8d4",stroke:"#82b366",gradient:"#97d077"},{fill:"#ffcd28",stroke:"#d79b00",gradient:"#ffa500"},
+{fill:"#fff2cc",stroke:"#d6b656",gradient:"#ffd966"},{fill:"#f8cecc",stroke:"#b85450",gradient:"#ea6b66"},{fill:"#e6d0de",stroke:"#996185",gradient:"#d5739d"}],[{fill:"",stroke:""},{fill:"#eeeeee",stroke:"#36393d"},{fill:"#f9f7ed",stroke:"#36393d"},{fill:"#ffcc99",stroke:"#36393d"},{fill:"#cce5ff",stroke:"#36393d"},{fill:"#ffff88",stroke:"#36393d"},{fill:"#cdeb8b",stroke:"#36393d"},{fill:"#ffcccc",stroke:"#36393d"}]];StyleFormatPanel.prototype.customColorSchemes=null;StyleFormatPanel.prototype.findCommonProperties=
+function(u,H,P){if(null!=H){var V=function(da){if(null!=da)if(P)for(var ea=0;ea<da.length;ea++)H[da[ea].name]=da[ea];else for(var fa in H){var pa=!1;for(ea=0;ea<da.length;ea++)if(da[ea].name==fa&&da[ea].type==H[fa].type){pa=!0;break}pa||delete H[fa]}},Q=this.editorUi.editor.graph.view.getState(u);null!=Q&&null!=Q.shape&&(Q.shape.commonCustomPropAdded||(Q.shape.commonCustomPropAdded=!0,Q.shape.customProperties=Q.shape.customProperties||[],Q.cell.vertex?Array.prototype.push.apply(Q.shape.customProperties,
+Editor.commonVertexProperties):Array.prototype.push.apply(Q.shape.customProperties,Editor.commonEdgeProperties)),V(Q.shape.customProperties));u=u.getAttribute("customProperties");if(null!=u)try{V(JSON.parse(u))}catch(da){}}};var F=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init=function(){var u=this.editorUi.getSelectionState();"image"!=u.style.shape&&!u.containsLabel&&0<u.cells.length&&this.container.appendChild(this.addStyles(this.createPanel()));F.apply(this,arguments);if(Editor.enableCustomProperties){for(var H=
+{},P=u.vertices,V=u.edges,Q=0;Q<P.length;Q++)this.findCommonProperties(P[Q],H,0==Q);for(Q=0;Q<V.length;Q++)this.findCommonProperties(V[Q],H,0==P.length&&0==Q);null!=Object.getOwnPropertyNames&&0<Object.getOwnPropertyNames(H).length&&this.container.appendChild(this.addProperties(this.createPanel(),H,u))}};var C=StyleFormatPanel.prototype.addStyleOps;StyleFormatPanel.prototype.addStyleOps=function(u){this.addActions(u,["copyStyle","pasteStyle"]);return C.apply(this,arguments)};EditorUi.prototype.propertiesCollapsed=
+!0;StyleFormatPanel.prototype.addProperties=function(u,H,P){function V(U,W,na,wa){Da.getModel().beginUpdate();try{var ra=[],xa=[];if(null!=na.index){for(var Ea=[],Na=na.parentRow.nextSibling;Na&&Na.getAttribute("data-pName")==U;)Ea.push(Na.getAttribute("data-pValue")),Na=Na.nextSibling;na.index<Ea.length?null!=wa?Ea.splice(wa,1):Ea[na.index]=W:Ea.push(W);null!=na.size&&Ea.length>na.size&&(Ea=Ea.slice(0,na.size));W=Ea.join(",");null!=na.countProperty&&(Da.setCellStyles(na.countProperty,Ea.length,Da.getSelectionCells()),
+ra.push(na.countProperty),xa.push(Ea.length))}Da.setCellStyles(U,W,Da.getSelectionCells());ra.push(U);xa.push(W);if(null!=na.dependentProps)for(U=0;U<na.dependentProps.length;U++){var Ma=na.dependentPropsDefVal[U],za=na.dependentPropsVals[U];if(za.length>W)za=za.slice(0,W);else for(var Ba=za.length;Ba<W;Ba++)za.push(Ma);za=za.join(",");Da.setCellStyles(na.dependentProps[U],za,Da.getSelectionCells());ra.push(na.dependentProps[U]);xa.push(za)}if("function"==typeof na.onChange)na.onChange(Da,W);qa.editorUi.fireEvent(new mxEventObject("styleChanged",
+"keys",ra,"values",xa,"cells",Da.getSelectionCells()))}finally{Da.getModel().endUpdate()}}function Q(U,W,na){var wa=mxUtils.getOffset(u,!0),ra=mxUtils.getOffset(U,!0);W.style.position="absolute";W.style.left=ra.x-wa.x+"px";W.style.top=ra.y-wa.y+"px";W.style.width=U.offsetWidth+"px";W.style.height=U.offsetHeight-(na?4:0)+"px";W.style.zIndex=5}function da(U,W,na){var wa=document.createElement("div");wa.style.width="32px";wa.style.height="4px";wa.style.margin="2px";wa.style.border="1px solid black";
+wa.style.background=W&&"none"!=W?W:"url('"+Dialog.prototype.noColorImage+"')";btn=mxUtils.button("",mxUtils.bind(qa,function(ra){this.editorUi.pickColor(W,function(xa){wa.style.background="none"==xa?"url('"+Dialog.prototype.noColorImage+"')":xa;V(U,xa,na)});mxEvent.consume(ra)}));btn.style.height="12px";btn.style.width="40px";btn.className="geColorBtn";btn.appendChild(wa);return btn}function ea(U,W,na,wa,ra,xa,Ea){null!=W&&(W=W.split(","),Aa.push({name:U,values:W,type:na,defVal:wa,countProperty:ra,
+parentRow:xa,isDeletable:!0,flipBkg:Ea}));btn=mxUtils.button("+",mxUtils.bind(qa,function(Na){for(var Ma=xa,za=0;null!=Ma.nextSibling;)if(Ma.nextSibling.getAttribute("data-pName")==U)Ma=Ma.nextSibling,za++;else break;var Ba={type:na,parentRow:xa,index:za,isDeletable:!0,defVal:wa,countProperty:ra};za=ua(U,"",Ba,0==za%2,Ea);V(U,wa,Ba);Ma.parentNode.insertBefore(za,Ma.nextSibling);mxEvent.consume(Na)}));btn.style.height="16px";btn.style.width="25px";btn.className="geColorBtn";return btn}function fa(U,
+W,na,wa,ra,xa,Ea){if(0<ra){var Na=Array(ra);W=null!=W?W.split(","):[];for(var Ma=0;Ma<ra;Ma++)Na[Ma]=null!=W[Ma]?W[Ma]:null!=wa?wa:"";Aa.push({name:U,values:Na,type:na,defVal:wa,parentRow:xa,flipBkg:Ea,size:ra})}return document.createElement("div")}function pa(U,W,na){var wa=document.createElement("input");wa.type="checkbox";wa.checked="1"==W;mxEvent.addListener(wa,"change",function(){V(U,wa.checked?"1":"0",na)});return wa}function ua(U,W,na,wa,ra){var xa=na.dispName,Ea=na.type,Na=document.createElement("tr");
+Na.className="gePropRow"+(ra?"Dark":"")+(wa?"Alt":"")+" gePropNonHeaderRow";Na.setAttribute("data-pName",U);Na.setAttribute("data-pValue",W);wa=!1;null!=na.index&&(Na.setAttribute("data-index",na.index),xa=(null!=xa?xa:"")+"["+na.index+"]",wa=!0);var Ma=document.createElement("td");Ma.className="gePropRowCell";xa=mxResources.get(xa,null,xa);mxUtils.write(Ma,xa);Ma.setAttribute("title",xa);wa&&(Ma.style.textAlign="right");Na.appendChild(Ma);Ma=document.createElement("td");Ma.className="gePropRowCell";
+if("color"==Ea)Ma.appendChild(da(U,W,na));else if("bool"==Ea||"boolean"==Ea)Ma.appendChild(pa(U,W,na));else if("enum"==Ea){var za=na.enumList;for(ra=0;ra<za.length;ra++)if(xa=za[ra],xa.val==W){mxUtils.write(Ma,mxResources.get(xa.dispName,null,xa.dispName));break}mxEvent.addListener(Ma,"click",mxUtils.bind(qa,function(){var Ba=document.createElement("select");Q(Ma,Ba);for(var Ca=0;Ca<za.length;Ca++){var ya=za[Ca],Ga=document.createElement("option");Ga.value=mxUtils.htmlEntities(ya.val);mxUtils.write(Ga,
+mxResources.get(ya.dispName,null,ya.dispName));Ba.appendChild(Ga)}Ba.value=W;u.appendChild(Ba);mxEvent.addListener(Ba,"change",function(){var Za=mxUtils.htmlEntities(Ba.value);V(U,Za,na)});Ba.focus();mxEvent.addListener(Ba,"blur",function(){u.removeChild(Ba)})}))}else"dynamicArr"==Ea?Ma.appendChild(ea(U,W,na.subType,na.subDefVal,na.countProperty,Na,ra)):"staticArr"==Ea?Ma.appendChild(fa(U,W,na.subType,na.subDefVal,na.size,Na,ra)):"readOnly"==Ea?(ra=document.createElement("input"),ra.setAttribute("readonly",
+""),ra.value=W,ra.style.width="96px",ra.style.borderWidth="0px",Ma.appendChild(ra)):(Ma.innerHTML=mxUtils.htmlEntities(decodeURIComponent(W)),mxEvent.addListener(Ma,"click",mxUtils.bind(qa,function(){function Ba(){var ya=Ca.value;ya=0==ya.length&&"string"!=Ea?0:ya;na.allowAuto&&(null!=ya.trim&&"auto"==ya.trim().toLowerCase()?(ya="auto",Ea="string"):(ya=parseFloat(ya),ya=isNaN(ya)?0:ya));null!=na.min&&ya<na.min?ya=na.min:null!=na.max&&ya>na.max&&(ya=na.max);ya=encodeURIComponent(("int"==Ea?parseInt(ya):
+ya)+"");V(U,ya,na)}var Ca=document.createElement("input");Q(Ma,Ca,!0);Ca.value=decodeURIComponent(W);Ca.className="gePropEditor";"int"!=Ea&&"float"!=Ea||na.allowAuto||(Ca.type="number",Ca.step="int"==Ea?"1":"any",null!=na.min&&(Ca.min=parseFloat(na.min)),null!=na.max&&(Ca.max=parseFloat(na.max)));u.appendChild(Ca);mxEvent.addListener(Ca,"keypress",function(ya){13==ya.keyCode&&Ba()});Ca.focus();mxEvent.addListener(Ca,"blur",function(){Ba()})})));na.isDeletable&&(ra=mxUtils.button("-",mxUtils.bind(qa,
+function(Ba){V(U,"",na,na.index);mxEvent.consume(Ba)})),ra.style.height="16px",ra.style.width="25px",ra.style.float="right",ra.className="geColorBtn",Ma.appendChild(ra));Na.appendChild(Ma);return Na}var qa=this,Da=this.editorUi.editor.graph,Aa=[];u.style.position="relative";u.style.padding="0";var Fa=document.createElement("table");Fa.className="geProperties";Fa.style.whiteSpace="nowrap";Fa.style.width="100%";var ta=document.createElement("tr");ta.className="gePropHeader";var Sa=document.createElement("th");
+Sa.className="gePropHeaderCell";var Ra=document.createElement("img");Ra.src=Sidebar.prototype.expandedImage;Ra.style.verticalAlign="middle";Sa.appendChild(Ra);mxUtils.write(Sa,mxResources.get("property"));ta.style.cursor="pointer";var Oa=function(){var U=Fa.querySelectorAll(".gePropNonHeaderRow");if(qa.editorUi.propertiesCollapsed){Ra.src=Sidebar.prototype.collapsedImage;var W="none";for(var na=u.childNodes.length-1;0<=na;na--)try{var wa=u.childNodes[na],ra=wa.nodeName.toUpperCase();"INPUT"!=ra&&
+"SELECT"!=ra||u.removeChild(wa)}catch(xa){}}else Ra.src=Sidebar.prototype.expandedImage,W="";for(na=0;na<U.length;na++)U[na].style.display=W};mxEvent.addListener(ta,"click",function(){qa.editorUi.propertiesCollapsed=!qa.editorUi.propertiesCollapsed;Oa()});ta.appendChild(Sa);Sa=document.createElement("th");Sa.className="gePropHeaderCell";Sa.innerHTML=mxResources.get("value");ta.appendChild(Sa);Fa.appendChild(ta);var Va=!1,Ja=!1;ta=null;1==P.vertices.length&&0==P.edges.length?ta=P.vertices[0].id:0==
+P.vertices.length&&1==P.edges.length&&(ta=P.edges[0].id);null!=ta&&Fa.appendChild(ua("id",mxUtils.htmlEntities(ta),{dispName:"ID",type:"readOnly"},!0,!1));for(var cb in H)if(ta=H[cb],"function"!=typeof ta.isVisible||ta.isVisible(P,this)){var $a=null!=P.style[cb]?mxUtils.htmlEntities(P.style[cb]+""):null!=ta.getDefaultValue?ta.getDefaultValue(P,this):ta.defVal;if("separator"==ta.type)Ja=!Ja;else{if("staticArr"==ta.type)ta.size=parseInt(P.style[ta.sizeProperty]||H[ta.sizeProperty].defVal)||0;else if(null!=
+ta.dependentProps){var y=ta.dependentProps,K=[],N=[];for(Sa=0;Sa<y.length;Sa++){var T=P.style[y[Sa]];N.push(H[y[Sa]].subDefVal);K.push(null!=T?T.split(","):[])}ta.dependentPropsDefVal=N;ta.dependentPropsVals=K}Fa.appendChild(ua(cb,$a,ta,Va,Ja));Va=!Va}}for(Sa=0;Sa<Aa.length;Sa++)for(ta=Aa[Sa],H=ta.parentRow,P=0;P<ta.values.length;P++)cb=ua(ta.name,ta.values[P],{type:ta.type,parentRow:ta.parentRow,isDeletable:ta.isDeletable,index:P,defVal:ta.defVal,countProperty:ta.countProperty,size:ta.size},0==P%
+2,ta.flipBkg),H.parentNode.insertBefore(cb,H.nextSibling),H=cb;u.appendChild(Fa);Oa();return u};StyleFormatPanel.prototype.addStyles=function(u){function H(ta){mxEvent.addListener(ta,"mouseenter",function(){ta.style.opacity="1"});mxEvent.addListener(ta,"mouseleave",function(){ta.style.opacity="0.5"})}var P=this.editorUi,V=P.editor.graph,Q=document.createElement("div");Q.style.whiteSpace="nowrap";Q.style.paddingLeft="24px";Q.style.paddingRight="20px";u.style.paddingLeft="16px";u.style.paddingBottom=
+"6px";u.style.position="relative";u.appendChild(Q);var da="plain-gray plain-blue plain-green plain-turquoise plain-orange plain-yellow plain-red plain-pink plain-purple gray blue green turquoise orange yellow red pink purple".split(" "),ea=document.createElement("div");ea.style.whiteSpace="nowrap";ea.style.position="relative";ea.style.textAlign="center";ea.style.width="210px";for(var fa=[],pa=0;pa<this.defaultColorSchemes.length;pa++){var ua=document.createElement("div");ua.style.display="inline-block";
+ua.style.width="6px";ua.style.height="6px";ua.style.marginLeft="4px";ua.style.marginRight="3px";ua.style.borderRadius="3px";ua.style.cursor="pointer";ua.style.background="transparent";ua.style.border="1px solid #b5b6b7";mxUtils.bind(this,function(ta){mxEvent.addListener(ua,"click",mxUtils.bind(this,function(){qa(ta)}))})(pa);fa.push(ua);ea.appendChild(ua)}var qa=mxUtils.bind(this,function(ta){null!=fa[ta]&&(null!=this.format.currentScheme&&null!=fa[this.format.currentScheme]&&(fa[this.format.currentScheme].style.background=
+"transparent"),this.format.currentScheme=ta,Da(this.defaultColorSchemes[this.format.currentScheme]),fa[this.format.currentScheme].style.background="#84d7ff")}),Da=mxUtils.bind(this,function(ta){var Sa=mxUtils.bind(this,function(Oa){var Va=mxUtils.button("",mxUtils.bind(this,function($a){V.getModel().beginUpdate();try{for(var y=P.getSelectionState().cells,K=0;K<y.length;K++){for(var N=V.getModel().getStyle(y[K]),T=0;T<da.length;T++)N=mxUtils.removeStylename(N,da[T]);var U=V.getModel().isVertex(y[K])?
+V.defaultVertexStyle:V.defaultEdgeStyle;null!=Oa?(mxEvent.isShiftDown($a)||(N=""==Oa.fill?mxUtils.setStyle(N,mxConstants.STYLE_FILLCOLOR,null):mxUtils.setStyle(N,mxConstants.STYLE_FILLCOLOR,Oa.fill||mxUtils.getValue(U,mxConstants.STYLE_FILLCOLOR,null)),N=mxUtils.setStyle(N,mxConstants.STYLE_GRADIENTCOLOR,Oa.gradient||mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),mxEvent.isControlDown($a)||mxClient.IS_MAC&&mxEvent.isMetaDown($a)||!V.getModel().isVertex(y[K])||(N=mxUtils.setStyle(N,mxConstants.STYLE_FONTCOLOR,
+Oa.font||mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR,null)))),mxEvent.isAltDown($a)||(N=""==Oa.stroke?mxUtils.setStyle(N,mxConstants.STYLE_STROKECOLOR,null):mxUtils.setStyle(N,mxConstants.STYLE_STROKECOLOR,Oa.stroke||mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,null)))):(N=mxUtils.setStyle(N,mxConstants.STYLE_FILLCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FILLCOLOR,"#ffffff")),N=mxUtils.setStyle(N,mxConstants.STYLE_STROKECOLOR,mxUtils.getValue(U,mxConstants.STYLE_STROKECOLOR,"#000000")),N=
+mxUtils.setStyle(N,mxConstants.STYLE_GRADIENTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_GRADIENTCOLOR,null)),V.getModel().isVertex(y[K])&&(N=mxUtils.setStyle(N,mxConstants.STYLE_FONTCOLOR,mxUtils.getValue(U,mxConstants.STYLE_FONTCOLOR,null))));V.getModel().setStyle(y[K],N)}}finally{V.getModel().endUpdate()}}));Va.className="geStyleButton";Va.style.width="36px";Va.style.height=10>=this.defaultColorSchemes.length?"24px":"30px";Va.style.margin="0px 6px 6px 0px";if(null!=Oa){var Ja="1"==urlParams.sketch?
+"2px solid":"1px solid";null!=Oa.gradient?mxClient.IS_IE&&10>document.documentMode?Va.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+Oa.fill+"', EndColorStr='"+Oa.gradient+"', GradientType=0)":Va.style.backgroundImage="linear-gradient("+Oa.fill+" 0px,"+Oa.gradient+" 100%)":Oa.fill==mxConstants.NONE?Va.style.background="url('"+Dialog.prototype.noColorImage+"')":Va.style.backgroundColor=""==Oa.fill?mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?
+Editor.darkColor:"#ffffff"):Oa.fill||mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");Va.style.border=Oa.stroke==mxConstants.NONE?Ja+" transparent":""==Oa.stroke?Ja+" "+mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):Ja+" "+(Oa.stroke||mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=Oa.title&&
+Va.setAttribute("title",Oa.title)}else{Ja=mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var cb=mxUtils.getValue(V.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");Va.style.backgroundColor=Ja;Va.style.border="1px solid "+cb}Va.style.borderRadius="0";Q.appendChild(Va)});Q.innerText="";for(var Ra=0;Ra<ta.length;Ra++)0<Ra&&0==mxUtils.mod(Ra,4)&&mxUtils.br(Q),Sa(ta[Ra])});null==this.format.currentScheme?qa(Editor.isDarkMode()?1:"1"==urlParams.sketch?5:0):qa(this.format.currentScheme);
+pa=10>=this.defaultColorSchemes.length?28:8;var Aa=document.createElement("div");Aa.style.cssText="position:absolute;left:10px;top:8px;bottom:"+pa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);";
+mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){qa(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var Fa=document.createElement("div");Fa.style.cssText="position:absolute;left:202px;top:8px;bottom:"+pa+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);";
+1<this.defaultColorSchemes.length&&(u.appendChild(Aa),u.appendChild(Fa));mxEvent.addListener(Fa,"click",mxUtils.bind(this,function(){qa(mxUtils.mod(this.format.currentScheme+1,this.defaultColorSchemes.length))}));H(Aa);H(Fa);Da(this.defaultColorSchemes[this.format.currentScheme]);10>=this.defaultColorSchemes.length&&u.appendChild(ea);return u};StyleFormatPanel.prototype.addEditOps=function(u){var H=this.editorUi.getSelectionState(),P=this.editorUi.editor.graph,V=null;1==H.cells.length&&(V=mxUtils.button(mxResources.get("editStyle"),
+mxUtils.bind(this,function(Q){this.editorUi.actions.get("editStyle").funct()})),V.setAttribute("title",mxResources.get("editStyle")+" ("+this.editorUi.actions.get("editStyle").shortcut+")"),V.style.width="210px",V.style.marginBottom="2px",u.appendChild(V));P=1==H.cells.length?P.view.getState(H.cells[0]):null;null!=P&&null!=P.shape&&null!=P.shape.stencil?(H=mxUtils.button(mxResources.get("editShape"),mxUtils.bind(this,function(Q){this.editorUi.actions.get("editShape").funct()})),H.setAttribute("title",
+mxResources.get("editShape")),H.style.marginBottom="2px",null==V?H.style.width="210px":(V.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),u.appendChild(H)):H.image&&0<H.cells.length&&(H=mxUtils.button(mxResources.get("editImage"),mxUtils.bind(this,function(Q){this.editorUi.actions.get("image").funct()})),H.setAttribute("title",mxResources.get("editImage")),H.style.marginBottom="2px",null==V?H.style.width="210px":(V.style.width="104px",H.style.width="104px",H.style.marginLeft="2px"),
u.appendChild(H));return u}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'};Graph.customFontElements={};Graph.recentCustomFonts={};Graph.isGoogleFontUrl=function(u){return u.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS};Graph.isCssFontUrl=function(u){return Graph.isGoogleFontUrl(u)};Graph.createFontElement=function(u,
-H){var Q=Graph.fontMapping[H];null==Q&&Graph.isCssFontUrl(H)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",H)):(null==Q&&(Q='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+H+'");\n}'),u=document.createElement("style"),mxUtils.write(u,Q));return u};Graph.addFont=function(u,H,Q){if(null!=u&&0<u.length&&null!=H&&0<H.length){var X=u.toLowerCase();if("helvetica"!=X&&"arial"!=u&&"sans-serif"!=
-X){var R=Graph.customFontElements[X];null!=R&&R.url!=H&&(R.elt.parentNode.removeChild(R.elt),R=null);null==R?(R=H,"http:"==H.substring(0,5)&&(R=PROXY_URL+"?url="+encodeURIComponent(H)),R={name:u,url:H,elt:Graph.createFontElement(u,R)},Graph.customFontElements[X]=R,Graph.recentCustomFonts[X]=R,H=document.getElementsByTagName("head")[0],null!=Q&&("link"==R.elt.nodeName.toLowerCase()?(R.elt.onload=Q,R.elt.onerror=Q):Q()),null!=H&&H.appendChild(R.elt)):null!=Q&&Q()}else null!=Q&&Q()}else null!=Q&&Q();
-return u};Graph.getFontUrl=function(u,H){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(H=u.url);return H};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var H=0;H<u.length;H++){var Q=u[H].getAttribute("data-font-src");if(null!=Q){var X="FONT"==u[H].nodeName?u[H].getAttribute("face"):u[H].style.fontFamily;null!=X&&Graph.addFont(X,Q)}}};Graph.processFontStyle=function(u){if(null!=u){var H=mxUtils.getValue(u,"fontSource",null);if(null!=H){var Q=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
-null);null!=Q&&Graph.addFont(Q,decodeURIComponent(H))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
-urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var I=Graph.prototype.init;Graph.prototype.init=function(){function u(R){H=R}I.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var H=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(R){H=null});this.isMouseInsertPoint=function(){return null!=H};var Q=this.getInsertPoint;
-this.getInsertPoint=function(){return null!=H?this.getPointForEvent(H):Q.apply(this,arguments)};var X=this.layoutManager.getLayout;this.layoutManager.getLayout=function(R){var ca=this.graph.getCellStyle(R);if(null!=ca&&"rack"==ca.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=ca.rackUnitSize?parseFloat(ca.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=ca.marginLeft||0;ea.marginRight=ca.marginRight||0;ea.marginTop=ca.marginTop||
-0;ea.marginBottom=ca.marginBottom||0;ea.allowGaps=ca.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(ca,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return X.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,H){return Graph.processFontStyle(G.apply(this,arguments))};var Z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,H,Q,X,R,ca,ea,da,qa,va,
-ua){Z.apply(this,arguments);Graph.processFontAttributes(ua)};var fa=mxText.prototype.redraw;mxText.prototype.redraw=function(){fa.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,H,Q){function X(){for(var sa=ea.getSelectionCells(),Va=[],Ua=0;Ua<sa.length;Ua++)ea.isCellVisible(sa[Ua])&&Va.push(sa[Ua]);ea.setSelectionCells(Va)}function R(sa){ea.setHiddenTags(sa?[]:da.slice());X();ea.refresh()}function ca(sa,
-Va){va.innerText="";if(0<sa.length){var Ua=document.createElement("table");Ua.setAttribute("cellpadding","2");Ua.style.boxSizing="border-box";Ua.style.tableLayout="fixed";Ua.style.width="100%";var Ra=document.createElement("tbody");if(null!=sa&&0<sa.length)for(var Za=0;Za<sa.length;Za++)(function(Ha){var db=0>mxUtils.indexOf(ea.hiddenTags,Ha),cb=document.createElement("tr"),y=document.createElement("td");y.style.align="center";y.style.width="16px";var K=document.createElement("img");K.setAttribute("src",
-db?Editor.visibleImage:Editor.hiddenImage);K.setAttribute("title",mxResources.get(db?"hideIt":"show",[Ha]));mxUtils.setOpacity(K,db?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";y.appendChild(K);mxEvent.addListener(K,"click",function(S){mxEvent.isShiftDown(S)?R(0<=mxUtils.indexOf(ea.hiddenTags,Ha)):(ea.toggleHiddenTag(Ha),X(),ea.refresh());mxEvent.consume(S)});cb.appendChild(y);y=document.createElement("td");
-y.style.overflow="hidden";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.verticalAlign="middle";y.style.cursor="pointer";y.setAttribute("title",Ha);a=document.createElement("a");mxUtils.write(a,Ha);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,db?100:40);y.appendChild(a);mxEvent.addListener(y,"click",function(S){if(mxEvent.isShiftDown(S)){R(!0);var V=ea.getCellsForTags([Ha],null,null,!0);ea.isEnabled()?ea.setSelectionCells(V):ea.highlightCells(V)}else if(db&&
-0<ea.hiddenTags.length)R(!0);else{V=da.slice();var ja=mxUtils.indexOf(V,Ha);V.splice(ja,1);ea.setHiddenTags(V);X();ea.refresh()}mxEvent.consume(S)});cb.appendChild(y);if(ea.isEnabled()){y=document.createElement("td");y.style.verticalAlign="middle";y.style.textAlign="center";y.style.width="18px";if(null==Va){y.style.align="center";y.style.width="16px";K=document.createElement("img");K.setAttribute("src",Editor.crossImage);K.setAttribute("title",mxResources.get("removeIt",[Ha]));mxUtils.setOpacity(K,
-db?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";mxEvent.addListener(K,"click",function(S){var V=mxUtils.indexOf(da,Ha);0<=V&&da.splice(V,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ha]);ea.refresh();mxEvent.consume(S)});y.appendChild(K)}else{var L=document.createElement("input");L.setAttribute("type","checkbox");L.style.margin="0px";L.defaultChecked=null!=Va&&0<=mxUtils.indexOf(Va,
-Ha);L.checked=L.defaultChecked;L.style.background="transparent";L.setAttribute("title",mxResources.get(L.defaultChecked?"removeIt":"add",[Ha]));mxEvent.addListener(L,"change",function(S){L.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ha]):ea.removeTagsForCells(ea.getSelectionCells(),[Ha]);mxEvent.consume(S)});y.appendChild(L)}cb.appendChild(y)}Ra.appendChild(cb)})(sa[Za]);Ua.appendChild(Ra);va.appendChild(Ua)}}var ea=this,da=ea.hiddenTags.slice(),qa=document.createElement("div");qa.style.userSelect=
-"none";qa.style.overflow="hidden";qa.style.padding="10px";qa.style.height="100%";var va=document.createElement("div");va.style.boxSizing="border-box";va.style.borderRadius="4px";va.style.userSelect="none";va.style.overflow="auto";va.style.position="absolute";va.style.left="10px";va.style.right="10px";va.style.top="10px";va.style.border=ea.isEnabled()?"1px solid #808080":"none";va.style.bottom=ea.isEnabled()?"48px":"10px";qa.appendChild(va);var ua=mxUtils.button(mxResources.get("reset"),function(sa){ea.setHiddenTags([]);
-mxEvent.isShiftDown(sa)||(da=ea.hiddenTags.slice());X();ea.refresh()});ua.setAttribute("title",mxResources.get("reset"));ua.className="geBtn";ua.style.margin="0 4px 0 0";var Aa=mxUtils.button(mxResources.get("add"),function(){null!=Q&&Q(da,function(sa){da=sa;za()})});Aa.setAttribute("title",mxResources.get("add"));Aa.className="geBtn";Aa.style.margin="0";ea.addListener(mxEvent.ROOT,function(){da=ea.hiddenTags.slice()});var za=mxUtils.bind(this,function(sa,Va){if(u()){sa=ea.getAllTags();for(Va=0;Va<
-sa.length;Va++)0>mxUtils.indexOf(da,sa[Va])&&da.push(sa[Va]);da.sort();ea.isSelectionEmpty()?ca(da):ca(da,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,za);ea.model.addListener(mxEvent.CHANGE,za);ea.addListener(mxEvent.REFRESH,za);var Ca=document.createElement("div");Ca.style.boxSizing="border-box";Ca.style.whiteSpace="nowrap";Ca.style.position="absolute";Ca.style.overflow="hidden";Ca.style.bottom="0px";Ca.style.height="42px";Ca.style.right="10px";
-Ca.style.left="10px";ea.isEnabled()&&(Ca.appendChild(ua),Ca.appendChild(Aa),qa.appendChild(Ca));return{div:qa,refresh:za}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var H in Graph.customFontElements){var Q=Graph.customFontElements[H];u.push({name:Q.name,url:Q.url})}return u};Graph.prototype.setFont=function(u,H){Graph.addFont(u,H);document.execCommand("fontname",!1,u);if(null!=H){var Q=this.cellEditor.textarea.getElementsByTagName("font");H=Graph.getFontUrl(u,
-H);for(var X=0;X<Q.length;X++)Q[X].getAttribute("face")==u&&Q[X].getAttribute("data-font-src")!=H&&Q[X].setAttribute("data-font-src",H)}};var ba=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return ba.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 u=JSON.parse(decodeURIComponent(urlParams.vars));
-if(null!=u)for(var H in u)this.globalVars[H]=u[H]}catch(Q){null!=window.console&&console.log("Error in vars URL parameter: "+Q)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var H=Y.apply(this,arguments);null==H&&null!=this.globalVars&&(H=this.globalVars[u]);return H};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=
-this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var pa=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,H,Q,X,R,ca,ea,da,qa,va,ua,Aa,za,Ca){var sa=null,Va=null,Ua=null;Aa||null==this.themes||"darkTheme"!=this.defaultThemeName||(sa=this.stylesheet,Va=this.shapeForegroundColor,Ua=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
-"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Ra=pa.apply(this,arguments),Za=this.getCustomFonts();if(ua&&0<Za.length){var Ha=Ra.ownerDocument,db=null!=Ha.createElementNS?Ha.createElementNS(mxConstants.NS_SVG,"style"):Ha.createElement("style");null!=Ha.setAttributeNS?db.setAttributeNS("type","text/css"):db.setAttribute("type","text/css");for(var cb="",y="",K=0;K<Za.length;K++){var L=
-Za[K].name,S=Za[K].url;Graph.isCssFontUrl(S)?cb+="@import url("+S+");\n":y+='@font-face {\nfont-family: "'+L+'";\nsrc: url("'+S+'");\n}\n'}db.appendChild(Ha.createTextNode(cb+y));Ra.getElementsByTagName("defs")[0].appendChild(db)}this.mathEnabled&&(document.body.appendChild(Ra),Editor.MathJaxRender(Ra),Ra.parentNode.removeChild(Ra));null!=sa&&(this.shapeBackgroundColor=Ua,this.shapeForegroundColor=Va,this.stylesheet=sa,this.refresh());return Ra};var O=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
-function(u){O.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var W=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){W.apply(this,arguments);this.enumerationState=0};var ha=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u);return ha.apply(this,
+H){var P=Graph.fontMapping[H];null==P&&Graph.isCssFontUrl(H)?(u=document.createElement("link"),u.setAttribute("rel","stylesheet"),u.setAttribute("type","text/css"),u.setAttribute("charset","UTF-8"),u.setAttribute("href",H)):(null==P&&(P='@font-face {\nfont-family: "'+u+'";\nsrc: url("'+H+'");\n}'),u=document.createElement("style"),mxUtils.write(u,P));return u};Graph.addFont=function(u,H,P){if(null!=u&&0<u.length&&null!=H&&0<H.length){var V=u.toLowerCase();if("helvetica"!=V&&"arial"!=u&&"sans-serif"!=
+V){var Q=Graph.customFontElements[V];null!=Q&&Q.url!=H&&(Q.elt.parentNode.removeChild(Q.elt),Q=null);null==Q?(Q=H,"http:"==H.substring(0,5)&&(Q=PROXY_URL+"?url="+encodeURIComponent(H)),Q={name:u,url:H,elt:Graph.createFontElement(u,Q)},Graph.customFontElements[V]=Q,Graph.recentCustomFonts[V]=Q,H=document.getElementsByTagName("head")[0],null!=P&&("link"==Q.elt.nodeName.toLowerCase()?(Q.elt.onload=P,Q.elt.onerror=P):P()),null!=H&&H.appendChild(Q.elt)):null!=P&&P()}else null!=P&&P()}else null!=P&&P();
+return u};Graph.getFontUrl=function(u,H){u=Graph.customFontElements[u.toLowerCase()];null!=u&&(H=u.url);return H};Graph.processFontAttributes=function(u){u=u.getElementsByTagName("*");for(var H=0;H<u.length;H++){var P=u[H].getAttribute("data-font-src");if(null!=P){var V="FONT"==u[H].nodeName?u[H].getAttribute("face"):u[H].style.fontFamily;null!=V&&Graph.addFont(V,P)}}};Graph.processFontStyle=function(u){if(null!=u){var H=mxUtils.getValue(u,"fontSource",null);if(null!=H){var P=mxUtils.getValue(u,mxConstants.STYLE_FONTFAMILY,
+null);null!=P&&Graph.addFont(P,decodeURIComponent(H))}}return u};Graph.prototype.defaultThemeName="default-style2";Graph.prototype.lastPasteXml=null;Graph.prototype.pasteCounter=0;Graph.prototype.defaultScrollbars="0"!=urlParams.sb;Graph.prototype.defaultPageVisible="0"!=urlParams.pv;Graph.prototype.shadowId="dropShadow";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity="0.4";Graph.prototype.svgShadowBlur="1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.edgeMode="move"!=
+urlParams.edge;Graph.prototype.hiddenTags=null;Graph.prototype.defaultMathEnabled=!1;var I=Graph.prototype.init;Graph.prototype.init=function(){function u(Q){H=Q}I.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var H=null;mxEvent.addListener(this.container,"mouseenter",u);mxEvent.addListener(this.container,"mousemove",u);mxEvent.addListener(this.container,"mouseleave",function(Q){H=null});this.isMouseInsertPoint=function(){return null!=H};var P=this.getInsertPoint;
+this.getInsertPoint=function(){return null!=H?this.getPointForEvent(H):P.apply(this,arguments)};var V=this.layoutManager.getLayout;this.layoutManager.getLayout=function(Q){var da=this.graph.getCellStyle(Q);if(null!=da&&"rack"==da.childLayout){var ea=new mxStackLayout(this.graph,!1);ea.gridSize=null!=da.rackUnitSize?parseFloat(da.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;ea.marginLeft=da.marginLeft||0;ea.marginRight=da.marginRight||0;ea.marginTop=da.marginTop||
+0;ea.marginBottom=da.marginBottom||0;ea.allowGaps=da.allowGaps||0;ea.horizontal="1"==mxUtils.getValue(da,"horizontalRack","0");ea.resizeParent=!1;ea.fill=!0;return ea}return V.apply(this,arguments)};this.updateGlobalUrlVariables()};var G=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(u,H){return Graph.processFontStyle(G.apply(this,arguments))};var Z=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(u,H,P,V,Q,da,ea,fa,pa,ua,
+qa){Z.apply(this,arguments);Graph.processFontAttributes(qa)};var ca=mxText.prototype.redraw;mxText.prototype.redraw=function(){ca.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(u,H,P){function V(){for(var ta=ea.getSelectionCells(),Sa=[],Ra=0;Ra<ta.length;Ra++)ea.isCellVisible(ta[Ra])&&Sa.push(ta[Ra]);ea.setSelectionCells(Sa)}function Q(ta){ea.setHiddenTags(ta?[]:fa.slice());V();ea.refresh()}function da(ta,
+Sa){ua.innerText="";if(0<ta.length){var Ra=document.createElement("table");Ra.setAttribute("cellpadding","2");Ra.style.boxSizing="border-box";Ra.style.tableLayout="fixed";Ra.style.width="100%";var Oa=document.createElement("tbody");if(null!=ta&&0<ta.length)for(var Va=0;Va<ta.length;Va++)(function(Ja){var cb=0>mxUtils.indexOf(ea.hiddenTags,Ja),$a=document.createElement("tr"),y=document.createElement("td");y.style.align="center";y.style.width="16px";var K=document.createElement("img");K.setAttribute("src",
+cb?Editor.visibleImage:Editor.hiddenImage);K.setAttribute("title",mxResources.get(cb?"hideIt":"show",[Ja]));mxUtils.setOpacity(K,cb?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";y.appendChild(K);mxEvent.addListener(K,"click",function(T){mxEvent.isShiftDown(T)?Q(0<=mxUtils.indexOf(ea.hiddenTags,Ja)):(ea.toggleHiddenTag(Ja),V(),ea.refresh());mxEvent.consume(T)});$a.appendChild(y);y=document.createElement("td");
+y.style.overflow="hidden";y.style.whiteSpace="nowrap";y.style.textOverflow="ellipsis";y.style.verticalAlign="middle";y.style.cursor="pointer";y.setAttribute("title",Ja);a=document.createElement("a");mxUtils.write(a,Ja);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,cb?100:40);y.appendChild(a);mxEvent.addListener(y,"click",function(T){if(mxEvent.isShiftDown(T)){Q(!0);var U=ea.getCellsForTags([Ja],null,null,!0);ea.isEnabled()?ea.setSelectionCells(U):ea.highlightCells(U)}else if(cb&&
+0<ea.hiddenTags.length)Q(!0);else{U=fa.slice();var W=mxUtils.indexOf(U,Ja);U.splice(W,1);ea.setHiddenTags(U);V();ea.refresh()}mxEvent.consume(T)});$a.appendChild(y);if(ea.isEnabled()){y=document.createElement("td");y.style.verticalAlign="middle";y.style.textAlign="center";y.style.width="18px";if(null==Sa){y.style.align="center";y.style.width="16px";K=document.createElement("img");K.setAttribute("src",Editor.crossImage);K.setAttribute("title",mxResources.get("removeIt",[Ja]));mxUtils.setOpacity(K,
+cb?75:25);K.style.verticalAlign="middle";K.style.cursor="pointer";K.style.width="16px";if(H||Editor.isDarkMode())K.style.filter="invert(100%)";mxEvent.addListener(K,"click",function(T){var U=mxUtils.indexOf(fa,Ja);0<=U&&fa.splice(U,1);ea.removeTagsForCells(ea.model.getDescendants(ea.model.getRoot()),[Ja]);ea.refresh();mxEvent.consume(T)});y.appendChild(K)}else{var N=document.createElement("input");N.setAttribute("type","checkbox");N.style.margin="0px";N.defaultChecked=null!=Sa&&0<=mxUtils.indexOf(Sa,
+Ja);N.checked=N.defaultChecked;N.style.background="transparent";N.setAttribute("title",mxResources.get(N.defaultChecked?"removeIt":"add",[Ja]));mxEvent.addListener(N,"change",function(T){N.checked?ea.addTagsForCells(ea.getSelectionCells(),[Ja]):ea.removeTagsForCells(ea.getSelectionCells(),[Ja]);mxEvent.consume(T)});y.appendChild(N)}$a.appendChild(y)}Oa.appendChild($a)})(ta[Va]);Ra.appendChild(Oa);ua.appendChild(Ra)}}var ea=this,fa=ea.hiddenTags.slice(),pa=document.createElement("div");pa.style.userSelect=
+"none";pa.style.overflow="hidden";pa.style.padding="10px";pa.style.height="100%";var ua=document.createElement("div");ua.style.boxSizing="border-box";ua.style.borderRadius="4px";ua.style.userSelect="none";ua.style.overflow="auto";ua.style.position="absolute";ua.style.left="10px";ua.style.right="10px";ua.style.top="10px";ua.style.border=ea.isEnabled()?"1px solid #808080":"none";ua.style.bottom=ea.isEnabled()?"48px":"10px";pa.appendChild(ua);var qa=mxUtils.button(mxResources.get("reset"),function(ta){ea.setHiddenTags([]);
+mxEvent.isShiftDown(ta)||(fa=ea.hiddenTags.slice());V();ea.refresh()});qa.setAttribute("title",mxResources.get("reset"));qa.className="geBtn";qa.style.margin="0 4px 0 0";var Da=mxUtils.button(mxResources.get("add"),function(){null!=P&&P(fa,function(ta){fa=ta;Aa()})});Da.setAttribute("title",mxResources.get("add"));Da.className="geBtn";Da.style.margin="0";ea.addListener(mxEvent.ROOT,function(){fa=ea.hiddenTags.slice()});var Aa=mxUtils.bind(this,function(ta,Sa){if(u()){ta=ea.getAllTags();for(Sa=0;Sa<
+ta.length;Sa++)0>mxUtils.indexOf(fa,ta[Sa])&&fa.push(ta[Sa]);fa.sort();ea.isSelectionEmpty()?da(fa):da(fa,ea.getCommonTagsForCells(ea.getSelectionCells()))}});ea.selectionModel.addListener(mxEvent.CHANGE,Aa);ea.model.addListener(mxEvent.CHANGE,Aa);ea.addListener(mxEvent.REFRESH,Aa);var Fa=document.createElement("div");Fa.style.boxSizing="border-box";Fa.style.whiteSpace="nowrap";Fa.style.position="absolute";Fa.style.overflow="hidden";Fa.style.bottom="0px";Fa.style.height="42px";Fa.style.right="10px";
+Fa.style.left="10px";ea.isEnabled()&&(Fa.appendChild(qa),Fa.appendChild(Da),pa.appendChild(Fa));return{div:pa,refresh:Aa}};Graph.prototype.getCustomFonts=function(){var u=this.extFonts;u=null!=u?u.slice():[];for(var H in Graph.customFontElements){var P=Graph.customFontElements[H];u.push({name:P.name,url:P.url})}return u};Graph.prototype.setFont=function(u,H){Graph.addFont(u,H);document.execCommand("fontname",!1,u);if(null!=H){var P=this.cellEditor.textarea.getElementsByTagName("font");H=Graph.getFontUrl(u,
+H);for(var V=0;V<P.length;V++)P[V].getAttribute("face")==u&&P[V].getAttribute("data-font-src")!=H&&P[V].setAttribute("data-font-src",H)}};var ba=Graph.prototype.isFastZoomEnabled;Graph.prototype.isFastZoomEnabled=function(){return ba.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 u=JSON.parse(decodeURIComponent(urlParams.vars));
+if(null!=u)for(var H in u)this.globalVars[H]=u[H]}catch(P){null!=window.console&&console.log("Error in vars URL parameter: "+P)}};Graph.prototype.getExportVariables=function(){return null!=this.globalVars?mxUtils.clone(this.globalVars):{}};var Y=Graph.prototype.getGlobalVariable;Graph.prototype.getGlobalVariable=function(u){var H=Y.apply(this,arguments);null==H&&null!=this.globalVars&&(H=this.globalVars[u]);return H};Graph.prototype.getDefaultStylesheet=function(){if(null==this.defaultStylesheet){var u=
+this.themes["default-style2"];this.defaultStylesheet=(new mxCodec(u.ownerDocument)).decode(u)}return this.defaultStylesheet};Graph.prototype.isViewer=function(){return urlParams.viewer};var O=Graph.prototype.getSvg;Graph.prototype.getSvg=function(u,H,P,V,Q,da,ea,fa,pa,ua,qa,Da,Aa,Fa){var ta=null,Sa=null,Ra=null;Da||null==this.themes||"darkTheme"!=this.defaultThemeName||(ta=this.stylesheet,Sa=this.shapeForegroundColor,Ra=this.shapeBackgroundColor,this.shapeForegroundColor="darkTheme"==this.defaultThemeName?
+"#000000":Editor.lightColor,this.shapeBackgroundColor="darkTheme"==this.defaultThemeName?"#ffffff":Editor.darkColor,this.stylesheet=this.getDefaultStylesheet(),this.refresh());var Oa=O.apply(this,arguments),Va=this.getCustomFonts();if(qa&&0<Va.length){var Ja=Oa.ownerDocument,cb=null!=Ja.createElementNS?Ja.createElementNS(mxConstants.NS_SVG,"style"):Ja.createElement("style");null!=Ja.setAttributeNS?cb.setAttributeNS("type","text/css"):cb.setAttribute("type","text/css");for(var $a="",y="",K=0;K<Va.length;K++){var N=
+Va[K].name,T=Va[K].url;Graph.isCssFontUrl(T)?$a+="@import url("+T+");\n":y+='@font-face {\nfont-family: "'+N+'";\nsrc: url("'+T+'");\n}\n'}cb.appendChild(Ja.createTextNode($a+y));Oa.getElementsByTagName("defs")[0].appendChild(cb)}this.mathEnabled&&(document.body.appendChild(Oa),Editor.MathJaxRender(Oa),Oa.parentNode.removeChild(Oa));null!=ta&&(this.shapeBackgroundColor=Ra,this.shapeForegroundColor=Sa,this.stylesheet=ta,this.refresh());return Oa};var la=mxCellRenderer.prototype.destroy;mxCellRenderer.prototype.destroy=
+function(u){la.apply(this,arguments);null!=u.secondLabel&&(u.secondLabel.destroy(),u.secondLabel=null)};mxCellRenderer.prototype.getShapesForState=function(u){return[u.shape,u.text,u.secondLabel,u.control]};var aa=mxGraphView.prototype.resetValidationState;mxGraphView.prototype.resetValidationState=function(){aa.apply(this,arguments);this.enumerationState=0};var ia=mxGraphView.prototype.stateValidated;mxGraphView.prototype.stateValidated=function(u){null!=u.shape&&this.redrawEnumerationState(u);return ia.apply(this,
arguments)};mxGraphView.prototype.createEnumerationValue=function(u){u=decodeURIComponent(mxUtils.getValue(u.style,"enumerateValue",""));""==u&&(u=++this.enumerationState);return'<div style="padding:2px;border:1px solid gray;background:yellow;border-radius:2px;">'+mxUtils.htmlEntities(u)+"</div>"};mxGraphView.prototype.redrawEnumerationState=function(u){var H="1"==mxUtils.getValue(u.style,"enumerate",0);H&&null==u.secondLabel?(u.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),
-u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):H||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);H=u.secondLabel;if(null!=H){var Q=u.view.scale,X=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*Q,u.y+4*Q,0,0):mxRectangle.fromPoint(u.view.getPoint(u));H.bounds.equals(u)&&H.value==X&&H.scale==Q||(H.bounds=u,H.value=X,H.scale=
-Q,H.redraw())}};var U=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){U.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=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;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var ma=Graph.prototype.refresh;Graph.prototype.refresh=function(){ma.apply(this,
-arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var T=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){T.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,17)&&(u=JSON.parse(u.substring(17)),null!=
-u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,H){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var Q=!1,X=0,R=0,ca=mxUtils.bind(this,function(){Q||(Q=!0,this.model.beginUpdate())}),ea=mxUtils.bind(this,
-function(){Q&&(Q=!1,this.model.endUpdate())}),da=mxUtils.bind(this,function(){0<X&&X--;0==X&&qa()}),qa=mxUtils.bind(this,function(){if(R<u.length){var va=this.stoppingCustomActions,ua=u[R++],Aa=[];if(null!=ua.open)if(ea(),this.isCustomLink(ua.open)){if(!this.customLinkClicked(ua.open))return}else this.openLink(ua.open);null==ua.wait||va||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;da()}),X++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
-""!=ua.wait?parseInt(ua.wait):1E3),ea());null!=ua.opacity&&null!=ua.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(ua.opacity,!0)),ua.opacity.value);null!=ua.fadeIn&&(X++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ua.fadeIn,!0)),0,1,da,va?0:ua.fadeIn.delay));null!=ua.fadeOut&&(X++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(ua.fadeOut,!0)),1,0,da,va?0:ua.fadeOut.delay));null!=ua.wipeIn&&(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(ua.wipeIn,
-!0),!0)));null!=ua.wipeOut&&(Aa=Aa.concat(this.createWipeAnimations(this.getCellsForAction(ua.wipeOut,!0),!1)));null!=ua.toggle&&(ca(),this.toggleCells(this.getCellsForAction(ua.toggle,!0)));if(null!=ua.show){ca();var za=this.getCellsForAction(ua.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(za),1);this.setCellsVisible(za,!0)}null!=ua.hide&&(ca(),za=this.getCellsForAction(ua.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(za),0),this.setCellsVisible(za,!1));null!=ua.toggleStyle&&
-null!=ua.toggleStyle.key&&(ca(),this.toggleCellStyles(ua.toggleStyle.key,null!=ua.toggleStyle.defaultValue?ua.toggleStyle.defaultValue:"0",this.getCellsForAction(ua.toggleStyle,!0)));null!=ua.style&&null!=ua.style.key&&(ca(),this.setCellStyles(ua.style.key,ua.style.value,this.getCellsForAction(ua.style,!0)));za=[];null!=ua.select&&this.isEnabled()&&(za=this.getCellsForAction(ua.select),this.setSelectionCells(za));null!=ua.highlight&&(za=this.getCellsForAction(ua.highlight),this.highlightCells(za,
-ua.highlight.color,ua.highlight.duration,ua.highlight.opacity));null!=ua.scroll&&(za=this.getCellsForAction(ua.scroll));null!=ua.viewbox&&this.fitWindow(ua.viewbox,ua.viewbox.border);0<za.length&&this.scrollCellToVisible(za[0]);if(null!=ua.tags){za=[];null!=ua.tags.hidden&&(za=za.concat(ua.tags.hidden));if(null!=ua.tags.visible)for(var Ca=this.getAllTags(),sa=0;sa<Ca.length;sa++)0>mxUtils.indexOf(ua.tags.visible,Ca[sa])&&0>mxUtils.indexOf(za,Ca[sa])&&za.push(Ca[sa]);this.setHiddenTags(za);this.refresh()}0<
-Aa.length&&(X++,this.executeAnimations(Aa,da,va?1:ua.steps,va?0:ua.delay));0==X?qa():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=H&&H()});qa()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,H){var Q=this.getLinkForCell(H);null!=Q&&"data:action/json,"==Q.substring(0,17)&&this.setLinkForCell(H,this.updateCustomLink(u,Q));if(this.isHtmlLabel(H)){var X=document.createElement("div");X.innerHTML=this.sanitizeHtml(this.getLabel(H));for(var R=X.getElementsByTagName("a"),
-ca=!1,ea=0;ea<R.length;ea++)Q=R[ea].getAttribute("href"),null!=Q&&"data:action/json,"==Q.substring(0,17)&&(R[ea].setAttribute("href",this.updateCustomLink(u,Q)),ca=!0);ca&&this.labelChanged(H,X.innerHTML)}};Graph.prototype.updateCustomLink=function(u,H){if("data:action/json,"==H.substring(0,17))try{var Q=JSON.parse(H.substring(17));null!=Q.actions&&(this.updateCustomLinkActions(u,Q.actions),H="data:action/json,"+JSON.stringify(Q))}catch(X){}return H};Graph.prototype.updateCustomLinkActions=function(u,
-H){for(var Q=0;Q<H.length;Q++){var X=H[Q],R;for(R in X)this.updateCustomLinkAction(u,X[R],"cells"),this.updateCustomLinkAction(u,X[R],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,H,Q){if(null!=H&&null!=H[Q]){for(var X=[],R=0;R<H[Q].length;R++)if("*"==H[Q][R])X.push(H[Q][R]);else{var ca=u[H[Q][R]];null!=ca?""!=ca&&X.push(ca):X.push(H[Q][R])}H[Q]=X}};Graph.prototype.getCellsForAction=function(u,H){H=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,H));if(null!=
-u.excludeCells){for(var Q=[],X=0;X<H.length;X++)0>u.excludeCells.indexOf(H[X].id)&&Q.push(H[X]);H=Q}return H};Graph.prototype.getCellsById=function(u){var H=[];if(null!=u)for(var Q=0;Q<u.length;Q++)if("*"==u[Q]){var X=this.model.getRoot();H=H.concat(this.model.filterDescendants(function(ca){return ca!=X},X))}else{var R=this.model.getCell(u[Q]);null!=R&&H.push(R)}return H};var M=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return M.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};
+u.secondLabel.size=12,u.secondLabel.state=u,u.secondLabel.dialect=mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(u,u.secondLabel)):H||null==u.secondLabel||(u.secondLabel.destroy(),u.secondLabel=null);H=u.secondLabel;if(null!=H){var P=u.view.scale,V=this.createEnumerationValue(u);u=this.graph.model.isVertex(u.cell)?new mxRectangle(u.x+u.width-4*P,u.y+4*P,0,0):mxRectangle.fromPoint(u.view.getPoint(u));H.bounds.equals(u)&&H.value==V&&H.scale==P||(H.bounds=u,H.value=V,H.scale=
+P,H.redraw())}};var X=mxGraphView.prototype.validateBackgroundPage;mxGraphView.prototype.validateBackgroundPage=function(){X.apply(this,arguments);if(mxClient.IS_GC&&null!=this.getDrawPane()){var u=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;",u.ownerSVGElement.parentNode.insertBefore(this.webKitForceRepaintNode,u.ownerSVGElement))}};var R=Graph.prototype.refresh;Graph.prototype.refresh=function(){R.apply(this,
+arguments);this.refreshBackgroundImage()};Graph.prototype.refreshBackgroundImage=function(){null!=this.backgroundImage&&null!=this.backgroundImage.originalSrc&&(this.setBackgroundImage(this.backgroundImage),this.view.validateBackgroundImage())};var sa=Graph.prototype.loadStylesheet;Graph.prototype.loadStylesheet=function(){sa.apply(this,arguments);this.currentStyle="default-style2"};Graph.prototype.handleCustomLink=function(u){"data:action/json,"==u.substring(0,17)&&(u=JSON.parse(u.substring(17)),
+null!=u.actions&&this.executeCustomActions(u.actions))};Graph.prototype.executeCustomActions=function(u,H){if(this.executingCustomActions)this.stoppingCustomActions=!0,null!=this.pendingWaitThread&&window.clearTimeout(this.pendingWaitThread),null!=this.pendingExecuteNextAction&&this.pendingExecuteNextAction(),this.fireEvent(new mxEventObject("stopExecutingCustomActions"));else{this.executingCustomActions=!0;var P=!1,V=0,Q=0,da=mxUtils.bind(this,function(){P||(P=!0,this.model.beginUpdate())}),ea=mxUtils.bind(this,
+function(){P&&(P=!1,this.model.endUpdate())}),fa=mxUtils.bind(this,function(){0<V&&V--;0==V&&pa()}),pa=mxUtils.bind(this,function(){if(Q<u.length){var ua=this.stoppingCustomActions,qa=u[Q++],Da=[];if(null!=qa.open)if(ea(),this.isCustomLink(qa.open)){if(!this.customLinkClicked(qa.open))return}else this.openLink(qa.open);null==qa.wait||ua||(this.pendingExecuteNextAction=mxUtils.bind(this,function(){this.pendingWaitThread=this.pendingExecuteNextAction=null;fa()}),V++,this.pendingWaitThread=window.setTimeout(this.pendingExecuteNextAction,
+""!=qa.wait?parseInt(qa.wait):1E3),ea());null!=qa.opacity&&null!=qa.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(qa.opacity,!0)),qa.opacity.value);null!=qa.fadeIn&&(V++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeIn,!0)),0,1,fa,ua?0:qa.fadeIn.delay));null!=qa.fadeOut&&(V++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(qa.fadeOut,!0)),1,0,fa,ua?0:qa.fadeOut.delay));null!=qa.wipeIn&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeIn,
+!0),!0)));null!=qa.wipeOut&&(Da=Da.concat(this.createWipeAnimations(this.getCellsForAction(qa.wipeOut,!0),!1)));null!=qa.toggle&&(da(),this.toggleCells(this.getCellsForAction(qa.toggle,!0)));if(null!=qa.show){da();var Aa=this.getCellsForAction(qa.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(Aa),1);this.setCellsVisible(Aa,!0)}null!=qa.hide&&(da(),Aa=this.getCellsForAction(qa.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(Aa),0),this.setCellsVisible(Aa,!1));null!=qa.toggleStyle&&
+null!=qa.toggleStyle.key&&(da(),this.toggleCellStyles(qa.toggleStyle.key,null!=qa.toggleStyle.defaultValue?qa.toggleStyle.defaultValue:"0",this.getCellsForAction(qa.toggleStyle,!0)));null!=qa.style&&null!=qa.style.key&&(da(),this.setCellStyles(qa.style.key,qa.style.value,this.getCellsForAction(qa.style,!0)));Aa=[];null!=qa.select&&this.isEnabled()&&(Aa=this.getCellsForAction(qa.select),this.setSelectionCells(Aa));null!=qa.highlight&&(Aa=this.getCellsForAction(qa.highlight),this.highlightCells(Aa,
+qa.highlight.color,qa.highlight.duration,qa.highlight.opacity));null!=qa.scroll&&(Aa=this.getCellsForAction(qa.scroll));null!=qa.viewbox&&this.fitWindow(qa.viewbox,qa.viewbox.border);0<Aa.length&&this.scrollCellToVisible(Aa[0]);if(null!=qa.tags){Aa=[];null!=qa.tags.hidden&&(Aa=Aa.concat(qa.tags.hidden));if(null!=qa.tags.visible)for(var Fa=this.getAllTags(),ta=0;ta<Fa.length;ta++)0>mxUtils.indexOf(qa.tags.visible,Fa[ta])&&0>mxUtils.indexOf(Aa,Fa[ta])&&Aa.push(Fa[ta]);this.setHiddenTags(Aa);this.refresh()}0<
+Da.length&&(V++,this.executeAnimations(Da,fa,ua?1:qa.steps,ua?0:qa.delay));0==V?pa():ea()}else this.stoppingCustomActions=this.executingCustomActions=!1,ea(),null!=H&&H()});pa()}};Graph.prototype.doUpdateCustomLinksForCell=function(u,H){var P=this.getLinkForCell(H);null!=P&&"data:action/json,"==P.substring(0,17)&&this.setLinkForCell(H,this.updateCustomLink(u,P));if(this.isHtmlLabel(H)){var V=document.createElement("div");V.innerHTML=this.sanitizeHtml(this.getLabel(H));for(var Q=V.getElementsByTagName("a"),
+da=!1,ea=0;ea<Q.length;ea++)P=Q[ea].getAttribute("href"),null!=P&&"data:action/json,"==P.substring(0,17)&&(Q[ea].setAttribute("href",this.updateCustomLink(u,P)),da=!0);da&&this.labelChanged(H,V.innerHTML)}};Graph.prototype.updateCustomLink=function(u,H){if("data:action/json,"==H.substring(0,17))try{var P=JSON.parse(H.substring(17));null!=P.actions&&(this.updateCustomLinkActions(u,P.actions),H="data:action/json,"+JSON.stringify(P))}catch(V){}return H};Graph.prototype.updateCustomLinkActions=function(u,
+H){for(var P=0;P<H.length;P++){var V=H[P],Q;for(Q in V)this.updateCustomLinkAction(u,V[Q],"cells"),this.updateCustomLinkAction(u,V[Q],"excludeCells")}};Graph.prototype.updateCustomLinkAction=function(u,H,P){if(null!=H&&null!=H[P]){for(var V=[],Q=0;Q<H[P].length;Q++)if("*"==H[P][Q])V.push(H[P][Q]);else{var da=u[H[P][Q]];null!=da?""!=da&&V.push(da):V.push(H[P][Q])}H[P]=V}};Graph.prototype.getCellsForAction=function(u,H){H=this.getCellsById(u.cells).concat(this.getCellsForTags(u.tags,null,H));if(null!=
+u.excludeCells){for(var P=[],V=0;V<H.length;V++)0>u.excludeCells.indexOf(H[V].id)&&P.push(H[V]);H=P}return H};Graph.prototype.getCellsById=function(u){var H=[];if(null!=u)for(var P=0;P<u.length;P++)if("*"==u[P]){var V=this.model.getRoot();H=H.concat(this.model.filterDescendants(function(da){return da!=V},V))}else{var Q=this.model.getCell(u[P]);null!=Q&&H.push(Q)}return H};var M=Graph.prototype.isCellVisible;Graph.prototype.isCellVisible=function(u){return M.apply(this,arguments)&&!this.isAllTagsHidden(this.getTagsForCell(u))};
Graph.prototype.setHiddenTags=function(u){this.hiddenTags=u;this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.toggleHiddenTag=function(u){var H=mxUtils.indexOf(this.hiddenTags,u);0>H?this.hiddenTags.push(u):0<=H&&this.hiddenTags.splice(H,1);this.fireEvent(new mxEventObject("hiddenTagsChanged"))};Graph.prototype.isAllTagsHidden=function(u){if(null==u||0==u.length||0==this.hiddenTags.length)return!1;u=u.split(" ");if(u.length>this.hiddenTags.length)return!1;for(var H=0;H<u.length;H++)if(0>
-mxUtils.indexOf(this.hiddenTags,u[H]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,H,Q,X){var R=[];if(null!=u){H=null!=H?H:this.model.getDescendants(this.model.getRoot());for(var ca=0,ea={},da=0;da<u.length;da++)0<u[da].length&&(ea[u[da]]=!0,ca++);for(da=0;da<H.length;da++)if(Q&&this.model.getParent(H[da])==this.model.root||this.model.isVertex(H[da])||this.model.isEdge(H[da])){var qa=this.getTagsForCell(H[da]),va=!1;if(0<qa.length&&(qa=qa.split(" "),qa.length>=u.length)){for(var ua=
-va=0;ua<qa.length&&va<ca;ua++)null!=ea[qa[ua]]&&va++;va=va==ca}va&&(1!=X||this.isCellVisible(H[da]))&&R.push(H[da])}}return R};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var H=null,Q=[],X=0;X<u.length;X++){var R=this.getTagsForCell(u[X]);Q=[];if(0<R.length){R=R.split(" ");for(var ca={},ea=0;ea<R.length;ea++)if(null==H||null!=H[R[ea]])ca[R[ea]]=!0,Q.push(R[ea]);H=ca}else return[]}return Q};
-Graph.prototype.getTagsForCells=function(u){for(var H=[],Q={},X=0;X<u.length;X++){var R=this.getTagsForCell(u[X]);if(0<R.length){R=R.split(" ");for(var ca=0;ca<R.length;ca++)null==Q[R[ca]]&&(Q[R[ca]]=!0,H.push(R[ca]))}}return H};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var Q=0;Q<u.length;Q++){for(var X=this.getTagsForCell(u[Q]),R=X.split(" "),ca=
-!1,ea=0;ea<H.length;ea++){var da=mxUtils.trim(H[ea]);""!=da&&0>mxUtils.indexOf(R,da)&&(X=0<X.length?X+" "+da:da,ca=!0)}ca&&this.setAttributeForCell(u[Q],"tags",X)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var Q=0;Q<u.length;Q++){var X=this.getTagsForCell(u[Q]);if(0<X.length){for(var R=X.split(" "),ca=!1,ea=0;ea<H.length;ea++){var da=mxUtils.indexOf(R,H[ea]);0<=da&&(R.splice(da,1),ca=!0)}ca&&this.setAttributeForCell(u[Q],
-"tags",R.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var H=0;H<u.length;H++)this.model.setVisible(u[H],!this.model.isVisible(u[H]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,H){this.model.beginUpdate();try{for(var Q=0;Q<u.length;Q++)this.model.setVisible(u[Q],H)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,H,Q,X){for(var R=0;R<u.length;R++)this.highlightCell(u[R],
-H,Q,X)};Graph.prototype.highlightCell=function(u,H,Q,X,R){H=null!=H?H:mxConstants.DEFAULT_VALID_COLOR;Q=null!=Q?Q:1E3;u=this.view.getState(u);var ca=null;null!=u&&(R=null!=R?R:4,R=Math.max(R+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+R),ca=new mxCellHighlight(this,H,R,!1),null!=X&&(ca.opacity=X),ca.highlight(u),window.setTimeout(function(){null!=ca.shape&&(mxUtils.setPrefixedStyle(ca.shape.node.style,"transition","all 1200ms ease-in-out"),ca.shape.node.style.opacity=0);window.setTimeout(function(){ca.destroy()},
-1200)},Q));return ca};Graph.prototype.addSvgShadow=function(u,H,Q,X){Q=null!=Q?Q:!1;X=null!=X?X:!0;var R=u.ownerDocument,ca=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"filter"):R.createElement("filter");ca.setAttribute("id",this.shadowId);var ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):R.createElement("feGaussianBlur");ea.setAttribute("in","SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");ca.appendChild(ea);
-ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feOffset"):R.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feFlood"):R.createElement("feFlood");ea.setAttribute("flood-color",this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result",
-"offsetColor");ca.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feComposite"):R.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");ca.appendChild(ea);ea=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"feBlend"):R.createElement("feBlend");ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");ca.appendChild(ea);
-ea=u.getElementsByTagName("defs");0==ea.length?(R=null!=R.createElementNS?R.createElementNS(mxConstants.NS_SVG,"defs"):R.createElement("defs"),null!=u.firstChild?u.insertBefore(R,u.firstChild):u.appendChild(R)):R=ea[0];R.appendChild(ca);Q||(H=null!=H?H:u.getElementsByTagName("g")[0],null!=H&&(H.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&X&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+
-6),H=u.getAttribute("viewBox"),null!=H&&0<H.length&&(H=H.split(" "),3<H.length&&(w=parseFloat(H[2])+6,h=parseFloat(H[3])+6,u.setAttribute("viewBox",H[0]+" "+H[1]+" "+w+" "+h))))));return ca};Graph.prototype.setShadowVisible=function(u,H){mxClient.IS_SVG&&!mxClient.IS_SF&&(H=null!=H?H:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),H&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
-function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),H=0;do var Q=this.model.getChildAt(this.model.root,H);while(H++<u&&"1"==mxUtils.getValue(this.getCellStyle(Q),"locked","0"));null!=Q&&this.setDefaultParent(Q)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
+mxUtils.indexOf(this.hiddenTags,u[H]))return!1;return!0};Graph.prototype.getCellsForTags=function(u,H,P,V){var Q=[];if(null!=u){H=null!=H?H:this.model.getDescendants(this.model.getRoot());for(var da=0,ea={},fa=0;fa<u.length;fa++)0<u[fa].length&&(ea[u[fa]]=!0,da++);for(fa=0;fa<H.length;fa++)if(P&&this.model.getParent(H[fa])==this.model.root||this.model.isVertex(H[fa])||this.model.isEdge(H[fa])){var pa=this.getTagsForCell(H[fa]),ua=!1;if(0<pa.length&&(pa=pa.split(" "),pa.length>=u.length)){for(var qa=
+ua=0;qa<pa.length&&ua<da;qa++)null!=ea[pa[qa]]&&ua++;ua=ua==da}ua&&(1!=V||this.isCellVisible(H[fa]))&&Q.push(H[fa])}}return Q};Graph.prototype.getAllTags=function(){return this.getTagsForCells(this.model.getDescendants(this.model.getRoot()))};Graph.prototype.getCommonTagsForCells=function(u){for(var H=null,P=[],V=0;V<u.length;V++){var Q=this.getTagsForCell(u[V]);P=[];if(0<Q.length){Q=Q.split(" ");for(var da={},ea=0;ea<Q.length;ea++)if(null==H||null!=H[Q[ea]])da[Q[ea]]=!0,P.push(Q[ea]);H=da}else return[]}return P};
+Graph.prototype.getTagsForCells=function(u){for(var H=[],P={},V=0;V<u.length;V++){var Q=this.getTagsForCell(u[V]);if(0<Q.length){Q=Q.split(" ");for(var da=0;da<Q.length;da++)null==P[Q[da]]&&(P[Q[da]]=!0,H.push(Q[da]))}}return H};Graph.prototype.getTagsForCell=function(u){return this.getAttributeForCell(u,"tags","")};Graph.prototype.addTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){for(var V=this.getTagsForCell(u[P]),Q=V.split(" "),da=
+!1,ea=0;ea<H.length;ea++){var fa=mxUtils.trim(H[ea]);""!=fa&&0>mxUtils.indexOf(Q,fa)&&(V=0<V.length?V+" "+fa:fa,da=!0)}da&&this.setAttributeForCell(u[P],"tags",V)}}finally{this.model.endUpdate()}}};Graph.prototype.removeTagsForCells=function(u,H){if(0<u.length&&0<H.length){this.model.beginUpdate();try{for(var P=0;P<u.length;P++){var V=this.getTagsForCell(u[P]);if(0<V.length){for(var Q=V.split(" "),da=!1,ea=0;ea<H.length;ea++){var fa=mxUtils.indexOf(Q,H[ea]);0<=fa&&(Q.splice(fa,1),da=!0)}da&&this.setAttributeForCell(u[P],
+"tags",Q.join(" "))}}}finally{this.model.endUpdate()}}};Graph.prototype.toggleCells=function(u){this.model.beginUpdate();try{for(var H=0;H<u.length;H++)this.model.setVisible(u[H],!this.model.isVisible(u[H]))}finally{this.model.endUpdate()}};Graph.prototype.setCellsVisible=function(u,H){this.model.beginUpdate();try{for(var P=0;P<u.length;P++)this.model.setVisible(u[P],H)}finally{this.model.endUpdate()}};Graph.prototype.highlightCells=function(u,H,P,V){for(var Q=0;Q<u.length;Q++)this.highlightCell(u[Q],
+H,P,V)};Graph.prototype.highlightCell=function(u,H,P,V,Q){H=null!=H?H:mxConstants.DEFAULT_VALID_COLOR;P=null!=P?P:1E3;u=this.view.getState(u);var da=null;null!=u&&(Q=null!=Q?Q:4,Q=Math.max(Q+1,mxUtils.getValue(u.style,mxConstants.STYLE_STROKEWIDTH,1)+Q),da=new mxCellHighlight(this,H,Q,!1),null!=V&&(da.opacity=V),da.highlight(u),window.setTimeout(function(){null!=da.shape&&(mxUtils.setPrefixedStyle(da.shape.node.style,"transition","all 1200ms ease-in-out"),da.shape.node.style.opacity=0);window.setTimeout(function(){da.destroy()},
+1200)},P));return da};Graph.prototype.addSvgShadow=function(u,H,P,V){P=null!=P?P:!1;V=null!=V?V:!0;var Q=u.ownerDocument,da=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"filter"):Q.createElement("filter");da.setAttribute("id",this.shadowId);var ea=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feGaussianBlur"):Q.createElement("feGaussianBlur");ea.setAttribute("in","SourceAlpha");ea.setAttribute("stdDeviation",this.svgShadowBlur);ea.setAttribute("result","blur");da.appendChild(ea);
+ea=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feOffset"):Q.createElement("feOffset");ea.setAttribute("in","blur");ea.setAttribute("dx",this.svgShadowSize);ea.setAttribute("dy",this.svgShadowSize);ea.setAttribute("result","offsetBlur");da.appendChild(ea);ea=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feFlood"):Q.createElement("feFlood");ea.setAttribute("flood-color",this.svgShadowColor);ea.setAttribute("flood-opacity",this.svgShadowOpacity);ea.setAttribute("result",
+"offsetColor");da.appendChild(ea);ea=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feComposite"):Q.createElement("feComposite");ea.setAttribute("in","offsetColor");ea.setAttribute("in2","offsetBlur");ea.setAttribute("operator","in");ea.setAttribute("result","offsetBlur");da.appendChild(ea);ea=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"feBlend"):Q.createElement("feBlend");ea.setAttribute("in","SourceGraphic");ea.setAttribute("in2","offsetBlur");da.appendChild(ea);
+ea=u.getElementsByTagName("defs");0==ea.length?(Q=null!=Q.createElementNS?Q.createElementNS(mxConstants.NS_SVG,"defs"):Q.createElement("defs"),null!=u.firstChild?u.insertBefore(Q,u.firstChild):u.appendChild(Q)):Q=ea[0];Q.appendChild(da);P||(H=null!=H?H:u.getElementsByTagName("g")[0],null!=H&&(H.setAttribute("filter","url(#"+this.shadowId+")"),!isNaN(parseInt(u.getAttribute("width")))&&V&&(u.setAttribute("width",parseInt(u.getAttribute("width"))+6),u.setAttribute("height",parseInt(u.getAttribute("height"))+
+6),H=u.getAttribute("viewBox"),null!=H&&0<H.length&&(H=H.split(" "),3<H.length&&(w=parseFloat(H[2])+6,h=parseFloat(H[3])+6,u.setAttribute("viewBox",H[0]+" "+H[1]+" "+w+" "+h))))));return da};Graph.prototype.setShadowVisible=function(u,H){mxClient.IS_SVG&&!mxClient.IS_SF&&(H=null!=H?H:!0,(this.shadowVisible=u)?this.view.getDrawPane().setAttribute("filter","url(#"+this.shadowId+")"):this.view.getDrawPane().removeAttribute("filter"),H&&this.fireEvent(new mxEventObject("shadowVisibleChanged")))};Graph.prototype.selectUnlockedLayer=
+function(){if(null==this.defaultParent){var u=this.model.getChildCount(this.model.root),H=0;do var P=this.model.getChildAt(this.model.root,H);while(H++<u&&"1"==mxUtils.getValue(this.getCellStyle(P),"locked","0"));null!=P&&this.setDefaultParent(P)}};mxStencilRegistry.libraries.mockup=[SHAPES_PATH+"/mockup/mxMockupButtons.js"];mxStencilRegistry.libraries.arrows2=[SHAPES_PATH+"/mxArrows.js"];mxStencilRegistry.libraries.atlassian=[STENCIL_PATH+"/atlassian.xml",SHAPES_PATH+"/mxAtlassian.js"];mxStencilRegistry.libraries.bpmn=
[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.bpmn2=[SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bpmn.xml",SHAPES_PATH+"/bpmn/mxBpmnShape2.js"];mxStencilRegistry.libraries.c4=[SHAPES_PATH+"/mxC4.js"];mxStencilRegistry.libraries.cisco19=[SHAPES_PATH+"/mxCisco19.js",STENCIL_PATH+"/cisco19.xml"];mxStencilRegistry.libraries.cisco_safe=[SHAPES_PATH+"/mxCiscoSafe.js",STENCIL_PATH+"/cisco_safe/architecture.xml",STENCIL_PATH+"/cisco_safe/business_icons.xml",
STENCIL_PATH+"/cisco_safe/capability.xml",STENCIL_PATH+"/cisco_safe/design.xml",STENCIL_PATH+"/cisco_safe/iot_things_icons.xml",STENCIL_PATH+"/cisco_safe/people_places_things_icons.xml",STENCIL_PATH+"/cisco_safe/security_icons.xml",STENCIL_PATH+"/cisco_safe/technology_icons.xml",STENCIL_PATH+"/cisco_safe/threat.xml"];mxStencilRegistry.libraries.dfd=[SHAPES_PATH+"/mxDFD.js"];mxStencilRegistry.libraries.er=[SHAPES_PATH+"/er/mxER.js"];mxStencilRegistry.libraries.kubernetes=[SHAPES_PATH+"/mxKubernetes.js",
STENCIL_PATH+"/kubernetes.xml"];mxStencilRegistry.libraries.flowchart=[SHAPES_PATH+"/mxFlowchart.js",STENCIL_PATH+"/flowchart.xml"];mxStencilRegistry.libraries.ios=[SHAPES_PATH+"/mockup/mxMockupiOS.js"];mxStencilRegistry.libraries.rackGeneral=[SHAPES_PATH+"/rack/mxRack.js",STENCIL_PATH+"/rack/general.xml"];mxStencilRegistry.libraries.rackF5=[STENCIL_PATH+"/rack/f5.xml"];mxStencilRegistry.libraries.lean_mapping=[SHAPES_PATH+"/mxLeanMap.js",STENCIL_PATH+"/lean_mapping.xml"];mxStencilRegistry.libraries.basic=
@@ -3333,476 +3348,477 @@ STENCIL_PATH+"/mockup/misc.xml"];mxStencilRegistry.libraries["mockup/markup"]=[S
STENCIL_PATH+"/floorplan.xml"];mxStencilRegistry.libraries.bootstrap=[SHAPES_PATH+"/mxBootstrap.js",SHAPES_PATH+"/mxBasic.js",STENCIL_PATH+"/bootstrap.xml"];mxStencilRegistry.libraries.gmdl=[SHAPES_PATH+"/mxGmdl.js",STENCIL_PATH+"/gmdl.xml"];mxStencilRegistry.libraries.gcp2=[SHAPES_PATH+"/mxGCP2.js",STENCIL_PATH+"/gcp2.xml"];mxStencilRegistry.libraries.ibm=[SHAPES_PATH+"/mxIBM.js",STENCIL_PATH+"/ibm.xml"];mxStencilRegistry.libraries.cabinets=[SHAPES_PATH+"/mxCabinets.js",STENCIL_PATH+"/cabinets.xml"];
mxStencilRegistry.libraries.archimate=[SHAPES_PATH+"/mxArchiMate.js"];mxStencilRegistry.libraries.archimate3=[SHAPES_PATH+"/mxArchiMate3.js"];mxStencilRegistry.libraries.sysml=[SHAPES_PATH+"/mxSysML.js"];mxStencilRegistry.libraries.eip=[SHAPES_PATH+"/mxEip.js",STENCIL_PATH+"/eip.xml"];mxStencilRegistry.libraries.networks=[SHAPES_PATH+"/mxNetworks.js",STENCIL_PATH+"/networks.xml"];mxStencilRegistry.libraries.aws3d=[SHAPES_PATH+"/mxAWS3D.js",STENCIL_PATH+"/aws3d.xml"];mxStencilRegistry.libraries.aws4=
[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.aws4b=[SHAPES_PATH+"/mxAWS4.js",STENCIL_PATH+"/aws4.xml"];mxStencilRegistry.libraries.uml25=[SHAPES_PATH+"/mxUML25.js"];mxStencilRegistry.libraries.veeam=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam.xml"];mxStencilRegistry.libraries.veeam2=[STENCIL_PATH+"/veeam/2d.xml",STENCIL_PATH+"/veeam/3d.xml",STENCIL_PATH+"/veeam/veeam2.xml"];mxStencilRegistry.libraries.pid2inst=[SHAPES_PATH+
-"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var H=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?H="mxgraph.er":"sysML"==u.substring(0,5)&&(H="mxgraph.sysml"));return H};var ia=mxMarker.createMarker;mxMarker.createMarker=
-function(u,H,Q,X,R,ca,ea,da,qa,va){if(null!=Q&&null==mxMarker.markers[Q]){var ua=this.getPackageForType(Q);null!=ua&&mxStencilRegistry.getStencil(ua)}return ia.apply(this,arguments)};var N=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,H,Q,X,R,ca){"1"==mxUtils.getValue(H.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(H.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return N.apply(this,arguments)};PrintDialog.prototype.create=function(u,H){function Q(){za.value=
-Math.max(1,Math.min(da,Math.max(parseInt(za.value),parseInt(Aa.value))));Aa.value=Math.max(1,Math.min(da,Math.min(parseInt(za.value),parseInt(Aa.value))))}function X(ta){function Da(bb,eb,kb){var ib=bb.useCssTransforms,pb=bb.currentTranslate,vb=bb.currentScale,ob=bb.view.translate,Bb=bb.view.scale;bb.useCssTransforms&&(bb.useCssTransforms=!1,bb.currentTranslate=new mxPoint(0,0),bb.currentScale=1,bb.view.translate=new mxPoint(0,0),bb.view.scale=1);var yb=bb.getGraphBounds(),nb=0,qb=0,fb=ya.get(),rb=
-1/bb.pageScale,tb=Ra.checked;if(tb){rb=parseInt(ja.value);var zb=parseInt(na.value);rb=Math.min(fb.height*zb/(yb.height/bb.view.scale),fb.width*rb/(yb.width/bb.view.scale))}else rb=parseInt(Ua.value)/(100*bb.pageScale),isNaN(rb)&&(Oa=1/bb.pageScale,Ua.value="100 %");fb=mxRectangle.fromRectangle(fb);fb.width=Math.ceil(fb.width*Oa);fb.height=Math.ceil(fb.height*Oa);rb*=Oa;!tb&&bb.pageVisible?(yb=bb.getPageLayout(),nb-=yb.x*fb.width,qb-=yb.y*fb.height):tb=!0;if(null==eb){eb=PrintDialog.createPrintPreview(bb,
-rb,fb,0,nb,qb,tb);eb.pageSelector=!1;eb.mathEnabled=!1;Ca.checked&&(eb.isCellVisible=function(lb){return bb.isCellSelected(lb)});nb=u.getCurrentFile();null!=nb&&(eb.title=nb.getTitle());var wb=eb.writeHead;eb.writeHead=function(lb){wb.apply(this,arguments);mxClient.IS_GC&&(lb.writeln('<style type="text/css">'),lb.writeln("@media print {"),lb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),lb.writeln("}"),lb.writeln("</style>"));null!=u.editor.fontCss&&(lb.writeln('<style type="text/css">'),
-lb.writeln(u.editor.fontCss),lb.writeln("</style>"));for(var xb=bb.getCustomFonts(),c=0;c<xb.length;c++){var l=xb[c].name,x=xb[c].url;Graph.isCssFontUrl(x)?lb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(lb.writeln('<style type="text/css">'),lb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(l)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),lb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var Ab=eb.renderPage;eb.renderPage=
-function(lb,xb,c,l,x,p){var v=mxClient.NO_FO,A=Ab.apply(this,arguments);mxClient.NO_FO=v;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:A.className="geDisableMathJax";return A}}nb=null;qb=R.shapeForegroundColor;tb=R.shapeBackgroundColor;fb=R.enableFlowAnimation;R.enableFlowAnimation=!1;null!=R.themes&&"darkTheme"==R.defaultThemeName&&(nb=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());eb.open(null,null,
-kb,!0);R.enableFlowAnimation=fb;null!=nb&&(R.shapeForegroundColor=qb,R.shapeBackgroundColor=tb,R.stylesheet=nb,R.refresh())}else{fb=bb.background;if(null==fb||""==fb||fb==mxConstants.NONE)fb="#ffffff";eb.backgroundColor=fb;eb.autoOrigin=tb;eb.appendGraph(bb,rb,nb,qb,kb,!0);kb=bb.getCustomFonts();if(null!=eb.wnd)for(nb=0;nb<kb.length;nb++)qb=kb[nb].name,tb=kb[nb].url,Graph.isCssFontUrl(tb)?eb.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):
-(eb.wnd.document.writeln('<style type="text/css">'),eb.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(qb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),eb.wnd.document.writeln("</style>"))}ib&&(bb.useCssTransforms=ib,bb.currentTranslate=pb,bb.currentScale=vb,bb.view.translate=ob,bb.view.scale=Bb);return eb}var Oa=parseInt(ra.value)/100;isNaN(Oa)&&(Oa=1,ra.value="100 %");Oa*=.75;var Ma=null,Wa=R.shapeForegroundColor,Sa=R.shapeBackgroundColor;null!=R.themes&&"darkTheme"==
-R.defaultThemeName&&(Ma=R.stylesheet,R.stylesheet=R.getDefaultStylesheet(),R.shapeForegroundColor="#000000",R.shapeBackgroundColor="#ffffff",R.refresh());var Fa=Aa.value,Ja=za.value,xa=!va.checked,Ba=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,va.checked,Fa,Ja,Ra.checked,ja.value,na.value,parseInt(Ua.value)/100,parseInt(ra.value)/100,ya.get());else{xa&&(xa=Ca.checked||Fa==qa&&Ja==qa);if(!xa&&null!=u.pages&&u.pages.length){var Pa=0;xa=u.pages.length-1;va.checked||(Pa=parseInt(Fa)-1,
-xa=parseInt(Ja)-1);for(var Ka=Pa;Ka<=xa;Ka++){var Na=u.pages[Ka];Fa=Na==u.currentPage?R:null;if(null==Fa){Fa=u.createTemporaryGraph(R.stylesheet);Fa.shapeForegroundColor=R.shapeForegroundColor;Fa.shapeBackgroundColor=R.shapeBackgroundColor;Ja=!0;Pa=!1;var hb=null,Qa=null;null==Na.viewState&&null==Na.root&&u.updatePageRoot(Na);null!=Na.viewState&&(Ja=Na.viewState.pageVisible,Pa=Na.viewState.mathEnabled,hb=Na.viewState.background,Qa=Na.viewState.backgroundImage,Fa.extFonts=Na.viewState.extFonts);null!=
-Qa&&null!=Qa.originalSrc&&(Qa=u.createImageForPageLink(Qa.originalSrc,Na));Fa.background=hb;Fa.backgroundImage=null!=Qa?new mxImage(Qa.src,Qa.width,Qa.height,Qa.x,Qa.y):null;Fa.pageVisible=Ja;Fa.mathEnabled=Pa;var mb=Fa.getGraphBounds;Fa.getGraphBounds=function(){var bb=mb.apply(this,arguments),eb=this.backgroundImage;if(null!=eb&&null!=eb.width&&null!=eb.height){var kb=this.view.translate,ib=this.view.scale;bb=mxRectangle.fromRectangle(bb);bb.add(new mxRectangle((kb.x+eb.x)*ib,(kb.y+eb.y)*ib,eb.width*
-ib,eb.height*ib))}return bb};var ub=Fa.getGlobalVariable;Fa.getGlobalVariable=function(bb){return"page"==bb?Na.getName():"pagenumber"==bb?Ka+1:"pagecount"==bb?null!=u.pages?u.pages.length:1:ub.apply(this,arguments)};document.body.appendChild(Fa.container);u.updatePageRoot(Na);Fa.model.setRoot(Na.root)}Ba=Da(Fa,Ba,Ka!=xa);Fa!=R&&Fa.container.parentNode.removeChild(Fa.container)}}else Ba=Da(R);null==Ba?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Ba.mathEnabled&&(xa=Ba.wnd.document,
-ta&&(Ba.wnd.IMMEDIATE_PRINT=!0),xa.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Ba.closeDocument(),!Ba.mathEnabled&&ta&&PrintDialog.printPreview(Ba));null!=Ma&&(R.shapeForegroundColor=Wa,R.shapeBackgroundColor=Sa,R.stylesheet=Ma,R.refresh())}}var R=u.editor.graph,ca=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,H||mxResources.get("print"));
-ca.appendChild(ea);var da=1,qa=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var va=document.createElement("input");va.style.cssText="margin-right:8px;margin-bottom:8px;";va.setAttribute("value","all");va.setAttribute("type","radio");va.setAttribute("name","pages-printdialog");ea.appendChild(va);H=document.createElement("span");mxUtils.write(H,mxResources.get("printAllPages"));ea.appendChild(H);mxUtils.br(ea);var ua=
-va.cloneNode(!0);va.setAttribute("checked","checked");ua.setAttribute("value","range");ea.appendChild(ua);H=document.createElement("span");mxUtils.write(H,mxResources.get("pages")+":");ea.appendChild(H);var Aa=document.createElement("input");Aa.style.cssText="margin:0 8px 0 8px;";Aa.setAttribute("value","1");Aa.setAttribute("type","number");Aa.setAttribute("min","1");Aa.style.width="50px";ea.appendChild(Aa);H=document.createElement("span");mxUtils.write(H,mxResources.get("to"));ea.appendChild(H);
-var za=Aa.cloneNode(!0);ea.appendChild(za);mxEvent.addListener(Aa,"focus",function(){ua.checked=!0});mxEvent.addListener(za,"focus",function(){ua.checked=!0});mxEvent.addListener(Aa,"change",Q);mxEvent.addListener(za,"change",Q);if(null!=u.pages&&(da=u.pages.length,null!=u.currentPage))for(H=0;H<u.pages.length;H++)if(u.currentPage==u.pages[H]){qa=H+1;Aa.value=qa;za.value=qa;break}Aa.setAttribute("max",da);za.setAttribute("max",da);u.isPagesEnabled()?1<da&&(ca.appendChild(ea),ua.checked=!0):ua.checked=
-!0;mxUtils.br(ea);var Ca=document.createElement("input");Ca.setAttribute("value","all");Ca.setAttribute("type","radio");Ca.style.marginRight="8px";R.isSelectionEmpty()&&Ca.setAttribute("disabled","disabled");var sa=document.createElement("div");sa.style.marginBottom="10px";1==da?(Ca.setAttribute("type","checkbox"),Ca.style.marginBottom="12px",sa.appendChild(Ca)):(Ca.setAttribute("name","pages-printdialog"),Ca.style.marginBottom="8px",ea.appendChild(Ca));H=document.createElement("span");mxUtils.write(H,
-mxResources.get("selectionOnly"));Ca.parentNode.appendChild(H);1==da&&mxUtils.br(Ca.parentNode);var Va=document.createElement("input");Va.style.marginRight="8px";Va.setAttribute("value","adjust");Va.setAttribute("type","radio");Va.setAttribute("name","printZoom");sa.appendChild(Va);H=document.createElement("span");mxUtils.write(H,mxResources.get("adjustTo"));sa.appendChild(H);var Ua=document.createElement("input");Ua.style.cssText="margin:0 8px 0 8px;";Ua.setAttribute("value","100 %");Ua.style.width=
-"50px";sa.appendChild(Ua);mxEvent.addListener(Ua,"focus",function(){Va.checked=!0});ca.appendChild(sa);ea=ea.cloneNode(!1);var Ra=Va.cloneNode(!0);Ra.setAttribute("value","fit");Va.setAttribute("checked","checked");H=document.createElement("div");H.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";H.appendChild(Ra);ea.appendChild(H);sa=document.createElement("table");sa.style.display="inline-block";var Za=document.createElement("tbody"),Ha=document.createElement("tr"),db=Ha.cloneNode(!0),
-cb=document.createElement("td"),y=cb.cloneNode(!0),K=cb.cloneNode(!0),L=cb.cloneNode(!0),S=cb.cloneNode(!0),V=cb.cloneNode(!0);cb.style.textAlign="right";L.style.textAlign="right";mxUtils.write(cb,mxResources.get("fitTo"));var ja=document.createElement("input");ja.style.cssText="margin:0 8px 0 8px;";ja.setAttribute("value","1");ja.setAttribute("min","1");ja.setAttribute("type","number");ja.style.width="40px";y.appendChild(ja);H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsAcross"));
-K.appendChild(H);mxUtils.write(L,mxResources.get("fitToBy"));var na=ja.cloneNode(!0);S.appendChild(na);mxEvent.addListener(ja,"focus",function(){Ra.checked=!0});mxEvent.addListener(na,"focus",function(){Ra.checked=!0});H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsDown"));V.appendChild(H);Ha.appendChild(cb);Ha.appendChild(y);Ha.appendChild(K);db.appendChild(L);db.appendChild(S);db.appendChild(V);Za.appendChild(Ha);Za.appendChild(db);sa.appendChild(Za);ea.appendChild(sa);
-ca.appendChild(ea);ea=document.createElement("div");H=document.createElement("div");H.style.fontWeight="bold";H.style.marginBottom="12px";mxUtils.write(H,mxResources.get("paperSize"));ea.appendChild(H);H=document.createElement("div");H.style.marginBottom="12px";var ya=PageSetupDialog.addPageFormatPanel(H,"printdialog",u.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(H);H=document.createElement("span");mxUtils.write(H,mxResources.get("pageScale"));ea.appendChild(H);var ra=
-document.createElement("input");ra.style.cssText="margin:0 8px 0 8px;";ra.setAttribute("value","100 %");ra.style.width="60px";ea.appendChild(ra);ca.appendChild(ea);H=document.createElement("div");H.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});ea.className="geBtn";u.editor.cancelFirst&&H.appendChild(ea);u.isOffline()||(sa=mxUtils.button(mxResources.get("help"),function(){R.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
-sa.className="geBtn",H.appendChild(sa));PrintDialog.previewEnabled&&(sa=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();X(!1)}),sa.className="geBtn",H.appendChild(sa));sa=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();X(!0)});sa.className="geBtn gePrimaryBtn";H.appendChild(sa);u.editor.cancelFirst||H.appendChild(ea);ca.appendChild(H);this.container=ca};var P=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
+"/pid2/mxPidInstruments.js"];mxStencilRegistry.libraries.pid2misc=[SHAPES_PATH+"/pid2/mxPidMisc.js",STENCIL_PATH+"/pid/misc.xml"];mxStencilRegistry.libraries.pid2valves=[SHAPES_PATH+"/pid2/mxPidValves.js"];mxStencilRegistry.libraries.pidFlowSensors=[STENCIL_PATH+"/pid/flow_sensors.xml"];mxMarker.getPackageForType=function(u){var H=null;null!=u&&0<u.length&&("ER"==u.substring(0,2)?H="mxgraph.er":"sysML"==u.substring(0,5)&&(H="mxgraph.sysml"));return H};var ka=mxMarker.createMarker;mxMarker.createMarker=
+function(u,H,P,V,Q,da,ea,fa,pa,ua){if(null!=P&&null==mxMarker.markers[P]){var qa=this.getPackageForType(P);null!=qa&&mxStencilRegistry.getStencil(qa)}return ka.apply(this,arguments)};var L=mxStencil.prototype.drawShape;mxStencil.prototype.drawShape=function(u,H,P,V,Q,da){"1"==mxUtils.getValue(H.style,"lineShape",null)&&u.setFillColor(mxUtils.getValue(H.style,mxConstants.STYLE_STROKECOLOR,this.stroke));return L.apply(this,arguments)};PrintDialog.prototype.create=function(u,H){function P(){Aa.value=
+Math.max(1,Math.min(fa,Math.max(parseInt(Aa.value),parseInt(Da.value))));Da.value=Math.max(1,Math.min(fa,Math.min(parseInt(Aa.value),parseInt(Da.value))))}function V(xa){function Ea(Ya,ab,kb){var hb=Ya.useCssTransforms,ob=Ya.currentTranslate,vb=Ya.currentScale,nb=Ya.view.translate,Bb=Ya.view.scale;Ya.useCssTransforms&&(Ya.useCssTransforms=!1,Ya.currentTranslate=new mxPoint(0,0),Ya.currentScale=1,Ya.view.translate=new mxPoint(0,0),Ya.view.scale=1);var yb=Ya.getGraphBounds(),mb=0,pb=0,db=wa.get(),rb=
+1/Ya.pageScale,tb=Oa.checked;if(tb){rb=parseInt(W.value);var zb=parseInt(na.value);rb=Math.min(db.height*zb/(yb.height/Ya.view.scale),db.width*rb/(yb.width/Ya.view.scale))}else rb=parseInt(Ra.value)/(100*Ya.pageScale),isNaN(rb)&&(Na=1/Ya.pageScale,Ra.value="100 %");db=mxRectangle.fromRectangle(db);db.width=Math.ceil(db.width*Na);db.height=Math.ceil(db.height*Na);rb*=Na;!tb&&Ya.pageVisible?(yb=Ya.getPageLayout(),mb-=yb.x*db.width,pb-=yb.y*db.height):tb=!0;if(null==ab){ab=PrintDialog.createPrintPreview(Ya,
+rb,db,0,mb,pb,tb);ab.pageSelector=!1;ab.mathEnabled=!1;Fa.checked&&(ab.isCellVisible=function(lb){return Ya.isCellSelected(lb)});mb=u.getCurrentFile();null!=mb&&(ab.title=mb.getTitle());var wb=ab.writeHead;ab.writeHead=function(lb){wb.apply(this,arguments);mxClient.IS_GC&&(lb.writeln('<style type="text/css">'),lb.writeln("@media print {"),lb.writeln(".MathJax svg { shape-rendering: crispEdges; }"),lb.writeln("}"),lb.writeln("</style>"));null!=u.editor.fontCss&&(lb.writeln('<style type="text/css">'),
+lb.writeln(u.editor.fontCss),lb.writeln("</style>"));for(var xb=Ya.getCustomFonts(),c=0;c<xb.length;c++){var m=xb[c].name,x=xb[c].url;Graph.isCssFontUrl(x)?lb.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(x)+'" charset="UTF-8" type="text/css">'):(lb.writeln('<style type="text/css">'),lb.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(m)+'";\nsrc: url("'+mxUtils.htmlEntities(x)+'");\n}'),lb.writeln("</style>"))}};if("undefined"!==typeof MathJax){var Ab=ab.renderPage;ab.renderPage=
+function(lb,xb,c,m,x,p){var v=mxClient.NO_FO,A=Ab.apply(this,arguments);mxClient.NO_FO=v;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:A.className="geDisableMathJax";return A}}mb=null;pb=Q.shapeForegroundColor;tb=Q.shapeBackgroundColor;db=Q.enableFlowAnimation;Q.enableFlowAnimation=!1;null!=Q.themes&&"darkTheme"==Q.defaultThemeName&&(mb=Q.stylesheet,Q.stylesheet=Q.getDefaultStylesheet(),Q.shapeForegroundColor="#000000",Q.shapeBackgroundColor="#ffffff",Q.refresh());ab.open(null,null,
+kb,!0);Q.enableFlowAnimation=db;null!=mb&&(Q.shapeForegroundColor=pb,Q.shapeBackgroundColor=tb,Q.stylesheet=mb,Q.refresh())}else{db=Ya.background;if(null==db||""==db||db==mxConstants.NONE)db="#ffffff";ab.backgroundColor=db;ab.autoOrigin=tb;ab.appendGraph(Ya,rb,mb,pb,kb,!0);kb=Ya.getCustomFonts();if(null!=ab.wnd)for(mb=0;mb<kb.length;mb++)pb=kb[mb].name,tb=kb[mb].url,Graph.isCssFontUrl(tb)?ab.wnd.document.writeln('<link rel="stylesheet" href="'+mxUtils.htmlEntities(tb)+'" charset="UTF-8" type="text/css">'):
+(ab.wnd.document.writeln('<style type="text/css">'),ab.wnd.document.writeln('@font-face {\nfont-family: "'+mxUtils.htmlEntities(pb)+'";\nsrc: url("'+mxUtils.htmlEntities(tb)+'");\n}'),ab.wnd.document.writeln("</style>"))}hb&&(Ya.useCssTransforms=hb,Ya.currentTranslate=ob,Ya.currentScale=vb,Ya.view.translate=nb,Ya.view.scale=Bb);return ab}var Na=parseInt(ra.value)/100;isNaN(Na)&&(Na=1,ra.value="100 %");Na*=.75;var Ma=null,za=Q.shapeForegroundColor,Ba=Q.shapeBackgroundColor;null!=Q.themes&&"darkTheme"==
+Q.defaultThemeName&&(Ma=Q.stylesheet,Q.stylesheet=Q.getDefaultStylesheet(),Q.shapeForegroundColor="#000000",Q.shapeBackgroundColor="#ffffff",Q.refresh());var Ca=Da.value,ya=Aa.value,Ga=!ua.checked,Za=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(u,ua.checked,Ca,ya,Oa.checked,W.value,na.value,parseInt(Ra.value)/100,parseInt(ra.value)/100,wa.get());else{Ga&&(Ga=Fa.checked||Ca==pa&&ya==pa);if(!Ga&&null!=u.pages&&u.pages.length){var Pa=0;Ga=u.pages.length-1;ua.checked||(Pa=parseInt(Ca)-1,Ga=
+parseInt(ya)-1);for(var fb=Pa;fb<=Ga;fb++){var bb=u.pages[fb];Ca=bb==u.currentPage?Q:null;if(null==Ca){Ca=u.createTemporaryGraph(Q.stylesheet);Ca.shapeForegroundColor=Q.shapeForegroundColor;Ca.shapeBackgroundColor=Q.shapeBackgroundColor;ya=!0;Pa=!1;var jb=null,eb=null;null==bb.viewState&&null==bb.root&&u.updatePageRoot(bb);null!=bb.viewState&&(ya=bb.viewState.pageVisible,Pa=bb.viewState.mathEnabled,jb=bb.viewState.background,eb=bb.viewState.backgroundImage,Ca.extFonts=bb.viewState.extFonts);null!=
+eb&&null!=eb.originalSrc&&(eb=u.createImageForPageLink(eb.originalSrc,bb));Ca.background=jb;Ca.backgroundImage=null!=eb?new mxImage(eb.src,eb.width,eb.height,eb.x,eb.y):null;Ca.pageVisible=ya;Ca.mathEnabled=Pa;var qb=Ca.getGraphBounds;Ca.getGraphBounds=function(){var Ya=qb.apply(this,arguments),ab=this.backgroundImage;if(null!=ab&&null!=ab.width&&null!=ab.height){var kb=this.view.translate,hb=this.view.scale;Ya=mxRectangle.fromRectangle(Ya);Ya.add(new mxRectangle((kb.x+ab.x)*hb,(kb.y+ab.y)*hb,ab.width*
+hb,ab.height*hb))}return Ya};var ub=Ca.getGlobalVariable;Ca.getGlobalVariable=function(Ya){return"page"==Ya?bb.getName():"pagenumber"==Ya?fb+1:"pagecount"==Ya?null!=u.pages?u.pages.length:1:ub.apply(this,arguments)};document.body.appendChild(Ca.container);u.updatePageRoot(bb);Ca.model.setRoot(bb.root)}Za=Ea(Ca,Za,fb!=Ga);Ca!=Q&&Ca.container.parentNode.removeChild(Ca.container)}}else Za=Ea(Q);null==Za?u.handleError({message:mxResources.get("errorUpdatingPreview")}):(Za.mathEnabled&&(Ga=Za.wnd.document,
+xa&&(Za.wnd.IMMEDIATE_PRINT=!0),Ga.writeln('<script type="text/javascript" src="'+DRAWIO_BASE_URL+'/js/math-print.js">\x3c/script>')),Za.closeDocument(),!Za.mathEnabled&&xa&&PrintDialog.printPreview(Za));null!=Ma&&(Q.shapeForegroundColor=za,Q.shapeBackgroundColor=Ba,Q.stylesheet=Ma,Q.refresh())}}var Q=u.editor.graph,da=document.createElement("div"),ea=document.createElement("h3");ea.style.width="100%";ea.style.textAlign="center";ea.style.marginTop="0px";mxUtils.write(ea,H||mxResources.get("print"));
+da.appendChild(ea);var fa=1,pa=1;ea=document.createElement("div");ea.style.cssText="border-bottom:1px solid lightGray;padding-bottom:12px;margin-bottom:12px;";var ua=document.createElement("input");ua.style.cssText="margin-right:8px;margin-bottom:8px;";ua.setAttribute("value","all");ua.setAttribute("type","radio");ua.setAttribute("name","pages-printdialog");ea.appendChild(ua);H=document.createElement("span");mxUtils.write(H,mxResources.get("printAllPages"));ea.appendChild(H);mxUtils.br(ea);var qa=
+ua.cloneNode(!0);ua.setAttribute("checked","checked");qa.setAttribute("value","range");ea.appendChild(qa);H=document.createElement("span");mxUtils.write(H,mxResources.get("pages")+":");ea.appendChild(H);var Da=document.createElement("input");Da.style.cssText="margin:0 8px 0 8px;";Da.setAttribute("value","1");Da.setAttribute("type","number");Da.setAttribute("min","1");Da.style.width="50px";ea.appendChild(Da);H=document.createElement("span");mxUtils.write(H,mxResources.get("to"));ea.appendChild(H);
+var Aa=Da.cloneNode(!0);ea.appendChild(Aa);mxEvent.addListener(Da,"focus",function(){qa.checked=!0});mxEvent.addListener(Aa,"focus",function(){qa.checked=!0});mxEvent.addListener(Da,"change",P);mxEvent.addListener(Aa,"change",P);if(null!=u.pages&&(fa=u.pages.length,null!=u.currentPage))for(H=0;H<u.pages.length;H++)if(u.currentPage==u.pages[H]){pa=H+1;Da.value=pa;Aa.value=pa;break}Da.setAttribute("max",fa);Aa.setAttribute("max",fa);u.isPagesEnabled()?1<fa&&(da.appendChild(ea),qa.checked=!0):qa.checked=
+!0;mxUtils.br(ea);var Fa=document.createElement("input");Fa.setAttribute("value","all");Fa.setAttribute("type","radio");Fa.style.marginRight="8px";Q.isSelectionEmpty()&&Fa.setAttribute("disabled","disabled");var ta=document.createElement("div");ta.style.marginBottom="10px";1==fa?(Fa.setAttribute("type","checkbox"),Fa.style.marginBottom="12px",ta.appendChild(Fa)):(Fa.setAttribute("name","pages-printdialog"),Fa.style.marginBottom="8px",ea.appendChild(Fa));H=document.createElement("span");mxUtils.write(H,
+mxResources.get("selectionOnly"));Fa.parentNode.appendChild(H);1==fa&&mxUtils.br(Fa.parentNode);var Sa=document.createElement("input");Sa.style.marginRight="8px";Sa.setAttribute("value","adjust");Sa.setAttribute("type","radio");Sa.setAttribute("name","printZoom");ta.appendChild(Sa);H=document.createElement("span");mxUtils.write(H,mxResources.get("adjustTo"));ta.appendChild(H);var Ra=document.createElement("input");Ra.style.cssText="margin:0 8px 0 8px;";Ra.setAttribute("value","100 %");Ra.style.width=
+"50px";ta.appendChild(Ra);mxEvent.addListener(Ra,"focus",function(){Sa.checked=!0});da.appendChild(ta);ea=ea.cloneNode(!1);var Oa=Sa.cloneNode(!0);Oa.setAttribute("value","fit");Sa.setAttribute("checked","checked");H=document.createElement("div");H.style.cssText="display:inline-block;vertical-align:top;padding-top:2px;";H.appendChild(Oa);ea.appendChild(H);ta=document.createElement("table");ta.style.display="inline-block";var Va=document.createElement("tbody"),Ja=document.createElement("tr"),cb=Ja.cloneNode(!0),
+$a=document.createElement("td"),y=$a.cloneNode(!0),K=$a.cloneNode(!0),N=$a.cloneNode(!0),T=$a.cloneNode(!0),U=$a.cloneNode(!0);$a.style.textAlign="right";N.style.textAlign="right";mxUtils.write($a,mxResources.get("fitTo"));var W=document.createElement("input");W.style.cssText="margin:0 8px 0 8px;";W.setAttribute("value","1");W.setAttribute("min","1");W.setAttribute("type","number");W.style.width="40px";y.appendChild(W);H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsAcross"));
+K.appendChild(H);mxUtils.write(N,mxResources.get("fitToBy"));var na=W.cloneNode(!0);T.appendChild(na);mxEvent.addListener(W,"focus",function(){Oa.checked=!0});mxEvent.addListener(na,"focus",function(){Oa.checked=!0});H=document.createElement("span");mxUtils.write(H,mxResources.get("fitToSheetsDown"));U.appendChild(H);Ja.appendChild($a);Ja.appendChild(y);Ja.appendChild(K);cb.appendChild(N);cb.appendChild(T);cb.appendChild(U);Va.appendChild(Ja);Va.appendChild(cb);ta.appendChild(Va);ea.appendChild(ta);
+da.appendChild(ea);ea=document.createElement("div");H=document.createElement("div");H.style.fontWeight="bold";H.style.marginBottom="12px";mxUtils.write(H,mxResources.get("paperSize"));ea.appendChild(H);H=document.createElement("div");H.style.marginBottom="12px";var wa=PageSetupDialog.addPageFormatPanel(H,"printdialog",u.editor.graph.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT);ea.appendChild(H);H=document.createElement("span");mxUtils.write(H,mxResources.get("pageScale"));ea.appendChild(H);var ra=
+document.createElement("input");ra.style.cssText="margin:0 8px 0 8px;";ra.setAttribute("value","100 %");ra.style.width="60px";ea.appendChild(ra);da.appendChild(ea);H=document.createElement("div");H.style.cssText="text-align:right;margin:48px 0 0 0;";ea=mxUtils.button(mxResources.get("cancel"),function(){u.hideDialog()});ea.className="geBtn";u.editor.cancelFirst&&H.appendChild(ea);u.isOffline()||(ta=mxUtils.button(mxResources.get("help"),function(){Q.openLink("https://www.diagrams.net/doc/faq/print-diagram")}),
+ta.className="geBtn",H.appendChild(ta));PrintDialog.previewEnabled&&(ta=mxUtils.button(mxResources.get("preview"),function(){u.hideDialog();V(!1)}),ta.className="geBtn",H.appendChild(ta));ta=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){u.hideDialog();V(!0)});ta.className="geBtn gePrimaryBtn";H.appendChild(ta);u.editor.cancelFirst||H.appendChild(ea);da.appendChild(H);this.container=da};var S=ChangePageSetup.prototype.execute;ChangePageSetup.prototype.execute=function(){null==
this.page&&(this.page=this.ui.currentPage);if(this.page!=this.ui.currentPage){if(null!=this.page.viewState){this.ignoreColor||(this.page.viewState.background=this.color);if(!this.ignoreImage){var u=this.image;null!=u&&null!=u.src&&Graph.isPageLink(u.src)&&(u={originalSrc:u.src});this.page.viewState.backgroundImage=u}null!=this.format&&(this.page.viewState.pageFormat=this.format);null!=this.mathEnabled&&(this.page.viewState.mathEnabled=this.mathEnabled);null!=this.shadowVisible&&(this.page.viewState.shadowVisible=
-this.shadowVisible)}}else P.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var aa=document.createElement("canvas"),la=new Image;la.onload=function(){try{aa.getContext("2d").drawImage(la,
-0,0);var u=aa.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(H){}};la.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(u){}})();
+this.shadowVisible)}}else S.apply(this,arguments),null!=this.mathEnabled&&this.mathEnabled!=this.ui.isMathEnabled()&&(this.ui.setMathEnabled(this.mathEnabled),this.mathEnabled=!this.mathEnabled),null!=this.shadowVisible&&this.shadowVisible!=this.ui.editor.graph.shadowVisible&&(this.ui.editor.graph.setShadowVisible(this.shadowVisible),this.shadowVisible=!this.shadowVisible)};Editor.prototype.useCanvasForExport=!1;try{var ja=document.createElement("canvas"),ma=new Image;ma.onload=function(){try{ja.getContext("2d").drawImage(ma,
+0,0);var u=ja.toDataURL("image/png");Editor.prototype.useCanvasForExport=null!=u&&6<u.length}catch(H){}};ma.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(u){}Editor.prototype.useCanvasForExport=!1})();
(function(){var b=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){n.previousColor=n.color;n.previousImage=n.image;n.previousFormat=n.format;null!=n.foldingEnabled&&(n.foldingEnabled=!n.foldingEnabled);null!=n.mathEnabled&&(n.mathEnabled=!n.mathEnabled);null!=n.shadowVisible&&(n.shadowVisible=!n.shadowVisible);return n};mxCodecRegistry.register(b)})();
-(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.0.4";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
+(function(){var b=new mxObjectCodec(new ChangeGridColor,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};mxCodecRegistry.register(b)})();(function(){EditorUi.VERSION="20.1.1";EditorUi.compactUi="atlas"!=uiTheme;Editor.isDarkMode()&&(mxGraphView.prototype.gridColor=mxGraphView.prototype.defaultDarkGridColor);EditorUi.enableLogging="1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&(/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname))&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost=window.DRAWIO_BASE_URL;EditorUi.lightboxHost=window.DRAWIO_LIGHTBOX_URL;EditorUi.lastErrorMessage=
null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.templateFile=TEMPLATE_PATH+"/index.xml";EditorUi.cacheUrl=window.REALTIME_URL;null==EditorUi.cacheUrl&&"undefined"!==typeof DrawioFile&&(DrawioFile.SYNC="none");Editor.cacheTimeout=1E4;EditorUi.enablePlantUml=EditorUi.enableLogging;EditorUi.isElectronApp=null!=window&&null!=window.process&&null!=window.process.versions&&null!=window.process.versions.electron;EditorUi.nativeFileSupport=!mxClient.IS_OP&&!EditorUi.isElectronApp&&
"1"!=urlParams.extAuth&&"showSaveFilePicker"in window&&"showOpenFilePicker"in window;EditorUi.enableDrafts=!mxClient.IS_CHROMEAPP&&isLocalStorage&&"0"!=urlParams.drafts;EditorUi.scratchpadHelpLink="https://www.diagrams.net/doc/faq/scratchpad";EditorUi.enableHtmlEditOption=!0;EditorUi.defaultMermaidConfig={theme:"neutral",arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!1},sequence:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,
-mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,m,q,z,F){z=null!=z?z:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
-"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=C+"/log?severity="+z+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=m?":colno:"+
-encodeURIComponent(m):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(I){}try{F||null==window.console||console.error(z,d,f,g,m,q)}catch(I){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
+mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"}};EditorUi.logError=function(d,f,g,l,q,z,F){z=null!=z?z:0<=d.indexOf("NetworkError")||0<=d.indexOf("SecurityError")||0<=d.indexOf("NS_ERROR_FAILURE")||0<=d.indexOf("out of memory")?"CONFIG":"SEVERE";if(EditorUi.enableLogging&&
+"1"!=urlParams.dev)try{if(d!=EditorUi.lastErrorMessage&&(null==d||null==f||-1==d.indexOf("Script error")&&-1==d.indexOf("extension"))&&null!=d&&0>d.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=d;var C=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";q=null!=q?q:Error(d);(new Image).src=C+"/log?severity="+z+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+encodeURIComponent(d)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(g)+(null!=l?":colno:"+
+encodeURIComponent(l):"")+(null!=q&&null!=q.stack?"&stack="+encodeURIComponent(q.stack):"")}}catch(I){}try{F||null==window.console||console.error(z,d,f,g,l,q)}catch(I){}};EditorUi.logEvent=function(d){if("1"==urlParams.dev)EditorUi.debug("logEvent",d);else if(EditorUi.enableLogging)try{var f=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=f+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=d?"&data="+encodeURIComponent(JSON.stringify(d)):"")}catch(g){}};EditorUi.sendReport=
function(d,f){if("1"==urlParams.dev)EditorUi.debug("sendReport",d);else if(EditorUi.enableLogging)try{f=null!=f?f:5E4,d.length>f&&(d=d.substring(0,f)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(d))}catch(g){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.test){for(var d=[(new Date).toISOString()],f=0;f<arguments.length;f++)d.push(arguments[f]);console.log.apply(console,
d)}}catch(g){}};EditorUi.removeChildNodes=function(d){for(;null!=d.firstChild;)d.removeChild(d.firstChild)};EditorUi.prototype.emptyDiagramXml='<mxGraphModel><root><mxCell id="0"/><mxCell id="1" parent="0"/></root></mxGraphModel>';EditorUi.prototype.emptyLibraryXml="<mxlibrary>[]</mxlibrary>";EditorUi.prototype.mode=null;EditorUi.prototype.timeout=Editor.prototype.timeout;EditorUi.prototype.sidebarFooterHeight=38;EditorUi.prototype.defaultCustomShapeStyle="shape=stencil(tZRtTsQgEEBPw1+DJR7AoN6DbWftpAgE0Ortd/jYRGq72R+YNE2YgTePloEJGWblgA18ZuKFDcMj5/Sm8boZq+BgjCX4pTyqk6ZlKROitwusOMXKQDODx5iy4pXxZ5qTHiFHawxB0JrQZH7lCabQ0Fr+XWC1/E8zcsT/gAi+Subo2/3Mh6d/oJb5nU1b5tW7r2knautaa3T+U32o7f7vZwpJkaNDLORJjcu7t59m2jXxqX9un+tt022acsfmoKaQZ+vhhswZtS6Ne/ThQGt0IV0N3Yyv6P3CeT9/tHO0XFI5cAE=);whiteSpace=wrap;html=1;";
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;EditorUi.prototype.embedExportBorder=8;EditorUi.prototype.embedExportBackground=null;EditorUi.prototype.shareCursorPosition=!0;EditorUi.prototype.showRemoteCursors=!0;(function(){EditorUi.prototype.useCanvasForExport=!1;EditorUi.prototype.jpgSupported=!1;try{var d=document.createElement("canvas");EditorUi.prototype.canvasSupported=!(!d.getContext||!d.getContext("2d"))}catch(q){}try{var f=document.createElement("canvas"),g=new Image;g.onload=function(){try{f.getContext("2d").drawImage(g,0,0);var q=
-f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(z){}};g.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(q){}try{f=document.createElement("canvas");f.width=f.height=1;var m=f.toDataURL("image/jpeg");
-EditorUi.prototype.jpgSupported=null!==m.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
+f.toDataURL("image/png");EditorUi.prototype.useCanvasForExport=null!=q&&6<q.length}catch(z){}};g.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(q){}try{f=document.createElement("canvas");f.width=f.height=1;var l=f.toDataURL("image/jpeg");
+EditorUi.prototype.jpgSupported=null!==l.match("image/jpeg")}catch(q){}})();EditorUi.prototype.openLink=function(d,f,g){return this.editor.graph.openLink(d,f,g)};EditorUi.prototype.showSplash=function(d){};EditorUi.prototype.getLocalData=function(d,f){f(localStorage.getItem(d))};EditorUi.prototype.setLocalData=function(d,f,g){localStorage.setItem(d,f);null!=g&&g()};EditorUi.prototype.removeLocalData=function(d,f){localStorage.removeItem(d);f()};EditorUi.prototype.setShareCursorPosition=function(d){this.shareCursorPosition=
d;this.fireEvent(new mxEventObject("shareCursorPositionChanged"))};EditorUi.prototype.isShareCursorPosition=function(){return this.shareCursorPosition};EditorUi.prototype.setShowRemoteCursors=function(d){this.showRemoteCursors=d;this.fireEvent(new mxEventObject("showRemoteCursorsChanged"))};EditorUi.prototype.isShowRemoteCursors=function(){return this.showRemoteCursors};EditorUi.prototype.setMathEnabled=function(d){this.editor.graph.mathEnabled=d;this.editor.updateGraphComponents();this.editor.graph.refresh();
this.editor.graph.defaultMathEnabled=d;this.fireEvent(new mxEventObject("mathEnabledChanged"))};EditorUi.prototype.isMathEnabled=function(d){return this.editor.graph.mathEnabled};EditorUi.prototype.isOfflineApp=function(){return"1"==urlParams.offline};EditorUi.prototype.isOffline=function(d){return this.isOfflineApp()||!navigator.onLine||!d&&("1"==urlParams.stealth||"1"==urlParams.lockdown)};EditorUi.prototype.isExternalDataComms=function(){return"1"!=urlParams.offline&&!this.isOffline()&&!this.isOfflineApp()};
-EditorUi.prototype.createSpinner=function(d,f,g){var m=null==d||null==f;g=null!=g?g:24;var q=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),z=q.spin;q.spin=function(C,I){var G=!1;this.active||(z.call(this,C),this.active=!0,null!=I&&(m&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
+EditorUi.prototype.createSpinner=function(d,f,g){var l=null==d||null==f;g=null!=g?g:24;var q=new Spinner({lines:12,length:g,width:Math.round(g/3),radius:Math.round(g/2),rotate:0,color:Editor.isDarkMode()?"#c0c0c0":"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,zIndex:2E9}),z=q.spin;q.spin=function(C,I){var G=!1;this.active||(z.call(this,C),this.active=!0,null!=I&&(l&&(f=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0)/2,d=document.body.clientWidth/2-2),G=document.createElement("div"),
G.style.position="absolute",G.style.whiteSpace="nowrap",G.style.background="#4B4243",G.style.color="white",G.style.fontFamily=Editor.defaultHtmlFont,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,d)+"px",G.style.top=Math.max(0,f+70)+"px",mxUtils.setPrefixedStyle(G.style,"borderRadius","6px"),mxUtils.setPrefixedStyle(G.style,"transform","translate(-50%,-50%)"),Editor.isDarkMode()||mxUtils.setPrefixedStyle(G.style,
"boxShadow","2px 2px 3px 0px #ddd"),"..."!=I.substring(I.length-3,I.length)&&"!"!=I.charAt(I.length-1)&&(I+="..."),G.innerHTML=I,C.appendChild(G),q.status=G),this.pause=mxUtils.bind(this,function(){var Z=function(){};this.active&&(Z=mxUtils.bind(this,function(){this.spin(C,I)}));this.stop();return Z}),G=!0);return G};var F=q.stop;q.stop=function(){F.call(this);this.active=!1;null!=q.status&&null!=q.status.parentNode&&q.status.parentNode.removeChild(q.status);q.status=null};q.pause=function(){return function(){}};
-return q};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(m){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
+return q};EditorUi.prototype.isCompatibleString=function(d){try{var f=mxUtils.parseXml(d),g=this.editor.extractGraphModel(f.documentElement,!0);return null!=g&&0==g.getElementsByTagName("parsererror").length}catch(l){}return!1};EditorUi.prototype.isVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&
3==d.charCodeAt(2)&&4==d.charCodeAt(3)||80==d.charCodeAt(0)&&75==d.charCodeAt(1)&&3==d.charCodeAt(2)&&6==d.charCodeAt(3))};EditorUi.prototype.isRemoteVisioData=function(d){return 8<d.length&&(208==d.charCodeAt(0)&&207==d.charCodeAt(1)&&17==d.charCodeAt(2)&&224==d.charCodeAt(3)&&161==d.charCodeAt(4)&&177==d.charCodeAt(5)&&26==d.charCodeAt(6)&&225==d.charCodeAt(7)||60==d.charCodeAt(0)&&63==d.charCodeAt(1)&&120==d.charCodeAt(2)&&109==d.charCodeAt(3)&&108==d.charCodeAt(3))};var b=EditorUi.prototype.createKeyHandler;
-EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,m=this.editor.graph,q=this;f.getFunction=function(z){if(m.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var F=q.getSelectedPageIndex();if(mxEvent.isShiftDown(z)){if(37==z.keyCode)return function(){0<F&&q.movePage(F,F-1)};if(38==z.keyCode)return function(){0<F&&q.movePage(F,0)};if(39==z.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,
+EditorUi.prototype.createKeyHandler=function(d){var f=b.apply(this,arguments);if(!this.editor.chromeless||this.editor.editable){var g=f.getFunction,l=this.editor.graph,q=this;f.getFunction=function(z){if(l.isSelectionEmpty()&&null!=q.pages&&0<q.pages.length){var F=q.getSelectedPageIndex();if(mxEvent.isShiftDown(z)){if(37==z.keyCode)return function(){0<F&&q.movePage(F,F-1)};if(38==z.keyCode)return function(){0<F&&q.movePage(F,0)};if(39==z.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,
F+1)};if(40==z.keyCode)return function(){F<q.pages.length-1&&q.movePage(F,q.pages.length-1)}}else if(mxEvent.isControlDown(z)||mxClient.IS_MAC&&mxEvent.isMetaDown(z)){if(37==z.keyCode)return function(){0<F&&q.selectNextPage(!1)};if(38==z.keyCode)return function(){0<F&&q.selectPage(q.pages[0])};if(39==z.keyCode)return function(){F<q.pages.length-1&&q.selectNextPage(!0)};if(40==z.keyCode)return function(){F<q.pages.length-1&&q.selectPage(q.pages[q.pages.length-1])}}}return g.apply(this,arguments)}}return f};
-var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var m=d.lastIndexOf("&lt;/mxfile&gt;");m>g&&(f=d.substring(g,m+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var q=mxUtils.parseXml(d),z=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=
+var e=EditorUi.prototype.extractGraphModelFromHtml;EditorUi.prototype.extractGraphModelFromHtml=function(d){var f=e.apply(this,arguments);if(null==f)try{var g=d.indexOf("&lt;mxfile ");if(0<=g){var l=d.lastIndexOf("&lt;/mxfile&gt;");l>g&&(f=d.substring(g,l+15).replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/\\&quot;/g,'"').replace(/\n/g,""))}else{var q=mxUtils.parseXml(d),z=this.editor.extractGraphModel(q.documentElement,null!=this.pages||"hidden"==this.diagramContainer.style.visibility);f=null!=
z?mxUtils.getXml(z):""}}catch(F){}return f};EditorUi.prototype.validateFileData=function(d){if(null!=d&&0<d.length){var f=d.indexOf('<meta charset="utf-8">');0<=f&&(d=d.slice(0,f)+'<meta charset="utf-8"/>'+d.slice(f+23-1,d.length));d=Graph.zapGremlins(d)}return d};EditorUi.prototype.replaceFileData=function(d){d=this.validateFileData(d);d=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null;var f=null!=d?this.editor.extractGraphModel(d,!0):null;null!=f&&(d=f);if(null!=d){f=this.editor.graph;
-f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,m=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<m.length||1==m.length&&m[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=m.length-1;0<=q;q--){var z=this.updatePageRoot(new DiagramPage(m[q]));null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,z,0==q?z:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
+f.model.beginUpdate();try{var g=null!=this.pages?this.pages.slice():null,l=d.getElementsByTagName("diagram");if("0"!=urlParams.pages||1<l.length||1==l.length&&l[0].hasAttribute("name")){this.fileNode=d;this.pages=null!=this.pages?this.pages:[];for(var q=l.length-1;0<=q;q--){var z=this.updatePageRoot(new DiagramPage(l[q]));null==z.getName()&&z.setName(mxResources.get("pageWithNumber",[q+1]));f.model.execute(new ChangePage(this,z,0==q?z:null,0))}}else"0"!=urlParams.pages&&null==this.fileNode&&(this.fileNode=
d.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(d.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),f.model.execute(new ChangePage(this,this.currentPage,this.currentPage,0))),this.editor.setGraphXml(d),null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=g)for(q=0;q<g.length;q++)f.model.execute(new ChangePage(this,g[q],null))}finally{f.model.endUpdate()}}};EditorUi.prototype.createFileData=
-function(d,f,g,m,q,z,F,C,I,G,Z){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;I=null!=I?I:!0;var fa=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ba="_blank";else fa=ba=m;if(null==d)return"";var Y=d;if("mxfile"!=Y.nodeName.toLowerCase()){if(Z){var pa=d.ownerDocument.createElement("diagram");pa.setAttribute("id",Editor.guid());pa.appendChild(d)}else{pa=Graph.zapGremlins(mxUtils.getXml(d));Y=Graph.compress(pa);if(Graph.decompress(Y)!=pa)return pa;pa=d.ownerDocument.createElement("diagram");
-pa.setAttribute("id",Editor.guid());mxUtils.setTextContent(pa,Y)}Y=d.ownerDocument.createElement("mxfile");Y.appendChild(pa)}G?(Y=Y.cloneNode(!0),Y.removeAttribute("modified"),Y.removeAttribute("host"),Y.removeAttribute("agent"),Y.removeAttribute("etag"),Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("type")):(Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("pages"),Y.removeAttribute("type"),
+function(d,f,g,l,q,z,F,C,I,G,Z){f=null!=f?f:this.editor.graph;q=null!=q?q:!1;I=null!=I?I:!0;var ca=null;if(null==g||g.getMode()==App.MODE_DEVICE||g.getMode()==App.MODE_BROWSER)var ba="_blank";else ca=ba=l;if(null==d)return"";var Y=d;if("mxfile"!=Y.nodeName.toLowerCase()){if(Z){var O=d.ownerDocument.createElement("diagram");O.setAttribute("id",Editor.guid());O.appendChild(d)}else{O=Graph.zapGremlins(mxUtils.getXml(d));Y=Graph.compress(O);if(Graph.decompress(Y)!=O)return O;O=d.ownerDocument.createElement("diagram");
+O.setAttribute("id",Editor.guid());mxUtils.setTextContent(O,Y)}Y=d.ownerDocument.createElement("mxfile");Y.appendChild(O)}G?(Y=Y.cloneNode(!0),Y.removeAttribute("modified"),Y.removeAttribute("host"),Y.removeAttribute("agent"),Y.removeAttribute("etag"),Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("type")):(Y.removeAttribute("userAgent"),Y.removeAttribute("version"),Y.removeAttribute("editor"),Y.removeAttribute("pages"),Y.removeAttribute("type"),
mxClient.IS_CHROMEAPP?Y.setAttribute("host","Chrome"):EditorUi.isElectronApp?Y.setAttribute("host","Electron"):Y.setAttribute("host",window.location.hostname),Y.setAttribute("modified",(new Date).toISOString()),Y.setAttribute("agent",navigator.appVersion),Y.setAttribute("version",EditorUi.VERSION),Y.setAttribute("etag",Editor.guid()),d=null!=g?g.getMode():this.mode,null!=d&&Y.setAttribute("type",d),1<Y.getElementsByTagName("diagram").length&&null!=this.pages&&Y.setAttribute("pages",this.pages.length));
-Z=Z?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!z&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))Z=this.getHtml2(mxUtils.getXml(Y),f,null!=g?g.getTitle():null,ba,fa);else if(z||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(m=null),Z=this.getEmbeddedSvg(Z,f,m,null,C,I,fa);return Z};EditorUi.prototype.getXmlFileData=function(d,f,g,m){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
-m);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(I){var G=I.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(I)),I=I.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&I.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?I=I.cloneNode(!0):(I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(G)));q.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
-Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var z=this.pages[f],F=z.node;if(z!=this.currentPage)if(z.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(z.root));this.editor.graph.saveViewState(z.viewState,C,null,m);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(C));delete z.needsUpdate}else m&&(this.updatePageRoot(z),null!=z.viewState.backgroundImage&&(null!=z.viewState.backgroundImage.originalSrc?
-z.viewState.backgroundImage=this.createImageForPageLink(z.viewState.backgroundImage.originalSrc,z):Graph.isPageLink(z.viewState.backgroundImage.src)&&(z.viewState.backgroundImage=this.createImageForPageLink(z.viewState.backgroundImage.src,z))),null!=z.viewState.backgroundImage&&null!=z.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),C=C.encode(new mxGraphModel(z.root)),this.editor.graph.saveViewState(z.viewState,C,null,m),F=F.cloneNode(!1),mxUtils.setTextContent(F,
-Graph.compressNode(C))));d(F)}return q};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],m=0;m<d.length;m++){var q=d.charAt(m);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?g.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(q)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
-function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(z){d[EditorUi.DIFF_INSERT][f].data=z.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var m in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][m];null!=q.name&&
+Z=Z?mxUtils.getPrettyXml(Y):mxUtils.getXml(Y);if(!z&&!q&&(F||null!=g&&/(\.html)$/i.test(g.getTitle())))Z=this.getHtml2(mxUtils.getXml(Y),f,null!=g?g.getTitle():null,ba,ca);else if(z||!q&&null!=g&&/(\.svg)$/i.test(g.getTitle()))null==g||g.getMode()!=App.MODE_DEVICE&&g.getMode()!=App.MODE_BROWSER||(l=null),Z=this.getEmbeddedSvg(Z,f,l,null,C,I,ca);return Z};EditorUi.prototype.getXmlFileData=function(d,f,g,l){d=null!=d?d:!0;f=null!=f?f:!1;g=null!=g?g:!Editor.compressXml;var q=this.editor.getGraphXml(d,
+l);if(d&&null!=this.fileNode&&null!=this.currentPage)if(d=function(I){var G=I.getElementsByTagName("mxGraphModel");G=0<G.length?G[0]:null;null==G&&g?(G=mxUtils.trim(mxUtils.getTextContent(I)),I=I.cloneNode(!1),0<G.length&&(G=Graph.decompress(G),null!=G&&0<G.length&&I.appendChild(mxUtils.parseXml(G).documentElement))):null==G||g?I=I.cloneNode(!0):(I=I.cloneNode(!1),mxUtils.setTextContent(I,Graph.compressNode(G)));q.appendChild(I)},EditorUi.removeChildNodes(this.currentPage.node),mxUtils.setTextContent(this.currentPage.node,
+Graph.compressNode(q)),q=this.fileNode.cloneNode(!1),f)d(this.currentPage.node);else for(f=0;f<this.pages.length;f++){var z=this.pages[f],F=z.node;if(z!=this.currentPage)if(z.needsUpdate){var C=new mxCodec(mxUtils.createXmlDocument());C=C.encode(new mxGraphModel(z.root));this.editor.graph.saveViewState(z.viewState,C,null,l);EditorUi.removeChildNodes(F);mxUtils.setTextContent(F,Graph.compressNode(C));delete z.needsUpdate}else l&&(this.updatePageRoot(z),null!=z.viewState.backgroundImage&&(null!=z.viewState.backgroundImage.originalSrc?
+z.viewState.backgroundImage=this.createImageForPageLink(z.viewState.backgroundImage.originalSrc,z):Graph.isPageLink(z.viewState.backgroundImage.src)&&(z.viewState.backgroundImage=this.createImageForPageLink(z.viewState.backgroundImage.src,z))),null!=z.viewState.backgroundImage&&null!=z.viewState.backgroundImage.originalSrc&&(C=new mxCodec(mxUtils.createXmlDocument()),C=C.encode(new mxGraphModel(z.root)),this.editor.graph.saveViewState(z.viewState,C,null,l),F=F.cloneNode(!1),mxUtils.setTextContent(F,
+Graph.compressNode(C))));d(F)}return q};EditorUi.prototype.anonymizeString=function(d,f){for(var g=[],l=0;l<d.length;l++){var q=d.charAt(l);0<=EditorUi.ignoredAnonymizedChars.indexOf(q)?g.push(q):isNaN(parseInt(q))?q.toLowerCase()!=q?g.push(String.fromCharCode(65+Math.round(25*Math.random()))):q.toUpperCase()!=q?g.push(String.fromCharCode(97+Math.round(25*Math.random()))):/\s/.test(q)?g.push(" "):g.push("?"):g.push(f?"0":Math.round(9*Math.random()))}return g.join("")};EditorUi.prototype.anonymizePatch=
+function(d){if(null!=d[EditorUi.DIFF_INSERT])for(var f=0;f<d[EditorUi.DIFF_INSERT].length;f++)try{var g=mxUtils.parseXml(d[EditorUi.DIFF_INSERT][f].data).documentElement.cloneNode(!1);null!=g.getAttribute("name")&&g.setAttribute("name",this.anonymizeString(g.getAttribute("name")));d[EditorUi.DIFF_INSERT][f].data=mxUtils.getXml(g)}catch(z){d[EditorUi.DIFF_INSERT][f].data=z.message}if(null!=d[EditorUi.DIFF_UPDATE]){for(var l in d[EditorUi.DIFF_UPDATE]){var q=d[EditorUi.DIFF_UPDATE][l];null!=q.name&&
(q.name=this.anonymizeString(q.name));null!=q.cells&&(f=mxUtils.bind(this,function(z){var F=q.cells[z];if(null!=F){for(var C in F)null!=F[C].value&&(F[C].value="["+F[C].value.length+"]"),null!=F[C].xmlValue&&(F[C].xmlValue="["+F[C].xmlValue.length+"]"),null!=F[C].style&&(F[C].style="["+F[C].style.length+"]"),mxUtils.isEmptyObject(F[C])&&delete F[C];mxUtils.isEmptyObject(F)&&delete q.cells[z]}}),f(EditorUi.DIFF_INSERT),f(EditorUi.DIFF_UPDATE),mxUtils.isEmptyObject(q.cells)&&delete q.cells);mxUtils.isEmptyObject(q)&&
-delete d[EditorUi.DIFF_UPDATE][m]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");
+delete d[EditorUi.DIFF_UPDATE][l]}mxUtils.isEmptyObject(d[EditorUi.DIFF_UPDATE])&&delete d[EditorUi.DIFF_UPDATE]}return d};EditorUi.prototype.anonymizeAttributes=function(d,f){if(null!=d.attributes)for(var g=0;g<d.attributes.length;g++)"as"!=d.attributes[g].name&&d.setAttribute(d.attributes[g].name,this.anonymizeString(d.attributes[g].value,f));if(null!=d.childNodes)for(g=0;g<d.childNodes.length;g++)this.anonymizeAttributes(d.childNodes[g],f)};EditorUi.prototype.anonymizeNode=function(d,f){f=d.getElementsByTagName("mxCell");
for(var g=0;g<f.length;g++)null!=f[g].getAttribute("value")&&f[g].setAttribute("value","["+f[g].getAttribute("value").length+"]"),null!=f[g].getAttribute("xmlValue")&&f[g].setAttribute("xmlValue","["+f[g].getAttribute("xmlValue").length+"]"),null!=f[g].getAttribute("style")&&f[g].setAttribute("style","["+f[g].getAttribute("style").length+"]"),null!=f[g].parentNode&&"root"!=f[g].parentNode.nodeName&&null!=f[g].parentNode.parentNode&&(f[g].setAttribute("id",f[g].parentNode.getAttribute("id")),f[g].parentNode.parentNode.replaceChild(f[g],
f[g].parentNode));return d};EditorUi.prototype.synchronizeCurrentFile=function(d){var f=this.getCurrentFile();null!=f&&(f.savingFile?this.handleError({message:mxResources.get("busy")}):!d&&f.invalidChecksum?f.handleFileError(null,!0):this.spinner.spin(document.body,mxResources.get("updatingDocument"))&&(f.clearAutosave(),this.editor.setStatus(""),d?f.reloadFile(mxUtils.bind(this,function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)})):f.synchronizeFile(mxUtils.bind(this,
-function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,m,q,z,F,C,I,G,Z){q=null!=q?q:!0;z=null!=z?z:!1;var fa=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var ba=null!=fa.themes&&"darkTheme"==fa.defaultThemeName;G=!1;if(ba||null!=this.pages&&this.currentPage!=this.pages[0]){var Y=fa.getGlobalVariable;fa=this.createTemporaryGraph(ba?fa.getDefaultStylesheet():fa.getStylesheet());
-fa.setBackgroundImage=this.editor.graph.setBackgroundImage;fa.background=this.editor.graph.background;var pa=this.pages[0];this.currentPage==pa?fa.setBackgroundImage(this.editor.graph.backgroundImage):null!=pa.viewState&&null!=pa.viewState&&fa.setBackgroundImage(pa.viewState.backgroundImage);fa.getGlobalVariable=function(O){return"page"==O?pa.getName():"pagenumber"==O?1:Y.apply(this,arguments)};document.body.appendChild(fa.container);fa.model.setRoot(pa.root)}}F=null!=F?F:this.getXmlFileData(q,z,
-G,Z);I=null!=I?I:this.getCurrentFile();d=this.createFileData(F,fa,I,window.location.href,d,f,g,m,q,C,G);fa!=this.editor.graph&&fa.container.parentNode.removeChild(fa.container);return d};EditorUi.prototype.getHtml=function(d,f,g,m,q,z){z=null!=z?z:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=z?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;z=Math.floor(F.x/I-f.view.translate.x);I=Math.floor(F.y/I-f.view.translate.y);F=f.background;null==
-q&&(f=this.getBasenames().join(";"),0<f.length&&(C=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",z);d.setAttribute("y0",I)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=m&&d.setAttribute("edit",m));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";m=Graph.compress(d);Graph.decompress(m)!=d&&(m=encodeURIComponent(d));
-return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
-m+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,m,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
+function(){f.handleFileSuccess("manual"==DrawioFile.SYNC)}),mxUtils.bind(this,function(g){f.handleFileError(g,!0)}))))};EditorUi.prototype.getFileData=function(d,f,g,l,q,z,F,C,I,G,Z){q=null!=q?q:!0;z=null!=z?z:!1;var ca=this.editor.graph;if(f||!d&&null!=I&&/(\.svg)$/i.test(I.getTitle())){var ba=null!=ca.themes&&"darkTheme"==ca.defaultThemeName;G=!1;if(ba||null!=this.pages&&this.currentPage!=this.pages[0]){var Y=ca.getGlobalVariable;ca=this.createTemporaryGraph(ba?ca.getDefaultStylesheet():ca.getStylesheet());
+ca.setBackgroundImage=this.editor.graph.setBackgroundImage;ca.background=this.editor.graph.background;var O=this.pages[0];this.currentPage==O?ca.setBackgroundImage(this.editor.graph.backgroundImage):null!=O.viewState&&null!=O.viewState&&ca.setBackgroundImage(O.viewState.backgroundImage);ca.getGlobalVariable=function(la){return"page"==la?O.getName():"pagenumber"==la?1:Y.apply(this,arguments)};document.body.appendChild(ca.container);ca.model.setRoot(O.root)}}F=null!=F?F:this.getXmlFileData(q,z,G,Z);
+I=null!=I?I:this.getCurrentFile();d=this.createFileData(F,ca,I,window.location.href,d,f,g,l,q,C,G);ca!=this.editor.graph&&ca.container.parentNode.removeChild(ca.container);return d};EditorUi.prototype.getHtml=function(d,f,g,l,q,z){z=null!=z?z:!0;var F=null,C=EditorUi.drawHost+"/js/embed-static.min.js";if(null!=f){F=z?f.getGraphBounds():f.getBoundingBox(f.getSelectionCells());var I=f.view.scale;z=Math.floor(F.x/I-f.view.translate.x);I=Math.floor(F.y/I-f.view.translate.y);F=f.background;null==q&&(f=
+this.getBasenames().join(";"),0<f.length&&(C=EditorUi.drawHost+"/embed.js?s="+f));d.setAttribute("x0",z);d.setAttribute("y0",I)}null!=d&&(d.setAttribute("pan","1"),d.setAttribute("zoom","1"),d.setAttribute("resize","0"),d.setAttribute("fit","0"),d.setAttribute("border","20"),d.setAttribute("links","1"),null!=l&&d.setAttribute("edit",l));null!=q&&(q=q.replace(/&/g,"&amp;"));d=null!=d?Graph.zapGremlins(mxUtils.getXml(d)):"";l=Graph.compress(d);Graph.decompress(l)!=d&&(l=encodeURIComponent(d));return(null==
+q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+q+"'\"/>\n":"")+"</head>\n<body"+(null==q&&null!=F&&F!=mxConstants.NONE?' style="background-color:'+F+';">':">")+'\n<div class="mxgraph" style="position:relative;overflow:auto;width:100%;">\n<div style="width:1px;height:1px;overflow:hidden;">'+
+l+"</div>\n</div>\n"+(null==q?'<script type="text/javascript" src="'+C+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.getHtml2=function(d,f,g,l,q){f=window.DRAWIO_VIEWER_URL||EditorUi.drawHost+"/js/viewer-static.min.js";null!=q&&(q=q.replace(/&/g,"&amp;"));d={highlight:"#0000ff",nav:this.editor.graph.foldingEnabled,
resize:!0,xml:Graph.zapGremlins(d),toolbar:"pages zoom layers lightbox"};null!=this.pages&&null!=this.currentPage&&(d.page=mxUtils.indexOf(this.pages,this.currentPage));return(null==q?'\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]--\x3e\n':"")+"<!DOCTYPE html>\n<html"+(null!=q?' xmlns="http://www.w3.org/1999/xhtml">':">")+"\n<head>\n"+(null==q?null!=g?"<title>"+mxUtils.htmlEntities(g)+"</title>\n":"":"<title>diagrams.net</title>\n")+(null!=q?'<meta http-equiv="refresh" content="0;URL=\''+
q+"'\"/>\n":"")+'<meta charset="utf-8"/>\n</head>\n<body>\n<div class="mxgraph" style="max-width:100%;border:1px solid transparent;" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(d))+'"></div>\n'+(null==q?'<script type="text/javascript" src="'+f+'">\x3c/script>':'<a style="position:absolute;top:50%;left:50%;margin-top:-128px;margin-left:-64px;" href="'+q+'" target="_blank"><img border="0" src="'+EditorUi.drawHost+'/images/drawlogo128.png"/></a>')+"\n</body>\n</html>\n"};EditorUi.prototype.setFileData=
function(d){d=this.validateFileData(d);this.pages=this.fileNode=this.currentPage=null;var f=null!=d&&0<d.length?mxUtils.parseXml(d).documentElement:null,g=Editor.extractParserError(f,mxResources.get("invalidOrMissingFile"));if(g)throw EditorUi.debug("EditorUi.setFileData ParserError",[this],"data",[d],"node",[f],"cause",[g]),Error(mxResources.get("notADiagramFile")+" ("+g+")");d=null!=f?this.editor.extractGraphModel(f,!0):null;null!=d&&(f=d);if(null!=f&&"mxfile"==f.nodeName&&(d=f.getElementsByTagName("diagram"),
-"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var m=0;m<d.length;m++)null==d[m].getAttribute("id")&&d[m].setAttribute("id",m),f=new DiagramPage(d[m]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[m+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=
-urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");f={};for(m=0;m<q.length;m++)f[q[m]]=!0;var z=this.editor.graph.getModel(),
-F=z.getChildren(z.root);for(m=0;m<F.length;m++){var C=F[m];z.setVisible(C,f[C.id]||!1)}}catch(I){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
-0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,m,q,z,F,C,I,G,Z,fa){try{m=null!=m?m:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=ba+("xml"==d||"pdf"==d&&Z?".drawio":"")+"."+d;if("xml"==d){var pa=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,m,q,null,null,null,f);this.saveData(Y,d,pa,"text/xml")}else if("html"==d)pa=this.getHtml2(this.getFileData(!0),this.editor.graph,
-ba),this.saveData(Y,d,pa,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)Y=ba+".png";else if("jpeg"==d)Y=ba+".jpg";else if("remoteSvg"==d){Y=ba+".svg";d="svg";var O=parseInt(I);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<O){var W=this.editor.graph,ha=W.getGraphBounds();var U=Math.ceil(ha.width*C/W.view.scale+2*O);var ma=Math.ceil(ha.height*C/W.view.scale+2*O)}}this.saveRequest(Y,d,mxUtils.bind(this,function(P,
-aa){try{var la=this.editor.graph.pageVisible;0==z&&(this.editor.graph.pageVisible=z);var u=this.createDownloadRequest(P,d,m,aa,F,q,C,I,G,Z,fa,U,ma);this.editor.graph.pageVisible=la;return u}catch(H){this.handleError(H)}}))}else{var T=null,M=mxUtils.bind(this,function(P){P.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",P,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});if("svg"==d){var ia=this.editor.graph.background;
-if(F||ia==mxConstants.NONE)ia=null;var N=this.editor.graph.getSvg(ia,null,null,null,null,m);g&&this.editor.graph.addSvgShadow(N);this.editor.convertImages(N,mxUtils.bind(this,mxUtils.bind(this,function(P){this.spinner.stop();M(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(P))})))}else Y=ba+".svg",T=this.getFileData(!1,!0,null,mxUtils.bind(this,function(P){this.spinner.stop();M(P)}),m)}}catch(P){this.handleError(P)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,m,q,z,F,
-C,I,G,Z,fa,ba){var Y=this.editor.graph,pa=Y.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==z?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var O="",W="";if(pa.width*pa.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=Z?W="&from="+Z.from+"&to="+Z.to:0==z&&(W="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(z=0;z<this.pages.length;z++)if(this.pages[z]==
-this.currentPage){O="&from="+z;break}z=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=z&&z!=mxConstants.NONE||(z="#ffffff"):z=mxConstants.NONE;q={globalVars:Y.getExportVariables()};I&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+O+W+"&bg="+(null!=z?z:mxConstants.NONE)+"&base64="+m+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+encodeURIComponent(d):
-"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(fa&&isFinite(fa)?"&w="+fa:"")+(ba&&isFinite(ba)?"&h="+ba:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var m=window.location.hash,q=mxUtils.bind(this,function(z){var F=null!=d.data?d.data:"";null!=z&&0<z.length&&(0<F.length&&(F+="\n"),F+=z);z=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,null!=urlParams.title?
-decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return m};this.fileLoaded(z);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(fa){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,I=null,G=mxUtils.bind(this,function(){var fa=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),mxUtils.bind(this,
-function(ba){fa===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),Z()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),Z=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){Z();G()}));Z();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,mxUtils.bind(this,
-function(z){q(z)}),mxUtils.bind(this,function(z){null!=g&&g(z)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(ma){var T=new mxCellOverlay(ma.image||q.warningImage,ma.tooltip,ma.align,ma.valign,ma.offset);T.addListener(mxEvent.CLICK,function(M,ia){m.alert(ma.tooltip)});return T}var g=null,m=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,z=q.getModel();z.beginUpdate();var F=null;try{for(d=
-d.firstChild;null!=d;){if("update"==d.nodeName){var C=z.getCell(d.getAttribute("id"));if(null!=C){try{var I=d.getAttribute("value");if(null!=I){var G=mxUtils.parseXml(I).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))z.setValue(C,G);else for(var Z=G.attributes,fa=0;fa<Z.length;fa++)q.setAttributeForCell(C,Z[fa].nodeName,0<Z[fa].nodeValue.length?Z[fa].nodeValue:null)}}catch(ma){null!=window.console&&console.log("Error in value for "+C.id+": "+ma)}try{var ba=d.getAttribute("style");
-null!=ba&&q.model.setStyle(C,ba)}catch(ma){null!=window.console&&console.log("Error in style for "+C.id+": "+ma)}try{var Y=d.getAttribute("icon");if(null!=Y){var pa=0<Y.length?JSON.parse(Y):null;null!=pa&&pa.append||q.removeCellOverlays(C);null!=pa&&q.addCellOverlay(C,f(pa))}}catch(ma){null!=window.console&&console.log("Error in icon for "+C.id+": "+ma)}try{var O=d.getAttribute("geometry");if(null!=O){O=JSON.parse(O);var W=q.getCellGeometry(C);if(null!=W){W=W.clone();for(key in O){var ha=parseFloat(O[key]);
-"dx"==key?W.x+=ha:"dy"==key?W.y+=ha:"dw"==key?W.width+=ha:"dh"==key?W.height+=ha:W[key]=parseFloat(O[key])}q.model.setGeometry(C,W)}}}catch(ma){null!=window.console&&console.log("Error in icon for "+C.id+": "+ma)}}}else if("model"==d.nodeName){for(var U=d.firstChild;null!=U&&U.nodeType!=mxConstants.NODETYPE_ELEMENT;)U=U.nextSibling;null!=U&&(new mxCodec(d.firstChild)).decode(U,z)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||
-d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(F=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{z.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var m=g.lastIndexOf(".");0<=m&&(d=g.substring(m),g=
-g.substring(0,m));if(f){f=g;var q=new Date;g=q.getFullYear();m=q.getMonth()+1;var z=q.getDate(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+m+"-"+z+"-"+F+"-"+C+"-"+q))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var m=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());
+"0"!=urlParams.pages||1<d.length||1==d.length&&d[0].hasAttribute("name"))){g=null;this.fileNode=f;this.pages=[];for(var l=0;l<d.length;l++)null==d[l].getAttribute("id")&&d[l].setAttribute("id",l),f=new DiagramPage(d[l]),null==f.getName()&&f.setName(mxResources.get("pageWithNumber",[l+1])),this.pages.push(f),null!=urlParams["page-id"]&&f.getId()==urlParams["page-id"]&&(g=f);this.currentPage=null!=g?g:this.pages[Math.max(0,Math.min(this.pages.length-1,urlParams.page||0))];f=this.currentPage.node}"0"!=
+urlParams.pages&&null==this.fileNode&&null!=f&&(this.fileNode=f.ownerDocument.createElement("mxfile"),this.currentPage=new DiagramPage(f.ownerDocument.createElement("diagram")),this.currentPage.setName(mxResources.get("pageWithNumber",[1])),this.pages=[this.currentPage]);this.editor.setGraphXml(f);null!=this.currentPage&&(this.currentPage.root=this.editor.graph.model.root);if(null!=urlParams["layer-ids"])try{var q=urlParams["layer-ids"].split(" ");f={};for(l=0;l<q.length;l++)f[q[l]]=!0;var z=this.editor.graph.getModel(),
+F=z.getChildren(z.root);for(l=0;l<F.length;l++){var C=F[l];z.setVisible(C,f[C.id]||!1)}}catch(I){}};EditorUi.prototype.getBaseFilename=function(d){var f=this.getCurrentFile();f=null!=f&&null!=f.getTitle()?f.getTitle():this.defaultFilename;if(/(\.xml)$/i.test(f)||/(\.html)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.png)$/i.test(f))f=f.substring(0,f.lastIndexOf("."));/(\.drawio)$/i.test(f)&&(f=f.substring(0,f.lastIndexOf(".")));!d&&null!=this.pages&&1<this.pages.length&&null!=this.currentPage&&null!=this.currentPage.node.getAttribute("name")&&
+0<this.currentPage.getName().length&&(f=f+"-"+this.currentPage.getName());return f};EditorUi.prototype.downloadFile=function(d,f,g,l,q,z,F,C,I,G,Z,ca){try{l=null!=l?l:this.editor.graph.isSelectionEmpty();var ba=this.getBaseFilename("remoteSvg"==d?!1:!q),Y=ba+("xml"==d||"pdf"==d&&Z?".drawio":"")+"."+d;if("xml"==d){var O=Graph.xmlDeclaration+"\n"+this.getFileData(!0,null,null,null,l,q,null,null,null,f);this.saveData(Y,d,O,"text/xml")}else if("html"==d)O=this.getHtml2(this.getFileData(!0),this.editor.graph,
+ba),this.saveData(Y,d,O,"text/html");else if("svg"!=d&&"xmlsvg"!=d||!this.spinner.spin(document.body,mxResources.get("export"))){if("xmlpng"==d)Y=ba+".png";else if("jpeg"==d)Y=ba+".jpg";else if("remoteSvg"==d){Y=ba+".svg";d="svg";var la=parseInt(I);"string"===typeof C&&0<C.indexOf("%")&&(C=parseInt(C)/100);if(0<la){var aa=this.editor.graph,ia=aa.getGraphBounds();var X=Math.ceil(ia.width*C/aa.view.scale+2*la);var R=Math.ceil(ia.height*C/aa.view.scale+2*la)}}this.saveRequest(Y,d,mxUtils.bind(this,function(S,
+ja){try{var ma=this.editor.graph.pageVisible;0==z&&(this.editor.graph.pageVisible=z);var u=this.createDownloadRequest(S,d,l,ja,F,q,C,I,G,Z,ca,X,R);this.editor.graph.pageVisible=ma;return u}catch(H){this.handleError(H)}}))}else{var sa=null,M=mxUtils.bind(this,function(S){S.length<=MAX_REQUEST_SIZE?this.saveData(Y,"svg",S,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(sa)}))});if("svg"==d){var ka=this.editor.graph.background;
+if(F||ka==mxConstants.NONE)ka=null;var L=this.editor.graph.getSvg(ka,null,null,null,null,l);g&&this.editor.graph.addSvgShadow(L);this.editor.convertImages(L,mxUtils.bind(this,mxUtils.bind(this,function(S){this.spinner.stop();M(Graph.xmlDeclaration+"\n"+Graph.svgDoctype+"\n"+mxUtils.getXml(S))})))}else Y=ba+".svg",sa=this.getFileData(!1,!0,null,mxUtils.bind(this,function(S){this.spinner.stop();M(S)}),l)}}catch(S){this.handleError(S)}};EditorUi.prototype.createDownloadRequest=function(d,f,g,l,q,z,F,
+C,I,G,Z,ca,ba){var Y=this.editor.graph,O=Y.getGraphBounds();g=this.getFileData(!0,null,null,null,g,0==z?!1:"xmlpng"!=f,null,null,null,!1,"pdf"==f);var la="",aa="";if(O.width*O.height>MAX_AREA||g.length>MAX_REQUEST_SIZE)throw{message:mxResources.get("drawingTooLarge")};G=G?"1":"0";"pdf"==f&&(null!=Z?aa="&from="+Z.from+"&to="+Z.to:0==z&&(aa="&allPages=1"));"xmlpng"==f&&(G="1",f="png");if(("xmlpng"==f||"svg"==f)&&null!=this.pages&&null!=this.currentPage)for(z=0;z<this.pages.length;z++)if(this.pages[z]==
+this.currentPage){la="&from="+z;break}z=Y.background;"png"!=f&&"pdf"!=f&&"svg"!=f||!q?q||null!=z&&z!=mxConstants.NONE||(z="#ffffff"):z=mxConstants.NONE;q={globalVars:Y.getExportVariables()};I&&(q.grid={size:Y.gridSize,steps:Y.view.gridSteps,color:Y.view.gridColor});Graph.translateDiagram&&(q.diagramLanguage=Graph.diagramLanguage);return new mxXmlRequest(EXPORT_URL,"format="+f+la+aa+"&bg="+(null!=z?z:mxConstants.NONE)+"&base64="+l+"&embedXml="+G+"&xml="+encodeURIComponent(g)+(null!=d?"&filename="+
+encodeURIComponent(d):"")+"&extras="+encodeURIComponent(JSON.stringify(q))+(null!=F?"&scale="+F:"")+(null!=C?"&border="+C:"")+(ca&&isFinite(ca)?"&w="+ca:"")+(ba&&isFinite(ba)?"&h="+ba:""))};EditorUi.prototype.setMode=function(d,f){this.mode=d};EditorUi.prototype.loadDescriptor=function(d,f,g){var l=window.location.hash,q=mxUtils.bind(this,function(z){var F=null!=d.data?d.data:"";null!=z&&0<z.length&&(0<F.length&&(F+="\n"),F+=z);z=new LocalFile(this,"csv"!=d.format&&0<F.length?F:this.emptyDiagramXml,
+null!=urlParams.title?decodeURIComponent(urlParams.title):this.defaultFilename,!0);z.getHash=function(){return l};this.fileLoaded(z);"csv"==d.format&&this.importCsv(F,mxUtils.bind(this,function(ca){this.editor.undoManager.clear();this.editor.setModified(!1);this.editor.setStatus("")}));if(null!=d.update){var C=null!=d.interval?parseInt(d.interval):6E4,I=null,G=mxUtils.bind(this,function(){var ca=this.currentPage;mxUtils.post(d.update,"xml="+encodeURIComponent(mxUtils.getXml(this.editor.getGraphXml())),
+mxUtils.bind(this,function(ba){ca===this.currentPage&&(200<=ba.getStatus()&&300>=ba.getStatus()?(this.updateDiagram(ba.getText()),Z()):this.handleError({message:mxResources.get("error")+" "+ba.getStatus()}))}),mxUtils.bind(this,function(ba){this.handleError(ba)}))}),Z=mxUtils.bind(this,function(){window.clearTimeout(I);I=window.setTimeout(G,C)});this.editor.addListener("pageSelected",mxUtils.bind(this,function(){Z();G()}));Z();G()}null!=f&&f()});null!=d.url&&0<d.url.length?this.editor.loadUrl(d.url,
+mxUtils.bind(this,function(z){q(z)}),mxUtils.bind(this,function(z){null!=g&&g(z)})):q("")};EditorUi.prototype.updateDiagram=function(d){function f(R){var sa=new mxCellOverlay(R.image||q.warningImage,R.tooltip,R.align,R.valign,R.offset);sa.addListener(mxEvent.CLICK,function(M,ka){l.alert(R.tooltip)});return sa}var g=null,l=this;if(null!=d&&0<d.length&&(g=mxUtils.parseXml(d),d=null!=g?g.documentElement:null,null!=d&&"updates"==d.nodeName)){var q=this.editor.graph,z=q.getModel();z.beginUpdate();var F=
+null;try{for(d=d.firstChild;null!=d;){if("update"==d.nodeName){var C=z.getCell(d.getAttribute("id"));if(null!=C){try{var I=d.getAttribute("value");if(null!=I){var G=mxUtils.parseXml(I).documentElement;if(null!=G)if("1"==G.getAttribute("replace-value"))z.setValue(C,G);else for(var Z=G.attributes,ca=0;ca<Z.length;ca++)q.setAttributeForCell(C,Z[ca].nodeName,0<Z[ca].nodeValue.length?Z[ca].nodeValue:null)}}catch(R){null!=window.console&&console.log("Error in value for "+C.id+": "+R)}try{var ba=d.getAttribute("style");
+null!=ba&&q.model.setStyle(C,ba)}catch(R){null!=window.console&&console.log("Error in style for "+C.id+": "+R)}try{var Y=d.getAttribute("icon");if(null!=Y){var O=0<Y.length?JSON.parse(Y):null;null!=O&&O.append||q.removeCellOverlays(C);null!=O&&q.addCellOverlay(C,f(O))}}catch(R){null!=window.console&&console.log("Error in icon for "+C.id+": "+R)}try{var la=d.getAttribute("geometry");if(null!=la){la=JSON.parse(la);var aa=q.getCellGeometry(C);if(null!=aa){aa=aa.clone();for(key in la){var ia=parseFloat(la[key]);
+"dx"==key?aa.x+=ia:"dy"==key?aa.y+=ia:"dw"==key?aa.width+=ia:"dh"==key?aa.height+=ia:aa[key]=parseFloat(la[key])}q.model.setGeometry(C,aa)}}}catch(R){null!=window.console&&console.log("Error in icon for "+C.id+": "+R)}}}else if("model"==d.nodeName){for(var X=d.firstChild;null!=X&&X.nodeType!=mxConstants.NODETYPE_ELEMENT;)X=X.nextSibling;null!=X&&(new mxCodec(d.firstChild)).decode(X,z)}else if("view"==d.nodeName){if(d.hasAttribute("scale")&&(q.view.scale=parseFloat(d.getAttribute("scale"))),d.hasAttribute("dx")||
+d.hasAttribute("dy"))q.view.translate=new mxPoint(parseFloat(d.getAttribute("dx")||0),parseFloat(d.getAttribute("dy")||0))}else"fit"==d.nodeName&&(F=d.hasAttribute("max-scale")?parseFloat(d.getAttribute("max-scale")):1);d=d.nextSibling}}finally{z.endUpdate()}null!=F&&this.chromelessResize&&this.chromelessResize(!0,F)}return g};EditorUi.prototype.getCopyFilename=function(d,f){var g=null!=d&&null!=d.getTitle()?d.getTitle():this.defaultFilename;d="";var l=g.lastIndexOf(".");0<=l&&(d=g.substring(l),g=
+g.substring(0,l));if(f){f=g;var q=new Date;g=q.getFullYear();l=q.getMonth()+1;var z=q.getDate(),F=q.getHours(),C=q.getMinutes();q=q.getSeconds();g=f+(" "+(g+"-"+l+"-"+z+"-"+F+"-"+C+"-"+q))}return g=mxResources.get("copyOf",[g])+d};EditorUi.prototype.fileLoaded=function(d,f){var g=this.getCurrentFile();this.fileEditable=this.fileLoadedError=null;this.setCurrentFile(null);var l=!1;this.hideDialog();null!=g&&(EditorUi.debug("File.closed",[g]),g.removeListener(this.descriptorChangedListener),g.close());
this.editor.graph.model.clear();this.editor.undoManager.clear();var q=mxUtils.bind(this,function(){this.setGraphEnabled(!1);this.setCurrentFile(null);null!=g&&this.updateDocumentTitle();this.editor.graph.model.clear();this.editor.undoManager.clear();this.setBackgroundImage(null);!f&&null!=window.location.hash&&0<window.location.hash.length&&(window.location.hash="");null!=this.fname&&(this.fnameWrapper.style.display="none",this.fname.innerText="",this.fname.setAttribute("title",mxResources.get("rename")));
this.editor.setStatus("");this.updateUi();f||this.showSplash()});if(null!=d)try{mxClient.IS_SF&&"min"==uiTheme&&(this.diagramContainer.style.visibility="");this.openingFile=!0;this.setCurrentFile(d);d.addListener("descriptorChanged",this.descriptorChangedListener);d.addListener("contentChanged",this.descriptorChangedListener);d.open();delete this.openingFile;this.setGraphEnabled(!0);this.setMode(d.getMode());this.editor.graph.model.prefix=Editor.guid()+"-";this.editor.undoManager.clear();this.descriptorChanged();
this.updateUi();d.isEditable()?d.isModified()?(d.addUnsavedStatus(),null!=d.backupPatch&&d.patch([d.backupPatch])):this.editor.setStatus(""):this.editor.setStatus('<span class="geStatusAlert">'+mxUtils.htmlEntities(mxResources.get("readOnly"))+"</span>");!this.editor.isChromelessView()||this.editor.editable?(this.editor.graph.selectUnlockedLayer(),this.showLayersDialog(),this.restoreLibraries(),window.self!==window.top&&window.focus()):this.editor.graph.isLightboxView()&&this.lightboxFit();this.chromelessResize&&
-this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));m=!0;if(!this.isOffline()&&null!=d.getMode()){var z="1"==urlParams.sketch?"sketch":uiTheme;if(null==z)z="default";else if("sketch"==z||"min"==z)z+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+z})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));
+this.chromelessResize();this.editor.fireEvent(new mxEventObject("fileLoaded"));l=!0;if(!this.isOffline()&&null!=d.getMode()){var z="1"==urlParams.sketch?"sketch":uiTheme;if(null==z)z="default";else if("sketch"==z||"min"==z)z+=Editor.isDarkMode()?"-dark":"-light";EditorUi.logEvent({category:d.getMode().toUpperCase()+"-OPEN-FILE-"+d.getHash(),action:"size_"+d.getSize(),label:"autosave_"+(this.editor.autosave?"on":"off")+"_theme_"+z})}EditorUi.debug("File.opened",[d]);"1"==urlParams.viewerOnlyMsg&&this.showAlert(mxResources.get("viewerOnlyMsg"));
if(this.editor.editable&&this.mode==d.getMode()&&d.getMode()!=App.MODE_DEVICE&&null!=d.getMode())try{this.addRecent({id:d.getHash(),title:d.getTitle(),mode:d.getMode()})}catch(F){}try{mxSettings.setOpenCounter(mxSettings.getOpenCounter()+1),mxSettings.save()}catch(F){}}catch(F){this.fileLoadedError=F;if(null!=d)try{d.close()}catch(C){}if(EditorUi.enableLogging&&!this.isOffline())try{EditorUi.logEvent({category:"ERROR-LOAD-FILE-"+(null!=d?d.getHash():"none"),action:"message_"+F.message,label:"stack_"+
-F.stack})}catch(C){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(F,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return m};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,m=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var z=0;z<d.length;z++){this.updatePageRoot(d[z]);
-var F=d[z].node.cloneNode(!1);F.removeAttribute("name");m.root=d[z].root;var C=q.encode(m);this.editor.graph.saveViewState(d[z].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(I,G,Z,fa){return!fa||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?fa&&"mxCell"==I.nodeName&&
-"previous"==G?null:Z:Math.round(Z)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var m=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(m^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var z=d.attributes[q].name,F=null!=f?f(d,z,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(m^=this.hashValue(z,
-f,g)+this.hashValue(F,f,g))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)m=(m<<5)-m+this.hashValue(d.childNodes[q],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(q=0;q<d.length;q++)f=(f<<5)-f+d.charCodeAt(q)<<0;m^=f}return m};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,m,q,z,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
+F.stack})}catch(C){}d=mxUtils.bind(this,function(){null!=urlParams.url&&this.spinner.spin(document.body,mxResources.get("reconnecting"))?window.location.search=this.getSearch(["url"]):null!=g?this.fileLoaded(g)||q():q()});f?d():this.handleError(F,mxResources.get("errorLoadingFile"),d,!0,null,null,!0)}else q();return l};EditorUi.prototype.getHashValueForPages=function(d,f){var g=0,l=new mxGraphModel,q=new mxCodec;null!=f&&(f.byteCount=0,f.attrCount=0,f.eltCount=0,f.nodeCount=0);for(var z=0;z<d.length;z++){this.updatePageRoot(d[z]);
+var F=d[z].node.cloneNode(!1);F.removeAttribute("name");l.root=d[z].root;var C=q.encode(l);this.editor.graph.saveViewState(d[z].viewState,C,!0);C.removeAttribute("pageWidth");C.removeAttribute("pageHeight");F.appendChild(C);null!=f&&(f.eltCount+=F.getElementsByTagName("*").length,f.nodeCount+=F.getElementsByTagName("mxCell").length);g=(g<<5)-g+this.hashValue(F,function(I,G,Z,ca){return!ca||"mxGeometry"!=I.nodeName&&"mxPoint"!=I.nodeName||"x"!=G&&"y"!=G&&"width"!=G&&"height"!=G?ca&&"mxCell"==I.nodeName&&
+"previous"==G?null:Z:Math.round(Z)},f)<<0}return g};EditorUi.prototype.hashValue=function(d,f,g){var l=0;if(null!=d&&"object"===typeof d&&"number"===typeof d.nodeType&&"string"===typeof d.nodeName&&"function"===typeof d.getAttribute){null!=d.nodeName&&(l^=this.hashValue(d.nodeName,f,g));if(null!=d.attributes){null!=g&&(g.attrCount+=d.attributes.length);for(var q=0;q<d.attributes.length;q++){var z=d.attributes[q].name,F=null!=f?f(d,z,d.attributes[q].value,!0):d.attributes[q].value;null!=F&&(l^=this.hashValue(z,
+f,g)+this.hashValue(F,f,g))}}if(null!=d.childNodes)for(q=0;q<d.childNodes.length;q++)l=(l<<5)-l+this.hashValue(d.childNodes[q],f,g)<<0}else if(null!=d&&"function"!==typeof d){d=String(d);f=0;null!=g&&(g.byteCount+=d.length);for(q=0;q<d.length;q++)f=(f<<5)-f+d.charCodeAt(q)<<0;l^=f}return l};EditorUi.prototype.descriptorChanged=function(){};EditorUi.prototype.restoreLibraries=function(){};EditorUi.prototype.saveLibrary=function(d,f,g,l,q,z,F){};EditorUi.prototype.isScratchpadEnabled=function(){return isLocalStorage||
mxClient.IS_CHROMEAPP};EditorUi.prototype.toggleScratchpad=function(){this.isScratchpadEnabled()&&(null==this.scratchpad?StorageFile.getFileContent(this,".scratchpad",mxUtils.bind(this,function(d){null==d&&(d=this.emptyLibraryXml);this.loadLibrary(new StorageLibrary(this,d,".scratchpad"))})):this.closeLibrary(this.scratchpad))};EditorUi.prototype.createLibraryDataFromImages=function(d){var f=mxUtils.createXmlDocument(),g=f.createElement("mxlibrary");mxUtils.setTextContent(g,JSON.stringify(d));f.appendChild(g);
return mxUtils.getXml(f)};EditorUi.prototype.closeLibrary=function(d){null!=d&&(this.removeLibrarySidebar(d.getHash()),d.constructor!=LocalLibrary&&mxSettings.removeCustomLibrary(d.getHash()),".scratchpad"==d.title&&(this.scratchpad=null))};EditorUi.prototype.removeLibrarySidebar=function(d){var f=this.sidebar.palettes[d];if(null!=f){for(var g=0;g<f.length;g++)f[g].parentNode.removeChild(f[g]);delete this.sidebar.palettes[d]}};EditorUi.prototype.repositionLibrary=function(d){var f=this.sidebar.container;
-if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var m=g.previousSibling;f.insertBefore(g,d);f.insertBefore(m,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var m=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,m,g.documentElement.getAttribute("title"),
-f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,m){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var z=null,F=mxUtils.bind(this,function(U,ma){0==U.length&&d.isEditable()?
-(null==z&&(z=document.createElement("div"),z.className="geDropTarget",mxUtils.write(z,mxResources.get("dragElementsHere"))),ma.appendChild(z)):this.addLibraryEntries(U,ma)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var C=this.sidebar.addPalette(d.getHash(),g,null!=m?m:!0,mxUtils.bind(this,function(U){F(f,U)}));this.repositionLibrary(q);var I=C.parentNode.previousSibling;m=I.getAttribute("title");
-null!=m&&0<m.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+m);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";I.style.position="relative";var Z=document.createElement("img");Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));Z.setAttribute("valign","absmiddle");Z.setAttribute("border","0");Z.style.position="relative";
-Z.style.top="2px";Z.style.width="14px";Z.style.cursor="pointer";Z.style.margin="0 3px";Editor.isDarkMode()&&(Z.style.filter="invert(100%)");var fa=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(U){if(!mxEvent.isConsumed(U)){var ma=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=fa?this.confirm(mxResources.get("allChangesLost"),null,ma,mxResources.get("cancel"),mxResources.get("discardChanges")):ma();mxEvent.consume(U)}}));
-if(d.isEditable()){var ba=this.editor.graph,Y=null,pa=mxUtils.bind(this,function(U){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(U)}),O=mxUtils.bind(this,function(U){d.setModified(!0);d.isAutosave()?(null!=Y&&null!=Y.parentNode&&Y.parentNode.removeChild(Y),Y=Z.cloneNode(!1),Y.setAttribute("src",Editor.spinImage),Y.setAttribute("title",mxResources.get("saving")),Y.style.cursor="default",Y.style.marginRight="2px",Y.style.marginTop="-2px",G.insertBefore(Y,G.firstChild),I.style.paddingRight=
-18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=Y&&null!=Y.parentNode&&(Y.parentNode.removeChild(Y),I.style.paddingRight=18*G.childNodes.length+"px")})):null==fa&&(fa=Z.cloneNode(!1),fa.setAttribute("src",Editor.saveImage),fa.setAttribute("title",mxResources.get("save")),G.insertBefore(fa,G.firstChild),mxEvent.addListener(fa,"click",mxUtils.bind(this,function(ma){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
-fa||d.isModified()||(I.style.paddingRight=18*G.childNodes.length+"px",fa.parentNode.removeChild(fa),fa=null)});mxEvent.consume(ma)})),I.style.paddingRight=18*G.childNodes.length+"px")}),W=mxUtils.bind(this,function(U,ma,T,M){U=ba.cloneCells(mxUtils.sortCells(ba.model.getTopmostCells(U)));for(var ia=0;ia<U.length;ia++){var N=ba.getCellGeometry(U[ia]);null!=N&&N.translate(-ma.x,-ma.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(U,ma.width,ma.height,M||"",!0,null,!1));U={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(U))),
-w:ma.width,h:ma.height};null!=M&&(U.title=M);f.push(U);O(T);null!=z&&null!=z.parentNode&&0<f.length&&(z.parentNode.removeChild(z),z=null)}),ha=mxUtils.bind(this,function(U){if(ba.isSelectionEmpty())ba.getRubberband().isActive()?(ba.getRubberband().execute(U),ba.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var ma=ba.getSelectionCells(),T=ba.view.getBounds(ma),M=ba.view.scale;T.x/=M;T.y/=M;T.width/=M;T.height/=M;T.x-=
-ba.view.translate.x;T.y-=ba.view.translate.y;W(ma,T)}mxEvent.consume(U)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(U){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler.first&&(ba.graphHandler.suspend(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",ba.panningManager.stop(),ba.autoScroll=!1,mxEvent.consume(U))}),mxUtils.bind(this,function(U){ba.isMouseDown&&null!=ba.panningManager&&
-null!=ba.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,ba.panningManager.stop(),ba.graphHandler.reset(),ba.isMouseDown=!1,ba.autoScroll=!0,ha(U),mxEvent.consume(U))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(U){ba.isMouseDown&&null!=ba.graphHandler.first&&(ba.graphHandler.resume(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",ba.autoScroll=!0)}));Graph.fileSupport&&
-(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(U){C.style.backgroundColor="#f1f3f4";U.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();U.stopPropagation();U.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(U){C.style.cursor="";C.style.backgroundColor="";0<U.dataTransfer.files.length&&this.importFiles(U.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(ma,T,M,ia,N,P,aa,la,u){if(null!=ma&&"image/"==T.substring(0,
-6))ma="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(ma),ma=[new mxCell("",new mxGeometry(0,0,N,P),ma)],ma[0].vertex=!0,W(ma,new mxRectangle(0,0,N,P),U,mxEvent.isAltDown(U)?null:aa.substring(0,aa.lastIndexOf(".")).replace(/_/g," ")),null!=z&&null!=z.parentNode&&0<f.length&&(z.parentNode.removeChild(z),z=null);else{var H=!1,Q=mxUtils.bind(this,function(X,R){null!=X&&"application/pdf"==R&&(R=Editor.extractGraphModelFromPdf(X),null!=
-R&&0<R.length&&(X=R));if(null!=X)if(X=mxUtils.parseXml(X),"mxlibrary"==X.documentElement.nodeName)try{var ca=JSON.parse(mxUtils.getTextContent(X.documentElement));F(ca,C);f=f.concat(ca);O(U);this.spinner.stop();H=!0}catch(va){}else if("mxfile"==X.documentElement.nodeName)try{var ea=X.documentElement.getElementsByTagName("diagram");for(ca=0;ca<ea.length;ca++){var da=this.stringToCells(Editor.getDiagramNodeXml(ea[ca])),qa=this.editor.graph.getBoundingBoxFromGeometry(da);W(da,new mxRectangle(0,0,qa.width,
-qa.height),U)}H=!0}catch(va){null!=window.console&&console.log("error in drop handler:",va)}H||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=z&&null!=z.parentNode&&0<f.length&&(z.parentNode.removeChild(z),z=null)});null!=u&&null!=aa&&(/(\.v(dx|sdx?))($|\?)/i.test(aa)||/(\.vs(x|sx?))($|\?)/i.test(aa))?this.importVisio(u,function(X){Q(X,"text/xml")},null,aa):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(ma,aa)&&null!=u?this.isExternalDataComms()?
-this.parseFile(u,mxUtils.bind(this,function(X){4==X.readyState&&(this.spinner.stop(),200<=X.status&&299>=X.status?Q(X.responseText,"text/xml"):this.handleError({message:mxResources.get(413==X.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):Q(ma,T)}}));U.stopPropagation();U.preventDefault()})),mxEvent.addListener(C,"dragleave",function(U){C.style.cursor="";C.style.backgroundColor=
-"";U.stopPropagation();U.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",mxResources.get("edit"));G.insertBefore(Z,G.firstChild);mxEvent.addListener(Z,"click",pa);mxEvent.addListener(C,"dblclick",function(U){mxEvent.getSource(U)==C&&pa(U)});m=Z.cloneNode(!1);m.setAttribute("src",Editor.plusImage);m.setAttribute("title",mxResources.get("add"));G.insertBefore(m,G.firstChild);mxEvent.addListener(m,"click",ha);this.isOffline()||".scratchpad"!=d.title||
-null==EditorUi.scratchpadHelpLink||(m=document.createElement("span"),m.setAttribute("title",mxResources.get("help")),m.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(m,"?"),mxEvent.addGestureListeners(m,mxUtils.bind(this,function(U){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(U)})),G.insertBefore(m,G.firstChild))}I.appendChild(G);I.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
-0;g<d.length;g++){var m=d[g],q=m.data;if(null!=q){q=this.convertDataUri(q);var z="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==m.aspect&&(z+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(z+"image="+q,m.w,m.h,"",m.title||"",!1,null,!0))}else null!=m.xml&&(q=this.stringToCells(Graph.decompress(m.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,m.w,m.h,m.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=
+if(null==d){var g=this.sidebar.palettes["L.scratchpad"];null==g&&(g=this.sidebar.palettes.search);null!=g&&(d=g[g.length-1].nextSibling)}d=null!=d?d:f.firstChild.nextSibling.nextSibling;g=f.lastChild;var l=g.previousSibling;f.insertBefore(g,d);f.insertBefore(l,g)};EditorUi.prototype.loadLibrary=function(d,f){var g=mxUtils.parseXml(d.getData());if("mxlibrary"==g.documentElement.nodeName){var l=JSON.parse(mxUtils.getTextContent(g.documentElement));this.libraryLoaded(d,l,g.documentElement.getAttribute("title"),
+f)}else throw{message:mxResources.get("notALibraryFile")};};EditorUi.prototype.getLibraryStorageHint=function(d){return""};EditorUi.prototype.libraryLoaded=function(d,f,g,l){if(null!=this.sidebar){d.constructor!=LocalLibrary&&mxSettings.addCustomLibrary(d.getHash());".scratchpad"==d.title&&(this.scratchpad=d);var q=this.sidebar.palettes[d.getHash()];q=null!=q?q[q.length-1].nextSibling:null;this.removeLibrarySidebar(d.getHash());var z=null,F=mxUtils.bind(this,function(X,R){0==X.length&&d.isEditable()?
+(null==z&&(z=document.createElement("div"),z.className="geDropTarget",mxUtils.write(z,mxResources.get("dragElementsHere"))),R.appendChild(z)):this.addLibraryEntries(X,R)});null!=this.sidebar&&null!=f&&this.sidebar.addEntries(f);null==g&&(g=d.getTitle(),null!=g&&/(\.xml)$/i.test(g)&&(g=g.substring(0,g.lastIndexOf("."))));var C=this.sidebar.addPalette(d.getHash(),g,null!=l?l:!0,mxUtils.bind(this,function(X){F(f,X)}));this.repositionLibrary(q);var I=C.parentNode.previousSibling;l=I.getAttribute("title");
+null!=l&&0<l.length&&".scratchpad"!=d.title&&I.setAttribute("title",this.getLibraryStorageHint(d)+"\n"+l);var G=document.createElement("div");G.style.position="absolute";G.style.right="0px";G.style.top="0px";G.style.padding="8px";G.style.backgroundColor="inherit";I.style.position="relative";var Z=document.createElement("img");Z.setAttribute("src",Editor.crossImage);Z.setAttribute("title",mxResources.get("close"));Z.setAttribute("valign","absmiddle");Z.setAttribute("border","0");Z.style.position="relative";
+Z.style.top="2px";Z.style.width="14px";Z.style.cursor="pointer";Z.style.margin="0 3px";Editor.isDarkMode()&&(Z.style.filter="invert(100%)");var ca=null;if(".scratchpad"!=d.title||this.closableScratchpad)G.appendChild(Z),mxEvent.addListener(Z,"click",mxUtils.bind(this,function(X){if(!mxEvent.isConsumed(X)){var R=mxUtils.bind(this,function(){this.closeLibrary(d)});null!=ca?this.confirm(mxResources.get("allChangesLost"),null,R,mxResources.get("cancel"),mxResources.get("discardChanges")):R();mxEvent.consume(X)}}));
+if(d.isEditable()){var ba=this.editor.graph,Y=null,O=mxUtils.bind(this,function(X){this.showLibraryDialog(d.getTitle(),C,f,d,d.getMode());mxEvent.consume(X)}),la=mxUtils.bind(this,function(X){d.setModified(!0);d.isAutosave()?(null!=Y&&null!=Y.parentNode&&Y.parentNode.removeChild(Y),Y=Z.cloneNode(!1),Y.setAttribute("src",Editor.spinImage),Y.setAttribute("title",mxResources.get("saving")),Y.style.cursor="default",Y.style.marginRight="2px",Y.style.marginTop="-2px",G.insertBefore(Y,G.firstChild),I.style.paddingRight=
+18*G.childNodes.length+"px",this.saveLibrary(d.getTitle(),f,d,d.getMode(),!0,!0,function(){null!=Y&&null!=Y.parentNode&&(Y.parentNode.removeChild(Y),I.style.paddingRight=18*G.childNodes.length+"px")})):null==ca&&(ca=Z.cloneNode(!1),ca.setAttribute("src",Editor.saveImage),ca.setAttribute("title",mxResources.get("save")),G.insertBefore(ca,G.firstChild),mxEvent.addListener(ca,"click",mxUtils.bind(this,function(R){this.saveLibrary(d.getTitle(),f,d,d.getMode(),d.constructor==LocalLibrary,!0,function(){null==
+ca||d.isModified()||(I.style.paddingRight=18*G.childNodes.length+"px",ca.parentNode.removeChild(ca),ca=null)});mxEvent.consume(R)})),I.style.paddingRight=18*G.childNodes.length+"px")}),aa=mxUtils.bind(this,function(X,R,sa,M){X=ba.cloneCells(mxUtils.sortCells(ba.model.getTopmostCells(X)));for(var ka=0;ka<X.length;ka++){var L=ba.getCellGeometry(X[ka]);null!=L&&L.translate(-R.x,-R.y)}C.appendChild(this.sidebar.createVertexTemplateFromCells(X,R.width,R.height,M||"",!0,null,!1));X={xml:Graph.compress(mxUtils.getXml(this.editor.graph.encodeCells(X))),
+w:R.width,h:R.height};null!=M&&(X.title=M);f.push(X);la(sa);null!=z&&null!=z.parentNode&&0<f.length&&(z.parentNode.removeChild(z),z=null)}),ia=mxUtils.bind(this,function(X){if(ba.isSelectionEmpty())ba.getRubberband().isActive()?(ba.getRubberband().execute(X),ba.getRubberband().reset()):this.showError(mxResources.get("error"),mxResources.get("nothingIsSelected"),mxResources.get("ok"));else{var R=ba.getSelectionCells(),sa=ba.view.getBounds(R),M=ba.view.scale;sa.x/=M;sa.y/=M;sa.width/=M;sa.height/=M;
+sa.x-=ba.view.translate.x;sa.y-=ba.view.translate.y;aa(R,sa)}mxEvent.consume(X)});mxEvent.addGestureListeners(C,function(){},mxUtils.bind(this,function(X){ba.isMouseDown&&null!=ba.panningManager&&null!=ba.graphHandler.first&&(ba.graphHandler.suspend(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility="hidden"),C.style.backgroundColor="#f1f3f4",C.style.cursor="copy",ba.panningManager.stop(),ba.autoScroll=!1,mxEvent.consume(X))}),mxUtils.bind(this,function(X){ba.isMouseDown&&null!=
+ba.panningManager&&null!=ba.graphHandler&&(C.style.backgroundColor="",C.style.cursor="default",this.sidebar.showTooltips=!0,ba.panningManager.stop(),ba.graphHandler.reset(),ba.isMouseDown=!1,ba.autoScroll=!0,ia(X),mxEvent.consume(X))}));mxEvent.addListener(C,"mouseleave",mxUtils.bind(this,function(X){ba.isMouseDown&&null!=ba.graphHandler.first&&(ba.graphHandler.resume(),null!=ba.graphHandler.hint&&(ba.graphHandler.hint.style.visibility="visible"),C.style.backgroundColor="",C.style.cursor="",ba.autoScroll=
+!0)}));Graph.fileSupport&&(mxEvent.addListener(C,"dragover",mxUtils.bind(this,function(X){C.style.backgroundColor="#f1f3f4";X.dataTransfer.dropEffect="copy";C.style.cursor="copy";this.sidebar.hideTooltip();X.stopPropagation();X.preventDefault()})),mxEvent.addListener(C,"drop",mxUtils.bind(this,function(X){C.style.cursor="";C.style.backgroundColor="";0<X.dataTransfer.files.length&&this.importFiles(X.dataTransfer.files,0,0,this.maxImageSize,mxUtils.bind(this,function(R,sa,M,ka,L,S,ja,ma,u){if(null!=
+R&&"image/"==sa.substring(0,6))R="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;aspect=fixed;image="+this.convertDataUri(R),R=[new mxCell("",new mxGeometry(0,0,L,S),R)],R[0].vertex=!0,aa(R,new mxRectangle(0,0,L,S),X,mxEvent.isAltDown(X)?null:ja.substring(0,ja.lastIndexOf(".")).replace(/_/g," ")),null!=z&&null!=z.parentNode&&0<f.length&&(z.parentNode.removeChild(z),z=null);else{var H=!1,P=mxUtils.bind(this,function(V,Q){null!=V&&"application/pdf"==Q&&(Q=Editor.extractGraphModelFromPdf(V),
+null!=Q&&0<Q.length&&(V=Q));if(null!=V)if(V=mxUtils.parseXml(V),"mxlibrary"==V.documentElement.nodeName)try{var da=JSON.parse(mxUtils.getTextContent(V.documentElement));F(da,C);f=f.concat(da);la(X);this.spinner.stop();H=!0}catch(ua){}else if("mxfile"==V.documentElement.nodeName)try{var ea=V.documentElement.getElementsByTagName("diagram");for(da=0;da<ea.length;da++){var fa=this.stringToCells(Editor.getDiagramNodeXml(ea[da])),pa=this.editor.graph.getBoundingBoxFromGeometry(fa);aa(fa,new mxRectangle(0,
+0,pa.width,pa.height),X)}H=!0}catch(ua){null!=window.console&&console.log("error in drop handler:",ua)}H||(this.spinner.stop(),this.handleError({message:mxResources.get("errorLoadingFile")}));null!=z&&null!=z.parentNode&&0<f.length&&(z.parentNode.removeChild(z),z=null)});null!=u&&null!=ja&&(/(\.v(dx|sdx?))($|\?)/i.test(ja)||/(\.vs(x|sx?))($|\?)/i.test(ja))?this.importVisio(u,function(V){P(V,"text/xml")},null,ja):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(R,ja)&&null!=u?this.isExternalDataComms()?
+this.parseFile(u,mxUtils.bind(this,function(V){4==V.readyState&&(this.spinner.stop(),200<=V.status&&299>=V.status?P(V.responseText,"text/xml"):this.handleError({message:mxResources.get(413==V.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))})):(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):P(R,sa)}}));X.stopPropagation();X.preventDefault()})),mxEvent.addListener(C,"dragleave",function(X){C.style.cursor="";C.style.backgroundColor=
+"";X.stopPropagation();X.preventDefault()}));Z=Z.cloneNode(!1);Z.setAttribute("src",Editor.editImage);Z.setAttribute("title",mxResources.get("edit"));G.insertBefore(Z,G.firstChild);mxEvent.addListener(Z,"click",O);mxEvent.addListener(C,"dblclick",function(X){mxEvent.getSource(X)==C&&O(X)});l=Z.cloneNode(!1);l.setAttribute("src",Editor.plusImage);l.setAttribute("title",mxResources.get("add"));G.insertBefore(l,G.firstChild);mxEvent.addListener(l,"click",ia);this.isOffline()||".scratchpad"!=d.title||
+null==EditorUi.scratchpadHelpLink||(l=document.createElement("span"),l.setAttribute("title",mxResources.get("help")),l.style.cssText="color:#a3a3a3;text-decoration:none;margin-right:2px;cursor:pointer;",mxUtils.write(l,"?"),mxEvent.addGestureListeners(l,mxUtils.bind(this,function(X){this.openLink(EditorUi.scratchpadHelpLink);mxEvent.consume(X)})),G.insertBefore(l,G.firstChild))}I.appendChild(G);I.style.paddingRight=18*G.childNodes.length+"px"}};EditorUi.prototype.addLibraryEntries=function(d,f){for(var g=
+0;g<d.length;g++){var l=d[g],q=l.data;if(null!=q){q=this.convertDataUri(q);var z="shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;";"fixed"==l.aspect&&(z+="aspect=fixed;");f.appendChild(this.sidebar.createVertexTemplate(z+"image="+q,l.w,l.h,"",l.title||"",!1,null,!0))}else null!=l.xml&&(q=this.stringToCells(Graph.decompress(l.xml)),0<q.length&&f.appendChild(this.sidebar.createVertexTemplateFromCells(q,l.w,l.h,l.title||"",!0,null,!0)))}};EditorUi.prototype.getResource=function(d){return null!=
d?d[mxLanguage]||d.main:null};EditorUi.prototype.footerHeight=0;"1"==urlParams.savesidebar&&(Sidebar.prototype.thumbWidth=64,Sidebar.prototype.thumbHeight=64);EditorUi.initTheme=function(){"atlas"==uiTheme?(mxClient.link("stylesheet",STYLE_PATH+"/atlas.css"),"undefined"!==typeof Toolbar&&(Toolbar.prototype.unselectedBackground="linear-gradient(rgb(255, 255, 255) 0px, rgb(242, 242, 242) 100%)",Toolbar.prototype.selectedBackground="rgb(242, 242, 242)"),Editor.prototype.initialTopSpacing=3,EditorUi.prototype.menubarHeight=
41,EditorUi.prototype.toolbarHeight=38):Editor.isDarkMode()&&(mxClient.link("stylesheet",STYLE_PATH+"/dark.css"),Dialog.backdropColor=Editor.darkColor,Format.inactiveTabBackgroundColor="black",Graph.prototype.defaultThemeName="darkTheme",Graph.prototype.shapeBackgroundColor=Editor.darkColor,Graph.prototype.shapeForegroundColor=Editor.lightColor,Graph.prototype.defaultPageBackgroundColor=Editor.darkColor,Graph.prototype.defaultPageBorderColor="#505759",BaseFormatPanel.prototype.buttonBackgroundColor=
Editor.darkColor,mxGraphHandler.prototype.previewColor="#cccccc",StyleFormatPanel.prototype.defaultStrokeColor="#cccccc",mxConstants.DROP_TARGET_COLOR="#00ff00");Editor.sketchFontFamily="Architects Daughter";Editor.sketchFontSource="https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter";Editor.sketchFonts=[{fontFamily:Editor.sketchFontFamily,fontUrl:decodeURIComponent(Editor.sketchFontSource)}];"1"==urlParams.sketch&&("undefined"!==typeof Menus&&(Menus.prototype.defaultFonts=Menus.prototype.defaultFonts.concat(Editor.sketchFonts)),
Graph.prototype.defaultVertexStyle={hachureGap:"4"},Graph.prototype.defaultEdgeStyle={edgeStyle:"none",rounded:"0",curved:"1",jettySize:"auto",orthogonalLoop:"1",endArrow:"open",startSize:"14",endSize:"14",sourcePerimeterSpacing:"8",targetPerimeterSpacing:"8"},Editor.configurationKey=".sketch-configuration",Editor.settingsKey=".sketch-config",Graph.prototype.defaultGridEnabled="1"==urlParams.grid,Graph.prototype.defaultPageVisible="1"==urlParams.pv,Graph.prototype.defaultEdgeLength=120,Editor.fitWindowBorders=
-new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,m,q,z,F){d=new ImageDialog(this,d,f,g,m,q,z,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,m){m||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
-400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,m,q){d=new LibraryDialog(this,d,f,g,m,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(z){z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
+new mxRectangle(60,30,30,30))};EditorUi.initTheme();EditorUi.prototype.showImageDialog=function(d,f,g,l,q,z,F){d=new ImageDialog(this,d,f,g,l,q,z,F);this.showDialog(d.container,Graph.fileSupport?480:360,Graph.fileSupport?200:90,!0,!0);d.init()};EditorUi.prototype.showBackgroundImageDialog=function(d,f){d=null!=d?d:mxUtils.bind(this,function(g,l){l||(g=new ChangePageSetup(this,null,g),g.ignoreColor=!0,this.editor.graph.model.execute(g))});d=new BackgroundImageDialog(this,d,f);this.showDialog(d.container,
+400,200,!0,!0);d.init()};EditorUi.prototype.showLibraryDialog=function(d,f,g,l,q){d=new LibraryDialog(this,d,f,g,l,q);this.showDialog(d.container,640,440,!0,!1,mxUtils.bind(this,function(z){z&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()}));d.init()};var k=EditorUi.prototype.createFormat;EditorUi.prototype.createFormat=function(d){var f=k.apply(this,arguments);this.editor.graph.addListener("viewStateChanged",mxUtils.bind(this,function(g){this.editor.graph.isSelectionEmpty()&&
f.refresh()}));return f};EditorUi.prototype.createSidebarFooterContainer=function(){var d=this.createDiv("geSidebarContainer geSidebarFooter");d.style.position="absolute";d.style.overflow="hidden";var f=document.createElement("a");f.className="geTitle";f.style.color="#DF6C0C";f.style.fontWeight="bold";f.style.height="100%";f.style.paddingTop="9px";f.innerHTML="<span>+</span>";var g=f.getElementsByTagName("span")[0];g.style.fontSize="18px";g.style.marginRight="5px";mxUtils.write(f,mxResources.get("moreShapes")+
-"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(m){m.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(m){this.actions.get("shapes").funct();mxEvent.consume(m)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,m,q,z,F){var C=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
+"...");mxEvent.addListener(f,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(l){l.preventDefault()}));mxEvent.addListener(f,"click",mxUtils.bind(this,function(l){this.actions.get("shapes").funct();mxEvent.consume(l)}));d.appendChild(f);return d};EditorUi.prototype.handleError=function(d,f,g,l,q,z,F){var C=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},I=null!=d&&null!=d.error?d.error:d;if(null!=d&&("1"==urlParams.test||null!=d.stack)&&null!=
d.message)try{F?null!=window.console&&console.error("EditorUi.handleError:",d):EditorUi.logError("Caught: "+(""==d.message&&null!=d.name)?d.name:d.message,d.filename,d.lineNumber,d.columnNumber,d,"INFO")}catch(Y){}if(null!=I||null!=f){F=mxUtils.htmlEntities(mxResources.get("unknownError"));var G=mxResources.get("ok"),Z=null;f=null!=f?f:mxResources.get("error");if(null!=I){null!=I.retry&&(G=mxResources.get("cancel"),Z=function(){C();I.retry()});if(404==I.code||404==I.status||403==I.code){F=403==I.code?
-null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var fa=null!=q?null:null!=z?z:window.location.hash;if(null!=fa&&("#G"==fa.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==fa.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
-"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){fa="#U"==fa.substring(0,2)?fa.substring(45,fa.lastIndexOf("%26ex")):fa.substring(2);this.showError(f,F,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+fa);this.handleError(d,f,g,m,q)}),Z,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){ha.innerText=
-"";for(var U=0;U<pa.length;U++){var ma=document.createElement("option");mxUtils.write(ma,pa[U].displayName);ma.value=U;ha.appendChild(ma);ma=document.createElement("option");ma.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(ma,"<"+pa[U].email+">");ma.setAttribute("disabled","disabled");ha.appendChild(ma)}ma=document.createElement("option");mxUtils.write(ma,mxResources.get("addAccount"));ma.value=pa.length;ha.appendChild(ma)}var pa=this.drive.getUsersList(),O=document.createElement("div"),W=document.createElement("span");
-W.style.marginTop="6px";mxUtils.write(W,mxResources.get("changeUser")+": ");O.appendChild(W);var ha=document.createElement("select");ha.style.width="200px";Y();mxEvent.addListener(ha,"change",mxUtils.bind(this,function(){var U=ha.value,ma=pa.length!=U;ma&&this.drive.setUser(pa[U]);this.drive.authorize(ma,mxUtils.bind(this,function(){ma||(pa=this.drive.getUsersList(),Y())}),mxUtils.bind(this,function(T){this.handleError(T)}),!0)}));O.appendChild(ha);O=new CustomDialog(this,O,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),
-!0)}));this.showDialog(O.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?F=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?F=mxUtils.htmlEntities(I.response.error):"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout")):I.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy")):
-"string"===typeof I&&0<I.length&&(F=mxUtils.htmlEntities(I)))}var ba=z=null;null!=I&&null!=I.helpLink?(z=mxResources.get("help"),ba=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(z=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+z+": "+I.ownerEmail+")"),ba=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,F,G,g,Z,null,null,z,ba,null,null,null,m?g:null)}else null!=
-g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,m,q,z){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=g&&g()},m,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,z);d.init()};
-EditorUi.prototype.showBanner=function(d,f,g,m){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var z=document.createElement("div");z.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(z.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(z.style,
-"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(z.style,"transition","all 1s ease");z.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";z.appendChild(q);q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(m?
+null!=I.message?mxUtils.htmlEntities(I.message):mxUtils.htmlEntities(mxResources.get("accessDenied")):null!=q?q:mxUtils.htmlEntities(mxResources.get("fileNotFoundOrDenied")+(null!=this.drive&&null!=this.drive.user?" ("+this.drive.user.displayName+", "+this.drive.user.email+")":""));var ca=null!=q?null:null!=z?z:window.location.hash;if(null!=ca&&("#G"==ca.substring(0,2)||"#Uhttps%3A%2F%2Fdrive.google.com%2Fuc%3Fid%3D"==ca.substring(0,45))&&(null!=d&&null!=d.error&&(null!=d.error.errors&&0<d.error.errors.length&&
+"fileAccess"==d.error.errors[0].reason||null!=d.error.data&&0<d.error.data.length&&"fileAccess"==d.error.data[0].reason)||404==I.code||404==I.status)){ca="#U"==ca.substring(0,2)?ca.substring(45,ca.lastIndexOf("%26ex")):ca.substring(2);this.showError(f,F,mxResources.get("openInNewWindow"),mxUtils.bind(this,function(){this.editor.graph.openLink("https://drive.google.com/open?id="+ca);this.handleError(d,f,g,l,q)}),Z,mxResources.get("changeUser"),mxUtils.bind(this,function(){function Y(){ia.innerText=
+"";for(var X=0;X<O.length;X++){var R=document.createElement("option");mxUtils.write(R,O[X].displayName);R.value=X;ia.appendChild(R);R=document.createElement("option");R.innerHTML="&nbsp;&nbsp;&nbsp;";mxUtils.write(R,"<"+O[X].email+">");R.setAttribute("disabled","disabled");ia.appendChild(R)}R=document.createElement("option");mxUtils.write(R,mxResources.get("addAccount"));R.value=O.length;ia.appendChild(R)}var O=this.drive.getUsersList(),la=document.createElement("div"),aa=document.createElement("span");
+aa.style.marginTop="6px";mxUtils.write(aa,mxResources.get("changeUser")+": ");la.appendChild(aa);var ia=document.createElement("select");ia.style.width="200px";Y();mxEvent.addListener(ia,"change",mxUtils.bind(this,function(){var X=ia.value,R=O.length!=X;R&&this.drive.setUser(O[X]);this.drive.authorize(R,mxUtils.bind(this,function(){R||(O=this.drive.getUsersList(),Y())}),mxUtils.bind(this,function(sa){this.handleError(sa)}),!0)}));la.appendChild(ia);la=new CustomDialog(this,la,mxUtils.bind(this,function(){this.loadFile(window.location.hash.substr(1),
+!0)}));this.showDialog(la.container,300,100,!0,!0)}),mxResources.get("cancel"),mxUtils.bind(this,function(){this.hideDialog();null!=g&&g()}),480,150);return}}null!=I.message?F=""==I.message&&null!=I.name?mxUtils.htmlEntities(I.name):mxUtils.htmlEntities(I.message):null!=I.response&&null!=I.response.error?F=mxUtils.htmlEntities(I.response.error):"undefined"!==typeof window.App&&(I.code==App.ERROR_TIMEOUT?F=mxUtils.htmlEntities(mxResources.get("timeout")):I.code==App.ERROR_BUSY?F=mxUtils.htmlEntities(mxResources.get("busy")):
+"string"===typeof I&&0<I.length&&(F=mxUtils.htmlEntities(I)))}var ba=z=null;null!=I&&null!=I.helpLink?(z=mxResources.get("help"),ba=mxUtils.bind(this,function(){return this.editor.graph.openLink(I.helpLink)})):null!=I&&null!=I.ownerEmail&&(z=mxResources.get("contactOwner"),F+=mxUtils.htmlEntities(" ("+z+": "+I.ownerEmail+")"),ba=mxUtils.bind(this,function(){return this.openLink("mailto:"+mxUtils.htmlEntities(I.ownerEmail))}));this.showError(f,F,G,g,Z,null,null,z,ba,null,null,null,l?g:null)}else null!=
+g&&g()};EditorUi.prototype.alert=function(d,f,g){d=new ErrorDialog(this,null,d,mxResources.get("ok"),f);this.showDialog(d.container,g||340,100,!0,!1);d.init()};EditorUi.prototype.confirm=function(d,f,g,l,q,z){var F=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},C=Math.min(200,28*Math.ceil(d.length/50));d=new ConfirmDialog(this,d,function(){F();null!=f&&f()},function(){F();null!=g&&g()},l,q,null,null,null,null,C);this.showDialog(d.container,340,46+C,!0,z);d.init()};
+EditorUi.prototype.showBanner=function(d,f,g,l){var q=!1;if(!(this.bannerShowing||this["hideBanner"+d]||isLocalStorage&&null!=mxSettings.settings&&null!=mxSettings.settings["close"+d])){var z=document.createElement("div");z.style.cssText="position:absolute;bottom:10px;left:50%;max-width:90%;padding:18px 34px 12px 20px;font-size:16px;font-weight:bold;white-space:nowrap;cursor:pointer;z-index:"+mxPopupMenu.prototype.zIndex+";";mxUtils.setPrefixedStyle(z.style,"box-shadow","1px 1px 2px 0px #ddd");mxUtils.setPrefixedStyle(z.style,
+"transform","translate(-50%,120%)");mxUtils.setPrefixedStyle(z.style,"transition","all 1s ease");z.className="geBtn gePrimaryBtn";q=document.createElement("img");q.setAttribute("src",IMAGE_PATH+"/logo.png");q.setAttribute("border","0");q.setAttribute("align","absmiddle");q.style.cssText="margin-top:-4px;margin-left:8px;margin-right:12px;width:26px;height:26px;";z.appendChild(q);q=document.createElement("img");q.setAttribute("src",Dialog.prototype.closeImage);q.setAttribute("title",mxResources.get(l?
"doNotShowAgain":"close"));q.setAttribute("border","0");q.style.cssText="position:absolute;right:10px;top:12px;filter:invert(1);padding:6px;margin:-6px;cursor:default;";z.appendChild(q);mxUtils.write(z,f);document.body.appendChild(z);this.bannerShowing=!0;f=document.createElement("div");f.style.cssText="font-size:11px;text-align:center;font-weight:normal;";var F=document.createElement("input");F.setAttribute("type","checkbox");F.setAttribute("id","geDoNotShowAgainCheckbox");F.style.marginRight="6px";
-if(!m){f.appendChild(F);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);z.style.paddingBottom="30px";z.appendChild(f)}var I=mxUtils.bind(this,function(){null!=z.parentNode&&(z.parentNode.removeChild(z),this.bannerShowing=!1,F.checked||m)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,
-"click",mxUtils.bind(this,function(Z){mxEvent.consume(Z);I()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(z.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(z,"click",mxUtils.bind(this,function(Z){var fa=mxEvent.getSource(Z);fa!=F&&fa!=C?(null!=g&&g(),I(),mxEvent.consume(Z)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(z.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,
-3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,m){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<m&&(d=Editor.writeGraphModelToPng(d,"pHYs",
-"dpi",m));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,m,q){var z="jpeg"==g?"jpg":g;m=this.getBaseFilename(m)+(null!=f?".drawio":"")+"."+z;d=this.createImageDataUri(d,f,g,q);this.saveData(m,z,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&
-7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,m,q,z){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=z?z:"drawio"));if(window.Blob&&
-navigator.msSaveOrOpenBlob)d=m?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,m);else{var F=document.createElement("a");z=(null==navigator.userAgent||
-0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);z=65==(C?parseInt(C[2],10):!1)?!1:z}if(z||this.isOffline()){F.href=URL.createObjectURL(m?this.base64ToBlob(d,g):new Blob([d],{type:g}));z?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(I){}}else this.createEchoRequest(d,
-f,g,m,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,m,q,z){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=z?"&base64="+z:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(m?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,m=Math.ceil(g/1024),q=Array(m),z=0;z<m;++z){for(var F=1024*z,C=Math.min(F+1024,g),I=Array(C-F),G=0;F<C;++G,++F)I[G]=
-d[F].charCodeAt(0);q[z]=new Uint8Array(I)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,m,q,z,F,C){z=null!=z?z:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(z);isLocalStorage&&q++;var I=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,Z){try{if("_blank"==Z)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,m);else if(null!=g&&"text/html"==g.substring(0,9)){var fa=new EmbedDialog(this,d);this.showDialog(fa.container,
-450,240,!0,!0);fa.init()}else{var ba=window.open("about:blank");null==ba?mxUtils.popup(d,!0):(ba.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),ba.document.close())}else Z==App.MODE_DEVICE||"download"==Z?this.doSaveLocalFile(d,G,g,m,null,C):null!=G&&0<G.length&&this.pickFolder(Z,mxUtils.bind(this,function(Y){try{this.exportFile(d,G,g,m,Z,Y)}catch(pa){this.handleError(pa)}}))}catch(Y){this.handleError(Y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),
-!1,z,F,null,1<q,I,d,g,m);z=this.isServices(q)?q>I?390:280:160;this.showDialog(f.container,420,z,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var m=window.open("about:blank");null==m||null==m.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||this.editor.graph.mathEnabled?(d=g?d:btoa(unescape(encodeURIComponent(d))),m.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):m.document.write("<html>"+d+"</html>"):
-m.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),m.document.close())};var n=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(m){null==
+if(!l){f.appendChild(F);var C=document.createElement("label");C.setAttribute("for","geDoNotShowAgainCheckbox");mxUtils.write(C,mxResources.get("doNotShowAgain"));f.appendChild(C);z.style.paddingBottom="30px";z.appendChild(f)}var I=mxUtils.bind(this,function(){null!=z.parentNode&&(z.parentNode.removeChild(z),this.bannerShowing=!1,F.checked||l)&&(this["hideBanner"+d]=!0,isLocalStorage&&null!=mxSettings.settings&&(mxSettings.settings["close"+d]=Date.now(),mxSettings.save()))});mxEvent.addListener(q,
+"click",mxUtils.bind(this,function(Z){mxEvent.consume(Z);I()}));var G=mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(z.style,"transform","translate(-50%,120%)");window.setTimeout(mxUtils.bind(this,function(){I()}),1E3)});mxEvent.addListener(z,"click",mxUtils.bind(this,function(Z){var ca=mxEvent.getSource(Z);ca!=F&&ca!=C?(null!=g&&g(),I(),mxEvent.consume(Z)):G()}));window.setTimeout(mxUtils.bind(this,function(){mxUtils.setPrefixedStyle(z.style,"transform","translate(-50%,0%)")}),500);window.setTimeout(G,
+3E4);q=!0}return q};EditorUi.prototype.setCurrentFile=function(d){null!=d&&(d.opened=new Date);this.currentFile=d};EditorUi.prototype.getCurrentFile=function(){return this.currentFile};EditorUi.prototype.isExportToCanvas=function(){return this.editor.isExportToCanvas()};EditorUi.prototype.createImageDataUri=function(d,f,g,l){d=d.toDataURL("image/"+g);if(null!=d&&6<d.length)null!=f&&(d=Editor.writeGraphModelToPng(d,"tEXt","mxfile",encodeURIComponent(f))),0<l&&(d=Editor.writeGraphModelToPng(d,"pHYs",
+"dpi",l));else throw{message:mxResources.get("unknownError")};return d};EditorUi.prototype.saveCanvas=function(d,f,g,l,q){var z="jpeg"==g?"jpg":g;l=this.getBaseFilename(l)+(null!=f?".drawio":"")+"."+z;d=this.createImageDataUri(d,f,g,q);this.saveData(l,z,d.substring(d.lastIndexOf(",")+1),"image/"+g,!0)};EditorUi.prototype.isLocalFileSave=function(){return"remote"!=urlParams.save&&(mxClient.IS_IE||"undefined"!==typeof window.Blob&&"undefined"!==typeof window.URL)&&9!=document.documentMode&&8!=document.documentMode&&
+7!=document.documentMode||this.isOfflineApp()||mxClient.IS_IOS};EditorUi.prototype.showTextDialog=function(d,f){d=new TextareaDialog(this,d,f,null,null,mxResources.get("close"));this.showDialog(d.container,620,460,!0,!0,null,null,null,null,!0);d.init();document.execCommand("selectall",!1,null)};EditorUi.prototype.doSaveLocalFile=function(d,f,g,l,q,z){"text/xml"!=g||/(\.drawio)$/i.test(f)||/(\.xml)$/i.test(f)||/(\.svg)$/i.test(f)||/(\.html)$/i.test(f)||(f=f+"."+(null!=z?z:"drawio"));if(window.Blob&&
+navigator.msSaveOrOpenBlob)d=l?this.base64ToBlob(d,g):new Blob([d],{type:g}),navigator.msSaveOrOpenBlob(d,f);else if(mxClient.IS_IE)g=window.open("about:blank","_blank"),null==g?mxUtils.popup(d,!0):(g.document.write(d),g.document.close(),g.document.execCommand("SaveAs",!0,f),g.close());else if(mxClient.IS_IOS&&this.isOffline())navigator.standalone||null==g||"image/"!=g.substring(0,6)?this.showTextDialog(f+":",d):this.openInNewWindow(d,g,l);else{var F=document.createElement("a");z=(null==navigator.userAgent||
+0>navigator.userAgent.indexOf("PaleMoon/"))&&"undefined"!==typeof F.download;if(mxClient.IS_GC&&null!=navigator.userAgent){var C=navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./);z=65==(C?parseInt(C[2],10):!1)?!1:z}if(z||this.isOffline()){F.href=URL.createObjectURL(l?this.base64ToBlob(d,g):new Blob([d],{type:g}));z?F.download=f:F.setAttribute("target","_blank");document.body.appendChild(F);try{window.setTimeout(function(){URL.revokeObjectURL(F.href)},2E4),F.click(),F.parentNode.removeChild(F)}catch(I){}}else this.createEchoRequest(d,
+f,g,l,q).simulate(document,"_blank")}};EditorUi.prototype.createEchoRequest=function(d,f,g,l,q,z){d="xml="+encodeURIComponent(d);return new mxXmlRequest(SAVE_URL,d+(null!=g?"&mime="+g:"")+(null!=q?"&format="+q:"")+(null!=z?"&base64="+z:"")+(null!=f?"&filename="+encodeURIComponent(f):"")+(l?"&binary=1":""))};EditorUi.prototype.base64ToBlob=function(d,f){f=f||"";d=atob(d);for(var g=d.length,l=Math.ceil(g/1024),q=Array(l),z=0;z<l;++z){for(var F=1024*z,C=Math.min(F+1024,g),I=Array(C-F),G=0;F<C;++G,++F)I[G]=
+d[F].charCodeAt(0);q[z]=new Uint8Array(I)}return new Blob(q,{type:f})};EditorUi.prototype.saveLocalFile=function(d,f,g,l,q,z,F,C){z=null!=z?z:!1;F=null!=F?F:"vsdx"!=q&&(!mxClient.IS_IOS||!navigator.standalone);q=this.getServiceCount(z);isLocalStorage&&q++;var I=4>=q?2:6<q?4:3;f=new CreateDialog(this,f,mxUtils.bind(this,function(G,Z){try{if("_blank"==Z)if(null!=g&&"image/"==g.substring(0,6))this.openInNewWindow(d,g,l);else if(null!=g&&"text/html"==g.substring(0,9)){var ca=new EmbedDialog(this,d);this.showDialog(ca.container,
+450,240,!0,!0);ca.init()}else{var ba=window.open("about:blank");null==ba?mxUtils.popup(d,!0):(ba.document.write("<pre>"+mxUtils.htmlEntities(d,!1)+"</pre>"),ba.document.close())}else Z==App.MODE_DEVICE||"download"==Z?this.doSaveLocalFile(d,G,g,l,null,C):null!=G&&0<G.length&&this.pickFolder(Z,mxUtils.bind(this,function(Y){try{this.exportFile(d,G,g,l,Z,Y)}catch(O){this.handleError(O)}}))}catch(Y){this.handleError(Y)}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),
+!1,z,F,null,1<q,I,d,g,l);z=this.isServices(q)?q>I?390:280:160;this.showDialog(f.container,420,z,!0,!0);f.init()};EditorUi.prototype.openInNewWindow=function(d,f,g){var l=window.open("about:blank");null==l||null==l.document?mxUtils.popup(d,!0):("image/svg+xml"!=f||mxClient.IS_SVG?"image/svg+xml"!=f||this.editor.graph.mathEnabled?(d=g?d:btoa(unescape(encodeURIComponent(d))),l.document.write('<html><img style="max-width:100%;" src="data:'+f+";base64,"+d+'"/></html>')):l.document.write("<html>"+d+"</html>"):
+l.document.write("<html><pre>"+mxUtils.htmlEntities(d,!1)+"</pre></html>"),l.document.close())};var n=EditorUi.prototype.addChromelessToolbarItems;EditorUi.prototype.isChromelessImageExportEnabled=function(){return"draw.io"!=this.getServiceName()||/.*\.draw\.io$/.test(window.location.hostname)||/.*\.diagrams\.net$/.test(window.location.hostname)};EditorUi.prototype.addChromelessToolbarItems=function(d){if(null!=urlParams.tags){this.tagsDialog=this.tagsComponent=null;var f=d(mxUtils.bind(this,function(l){null==
this.tagsComponent&&(this.tagsComponent=this.editor.graph.createTagsDialog(mxUtils.bind(this,function(){return null!=this.tagsDialog}),!0),this.tagsComponent.div.getElementsByTagName("div")[0].style.position="",mxUtils.setPrefixedStyle(this.tagsComponent.div.style,"borderRadius","5px"),this.tagsComponent.div.className="geScrollable",this.tagsComponent.div.style.maxHeight="160px",this.tagsComponent.div.style.maxWidth="120px",this.tagsComponent.div.style.padding="4px",this.tagsComponent.div.style.overflow=
"auto",this.tagsComponent.div.style.height="auto",this.tagsComponent.div.style.position="fixed",this.tagsComponent.div.style.fontFamily=Editor.defaultHtmlFont,mxClient.IS_IE||mxClient.IS_IE11?(this.tagsComponent.div.style.backgroundColor="#ffffff",this.tagsComponent.div.style.border="2px solid black",this.tagsComponent.div.style.color="#000000"):(this.tagsComponent.div.style.backgroundColor="#000000",this.tagsComponent.div.style.color="#ffffff",mxUtils.setOpacity(this.tagsComponent.div,80)));if(null!=
this.tagsDialog)this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null;else{this.tagsDialog=this.tagsComponent.div;mxEvent.addListener(this.tagsDialog,"mouseleave",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));var q=f.getBoundingClientRect();this.tagsDialog.style.left=q.left+"px";this.tagsDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+
-4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(m)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var m=this.editor.graph.getAllTags();f.style.display=0<m.length?"":"none"}))}n.apply(this,arguments);this.editor.addListener("tagsDialogShown",
+4+"px";q=mxUtils.getCurrentStyle(this.editor.graph.container);this.tagsDialog.style.zIndex=q.zIndex;document.body.appendChild(this.tagsDialog);this.tagsComponent.refresh();this.editor.fireEvent(new mxEventObject("tagsDialogShown"))}mxEvent.consume(l)}),Editor.tagsImage,mxResources.get("tags"));this.editor.graph.getModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){var l=this.editor.graph.getAllTags();f.style.display=0<l.length?"":"none"}))}n.apply(this,arguments);this.editor.addListener("tagsDialogShown",
mxUtils.bind(this,function(){null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));this.editor.addListener("layersDialogShown",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null)}));this.editor.addListener("pageSelected",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&
(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));mxEvent.addListener(this.editor.graph.container,"click",mxUtils.bind(this,function(){null!=this.tagsDialog&&(this.tagsDialog.parentNode.removeChild(this.tagsDialog),this.tagsDialog=null);null!=this.layersDialog&&(this.layersDialog.parentNode.removeChild(this.layersDialog),this.layersDialog=null)}));if(this.isExportToCanvas()&&this.isChromelessImageExportEnabled()){this.exportDialog=null;var g=d(mxUtils.bind(this,
-function(m){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var z=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
+function(l){var q=mxUtils.bind(this,function(){mxEvent.removeListener(this.editor.graph.container,"click",q);null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null)});if(null!=this.exportDialog)q.apply(this);else{this.exportDialog=document.createElement("div");var z=g.getBoundingClientRect();mxUtils.setPrefixedStyle(this.exportDialog.style,"borderRadius","5px");this.exportDialog.style.position="fixed";this.exportDialog.style.textAlign="center";
this.exportDialog.style.fontFamily=Editor.defaultHtmlFont;this.exportDialog.style.backgroundColor="#000000";this.exportDialog.style.width="50px";this.exportDialog.style.height="50px";this.exportDialog.style.padding="4px 2px 4px 2px";this.exportDialog.style.color="#ffffff";mxUtils.setOpacity(this.exportDialog,70);this.exportDialog.style.left=z.left+"px";this.exportDialog.style.bottom=parseInt(this.chromelessToolbar.style.bottom)+this.chromelessToolbar.offsetHeight+4+"px";z=mxUtils.getCurrentStyle(this.editor.graph.container);
this.exportDialog.style.zIndex=z.zIndex;var F=new Spinner({lines:8,length:6,width:5,radius:6,rotate:0,color:"#fff",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"28px",zIndex:2E9});F.spin(this.exportDialog);this.editor.exportToCanvas(mxUtils.bind(this,function(C){F.stop();this.exportDialog.style.width="auto";this.exportDialog.style.height="auto";this.exportDialog.style.padding="10px";var I=this.createImageDataUri(C,null,"png");C=document.createElement("img");C.style.maxWidth="140px";C.style.maxHeight=
"140px";C.style.cursor="pointer";C.style.backgroundColor="white";C.setAttribute("title",mxResources.get("openInNewWindow"));C.setAttribute("border","0");C.setAttribute("src",I);this.exportDialog.appendChild(C);mxEvent.addListener(C,"click",mxUtils.bind(this,function(){this.openInNewWindow(I.substring(I.indexOf(",")+1),"image/png",!0);q.apply(this,arguments)}))}),null,this.thumbImageCache,null,mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}),null,null,null,null,null,null,null,
-Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(m)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,m,q){this.isLocalFileSave()?this.saveLocalFile(g,d,m,q,f):this.saveRequest(d,f,mxUtils.bind(this,function(z,F){return this.createEchoRequest(g,z,m,q,f,F)}),g,q,m)};EditorUi.prototype.saveRequest=function(d,f,g,m,q,z,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;
-var C=this.getServiceCount(!1);isLocalStorage&&C++;var I=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,Z){if("_blank"==Z||null!=G&&0<G.length){var fa=g("_blank"==Z?null:G,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=fa&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?fa.simulate(document,"_blank"):this.pickFolder(Z,mxUtils.bind(this,function(ba){z=null!=z?z:"pdf"==f?"application/pdf":"image/"+f;if(null!=m)try{this.exportFile(m,G,z,!0,Z,ba)}catch(Y){this.handleError(Y)}else this.spinner.spin(document.body,
-mxResources.get("saving"))&&fa.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=fa.getStatus()&&299>=fa.getStatus())try{this.exportFile(fa.getText(),G,z,!0,Z,ba)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(Y){this.spinner.stop();this.handleError(Y)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,F,null,1<C,I,m,z,q);C=this.isServices(C)?4<C?390:280:160;
-this.showDialog(d.container,420,C,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,m,q,z){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,m,q,z,F,C,I,G,Z,fa,ba,Y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var pa=this.editor.graph.isSelectionEmpty();g=null!=g?g:pa;var O=f?null:this.editor.graph.background;
-O==mxConstants.NONE&&(O=null);null==O&&0==f&&(O=Z?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var W=this.editor.graph.getSvg(O,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ba,Z,fa);m&&this.editor.graph.addSvgShadow(W);var ha=this.getBaseFilename()+(q?".drawio":"")+".svg";Y=null!=Y?Y:mxUtils.bind(this,function(T){this.isLocalFileSave()||T.length<=MAX_REQUEST_SIZE?this.saveData(ha,"svg",T,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
-mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(T)}))});var U=mxUtils.bind(this,function(T){this.spinner.stop();q&&T.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));Y(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(T))});this.editor.graph.mathEnabled&&this.editor.addMathCss(W);var ma=mxUtils.bind(this,function(T){z?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(T,
-U,this.thumbImageCache)):U(T)});ba?this.embedFonts(W,ma):(this.editor.addFontCss(W),ma(W))}catch(T){this.handleError(T)}};EditorUi.prototype.addRadiobox=function(d,f,g,m,q,z,F){return this.addCheckbox(d,g,m,q,z,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,m,q,z,F,C){z=null!=z?z:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();I.id=F;null!=C&&I.setAttribute("name",C);g&&(I.setAttribute("checked",
-"checked"),I.defaultChecked=!0);m&&I.setAttribute("disabled","disabled");z&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var m=this.getCurrentFile(),q="";null!=m&&m.getMode()!=App.MODE_DEVICE&&m.getMode()!=App.MODE_BROWSER&&(q=window.location.href);var z=document.createElement("select");
-z.style.maxWidth="200px";z.style.width="auto";z.style.marginLeft="8px";z.style.marginRight="10px";z.className="geBtn";m=document.createElement("option");m.setAttribute("value","blank");mxUtils.write(m,mxResources.get("makeCopy"));z.appendChild(m);m=document.createElement("option");m.setAttribute("value","custom");mxUtils.write(m,mxResources.get("custom")+"...");z.appendChild(m);d.appendChild(z);mxEvent.addListener(z,"change",mxUtils.bind(this,function(){if("custom"==z.value){var F=new FilenameDialog(this,
-q,mxResources.get("ok"),function(C){null!=C?q=C:z.value="blank"},mxResources.get("url"),null,null,null,null,function(){z.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===z.value?"_blank":q:null},getEditInput:function(){return g},getEditSelect:function(){return z}}};
-EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=z&&z!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=z):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");F.innerText="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+":");var m=document.createElement("select");
-m.style.width="100px";m.style.padding="0px";m.style.marginLeft="8px";m.style.marginRight="10px";m.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));m.appendChild(q);q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,mxResources.get("openInThisWindow"));
-m.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),m.appendChild(f));d.appendChild(m);mxUtils.write(d,mxResources.get("borderColor")+":");var z="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(z||"none",function(I){z=I;g()});mxEvent.consume(C)}));g();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";F.style.marginLeft="4px";F.style.height=
-"22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";d.appendChild(F);mxUtils.br(d);return{getColor:function(){return z},getTarget:function(){return m.value},focus:function(){m.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,m,q,z,F){F=null!=F?F:[];m&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||F.push("lightbox=1"),"auto"!=d&&F.push("target="+d),null!=
-f&&f!=mxConstants.NONE&&F.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&F.push("edit="+encodeURIComponent(q)),z&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,g,m,q,z,F,C,I,G){I=this.createUrlParameters(d,f,g,m,q,z,I);d=this.getCurrentFile();f=!0;null!=F?g="#U"+encodeURIComponent(F):
-(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(m&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||
-!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,m,q,z,F,C,I,G,Z,fa){this.getBasenames();var ba={};""!=q&&q!=mxConstants.NONE&&(ba.highlight=q);"auto"!==m&&(ba.target=m);G||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(ba.zoom=g/100);g=[];F&&(g.push("pages"),ba.resize=!0,null!=this.pages&&null!=this.currentPage&&(ba.page=
-mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),ba.resize=!0);C&&g.push("layers");I&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ba.toolbar=g.join(" "));null!=Z&&0<Z.length&&(ba.edit=Z);null!=d?ba.url=d:ba.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(z?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';d=null!=d?"&fetch="+encodeURIComponent(d):"";fa(f,'<script type="text/javascript" src="'+
-(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,m){var q=document.createElement("div");q.style.whiteSpace="nowrap";var z=document.createElement("h3");mxUtils.write(z,mxResources.get("html"));z.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(z);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","type-embedhtmldialog");z=C.cloneNode(!0);z.setAttribute("value","copy");F.appendChild(z);var I=document.createElement("span");
-mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(I);mxUtils.br(F);F.appendChild(C);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));F.appendChild(I);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor="pointer",mxUtils.write(I,mxResources.get("share")),F.appendChild(I),mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();
-this.drive.showPermissions(G.getId())})));z.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(F);var Z=this.addLinkSection(q),fa=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";ba.value="100%";q.appendChild(ba);var Y=this.addCheckbox(q,mxResources.get("fit"),
-!0);F=null!=this.pages&&1<this.pages.length;var pa=pa=this.addCheckbox(q,mxResources.get("allPages"),F,!F),O=this.addCheckbox(q,mxResources.get("layers"),!0),W=this.addCheckbox(q,mxResources.get("tags"),!0),ha=this.addCheckbox(q,mxResources.get("lightbox"),!0),U=null;F=380;if(EditorUi.enableHtmlEditOption){U=this.addEditButton(q,ha);var ma=U.getEditInput();ma.style.marginBottom="16px";F+=50;mxEvent.addListener(ha,"change",function(){ha.checked?ma.removeAttribute("disabled"):ma.setAttribute("disabled",
-"disabled");ma.checked&&ha.checked?U.getEditSelect().removeAttribute("disabled"):U.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){m(C.checked?g:null,fa.checked,ba.value,Z.getTarget(),Z.getColor(),Y.checked,pa.checked,O.checked,W.checked,ha.checked,null!=U?U.getLink():null)}),null,d,f);this.showDialog(d.container,340,F,!0,!0);z.focus()};EditorUi.prototype.showPublishLinkDialog=function(d,f,g,m,q,z,F,C){var I=document.createElement("div");
-I.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(G);var Z=this.getCurrentFile();d=0;if(null==Z||Z.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;F=null!=F?F:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";
-var fa=document.createElement("div");fa.style.whiteSpace="normal";mxUtils.write(fa,mxResources.get("linkAccountRequired"));G.appendChild(fa);fa=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(Z.getId())}));fa.style.marginTop="12px";fa.className="geBtn";G.appendChild(fa);I.appendChild(G);fa=document.createElement("a");fa.style.paddingLeft="12px";fa.style.color="gray";fa.style.fontSize="11px";fa.style.cursor="pointer";mxUtils.write(fa,mxResources.get("check"));
-G.appendChild(fa);mxEvent.addListener(fa,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(M){this.spinner.stop();M=new ErrorDialog(this,null,mxResources.get(null!=M?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(M.container,300,80,!0,!1);M.init()}))}))}var ba=null,Y=null;if(null!=g||null!=m)d+=30,mxUtils.write(I,mxResources.get("width")+":"),ba=document.createElement("input"),
-ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",I.appendChild(ba),mxUtils.write(I,mxResources.get("height")+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft="6px",Y.style.marginBottom="10px",Y.value=m+"px",I.appendChild(Y),mxUtils.br(I);var pa=this.addLinkSection(I,z);g=null!=this.pages&&1<this.pages.length;
-var O=null;if(null==Z||Z.constructor!=window.DriveFile||f)O=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var W=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!z),ha=this.addEditButton(I,W),U=ha.getEditInput();z&&(U.style.marginLeft=W.style.marginLeft,W.style.display="none",d-=20);var ma=this.addCheckbox(I,mxResources.get("layers"),!0);ma.style.marginLeft=U.style.marginLeft;ma.style.marginTop="8px";var T=this.addCheckbox(I,mxResources.get("tags"),!0);T.style.marginLeft=U.style.marginLeft;
-T.style.marginBottom="16px";T.style.marginTop="16px";mxEvent.addListener(W,"change",function(){W.checked?(ma.removeAttribute("disabled"),U.removeAttribute("disabled")):(ma.setAttribute("disabled","disabled"),U.setAttribute("disabled","disabled"));U.checked&&W.checked?ha.getEditSelect().removeAttribute("disabled"):ha.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){q(pa.getTarget(),pa.getColor(),null==O?!0:O.checked,W.checked,ha.getLink(),
-ma.checked,null!=ba?ba.value:null,null!=Y?Y.value:null,T.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)):pa.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,m,q){var z=document.createElement("div");z.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText=
-"width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";z.appendChild(F);if(q){mxUtils.write(z,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";z.appendChild(C);mxUtils.write(z,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight=
-"16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";z.appendChild(I);mxUtils.br(z)}var G=this.addCheckbox(z,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Z=m?null:this.addCheckbox(z,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var fa=m?null:this.addCheckbox(z,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=fa&&(fa.style.marginBottom="16px");
-d=new CustomDialog(this,z,mxUtils.bind(this,function(){var ba=parseInt(C.value)/100||1,Y=parseInt(I.value)||0;g(!G.checked,null!=Z?Z.checked:!1,null!=fa?fa.checked:!1,ba,Y)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(m?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,m,q,z,F,C,I){F=null!=F?F:Editor.defaultIncludeDiagram;var G=document.createElement("div");G.style.whiteSpace="nowrap";var Z=this.editor.graph,fa="jpeg"==C?220:300,ba=document.createElement("h3");mxUtils.write(ba,
-d);ba.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ba);mxUtils.write(G,mxResources.get("zoom")+":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft="4px";Y.style.marginRight="12px";Y.value=this.lastExportZoom||"100%";G.appendChild(Y);mxUtils.write(G,mxResources.get("borderWidth")+":");var pa=document.createElement("input");pa.setAttribute("type","text");pa.style.marginRight=
-"16px";pa.style.width="60px";pa.style.marginLeft="4px";pa.value=this.lastExportBorder||"0";G.appendChild(pa);mxUtils.br(G);var O=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,Z.isSelectionEmpty()),W=document.createElement("input");W.style.marginTop="16px";W.style.marginRight="8px";W.style.marginLeft="24px";W.setAttribute("disabled","disabled");W.setAttribute("type","checkbox");var ha=document.createElement("select");ha.style.marginTop="16px";ha.style.marginLeft="8px";d=["selectionOnly","diagram",
-"page"];var U={};for(ba=0;ba<d.length;ba++)if(!Z.isSelectionEmpty()||"selectionOnly"!=d[ba]){var ma=document.createElement("option");mxUtils.write(ma,mxResources.get(d[ba]));ma.setAttribute("value",d[ba]);ha.appendChild(ma);U[d[ba]]=ma}I?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(ha),mxUtils.br(G),fa+=26,mxEvent.addListener(ha,"change",function(){"selectionOnly"==ha.value&&(O.checked=!0)})):z&&(G.appendChild(W),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),fa+=30,mxEvent.addListener(O,
-"change",function(){O.checked?W.removeAttribute("disabled"):W.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?I&&(O.style.display="none",O.nextSibling.style.display="none",O.nextSibling.nextSibling.style.display="none",fa-=30):(ha.value="diagram",W.setAttribute("checked","checked"),W.defaultChecked=!0,mxEvent.addListener(O,"change",function(){ha.value=O.checked?"selectionOnly":"diagram"}));var T=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),M=null;
-Editor.isDarkMode()&&(M=this.addCheckbox(G,mxResources.get("dark"),!0),fa+=26);var ia=this.addCheckbox(G,mxResources.get("shadow"),Z.shadowVisible),N=null;if("png"==C||"jpeg"==C)N=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),fa+=30;var P=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),F,null,null,"jpeg"!=C);P.style.marginBottom="16px";var aa=document.createElement("input");aa.style.marginBottom="16px";aa.style.marginRight="8px";aa.setAttribute("type",
-"checkbox");!this.isOffline()&&this.canvasSupported||aa.setAttribute("disabled","disabled");var la=document.createElement("select");la.style.maxWidth="260px";la.style.marginLeft="8px";la.style.marginRight="10px";la.style.marginBottom="16px";la.className="geBtn";z=document.createElement("option");z.setAttribute("value","none");mxUtils.write(z,mxResources.get("noChange"));la.appendChild(z);z=document.createElement("option");z.setAttribute("value","embedFonts");mxUtils.write(z,mxResources.get("embedFonts"));
-la.appendChild(z);z=document.createElement("option");z.setAttribute("value","lblToSvg");mxUtils.write(z,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||la.appendChild(z);mxEvent.addListener(la,"change",mxUtils.bind(this,function(){"lblToSvg"==la.value?(aa.checked=!0,aa.setAttribute("disabled","disabled"),U.page.style.display="none","page"==ha.value&&(ha.value="diagram"),ia.checked=!1,ia.setAttribute("disabled","disabled"),H.style.display="inline-block",u.style.display="none"):
-"disabled"==aa.getAttribute("disabled")&&(aa.checked=!1,aa.removeAttribute("disabled"),ia.removeAttribute("disabled"),U.page.style.display="",H.style.display="none",u.style.display="")}));f&&(G.appendChild(aa),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(la),mxUtils.br(G),fa+=60);var u=document.createElement("select");u.style.maxWidth="260px";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";f=
-document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));u.appendChild(f);var H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";
-H.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(u),G.appendChild(H),mxUtils.br(G),mxUtils.br(G),fa+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=pa.value;this.lastExportZoom=Y.value;q(Y.value,T.checked,!O.checked,ia.checked,P.checked,aa.checked,pa.value,W.checked,!1,u.value,null!=N?N.checked:null,null!=M?M.checked:null,ha.value,"embedFonts"==la.value,"lblToSvg"==la.value)}),null,g,m);this.showDialog(g.container,340,
-fa,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,m,q){var z=document.createElement("div");z.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(C)}var I=this.addCheckbox(z,mxResources.get("fit"),
-!0),G=this.addCheckbox(z,mxResources.get("shadow"),F.shadowVisible&&m,!m),Z=this.addCheckbox(z,g),fa=this.addCheckbox(z,mxResources.get("lightbox"),!0),ba=this.addEditButton(z,fa),Y=ba.getEditInput(),pa=1<F.model.getChildCount(F.model.getRoot()),O=this.addCheckbox(z,mxResources.get("layers"),pa,!pa);O.style.marginLeft=Y.style.marginLeft;O.style.marginBottom="12px";O.style.marginTop="8px";mxEvent.addListener(fa,"change",function(){fa.checked?(pa&&O.removeAttribute("disabled"),Y.removeAttribute("disabled")):
-(O.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));Y.checked&&fa.checked?ba.getEditSelect().removeAttribute("disabled"):ba.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,z,mxUtils.bind(this,function(){d(I.checked,G.checked,Z.checked,fa.checked,ba.getLink(),O.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,m,q,z,F,C){function I(Y){var pa=" ",O="";m&&(pa=
-" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=Z?"&page="+Z:"")+(q?"&edit=_blank":"")+(z?"&layers=1":"")+"');}})(this);\"",O+="cursor:pointer;");d&&(O+="max-width:100%;");var W="";g&&(W=' width="'+
-Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+Y+'"'+W+(""!=O?' style="'+O+'"':"")+pa+"/>")}var G=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Y){var pa=m?this.getFileData(!0):null;Y=this.createImageDataUri(Y,pa,"png");I(Y)}),null,null,null,mxUtils.bind(this,function(Y){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=
-this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var fa="";g&&(fa="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ba=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(m?"1":"0")+fa+"&xml="+encodeURIComponent(f));ba.send(mxUtils.bind(this,function(){200<=ba.getStatus()&&299>=ba.getStatus()?I("data:image/png;base64,"+ba.getText()):C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=
-function(d,f,g,m,q,z,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=C.getElementsByTagName("a");if(null!=I)for(var G=0;G<I.length;G++){var Z=I[G].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==I[G].getAttribute("target")&&I[G].removeAttribute("target")}m&&C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);if(g){var fa=" ",ba="";m&&(fa="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+
-EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(z?"&layers=1":"")+"');}})(this);\"",ba+="cursor:pointer;");d&&(ba+="max-width:100%;");this.editor.convertImages(C,mxUtils.bind(this,function(Y){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Y))+'"'+(""!=ba?' style="'+ba+'"':"")+fa+"/>")}))}else ba="",m&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
+Editor.defaultBorder);mxEvent.addListener(this.editor.graph.container,"click",q);document.body.appendChild(this.exportDialog)}mxEvent.consume(l)}),Editor.cameraImage,mxResources.get("export"))}};EditorUi.prototype.saveData=function(d,f,g,l,q){this.isLocalFileSave()?this.saveLocalFile(g,d,l,q,f):this.saveRequest(d,f,mxUtils.bind(this,function(z,F){return this.createEchoRequest(g,z,l,q,f,F)}),g,q,l)};EditorUi.prototype.saveRequest=function(d,f,g,l,q,z,F){F=null!=F?F:!mxClient.IS_IOS||!navigator.standalone;
+var C=this.getServiceCount(!1);isLocalStorage&&C++;var I=4>=C?2:6<C?4:3;d=new CreateDialog(this,d,mxUtils.bind(this,function(G,Z){if("_blank"==Z||null!=G&&0<G.length){var ca=g("_blank"==Z?null:G,Z==App.MODE_DEVICE||"download"==Z||null==Z||"_blank"==Z?"0":"1");null!=ca&&(Z==App.MODE_DEVICE||"download"==Z||"_blank"==Z?ca.simulate(document,"_blank"):this.pickFolder(Z,mxUtils.bind(this,function(ba){z=null!=z?z:"pdf"==f?"application/pdf":"image/"+f;if(null!=l)try{this.exportFile(l,G,z,!0,Z,ba)}catch(Y){this.handleError(Y)}else this.spinner.spin(document.body,
+mxResources.get("saving"))&&ca.send(mxUtils.bind(this,function(){this.spinner.stop();if(200<=ca.getStatus()&&299>=ca.getStatus())try{this.exportFile(ca.getText(),G,z,!0,Z,ba)}catch(Y){this.handleError(Y)}else this.handleError({message:mxResources.get("errorSavingFile")})}),function(Y){this.spinner.stop();this.handleError(Y)})})))}}),mxUtils.bind(this,function(){this.hideDialog()}),mxResources.get("saveAs"),mxResources.get("download"),!1,!1,F,null,1<C,I,l,z,q);C=this.isServices(C)?4<C?390:280:160;
+this.showDialog(d.container,420,C,!0,!0);d.init()};EditorUi.prototype.isServices=function(d){return 1!=d};EditorUi.prototype.getEditBlankXml=function(){return this.getFileData(!0)};EditorUi.prototype.exportFile=function(d,f,g,l,q,z){};EditorUi.prototype.pickFolder=function(d,f,g){f(null)};EditorUi.prototype.exportSvg=function(d,f,g,l,q,z,F,C,I,G,Z,ca,ba,Y){if(this.spinner.spin(document.body,mxResources.get("export")))try{var O=this.editor.graph.isSelectionEmpty();g=null!=g?g:O;var la=f?null:this.editor.graph.background;
+la==mxConstants.NONE&&(la=null);null==la&&0==f&&(la=Z?this.editor.graph.defaultPageBackgroundColor:"#ffffff");var aa=this.editor.graph.getSvg(la,d,F,C,null,g,null,null,"blank"==G?"_blank":"self"==G?"_top":null,null,!ba,Z,ca);l&&this.editor.graph.addSvgShadow(aa);var ia=this.getBaseFilename()+(q?".drawio":"")+".svg";Y=null!=Y?Y:mxUtils.bind(this,function(sa){this.isLocalFileSave()||sa.length<=MAX_REQUEST_SIZE?this.saveData(ia,"svg",sa,"image/svg+xml"):this.handleError({message:mxResources.get("drawingTooLarge")},
+mxResources.get("error"),mxUtils.bind(this,function(){mxUtils.popup(sa)}))});var X=mxUtils.bind(this,function(sa){this.spinner.stop();q&&sa.setAttribute("content",this.getFileData(!0,null,null,null,g,I,null,null,null,!1));Y(Graph.xmlDeclaration+"\n"+(q?Graph.svgFileComment+"\n":"")+Graph.svgDoctype+"\n"+mxUtils.getXml(sa))});this.editor.graph.mathEnabled&&this.editor.addMathCss(aa);var R=mxUtils.bind(this,function(sa){z?(null==this.thumbImageCache&&(this.thumbImageCache={}),this.editor.convertImages(sa,
+X,this.thumbImageCache)):X(sa)});ba?this.embedFonts(aa,R):(this.editor.addFontCss(aa),R(aa))}catch(sa){this.handleError(sa)}};EditorUi.prototype.addRadiobox=function(d,f,g,l,q,z,F){return this.addCheckbox(d,g,l,q,z,F,!0,f)};EditorUi.prototype.addCheckbox=function(d,f,g,l,q,z,F,C){z=null!=z?z:!0;var I=document.createElement("input");I.style.marginRight="8px";I.style.marginTop="16px";I.setAttribute("type",F?"radio":"checkbox");F="geCheckbox-"+Editor.guid();I.id=F;null!=C&&I.setAttribute("name",C);g&&
+(I.setAttribute("checked","checked"),I.defaultChecked=!0);l&&I.setAttribute("disabled","disabled");z&&(d.appendChild(I),g=document.createElement("label"),mxUtils.write(g,f),g.setAttribute("for",F),d.appendChild(g),q||mxUtils.br(d));return I};EditorUi.prototype.addEditButton=function(d,f){var g=this.addCheckbox(d,mxResources.get("edit")+":",!0,null,!0);g.style.marginLeft="24px";var l=this.getCurrentFile(),q="";null!=l&&l.getMode()!=App.MODE_DEVICE&&l.getMode()!=App.MODE_BROWSER&&(q=window.location.href);
+var z=document.createElement("select");z.style.maxWidth="200px";z.style.width="auto";z.style.marginLeft="8px";z.style.marginRight="10px";z.className="geBtn";l=document.createElement("option");l.setAttribute("value","blank");mxUtils.write(l,mxResources.get("makeCopy"));z.appendChild(l);l=document.createElement("option");l.setAttribute("value","custom");mxUtils.write(l,mxResources.get("custom")+"...");z.appendChild(l);d.appendChild(z);mxEvent.addListener(z,"change",mxUtils.bind(this,function(){if("custom"==
+z.value){var F=new FilenameDialog(this,q,mxResources.get("ok"),function(C){null!=C?q=C:z.value="blank"},mxResources.get("url"),null,null,null,null,function(){z.value="blank"});this.showDialog(F.container,300,80,!0,!1);F.init()}}));mxEvent.addListener(g,"change",mxUtils.bind(this,function(){g.checked&&(null==f||f.checked)?z.removeAttribute("disabled"):z.setAttribute("disabled","disabled")}));mxUtils.br(d);return{getLink:function(){return g.checked?"blank"===z.value?"_blank":q:null},getEditInput:function(){return g},
+getEditSelect:function(){return z}}};EditorUi.prototype.addLinkSection=function(d,f){function g(){var C=document.createElement("div");C.style.width="100%";C.style.height="100%";C.style.boxSizing="border-box";null!=z&&z!=mxConstants.NONE?(C.style.border="1px solid black",C.style.backgroundColor=z):(C.style.backgroundPosition="center center",C.style.backgroundRepeat="no-repeat",C.style.backgroundImage="url('"+Dialog.prototype.closeImage+"')");F.innerText="";F.appendChild(C)}mxUtils.write(d,mxResources.get("links")+
+":");var l=document.createElement("select");l.style.width="100px";l.style.padding="0px";l.style.marginLeft="8px";l.style.marginRight="10px";l.className="geBtn";var q=document.createElement("option");q.setAttribute("value","auto");mxUtils.write(q,mxResources.get("automatic"));l.appendChild(q);q=document.createElement("option");q.setAttribute("value","blank");mxUtils.write(q,mxResources.get("openInNewWindow"));l.appendChild(q);q=document.createElement("option");q.setAttribute("value","self");mxUtils.write(q,
+mxResources.get("openInThisWindow"));l.appendChild(q);f&&(f=document.createElement("option"),f.setAttribute("value","frame"),mxUtils.write(f,mxResources.get("openInThisWindow")+" ("+mxResources.get("iframe")+")"),l.appendChild(f));d.appendChild(l);mxUtils.write(d,mxResources.get("borderColor")+":");var z="#0000ff",F=null;F=mxUtils.button("",mxUtils.bind(this,function(C){this.pickColor(z||"none",function(I){z=I;g()});mxEvent.consume(C)}));g();F.style.padding=mxClient.IS_FF?"4px 2px 4px 2px":"4px";
+F.style.marginLeft="4px";F.style.height="22px";F.style.width="22px";F.style.position="relative";F.style.top=mxClient.IS_IE||mxClient.IS_IE11||mxClient.IS_EDGE?"6px":"1px";F.className="geColorBtn";d.appendChild(F);mxUtils.br(d);return{getColor:function(){return z},getTarget:function(){return l.value},focus:function(){l.focus()}}};EditorUi.prototype.createUrlParameters=function(d,f,g,l,q,z,F){F=null!=F?F:[];l&&("https://viewer.diagrams.net"==EditorUi.lightboxHost&&"1"!=urlParams.dev||F.push("lightbox=1"),
+"auto"!=d&&F.push("target="+d),null!=f&&f!=mxConstants.NONE&&F.push("highlight="+("#"==f.charAt(0)?f.substring(1):f)),null!=q&&0<q.length&&F.push("edit="+encodeURIComponent(q)),z&&F.push("layers=1"),this.editor.graph.foldingEnabled&&F.push("nav=1"));g&&null!=this.currentPage&&null!=this.pages&&this.currentPage!=this.pages[0]&&F.push("page-id="+this.currentPage.getId());return F};EditorUi.prototype.createLink=function(d,f,g,l,q,z,F,C,I,G){I=this.createUrlParameters(d,f,g,l,q,z,I);d=this.getCurrentFile();
+f=!0;null!=F?g="#U"+encodeURIComponent(F):(d=this.getCurrentFile(),C||null==d||d.constructor!=window.DriveFile?g="#R"+encodeURIComponent(g?this.getFileData(!0,null,null,null,null,null,null,!0,null,!1):Graph.compress(mxUtils.getXml(this.editor.getGraphXml()))):(g="#"+d.getHash(),f=!1));f&&null!=d&&null!=d.getTitle()&&d.getTitle()!=this.defaultFilename&&I.push("title="+encodeURIComponent(d.getTitle()));G&&1<g.length&&(I.push("open="+g.substring(1)),g="");return(l&&"1"!=urlParams.dev?EditorUi.lightboxHost:
+mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?EditorUi.drawHost:"https://"+window.location.host)+"/"+(0<I.length?"?"+I.join("&"):"")+g};EditorUi.prototype.createHtml=function(d,f,g,l,q,z,F,C,I,G,Z,ca){this.getBasenames();var ba={};""!=q&&q!=mxConstants.NONE&&(ba.highlight=q);"auto"!==l&&(ba.target=l);G||(ba.lightbox=!1);ba.nav=this.editor.graph.foldingEnabled;g=parseInt(g);isNaN(g)||100==g||(ba.zoom=g/100);g=[];F&&(g.push("pages"),ba.resize=!0,null!=
+this.pages&&null!=this.currentPage&&(ba.page=mxUtils.indexOf(this.pages,this.currentPage)));f&&(g.push("zoom"),ba.resize=!0);C&&g.push("layers");I&&g.push("tags");0<g.length&&(G&&g.push("lightbox"),ba.toolbar=g.join(" "));null!=Z&&0<Z.length&&(ba.edit=Z);null!=d?ba.url=d:ba.xml=this.getFileData(!0,null,null,null,null,!F);f='<div class="mxgraph" style="'+(z?"max-width:100%;":"")+(""!=g?"border:1px solid transparent;":"")+'" data-mxgraph="'+mxUtils.htmlEntities(JSON.stringify(ba))+'"></div>';d=null!=
+d?"&fetch="+encodeURIComponent(d):"";ca(f,'<script type="text/javascript" src="'+(0<d.length?("1"==urlParams.dev?"https://test.draw.io/embed2.js?dev=1":EditorUi.lightboxHost+"/embed2.js?")+d:"1"==urlParams.dev?"https://test.draw.io/js/viewer-static.min.js":window.DRAWIO_VIEWER_URL?window.DRAWIO_VIEWER_URL:EditorUi.lightboxHost+"/js/viewer-static.min.js")+'">\x3c/script>')};EditorUi.prototype.showHtmlDialog=function(d,f,g,l){var q=document.createElement("div");q.style.whiteSpace="nowrap";var z=document.createElement("h3");
+mxUtils.write(z,mxResources.get("html"));z.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";q.appendChild(z);var F=document.createElement("div");F.style.cssText="border-bottom:1px solid lightGray;padding-bottom:8px;margin-bottom:12px;";var C=document.createElement("input");C.style.cssText="margin-right:8px;margin-top:8px;margin-bottom:8px;";C.setAttribute("value","url");C.setAttribute("type","radio");C.setAttribute("name","type-embedhtmldialog");z=C.cloneNode(!0);z.setAttribute("value",
+"copy");F.appendChild(z);var I=document.createElement("span");mxUtils.write(I,mxResources.get("includeCopyOfMyDiagram"));F.appendChild(I);mxUtils.br(F);F.appendChild(C);I=document.createElement("span");mxUtils.write(I,mxResources.get("publicDiagramUrl"));F.appendChild(I);var G=this.getCurrentFile();null==g&&null!=G&&G.constructor==window.DriveFile&&(I=document.createElement("a"),I.style.paddingLeft="12px",I.style.color="gray",I.style.cursor="pointer",mxUtils.write(I,mxResources.get("share")),F.appendChild(I),
+mxEvent.addListener(I,"click",mxUtils.bind(this,function(){this.hideDialog();this.drive.showPermissions(G.getId())})));z.setAttribute("checked","checked");null==g&&C.setAttribute("disabled","disabled");q.appendChild(F);var Z=this.addLinkSection(q),ca=this.addCheckbox(q,mxResources.get("zoom"),!0,null,!0);mxUtils.write(q,":");var ba=document.createElement("input");ba.setAttribute("type","text");ba.style.marginRight="16px";ba.style.width="60px";ba.style.marginLeft="4px";ba.style.marginRight="12px";
+ba.value="100%";q.appendChild(ba);var Y=this.addCheckbox(q,mxResources.get("fit"),!0);F=null!=this.pages&&1<this.pages.length;var O=O=this.addCheckbox(q,mxResources.get("allPages"),F,!F),la=this.addCheckbox(q,mxResources.get("layers"),!0),aa=this.addCheckbox(q,mxResources.get("tags"),!0),ia=this.addCheckbox(q,mxResources.get("lightbox"),!0),X=null;F=380;if(EditorUi.enableHtmlEditOption){X=this.addEditButton(q,ia);var R=X.getEditInput();R.style.marginBottom="16px";F+=50;mxEvent.addListener(ia,"change",
+function(){ia.checked?R.removeAttribute("disabled"):R.setAttribute("disabled","disabled");R.checked&&ia.checked?X.getEditSelect().removeAttribute("disabled"):X.getEditSelect().setAttribute("disabled","disabled")})}d=new CustomDialog(this,q,mxUtils.bind(this,function(){l(C.checked?g:null,ca.checked,ba.value,Z.getTarget(),Z.getColor(),Y.checked,O.checked,la.checked,aa.checked,ia.checked,null!=X?X.getLink():null)}),null,d,f);this.showDialog(d.container,340,F,!0,!0);z.focus()};EditorUi.prototype.showPublishLinkDialog=
+function(d,f,g,l,q,z,F,C){var I=document.createElement("div");I.style.whiteSpace="nowrap";var G=document.createElement("h3");mxUtils.write(G,d||mxResources.get("link"));G.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";I.appendChild(G);var Z=this.getCurrentFile();d=0;if(null==Z||Z.constructor!=window.DriveFile||f)F=null!=F?F:"https://www.diagrams.net/doc/faq/publish-diagram-as-link";else{d=80;F=null!=F?F:"https://www.diagrams.net/doc/faq/google-drive-publicly-publish-diagram";
+G=document.createElement("div");G.style.cssText="border-bottom:1px solid lightGray;padding-bottom:14px;padding-top:6px;margin-bottom:14px;text-align:center;";var ca=document.createElement("div");ca.style.whiteSpace="normal";mxUtils.write(ca,mxResources.get("linkAccountRequired"));G.appendChild(ca);ca=mxUtils.button(mxResources.get("share"),mxUtils.bind(this,function(){this.drive.showPermissions(Z.getId())}));ca.style.marginTop="12px";ca.className="geBtn";G.appendChild(ca);I.appendChild(G);ca=document.createElement("a");
+ca.style.paddingLeft="12px";ca.style.color="gray";ca.style.fontSize="11px";ca.style.cursor="pointer";mxUtils.write(ca,mxResources.get("check"));G.appendChild(ca);mxEvent.addListener(ca,"click",mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"))&&this.getPublicUrl(this.getCurrentFile(),mxUtils.bind(this,function(M){this.spinner.stop();M=new ErrorDialog(this,null,mxResources.get(null!=M?"diagramIsPublic":"diagramIsNotPublic"),mxResources.get("ok"));this.showDialog(M.container,
+300,80,!0,!1);M.init()}))}))}var ba=null,Y=null;if(null!=g||null!=l)d+=30,mxUtils.write(I,mxResources.get("width")+":"),ba=document.createElement("input"),ba.setAttribute("type","text"),ba.style.marginRight="16px",ba.style.width="50px",ba.style.marginLeft="6px",ba.style.marginRight="16px",ba.style.marginBottom="10px",ba.value="100%",I.appendChild(ba),mxUtils.write(I,mxResources.get("height")+":"),Y=document.createElement("input"),Y.setAttribute("type","text"),Y.style.width="50px",Y.style.marginLeft=
+"6px",Y.style.marginBottom="10px",Y.value=l+"px",I.appendChild(Y),mxUtils.br(I);var O=this.addLinkSection(I,z);g=null!=this.pages&&1<this.pages.length;var la=null;if(null==Z||Z.constructor!=window.DriveFile||f)la=this.addCheckbox(I,mxResources.get("allPages"),g,!g);var aa=this.addCheckbox(I,mxResources.get("lightbox"),!0,null,null,!z),ia=this.addEditButton(I,aa),X=ia.getEditInput();z&&(X.style.marginLeft=aa.style.marginLeft,aa.style.display="none",d-=20);var R=this.addCheckbox(I,mxResources.get("layers"),
+!0);R.style.marginLeft=X.style.marginLeft;R.style.marginTop="8px";var sa=this.addCheckbox(I,mxResources.get("tags"),!0);sa.style.marginLeft=X.style.marginLeft;sa.style.marginBottom="16px";sa.style.marginTop="16px";mxEvent.addListener(aa,"change",function(){aa.checked?(R.removeAttribute("disabled"),X.removeAttribute("disabled")):(R.setAttribute("disabled","disabled"),X.setAttribute("disabled","disabled"));X.checked&&aa.checked?ia.getEditSelect().removeAttribute("disabled"):ia.getEditSelect().setAttribute("disabled",
+"disabled")});f=new CustomDialog(this,I,mxUtils.bind(this,function(){q(O.getTarget(),O.getColor(),null==la?!0:la.checked,aa.checked,ia.getLink(),R.checked,null!=ba?ba.value:null,null!=Y?Y.value:null,sa.checked)}),null,mxResources.get("create"),F,C);this.showDialog(f.container,340,300+d,!0,!0);null!=ba?(ba.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?ba.select():document.execCommand("selectAll",!1,null)):O.focus()};EditorUi.prototype.showRemoteExportDialog=function(d,f,g,l,q){var z=
+document.createElement("div");z.style.whiteSpace="nowrap";var F=document.createElement("h3");mxUtils.write(F,mxResources.get("image"));F.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:"+(q?"10":"4")+"px";z.appendChild(F);if(q){mxUtils.write(z,mxResources.get("zoom")+":");var C=document.createElement("input");C.setAttribute("type","text");C.style.marginRight="16px";C.style.width="60px";C.style.marginLeft="4px";C.style.marginRight="12px";C.value=this.lastExportZoom||"100%";
+z.appendChild(C);mxUtils.write(z,mxResources.get("borderWidth")+":");var I=document.createElement("input");I.setAttribute("type","text");I.style.marginRight="16px";I.style.width="60px";I.style.marginLeft="4px";I.value=this.lastExportBorder||"0";z.appendChild(I);mxUtils.br(z)}var G=this.addCheckbox(z,mxResources.get("selectionOnly"),!1,this.editor.graph.isSelectionEmpty()),Z=l?null:this.addCheckbox(z,mxResources.get("includeCopyOfMyDiagram"),Editor.defaultIncludeDiagram);F=this.editor.graph;var ca=
+l?null:this.addCheckbox(z,mxResources.get("transparentBackground"),F.background==mxConstants.NONE||null==F.background);null!=ca&&(ca.style.marginBottom="16px");d=new CustomDialog(this,z,mxUtils.bind(this,function(){var ba=parseInt(C.value)/100||1,Y=parseInt(I.value)||0;g(!G.checked,null!=Z?Z.checked:!1,null!=ca?ca.checked:!1,ba,Y)}),null,d,f);this.showDialog(d.container,300,(q?25:0)+(l?125:210),!0,!0)};EditorUi.prototype.showExportDialog=function(d,f,g,l,q,z,F,C,I){F=null!=F?F:Editor.defaultIncludeDiagram;
+var G=document.createElement("div");G.style.whiteSpace="nowrap";var Z=this.editor.graph,ca="jpeg"==C?220:300,ba=document.createElement("h3");mxUtils.write(ba,d);ba.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:10px";G.appendChild(ba);mxUtils.write(G,mxResources.get("zoom")+":");var Y=document.createElement("input");Y.setAttribute("type","text");Y.style.marginRight="16px";Y.style.width="60px";Y.style.marginLeft="4px";Y.style.marginRight="12px";Y.value=this.lastExportZoom||
+"100%";G.appendChild(Y);mxUtils.write(G,mxResources.get("borderWidth")+":");var O=document.createElement("input");O.setAttribute("type","text");O.style.marginRight="16px";O.style.width="60px";O.style.marginLeft="4px";O.value=this.lastExportBorder||"0";G.appendChild(O);mxUtils.br(G);var la=this.addCheckbox(G,mxResources.get("selectionOnly"),!1,Z.isSelectionEmpty()),aa=document.createElement("input");aa.style.marginTop="16px";aa.style.marginRight="8px";aa.style.marginLeft="24px";aa.setAttribute("disabled",
+"disabled");aa.setAttribute("type","checkbox");var ia=document.createElement("select");ia.style.marginTop="16px";ia.style.marginLeft="8px";d=["selectionOnly","diagram","page"];var X={};for(ba=0;ba<d.length;ba++)if(!Z.isSelectionEmpty()||"selectionOnly"!=d[ba]){var R=document.createElement("option");mxUtils.write(R,mxResources.get(d[ba]));R.setAttribute("value",d[ba]);ia.appendChild(R);X[d[ba]]=R}I?(mxUtils.write(G,mxResources.get("size")+":"),G.appendChild(ia),mxUtils.br(G),ca+=26,mxEvent.addListener(ia,
+"change",function(){"selectionOnly"==ia.value&&(la.checked=!0)})):z&&(G.appendChild(aa),mxUtils.write(G,mxResources.get("crop")),mxUtils.br(G),ca+=30,mxEvent.addListener(la,"change",function(){la.checked?aa.removeAttribute("disabled"):aa.setAttribute("disabled","disabled")}));Z.isSelectionEmpty()?I&&(la.style.display="none",la.nextSibling.style.display="none",la.nextSibling.nextSibling.style.display="none",ca-=30):(ia.value="diagram",aa.setAttribute("checked","checked"),aa.defaultChecked=!0,mxEvent.addListener(la,
+"change",function(){ia.value=la.checked?"selectionOnly":"diagram"}));var sa=this.addCheckbox(G,mxResources.get("transparentBackground"),!1,null,null,"jpeg"!=C),M=null;Editor.isDarkMode()&&(M=this.addCheckbox(G,mxResources.get("dark"),!0),ca+=26);var ka=this.addCheckbox(G,mxResources.get("shadow"),Z.shadowVisible),L=null;if("png"==C||"jpeg"==C)L=this.addCheckbox(G,mxResources.get("grid"),!1,this.isOffline()||!this.canvasSupported,!1,!0),ca+=30;var S=this.addCheckbox(G,mxResources.get("includeCopyOfMyDiagram"),
+F,null,null,"jpeg"!=C);S.style.marginBottom="16px";var ja=document.createElement("input");ja.style.marginBottom="16px";ja.style.marginRight="8px";ja.setAttribute("type","checkbox");!this.isOffline()&&this.canvasSupported||ja.setAttribute("disabled","disabled");var ma=document.createElement("select");ma.style.maxWidth="260px";ma.style.marginLeft="8px";ma.style.marginRight="10px";ma.style.marginBottom="16px";ma.className="geBtn";z=document.createElement("option");z.setAttribute("value","none");mxUtils.write(z,
+mxResources.get("noChange"));ma.appendChild(z);z=document.createElement("option");z.setAttribute("value","embedFonts");mxUtils.write(z,mxResources.get("embedFonts"));ma.appendChild(z);z=document.createElement("option");z.setAttribute("value","lblToSvg");mxUtils.write(z,mxResources.get("lblToSvg"));this.isOffline()||EditorUi.isElectronApp||ma.appendChild(z);mxEvent.addListener(ma,"change",mxUtils.bind(this,function(){"lblToSvg"==ma.value?(ja.checked=!0,ja.setAttribute("disabled","disabled"),X.page.style.display=
+"none","page"==ia.value&&(ia.value="diagram"),ka.checked=!1,ka.setAttribute("disabled","disabled"),H.style.display="inline-block",u.style.display="none"):"disabled"==ja.getAttribute("disabled")&&(ja.checked=!1,ja.removeAttribute("disabled"),ka.removeAttribute("disabled"),X.page.style.display="",H.style.display="none",u.style.display="")}));f&&(G.appendChild(ja),mxUtils.write(G,mxResources.get("embedImages")),mxUtils.br(G),mxUtils.write(G,mxResources.get("txtSettings")+":"),G.appendChild(ma),mxUtils.br(G),
+ca+=60);var u=document.createElement("select");u.style.maxWidth="260px";u.style.marginLeft="8px";u.style.marginRight="10px";u.className="geBtn";f=document.createElement("option");f.setAttribute("value","auto");mxUtils.write(f,mxResources.get("automatic"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","blank");mxUtils.write(f,mxResources.get("openInNewWindow"));u.appendChild(f);f=document.createElement("option");f.setAttribute("value","self");mxUtils.write(f,mxResources.get("openInThisWindow"));
+u.appendChild(f);var H=document.createElement("div");mxUtils.write(H,mxResources.get("LinksLost"));H.style.margin="7px";H.style.display="none";"svg"==C&&(mxUtils.write(G,mxResources.get("links")+":"),G.appendChild(u),G.appendChild(H),mxUtils.br(G),mxUtils.br(G),ca+=50);g=new CustomDialog(this,G,mxUtils.bind(this,function(){this.lastExportBorder=O.value;this.lastExportZoom=Y.value;q(Y.value,sa.checked,!la.checked,ka.checked,S.checked,ja.checked,O.value,aa.checked,!1,u.value,null!=L?L.checked:null,
+null!=M?M.checked:null,ia.value,"embedFonts"==ma.value,"lblToSvg"==ma.value)}),null,g,l);this.showDialog(g.container,340,ca,!0,!0,null,null,null,null,!0);Y.focus();mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?Y.select():document.execCommand("selectAll",!1,null)};EditorUi.prototype.showEmbedImageDialog=function(d,f,g,l,q){var z=document.createElement("div");z.style.whiteSpace="nowrap";var F=this.editor.graph;if(null!=f){var C=document.createElement("h3");mxUtils.write(C,f);C.style.cssText=
+"width:100%;text-align:center;margin-top:0px;margin-bottom:4px";z.appendChild(C)}var I=this.addCheckbox(z,mxResources.get("fit"),!0),G=this.addCheckbox(z,mxResources.get("shadow"),F.shadowVisible&&l,!l),Z=this.addCheckbox(z,g),ca=this.addCheckbox(z,mxResources.get("lightbox"),!0),ba=this.addEditButton(z,ca),Y=ba.getEditInput(),O=1<F.model.getChildCount(F.model.getRoot()),la=this.addCheckbox(z,mxResources.get("layers"),O,!O);la.style.marginLeft=Y.style.marginLeft;la.style.marginBottom="12px";la.style.marginTop=
+"8px";mxEvent.addListener(ca,"change",function(){ca.checked?(O&&la.removeAttribute("disabled"),Y.removeAttribute("disabled")):(la.setAttribute("disabled","disabled"),Y.setAttribute("disabled","disabled"));Y.checked&&ca.checked?ba.getEditSelect().removeAttribute("disabled"):ba.getEditSelect().setAttribute("disabled","disabled")});f=new CustomDialog(this,z,mxUtils.bind(this,function(){d(I.checked,G.checked,Z.checked,ca.checked,ba.getLink(),la.checked)}),null,mxResources.get("embed"),q);this.showDialog(f.container,
+280,300,!0,!0)};EditorUi.prototype.createEmbedImage=function(d,f,g,l,q,z,F,C){function I(Y){var O=" ",la="";l&&(O=" onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(null!=Z?"&page="+Z:"")+(q?"&edit=_blank":
+"")+(z?"&layers=1":"")+"');}})(this);\"",la+="cursor:pointer;");d&&(la+="max-width:100%;");var aa="";g&&(aa=' width="'+Math.round(G.width)+'" height="'+Math.round(G.height)+'"');F('<img src="'+Y+'"'+aa+(""!=la?' style="'+la+'"':"")+O+"/>")}var G=this.editor.graph.getGraphBounds(),Z=this.getSelectedPageIndex();if(this.isExportToCanvas())this.editor.exportToCanvas(mxUtils.bind(this,function(Y){var O=l?this.getFileData(!0):null;Y=this.createImageDataUri(Y,O,"png");I(Y)}),null,null,null,mxUtils.bind(this,
+function(Y){C({message:mxResources.get("unknownError")})}),null,!0,g?2:1,null,f,null,null,Editor.defaultBorder);else if(f=this.getFileData(!0),G.width*G.height<=MAX_AREA&&f.length<=MAX_REQUEST_SIZE){var ca="";g&&(ca="&w="+Math.round(2*G.width)+"&h="+Math.round(2*G.height));var ba=new mxXmlRequest(EXPORT_URL,"format=png&base64=1&embedXml="+(l?"1":"0")+ca+"&xml="+encodeURIComponent(f));ba.send(mxUtils.bind(this,function(){200<=ba.getStatus()&&299>=ba.getStatus()?I("data:image/png;base64,"+ba.getText()):
+C({message:mxResources.get("unknownError")})}))}else C({message:mxResources.get("drawingTooLarge")})};EditorUi.prototype.createEmbedSvg=function(d,f,g,l,q,z,F){var C=this.editor.graph.getSvg(null,null,null,null,null,null,null,null,null,null,!g),I=C.getElementsByTagName("a");if(null!=I)for(var G=0;G<I.length;G++){var Z=I[G].getAttribute("href");null!=Z&&"#"==Z.charAt(0)&&"_blank"==I[G].getAttribute("target")&&I[G].removeAttribute("target")}l&&C.setAttribute("content",this.getFileData(!0));f&&this.editor.graph.addSvgShadow(C);
+if(g){var ca=" ",ba="";l&&(ca="onclick=\"(function(img){if(img.wnd!=null&&!img.wnd.closed){img.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==img.wnd){img.wnd.postMessage(decodeURIComponent(img.getAttribute('src')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);img.wnd=window.open('"+EditorUi.lightboxHost+"/?client=1"+(q?"&edit=_blank":"")+(z?"&layers=1":"")+"');}})(this);\"",ba+="cursor:pointer;");d&&(ba+="max-width:100%;");this.editor.convertImages(C,
+mxUtils.bind(this,function(Y){F('<img src="'+Editor.createSvgDataUri(mxUtils.getXml(Y))+'"'+(""!=ba?' style="'+ba+'"':"")+ca+"/>")}))}else ba="",l&&(f=this.getSelectedPageIndex(),C.setAttribute("onclick","(function(svg){var src=window.event.target||window.event.srcElement;while (src!=null&&src.nodeName.toLowerCase()!='a'){src=src.parentNode;}if(src==null){if(svg.wnd!=null&&!svg.wnd.closed){svg.wnd.focus();}else{var r=function(evt){if(evt.data=='ready'&&evt.source==svg.wnd){svg.wnd.postMessage(decodeURIComponent(svg.getAttribute('content')),'*');window.removeEventListener('message',r);}};window.addEventListener('message',r);svg.wnd=window.open('"+
EditorUi.lightboxHost+"/?client=1"+(null!=f?"&page="+f:"")+(q?"&edit=_blank":"")+(z?"&layers=1":"")+"');}}})(this);"),ba+="cursor:pointer;"),d&&(d=parseInt(C.getAttribute("width")),q=parseInt(C.getAttribute("height")),C.setAttribute("viewBox","-0.5 -0.5 "+d+" "+q),ba+="max-width:100%;max-height:"+q+"px;",C.removeAttribute("height")),""!=ba&&C.setAttribute("style",ba),this.editor.addFontCss(C),this.editor.graph.mathEnabled&&this.editor.addMathCss(C),F(mxUtils.getXml(C))};EditorUi.prototype.timeSince=
function(d){d=Math.floor((new Date-d)/1E3);var f=Math.floor(d/31536E3);if(1<f)return f+" "+mxResources.get("years");f=Math.floor(d/2592E3);if(1<f)return f+" "+mxResources.get("months");f=Math.floor(d/86400);if(1<f)return f+" "+mxResources.get("days");f=Math.floor(d/3600);if(1<f)return f+" "+mxResources.get("hours");f=Math.floor(d/60);return 1<f?f+" "+mxResources.get("minutes"):1==f?f+" "+mxResources.get("minute"):null};EditorUi.prototype.decodeNodeIntoGraph=function(d,f){if(null!=d){var g=null;if("diagram"==
-d.nodeName)g=d;else if("mxfile"==d.nodeName){var m=d.getElementsByTagName("diagram");if(0<m.length){g=m[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(z){return"page"==z?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==z?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}m=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(z){}finally{this.editor.graph=m}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
-1,g=0;if(null!=d){if(d.hasAttribute("scale")){var m=parseFloat(d.getAttribute("scale"));!isNaN(m)&&0<m&&(f=m)}d.hasAttribute("border")&&(m=parseInt(d.getAttribute("border")),!isNaN(m)&&0<m&&(g=m))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,m,q){try{var z=this.editor.graph,F=null!=z.themes&&"darkTheme"==z.defaultThemeName,C=null;if(null!=g&&0<g.length)z=this.createTemporaryGraph(F?z.getDefaultStylesheet():z.getStylesheet()),document.body.appendChild(z.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
+d.nodeName)g=d;else if("mxfile"==d.nodeName){var l=d.getElementsByTagName("diagram");if(0<l.length){g=l[0];var q=f.getGlobalVariable;f.getGlobalVariable=function(z){return"page"==z?g.getAttribute("name")||mxResources.get("pageWithNumber",[1]):"pagenumber"==z?1:q.apply(this,arguments)}}}null!=g&&(d=Editor.parseDiagramNode(g))}l=this.editor.graph;try{this.editor.graph=f,this.editor.setGraphXml(d)}catch(z){}finally{this.editor.graph=l}return d};EditorUi.prototype.getPngFileProperties=function(d){var f=
+1,g=0;if(null!=d){if(d.hasAttribute("scale")){var l=parseFloat(d.getAttribute("scale"));!isNaN(l)&&0<l&&(f=l)}d.hasAttribute("border")&&(l=parseInt(d.getAttribute("border")),!isNaN(l)&&0<l&&(g=l))}return{scale:f,border:g}};EditorUi.prototype.getEmbeddedPng=function(d,f,g,l,q){try{var z=this.editor.graph,F=null!=z.themes&&"darkTheme"==z.defaultThemeName,C=null;if(null!=g&&0<g.length)z=this.createTemporaryGraph(F?z.getDefaultStylesheet():z.getStylesheet()),document.body.appendChild(z.container),this.decodeNodeIntoGraph(this.editor.extractGraphModel(mxUtils.parseXml(g).documentElement,
!0),z),C=g;else if(F||null!=this.pages&&this.currentPage!=this.pages[0]){z=this.createTemporaryGraph(F?z.getDefaultStylesheet():z.getStylesheet());var I=z.getGlobalVariable;z.setBackgroundImage=this.editor.graph.setBackgroundImage;var G=this.pages[0];this.currentPage==G?z.setBackgroundImage(this.editor.graph.backgroundImage):null!=G.viewState&&null!=G.viewState&&z.setBackgroundImage(G.viewState.backgroundImage);z.getGlobalVariable=function(Z){return"page"==Z?G.getName():"pagenumber"==Z?1:I.apply(this,
-arguments)};document.body.appendChild(z.container);z.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(Z){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var fa=Z.toDataURL("image/png");fa=Editor.writeGraphModelToPng(fa,"tEXt","mxfile",encodeURIComponent(C));d(fa.substring(fa.lastIndexOf(",")+1));z!=this.editor.graph&&z.container.parentNode.removeChild(z.container)}catch(ba){null!=f&&f(ba)}}),null,null,null,mxUtils.bind(this,function(Z){null!=
-f&&f(Z)}),null,null,m,null,z.shadowVisible,null,z,q,null,null,null,"diagram",null)}catch(Z){null!=f&&f(Z)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,m,q,z,F,C,I,G,Z,fa,ba){C=null!=C?C:!0;Z=null!=Z?Z:0;F=null!=I?I:f.background;F==mxConstants.NONE&&(F=null);z=f.getSvg(F,G,Z,null,null,z,null,null,null,f.shadowVisible||fa,null,ba,"diagram");(f.shadowVisible||fa)&&f.addSvgShadow(z,null,null,0==Z);null!=d&&z.setAttribute("content",d);null!=g&&z.setAttribute("resource",g);var Y=mxUtils.bind(this,
-function(pa){pa=(m?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(pa);null!=q&&q(pa);return pa});f.mathEnabled&&this.editor.addMathCss(z);if(null!=q)this.embedFonts(z,mxUtils.bind(this,function(pa){C?this.editor.convertImages(pa,mxUtils.bind(this,function(O){Y(O)})):Y(pa)}));else return Y(z)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
-this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(m){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,m,q,z,F,C,I,G,Z,fa,ba){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Y=this.editor.graph.isSelectionEmpty();g=null!=g?g:Y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(pa){this.spinner.stop();try{this.saveCanvas(pa,
-q?this.getFileData(!0,null,null,null,g,C):null,I,null==this.pages||0==this.pages.length,Z)}catch(O){this.handleError(O)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(pa){this.spinner.stop();this.handleError(pa)}),null,g,d||1,f,m,null,null,z,F,G,fa,ba)}catch(pa){this.spinner.stop(),this.handleError(pa)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,m,q,z,F){f=null!=f?f:0;g=null!=g?g:0;var C=
-[];try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var Z=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var fa=Z.getElementsByTagName("diagram");if(1==fa.length&&!z){if(Z=Editor.parseDiagramNode(fa[0]),null!=this.currentPage&&(d[fa[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ba=fa[0].getAttribute("name");null!=ba&&""!=ba&&this.editor.graph.model.execute(new RenamePage(this,
-this.currentPage,ba))}}else if(0<fa.length){z=[];var Y=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[fa[0].getAttribute("id")]=this.pages[0].getId(),Z=Editor.parseDiagramNode(fa[0]),m=!1,Y=1);for(;Y<fa.length;Y++){var pa=fa[Y].getAttribute("id");fa[Y].removeAttribute("id");var O=this.updatePageRoot(new DiagramPage(fa[Y]));d[pa]=fa[Y].getAttribute("id");var W=this.pages.length;null==O.getName()&&O.setName(mxResources.get("pageWithNumber",[W+1]));I.model.execute(new ChangePage(this,
-O,O,W,!0));z.push(O)}this.updatePageLinks(d,z)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){C=I.importGraphModel(Z,f,g,m);if(null!=C)for(Y=0;Y<C.length;Y++)this.updatePageLinksForCell(d,C[Y]);var ha=I.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=ha&&null!=ha.originalSrc){this.updateBackgroundPageLink(d,ha);var U=new ChangePageSetup(this,null,ha);U.ignoreColor=!0;I.model.execute(U)}}F&&this.insertHandler(C,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(ma){if(q)throw ma;
-this.handleError(ma)}return C};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(m){}};EditorUi.prototype.updatePageLinksForCell=
-function(d,f){var g=document.createElement("div"),m=this.editor.graph,q=m.getLinkForCell(f);null!=q&&m.setLinkForCell(f,this.updatePageLink(d,q));if(m.isHtmlLabel(f)){g.innerHTML=m.sanitizeHtml(m.getLabel(f));for(var z=g.getElementsByTagName("a"),F=!1,C=0;C<z.length;C++)q=z[C].getAttribute("href"),null!=q&&(z[C].setAttribute("href",this.updatePageLink(d,q)),F=!0);F&&m.labelChanged(f,g.innerHTML)}for(C=0;C<m.model.getChildCount(f);C++)this.updatePageLinksForCell(d,m.model.getChildAt(f,C))};EditorUi.prototype.updatePageLink=
-function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var m=JSON.parse(f.substring(17));if(null!=m.actions){for(var q=0;q<m.actions.length;q++){var z=m.actions[q];if(null!=z.open&&Graph.isPageLink(z.open)){var F=z.open.substring(z.open.indexOf(",")+1);g=d[F];null!=g?z.open="data:page/id,"+g:null==this.getPageById(F)&&delete z.open}}f="data:action/json,"+JSON.stringify(m)}}catch(C){}return f};
-EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,m,q){m=null!=m?m:d.name;g=null!=g?g:mxUtils.bind(this,function(F){this.handleError(F)});var z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(m);try{var C="UNKNOWN-VISIO",I=m.lastIndexOf(".");if(0<=I&&I<m.length)C=m.substring(I+1).toUpperCase();else{var G=m.lastIndexOf("/");0<=
-G&&G<m.length&&(m=m.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+m,label:F?"remote":"local"})}catch(fa){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,m);var Z=new XMLHttpRequest;Z.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(m)?"?stencil=1":""));Z.responseType="blob";this.addRemoteServiceSecurityCheck(Z);
-null!=q&&Z.setRequestHeader("x-convert-custom",q);Z.onreadystatechange=mxUtils.bind(this,function(){if(4==Z.readyState)if(200<=Z.status&&299>=Z.status)try{var fa=Z.response;if("text/xml"==fa.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(Y){try{f(Y.target.result)}catch(pa){g({message:mxResources.get("errorLoadingFile")})}});ba.readAsText(fa)}else this.doImportVisio(fa,f,g,m)}catch(Y){g(Y)}else try{""==Z.responseType||"text"==Z.responseType?g({message:Z.responseText}):(ba=new FileReader,
-ba.onload=function(){g({message:JSON.parse(ba.result).Message})},ba.readAsText(Z.response))}catch(Y){g({})}});Z.send(F)}else try{this.doImportVisio(d,f,g,m)}catch(fa){g(fa)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",z))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(q){this.handleError(q)});
-var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?m():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",m))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
-this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var m=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=
+arguments)};document.body.appendChild(z.container);z.model.setRoot(G.root)}this.editor.exportToCanvas(mxUtils.bind(this,function(Z){try{null==C&&(C=this.getFileData(!0,null,null,null,null,null,null,null,null,!1));var ca=Z.toDataURL("image/png");ca=Editor.writeGraphModelToPng(ca,"tEXt","mxfile",encodeURIComponent(C));d(ca.substring(ca.lastIndexOf(",")+1));z!=this.editor.graph&&z.container.parentNode.removeChild(z.container)}catch(ba){null!=f&&f(ba)}}),null,null,null,mxUtils.bind(this,function(Z){null!=
+f&&f(Z)}),null,null,l,null,z.shadowVisible,null,z,q,null,null,null,"diagram",null)}catch(Z){null!=f&&f(Z)}};EditorUi.prototype.getEmbeddedSvg=function(d,f,g,l,q,z,F,C,I,G,Z,ca,ba){C=null!=C?C:!0;Z=null!=Z?Z:0;F=null!=I?I:f.background;F==mxConstants.NONE&&(F=null);z=f.getSvg(F,G,Z,null,null,z,null,null,null,f.shadowVisible||ca,null,ba,"diagram");(f.shadowVisible||ca)&&f.addSvgShadow(z,null,null,0==Z);null!=d&&z.setAttribute("content",d);null!=g&&z.setAttribute("resource",g);var Y=mxUtils.bind(this,
+function(O){O=(l?"":Graph.xmlDeclaration+"\n"+Graph.svgFileComment+"\n"+Graph.svgDoctype+"\n")+mxUtils.getXml(O);null!=q&&q(O);return O});f.mathEnabled&&this.editor.addMathCss(z);if(null!=q)this.embedFonts(z,mxUtils.bind(this,function(O){C?this.editor.convertImages(O,mxUtils.bind(this,function(la){Y(la)})):Y(O)}));else return Y(z)};EditorUi.prototype.embedFonts=function(d,f){this.editor.loadFonts(mxUtils.bind(this,function(){try{null!=this.editor.resolvedFontCss&&this.editor.addFontCss(d,this.editor.resolvedFontCss),
+this.editor.embedExtFonts(mxUtils.bind(this,function(g){try{null!=g&&this.editor.addFontCss(d,g),f(d)}catch(l){f(d)}}))}catch(g){f(d)}}))};EditorUi.prototype.exportImage=function(d,f,g,l,q,z,F,C,I,G,Z,ca,ba){I=null!=I?I:"png";if(this.spinner.spin(document.body,mxResources.get("exporting"))){var Y=this.editor.graph.isSelectionEmpty();g=null!=g?g:Y;null==this.thumbImageCache&&(this.thumbImageCache={});try{this.editor.exportToCanvas(mxUtils.bind(this,function(O){this.spinner.stop();try{this.saveCanvas(O,
+q?this.getFileData(!0,null,null,null,g,C):null,I,null==this.pages||0==this.pages.length,Z)}catch(la){this.handleError(la)}}),null,this.thumbImageCache,null,mxUtils.bind(this,function(O){this.spinner.stop();this.handleError(O)}),null,g,d||1,f,l,null,null,z,F,G,ca,ba)}catch(O){this.spinner.stop(),this.handleError(O)}}};EditorUi.prototype.isCorsEnabledForUrl=function(d){return this.editor.isCorsEnabledForUrl(d)};EditorUi.prototype.importXml=function(d,f,g,l,q,z,F){f=null!=f?f:0;g=null!=g?g:0;var C=[];
+try{var I=this.editor.graph;if(null!=d&&0<d.length){I.model.beginUpdate();try{var G=mxUtils.parseXml(d);d={};var Z=this.editor.extractGraphModel(G.documentElement,null!=this.pages);if(null!=Z&&"mxfile"==Z.nodeName&&null!=this.pages){var ca=Z.getElementsByTagName("diagram");if(1==ca.length&&!z){if(Z=Editor.parseDiagramNode(ca[0]),null!=this.currentPage&&(d[ca[0].getAttribute("id")]=this.currentPage.getId(),this.isBlankFile())){var ba=ca[0].getAttribute("name");null!=ba&&""!=ba&&this.editor.graph.model.execute(new RenamePage(this,
+this.currentPage,ba))}}else if(0<ca.length){z=[];var Y=0;null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&(d[ca[0].getAttribute("id")]=this.pages[0].getId(),Z=Editor.parseDiagramNode(ca[0]),l=!1,Y=1);for(;Y<ca.length;Y++){var O=ca[Y].getAttribute("id");ca[Y].removeAttribute("id");var la=this.updatePageRoot(new DiagramPage(ca[Y]));d[O]=ca[Y].getAttribute("id");var aa=this.pages.length;null==la.getName()&&la.setName(mxResources.get("pageWithNumber",[aa+1]));I.model.execute(new ChangePage(this,
+la,la,aa,!0));z.push(la)}this.updatePageLinks(d,z)}}if(null!=Z&&"mxGraphModel"===Z.nodeName){C=I.importGraphModel(Z,f,g,l);if(null!=C)for(Y=0;Y<C.length;Y++)this.updatePageLinksForCell(d,C[Y]);var ia=I.parseBackgroundImage(Z.getAttribute("backgroundImage"));if(null!=ia&&null!=ia.originalSrc){this.updateBackgroundPageLink(d,ia);var X=new ChangePageSetup(this,null,ia);X.ignoreColor=!0;I.model.execute(X)}}F&&this.insertHandler(C,null,null,I.defaultVertexStyle,I.defaultEdgeStyle,!1,!0)}finally{I.model.endUpdate()}}}catch(R){if(q)throw R;
+this.handleError(R)}return C};EditorUi.prototype.updatePageLinks=function(d,f){for(var g=0;g<f.length;g++)this.updatePageLinksForCell(d,f[g].root),null!=f[g].viewState&&this.updateBackgroundPageLink(d,f[g].viewState.backgroundImage)};EditorUi.prototype.updateBackgroundPageLink=function(d,f){try{if(null!=f&&Graph.isPageLink(f.originalSrc)){var g=d[f.originalSrc.substring(f.originalSrc.indexOf(",")+1)];null!=g&&(f.originalSrc="data:page/id,"+g)}}catch(l){}};EditorUi.prototype.updatePageLinksForCell=
+function(d,f){var g=document.createElement("div"),l=this.editor.graph,q=l.getLinkForCell(f);null!=q&&l.setLinkForCell(f,this.updatePageLink(d,q));if(l.isHtmlLabel(f)){g.innerHTML=l.sanitizeHtml(l.getLabel(f));for(var z=g.getElementsByTagName("a"),F=!1,C=0;C<z.length;C++)q=z[C].getAttribute("href"),null!=q&&(z[C].setAttribute("href",this.updatePageLink(d,q)),F=!0);F&&l.labelChanged(f,g.innerHTML)}for(C=0;C<l.model.getChildCount(f);C++)this.updatePageLinksForCell(d,l.model.getChildAt(f,C))};EditorUi.prototype.updatePageLink=
+function(d,f){if(Graph.isPageLink(f)){var g=d[f.substring(f.indexOf(",")+1)];f=null!=g?"data:page/id,"+g:null}else if("data:action/json,"==f.substring(0,17))try{var l=JSON.parse(f.substring(17));if(null!=l.actions){for(var q=0;q<l.actions.length;q++){var z=l.actions[q];if(null!=z.open&&Graph.isPageLink(z.open)){var F=z.open.substring(z.open.indexOf(",")+1);g=d[F];null!=g?z.open="data:page/id,"+g:null==this.getPageById(F)&&delete z.open}}f="data:action/json,"+JSON.stringify(l)}}catch(C){}return f};
+EditorUi.prototype.isRemoteVisioFormat=function(d){return/(\.v(sd|dx))($|\?)/i.test(d)||/(\.vs(s|x))($|\?)/i.test(d)};EditorUi.prototype.importVisio=function(d,f,g,l,q){l=null!=l?l:d.name;g=null!=g?g:mxUtils.bind(this,function(F){this.handleError(F)});var z=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportVisio){var F=this.isRemoteVisioFormat(l);try{var C="UNKNOWN-VISIO",I=l.lastIndexOf(".");if(0<=I&&I<l.length)C=l.substring(I+1).toUpperCase();else{var G=l.lastIndexOf("/");0<=
+G&&G<l.length&&(l=l.substring(G+1))}EditorUi.logEvent({category:C+"-MS-IMPORT-FILE",action:"filename_"+l,label:F?"remote":"local"})}catch(ca){}if(F)if(null==VSD_CONVERT_URL||this.isOffline())g({message:"draw.io"!=this.getServiceName()?mxResources.get("vsdNoConfig"):mxResources.get("serviceUnavailableOrBlocked")});else{F=new FormData;F.append("file1",d,l);var Z=new XMLHttpRequest;Z.open("POST",VSD_CONVERT_URL+(/(\.vss|\.vsx)$/.test(l)?"?stencil=1":""));Z.responseType="blob";this.addRemoteServiceSecurityCheck(Z);
+null!=q&&Z.setRequestHeader("x-convert-custom",q);Z.onreadystatechange=mxUtils.bind(this,function(){if(4==Z.readyState)if(200<=Z.status&&299>=Z.status)try{var ca=Z.response;if("text/xml"==ca.type){var ba=new FileReader;ba.onload=mxUtils.bind(this,function(Y){try{f(Y.target.result)}catch(O){g({message:mxResources.get("errorLoadingFile")})}});ba.readAsText(ca)}else this.doImportVisio(ca,f,g,l)}catch(Y){g(Y)}else try{""==Z.responseType||"text"==Z.responseType?g({message:Z.responseText}):(ba=new FileReader,
+ba.onload=function(){g({message:JSON.parse(ba.result).Message})},ba.readAsText(Z.response))}catch(Y){g({})}});Z.send(F)}else try{this.doImportVisio(d,f,g,l)}catch(ca){g(ca)}}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportVisio||this.loadingExtensions||this.isOffline(!0)?z():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",z))};EditorUi.prototype.importGraphML=function(d,f,g){g=null!=g?g:mxUtils.bind(this,function(q){this.handleError(q)});
+var l=mxUtils.bind(this,function(){this.loadingExtensions=!1;if(this.doImportGraphML)try{this.doImportGraphML(d,f,g)}catch(q){g(q)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});this.doImportGraphML||this.loadingExtensions||this.isOffline(!0)?l():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",l))};EditorUi.prototype.exportVisio=function(d){var f=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof VsdxExport)try{(new VsdxExport(this)).exportCurrentDiagrams(d)||
+this.handleError({message:mxResources.get("unknownError")})}catch(g){this.handleError(g)}else this.spinner.stop(),this.handleError({message:mxResources.get("serviceUnavailableOrBlocked")})});"undefined"!==typeof VsdxExport||this.loadingExtensions||this.isOffline(!0)?f():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",f))};EditorUi.prototype.convertLucidChart=function(d,f,g){var l=mxUtils.bind(this,function(){this.loadingExtensions=!1;if("undefined"!==typeof window.LucidImporter)try{var q=
JSON.parse(d);f(LucidImporter.importState(q));try{if(EditorUi.logEvent({category:"LUCIDCHART-IMPORT-FILE",action:"size_"+d.length}),null!=window.console&&"1"==urlParams.test){var z=[(new Date).toISOString(),"convertLucidChart",q];null!=q.state&&z.push(JSON.parse(q.state));if(null!=q.svgThumbs)for(var F=0;F<q.svgThumbs.length;F++)z.push(Editor.createSvgDataUri(q.svgThumbs[F]));null!=q.thumb&&z.push(q.thumb);console.log.apply(console,z)}}catch(C){}}catch(C){null!=window.console&&console.error(C),g(C)}else g({message:mxResources.get("serviceUnavailableOrBlocked")})});
-"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(m,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",m)})})})}):mxscript("js/extensions.min.js",m))};EditorUi.prototype.generateMermaidImage=function(d,
-f,g,m){var q=this,z=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(F){try{if(mxClient.IS_IE||mxClient.IS_IE11)F=F.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(F).getElementsByTagName("svg");
-if(0<C.length){var I=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(I)||isNaN(G))try{var Z=C[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(Z[2]);G=parseFloat(Z[3])}catch(fa){I=I||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),I,G)}else m({message:mxResources.get("invalidInput")})}catch(fa){m(fa)}})}catch(F){m(F)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?z():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
-z):mxscript("js/extensions.min.js",z))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,m){function q(C,I,G){c1=C>>2;c2=(C&3)<<4|I>>4;c3=(I&15)<<2|G>>6;c4=G&63;r="";r+=z(c1&63);r+=z(c2&63);r+=z(c3&63);return r+=z(c4&63)}function z(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
+"undefined"!==typeof window.LucidImporter||this.loadingExtensions||this.isOffline(!0)?window.setTimeout(l,0):(this.loadingExtensions=!0,"1"==urlParams.dev?mxscript("js/diagramly/Extensions.js",function(){mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",l)})})})}):mxscript("js/extensions.min.js",l))};EditorUi.prototype.generateMermaidImage=function(d,
+f,g,l){var q=this,z=function(){try{this.loadingMermaid=!1,f=null!=f?f:mxUtils.clone(EditorUi.defaultMermaidConfig),f.securityLevel="strict",f.startOnLoad=!1,Editor.isDarkMode()&&(f.theme="dark"),mermaid.mermaidAPI.initialize(f),mermaid.mermaidAPI.render("geMermaidOutput-"+(new Date).getTime(),d,function(F){try{if(mxClient.IS_IE||mxClient.IS_IE11)F=F.replace(/ xmlns:\S*="http:\/\/www.w3.org\/XML\/1998\/namespace"/g,"").replace(/ (NS xml|\S*):space="preserve"/g,' xml:space="preserve"');var C=mxUtils.parseXml(F).getElementsByTagName("svg");
+if(0<C.length){var I=parseFloat(C[0].getAttribute("width")),G=parseFloat(C[0].getAttribute("height"));if(isNaN(I)||isNaN(G))try{var Z=C[0].getAttribute("viewBox").split(/\s+/);I=parseFloat(Z[2]);G=parseFloat(Z[3])}catch(ca){I=I||100,G=G||100}g(q.convertDataUri(Editor.createSvgDataUri(F)),I,G)}else l({message:mxResources.get("invalidInput")})}catch(ca){l(ca)}})}catch(F){l(F)}};"undefined"!==typeof mermaid||this.loadingMermaid||this.isOffline(!0)?z():(this.loadingMermaid=!0,"1"==urlParams.dev?mxscript("js/mermaid/mermaid.min.js",
+z):mxscript("js/extensions.min.js",z))};EditorUi.prototype.generatePlantUmlImage=function(d,f,g,l){function q(C,I,G){c1=C>>2;c2=(C&3)<<4|I>>4;c3=(I&15)<<2|G>>6;c4=G&63;r="";r+=z(c1&63);r+=z(c2&63);r+=z(c3&63);return r+=z(c4&63)}function z(C){if(10>C)return String.fromCharCode(48+C);C-=10;if(26>C)return String.fromCharCode(65+C);C-=26;if(26>C)return String.fromCharCode(97+C);C-=26;return 0==C?"-":1==C?"_":"?"}var F=new XMLHttpRequest;F.open("GET",("txt"==f?PLANT_URL+"/txt/":"png"==f?PLANT_URL+"/png/":
PLANT_URL+"/svg/")+function(C){r="";for(i=0;i<C.length;i+=3)r=i+2==C.length?r+q(C.charCodeAt(i),C.charCodeAt(i+1),0):i+1==C.length?r+q(C.charCodeAt(i),0,0):r+q(C.charCodeAt(i),C.charCodeAt(i+1),C.charCodeAt(i+2));return r}(Graph.arrayBufferToString(pako.deflateRaw(d))),!0);"txt"!=f&&(F.responseType="blob");F.onload=function(C){if(200<=this.status&&300>this.status)if("txt"==f)g(this.response);else{var I=new FileReader;I.readAsDataURL(this.response);I.onloadend=function(G){var Z=new Image;Z.onload=
-function(){try{var fa=Z.width,ba=Z.height;if(0==fa&&0==ba){var Y=I.result,pa=Y.indexOf(","),O=decodeURIComponent(escape(atob(Y.substring(pa+1)))),W=mxUtils.parseXml(O).getElementsByTagName("svg");0<W.length&&(fa=parseFloat(W[0].getAttribute("width")),ba=parseFloat(W[0].getAttribute("height")))}g(I.result,fa,ba)}catch(ha){m(ha)}};Z.src=I.result};I.onerror=function(G){m(G)}}else m(C)};F.onerror=function(C){m(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var m=this.editor.graph,q=
-null;m.getModel().beginUpdate();try{q=m.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),m.updateCellSize(q,!0)}finally{m.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,m,q,z,F,C){z=null!=z?z:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g,
+function(){try{var ca=Z.width,ba=Z.height;if(0==ca&&0==ba){var Y=I.result,O=Y.indexOf(","),la=decodeURIComponent(escape(atob(Y.substring(O+1)))),aa=mxUtils.parseXml(la).getElementsByTagName("svg");0<aa.length&&(ca=parseFloat(aa[0].getAttribute("width")),ba=parseFloat(aa[0].getAttribute("height")))}g(I.result,ca,ba)}catch(ia){l(ia)}};Z.src=I.result};I.onerror=function(G){l(G)}}else l(C)};F.onerror=function(C){l(C)};F.send()};EditorUi.prototype.insertAsPreText=function(d,f,g){var l=this.editor.graph,
+q=null;l.getModel().beginUpdate();try{q=l.insertVertex(null,null,"<pre>"+d+"</pre>",f,g,1,1,"text;html=1;align=left;verticalAlign=top;"),l.updateCellSize(q,!0)}finally{l.getModel().endUpdate()}return q};EditorUi.prototype.insertTextAt=function(d,f,g,l,q,z,F,C){z=null!=z?z:!0;F=null!=F?F:!0;if(null!=d)if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d))this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(d.replace(/\s+/g,
" "),mxUtils.bind(this,function(ba){4==ba.readyState&&200<=ba.status&&299>=ba.status&&this.editor.graph.setSelectionCells(this.insertTextAt(ba.responseText,f,g,!0))}));else if("data:"==d.substring(0,5)||!this.isOffline()&&(q||/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d))){var I=this.editor.graph;if("data:application/pdf;base64,"==d.substring(0,28)){var G=Editor.extractGraphModelFromPdf(d);if(null!=G&&0<G.length)return this.importXml(G,f,g,z,!0,C)}if(Editor.isPngDataUrl(d)&&(G=Editor.extractGraphModelFromPng(d),
-null!=G&&0<G.length))return this.importXml(G,f,g,z,!0,C);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var Z=this.importXml(G,f,g,z,!0,C);if(0<Z.length)return Z}catch(ba){}this.loadImage(d,mxUtils.bind(this,function(ba){if("data:"==d.substring(0,5))this.resizeImage(ba,d,mxUtils.bind(this,function(O,
-W,ha){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),W,ha,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(O)+";"))}),F,this.maxImageSize);else{var Y=Math.min(1,Math.min(this.maxImageSize/ba.width,this.maxImageSize/ba.height)),pa=Math.round(ba.width*Y);ba=Math.round(ba.height*Y);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),pa,ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
-d+";"))}}),mxUtils.bind(this,function(){var ba=null;I.getModel().beginUpdate();try{ba=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(m?"html=1;":"")),I.updateCellSize(ba),I.fireEvent(new mxEventObject("textInserted","cells",[ba]))}finally{I.getModel().endUpdate()}I.setSelectionCell(ba)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,z,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
-function(ba){this.editor.graph.setSelectionCells(this.importXml(ba,f,g,z,null,C))}),mxUtils.bind(this,function(ba){this.handleError(ba)}));else{I=this.editor.graph;q=null;I.getModel().beginUpdate();try{q=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(m?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
-"...");q.value=d;I.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var fa=I.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=fa.width;q.geometry.height=fa.height}Graph.isLink(q.value)&&I.setLinkForCell(q,q.value);q.geometry.width+=I.gridSize;q.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
+null!=G&&0<G.length))return this.importXml(G,f,g,z,!0,C);if("data:image/svg+xml;"==d.substring(0,19))try{G=null;"data:image/svg+xml;base64,"==d.substring(0,26)?(G=d.substring(d.indexOf(",")+1),G=window.atob&&!mxClient.IS_SF?atob(G):Base64.decode(G,!0)):G=decodeURIComponent(d.substring(d.indexOf(",")+1));var Z=this.importXml(G,f,g,z,!0,C);if(0<Z.length)return Z}catch(ba){}this.loadImage(d,mxUtils.bind(this,function(ba){if("data:"==d.substring(0,5))this.resizeImage(ba,d,mxUtils.bind(this,function(la,
+aa,ia){I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),aa,ia,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+this.convertDataUri(la)+";"))}),F,this.maxImageSize);else{var Y=Math.min(1,Math.min(this.maxImageSize/ba.width,this.maxImageSize/ba.height)),O=Math.round(ba.width*Y);ba=Math.round(ba.height*Y);I.setSelectionCell(I.insertVertex(null,null,"",I.snap(f),I.snap(g),O,ba,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+
+d+";"))}}),mxUtils.bind(this,function(){var ba=null;I.getModel().beginUpdate();try{ba=I.insertVertex(I.getDefaultParent(),null,d,I.snap(f),I.snap(g),1,1,"text;"+(l?"html=1;":"")),I.updateCellSize(ba),I.fireEvent(new mxEventObject("textInserted","cells",[ba]))}finally{I.getModel().endUpdate()}I.setSelectionCell(ba)}))}else{d=Graph.zapGremlins(mxUtils.trim(d));if(this.isCompatibleString(d))return this.importXml(d,f,g,z,null,C);if(0<d.length)if(this.isLucidChartData(d))this.convertLucidChart(d,mxUtils.bind(this,
+function(ba){this.editor.graph.setSelectionCells(this.importXml(ba,f,g,z,null,C))}),mxUtils.bind(this,function(ba){this.handleError(ba)}));else{I=this.editor.graph;q=null;I.getModel().beginUpdate();try{q=I.insertVertex(I.getDefaultParent(),null,"",I.snap(f),I.snap(g),1,1,"text;whiteSpace=wrap;"+(l?"html=1;":""));I.fireEvent(new mxEventObject("textInserted","cells",[q]));"<"==d.charAt(0)&&d.indexOf(">")==d.length-1&&(d=mxUtils.htmlEntities(d));d.length>this.maxTextBytes&&(d=d.substring(0,this.maxTextBytes)+
+"...");q.value=d;I.updateCellSize(q);if(0<this.maxTextWidth&&q.geometry.width>this.maxTextWidth){var ca=I.getPreferredSizeForCell(q,this.maxTextWidth);q.geometry.width=ca.width;q.geometry.height=ca.height}Graph.isLink(q.value)&&I.setLinkForCell(q,q.value);q.geometry.width+=I.gridSize;q.geometry.height+=I.gridSize}finally{I.getModel().endUpdate()}return[q]}}return[]};EditorUi.prototype.formatFileSize=function(d){var f=-1;do d/=1024,f++;while(1024<d);return Math.max(d,.1).toFixed(1)+" kB; MB; GB; TB;PB;EB;ZB;YB".split(";")[f]};
EditorUi.prototype.convertDataUri=function(d){if("data:"==d.substring(0,5)){var f=d.indexOf(";");0<f&&(d=d.substring(0,f)+d.substring(d.indexOf(",",f+1)))}return d};EditorUi.prototype.isRemoteFileFormat=function(d,f){return/("contentType":\s*"application\/gliffy\+json")/.test(d)};EditorUi.prototype.isLucidChartData=function(d){return null!=d&&('{"state":"{\\"Properties\\":'==d.substring(0,26)||'{"Properties":'==d.substring(0,14))};EditorUi.prototype.importLocalFile=function(d,f){if(d&&Graph.fileSupport){if(null==
this.importFileInputElt){var g=document.createElement("input");g.setAttribute("type","file");mxEvent.addListener(g,"change",mxUtils.bind(this,function(){null!=g.files&&(this.importFiles(g.files,null,null,this.maxImageSize),g.type="",g.type="file",g.value="")}));g.style.display="none";document.body.appendChild(g);this.importFileInputElt=g}this.importFileInputElt.click()}else{window.openNew=!1;window.openKey="import";window.listBrowserFiles=mxUtils.bind(this,function(F,C){StorageFile.listFiles(this,
-"F",F,C)});window.openBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.getFileContent(this,F,C,I)});window.deleteBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.deleteFile(this,F,C,I)});if(!f){var m=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(F=new Blob([F],{type:"application/octet-stream"}),
-this.importVisio(F,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var q=this.dialog,z=q.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=m;z.apply(q,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
-EditorUi.prototype.importZipFile=function(d,f,g){var m=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(z){if(mxUtils.isEmptyObject(z.files))g();else{var F=0,C,I=!1;z.forEach(function(G,Z){G=Z.name.toLowerCase();"diagram/diagram.xml"==G?(I=!0,Z.async("string").then(function(fa){0==fa.indexOf("<mxfile ")?f(fa):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=Z))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&
-m.isRemoteFileFormat(G,d.name)?m.isOffline()?m.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):m.parseFileData(G,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?f(Z.responseText):g())}),d.name):g()}):I||g()}},function(z){g(z)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,m,q,z,F,C,I,G,Z,fa){G=null!=
-G?G:!0;var ba=!1,Y=null,pa=mxUtils.bind(this,function(O){var W=null;null!=O&&"<mxlibrary"==O.substring(0,10)?this.loadLibrary(new LocalLibrary(this,O,F)):W=this.importXml(O,g,m,G,null,null!=fa?mxEvent.isControlDown(fa):null);null!=C&&C(W)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=Z?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,m,G,null,null!=fa?mxEvent.isControlDown(fa):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=d.substring(0,
-I)+d.substring(d.indexOf(",",I+1))),G&&f.isGridEnabled()&&(g=f.snap(g),m=f.snap(m)),Y=[f.insertVertex(null,null,"",g,m,q,z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(ba=!0,this.importGraphML(d,pa)):null!=I&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(ba=!0,this.importVisio(I,pa)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?
-this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ba=!0,q=mxUtils.bind(this,function(O){4==O.readyState&&(200<=O.status&&299>=O.status?pa(O.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(I,q,F)):0==d.indexOf("PK")&&null!=I?(ba=!0,this.importZipFile(I,pa,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,m,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Y=this.insertTextAt(this.validateFileData(d),
-g,m,!0,null,G,null,null!=fa?mxEvent.isControlDown(fa):null));ba||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,m,q,z,F,C,I,G,Z,fa,ba){m=null!=m?m:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=f&&null!=g,pa=!0;f=null!=f?f:0;g=null!=g?g:0;var O=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var W=Z||this.resampleThreshold,ha=0;ha<d.length;ha++)if("image/svg"!==d[ha].type.substring(0,9)&&"image/"===d[ha].type.substring(0,6)&&d[ha].size>W){O=!0;break}var U=mxUtils.bind(this,
-function(){var ma=this.editor.graph,T=ma.gridSize;q=null!=q?q:mxUtils.bind(this,function(la,u,H,Q,X,R,ca,ea,da){try{return null!=la&&"<mxlibrary"==la.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,la,ca)),null):this.importFile(la,u,H,Q,X,R,ca,ea,da,Y,fa,ba)}catch(qa){return this.handleError(qa),null}});z=null!=z?z:mxUtils.bind(this,function(la){ma.setSelectionCells(la)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var M=d.length,ia=M,N=[],P=mxUtils.bind(this,
-function(la,u){N[la]=u;if(0==--ia){this.spinner.stop();if(null!=C)C(N);else{var H=[];ma.getModel().beginUpdate();try{for(la=0;la<N.length;la++){var Q=N[la]();null!=Q&&(H=H.concat(Q))}}finally{ma.getModel().endUpdate()}}z(H)}}),aa=0;aa<M;aa++)mxUtils.bind(this,function(la){var u=d[la];if(null!=u){var H=new FileReader;H.onload=mxUtils.bind(this,function(Q){if(null==F||F(u))if("image/"==u.type.substring(0,6))if("image/svg"==u.type.substring(0,9)){var X=Graph.clipSvgDataUri(Q.target.result),R=X.indexOf(",");
-R=decodeURIComponent(escape(atob(X.substring(R+1))));var ca=mxUtils.parseXml(R);R=ca.getElementsByTagName("svg");if(0<R.length){R=R[0];var ea=fa?null:R.getAttribute("content");null!=ea&&"<"!=ea.charAt(0)&&"%"!=ea.charAt(0)&&(ea=unescape(window.atob?atob(ea):Base64.decode(ea,!0)));null!=ea&&"%"==ea.charAt(0)&&(ea=decodeURIComponent(ea));null==ea||"<mxfile "!==ea.substring(0,8)&&"<mxGraphModel "!==ea.substring(0,14)?P(la,mxUtils.bind(this,function(){try{if(null!=ca){var va=ca.getElementsByTagName("svg");
-if(0<va.length){var ua=va[0],Aa=ua.getAttribute("width"),za=ua.getAttribute("height");Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;za=null!=za&&"%"!=za.charAt(za.length-1)?parseFloat(za):NaN;var Ca=ua.getAttribute("viewBox");if(null==Ca||0==Ca.length)ua.setAttribute("viewBox","0 0 "+Aa+" "+za);else if(isNaN(Aa)||isNaN(za)){var sa=Ca.split(" ");3<sa.length&&(Aa=parseFloat(sa[2]),za=parseFloat(sa[3]))}X=Editor.createSvgDataUri(mxUtils.getXml(ua));var Va=Math.min(1,Math.min(m/Math.max(1,
-Aa)),m/Math.max(1,za)),Ua=q(X,u.type,f+la*T,g+la*T,Math.max(1,Math.round(Aa*Va)),Math.max(1,Math.round(za*Va)),u.name);if(isNaN(Aa)||isNaN(za)){var Ra=new Image;Ra.onload=mxUtils.bind(this,function(){Aa=Math.max(1,Ra.width);za=Math.max(1,Ra.height);Ua[0].geometry.width=Aa;Ua[0].geometry.height=za;ua.setAttribute("viewBox","0 0 "+Aa+" "+za);X=Editor.createSvgDataUri(mxUtils.getXml(ua));var Za=X.indexOf(";");0<Za&&(X=X.substring(0,Za)+X.substring(X.indexOf(",",Za+1)));ma.setCellStyles("image",X,[Ua[0]])});
-Ra.src=Editor.createSvgDataUri(mxUtils.getXml(ua))}return Ua}}}catch(Za){}return null})):P(la,mxUtils.bind(this,function(){return q(ea,"text/xml",f+la*T,g+la*T,0,0,u.name)}))}else P(la,mxUtils.bind(this,function(){return null}))}else{R=!1;if("image/png"==u.type){var da=fa?null:this.extractGraphModelFromPng(Q.target.result);if(null!=da&&0<da.length){var qa=new Image;qa.src=Q.target.result;P(la,mxUtils.bind(this,function(){return q(da,"text/xml",f+la*T,g+la*T,qa.width,qa.height,u.name)}));R=!0}}R||
-(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(Q.target.result,mxUtils.bind(this,function(va){this.resizeImage(va,Q.target.result,mxUtils.bind(this,function(ua,Aa,za){P(la,mxUtils.bind(this,function(){if(null!=ua&&ua.length<G){var Ca=pa&&this.isResampleImageSize(u.size,
-Z)?Math.min(1,Math.min(m/Aa,m/za)):1;return q(ua,u.type,f+la*T,g+la*T,Math.round(Aa*Ca),Math.round(za*Ca),u.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),pa,m,Z,u.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else X=Q.target.result,q(X,u.type,f+la*T,g+la*T,240,160,u.name,function(va){P(la,function(){return va})},u)});/(\.v(dx|sdx?))($|\?)/i.test(u.name)||/(\.vs(x|sx?))($|\?)/i.test(u.name)?q(null,u.type,
-f+la*T,g+la*T,240,160,u.name,function(Q){P(la,function(){return Q})},u):"image"==u.type.substring(0,5)||"application/pdf"==u.type?H.readAsDataURL(u):H.readAsText(u)}})(aa)});if(O){O=[];for(ha=0;ha<d.length;ha++)O.push(d[ha]);d=O;this.confirmImageResize(function(ma){pa=ma;U()},I)}else U()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=
-function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},m=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(z,F){if(z||f)mxSettings.setResizeImages(z?F:null),mxSettings.save();g();d(F)};null==m||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(z){q(z,!0)},function(z){q(z,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+
-'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):q(!1,m)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var m=new FileReader;m.onload=mxUtils.bind(this,function(){this.parseFileData(m.result,f,g)});m.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var m=new XMLHttpRequest;m.open("POST",OPEN_URL);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
-m.onreadystatechange=function(){f(m)};m.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,m,q,z,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),I=Math.max(1,d.height);if(m&&this.isResampleImageSize(null!=F?F:f.length,z))try{var G=
-Math.max(C/q,I/q);if(1<G){var Z=Math.round(C/G),fa=Math.round(I/G),ba=document.createElement("canvas");ba.width=Z;ba.height=fa;ba.getContext("2d").drawImage(d,0,0,Z,fa);var Y=ba.toDataURL();if(Y.length<f.length){var pa=document.createElement("canvas");pa.width=Z;pa.height=fa;var O=pa.toDataURL();Y!==O&&(f=Y,C=Z,I=fa)}}}catch(W){}g(f,C,I)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var m=new Image;
-m.onload=function(){m.width=0<m.width?m.width:120;m.height=0<m.height?m.height:120;f(m)};null!=g&&(m.onerror=g);m.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&
-this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(W){var ha=W.getEvent();
-return null==W.getState()&&!mxEvent.isMouseEvent(ha)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ha)&&(null==W.getState()||mxEvent.isControlDown(ha)||mxEvent.isShiftDown(ha))});f.cellEditor.editPlantUmlData=function(W,ha,U){var ma=JSON.parse(U);ha=new TextareaDialog(d,mxResources.get("plantUml")+":",ma.data,function(T){null!=T&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(T,ma.format,function(M,ia,N){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
-ma.format)f.labelChanged(W,"<pre>"+M+"</pre>"),f.updateCellSize(W,!0);else{f.setCellStyles("image",d.convertDataUri(M),[W]);var P=f.model.getGeometry(W);null!=P&&(P=P.clone(),P.width=ia,P.height=N,f.cellsResized([W],[P],!1))}f.setAttributeForCell(W,"plantUmlData",JSON.stringify({data:T,format:ma.format}))}finally{f.getModel().endUpdate()}},function(M){d.handleError(M)})},null,null,400,220);d.showDialog(ha.container,420,300,!0,!0);ha.init()};f.cellEditor.editMermaidData=function(W,ha,U){var ma=JSON.parse(U);
-ha=new TextareaDialog(d,mxResources.get("mermaid")+":",ma.data,function(T){null!=T&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(T,ma.config,function(M,ia,N){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",M,[W]);var P=f.model.getGeometry(W);null!=P&&(P=P.clone(),P.width=Math.max(P.width,ia),P.height=Math.max(P.height,N),f.cellsResized([W],[P],!1));f.setAttributeForCell(W,"mermaidData",JSON.stringify({data:T,config:ma.config},null,2))}finally{f.getModel().endUpdate()}},
-function(M){d.handleError(M)})},null,null,400,220);d.showDialog(ha.container,420,300,!0,!0);ha.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(W,ha){try{var U=this.graph.getAttributeForCell(W,"plantUmlData");if(null!=U)this.editPlantUmlData(W,ha,U);else if(U=this.graph.getAttributeForCell(W,"mermaidData"),null!=U)this.editMermaidData(W,ha,U);else{var ma=f.getCellStyle(W);"1"==mxUtils.getValue(ma,"metaEdit","0")?d.showDataDialog(W):g.apply(this,arguments)}}catch(T){d.handleError(T)}};
-f.getLinkTitle=function(W){return d.getLinkTitle(W)};f.customLinkClicked=function(W){var ha=!1;try{d.handleCustomLink(W),ha=!0}catch(U){d.handleError(U)}return ha};var m=f.parseBackgroundImage;f.parseBackgroundImage=function(W){var ha=m.apply(this,arguments);null!=ha&&null!=ha.src&&Graph.isPageLink(ha.src)&&(ha={originalSrc:ha.src});return ha};var q=f.setBackgroundImage;f.setBackgroundImage=function(W){null!=W&&null!=W.originalSrc&&(W=d.createImageForPageLink(W.originalSrc,d.currentPage,this));q.apply(this,
-arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(W,ha){W=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=W){var U=W.indexOf(",");if(0<U)for(W=W.substring(U+1),ha=ha.getProperty("patches"),U=0;U<ha.length;U++)if(null!=ha[U][EditorUi.DIFF_UPDATE]&&null!=ha[U][EditorUi.DIFF_UPDATE][W]||
-null!=ha[U][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ha[U][EditorUi.DIFF_REMOVE],W)){f.refreshBackgroundImage();break}}}));var z=f.getBackgroundImageObject;f.getBackgroundImageObject=function(W,ha){var U=z.apply(this,arguments);if(null!=U&&null!=U.originalSrc)if(!ha)U={src:U.originalSrc};else if(ha&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var ma=this.stylesheet,T=this.shapeForegroundColor,M=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor=
-"#ffffff";this.shapeForegroundColor="#000000";U=d.createImageForPageLink(U.originalSrc);this.shapeBackgroundColor=M;this.shapeForegroundColor=T;this.stylesheet=ma}return U};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl=
-"https://app.diagrams.net/";var C=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(W){W=null!=W?W:"";"1"==urlParams.dev&&(W+=(0<W.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(W,ha,U){var ma=ha;ha=function(T,M){if(null==M){var ia=mxEvent.getSource(T);"a"==ia.nodeName.toLowerCase()&&(M=ia.getAttribute("href"))}null!=M&&f.isCustomLink(M)&&(mxEvent.isTouchEvent(T)||!mxEvent.isPopupTrigger(T))&&f.customLinkClicked(M)&&mxEvent.consume(T);
-null!=ma&&ma(T,M)};I.call(this,W,ha,U)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(W,ha,U){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(W,"delete - cut copy copyAsImage - duplicate".split(" "),null,U)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=
-d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var Z=f.getExportVariables;f.getExportVariables=function(){var W=Z.apply(this,arguments),ha=d.getCurrentFile();null!=ha&&(W.filename=ha.getTitle());W.pagecount=null!=d.pages?d.pages.length:1;W.page=null!=d.currentPage?d.currentPage.getName():"";W.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return W};var fa=f.getGlobalVariable;f.getGlobalVariable=function(W){var ha=
-d.getCurrentFile();return"filename"==W&&null!=ha?ha.getTitle():"page"==W&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==W?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==W?null!=d.pages?d.pages.length:1:fa.apply(this,arguments)};var ba=f.labelLinkClicked;f.labelLinkClicked=function(W,ha,U){var ma=ha.getAttribute("href");if(null==ma||!f.isCustomLink(ma)||!mxEvent.isTouchEvent(U)&&mxEvent.isPopupTrigger(U))ba.apply(this,arguments);else{if(!f.isEnabled()||
-null!=W&&f.isCellLocked(W.cell))f.customLinkClicked(ma),f.getRubberband().reset();mxEvent.consume(U)}};this.editor.getOrCreateFilename=function(){var W=d.defaultFilename,ha=d.getCurrentFile();null!=ha&&(W=null!=ha.getTitle()?ha.getTitle():W);return W};var Y=this.actions.get("print");Y.setEnabled(!mxClient.IS_IOS||!navigator.standalone);Y.visible=Y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",
-!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,
-null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(W){var ha=f.cellEditor.text2,U=null;null!=ha&&(mxEvent.addListener(ha,"dragleave",function(ma){null!=U&&(U.parentNode.removeChild(U),U=null);ma.stopPropagation();ma.preventDefault()}),mxEvent.addListener(ha,"dragover",mxUtils.bind(this,function(ma){null==U&&(!mxClient.IS_IE||10<document.documentMode)&&(U=this.highlightElement(ha));ma.stopPropagation();ma.preventDefault()})),mxEvent.addListener(ha,"drop",mxUtils.bind(this,
-function(ma){null!=U&&(U.parentNode.removeChild(U),U=null);if(0<ma.dataTransfer.files.length)this.importFiles(ma.dataTransfer.files,0,0,this.maxImageSize,function(M,ia,N,P,aa,la){f.insertImage(M,aa,la)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var ia=0;ia<M.length;ia++)M[ia]()},mxEvent.isControlDown(ma));else if(0<=mxUtils.indexOf(ma.dataTransfer.types,"text/uri-list")){var T=ma.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(T)?
-this.loadImage(decodeURIComponent(T),mxUtils.bind(this,function(M){var ia=Math.max(1,M.width);M=Math.max(1,M.height);var N=this.maxImageSize;N=Math.min(1,Math.min(N/Math.max(1,ia)),N/Math.max(1,M));f.insertImage(decodeURIComponent(T),ia*N,M*N)})):document.execCommand("insertHTML",!1,ma.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(ma.dataTransfer.types,"text/html")?document.execCommand("insertHTML",!1,ma.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(ma.dataTransfer.types,"text/plain")&&
-document.execCommand("insertHTML",!1,ma.dataTransfer.getData("text/plain"));ma.stopPropagation();ma.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",function(W,ha){mxSettings.setUnit(ha.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,
-Y.unit),this.refresh());if("1"==urlParams.styledev){Y=document.getElementById("geFooter");null!=Y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),
-this.styleInput.value)})),Y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(W,ha){0<this.editor.graph.getSelectionCount()?(W=this.editor.graph.getSelectionCell(),W=this.editor.graph.getModel().getStyle(W),this.styleInput.value=W||"",this.styleInput.style.visibility="visible"):this.styleInput.style.visibility="hidden"})));var pa=this.isSelectionAllowed;this.isSelectionAllowed=function(W){return mxEvent.getSource(W)==this.styleInput?
-!0:pa.apply(this,arguments)}}Y=document.getElementById("geInfo");null!=Y&&Y.parentNode.removeChild(Y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var O=null;mxEvent.addListener(f.container,"dragleave",function(W){f.isEnabled()&&(null!=O&&(O.parentNode.removeChild(O),O=null),W.stopPropagation(),W.preventDefault())});mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(W){null==O&&(!mxClient.IS_IE||10<document.documentMode)&&(O=this.highlightElement(f.container));
-null!=this.sidebar&&this.sidebar.hideTooltip();W.stopPropagation();W.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(W){null!=O&&(O.parentNode.removeChild(O),O=null);if(f.isEnabled()){var ha=mxUtils.convertPoint(f.container,mxEvent.getClientX(W),mxEvent.getClientY(W)),U=W.dataTransfer.files,ma=f.view.translate,T=f.view.scale,M=ha.x/T-ma.x,ia=ha.y/T-ma.y;if(0<U.length)ha=1==U.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===U[0].type.substring(0,9)||
-"image/"!==U[0].type.substring(0,6)||/(\.drawio.png)$/i.test(U[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(W)||ha)?(!mxEvent.isShiftDown(W)&&ha&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(U,!0)):(mxEvent.isAltDown(W)&&(ia=M=null),this.importFiles(U,M,ia,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(W),null,null,mxEvent.isShiftDown(W),W));else{mxEvent.isAltDown(W)&&(ia=M=0);var N=0<=mxUtils.indexOf(W.dataTransfer.types,"text/uri-list")?W.dataTransfer.getData("text/uri-list"):
-null;U=this.extractGraphModelFromEvent(W,null!=this.pages);if(null!=U)f.setSelectionCells(this.importXml(U,M,ia,!0));else if(0<=mxUtils.indexOf(W.dataTransfer.types,"text/html")){var P=W.dataTransfer.getData("text/html");U=document.createElement("div");U.innerHTML=f.sanitizeHtml(P);var aa=null;ha=U.getElementsByTagName("img");null!=ha&&1==ha.length?(P=ha[0].getAttribute("src"),null==P&&(P=ha[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(P)||(aa=!0)):(ha=U.getElementsByTagName("a"),
-null!=ha&&1==ha.length?P=ha[0].getAttribute("href"):(U=U.getElementsByTagName("pre"),null!=U&&1==U.length&&(P=mxUtils.getTextContent(U[0]))));var la=!0,u=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(P,M,ia,!0,aa,null,la,mxEvent.isControlDown(W)))});aa&&null!=P&&P.length>this.resampleThreshold?this.confirmImageResize(function(H){la=H;u()},mxEvent.isControlDown(W)):u()}else null!=N&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(N)?this.loadImage(decodeURIComponent(N),mxUtils.bind(this,
-function(H){var Q=Math.max(1,H.width);H=Math.max(1,H.height);var X=this.maxImageSize;X=Math.min(1,Math.min(X/Math.max(1,Q)),X/Math.max(1,H));f.setSelectionCell(f.insertVertex(null,null,"",M,ia,Q*X,H*X,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+N+";"))}),mxUtils.bind(this,function(H){f.setSelectionCells(this.insertTextAt(N,M,ia,!0))})):0<=mxUtils.indexOf(W.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(W.dataTransfer.getData("text/plain"),
-M,ia,!0))}}W.stopPropagation();W.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,m=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){m=!0;break}if(!m){var z=
-g.items;for(index in z){var F=z[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(I,G,Z,fa,ba,Y){d.insertImage(I,ba,Y)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var G=0;G<I.length;G++)I[G]()});else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML=
-"&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck","false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow=
-"hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var m=!1;this.keyHandler.bindControlKey(88,null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(z){var F=mxEvent.getSource(z);null==f.container||!f.isEnabled()||f.isMouseDown||
-f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=z.keyCode&&(mxClient.IS_MAC||17!=z.keyCode)&&(!mxClient.IS_MAC||91!=z.keyCode&&93!=z.keyCode)||m||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",f.container.appendChild(g),m=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(z){var F=z.keyCode;window.setTimeout(mxUtils.bind(this,function(){!m||224!=F&&17!=
-F&&91!=F&&93!=F||(m=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(z){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(z){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,
-"paste",mxUtils.bind(this,function(z){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=z.clipboardData&&this.pasteCells(z,g,!0,!0),mxEvent.isConsumed(z)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(z,g,!1,!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(z){return mxEvent.getSource(z)==g?!0:q.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+
-"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=
-d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),
-"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(m,q,z){null==m[q]&&(m[q]=z)},g=this.editor.graph;Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);
-f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop","1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,
-"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap","4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=
-function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");
-}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=
-mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());
-this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));
-this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,
-f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),
-mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&this.editor.exportToCanvas(mxUtils.bind(this,function(m,q){try{this.spinner.stop();var z=this.createImageDataUri(m,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(z,
-F,C,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,function(m){this.spinner.stop();this.handleError(m)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(m){this.handleError(m)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,m){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,
-"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](m)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var m=mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(m));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(m,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",
-!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,m){var q=this.editor.graph,z=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))z=
-this.importXml(d,F,F),q.setSelectionCells(z);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),m);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,d,[F]);else{q.model.beginUpdate();try{q.labelChanged(F,d),Graph.isLink(d)&&q.setLinkForCell(F,d)}finally{q.model.endUpdate()}}q.setSelectionCell(F)}else z=q.getInsertPoint(),q.isMouseInsertPoint()&&(F=0,q.lastPasteXml==d&&0<q.pasteCounter&&
-q.pasteCounter--),z=this.insertTextAt(d,z.x+F,z.y+F,!0),q.setSelectionCells(z);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return z};EditorUi.prototype.pasteCells=function(d,f,g,m){if(!mxEvent.isConsumed(d)){var q=f,z=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var I=
-decodeURIComponent(F);this.isCompatibleString(I)&&(C=!0,F=I)}catch(pa){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),z="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,C))}F=q.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))g=F[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,
-mxUtils.bind(this,function(pa){var O=this.editor.graph;O.lastPasteXml==pa?O.pasteCounter++:(O.lastPasteXml=pa,O.pasteCounter=0);var W=O.pasteCounter*O.gridSize;O.setSelectionCells(this.importXml(pa,W,W));O.scrollCellToVisible(O.getSelectionCell())}),mxUtils.bind(this,function(pa){this.handleError(pa)})),mxEvent.consume(d));else{var G=z?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText),Z=!1;try{var fa=G.lastIndexOf("%3E");0<=fa&&fa<G.length-3&&(G=G.substring(0,fa+3))}catch(pa){}try{F=
-q.getElementsByTagName("span"),(I=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(G))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(Z=!0,G=I)}catch(pa){}try{if(null!=G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ba=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,m,Z,d)}catch(pa){console.log("Miro import error:",
-pa)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ba):ba()}else this.pasteXml(G,m,Z,d);try{mxEvent.consume(d)}catch(pa){}}else if(!g){var Y=this.editor.graph;Y.lastPasteXml=null;Y.pasteCounter=0}}catch(pa){this.handleError(pa)}}}f.innerHTML="&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(m){null!=f&&(f.parentNode.removeChild(f),f=null);m.stopPropagation();
-m.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(m){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());m.stopPropagation();m.preventDefault()})),mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(m){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<m.dataTransfer.files.length)this.hideDialog(),
-"1"==urlParams.embed?this.importFiles(m.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(m)&&!mxEvent.isShiftDown(m)):this.openFiles(m.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(m);if(null==q){var z=null!=m.dataTransfer?m.dataTransfer:m.clipboardData;null!=z&&(10==document.documentMode||11==document.documentMode?q=z.getData("Text"):(q=null,q=0<=mxUtils.indexOf(z.types,"text/uri-list")?m.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(z.types,
-"text/html")?z.getData("text/html"):null,null!=q&&0<q.length?(z=document.createElement("div"),z.innerHTML=this.editor.graph.sanitizeHtml(q),z=z.getElementsByTagName("img"),0<z.length&&(q=z[0].getAttribute("src"))):0<=mxUtils.indexOf(z.types,"text/plain")&&(q=z.getData("text/plain"))),null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):
-(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()&&this.openLocalFile(F.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash="#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}m.stopPropagation();m.preventDefault()}))};
-EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var m=document.body;var q=document.documentElement;var z=(m.clientWidth||q.clientWidth)-3;m=Math.max(m.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,z=d.clientWidth,m=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=
-Math.max(0,z-3)+"px";q.style.height=Math.max(0,m-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),m=new mxGraphModel;g.decode(f,m);f=m.getChildAt(m.getRoot(),0);for(g=0;g<m.getChildCount(f);g++)d.push(m.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=
-function(d,f,g,m,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var z=mxUtils.bind(this,function(C){f=0<=f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,C,
-f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,m)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),
-mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?z(C.responseText):this.handleError({message:mxResources.get(413==C.status?"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,f,m)}),
-mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,m);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}),mxUtils.bind(this,function(){this.spinner.stop();
-this.openLocalFile(d,f,m)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,m=!0,d=F)}this.spinner.stop();this.openLocalFile(d,f,m,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(m){var q=new FileReader;q.onload=mxUtils.bind(this,function(z){try{this.openFileHandle(z.target.result,
-m.name,m,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z);window.openFile=null});"image"!==m.type.substring(0,5)&&"application/pdf"!==m.type||"image/svg"===m.type.substring(0,9)?q.readAsText(m):q.readAsDataURL(m)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,m,q){var z=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);
-null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,m,q))});if(null!=d&&0<d.length)null==z||!z.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=m)&&null!=z&&z.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=
-null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=z&&z.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),
-d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(F){if(null!=F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var m=this.editor.graph,q=m.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));m.model.isEdge(d)&&(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=m.model.getChildCount(d);for(var z=
-0;z<q;z++)this.addBasenamesForCell(m.model.getChildAt(d,z),f)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=
-d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=
-function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,m,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var z=this.editor.graph;z.setGridEnabled(!1);
-z.pageVisible=!1;var F=z.model.cells,C;for(C in F){var I=F[C];null!=I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();
-this.editor.modified=null!=m?m:!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(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=
-function(d){var f=this.editor.graph;return{event:d,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var m=f.background;if(null==m||m==mxConstants.NONE)m=this.embedExportBackground;
-this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,m,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),
-this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=function(d){var f=null,g=!1,m=!1,q=null,z=mxUtils.bind(this,function(I,G){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,z);mxEvent.addListener(window,
-"message",mxUtils.bind(this,function(I){if(I.source==(window.opener||window.parent)){var G=I.data,Z=null,fa=mxUtils.bind(this,function(da){if(null!=da&&"function"===typeof da.charAt&&"<"!=da.charAt(0))try{Editor.isPngDataUrl(da)?da=Editor.extractGraphModelFromPng(da):"data:image/svg+xml;base64,"==da.substring(0,26)?da=atob(da.substring(26)):"data:image/svg+xml;utf8,"==da.substring(0,24)&&(da=da.substring(24)),null!=da&&("%"==da.charAt(0)?da=decodeURIComponent(da):"<"!=da.charAt(0)&&(da=Graph.decompress(da)))}catch(qa){}return da});
-if("json"==urlParams.proto){var ba=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",[G])}catch(da){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.executeLayouts(this.editor.graph.createLayouts(G.layouts));
-return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=G.okKey?mxResources.get(G.okKey):G.ok,function(da){null!=da?F.postMessage(JSON.stringify({event:"prompt",value:da,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var pa=fa(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",
-[G.name||this.defaultFilename]),pa,mxUtils.bind(this,function(){this.hideDialog();F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.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();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),
-"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(da){da&&this.actions.get("exit").funct()}));try{Y.init()}catch(da){F.postMessage(JSON.stringify({event:"draft",error:da.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var O=1==G.enableRecent,W=1==G.enableSearch,ha=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var U=this.getCurrentUser(),ma=new TemplatesDialog(this,function(da,qa,va){da=da||this.emptyDiagramXml;
-F.postMessage(JSON.stringify({event:"template",xml:da,blank:da==this.emptyDiagramXml,name:qa,tempUrl:va.url,libs:va.libs,builtIn:null!=va.info&&null!=va.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=U?U.id:null,O?mxUtils.bind(this,function(da,qa,va){this.remoteInvoke("getRecentDiagrams",[va],null,da,qa)}):null,W?mxUtils.bind(this,function(da,qa,va,ua){this.remoteInvoke("searchDiagrams",[da,ua],null,qa,va)}):null,mxUtils.bind(this,
-function(da,qa,va){this.remoteInvoke("getFileContent",[da.url],null,qa,va)}),null,ha?mxUtils.bind(this,function(da){this.remoteInvoke("getCustomTemplates",null,null,da,function(){da({},0)})}):null,!1,!1,!0,!0);this.showDialog(ma.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}Y=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(da,qa,va,ua){da=da||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:da,blank:da==
-this.emptyDiagramXml,name:qa,tempUrl:va,libs:ua,builtIn:!0,message:G}),"*"):(d(da,I,da!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,O?mxUtils.bind(this,function(da){this.remoteInvoke("getRecentDiagrams",[null],null,da,function(){da(null,"Network Error!")})}):null,W?mxUtils.bind(this,function(da,qa){this.remoteInvoke("searchDiagrams",[da,null],null,qa,function(){qa(null,"Network Error!")})}):null,mxUtils.bind(this,function(da,
-qa,va){F.postMessage(JSON.stringify({event:"template",docUrl:da,info:qa,name:va}),"*")}),null,null,ha?mxUtils.bind(this,function(da){this.remoteInvoke("getCustomTemplates",null,null,da,function(){da({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(da){this.sidebar.hideTooltip();da&&this.actions.get("exit").funct()}));Y.init();return}if("textContent"==G.action){var T=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",
-data:T,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 M=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,M):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();
-return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);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 ia=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var N=this.editor.graph,P=mxUtils.bind(this,function(da){this.editor.graph.setEnabled(!0);
-this.spinner.stop();var qa=this.createLoadMessage("export");qa.format=G.format;qa.message=G;qa.data=da;qa.xml=ia;F.postMessage(JSON.stringify(qa),"*")}),aa=mxUtils.bind(this,function(da){null==da&&(da=Editor.blankImage);"xmlpng"==G.format&&(da=Editor.writeGraphModelToPng(da,"tEXt","mxfile",encodeURIComponent(ia)));N!=this.editor.graph&&N.container.parentNode.removeChild(N.container);P(da)}),la=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var u=
-mxUtils.bind(this,function(){if(null!=this.pages&&this.currentPage.getId()!=la){var da=N.getGlobalVariable;N=this.createTemporaryGraph(N.getStylesheet());for(var qa,va=0;va<this.pages.length;va++)if(this.pages[va].getId()==la){qa=this.updatePageRoot(this.pages[va]);break}null==qa&&(qa=this.currentPage);N.getGlobalVariable=function(Ca){return"page"==Ca?qa.getName():"pagenumber"==Ca?1:da.apply(this,arguments)};document.body.appendChild(N.container);N.model.setRoot(qa.root)}if(null!=G.layerIds){var ua=
-N.model,Aa=ua.getChildCells(ua.getRoot()),za={};for(va=0;va<G.layerIds.length;va++)za[G.layerIds[va]]=!0;for(va=0;va<Aa.length;va++)ua.setVisible(Aa[va],za[Aa[va].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Ca){aa(Ca.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){aa(null)}),null,null,G.scale,G.transparent,G.shadow,null,N,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ia),g=!1);u()}else(new mxXmlRequest(EXPORT_URL,
-"format=png&embedXml="+("xmlpng"==G.format?"1":"0")+(null!=la?"&pageId="+la:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ia))).send(mxUtils.bind(this,function(da){200<=da.getStatus()&&299>=da.getStatus()?P("data:image/png;base64,"+da.getText()):aa(null)}),mxUtils.bind(this,function(){aa(null)}))}}else if(u=mxUtils.bind(this,function(){var da=this.createLoadMessage("export");
-da.message=G;if("html2"==G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var qa=this.getXmlFileData();da.xml=mxUtils.getXml(qa);da.data=this.getFileData(null,null,!0,null,null,null,qa);da.format=G.format}else if("html"==G.format)qa=this.editor.getGraphXml(),da.data=this.getHtml(qa,this.editor.graph),da.xml=mxUtils.getXml(qa),da.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;qa=null!=G.background?G.background:this.editor.graph.background;qa==
-mxConstants.NONE&&(qa=null);da.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);da.format="svg";var va=mxUtils.bind(this,function(ua){this.editor.graph.setEnabled(!0);this.spinner.stop();da.data=Editor.createSvgDataUri(ua);F.postMessage(JSON.stringify(da),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(da.xml,this.editor.graph,null,!0,va,null,null,G.embedImages,
-qa,G.scale,G.border,G.shadow,G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),qa=this.editor.graph.getSvg(qa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(qa),this.embedFonts(qa,mxUtils.bind(this,function(ua){G.embedImages||null==G.embedImages?this.editor.convertImages(ua,
-mxUtils.bind(this,function(Aa){va(mxUtils.getXml(Aa))})):va(mxUtils.getXml(ua))}));return}F.postMessage(JSON.stringify(da),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var H=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){H.apply(this,arguments);u()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||u()}else u();return}if("load"==G.action){ba=G.toSketch;m=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);
-null!=G.saveAndExit&&null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var Q=Editor.sketchMode;this.doSetSketchMode(G.rough);Q!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(Q=Editor.darkMode,this.doSetDarkMode(G.dark),Q!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);
-null!=G.background&&(this.embedExportBackground=G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var X=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right=
-"";Z=mxUtils.bind(this,function(){var da=this.editor.graph,qa=da.maxFitScale;da.maxFitScale=G.maxFitScale;da.fit(2*X);da.maxFitScale=qa;da.container.scrollTop-=2*X;da.container.scrollLeft-=2*X;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(pa=document.createElement("span"),mxUtils.write(pa,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),
-this.buttonContainer.appendChild(pa),this.embedFilenameSpan=pa);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(da){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var R=this.getCurrentFile();null!=R&&(pa=fa(G.xml),null!=pa&&""!=pa&&R.mergeFile(new LocalFile(this,pa),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(da){F.postMessage(JSON.stringify({event:"merge",message:G,error:da}),"*")}))}else"remoteInvokeReady"==
-G.action?this.handleRemoteInvokeReady(F):"remoteInvoke"==G.action?this.handleRemoteInvoke(G,I.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(da){this.handleError(da)}}var ca=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ea=mxUtils.bind(this,function(da,qa){g=!0;
-try{d(da,qa,null,ba)}catch(va){this.handleError(va)}g=!1;null!=urlParams.modified&&this.editor.setStatus("");q=ca();m&&null==f&&(f=mxUtils.bind(this,function(va,ua){va=ca();va==q||g||(ua=this.createLoadMessage("autosave"),ua.xml=va,(window.opener||window.parent).postMessage(JSON.stringify(ua),"*"));q=va}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",
-f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)qa=this.createLoadMessage("load"),qa.xml=da,F.postMessage(JSON.stringify(qa),"*");null!=Z&&Z()});null!=G&&
-"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,34)?(fa="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(da){ea(da,I)},mxUtils.bind(this,function(da){this.handleError(da)}),fa)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,
-mxUtils.bind(this,function(da){4==da.readyState&&200<=da.status&&299>=da.status&&"<mxGraphModel"==da.responseText.substring(0,13)&&ea(da.responseText,I)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(da){ea(da)}),mxUtils.bind(this,function(da){this.handleError(da)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=fa(G),ea(G,I)):this.loadDescriptor(G,mxUtils.bind(this,function(da){ea(ca(),I)}),
-mxUtils.bind(this,function(da){this.handleError(da,mxResources.get("errorLoadingFile"))}))}}));var F=window.opener||window.parent;z="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(z,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(I,G,Z){C.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:I,target:G,allowOpener:Z}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=
-this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display="inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var m="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,
-m);f.setAttribute("title",m);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",
-mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,
-"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,
-430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&
-(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),
-m=[],q=[],z=[],F={};if(0<g.length){var C={},I=this.editor.graph,G=null,Z=null,fa=null,ba=null,Y=null,pa=null,O=null,W="whiteSpace=wrap;html=1;",ha=null,U=null,ma="",T="auto",M="auto",ia=!1,N=null,P=null,aa=40,la=40,u=100,H=0,Q=function(){null!=f?f(ya):(I.setSelectionCells(ya),I.scrollCellToVisible(I.getSelectionCell()))},X=I.getFreeInsertPoint(),R=X.x,ca=X.y;X=ca;var ea=null,da="auto";U=null;for(var qa=[],va=null,ua=null,Aa=0;Aa<g.length&&"#"==g[Aa].charAt(0);){d=g[Aa].replace(/\r$/,"");for(Aa++;Aa<
-g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Aa].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Aa].substring(1)),Aa++;if("#"!=d.charAt(1)){var za=d.indexOf(":");if(0<za){var Ca=mxUtils.trim(d.substring(1,za)),sa=mxUtils.trim(d.substring(za+1));"label"==Ca?ea=I.sanitizeHtml(sa):"labelname"==Ca&&0<sa.length&&"-"!=sa?Y=sa:"labels"==Ca&&0<sa.length&&"-"!=sa?O=JSON.parse(sa):"style"==Ca?Z=sa:"parentstyle"==Ca?W=sa:"unknownStyle"==Ca&&"-"!=sa?pa=sa:"stylename"==Ca&&0<sa.length&&"-"!=sa?ba=sa:"styles"==
-Ca&&0<sa.length&&"-"!=sa?fa=JSON.parse(sa):"vars"==Ca&&0<sa.length&&"-"!=sa?G=JSON.parse(sa):"identity"==Ca&&0<sa.length&&"-"!=sa?ha=sa:"parent"==Ca&&0<sa.length&&"-"!=sa?U=sa:"namespace"==Ca&&0<sa.length&&"-"!=sa?ma=sa:"width"==Ca?T=sa:"height"==Ca?M=sa:"collapsed"==Ca&&"-"!=sa?ia="true"==sa:"left"==Ca&&0<sa.length?N=sa:"top"==Ca&&0<sa.length?P=sa:"ignore"==Ca?ua=sa.split(","):"connect"==Ca?qa.push(JSON.parse(sa)):"link"==Ca?va=sa:"padding"==Ca?H=parseFloat(sa):"edgespacing"==Ca?aa=parseFloat(sa):
-"nodespacing"==Ca?la=parseFloat(sa):"levelspacing"==Ca?u=parseFloat(sa):"layout"==Ca&&(da=sa)}}}if(null==g[Aa])throw Error(mxResources.get("invalidOrMissingFile"));var Va=this.editor.csvToArray(g[Aa].replace(/\r$/,""));za=d=null;Ca=[];for(sa=0;sa<Va.length;sa++)ha==Va[sa]&&(d=sa),U==Va[sa]&&(za=sa),Ca.push(mxUtils.trim(Va[sa]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+Ca[0]+"%");if(null!=qa)for(var Ua=0;Ua<qa.length;Ua++)null==C[qa[Ua].to]&&(C[qa[Ua].to]=
-{});ha=[];for(sa=Aa+1;sa<g.length;sa++){var Ra=this.editor.csvToArray(g[sa].replace(/\r$/,""));if(null==Ra){var Za=40<g[sa].length?g[sa].substring(0,40)+"...":g[sa];throw Error(Za+" ("+sa+"):\n"+mxResources.get("containsValidationErrors"));}0<Ra.length&&ha.push(Ra)}I.model.beginUpdate();try{for(sa=0;sa<ha.length;sa++){Ra=ha[sa];var Ha=null,db=null!=d?ma+Ra[d]:null;g=!1;null!=db&&(Ha=I.model.getCell(db),g=null==Ha||0<=mxUtils.indexOf(m,Ha));var cb=new mxCell(ea,new mxGeometry(R,X,0,0),Z||"whiteSpace=wrap;html=1;");
-cb.collapsed=ia;cb.vertex=!0;cb.id=db;null==Ha||g||I.model.setCollapsed(Ha,ia);for(var y=0;y<Ra.length;y++)I.setAttributeForCell(cb,Ca[y],Ra[y]),null==Ha||g||I.setAttributeForCell(Ha,Ca[y],Ra[y]);if(null!=Y&&null!=O){var K=O[cb.getAttribute(Y)];null!=K&&(I.labelChanged(cb,K),null==Ha||g||I.cellLabelChanged(Ha,K))}if(null!=ba&&null!=fa){var L=fa[cb.getAttribute(ba)];null!=L&&(cb.style=L)}I.setAttributeForCell(cb,"placeholders","1");cb.style=I.replacePlaceholders(cb,cb.style,G);null==Ha||g?I.fireEvent(new mxEventObject("cellsInserted",
-"cells",[cb])):(I.model.setStyle(Ha,cb.style),0>mxUtils.indexOf(z,Ha)&&z.push(Ha),I.fireEvent(new mxEventObject("cellsInserted","cells",[Ha])));g=null!=Ha;Ha=cb;if(!g)for(Ua=0;Ua<qa.length;Ua++)C[qa[Ua].to][Ha.getAttribute(qa[Ua].to)]=Ha;null!=va&&"link"!=va&&(I.setLinkForCell(Ha,Ha.getAttribute(va)),I.setAttributeForCell(Ha,va,null));var S=this.editor.graph.getPreferredSizeForCell(Ha);U=null!=za?I.model.getCell(ma+Ra[za]):null;if(Ha.vertex){Za=null!=U?0:R;Aa=null!=U?0:ca;null!=N&&null!=Ha.getAttribute(N)&&
-(Ha.geometry.x=Za+parseFloat(Ha.getAttribute(N)));null!=P&&null!=Ha.getAttribute(P)&&(Ha.geometry.y=Aa+parseFloat(Ha.getAttribute(P)));var V="@"==T.charAt(0)?Ha.getAttribute(T.substring(1)):null;Ha.geometry.width=null!=V&&"auto"!=V?parseFloat(Ha.getAttribute(T.substring(1))):"auto"==T||"auto"==V?S.width+H:parseFloat(T);var ja="@"==M.charAt(0)?Ha.getAttribute(M.substring(1)):null;Ha.geometry.height=null!=ja&&"auto"!=ja?parseFloat(ja):"auto"==M||"auto"==ja?S.height+H:parseFloat(M);X+=Ha.geometry.height+
-la}g?(null==F[db]&&(F[db]=[]),F[db].push(Ha)):(m.push(Ha),null!=U?(U.style=I.replacePlaceholders(U,W,G),I.addCell(Ha,U),q.push(U)):z.push(I.addCell(Ha)))}for(sa=0;sa<q.length;sa++)V="@"==T.charAt(0)?q[sa].getAttribute(T.substring(1)):null,ja="@"==M.charAt(0)?q[sa].getAttribute(M.substring(1)):null,"auto"!=T&&"auto"!=V||"auto"!=M&&"auto"!=ja||I.updateGroupBounds([q[sa]],H,!0);var na=z.slice(),ya=z.slice();for(Ua=0;Ua<qa.length;Ua++){var ra=qa[Ua];for(sa=0;sa<m.length;sa++){Ha=m[sa];var ta=mxUtils.bind(this,
-function(Na,hb,Qa){var mb=hb.getAttribute(Qa.from);if(null!=mb&&""!=mb){mb=mb.split(",");for(var ub=0;ub<mb.length;ub++){var bb=C[Qa.to][mb[ub]];if(null==bb&&null!=pa){bb=new mxCell(mb[ub],new mxGeometry(R,ca,0,0),pa);bb.style=I.replacePlaceholders(hb,bb.style,G);var eb=this.editor.graph.getPreferredSizeForCell(bb);bb.geometry.width=eb.width+H;bb.geometry.height=eb.height+H;C[Qa.to][mb[ub]]=bb;bb.vertex=!0;bb.id=mb[ub];z.push(I.addCell(bb))}if(null!=bb){eb=Qa.label;null!=Qa.fromlabel&&(eb=(hb.getAttribute(Qa.fromlabel)||
-"")+(eb||""));null!=Qa.sourcelabel&&(eb=I.replacePlaceholders(hb,Qa.sourcelabel,G)+(eb||""));null!=Qa.tolabel&&(eb=(eb||"")+(bb.getAttribute(Qa.tolabel)||""));null!=Qa.targetlabel&&(eb=(eb||"")+I.replacePlaceholders(bb,Qa.targetlabel,G));var kb="target"==Qa.placeholders==!Qa.invert?bb:Na;kb=null!=Qa.style?I.replacePlaceholders(kb,Qa.style,G):I.createCurrentEdgeStyle();eb=I.insertEdge(null,null,eb||"",Qa.invert?bb:Na,Qa.invert?Na:bb,kb);if(null!=Qa.labels)for(kb=0;kb<Qa.labels.length;kb++){var ib=
-Qa.labels[kb],pb=new mxCell(ib.label||kb,new mxGeometry(null!=ib.x?ib.x:0,null!=ib.y?ib.y:0,0,0),"resizable=0;html=1;");pb.vertex=!0;pb.connectable=!1;pb.geometry.relative=!0;null!=ib.placeholders&&(pb.value=I.replacePlaceholders("target"==ib.placeholders==!Qa.invert?bb:Na,pb.value,G));if(null!=ib.dx||null!=ib.dy)pb.geometry.offset=new mxPoint(null!=ib.dx?ib.dx:0,null!=ib.dy?ib.dy:0);eb.insert(pb)}ya.push(eb);mxUtils.remove(Qa.invert?Na:bb,na)}}}});ta(Ha,Ha,ra);if(null!=F[Ha.id])for(y=0;y<F[Ha.id].length;y++)ta(Ha,
-F[Ha.id][y],ra)}}if(null!=ua)for(sa=0;sa<m.length;sa++)for(Ha=m[sa],y=0;y<ua.length;y++)I.setAttributeForCell(Ha,mxUtils.trim(ua[y]),null);if(0<z.length){var Da=new mxParallelEdgeLayout(I);Da.spacing=aa;Da.checkOverlap=!0;var Oa=function(){0<Da.spacing&&Da.execute(I.getDefaultParent());for(var Na=0;Na<z.length;Na++){var hb=I.getCellGeometry(z[Na]);hb.x=Math.round(I.snap(hb.x));hb.y=Math.round(I.snap(hb.y));"auto"==T&&(hb.width=Math.round(I.snap(hb.width)));"auto"==M&&(hb.height=Math.round(I.snap(hb.height)))}};
-if("["==da.charAt(0)){var Ma=Q;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(da)),function(){Oa();Ma()});Q=null}else if("circle"==da){var Wa=new mxCircleLayout(I);Wa.disableEdgeStyle=!1;Wa.resetEdges=!1;var Sa=Wa.isVertexIgnored;Wa.isVertexIgnored=function(Na){return Sa.apply(this,arguments)||0>mxUtils.indexOf(z,Na)};this.executeLayout(function(){Wa.execute(I.getDefaultParent());Oa()},!0,Q);Q=null}else if("horizontaltree"==da||"verticaltree"==da||"auto"==da&&ya.length==2*z.length-
-1&&1==na.length){I.view.validate();var Fa=new mxCompactTreeLayout(I,"horizontaltree"==da);Fa.levelDistance=la;Fa.edgeRouting=!1;Fa.resetEdges=!1;this.executeLayout(function(){Fa.execute(I.getDefaultParent(),0<na.length?na[0]:null)},!0,Q);Q=null}else if("horizontalflow"==da||"verticalflow"==da||"auto"==da&&1==na.length){I.view.validate();var Ja=new mxHierarchicalLayout(I,"horizontalflow"==da?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);Ja.intraCellSpacing=la;Ja.parallelEdgeSpacing=aa;Ja.interRankCellSpacing=
-u;Ja.disableEdgeStyle=!1;this.executeLayout(function(){Ja.execute(I.getDefaultParent(),ya);I.moveCells(ya,R,ca)},!0,Q);Q=null}else if("orgchart"==da){I.view.validate();var xa=new mxOrgChartLayout(I,2,u,la),Ba=xa.isVertexIgnored;xa.isVertexIgnored=function(Na){return Ba.apply(this,arguments)||0>mxUtils.indexOf(z,Na)};this.executeLayout(function(){xa.execute(I.getDefaultParent());Oa()},!0,Q);Q=null}else if("organic"==da||"auto"==da&&ya.length>z.length){I.view.validate();var Pa=new mxFastOrganicLayout(I);
-Pa.forceConstant=3*la;Pa.disableEdgeStyle=!1;Pa.resetEdges=!1;var Ka=Pa.isVertexIgnored;Pa.isVertexIgnored=function(Na){return Ka.apply(this,arguments)||0>mxUtils.indexOf(z,Na)};this.executeLayout(function(){Pa.execute(I.getDefaultParent());Oa()},!0,Q);Q=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=Q&&Q()}}catch(Na){this.handleError(Na)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",
-m;for(m in urlParams)0>mxUtils.indexOf(d,m)&&null!=urlParams[m]&&(f+=g+m+"="+urlParams[m],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),m;for(m in urlParams)0>mxUtils.indexOf(g,m)&&(d=0==f?d+"?":d+"&",null!=urlParams[m]&&(d+=m+"="+urlParams[m],
-f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,m,q){d=new LinkDialog(this,d,f,g,!0,m,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;
-return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);
-g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&
-d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=
-function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),m=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(m);
-this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(m);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(m);this.actions.get("connectionArrows").setEnabled(m);this.actions.get("connectionPoints").setEnabled(m);this.actions.get("copyStyle").setEnabled(m&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(m&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<
-g.vertices.length);this.actions.get("createShape").setEnabled(m);this.actions.get("createRevision").setEnabled(m);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());this.actions.get("editDiagram").setEnabled(m&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=
-this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):
-"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(m&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,m,q,z,F,C){var I=d.editor.graph;
-if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(I.getSvg(m,q,z)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),Z=I.getGraphBounds(),fa=Math.floor(Z.width*q/I.view.scale),ba=Math.floor(Z.height*q/I.view.scale);if(G.length<=MAX_REQUEST_SIZE&&fa*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:I.getExportVariables()};
-C&&(Y.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(pa,O){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(O||"0")+(null!=pa?"&filename="+encodeURIComponent(pa):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:"")+"&bg="+(null!=m?m:"none")+"&w="+fa+"&h="+ba+"&border="+z+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==m||"none"==m,!0,!1,!1,z,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,z,!0,!1,"jpeg",
-C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var m=d;this.currentPage!=this.pages[g]&&(m=this.createTemporaryGraph(d.getStylesheet()),this.updatePageRoot(this.pages[g]),m.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+m.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);
-return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var m=document.createElement("h3");mxUtils.write(m,mxUtils.htmlEntities(d));m.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(m);var q=document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';
-var z={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var I=JSON.parse(decodeURIComponent(C.substring(1)));z[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerText="";if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Z=0;Z<G.length;Z++){var fa=G[Z];z[fa.id]&&
-(f[fa.id]=fa);var ba=this.addCheckbox(q,fa.title,z[fa.id]);(function(Y,pa){mxEvent.addListener(pa,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(fa,ba)}},mxUtils.bind(this,function(G){q.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign="center";mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(Z)}));g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,
-function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,Z;for(Z in f)null==z[Z]&&(G++,mxUtils.bind(this,function(fa){this.remoteInvoke("getFileContent",[fa.downloadUrl],null,mxUtils.bind(this,function(ba){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,ba,fa))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[Z]));
-for(Z in z)f[Z]||this.closeLibrary(new RemoteLibrary(this,null,z[Z]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};
-EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):
-g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,m,q){var z=!0,F=window.setTimeout(mxUtils.bind(this,function(){z=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);z&&m.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(F);z&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;
-this.remoteInvokeCallbacks.push({callback:C,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,Z){var fa={event:"remoteInvokeResponse",msgMarkers:d.msgMarkers};null!=Z?fa.error={errResp:Z}:null!=G&&(fa.resp=G);this.remoteWin.postMessage(JSON.stringify(fa),"*")});try{var m=d.funtionName,
-q=this.remoteInvokableFns[m];if(null!=q&&"function"===typeof this[m]){if(q.allowedDomains){for(var z=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){z=!0;break}if(!z){g(null,"Invalid Call: "+m+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),C.push(function(G){g(null,G||"Unkown Error")}),this[m].apply(this,C);else{var I=this[m].apply(this,C);g([I])}}else g(null,"Invalid Call: "+
-m+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var m=g.open("database",2);m.onupgradeneeded=function(q){try{var z=m.result;1>q.oldVersion&&z.createObjectStore("objects",{keyPath:"key"});2>q.oldVersion&&(z.createObjectStore("files",{keyPath:"title"}),z.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=
-isLocalStorage)}catch(F){null!=f&&f(F)}};m.onsuccess=mxUtils.bind(this,function(q){var z=m.result;this.database=z;EditorUi.migrateStorageFiles&&(StorageFile.migrate(z),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+
-urlParams.forceMigration);document.body.appendChild(C);var I=!0,G=!1,Z,fa=0,ba=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){fa++;pa()}),pa=mxUtils.bind(this,function(){try{if(fa>=Z.length)ba();else{var W=Z[fa];StorageFile.getFileContent(this,W,mxUtils.bind(this,function(ha){null==ha||".scratchpad"==W&&ha==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",
-funtionName:"getLocalStorageFile",functionArgs:[W]}),"*"):Y()}),Y)}}catch(ha){console.log(ha)}}),O=mxUtils.bind(this,function(W){try{this.setDatabaseItem(null,[{title:W.title,size:W.data.length,lastModified:Date.now(),type:W.isLib?"L":"F"},{title:W.title,data:W.data}],Y,Y,["filesInfo","files"])}catch(ha){console.log(ha)}});F=mxUtils.bind(this,function(W){try{if(W.source==C.contentWindow){var ha={};try{ha=JSON.parse(W.data)}catch(U){}"init"==ha.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),
-"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ha.event||G||(I?null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?(Z=ha.resp[0],I=!1,pa()):ba():null!=ha.resp&&0<ha.resp.length&&null!=ha.resp[0]?O(ha.resp[0]):Y())}}catch(U){console.log(U)}});window.addEventListener("message",F)}})));d(z);z.onversionchange=function(){z.close()}});m.onerror=f;m.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};
-EditorUi.prototype.setDatabaseItem=function(d,f,g,m,q){this.openDatabase(mxUtils.bind(this,function(z){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=z.transaction(q,"readwrite");F.oncomplete=g;F.onerror=m;for(z=0;z<q.length;z++)F.objectStore(q[z]).put(null!=d&&null!=d[z]?{key:d[z],data:f[z]}:f[z])}catch(C){null!=m&&m(C)}}),m)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){m=m||"objects";Array.isArray(m)||(m=[m],d=[d]);q=q.transaction(m,
-"readwrite");q.oncomplete=f;q.onerror=g;for(var z=0;z<m.length;z++)q.objectStore(m[z]).delete(d[z])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,m){this.openDatabase(mxUtils.bind(this,function(q){try{m=m||"objects";var z=q.transaction([m],"readonly").objectStore(m).get(d);z.onsuccess=function(){f(z.result)};z.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],
-"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),z=[];q.onsuccess=function(F){null==F.target.result?d(z):(z.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(m){try{g=g||"objects";var q=m.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(z){null!=f&&f(z)}}),f)};EditorUi.prototype.commentsSupported=
-function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var m=this.getCurrentFile();
-null!=m?m.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();
-return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language",
-"da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,m,q,z,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,m,q,z,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");
-return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,f,g,m,q,z,F,C,I,G,Z,fa,ba,Y,pa,O){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,m,q,z,F,C,I,G,Z,fa,ba,Y,pa,O)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");
-return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,m)};EditorUi.prototype.convertImageToDataUri=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=
-function(d,f,g,m){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,m)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};EditorUi.prototype.writeGraphModelToPng=function(d,f,g,m,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,m,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=
-urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),m=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<m.length){var q="<mxfile "===m.substring(0,8)||"<?xml"===m.substring(0,5)||"\x3c!--[if IE]>"===m.substring(0,12);m="<mxlibrary>"===m.substring(0,11);(q||m)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;
-var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
-var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var U=fa.getElementsByTagName("div"),ma=0,T=0;T<U.length;T++)"none"!=U[T].style.display&&U[T].parentNode==fa&&ma++;ba.style.display=0==ma?"block":"none"}function d(U,ma,T,M){function ia(){ma.removeChild(aa);ma.removeChild(la);P.style.display="block";N.style.display="block"}I={div:ma,comment:U,saveCallback:T,deleteOnCancel:M};var N=ma.querySelector(".geCommentTxt"),P=ma.querySelector(".geCommentActionsList"),aa=document.createElement("textarea");
-aa.className="geCommentEditTxtArea";aa.style.minHeight=N.offsetHeight+"px";aa.value=U.content;ma.insertBefore(aa,N);var la=document.createElement("div");la.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){M?(ma.parentNode.removeChild(ma),E()):ia();I=null});u.className="geCommentEditBtn";la.appendChild(u);var H=mxUtils.button(mxResources.get("save"),function(){N.innerText="";U.content=aa.value;mxUtils.write(N,U.content);ia();T(U);I=null});mxEvent.addListener(aa,
-"keydown",mxUtils.bind(this,function(Q){mxEvent.isConsumed(Q)||((mxEvent.isControlDown(Q)||mxClient.IS_MAC&&mxEvent.isMetaDown(Q))&&13==Q.keyCode?(H.click(),mxEvent.consume(Q)):27==Q.keyCode&&(u.click(),mxEvent.consume(Q)))}));H.focus();H.className="geCommentEditBtn gePrimaryBtn";la.appendChild(H);ma.insertBefore(la,N);P.style.display="none";N.style.display="none";aa.focus()}function f(U,ma){ma.innerText="";U=new Date(U.modifiedDate);var T=b.timeSince(U);null==T&&(T=mxResources.get("lessThanAMinute"));
-mxUtils.write(ma,mxResources.get("timeAgo",[T],"{1} ago"));ma.setAttribute("title",U.toLocaleDateString()+" "+U.toLocaleTimeString())}function g(U){var ma=document.createElement("img");ma.className="geCommentBusyImg";ma.src=IMAGE_PATH+"/spin.gif";U.appendChild(ma);U.busyImg=ma}function m(U){U.style.border="1px solid red";U.removeChild(U.busyImg)}function q(U){U.style.border="";U.removeChild(U.busyImg)}function z(U,ma,T,M,ia){function N(R,ca,ea){var da=document.createElement("li");da.className="geCommentAction";
-var qa=document.createElement("a");qa.className="geCommentActionLnk";mxUtils.write(qa,R);da.appendChild(qa);mxEvent.addListener(qa,"click",function(va){ca(va,U);va.preventDefault();mxEvent.consume(va)});X.appendChild(da);ea&&(da.style.display="none")}function P(){function R(da){ca.push(ea);if(null!=da.replies)for(var qa=0;qa<da.replies.length;qa++)ea=ea.nextSibling,R(da.replies[qa])}var ca=[],ea=la;R(U);return{pdiv:ea,replies:ca}}function aa(R,ca,ea,da,qa){function va(){g(Ca);U.addReply(za,function(sa){za.id=
-sa;U.replies.push(za);q(Ca);ea&&ea()},function(sa){ua();m(Ca);b.handleError(sa,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},da,qa)}function ua(){d(za,Ca,function(sa){va()},!0)}var Aa=P().pdiv,za=b.newComment(R,b.getCurrentUser());za.pCommentId=U.id;null==U.replies&&(U.replies=[]);var Ca=z(za,U.replies,Aa,M+1);ca?ua():va()}if(ia||!U.isResolved){ba.style.display="none";var la=document.createElement("div");la.className="geCommentContainer";la.setAttribute("data-commentId",
-U.id);la.style.marginLeft=20*M+5+"px";U.isResolved&&!Editor.isDarkMode()&&(la.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var H=document.createElement("img");H.className="geCommentUserImg";H.src=U.user.pictureUrl||Editor.userImage;u.appendChild(H);H=document.createElement("div");H.className="geCommentHeaderTxt";u.appendChild(H);var Q=document.createElement("div");Q.className="geCommentUsername";mxUtils.write(Q,U.user.displayName||"");H.appendChild(Q);
-Q=document.createElement("div");Q.className="geCommentDate";Q.setAttribute("data-commentId",U.id);f(U,Q);H.appendChild(Q);la.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,U.content||"");la.appendChild(u);U.isLocked&&(la.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var X=document.createElement("ul");X.className="geCommentActionsList";u.appendChild(X);F||U.isLocked||0!=M&&!C||N(mxResources.get("reply"),function(){aa("",
-!0)},U.isResolved);H=b.getCurrentUser();null==H||H.id!=U.user.id||F||U.isLocked||(N(mxResources.get("edit"),function(){function R(){d(U,la,function(){g(la);U.editComment(U.content,function(){q(la)},function(ca){m(la);R();b.handleError(ca,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}R()},U.isResolved),N(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(la);U.deleteComment(function(R){if(!0===R){R=la.querySelector(".geCommentTxt");
-R.innerText="";mxUtils.write(R,mxResources.get("msgDeleted"));var ca=la.querySelectorAll(".geCommentAction");for(R=0;R<ca.length;R++)ca[R].parentNode.removeChild(ca[R]);q(la);la.style.opacity="0.5"}else{ca=P(U).replies;for(R=0;R<ca.length;R++)fa.removeChild(ca[R]);for(R=0;R<ma.length;R++)if(ma[R]==U){ma.splice(R,1);break}ba.style.display=0==fa.getElementsByTagName("div").length?"block":"none"}},function(R){m(la);b.handleError(R,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
-U.isResolved));F||U.isLocked||0!=M||N(U.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(R){function ca(){var ea=R.target;ea.innerText="";U.isResolved=!U.isResolved;mxUtils.write(ea,U.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var da=U.isResolved?"none":"",qa=P(U).replies,va=Editor.isDarkMode()?"transparent":U.isResolved?"ghostWhite":"white",ua=0;ua<qa.length;ua++){qa[ua].style.backgroundColor=va;for(var Aa=qa[ua].querySelectorAll(".geCommentAction"),
-za=0;za<Aa.length;za++)Aa[za]!=ea.parentNode&&(Aa[za].style.display=da);O||(qa[ua].style.display="none")}E()}U.isResolved?aa(mxResources.get("reOpened")+": ",!0,ca,!1,!0):aa(mxResources.get("markedAsResolved"),!1,ca,!0)});la.appendChild(u);null!=T?fa.insertBefore(la,T.nextSibling):fa.appendChild(la);for(T=0;null!=U.replies&&T<U.replies.length;T++)u=U.replies[T],u.isResolved=U.isResolved,z(u,U.replies,null,M+1,ia);null!=I&&(I.comment.id==U.id?(ia=U.content,U.content=I.comment.content,d(U,la,I.saveCallback,
-I.deleteOnCancel),U.content=ia):null==I.comment.id&&I.comment.pCommentId==U.id&&(fa.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel)));return la}}var F=!b.canComment(),C=b.canReplyToReplies(),I=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var Z=EditorUi.compactUi?"26px":"30px",fa=document.createElement("div");fa.className="geCommentsList";fa.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:
-"whiteSmoke";fa.style.bottom=parseInt(Z)+7+"px";G.appendChild(fa);var ba=document.createElement("span");ba.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(ba,mxResources.get("noCommentsFound"));var Y=document.createElement("div");Y.className="geToolbarContainer geCommentsToolbar";Y.style.height=Z;Y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";Y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";Z=document.createElement("a");Z.className=
-"geButton";if(!F){var pa=Z.cloneNode();pa.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';pa.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(pa,"click",function(U){function ma(){d(T,M,function(ia){g(M);b.addComment(ia,function(N){ia.id=N;W.push(ia);q(M)},function(N){m(M);ma();b.handleError(N,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var T=b.newComment("",b.getCurrentUser()),M=z(T,W,null,0);ma();U.preventDefault();
-mxEvent.consume(U)});Y.appendChild(pa)}pa=Z.cloneNode();pa.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';pa.setAttribute("title",mxResources.get("showResolved"));var O=!1;Editor.isDarkMode()&&(pa.style.filter="invert(100%)");mxEvent.addListener(pa,"click",function(U){this.className=(O=!O)?"geButton geCheckedBtn":"geButton";ha();U.preventDefault();mxEvent.consume(U)});Y.appendChild(pa);b.commentsRefreshNeeded()&&(pa=Z.cloneNode(),pa.innerHTML='<img src="'+IMAGE_PATH+
-'/update16.png" style="width: 16px; padding: 2px;">',pa.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(pa.style.filter="invert(100%)"),mxEvent.addListener(pa,"click",function(U){ha();U.preventDefault();mxEvent.consume(U)}),Y.appendChild(pa));b.commentsSaveNeeded()&&(Z=Z.cloneNode(),Z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',Z.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(Z.style.filter="invert(100%)"),mxEvent.addListener(Z,
-"click",function(U){t();U.preventDefault();mxEvent.consume(U)}),Y.appendChild(Z));G.appendChild(Y);var W=[],ha=mxUtils.bind(this,function(){this.hasError=!1;if(null!=I)try{I.div=I.div.cloneNode(!0);var U=I.div.querySelector(".geCommentEditTxtArea"),ma=I.div.querySelector(".geCommentEditBtns");I.comment.content=U.value;U.parentNode.removeChild(U);ma.parentNode.removeChild(ma)}catch(T){b.handleError(T)}fa.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+IMAGE_PATH+'/spin.gif" valign="middle"> '+
-mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(T){function M(ia){if(null!=ia){ia.sort(function(P,aa){return new Date(P.modifiedDate)-new Date(aa.modifiedDate)});for(var N=0;N<ia.length;N++)M(ia[N].replies)}}T.sort(function(ia,N){return new Date(ia.modifiedDate)-new Date(N.modifiedDate)});fa.innerText="";fa.appendChild(ba);ba.style.display="block";W=T;for(T=0;T<W.length;T++)M(W[T].replies),z(W[T],W,null,0,O);null!=I&&
-null==I.comment.id&&null==I.comment.pCommentId&&(fa.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel))},mxUtils.bind(this,function(T){fa.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(T&&T.message?": "+T.message:""));this.hasError=!0})):fa.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ha();this.refreshComments=ha;Y=mxUtils.bind(this,function(){function U(N){var P=T[N.id];if(null!=P)for(f(N,P),P=0;null!=N.replies&&P<N.replies.length;P++)U(N.replies[P])}if(this.window.isVisible()){for(var ma=
-fa.querySelectorAll(".geCommentDate"),T={},M=0;M<ma.length;M++){var ia=ma[M];T[ia.getAttribute("data-commentId")]=ia}for(M=0;M<W.length;M++)U(W[M])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);this.window.addListener(mxEvent.SHOW,
-mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,m){var q=document.createElement("div");q.style.textAlign="center";m=null!=m?m:44;var z=document.createElement("div");z.style.padding="6px";z.style.overflow="auto";z.style.maxHeight=m+"px";z.style.lineHeight="1.2em";mxUtils.write(z,e);q.appendChild(z);null!=g&&(z=document.createElement("div"),z.style.padding="6px 0 6px 0",e=document.createElement("img"),e.setAttribute("src",
-g),z.appendChild(e),q.appendChild(z));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);var C=mxUtils.button(D||
-mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",z=document.createElement("p"),z.style.marginTop="20px",z.style.marginBottom="0px",z.appendChild(F),D=document.createElement("span"),
+"F",F,C)});window.openBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.getFileContent(this,F,C,I)});window.deleteBrowserFile=mxUtils.bind(this,function(F,C,I){StorageFile.deleteFile(this,F,C,I)});if(!f){var l=Editor.useLocalStorage;Editor.useLocalStorage=!d}window.openFile=new OpenFile(mxUtils.bind(this,function(F){this.hideDialog(F)}));window.openFile.setConsumer(mxUtils.bind(this,function(F,C){null!=C&&Graph.fileSupport&&/(\.v(dx|sdx?))($|\?)/i.test(C)?(F=new Blob([F],{type:"application/octet-stream"}),
+this.importVisio(F,mxUtils.bind(this,function(I){this.importXml(I,0,0,!0)}),null,C)):this.editor.graph.setSelectionCells(this.importXml(F,0,0,!0))}));this.showDialog((new OpenDialog(this)).container,Editor.useLocalStorage?640:360,Editor.useLocalStorage?480:220,!0,!0,function(){window.openFile=null});if(!f){var q=this.dialog,z=q.close;this.dialog.close=mxUtils.bind(this,function(F){Editor.useLocalStorage=l;z.apply(q,arguments);F&&null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.showSplash()})}}};
+EditorUi.prototype.importZipFile=function(d,f,g){var l=this,q=mxUtils.bind(this,function(){this.loadingExtensions=!1;"undefined"!==typeof JSZip?JSZip.loadAsync(d).then(function(z){if(mxUtils.isEmptyObject(z.files))g();else{var F=0,C,I=!1;z.forEach(function(G,Z){G=Z.name.toLowerCase();"diagram/diagram.xml"==G?(I=!0,Z.async("string").then(function(ca){0==ca.indexOf("<mxfile ")?f(ca):g()})):0==G.indexOf("versions/")&&(G=parseInt(G.substr(9)),G>F&&(F=G,C=Z))});0<F?C.async("string").then(function(G){(new XMLHttpRequest).upload&&
+l.isRemoteFileFormat(G,d.name)?l.isOffline()?l.showError(mxResources.get("error"),mxResources.get("notInOffline"),null,g):l.parseFileData(G,mxUtils.bind(this,function(Z){4==Z.readyState&&(200<=Z.status&&299>=Z.status?f(Z.responseText):g())}),d.name):g()}):I||g()}},function(z){g(z)}):g()});"undefined"!==typeof JSZip||this.loadingExtensions||this.isOffline(!0)?q():(this.loadingExtensions=!0,mxscript("js/extensions.min.js",q))};EditorUi.prototype.importFile=function(d,f,g,l,q,z,F,C,I,G,Z,ca){G=null!=
+G?G:!0;var ba=!1,Y=null,O=mxUtils.bind(this,function(la){var aa=null;null!=la&&"<mxlibrary"==la.substring(0,10)?this.loadLibrary(new LocalLibrary(this,la,F)):aa=this.importXml(la,g,l,G,null,null!=ca?mxEvent.isControlDown(ca):null);null!=C&&C(aa)});"image"==f.substring(0,5)?(I=!1,"image/png"==f.substring(0,9)&&(f=Z?null:this.extractGraphModelFromPng(d),null!=f&&0<f.length&&(Y=this.importXml(f,g,l,G,null,null!=ca?mxEvent.isControlDown(ca):null),I=!0)),I||(f=this.editor.graph,I=d.indexOf(";"),0<I&&(d=
+d.substring(0,I)+d.substring(d.indexOf(",",I+1))),G&&f.isGridEnabled()&&(g=f.snap(g),l=f.snap(l)),Y=[f.insertVertex(null,null,"",g,l,q,z,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+d+";")])):/(\.*<graphml )/.test(d)?(ba=!0,this.importGraphML(d,O)):null!=I&&null!=F&&(/(\.v(dx|sdx?))($|\?)/i.test(F)||/(\.vs(x|sx?))($|\?)/i.test(F))?(ba=!0,this.importVisio(I,O)):(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,F)?this.isOffline()?
+this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(ba=!0,q=mxUtils.bind(this,function(la){4==la.readyState&&(200<=la.status&&299>=la.status?O(la.responseText):null!=C&&C(null))}),null!=d?this.parseFileData(d,q,F):this.parseFile(I,q,F)):0==d.indexOf("PK")&&null!=I?(ba=!0,this.importZipFile(I,O,mxUtils.bind(this,function(){Y=this.insertTextAt(this.validateFileData(d),g,l,!0,null,G);C(Y)}))):/(\.v(sd|dx))($|\?)/i.test(F)||/(\.vs(s|x))($|\?)/i.test(F)||(Y=this.insertTextAt(this.validateFileData(d),
+g,l,!0,null,G,null,null!=ca?mxEvent.isControlDown(ca):null));ba||null==C||C(Y);return Y};EditorUi.prototype.importFiles=function(d,f,g,l,q,z,F,C,I,G,Z,ca,ba){l=null!=l?l:this.maxImageSize;G=null!=G?G:this.maxImageBytes;var Y=null!=f&&null!=g,O=!0;f=null!=f?f:0;g=null!=g?g:0;var la=!1;if(!mxClient.IS_CHROMEAPP&&null!=d)for(var aa=Z||this.resampleThreshold,ia=0;ia<d.length;ia++)if("image/svg"!==d[ia].type.substring(0,9)&&"image/"===d[ia].type.substring(0,6)&&d[ia].size>aa){la=!0;break}var X=mxUtils.bind(this,
+function(){var R=this.editor.graph,sa=R.gridSize;q=null!=q?q:mxUtils.bind(this,function(ma,u,H,P,V,Q,da,ea,fa){try{return null!=ma&&"<mxlibrary"==ma.substring(0,10)?(this.spinner.stop(),this.loadLibrary(new LocalLibrary(this,ma,da)),null):this.importFile(ma,u,H,P,V,Q,da,ea,fa,Y,ca,ba)}catch(pa){return this.handleError(pa),null}});z=null!=z?z:mxUtils.bind(this,function(ma){R.setSelectionCells(ma)});if(this.spinner.spin(document.body,mxResources.get("loading")))for(var M=d.length,ka=M,L=[],S=mxUtils.bind(this,
+function(ma,u){L[ma]=u;if(0==--ka){this.spinner.stop();if(null!=C)C(L);else{var H=[];R.getModel().beginUpdate();try{for(ma=0;ma<L.length;ma++){var P=L[ma]();null!=P&&(H=H.concat(P))}}finally{R.getModel().endUpdate()}}z(H)}}),ja=0;ja<M;ja++)mxUtils.bind(this,function(ma){var u=d[ma];if(null!=u){var H=new FileReader;H.onload=mxUtils.bind(this,function(P){if(null==F||F(u))if("image/"==u.type.substring(0,6))if("image/svg"==u.type.substring(0,9)){var V=Graph.clipSvgDataUri(P.target.result),Q=V.indexOf(",");
+Q=decodeURIComponent(escape(atob(V.substring(Q+1))));var da=mxUtils.parseXml(Q);Q=da.getElementsByTagName("svg");if(0<Q.length){Q=Q[0];var ea=ca?null:Q.getAttribute("content");null!=ea&&"<"!=ea.charAt(0)&&"%"!=ea.charAt(0)&&(ea=unescape(window.atob?atob(ea):Base64.decode(ea,!0)));null!=ea&&"%"==ea.charAt(0)&&(ea=decodeURIComponent(ea));null==ea||"<mxfile "!==ea.substring(0,8)&&"<mxGraphModel "!==ea.substring(0,14)?S(ma,mxUtils.bind(this,function(){try{if(null!=da){var ua=da.getElementsByTagName("svg");
+if(0<ua.length){var qa=ua[0],Da=qa.getAttribute("width"),Aa=qa.getAttribute("height");Da=null!=Da&&"%"!=Da.charAt(Da.length-1)?parseFloat(Da):NaN;Aa=null!=Aa&&"%"!=Aa.charAt(Aa.length-1)?parseFloat(Aa):NaN;var Fa=qa.getAttribute("viewBox");if(null==Fa||0==Fa.length)qa.setAttribute("viewBox","0 0 "+Da+" "+Aa);else if(isNaN(Da)||isNaN(Aa)){var ta=Fa.split(" ");3<ta.length&&(Da=parseFloat(ta[2]),Aa=parseFloat(ta[3]))}V=Editor.createSvgDataUri(mxUtils.getXml(qa));var Sa=Math.min(1,Math.min(l/Math.max(1,
+Da)),l/Math.max(1,Aa)),Ra=q(V,u.type,f+ma*sa,g+ma*sa,Math.max(1,Math.round(Da*Sa)),Math.max(1,Math.round(Aa*Sa)),u.name);if(isNaN(Da)||isNaN(Aa)){var Oa=new Image;Oa.onload=mxUtils.bind(this,function(){Da=Math.max(1,Oa.width);Aa=Math.max(1,Oa.height);Ra[0].geometry.width=Da;Ra[0].geometry.height=Aa;qa.setAttribute("viewBox","0 0 "+Da+" "+Aa);V=Editor.createSvgDataUri(mxUtils.getXml(qa));var Va=V.indexOf(";");0<Va&&(V=V.substring(0,Va)+V.substring(V.indexOf(",",Va+1)));R.setCellStyles("image",V,[Ra[0]])});
+Oa.src=Editor.createSvgDataUri(mxUtils.getXml(qa))}return Ra}}}catch(Va){}return null})):S(ma,mxUtils.bind(this,function(){return q(ea,"text/xml",f+ma*sa,g+ma*sa,0,0,u.name)}))}else S(ma,mxUtils.bind(this,function(){return null}))}else{Q=!1;if("image/png"==u.type){var fa=ca?null:this.extractGraphModelFromPng(P.target.result);if(null!=fa&&0<fa.length){var pa=new Image;pa.src=P.target.result;S(ma,mxUtils.bind(this,function(){return q(fa,"text/xml",f+ma*sa,g+ma*sa,pa.width,pa.height,u.name)}));Q=!0}}Q||
+(mxClient.IS_CHROMEAPP?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("dragAndDropNotSupported"),mxResources.get("cancel"),mxUtils.bind(this,function(){}),null,mxResources.get("ok"),mxUtils.bind(this,function(){this.actions.get("import").funct()}))):this.loadImage(P.target.result,mxUtils.bind(this,function(ua){this.resizeImage(ua,P.target.result,mxUtils.bind(this,function(qa,Da,Aa){S(ma,mxUtils.bind(this,function(){if(null!=qa&&qa.length<G){var Fa=O&&this.isResampleImageSize(u.size,
+Z)?Math.min(1,Math.min(l/Da,l/Aa)):1;return q(qa,u.type,f+ma*sa,g+ma*sa,Math.round(Da*Fa),Math.round(Aa*Fa),u.name)}this.handleError({message:mxResources.get("imageTooBig")});return null}))}),O,l,Z,u.size)}),mxUtils.bind(this,function(){this.handleError({message:mxResources.get("invalidOrMissingFile")})})))}else V=P.target.result,q(V,u.type,f+ma*sa,g+ma*sa,240,160,u.name,function(ua){S(ma,function(){return ua})},u)});/(\.v(dx|sdx?))($|\?)/i.test(u.name)||/(\.vs(x|sx?))($|\?)/i.test(u.name)?q(null,
+u.type,f+ma*sa,g+ma*sa,240,160,u.name,function(P){S(ma,function(){return P})},u):"image"==u.type.substring(0,5)||"application/pdf"==u.type?H.readAsDataURL(u):H.readAsText(u)}})(ja)});if(la){la=[];for(ia=0;ia<d.length;ia++)la.push(d[ia]);d=la;this.confirmImageResize(function(R){O=R;X()},I)}else X()};EditorUi.prototype.isBlankFile=function(){return null!=this.pages&&1==this.pages.length&&this.isDiagramEmpty()&&this.currentPage.getName()==mxResources.get("pageWithNumber",[1])};EditorUi.prototype.confirmImageResize=
+function(d,f){f=null!=f?f:!1;var g=null!=this.spinner&&null!=this.spinner.pause?this.spinner.pause():function(){},l=isLocalStorage||mxClient.IS_CHROMEAPP?mxSettings.getResizeImages():null,q=function(z,F){if(z||f)mxSettings.setResizeImages(z?F:null),mxSettings.save();g();d(F)};null==l||f?this.showDialog((new ConfirmDialog(this,mxResources.get("resizeLargeImages"),function(z){q(z,!0)},function(z){q(z,!1)},mxResources.get("resize"),mxResources.get("actualSize"),'<img style="margin-top:8px;" src="'+Editor.loResImage+
+'"/>','<img style="margin-top:8px;" src="'+Editor.hiResImage+'"/>',isLocalStorage||mxClient.IS_CHROMEAPP)).container,340,isLocalStorage||mxClient.IS_CHROMEAPP?220:200,!0,!0):q(!1,l)};EditorUi.prototype.parseFile=function(d,f,g){g=null!=g?g:d.name;var l=new FileReader;l.onload=mxUtils.bind(this,function(){this.parseFileData(l.result,f,g)});l.readAsText(d)};EditorUi.prototype.parseFileData=function(d,f,g){var l=new XMLHttpRequest;l.open("POST",OPEN_URL);l.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
+l.onreadystatechange=function(){f(l)};l.send("format=xml&filename="+encodeURIComponent(g)+"&data="+encodeURIComponent(d));try{EditorUi.logEvent({category:"GLIFFY-IMPORT-FILE",action:"size_"+file.size})}catch(q){}};EditorUi.prototype.isResampleImageSize=function(d,f){f=null!=f?f:this.resampleThreshold;return d>f};EditorUi.prototype.resizeImage=function(d,f,g,l,q,z,F){q=null!=q?q:this.maxImageSize;var C=Math.max(1,d.width),I=Math.max(1,d.height);if(l&&this.isResampleImageSize(null!=F?F:f.length,z))try{var G=
+Math.max(C/q,I/q);if(1<G){var Z=Math.round(C/G),ca=Math.round(I/G),ba=document.createElement("canvas");ba.width=Z;ba.height=ca;ba.getContext("2d").drawImage(d,0,0,Z,ca);var Y=ba.toDataURL();if(Y.length<f.length){var O=document.createElement("canvas");O.width=Z;O.height=ca;var la=O.toDataURL();Y!==la&&(f=Y,C=Z,I=ca)}}}catch(aa){}g(f,C,I)};EditorUi.prototype.extractGraphModelFromPng=function(d){return Editor.extractGraphModelFromPng(d)};EditorUi.prototype.loadImage=function(d,f,g){try{var l=new Image;
+l.onload=function(){l.width=0<l.width?l.width:120;l.height=0<l.height?l.height:120;f(l)};null!=g&&(l.onerror=g);l.src=d}catch(q){if(null!=g)g(q);else throw q;}};EditorUi.prototype.getDefaultSketchMode=function(){var d="ac.draw.io"==window.location.host?"1":"0";return"0"!=(null!=urlParams.rough?urlParams.rough:d)};var D=EditorUi.prototype.init;EditorUi.prototype.init=function(){mxStencilRegistry.allowEval=mxStencilRegistry.allowEval&&!this.isOfflineApp();this.isSettingsEnabled()&&("1"==urlParams.sketch&&
+this.doSetSketchMode(null!=mxSettings.settings.sketchMode&&null==urlParams.rough?mxSettings.settings.sketchMode:this.getDefaultSketchMode()),null!=mxSettings.settings.sidebarTitles&&(Sidebar.prototype.sidebarTitles=mxSettings.settings.sidebarTitles),this.formatWidth=mxSettings.getFormatWidth());var d=this,f=this.editor.graph;Editor.isDarkMode()&&(f.view.defaultGridColor=mxGraphView.prototype.defaultDarkGridColor);Graph.touchStyle&&(f.panningHandler.isPanningTrigger=function(aa){var ia=aa.getEvent();
+return null==aa.getState()&&!mxEvent.isMouseEvent(ia)&&!f.freehand.isDrawing()||mxEvent.isPopupTrigger(ia)&&(null==aa.getState()||mxEvent.isControlDown(ia)||mxEvent.isShiftDown(ia))});f.cellEditor.editPlantUmlData=function(aa,ia,X){var R=JSON.parse(X);ia=new TextareaDialog(d,mxResources.get("plantUml")+":",R.data,function(sa){null!=sa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generatePlantUmlImage(sa,R.format,function(M,ka,L){d.spinner.stop();f.getModel().beginUpdate();try{if("txt"==
+R.format)f.labelChanged(aa,"<pre>"+M+"</pre>"),f.updateCellSize(aa,!0);else{f.setCellStyles("image",d.convertDataUri(M),[aa]);var S=f.model.getGeometry(aa);null!=S&&(S=S.clone(),S.width=ka,S.height=L,f.cellsResized([aa],[S],!1))}f.setAttributeForCell(aa,"plantUmlData",JSON.stringify({data:sa,format:R.format}))}finally{f.getModel().endUpdate()}},function(M){d.handleError(M)})},null,null,400,220);d.showDialog(ia.container,420,300,!0,!0);ia.init()};f.cellEditor.editMermaidData=function(aa,ia,X){var R=
+JSON.parse(X);ia=new TextareaDialog(d,mxResources.get("mermaid")+":",R.data,function(sa){null!=sa&&d.spinner.spin(document.body,mxResources.get("inserting"))&&d.generateMermaidImage(sa,R.config,function(M,ka,L){d.spinner.stop();f.getModel().beginUpdate();try{f.setCellStyles("image",M,[aa]);var S=f.model.getGeometry(aa);null!=S&&(S=S.clone(),S.width=Math.max(S.width,ka),S.height=Math.max(S.height,L),f.cellsResized([aa],[S],!1));f.setAttributeForCell(aa,"mermaidData",JSON.stringify({data:sa,config:R.config},
+null,2))}finally{f.getModel().endUpdate()}},function(M){d.handleError(M)})},null,null,400,220);d.showDialog(ia.container,420,300,!0,!0);ia.init()};var g=f.cellEditor.startEditing;f.cellEditor.startEditing=function(aa,ia){try{var X=this.graph.getAttributeForCell(aa,"plantUmlData");if(null!=X)this.editPlantUmlData(aa,ia,X);else if(X=this.graph.getAttributeForCell(aa,"mermaidData"),null!=X)this.editMermaidData(aa,ia,X);else{var R=f.getCellStyle(aa);"1"==mxUtils.getValue(R,"metaEdit","0")?d.showDataDialog(aa):
+g.apply(this,arguments)}}catch(sa){d.handleError(sa)}};f.getLinkTitle=function(aa){return d.getLinkTitle(aa)};f.customLinkClicked=function(aa){var ia=!1;try{d.handleCustomLink(aa),ia=!0}catch(X){d.handleError(X)}return ia};var l=f.parseBackgroundImage;f.parseBackgroundImage=function(aa){var ia=l.apply(this,arguments);null!=ia&&null!=ia.src&&Graph.isPageLink(ia.src)&&(ia={originalSrc:ia.src});return ia};var q=f.setBackgroundImage;f.setBackgroundImage=function(aa){null!=aa&&null!=aa.originalSrc&&(aa=
+d.createImageForPageLink(aa.originalSrc,d.currentPage,this));q.apply(this,arguments)};this.editor.addListener("pageRenamed",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pageMoved",mxUtils.bind(this,function(){f.refreshBackgroundImage()}));this.editor.addListener("pagesPatched",mxUtils.bind(this,function(aa,ia){aa=null!=f.backgroundImage?f.backgroundImage.originalSrc:null;if(null!=aa){var X=aa.indexOf(",");if(0<X)for(aa=aa.substring(X+1),ia=ia.getProperty("patches"),
+X=0;X<ia.length;X++)if(null!=ia[X][EditorUi.DIFF_UPDATE]&&null!=ia[X][EditorUi.DIFF_UPDATE][aa]||null!=ia[X][EditorUi.DIFF_REMOVE]&&0<=mxUtils.indexOf(ia[X][EditorUi.DIFF_REMOVE],aa)){f.refreshBackgroundImage();break}}}));var z=f.getBackgroundImageObject;f.getBackgroundImageObject=function(aa,ia){var X=z.apply(this,arguments);if(null!=X&&null!=X.originalSrc)if(!ia)X={src:X.originalSrc};else if(ia&&null!=this.themes&&"darkTheme"==this.defaultThemeName){var R=this.stylesheet,sa=this.shapeForegroundColor,
+M=this.shapeBackgroundColor;this.stylesheet=this.getDefaultStylesheet();this.shapeBackgroundColor="#ffffff";this.shapeForegroundColor="#000000";X=d.createImageForPageLink(X.originalSrc);this.shapeBackgroundColor=M;this.shapeForegroundColor=sa;this.stylesheet=R}return X};var F=this.clearDefaultStyle;this.clearDefaultStyle=function(){F.apply(this,arguments)};this.isOffline()||"undefined"===typeof window.EditDataDialog||(EditDataDialog.placeholderHelpLink="https://www.diagrams.net/doc/faq/predefined-placeholders");
+if(/viewer\.diagrams\.net$/.test(window.location.hostname)||/embed\.diagrams\.net$/.test(window.location.hostname))this.editor.editBlankUrl="https://app.diagrams.net/";var C=d.editor.getEditBlankUrl;this.editor.getEditBlankUrl=function(aa){aa=null!=aa?aa:"";"1"==urlParams.dev&&(aa+=(0<aa.length?"&":"?")+"dev=1");return C.apply(this,arguments)};var I=f.addClickHandler;f.addClickHandler=function(aa,ia,X){var R=ia;ia=function(sa,M){if(null==M){var ka=mxEvent.getSource(sa);"a"==ka.nodeName.toLowerCase()&&
+(M=ka.getAttribute("href"))}null!=M&&f.isCustomLink(M)&&(mxEvent.isTouchEvent(sa)||!mxEvent.isPopupTrigger(sa))&&f.customLinkClicked(M)&&mxEvent.consume(sa);null!=R&&R(sa,M)};I.call(this,aa,ia,X)};D.apply(this,arguments);mxClient.IS_SVG&&this.editor.graph.addSvgShadow(f.view.canvas.ownerSVGElement,null,!0);if(null!=this.menus){var G=Menus.prototype.addPopupMenuEditItems;this.menus.addPopupMenuEditItems=function(aa,ia,X){d.editor.graph.isSelectionEmpty()?G.apply(this,arguments):d.menus.addMenuItems(aa,
+"delete - cut copy copyAsImage - duplicate".split(" "),null,X)}}d.actions.get("print").funct=function(){d.showDialog((new PrintDialog(d)).container,360,null!=d.pages&&1<d.pages.length?470:390,!0,!0)};this.defaultFilename=mxResources.get("untitledDiagram");var Z=f.getExportVariables;f.getExportVariables=function(){var aa=Z.apply(this,arguments),ia=d.getCurrentFile();null!=ia&&(aa.filename=ia.getTitle());aa.pagecount=null!=d.pages?d.pages.length:1;aa.page=null!=d.currentPage?d.currentPage.getName():
+"";aa.pagenumber=null!=d.pages&&null!=d.currentPage?mxUtils.indexOf(d.pages,d.currentPage)+1:1;return aa};var ca=f.getGlobalVariable;f.getGlobalVariable=function(aa){var ia=d.getCurrentFile();return"filename"==aa&&null!=ia?ia.getTitle():"page"==aa&&null!=d.currentPage?d.currentPage.getName():"pagenumber"==aa?null!=d.currentPage&&null!=d.pages?mxUtils.indexOf(d.pages,d.currentPage)+1:1:"pagecount"==aa?null!=d.pages?d.pages.length:1:ca.apply(this,arguments)};var ba=f.labelLinkClicked;f.labelLinkClicked=
+function(aa,ia,X){var R=ia.getAttribute("href");if(null==R||!f.isCustomLink(R)||!mxEvent.isTouchEvent(X)&&mxEvent.isPopupTrigger(X))ba.apply(this,arguments);else{if(!f.isEnabled()||null!=aa&&f.isCellLocked(aa.cell))f.customLinkClicked(R),f.getRubberband().reset();mxEvent.consume(X)}};this.editor.getOrCreateFilename=function(){var aa=d.defaultFilename,ia=d.getCurrentFile();null!=ia&&(aa=null!=ia.getTitle()?ia.getTitle():aa);return aa};var Y=this.actions.get("print");Y.setEnabled(!mxClient.IS_IOS||
+!navigator.standalone);Y.visible=Y.isEnabled();if(!this.editor.chromeless||this.editor.editable)this.keyHandler.bindAction(70,!0,"findReplace"),this.keyHandler.bindAction(67,!0,"copyStyle",!0),this.keyHandler.bindAction(86,!0,"pasteStyle",!0),this.keyHandler.bindAction(77,!0,"editGeometry",!0),this.keyHandler.bindAction(88,!0,"insertText",!0),this.keyHandler.bindAction(75,!0,"insertRectangle"),this.keyHandler.bindAction(75,!0,"insertEllipse",!0),this.altShiftActions[83]="synchronize",this.installImagePasteHandler(),
+this.installNativeClipboardHandler();this.addListener("realtimeStateChanged",mxUtils.bind(this,function(){this.updateUserElement()}));this.spinner=this.createSpinner(null,null,24);Graph.fileSupport&&f.addListener(mxEvent.EDITING_STARTED,mxUtils.bind(this,function(aa){var ia=f.cellEditor.text2,X=null;null!=ia&&(mxEvent.addListener(ia,"dragleave",function(R){null!=X&&(X.parentNode.removeChild(X),X=null);R.stopPropagation();R.preventDefault()}),mxEvent.addListener(ia,"dragover",mxUtils.bind(this,function(R){null==
+X&&(!mxClient.IS_IE||10<document.documentMode)&&(X=this.highlightElement(ia));R.stopPropagation();R.preventDefault()})),mxEvent.addListener(ia,"drop",mxUtils.bind(this,function(R){null!=X&&(X.parentNode.removeChild(X),X=null);if(0<R.dataTransfer.files.length)this.importFiles(R.dataTransfer.files,0,0,this.maxImageSize,function(M,ka,L,S,ja,ma){f.insertImage(M,ja,ma)},function(){},function(M){return"image/"==M.type.substring(0,6)},function(M){for(var ka=0;ka<M.length;ka++)M[ka]()},mxEvent.isControlDown(R));
+else if(0<=mxUtils.indexOf(R.dataTransfer.types,"text/uri-list")){var sa=R.dataTransfer.getData("text/uri-list");/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(sa)?this.loadImage(decodeURIComponent(sa),mxUtils.bind(this,function(M){var ka=Math.max(1,M.width);M=Math.max(1,M.height);var L=this.maxImageSize;L=Math.min(1,Math.min(L/Math.max(1,ka)),L/Math.max(1,M));f.insertImage(decodeURIComponent(sa),ka*L,M*L)})):document.execCommand("insertHTML",!1,R.dataTransfer.getData("text/plain"))}else 0<=mxUtils.indexOf(R.dataTransfer.types,
+"text/html")?document.execCommand("insertHTML",!1,R.dataTransfer.getData("text/html")):0<=mxUtils.indexOf(R.dataTransfer.types,"text/plain")&&document.execCommand("insertHTML",!1,R.dataTransfer.getData("text/plain"));R.stopPropagation();R.preventDefault()})))}));this.isSettingsEnabled()&&(Y=this.editor.graph.view,Y.setUnit(mxSettings.getUnit()),Y.addListener("unitChanged",function(aa,ia){mxSettings.setUnit(ia.getProperty("unit"));mxSettings.save()}),this.ruler=!this.canvasSupported||9==document.documentMode||
+"1"!=urlParams.ruler&&!mxSettings.isRulerOn()||this.editor.isChromelessView()&&!this.editor.editable?null:new mxDualRuler(this,Y.unit),this.refresh());if("1"==urlParams.styledev){Y=document.getElementById("geFooter");null!=Y&&(this.styleInput=document.createElement("input"),this.styleInput.setAttribute("type","text"),this.styleInput.style.position="absolute",this.styleInput.style.top="14px",this.styleInput.style.left="2px",this.styleInput.style.width="98%",this.styleInput.style.visibility="hidden",
+this.styleInput.style.opacity="0.9",mxEvent.addListener(this.styleInput,"change",mxUtils.bind(this,function(){this.editor.graph.getModel().setStyle(this.editor.graph.getSelectionCell(),this.styleInput.value)})),Y.appendChild(this.styleInput),this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(aa,ia){0<this.editor.graph.getSelectionCount()?(aa=this.editor.graph.getSelectionCell(),aa=this.editor.graph.getModel().getStyle(aa),this.styleInput.value=aa||"",this.styleInput.style.visibility=
+"visible"):this.styleInput.style.visibility="hidden"})));var O=this.isSelectionAllowed;this.isSelectionAllowed=function(aa){return mxEvent.getSource(aa)==this.styleInput?!0:O.apply(this,arguments)}}Y=document.getElementById("geInfo");null!=Y&&Y.parentNode.removeChild(Y);if(Graph.fileSupport&&(!this.editor.chromeless||this.editor.editable)){var la=null;mxEvent.addListener(f.container,"dragleave",function(aa){f.isEnabled()&&(null!=la&&(la.parentNode.removeChild(la),la=null),aa.stopPropagation(),aa.preventDefault())});
+mxEvent.addListener(f.container,"dragover",mxUtils.bind(this,function(aa){null==la&&(!mxClient.IS_IE||10<document.documentMode)&&(la=this.highlightElement(f.container));null!=this.sidebar&&this.sidebar.hideTooltip();aa.stopPropagation();aa.preventDefault()}));mxEvent.addListener(f.container,"drop",mxUtils.bind(this,function(aa){null!=la&&(la.parentNode.removeChild(la),la=null);if(f.isEnabled()){var ia=mxUtils.convertPoint(f.container,mxEvent.getClientX(aa),mxEvent.getClientY(aa)),X=aa.dataTransfer.files,
+R=f.view.translate,sa=f.view.scale,M=ia.x/sa-R.x,ka=ia.y/sa-R.y;if(0<X.length)ia=1==X.length&&this.isBlankFile()&&!this.canUndo()&&("image/svg"===X[0].type.substring(0,9)||"image/"!==X[0].type.substring(0,6)||/(\.drawio.png)$/i.test(X[0].name)),"1"!=urlParams.embed&&(mxEvent.isShiftDown(aa)||ia)?(!mxEvent.isShiftDown(aa)&&ia&&null!=this.getCurrentFile()&&this.fileLoaded(null),this.openFiles(X,!0)):(mxEvent.isAltDown(aa)&&(ka=M=null),this.importFiles(X,M,ka,this.maxImageSize,null,null,null,null,mxEvent.isControlDown(aa),
+null,null,mxEvent.isShiftDown(aa),aa));else{mxEvent.isAltDown(aa)&&(ka=M=0);var L=0<=mxUtils.indexOf(aa.dataTransfer.types,"text/uri-list")?aa.dataTransfer.getData("text/uri-list"):null;X=this.extractGraphModelFromEvent(aa,null!=this.pages);if(null!=X)f.setSelectionCells(this.importXml(X,M,ka,!0));else if(0<=mxUtils.indexOf(aa.dataTransfer.types,"text/html")){var S=aa.dataTransfer.getData("text/html");X=document.createElement("div");X.innerHTML=f.sanitizeHtml(S);var ja=null;ia=X.getElementsByTagName("img");
+null!=ia&&1==ia.length?(S=ia[0].getAttribute("src"),null==S&&(S=ia[0].getAttribute("srcset")),/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(S)||(ja=!0)):(ia=X.getElementsByTagName("a"),null!=ia&&1==ia.length?S=ia[0].getAttribute("href"):(X=X.getElementsByTagName("pre"),null!=X&&1==X.length&&(S=mxUtils.getTextContent(X[0]))));var ma=!0,u=mxUtils.bind(this,function(){f.setSelectionCells(this.insertTextAt(S,M,ka,!0,ja,null,ma,mxEvent.isControlDown(aa)))});ja&&null!=S&&S.length>this.resampleThreshold?this.confirmImageResize(function(H){ma=
+H;u()},mxEvent.isControlDown(aa)):u()}else null!=L&&/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(L)?this.loadImage(decodeURIComponent(L),mxUtils.bind(this,function(H){var P=Math.max(1,H.width);H=Math.max(1,H.height);var V=this.maxImageSize;V=Math.min(1,Math.min(V/Math.max(1,P)),V/Math.max(1,H));f.setSelectionCell(f.insertVertex(null,null,"",M,ka,P*V,H*V,"shape=image;verticalLabelPosition=bottom;labelBackgroundColor=default;verticalAlign=top;aspect=fixed;imageAspect=0;image="+L+";"))}),mxUtils.bind(this,
+function(H){f.setSelectionCells(this.insertTextAt(L,M,ka,!0))})):0<=mxUtils.indexOf(aa.dataTransfer.types,"text/plain")&&f.setSelectionCells(this.insertTextAt(aa.dataTransfer.getData("text/plain"),M,ka,!0))}}aa.stopPropagation();aa.preventDefault()}),!1)}f.enableFlowAnimation=!0;this.initPages();"1"==urlParams.embed&&this.initializeEmbedMode();this.installSettings()};EditorUi.prototype.installImagePasteHandler=function(){if(!mxClient.IS_IE){var d=this.editor.graph;d.container.addEventListener("paste",
+mxUtils.bind(this,function(f){if(!mxEvent.isConsumed(f))try{for(var g=f.clipboardData||f.originalEvent.clipboardData,l=!1,q=0;q<g.types.length;q++)if("text/"===g.types[q].substring(0,5)){l=!0;break}if(!l){var z=g.items;for(index in z){var F=z[index];if("file"===F.kind){if(d.isEditing())this.importFiles([F.getAsFile()],0,0,this.maxImageSize,function(I,G,Z,ca,ba,Y){d.insertImage(I,ba,Y)},function(){},function(I){return"image/"==I.type.substring(0,6)},function(I){for(var G=0;G<I.length;G++)I[G]()});
+else{var C=this.editor.graph.getInsertPoint();this.importFiles([F.getAsFile()],C.x,C.y,this.maxImageSize);mxEvent.consume(f)}break}}}}catch(I){}}),!1)}};EditorUi.prototype.installNativeClipboardHandler=function(){function d(){window.setTimeout(function(){g.innerHTML="&nbsp;";g.focus();document.execCommand("selectAll",!1,null)},0)}var f=this.editor.graph,g=document.createElement("div");g.setAttribute("autocomplete","off");g.setAttribute("autocorrect","off");g.setAttribute("autocapitalize","off");g.setAttribute("spellcheck",
+"false");g.style.textRendering="optimizeSpeed";g.style.fontFamily="monospace";g.style.wordBreak="break-all";g.style.background="transparent";g.style.color="transparent";g.style.position="absolute";g.style.whiteSpace="nowrap";g.style.overflow="hidden";g.style.display="block";g.style.fontSize="1";g.style.zIndex="-1";g.style.resize="none";g.style.outline="none";g.style.width="1px";g.style.height="1px";mxUtils.setOpacity(g,0);g.contentEditable=!0;g.innerHTML="&nbsp;";var l=!1;this.keyHandler.bindControlKey(88,
+null);this.keyHandler.bindControlKey(67,null);this.keyHandler.bindControlKey(86,null);mxEvent.addListener(document,"keydown",mxUtils.bind(this,function(z){var F=mxEvent.getSource(z);null==f.container||!f.isEnabled()||f.isMouseDown||f.isEditing()||null!=this.dialog||"INPUT"==F.nodeName||"TEXTAREA"==F.nodeName||224!=z.keyCode&&(mxClient.IS_MAC||17!=z.keyCode)&&(!mxClient.IS_MAC||91!=z.keyCode&&93!=z.keyCode)||l||(g.style.left=f.container.scrollLeft+10+"px",g.style.top=f.container.scrollTop+10+"px",
+f.container.appendChild(g),l=!0,g.focus(),document.execCommand("selectAll",!1,null))}));mxEvent.addListener(document,"keyup",mxUtils.bind(this,function(z){var F=z.keyCode;window.setTimeout(mxUtils.bind(this,function(){!l||224!=F&&17!=F&&91!=F&&93!=F||(l=!1,f.isEditing()||null!=this.dialog||null==f.container||f.container.focus(),g.parentNode.removeChild(g),null==this.dialog&&mxUtils.clearSelection())}),0)}));mxEvent.addListener(g,"copy",mxUtils.bind(this,function(z){if(f.isEnabled())try{mxClipboard.copy(f),
+this.copyCells(g),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"cut",mxUtils.bind(this,function(z){if(f.isEnabled())try{mxClipboard.copy(f),this.copyCells(g,!0),d()}catch(F){this.handleError(F)}}));mxEvent.addListener(g,"paste",mxUtils.bind(this,function(z){f.isEnabled()&&!f.isCellLocked(f.getDefaultParent())&&(g.innerHTML="&nbsp;",g.focus(),null!=z.clipboardData&&this.pasteCells(z,g,!0,!0),mxEvent.isConsumed(z)||window.setTimeout(mxUtils.bind(this,function(){this.pasteCells(z,g,!1,
+!0)}),0))}),!0);var q=this.isSelectionAllowed;this.isSelectionAllowed=function(z){return mxEvent.getSource(z)==g?!0:q.apply(this,arguments)}};EditorUi.prototype.setSketchMode=function(d){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetSketchMode(d);null==urlParams.rough&&(mxSettings.settings.sketchMode=d,mxSettings.save());this.fireEvent(new mxEventObject("sketchModeChanged"))}),0)};EditorUi.prototype.setPagesVisible=
+function(d){Editor.pagesVisible!=d&&(Editor.pagesVisible=d,mxSettings.settings.pagesVisible=d,mxSettings.save(),this.fireEvent(new mxEventObject("pagesVisibleChanged")))};EditorUi.prototype.setSidebarTitles=function(d,f){this.sidebar.sidebarTitles!=d&&(this.sidebar.sidebarTitles=d,this.sidebar.refresh(),this.isSettingsEnabled()&&f&&(mxSettings.settings.sidebarTitles=d,mxSettings.save()),this.fireEvent(new mxEventObject("sidebarTitlesChanged")))};EditorUi.prototype.setInlineFullscreen=function(d){Editor.inlineFullscreen!=
+d&&(Editor.inlineFullscreen=d,this.fireEvent(new mxEventObject("inlineFullscreenChanged")),(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:this.diagramContainer.getBoundingClientRect()}),"*"),window.setTimeout(mxUtils.bind(this,function(){this.refresh();this.actions.get("resetView").funct()}),10))};EditorUi.prototype.doSetSketchMode=function(d){if(Editor.sketchMode!=d){var f=function(l,q,z){null==l[q]&&(l[q]=z)},g=this.editor.graph;
+Editor.sketchMode=d;this.menus.defaultFontSize=d?20:16;g.defaultVertexStyle=mxUtils.clone(Graph.prototype.defaultVertexStyle);f(g.defaultVertexStyle,"fontSize",this.menus.defaultFontSize);g.defaultEdgeStyle=mxUtils.clone(Graph.prototype.defaultEdgeStyle);f(g.defaultEdgeStyle,"fontSize",this.menus.defaultFontSize-4);f(g.defaultEdgeStyle,"edgeStyle","none");f(g.defaultEdgeStyle,"rounded","0");f(g.defaultEdgeStyle,"curved","1");f(g.defaultEdgeStyle,"jettySize","auto");f(g.defaultEdgeStyle,"orthogonalLoop",
+"1");f(g.defaultEdgeStyle,"endArrow","open");f(g.defaultEdgeStyle,"endSize","14");f(g.defaultEdgeStyle,"startSize","14");d&&(f(g.defaultVertexStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultVertexStyle,"fontSource",Editor.sketchFontSource),f(g.defaultVertexStyle,"hachureGap","4"),f(g.defaultVertexStyle,"sketch","1"),f(g.defaultEdgeStyle,"fontFamily",Editor.sketchFontFamily),f(g.defaultEdgeStyle,"fontSource",Editor.sketchFontSource),f(g.defaultEdgeStyle,"sketch","1"),f(g.defaultEdgeStyle,"hachureGap",
+"4"),f(g.defaultEdgeStyle,"sourcePerimeterSpacing","8"),f(g.defaultEdgeStyle,"targetPerimeterSpacing","8"));g.currentVertexStyle=mxUtils.clone(g.defaultVertexStyle);g.currentEdgeStyle=mxUtils.clone(g.defaultEdgeStyle);this.clearDefaultStyle()}};EditorUi.prototype.getLinkTitle=function(d){var f=Graph.prototype.getLinkTitle.apply(this,arguments);if(Graph.isPageLink(d)){var g=d.indexOf(",");0<g&&(f=this.getPageById(d.substring(g+1)),f=null!=f?f.getName():mxResources.get("pageNotFound"))}else"data:"==
+d.substring(0,5)&&(f=mxResources.get("action"));return f};EditorUi.prototype.handleCustomLink=function(d){if(Graph.isPageLink(d)){var f=d.indexOf(",");if(d=this.getPageById(d.substring(f+1)))this.selectPage(d);else throw Error(mxResources.get("pageNotFound")||"Page not found");}else this.editor.graph.handleCustomLink(d)};EditorUi.prototype.isSettingsEnabled=function(){return"undefined"!==typeof window.mxSettings&&(isLocalStorage||mxClient.IS_CHROMEAPP)};EditorUi.prototype.installSettings=function(){if(this.isSettingsEnabled()){Editor.pagesVisible=
+mxSettings.settings.pagesVisible;ColorDialog.recentColors=mxSettings.getRecentColors();if(isLocalStorage)try{window.addEventListener("storage",mxUtils.bind(this,function(d){d.key==mxSettings.key&&(mxSettings.load(),ColorDialog.recentColors=mxSettings.getRecentColors(),this.menus.customFonts=mxSettings.getCustomFonts())}),!1)}catch(d){}this.fireEvent(new mxEventObject("styleChanged","keys",[],"values",[],"cells",[]));this.menus.customFonts=mxSettings.getCustomFonts();this.addListener("customFontsChanged",
+mxUtils.bind(this,function(d,f){"1"!=urlParams["ext-fonts"]?mxSettings.setCustomFonts(this.menus.customFonts):(d=f.getProperty("customFonts"),this.menus.customFonts=d,mxSettings.setCustomFonts(d));mxSettings.save()}));this.editor.graph.connectionHandler.setCreateTarget(mxSettings.isCreateTarget());this.fireEvent(new mxEventObject("copyConnectChanged"));this.addListener("copyConnectChanged",mxUtils.bind(this,function(d,f){mxSettings.setCreateTarget(this.editor.graph.connectionHandler.isCreateTarget());
+mxSettings.save()}));this.editor.graph.pageFormat=null!=this.editor.graph.defaultPageFormat?this.editor.graph.defaultPageFormat:mxSettings.getPageFormat();this.addListener("pageFormatChanged",mxUtils.bind(this,function(d,f){mxSettings.setPageFormat(this.editor.graph.pageFormat);mxSettings.save()}));this.editor.graph.view.gridColor=mxSettings.getGridColor(Editor.isDarkMode());this.editor.graph.view.defaultDarkGridColor=mxSettings.getGridColor(!0);this.editor.graph.view.defaultGridColor=mxSettings.getGridColor(!1);
+this.addListener("gridColorChanged",mxUtils.bind(this,function(d,f){mxSettings.setGridColor(this.editor.graph.view.gridColor,Editor.isDarkMode());mxSettings.save()}));if(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp)this.editor.addListener("autosaveChanged",mxUtils.bind(this,function(d,f){mxSettings.setAutosave(this.editor.autosave);mxSettings.save()})),this.editor.autosave=mxSettings.getAutosave();null!=this.sidebar&&(null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes?(this.sidebar.searchShapes(decodeURIComponent(urlParams["search-shapes"])),
+this.sidebar.showEntries("search")):(this.sidebar.showPalette("search",mxSettings.settings.search),this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save())));this.addListener("formatWidthChanged",function(){mxSettings.setFormatWidth(this.formatWidth);mxSettings.save()})}};EditorUi.prototype.copyImage=function(d,f,g){try{null!=navigator.clipboard&&this.spinner.spin(document.body,mxResources.get("exporting"))&&
+this.editor.exportToCanvas(mxUtils.bind(this,function(l,q){try{this.spinner.stop();var z=this.createImageDataUri(l,f,"png"),F=parseInt(q.getAttribute("width")),C=parseInt(q.getAttribute("height"));this.writeImageToClipboard(z,F,C,mxUtils.bind(this,function(I){this.handleError(I)}))}catch(I){this.handleError(I)}}),null,null,null,mxUtils.bind(this,function(l){this.spinner.stop();this.handleError(l)}),null,null,null!=g?g:4,null==this.editor.graph.background||this.editor.graph.background==mxConstants.NONE,
+null,null,null,10,null,null,!1,null,0<d.length?d:null)}catch(l){this.handleError(l)}};EditorUi.prototype.writeImageToClipboard=function(d,f,g,l){var q=this.base64ToBlob(d.substring(d.indexOf(",")+1),"image/png");d=new ClipboardItem({"image/png":q,"text/html":new Blob(['<img src="'+d+'" width="'+f+'" height="'+g+'">'],{type:"text/html"})});navigator.clipboard.write([d])["catch"](l)};EditorUi.prototype.copyCells=function(d,f){var g=this.editor.graph;if(g.isSelectionEmpty())d.innerText="";else{var l=
+mxUtils.sortCells(g.model.getTopmostCells(g.getSelectionCells())),q=mxUtils.getXml(g.encodeCells(l));mxUtils.setTextContent(d,encodeURIComponent(q));f?(g.removeCells(l,!1),g.lastPasteXml=null):(g.lastPasteXml=q,g.pasteCounter=0);d.focus();document.execCommand("selectAll",!1,null)}};EditorUi.prototype.copyXml=function(){var d=null;if(Editor.enableNativeCipboard){var f=this.editor.graph;f.isSelectionEmpty()||(d=mxUtils.sortCells(f.getExportableCells(f.model.getTopmostCells(f.getSelectionCells()))),
+f=mxUtils.getXml(f.encodeCells(d)),navigator.clipboard.writeText(f))}return d};EditorUi.prototype.pasteXml=function(d,f,g,l){var q=this.editor.graph,z=null;q.lastPasteXml==d?q.pasteCounter++:(q.lastPasteXml=d,q.pasteCounter=0);var F=q.pasteCounter*q.gridSize;if(g||this.isCompatibleString(d))z=this.importXml(d,F,F),q.setSelectionCells(z);else if(f&&1==q.getSelectionCount()){F=q.getStartEditingCell(q.getSelectionCell(),l);if(/\.(gif|jpg|jpeg|tiff|png|svg)$/i.test(d)&&"image"==q.getCurrentCellStyle(F)[mxConstants.STYLE_SHAPE])q.setCellStyles(mxConstants.STYLE_IMAGE,
+d,[F]);else{q.model.beginUpdate();try{q.labelChanged(F,d),Graph.isLink(d)&&q.setLinkForCell(F,d)}finally{q.model.endUpdate()}}q.setSelectionCell(F)}else z=q.getInsertPoint(),q.isMouseInsertPoint()&&(F=0,q.lastPasteXml==d&&0<q.pasteCounter&&q.pasteCounter--),z=this.insertTextAt(d,z.x+F,z.y+F,!0),q.setSelectionCells(z);q.isSelectionEmpty()||(q.scrollCellToVisible(q.getSelectionCell()),null!=this.hoverIcons&&this.hoverIcons.update(q.view.getState(q.getSelectionCell())));return z};EditorUi.prototype.pasteCells=
+function(d,f,g,l){if(!mxEvent.isConsumed(d)){var q=f,z=!1;if(g&&null!=d.clipboardData&&d.clipboardData.getData){var F=d.clipboardData.getData("text/plain"),C=!1;if(null!=F&&0<F.length&&"%3CmxGraphModel%3E"==F.substring(0,18))try{var I=decodeURIComponent(F);this.isCompatibleString(I)&&(C=!0,F=I)}catch(O){}C=C?null:d.clipboardData.getData("text/html");null!=C&&0<C.length?(q=this.parseHtmlData(C),z="text/plain"!=q.getAttribute("data-type")):null!=F&&0<F.length&&(q=document.createElement("div"),mxUtils.setTextContent(q,
+C))}F=q.getElementsByTagName("span");if(null!=F&&0<F.length&&"application/vnd.lucid.chart.objects"===F[0].getAttribute("data-lucid-type"))g=F[0].getAttribute("data-lucid-content"),null!=g&&0<g.length&&(this.convertLucidChart(g,mxUtils.bind(this,function(O){var la=this.editor.graph;la.lastPasteXml==O?la.pasteCounter++:(la.lastPasteXml=O,la.pasteCounter=0);var aa=la.pasteCounter*la.gridSize;la.setSelectionCells(this.importXml(O,aa,aa));la.scrollCellToVisible(la.getSelectionCell())}),mxUtils.bind(this,
+function(O){this.handleError(O)})),mxEvent.consume(d));else{var G=z?q.innerHTML:mxUtils.trim(null==q.innerText?mxUtils.getTextContent(q):q.innerText),Z=!1;try{var ca=G.lastIndexOf("%3E");0<=ca&&ca<G.length-3&&(G=G.substring(0,ca+3))}catch(O){}try{F=q.getElementsByTagName("span"),(I=null!=F&&0<F.length?mxUtils.trim(decodeURIComponent(F[0].textContent)):decodeURIComponent(G))&&(this.isCompatibleString(I)||0==I.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":'))&&(Z=!0,G=I)}catch(O){}try{if(null!=
+G&&0<G.length){if(0==G.substring(0,20).replace(/\s/g,"").indexOf('{"isProtected":')){var ba=mxUtils.bind(this,function(){try{G=(new MiroImporter).importMiroJson(JSON.parse(G)),this.pasteXml(G,l,Z,d)}catch(O){console.log("Miro import error:",O)}});"undefined"===typeof MiroImporter?mxscript("js/diagramly/miro/MiroImporter.js",ba):ba()}else this.pasteXml(G,l,Z,d);try{mxEvent.consume(d)}catch(O){}}else if(!g){var Y=this.editor.graph;Y.lastPasteXml=null;Y.pasteCounter=0}}catch(O){this.handleError(O)}}}f.innerHTML=
+"&nbsp;"};EditorUi.prototype.addFileDropHandler=function(d){if(Graph.fileSupport)for(var f=null,g=0;g<d.length;g++)mxEvent.addListener(d[g],"dragleave",function(l){null!=f&&(f.parentNode.removeChild(f),f=null);l.stopPropagation();l.preventDefault()}),mxEvent.addListener(d[g],"dragover",mxUtils.bind(this,function(l){(this.editor.graph.isEnabled()||"1"!=urlParams.embed)&&null==f&&(!mxClient.IS_IE||10<document.documentMode&&12>document.documentMode)&&(f=this.highlightElement());l.stopPropagation();l.preventDefault()})),
+mxEvent.addListener(d[g],"drop",mxUtils.bind(this,function(l){null!=f&&(f.parentNode.removeChild(f),f=null);if(this.editor.graph.isEnabled()||"1"!=urlParams.embed)if(0<l.dataTransfer.files.length)this.hideDialog(),"1"==urlParams.embed?this.importFiles(l.dataTransfer.files,0,0,this.maxImageSize,null,null,null,null,!mxEvent.isControlDown(l)&&!mxEvent.isShiftDown(l)):this.openFiles(l.dataTransfer.files,!0);else{var q=this.extractGraphModelFromEvent(l);if(null==q){var z=null!=l.dataTransfer?l.dataTransfer:
+l.clipboardData;null!=z&&(10==document.documentMode||11==document.documentMode?q=z.getData("Text"):(q=null,q=0<=mxUtils.indexOf(z.types,"text/uri-list")?l.dataTransfer.getData("text/uri-list"):0<=mxUtils.indexOf(z.types,"text/html")?z.getData("text/html"):null,null!=q&&0<q.length?(z=document.createElement("div"),z.innerHTML=this.editor.graph.sanitizeHtml(q),z=z.getElementsByTagName("img"),0<z.length&&(q=z[0].getAttribute("src"))):0<=mxUtils.indexOf(z.types,"text/plain")&&(q=z.getData("text/plain"))),
+null!=q&&(Editor.isPngDataUrl(q)?(q=Editor.extractGraphModelFromPng(q),null!=q&&0<q.length&&this.openLocalFile(q,null,!0)):this.isRemoteFileFormat(q)?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):(new mxXmlRequest(OPEN_URL,"format=xml&data="+encodeURIComponent(q))).send(mxUtils.bind(this,function(F){200<=F.getStatus()&&299>=F.getStatus()&&this.openLocalFile(F.getText(),null,!0)})):/^https?:\/\//.test(q)&&(null==this.getCurrentFile()?window.location.hash=
+"#U"+encodeURIComponent(q):window.openWindow((mxClient.IS_CHROMEAPP?EditorUi.drawHost+"/":"https://"+location.host+"/")+window.location.search+"#U"+encodeURIComponent(q)))))}else this.openLocalFile(q,null,!0)}l.stopPropagation();l.preventDefault()}))};EditorUi.prototype.highlightElement=function(d){var f=0,g=0;if(null==d){var l=document.body;var q=document.documentElement;var z=(l.clientWidth||q.clientWidth)-3;l=Math.max(l.clientHeight||0,q.clientHeight)-3}else f=d.offsetTop,g=d.offsetLeft,z=d.clientWidth,
+l=d.clientHeight;q=document.createElement("div");q.style.zIndex=mxPopupMenu.prototype.zIndex+2;q.style.border="3px dotted rgb(254, 137, 12)";q.style.pointerEvents="none";q.style.position="absolute";q.style.top=f+"px";q.style.left=g+"px";q.style.width=Math.max(0,z-3)+"px";q.style.height=Math.max(0,l-3)+"px";null!=d&&d.parentNode==this.editor.graph.container?this.editor.graph.container.appendChild(q):document.body.appendChild(q);return q};EditorUi.prototype.stringToCells=function(d){d=mxUtils.parseXml(d);
+var f=this.editor.extractGraphModel(d.documentElement);d=[];if(null!=f){var g=new mxCodec(f.ownerDocument),l=new mxGraphModel;g.decode(f,l);f=l.getChildAt(l.getRoot(),0);for(g=0;g<l.getChildCount(f);g++)d.push(l.getChildAt(f,g))}return d};EditorUi.prototype.openFileHandle=function(d,f,g,l,q){if(null!=f&&0<f.length){!this.useCanvasForExport&&/(\.png)$/i.test(f)?f=f.substring(0,f.length-4)+".drawio":/(\.pdf)$/i.test(f)&&(f=f.substring(0,f.length-4)+".drawio");var z=mxUtils.bind(this,function(C){f=0<=
+f.lastIndexOf(".")?f.substring(0,f.lastIndexOf("."))+".drawio":f+".drawio";if("<mxlibrary"==C.substring(0,10)){null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,this.defaultFilename,l);try{this.loadLibrary(new LocalLibrary(this,C,f))}catch(I){this.handleError(I,mxResources.get("errorLoadingFile"))}}else this.openLocalFile(C,f,l)});if(/(\.v(dx|sdx?))($|\?)/i.test(f)||/(\.vs(x|sx?))($|\?)/i.test(f))this.importVisio(g,mxUtils.bind(this,function(C){this.spinner.stop();
+z(C)}));else if(/(\.*<graphml )/.test(d))this.importGraphML(d,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}));else if(Graph.fileSupport&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(d,f))this.isOffline()?(this.spinner.stop(),this.showError(mxResources.get("error"),mxResources.get("notInOffline"))):this.parseFile(g,mxUtils.bind(this,function(C){4==C.readyState&&(this.spinner.stop(),200<=C.status&&299>=C.status?z(C.responseText):this.handleError({message:mxResources.get(413==C.status?
+"drawingTooLarge":"invalidOrMissingFile")},mxResources.get("errorLoadingFile")))}));else if(this.isLucidChartData(d))/(\.json)$/i.test(f)&&(f=f.substring(0,f.length-5)+".drawio"),this.convertLucidChart(d,mxUtils.bind(this,function(C){this.spinner.stop();this.openLocalFile(C,f,l)}),mxUtils.bind(this,function(C){this.spinner.stop();this.handleError(C)}));else if("<mxlibrary"==d.substring(0,10)){this.spinner.stop();null==this.getCurrentFile()&&"1"!=urlParams.embed&&this.openLocalFile(this.emptyDiagramXml,
+this.defaultFilename,l);try{this.loadLibrary(new LocalLibrary(this,d,g.name))}catch(C){this.handleError(C,mxResources.get("errorLoadingFile"))}}else if(0==d.indexOf("PK"))this.importZipFile(g,mxUtils.bind(this,function(C){this.spinner.stop();z(C)}),mxUtils.bind(this,function(){this.spinner.stop();this.openLocalFile(d,f,l)}));else{if("image/png"==g.type.substring(0,9))d=this.extractGraphModelFromPng(d);else if("application/pdf"==g.type){var F=Editor.extractGraphModelFromPdf(d);null!=F&&(q=null,l=!0,
+d=F)}this.spinner.stop();this.openLocalFile(d,f,l,q,null!=q?g:null)}}};EditorUi.prototype.openFiles=function(d,f){if(this.spinner.spin(document.body,mxResources.get("loading")))for(var g=0;g<d.length;g++)mxUtils.bind(this,function(l){var q=new FileReader;q.onload=mxUtils.bind(this,function(z){try{this.openFileHandle(z.target.result,l.name,l,f)}catch(F){this.handleError(F)}});q.onerror=mxUtils.bind(this,function(z){this.spinner.stop();this.handleError(z);window.openFile=null});"image"!==l.type.substring(0,
+5)&&"application/pdf"!==l.type||"image/svg"===l.type.substring(0,9)?q.readAsText(l):q.readAsDataURL(l)})(d[g])};EditorUi.prototype.openLocalFile=function(d,f,g,l,q){var z=this.getCurrentFile(),F=mxUtils.bind(this,function(){window.openFile=null;if(null==f&&null!=this.getCurrentFile()&&this.isDiagramEmpty()){var C=mxUtils.parseXml(d);null!=C&&(this.editor.setGraphXml(C.documentElement),this.editor.graph.selectAll())}else this.fileLoaded(new LocalFile(this,d,f||this.defaultFilename,g,l,q))});if(null!=
+d&&0<d.length)null==z||!z.isModified()&&(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=l)?F():(mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||null!=l)&&null!=z&&z.isModified()?this.confirm(mxResources.get("allChangesLost"),null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):(window.openFile=new OpenFile(function(){window.openFile=null}),window.openFile.setData(d,f),window.openWindow(this.getUrl(),null,mxUtils.bind(this,function(){null!=z&&z.isModified()?this.confirm(mxResources.get("allChangesLost"),
+null,F,mxResources.get("cancel"),mxResources.get("discardChanges")):F()})));else throw Error(mxResources.get("notADiagramFile"));};EditorUi.prototype.getBasenames=function(){var d={};if(null!=this.pages)for(var f=0;f<this.pages.length;f++)this.updatePageRoot(this.pages[f]),this.addBasenamesForCell(this.pages[f].root,d);else this.addBasenamesForCell(this.editor.graph.model.getRoot(),d);f=[];for(var g in d)f.push(g);return f};EditorUi.prototype.addBasenamesForCell=function(d,f){function g(F){if(null!=
+F){var C=F.lastIndexOf(".");0<C&&(F=F.substring(C+1,F.length));null==f[F]&&(f[F]=!0)}}var l=this.editor.graph,q=l.getCellStyle(d);g(mxStencilRegistry.getBasenameForStencil(q[mxConstants.STYLE_SHAPE]));l.model.isEdge(d)&&(g(mxMarker.getPackageForType(q[mxConstants.STYLE_STARTARROW])),g(mxMarker.getPackageForType(q[mxConstants.STYLE_ENDARROW])));q=l.model.getChildCount(d);for(var z=0;z<q;z++)this.addBasenamesForCell(l.model.getChildAt(d,z),f)};EditorUi.prototype.setGraphEnabled=function(d){this.diagramContainer.style.visibility=
+d?"":"hidden";this.formatContainer.style.visibility=d?"":"hidden";this.sidebarFooterContainer.style.display=d?"":"none";this.sidebarContainer.style.display=d?"":"none";this.hsplit.style.display=d?"":"none";this.editor.graph.setEnabled(d);null!=this.ruler&&(this.ruler.hRuler.container.style.visibility=d?"":"hidden",this.ruler.vRuler.container.style.visibility=d?"":"hidden");null!=this.tabContainer&&(this.tabContainer.style.visibility=d?"":"hidden");d||(null!=this.actions.outlineWindow&&this.actions.outlineWindow.window.setVisible(!1),
+null!=this.actions.layersWindow&&this.actions.layersWindow.window.setVisible(!1),null!=this.menus.tagsWindow&&this.menus.tagsWindow.window.setVisible(!1),null!=this.menus.findWindow&&this.menus.findWindow.window.setVisible(!1),null!=this.menus.findReplaceWindow&&this.menus.findReplaceWindow.window.setVisible(!1))};EditorUi.prototype.initializeEmbedMode=function(){this.setGraphEnabled(!1);if((window.opener||window.parent)!=window&&("1"!=urlParams.spin||this.spinner.spin(document.body,mxResources.get("loading")))){var d=
+!1;this.installMessageHandler(mxUtils.bind(this,function(f,g,l,q){d||(d=!0,this.spinner.stop(),this.addEmbedButtons(),this.setGraphEnabled(!0));if(null==f||0==f.length)f=this.emptyDiagramXml;this.setCurrentFile(new EmbedFile(this,f,{}));this.mode=App.MODE_EMBED;this.setFileData(f);if(q)try{var z=this.editor.graph;z.setGridEnabled(!1);z.pageVisible=!1;var F=z.model.cells,C;for(C in F){var I=F[C];null!=I&&null!=I.style&&(I.style+=";sketch=1;"+(-1==I.style.indexOf("fontFamily=")||-1<I.style.indexOf("fontFamily=Helvetica;")?
+"fontFamily=Architects Daughter;fontSource=https%3A%2F%2Ffonts.googleapis.com%2Fcss%3Ffamily%3DArchitects%2BDaughter;":""))}}catch(G){console.log(G)}this.editor.isChromelessView()?this.editor.graph.isLightboxView()&&this.lightboxFit():this.showLayersDialog();this.chromelessResize&&this.chromelessResize();this.editor.undoManager.clear();this.editor.modified=null!=l?l:!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(d,f){null!=d?d.getPublicUrl(f):f(null)};EditorUi.prototype.createLoadMessage=function(d){var f=this.editor.graph;return{event:d,pageVisible:f.pageVisible,translate:f.view.translate,bounds:f.getGraphBounds(),currentPage:this.getSelectedPageIndex(),
+scale:f.view.scale,page:f.view.getBackgroundPageBounds()}};EditorUi.prototype.sendEmbeddedSvgExport=function(d){var f=this.editor.graph;f.isEditing()&&f.stopEditing(!f.isInvokesStopCellEditing());var g=window.opener||window.parent;if(this.editor.modified){var l=f.background;if(null==l||l==mxConstants.NONE)l=this.embedExportBackground;this.getEmbeddedSvg(this.getFileData(!0,null,null,null,null,null,null,null,null,!1),f,null,!0,mxUtils.bind(this,function(q){g.postMessage(JSON.stringify({event:"export",
+point:this.embedExitPoint,exit:null!=d?!d:!0,data:Editor.createSvgDataUri(q)}),"*")}),null,null,!0,l,1,this.embedExportBorder)}else d||g.postMessage(JSON.stringify({event:"exit",point:this.embedExitPoint}),"*");d||(this.diagramContainer.removeAttribute("data-bounds"),Editor.inlineFullscreen=!1,f.model.clear(),this.editor.undoManager.clear(),this.setBackgroundImage(null),this.editor.modified=!1,"1"!=urlParams.embed&&this.fireEvent(new mxEventObject("editInlineStop")))};EditorUi.prototype.installMessageHandler=
+function(d){var f=null,g=!1,l=!1,q=null,z=mxUtils.bind(this,function(I,G){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,z);mxEvent.addListener(window,"message",mxUtils.bind(this,function(I){if(I.source==(window.opener||window.parent)){var G=I.data,Z=null,ca=mxUtils.bind(this,function(fa){if(null!=fa&&"function"===
+typeof fa.charAt&&"<"!=fa.charAt(0))try{Editor.isPngDataUrl(fa)?fa=Editor.extractGraphModelFromPng(fa):"data:image/svg+xml;base64,"==fa.substring(0,26)?fa=atob(fa.substring(26)):"data:image/svg+xml;utf8,"==fa.substring(0,24)&&(fa=fa.substring(24)),null!=fa&&("%"==fa.charAt(0)?fa=decodeURIComponent(fa):"<"!=fa.charAt(0)&&(fa=Graph.decompress(fa)))}catch(pa){}return fa});if("json"==urlParams.proto){var ba=!1;try{G=JSON.parse(G),EditorUi.debug("EditorUi.installMessageHandler",[this],"evt",[I],"data",
+[G])}catch(fa){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.executeLayouts(this.editor.graph.createLayouts(G.layouts));return}if("prompt"==G.action){this.spinner.stop();var Y=new FilenameDialog(this,G.defaultValue||"",null!=
+G.okKey?mxResources.get(G.okKey):G.ok,function(fa){null!=fa?F.postMessage(JSON.stringify({event:"prompt",value:fa,message:G}),"*"):F.postMessage(JSON.stringify({event:"prompt-cancel",message:G}),"*")},null!=G.titleKey?mxResources.get(G.titleKey):G.title);this.showDialog(Y.container,300,80,!0,!1);Y.init();return}if("draft"==G.action){var O=ca(G.xml);this.spinner.stop();Y=new DraftDialog(this,mxResources.get("draftFound",[G.name||this.defaultFilename]),O,mxUtils.bind(this,function(){this.hideDialog();
+F.postMessage(JSON.stringify({event:"draft",result:"edit",message:G}),"*")}),mxUtils.bind(this,function(){this.hideDialog();F.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();F.postMessage(JSON.stringify({event:"draft",result:"ignore",message:G}),"*")}):null);this.showDialog(Y.container,640,480,!0,!1,mxUtils.bind(this,function(fa){fa&&
+this.actions.get("exit").funct()}));try{Y.init()}catch(fa){F.postMessage(JSON.stringify({event:"draft",error:fa.toString(),message:G}),"*")}return}if("template"==G.action){this.spinner.stop();var la=1==G.enableRecent,aa=1==G.enableSearch,ia=1==G.enableCustomTemp;if("1"==urlParams.newTempDlg&&!G.templatesOnly&&null!=G.callback){var X=this.getCurrentUser(),R=new TemplatesDialog(this,function(fa,pa,ua){fa=fa||this.emptyDiagramXml;F.postMessage(JSON.stringify({event:"template",xml:fa,blank:fa==this.emptyDiagramXml,
+name:pa,tempUrl:ua.url,libs:ua.libs,builtIn:null!=ua.info&&null!=ua.info.custContentId,message:G}),"*")},mxUtils.bind(this,function(){this.actions.get("exit").funct()}),null,null,null!=X?X.id:null,la?mxUtils.bind(this,function(fa,pa,ua){this.remoteInvoke("getRecentDiagrams",[ua],null,fa,pa)}):null,aa?mxUtils.bind(this,function(fa,pa,ua,qa){this.remoteInvoke("searchDiagrams",[fa,qa],null,pa,ua)}):null,mxUtils.bind(this,function(fa,pa,ua){this.remoteInvoke("getFileContent",[fa.url],null,pa,ua)}),null,
+ia?mxUtils.bind(this,function(fa){this.remoteInvoke("getCustomTemplates",null,null,fa,function(){fa({},0)})}):null,!1,!1,!0,!0);this.showDialog(R.container,window.innerWidth,window.innerHeight,!0,!1,null,!1,!0);return}Y=new NewDialog(this,!1,G.templatesOnly?!1:null!=G.callback,mxUtils.bind(this,function(fa,pa,ua,qa){fa=fa||this.emptyDiagramXml;null!=G.callback?F.postMessage(JSON.stringify({event:"template",xml:fa,blank:fa==this.emptyDiagramXml,name:pa,tempUrl:ua,libs:qa,builtIn:!0,message:G}),"*"):
+(d(fa,I,fa!=this.emptyDiagramXml,G.toSketch),this.editor.modified||this.editor.setStatus(""))}),null,null,null,null,null,null,null,la?mxUtils.bind(this,function(fa){this.remoteInvoke("getRecentDiagrams",[null],null,fa,function(){fa(null,"Network Error!")})}):null,aa?mxUtils.bind(this,function(fa,pa){this.remoteInvoke("searchDiagrams",[fa,null],null,pa,function(){pa(null,"Network Error!")})}):null,mxUtils.bind(this,function(fa,pa,ua){F.postMessage(JSON.stringify({event:"template",docUrl:fa,info:pa,
+name:ua}),"*")}),null,null,ia?mxUtils.bind(this,function(fa){this.remoteInvoke("getCustomTemplates",null,null,fa,function(){fa({},0)})}):null,1==G.withoutType);this.showDialog(Y.container,620,460,!0,!1,mxUtils.bind(this,function(fa){this.sidebar.hideTooltip();fa&&this.actions.get("exit").funct()}));Y.init();return}if("textContent"==G.action){var sa=this.getDiagramTextContent();F.postMessage(JSON.stringify({event:"textContent",data:sa,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 M=null!=G.messageKey?mxResources.get(G.messageKey):G.message;null==G.show||G.show?this.spinner.spin(document.body,M):this.spinner.stop();return}if("exit"==G.action){this.actions.get("exit").funct();return}if("viewport"==G.action){null!=G.viewport&&(this.embedViewport=
+G.viewport);return}if("snapshot"==G.action){this.sendEmbeddedSvgExport(!0);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 ka=null!=G.xml?G.xml:this.getFileData(!0);this.editor.graph.setEnabled(!1);var L=this.editor.graph,S=mxUtils.bind(this,function(fa){this.editor.graph.setEnabled(!0);this.spinner.stop();var pa=this.createLoadMessage("export");pa.format=
+G.format;pa.message=G;pa.data=fa;pa.xml=ka;F.postMessage(JSON.stringify(pa),"*")}),ja=mxUtils.bind(this,function(fa){null==fa&&(fa=Editor.blankImage);"xmlpng"==G.format&&(fa=Editor.writeGraphModelToPng(fa,"tEXt","mxfile",encodeURIComponent(ka)));L!=this.editor.graph&&L.container.parentNode.removeChild(L.container);S(fa)}),ma=G.pageId||(null!=this.pages?G.currentPage?this.currentPage.getId():this.pages[0].getId():null);if(this.isExportToCanvas()){var u=mxUtils.bind(this,function(){if(null!=this.pages&&
+this.currentPage.getId()!=ma){var fa=L.getGlobalVariable;L=this.createTemporaryGraph(L.getStylesheet());for(var pa,ua=0;ua<this.pages.length;ua++)if(this.pages[ua].getId()==ma){pa=this.updatePageRoot(this.pages[ua]);break}null==pa&&(pa=this.currentPage);L.getGlobalVariable=function(Fa){return"page"==Fa?pa.getName():"pagenumber"==Fa?1:fa.apply(this,arguments)};document.body.appendChild(L.container);L.model.setRoot(pa.root)}if(null!=G.layerIds){var qa=L.model,Da=qa.getChildCells(qa.getRoot()),Aa={};
+for(ua=0;ua<G.layerIds.length;ua++)Aa[G.layerIds[ua]]=!0;for(ua=0;ua<Da.length;ua++)qa.setVisible(Da[ua],Aa[Da[ua].id]||!1)}this.editor.exportToCanvas(mxUtils.bind(this,function(Fa){ja(Fa.toDataURL("image/png"))}),G.width,null,G.background,mxUtils.bind(this,function(){ja(null)}),null,null,G.scale,G.transparent,G.shadow,null,L,G.border,null,G.grid,G.keepTheme)});null!=G.xml&&0<G.xml.length&&(g=!0,this.setFileData(ka),g=!1);u()}else(new mxXmlRequest(EXPORT_URL,"format=png&embedXml="+("xmlpng"==G.format?
+"1":"0")+(null!=ma?"&pageId="+ma:"")+(null!=G.layerIds&&0<G.layerIds.length?"&extras="+encodeURIComponent(JSON.stringify({layerIds:G.layerIds})):"")+(null!=G.scale?"&scale="+G.scale:"")+"&base64=1&xml="+encodeURIComponent(ka))).send(mxUtils.bind(this,function(fa){200<=fa.getStatus()&&299>=fa.getStatus()?S("data:image/png;base64,"+fa.getText()):ja(null)}),mxUtils.bind(this,function(){ja(null)}))}}else if(u=mxUtils.bind(this,function(){var fa=this.createLoadMessage("export");fa.message=G;if("html2"==
+G.format||"html"==G.format&&("0"!=urlParams.pages||null!=this.pages&&1<this.pages.length)){var pa=this.getXmlFileData();fa.xml=mxUtils.getXml(pa);fa.data=this.getFileData(null,null,!0,null,null,null,pa);fa.format=G.format}else if("html"==G.format)pa=this.editor.getGraphXml(),fa.data=this.getHtml(pa,this.editor.graph),fa.xml=mxUtils.getXml(pa),fa.format=G.format;else{mxSvgCanvas2D.prototype.foAltText=null;pa=null!=G.background?G.background:this.editor.graph.background;pa==mxConstants.NONE&&(pa=null);
+fa.xml=this.getFileData(!0,null,null,null,null,null,null,null,null,!1);fa.format="svg";var ua=mxUtils.bind(this,function(qa){this.editor.graph.setEnabled(!0);this.spinner.stop();fa.data=Editor.createSvgDataUri(qa);F.postMessage(JSON.stringify(fa),"*")});if("xmlsvg"==G.format)(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))&&this.getEmbeddedSvg(fa.xml,this.editor.graph,null,!0,ua,null,null,G.embedImages,pa,G.scale,G.border,G.shadow,
+G.keepTheme);else if(null==G.spin&&null==G.spinKey||this.spinner.spin(document.body,null!=G.spinKey?mxResources.get(G.spinKey):G.spin))this.editor.graph.setEnabled(!1),pa=this.editor.graph.getSvg(pa,G.scale,G.border,null,null,null,null,null,null,this.editor.graph.shadowVisible||G.shadow,null,G.keepTheme),(this.editor.graph.shadowVisible||G.shadow)&&this.editor.graph.addSvgShadow(pa),this.embedFonts(pa,mxUtils.bind(this,function(qa){G.embedImages||null==G.embedImages?this.editor.convertImages(qa,mxUtils.bind(this,
+function(Da){ua(mxUtils.getXml(Da))})):ua(mxUtils.getXml(qa))}));return}F.postMessage(JSON.stringify(fa),"*")}),null!=G.xml&&0<G.xml.length){if(this.editor.graph.mathEnabled){var H=Editor.onMathJaxDone;Editor.onMathJaxDone=function(){H.apply(this,arguments);u()}}g=!0;this.setFileData(G.xml);g=!1;this.editor.graph.mathEnabled||u()}else u();return}if("load"==G.action){ba=G.toSketch;l=1==G.autosave;this.hideDialog();null!=G.modified&&null==urlParams.modified&&(urlParams.modified=G.modified);null!=G.saveAndExit&&
+null==urlParams.saveAndExit&&(urlParams.saveAndExit=G.saveAndExit);null!=G.noSaveBtn&&null==urlParams.noSaveBtn&&(urlParams.noSaveBtn=G.noSaveBtn);if(null!=G.rough){var P=Editor.sketchMode;this.doSetSketchMode(G.rough);P!=Editor.sketchMode&&this.fireEvent(new mxEventObject("sketchModeChanged"))}null!=G.dark&&(P=Editor.darkMode,this.doSetDarkMode(G.dark),P!=Editor.darkMode&&this.fireEvent(new mxEventObject("darkModeChanged")));null!=G.border&&(this.embedExportBorder=G.border);null!=G.background&&(this.embedExportBackground=
+G.background);null!=G.viewport&&(this.embedViewport=G.viewport);this.embedExitPoint=null;if(null!=G.rect){var V=this.embedExportBorder;this.diagramContainer.style.border="2px solid #295fcc";this.diagramContainer.style.top=G.rect.top+"px";this.diagramContainer.style.left=G.rect.left+"px";this.diagramContainer.style.height=G.rect.height+"px";this.diagramContainer.style.width=G.rect.width+"px";this.diagramContainer.style.bottom="";this.diagramContainer.style.right="";Z=mxUtils.bind(this,function(){var fa=
+this.editor.graph,pa=fa.maxFitScale;fa.maxFitScale=G.maxFitScale;fa.fit(2*V);fa.maxFitScale=pa;fa.container.scrollTop-=2*V;fa.container.scrollLeft-=2*V;this.fireEvent(new mxEventObject("editInlineStart","data",[G]))})}null!=G.noExitBtn&&null==urlParams.noExitBtn&&(urlParams.noExitBtn=G.noExitBtn);null!=G.title&&null!=this.buttonContainer&&(O=document.createElement("span"),mxUtils.write(O,G.title),null!=this.embedFilenameSpan&&this.embedFilenameSpan.parentNode.removeChild(this.embedFilenameSpan),this.buttonContainer.appendChild(O),
+this.embedFilenameSpan=O);try{G.libs&&this.sidebar.showEntries(G.libs)}catch(fa){}G=null!=G.xmlpng?this.extractGraphModelFromPng(G.xmlpng):null!=G.descriptor?G.descriptor:G.xml}else{if("merge"==G.action){var Q=this.getCurrentFile();null!=Q&&(O=ca(G.xml),null!=O&&""!=O&&Q.mergeFile(new LocalFile(this,O),function(){F.postMessage(JSON.stringify({event:"merge",message:G}),"*")},function(fa){F.postMessage(JSON.stringify({event:"merge",message:G,error:fa}),"*")}))}else"remoteInvokeReady"==G.action?this.handleRemoteInvokeReady(F):
+"remoteInvoke"==G.action?this.handleRemoteInvoke(G,I.origin):"remoteInvokeResponse"==G.action?this.handleRemoteInvokeResponse(G):F.postMessage(JSON.stringify({error:"unknownMessage",data:JSON.stringify(G)}),"*");return}}catch(fa){this.handleError(fa)}}var da=mxUtils.bind(this,function(){return"0"!=urlParams.pages||null!=this.pages&&1<this.pages.length?this.getFileData(!0):mxUtils.getXml(this.editor.getGraphXml())}),ea=mxUtils.bind(this,function(fa,pa){g=!0;try{d(fa,pa,null,ba)}catch(ua){this.handleError(ua)}g=
+!1;null!=urlParams.modified&&this.editor.setStatus("");q=da();l&&null==f&&(f=mxUtils.bind(this,function(ua,qa){ua=da();ua==q||g||(qa=this.createLoadMessage("autosave"),qa.xml=ua,(window.opener||window.parent).postMessage(JSON.stringify(qa),"*"));q=ua}),this.editor.graph.model.addListener(mxEvent.CHANGE,f),this.editor.graph.addListener("gridSizeChanged",f),this.editor.graph.addListener("shadowVisibleChanged",f),this.addListener("pageFormatChanged",f),this.addListener("pageScaleChanged",f),this.addListener("backgroundColorChanged",
+f),this.addListener("backgroundImageChanged",f),this.addListener("foldingEnabledChanged",f),this.addListener("mathEnabledChanged",f),this.addListener("gridEnabledChanged",f),this.addListener("guidesEnabledChanged",f),this.addListener("pageViewChanged",f));if("1"==urlParams.returnbounds||"json"==urlParams.proto)pa=this.createLoadMessage("load"),pa.xml=fa,F.postMessage(JSON.stringify(pa),"*");null!=Z&&Z()});null!=G&&"function"===typeof G.substring&&"data:application/vnd.visio;base64,"==G.substring(0,
+34)?(ca="0M8R4KGxGuE"==G.substring(34,45)?"raw.vsd":"raw.vsdx",this.importVisio(this.base64ToBlob(G.substring(G.indexOf(",")+1)),function(fa){ea(fa,I)},mxUtils.bind(this,function(fa){this.handleError(fa)}),ca)):null!=G&&"function"===typeof G.substring&&(new XMLHttpRequest).upload&&this.isRemoteFileFormat(G,"")?this.isOffline()?this.showError(mxResources.get("error"),mxResources.get("notInOffline")):this.parseFileData(G,mxUtils.bind(this,function(fa){4==fa.readyState&&200<=fa.status&&299>=fa.status&&
+"<mxGraphModel"==fa.responseText.substring(0,13)&&ea(fa.responseText,I)}),""):null!=G&&"function"===typeof G.substring&&this.isLucidChartData(G)?this.convertLucidChart(G,mxUtils.bind(this,function(fa){ea(fa)}),mxUtils.bind(this,function(fa){this.handleError(fa)})):null==G||"object"!==typeof G||null==G.format||null==G.data&&null==G.url?(G=ca(G),ea(G,I)):this.loadDescriptor(G,mxUtils.bind(this,function(fa){ea(da(),I)}),mxUtils.bind(this,function(fa){this.handleError(fa,mxResources.get("errorLoadingFile"))}))}}));
+var F=window.opener||window.parent;z="json"==urlParams.proto?JSON.stringify({event:"init"}):urlParams.ready||"ready";F.postMessage(z,"*");if("json"==urlParams.proto){var C=this.editor.graph.openLink;this.editor.graph.openLink=function(I,G,Z){C.apply(this,arguments);F.postMessage(JSON.stringify({event:"openLink",href:I,target:G,allowOpener:Z}),"*")}}};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.menubar&&"1"!=urlParams.embedInline){var d=document.createElement("div");d.style.display=
+"inline-block";d.style.position="absolute";d.style.paddingTop="atlas"==uiTheme||"1"==urlParams.atlas?"2px":"0px";d.style.paddingLeft="8px";d.style.paddingBottom="2px";var f=document.createElement("button");f.className="geBigButton";var g=f;if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var l="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(f,l);f.setAttribute("title",l);mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));
+d.appendChild(f)}}else mxUtils.write(f,mxResources.get("save")),f.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),d.appendChild(f),"1"==urlParams.saveAndExit&&(f=document.createElement("a"),mxUtils.write(f,mxResources.get("saveAndExit")),f.setAttribute("title",mxResources.get("saveAndExit")),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,
+"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),d.appendChild(f),g=f);"1"!=urlParams.noExitBtn&&(f=document.createElement("a"),g="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(f,g),f.setAttribute("title",g),f.className="geBigButton geBigStandardButton",f.style.marginLeft="6px",mxEvent.addListener(f,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),d.appendChild(f),g=f);g.style.marginRight="20px";this.toolbar.container.appendChild(d);
+this.toolbar.staticElements.push(d);d.style.right="atlas"==uiTheme||"1"==urlParams.atlas?"42px":"52px"}};EditorUi.prototype.showImportCsvDialog=function(){null==this.importCsvDialog&&(this.importCsvDialog=new TextareaDialog(this,mxResources.get("csv")+":",Editor.defaultCsvValue,mxUtils.bind(this,function(d){this.importCsv(d)}),null,null,620,430,null,!0,!0,mxResources.get("import"),this.isOffline()?null:"https://drawio-app.com/import-from-csv-to-drawio/"));this.showDialog(this.importCsvDialog.container,
+640,520,!0,!0,null,null,null,null,!0);this.importCsvDialog.init()};EditorUi.prototype.loadOrgChartLayouts=function(d){var f=mxUtils.bind(this,function(){this.loadingOrgChart=!1;this.spinner.stop();d()});"undefined"!==typeof mxOrgChartLayout||this.loadingOrgChart||this.isOffline(!0)?f():this.spinner.spin(document.body,mxResources.get("loading"))&&(this.loadingOrgChart=!0,"1"==urlParams.dev?mxscript("js/orgchart/bridge.min.js",function(){mxscript("js/orgchart/bridge.collections.min.js",function(){mxscript("js/orgchart/OrgChart.Layout.min.js",
+function(){mxscript("js/orgchart/mxOrgChartLayout.js",f)})})}):mxscript(DRAWIO_BASE_URL+"/js/orgchart.min.js",f))};EditorUi.prototype.importCsv=function(d,f){this.loadOrgChartLayouts(mxUtils.bind(this,function(){this.doImportCsv(d,f)}))};EditorUi.prototype.doImportCsv=function(d,f){try{var g=d.split("\n"),l=[],q=[],z=[],F={};if(0<g.length){var C={},I=this.editor.graph,G=null,Z=null,ca=null,ba=null,Y=null,O=null,la=null,aa="whiteSpace=wrap;html=1;",ia=null,X=null,R="",sa="auto",M="auto",ka=!1,L=null,
+S=null,ja=40,ma=40,u=100,H=0,P=function(){null!=f?f(wa):(I.setSelectionCells(wa),I.scrollCellToVisible(I.getSelectionCell()))},V=I.getFreeInsertPoint(),Q=V.x,da=V.y;V=da;var ea=null,fa="auto";X=null;for(var pa=[],ua=null,qa=null,Da=0;Da<g.length&&"#"==g[Da].charAt(0);){d=g[Da].replace(/\r$/,"");for(Da++;Da<g.length&&"\\"==d.charAt(d.length-1)&&"#"==g[Da].charAt(0);)d=d.substring(0,d.length-1)+mxUtils.trim(g[Da].substring(1)),Da++;if("#"!=d.charAt(1)){var Aa=d.indexOf(":");if(0<Aa){var Fa=mxUtils.trim(d.substring(1,
+Aa)),ta=mxUtils.trim(d.substring(Aa+1));"label"==Fa?ea=I.sanitizeHtml(ta):"labelname"==Fa&&0<ta.length&&"-"!=ta?Y=ta:"labels"==Fa&&0<ta.length&&"-"!=ta?la=JSON.parse(ta):"style"==Fa?Z=ta:"parentstyle"==Fa?aa=ta:"unknownStyle"==Fa&&"-"!=ta?O=ta:"stylename"==Fa&&0<ta.length&&"-"!=ta?ba=ta:"styles"==Fa&&0<ta.length&&"-"!=ta?ca=JSON.parse(ta):"vars"==Fa&&0<ta.length&&"-"!=ta?G=JSON.parse(ta):"identity"==Fa&&0<ta.length&&"-"!=ta?ia=ta:"parent"==Fa&&0<ta.length&&"-"!=ta?X=ta:"namespace"==Fa&&0<ta.length&&
+"-"!=ta?R=ta:"width"==Fa?sa=ta:"height"==Fa?M=ta:"collapsed"==Fa&&"-"!=ta?ka="true"==ta:"left"==Fa&&0<ta.length?L=ta:"top"==Fa&&0<ta.length?S=ta:"ignore"==Fa?qa=ta.split(","):"connect"==Fa?pa.push(JSON.parse(ta)):"link"==Fa?ua=ta:"padding"==Fa?H=parseFloat(ta):"edgespacing"==Fa?ja=parseFloat(ta):"nodespacing"==Fa?ma=parseFloat(ta):"levelspacing"==Fa?u=parseFloat(ta):"layout"==Fa&&(fa=ta)}}}if(null==g[Da])throw Error(mxResources.get("invalidOrMissingFile"));var Sa=this.editor.csvToArray(g[Da].replace(/\r$/,
+""));Aa=d=null;Fa=[];for(ta=0;ta<Sa.length;ta++)ia==Sa[ta]&&(d=ta),X==Sa[ta]&&(Aa=ta),Fa.push(mxUtils.trim(Sa[ta]).replace(/[^a-z0-9]+/ig,"_").replace(/^\d+/,"").replace(/_+$/,""));null==ea&&(ea="%"+Fa[0]+"%");if(null!=pa)for(var Ra=0;Ra<pa.length;Ra++)null==C[pa[Ra].to]&&(C[pa[Ra].to]={});ia=[];for(ta=Da+1;ta<g.length;ta++){var Oa=this.editor.csvToArray(g[ta].replace(/\r$/,""));if(null==Oa){var Va=40<g[ta].length?g[ta].substring(0,40)+"...":g[ta];throw Error(Va+" ("+ta+"):\n"+mxResources.get("containsValidationErrors"));
+}0<Oa.length&&ia.push(Oa)}I.model.beginUpdate();try{for(ta=0;ta<ia.length;ta++){Oa=ia[ta];var Ja=null,cb=null!=d?R+Oa[d]:null;g=!1;null!=cb&&(Ja=I.model.getCell(cb),g=null==Ja||0<=mxUtils.indexOf(l,Ja));var $a=new mxCell(ea,new mxGeometry(Q,V,0,0),Z||"whiteSpace=wrap;html=1;");$a.collapsed=ka;$a.vertex=!0;$a.id=cb;null==Ja||g||I.model.setCollapsed(Ja,ka);for(var y=0;y<Oa.length;y++)I.setAttributeForCell($a,Fa[y],Oa[y]),null==Ja||g||I.setAttributeForCell(Ja,Fa[y],Oa[y]);if(null!=Y&&null!=la){var K=
+la[$a.getAttribute(Y)];null!=K&&(I.labelChanged($a,K),null==Ja||g||I.cellLabelChanged(Ja,K))}if(null!=ba&&null!=ca){var N=ca[$a.getAttribute(ba)];null!=N&&($a.style=N)}I.setAttributeForCell($a,"placeholders","1");$a.style=I.replacePlaceholders($a,$a.style,G);null==Ja||g?I.fireEvent(new mxEventObject("cellsInserted","cells",[$a])):(I.model.setStyle(Ja,$a.style),0>mxUtils.indexOf(z,Ja)&&z.push(Ja),I.fireEvent(new mxEventObject("cellsInserted","cells",[Ja])));g=null!=Ja;Ja=$a;if(!g)for(Ra=0;Ra<pa.length;Ra++)C[pa[Ra].to][Ja.getAttribute(pa[Ra].to)]=
+Ja;null!=ua&&"link"!=ua&&(I.setLinkForCell(Ja,Ja.getAttribute(ua)),I.setAttributeForCell(Ja,ua,null));var T=this.editor.graph.getPreferredSizeForCell(Ja);X=null!=Aa?I.model.getCell(R+Oa[Aa]):null;if(Ja.vertex){Va=null!=X?0:Q;Da=null!=X?0:da;null!=L&&null!=Ja.getAttribute(L)&&(Ja.geometry.x=Va+parseFloat(Ja.getAttribute(L)));null!=S&&null!=Ja.getAttribute(S)&&(Ja.geometry.y=Da+parseFloat(Ja.getAttribute(S)));var U="@"==sa.charAt(0)?Ja.getAttribute(sa.substring(1)):null;Ja.geometry.width=null!=U&&"auto"!=
+U?parseFloat(Ja.getAttribute(sa.substring(1))):"auto"==sa||"auto"==U?T.width+H:parseFloat(sa);var W="@"==M.charAt(0)?Ja.getAttribute(M.substring(1)):null;Ja.geometry.height=null!=W&&"auto"!=W?parseFloat(W):"auto"==M||"auto"==W?T.height+H:parseFloat(M);V+=Ja.geometry.height+ma}g?(null==F[cb]&&(F[cb]=[]),F[cb].push(Ja)):(l.push(Ja),null!=X?(X.style=I.replacePlaceholders(X,aa,G),I.addCell(Ja,X),q.push(X)):z.push(I.addCell(Ja)))}for(ta=0;ta<q.length;ta++)U="@"==sa.charAt(0)?q[ta].getAttribute(sa.substring(1)):
+null,W="@"==M.charAt(0)?q[ta].getAttribute(M.substring(1)):null,"auto"!=sa&&"auto"!=U||"auto"!=M&&"auto"!=W||I.updateGroupBounds([q[ta]],H,!0);var na=z.slice(),wa=z.slice();for(Ra=0;Ra<pa.length;Ra++){var ra=pa[Ra];for(ta=0;ta<l.length;ta++){Ja=l[ta];var xa=mxUtils.bind(this,function(bb,jb,eb){var qb=jb.getAttribute(eb.from);if(null!=qb&&""!=qb){qb=qb.split(",");for(var ub=0;ub<qb.length;ub++){var Ya=C[eb.to][qb[ub]];if(null==Ya&&null!=O){Ya=new mxCell(qb[ub],new mxGeometry(Q,da,0,0),O);Ya.style=
+I.replacePlaceholders(jb,Ya.style,G);var ab=this.editor.graph.getPreferredSizeForCell(Ya);Ya.geometry.width=ab.width+H;Ya.geometry.height=ab.height+H;C[eb.to][qb[ub]]=Ya;Ya.vertex=!0;Ya.id=qb[ub];z.push(I.addCell(Ya))}if(null!=Ya){ab=eb.label;null!=eb.fromlabel&&(ab=(jb.getAttribute(eb.fromlabel)||"")+(ab||""));null!=eb.sourcelabel&&(ab=I.replacePlaceholders(jb,eb.sourcelabel,G)+(ab||""));null!=eb.tolabel&&(ab=(ab||"")+(Ya.getAttribute(eb.tolabel)||""));null!=eb.targetlabel&&(ab=(ab||"")+I.replacePlaceholders(Ya,
+eb.targetlabel,G));var kb="target"==eb.placeholders==!eb.invert?Ya:bb;kb=null!=eb.style?I.replacePlaceholders(kb,eb.style,G):I.createCurrentEdgeStyle();ab=I.insertEdge(null,null,ab||"",eb.invert?Ya:bb,eb.invert?bb:Ya,kb);if(null!=eb.labels)for(kb=0;kb<eb.labels.length;kb++){var hb=eb.labels[kb],ob=new mxCell(hb.label||kb,new mxGeometry(null!=hb.x?hb.x:0,null!=hb.y?hb.y:0,0,0),"resizable=0;html=1;");ob.vertex=!0;ob.connectable=!1;ob.geometry.relative=!0;null!=hb.placeholders&&(ob.value=I.replacePlaceholders("target"==
+hb.placeholders==!eb.invert?Ya:bb,ob.value,G));if(null!=hb.dx||null!=hb.dy)ob.geometry.offset=new mxPoint(null!=hb.dx?hb.dx:0,null!=hb.dy?hb.dy:0);ab.insert(ob)}wa.push(ab);mxUtils.remove(eb.invert?bb:Ya,na)}}}});xa(Ja,Ja,ra);if(null!=F[Ja.id])for(y=0;y<F[Ja.id].length;y++)xa(Ja,F[Ja.id][y],ra)}}if(null!=qa)for(ta=0;ta<l.length;ta++)for(Ja=l[ta],y=0;y<qa.length;y++)I.setAttributeForCell(Ja,mxUtils.trim(qa[y]),null);if(0<z.length){var Ea=new mxParallelEdgeLayout(I);Ea.spacing=ja;Ea.checkOverlap=!0;
+var Na=function(){0<Ea.spacing&&Ea.execute(I.getDefaultParent());for(var bb=0;bb<z.length;bb++){var jb=I.getCellGeometry(z[bb]);jb.x=Math.round(I.snap(jb.x));jb.y=Math.round(I.snap(jb.y));"auto"==sa&&(jb.width=Math.round(I.snap(jb.width)));"auto"==M&&(jb.height=Math.round(I.snap(jb.height)))}};if("["==fa.charAt(0)){var Ma=P;I.view.validate();this.executeLayouts(I.createLayouts(JSON.parse(fa)),function(){Na();Ma()});P=null}else if("circle"==fa){var za=new mxCircleLayout(I);za.disableEdgeStyle=!1;za.resetEdges=
+!1;var Ba=za.isVertexIgnored;za.isVertexIgnored=function(bb){return Ba.apply(this,arguments)||0>mxUtils.indexOf(z,bb)};this.executeLayout(function(){za.execute(I.getDefaultParent());Na()},!0,P);P=null}else if("horizontaltree"==fa||"verticaltree"==fa||"auto"==fa&&wa.length==2*z.length-1&&1==na.length){I.view.validate();var Ca=new mxCompactTreeLayout(I,"horizontaltree"==fa);Ca.levelDistance=ma;Ca.edgeRouting=!1;Ca.resetEdges=!1;this.executeLayout(function(){Ca.execute(I.getDefaultParent(),0<na.length?
+na[0]:null)},!0,P);P=null}else if("horizontalflow"==fa||"verticalflow"==fa||"auto"==fa&&1==na.length){I.view.validate();var ya=new mxHierarchicalLayout(I,"horizontalflow"==fa?mxConstants.DIRECTION_WEST:mxConstants.DIRECTION_NORTH);ya.intraCellSpacing=ma;ya.parallelEdgeSpacing=ja;ya.interRankCellSpacing=u;ya.disableEdgeStyle=!1;this.executeLayout(function(){ya.execute(I.getDefaultParent(),wa);I.moveCells(wa,Q,da)},!0,P);P=null}else if("orgchart"==fa){I.view.validate();var Ga=new mxOrgChartLayout(I,
+2,u,ma),Za=Ga.isVertexIgnored;Ga.isVertexIgnored=function(bb){return Za.apply(this,arguments)||0>mxUtils.indexOf(z,bb)};this.executeLayout(function(){Ga.execute(I.getDefaultParent());Na()},!0,P);P=null}else if("organic"==fa||"auto"==fa&&wa.length>z.length){I.view.validate();var Pa=new mxFastOrganicLayout(I);Pa.forceConstant=3*ma;Pa.disableEdgeStyle=!1;Pa.resetEdges=!1;var fb=Pa.isVertexIgnored;Pa.isVertexIgnored=function(bb){return fb.apply(this,arguments)||0>mxUtils.indexOf(z,bb)};this.executeLayout(function(){Pa.execute(I.getDefaultParent());
+Na()},!0,P);P=null}}this.hideDialog()}finally{I.model.endUpdate()}null!=P&&P()}}catch(bb){this.handleError(bb)}};EditorUi.prototype.getSearch=function(d){var f="";if("1"!=urlParams.offline&&"1"!=urlParams.demo&&null!=d&&0<window.location.search.length){var g="?",l;for(l in urlParams)0>mxUtils.indexOf(d,l)&&null!=urlParams[l]&&(f+=g+l+"="+urlParams[l],g="&")}else f=window.location.search;return f};EditorUi.prototype.getUrl=function(d){d=null!=d?d:window.location.pathname;var f=0<d.indexOf("?")?1:0;
+if("1"==urlParams.offline)d+=window.location.search;else{var g="tmp libs clibs state fileId code share notitle data url embed client create title splash".split(" "),l;for(l in urlParams)0>mxUtils.indexOf(g,l)&&(d=0==f?d+"?":d+"&",null!=urlParams[l]&&(d+=l+"="+urlParams[l],f++))}return d};EditorUi.prototype.showLinkDialog=function(d,f,g,l,q){d=new LinkDialog(this,d,f,g,!0,l,q);this.showDialog(d.container,560,130,!0,!0);d.init()};EditorUi.prototype.getServiceCount=function(d){var f=1;null==this.drive&&
+"function"!==typeof window.DriveClient||f++;null==this.dropbox&&"function"!==typeof window.DropboxClient||f++;null==this.oneDrive&&"function"!==typeof window.OneDriveClient||f++;null!=this.gitHub&&f++;null!=this.gitLab&&f++;d&&isLocalStorage&&"1"==urlParams.browser&&f++;return f};EditorUi.prototype.updateUi=function(){this.updateButtonContainer();this.updateActionStates();var d=this.getCurrentFile(),f=null!=d||"1"==urlParams.embed&&this.editor.graph.isEnabled();this.menus.get("viewPanels").setEnabled(f);
+this.menus.get("viewZoom").setEnabled(f);var g=("1"!=urlParams.embed||!this.editor.graph.isEnabled())&&(null==d||d.isRestricted());this.actions.get("makeCopy").setEnabled(!g);this.actions.get("print").setEnabled(!g);this.menus.get("exportAs").setEnabled(!g);this.menus.get("embed").setEnabled(!g);g="1"!=urlParams.embed||this.editor.graph.isEnabled();this.menus.get("extras").setEnabled(g);Editor.enableCustomLibraries&&(this.menus.get("openLibraryFrom").setEnabled(g),this.menus.get("newLibrary").setEnabled(g));
+d="1"==urlParams.embed&&this.editor.graph.isEnabled()||null!=d&&d.isEditable();this.actions.get("image").setEnabled(f);this.actions.get("zoomIn").setEnabled(f);this.actions.get("zoomOut").setEnabled(f);this.actions.get("resetView").setEnabled(f);this.actions.get("undo").setEnabled(this.canUndo()&&d);this.actions.get("redo").setEnabled(this.canRedo()&&d);this.menus.get("edit").setEnabled(f);this.menus.get("view").setEnabled(f);this.menus.get("importFrom").setEnabled(d);this.menus.get("arrange").setEnabled(d);
+null!=this.toolbar&&(null!=this.toolbar.edgeShapeMenu&&this.toolbar.edgeShapeMenu.setEnabled(d),null!=this.toolbar.edgeStyleMenu&&this.toolbar.edgeStyleMenu.setEnabled(d));this.updateUserElement()};EditorUi.prototype.updateButtonContainer=function(){};EditorUi.prototype.updateUserElement=function(){};EditorUi.prototype.scheduleSanityCheck=function(){};EditorUi.prototype.stopSanityCheck=function(){};EditorUi.prototype.isDiagramActive=function(){var d=this.getCurrentFile();return null!=d&&d.isEditable()||
+"1"==urlParams.embed&&this.editor.graph.isEnabled()};var t=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){t.apply(this,arguments);var d=this.editor.graph,f=this.getCurrentFile(),g=this.getSelectionState(),l=this.isDiagramActive();this.actions.get("pageSetup").setEnabled(l);this.actions.get("autosave").setEnabled(null!=f&&f.isEditable()&&f.isAutosaveOptional());this.actions.get("guides").setEnabled(l);this.actions.get("editData").setEnabled(d.isEnabled());this.actions.get("shadowVisible").setEnabled(l);
+this.actions.get("connectionArrows").setEnabled(l);this.actions.get("connectionPoints").setEnabled(l);this.actions.get("copyStyle").setEnabled(l&&!d.isSelectionEmpty());this.actions.get("pasteStyle").setEnabled(l&&0<g.cells.length);this.actions.get("editGeometry").setEnabled(0<g.vertices.length);this.actions.get("createShape").setEnabled(l);this.actions.get("createRevision").setEnabled(l);this.actions.get("moveToFolder").setEnabled(null!=f);this.actions.get("makeCopy").setEnabled(null!=f&&!f.isRestricted());
+this.actions.get("editDiagram").setEnabled(l&&(null==f||!f.isRestricted()));this.actions.get("publishLink").setEnabled(null!=f&&!f.isRestricted());this.actions.get("tags").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("layers").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("outline").setEnabled("hidden"!=this.diagramContainer.style.visibility);this.actions.get("rename").setEnabled(null!=f&&f.isRenamable()||"1"==urlParams.embed);this.actions.get("close").setEnabled(null!=
+f);this.menus.get("publish").setEnabled(null!=f&&!f.isRestricted());f=this.actions.get("findReplace");f.setEnabled("hidden"!=this.diagramContainer.style.visibility);f.label=mxResources.get("find")+(d.isEnabled()?"/"+mxResources.get("replace"):"")+"...";d=d.view.getState(d.getSelectionCell());this.actions.get("editShape").setEnabled(l&&null!=d&&null!=d.shape&&null!=d.shape.stencil)};var E=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.exportDialog&&(this.exportDialog.parentNode.removeChild(this.exportDialog),
+this.exportDialog=null);E.apply(this,arguments)};null!=window.ExportDialog&&(ExportDialog.showXmlOption=!1,ExportDialog.showGifOption=!1,ExportDialog.exportFile=function(d,f,g,l,q,z,F,C){var I=d.editor.graph;if("xml"==g)d.hideDialog(),d.saveData(f,"xml",mxUtils.getXml(d.editor.getGraphXml()),"text/xml");else if("svg"==g)d.hideDialog(),d.saveData(f,"svg",mxUtils.getXml(I.getSvg(l,q,z)),"image/svg+xml");else{var G=d.getFileData(!0,null,null,null,null,!0),Z=I.getGraphBounds(),ca=Math.floor(Z.width*q/
+I.view.scale),ba=Math.floor(Z.height*q/I.view.scale);if(G.length<=MAX_REQUEST_SIZE&&ca*ba<MAX_AREA)if(d.hideDialog(),"png"!=g&&"jpg"!=g&&"jpeg"!=g||!d.isExportToCanvas()){var Y={globalVars:I.getExportVariables()};C&&(Y.grid={size:I.gridSize,steps:I.view.gridSteps,color:I.view.gridColor});d.saveRequest(f,g,function(O,la){return new mxXmlRequest(EXPORT_URL,"format="+g+"&base64="+(la||"0")+(null!=O?"&filename="+encodeURIComponent(O):"")+"&extras="+encodeURIComponent(JSON.stringify(Y))+(0<F?"&dpi="+F:
+"")+"&bg="+(null!=l?l:"none")+"&w="+ca+"&h="+ba+"&border="+z+"&xml="+encodeURIComponent(G))})}else"png"==g?d.exportImage(q,null==l||"none"==l,!0,!1,!1,z,!0,!1,null,C,F):d.exportImage(q,!1,!0,!1,!1,z,!0,!1,"jpeg",C);else mxUtils.alert(mxResources.get("drawingTooLarge"))}});EditorUi.prototype.getDiagramTextContent=function(){this.editor.graph.setEnabled(!1);var d=this.editor.graph,f="";if(null!=this.pages)for(var g=0;g<this.pages.length;g++){var l=d;this.currentPage!=this.pages[g]&&(l=this.createTemporaryGraph(d.getStylesheet()),
+this.updatePageRoot(this.pages[g]),l.model.setRoot(this.pages[g].root));f+=this.pages[g].getName()+" "+l.getIndexableText()+" "}else f=d.getIndexableText();this.editor.graph.setEnabled(!0);return f};EditorUi.prototype.showRemotelyStoredLibrary=function(d){var f={},g=document.createElement("div");g.style.whiteSpace="nowrap";var l=document.createElement("h3");mxUtils.write(l,mxUtils.htmlEntities(d));l.style.cssText="width:100%;text-align:center;margin-top:0px;margin-bottom:12px";g.appendChild(l);var q=
+document.createElement("div");q.style.cssText="border:1px solid lightGray;overflow: auto;height:300px";q.innerHTML='<div style="text-align:center;padding:8px;"><img src="'+IMAGE_PATH+'/spin.gif"></div>';var z={};try{var F=mxSettings.getCustomLibraries();for(d=0;d<F.length;d++){var C=F[d];if("R"==C.substring(0,1)){var I=JSON.parse(decodeURIComponent(C.substring(1)));z[I[0]]={id:I[0],title:I[1],downloadUrl:I[2]}}}}catch(G){}this.remoteInvoke("getCustomLibraries",null,null,function(G){q.innerText="";
+if(0==G.length)q.innerHTML='<div style="text-align:center;padding-top:20px;color:gray;">'+mxUtils.htmlEntities(mxResources.get("noLibraries"))+"</div>";else for(var Z=0;Z<G.length;Z++){var ca=G[Z];z[ca.id]&&(f[ca.id]=ca);var ba=this.addCheckbox(q,ca.title,z[ca.id]);(function(Y,O){mxEvent.addListener(O,"change",function(){this.checked?f[Y.id]=Y:delete f[Y.id]})})(ca,ba)}},mxUtils.bind(this,function(G){q.innerText="";var Z=document.createElement("div");Z.style.padding="8px";Z.style.textAlign="center";
+mxUtils.write(Z,mxResources.get("error")+": ");mxUtils.write(Z,null!=G&&null!=G.message?G.message:mxResources.get("unknownError"));q.appendChild(Z)}));g.appendChild(q);g=new CustomDialog(this,g,mxUtils.bind(this,function(){this.spinner.spin(document.body,mxResources.get("loading"));var G=0,Z;for(Z in f)null==z[Z]&&(G++,mxUtils.bind(this,function(ca){this.remoteInvoke("getFileContent",[ca.downloadUrl],null,mxUtils.bind(this,function(ba){G--;0==G&&this.spinner.stop();try{this.loadLibrary(new RemoteLibrary(this,
+ba,ca))}catch(Y){this.handleError(Y,mxResources.get("errorLoadingFile"))}}),mxUtils.bind(this,function(){G--;0==G&&this.spinner.stop();this.handleError(null,mxResources.get("errorLoadingFile"))}))})(f[Z]));for(Z in z)f[Z]||this.closeLibrary(new RemoteLibrary(this,null,z[Z]));0==G&&this.spinner.stop()}),null,null,"https://www.diagrams.net/doc/faq/custom-libraries-confluence-cloud");this.showDialog(g.container,340,390,!0,!0,null,null,null,null,!0)};EditorUi.prototype.remoteInvokableFns={getDiagramTextContent:{isAsync:!1},
+getLocalStorageFile:{isAsync:!1,allowedDomains:["app.diagrams.net"]},getLocalStorageFileNames:{isAsync:!1,allowedDomains:["app.diagrams.net"]},setMigratedFlag:{isAsync:!1,allowedDomains:["app.diagrams.net"]}};EditorUi.prototype.remoteInvokeCallbacks=[];EditorUi.prototype.remoteInvokeQueue=[];EditorUi.prototype.handleRemoteInvokeReady=function(d){this.remoteWin=d;for(var f=0;f<this.remoteInvokeQueue.length;f++)d.postMessage(this.remoteInvokeQueue[f],"*");this.remoteInvokeQueue=[]};EditorUi.prototype.handleRemoteInvokeResponse=
+function(d){var f=d.msgMarkers,g=this.remoteInvokeCallbacks[f.callbackId];if(null==g)throw Error("No callback for "+(null!=f?f.callbackId:"null"));d.error?g.error&&g.error(d.error.errResp):g.callback&&g.callback.apply(this,d.resp);this.remoteInvokeCallbacks[f.callbackId]=null};EditorUi.prototype.remoteInvoke=function(d,f,g,l,q){var z=!0,F=window.setTimeout(mxUtils.bind(this,function(){z=!1;q({code:App.ERROR_TIMEOUT,message:mxResources.get("timeout")})}),this.timeout),C=mxUtils.bind(this,function(){window.clearTimeout(F);
+z&&l.apply(this,arguments)}),I=mxUtils.bind(this,function(){window.clearTimeout(F);z&&q.apply(this,arguments)});g=g||{};g.callbackId=this.remoteInvokeCallbacks.length;this.remoteInvokeCallbacks.push({callback:C,error:I});d=JSON.stringify({event:"remoteInvoke",funtionName:d,functionArgs:f,msgMarkers:g});null!=this.remoteWin?this.remoteWin.postMessage(d,"*"):this.remoteInvokeQueue.push(d)};EditorUi.prototype.handleRemoteInvoke=function(d,f){var g=mxUtils.bind(this,function(G,Z){var ca={event:"remoteInvokeResponse",
+msgMarkers:d.msgMarkers};null!=Z?ca.error={errResp:Z}:null!=G&&(ca.resp=G);this.remoteWin.postMessage(JSON.stringify(ca),"*")});try{var l=d.funtionName,q=this.remoteInvokableFns[l];if(null!=q&&"function"===typeof this[l]){if(q.allowedDomains){for(var z=!1,F=0;F<q.allowedDomains.length;F++)if(f=="https://"+q.allowedDomains[F]){z=!0;break}if(!z){g(null,"Invalid Call: "+l+" is not allowed.");return}}var C=d.functionArgs;Array.isArray(C)||(C=[]);if(q.isAsync)C.push(function(){g(Array.prototype.slice.apply(arguments))}),
+C.push(function(G){g(null,G||"Unkown Error")}),this[l].apply(this,C);else{var I=this[l].apply(this,C);g([I])}}else g(null,"Invalid Call: "+l+" is not found.")}catch(G){g(null,"Invalid Call: An error occurred, "+G.message)}};EditorUi.prototype.openDatabase=function(d,f){if(null==this.database){var g=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB;if(null!=g)try{var l=g.open("database",2);l.onupgradeneeded=function(q){try{var z=l.result;1>q.oldVersion&&z.createObjectStore("objects",{keyPath:"key"});
+2>q.oldVersion&&(z.createObjectStore("files",{keyPath:"title"}),z.createObjectStore("filesInfo",{keyPath:"title"}),EditorUi.migrateStorageFiles=isLocalStorage)}catch(F){null!=f&&f(F)}};l.onsuccess=mxUtils.bind(this,function(q){var z=l.result;this.database=z;EditorUi.migrateStorageFiles&&(StorageFile.migrate(z),EditorUi.migrateStorageFiles=!1);"app.diagrams.net"!=location.host||this.drawioMigrationStarted||(this.drawioMigrationStarted=!0,this.getDatabaseItem(".drawioMigrated3",mxUtils.bind(this,function(F){if(!F||
+"1"==urlParams.forceMigration){var C=document.createElement("iframe");C.style.display="none";C.setAttribute("src","https://www.draw.io?embed=1&proto=json&forceMigration="+urlParams.forceMigration);document.body.appendChild(C);var I=!0,G=!1,Z,ca=0,ba=mxUtils.bind(this,function(){G=!0;this.setDatabaseItem(".drawioMigrated3",!0);C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"setMigratedFlag"}),"*")}),Y=mxUtils.bind(this,function(){ca++;O()}),O=mxUtils.bind(this,function(){try{if(ca>=
+Z.length)ba();else{var aa=Z[ca];StorageFile.getFileContent(this,aa,mxUtils.bind(this,function(ia){null==ia||".scratchpad"==aa&&ia==this.emptyLibraryXml?C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFile",functionArgs:[aa]}),"*"):Y()}),Y)}}catch(ia){console.log(ia)}}),la=mxUtils.bind(this,function(aa){try{this.setDatabaseItem(null,[{title:aa.title,size:aa.data.length,lastModified:Date.now(),type:aa.isLib?"L":"F"},{title:aa.title,data:aa.data}],Y,Y,["filesInfo",
+"files"])}catch(ia){console.log(ia)}});F=mxUtils.bind(this,function(aa){try{if(aa.source==C.contentWindow){var ia={};try{ia=JSON.parse(aa.data)}catch(X){}"init"==ia.event?(C.contentWindow.postMessage(JSON.stringify({action:"remoteInvokeReady"}),"*"),C.contentWindow.postMessage(JSON.stringify({action:"remoteInvoke",funtionName:"getLocalStorageFileNames"}),"*")):"remoteInvokeResponse"!=ia.event||G||(I?null!=ia.resp&&0<ia.resp.length&&null!=ia.resp[0]?(Z=ia.resp[0],I=!1,O()):ba():null!=ia.resp&&0<ia.resp.length&&
+null!=ia.resp[0]?la(ia.resp[0]):Y())}}catch(X){console.log(X)}});window.addEventListener("message",F)}})));d(z);z.onversionchange=function(){z.close()}});l.onerror=f;l.onblocked=function(){}}catch(q){null!=f&&f(q)}else null!=f&&f()}else d(this.database)};EditorUi.prototype.setDatabaseItem=function(d,f,g,l,q){this.openDatabase(mxUtils.bind(this,function(z){try{q=q||"objects";Array.isArray(q)||(q=[q],d=[d],f=[f]);var F=z.transaction(q,"readwrite");F.oncomplete=g;F.onerror=l;for(z=0;z<q.length;z++)F.objectStore(q[z]).put(null!=
+d&&null!=d[z]?{key:d[z],data:f[z]}:f[z])}catch(C){null!=l&&l(C)}}),l)};EditorUi.prototype.removeDatabaseItem=function(d,f,g,l){this.openDatabase(mxUtils.bind(this,function(q){l=l||"objects";Array.isArray(l)||(l=[l],d=[d]);q=q.transaction(l,"readwrite");q.oncomplete=f;q.onerror=g;for(var z=0;z<l.length;z++)q.objectStore(l[z]).delete(d[z])}),g)};EditorUi.prototype.getDatabaseItem=function(d,f,g,l){this.openDatabase(mxUtils.bind(this,function(q){try{l=l||"objects";var z=q.transaction([l],"readonly").objectStore(l).get(d);
+z.onsuccess=function(){f(z.result)};z.onerror=g}catch(F){null!=g&&g(F)}}),g)};EditorUi.prototype.getDatabaseItems=function(d,f,g){this.openDatabase(mxUtils.bind(this,function(l){try{g=g||"objects";var q=l.transaction([g],"readonly").objectStore(g).openCursor(IDBKeyRange.lowerBound(0)),z=[];q.onsuccess=function(F){null==F.target.result?d(z):(z.push(F.target.result.value),F.target.result.continue())};q.onerror=f}catch(F){null!=f&&f(F)}}),f)};EditorUi.prototype.getDatabaseItemKeys=function(d,f,g){this.openDatabase(mxUtils.bind(this,
+function(l){try{g=g||"objects";var q=l.transaction([g],"readonly").objectStore(g).getAllKeys();q.onsuccess=function(){d(q.result)};q.onerror=f}catch(z){null!=f&&f(z)}}),f)};EditorUi.prototype.commentsSupported=function(){var d=this.getCurrentFile();return null!=d?d.commentsSupported():!1};EditorUi.prototype.commentsRefreshNeeded=function(){var d=this.getCurrentFile();return null!=d?d.commentsRefreshNeeded():!0};EditorUi.prototype.commentsSaveNeeded=function(){var d=this.getCurrentFile();return null!=
+d?d.commentsSaveNeeded():!1};EditorUi.prototype.getComments=function(d,f){var g=this.getCurrentFile();null!=g?g.getComments(d,f):d([])};EditorUi.prototype.addComment=function(d,f,g){var l=this.getCurrentFile();null!=l?l.addComment(d,f,g):f(Date.now())};EditorUi.prototype.canReplyToReplies=function(){var d=this.getCurrentFile();return null!=d?d.canReplyToReplies():!0};EditorUi.prototype.canComment=function(){var d=this.getCurrentFile();return null!=d?d.canComment():!0};EditorUi.prototype.newComment=
+function(d,f){var g=this.getCurrentFile();return null!=g?g.newComment(d,f):new DrawioComment(this,null,d,Date.now(),Date.now(),!1,f)};EditorUi.prototype.isRevisionHistorySupported=function(){var d=this.getCurrentFile();return null!=d&&d.isRevisionHistorySupported()};EditorUi.prototype.getRevisions=function(d,f){var g=this.getCurrentFile();null!=g&&g.getRevisions?g.getRevisions(d,f):f({message:mxResources.get("unknownError")})};EditorUi.prototype.isRevisionHistoryEnabled=function(){var d=this.getCurrentFile();
+return null!=d&&(d.constructor==DriveFile&&d.isEditable()||d.constructor==DropboxFile)};EditorUi.prototype.getServiceName=function(){return"draw.io"};EditorUi.prototype.addRemoteServiceSecurityCheck=function(d){d.setRequestHeader("Content-Language","da, mi, en, de-DE")};EditorUi.prototype.loadUrl=function(d,f,g,l,q,z,F,C){EditorUi.logEvent("SHOULD NOT BE CALLED: loadUrl");return this.editor.loadUrl(d,f,g,l,q,z,F,C)};EditorUi.prototype.loadFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: loadFonts");
+return this.editor.loadFonts(d)};EditorUi.prototype.createSvgDataUri=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: createSvgDataUri");return Editor.createSvgDataUri(d)};EditorUi.prototype.embedCssFonts=function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: embedCssFonts");return this.editor.embedCssFonts(d,f)};EditorUi.prototype.embedExtFonts=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: embedExtFonts");return this.editor.embedExtFonts(d)};EditorUi.prototype.exportToCanvas=function(d,
+f,g,l,q,z,F,C,I,G,Z,ca,ba,Y,O,la){EditorUi.logEvent("SHOULD NOT BE CALLED: exportToCanvas");return this.editor.exportToCanvas(d,f,g,l,q,z,F,C,I,G,Z,ca,ba,Y,O,la)};EditorUi.prototype.createImageUrlConverter=function(){EditorUi.logEvent("SHOULD NOT BE CALLED: createImageUrlConverter");return this.editor.createImageUrlConverter()};EditorUi.prototype.convertImages=function(d,f,g,l){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImages");return this.editor.convertImages(d,f,g,l)};EditorUi.prototype.convertImageToDataUri=
+function(d,f){EditorUi.logEvent("SHOULD NOT BE CALLED: convertImageToDataUri");return this.editor.convertImageToDataUri(d,f)};EditorUi.prototype.base64Encode=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: base64Encode");return Editor.base64Encode(d)};EditorUi.prototype.updateCRC=function(d,f,g,l){EditorUi.logEvent("SHOULD NOT BE CALLED: updateCRC");return Editor.updateCRC(d,f,g,l)};EditorUi.prototype.crc32=function(d){EditorUi.logEvent("SHOULD NOT BE CALLED: crc32");return Editor.crc32(d)};
+EditorUi.prototype.writeGraphModelToPng=function(d,f,g,l,q){EditorUi.logEvent("SHOULD NOT BE CALLED: writeGraphModelToPng");return Editor.writeGraphModelToPng(d,f,g,l,q)};EditorUi.prototype.getLocalStorageFileNames=function(){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;for(var d=[],f=0;f<localStorage.length;f++){var g=localStorage.key(f),l=localStorage.getItem(g);if(0<g.length&&(".scratchpad"==g||"."!=g.charAt(0))&&0<l.length){var q="<mxfile "===
+l.substring(0,8)||"<?xml"===l.substring(0,5)||"\x3c!--[if IE]>"===l.substring(0,12);l="<mxlibrary>"===l.substring(0,11);(q||l)&&d.push(g)}}return d};EditorUi.prototype.getLocalStorageFile=function(d){if("1"==localStorage.getItem(".localStorageMigrated")&&"1"!=urlParams.forceMigration)return null;var f=localStorage.getItem(d);return{title:d,data:f,isLib:"<mxlibrary>"===f.substring(0,11)}};EditorUi.prototype.setMigratedFlag=function(){localStorage.setItem(".localStorageMigrated","1")}})();
+var CommentsWindow=function(b,e,k,n,D,t){function E(){for(var X=ca.getElementsByTagName("div"),R=0,sa=0;sa<X.length;sa++)"none"!=X[sa].style.display&&X[sa].parentNode==ca&&R++;ba.style.display=0==R?"block":"none"}function d(X,R,sa,M){function ka(){R.removeChild(ja);R.removeChild(ma);S.style.display="block";L.style.display="block"}I={div:R,comment:X,saveCallback:sa,deleteOnCancel:M};var L=R.querySelector(".geCommentTxt"),S=R.querySelector(".geCommentActionsList"),ja=document.createElement("textarea");
+ja.className="geCommentEditTxtArea";ja.style.minHeight=L.offsetHeight+"px";ja.value=X.content;R.insertBefore(ja,L);var ma=document.createElement("div");ma.className="geCommentEditBtns";var u=mxUtils.button(mxResources.get("cancel"),function(){M?(R.parentNode.removeChild(R),E()):ka();I=null});u.className="geCommentEditBtn";ma.appendChild(u);var H=mxUtils.button(mxResources.get("save"),function(){L.innerText="";X.content=ja.value;mxUtils.write(L,X.content);ka();sa(X);I=null});mxEvent.addListener(ja,
+"keydown",mxUtils.bind(this,function(P){mxEvent.isConsumed(P)||((mxEvent.isControlDown(P)||mxClient.IS_MAC&&mxEvent.isMetaDown(P))&&13==P.keyCode?(H.click(),mxEvent.consume(P)):27==P.keyCode&&(u.click(),mxEvent.consume(P)))}));H.focus();H.className="geCommentEditBtn gePrimaryBtn";ma.appendChild(H);R.insertBefore(ma,L);S.style.display="none";L.style.display="none";ja.focus()}function f(X,R){R.innerText="";X=new Date(X.modifiedDate);var sa=b.timeSince(X);null==sa&&(sa=mxResources.get("lessThanAMinute"));
+mxUtils.write(R,mxResources.get("timeAgo",[sa],"{1} ago"));R.setAttribute("title",X.toLocaleDateString()+" "+X.toLocaleTimeString())}function g(X){var R=document.createElement("img");R.className="geCommentBusyImg";R.src=IMAGE_PATH+"/spin.gif";X.appendChild(R);X.busyImg=R}function l(X){X.style.border="1px solid red";X.removeChild(X.busyImg)}function q(X){X.style.border="";X.removeChild(X.busyImg)}function z(X,R,sa,M,ka){function L(Q,da,ea){var fa=document.createElement("li");fa.className="geCommentAction";
+var pa=document.createElement("a");pa.className="geCommentActionLnk";mxUtils.write(pa,Q);fa.appendChild(pa);mxEvent.addListener(pa,"click",function(ua){da(ua,X);ua.preventDefault();mxEvent.consume(ua)});V.appendChild(fa);ea&&(fa.style.display="none")}function S(){function Q(fa){da.push(ea);if(null!=fa.replies)for(var pa=0;pa<fa.replies.length;pa++)ea=ea.nextSibling,Q(fa.replies[pa])}var da=[],ea=ma;Q(X);return{pdiv:ea,replies:da}}function ja(Q,da,ea,fa,pa){function ua(){g(Fa);X.addReply(Aa,function(ta){Aa.id=
+ta;X.replies.push(Aa);q(Fa);ea&&ea()},function(ta){qa();l(Fa);b.handleError(ta,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))},fa,pa)}function qa(){d(Aa,Fa,function(ta){ua()},!0)}var Da=S().pdiv,Aa=b.newComment(Q,b.getCurrentUser());Aa.pCommentId=X.id;null==X.replies&&(X.replies=[]);var Fa=z(Aa,X.replies,Da,M+1);da?qa():ua()}if(ka||!X.isResolved){ba.style.display="none";var ma=document.createElement("div");ma.className="geCommentContainer";ma.setAttribute("data-commentId",
+X.id);ma.style.marginLeft=20*M+5+"px";X.isResolved&&!Editor.isDarkMode()&&(ma.style.backgroundColor="ghostWhite");var u=document.createElement("div");u.className="geCommentHeader";var H=document.createElement("img");H.className="geCommentUserImg";H.src=X.user.pictureUrl||Editor.userImage;u.appendChild(H);H=document.createElement("div");H.className="geCommentHeaderTxt";u.appendChild(H);var P=document.createElement("div");P.className="geCommentUsername";mxUtils.write(P,X.user.displayName||"");H.appendChild(P);
+P=document.createElement("div");P.className="geCommentDate";P.setAttribute("data-commentId",X.id);f(X,P);H.appendChild(P);ma.appendChild(u);u=document.createElement("div");u.className="geCommentTxt";mxUtils.write(u,X.content||"");ma.appendChild(u);X.isLocked&&(ma.style.opacity="0.5");u=document.createElement("div");u.className="geCommentActions";var V=document.createElement("ul");V.className="geCommentActionsList";u.appendChild(V);F||X.isLocked||0!=M&&!C||L(mxResources.get("reply"),function(){ja("",
+!0)},X.isResolved);H=b.getCurrentUser();null==H||H.id!=X.user.id||F||X.isLocked||(L(mxResources.get("edit"),function(){function Q(){d(X,ma,function(){g(ma);X.editComment(X.content,function(){q(ma)},function(da){l(ma);Q();b.handleError(da,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})}Q()},X.isResolved),L(mxResources.get("delete"),function(){b.confirm(mxResources.get("areYouSure"),function(){g(ma);X.deleteComment(function(Q){if(!0===Q){Q=ma.querySelector(".geCommentTxt");
+Q.innerText="";mxUtils.write(Q,mxResources.get("msgDeleted"));var da=ma.querySelectorAll(".geCommentAction");for(Q=0;Q<da.length;Q++)da[Q].parentNode.removeChild(da[Q]);q(ma);ma.style.opacity="0.5"}else{da=S(X).replies;for(Q=0;Q<da.length;Q++)ca.removeChild(da[Q]);for(Q=0;Q<R.length;Q++)if(R[Q]==X){R.splice(Q,1);break}ba.style.display=0==ca.getElementsByTagName("div").length?"block":"none"}},function(Q){l(ma);b.handleError(Q,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})})},
+X.isResolved));F||X.isLocked||0!=M||L(X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"),function(Q){function da(){var ea=Q.target;ea.innerText="";X.isResolved=!X.isResolved;mxUtils.write(ea,X.isResolved?mxResources.get("reopen"):mxResources.get("resolve"));for(var fa=X.isResolved?"none":"",pa=S(X).replies,ua=Editor.isDarkMode()?"transparent":X.isResolved?"ghostWhite":"white",qa=0;qa<pa.length;qa++){pa[qa].style.backgroundColor=ua;for(var Da=pa[qa].querySelectorAll(".geCommentAction"),
+Aa=0;Aa<Da.length;Aa++)Da[Aa]!=ea.parentNode&&(Da[Aa].style.display=fa);la||(pa[qa].style.display="none")}E()}X.isResolved?ja(mxResources.get("reOpened")+": ",!0,da,!1,!0):ja(mxResources.get("markedAsResolved"),!1,da,!0)});ma.appendChild(u);null!=sa?ca.insertBefore(ma,sa.nextSibling):ca.appendChild(ma);for(sa=0;null!=X.replies&&sa<X.replies.length;sa++)u=X.replies[sa],u.isResolved=X.isResolved,z(u,X.replies,null,M+1,ka);null!=I&&(I.comment.id==X.id?(ka=X.content,X.content=I.comment.content,d(X,ma,
+I.saveCallback,I.deleteOnCancel),X.content=ka):null==I.comment.id&&I.comment.pCommentId==X.id&&(ca.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel)));return ma}}var F=!b.canComment(),C=b.canReplyToReplies(),I=null,G=document.createElement("div");G.className="geCommentsWin";G.style.background=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";var Z=EditorUi.compactUi?"26px":"30px",ca=document.createElement("div");ca.className="geCommentsList";ca.style.backgroundColor=Editor.isDarkMode()?
+Dialog.backdropColor:"whiteSmoke";ca.style.bottom=parseInt(Z)+7+"px";G.appendChild(ca);var ba=document.createElement("span");ba.style.cssText="display:none;padding-top:10px;text-align:center;";mxUtils.write(ba,mxResources.get("noCommentsFound"));var Y=document.createElement("div");Y.className="geToolbarContainer geCommentsToolbar";Y.style.height=Z;Y.style.padding=EditorUi.compactUi?"4px 0px 3px 0px":"1px";Y.style.backgroundColor=Editor.isDarkMode()?Dialog.backdropColor:"whiteSmoke";Z=document.createElement("a");
+Z.className="geButton";if(!F){var O=Z.cloneNode();O.innerHTML='<div class="geSprite geSprite-plus" style="display:inline-block;"></div>';O.setAttribute("title",mxResources.get("create")+"...");mxEvent.addListener(O,"click",function(X){function R(){d(sa,M,function(ka){g(M);b.addComment(ka,function(L){ka.id=L;aa.push(ka);q(M)},function(L){l(M);R();b.handleError(L,null,null,null,mxUtils.htmlEntities(mxResources.get("objectNotFound")))})},!0)}var sa=b.newComment("",b.getCurrentUser()),M=z(sa,aa,null,
+0);R();X.preventDefault();mxEvent.consume(X)});Y.appendChild(O)}O=Z.cloneNode();O.innerHTML='<img src="'+IMAGE_PATH+'/check.png" style="width: 16px; padding: 2px;">';O.setAttribute("title",mxResources.get("showResolved"));var la=!1;Editor.isDarkMode()&&(O.style.filter="invert(100%)");mxEvent.addListener(O,"click",function(X){this.className=(la=!la)?"geButton geCheckedBtn":"geButton";ia();X.preventDefault();mxEvent.consume(X)});Y.appendChild(O);b.commentsRefreshNeeded()&&(O=Z.cloneNode(),O.innerHTML=
+'<img src="'+IMAGE_PATH+'/update16.png" style="width: 16px; padding: 2px;">',O.setAttribute("title",mxResources.get("refresh")),Editor.isDarkMode()&&(O.style.filter="invert(100%)"),mxEvent.addListener(O,"click",function(X){ia();X.preventDefault();mxEvent.consume(X)}),Y.appendChild(O));b.commentsSaveNeeded()&&(Z=Z.cloneNode(),Z.innerHTML='<img src="'+IMAGE_PATH+'/save.png" style="width: 20px; padding: 2px;">',Z.setAttribute("title",mxResources.get("save")),Editor.isDarkMode()&&(Z.style.filter="invert(100%)"),
+mxEvent.addListener(Z,"click",function(X){t();X.preventDefault();mxEvent.consume(X)}),Y.appendChild(Z));G.appendChild(Y);var aa=[],ia=mxUtils.bind(this,function(){this.hasError=!1;if(null!=I)try{I.div=I.div.cloneNode(!0);var X=I.div.querySelector(".geCommentEditTxtArea"),R=I.div.querySelector(".geCommentEditBtns");I.comment.content=X.value;X.parentNode.removeChild(X);R.parentNode.removeChild(R)}catch(sa){b.handleError(sa)}ca.innerHTML='<div style="padding-top:10px;text-align:center;"><img src="'+
+IMAGE_PATH+'/spin.gif" valign="middle"> '+mxUtils.htmlEntities(mxResources.get("loading"))+"...</div>";C=b.canReplyToReplies();b.commentsSupported()?b.getComments(function(sa){function M(ka){if(null!=ka){ka.sort(function(S,ja){return new Date(S.modifiedDate)-new Date(ja.modifiedDate)});for(var L=0;L<ka.length;L++)M(ka[L].replies)}}sa.sort(function(ka,L){return new Date(ka.modifiedDate)-new Date(L.modifiedDate)});ca.innerText="";ca.appendChild(ba);ba.style.display="block";aa=sa;for(sa=0;sa<aa.length;sa++)M(aa[sa].replies),
+z(aa[sa],aa,null,0,la);null!=I&&null==I.comment.id&&null==I.comment.pCommentId&&(ca.appendChild(I.div),d(I.comment,I.div,I.saveCallback,I.deleteOnCancel))},mxUtils.bind(this,function(sa){ca.innerHTML=mxUtils.htmlEntities(mxResources.get("error")+(sa&&sa.message?": "+sa.message:""));this.hasError=!0})):ca.innerHTML=mxUtils.htmlEntities(mxResources.get("error"))});ia();this.refreshComments=ia;Y=mxUtils.bind(this,function(){function X(L){var S=sa[L.id];if(null!=S)for(f(L,S),S=0;null!=L.replies&&S<L.replies.length;S++)X(L.replies[S])}
+if(this.window.isVisible()){for(var R=ca.querySelectorAll(".geCommentDate"),sa={},M=0;M<R.length;M++){var ka=R[M];sa[ka.getAttribute("data-commentId")]=ka}for(M=0;M<aa.length;M++)X(aa[M])}});setInterval(Y,6E4);this.refreshCommentsTime=Y;this.window=new mxWindow(mxResources.get("comments"),G,e,k,n,D,!0,!0);this.window.minimumSize=new mxRectangle(0,0,300,200);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);
+this.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){this.window.fit()}));b.installResizeHandler(this,!0)},ConfirmDialog=function(b,e,k,n,D,t,E,d,f,g,l){var q=document.createElement("div");q.style.textAlign="center";l=null!=l?l:44;var z=document.createElement("div");z.style.padding="6px";z.style.overflow="auto";z.style.maxHeight=l+"px";z.style.lineHeight="1.2em";mxUtils.write(z,e);q.appendChild(z);null!=g&&(z=document.createElement("div"),z.style.padding="6px 0 6px 0",e=document.createElement("img"),
+e.setAttribute("src",g),z.appendChild(e),q.appendChild(z));g=document.createElement("div");g.style.textAlign="center";g.style.whiteSpace="nowrap";var F=document.createElement("input");F.setAttribute("type","checkbox");t=mxUtils.button(t||mxResources.get("cancel"),function(){b.hideDialog();null!=n&&n(F.checked)});t.className="geBtn";null!=d&&(t.innerHTML=d+"<br>"+t.innerHTML,t.style.paddingBottom="8px",t.style.paddingTop="8px",t.style.height="auto",t.style.width="40%");b.editor.cancelFirst&&g.appendChild(t);
+var C=mxUtils.button(D||mxResources.get("ok"),function(){b.hideDialog();null!=k&&k(F.checked)});g.appendChild(C);null!=E?(C.innerHTML=E+"<br>"+C.innerHTML+"<br>",C.style.paddingBottom="8px",C.style.paddingTop="8px",C.style.height="auto",C.className="geBtn",C.style.width="40%"):C.className="geBtn gePrimaryBtn";b.editor.cancelFirst||g.appendChild(t);q.appendChild(g);f?(g.style.marginTop="10px",z=document.createElement("p"),z.style.marginTop="20px",z.style.marginBottom="0px",z.appendChild(F),D=document.createElement("span"),
mxUtils.write(D," "+mxResources.get("rememberThisSetting")),z.appendChild(D),q.appendChild(z),mxEvent.addListener(D,"click",function(I){F.checked=!F.checked;mxEvent.consume(I)})):g.style.marginTop="12px";this.init=function(){C.focus()};this.container=q};function DiagramPage(b,e){this.node=b;null!=e?this.node.setAttribute("id",e):null==this.getId()&&this.node.setAttribute("id",Editor.guid())}DiagramPage.prototype.node=null;DiagramPage.prototype.root=null;DiagramPage.prototype.viewState=null;DiagramPage.prototype.getId=function(){return this.node.getAttribute("id")};DiagramPage.prototype.getName=function(){return this.node.getAttribute("name")};
DiagramPage.prototype.setName=function(b){null==b?this.node.removeAttribute("name"):this.node.setAttribute("name",b)};function RenamePage(b,e,k){this.ui=b;this.page=e;this.previous=this.name=k}RenamePage.prototype.execute=function(){var b=this.page.getName();this.page.setName(this.previous);this.name=this.previous;this.previous=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageRenamed"))};
function MovePage(b,e,k){this.ui=b;this.oldIndex=e;this.newIndex=k}MovePage.prototype.execute=function(){this.ui.pages.splice(this.newIndex,0,this.ui.pages.splice(this.oldIndex,1)[0]);var b=this.oldIndex;this.oldIndex=this.newIndex;this.newIndex=b;this.ui.editor.graph.updatePlaceholders();this.ui.editor.fireEvent(new mxEventObject("pageMoved"))};
@@ -3848,8 +3864,8 @@ EditorUi.prototype.clonePages=function(b){for(var e=[],k=0;k<b.length;k++)e.push
EditorUi.prototype.renamePage=function(b){if(this.editor.graph.isEnabled()){var e=new FilenameDialog(this,b.getName(),mxResources.get("rename"),mxUtils.bind(this,function(k){null!=k&&0<k.length&&this.editor.graph.model.execute(new RenamePage(this,b,k))}),mxResources.get("rename"));this.showDialog(e.container,300,80,!0,!0);e.init()}return b};EditorUi.prototype.movePage=function(b,e){this.editor.graph.model.execute(new MovePage(this,b,e))};
EditorUi.prototype.createTabContainer=function(){var b=document.createElement("div");b.className="geTabContainer";b.style.position="absolute";b.style.whiteSpace="nowrap";b.style.overflow="hidden";b.style.height="0px";return b};
EditorUi.prototype.updateTabContainer=function(){if(null!=this.tabContainer&&null!=this.pages){var b=this.editor.graph,e=document.createElement("div");e.style.position="relative";e.style.display="inline-block";e.style.verticalAlign="top";e.style.height=this.tabContainer.style.height;e.style.whiteSpace="nowrap";e.style.overflow="hidden";e.style.fontSize="13px";e.style.marginLeft="30px";for(var k=this.editor.isChromelessView()?29:59,n=Math.min(140,Math.max(20,(this.tabContainer.clientWidth-k)/this.pages.length)+
-1),D=null,t=0;t<this.pages.length;t++)mxUtils.bind(this,function(g,m){this.pages[g]==this.currentPage?(m.className="geActivePage",m.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):m.className="geInactivePage";m.setAttribute("draggable","true");mxEvent.addListener(m,"dragstart",mxUtils.bind(this,function(q){b.isEnabled()?(mxClient.IS_FF&&q.dataTransfer.setData("Text","<diagram/>"),D=g):mxEvent.consume(q)}));mxEvent.addListener(m,"dragend",mxUtils.bind(this,function(q){D=null;q.stopPropagation();
-q.preventDefault()}));mxEvent.addListener(m,"dragover",mxUtils.bind(this,function(q){null!=D&&(q.dataTransfer.dropEffect="move");q.stopPropagation();q.preventDefault()}));mxEvent.addListener(m,"drop",mxUtils.bind(this,function(q){null!=D&&g!=D&&this.movePage(D,g);q.stopPropagation();q.preventDefault()}));e.appendChild(m)})(t,this.createTabForPage(this.pages[t],n,this.pages[t]!=this.currentPage,t+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);n=this.createPageMenuTab();this.tabContainer.appendChild(n);
+1),D=null,t=0;t<this.pages.length;t++)mxUtils.bind(this,function(g,l){this.pages[g]==this.currentPage?(l.className="geActivePage",l.style.backgroundColor=Editor.isDarkMode()?Editor.darkColor:"#fff"):l.className="geInactivePage";l.setAttribute("draggable","true");mxEvent.addListener(l,"dragstart",mxUtils.bind(this,function(q){b.isEnabled()?(mxClient.IS_FF&&q.dataTransfer.setData("Text","<diagram/>"),D=g):mxEvent.consume(q)}));mxEvent.addListener(l,"dragend",mxUtils.bind(this,function(q){D=null;q.stopPropagation();
+q.preventDefault()}));mxEvent.addListener(l,"dragover",mxUtils.bind(this,function(q){null!=D&&(q.dataTransfer.dropEffect="move");q.stopPropagation();q.preventDefault()}));mxEvent.addListener(l,"drop",mxUtils.bind(this,function(q){null!=D&&g!=D&&this.movePage(D,g);q.stopPropagation();q.preventDefault()}));e.appendChild(l)})(t,this.createTabForPage(this.pages[t],n,this.pages[t]!=this.currentPage,t+1));this.tabContainer.innerText="";this.tabContainer.appendChild(e);n=this.createPageMenuTab();this.tabContainer.appendChild(n);
n=null;this.isPageInsertTabVisible()&&(n=this.createPageInsertTab(),this.tabContainer.appendChild(n));if(e.clientWidth>this.tabContainer.clientWidth-k){null!=n&&(n.style.position="absolute",n.style.right="0px",e.style.marginRight="30px");var E=this.createControlTab(4,"&nbsp;&#10094;&nbsp;");E.style.position="absolute";E.style.right=this.editor.chromeless?"29px":"55px";E.style.fontSize="13pt";this.tabContainer.appendChild(E);var d=this.createControlTab(4,"&nbsp;&#10095;");d.style.position="absolute";
d.style.right=this.editor.chromeless?"0px":"29px";d.style.fontSize="13pt";this.tabContainer.appendChild(d);var f=Math.max(0,this.tabContainer.clientWidth-(this.editor.chromeless?86:116));e.style.width=f+"px";mxEvent.addListener(E,"click",mxUtils.bind(this,function(g){e.scrollLeft-=Math.max(20,f-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}));mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,
e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.addListener(d,"click",mxUtils.bind(this,function(g){e.scrollLeft+=Math.max(20,f-20);mxUtils.setOpacity(E,0<e.scrollLeft?100:50);mxUtils.setOpacity(d,e.scrollLeft<e.scrollWidth-e.clientWidth?100:50);mxEvent.consume(g)}))}}};EditorUi.prototype.isPageInsertTabVisible=function(){return 1==urlParams.embed||null!=this.getCurrentFile()&&this.getCurrentFile().isEditable()};
@@ -3857,9 +3873,9 @@ EditorUi.prototype.createTab=function(b){var e=document.createElement("div");e.s
this.tabContainer.style.backgroundColor;e.style.cursor="move";e.style.color="gray";b&&(mxEvent.addListener(e,"mouseenter",mxUtils.bind(this,function(k){this.editor.graph.isMouseDown||(e.style.backgroundColor=Editor.isDarkMode()?"black":"#e8eaed",mxEvent.consume(k))})),mxEvent.addListener(e,"mouseleave",mxUtils.bind(this,function(k){e.style.backgroundColor=this.tabContainer.style.backgroundColor;mxEvent.consume(k)})));return e};
EditorUi.prototype.createControlTab=function(b,e,k){k=this.createTab(null!=k?k:!0);k.style.lineHeight=this.tabContainerHeight+"px";k.style.paddingTop=b+"px";k.style.cursor="pointer";k.style.width="30px";k.innerHTML=e;null!=k.firstChild&&null!=k.firstChild.style&&mxUtils.setOpacity(k.firstChild,40);return k};EditorUi.prototype.getShortPageName=function(b){b=b.getName();36<b.length&&(b=b.substring(0,34)+"...");return b};
EditorUi.prototype.createPageMenuTab=function(b,e){b=this.createControlTab(3,'<div class="geSprite geSprite-dots"></div>',b);b.setAttribute("title",mxResources.get("pages"));b.style.position="absolute";b.style.marginLeft="0px";b.style.top="0px";b.style.left="1px";var k=b.getElementsByTagName("div")[0];k.style.display="inline-block";k.style.marginTop="5px";k.style.width="21px";k.style.height="21px";mxEvent.addListener(b,"click",mxUtils.bind(this,function(n){this.editor.graph.popupMenuHandler.hideMenu();
-var D=new mxPopupMenu(mxUtils.bind(this,function(d,f){var g=mxUtils.bind(this,function(){for(var F=0;F<this.pages.length;F++)mxUtils.bind(this,function(C){var I=d.addItem(this.getShortPageName(this.pages[C]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[C])}),f),G=this.pages[C].getId();I.setAttribute("title",this.pages[C].getName()+" ("+(C+1)+"/"+this.pages.length+")"+(null!=G?" ["+G+"]":""));this.pages[C]==this.currentPage&&d.addCheckmark(I,Editor.checkmarkImage)})(F)}),m=mxUtils.bind(this,
-function(){d.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),f)});e||g();if(this.editor.graph.isEnabled()){e||(d.addSeparator(f),m());var q=this.currentPage;if(null!=q){d.addSeparator(f);var z=this.getShortPageName(q);d.addItem(mxResources.get("removeIt",[z]),null,mxUtils.bind(this,function(){this.removePage(q)}),f);d.addItem(mxResources.get("renameIt",[z]),null,mxUtils.bind(this,function(){this.renamePage(q,q.getName())}),f);e||d.addSeparator(f);d.addItem(mxResources.get("duplicateIt",
-[z]),null,mxUtils.bind(this,function(){this.duplicatePage(q,mxResources.get("copyOf",[q.getName()]))}),f)}}e&&(d.addSeparator(f),m(),d.addSeparator(f),g())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var t=mxEvent.getClientX(n),E=mxEvent.getClientY(n);D.popup(t,E,null,n);this.setCurrentMenu(D);mxEvent.consume(n)}));return b};
+var D=new mxPopupMenu(mxUtils.bind(this,function(d,f){var g=mxUtils.bind(this,function(){for(var F=0;F<this.pages.length;F++)mxUtils.bind(this,function(C){var I=d.addItem(this.getShortPageName(this.pages[C]),null,mxUtils.bind(this,function(){this.selectPage(this.pages[C])}),f),G=this.pages[C].getId();I.setAttribute("title",this.pages[C].getName()+" ("+(C+1)+"/"+this.pages.length+")"+(null!=G?" ["+G+"]":""));this.pages[C]==this.currentPage&&d.addCheckmark(I,Editor.checkmarkImage)})(F)}),l=mxUtils.bind(this,
+function(){d.addItem(mxResources.get("insertPage"),null,mxUtils.bind(this,function(){this.insertPage()}),f)});e||g();if(this.editor.graph.isEnabled()){e||(d.addSeparator(f),l());var q=this.currentPage;if(null!=q){d.addSeparator(f);var z=this.getShortPageName(q);d.addItem(mxResources.get("removeIt",[z]),null,mxUtils.bind(this,function(){this.removePage(q)}),f);d.addItem(mxResources.get("renameIt",[z]),null,mxUtils.bind(this,function(){this.renamePage(q,q.getName())}),f);e||d.addSeparator(f);d.addItem(mxResources.get("duplicateIt",
+[z]),null,mxUtils.bind(this,function(){this.duplicatePage(q,mxResources.get("copyOf",[q.getName()]))}),f)}}e&&(d.addSeparator(f),l(),d.addSeparator(f),g())}));D.div.className+=" geMenubarMenu";D.smartSeparators=!0;D.showDisabled=!0;D.autoExpand=!0;D.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(D,arguments);D.destroy()});var t=mxEvent.getClientX(n),E=mxEvent.getClientY(n);D.popup(t,E,null,n);this.setCurrentMenu(D);mxEvent.consume(n)}));return b};
EditorUi.prototype.createPageInsertTab=function(){var b=this.createControlTab(4,'<div class="geSprite geSprite-plus"></div>');b.setAttribute("title",mxResources.get("insertPage"));mxEvent.addListener(b,"click",mxUtils.bind(this,function(k){this.insertPage();mxEvent.consume(k)}));var e=b.getElementsByTagName("div")[0];e.style.display="inline-block";e.style.width="21px";e.style.height="21px";return b};
EditorUi.prototype.createTabForPage=function(b,e,k,n){k=this.createTab(k);var D=b.getName()||mxResources.get("untitled"),t=b.getId();k.setAttribute("title",D+(null!=t?" ("+t+")":"")+" ["+n+"]");mxUtils.write(k,D);k.style.maxWidth=e+"px";k.style.width=e+"px";this.addTabListeners(b,k);42<e&&(k.style.textOverflow="ellipsis");return k};
EditorUi.prototype.addTabListeners=function(b,e){mxEvent.disableContextMenu(e);var k=this.editor.graph;mxEvent.addListener(e,"dblclick",mxUtils.bind(this,function(t){this.renamePage(b);mxEvent.consume(t)}));var n=!1,D=!1;mxEvent.addGestureListeners(e,mxUtils.bind(this,function(t){n=null!=this.currentMenu;D=b==this.currentPage;k.isMouseDown||D||this.selectPage(b)}),null,mxUtils.bind(this,function(t){if(k.isEnabled()&&!k.isMouseDown&&(mxEvent.isTouchEvent(t)&&D||mxEvent.isPopupTrigger(t))){k.popupMenuHandler.hideMenu();
@@ -3867,7 +3883,7 @@ this.hideCurrentMenu();if(!mxEvent.isTouchEvent(t)||!n){var E=new mxPopupMenu(th
EditorUi.prototype.getLinkForPage=function(b,e,k){if(!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp){var n=this.getCurrentFile();if(null!=n&&n.constructor!=LocalFile&&"draw.io"==this.getServiceName()){var D=this.getSearch("create title mode url drive splash state clibs ui viewbox hide-pages sketch".split(" "));D+=(0==D.length?"?":"&")+"page-id="+b.getId();null!=e&&(D+="&"+e.join("&"));return(k&&"1"!=urlParams.dev?EditorUi.lightboxHost:mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||!/.*\.draw\.io$/.test(window.location.hostname)?
EditorUi.drawHost:"https://"+window.location.host)+"/"+D+"#"+n.getHash()}}return null};
EditorUi.prototype.createPageMenu=function(b,e){return mxUtils.bind(this,function(k,n){var D=this.editor.graph;k.addItem(mxResources.get("insert"),null,mxUtils.bind(this,function(){this.insertPage(null,mxUtils.indexOf(this.pages,b)+1)}),n);k.addItem(mxResources.get("delete"),null,mxUtils.bind(this,function(){this.removePage(b)}),n);k.addItem(mxResources.get("rename"),null,mxUtils.bind(this,function(){this.renamePage(b,e)}),n);null!=this.getLinkForPage(b)&&(k.addSeparator(n),k.addItem(mxResources.get("link"),
-null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,E,d,f,g,m){t=this.createUrlParameters(t,E,d,f,g,m);d||t.push("hide-pages=1");D.isSelectionEmpty()||(d=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,g=D.view.scale,d.width/=g,d.height/=g,d.x=d.x/g-E.x,d.y=d.y/g-E.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
+null,mxUtils.bind(this,function(){this.showPublishLinkDialog(mxResources.get("url"),!0,null,null,mxUtils.bind(this,function(t,E,d,f,g,l){t=this.createUrlParameters(t,E,d,f,g,l);d||t.push("hide-pages=1");D.isSelectionEmpty()||(d=D.getBoundingBox(D.getSelectionCells()),E=D.view.translate,g=D.view.scale,d.width/=g,d.height/=g,d.x=d.x/g-E.x,d.y=d.y/g-E.y,t.push("viewbox="+encodeURIComponent(JSON.stringify({x:Math.round(d.x),y:Math.round(d.y),width:Math.round(d.width),height:Math.round(d.height),border:100}))));
f=new EmbedDialog(this,this.getLinkForPage(b,t,f));this.showDialog(f.container,450,240,!0,!0);f.init()}))})));k.addSeparator(n);k.addItem(mxResources.get("duplicate"),null,mxUtils.bind(this,function(){this.duplicatePage(b,mxResources.get("copyOf",[b.getName()]))}),n);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||"draw.io"!=this.getServiceName()||(k.addSeparator(n),k.addItem(mxResources.get("openInNewWindow"),null,mxUtils.bind(this,function(){this.editor.editAsNew(this.getFileData(!0,null,null,null,
!0,!0))}),n))})};(function(){var b=EditorUi.prototype.refresh;EditorUi.prototype.refresh=function(){b.apply(this,arguments);this.updateTabContainer()}})();(function(){mxCodecRegistry.getCodec(ChangePageSetup).exclude.push("page")})();(function(){var b=new mxObjectCodec(new MovePage,["ui"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.oldIndex;n.oldIndex=n.newIndex;n.newIndex=e;return n};mxCodecRegistry.register(b)})();
(function(){var b=new mxObjectCodec(new RenamePage,["ui","page"]);b.beforeDecode=function(e,k,n){n.ui=e.ui;return k};b.afterDecode=function(e,k,n){e=n.previous;n.previous=n.name;n.name=e;return n};mxCodecRegistry.register(b)})();
@@ -3875,75 +3891,75 @@ f=new EmbedDialog(this,this.getLinkForPage(b,t,f));this.showDialog(f.container,4
n));return n};b.beforeDecode=function(e,k,n){n.ui=e.ui;n.relatedPage=n.ui.getPageById(k.getAttribute("relatedPage"));if(null==n.relatedPage){var D=k.ownerDocument.createElement("diagram");D.setAttribute("id",k.getAttribute("relatedPage"));D.setAttribute("name",k.getAttribute("name"));n.relatedPage=new DiagramPage(D);D=k.getAttribute("viewState");null!=D&&(n.relatedPage.viewState=JSON.parse(D),k.removeAttribute("viewState"));k=k.cloneNode(!0);D=k.firstChild;if(null!=D)for(n.relatedPage.root=e.decodeCell(D,
!1),n=D.nextSibling,D.parentNode.removeChild(D),D=n;null!=D;){n=D.nextSibling;if(D.nodeType==mxConstants.NODETYPE_ELEMENT){var t=D.getAttribute("id");null==e.lookup(t)&&e.decodeCell(D)}D.parentNode.removeChild(D);D=n}}return k};b.afterDecode=function(e,k,n){n.index=n.previousIndex;return n};mxCodecRegistry.register(b)})();(function(){EditorUi.prototype.altShiftActions[68]="selectDescendants";var b=Graph.prototype.foldCells;Graph.prototype.foldCells=function(n,D,t,E,d){D=null!=D?D:!1;null==t&&(t=this.getFoldableCells(this.getSelectionCells(),n));this.stopEditing();this.model.beginUpdate();try{for(var f=t.slice(),g=0;g<t.length;g++)"1"==mxUtils.getValue(this.getCurrentCellStyle(t[g]),"treeFolding","0")&&this.foldTreeCell(n,t[g]);t=f;t=b.apply(this,arguments)}finally{this.model.endUpdate()}return t};Graph.prototype.foldTreeCell=
function(n,D){this.model.beginUpdate();try{var t=[];this.traverse(D,!0,mxUtils.bind(this,function(d,f){var g=null!=f&&this.isTreeEdge(f);g&&t.push(f);d==D||null!=f&&!g||t.push(d);return(null==f||g)&&(d==D||!this.model.isCollapsed(d))}));this.model.setCollapsed(D,n);for(var E=0;E<t.length;E++)this.model.setVisible(t[E],!n)}finally{this.model.endUpdate()}};Graph.prototype.isTreeEdge=function(n){return!this.isEdgeIgnored(n)};Graph.prototype.getTreeEdges=function(n,D,t,E,d,f){return this.model.filterCells(this.getEdges(n,
-D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(M){return I.isVertex(M)&&t(M)}function D(M){var ia=
-!1;null!=M&&(ia="1"==C.getCurrentCellStyle(M).treeMoving);return ia}function t(M){var ia=!1;null!=M&&(M=I.getParent(M),ia=C.view.getState(M),ia="tree"==(null!=ia?ia.style:C.getCellStyle(M)).containerType);return ia}function E(M){var ia=!1;null!=M&&(M=I.getParent(M),ia=C.view.getState(M),C.view.getState(M),ia=null!=(null!=ia?ia.style:C.getCellStyle(M)).childLayout);return ia}function d(M){M=C.view.getState(M);if(null!=M){var ia=C.getIncomingTreeEdges(M.cell);if(0<ia.length&&(ia=C.view.getState(ia[0]),
-null!=ia&&(ia=ia.absolutePoints,null!=ia&&0<ia.length&&(ia=ia[ia.length-1],null!=ia)))){if(ia.y==M.y&&Math.abs(ia.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_SOUTH;if(ia.y==M.y+M.height&&Math.abs(ia.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_NORTH;if(ia.x>M.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(M,ia){ia=null!=ia?ia:!0;C.model.beginUpdate();try{var N=C.model.getParent(M),P=C.getIncomingTreeEdges(M),aa=C.cloneCells([P[0],
-M]);C.model.setTerminal(aa[0],C.model.getTerminal(P[0],!0),!0);var la=d(M),u=N.geometry;la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?aa[1].geometry.x+=ia?M.geometry.width+10:-aa[1].geometry.width-10:aa[1].geometry.y+=ia?M.geometry.height+10:-aa[1].geometry.height-10;C.view.currentRoot!=N&&(aa[1].geometry.x-=u.x,aa[1].geometry.y-=u.y);var H=C.view.getState(M),Q=C.view.scale;if(null!=H){var X=mxRectangle.fromRectangle(H);la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH?
-X.x+=(ia?M.geometry.width+10:-aa[1].geometry.width-10)*Q:X.y+=(ia?M.geometry.height+10:-aa[1].geometry.height-10)*Q;var R=C.getOutgoingTreeEdges(C.model.getTerminal(P[0],!0));if(null!=R){for(var ca=la==mxConstants.DIRECTION_SOUTH||la==mxConstants.DIRECTION_NORTH,ea=u=P=0;ea<R.length;ea++){var da=C.model.getTerminal(R[ea],!1);if(la==d(da)){var qa=C.view.getState(da);da!=M&&null!=qa&&(ca&&ia!=qa.getCenterX()<H.getCenterX()||!ca&&ia!=qa.getCenterY()<H.getCenterY())&&mxUtils.intersects(X,qa)&&(P=10+Math.max(P,
-(Math.min(X.x+X.width,qa.x+qa.width)-Math.max(X.x,qa.x))/Q),u=10+Math.max(u,(Math.min(X.y+X.height,qa.y+qa.height)-Math.max(X.y,qa.y))/Q))}}ca?u=0:P=0;for(ea=0;ea<R.length;ea++)if(da=C.model.getTerminal(R[ea],!1),la==d(da)&&(qa=C.view.getState(da),da!=M&&null!=qa&&(ca&&ia!=qa.getCenterX()<H.getCenterX()||!ca&&ia!=qa.getCenterY()<H.getCenterY()))){var va=[];C.traverse(qa.cell,!0,function(ua,Aa){var za=null!=Aa&&C.isTreeEdge(Aa);za&&va.push(Aa);(null==Aa||za)&&va.push(ua);return null==Aa||za});C.moveCells(va,
-(ia?1:-1)*P,(ia?1:-1)*u)}}}return C.addCells(aa,N)}finally{C.model.endUpdate()}}function g(M){C.model.beginUpdate();try{var ia=d(M),N=C.getIncomingTreeEdges(M),P=C.cloneCells([N[0],M]);C.model.setTerminal(N[0],P[1],!1);C.model.setTerminal(P[0],P[1],!0);C.model.setTerminal(P[0],M,!1);var aa=C.model.getParent(M),la=aa.geometry,u=[];C.view.currentRoot!=aa&&(P[1].geometry.x-=la.x,P[1].geometry.y-=la.y);C.traverse(M,!0,function(X,R){var ca=null!=R&&C.isTreeEdge(R);ca&&u.push(R);(null==R||ca)&&u.push(X);
-return null==R||ca});var H=M.geometry.width+40,Q=M.geometry.height+40;ia==mxConstants.DIRECTION_SOUTH?H=0:ia==mxConstants.DIRECTION_NORTH?(H=0,Q=-Q):ia==mxConstants.DIRECTION_WEST?(H=-H,Q=0):ia==mxConstants.DIRECTION_EAST&&(Q=0);C.moveCells(u,H,Q);return C.addCells(P,aa)}finally{C.model.endUpdate()}}function m(M,ia){C.model.beginUpdate();try{var N=C.model.getParent(M),P=C.getIncomingTreeEdges(M),aa=d(M);0==P.length&&(P=[C.createEdge(N,null,"",null,null,C.createCurrentEdgeStyle())],aa=ia);var la=C.cloneCells([P[0],
-M]);C.model.setTerminal(la[0],M,!0);if(null==C.model.getTerminal(la[0],!1)){C.model.setTerminal(la[0],la[1],!1);var u=C.getCellStyle(la[1]).newEdgeStyle;if(null!=u)try{var H=JSON.parse(u),Q;for(Q in H)C.setCellStyles(Q,H[Q],[la[0]]),"edgeStyle"==Q&&"elbowEdgeStyle"==H[Q]&&C.setCellStyles("elbow",aa==mxConstants.DIRECTION_SOUTH||aa==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[la[0]])}catch(qa){}}P=C.getOutgoingTreeEdges(M);var X=N.geometry;ia=[];C.view.currentRoot==N&&(X=new mxRectangle);for(u=
-0;u<P.length;u++){var R=C.model.getTerminal(P[u],!1);null!=R&&ia.push(R)}var ca=C.view.getBounds(ia),ea=C.view.translate,da=C.view.scale;aa==mxConstants.DIRECTION_SOUTH?(la[1].geometry.x=null==ca?M.geometry.x+(M.geometry.width-la[1].geometry.width)/2:(ca.x+ca.width)/da-ea.x-X.x+10,la[1].geometry.y+=la[1].geometry.height-X.y+40):aa==mxConstants.DIRECTION_NORTH?(la[1].geometry.x=null==ca?M.geometry.x+(M.geometry.width-la[1].geometry.width)/2:(ca.x+ca.width)/da-ea.x+-X.x+10,la[1].geometry.y-=la[1].geometry.height+
-X.y+40):(la[1].geometry.x=aa==mxConstants.DIRECTION_WEST?la[1].geometry.x-(la[1].geometry.width+X.x+40):la[1].geometry.x+(la[1].geometry.width-X.x+40),la[1].geometry.y=null==ca?M.geometry.y+(M.geometry.height-la[1].geometry.height)/2:(ca.y+ca.height)/da-ea.y+-X.y+10);return C.addCells(la,N)}finally{C.model.endUpdate()}}function q(M,ia,N){M=C.getOutgoingTreeEdges(M);N=C.view.getState(N);var P=[];if(null!=N&&null!=M){for(var aa=0;aa<M.length;aa++){var la=C.view.getState(C.model.getTerminal(M[aa],!1));
-null!=la&&(!ia&&Math.min(la.x+la.width,N.x+N.width)>=Math.max(la.x,N.x)||ia&&Math.min(la.y+la.height,N.y+N.height)>=Math.max(la.y,N.y))&&P.push(la)}P.sort(function(u,H){return ia?u.x+u.width-H.x-H.width:u.y+u.height-H.y-H.height})}return P}function z(M,ia){var N=d(M),P=ia==mxConstants.DIRECTION_EAST||ia==mxConstants.DIRECTION_WEST;(N==mxConstants.DIRECTION_EAST||N==mxConstants.DIRECTION_WEST)==P&&N!=ia?F.actions.get("selectParent").funct():N==ia?(ia=C.getOutgoingTreeEdges(M),null!=ia&&0<ia.length&&
-C.setSelectionCell(C.model.getTerminal(ia[0],!1))):(N=C.getIncomingTreeEdges(M),null!=N&&0<N.length&&(P=q(C.model.getTerminal(N[0],!0),P,M),M=C.view.getState(M),null!=M&&(M=mxUtils.indexOf(P,M),0<=M&&(M+=ia==mxConstants.DIRECTION_NORTH||ia==mxConstants.DIRECTION_WEST?-1:1,0<=M&&M<=P.length-1&&C.setSelectionCell(P[M].cell)))))}var F=this,C=F.editor.graph,I=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(M,ia,N){G.apply(this,arguments);if(1==C.getSelectionCount()){ia=C.getSelectionCell();
-var P=C.getOutgoingTreeEdges(ia);M.addSeparator();0<P.length&&(n(C.getSelectionCell())&&this.addMenuItems(M,["selectChildren"],null,N),this.addMenuItems(M,["selectDescendants"],null,N));n(C.getSelectionCell())?(M.addSeparator(),0<C.getIncomingTreeEdges(ia).length&&this.addMenuItems(M,["selectSiblings","selectParent"],null,N)):0<C.model.getEdgeCount(ia)&&this.addMenuItems(M,["selectConnections"],null,N)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=
-C.getSelectionCell();M=C.getOutgoingTreeEdges(M);if(null!=M){for(var ia=[],N=0;N<M.length;N++)ia.push(C.model.getTerminal(M[N],!1));C.setSelectionCells(ia)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=C.getSelectionCell();M=C.getIncomingTreeEdges(M);if(null!=M&&0<M.length&&(M=C.getOutgoingTreeEdges(C.model.getTerminal(M[0],!0)),null!=M)){for(var ia=[],N=0;N<M.length;N++)ia.push(C.model.getTerminal(M[N],!1));C.setSelectionCells(ia)}}},
-null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=C.getSelectionCell();M=C.getIncomingTreeEdges(M);null!=M&&0<M.length&&C.setSelectionCell(C.model.getTerminal(M[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(M,ia){M=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(M)){if(null!=ia&&mxEvent.isAltDown(ia))C.setSelectionCells(C.model.getTreeEdges(M,null==ia||!mxEvent.isShiftDown(ia),null==
-ia||!mxEvent.isControlDown(ia)));else{var N=[];C.traverse(M,!0,function(P,aa){var la=null!=aa&&C.isTreeEdge(aa);la&&N.push(aa);null!=aa&&!la||null!=ia&&mxEvent.isShiftDown(ia)||N.push(P);return null==aa||la})}C.setSelectionCells(N)}},null,null,"Alt+Shift+D");var Z=C.removeCells;C.removeCells=function(M,ia){ia=null!=ia?ia:!0;null==M&&(M=this.getDeletableCells(this.getSelectionCells()));ia&&(M=this.getDeletableCells(this.addAllEdges(M)));for(var N=[],P=0;P<M.length;P++){var aa=M[P];I.isEdge(aa)&&t(aa)&&
-(N.push(aa),aa=I.getTerminal(aa,!1));if(n(aa)){var la=[];C.traverse(aa,!0,function(u,H){var Q=null!=H&&C.isTreeEdge(H);Q&&la.push(H);(null==H||Q)&&la.push(u);return null==H||Q});0<la.length&&(N=N.concat(la),aa=C.getIncomingTreeEdges(M[P]),M=M.concat(aa))}else null!=aa&&N.push(M[P])}M=N;return Z.apply(this,arguments)};F.hoverIcons.getStateAt=function(M,ia,N){return n(M.cell)?null:this.graph.view.getState(this.graph.getCellAt(ia,N))};var fa=C.duplicateCells;C.duplicateCells=function(M,ia){M=null!=M?
-M:this.getSelectionCells();for(var N=M.slice(0),P=0;P<N.length;P++){var aa=C.view.getState(N[P]);if(null!=aa&&n(aa.cell)){var la=C.getIncomingTreeEdges(aa.cell);for(aa=0;aa<la.length;aa++)mxUtils.remove(la[aa],M)}}this.model.beginUpdate();try{var u=fa.call(this,M,ia);if(u.length==M.length)for(P=0;P<M.length;P++)if(n(M[P])){var H=C.getIncomingTreeEdges(u[P]);la=C.getIncomingTreeEdges(M[P]);if(0==H.length&&0<la.length){var Q=this.cloneCell(la[0]);this.addEdge(Q,C.getDefaultParent(),this.model.getTerminal(la[0],
-!0),u[P])}}}finally{this.model.endUpdate()}return u};var ba=C.moveCells;C.moveCells=function(M,ia,N,P,aa,la,u){var H=null;this.model.beginUpdate();try{var Q=aa,X=this.getCurrentCellStyle(aa);if(null!=M&&n(aa)&&"1"==mxUtils.getValue(X,"treeFolding","0")){for(var R=0;R<M.length;R++)if(n(M[R])||C.model.isEdge(M[R])&&null==C.model.getTerminal(M[R],!0)){aa=C.model.getParent(M[R]);break}if(null!=Q&&aa!=Q&&null!=this.view.getState(M[0])){var ca=C.getIncomingTreeEdges(M[0]);if(0<ca.length){var ea=C.view.getState(C.model.getTerminal(ca[0],
-!0));if(null!=ea){var da=C.view.getState(Q);null!=da&&(ia=(da.getCenterX()-ea.getCenterX())/C.view.scale,N=(da.getCenterY()-ea.getCenterY())/C.view.scale)}}}}H=ba.apply(this,arguments);if(null!=H&&null!=M&&H.length==M.length)for(R=0;R<H.length;R++)if(this.model.isEdge(H[R]))n(Q)&&0>mxUtils.indexOf(H,this.model.getTerminal(H[R],!0))&&this.model.setTerminal(H[R],Q,!0);else if(n(M[R])&&(ca=C.getIncomingTreeEdges(M[R]),0<ca.length))if(!P)n(Q)&&0>mxUtils.indexOf(M,this.model.getTerminal(ca[0],!0))&&this.model.setTerminal(ca[0],
-Q,!0);else if(0==C.getIncomingTreeEdges(H[R]).length){X=Q;if(null==X||X==C.model.getParent(M[R]))X=C.model.getTerminal(ca[0],!0);P=this.cloneCell(ca[0]);this.addEdge(P,C.getDefaultParent(),X,H[R])}}finally{this.model.endUpdate()}return H};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(M,ia,N,P){var aa=C.model,la=null;aa.beginUpdate();try{if(la=Y.apply(this,arguments),n(M))for(var u=0;u<la.length;u++)if(aa.isEdge(la[u])&&null==aa.getTerminal(la[u],!0)){aa.setTerminal(la[u],
-M,!0);var H=C.getCellGeometry(la[u]);H.points=null;null!=H.getTerminalPoint(!0)&&H.setTerminalPoint(null,!0)}}finally{aa.endUpdate()}return la}}var pa={88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},O=F.onKeyDown;F.onKeyDown=function(M){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var ia=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==M.which?ia=mxEvent.isShiftDown(M)?
-g(C.getSelectionCell()):m(C.getSelectionCell()):13==M.which&&(ia=f(C.getSelectionCell(),!mxEvent.isShiftDown(M))));if(null!=ia&&0<ia.length)1==ia.length&&C.model.isEdge(ia[0])?C.setSelectionCell(C.model.getTerminal(ia[0],!1)):C.setSelectionCell(ia[ia.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(M);else if(mxEvent.isAltDown(M)&&mxEvent.isShiftDown(M)){var N=pa[M.keyCode];null!=N&&(N.funct(M),mxEvent.consume(M))}else 37==
-M.keyCode?(z(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(M)):38==M.keyCode?(z(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(M)):39==M.keyCode?(z(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(M)):40==M.keyCode&&(z(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(M))}}catch(P){F.handleError(P)}mxEvent.isConsumed(M)||O.apply(this,arguments)};var W=C.connectVertex;C.connectVertex=function(M,ia,N,P,aa,la,u){var H=C.getIncomingTreeEdges(M);
-if(n(M)){var Q=d(M),X=Q==mxConstants.DIRECTION_EAST||Q==mxConstants.DIRECTION_WEST,R=ia==mxConstants.DIRECTION_EAST||ia==mxConstants.DIRECTION_WEST;return Q==ia||0==H.length?m(M,ia):X==R?g(M):f(M,ia!=mxConstants.DIRECTION_NORTH&&ia!=mxConstants.DIRECTION_WEST)}return W.apply(this,arguments)};C.getSubtree=function(M){var ia=[M];!D(M)&&!n(M)||E(M)||C.traverse(M,!0,function(N,P){var aa=null!=P&&C.isTreeEdge(P);aa&&0>mxUtils.indexOf(ia,P)&&ia.push(P);(null==P||aa)&&0>mxUtils.indexOf(ia,N)&&ia.push(N);
-return null==P||aa});return ia};var ha=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ha.apply(this,arguments);(D(this.state.cell)||n(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height=
-"24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(M){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(M),mxEvent.getClientY(M),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(M);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(M)})))};var U=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
-function(){U.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var ma=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(M){ma.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=M?"":"none")};var T=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
-function(M,ia){T.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=
+D,t,E,d,f),mxUtils.bind(this,function(g){return this.isTreeEdge(g)}))};Graph.prototype.getIncomingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!0,!1,!1)};Graph.prototype.getOutgoingTreeEdges=function(n,D){return this.getTreeEdges(n,D,!1,!0,!1)};var e=EditorUi.prototype.init;EditorUi.prototype.init=function(){e.apply(this,arguments);this.editor.isChromelessView()&&!this.editor.editable||this.addTrees()};EditorUi.prototype.addTrees=function(){function n(M){return I.isVertex(M)&&t(M)}function D(M){var ka=
+!1;null!=M&&(ka="1"==C.getCurrentCellStyle(M).treeMoving);return ka}function t(M){var ka=!1;null!=M&&(M=I.getParent(M),ka=C.view.getState(M),ka="tree"==(null!=ka?ka.style:C.getCellStyle(M)).containerType);return ka}function E(M){var ka=!1;null!=M&&(M=I.getParent(M),ka=C.view.getState(M),C.view.getState(M),ka=null!=(null!=ka?ka.style:C.getCellStyle(M)).childLayout);return ka}function d(M){M=C.view.getState(M);if(null!=M){var ka=C.getIncomingTreeEdges(M.cell);if(0<ka.length&&(ka=C.view.getState(ka[0]),
+null!=ka&&(ka=ka.absolutePoints,null!=ka&&0<ka.length&&(ka=ka[ka.length-1],null!=ka)))){if(ka.y==M.y&&Math.abs(ka.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_SOUTH;if(ka.y==M.y+M.height&&Math.abs(ka.x-M.getCenterX())<M.width/2)return mxConstants.DIRECTION_NORTH;if(ka.x>M.getCenterX())return mxConstants.DIRECTION_WEST}}return mxConstants.DIRECTION_EAST}function f(M,ka){ka=null!=ka?ka:!0;C.model.beginUpdate();try{var L=C.model.getParent(M),S=C.getIncomingTreeEdges(M),ja=C.cloneCells([S[0],
+M]);C.model.setTerminal(ja[0],C.model.getTerminal(S[0],!0),!0);var ma=d(M),u=L.geometry;ma==mxConstants.DIRECTION_SOUTH||ma==mxConstants.DIRECTION_NORTH?ja[1].geometry.x+=ka?M.geometry.width+10:-ja[1].geometry.width-10:ja[1].geometry.y+=ka?M.geometry.height+10:-ja[1].geometry.height-10;C.view.currentRoot!=L&&(ja[1].geometry.x-=u.x,ja[1].geometry.y-=u.y);var H=C.view.getState(M),P=C.view.scale;if(null!=H){var V=mxRectangle.fromRectangle(H);ma==mxConstants.DIRECTION_SOUTH||ma==mxConstants.DIRECTION_NORTH?
+V.x+=(ka?M.geometry.width+10:-ja[1].geometry.width-10)*P:V.y+=(ka?M.geometry.height+10:-ja[1].geometry.height-10)*P;var Q=C.getOutgoingTreeEdges(C.model.getTerminal(S[0],!0));if(null!=Q){for(var da=ma==mxConstants.DIRECTION_SOUTH||ma==mxConstants.DIRECTION_NORTH,ea=u=S=0;ea<Q.length;ea++){var fa=C.model.getTerminal(Q[ea],!1);if(ma==d(fa)){var pa=C.view.getState(fa);fa!=M&&null!=pa&&(da&&ka!=pa.getCenterX()<H.getCenterX()||!da&&ka!=pa.getCenterY()<H.getCenterY())&&mxUtils.intersects(V,pa)&&(S=10+Math.max(S,
+(Math.min(V.x+V.width,pa.x+pa.width)-Math.max(V.x,pa.x))/P),u=10+Math.max(u,(Math.min(V.y+V.height,pa.y+pa.height)-Math.max(V.y,pa.y))/P))}}da?u=0:S=0;for(ea=0;ea<Q.length;ea++)if(fa=C.model.getTerminal(Q[ea],!1),ma==d(fa)&&(pa=C.view.getState(fa),fa!=M&&null!=pa&&(da&&ka!=pa.getCenterX()<H.getCenterX()||!da&&ka!=pa.getCenterY()<H.getCenterY()))){var ua=[];C.traverse(pa.cell,!0,function(qa,Da){var Aa=null!=Da&&C.isTreeEdge(Da);Aa&&ua.push(Da);(null==Da||Aa)&&ua.push(qa);return null==Da||Aa});C.moveCells(ua,
+(ka?1:-1)*S,(ka?1:-1)*u)}}}return C.addCells(ja,L)}finally{C.model.endUpdate()}}function g(M){C.model.beginUpdate();try{var ka=d(M),L=C.getIncomingTreeEdges(M),S=C.cloneCells([L[0],M]);C.model.setTerminal(L[0],S[1],!1);C.model.setTerminal(S[0],S[1],!0);C.model.setTerminal(S[0],M,!1);var ja=C.model.getParent(M),ma=ja.geometry,u=[];C.view.currentRoot!=ja&&(S[1].geometry.x-=ma.x,S[1].geometry.y-=ma.y);C.traverse(M,!0,function(V,Q){var da=null!=Q&&C.isTreeEdge(Q);da&&u.push(Q);(null==Q||da)&&u.push(V);
+return null==Q||da});var H=M.geometry.width+40,P=M.geometry.height+40;ka==mxConstants.DIRECTION_SOUTH?H=0:ka==mxConstants.DIRECTION_NORTH?(H=0,P=-P):ka==mxConstants.DIRECTION_WEST?(H=-H,P=0):ka==mxConstants.DIRECTION_EAST&&(P=0);C.moveCells(u,H,P);return C.addCells(S,ja)}finally{C.model.endUpdate()}}function l(M,ka){C.model.beginUpdate();try{var L=C.model.getParent(M),S=C.getIncomingTreeEdges(M),ja=d(M);0==S.length&&(S=[C.createEdge(L,null,"",null,null,C.createCurrentEdgeStyle())],ja=ka);var ma=C.cloneCells([S[0],
+M]);C.model.setTerminal(ma[0],M,!0);if(null==C.model.getTerminal(ma[0],!1)){C.model.setTerminal(ma[0],ma[1],!1);var u=C.getCellStyle(ma[1]).newEdgeStyle;if(null!=u)try{var H=JSON.parse(u),P;for(P in H)C.setCellStyles(P,H[P],[ma[0]]),"edgeStyle"==P&&"elbowEdgeStyle"==H[P]&&C.setCellStyles("elbow",ja==mxConstants.DIRECTION_SOUTH||ja==mxConstants.DIRECTION_NOTH?"vertical":"horizontal",[ma[0]])}catch(pa){}}S=C.getOutgoingTreeEdges(M);var V=L.geometry;ka=[];C.view.currentRoot==L&&(V=new mxRectangle);for(u=
+0;u<S.length;u++){var Q=C.model.getTerminal(S[u],!1);null!=Q&&ka.push(Q)}var da=C.view.getBounds(ka),ea=C.view.translate,fa=C.view.scale;ja==mxConstants.DIRECTION_SOUTH?(ma[1].geometry.x=null==da?M.geometry.x+(M.geometry.width-ma[1].geometry.width)/2:(da.x+da.width)/fa-ea.x-V.x+10,ma[1].geometry.y+=ma[1].geometry.height-V.y+40):ja==mxConstants.DIRECTION_NORTH?(ma[1].geometry.x=null==da?M.geometry.x+(M.geometry.width-ma[1].geometry.width)/2:(da.x+da.width)/fa-ea.x+-V.x+10,ma[1].geometry.y-=ma[1].geometry.height+
+V.y+40):(ma[1].geometry.x=ja==mxConstants.DIRECTION_WEST?ma[1].geometry.x-(ma[1].geometry.width+V.x+40):ma[1].geometry.x+(ma[1].geometry.width-V.x+40),ma[1].geometry.y=null==da?M.geometry.y+(M.geometry.height-ma[1].geometry.height)/2:(da.y+da.height)/fa-ea.y+-V.y+10);return C.addCells(ma,L)}finally{C.model.endUpdate()}}function q(M,ka,L){M=C.getOutgoingTreeEdges(M);L=C.view.getState(L);var S=[];if(null!=L&&null!=M){for(var ja=0;ja<M.length;ja++){var ma=C.view.getState(C.model.getTerminal(M[ja],!1));
+null!=ma&&(!ka&&Math.min(ma.x+ma.width,L.x+L.width)>=Math.max(ma.x,L.x)||ka&&Math.min(ma.y+ma.height,L.y+L.height)>=Math.max(ma.y,L.y))&&S.push(ma)}S.sort(function(u,H){return ka?u.x+u.width-H.x-H.width:u.y+u.height-H.y-H.height})}return S}function z(M,ka){var L=d(M),S=ka==mxConstants.DIRECTION_EAST||ka==mxConstants.DIRECTION_WEST;(L==mxConstants.DIRECTION_EAST||L==mxConstants.DIRECTION_WEST)==S&&L!=ka?F.actions.get("selectParent").funct():L==ka?(ka=C.getOutgoingTreeEdges(M),null!=ka&&0<ka.length&&
+C.setSelectionCell(C.model.getTerminal(ka[0],!1))):(L=C.getIncomingTreeEdges(M),null!=L&&0<L.length&&(S=q(C.model.getTerminal(L[0],!0),S,M),M=C.view.getState(M),null!=M&&(M=mxUtils.indexOf(S,M),0<=M&&(M+=ka==mxConstants.DIRECTION_NORTH||ka==mxConstants.DIRECTION_WEST?-1:1,0<=M&&M<=S.length-1&&C.setSelectionCell(S[M].cell)))))}var F=this,C=F.editor.graph,I=C.getModel(),G=F.menus.createPopupMenu;F.menus.createPopupMenu=function(M,ka,L){G.apply(this,arguments);if(1==C.getSelectionCount()){ka=C.getSelectionCell();
+var S=C.getOutgoingTreeEdges(ka);M.addSeparator();0<S.length&&(n(C.getSelectionCell())&&this.addMenuItems(M,["selectChildren"],null,L),this.addMenuItems(M,["selectDescendants"],null,L));n(C.getSelectionCell())?(M.addSeparator(),0<C.getIncomingTreeEdges(ka).length&&this.addMenuItems(M,["selectSiblings","selectParent"],null,L)):0<C.model.getEdgeCount(ka)&&this.addMenuItems(M,["selectConnections"],null,L)}};F.actions.addAction("selectChildren",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=
+C.getSelectionCell();M=C.getOutgoingTreeEdges(M);if(null!=M){for(var ka=[],L=0;L<M.length;L++)ka.push(C.model.getTerminal(M[L],!1));C.setSelectionCells(ka)}}},null,null,"Alt+Shift+X");F.actions.addAction("selectSiblings",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=C.getSelectionCell();M=C.getIncomingTreeEdges(M);if(null!=M&&0<M.length&&(M=C.getOutgoingTreeEdges(C.model.getTerminal(M[0],!0)),null!=M)){for(var ka=[],L=0;L<M.length;L++)ka.push(C.model.getTerminal(M[L],!1));C.setSelectionCells(ka)}}},
+null,null,"Alt+Shift+S");F.actions.addAction("selectParent",function(){if(C.isEnabled()&&1==C.getSelectionCount()){var M=C.getSelectionCell();M=C.getIncomingTreeEdges(M);null!=M&&0<M.length&&C.setSelectionCell(C.model.getTerminal(M[0],!0))}},null,null,"Alt+Shift+P");F.actions.addAction("selectDescendants",function(M,ka){M=C.getSelectionCell();if(C.isEnabled()&&C.model.isVertex(M)){if(null!=ka&&mxEvent.isAltDown(ka))C.setSelectionCells(C.model.getTreeEdges(M,null==ka||!mxEvent.isShiftDown(ka),null==
+ka||!mxEvent.isControlDown(ka)));else{var L=[];C.traverse(M,!0,function(S,ja){var ma=null!=ja&&C.isTreeEdge(ja);ma&&L.push(ja);null!=ja&&!ma||null!=ka&&mxEvent.isShiftDown(ka)||L.push(S);return null==ja||ma})}C.setSelectionCells(L)}},null,null,"Alt+Shift+D");var Z=C.removeCells;C.removeCells=function(M,ka){ka=null!=ka?ka:!0;null==M&&(M=this.getDeletableCells(this.getSelectionCells()));ka&&(M=this.getDeletableCells(this.addAllEdges(M)));for(var L=[],S=0;S<M.length;S++){var ja=M[S];I.isEdge(ja)&&t(ja)&&
+(L.push(ja),ja=I.getTerminal(ja,!1));if(n(ja)){var ma=[];C.traverse(ja,!0,function(u,H){var P=null!=H&&C.isTreeEdge(H);P&&ma.push(H);(null==H||P)&&ma.push(u);return null==H||P});0<ma.length&&(L=L.concat(ma),ja=C.getIncomingTreeEdges(M[S]),M=M.concat(ja))}else null!=ja&&L.push(M[S])}M=L;return Z.apply(this,arguments)};F.hoverIcons.getStateAt=function(M,ka,L){return n(M.cell)?null:this.graph.view.getState(this.graph.getCellAt(ka,L))};var ca=C.duplicateCells;C.duplicateCells=function(M,ka){M=null!=M?
+M:this.getSelectionCells();for(var L=M.slice(0),S=0;S<L.length;S++){var ja=C.view.getState(L[S]);if(null!=ja&&n(ja.cell)){var ma=C.getIncomingTreeEdges(ja.cell);for(ja=0;ja<ma.length;ja++)mxUtils.remove(ma[ja],M)}}this.model.beginUpdate();try{var u=ca.call(this,M,ka);if(u.length==M.length)for(S=0;S<M.length;S++)if(n(M[S])){var H=C.getIncomingTreeEdges(u[S]);ma=C.getIncomingTreeEdges(M[S]);if(0==H.length&&0<ma.length){var P=this.cloneCell(ma[0]);this.addEdge(P,C.getDefaultParent(),this.model.getTerminal(ma[0],
+!0),u[S])}}}finally{this.model.endUpdate()}return u};var ba=C.moveCells;C.moveCells=function(M,ka,L,S,ja,ma,u){var H=null;this.model.beginUpdate();try{var P=ja,V=this.getCurrentCellStyle(ja);if(null!=M&&n(ja)&&"1"==mxUtils.getValue(V,"treeFolding","0")){for(var Q=0;Q<M.length;Q++)if(n(M[Q])||C.model.isEdge(M[Q])&&null==C.model.getTerminal(M[Q],!0)){ja=C.model.getParent(M[Q]);break}if(null!=P&&ja!=P&&null!=this.view.getState(M[0])){var da=C.getIncomingTreeEdges(M[0]);if(0<da.length){var ea=C.view.getState(C.model.getTerminal(da[0],
+!0));if(null!=ea){var fa=C.view.getState(P);null!=fa&&(ka=(fa.getCenterX()-ea.getCenterX())/C.view.scale,L=(fa.getCenterY()-ea.getCenterY())/C.view.scale)}}}}H=ba.apply(this,arguments);if(null!=H&&null!=M&&H.length==M.length)for(Q=0;Q<H.length;Q++)if(this.model.isEdge(H[Q]))n(P)&&0>mxUtils.indexOf(H,this.model.getTerminal(H[Q],!0))&&this.model.setTerminal(H[Q],P,!0);else if(n(M[Q])&&(da=C.getIncomingTreeEdges(M[Q]),0<da.length))if(!S)n(P)&&0>mxUtils.indexOf(M,this.model.getTerminal(da[0],!0))&&this.model.setTerminal(da[0],
+P,!0);else if(0==C.getIncomingTreeEdges(H[Q]).length){V=P;if(null==V||V==C.model.getParent(M[Q]))V=C.model.getTerminal(da[0],!0);S=this.cloneCell(da[0]);this.addEdge(S,C.getDefaultParent(),V,H[Q])}}finally{this.model.endUpdate()}return H};if(null!=F.sidebar){var Y=F.sidebar.dropAndConnect;F.sidebar.dropAndConnect=function(M,ka,L,S){var ja=C.model,ma=null;ja.beginUpdate();try{if(ma=Y.apply(this,arguments),n(M))for(var u=0;u<ma.length;u++)if(ja.isEdge(ma[u])&&null==ja.getTerminal(ma[u],!0)){ja.setTerminal(ma[u],
+M,!0);var H=C.getCellGeometry(ma[u]);H.points=null;null!=H.getTerminalPoint(!0)&&H.setTerminalPoint(null,!0)}}finally{ja.endUpdate()}return ma}}var O={88:F.actions.get("selectChildren"),84:F.actions.get("selectSubtree"),80:F.actions.get("selectParent"),83:F.actions.get("selectSiblings")},la=F.onKeyDown;F.onKeyDown=function(M){try{if(C.isEnabled()&&!C.isEditing()&&n(C.getSelectionCell())&&1==C.getSelectionCount()){var ka=null;0<C.getIncomingTreeEdges(C.getSelectionCell()).length&&(9==M.which?ka=mxEvent.isShiftDown(M)?
+g(C.getSelectionCell()):l(C.getSelectionCell()):13==M.which&&(ka=f(C.getSelectionCell(),!mxEvent.isShiftDown(M))));if(null!=ka&&0<ka.length)1==ka.length&&C.model.isEdge(ka[0])?C.setSelectionCell(C.model.getTerminal(ka[0],!1)):C.setSelectionCell(ka[ka.length-1]),null!=F.hoverIcons&&F.hoverIcons.update(C.view.getState(C.getSelectionCell())),C.startEditingAtCell(C.getSelectionCell()),mxEvent.consume(M);else if(mxEvent.isAltDown(M)&&mxEvent.isShiftDown(M)){var L=O[M.keyCode];null!=L&&(L.funct(M),mxEvent.consume(M))}else 37==
+M.keyCode?(z(C.getSelectionCell(),mxConstants.DIRECTION_WEST),mxEvent.consume(M)):38==M.keyCode?(z(C.getSelectionCell(),mxConstants.DIRECTION_NORTH),mxEvent.consume(M)):39==M.keyCode?(z(C.getSelectionCell(),mxConstants.DIRECTION_EAST),mxEvent.consume(M)):40==M.keyCode&&(z(C.getSelectionCell(),mxConstants.DIRECTION_SOUTH),mxEvent.consume(M))}}catch(S){F.handleError(S)}mxEvent.isConsumed(M)||la.apply(this,arguments)};var aa=C.connectVertex;C.connectVertex=function(M,ka,L,S,ja,ma,u){var H=C.getIncomingTreeEdges(M);
+if(n(M)){var P=d(M),V=P==mxConstants.DIRECTION_EAST||P==mxConstants.DIRECTION_WEST,Q=ka==mxConstants.DIRECTION_EAST||ka==mxConstants.DIRECTION_WEST;return P==ka||0==H.length?l(M,ka):V==Q?g(M):f(M,ka!=mxConstants.DIRECTION_NORTH&&ka!=mxConstants.DIRECTION_WEST)}return aa.apply(this,arguments)};C.getSubtree=function(M){var ka=[M];!D(M)&&!n(M)||E(M)||C.traverse(M,!0,function(L,S){var ja=null!=S&&C.isTreeEdge(S);ja&&0>mxUtils.indexOf(ka,S)&&ka.push(S);(null==S||ja)&&0>mxUtils.indexOf(ka,L)&&ka.push(L);
+return null==S||ja});return ka};var ia=mxVertexHandler.prototype.init;mxVertexHandler.prototype.init=function(){ia.apply(this,arguments);(D(this.state.cell)||n(this.state.cell))&&!E(this.state.cell)&&0<this.graph.getOutgoingTreeEdges(this.state.cell).length&&(this.moveHandle=mxUtils.createImage(Editor.moveImage),this.moveHandle.setAttribute("title","Move Subtree"),this.moveHandle.style.position="absolute",this.moveHandle.style.cursor="pointer",this.moveHandle.style.width="24px",this.moveHandle.style.height=
+"24px",this.graph.container.appendChild(this.moveHandle),mxEvent.addGestureListeners(this.moveHandle,mxUtils.bind(this,function(M){this.graph.graphHandler.start(this.state.cell,mxEvent.getClientX(M),mxEvent.getClientY(M),this.graph.getSubtree(this.state.cell));this.graph.graphHandler.cellWasClicked=!0;this.graph.isMouseTrigger=mxEvent.isMouseEvent(M);this.graph.isMouseDown=!0;F.hoverIcons.reset();mxEvent.consume(M)})))};var X=mxVertexHandler.prototype.redrawHandles;mxVertexHandler.prototype.redrawHandles=
+function(){X.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.left=this.state.x+this.state.width+(40>this.state.width?10:0)+2+"px",this.moveHandle.style.top=this.state.y+this.state.height+(40>this.state.height?10:0)+2+"px")};var R=mxVertexHandler.prototype.setHandlesVisible;mxVertexHandler.prototype.setHandlesVisible=function(M){R.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.style.display=M?"":"none")};var sa=mxVertexHandler.prototype.destroy;mxVertexHandler.prototype.destroy=
+function(M,ka){sa.apply(this,arguments);null!=this.moveHandle&&(this.moveHandle.parentNode.removeChild(this.moveHandle),this.moveHandle=null)}};if("undefined"!==typeof Sidebar){var k=Sidebar.prototype.createAdvancedShapes;Sidebar.prototype.createAdvancedShapes=function(){var n=k.apply(this,arguments),D=this.graph;return n.concat([this.addEntry("tree container",function(){var t=new mxCell("Tree Container",new mxGeometry(0,0,400,320),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=
!0;var E=new mxCell("Parent",new mxGeometry(140,60,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');E.vertex=!0;var d=new mxCell("Child",new mxGeometry(140,140,120,40),'whiteSpace=wrap;html=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);t.insert(f);t.insert(E);t.insert(d);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea branch topic",function(){var t=new mxCell("Mindmap",new mxGeometry(0,0,420,126),"swimlane;startSize=20;horizontal=1;containerType=tree;");t.vertex=!0;var E=new mxCell("Central Idea",new mxGeometry(160,60,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
E.vertex=!0;var d=new mxCell("Topic",new mxGeometry(320,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");f.geometry.relative=!0;f.edge=!0;
-E.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
-m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');q.vertex=!0;var z=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+E.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Branch",new mxGeometry(320,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');g.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
+l.geometry.relative=!0;l.edge=!0;E.insertEdge(l,!0);g.insertEdge(l,!1);var q=new mxCell("Topic",new mxGeometry(20,40,80,20),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');q.vertex=!0;var z=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");
z.geometry.relative=!0;z.edge=!0;E.insertEdge(z,!0);q.insertEdge(z,!1);var F=new mxCell("Branch",new mxGeometry(20,80,72,26),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');F.vertex=!0;var C=new mxCell("",new mxGeometry(0,
-0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;E.insertEdge(C,!0);F.insertEdge(C,!1);t.insert(f);t.insert(m);t.insert(z);t.insert(C);t.insert(E);t.insert(d);t.insert(g);t.insert(q);t.insert(F);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
+0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");C.geometry.relative=!0;C.edge=!0;E.insertEdge(C,!0);F.insertEdge(C,!1);t.insert(f);t.insert(l);t.insert(z);t.insert(C);t.insert(E);t.insert(d);t.insert(g);t.insert(q);t.insert(F);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps central idea",function(){var t=new mxCell("Central Idea",new mxGeometry(0,0,100,40),'ellipse;whiteSpace=wrap;html=1;align=center;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};treeFolding=1;treeMoving=1;');
t.vertex=!0;return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps branch",function(){var t=new mxCell("Branch",new mxGeometry(0,0,80,20),'whiteSpace=wrap;html=1;shape=partialRectangle;top=0;left=0;bottom=1;right=0;points=[[0,1],[1,1]];fillColor=none;align=center;verticalAlign=bottom;routingCenterY=0.5;snapToPoint=1;recursiveResize=0;autosize=1;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree mindmap mindmaps sub topic",function(){var t=new mxCell("Sub Topic",new mxGeometry(0,0,72,26),'whiteSpace=wrap;html=1;rounded=1;arcSize=50;align=center;verticalAlign=middle;strokeWidth=1;autosize=1;spacing=4;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"entityRelationEdgeStyle","startArrow":"none","endArrow":"none","segment":10,"curved":1};');
t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=entityRelationEdgeStyle;startArrow=none;endArrow=none;segment=10;curved=1;");E.geometry.setTerminalPoint(new mxPoint(-40,40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree orgchart organization division",function(){var t=new mxCell("Orgchart",new mxGeometry(0,0,280,220),'swimlane;startSize=20;horizontal=1;containerType=tree;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
t.vertex=!0;var E=new mxCell("Organization",new mxGeometry(80,40,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(E,"treeRoot","1");E.vertex=!0;var d=new mxCell("Division",new mxGeometry(20,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');
-d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var m=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
-m.geometry.relative=!0;m.edge=!0;E.insertEdge(m,!0);g.insertEdge(m,!1);t.insert(f);t.insert(m);t.insert(E);t.insert(d);t.insert(g);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree root",function(){var t=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(t,"treeRoot",
+d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");f.geometry.relative=!0;f.edge=!0;E.insertEdge(f,!0);d.insertEdge(f,!1);var g=new mxCell("Division",new mxGeometry(160,140,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');g.vertex=!0;var l=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
+l.geometry.relative=!0;l.edge=!0;E.insertEdge(l,!0);g.insertEdge(l,!1);t.insert(f);t.insert(l);t.insert(E);t.insert(d);t.insert(g);return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree root",function(){var t=new mxCell("Organization",new mxGeometry(0,0,120,60),'whiteSpace=wrap;html=1;align=center;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');D.setAttributeForCell(t,"treeRoot",
"1");t.vertex=!0;return sb.createVertexTemplateFromCells([t],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree division",function(){var t=new mxCell("Division",new mxGeometry(20,40,100,60),'whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;newEdgeStyle={"edgeStyle":"elbowEdgeStyle","startArrow":"none","endArrow":"none"};');t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=elbowEdgeStyle;elbow=vertical;startArrow=none;endArrow=none;rounded=0;");
E.geometry.setTerminalPoint(new mxPoint(0,0),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);return sb.createVertexTemplateFromCells([t,E],t.geometry.width,t.geometry.height,t.value)}),this.addEntry("tree sub sections",function(){var t=new mxCell("Sub Section",new mxGeometry(0,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");t.vertex=!0;var E=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");
E.geometry.setTerminalPoint(new mxPoint(110,-40),!0);E.geometry.relative=!0;E.edge=!0;t.insertEdge(E,!1);var d=new mxCell("Sub Section",new mxGeometry(120,0,100,60),"whiteSpace=wrap;html=1;align=center;verticalAlign=middle;treeFolding=1;treeMoving=1;");d.vertex=!0;var f=new mxCell("",new mxGeometry(0,0,0,0),"edgeStyle=orthogonalEdgeStyle;startArrow=none;endArrow=none;rounded=0;targetPortConstraint=eastwest;sourcePortConstraint=northsouth;");f.geometry.setTerminalPoint(new mxPoint(110,-40),!0);f.geometry.relative=
!0;f.edge=!0;d.insertEdge(f,!1);return sb.createVertexTemplateFromCells([E,f,t,d],220,60,"Sub Sections")})])}}})();EditorUi.windowed="0"!=urlParams.windows;
-EditorUi.initMinimalTheme=function(){function b(O,W){if(EditorUi.windowed){var ha=O.editor.graph;ha.popupMenuHandler.hideMenu();if(null==O.formatWindow){W="1"==urlParams.sketch?Math.max(10,O.diagramContainer.clientWidth-241):Math.max(10,O.diagramContainer.clientWidth-248);var U="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;ha="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,ha.container.clientHeight-10);O.formatWindow=new t(O,mxResources.get("format"),W,U,240,ha,function(T){var M=
-O.createFormat(T);M.init();O.addListener("darkModeChanged",mxUtils.bind(this,function(){M.refresh()}));return M});O.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.formatWindow.window.fit()}));O.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else O.formatWindow.window.setVisible(null!=W?W:!O.formatWindow.window.isVisible())}else{if(null==O.formatElt){O.formatElt=D();var ma=O.createFormat(O.formatElt);ma.init();O.formatElt.style.border="none";O.formatElt.style.width=
-"240px";O.formatElt.style.borderLeft="1px solid gray";O.formatElt.style.right="0px";O.addListener("darkModeChanged",mxUtils.bind(this,function(){ma.refresh()}))}ha=O.diagramContainer.parentNode;null!=O.formatElt.parentNode?(O.formatElt.parentNode.removeChild(O.formatElt),ha.style.right="0px"):(ha.parentNode.appendChild(O.formatElt),ha.style.right=O.formatElt.style.width)}}function e(O,W){function ha(M,ia){var N=O.menus.get(M);M=T.addMenu(ia,mxUtils.bind(this,function(){N.funct.apply(this,arguments)}));
-M.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";M.className="geTitle";W.appendChild(M);return M}var U=document.createElement("div");U.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";U.className="geTitle";var ma=document.createElement("span");ma.style.fontSize="18px";ma.style.marginRight=
-"5px";ma.innerHTML="+";U.appendChild(ma);mxUtils.write(U,mxResources.get("moreShapes"));W.appendChild(U);mxEvent.addListener(U,"click",function(){O.actions.get("shapes").funct()});var T=new Menubar(O,W);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?U.style.bottom="0":null!=O.actions.get("newLibrary")?(U=document.createElement("div"),U.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
-U.className="geTitle",ma=document.createElement("span"),ma.style.cssText="position:relative;top:6px;",mxUtils.write(ma,mxResources.get("newLibrary")),U.appendChild(ma),W.appendChild(U),mxEvent.addListener(U,"click",O.actions.get("newLibrary").funct),U=document.createElement("div"),U.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",U.className="geTitle",ma=document.createElement("span"),
-ma.style.cssText="position:relative;top:6px;",mxUtils.write(ma,mxResources.get("openLibrary")),U.appendChild(ma),W.appendChild(U),mxEvent.addListener(U,"click",O.actions.get("openLibrary").funct)):(U=ha("newLibrary",mxResources.get("newLibrary")),U.style.boxSizing="border-box",U.style.paddingRight="6px",U.style.paddingLeft="6px",U.style.height="32px",U.style.left="0",U=ha("openLibraryFrom",mxResources.get("openLibraryFrom")),U.style.borderLeft="1px solid lightgray",U.style.boxSizing="border-box",
-U.style.paddingRight="6px",U.style.paddingLeft="6px",U.style.height="32px",U.style.left="50%");W.appendChild(O.sidebar.container);W.style.overflow="hidden"}function k(O,W){if(EditorUi.windowed){var ha=O.editor.graph;ha.popupMenuHandler.hideMenu();if(null==O.sidebarWindow){W=Math.min(ha.container.clientWidth-10,218);var U="1"==urlParams.embedInline?650:Math.min(ha.container.clientHeight-40,650);O.sidebarWindow=new t(O,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?66:10,
-"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(ha.container.clientHeight-U)/2):56,W-6,U-6,function(ma){e(O,ma)});O.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.sidebarWindow.window.fit()}));O.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);O.sidebarWindow.window.setVisible(!0);isLocalStorage&&O.getLocalData("sidebar",function(ma){O.sidebar.showEntries(ma,null,!0)});O.restoreLibraries()}else O.sidebarWindow.window.setVisible(null!=W?W:!O.sidebarWindow.window.isVisible())}else null==
-O.sidebarElt&&(O.sidebarElt=D(),e(O,O.sidebarElt),O.sidebarElt.style.border="none",O.sidebarElt.style.width="210px",O.sidebarElt.style.borderRight="1px solid gray"),ha=O.diagramContainer.parentNode,null!=O.sidebarElt.parentNode?(O.sidebarElt.parentNode.removeChild(O.sidebarElt),ha.style.left="0px"):(ha.parentNode.appendChild(O.sidebarElt),ha.style.left=O.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||"undefined"===typeof window.Menus)window.uiTheme=
-null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(O){}var D=function(){var O=document.createElement("div");O.className="geSidebarContainer";O.style.position="absolute";O.style.width="100%";O.style.height="100%";O.style.border="1px solid whiteSmoke";O.style.overflowX="hidden";O.style.overflowY="auto";return O},t=function(O,W,ha,U,ma,T,M){var ia=D();M(ia);this.window=new mxWindow(W,ia,ha,U,ma,T,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);
-this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);O.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(N){null==N&&(N=window.event);return null!=N&&O.isSelectionAllowed(N)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
+EditorUi.initMinimalTheme=function(){function b(O,la){if(EditorUi.windowed){var aa=O.editor.graph;aa.popupMenuHandler.hideMenu();if(null==O.formatWindow){la="1"==urlParams.sketch?Math.max(10,O.diagramContainer.clientWidth-241):Math.max(10,O.diagramContainer.clientWidth-248);var ia="1"==urlParams.winCtrls&&"1"==urlParams.sketch?80:60;aa="1"==urlParams.embedInline?580:"1"==urlParams.sketch?580:Math.min(566,aa.container.clientHeight-10);O.formatWindow=new t(O,mxResources.get("format"),la,ia,240,aa,function(R){var sa=
+O.createFormat(R);sa.init();O.addListener("darkModeChanged",mxUtils.bind(this,function(){sa.refresh()}));return sa});O.formatWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.formatWindow.window.fit()}));O.formatWindow.window.minimumSize=new mxRectangle(0,0,240,80)}else O.formatWindow.window.setVisible(null!=la?la:!O.formatWindow.window.isVisible())}else{if(null==O.formatElt){O.formatElt=D();var X=O.createFormat(O.formatElt);X.init();O.formatElt.style.border="none";O.formatElt.style.width=
+"240px";O.formatElt.style.borderLeft="1px solid gray";O.formatElt.style.right="0px";O.addListener("darkModeChanged",mxUtils.bind(this,function(){X.refresh()}))}aa=O.diagramContainer.parentNode;null!=O.formatElt.parentNode?(O.formatElt.parentNode.removeChild(O.formatElt),aa.style.right="0px"):(aa.parentNode.appendChild(O.formatElt),aa.style.right=O.formatElt.style.width)}}function e(O,la){function aa(sa,M){var ka=O.menus.get(sa);sa=R.addMenu(M,mxUtils.bind(this,function(){ka.funct.apply(this,arguments)}));
+sa.style.cssText="position:absolute;border-top:1px solid lightgray;width:50%;height:24px;bottom:0px;text-align:center;cursor:pointer;padding:6px 0 0 0;cusor:pointer;";sa.className="geTitle";la.appendChild(sa);return sa}var ia=document.createElement("div");ia.style.cssText="position:absolute;left:0;right:0;border-top:1px solid lightgray;height:24px;bottom:31px;text-align:center;cursor:pointer;padding:6px 0 0 0;";ia.className="geTitle";var X=document.createElement("span");X.style.fontSize="18px";X.style.marginRight=
+"5px";X.innerHTML="+";ia.appendChild(X);mxUtils.write(ia,mxResources.get("moreShapes"));la.appendChild(ia);mxEvent.addListener(ia,"click",function(){O.actions.get("shapes").funct()});var R=new Menubar(O,la);!Editor.enableCustomLibraries||"1"==urlParams.embed&&"1"!=urlParams.libraries?ia.style.bottom="0":null!=O.actions.get("newLibrary")?(ia=document.createElement("div"),ia.style.cssText="position:absolute;left:0px;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;",
+ia.className="geTitle",X=document.createElement("span"),X.style.cssText="position:relative;top:6px;",mxUtils.write(X,mxResources.get("newLibrary")),ia.appendChild(X),la.appendChild(ia),mxEvent.addListener(ia,"click",O.actions.get("newLibrary").funct),ia=document.createElement("div"),ia.style.cssText="position:absolute;left:50%;width:50%;border-top:1px solid lightgray;height:30px;bottom:0px;text-align:center;cursor:pointer;padding:0px;border-left: 1px solid lightgray;",ia.className="geTitle",X=document.createElement("span"),
+X.style.cssText="position:relative;top:6px;",mxUtils.write(X,mxResources.get("openLibrary")),ia.appendChild(X),la.appendChild(ia),mxEvent.addListener(ia,"click",O.actions.get("openLibrary").funct)):(ia=aa("newLibrary",mxResources.get("newLibrary")),ia.style.boxSizing="border-box",ia.style.paddingRight="6px",ia.style.paddingLeft="6px",ia.style.height="32px",ia.style.left="0",ia=aa("openLibraryFrom",mxResources.get("openLibraryFrom")),ia.style.borderLeft="1px solid lightgray",ia.style.boxSizing="border-box",
+ia.style.paddingRight="6px",ia.style.paddingLeft="6px",ia.style.height="32px",ia.style.left="50%");la.appendChild(O.sidebar.container);la.style.overflow="hidden"}function k(O,la){if(EditorUi.windowed){var aa=O.editor.graph;aa.popupMenuHandler.hideMenu();if(null==O.sidebarWindow){la=Math.min(aa.container.clientWidth-10,218);var ia="1"==urlParams.embedInline?650:Math.min(aa.container.clientHeight-40,650);O.sidebarWindow=new t(O,mxResources.get("shapes"),"1"==urlParams.sketch&&"1"!=urlParams.embedInline?
+66:10,"1"==urlParams.sketch&&"1"!=urlParams.embedInline?Math.max(30,(aa.container.clientHeight-ia)/2):56,la-6,ia-6,function(X){e(O,X)});O.sidebarWindow.window.addListener(mxEvent.SHOW,mxUtils.bind(this,function(){O.sidebarWindow.window.fit()}));O.sidebarWindow.window.minimumSize=new mxRectangle(0,0,90,90);O.sidebarWindow.window.setVisible(!0);isLocalStorage&&O.getLocalData("sidebar",function(X){O.sidebar.showEntries(X,null,!0)});O.restoreLibraries()}else O.sidebarWindow.window.setVisible(null!=la?
+la:!O.sidebarWindow.window.isVisible())}else null==O.sidebarElt&&(O.sidebarElt=D(),e(O,O.sidebarElt),O.sidebarElt.style.border="none",O.sidebarElt.style.width="210px",O.sidebarElt.style.borderRight="1px solid gray"),aa=O.diagramContainer.parentNode,null!=O.sidebarElt.parentNode?(O.sidebarElt.parentNode.removeChild(O.sidebarElt),aa.style.left="0px"):(aa.parentNode.appendChild(O.sidebarElt),aa.style.left=O.sidebarElt.style.width)}if("1"==urlParams.lightbox||"0"==urlParams.chrome||"undefined"===typeof window.Format||
+"undefined"===typeof window.Menus)window.uiTheme=null;else{var n=0;try{n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}catch(O){}var D=function(){var O=document.createElement("div");O.className="geSidebarContainer";O.style.position="absolute";O.style.width="100%";O.style.height="100%";O.style.border="1px solid whiteSmoke";O.style.overflowX="hidden";O.style.overflowY="auto";return O},t=function(O,la,aa,ia,X,R,sa){var M=D();sa(M);this.window=new mxWindow(la,M,aa,
+ia,X,R,!0,!0);this.window.destroyOnClose=!1;this.window.setMaximizable(!1);this.window.setResizable(!0);this.window.setClosable(!0);this.window.setVisible(!0);O.installResizeHandler(this,!0);mxClient.IS_SF&&(this.window.div.onselectstart=mxUtils.bind(this,function(ka){null==ka&&(ka=window.event);return null!=ka&&O.isSelectionAllowed(ka)}))};Editor.checkmarkImage=Graph.createSvgImage(22,18,'<path transform="translate(4 0)" d="M7.181,15.007a1,1,0,0,1-.793-0.391L3.222,10.5A1,1,0,1,1,4.808,9.274L7.132,12.3l6.044-8.86A1,1,0,1,1,14.83,4.569l-6.823,10a1,1,0,0,1-.8.437H7.181Z" fill="#29b6f2"/>').src;
mxWindow.prototype.closeImage=Graph.createSvgImage(18,10,'<path d="M 5 1 L 13 9 M 13 1 L 5 9" stroke="#C0C0C0" stroke-width="2"/>').src;mxWindow.prototype.minimizeImage=Graph.createSvgImage(14,10,'<path d="M 3 7 L 7 3 L 11 7" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxWindow.prototype.normalizeImage=Graph.createSvgImage(14,10,'<path d="M 3 3 L 7 7 L 11 3" stroke="#C0C0C0" stroke-width="2" fill="none"/>').src;mxConstraintHandler.prototype.pointImage=Graph.createSvgImage(5,5,'<path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke-width="2" style="stroke-opacity:0.4" stroke="#ffffff"/><path d="m 0 0 L 5 5 M 0 5 L 5 0" stroke="#29b6f2"/>');
mxOutline.prototype.sizerImage=null;mxConstants.VERTEX_SELECTION_COLOR="#C0C0C0";mxConstants.EDGE_SELECTION_COLOR="#C0C0C0";mxConstants.CONNECT_HANDLE_FILLCOLOR="#cee7ff";mxConstants.DEFAULT_VALID_COLOR="#29b6f2";mxConstants.GUIDE_COLOR="#C0C0C0";mxConstants.HIGHLIGHT_STROKEWIDTH=5;mxConstants.HIGHLIGHT_OPACITY=35;mxConstants.OUTLINE_COLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_FILLCOLOR="#29b6f2";mxConstants.OUTLINE_HANDLE_STROKECOLOR="#fff";Graph.prototype.svgShadowColor="#3D4574";Graph.prototype.svgShadowOpacity=
"0.4";Graph.prototype.svgShadowSize="0.6";Graph.prototype.svgShadowBlur="1.2";Format.inactiveTabBackgroundColor="#f0f0f0";mxGraphHandler.prototype.previewColor="#C0C0C0";mxRubberband.prototype.defaultOpacity=50;HoverIcons.prototype.inactiveOpacity=25;Format.prototype.showCloseButton=!1;EditorUi.prototype.closableScratchpad=!1;EditorUi.prototype.toolbarHeight="1"==urlParams.sketch?1:46;EditorUi.prototype.footerHeight=0;Graph.prototype.editAfterInsert="1"!=urlParams.sketch&&!mxClient.IS_IOS&&!mxClient.IS_ANDROID;
EditorUi.prototype.setDarkMode=function(O){this.spinner.spin(document.body,mxResources.get("working")+"...")&&window.setTimeout(mxUtils.bind(this,function(){this.spinner.stop();this.doSetDarkMode(O);null==urlParams.dark&&(mxSettings.settings.darkMode=O,mxSettings.save());this.fireEvent(new mxEventObject("darkModeChanged"))}),0)};var E=document.createElement("link");E.setAttribute("rel","stylesheet");E.setAttribute("href",STYLE_PATH+"/dark.css");E.setAttribute("charset","UTF-8");E.setAttribute("type",
-"text/css");EditorUi.prototype.doSetDarkMode=function(O){if(Editor.darkMode!=O){var W=this.editor.graph;Editor.darkMode=O;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";W.view.gridColor=Editor.isDarkMode()?W.view.defaultDarkGridColor:W.view.defaultGridColor;W.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";W.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";W.shapeBackgroundColor=Editor.isDarkMode()?Editor.darkColor:
-"#ffffff";W.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";W.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";W.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";W.loadStylesheet();null!=this.actions.layersWindow&&(O=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),
-this.actions.layersWindow=null,O&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=W.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=W.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=W.shapeBackgroundColor;Graph.prototype.shapeForegroundColor=
-W.shapeForegroundColor;Graph.prototype.defaultThemeName=W.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=Editor.isDarkMode()&&mxClient.IS_SVG?
-Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;d.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==E.parentNode&&document.getElementsByTagName("head")[0].appendChild(E):null!=E.parentNode&&E.parentNode.removeChild(E)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+(Editor.isDarkMode()?
-"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
+"text/css");EditorUi.prototype.doSetDarkMode=function(O){if(Editor.darkMode!=O){var la=this.editor.graph;Editor.darkMode=O;this.spinner.opts.color=Editor.isDarkMode()?"#c0c0c0":"#000";la.view.gridColor=Editor.isDarkMode()?la.view.defaultDarkGridColor:la.view.defaultGridColor;la.defaultPageBackgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";la.defaultPageBorderColor=Editor.isDarkMode()?"#505759":"#ffffff";la.shapeBackgroundColor=Editor.isDarkMode()?
+Editor.darkColor:"#ffffff";la.shapeForegroundColor=Editor.isDarkMode()?Editor.lightColor:"#000000";la.defaultThemeName=Editor.isDarkMode()?"darkTheme":"default-style2";la.graphHandler.previewColor=Editor.isDarkMode()?"#cccccc":"black";document.body.style.backgroundColor="1"==urlParams.embedInline?"transparent":Editor.isDarkMode()?Editor.darkColor:"#ffffff";la.loadStylesheet();null!=this.actions.layersWindow&&(O=this.actions.layersWindow.window.isVisible(),this.actions.layersWindow.window.setVisible(!1),
+this.actions.layersWindow.destroy(),this.actions.layersWindow=null,O&&window.setTimeout(this.actions.get("layers").funct,0));null!=this.menus.commentsWindow&&(this.menus.commentsWindow.window.setVisible(!1),this.menus.commentsWindow.destroy(),this.menus.commentsWindow=null);null!=this.ruler&&this.ruler.updateStyle();Graph.prototype.defaultPageBackgroundColor=la.defaultPageBackgroundColor;Graph.prototype.defaultPageBorderColor=la.defaultPageBorderColor;Graph.prototype.shapeBackgroundColor=la.shapeBackgroundColor;
+Graph.prototype.shapeForegroundColor=la.shapeForegroundColor;Graph.prototype.defaultThemeName=la.defaultThemeName;StyleFormatPanel.prototype.defaultStrokeColor=Editor.isDarkMode()?"#cccccc":"black";BaseFormatPanel.prototype.buttonBackgroundColor=Editor.isDarkMode()?Editor.darkColor:"white";Format.inactiveTabBackgroundColor=Editor.isDarkMode()?"black":"#f0f0f0";Dialog.backdropColor=Editor.isDarkMode()?Editor.darkColor:"white";mxConstants.DROP_TARGET_COLOR=Editor.isDarkMode()?"#00ff00":"#0000FF";Editor.helpImage=
+Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMode()&&mxClient.IS_SVG?Editor.darkCheckmarkImage:Editor.lightCheckmarkImage;d.innerHTML=Editor.createMinimalCss();Editor.darkMode?null==E.parentNode&&document.getElementsByTagName("head")[0].appendChild(E):null!=E.parentNode&&E.parentNode.removeChild(E)}};Editor.createMinimalCss=function(){return"* { -webkit-font-smoothing: antialiased; }html body td.mxWindowTitle > div > img { padding: 8px 4px; }"+
+(Editor.isDarkMode()?"html body td.mxWindowTitle > div > img { margin: -4px; }html body .geToolbarContainer .geMenuItem, html body .geToolbarContainer .geToolbarButton, html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem,html body .geMenubarContainer .geToolbarButton { filter: invert(1); }html body div.geToolbarContainer a.geInverted { filter: none; }html body .geMenubarContainer .geMenuItem .geMenuItem, html body .geMenubarContainer a.geMenuItem { color: #353535; }html > body > div > .geToolbarContainer { border: 1px solid #c0c0c0 !important; box-shadow: none !important; }html > body.geEditor > div > a.geItem { background-color: #2a2a2a; color: #cccccc; border-color: #505759; }html body .geTabContainer, html body .geTabContainer div, html body .geMenubarContainer { border-color: #505759 !important; }html body .mxCellEditor { color: #f0f0f0; }":
"html body div.geToolbarContainer a.geInverted { filter: invert(1); }html body.geEditor .geTabContainer div { border-color: #e5e5e5 !important; }")+'html > body > div > a.geItem { background-color: #ffffff; color: #707070; border-top: 1px solid lightgray; border-left: 1px solid lightgray; }html body .geMenubarContainer { border-bottom:1px solid lightgray;background-color:#ffffff; }html body .mxWindow button.geBtn { font-size:12px !important; margin-left: 0; }html body .geSidebarContainer *:not(svg *) { font-size:9pt; }html body table.mxWindow td.mxWindowPane div.mxWindowPane *:not(svg *) { font-size:9pt; }table.mxWindow * :not(svg *) { font-size:13px; }html body .mxWindow { z-index: 3; }html body div.diagramContainer button, html body button.geBtn { font-size:14px; font-weight:700; border-radius: 5px; }html body button.geBtn:active { opacity: 0.6; }html body a.geMenuItem { opacity: 0.75; cursor: pointer; user-select: none; }html body a.geMenuItem[disabled] { opacity: 0.2; }html body a.geMenuItem[disabled]:active { opacity: 0.2; }html body div.geActivePage { opacity: 0.7; }html body a.geMenuItem:active { opacity: 0.2; }html body .geToolbarButton { opacity: 0.3; }html body .geToolbarButton:active { opacity: 0.15; }html body .geStatus:active { opacity: 0.5; }.geStatus > div { box-sizing: border-box; max-width: 100%; text-overflow: ellipsis; }html body .geMenubarContainer .geStatus { margin-top: 0px !important; }html table.mxPopupMenu tr.mxPopupMenuItemHover:active { opacity: 0.7; }html body .geDialog input, html body .geToolbarContainer input, html body .mxWindow input {padding: 2px; display: inline-block; }html body .mxWindow input[type="checkbox"] {padding: 0px; }div.geDialog { border-radius: 5px; }html body div.geDialog button.geBigButton { color: '+
(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; border: none !important; }.mxWindow button, .geDialog select, .mxWindow select { display:inline-block; }html body .mxWindow .geColorBtn, html body .geDialog .geColorBtn { background: none; }html body div.diagramContainer button, html body .mxWindow button, html body .geDialog button { min-width: 0px; border-radius: 5px; color: "+(Editor.isDarkMode()?"#cccccc":"#353535")+" !important; border-style: solid; border-width: 1px; border-color: rgb(216, 216, 216); }html body div.diagramContainer button:hover, html body .mxWindow button:hover, html body .geDialog button:hover { border-color: rgb(177, 177, 177); }html body div.diagramContainer button:active, html body .mxWindow button:active, html body .geDialog button:active { opacity: 0.6; }div.diagramContainer button.geBtn, .mxWindow button.geBtn, .geDialog button.geBtn { min-width:72px; font-weight: 600; background: none; }div.diagramContainer button.gePrimaryBtn, .mxWindow button.gePrimaryBtn, .geDialog button.gePrimaryBtn, html body .gePrimaryBtn { background: #29b6f2; color: #fff !important; border: none; box-shadow: none; }html body .gePrimaryBtn:hover { background: #29b6f2; border: none; box-shadow: inherit; }html body button.gePrimaryBtn:hover { background: #29b6f2; border: none; }.geBtn button { min-width:72px !important; }div.geToolbarContainer a.geButton { margin:0px; padding: 0 2px 4px 2px; } html body div.geToolbarContainer a.geColorBtn { margin: 2px; } html body .mxWindow td.mxWindowPane input, html body .mxWindow td.mxWindowPane select, html body .mxWindow td.mxWindowPane textarea, html body .mxWindow td.mxWindowPane radio { padding: 0px; box-sizing: border-box; }.geDialog, .mxWindow td.mxWindowPane *, div.geSprite, td.mxWindowTitle, .geDiagramContainer { box-sizing:content-box; }.mxWindow div button.geStyleButton { box-sizing: border-box; }table.mxWindow td.mxWindowPane button.geColorBtn { padding:0px; box-sizing: border-box; }td.mxWindowPane .geSidebarContainer button { padding:2px; box-sizing: border-box; }html body .geMenuItem { font-size:14px; text-decoration: none; font-weight: normal; padding: 6px 10px 6px 10px; border: none; border-radius: 5px; color: #353535; box-shadow: inset 0 0 0 1px rgba(0,0,0,.11), inset 0 -1px 0 0 rgba(0,0,0,.08), 0 1px 2px 0 rgba(0,0,0,.04); "+
(EditorUi.isElectronApp?"app-region: no-drag; ":"")+"}.geTabContainer { border-bottom:1px solid lightgray; border-top:1px solid lightgray; background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; }.geToolbarContainer { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+"; }div.geSidebarContainer .geTitle { background-color: "+(Editor.isDarkMode()?Editor.darkColor:"#fdfdfd")+"; }div.mxWindow td.mxWindowPane button { background-image: none; float: none; }td.mxWindowTitle { height: 22px !important; background: none !important; font-size: 13px !important; text-align:center !important; border-bottom:1px solid lightgray; }div.mxWindow, div.mxWindowTitle { background-image: none !important; background-color:"+
@@ -3951,103 +3967,100 @@ Editor.darkHelpImage:Editor.lightHelpImage;Editor.checkmarkImage=Editor.isDarkMo
(Editor.isDarkMode()?Editor.darkColor:"rgb(249, 249, 249)")+" !important; color: #A0A0A0 !important; } html div.geActivePage { background: "+(Editor.isDarkMode()?Editor.darkColor:"#fff")+" !important; "+(Editor.isDarkMode()?"":"color: #353535 !important; } ")+"html div.mxRubberband { border:1px solid; border-color: #29b6f2 !important; background:rgba(41,182,242,0.4) !important; } html body div.mxPopupMenu { border-radius:5px; border:1px solid #c0c0c0; padding:5px 0 5px 0; box-shadow: 0px 4px 17px -4px rgba(96,96,96,1); } html table.mxPopupMenu td.mxPopupMenuItem { color: "+
(Editor.isDarkMode()?"#cccccc":"#353535")+"; font-size: 14px; padding-top: 4px; padding-bottom: 4px; }html table.mxPopupMenu tr.mxPopupMenuItemHover { background-color: "+(Editor.isDarkMode()?"#000000":"#29b6f2")+"; }html tr.mxPopupMenuItemHover td.mxPopupMenuItem, html tr.mxPopupMenuItemHover td.mxPopupMenuItem span { color: "+(Editor.isDarkMode()?"#cccccc":"#ffffff")+" !important; }html tr.mxPopupMenuItem, html td.mxPopupMenuItem { transition-property: none !important; }html table.mxPopupMenu hr { height: 2px; background-color: rgba(0,0,0,.07); margin: 5px 0; }html body td.mxWindowTitle { padding-right: 14px; }html td.mxWindowTitle div { top: 0px !important; }"+
(mxClient.IS_IOS?"html input[type=checkbox], html input[type=radio] { height:12px; }":"")+("1"==urlParams.sketch?"a.geStatus > div { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }":"")};var d=document.createElement("style");d.type="text/css";d.innerHTML=Editor.createMinimalCss();document.getElementsByTagName("head")[0].appendChild(d);Editor.prototype.isChromelessView=function(){return!1};Graph.prototype.isLightboxView=function(){return!1};var f=EditorUi.prototype.updateTabContainer;
-EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var m=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(O,
-W){null!=W.shortcut&&900>n&&!mxClient.IS_IOS?O.firstChild.nextSibling.setAttribute("title",W.shortcut):m.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var O=this.userElement;O.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+O.style.display;O.className="geToolbarButton";O.innerText="";O.style.backgroundImage="url("+Editor.userImage+")";O.style.backgroundPosition="center center";
-O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";O.style.cssFloat="right";O.setAttribute("title",mxResources.get("changeUser"));if("none"!=O.style.display){O.style.display="inline-block";var W=this.getCurrentFile();if(null!=W&&W.isRealtimeEnabled()&&W.isRealtimeSupported()){var ha=document.createElement("img");ha.setAttribute("border","0");ha.style.position="absolute";ha.style.left="18px";ha.style.top="2px";ha.style.width="12px";ha.style.height=
-"12px";var U=W.getRealtimeError();W=W.getRealtimeState();var ma=mxResources.get("realtimeCollaboration");1==W?(ha.src=Editor.syncImage,ma+=" ("+mxResources.get("online")+")"):(ha.src=Editor.syncProblemImage,ma=null!=U&&null!=U.message?ma+(" ("+U.message+")"):ma+(" ("+mxResources.get("disconnected")+")"));ha.setAttribute("title",ma);O.style.paddingRight="4px";O.appendChild(ha)}}}};var z=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){z.apply(this,arguments);if(null!=
-this.shareButton){var O=this.shareButton;O.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";O.className="geToolbarButton";O.innerText="";O.style.backgroundImage="url("+Editor.shareImage+")";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&(this.buttonContainer.style.marginTop=
-"-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var O=document.createElement("div");O.style.display="inline-block";O.style.position="relative";O.style.marginTop="6px";O.style.marginRight="4px";var W=document.createElement("a");W.className="geMenuItem gePrimaryBtn";W.style.marginLeft="8px";W.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=urlParams.saveAndExit){var ha="1"==urlParams.publishClose?
-mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(W,ha);W.setAttribute("title",ha);mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));O.appendChild(W)}}else mxUtils.write(W,mxResources.get("save")),W.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),O.appendChild(W),"1"==urlParams.saveAndExit&&(W=document.createElement("a"),
-mxUtils.write(W,mxResources.get("saveAndExit")),W.setAttribute("title",mxResources.get("saveAndExit")),W.className="geMenuItem",W.style.marginLeft="6px",W.style.padding="6px",mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),O.appendChild(W));"1"!=urlParams.noExitBtn&&(W=document.createElement("a"),ha="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),mxUtils.write(W,ha),W.setAttribute("title",ha),W.className="geMenuItem",
-W.style.marginLeft="6px",W.style.padding="6px",mxEvent.addListener(W,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),O.appendChild(W));this.buttonContainer.appendChild(O);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var F=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(O,W){if(null==this.editorUi.sidebarWindow||mxUtils.isAncestorNode(this.editorUi.picker,O)){var ha=mxUtils.getOffset(this.editorUi.picker);
-ha.x+=this.editorUi.picker.offsetWidth+4;ha.y+=O.offsetTop-W.height/2+16;return ha}var U=F.apply(this,arguments);ha=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);U.x+=ha.x-16;U.y+=ha.y;return U};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(O,W,ha){var U=this.editorUi.editor.graph;O.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?U.isEnabled()&&(O.addSeparator(),1==U.getSelectionCount()&&this.addMenuItems(O,["-","lockUnlock"],null,ha)):
-1==U.getSelectionCount()?(U.isCellFoldable(U.getSelectionCell())&&this.addMenuItems(O,U.isCellCollapsed(W)?["expand"]:["collapse"],null,ha),this.addMenuItems(O,["collapsible","-","lockUnlock","enterGroup"],null,ha),O.addSeparator(),this.addSubmenu("layout",O)):U.isSelectionEmpty()&&U.isEnabled()?(O.addSeparator(),this.addMenuItems(O,["editData"],null,ha),O.addSeparator(),this.addSubmenu("layout",O),this.addSubmenu("insert",O),this.addMenuItems(O,["-","exitGroup"],null,ha)):U.isEnabled()&&this.addMenuItems(O,
-["-","lockUnlock"],null,ha)};var I=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(O,W,ha){I.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(O,["copyAsImage"],null,ha)};EditorUi.prototype.toggleFormatPanel=function(O){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=O?O:!this.formatWindow.window.isVisible()):b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var G=EditorUi.prototype.destroy;
-EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),
-this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=
-null);G.apply(this,arguments)};var Z=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(O){Z.apply(this,arguments);if(O){var W=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=W&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=W||"1"==urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),
-null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var fa=DiagramFormatPanel.prototype.addView;DiagramFormatPanel.prototype.addView=function(O){O=fa.apply(this,arguments);var W=this.editorUi,ha=W.editor.graph;if(ha.isEnabled()&&"1"==urlParams.sketch){var U=this.createOption(mxResources.get("sketch"),function(){return Editor.sketchMode},function(ma,T){W.setSketchMode(!Editor.sketchMode);null!=T&&mxEvent.isShiftDown(T)||ha.updateCellStyles({sketch:ma?
-"1":null},ha.getVerticesAndEdges())},{install:function(ma){this.listener=function(){ma(Editor.sketchMode)};W.addListener("sketchModeChanged",this.listener)},destroy:function(){W.removeListener(this.listener)}});O.appendChild(U)}return O};var ba=Menus.prototype.init;Menus.prototype.init=function(){ba.apply(this,arguments);var O=this.editorUi,W=O.editor.graph;O.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";O.actions.get("createShape").label=mxResources.get("shape")+"...";O.actions.get("outline").label=
-mxResources.get("outline")+"...";O.actions.get("layers").label=mxResources.get("layers")+"...";O.actions.get("tags").label=mxResources.get("tags")+"...";O.actions.get("comments").label=mxResources.get("comments")+"...";var ha=O.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(P){O.setDarkMode(!Editor.darkMode)}));ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.isDarkMode()});ha=O.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),function(P){O.setSketchMode(!Editor.sketchMode)}));
-ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.sketchMode});ha=O.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(P){O.setPagesVisible(!Editor.pagesVisible)}));ha.setToggleAction(!0);ha.setSelectedCallback(function(){return Editor.pagesVisible});O.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){W.popupMenuHandler.hideMenu();O.showImportCsvDialog()}));O.actions.put("importText",new Action(mxResources.get("text")+"...",
-function(){var P=new ParseDialog(O,"Insert from Text");O.showDialog(P.container,620,420,!0,!1);P.init()}));O.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var P=new ParseDialog(O,"Insert from Text","formatSql");O.showDialog(P.container,620,420,!0,!1);P.init()}));O.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(O)},null,null,Editor.ctrlKey+"+Shift+K"));O.actions.put("toggleFormat",new Action(mxResources.get("format")+
-"...",function(){b(O)})).shortcut=O.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!O.isOffline()&&O.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var P=new ParseDialog(O,mxResources.get("plantUml")+"...","plantUml");O.showDialog(P.container,620,420,!0,!1);P.init()}));O.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var P=new ParseDialog(O,mxResources.get("mermaid")+"...","mermaid");O.showDialog(P.container,620,420,!0,!1);
-P.init()}));var U=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(P,aa){var la=this.editorUi.editor.graph,u=la.getSelectionCell();U.call(this,P,u,null,aa);this.addMenuItems(P,["editTooltip"],aa);la.model.isVertex(u)&&this.addMenuItems(P,["editGeometry"],aa);this.addMenuItems(P,["-","edit"],aa)})));this.addPopupMenuCellEditItems=function(P,aa,la,u){P.addSeparator();this.addSubmenu("editCell",P,u,mxResources.get("edit"))};this.put("file",new Menu(mxUtils.bind(this,
-function(P,aa){var la=O.getCurrentFile();O.menus.addMenuItems(P,["new"],aa);O.menus.addSubmenu("openFrom",P,aa);isLocalStorage&&this.addSubmenu("openRecent",P,aa);P.addSeparator(aa);null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(P,["save","rename","makeCopy","moveToFolder"],aa):(O.menus.addMenuItems(P,["save","saveAs","-","rename"],aa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(P,["upload"],aa):O.menus.addMenuItems(P,["makeCopy"],
-aa));P.addSeparator(aa);null!=la&&(la.isRevisionHistorySupported()&&O.menus.addMenuItems(P,["revisionHistory"],aa),la.constructor==DriveFile&&O.menus.addMenuItems(P,["openFolder"],aa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile&&null==la.fileHandle||O.menus.addMenuItems(P,["synchronize"],aa));O.menus.addMenuItems(P,["autosave"],aa);if(null!=la){P.addSeparator(aa);"1"==urlParams.sketch&&O.commentsSupported()&&O.menus.addMenuItems(P,["comments"],aa);if(null!=O.fileNode&&
-"1"!=urlParams.embedInline){var u=null!=la.getTitle()?la.getTitle():O.defaultFilename;(la.constructor==DriveFile&&null!=la.sync&&la.sync.isConnected()||!/(\.html)$/i.test(u)&&!/(\.svg)$/i.test(u))&&this.addMenuItems(P,["properties"],aa)}la.constructor==DriveFile&&O.menus.addMenuItems(P,["share"],aa)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(P,aa){var la=O.getCurrentFile();O.menus.addSubmenu("extras",P,aa,mxResources.get("preferences"));P.addSeparator(aa);if(mxClient.IS_CHROMEAPP||
-EditorUi.isElectronApp)O.menus.addMenuItems(P,"new open - synchronize - save saveAs -".split(" "),aa);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(P,["-","save"],aa);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(P,["saveAndExit"],aa),null!=la&&la.isRevisionHistorySupported()&&O.menus.addMenuItems(P,["revisionHistory"],aa);P.addSeparator(aa)}else O.mode==
-App.MODE_ATLAS?O.menus.addMenuItems(P,["save","synchronize","-"],aa):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(O.menus.addMenuItems(P,["new"],aa),O.menus.addSubmenu("openFrom",P,aa),isLocalStorage&&this.addSubmenu("openRecent",P,aa),P.addSeparator(aa),null!=la&&(la.constructor==DriveFile&&O.menus.addMenuItems(P,["share"],aa),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||la.constructor==LocalFile||O.menus.addMenuItems(P,["synchronize"],aa)),P.addSeparator(aa),O.menus.addSubmenu("save",P,
-aa)):O.menus.addSubmenu("file",P,aa));O.menus.addSubmenu("exportAs",P,aa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?O.menus.addMenuItems(P,["import"],aa):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",P,aa);"1"!=urlParams.embed&&"1"==urlParams.sketch&&"1"!=urlParams.noFileMenu||!O.commentsSupported()||O.menus.addMenuItems(P,["-","comments"],aa);O.menus.addMenuItems(P,"- findReplace layers tags - pageSetup".split(" "),aa);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||
-O.menus.addMenuItems(P,["print"],aa);"1"!=urlParams.sketch&&null!=la&&null!=O.fileNode&&"1"!=urlParams.embedInline&&(la=null!=la.getTitle()?la.getTitle():O.defaultFilename,/(\.html)$/i.test(la)||/(\.svg)$/i.test(la)||this.addMenuItems(P,["-","properties"]));P.addSeparator(aa);O.menus.addSubmenu("help",P,aa);"1"==urlParams.embed||O.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(P,["-","exit"],aa):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(P,["-",
-"close"])})));this.put("save",new Menu(mxUtils.bind(this,function(P,aa){var la=O.getCurrentFile();null!=la&&la.constructor==DriveFile?O.menus.addMenuItems(P,["save","makeCopy","-","rename","moveToFolder"],aa):(O.menus.addMenuItems(P,["save","saveAs","-","rename"],aa),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(P,["upload"],aa):O.menus.addMenuItems(P,["makeCopy"],aa));O.menus.addMenuItems(P,["-","autosave"],aa);null!=la&&la.isRevisionHistorySupported()&&
-O.menus.addMenuItems(P,["-","revisionHistory"],aa)})));var ma=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(P,aa){ma.funct(P,aa);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||O.menus.addMenuItems(P,["publishLink"],aa);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(P.addSeparator(aa),O.menus.addSubmenu("embed",P,aa))})));var T=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(P,aa){O.menus.addInsertTableCellItem(P,aa)})));if("1"==urlParams.sketch){var M=
-this.get("units");this.put("units",new Menu(mxUtils.bind(this,function(P,aa){M.funct(P,aa);this.addMenuItems(P,["-","pageScale","-","ruler"],aa)})))}this.put("extras",new Menu(mxUtils.bind(this,function(P,aa){null!=T&&O.menus.addSubmenu("language",P,aa);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",P,aa);O.menus.addSubmenu("units",P,aa);P.addSeparator(aa);"1"!=urlParams.sketch&&O.menus.addMenuItems(P,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),
-aa);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItems(P,["-","showStartScreen","search","scratchpad"],aa);P.addSeparator(aa);"1"==urlParams.sketch?O.menus.addMenuItems(P,"configuration - copyConnect collapseExpand tooltips -".split(" "),aa):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(P,"configuration",aa),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(P,"plugins",
-aa));EditorUi.isElectronApp&&O.menus.addMenuItems(P,["-","spellCheck","autoBkp","drafts","-"],aa);var la=O.getCurrentFile();null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()&&this.addMenuItems(P,["-","showRemoteCursors","shareCursor","-"],aa);P.addSeparator(aa);O.mode!=App.MODE_ATLAS&&this.addMenuItems(P,["fullscreen"],aa);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(P,["toggleDarkMode"],aa);P.addSeparator(aa)})));this.put("insertAdvanced",
-new Menu(mxUtils.bind(this,function(P,aa){O.menus.addMenuItems(P,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),aa)})));mxUtils.bind(this,function(){var P=this.get("insert"),aa=P.funct;P.funct=function(la,u){"1"==urlParams.sketch?(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(la,["insertTemplate"],u),O.menus.addMenuItems(la,["insertImage","insertLink","-"],u),O.menus.addSubmenu("insertAdvanced",la,u,mxResources.get("advanced")),O.menus.addSubmenu("layout",
-la,u)):(aa.apply(this,arguments),O.menus.addSubmenu("table",la,u))}})();var ia="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),N=function(P,aa,la,u){P.addItem(la,null,mxUtils.bind(this,function(){var H=new CreateGraphDialog(O,la,u);O.showDialog(H.container,620,420,!0,!1);H.init()}),aa)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(P,aa){for(var la=0;la<ia.length;la++)"-"==ia[la]?P.addSeparator(aa):N(P,aa,mxResources.get(ia[la])+"...",
-ia[la])})))};EditorUi.prototype.installFormatToolbar=function(O){var W=this.editor.graph,ha=document.createElement("div");ha.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";W.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(U,ma){0<W.getSelectionCount()?(O.appendChild(ha),ha.innerHTML="Selected: "+W.getSelectionCount()):null!=
-ha.parentNode&&ha.parentNode.removeChild(ha)}))};var Y=!1;EditorUi.prototype.initFormatWindow=function(){if(!Y&&null!=this.formatWindow){Y=!0;this.formatWindow.window.setClosable(!1);var O=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){O.apply(this,arguments);this.minimized?(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",
-this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(W){mxEvent.getSource(W)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var pa=EditorUi.prototype.init;EditorUi.prototype.init=function(){function O(xa,Ba,Pa){var Ka=T.menus.get(xa),Na=P.addMenu(mxResources.get(xa),mxUtils.bind(this,function(){Ka.funct.apply(this,arguments)}),N);Na.className="1"==
-urlParams.sketch?"geToolbarButton":"geMenuItem";Na.style.display="inline-block";Na.style.boxSizing="border-box";Na.style.top="6px";Na.style.marginRight="6px";Na.style.height="30px";Na.style.paddingTop="6px";Na.style.paddingBottom="6px";Na.style.cursor="pointer";Na.setAttribute("title",mxResources.get(xa));T.menus.menuCreated(Ka,Na,"geMenuItem");null!=Pa?(Na.style.backgroundImage="url("+Pa+")",Na.style.backgroundPosition="center center",Na.style.backgroundRepeat="no-repeat",Na.style.backgroundSize=
-"24px 24px",Na.style.width="34px",Na.innerText=""):Ba||(Na.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Na.style.backgroundPosition="right 6px center",Na.style.backgroundRepeat="no-repeat",Na.style.paddingRight="22px");return Na}function W(xa,Ba,Pa,Ka,Na,hb){var Qa=document.createElement("a");Qa.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Qa.style.display="inline-block";Qa.style.boxSizing="border-box";Qa.style.height="30px";Qa.style.padding="6px";Qa.style.position=
-"relative";Qa.style.verticalAlign="top";Qa.style.top="0px";"1"==urlParams.sketch&&(Qa.style.borderStyle="none",Qa.style.boxShadow="none",Qa.style.padding="6px",Qa.style.margin="0px");null!=T.statusContainer?ia.insertBefore(Qa,T.statusContainer):ia.appendChild(Qa);null!=hb?(Qa.style.backgroundImage="url("+hb+")",Qa.style.backgroundPosition="center center",Qa.style.backgroundRepeat="no-repeat",Qa.style.backgroundSize="24px 24px",Qa.style.width="34px"):mxUtils.write(Qa,xa);mxEvent.addListener(Qa,mxClient.IS_POINTER?
-"pointerdown":"mousedown",mxUtils.bind(this,function(mb){mb.preventDefault()}));mxEvent.addListener(Qa,"click",function(mb){"disabled"!=Qa.getAttribute("disabled")&&Ba(mb);mxEvent.consume(mb)});null==Pa&&(Qa.style.marginRight="4px");null!=Ka&&Qa.setAttribute("title",Ka);null!=Na&&(xa=function(){Na.isEnabled()?(Qa.removeAttribute("disabled"),Qa.style.cursor="pointer"):(Qa.setAttribute("disabled","disabled"),Qa.style.cursor="default")},Na.addListener("stateChanged",xa),M.addListener("enabledChanged",
-xa),xa());return Qa}function ha(xa,Ba,Pa){Pa=document.createElement("div");Pa.className="geMenuItem";Pa.style.display="inline-block";Pa.style.verticalAlign="top";Pa.style.marginRight="6px";Pa.style.padding="0 4px 0 4px";Pa.style.height="30px";Pa.style.position="relative";Pa.style.top="0px";"1"==urlParams.sketch&&(Pa.style.boxShadow="none");for(var Ka=0;Ka<xa.length;Ka++)null!=xa[Ka]&&("1"==urlParams.sketch&&(xa[Ka].style.padding="10px 8px",xa[Ka].style.width="30px"),xa[Ka].style.margin="0px",xa[Ka].style.boxShadow=
-"none",Pa.appendChild(xa[Ka]));null!=Ba&&mxUtils.setOpacity(Pa,Ba);null!=T.statusContainer&&"1"!=urlParams.sketch?ia.insertBefore(Pa,T.statusContainer):ia.appendChild(Pa);return Pa}function U(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(ea.style.left=58>ca.offsetTop-ca.offsetHeight/2?"70px":"10px");else{for(var xa=ia.firstChild;null!=xa;){var Ba=xa.nextSibling;"geMenuItem"!=xa.className&&"geItem"!=xa.className||xa.parentNode.removeChild(xa);xa=Ba}N=ia.firstChild;n=window.innerWidth||document.documentElement.clientWidth||
-document.body.clientWidth;xa=1E3>n||"1"==urlParams.sketch;var Pa=null;xa||(Pa=O("diagram"));Ba=xa?O("diagram",null,Editor.menuImage):null;null!=Ba&&(Pa=Ba);ha([Pa,W(mxResources.get("shapes"),T.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),T.actions.get("image"),xa?Editor.shapesImage:null),W(mxResources.get("format"),T.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+T.actions.get("formatPanel").shortcut+")",T.actions.get("image"),xa?Editor.formatImage:null)],
-xa?60:null);Ba=O("insert",!0,xa?X:null);ha([Ba,W(mxResources.get("delete"),T.actions.get("delete").funct,null,mxResources.get("delete"),T.actions.get("delete"),xa?Editor.trashImage:null)],xa?60:null);411<=n&&(ha([K,L],60),520<=n&&ha([Da,640<=n?W("",Za.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +)",Za,Editor.zoomInImage):null,640<=n?W("",Ha.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Ha,Editor.zoomOutImage):null],60))}null!=Pa&&(mxEvent.disableContextMenu(Pa),mxEvent.addGestureListeners(Pa,
-mxUtils.bind(this,function(Ka){(mxEvent.isShiftDown(Ka)||mxEvent.isAltDown(Ka)||mxEvent.isMetaDown(Ka)||mxEvent.isControlDown(Ka)||mxEvent.isPopupTrigger(Ka))&&T.appIconClicked(Ka)}),null,null));Ba=T.menus.get("language");null!=Ba&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&600<=n&&"1"!=urlParams.sketch?(null==Ma&&(Ba=P.addMenu("",Ba.funct),Ba.setAttribute("title",mxResources.get("language")),Ba.className="geToolbarButton",Ba.style.backgroundImage="url("+Editor.globeImage+")",Ba.style.backgroundPosition=
-"center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.position="absolute",Ba.style.height="24px",Ba.style.width="24px",Ba.style.zIndex="1",Ba.style.right="8px",Ba.style.cursor="pointer",Ba.style.top="1"==urlParams.embed?"12px":"11px",ia.appendChild(Ba),Ma=Ba),T.buttonContainer.style.paddingRight="34px"):(T.buttonContainer.style.paddingRight="4px",null!=Ma&&(Ma.parentNode.removeChild(Ma),Ma=null))}pa.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=
-urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var ma=document.createElement("div");ma.style.cssText="position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";ma.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(ma);"1"==urlParams.sketch&&null!=this.sidebar&&
-this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),
-this.sidebar.showEntries("search"));var T=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==T.embedViewport)mxUtils.fit(this.div);else{var xa=parseInt(this.div.offsetLeft),Ba=parseInt(this.div.offsetWidth),Pa=T.embedViewport.x+T.embedViewport.width,Ka=parseInt(this.div.offsetTop),Na=parseInt(this.div.offsetHeight),hb=T.embedViewport.y+T.embedViewport.height;this.div.style.left=Math.max(T.embedViewport.x,Math.min(xa,Pa-Ba))+"px";this.div.style.top=Math.max(T.embedViewport.y,
-Math.min(Ka,hb-Na))+"px";this.div.style.height=Math.min(T.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(T.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),ma=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&
-(1200>n||708>ma)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));T=this;var M=T.editor.graph;T.toolbar=this.createToolbar(T.createDiv("geToolbar"));T.defaultLibraryName=mxResources.get("untitledLibrary");var ia=document.createElement("div");ia.className="geMenubarContainer";var N=null,P=new Menubar(T,ia);T.statusContainer=T.createStatusContainer();T.statusContainer.style.position="relative";T.statusContainer.style.maxWidth=
-"";T.statusContainer.style.marginTop="7px";T.statusContainer.style.marginLeft="6px";T.statusContainer.style.color="gray";T.statusContainer.style.cursor="default";var aa=T.hideCurrentMenu;T.hideCurrentMenu=function(){aa.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};var la=T.descriptorChanged;T.descriptorChanged=function(){la.apply(this,arguments);var xa=T.getCurrentFile();if(null!=xa&&null!=xa.getTitle()){var Ba=xa.getMode();"google"==Ba?Ba="googleDrive":"github"==Ba?Ba="gitHub":
-"gitlab"==Ba?Ba="gitLab":"onedrive"==Ba&&(Ba="oneDrive");Ba=mxResources.get(Ba);ia.setAttribute("title",xa.getTitle()+(null!=Ba?" ("+Ba+")":""))}else ia.removeAttribute("title")};T.setStatusText(T.editor.getStatus());ia.appendChild(T.statusContainer);T.buttonContainer=document.createElement("div");T.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";ia.appendChild(T.buttonContainer);T.menubarContainer=
-T.buttonContainer;T.tabContainer=document.createElement("div");T.tabContainer.className="geTabContainer";T.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";ma=T.diagramContainer.parentNode;var u=document.createElement("div");u.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";T.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&
-"1"==urlParams.sketch){u.style.top="20px";T.titlebar=document.createElement("div");T.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var H=document.createElement("div");H.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";T.titlebar.appendChild(H);ma.appendChild(T.titlebar)}H=T.menus.get("viewZoom");
-var Q=H.funct;H.funct=function(xa,Ba){Q.apply(this,arguments);T.menus.addMenuItems(xa,["-","outline"],Ba)};var X="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,R="1"==urlParams.sketch?document.createElement("div"):null,ca="1"==urlParams.sketch?document.createElement("div"):null,ea="1"==urlParams.sketch?document.createElement("div"):null,da=mxUtils.bind(this,function(){null!=this.sidebar&&this.sidebar.refresh();M.refresh();M.view.validateBackground()});T.addListener("darkModeChanged",da);
-T.addListener("sketchModeChanged",da);var qa=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)ea.style.left="10px",ea.style.top="10px",ca.style.left="10px",ca.style.top="60px",R.style.top="10px",R.style.right="12px",R.style.left="",T.diagramContainer.setAttribute("data-bounds",T.diagramContainer.style.top+" "+T.diagramContainer.style.left+" "+T.diagramContainer.style.width+" "+T.diagramContainer.style.height),T.diagramContainer.style.top="0px",T.diagramContainer.style.left="0px",T.diagramContainer.style.bottom=
-"0px",T.diagramContainer.style.right="0px",T.diagramContainer.style.width="",T.diagramContainer.style.height="";else{var xa=T.diagramContainer.getAttribute("data-bounds");if(null!=xa){T.diagramContainer.style.background="transparent";T.diagramContainer.removeAttribute("data-bounds");var Ba=M.getGraphBounds();xa=xa.split(" ");T.diagramContainer.style.top=xa[0];T.diagramContainer.style.left=xa[1];T.diagramContainer.style.width=Ba.width+50+"px";T.diagramContainer.style.height=Ba.height+46+"px";T.diagramContainer.style.bottom=
-"";T.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:T.diagramContainer.getBoundingClientRect()}),"*");T.refresh()}ea.style.left=T.diagramContainer.offsetLeft+"px";ea.style.top=T.diagramContainer.offsetTop-ea.offsetHeight-4+"px";ca.style.display="";ca.style.left=T.diagramContainer.offsetLeft-ca.offsetWidth-4+"px";ca.style.top=T.diagramContainer.offsetTop+"px";R.style.left=T.diagramContainer.offsetLeft+T.diagramContainer.offsetWidth-R.offsetWidth+
-"px";R.style.top=ea.style.top;R.style.right="";T.bottomResizer.style.left=T.diagramContainer.offsetLeft+(T.diagramContainer.offsetWidth-T.bottomResizer.offsetWidth)/2+"px";T.bottomResizer.style.top=T.diagramContainer.offsetTop+T.diagramContainer.offsetHeight-T.bottomResizer.offsetHeight/2-1+"px";T.rightResizer.style.left=T.diagramContainer.offsetLeft+T.diagramContainer.offsetWidth-T.rightResizer.offsetWidth/2-1+"px";T.rightResizer.style.top=T.diagramContainer.offsetTop+(T.diagramContainer.offsetHeight-
-T.bottomResizer.offsetHeight)/2+"px"}T.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";T.rightResizer.style.visibility=T.bottomResizer.style.visibility;ia.style.display="none";ea.style.visibility="";R.style.visibility=""}),va=mxUtils.bind(this,function(){S.style.backgroundImage="url("+(Editor.inlineFullscreen?Editor.fullscreenExitImage:Editor.fullscreenImage)+")";this.diagramContainer.style.background=Editor.inlineFullscreen?Editor.isDarkMode()?Editor.darkColor:"#ffffff":"transparent";
-qa()});da=mxUtils.bind(this,function(){va();b(T,!0);T.initFormatWindow();var xa=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(xa.x+xa.width+4,xa.y)});T.addListener("inlineFullscreenChanged",va);T.addListener("editInlineStart",da);"1"==urlParams.embedInline&&T.addListener("darkModeChanged",da);T.addListener("editInlineStop",mxUtils.bind(this,function(xa){T.diagramContainer.style.width="10px";T.diagramContainer.style.height="10px";T.diagramContainer.style.border=
-"";T.bottomResizer.style.visibility="hidden";T.rightResizer.style.visibility="hidden";ea.style.visibility="hidden";R.style.visibility="hidden";ca.style.display="none"}));if(null!=T.hoverIcons){var ua=T.hoverIcons.update;T.hoverIcons.update=function(){M.freehand.isDrawing()||ua.apply(this,arguments)}}if(null!=M.freehand){var Aa=M.freehand.createStyle;M.freehand.createStyle=function(xa){return Aa.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){ca.className="geToolbarContainer";R.className=
-"geToolbarContainer";ea.className="geToolbarContainer";ia.className="geToolbarContainer";T.picker=ca;var za=!1;"1"!=urlParams.embed&&"atlassian"!=T.getServiceName()&&(mxEvent.addListener(ia,"mouseenter",function(){T.statusContainer.style.display="inline-block"}),mxEvent.addListener(ia,"mouseleave",function(){za||(T.statusContainer.style.display="none")}));var Ca=mxUtils.bind(this,function(xa){null!=T.notificationBtn&&(null!=xa?T.notificationBtn.setAttribute("title",xa):T.notificationBtn.removeAttribute("title"))});
-ia.style.visibility=20>ia.clientWidth?"hidden":"";T.editor.addListener("statusChanged",mxUtils.bind(this,function(){T.setStatusText(T.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=T.getServiceName())if(T.statusContainer.style.display="inline-block",za=!0,1==T.statusContainer.children.length&&""==T.editor.getStatus())ia.style.visibility="hidden";else{if(0==T.statusContainer.children.length||1==T.statusContainer.children.length&&"function"===typeof T.statusContainer.firstChild.getAttribute&&
-null==T.statusContainer.firstChild.getAttribute("class")){var xa=null!=T.statusContainer.firstChild&&"function"===typeof T.statusContainer.firstChild.getAttribute?T.statusContainer.firstChild.getAttribute("title"):T.editor.getStatus();Ca(xa);var Ba=T.getCurrentFile();Ba=null!=Ba?Ba.savingStatusKey:DrawioFile.prototype.savingStatusKey;xa==mxResources.get(Ba)+"..."?(T.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(Ba))+'..."src="'+Editor.tailSpin+'">',T.statusContainer.style.display=
-"inline-block",za=!0):6<T.buttonContainer.clientWidth&&(T.statusContainer.style.display="none",za=!1)}else T.statusContainer.style.display="inline-block",Ca(null),za=!0;ia.style.visibility=20>ia.clientWidth&&!za?"hidden":""}}));ta=O("diagram",null,Editor.menuImage);ta.style.boxShadow="none";ta.style.padding="6px";ta.style.margin="0px";ea.appendChild(ta);mxEvent.disableContextMenu(ta);mxEvent.addGestureListeners(ta,mxUtils.bind(this,function(xa){(mxEvent.isShiftDown(xa)||mxEvent.isAltDown(xa)||mxEvent.isMetaDown(xa)||
-mxEvent.isControlDown(xa)||mxEvent.isPopupTrigger(xa))&&this.appIconClicked(xa)}),null,null);T.statusContainer.style.position="";T.statusContainer.style.display="none";T.statusContainer.style.margin="0px";T.statusContainer.style.padding="6px 0px";T.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";T.statusContainer.style.display="inline-block";T.statusContainer.style.textOverflow="ellipsis";T.buttonContainer.style.position="";T.buttonContainer.style.paddingRight="0px";T.buttonContainer.style.display=
-"inline-block";var sa=document.createElement("a");sa.style.padding="0px";sa.style.boxShadow="none";sa.className="geMenuItem";sa.style.display="inline-block";sa.style.width="40px";sa.style.height="12px";sa.style.marginBottom="-2px";sa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";sa.style.backgroundPosition="top center";sa.style.backgroundRepeat="no-repeat";sa.setAttribute("title","Minimize");var Va=!1,Ua=mxUtils.bind(this,function(){ca.innerText="";if(!Va){var xa=function(Ka,
-Na,hb){Ka=W("",Ka.funct,null,Na,Ka,hb);Ka.style.width="40px";Ka.style.opacity="0.7";return Ba(Ka,null,"pointer")},Ba=function(Ka,Na,hb){null!=Na&&Ka.setAttribute("title",Na);Ka.style.cursor=null!=hb?hb:"default";Ka.style.margin="2px 0px";ca.appendChild(Ka);mxUtils.br(ca);return Ka};Ba(T.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+
-" ("+Editor.ctrlKey+"+Shift+X)");Ba(T.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));Ba(T.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),
-mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");Ba(T.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var Ka=new mxCell("",new mxGeometry(0,0,M.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");Ka.geometry.setTerminalPoint(new mxPoint(0,0),!0);Ka.geometry.setTerminalPoint(new mxPoint(Ka.geometry.width,0),!1);Ka.geometry.points=[];Ka.geometry.relative=!0;Ka.edge=
-!0;Ba(T.sidebar.createEdgeTemplateFromCells([Ka],Ka.geometry.width,Ka.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));Ka=Ka.clone();Ka.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";Ka.geometry.width=M.defaultEdgeLength+20;Ka.geometry.setTerminalPoint(new mxPoint(0,20),!0);Ka.geometry.setTerminalPoint(new mxPoint(Ka.geometry.width,20),!1);Ka=Ba(T.sidebar.createEdgeTemplateFromCells([Ka],Ka.geometry.width,
-40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));Ka.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");Ka.style.paddingBottom="14px";Ka.style.marginBottom="14px"})();xa(T.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Pa=T.actions.get("toggleShapes");xa(Pa,mxResources.get("shapes")+" ("+Pa.shortcut+")",X);ta=O("table",null,Editor.calendarImage);ta.style.boxShadow="none";ta.style.opacity="0.7";ta.style.padding="6px";
-ta.style.margin="0px";ta.style.width="37px";Ba(ta,null,"pointer");ta=O("insert",null,Editor.plusImage);ta.style.boxShadow="none";ta.style.opacity="0.7";ta.style.padding="6px";ta.style.margin="0px";ta.style.width="37px";Ba(ta,null,"pointer")}"1"!=urlParams.embedInline&&ca.appendChild(sa)});mxEvent.addListener(sa,"click",mxUtils.bind(this,function(){Va?(mxUtils.setPrefixedStyle(ca.style,"transform","translate(0, -50%)"),ca.style.padding="8px 6px 4px",ca.style.top="50%",ca.style.bottom="",ca.style.height=
-"",sa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",sa.style.width="40px",sa.style.height="12px",sa.setAttribute("title","Minimize"),Va=!1,Ua()):(ca.innerText="",ca.appendChild(sa),mxUtils.setPrefixedStyle(ca.style,"transform","translate(0, 0)"),ca.style.top="",ca.style.bottom="12px",ca.style.padding="0px",ca.style.height="24px",sa.style.height="24px",sa.style.backgroundImage="url("+Editor.plusImage+")",sa.setAttribute("title",mxResources.get("insert")),sa.style.width="24px",
-Va=!0)}));Ua();T.addListener("darkModeChanged",Ua);T.addListener("sketchModeChanged",Ua)}else T.editor.addListener("statusChanged",mxUtils.bind(this,function(){T.setStatusText(T.editor.getStatus())}));if(null!=H){var Ra=function(xa){mxEvent.isShiftDown(xa)?(T.hideCurrentMenu(),T.actions.get("smartFit").funct(),mxEvent.consume(xa)):mxEvent.isAltDown(xa)&&(T.hideCurrentMenu(),T.actions.get("customZoom").funct(),mxEvent.consume(xa))},Za=T.actions.get("zoomIn"),Ha=T.actions.get("zoomOut"),db=T.actions.get("resetView");
-da=T.actions.get("fullscreen");var cb=T.actions.get("undo"),y=T.actions.get("redo"),K=W("",cb.funct,null,mxResources.get("undo")+" ("+cb.shortcut+")",cb,Editor.undoImage),L=W("",y.funct,null,mxResources.get("redo")+" ("+y.shortcut+")",y,Editor.redoImage),S=W("",da.funct,null,mxResources.get("fullscreen"),da,Editor.fullscreenImage);if(null!=R){db=function(){ra.style.display=null!=T.pages&&("0"!=urlParams.pages||1<T.pages.length||Editor.pagesVisible)?"inline-block":"none"};var V=function(){ra.innerText=
-"";if(null!=T.currentPage){mxUtils.write(ra,T.currentPage.getName());var xa=null!=T.pages?T.pages.length:1,Ba=T.getPageIndex(T.currentPage);Ba=null!=Ba?Ba+1:1;var Pa=T.currentPage.getId();ra.setAttribute("title",T.currentPage.getName()+" ("+Ba+"/"+xa+")"+(null!=Pa?" ["+Pa+"]":""))}};S.parentNode.removeChild(S);var ja=T.actions.get("delete"),na=W("",ja.funct,null,mxResources.get("delete"),ja,Editor.trashImage);na.style.opacity="0.1";ea.appendChild(na);ja.addListener("stateChanged",function(){na.style.opacity=
-ja.enabled?"":"0.1"});var ya=function(){K.style.display=0<T.editor.undoManager.history.length||M.isEditing()?"inline-block":"none";L.style.display=K.style.display;K.style.opacity=cb.enabled?"":"0.1";L.style.opacity=y.enabled?"":"0.1"};ea.appendChild(K);ea.appendChild(L);cb.addListener("stateChanged",ya);y.addListener("stateChanged",ya);ya();var ra=this.createPageMenuTab(!1,!0);ra.style.display="none";ra.style.position="";ra.style.marginLeft="";ra.style.top="";ra.style.left="";ra.style.height="100%";
-ra.style.lineHeight="";ra.style.borderStyle="none";ra.style.padding="3px 0";ra.style.margin="0px";ra.style.background="";ra.style.border="";ra.style.boxShadow="none";ra.style.verticalAlign="top";ra.style.width="auto";ra.style.maxWidth="160px";ra.style.position="relative";ra.style.padding="6px";ra.style.textOverflow="ellipsis";ra.style.opacity="0.8";R.appendChild(ra);T.editor.addListener("pagesPatched",V);T.editor.addListener("pageSelected",V);T.editor.addListener("pageRenamed",V);T.editor.addListener("fileLoaded",
-V);V();T.addListener("fileDescriptorChanged",db);T.addListener("pagesVisibleChanged",db);T.editor.addListener("pagesPatched",db);db();db=W("",Ha.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Ha,Editor.zoomOutImage);R.appendChild(db);var ta=P.addMenu("100%",H.funct);ta.setAttribute("title",mxResources.get("zoom"));ta.innerHTML="100%";ta.style.display="inline-block";ta.style.color="inherit";ta.style.cursor="pointer";ta.style.textAlign="center";ta.style.whiteSpace="nowrap";
-ta.style.paddingRight="10px";ta.style.textDecoration="none";ta.style.verticalAlign="top";ta.style.padding="6px 0";ta.style.fontSize="14px";ta.style.width="40px";ta.style.opacity="0.4";R.appendChild(ta);H=W("",Za.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Za,Editor.zoomInImage);R.appendChild(H);da.visible&&(R.appendChild(S),mxEvent.addListener(document,"fullscreenchange",function(){S.style.backgroundImage="url("+(null!=document.fullscreenElement?Editor.fullscreenExitImage:
-Editor.fullscreenImage)+")"}));"1"==urlParams.embedInline&&(H=T.actions.get("exit"),R.appendChild(W("",H.funct,null,mxResources.get("exit"),H,Editor.closeImage)));T.tabContainer.style.visibility="hidden";ia.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";ea.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
-R.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";u.appendChild(ea);u.appendChild(R);ca.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";mxClient.IS_POINTER&&(ca.style.touchAction="none");u.appendChild(ca);window.setTimeout(function(){mxUtils.setPrefixedStyle(ca.style,
-"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(u)}else{var Da=W("",Ra,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",db,Editor.zoomFitImage);ia.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";ta=P.addMenu("100%",H.funct);ta.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");ta.style.whiteSpace="nowrap";ta.style.paddingRight=
-"10px";ta.style.textDecoration="none";ta.style.textDecoration="none";ta.style.overflow="hidden";ta.style.visibility="hidden";ta.style.textAlign="center";ta.style.cursor="pointer";ta.style.height=parseInt(T.tabContainerHeight)-1+"px";ta.style.lineHeight=parseInt(T.tabContainerHeight)+1+"px";ta.style.position="absolute";ta.style.display="block";ta.style.fontSize="12px";ta.style.width="59px";ta.style.right="0px";ta.style.bottom="0px";ta.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";
-ta.style.backgroundPosition="right 6px center";ta.style.backgroundRepeat="no-repeat";u.appendChild(ta)}(function(xa){mxEvent.addListener(xa,"click",Ra);var Ba=mxUtils.bind(this,function(){xa.innerText="";mxUtils.write(xa,Math.round(100*T.editor.graph.view.scale)+"%")});T.editor.graph.view.addListener(mxEvent.EVENT_SCALE,Ba);T.editor.addListener("resetGraphView",Ba);T.editor.addListener("pageSelected",Ba)})(ta);var Oa=T.setGraphEnabled;T.setGraphEnabled=function(){Oa.apply(this,arguments);null!=this.tabContainer&&
-(ta.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==R?this.tabContainerHeight+"px":"0px")}}u.appendChild(ia);u.appendChild(T.diagramContainer);ma.appendChild(u);T.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==R&&u.appendChild(T.tabContainer);var Ma=null;U();mxEvent.addListener(window,"resize",function(){U();null!=T.sidebarWindow&&T.sidebarWindow.window.fit();
-null!=T.formatWindow&&T.formatWindow.window.fit();null!=T.actions.outlineWindow&&T.actions.outlineWindow.window.fit();null!=T.actions.layersWindow&&T.actions.layersWindow.window.fit();null!=T.menus.tagsWindow&&T.menus.tagsWindow.window.fit();null!=T.menus.findWindow&&T.menus.findWindow.window.fit();null!=T.menus.findReplaceWindow&&T.menus.findReplaceWindow.window.fit()});if("1"==urlParams.embedInline){document.body.style.cursor="text";ca.style.transform="";mxEvent.addGestureListeners(T.diagramContainer.parentNode,
-function(xa){mxEvent.getSource(xa)==T.diagramContainer.parentNode&&(T.embedExitPoint=new mxPoint(mxEvent.getClientX(xa),mxEvent.getClientY(xa)),T.sendEmbeddedSvgExport())});ma=document.createElement("div");ma.style.position="absolute";ma.style.width="10px";ma.style.height="10px";ma.style.borderRadius="5px";ma.style.border="1px solid gray";ma.style.background="#ffffff";ma.style.cursor="row-resize";T.diagramContainer.parentNode.appendChild(ma);T.bottomResizer=ma;var Wa=null,Sa=null,Fa=null,Ja=null;
-mxEvent.addGestureListeners(ma,function(xa){Ja=parseInt(T.diagramContainer.style.height);Sa=mxEvent.getClientY(xa);M.popupMenuHandler.hideMenu();mxEvent.consume(xa)});ma=ma.cloneNode(!1);ma.style.cursor="col-resize";T.diagramContainer.parentNode.appendChild(ma);T.rightResizer=ma;mxEvent.addGestureListeners(ma,function(xa){Fa=parseInt(T.diagramContainer.style.width);Wa=mxEvent.getClientX(xa);M.popupMenuHandler.hideMenu();mxEvent.consume(xa)});mxEvent.addGestureListeners(document.body,null,function(xa){var Ba=
-!1;null!=Wa&&(T.diagramContainer.style.width=Math.max(20,Fa+mxEvent.getClientX(xa)-Wa)+"px",Ba=!0);null!=Sa&&(T.diagramContainer.style.height=Math.max(20,Ja+mxEvent.getClientY(xa)-Sa)+"px",Ba=!0);Ba&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:T.diagramContainer.getBoundingClientRect()}),"*"),qa(),T.refresh())},function(xa){null==Wa&&null==Sa||mxEvent.consume(xa);Sa=Wa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor=
-"transparent";T.bottomResizer.style.visibility="hidden";T.rightResizer.style.visibility="hidden";ea.style.visibility="hidden";R.style.visibility="hidden";ca.style.display="none"}"1"==urlParams.prefetchFonts&&T.editor.loadFonts()}}};(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,n,D,t,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
+EditorUi.prototype.updateTabContainer=function(){null!=this.tabContainer&&(this.tabContainer.style.right="70px",this.diagramContainer.style.bottom="1"==urlParams.sketch?"0px":this.tabContainerHeight+"px");f.apply(this,arguments)};var g=EditorUi.prototype.updateActionStates;EditorUi.prototype.updateActionStates=function(){g.apply(this,arguments);this.menus.get("save").setEnabled(null!=this.getCurrentFile()||"1"==urlParams.embed)};var l=Menus.prototype.addShortcut;Menus.prototype.addShortcut=function(O,
+la){null!=la.shortcut&&900>n&&!mxClient.IS_IOS?O.firstChild.nextSibling.setAttribute("title",la.shortcut):l.apply(this,arguments)};var q=App.prototype.updateUserElement;App.prototype.updateUserElement=function(){q.apply(this,arguments);if(null!=this.userElement){var O=this.userElement;O.style.cssText="position:relative;margin-right:4px;cursor:pointer;display:"+O.style.display;O.className="geToolbarButton";O.innerText="";O.style.backgroundImage="url("+Editor.userImage+")";O.style.backgroundPosition=
+"center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";O.style.cssFloat="right";O.setAttribute("title",mxResources.get("changeUser"));if("none"!=O.style.display){O.style.display="inline-block";var la=this.getCurrentFile();if(null!=la&&la.isRealtimeEnabled()&&la.isRealtimeSupported()){var aa=document.createElement("img");aa.setAttribute("border","0");aa.style.position="absolute";aa.style.left="18px";aa.style.top="2px";aa.style.width=
+"12px";aa.style.height="12px";var ia=la.getRealtimeError();la=la.getRealtimeState();var X=mxResources.get("realtimeCollaboration");1==la?(aa.src=Editor.syncImage,X+=" ("+mxResources.get("online")+")"):(aa.src=Editor.syncProblemImage,X=null!=ia&&null!=ia.message?X+(" ("+ia.message+")"):X+(" ("+mxResources.get("disconnected")+")"));aa.setAttribute("title",X);O.style.paddingRight="4px";O.appendChild(aa)}}}};var z=App.prototype.updateButtonContainer;App.prototype.updateButtonContainer=function(){z.apply(this,
+arguments);if(null!=this.shareButton){var O=this.shareButton;O.style.cssText="display:inline-block;position:relative;box-sizing:border-box;margin-right:4px;cursor:pointer;";O.className="geToolbarButton";O.innerText="";O.style.backgroundImage="url("+Editor.shareImage+")";O.style.backgroundPosition="center center";O.style.backgroundRepeat="no-repeat";O.style.backgroundSize="24px 24px";O.style.height="24px";O.style.width="24px";"1"==urlParams.sketch&&(this.shareButton.style.display="none")}null!=this.buttonContainer&&
+(this.buttonContainer.style.marginTop="-2px",this.buttonContainer.style.paddingTop="4px")};EditorUi.prototype.addEmbedButtons=function(){if(null!=this.buttonContainer&&"1"!=urlParams.embedInline){var O=document.createElement("div");O.style.display="inline-block";O.style.position="relative";O.style.marginTop="6px";O.style.marginRight="4px";var la=document.createElement("a");la.className="geMenuItem gePrimaryBtn";la.style.marginLeft="8px";la.style.padding="6px";if("1"==urlParams.noSaveBtn){if("0"!=
+urlParams.saveAndExit){var aa="1"==urlParams.publishClose?mxResources.get("publish"):mxResources.get("saveAndExit");mxUtils.write(la,aa);la.setAttribute("title",aa);mxEvent.addListener(la,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()}));O.appendChild(la)}}else mxUtils.write(la,mxResources.get("save")),la.setAttribute("title",mxResources.get("save")+" ("+Editor.ctrlKey+"+S)"),mxEvent.addListener(la,"click",mxUtils.bind(this,function(){this.actions.get("save").funct()})),
+O.appendChild(la),"1"==urlParams.saveAndExit&&(la=document.createElement("a"),mxUtils.write(la,mxResources.get("saveAndExit")),la.setAttribute("title",mxResources.get("saveAndExit")),la.className="geMenuItem",la.style.marginLeft="6px",la.style.padding="6px",mxEvent.addListener(la,"click",mxUtils.bind(this,function(){this.actions.get("saveAndExit").funct()})),O.appendChild(la));"1"!=urlParams.noExitBtn&&(la=document.createElement("a"),aa="1"==urlParams.publishClose?mxResources.get("close"):mxResources.get("exit"),
+mxUtils.write(la,aa),la.setAttribute("title",aa),la.className="geMenuItem",la.style.marginLeft="6px",la.style.padding="6px",mxEvent.addListener(la,"click",mxUtils.bind(this,function(){this.actions.get("exit").funct()})),O.appendChild(la));this.buttonContainer.appendChild(O);this.buttonContainer.style.top="6px";this.editor.fireEvent(new mxEventObject("statusChanged"))}};var F=Sidebar.prototype.getTooltipOffset;Sidebar.prototype.getTooltipOffset=function(O,la){if(null==this.editorUi.sidebarWindow||
+mxUtils.isAncestorNode(this.editorUi.picker,O)){var aa=mxUtils.getOffset(this.editorUi.picker);aa.x+=this.editorUi.picker.offsetWidth+4;aa.y+=O.offsetTop-la.height/2+16;return aa}var ia=F.apply(this,arguments);aa=mxUtils.getOffset(this.editorUi.sidebarWindow.window.div);ia.x+=aa.x-16;ia.y+=aa.y;return ia};var C=Menus.prototype.createPopupMenu;Menus.prototype.createPopupMenu=function(O,la,aa){var ia=this.editorUi.editor.graph;O.smartSeparators=!0;C.apply(this,arguments);"1"==urlParams.sketch?ia.isEnabled()&&
+(O.addSeparator(),1==ia.getSelectionCount()&&this.addMenuItems(O,["-","lockUnlock"],null,aa)):1==ia.getSelectionCount()?(ia.isCellFoldable(ia.getSelectionCell())&&this.addMenuItems(O,ia.isCellCollapsed(la)?["expand"]:["collapse"],null,aa),this.addMenuItems(O,["collapsible","-","lockUnlock","enterGroup"],null,aa),O.addSeparator(),this.addSubmenu("layout",O)):ia.isSelectionEmpty()&&ia.isEnabled()?(O.addSeparator(),this.addMenuItems(O,["editData"],null,aa),O.addSeparator(),this.addSubmenu("layout",O),
+this.addSubmenu("insert",O),this.addMenuItems(O,["-","exitGroup"],null,aa)):ia.isEnabled()&&this.addMenuItems(O,["-","lockUnlock"],null,aa)};var I=Menus.prototype.addPopupMenuEditItems;Menus.prototype.addPopupMenuEditItems=function(O,la,aa){I.apply(this,arguments);this.editorUi.editor.graph.isSelectionEmpty()&&this.addMenuItems(O,["copyAsImage"],null,aa)};EditorUi.prototype.toggleFormatPanel=function(O){null!=this.formatWindow?this.formatWindow.window.setVisible(null!=O?O:!this.formatWindow.window.isVisible()):
+b(this)};DiagramFormatPanel.prototype.isMathOptionVisible=function(){return!0};var G=EditorUi.prototype.destroy;EditorUi.prototype.destroy=function(){null!=this.sidebarWindow&&(this.sidebarWindow.window.setVisible(!1),this.sidebarWindow.window.destroy(),this.sidebarWindow=null);null!=this.formatWindow&&(this.formatWindow.window.setVisible(!1),this.formatWindow.window.destroy(),this.formatWindow=null);null!=this.actions.outlineWindow&&(this.actions.outlineWindow.window.setVisible(!1),this.actions.outlineWindow.window.destroy(),
+this.actions.outlineWindow=null);null!=this.actions.layersWindow&&(this.actions.layersWindow.window.setVisible(!1),this.actions.layersWindow.destroy(),this.actions.layersWindow=null);null!=this.menus.tagsWindow&&(this.menus.tagsWindow.window.setVisible(!1),this.menus.tagsWindow.window.destroy(),this.menus.tagsWindow=null);null!=this.menus.findWindow&&(this.menus.findWindow.window.setVisible(!1),this.menus.findWindow.window.destroy(),this.menus.findWindow=null);null!=this.menus.findReplaceWindow&&
+(this.menus.findReplaceWindow.window.setVisible(!1),this.menus.findReplaceWindow.window.destroy(),this.menus.findReplaceWindow=null);G.apply(this,arguments)};var Z=EditorUi.prototype.setGraphEnabled;EditorUi.prototype.setGraphEnabled=function(O){Z.apply(this,arguments);if(O){var la=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;1E3<=la&&null!=this.sidebarWindow&&"1"!=urlParams.sketch&&this.sidebarWindow.window.setVisible(!0);null!=this.formatWindow&&(1E3<=la||"1"==
+urlParams.sketch)&&this.formatWindow.window.setVisible(!0)}else null!=this.sidebarWindow&&this.sidebarWindow.window.setVisible(!1),null!=this.formatWindow&&this.formatWindow.window.setVisible(!1)};EditorUi.prototype.chromelessWindowResize=function(){};var ca=Menus.prototype.init;Menus.prototype.init=function(){ca.apply(this,arguments);var O=this.editorUi,la=O.editor.graph;O.actions.get("editDiagram").label=mxResources.get("formatXml")+"...";O.actions.get("createShape").label=mxResources.get("shape")+
+"...";O.actions.get("outline").label=mxResources.get("outline")+"...";O.actions.get("layers").label=mxResources.get("layers")+"...";O.actions.get("tags").label=mxResources.get("tags")+"...";O.actions.get("comments").label=mxResources.get("comments")+"...";var aa=O.actions.put("toggleDarkMode",new Action(mxResources.get("dark"),function(L){O.setDarkMode(!Editor.darkMode)}));aa.setToggleAction(!0);aa.setSelectedCallback(function(){return Editor.isDarkMode()});aa=O.actions.put("toggleSketchMode",new Action(mxResources.get("sketch"),
+function(L){O.setSketchMode(!Editor.sketchMode)}));aa.setToggleAction(!0);aa.setSelectedCallback(function(){return Editor.sketchMode});aa=O.actions.put("togglePagesVisible",new Action(mxResources.get("pages"),function(L){O.setPagesVisible(!Editor.pagesVisible)}));aa.setToggleAction(!0);aa.setSelectedCallback(function(){return Editor.pagesVisible});O.actions.put("importCsv",new Action(mxResources.get("csv")+"...",function(){la.popupMenuHandler.hideMenu();O.showImportCsvDialog()}));O.actions.put("importText",
+new Action(mxResources.get("text")+"...",function(){var L=new ParseDialog(O,"Insert from Text");O.showDialog(L.container,620,420,!0,!1);L.init()}));O.actions.put("formatSql",new Action(mxResources.get("formatSql")+"...",function(){var L=new ParseDialog(O,"Insert from Text","formatSql");O.showDialog(L.container,620,420,!0,!1);L.init()}));O.actions.put("toggleShapes",new Action(mxResources.get("1"==urlParams.sketch?"moreShapes":"shapes")+"...",function(){k(O)},null,null,Editor.ctrlKey+"+Shift+K"));
+O.actions.put("toggleFormat",new Action(mxResources.get("format")+"...",function(){b(O)})).shortcut=O.actions.get("formatPanel").shortcut;EditorUi.enablePlantUml&&!O.isOffline()&&O.actions.put("plantUml",new Action(mxResources.get("plantUml")+"...",function(){var L=new ParseDialog(O,mxResources.get("plantUml")+"...","plantUml");O.showDialog(L.container,620,420,!0,!1);L.init()}));O.actions.put("mermaid",new Action(mxResources.get("mermaid")+"...",function(){var L=new ParseDialog(O,mxResources.get("mermaid")+
+"...","mermaid");O.showDialog(L.container,620,420,!0,!1);L.init()}));var ia=this.addPopupMenuCellEditItems;this.put("editCell",new Menu(mxUtils.bind(this,function(L,S){var ja=this.editorUi.editor.graph,ma=ja.getSelectionCell();ia.call(this,L,ma,null,S);this.addMenuItems(L,["editTooltip"],S);ja.model.isVertex(ma)&&this.addMenuItems(L,["editGeometry"],S);this.addMenuItems(L,["-","edit"],S)})));this.addPopupMenuCellEditItems=function(L,S,ja,ma){L.addSeparator();this.addSubmenu("editCell",L,ma,mxResources.get("edit"))};
+this.put("file",new Menu(mxUtils.bind(this,function(L,S){var ja=O.getCurrentFile();O.menus.addMenuItems(L,["new"],S);O.menus.addSubmenu("openFrom",L,S);isLocalStorage&&this.addSubmenu("openRecent",L,S);L.addSeparator(S);null!=ja&&ja.constructor==DriveFile?O.menus.addMenuItems(L,["save","rename","makeCopy","moveToFolder"],S):(O.menus.addMenuItems(L,["save","saveAs","-","rename"],S),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(L,["upload"],S):
+O.menus.addMenuItems(L,["makeCopy"],S));L.addSeparator(S);null!=ja&&(ja.isRevisionHistorySupported()&&O.menus.addMenuItems(L,["revisionHistory"],S),ja.constructor==DriveFile&&O.menus.addMenuItems(L,["openFolder"],S),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ja.constructor==LocalFile&&null==ja.fileHandle||O.menus.addMenuItems(L,["synchronize"],S));O.menus.addMenuItems(L,["autosave"],S);if(null!=ja){L.addSeparator(S);"1"==urlParams.sketch&&O.commentsSupported()&&O.menus.addMenuItems(L,["comments"],
+S);if(null!=O.fileNode&&"1"!=urlParams.embedInline){var ma=null!=ja.getTitle()?ja.getTitle():O.defaultFilename;(ja.constructor==DriveFile&&null!=ja.sync&&ja.sync.isConnected()||!/(\.html)$/i.test(ma)&&!/(\.svg)$/i.test(ma))&&this.addMenuItems(L,["properties"],S)}ja.constructor==DriveFile&&O.menus.addMenuItems(L,["share"],S)}})));this.put("diagram",new Menu(mxUtils.bind(this,function(L,S){var ja=O.getCurrentFile();O.menus.addSubmenu("extras",L,S,mxResources.get("preferences"));L.addSeparator(S);if(mxClient.IS_CHROMEAPP||
+EditorUi.isElectronApp)O.menus.addMenuItems(L,"new open - synchronize - save saveAs -".split(" "),S);else if("1"==urlParams.embed||O.mode==App.MODE_ATLAS){"1"!=urlParams.noSaveBtn&&"1"!=urlParams.embedInline&&O.menus.addMenuItems(L,["-","save"],S);if("1"==urlParams.saveAndExit||"1"==urlParams.noSaveBtn&&"0"!=urlParams.saveAndExit||O.mode==App.MODE_ATLAS)O.menus.addMenuItems(L,["saveAndExit"],S),null!=ja&&ja.isRevisionHistorySupported()&&O.menus.addMenuItems(L,["revisionHistory"],S);L.addSeparator(S)}else O.mode==
+App.MODE_ATLAS?O.menus.addMenuItems(L,["save","synchronize","-"],S):"1"!=urlParams.noFileMenu&&("1"!=urlParams.sketch?(O.menus.addMenuItems(L,["new"],S),O.menus.addSubmenu("openFrom",L,S),isLocalStorage&&this.addSubmenu("openRecent",L,S),L.addSeparator(S),null!=ja&&(ja.constructor==DriveFile&&O.menus.addMenuItems(L,["share"],S),mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||ja.constructor==LocalFile||O.menus.addMenuItems(L,["synchronize"],S)),L.addSeparator(S),O.menus.addSubmenu("save",L,S)):O.menus.addSubmenu("file",
+L,S));O.menus.addSubmenu("exportAs",L,S);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp?O.menus.addMenuItems(L,["import"],S):"1"!=urlParams.noFileMenu&&O.menus.addSubmenu("importFrom",L,S);"1"!=urlParams.embed&&"1"==urlParams.sketch&&"1"!=urlParams.noFileMenu||!O.commentsSupported()||O.menus.addMenuItems(L,["-","comments"],S);O.menus.addMenuItems(L,"- findReplace layers tags - pageSetup".split(" "),S);"1"==urlParams.noFileMenu||mxClient.IS_IOS&&navigator.standalone||O.menus.addMenuItems(L,["print"],
+S);"1"!=urlParams.sketch&&null!=ja&&null!=O.fileNode&&"1"!=urlParams.embedInline&&(ja=null!=ja.getTitle()?ja.getTitle():O.defaultFilename,/(\.html)$/i.test(ja)||/(\.svg)$/i.test(ja)||this.addMenuItems(L,["-","properties"]));L.addSeparator(S);O.menus.addSubmenu("help",L,S);"1"==urlParams.embed||O.mode==App.MODE_ATLAS?("1"!=urlParams.noExitBtn||O.mode==App.MODE_ATLAS)&&O.menus.addMenuItems(L,["-","exit"],S):"1"!=urlParams.noFileMenu&&O.menus.addMenuItems(L,["-","close"])})));this.put("save",new Menu(mxUtils.bind(this,
+function(L,S){var ja=O.getCurrentFile();null!=ja&&ja.constructor==DriveFile?O.menus.addMenuItems(L,["save","makeCopy","-","rename","moveToFolder"],S):(O.menus.addMenuItems(L,["save","saveAs","-","rename"],S),O.isOfflineApp()?navigator.onLine&&"1"!=urlParams.stealth&&"1"!=urlParams.lockdown&&this.addMenuItems(L,["upload"],S):O.menus.addMenuItems(L,["makeCopy"],S));O.menus.addMenuItems(L,["-","autosave"],S);null!=ja&&ja.isRevisionHistorySupported()&&O.menus.addMenuItems(L,["-","revisionHistory"],S)})));
+var X=this.get("exportAs");this.put("exportAs",new Menu(mxUtils.bind(this,function(L,S){X.funct(L,S);mxClient.IS_CHROMEAPP||EditorUi.isElectronApp||O.menus.addMenuItems(L,["publishLink"],S);O.mode!=App.MODE_ATLAS&&"1"!=urlParams.extAuth&&(L.addSeparator(S),O.menus.addSubmenu("embed",L,S))})));var R=this.get("language");this.put("table",new Menu(mxUtils.bind(this,function(L,S){O.menus.addInsertTableCellItem(L,S)})));if("1"==urlParams.sketch){var sa=this.get("units");this.put("units",new Menu(mxUtils.bind(this,
+function(L,S){sa.funct(L,S);this.addMenuItems(L,["-","pageScale","-","ruler"],S)})))}this.put("extras",new Menu(mxUtils.bind(this,function(L,S){null!=R&&O.menus.addSubmenu("language",L,S);"1"!=urlParams.embed&&"1"!=urlParams.extAuth&&O.mode!=App.MODE_ATLAS&&O.menus.addSubmenu("theme",L,S);O.menus.addSubmenu("units",L,S);L.addSeparator(S);"1"!=urlParams.sketch&&O.menus.addMenuItems(L,"pageScale ruler scrollbars - tooltips copyConnect collapseExpand".split(" "),S);"1"!=urlParams.embedInline&&"1"!=urlParams.sketch&&
+"1"!=urlParams.embed&&(isLocalStorage||mxClient.IS_CHROMEAPP)&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItems(L,["-","showStartScreen","search","scratchpad"],S);L.addSeparator(S);"1"==urlParams.sketch?O.menus.addMenuItems(L,"configuration - copyConnect collapseExpand tooltips -".split(" "),S):(O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(L,"configuration",S),!O.isOfflineApp()&&isLocalStorage&&O.mode!=App.MODE_ATLAS&&O.menus.addMenuItem(L,"plugins",S));EditorUi.isElectronApp&&O.menus.addMenuItems(L,["-",
+"spellCheck","autoBkp","drafts","-"],S);var ja=O.getCurrentFile();null!=ja&&ja.isRealtimeEnabled()&&ja.isRealtimeSupported()&&this.addMenuItems(L,["-","showRemoteCursors","shareCursor","-"],S);L.addSeparator(S);("1"!=urlParams.embedInline&&Editor.isDarkMode()||!mxClient.IS_IE&&!mxClient.IS_IE11)&&this.addMenuItems(L,["toggleDarkMode"],S);L.addSeparator(S)})));this.put("insertAdvanced",new Menu(mxUtils.bind(this,function(L,S){O.menus.addMenuItems(L,"importText plantUml mermaid - formatSql importCsv - createShape editDiagram".split(" "),
+S)})));mxUtils.bind(this,function(){var L=this.get("insert"),S=L.funct;L.funct=function(ja,ma){"1"==urlParams.sketch?(O.insertTemplateEnabled&&!O.isOffline()&&O.menus.addMenuItems(ja,["insertTemplate"],ma),O.menus.addMenuItems(ja,["insertImage","insertLink","-"],ma),O.menus.addSubmenu("insertAdvanced",ja,ma,mxResources.get("advanced")),O.menus.addSubmenu("layout",ja,ma)):(S.apply(this,arguments),O.menus.addSubmenu("table",ja,ma))}})();var M="horizontalFlow verticalFlow - horizontalTree verticalTree radialTree - organic circle".split(" "),
+ka=function(L,S,ja,ma){L.addItem(ja,null,mxUtils.bind(this,function(){var u=new CreateGraphDialog(O,ja,ma);O.showDialog(u.container,620,420,!0,!1);u.init()}),S)};this.put("insertLayout",new Menu(mxUtils.bind(this,function(L,S){for(var ja=0;ja<M.length;ja++)"-"==M[ja]?L.addSeparator(S):ka(L,S,mxResources.get(M[ja])+"...",M[ja])})))};EditorUi.prototype.installFormatToolbar=function(O){var la=this.editor.graph,aa=document.createElement("div");aa.style.cssText="position:absolute;top:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;white-space:nowrap;background-color:#fff;transform:translate(-50%, 0);left:50%;";
+la.getSelectionModel().addListener(mxEvent.CHANGE,mxUtils.bind(this,function(ia,X){0<la.getSelectionCount()?(O.appendChild(aa),aa.innerHTML="Selected: "+la.getSelectionCount()):null!=aa.parentNode&&aa.parentNode.removeChild(aa)}))};var ba=!1;EditorUi.prototype.initFormatWindow=function(){if(!ba&&null!=this.formatWindow){ba=!0;this.formatWindow.window.setClosable(!1);var O=this.formatWindow.window.toggleMinimized;this.formatWindow.window.toggleMinimized=function(){O.apply(this,arguments);this.minimized?
+(this.div.style.width="90px",this.table.style.width="90px",this.div.style.left=parseInt(this.div.style.left)+150+"px"):(this.div.style.width="240px",this.table.style.width="240px",this.div.style.left=Math.max(0,parseInt(this.div.style.left)-150)+"px");this.fit()};mxEvent.addListener(this.formatWindow.window.title,"dblclick",mxUtils.bind(this,function(la){mxEvent.getSource(la)==this.formatWindow.window.title&&this.formatWindow.window.toggleMinimized()}))}};var Y=EditorUi.prototype.init;EditorUi.prototype.init=
+function(){function O(za,Ba,Ca){var ya=R.menus.get(za),Ga=L.addMenu(mxResources.get(za),mxUtils.bind(this,function(){ya.funct.apply(this,arguments)}),ka);Ga.className="1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Ga.style.display="inline-block";Ga.style.boxSizing="border-box";Ga.style.top="6px";Ga.style.marginRight="6px";Ga.style.height="30px";Ga.style.paddingTop="6px";Ga.style.paddingBottom="6px";Ga.style.cursor="pointer";Ga.setAttribute("title",mxResources.get(za));R.menus.menuCreated(ya,
+Ga,"geMenuItem");null!=Ca?(Ga.style.backgroundImage="url("+Ca+")",Ga.style.backgroundPosition="center center",Ga.style.backgroundRepeat="no-repeat",Ga.style.backgroundSize="24px 24px",Ga.style.width="34px",Ga.innerText=""):Ba||(Ga.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Ga.style.backgroundPosition="right 6px center",Ga.style.backgroundRepeat="no-repeat",Ga.style.paddingRight="22px");return Ga}function la(za,Ba,Ca,ya,Ga,Za){var Pa=document.createElement("a");Pa.className=
+"1"==urlParams.sketch?"geToolbarButton":"geMenuItem";Pa.style.display="inline-block";Pa.style.boxSizing="border-box";Pa.style.height="30px";Pa.style.padding="6px";Pa.style.position="relative";Pa.style.verticalAlign="top";Pa.style.top="0px";"1"==urlParams.sketch&&(Pa.style.borderStyle="none",Pa.style.boxShadow="none",Pa.style.padding="6px",Pa.style.margin="0px");null!=R.statusContainer?M.insertBefore(Pa,R.statusContainer):M.appendChild(Pa);null!=Za?(Pa.style.backgroundImage="url("+Za+")",Pa.style.backgroundPosition=
+"center center",Pa.style.backgroundRepeat="no-repeat",Pa.style.backgroundSize="24px 24px",Pa.style.width="34px"):mxUtils.write(Pa,za);mxEvent.addListener(Pa,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(fb){fb.preventDefault()}));mxEvent.addListener(Pa,"click",function(fb){"disabled"!=Pa.getAttribute("disabled")&&Ba(fb);mxEvent.consume(fb)});null==Ca&&(Pa.style.marginRight="4px");null!=ya&&Pa.setAttribute("title",ya);null!=Ga&&(za=function(){Ga.isEnabled()?(Pa.removeAttribute("disabled"),
+Pa.style.cursor="pointer"):(Pa.setAttribute("disabled","disabled"),Pa.style.cursor="default")},Ga.addListener("stateChanged",za),sa.addListener("enabledChanged",za),za());return Pa}function aa(za,Ba,Ca){Ca=document.createElement("div");Ca.className="geMenuItem";Ca.style.display="inline-block";Ca.style.verticalAlign="top";Ca.style.marginRight="6px";Ca.style.padding="0 4px 0 4px";Ca.style.height="30px";Ca.style.position="relative";Ca.style.top="0px";"1"==urlParams.sketch&&(Ca.style.boxShadow="none");
+for(var ya=0;ya<za.length;ya++)null!=za[ya]&&("1"==urlParams.sketch&&(za[ya].style.padding="10px 8px",za[ya].style.width="30px"),za[ya].style.margin="0px",za[ya].style.boxShadow="none",Ca.appendChild(za[ya]));null!=Ba&&mxUtils.setOpacity(Ca,Ba);null!=R.statusContainer&&"1"!=urlParams.sketch?M.insertBefore(Ca,R.statusContainer):M.appendChild(Ca);return Ca}function ia(){if("1"==urlParams.sketch)"1"!=urlParams.embedInline&&(da.style.left=58>Q.offsetTop-Q.offsetHeight/2?"70px":"10px");else{for(var za=
+M.firstChild;null!=za;){var Ba=za.nextSibling;"geMenuItem"!=za.className&&"geItem"!=za.className||za.parentNode.removeChild(za);za=Ba}ka=M.firstChild;n=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth;za=1E3>n||"1"==urlParams.sketch;var Ca=null;za||(Ca=O("diagram"));Ba=za?O("diagram",null,Editor.menuImage):null;null!=Ba&&(Ca=Ba);aa([Ca,la(mxResources.get("shapes"),R.actions.get("toggleShapes").funct,null,mxResources.get("shapes"),R.actions.get("image"),za?Editor.shapesImage:
+null),la(mxResources.get("format"),R.actions.get("toggleFormat").funct,null,mxResources.get("format")+" ("+R.actions.get("formatPanel").shortcut+")",R.actions.get("image"),za?Editor.formatImage:null)],za?60:null);Ba=O("insert",!0,za?P:null);aa([Ba,la(mxResources.get("delete"),R.actions.get("delete").funct,null,mxResources.get("delete"),R.actions.get("delete"),za?Editor.trashImage:null)],za?60:null);411<=n&&(aa([cb,$a],60),520<=n&&aa([na,640<=n?la("",Ra.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+
+" +)",Ra,Editor.zoomInImage):null,640<=n?la("",Oa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -)",Oa,Editor.zoomOutImage):null],60))}null!=Ca&&(mxEvent.disableContextMenu(Ca),mxEvent.addGestureListeners(Ca,mxUtils.bind(this,function(ya){(mxEvent.isShiftDown(ya)||mxEvent.isAltDown(ya)||mxEvent.isMetaDown(ya)||mxEvent.isControlDown(ya)||mxEvent.isPopupTrigger(ya))&&R.appIconClicked(ya)}),null,null));Ba=R.menus.get("language");null!=Ba&&!mxClient.IS_CHROMEAPP&&!EditorUi.isElectronApp&&
+600<=n&&"1"!=urlParams.sketch?(null==ra&&(Ba=L.addMenu("",Ba.funct),Ba.setAttribute("title",mxResources.get("language")),Ba.className="geToolbarButton",Ba.style.backgroundImage="url("+Editor.globeImage+")",Ba.style.backgroundPosition="center center",Ba.style.backgroundRepeat="no-repeat",Ba.style.backgroundSize="24px 24px",Ba.style.position="absolute",Ba.style.height="24px",Ba.style.width="24px",Ba.style.zIndex="1",Ba.style.right="8px",Ba.style.cursor="pointer",Ba.style.top="1"==urlParams.embed?"12px":
+"11px",M.appendChild(Ba),ra=Ba),R.buttonContainer.style.paddingRight="34px"):(R.buttonContainer.style.paddingRight="4px",null!=ra&&(ra.parentNode.removeChild(ra),ra=null))}Y.apply(this,arguments);"1"!=urlParams.embedInline&&this.doSetDarkMode(null!=urlParams.dark?1==urlParams.dark&&!mxClient.IS_IE&&!mxClient.IS_IE11:null!=mxSettings.settings.darkMode?mxSettings.settings.darkMode:window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches);var X=document.createElement("div");X.style.cssText=
+"position:absolute;left:0px;right:0px;top:0px;overflow-y:auto;overflow-x:hidden;";X.style.bottom="1"!=urlParams.embed||"1"==urlParams.libraries?"63px":"32px";this.sidebar=this.createSidebar(X);"1"==urlParams.sketch&&null!=this.sidebar&&this.isSettingsEnabled()&&(this.editor.chromeless&&!this.editor.editable||!(mxSettings.settings.isNew||8>=parseInt(mxSettings.settings.version||0))||(this.toggleScratchpad(),mxSettings.save()),this.sidebar.showPalette("search",mxSettings.settings.search));if("1"!=urlParams.sketch&&
+1E3<=n||null!=urlParams.clibs||null!=urlParams.libs||null!=urlParams["search-shapes"])k(this,!0),null!=this.sidebar&&null!=urlParams["search-shapes"]&&null!=this.sidebar.searchShapes&&(this.sidebar.searchShapes(urlParams["search-shapes"]),this.sidebar.showEntries("search"));var R=this;mxWindow.prototype.fit=function(){if(Editor.inlineFullscreen||null==R.embedViewport)mxUtils.fit(this.div);else{var za=parseInt(this.div.offsetLeft),Ba=parseInt(this.div.offsetWidth),Ca=R.embedViewport.x+R.embedViewport.width,
+ya=parseInt(this.div.offsetTop),Ga=parseInt(this.div.offsetHeight),Za=R.embedViewport.y+R.embedViewport.height;this.div.style.left=Math.max(R.embedViewport.x,Math.min(za,Ca-Ba))+"px";this.div.style.top=Math.max(R.embedViewport.y,Math.min(ya,Za-Ga))+"px";this.div.style.height=Math.min(R.embedViewport.height,parseInt(this.div.style.height))+"px";this.div.style.width=Math.min(R.embedViewport.width,parseInt(this.div.style.width))+"px"}};this.keyHandler.bindAction(75,!0,"toggleShapes",!0);EditorUi.windowed&&
+("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&(b(this,!0),"1"==urlParams.sketch?(this.initFormatWindow(),X=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight,null!=this.formatWindow&&(1200>n||708>X)?this.formatWindow.window.toggleMinimized():this.formatWindow.window.setVisible(!0)):this.formatWindow.window.setVisible(!0));R=this;var sa=R.editor.graph;R.toolbar=this.createToolbar(R.createDiv("geToolbar"));R.defaultLibraryName=mxResources.get("untitledLibrary");
+var M=document.createElement("div");M.className="geMenubarContainer";var ka=null,L=new Menubar(R,M);R.statusContainer=R.createStatusContainer();R.statusContainer.style.position="relative";R.statusContainer.style.maxWidth="";R.statusContainer.style.marginTop="7px";R.statusContainer.style.marginLeft="6px";R.statusContainer.style.color="gray";R.statusContainer.style.cursor="default";var S=R.hideCurrentMenu;R.hideCurrentMenu=function(){S.apply(this,arguments);this.editor.graph.popupMenuHandler.hideMenu()};
+var ja=R.descriptorChanged;R.descriptorChanged=function(){ja.apply(this,arguments);var za=R.getCurrentFile();if(null!=za&&null!=za.getTitle()){var Ba=za.getMode();"google"==Ba?Ba="googleDrive":"github"==Ba?Ba="gitHub":"gitlab"==Ba?Ba="gitLab":"onedrive"==Ba&&(Ba="oneDrive");Ba=mxResources.get(Ba);M.setAttribute("title",za.getTitle()+(null!=Ba?" ("+Ba+")":""))}else M.removeAttribute("title")};R.setStatusText(R.editor.getStatus());M.appendChild(R.statusContainer);R.buttonContainer=document.createElement("div");
+R.buttonContainer.style.cssText="position:absolute;right:0px;padding-right:34px;top:10px;white-space:nowrap;padding-top:2px;background-color:inherit;";M.appendChild(R.buttonContainer);R.menubarContainer=R.buttonContainer;R.tabContainer=document.createElement("div");R.tabContainer.className="geTabContainer";R.tabContainer.style.cssText="position:absolute;left:0px;right:0px;bottom:0px;height:30px;white-space:nowrap;margin-bottom:-2px;visibility:hidden;";X=R.diagramContainer.parentNode;var ma=document.createElement("div");
+ma.style.cssText="position:absolute;top:0px;left:0px;right:0px;bottom:0px;overflow:hidden;";R.diagramContainer.style.top="1"==urlParams.sketch?"0px":"47px";if("1"==urlParams.winCtrls&&"1"==urlParams.sketch){ma.style.top="20px";R.titlebar=document.createElement("div");R.titlebar.style.cssText="position:absolute;top:0px;left:0px;right:0px;height:20px;overflow:hidden;box-shadow: 0px 0px 2px #c0c0c0;";var u=document.createElement("div");u.style.cssText="max-width: calc(100% - 100px);text-overflow: ellipsis;user-select:none;height:20px;margin: 2px 10px;font-size: 12px;white-space: nowrap;overflow: hidden;";
+R.titlebar.appendChild(u);X.appendChild(R.titlebar)}u=R.menus.get("viewZoom");var H=u.funct;u.funct=function(za,Ba){H.apply(this,arguments);R.menus.addMenuItems(za,["-","outline","-","fullscreen","toggleDarkMode"],Ba)};var P="1"!=urlParams.sketch?Editor.plusImage:Editor.shapesImage,V="1"==urlParams.sketch?document.createElement("div"):null,Q="1"==urlParams.sketch?document.createElement("div"):null,da="1"==urlParams.sketch?document.createElement("div"):null,ea=mxUtils.bind(this,function(){null!=this.sidebar&&
+this.sidebar.refresh();sa.refresh();sa.view.validateBackground()});R.addListener("darkModeChanged",ea);R.addListener("sketchModeChanged",ea);var fa=mxUtils.bind(this,function(){if(Editor.inlineFullscreen)da.style.left="10px",da.style.top="10px",Q.style.left="10px",Q.style.top="60px",V.style.top="10px",V.style.right="12px",V.style.left="",R.diagramContainer.setAttribute("data-bounds",R.diagramContainer.style.top+" "+R.diagramContainer.style.left+" "+R.diagramContainer.style.width+" "+R.diagramContainer.style.height),
+R.diagramContainer.style.top="0px",R.diagramContainer.style.left="0px",R.diagramContainer.style.bottom="0px",R.diagramContainer.style.right="0px",R.diagramContainer.style.width="",R.diagramContainer.style.height="";else{var za=R.diagramContainer.getAttribute("data-bounds");if(null!=za){R.diagramContainer.style.background="transparent";R.diagramContainer.removeAttribute("data-bounds");var Ba=sa.getGraphBounds();za=za.split(" ");R.diagramContainer.style.top=za[0];R.diagramContainer.style.left=za[1];
+R.diagramContainer.style.width=Ba.width+50+"px";R.diagramContainer.style.height=Ba.height+46+"px";R.diagramContainer.style.bottom="";R.diagramContainer.style.right="";(window.opener||window.parent).postMessage(JSON.stringify({event:"resize",rect:R.diagramContainer.getBoundingClientRect()}),"*");R.refresh()}da.style.left=R.diagramContainer.offsetLeft+"px";da.style.top=R.diagramContainer.offsetTop-da.offsetHeight-4+"px";Q.style.display="";Q.style.left=R.diagramContainer.offsetLeft-Q.offsetWidth-4+"px";
+Q.style.top=R.diagramContainer.offsetTop+"px";V.style.left=R.diagramContainer.offsetLeft+R.diagramContainer.offsetWidth-V.offsetWidth+"px";V.style.top=da.style.top;V.style.right="";R.bottomResizer.style.left=R.diagramContainer.offsetLeft+(R.diagramContainer.offsetWidth-R.bottomResizer.offsetWidth)/2+"px";R.bottomResizer.style.top=R.diagramContainer.offsetTop+R.diagramContainer.offsetHeight-R.bottomResizer.offsetHeight/2-1+"px";R.rightResizer.style.left=R.diagramContainer.offsetLeft+R.diagramContainer.offsetWidth-
+R.rightResizer.offsetWidth/2-1+"px";R.rightResizer.style.top=R.diagramContainer.offsetTop+(R.diagramContainer.offsetHeight-R.bottomResizer.offsetHeight)/2+"px"}R.bottomResizer.style.visibility=Editor.inlineFullscreen?"hidden":"";R.rightResizer.style.visibility=R.bottomResizer.style.visibility;M.style.display="none";da.style.visibility="";V.style.visibility=""});ea=mxUtils.bind(this,function(){b(R,!0);R.initFormatWindow();var za=this.diagramContainer.getBoundingClientRect();this.formatWindow.window.setLocation(za.x+
+za.width+4,za.y)});R.addListener("editInlineStart",ea);"1"==urlParams.embedInline&&R.addListener("darkModeChanged",ea);R.addListener("editInlineStop",mxUtils.bind(this,function(za){R.diagramContainer.style.width="10px";R.diagramContainer.style.height="10px";R.diagramContainer.style.border="";R.bottomResizer.style.visibility="hidden";R.rightResizer.style.visibility="hidden";da.style.visibility="hidden";V.style.visibility="hidden";Q.style.display="none"}));if(null!=R.hoverIcons){var pa=R.hoverIcons.update;
+R.hoverIcons.update=function(){sa.freehand.isDrawing()||pa.apply(this,arguments)}}if(null!=sa.freehand){var ua=sa.freehand.createStyle;sa.freehand.createStyle=function(za){return ua.apply(this,arguments)+"sketch=0;"}}if("1"==urlParams.sketch){Q.className="geToolbarContainer";V.className="geToolbarContainer";da.className="geToolbarContainer";M.className="geToolbarContainer";R.picker=Q;var qa=!1;"1"!=urlParams.embed&&"atlassian"!=R.getServiceName()&&(mxEvent.addListener(M,"mouseenter",function(){R.statusContainer.style.display=
+"inline-block"}),mxEvent.addListener(M,"mouseleave",function(){qa||(R.statusContainer.style.display="none")}));var Da=mxUtils.bind(this,function(za){null!=R.notificationBtn&&(null!=za?R.notificationBtn.setAttribute("title",za):R.notificationBtn.removeAttribute("title"))});M.style.visibility=20>M.clientWidth?"hidden":"";R.editor.addListener("statusChanged",mxUtils.bind(this,function(){R.setStatusText(R.editor.getStatus());if("1"!=urlParams.embed&&"atlassian"!=R.getServiceName())if(R.statusContainer.style.display=
+"inline-block",qa=!0,1==R.statusContainer.children.length&&""==R.editor.getStatus())M.style.visibility="hidden";else{if(0==R.statusContainer.children.length||1==R.statusContainer.children.length&&"function"===typeof R.statusContainer.firstChild.getAttribute&&null==R.statusContainer.firstChild.getAttribute("class")){var za=null!=R.statusContainer.firstChild&&"function"===typeof R.statusContainer.firstChild.getAttribute?R.statusContainer.firstChild.getAttribute("title"):R.editor.getStatus();Da(za);
+var Ba=R.getCurrentFile();Ba=null!=Ba?Ba.savingStatusKey:DrawioFile.prototype.savingStatusKey;za==mxResources.get(Ba)+"..."?(R.statusContainer.innerHTML='<img title="'+mxUtils.htmlEntities(mxResources.get(Ba))+'..."src="'+Editor.tailSpin+'">',R.statusContainer.style.display="inline-block",qa=!0):6<R.buttonContainer.clientWidth&&(R.statusContainer.style.display="none",qa=!1)}else R.statusContainer.style.display="inline-block",Da(null),qa=!0;M.style.visibility=20>M.clientWidth&&!qa?"hidden":""}}));
+W=O("diagram",null,Editor.menuImage);W.style.boxShadow="none";W.style.padding="6px";W.style.margin="0px";da.appendChild(W);mxEvent.disableContextMenu(W);mxEvent.addGestureListeners(W,mxUtils.bind(this,function(za){(mxEvent.isShiftDown(za)||mxEvent.isAltDown(za)||mxEvent.isMetaDown(za)||mxEvent.isControlDown(za)||mxEvent.isPopupTrigger(za))&&this.appIconClicked(za)}),null,null);R.statusContainer.style.position="";R.statusContainer.style.display="none";R.statusContainer.style.margin="0px";R.statusContainer.style.padding=
+"6px 0px";R.statusContainer.style.maxWidth=Math.min(n-240,280)+"px";R.statusContainer.style.display="inline-block";R.statusContainer.style.textOverflow="ellipsis";R.buttonContainer.style.position="";R.buttonContainer.style.paddingRight="0px";R.buttonContainer.style.display="inline-block";var Aa=document.createElement("a");Aa.style.padding="0px";Aa.style.boxShadow="none";Aa.className="geMenuItem";Aa.style.display="inline-block";Aa.style.width="40px";Aa.style.height="12px";Aa.style.marginBottom="-2px";
+Aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")";Aa.style.backgroundPosition="top center";Aa.style.backgroundRepeat="no-repeat";Aa.setAttribute("title","Minimize");var Fa=!1,ta=mxUtils.bind(this,function(){Q.innerText="";if(!Fa){var za=function(ya,Ga,Za){ya=la("",ya.funct,null,Ga,ya,Za);ya.style.width="40px";ya.style.opacity="0.7";return Ba(ya,null,"pointer")},Ba=function(ya,Ga,Za){null!=Ga&&ya.setAttribute("title",Ga);ya.style.cursor=null!=Za?Za:"default";ya.style.margin="2px 0px";
+Q.appendChild(ya);mxUtils.br(Q);return ya};Ba(R.sidebar.createVertexTemplate("text;strokeColor=none;fillColor=none;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;",60,30,"Text",mxResources.get("text"),!0,!1,null,!0,!0),mxResources.get("text")+" ("+Editor.ctrlKey+"+Shift+X)");Ba(R.sidebar.createVertexTemplate("shape=note;whiteSpace=wrap;html=1;backgroundOutline=1;fontColor=#000000;darkOpacity=0.05;fillColor=#FFF9B2;strokeColor=none;fillStyle=solid;direction=west;gradientDirection=north;gradientColor=#FFF2A1;shadow=1;size=20;pointerEvents=1;",
+140,160,"",mxResources.get("note"),!0,!1,null,!0),mxResources.get("note"));Ba(R.sidebar.createVertexTemplate("rounded=0;whiteSpace=wrap;html=1;",160,80,"",mxResources.get("rectangle"),!0,!1,null,!0),mxResources.get("rectangle")+" ("+Editor.ctrlKey+"+K)");Ba(R.sidebar.createVertexTemplate("ellipse;whiteSpace=wrap;html=1;",160,100,"",mxResources.get("ellipse"),!0,!1,null,!0),mxResources.get("ellipse"));(function(){var ya=new mxCell("",new mxGeometry(0,0,sa.defaultEdgeLength,0),"edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;");
+ya.geometry.setTerminalPoint(new mxPoint(0,0),!0);ya.geometry.setTerminalPoint(new mxPoint(ya.geometry.width,0),!1);ya.geometry.points=[];ya.geometry.relative=!0;ya.edge=!0;Ba(R.sidebar.createEdgeTemplateFromCells([ya],ya.geometry.width,ya.geometry.height,mxResources.get("line"),!0,null,!0,!1),mxResources.get("line"));ya=ya.clone();ya.style="edgeStyle=none;orthogonalLoop=1;jettySize=auto;html=1;shape=flexArrow;rounded=1;startSize=8;endSize=8;";ya.geometry.width=sa.defaultEdgeLength+20;ya.geometry.setTerminalPoint(new mxPoint(0,
+20),!0);ya.geometry.setTerminalPoint(new mxPoint(ya.geometry.width,20),!1);ya=Ba(R.sidebar.createEdgeTemplateFromCells([ya],ya.geometry.width,40,mxResources.get("arrow"),!0,null,!0,!1),mxResources.get("arrow"));ya.style.borderBottom="1px solid "+(Editor.isDarkMode()?"#505050":"lightgray");ya.style.paddingBottom="14px";ya.style.marginBottom="14px"})();za(R.actions.get("insertFreehand"),mxResources.get("freehand"),Editor.freehandImage);var Ca=R.actions.get("toggleShapes");za(Ca,mxResources.get("shapes")+
+" ("+Ca.shortcut+")",P);W=O("table",null,Editor.calendarImage);W.style.boxShadow="none";W.style.opacity="0.7";W.style.padding="6px";W.style.margin="0px";W.style.width="37px";Ba(W,null,"pointer");W=O("insert",null,Editor.plusImage);W.style.boxShadow="none";W.style.opacity="0.7";W.style.padding="6px";W.style.margin="0px";W.style.width="37px";Ba(W,null,"pointer")}"1"!=urlParams.embedInline&&Q.appendChild(Aa)});mxEvent.addListener(Aa,"click",mxUtils.bind(this,function(){Fa?(mxUtils.setPrefixedStyle(Q.style,
+"transform","translate(0, -50%)"),Q.style.padding="8px 6px 4px",Q.style.top="50%",Q.style.bottom="",Q.style.height="",Aa.style.backgroundImage="url("+mxWindow.prototype.normalizeImage+")",Aa.style.width="40px",Aa.style.height="12px",Aa.setAttribute("title","Minimize"),Fa=!1,ta()):(Q.innerText="",Q.appendChild(Aa),mxUtils.setPrefixedStyle(Q.style,"transform","translate(0, 0)"),Q.style.top="",Q.style.bottom="12px",Q.style.padding="0px",Q.style.height="24px",Aa.style.height="24px",Aa.style.backgroundImage=
+"url("+Editor.plusImage+")",Aa.setAttribute("title",mxResources.get("insert")),Aa.style.width="24px",Fa=!0)}));ta();R.addListener("darkModeChanged",ta);R.addListener("sketchModeChanged",ta)}else R.editor.addListener("statusChanged",mxUtils.bind(this,function(){R.setStatusText(R.editor.getStatus())}));if(null!=u){var Sa=function(za){mxEvent.isShiftDown(za)?(R.hideCurrentMenu(),R.actions.get("smartFit").funct(),mxEvent.consume(za)):mxEvent.isAltDown(za)&&(R.hideCurrentMenu(),R.actions.get("customZoom").funct(),
+mxEvent.consume(za))},Ra=R.actions.get("zoomIn"),Oa=R.actions.get("zoomOut");ea=R.actions.get("resetView");R.actions.get("fullscreen");var Va=R.actions.get("undo"),Ja=R.actions.get("redo"),cb=la("",Va.funct,null,mxResources.get("undo")+" ("+Va.shortcut+")",Va,Editor.undoImage),$a=la("",Ja.funct,null,mxResources.get("redo")+" ("+Ja.shortcut+")",Ja,Editor.redoImage);if(null!=V){ea=function(){U.style.display=null!=R.pages&&("0"!=urlParams.pages||1<R.pages.length||Editor.pagesVisible)?"inline-block":
+"none"};var y=function(){U.innerText="";if(null!=R.currentPage){mxUtils.write(U,R.currentPage.getName());var za=null!=R.pages?R.pages.length:1,Ba=R.getPageIndex(R.currentPage);Ba=null!=Ba?Ba+1:1;var Ca=R.currentPage.getId();U.setAttribute("title",R.currentPage.getName()+" ("+Ba+"/"+za+")"+(null!=Ca?" ["+Ca+"]":""))}},K=R.actions.get("delete"),N=la("",K.funct,null,mxResources.get("delete"),K,Editor.trashImage);N.style.opacity="0.1";da.appendChild(N);K.addListener("stateChanged",function(){N.style.opacity=
+K.enabled?"":"0.1"});var T=function(){cb.style.display=0<R.editor.undoManager.history.length||sa.isEditing()?"inline-block":"none";$a.style.display=cb.style.display;cb.style.opacity=Va.enabled?"":"0.1";$a.style.opacity=Ja.enabled?"":"0.1"};da.appendChild(cb);da.appendChild($a);Va.addListener("stateChanged",T);Ja.addListener("stateChanged",T);T();var U=this.createPageMenuTab(!1,!0);U.style.display="none";U.style.position="";U.style.marginLeft="";U.style.top="";U.style.left="";U.style.height="100%";
+U.style.lineHeight="";U.style.borderStyle="none";U.style.padding="3px 0";U.style.margin="0px";U.style.background="";U.style.border="";U.style.boxShadow="none";U.style.verticalAlign="top";U.style.width="auto";U.style.maxWidth="160px";U.style.position="relative";U.style.padding="6px";U.style.textOverflow="ellipsis";U.style.opacity="0.8";V.appendChild(U);R.editor.addListener("pagesPatched",y);R.editor.addListener("pageSelected",y);R.editor.addListener("pageRenamed",y);R.editor.addListener("fileLoaded",
+y);y();R.addListener("fileDescriptorChanged",ea);R.addListener("pagesVisibleChanged",ea);R.editor.addListener("pagesPatched",ea);ea();ea=la("",Oa.funct,!0,mxResources.get("zoomOut")+" ("+Editor.ctrlKey+" -/Alt+Mousewheel)",Oa,Editor.zoomOutImage);V.appendChild(ea);var W=L.addMenu("100%",u.funct);W.setAttribute("title",mxResources.get("zoom"));W.innerHTML="100%";W.style.display="inline-block";W.style.color="inherit";W.style.cursor="pointer";W.style.textAlign="center";W.style.whiteSpace="nowrap";W.style.paddingRight=
+"10px";W.style.textDecoration="none";W.style.verticalAlign="top";W.style.padding="6px 0";W.style.fontSize="14px";W.style.width="40px";W.style.opacity="0.4";V.appendChild(W);u=la("",Ra.funct,!0,mxResources.get("zoomIn")+" ("+Editor.ctrlKey+" +/Alt+Mousewheel)",Ra,Editor.zoomInImage);V.appendChild(u);"1"==urlParams.embedInline&&(u=R.actions.get("exit"),V.appendChild(la("",u.funct,null,mxResources.get("exit"),u,Editor.closeImage)));R.tabContainer.style.visibility="hidden";M.style.cssText="position:absolute;right:14px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px 0px 6px 6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";
+da.style.cssText="position:absolute;left:10px;top:10px;height:30px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:6px;border-bottom:1px solid lightgray;text-align:right;white-space:nowrap;overflow:hidden;user-select:none;";V.style.cssText="position:absolute;right:14px;bottom:14px;height:28px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px;white-space:nowrap;user-select:none;";ma.appendChild(da);ma.appendChild(V);Q.style.cssText="position:absolute;left:10px;z-index:1;border-radius:4px;box-shadow:0px 0px 3px 1px #d1d1d1;padding:8px 6px 4px 6px;white-space:nowrap;transform:translate(0, -50%);top:50%;user-select:none;";
+mxClient.IS_POINTER&&(Q.style.touchAction="none");ma.appendChild(Q);window.setTimeout(function(){mxUtils.setPrefixedStyle(Q.style,"transition","transform .3s ease-out")},0);"1"==urlParams["format-toolbar"]&&this.installFormatToolbar(ma)}else{var na=la("",Sa,!0,mxResources.get("fit")+" ("+Editor.ctrlKey+"+H)",ea,Editor.zoomFitImage);M.style.cssText="position:absolute;left:0px;right:0px;top:0px;height:30px;padding:8px;text-align:left;white-space:nowrap;";this.tabContainer.style.right="70px";W=L.addMenu("100%",
+u.funct);W.setAttribute("title",mxResources.get("zoom")+" (Alt+Mousewheel)");W.style.whiteSpace="nowrap";W.style.paddingRight="10px";W.style.textDecoration="none";W.style.textDecoration="none";W.style.overflow="hidden";W.style.visibility="hidden";W.style.textAlign="center";W.style.cursor="pointer";W.style.height=parseInt(R.tabContainerHeight)-1+"px";W.style.lineHeight=parseInt(R.tabContainerHeight)+1+"px";W.style.position="absolute";W.style.display="block";W.style.fontSize="12px";W.style.width="59px";
+W.style.right="0px";W.style.bottom="0px";W.style.backgroundImage="url("+mxWindow.prototype.minimizeImage+")";W.style.backgroundPosition="right 6px center";W.style.backgroundRepeat="no-repeat";ma.appendChild(W)}(function(za){mxEvent.addListener(za,"click",Sa);var Ba=mxUtils.bind(this,function(){za.innerText="";mxUtils.write(za,Math.round(100*R.editor.graph.view.scale)+"%")});R.editor.graph.view.addListener(mxEvent.EVENT_SCALE,Ba);R.editor.addListener("resetGraphView",Ba);R.editor.addListener("pageSelected",
+Ba)})(W);var wa=R.setGraphEnabled;R.setGraphEnabled=function(){wa.apply(this,arguments);null!=this.tabContainer&&(W.style.visibility=this.tabContainer.style.visibility,this.diagramContainer.style.bottom="hidden"!=this.tabContainer.style.visibility&&null==V?this.tabContainerHeight+"px":"0px")}}ma.appendChild(M);ma.appendChild(R.diagramContainer);X.appendChild(ma);R.updateTabContainer();!EditorUi.windowed&&("1"==urlParams.sketch||1E3<=n)&&"1"!=urlParams.embedInline&&b(this,!0);null==V&&ma.appendChild(R.tabContainer);
+var ra=null;ia();mxEvent.addListener(window,"resize",function(){ia();null!=R.sidebarWindow&&R.sidebarWindow.window.fit();null!=R.formatWindow&&R.formatWindow.window.fit();null!=R.actions.outlineWindow&&R.actions.outlineWindow.window.fit();null!=R.actions.layersWindow&&R.actions.layersWindow.window.fit();null!=R.menus.tagsWindow&&R.menus.tagsWindow.window.fit();null!=R.menus.findWindow&&R.menus.findWindow.window.fit();null!=R.menus.findReplaceWindow&&R.menus.findReplaceWindow.window.fit()});if("1"==
+urlParams.embedInline){document.body.style.cursor="text";Q.style.transform="";mxEvent.addGestureListeners(R.diagramContainer.parentNode,function(za){mxEvent.getSource(za)==R.diagramContainer.parentNode&&(R.embedExitPoint=new mxPoint(mxEvent.getClientX(za),mxEvent.getClientY(za)),R.sendEmbeddedSvgExport())});X=document.createElement("div");X.style.position="absolute";X.style.width="10px";X.style.height="10px";X.style.borderRadius="5px";X.style.border="1px solid gray";X.style.background="#ffffff";X.style.cursor=
+"row-resize";R.diagramContainer.parentNode.appendChild(X);R.bottomResizer=X;var xa=null,Ea=null,Na=null,Ma=null;mxEvent.addGestureListeners(X,function(za){Ma=parseInt(R.diagramContainer.style.height);Ea=mxEvent.getClientY(za);sa.popupMenuHandler.hideMenu();mxEvent.consume(za)});X=X.cloneNode(!1);X.style.cursor="col-resize";R.diagramContainer.parentNode.appendChild(X);R.rightResizer=X;mxEvent.addGestureListeners(X,function(za){Na=parseInt(R.diagramContainer.style.width);xa=mxEvent.getClientX(za);sa.popupMenuHandler.hideMenu();
+mxEvent.consume(za)});mxEvent.addGestureListeners(document.body,null,function(za){var Ba=!1;null!=xa&&(R.diagramContainer.style.width=Math.max(20,Na+mxEvent.getClientX(za)-xa)+"px",Ba=!0);null!=Ea&&(R.diagramContainer.style.height=Math.max(20,Ma+mxEvent.getClientY(za)-Ea)+"px",Ba=!0);Ba&&((window.opener||window.parent).postMessage(JSON.stringify({event:"resize",fullscreen:Editor.inlineFullscreen,rect:R.diagramContainer.getBoundingClientRect()}),"*"),fa(),R.refresh())},function(za){null==xa&&null==
+Ea||mxEvent.consume(za);Ea=xa=null});this.diagramContainer.style.borderRadius="4px";document.body.style.backgroundColor="transparent";R.bottomResizer.style.visibility="hidden";R.rightResizer.style.visibility="hidden";da.style.visibility="hidden";V.style.visibility="hidden";Q.style.display="none"}"1"==urlParams.prefetchFonts&&R.editor.loadFonts()}}};
+(function(){var b=!1;"min"!=uiTheme||b||mxClient.IS_CHROMEAPP||(EditorUi.initMinimalTheme(),b=!0);var e=EditorUi.initTheme;EditorUi.initTheme=function(){e.apply(this,arguments);"min"!=uiTheme||b||(this.initMinimalTheme(),b=!0)}})();DrawioComment=function(b,e,k,n,D,t,E){this.file=b;this.id=e;this.content=k;this.modifiedDate=n;this.createdDate=D;this.isResolved=t;this.user=E;this.replies=[]};DrawioComment.prototype.addReplyDirect=function(b){null!=b&&this.replies.push(b)};DrawioComment.prototype.addReply=function(b,e,k,n,D){e()};DrawioComment.prototype.editComment=function(b,e,k){e()};DrawioComment.prototype.deleteComment=function(b,e){b()};DrawioUser=function(b,e,k,n,D){this.id=b;this.email=e;this.displayName=k;this.pictureUrl=n;this.locale=D};mxResources.parse('# *DO NOT DIRECTLY EDIT THIS FILE, IT IS AUTOMATICALLY GENERATED AND IT IS BASED ON:*\n# https://docs.google.com/spreadsheet/ccc?key=0AmQEO36liL4FdDJLWVNMaVV2UmRKSnpXU09MYkdGbEE\nabout=About\naboutDrawio=About draw.io\naccessDenied=Access Denied\naction=Action\nactualSize=Actual Size\nadd=Add\naddAccount=Add account\naddedFile=Added {1}\naddImages=Add Images\naddImageUrl=Add Image URL\naddLayer=Add Layer\naddProperty=Add Property\naddress=Address\naddToExistingDrawing=Add to Existing Drawing\naddWaypoint=Add Waypoint\nadjustTo=Adjust to\nadvanced=Advanced\nalign=Align\nalignment=Alignment\nallChangesLost=All changes will be lost!\nallPages=All Pages\nallProjects=All Projects\nallSpaces=All Spaces\nallTags=All Tags\nanchor=Anchor\nandroid=Android\nangle=Angle\narc=Arc\nareYouSure=Are you sure?\nensureDataSaved=Please ensure your data is saved before closing.\nallChangesSaved=All changes saved\nallChangesSavedInDrive=All changes saved in Drive\nallowPopups=Allow pop-ups to avoid this dialog.\nallowRelativeUrl=Allow relative URL\nalreadyConnected=Nodes already connected\napply=Apply\narchiMate21=ArchiMate 2.1\narrange=Arrange\narrow=Arrow\narrows=Arrows\nasNew=As New\natlas=Atlas\nauthor=Author\nauthorizationRequired=Authorization required\nauthorizeThisAppIn=Authorize this app in {1}:\nauthorize=Authorize\nauthorizing=Authorizing\nautomatic=Automatic\nautosave=Autosave\nautosize=Autosize\nattachments=Attachments\naws=AWS\naws3d=AWS 3D\nazure=Azure\nback=Back\nbackground=Background\nbackgroundColor=Background Color\nbackgroundImage=Background Image\nbasic=Basic\nbeta=beta\nblankDrawing=Blank Drawing\nblankDiagram=Blank Diagram\nblock=Block\nblockquote=Blockquote\nblog=Blog\nbold=Bold\nbootstrap=Bootstrap\nborder=Border\nborderColor=Border Color\nborderWidth=Border Width\nbottom=Bottom\nbottomAlign=Bottom Align\nbottomLeft=Bottom Left\nbottomRight=Bottom Right\nbpmn=BPMN\nbringForward=Bring Forward\nbrowser=Browser\nbulletedList=Bulleted List\nbusiness=Business\nbusy=Operation in progress\ncabinets=Cabinets\ncancel=Cancel\ncenter=Center\ncannotLoad=Load attempts failed. Please try again later.\ncannotLogin=Log in attempts failed. Please try again later.\ncannotOpenFile=Cannot open file\nchange=Change\nchangeOrientation=Change Orientation\nchangeUser=Change user\nchangeStorage=Change storage\nchangesNotSaved=Changes have not been saved\nclassDiagram=Class Diagram\nuserJoined={1} has joined\nuserLeft={1} has left\nchatWindowTitle=Chat\nchooseAnOption=Choose an option\nchromeApp=Chrome App\ncollaborativeEditingNotice=Important Notice for Collaborative Editing\ncompare=Compare\ncompressed=Compressed\ncommitMessage=Commit Message\nconfigLinkWarn=This link configures draw.io. Only click OK if you trust whoever gave you it!\nconfigLinkConfirm=Click OK to configure and restart draw.io.\ncontainer=Container\ncsv=CSV\ndark=Dark\ndiagramXmlDesc=XML File\ndiagramHtmlDesc=HTML File\ndiagramPngDesc=Editable Bitmap Image\ndiagramSvgDesc=Editable Vector Image\ndidYouMeanToExportToPdf=Did you mean to export to PDF?\ndraftFound=A draft for \'{1}\' has been found. Load it into the editor or discard it to continue.\ndraftRevisionMismatch=There is a different version of this diagram on a shared draft of this page. Please edit the diagram from the draft to ensure you are working with the latest version.\nselectDraft=Select a draft to continue editing:\ndragAndDropNotSupported=Drag and drop not supported for images. Would you like to import instead?\ndropboxCharsNotAllowed=The following characters are not allowed: / : ? * " |\ncheck=Check\nchecksum=Checksum\ncircle=Circle\ncisco=Cisco\nclassic=Classic\nclearDefaultStyle=Clear Default Style\nclearWaypoints=Clear Waypoints\nclipart=Clipart\nclose=Close\nclosingFile=Closing file\nrealtimeCollaboration=Real-Time Collaboration\ncollaborator=Collaborator\ncollaborators=Collaborators\ncollapse=Collapse\ncollapseExpand=Collapse/Expand\ncollapse-expand=Click to collapse/expand\nShift-click to move neighbors \nAlt-click to protect group size\ncollapsible=Collapsible\ncomic=Comic\ncomment=Comment\ncommentsNotes=Comments/Notes\ncompress=Compress\nconfiguration=Configuration\nconnect=Connect\nconnecting=Connecting\nconnectWithDrive=Connect with Google Drive\nconnection=Connection\nconnectionArrows=Connection Arrows\nconnectionPoints=Connection Points\nconstrainProportions=Constrain Proportions\ncontainsValidationErrors=Contains validation errors\ncopiedToClipboard=Copied to clipboard\ncopy=Copy\ncopyConnect=Copy on connect\ncopyCreated=A copy of the file was created.\ncopyData=Copy Data\ncopyOf=Copy of {1}\ncopyOfDrawing=Copy of Drawing\ncopySize=Copy Size\ncopyStyle=Copy Style\ncreate=Create\ncreateNewDiagram=Create New Diagram\ncreateRevision=Create Revision\ncreateShape=Create Shape\ncrop=Crop\ncurved=Curved\ncustom=Custom\ncurrent=Current\ncurrentPage=Current page\ncut=Cut\ndashed=Dashed\ndecideLater=Decide later\ndefault=Default\ndelete=Delete\ndeleteColumn=Delete Column\ndeleteLibrary401=Insufficient permissions to delete this library\ndeleteLibrary404=Selected library could not be found\ndeleteLibrary500=Error deleting library\ndeleteLibraryConfirm=You are about to permanently delete this library. Are you sure you want to do this?\ndeleteRow=Delete Row\ndescription=Description\ndevice=Device\ndiagram=Diagram\ndiagramContent=Diagram Content\ndiagramLocked=Diagram has been locked to prevent further data loss.\ndiagramLockedBySince=The diagram is locked by {1} since {2} ago\ndiagramName=Diagram Name\ndiagramIsPublic=Diagram is public\ndiagramIsNotPublic=Diagram is not public\ndiamond=Diamond\ndiamondThin=Diamond (thin)\ndidYouKnow=Did you know...\ndirection=Direction\ndiscard=Discard\ndiscardChangesAndReconnect=Discard Changes and Reconnect\ngoogleDriveMissingClickHere=Google Drive missing? Click here!\ndiscardChanges=Discard Changes\ndisconnected=Disconnected\ndistribute=Distribute\ndone=Done\ndoNotShowAgain=Do not show again\ndotted=Dotted\ndoubleClickOrientation=Doubleclick to change orientation\ndoubleClickTooltip=Doubleclick to insert text\ndoubleClickChangeProperty=Doubleclick to change property name\ndownload=Download\ndownloadDesktop=Get Desktop\ndownloadAs=Download as\nclickHereToSave=Click here to save.\ndpi=DPI\ndraftDiscarded=Draft discarded\ndraftSaved=Draft saved\ndragElementsHere=Drag elements here\ndragImagesHere=Drag images or URLs here\ndragUrlsHere=Drag URLs here\ndraw.io=draw.io\ndrawing=Drawing{1}\ndrawingEmpty=Drawing is empty\ndrawingTooLarge=Drawing is too large\ndrawioForWork=Draw.io for GSuite\ndropbox=Dropbox\nduplicate=Duplicate\nduplicateIt=Duplicate {1}\ndivider=Divider\ndx=Dx\ndy=Dy\neast=East\nedit=Edit\neditData=Edit Data\neditDiagram=Edit Diagram\neditGeometry=Edit Geometry\neditImage=Edit Image\neditImageUrl=Edit Image URL\neditLink=Edit Link\neditShape=Edit Shape\neditStyle=Edit Style\neditText=Edit Text\neditTooltip=Edit Tooltip\nglass=Glass\ngoogleImages=Google Images\nimageSearch=Image Search\neip=EIP\nembed=Embed\nembedFonts=Embed Fonts\nembedImages=Embed Images\nmainEmbedNotice=Paste this into the page\nelectrical=Electrical\nellipse=Ellipse\nembedNotice=Paste this once at the end of the page\nenterGroup=Enter Group\nenterName=Enter Name\nenterPropertyName=Enter Property Name\nenterValue=Enter Value\nentityRelation=Entity Relation\nentityRelationshipDiagram=Entity Relationship Diagram\nerror=Error\nerrorDeletingFile=Error deleting file\nerrorLoadingFile=Error loading file\nerrorRenamingFile=Error renaming file\nerrorRenamingFileNotFound=Error renaming file. File was not found.\nerrorRenamingFileForbidden=Error renaming file. Insufficient access rights.\nerrorSavingDraft=Error saving draft\nerrorSavingFile=Error saving file\nerrorSavingFileUnknown=Error authorizing with Google\'s servers. Please refresh the page to re-attempt.\nerrorSavingFileForbidden=Error saving file. Insufficient access rights.\nerrorSavingFileNameConflict=Could not save diagram. Current page already contains file named \'{1}\'.\nerrorSavingFileNotFound=Error saving file. File was not found.\nerrorSavingFileReadOnlyMode=Could not save diagram while read-only mode is active.\nerrorSavingFileSessionTimeout=Your session has ended. Please <a target=\'_blank\' href=\'{1}\'>{2}</a> and return to this tab to try to save again.\nerrorSendingFeedback=Error sending feedback.\nerrorUpdatingPreview=Error updating preview.\nexit=Exit\nexitGroup=Exit Group\nexpand=Expand\nexport=Export\nexporting=Exporting\nexportAs=Export as\nexportOptionsDisabled=Export options disabled\nexportOptionsDisabledDetails=The owner has disabled options to download, print or copy for commenters and viewers on this file.\nexternalChanges=External Changes\nextras=Extras\nfacebook=Facebook\nfailedToSaveTryReconnect=Failed to save, trying to reconnect\nfeatureRequest=Feature Request\nfeedback=Feedback\nfeedbackSent=Feedback successfully sent.\nfloorplans=Floorplans\nfile=File\nfileChangedOverwriteDialog=The file has been modified. Do you want to save the file and overwrite those changes?\nfileChangedSyncDialog=The file has been modified.\nfileChangedSync=The file has been modified. Click here to synchronize.\noverwrite=Overwrite\nsynchronize=Synchronize\nfilename=Filename\nfileExists=File already exists\nfileMovedToTrash=File was moved to trash\nfileNearlyFullSeeFaq=File nearly full, please see FAQ\nfileNotFound=File not found\nrepositoryNotFound=Repository not found\nfileNotFoundOrDenied=The file was not found. It does not exist or you do not have access.\nfileNotLoaded=File not loaded\nfileNotSaved=File not saved\nfileOpenLocation=How would you like to open these file(s)?\nfiletypeHtml=.html causes file to save as HTML with redirect to cloud URL\nfiletypePng=.png causes file to save as PNG with embedded data\nfiletypeSvg=.svg causes file to save as SVG with embedded data\nfileWillBeSavedInAppFolder={1} will be saved in the app folder.\nfill=Fill\nfillColor=Fill Color\nfilterCards=Filter Cards\nfind=Find\nfit=Fit\nfitContainer=Resize Container\nfitIntoContainer=Fit into Container\nfitPage=Fit Page\nfitPageWidth=Fit Page Width\nfitTo=Fit to\nfitToSheetsAcross=sheet(s) across\nfitToBy=by\nfitToSheetsDown=sheet(s) down\nfitTwoPages=Two Pages\nfitWindow=Fit Window\nflip=Flip\nflipH=Flip Horizontal\nflipV=Flip Vertical\nflowchart=Flowchart\nfolder=Folder\nfont=Font\nfontColor=Font Color\nfontFamily=Font Family\nfontSize=Font Size\nforbidden=You are not authorized to access this file\nformat=Format\nformatPanel=Format Panel\nformatted=Formatted\nformattedText=Formatted Text\nformatPng=PNG\nformatGif=GIF\nformatJpg=JPEG\nformatPdf=PDF\nformatSql=SQL\nformatSvg=SVG\nformatHtmlEmbedded=HTML\nformatSvgEmbedded=SVG (with XML)\nformatVsdx=VSDX\nformatVssx=VSSX\nformatXmlPlain=XML (Plain)\nformatXml=XML\nforum=Discussion/Help Forums\nfreehand=Freehand\nfromTemplate=From Template\nfromTemplateUrl=From Template URL\nfromText=From Text\nfromUrl=From URL\nfromThisPage=From this page\nfullscreen=Fullscreen\ngap=Gap\ngcp=GCP\ngeneral=General\ngetNotionChromeExtension=Get the Notion Chrome Extension\ngithub=GitHub\ngitlab=GitLab\ngliffy=Gliffy\nglobal=Global\ngoogleDocs=Google Docs\ngoogleDrive=Google Drive\ngoogleGadget=Google Gadget\ngooglePlus=Google+\ngoogleSharingNotAvailable=Sharing is only available via Google Drive. Please click Open below and share from the more actions menu:\ngoogleSlides=Google Slides\ngoogleSites=Google Sites\ngoogleSheets=Google Sheets\ngradient=Gradient\ngradientColor=Color\ngrid=Grid\ngridColor=Grid Color\ngridSize=Grid Size\ngroup=Group\nguides=Guides\nhateApp=I hate draw.io\nheading=Heading\nheight=Height\nhelp=Help\nhelpTranslate=Help us translate this application\nhide=Hide\nhideIt=Hide {1}\nhidden=Hidden\nhome=Home\nhorizontal=Horizontal\nhorizontalFlow=Horizontal Flow\nhorizontalTree=Horizontal Tree\nhowTranslate=How good is the translation in your language?\nhtml=HTML\nhtmlText=HTML Text\nid=ID\niframe=IFrame\nignore=Ignore\nimage=Image\nimageUrl=Image URL\nimages=Images\nimagePreviewError=This image couldn\'t be loaded for preview. Please check the URL.\nimageTooBig=Image too big\nimgur=Imgur\nimport=Import\nimportFrom=Import from\nincludeCopyOfMyDiagram=Include a copy of my diagram\nincreaseIndent=Increase Indent\ndecreaseIndent=Decrease Indent\ninsert=Insert\ninsertColumnBefore=Insert Column Left\ninsertColumnAfter=Insert Column Right\ninsertEllipse=Insert Ellipse\ninsertImage=Insert Image\ninsertHorizontalRule=Insert Horizontal Rule\ninsertLink=Insert Link\ninsertPage=Insert Page\ninsertRectangle=Insert Rectangle\ninsertRhombus=Insert Rhombus\ninsertRowBefore=Insert Row Above\ninsertRowAfter=Insert Row After\ninsertText=Insert Text\ninserting=Inserting\ninstallApp=Install App\ninvalidFilename=Diagram names must not contain the following characters: / | : ; { } < > & + ? = "\ninvalidLicenseSeeThisPage=Your license is invalid, please see this <a target="_blank" href="https://support.draw.io/display/DFCS/Licensing+your+draw.io+plugin">page</a>.\ninvalidInput=Invalid input\ninvalidName=Invalid name\ninvalidOrMissingFile=Invalid or missing file\ninvalidPublicUrl=Invalid public URL\nisometric=Isometric\nios=iOS\nitalic=Italic\nkennedy=Kennedy\nkeyboardShortcuts=Keyboard Shortcuts\nlabels=Labels\nlayers=Layers\nlandscape=Landscape\nlanguage=Language\nleanMapping=Lean Mapping\nlastChange=Last change {1} ago\nlessThanAMinute=less than a minute\nlicensingError=Licensing Error\nlicenseHasExpired=The license for {1} has expired on {2}. Click here.\nlicenseRequired=This feature requires draw.io to be licensed.\nlicenseWillExpire=The license for {1} will expire on {2}. Click here.\nlineJumps=Line jumps\nlinkAccountRequired=If the diagram is not public a Google account is required to view the link.\nlinkText=Link Text\nlist=List\nminute=minute\nminutes=minutes\nhours=hours\ndays=days\nmonths=months\nyears=years\nrestartForChangeRequired=Changes will take effect after a restart of the application.\nlaneColor=Lanecolor\nlastModified=Last modified\nlayout=Layout\nleft=Left\nleftAlign=Left Align\nleftToRight=Left to right\nlibraryTooltip=Drag and drop shapes here or click + to insert. Double click to edit.\nlightbox=Lightbox\nline=Line\nlineend=Line end\nlineheight=Line Height\nlinestart=Line start\nlinewidth=Linewidth\nlink=Link\nlinks=Links\nloading=Loading\nlockUnlock=Lock/Unlock\nloggedOut=Logged Out\nlogIn=log in\nloveIt=I love {1}\nlucidchart=Lucidchart\nmaps=Maps\nmathematicalTypesetting=Mathematical Typesetting\nmakeCopy=Make a Copy\nmanual=Manual\nmerge=Merge\nmermaid=Mermaid\nmicrosoftOffice=Microsoft Office\nmicrosoftExcel=Microsoft Excel\nmicrosoftPowerPoint=Microsoft PowerPoint\nmicrosoftWord=Microsoft Word\nmiddle=Middle\nminimal=Minimal\nmisc=Misc\nmockups=Mockups\nmodificationDate=Modification date\nmodifiedBy=Modified by\nmore=More\nmoreResults=More Results\nmoreShapes=More Shapes\nmove=Move\nmoveToFolder=Move to Folder\nmoving=Moving\nmoveSelectionTo=Move selection to {1}\nname=Name\nnavigation=Navigation\nnetwork=Network\nnetworking=Networking\nnew=New\nnewLibrary=New Library\nnextPage=Next Page\nno=No\nnoPickFolder=No, pick folder\nnoAttachments=No attachments found\nnoColor=No Color\nnoFiles=No Files\nnoFileSelected=No file selected\nnoLibraries=No libraries found\nnoMoreResults=No more results\nnone=None\nnoOtherViewers=No other viewers\nnoPlugins=No plugins\nnoPreview=No preview\nnoResponse=No response from server\nnoResultsFor=No results for \'{1}\'\nnoRevisions=No revisions\nnoSearchResults=No search results found\nnoPageContentOrNotSaved=No anchors found on this page or it hasn\'t been saved yet\nnormal=Normal\nnorth=North\nnotADiagramFile=Not a diagram file\nnotALibraryFile=Not a library file\nnotAvailable=Not available\nnotAUtf8File=Not a UTF-8 file\nnotConnected=Not connected\nnote=Note\nnotion=Notion\nnotSatisfiedWithImport=Not satisfied with the import?\nnotUsingService=Not using {1}?\nnumberedList=Numbered list\noffline=Offline\nok=OK\noneDrive=OneDrive\nonline=Online\nopacity=Opacity\nopen=Open\nopenArrow=Open Arrow\nopenExistingDiagram=Open Existing Diagram\nopenFile=Open File\nopenFrom=Open from\nopenLibrary=Open Library\nopenLibraryFrom=Open Library from\nopenLink=Open Link\nopenInNewWindow=Open in New Window\nopenInThisWindow=Open in This Window\nopenIt=Open {1}\nopenRecent=Open Recent\nopenSupported=Supported formats are files saved from this software (.xml), .vsdx and .gliffy\noptions=Options\norganic=Organic\norgChart=Org Chart\northogonal=Orthogonal\notherViewer=other viewer\notherViewers=other viewers\noutline=Outline\noval=Oval\npage=Page\npageContent=Page Content\npageNotFound=Page not found\npageWithNumber=Page-{1}\npages=Pages\npageView=Page View\npageSetup=Page Setup\npageScale=Page Scale\npan=Pan\npanTooltip=Space+Drag to pan\npaperSize=Paper Size\npattern=Pattern\nparallels=Parallels\npaste=Paste\npasteData=Paste Data\npasteHere=Paste here\npasteSize=Paste Size\npasteStyle=Paste Style\nperimeter=Perimeter\npermissionAnyone=Anyone can edit\npermissionAuthor=Owner and admins can edit\npickFolder=Pick a folder\npickLibraryDialogTitle=Select Library\npublicDiagramUrl=Public URL of the diagram\nplaceholders=Placeholders\nplantUml=PlantUML\nplugins=Plugins\npluginUrl=Plugin URL\npluginWarning=The page has requested to load the following plugin(s):\n \n {1}\n \n Would you like to load these plugin(s) now?\n \n NOTE : Only allow plugins to run if you fully understand the security implications of doing so.\n\nplusTooltip=Click to connect and clone (ctrl+click to clone, shift+click to connect). Drag to connect (ctrl+drag to clone).\nportrait=Portrait\nposition=Position\nposterPrint=Poster Print\npreferences=Preferences\npreview=Preview\npreviousPage=Previous Page\nprint=Print\nprintAllPages=Print All Pages\nprocEng=Proc. Eng.\nproject=Project\npriority=Priority\nproperties=Properties\npublish=Publish\nquickStart=Quick Start Video\nrack=Rack\nradial=Radial\nradialTree=Radial Tree\nreadOnly=Read-only\nreconnecting=Reconnecting\nrecentlyUpdated=Recently Updated\nrecentlyViewed=Recently Viewed\nrectangle=Rectangle\nredirectToNewApp=This file was created or modified in a newer version of this app. You will be redirected now.\nrealtimeTimeout=It looks like you\'ve made a few changes while offline. We\'re sorry, these changes cannot be saved.\nredo=Redo\nrefresh=Refresh\nregularExpression=Regular Expression\nrelative=Relative\nrelativeUrlNotAllowed=Relative URL not allowed\nrememberMe=Remember me\nrememberThisSetting=Remember this setting\nremoveFormat=Clear Formatting\nremoveFromGroup=Remove from Group\nremoveIt=Remove {1}\nremoveWaypoint=Remove Waypoint\nrename=Rename\nrenamed=Renamed\nrenameIt=Rename {1}\nrenaming=Renaming\nreplace=Replace\nreplaceIt={1} already exists. Do you want to replace it?\nreplaceExistingDrawing=Replace existing drawing\nrequired=required\nreset=Reset\nresetView=Reset View\nresize=Resize\nresizeLargeImages=Do you want to resize large images to make the application run faster?\nretina=Retina\nresponsive=Responsive\nrestore=Restore\nrestoring=Restoring\nretryingIn=Retrying in {1} second(s)\nretryingLoad=Load failed. Retrying...\nretryingLogin=Login time out. Retrying...\nreverse=Reverse\nrevision=Revision\nrevisionHistory=Revision History\nrhombus=Rhombus\nright=Right\nrightAlign=Right Align\nrightToLeft=Right to left\nrotate=Rotate\nrotateTooltip=Click and drag to rotate, click to turn shape only by 90 degrees\nrotation=Rotation\nrounded=Rounded\nsave=Save\nsaveAndExit=Save & Exit\nsaveAs=Save as\nsaveAsXmlFile=Save as XML file?\nsaved=Saved\nsaveDiagramFirst=Please save the diagram first\nsaveDiagramsTo=Save diagrams to\nsaveLibrary403=Insufficient permissions to edit this library\nsaveLibrary500=There was an error while saving the library\nsaveLibraryReadOnly=Could not save library while read-only mode is active\nsaving=Saving\nscratchpad=Scratchpad\nscrollbars=Scrollbars\nsearch=Search\nsearchShapes=Search Shapes\nselectAll=Select All\nselectionOnly=Selection Only\nselectCard=Select Card\nselectEdges=Select Edges\nselectFile=Select File\nselectFolder=Select Folder\nselectFont=Select Font\nselectNone=Select None\nselectTemplate=Select Template\nselectVertices=Select Vertices\nsendBackward=Send Backward\nsendMessage=Send\nsendYourFeedback=Send your feedback\nserviceUnavailableOrBlocked=Service unavailable or blocked\nsessionExpired=Your session has expired. Please refresh the browser window.\nsessionTimeoutOnSave=Your session has timed out and you have been disconnected from the Google Drive. Press OK to login and save.\nsetAsDefaultStyle=Set as Default Style\nshadow=Shadow\nshape=Shape\nshapes=Shapes\nshare=Share\nshareCursor=Share Mouse Cursor\nshareLink=Link for shared editing\nsharingAvailable=Sharing available for Google Drive and OneDrive files.\nsharp=Sharp\nshow=Show\nshowRemoteCursors=Show Remote Mouse Cursors\nshowStartScreen=Show Start Screen\nsidebarTooltip=Click to expand. Drag and drop shapes into the diagram. Shift+click to change selection. Alt+click to insert and connect.\nsigns=Signs\nsignOut=Sign out\nsimple=Simple\nsimpleArrow=Simple Arrow\nsimpleViewer=Simple Viewer\nsize=Size\nsketch=Sketch\nsnapToGrid=Snap to Grid\nsolid=Solid\nsourceSpacing=Source Spacing\nsouth=South\nsoftware=Software\nspace=Space\nspacing=Spacing\nspecialLink=Special Link\nstandard=Standard\nstartDrawing=Start drawing\nstopDrawing=Stop drawing\nstarting=Starting\nstraight=Straight\nstrikethrough=Strikethrough\nstrokeColor=Line Color\nstyle=Style\nsubscript=Subscript\nsummary=Summary\nsuperscript=Superscript\nsupport=Support\nswimlaneDiagram=Swimlane Diagram\nsysml=SysML\ntags=Tags\ntable=Table\ntables=Tables\ntakeOver=Take Over\ntargetSpacing=Target Spacing\ntemplate=Template\ntemplates=Templates\ntext=Text\ntextAlignment=Text Alignment\ntextOpacity=Text Opacity\ntheme=Theme\ntimeout=Timeout\ntitle=Title\nto=to\ntoBack=To Back\ntoFront=To Front\ntooLargeUseDownload=Too large, use download instead.\ntoolbar=Toolbar\ntooltips=Tooltips\ntop=Top\ntopAlign=Top Align\ntopLeft=Top Left\ntopRight=Top Right\ntransparent=Transparent\ntransparentBackground=Transparent Background\ntrello=Trello\ntryAgain=Try again\ntryOpeningViaThisPage=Try opening via this page\nturn=Rotate shape only by 90°\ntype=Type\ntwitter=Twitter\numl=UML\nunderline=Underline\nundo=Undo\nungroup=Ungroup\nunmerge=Unmerge\nunsavedChanges=Unsaved changes\nunsavedChangesClickHereToSave=Unsaved changes. Click here to save.\nuntitled=Untitled\nuntitledDiagram=Untitled Diagram\nuntitledLayer=Untitled Layer\nuntitledLibrary=Untitled Library\nunknownError=Unknown error\nupdateFile=Update {1}\nupdatingDocument=Updating Document. Please wait...\nupdatingPreview=Updating Preview. Please wait...\nupdatingSelection=Updating Selection. Please wait...\nupload=Upload\nurl=URL\nuseOffline=Use Offline\nuseRootFolder=Use root folder?\nuserManual=User Manual\nvertical=Vertical\nverticalFlow=Vertical Flow\nverticalTree=Vertical Tree\nview=View\nviewerSettings=Viewer Settings\nviewUrl=Link to view: {1}\nvoiceAssistant=Voice Assistant (beta)\nwarning=Warning\nwaypoints=Waypoints\nwest=West\nwidth=Width\nwiki=Wiki\nwordWrap=Word Wrap\nwritingDirection=Writing Direction\nyes=Yes\nyourEmailAddress=Your email address\nzoom=Zoom\nzoomIn=Zoom In\nzoomOut=Zoom Out\nbasic=Basic\nbusinessprocess=Business Processes\ncharts=Charts\nengineering=Engineering\nflowcharts=Flowcharts\ngmdl=Material Design\nmindmaps=Mindmaps\nmockups=Mockups\nnetworkdiagrams=Network Diagrams\nnothingIsSelected=Nothing is selected\nother=Other\nsoftwaredesign=Software Design\nvenndiagrams=Venn Diagrams\nwebEmailOrOther=Web, email or any other internet address\nwebLink=Web Link\nwireframes=Wireframes\nproperty=Property\nvalue=Value\nshowMore=Show More\nshowLess=Show Less\nmyDiagrams=My Diagrams\nallDiagrams=All Diagrams\nrecentlyUsed=Recently used\nlistView=List view\ngridView=Grid view\nresultsFor=Results for \'{1}\'\noneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / { | }\noneDriveInvalidDeviceName=The specified device name is invalid\nofficeNotLoggedOD=You are not logged in to OneDrive. Please open draw.io task pane and login first.\nofficeSelectSingleDiag=Please select a single draw.io diagram only without other contents.\nofficeSelectDiag=Please select a draw.io diagram.\nofficeCannotFindDiagram=Cannot find a draw.io diagram in the selection\nnoDiagrams=No diagrams found\nauthFailed=Authentication failed\nofficeFailedAuthMsg=Unable to successfully authenticate user or authorize application.\nconvertingDiagramFailed=Converting diagram failed\nofficeCopyImgErrMsg=Due to some limitations in the host application, the image could not be inserted. Please manually copy the image then paste it to the document.\ninsertingImageFailed=Inserting image failed\nofficeCopyImgInst=Instructions: Right-click the image below. Select "Copy image" from the context menu. Then, in the document, right-click and select "Paste" from the context menu.\nfolderEmpty=Folder is empty\nrecent=Recent\nsharedWithMe=Shared With Me\nsharepointSites=Sharepoint Sites\nerrorFetchingFolder=Error fetching folder items\nerrorAuthOD=Error authenticating to OneDrive\nofficeMainHeader=Adds draw.io diagrams to your document.\nofficeStepsHeader=This add-in performs the following steps:\nofficeStep1=Connects to Microsoft OneDrive, Google Drive or your device.\nofficeStep2=Select a draw.io diagram.\nofficeStep3=Insert the diagram into the document.\nofficeAuthPopupInfo=Please complete the authentication in the pop-up window.\nofficeSelDiag=Select draw.io Diagram:\nfiles=Files\nshared=Shared\nsharepoint=Sharepoint\nofficeManualUpdateInst=Instructions: Copy draw.io diagram from the document. Then, in the box below, right-click and select "Paste" from the context menu.\nofficeClickToEdit=Click icon to start editing:\npasteDiagram=Paste draw.io diagram here\nconnectOD=Connect to OneDrive\nselectChildren=Select Children\nselectSiblings=Select Siblings\nselectParent=Select Parent\nselectDescendants=Select Descendants\nlastSaved=Last saved {1} ago\nresolve=Resolve\nreopen=Re-open\nshowResolved=Show Resolved\nreply=Reply\nobjectNotFound=Object not found\nreOpened=Re-opened\nmarkedAsResolved=Marked as resolved\nnoCommentsFound=No comments found\ncomments=Comments\ntimeAgo={1} ago\nconfluenceCloud=Confluence Cloud\nlibraries=Libraries\nconfAnchor=Confluence Page Anchor\nconfTimeout=The connection has timed out\nconfSrvTakeTooLong=The server at {1} is taking too long to respond.\nconfCannotInsertNew=Cannot insert draw.io diagram to a new Confluence page\nconfSaveTry=Please save the page and try again.\nconfCannotGetID=Unable to determine page ID\nconfContactAdmin=Please contact your Confluence administrator.\nreadErr=Read Error\neditingErr=Editing Error\nconfExtEditNotPossible=This diagram cannot be edited externally. Please try editing it while editing the page\nconfEditedExt=Diagram/Page edited externally\ndiagNotFound=Diagram Not Found\nconfEditedExtRefresh=Diagram/Page is edited externally. Please refresh the page.\nconfCannotEditDraftDelOrExt=Cannot edit diagrams in a draft page, diagram is deleted from the page, or diagram is edited externally. Please check the page.\nretBack=Return back\nconfDiagNotPublished=The diagram does not belong to a published page\ncreatedByDraw=Created by draw.io\nfilenameShort=Filename too short\ninvalidChars=Invalid characters\nalreadyExst={1} already exists\ndraftReadErr=Draft Read Error\ndiagCantLoad=Diagram cannot be loaded\ndraftWriteErr=Draft Write Error\ndraftCantCreate=Draft could not be created\nconfDuplName=Duplicate diagram name detected. Please pick another name.\nconfSessionExpired=Looks like your session expired. Log in again to keep working.\nlogin=Login\ndrawPrev=draw.io preview\ndrawDiag=draw.io diagram\ninvalidCallFnNotFound=Invalid Call: {1} not found\ninvalidCallErrOccured=Invalid Call: An error occurred, {1}\nanonymous=Anonymous\nconfGotoPage=Go to containing page\nshowComments=Show Comments\nconfError=Error: {1}\ngliffyImport=Gliffy Import\ngliffyImportInst1=Click the "Start Import" button to import all Gliffy diagrams to draw.io.\ngliffyImportInst2=Please note that the import procedure will take some time and the browser window must remain open until the import is completed.\nstartImport=Start Import\ndrawConfig=draw.io Configuration\ncustomLib=Custom Libraries\ncustomTemp=Custom Templates\npageIdsExp=Page IDs Export\ndrawReindex=draw.io re-indexing (beta)\nworking=Working\ndrawConfigNotFoundInst=draw.io Configuration Space (DRAWIOCONFIG) does not exist. This space is needed to store draw.io configuration files and custom libraries/templates.\ncreateConfSp=Create Config Space\nunexpErrRefresh=Unexpected error, please refresh the page and try again.\nconfigJSONInst=Write draw.io JSON configuration in the editor below then click save. If you need help, please refer to\nthisPage=this page\ncurCustLib=Current Custom Libraries\nlibName=Library Name\naction=Action\ndrawConfID=draw.io Config ID\naddLibInst=Click the "Add Library" button to upload a new library.\naddLib=Add Library\ncustomTempInst1=Custom templates are draw.io diagrams saved in children pages of\ncustomTempInst2=For more details, please refer to\ntempsPage=Templates page\npageIdsExpInst1=Select export target, then click the "Start Export" button to export all pages IDs.\npageIdsExpInst2=Please note that the export procedure will take some time and the browser window must remain open until the export is completed.\nstartExp=Start Export\nrefreshDrawIndex=Refresh draw.io Diagrams Index\nreindexInst1=Click the "Start Indexing" button to refresh draw.io diagrams index.\nreindexInst2=Please note that the indexing procedure will take some time and the browser window must remain open until the indexing is completed.\nstartIndexing=Start Indexing\nconfAPageFoundFetch=Page "{1}" found. Fetching\nconfAAllDiagDone=All {1} diagrams processed. Process finished.\nconfAStartedProcessing=Started processing page "{1}"\nconfAAllDiagInPageDone=All {1} diagrams in page "{2}" processed successfully.\nconfAPartialDiagDone={1} out of {2} {3} diagrams in page "{4}" processed successfully.\nconfAUpdatePageFailed=Updating page "{1}" failed.\nconfANoDiagFoundInPage=No {1} diagrams found in page "{2}".\nconfAFetchPageFailed=Fetching the page failed.\nconfANoDiagFound=No {1} diagrams found. Process finished.\nconfASearchFailed=Searching for {1} diagrams failed. Please try again later.\nconfAGliffyDiagFound={2} diagram "{1}" found. Importing\nconfAGliffyDiagImported={2} diagram "{1}" imported successfully.\nconfASavingImpGliffyFailed=Saving imported {2} diagram "{1}" failed.\nconfAImportedFromByDraw=Imported from "{1}" by draw.io\nconfAImportGliffyFailed=Importing {2} diagram "{1}" failed.\nconfAFetchGliffyFailed=Fetching {2} diagram "{1}" failed.\nconfACheckBrokenDiagLnk=Checking for broken diagrams links.\nconfADelDiagLinkOf=Deleting diagram link of "{1}"\nconfADupLnk=(duplicate link)\nconfADelDiagLnkFailed=Deleting diagram link of "{1}" failed.\nconfAUnexpErrProcessPage=Unexpected error during processing the page with id: {1}\nconfADiagFoundIndex=Diagram "{1}" found. Indexing\nconfADiagIndexSucc=Diagram "{1}" indexed successfully.\nconfAIndexDiagFailed=Indexing diagram "{1}" failed.\nconfASkipDiagOtherPage=Skipped "{1}" as it belongs to another page!\nconfADiagUptoDate=Diagram "{1}" is up to date.\nconfACheckPagesWDraw=Checking pages having draw.io diagrams.\nconfAErrOccured=An error occurred!\nsavedSucc=Saved successfully\nconfASaveFailedErr=Saving Failed (Unexpected Error)\ncharacter=Character\nconfAConfPageDesc=This page contains draw.io configuration file (configuration.json) as attachment\nconfALibPageDesc=This page contains draw.io custom libraries as attachments\nconfATempPageDesc=This page contains draw.io custom templates as attachments\nworking=Working\nconfAConfSpaceDesc=This space is used to store draw.io configuration files and custom libraries/templates\nconfANoCustLib=No Custom Libraries\ndelFailed=Delete failed!\nshowID=Show ID\nconfAIncorrectLibFileType=Incorrect file type. Libraries should be XML files.\nuploading=Uploading\nconfALibExist=This library already exists\nconfAUploadSucc=Uploaded successfully\nconfAUploadFailErr=Upload Failed (Unexpected Error)\nhiResPreview=High Res Preview\nofficeNotLoggedGD=You are not logged in to Google Drive. Please open draw.io task pane and login first.\nofficePopupInfo=Please complete the process in the pop-up window.\npickODFile=Pick OneDrive File\ncreateODFile=Create OneDrive File\npickGDriveFile=Pick Google Drive File\ncreateGDriveFile=Create Google Drive File\npickDeviceFile=Pick Device File\nvsdNoConfig="vsdurl" is not configured\nruler=Ruler\nunits=Units\npoints=Points\ninches=Inches\nmillimeters=Millimeters\nconfEditDraftDelOrExt=This diagram is in a draft page, is deleted from the page, or is edited externally. It will be saved as a new attachment version and may not be reflected in the page.\nconfDiagEditedExt=Diagram is edited in another session. It will be saved as a new attachment version but the page will show other session\'s modifications.\nmacroNotFound=Macro Not Found\nconfAInvalidPageIdsFormat=Incorrect Page IDs file format\nconfACollectingCurPages=Collecting current pages\nconfABuildingPagesMap=Building pages mapping\nconfAProcessDrawDiag=Started processing imported draw.io diagrams\nconfAProcessDrawDiagDone=Finished processing imported draw.io diagrams\nconfAProcessImpPages=Started processing imported pages\nconfAErrPrcsDiagInPage=Error processing draw.io diagrams in page "{1}"\nconfAPrcsDiagInPage=Processing draw.io diagrams in page "{1}"\nconfAImpDiagram=Importing diagram "{1}"\nconfAImpDiagramFailed=Importing diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\nconfAImpDiagramError=Error importing diagram "{1}". Cannot fetch or save the diagram. Cannot fix this diagram links.\nconfAUpdateDgrmCCFailed=Updating link to diagram "{1}" failed.\nconfImpDiagramSuccess=Updating diagram "{1}" done successfully.\nconfANoLnksInDrgm=No links to update in: {1}\nconfAUpdateLnkToPg=Updated link to page: "{1}" in diagram: "{2}"\nconfAUpdateLBLnkToPg=Updated lightbox link to page: "{1}" in diagram: "{2}"\nconfAUpdateLnkBase=Updated base URL from: "{1}" to: "{2}" in diagram: "{3}"\nconfAPageIdsImpDone=Page IDs Import finished\nconfAPrcsMacrosInPage=Processing draw.io macros in page "{1}"\nconfAErrFetchPage=Error fetching page "{1}"\nconfAFixingMacro=Fixing macro of diagram "{1}"\nconfAErrReadingExpFile=Error reading export file\nconfAPrcsDiagInPageDone=Processing draw.io diagrams in page "{1}" finished\nconfAFixingMacroSkipped=Fixing macro of diagram "{1}" failed. Cannot find its new page ID. Maybe it points to a page that is not imported.\npageIdsExpTrg=Export target\nconfALucidDiagImgImported={2} diagram "{1}" image extracted successfully\nconfASavingLucidDiagImgFailed=Extracting {2} diagram "{1}" image failed\nconfGetInfoFailed=Fetching file info from {1} failed.\nconfCheckCacheFailed=Cannot get cached file info.\nconfReadFileErr=Cannot read "{1}" file from {2}.\nconfSaveCacheFailed=Unexpected error. Cannot save cached file\norgChartType=Org Chart Type\nlinear=Linear\nhanger2=Hanger 2\nhanger4=Hanger 4\nfishbone1=Fishbone 1\nfishbone2=Fishbone 2\n1ColumnLeft=Single Column Left\n1ColumnRight=Single Column Right\nsmart=Smart\nparentChildSpacing=Parent Child Spacing\nsiblingSpacing=Sibling Spacing\nconfNoPermErr=Sorry, you don\'t have enough permissions to view this embedded diagram from page {1}\ncopyAsImage=Copy as Image\nlucidImport=Lucidchart Import\nlucidImportInst1=Click the "Start Import" button to import all Lucidchart diagrams.\ninstallFirst=Please install {1} first\ndrawioChromeExt=draw.io Chrome Extension\nloginFirstThen=Please login to {1} first, then {2}\nerrFetchDocList=Error: Couldn\'t fetch documents list\nbuiltinPlugins=Built-in Plugins\nextPlugins=External Plugins\nbackupFound=Backup file found\nchromeOnly=This feature only works in Google Chrome\nmsgDeleted=This message has been deleted\nconfAErrFetchDrawList=Error fetching diagrams list. Some diagrams are skipped.\nconfAErrCheckDrawDiag=Cannot check diagram {1}\nconfAErrFetchPageList=Error fetching pages list\nconfADiagImportIncom={1} diagram "{2}" is imported partially and may have missing shapes\ninvalidSel=Invalid selection\ndiagNameEmptyErr=Diagram name cannot be empty\nopenDiagram=Open Diagram\nnewDiagram=New diagram\neditable=Editable\nconfAReimportStarted=Re-import {1} diagrams started...\nspaceFilter=Filter by spaces\ncurViewState=Current Viewer State\npageLayers=Page and Layers\ncustomize=Customize\nfirstPage=First Page (All Layers)\ncurEditorState=Current Editor State\nnoAnchorsFound=No anchors found\nattachment=Attachment\ncurDiagram=Current Diagram\nrecentDiags=Recent Diagrams\ncsvImport=CSV Import\nchooseFile=Choose a file...\nchoose=Choose\ngdriveFname=Google Drive filename\nwidthOfViewer=Width of the viewer (px)\nheightOfViewer=Height of the viewer (px)\nautoSetViewerSize=Automatically set the size of the viewer\nthumbnail=Thumbnail\nprevInDraw=Preview in draw.io\nonedriveFname=OneDrive filename\ndiagFname=Diagram filename\ndiagUrl=Diagram URL\nshowDiag=Show Diagram\ndiagPreview=Diagram Preview\ncsvFileUrl=CSV File URL\ngenerate=Generate\nselectDiag2Insert=Please select a diagram to insert it.\nerrShowingDiag=Unexpected error. Cannot show diagram\nnoRecentDiags=No recent diagrams found\nfetchingRecentFailed=Failed to fetch recent diagrams\nuseSrch2FindDiags=Use the search box to find draw.io diagrams\ncantReadChckPerms=Cannot read the specified diagram. Please check you have read permission on that file.\ncantFetchChckPerms=Cannot fetch diagram info. Please check you have read permission on that file.\nsearchFailed=Searching failed. Please try again later.\nplsTypeStr=Please type a search string.\nunsupportedFileChckUrl=Unsupported file. Please check the specified URL\ndiagNotFoundChckUrl=Diagram not found or cannot be accessed. Please check the specified URL\ncsvNotFoundChckUrl=CSV file not found or cannot be accessed. Please check the specified URL\ncantReadUpload=Cannot read the uploaded diagram\nselect=Select\nerrCantGetIdType=Unexpected Error: Cannot get content id or type.\nerrGAuthWinBlocked=Error: Google Authentication window blocked\nauthDrawAccess=Authorize draw.io to access {1}\nconnTimeout=The connection has timed out\nerrAuthSrvc=Error authenticating to {1}\nplsSelectFile=Please select a file\nmustBgtZ={1} must be greater than zero\ncantLoadPrev=Cannot load file preview.\nerrAccessFile=Error: Access Denied. You do not have permission to access "{1}".\nnoPrevAvail=No preview is available.\npersonalAccNotSup=Personal accounts are not supported.\nerrSavingTryLater=Error occurred during saving, please try again later.\nplsEnterFld=Please enter {1}\ninvalidDiagUrl=Invalid Diagram URL\nunsupportedVsdx=Unsupported vsdx file\nunsupportedImg=Unsupported image file\nunsupportedFormat=Unsupported file format\nplsSelectSingleFile=Please select a single file only\nattCorrupt=Attachment file "{1}" is corrupted\nloadAttFailed=Failed to load attachment "{1}"\nembedDrawDiag=Embed draw.io Diagram\naddDiagram=Add Diagram\nembedDiagram=Embed Diagram\neditOwningPg=Edit owning page\ndeepIndexing=Deep Indexing (Index diagrams that aren\'t used in any page also)\nconfADeepIndexStarted=Deep Indexing Started\nconfADeepIndexDone=Deep Indexing Done\nofficeNoDiagramsSelected=No diagrams found in the selection\nofficeNoDiagramsInDoc=No diagrams found in the document\nofficeNotSupported=This feature is not supported in this host application\nsomeImagesFailed={1} out of {2} failed due to the following errors\nimportingNoUsedDiagrams=Importing {1} Diagrams not used in pages\nimportingDrafts=Importing {1} Diagrams in drafts\nprocessingDrafts=Processing drafts\nupdatingDrafts=Updating drafts\nupdateDrafts=Update drafts\nnotifications=Notifications\ndrawioImp=draw.io Import\nconfALibsImp=Importing draw.io Libraries\nconfALibsImpFailed=Importing {1} library failed\ncontributors=Contributors\ndrawDiagrams=draw.io Diagrams\nerrFileNotFoundOrNoPer=Error: Access Denied. File not found or you do not have permission to access "{1}" on {2}.\nconfACheckPagesWEmbed=Checking pages having embedded draw.io diagrams.\nconfADelBrokenEmbedDiagLnk=Removing broken embedded diagram links\nreplaceWith=Replace with\nreplaceAll=Replace All\nconfASkipDiagModified=Skipped "{1}" as it was modified after initial import\nreplFind=Replace/Find\nmatchesRepl={1} matches replaced\ndraftErrDataLoss=An error occurred while reading the draft file. The diagram cannot be edited now to prevent any possible data loss. Please try again later or contact support.\nibm=IBM\nlinkToDiagramHint=Add a link to this diagram. The diagram can only be edited from the page that owns it.\nlinkToDiagram=Link to Diagram\nchangedBy=Changed By\nlastModifiedOn=Last modified on\nsearchResults=Search Results\nshowAllTemps=Show all templates\nnotionToken=Notion Token\nselectDB=Select Database\nnoDBs=No Databases\ndiagramEdited={1} diagram "{2}" edited\nconfDraftPermissionErr=Draft cannot be written. Do you have attachment write/read permission on this page?\nconfDraftTooBigErr=Draft size is too large. Pease check "Attachment Maximum Size" of "Attachment Settings" in Confluence Configuration?\nowner=Owner\nrepository=Repository\nbranch=Branch\nmeters=Meters\nteamsNoEditingMsg=Editor functionality is only available in Desktop environment (in MS Teams App or a web browser)\ncontactOwner=Contact Owner\nviewerOnlyMsg=You cannot edit the diagrams in the mobile platform, please use the desktop client or a web browser.\nwebsite=Website\ncheck4Updates=Check for updates\nattWriteFailedRetry={1}: Attachment write failed, trying again in {2} seconds...\nconfPartialPageList=We couldn\'t fetch all pages due to an error in Confluence. Continuing using {1} pages only.\nspellCheck=Spell checker\nnoChange=No Change\nlblToSvg=Convert labels to SVG\ntxtSettings=Text Settings\nLinksLost=Links will be lost\narcSize=Arc Size\neditConnectionPoints=Edit Connection Points\nnotInOffline=Not supported while offline\nnotInDesktop=Not supported in Desktop App\nconfConfigSpaceArchived=draw.io Configuration space (DRAWIOCONFIG) is archived. Please restore it first.\nconfACleanOldVerStarted=Cleaning old diagram draft versions started\nconfACleanOldVerDone=Cleaning old diagram draft versions finished\nconfACleaningFile=Cleaning diagram draft "{1}" old versions\nconfAFileCleaned=Cleaning diagram draft "{1}" done\nconfAFileCleanFailed=Cleaning diagram draft "{1}" failed\nconfACleanOnly=Clean Diagram Drafts Only\nbrush=Brush\nopenDevTools=Open Developer Tools\nautoBkp=Automatic Backup\nconfAIgnoreCollectErr=Ignore collecting current pages errors\ndrafts=Drafts\ndraftSaveInt=Draft save interval [sec] (0 to disable)\npluginsDisabled=External plugins disabled.\nextExpNotConfigured=External image service is not configured\npathFilename=Path/Filename\n');Graph.prototype.defaultThemes["default-style2"]=mxUtils.parseXml('<mxStylesheet><add as="defaultVertex"><add as="shape" value="label"/><add as="perimeter" value="rectanglePerimeter"/><add as="fontSize" value="12"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="fillColor" value="default"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="defaultEdge"><add as="shape" value="connector"/><add as="labelBackgroundColor" value="default"/><add as="endArrow" value="classic"/><add as="fontSize" value="11"/><add as="fontFamily" value="Helvetica"/><add as="align" value="center"/><add as="verticalAlign" value="middle"/><add as="rounded" value="1"/><add as="strokeColor" value="default"/><add as="fontColor" value="default"/></add><add as="text"><add as="fillColor" value="none"/><add as="gradientColor" value="none"/><add as="strokeColor" value="none"/><add as="align" value="left"/><add as="verticalAlign" value="top"/></add><add as="edgeLabel" extend="text"><add as="labelBackgroundColor" value="default"/><add as="fontSize" value="11"/></add><add as="label"><add as="fontStyle" value="1"/><add as="align" value="left"/><add as="verticalAlign" value="middle"/><add as="spacing" value="2"/><add as="spacingLeft" value="52"/><add as="imageWidth" value="42"/><add as="imageHeight" value="42"/><add as="rounded" value="1"/></add><add as="icon" extend="label"><add as="align" value="center"/><add as="imageAlign" value="center"/><add as="verticalLabelPosition" value="bottom"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="4"/><add as="labelBackgroundColor" value="default"/><add as="spacing" value="0"/><add as="spacingLeft" value="0"/><add as="spacingTop" value="6"/><add as="fontStyle" value="0"/><add as="imageWidth" value="48"/><add as="imageHeight" value="48"/></add><add as="swimlane"><add as="shape" value="swimlane"/><add as="fontSize" value="12"/><add as="fontStyle" value="1"/><add as="startSize" value="23"/></add><add as="group"><add as="verticalAlign" value="top"/><add as="fillColor" value="none"/><add as="strokeColor" value="none"/><add as="gradientColor" value="none"/><add as="pointerEvents" value="0"/></add><add as="ellipse"><add as="shape" value="ellipse"/><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombus"><add as="shape" value="rhombus"/><add as="perimeter" value="rhombusPerimeter"/></add><add as="triangle"><add as="shape" value="triangle"/><add as="perimeter" value="trianglePerimeter"/></add><add as="line"><add as="shape" value="line"/><add as="strokeWidth" value="4"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="spacingTop" value="8"/></add><add as="image"><add as="shape" value="image"/><add as="labelBackgroundColor" value="default"/><add as="verticalAlign" value="top"/><add as="verticalLabelPosition" value="bottom"/></add><add as="roundImage" extend="image"><add as="perimeter" value="ellipsePerimeter"/></add><add as="rhombusImage" extend="image"><add as="perimeter" value="rhombusPerimeter"/></add><add as="arrow"><add as="shape" value="arrow"/><add as="edgeStyle" value="none"/><add as="fillColor" value="default"/></add><add as="fancy"><add as="shadow" value="1"/><add as="glass" value="1"/></add><add as="gray" extend="fancy"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="blue" extend="fancy"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="green" extend="fancy"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="turquoise" extend="fancy"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="yellow" extend="fancy"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="orange" extend="fancy"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="red" extend="fancy"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="pink" extend="fancy"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="purple" extend="fancy"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add><add as="plain-gray"><add as="gradientColor" value="#B3B3B3"/><add as="fillColor" value="#F5F5F5"/><add as="strokeColor" value="#666666"/></add><add as="plain-blue"><add as="gradientColor" value="#7EA6E0"/><add as="fillColor" value="#DAE8FC"/><add as="strokeColor" value="#6C8EBF"/></add><add as="plain-green"><add as="gradientColor" value="#97D077"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#82B366"/></add><add as="plain-turquoise"><add as="gradientColor" value="#67AB9F"/><add as="fillColor" value="#D5E8D4"/><add as="strokeColor" value="#6A9153"/></add><add as="plain-yellow"><add as="gradientColor" value="#FFD966"/><add as="fillColor" value="#FFF2CC"/><add as="strokeColor" value="#D6B656"/></add><add as="plain-orange"><add as="gradientColor" value="#FFA500"/><add as="fillColor" value="#FFCD28"/><add as="strokeColor" value="#D79B00"/></add><add as="plain-red"><add as="gradientColor" value="#EA6B66"/><add as="fillColor" value="#F8CECC"/><add as="strokeColor" value="#B85450"/></add><add as="plain-pink"><add as="gradientColor" value="#B5739D"/><add as="fillColor" value="#E6D0DE"/><add as="strokeColor" value="#996185"/></add><add as="plain-purple"><add as="gradientColor" value="#8C6C9C"/><add as="fillColor" value="#E1D5E7"/><add as="strokeColor" value="#9673A6"/></add></mxStylesheet>').documentElement;
Graph.prototype.defaultThemes.darkTheme=Graph.prototype.defaultThemes["default-style2"];GraphViewer=function(b,e,k){this.init(b,e,k)};mxUtils.extend(GraphViewer,mxEventSource);GraphViewer.prototype.editBlankUrl="https://app.diagrams.net/";GraphViewer.prototype.imageBaseUrl="https://viewer.diagrams.net/";GraphViewer.prototype.toolbarHeight="BackCompat"==document.compatMode?24:26;GraphViewer.prototype.lightboxChrome=!0;GraphViewer.prototype.lightboxZIndex=999;GraphViewer.prototype.toolbarZIndex=999;GraphViewer.prototype.autoFit=!1;GraphViewer.prototype.autoCrop=!1;
GraphViewer.prototype.autoOrigin=!0;GraphViewer.prototype.center=!1;GraphViewer.prototype.forceCenter=!1;GraphViewer.prototype.allowZoomIn=!1;GraphViewer.prototype.allowZoomOut=!0;GraphViewer.prototype.showTitleAsTooltip=!1;GraphViewer.prototype.checkVisibleState=!0;GraphViewer.prototype.minHeight=28;GraphViewer.prototype.minWidth=100;GraphViewer.prototype.responsive=!1;
GraphViewer.prototype.init=function(b,e,k){this.graphConfig=null!=k?k:{};this.autoFit=null!=this.graphConfig["auto-fit"]?this.graphConfig["auto-fit"]:this.autoFit;this.autoCrop=null!=this.graphConfig["auto-crop"]?this.graphConfig["auto-crop"]:this.autoCrop;this.autoOrigin=null!=this.graphConfig["auto-origin"]?this.graphConfig["auto-origin"]:this.autoOrigin;this.allowZoomOut=null!=this.graphConfig["allow-zoom-out"]?this.graphConfig["allow-zoom-out"]:this.allowZoomOut;this.allowZoomIn=null!=this.graphConfig["allow-zoom-in"]?
@@ -4057,9 +4070,9 @@ this.graphConfig.responsive:this.responsive)&&!this.zoomEnabled&&!mxClient.NO_FO
!1;if(this.responsive&&this.graph.dialect==mxConstants.DIALECT_SVG){var E=this.graph.view.getDrawPane().ownerSVGElement;this.graph.view.getCanvas();null!=this.graphConfig.border?E.style.padding=this.graphConfig.border+"px":""==b.style.padding&&(E.style.padding="8px");E.style.boxSizing="border-box";E.style.overflow="visible";this.graph.fit=function(){};this.graph.sizeDidChange=function(){var I=this.view.graphBounds,G=this.view.translate;E.setAttribute("viewBox",I.x+G.x-this.panDx+" "+(I.y+G.y-this.panDy)+
" "+(I.width+1)+" "+(I.height+1));this.container.style.backgroundColor=E.style.backgroundColor;this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",I))}}this.graphConfig.move&&(this.graph.isMoveCellsEvent=function(I){return!0});this.lightboxClickEnabled&&(b.style.cursor="pointer");this.editor=new Editor(!0,null,null,this.graph);this.editor.editBlankUrl=this.editBlankUrl;this.graph.lightbox=!0;this.graph.centerZoom=!1;this.graph.autoExtend=!1;this.graph.autoScroll=!1;this.graph.setEnabled(!1);1==
this.graphConfig["toolbar-nohide"]&&(this.editor.defaultGraphOverflow="visible");this.xmlNode=this.editor.extractGraphModel(this.xmlNode,!0);this.xmlNode!=e&&(this.xml=mxUtils.getXml(this.xmlNode),this.xmlDocument=this.xmlNode.ownerDocument);var d=this;this.graph.getImageFromBundles=function(I){return d.getImageUrl(I)};mxClient.IS_SVG&&this.graph.addSvgShadow(this.graph.view.canvas.ownerSVGElement,null,!0);if("mxfile"==this.xmlNode.nodeName){var f=this.xmlNode.getElementsByTagName("diagram");if(0<
-f.length){if(null!=this.pageId)for(var g=0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var m=this.graph.getGlobalVariable;d=this;this.graph.getGlobalVariable=function(I){var G=f[d.currentPage];return"page"==I?G.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==I?d.currentPage+1:"pagecount"==I?f.length:m.apply(this,arguments)}}}this.diagrams=[];var q=null;this.selectPage=function(I){this.handlingResize||(this.currentPage=mxUtils.mod(I,this.diagrams.length),
+f.length){if(null!=this.pageId)for(var g=0;g<f.length;g++)if(this.pageId==f[g].getAttribute("id")){this.currentPage=g;break}var l=this.graph.getGlobalVariable;d=this;this.graph.getGlobalVariable=function(I){var G=f[d.currentPage];return"page"==I?G.getAttribute("name")||"Page-"+(d.currentPage+1):"pagenumber"==I?d.currentPage+1:"pagecount"==I?f.length:l.apply(this,arguments)}}}this.diagrams=[];var q=null;this.selectPage=function(I){this.handlingResize||(this.currentPage=mxUtils.mod(I,this.diagrams.length),
this.updateGraphXml(Editor.parseDiagramNode(this.diagrams[this.currentPage])))};this.selectPageById=function(I){I=this.getIndexById(I);var G=0<=I;G&&this.selectPage(I);return G};g=mxUtils.bind(this,function(){if(null==this.xmlNode||"mxfile"!=this.xmlNode.nodeName)this.diagrams=[];this.xmlNode!=q&&(this.diagrams=this.xmlNode.getElementsByTagName("diagram"),q=this.xmlNode)});var z=this.graph.setBackgroundImage;this.graph.setBackgroundImage=function(I){if(null!=I&&Graph.isPageLink(I.src)){var G=I.src,
-Z=G.indexOf(",");0<Z&&(Z=d.getIndexById(G.substring(Z+1)),0<=Z&&(I=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[Z])),I.originalSrc=G))}z.apply(this,arguments)};var F=this.graph.getGraphBounds;this.graph.getGraphBounds=function(I){var G=F.apply(this,arguments);I=this.backgroundImage;if(null!=I){var Z=this.view.translate,fa=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((Z.x+I.x)*fa,(Z.y+I.y)*fa,I.width*fa,I.height*fa))}return G};this.addListener("xmlNodeChanged",
+Z=G.indexOf(",");0<Z&&(Z=d.getIndexById(G.substring(Z+1)),0<=Z&&(I=d.getImageForGraphModel(Editor.parseDiagramNode(d.diagrams[Z])),I.originalSrc=G))}z.apply(this,arguments)};var F=this.graph.getGraphBounds;this.graph.getGraphBounds=function(I){var G=F.apply(this,arguments);I=this.backgroundImage;if(null!=I){var Z=this.view.translate,ca=this.view.scale;G=mxRectangle.fromRectangle(G);G.add(new mxRectangle((Z.x+I.x)*ca,(Z.y+I.y)*ca,I.width*ca,I.height*ca))}return G};this.addListener("xmlNodeChanged",
g);g();urlParams.page=d.currentPage;g=null;this.graph.getModel().beginUpdate();try{urlParams.nav=0!=this.graphConfig.nav?"1":"0",this.editor.setGraphXml(this.xmlNode),this.graph.view.scale=this.graphConfig.zoom||1,g=this.setLayersVisible(),this.responsive||(this.graph.border=null!=this.graphConfig.border?this.graphConfig.border:8)}finally{this.graph.getModel().endUpdate()}this.responsive||(this.graph.panningHandler.isForcePanningEvent=function(I){return!mxEvent.isPopupTrigger(I.getEvent())&&"auto"==
this.graph.container.style.overflow},this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.panningHandler.ignoreCell=!0,this.graph.panningHandler.usePopupTrigger=!1,this.graph.panningHandler.pinchEnabled=!1);this.graph.setPanning(!1);null!=this.graphConfig.toolbar?this.addToolbar():null!=this.graphConfig.title&&this.showTitleAsTooltip&&b.setAttribute("title",this.graphConfig.title);this.responsive||this.addSizeHandler();!this.showLayers(this.graph)||this.forceCenter||this.layersEnabled&&
!this.autoCrop||this.crop();this.addClickHandler(this.graph);this.graph.setTooltips(0!=this.graphConfig.tooltips);this.graph.initialViewState={translate:this.graph.view.translate.clone(),scale:this.graph.view.scale};null!=g&&this.setLayersVisible(g);this.graph.customLinkClicked=function(I){if(Graph.isPageLink(I)){var G=I.indexOf(",");d.selectPageById(I.substring(G+1))||alert(mxResources.get("pageNotFound")||"Page not found")}else this.handleCustomLink(I);return!0};var C=this.graph.foldTreeCell;this.graph.foldTreeCell=
@@ -4082,26 +4095,26 @@ null!=d||0!=this.graphConfig.resize||""==b.style.height?(d=null!=d?d:new mxPoint
GraphViewer.prototype.crop=function(){var b=this.graph,e=b.getGraphBounds(),k=b.border,n=b.view.scale;b.view.setTranslate(null!=e.x?Math.floor(b.view.translate.x-e.x/n+k):k,null!=e.y?Math.floor(b.view.translate.y-e.y/n+k):k)};GraphViewer.prototype.updateContainerWidth=function(b,e){b.style.width=e+"px"};GraphViewer.prototype.updateContainerHeight=function(b,e){if(this.forceCenter||this.zoomEnabled||!this.autoFit||"BackCompat"==document.compatMode||8==document.documentMode)b.style.height=e+"px"};
GraphViewer.prototype.showLayers=function(b,e){var k=this.graphConfig.layers;k=null!=k&&0<k.length?k.split(" "):[];var n=this.graphConfig.layerIds,D=null!=n&&0<n.length,t=!1;if(0<k.length||D||null!=e){e=null!=e?e.getModel():null;b=b.getModel();b.beginUpdate();try{var E=b.getChildCount(b.root);if(null==e){e=!1;t={};if(D)for(var d=0;d<n.length;d++){var f=b.getCell(n[d]);null!=f&&(e=!0,t[f.id]=!0)}else for(d=0;d<k.length;d++)f=b.getChildAt(b.root,parseInt(k[d])),null!=f&&(e=!0,t[f.id]=!0);for(d=0;e&&
d<E;d++)f=b.getChildAt(b.root,d),b.setVisible(f,t[f.id]||!1)}else for(d=0;d<E;d++)b.setVisible(b.getChildAt(b.root,d),e.isVisible(e.getChildAt(e.root,d)))}finally{b.endUpdate()}t=!0}return t};
-GraphViewer.prototype.addToolbar=function(){function b(ha,U,ma,T){var M=document.createElement("div");M.style.borderRight="1px solid #d0d0d0";M.style.padding="3px 6px 3px 6px";mxEvent.addListener(M,"click",ha);null!=ma&&M.setAttribute("title",ma);M.style.display="inline-block";ha=document.createElement("img");ha.setAttribute("border","0");ha.setAttribute("src",U);ha.style.width="18px";null==T||T?(mxEvent.addListener(M,"mouseenter",function(){M.style.backgroundColor="#ddd"}),mxEvent.addListener(M,
-"mouseleave",function(){M.style.backgroundColor="#eee"}),mxUtils.setOpacity(ha,60),M.style.cursor="pointer"):mxUtils.setOpacity(M,30);M.appendChild(ha);k.appendChild(M);m++;return M}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
-"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var n=null,D=null,t=mxUtils.bind(this,function(ha){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,
-function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ha||200)}),E=mxUtils.bind(this,function(ha){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ha||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ha){mxEvent.isTouchEvent(ha)||(E(30),t())}));mxEvent.addListener(k,
-mxClient.IS_POINTER?"pointermove":"mousemove",function(ha){mxEvent.consume(ha)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ha){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ha){E(100);mxEvent.consume(ha)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ha){mxEvent.isTouchEvent(ha)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ha,U){this.startX=U.getGraphX();
-this.startY=U.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ha,U){},mouseUp:function(ha,U){mxEvent.isTouchEvent(U.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-U.getGraphX())<f&&Math.abs(this.startY-U.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,m=0,q=null,z=null,F=null,C=null,I=0;I<g.length;I++){var G=
-g[I];if("pages"==G){C=e.ownerDocument.createElement("div");C.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(C,70);var Z=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");Z.style.borderRightStyle="none";Z.style.paddingLeft="0px";Z.style.paddingRight="0px";k.appendChild(C);var fa=
-b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");fa.style.paddingLeft="0px";fa.style.paddingRight="0px";G=mxUtils.bind(this,function(){C.innerText="";mxUtils.write(C,this.currentPage+1+" / "+this.diagrams.length);C.style.display=1<this.diagrams.length?"inline-block":"none";Z.style.display=C.style.display;fa.style.display=C.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)this.zoomEnabled&&(b(mxUtils.bind(this,
+GraphViewer.prototype.addToolbar=function(){function b(ia,X,R,sa){var M=document.createElement("div");M.style.borderRight="1px solid #d0d0d0";M.style.padding="3px 6px 3px 6px";mxEvent.addListener(M,"click",ia);null!=R&&M.setAttribute("title",R);M.style.display="inline-block";ia=document.createElement("img");ia.setAttribute("border","0");ia.setAttribute("src",X);ia.style.width="18px";null==sa||sa?(mxEvent.addListener(M,"mouseenter",function(){M.style.backgroundColor="#ddd"}),mxEvent.addListener(M,
+"mouseleave",function(){M.style.backgroundColor="#eee"}),mxUtils.setOpacity(ia,60),M.style.cursor="pointer"):mxUtils.setOpacity(M,30);M.appendChild(ia);k.appendChild(M);l++;return M}var e=this.graph.container;"bottom"==this.graphConfig["toolbar-position"]?e.style.marginBottom=this.toolbarHeight+"px":"inline"!=this.graphConfig["toolbar-position"]&&(e.style.marginTop=this.toolbarHeight+"px");var k=e.ownerDocument.createElement("div");k.style.position="absolute";k.style.overflow="hidden";k.style.boxSizing=
+"border-box";k.style.whiteSpace="nowrap";k.style.textAlign="left";k.style.zIndex=this.toolbarZIndex;k.style.backgroundColor="#eee";k.style.height=this.toolbarHeight+"px";this.toolbar=k;if("inline"==this.graphConfig["toolbar-position"]){mxUtils.setPrefixedStyle(k.style,"transition","opacity 100ms ease-in-out");mxUtils.setOpacity(k,30);var n=null,D=null,t=mxUtils.bind(this,function(ia){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);n=window.setTimeout(mxUtils.bind(this,
+function(){mxUtils.setOpacity(k,0);n=null;D=window.setTimeout(mxUtils.bind(this,function(){k.style.display="none";D=null}),100)}),ia||200)}),E=mxUtils.bind(this,function(ia){null!=n&&(window.clearTimeout(n),fadeThead=null);null!=D&&(window.clearTimeout(D),fadeThead2=null);k.style.display="";mxUtils.setOpacity(k,ia||30)});mxEvent.addListener(this.graph.container,mxClient.IS_POINTER?"pointermove":"mousemove",mxUtils.bind(this,function(ia){mxEvent.isTouchEvent(ia)||(E(30),t())}));mxEvent.addListener(k,
+mxClient.IS_POINTER?"pointermove":"mousemove",function(ia){mxEvent.consume(ia)});mxEvent.addListener(k,"mouseenter",mxUtils.bind(this,function(ia){E(100)}));mxEvent.addListener(k,"mousemove",mxUtils.bind(this,function(ia){E(100);mxEvent.consume(ia)}));mxEvent.addListener(k,"mouseleave",mxUtils.bind(this,function(ia){mxEvent.isTouchEvent(ia)||E(30)}));var d=this.graph,f=d.getTolerance();d.addMouseListener({startX:0,startY:0,scrollLeft:0,scrollTop:0,mouseDown:function(ia,X){this.startX=X.getGraphX();
+this.startY=X.getGraphY();this.scrollLeft=d.container.scrollLeft;this.scrollTop=d.container.scrollTop},mouseMove:function(ia,X){},mouseUp:function(ia,X){mxEvent.isTouchEvent(X.getEvent())&&Math.abs(this.scrollLeft-d.container.scrollLeft)<f&&Math.abs(this.scrollTop-d.container.scrollTop)<f&&Math.abs(this.startX-X.getGraphX())<f&&Math.abs(this.startY-X.getGraphY())<f&&(0<parseFloat(k.style.opacity||0)?t():E(30))}})}for(var g=this.toolbarItems,l=0,q=null,z=null,F=null,C=null,I=0;I<g.length;I++){var G=
+g[I];if("pages"==G){C=e.ownerDocument.createElement("div");C.style.cssText="display:inline-block;position:relative;top:5px;padding:0 4px 0 4px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;;cursor:default;";mxUtils.setOpacity(C,70);var Z=b(mxUtils.bind(this,function(){this.selectPage(this.currentPage-1)}),Editor.previousImage,mxResources.get("previousPage")||"Previous Page");Z.style.borderRightStyle="none";Z.style.paddingLeft="0px";Z.style.paddingRight="0px";k.appendChild(C);var ca=
+b(mxUtils.bind(this,function(){this.selectPage(this.currentPage+1)}),Editor.nextImage,mxResources.get("nextPage")||"Next Page");ca.style.paddingLeft="0px";ca.style.paddingRight="0px";G=mxUtils.bind(this,function(){C.innerText="";mxUtils.write(C,this.currentPage+1+" / "+this.diagrams.length);C.style.display=1<this.diagrams.length?"inline-block":"none";Z.style.display=C.style.display;ca.style.display=C.style.display});this.addListener("graphChanged",G);G()}else if("zoom"==G)this.zoomEnabled&&(b(mxUtils.bind(this,
function(){this.graph.zoomOut()}),Editor.zoomOutImage,mxResources.get("zoomOut")||"Zoom Out"),b(mxUtils.bind(this,function(){this.graph.zoomIn()}),Editor.zoomInImage,mxResources.get("zoomIn")||"Zoom In"),b(mxUtils.bind(this,function(){this.graph.view.scaleAndTranslate(this.graph.initialViewState.scale,this.graph.initialViewState.translate.x,this.graph.initialViewState.translate.y)}),Editor.zoomFitImage,mxResources.get("fit")||"Fit"));else if("layers"==G){if(this.layersEnabled){var ba=this.graph.getModel(),
-Y=b(mxUtils.bind(this,function(ha){if(null!=q)q.parentNode.removeChild(q),q=null;else{q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var ma=this.graph.getGraphBounds(),T=this.graph.view;0>ma.x||0>ma.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:T.translate.clone(),scale:T.scale}):null!=this.graph.originalViewState&&0<ma.x/T.scale+this.graph.originalViewState.translate.x-
-T.translate.x&&0<ma.y/T.scale+this.graph.originalViewState.translate.y-T.translate.y&&(T.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:T.translate.clone(),scale:T.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});ha=Y.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";
-q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize="11px";q.style.overflowY="auto";q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var U=mxUtils.getDocumentScrollOrigin(document);q.style.left=U.x+ha.left-1+"px";q.style.top=U.y+ha.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");ba.addListener(mxEvent.CHANGE,function(){Y.style.display=
-1<ba.getChildCount(ba.root)?"inline-block":"none"});Y.style.display=1<ba.getChildCount(ba.root)?"inline-block":"none"}}else if("tags"==G){if(this.tagsEnabled){var pa=b(mxUtils.bind(this,function(ha){null==z&&(z=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),z.div.getElementsByTagName("div")[0].style.position="",z.div.style.maxHeight="160px",z.div.style.maxWidth="120px",z.div.style.padding="2px",z.div.style.overflow="auto",z.div.style.height="auto",z.div.style.position="fixed",
-z.div.style.fontFamily=Editor.defaultHtmlFont,z.div.style.fontSize="11px",z.div.style.backgroundColor="#eee",z.div.style.color="#000",z.div.style.border="1px solid #d0d0d0",z.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(z.div,80));if(null!=F)F.parentNode.removeChild(F),F=null;else{F=z.div;mxEvent.addListener(F,"mouseleave",function(){F.parentNode.removeChild(F);F=null});ha=pa.getBoundingClientRect();var U=mxUtils.getDocumentScrollOrigin(document);F.style.left=U.x+ha.left-1+"px";F.style.top=
-U.y+ha.bottom-2+"px";document.body.appendChild(F);z.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");ba.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){pa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));pa.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
-(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=b(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*m);null!=this.graphConfig.title&&(g=e.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),
-mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*m;var O=e.style.border,W=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ha=e.getBoundingClientRect(),U=mxUtils.getScrollOrigin(document.body);U="relative"===document.body.style.position?document.body.getBoundingClientRect():
-{left:-U.x,top:-U.y};ha={left:ha.left-U.left,top:ha.top-U.top,bottom:ha.bottom-U.top,right:ha.right-U.left};k.style.left=ha.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=ha.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=ha.top+1+"px"):k.style.top=ha.top+"px";"1px solid transparent"==O&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var ma=mxUtils.bind(this,function(){null!=k.parentNode&&
-k.parentNode.removeChild(k);null!=q&&(q.parentNode.removeChild(q),q=null);e.style.border=O});mxEvent.addListener(document,"mousemove",function(T){for(T=mxEvent.getSource(T);null!=T;){if(T==e||T==k||T==q)return;T=T.parentNode}ma()});mxEvent.addListener(document.body,"mouseleave",function(T){ma()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",W):W();this.responsive&&"undefined"!==typeof ResizeObserver&&(new ResizeObserver(function(){null!=
-k.parentNode&&W()})).observe(e)};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
+Y=b(mxUtils.bind(this,function(ia){if(null!=q)q.parentNode.removeChild(q),q=null;else{q=this.graph.createLayersDialog(mxUtils.bind(this,function(){if(this.autoCrop)this.crop();else if(this.autoOrigin){var R=this.graph.getGraphBounds(),sa=this.graph.view;0>R.x||0>R.y?(this.crop(),this.graph.originalViewState=this.graph.initialViewState,this.graph.initialViewState={translate:sa.translate.clone(),scale:sa.scale}):null!=this.graph.originalViewState&&0<R.x/sa.scale+this.graph.originalViewState.translate.x-
+sa.translate.x&&0<R.y/sa.scale+this.graph.originalViewState.translate.y-sa.translate.y&&(sa.setTranslate(this.graph.originalViewState.translate.x,this.graph.originalViewState.translate.y),this.graph.originalViewState=null,this.graph.initialViewState={translate:sa.translate.clone(),scale:sa.scale})}}));mxEvent.addListener(q,"mouseleave",function(){q.parentNode.removeChild(q);q=null});ia=Y.getBoundingClientRect();q.style.width="140px";q.style.padding="2px 0px 2px 0px";q.style.border="1px solid #d0d0d0";
+q.style.backgroundColor="#eee";q.style.fontFamily=Editor.defaultHtmlFont;q.style.fontSize="11px";q.style.overflowY="auto";q.style.maxHeight=this.graph.container.clientHeight-this.toolbarHeight-10+"px";q.style.zIndex=this.toolbarZIndex+1;mxUtils.setOpacity(q,80);var X=mxUtils.getDocumentScrollOrigin(document);q.style.left=X.x+ia.left-1+"px";q.style.top=X.y+ia.bottom-2+"px";document.body.appendChild(q)}}),Editor.layersImage,mxResources.get("layers")||"Layers");ba.addListener(mxEvent.CHANGE,function(){Y.style.display=
+1<ba.getChildCount(ba.root)?"inline-block":"none"});Y.style.display=1<ba.getChildCount(ba.root)?"inline-block":"none"}}else if("tags"==G){if(this.tagsEnabled){var O=b(mxUtils.bind(this,function(ia){null==z&&(z=this.graph.createTagsDialog(mxUtils.bind(this,function(){return!0})),z.div.getElementsByTagName("div")[0].style.position="",z.div.style.maxHeight="160px",z.div.style.maxWidth="120px",z.div.style.padding="2px",z.div.style.overflow="auto",z.div.style.height="auto",z.div.style.position="fixed",
+z.div.style.fontFamily=Editor.defaultHtmlFont,z.div.style.fontSize="11px",z.div.style.backgroundColor="#eee",z.div.style.color="#000",z.div.style.border="1px solid #d0d0d0",z.div.style.zIndex=this.toolbarZIndex+1,mxUtils.setOpacity(z.div,80));if(null!=F)F.parentNode.removeChild(F),F=null;else{F=z.div;mxEvent.addListener(F,"mouseleave",function(){F.parentNode.removeChild(F);F=null});ia=O.getBoundingClientRect();var X=mxUtils.getDocumentScrollOrigin(document);F.style.left=X.x+ia.left-1+"px";F.style.top=
+X.y+ia.bottom-2+"px";document.body.appendChild(F);z.refresh()}}),Editor.tagsImage,mxResources.get("tags")||"Tags");ba.addListener(mxEvent.CHANGE,mxUtils.bind(this,function(){O.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}));O.style.display=0<this.graph.getAllTags().length?"inline-block":"none"}}else"lightbox"==G?this.lightboxEnabled&&b(mxUtils.bind(this,function(){this.showLightbox()}),Editor.fullscreenImage,mxResources.get("fullscreen")||"Fullscreen"):null!=this.graphConfig["toolbar-buttons"]&&
+(G=this.graphConfig["toolbar-buttons"][G],null!=G&&(G.elem=b(null==G.enabled||G.enabled?G.handler:function(){},G.image,G.title,G.enabled)))}null!=this.graph.minimumContainerSize&&(this.graph.minimumContainerSize.width=34*l);null!=this.graphConfig.title&&(g=e.ownerDocument.createElement("div"),g.style.cssText="display:inline-block;position:relative;padding:3px 6px 0 6px;vertical-align:top;font-family:Helvetica,Arial;font-size:12px;top:4px;cursor:default;",g.setAttribute("title",this.graphConfig.title),
+mxUtils.write(g,this.graphConfig.title),mxUtils.setOpacity(g,70),k.appendChild(g),this.filename=g);this.minToolbarWidth=34*l;var la=e.style.border,aa=mxUtils.bind(this,function(){k.style.width="inline"==this.graphConfig["toolbar-position"]?"auto":Math.max(this.minToolbarWidth,e.offsetWidth)+"px";k.style.border="1px solid #d0d0d0";if(1!=this.graphConfig["toolbar-nohide"]){var ia=e.getBoundingClientRect(),X=mxUtils.getScrollOrigin(document.body);X="relative"===document.body.style.position?document.body.getBoundingClientRect():
+{left:-X.x,top:-X.y};ia={left:ia.left-X.left,top:ia.top-X.top,bottom:ia.bottom-X.top,right:ia.right-X.left};k.style.left=ia.left+"px";"bottom"==this.graphConfig["toolbar-position"]?k.style.top=ia.bottom-1+"px":"inline"!=this.graphConfig["toolbar-position"]?(k.style.marginTop=-this.toolbarHeight+"px",k.style.top=ia.top+1+"px"):k.style.top=ia.top+"px";"1px solid transparent"==la&&(e.style.border="1px solid #d0d0d0");document.body.appendChild(k);var R=mxUtils.bind(this,function(){null!=k.parentNode&&
+k.parentNode.removeChild(k);null!=q&&(q.parentNode.removeChild(q),q=null);e.style.border=la});mxEvent.addListener(document,"mousemove",function(sa){for(sa=mxEvent.getSource(sa);null!=sa;){if(sa==e||sa==k||sa==q)return;sa=sa.parentNode}R()});mxEvent.addListener(document.body,"mouseleave",function(sa){R()})}else k.style.top=-this.toolbarHeight+"px",e.appendChild(k)});1!=this.graphConfig["toolbar-nohide"]?mxEvent.addListener(e,"mouseenter",aa):aa();this.responsive&&"undefined"!==typeof ResizeObserver&&
+(new ResizeObserver(function(){null!=k.parentNode&&aa()})).observe(e)};GraphViewer.prototype.disableButton=function(b){var e=this.graphConfig["toolbar-buttons"]?this.graphConfig["toolbar-buttons"][b]:null;null!=e&&(mxUtils.setOpacity(e.elem,30),mxEvent.removeListener(e.elem,"click",e.handler),mxEvent.addListener(e.elem,"mouseenter",function(){e.elem.style.backgroundColor="#eee"}))};
GraphViewer.prototype.addClickHandler=function(b,e){b.linkPolicy=this.graphConfig.target||b.linkPolicy;b.addClickHandler(this.graphConfig.highlight,mxUtils.bind(this,function(k,n){if(null==n)for(var D=mxEvent.getSource(k);D!=b.container&&null!=D&&null==n;)"a"==D.nodeName.toLowerCase()&&(n=D.getAttribute("href")),D=D.parentNode;null!=e?null==n||b.isCustomLink(n)?mxEvent.consume(k):b.isExternalProtocol(n)||b.isBlankLink(n)||window.setTimeout(function(){e.destroy()},0):null!=n&&null==e&&b.isCustomLink(n)&&
(mxEvent.isTouchEvent(k)||!mxEvent.isPopupTrigger(k))&&b.customLinkClicked(n)&&(mxUtils.clearSelection(),mxEvent.consume(k))}),mxUtils.bind(this,function(k){null!=e||!this.lightboxClickEnabled||mxEvent.isTouchEvent(k)&&0!=this.toolbarItems.length||this.showLightbox()}))};
GraphViewer.prototype.showLightbox=function(b,e,k){if("open"==this.graphConfig.lightbox||window.self!==window.top)if(null==this.lightboxWindow||this.lightboxWindow.closed){b=null!=b?b:null!=this.graphConfig.editable?this.graphConfig.editable:!0;k={client:1,target:null!=k?k:"blank"};b&&(k.edit=this.graphConfig.edit||"_blank");if(null!=e?e:1)k.close=1;this.layersEnabled&&(k.layers=1);this.tagsEnabled&&(k.tags={});null!=this.graphConfig&&0!=this.graphConfig.nav&&(k.nav=1);null!=this.graphConfig&&null!=
@@ -4111,7 +4124,7 @@ GraphViewer.prototype.showLocalLightbox=function(){mxUtils.getDocumentScrollOrig
mxEvent.addListener(e,"click",function(){n.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";this.tagsEnabled&&(urlParams.tags="{}");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 k=Graph.prototype.shadowId;Graph.prototype.shadowId="lightboxDropShadow";var n=new EditorUi(new Editor(!0),document.createElement("div"),!0);n.editor.editBlankUrl=this.editBlankUrl;n.editor.graph.shadowId="lightboxDropShadow";Graph.prototype.shadowId=k;
n.refresh=function(){};var D=mxUtils.bind(this,function(q){27==q.keyCode&&n.destroy()}),t=this.initialOverflow,E=n.destroy;n.destroy=function(){mxEvent.removeListener(document.documentElement,"keydown",D);document.body.removeChild(b);document.body.removeChild(e);document.body.style.overflow=t;GraphViewer.resizeSensorEnabled=!0;E.apply(this,arguments)};var d=n.editor.graph,f=d.container;f.style.overflow="hidden";this.lightboxChrome?(f.style.border="1px solid #c0c0c0",f.style.margin="40px",mxEvent.addListener(document.documentElement,
-"keydown",D)):(b.style.display="none",e.style.display="none");var g=this;d.getImageFromBundles=function(q){return g.getImageUrl(q)};var m=n.createTemporaryGraph;n.createTemporaryGraph=function(){var q=m.apply(this,arguments);q.getImageFromBundles=function(z){return g.getImageUrl(z)};return q};this.graphConfig.move&&(d.isMoveCellsEvent=function(q){return!0});mxUtils.setPrefixedStyle(f.style,"border-radius","4px");f.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
+"keydown",D)):(b.style.display="none",e.style.display="none");var g=this;d.getImageFromBundles=function(q){return g.getImageUrl(q)};var l=n.createTemporaryGraph;n.createTemporaryGraph=function(){var q=l.apply(this,arguments);q.getImageFromBundles=function(z){return g.getImageUrl(z)};return q};this.graphConfig.move&&(d.isMoveCellsEvent=function(q){return!0});mxUtils.setPrefixedStyle(f.style,"border-radius","4px");f.style.position="fixed";GraphViewer.resizeSensorEnabled=!1;document.body.style.overflow=
"hidden";mxClient.IS_SF||mxClient.IS_EDGE||(mxUtils.setPrefixedStyle(f.style,"transform","rotateY(90deg)"),mxUtils.setPrefixedStyle(f.style,"transition","all .25s ease-in-out"));this.addClickHandler(d,n);window.setTimeout(mxUtils.bind(this,function(){f.style.outline="none";f.style.zIndex=this.lightboxZIndex;e.style.zIndex=this.lightboxZIndex;document.body.appendChild(f);document.body.appendChild(e);n.setFileData(this.xml);mxUtils.setPrefixedStyle(f.style,"transform","rotateY(0deg)");n.chromelessToolbar.style.bottom=
"60px";n.chromelessToolbar.style.zIndex=this.lightboxZIndex;document.body.appendChild(n.chromelessToolbar);n.getEditBlankXml=mxUtils.bind(this,function(){return this.xml});n.lightboxFit();n.chromelessResize();this.showLayers(d,this.graph);mxEvent.addListener(b,"click",function(){n.destroy()})}),0);return n};
GraphViewer.prototype.updateTitle=function(b){b=b||"";this.showTitleAsTooltip&&null!=this.graph&&null!=this.graph.container&&this.graph.container.setAttribute("title",b);null!=this.filename&&(this.filename.innerText="",mxUtils.write(this.filename,b),this.filename.setAttribute("title",b))};
@@ -4122,9 +4135,9 @@ GraphViewer.initCss=function(){try{var b=document.createElement("style");b.type=
GraphViewer.cachedUrls={};GraphViewer.getUrl=function(b,e,k){if(null!=GraphViewer.cachedUrls[b])e(GraphViewer.cachedUrls[b]);else{var n=null!=navigator.userAgent&&0<navigator.userAgent.indexOf("MSIE 9")?new XDomainRequest:new XMLHttpRequest;n.open("GET",b);n.onload=function(){e(null!=n.getText?n.getText():n.responseText)};n.onerror=k;n.send()}};GraphViewer.resizeSensorEnabled=!0;GraphViewer.useResizeSensor=!0;
(function(){var b=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(k){return window.setTimeout(k,20)},e=function(k,n){function D(){this.q=[];this.add=function(F){this.q.push(F)};var q,z;this.call=function(){q=0;for(z=this.q.length;q<z;q++)this.q[q].call()}}function t(q,z){return q.currentStyle?q.currentStyle[z]:window.getComputedStyle?window.getComputedStyle(q,null).getPropertyValue(z):q.style[z]}function E(q,z){if(!q.resizedAttached)q.resizedAttached=
new D,q.resizedAttached.add(z);else if(q.resizedAttached){q.resizedAttached.add(z);return}q.resizeSensor=document.createElement("div");q.resizeSensor.className="resize-sensor";q.resizeSensor.style.cssText="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;";q.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s;"></div></div><div class="resize-sensor-shrink" style="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;"><div style="position: absolute; left: 0; top: 0; transition: 0s; width: 200%; height: 200%"></div></div>';
-q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var F=q.resizeSensor.childNodes[0],C=F.childNodes[0],I=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";F.scrollLeft=1E5;F.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};G();var Z=!1,fa=function(){q.resizedAttached&&(Z&&(q.resizedAttached.call(),Z=!1),b(fa))};b(fa);var ba,Y,pa,O;z=function(){if((pa=q.offsetWidth)!=ba||(O=q.offsetHeight)!=Y)Z=!0,ba=pa,Y=O;G()};var W=function(ha,
-U,ma){ha.attachEvent?ha.attachEvent("on"+U,ma):ha.addEventListener(U,ma)};W(F,"scroll",z);W(I,"scroll",z)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var m=k.length;f<m;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,z=k.length;q<z;q++)e.detach(k[q]);
-else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
+q.appendChild(q.resizeSensor);"static"==t(q,"position")&&(q.style.position="relative");var F=q.resizeSensor.childNodes[0],C=F.childNodes[0],I=q.resizeSensor.childNodes[1],G=function(){C.style.width="100000px";C.style.height="100000px";F.scrollLeft=1E5;F.scrollTop=1E5;I.scrollLeft=1E5;I.scrollTop=1E5};G();var Z=!1,ca=function(){q.resizedAttached&&(Z&&(q.resizedAttached.call(),Z=!1),b(ca))};b(ca);var ba,Y,O,la;z=function(){if((O=q.offsetWidth)!=ba||(la=q.offsetHeight)!=Y)Z=!0,ba=O,Y=la;G()};var aa=
+function(ia,X,R){ia.attachEvent?ia.attachEvent("on"+X,R):ia.addEventListener(X,R)};aa(F,"scroll",z);aa(I,"scroll",z)}var d=function(){GraphViewer.resizeSensorEnabled&&n()},f=Object.prototype.toString.call(k),g="[object Array]"===f||"[object NodeList]"===f||"[object HTMLCollection]"===f||"undefined"!==typeof jQuery&&k instanceof jQuery||"undefined"!==typeof Elements&&k instanceof Elements;if(g){f=0;for(var l=k.length;f<l;f++)E(k[f],d)}else E(k,d);this.detach=function(){if(g)for(var q=0,z=k.length;q<
+z;q++)e.detach(k[q]);else e.detach(k)}};e.detach=function(k){k.resizeSensor&&(k.removeChild(k.resizeSensor),delete k.resizeSensor,delete k.resizedAttached)};window.ResizeSensor=e})();
function mxBpmnShape(a,d,e,b){mxShape.call(this);this.bounds=a;this.fill=d;this.stroke=e;this.strokewidth=null!=b?b:1}mxUtils.extend(mxBpmnShape,mxShape);
mxBpmnShape.prototype.customProperties=[{name:"symbol",dispName:"Event",type:"enum",defVal:"general",enumList:[{val:"general",dispName:"General"},{val:"message",dispName:"Message"},{val:"timer",dispName:"Timer"},{val:"escalation",dispName:"Escalation"},{val:"conditional",dispName:"Conditional"},{val:"link",dispName:"Link"},{val:"error",dispName:"Error"},{val:"cancel",dispName:"Cancel"},{val:"compensation",dispName:"Compensation"},{val:"signal",dispName:"Signal"},{val:"multiple",dispName:"Multiple"},
{val:"parallelMultiple",dispName:"Parallel Multiple"},{val:"terminate",dispName:"Terminate"},{val:"exclusiveGw",dispName:"Exclusive Gw"},{val:"parallelGw",dispName:"Parallel Gw"},{val:"complexGw",dispName:"Complex Gw"}]},{name:"outline",dispName:"Event Type",type:"enum",defVal:"standard",enumList:[{val:"standard",dispName:"Standard"},{val:"eventInt",dispName:"Interrupting"},{val:"eventNonint",dispName:"Non-Interrupting"},{val:"catching",dispName:"Catching"},{val:"boundInt",dispName:"Bound Interrupting"},