13.1.4 release

This commit is contained in:
David Benson [draw.io] 2020-05-27 13:30:48 +01:00
parent 90ba75589c
commit d46a85de8d
35 changed files with 6554 additions and 3189 deletions

View file

@ -1,3 +1,11 @@
27-MAY-2020: 13.1.4
- Adds dark export option in dark mode
- Adds Euskadi translations
- Uses mxGraph 4.2.0 beta 4
- Adds openLink JSON event
- Adds %id% placeholder
19-MAY-2020: 13.1.3 19-MAY-2020: 13.1.3
- Adds merge JSON message - Adds merge JSON message

View file

@ -1 +1 @@
13.1.3 13.1.4

View file

@ -42,57 +42,57 @@ new ActiveXObject("Microsoft.XMLDOM");a.async=!1;a.validateOnParse=!1;a.resolveE
window.getSelection().removeAllRanges()}:function(){}}(),removeWhitespace:function(a,b){for(var c=b?a.previousSibling:a.nextSibling;null!=c&&c.nodeType==mxConstants.NODETYPE_TEXT;){var d=b?c.previousSibling:c.nextSibling,e=mxUtils.getTextContent(c);0==mxUtils.trim(e).length&&c.parentNode.removeChild(c);c=d}},htmlEntities:function(a,b){a=String(a||"");a=a.replace(/&/g,"&amp;");a=a.replace(/"/g,"&quot;");a=a.replace(/\'/g,"&#39;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");if(null==b||b)a=a.replace(/\n/g, window.getSelection().removeAllRanges()}:function(){}}(),removeWhitespace:function(a,b){for(var c=b?a.previousSibling:a.nextSibling;null!=c&&c.nodeType==mxConstants.NODETYPE_TEXT;){var d=b?c.previousSibling:c.nextSibling,e=mxUtils.getTextContent(c);0==mxUtils.trim(e).length&&c.parentNode.removeChild(c);c=d}},htmlEntities:function(a,b){a=String(a||"");a=a.replace(/&/g,"&amp;");a=a.replace(/"/g,"&quot;");a=a.replace(/\'/g,"&#39;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");if(null==b||b)a=a.replace(/\n/g,
"&#xa;");return a},isVml:function(a){return null!=a&&"urn:schemas-microsoft-com:vml"==a.tagUrn},getXml:function(a,b){var c="";mxClient.IS_IE||mxClient.IS_IE11?c=mxUtils.getPrettyXml(a,"","",""):null!=window.XMLSerializer?c=(new XMLSerializer).serializeToString(a):null!=a.xml&&(c=a.xml.replace(/\r\n\t[\t]*/g,"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n"));return c=c.replace(/\n/g,b||"&#xa;")},getPrettyXml:function(a,b,c,d,e){var f=[];if(null!=a)if(b=null!=b?b:" ",c=null!=c?c:"",d=null!=d?d:"\n", "&#xa;");return a},isVml:function(a){return null!=a&&"urn:schemas-microsoft-com:vml"==a.tagUrn},getXml:function(a,b){var c="";mxClient.IS_IE||mxClient.IS_IE11?c=mxUtils.getPrettyXml(a,"","",""):null!=window.XMLSerializer?c=(new XMLSerializer).serializeToString(a):null!=a.xml&&(c=a.xml.replace(/\r\n\t[\t]*/g,"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n"));return c=c.replace(/\n/g,b||"&#xa;")},getPrettyXml:function(a,b,c,d,e){var f=[];if(null!=a)if(b=null!=b?b:" ",c=null!=c?c:"",d=null!=d?d:"\n",
null!=a.namespaceURI&&a.namespaceURI!=e&&(e=a.namespaceURI,null==a.getAttribute("xmlns")&&a.setAttribute("xmlns",a.namespaceURI)),a.nodeType==mxConstants.NODETYPE_DOCUMENT)f.push(mxUtils.getPrettyXml(a.documentElement,b,c,d,e));else if(a.nodeType==mxConstants.NODETYPE_DOCUMENT_FRAGMENT){var g=a.firstChild;if(null!=g)for(;null!=g;)f.push(mxUtils.getPrettyXml(g,b,c,d,e)),g=g.nextSibling}else if(a.nodeType==mxConstants.NODETYPE_COMMENT)a=mxUtils.getTextContent(a),0<a.length&&f.push(c+"\x3c!--"+a+"--\x3e"+ null!=a.namespaceURI&&a.namespaceURI!=e&&(e=a.namespaceURI,null==a.getAttribute("xmlns")&&a.setAttribute("xmlns",a.namespaceURI)),a.nodeType==mxConstants.NODETYPE_DOCUMENT)f.push(mxUtils.getPrettyXml(a.documentElement,b,c,d,e));else if(a.nodeType==mxConstants.NODETYPE_DOCUMENT_FRAGMENT){var g=a.firstChild;if(null!=g)for(;null!=g;)f.push(mxUtils.getPrettyXml(g,b,c,d,e)),g=g.nextSibling}else if(a.nodeType==mxConstants.NODETYPE_COMMENT)a=mxUtils.getTextContent(a),0<a.length&&f.push(c+"\x3c!--"+a+"--\x3e"+
d);else if(a.nodeType==mxConstants.NODETYPE_TEXT)a=mxUtils.getTextContent(a),0<a.length&&f.push(c+mxUtils.htmlEntities(mxUtils.trim(a),!1)+d);else{f.push(c+"<"+a.nodeName);g=a.attributes;if(null!=g)for(var k=0;k<g.length;k++){var l=mxUtils.htmlEntities(g[k].value);f.push(" "+g[k].nodeName+'="'+l+'"')}g=a.firstChild;if(null!=g){for(f.push(">"+d);null!=g;)f.push(mxUtils.getPrettyXml(g,b,c+b,d,e)),g=g.nextSibling;f.push(c+"</"+a.nodeName+">"+d)}else f.push(" />"+d)}return f.join("")},extractTextWithWhitespace:function(a){function b(a){if(1!= d);else if(a.nodeType==mxConstants.NODETYPE_TEXT)a=mxUtils.getTextContent(a),0<a.length&&f.push(c+mxUtils.htmlEntities(mxUtils.trim(a),!1)+d);else if(a.nodeType==mxConstants.NODETYPE_CDATA)a=mxUtils.getTextContent(a),0<a.length&&f.push(c+"<![CDATA["+a+"]]"+d);else{f.push(c+"<"+a.nodeName);g=a.attributes;if(null!=g)for(var k=0;k<g.length;k++){var l=mxUtils.htmlEntities(g[k].value);f.push(" "+g[k].nodeName+'="'+l+'"')}g=a.firstChild;if(null!=g){for(f.push(">"+d);null!=g;)f.push(mxUtils.getPrettyXml(g,
a.length||"BR"!=a[0].nodeName&&"\n"!=a[0].innerHTML)for(var e=0;e<a.length;e++){var g=a[e];"BR"==g.nodeName||"\n"==g.innerHTML||(1==a.length||0==e)&&"DIV"==g.nodeName&&"<br>"==g.innerHTML.toLowerCase()?d.push("\n"):(3===g.nodeType||4===g.nodeType?0<g.nodeValue.length&&d.push(g.nodeValue):8!==g.nodeType&&0<g.childNodes.length&&b(g.childNodes),e<a.length-1&&0<=mxUtils.indexOf(c,a[e+1].nodeName)&&d.push("\n"))}}var c="BLOCKQUOTE DIV H1 H2 H3 H4 H5 H6 OL P PRE TABLE UL".split(" "),d=[];b(a);return d.join("")}, b,c+b,d,e)),g=g.nextSibling;f.push(c+"</"+a.nodeName+">"+d)}else f.push(" />"+d)}return f.join("")},extractTextWithWhitespace:function(a){function b(a){if(1!=a.length||"BR"!=a[0].nodeName&&"\n"!=a[0].innerHTML)for(var e=0;e<a.length;e++){var g=a[e];"BR"==g.nodeName||"\n"==g.innerHTML||(1==a.length||0==e)&&"DIV"==g.nodeName&&"<br>"==g.innerHTML.toLowerCase()?d.push("\n"):(3===g.nodeType||4===g.nodeType?0<g.nodeValue.length&&d.push(g.nodeValue):8!==g.nodeType&&0<g.childNodes.length&&b(g.childNodes),
replaceTrailingNewlines:function(a,b){for(var c="";0<a.length&&"\n"==a.charAt(a.length-1);)a=a.substring(0,a.length-1),c+=b;return a+c},getTextContent:function(a){return mxClient.IS_IE&&void 0!==a.innerText?a.innerText:null!=a?a[void 0===a.textContent?"text":"textContent"]:""},setTextContent:function(a,b){void 0!==a.innerText?a.innerText=b:a[void 0===a.textContent?"text":"textContent"]=b},getInnerHtml:function(){return mxClient.IS_IE?function(a){return null!=a?a.innerHTML:""}:function(a){return null!= e<a.length-1&&0<=mxUtils.indexOf(c,a[e+1].nodeName)&&d.push("\n"))}}var c="BLOCKQUOTE DIV H1 H2 H3 H4 H5 H6 OL P PRE TABLE UL".split(" "),d=[];b(a);return d.join("")},replaceTrailingNewlines:function(a,b){for(var c="";0<a.length&&"\n"==a.charAt(a.length-1);)a=a.substring(0,a.length-1),c+=b;return a+c},getTextContent:function(a){return mxClient.IS_IE&&void 0!==a.innerText?a.innerText:null!=a?a[void 0===a.textContent?"text":"textContent"]:""},setTextContent:function(a,b){void 0!==a.innerText?a.innerText=
a?(new XMLSerializer).serializeToString(a):""}}(),getOuterHtml:function(){return mxClient.IS_IE?function(a){if(null!=a){if(null!=a.outerHTML)return a.outerHTML;var b=[];b.push("<"+a.nodeName);var c=a.attributes;if(null!=c)for(var d=0;d<c.length;d++){var e=c[d].value;null!=e&&0<e.length&&(b.push(" "),b.push(c[d].nodeName),b.push('="'),b.push(e),b.push('"'))}0==a.innerHTML.length?b.push("/>"):(b.push(">"),b.push(a.innerHTML),b.push("</"+a.nodeName+">"));return b.join("")}return""}:function(a){return null!= b:a[void 0===a.textContent?"text":"textContent"]=b},getInnerHtml:function(){return mxClient.IS_IE?function(a){return null!=a?a.innerHTML:""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),getOuterHtml:function(){return mxClient.IS_IE?function(a){if(null!=a){if(null!=a.outerHTML)return a.outerHTML;var b=[];b.push("<"+a.nodeName);var c=a.attributes;if(null!=c)for(var d=0;d<c.length;d++){var e=c[d].value;null!=e&&0<e.length&&(b.push(" "),b.push(c[d].nodeName),b.push('="'),
a?(new XMLSerializer).serializeToString(a):""}}(),write:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&a.appendChild(c);return c},writeln:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&(a.appendChild(c),a.appendChild(document.createElement("br")));return c},br:function(a,b){b=b||1;for(var c=null,d=0;d<b;d++)null!=a&&(c=a.ownerDocument.createElement("br"),a.appendChild(c));return c},button:function(a,b,c){c=null!=c?c:document;c=c.createElement("button");mxUtils.write(c, b.push(e),b.push('"'))}0==a.innerHTML.length?b.push("/>"):(b.push(">"),b.push(a.innerHTML),b.push("</"+a.nodeName+">"));return b.join("")}return""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),write:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&a.appendChild(c);return c},writeln:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&(a.appendChild(c),a.appendChild(document.createElement("br")));return c},br:function(a,b){b=b||1;for(var c=null,
a);mxEvent.addListener(c,"click",function(a){b(a)});return c},para:function(a,b){var c=document.createElement("p");mxUtils.write(c,b);null!=a&&a.appendChild(c);return c},addTransparentBackgroundFilter:function(a){a.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mxClient.imageBasePath+"/transparent.gif', sizingMethod='scale')"},linkAction:function(a,b,c,d,e){return mxUtils.link(a,b,function(){c.execute(d)},e)},linkInvoke:function(a,b,c,d,e,f){return mxUtils.link(a,b,function(){c[d](e)}, d=0;d<b;d++)null!=a&&(c=a.ownerDocument.createElement("br"),a.appendChild(c));return c},button:function(a,b,c){c=null!=c?c:document;c=c.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",function(a){b(a)});return c},para:function(a,b){var c=document.createElement("p");mxUtils.write(c,b);null!=a&&a.appendChild(c);return c},addTransparentBackgroundFilter:function(a){a.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mxClient.imageBasePath+"/transparent.gif', sizingMethod='scale')"},
f)},link:function(a,b,c,d){var e=document.createElement("span");e.style.color="blue";e.style.textDecoration="underline";e.style.cursor="pointer";null!=d&&(e.style.paddingLeft=d+"px");mxEvent.addListener(e,"click",c);mxUtils.write(e,b);null!=a&&a.appendChild(e);return e},getDocumentSize:function(){var a=document.body,b=document.documentElement;try{return new mxRectangle(0,0,a.clientWidth||b.clientWidth,Math.max(a.clientHeight||0,b.clientHeight))}catch(c){return new mxRectangle}},fit:function(a){var b= linkAction:function(a,b,c,d,e){return mxUtils.link(a,b,function(){c.execute(d)},e)},linkInvoke:function(a,b,c,d,e,f){return mxUtils.link(a,b,function(){c[d](e)},f)},link:function(a,b,c,d){var e=document.createElement("span");e.style.color="blue";e.style.textDecoration="underline";e.style.cursor="pointer";null!=d&&(e.style.paddingLeft=d+"px");mxEvent.addListener(e,"click",c);mxUtils.write(e,b);null!=a&&a.appendChild(e);return e},getDocumentSize:function(){var a=document.body,b=document.documentElement;
mxUtils.getDocumentSize(),c=parseInt(a.offsetLeft),d=parseInt(a.offsetWidth),e=mxUtils.getDocumentScrollOrigin(a.ownerDocument),f=e.x,e=e.y,g=f+b.width;c+d>g&&(a.style.left=Math.max(f,g-d)+"px");c=parseInt(a.offsetTop);d=parseInt(a.offsetHeight);b=e+b.height;c+d>b&&(a.style.top=Math.max(e,b-d)+"px")},load:function(a){a=new mxXmlRequest(a,null,"GET",!1);a.send();return a},get:function(a,b,c,d,e,f,g){a=new mxXmlRequest(a,null,"GET");var k=a.setRequestHeaders;g&&(a.setRequestHeaders=function(a,b){k.apply(this, try{return new mxRectangle(0,0,a.clientWidth||b.clientWidth,Math.max(a.clientHeight||0,b.clientHeight))}catch(c){return new mxRectangle}},fit:function(a){var b=mxUtils.getDocumentSize(),c=parseInt(a.offsetLeft),d=parseInt(a.offsetWidth),e=mxUtils.getDocumentScrollOrigin(a.ownerDocument),f=e.x,e=e.y,g=f+b.width;c+d>g&&(a.style.left=Math.max(f,g-d)+"px");c=parseInt(a.offsetTop);d=parseInt(a.offsetHeight);b=e+b.height;c+d>b&&(a.style.top=Math.max(e,b-d)+"px")},load:function(a){a=new mxXmlRequest(a,null,
arguments);for(var c in g)a.setRequestHeader(c,g[c])});null!=d&&a.setBinary(d);a.send(b,c,e,f);return a},getAll:function(a,b,c){for(var d=a.length,e=[],f=0,g=function(){0==f&&null!=c&&c();f++},k=0;k<a.length;k++)(function(a,c){mxUtils.get(a,function(a){var f=a.getStatus();200>f||299<f?g():(e[c]=a,d--,0==d&&b(e))},g)})(a[k],k);0==d&&b(e)},post:function(a,b,c,d){return(new mxXmlRequest(a,b)).send(c,d)},submit:function(a,b,c,d){return(new mxXmlRequest(a,b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE? "GET",!1);a.send();return a},get:function(a,b,c,d,e,f,g){a=new mxXmlRequest(a,null,"GET");var k=a.setRequestHeaders;g&&(a.setRequestHeaders=function(a,b){k.apply(this,arguments);for(var c in g)a.setRequestHeader(c,g[c])});null!=d&&a.setBinary(d);a.send(b,c,e,f);return a},getAll:function(a,b,c){for(var d=a.length,e=[],f=0,g=function(){0==f&&null!=c&&c();f++},k=0;k<a.length;k++)(function(a,c){mxUtils.get(a,function(a){var f=a.getStatus();200>f||299<f?g():(e[c]=a,d--,0==d&&b(e))},g)})(a[k],k);0==d&&
b.onreadystatechange=function(){4==b.readyState&&c()}:b.addEventListener("load",c,!1);b.load(a)},getValue:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c);return a},getNumber:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c||0);return Number(a)},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,e;for(e in a)e!=mxObjectIdentity.FIELD_NAME&& b(e)},post:function(a,b,c,d){return(new mxXmlRequest(a,b)).send(c,d)},submit:function(a,b,c,d){return(new mxXmlRequest(a,b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=function(){4==b.readyState&&c()}:b.addEventListener("load",c,!1);b.load(a)},getValue:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c);return a},getNumber:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c||0);return Number(a)},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&
(null==b||0>mxUtils.indexOf(b,e))&&(d[e]=c||"object"!=typeof a[e]?a[e]:mxUtils.clone(a[e]))}return d},equalPoints:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(null!=a[c]&&null==b[c]||null==a[c]&&null!=b[c]||null!=a[c]&&null!=b[c]&&(a[c].x!=b[c].x||a[c].y!=b[c].y))return!1;return!0},equalEntries:function(a,b){var c=0;if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1; (a=null);return a},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,e;for(e in a)e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e))&&(d[e]=c||"object"!=typeof a[e]?a[e]:mxUtils.clone(a[e]))}return d},equalPoints:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(null!=a[c]&&null==b[c]||null==a[c]&&null!=b[c]||null!=a[c]&&
if(null!=a&&null!=b){for(var d in b)c++;for(d in a)if(c--,!(mxUtils.isNaN(a[d])&&mxUtils.isNaN(b[d])||a[d]==b[d]))return!1}return 0==c},removeDuplicates:function(a){for(var b=new mxDictionary,c=[],d=0;d<a.length;d++)b.get(a[d])||(c.push(a[d]),b.put(a[d],!0));return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" = [null]\n"; null!=b[c]&&(a[c].x!=b[c].x||a[c].y!=b[c].y))return!1;return!0},equalEntries:function(a,b){var c=0;if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b){for(var d in b)c++;for(d in a)if(c--,!(mxUtils.isNaN(a[d])&&mxUtils.isNaN(b[d])||a[d]==b[d]))return!1}return 0==c},removeDuplicates:function(a){for(var b=new mxDictionary,c=[],d=0;d<a.length;d++)b.get(a[d])||(c.push(a[d]),b.put(a[d],!0));return c},isNaN:function(a){return"number"==typeof a&&isNaN(a)},
else if("function"==typeof a[c])b+=c+" => [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" => ["+d+"]\n");else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,b,c,d,e,f,g,k,l){k-=a;l-=b;if(0===c||0===d)return q;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180),q=Math.sin(e*Math.PI/180);e=p*m+q*n;var m=-1* extend:function(a,b){var c=function(){};c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" = [null]\n";else if("function"==typeof a[c])b+=c+" => [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" => ["+d+"]\n");else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},toDegree:function(a){return 180*a/Math.PI},arcToCurves:function(a,
q*m+p*n,n=e*e,r=m*m,t=c*c,u=d*d,x=n/t+r/u;1<x?(c*=Math.sqrt(x),d*=Math.sqrt(x),f=0):(x=1,f===g&&(x=-1),f=x*Math.sqrt((t*u-t*r-u*n)/(t*r+u*n)));n=f*c*m/d;r=-1*f*d*e/c;k=p*n-q*r+k/2;l=q*n+p*r+l/2;t=Math.atan2((m-r)/d,(e-n)/c)-Math.atan2(0,1);f=0<=t?t:2*Math.PI+t;t=Math.atan2((-m-r)/d,(-e-n)/c)-Math.atan2((m-r)/d,(e-n)/c);e=0<=t?t:2*Math.PI+t;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=q;d*= b,c,d,e,f,g,k,l){k-=a;l-=b;if(0===c||0===d)return q;c=Math.abs(c);d=Math.abs(d);var m=-k/2,n=-l/2,p=Math.cos(e*Math.PI/180),q=Math.sin(e*Math.PI/180);e=p*m+q*n;var m=-1*q*m+p*n,n=e*e,r=m*m,t=c*c,u=d*d,x=n/t+r/u;1<x?(c*=Math.sqrt(x),d*=Math.sqrt(x),f=0):(x=1,f===g&&(x=-1),f=x*Math.sqrt((t*u-t*r-u*n)/(t*r+u*n)));n=f*c*m/d;r=-1*f*d*e/c;k=p*n-q*r+k/2;l=q*n+p*r+l/2;t=Math.atan2((m-r)/d,(e-n)/c)-Math.atan2(0,1);f=0<=t?t:2*Math.PI+t;t=Math.atan2((-m-r)/d,(-e-n)/c)-Math.atan2((m-r)/d,(e-n)/c);e=0<=t?t:2*
q;for(var y=Math.cos(f),B=Math.sin(f),r=-m*(n*B+d*y),t=-m*(c*B-p*y),q=[],A=0;A<g;++A){f+=e;var y=Math.cos(f),B=Math.sin(f),u=n*y-d*B+k,x=c*y+p*B+l,z=-m*(n*B+d*y),y=-m*(c*B-p*y),B=6*A;q[B]=Number(r+a);q[B+1]=Number(t+b);q[B+2]=Number(u-z+a);q[B+3]=Number(x-y+b);q[B+4]=Number(u+a);q[B+5]=Number(x+b);r=u+z;t=x+y}return q},getBoundingBox:function(a,b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);var d=Math.cos(b),e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f= Math.PI+t;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;g=Math.ceil(0>g?-1*g:g);e/=g;m=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);n=p*c;p*=d;c*=q;d*=q;for(var y=Math.cos(f),B=Math.sin(f),r=-m*(n*B+d*y),t=-m*(c*B-p*y),q=[],A=0;A<g;++A){f+=e;var y=Math.cos(f),B=Math.sin(f),u=n*y-d*B+k,x=c*y+p*B+l,z=-m*(n*B+d*y),y=-m*(c*B-p*y),B=6*A;q[B]=Number(r+a);q[B+1]=Number(t+b);q[B+2]=Number(u-z+a);q[B+3]=Number(x-y+b);q[B+4]=Number(u+a);q[B+5]=Number(x+b);r=u+z;t=x+y}return q},getBoundingBox:function(a,
new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,d,e,c);g=mxUtils.getRotatedPoint(g,d,e,c);a=mxUtils.getRotatedPoint(a,d,e,c);d=new mxRectangle(f.x,f.y,0,0);d.add(new mxRectangle(b.x,b.y,0,0));d.add(new mxRectangle(g.x,g.y,0,0));d.add(new mxRectangle(a.x,a.y,0,0))}return d},getRotatedPoint:function(a,b,c,d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e* b,c){var d=null;if(null!=a&&null!=b&&0!=b){b=mxUtils.toRadians(b);var d=Math.cos(b),e=Math.sin(b);c=null!=c?c:new mxPoint(a.x+a.width/2,a.y+a.height/2);var f=new mxPoint(a.x,a.y);b=new mxPoint(a.x+a.width,a.y);var g=new mxPoint(b.x,a.y+a.height);a=new mxPoint(a.x,g.y);f=mxUtils.getRotatedPoint(f,d,e,c);b=mxUtils.getRotatedPoint(b,d,e,c);g=mxUtils.getRotatedPoint(g,d,e,c);a=mxUtils.getRotatedPoint(a,d,e,c);d=new mxRectangle(f.x,f.y,0,0);d.add(new mxRectangle(b.x,b.y,0,0));d.add(new mxRectangle(g.x,
b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,mxUtils.getValue(b.style,c?mxConstants.STYLE_SOURCE_PORT_CONSTRAINT:mxConstants.STYLE_TARGET_PORT_CONSTRAINT,null));if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2)); g.y,0,0));d.add(new mxRectangle(a.x,a.y,0,0))}return d},getRotatedPoint:function(a,b,c,d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,mxUtils.getValue(b.style,c?mxConstants.STYLE_SOURCE_PORT_CONSTRAINT:mxConstants.STYLE_TARGET_PORT_CONSTRAINT,null));if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,
if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|= 0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;
mxConstants.DIRECTION_MASK_SOUTH;break;case 1:b|=mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;break;case 1:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:b|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},reversePortConstraints:function(a){var b;b=(a&mxConstants.DIRECTION_MASK_WEST)<< break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 1:b|=mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;break;case 1:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:b|=
3;b|=(a&mxConstants.DIRECTION_MASK_NORTH)<<1;b|=(a&mxConstants.DIRECTION_MASK_SOUTH)>>1;return b|=(a&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(a,b,c){var d=-1;if(0<a.absolutePoints.length)for(var e=a.absolutePoints[0],f=null,g=1;g<a.absolutePoints.length;g++){var k=a.absolutePoints[g],e=mxUtils.ptSegDistSq(e.x,e.y,k.x,k.y,b,c);if(null==f||e<f)f=e,d=g-1;e=k}return d},getDirectedBounds:function(a,b,c,d,e){var f=mxUtils.getValue(c,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST); mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},reversePortConstraints:function(a){var b;b=(a&mxConstants.DIRECTION_MASK_WEST)<<3;b|=(a&mxConstants.DIRECTION_MASK_NORTH)<<1;b|=(a&mxConstants.DIRECTION_MASK_SOUTH)>>1;return b|=(a&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(a,b,c){var d=-1;if(0<a.absolutePoints.length)for(var e=a.absolutePoints[0],f=null,g=1;g<a.absolutePoints.length;g++){var k=a.absolutePoints[g],e=mxUtils.ptSegDistSq(e.x,
d=null!=d?d:mxUtils.getValue(c,mxConstants.STYLE_FLIPH,!1);e=null!=e?e:mxUtils.getValue(c,mxConstants.STYLE_FLIPV,!1);b.x=Math.round(Math.max(0,Math.min(a.width,b.x)));b.y=Math.round(Math.max(0,Math.min(a.height,b.y)));b.width=Math.round(Math.max(0,Math.min(a.width,b.width)));b.height=Math.round(Math.max(0,Math.min(a.height,b.height)));if(e&&(f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH)||d&&(f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST))c=b.x,b.x=b.width,b.width= e.y,k.x,k.y,b,c);if(null==f||e<f)f=e,d=g-1;e=k}return d},getDirectedBounds:function(a,b,c,d,e){var f=mxUtils.getValue(c,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);d=null!=d?d:mxUtils.getValue(c,mxConstants.STYLE_FLIPH,!1);e=null!=e?e:mxUtils.getValue(c,mxConstants.STYLE_FLIPV,!1);b.x=Math.round(Math.max(0,Math.min(a.width,b.x)));b.y=Math.round(Math.max(0,Math.min(a.height,b.y)));b.width=Math.round(Math.max(0,Math.min(a.width,b.width)));b.height=Math.round(Math.max(0,Math.min(a.height,
c;if(d&&(f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH)||e&&(f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST))c=b.y,b.y=b.height,b.height=c;d=mxRectangle.fromRectangle(b);f==mxConstants.DIRECTION_SOUTH?(d.y=b.x,d.x=b.height,d.width=b.y,d.height=b.width):f==mxConstants.DIRECTION_WEST?(d.y=b.height,d.x=b.width,d.width=b.x,d.height=b.y):f==mxConstants.DIRECTION_NORTH&&(d.y=b.width,d.x=b.y,d.width=b.height,d.height=b.x);return new mxRectangle(a.x+d.x,a.y+d.y,a.width-d.width- b.height)));if(e&&(f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH)||d&&(f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST))c=b.x,b.x=b.width,b.width=c;if(d&&(f==mxConstants.DIRECTION_SOUTH||f==mxConstants.DIRECTION_NORTH)||e&&(f==mxConstants.DIRECTION_EAST||f==mxConstants.DIRECTION_WEST))c=b.y,b.y=b.height,b.height=c;d=mxRectangle.fromRectangle(b);f==mxConstants.DIRECTION_SOUTH?(d.y=b.x,d.x=b.height,d.width=b.y,d.height=b.width):f==mxConstants.DIRECTION_WEST?(d.y=b.height,
d.x,a.height-d.height-d.y)},getPerimeterPoint:function(a,b,c){for(var d=null,e=0;e<a.length-1;e++){var f=mxUtils.intersection(a[e].x,a[e].y,a[e+1].x,a[e+1].y,b.x,b.y,c.x,c.y);if(null!=f){var g=c.x-f.x,k=c.y-f.y,f={p:f,distSq:k*k+g*g};null!=f&&(null==d||d.distSq>f.distSq)&&(d=f)}}return null!=d?d.p:null},rectangleIntersectsSegment:function(a,b,c){var d=a.y,e=a.x,f=d+a.height,g=e+a.width;a=b.x;var k=c.x;b.x>c.x&&(a=c.x,k=b.x);k>g&&(k=g);a<e&&(a=e);if(a>k)return!1;var e=b.y,g=c.y,l=c.x-b.x;1E-7<Math.abs(l)&& d.x=b.width,d.width=b.x,d.height=b.y):f==mxConstants.DIRECTION_NORTH&&(d.y=b.width,d.x=b.y,d.width=b.height,d.height=b.x);return new mxRectangle(a.x+d.x,a.y+d.y,a.width-d.width-d.x,a.height-d.height-d.y)},getPerimeterPoint:function(a,b,c){for(var d=null,e=0;e<a.length-1;e++){var f=mxUtils.intersection(a[e].x,a[e].y,a[e+1].x,a[e+1].y,b.x,b.y,c.x,c.y);if(null!=f){var g=c.x-f.x,k=c.y-f.y,f={p:f,distSq:k*k+g*g};null!=f&&(null==d||d.distSq>f.distSq)&&(d=f)}}return null!=d?d.p:null},rectangleIntersectsSegment:function(a,
(c=(c.y-b.y)/l,b=b.y-c*b.x,e=c*a+b,g=c*k+b);e>g&&(b=g,g=e,e=b);g>f&&(g=f);e<d&&(e=d);return e>g?!1:!0},contains:function(a,b,c){return a.x<=b&&a.x+a.width>=b&&a.y<=c&&a.y+a.height>=c},intersects:function(a,b){var c=a.width,d=a.height,e=b.width,f=b.height;if(0>=e||0>=f||0>=c||0>=d)return!1;var g=a.x,k=a.y,l=b.x,m=b.y,e=e+l,f=f+m,c=c+g,d=d+k;return(e<l||e>g)&&(f<m||f>k)&&(c<g||c>l)&&(d<k||d>m)},intersectsHotspot:function(a,b,c,d,e,f){d=null!=d?d:1;e=null!=e?e:0;f=null!=f?f:0;if(0<d){var g=a.getCenterX(), b,c){var d=a.y,e=a.x,f=d+a.height,g=e+a.width;a=b.x;var k=c.x;b.x>c.x&&(a=c.x,k=b.x);k>g&&(k=g);a<e&&(a=e);if(a>k)return!1;var e=b.y,g=c.y,l=c.x-b.x;1E-7<Math.abs(l)&&(c=(c.y-b.y)/l,b=b.y-c*b.x,e=c*a+b,g=c*k+b);e>g&&(b=g,g=e,e=b);g>f&&(g=f);e<d&&(e=d);return e>g?!1:!0},contains:function(a,b,c){return a.x<=b&&a.x+a.width>=b&&a.y<=c&&a.y+a.height>=c},intersects:function(a,b){var c=a.width,d=a.height,e=b.width,f=b.height;if(0>=e||0>=f||0>=c||0>=d)return!1;var g=a.x,k=a.y,l=b.x,m=b.y,e=e+l,f=f+m,c=c+
k=a.getCenterY(),l=a.width,m=a.height,n=mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE)*a.view.scale;0<n&&(mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,!0)?(k=a.y+n/2,m=n):(g=a.x+n/2,l=n));l=Math.max(e,l*d);m=Math.max(e,m*d);0<f&&(l=Math.min(l,f),m=Math.min(m,f));d=new mxRectangle(g-l/2,k-m/2,l,m);g=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);0!=g&&(e=Math.cos(-g),f=Math.sin(-g),g=new mxPoint(a.getCenterX(),a.getCenterY()),a=mxUtils.getRotatedPoint(new mxPoint(b, g,d=d+k;return(e<l||e>g)&&(f<m||f>k)&&(c<g||c>l)&&(d<k||d>m)},intersectsHotspot:function(a,b,c,d,e,f){d=null!=d?d:1;e=null!=e?e:0;f=null!=f?f:0;if(0<d){var g=a.getCenterX(),k=a.getCenterY(),l=a.width,m=a.height,n=mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE)*a.view.scale;0<n&&(mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,!0)?(k=a.y+n/2,m=n):(g=a.x+n/2,l=n));l=Math.max(e,l*d);m=Math.max(e,m*d);0<f&&(l=Math.min(l,f),m=Math.min(m,f));d=new mxRectangle(g-l/2,k-m/2,l,m);g=mxUtils.toRadians(mxUtils.getValue(a.style,
c),e,f,g),b=a.x,c=a.y);return mxUtils.contains(d,b,c)}return!0},getOffset:function(a,b){for(var c=0,d=0,e=!1,f=a,g=document.body,k=document.documentElement;null!=f&&f!=g&&f!=k&&!e;){var l=mxUtils.getCurrentStyle(f);null!=l&&(e=e||"fixed"==l.position);f=f.parentNode}b||e||(e=mxUtils.getDocumentScrollOrigin(a.ownerDocument),c+=e.x,d+=e.y);e=a.getBoundingClientRect();null!=e&&(c+=e.left,d+=e.top);return new mxPoint(c,d)},getDocumentScrollOrigin:function(a){if(mxClient.IS_QUIRKS)return new mxPoint(a.body.scrollLeft, mxConstants.STYLE_ROTATION)||0);0!=g&&(e=Math.cos(-g),f=Math.sin(-g),g=new mxPoint(a.getCenterX(),a.getCenterY()),a=mxUtils.getRotatedPoint(new mxPoint(b,c),e,f,g),b=a.x,c=a.y);return mxUtils.contains(d,b,c)}return!0},getOffset:function(a,b){for(var c=0,d=0,e=!1,f=a,g=document.body,k=document.documentElement;null!=f&&f!=g&&f!=k&&!e;){var l=mxUtils.getCurrentStyle(f);null!=l&&(e=e||"fixed"==l.position);f=f.parentNode}b||e||(e=mxUtils.getDocumentScrollOrigin(a.ownerDocument),c+=e.x,d+=e.y);e=a.getBoundingClientRect();
a.body.scrollTop);a=a.defaultView||a.parentWindow;return new mxPoint(null!=a&&void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,null!=a&&void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop)},getScrollOrigin:function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!0;for(var d=null!=a?a.ownerDocument:document,e=d.body,f=d.documentElement,g=new mxPoint,k=!1;null!=a&& null!=e&&(c+=e.left,d+=e.top);return new mxPoint(c,d)},getDocumentScrollOrigin:function(a){if(mxClient.IS_QUIRKS)return new mxPoint(a.body.scrollLeft,a.body.scrollTop);a=a.defaultView||a.parentWindow;return new mxPoint(null!=a&&void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,null!=a&&void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop)},getScrollOrigin:function(a,
a!=e&&a!=f;){isNaN(a.scrollLeft)||isNaN(a.scrollTop)||(g.x+=a.scrollLeft,g.y+=a.scrollTop);var l=mxUtils.getCurrentStyle(a);null!=l&&(k=k||"fixed"==l.position);a=b?a.parentNode:null}!k&&c&&(a=mxUtils.getDocumentScrollOrigin(d),g.x+=a.x,g.y+=a.y);return g},convertPoint:function(a,b,c){var d=mxUtils.getScrollOrigin(a,!1);a=mxUtils.getOffset(a);a.x-=d.x;a.y-=d.y;return new mxPoint(b-a.x,c-a.y)},ltrim:function(a,b){return null!=a?a.replace(new RegExp("^["+(b||"\\s")+"]+","g"),""):null},rtrim:function(a, b,c){b=null!=b?b:!1;c=null!=c?c:!0;for(var d=null!=a?a.ownerDocument:document,e=d.body,f=d.documentElement,g=new mxPoint,k=!1;null!=a&&a!=e&&a!=f;){isNaN(a.scrollLeft)||isNaN(a.scrollTop)||(g.x+=a.scrollLeft,g.y+=a.scrollTop);var l=mxUtils.getCurrentStyle(a);null!=l&&(k=k||"fixed"==l.position);a=b?a.parentNode:null}!k&&c&&(a=mxUtils.getDocumentScrollOrigin(d),g.x+=a.x,g.y+=a.y);return g},convertPoint:function(a,b,c){var d=mxUtils.getScrollOrigin(a,!1);a=mxUtils.getOffset(a);a.x-=d.x;a.y-=d.y;return new mxPoint(b-
b){return null!=a?a.replace(new RegExp("["+(b||"\\s")+"]+$","g"),""):null},trim:function(a,b){return mxUtils.ltrim(mxUtils.rtrim(a,b),b)},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)&&("string"!=typeof a||0>a.toLowerCase().indexOf("0x"))},isInteger:function(a){return String(parseInt(a))===String(a)},mod:function(a,b){return(a%b+b)%b},intersection:function(a,b,c,d,e,f,g,k){var l=(k-f)*(c-a)-(g-e)*(d-b);g=((g-e)*(b-f)-(k-f)*(a-e))/l;e=((c-a)*(b-f)-(d-b)*(a-e))/l;return 0<=g&&1>=g&& a.x,c-a.y)},ltrim:function(a,b){return null!=a?a.replace(new RegExp("^["+(b||"\\s")+"]+","g"),""):null},rtrim:function(a,b){return null!=a?a.replace(new RegExp("["+(b||"\\s")+"]+$","g"),""):null},trim:function(a,b){return mxUtils.ltrim(mxUtils.rtrim(a,b),b)},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)&&("string"!=typeof a||0>a.toLowerCase().indexOf("0x"))},isInteger:function(a){return String(parseInt(a))===String(a)},mod:function(a,b){return(a%b+b)%b},intersection:function(a,b,
0<=e&&1>=e?new mxPoint(a+g*(c-a),b+g*(d-b)):null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-e,f=d-f,a=e*c+f*d,c=0>=a?0:a*a/(c*c+d*d));e=e*e+f*f-c;0>e&&(e=0);return e},ptLineDist:function(a,b,c,d,e,f){return Math.abs((d-b)*e-(c-a)*f+c*b-d*a)/Math.sqrt((d-b)*(d-b)+(c-a)*(c-a))},relativeCcw:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;a=e*d-f*c;0==a&&(a=e*c+f*d,0<a&&(a=(e-c)*c+(f-d)*d,0>a&&(a=0)));return 0>a?-1:0<a?1:0},animateChanges:function(a,b){mxEffects.animateChanges.apply(this, c,d,e,f,g,k){var l=(k-f)*(c-a)-(g-e)*(d-b);g=((g-e)*(b-f)-(k-f)*(a-e))/l;e=((c-a)*(b-f)-(d-b)*(a-e))/l;return 0<=g&&1>=g&&0<=e&&1>=e?new mxPoint(a+g*(c-a),b+g*(d-b)):null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-e,f=d-f,a=e*c+f*d,c=0>=a?0:a*a/(c*c+d*d));e=e*e+f*f-c;0>e&&(e=0);return e},ptLineDist:function(a,b,c,d,e,f){return Math.abs((d-b)*e-(c-a)*f+c*b-d*a)/Math.sqrt((d-b)*(d-b)+(c-a)*(c-a))},relativeCcw:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;a=e*d-f*c;0==a&&
arguments)},cascadeOpacity:function(a,b,c){mxEffects.cascadeOpacity.apply(this,arguments)},fadeOut:function(a,b,c,d,e,f){mxEffects.fadeOut.apply(this,arguments)},setOpacity:function(a,b){mxUtils.isVml(a)?a.style.filter=100<=b?"":"alpha(opacity="+b/5+")":mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?a.style.filter=100<=b?"":"alpha(opacity="+b+")":a.style.opacity=b/100},createImage:function(a){var b;mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(b=document.createElement(mxClient.VML_PREFIX+ (a=e*c+f*d,0<a&&(a=(e-c)*c+(f-d)*d,0>a&&(a=0)));return 0>a?-1:0<a?1:0},animateChanges:function(a,b){mxEffects.animateChanges.apply(this,arguments)},cascadeOpacity:function(a,b,c){mxEffects.cascadeOpacity.apply(this,arguments)},fadeOut:function(a,b,c,d,e,f){mxEffects.fadeOut.apply(this,arguments)},setOpacity:function(a,b){mxUtils.isVml(a)?a.style.filter=100<=b?"":"alpha(opacity="+b/5+")":mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?a.style.filter=100<=b?"":
":image"),b.setAttribute("src",a),b.style.borderStyle="none"):(b=document.createElement("img"),b.setAttribute("src",a),b.setAttribute("border","0"));return b},sortCells:function(a,b){b=null!=b?b:!0;var c=new mxDictionary;a.sort(function(a,e){var d=c.get(a);null==d&&(d=mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR),c.put(a,d));var g=c.get(e);null==g&&(g=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,g));d=mxCellPath.compare(d,g);return 0==d?0:0<d==b?1:-1});return a},getStylename:function(a){return null!= "alpha(opacity="+b+")":a.style.opacity=b/100},createImage:function(a){var b;mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(b=document.createElement(mxClient.VML_PREFIX+":image"),b.setAttribute("src",a),b.style.borderStyle="none"):(b=document.createElement("img"),b.setAttribute("src",a),b.setAttribute("border","0"));return b},sortCells:function(a,b){b=null!=b?b:!0;var c=new mxDictionary;a.sort(function(a,e){var d=c.get(a);null==d&&(d=mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR),c.put(a,
a&&(a=a.split(";")[0],0>a.indexOf("="))?a:""},getStylenames:function(a){var b=[];if(null!=a){a=a.split(";");for(var c=0;c<a.length;c++)0>a[c].indexOf("=")&&b.push(a[c])}return b},indexOfStylename:function(a,b){if(null!=a&&null!=b)for(var c=a.split(";"),d=0,e=0;e<c.length;e++){if(c[e]==b)return d;d+=c[e].length+1}return-1},addStylename:function(a,b){0>mxUtils.indexOfStylename(a,b)&&(null==a?a="":0<a.length&&";"!=a.charAt(a.length-1)&&(a+=";"),a+=b);return a},removeStylename:function(a,b){var c=[]; d));var g=c.get(e);null==g&&(g=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,g));d=mxCellPath.compare(d,g);return 0==d?0:0<d==b?1:-1});return a},getStylename:function(a){return null!=a&&(a=a.split(";")[0],0>a.indexOf("="))?a:""},getStylenames:function(a){var b=[];if(null!=a){a=a.split(";");for(var c=0;c<a.length;c++)0>a[c].indexOf("=")&&b.push(a[c])}return b},indexOfStylename:function(a,b){if(null!=a&&null!=b)for(var c=a.split(";"),d=0,e=0;e<c.length;e++){if(c[e]==b)return d;d+=c[e].length+
if(null!=a)for(var d=a.split(";"),e=0;e<d.length;e++)d[e]!=b&&c.push(d[e]);return c.join(";")},removeAllStylenames:function(a){var b=[];if(null!=a){a=a.split(";");for(var c=0;c<a.length;c++)0<=a[c].indexOf("=")&&b.push(a[c])}return b.join(";")},setCellStyles:function(a,b,c,d){if(null!=b&&0<b.length){a.beginUpdate();try{for(var e=0;e<b.length;e++)if(null!=b[e]){var f=mxUtils.setStyle(a.getStyle(b[e]),c,d);a.setStyle(b[e],f)}}finally{a.endUpdate()}}},setStyle:function(a,b,c){var d=null!=c&&("undefined"== 1}return-1},addStylename:function(a,b){0>mxUtils.indexOfStylename(a,b)&&(null==a?a="":0<a.length&&";"!=a.charAt(a.length-1)&&(a+=";"),a+=b);return a},removeStylename:function(a,b){var c=[];if(null!=a)for(var d=a.split(";"),e=0;e<d.length;e++)d[e]!=b&&c.push(d[e]);return c.join(";")},removeAllStylenames:function(a){var b=[];if(null!=a){a=a.split(";");for(var c=0;c<a.length;c++)0<=a[c].indexOf("=")&&b.push(a[c])}return b.join(";")},setCellStyles:function(a,b,c,d){if(null!=b&&0<b.length){a.beginUpdate();
typeof c.length||0<c.length);if(null==a||0==a.length)d&&(a=b+"="+c+";");else if(a.substring(0,b.length+1)==b+"="){var e=a.indexOf(";");a=d?b+"="+c+(0>e?";":a.substring(e)):0>e||e==a.length-1?"":a.substring(e+1)}else{var f=a.indexOf(";"+b+"=");0>f?d&&(d=";"==a.charAt(a.length-1)?"":";",a=a+d+b+"="+c+";"):(e=a.indexOf(";",f+1),a=d?a.substring(0,f+1)+b+"="+c+(0>e?";":a.substring(e)):a.substring(0,f)+(0>e?";":a.substring(e)))}return a},setCellStyleFlags:function(a,b,c,d,e){if(null!=b&&0<b.length){a.beginUpdate(); try{for(var e=0;e<b.length;e++)if(null!=b[e]){var f=mxUtils.setStyle(a.getStyle(b[e]),c,d);a.setStyle(b[e],f)}}finally{a.endUpdate()}}},setStyle:function(a,b,c){var d=null!=c&&("undefined"==typeof c.length||0<c.length);if(null==a||0==a.length)d&&(a=b+"="+c+";");else if(a.substring(0,b.length+1)==b+"="){var e=a.indexOf(";");a=d?b+"="+c+(0>e?";":a.substring(e)):0>e||e==a.length-1?"":a.substring(e+1)}else{var f=a.indexOf(";"+b+"=");0>f?d&&(d=";"==a.charAt(a.length-1)?"":";",a=a+d+b+"="+c+";"):(e=a.indexOf(";",
try{for(var f=0;f<b.length;f++)if(null!=b[f]){var g=mxUtils.setStyleFlag(a.getStyle(b[f]),c,d,e);a.setStyle(b[f],g)}}finally{a.endUpdate()}}},setStyleFlag:function(a,b,c,d){if(null==a||0==a.length)a=d||null==d?b+"="+c:b+"=0";else{var e=a.indexOf(b+"=");if(0>e)e=";"==a.charAt(a.length-1)?"":";",a=d||null==d?a+e+b+"="+c:a+e+b+"=0";else{var f=a.indexOf(";",e),g;g=0>f?a.substring(e+b.length+1):a.substring(e+b.length+1,f);g=null==d?parseInt(g)^c:d?parseInt(g)|c:parseInt(g)&~c;a=a.substring(0,e)+b+"="+ f+1),a=d?a.substring(0,f+1)+b+"="+c+(0>e?";":a.substring(e)):a.substring(0,f)+(0>e?";":a.substring(e)))}return a},setCellStyleFlags:function(a,b,c,d,e){if(null!=b&&0<b.length){a.beginUpdate();try{for(var f=0;f<b.length;f++)if(null!=b[f]){var g=mxUtils.setStyleFlag(a.getStyle(b[f]),c,d,e);a.setStyle(b[f],g)}}finally{a.endUpdate()}}},setStyleFlag:function(a,b,c,d){if(null==a||0==a.length)a=d||null==d?b+"="+c:b+"=0";else{var e=a.indexOf(b+"=");if(0>e)e=";"==a.charAt(a.length-1)?"":";",a=d||null==d?a+
g+(0<=f?a.substring(f):"")}}return a},getAlignmentAsPoint:function(a,b){var c=-.5,d=-.5;a==mxConstants.ALIGN_LEFT?c=0:a==mxConstants.ALIGN_RIGHT&&(c=-1);b==mxConstants.ALIGN_TOP?d=0:b==mxConstants.ALIGN_BOTTOM&&(d=-1);return new mxPoint(c,d)},getSizeForString:function(a,b,c,d,e){b=null!=b?b:mxConstants.DEFAULT_FONTSIZE;c=null!=c?c:mxConstants.DEFAULT_FONTFAMILY;var f=document.createElement("div");f.style.fontFamily=c;f.style.fontSize=Math.round(b)+"px";f.style.lineHeight=Math.round(b*mxConstants.LINE_HEIGHT)+ e+b+"="+c:a+e+b+"=0";else{var f=a.indexOf(";",e),g;g=0>f?a.substring(e+b.length+1):a.substring(e+b.length+1,f);g=null==d?parseInt(g)^c:d?parseInt(g)|c:parseInt(g)&~c;a=a.substring(0,e)+b+"="+g+(0<=f?a.substring(f):"")}}return a},getAlignmentAsPoint:function(a,b){var c=-.5,d=-.5;a==mxConstants.ALIGN_LEFT?c=0:a==mxConstants.ALIGN_RIGHT&&(c=-1);b==mxConstants.ALIGN_TOP?d=0:b==mxConstants.ALIGN_BOTTOM&&(d=-1);return new mxPoint(c,d)},getSizeForString:function(a,b,c,d,e){b=null!=b?b:mxConstants.DEFAULT_FONTSIZE;
"px";null!=e&&((e&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(f.style.fontWeight="bold"),(e&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(f.style.fontStyle="italic"),b=[],(e&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.push("underline"),(e&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&b.push("line-through"),0<b.length&&(f.style.textDecoration=b.join(" ")));f.style.position="absolute";f.style.visibility="hidden";f.style.display=mxClient.IS_QUIRKS?"inline": c=null!=c?c:mxConstants.DEFAULT_FONTFAMILY;var f=document.createElement("div");f.style.fontFamily=c;f.style.fontSize=Math.round(b)+"px";f.style.lineHeight=Math.round(b*mxConstants.LINE_HEIGHT)+"px";null!=e&&((e&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(f.style.fontWeight="bold"),(e&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(f.style.fontStyle="italic"),b=[],(e&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.push("underline"),(e&mxConstants.FONT_STRIKETHROUGH)==mxConstants.FONT_STRIKETHROUGH&&
"inline-block";f.style.zoom="1";null!=d?(f.style.width=d+"px",f.style.whiteSpace="normal"):f.style.whiteSpace="nowrap";f.innerHTML=a;document.body.appendChild(f);a=new mxRectangle(0,0,f.offsetWidth,f.offsetHeight);document.body.removeChild(f);return a},getViewXml:function(a,b,c,d,e){d=null!=d?d:0;e=null!=e?e:0;b=null!=b?b:1;null==c&&(c=[a.getModel().getRoot()]);var f=a.getView(),g=null,k=f.isEventsEnabled();f.setEventsEnabled(!1);var l=f.drawPane,m=f.overlayPane;a.dialect==mxConstants.DIALECT_SVG? b.push("line-through"),0<b.length&&(f.style.textDecoration=b.join(" ")));f.style.position="absolute";f.style.visibility="hidden";f.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";f.style.zoom="1";null!=d?(f.style.width=d+"px",f.style.whiteSpace="normal"):f.style.whiteSpace="nowrap";f.innerHTML=a;document.body.appendChild(f);a=new mxRectangle(0,0,f.offsetWidth,f.offsetHeight);document.body.removeChild(f);return a},getViewXml:function(a,b,c,d,e){d=null!=d?d:0;e=null!=e?e:0;b=null!=b?b:1;null==
(f.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),f.canvas.appendChild(f.drawPane),f.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(f.drawPane=f.drawPane.cloneNode(!1),f.canvas.appendChild(f.drawPane),f.overlayPane=f.overlayPane.cloneNode(!1));f.canvas.appendChild(f.overlayPane);var n=f.getTranslate();f.translate=new mxPoint(d,e);b=new mxTemporaryCellStates(a.getView(),b,c);try{g=(new mxCodec).encode(a.getView())}finally{b.destroy(),f.translate=n,f.canvas.removeChild(f.drawPane), c&&(c=[a.getModel().getRoot()]);var f=a.getView(),g=null,k=f.isEventsEnabled();f.setEventsEnabled(!1);var l=f.drawPane,m=f.overlayPane;a.dialect==mxConstants.DIALECT_SVG?(f.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),f.canvas.appendChild(f.drawPane),f.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(f.drawPane=f.drawPane.cloneNode(!1),f.canvas.appendChild(f.drawPane),f.overlayPane=f.overlayPane.cloneNode(!1));f.canvas.appendChild(f.overlayPane);var n=f.getTranslate();f.translate=
f.canvas.removeChild(f.overlayPane),f.drawPane=l,f.overlayPane=m,f.setEventsEnabled(k)}return g},getScaleForPageCount:function(a,b,c,d){if(1>a)return 1;c=null!=c?c:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var e=c.width-2*d;c=c.height-2*d;d=b.getGraphBounds().clone();b=b.getView().getScale();d.width/=b;d.height/=b;b=d.width;var f=Math.sqrt(a);d=Math.sqrt(b/d.height/(e/c));c=f*d;d=f/d;if(1>c&&d>a){var g=d/a;d=a;c/=g}1>d&&c>a&&(g=c/a,c=a,d/=g);g=Math.ceil(c)*Math.ceil(d);for(f=0;g>a;){var g= new mxPoint(d,e);b=new mxTemporaryCellStates(a.getView(),b,c);try{g=(new mxCodec).encode(a.getView())}finally{b.destroy(),f.translate=n,f.canvas.removeChild(f.drawPane),f.canvas.removeChild(f.overlayPane),f.drawPane=l,f.overlayPane=m,f.setEventsEnabled(k)}return g},getScaleForPageCount:function(a,b,c,d){if(1>a)return 1;c=null!=c?c:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var e=c.width-2*d;c=c.height-2*d;d=b.getGraphBounds().clone();b=b.getView().getScale();d.width/=b;d.height/=b;b=d.width;
Math.floor(c)/c,k=Math.floor(d)/d;1==g&&(g=Math.floor(c-1)/c);1==k&&(k=Math.floor(d-1)/d);g=g>k?g:k;c*=g;d*=g;g=Math.ceil(c)*Math.ceil(d);f++;if(10<f)break}return e*c/b*.99999},show:function(a,b,c,d,e,f){c=null!=c?c:0;d=null!=d?d:0;null==b?b=window.open().document:b.open();9==document.documentMode&&b.writeln('\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=9"><![endif]--\x3e');var g=a.getGraphBounds(),k=Math.ceil(c-g.x),l=Math.ceil(d-g.y);null==e&&(e=Math.ceil(g.width+c)+Math.ceil(Math.ceil(g.x)- var f=Math.sqrt(a);d=Math.sqrt(b/d.height/(e/c));c=f*d;d=f/d;if(1>c&&d>a){var g=d/a;d=a;c/=g}1>d&&c>a&&(g=c/a,c=a,d/=g);g=Math.ceil(c)*Math.ceil(d);for(f=0;g>a;){var g=Math.floor(c)/c,k=Math.floor(d)/d;1==g&&(g=Math.floor(c-1)/c);1==k&&(k=Math.floor(d-1)/d);g=g>k?g:k;c*=g;d*=g;g=Math.ceil(c)*Math.ceil(d);f++;if(10<f)break}return e*c/b*.99999},show:function(a,b,c,d,e,f){c=null!=c?c:0;d=null!=d?d:0;null==b?b=window.open().document:b.open();9==document.documentMode&&b.writeln('\x3c!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=9"><![endif]--\x3e');
g.x));null==f&&(f=Math.ceil(g.height+d)+Math.ceil(Math.ceil(g.y)-g.y));if(mxClient.IS_IE||11==document.documentMode){d="<html><head>";g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)d+=g[c].outerHTML;d+="<style>";for(c=0;c<document.styleSheets.length;c++)try{d+=document.styleSheets[c].cssText}catch(m){}d=d+'</style></head><body style="margin:0px;">'+('<div style="position:absolute;overflow:hidden;width:'+e+"px;height:"+f+'px;"><div style="position:relative;left:'+k+"px;top:"+l+'px;">')+ var g=a.getGraphBounds(),k=Math.ceil(c-g.x),l=Math.ceil(d-g.y);null==e&&(e=Math.ceil(g.width+c)+Math.ceil(Math.ceil(g.x)-g.x));null==f&&(f=Math.ceil(g.height+d)+Math.ceil(Math.ceil(g.y)-g.y));if(mxClient.IS_IE||11==document.documentMode){d="<html><head>";g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)d+=g[c].outerHTML;d+="<style>";for(c=0;c<document.styleSheets.length;c++)try{d+=document.styleSheets[c].cssText}catch(m){}d=d+'</style></head><body style="margin:0px;">'+('<div style="position:absolute;overflow:hidden;width:'+
a.container.innerHTML;b.writeln(d+"</div></div></body><html>");b.close()}else{b.writeln("<html><head>");g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)b.writeln(mxUtils.getOuterHtml(g[c]));d=document.getElementsByTagName("link");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));d=document.getElementsByTagName("style");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));b.writeln('</head><body style="margin:0px;"></body></html>');b.close();c=b.createElement("div"); e+"px;height:"+f+'px;"><div style="position:relative;left:'+k+"px;top:"+l+'px;">')+a.container.innerHTML;b.writeln(d+"</div></div></body><html>");b.close()}else{b.writeln("<html><head>");g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)b.writeln(mxUtils.getOuterHtml(g[c]));d=document.getElementsByTagName("link");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));d=document.getElementsByTagName("style");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));b.writeln('</head><body style="margin:0px;"></body></html>');
c.position="absolute";c.overflow="hidden";c.style.width=e+"px";c.style.height=f+"px";e=b.createElement("div");e.style.position="absolute";e.style.left=k+"px";e.style.top=l+"px";f=a.container.firstChild;for(d=null;null!=f;)g=f.cloneNode(!0),f==a.view.drawPane.ownerSVGElement?(c.appendChild(g),d=g):e.appendChild(g),f=f.nextSibling;b.body.appendChild(c);null!=e.firstChild&&b.body.appendChild(e);null!=d&&(d.style.minWidth="",d.style.minHeight="",d.firstChild.setAttribute("transform","translate("+k+","+ b.close();c=b.createElement("div");c.position="absolute";c.overflow="hidden";c.style.width=e+"px";c.style.height=f+"px";e=b.createElement("div");e.style.position="absolute";e.style.left=k+"px";e.style.top=l+"px";f=a.container.firstChild;for(d=null;null!=f;)g=f.cloneNode(!0),f==a.view.drawPane.ownerSVGElement?(c.appendChild(g),d=g):e.appendChild(g),f=f.nextSibling;b.body.appendChild(c);null!=e.firstChild&&b.body.appendChild(e);null!=d&&(d.style.minWidth="",d.style.minHeight="",d.firstChild.setAttribute("transform",
l+")"))}mxUtils.removeCursors(b.body);return b},printScreen:function(a){var b=window.open();a.getGraphBounds();mxUtils.show(a,b.document);a=function(){b.focus();b.print();b.close()};mxClient.IS_GC?b.setTimeout(a,500):a()},popup:function(a,b){if(b){var c=document.createElement("div");c.style.overflow="scroll";c.style.width="636px";c.style.height="460px";var d=document.createElement("pre");d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;");c.appendChild(d);c=new mxWindow("Popup Window", "translate("+k+","+l+")"))}mxUtils.removeCursors(b.body);return b},printScreen:function(a){var b=window.open();a.getGraphBounds();mxUtils.show(a,b.document);a=function(){b.focus();b.print();b.close()};mxClient.IS_GC?b.setTimeout(a,500):a()},popup:function(a,b){if(b){var c=document.createElement("div");c.style.overflow="scroll";c.style.width="636px";c.style.height="460px";var d=document.createElement("pre");d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;");c.appendChild(d);
c,document.body.clientWidth/2-320,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)/2-240,640,480,!1,!0);c.setClosable(!0);c.setVisible(!0)}else mxClient.IS_NS?(c=window.open(),c.document.writeln("<pre>"+mxUtils.htmlEntities(a)+"</pre"),c.document.close()):(c=window.open(),d=c.document.createElement("pre"),d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),c.document.body.appendChild(d))},alert:function(a){alert(a)},prompt:function(a,b){return prompt(a, c=new mxWindow("Popup Window",c,document.body.clientWidth/2-320,Math.max(document.body.clientHeight||0,document.documentElement.clientHeight)/2-240,640,480,!1,!0);c.setClosable(!0);c.setVisible(!0)}else mxClient.IS_NS?(c=window.open(),c.document.writeln("<pre>"+mxUtils.htmlEntities(a)+"</pre"),c.document.close()):(c=window.open(),d=c.document.createElement("pre"),d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),c.document.body.appendChild(d))},alert:function(a){alert(a)},
null!=b?b:"")},confirm:function(a){return confirm(a)},error:function(a,b,c,d){var e=document.createElement("div");e.style.padding="20px";var f=document.createElement("img");f.setAttribute("src",d||mxUtils.errorImage);f.setAttribute("valign","bottom");f.style.verticalAlign="middle";e.appendChild(f);e.appendChild(document.createTextNode(" "));e.appendChild(document.createTextNode(" "));e.appendChild(document.createTextNode(" "));mxUtils.write(e,a);a=document.body.clientWidth;d=document.body.clientHeight|| prompt:function(a,b){return prompt(a,null!=b?b:"")},confirm:function(a){return confirm(a)},error:function(a,b,c,d){var e=document.createElement("div");e.style.padding="20px";var f=document.createElement("img");f.setAttribute("src",d||mxUtils.errorImage);f.setAttribute("valign","bottom");f.style.verticalAlign="middle";e.appendChild(f);e.appendChild(document.createTextNode(" "));e.appendChild(document.createTextNode(" "));e.appendChild(document.createTextNode(" "));mxUtils.write(e,a);a=document.body.clientWidth;
document.documentElement.clientHeight;var g=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,e,(a-b)/2,d/4,b,null,!1,!0);c&&(mxUtils.br(e),b=document.createElement("p"),c=document.createElement("button"),mxClient.IS_IE?c.style.cssText="float:right":c.setAttribute("style","float:right"),mxEvent.addListener(c,"click",function(a){g.destroy()}),mxUtils.write(c,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),b.appendChild(c),e.appendChild(b),mxUtils.br(e),g.setClosable(!0)); d=document.body.clientHeight||document.documentElement.clientHeight;var g=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,e,(a-b)/2,d/4,b,null,!1,!0);c&&(mxUtils.br(e),b=document.createElement("p"),c=document.createElement("button"),mxClient.IS_IE?c.style.cssText="float:right":c.setAttribute("style","float:right"),mxEvent.addListener(c,"click",function(a){g.destroy()}),mxUtils.write(c,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),b.appendChild(c),e.appendChild(b),
g.setVisible(!0);return g},makeDraggable:function(a,b,c,d,e,f,g,k,l,m){a=new mxDragSource(a,c);a.dragOffset=new mxPoint(null!=e?e:0,null!=f?f:mxConstants.TOOLTIP_VERTICAL_OFFSET);a.autoscroll=g;a.setGuidesEnabled(!1);null!=l&&(a.highlightDropTargets=l);null!=m&&(a.getDropTarget=m);a.getGraphForEvent=function(a){return"function"==typeof b?b(a):b};null!=d&&(a.createDragElement=function(){return d.cloneNode(!0)},k&&(a.createPreviewElement=function(a){var b=d.cloneNode(!0),c=parseInt(b.style.width),e= mxUtils.br(e),g.setClosable(!0));g.setVisible(!0);return g},makeDraggable:function(a,b,c,d,e,f,g,k,l,m){a=new mxDragSource(a,c);a.dragOffset=new mxPoint(null!=e?e:0,null!=f?f:mxConstants.TOOLTIP_VERTICAL_OFFSET);a.autoscroll=g;a.setGuidesEnabled(!1);null!=l&&(a.highlightDropTargets=l);null!=m&&(a.getDropTarget=m);a.getGraphForEvent=function(a){return"function"==typeof b?b(a):b};null!=d&&(a.createDragElement=function(){return d.cloneNode(!0)},k&&(a.createPreviewElement=function(a){var b=d.cloneNode(!0),
parseInt(b.style.height);b.style.width=Math.round(c*a.view.scale)+"px";b.style.height=Math.round(e*a.view.scale)+"px";return b}));return a}},mxConstants={DEFAULT_HOTSPOT:.3,MIN_HOTSPOT_SIZE:8,MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_VML:"vml",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml", c=parseInt(b.style.width),e=parseInt(b.style.height);b.style.width=Math.round(c*a.view.scale)+"px";b.style.height=Math.round(e*a.view.scale)+"px";return b}));return a}},mxConstants={DEFAULT_HOTSPOT:.3,MIN_HOTSPOT_SIZE:8,MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_VML:"vml",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml",
NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"gray",VML_SHADOWCOLOR:"gray",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",OUTLINE_HIGHLIGHT_COLOR:"#00FF00", NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"gray",VML_SHADOWCOLOR:"gray",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",OUTLINE_HIGHLIGHT_COLOR:"#00FF00",
OUTLINE_HIGHLIGHT_STROKEWIDTH:5,HIGHLIGHT_STROKEWIDTH:3,HIGHLIGHT_SIZE:2,HIGHLIGHT_OPACITY:100,CURSOR_MOVABLE_VERTEX:"move",CURSOR_MOVABLE_EDGE:"move",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", OUTLINE_HIGHLIGHT_STROKEWIDTH:5,HIGHLIGHT_STROKEWIDTH:3,HIGHLIGHT_SIZE:2,HIGHLIGHT_OPACITY:100,CURSOR_MOVABLE_VERTEX:"move",CURSOR_MOVABLE_EDGE:"move",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", 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",
@ -787,8 +787,8 @@ mxGraphModel.prototype.endUpdate=function(){this.updateLevel--;0==this.updateLev
"edit",a))}}finally{this.endingUpdate=!1}}};mxGraphModel.prototype.createUndoableEdit=function(a){var b=new mxUndoableEdit(this,null!=a?a:!0);b.notify=function(){b.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",b.changes));b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",b,"changes",b.changes))};return b}; "edit",a))}}finally{this.endingUpdate=!1}}};mxGraphModel.prototype.createUndoableEdit=function(a){var b=new mxUndoableEdit(this,null!=a?a:!0);b.notify=function(){b.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",b.changes));b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",b,"changes",b.changes))};return b};
mxGraphModel.prototype.mergeChildren=function(a,b,c){c=null!=c?c:!0;this.beginUpdate();try{var d={};this.mergeChildrenImpl(a,b,c,d);for(var e in d){var f=d[e],g=this.getTerminal(f,!0);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!0));g=this.getTerminal(f,!1);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!1))}}finally{this.endUpdate()}}; mxGraphModel.prototype.mergeChildren=function(a,b,c){c=null!=c?c:!0;this.beginUpdate();try{var d={};this.mergeChildrenImpl(a,b,c,d);for(var e in d){var f=d[e],g=this.getTerminal(f,!0);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!0));g=this.getTerminal(f,!1);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!1))}}finally{this.endUpdate()}};
mxGraphModel.prototype.mergeChildrenImpl=function(a,b,c,d){this.beginUpdate();try{for(var e=a.getChildCount(),f=0;f<e;f++){var g=a.getChildAt(f);if("function"==typeof g.getId){var k=g.getId(),l=null==k||this.isEdge(g)&&c?null:this.getCell(k);if(null==l){var m=g.clone();m.setId(k);m.setTerminal(g.getTerminal(!0),!0);m.setTerminal(g.getTerminal(!1),!1);l=b.insert(m);this.cellAdded(l)}d[mxCellPath.create(g)]=l;this.mergeChildrenImpl(g,l,c,d)}}}finally{this.endUpdate()}}; mxGraphModel.prototype.mergeChildrenImpl=function(a,b,c,d){this.beginUpdate();try{for(var e=a.getChildCount(),f=0;f<e;f++){var g=a.getChildAt(f);if("function"==typeof g.getId){var k=g.getId(),l=null==k||this.isEdge(g)&&c?null:this.getCell(k);if(null==l){var m=g.clone();m.setId(k);m.setTerminal(g.getTerminal(!0),!0);m.setTerminal(g.getTerminal(!1),!1);l=b.insert(m);this.cellAdded(l)}d[mxCellPath.create(g)]=l;this.mergeChildrenImpl(g,l,c,d)}}}finally{this.endUpdate()}};
mxGraphModel.prototype.getParents=function(a){var b=[];if(null!=a)for(var c=new mxDictionary,d=0;d<a.length;d++){var e=this.getParent(a[d]);null==e||c.get(e)||(c.put(e,!0),b.push(e))}return b};mxGraphModel.prototype.cloneCell=function(a){return null!=a?this.cloneCells([a],!0)[0]:null}; mxGraphModel.prototype.getParents=function(a){var b=[];if(null!=a)for(var c=new mxDictionary,d=0;d<a.length;d++){var e=this.getParent(a[d]);null==e||c.get(e)||(c.put(e,!0),b.push(e))}return b};mxGraphModel.prototype.cloneCell=function(a,b){return null!=a?this.cloneCells([a],b)[0]:null};
mxGraphModel.prototype.cloneCells=function(a,b,c){c=null!=c?c:{};for(var d=[],e=0;e<a.length;e++)null!=a[e]?d.push(this.cloneCellImpl(a[e],c,b)):d.push(null);for(e=0;e<d.length;e++)null!=d[e]&&this.restoreClone(d[e],a[e],c);return d};mxGraphModel.prototype.cloneCellImpl=function(a,b,c){var d=mxObjectIdentity.get(a),e=b[d];if(null==e&&(e=this.cellCloned(a),b[d]=e,c))for(c=this.getChildCount(a),d=0;d<c;d++){var f=this.cloneCellImpl(this.getChildAt(a,d),b,!0);e.insert(f)}return e}; mxGraphModel.prototype.cloneCells=function(a,b,c){b=null!=b?b:!0;c=null!=c?c:{};for(var d=[],e=0;e<a.length;e++)null!=a[e]?d.push(this.cloneCellImpl(a[e],c,b)):d.push(null);for(e=0;e<d.length;e++)null!=d[e]&&this.restoreClone(d[e],a[e],c);return d};mxGraphModel.prototype.cloneCellImpl=function(a,b,c){var d=mxObjectIdentity.get(a),e=b[d];if(null==e&&(e=this.cellCloned(a),b[d]=e,c))for(c=this.getChildCount(a),d=0;d<c;d++){var f=this.cloneCellImpl(this.getChildAt(a,d),b,!0);e.insert(f)}return e};
mxGraphModel.prototype.cellCloned=function(a){return a.clone()};mxGraphModel.prototype.restoreClone=function(a,b,c){var d=this.getTerminal(b,!0);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!0));d=this.getTerminal(b,!1);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!1));for(var d=this.getChildCount(a),e=0;e<d;e++)this.restoreClone(this.getChildAt(a,e),this.getChildAt(b,e),c)};function mxRootChange(a,b){this.model=a;this.previous=this.root=b} mxGraphModel.prototype.cellCloned=function(a){return a.clone()};mxGraphModel.prototype.restoreClone=function(a,b,c){var d=this.getTerminal(b,!0);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!0));d=this.getTerminal(b,!1);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!1));for(var d=this.getChildCount(a),e=0;e<d;e++)this.restoreClone(this.getChildAt(a,e),this.getChildAt(b,e),c)};function mxRootChange(a,b){this.model=a;this.previous=this.root=b}
mxRootChange.prototype.execute=function(){this.root=this.previous;this.previous=this.model.rootChanged(this.previous)};function mxChildChange(a,b,c,d){this.model=a;this.previous=this.parent=b;this.child=c;this.previousIndex=this.index=d} mxRootChange.prototype.execute=function(){this.root=this.previous;this.previous=this.model.rootChanged(this.previous)};function mxChildChange(a,b,c,d){this.model=a;this.previous=this.parent=b;this.child=c;this.previousIndex=this.index=d}
mxChildChange.prototype.execute=function(){if(null!=this.child){var a=this.model.getParent(this.child),b=null!=a?a.getIndex(this.child):0;null==this.previous&&this.connect(this.child,!1);a=this.model.parentForCellChanged(this.child,this.previous,this.previousIndex);null!=this.previous&&this.connect(this.child,!0);this.parent=this.previous;this.previous=a;this.index=this.previousIndex;this.previousIndex=b}}; mxChildChange.prototype.execute=function(){if(null!=this.child){var a=this.model.getParent(this.child),b=null!=a?a.getIndex(this.child):0;null==this.previous&&this.connect(this.child,!1);a=this.model.parentForCellChanged(this.child,this.previous,this.previousIndex);null!=this.previous&&this.connect(this.child,!0);this.parent=this.previous;this.previous=a;this.index=this.previousIndex;this.previousIndex=b}};
@ -1158,8 +1158,8 @@ mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getD
a,"includeEdges",b))}finally{this.model.endUpdate()}return a}; a,"includeEdges",b))}finally{this.model.endUpdate()}return a};
mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++){for(var f=this.getAllEdges([a[e]]),g=mxUtils.bind(this,function(d,f){var g=this.model.getGeometry(d);if(null!=g){for(var k=this.model.getTerminal(d,f),l=!1,m=k;null!=m;){if(a[e]==m){l=!0;break}m=this.model.getParent(m)}l&&(g=g.clone(),l=this.view.getState(d),null!=l&&null!=l.absolutePoints? mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d=new mxDictionary,e=0;e<a.length;e++)d.put(a[e],!0);for(e=0;e<a.length;e++){for(var f=this.getAllEdges([a[e]]),g=mxUtils.bind(this,function(d,f){var g=this.model.getGeometry(d);if(null!=g){for(var k=this.model.getTerminal(d,f),l=!1,m=k;null!=m;){if(a[e]==m){l=!0;break}m=this.model.getParent(m)}l&&(g=g.clone(),l=this.view.getState(d),null!=l&&null!=l.absolutePoints?
(k=l.absolutePoints,m=f?0:k.length-1,g.setTerminalPoint(new mxPoint(k[m].x/b-c.x-l.origin.x,k[m].y/b-c.y-l.origin.y),f)):(k=this.view.getState(k),null!=k&&g.setTerminalPoint(new mxPoint(k.getCenterX()/b-c.x,k.getCenterY()/b-c.y),f)),this.model.setGeometry(d,g),this.model.setTerminal(d,null,f))}}),k=0;k<f.length;k++)d.get(f[k])||(d.put(f[k],!0),g(f[k],!0),g(f[k],!1));this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}}; (k=l.absolutePoints,m=f?0:k.length-1,g.setTerminalPoint(new mxPoint(k[m].x/b-c.x-l.origin.x,k[m].y/b-c.y-l.origin.y),f)):(k=this.view.getState(k),null!=k&&g.setTerminalPoint(new mxPoint(k.getCenterX()/b-c.x,k.getCenterY()/b-c.y),f)),this.model.setGeometry(d,g),this.model.setTerminal(d,null,f))}}),k=0;k<f.length;k++)d.get(f[k])||(d.put(f[k],!0),g(f[k],!0),g(f[k],!1));this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}};
mxGraph.prototype.splitEdge=function(a,b,c,d,e){d=d||0;e=e||0;var f=this.model.getParent(a),g=this.model.getTerminal(a,!0);this.model.beginUpdate();try{if(null==c){c=this.cloneCell(a);var k=this.view.getState(a),l=this.getCellGeometry(c);if(null!=l&&null!=l.points&&null!=k){var m=this.view.translate,n=this.view.scale,p=mxUtils.findNearestSegment(k,(d+m.x)*n,(e+m.y)*n);l.points=l.points.slice(0,p);l=this.getCellGeometry(a);null!=l&&null!=l.points&&(l=l.clone(),l.points=l.points.slice(p),this.model.setGeometry(a, mxGraph.prototype.splitEdge=function(a,b,c,d,e,f,g,k){d=d||0;e=e||0;k=null!=k?k:this.model.getParent(a);f=this.model.getTerminal(a,!0);this.model.beginUpdate();try{if(null==c){c=this.cloneCell(a);var l=this.view.getState(a),m=this.getCellGeometry(c);if(null!=m&&null!=m.points&&null!=l){var n=this.view.translate,p=this.view.scale,q=mxUtils.findNearestSegment(l,(d+n.x)*p,(e+n.y)*p);m.points=m.points.slice(0,q);m=this.getCellGeometry(a);null!=m&&null!=m.points&&(m=m.clone(),m.points=m.points.slice(q),
l))}}this.cellsMoved(b,d,e,!1,!1);this.cellsAdded(b,f,this.model.getChildCount(f),null,null,!0);this.cellsAdded([c],f,this.model.getChildCount(f),g,b[0],!1);this.cellConnected(a,b[0],!0);this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",a,"cells",b,"newEdge",c,"dx",d,"dy",e))}finally{this.model.endUpdate()}return c}; this.model.setGeometry(a,m))}}this.cellsMoved(b,d,e,!1,!1);this.cellsAdded(b,k,this.model.getChildCount(k),null,null,!0);this.cellsAdded([c],k,this.model.getChildCount(k),f,b[0],!1);this.cellConnected(a,b[0],!0);this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",a,"cells",b,"newEdge",c,"dx",d,"dy",e))}finally{this.model.endUpdate()}return c};
mxGraph.prototype.toggleCells=function(a,b,c){null==b&&(b=this.getSelectionCells());c&&(b=this.addAllEdges(b));this.model.beginUpdate();try{this.cellsToggled(b,a),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",a,"cells",b,"includeEdges",c))}finally{this.model.endUpdate()}return b};mxGraph.prototype.cellsToggled=function(a,b){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}}}; mxGraph.prototype.toggleCells=function(a,b,c){null==b&&(b=this.getSelectionCells());c&&(b=this.addAllEdges(b));this.model.beginUpdate();try{this.cellsToggled(b,a),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",a,"cells",b,"includeEdges",c))}finally{this.model.endUpdate()}return b};mxGraph.prototype.cellsToggled=function(a,b){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}}};
mxGraph.prototype.foldCells=function(a,b,c,d,e){b=null!=b?b:!1;null==c&&(c=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing(!1);this.model.beginUpdate();try{this.cellsFolded(c,a,b,d),this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,"collapse",a,"recurse",b,"cells",c))}finally{this.model.endUpdate()}return c}; mxGraph.prototype.foldCells=function(a,b,c,d,e){b=null!=b?b:!1;null==c&&(c=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing(!1);this.model.beginUpdate();try{this.cellsFolded(c,a,b,d),this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,"collapse",a,"recurse",b,"cells",c))}finally{this.model.endUpdate()}return c};
mxGraph.prototype.cellsFolded=function(a,b,c,d){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)if((!d||this.isCellFoldable(a[e],b))&&b!=this.isCellCollapsed(a[e])){this.model.setCollapsed(a[e],b);this.swapBounds(a[e],b);this.isExtendParent(a[e])&&this.extendParent(a[e]);if(c){var f=this.model.getChildren(a[e]);this.cellsFolded(f,b,c)}this.constrainChild(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,"cells",a,"collapse",b,"recurse",c))}finally{this.model.endUpdate()}}}; mxGraph.prototype.cellsFolded=function(a,b,c,d){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)if((!d||this.isCellFoldable(a[e],b))&&b!=this.isCellCollapsed(a[e])){this.model.setCollapsed(a[e],b);this.swapBounds(a[e],b);this.isExtendParent(a[e])&&this.extendParent(a[e]);if(c){var f=this.model.getChildren(a[e]);this.cellsFolded(f,b,c)}this.constrainChild(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,"cells",a,"collapse",b,"recurse",c))}finally{this.model.endUpdate()}}};
@ -1247,17 +1247,18 @@ mxGraph.prototype.setHtmlLabels=function(a){this.htmlLabels=a};mxGraph.prototype
mxGraph.prototype.getTooltip=function(a,b,c,d){var e=null;null!=a&&(null==a.control||b!=a.control.node&&b.parentNode!=a.control.node||(e=this.collapseExpandResource,e=mxUtils.htmlEntities(mxResources.get(e)||e).replace(/\\n/g,"<br>")),null==e&&null!=a.overlays&&a.overlays.visit(function(a,c){null!=e||b!=c.node&&b.parentNode!=c.node||(e=c.overlay.toString())}),null==e&&(c=this.selectionCellsHandler.getHandler(a.cell),null!=c&&"function"==typeof c.getTooltipForNode&&(e=c.getTooltipForNode(b))),null== mxGraph.prototype.getTooltip=function(a,b,c,d){var e=null;null!=a&&(null==a.control||b!=a.control.node&&b.parentNode!=a.control.node||(e=this.collapseExpandResource,e=mxUtils.htmlEntities(mxResources.get(e)||e).replace(/\\n/g,"<br>")),null==e&&null!=a.overlays&&a.overlays.visit(function(a,c){null!=e||b!=c.node&&b.parentNode!=c.node||(e=c.overlay.toString())}),null==e&&(c=this.selectionCellsHandler.getHandler(a.cell),null!=c&&"function"==typeof c.getTooltipForNode&&(e=c.getTooltipForNode(b))),null==
e&&(e=this.getTooltipForCell(a.cell)));return e};mxGraph.prototype.getTooltipForCell=function(a){return null!=a&&null!=a.getTooltip?a.getTooltip():this.convertValueToString(a)};mxGraph.prototype.getLinkForCell=function(a){return null};mxGraph.prototype.getCursorForMouseEvent=function(a){return this.getCursorForCell(a.getCell())};mxGraph.prototype.getCursorForCell=function(a){return null}; e&&(e=this.getTooltipForCell(a.cell)));return e};mxGraph.prototype.getTooltipForCell=function(a){return null!=a&&null!=a.getTooltip?a.getTooltip():this.convertValueToString(a)};mxGraph.prototype.getLinkForCell=function(a){return null};mxGraph.prototype.getCursorForMouseEvent=function(a){return this.getCursorForCell(a.getCell())};mxGraph.prototype.getCursorForCell=function(a){return null};
mxGraph.prototype.getStartSize=function(a,b){var c=new mxRectangle,d=this.getCurrentCellStyle(a,b),e=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));mxUtils.getValue(d,mxConstants.STYLE_HORIZONTAL,!0)?c.height=e:c.width=e;return c}; mxGraph.prototype.getStartSize=function(a,b){var c=new mxRectangle,d=this.getCurrentCellStyle(a,b),e=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE));mxUtils.getValue(d,mxConstants.STYLE_HORIZONTAL,!0)?c.height=e:c.width=e;return c};
mxGraph.prototype.getActualStartSize=function(a,b){var c=new mxRectangle;if(this.isSwimlane(a)){var d=this.getCurrentCellStyle(a,b),e=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),f=1==mxUtils.getValue(d,mxConstants.STYLE_FLIPH,0),g=1==mxUtils.getValue(d,mxConstants.STYLE_FLIPV,0),k=0;mxUtils.getValue(d,mxConstants.STYLE_HORIZONTAL,!0)||k++;d=mxUtils.getValue(d,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST);d==mxConstants.DIRECTION_NORTH?k++:d==mxConstants.DIRECTION_WEST? mxGraph.prototype.getSwimlaneDirection=function(a){var b=mxUtils.getValue(a,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST),c=1==mxUtils.getValue(a,mxConstants.STYLE_FLIPH,0),d=1==mxUtils.getValue(a,mxConstants.STYLE_FLIPV,0);a=mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)?0:3;b==mxConstants.DIRECTION_NORTH?a--:b==mxConstants.DIRECTION_WEST?a+=2:b==mxConstants.DIRECTION_SOUTH&&(a+=1);b=mxUtils.mod(a,2);c&&1==b&&(a+=2);d&&0==b&&(a+=2);return[mxConstants.DIRECTION_NORTH,mxConstants.DIRECTION_EAST,
k+=2:d==mxConstants.DIRECTION_SOUTH&&(k+=3);k=mxUtils.mod(k,4);0==k?c.y=e:1==k?c.x=e:2==k?c.height=e:3==k&&(c.width=e);g&&(e=c.y,c.y=c.height,c.height=e);f&&(e=c.x,c.x=c.width,c.width=e)}return c};mxGraph.prototype.getImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_IMAGE]:null}; mxConstants.DIRECTION_SOUTH,mxConstants.DIRECTION_WEST][mxUtils.mod(a,4)]};mxGraph.prototype.getActualStartSize=function(a,b){var c=new mxRectangle;if(this.isSwimlane(a)){var d=this.getCurrentCellStyle(a,b),e=parseInt(mxUtils.getValue(d,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),d=this.getSwimlaneDirection(d);d==mxConstants.DIRECTION_NORTH?c.y=e:d==mxConstants.DIRECTION_WEST?c.x=e:d==mxConstants.DIRECTION_SOUTH?c.height=e:c.width=e}return c};
mxGraph.prototype.isTransparentState=function(a){var b=!1;if(null!=a)var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE),b=b==mxConstants.NONE&&c==mxConstants.NONE&&null==this.getImage(a);return b};mxGraph.prototype.getVerticalAlign=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null}; mxGraph.prototype.getImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_IMAGE]:null};mxGraph.prototype.isTransparentState=function(a){var b=!1;if(null!=a)var b=mxUtils.getValue(a.style,mxConstants.STYLE_STROKECOLOR,mxConstants.NONE),c=mxUtils.getValue(a.style,mxConstants.STYLE_FILLCOLOR,mxConstants.NONE),b=b==mxConstants.NONE&&c==mxConstants.NONE&&null==this.getImage(a);return b};
mxGraph.prototype.getIndicatorColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_COLOR]:null};mxGraph.prototype.getIndicatorGradientColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null};mxGraph.prototype.getIndicatorShape=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_SHAPE]:null}; mxGraph.prototype.getVerticalAlign=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null};mxGraph.prototype.getIndicatorColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_COLOR]:null};mxGraph.prototype.getIndicatorGradientColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null};
mxGraph.prototype.getIndicatorImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_IMAGE]:null};mxGraph.prototype.getBorder=function(){return this.border};mxGraph.prototype.setBorder=function(a){this.border=a};mxGraph.prototype.isSwimlane=function(a){return null==a||this.model.getParent(a)==this.model.getRoot()||this.model.isEdge(a)?!1:this.getCurrentCellStyle(a)[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE};mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer}; mxGraph.prototype.getIndicatorShape=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_SHAPE]:null};mxGraph.prototype.getIndicatorImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_IMAGE]:null};mxGraph.prototype.getBorder=function(){return this.border};mxGraph.prototype.setBorder=function(a){this.border=a};
mxGraph.prototype.setResizeContainer=function(a){this.resizeContainer=a};mxGraph.prototype.isEnabled=function(){return this.enabled};mxGraph.prototype.setEnabled=function(a){this.enabled=a};mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled};mxGraph.prototype.setEscapeEnabled=function(a){this.escapeEnabled=a};mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing}; mxGraph.prototype.isSwimlane=function(a){return null==a||this.model.getParent(a)==this.model.getRoot()||this.model.isEdge(a)?!1:this.getCurrentCellStyle(a)[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE};mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer};mxGraph.prototype.setResizeContainer=function(a){this.resizeContainer=a};mxGraph.prototype.isEnabled=function(){return this.enabled};mxGraph.prototype.setEnabled=function(a){this.enabled=a};
mxGraph.prototype.setInvokesStopCellEditing=function(a){this.invokesStopCellEditing=a};mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing};mxGraph.prototype.setEnterStopsCellEditing=function(a){this.enterStopsCellEditing=a};mxGraph.prototype.isCellLocked=function(a){var b=this.model.getGeometry(a);return this.isCellsLocked()||null!=b&&this.model.isVertex(a)&&b.relative};mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked}; mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled};mxGraph.prototype.setEscapeEnabled=function(a){this.escapeEnabled=a};mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing};mxGraph.prototype.setInvokesStopCellEditing=function(a){this.invokesStopCellEditing=a};mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing};mxGraph.prototype.setEnterStopsCellEditing=function(a){this.enterStopsCellEditing=a};
mxGraph.prototype.setCellsLocked=function(a){this.cellsLocked=a};mxGraph.prototype.getCloneableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellCloneable(a)}))};mxGraph.prototype.isCellCloneable=function(a){a=this.getCurrentCellStyle(a);return this.isCellsCloneable()&&0!=a[mxConstants.STYLE_CLONEABLE]};mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable};mxGraph.prototype.setCellsCloneable=function(a){this.cellsCloneable=a}; mxGraph.prototype.isCellLocked=function(a){var b=this.model.getGeometry(a);return this.isCellsLocked()||null!=b&&this.model.isVertex(a)&&b.relative};mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked};mxGraph.prototype.setCellsLocked=function(a){this.cellsLocked=a};mxGraph.prototype.getCloneableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellCloneable(a)}))};
mxGraph.prototype.getExportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canExportCell(a)}))};mxGraph.prototype.canExportCell=function(a){return this.exportEnabled};mxGraph.prototype.getImportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canImportCell(a)}))};mxGraph.prototype.canImportCell=function(a){return this.importEnabled};mxGraph.prototype.isCellSelectable=function(a){return this.isCellsSelectable()}; mxGraph.prototype.isCellCloneable=function(a){a=this.getCurrentCellStyle(a);return this.isCellsCloneable()&&0!=a[mxConstants.STYLE_CLONEABLE]};mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable};mxGraph.prototype.setCellsCloneable=function(a){this.cellsCloneable=a};mxGraph.prototype.getExportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canExportCell(a)}))};mxGraph.prototype.canExportCell=function(a){return this.exportEnabled};
mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable};mxGraph.prototype.setCellsSelectable=function(a){this.cellsSelectable=a};mxGraph.prototype.getDeletableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellDeletable(a)}))};mxGraph.prototype.isCellDeletable=function(a){a=this.getCurrentCellStyle(a);return this.isCellsDeletable()&&0!=a[mxConstants.STYLE_DELETABLE]};mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable}; mxGraph.prototype.getImportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canImportCell(a)}))};mxGraph.prototype.canImportCell=function(a){return this.importEnabled};mxGraph.prototype.isCellSelectable=function(a){return this.isCellsSelectable()};mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable};mxGraph.prototype.setCellsSelectable=function(a){this.cellsSelectable=a};
mxGraph.prototype.setCellsDeletable=function(a){this.cellsDeletable=a};mxGraph.prototype.isLabelMovable=function(a){return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&this.vertexLabelsMovable)};mxGraph.prototype.isCellRotatable=function(a){return 0!=this.getCurrentCellStyle(a)[mxConstants.STYLE_ROTATABLE]};mxGraph.prototype.getMovableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellMovable(a)}))}; mxGraph.prototype.getDeletableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellDeletable(a)}))};mxGraph.prototype.isCellDeletable=function(a){a=this.getCurrentCellStyle(a);return this.isCellsDeletable()&&0!=a[mxConstants.STYLE_DELETABLE]};mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable};mxGraph.prototype.setCellsDeletable=function(a){this.cellsDeletable=a};
mxGraph.prototype.isLabelMovable=function(a){return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&this.vertexLabelsMovable)};mxGraph.prototype.isCellRotatable=function(a){return 0!=this.getCurrentCellStyle(a)[mxConstants.STYLE_ROTATABLE]};mxGraph.prototype.getMovableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellMovable(a)}))};
mxGraph.prototype.isCellMovable=function(a){var b=this.getCurrentCellStyle(a);return this.isCellsMovable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_MOVABLE]};mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable};mxGraph.prototype.setCellsMovable=function(a){this.cellsMovable=a};mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled};mxGraph.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled}; mxGraph.prototype.isCellMovable=function(a){var b=this.getCurrentCellStyle(a);return this.isCellsMovable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_MOVABLE]};mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable};mxGraph.prototype.setCellsMovable=function(a){this.cellsMovable=a};mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled};mxGraph.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled};
mxGraph.prototype.setPortsEnabled=function(a){this.portsEnabled=a};mxGraph.prototype.getGridSize=function(){return this.gridSize};mxGraph.prototype.setGridSize=function(a){this.gridSize=a};mxGraph.prototype.getTolerance=function(){return this.tolerance};mxGraph.prototype.setTolerance=function(a){this.tolerance=a};mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable};mxGraph.prototype.setVertexLabelsMovable=function(a){this.vertexLabelsMovable=a}; mxGraph.prototype.setPortsEnabled=function(a){this.portsEnabled=a};mxGraph.prototype.getGridSize=function(){return this.gridSize};mxGraph.prototype.setGridSize=function(a){this.gridSize=a};mxGraph.prototype.getTolerance=function(){return this.tolerance};mxGraph.prototype.setTolerance=function(a){this.tolerance=a};mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable};mxGraph.prototype.setVertexLabelsMovable=function(a){this.vertexLabelsMovable=a};
mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable};mxGraph.prototype.setEdgeLabelsMovable=function(a){this.edgeLabelsMovable=a};mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting};mxGraph.prototype.setSwimlaneNesting=function(a){this.swimlaneNesting=a};mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled};mxGraph.prototype.setSwimlaneSelectionEnabled=function(a){this.swimlaneSelectionEnabled=a}; mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable};mxGraph.prototype.setEdgeLabelsMovable=function(a){this.edgeLabelsMovable=a};mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting};mxGraph.prototype.setSwimlaneNesting=function(a){this.swimlaneNesting=a};mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled};mxGraph.prototype.setSwimlaneSelectionEnabled=function(a){this.swimlaneSelectionEnabled=a};
@ -1386,8 +1387,9 @@ mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandle
mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a}; mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};
mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b){var c=this.graph.model.getParent(a);if(b){var d=this.graph.getCellGeometry(a);return!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(c)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isSwimlane(c))}return!this.graph.isCellSelected(c)}; mxGraphHandler.prototype.isPropagateSelectionCell=function(a,b){var c=this.graph.model.getParent(a);if(b){var d=this.graph.getCellGeometry(a);return!this.graph.model.isEdge(a)&&!this.graph.model.isEdge(c)&&!this.graph.isSiblingSelected(a)&&(null==d||d.relative||!this.graph.isSwimlane(c))}return!this.graph.isCellSelected(c)};
mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=a.getState();if(!this.graph.isToggleEvent(a.getEvent())&&null!=b&&!this.graph.isCellSelected(b.cell)){a=this.graph.model;for(var c=this.graph.view.getState(a.getParent(b.cell));null!=c&&!this.graph.isCellSelected(c.cell)&&(a.isVertex(c.cell)||a.isEdge(c.cell))&&this.isPropagateSelectionCell(b.cell,!0);)b=c,c=this.graph.view.getState(this.graph.getModel().getParent(b.cell))}return null!=b?b.cell:null}; mxGraphHandler.prototype.getInitialCellForEvent=function(a){var b=a.getState();if(!this.graph.isToggleEvent(a.getEvent())&&null!=b&&!this.graph.isCellSelected(b.cell)){a=this.graph.model;for(var c=this.graph.view.getState(a.getParent(b.cell));null!=c&&!this.graph.isCellSelected(c.cell)&&(a.isVertex(c.cell)||a.isEdge(c.cell))&&this.isPropagateSelectionCell(b.cell,!0);)b=c,c=this.graph.view.getState(this.graph.getModel().getParent(b.cell))}return null!=b?b.cell:null};
mxGraphHandler.prototype.isDelayedSelection=function(a,b){if(!this.graph.isToggleEvent(b.getEvent()))for(;null!=a;){if(this.graph.selectionCellsHandler.isHandled(a))return this.graph.cellEditor.getEditingCell()!=a;a=this.graph.model.getParent(a)}return!1}; mxGraphHandler.prototype.isDelayedSelection=function(a,b){if(!this.graph.isToggleEvent(b.getEvent()))for(;null!=a;){if(this.graph.selectionCellsHandler.isHandled(a))return this.graph.cellEditor.getEditingCell()!=a;a=this.graph.model.getParent(a)}return this.graph.isToggleEvent(b.getEvent())};
mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(null!=c){if(!a.isSource(c.control))for(var c=this.graph.getModel(),d=c.getParent(b);null!=this.graph.view.getState(d)&&(c.isVertex(d)||c.isEdge(d))&&this.isPropagateSelectionCell(b,!1);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}}};mxGraphHandler.prototype.consumeMouseEvent=function(a,b){b.consume()}; mxGraphHandler.prototype.selectDelayed=function(a){if(!this.graph.popupMenuHandler.isPopupTrigger(a)){var b=a.getCell();null==b&&(b=this.cell);var c=this.graph.view.getState(b);if(null!=c){if(!a.isSource(c.control)&&!this.graph.isToggleEvent(a.getEvent()))for(var c=this.graph.getModel(),d=c.getParent(b);null!=this.graph.view.getState(d)&&(c.isVertex(d)||c.isEdge(d))&&this.isPropagateSelectionCell(b,!1);)b=d,d=c.getParent(b);this.graph.selectCellForEvent(b,a.getEvent())}}};
mxGraphHandler.prototype.consumeMouseEvent=function(a,b){b.consume()};
mxGraphHandler.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()&&!mxEvent.isMultiTouchEvent(b.getEvent())){var c=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(c,b);this.cell=null;this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(c,b.getEvent());if(this.isMoveEnabled()){var d=this.graph.model,e=d.getGeometry(c);this.graph.isCellMovable(c)&&(!d.isEdge(c)||1<this.graph.getSelectionCount()|| mxGraphHandler.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()&&!mxEvent.isMultiTouchEvent(b.getEvent())){var c=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(c,b);this.cell=null;this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(c,b.getEvent());if(this.isMoveEnabled()){var d=this.graph.model,e=d.getGeometry(c);this.graph.isCellMovable(c)&&(!d.isEdge(c)||1<this.graph.getSelectionCount()||
null!=e.points&&0<e.points.length||null==d.getTerminal(c,!0)||null==d.getTerminal(c,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(b.getEvent())&&this.graph.isCellsCloneable())?this.start(c,b.getX(),b.getY()):this.delayedSelection&&(this.cell=c);this.cellWasClicked=!0;this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b)}}}; null!=e.points&&0<e.points.length||null==d.getTerminal(c,!0)||null==d.getTerminal(c,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(b.getEvent())&&this.graph.isCellsCloneable())?this.start(c,b.getX(),b.getY()):this.delayedSelection&&(this.cell=c);this.cellWasClicked=!0;this.consumeMouseEvent(mxEvent.MOUSE_DOWN,b)}}};
mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(a){return null!=this.graph.view.getState(a)&&b.isVertex(a)&&null!=b.getGeometry(a)&&!b.getGeometry(a).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())}; mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(a){return null!=this.graph.view.getState(a)&&b.isVertex(a)&&null!=b.getGeometry(a)&&!b.getGeometry(a).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
@ -1414,7 +1416,7 @@ mxGraphHandler.prototype.suspend=function(){this.suspended||(this.livePreviewUse
mxGraphHandler.prototype.resetLivePreview=function(){null!=this.allCells&&(this.allCells.visit(mxUtils.bind(this,function(a,b){null!=b.shape&&null!=b.shape.originalPointerEvents&&(b.shape.pointerEvents=b.shape.originalPointerEvents,b.shape.originalPointerEvents=null,b.shape.bounds=null,null!=b.text&&(b.text.pointerEvents=b.text.originalPointerEvents,b.text.originalPointerEvents=null));null!=b.control&&null!=b.control.node&&"hidden"==b.control.node.style.visibility&&(b.control.node.style.visibility= mxGraphHandler.prototype.resetLivePreview=function(){null!=this.allCells&&(this.allCells.visit(mxUtils.bind(this,function(a,b){null!=b.shape&&null!=b.shape.originalPointerEvents&&(b.shape.pointerEvents=b.shape.originalPointerEvents,b.shape.originalPointerEvents=null,b.shape.bounds=null,null!=b.text&&(b.text.pointerEvents=b.text.originalPointerEvents,b.text.originalPointerEvents=null));null!=b.control&&null!=b.control.node&&"hidden"==b.control.node.style.visibility&&(b.control.node.style.visibility=
"");b.view.invalidate(b.cell)})),this.graph.view.validate())};mxGraphHandler.prototype.setHandlesVisibleForCells=function(a,b){if(this.handlesVisible!=b){this.handlesVisible=b;for(var c=0;c<a.length;c++){var d=this.graph.selectionCellsHandler.getHandler(a[c]);null!=d&&(d.setHandlesVisible(b),b&&d.redraw())}}};mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)}; "");b.view.invalidate(b.cell)})),this.graph.view.validate())};mxGraphHandler.prototype.setHandlesVisibleForCells=function(a,b){if(this.handlesVisible!=b){this.handlesVisible=b;for(var c=0;c<a.length;c++){var d=this.graph.selectionCellsHandler.getHandler(a[c]);null!=d&&(d.setHandlesVisible(b),b&&d.redraw())}}};mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)};
mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed())if(this.livePreviewUsed&&this.resetLivePreview(),null==this.cell||null==this.first||null==this.shape&&!this.livePreviewUsed||null==this.currentDx||null==this.currentDy)this.isSelectEnabled()&&this.delayedSelection&&null!=this.cell&&this.selectDelayed(b);else{var c=this.graph,d=b.getCell();if(this.connectOnDrop&&null==this.target&&null!=d&&c.getModel().isVertex(d)&&c.isCellConnectable(d)&&c.isEdgeValid(null,this.cell,d))c.connectionHandler.connect(this.cell, mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed())if(this.livePreviewUsed&&this.resetLivePreview(),null==this.cell||null==this.first||null==this.shape&&!this.livePreviewUsed||null==this.currentDx||null==this.currentDy)this.isSelectEnabled()&&this.delayedSelection&&null!=this.cell&&this.selectDelayed(b);else{var c=this.graph,d=b.getCell();if(this.connectOnDrop&&null==this.target&&null!=d&&c.getModel().isVertex(d)&&c.isCellConnectable(d)&&c.isEdgeValid(null,this.cell,d))c.connectionHandler.connect(this.cell,
d,b.getEvent());else{var d=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),e=c.getView().scale,f=this.roundLength(this.currentDx/e),e=this.roundLength(this.currentDy/e),g=this.target;c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,e):this.moveCells(this.cells,f,e,d,this.target,b.getEvent())}}this.cellWasClicked&&this.consumeMouseEvent(mxEvent.MOUSE_UP,b);this.reset()}; d,b.getEvent());else{var d=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),e=c.getView().scale,f=this.roundLength(this.currentDx/e),e=this.roundLength(this.currentDy/e),g=this.target;c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,e,b.getGraphX(),b.getGraphY()):this.moveCells(this.cells,f,e,d,this.target,b.getEvent())}}this.cellWasClicked&&this.consumeMouseEvent(mxEvent.MOUSE_UP,b);this.reset()};
mxGraphHandler.prototype.reset=function(){this.livePreviewUsed&&(this.resetLivePreview(),this.setHandlesVisibleForCells(this.graph.selectionCellsHandler.getHandledSelectionCells(),!0));this.destroyShapes();this.removeHint();this.delayedSelection=!1;this.livePreviewUsed=this.livePreviewActive=null;this.cellWasClicked=!1;this.cellCount=this.currentDy=this.currentDx=this.suspended=null;this.cloning=!1;this.cell=this.cells=this.first=this.target=this.guides=this.pBounds=this.allCells=null}; mxGraphHandler.prototype.reset=function(){this.livePreviewUsed&&(this.resetLivePreview(),this.setHandlesVisibleForCells(this.graph.selectionCellsHandler.getHandledSelectionCells(),!0));this.destroyShapes();this.removeHint();this.delayedSelection=!1;this.livePreviewUsed=this.livePreviewActive=null;this.cellWasClicked=!1;this.cellCount=this.currentDy=this.currentDx=this.suspended=null;this.cloning=!1;this.cell=this.cells=this.first=this.target=this.guides=this.pBounds=this.allCells=null};
mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return!mxUtils.contains(a,c.x,c.y)}return!1}; mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)&&(a=this.graph.getView().getState(a),null!=a)){c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return!mxUtils.contains(a,c.x,c.y)}return!1};
mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));var g=this.graph.getModel().getParent(this.cell);null==e&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(g,a,f)&&(e=this.graph.getDefaultParent());d=d&&!this.graph.isCellLocked(e||this.graph.getDefaultParent());this.graph.getModel().beginUpdate();try{g=[];if(!d&&null!=e&&this.removeEmptyParents){for(var k=new mxDictionary,l=0;l<a.length;l++)k.put(a[l],!0);for(l=0;l<a.length;l++){var m= mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));var g=this.graph.getModel().getParent(this.cell);null==e&&this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(g,a,f)&&(e=this.graph.getDefaultParent());d=d&&!this.graph.isCellLocked(e||this.graph.getDefaultParent());this.graph.getModel().beginUpdate();try{g=[];if(!d&&null!=e&&this.removeEmptyParents){for(var k=new mxDictionary,l=0;l<a.length;l++)k.put(a[l],!0);for(l=0;l<a.length;l++){var m=
@ -1543,7 +1545,7 @@ mxRubberband.prototype.reset=function(){if(null!=this.div)if(mxClient.IS_SVG&&(!
this.currentX=0;this.div=this.first=null};mxRubberband.prototype.update=function(a,b){this.currentX=a;this.currentY=b;this.repaint()}; this.currentX=0;this.div=this.first=null};mxRubberband.prototype.update=function(a,b){this.currentX=a;this.currentY=b;this.repaint()};
mxRubberband.prototype.repaint=function(){if(null!=this.div){var a=this.currentX-this.graph.panDx,b=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,a);this.y=Math.min(this.first.y,b);this.width=Math.max(this.first.x,a)-this.x;this.height=Math.max(this.first.y,b)-this.y;a=mxClient.IS_VML?this.graph.panDy:0;this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px";this.div.style.top=this.y+a+"px";this.div.style.width=Math.max(1,this.width)+"px";this.div.style.height=Math.max(1, mxRubberband.prototype.repaint=function(){if(null!=this.div){var a=this.currentX-this.graph.panDx,b=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,a);this.y=Math.min(this.first.y,b);this.width=Math.max(this.first.x,a)-this.x;this.height=Math.max(this.first.y,b)-this.y;a=mxClient.IS_VML?this.graph.panDy:0;this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px";this.div.style.top=this.y+a+"px";this.div.style.width=Math.max(1,this.width)+"px";this.div.style.height=Math.max(1,
this.height)+"px"}};mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))};function mxHandle(a,b,c,d){this.graph=a.view.graph;this.state=a;this.cursor=null!=b?b:this.cursor;this.image=null!=c?c:this.image;this.shape=null!=d?d:null;this.init()}mxHandle.prototype.cursor="default"; this.height)+"px"}};mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))};function mxHandle(a,b,c,d){this.graph=a.view.graph;this.state=a;this.cursor=null!=b?b:this.cursor;this.image=null!=c?c:this.image;this.shape=null!=d?d:null;this.init()}mxHandle.prototype.cursor="default";
mxHandle.prototype.image=null;mxHandle.prototype.ignoreGrid=!1;mxHandle.prototype.getPosition=function(a){};mxHandle.prototype.setPosition=function(a,b,c){};mxHandle.prototype.execute=function(){};mxHandle.prototype.copyStyle=function(a){this.graph.setCellStyles(a,this.state.style[a],[this.state.cell])}; mxHandle.prototype.image=null;mxHandle.prototype.ignoreGrid=!1;mxHandle.prototype.getPosition=function(a){};mxHandle.prototype.setPosition=function(a,b,c){};mxHandle.prototype.execute=function(a){};mxHandle.prototype.copyStyle=function(a){this.graph.setCellStyles(a,this.state.style[a],[this.state.cell])};
mxHandle.prototype.processEvent=function(a){var b=this.graph.view.scale,c=this.graph.view.translate,c=new mxPoint(a.getGraphX()/b-c.x,a.getGraphY()/b-c.y);null!=this.shape&&null!=this.shape.bounds&&(c.x-=this.shape.bounds.width/b/4,c.y-=this.shape.bounds.height/b/4);var b=-mxUtils.toRadians(this.getRotation()),d=-mxUtils.toRadians(this.getTotalRotation())-b,c=this.flipPoint(this.rotatePoint(this.snapPoint(this.rotatePoint(c,b),this.ignoreGrid||!this.graph.isGridEnabledEvent(a.getEvent())),d));this.setPosition(this.state.getPaintBounds(), mxHandle.prototype.processEvent=function(a){var b=this.graph.view.scale,c=this.graph.view.translate,c=new mxPoint(a.getGraphX()/b-c.x,a.getGraphY()/b-c.y);null!=this.shape&&null!=this.shape.bounds&&(c.x-=this.shape.bounds.width/b/4,c.y-=this.shape.bounds.height/b/4);var b=-mxUtils.toRadians(this.getRotation()),d=-mxUtils.toRadians(this.getTotalRotation())-b,c=this.flipPoint(this.rotatePoint(this.snapPoint(this.rotatePoint(c,b),this.ignoreGrid||!this.graph.isGridEnabledEvent(a.getEvent())),d));this.setPosition(this.state.getPaintBounds(),
c,a);this.positionChanged();this.redraw()};mxHandle.prototype.positionChanged=function(){null!=this.state.text&&this.state.text.apply(this.state);null!=this.state.shape&&this.state.shape.apply(this.state);this.graph.cellRenderer.redraw(this.state,!0)};mxHandle.prototype.getRotation=function(){return null!=this.state.shape?this.state.shape.getRotation():0};mxHandle.prototype.getTotalRotation=function(){return null!=this.state.shape?this.state.shape.getShapeRotation():0}; c,a);this.positionChanged();this.redraw()};mxHandle.prototype.positionChanged=function(){null!=this.state.text&&this.state.text.apply(this.state);null!=this.state.shape&&this.state.shape.apply(this.state);this.graph.cellRenderer.redraw(this.state,!0)};mxHandle.prototype.getRotation=function(){return null!=this.state.shape?this.state.shape.getRotation():0};mxHandle.prototype.getTotalRotation=function(){return null!=this.state.shape?this.state.shape.getShapeRotation():0};
mxHandle.prototype.init=function(){var a=this.isHtmlRequired();null!=this.image?(this.shape=new mxImageShape(new mxRectangle(0,0,this.image.width,this.image.height),this.image.src),this.shape.preserveImageAspect=!1):null==this.shape&&(this.shape=this.createShape(a));this.initShape(a)};mxHandle.prototype.createShape=function(a){a=new mxRectangle(0,0,mxConstants.HANDLE_SIZE,mxConstants.HANDLE_SIZE);return new mxRectangleShape(a,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)}; mxHandle.prototype.init=function(){var a=this.isHtmlRequired();null!=this.image?(this.shape=new mxImageShape(new mxRectangle(0,0,this.image.width,this.image.height),this.image.src),this.shape.preserveImageAspect=!1):null==this.shape&&(this.shape=this.createShape(a));this.initShape(a)};mxHandle.prototype.createShape=function(a){a=new mxRectangle(0,0,mxConstants.HANDLE_SIZE,mxConstants.HANDLE_SIZE);return new mxRectangleShape(a,mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
@ -1578,8 +1580,9 @@ c==mxEvent.ROTATION_HANDLE&&(b=this.getRotationHandlePosition(),a=b.x-this.state
null!=this.customHandles&&this.customHandles[mxEvent.CUSTOM_HANDLE-c].setVisible(!0),c=this.graph.getEdges(this.state.cell),this.edgeHandlers=[],a=0;a<c.length;a++)b=this.graph.selectionCellsHandler.getHandler(c[a]),null!=b&&this.edgeHandlers.push(b)}};mxVertexHandler.prototype.setHandlesVisible=function(a){if(null!=this.sizers)for(var b=0;b<this.sizers.length;b++)this.sizers[b].node.style.display=a?"":"none";if(null!=this.customHandles)for(b=0;b<this.customHandles.length;b++)this.customHandles[b].setVisible(a)}; null!=this.customHandles&&this.customHandles[mxEvent.CUSTOM_HANDLE-c].setVisible(!0),c=this.graph.getEdges(this.state.cell),this.edgeHandlers=[],a=0;a<c.length;a++)b=this.graph.selectionCellsHandler.getHandler(c[a]),null!=b&&this.edgeHandlers.push(b)}};mxVertexHandler.prototype.setHandlesVisible=function(a){if(null!=this.sizers)for(var b=0;b<this.sizers.length;b++)this.sizers[b].node.style.display=a?"":"none";if(null!=this.customHandles)for(b=0;b<this.customHandles.length;b++)this.customHandles[b].setVisible(a)};
mxVertexHandler.prototype.hideSizers=function(){this.setHandlesVisible(!1)};mxVertexHandler.prototype.checkTolerance=function(a){this.inTolerance&&null!=this.startX&&null!=this.startY&&(mxEvent.isMouseEvent(a.getEvent())||Math.abs(a.getGraphX()-this.startX)>this.graph.tolerance||Math.abs(a.getGraphY()-this.startY)>this.graph.tolerance)&&(this.inTolerance=!1)};mxVertexHandler.prototype.updateHint=function(a){};mxVertexHandler.prototype.removeHint=function(){}; mxVertexHandler.prototype.hideSizers=function(){this.setHandlesVisible(!1)};mxVertexHandler.prototype.checkTolerance=function(a){this.inTolerance&&null!=this.startX&&null!=this.startY&&(mxEvent.isMouseEvent(a.getEvent())||Math.abs(a.getGraphX()-this.startX)>this.graph.tolerance||Math.abs(a.getGraphY()-this.startY)>this.graph.tolerance)&&(this.inTolerance=!1)};mxVertexHandler.prototype.updateHint=function(a){};mxVertexHandler.prototype.removeHint=function(){};
mxVertexHandler.prototype.roundAngle=function(a){return Math.round(10*a)/10};mxVertexHandler.prototype.roundLength=function(a){return Math.round(100*a)/100}; mxVertexHandler.prototype.roundAngle=function(a){return Math.round(10*a)/10};mxVertexHandler.prototype.roundLength=function(a){return Math.round(100*a)/100};
mxVertexHandler.prototype.mouseMove=function(a,b){b.isConsumed()||null==this.index?this.graph.isMouseDown||null==this.getHandleForEvent(b)||b.consume(!1):(this.checkTolerance(b),this.inTolerance||(this.index<=mxEvent.CUSTOM_HANDLE?null!=this.customHandles&&(this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].processEvent(b),this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].active=!0):this.index==mxEvent.LABEL_HANDLE?this.moveLabel(b):this.index==mxEvent.ROTATION_HANDLE?this.rotateVertex(b):(this.resizeVertex(b), mxVertexHandler.prototype.mouseMove=function(a,b){b.isConsumed()||null==this.index?this.graph.isMouseDown||null==this.getHandleForEvent(b)||b.consume(!1):(this.checkTolerance(b),this.inTolerance||(this.index<=mxEvent.CUSTOM_HANDLE?null!=this.customHandles&&(this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].processEvent(b),this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].active=!0,this.isMoveCustomHandlePreviewToFront(this.customHandles[mxEvent.CUSTOM_HANDLE-this.index])&&this.moveToFront()):
this.updateHint(b))),b.consume())};mxVertexHandler.prototype.moveLabel=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.graph.view.translate,d=this.graph.view.scale;this.graph.isGridEnabledEvent(a.getEvent())&&(b.x=(this.graph.snap(b.x/d-c.x)+c.x)*d,b.y=(this.graph.snap(b.y/d-c.y)+c.y)*d);this.moveSizerTo(this.sizers[null!=this.rotationShape?this.sizers.length-2:this.sizers.length-1],b.x,b.y)}; this.index==mxEvent.LABEL_HANDLE?this.moveLabel(b):this.index==mxEvent.ROTATION_HANDLE?this.rotateVertex(b):(this.resizeVertex(b),this.updateHint(b))),b.consume())};mxVertexHandler.prototype.isMoveCustomHandlePreviewToFront=function(a){return!1};
mxVertexHandler.prototype.moveLabel=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.graph.view.translate,d=this.graph.view.scale;this.graph.isGridEnabledEvent(a.getEvent())&&(b.x=(this.graph.snap(b.x/d-c.x)+c.x)*d,b.y=(this.graph.snap(b.y/d-c.y)+c.y)*d);this.moveSizerTo(this.sizers[null!=this.rotationShape?this.sizers.length-2:this.sizers.length-1],b.x,b.y)};
mxVertexHandler.prototype.rotateVertex=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.state.x+this.state.width/2-b.x,d=this.state.y+this.state.height/2-b.y;this.currentAlpha=0!=c?180*Math.atan(d/c)/Math.PI+90:0>d?180:0;0<c&&(this.currentAlpha-=180);this.currentAlpha-=this.startAngle;this.rotationRaster&&this.graph.isGridEnabledEvent(a.getEvent())?(c=b.x-this.state.getCenterX(),d=b.y-this.state.getCenterY(),a=Math.sqrt(c*c+d*d),raster=2>a-this.startDist?15:25>a-this.startDist?5: mxVertexHandler.prototype.rotateVertex=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.state.x+this.state.width/2-b.x,d=this.state.y+this.state.height/2-b.y;this.currentAlpha=0!=c?180*Math.atan(d/c)/Math.PI+90:0>d?180:0;0<c&&(this.currentAlpha-=180);this.currentAlpha-=this.startAngle;this.rotationRaster&&this.graph.isGridEnabledEvent(a.getEvent())?(c=b.x-this.state.getCenterX(),d=b.y-this.state.getCenterY(),a=Math.sqrt(c*c+d*d),raster=2>a-this.startDist?15:25>a-this.startDist?5:
1,this.currentAlpha=Math.round(this.currentAlpha/raster)*raster):this.currentAlpha=this.roundAngle(this.currentAlpha);this.selectionBorder.rotation=this.currentAlpha;this.selectionBorder.redraw();this.livePreviewActive&&this.redrawHandles()}; 1,this.currentAlpha=Math.round(this.currentAlpha/raster)*raster):this.currentAlpha=this.roundAngle(this.currentAlpha);this.selectionBorder.rotation=this.currentAlpha;this.selectionBorder.redraw();this.livePreviewActive&&this.redrawHandles()};
mxVertexHandler.prototype.resizeVertex=function(a){var b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),d=new mxPoint(a.getGraphX(),a.getGraphY()),e=this.graph.view.translate,f=this.graph.view.scale,g=Math.cos(-c),k=Math.sin(-c),l=d.x-this.startX,m=d.y-this.startY,d=k*l+g*m,l=g*l-k*m,m=d,g=this.graph.getCellGeometry(this.state.cell);this.unscaledBounds=this.union(g,l/f,m/f,this.index,this.graph.isGridEnabledEvent(a.getEvent()), mxVertexHandler.prototype.resizeVertex=function(a){var b=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),c=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),d=new mxPoint(a.getGraphX(),a.getGraphY()),e=this.graph.view.translate,f=this.graph.view.scale,g=Math.cos(-c),k=Math.sin(-c),l=d.x-this.startX,m=d.y-this.startY,d=k*l+g*m,l=g*l-k*m,m=d,g=this.graph.getCellGeometry(this.state.cell);this.unscaledBounds=this.union(g,l/f,m/f,this.index,this.graph.isGridEnabledEvent(a.getEvent()),
@ -1589,11 +1592,11 @@ k.y+k.height&&(this.unscaledBounds.height-=this.unscaledBounds.y+this.unscaledBo
k=Math.sin(c);c=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY());l=c.x-b.x;m=c.y-b.y;b=g*l-k*m-l;c=k*l+g*m-m;l=this.bounds.x-this.state.x;m=this.bounds.y-this.state.y;e=g*l-k*m;g=k*l+g*m;this.bounds.x+=b;this.bounds.y+=c;this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+b/f);this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+c/f);this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width);this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height); k=Math.sin(c);c=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY());l=c.x-b.x;m=c.y-b.y;b=g*l-k*m-l;c=k*l+g*m-m;l=this.bounds.x-this.state.x;m=this.bounds.y-this.state.y;e=g*l-k*m;g=k*l+g*m;this.bounds.x+=b;this.bounds.y+=c;this.unscaledBounds.x=this.roundLength(this.unscaledBounds.x+b/f);this.unscaledBounds.y=this.roundLength(this.unscaledBounds.y+c/f);this.unscaledBounds.width=this.roundLength(this.unscaledBounds.width);this.unscaledBounds.height=this.roundLength(this.unscaledBounds.height);
this.graph.isCellCollapsed(this.state.cell)||0==b&&0==c?this.childOffsetY=this.childOffsetX=0:(this.childOffsetX=this.state.x-this.bounds.x+e,this.childOffsetY=this.state.y-this.bounds.y+g);d.equals(this.bounds)||(this.livePreviewActive&&this.updateLivePreview(a),null!=this.preview?this.drawPreview():this.updateParentHighlight())}; this.graph.isCellCollapsed(this.state.cell)||0==b&&0==c?this.childOffsetY=this.childOffsetX=0:(this.childOffsetX=this.state.x-this.bounds.x+e,this.childOffsetY=this.state.y-this.bounds.y+g);d.equals(this.bounds)||(this.livePreviewActive&&this.updateLivePreview(a),null!=this.preview?this.drawPreview():this.updateParentHighlight())};
mxVertexHandler.prototype.updateLivePreview=function(a){var b=this.graph.view.scale,c=this.graph.view.translate;a=this.state.clone();this.state.x=this.bounds.x;this.state.y=this.bounds.y;this.state.origin=new mxPoint(this.state.x/b-c.x,this.state.y/b-c.y);this.state.width=this.bounds.width;this.state.height=this.bounds.height;b=this.state.absoluteOffset;new mxPoint(b.x,b.y);this.state.absoluteOffset.x=0;this.state.absoluteOffset.y=0;b=this.graph.getCellGeometry(this.state.cell);null!=b&&(c=b.offset|| mxVertexHandler.prototype.updateLivePreview=function(a){var b=this.graph.view.scale,c=this.graph.view.translate;a=this.state.clone();this.state.x=this.bounds.x;this.state.y=this.bounds.y;this.state.origin=new mxPoint(this.state.x/b-c.x,this.state.y/b-c.y);this.state.width=this.bounds.width;this.state.height=this.bounds.height;b=this.state.absoluteOffset;new mxPoint(b.x,b.y);this.state.absoluteOffset.x=0;this.state.absoluteOffset.y=0;b=this.graph.getCellGeometry(this.state.cell);null!=b&&(c=b.offset||
this.EMPTY_POINT,null==c||b.relative||(this.state.absoluteOffset.x=this.state.view.scale*c.x,this.state.absoluteOffset.y=this.state.view.scale*c.y),this.state.view.updateVertexLabelOffset(this.state));this.state.view.graph.cellRenderer.redraw(this.state,!0);this.state.view.invalidate(this.state.cell);this.state.invalid=!1;this.state.view.validate();this.redrawHandles();if(null!=this.state.text&&null!=this.state.text.node&&null!=this.state.text.node.nextSibling||null!=this.state.shape&&null!=this.state.shape.node&& this.EMPTY_POINT,null==c||b.relative||(this.state.absoluteOffset.x=this.state.view.scale*c.x,this.state.absoluteOffset.y=this.state.view.scale*c.y),this.state.view.updateVertexLabelOffset(this.state));this.state.view.graph.cellRenderer.redraw(this.state,!0);this.state.view.invalidate(this.state.cell);this.state.invalid=!1;this.state.view.validate();this.redrawHandles();this.moveToFront();null!=this.state.control&&null!=this.state.control.node&&(this.state.control.node.style.visibility="hidden");this.state.setState(a)};
null!=this.state.shape.node.nextSibling&&(null==this.state.text||this.state.shape.node.nextSibling!=this.state.text.node))null!=this.state.shape&&null!=this.state.shape.node&&this.state.shape.node.parentNode.appendChild(this.state.shape.node),null!=this.state.text&&null!=this.state.text.node&&this.state.text.node.parentNode.appendChild(this.state.text.node);null!=this.state.control&&null!=this.state.control.node&&(this.state.control.node.style.visibility="hidden");this.state.setState(a)}; mxVertexHandler.prototype.moveToFront=function(){if(null!=this.state.text&&null!=this.state.text.node&&null!=this.state.text.node.nextSibling||null!=this.state.shape&&null!=this.state.shape.node&&null!=this.state.shape.node.nextSibling&&(null==this.state.text||this.state.shape.node.nextSibling!=this.state.text.node))null!=this.state.shape&&null!=this.state.shape.node&&this.state.shape.node.parentNode.appendChild(this.state.shape.node),null!=this.state.text&&null!=this.state.text.node&&this.state.text.node.parentNode.appendChild(this.state.text.node)};
mxVertexHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.state){var c=new mxPoint(b.getGraphX(),b.getGraphY()),d=this.index;this.index=null;this.graph.getModel().beginUpdate();try{if(d<=mxEvent.CUSTOM_HANDLE)null!=this.customHandles&&(this.customHandles[mxEvent.CUSTOM_HANDLE-d].active=!1,this.customHandles[mxEvent.CUSTOM_HANDLE-d].execute());else if(d==mxEvent.ROTATION_HANDLE)if(null!=this.currentAlpha){var e=this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]|| mxVertexHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.state){var c=new mxPoint(b.getGraphX(),b.getGraphY()),d=this.index;this.index=null;this.state.view.invalidate(this.state.cell,!1,!1);this.state.view.validate();this.graph.getModel().beginUpdate();try{if(d<=mxEvent.CUSTOM_HANDLE)null!=this.customHandles&&(this.customHandles[mxEvent.CUSTOM_HANDLE-d].active=!1,this.customHandles[mxEvent.CUSTOM_HANDLE-d].execute(b));else if(d==mxEvent.ROTATION_HANDLE)if(null!=this.currentAlpha){var e=
0);0!=e&&this.rotateCell(this.state.cell,e)}else this.rotateClick();else{var f=this.graph.isGridEnabledEvent(b.getEvent()),g=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),k=Math.cos(-g),l=Math.sin(-g),m=c.x-this.startX,n=c.y-this.startY,c=l*m+k*n,m=k*m-l*n,n=c,p=this.graph.view.scale,q=this.isRecursiveResize(this.state,b);this.resizeCell(this.state.cell,this.roundLength(m/p),this.roundLength(n/p),d,f,this.isConstrainedEvent(b),q)}}finally{this.graph.getModel().endUpdate()}b.consume(); this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0);0!=e&&this.rotateCell(this.state.cell,e)}else this.rotateClick();else{var f=this.graph.isGridEnabledEvent(b.getEvent()),g=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),k=Math.cos(-g),l=Math.sin(-g),m=c.x-this.startX,n=c.y-this.startY,c=l*m+k*n,m=k*m-l*n,n=c,p=this.graph.view.scale,q=this.isRecursiveResize(this.state,b);this.resizeCell(this.state.cell,this.roundLength(m/p),this.roundLength(n/p),d,f,this.isConstrainedEvent(b),
this.reset()}};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveResize(this.state)};mxVertexHandler.prototype.rotateClick=function(){}; q)}}finally{this.graph.getModel().endUpdate()}b.consume();this.reset()}};mxVertexHandler.prototype.isRecursiveResize=function(a,b){return this.graph.isRecursiveResize(this.state)};mxVertexHandler.prototype.rotateClick=function(){};
mxVertexHandler.prototype.rotateCell=function(a,b,c){if(0!=b){var d=this.graph.getModel();if(d.isVertex(a)||d.isEdge(a)){if(!d.isEdge(a)){var e=(this.graph.getCurrentCellStyle(a)[mxConstants.STYLE_ROTATION]||0)+b;this.graph.setCellStyles(mxConstants.STYLE_ROTATION,e,[a])}e=this.graph.getCellGeometry(a);if(null!=e){var f=this.graph.getCellGeometry(c);null==f||d.isEdge(c)||(e=e.clone(),e.rotate(b,new mxPoint(f.width/2,f.height/2)),d.setGeometry(a,e));if(d.isVertex(a)&&!e.relative||d.isEdge(a))for(c= mxVertexHandler.prototype.rotateCell=function(a,b,c){if(0!=b){var d=this.graph.getModel();if(d.isVertex(a)||d.isEdge(a)){if(!d.isEdge(a)){var e=(this.graph.getCurrentCellStyle(a)[mxConstants.STYLE_ROTATION]||0)+b;this.graph.setCellStyles(mxConstants.STYLE_ROTATION,e,[a])}e=this.graph.getCellGeometry(a);if(null!=e){var f=this.graph.getCellGeometry(c);null==f||d.isEdge(c)||(e=e.clone(),e.rotate(b,new mxPoint(f.width/2,f.height/2)),d.setGeometry(a,e));if(d.isVertex(a)&&!e.relative||d.isEdge(a))for(c=
d.getChildCount(a),e=0;e<c;e++)this.rotateCell(d.getChildAt(a,e),b,a)}}}}; d.getChildCount(a),e=0;e<c;e++)this.rotateCell(d.getChildAt(a,e),b,a)}}}};
mxVertexHandler.prototype.reset=function(){null!=this.sizers&&null!=this.index&&null!=this.sizers[this.index]&&"none"==this.sizers[this.index].node.style.display&&(this.sizers[this.index].node.style.display="");this.index=this.inTolerance=this.currentAlpha=null;null!=this.preview&&(this.preview.destroy(),this.preview=null);if(this.livePreviewActive&&null!=this.sizers){for(var a=0;a<this.sizers.length;a++)null!=this.sizers[a]&&(this.sizers[a].node.style.display="");null!=this.state.control&&null!= mxVertexHandler.prototype.reset=function(){null!=this.sizers&&null!=this.index&&null!=this.sizers[this.index]&&"none"==this.sizers[this.index].node.style.display&&(this.sizers[this.index].node.style.display="");this.index=this.inTolerance=this.currentAlpha=null;null!=this.preview&&(this.preview.destroy(),this.preview=null);if(this.livePreviewActive&&null!=this.sizers){for(var a=0;a<this.sizers.length;a++)null!=this.sizers[a]&&(this.sizers[a].node.style.display="");null!=this.state.control&&null!=
@ -1669,7 +1672,7 @@ this.customHandles&&this.customHandles[mxEvent.CUSTOM_HANDLE-this.index].process
else if(this.outlineConnect){var d=this.isSource||this.isTarget?this.isOutlineConnectEvent(b):!1;d?c=this.marker.highlight.state:null!=c&&c!=b.getState()&&this.graph.isCellConnectable(b.getCell())&&null!=this.marker.highlight.shape&&(this.marker.highlight.shape.stroke="transparent",this.marker.highlight.repaint(),c=null)}null==c||this.isCellEnabled(c.cell)||(c=null,this.marker.reset());var e=this.clonePreviewState(this.currentPoint,null!=c?c.cell:null);this.updatePreviewState(e,this.currentPoint, else if(this.outlineConnect){var d=this.isSource||this.isTarget?this.isOutlineConnectEvent(b):!1;d?c=this.marker.highlight.state:null!=c&&c!=b.getState()&&this.graph.isCellConnectable(b.getCell())&&null!=this.marker.highlight.shape&&(this.marker.highlight.shape.stroke="transparent",this.marker.highlight.repaint(),c=null)}null==c||this.isCellEnabled(c.cell)||(c=null,this.marker.reset());var e=this.clonePreviewState(this.currentPoint,null!=c?c.cell:null);this.updatePreviewState(e,this.currentPoint,
c,b,d);this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor);this.abspoints=e.absolutePoints;this.active=!0;this.updateHint(b,this.currentPoint)}this.drawPreview();mxEvent.consume(b.getEvent());b.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(b)&&b.consume(!1)}; c,b,d);this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor);this.abspoints=e.absolutePoints;this.active=!0;this.updateHint(b,this.currentPoint)}this.drawPreview();mxEvent.consume(b.getEvent());b.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(b)&&b.consume(!1)};
mxEdgeHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.state.cell,d=this.index;this.index=null;if(b.getX()!=this.startX||b.getY()!=this.startY){var e=!this.graph.isIgnoreTerminalEvent(b.getEvent())&&this.graph.isCloneEvent(b.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable();if(null!=this.error)0<this.error.length&&this.graph.validationAlert(this.error);else if(d<=mxEvent.CUSTOM_HANDLE&&d>mxEvent.VIRTUAL_HANDLE){if(null!=this.customHandles){var f= mxEdgeHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.state.cell,d=this.index;this.index=null;if(b.getX()!=this.startX||b.getY()!=this.startY){var e=!this.graph.isIgnoreTerminalEvent(b.getEvent())&&this.graph.isCloneEvent(b.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable();if(null!=this.error)0<this.error.length&&this.graph.validationAlert(this.error);else if(d<=mxEvent.CUSTOM_HANDLE&&d>mxEvent.VIRTUAL_HANDLE){if(null!=this.customHandles){var f=
this.graph.getModel();f.beginUpdate();try{this.customHandles[mxEvent.CUSTOM_HANDLE-d].execute()}finally{f.endUpdate()}}}else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget)if(d=null,null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell),null==d&&this.marker.hasValidState()&&null!=this.marker.highlight&&null!=this.marker.highlight.shape&&"transparent"!=this.marker.highlight.shape.stroke&& this.graph.getModel();f.beginUpdate();try{this.customHandles[mxEvent.CUSTOM_HANDLE-d].execute(b)}finally{f.endUpdate()}}}else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget)if(d=null,null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell),null==d&&this.marker.hasValidState()&&null!=this.marker.highlight&&null!=this.marker.highlight.shape&&"transparent"!=this.marker.highlight.shape.stroke&&
"white"!=this.marker.highlight.shape.stroke&&(d=this.marker.validState.cell),null!=d){var f=this.graph.getModel(),g=f.getParent(c);f.beginUpdate();try{if(e){var k=f.getGeometry(c),e=this.graph.cloneCell(c);f.add(g,e,f.getChildCount(g));null!=k&&(k=k.clone(),f.setGeometry(e,k));var l=f.getTerminal(c,!this.isSource);this.graph.connectCell(e,l,!this.isSource);c=e}c=this.connect(c,d,this.isSource,e,b)}finally{f.endUpdate()}}else this.graph.isAllowDanglingEdges()&&(f=this.abspoints[this.isSource?0:this.abspoints.length- "white"!=this.marker.highlight.shape.stroke&&(d=this.marker.validState.cell),null!=d){var f=this.graph.getModel(),g=f.getParent(c);f.beginUpdate();try{if(e){var k=f.getGeometry(c),e=this.graph.cloneCell(c);f.add(g,e,f.getChildCount(g));null!=k&&(k=k.clone(),f.setGeometry(e,k));var l=f.getTerminal(c,!this.isSource);this.graph.connectCell(e,l,!this.isSource);c=e}c=this.connect(c,d,this.isSource,e,b)}finally{f.endUpdate()}}else this.graph.isAllowDanglingEdges()&&(f=this.abspoints[this.isSource?0:this.abspoints.length-
1],f.x=this.roundLength(f.x/this.graph.view.scale-this.graph.view.translate.x),f.y=this.roundLength(f.y/this.graph.view.scale-this.graph.view.translate.y),k=this.graph.getView().getState(this.graph.getModel().getParent(c)),null!=k&&(f.x-=k.origin.x,f.y-=k.origin.y),f.x-=this.graph.panDx/this.graph.view.scale,f.y-=this.graph.panDy/this.graph.view.scale,c=this.changeTerminalPoint(c,f,this.isSource,e));else this.active?c=this.changePoints(c,this.points,e):(this.graph.getView().invalidate(this.state.cell), 1],f.x=this.roundLength(f.x/this.graph.view.scale-this.graph.view.translate.x),f.y=this.roundLength(f.y/this.graph.view.scale-this.graph.view.translate.y),k=this.graph.getView().getState(this.graph.getModel().getParent(c)),null!=k&&(f.x-=k.origin.x,f.y-=k.origin.y),f.x-=this.graph.panDx/this.graph.view.scale,f.y-=this.graph.panDy/this.graph.view.scale,c=this.changeTerminalPoint(c,f,this.isSource,e));else this.active?c=this.changePoints(c,this.points,e):(this.graph.getView().invalidate(this.state.cell),
this.graph.getView().validate(this.state.cell))}else this.graph.isToggleEvent(b.getEvent())&&this.graph.selectCellForEvent(this.state.cell,b.getEvent());null!=this.marker&&(this.reset(),c!=this.state.cell&&this.graph.setSelectionCell(c));b.consume()}}; this.graph.getView().validate(this.state.cell))}else this.graph.isToggleEvent(b.getEvent())&&this.graph.selectCellForEvent(this.state.cell,b.getEvent());null!=this.marker&&(this.reset(),c!=this.state.cell&&this.graph.setSelectionCell(c));b.consume()}};

