From 49306e136907a015e91751aaf72a19e49711d142 Mon Sep 17 00:00:00 2001 From: Gaudenz Alder Date: Thu, 21 Mar 2019 17:07:31 +0100 Subject: [PATCH] 10.5.3 release --- ChangeLog | 6 + VERSION | 2 +- src/main/webapp/cache.manifest | 2 +- src/main/webapp/export3.html | 4 +- src/main/webapp/js/app.min.js | 12 +- src/main/webapp/js/diagramly/DriveClient.js | 3 +- src/main/webapp/js/diagramly/GraphViewer.js | 21 +- src/main/webapp/js/diagramly/vsdx/importer.js | 8 +- src/main/webapp/js/extensions.min.js | 30 +- src/main/webapp/js/viewer.min.js | 435 +++++++++--------- 10 files changed, 268 insertions(+), 255 deletions(-) diff --git a/ChangeLog b/ChangeLog index a63ebc0c..c309e0ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +21-MAR-2019: 10.5.3 + +- Fixes timing issue in graph viewer +- Fixes date formats in VSDX import +- Fixes possible cropping for PDF export + 20-MAR-2019: 10.5.2 - Fixes bug for comments in Confluence cloud diff --git a/VERSION b/VERSION index a9760d35..7f2edf6e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -10.5.2 \ No newline at end of file +10.5.3 \ No newline at end of file diff --git a/src/main/webapp/cache.manifest b/src/main/webapp/cache.manifest index cdbbd2c4..fdadd153 100644 --- a/src/main/webapp/cache.manifest +++ b/src/main/webapp/cache.manifest @@ -1,7 +1,7 @@ CACHE MANIFEST # THIS FILE WAS GENERATED. DO NOT MODIFY! -# 03/20/2019 08:08 AM +# 03/21/2019 05:03 PM app.html index.html?offline=1 diff --git a/src/main/webapp/export3.html b/src/main/webapp/export3.html index 114ef423..e9ca81f9 100644 --- a/src/main/webapp/export3.html +++ b/src/main/webapp/export3.html @@ -389,7 +389,7 @@ // Gets the diagram bounds and sets the document size bounds = (graph.pdfPageVisible) ? graph.view.getBackgroundPageBounds() : graph.getGraphBounds(); - bounds.width = Math.ceil(bounds.width + data.border); + bounds.width = Math.ceil(bounds.width + data.border) + 1; //The 1 extra pixels to prevent cutting the cells on the edges when crop is enabled bounds.height = Math.ceil(bounds.height + data.border); // Converts the graph to a vertical sequence of pages for PDF export @@ -407,7 +407,7 @@ // Applies print scale pf = mxRectangle.fromRectangle(pf); - pf.width = Math.ceil(pf.width); + pf.width = Math.ceil(pf.width) + 1; //The 1 extra pixels to prevent cutting the cells on the right edge of the page pf.height = Math.ceil(pf.height); // Starts at first visible page diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js index 72ae83c6..7db0aa61 100644 --- a/src/main/webapp/js/app.min.js +++ b/src/main/webapp/js/app.min.js @@ -8250,7 +8250,7 @@ document.createElement("canvas"),F=new Image;F.onload=function(){try{I.getContex var ErrorDialog=function(a,c,b,d,g,e,l,m,p,q,f){p=null!=p?p:!0;var k=document.createElement("div");k.style.textAlign="center";if(null!=c){var n=document.createElement("div");n.style.padding="0px";n.style.margin="0px";n.style.fontSize="18px";n.style.paddingBottom="16px";n.style.marginBottom="10px";n.style.borderBottom="1px solid #c0c0c0";n.style.color="gray";n.style.whiteSpace="nowrap";n.style.textOverflow="ellipsis";n.style.overflow="hidden";mxUtils.write(n,c);n.setAttribute("title",c);k.appendChild(n)}c= document.createElement("div");c.style.lineHeight="1.2em";c.style.padding="6px";c.innerHTML=b;k.appendChild(c);b=document.createElement("div");b.style.marginTop="12px";b.style.textAlign="center";null!=e&&(c=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();e()}),c.className="geBtn",b.appendChild(c),b.style.textAlign="center");null!=q&&(q=mxUtils.button(q,function(){null!=f&&f()}),q.className="geBtn",b.appendChild(q));var u=mxUtils.button(d,function(){p&&a.hideDialog();null!=g&&g()}); u.className="geBtn";b.appendChild(u);null!=l&&(d=mxUtils.button(l,function(){p&&a.hideDialog();null!=m&&m()}),d.className="geBtn gePrimaryBtn",b.appendChild(d));this.init=function(){u.focus()};k.appendChild(b);this.container=k}; -(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.5.2";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!= +(function(){var a=new mxObjectCodec(new ChangePageSetup,["ui","previousColor","previousImage","previousFormat"]);a.beforeDecode=function(a,b,d){d.ui=a.ui;return b};a.afterDecode=function(a,b,d){d.previousColor=d.color;d.previousImage=d.image;d.previousFormat=d.format;null!=d.foldingEnabled&&(d.foldingEnabled=!d.foldingEnabled);null!=d.mathEnabled&&(d.mathEnabled=!d.mathEnabled);null!=d.shadowVisible&&(d.shadowVisible=!d.shadowVisible);return d};mxCodecRegistry.register(a)})();(function(){EditorUi.VERSION="10.5.3";EditorUi.compactUi="atlas"!=uiTheme;EditorUi.enableLogging="1"!=urlParams.stealth&&/.*\.draw\.io$/.test(window.location.hostname)&&"support.draw.io"!=window.location.hostname;EditorUi.drawHost="https://www.draw.io";EditorUi.lastErrorMessage=null;EditorUi.ignoredAnonymizedChars="\n\t`~!@#$%^&*()_+{}|:\"<>?-=[];'./,\n\t";EditorUi.logError=function(a,b,c,d,e){if("1"==urlParams.dev)EditorUi.debug("logError",a,b,c,d,e);else if(EditorUi.enableLogging)try{if(a!= EditorUi.lastErrorMessage&&(null==a||null==b||-1==a.indexOf("Script error")&&-1==a.indexOf("extension"))&&null!=a&&0>a.indexOf("DocumentClosedError")){EditorUi.lastErrorMessage=a;var f=0<=a.indexOf("NetworkError")||0<=a.indexOf("SecurityError")||0<=a.indexOf("NS_ERROR_FAILURE")||0<=a.indexOf("out of memory")?"CONFIG":"SEVERE",k=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";e=null!=e?e:Error(a);(new Image).src=k+"/log?severity="+f+"&v="+encodeURIComponent(EditorUi.VERSION)+"&msg=clientError:"+ encodeURIComponent(a)+":url:"+encodeURIComponent(window.location.href)+":lnum:"+encodeURIComponent(c)+(null!=d?":colno:"+encodeURIComponent(d):"")+(null!=e&&null!=e.stack?"&stack="+encodeURIComponent(e.stack):"")}}catch(z){}};EditorUi.logEvent=function(a){if("1"==urlParams.dev)EditorUi.debug("logEvent",a);else if(EditorUi.enableLogging)try{var b=null!=window.DRAWIO_LOG_URL?window.DRAWIO_LOG_URL:"";(new Image).src=b+"/images/1x1.png?v="+encodeURIComponent(EditorUi.VERSION)+(null!=a?"&data="+encodeURIComponent(JSON.stringify(a)): "")}catch(n){}};EditorUi.sendReport=function(a,b){if("1"==urlParams.dev)EditorUi.debug("sendReport",a);else if(EditorUi.enableLogging)try{b=null!=b?b:5E4,a.length>b&&(a=a.substring(0,b)+"\n...[SHORTENED]"),mxUtils.post("/email","version="+encodeURIComponent(EditorUi.VERSION)+"&url="+encodeURIComponent(window.location.href)+"&data="+encodeURIComponent(a))}catch(n){}};EditorUi.debug=function(){try{if(null!=window.console&&"1"==urlParams.dev){for(var a=[(new Date).toISOString()],b=0;bthis.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");y(b,"image/png")}catch(B){q(B)}})))&&y(null,null,a.constructor!=DriveLibrary)});g||!c?A():this.verifyMimeType(a.getId(),A,!0)}else this.ui.editor.graph.reset(),null!=p&&p({message:mxResources.get("readOnly")})}catch(z){q(z)}}; +a.sync?a.sync.clientId+"-chan-"+(a.sync.channelId||"none"):"nosync")})}catch(M){}}}catch(M){q(M)}}),D=mxUtils.bind(this,function(b,e){try{null!=m&&(x.properties=m);var f=l||a.constructor!=DriveFile||"manual"!=DrawioFile.SYNC&&"auto"!=DrawioFile.SYNC?null:a.getCurrentEtag(),g=0,k=mxUtils.bind(this,function(d){try{var l=a.desc.mimeType!=this.xmlMimeType&&a.desc.mimeType!=this.mimeType&&a.desc.mimeType!=this.libraryMimeType;this.executeRequest(this.createUploadRequest(a.getId(),x,b,c||d||l,e,d?null: +f,y),z,mxUtils.bind(this,function(b){try{a.isConflict(b)?this.executeRequest(gapi.client.drive.files.get({fileId:a.getId(),fields:this.catchupFields,supportsTeamDrives:!0}),mxUtils.bind(this,function(c){try{if(null!=c&&c.etag==f)if(gthis.maxThumbnailSize?null:b.substring(b.indexOf(",")+1).replace(/\+/g,"-").replace(/\//g,"_");y(b,"image/png")}catch(B){q(B)}})))&&y(null,null,a.constructor!=DriveLibrary)});g||!c?A():this.verifyMimeType(a.getId(),A,!0)}else this.ui.editor.graph.reset(),null!=p&&p({message:mxResources.get("readOnly")})}catch(z){q(z)}}; DriveClient.prototype.verifyMimeType=function(a,c,b,d){null==this.lastMimeCheck&&(this.lastMimeCheck=0);var g=(new Date).getTime();if(b||g-this.lastMimeCheck>this.mimeTypeCheckCoolOff)this.lastMimeCheck=g,this.checkingMimeType||(this.checkingMimeType=!0,this.executeRequest(gapi.client.drive.files.get({fileId:a,fields:"mimeType",supportsTeamDrives:!0}),mxUtils.bind(this,function(b){this.checkingMimeType=!1;null!=b&&"application/vnd.jgraph.mxfile.realtime"==b.mimeType?this.redirectToNewApp(d,a):null!= c&&c()})))}; DriveClient.prototype.redirectToNewApp=function(a,c){this.ui.spinner.stop();if(!this.redirectDialogShowing){this.redirectDialogShowing=!0;var b=window.location.protocol+"//"+this.newAppHostname+"/"+this.ui.getSearch("create title mode url drive splash state".split(" "))+"#G"+c,d=mxUtils.bind(this,function(){this.redirectDialogShowing=!1;window.location.href==b?window.location.reload():window.location.href=b});null!=a?this.ui.confirm(mxResources.get("redirectToNewApp"),d,mxUtils.bind(this,function(){this.redirectDialogShowing= diff --git a/src/main/webapp/js/diagramly/DriveClient.js b/src/main/webapp/js/diagramly/DriveClient.js index 8b406234..7ab0bbff 100644 --- a/src/main/webapp/js/diagramly/DriveClient.js +++ b/src/main/webapp/js/diagramly/DriveClient.js @@ -1296,7 +1296,8 @@ DriveClient.prototype.saveFile = function(file, revision, success, errFn, noChec '.' + head0 + '.' + mod0, action: 'saved-' + resp.headRevisionId + '.' + resp.modifiedDate, label: ((this.user != null) ? this.user.id : 'unknown-user') + '.' + ((file.sync != null) ? - file.sync.clientId : 'nosync')}); + (file.sync.clientId + '-chan-' + (file.sync.channelId || 'none')) : + 'nosync')}); } catch (e) { diff --git a/src/main/webapp/js/diagramly/GraphViewer.js b/src/main/webapp/js/diagramly/GraphViewer.js index b44af503..3279d802 100644 --- a/src/main/webapp/js/diagramly/GraphViewer.js +++ b/src/main/webapp/js/diagramly/GraphViewer.js @@ -208,6 +208,9 @@ GraphViewer.prototype.init = function(container, xmlNode, graphConfig) this.selectPage = function(number) { + if(this.handlingResize) + return; + this.currentPage = mxUtils.mod(number, this.diagrams.length); this.updateGraphXml(mxUtils.parseXml(Graph.decompress(mxUtils.getTextContent( this.diagrams[this.currentPage]))).documentElement); @@ -532,18 +535,18 @@ GraphViewer.prototype.addSizeHandler = function() var lastOffsetWidth = null; var cachedOffsetWidth = null; - var handlingResize = false; + this.handlingResize = false; // Installs function on instance - this.fitGraph = function(maxScale) + this.fitGraph = mxUtils.bind(this, function(maxScale) { var cachedOffsetWidth = container.offsetWidth; if (cachedOffsetWidth != lastOffsetWidth) { - if (!handlingResize) + if (!this.handlingResize) { - handlingResize = true; + this.handlingResize = true; this.graph.maxFitScale = (maxScale != null) ? maxScale : (this.graphConfig.zoom || ((this.allowZoomIn) ? null : 1)); @@ -561,13 +564,13 @@ GraphViewer.prototype.addSizeHandler = function() lastOffsetWidth = cachedOffsetWidth; // Workaround for fit triggering scrollbars triggering doResize (infinite loop) - window.setTimeout(function() + window.setTimeout(mxUtils.bind(this, function() { - handlingResize = false; - }, 0); + this.handlingResize = false; + }), 0); } } - }; + }); // Fallback for older browsers if (GraphViewer.useResizeSensor) @@ -608,7 +611,7 @@ GraphViewer.prototype.addSizeHandler = function() { window.clearTimeout(scheduledResize); - if (!handlingResize) + if (!this.handlingResize) { scheduledResize = window.setTimeout(mxUtils.bind(this, this.fitGraph), 100); } diff --git a/src/main/webapp/js/diagramly/vsdx/importer.js b/src/main/webapp/js/diagramly/vsdx/importer.js index 2791fabf..a0cc9d2b 100644 --- a/src/main/webapp/js/diagramly/vsdx/importer.js +++ b/src/main/webapp/js/diagramly/vsdx/importer.js @@ -8649,9 +8649,11 @@ var com; if (position === void 0) { position = 0; } return str.substr(position, searchString.length) === searchString; })(format, "{{")) { - //TODO FIXME find a date formatter (may be https://github.com/noahcooper/SimpleDateFormatJS) - //value = new java.text.SimpleDateFormat(/* replaceAll */ format.replace(new RegExp("\\{|\\}", 'g'), "")).format(new Date(Shape.VSDX_START_TIME + Math.floor((parseFloat(value) * 24 * 60 * 60 * 1000)))); - value = new Date(Shape.VSDX_START_TIME + Math.floor((parseFloat(value) * 24 * 60 * 60 * 1000))).toString(); + //Our date format function swaps M/m meaning + format = format.replace(/m/g, '@').replace(/M/g, 'm').replace(/@/g, 'M'); + //Date can be in string date format or a number + var date = isNaN(value)? new Date(value) : new Date(Shape.VSDX_START_TIME + Math.floor((parseFloat(value) * 24 * 60 * 60 * 1000))); + value = Graph.prototype.formatDate(date, /* replaceAll */ format.replace(new RegExp("\\{|\\}", 'g'), "")); } } catch (e) { diff --git a/src/main/webapp/js/extensions.min.js b/src/main/webapp/js/extensions.min.js index fe2eb12a..8da59a13 100644 --- a/src/main/webapp/js/extensions.min.js +++ b/src/main/webapp/js/extensions.min.js @@ -879,21 +879,21 @@ this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,d){f.prototype a.equals?a.equals(b):a===b}(g,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"EnhMetaFile"))h="png";else return;g=a.firstChild;if(null!=g){if(null!=g&&1==g.nodeType){var m=g;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(m.nodeName.toLowerCase(),"rel")&&(m=m.getAttribute("r:id"),null!=m&&0!==m.length)){var g=p.lastIndexOf("/"),l="",n="";try{l=p.substring(0,g),n=p.substring(g,p.length)}catch(z){return}g=d.getRelationship(m,l+"/_rels"+n+".rels");if(null!=g){p=g.getAttribute("Target")|| "";m=g.getAttribute("Type");g=p.lastIndexOf("/");try{p=p.substring(g+1,p.length)}catch(z){return}null!=m&&function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(m,"image")&&(this.imageData={},(g=d.getMedia(c.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+p))?(this.imageData.iData=g,function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(p.toLowerCase(),".bmp")&&(h="jpg"),this.imageData.iType=h):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}return}}g= g.nextSibling}}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(h,c.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text=a)};b.prototype.parseSection=function(a){var d=a.getAttribute("N");if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Geometry"))null==this.geom&&(this.geom=[]),0'+a+"")};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0")){var d=a.indexOf(">"),f=a.substring(d),d=a.substring(0,d),g=' style="'+c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return d+g+f}return a};b.prototype.getRtlText=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT, -a,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};b.prototype.isItalic=function(a){var b=!1;a= -this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};b.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=4===(parseInt(a)&4));return b};b.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a); -(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getValue(a,"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};b.prototype.getTextSize= -function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.floor(Math.round(100*a)/100)};b.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN),"1"));0===b?a=mxConstants.ALIGN_TOP:2=== -b&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot=function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY=a};b.prototype.setLastMoveX=function(a){this.lastMoveX= -a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};return b}(c.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=-22091688E5;g.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(l.vsdx||(l.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); +"";if(0!==p.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1",d.getAttribute("Del")))this.fields[p]="";else{for(var g=c.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),m="",l="",n=0;n'+a+"")};b.prototype.getTextDirection=function(a){a=this.getFlags(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a}; +b.prototype.getSpcLine=function(a){var b=!1;a=this.getSpLine(a);0")){var d=a.indexOf(">"),f=a.substring(d),d=a.substring(0,d),g=' style="'+c.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(b,":")+'"';return d+g+f}return a};b.prototype.getRtlText= +function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.RTL_TEXT,a,c.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);a=this.getValue(a,"ltr");(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"0")?a="ltr":function(a,b){return a&&a.equals?a.equals(b):a===b}(a,"1")&&(a="rtl");return a};b.prototype.isBold=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals? +a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};b.prototype.isItalic=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=2===(parseInt(a)&2));return b};b.prototype.isUnderline=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(), +"themed")||(b=4===(parseInt(a)&4));return b};b.prototype.isSmallCaps=function(a){var b=!1;a=this.getTextStyle(a);(function(a,b){return a&&a.equals?a.equals(b):a===b})(a,"")||function(a,b){return a&&a.equals?a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=8===(parseInt(a)&8));return b};b.prototype.getTextOpacity=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.COLOR_TRANS,a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getValue(a, +"0");var b="1";null!=a&&0!==a.length&&(a=1-parseFloat(a),b=(new String(a)).toString());return b};b.prototype.getTextSize=function(a){a=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.SIZE,a,c.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);a=this.getScreenNumericalValue$org_w3c_dom_Element$double(a,12);return""+Math.floor(Math.round(100*a)/100)};b.prototype.getAlignVertical=function(){var a=mxConstants.ALIGN_MIDDLE,b=parseInt(this.getValue(this.getCellElement$java_lang_String(c.mxgraph.io.vsdx.mxVsdxConstants.VERTICAL_ALIGN), +"1"));0===b?a=mxConstants.ALIGN_TOP:2===b&&(a=mxConstants.ALIGN_BOTTOM);return a};b.prototype.getGeomList=function(){return this.geomList};b.prototype.getLastX=function(){return this.lastX};b.prototype.getLastY=function(){return this.lastY};b.prototype.getLastMoveX=function(){return this.lastMoveX};b.prototype.getLastMoveY=function(){return this.lastMoveY};b.prototype.getLastKnot=function(){return this.lastKnot};b.prototype.setLastX=function(a){this.lastX=a};b.prototype.setLastY=function(a){this.lastY= +a};b.prototype.setLastMoveX=function(a){this.lastMoveX=a};b.prototype.setLastMoveY=function(a){this.lastMoveY=a};b.prototype.setLastKnot=function(a){this.lastKnot=a};return b}(c.mxgraph.io.vsdx.Style);m.VSDX_START_TIME=-22091688E5;g.Shape=m;m.__class="com.mxgraph.io.vsdx.Shape"})(l.vsdx||(l.vsdx={}))})(n.io||(n.io={}))})(c.mxgraph||(c.mxgraph={}))})(com||(com={})); (function(c){(function(n){(function(l){(function(g){var m=function(f){function b(a,b,h,p,g,m){var d=this;d.masterShape=null;d.master=null;d.parentHeight=0;d=f.call(this,b,m)||this;d.htmlLabels=!0;d.rootShape=d;d.shapeName=null;d.shapeIndex=0;d.vertex=!0;d.childShapes={};var l=d.getMasterId(),n=d.getShapeMasterId();d.master=null!=l?p[l]?p[l]:null:g;null!=d.master&&(d.masterShape=null==l&&null!=n?d.master.getSubShape(n):d.master.getMasterShape());p=d.getNameU();g=p.lastIndexOf(".");-1!==g&&(p=p.substring(0, g));d.shapeName=p;b=b.getElementsByTagName(c.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0document.documentMode)&&(c=80);e+=c;d+=c;var f=e,g=d,r=mxUtils.getDocumentSize(),l=r.height,n=Math.max(1,Math.round((r.width-e-64)/2)),y=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,l-64);0z.clientHeight-64&&(b.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=y+14+"px",m.style.left=n+e+38-c+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})), -document.body.appendChild(m),this.dialogImg=m,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=A){var r=A();null!=r&&(f=e=r.w,g=d=r.h)}r=mxUtils.getDocumentSize();l=r.height;this.bg.style.height=l+"px";n=Math.max(1,Math.round((r.width-e-64)/2));y=Math.max(1,Math.round((l-d-a.footerHeight)/3));e=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(g,l-64);r=this.getPosition(n, -y,e,d);n=r.x;y=r.y;z.style.left=n+"px";z.style.top=y+"px";z.style.width=e+"px";z.style.height=d+"px";!t&&b.clientHeight>z.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=y+14+"px",this.dialogImg.style.left=n+e+38-c+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=z;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; +function Dialog(a,b,e,d,k,m,q,t,v,A){var c=0;mxClient.IS_VML&&(null==document.documentMode||8>document.documentMode)&&(c=80);e+=c;d+=c;var f=e,g=d,r=mxUtils.getDocumentSize(),l=r.height,n=Math.max(1,Math.round((r.width-e-64)/2)),z=Math.max(1,Math.round((l-d-a.footerHeight)/3));mxClient.IS_QUIRKS||(b.style.maxHeight="100%");e=null!=document.body?Math.min(e,document.body.scrollWidth-64):e;d=Math.min(d,l-64);0y.clientHeight-64&&(b.style.overflowY="auto");m&&(m=document.createElement("img"),m.setAttribute("src",Dialog.prototype.closeImage),m.setAttribute("title",mxResources.get("close")),m.className="geDialogClose",m.style.top=z+14+"px",m.style.left=n+e+38-c+"px",m.style.zIndex=this.zIndex,mxEvent.addListener(m,"click",mxUtils.bind(this,function(){a.hideDialog(!0)})), +document.body.appendChild(m),this.dialogImg=m,mxEvent.addGestureListeners(this.bg,null,null,mxUtils.bind(this,function(c){a.hideDialog(!0)})));this.resizeListener=mxUtils.bind(this,function(){if(null!=A){var r=A();null!=r&&(f=e=r.w,g=d=r.h)}r=mxUtils.getDocumentSize();l=r.height;this.bg.style.height=l+"px";n=Math.max(1,Math.round((r.width-e-64)/2));z=Math.max(1,Math.round((l-d-a.footerHeight)/3));e=null!=document.body?Math.min(f,document.body.scrollWidth-64):f;d=Math.min(g,l-64);r=this.getPosition(n, +z,e,d);n=r.x;z=r.y;y.style.left=n+"px";y.style.top=z+"px";y.style.width=e+"px";y.style.height=d+"px";!t&&b.clientHeight>y.clientHeight-64&&(b.style.overflowY="auto");null!=this.dialogImg&&(this.dialogImg.style.top=z+14+"px",this.dialogImg.style.left=n+e+38-c+"px")});mxEvent.addListener(window,"resize",this.resizeListener);this.onDialogClose=q;this.container=y;a.editor.fireEvent(new mxEventObject("showDialog"))}Dialog.backdropColor="white";Dialog.prototype.zIndex=mxPopupMenu.prototype.zIndex-1; 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+ @@ -2039,7 +2039,7 @@ PageSetupDialog.addPageFormatPanel=function(a,b,e,d){function k(a,b,d){if(d||f!= e.height==d.format.height?(t.value=d.key,m.setAttribute("checked","checked"),m.defaultChecked=!0,m.checked=!0,q.removeAttribute("checked"),q.defaultChecked=!1,q.checked=!1,a=!0):e.width==d.format.height&&e.height==d.format.width&&(t.value=d.key,m.removeAttribute("checked"),m.defaultChecked=!1,m.checked=!1,q.setAttribute("checked","checked"),q.defaultChecked=!0,a=q.checked=!0));a?(v.style.display="",c.style.display="none"):(f.value=e.width/100,g.value=e.height/100,m.setAttribute("checked","checked"), t.value="custom",v.style.display="none",c.style.display="")}}b="format-"+b;var m=document.createElement("input");m.setAttribute("name",b);m.setAttribute("type","radio");m.setAttribute("value","portrait");var q=document.createElement("input");q.setAttribute("name",b);q.setAttribute("type","radio");q.setAttribute("value","landscape");var t=document.createElement("select");t.style.marginBottom="8px";t.style.width="202px";var v=document.createElement("div");v.style.marginLeft="4px";v.style.width="210px"; v.style.height="24px";m.style.marginRight="6px";v.appendChild(m);b=document.createElement("span");b.style.maxWidth="100px";mxUtils.write(b,mxResources.get("portrait"));v.appendChild(b);q.style.marginLeft="10px";q.style.marginRight="6px";v.appendChild(q);var A=document.createElement("span");A.style.width="100px";mxUtils.write(A,mxResources.get("landscape"));v.appendChild(A);var c=document.createElement("div");c.style.marginLeft="4px";c.style.width="210px";c.style.height="24px";var f=document.createElement("input"); -f.setAttribute("size","7");f.style.textAlign="right";c.appendChild(f);mxUtils.write(c," in x ");var g=document.createElement("input");g.setAttribute("size","7");g.style.textAlign="right";c.appendChild(g);mxUtils.write(c," in");v.style.display="none";c.style.display="none";for(var r={},l=PageSetupDialog.getFormats(),n=0;n=l)f.value=e.width/100;l=parseFloat(g.value);if(isNaN(l)||0>=l)g.value=e.height/100;l=new mxRectangle(0,0,Math.floor(100*parseFloat(f.value)),Math.floor(100*parseFloat(g.value)));"custom"!=t.value&&q.checked&&(l=new mxRectangle(0,0, l.height,l.width));b&&u||l.width==E.width&&l.height==E.height||(E=l,null!=d&&d(E))};mxEvent.addListener(b,"click",function(a){m.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(A,"click",function(a){q.checked=!0;x(a);mxEvent.consume(a)});mxEvent.addListener(f,"blur",x);mxEvent.addListener(f,"click",x);mxEvent.addListener(g,"blur",x);mxEvent.addListener(g,"click",x);mxEvent.addListener(q,"change",x);mxEvent.addListener(m,"change",x);mxEvent.addListener(t,"change",function(a){u="custom"==t.value; x(a,!0)});x();return{set:function(a){e=a;k(null,null,!0)},get:function(){return E},widthInput:f,heightInput:g}}; @@ -2053,7 +2053,7 @@ c="url("+this.gridImage+")";var g=d=0;null!=a.view.backgroundPageShape&&(g=this. b,a.container.className="geDiagramContainer geDiagramBackdrop",d.style.backgroundImage="none",d.style.backgroundColor=""):(a.container.className="geDiagramContainer",d.style.backgroundPosition=f,d.style.backgroundColor=b,d.style.backgroundImage=c)};mxGraphView.prototype.createSvgGrid=function(a){for(var b=this.graph.gridSize*this.scale;b'};var a=mxGraph.prototype.panGraph;mxGraph.prototype.panGraph=function(b,d){a.apply(this,arguments);if(null!=this.shiftPreview1){var e= this.view.canvas;null!=e.ownerSVGElement&&(e=e.ownerSVGElement);var c=this.gridSize*this.view.scale*this.view.gridSteps,c=-Math.round(c-mxUtils.mod(this.view.translate.x*this.view.scale+b,c))+"px "+-Math.round(c-mxUtils.mod(this.view.translate.y*this.view.scale+d,c))+"px";e.style.backgroundPosition=c}};mxGraph.prototype.updatePageBreaks=function(a,b,d){var c=this.view.scale,f=this.view.translate,g=this.pageFormat,e=c*this.pageScale,l=this.view.getBackgroundPageBounds();b=l.width;d=l.height;var n= -new mxRectangle(c*f.x,c*f.y,g.width*e,g.height*e),y=(a=a&&Math.min(n.width,n.height)>this.minPageBreakDist)?Math.ceil(d/n.height)-1:0,k=a?Math.ceil(b/n.width)-1:0,u=l.x+b,t=l.y+d;null==this.horizontalPageBreaks&&0this.minPageBreakDist)?Math.ceil(d/n.height)-1:0,k=a?Math.ceil(b/n.width)-1:0,u=l.x+b,t=l.y+d;null==this.horizontalPageBreaks&&0mxUtils.indexOf(this.toolbar.staticElements,a)&&(a.parentNode.removeChild(a),b.push(a));a=e}a=this.toolbar.fontMenu;e=this.toolbar.sizeMenu;if(null==g)this.toolbar.createTextToolbar();else{for(var l=0;lmxUtils.indexOf(u,E[a])&&u.push(E[a]);var C=function(a,c){var b= -d.getModel();b.beginUpdate();try{if(c)for(var f=b.isEdge(r),g=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;emxUtils.indexOf(E,z))||(O=mxUtils.setStyle(O,z,v),console.log("here",z,v))}b.setStyle(r,O)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){C(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){C(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT, +[],"cells",[]))};var x=["fontFamily","fontSize","fontColor"],G="edgeStyle startArrow startFill startSize endArrow endFill endSize".split(" "),p=["startArrow startFill startSize sourcePerimeterSpacing endArrow endFill endSize targetPerimeterSpacing".split(" "),["strokeColor","strokeWidth"],["fillColor","gradientColor"],x,["opacity"],["align"],["html"]];for(a=0;amxUtils.indexOf(u,E[a])&&u.push(E[a]);var C=function(a,c){var b= +d.getModel();b.beginUpdate();try{if(c)for(var f=b.isEdge(r),g=f?d.currentEdgeStyle:d.currentVertexStyle,f=["fontSize","fontFamily","fontColor"],e=0;emxUtils.indexOf(E,y))||(P=mxUtils.setStyle(P,y,G),console.log("here",y,G))}b.setStyle(r,P)}}finally{b.endUpdate()}};d.addListener("cellsInserted",function(a,c){C(c.getProperty("cells"))});d.addListener("textInserted",function(a,c){C(c.getProperty("cells"),!0)});d.connectionHandler.addListener(mxEvent.CONNECT, function(a,c){var b=[c.getProperty("cell")];c.getProperty("terminalInserted")&&b.push(c.getProperty("terminal"));C(b)});this.addListener("styleChanged",mxUtils.bind(this,function(a,c){var b=c.getProperty("cells"),f=!1,g=!1;if(0this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor=(this.view.scale+.01)/this.view.scale:(this.cumulativeZoomFactor*=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale):.15>=this.view.scale*this.cumulativeZoomFactor?this.cumulativeZoomFactor= (this.view.scale-.01)/this.view.scale:(this.cumulativeZoomFactor/=this.zoomFactor,this.cumulativeZoomFactor=Math.round(this.view.scale*this.cumulativeZoomFactor*20)/20/this.view.scale);this.cumulativeZoomFactor=Math.max(.01,Math.min(this.view.scale*this.cumulativeZoomFactor,160)/this.view.scale);this.updateZoomTimeout=window.setTimeout(mxUtils.bind(this,function(){var c=mxUtils.getOffset(a.container),f=0,d=0;null!=p&&(f=a.container.offsetWidth/2-p.x+c.x,d=a.container.offsetHeight/2-p.y+c.y);c=this.view.scale; this.zoom(this.cumulativeZoomFactor);this.view.scale!=c&&(null!=b&&e.chromelessResize(!1,null,f*(this.cumulativeZoomFactor-1),d*(this.cumulativeZoomFactor-1)),!mxUtils.hasScrollbars(a.container)||0==f&&0==d||(a.container.scrollLeft-=f*(this.cumulativeZoomFactor-1),a.container.scrollTop-=d*(this.cumulativeZoomFactor-1)));this.cumulativeZoomFactor=1;this.updateZoomTimeout=null}),this.lazyZoomDelay)};mxEvent.addMouseWheelListener(mxUtils.bind(this,function(c,b){if((null==this.dialogs||0==this.dialogs.length)&& @@ -2216,11 +2216,11 @@ function(){var a=c.apply(this,arguments);if(this.graph.pageVisible){for(var b=[] function(a,c){return null==a.cell?"#ffa500":mxConstants.GUIDE_COLOR};this.graphHandler.createPreviewShape=function(a){this.previewColor="#000000"==this.graph.background?"#ffffff":mxGraphHandler.prototype.previewColor;return mxGraphHandler.prototype.createPreviewShape.apply(this,arguments)};this.graphHandler.getCells=function(a){for(var c=mxGraphHandler.prototype.getCells.apply(this,arguments),b=[],f=0;fmxUtils.indexOf(c,d)&&b.push(d)):b.push(c[f])}return b};this.connectionHandler.createTargetVertex=function(a,c){var b=this.graph.view.getState(c),b=null!=b?b.style:this.graph.getCellStyle(c);mxUtils.getValue(b,"part",!1)&&(b=this.graph.model.getParent(c),this.graph.model.isVertex(b)&&(c=b));return mxConnectionHandler.prototype.createTargetVertex.apply(this,arguments)};var f=new mxRubberband(this); this.getRubberband=function(){return f};var g=(new Date).getTime(),r=0,l=this.connectionHandler.mouseMove;this.connectionHandler.mouseMove=function(){var a=this.currentState;l.apply(this,arguments);a!=this.currentState?(g=(new Date).getTime(),r=0):r=(new Date).getTime()-g};var n=this.connectionHandler.isOutlineConnectEvent;this.connectionHandler.isOutlineConnectEvent=function(a){return null!=this.currentState&&a.getState()==this.currentState&&2E3=a&&k.y+k.height<=p&&k.y>=c&&k.x+k.width<=l&&e.push(u);this.getAllCells(a,c,b,f,u,e)}}}return e};var F=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:F.apply(this,arguments)};this.isCellLocked=function(a){for(a= +k&&this.isCellVisible(u)&&"1"!=mxUtils.getValue(k.style,"locked","0")){var z=mxUtils.getValue(k.style,mxConstants.STYLE_ROTATION)||0;0!=z&&(k=mxUtils.getBoundingBox(k,z));(g.isEdge(u)||g.isVertex(u))&&k.x>=a&&k.y+k.height<=p&&k.y>=c&&k.x+k.width<=l&&e.push(u);this.getAllCells(a,c,b,f,u,e)}}}return e};var G=this.graphHandler.shouldRemoveCellsFromParent;this.graphHandler.shouldRemoveCellsFromParent=function(a,c,b){return this.graph.isCellSelected(a)?!1:G.apply(this,arguments)};this.isCellLocked=function(a){for(a= this.view.getState(a);null!=a;){if("1"==mxUtils.getValue(a.style,"locked","0"))return!0;a=this.view.getState(this.model.getParent(a.cell))}return!1};var p=null;this.addListener(mxEvent.FIRE_MOUSE_EVENT,mxUtils.bind(this,function(a,c){if("mouseDown"==c.getProperty("eventName")){var b=c.getProperty("event").getState();p=null==b||this.isSelectionEmpty()||this.isCellSelected(b.cell)?null:this.getSelectionCells()}}));this.addListener(mxEvent.TAP_AND_HOLD,mxUtils.bind(this,function(a,c){if(!mxEvent.isMultiTouchEvent(c)){var b= c.getProperty("event"),d=c.getProperty("cell");null==d?(b=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),f.start(b.x,b.y)):null!=p?this.addSelectionCells(p):1g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0g?"a":"p",tt:12>g?"am":"pm",T:12>g?"A":"P",TT:12>g?"AM":"PM",Z:e?"UTC":(String(a).match(k)||[""]).pop().replace(m,""),o:(0e||Math.abs(u.y-y.y)>e)&&(Math.abs(u.x-n.x)>e||Math.abs(u.y-n.y)>e)&&(Math.abs(u.x-C.x)>e||Math.abs(u.y-C.y)>e)&&(Math.abs(u.x-p.x)>e||Math.abs(u.y-p.y)>e)){p=u.x-y.x;C=u.y-y.y;u={distSq:p*p+C*C,x:u.x,y:u.y};for(p=0;pu.distSq){k.splice(p,0,u);u=null;break}null==u||0!=k.length&&k[k.length-1].x===u.x&&k[k.length-1].y===u.y||k.push(u)}}}for(x=0;xe||Math.abs(u.y-z.y)>e)&&(Math.abs(u.x-n.x)>e||Math.abs(u.y-n.y)>e)&&(Math.abs(u.x-C.x)>e||Math.abs(u.y-C.y)>e)&&(Math.abs(u.x-p.x)>e||Math.abs(u.y-p.y)>e)){p=u.x-z.x;C=u.y-z.y;u={distSq:p*p+C*C,x:u.x,y:u.y};for(p=0;pu.distSq){k.splice(p,0,u);u=null;break}null==u||0!=k.length&&k[k.length-1].x===u.x&&k[k.length-1].y===u.y||k.push(u)}}}for(x=0;xd*d&&0d*d&&(p=new mxPoint(m.x-u.x,m.y-u.y),x=new mxPoint(m.x+u.x,m.y+u.y),l.push(p),this.addPoints(a,l,c,f,!1,null,n),l=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,n=!1,"sharp"==e?(a.lineTo(p.x-u.y*l,p.y+u.x*l),a.lineTo(x.x-u.y*l,x.y+u.x*l),a.lineTo(x.x,x.y)):"arc"==e?(l*=1.3,a.curveTo(p.x-u.y*l,p.y+u.x*l,x.x-u.y*l,x.y+u.x*l,x.x,x.y)):(a.moveTo(x.x,x.y),n=!0),l=[x],p=!0))}else u=null;p||(l.push(m),y=m)}this.addPoints(a,l,c,f,!1,null,n);a.stroke()}};var m= -mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,f){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,f);var d=this.getNextPoint(a,c,f),e=this.graph.isOrthogonal(a),l=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=l)var k=Math.cos(-l),z=Math.sin(-l),d=mxUtils.getRotatedPoint(d,k,z,n); -k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==l&&e,k);0!=l&&(k=Math.cos(l),z=Math.sin(l),d=mxUtils.getRotatedPoint(d,k,z,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,f,d),f)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,f,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);f=c=null;if(null!=a)for(var e= +"jumpStyle","none"),l,n=!0,z=null,y=null;l=[];var u=null;a.begin();for(var t=0;td*d&&0d*d&&(p=new mxPoint(m.x-u.x,m.y-u.y),x=new mxPoint(m.x+u.x,m.y+u.y),l.push(p),this.addPoints(a,l,c,f,!1,null,n),l=0>Math.round(u.x)||0==Math.round(u.x)&&0>=Math.round(u.y)?1:-1,n=!1,"sharp"==e?(a.lineTo(p.x-u.y*l,p.y+u.x*l),a.lineTo(x.x-u.y*l,x.y+u.x*l),a.lineTo(x.x,x.y)):"arc"==e?(l*=1.3,a.curveTo(p.x-u.y*l,p.y+u.x*l,x.x-u.y*l,x.y+u.x*l,x.x,x.y)):(a.moveTo(x.x,x.y),n=!0),l=[x],p=!0))}else u=null;p||(l.push(m),z=m)}this.addPoints(a,l,c,f,!1,null,n);a.stroke()}};var m= +mxGraphView.prototype.updateFloatingTerminalPoint;mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,f){if(null==b||null==a||"1"!=b.style.snapToPoint&&"1"!=a.style.snapToPoint)m.apply(this,arguments);else{b=this.getTerminalPort(a,b,f);var d=this.getNextPoint(a,c,f),e=this.graph.isOrthogonal(a),l=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0")),n=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=l)var k=Math.cos(-l),y=Math.sin(-l),d=mxUtils.getRotatedPoint(d,k,y,n); +k=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);k+=parseFloat(a.style[f?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||0);d=this.getPerimeterPoint(b,d,0==l&&e,k);0!=l&&(k=Math.cos(l),y=Math.sin(l),d=mxUtils.getRotatedPoint(d,k,y,n));a.setAbsoluteTerminalPoint(this.snapToAnchorPoint(a,b,c,f,d),f)}};mxGraphView.prototype.snapToAnchorPoint=function(a,b,c,f,d){if(null!=b&&null!=a){a=this.graph.getAllConnectionConstraints(b);f=c=null;if(null!=a)for(var e= 0;e=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)),c.consume()}};var l=mxRubberband.prototype.reset;mxRubberband.prototype.reset=function(){null!=this.secondDiv&&(this.secondDiv.parentNode.removeChild(this.secondDiv), -this.secondDiv=null);l.apply(this,arguments)};var n=(new Date).getTime(),y=0,z=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){z.apply(this,arguments);b!=this.currentTerminalState?(n=(new Date).getTime(),y=0):y=(new Date).getTime()-n;this.currentTerminalState=b};var u=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&& -2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state, +this.secondDiv=null);l.apply(this,arguments)};var n=(new Date).getTime(),z=0,y=mxEdgeHandler.prototype.updatePreviewState;mxEdgeHandler.prototype.updatePreviewState=function(a,c,b,f){y.apply(this,arguments);b!=this.currentTerminalState?(n=(new Date).getTime(),z=0):z=(new Date).getTime()-n;this.currentTerminalState=b};var u=mxEdgeHandler.prototype.isOutlineConnectEvent;mxEdgeHandler.prototype.isOutlineConnectEvent=function(a){return null!=this.currentTerminalState&&a.getState()==this.currentTerminalState&& +2E3=this.state.absolutePoints.length-1||this.constructor==mxElbowEdgeHandler&&2==a)?this.graph.getConnectionConstraint(this.state, f,b):null,b=null!=(null!=d?this.graph.getConnectionPoint(this.state.getVisibleTerminalState(b),d):null)?this.fixedHandleImage:null!=d&&null!=f?this.terminalHandleImage:this.handleImage;if(null!=b)return b=new mxImageShape(new mxRectangle(0,0,b.width,b.height),b.src),b.preserveImageAspect=!1,b;b=mxConstants.HANDLE_SIZE;this.preferHtml&&--b;return new mxRectangleShape(new mxRectangle(0,0,b,b),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};var E=mxVertexHandler.prototype.createSizerShape; mxVertexHandler.prototype.createSizerShape=function(a,c,b){this.handleImage=c==mxEvent.ROTATION_HANDLE?HoverIcons.prototype.rotationHandle:c==mxEvent.LABEL_HANDLE?this.secondaryHandleImage:this.handleImage;return E.apply(this,arguments)};var x=mxGraphHandler.prototype.getBoundingBox;mxGraphHandler.prototype.getBoundingBox=function(a){if(null!=a&&1==a.length){var c=this.graph.getModel(),b=c.getParent(a[0]),f=this.graph.getCellGeometry(a[0]);if(c.isEdge(b)&&null!=f&&f.relative&&(c=this.graph.view.getState(a[0]), -null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return x.apply(this,arguments)};var F=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox, -new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):F.apply(this,arguments)};var p=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&p.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible= +null!=c&&2>c.width&&2>c.height&&null!=c.text&&null!=c.text.boundingBox))return mxRectangle.fromRectangle(c.text.boundingBox)}return x.apply(this,arguments)};var G=mxVertexHandler.prototype.getSelectionBounds;mxVertexHandler.prototype.getSelectionBounds=function(a){var c=this.graph.getModel(),b=c.getParent(a.cell),f=this.graph.getCellGeometry(a.cell);return c.isEdge(b)&&null!=f&&f.relative&&2>a.width&&2>a.height&&null!=a.text&&null!=a.text.boundingBox?(c=a.text.unrotatedBoundingBox||a.text.boundingBox, +new mxRectangle(Math.round(c.x),Math.round(c.y),Math.round(c.width),Math.round(c.height))):G.apply(this,arguments)};var p=mxVertexHandler.prototype.mouseDown;mxVertexHandler.prototype.mouseDown=function(a,c){var b=this.graph.getModel(),f=b.getParent(this.state.cell),d=this.graph.getCellGeometry(this.state.cell);(this.getHandleForEvent(c)==mxEvent.ROTATION_HANDLE||!b.isEdge(f)||null==d||!d.relative||null==this.state||2<=this.state.width||2<=this.state.height)&&p.apply(this,arguments)};mxVertexHandler.prototype.isRotationHandleVisible= function(){return this.graph.isEnabled()&&this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()D?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(f-e,0),a.lineTo(f,e),a.lineTo(e,e),a.close(),a.fill()),0!=g&&(a.setFillAlpha(Math.abs(g)),a.setFillColor(0>g?"#FFFFFF":"#000000"),a.begin(),a.moveTo(0,0),a.lineTo(e,e),a.lineTo(e,d),a.lineTo(0,d-e),a.close(),a.fill()),a.begin(),a.moveTo(e,d),a.lineTo(e,e),a.lineTo(0, 0),a.moveTo(e,e),a.lineTo(f,e),a.end(),a.stroke())};a.prototype.getLabelMargins=function(a){return mxUtils.getValue(this.style,"boundedLbl",!1)?(a=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(a,a,0,0)):null};mxCellRenderer.registerShape("cube",a);var xa=Math.tan(mxUtils.toRadians(30)),na=(.5-xa)/2;mxUtils.extend(b,mxActor);b.prototype.size=20;b.prototype.redrawPath=function(a,c,b,f,d){c=Math.min(f,d/xa);a.translate((f-c)/2,(d-c)/2+c/4);a.moveTo(0,.25*c);a.lineTo(.5* @@ -2488,19 +2488,19 @@ this.style||"0"==mxUtils.getValue(this.style,"comic","0"))&&Ka.apply(this,argume (a.pointerEvents=!1),a.begin(),this.isRounded?("1"==mxUtils.getValue(this.style,mxConstants.STYLE_ABSOLUTE_ARCSIZE,0)?e=Math.min(f/2,Math.min(d/2,mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2)):(e=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.min(f*e,d*e)),a.moveTo(c+e,b),a.lineTo(c+f-e,b),a.quadTo(c+f,b,c+f,b+e),a.lineTo(c+f,b+d-e),a.quadTo(c+f,b+d,c+f-e,b+d),a.lineTo(c+e,b+d),a.quadTo(c,b+d,c,b+d-e), a.lineTo(c,b+e),a.quadTo(c,b,c+e,b)):(a.moveTo(c,b),a.lineTo(c+f,b),a.lineTo(c+f,b+d),a.lineTo(c,b+d),a.lineTo(c,b)),a.close(),a.end(),a.fillAndStroke()}};var Ma=mxRectangleShape.prototype.paintForeground;mxRectangleShape.prototype.paintForeground=function(a,c,b,f,d){null==a.handJiggle&&Ma.apply(this,arguments)};mxUtils.extend(n,mxRectangleShape);n.prototype.size=.1;n.prototype.isHtmlAllowed=function(){return!1};n.prototype.getLabelBounds=function(a){if(mxUtils.getValue(this.state.style,mxConstants.STYLE_HORIZONTAL, !0)==(null==this.direction||this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)){var c=a.width,b=a.height;a=new mxRectangle(a.x,a.y,c,b);var f=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.max(f,Math.min(c*d,b*d));a.x+=Math.round(f);a.width-=Math.round(2*f)}return a};n.prototype.paintForeground= -function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",n);mxUtils.extend(y, -mxRectangleShape);y.prototype.paintBackground=function(a,c,b,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};y.prototype.paintForeground=function(a,c,b,f,d){};mxCellRenderer.registerShape("transparent",y);mxUtils.extend(z,mxHexagon);z.prototype.size=30;z.prototype.position=.5;z.prototype.position2=.5;z.prototype.base=20;z.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};z.prototype.isRoundable= -function(){return!0};z.prototype.redrawPath=function(a,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base)))); -this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+l),d-b),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",z);mxUtils.extend(u,mxActor);u.prototype.size=.2;u.prototype.fixedSize=20;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, +function(a,c,b,f,d){var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));if(this.isRounded)var g=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,e=Math.max(e,Math.min(f*g,d*g));e=Math.round(e);a.begin();a.moveTo(c+e,b);a.lineTo(c+e,b+d);a.moveTo(c+f-e,b);a.lineTo(c+f-e,b+d);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("process",n);mxUtils.extend(z, +mxRectangleShape);z.prototype.paintBackground=function(a,c,b,f,d){a.setFillColor(mxConstants.NONE);a.rect(c,b,f,d);a.fill()};z.prototype.paintForeground=function(a,c,b,f,d){};mxCellRenderer.registerShape("transparent",z);mxUtils.extend(y,mxHexagon);y.prototype.size=30;y.prototype.position=.5;y.prototype.position2=.5;y.prototype.base=20;y.prototype.getLabelMargins=function(){return new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale)};y.prototype.isRoundable= +function(){return!0};y.prototype.redrawPath=function(a,c,b,f,d){c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;b=Math.max(0,Math.min(d,parseFloat(mxUtils.getValue(this.style,"size",this.size))));var e=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position",this.position)))),g=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"position2",this.position2)))),l=Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style,"base",this.base)))); +this.addPoints(a,[new mxPoint(0,0),new mxPoint(f,0),new mxPoint(f,d-b),new mxPoint(Math.min(f,e+l),d-b),new mxPoint(g,d),new mxPoint(Math.max(0,e),d-b),new mxPoint(0,d-b)],this.isRounded,c,!0,[4])};mxCellRenderer.registerShape("callout",y);mxUtils.extend(u,mxActor);u.prototype.size=.2;u.prototype.fixedSize=20;u.prototype.isRoundable=function(){return!0};u.prototype.redrawPath=function(a,c,b,f,d){c="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(f,parseFloat(mxUtils.getValue(this.style, "size",this.fixedSize)))):f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(0,0),new mxPoint(f-c,0),new mxPoint(f,d/2),new mxPoint(f-c,d),new mxPoint(0,d),new mxPoint(c,d/2)],this.isRounded,b,!0);a.end()};mxCellRenderer.registerShape("step",u);mxUtils.extend(E,mxHexagon);E.prototype.size=.25;E.prototype.isRoundable=function(){return!0};E.prototype.redrawPath= function(a,c,b,f,d){c=f*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));b=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(a,[new mxPoint(c,0),new mxPoint(f-c,0),new mxPoint(f,.5*d),new mxPoint(f-c,d),new mxPoint(c,d),new mxPoint(0,.5*d)],this.isRounded,b,!0)};mxCellRenderer.registerShape("hexagon",E);mxUtils.extend(x,mxRectangleShape);x.prototype.isHtmlAllowed=function(){return!1};x.prototype.paintForeground=function(a, c,b,f,d){var e=Math.min(f/5,d/5)+1;a.begin();a.moveTo(c+f/2,b+e);a.lineTo(c+f/2,b+d-e);a.moveTo(c+e,b+d/2);a.lineTo(c+f-e,b+d/2);a.end();a.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("plus",x);var Fa=mxRhombus.prototype.paintVertexShape;mxRhombus.prototype.getLabelBounds=function(a){if(1==this.style["double"]){var c=(2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0))*this.scale;return new mxRectangle(a.x+ -c,a.y+c,a.width-2*c,a.height-2*c)}return a};mxRhombus.prototype.paintVertexShape=function(a,c,b,f,d){Fa.apply(this,arguments);if(!this.outline&&1==this.style["double"]){var e=2*Math.max(2,this.strokewidth+1)+parseFloat(this.style[mxConstants.STYLE_MARGIN]||0);c+=e;b+=e;f-=2*e;d-=2*e;0g+p?a.y=f.y:a.x=f.x);return mxUtils.getPerimeterPoint(l,a,f)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(a,c,b,d){var e=f.prototype.size;null!=c&&(e=mxUtils.getValue(c.style,"size",e));var g=a.x,l=a.y,p=a.width,D=a.height;c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST; c==mxConstants.DIRECTION_EAST?(e=p*Math.max(0,Math.min(1,e)),l=[new mxPoint(g+e,l),new mxPoint(g+p-e,l),new mxPoint(g+p,l+D),new mxPoint(g,l+D),new mxPoint(g+e,l)]):c==mxConstants.DIRECTION_WEST?(e=p*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+p,l),new mxPoint(g+p-e,l+D),new mxPoint(g+e,l+D),new mxPoint(g,l)]):c==mxConstants.DIRECTION_NORTH?(e=D*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+e),new mxPoint(g+p,l),new mxPoint(g+p,l+D),new mxPoint(g,l+D-e),new mxPoint(g,l+e)]):(e=D*Math.max(0, @@ -2518,39 +2518,39 @@ Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(g+p,l+e),new mxPoint(g+p,l+D-e),n Math.min(1,e)),l=[new mxPoint(g+d,l),new mxPoint(g+p,l),new mxPoint(g+p-d,a),new mxPoint(g+p,l+D),new mxPoint(g+d,l+D),new mxPoint(g,a),new mxPoint(g+d,l)]):c==mxConstants.DIRECTION_NORTH?(d=d?Math.max(0,Math.min(D,e)):D*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l+d),new mxPoint(r,l),new mxPoint(g+p,l+d),new mxPoint(g+p,l+D),new mxPoint(r,l+D-d),new mxPoint(g,l+D),new mxPoint(g,l+d)]):(d=d?Math.max(0,Math.min(D,e)):D*Math.max(0,Math.min(1,e)),l=[new mxPoint(g,l),new mxPoint(r,l+d),new mxPoint(g+ p,l),new mxPoint(g+p,l+D-d),new mxPoint(r,l+D),new mxPoint(g,l+D-d),new mxPoint(g,l)]);r=new mxPoint(r,a);f&&(b.xg+p?r.y=b.y:r.x=b.x);return mxUtils.getPerimeterPoint(l,r,b)};mxStyleRegistry.putValue("stepPerimeter",mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(a,c,b,f){var d=E.prototype.size;null!=c&&(d=mxUtils.getValue(c.style,"size",d));var e=a.x,g=a.y,l=a.width,p=a.height,D=a.getCenterX();a=a.getCenterY();c=null!=c?mxUtils.getValue(c.style,mxConstants.STYLE_DIRECTION, mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;c==mxConstants.DIRECTION_NORTH||c==mxConstants.DIRECTION_SOUTH?(d=p*Math.max(0,Math.min(1,d)),g=[new mxPoint(D,g),new mxPoint(e+l,g+d),new mxPoint(e+l,g+p-d),new mxPoint(D,g+p),new mxPoint(e,g+p-d),new mxPoint(e,g+d),new mxPoint(D,g)]):(d=l*Math.max(0,Math.min(1,d)),g=[new mxPoint(e+d,g),new mxPoint(e+l-d,g),new mxPoint(e+l,a),new mxPoint(e+l-d,g+p),new mxPoint(e+d,g+p),new mxPoint(e,a),new mxPoint(e+d,g)]);D=new mxPoint(D,a);f&&(b.xe+ -l?D.y=b.y:D.x=b.x);return mxUtils.getPerimeterPoint(g,D,b)};mxStyleRegistry.putValue("hexagonPerimeter2",mxPerimeter.HexagonPerimeter2);mxUtils.extend(S,mxShape);S.prototype.size=10;S.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size));a.translate(c,b);a.ellipse((f-e)/2,0,e,e);a.fillAndStroke();a.begin();a.moveTo(f/2,e);a.lineTo(f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("lollipop",S);mxUtils.extend(V,mxShape);V.prototype.size= -10;V.prototype.inset=2;V.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"size",this.size)),g=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.begin();a.moveTo(f/2,e+g);a.lineTo(f/2,d);a.end();a.stroke();a.begin();a.moveTo((f-e)/2-g,e/2);a.quadTo((f-e)/2-g,e+g,f/2,e+g);a.quadTo((f+e)/2+g,e+g,(f+e)/2+g,e/2);a.end();a.stroke()};mxCellRenderer.registerShape("requires",V);mxUtils.extend(U,mxShape);U.prototype.paintBackground= -function(a,c,b,f,d){a.translate(c,b);a.begin();a.moveTo(0,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,0,d);a.end();a.stroke()};mxCellRenderer.registerShape("requiredInterface",U);mxUtils.extend(X,mxShape);X.prototype.inset=2;X.prototype.paintBackground=function(a,c,b,f,d){var e=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;a.translate(c,b);a.ellipse(0,e,f-2*e,d-2*e);a.fillAndStroke();a.begin();a.moveTo(f/2,0);a.quadTo(f,0,f,d/2);a.quadTo(f,d,f/2,d);a.end();a.stroke()};mxCellRenderer.registerShape("providedRequiredInterface", -X);mxUtils.extend(I,mxCylinder);I.prototype.jettyWidth=32;I.prototype.jettyHeight=12;I.prototype.redrawPath=function(a,c,b,f,d,e){var g=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));c=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));b=g/2;var g=b+g/2,l=.3*d-c/2,p=.7*d-c/2;e?(a.moveTo(b,l),a.lineTo(g,l),a.lineTo(g,l+c),a.lineTo(b,l+c),a.moveTo(b,p),a.lineTo(g,p),a.lineTo(g,p+c),a.lineTo(b,p+c)):(a.moveTo(b,0),a.lineTo(f,0),a.lineTo(f,d),a.lineTo(b,d), -a.lineTo(b,p+c),a.lineTo(0,p+c),a.lineTo(0,p),a.lineTo(b,p),a.lineTo(b,l+c),a.lineTo(0,l+c),a.lineTo(0,l),a.lineTo(b,l),a.close());a.end()};mxCellRenderer.registerShape("component",I);mxUtils.extend(aa,mxDoubleEllipse);aa.prototype.outerStroke=!0;aa.prototype.paintVertexShape=function(a,c,b,f,d){var e=Math.min(4,Math.min(f/5,d/5));0=2*f&&a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));return a};mxRectangleShape.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),new mxConnectionConstraint(new mxPoint(.25,1),!0),new mxConnectionConstraint(new mxPoint(.5,1),!0),new mxConnectionConstraint(new mxPoint(.75,1),!0)]; @@ -2601,41 +2601,41 @@ mxRectangleShape.prototype.constraints;mxSwimlane.prototype.constraints=mxRectan "tabPosition",this.tabPosition)?(a.push(new mxConnectionConstraint(new mxPoint(0,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d))):(a.push(new mxConnectionConstraint(new mxPoint(1,0),!1)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-.5*f,0)),a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,c-f,0)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,d)),a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1, null,c,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.25*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.75*(b-d)+d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b));a.push(new mxConnectionConstraint(new mxPoint(.25,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(.75, -1),!1));return a};K.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxRectangleShape.prototype.constraints;ga.prototype.constraints=mxEllipse.prototype.constraints;W.prototype.constraints=mxEllipse.prototype.constraints;Z.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;ba.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.getConstraints= +1),!1));return a};K.prototype.constraints=mxRectangleShape.prototype.constraints;ea.prototype.constraints=mxRectangleShape.prototype.constraints;fa.prototype.constraints=mxEllipse.prototype.constraints;V.prototype.constraints=mxEllipse.prototype.constraints;Y.prototype.constraints=mxEllipse.prototype.constraints;va.prototype.constraints=mxEllipse.prototype.constraints;aa.prototype.constraints=mxRectangleShape.prototype.constraints;ma.prototype.constraints=mxRectangleShape.prototype.constraints;ka.prototype.getConstraints= function(a,c,b){a=[];var f=Math.min(c,b/2),d=Math.min(c-f,Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size)))*c);a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-f,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1,null));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};P.prototype.constraints=mxRectangleShape.prototype.constraints;ca.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, +0),!1,null,c-f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(d+c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));return a};Q.prototype.constraints=mxRectangleShape.prototype.constraints;ba.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)];C.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)];I.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)];m.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)];v.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)];u.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)];S.prototype.constraints= +.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)];N.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)];c.prototype.constraints=mxRectangleShape.prototype.constraints;f.prototype.constraints=mxRectangleShape.prototype.constraints;A.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;N.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style, +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;O.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style, "dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.75*c+.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-f),d));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.25*c-.25*f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,.5*d));return a};L.prototype.getConstraints=function(a,c,b){a=[];var f=Math.max(0,Math.min(c,parseFloat(mxUtils.getValue(this.style,"dx",this.dx)))),d=Math.max(0,Math.min(b,parseFloat(mxUtils.getValue(this.style,"dy",this.dy))));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(1, 0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,.5*d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+f),d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,d));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,.5*(b+d)));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,f,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*f,b));a.push(new mxConnectionConstraint(new mxPoint(0, .5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,1),!1));return a};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)];R.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f));a.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));return a};ia.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",R.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, -"arrowSize",R.prototype.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0, +1),!1)];S.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),f));a.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c-d),b-f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,b-f));return a};ia.prototype.getConstraints=function(a,c,b){a=[];var f=b*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",S.prototype.arrowWidth)))),d=c*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style, +"arrowSize",S.prototype.arrowSize)))),f=(b-f)/2;a.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,0));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c-d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*c,b-f));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,d,b));return a};ra.prototype.getConstraints=function(a,c,b){a=[];var f=Math.min(b,c),d=Math.max(0,Math.min(f,f*parseFloat(mxUtils.getValue(this.style,"size",this.size)))),f=(b-d)/2,e=f+d,g=(c-d)/2,d=g+d;a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,0));a.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,0));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,d,.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,b));a.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,b-.5*f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,d,e));a.push(new mxConnectionConstraint(new mxPoint(0, 0),!1,null,.5*(c+d),f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,f));a.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,c,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(c+d),e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,f));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,f));a.push(new mxConnectionConstraint(new mxPoint(0, -.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));return a};B.prototype.constraints=null;G.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, +.5),!1));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*g,e));a.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,g,f));return a};B.prototype.constraints=null;F.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)];ja.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)];U.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1, -.5),!1)];X.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} +.5),!1)];W.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} Actions.prototype.init=function(){function a(a){d.escape();var b=d.getDeletableCells(d.getSelectionCells());if(null!=b&&0e?a=a.substring(0,e)+"[...]":null!=a&&a.length>b&&(a=Graph.compress(a)+"\n");return a}; DrawioFile.prototype.checksumError=function(a,b,e,d,k){this.stats.checksumErrors++;this.invalidChecksum=this.inConflictState=!0;this.descriptorChanged();null!=this.sync&&this.sync.updateOnlineState();null!=a&&a();try{if(this.errorReportsEnabled){if(null!=b)for(a=0;a>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4);c+="==";break}e=a.charCodeAt(b++);if(b==f){c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d& 3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2);c+="=";break}g=a.charCodeAt(b++);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4|(e&240)>>4);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((e&15)<<2|(g&192)>>6);c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g&63)}return c}; Editor.prototype.loadUrl=function(a,c,b,f,d,e){try{var g=f||/(\.png)($|\?)/i.test(a)||/(\.jpe?g)($|\?)/i.test(a)||/(\.gif)($|\?)/i.test(a);d=null!=d?d:!0;var l=mxUtils.bind(this,function(){mxUtils.get(a,mxUtils.bind(this,function(a){if(200<=a.getStatus()&&299>=a.getStatus()){if(null!=c){var f=a.getText();if(g){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){a=mxUtilsBinaryToArray(a.request.responseBody).toArray();for(var f=Array(a.length), -d=0;d>24&255,a>>16&255,a>>8&255,a&255)}a=a.substring(a.indexOf(",")+1);a=window.atob?atob(a):Base64.decode(a,!0);var r=0;if(e(a,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=d&&d();else if(e(a,4),"IHDR"!=e(a,4))null!=d&&d();else{e(a,17);d=a.substring(0,r);do{var n=g(a); if("IDAT"==e(a,4)){d=a.substring(0,r-8);b=b+String.fromCharCode(0)+("zTXt"==c?String.fromCharCode(0):"")+f;f=4294967295;f=EditorUi.prototype.updateCRC(f,c,0,4);f=EditorUi.prototype.updateCRC(f,b,0,b.length);d+=l(b.length)+c+b+l(f^4294967295);d+=a.substring(r-8,a.length);break}d+=a.substring(r-8,r-4+n);e(a,n);e(a,4)}while(n);return"data:image/png;base64,"+(window.btoa?btoa(d):Base64.encode(d,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://desk.draw.io/support/solutions/articles/16000091426"; @@ -2839,15 +2839,15 @@ n.length;kn.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==z?parseInt(a):a)+"");f(c,a,n)}var g=document.createElement("input");d(m,g,!0);g.value=b;g.className="gePropEditor";"int"!=z&&"float"!=z||n.allowAuto||(g.type="number",g.step="int"==z?"1":"any",null!=n.min&&(g.min=parseFloat(n.min)), +"change",function(){f(a,d.checked?"1":"0",b)});return d}function n(c,b,n,u,k){var z=n.dispName,y=n.type,x=document.createElement("tr");x.className="gePropRow"+(k?"Dark":"")+(u?"Alt":"")+" gePropNonHeaderRow";x.setAttribute("data-pName",c);x.setAttribute("data-pValue",b);u=!1;null!=n.index&&(x.setAttribute("data-index",n.index),z=(null!=z?z:"")+"["+n.index+"]",u=!0);var m=document.createElement("td");m.className="gePropRowCell";m.innerHTML=mxUtils.htmlEntities(mxResources.get(z,null,z));u&&(m.style.textAlign= +"right");x.appendChild(m);m=document.createElement("td");m.className="gePropRowCell";if("color"==y)m.appendChild(e(c,b,n));else if("bool"==y||"boolean"==y)m.appendChild(r(c,b,n));else if("enum"==y){var B=n.enumList;for(k=0;kn.max&&(a=n.max);a=mxUtils.htmlEntities(("int"==y?parseInt(a):a)+"");f(c,a,n)}var g=document.createElement("input");d(m,g,!0);g.value=b;g.className="gePropEditor";"int"!=y&&"float"!=y||n.allowAuto||(g.type="number",g.step="int"==y?"1":"any",null!=n.min&&(g.min=parseFloat(n.min)), null!=n.max&&(g.max=parseFloat(n.max)));a.appendChild(g);mxEvent.addListener(g,"keypress",function(a){13==a.keyCode&&e()});g.focus();mxEvent.addListener(g,"blur",function(){e()})})));n.isDeletable&&(k=mxUtils.button("-",mxUtils.bind(p,function(a){f(c,"",n,n.index);mxEvent.consume(a)})),k.style.height="16px",k.style.width="25px",k.style["float"]="right",k.className="geColorBtn",m.appendChild(k));x.appendChild(m);return x}var p=this,u=this.editorUi.editor.graph,k=[];a.style.position="relative";a.style.padding= -"0";var y=document.createElement("table");y.style.whiteSpace="nowrap";y.style.width="100%";var z=document.createElement("tr");z.className="gePropHeader";var x=document.createElement("th");x.className="gePropHeaderCell";var m=document.createElement("img");m.src=Sidebar.prototype.expandedImage;x.appendChild(m);mxUtils.write(x,mxResources.get("property"));z.style.cursor="pointer";var q=function(){var c=y.querySelectorAll(".gePropNonHeaderRow"),b;if(p.editorUi.propertiesCollapsed){m.src=Sidebar.prototype.collapsedImage; -b="none";for(var f=a.childNodes.length-1;0<=f;f--)try{var d=a.childNodes[f],e=d.nodeName.toUpperCase();"INPUT"!=e&&"SELECT"!=e||a.removeChild(d)}catch(Z){}}else m.src=Sidebar.prototype.expandedImage,b="";for(f=0;f'),c.writeln(a.editor.fontCss),c.writeln(""))};if("undefined"!==typeof MathJax){var z=b.renderPage;b.renderPage=function(a,c,b,f,d,e){var g=mxClient.NO_FO;mxClient.NO_FO=this.graph.mathEnabled&&!this.useForeignObjectForMath?!0:this.originalNoForeignObject;var l=z.apply(this,arguments);mxClient.NO_FO=g;this.graph.mathEnabled?this.mathEnabled=this.mathEnabled||!0:l.className="geDisableMathJax";return l}}b.open(null,null,d,!0)}else{n= -c.background;if(null==n||""==n||n==mxConstants.NONE)n="#ffffff";b.backgroundColor=n;b.autoOrigin=u;b.appendGraph(c,r,g,l,d,!0)}return b}var f=parseInt(W.value)/100;isNaN(f)&&(f=1,W.value="100 %");var f=.75*f,e=y.value,g=p.value,l=!u.checked,n=null;l&&(l=e==r&&g==r);if(!l&&null!=a.pages&&a.pages.length){var k=0,l=a.pages.length-1;u.checked||(k=parseInt(e)-1,l=parseInt(g)-1);for(var z=k;z<=l;z++){var x=a.pages[z],e=x==a.currentPage?d:null;if(null==e){var e=a.createTemporaryGraph(d.getStylesheet()), -g=!0,k=!1,B=null,E=null;null==x.viewState&&null==x.root&&a.updatePageRoot(x);null!=x.viewState&&(g=x.viewState.pageVisible,k=x.viewState.mathEnabled,B=x.viewState.background,E=x.viewState.backgroundImage);e.background=B;e.backgroundImage=null!=E?new mxImage(E.src,E.width,E.height):null;e.pageVisible=g;e.mathEnabled=k;var F=e.getGlobalVariable;e.getGlobalVariable=function(a){return"page"==a?x.getName():"pagenumber"==a?z+1:F.apply(this,arguments)};document.body.appendChild(e.container);a.updatePageRoot(x); -e.model.setRoot(x.root)}n=b(e,n,z!=l);e!=d&&e.container.parentNode.removeChild(e.container)}}else n=b(d);null==n?a.handleError({message:mxResources.get("errorUpdatingPreview")}):(n.mathEnabled&&(l=n.wnd.document,l.writeln('