View file

@ -37,6 +37,17 @@ async function handleRequest(request) {
} }
else else
{ {
if (path.startsWith('/label') || path.startsWith('/rest') || path.startsWith('/login.action'))
{
// blah
}
else
{
let msg = encodeURIComponent('redirect-worker-404-' + requestURL);
let url = 'https://log.diagrams.net/' + msg;
fetch(url);
}
let lastSlash = path.lastIndexOf('/'); let lastSlash = path.lastIndexOf('/');
if (lastSlash >= 0) if (lastSlash >= 0)
@ -50,8 +61,10 @@ async function handleRequest(request) {
} }
} }
} while (!done) } while (!done)
} }
// If not in the map, return 404 // If not in the map, return 404
return new Response('NOT_FOUND', { status: 404 }); return new Response('NOT_FOUND', { status: 404 });
} }
@ -135,7 +148,23 @@ const redirectMap = new Map([
['/features/training-material/', 'https://drawio-app.com/tutorials/'], ['/features/training-material/', 'https://drawio-app.com/tutorials/'],
['/terms-conditions/', 'https://seibert-media.com/general-terms/'], ['/terms-conditions/', 'https://seibert-media.com/general-terms/'],
['/support/', 'https://github.com/jgraph/drawio/wiki/Getting-Support'], ['/support/', 'https://github.com/jgraph/drawio/wiki/Getting-Support'],
['/', 'https://www.diagrams.net'] ['/about-us/', 'https://www.diagrams.net/about.html'],
['/', 'https://drawio-app.com']
])],
['support', new Map([
['/label', 'https://127.0.0.1'],
['/rest', 'https://127.0.0.1'],
['/display/DFCS/draw.io+for+Confluence+Server', 'https://drawio-app.com'],
['/display/DO/Exporting+Files', 'https://desk.draw.io/a/solutions/articles/16000067785'],
['/display/DO/Online+Support', 'https://github.com/jgraph/drawio/wiki/Getting-Support'],
['/display/DO', 'https://github.com/jgraph/drawio/wiki/Getting-Support'],
['/display/DAFGD/draw.io+Add-on+for+Google+Docs', 'https://www.diagrams.net/blog/diagrams-google-docs.html'],
['/x/LYAk', 'https://seibert.biz/atlassianeula'],
['/display/DOB/2016/04/28/UML+State+Diagrams+with+draw.io', 'https://drawio-app.com/uml-state-diagrams-with-draw-io/'],
['/display/do/2015/01/08/gliffy+and+lucidchart+importing', 'https://desk.draw.io/support/solutions/articles/16000064013-mass-import-gliffy-diagrams-to-draw-io-in-confluence-server'],
['/display/DFCS/draw.io+for+Confluence+and+JIRA+support+terms+and+Service+Level+Agreement',
'https://marketplace.atlassian.com/apps/1210933/draw-io-diagrams-for-confluence?hosting=server&tab=support'],
['/', 'https://github.com/jgraph/drawio/wiki/Getting-Support']
])], ])],
['blog', new Map([ ['blog', new Map([
['/', 'https://www.diagrams.net/blog'] ['/', 'https://www.diagrams.net/blog']

View file

@ -466,7 +466,7 @@ function AttViewerEditor(onSubmit, getFileInfoFn, idSuffix, notStandalone, drawi
}; };
//This function expects having the downloadUrl in the fileInfo //This function expects having the downloadUrl in the fileInfo
this.loadDarwioFile = function(fileInfo) this.loadDrawioFile = function(fileInfo)
{ {
editedFile = fileInfo; editedFile = fileInfo;
AC.$('#filename' + idSuffix).value = fileInfo.diagramDisplayName; AC.$('#filename' + idSuffix).value = fileInfo.diagramDisplayName;

View file

@ -2713,6 +2713,29 @@ AC.getPageInfo = function(urlOnly, success, error)
}); });
}; };
AC.getContentProperty = function(contentId, propName, success, error)
{
AP.request({
type: 'GET',
url: '/rest/api/content/' + contentId + '/property/' + encodeURIComponent(propName),
contentType: 'application/json;charset=UTF-8',
success: success,
error: error
});
};
AC.getConfPageEditorVer = function(pageId, callback)
{
AC.getContentProperty(pageId, 'editor', function(resp)
{
resp = JSON.parse(resp);
callback(resp.value == 'v2'? 2 : 1);
}, function()
{
callback(1);// On error, assume the old editor
})
};
AC.gotoAnchor = function(anchor) AC.gotoAnchor = function(anchor)
{ {
AC.getPageInfo(false, function(info) AC.getPageInfo(false, function(info)
@ -2729,9 +2752,22 @@ AC.gotoAnchor = function(anchor)
url = url.substring(0, hash); url = url.substring(0, hash);
} }
//When page title has a [ at the beginning, conf adds id- to anchor name AC.getConfPageEditorVer(info.id, function(ver)
top.window.location = url + '#' + (info.title.indexOf('[') == 0? 'id-' : '') + {
encodeURI(info.title.replace(/\s/g, '') + '-' + anchor.replace(/\s/g, '')); if (ver == 1)
{
//When page title has a [ at the beginning, conf adds id- to anchor name
url = url + '#' + (info.title.indexOf('[') == 0? 'id-' : '') +
encodeURI(info.title.replace(/\s/g, '') + '-' + anchor.replace(/\s/g, ''));
}
else
{
url = url + '#' + encodeURIComponent(anchor.replace(/\s/g, '-'));
}
top.window.location = url;
});
} }
}, function() }, function()
{ {

View file

@ -430,7 +430,7 @@ function GDriveEditor(onSubmit, getFileInfoFn, idSuffix, notStandalone, drawioOn
} }
}; };
this.loadDarwioFile = function(fileInfo) this.loadDrawioFile = function(fileInfo)
{ {
GAC.$('#filename' + idSuffix).value = fileInfo.diagramDisplayName; GAC.$('#filename' + idSuffix).value = fileInfo.diagramDisplayName;
GAC.$('#autoSize' + idSuffix).checked = true; GAC.$('#autoSize' + idSuffix).checked = true;

View file

@ -80,7 +80,7 @@ body {
<script type="text/javascript"> <script type="text/javascript">
AttViewerEditor(function(selectedFile, selFileContent, editedFile, width, height, autoSize, isDrawio, aspect, onError) AttViewerEditor(function(selectedFile, selFileContent, editedFile, width, height, autoSize, isDrawio, aspect, onError)
{ {
AC.getPageInfo(function(pageId, draftPage) AC.getCurPageId(function(pageId, draftPage)
{ {
if (selectedFile != null) if (selectedFile != null)
{ {
@ -134,7 +134,7 @@ body {
}); });
}, function(callback, onError) }, function(callback, onError)
{ {
AC.getPageInfo(function(pageId, draftPage) AC.getCurPageId(function(pageId, draftPage)
{ {
AP.confluence.getMacroData(function(fileInfo) AP.confluence.getMacroData(function(fileInfo)
{ {

View file

@ -15,7 +15,7 @@
script.onload = function() script.onload = function()
{ {
AC.getPageInfo(function(pageId, draftPage) AC.getCurPageId(function(pageId, draftPage)
{ {
confPageId = pageId; confPageId = pageId;
isDraft = draftPage; isDraft = draftPage;

View file

@ -16,7 +16,7 @@
script.onload = function() script.onload = function()
{ {
GAC.getPageInfo(function(pageId, draftPage) GAC.getCurPageId(function(pageId, draftPage)
{ {
confPageId = pageId; confPageId = pageId;
isDraft = draftPage; isDraft = draftPage;

View file

@ -92,7 +92,7 @@ CAC.htmlEntities = function(s, newline)
return s; return s;
}; };
CAC.getPageInfo = function(callback) CAC.getCurPageId = function(callback)
{ {
AP.navigator.getLocation(function (data) AP.navigator.getLocation(function (data)
{ {
@ -133,7 +133,7 @@ CAC.delOldCachedFiles = function(pageId, filename, timestamp)
CAC.uploadAttachment = function(fileContent, filename, fileType, comment, success, error) CAC.uploadAttachment = function(fileContent, filename, fileType, comment, success, error)
{ {
CAC.getPageInfo(function(pageId, draftPage) CAC.getCurPageId(function(pageId, draftPage)
{ {
var attFile = new Blob([fileContent], {type: fileType}); var attFile = new Blob([fileContent], {type: fileType});
attFile.name = filename; attFile.name = filename;

View file

@ -426,7 +426,7 @@ function OneDriveEditor(onSubmit, getFileInfoFn, idSuffix, notStandalone, drawio
} }
}; };
this.loadDarwioFile = function(fileInfo) this.loadDrawioFile = function(fileInfo)
{ {
AC.$('#filename' + idSuffix).value = fileInfo.diagramDisplayName; AC.$('#filename' + idSuffix).value = fileInfo.diagramDisplayName;
AC.$('#autoSize' + idSuffix).checked = true; AC.$('#autoSize' + idSuffix).checked = true;

View file

@ -32,7 +32,7 @@
break; break;
case 'loadFile': case 'loadFile':
editedFile = msg.fileInfo.sFileId; editedFile = msg.fileInfo.sFileId;
editor.loadDarwioFile(msg.fileInfo); editor.loadDrawioFile(msg.fileInfo);
break; break;
} }
} }

View file

@ -33,7 +33,7 @@
break; break;
case 'loadFile': case 'loadFile':
editedFile = msg.fileInfo.sFileId; editedFile = msg.fileInfo.sFileId;
editor.loadDarwioFile(msg.fileInfo); editor.loadDrawioFile(msg.fileInfo);
break; break;
} }
} }

File diff suppressed because one or more lines are too long

View file

@ -620,6 +620,11 @@ var SplashDialog = function(editorUi)
logo.src = IMAGE_PATH + '/osa_database.png'; logo.src = IMAGE_PATH + '/osa_database.png';
service = mxResources.get('browser'); service = mxResources.get('browser');
} }
else if (editorUi.mode == App.MODE_TRELLO)
{
logo.src = IMAGE_PATH + '/trello-logo.svg';
service = mxResources.get('trello');
}
else else
{ {
logo.src = IMAGE_PATH + '/osa_drive-harddisk.png'; logo.src = IMAGE_PATH + '/osa_drive-harddisk.png';

View file

@ -1503,7 +1503,7 @@
url.substring(0, 23) === 'https://cdn.rawgit.com/' || url.substring(0, 23) === 'https://cdn.rawgit.com/' ||
url.substring(0, 19) === 'https://rawgit.com/' || url.substring(0, 19) === 'https://rawgit.com/' ||
/^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(url) || /^https?:\/\/[^\/]*\.blob.core.windows.net\//.test(url) ||
/^https?:\/\/[^\/]*\.diagrams\.new\/proxy/.test(url) || /^https?:\/\/[^\/]*\.diagrams\.net\/proxy/.test(url) ||
/^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(url) || /^https?:\/\/[^\/]*\.draw\.io\/proxy/.test(url) ||
/^https?:\/\/[^\/]*\.github\.io\//.test(url); /^https?:\/\/[^\/]*\.github\.io\//.test(url);
}; };
@ -2157,7 +2157,8 @@
* *
*/ */
Editor.prototype.exportToCanvas = function(callback, width, imageCache, background, error, limitHeight, Editor.prototype.exportToCanvas = function(callback, width, imageCache, background, error, limitHeight,
ignoreSelection, scale, transparentBackground, addShadow, converter, graph, border, noCrop, grid) ignoreSelection, scale, transparentBackground, addShadow, converter, graph, border, noCrop, grid,
keepTheme)
{ {
try try
{ {
@ -2181,11 +2182,11 @@
// Handles special case where background is null but transparent is false // Handles special case where background is null but transparent is false
if (bg == null && transparentBackground == false) if (bg == null && transparentBackground == false)
{ {
bg = '#ffffff'; bg = (keepTheme) ? this.graph.defaultPageBackgroundColor : '#ffffff';;
} }
this.convertImages(graph.getSvg(null, null, null, noCrop, null, ignoreSelection, null, null, null, addShadow), this.convertImages(graph.getSvg(null, null, null, noCrop, null, ignoreSelection,
mxUtils.bind(this, function(svgRoot) null, null, null, addShadow, null, keepTheme), mxUtils.bind(this, function(svgRoot)
{ {
try try
{ {
@ -4578,11 +4579,11 @@
var graphGetSvg = Graph.prototype.getSvg; var graphGetSvg = Graph.prototype.getSvg;
Graph.prototype.getSvg = function(background, scale, border, nocrop, crisp, Graph.prototype.getSvg = function(background, scale, border, nocrop, crisp,
ignoreSelection, showText, imgExport, linkTarget, hasShadow, incExtFonts) ignoreSelection, showText, imgExport, linkTarget, hasShadow, incExtFonts, keepTheme)
{ {
var temp = null; var temp = null;
if (this.themes != null && this.defaultThemeName == 'darkTheme') if (!keepTheme && this.themes != null && this.defaultThemeName == 'darkTheme')
{ {
temp = this.stylesheet; temp = this.stylesheet;
this.stylesheet = this.getDefaultStylesheet(); this.stylesheet = this.getDefaultStylesheet();

View file

@ -4678,7 +4678,7 @@
* *
*/ */
EditorUi.prototype.exportSvg = function(scale, transparentBackground, ignoreSelection, addShadow, EditorUi.prototype.exportSvg = function(scale, transparentBackground, ignoreSelection, addShadow,
editable, embedImages, border, noCrop, currentPage, linkTarget) editable, embedImages, border, noCrop, currentPage, linkTarget, keepTheme)
{ {
if (this.spinner.spin(document.body, mxResources.get('export'))) if (this.spinner.spin(document.body, mxResources.get('export')))
{ {
@ -4696,14 +4696,14 @@
// Handles special case where background is null but transparent is false // Handles special case where background is null but transparent is false
if (bg == null && transparentBackground == false) if (bg == null && transparentBackground == false)
{ {
bg = '#ffffff'; bg = (keepTheme) ? this.editor.graph.defaultPageBackgroundColor : '#ffffff';
} }
// Sets or disables alternate text for foreignObjects. Disabling is needed // Sets or disables alternate text for foreignObjects. Disabling is needed
// because PhantomJS seems to ignore switch statements and paint all text. // because PhantomJS seems to ignore switch statements and paint all text.
var svgRoot = this.editor.graph.getSvg(bg, scale, border, noCrop, null, var svgRoot = this.editor.graph.getSvg(bg, scale, border, noCrop, null,
ignoreSelection, null, null, (linkTarget == 'blank') ? '_blank' : ignoreSelection, null, null, (linkTarget == 'blank') ? '_blank' :
((linkTarget == 'self') ? '_top' : null), null, true); ((linkTarget == 'self') ? '_top' : null), null, true, keepTheme);
if (addShadow) if (addShadow)
{ {
@ -5221,7 +5221,7 @@
var testLink = document.createElement('a'); var testLink = document.createElement('a');
testLink.style.paddingLeft = '12px'; testLink.style.paddingLeft = '12px';
testLink.style.color = 'gray'; testLink.style.color = 'gray';
testLink.setAttribute('href', 'javascript:void(0);'); testLink.style.cursor = 'pointer';
mxUtils.write(testLink, mxResources.get('share')); mxUtils.write(testLink, mxResources.get('share'));
radioSection.appendChild(testLink); radioSection.appendChild(testLink);
@ -5339,7 +5339,7 @@
testLink.style.paddingLeft = '12px'; testLink.style.paddingLeft = '12px';
testLink.style.color = 'gray'; testLink.style.color = 'gray';
testLink.style.fontSize = '11px'; testLink.style.fontSize = '11px';
testLink.setAttribute('href', 'javascript:void(0);'); testLink.style.cursor = 'pointer';
mxUtils.write(testLink, mxResources.get('check')); mxUtils.write(testLink, mxResources.get('check'));
hintSection.appendChild(testLink); hintSection.appendChild(testLink);
@ -5563,6 +5563,14 @@
var defaultTransparent = false; /*graph.background == mxConstants.NONE || graph.background == null*/; var defaultTransparent = false; /*graph.background == mxConstants.NONE || graph.background == null*/;
var transparent = this.addCheckbox(div, mxResources.get('transparentBackground'), var transparent = this.addCheckbox(div, mxResources.get('transparentBackground'),
defaultTransparent, null, null, format != 'jpeg'); defaultTransparent, null, null, format != 'jpeg');
var keepTheme = null;
if (uiTheme == 'dark')
{
keepTheme = this.addCheckbox(div, mxResources.get('dark'), true);
height += 26;
}
var selection = this.addCheckbox(div, mxResources.get('selectionOnly'), var selection = this.addCheckbox(div, mxResources.get('selectionOnly'),
false, graph.isSelectionEmpty()); false, graph.isSelectionEmpty());
@ -5698,7 +5706,8 @@
callback(zoomInput.value, transparent.checked, !selection.checked, shadow.checked, callback(zoomInput.value, transparent.checked, !selection.checked, shadow.checked,
include.checked, cb5.checked, borderInput.value, cb6.checked, !allPages.checked, include.checked, cb5.checked, borderInput.value, cb6.checked, !allPages.checked,
linkSelect.value, (grid != null? grid.checked : null)); linkSelect.value, (grid != null) ? grid.checked : null,
(keepTheme != null) ? keepTheme.checked : null);
}), null, btnLabel, helpLink); }), null, btnLabel, helpLink);
this.showDialog(dlg.container, 340, height, true, true, null, null, null, null, true); this.showDialog(dlg.container, 340, height, true, true, null, null, null, null, true);
zoomInput.focus(); zoomInput.focus();
@ -6340,7 +6349,8 @@
/** /**
* *
*/ */
EditorUi.prototype.exportImage = function(scale, transparentBackground, ignoreSelection, addShadow, editable, border, noCrop, currentPage, format, grid, dpi) EditorUi.prototype.exportImage = function(scale, transparentBackground, ignoreSelection, addShadow,
editable, border, noCrop, currentPage, format, grid, dpi, keepTheme)
{ {
format = (format != null) ? format : 'png'; format = (format != null) ? format : 'png';
@ -6384,7 +6394,7 @@
this.spinner.stop(); this.spinner.stop();
this.handleError(e); this.handleError(e);
}), null, ignoreSelection, scale || 1, transparentBackground, }), null, ignoreSelection, scale || 1, transparentBackground,
addShadow, null, null, border, noCrop, grid); addShadow, null, null, border, noCrop, grid, keepTheme);
} }
catch (e) catch (e)
{ {
@ -11396,6 +11406,19 @@
var parent = window.opener || window.parent; var parent = window.opener || window.parent;
var msg = (urlParams['proto'] == 'json') ? JSON.stringify({event: 'init'}) : (urlParams['ready'] || 'ready'); var msg = (urlParams['proto'] == 'json') ? JSON.stringify({event: 'init'}) : (urlParams['ready'] || 'ready');
parent.postMessage(msg, '*'); parent.postMessage(msg, '*');
// Adds JSON event for opening links
if (urlParams['proto'] == 'json')
{
var graphOpenLink = this.editor.graph.openLink;
this.editor.graph.openLink = function(href, target, allowOpener)
{
graphOpenLink.apply(this, arguments);
parent.postMessage(JSON.stringify({event: 'openLink', href: href, target: target, allowOpener: allowOpener}), '*');
};
}
}; };
/** /**
@ -11418,15 +11441,18 @@
if (urlParams['noSaveBtn'] == '1') if (urlParams['noSaveBtn'] == '1')
{ {
mxUtils.write(button, mxResources.get('saveAndExit')); if (urlParams['saveAndExit'] != '0')
button.setAttribute('title', mxResources.get('saveAndExit'));
mxEvent.addListener(button, 'click', mxUtils.bind(this, function()
{ {
this.actions.get('saveAndExit').funct(); mxUtils.write(button, mxResources.get('saveAndExit'));
})); button.setAttribute('title', mxResources.get('saveAndExit'));
div.appendChild(button); mxEvent.addListener(button, 'click', mxUtils.bind(this, function()
{
this.actions.get('saveAndExit').funct();
}));
div.appendChild(button);
}
} }
else else
{ {
@ -13577,11 +13603,12 @@
}; };
EditorUi.prototype.exportToCanvas = function(callback, width, imageCache, background, error, limitHeight, EditorUi.prototype.exportToCanvas = function(callback, width, imageCache, background, error, limitHeight,
ignoreSelection, scale, transparentBackground, addShadow, converter, graph, border, noCrop, grid) ignoreSelection, scale, transparentBackground, addShadow, converter, graph, border, noCrop, grid, keepTheme)
{ {
EditorUi.logEvent('SHOULD NOT BE CALLED: exportToCanvas'); EditorUi.logEvent('SHOULD NOT BE CALLED: exportToCanvas');
return this.editor.exportToCanvas(callback, width, imageCache, background, error, limitHeight, return this.editor.exportToCanvas(callback, width, imageCache, background, error, limitHeight,
ignoreSelection, scale, transparentBackground, addShadow, converter, graph, border, noCrop, grid); ignoreSelection, scale, transparentBackground, addShadow, converter, graph, border,
noCrop, grid, keepTheme);
}; };
EditorUi.prototype.createImageUrlConverter = function() EditorUi.prototype.createImageUrlConverter = function()

View file

@ -104,6 +104,7 @@ window.mxLanguageMap = window.mxLanguageMap ||
'et' : 'Eesti', 'et' : 'Eesti',
'en' : 'English', 'en' : 'English',
'es' : 'Español', 'es' : 'Español',
'eu' : 'Euskadi',
'fil' : 'Filipino', 'fil' : 'Filipino',
'fr' : 'Français', 'fr' : 'Français',
'gl' : 'Galego', 'gl' : 'Galego',

View file

@ -94,23 +94,6 @@
dlg.init(); dlg.init();
}); });
editorUi.actions.put('exportSvg', new Action(mxResources.get('formatSvg') + '...', function()
{
editorUi.showExportDialog(mxResources.get('formatSvg'), true, mxResources.get('export'),
'https://support.draw.io/display/DO/Exporting+Files',
mxUtils.bind(this, function(scale, transparentBackground, ignoreSelection, addShadow,
editable, embedImages, border, cropImage, currentPage, linkTarget)
{
var val = parseInt(scale);
if (!isNaN(val) && val > 0)
{
editorUi.exportSvg(val / 100, transparentBackground, ignoreSelection, addShadow,
editable, embedImages, border, !cropImage, currentPage, linkTarget);
}
}), true, null, 'svg');
}));
editorUi.actions.put('insertTemplate', new Action(mxResources.get('template') + '...', function() editorUi.actions.put('insertTemplate', new Action(mxResources.get('template') + '...', function()
{ {
var dlg = new NewDialog(editorUi, null, false, function(xml) var dlg = new NewDialog(editorUi, null, false, function(xml)
@ -654,21 +637,38 @@
} }
})); }));
editorUi.actions.put('exportSvg', new Action(mxResources.get('formatSvg') + '...', function()
{
editorUi.showExportDialog(mxResources.get('formatSvg'), true, mxResources.get('export'),
'https://desk.draw.io/support/solutions/articles/16000067785',
mxUtils.bind(this, function(scale, transparentBackground, ignoreSelection, addShadow,
editable, embedImages, border, cropImage, currentPage, linkTarget, grid, keepTheme)
{
var val = parseInt(scale);
if (!isNaN(val) && val > 0)
{
editorUi.exportSvg(val / 100, transparentBackground, ignoreSelection, addShadow,
editable, embedImages, border, !cropImage, currentPage, linkTarget, keepTheme);
}
}), true, null, 'svg');
}));
editorUi.actions.put('exportPng', new Action(mxResources.get('formatPng') + '...', function() editorUi.actions.put('exportPng', new Action(mxResources.get('formatPng') + '...', function()
{ {
if (editorUi.isExportToCanvas()) if (editorUi.isExportToCanvas())
{ {
editorUi.showExportDialog(mxResources.get('image'), false, mxResources.get('export'), editorUi.showExportDialog(mxResources.get('image'), false, mxResources.get('export'),
'https://support.draw.io/display/DO/Exporting+Files', 'https://desk.draw.io/support/solutions/articles/16000067785',
mxUtils.bind(this, function(scale, transparentBackground, ignoreSelection, mxUtils.bind(this, function(scale, transparentBackground, ignoreSelection, addShadow,
addShadow, editable, embedImages, border, cropImage, currentPage, dummy, grid) editable, embedImages, border, cropImage, currentPage, dummy, grid, keepTheme)
{ {
var val = parseInt(scale); var val = parseInt(scale);
if (!isNaN(val) && val > 0) if (!isNaN(val) && val > 0)
{ {
editorUi.exportImage(val / 100, transparentBackground, ignoreSelection, editorUi.exportImage(val / 100, transparentBackground, ignoreSelection, addShadow,
addShadow, editable, border, !cropImage, currentPage, null, grid); editable, border, !cropImage, currentPage, null, grid, null, keepTheme);
} }
}), true, true, 'png'); }), true, true, 'png');
} }
@ -686,16 +686,16 @@
if (editorUi.isExportToCanvas()) if (editorUi.isExportToCanvas())
{ {
editorUi.showExportDialog(mxResources.get('image'), false, mxResources.get('export'), editorUi.showExportDialog(mxResources.get('image'), false, mxResources.get('export'),
'https://support.draw.io/display/DO/Exporting+Files', 'https://desk.draw.io/support/solutions/articles/16000067785',
mxUtils.bind(this, function(scale, transparentBackground, ignoreSelection, mxUtils.bind(this, function(scale, transparentBackground, ignoreSelection, addShadow,
addShadow, editable, embedImages, border, cropImage, currentPage, dummy, grid) editable, embedImages, border, cropImage, currentPage, dummy, grid, keepTheme)
{ {
var val = parseInt(scale); var val = parseInt(scale);
if (!isNaN(val) && val > 0) if (!isNaN(val) && val > 0)
{ {
editorUi.exportImage(val / 100, false, ignoreSelection, editorUi.exportImage(val / 100, false, ignoreSelection, addShadow,
addShadow, false, border, !cropImage, false, 'jpeg', grid); false, border, !cropImage, false, 'jpeg', grid, null, keepTheme);
} }
}), true, false, 'jpeg'); }), true, false, 'jpeg');
} }
@ -729,11 +729,6 @@
} }
})); }));
editorUi.actions.addAction('userManual...', function()
{
editorUi.openLink('https://support.draw.io/display/DO/Draw.io+Online+User+Manual');
});
editorUi.actions.addAction('support...', function() editorUi.actions.addAction('support...', function()
{ {
editorUi.openLink('https://github.com/jgraph/drawio/wiki/Getting-Support'); editorUi.openLink('https://github.com/jgraph/drawio/wiki/Getting-Support');
@ -1291,7 +1286,7 @@
}, 0); }, 0);
this.addMenuItems(menu, ['-', 'keyboardShortcuts', 'quickStart', this.addMenuItems(menu, ['-', 'keyboardShortcuts', 'quickStart',
'-', 'userManual', 'support', '-', 'about'], parent); 'support', '-', 'about'], parent);
} }
if (urlParams['test'] == '1') if (urlParams['test'] == '1')
@ -2683,23 +2678,6 @@
return cell; return cell;
}; };
editorUi.actions.put('exportSvg', new Action(mxResources.get('formatSvg') + '...', function()
{
editorUi.showExportDialog(mxResources.get('formatSvg'), true, mxResources.get('export'),
'https://support.draw.io/display/DO/Exporting+Files',
mxUtils.bind(this, function(scale, transparentBackground, ignoreSelection, addShadow,
editable, embedImages, border, cropImage, currentPage, linkTarget)
{
var val = parseInt(scale);
if (!isNaN(val) && val > 0)
{
editorUi.exportSvg(val / 100, transparentBackground, ignoreSelection, addShadow,
editable, embedImages, border, !cropImage, currentPage, linkTarget);
}
}), true, null, 'svg');
}));
editorUi.actions.put('insertText', new Action(mxResources.get('text'), function() editorUi.actions.put('insertText', new Action(mxResources.get('text'), function()
{ {
if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent())) if (graph.isEnabled() && !graph.isCellLocked(graph.getDefaultParent()))
@ -3367,7 +3345,7 @@
var tempDlg = new TemplatesDialog(); var tempDlg = new TemplatesDialog();
editorUi.showDialog(tempDlg.container, tempDlg.width, tempDlg.height, true, false, null, false, true); editorUi.showDialog(tempDlg.container, tempDlg.width, tempDlg.height, true, false, null, false, true);
tempDlg.init(editorUi, function(xml){console.log(xml)}, null, tempDlg.init(editorUi, function(xml){console.log(xml)}, null,
null, null, "user", function(callback, username) null, null, 'user', function(callback, username)
{ {
setTimeout(function(){ setTimeout(function(){
username? callback([ username? callback([
@ -3432,11 +3410,23 @@
this.addMenuItems(menu, ['-', 'revisionHistory'], parent); this.addMenuItems(menu, ['-', 'revisionHistory'], parent);
} }
this.addMenuItems(menu, ['-', 'pageSetup', 'print', '-', 'rename', urlParams['noSaveBtn'] == '1'? 'saveAndExit' : 'save'], parent); this.addMenuItems(menu, ['-', 'pageSetup', 'print', '-', 'rename'], parent);
if (urlParams['saveAndExit'] == '1' && urlParams['noSaveBtn'] != '1') if (urlParams['noSaveBtn'] == '1')
{ {
this.addMenuItems(menu, ['saveAndExit'], parent); if (urlParams['saveAndExit'] != '0')
{
this.addMenuItems(menu, ['saveAndExit'], parent);
}
}
else
{
this.addMenuItems(menu, ['save'], parent);
if (urlParams['saveAndExit'] == '1')
{
this.addMenuItems(menu, ['saveAndExit'], parent);
}
} }
if (urlParams['noExitBtn'] != '1') if (urlParams['noExitBtn'] != '1')

View file

@ -85,10 +85,12 @@ TrelloFile.prototype.doSave = function(title, success, error)
// Forces update of data for new extensions // Forces update of data for new extensions
var prev = this.meta.name; var prev = this.meta.name;
this.meta.name = title; this.meta.name = title;
DrawioFile.prototype.save.apply(this, arguments);
this.meta.name = prev;
this.saveFile(title, false, success, error); DrawioFile.prototype.save.apply(this, [null, mxUtils.bind(this, function()
{
this.meta.name = prev;
this.saveFile(title, false, success, error);
}), error]);
}; };
/** /**
@ -128,6 +130,8 @@ TrelloFile.prototype.saveFile = function(title, revision, success, error)
this.ui.trello.saveFile(this, mxUtils.bind(this, function(meta) this.ui.trello.saveFile(this, mxUtils.bind(this, function(meta)
{ {
console.log('here');
this.savingFile = false; this.savingFile = false;
this.isModified = prevModified; this.isModified = prevModified;
this.meta = meta; this.meta = meta;

View file

@ -1409,6 +1409,27 @@ var com;
model.remove(removeChild); model.remove(removeChild);
} }
} }
//Check for -ve width/height cells and correct it
var geo = cell.geometry;
if (geo != null)
{
if (geo.height < 0)
{
geo.height = Math.abs(geo.height);
geo.y -= geo.height;
cell.style += ';flipV=1;';
}
if (geo.width < 0)
{
geo.width = Math.abs(geo.width);
geo.x -= geo.width;
cell.style += ';flipH=1;';
}
}
if (childCount > 0) { if (childCount > 0) {
childCount = model.getChildCount(cell); childCount = model.getChildCount(cell);
} }

View file

@ -1012,8 +1012,9 @@ b)return a.entries[d].value;return null}(this.vertexMap,new f.mxgraph.io.vsdx.Sh
b,a,d){if(null!=b){var k=c.getModel().getGeometry(b);null!=k&&(d=k.height)}var n=a.getStartXY(d),w=a.getEndXY(d),l=a.getStyleFromEdgeShape(d),e=a.getRoutingPoints(d,n,a.getRotation()),g=a.getRotation();if(0!==g){0===a.getShapeIndex()?k=c.insertEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")):(k=c.createEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex()));var p=a.createLabelSubShape(c,k);null!=p&& b,a,d){if(null!=b){var k=c.getModel().getGeometry(b);null!=k&&(d=k.height)}var n=a.getStartXY(d),w=a.getEndXY(d),l=a.getStyleFromEdgeShape(d),e=a.getRoutingPoints(d,n,a.getRotation()),g=a.getRotation();if(0!==g){0===a.getShapeIndex()?k=c.insertEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")):(k=c.createEdge(b,null,null,null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex()));var p=a.createLabelSubShape(c,k);null!=p&&
(p.setStyle(p.getStyle()+";rotation="+(60<g&&240>g?(g+180)%360:g)),g=p.getGeometry(),g.x=0,g.y=0,g.relative=!0,g.offset=new mxPoint(-g.width/2,-g.height/2))}else 0===a.getShapeIndex()?k=c.insertEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")):(k=c.createEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex())),g=a.getLblEdgeOffset(c.getView(),e),k.getGeometry().offset=g;this.rotateChildEdge(c.getModel(), (p.setStyle(p.getStyle()+";rotation="+(60<g&&240>g?(g+180)%360:g)),g=p.getGeometry(),g.x=0,g.y=0,g.relative=!0,g.offset=new mxPoint(-g.width/2,-g.height/2))}else 0===a.getShapeIndex()?k=c.insertEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")):(k=c.createEdge(b,null,a.getTextLabel(),null,null,f.mxgraph.io.vsdx.mxVsdxUtils.getStyleString(l,"=")),k=c.addEdge(k,b,null,null,a.getShapeIndex())),g=a.getLblEdgeOffset(c.getView(),e),k.getGeometry().offset=g;this.rotateChildEdge(c.getModel(),
b,n,w,e);b=c.getModel().getGeometry(k);e.pop();e.shift();b.points=e;b.setTerminalPoint(n,!0);b.setTerminalPoint(w,!1);l.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(l,"curved"),"1")&&(b=c.getModel().getGeometry(k),c=a.getControlPoints(d),b.points=c);return k};l.prototype.rotateChildEdge=function(c,b,a,d,k){if(null!=b){var n=c.getGeometry(b);c=c.getStyle(b);if(null!=n&&null!=c&&(b=c.indexOf("rotation="),-1<b))for(c=parseFloat(c.substring(b+ b,n,w,e);b=c.getModel().getGeometry(k);e.pop();e.shift();b.points=e;b.setTerminalPoint(n,!0);b.setTerminalPoint(w,!1);l.hasOwnProperty("curved")&&function(a,b){return a&&a.equals?a.equals(b):a===b}(function(a,b){return a[b]?a[b]:null}(l,"curved"),"1")&&(b=c.getModel().getGeometry(k),c=a.getControlPoints(d),b.points=c);return k};l.prototype.rotateChildEdge=function(c,b,a,d,k){if(null!=b){var n=c.getGeometry(b);c=c.getStyle(b);if(null!=n&&null!=c&&(b=c.indexOf("rotation="),-1<b))for(c=parseFloat(c.substring(b+
9,c.indexOf(";",b))),b=n.width/2,n=n.height/2,l.rotatedEdgePoint(a,c,b,n),l.rotatedEdgePoint(d,c,b,n),a=0;a<k.length;a++)l.rotatedEdgePoint(k[a],c,b,n)}};l.prototype.sanitiseGraph=function(c){var b=c.getModel().getRoot();this.sanitiseCell(c,b)};l.prototype.sanitiseCell=function(c,b){for(var a=c.getModel(),d=a.getChildCount(b),k=[],n=0;n<d;n++){var f=a.getChildAt(b,n);this.sanitiseCell(c,f)&&0<k.push(f)}for(n=0;n<k.length;n++)a.remove(k[n]);0<d&&(d=a.getChildCount(b));k=(new String(a.getValue(b))).toString(); 9,c.indexOf(";",b))),b=n.width/2,n=n.height/2,l.rotatedEdgePoint(a,c,b,n),l.rotatedEdgePoint(d,c,b,n),a=0;a<k.length;a++)l.rotatedEdgePoint(k[a],c,b,n)}};l.prototype.sanitiseGraph=function(c){var b=c.getModel().getRoot();this.sanitiseCell(c,b)};l.prototype.sanitiseCell=function(c,b){for(var a=c.getModel(),d=a.getChildCount(b),k=[],n=0;n<d;n++){var f=a.getChildAt(b,n);this.sanitiseCell(c,f)&&0<k.push(f)}for(n=0;n<k.length;n++)a.remove(k[n]);k=b.geometry;null!=k&&(0>k.height&&(k.height=Math.abs(k.height),
n=a.getStyle(b);return 0!==d||!a.isVertex(b)||null!=a.getValue(b)&&0!==k.length||null==n||-1==n.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==n.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=n.indexOf("image=")?!1:!0};return l}();g.mxVsdxCodec=e;e.__class="com.mxgraph.io.mxVsdxCodec"})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); k.y-=k.height,b.style+=";flipV=1;"),0>k.width&&(k.width=Math.abs(k.width),k.x-=k.width,b.style+=";flipH=1;"));0<d&&(d=a.getChildCount(b));k=(new String(a.getValue(b))).toString();n=a.getStyle(b);return 0!==d||!a.isVertex(b)||null!=a.getValue(b)&&0!==k.length||null==n||-1==n.indexOf(mxConstants.STYLE_FILLCOLOR+"=none")||-1==n.indexOf(mxConstants.STYLE_STROKECOLOR+"=none")||-1!=n.indexOf("image=")?!1:!0};return l}();g.mxVsdxCodec=e;e.__class="com.mxgraph.io.mxVsdxCodec"})(g.io||(g.io={}))})(f.mxgraph||
(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){var e=function(l){function c(b){var a=l.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=b;return a}__extends(c,l);c.prototype.decodeVssx=function(b,a,d,k){var n=this,c="<mxlibrary>[";this.decodeVsdx(b,function(b){c=c.concat(b);var d=n.vsdxModel.getMasterShapes(),w=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){var b= (function(f){(function(g){(function(g){var e=function(l){function c(b){var a=l.call(this)||this;a.RESPONSE_END="";a.RESPONSE_DIAGRAM_START="";a.RESPONSE_DIAGRAM_END="";a.RESPONSE_HEADER="";a.editorUi=b;return a}__extends(c,l);c.prototype.decodeVssx=function(b,a,d,k){var n=this,c="<mxlibrary>[";this.decodeVsdx(b,function(b){c=c.concat(b);var d=n.vsdxModel.getMasterShapes(),w=function(a){var b=0;return{next:function(){return b<a.length?a[b++]:null},hasNext:function(){return b<a.length}}}(function(a){var b=
[];null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(n.vsdxModel.getPages())).next();if(null!=d){var e={str:"",toString:function(){return this.str}},g=0===b.length?"":",",y=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=y[a];var b=p.createMxGraph(),k=1;if(null!=a.pageSheet){var n=k=1,c=a.pageSheet.DrawingScale;null!=c&&(k=parseFloat(c.getAttribute("V"))||1);c=a.pageSheet.PageScale;null!=c&&(n=parseFloat(c.getAttribute("V"))|| [];null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)b.push(a.entries[d].value);return b}(n.vsdxModel.getPages())).next();if(null!=d){var e={str:"",toString:function(){return this.str}},g=0===b.length?"":",",y=function(a){return Object.keys(a).map(function(b){return a[b]})}(d);b=function(a){a=y[a];var b=p.createMxGraph(),k=1;if(null!=a.pageSheet){var n=k=1,c=a.pageSheet.DrawingScale;null!=c&&(k=parseFloat(c.getAttribute("V"))||1);c=a.pageSheet.PageScale;null!=c&&(n=parseFloat(c.getAttribute("V"))||
1);k=n/k}n=!1;for(c=0;null!=a.firstLevelShapes&&c<a.firstLevelShapes.length;c++){var A=a.firstLevelShapes[c].getShape(),z=new f.mxgraph.io.vsdx.VsdxShape(w,A,!w.isEdge(A),d,null,p.vsdxModel),A=null;if(z.isVertex()){p.edgeShapeMap.entries=[];p.parentsMap.entries=[];for(var A=p.addShape(b,z,b.getDefaultParent(),0,1169),z=function(a){null==a.entries&&(a.entries=[]);return a.entries}(p.edgeShapeMap),C=0;C<z.length;C++){var B=z[C],E=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!= 1);k=n/k}n=!1;for(c=0;null!=a.firstLevelShapes&&c<a.firstLevelShapes.length;c++){var A=a.firstLevelShapes[c].getShape(),z=new f.mxgraph.io.vsdx.VsdxShape(w,A,!w.isEdge(A),d,null,p.vsdxModel),A=null;if(z.isVertex()){p.edgeShapeMap.entries=[];p.parentsMap.entries=[];for(var A=p.addShape(b,z,b.getDefaultParent(),0,1169),z=function(a){null==a.entries&&(a.entries=[]);return a.entries}(p.edgeShapeMap),C=0;C<z.length;C++){var B=z[C],E=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=
@ -1157,17 +1158,17 @@ a.equals?a.equals(b):a===b}(e,a))return g}}return null};return c}();e.Section=l;
(f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,k){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=b;this.blue=k}b.NONE_$LI$=function(){null==b.NONE&&(b.NONE=new b(-1,-1,-1));return b.NONE};b.prototype.getRed=function(){return this.red};b.prototype.setRed=function(a){this.red=a};b.prototype.getGreen=function(){return this.green};b.prototype.setGreen=function(a){this.green=a};b.prototype.getBlue=function(){return this.blue}; (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,k){this.blue=this.green=this.red=0;this.gradientClr=null;this.red=a;this.green=b;this.blue=k}b.NONE_$LI$=function(){null==b.NONE&&(b.NONE=new b(-1,-1,-1));return b.NONE};b.prototype.getRed=function(){return this.red};b.prototype.setRed=function(a){this.red=a};b.prototype.getGreen=function(){return this.green};b.prototype.setGreen=function(a){this.green=a};b.prototype.getBlue=function(){return this.blue};
b.prototype.setBlue=function(a){this.blue=a};b.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,k=this.getBlue()/255,c=Math.max(a,Math.max(b,k)),e=Math.min(a,Math.min(b,k)),l=(c+e)/2;if(c===e)a=e=0;else var g=c-e,e=.5<l?g/(2-c-e):g/(c+e),a=(c===a?(b-k)/g+(b<k?6:0):c===b?(k-a)/g+2:(a-b)/g+4)/6;return new f.mxgraph.io.vsdx.theme.HSLColor(a,e,l)};b.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,k=this.getBlue()/255,c=Math.max(a,Math.max(b,k)),e=Math.min(a, b.prototype.setBlue=function(a){this.blue=a};b.prototype.toHsl=function(){var a=this.getRed()/255,b=this.getGreen()/255,k=this.getBlue()/255,c=Math.max(a,Math.max(b,k)),e=Math.min(a,Math.min(b,k)),l=(c+e)/2;if(c===e)a=e=0;else var g=c-e,e=.5<l?g/(2-c-e):g/(c+e),a=(c===a?(b-k)/g+(b<k?6:0):c===b?(k-a)/g+2:(a-b)/g+4)/6;return new f.mxgraph.io.vsdx.theme.HSLColor(a,e,l)};b.prototype.toHsv=function(){var a=this.getRed()/255,b=this.getGreen()/255,k=this.getBlue()/255,c=Math.max(a,Math.max(b,k)),e=Math.min(a,
Math.min(b,k)),l=c-e,a=c===e?0:(c===a?(b-k)/l+(b<k?6:0):c===b?(k-a)/l+2:(a-b)/l+4)/6;return new f.mxgraph.io.vsdx.theme.HSVColor(a,0===c?0:l/c,c)};b.decodeColorHex=function(a){a=parseInt(a,16);return new b(a>>16&255,a>>8&255,a&255)};b.prototype.toHexStr=function(){var a=this.red.toString(16),a=1==a.length?"0"+a:a,b=this.green.toString(16),b=1==b.length?"0"+b:b,c=this.blue.toString(16),c=1==c.length?"0"+c:c;return"#"+a+b+c};b.prototype.getGradientClr=function(){return this.gradientClr};b.prototype.setGradientClr= Math.min(b,k)),l=c-e,a=c===e?0:(c===a?(b-k)/l+(b<k?6:0):c===b?(k-a)/l+2:(a-b)/l+4)/6;return new f.mxgraph.io.vsdx.theme.HSVColor(a,0===c?0:l/c,c)};b.decodeColorHex=function(a){a=parseInt(a,16);return new b(a>>16&255,a>>8&255,a&255)};b.prototype.toHexStr=function(){var a=this.red.toString(16),a=1==a.length?"0"+a:a,b=this.green.toString(16),b=1==b.length?"0"+b:b,k=this.blue.toString(16),k=1==k.length?"0"+k:k;return"#"+a+b+k};b.prototype.getGradientClr=function(){return this.gradientClr};b.prototype.setGradientClr=
function(a){this.gradientClr=a};return b}();e.Color=c;c.__class="com.mxgraph.io.vsdx.theme.Color"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); function(a){this.gradientClr=a};return b}();e.Color=c;c.__class="com.mxgraph.io.vsdx.theme.Color"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(){}b.getFillStyle=function(a){var b=null;switch(a.nodeName){case "a:solidFill":b=new f.mxgraph.io.vsdx.theme.SolidFillStyle(f.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":b=new f.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":b=new f.mxgraph.io.vsdx.theme.GradFill(a)}return b};return b}();e.FillStyleFactory= (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(){}b.getFillStyle=function(a){var b=null;switch(a.nodeName){case "a:solidFill":b=new f.mxgraph.io.vsdx.theme.SolidFillStyle(f.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a)));break;case "a:noFill":b=new f.mxgraph.io.vsdx.theme.NoFillStyle;break;case "a:gradFill":b=new f.mxgraph.io.vsdx.theme.GradFill(a)}return b};return b}();e.FillStyleFactory=
c;c.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); c;c.__class="com.mxgraph.io.vsdx.theme.FillStyleFactory"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a){this.color2=this.color1=null;a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=f.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=f.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length- (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a){this.color2=this.color1=null;a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"a:gsLst");0<a.length&&(a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildElements(a[0]),2<=a.length&&(this.color2=f.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[0])),this.color1=f.mxgraph.io.vsdx.theme.OoxmlColorFactory.getOoxmlColor(f.mxgraph.io.vsdx.mxVsdxUtils.getDirectFirstChildElement(a[a.length-
1]))));null==this.color1&&(this.color1=this.color2=new f.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}b.prototype.applyStyle=function(a,b){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b));return d};return b}();e.GradFill=c;c.__class="com.mxgraph.io.vsdx.theme.GradFill";c.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph= 1]))));null==this.color1&&(this.color1=this.color2=new f.mxgraph.io.vsdx.theme.SrgbClr("FFFFFF"))}b.prototype.applyStyle=function(a,b){var d=this.color1.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b);d.setGradientClr(this.color2.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b));return d};return b}();e.GradFill=c;c.__class="com.mxgraph.io.vsdx.theme.GradFill";c.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph=
{}))})(com||(com={})); {}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,c){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=b;this.lum=c}b.prototype.getHue=function(){return this.hue};b.prototype.setHue=function(a){this.hue=a};b.prototype.getSat=function(){return this.sat};b.prototype.setSat=function(a){this.sat=a};b.prototype.getLum=function(){return this.lum};b.prototype.setLum=function(a){this.lum=a};b.prototype.hue2rgb=function(a,b,c){0>c&&(c+=1);1<c&&--c;return c<1/6? (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,k){this.lum=this.sat=this.hue=0;this.hue=a;this.sat=b;this.lum=k}b.prototype.getHue=function(){return this.hue};b.prototype.setHue=function(a){this.hue=a};b.prototype.getSat=function(){return this.sat};b.prototype.setSat=function(a){this.sat=a};b.prototype.getLum=function(){return this.lum};b.prototype.setLum=function(a){this.lum=a};b.prototype.hue2rgb=function(a,b,k){0>k&&(k+=1);1<k&&--k;return k<1/6?
a+6*(b-a)*c:.5>c?b:c<2/3?a+(b-a)*(2/3-c)*6:a};b.prototype.toRgb=function(){var a,b,c;c=this.hue;b=this.sat;a=this.lum;if(0===b)a=b=c=a;else{var n=.5>a?a*(1+b):a+b-a*b,e=2*a-n;a=this.hue2rgb(e,n,c+1/3);b=this.hue2rgb(e,n,c);c=this.hue2rgb(e,n,c-1/3)}return new f.mxgraph.io.vsdx.theme.Color(255*a|0,255*b|0,255*c|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.shade=function(a){this.lum*= a+6*(b-a)*k:.5>k?b:k<2/3?a+(b-a)*(2/3-k)*6:a};b.prototype.toRgb=function(){var a,b,k;k=this.hue;b=this.sat;a=this.lum;if(0===b)a=b=k=a;else{var c=.5>a?a*(1+b):a+b-a*b,e=2*a-c;a=this.hue2rgb(e,c,k+1/3);b=this.hue2rgb(e,c,k);k=this.hue2rgb(e,c,k-1/3)}return new f.mxgraph.io.vsdx.theme.Color(255*a|0,255*b|0,255*k|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.lum*=1+a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.shade=function(a){this.lum*=
a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};b.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return b}();e.HSLColor=c;c.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); a/100;this.lum=this.clamp01(this.lum);return this};b.prototype.satMod=function(a){this.sat*=a/100;this.sat=this.clamp01(this.sat);return this};b.prototype.lumMod=function(a){this.lum*=a/100;this.lum=this.clamp01(this.lum);return this};return b}();e.HSLColor=c;c.__class="com.mxgraph.io.vsdx.theme.HSLColor"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,c){this.h=a;this.s=b;this.v=c}b.prototype.toRgb=function(){var a=6*this.h,b=this.s,c=Math.floor(a),n=a-c,a=this.v*(1-b),e=this.v*(1-n*b),b=this.v*(1-(1-n)*b),c=(c|0)%6;return new f.mxgraph.io.vsdx.theme.Color(255*[this.v,e,a,a,b,this.v][c]|0,255*[b,this.v,this.v,e,a,a][c]|0,255*[a,a,b,this.v,this.v,e][c]|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.v*= (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a,b,k){this.h=a;this.s=b;this.v=k}b.prototype.toRgb=function(){var a=6*this.h,b=this.s,k=Math.floor(a),c=a-k,a=this.v*(1-b),e=this.v*(1-c*b),b=this.v*(1-(1-c)*b),k=(k|0)%6;return new f.mxgraph.io.vsdx.theme.Color(255*[this.v,e,a,a,b,this.v][k]|0,255*[b,this.v,this.v,e,a,a][k]|0,255*[a,a,b,this.v,this.v,e][k]|0)};b.prototype.clamp01=function(a){return Math.min(1,Math.max(0,a))};b.prototype.tint=function(a){this.v*=
1+a/100;this.v=this.clamp01(this.v);return this};b.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};b.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return b}();e.HSVColor=c;c.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx= 1+a/100;this.v=this.clamp01(this.v);return this};b.prototype.shade=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.satMod=function(a){this.s*=a/100;this.s=this.clamp01(this.s);return this};b.prototype.lumMod=function(a){this.v*=a/100;this.v=this.clamp01(this.v);return this};b.prototype.hueMod=function(a){this.h*=a/100;this.h=this.clamp01(this.h);return this};return b}();e.HSVColor=c;c.__class="com.mxgraph.io.vsdx.theme.HSVColor"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx=
{}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); {}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin= (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(){function b(a){this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=this.isBevelJoin=this.isRoundJoin=!1;if(null!=a&&1==a.nodeType||null===a){Array.prototype.slice.call(arguments);this.lineWidth=0;this.headEndType=this.fillStyle=this.lineComp=this.lineCap=null;this.headEndLen=this.headEndWidth=0;this.tailEndType=null;this.tailEndLen=this.tailEndWidth=0;this.isLineDashed=!1;this.lineDashPattern=[];this.isMiterJoin=
@ -1203,9 +1204,9 @@ function(a){this.quickStyleFillColor=a};b.prototype.setQuickStyleFillMatrix=func
function(a){this.quickStyleType=a};b.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return b}();f.QuickStyleVals=c;c.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(f.theme||(f.theme={}))})(f.vsdx||(f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); function(a){this.quickStyleType=a};b.prototype.setQuickStyleVariation=function(a){this.quickStyleVariation=a};return b}();f.QuickStyleVals=c;c.__class="com.mxgraph.io.vsdx.theme.QuickStyleVals"})(f.theme||(f.theme={}))})(f.vsdx||(f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(f){(function(f){(function(f){(function(f){var c=function(){function b(a){this.color=null;this.color=a}b.prototype.applyStyle=function(a,b){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};return b}();f.SolidFillStyle=c;c.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";c.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(f.theme||(f.theme={}))})(f.vsdx||(f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(f){(function(f){(function(f){(function(f){var c=function(){function b(a){this.color=null;this.color=a}b.prototype.applyStyle=function(a,b){return this.color.getColor$int$com_mxgraph_io_vsdx_mxVsdxTheme(a,b)};return b}();f.SolidFillStyle=c;c.__class="com.mxgraph.io.vsdx.theme.SolidFillStyle";c.__interfaces=["com.mxgraph.io.vsdx.theme.FillStyle"]})(f.theme||(f.theme={}))})(f.vsdx||(f.vsdx={}))})(f.io||(f.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(f){(function(f){var e=function(){function f(){}f.MAX_AREA_$LI$=function(){null==f.MAX_AREA&&(f.MAX_AREA=1E8);return f.MAX_AREA};return f}();e.MAX_REQUEST_SIZE=52428800;e.IMAGE_DOMAIN="http://img.diagramly.com/";f.Constants=e;e.__class="com.mxgraph.online.Constants"})(f.online||(f.online={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(f){(function(f){var e=function(){function f(){}f.MAX_AREA_$LI$=function(){null==f.MAX_AREA&&(f.MAX_AREA=1E8);return f.MAX_AREA};return f}();e.MAX_REQUEST_SIZE=52428800;e.IMAGE_DOMAIN="http://img.diagramly.com/";f.Constants=e;e.__class="com.mxgraph.online.Constants"})(f.online||(f.online={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(f){(function(f){var e=function(){function f(){}f.getRotatedPoint=function(c,b,a,d){var k=c.x-d.x;c=c.y-d.y;return new mxPoint(k*b-c*a+d.x,c*b+k*a+d.y)};f.rotatedGeometry=function(c,b,a,d){b=b*Math.PI/180;var k=Math.cos(b);b=Math.sin(b);var n=c.getCenterX()-a,f=c.getCenterY()-d;c.x=Math.round(n*k-f*b+a-c.width/2);c.y=Math.round(f*k+n*b+d-c.height/2)};return f}();e.CHARSET_FOR_URL_ENCODING="ISO-8859-1";f.Utils=e;e.__class="com.mxgraph.online.Utils"})(f.online||(f.online={}))})(f.mxgraph|| (function(f){(function(f){(function(f){var e=function(){function f(){}f.getRotatedPoint=function(c,b,a,d){var k=c.x-d.x;c=c.y-d.y;return new mxPoint(k*b-c*a+d.x,c*b+k*a+d.y)};f.rotatedGeometry=function(c,b,a,d){b=b*Math.PI/180;var k=Math.cos(b);b=Math.sin(b);var f=c.getCenterX()-a,e=c.getCenterY()-d;c.x=Math.round(f*k-e*b+a-c.width/2);c.y=Math.round(e*k+f*b+d-c.height/2)};return f}();e.CHARSET_FOR_URL_ENCODING="ISO-8859-1";f.Utils=e;e.__class="com.mxgraph.online.Utils"})(f.online||(f.online={}))})(f.mxgraph||
(f.mxgraph={}))})(com||(com={})); (f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,n,f){a=b.call(this,a,c,n)||this;a.a=f;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a){var d=b.getHeight(),c=b.getWidth(),k=Math.floor(Math.round(b.getLastX()*c)/100),e=Math.floor(Math.round(b.getLastY()*d)/100),l=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=d-g,p=this.a* (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e){a=b.call(this,a,c,f)||this;a.a=e;return a}__extends(a,b);a.prototype.handle=function(a,b){if(null!=this.x&&null!=this.y&&null!=this.a){var d=b.getHeight(),c=b.getWidth(),k=Math.floor(Math.round(b.getLastX()*c)/100),e=Math.floor(Math.round(b.getLastY()*d)/100),l=this.x*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=this.y*f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),g=d-g,p=this.a*
f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=Math.abs(l-k),e=Math.abs(g-e),k=e=.5*p+(k*k+e*e)/(8*p),E=Math.abs(e),e=Math.round(100*e/c*100)/100,k=Math.round(100*k/d*100)/100,l=Math.round(100*l/c*100)/100,g=Math.round(100*g/d*100)/100,p=Math.round(100*p)/100,e=Math.abs(e),k=Math.abs(k),d=0>p?"1":"0",p=E<Math.abs(p)?"1":"0";b.setLastX(l);b.setLastY(g);return'<arc rx="'+(new String(e)).toString()+'" ry="'+(new String(k)).toString()+'" x="'+(new String(l)).toString()+'" y="'+(new String(g)).toString()+ f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=Math.abs(l-k),e=Math.abs(g-e),k=e=.5*p+(k*k+e*e)/(8*p),E=Math.abs(e),e=Math.round(100*e/c*100)/100,k=Math.round(100*k/d*100)/100,l=Math.round(100*l/c*100)/100,g=Math.round(100*g/d*100)/100,p=Math.round(100*p)/100,e=Math.abs(e),k=Math.abs(k),d=0>p?"1":"0",p=E<Math.abs(p)?"1":"0";b.setLastX(l);b.setLastY(g);return'<arc rx="'+(new String(e)).toString()+'" ry="'+(new String(k)).toString()+'" x="'+(new String(l)).toString()+'" y="'+(new String(g)).toString()+
'" x-axis-rotation="0" large-arc-flag="'+p+'" sweep-flag="'+d+'"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.ArcTo=c;c.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); '" x-axis-rotation="0" large-arc-flag="'+p+'" sweep-flag="'+d+'"/>'}return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.ArcTo=c;c.__class="com.mxgraph.io.vsdx.geometry.ArcTo"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){return b.call(this,a,null,null)||this}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.DelRow=c;c.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){return b.call(this,a,null,null)||this}__extends(a,b);a.prototype.handle=function(a,b){return""};return a}(f.mxgraph.io.vsdx.geometry.Row);e.DelRow=c;c.__class="com.mxgraph.io.vsdx.geometry.DelRow"})(e.geometry||(e.geometry={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
@ -1276,7 +1277,7 @@ b.getFontColor$com_mxgraph_io_vsdx_theme_QuickStyleVals(this.getQuickStyleVals()
0)};c.prototype.getTextLeftMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN),0)};c.prototype.getTextRightMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN),0)};c.prototype.getTextStyle=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.STYLE, 0)};c.prototype.getTextLeftMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.LEFT_MARGIN),0)};c.prototype.getTextRightMargin=function(){return this.getScreenNumericalValue$org_w3c_dom_Element$double(this.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.RIGHT_MARGIN),0)};c.prototype.getTextStyle=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.STYLE,
b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};c.prototype.getTextFont=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.FONT,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};c.prototype.getTextPos=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.POS,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b, b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};c.prototype.getTextFont=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.FONT,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};c.prototype.getTextPos=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.POS,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,
"")};c.prototype.getTextStrike=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=(b=this.getValue(b,""))&&b.equals?b.equals("1"):"1"===b;return b};c.prototype.getTextCase=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.CASE,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};c.prototype.getHorizontalAlign= "")};c.prototype.getTextStrike=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.STRIKETHRU,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);b=(b=this.getValue(b,""))&&b.equals?b.equals("1"):"1"===b;return b};c.prototype.getTextCase=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.CASE,b,f.mxgraph.io.vsdx.mxVsdxConstants.CHARACTER);return this.getValue(b,"")};c.prototype.getHorizontalAlign=
function(b,a){var c;c=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(c,"")){case "0":c=a?"left":mxConstants.ALIGN_LEFT;break;case "2":c=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":c=a?"justify":mxConstants.ALIGN_CENTER;break;default:c=a?"center":mxConstants.ALIGN_CENTER}return c};c.prototype.getIndentFirst=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST, function(b,a){var d;d=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.HORIZONTAL_ALIGN,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);switch(this.getValue(d,"")){case "0":d=a?"left":mxConstants.ALIGN_LEFT;break;case "2":d=a?"right":mxConstants.ALIGN_RIGHT;break;case "3":case "4":d=a?"justify":mxConstants.ALIGN_CENTER;break;default:d=a?"center":mxConstants.ALIGN_CENTER}return d};c.prototype.getIndentFirst=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.INDENT_FIRST,
b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};c.prototype.getIndentLeft=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getIndentRight=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT, b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))).toString()};c.prototype.getIndentLeft=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.INDENT_LEFT,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getIndentRight=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.INDENT_RIGHT,
b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getSpBefore=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getSpAfter=function(b){b= b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getSpBefore=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.SPACE_BEFORE,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getSpAfter=function(b){b=
this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getSpLine=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);b=this.getValue(b,"");var a;a=b&& this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.SPACE_AFTER,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);return(new String(Math.round(this.getScreenNumericalValue$org_w3c_dom_Element$double(b,0))|0)).toString()};c.prototype.getSpLine=function(b){b=this.getCellElement$java_lang_String$java_lang_String$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.SPACE_LINE,b,f.mxgraph.io.vsdx.mxVsdxConstants.PARAGRAPH);b=this.getValue(b,"");var a;a=b&&
@ -1290,11 +1291,11 @@ b=[];0<b.push(c.DASH);0<b.push(c.SHORT_SPACE);0<b.push(c.SHORT_DASH);0<b.push(c.
c.lineDashPatterns_$LI$().push(b);b=[];0<b.push(c.XLONG_DASH);0<b.push(c.LONG_SPACE);0<b.push(c.DASH);0<b.push(c.LONG_SPACE);0<b.push(c.DASH);0<b.push(c.LONG_SPACE);0<c.lineDashPatterns_$LI$().push(b);b=[];0<b.push(c.XSHORT_DASH);0<b.push(c.SHORT_SPACE);0<c.lineDashPatterns_$LI$().push(b)};c.getLineDashPattern=function(b){return 0<=b&&23>=b?c.lineDashPatterns_$LI$()[b]:c.lineDashPatterns_$LI$()[0]};return c}();g.__static_initialized=!1;g.vsdxStyleDebug=!1;g.SPACE=4;g.SHORT_SPACE=2;g.LONG_SPACE=6; c.lineDashPatterns_$LI$().push(b);b=[];0<b.push(c.XLONG_DASH);0<b.push(c.LONG_SPACE);0<b.push(c.DASH);0<b.push(c.LONG_SPACE);0<b.push(c.DASH);0<b.push(c.LONG_SPACE);0<c.lineDashPatterns_$LI$().push(b);b=[];0<b.push(c.XSHORT_DASH);0<b.push(c.SHORT_SPACE);0<c.lineDashPatterns_$LI$().push(b)};c.getLineDashPattern=function(b){return 0<=b&&23>=b?c.lineDashPatterns_$LI$()[b]:c.lineDashPatterns_$LI$()[0]};return c}();g.__static_initialized=!1;g.vsdxStyleDebug=!1;g.SPACE=4;g.SHORT_SPACE=2;g.LONG_SPACE=6;
g.DOT=1;g.DASH=8;g.LONG_DASH=12;g.SHORT_DASH=4;g.XLONG_DASH=20;g.XSHORT_DASH=2;e.Style=g;g.__class="com.mxgraph.io.vsdx.Style"})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); g.DOT=1;g.DASH=8;g.LONG_DASH=12;g.SHORT_DASH=4;g.XLONG_DASH=20;g.XSHORT_DASH=2;e.Style=g;g.__class="com.mxgraph.io.vsdx.Style"})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,e){var d=b.call(this)||this;d.__com_mxgraph_io_vsdx_theme_HslClr_hue=a/360;d.__com_mxgraph_io_vsdx_theme_HslClr_sat=c/100;d.__com_mxgraph_io_vsdx_theme_HslClr_lum=e/100;d.color=(new f.mxgraph.io.vsdx.theme.HSLColor(a,c,e)).toRgb();return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.HslClr=c;c.__class="com.mxgraph.io.vsdx.theme.HslClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io|| (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,e){var d=b.call(this)||this;d.__com_mxgraph_io_vsdx_theme_HslClr_hue=a/360;d.__com_mxgraph_io_vsdx_theme_HslClr_sat=c/100;d.__com_mxgraph_io_vsdx_theme_HslClr_lum=e/100;d.color=(new f.mxgraph.io.vsdx.theme.HSLColor(a,c,e)).toRgb();return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.HslClr=c;c.__class="com.mxgraph.io.vsdx.theme.HslClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||
(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var c=b.call(this)||this;c.val=a;c.color=new f.mxgraph.io.vsdx.theme.Color(255,255,255);return c}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.PrstClr=c;c.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var d=b.call(this)||this;d.val=a;d.color=new f.mxgraph.io.vsdx.theme.Color(255,255,255);return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.PrstClr=c;c.__class="com.mxgraph.io.vsdx.theme.PrstClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var c=b.call(this)||this;c.isDynamic=!0;c.val=a;return c}__extends(a,b);a.prototype.calcColor=function(a,c){var d;d=this.val;d="phClr".equals?"phClr".equals(d):"phClr"===d;d?this.color=c.getStyleColor(a):(this.color=c.getSchemeColor(this.val),this.isDynamic=!1);b.prototype.calcColor.call(this,a,c)};return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.SchemeClr=c;c.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(e.theme|| (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var d=b.call(this)||this;d.isDynamic=!0;d.val=a;return d}__extends(a,b);a.prototype.calcColor=function(a,c){var d;d=this.val;d="phClr".equals?"phClr".equals(d):"phClr"===d;d?this.color=c.getStyleColor(a):(this.color=c.getSchemeColor(this.val),this.isDynamic=!1);b.prototype.calcColor.call(this,a,c)};return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.SchemeClr=c;c.__class="com.mxgraph.io.vsdx.theme.SchemeClr"})(e.theme||
(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,e){var d=b.call(this)||this;d.r=0;d.g=0;d.b=0;d.r=a;d.g=c;d.b=e;d.color=new f.mxgraph.io.vsdx.theme.Color(a,c,e);return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.ScrgbClr=c;c.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,e){var d=b.call(this)||this;d.r=0;d.g=0;d.b=0;d.r=a;d.g=c;d.b=e;d.color=new f.mxgraph.io.vsdx.theme.Color(a,c,e);return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.ScrgbClr=c;c.__class="com.mxgraph.io.vsdx.theme.ScrgbClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var c=b.call(this)||this;c.hexVal=null;c.hexVal=a;c.color=f.mxgraph.io.vsdx.theme.Color.decodeColorHex(a);return c}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.SrgbClr=c;c.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a){var d=b.call(this)||this;d.hexVal=null;d.hexVal=a;d.color=f.mxgraph.io.vsdx.theme.Color.decodeColorHex(a);return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.SrgbClr=c;c.__class="com.mxgraph.io.vsdx.theme.SrgbClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c){var d=b.call(this)||this;d.lastClr=null;d.val=a;var k=d.lastClr=c;if(null==k)switch(a){case "windowText":k="000000";break;case "window":k="FFFFFF";break;default:k="FFFFFF"}d.color=f.mxgraph.io.vsdx.theme.Color.decodeColorHex(k);return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.SysClr=c;c.__class="com.mxgraph.io.vsdx.theme.SysClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io|| (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c){var d=b.call(this)||this;d.lastClr=null;d.val=a;var k=d.lastClr=c;if(null==k)switch(a){case "windowText":k="000000";break;case "window":k="FFFFFF";break;default:k="FFFFFF"}d.color=f.mxgraph.io.vsdx.theme.Color.decodeColorHex(k);return d}__extends(a,b);return a}(f.mxgraph.io.vsdx.theme.OoxmlColor);e.SysClr=c;c.__class="com.mxgraph.io.vsdx.theme.SysClr"})(e.theme||(e.theme={}))})(g.vsdx||(g.vsdx={}))})(g.io||
(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); (g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,p){return b.call(this,a,c,f,e,g,l,p)||this}__extends(a,b);a.prototype.handle=function(a,c){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=c.getHeight()/f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=c.getWidth()/f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=d;this.a*=k;this.b*=d}return b.prototype.handle.call(this, (function(f){(function(g){(function(g){(function(e){(function(e){var c=function(b){function a(a,c,f,e,g,l,p){return b.call(this,a,c,f,e,g,l,p)||this}__extends(a,b);a.prototype.handle=function(a,c){if(null!=this.x&&null!=this.y&&null!=this.a&&null!=this.b&&null!=this.c&&null!=this.d){var d=c.getHeight()/f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$(),k=c.getWidth()/f.mxgraph.io.vsdx.mxVsdxUtils.conversionFactor_$LI$();this.x*=k;this.y*=d;this.a*=k;this.b*=d}return b.prototype.handle.call(this,
@ -1305,9 +1306,9 @@ b.UNICODE_LINE_SEP=String.fromCharCode(8232));return b.UNICODE_LINE_SEP};b.proto
this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,d){c.prototype.parseShapeElem.call(this,a,d);var k=a.nodeName;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(k,"ForeignData")){var k=function(a,b){for(var c=a.firstChild;null!=c;){if(1==c.nodeType){var k=c;if("rel"==k.nodeName.toLowerCase()&&(k=k.getAttribute("r:id"),null!=k&&0!==k.length)){var c=b.lastIndexOf("/"),f="",e="";try{f=b.substring(0,c),e=b.substring(c,b.length)}catch(M){break}c=d.getRelationship(k,f+"/_rels"+e+".rels"); this.geomListProcessed=!0}};b.prototype.parseShapeElem=function(a,d){c.prototype.parseShapeElem.call(this,a,d);var k=a.nodeName;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(k,"ForeignData")){var k=function(a,b){for(var c=a.firstChild;null!=c;){if(1==c.nodeType){var k=c;if("rel"==k.nodeName.toLowerCase()&&(k=k.getAttribute("r:id"),null!=k&&0!==k.length)){var c=b.lastIndexOf("/"),f="",e="";try{f=b.substring(0,c),e=b.substring(c,b.length)}catch(M){break}c=d.getRelationship(k,f+"/_rels"+e+".rels");
if(null!=c){k=c.getAttribute("Target")||"";f=c.getAttribute("Type");c=k.lastIndexOf("/");try{k=k.substring(c+1,k.length)}catch(M){break}return{type:f,target:k}}break}}c=c.nextSibling}},e=a.ownerDocument.vsdxFileName,g=a.getAttribute("ForeignType"),l=a.getAttribute("CompressionType")||"",p=null;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"Bitmap"))l=l.toLowerCase();else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"MetaFile"))l="png";else if(function(a,b){return a&&a.equals? if(null!=c){k=c.getAttribute("Target")||"";f=c.getAttribute("Type");c=k.lastIndexOf("/");try{k=k.substring(c+1,k.length)}catch(M){break}return{type:f,target:k}}break}}c=c.nextSibling}},e=a.ownerDocument.vsdxFileName,g=a.getAttribute("ForeignType"),l=a.getAttribute("CompressionType")||"",p=null;if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"Bitmap"))l=l.toLowerCase();else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"MetaFile"))l="png";else if(function(a,b){return a&&a.equals?
a.equals(b):a===b}(g,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"EnhMetaFile"))l="png";else if("Object"==g){if(p=k(a,e),0<p.type.indexOf("/oleObject"))if(l=d.getRelationship("rId1","visio/embeddings/_rels/"+p.target+".rels"),null!=l){p=l.getAttribute("Target");g=l.getAttribute("Type");try{var z=p.lastIndexOf("/"),p=p.substring(z+1,p.length)}catch(B){return}l="png";p={type:g,target:p}}else return}else return;null==p&&(p=k(a,e));g=p.type;p=p.target;null!=g&&function(a, a.equals(b):a===b}(g,"Enhanced Metafile")||function(a,b){return a&&a.equals?a.equals(b):a===b}(g,"EnhMetaFile"))l="png";else if("Object"==g){if(p=k(a,e),0<p.type.indexOf("/oleObject"))if(l=d.getRelationship("rId1","visio/embeddings/_rels/"+p.target+".rels"),null!=l){p=l.getAttribute("Target");g=l.getAttribute("Type");try{var z=p.lastIndexOf("/"),p=p.substring(z+1,p.length)}catch(B){return}l="png";p={type:g,target:p}}else return}else return;null==p&&(p=k(a,e));g=p.type;p=p.target;null!=g&&function(a,
b){var c=a.length-b.length,d=a.indexOf(b,c);return-1!==d&&d===c}(g,"image")&&(this.imageData={},(z=d.getMedia(f.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+p))?(this.imageData.iData=z,function(a,b){var c=a.length-b.length,d=a.indexOf(b,c);return-1!==d&&d===c}(p.toLowerCase(),".bmp")&&(l="jpg"),this.imageData.iType=l):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(k,f.mxgraph.io.vsdx.mxVsdxConstants.TEXT)&&(this.text= b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(g,"image")&&(this.imageData={},(z=d.getMedia(f.mxgraph.io.mxVsdxCodec.vsdxPlaceholder+"/media/"+p))?(this.imageData.iData=z,function(a,b){var d=a.length-b.length,c=a.indexOf(b,d);return-1!==c&&c===d}(p.toLowerCase(),".bmp")&&(l="jpg"),this.imageData.iType=l):(this.imageData.iData=b.ERROR_IMAGE,this.imageData.iType="svg+xml"))}else(function(a,b){return a&&a.equals?a.equals(b):a===b})(k,f.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<this.geom.push(a);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Field")){a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var k=0;k<a.length;k++){var d=a[k],e=d.getAttribute("IX")||"";if(0!==e.length)if(null==this.fields&&(this.fields={}),function(a,b){return a&&a.equals?a.equals(b):a===b}("1", 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<this.geom.push(a);else if(function(a,b){return a&&a.equals?a.equals(b):a===b}(d,"Field")){a=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(a,"Row");for(var k=0;k<a.length;k++){var d=a[k],e=d.getAttribute("IX")||"";if(0!==e.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[e]="";else{for(var g=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),l="",p="",z=0;z<g.length;z++){var B=g[z],d=B.getAttribute("N"),B=B.getAttribute("V")||B.textContent||"";switch(d){case "Value":l=B;break;case "Format":p=B}}if(0!==l.length){try{if(function(a,b,c){void 0===c&&(c=0);return a.substr(c,b.length)===b}(p,"{{"))var p=p.replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M"),C=isNaN(l)?new Date(l):new Date(b.VSDX_START_TIME+Math.floor(864E5* d.getAttribute("Del")))this.fields[e]="";else{for(var g=f.mxgraph.io.vsdx.mxVsdxUtils.getDirectChildNamedElements(d,"Cell"),l="",p="",z=0;z<g.length;z++){var B=g[z],d=B.getAttribute("N"),B=B.getAttribute("V")||B.textContent||"";switch(d){case "Value":l=B;break;case "Format":p=B}}if(0!==l.length){try{if(function(a,b,d){void 0===d&&(d=0);return a.substr(d,b.length)===b}(p,"{{"))var p=p.replace(/m/g,"@").replace(/M/g,"m").replace(/@/g,"M"),C=isNaN(l)?new Date(l):new Date(b.VSDX_START_TIME+Math.floor(864E5*
parseFloat(l))),l=Graph.prototype.formatDate(C,p.replace(RegExp("\\{|\\}","g"),""))}catch(E){}this.fields[e]=l}}}}else c.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){return 0===this.width&&0<this.height?1:this.width}; parseFloat(l))),l=Graph.prototype.formatDate(C,p.replace(RegExp("\\{|\\}","g"),""))}catch(E){}this.fields[e]=l}}}}else c.prototype.parseSection.call(this,a)};b.prototype.parseGeom=function(){return this.hasGeomList()?this.geomList.getShapeXML(this):""};b.prototype.getText=function(){return null!=this.text?this.text.textContent:null};b.prototype.getTextChildren=function(){return null!=this.text?this.text.childNodes:null};b.prototype.getWidth=function(){return 0===this.width&&0<this.height?1:this.width};
b.prototype.getHeight=function(){return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.getPPList=function(a){var b=null;""!=a&&(a=this.getBullet(a),"0"!=a&&(b='<ul style="margin: 0;list-style-type: '+("4"==a?"square": b.prototype.getHeight=function(){return 0===this.height&&0<this.width?1:this.height};b.prototype.getRotation=function(){return this.rotation};b.prototype.getStyleMap=function(){return this.styleMap};b.prototype.hasGeom=function(){return!(null==this.geom||0==this.geom.length)};b.prototype.hasGeomList=function(){return null!=this.geomList&&this.geomList.hasGeom()};b.prototype.getPPList=function(a){var b=null;""!=a&&(a=this.getBullet(a),"0"!=a&&(b='<ul style="margin: 0;list-style-type: '+("4"==a?"square":
"disc")+'">'));return b};b.prototype.getTextParagraphFormated=function(a){var b="",c={};c.align=this.getHorizontalAlign(this.pp,!0);c["margin-left"]=this.getIndentLeft(this.pp);c["margin-right"]=this.getIndentRight(this.pp);c["margin-top"]=this.getSpBefore(this.pp)+"px";c["margin-bottom"]=this.getSpAfter(this.pp)+"px";c["text-indent"]=this.getIndentFirst(this.pp);c.valign=this.getAlignVertical();c.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,c)};b.prototype.getTextCharFormated= "disc")+'">'));return b};b.prototype.getTextParagraphFormated=function(a){var b="",c={};c.align=this.getHorizontalAlign(this.pp,!0);c["margin-left"]=this.getIndentLeft(this.pp);c["margin-right"]=this.getIndentRight(this.pp);c["margin-top"]=this.getSpBefore(this.pp)+"px";c["margin-bottom"]=this.getSpAfter(this.pp)+"px";c["text-indent"]=this.getIndentFirst(this.pp);c.valign=this.getAlignVertical();c.direction=this.getTextDirection(this.pp);return b+=this.insertAttributes(a,c)};b.prototype.getTextCharFormated=
@ -1322,8 +1323,8 @@ a.equals(b):a===b}(a.toLowerCase(),"themed")||(b=1===(parseInt(a)&1));return b};
"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= "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}(f.mxgraph.io.vsdx.Style);g.VSDX_START_TIME=-22091688E5;e.Shape=g;g.__class="com.mxgraph.io.vsdx.Shape"})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={})); 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}(f.mxgraph.io.vsdx.Style);g.VSDX_START_TIME=-22091688E5;e.Shape=g;g.__class="com.mxgraph.io.vsdx.Shape"})(g.vsdx||(g.vsdx={}))})(g.io||(g.io={}))})(f.mxgraph||(f.mxgraph={}))})(com||(com={}));
(function(f){(function(g){(function(g){(function(e){var g=function(c){function b(a,b,k,e,g,l){var d=this;d.masterShape=null;d.master=null;d.parentHeight=0;d=c.call(this,b,l)||this;d.htmlLabels=!0;d.rootShape=d;d.shapeName=null;d.shapeIndex=0;d.vertex=!0;d.childShapes={};var n=d.getMasterId(),w=d.getShapeMasterId();d.master=null!=n?e[n]?e[n]:null:g;null!=d.master&&(d.masterShape=null==n&&null!=w?d.master.getSubShape(w):d.master.getMasterShape());e=d.getNameU();g=e.lastIndexOf(".");-1!==g&&(e=e.substring(0, (function(f){(function(g){(function(g){(function(e){var g=function(c){function b(a,b,k,e,g,l){var d=this;d.masterShape=null;d.master=null;d.parentHeight=0;d=c.call(this,b,l)||this;d.htmlLabels=!0;d.rootShape=d;d.shapeName=null;d.shapeIndex=0;d.vertex=!0;d.childShapes={};var n=d.getMasterId(),w=d.getShapeMasterId();d.master=null!=n?e[n]?e[n]:null:g;null!=d.master&&(d.masterShape=null==n&&null!=w?d.master.getSubShape(w):d.master.getMasterShape());e=d.getNameU();g=e.lastIndexOf(".");-1!==g&&(e=e.substring(0,
g));d.shapeName=e;b=b.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0<b.length&&(b=b.item(0),d.childShapes=a.parseShapes(b,d.master,!1));b=d.calcRotation();d.rotation=100*b/100;d.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(d.getValue(d.getCellElement$java_lang_String("ThemeIndex"),"0")));l=function(a,b){null==a.entries&&(a.entries=[]);for(var c=0;c<a.entries.length;c++)if(null!=a.entries[c].key.equals&&a.entries[c].key.equals(b)||a.entries[c].key=== g));d.shapeName=e;b=b.getElementsByTagName(f.mxgraph.io.vsdx.mxVsdxConstants.SHAPES);null!=b&&0<b.length&&(b=b.item(0),d.childShapes=a.parseShapes(b,d.master,!1));b=d.calcRotation();d.rotation=100*b/100;d.rotation%=360;b=a.getCellIntValue("ThemeIndex",-100);-100===b&&(b=parseInt(d.getValue(d.getCellElement$java_lang_String("ThemeIndex"),"0")));l=function(a,b){null==a.entries&&(a.entries=[]);for(var d=0;d<a.entries.length;d++)if(null!=a.entries[d].key.equals&&a.entries[d].key.equals(b)||a.entries[d].key===
b)return a.entries[c].value;return null}(l.getThemes(),b);a=a.getCellIntValue("VariationColorIndex",0);d.setThemeAndVariant(l,a);b=function(a){null==a.entries&&(a.entries=[]);return a.entries}(d.childShapes);for(e=0;e<b.length;e++)g=b[e].getValue(),g.setRootShape(d),null==g.theme&&g.setThemeAndVariant(l,a);d.quickStyleVals=new f.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillColor"), b)return a.entries[d].value;return null}(l.getThemes(),b);a=a.getCellIntValue("VariationColorIndex",0);d.setThemeAndVariant(l,a);b=function(a){null==a.entries&&(a.entries=[]);return a.entries}(d.childShapes);for(e=0;e<b.length;e++)g=b[e].getValue(),g.setRootShape(d),null==g.theme&&g.setThemeAndVariant(l,a);d.quickStyleVals=new f.mxgraph.io.vsdx.theme.QuickStyleVals(parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleEffectsMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillColor"),
"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleShadowColor"), "1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFillMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleFontMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineColor"),"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleLineMatrix"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleShadowColor"),
"1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=d.masterShape?(d.masterShape.processGeomList(null),d.processGeomList(d.masterShape.getGeomList()),0===d.width&&(d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===d.height&&(d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT), "1")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleType"),"0")),parseInt(d.getValue(d.getCellElement$java_lang_String("QuickStyleVariation"),"0")));null!=d.masterShape?(d.masterShape.processGeomList(null),d.processGeomList(d.masterShape.getGeomList()),0===d.width&&(d.width=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.WIDTH),0)),0===d.height&&(d.height=d.getScreenNumericalValue$org_w3c_dom_Element$double(d.getCellElement$java_lang_String(f.mxgraph.io.vsdx.mxVsdxConstants.HEIGHT),
0))):d.processGeomList(null);d.vertex=k||null!=d.childShapes&&!function(a){null==a.entries&&(a.entries=[]);return 0==a.entries.length}(d.childShapes)||null!=d.geomList&&(!d.geomList.isNoFill()||1<d.geomList.getGeoCount());d.layerMember=d.getValue(d.getCellElement$java_lang_String("LayerMember"));d.layerMember&&0==d.layerMember.indexOf("0;")&&(d.layerMember=d.layerMember.substr(2));return d}__extends(b,c);b.__static_initialize=function(){b.__static_initialized||(b.__static_initialized=!0,b.__static_initializer_0())}; 0))):d.processGeomList(null);d.vertex=k||null!=d.childShapes&&!function(a){null==a.entries&&(a.entries=[]);return 0==a.entries.length}(d.childShapes)||null!=d.geomList&&(!d.geomList.isNoFill()||1<d.geomList.getGeoCount());d.layerMember=d.getValue(d.getCellElement$java_lang_String("LayerMember"));d.layerMember&&0==d.layerMember.indexOf("0;")&&(d.layerMember=d.layerMember.substr(2));return d}__extends(b,c);b.__static_initialize=function(){b.__static_initialized||(b.__static_initialized=!0,b.__static_initializer_0())};

View file

@ -203,30 +203,11 @@ Actions.prototype.init = function()
{ {
// Cancels interactive operations // Cancels interactive operations
graph.escape(); graph.escape();
var cells = graph.getDeletableCells(graph.getSelectionCells()); var select = graph.deleteCells(graph.getDeletableCells(graph.getSelectionCells()), includeEdges);
if (cells != null && cells.length > 0) if (select != null)
{ {
var parents = (graph.selectParentAfterDelete) ? graph.model.getParents(cells) : null; graph.setSelectionCells(select);
graph.removeCells(cells, includeEdges);
// Selects parents for easier editing of groups
if (parents != null)
{
var select = [];
for (var i = 0; i < parents.length; i++)
{
if (graph.model.contains(parents[i]) &&
(graph.model.isVertex(parents[i]) ||
graph.model.isEdge(parents[i])))
{
select.push(parents[i]);
}
}
graph.setSelectionCells(select);
}
} }
}; };

View file

@ -42,6 +42,30 @@ var ColorDialog = function(editorUi, color, apply, cancelFn)
document.body.appendChild(input); document.body.appendChild(input);
} }
var applyFunction = (apply != null) ? apply : this.createApplyFunction();
function doApply()
{
var color = input.value;
// Blocks any non-alphabetic chars in colors
if (/(^#?[a-zA-Z0-9]*$)/.test(color))
{
if (color != 'none' && color.charAt(0) != '#')
{
color = '#' + color;
}
ColorDialog.addRecentColor((color != 'none') ? color.substring(1) : color, 12);
applyFunction(color);
editorUi.hideDialog();
}
else
{
editorUi.handleError({message: mxResources.get('invalidInput')});
}
};
this.init = function() this.init = function()
{ {
if (!mxClient.IS_TOUCH) if (!mxClient.IS_TOUCH)
@ -131,6 +155,8 @@ var ColorDialog = function(editorUi, color, apply, cancelFn)
picker.fromString(clr); picker.fromString(clr);
} }
}); });
mxEvent.addListener(td, 'dblclick', doApply);
} }
})(presets[row * rowLength + i]); })(presets[row * rowLength + i]);
} }
@ -199,29 +225,7 @@ var ColorDialog = function(editorUi, color, apply, cancelFn)
buttons.appendChild(cancelBtn); buttons.appendChild(cancelBtn);
} }
var applyFunction = (apply != null) ? apply : this.createApplyFunction(); var applyBtn = mxUtils.button(mxResources.get('apply'), doApply);
var applyBtn = mxUtils.button(mxResources.get('apply'), function()
{
var color = input.value;
// Blocks any non-alphabetic chars in colors
if (/(^#?[a-zA-Z0-9]*$)/.test(color))
{
if (color != 'none' && color.charAt(0) != '#')
{
color = '#' + color;
}
ColorDialog.addRecentColor((color != 'none') ? color.substring(1) : color, 12);
applyFunction(color);
editorUi.hideDialog();
}
else
{
editorUi.handleError({message: mxResources.get('invalidInput')});
}
});
applyBtn.className = 'geBtn gePrimaryBtn'; applyBtn.className = 'geBtn gePrimaryBtn';
buttons.appendChild(applyBtn); buttons.appendChild(applyBtn);

File diff suppressed because it is too large Load diff

View file

@ -3050,16 +3050,21 @@
// Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph) // Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph)
if (typeof mxVertexHandler !== 'undefined') if (typeof mxVertexHandler !== 'undefined')
{ {
function createHandle(state, keys, getPositionFn, setPositionFn, ignoreGrid, redrawEdges) function createHandle(state, keys, getPositionFn, setPositionFn, ignoreGrid, redrawEdges, executeFn)
{ {
var handle = new mxHandle(state, null, mxVertexHandler.prototype.secondaryHandleImage); var handle = new mxHandle(state, null, mxVertexHandler.prototype.secondaryHandleImage);
handle.execute = function() handle.execute = function(me)
{ {
for (var i = 0; i < keys.length; i++) for (var i = 0; i < keys.length; i++)
{ {
this.copyStyle(keys[i]); this.copyStyle(keys[i]);
} }
if (executeFn)
{
executeFn(me);
}
}; };
handle.getPosition = getPositionFn; handle.getPosition = getPositionFn;
@ -3449,7 +3454,16 @@
}, },
'swimlane': function(state) 'swimlane': function(state)
{ {
var handles = [createHandle(state, [mxConstants.STYLE_STARTSIZE], function(bounds) var handles = [];
if (mxUtils.getValue(state.style, mxConstants.STYLE_ROUNDED))
{
var size = parseFloat(mxUtils.getValue(state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE));
handles.push(createArcHandle(state, size / 2));
}
// Start size handle must be last item in handles for hover to work in tables (see mouse event handler in Graph)
handles.push(createHandle(state, [mxConstants.STYLE_STARTSIZE], function(bounds)
{ {
var size = parseFloat(mxUtils.getValue(state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE)); var size = parseFloat(mxUtils.getValue(state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE));
@ -3467,13 +3481,35 @@
(mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, 1) == 1) ? (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, 1) == 1) ?
Math.round(Math.max(0, Math.min(bounds.height, pt.y - bounds.y))) : Math.round(Math.max(0, Math.min(bounds.height, pt.y - bounds.y))) :
Math.round(Math.max(0, Math.min(bounds.width, pt.x - bounds.x))); Math.round(Math.max(0, Math.min(bounds.width, pt.x - bounds.x)));
}, false)]; }, false, null, function(me)
if (mxUtils.getValue(state.style, mxConstants.STYLE_ROUNDED))
{ {
var size = parseFloat(mxUtils.getValue(state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE)); if (mxEvent.isShiftDown(me.getEvent()))
handles.push(createArcHandle(state, size / 2)); {
} var graph = state.view.graph;
if (graph.isTableRow(state.cell) || graph.isTableCell(state.cell))
{
var dir = graph.getSwimlaneDirection(state.style);
var parent = graph.model.getParent(state.cell);
var cells = graph.model.getChildCells(parent, true);
var temp = [];
for (var i = 0; i < cells.length; i++)
{
// Finds siblings with the same direction and to set start size
if (cells[i] != state.cell && graph.isSwimlane(cells[i]) &&
graph.getSwimlaneDirection(graph.getCurrentCellStyle(
cells[i])) == dir)
{
temp.push(cells[i]);
}
}
graph.setCellStyles(mxConstants.STYLE_STARTSIZE,
state.style[mxConstants.STYLE_STARTSIZE], temp);
}
}
}));
return handles; return handles;
}, },

View file

@ -2126,9 +2126,15 @@ Sidebar.prototype.createDropHandler = function(cells, allowSplit, allowCellsInse
// Splits the target edge or inserts into target group // Splits the target edge or inserts into target group
if (allowSplit && graph.isSplitTarget(target, cells, evt)) if (allowSplit && graph.isSplitTarget(target, cells, evt))
{ {
var s = graph.view.scale;
var tr = graph.view.translate;
var tx = (x + tr.x) * s;
var ty = (y + tr.y) * s;
var clones = graph.cloneCells(cells); var clones = graph.cloneCells(cells);
graph.splitEdge(target, clones, null, graph.splitEdge(target, clones, null,
x - bounds.width / 2, y - bounds.height / 2); x - bounds.width / 2, y - bounds.height / 2,
tx, ty);
select = clones; select = clones;
} }
else if (cells.length > 0) else if (cells.length > 0)

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
{ {
"name": "draw.io", "name": "draw.io",
"version": "13.0.3", "version": "13.1.4",
"description": "diagrams.net desktop", "description": "diagrams.net desktop",
"main": "electron.js", "main": "electron.js",
"scripts": { "scripts": {
@ -23,15 +23,15 @@
}, },
"homepage": "https://github.com/jgraph/drawio", "homepage": "https://github.com/jgraph/drawio",
"dependencies": { "dependencies": {
"commander": "^5.0.0", "commander": "^5.1.0",
"electron-log": "^4.1.1", "electron-log": "^4.2.0",
"electron-updater": "^4.2.5", "electron-updater": "^4.3.1",
"electron-progressbar": "^1.2.0", "electron-progressbar": "^1.2.0",
"electron-store": "^5.1.0", "electron-store": "^5.1.0",
"compression": "^1.7.4", "compression": "^1.7.4",
"crc": "^3.8.0" "crc": "^3.8.0"
}, },
"devDependencies": { "devDependencies": {
"electron": "^8.2.0" "electron": "^9.0.0"
} }
} }

View file

@ -485,7 +485,7 @@ Draw.loadPlugin(function(ui)
if (anchor) if (anchor)
{ {
ui.remoteInvoke('getPageInfo', [false], null, function(info) ui.remoteInvoke('getPageInfo', [true], null, function(info)
{ {
var url = info.url; var url = info.url;
@ -499,8 +499,8 @@ Draw.loadPlugin(function(ui)
url = url.substring(0, hash); url = url.substring(0, hash);
} }
//When page title has a [ at the beginning, conf adds id- to anchor name //We assume the new editor for simplicity
newWin.location = url + '#' + (info.title.indexOf('[') == 0? 'id-' : '') + encodeURI(info.title.replace(/\s/g, '') + '-' + anchor.replace(/\s/g, '')); newWin.location = url + '#' + encodeURIComponent(anchor.replace(/\s/g, '-'));
} }
}, function() }, function()
{ {

View file

@ -788,15 +788,15 @@ venndiagrams=Diagramas de Venn
webEmailOrOther=Web, correo electrónico o cualquier otra dirección de internet webEmailOrOther=Web, correo electrónico o cualquier otra dirección de internet
webLink=Enlace web webLink=Enlace web
wireframes=Esquemas wireframes=Esquemas
property=Property property=Propiedad
value=Value value=Valor
showMore=Show More showMore=Mostrar más
showLess=Show Less showLess=Mostrar menos
myDiagrams=My Diagrams myDiagrams=Mis diagramas
allDiagrams=All Diagrams allDiagrams=Todos los diagramas
recentlyUsed=Recently used recentlyUsed=Usados recientemente
listView=List view listView=Vista de lista
gridView=Grid view gridView=Vista de rejilla
resultsFor=Results for '{1}' resultsFor=Results for '{1}'
oneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / \ { | } oneDriveCharsNotAllowed=The following characters are not allowed: ~ " # % * : < > ? / \ { | }
oneDriveInvalidDeviceName=The specified device name is invalid oneDriveInvalidDeviceName=The specified device name is invalid

File diff suppressed because it is too large Load diff

View file

@ -6,11 +6,11 @@ if (workbox)
workbox.precaching.precacheAndRoute([ workbox.precaching.precacheAndRoute([
{ {
"url": "js/app.min.js", "url": "js/app.min.js",
"revision": "1a26117d76b33a4b7a4698b254a12724" "revision": "3d90d1d0f3bf400b5b41589e15c3ba7c"
}, },
{ {
"url": "js/extensions.min.js", "url": "js/extensions.min.js",
"revision": "b6311ad55b3030c29977e2d8689eaa8e" "revision": "ecd53ce33feef17a0ac6be648bfd056f"
}, },
{ {
"url": "js/stencils.min.js", "url": "js/stencils.min.js",
@ -118,7 +118,11 @@ if (workbox)
}, },
{ {
"url": "resources/dia_es.txt", "url": "resources/dia_es.txt",
"revision": "92862faa5d77c00ddcffb79caa524975" "revision": "94be775c840c8f010f21727e37a91c3e"
},
{
"url": "resources/dia_eu.txt",
"revision": "467b2121c8e2313421f81335d8bcd646"
}, },
{ {
"url": "resources/dia_ko.txt", "url": "resources/dia_ko.txt",
@ -376,6 +380,30 @@ if (workbox)
"url": "images/osa_database.png", "url": "images/osa_database.png",
"revision": "c350d9d9b95f37b6cfe798b40ede5fb0" "revision": "c350d9d9b95f37b6cfe798b40ede5fb0"
}, },
{
"url": "images/google-drive-logo-white.svg",
"revision": "f329d8b1be7778515a85b93fc35d9f26"
},
{
"url": "images/dropbox-logo-white.svg",
"revision": "4ea8299ac3bc31a16f199ee3aec223bf"
},
{
"url": "images/onedrive-logo-white.svg",
"revision": "b3602fa0fc947009cff3f33a581cff4d"
},
{
"url": "images/github-logo-white.svg",
"revision": "537b1127b3ca0f95b45782d1304fb77a"
},
{
"url": "images/gitlab-logo-white.svg",
"revision": "5fede9ac2f394c716b8c23e3fddc3910"
},
{
"url": "images/trello-logo-white-orange.svg",
"revision": "e2a0a52ba3766682f138138d10a75eb5"
},
{ {
"url": "images/logo-confluence.png", "url": "images/logo-confluence.png",
"revision": "ed1e55d44ae5eba8f999aba2c93e8331" "revision": "ed1e55d44ae5eba8f999aba2c93e8331"